aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig94
-rw-r--r--arch/arm/Kconfig.debug154
-rw-r--r--arch/arm/Makefile2
-rw-r--r--arch/arm/boot/compressed/atags_to_fdt.c2
-rw-r--r--arch/arm/boot/compressed/head.S5
-rw-r--r--arch/arm/boot/dts/Makefile133
-rw-r--r--arch/arm/boot/dts/am335x-bone-common.dtsi41
-rw-r--r--arch/arm/boot/dts/am335x-boneblack.dts1
-rw-r--r--arch/arm/boot/dts/am335x-evm.dts96
-rw-r--r--arch/arm/boot/dts/am335x-evmsk.dts51
-rw-r--r--arch/arm/boot/dts/am335x-igep0033.dtsi46
-rw-r--r--arch/arm/boot/dts/am335x-nano.dts5
-rw-r--r--arch/arm/boot/dts/am33xx-clocks.dtsi30
-rw-r--r--arch/arm/boot/dts/am33xx.dtsi11
-rw-r--r--arch/arm/boot/dts/am3517.dtsi16
-rw-r--r--arch/arm/boot/dts/am4372.dtsi134
-rw-r--r--arch/arm/boot/dts/am437x-gp-evm.dts234
-rw-r--r--arch/arm/boot/dts/am43x-epos-evm.dts107
-rw-r--r--arch/arm/boot/dts/am43xx-clocks.dtsi107
-rw-r--r--arch/arm/boot/dts/armada-370-db.dts2
-rw-r--r--arch/arm/boot/dts/armada-370-mirabox.dts1
-rw-r--r--arch/arm/boot/dts/armada-370-netgear-rn102.dts1
-rw-r--r--arch/arm/boot/dts/armada-370-netgear-rn104.dts1
-rw-r--r--arch/arm/boot/dts/armada-370-rd.dts1
-rw-r--r--arch/arm/boot/dts/armada-370-xp.dtsi7
-rw-r--r--arch/arm/boot/dts/armada-370.dtsi5
-rw-r--r--arch/arm/boot/dts/armada-375-db.dts14
-rw-r--r--arch/arm/boot/dts/armada-375.dtsi55
-rw-r--r--arch/arm/boot/dts/armada-380.dtsi4
-rw-r--r--arch/arm/boot/dts/armada-385-db.dts29
-rw-r--r--arch/arm/boot/dts/armada-385-rd.dts5
-rw-r--r--arch/arm/boot/dts/armada-385.dtsi6
-rw-r--r--arch/arm/boot/dts/armada-38x.dtsi84
-rw-r--r--arch/arm/boot/dts/armada-xp-axpwifiap.dts2
-rw-r--r--arch/arm/boot/dts/armada-xp-db.dts6
-rw-r--r--arch/arm/boot/dts/armada-xp-gp.dts14
-rw-r--r--arch/arm/boot/dts/armada-xp-matrix.dts4
-rw-r--r--arch/arm/boot/dts/armada-xp-mv78230.dtsi1
-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.dts1
-rw-r--r--arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts4
-rw-r--r--arch/arm/boot/dts/armada-xp.dtsi8
-rw-r--r--arch/arm/boot/dts/at91-cosino_mega2560.dts5
-rw-r--r--arch/arm/boot/dts/at91-sama5d3_xplained.dts74
-rw-r--r--arch/arm/boot/dts/at91sam9260.dtsi2
-rw-r--r--arch/arm/boot/dts/at91sam9261.dtsi139
-rw-r--r--arch/arm/boot/dts/at91sam9261ek.dts4
-rw-r--r--arch/arm/boot/dts/at91sam9g45.dtsi33
-rw-r--r--arch/arm/boot/dts/at91sam9m10g45ek.dts20
-rw-r--r--arch/arm/boot/dts/at91sam9n12.dtsi348
-rw-r--r--arch/arm/boot/dts/at91sam9n12ek.dts8
-rw-r--r--arch/arm/boot/dts/at91sam9rl.dtsi320
-rw-r--r--arch/arm/boot/dts/at91sam9rlek.dts99
-rw-r--r--arch/arm/boot/dts/at91sam9x5.dtsi355
-rw-r--r--arch/arm/boot/dts/at91sam9x5_can.dtsi31
-rw-r--r--arch/arm/boot/dts/at91sam9x5_isi.dtsi26
-rw-r--r--arch/arm/boot/dts/at91sam9x5_lcd.dtsi26
-rw-r--r--arch/arm/boot/dts/at91sam9x5_macb0.dtsi11
-rw-r--r--arch/arm/boot/dts/at91sam9x5_macb1.dtsi11
-rw-r--r--arch/arm/boot/dts/at91sam9x5_usart3.dtsi11
-rw-r--r--arch/arm/boot/dts/at91sam9x5cm.dtsi8
-rw-r--r--arch/arm/boot/dts/atlas6.dtsi32
-rw-r--r--arch/arm/boot/dts/axm5516-amarillo.dts51
-rw-r--r--arch/arm/boot/dts/axm5516-cpus.dtsi204
-rw-r--r--arch/arm/boot/dts/axm55xx.dtsi204
-rw-r--r--arch/arm/boot/dts/bcm11351.dtsi8
-rw-r--r--arch/arm/boot/dts/bcm21664.dtsi164
-rw-r--r--arch/arm/boot/dts/bcm28155-ap.dts4
-rw-r--r--arch/arm/boot/dts/bcm59056.dtsi21
-rw-r--r--arch/arm/boot/dts/berlin2.dtsi191
-rw-r--r--arch/arm/boot/dts/berlin2cd.dtsi167
-rw-r--r--arch/arm/boot/dts/berlin2q-marvell-dmp.dts39
-rw-r--r--arch/arm/boot/dts/berlin2q.dtsi363
-rw-r--r--arch/arm/boot/dts/dra7-evm.dts228
-rw-r--r--arch/arm/boot/dts/dra7.dtsi255
-rw-r--r--arch/arm/boot/dts/dra72-evm.dts24
-rw-r--r--arch/arm/boot/dts/dra72x.dtsi25
-rw-r--r--arch/arm/boot/dts/dra74x.dtsi41
-rw-r--r--arch/arm/boot/dts/dra7xx-clocks.dtsi12
-rw-r--r--arch/arm/boot/dts/exynos3250-pinctrl.dtsi475
-rw-r--r--arch/arm/boot/dts/exynos3250.dtsi444
-rw-r--r--arch/arm/boot/dts/exynos4.dtsi84
-rw-r--r--arch/arm/boot/dts/exynos4210-origen.dts19
-rw-r--r--arch/arm/boot/dts/exynos4210-trats.dts10
-rw-r--r--arch/arm/boot/dts/exynos4210-universal_c210.dts74
-rw-r--r--arch/arm/boot/dts/exynos4210.dtsi18
-rw-r--r--arch/arm/boot/dts/exynos4412-origen.dts21
-rw-r--r--arch/arm/boot/dts/exynos4412-trats2.dts135
-rw-r--r--arch/arm/boot/dts/exynos4412.dtsi4
-rw-r--r--arch/arm/boot/dts/exynos4x12.dtsi27
-rw-r--r--arch/arm/boot/dts/exynos5250-arndale.dts14
-rw-r--r--arch/arm/boot/dts/exynos5250-cros-common.dtsi6
-rw-r--r--arch/arm/boot/dts/exynos5250-pinctrl.dtsi28
-rw-r--r--arch/arm/boot/dts/exynos5250-snow.dts224
-rw-r--r--arch/arm/boot/dts/exynos5250.dtsi70
-rw-r--r--arch/arm/boot/dts/exynos5260-pinctrl.dtsi574
-rw-r--r--arch/arm/boot/dts/exynos5260-xyref5260.dts103
-rw-r--r--arch/arm/boot/dts/exynos5260.dtsi304
-rw-r--r--arch/arm/boot/dts/exynos5410-smdk5410.dts82
-rw-r--r--arch/arm/boot/dts/exynos5410.dtsi206
-rw-r--r--arch/arm/boot/dts/exynos5420-arndale-octa.dts22
-rw-r--r--arch/arm/boot/dts/exynos5420-peach-pit.dts287
-rw-r--r--arch/arm/boot/dts/exynos5420-pinctrl.dtsi28
-rw-r--r--arch/arm/boot/dts/exynos5420-smdk5420.dts51
-rw-r--r--arch/arm/boot/dts/exynos5420.dtsi219
-rw-r--r--arch/arm/boot/dts/exynos5440.dtsi2
-rw-r--r--arch/arm/boot/dts/exynos5800-peach-pi.dts253
-rw-r--r--arch/arm/boot/dts/exynos5800.dtsi28
-rw-r--r--arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts13
-rw-r--r--arch/arm/boot/dts/imx25-karo-tx25.dts77
-rw-r--r--arch/arm/boot/dts/imx25-pdk.dts217
-rw-r--r--arch/arm/boot/dts/imx25.dtsi46
-rw-r--r--arch/arm/boot/dts/imx27-pdk.dts170
-rw-r--r--arch/arm/boot/dts/imx27-phytec-phycard-s-rdk.dts4
-rw-r--r--arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts116
-rw-r--r--arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi53
-rw-r--r--arch/arm/boot/dts/imx27.dtsi30
-rw-r--r--arch/arm/boot/dts/imx28-duckbill.dts12
-rw-r--r--arch/arm/boot/dts/imx28.dtsi1
-rw-r--r--arch/arm/boot/dts/imx35-eukrea-cpuimx35.dtsi15
-rw-r--r--arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts22
-rw-r--r--arch/arm/boot/dts/imx35-pdk.dts68
-rw-r--r--arch/arm/boot/dts/imx35.dtsi25
-rw-r--r--arch/arm/boot/dts/imx50.dtsi1
-rw-r--r--arch/arm/boot/dts/imx51-babbage.dts374
-rw-r--r--arch/arm/boot/dts/imx51-digi-connectcore-jsk.dts108
-rw-r--r--arch/arm/boot/dts/imx51-digi-connectcore-som.dtsi377
-rw-r--r--arch/arm/boot/dts/imx51-eukrea-cpuimx51.dtsi11
-rw-r--r--arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts120
-rw-r--r--arch/arm/boot/dts/imx51.dtsi3
-rw-r--r--arch/arm/boot/dts/imx53-mba53.dts6
-rw-r--r--arch/arm/boot/dts/imx53-qsb-common.dtsi21
-rw-r--r--arch/arm/boot/dts/imx53.dtsi5
-rw-r--r--arch/arm/boot/dts/imx6dl-hummingboard.dts31
-rw-r--r--arch/arm/boot/dts/imx6dl-phytec-pbab01.dts19
-rw-r--r--arch/arm/boot/dts/imx6dl-phytec-pfla02.dtsi22
-rw-r--r--arch/arm/boot/dts/imx6dl-riotboard.dts539
-rw-r--r--arch/arm/boot/dts/imx6dl.dtsi3
-rw-r--r--arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts40
-rw-r--r--arch/arm/boot/dts/imx6q-gk802.dts7
-rw-r--r--arch/arm/boot/dts/imx6q-gw5400-a.dts5
-rw-r--r--arch/arm/boot/dts/imx6q-phytec-pbab01.dts33
-rw-r--r--arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi307
-rw-r--r--arch/arm/boot/dts/imx6q-udoo.dts23
-rw-r--r--arch/arm/boot/dts/imx6qdl-cubox-i.dtsi27
-rw-r--r--arch/arm/boot/dts/imx6qdl-dfi-fs700-m60.dtsi2
-rw-r--r--arch/arm/boot/dts/imx6qdl-gw51xx.dtsi5
-rw-r--r--arch/arm/boot/dts/imx6qdl-gw52xx.dtsi45
-rw-r--r--arch/arm/boot/dts/imx6qdl-gw53xx.dtsi24
-rw-r--r--arch/arm/boot/dts/imx6qdl-gw54xx.dtsi24
-rw-r--r--arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi4
-rw-r--r--arch/arm/boot/dts/imx6qdl-phytec-pbab01.dtsi102
-rw-r--r--arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi356
-rw-r--r--arch/arm/boot/dts/imx6qdl-sabrelite.dtsi4
-rw-r--r--arch/arm/boot/dts/imx6qdl-sabresd.dtsi65
-rw-r--r--arch/arm/boot/dts/imx6qdl-wandboard.dtsi19
-rw-r--r--arch/arm/boot/dts/imx6qdl.dtsi8
-rw-r--r--arch/arm/boot/dts/imx6sl.dtsi1
-rw-r--r--arch/arm/boot/dts/k2e-evm.dts81
-rw-r--r--arch/arm/boot/dts/k2hk-evm.dts29
-rw-r--r--arch/arm/boot/dts/k2l-evm.dts81
-rw-r--r--arch/arm/boot/dts/keystone.dtsi20
-rw-r--r--arch/arm/boot/dts/kirkwood-6192.dtsi35
-rw-r--r--arch/arm/boot/dts/kirkwood-6281.dtsi35
-rw-r--r--arch/arm/boot/dts/kirkwood-6282.dtsi48
-rw-r--r--arch/arm/boot/dts/kirkwood-98dx4122.dtsi68
-rw-r--r--arch/arm/boot/dts/kirkwood-b3.dts7
-rw-r--r--arch/arm/boot/dts/kirkwood-cloudbox.dts8
-rw-r--r--arch/arm/boot/dts/kirkwood-db.dtsi10
-rw-r--r--arch/arm/boot/dts/kirkwood-dns320.dts3
-rw-r--r--arch/arm/boot/dts/kirkwood-dns325.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-dnskw.dtsi4
-rw-r--r--arch/arm/boot/dts/kirkwood-dockstar.dts3
-rw-r--r--arch/arm/boot/dts/kirkwood-dreamplug.dts5
-rw-r--r--arch/arm/boot/dts/kirkwood-ds109.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-ds110jv10.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-ds111.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-ds112.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-ds209.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-ds210.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-ds212.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-ds212j.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-ds409.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-ds409slim.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-ds411.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-ds411j.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-ds411slim.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-goflexnet.dts3
-rw-r--r--arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts14
-rw-r--r--arch/arm/boot/dts/kirkwood-ib62x0.dts5
-rw-r--r--arch/arm/boot/dts/kirkwood-iconnect.dts3
-rw-r--r--arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts3
-rw-r--r--arch/arm/boot/dts/kirkwood-km_common.dtsi48
-rw-r--r--arch/arm/boot/dts/kirkwood-km_fixedeth.dts23
-rw-r--r--arch/arm/boot/dts/kirkwood-km_kirkwood.dts39
-rw-r--r--arch/arm/boot/dts/kirkwood-laplug.dts8
-rw-r--r--arch/arm/boot/dts/kirkwood-lsxl.dtsi3
-rw-r--r--arch/arm/boot/dts/kirkwood-mplcec4.dts19
-rw-r--r--arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts28
-rw-r--r--arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts5
-rw-r--r--arch/arm/boot/dts/kirkwood-netgear_readynas_nv+_v2.dts5
-rw-r--r--arch/arm/boot/dts/kirkwood-ns2-common.dtsi9
-rw-r--r--arch/arm/boot/dts/kirkwood-nsa310.dts53
-rw-r--r--arch/arm/boot/dts/kirkwood-nsa310a.dts57
-rw-r--r--arch/arm/boot/dts/kirkwood-nsa320.dts215
-rw-r--r--arch/arm/boot/dts/kirkwood-nsa3x0-common.dtsi (renamed from arch/arm/boot/dts/kirkwood-nsa310-common.dtsi)78
-rw-r--r--arch/arm/boot/dts/kirkwood-openblocks_a6.dts15
-rw-r--r--arch/arm/boot/dts/kirkwood-openblocks_a7.dts24
-rw-r--r--arch/arm/boot/dts/kirkwood-openrd-base.dts42
-rw-r--r--arch/arm/boot/dts/kirkwood-openrd-client.dts73
-rw-r--r--arch/arm/boot/dts/kirkwood-openrd-ultimate.dts58
-rw-r--r--arch/arm/boot/dts/kirkwood-openrd.dtsi90
-rw-r--r--arch/arm/boot/dts/kirkwood-rd88f6192.dts5
-rw-r--r--arch/arm/boot/dts/kirkwood-rd88f6281.dtsi3
-rw-r--r--arch/arm/boot/dts/kirkwood-rs212.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-rs409.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-rs411.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi7
-rw-r--r--arch/arm/boot/dts/kirkwood-synology.dtsi10
-rw-r--r--arch/arm/boot/dts/kirkwood-t5325.dts37
-rw-r--r--arch/arm/boot/dts/kirkwood-topkick.dts13
-rw-r--r--arch/arm/boot/dts/kirkwood-ts219-6281.dts2
-rw-r--r--arch/arm/boot/dts/kirkwood-ts219-6282.dts2
-rw-r--r--arch/arm/boot/dts/kirkwood-ts219.dtsi11
-rw-r--r--arch/arm/boot/dts/kirkwood-ts419.dtsi2
-rw-r--r--arch/arm/boot/dts/kirkwood.dtsi75
-rw-r--r--arch/arm/boot/dts/marco.dtsi2
-rw-r--r--arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi19
-rw-r--r--arch/arm/boot/dts/omap2.dtsi7
-rw-r--r--arch/arm/boot/dts/omap2420-clocks.dtsi270
-rw-r--r--arch/arm/boot/dts/omap2420.dtsi34
-rw-r--r--arch/arm/boot/dts/omap2430-clocks.dtsi344
-rw-r--r--arch/arm/boot/dts/omap2430.dtsi33
-rw-r--r--arch/arm/boot/dts/omap24xx-clocks.dtsi1244
-rw-r--r--arch/arm/boot/dts/omap3-cm-t3x30.dtsi66
-rw-r--r--arch/arm/boot/dts/omap3-evm-37xx.dts9
-rw-r--r--arch/arm/boot/dts/omap3-igep.dtsi2
-rw-r--r--arch/arm/boot/dts/omap3-igep0020.dts4
-rw-r--r--arch/arm/boot/dts/omap3-ldp.dts4
-rw-r--r--arch/arm/boot/dts/omap3-lilly-a83x.dtsi7
-rw-r--r--arch/arm/boot/dts/omap3-n900.dts244
-rw-r--r--arch/arm/boot/dts/omap3-n950-n9.dtsi14
-rw-r--r--arch/arm/boot/dts/omap3-sb-t35.dtsi37
-rw-r--r--arch/arm/boot/dts/omap3-sbc-t3517.dts13
-rw-r--r--arch/arm/boot/dts/omap3.dtsi53
-rw-r--r--arch/arm/boot/dts/omap34xx.dtsi11
-rw-r--r--arch/arm/boot/dts/omap36xx-clocks.dtsi2
-rw-r--r--arch/arm/boot/dts/omap36xx.dtsi11
-rw-r--r--arch/arm/boot/dts/omap3xxx-clocks.dtsi7
-rw-r--r--arch/arm/boot/dts/omap4-duovero-parlor.dts18
-rw-r--r--arch/arm/boot/dts/omap4-duovero.dtsi98
-rw-r--r--arch/arm/boot/dts/omap4-panda-common.dtsi15
-rw-r--r--arch/arm/boot/dts/omap4-sdp.dts6
-rw-r--r--arch/arm/boot/dts/omap4-var-dvk-om44.dts71
-rw-r--r--arch/arm/boot/dts/omap4-var-om44customboard.dtsi235
-rw-r--r--arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi68
-rw-r--r--arch/arm/boot/dts/omap4-var-som-om44.dtsi343
-rw-r--r--arch/arm/boot/dts/omap4-var-som.dts96
-rw-r--r--arch/arm/boot/dts/omap4-var-stk-om44.dts17
-rw-r--r--arch/arm/boot/dts/omap4.dtsi9
-rw-r--r--arch/arm/boot/dts/omap5-cm-t54.dts413
-rw-r--r--arch/arm/boot/dts/omap5-sbc-t54.dts51
-rw-r--r--arch/arm/boot/dts/omap5.dtsi55
-rw-r--r--arch/arm/boot/dts/omap54xx-clocks.dtsi58
-rw-r--r--arch/arm/boot/dts/orion5x-lacie-d2-network.dts236
-rw-r--r--arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts141
-rw-r--r--arch/arm/boot/dts/orion5x-maxtor-shared-storage-2.dts178
-rw-r--r--arch/arm/boot/dts/orion5x-mv88f5182.dtsi45
-rw-r--r--arch/arm/boot/dts/orion5x-rd88f5182-nas.dts177
-rw-r--r--arch/arm/boot/dts/orion5x.dtsi289
-rw-r--r--arch/arm/boot/dts/prima2.dtsi13
-rw-r--r--arch/arm/boot/dts/qcom-apq8064-ifc6410.dts16
-rw-r--r--arch/arm/boot/dts/qcom-apq8064-v2.0.dtsi1
-rw-r--r--arch/arm/boot/dts/qcom-apq8064.dtsi170
-rw-r--r--arch/arm/boot/dts/qcom-apq8074-dragonboard.dts39
-rw-r--r--arch/arm/boot/dts/qcom-apq8084-mtp.dts6
-rw-r--r--arch/arm/boot/dts/qcom-apq8084.dtsi179
-rw-r--r--arch/arm/boot/dts/qcom-msm8660-surf.dts10
-rw-r--r--arch/arm/boot/dts/qcom-msm8660.dtsi115
-rw-r--r--arch/arm/boot/dts/qcom-msm8960-cdp.dts10
-rw-r--r--arch/arm/boot/dts/qcom-msm8960.dtsi176
-rw-r--r--arch/arm/boot/dts/qcom-msm8974.dtsi62
-rw-r--r--arch/arm/boot/dts/r7s72100-genmai-reference.dts42
-rw-r--r--arch/arm/boot/dts/r7s72100-genmai.dts30
-rw-r--r--arch/arm/boot/dts/r7s72100.dtsi215
-rw-r--r--arch/arm/boot/dts/r8a73a4.dtsi18
-rw-r--r--arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts44
-rw-r--r--arch/arm/boot/dts/r8a7740.dtsi33
-rw-r--r--arch/arm/boot/dts/r8a7778-bockw-reference.dts14
-rw-r--r--arch/arm/boot/dts/r8a7778.dtsi30
-rw-r--r--arch/arm/boot/dts/r8a7779-marzen-reference.dts1
-rw-r--r--arch/arm/boot/dts/r8a7779.dtsi33
-rw-r--r--arch/arm/boot/dts/r8a7790-lager.dts83
-rw-r--r--arch/arm/boot/dts/r8a7790.dtsi133
-rw-r--r--arch/arm/boot/dts/r8a7791-henninger.dts219
-rw-r--r--arch/arm/boot/dts/r8a7791-koelsch.dts99
-rw-r--r--arch/arm/boot/dts/r8a7791.dtsi127
-rw-r--r--arch/arm/boot/dts/rk3066a-bqcurie2.dts1
-rw-r--r--arch/arm/boot/dts/rk3066a.dtsi3
-rw-r--r--arch/arm/boot/dts/rk3188-radxarock.dts1
-rw-r--r--arch/arm/boot/dts/rk3188.dtsi10
-rw-r--r--arch/arm/boot/dts/rk3xxx.dtsi9
-rw-r--r--arch/arm/boot/dts/s3c2416-smdk2416.dts13
-rw-r--r--arch/arm/boot/dts/s3c2416.dtsi42
-rw-r--r--arch/arm/boot/dts/sama5d3.dtsi147
-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/sama5d3xcm.dtsi8
-rw-r--r--arch/arm/boot/dts/sama5d3xmb.dtsi9
-rw-r--r--arch/arm/boot/dts/sh73a0-kzm9g-reference.dts15
-rw-r--r--arch/arm/boot/dts/socfpga.dtsi194
-rw-r--r--arch/arm/boot/dts/socfpga_arria5.dtsi26
-rw-r--r--arch/arm/boot/dts/socfpga_arria5_socdk.dts21
-rw-r--r--arch/arm/boot/dts/socfpga_cyclone5.dtsi26
-rw-r--r--arch/arm/boot/dts/socfpga_cyclone5_socdk.dts21
-rw-r--r--arch/arm/boot/dts/socfpga_cyclone5_sockit.dts6
-rw-r--r--arch/arm/boot/dts/socfpga_cyclone5_socrates.dts50
-rw-r--r--arch/arm/boot/dts/socfpga_vt.dts2
-rw-r--r--arch/arm/boot/dts/ste-ccu8540.dts1
-rw-r--r--arch/arm/boot/dts/ste-ccu9540.dts6
-rw-r--r--arch/arm/boot/dts/ste-href.dtsi19
-rw-r--r--arch/arm/boot/dts/ste-nomadik-stn8815.dtsi4
-rw-r--r--arch/arm/boot/dts/ste-snowball.dts4
-rw-r--r--arch/arm/boot/dts/ste-u300.dts4
-rw-r--r--arch/arm/boot/dts/stih407-b2120.dts78
-rw-r--r--arch/arm/boot/dts/stih407-clock.dtsi39
-rw-r--r--arch/arm/boot/dts/stih407-pinctrl.dtsi615
-rw-r--r--arch/arm/boot/dts/stih407.dtsi263
-rw-r--r--arch/arm/boot/dts/stih415-b2000.dts2
-rw-r--r--arch/arm/boot/dts/stih415-b2020.dts2
-rw-r--r--arch/arm/boot/dts/stih415-clock.dtsi519
-rw-r--r--arch/arm/boot/dts/stih415-pinctrl.dtsi26
-rw-r--r--arch/arm/boot/dts/stih415.dtsi30
-rw-r--r--arch/arm/boot/dts/stih416-b2000.dts3
-rw-r--r--arch/arm/boot/dts/stih416-b2020-revE.dts35
-rw-r--r--arch/arm/boot/dts/stih416-b2020.dts3
-rw-r--r--arch/arm/boot/dts/stih416-clock.dtsi735
-rw-r--r--arch/arm/boot/dts/stih416-pinctrl.dtsi26
-rw-r--r--arch/arm/boot/dts/stih416.dtsi30
-rw-r--r--arch/arm/boot/dts/stih41x-b2000.dtsi25
-rw-r--r--arch/arm/boot/dts/stih41x-b2020.dtsi2
-rw-r--r--arch/arm/boot/dts/stih41x.dtsi7
-rw-r--r--arch/arm/boot/dts/sun4i-a10-a1000.dts10
-rw-r--r--arch/arm/boot/dts/sun4i-a10-cubieboard.dts10
-rw-r--r--arch/arm/boot/dts/sun4i-a10-hackberry.dts10
-rw-r--r--arch/arm/boot/dts/sun4i-a10-inet97fv2.dts10
-rw-r--r--arch/arm/boot/dts/sun4i-a10-mini-xplus.dts10
-rw-r--r--arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts10
-rw-r--r--arch/arm/boot/dts/sun4i-a10-pcduino.dts10
-rw-r--r--arch/arm/boot/dts/sun4i-a10.dtsi84
-rw-r--r--arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts34
-rw-r--r--arch/arm/boot/dts/sun5i-a10s-r7-tv-dongle.dts100
-rw-r--r--arch/arm/boot/dts/sun5i-a10s.dtsi47
-rw-r--r--arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts17
-rw-r--r--arch/arm/boot/dts/sun5i-a13-olinuxino.dts17
-rw-r--r--arch/arm/boot/dts/sun5i-a13.dtsi37
-rw-r--r--arch/arm/boot/dts/sun6i-a31-app4-evb1.dts57
-rw-r--r--arch/arm/boot/dts/sun6i-a31-colombus.dts47
-rw-r--r--arch/arm/boot/dts/sun6i-a31-m9.dts50
-rw-r--r--arch/arm/boot/dts/sun6i-a31.dtsi290
-rw-r--r--arch/arm/boot/dts/sun7i-a20-cubieboard2.dts10
-rw-r--r--arch/arm/boot/dts/sun7i-a20-cubietruck.dts48
-rw-r--r--arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts176
-rw-r--r--arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts27
-rw-r--r--arch/arm/boot/dts/sun7i-a20.dtsi119
-rw-r--r--arch/arm/boot/dts/sunxi-common-regulators.dtsi14
-rw-r--r--arch/arm/boot/dts/tegra114-dalmore.dts21
-rw-r--r--arch/arm/boot/dts/tegra114-roth.dts1113
-rw-r--r--arch/arm/boot/dts/tegra114-tn7.dts348
-rw-r--r--arch/arm/boot/dts/tegra124-jetson-tk1.dts1827
-rw-r--r--arch/arm/boot/dts/tegra124-venice2.dts42
-rw-r--r--arch/arm/boot/dts/tegra124.dtsi12
-rw-r--r--arch/arm/boot/dts/tegra20-harmony.dts12
-rw-r--r--arch/arm/boot/dts/tegra30-beaver.dts12
-rw-r--r--arch/arm/boot/dts/tegra30-colibri-eval-v3.dts205
-rw-r--r--arch/arm/boot/dts/tegra30-colibri.dtsi377
-rw-r--r--arch/arm/boot/dts/twl4030.dtsi6
-rw-r--r--arch/arm/boot/dts/twl4030_omap3.dtsi19
-rw-r--r--arch/arm/boot/dts/vexpress-v2m-rs1.dtsi76
-rw-r--r--arch/arm/boot/dts/vexpress-v2m.dtsi76
-rw-r--r--arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts5
-rw-r--r--arch/arm/boot/dts/vexpress-v2p-ca5s.dts10
-rw-r--r--arch/arm/boot/dts/vf610-colibri.dts123
-rw-r--r--arch/arm/boot/dts/vf610-twr.dts36
-rw-r--r--arch/arm/boot/dts/vf610.dtsi37
-rw-r--r--arch/arm/boot/dts/zynq-7000.dtsi45
-rw-r--r--arch/arm/common/bL_switcher.c10
-rw-r--r--arch/arm/common/edma.c235
-rw-r--r--arch/arm/common/mcpm_entry.c6
-rw-r--r--arch/arm/common/mcpm_platsmp.c2
-rw-r--r--arch/arm/configs/at91sam9g45_defconfig3
-rw-r--r--arch/arm/configs/at91sam9rl_defconfig3
-rw-r--r--arch/arm/configs/axm55xx_defconfig248
-rw-r--r--arch/arm/configs/badge4_defconfig2
-rw-r--r--arch/arm/configs/bcm_defconfig3
-rw-r--r--arch/arm/configs/cm_x2xx_defconfig1
-rw-r--r--arch/arm/configs/cm_x300_defconfig1
-rw-r--r--arch/arm/configs/colibri_pxa270_defconfig1
-rw-r--r--arch/arm/configs/colibri_pxa300_defconfig2
-rw-r--r--arch/arm/configs/corgi_defconfig1
-rw-r--r--arch/arm/configs/davinci_all_defconfig2
-rw-r--r--arch/arm/configs/dove_defconfig2
-rw-r--r--arch/arm/configs/em_x270_defconfig1
-rw-r--r--arch/arm/configs/ep93xx_defconfig1
-rw-r--r--arch/arm/configs/exynos_defconfig1
-rw-r--r--arch/arm/configs/footbridge_defconfig2
-rw-r--r--arch/arm/configs/imx_v4_v5_defconfig8
-rw-r--r--arch/arm/configs/imx_v6_v7_defconfig12
-rw-r--r--arch/arm/configs/ixp4xx_defconfig1
-rw-r--r--arch/arm/configs/keystone_defconfig1
-rw-r--r--arch/arm/configs/kirkwood_defconfig1
-rw-r--r--arch/arm/configs/kzm9g_defconfig1
-rw-r--r--arch/arm/configs/mini2440_defconfig1
-rw-r--r--arch/arm/configs/msm_defconfig25
-rw-r--r--arch/arm/configs/multi_v5_defconfig3
-rw-r--r--arch/arm/configs/multi_v7_defconfig48
-rw-r--r--arch/arm/configs/mv78xx0_defconfig1
-rw-r--r--arch/arm/configs/mvebu_v5_defconfig5
-rw-r--r--arch/arm/configs/mvebu_v7_defconfig11
-rw-r--r--arch/arm/configs/mxs_defconfig7
-rw-r--r--arch/arm/configs/neponset_defconfig2
-rw-r--r--arch/arm/configs/omap1_defconfig2
-rw-r--r--arch/arm/configs/omap2plus_defconfig9
-rw-r--r--arch/arm/configs/pcm027_defconfig1
-rw-r--r--arch/arm/configs/qcom_defconfig165
-rw-r--r--arch/arm/configs/raumfeld_defconfig1
-rw-r--r--arch/arm/configs/realview-smp_defconfig2
-rw-r--r--arch/arm/configs/realview_defconfig2
-rw-r--r--arch/arm/configs/s3c2410_defconfig1
-rw-r--r--arch/arm/configs/s3c6400_defconfig1
-rw-r--r--arch/arm/configs/sama5_defconfig3
-rw-r--r--arch/arm/configs/shmobile_defconfig14
-rw-r--r--arch/arm/configs/spitz_defconfig1
-rw-r--r--arch/arm/configs/sunxi_defconfig46
-rw-r--r--arch/arm/configs/tct_hammer_defconfig1
-rw-r--r--arch/arm/configs/tegra_defconfig10
-rw-r--r--arch/arm/configs/trizeps4_defconfig1
-rw-r--r--arch/arm/configs/versatile_defconfig3
-rw-r--r--arch/arm/configs/viper_defconfig1
-rw-r--r--arch/arm/configs/zeus_defconfig1
-rw-r--r--arch/arm/include/asm/Kbuild1
-rw-r--r--arch/arm/include/asm/assembler.h2
-rw-r--r--arch/arm/include/asm/atomic.h5
-rw-r--r--arch/arm/include/asm/barrier.h3
-rw-r--r--arch/arm/include/asm/bitops.h4
-rw-r--r--arch/arm/include/asm/cacheflush.h4
-rw-r--r--arch/arm/include/asm/cp15.h25
-rw-r--r--arch/arm/include/asm/cputype.h1
-rw-r--r--arch/arm/include/asm/dcc.h41
-rw-r--r--arch/arm/include/asm/dma-iommu.h1
-rw-r--r--arch/arm/include/asm/dma-mapping.h25
-rw-r--r--arch/arm/include/asm/fixmap.h21
-rw-r--r--arch/arm/include/asm/ftrace.h10
-rw-r--r--arch/arm/include/asm/glue-cache.h22
-rw-r--r--arch/arm/include/asm/glue-df.h8
-rw-r--r--arch/arm/include/asm/hardware/cache-l2x0.h104
-rw-r--r--arch/arm/include/asm/highmem.h1
-rw-r--r--arch/arm/include/asm/io.h6
-rw-r--r--arch/arm/include/asm/kvm_host.h2
-rw-r--r--arch/arm/include/asm/kvm_psci.h6
-rw-r--r--arch/arm/include/asm/mach/arch.h7
-rw-r--r--arch/arm/include/asm/mcpm.h8
-rw-r--r--arch/arm/include/asm/memblock.h3
-rw-r--r--arch/arm/include/asm/memory.h2
-rw-r--r--arch/arm/include/asm/outercache.h66
-rw-r--r--arch/arm/include/asm/pci.h5
-rw-r--r--arch/arm/include/asm/prom.h2
-rw-r--r--arch/arm/include/asm/psci.h7
-rw-r--r--arch/arm/include/asm/setup.h28
-rw-r--r--arch/arm/include/asm/trusted_foundations.h2
-rw-r--r--arch/arm/include/asm/uaccess.h3
-rw-r--r--arch/arm/include/asm/xen/hypercall.h16
-rw-r--r--arch/arm/include/asm/xen/interface.h2
-rw-r--r--arch/arm/include/asm/xen/page.h1
-rw-r--r--arch/arm/include/debug/imx-uart.h11
-rw-r--r--arch/arm/include/debug/msm.S46
-rw-r--r--arch/arm/include/debug/s3c24xx.S46
-rw-r--r--arch/arm/include/debug/vf.S15
-rw-r--r--arch/arm/include/debug/zynq.S10
-rw-r--r--arch/arm/include/uapi/asm/kvm.h10
-rw-r--r--arch/arm/kernel/Makefile1
-rw-r--r--arch/arm/kernel/atags_parse.c5
-rw-r--r--arch/arm/kernel/bios32.c12
-rw-r--r--arch/arm/kernel/devtree.c47
-rw-r--r--arch/arm/kernel/entry-armv.S19
-rw-r--r--arch/arm/kernel/entry-common.S8
-rw-r--r--arch/arm/kernel/entry-header.S8
-rw-r--r--arch/arm/kernel/ftrace.c13
-rw-r--r--arch/arm/kernel/head-common.S3
-rw-r--r--arch/arm/kernel/head.S2
-rw-r--r--arch/arm/kernel/hibernate.c107
-rw-r--r--arch/arm/kernel/irq.c12
-rw-r--r--arch/arm/kernel/isa.c6
-rw-r--r--arch/arm/kernel/iwmmxt.S16
-rw-r--r--arch/arm/kernel/perf_event_cpu.c1
-rw-r--r--arch/arm/kernel/perf_event_v7.c12
-rw-r--r--arch/arm/kernel/psci.c196
-rw-r--r--arch/arm/kernel/psci_smp.c33
-rw-r--r--arch/arm/kernel/setup.c37
-rw-r--r--arch/arm/kernel/sleep.S5
-rw-r--r--arch/arm/kernel/stacktrace.c60
-rw-r--r--arch/arm/kernel/topology.c34
-rw-r--r--arch/arm/kernel/unwind.c4
-rw-r--r--arch/arm/kernel/uprobes.c20
-rw-r--r--arch/arm/kvm/Kconfig2
-rw-r--r--arch/arm/kvm/arm.c1
-rw-r--r--arch/arm/kvm/handle_exit.c10
-rw-r--r--arch/arm/kvm/mmu.c15
-rw-r--r--arch/arm/kvm/psci.c235
-rw-r--r--arch/arm/mach-at91/Kconfig2
-rw-r--r--arch/arm/mach-at91/at91rm9200_devices.c17
-rw-r--r--arch/arm/mach-at91/at91sam9260_devices.c27
-rw-r--r--arch/arm/mach-at91/at91sam9261_devices.c6
-rw-r--r--arch/arm/mach-at91/at91sam9263_devices.c5
-rw-r--r--arch/arm/mach-at91/at91sam9g45.c2
-rw-r--r--arch/arm/mach-at91/at91sam9g45_devices.c69
-rw-r--r--arch/arm/mach-at91/at91sam9n12.c6
-rw-r--r--arch/arm/mach-at91/at91sam9rl.c7
-rw-r--r--arch/arm/mach-at91/at91sam9rl_devices.c89
-rw-r--r--arch/arm/mach-at91/at91sam9x5.c6
-rw-r--r--arch/arm/mach-at91/board-1arm.c2
-rw-r--r--arch/arm/mach-at91/board-afeb-9260v1.c1
-rw-r--r--arch/arm/mach-at91/board-cam60.c1
-rw-r--r--arch/arm/mach-at91/board-carmeva.c1
-rw-r--r--arch/arm/mach-at91/board-cpu9krea.c1
-rw-r--r--arch/arm/mach-at91/board-cpuat91.c2
-rw-r--r--arch/arm/mach-at91/board-csb337.c2
-rw-r--r--arch/arm/mach-at91/board-csb637.c1
-rw-r--r--arch/arm/mach-at91/board-eb9200.c1
-rw-r--r--arch/arm/mach-at91/board-ecbat91.c1
-rw-r--r--arch/arm/mach-at91/board-eco920.c2
-rw-r--r--arch/arm/mach-at91/board-flexibity.c1
-rw-r--r--arch/arm/mach-at91/board-foxg20.c1
-rw-r--r--arch/arm/mach-at91/board-gsia18s.c1
-rw-r--r--arch/arm/mach-at91/board-kafa.c1
-rw-r--r--arch/arm/mach-at91/board-kb9202.c1
-rw-r--r--arch/arm/mach-at91/board-pcontrol-g20.c1
-rw-r--r--arch/arm/mach-at91/board-picotux200.c1
-rw-r--r--arch/arm/mach-at91/board-rm9200ek.c1
-rw-r--r--arch/arm/mach-at91/board-rsi-ews.c1
-rw-r--r--arch/arm/mach-at91/board-sam9-l9260.c1
-rw-r--r--arch/arm/mach-at91/board-sam9260ek.c1
-rw-r--r--arch/arm/mach-at91/board-sam9261ek.c1
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c1
-rw-r--r--arch/arm/mach-at91/board-sam9g20ek.c1
-rw-r--r--arch/arm/mach-at91/board-sam9m10g45ek.c17
-rw-r--r--arch/arm/mach-at91/board-sam9rlek.c17
-rw-r--r--arch/arm/mach-at91/board-snapper9260.c1
-rw-r--r--arch/arm/mach-at91/board-stamp9g20.c1
-rw-r--r--arch/arm/mach-at91/board-yl-9200.c1
-rw-r--r--arch/arm/mach-at91/board.h3
-rw-r--r--arch/arm/mach-at91/gpio.c14
-rw-r--r--arch/arm/mach-at91/gpio.h (renamed from arch/arm/mach-at91/include/mach/gpio.h)8
-rw-r--r--arch/arm/mach-at91/include/mach/at91_adc.h107
-rw-r--r--arch/arm/mach-at91/include/mach/hardware.h15
-rw-r--r--arch/arm/mach-at91/leds.c1
-rw-r--r--arch/arm/mach-at91/pm.c1
-rw-r--r--arch/arm/mach-at91/sysirq_mask.c22
-rw-r--r--arch/arm/mach-axxia/Kconfig16
-rw-r--r--arch/arm/mach-axxia/Makefile2
-rw-r--r--arch/arm/mach-axxia/axxia.c28
-rw-r--r--arch/arm/mach-axxia/platsmp.c89
-rw-r--r--arch/arm/mach-bcm/Kconfig61
-rw-r--r--arch/arm/mach-bcm/Makefile21
-rw-r--r--arch/arm/mach-bcm/bcm_5301x.c9
-rw-r--r--arch/arm/mach-bcm/bcm_kona_smc.c136
-rw-r--r--arch/arm/mach-bcm/bcm_kona_smc.h52
-rw-r--r--arch/arm/mach-bcm/bcm_kona_smc_asm.S41
-rw-r--r--arch/arm/mach-bcm/board_bcm21664.c5
-rw-r--r--arch/arm/mach-bcm/board_bcm281xx.c2
-rw-r--r--arch/arm/mach-bcm/kona_l2_cache.c (renamed from arch/arm/mach-bcm/kona.c)16
-rw-r--r--arch/arm/mach-bcm/kona_l2_cache.h (renamed from arch/arm/mach-bcm/kona.h)6
-rw-r--r--arch/arm/mach-berlin/Kconfig10
-rw-r--r--arch/arm/mach-berlin/berlin.c17
-rw-r--r--arch/arm/mach-clps711x/board-clep7312.c7
-rw-r--r--arch/arm/mach-clps711x/board-edb7211.c10
-rw-r--r--arch/arm/mach-clps711x/board-p720t.c2
-rw-r--r--arch/arm/mach-cns3xxx/Kconfig1
-rw-r--r--arch/arm/mach-cns3xxx/core.c10
-rw-r--r--arch/arm/mach-davinci/board-dm355-evm.c4
-rw-r--r--arch/arm/mach-davinci/board-dm355-leopard.c4
-rw-r--r--arch/arm/mach-davinci/da850.c9
-rw-r--r--arch/arm/mach-davinci/devices-da8xx.c31
-rw-r--r--arch/arm/mach-davinci/dm355.c14
-rw-r--r--arch/arm/mach-davinci/dm365.c16
-rw-r--r--arch/arm/mach-davinci/dm644x.c14
-rw-r--r--arch/arm/mach-davinci/dm646x.c16
-rw-r--r--arch/arm/mach-dove/irq.c36
-rw-r--r--arch/arm/mach-ep93xx/crunch-bits.S14
-rw-r--r--arch/arm/mach-exynos/Kconfig100
-rw-r--r--arch/arm/mach-exynos/Makefile14
-rw-r--r--arch/arm/mach-exynos/common.h109
-rw-r--r--arch/arm/mach-exynos/cpuidle.c256
-rw-r--r--arch/arm/mach-exynos/exynos.c111
-rw-r--r--arch/arm/mach-exynos/firmware.c26
-rw-r--r--arch/arm/mach-exynos/hotplug.c67
-rw-r--r--arch/arm/mach-exynos/include/mach/map.h7
-rw-r--r--arch/arm/mach-exynos/mcpm-exynos.c357
-rw-r--r--arch/arm/mach-exynos/platsmp.c69
-rw-r--r--arch/arm/mach-exynos/pm.c219
-rw-r--r--arch/arm/mach-exynos/pmu.c2
-rw-r--r--arch/arm/mach-exynos/regs-pmu.h18
-rw-r--r--arch/arm/mach-exynos/sleep.S30
-rw-r--r--arch/arm/mach-footbridge/cats-hw.c2
-rw-r--r--arch/arm/mach-footbridge/netwinder-hw.c2
-rw-r--r--arch/arm/mach-highbank/highbank.c21
-rw-r--r--arch/arm/mach-imx/Kconfig70
-rw-r--r--arch/arm/mach-imx/Makefile6
-rw-r--r--arch/arm/mach-imx/avic.c4
-rw-r--r--arch/arm/mach-imx/clk-gate2.c47
-rw-r--r--arch/arm/mach-imx/clk-imx1.c41
-rw-r--r--arch/arm/mach-imx/clk-imx25.c24
-rw-r--r--arch/arm/mach-imx/clk-imx27.c27
-rw-r--r--arch/arm/mach-imx/clk-imx31.c2
-rw-r--r--arch/arm/mach-imx/clk-imx35.c4
-rw-r--r--arch/arm/mach-imx/clk-imx51-imx53.c20
-rw-r--r--arch/arm/mach-imx/clk-imx6q.c21
-rw-r--r--arch/arm/mach-imx/clk-imx6sl.c6
-rw-r--r--arch/arm/mach-imx/clk-imx6sx.c524
-rw-r--r--arch/arm/mach-imx/clk.h13
-rw-r--r--arch/arm/mach-imx/common.h15
-rw-r--r--arch/arm/mach-imx/cpu.c3
-rw-r--r--arch/arm/mach-imx/devices/platform-ipu-core.c2
-rw-r--r--arch/arm/mach-imx/devices/platform-mx2-emma.c2
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c231
-rw-r--r--arch/arm/mach-imx/imx25-dt.c1
-rw-r--r--arch/arm/mach-imx/imx27-dt.c1
-rw-r--r--arch/arm/mach-imx/imx31-dt.c1
-rw-r--r--arch/arm/mach-imx/imx35-dt.c1
-rw-r--r--arch/arm/mach-imx/imx51-dt.c1
-rw-r--r--arch/arm/mach-imx/mach-apf9328.c1
-rw-r--r--arch/arm/mach-imx/mach-armadillo5x0.c1
-rw-r--r--arch/arm/mach-imx/mach-bug.c1
-rw-r--r--arch/arm/mach-imx/mach-cpuimx27.c1
-rw-r--r--arch/arm/mach-imx/mach-cpuimx35.c1
-rw-r--r--arch/arm/mach-imx/mach-cpuimx51sd.c364
-rw-r--r--arch/arm/mach-imx/mach-eukrea_cpuimx25.c1
-rw-r--r--arch/arm/mach-imx/mach-imx27_visstrim_m10.c1
-rw-r--r--arch/arm/mach-imx/mach-imx27ipcam.c1
-rw-r--r--arch/arm/mach-imx/mach-imx27lite.c1
-rw-r--r--arch/arm/mach-imx/mach-imx50.c1
-rw-r--r--arch/arm/mach-imx/mach-imx53.c1
-rw-r--r--arch/arm/mach-imx/mach-imx6sx.c51
-rw-r--r--arch/arm/mach-imx/mach-kzm_arm11_01.c1
-rw-r--r--arch/arm/mach-imx/mach-mx1ads.c2
-rw-r--r--arch/arm/mach-imx/mach-mx21ads.c174
-rw-r--r--arch/arm/mach-imx/mach-mx25_3ds.c1
-rw-r--r--arch/arm/mach-imx/mach-mx27_3ds.c1
-rw-r--r--arch/arm/mach-imx/mach-mx27ads.c1
-rw-r--r--arch/arm/mach-imx/mach-mx31_3ds.c1
-rw-r--r--arch/arm/mach-imx/mach-mx31ads.c1
-rw-r--r--arch/arm/mach-imx/mach-mx31lilly.c1
-rw-r--r--arch/arm/mach-imx/mach-mx31lite.c1
-rw-r--r--arch/arm/mach-imx/mach-mx31moboard.c1
-rw-r--r--arch/arm/mach-imx/mach-mx35_3ds.c1
-rw-r--r--arch/arm/mach-imx/mach-mx51_babbage.c428
-rw-r--r--arch/arm/mach-imx/mach-mxt_td60.c1
-rw-r--r--arch/arm/mach-imx/mach-pca100.c4
-rw-r--r--arch/arm/mach-imx/mach-pcm037.c1
-rw-r--r--arch/arm/mach-imx/mach-pcm038.c1
-rw-r--r--arch/arm/mach-imx/mach-pcm043.c1
-rw-r--r--arch/arm/mach-imx/mach-qong.c1
-rw-r--r--arch/arm/mach-imx/mach-scb9328.c1
-rw-r--r--arch/arm/mach-imx/mach-vf610.c9
-rw-r--r--arch/arm/mach-imx/mach-vpr200.c1
-rw-r--r--arch/arm/mach-imx/mxc.h6
-rw-r--r--arch/arm/mach-imx/suspend-imx6.S24
-rw-r--r--arch/arm/mach-imx/system.c8
-rw-r--r--arch/arm/mach-imx/time.c15
-rw-r--r--arch/arm/mach-imx/tzic.c4
-rw-r--r--arch/arm/mach-iop13xx/include/mach/irqs.h2
-rw-r--r--arch/arm/mach-iop13xx/include/mach/time.h3
-rw-r--r--arch/arm/mach-iop13xx/iq81340mc.c1
-rw-r--r--arch/arm/mach-iop13xx/iq81340sc.c1
-rw-r--r--arch/arm/mach-iop13xx/msi.c52
-rw-r--r--arch/arm/mach-iop13xx/setup.c1
-rw-r--r--arch/arm/mach-iop13xx/tpmi.c1
-rw-r--r--arch/arm/mach-kirkwood/board-dt.c2
-rw-r--r--arch/arm/mach-kirkwood/irq.c37
-rw-r--r--arch/arm/mach-lpc32xx/phy3250.c3
-rw-r--r--arch/arm/mach-msm/Kconfig3
-rw-r--r--arch/arm/mach-msm/board-halibut.c6
-rw-r--r--arch/arm/mach-msm/board-mahimahi.c13
-rw-r--r--arch/arm/mach-msm/board-msm7x30.c5
-rw-r--r--arch/arm/mach-msm/board-qsd8x50.c2
-rw-r--r--arch/arm/mach-msm/board-sapphire.c13
-rw-r--r--arch/arm/mach-msm/board-trout-gpio.c2
-rw-r--r--arch/arm/mach-msm/board-trout.c10
-rw-r--r--arch/arm/mach-msm/board-trout.h2
-rw-r--r--arch/arm/mach-mvebu/Kconfig21
-rw-r--r--arch/arm/mach-mvebu/Makefile13
-rw-r--r--arch/arm/mach-mvebu/armada-370-xp.h2
-rw-r--r--arch/arm/mach-mvebu/board-t5325.c41
-rw-r--r--arch/arm/mach-mvebu/board-v7.c89
-rw-r--r--arch/arm/mach-mvebu/board.h6
-rw-r--r--arch/arm/mach-mvebu/coherency.c340
-rw-r--r--arch/arm/mach-mvebu/coherency.h3
-rw-r--r--arch/arm/mach-mvebu/coherency_ll.S143
-rw-r--r--arch/arm/mach-mvebu/common.h3
-rw-r--r--arch/arm/mach-mvebu/cpu-reset.c103
-rw-r--r--arch/arm/mach-mvebu/dove.c2
-rw-r--r--arch/arm/mach-mvebu/headsmp-a9.S34
-rw-r--r--arch/arm/mach-mvebu/headsmp.S15
-rw-r--r--arch/arm/mach-mvebu/kirkwood.c5
-rw-r--r--arch/arm/mach-mvebu/mvebu-soc-id.c45
-rw-r--r--arch/arm/mach-mvebu/mvebu-soc-id.h4
-rw-r--r--arch/arm/mach-mvebu/platsmp-a9.c102
-rw-r--r--arch/arm/mach-mvebu/platsmp.c23
-rw-r--r--arch/arm/mach-mvebu/pmsu.c273
-rw-r--r--arch/arm/mach-mvebu/system-controller.c15
-rw-r--r--arch/arm/mach-nomadik/cpu-8815.c13
-rw-r--r--arch/arm/mach-omap1/board-h2.c2
-rw-r--r--arch/arm/mach-omap1/board-h3.c2
-rw-r--r--arch/arm/mach-omap1/board-innovator.c2
-rw-r--r--arch/arm/mach-omap1/board-osk.c2
-rw-r--r--arch/arm/mach-omap1/board-sx1.c26
-rw-r--r--arch/arm/mach-omap1/pm.c13
-rw-r--r--arch/arm/mach-omap2/Kconfig1
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c5
-rw-r--r--arch/arm/mach-omap2/board-flash.c6
-rw-r--r--arch/arm/mach-omap2/board-generic.c45
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c1
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c4
-rw-r--r--arch/arm/mach-omap2/cclock3xxx_data.c3
-rw-r--r--arch/arm/mach-omap2/clkt2xxx_dpllcore.c2
-rw-r--r--arch/arm/mach-omap2/clkt2xxx_osc.c8
-rw-r--r--arch/arm/mach-omap2/clkt2xxx_sys.c2
-rw-r--r--arch/arm/mach-omap2/clockdomain.h3
-rw-r--r--arch/arm/mach-omap2/cm2xxx.c15
-rw-r--r--arch/arm/mach-omap2/cm2xxx_3xxx.h4
-rw-r--r--arch/arm/mach-omap2/cm33xx.c4
-rw-r--r--arch/arm/mach-omap2/cm33xx.h3
-rw-r--r--arch/arm/mach-omap2/cm3xxx.c25
-rw-r--r--arch/arm/mach-omap2/cm3xxx.h5
-rw-r--r--arch/arm/mach-omap2/cm44xx.c11
-rw-r--r--arch/arm/mach-omap2/cm_common.c2
-rw-r--r--arch/arm/mach-omap2/cminst44xx.c14
-rw-r--r--arch/arm/mach-omap2/common.h1
-rw-r--r--arch/arm/mach-omap2/control.c20
-rw-r--r--arch/arm/mach-omap2/cpuidle44xx.c25
-rw-r--r--arch/arm/mach-omap2/display.c62
-rw-r--r--arch/arm/mach-omap2/dma.c4
-rw-r--r--arch/arm/mach-omap2/gpmc-nand.c2
-rw-r--r--arch/arm/mach-omap2/gpmc.c8
-rw-r--r--arch/arm/mach-omap2/hdq1w.c2
-rw-r--r--arch/arm/mach-omap2/id.c39
-rw-r--r--arch/arm/mach-omap2/io.c3
-rw-r--r--arch/arm/mach-omap2/irq.c4
-rw-r--r--arch/arm/mach-omap2/mux.c8
-rw-r--r--arch/arm/mach-omap2/omap-headsmp.S6
-rw-r--r--arch/arm/mach-omap2/omap-hotplug.c4
-rw-r--r--arch/arm/mach-omap2/omap-mpuss-lowpower.c26
-rw-r--r--arch/arm/mach-omap2/omap-smp.c6
-rw-r--r--arch/arm/mach-omap2/omap-wakeupgen.c42
-rw-r--r--arch/arm/mach-omap2/omap4-common.c104
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c10
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c1
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c9
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c99
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_54xx_data.c285
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_7xx_data.c10
-rw-r--r--arch/arm/mach-omap2/omap_phy_internal.c6
-rw-r--r--arch/arm/mach-omap2/omap_twl.c60
-rw-r--r--arch/arm/mach-omap2/pdata-quirks.c19
-rw-r--r--arch/arm/mach-omap2/pm.c45
-rw-r--r--arch/arm/mach-omap2/pm.h8
-rw-r--r--arch/arm/mach-omap2/pm24xx.c4
-rw-r--r--arch/arm/mach-omap2/pm34xx.c11
-rw-r--r--arch/arm/mach-omap2/pm44xx.c6
-rw-r--r--arch/arm/mach-omap2/powerdomain-common.c1
-rw-r--r--arch/arm/mach-omap2/powerdomain.c1
-rw-r--r--arch/arm/mach-omap2/powerdomain.h3
-rw-r--r--arch/arm/mach-omap2/prcm-common.h24
-rw-r--r--arch/arm/mach-omap2/prcm_mpu44xx.c4
-rw-r--r--arch/arm/mach-omap2/prcm_mpu44xx.h1
-rw-r--r--arch/arm/mach-omap2/prm-regbits-34xx.h11
-rw-r--r--arch/arm/mach-omap2/prm.h10
-rw-r--r--arch/arm/mach-omap2/prm2xxx.c13
-rw-r--r--arch/arm/mach-omap2/prm2xxx.h2
-rw-r--r--arch/arm/mach-omap2/prm2xxx_3xxx.c1
-rw-r--r--arch/arm/mach-omap2/prm2xxx_3xxx.h4
-rw-r--r--arch/arm/mach-omap2/prm33xx.c5
-rw-r--r--arch/arm/mach-omap2/prm3xxx.c22
-rw-r--r--arch/arm/mach-omap2/prm3xxx.h2
-rw-r--r--arch/arm/mach-omap2/prm44xx.c24
-rw-r--r--arch/arm/mach-omap2/prm_common.c17
-rw-r--r--arch/arm/mach-omap2/prminst44xx.c4
-rw-r--r--arch/arm/mach-omap2/sdrc.h8
-rw-r--r--arch/arm/mach-omap2/sdrc2xxx.c4
-rw-r--r--arch/arm/mach-omap2/soc.h5
-rw-r--r--arch/arm/mach-omap2/sr_device.c2
-rw-r--r--arch/arm/mach-omap2/sram.c16
-rw-r--r--arch/arm/mach-omap2/timer.c10
-rw-r--r--arch/arm/mach-omap2/usb-host.c10
-rw-r--r--arch/arm/mach-omap2/vc.c236
-rw-r--r--arch/arm/mach-omap2/vc.h3
-rw-r--r--arch/arm/mach-omap2/wd_timer.c8
-rw-r--r--arch/arm/mach-orion5x/Kconfig37
-rw-r--r--arch/arm/mach-orion5x/Makefile7
-rw-r--r--arch/arm/mach-orion5x/board-d2net.c109
-rw-r--r--arch/arm/mach-orion5x/board-dt.c18
-rw-r--r--arch/arm/mach-orion5x/board-mss2.c90
-rw-r--r--arch/arm/mach-orion5x/board-rd88f5182.c116
-rw-r--r--arch/arm/mach-orion5x/common.c3
-rw-r--r--arch/arm/mach-orion5x/common.h16
-rw-r--r--arch/arm/mach-orion5x/d2net-setup.c365
-rw-r--r--arch/arm/mach-orion5x/edmini_v2-setup.c169
-rw-r--r--arch/arm/mach-orion5x/irq.c28
-rw-r--r--arch/arm/mach-orion5x/mss2-setup.c274
-rw-r--r--arch/arm/mach-prima2/Makefile1
-rw-r--r--arch/arm/mach-prima2/common.c6
-rw-r--r--arch/arm/mach-prima2/l2x0.c49
-rw-r--r--arch/arm/mach-prima2/pm.c1
-rw-r--r--arch/arm/mach-prima2/rstc.c34
-rw-r--r--arch/arm/mach-pxa/cm-x300.c3
-rw-r--r--arch/arm/mach-pxa/corgi.c10
-rw-r--r--arch/arm/mach-pxa/eseries.c9
-rw-r--r--arch/arm/mach-pxa/poodle.c8
-rw-r--r--arch/arm/mach-pxa/spitz.c8
-rw-r--r--arch/arm/mach-pxa/tosa.c8
-rw-r--r--arch/arm/mach-pxa/zeus.c89
-rw-r--r--arch/arm/mach-qcom/Kconfig4
-rw-r--r--arch/arm/mach-qcom/board.c4
-rw-r--r--arch/arm/mach-realview/core.c26
-rw-r--r--arch/arm/mach-realview/core.h4
-rw-r--r--arch/arm/mach-realview/realview_eb.c10
-rw-r--r--arch/arm/mach-realview/realview_pb1176.c17
-rw-r--r--arch/arm/mach-realview/realview_pb11mp.c10
-rw-r--r--arch/arm/mach-realview/realview_pba8.c1
-rw-r--r--arch/arm/mach-realview/realview_pbx.c22
-rw-r--r--arch/arm/mach-rockchip/core.h2
-rw-r--r--arch/arm/mach-rockchip/platsmp.c3
-rw-r--r--arch/arm/mach-rockchip/rockchip.c10
-rw-r--r--arch/arm/mach-s3c24xx/Kconfig70
-rw-r--r--arch/arm/mach-s3c24xx/Makefile13
-rw-r--r--arch/arm/mach-s3c24xx/clock-dclk.c195
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c2410.c284
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c2412.c760
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c2416.c171
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c2440.c217
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c2443.c212
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c244x.c141
-rw-r--r--arch/arm/mach-s3c24xx/common-s3c2443.c675
-rw-r--r--arch/arm/mach-s3c24xx/common.c85
-rw-r--r--arch/arm/mach-s3c24xx/common.h21
-rw-r--r--arch/arm/mach-s3c24xx/cpufreq-utils.c4
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/debug-macro.S101
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/regs-clock.h18
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/regs-gpio.h3
-rw-r--r--arch/arm/mach-s3c24xx/mach-amlm5900.c9
-rw-r--r--arch/arm/mach-s3c24xx/mach-anubis.c34
-rw-r--r--arch/arm/mach-s3c24xx/mach-at2440evb.c10
-rw-r--r--arch/arm/mach-s3c24xx/mach-bast.c34
-rw-r--r--arch/arm/mach-s3c24xx/mach-gta02.c8
-rw-r--r--arch/arm/mach-s3c24xx/mach-h1940.c10
-rw-r--r--arch/arm/mach-s3c24xx/mach-jive.c9
-rw-r--r--arch/arm/mach-s3c24xx/mach-mini2440.c10
-rw-r--r--arch/arm/mach-s3c24xx/mach-n30.c12
-rw-r--r--arch/arm/mach-s3c24xx/mach-nexcoder.c10
-rw-r--r--arch/arm/mach-s3c24xx/mach-osiris.c34
-rw-r--r--arch/arm/mach-s3c24xx/mach-otom.c10
-rw-r--r--arch/arm/mach-s3c24xx/mach-qt2410.c9
-rw-r--r--arch/arm/mach-s3c24xx/mach-rx1950.c21
-rw-r--r--arch/arm/mach-s3c24xx/mach-rx3715.c10
-rw-r--r--arch/arm/mach-s3c24xx/mach-s3c2416-dt.c38
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2410.c9
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2413.c17
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2416.c9
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2440.c10
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2443.c9
-rw-r--r--arch/arm/mach-s3c24xx/mach-tct_hammer.c9
-rw-r--r--arch/arm/mach-s3c24xx/mach-vr1000.c34
-rw-r--r--arch/arm/mach-s3c24xx/mach-vstms.c17
-rw-r--r--arch/arm/mach-s3c24xx/pm.c17
-rw-r--r--arch/arm/mach-s3c24xx/s3c2410.c56
-rw-r--r--arch/arm/mach-s3c24xx/s3c2412.c43
-rw-r--r--arch/arm/mach-s3c24xx/s3c2442.c111
-rw-r--r--arch/arm/mach-s3c24xx/s3c244x.c59
-rw-r--r--arch/arm/mach-s5pv210/mach-goni.c51
-rw-r--r--arch/arm/mach-sa1100/assabet.c2
-rw-r--r--arch/arm/mach-shmobile/Kconfig29
-rw-r--r--arch/arm/mach-shmobile/Makefile4
-rw-r--r--arch/arm/mach-shmobile/Makefile.boot1
-rw-r--r--arch/arm/mach-shmobile/board-armadillo800eva-reference.c6
-rw-r--r--arch/arm/mach-shmobile/board-armadillo800eva.c13
-rw-r--r--arch/arm/mach-shmobile/board-bockw.c63
-rw-r--r--arch/arm/mach-shmobile/board-genmai-reference.c18
-rw-r--r--arch/arm/mach-shmobile/board-genmai.c44
-rw-r--r--arch/arm/mach-shmobile/board-koelsch-reference.c73
-rw-r--r--arch/arm/mach-shmobile/board-koelsch.c4
-rw-r--r--arch/arm/mach-shmobile/board-kzm9g-reference.c4
-rw-r--r--arch/arm/mach-shmobile/board-kzm9g.c4
-rw-r--r--arch/arm/mach-shmobile/board-lager-reference.c69
-rw-r--r--arch/arm/mach-shmobile/board-lager.c29
-rw-r--r--arch/arm/mach-shmobile/clock-emev2.c231
-rw-r--r--arch/arm/mach-shmobile/clock-r7s72100.c11
-rw-r--r--arch/arm/mach-shmobile/clock-r8a73a4.c2
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7740.c12
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7778.c26
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7779.c4
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7790.c34
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7791.c25
-rw-r--r--arch/arm/mach-shmobile/clock-sh7372.c9
-rw-r--r--arch/arm/mach-shmobile/clock-sh73a0.c5
-rw-r--r--arch/arm/mach-shmobile/clock.c28
-rw-r--r--arch/arm/mach-shmobile/include/mach/clock.h17
-rw-r--r--arch/arm/mach-shmobile/include/mach/common.h1
-rw-r--r--arch/arm/mach-shmobile/include/mach/emev2.h9
-rw-r--r--arch/arm/mach-shmobile/include/mach/r8a7740.h1
-rw-r--r--arch/arm/mach-shmobile/include/mach/r8a7791.h1
-rw-r--r--arch/arm/mach-shmobile/pm-rmobile.c38
-rw-r--r--arch/arm/mach-shmobile/setup-emev2.c11
-rw-r--r--arch/arm/mach-shmobile/setup-r7s72100.c69
-rw-r--r--arch/arm/mach-shmobile/setup-r8a73a4.c17
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7740.c154
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7778.c32
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7779.c70
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7790.c37
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7791.c34
-rw-r--r--arch/arm/mach-shmobile/setup-rcar-gen2.c16
-rw-r--r--arch/arm/mach-shmobile/setup-sh7372.c95
-rw-r--r--arch/arm/mach-shmobile/setup-sh73a0.c92
-rw-r--r--arch/arm/mach-shmobile/smp-emev2.c1
-rw-r--r--arch/arm/mach-shmobile/smp-r8a7791.c15
-rw-r--r--arch/arm/mach-shmobile/timer.c45
-rw-r--r--arch/arm/mach-socfpga/socfpga.c9
-rw-r--r--arch/arm/mach-spear/platsmp.c19
-rw-r--r--arch/arm/mach-spear/spear13xx.c8
-rw-r--r--arch/arm/mach-sti/board-dt.c28
-rw-r--r--arch/arm/mach-sunxi/Kconfig38
-rw-r--r--arch/arm/mach-sunxi/common.h19
-rw-r--r--arch/arm/mach-sunxi/platsmp.c3
-rw-r--r--arch/arm/mach-sunxi/sunxi.c113
-rw-r--r--arch/arm/mach-tegra/Kconfig1
-rw-r--r--arch/arm/mach-tegra/pm.h2
-rw-r--r--arch/arm/mach-tegra/pmc.c24
-rw-r--r--arch/arm/mach-tegra/reset-handler.S11
-rw-r--r--arch/arm/mach-tegra/sleep.h31
-rw-r--r--arch/arm/mach-tegra/tegra.c32
-rw-r--r--arch/arm/mach-ux500/Makefile3
-rw-r--r--arch/arm/mach-ux500/board-mop500-sdi.c166
-rw-r--r--arch/arm/mach-ux500/board-mop500.h5
-rw-r--r--arch/arm/mach-ux500/cache-l2x0.c32
-rw-r--r--arch/arm/mach-ux500/cpu-db8500.c4
-rw-r--r--arch/arm/mach-versatile/core.c16
-rw-r--r--arch/arm/mach-vexpress/Kconfig3
-rw-r--r--arch/arm/mach-vexpress/core.h3
-rw-r--r--arch/arm/mach-vexpress/ct-ca9x4.c38
-rw-r--r--arch/arm/mach-vexpress/platsmp.c187
-rw-r--r--arch/arm/mach-vexpress/tc2_pm.c4
-rw-r--r--arch/arm/mach-vexpress/v2m.c85
-rw-r--r--arch/arm/mach-zynq/Kconfig10
-rw-r--r--arch/arm/mach-zynq/common.c75
-rw-r--r--arch/arm/mach-zynq/common.h1
-rw-r--r--arch/arm/mach-zynq/headsmp.S5
-rw-r--r--arch/arm/mach-zynq/slcr.c19
-rw-r--r--arch/arm/mm/Kconfig51
-rw-r--r--arch/arm/mm/Makefile3
-rw-r--r--arch/arm/mm/alignment.c19
-rw-r--r--arch/arm/mm/cache-feroceon-l2.c1
-rw-r--r--arch/arm/mm/cache-l2x0.c1498
-rw-r--r--arch/arm/mm/cache-v7.S12
-rw-r--r--arch/arm/mm/dma-mapping.c28
-rw-r--r--arch/arm/mm/flush.c33
-rw-r--r--arch/arm/mm/highmem.c33
-rw-r--r--arch/arm/mm/hugetlbpage.c5
-rw-r--r--arch/arm/mm/init.c82
-rw-r--r--arch/arm/mm/ioremap.c9
-rw-r--r--arch/arm/mm/l2c-common.c20
-rw-r--r--arch/arm/mm/l2c-l2x0-resume.S58
-rw-r--r--arch/arm/mm/mm.h4
-rw-r--r--arch/arm/mm/mmu.c238
-rw-r--r--arch/arm/mm/nommu.c66
-rw-r--r--arch/arm/mm/proc-v7-3level.S18
-rw-r--r--arch/arm/mm/proc-v7.S39
-rw-r--r--arch/arm/mm/proc-v7m.S8
-rw-r--r--arch/arm/plat-omap/counter_32k.c6
-rw-r--r--arch/arm/plat-omap/debug-leds.c14
-rw-r--r--arch/arm/plat-omap/dma.c10
-rw-r--r--arch/arm/plat-omap/dmtimer.c8
-rw-r--r--arch/arm/plat-omap/include/plat/dmtimer.h16
-rw-r--r--arch/arm/plat-orion/gpio.c48
-rw-r--r--arch/arm/plat-orion/include/plat/irq.h1
-rw-r--r--arch/arm/plat-orion/include/plat/orion-gpio.h1
-rw-r--r--arch/arm/plat-orion/irq.c77
-rw-r--r--arch/arm/plat-samsung/Makefile3
-rw-r--r--arch/arm/plat-samsung/include/plat/cpu-freq-core.h1
-rw-r--r--arch/arm/plat-samsung/include/plat/cpu.h61
-rw-r--r--arch/arm/plat-samsung/s5p-dev-mfc.c4
-rw-r--r--arch/arm/plat-samsung/s5p-sleep.S1
-rw-r--r--arch/arm/plat-versatile/Kconfig6
-rw-r--r--arch/arm/plat-versatile/Makefile1
-rw-r--r--arch/arm/plat-versatile/leds.c103
-rw-r--r--arch/arm/vfp/entry.S3
-rw-r--r--arch/arm/xen/enlighten.c9
-rw-r--r--arch/arm/xen/hypercall.S1
998 files changed, 36308 insertions, 14056 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index db3c5414223e..87b63fde06d7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -165,12 +165,9 @@ config TRACE_IRQFLAGS_SUPPORT
165 bool 165 bool
166 default y 166 default y
167 167
168config RWSEM_GENERIC_SPINLOCK
169 bool
170 default y
171
172config RWSEM_XCHGADD_ALGORITHM 168config RWSEM_XCHGADD_ALGORITHM
173 bool 169 bool
170 default y
174 171
175config ARCH_HAS_ILOG2_U32 172config ARCH_HAS_ILOG2_U32
176 bool 173 bool
@@ -314,6 +311,7 @@ config ARCH_MULTIPLATFORM
314 select CLKSRC_OF 311 select CLKSRC_OF
315 select COMMON_CLK 312 select COMMON_CLK
316 select GENERIC_CLOCKEVENTS 313 select GENERIC_CLOCKEVENTS
314 select MIGHT_HAVE_PCI
317 select MULTI_IRQ_HANDLER 315 select MULTI_IRQ_HANDLER
318 select SPARSE_IRQ 316 select SPARSE_IRQ
319 select USE_OF 317 select USE_OF
@@ -376,7 +374,6 @@ config ARCH_AT91
376 select ARCH_REQUIRE_GPIOLIB 374 select ARCH_REQUIRE_GPIOLIB
377 select CLKDEV_LOOKUP 375 select CLKDEV_LOOKUP
378 select IRQ_DOMAIN 376 select IRQ_DOMAIN
379 select NEED_MACH_GPIO_H
380 select NEED_MACH_IO_H if PCCARD 377 select NEED_MACH_IO_H if PCCARD
381 select PINCTRL 378 select PINCTRL
382 select PINCTRL_AT91 if USE_OF 379 select PINCTRL_AT91 if USE_OF
@@ -480,6 +477,7 @@ config ARCH_IOP13XX
480 select PCI 477 select PCI
481 select PLAT_IOP 478 select PLAT_IOP
482 select VMSPLIT_1G 479 select VMSPLIT_1G
480 select SPARSE_IRQ
483 help 481 help
484 Support for Intel's IOP13XX (XScale) family of processors. 482 Support for Intel's IOP13XX (XScale) family of processors.
485 483
@@ -755,7 +753,7 @@ config ARCH_S3C64XX
755 select ATAGS 753 select ATAGS
756 select CLKDEV_LOOKUP 754 select CLKDEV_LOOKUP
757 select CLKSRC_SAMSUNG_PWM 755 select CLKSRC_SAMSUNG_PWM
758 select COMMON_CLK 756 select COMMON_CLK_SAMSUNG
759 select CPU_V6K 757 select CPU_V6K
760 select GENERIC_CLOCKEVENTS 758 select GENERIC_CLOCKEVENTS
761 select GPIO_SAMSUNG 759 select GPIO_SAMSUNG
@@ -829,25 +827,6 @@ config ARCH_S5PV210
829 help 827 help
830 Samsung S5PV210/S5PC110 series based systems 828 Samsung S5PV210/S5PC110 series based systems
831 829
832config ARCH_EXYNOS
833 bool "Samsung EXYNOS"
834 select ARCH_HAS_CPUFREQ
835 select ARCH_HAS_HOLES_MEMORYMODEL
836 select ARCH_REQUIRE_GPIOLIB
837 select ARCH_SPARSEMEM_ENABLE
838 select ARM_GIC
839 select COMMON_CLK
840 select CPU_V7
841 select GENERIC_CLOCKEVENTS
842 select HAVE_S3C2410_I2C if I2C
843 select HAVE_S3C2410_WATCHDOG if WATCHDOG
844 select HAVE_S3C_RTC if RTC_CLASS
845 select NEED_MACH_MEMORY_H
846 select SPARSE_IRQ
847 select USE_OF
848 help
849 Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
850
851config ARCH_DAVINCI 830config ARCH_DAVINCI
852 bool "TI DaVinci" 831 bool "TI DaVinci"
853 select ARCH_HAS_HOLES_MEMORYMODEL 832 select ARCH_HAS_HOLES_MEMORYMODEL
@@ -951,6 +930,8 @@ source "arch/arm/mach-mvebu/Kconfig"
951 930
952source "arch/arm/mach-at91/Kconfig" 931source "arch/arm/mach-at91/Kconfig"
953 932
933source "arch/arm/mach-axxia/Kconfig"
934
954source "arch/arm/mach-bcm/Kconfig" 935source "arch/arm/mach-bcm/Kconfig"
955 936
956source "arch/arm/mach-berlin/Kconfig" 937source "arch/arm/mach-berlin/Kconfig"
@@ -1105,11 +1086,6 @@ source "arch/arm/firmware/Kconfig"
1105 1086
1106source arch/arm/mm/Kconfig 1087source arch/arm/mm/Kconfig
1107 1088
1108config ARM_NR_BANKS
1109 int
1110 default 16 if ARCH_EP93XX
1111 default 8
1112
1113config IWMMXT 1089config IWMMXT
1114 bool "Enable iWMMXt support" 1090 bool "Enable iWMMXt support"
1115 depends on CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_PJ4 || CPU_PJ4B 1091 depends on CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_PJ4 || CPU_PJ4B
@@ -1230,19 +1206,6 @@ config ARM_ERRATA_742231
1230 register of the Cortex-A9 which reduces the linefill issuing 1206 register of the Cortex-A9 which reduces the linefill issuing
1231 capabilities of the processor. 1207 capabilities of the processor.
1232 1208
1233config PL310_ERRATA_588369
1234 bool "PL310 errata: Clean & Invalidate maintenance operations do not invalidate clean lines"
1235 depends on CACHE_L2X0
1236 help
1237 The PL310 L2 cache controller implements three types of Clean &
1238 Invalidate maintenance operations: by Physical Address
1239 (offset 0x7F0), by Index/Way (0x7F8) and by Way (0x7FC).
1240 They are architecturally defined to behave as the execution of a
1241 clean operation followed immediately by an invalidate operation,
1242 both performing to the same memory location. This functionality
1243 is not correctly implemented in PL310 as clean lines are not
1244 invalidated as a result of these operations.
1245
1246config ARM_ERRATA_643719 1209config ARM_ERRATA_643719
1247 bool "ARM errata: LoUIS bit field in CLIDR register is incorrect" 1210 bool "ARM errata: LoUIS bit field in CLIDR register is incorrect"
1248 depends on CPU_V7 && SMP 1211 depends on CPU_V7 && SMP
@@ -1265,17 +1228,6 @@ config ARM_ERRATA_720789
1265 tables. The workaround changes the TLB flushing routines to invalidate 1228 tables. The workaround changes the TLB flushing routines to invalidate
1266 entries regardless of the ASID. 1229 entries regardless of the ASID.
1267 1230
1268config PL310_ERRATA_727915
1269 bool "PL310 errata: Background Clean & Invalidate by Way operation can cause data corruption"
1270 depends on CACHE_L2X0
1271 help
1272 PL310 implements the Clean & Invalidate by Way L2 cache maintenance
1273 operation (offset 0x7FC). This operation runs in background so that
1274 PL310 can handle normal accesses while it is in progress. Under very
1275 rare circumstances, due to this erratum, write data can be lost when
1276 PL310 treats a cacheable write transaction during a Clean &
1277 Invalidate by Way operation.
1278
1279config ARM_ERRATA_743622 1231config ARM_ERRATA_743622
1280 bool "ARM errata: Faulty hazard checking in the Store Buffer may lead to data corruption" 1232 bool "ARM errata: Faulty hazard checking in the Store Buffer may lead to data corruption"
1281 depends on CPU_V7 1233 depends on CPU_V7
@@ -1301,21 +1253,6 @@ config ARM_ERRATA_751472
1301 operation is received by a CPU before the ICIALLUIS has completed, 1253 operation is received by a CPU before the ICIALLUIS has completed,
1302 potentially leading to corrupted entries in the cache or TLB. 1254 potentially leading to corrupted entries in the cache or TLB.
1303 1255
1304config PL310_ERRATA_753970
1305 bool "PL310 errata: cache sync operation may be faulty"
1306 depends on CACHE_PL310
1307 help
1308 This option enables the workaround for the 753970 PL310 (r3p0) erratum.
1309
1310 Under some condition the effect of cache sync operation on
1311 the store buffer still remains when the operation completes.
1312 This means that the store buffer is always asked to drain and
1313 this prevents it from merging any further writes. The workaround
1314 is to replace the normal offset of cache sync operation (0x730)
1315 by another offset targeting an unmapped PL310 register 0x740.
1316 This has the same effect as the cache sync operation: store buffer
1317 drain and waiting for all buffers empty.
1318
1319config ARM_ERRATA_754322 1256config ARM_ERRATA_754322
1320 bool "ARM errata: possible faulty MMU translations following an ASID switch" 1257 bool "ARM errata: possible faulty MMU translations following an ASID switch"
1321 depends on CPU_V7 1258 depends on CPU_V7
@@ -1364,18 +1301,6 @@ config ARM_ERRATA_764369
1364 relevant cache maintenance functions and sets a specific bit 1301 relevant cache maintenance functions and sets a specific bit
1365 in the diagnostic control register of the SCU. 1302 in the diagnostic control register of the SCU.
1366 1303
1367config PL310_ERRATA_769419
1368 bool "PL310 errata: no automatic Store Buffer drain"
1369 depends on CACHE_L2X0
1370 help
1371 On revisions of the PL310 prior to r3p2, the Store Buffer does
1372 not automatically drain. This can cause normal, non-cacheable
1373 writes to be retained when the memory system is idle, leading
1374 to suboptimal I/O performance for drivers using coherent DMA.
1375 This option adds a write barrier to the cpu_idle loop so that,
1376 on systems with an outer cache, the store buffer is drained
1377 explicitly.
1378
1379config ARM_ERRATA_775420 1304config ARM_ERRATA_775420
1380 bool "ARM errata: A data cache maintenance operation which aborts, might lead to deadlock" 1305 bool "ARM errata: A data cache maintenance operation which aborts, might lead to deadlock"
1381 depends on CPU_V7 1306 depends on CPU_V7
@@ -1646,9 +1571,9 @@ config ARCH_NR_GPIO
1646 int 1571 int
1647 default 1024 if ARCH_SHMOBILE || ARCH_TEGRA 1572 default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
1648 default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || SOC_DRA7XX || ARCH_S3C24XX || ARCH_S3C64XX 1573 default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || SOC_DRA7XX || ARCH_S3C24XX || ARCH_S3C64XX
1574 default 416 if ARCH_SUNXI
1649 default 392 if ARCH_U8500 1575 default 392 if ARCH_U8500
1650 default 352 if ARCH_VT8500 1576 default 352 if ARCH_VT8500
1651 default 288 if ARCH_SUNXI
1652 default 264 if MACH_H4700 1577 default 264 if MACH_H4700
1653 default 0 1578 default 0
1654 help 1579 help
@@ -2295,6 +2220,11 @@ config ARCH_SUSPEND_POSSIBLE
2295config ARM_CPU_SUSPEND 2220config ARM_CPU_SUSPEND
2296 def_bool PM_SLEEP 2221 def_bool PM_SLEEP
2297 2222
2223config ARCH_HIBERNATION_POSSIBLE
2224 bool
2225 depends on MMU
2226 default y if ARCH_SUSPEND_POSSIBLE
2227
2298endmenu 2228endmenu
2299 2229
2300source "net/Kconfig" 2230source "net/Kconfig"
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index eab8ecbe69c1..8f90595069a1 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -317,6 +317,13 @@ choice
317 Say Y here if you want kernel low-level debugging support 317 Say Y here if you want kernel low-level debugging support
318 on i.MX6SL. 318 on i.MX6SL.
319 319
320 config DEBUG_IMX6SX_UART
321 bool "i.MX6SX Debug UART"
322 depends on SOC_IMX6SX
323 help
324 Say Y here if you want kernel low-level debugging support
325 on i.MX6SX.
326
320 config DEBUG_KEYSTONE_UART0 327 config DEBUG_KEYSTONE_UART0
321 bool "Kernel low-level debugging on KEYSTONE2 using UART0" 328 bool "Kernel low-level debugging on KEYSTONE2 using UART0"
322 depends on ARCH_KEYSTONE 329 depends on ARCH_KEYSTONE
@@ -349,56 +356,40 @@ choice
349 Say Y here if you want kernel low-level debugging support 356 Say Y here if you want kernel low-level debugging support
350 on MMP UART3. 357 on MMP UART3.
351 358
352 config DEBUG_MSM_UART1 359 config DEBUG_MSM_UART
353 bool "Kernel low-level debugging messages via MSM UART1" 360 bool "Kernel low-level debugging messages via MSM UART"
354 depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50 361 depends on ARCH_MSM
355 select DEBUG_MSM_UART
356 help 362 help
357 Say Y here if you want the debug print routines to direct 363 Say Y here if you want the debug print routines to direct
358 their output to the first serial port on MSM devices. 364 their output to the serial port on MSM devices.
359 365
360 config DEBUG_MSM_UART2 366 ARCH DEBUG_UART_PHYS DEBUG_UART_BASE #
361 bool "Kernel low-level debugging messages via MSM UART2" 367 MSM7X00A, QSD8X50 0xa9a00000 0xe1000000 UART1
362 depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50 368 MSM7X00A, QSD8X50 0xa9b00000 0xe1000000 UART2
363 select DEBUG_MSM_UART 369 MSM7X00A, QSD8X50 0xa9c00000 0xe1000000 UART3
364 help
365 Say Y here if you want the debug print routines to direct
366 their output to the second serial port on MSM devices.
367 370
368 config DEBUG_MSM_UART3 371 MSM7X30 0xaca00000 0xe1000000 UART1
369 bool "Kernel low-level debugging messages via MSM UART3" 372 MSM7X30 0xacb00000 0xe1000000 UART2
370 depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50 373 MSM7X30 0xacc00000 0xe1000000 UART3
371 select DEBUG_MSM_UART
372 help
373 Say Y here if you want the debug print routines to direct
374 their output to the third serial port on MSM devices.
375 374
376 config DEBUG_MSM8660_UART 375 Please adjust DEBUG_UART_PHYS and DEBUG_UART_BASE configuration
377 bool "Kernel low-level debugging messages via MSM 8660 UART" 376 options based on your needs.
378 depends on ARCH_MSM8X60
379 select MSM_HAS_DEBUG_UART_HS
380 select DEBUG_MSM_UART
381 help
382 Say Y here if you want the debug print routines to direct
383 their output to the serial port on MSM 8660 devices.
384 377
385 config DEBUG_MSM8960_UART 378 config DEBUG_QCOM_UARTDM
386 bool "Kernel low-level debugging messages via MSM 8960 UART" 379 bool "Kernel low-level debugging messages via QCOM UARTDM"
387 depends on ARCH_MSM8960 380 depends on ARCH_QCOM
388 select MSM_HAS_DEBUG_UART_HS
389 select DEBUG_MSM_UART
390 help 381 help
391 Say Y here if you want the debug print routines to direct 382 Say Y here if you want the debug print routines to direct
392 their output to the serial port on MSM 8960 devices. 383 their output to the serial port on Qualcomm devices.
393 384
394 config DEBUG_MSM8974_UART 385 ARCH DEBUG_UART_PHYS DEBUG_UART_BASE
395 bool "Kernel low-level debugging messages via MSM 8974 UART" 386 APQ8084 0xf995e000 0xfa75e000
396 depends on ARCH_MSM8974 387 MSM8X60 0x19c40000 0xf0040000
397 select MSM_HAS_DEBUG_UART_HS 388 MSM8960 0x16440000 0xf0040000
398 select DEBUG_MSM_UART 389 MSM8974 0xf991e000 0xfa71e000
399 help 390
400 Say Y here if you want the debug print routines to direct 391 Please adjust DEBUG_UART_PHYS and DEBUG_UART_BASE configuration
401 their output to the serial port on MSM 8974 devices. 392 options based on your needs.
402 393
403 config DEBUG_MVEBU_UART 394 config DEBUG_MVEBU_UART
404 bool "Kernel low-level debugging messages via MVEBU UART (old bootloaders)" 395 bool "Kernel low-level debugging messages via MVEBU UART (old bootloaders)"
@@ -625,6 +616,7 @@ choice
625 config DEBUG_S3C_UART0 616 config DEBUG_S3C_UART0
626 depends on PLAT_SAMSUNG 617 depends on PLAT_SAMSUNG
627 select DEBUG_EXYNOS_UART if ARCH_EXYNOS 618 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
619 select DEBUG_S3C24XX_UART if ARCH_S3C24XX
628 bool "Use S3C UART 0 for low-level debug" 620 bool "Use S3C UART 0 for low-level debug"
629 help 621 help
630 Say Y here if you want the debug print routines to direct 622 Say Y here if you want the debug print routines to direct
@@ -637,6 +629,7 @@ choice
637 config DEBUG_S3C_UART1 629 config DEBUG_S3C_UART1
638 depends on PLAT_SAMSUNG 630 depends on PLAT_SAMSUNG
639 select DEBUG_EXYNOS_UART if ARCH_EXYNOS 631 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
632 select DEBUG_S3C24XX_UART if ARCH_S3C24XX
640 bool "Use S3C UART 1 for low-level debug" 633 bool "Use S3C UART 1 for low-level debug"
641 help 634 help
642 Say Y here if you want the debug print routines to direct 635 Say Y here if you want the debug print routines to direct
@@ -649,6 +642,7 @@ choice
649 config DEBUG_S3C_UART2 642 config DEBUG_S3C_UART2
650 depends on PLAT_SAMSUNG 643 depends on PLAT_SAMSUNG
651 select DEBUG_EXYNOS_UART if ARCH_EXYNOS 644 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
645 select DEBUG_S3C24XX_UART if ARCH_S3C24XX
652 bool "Use S3C UART 2 for low-level debug" 646 bool "Use S3C UART 2 for low-level debug"
653 help 647 help
654 Say Y here if you want the debug print routines to direct 648 Say Y here if you want the debug print routines to direct
@@ -670,6 +664,33 @@ choice
670 The uncompressor code port configuration is now handled 664 The uncompressor code port configuration is now handled
671 by CONFIG_S3C_LOWLEVEL_UART_PORT. 665 by CONFIG_S3C_LOWLEVEL_UART_PORT.
672 666
667 config DEBUG_S3C2410_UART0
668 depends on ARCH_S3C24XX
669 select DEBUG_S3C2410_UART
670 bool "Use S3C2410/S3C2412 UART 0 for low-level debug"
671 help
672 Say Y here if you want the debug print routines to direct
673 their output to UART 0. The port must have been initialised
674 by the boot-loader before use.
675
676 config DEBUG_S3C2410_UART1
677 depends on ARCH_S3C24XX
678 select DEBUG_S3C2410_UART
679 bool "Use S3C2410/S3C2412 UART 1 for low-level debug"
680 help
681 Say Y here if you want the debug print routines to direct
682 their output to UART 1. The port must have been initialised
683 by the boot-loader before use.
684
685 config DEBUG_S3C2410_UART2
686 depends on ARCH_S3C24XX
687 select DEBUG_S3C2410_UART
688 bool "Use S3C2410/S3C2412 UART 2 for low-level debug"
689 help
690 Say Y here if you want the debug print routines to direct
691 their output to UART 2. The port must have been initialised
692 by the boot-loader before use.
693
673 config DEBUG_SOCFPGA_UART 694 config DEBUG_SOCFPGA_UART
674 depends on ARCH_SOCFPGA 695 depends on ARCH_SOCFPGA
675 bool "Use SOCFPGA UART for low-level debug" 696 bool "Use SOCFPGA UART for low-level debug"
@@ -921,6 +942,13 @@ endchoice
921config DEBUG_EXYNOS_UART 942config DEBUG_EXYNOS_UART
922 bool 943 bool
923 944
945config DEBUG_S3C2410_UART
946 bool
947 select DEBUG_S3C24XX_UART
948
949config DEBUG_S3C24XX_UART
950 bool
951
924config DEBUG_OMAP2PLUS_UART 952config DEBUG_OMAP2PLUS_UART
925 bool 953 bool
926 depends on ARCH_OMAP2PLUS 954 depends on ARCH_OMAP2PLUS
@@ -935,13 +963,23 @@ config DEBUG_IMX_UART_PORT
935 DEBUG_IMX51_UART || \ 963 DEBUG_IMX51_UART || \
936 DEBUG_IMX53_UART || \ 964 DEBUG_IMX53_UART || \
937 DEBUG_IMX6Q_UART || \ 965 DEBUG_IMX6Q_UART || \
938 DEBUG_IMX6SL_UART 966 DEBUG_IMX6SL_UART || \
967 DEBUG_IMX6SX_UART
939 default 1 968 default 1
940 depends on ARCH_MXC 969 depends on ARCH_MXC
941 help 970 help
942 Choose UART port on which kernel low-level debug messages 971 Choose UART port on which kernel low-level debug messages
943 should be output. 972 should be output.
944 973
974config DEBUG_VF_UART_PORT
975 int "Vybrid Debug UART Port Selection" if DEBUG_VF_UART
976 default 1
977 range 0 3
978 depends on SOC_VF610
979 help
980 Choose UART port on which kernel low-level debug messages
981 should be output.
982
945config DEBUG_TEGRA_UART 983config DEBUG_TEGRA_UART
946 bool 984 bool
947 depends on ARCH_TEGRA 985 depends on ARCH_TEGRA
@@ -950,10 +988,6 @@ config DEBUG_STI_UART
950 bool 988 bool
951 depends on ARCH_STI 989 depends on ARCH_STI
952 990
953config DEBUG_MSM_UART
954 bool
955 depends on ARCH_MSM || ARCH_QCOM
956
957config DEBUG_LL_INCLUDE 991config DEBUG_LL_INCLUDE
958 string 992 string
959 default "debug/8250.S" if DEBUG_LL_UART_8250 || DEBUG_UART_8250 993 default "debug/8250.S" if DEBUG_LL_UART_8250 || DEBUG_UART_8250
@@ -970,9 +1004,11 @@ config DEBUG_LL_INCLUDE
970 DEBUG_IMX51_UART || \ 1004 DEBUG_IMX51_UART || \
971 DEBUG_IMX53_UART ||\ 1005 DEBUG_IMX53_UART ||\
972 DEBUG_IMX6Q_UART || \ 1006 DEBUG_IMX6Q_UART || \
973 DEBUG_IMX6SL_UART 1007 DEBUG_IMX6SL_UART || \
974 default "debug/msm.S" if DEBUG_MSM_UART 1008 DEBUG_IMX6SX_UART
1009 default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM
975 default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART 1010 default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
1011 default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART
976 default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 1012 default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1
977 default "debug/sti.S" if DEBUG_STI_UART 1013 default "debug/sti.S" if DEBUG_STI_UART
978 default "debug/tegra.S" if DEBUG_TEGRA_UART 1014 default "debug/tegra.S" if DEBUG_TEGRA_UART
@@ -1029,12 +1065,19 @@ config DEBUG_UART_PHYS
1029 default 0x40090000 if ARCH_LPC32XX 1065 default 0x40090000 if ARCH_LPC32XX
1030 default 0x40100000 if DEBUG_PXA_UART1 1066 default 0x40100000 if DEBUG_PXA_UART1
1031 default 0x42000000 if ARCH_GEMINI 1067 default 0x42000000 if ARCH_GEMINI
1068 default 0x50000000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART0 || \
1069 DEBUG_S3C2410_UART0)
1070 default 0x50004000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART1 || \
1071 DEBUG_S3C2410_UART1)
1072 default 0x50008000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART2 || \
1073 DEBUG_S3C2410_UART2)
1032 default 0x7c0003f8 if FOOTBRIDGE 1074 default 0x7c0003f8 if FOOTBRIDGE
1033 default 0x80070000 if DEBUG_IMX23_UART 1075 default 0x80070000 if DEBUG_IMX23_UART
1034 default 0x80074000 if DEBUG_IMX28_UART 1076 default 0x80074000 if DEBUG_IMX28_UART
1035 default 0x80230000 if DEBUG_PICOXCELL_UART 1077 default 0x80230000 if DEBUG_PICOXCELL_UART
1036 default 0x808c0000 if ARCH_EP93XX 1078 default 0x808c0000 if ARCH_EP93XX
1037 default 0x90020000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART 1079 default 0x90020000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART
1080 default 0xa9a00000 if DEBUG_MSM_UART
1038 default 0xb0090000 if DEBUG_VEXPRESS_UART0_CRX 1081 default 0xb0090000 if DEBUG_VEXPRESS_UART0_CRX
1039 default 0xc0013000 if DEBUG_U300_UART 1082 default 0xc0013000 if DEBUG_U300_UART
1040 default 0xc8000000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN 1083 default 0xc8000000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN
@@ -1050,6 +1093,7 @@ config DEBUG_UART_PHYS
1050 ARCH_ORION5X 1093 ARCH_ORION5X
1051 default 0xf7fc9000 if DEBUG_BERLIN_UART 1094 default 0xf7fc9000 if DEBUG_BERLIN_UART
1052 default 0xf8b00000 if DEBUG_HI3716_UART 1095 default 0xf8b00000 if DEBUG_HI3716_UART
1096 default 0xf991e000 if DEBUG_QCOM_UARTDM
1053 default 0xfcb00000 if DEBUG_HI3620_UART 1097 default 0xfcb00000 if DEBUG_HI3620_UART
1054 default 0xfe800000 if ARCH_IOP32X 1098 default 0xfe800000 if ARCH_IOP32X
1055 default 0xffc02000 if DEBUG_SOCFPGA_UART 1099 default 0xffc02000 if DEBUG_SOCFPGA_UART
@@ -1058,11 +1102,13 @@ config DEBUG_UART_PHYS
1058 default 0xfffff700 if ARCH_IOP33X 1102 default 0xfffff700 if ARCH_IOP33X
1059 depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ 1103 depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \
1060 DEBUG_LL_UART_EFM32 || \ 1104 DEBUG_LL_UART_EFM32 || \
1061 DEBUG_UART_8250 || DEBUG_UART_PL01X 1105 DEBUG_UART_8250 || DEBUG_UART_PL01X || \
1106 DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART
1062 1107
1063config DEBUG_UART_VIRT 1108config DEBUG_UART_VIRT
1064 hex "Virtual base address of debug UART" 1109 hex "Virtual base address of debug UART"
1065 default 0xe0010fe0 if ARCH_RPC 1110 default 0xe0010fe0 if ARCH_RPC
1111 default 0xe1000000 if DEBUG_MSM_UART
1066 default 0xf0000be0 if ARCH_EBSA110 1112 default 0xf0000be0 if ARCH_EBSA110
1067 default 0xf0009000 if DEBUG_CNS3XXX 1113 default 0xf0009000 if DEBUG_CNS3XXX
1068 default 0xf01fb000 if DEBUG_NOMADIK_UART 1114 default 0xf01fb000 if DEBUG_NOMADIK_UART
@@ -1075,9 +1121,16 @@ config DEBUG_UART_VIRT
1075 default 0xf2100000 if DEBUG_PXA_UART1 1121 default 0xf2100000 if DEBUG_PXA_UART1
1076 default 0xf4090000 if ARCH_LPC32XX 1122 default 0xf4090000 if ARCH_LPC32XX
1077 default 0xf4200000 if ARCH_GEMINI 1123 default 0xf4200000 if ARCH_GEMINI
1124 default 0xf7000000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART0 || \
1125 DEBUG_S3C2410_UART0)
1126 default 0xf7004000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART1 || \
1127 DEBUG_S3C2410_UART1)
1128 default 0xf7008000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART2 || \
1129 DEBUG_S3C2410_UART2)
1078 default 0xf7fc9000 if DEBUG_BERLIN_UART 1130 default 0xf7fc9000 if DEBUG_BERLIN_UART
1079 default 0xf8009000 if DEBUG_VEXPRESS_UART0_CA9 1131 default 0xf8009000 if DEBUG_VEXPRESS_UART0_CA9
1080 default 0xf8090000 if DEBUG_VEXPRESS_UART0_RS1 1132 default 0xf8090000 if DEBUG_VEXPRESS_UART0_RS1
1133 default 0xfa71e000 if DEBUG_QCOM_UARTDM
1081 default 0xfb009000 if DEBUG_REALVIEW_STD_PORT 1134 default 0xfb009000 if DEBUG_REALVIEW_STD_PORT
1082 default 0xfb10c000 if DEBUG_REALVIEW_PB1176_PORT 1135 default 0xfb10c000 if DEBUG_REALVIEW_PB1176_PORT
1083 default 0xfd000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX 1136 default 0xfd000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX
@@ -1116,7 +1169,8 @@ config DEBUG_UART_VIRT
1116 default 0xff003000 if DEBUG_U300_UART 1169 default 0xff003000 if DEBUG_U300_UART
1117 default DEBUG_UART_PHYS if !MMU 1170 default DEBUG_UART_PHYS if !MMU
1118 depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ 1171 depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \
1119 DEBUG_UART_8250 || DEBUG_UART_PL01X 1172 DEBUG_UART_8250 || DEBUG_UART_PL01X || \
1173 DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART
1120 1174
1121config DEBUG_UART_8250_SHIFT 1175config DEBUG_UART_8250_SHIFT
1122 int "Register offset shift for the 8250 debug UART" 1176 int "Register offset shift for the 8250 debug UART"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 41c1931f0155..6721fab13734 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -138,10 +138,12 @@ endif
138textofs-$(CONFIG_ARCH_MSM7X30) := 0x00208000 138textofs-$(CONFIG_ARCH_MSM7X30) := 0x00208000
139textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000 139textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
140textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 140textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
141textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000
141 142
142# Machine directory name. This list is sorted alphanumerically 143# Machine directory name. This list is sorted alphanumerically
143# by CONFIG_* macro name. 144# by CONFIG_* macro name.
144machine-$(CONFIG_ARCH_AT91) += at91 145machine-$(CONFIG_ARCH_AT91) += at91
146machine-$(CONFIG_ARCH_AXXIA) += axxia
145machine-$(CONFIG_ARCH_BCM) += bcm 147machine-$(CONFIG_ARCH_BCM) += bcm
146machine-$(CONFIG_ARCH_BERLIN) += berlin 148machine-$(CONFIG_ARCH_BERLIN) += berlin
147machine-$(CONFIG_ARCH_CLPS711X) += clps711x 149machine-$(CONFIG_ARCH_CLPS711X) += clps711x
diff --git a/arch/arm/boot/compressed/atags_to_fdt.c b/arch/arm/boot/compressed/atags_to_fdt.c
index d1153c8a765a..9448aa0c6686 100644
--- a/arch/arm/boot/compressed/atags_to_fdt.c
+++ b/arch/arm/boot/compressed/atags_to_fdt.c
@@ -7,6 +7,8 @@
7#define do_extend_cmdline 0 7#define do_extend_cmdline 0
8#endif 8#endif
9 9
10#define NR_BANKS 16
11
10static int node_offset(void *fdt, const char *node_path) 12static int node_offset(void *fdt, const char *node_path)
11{ 13{
12 int offset = fdt_path_offset(fdt, node_path); 14 int offset = fdt_path_offset(fdt, node_path);
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index 066b03480b63..3a8b32df6b31 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -60,11 +60,6 @@
60 add \rb, \rb, #0x00010000 @ Ser1 60 add \rb, \rb, #0x00010000 @ Ser1
61#endif 61#endif
62 .endm 62 .endm
63#elif defined(CONFIG_ARCH_S3C24XX)
64 .macro loadsp, rb, tmp
65 mov \rb, #0x50000000
66 add \rb, \rb, #0x4000 * CONFIG_S3C_LOWLEVEL_UART_PORT
67 .endm
68#else 63#else
69 .macro loadsp, rb, tmp 64 .macro loadsp, rb, tmp
70 addruart \rb, \tmp 65 addruart \rb, \tmp
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 377b7c364033..5986ff63b901 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -50,13 +50,15 @@ dtb-$(CONFIG_ARCH_AT91) += sama5d35ek.dtb
50dtb-$(CONFIG_ARCH_AT91) += sama5d36ek.dtb 50dtb-$(CONFIG_ARCH_AT91) += sama5d36ek.dtb
51 51
52dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb 52dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
53dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
53dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb 54dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
54dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb 55dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb
55dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \ 56dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \
56 bcm21664-garnet.dtb 57 bcm21664-garnet.dtb
57dtb-$(CONFIG_ARCH_BERLIN) += \ 58dtb-$(CONFIG_ARCH_BERLIN) += \
58 berlin2-sony-nsz-gs7.dtb \ 59 berlin2-sony-nsz-gs7.dtb \
59 berlin2cd-google-chromecast.dtb 60 berlin2cd-google-chromecast.dtb \
61 berlin2q-marvell-dmp.dtb
60dtb-$(CONFIG_ARCH_DAVINCI) += da850-enbw-cmc.dtb \ 62dtb-$(CONFIG_ARCH_DAVINCI) += da850-enbw-cmc.dtb \
61 da850-evm.dtb 63 da850-evm.dtb
62dtb-$(CONFIG_ARCH_EFM32) += efm32gg-dk3750.dtb 64dtb-$(CONFIG_ARCH_EFM32) += efm32gg-dk3750.dtb
@@ -72,10 +74,14 @@ dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \
72 exynos5250-arndale.dtb \ 74 exynos5250-arndale.dtb \
73 exynos5250-smdk5250.dtb \ 75 exynos5250-smdk5250.dtb \
74 exynos5250-snow.dtb \ 76 exynos5250-snow.dtb \
77 exynos5260-xyref5260.dtb \
78 exynos5410-smdk5410.dtb \
75 exynos5420-arndale-octa.dtb \ 79 exynos5420-arndale-octa.dtb \
80 exynos5420-peach-pit.dtb \
76 exynos5420-smdk5420.dtb \ 81 exynos5420-smdk5420.dtb \
77 exynos5440-sd5v1.dtb \ 82 exynos5440-sd5v1.dtb \
78 exynos5440-ssdk5440.dtb 83 exynos5440-ssdk5440.dtb \
84 exynos5800-peach-pi.dtb
79dtb-$(CONFIG_ARCH_HI3xxx) += hi3620-hi4511.dtb 85dtb-$(CONFIG_ARCH_HI3xxx) += hi3620-hi4511.dtb
80dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \ 86dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \
81 ecx-2000.dtb 87 ecx-2000.dtb
@@ -127,6 +133,9 @@ kirkwood := \
127 kirkwood-nsa310a.dtb \ 133 kirkwood-nsa310a.dtb \
128 kirkwood-openblocks_a6.dtb \ 134 kirkwood-openblocks_a6.dtb \
129 kirkwood-openblocks_a7.dtb \ 135 kirkwood-openblocks_a7.dtb \
136 kirkwood-openrd-base.dtb \
137 kirkwood-openrd-client.dtb \
138 kirkwood-openrd-ultimate.dtb \
130 kirkwood-rd88f6192.dtb \ 139 kirkwood-rd88f6192.dtb \
131 kirkwood-rd88f6281-a0.dtb \ 140 kirkwood-rd88f6281-a0.dtb \
132 kirkwood-rd88f6281-a1.dtb \ 141 kirkwood-rd88f6281-a1.dtb \
@@ -157,10 +166,12 @@ dtb-$(CONFIG_ARCH_MXC) += \
157 imx27-phytec-phycard-s-rdk.dtb \ 166 imx27-phytec-phycard-s-rdk.dtb \
158 imx31-bug.dtb \ 167 imx31-bug.dtb \
159 imx35-eukrea-mbimxsd35-baseboard.dtb \ 168 imx35-eukrea-mbimxsd35-baseboard.dtb \
169 imx35-pdk.dtb \
160 imx50-evk.dtb \ 170 imx50-evk.dtb \
161 imx51-apf51.dtb \ 171 imx51-apf51.dtb \
162 imx51-apf51dev.dtb \ 172 imx51-apf51dev.dtb \
163 imx51-babbage.dtb \ 173 imx51-babbage.dtb \
174 imx51-digi-connectcore-jsk.dtb \
164 imx51-eukrea-mbimxsd51-baseboard.dtb \ 175 imx51-eukrea-mbimxsd51-baseboard.dtb \
165 imx53-ard.dtb \ 176 imx53-ard.dtb \
166 imx53-m53evk.dtb \ 177 imx53-m53evk.dtb \
@@ -179,6 +190,8 @@ dtb-$(CONFIG_ARCH_MXC) += \
179 imx6dl-gw54xx.dtb \ 190 imx6dl-gw54xx.dtb \
180 imx6dl-hummingboard.dtb \ 191 imx6dl-hummingboard.dtb \
181 imx6dl-nitrogen6x.dtb \ 192 imx6dl-nitrogen6x.dtb \
193 imx6dl-phytec-pbab01.dtb \
194 imx6dl-riotboard.dtb \
182 imx6dl-sabreauto.dtb \ 195 imx6dl-sabreauto.dtb \
183 imx6dl-sabrelite.dtb \ 196 imx6dl-sabrelite.dtb \
184 imx6dl-sabresd.dtb \ 197 imx6dl-sabresd.dtb \
@@ -203,6 +216,7 @@ dtb-$(CONFIG_ARCH_MXC) += \
203 imx6q-udoo.dtb \ 216 imx6q-udoo.dtb \
204 imx6q-wandboard.dtb \ 217 imx6q-wandboard.dtb \
205 imx6sl-evk.dtb \ 218 imx6sl-evk.dtb \
219 vf610-colibri.dtb \
206 vf610-cosmic.dtb \ 220 vf610-cosmic.dtb \
207 vf610-twr.dtb 221 vf610-twr.dtb
208dtb-$(CONFIG_ARCH_MXS) += imx23-evk.dtb \ 222dtb-$(CONFIG_ARCH_MXS) += imx23-evk.dtb \
@@ -230,76 +244,84 @@ dtb-$(CONFIG_ARCH_NOMADIK) += ste-nomadik-s8815.dtb
230dtb-$(CONFIG_ARCH_NSPIRE) += nspire-cx.dtb \ 244dtb-$(CONFIG_ARCH_NSPIRE) += nspire-cx.dtb \
231 nspire-tp.dtb \ 245 nspire-tp.dtb \
232 nspire-clp.dtb 246 nspire-clp.dtb
233dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \ 247dtb-$(CONFIG_ARCH_OMAP2) += omap2420-h4.dtb \
234 omap2430-sdp.dtb \
235 omap2420-n800.dtb \ 248 omap2420-n800.dtb \
236 omap2420-n810.dtb \ 249 omap2420-n810.dtb \
237 omap2420-n810-wimax.dtb \ 250 omap2420-n810-wimax.dtb \
251 omap2430-sdp.dtb
252dtb-$(CONFIG_ARCH_OMAP3) += am3517-craneboard.dtb \
253 am3517-evm.dtb \
254 am3517_mt_ventoux.dtb \
238 omap3430-sdp.dtb \ 255 omap3430-sdp.dtb \
239 omap3-beagle.dtb \ 256 omap3-beagle.dtb \
257 omap3-beagle-xm.dtb \
258 omap3-beagle-xm-ab.dtb \
240 omap3-cm-t3517.dtb \ 259 omap3-cm-t3517.dtb \
241 omap3-sbc-t3517.dtb \
242 omap3-cm-t3530.dtb \ 260 omap3-cm-t3530.dtb \
243 omap3-sbc-t3530.dtb \
244 omap3-cm-t3730.dtb \ 261 omap3-cm-t3730.dtb \
245 omap3-sbc-t3730.dtb \
246 omap3-devkit8000.dtb \ 262 omap3-devkit8000.dtb \
247 omap3-beagle-xm.dtb \
248 omap3-beagle-xm-ab.dtb \
249 omap3-evm.dtb \ 263 omap3-evm.dtb \
250 omap3-evm-37xx.dtb \ 264 omap3-evm-37xx.dtb \
265 omap3-gta04.dtb \
266 omap3-igep0020.dtb \
267 omap3-igep0030.dtb \
251 omap3-ldp.dtb \ 268 omap3-ldp.dtb \
269 omap3-lilly-dbb056.dtb \
252 omap3-n900.dtb \ 270 omap3-n900.dtb \
253 omap3-n9.dtb \ 271 omap3-n9.dtb \
254 omap3-n950.dtb \ 272 omap3-n950.dtb \
255 omap3-overo-alto35.dtb \ 273 omap3-overo-alto35.dtb \
256 omap3-overo-storm-alto35.dtb \
257 omap3-overo-chestnut43.dtb \ 274 omap3-overo-chestnut43.dtb \
258 omap3-overo-storm-chestnut43.dtb \
259 omap3-overo-gallop43.dtb \ 275 omap3-overo-gallop43.dtb \
260 omap3-overo-storm-gallop43.dtb \
261 omap3-overo-palo43.dtb \ 276 omap3-overo-palo43.dtb \
277 omap3-overo-storm-alto35.dtb \
278 omap3-overo-storm-chestnut43.dtb \
279 omap3-overo-storm-gallop43.dtb \
262 omap3-overo-storm-palo43.dtb \ 280 omap3-overo-storm-palo43.dtb \
263 omap3-overo-summit.dtb \
264 omap3-overo-storm-summit.dtb \ 281 omap3-overo-storm-summit.dtb \
265 omap3-overo-tobi.dtb \
266 omap3-overo-storm-tobi.dtb \ 282 omap3-overo-storm-tobi.dtb \
267 omap3-gta04.dtb \ 283 omap3-overo-summit.dtb \
268 omap3-igep0020.dtb \ 284 omap3-overo-tobi.dtb \
269 omap3-igep0030.dtb \ 285 omap3-sbc-t3517.dtb \
270 omap3-lilly-dbb056.dtb \ 286 omap3-sbc-t3530.dtb \
271 omap3-zoom3.dtb \ 287 omap3-sbc-t3730.dtb \
272 omap4-duovero-parlor.dtb \ 288 omap3-zoom3.dtb
289dtb-$(CONFIG_SOC_AM33XX) += am335x-base0033.dtb \
290 am335x-bone.dtb \
291 am335x-boneblack.dtb \
292 am335x-evm.dtb \
293 am335x-evmsk.dtb \
294 am335x-nano.dtb
295dtb-$(CONFIG_ARCH_OMAP4) += omap4-duovero-parlor.dtb \
273 omap4-panda.dtb \ 296 omap4-panda.dtb \
274 omap4-panda-a4.dtb \ 297 omap4-panda-a4.dtb \
275 omap4-panda-es.dtb \ 298 omap4-panda-es.dtb \
276 omap4-var-som.dtb \
277 omap4-sdp.dtb \ 299 omap4-sdp.dtb \
278 omap4-sdp-es23plus.dtb \ 300 omap4-sdp-es23plus.dtb \
279 omap5-uevm.dtb \ 301 omap4-var-dvk-om44.dtb \
280 am335x-evm.dtb \ 302 omap4-var-stk-om44.dtb
281 am335x-evmsk.dtb \ 303dtb-$(CONFIG_SOC_AM43XX) += am43x-epos-evm.dtb \
282 am335x-bone.dtb \ 304 am437x-gp-evm.dtb
283 am335x-boneblack.dtb \ 305dtb-$(CONFIG_SOC_OMAP5) += omap5-cm-t54.dtb \
284 am335x-nano.dtb \ 306 omap5-sbc-t54.dtb \
285 am335x-base0033.dtb \ 307 omap5-uevm.dtb
286 am3517-craneboard.dtb \ 308dtb-$(CONFIG_SOC_DRA7XX) += dra7-evm.dtb \
287 am3517-evm.dtb \ 309 dra72-evm.dtb
288 am3517_mt_ventoux.dtb \ 310dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-d2-network.dtb \
289 am43x-epos-evm.dtb \ 311 orion5x-lacie-ethernet-disk-mini-v2.dtb \
290 am437x-gp-evm.dtb \ 312 orion5x-maxtor-shared-storage-2.dtb \
291 dra7-evm.dtb 313 orion5x-rd88f5182-nas.dtb
292dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-ethernet-disk-mini-v2.dtb
293dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb 314dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb
294dtb-$(CONFIG_ARCH_QCOM) += qcom-msm8660-surf.dtb \ 315dtb-$(CONFIG_ARCH_QCOM) += \
295 qcom-msm8960-cdp.dtb \ 316 qcom-apq8064-ifc6410.dtb \
296 qcom-apq8074-dragonboard.dtb 317 qcom-apq8074-dragonboard.dtb \
318 qcom-apq8084-mtp.dtb \
319 qcom-msm8660-surf.dtb \
320 qcom-msm8960-cdp.dtb
297dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb 321dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb
298dtb-$(CONFIG_ARCH_S3C64XX) += s3c6410-mini6410.dtb \ 322dtb-$(CONFIG_ARCH_S3C64XX) += s3c6410-mini6410.dtb \
299 s3c6410-smdk6410.dtb 323 s3c6410-smdk6410.dtb
300dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb \ 324dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += r7s72100-genmai.dtb \
301 r7s72100-genmai.dtb \
302 r7s72100-genmai-reference.dtb \
303 r8a7740-armadillo800eva.dtb \ 325 r8a7740-armadillo800eva.dtb \
304 r8a7778-bockw.dtb \ 326 r8a7778-bockw.dtb \
305 r8a7778-bockw-reference.dtb \ 327 r8a7778-bockw-reference.dtb \
@@ -314,12 +336,14 @@ dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb \
314 r8a73a4-ape6evm-reference.dtb \ 336 r8a73a4-ape6evm-reference.dtb \
315 sh7372-mackerel.dtb 337 sh7372-mackerel.dtb
316dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb \ 338dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb \
317 r7s72100-genmai-reference.dtb \ 339 r7s72100-genmai.dtb \
340 r8a7791-henninger.dtb \
318 r8a7791-koelsch.dtb \ 341 r8a7791-koelsch.dtb \
319 r8a7790-lager.dtb 342 r8a7790-lager.dtb
320dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_arria5_socdk.dtb \ 343dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_arria5_socdk.dtb \
321 socfpga_cyclone5_socdk.dtb \ 344 socfpga_cyclone5_socdk.dtb \
322 socfpga_cyclone5_sockit.dtb \ 345 socfpga_cyclone5_sockit.dtb \
346 socfpga_cyclone5_socrates.dtb \
323 socfpga_vt.dtb 347 socfpga_vt.dtb
324dtb-$(CONFIG_ARCH_SPEAR13XX) += spear1310-evb.dtb \ 348dtb-$(CONFIG_ARCH_SPEAR13XX) += spear1310-evb.dtb \
325 spear1340-evb.dtb 349 spear1340-evb.dtb
@@ -328,24 +352,33 @@ dtb-$(CONFIG_ARCH_SPEAR3XX)+= spear300-evb.dtb \
328 spear320-evb.dtb \ 352 spear320-evb.dtb \
329 spear320-hmi.dtb 353 spear320-hmi.dtb
330dtb-$(CONFIG_ARCH_SPEAR6XX)+= spear600-evb.dtb 354dtb-$(CONFIG_ARCH_SPEAR6XX)+= spear600-evb.dtb
331dtb-$(CONFIG_ARCH_STI)+= stih415-b2000.dtb \ 355dtb-$(CONFIG_ARCH_STI)+= stih407-b2120.dtb \
332 stih416-b2000.dtb \ 356 stih415-b2000.dtb \
333 stih415-b2020.dtb \ 357 stih415-b2020.dtb \
334 stih416-b2020.dtb 358 stih416-b2000.dtb \
335dtb-$(CONFIG_ARCH_SUNXI) += \ 359 stih416-b2020.dtb \
360 stih416-b2020-revE.dtb
361dtb-$(CONFIG_MACH_SUN4I) += \
336 sun4i-a10-a1000.dtb \ 362 sun4i-a10-a1000.dtb \
337 sun4i-a10-cubieboard.dtb \ 363 sun4i-a10-cubieboard.dtb \
338 sun4i-a10-mini-xplus.dtb \ 364 sun4i-a10-mini-xplus.dtb \
339 sun4i-a10-hackberry.dtb \ 365 sun4i-a10-hackberry.dtb \
340 sun4i-a10-inet97fv2.dtb \ 366 sun4i-a10-inet97fv2.dtb \
341 sun4i-a10-olinuxino-lime.dtb \ 367 sun4i-a10-olinuxino-lime.dtb \
342 sun4i-a10-pcduino.dtb \ 368 sun4i-a10-pcduino.dtb
369dtb-$(CONFIG_MACH_SUN5I) += \
343 sun5i-a10s-olinuxino-micro.dtb \ 370 sun5i-a10s-olinuxino-micro.dtb \
371 sun5i-a10s-r7-tv-dongle.dtb \
344 sun5i-a13-olinuxino.dtb \ 372 sun5i-a13-olinuxino.dtb \
345 sun5i-a13-olinuxino-micro.dtb \ 373 sun5i-a13-olinuxino-micro.dtb
374dtb-$(CONFIG_MACH_SUN6I) += \
375 sun6i-a31-app4-evb1.dtb \
346 sun6i-a31-colombus.dtb \ 376 sun6i-a31-colombus.dtb \
377 sun6i-a31-m9.dtb
378dtb-$(CONFIG_MACH_SUN7I) += \
347 sun7i-a20-cubieboard2.dtb \ 379 sun7i-a20-cubieboard2.dtb \
348 sun7i-a20-cubietruck.dtb \ 380 sun7i-a20-cubietruck.dtb \
381 sun7i-a20-i12-tvbox.dtb \
349 sun7i-a20-olinuxino-micro.dtb 382 sun7i-a20-olinuxino-micro.dtb
350dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \ 383dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \
351 tegra20-iris-512.dtb \ 384 tegra20-iris-512.dtb \
@@ -360,7 +393,11 @@ dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \
360 tegra30-beaver.dtb \ 393 tegra30-beaver.dtb \
361 tegra30-cardhu-a02.dtb \ 394 tegra30-cardhu-a02.dtb \
362 tegra30-cardhu-a04.dtb \ 395 tegra30-cardhu-a04.dtb \
396 tegra30-colibri-eval-v3.dtb \
363 tegra114-dalmore.dtb \ 397 tegra114-dalmore.dtb \
398 tegra114-roth.dtb \
399 tegra114-tn7.dtb \
400 tegra124-jetson-tk1.dtb \
364 tegra124-venice2.dtb 401 tegra124-venice2.dtb
365dtb-$(CONFIG_ARCH_U300) += ste-u300.dtb 402dtb-$(CONFIG_ARCH_U300) += ste-u300.dtb
366dtb-$(CONFIG_ARCH_U8500) += ste-snowball.dtb \ 403dtb-$(CONFIG_ARCH_U8500) += ste-snowball.dtb \
diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
index 2e7d932887b5..bde1777b62be 100644
--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
@@ -182,31 +182,31 @@
182 182
183&usb { 183&usb {
184 status = "okay"; 184 status = "okay";
185};
185 186
186 control@44e10620 { 187&usb_ctrl_mod {
187 status = "okay"; 188 status = "okay";
188 }; 189};
189 190
190 usb-phy@47401300 { 191&usb0_phy {
191 status = "okay"; 192 status = "okay";
192 }; 193};
193 194
194 usb-phy@47401b00 { 195&usb1_phy {
195 status = "okay"; 196 status = "okay";
196 }; 197};
197 198
198 usb@47401000 { 199&usb0 {
199 status = "okay"; 200 status = "okay";
200 }; 201};
201 202
202 usb@47401800 { 203&usb1 {
203 status = "okay"; 204 status = "okay";
204 dr_mode = "host"; 205 dr_mode = "host";
205 }; 206};
206 207
207 dma-controller@47402000 { 208&cppi41dma {
208 status = "okay"; 209 status = "okay";
209 };
210}; 210};
211 211
212&i2c0 { 212&i2c0 {
@@ -280,13 +280,14 @@
280 pinctrl-names = "default", "sleep"; 280 pinctrl-names = "default", "sleep";
281 pinctrl-0 = <&cpsw_default>; 281 pinctrl-0 = <&cpsw_default>;
282 pinctrl-1 = <&cpsw_sleep>; 282 pinctrl-1 = <&cpsw_sleep>;
283 283 status = "okay";
284}; 284};
285 285
286&davinci_mdio { 286&davinci_mdio {
287 pinctrl-names = "default", "sleep"; 287 pinctrl-names = "default", "sleep";
288 pinctrl-0 = <&davinci_mdio_default>; 288 pinctrl-0 = <&davinci_mdio_default>;
289 pinctrl-1 = <&davinci_mdio_sleep>; 289 pinctrl-1 = <&davinci_mdio_sleep>;
290 status = "okay";
290}; 291};
291 292
292&mmc1 { 293&mmc1 {
diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts
index 6b71ad95a5cf..305975d3f531 100644
--- a/arch/arm/boot/dts/am335x-boneblack.dts
+++ b/arch/arm/boot/dts/am335x-boneblack.dts
@@ -26,7 +26,6 @@
26 pinctrl-0 = <&emmc_pins>; 26 pinctrl-0 = <&emmc_pins>;
27 bus-width = <8>; 27 bus-width = <8>;
28 status = "okay"; 28 status = "okay";
29 ti,vcc-aux-disable-is-sleep;
30}; 29};
31 30
32&am33xx_pinmux { 31&am33xx_pinmux {
diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
index 6028217ace0f..ecb267767cf5 100644
--- a/arch/arm/boot/dts/am335x-evm.dts
+++ b/arch/arm/boot/dts/am335x-evm.dts
@@ -268,34 +268,34 @@
268 268
269 lcd_pins_s0: lcd_pins_s0 { 269 lcd_pins_s0: lcd_pins_s0 {
270 pinctrl-single,pins = < 270 pinctrl-single,pins = <
271 0x20 0x01 /* gpmc_ad8.lcd_data16, OUTPUT | MODE1 */ 271 0x20 (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad8.lcd_data23 */
272 0x24 0x01 /* gpmc_ad9.lcd_data17, OUTPUT | MODE1 */ 272 0x24 (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad9.lcd_data22 */
273 0x28 0x01 /* gpmc_ad10.lcd_data18, OUTPUT | MODE1 */ 273 0x28 (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad10.lcd_data21 */
274 0x2c 0x01 /* gpmc_ad11.lcd_data19, OUTPUT | MODE1 */ 274 0x2c (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad11.lcd_data20 */
275 0x30 0x01 /* gpmc_ad12.lcd_data20, OUTPUT | MODE1 */ 275 0x30 (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad12.lcd_data19 */
276 0x34 0x01 /* gpmc_ad13.lcd_data21, OUTPUT | MODE1 */ 276 0x34 (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad13.lcd_data18 */
277 0x38 0x01 /* gpmc_ad14.lcd_data22, OUTPUT | MODE1 */ 277 0x38 (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad14.lcd_data17 */
278 0x3c 0x01 /* gpmc_ad15.lcd_data23, OUTPUT | MODE1 */ 278 0x3c (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad15.lcd_data16 */
279 0xa0 0x00 /* lcd_data0.lcd_data0, OUTPUT | MODE0 */ 279 0xa0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data0.lcd_data0 */
280 0xa4 0x00 /* lcd_data1.lcd_data1, OUTPUT | MODE0 */ 280 0xa4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data1.lcd_data1 */
281 0xa8 0x00 /* lcd_data2.lcd_data2, OUTPUT | MODE0 */ 281 0xa8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data2.lcd_data2 */
282 0xac 0x00 /* lcd_data3.lcd_data3, OUTPUT | MODE0 */ 282 0xac (PIN_OUTPUT | MUX_MODE0) /* lcd_data3.lcd_data3 */
283 0xb0 0x00 /* lcd_data4.lcd_data4, OUTPUT | MODE0 */ 283 0xb0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data4.lcd_data4 */
284 0xb4 0x00 /* lcd_data5.lcd_data5, OUTPUT | MODE0 */ 284 0xb4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data5.lcd_data5 */
285 0xb8 0x00 /* lcd_data6.lcd_data6, OUTPUT | MODE0 */ 285 0xb8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data6.lcd_data6 */
286 0xbc 0x00 /* lcd_data7.lcd_data7, OUTPUT | MODE0 */ 286 0xbc (PIN_OUTPUT | MUX_MODE0) /* lcd_data7.lcd_data7 */
287 0xc0 0x00 /* lcd_data8.lcd_data8, OUTPUT | MODE0 */ 287 0xc0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data8.lcd_data8 */
288 0xc4 0x00 /* lcd_data9.lcd_data9, OUTPUT | MODE0 */ 288 0xc4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data9.lcd_data9 */
289 0xc8 0x00 /* lcd_data10.lcd_data10, OUTPUT | MODE0 */ 289 0xc8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data10.lcd_data10 */
290 0xcc 0x00 /* lcd_data11.lcd_data11, OUTPUT | MODE0 */ 290 0xcc (PIN_OUTPUT | MUX_MODE0) /* lcd_data11.lcd_data11 */
291 0xd0 0x00 /* lcd_data12.lcd_data12, OUTPUT | MODE0 */ 291 0xd0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data12.lcd_data12 */
292 0xd4 0x00 /* lcd_data13.lcd_data13, OUTPUT | MODE0 */ 292 0xd4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data13.lcd_data13 */
293 0xd8 0x00 /* lcd_data14.lcd_data14, OUTPUT | MODE0 */ 293 0xd8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data14.lcd_data14 */
294 0xdc 0x00 /* lcd_data15.lcd_data15, OUTPUT | MODE0 */ 294 0xdc (PIN_OUTPUT | MUX_MODE0) /* lcd_data15.lcd_data15 */
295 0xe0 0x00 /* lcd_vsync.lcd_vsync, OUTPUT | MODE0 */ 295 0xe0 (PIN_OUTPUT | MUX_MODE0) /* lcd_vsync.lcd_vsync */
296 0xe4 0x00 /* lcd_hsync.lcd_hsync, OUTPUT | MODE0 */ 296 0xe4 (PIN_OUTPUT | MUX_MODE0) /* lcd_hsync.lcd_hsync */
297 0xe8 0x00 /* lcd_pclk.lcd_pclk, OUTPUT | MODE0 */ 297 0xe8 (PIN_OUTPUT | MUX_MODE0) /* lcd_pclk.lcd_pclk */
298 0xec 0x00 /* lcd_ac_bias_en.lcd_ac_bias_en, OUTPUT | MODE0 */ 298 0xec (PIN_OUTPUT | MUX_MODE0) /* lcd_ac_bias_en.lcd_ac_bias_en */
299 >; 299 >;
300 }; 300 };
301 301
@@ -330,31 +330,31 @@
330 330
331&usb { 331&usb {
332 status = "okay"; 332 status = "okay";
333};
333 334
334 control@44e10620 { 335&usb_ctrl_mod {
335 status = "okay"; 336 status = "okay";
336 }; 337};
337 338
338 usb-phy@47401300 { 339&usb0_phy {
339 status = "okay"; 340 status = "okay";
340 }; 341};
341 342
342 usb-phy@47401b00 { 343&usb1_phy {
343 status = "okay"; 344 status = "okay";
344 }; 345};
345 346
346 usb@47401000 { 347&usb0 {
347 status = "okay"; 348 status = "okay";
348 }; 349};
349 350
350 usb@47401800 { 351&usb1 {
351 status = "okay"; 352 status = "okay";
352 dr_mode = "host"; 353 dr_mode = "host";
353 }; 354};
354 355
355 dma-controller@47402000 { 356&cppi41dma {
356 status = "okay"; 357 status = "okay";
357 };
358}; 358};
359 359
360&i2c1 { 360&i2c1 {
@@ -614,12 +614,14 @@
614 pinctrl-names = "default", "sleep"; 614 pinctrl-names = "default", "sleep";
615 pinctrl-0 = <&cpsw_default>; 615 pinctrl-0 = <&cpsw_default>;
616 pinctrl-1 = <&cpsw_sleep>; 616 pinctrl-1 = <&cpsw_sleep>;
617 status = "okay";
617}; 618};
618 619
619&davinci_mdio { 620&davinci_mdio {
620 pinctrl-names = "default", "sleep"; 621 pinctrl-names = "default", "sleep";
621 pinctrl-0 = <&davinci_mdio_default>; 622 pinctrl-0 = <&davinci_mdio_default>;
622 pinctrl-1 = <&davinci_mdio_sleep>; 623 pinctrl-1 = <&davinci_mdio_sleep>;
624 status = "okay";
623}; 625};
624 626
625&cpsw_emac0 { 627&cpsw_emac0 {
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
index ab238850a7b2..ab9a34ce524c 100644
--- a/arch/arm/boot/dts/am335x-evmsk.dts
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
@@ -57,6 +57,17 @@
57 enable-active-high; 57 enable-active-high;
58 }; 58 };
59 59
60 vtt_fixed: fixedregulator@3 {
61 compatible = "regulator-fixed";
62 regulator-name = "vtt";
63 regulator-min-microvolt = <1500000>;
64 regulator-max-microvolt = <1500000>;
65 gpio = <&gpio0 7 GPIO_ACTIVE_HIGH>;
66 regulator-always-on;
67 regulator-boot-on;
68 enable-active-high;
69 };
70
60 leds { 71 leds {
61 pinctrl-names = "default"; 72 pinctrl-names = "default";
62 pinctrl-0 = <&user_leds_s0>; 73 pinctrl-0 = <&user_leds_s0>;
@@ -363,31 +374,31 @@
363 374
364&usb { 375&usb {
365 status = "okay"; 376 status = "okay";
377};
366 378
367 control@44e10620 { 379&usb_ctrl_mod {
368 status = "okay"; 380 status = "okay";
369 }; 381};
370 382
371 usb-phy@47401300 { 383&usb0_phy {
372 status = "okay"; 384 status = "okay";
373 }; 385};
374 386
375 usb-phy@47401b00 { 387&usb1_phy {
376 status = "okay"; 388 status = "okay";
377 }; 389};
378 390
379 usb@47401000 { 391&usb0 {
380 status = "okay"; 392 status = "okay";
381 }; 393};
382 394
383 usb@47401800 { 395&usb1 {
384 status = "okay"; 396 status = "okay";
385 dr_mode = "host"; 397 dr_mode = "host";
386 }; 398};
387 399
388 dma-controller@47402000 { 400&cppi41dma {
389 status = "okay"; 401 status = "okay";
390 };
391}; 402};
392 403
393&epwmss2 { 404&epwmss2 {
@@ -484,12 +495,14 @@
484 pinctrl-0 = <&cpsw_default>; 495 pinctrl-0 = <&cpsw_default>;
485 pinctrl-1 = <&cpsw_sleep>; 496 pinctrl-1 = <&cpsw_sleep>;
486 dual_emac = <1>; 497 dual_emac = <1>;
498 status = "okay";
487}; 499};
488 500
489&davinci_mdio { 501&davinci_mdio {
490 pinctrl-names = "default", "sleep"; 502 pinctrl-names = "default", "sleep";
491 pinctrl-0 = <&davinci_mdio_default>; 503 pinctrl-0 = <&davinci_mdio_default>;
492 pinctrl-1 = <&davinci_mdio_sleep>; 504 pinctrl-1 = <&davinci_mdio_sleep>;
505 status = "okay";
493}; 506};
494 507
495&cpsw_emac0 { 508&cpsw_emac0 {
diff --git a/arch/arm/boot/dts/am335x-igep0033.dtsi b/arch/arm/boot/dts/am335x-igep0033.dtsi
index 9f22c189f636..8a0a72dc7dd7 100644
--- a/arch/arm/boot/dts/am335x-igep0033.dtsi
+++ b/arch/arm/boot/dts/am335x-igep0033.dtsi
@@ -95,6 +95,14 @@
95 }; 95 };
96}; 96};
97 97
98&mac {
99 status = "okay";
100};
101
102&davinci_mdio {
103 status = "okay";
104};
105
98&cpsw_emac0 { 106&cpsw_emac0 {
99 phy_id = <&davinci_mdio>, <0>; 107 phy_id = <&davinci_mdio>, <0>;
100}; 108};
@@ -200,31 +208,31 @@
200 208
201&usb { 209&usb {
202 status = "okay"; 210 status = "okay";
211};
203 212
204 control@44e10620 { 213&usb_ctrl_mod {
205 status = "okay"; 214 status = "okay";
206 }; 215};
207 216
208 usb-phy@47401300 { 217&usb0_phy {
209 status = "okay"; 218 status = "okay";
210 }; 219};
211 220
212 usb-phy@47401b00 { 221&usb1_phy {
213 status = "okay"; 222 status = "okay";
214 }; 223};
215 224
216 usb@47401000 { 225&usb0 {
217 status = "okay"; 226 status = "okay";
218 }; 227};
219 228
220 usb@47401800 { 229&usb1 {
221 status = "okay"; 230 status = "okay";
222 dr_mode = "host"; 231 dr_mode = "host";
223 }; 232};
224 233
225 dma-controller@47402000 { 234&cppi41dma {
226 status = "okay"; 235 status = "okay";
227 };
228}; 236};
229 237
230#include "tps65910.dtsi" 238#include "tps65910.dtsi"
diff --git a/arch/arm/boot/dts/am335x-nano.dts b/arch/arm/boot/dts/am335x-nano.dts
index 9907b494b99c..a3466455b171 100644
--- a/arch/arm/boot/dts/am335x-nano.dts
+++ b/arch/arm/boot/dts/am335x-nano.dts
@@ -344,6 +344,11 @@
344 344
345&mac { 345&mac {
346 dual_emac = <1>; 346 dual_emac = <1>;
347 status = "okay";
348};
349
350&davinci_mdio {
351 status = "okay";
347}; 352};
348 353
349&cpsw_emac0 { 354&cpsw_emac0 {
diff --git a/arch/arm/boot/dts/am33xx-clocks.dtsi b/arch/arm/boot/dts/am33xx-clocks.dtsi
index 9ccfe508dea2..712edce7d6fb 100644
--- a/arch/arm/boot/dts/am33xx-clocks.dtsi
+++ b/arch/arm/boot/dts/am33xx-clocks.dtsi
@@ -96,47 +96,29 @@
96 clock-div = <1>; 96 clock-div = <1>;
97 }; 97 };
98 98
99 ehrpwm0_gate_tbclk: ehrpwm0_gate_tbclk { 99 ehrpwm0_tbclk: ehrpwm0_tbclk@44e10664 {
100 #clock-cells = <0>; 100 #clock-cells = <0>;
101 compatible = "ti,composite-no-wait-gate-clock"; 101 compatible = "ti,gate-clock";
102 clocks = <&dpll_per_m2_ck>; 102 clocks = <&dpll_per_m2_ck>;
103 ti,bit-shift = <0>; 103 ti,bit-shift = <0>;
104 reg = <0x0664>; 104 reg = <0x0664>;
105 }; 105 };
106 106
107 ehrpwm0_tbclk: ehrpwm0_tbclk { 107 ehrpwm1_tbclk: ehrpwm1_tbclk@44e10664 {
108 #clock-cells = <0>;
109 compatible = "ti,composite-clock";
110 clocks = <&ehrpwm0_gate_tbclk>;
111 };
112
113 ehrpwm1_gate_tbclk: ehrpwm1_gate_tbclk {
114 #clock-cells = <0>; 108 #clock-cells = <0>;
115 compatible = "ti,composite-no-wait-gate-clock"; 109 compatible = "ti,gate-clock";
116 clocks = <&dpll_per_m2_ck>; 110 clocks = <&dpll_per_m2_ck>;
117 ti,bit-shift = <1>; 111 ti,bit-shift = <1>;
118 reg = <0x0664>; 112 reg = <0x0664>;
119 }; 113 };
120 114
121 ehrpwm1_tbclk: ehrpwm1_tbclk { 115 ehrpwm2_tbclk: ehrpwm2_tbclk@44e10664 {
122 #clock-cells = <0>;
123 compatible = "ti,composite-clock";
124 clocks = <&ehrpwm1_gate_tbclk>;
125 };
126
127 ehrpwm2_gate_tbclk: ehrpwm2_gate_tbclk {
128 #clock-cells = <0>; 116 #clock-cells = <0>;
129 compatible = "ti,composite-no-wait-gate-clock"; 117 compatible = "ti,gate-clock";
130 clocks = <&dpll_per_m2_ck>; 118 clocks = <&dpll_per_m2_ck>;
131 ti,bit-shift = <2>; 119 ti,bit-shift = <2>;
132 reg = <0x0664>; 120 reg = <0x0664>;
133 }; 121 };
134
135 ehrpwm2_tbclk: ehrpwm2_tbclk {
136 #clock-cells = <0>;
137 compatible = "ti,composite-clock";
138 clocks = <&ehrpwm2_gate_tbclk>;
139 };
140}; 122};
141&prcm_clocks { 123&prcm_clocks {
142 clk_32768_ck: clk_32768_ck { 124 clk_32768_ck: clk_32768_ck {
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 07f283c20eb1..9f53e824b037 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -144,12 +144,9 @@
144 compatible = "ti,edma3"; 144 compatible = "ti,edma3";
145 ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2"; 145 ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";
146 reg = <0x49000000 0x10000>, 146 reg = <0x49000000 0x10000>,
147 <0x44e10f90 0x10>; 147 <0x44e10f90 0x40>;
148 interrupts = <12 13 14>; 148 interrupts = <12 13 14>;
149 #dma-cells = <1>; 149 #dma-cells = <1>;
150 dma-channels = <64>;
151 ti,edma-regions = <4>;
152 ti,edma-slots = <256>;
153 }; 150 };
154 151
155 gpio0: gpio@44e07000 { 152 gpio0: gpio@44e07000 {
@@ -688,6 +685,7 @@
688 */ 685 */
689 interrupts = <40 41 42 43>; 686 interrupts = <40 41 42 43>;
690 ranges; 687 ranges;
688 status = "disabled";
691 689
692 davinci_mdio: mdio@4a101000 { 690 davinci_mdio: mdio@4a101000 {
693 compatible = "ti,davinci_mdio"; 691 compatible = "ti,davinci_mdio";
@@ -696,6 +694,7 @@
696 ti,hwmods = "davinci_mdio"; 694 ti,hwmods = "davinci_mdio";
697 bus_freq = <1000000>; 695 bus_freq = <1000000>;
698 reg = <0x4a101000 0x100>; 696 reg = <0x4a101000 0x100>;
697 status = "disabled";
699 }; 698 };
700 699
701 cpsw_emac0: slave@4a100200 { 700 cpsw_emac0: slave@4a100200 {
@@ -802,7 +801,7 @@
802 <0x46000000 0x400000>; 801 <0x46000000 0x400000>;
803 reg-names = "mpu", "dat"; 802 reg-names = "mpu", "dat";
804 interrupts = <80>, <81>; 803 interrupts = <80>, <81>;
805 interrupts-names = "tx", "rx"; 804 interrupt-names = "tx", "rx";
806 status = "disabled"; 805 status = "disabled";
807 dmas = <&edma 8>, 806 dmas = <&edma 8>,
808 <&edma 9>; 807 <&edma 9>;
@@ -816,7 +815,7 @@
816 <0x46400000 0x400000>; 815 <0x46400000 0x400000>;
817 reg-names = "mpu", "dat"; 816 reg-names = "mpu", "dat";
818 interrupts = <82>, <83>; 817 interrupts = <82>, <83>;
819 interrupts-names = "tx", "rx"; 818 interrupt-names = "tx", "rx";
820 status = "disabled"; 819 status = "disabled";
821 dmas = <&edma 10>, 820 dmas = <&edma 10>,
822 <&edma 11>; 821 <&edma 11>;
diff --git a/arch/arm/boot/dts/am3517.dtsi b/arch/arm/boot/dts/am3517.dtsi
index 788391f91684..5a452fdd7c5d 100644
--- a/arch/arm/boot/dts/am3517.dtsi
+++ b/arch/arm/boot/dts/am3517.dtsi
@@ -62,5 +62,21 @@
62 }; 62 };
63}; 63};
64 64
65&iva {
66 status = "disabled";
67};
68
69&mailbox {
70 status = "disabled";
71};
72
73&mmu_isp {
74 status = "disabled";
75};
76
77&smartreflex_mpu_iva {
78 status = "disabled";
79};
80
65/include/ "am35xx-clocks.dtsi" 81/include/ "am35xx-clocks.dtsi"
66/include/ "omap36xx-am35xx-omap3430es2plus-clocks.dtsi" 82/include/ "omap36xx-am35xx-omap3430es2plus-clocks.dtsi"
diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index 36d523a26831..794c73e5c4e4 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -67,11 +67,15 @@
67 }; 67 };
68 68
69 ocp { 69 ocp {
70 compatible = "simple-bus"; 70 compatible = "ti,am4372-l3-noc", "simple-bus";
71 #address-cells = <1>; 71 #address-cells = <1>;
72 #size-cells = <1>; 72 #size-cells = <1>;
73 ranges; 73 ranges;
74 ti,hwmods = "l3_main"; 74 ti,hwmods = "l3_main";
75 reg = <0x44000000 0x400000
76 0x44800000 0x400000>;
77 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
78 <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
75 79
76 prcm: prcm@44df0000 { 80 prcm: prcm@44df0000 {
77 compatible = "ti,am4-prcm"; 81 compatible = "ti,am4-prcm";
@@ -108,9 +112,6 @@
108 <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>, 112 <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
109 <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; 113 <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
110 #dma-cells = <1>; 114 #dma-cells = <1>;
111 dma-channels = <64>;
112 ti,edma-regions = <4>;
113 ti,edma-slots = <256>;
114 }; 115 };
115 116
116 uart0: serial@44e09000 { 117 uart0: serial@44e09000 {
@@ -521,6 +522,12 @@
521 /* Filled in by U-Boot */ 522 /* Filled in by U-Boot */
522 mac-address = [ 00 00 00 00 00 00 ]; 523 mac-address = [ 00 00 00 00 00 00 ];
523 }; 524 };
525
526 phy_sel: cpsw-phy-sel@44e10650 {
527 compatible = "ti,am43xx-cpsw-phy-sel";
528 reg= <0x44e10650 0x4>;
529 reg-names = "gmii-sel";
530 };
524 }; 531 };
525 532
526 epwmss0: epwmss@48300000 { 533 epwmss0: epwmss@48300000 {
@@ -691,7 +698,7 @@
691 <0x46000000 0x400000>; 698 <0x46000000 0x400000>;
692 reg-names = "mpu", "dat"; 699 reg-names = "mpu", "dat";
693 interrupts = <80>, <81>; 700 interrupts = <80>, <81>;
694 interrupts-names = "tx", "rx"; 701 interrupt-names = "tx", "rx";
695 status = "disabled"; 702 status = "disabled";
696 dmas = <&edma 8>, 703 dmas = <&edma 8>,
697 <&edma 9>; 704 <&edma 9>;
@@ -705,7 +712,7 @@
705 <0x46400000 0x400000>; 712 <0x46400000 0x400000>;
706 reg-names = "mpu", "dat"; 713 reg-names = "mpu", "dat";
707 interrupts = <82>, <83>; 714 interrupts = <82>, <83>;
708 interrupts-names = "tx", "rx"; 715 interrupt-names = "tx", "rx";
709 status = "disabled"; 716 status = "disabled";
710 dmas = <&edma 10>, 717 dmas = <&edma 10>,
711 <&edma 11>; 718 <&edma 11>;
@@ -735,6 +742,121 @@
735 #size-cells = <1>; 742 #size-cells = <1>;
736 status = "disabled"; 743 status = "disabled";
737 }; 744 };
745
746 am43xx_control_usb2phy1: control-phy@44e10620 {
747 compatible = "ti,control-phy-usb2-am437";
748 reg = <0x44e10620 0x4>;
749 reg-names = "power";
750 };
751
752 am43xx_control_usb2phy2: control-phy@0x44e10628 {
753 compatible = "ti,control-phy-usb2-am437";
754 reg = <0x44e10628 0x4>;
755 reg-names = "power";
756 };
757
758 ocp2scp0: ocp2scp@483a8000 {
759 compatible = "ti,omap-ocp2scp";
760 #address-cells = <1>;
761 #size-cells = <1>;
762 ranges;
763 ti,hwmods = "ocp2scp0";
764
765 usb2_phy1: phy@483a8000 {
766 compatible = "ti,am437x-usb2";
767 reg = <0x483a8000 0x8000>;
768 ctrl-module = <&am43xx_control_usb2phy1>;
769 clocks = <&usb_phy0_always_on_clk32k>,
770 <&usb_otg_ss0_refclk960m>;
771 clock-names = "wkupclk", "refclk";
772 #phy-cells = <0>;
773 status = "disabled";
774 };
775 };
776
777 ocp2scp1: ocp2scp@483e8000 {
778 compatible = "ti,omap-ocp2scp";
779 #address-cells = <1>;
780 #size-cells = <1>;
781 ranges;
782 ti,hwmods = "ocp2scp1";
783
784 usb2_phy2: phy@483e8000 {
785 compatible = "ti,am437x-usb2";
786 reg = <0x483e8000 0x8000>;
787 ctrl-module = <&am43xx_control_usb2phy2>;
788 clocks = <&usb_phy1_always_on_clk32k>,
789 <&usb_otg_ss1_refclk960m>;
790 clock-names = "wkupclk", "refclk";
791 #phy-cells = <0>;
792 status = "disabled";
793 };
794 };
795
796 dwc3_1: omap_dwc3@48380000 {
797 compatible = "ti,am437x-dwc3";
798 ti,hwmods = "usb_otg_ss0";
799 reg = <0x48380000 0x10000>;
800 interrupts = <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>;
801 #address-cells = <1>;
802 #size-cells = <1>;
803 utmi-mode = <1>;
804 ranges;
805
806 usb1: usb@48390000 {
807 compatible = "synopsys,dwc3";
808 reg = <0x48390000 0x17000>;
809 interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
810 phys = <&usb2_phy1>;
811 phy-names = "usb2-phy";
812 maximum-speed = "high-speed";
813 dr_mode = "otg";
814 status = "disabled";
815 };
816 };
817
818 dwc3_2: omap_dwc3@483c0000 {
819 compatible = "ti,am437x-dwc3";
820 ti,hwmods = "usb_otg_ss1";
821 reg = <0x483c0000 0x10000>;
822 interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
823 #address-cells = <1>;
824 #size-cells = <1>;
825 utmi-mode = <1>;
826 ranges;
827
828 usb2: usb@483d0000 {
829 compatible = "synopsys,dwc3";
830 reg = <0x483d0000 0x17000>;
831 interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
832 phys = <&usb2_phy2>;
833 phy-names = "usb2-phy";
834 maximum-speed = "high-speed";
835 dr_mode = "otg";
836 status = "disabled";
837 };
838 };
839
840 qspi: qspi@47900000 {
841 compatible = "ti,am4372-qspi";
842 reg = <0x47900000 0x100>;
843 #address-cells = <1>;
844 #size-cells = <0>;
845 ti,hwmods = "qspi";
846 interrupts = <0 138 0x4>;
847 num-cs = <4>;
848 status = "disabled";
849 };
850
851 hdq: hdq@48347000 {
852 compatible = "ti,am43xx-hdq";
853 reg = <0x48347000 0x1000>;
854 interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>;
855 clocks = <&func_12m_clk>;
856 clock-names = "fck";
857 ti,hwmods = "hdq1w";
858 status = "disabled";
859 };
738 }; 860 };
739}; 861};
740 862
diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts
index df8798e8bd25..c25d15837ce9 100644
--- a/arch/arm/boot/dts/am437x-gp-evm.dts
+++ b/arch/arm/boot/dts/am437x-gp-evm.dts
@@ -27,6 +27,17 @@
27 enable-active-high; 27 enable-active-high;
28 }; 28 };
29 29
30 vtt_fixed: fixedregulator-vtt {
31 compatible = "regulator-fixed";
32 regulator-name = "vtt_fixed";
33 regulator-min-microvolt = <1500000>;
34 regulator-max-microvolt = <1500000>;
35 regulator-always-on;
36 regulator-boot-on;
37 enable-active-high;
38 gpio = <&gpio5 7 GPIO_ACTIVE_HIGH>;
39 };
40
30 backlight { 41 backlight {
31 compatible = "pwm-backlight"; 42 compatible = "pwm-backlight";
32 pwms = <&ecap0 0 50000 PWM_POLARITY_INVERTED>; 43 pwms = <&ecap0 0 50000 PWM_POLARITY_INVERTED>;
@@ -81,6 +92,85 @@
81 0x164 MUX_MODE0 /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */ 92 0x164 MUX_MODE0 /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */
82 >; 93 >;
83 }; 94 };
95
96 pixcir_ts_pins: pixcir_ts_pins {
97 pinctrl-single,pins = <
98 0x264 (PIN_INPUT_PULLUP | MUX_MODE7) /* spi2_d0.gpio3_22 */
99 >;
100 };
101
102 cpsw_default: cpsw_default {
103 pinctrl-single,pins = <
104 /* Slave 1 */
105 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_txen */
106 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxdv.rgmii1_rxctl */
107 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_txd3 */
108 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_txd2 */
109 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_txd1 */
110 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_txd0 */
111 0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rmii1_tclk */
112 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxclk.rmii1_rclk */
113 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd1.rgmii1_rxd3 */
114 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd0.rgmii1_rxd2 */
115 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd1.rgmii1_rxd1 */
116 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd0.rgmii1_rxd0 */
117 >;
118 };
119
120 cpsw_sleep: cpsw_sleep {
121 pinctrl-single,pins = <
122 /* Slave 1 reset value */
123 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
124 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
125 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
126 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
127 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
128 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
129 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
130 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
131 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
132 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
133 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
134 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
135 >;
136 };
137
138 davinci_mdio_default: davinci_mdio_default {
139 pinctrl-single,pins = <
140 /* MDIO */
141 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
142 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
143 >;
144 };
145
146 davinci_mdio_sleep: davinci_mdio_sleep {
147 pinctrl-single,pins = <
148 /* MDIO reset value */
149 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
150 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
151 >;
152 };
153
154 nand_flash_x8: nand_flash_x8 {
155 pinctrl-single,pins = <
156 0x26c(PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* spi2_cs0.gpio/eMMCorNANDsel */
157 0x0 (PIN_INPUT | MUX_MODE0) /* gpmc_ad0.gpmc_ad0 */
158 0x4 (PIN_INPUT | MUX_MODE0) /* gpmc_ad1.gpmc_ad1 */
159 0x8 (PIN_INPUT | MUX_MODE0) /* gpmc_ad2.gpmc_ad2 */
160 0xc (PIN_INPUT | MUX_MODE0) /* gpmc_ad3.gpmc_ad3 */
161 0x10 (PIN_INPUT | MUX_MODE0) /* gpmc_ad4.gpmc_ad4 */
162 0x14 (PIN_INPUT | MUX_MODE0) /* gpmc_ad5.gpmc_ad5 */
163 0x18 (PIN_INPUT | MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */
164 0x1c (PIN_INPUT | MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */
165 0x70 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */
166 0x74 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpmc_wpn */
167 0x7c (PIN_OUTPUT | MUX_MODE0) /* gpmc_csn0.gpmc_csn0 */
168 0x90 (PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale.gpmc_advn_ale */
169 0x94 (PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren.gpmc_oen_ren */
170 0x98 (PIN_OUTPUT | MUX_MODE0) /* gpmc_wen.gpmc_wen */
171 0x9c (PIN_OUTPUT | MUX_MODE0) /* gpmc_be0n_cle.gpmc_be0n_cle */
172 >;
173 };
84}; 174};
85 175
86&i2c0 { 176&i2c0 {
@@ -93,6 +183,20 @@
93 status = "okay"; 183 status = "okay";
94 pinctrl-names = "default"; 184 pinctrl-names = "default";
95 pinctrl-0 = <&i2c1_pins>; 185 pinctrl-0 = <&i2c1_pins>;
186
187 pixcir_ts@5c {
188 compatible = "pixcir,pixcir_tangoc";
189 pinctrl-names = "default";
190 pinctrl-0 = <&pixcir_ts_pins>;
191 reg = <0x5c>;
192 interrupt-parent = <&gpio3>;
193 interrupts = <22 0>;
194
195 attb-gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
196
197 x-size = <1024>;
198 y-size = <600>;
199 };
96}; 200};
97 201
98&epwmss0 { 202&epwmss0 {
@@ -117,6 +221,11 @@
117 status = "okay"; 221 status = "okay";
118}; 222};
119 223
224&gpio5 {
225 status = "okay";
226 ti,no-reset-on-init;
227};
228
120&mmc1 { 229&mmc1 {
121 status = "okay"; 230 status = "okay";
122 vmmc-supply = <&vmmcsd_fixed>; 231 vmmc-supply = <&vmmcsd_fixed>;
@@ -125,3 +234,128 @@
125 pinctrl-0 = <&mmc1_pins>; 234 pinctrl-0 = <&mmc1_pins>;
126 cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; 235 cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
127}; 236};
237
238&usb2_phy1 {
239 status = "okay";
240};
241
242&usb1 {
243 dr_mode = "peripheral";
244 status = "okay";
245};
246
247&usb2_phy2 {
248 status = "okay";
249};
250
251&usb2 {
252 dr_mode = "host";
253 status = "okay";
254};
255
256&mac {
257 slaves = <1>;
258 pinctrl-names = "default", "sleep";
259 pinctrl-0 = <&cpsw_default>;
260 pinctrl-1 = <&cpsw_sleep>;
261 status = "okay";
262};
263
264&davinci_mdio {
265 pinctrl-names = "default", "sleep";
266 pinctrl-0 = <&davinci_mdio_default>;
267 pinctrl-1 = <&davinci_mdio_sleep>;
268 status = "okay";
269};
270
271&cpsw_emac0 {
272 phy_id = <&davinci_mdio>, <0>;
273 phy-mode = "rgmii";
274};
275
276&elm {
277 status = "okay";
278};
279
280&gpmc {
281 status = "okay";
282 pinctrl-names = "default";
283 pinctrl-0 = <&nand_flash_x8>;
284 ranges = <0 0 0 0x01000000>; /* minimum GPMC partition = 16MB */
285 nand@0,0 {
286 reg = <0 0 4>; /* device IO registers */
287 ti,nand-ecc-opt = "bch8";
288 ti,elm-id = <&elm>;
289 nand-bus-width = <8>;
290 gpmc,device-width = <1>;
291 gpmc,sync-clk-ps = <0>;
292 gpmc,cs-on-ns = <0>;
293 gpmc,cs-rd-off-ns = <40>;
294 gpmc,cs-wr-off-ns = <40>;
295 gpmc,adv-on-ns = <0>;
296 gpmc,adv-rd-off-ns = <25>;
297 gpmc,adv-wr-off-ns = <25>;
298 gpmc,we-on-ns = <0>;
299 gpmc,we-off-ns = <20>;
300 gpmc,oe-on-ns = <3>;
301 gpmc,oe-off-ns = <30>;
302 gpmc,access-ns = <30>;
303 gpmc,rd-cycle-ns = <40>;
304 gpmc,wr-cycle-ns = <40>;
305 gpmc,wait-pin = <0>;
306 gpmc,wait-on-read;
307 gpmc,wait-on-write;
308 gpmc,bus-turnaround-ns = <0>;
309 gpmc,cycle2cycle-delay-ns = <0>;
310 gpmc,clk-activation-ns = <0>;
311 gpmc,wait-monitoring-ns = <0>;
312 gpmc,wr-access-ns = <40>;
313 gpmc,wr-data-mux-bus-ns = <0>;
314 /* MTD partition table */
315 /* All SPL-* partitions are sized to minimal length
316 * which can be independently programmable. For
317 * NAND flash this is equal to size of erase-block */
318 #address-cells = <1>;
319 #size-cells = <1>;
320 partition@0 {
321 label = "NAND.SPL";
322 reg = <0x00000000 0x00040000>;
323 };
324 partition@1 {
325 label = "NAND.SPL.backup1";
326 reg = <0x00040000 0x00040000>;
327 };
328 partition@2 {
329 label = "NAND.SPL.backup2";
330 reg = <0x00080000 0x00040000>;
331 };
332 partition@3 {
333 label = "NAND.SPL.backup3";
334 reg = <0x000c0000 0x00040000>;
335 };
336 partition@4 {
337 label = "NAND.u-boot-spl-os";
338 reg = <0x00100000 0x00080000>;
339 };
340 partition@5 {
341 label = "NAND.u-boot";
342 reg = <0x00180000 0x00100000>;
343 };
344 partition@6 {
345 label = "NAND.u-boot-env";
346 reg = <0x00280000 0x00040000>;
347 };
348 partition@7 {
349 label = "NAND.u-boot-env.backup1";
350 reg = <0x002c0000 0x00040000>;
351 };
352 partition@8 {
353 label = "NAND.kernel";
354 reg = <0x00300000 0x00700000>;
355 };
356 partition@9 {
357 label = "NAND.file-system";
358 reg = <0x00a00000 0x1f600000>;
359 };
360 };
361};
diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts
index 167dbc8494de..ad362c50e32e 100644
--- a/arch/arm/boot/dts/am43x-epos-evm.dts
+++ b/arch/arm/boot/dts/am43x-epos-evm.dts
@@ -138,6 +138,29 @@
138 0x160 (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */ 138 0x160 (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
139 >; 139 >;
140 }; 140 };
141
142 qspi1_default: qspi1_default {
143 pinctrl-single,pins = <
144 0x7c (PIN_INPUT_PULLUP | MUX_MODE3)
145 0x88 (PIN_INPUT_PULLUP | MUX_MODE2)
146 0x90 (PIN_INPUT_PULLUP | MUX_MODE3)
147 0x94 (PIN_INPUT_PULLUP | MUX_MODE3)
148 0x98 (PIN_INPUT_PULLUP | MUX_MODE3)
149 0x9c (PIN_INPUT_PULLUP | MUX_MODE3)
150 >;
151 };
152
153 pixcir_ts_pins: pixcir_ts_pins {
154 pinctrl-single,pins = <
155 0x44 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_a1.gpio1_17 */
156 >;
157 };
158
159 hdq_pins: pinmux_hdq_pins {
160 pinctrl-single,pins = <
161 0x234 (PIN_INPUT_PULLUP | MUX_MODE1) /* cam1_wen.hdq_gpio */
162 >;
163 };
141 }; 164 };
142 165
143 matrix_keypad: matrix_keypad@0 { 166 matrix_keypad: matrix_keypad@0 {
@@ -226,7 +249,9 @@
226 }; 249 };
227 250
228 pixcir_ts@5c { 251 pixcir_ts@5c {
229 compatible = "pixcir,pixcir_ts"; 252 compatible = "pixcir,pixcir_tangoc";
253 pinctrl-names = "default";
254 pinctrl-0 = <&pixcir_ts_pins>;
230 reg = <0x5c>; 255 reg = <0x5c>;
231 interrupt-parent = <&gpio1>; 256 interrupt-parent = <&gpio1>;
232 interrupts = <17 0>; 257 interrupts = <17 0>;
@@ -234,7 +259,7 @@
234 attb-gpio = <&gpio1 17 GPIO_ACTIVE_HIGH>; 259 attb-gpio = <&gpio1 17 GPIO_ACTIVE_HIGH>;
235 260
236 x-size = <1024>; 261 x-size = <1024>;
237 y-size = <768>; 262 y-size = <600>;
238 }; 263 };
239}; 264};
240 265
@@ -341,7 +366,7 @@
341 }; 366 };
342 partition@9 { 367 partition@9 {
343 label = "NAND.file-system"; 368 label = "NAND.file-system";
344 reg = <0x00800000 0x1F600000>; 369 reg = <0x00a00000 0x1f600000>;
345 }; 370 };
346 }; 371 };
347}; 372};
@@ -367,3 +392,79 @@
367 pinctrl-0 = <&spi1_pins>; 392 pinctrl-0 = <&spi1_pins>;
368 status = "okay"; 393 status = "okay";
369}; 394};
395
396&usb2_phy1 {
397 status = "okay";
398};
399
400&usb1 {
401 dr_mode = "peripheral";
402 status = "okay";
403};
404
405&usb2_phy2 {
406 status = "okay";
407};
408
409&usb2 {
410 dr_mode = "host";
411 status = "okay";
412};
413
414&qspi {
415 status = "okay";
416 pinctrl-names = "default";
417 pinctrl-0 = <&qspi1_default>;
418
419 spi-max-frequency = <48000000>;
420 m25p80@0 {
421 compatible = "mx66l51235l";
422 spi-max-frequency = <48000000>;
423 reg = <0>;
424 spi-cpol;
425 spi-cpha;
426 spi-tx-bus-width = <1>;
427 spi-rx-bus-width = <4>;
428 #address-cells = <1>;
429 #size-cells = <1>;
430
431 /* MTD partition table.
432 * The ROM checks the first 512KiB
433 * for a valid file to boot(XIP).
434 */
435 partition@0 {
436 label = "QSPI.U_BOOT";
437 reg = <0x00000000 0x000080000>;
438 };
439 partition@1 {
440 label = "QSPI.U_BOOT.backup";
441 reg = <0x00080000 0x00080000>;
442 };
443 partition@2 {
444 label = "QSPI.U-BOOT-SPL_OS";
445 reg = <0x00100000 0x00010000>;
446 };
447 partition@3 {
448 label = "QSPI.U_BOOT_ENV";
449 reg = <0x00110000 0x00010000>;
450 };
451 partition@4 {
452 label = "QSPI.U-BOOT-ENV.backup";
453 reg = <0x00120000 0x00010000>;
454 };
455 partition@5 {
456 label = "QSPI.KERNEL";
457 reg = <0x00130000 0x0800000>;
458 };
459 partition@6 {
460 label = "QSPI.FILESYSTEM";
461 reg = <0x00930000 0x36D0000>;
462 };
463 };
464};
465
466&hdq {
467 status = "okay";
468 pinctrl-names = "default";
469 pinctrl-0 = <&hdq_pins>;
470};
diff --git a/arch/arm/boot/dts/am43xx-clocks.dtsi b/arch/arm/boot/dts/am43xx-clocks.dtsi
index 142009cc9332..c7dc9dab93a4 100644
--- a/arch/arm/boot/dts/am43xx-clocks.dtsi
+++ b/arch/arm/boot/dts/am43xx-clocks.dtsi
@@ -11,6 +11,22 @@
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";
14 clocks = <&sysboot_freq_sel_ck>, <&crystal_freq_sel_ck>;
15 ti,bit-shift = <31>;
16 reg = <0x0040>;
17 };
18
19 crystal_freq_sel_ck: crystal_freq_sel_ck {
20 #clock-cells = <0>;
21 compatible = "ti,mux-clock";
22 clocks = <&virt_19200000_ck>, <&virt_24000000_ck>, <&virt_25000000_ck>, <&virt_26000000_ck>;
23 ti,bit-shift = <29>;
24 reg = <0x0040>;
25 };
26
27 sysboot_freq_sel_ck: sysboot_freq_sel_ck@44e10040 {
28 #clock-cells = <0>;
29 compatible = "ti,mux-clock";
14 clocks = <&virt_19200000_ck>, <&virt_24000000_ck>, <&virt_25000000_ck>, <&virt_26000000_ck>; 30 clocks = <&virt_19200000_ck>, <&virt_24000000_ck>, <&virt_25000000_ck>, <&virt_26000000_ck>;
15 ti,bit-shift = <22>; 31 ti,bit-shift = <22>;
16 reg = <0x0040>; 32 reg = <0x0040>;
@@ -87,6 +103,54 @@
87 clock-mult = <1>; 103 clock-mult = <1>;
88 clock-div = <1>; 104 clock-div = <1>;
89 }; 105 };
106
107 ehrpwm0_tbclk: ehrpwm0_tbclk {
108 #clock-cells = <0>;
109 compatible = "ti,gate-clock";
110 clocks = <&dpll_per_m2_ck>;
111 ti,bit-shift = <0>;
112 reg = <0x0664>;
113 };
114
115 ehrpwm1_tbclk: ehrpwm1_tbclk {
116 #clock-cells = <0>;
117 compatible = "ti,gate-clock";
118 clocks = <&dpll_per_m2_ck>;
119 ti,bit-shift = <1>;
120 reg = <0x0664>;
121 };
122
123 ehrpwm2_tbclk: ehrpwm2_tbclk {
124 #clock-cells = <0>;
125 compatible = "ti,gate-clock";
126 clocks = <&dpll_per_m2_ck>;
127 ti,bit-shift = <2>;
128 reg = <0x0664>;
129 };
130
131 ehrpwm3_tbclk: ehrpwm3_tbclk {
132 #clock-cells = <0>;
133 compatible = "ti,gate-clock";
134 clocks = <&dpll_per_m2_ck>;
135 ti,bit-shift = <4>;
136 reg = <0x0664>;
137 };
138
139 ehrpwm4_tbclk: ehrpwm4_tbclk {
140 #clock-cells = <0>;
141 compatible = "ti,gate-clock";
142 clocks = <&dpll_per_m2_ck>;
143 ti,bit-shift = <5>;
144 reg = <0x0664>;
145 };
146
147 ehrpwm5_tbclk: ehrpwm5_tbclk {
148 #clock-cells = <0>;
149 compatible = "ti,gate-clock";
150 clocks = <&dpll_per_m2_ck>;
151 ti,bit-shift = <6>;
152 reg = <0x0664>;
153 };
90}; 154};
91&prcm_clocks { 155&prcm_clocks {
92 clk_32768_ck: clk_32768_ck { 156 clk_32768_ck: clk_32768_ck {
@@ -229,6 +293,7 @@
229 reg = <0x2e30>; 293 reg = <0x2e30>;
230 ti,index-starts-at-one; 294 ti,index-starts-at-one;
231 ti,invert-autoidle-bit; 295 ti,invert-autoidle-bit;
296 ti,set-rate-parent;
232 }; 297 };
233 298
234 dpll_per_ck: dpll_per_ck { 299 dpll_per_ck: dpll_per_ck {
@@ -511,6 +576,7 @@
511 compatible = "ti,mux-clock"; 576 compatible = "ti,mux-clock";
512 clocks = <&dpll_disp_m2_ck>, <&dpll_core_m5_ck>, <&dpll_per_m2_ck>; 577 clocks = <&dpll_disp_m2_ck>, <&dpll_core_m5_ck>, <&dpll_per_m2_ck>;
513 reg = <0x4244>; 578 reg = <0x4244>;
579 ti,set-rate-parent;
514 }; 580 };
515 581
516 dpll_extdev_ck: dpll_extdev_ck { 582 dpll_extdev_ck: dpll_extdev_ck {
@@ -609,10 +675,13 @@
609 675
610 dpll_per_clkdcoldo: dpll_per_clkdcoldo { 676 dpll_per_clkdcoldo: dpll_per_clkdcoldo {
611 #clock-cells = <0>; 677 #clock-cells = <0>;
612 compatible = "fixed-factor-clock"; 678 compatible = "ti,fixed-factor-clock";
613 clocks = <&dpll_per_ck>; 679 clocks = <&dpll_per_ck>;
614 clock-mult = <1>; 680 ti,clock-mult = <1>;
615 clock-div = <1>; 681 ti,clock-div = <1>;
682 ti,autoidle-shift = <8>;
683 reg = <0x2e14>;
684 ti,invert-autoidle-bit;
616 }; 685 };
617 686
618 dll_aging_clk_div: dll_aging_clk_div { 687 dll_aging_clk_div: dll_aging_clk_div {
@@ -653,4 +722,36 @@
653 clocks = <&clk_32768_ck>, <&clk_32k_tpm_ck>; 722 clocks = <&clk_32768_ck>, <&clk_32k_tpm_ck>;
654 reg = <0x4260>; 723 reg = <0x4260>;
655 }; 724 };
725
726 usb_phy0_always_on_clk32k: usb_phy0_always_on_clk32k {
727 #clock-cells = <0>;
728 compatible = "ti,gate-clock";
729 clocks = <&usbphy_32khz_clkmux>;
730 ti,bit-shift = <8>;
731 reg = <0x2a40>;
732 };
733
734 usb_phy1_always_on_clk32k: usb_phy1_always_on_clk32k {
735 #clock-cells = <0>;
736 compatible = "ti,gate-clock";
737 clocks = <&usbphy_32khz_clkmux>;
738 ti,bit-shift = <8>;
739 reg = <0x2a48>;
740 };
741
742 usb_otg_ss0_refclk960m: usb_otg_ss0_refclk960m {
743 #clock-cells = <0>;
744 compatible = "ti,gate-clock";
745 clocks = <&dpll_per_clkdcoldo>;
746 ti,bit-shift = <8>;
747 reg = <0x8a60>;
748 };
749
750 usb_otg_ss1_refclk960m: usb_otg_ss1_refclk960m {
751 #clock-cells = <0>;
752 compatible = "ti,gate-clock";
753 clocks = <&dpll_per_clkdcoldo>;
754 ti,bit-shift = <8>;
755 reg = <0x8a68>;
756 };
656}; 757};
diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts
index 82f238a9063f..416f4e5a69c1 100644
--- a/arch/arm/boot/dts/armada-370-db.dts
+++ b/arch/arm/boot/dts/armada-370-db.dts
@@ -35,7 +35,6 @@
35 35
36 internal-regs { 36 internal-regs {
37 serial@12000 { 37 serial@12000 {
38 clock-frequency = <200000000>;
39 status = "okay"; 38 status = "okay";
40 }; 39 };
41 sata@a0000 { 40 sata@a0000 {
@@ -67,6 +66,7 @@
67 i2c@11000 { 66 i2c@11000 {
68 pinctrl-0 = <&i2c0_pins>; 67 pinctrl-0 = <&i2c0_pins>;
69 pinctrl-names = "default"; 68 pinctrl-names = "default";
69 clock-frequency = <100000>;
70 status = "okay"; 70 status = "okay";
71 audio_codec: audio-codec@4a { 71 audio_codec: audio-codec@4a {
72 compatible = "cirrus,cs42l51"; 72 compatible = "cirrus,cs42l51";
diff --git a/arch/arm/boot/dts/armada-370-mirabox.dts b/arch/arm/boot/dts/armada-370-mirabox.dts
index 2354fe023ee0..097df7d8f0f6 100644
--- a/arch/arm/boot/dts/armada-370-mirabox.dts
+++ b/arch/arm/boot/dts/armada-370-mirabox.dts
@@ -47,7 +47,6 @@
47 47
48 internal-regs { 48 internal-regs {
49 serial@12000 { 49 serial@12000 {
50 clock-frequency = <200000000>;
51 status = "okay"; 50 status = "okay";
52 }; 51 };
53 timer@20300 { 52 timer@20300 {
diff --git a/arch/arm/boot/dts/armada-370-netgear-rn102.dts b/arch/arm/boot/dts/armada-370-netgear-rn102.dts
index 651aeb5ef439..d6d572e5af32 100644
--- a/arch/arm/boot/dts/armada-370-netgear-rn102.dts
+++ b/arch/arm/boot/dts/armada-370-netgear-rn102.dts
@@ -50,7 +50,6 @@
50 50
51 internal-regs { 51 internal-regs {
52 serial@12000 { 52 serial@12000 {
53 clock-frequency = <200000000>;
54 status = "okay"; 53 status = "okay";
55 }; 54 };
56 55
diff --git a/arch/arm/boot/dts/armada-370-netgear-rn104.dts b/arch/arm/boot/dts/armada-370-netgear-rn104.dts
index 4e27587667bf..c5fe8b5dcdc7 100644
--- a/arch/arm/boot/dts/armada-370-netgear-rn104.dts
+++ b/arch/arm/boot/dts/armada-370-netgear-rn104.dts
@@ -50,7 +50,6 @@
50 50
51 internal-regs { 51 internal-regs {
52 serial@12000 { 52 serial@12000 {
53 clock-frequency = <200000000>;
54 status = "okay"; 53 status = "okay";
55 }; 54 };
56 55
diff --git a/arch/arm/boot/dts/armada-370-rd.dts b/arch/arm/boot/dts/armada-370-rd.dts
index 3e2c857d6000..4169f4096ea3 100644
--- a/arch/arm/boot/dts/armada-370-rd.dts
+++ b/arch/arm/boot/dts/armada-370-rd.dts
@@ -51,7 +51,6 @@
51 51
52 internal-regs { 52 internal-regs {
53 serial@12000 { 53 serial@12000 {
54 clock-frequency = <200000000>;
55 status = "okay"; 54 status = "okay";
56 }; 55 };
57 sata@a0000 { 56 sata@a0000 {
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
index bb77970c0b12..23227e0027ec 100644
--- a/arch/arm/boot/dts/armada-370-xp.dtsi
+++ b/arch/arm/boot/dts/armada-370-xp.dtsi
@@ -157,6 +157,7 @@
157 reg-shift = <2>; 157 reg-shift = <2>;
158 interrupts = <41>; 158 interrupts = <41>;
159 reg-io-width = <1>; 159 reg-io-width = <1>;
160 clocks = <&coreclk 0>;
160 status = "disabled"; 161 status = "disabled";
161 }; 162 };
162 serial@12100 { 163 serial@12100 {
@@ -165,6 +166,7 @@
165 reg-shift = <2>; 166 reg-shift = <2>;
166 interrupts = <42>; 167 interrupts = <42>;
167 reg-io-width = <1>; 168 reg-io-width = <1>;
169 clocks = <&coreclk 0>;
168 status = "disabled"; 170 status = "disabled";
169 }; 171 };
170 172
@@ -203,6 +205,11 @@
203 reg = <0x20300 0x34>, <0x20704 0x4>; 205 reg = <0x20300 0x34>, <0x20704 0x4>;
204 }; 206 };
205 207
208 pmsu@22000 {
209 compatible = "marvell,armada-370-pmsu";
210 reg = <0x22000 0x1000>;
211 };
212
206 usb@50000 { 213 usb@50000 {
207 compatible = "marvell,orion-ehci"; 214 compatible = "marvell,orion-ehci";
208 reg = <0x50000 0x500>; 215 reg = <0x50000 0x500>;
diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi
index af1f11e9e5a0..21b588b6f6bd 100644
--- a/arch/arm/boot/dts/armada-370.dtsi
+++ b/arch/arm/boot/dts/armada-370.dtsi
@@ -220,6 +220,11 @@
220 clocks = <&coreclk 2>; 220 clocks = <&coreclk 2>;
221 }; 221 };
222 222
223 cpurst@20800 {
224 compatible = "marvell,armada-370-cpu-reset";
225 reg = <0x20800 0x8>;
226 };
227
223 audio_controller: audio-controller@30000 { 228 audio_controller: audio-controller@30000 {
224 compatible = "marvell,armada370-audio"; 229 compatible = "marvell,armada370-audio";
225 reg = <0x30000 0x4000>; 230 reg = <0x30000 0x4000>;
diff --git a/arch/arm/boot/dts/armada-375-db.dts b/arch/arm/boot/dts/armada-375-db.dts
index 9378d3136b41..772fec2d26ce 100644
--- a/arch/arm/boot/dts/armada-375-db.dts
+++ b/arch/arm/boot/dts/armada-375-db.dts
@@ -68,7 +68,6 @@
68 }; 68 };
69 69
70 serial@12000 { 70 serial@12000 {
71 clock-frequency = <200000000>;
72 status = "okay"; 71 status = "okay";
73 }; 72 };
74 73
@@ -79,6 +78,11 @@
79 }; 78 };
80 }; 79 };
81 80
81 sata@a0000 {
82 status = "okay";
83 nr-ports = <2>;
84 };
85
82 nand: nand@d0000 { 86 nand: nand@d0000 {
83 pinctrl-0 = <&nand_pins>; 87 pinctrl-0 = <&nand_pins>;
84 pinctrl-names = "default"; 88 pinctrl-names = "default";
@@ -102,6 +106,14 @@
102 }; 106 };
103 }; 107 };
104 108
109 usb@54000 {
110 status = "okay";
111 };
112
113 usb3@58000 {
114 status = "okay";
115 };
116
105 mvsdio@d4000 { 117 mvsdio@d4000 {
106 pinctrl-0 = <&sdio_pins &sdio_st_pins>; 118 pinctrl-0 = <&sdio_pins &sdio_st_pins>;
107 pinctrl-names = "default"; 119 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
index 3877693fb2d8..fb92551a1e71 100644
--- a/arch/arm/boot/dts/armada-375.dtsi
+++ b/arch/arm/boot/dts/armada-375.dtsi
@@ -39,6 +39,8 @@
39 cpus { 39 cpus {
40 #address-cells = <1>; 40 #address-cells = <1>;
41 #size-cells = <0>; 41 #size-cells = <0>;
42 enable-method = "marvell,armada-375-smp";
43
42 cpu@0 { 44 cpu@0 {
43 device_type = "cpu"; 45 device_type = "cpu";
44 compatible = "arm,cortex-a9"; 46 compatible = "arm,cortex-a9";
@@ -128,6 +130,11 @@
128 cache-level = <2>; 130 cache-level = <2>;
129 }; 131 };
130 132
133 scu@c000 {
134 compatible = "arm,cortex-a9-scu";
135 reg = <0xc000 0x58>;
136 };
137
131 timer@c600 { 138 timer@c600 {
132 compatible = "arm,cortex-a9-twd-timer"; 139 compatible = "arm,cortex-a9-twd-timer";
133 reg = <0xc600 0x20>; 140 reg = <0xc600 0x20>;
@@ -194,6 +201,7 @@
194 reg-shift = <2>; 201 reg-shift = <2>;
195 interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; 202 interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
196 reg-io-width = <1>; 203 reg-io-width = <1>;
204 clocks = <&coreclk 0>;
197 status = "disabled"; 205 status = "disabled";
198 }; 206 };
199 207
@@ -203,6 +211,7 @@
203 reg-shift = <2>; 211 reg-shift = <2>;
204 interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; 212 interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
205 reg-io-width = <1>; 213 reg-io-width = <1>;
214 clocks = <&coreclk 0>;
206 status = "disabled"; 215 status = "disabled";
207 }; 216 };
208 217
@@ -320,6 +329,46 @@
320 clocks = <&coreclk 0>; 329 clocks = <&coreclk 0>;
321 }; 330 };
322 331
332 watchdog@20300 {
333 compatible = "marvell,armada-375-wdt";
334 reg = <0x20300 0x34>, <0x20704 0x4>, <0x18254 0x4>;
335 clocks = <&coreclk 0>;
336 };
337
338 cpurst@20800 {
339 compatible = "marvell,armada-370-cpu-reset";
340 reg = <0x20800 0x10>;
341 };
342
343 coherency-fabric@21010 {
344 compatible = "marvell,armada-375-coherency-fabric";
345 reg = <0x21010 0x1c>;
346 };
347
348 usb@50000 {
349 compatible = "marvell,orion-ehci";
350 reg = <0x50000 0x500>;
351 interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
352 clocks = <&gateclk 18>;
353 status = "disabled";
354 };
355
356 usb@54000 {
357 compatible = "marvell,orion-ehci";
358 reg = <0x54000 0x500>;
359 interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
360 clocks = <&gateclk 26>;
361 status = "disabled";
362 };
363
364 usb3@58000 {
365 compatible = "marvell,armada-375-xhci";
366 reg = <0x58000 0x20000>,<0x5b880 0x80>;
367 interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
368 clocks = <&gateclk 16>;
369 status = "disabled";
370 };
371
323 xor@60800 { 372 xor@60800 {
324 compatible = "marvell,orion-xor"; 373 compatible = "marvell,orion-xor";
325 reg = <0x60800 0x100 374 reg = <0x60800 0x100
@@ -391,6 +440,12 @@
391 status = "disabled"; 440 status = "disabled";
392 }; 441 };
393 442
443 thermal@e8078 {
444 compatible = "marvell,armada375-thermal";
445 reg = <0xe8078 0x4>, <0xe807c 0x8>;
446 status = "okay";
447 };
448
394 coreclk: mvebu-sar@e8204 { 449 coreclk: mvebu-sar@e8204 {
395 compatible = "marvell,armada-375-core-clock"; 450 compatible = "marvell,armada-375-core-clock";
396 reg = <0xe8204 0x04>; 451 reg = <0xe8204 0x04>;
diff --git a/arch/arm/boot/dts/armada-380.dtsi b/arch/arm/boot/dts/armada-380.dtsi
index 068031f0f263..e69bc6759c39 100644
--- a/arch/arm/boot/dts/armada-380.dtsi
+++ b/arch/arm/boot/dts/armada-380.dtsi
@@ -21,6 +21,8 @@
21 cpus { 21 cpus {
22 #address-cells = <1>; 22 #address-cells = <1>;
23 #size-cells = <0>; 23 #size-cells = <0>;
24 enable-method = "marvell,armada-380-smp";
25
24 cpu@0 { 26 cpu@0 {
25 device_type = "cpu"; 27 device_type = "cpu";
26 compatible = "arm,cortex-a9"; 28 compatible = "arm,cortex-a9";
@@ -99,7 +101,7 @@
99 pcie@3,0 { 101 pcie@3,0 {
100 device_type = "pci"; 102 device_type = "pci";
101 assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; 103 assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
102 reg = <0x1000 0 0 0 0>; 104 reg = <0x1800 0 0 0 0>;
103 #address-cells = <3>; 105 #address-cells = <3>;
104 #size-cells = <2>; 106 #size-cells = <2>;
105 #interrupt-cells = <1>; 107 #interrupt-cells = <1>;
diff --git a/arch/arm/boot/dts/armada-385-db.dts b/arch/arm/boot/dts/armada-385-db.dts
index 6828d77696a6..ff9637dd8d0f 100644
--- a/arch/arm/boot/dts/armada-385-db.dts
+++ b/arch/arm/boot/dts/armada-385-db.dts
@@ -55,7 +55,6 @@
55 }; 55 };
56 56
57 serial@12000 { 57 serial@12000 {
58 clock-frequency = <200000000>;
59 status = "okay"; 58 status = "okay";
60 }; 59 };
61 60
@@ -65,6 +64,10 @@
65 phy-mode = "rgmii-id"; 64 phy-mode = "rgmii-id";
66 }; 65 };
67 66
67 usb@50000 {
68 status = "ok";
69 };
70
68 ethernet@70000 { 71 ethernet@70000 {
69 status = "okay"; 72 status = "okay";
70 phy = <&phy0>; 73 phy = <&phy0>;
@@ -81,6 +84,14 @@
81 }; 84 };
82 }; 85 };
83 86
87 sata@a8000 {
88 status = "okay";
89 };
90
91 sata@e0000 {
92 status = "okay";
93 };
94
84 flash@d0000 { 95 flash@d0000 {
85 status = "okay"; 96 status = "okay";
86 num-cs = <1>; 97 num-cs = <1>;
@@ -101,6 +112,22 @@
101 reg = <0x1000000 0x3f000000>; 112 reg = <0x1000000 0x3f000000>;
102 }; 113 };
103 }; 114 };
115
116 sdhci@d8000 {
117 clock-frequency = <200000000>;
118 broken-cd;
119 wp-inverted;
120 bus-width = <8>;
121 status = "okay";
122 };
123
124 usb3@f0000 {
125 status = "okay";
126 };
127
128 usb3@f8000 {
129 status = "okay";
130 };
104 }; 131 };
105 132
106 pcie-controller { 133 pcie-controller {
diff --git a/arch/arm/boot/dts/armada-385-rd.dts b/arch/arm/boot/dts/armada-385-rd.dts
index 45250c88814b..40893255a3f0 100644
--- a/arch/arm/boot/dts/armada-385-rd.dts
+++ b/arch/arm/boot/dts/armada-385-rd.dts
@@ -51,7 +51,6 @@
51 }; 51 };
52 52
53 serial@12000 { 53 serial@12000 {
54 clock-frequency = <200000000>;
55 status = "okay"; 54 status = "okay";
56 }; 55 };
57 56
@@ -77,6 +76,10 @@
77 reg = <1>; 76 reg = <1>;
78 }; 77 };
79 }; 78 };
79
80 usb3@f0000 {
81 status = "okay";
82 };
80 }; 83 };
81 84
82 pcie-controller { 85 pcie-controller {
diff --git a/arch/arm/boot/dts/armada-385.dtsi b/arch/arm/boot/dts/armada-385.dtsi
index e2919f02e1d4..f011009bf4cf 100644
--- a/arch/arm/boot/dts/armada-385.dtsi
+++ b/arch/arm/boot/dts/armada-385.dtsi
@@ -21,6 +21,8 @@
21 cpus { 21 cpus {
22 #address-cells = <1>; 22 #address-cells = <1>;
23 #size-cells = <0>; 23 #size-cells = <0>;
24 enable-method = "marvell,armada-380-smp";
25
24 cpu@0 { 26 cpu@0 {
25 device_type = "cpu"; 27 device_type = "cpu";
26 compatible = "arm,cortex-a9"; 28 compatible = "arm,cortex-a9";
@@ -110,7 +112,7 @@
110 pcie@3,0 { 112 pcie@3,0 {
111 device_type = "pci"; 113 device_type = "pci";
112 assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; 114 assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
113 reg = <0x1000 0 0 0 0>; 115 reg = <0x1800 0 0 0 0>;
114 #address-cells = <3>; 116 #address-cells = <3>;
115 #size-cells = <2>; 117 #size-cells = <2>;
116 #interrupt-cells = <1>; 118 #interrupt-cells = <1>;
@@ -131,7 +133,7 @@
131 pcie@4,0 { 133 pcie@4,0 {
132 device_type = "pci"; 134 device_type = "pci";
133 assigned-addresses = <0x82000800 0 0x48000 0 0x2000>; 135 assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
134 reg = <0x1000 0 0 0 0>; 136 reg = <0x2000 0 0 0 0>;
135 #address-cells = <3>; 137 #address-cells = <3>;
136 #size-cells = <2>; 138 #size-cells = <2>;
137 #interrupt-cells = <1>; 139 #interrupt-cells = <1>;
diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
index ca8813bb99ba..3de364e81b52 100644
--- a/arch/arm/boot/dts/armada-38x.dtsi
+++ b/arch/arm/boot/dts/armada-38x.dtsi
@@ -108,6 +108,11 @@
108 cache-level = <2>; 108 cache-level = <2>;
109 }; 109 };
110 110
111 scu@c000 {
112 compatible = "arm,cortex-a9-scu";
113 reg = <0xc000 0x58>;
114 };
115
111 timer@c600 { 116 timer@c600 {
112 compatible = "arm,cortex-a9-twd-timer"; 117 compatible = "arm,cortex-a9-twd-timer";
113 reg = <0xc600 0x20>; 118 reg = <0xc600 0x20>;
@@ -174,6 +179,7 @@
174 reg-shift = <2>; 179 reg-shift = <2>;
175 interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; 180 interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
176 reg-io-width = <1>; 181 reg-io-width = <1>;
182 clocks = <&coreclk 0>;
177 status = "disabled"; 183 status = "disabled";
178 }; 184 };
179 185
@@ -183,6 +189,7 @@
183 reg-shift = <2>; 189 reg-shift = <2>;
184 interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; 190 interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
185 reg-io-width = <1>; 191 reg-io-width = <1>;
192 clocks = <&coreclk 0>;
186 status = "disabled"; 193 status = "disabled";
187 }; 194 };
188 195
@@ -267,6 +274,28 @@
267 clock-names = "nbclk", "fixed"; 274 clock-names = "nbclk", "fixed";
268 }; 275 };
269 276
277 watchdog@20300 {
278 compatible = "marvell,armada-380-wdt";
279 reg = <0x20300 0x34>, <0x20704 0x4>, <0x18260 0x4>;
280 clocks = <&coreclk 2>, <&refclk>;
281 clock-names = "nbclk", "fixed";
282 };
283
284 cpurst@20800 {
285 compatible = "marvell,armada-370-cpu-reset";
286 reg = <0x20800 0x10>;
287 };
288
289 coherency-fabric@21010 {
290 compatible = "marvell,armada-380-coherency-fabric";
291 reg = <0x21010 0x1c>;
292 };
293
294 pmsu@22000 {
295 compatible = "marvell,armada-380-pmsu";
296 reg = <0x22000 0x1000>;
297 };
298
270 eth1: ethernet@30000 { 299 eth1: ethernet@30000 {
271 compatible = "marvell,armada-370-neta"; 300 compatible = "marvell,armada-370-neta";
272 reg = <0x30000 0x4000>; 301 reg = <0x30000 0x4000>;
@@ -283,6 +312,14 @@
283 status = "disabled"; 312 status = "disabled";
284 }; 313 };
285 314
315 usb@50000 {
316 compatible = "marvell,orion-ehci";
317 reg = <0x58000 0x500>;
318 interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
319 clocks = <&gateclk 18>;
320 status = "disabled";
321 };
322
286 xor@60800 { 323 xor@60800 {
287 compatible = "marvell,orion-xor"; 324 compatible = "marvell,orion-xor";
288 reg = <0x60800 0x100 325 reg = <0x60800 0x100
@@ -339,6 +376,22 @@
339 clocks = <&gateclk 4>; 376 clocks = <&gateclk 4>;
340 }; 377 };
341 378
379 sata@a8000 {
380 compatible = "marvell,armada-380-ahci";
381 reg = <0xa8000 0x2000>;
382 interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
383 clocks = <&gateclk 15>;
384 status = "disabled";
385 };
386
387 sata@e0000 {
388 compatible = "marvell,armada-380-ahci";
389 reg = <0xe0000 0x2000>;
390 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
391 clocks = <&gateclk 30>;
392 status = "disabled";
393 };
394
342 coredivclk: clock@e4250 { 395 coredivclk: clock@e4250 {
343 compatible = "marvell,armada-380-corediv-clock"; 396 compatible = "marvell,armada-380-corediv-clock";
344 reg = <0xe4250 0xc>; 397 reg = <0xe4250 0xc>;
@@ -347,6 +400,12 @@
347 clock-output-names = "nand"; 400 clock-output-names = "nand";
348 }; 401 };
349 402
403 thermal@e8078 {
404 compatible = "marvell,armada380-thermal";
405 reg = <0xe4078 0x4>, <0xe4074 0x4>;
406 status = "okay";
407 };
408
350 flash@d0000 { 409 flash@d0000 {
351 compatible = "marvell,armada370-nand"; 410 compatible = "marvell,armada370-nand";
352 reg = <0xd0000 0x54>; 411 reg = <0xd0000 0x54>;
@@ -356,6 +415,31 @@
356 clocks = <&coredivclk 0>; 415 clocks = <&coredivclk 0>;
357 status = "disabled"; 416 status = "disabled";
358 }; 417 };
418
419 sdhci@d8000 {
420 compatible = "marvell,armada-380-sdhci";
421 reg = <0xd8000 0x1000>, <0xdc000 0x100>;
422 interrupts = <0 25 0x4>;
423 clocks = <&gateclk 17>;
424 mrvl,clk-delay-cycles = <0x1F>;
425 status = "disabled";
426 };
427
428 usb3@f0000 {
429 compatible = "marvell,armada-380-xhci";
430 reg = <0xf0000 0x4000>,<0xf4000 0x4000>;
431 interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
432 clocks = <&gateclk 9>;
433 status = "disabled";
434 };
435
436 usb3@f8000 {
437 compatible = "marvell,armada-380-xhci";
438 reg = <0xf8000 0x4000>,<0xfc000 0x4000>;
439 interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
440 clocks = <&gateclk 10>;
441 status = "disabled";
442 };
359 }; 443 };
360 }; 444 };
361 445
diff --git a/arch/arm/boot/dts/armada-xp-axpwifiap.dts b/arch/arm/boot/dts/armada-xp-axpwifiap.dts
index d83d7d69ac01..a55a97a70505 100644
--- a/arch/arm/boot/dts/armada-xp-axpwifiap.dts
+++ b/arch/arm/boot/dts/armada-xp-axpwifiap.dts
@@ -95,12 +95,10 @@
95 }; 95 };
96 96
97 serial@12000 { 97 serial@12000 {
98 clock-frequency = <250000000>;
99 status = "okay"; 98 status = "okay";
100 }; 99 };
101 100
102 serial@12100 { 101 serial@12100 {
103 clock-frequency = <250000000>;
104 status = "okay"; 102 status = "okay";
105 }; 103 };
106 104
diff --git a/arch/arm/boot/dts/armada-xp-db.dts b/arch/arm/boot/dts/armada-xp-db.dts
index 448373c4b0e5..42ddb2864365 100644
--- a/arch/arm/boot/dts/armada-xp-db.dts
+++ b/arch/arm/boot/dts/armada-xp-db.dts
@@ -49,7 +49,7 @@
49 /* Device Bus parameters are required */ 49 /* Device Bus parameters are required */
50 50
51 /* Read parameters */ 51 /* Read parameters */
52 devbus,bus-width = <8>; 52 devbus,bus-width = <16>;
53 devbus,turn-off-ps = <60000>; 53 devbus,turn-off-ps = <60000>;
54 devbus,badr-skew-ps = <0>; 54 devbus,badr-skew-ps = <0>;
55 devbus,acc-first-ps = <124000>; 55 devbus,acc-first-ps = <124000>;
@@ -106,19 +106,15 @@
106 106
107 internal-regs { 107 internal-regs {
108 serial@12000 { 108 serial@12000 {
109 clock-frequency = <250000000>;
110 status = "okay"; 109 status = "okay";
111 }; 110 };
112 serial@12100 { 111 serial@12100 {
113 clock-frequency = <250000000>;
114 status = "okay"; 112 status = "okay";
115 }; 113 };
116 serial@12200 { 114 serial@12200 {
117 clock-frequency = <250000000>;
118 status = "okay"; 115 status = "okay";
119 }; 116 };
120 serial@12300 { 117 serial@12300 {
121 clock-frequency = <250000000>;
122 status = "okay"; 118 status = "okay";
123 }; 119 };
124 120
diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts
index 61bda687f782..0478c55ca656 100644
--- a/arch/arm/boot/dts/armada-xp-gp.dts
+++ b/arch/arm/boot/dts/armada-xp-gp.dts
@@ -59,7 +59,7 @@
59 /* Device Bus parameters are required */ 59 /* Device Bus parameters are required */
60 60
61 /* Read parameters */ 61 /* Read parameters */
62 devbus,bus-width = <8>; 62 devbus,bus-width = <16>;
63 devbus,turn-off-ps = <60000>; 63 devbus,turn-off-ps = <60000>;
64 devbus,badr-skew-ps = <0>; 64 devbus,badr-skew-ps = <0>;
65 devbus,acc-first-ps = <124000>; 65 devbus,acc-first-ps = <124000>;
@@ -104,19 +104,15 @@
104 104
105 internal-regs { 105 internal-regs {
106 serial@12000 { 106 serial@12000 {
107 clock-frequency = <250000000>;
108 status = "okay"; 107 status = "okay";
109 }; 108 };
110 serial@12100 { 109 serial@12100 {
111 clock-frequency = <250000000>;
112 status = "okay"; 110 status = "okay";
113 }; 111 };
114 serial@12200 { 112 serial@12200 {
115 clock-frequency = <250000000>;
116 status = "okay"; 113 status = "okay";
117 }; 114 };
118 serial@12300 { 115 serial@12300 {
119 clock-frequency = <250000000>;
120 status = "okay"; 116 status = "okay";
121 }; 117 };
122 118
@@ -146,22 +142,22 @@
146 ethernet@70000 { 142 ethernet@70000 {
147 status = "okay"; 143 status = "okay";
148 phy = <&phy0>; 144 phy = <&phy0>;
149 phy-mode = "rgmii-id"; 145 phy-mode = "qsgmii";
150 }; 146 };
151 ethernet@74000 { 147 ethernet@74000 {
152 status = "okay"; 148 status = "okay";
153 phy = <&phy1>; 149 phy = <&phy1>;
154 phy-mode = "rgmii-id"; 150 phy-mode = "qsgmii";
155 }; 151 };
156 ethernet@30000 { 152 ethernet@30000 {
157 status = "okay"; 153 status = "okay";
158 phy = <&phy2>; 154 phy = <&phy2>;
159 phy-mode = "rgmii-id"; 155 phy-mode = "qsgmii";
160 }; 156 };
161 ethernet@34000 { 157 ethernet@34000 {
162 status = "okay"; 158 status = "okay";
163 phy = <&phy3>; 159 phy = <&phy3>;
164 phy-mode = "rgmii-id"; 160 phy-mode = "qsgmii";
165 }; 161 };
166 162
167 /* Front-side USB slot */ 163 /* Front-side USB slot */
diff --git a/arch/arm/boot/dts/armada-xp-matrix.dts b/arch/arm/boot/dts/armada-xp-matrix.dts
index c2242745b9b8..25674fe81f70 100644
--- a/arch/arm/boot/dts/armada-xp-matrix.dts
+++ b/arch/arm/boot/dts/armada-xp-matrix.dts
@@ -37,19 +37,15 @@
37 37
38 internal-regs { 38 internal-regs {
39 serial@12000 { 39 serial@12000 {
40 clock-frequency = <250000000>;
41 status = "okay"; 40 status = "okay";
42 }; 41 };
43 serial@12100 { 42 serial@12100 {
44 clock-frequency = <250000000>;
45 status = "okay"; 43 status = "okay";
46 }; 44 };
47 serial@12200 { 45 serial@12200 {
48 clock-frequency = <250000000>;
49 status = "okay"; 46 status = "okay";
50 }; 47 };
51 serial@12300 { 48 serial@12300 {
52 clock-frequency = <250000000>;
53 status = "okay"; 49 status = "okay";
54 }; 50 };
55 51
diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
index 98335fb34b7a..1257ff1ed278 100644
--- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
@@ -27,6 +27,7 @@
27 cpus { 27 cpus {
28 #address-cells = <1>; 28 #address-cells = <1>;
29 #size-cells = <0>; 29 #size-cells = <0>;
30 enable-method = "marvell,armada-xp-smp";
30 31
31 cpu@0 { 32 cpu@0 {
32 device_type = "cpu"; 33 device_type = "cpu";
diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
index 9480cf891f8c..3396b25b39e1 100644
--- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
@@ -29,6 +29,7 @@
29 cpus { 29 cpus {
30 #address-cells = <1>; 30 #address-cells = <1>;
31 #size-cells = <0>; 31 #size-cells = <0>;
32 enable-method = "marvell,armada-xp-smp";
32 33
33 cpu@0 { 34 cpu@0 {
34 device_type = "cpu"; 35 device_type = "cpu";
diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
index 31ba6d8fbadf..6da84bf40aaf 100644
--- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
@@ -30,6 +30,7 @@
30 cpus { 30 cpus {
31 #address-cells = <1>; 31 #address-cells = <1>;
32 #size-cells = <0>; 32 #size-cells = <0>;
33 enable-method = "marvell,armada-xp-smp";
33 34
34 cpu@0 { 35 cpu@0 {
35 device_type = "cpu"; 36 device_type = "cpu";
diff --git a/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts b/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts
index ff049ee862eb..0cf999abc4ed 100644
--- a/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts
+++ b/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts
@@ -138,7 +138,6 @@
138 }; 138 };
139 139
140 serial@12000 { 140 serial@12000 {
141 clocks = <&coreclk 0>;
142 status = "okay"; 141 status = "okay";
143 }; 142 };
144 143
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 985948ce67b3..e5c6a0492ca0 100644
--- a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
+++ b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
@@ -39,7 +39,7 @@
39 /* Device Bus parameters are required */ 39 /* Device Bus parameters are required */
40 40
41 /* Read parameters */ 41 /* Read parameters */
42 devbus,bus-width = <8>; 42 devbus,bus-width = <16>;
43 devbus,turn-off-ps = <60000>; 43 devbus,turn-off-ps = <60000>;
44 devbus,badr-skew-ps = <0>; 44 devbus,badr-skew-ps = <0>;
45 devbus,acc-first-ps = <124000>; 45 devbus,acc-first-ps = <124000>;
@@ -72,11 +72,9 @@
72 72
73 internal-regs { 73 internal-regs {
74 serial@12000 { 74 serial@12000 {
75 clock-frequency = <250000000>;
76 status = "okay"; 75 status = "okay";
77 }; 76 };
78 serial@12100 { 77 serial@12100 {
79 clock-frequency = <250000000>;
80 status = "okay"; 78 status = "okay";
81 }; 79 };
82 pinctrl { 80 pinctrl {
diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi
index abb9f9dcc525..5902e8359c91 100644
--- a/arch/arm/boot/dts/armada-xp.dtsi
+++ b/arch/arm/boot/dts/armada-xp.dtsi
@@ -58,6 +58,7 @@
58 reg-shift = <2>; 58 reg-shift = <2>;
59 interrupts = <43>; 59 interrupts = <43>;
60 reg-io-width = <1>; 60 reg-io-width = <1>;
61 clocks = <&coreclk 0>;
61 status = "disabled"; 62 status = "disabled";
62 }; 63 };
63 serial@12300 { 64 serial@12300 {
@@ -66,6 +67,7 @@
66 reg-shift = <2>; 67 reg-shift = <2>;
67 interrupts = <44>; 68 interrupts = <44>;
68 reg-io-width = <1>; 69 reg-io-width = <1>;
70 clocks = <&coreclk 0>;
69 status = "disabled"; 71 status = "disabled";
70 }; 72 };
71 73
@@ -117,9 +119,9 @@
117 clock-names = "nbclk", "fixed"; 119 clock-names = "nbclk", "fixed";
118 }; 120 };
119 121
120 armada-370-xp-pmsu@22000 { 122 cpurst@20800 {
121 compatible = "marvell,armada-370-xp-pmsu"; 123 compatible = "marvell,armada-370-cpu-reset";
122 reg = <0x22100 0x400>, <0x20800 0x20>; 124 reg = <0x20800 0x20>;
123 }; 125 };
124 126
125 eth2: ethernet@30000 { 127 eth2: ethernet@30000 {
diff --git a/arch/arm/boot/dts/at91-cosino_mega2560.dts b/arch/arm/boot/dts/at91-cosino_mega2560.dts
index a542d5837a17..27ebb0f722fd 100644
--- a/arch/arm/boot/dts/at91-cosino_mega2560.dts
+++ b/arch/arm/boot/dts/at91-cosino_mega2560.dts
@@ -32,11 +32,6 @@
32 status = "okay"; 32 status = "okay";
33 }; 33 };
34 34
35
36 tsadcc: tsadcc@f804c000 {
37 status = "okay";
38 };
39
40 rtc@fffffeb0 { 35 rtc@fffffeb0 {
41 status = "okay"; 36 status = "okay";
42 }; 37 };
diff --git a/arch/arm/boot/dts/at91-sama5d3_xplained.dts b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
index ce1375595e5f..5b8e40400bec 100644
--- a/arch/arm/boot/dts/at91-sama5d3_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
@@ -21,6 +21,14 @@
21 reg = <0x20000000 0x10000000>; 21 reg = <0x20000000 0x10000000>;
22 }; 22 };
23 23
24 slow_xtal {
25 clock-frequency = <32768>;
26 };
27
28 main_xtal {
29 clock-frequency = <12000000>;
30 };
31
24 ahb { 32 ahb {
25 apb { 33 apb {
26 mmc0: mmc@f0000000 { 34 mmc0: mmc@f0000000 {
@@ -34,7 +42,7 @@
34 }; 42 };
35 43
36 spi0: spi@f0004000 { 44 spi0: spi@f0004000 {
37 cs-gpios = <&pioD 13 0>; 45 cs-gpios = <&pioD 13 0>, <0>, <0>, <&pioD 16 0>;
38 status = "okay"; 46 status = "okay";
39 }; 47 };
40 48
@@ -43,11 +51,54 @@
43 }; 51 };
44 52
45 i2c0: i2c@f0014000 { 53 i2c0: i2c@f0014000 {
54 pinctrl-0 = <&pinctrl_i2c0_pu>;
46 status = "okay"; 55 status = "okay";
47 }; 56 };
48 57
49 i2c1: i2c@f0018000 { 58 i2c1: i2c@f0018000 {
50 status = "okay"; 59 status = "okay";
60
61 pmic: act8865@5b {
62 compatible = "active-semi,act8865";
63 reg = <0x5b>;
64 status = "okay";
65
66 regulators {
67 vcc_1v8_reg: DCDC_REG1 {
68 regulator-name = "VCC_1V8";
69 regulator-min-microvolt = <1800000>;
70 regulator-max-microvolt = <1800000>;
71 regulator-always-on;
72 };
73
74 vcc_1v2_reg: DCDC_REG2 {
75 regulator-name = "VCC_1V2";
76 regulator-min-microvolt = <1200000>;
77 regulator-max-microvolt = <1200000>;
78 regulator-always-on;
79 };
80
81 vcc_3v3_reg: DCDC_REG3 {
82 regulator-name = "VCC_3V3";
83 regulator-min-microvolt = <3300000>;
84 regulator-max-microvolt = <3300000>;
85 regulator-always-on;
86 };
87
88 vddfuse_reg: LDO_REG1 {
89 regulator-name = "FUSE_2V5";
90 regulator-min-microvolt = <2500000>;
91 regulator-max-microvolt = <2500000>;
92 };
93
94 vddana_reg: LDO_REG2 {
95 regulator-name = "VDDANA";
96 regulator-min-microvolt = <3300000>;
97 regulator-max-microvolt = <3300000>;
98 regulator-always-on;
99 };
100 };
101 };
51 }; 102 };
52 103
53 macb0: ethernet@f0028000 { 104 macb0: ethernet@f0028000 {
@@ -55,6 +106,12 @@
55 status = "okay"; 106 status = "okay";
56 }; 107 };
57 108
109 pwm0: pwm@f002c000 {
110 pinctrl-names = "default";
111 pinctrl-0 = <&pinctrl_pwm0_pwmh0_0 &pinctrl_pwm0_pwmh1_0>;
112 status = "okay";
113 };
114
58 usart0: serial@f001c000 { 115 usart0: serial@f001c000 {
59 status = "okay"; 116 status = "okay";
60 }; 117 };
@@ -79,7 +136,7 @@
79 }; 136 };
80 137
81 spi1: spi@f8008000 { 138 spi1: spi@f8008000 {
82 cs-gpios = <&pioC 25 0>, <0>, <0>, <&pioD 16 0>; 139 cs-gpios = <&pioC 25 0>;
83 status = "okay"; 140 status = "okay";
84 }; 141 };
85 142
@@ -102,6 +159,7 @@
102 159
103 i2c2: i2c@f801c000 { 160 i2c2: i2c@f801c000 {
104 dmas = <0>, <0>; /* Do not use DMA for i2c2 */ 161 dmas = <0>, <0>; /* Do not use DMA for i2c2 */
162 pinctrl-0 = <&pinctrl_i2c2_pu>;
105 status = "okay"; 163 status = "okay";
106 }; 164 };
107 165
@@ -116,6 +174,18 @@
116 174
117 pinctrl@fffff200 { 175 pinctrl@fffff200 {
118 board { 176 board {
177 pinctrl_i2c0_pu: i2c0_pu {
178 atmel,pins =
179 <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
180 <AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
181 };
182
183 pinctrl_i2c2_pu: i2c2_pu {
184 atmel,pins =
185 <AT91_PIOA 18 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>,
186 <AT91_PIOA 19 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;
187 };
188
119 pinctrl_mmc0_cd: mmc0_cd { 189 pinctrl_mmc0_cd: mmc0_cd {
120 atmel,pins = 190 atmel,pins =
121 <AT91_PIOE 0 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; 191 <AT91_PIOE 0 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi
index 366fc2cbcd64..c0e0eae16a27 100644
--- a/arch/arm/boot/dts/at91sam9260.dtsi
+++ b/arch/arm/boot/dts/at91sam9260.dtsi
@@ -641,7 +641,7 @@
641 trigger@3 { 641 trigger@3 {
642 reg = <3>; 642 reg = <3>;
643 trigger-name = "external"; 643 trigger-name = "external";
644 trigger-value = <0x13>; 644 trigger-value = <0xd>;
645 trigger-external; 645 trigger-external;
646 }; 646 };
647 }; 647 };
diff --git a/arch/arm/boot/dts/at91sam9261.dtsi b/arch/arm/boot/dts/at91sam9261.dtsi
index e21dda0e8986..b309c1c6e848 100644
--- a/arch/arm/boot/dts/at91sam9261.dtsi
+++ b/arch/arm/boot/dts/at91sam9261.dtsi
@@ -10,7 +10,7 @@
10#include <dt-bindings/pinctrl/at91.h> 10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h> 11#include <dt-bindings/interrupt-controller/irq.h>
12#include <dt-bindings/gpio/gpio.h> 12#include <dt-bindings/gpio/gpio.h>
13#include <dt-bindings/clk/at91.h> 13#include <dt-bindings/clock/at91.h>
14 14
15/ { 15/ {
16 model = "Atmel AT91SAM9261 family SoC"; 16 model = "Atmel AT91SAM9261 family SoC";
@@ -29,6 +29,7 @@
29 i2c0 = &i2c0; 29 i2c0 = &i2c0;
30 ssc0 = &ssc0; 30 ssc0 = &ssc0;
31 ssc1 = &ssc1; 31 ssc1 = &ssc1;
32 ssc2 = &ssc2;
32 }; 33 };
33 34
34 cpus { 35 cpus {
@@ -45,6 +46,18 @@
45 reg = <0x20000000 0x08000000>; 46 reg = <0x20000000 0x08000000>;
46 }; 47 };
47 48
49 main_xtal: main_xtal {
50 compatible = "fixed-clock";
51 #clock-cells = <0>;
52 clock-frequency = <0>;
53 };
54
55 slow_xtal: slow_xtal {
56 compatible = "fixed-clock";
57 #clock-cells = <0>;
58 clock-frequency = <0>;
59 };
60
48 ahb { 61 ahb {
49 compatible = "simple-bus"; 62 compatible = "simple-bus";
50 #address-cells = <1>; 63 #address-cells = <1>;
@@ -182,6 +195,8 @@
182 interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>; 195 interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>;
183 pinctrl-names = "default"; 196 pinctrl-names = "default";
184 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; 197 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
198 clocks = <&ssc0_clk>;
199 clock-names = "pclk";
185 status = "disabled"; 200 status = "disabled";
186 }; 201 };
187 202
@@ -191,6 +206,19 @@
191 interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>; 206 interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>;
192 pinctrl-names = "default"; 207 pinctrl-names = "default";
193 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>; 208 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
209 clocks = <&ssc1_clk>;
210 clock-names = "pclk";
211 status = "disabled";
212 };
213
214 ssc2: ssc@fffc4000 {
215 compatible = "atmel,at91rm9200-ssc";
216 reg = <0xfffc4000 0x4000>;
217 interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
218 pinctrl-names = "default";
219 pinctrl-0 = <&pinctrl_ssc2_tx &pinctrl_ssc2_rx>;
220 clocks = <&ssc2_clk>;
221 clock-names = "pclk";
194 status = "disabled"; 222 status = "disabled";
195 }; 223 };
196 224
@@ -385,6 +413,22 @@
385 }; 413 };
386 }; 414 };
387 415
416 ssc2 {
417 pinctrl_ssc2_tx: ssc2_tx-0 {
418 atmel,pins =
419 <AT91_PIOC 25 AT91_PERIPH_B AT91_PINCTRL_NONE>,
420 <AT91_PIOC 26 AT91_PERIPH_B AT91_PINCTRL_NONE>,
421 <AT91_PIOC 27 AT91_PERIPH_B AT91_PINCTRL_NONE>;
422 };
423
424 pinctrl_ssc2_rx: ssc2_rx-0 {
425 atmel,pins =
426 <AT91_PIOC 28 AT91_PERIPH_B AT91_PINCTRL_NONE>,
427 <AT91_PIOC 29 AT91_PERIPH_B AT91_PINCTRL_NONE>,
428 <AT91_PIOC 30 AT91_PERIPH_B AT91_PINCTRL_NONE>;
429 };
430 };
431
388 spi0 { 432 spi0 {
389 pinctrl_spi0: spi0-0 { 433 pinctrl_spi0: spi0-0 {
390 atmel,pins = 434 atmel,pins =
@@ -524,17 +568,24 @@
524 #size-cells = <0>; 568 #size-cells = <0>;
525 #interrupt-cells = <1>; 569 #interrupt-cells = <1>;
526 570
527 clk32k: slck { 571 slow_rc_osc: slow_rc_osc {
528 compatible = "fixed-clock"; 572 compatible = "fixed-clock";
529 #clock-cells = <0>; 573 #clock-cells = <0>;
530 clock-frequency = <32768>; 574 clock-frequency = <32768>;
575 clock-accuracy = <50000000>;
576 };
577
578 clk32k: slck {
579 compatible = "atmel,at91sam9260-clk-slow";
580 #clock-cells = <0>;
581 clocks = <&slow_rc_osc &slow_xtal>;
531 }; 582 };
532 583
533 main: mainck { 584 main: mainck {
534 compatible = "atmel,at91rm9200-clk-main"; 585 compatible = "atmel,at91rm9200-clk-main";
535 #clock-cells = <0>; 586 #clock-cells = <0>;
536 interrupts-extended = <&pmc AT91_PMC_MOSCS>; 587 interrupts-extended = <&pmc AT91_PMC_MOSCS>;
537 clocks = <&clk32k>; 588 clocks = <&main_xtal>;
538 }; 589 };
539 590
540 plla: pllack { 591 plla: pllack {
@@ -545,7 +596,8 @@
545 reg = <0>; 596 reg = <0>;
546 atmel,clk-input-range = <1000000 32000000>; 597 atmel,clk-input-range = <1000000 32000000>;
547 #atmel,pll-clk-output-range-cells = <4>; 598 #atmel,pll-clk-output-range-cells = <4>;
548 atmel,pll-clk-output-ranges = <80000000 200000000 190000000 240000000>; 599 atmel,pll-clk-output-ranges = <80000000 200000000 0 1>,
600 <190000000 240000000 2 1>;
549 }; 601 };
550 602
551 pllb: pllbck { 603 pllb: pllbck {
@@ -554,9 +606,9 @@
554 interrupts-extended = <&pmc AT91_PMC_LOCKB>; 606 interrupts-extended = <&pmc AT91_PMC_LOCKB>;
555 clocks = <&main>; 607 clocks = <&main>;
556 reg = <1>; 608 reg = <1>;
557 atmel,clk-input-range = <1000000 32000000>; 609 atmel,clk-input-range = <1000000 5000000>;
558 #atmel,pll-clk-output-range-cells = <4>; 610 #atmel,pll-clk-output-range-cells = <4>;
559 atmel,pll-clk-output-ranges = <80000000 200000000 190000000 240000000>; 611 atmel,pll-clk-output-ranges = <70000000 130000000 1 1>;
560 }; 612 };
561 613
562 mck: masterck { 614 mck: masterck {
@@ -565,16 +617,48 @@
565 interrupts-extended = <&pmc AT91_PMC_MCKRDY>; 617 interrupts-extended = <&pmc AT91_PMC_MCKRDY>;
566 clocks = <&clk32k>, <&main>, <&plla>, <&pllb>; 618 clocks = <&clk32k>, <&main>, <&plla>, <&pllb>;
567 atmel,clk-output-range = <0 94000000>; 619 atmel,clk-output-range = <0 94000000>;
568 atmel,clk-divisors = <1 2 4 3>; 620 atmel,clk-divisors = <1 2 4 0>;
569 }; 621 };
570 622
571 usb: usbck { 623 usb: usbck {
572 compatible = "atmel,at91rm9200-clk-usb"; 624 compatible = "atmel,at91rm9200-clk-usb";
573 #clock-cells = <0>; 625 #clock-cells = <0>;
574 atmel,clk-divisors = <1 2 4 3>; 626 atmel,clk-divisors = <1 2 4 0>;
575 clocks = <&pllb>; 627 clocks = <&pllb>;
576 }; 628 };
577 629
630 prog: progck {
631 compatible = "atmel,at91rm9200-clk-programmable";
632 #address-cells = <1>;
633 #size-cells = <0>;
634 interrupt-parent = <&pmc>;
635 clocks = <&clk32k>, <&main>, <&plla>, <&pllb>;
636
637 prog0: prog0 {
638 #clock-cells = <0>;
639 reg = <0>;
640 interrupts = <AT91_PMC_PCKRDY(0)>;
641 };
642
643 prog1: prog1 {
644 #clock-cells = <0>;
645 reg = <1>;
646 interrupts = <AT91_PMC_PCKRDY(1)>;
647 };
648
649 prog2: prog2 {
650 #clock-cells = <0>;
651 reg = <2>;
652 interrupts = <AT91_PMC_PCKRDY(2)>;
653 };
654
655 prog3: prog3 {
656 #clock-cells = <0>;
657 reg = <3>;
658 interrupts = <AT91_PMC_PCKRDY(3)>;
659 };
660 };
661
578 systemck { 662 systemck {
579 compatible = "atmel,at91rm9200-clk-system"; 663 compatible = "atmel,at91rm9200-clk-system";
580 #address-cells = <1>; 664 #address-cells = <1>;
@@ -592,6 +676,30 @@
592 clocks = <&usb>; 676 clocks = <&usb>;
593 }; 677 };
594 678
679 pck0: pck0 {
680 #clock-cells = <0>;
681 reg = <8>;
682 clocks = <&prog0>;
683 };
684
685 pck1: pck1 {
686 #clock-cells = <0>;
687 reg = <9>;
688 clocks = <&prog1>;
689 };
690
691 pck2: pck2 {
692 #clock-cells = <0>;
693 reg = <10>;
694 clocks = <&prog2>;
695 };
696
697 pck3: pck3 {
698 #clock-cells = <0>;
699 reg = <11>;
700 clocks = <&prog3>;
701 };
702
595 hclk0: hclk0 { 703 hclk0: hclk0 {
596 #clock-cells = <0>; 704 #clock-cells = <0>;
597 reg = <16>; 705 reg = <16>;
@@ -666,6 +774,21 @@
666 reg = <13>; 774 reg = <13>;
667 }; 775 };
668 776
777 ssc0_clk: ssc0_clk {
778 #clock-cells = <0>;
779 reg = <14>;
780 };
781
782 ssc1_clk: ssc1_clk {
783 #clock-cells = <0>;
784 reg = <15>;
785 };
786
787 ssc2_clk: ssc2_clk {
788 #clock-cells = <0>;
789 reg = <16>;
790 };
791
669 tc0_clk: tc0_clk { 792 tc0_clk: tc0_clk {
670 #clock-cells = <0>; 793 #clock-cells = <0>;
671 reg = <17>; 794 reg = <17>;
diff --git a/arch/arm/boot/dts/at91sam9261ek.dts b/arch/arm/boot/dts/at91sam9261ek.dts
index 2ce527e70c7a..c6683ea8b743 100644
--- a/arch/arm/boot/dts/at91sam9261ek.dts
+++ b/arch/arm/boot/dts/at91sam9261ek.dts
@@ -20,6 +20,10 @@
20 reg = <0x20000000 0x4000000>; 20 reg = <0x20000000 0x4000000>;
21 }; 21 };
22 22
23 main_xtal {
24 clock-frequency = <18432000>;
25 };
26
23 clocks { 27 clocks {
24 #address-cells = <1>; 28 #address-cells = <1>;
25 #size-cells = <1>; 29 #size-cells = <1>;
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index 9cdaecff13b3..ace6bf197b70 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -136,6 +136,36 @@
136 >; 136 >;
137 137
138 /* shared pinctrl settings */ 138 /* shared pinctrl settings */
139 adc0 {
140 pinctrl_adc0_adtrg: adc0_adtrg {
141 atmel,pins = <AT91_PIOD 28 AT91_PERIPH_A AT91_PINCTRL_NONE>;
142 };
143 pinctrl_adc0_ad0: adc0_ad0 {
144 atmel,pins = <AT91_PIOD 20 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
145 };
146 pinctrl_adc0_ad1: adc0_ad1 {
147 atmel,pins = <AT91_PIOD 21 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
148 };
149 pinctrl_adc0_ad2: adc0_ad2 {
150 atmel,pins = <AT91_PIOD 22 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
151 };
152 pinctrl_adc0_ad3: adc0_ad3 {
153 atmel,pins = <AT91_PIOD 23 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
154 };
155 pinctrl_adc0_ad4: adc0_ad4 {
156 atmel,pins = <AT91_PIOD 24 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
157 };
158 pinctrl_adc0_ad5: adc0_ad5 {
159 atmel,pins = <AT91_PIOD 25 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
160 };
161 pinctrl_adc0_ad6: adc0_ad6 {
162 atmel,pins = <AT91_PIOD 26 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
163 };
164 pinctrl_adc0_ad7: adc0_ad7 {
165 atmel,pins = <AT91_PIOD 27 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
166 };
167 };
168
139 dbgu { 169 dbgu {
140 pinctrl_dbgu: dbgu-0 { 170 pinctrl_dbgu: dbgu-0 {
141 atmel,pins = 171 atmel,pins =
@@ -634,10 +664,9 @@
634 adc0: adc@fffb0000 { 664 adc0: adc@fffb0000 {
635 #address-cells = <1>; 665 #address-cells = <1>;
636 #size-cells = <0>; 666 #size-cells = <0>;
637 compatible = "atmel,at91sam9260-adc"; 667 compatible = "atmel,at91sam9g45-adc";
638 reg = <0xfffb0000 0x100>; 668 reg = <0xfffb0000 0x100>;
639 interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>; 669 interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
640 atmel,adc-use-external-triggers;
641 atmel,adc-channels-used = <0xff>; 670 atmel,adc-channels-used = <0xff>;
642 atmel,adc-vref = <3300>; 671 atmel,adc-vref = <3300>;
643 atmel,adc-startup-time = <40>; 672 atmel,adc-startup-time = <40>;
diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
index 7ff665a8c708..9f5b0a674995 100644
--- a/arch/arm/boot/dts/at91sam9m10g45ek.dts
+++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
@@ -8,6 +8,7 @@
8 */ 8 */
9/dts-v1/; 9/dts-v1/;
10#include "at91sam9g45.dtsi" 10#include "at91sam9g45.dtsi"
11#include <dt-bindings/pwm/pwm.h>
11 12
12/ { 13/ {
13 model = "Atmel AT91SAM9M10G45-EK"; 14 model = "Atmel AT91SAM9M10G45-EK";
@@ -130,6 +131,21 @@
130 status = "okay"; 131 status = "okay";
131 }; 132 };
132 133
134 adc0: adc@fffb0000 {
135 pinctrl-names = "default";
136 pinctrl-0 = <
137 &pinctrl_adc0_ad0
138 &pinctrl_adc0_ad1
139 &pinctrl_adc0_ad2
140 &pinctrl_adc0_ad3
141 &pinctrl_adc0_ad4
142 &pinctrl_adc0_ad5
143 &pinctrl_adc0_ad6
144 &pinctrl_adc0_ad7>;
145 atmel,adc-ts-wires = <4>;
146 status = "okay";
147 };
148
133 pwm0: pwm@fffb8000 { 149 pwm0: pwm@fffb8000 {
134 status = "okay"; 150 status = "okay";
135 151
@@ -216,14 +232,14 @@
216 232
217 d6 { 233 d6 {
218 label = "d6"; 234 label = "d6";
219 pwms = <&pwm0 3 5000 0>; 235 pwms = <&pwm0 3 5000 PWM_POLARITY_INVERTED>;
220 max-brightness = <255>; 236 max-brightness = <255>;
221 linux,default-trigger = "nand-disk"; 237 linux,default-trigger = "nand-disk";
222 }; 238 };
223 239
224 d7 { 240 d7 {
225 label = "d7"; 241 label = "d7";
226 pwms = <&pwm0 1 5000 0>; 242 pwms = <&pwm0 1 5000 PWM_POLARITY_INVERTED>;
227 max-brightness = <255>; 243 max-brightness = <255>;
228 linux,default-trigger = "mmc0"; 244 linux,default-trigger = "mmc0";
229 }; 245 };
diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi
index 9f04808fc697..d1b82e6635d5 100644
--- a/arch/arm/boot/dts/at91sam9n12.dtsi
+++ b/arch/arm/boot/dts/at91sam9n12.dtsi
@@ -12,6 +12,7 @@
12#include <dt-bindings/pinctrl/at91.h> 12#include <dt-bindings/pinctrl/at91.h>
13#include <dt-bindings/interrupt-controller/irq.h> 13#include <dt-bindings/interrupt-controller/irq.h>
14#include <dt-bindings/gpio/gpio.h> 14#include <dt-bindings/gpio/gpio.h>
15#include <dt-bindings/clock/at91.h>
15 16
16/ { 17/ {
17 model = "Atmel AT91SAM9N12 SoC"; 18 model = "Atmel AT91SAM9N12 SoC";
@@ -49,6 +50,18 @@
49 reg = <0x20000000 0x10000000>; 50 reg = <0x20000000 0x10000000>;
50 }; 51 };
51 52
53 slow_xtal: slow_xtal {
54 compatible = "fixed-clock";
55 #clock-cells = <0>;
56 clock-frequency = <0>;
57 };
58
59 main_xtal: main_xtal {
60 compatible = "fixed-clock";
61 #clock-cells = <0>;
62 clock-frequency = <0>;
63 };
64
52 ahb { 65 ahb {
53 compatible = "simple-bus"; 66 compatible = "simple-bus";
54 #address-cells = <1>; 67 #address-cells = <1>;
@@ -75,8 +88,280 @@
75 }; 88 };
76 89
77 pmc: pmc@fffffc00 { 90 pmc: pmc@fffffc00 {
78 compatible = "atmel,at91rm9200-pmc"; 91 compatible = "atmel,at91sam9n12-pmc";
79 reg = <0xfffffc00 0x100>; 92 reg = <0xfffffc00 0x200>;
93 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
94 interrupt-controller;
95 #address-cells = <1>;
96 #size-cells = <0>;
97 #interrupt-cells = <1>;
98
99 main_rc_osc: main_rc_osc {
100 compatible = "atmel,at91sam9x5-clk-main-rc-osc";
101 #clock-cells = <0>;
102 interrupts-extended = <&pmc AT91_PMC_MOSCRCS>;
103 clock-frequency = <12000000>;
104 clock-accuracy = <50000000>;
105 };
106
107 main_osc: main_osc {
108 compatible = "atmel,at91rm9200-clk-main-osc";
109 #clock-cells = <0>;
110 interrupts-extended = <&pmc AT91_PMC_MOSCS>;
111 clocks = <&main_xtal>;
112 };
113
114 main: mainck {
115 compatible = "atmel,at91sam9x5-clk-main";
116 #clock-cells = <0>;
117 interrupts-extended = <&pmc AT91_PMC_MOSCSELS>;
118 clocks = <&main_rc_osc>, <&main_osc>;
119 };
120
121 plla: pllack {
122 compatible = "atmel,at91rm9200-clk-pll";
123 #clock-cells = <0>;
124 interrupts-extended = <&pmc AT91_PMC_LOCKA>;
125 clocks = <&main>;
126 reg = <0>;
127 atmel,clk-input-range = <2000000 32000000>;
128 #atmel,pll-clk-output-range-cells = <4>;
129 atmel,pll-clk-output-ranges = <745000000 800000000 0 0>,
130 <695000000 750000000 1 0>,
131 <645000000 700000000 2 0>,
132 <595000000 650000000 3 0>,
133 <545000000 600000000 0 1>,
134 <495000000 555000000 1 1>,
135 <445000000 500000000 1 2>,
136 <400000000 450000000 1 3>;
137 };
138
139 plladiv: plladivck {
140 compatible = "atmel,at91sam9x5-clk-plldiv";
141 #clock-cells = <0>;
142 clocks = <&plla>;
143 };
144
145 pllb: pllbck {
146 compatible = "atmel,at91rm9200-clk-pll";
147 #clock-cells = <0>;
148 interrupts-extended = <&pmc AT91_PMC_LOCKB>;
149 clocks = <&main>;
150 reg = <1>;
151 atmel,clk-input-range = <2000000 32000000>;
152 #atmel,pll-clk-output-range-cells = <3>;
153 atmel,pll-clk-output-ranges = <30000000 100000000 0>;
154 };
155
156 mck: masterck {
157 compatible = "atmel,at91sam9x5-clk-master";
158 #clock-cells = <0>;
159 interrupts-extended = <&pmc AT91_PMC_MCKRDY>;
160 clocks = <&clk32k>, <&main>, <&plladiv>, <&pllb>;
161 atmel,clk-output-range = <0 133333333>;
162 atmel,clk-divisors = <1 2 4 3>;
163 atmel,master-clk-have-div3-pres;
164 };
165
166 usb: usbck {
167 compatible = "atmel,at91sam9n12-clk-usb";
168 #clock-cells = <0>;
169 clocks = <&pllb>;
170 };
171
172 prog: progck {
173 compatible = "atmel,at91sam9x5-clk-programmable";
174 #address-cells = <1>;
175 #size-cells = <0>;
176 interrupt-parent = <&pmc>;
177 clocks = <&clk32k>, <&main>, <&plladiv>, <&pllb>, <&mck>;
178
179 prog0: prog0 {
180 #clock-cells = <0>;
181 reg = <0>;
182 interrupts = <AT91_PMC_PCKRDY(0)>;
183 };
184
185 prog1: prog1 {
186 #clock-cells = <0>;
187 reg = <1>;
188 interrupts = <AT91_PMC_PCKRDY(1)>;
189 };
190 };
191
192 systemck {
193 compatible = "atmel,at91rm9200-clk-system";
194 #address-cells = <1>;
195 #size-cells = <0>;
196
197 ddrck: ddrck {
198 #clock-cells = <0>;
199 reg = <2>;
200 clocks = <&mck>;
201 };
202
203 lcdck: lcdck {
204 #clock-cells = <0>;
205 reg = <3>;
206 clocks = <&mck>;
207 };
208
209 uhpck: uhpck {
210 #clock-cells = <0>;
211 reg = <6>;
212 clocks = <&usb>;
213 };
214
215 udpck: udpck {
216 #clock-cells = <0>;
217 reg = <7>;
218 clocks = <&usb>;
219 };
220
221 pck0: pck0 {
222 #clock-cells = <0>;
223 reg = <8>;
224 clocks = <&prog0>;
225 };
226
227 pck1: pck1 {
228 #clock-cells = <0>;
229 reg = <9>;
230 clocks = <&prog1>;
231 };
232 };
233
234 periphck {
235 compatible = "atmel,at91sam9x5-clk-peripheral";
236 #address-cells = <1>;
237 #size-cells = <0>;
238 clocks = <&mck>;
239
240 pioAB_clk: pioAB_clk {
241 #clock-cells = <0>;
242 reg = <2>;
243 };
244
245 pioCD_clk: pioCD_clk {
246 #clock-cells = <0>;
247 reg = <3>;
248 };
249
250 fuse_clk: fuse_clk {
251 #clock-cells = <0>;
252 reg = <4>;
253 };
254
255 usart0_clk: usart0_clk {
256 #clock-cells = <0>;
257 reg = <5>;
258 };
259
260 usart1_clk: usart1_clk {
261 #clock-cells = <0>;
262 reg = <6>;
263 };
264
265 usart2_clk: usart2_clk {
266 #clock-cells = <0>;
267 reg = <7>;
268 };
269
270 usart3_clk: usart3_clk {
271 #clock-cells = <0>;
272 reg = <8>;
273 };
274
275 twi0_clk: twi0_clk {
276 reg = <9>;
277 #clock-cells = <0>;
278 };
279
280 twi1_clk: twi1_clk {
281 #clock-cells = <0>;
282 reg = <10>;
283 };
284
285 mci0_clk: mci0_clk {
286 #clock-cells = <0>;
287 reg = <12>;
288 };
289
290 spi0_clk: spi0_clk {
291 #clock-cells = <0>;
292 reg = <13>;
293 };
294
295 spi1_clk: spi1_clk {
296 #clock-cells = <0>;
297 reg = <14>;
298 };
299
300 uart0_clk: uart0_clk {
301 #clock-cells = <0>;
302 reg = <15>;
303 };
304
305 uart1_clk: uart1_clk {
306 #clock-cells = <0>;
307 reg = <16>;
308 };
309
310 tcb_clk: tcb_clk {
311 #clock-cells = <0>;
312 reg = <17>;
313 };
314
315 pwm_clk: pwm_clk {
316 #clock-cells = <0>;
317 reg = <18>;
318 };
319
320 adc_clk: adc_clk {
321 #clock-cells = <0>;
322 reg = <19>;
323 };
324
325 dma0_clk: dma0_clk {
326 #clock-cells = <0>;
327 reg = <20>;
328 };
329
330 uhphs_clk: uhphs_clk {
331 #clock-cells = <0>;
332 reg = <22>;
333 };
334
335 udphs_clk: udphs_clk {
336 #clock-cells = <0>;
337 reg = <23>;
338 };
339
340 lcdc_clk: lcdc_clk {
341 #clock-cells = <0>;
342 reg = <25>;
343 };
344
345 sha_clk: sha_clk {
346 #clock-cells = <0>;
347 reg = <27>;
348 };
349
350 ssc0_clk: ssc0_clk {
351 #clock-cells = <0>;
352 reg = <28>;
353 };
354
355 aes_clk: aes_clk {
356 #clock-cells = <0>;
357 reg = <29>;
358 };
359
360 trng_clk: trng_clk {
361 #clock-cells = <0>;
362 reg = <30>;
363 };
364 };
80 }; 365 };
81 366
82 rstc@fffffe00 { 367 rstc@fffffe00 {
@@ -88,6 +373,7 @@
88 compatible = "atmel,at91sam9260-pit"; 373 compatible = "atmel,at91sam9260-pit";
89 reg = <0xfffffe30 0xf>; 374 reg = <0xfffffe30 0xf>;
90 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; 375 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
376 clocks = <&mck>;
91 }; 377 };
92 378
93 shdwc@fffffe10 { 379 shdwc@fffffe10 {
@@ -95,12 +381,38 @@
95 reg = <0xfffffe10 0x10>; 381 reg = <0xfffffe10 0x10>;
96 }; 382 };
97 383
384 sckc@fffffe50 {
385 compatible = "atmel,at91sam9x5-sckc";
386 reg = <0xfffffe50 0x4>;
387
388 slow_osc: slow_osc {
389 compatible = "atmel,at91sam9x5-clk-slow-osc";
390 #clock-cells = <0>;
391 clocks = <&slow_xtal>;
392 };
393
394 slow_rc_osc: slow_rc_osc {
395 compatible = "atmel,at91sam9x5-clk-slow-rc-osc";
396 #clock-cells = <0>;
397 clock-frequency = <32768>;
398 clock-accuracy = <50000000>;
399 };
400
401 clk32k: slck {
402 compatible = "atmel,at91sam9x5-clk-slow";
403 #clock-cells = <0>;
404 clocks = <&slow_rc_osc>, <&slow_osc>;
405 };
406 };
407
98 mmc0: mmc@f0008000 { 408 mmc0: mmc@f0008000 {
99 compatible = "atmel,hsmci"; 409 compatible = "atmel,hsmci";
100 reg = <0xf0008000 0x600>; 410 reg = <0xf0008000 0x600>;
101 interrupts = <12 IRQ_TYPE_LEVEL_HIGH 0>; 411 interrupts = <12 IRQ_TYPE_LEVEL_HIGH 0>;
102 dmas = <&dma 1 AT91_DMA_CFG_PER_ID(0)>; 412 dmas = <&dma 1 AT91_DMA_CFG_PER_ID(0)>;
103 dma-names = "rxtx"; 413 dma-names = "rxtx";
414 clocks = <&mci0_clk>;
415 clock-names = "mci_clk";
104 #address-cells = <1>; 416 #address-cells = <1>;
105 #size-cells = <0>; 417 #size-cells = <0>;
106 status = "disabled"; 418 status = "disabled";
@@ -110,12 +422,16 @@
110 compatible = "atmel,at91sam9x5-tcb"; 422 compatible = "atmel,at91sam9x5-tcb";
111 reg = <0xf8008000 0x100>; 423 reg = <0xf8008000 0x100>;
112 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>; 424 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>;
425 clocks = <&tcb_clk>;
426 clock-names = "t0_clk";
113 }; 427 };
114 428
115 tcb1: timer@f800c000 { 429 tcb1: timer@f800c000 {
116 compatible = "atmel,at91sam9x5-tcb"; 430 compatible = "atmel,at91sam9x5-tcb";
117 reg = <0xf800c000 0x100>; 431 reg = <0xf800c000 0x100>;
118 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>; 432 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>;
433 clocks = <&tcb_clk>;
434 clock-names = "t0_clk";
119 }; 435 };
120 436
121 dma: dma-controller@ffffec00 { 437 dma: dma-controller@ffffec00 {
@@ -123,6 +439,8 @@
123 reg = <0xffffec00 0x200>; 439 reg = <0xffffec00 0x200>;
124 interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>; 440 interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
125 #dma-cells = <2>; 441 #dma-cells = <2>;
442 clocks = <&dma0_clk>;
443 clock-names = "dma_clk";
126 }; 444 };
127 445
128 pinctrl@fffff400 { 446 pinctrl@fffff400 {
@@ -392,6 +710,7 @@
392 gpio-controller; 710 gpio-controller;
393 interrupt-controller; 711 interrupt-controller;
394 #interrupt-cells = <2>; 712 #interrupt-cells = <2>;
713 clocks = <&pioAB_clk>;
395 }; 714 };
396 715
397 pioB: gpio@fffff600 { 716 pioB: gpio@fffff600 {
@@ -402,6 +721,7 @@
402 gpio-controller; 721 gpio-controller;
403 interrupt-controller; 722 interrupt-controller;
404 #interrupt-cells = <2>; 723 #interrupt-cells = <2>;
724 clocks = <&pioAB_clk>;
405 }; 725 };
406 726
407 pioC: gpio@fffff800 { 727 pioC: gpio@fffff800 {
@@ -412,6 +732,7 @@
412 gpio-controller; 732 gpio-controller;
413 interrupt-controller; 733 interrupt-controller;
414 #interrupt-cells = <2>; 734 #interrupt-cells = <2>;
735 clocks = <&pioCD_clk>;
415 }; 736 };
416 737
417 pioD: gpio@fffffa00 { 738 pioD: gpio@fffffa00 {
@@ -422,6 +743,7 @@
422 gpio-controller; 743 gpio-controller;
423 interrupt-controller; 744 interrupt-controller;
424 #interrupt-cells = <2>; 745 #interrupt-cells = <2>;
746 clocks = <&pioCD_clk>;
425 }; 747 };
426 }; 748 };
427 749
@@ -431,6 +753,8 @@
431 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; 753 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
432 pinctrl-names = "default"; 754 pinctrl-names = "default";
433 pinctrl-0 = <&pinctrl_dbgu>; 755 pinctrl-0 = <&pinctrl_dbgu>;
756 clocks = <&mck>;
757 clock-names = "usart";
434 status = "disabled"; 758 status = "disabled";
435 }; 759 };
436 760
@@ -443,6 +767,8 @@
443 dma-names = "tx", "rx"; 767 dma-names = "tx", "rx";
444 pinctrl-names = "default"; 768 pinctrl-names = "default";
445 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; 769 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
770 clocks = <&ssc0_clk>;
771 clock-names = "pclk";
446 status = "disabled"; 772 status = "disabled";
447 }; 773 };
448 774
@@ -452,6 +778,8 @@
452 interrupts = <5 IRQ_TYPE_LEVEL_HIGH 5>; 778 interrupts = <5 IRQ_TYPE_LEVEL_HIGH 5>;
453 pinctrl-names = "default"; 779 pinctrl-names = "default";
454 pinctrl-0 = <&pinctrl_usart0>; 780 pinctrl-0 = <&pinctrl_usart0>;
781 clocks = <&usart0_clk>;
782 clock-names = "usart";
455 status = "disabled"; 783 status = "disabled";
456 }; 784 };
457 785
@@ -461,6 +789,8 @@
461 interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>; 789 interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
462 pinctrl-names = "default"; 790 pinctrl-names = "default";
463 pinctrl-0 = <&pinctrl_usart1>; 791 pinctrl-0 = <&pinctrl_usart1>;
792 clocks = <&usart1_clk>;
793 clock-names = "usart";
464 status = "disabled"; 794 status = "disabled";
465 }; 795 };
466 796
@@ -470,6 +800,8 @@
470 interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>; 800 interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
471 pinctrl-names = "default"; 801 pinctrl-names = "default";
472 pinctrl-0 = <&pinctrl_usart2>; 802 pinctrl-0 = <&pinctrl_usart2>;
803 clocks = <&usart2_clk>;
804 clock-names = "usart";
473 status = "disabled"; 805 status = "disabled";
474 }; 806 };
475 807
@@ -479,6 +811,8 @@
479 interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>; 811 interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
480 pinctrl-names = "default"; 812 pinctrl-names = "default";
481 pinctrl-0 = <&pinctrl_usart3>; 813 pinctrl-0 = <&pinctrl_usart3>;
814 clocks = <&usart3_clk>;
815 clock-names = "usart";
482 status = "disabled"; 816 status = "disabled";
483 }; 817 };
484 818
@@ -493,6 +827,7 @@
493 #size-cells = <0>; 827 #size-cells = <0>;
494 pinctrl-names = "default"; 828 pinctrl-names = "default";
495 pinctrl-0 = <&pinctrl_i2c0>; 829 pinctrl-0 = <&pinctrl_i2c0>;
830 clocks = <&twi0_clk>;
496 status = "disabled"; 831 status = "disabled";
497 }; 832 };
498 833
@@ -507,6 +842,7 @@
507 #size-cells = <0>; 842 #size-cells = <0>;
508 pinctrl-names = "default"; 843 pinctrl-names = "default";
509 pinctrl-0 = <&pinctrl_i2c1>; 844 pinctrl-0 = <&pinctrl_i2c1>;
845 clocks = <&twi1_clk>;
510 status = "disabled"; 846 status = "disabled";
511 }; 847 };
512 848
@@ -521,6 +857,8 @@
521 dma-names = "tx", "rx"; 857 dma-names = "tx", "rx";
522 pinctrl-names = "default"; 858 pinctrl-names = "default";
523 pinctrl-0 = <&pinctrl_spi0>; 859 pinctrl-0 = <&pinctrl_spi0>;
860 clocks = <&spi0_clk>;
861 clock-names = "spi_clk";
524 status = "disabled"; 862 status = "disabled";
525 }; 863 };
526 864
@@ -535,6 +873,8 @@
535 dma-names = "tx", "rx"; 873 dma-names = "tx", "rx";
536 pinctrl-names = "default"; 874 pinctrl-names = "default";
537 pinctrl-0 = <&pinctrl_spi1>; 875 pinctrl-0 = <&pinctrl_spi1>;
876 clocks = <&spi1_clk>;
877 clock-names = "spi_clk";
538 status = "disabled"; 878 status = "disabled";
539 }; 879 };
540 880
@@ -554,6 +894,7 @@
554 reg = <0xf8034000 0x300>; 894 reg = <0xf8034000 0x300>;
555 interrupts = <18 IRQ_TYPE_LEVEL_HIGH 4>; 895 interrupts = <18 IRQ_TYPE_LEVEL_HIGH 4>;
556 #pwm-cells = <3>; 896 #pwm-cells = <3>;
897 clocks = <&pwm_clk>;
557 status = "disabled"; 898 status = "disabled";
558 }; 899 };
559 }; 900 };
@@ -584,6 +925,9 @@
584 compatible = "atmel,at91rm9200-ohci", "usb-ohci"; 925 compatible = "atmel,at91rm9200-ohci", "usb-ohci";
585 reg = <0x00500000 0x00100000>; 926 reg = <0x00500000 0x00100000>;
586 interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>; 927 interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
928 clocks = <&usb>, <&uhphs_clk>, <&udphs_clk>,
929 <&uhpck>;
930 clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck";
587 status = "disabled"; 931 status = "disabled";
588 }; 932 };
589 }; 933 };
diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts
index 924a6a6ffd0f..64bbe46e4f90 100644
--- a/arch/arm/boot/dts/at91sam9n12ek.dts
+++ b/arch/arm/boot/dts/at91sam9n12ek.dts
@@ -21,6 +21,14 @@
21 reg = <0x20000000 0x8000000>; 21 reg = <0x20000000 0x8000000>;
22 }; 22 };
23 23
24 slow_xtal {
25 clock-frequency = <32768>;
26 };
27
28 main_xtal {
29 clock-frequency = <16000000>;
30 };
31
24 clocks { 32 clocks {
25 #address-cells = <1>; 33 #address-cells = <1>;
26 #size-cells = <1>; 34 #size-cells = <1>;
diff --git a/arch/arm/boot/dts/at91sam9rl.dtsi b/arch/arm/boot/dts/at91sam9rl.dtsi
index 63e1784d272c..1da183155eee 100644
--- a/arch/arm/boot/dts/at91sam9rl.dtsi
+++ b/arch/arm/boot/dts/at91sam9rl.dtsi
@@ -8,9 +8,10 @@
8 8
9#include "skeleton.dtsi" 9#include "skeleton.dtsi"
10#include <dt-bindings/pinctrl/at91.h> 10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/clk/at91.h> 11#include <dt-bindings/clock/at91.h>
12#include <dt-bindings/interrupt-controller/irq.h> 12#include <dt-bindings/interrupt-controller/irq.h>
13#include <dt-bindings/gpio/gpio.h> 13#include <dt-bindings/gpio/gpio.h>
14#include <dt-bindings/pwm/pwm.h>
14 15
15/ { 16/ {
16 model = "Atmel AT91SAM9RL family SoC"; 17 model = "Atmel AT91SAM9RL family SoC";
@@ -32,6 +33,7 @@
32 i2c1 = &i2c1; 33 i2c1 = &i2c1;
33 ssc0 = &ssc0; 34 ssc0 = &ssc0;
34 ssc1 = &ssc1; 35 ssc1 = &ssc1;
36 pwm0 = &pwm0;
35 }; 37 };
36 38
37 cpus { 39 cpus {
@@ -48,12 +50,43 @@
48 reg = <0x20000000 0x04000000>; 50 reg = <0x20000000 0x04000000>;
49 }; 51 };
50 52
53 slow_xtal: slow_xtal {
54 compatible = "fixed-clock";
55 #clock-cells = <0>;
56 clock-frequency = <0>;
57 };
58
59 main_xtal: main_xtal {
60 compatible = "fixed-clock";
61 #clock-cells = <0>;
62 clock-frequency = <0>;
63 };
64
65 clocks {
66 adc_op_clk: adc_op_clk{
67 compatible = "fixed-clock";
68 #clock-cells = <0>;
69 clock-frequency = <1000000>;
70 };
71 };
72
51 ahb { 73 ahb {
52 compatible = "simple-bus"; 74 compatible = "simple-bus";
53 #address-cells = <1>; 75 #address-cells = <1>;
54 #size-cells = <1>; 76 #size-cells = <1>;
55 ranges; 77 ranges;
56 78
79 fb0: fb@00500000 {
80 compatible = "atmel,at91sam9rl-lcdc";
81 reg = <0x00500000 0x1000>;
82 interrupts = <23 IRQ_TYPE_LEVEL_HIGH 3>;
83 pinctrl-names = "default";
84 pinctrl-0 = <&pinctrl_fb>;
85 clocks = <&lcd_clk>, <&lcd_clk>;
86 clock-names = "hclk", "lcdc_clk";
87 status = "disabled";
88 };
89
57 nand0: nand@40000000 { 90 nand0: nand@40000000 {
58 compatible = "atmel,at91rm9200-nand"; 91 compatible = "atmel,at91rm9200-nand";
59 #address-cells = <1>; 92 #address-cells = <1>;
@@ -187,6 +220,16 @@
187 status = "disabled"; 220 status = "disabled";
188 }; 221 };
189 222
223 pwm0: pwm@fffc8000 {
224 compatible = "atmel,at91sam9rl-pwm";
225 reg = <0xfffc8000 0x300>;
226 interrupts = <19 IRQ_TYPE_LEVEL_HIGH 4>;
227 #pwm-cells = <3>;
228 clocks = <&pwm_clk>;
229 clock-names = "pwm_clk";
230 status = "disabled";
231 };
232
190 spi0: spi@fffcc000 { 233 spi0: spi@fffcc000 {
191 #address-cells = <1>; 234 #address-cells = <1>;
192 #size-cells = <0>; 235 #size-cells = <0>;
@@ -200,6 +243,111 @@
200 status = "disabled"; 243 status = "disabled";
201 }; 244 };
202 245
246 adc0: adc@fffd0000 {
247 #address-cells = <1>;
248 #size-cells = <0>;
249 compatible = "atmel,at91sam9rl-adc";
250 reg = <0xfffd0000 0x100>;
251 interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
252 clocks = <&adc_clk>, <&adc_op_clk>;
253 clock-names = "adc_clk", "adc_op_clk";
254 atmel,adc-use-external-triggers;
255 atmel,adc-channels-used = <0x3f>;
256 atmel,adc-vref = <3300>;
257 atmel,adc-startup-time = <40>;
258 atmel,adc-res = <8 10>;
259 atmel,adc-res-names = "lowres", "highres";
260 atmel,adc-use-res = "highres";
261
262 trigger@0 {
263 reg = <0>;
264 trigger-name = "timer-counter-0";
265 trigger-value = <0x1>;
266 };
267 trigger@1 {
268 reg = <1>;
269 trigger-name = "timer-counter-1";
270 trigger-value = <0x3>;
271 };
272
273 trigger@2 {
274 reg = <2>;
275 trigger-name = "timer-counter-2";
276 trigger-value = <0x5>;
277 };
278
279 trigger@3 {
280 reg = <3>;
281 trigger-name = "external";
282 trigger-value = <0x13>;
283 trigger-external;
284 };
285 };
286
287 usb0: gadget@fffd4000 {
288 #address-cells = <1>;
289 #size-cells = <0>;
290 compatible = "atmel,at91sam9rl-udc";
291 reg = <0x00600000 0x100000>,
292 <0xfffd4000 0x4000>;
293 interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
294 clocks = <&udphs_clk>, <&utmi>;
295 clock-names = "pclk", "hclk";
296 status = "disabled";
297
298 ep0 {
299 reg = <0>;
300 atmel,fifo-size = <64>;
301 atmel,nb-banks = <1>;
302 };
303
304 ep1 {
305 reg = <1>;
306 atmel,fifo-size = <1024>;
307 atmel,nb-banks = <2>;
308 atmel,can-dma;
309 atmel,can-isoc;
310 };
311
312 ep2 {
313 reg = <2>;
314 atmel,fifo-size = <1024>;
315 atmel,nb-banks = <2>;
316 atmel,can-dma;
317 atmel,can-isoc;
318 };
319
320 ep3 {
321 reg = <3>;
322 atmel,fifo-size = <1024>;
323 atmel,nb-banks = <3>;
324 atmel,can-dma;
325 };
326
327 ep4 {
328 reg = <4>;
329 atmel,fifo-size = <1024>;
330 atmel,nb-banks = <3>;
331 atmel,can-dma;
332 };
333
334 ep5 {
335 reg = <5>;
336 atmel,fifo-size = <1024>;
337 atmel,nb-banks = <3>;
338 atmel,can-dma;
339 atmel,can-isoc;
340 };
341
342 ep6 {
343 reg = <6>;
344 atmel,fifo-size = <1024>;
345 atmel,nb-banks = <3>;
346 atmel,can-dma;
347 atmel,can-isoc;
348 };
349 };
350
203 ramc0: ramc@ffffea00 { 351 ramc0: ramc@ffffea00 {
204 compatible = "atmel,at91sam9260-sdramc"; 352 compatible = "atmel,at91sam9260-sdramc";
205 reg = <0xffffea00 0x200>; 353 reg = <0xffffea00 0x200>;
@@ -238,6 +386,44 @@
238 <0x003fffff 0x0001ff3c>; /* pioD */ 386 <0x003fffff 0x0001ff3c>; /* pioD */
239 387
240 /* shared pinctrl settings */ 388 /* shared pinctrl settings */
389 adc0 {
390 pinctrl_adc0_ts: adc0_ts-0 {
391 atmel,pins =
392 <AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE>,
393 <AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE>,
394 <AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_NONE>,
395 <AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE>;
396 };
397
398 pinctrl_adc0_ad0: adc0_ad0-0 {
399 atmel,pins = <AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE>;
400 };
401
402 pinctrl_adc0_ad1: adc0_ad1-0 {
403 atmel,pins = <AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE>;
404 };
405
406 pinctrl_adc0_ad2: adc0_ad2-0 {
407 atmel,pins = <AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_NONE>;
408 };
409
410 pinctrl_adc0_ad3: adc0_ad3-0 {
411 atmel,pins = <AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE>;
412 };
413
414 pinctrl_adc0_ad4: adc0_ad4-0 {
415 atmel,pins = <AT91_PIOD 6 AT91_PERIPH_A AT91_PINCTRL_NONE>;
416 };
417
418 pinctrl_adc0_ad5: adc0_ad5-0 {
419 atmel,pins = <AT91_PIOD 7 AT91_PERIPH_A AT91_PINCTRL_NONE>;
420 };
421
422 pinctrl_adc0_adtrg: adc0_adtrg-0 {
423 atmel,pins = <AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE>;
424 };
425 };
426
241 dbgu { 427 dbgu {
242 pinctrl_dbgu: dbgu-0 { 428 pinctrl_dbgu: dbgu-0 {
243 atmel,pins = 429 atmel,pins =
@@ -246,6 +432,33 @@
246 }; 432 };
247 }; 433 };
248 434
435 fb {
436 pinctrl_fb: fb-0 {
437 atmel,pins =
438 <AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE>,
439 <AT91_PIOC 3 AT91_PERIPH_A AT91_PINCTRL_NONE>,
440 <AT91_PIOC 5 AT91_PERIPH_A AT91_PINCTRL_NONE>,
441 <AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE>,
442 <AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE>,
443 <AT91_PIOC 9 AT91_PERIPH_B AT91_PINCTRL_NONE>,
444 <AT91_PIOC 10 AT91_PERIPH_B AT91_PINCTRL_NONE>,
445 <AT91_PIOC 11 AT91_PERIPH_B AT91_PINCTRL_NONE>,
446 <AT91_PIOC 12 AT91_PERIPH_B AT91_PINCTRL_NONE>,
447 <AT91_PIOC 13 AT91_PERIPH_B AT91_PINCTRL_NONE>,
448 <AT91_PIOC 15 AT91_PERIPH_B AT91_PINCTRL_NONE>,
449 <AT91_PIOC 16 AT91_PERIPH_B AT91_PINCTRL_NONE>,
450 <AT91_PIOC 17 AT91_PERIPH_B AT91_PINCTRL_NONE>,
451 <AT91_PIOC 18 AT91_PERIPH_B AT91_PINCTRL_NONE>,
452 <AT91_PIOC 19 AT91_PERIPH_B AT91_PINCTRL_NONE>,
453 <AT91_PIOC 20 AT91_PERIPH_B AT91_PINCTRL_NONE>,
454 <AT91_PIOC 21 AT91_PERIPH_B AT91_PINCTRL_NONE>,
455 <AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_NONE>,
456 <AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_NONE>,
457 <AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE>,
458 <AT91_PIOC 25 AT91_PERIPH_B AT91_PINCTRL_NONE>;
459 };
460 };
461
249 i2c_gpio0 { 462 i2c_gpio0 {
250 pinctrl_i2c_gpio0: i2c_gpio0-0 { 463 pinctrl_i2c_gpio0: i2c_gpio0-0 {
251 atmel,pins = 464 atmel,pins =
@@ -307,6 +520,61 @@
307 }; 520 };
308 }; 521 };
309 522
523 pwm0 {
524 pinctrl_pwm0_pwm0_0: pwm0_pwm0-0 {
525 atmel,pins = <AT91_PIOB 8 AT91_PERIPH_B AT91_PINCTRL_NONE>;
526 };
527
528 pinctrl_pwm0_pwm0_1: pwm0_pwm0-1 {
529 atmel,pins = <AT91_PIOC 2 AT91_PERIPH_B AT91_PINCTRL_NONE>;
530 };
531
532 pinctrl_pwm0_pwm0_2: pwm0_pwm0-2 {
533 atmel,pins = <AT91_PIOD 14 AT91_PERIPH_B AT91_PINCTRL_NONE>;
534 };
535
536 pinctrl_pwm0_pwm1_0: pwm0_pwm1-0 {
537 atmel,pins = <AT91_PIOB 9 AT91_PERIPH_B AT91_PINCTRL_NONE>;
538 };
539
540 pinctrl_pwm0_pwm1_1: pwm0_pwm1-1 {
541 atmel,pins = <AT91_PIOC 3 AT91_PERIPH_B AT91_PINCTRL_NONE>;
542 };
543
544 pinctrl_pwm0_pwm1_2: pwm0_pwm1-2 {
545 atmel,pins = <AT91_PIOD 15 AT91_PERIPH_B AT91_PINCTRL_NONE>;
546 };
547
548 pinctrl_pwm0_pwm2_0: pwm0_pwm2-0 {
549 atmel,pins = <AT91_PIOD 5 AT91_PERIPH_B AT91_PINCTRL_NONE>;
550 };
551
552 pinctrl_pwm0_pwm2_1: pwm0_pwm2-1 {
553 atmel,pins = <AT91_PIOD 12 AT91_PERIPH_A AT91_PINCTRL_NONE>;
554 };
555
556 pinctrl_pwm0_pwm2_2: pwm0_pwm2-2 {
557 atmel,pins = <AT91_PIOD 16 AT91_PERIPH_B AT91_PINCTRL_NONE>;
558 };
559
560 pinctrl_pwm0_pwm3_0: pwm0_pwm3-0 {
561 atmel,pins = <AT91_PIOD 8 AT91_PERIPH_B AT91_PINCTRL_NONE>;
562 };
563
564 pinctrl_pwm0_pwm3_1: pwm0_pwm3-1 {
565 atmel,pins = <AT91_PIOD 18 AT91_PERIPH_A AT91_PINCTRL_NONE>;
566 };
567 };
568
569 spi0 {
570 pinctrl_spi0: spi0-0 {
571 atmel,pins =
572 <AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE>,
573 <AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE>,
574 <AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE>;
575 };
576 };
577
310 ssc0 { 578 ssc0 {
311 pinctrl_ssc0_tx: ssc0_tx-0 { 579 pinctrl_ssc0_tx: ssc0_tx-0 {
312 atmel,pins = 580 atmel,pins =
@@ -339,15 +607,6 @@
339 }; 607 };
340 }; 608 };
341 609
342 spi0 {
343 pinctrl_spi0: spi0-0 {
344 atmel,pins =
345 <AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE>,
346 <AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE>,
347 <AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE>;
348 };
349 };
350
351 tcb0 { 610 tcb0 {
352 pinctrl_tcb0_tclk0: tcb0_tclk0-0 { 611 pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
353 atmel,pins = <AT91_PIOA 3 AT91_PERIPH_B AT91_PINCTRL_NONE>; 612 atmel,pins = <AT91_PIOA 3 AT91_PERIPH_B AT91_PINCTRL_NONE>;
@@ -548,17 +807,11 @@
548 #size-cells = <0>; 807 #size-cells = <0>;
549 #interrupt-cells = <1>; 808 #interrupt-cells = <1>;
550 809
551 clk32k: slck {
552 compatible = "fixed-clock";
553 #clock-cells = <0>;
554 clock-frequency = <32768>;
555 };
556
557 main: mainck { 810 main: mainck {
558 compatible = "atmel,at91rm9200-clk-main"; 811 compatible = "atmel,at91rm9200-clk-main";
559 #clock-cells = <0>; 812 #clock-cells = <0>;
560 interrupts-extended = <&pmc AT91_PMC_MOSCS>; 813 interrupts-extended = <&pmc AT91_PMC_MOSCS>;
561 clocks = <&clk32k>; 814 clocks = <&main_xtal>;
562 }; 815 };
563 816
564 plla: pllack { 817 plla: pllack {
@@ -568,8 +821,9 @@
568 clocks = <&main>; 821 clocks = <&main>;
569 reg = <0>; 822 reg = <0>;
570 atmel,clk-input-range = <1000000 32000000>; 823 atmel,clk-input-range = <1000000 32000000>;
571 #atmel,pll-clk-output-range-cells = <4>; 824 #atmel,pll-clk-output-range-cells = <3>;
572 atmel,pll-clk-output-ranges = <80000000 200000000 190000000 240000000>; 825 atmel,pll-clk-output-ranges = <80000000 200000000 0>,
826 <190000000 240000000 2>;
573 }; 827 };
574 828
575 utmi: utmick { 829 utmi: utmick {
@@ -586,7 +840,7 @@
586 interrupts-extended = <&pmc AT91_PMC_MCKRDY>; 840 interrupts-extended = <&pmc AT91_PMC_MCKRDY>;
587 clocks = <&clk32k>, <&main>, <&plla>, <&utmi>; 841 clocks = <&clk32k>, <&main>, <&plla>, <&utmi>;
588 atmel,clk-output-range = <0 94000000>; 842 atmel,clk-output-range = <0 94000000>;
589 atmel,clk-divisors = <1 2 4 3>; 843 atmel,clk-divisors = <1 2 4 0>;
590 }; 844 };
591 845
592 prog: progck { 846 prog: progck {
@@ -769,6 +1023,32 @@
769 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; 1023 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
770 status = "disabled"; 1024 status = "disabled";
771 }; 1025 };
1026
1027 sckc@fffffd50 {
1028 compatible = "atmel,at91sam9x5-sckc";
1029 reg = <0xfffffd50 0x4>;
1030
1031 slow_osc: slow_osc {
1032 compatible = "atmel,at91sam9x5-clk-slow-osc";
1033 #clock-cells = <0>;
1034 atmel,startup-time-usec = <1200000>;
1035 clocks = <&slow_xtal>;
1036 };
1037
1038 slow_rc_osc: slow_rc_osc {
1039 compatible = "atmel,at91sam9x5-clk-slow-rc-osc";
1040 #clock-cells = <0>;
1041 atmel,startup-time-usec = <75>;
1042 clock-frequency = <32768>;
1043 clock-accuracy = <50000000>;
1044 };
1045
1046 clk32k: slck {
1047 compatible = "atmel,at91sam9x5-clk-slow";
1048 #clock-cells = <0>;
1049 clocks = <&slow_rc_osc &slow_osc>;
1050 };
1051 };
772 }; 1052 };
773 }; 1053 };
774 1054
diff --git a/arch/arm/boot/dts/at91sam9rlek.dts b/arch/arm/boot/dts/at91sam9rlek.dts
index cddb37825fad..d4a010e40fe3 100644
--- a/arch/arm/boot/dts/at91sam9rlek.dts
+++ b/arch/arm/boot/dts/at91sam9rlek.dts
@@ -20,6 +20,15 @@
20 reg = <0x20000000 0x4000000>; 20 reg = <0x20000000 0x4000000>;
21 }; 21 };
22 22
23
24 slow_xtal {
25 clock-frequency = <32768>;
26 };
27
28 main_xtal {
29 clock-frequency = <12000000>;
30 };
31
23 clocks { 32 clocks {
24 #address-cells = <1>; 33 #address-cells = <1>;
25 #size-cells = <1>; 34 #size-cells = <1>;
@@ -32,6 +41,37 @@
32 }; 41 };
33 42
34 ahb { 43 ahb {
44 fb0: fb@00500000 {
45 display = <&display0>;
46 status = "okay";
47
48 display0: display {
49 bits-per-pixel = <16>;
50 atmel,lcdcon-backlight;
51 atmel,dmacon = <0x1>;
52 atmel,lcdcon2 = <0x80008002>;
53 atmel,guard-time = <1>;
54 atmel,lcd-wiring-mode = "RGB";
55
56 display-timings {
57 native-mode = <&timing0>;
58 timing0: timing0 {
59 clock-frequency = <4965000>;
60 hactive = <240>;
61 vactive = <320>;
62 hback-porch = <1>;
63 hfront-porch = <33>;
64 vback-porch = <1>;
65 vfront-porch = <0>;
66 hsync-len = <5>;
67 vsync-len = <1>;
68 hsync-active = <1>;
69 vsync-active = <1>;
70 };
71 };
72 };
73 };
74
35 nand0: nand@40000000 { 75 nand0: nand@40000000 {
36 nand-bus-width = <8>; 76 nand-bus-width = <8>;
37 nand-ecc-mode = "soft"; 77 nand-ecc-mode = "soft";
@@ -92,6 +132,43 @@
92 status = "okay"; 132 status = "okay";
93 }; 133 };
94 134
135 adc0: adc@fffd0000 {
136 pinctrl-names = "default";
137 pinctrl-0 = <
138 &pinctrl_adc0_ad0
139 &pinctrl_adc0_ad1
140 &pinctrl_adc0_ad2
141 &pinctrl_adc0_ad3
142 &pinctrl_adc0_ad4
143 &pinctrl_adc0_ad5
144 &pinctrl_adc0_adtrg>;
145 atmel,adc-ts-wires = <4>;
146 status = "okay";
147 };
148
149 usb0: gadget@fffd4000 {
150 atmel,vbus-gpio = <&pioA 8 GPIO_ACTIVE_HIGH>;
151 status = "okay";
152 };
153
154 spi0: spi@fffcc000 {
155 status = "okay";
156 cs-gpios = <&pioA 28 0>, <0>, <0>, <0>;
157 mtd_dataflash@0 {
158 compatible = "atmel,at45", "atmel,dataflash";
159 spi-max-frequency = <15000000>;
160 reg = <0>;
161 };
162 };
163
164 pwm0: pwm@fffc8000 {
165 status = "okay";
166
167 pinctrl-names = "default";
168 pinctrl-0 = <&pinctrl_pwm0_pwm1_2>,
169 <&pinctrl_pwm0_pwm2_2>;
170 };
171
95 dbgu: serial@fffff200 { 172 dbgu: serial@fffff200 {
96 status = "okay"; 173 status = "okay";
97 }; 174 };
@@ -117,18 +194,24 @@
117 }; 194 };
118 }; 195 };
119 196
120 leds { 197 pwmleds {
121 compatible = "gpio-leds"; 198 compatible = "pwm-leds";
122 199
123 ds1 { 200 ds1 {
124 label = "ds1"; 201 label = "ds1";
125 gpios = <&pioD 15 GPIO_ACTIVE_LOW>; 202 pwms = <&pwm0 1 5000 PWM_POLARITY_INVERTED>;
203 max-brightness = <255>;
126 }; 204 };
127 205
128 ds2 { 206 ds2 {
129 label = "ds2"; 207 label = "ds2";
130 gpios = <&pioD 16 GPIO_ACTIVE_LOW>; 208 pwms = <&pwm0 2 5000 PWM_POLARITY_INVERTED>;
209 max-brightness = <255>;
131 }; 210 };
211 };
212
213 leds {
214 compatible = "gpio-leds";
132 215
133 ds3 { 216 ds3 {
134 label = "ds3"; 217 label = "ds3";
@@ -154,4 +237,12 @@
154 gpio-key,wakeup; 237 gpio-key,wakeup;
155 }; 238 };
156 }; 239 };
240
241 i2c@0 {
242 status = "okay";
243 };
244
245 i2c@1 {
246 status = "okay";
247 };
157}; 248};
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
index fc13c9240da8..1a57298636a5 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -14,6 +14,7 @@
14#include <dt-bindings/pinctrl/at91.h> 14#include <dt-bindings/pinctrl/at91.h>
15#include <dt-bindings/interrupt-controller/irq.h> 15#include <dt-bindings/interrupt-controller/irq.h>
16#include <dt-bindings/gpio/gpio.h> 16#include <dt-bindings/gpio/gpio.h>
17#include <dt-bindings/clock/at91.h>
17 18
18/ { 19/ {
19 model = "Atmel AT91SAM9x5 family SoC"; 20 model = "Atmel AT91SAM9x5 family SoC";
@@ -51,6 +52,24 @@
51 reg = <0x20000000 0x10000000>; 52 reg = <0x20000000 0x10000000>;
52 }; 53 };
53 54
55 slow_xtal: slow_xtal {
56 compatible = "fixed-clock";
57 #clock-cells = <0>;
58 clock-frequency = <0>;
59 };
60
61 main_xtal: main_xtal {
62 compatible = "fixed-clock";
63 #clock-cells = <0>;
64 clock-frequency = <0>;
65 };
66
67 adc_op_clk: adc_op_clk{
68 compatible = "fixed-clock";
69 #clock-cells = <0>;
70 clock-frequency = <5000000>;
71 };
72
54 ahb { 73 ahb {
55 compatible = "simple-bus"; 74 compatible = "simple-bus";
56 #address-cells = <1>; 75 #address-cells = <1>;
@@ -77,8 +96,272 @@
77 }; 96 };
78 97
79 pmc: pmc@fffffc00 { 98 pmc: pmc@fffffc00 {
80 compatible = "atmel,at91rm9200-pmc"; 99 compatible = "atmel,at91sam9x5-pmc";
81 reg = <0xfffffc00 0x100>; 100 reg = <0xfffffc00 0x100>;
101 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
102 interrupt-controller;
103 #address-cells = <1>;
104 #size-cells = <0>;
105 #interrupt-cells = <1>;
106
107 main_rc_osc: main_rc_osc {
108 compatible = "atmel,at91sam9x5-clk-main-rc-osc";
109 #clock-cells = <0>;
110 interrupts-extended = <&pmc AT91_PMC_MOSCRCS>;
111 clock-frequency = <12000000>;
112 clock-accuracy = <50000000>;
113 };
114
115 main_osc: main_osc {
116 compatible = "atmel,at91rm9200-clk-main-osc";
117 #clock-cells = <0>;
118 interrupts-extended = <&pmc AT91_PMC_MOSCS>;
119 clocks = <&main_xtal>;
120 };
121
122 main: mainck {
123 compatible = "atmel,at91sam9x5-clk-main";
124 #clock-cells = <0>;
125 interrupts-extended = <&pmc AT91_PMC_MOSCSELS>;
126 clocks = <&main_rc_osc>, <&main_osc>;
127 };
128
129 plla: pllack {
130 compatible = "atmel,at91rm9200-clk-pll";
131 #clock-cells = <0>;
132 interrupts-extended = <&pmc AT91_PMC_LOCKA>;
133 clocks = <&main>;
134 reg = <0>;
135 atmel,clk-input-range = <2000000 32000000>;
136 #atmel,pll-clk-output-range-cells = <4>;
137 atmel,pll-clk-output-ranges = <745000000 800000000 0 0
138 695000000 750000000 1 0
139 645000000 700000000 2 0
140 595000000 650000000 3 0
141 545000000 600000000 0 1
142 495000000 555000000 1 1
143 445000000 500000000 1 2
144 400000000 450000000 1 3>;
145 };
146
147 plladiv: plladivck {
148 compatible = "atmel,at91sam9x5-clk-plldiv";
149 #clock-cells = <0>;
150 clocks = <&plla>;
151 };
152
153 utmi: utmick {
154 compatible = "atmel,at91sam9x5-clk-utmi";
155 #clock-cells = <0>;
156 interrupts-extended = <&pmc AT91_PMC_LOCKU>;
157 clocks = <&main>;
158 };
159
160 mck: masterck {
161 compatible = "atmel,at91sam9x5-clk-master";
162 #clock-cells = <0>;
163 interrupts-extended = <&pmc AT91_PMC_MCKRDY>;
164 clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>;
165 atmel,clk-output-range = <0 133333333>;
166 atmel,clk-divisors = <1 2 4 3>;
167 atmel,master-clk-have-div3-pres;
168 };
169
170 usb: usbck {
171 compatible = "atmel,at91sam9x5-clk-usb";
172 #clock-cells = <0>;
173 clocks = <&plladiv>, <&utmi>;
174 };
175
176 prog: progck {
177 compatible = "atmel,at91sam9x5-clk-programmable";
178 #address-cells = <1>;
179 #size-cells = <0>;
180 interrupt-parent = <&pmc>;
181 clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>, <&mck>;
182
183 prog0: prog0 {
184 #clock-cells = <0>;
185 reg = <0>;
186 interrupts = <AT91_PMC_PCKRDY(0)>;
187 };
188
189 prog1: prog1 {
190 #clock-cells = <0>;
191 reg = <1>;
192 interrupts = <AT91_PMC_PCKRDY(1)>;
193 };
194 };
195
196 smd: smdclk {
197 compatible = "atmel,at91sam9x5-clk-smd";
198 #clock-cells = <0>;
199 clocks = <&plladiv>, <&utmi>;
200 };
201
202 systemck {
203 compatible = "atmel,at91rm9200-clk-system";
204 #address-cells = <1>;
205 #size-cells = <0>;
206
207 ddrck: ddrck {
208 #clock-cells = <0>;
209 reg = <2>;
210 clocks = <&mck>;
211 };
212
213 smdck: smdck {
214 #clock-cells = <0>;
215 reg = <4>;
216 clocks = <&smd>;
217 };
218
219 uhpck: uhpck {
220 #clock-cells = <0>;
221 reg = <6>;
222 clocks = <&usb>;
223 };
224
225 udpck: udpck {
226 #clock-cells = <0>;
227 reg = <7>;
228 clocks = <&usb>;
229 };
230
231 pck0: pck0 {
232 #clock-cells = <0>;
233 reg = <8>;
234 clocks = <&prog0>;
235 };
236
237 pck1: pck1 {
238 #clock-cells = <0>;
239 reg = <9>;
240 clocks = <&prog1>;
241 };
242 };
243
244 periphck {
245 compatible = "atmel,at91sam9x5-clk-peripheral";
246 #address-cells = <1>;
247 #size-cells = <0>;
248 clocks = <&mck>;
249
250 pioAB_clk: pioAB_clk {
251 #clock-cells = <0>;
252 reg = <2>;
253 };
254
255 pioCD_clk: pioCD_clk {
256 #clock-cells = <0>;
257 reg = <3>;
258 };
259
260 smd_clk: smd_clk {
261 #clock-cells = <0>;
262 reg = <4>;
263 };
264
265 usart0_clk: usart0_clk {
266 #clock-cells = <0>;
267 reg = <5>;
268 };
269
270 usart1_clk: usart1_clk {
271 #clock-cells = <0>;
272 reg = <6>;
273 };
274
275 usart2_clk: usart2_clk {
276 #clock-cells = <0>;
277 reg = <7>;
278 };
279
280 twi0_clk: twi0_clk {
281 reg = <9>;
282 #clock-cells = <0>;
283 };
284
285 twi1_clk: twi1_clk {
286 #clock-cells = <0>;
287 reg = <10>;
288 };
289
290 twi2_clk: twi2_clk {
291 #clock-cells = <0>;
292 reg = <11>;
293 };
294
295 mci0_clk: mci0_clk {
296 #clock-cells = <0>;
297 reg = <12>;
298 };
299
300 spi0_clk: spi0_clk {
301 #clock-cells = <0>;
302 reg = <13>;
303 };
304
305 spi1_clk: spi1_clk {
306 #clock-cells = <0>;
307 reg = <14>;
308 };
309
310 uart0_clk: uart0_clk {
311 #clock-cells = <0>;
312 reg = <15>;
313 };
314
315 uart1_clk: uart1_clk {
316 #clock-cells = <0>;
317 reg = <16>;
318 };
319
320 tcb0_clk: tcb0_clk {
321 #clock-cells = <0>;
322 reg = <17>;
323 };
324
325 pwm_clk: pwm_clk {
326 #clock-cells = <0>;
327 reg = <18>;
328 };
329
330 adc_clk: adc_clk {
331 #clock-cells = <0>;
332 reg = <19>;
333 };
334
335 dma0_clk: dma0_clk {
336 #clock-cells = <0>;
337 reg = <20>;
338 };
339
340 dma1_clk: dma1_clk {
341 #clock-cells = <0>;
342 reg = <21>;
343 };
344
345 uhphs_clk: uhphs_clk {
346 #clock-cells = <0>;
347 reg = <22>;
348 };
349
350 udphs_clk: udphs_clk {
351 #clock-cells = <0>;
352 reg = <23>;
353 };
354
355 mci1_clk: mci1_clk {
356 #clock-cells = <0>;
357 reg = <26>;
358 };
359
360 ssc0_clk: ssc0_clk {
361 #clock-cells = <0>;
362 reg = <28>;
363 };
364 };
82 }; 365 };
83 366
84 rstc@fffffe00 { 367 rstc@fffffe00 {
@@ -95,18 +378,47 @@
95 compatible = "atmel,at91sam9260-pit"; 378 compatible = "atmel,at91sam9260-pit";
96 reg = <0xfffffe30 0xf>; 379 reg = <0xfffffe30 0xf>;
97 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; 380 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
381 clocks = <&mck>;
382 };
383
384 sckc@fffffe50 {
385 compatible = "atmel,at91sam9x5-sckc";
386 reg = <0xfffffe50 0x4>;
387
388 slow_osc: slow_osc {
389 compatible = "atmel,at91sam9x5-clk-slow-osc";
390 #clock-cells = <0>;
391 clocks = <&slow_xtal>;
392 };
393
394 slow_rc_osc: slow_rc_osc {
395 compatible = "atmel,at91sam9x5-clk-slow-rc-osc";
396 #clock-cells = <0>;
397 clock-frequency = <32768>;
398 clock-accuracy = <50000000>;
399 };
400
401 clk32k: slck {
402 compatible = "atmel,at91sam9x5-clk-slow";
403 #clock-cells = <0>;
404 clocks = <&slow_rc_osc>, <&slow_osc>;
405 };
98 }; 406 };
99 407
100 tcb0: timer@f8008000 { 408 tcb0: timer@f8008000 {
101 compatible = "atmel,at91sam9x5-tcb"; 409 compatible = "atmel,at91sam9x5-tcb";
102 reg = <0xf8008000 0x100>; 410 reg = <0xf8008000 0x100>;
103 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>; 411 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>;
412 clocks = <&tcb0_clk>;
413 clock-names = "t0_clk";
104 }; 414 };
105 415
106 tcb1: timer@f800c000 { 416 tcb1: timer@f800c000 {
107 compatible = "atmel,at91sam9x5-tcb"; 417 compatible = "atmel,at91sam9x5-tcb";
108 reg = <0xf800c000 0x100>; 418 reg = <0xf800c000 0x100>;
109 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>; 419 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>;
420 clocks = <&tcb0_clk>;
421 clock-names = "t0_clk";
110 }; 422 };
111 423
112 dma0: dma-controller@ffffec00 { 424 dma0: dma-controller@ffffec00 {
@@ -114,6 +426,8 @@
114 reg = <0xffffec00 0x200>; 426 reg = <0xffffec00 0x200>;
115 interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>; 427 interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
116 #dma-cells = <2>; 428 #dma-cells = <2>;
429 clocks = <&dma0_clk>;
430 clock-names = "dma_clk";
117 }; 431 };
118 432
119 dma1: dma-controller@ffffee00 { 433 dma1: dma-controller@ffffee00 {
@@ -121,6 +435,8 @@
121 reg = <0xffffee00 0x200>; 435 reg = <0xffffee00 0x200>;
122 interrupts = <21 IRQ_TYPE_LEVEL_HIGH 0>; 436 interrupts = <21 IRQ_TYPE_LEVEL_HIGH 0>;
123 #dma-cells = <2>; 437 #dma-cells = <2>;
438 clocks = <&dma1_clk>;
439 clock-names = "dma_clk";
124 }; 440 };
125 441
126 pinctrl@fffff400 { 442 pinctrl@fffff400 {
@@ -453,6 +769,7 @@
453 gpio-controller; 769 gpio-controller;
454 interrupt-controller; 770 interrupt-controller;
455 #interrupt-cells = <2>; 771 #interrupt-cells = <2>;
772 clocks = <&pioAB_clk>;
456 }; 773 };
457 774
458 pioB: gpio@fffff600 { 775 pioB: gpio@fffff600 {
@@ -464,6 +781,7 @@
464 #gpio-lines = <19>; 781 #gpio-lines = <19>;
465 interrupt-controller; 782 interrupt-controller;
466 #interrupt-cells = <2>; 783 #interrupt-cells = <2>;
784 clocks = <&pioAB_clk>;
467 }; 785 };
468 786
469 pioC: gpio@fffff800 { 787 pioC: gpio@fffff800 {
@@ -474,6 +792,7 @@
474 gpio-controller; 792 gpio-controller;
475 interrupt-controller; 793 interrupt-controller;
476 #interrupt-cells = <2>; 794 #interrupt-cells = <2>;
795 clocks = <&pioCD_clk>;
477 }; 796 };
478 797
479 pioD: gpio@fffffa00 { 798 pioD: gpio@fffffa00 {
@@ -485,6 +804,7 @@
485 #gpio-lines = <22>; 804 #gpio-lines = <22>;
486 interrupt-controller; 805 interrupt-controller;
487 #interrupt-cells = <2>; 806 #interrupt-cells = <2>;
807 clocks = <&pioCD_clk>;
488 }; 808 };
489 }; 809 };
490 810
@@ -497,6 +817,8 @@
497 dma-names = "tx", "rx"; 817 dma-names = "tx", "rx";
498 pinctrl-names = "default"; 818 pinctrl-names = "default";
499 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; 819 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
820 clocks = <&ssc0_clk>;
821 clock-names = "pclk";
500 status = "disabled"; 822 status = "disabled";
501 }; 823 };
502 824
@@ -507,6 +829,8 @@
507 dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(0)>; 829 dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(0)>;
508 dma-names = "rxtx"; 830 dma-names = "rxtx";
509 pinctrl-names = "default"; 831 pinctrl-names = "default";
832 clocks = <&mci0_clk>;
833 clock-names = "mci_clk";
510 #address-cells = <1>; 834 #address-cells = <1>;
511 #size-cells = <0>; 835 #size-cells = <0>;
512 status = "disabled"; 836 status = "disabled";
@@ -519,6 +843,8 @@
519 dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(0)>; 843 dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(0)>;
520 dma-names = "rxtx"; 844 dma-names = "rxtx";
521 pinctrl-names = "default"; 845 pinctrl-names = "default";
846 clocks = <&mci1_clk>;
847 clock-names = "mci_clk";
522 #address-cells = <1>; 848 #address-cells = <1>;
523 #size-cells = <0>; 849 #size-cells = <0>;
524 status = "disabled"; 850 status = "disabled";
@@ -530,6 +856,8 @@
530 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; 856 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
531 pinctrl-names = "default"; 857 pinctrl-names = "default";
532 pinctrl-0 = <&pinctrl_dbgu>; 858 pinctrl-0 = <&pinctrl_dbgu>;
859 clocks = <&mck>;
860 clock-names = "usart";
533 status = "disabled"; 861 status = "disabled";
534 }; 862 };
535 863
@@ -539,6 +867,8 @@
539 interrupts = <5 IRQ_TYPE_LEVEL_HIGH 5>; 867 interrupts = <5 IRQ_TYPE_LEVEL_HIGH 5>;
540 pinctrl-names = "default"; 868 pinctrl-names = "default";
541 pinctrl-0 = <&pinctrl_usart0>; 869 pinctrl-0 = <&pinctrl_usart0>;
870 clocks = <&usart0_clk>;
871 clock-names = "usart";
542 status = "disabled"; 872 status = "disabled";
543 }; 873 };
544 874
@@ -548,6 +878,8 @@
548 interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>; 878 interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
549 pinctrl-names = "default"; 879 pinctrl-names = "default";
550 pinctrl-0 = <&pinctrl_usart1>; 880 pinctrl-0 = <&pinctrl_usart1>;
881 clocks = <&usart1_clk>;
882 clock-names = "usart";
551 status = "disabled"; 883 status = "disabled";
552 }; 884 };
553 885
@@ -557,6 +889,8 @@
557 interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>; 889 interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
558 pinctrl-names = "default"; 890 pinctrl-names = "default";
559 pinctrl-0 = <&pinctrl_usart2>; 891 pinctrl-0 = <&pinctrl_usart2>;
892 clocks = <&usart2_clk>;
893 clock-names = "usart";
560 status = "disabled"; 894 status = "disabled";
561 }; 895 };
562 896
@@ -571,6 +905,7 @@
571 #size-cells = <0>; 905 #size-cells = <0>;
572 pinctrl-names = "default"; 906 pinctrl-names = "default";
573 pinctrl-0 = <&pinctrl_i2c0>; 907 pinctrl-0 = <&pinctrl_i2c0>;
908 clocks = <&twi0_clk>;
574 status = "disabled"; 909 status = "disabled";
575 }; 910 };
576 911
@@ -585,6 +920,7 @@
585 #size-cells = <0>; 920 #size-cells = <0>;
586 pinctrl-names = "default"; 921 pinctrl-names = "default";
587 pinctrl-0 = <&pinctrl_i2c1>; 922 pinctrl-0 = <&pinctrl_i2c1>;
923 clocks = <&twi1_clk>;
588 status = "disabled"; 924 status = "disabled";
589 }; 925 };
590 926
@@ -599,6 +935,7 @@
599 #size-cells = <0>; 935 #size-cells = <0>;
600 pinctrl-names = "default"; 936 pinctrl-names = "default";
601 pinctrl-0 = <&pinctrl_i2c2>; 937 pinctrl-0 = <&pinctrl_i2c2>;
938 clocks = <&twi2_clk>;
602 status = "disabled"; 939 status = "disabled";
603 }; 940 };
604 941
@@ -608,6 +945,8 @@
608 interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>; 945 interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>;
609 pinctrl-names = "default"; 946 pinctrl-names = "default";
610 pinctrl-0 = <&pinctrl_uart0>; 947 pinctrl-0 = <&pinctrl_uart0>;
948 clocks = <&uart0_clk>;
949 clock-names = "usart";
611 status = "disabled"; 950 status = "disabled";
612 }; 951 };
613 952
@@ -617,6 +956,8 @@
617 interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>; 956 interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
618 pinctrl-names = "default"; 957 pinctrl-names = "default";
619 pinctrl-0 = <&pinctrl_uart1>; 958 pinctrl-0 = <&pinctrl_uart1>;
959 clocks = <&uart1_clk>;
960 clock-names = "usart";
620 status = "disabled"; 961 status = "disabled";
621 }; 962 };
622 963
@@ -626,6 +967,9 @@
626 compatible = "atmel,at91sam9260-adc"; 967 compatible = "atmel,at91sam9260-adc";
627 reg = <0xf804c000 0x100>; 968 reg = <0xf804c000 0x100>;
628 interrupts = <19 IRQ_TYPE_LEVEL_HIGH 0>; 969 interrupts = <19 IRQ_TYPE_LEVEL_HIGH 0>;
970 clocks = <&adc_clk>,
971 <&adc_op_clk>;
972 clock-names = "adc_clk", "adc_op_clk";
629 atmel,adc-use-external-triggers; 973 atmel,adc-use-external-triggers;
630 atmel,adc-channels-used = <0xffff>; 974 atmel,adc-channels-used = <0xffff>;
631 atmel,adc-vref = <3300>; 975 atmel,adc-vref = <3300>;
@@ -673,6 +1017,8 @@
673 dma-names = "tx", "rx"; 1017 dma-names = "tx", "rx";
674 pinctrl-names = "default"; 1018 pinctrl-names = "default";
675 pinctrl-0 = <&pinctrl_spi0>; 1019 pinctrl-0 = <&pinctrl_spi0>;
1020 clocks = <&spi0_clk>;
1021 clock-names = "spi_clk";
676 status = "disabled"; 1022 status = "disabled";
677 }; 1023 };
678 1024
@@ -687,6 +1033,8 @@
687 dma-names = "tx", "rx"; 1033 dma-names = "tx", "rx";
688 pinctrl-names = "default"; 1034 pinctrl-names = "default";
689 pinctrl-0 = <&pinctrl_spi1>; 1035 pinctrl-0 = <&pinctrl_spi1>;
1036 clocks = <&spi1_clk>;
1037 clock-names = "spi_clk";
690 status = "disabled"; 1038 status = "disabled";
691 }; 1039 };
692 1040
@@ -805,6 +1153,9 @@
805 compatible = "atmel,at91rm9200-ohci", "usb-ohci"; 1153 compatible = "atmel,at91rm9200-ohci", "usb-ohci";
806 reg = <0x00600000 0x100000>; 1154 reg = <0x00600000 0x100000>;
807 interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>; 1155 interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
1156 clocks = <&usb>, <&uhphs_clk>, <&udphs_clk>,
1157 <&uhpck>;
1158 clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck";
808 status = "disabled"; 1159 status = "disabled";
809 }; 1160 };
810 1161
@@ -812,6 +1163,8 @@
812 compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; 1163 compatible = "atmel,at91sam9g45-ehci", "usb-ehci";
813 reg = <0x00700000 0x100000>; 1164 reg = <0x00700000 0x100000>;
814 interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>; 1165 interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
1166 clocks = <&usb>, <&uhphs_clk>, <&uhpck>;
1167 clock-names = "usb_clk", "ehci_clk", "uhpck";
815 status = "disabled"; 1168 status = "disabled";
816 }; 1169 };
817 }; 1170 };
diff --git a/arch/arm/boot/dts/at91sam9x5_can.dtsi b/arch/arm/boot/dts/at91sam9x5_can.dtsi
new file mode 100644
index 000000000000..f44ab7702a12
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9x5_can.dtsi
@@ -0,0 +1,31 @@
1/*
2 * at91sam9x5_macb0.dtsi - Device Tree Include file for AT91SAM9x5 SoC with 1
3 * Ethernet interface.
4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
6 *
7 * Licensed under GPLv2.
8 */
9
10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h>
12
13/ {
14 ahb {
15 apb {
16 pmc: pmc@fffffc00 {
17 periphck {
18 can0_clk: can0_clk {
19 #clock-cells = <0>;
20 reg = <29>;
21 };
22
23 can1_clk: can1_clk {
24 #clock-cells = <0>;
25 reg = <30>;
26 };
27 };
28 };
29 };
30 };
31};
diff --git a/arch/arm/boot/dts/at91sam9x5_isi.dtsi b/arch/arm/boot/dts/at91sam9x5_isi.dtsi
new file mode 100644
index 000000000000..98bc877a68ef
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9x5_isi.dtsi
@@ -0,0 +1,26 @@
1/*
2 * at91sam9x5_isi.dtsi - Device Tree Include file for AT91SAM9x5 SoC with an
3 * Image Sensor Interface.
4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
6 *
7 * Licensed under GPLv2.
8 */
9
10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h>
12
13/ {
14 ahb {
15 apb {
16 pmc: pmc@fffffc00 {
17 periphck {
18 isi_clk: isi_clk {
19 #clock-cells = <0>;
20 reg = <25>;
21 };
22 };
23 };
24 };
25 };
26};
diff --git a/arch/arm/boot/dts/at91sam9x5_lcd.dtsi b/arch/arm/boot/dts/at91sam9x5_lcd.dtsi
new file mode 100644
index 000000000000..485302e8233d
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9x5_lcd.dtsi
@@ -0,0 +1,26 @@
1/*
2 * at91sam9x5_lcd.dtsi - Device Tree Include file for AT91SAM9x5 SoC with an
3 * LCD controller.
4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
6 *
7 * Licensed under GPLv2.
8 */
9
10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h>
12
13/ {
14 ahb {
15 apb {
16 pmc: pmc@fffffc00 {
17 periphck {
18 lcdc_clk: lcdc_clk {
19 #clock-cells = <0>;
20 reg = <25>;
21 };
22 };
23 };
24 };
25 };
26};
diff --git a/arch/arm/boot/dts/at91sam9x5_macb0.dtsi b/arch/arm/boot/dts/at91sam9x5_macb0.dtsi
index 55731ffba764..57e89d1d0325 100644
--- a/arch/arm/boot/dts/at91sam9x5_macb0.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5_macb0.dtsi
@@ -43,12 +43,23 @@
43 }; 43 };
44 }; 44 };
45 45
46 pmc: pmc@fffffc00 {
47 periphck {
48 macb0_clk: macb0_clk {
49 #clock-cells = <0>;
50 reg = <24>;
51 };
52 };
53 };
54
46 macb0: ethernet@f802c000 { 55 macb0: ethernet@f802c000 {
47 compatible = "cdns,at32ap7000-macb", "cdns,macb"; 56 compatible = "cdns,at32ap7000-macb", "cdns,macb";
48 reg = <0xf802c000 0x100>; 57 reg = <0xf802c000 0x100>;
49 interrupts = <24 IRQ_TYPE_LEVEL_HIGH 3>; 58 interrupts = <24 IRQ_TYPE_LEVEL_HIGH 3>;
50 pinctrl-names = "default"; 59 pinctrl-names = "default";
51 pinctrl-0 = <&pinctrl_macb0_rmii>; 60 pinctrl-0 = <&pinctrl_macb0_rmii>;
61 clocks = <&macb0_clk>, <&macb0_clk>;
62 clock-names = "hclk", "pclk";
52 status = "disabled"; 63 status = "disabled";
53 }; 64 };
54 }; 65 };
diff --git a/arch/arm/boot/dts/at91sam9x5_macb1.dtsi b/arch/arm/boot/dts/at91sam9x5_macb1.dtsi
index 77425a627a94..663676c02861 100644
--- a/arch/arm/boot/dts/at91sam9x5_macb1.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5_macb1.dtsi
@@ -31,12 +31,23 @@
31 }; 31 };
32 }; 32 };
33 33
34 pmc: pmc@fffffc00 {
35 periphck {
36 macb1_clk: macb1_clk {
37 #clock-cells = <0>;
38 reg = <27>;
39 };
40 };
41 };
42
34 macb1: ethernet@f8030000 { 43 macb1: ethernet@f8030000 {
35 compatible = "cdns,at32ap7000-macb", "cdns,macb"; 44 compatible = "cdns,at32ap7000-macb", "cdns,macb";
36 reg = <0xf8030000 0x100>; 45 reg = <0xf8030000 0x100>;
37 interrupts = <27 IRQ_TYPE_LEVEL_HIGH 3>; 46 interrupts = <27 IRQ_TYPE_LEVEL_HIGH 3>;
38 pinctrl-names = "default"; 47 pinctrl-names = "default";
39 pinctrl-0 = <&pinctrl_macb1_rmii>; 48 pinctrl-0 = <&pinctrl_macb1_rmii>;
49 clocks = <&macb1_clk>, <&macb1_clk>;
50 clock-names = "hclk", "pclk";
40 status = "disabled"; 51 status = "disabled";
41 }; 52 };
42 }; 53 };
diff --git a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
index 6801106fa1f8..140217a54384 100644
--- a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
@@ -42,12 +42,23 @@
42 }; 42 };
43 }; 43 };
44 44
45 pmc: pmc@fffffc00 {
46 periphck {
47 usart3_clk: usart3_clk {
48 #clock-cells = <0>;
49 reg = <8>;
50 };
51 };
52 };
53
45 usart3: serial@f8028000 { 54 usart3: serial@f8028000 {
46 compatible = "atmel,at91sam9260-usart"; 55 compatible = "atmel,at91sam9260-usart";
47 reg = <0xf8028000 0x200>; 56 reg = <0xf8028000 0x200>;
48 interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>; 57 interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
49 pinctrl-names = "default"; 58 pinctrl-names = "default";
50 pinctrl-0 = <&pinctrl_usart3>; 59 pinctrl-0 = <&pinctrl_usart3>;
60 clocks = <&usart3_clk>;
61 clock-names = "usart";
51 status = "disabled"; 62 status = "disabled";
52 }; 63 };
53 }; 64 };
diff --git a/arch/arm/boot/dts/at91sam9x5cm.dtsi b/arch/arm/boot/dts/at91sam9x5cm.dtsi
index 4a5ee5cc115a..8413e21192eb 100644
--- a/arch/arm/boot/dts/at91sam9x5cm.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5cm.dtsi
@@ -23,6 +23,14 @@
23 }; 23 };
24 }; 24 };
25 25
26 slow_xtal {
27 clock-frequency = <32768>;
28 };
29
30 main_xtal {
31 clock-frequency = <12000000>;
32 };
33
26 ahb { 34 ahb {
27 apb { 35 apb {
28 pinctrl@fffff400 { 36 pinctrl@fffff400 {
diff --git a/arch/arm/boot/dts/atlas6.dtsi b/arch/arm/boot/dts/atlas6.dtsi
index 9d72674049d6..bb22842a0826 100644
--- a/arch/arm/boot/dts/atlas6.dtsi
+++ b/arch/arm/boot/dts/atlas6.dtsi
@@ -39,6 +39,11 @@
39 }; 39 };
40 }; 40 };
41 41
42 arm-pmu {
43 compatible = "arm,cortex-a9-pmu";
44 interrupts = <29>;
45 };
46
42 axi { 47 axi {
43 compatible = "simple-bus"; 48 compatible = "simple-bus";
44 #address-cells = <1>; 49 #address-cells = <1>;
@@ -167,6 +172,7 @@
167 compatible = "sirf,prima2-dspif"; 172 compatible = "sirf,prima2-dspif";
168 reg = <0xa8000000 0x10000>; 173 reg = <0xa8000000 0x10000>;
169 interrupts = <9>; 174 interrupts = <9>;
175 resets = <&rstc 1>;
170 }; 176 };
171 177
172 gps@a8010000 { 178 gps@a8010000 {
@@ -174,6 +180,7 @@
174 reg = <0xa8010000 0x10000>; 180 reg = <0xa8010000 0x10000>;
175 interrupts = <7>; 181 interrupts = <7>;
176 clocks = <&clks 9>; 182 clocks = <&clks 9>;
183 resets = <&rstc 2>;
177 }; 184 };
178 185
179 dsp@a9000000 { 186 dsp@a9000000 {
@@ -181,6 +188,7 @@
181 reg = <0xa9000000 0x1000000>; 188 reg = <0xa9000000 0x1000000>;
182 interrupts = <8>; 189 interrupts = <8>;
183 clocks = <&clks 8>; 190 clocks = <&clks 8>;
191 resets = <&rstc 0>;
184 }; 192 };
185 }; 193 };
186 194
@@ -195,6 +203,7 @@
195 compatible = "sirf,prima2-tick"; 203 compatible = "sirf,prima2-tick";
196 reg = <0xb0020000 0x1000>; 204 reg = <0xb0020000 0x1000>;
197 interrupts = <0>; 205 interrupts = <0>;
206 clocks = <&clks 11>;
198 }; 207 };
199 208
200 nand@b0030000 { 209 nand@b0030000 {
@@ -297,9 +306,9 @@
297 reg = <0xb00d0000 0x10000>; 306 reg = <0xb00d0000 0x10000>;
298 interrupts = <15>; 307 interrupts = <15>;
299 sirf,spi-num-chipselects = <1>; 308 sirf,spi-num-chipselects = <1>;
300 cs-gpios = <&gpio 0 0>; 309 dmas = <&dmac1 9>,
301 sirf,spi-dma-rx-channel = <25>; 310 <&dmac1 4>;
302 sirf,spi-dma-tx-channel = <20>; 311 dma-names = "rx", "tx";
303 #address-cells = <1>; 312 #address-cells = <1>;
304 #size-cells = <0>; 313 #size-cells = <0>;
305 clocks = <&clks 19>; 314 clocks = <&clks 19>;
@@ -312,8 +321,9 @@
312 reg = <0xb0170000 0x10000>; 321 reg = <0xb0170000 0x10000>;
313 interrupts = <16>; 322 interrupts = <16>;
314 sirf,spi-num-chipselects = <1>; 323 sirf,spi-num-chipselects = <1>;
315 sirf,spi-dma-rx-channel = <12>; 324 dmas = <&dmac0 12>,
316 sirf,spi-dma-tx-channel = <13>; 325 <&dmac0 13>;
326 dma-names = "rx", "tx";
317 #address-cells = <1>; 327 #address-cells = <1>;
318 #size-cells = <0>; 328 #size-cells = <0>;
319 clocks = <&clks 20>; 329 clocks = <&clks 20>;
@@ -554,6 +564,18 @@
554 sirf,function = "usp0_uart_nostreamctrl"; 564 sirf,function = "usp0_uart_nostreamctrl";
555 }; 565 };
556 }; 566 };
567 usp0_only_utfs_pins_a: usp0@2 {
568 usp0 {
569 sirf,pins = "usp0_only_utfs_grp";
570 sirf,function = "usp0_only_utfs";
571 };
572 };
573 usp0_only_urfs_pins_a: usp0@3 {
574 usp0 {
575 sirf,pins = "usp0_only_urfs_grp";
576 sirf,function = "usp0_only_urfs";
577 };
578 };
557 usp1_pins_a: usp1@0 { 579 usp1_pins_a: usp1@0 {
558 usp1 { 580 usp1 {
559 sirf,pins = "usp1grp"; 581 sirf,pins = "usp1grp";
diff --git a/arch/arm/boot/dts/axm5516-amarillo.dts b/arch/arm/boot/dts/axm5516-amarillo.dts
new file mode 100644
index 000000000000..a9d60471d9ff
--- /dev/null
+++ b/arch/arm/boot/dts/axm5516-amarillo.dts
@@ -0,0 +1,51 @@
1/*
2 * arch/arm/boot/dts/axm5516-amarillo.dts
3 *
4 * Copyright (C) 2013 LSI
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
12/dts-v1/;
13
14/memreserve/ 0x00000000 0x00400000;
15
16#include "axm55xx.dtsi"
17#include "axm5516-cpus.dtsi"
18
19/ {
20 model = "Amarillo AXM5516";
21 compatible = "lsi,axm5516-amarillo", "lsi,axm5516";
22
23 memory {
24 device_type = "memory";
25 reg = <0 0x00000000 0x02 0x00000000>;
26 };
27};
28
29&serial0 {
30 status = "okay";
31};
32
33&serial1 {
34 status = "okay";
35};
36
37&serial2 {
38 status = "okay";
39};
40
41&serial3 {
42 status = "okay";
43};
44
45&gpio0 {
46 status = "okay";
47};
48
49&gpio1 {
50 status = "okay";
51};
diff --git a/arch/arm/boot/dts/axm5516-cpus.dtsi b/arch/arm/boot/dts/axm5516-cpus.dtsi
new file mode 100644
index 000000000000..b85f360cb125
--- /dev/null
+++ b/arch/arm/boot/dts/axm5516-cpus.dtsi
@@ -0,0 +1,204 @@
1/*
2 * arch/arm/boot/dts/axm5516-cpus.dtsi
3 *
4 * Copyright (C) 2013 LSI
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
12/ {
13 cpus {
14 #address-cells = <1>;
15 #size-cells = <0>;
16
17 cpu-map {
18 cluster0 {
19 core0 {
20 cpu = <&CPU0>;
21 };
22 core1 {
23 cpu = <&CPU1>;
24 };
25 core2 {
26 cpu = <&CPU2>;
27 };
28 core3 {
29 cpu = <&CPU3>;
30 };
31 };
32 cluster1 {
33 core0 {
34 cpu = <&CPU4>;
35 };
36 core1 {
37 cpu = <&CPU5>;
38 };
39 core2 {
40 cpu = <&CPU6>;
41 };
42 core3 {
43 cpu = <&CPU7>;
44 };
45 };
46 cluster2 {
47 core0 {
48 cpu = <&CPU8>;
49 };
50 core1 {
51 cpu = <&CPU9>;
52 };
53 core2 {
54 cpu = <&CPU10>;
55 };
56 core3 {
57 cpu = <&CPU11>;
58 };
59 };
60 cluster3 {
61 core0 {
62 cpu = <&CPU12>;
63 };
64 core1 {
65 cpu = <&CPU13>;
66 };
67 core2 {
68 cpu = <&CPU14>;
69 };
70 core3 {
71 cpu = <&CPU15>;
72 };
73 };
74 };
75
76 CPU0: cpu@0 {
77 device_type = "cpu";
78 compatible = "arm,cortex-a15";
79 reg = <0x00>;
80 clock-frequency= <1400000000>;
81 cpu-release-addr = <0>; // Fixed by the boot loader
82 };
83
84 CPU1: cpu@1 {
85 device_type = "cpu";
86 compatible = "arm,cortex-a15";
87 reg = <0x01>;
88 clock-frequency= <1400000000>;
89 cpu-release-addr = <0>; // Fixed by the boot loader
90 };
91
92 CPU2: cpu@2 {
93 device_type = "cpu";
94 compatible = "arm,cortex-a15";
95 reg = <0x02>;
96 clock-frequency= <1400000000>;
97 cpu-release-addr = <0>; // Fixed by the boot loader
98 };
99
100 CPU3: cpu@3 {
101 device_type = "cpu";
102 compatible = "arm,cortex-a15";
103 reg = <0x03>;
104 clock-frequency= <1400000000>;
105 cpu-release-addr = <0>; // Fixed by the boot loader
106 };
107
108 CPU4: cpu@100 {
109 device_type = "cpu";
110 compatible = "arm,cortex-a15";
111 reg = <0x100>;
112 clock-frequency= <1400000000>;
113 cpu-release-addr = <0>; // Fixed by the boot loader
114 };
115
116 CPU5: cpu@101 {
117 device_type = "cpu";
118 compatible = "arm,cortex-a15";
119 reg = <0x101>;
120 clock-frequency= <1400000000>;
121 cpu-release-addr = <0>; // Fixed by the boot loader
122 };
123
124 CPU6: cpu@102 {
125 device_type = "cpu";
126 compatible = "arm,cortex-a15";
127 reg = <0x102>;
128 clock-frequency= <1400000000>;
129 cpu-release-addr = <0>; // Fixed by the boot loader
130 };
131
132 CPU7: cpu@103 {
133 device_type = "cpu";
134 compatible = "arm,cortex-a15";
135 reg = <0x103>;
136 clock-frequency= <1400000000>;
137 cpu-release-addr = <0>; // Fixed by the boot loader
138 };
139
140 CPU8: cpu@200 {
141 device_type = "cpu";
142 compatible = "arm,cortex-a15";
143 reg = <0x200>;
144 clock-frequency= <1400000000>;
145 cpu-release-addr = <0>; // Fixed by the boot loader
146 };
147
148 CPU9: cpu@201 {
149 device_type = "cpu";
150 compatible = "arm,cortex-a15";
151 reg = <0x201>;
152 clock-frequency= <1400000000>;
153 cpu-release-addr = <0>; // Fixed by the boot loader
154 };
155
156 CPU10: cpu@202 {
157 device_type = "cpu";
158 compatible = "arm,cortex-a15";
159 reg = <0x202>;
160 clock-frequency= <1400000000>;
161 cpu-release-addr = <0>; // Fixed by the boot loader
162 };
163
164 CPU11: cpu@203 {
165 device_type = "cpu";
166 compatible = "arm,cortex-a15";
167 reg = <0x203>;
168 clock-frequency= <1400000000>;
169 cpu-release-addr = <0>; // Fixed by the boot loader
170 };
171
172 CPU12: cpu@300 {
173 device_type = "cpu";
174 compatible = "arm,cortex-a15";
175 reg = <0x300>;
176 clock-frequency= <1400000000>;
177 cpu-release-addr = <0>; // Fixed by the boot loader
178 };
179
180 CPU13: cpu@301 {
181 device_type = "cpu";
182 compatible = "arm,cortex-a15";
183 reg = <0x301>;
184 clock-frequency= <1400000000>;
185 cpu-release-addr = <0>; // Fixed by the boot loader
186 };
187
188 CPU14: cpu@302 {
189 device_type = "cpu";
190 compatible = "arm,cortex-a15";
191 reg = <0x302>;
192 clock-frequency= <1400000000>;
193 cpu-release-addr = <0>; // Fixed by the boot loader
194 };
195
196 CPU15: cpu@303 {
197 device_type = "cpu";
198 compatible = "arm,cortex-a15";
199 reg = <0x303>;
200 clock-frequency= <1400000000>;
201 cpu-release-addr = <0>; // Fixed by the boot loader
202 };
203 };
204};
diff --git a/arch/arm/boot/dts/axm55xx.dtsi b/arch/arm/boot/dts/axm55xx.dtsi
new file mode 100644
index 000000000000..ea288f0a1d39
--- /dev/null
+++ b/arch/arm/boot/dts/axm55xx.dtsi
@@ -0,0 +1,204 @@
1/*
2 * arch/arm/boot/dts/axm55xx.dtsi
3 *
4 * Copyright (C) 2013 LSI
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
12#include <dt-bindings/interrupt-controller/arm-gic.h>
13#include <dt-bindings/clock/lsi,axm5516-clks.h>
14
15#include "skeleton64.dtsi"
16
17/ {
18 interrupt-parent = <&gic>;
19
20 aliases {
21 serial0 = &serial0;
22 serial1 = &serial1;
23 serial2 = &serial2;
24 serial3 = &serial3;
25 timer = &timer0;
26 };
27
28 clocks {
29 compatible = "simple-bus";
30 #address-cells = <2>;
31 #size-cells = <2>;
32 ranges;
33
34 clk_ref0: clk_ref0 {
35 compatible = "fixed-clock";
36 #clock-cells = <0>;
37 clock-frequency = <125000000>;
38 };
39
40 clk_ref1: clk_ref1 {
41 compatible = "fixed-clock";
42 #clock-cells = <0>;
43 clock-frequency = <125000000>;
44 };
45
46 clk_ref2: clk_ref2 {
47 compatible = "fixed-clock";
48 #clock-cells = <0>;
49 clock-frequency = <125000000>;
50 };
51
52 clks: clock-controller@2010020000 {
53 compatible = "lsi,axm5516-clks";
54 #clock-cells = <1>;
55 reg = <0x20 0x10020000 0 0x20000>;
56 };
57 };
58
59 gic: interrupt-controller@2001001000 {
60 compatible = "arm,cortex-a15-gic";
61 #interrupt-cells = <3>;
62 #address-cells = <0>;
63 interrupt-controller;
64 reg = <0x20 0x01001000 0 0x1000>,
65 <0x20 0x01002000 0 0x1000>,
66 <0x20 0x01004000 0 0x2000>,
67 <0x20 0x01006000 0 0x2000>;
68 interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) |
69 IRQ_TYPE_LEVEL_HIGH)>;
70 };
71
72 timer {
73 compatible = "arm,armv7-timer";
74 interrupts =
75 <GIC_PPI 13
76 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
77 <GIC_PPI 14
78 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
79 <GIC_PPI 11
80 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
81 <GIC_PPI 10
82 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
83 };
84
85
86 pmu {
87 compatible = "arm,cortex-a15-pmu";
88 interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
89 };
90
91 soc {
92 compatible = "simple-bus";
93 device_type = "soc";
94 #address-cells = <2>;
95 #size-cells = <2>;
96 interrupt-parent = <&gic>;
97 ranges;
98
99 syscon: syscon@2010030000 {
100 compatible = "lsi,axxia-syscon", "syscon";
101 reg = <0x20 0x10030000 0 0x2000>;
102 };
103
104 reset: reset@2010031000 {
105 compatible = "lsi,axm55xx-reset";
106 syscon = <&syscon>;
107 };
108
109 amba {
110 compatible = "arm,amba-bus";
111 #address-cells = <2>;
112 #size-cells = <2>;
113 ranges;
114
115 serial0: uart@2010080000 {
116 compatible = "arm,pl011", "arm,primecell";
117 reg = <0x20 0x10080000 0 0x1000>;
118 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
119 clocks = <&clks AXXIA_CLK_PER>;
120 clock-names = "apb_pclk";
121 status = "disabled";
122 };
123
124 serial1: uart@2010081000 {
125 compatible = "arm,pl011", "arm,primecell";
126 reg = <0x20 0x10081000 0 0x1000>;
127 interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
128 clocks = <&clks AXXIA_CLK_PER>;
129 clock-names = "apb_pclk";
130 status = "disabled";
131 };
132
133 serial2: uart@2010082000 {
134 compatible = "arm,pl011", "arm,primecell";
135 reg = <0x20 0x10082000 0 0x1000>;
136 interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
137 clocks = <&clks AXXIA_CLK_PER>;
138 clock-names = "apb_pclk";
139 status = "disabled";
140 };
141
142 serial3: uart@2010083000 {
143 compatible = "arm,pl011", "arm,primecell";
144 reg = <0x20 0x10083000 0 0x1000>;
145 interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
146 clocks = <&clks AXXIA_CLK_PER>;
147 clock-names = "apb_pclk";
148 status = "disabled";
149 };
150
151 timer0: timer@2010091000 {
152 compatible = "arm,sp804", "arm,primecell";
153 reg = <0x20 0x10091000 0 0x1000>;
154 interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>,
155 <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>,
156 <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>,
157 <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
158 <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
159 <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>,
160 <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
161 <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>,
162 <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
163 clocks = <&clks AXXIA_CLK_PER>;
164 clock-names = "apb_pclk";
165 status = "okay";
166 };
167
168 gpio0: gpio@2010092000 {
169 #gpio-cells = <2>;
170 compatible = "arm,pl061", "arm,primecell";
171 gpio-controller;
172 reg = <0x20 0x10092000 0x00 0x1000>;
173 interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
174 <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
175 <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
176 <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
177 <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>,
178 <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
179 <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,
180 <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
181 clocks = <&clks AXXIA_CLK_PER>;
182 clock-names = "apb_pclk";
183 status = "disabled";
184 };
185
186 gpio1: gpio@2010093000 {
187 #gpio-cells = <2>;
188 compatible = "arm,pl061", "arm,primecell";
189 gpio-controller;
190 reg = <0x20 0x10093000 0x00 0x1000>;
191 interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
192 clocks = <&clks AXXIA_CLK_PER>;
193 clock-names = "apb_pclk";
194 status = "disabled";
195 };
196 };
197 };
198};
199
200/*
201 Local Variables:
202 mode: C
203 End:
204*/
diff --git a/arch/arm/boot/dts/bcm11351.dtsi b/arch/arm/boot/dts/bcm11351.dtsi
index 64d069bcc409..6b05ae6d476f 100644
--- a/arch/arm/boot/dts/bcm11351.dtsi
+++ b/arch/arm/boot/dts/bcm11351.dtsi
@@ -193,6 +193,14 @@
193 status = "disabled"; 193 status = "disabled";
194 }; 194 };
195 195
196 pwm: pwm@3e01a000 {
197 compatible = "brcm,bcm11351-pwm", "brcm,kona-pwm";
198 reg = <0x3e01a000 0xcc>;
199 clocks = <&slave_ccu BCM281XX_SLAVE_CCU_PWM>;
200 #pwm-cells = <3>;
201 status = "disabled";
202 };
203
196 clocks { 204 clocks {
197 #address-cells = <1>; 205 #address-cells = <1>;
198 #size-cells = <1>; 206 #size-cells = <1>;
diff --git a/arch/arm/boot/dts/bcm21664.dtsi b/arch/arm/boot/dts/bcm21664.dtsi
index 08a44d41b672..8b366822bb43 100644
--- a/arch/arm/boot/dts/bcm21664.dtsi
+++ b/arch/arm/boot/dts/bcm21664.dtsi
@@ -14,6 +14,8 @@
14#include <dt-bindings/interrupt-controller/arm-gic.h> 14#include <dt-bindings/interrupt-controller/arm-gic.h>
15#include <dt-bindings/interrupt-controller/irq.h> 15#include <dt-bindings/interrupt-controller/irq.h>
16 16
17#include "dt-bindings/clock/bcm21664.h"
18
17#include "skeleton.dtsi" 19#include "skeleton.dtsi"
18 20
19/ { 21/ {
@@ -43,7 +45,7 @@
43 compatible = "brcm,bcm21664-dw-apb-uart", "snps,dw-apb-uart"; 45 compatible = "brcm,bcm21664-dw-apb-uart", "snps,dw-apb-uart";
44 status = "disabled"; 46 status = "disabled";
45 reg = <0x3e000000 0x118>; 47 reg = <0x3e000000 0x118>;
46 clocks = <&uartb_clk>; 48 clocks = <&slave_ccu BCM21664_SLAVE_CCU_UARTB>;
47 interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; 49 interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
48 reg-shift = <2>; 50 reg-shift = <2>;
49 reg-io-width = <4>; 51 reg-io-width = <4>;
@@ -53,7 +55,7 @@
53 compatible = "brcm,bcm21664-dw-apb-uart", "snps,dw-apb-uart"; 55 compatible = "brcm,bcm21664-dw-apb-uart", "snps,dw-apb-uart";
54 status = "disabled"; 56 status = "disabled";
55 reg = <0x3e001000 0x118>; 57 reg = <0x3e001000 0x118>;
56 clocks = <&uartb2_clk>; 58 clocks = <&slave_ccu BCM21664_SLAVE_CCU_UARTB2>;
57 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>; 59 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
58 reg-shift = <2>; 60 reg-shift = <2>;
59 reg-io-width = <4>; 61 reg-io-width = <4>;
@@ -63,7 +65,7 @@
63 compatible = "brcm,bcm21664-dw-apb-uart", "snps,dw-apb-uart"; 65 compatible = "brcm,bcm21664-dw-apb-uart", "snps,dw-apb-uart";
64 status = "disabled"; 66 status = "disabled";
65 reg = <0x3e002000 0x118>; 67 reg = <0x3e002000 0x118>;
66 clocks = <&uartb3_clk>; 68 clocks = <&slave_ccu BCM21664_SLAVE_CCU_UARTB3>;
67 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; 69 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
68 reg-shift = <2>; 70 reg-shift = <2>;
69 reg-io-width = <4>; 71 reg-io-width = <4>;
@@ -85,7 +87,7 @@
85 compatible = "brcm,kona-timer"; 87 compatible = "brcm,kona-timer";
86 reg = <0x35006000 0x1c>; 88 reg = <0x35006000 0x1c>;
87 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; 89 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
88 clocks = <&hub_timer_clk>; 90 clocks = <&aon_ccu BCM21664_AON_CCU_HUB_TIMER>;
89 }; 91 };
90 92
91 gpio: gpio@35003000 { 93 gpio: gpio@35003000 {
@@ -106,7 +108,7 @@
106 compatible = "brcm,kona-sdhci"; 108 compatible = "brcm,kona-sdhci";
107 reg = <0x3f180000 0x801c>; 109 reg = <0x3f180000 0x801c>;
108 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>; 110 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
109 clocks = <&sdio1_clk>; 111 clocks = <&master_ccu BCM21664_MASTER_CCU_SDIO1>;
110 status = "disabled"; 112 status = "disabled";
111 }; 113 };
112 114
@@ -114,7 +116,7 @@
114 compatible = "brcm,kona-sdhci"; 116 compatible = "brcm,kona-sdhci";
115 reg = <0x3f190000 0x801c>; 117 reg = <0x3f190000 0x801c>;
116 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>; 118 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
117 clocks = <&sdio2_clk>; 119 clocks = <&master_ccu BCM21664_MASTER_CCU_SDIO2>;
118 status = "disabled"; 120 status = "disabled";
119 }; 121 };
120 122
@@ -122,7 +124,7 @@
122 compatible = "brcm,kona-sdhci"; 124 compatible = "brcm,kona-sdhci";
123 reg = <0x3f1a0000 0x801c>; 125 reg = <0x3f1a0000 0x801c>;
124 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; 126 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
125 clocks = <&sdio3_clk>; 127 clocks = <&master_ccu BCM21664_MASTER_CCU_SDIO3>;
126 status = "disabled"; 128 status = "disabled";
127 }; 129 };
128 130
@@ -130,7 +132,7 @@
130 compatible = "brcm,kona-sdhci"; 132 compatible = "brcm,kona-sdhci";
131 reg = <0x3f1b0000 0x801c>; 133 reg = <0x3f1b0000 0x801c>;
132 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; 134 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
133 clocks = <&sdio4_clk>; 135 clocks = <&master_ccu BCM21664_MASTER_CCU_SDIO4>;
134 status = "disabled"; 136 status = "disabled";
135 }; 137 };
136 138
@@ -140,7 +142,7 @@
140 interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>; 142 interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
141 #address-cells = <1>; 143 #address-cells = <1>;
142 #size-cells = <0>; 144 #size-cells = <0>;
143 clocks = <&bsc1_clk>; 145 clocks = <&slave_ccu BCM21664_SLAVE_CCU_BSC1>;
144 status = "disabled"; 146 status = "disabled";
145 }; 147 };
146 148
@@ -150,7 +152,7 @@
150 interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>; 152 interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
151 #address-cells = <1>; 153 #address-cells = <1>;
152 #size-cells = <0>; 154 #size-cells = <0>;
153 clocks = <&bsc2_clk>; 155 clocks = <&slave_ccu BCM21664_SLAVE_CCU_BSC2>;
154 status = "disabled"; 156 status = "disabled";
155 }; 157 };
156 158
@@ -160,7 +162,7 @@
160 interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>; 162 interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>;
161 #address-cells = <1>; 163 #address-cells = <1>;
162 #size-cells = <0>; 164 #size-cells = <0>;
163 clocks = <&bsc3_clk>; 165 clocks = <&slave_ccu BCM21664_SLAVE_CCU_BSC3>;
164 status = "disabled"; 166 status = "disabled";
165 }; 167 };
166 168
@@ -170,105 +172,149 @@
170 interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>; 172 interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
171 #address-cells = <1>; 173 #address-cells = <1>;
172 #size-cells = <0>; 174 #size-cells = <0>;
173 clocks = <&bsc4_clk>; 175 clocks = <&slave_ccu BCM21664_SLAVE_CCU_BSC4>;
174 status = "disabled"; 176 status = "disabled";
175 }; 177 };
176 178
177 clocks { 179 clocks {
178 bsc1_clk: bsc1 { 180 #address-cells = <1>;
179 compatible = "fixed-clock"; 181 #size-cells = <1>;
180 clock-frequency = <13000000>; 182 ranges;
181 #clock-cells = <0>;
182 };
183 183
184 bsc2_clk: bsc2 { 184 /*
185 compatible = "fixed-clock"; 185 * Fixed clocks are defined before CCUs whose
186 clock-frequency = <13000000>; 186 * clocks may depend on them.
187 */
188
189 ref_32k_clk: ref_32k {
187 #clock-cells = <0>; 190 #clock-cells = <0>;
191 compatible = "fixed-clock";
192 clock-frequency = <32768>;
188 }; 193 };
189 194
190 bsc3_clk: bsc3 { 195 bbl_32k_clk: bbl_32k {
191 compatible = "fixed-clock";
192 clock-frequency = <13000000>;
193 #clock-cells = <0>; 196 #clock-cells = <0>;
197 compatible = "fixed-clock";
198 clock-frequency = <32768>;
194 }; 199 };
195 200
196 bsc4_clk: bsc4 { 201 ref_13m_clk: ref_13m {
202 #clock-cells = <0>;
197 compatible = "fixed-clock"; 203 compatible = "fixed-clock";
198 clock-frequency = <13000000>; 204 clock-frequency = <13000000>;
199 #clock-cells = <0>;
200 }; 205 };
201 206
202 pmu_bsc_clk: pmu_bsc { 207 var_13m_clk: var_13m {
208 #clock-cells = <0>;
203 compatible = "fixed-clock"; 209 compatible = "fixed-clock";
204 clock-frequency = <13000000>; 210 clock-frequency = <13000000>;
205 #clock-cells = <0>;
206 }; 211 };
207 212
208 hub_timer_clk: hub_timer { 213 dft_19_5m_clk: dft_19_5m {
209 compatible = "fixed-clock";
210 clock-frequency = <32768>;
211 #clock-cells = <0>; 214 #clock-cells = <0>;
215 compatible = "fixed-clock";
216 clock-frequency = <19500000>;
212 }; 217 };
213 218
214 pwm_clk: pwm { 219 ref_crystal_clk: ref_crystal {
220 #clock-cells = <0>;
215 compatible = "fixed-clock"; 221 compatible = "fixed-clock";
216 clock-frequency = <26000000>; 222 clock-frequency = <26000000>;
217 #clock-cells = <0>;
218 }; 223 };
219 224
220 sdio1_clk: sdio1 { 225 ref_52m_clk: ref_52m {
221 compatible = "fixed-clock";
222 clock-frequency = <48000000>;
223 #clock-cells = <0>; 226 #clock-cells = <0>;
227 compatible = "fixed-clock";
228 clock-frequency = <52000000>;
224 }; 229 };
225 230
226 sdio2_clk: sdio2 { 231 var_52m_clk: var_52m {
227 compatible = "fixed-clock";
228 clock-frequency = <48000000>;
229 #clock-cells = <0>; 232 #clock-cells = <0>;
233 compatible = "fixed-clock";
234 clock-frequency = <52000000>;
230 }; 235 };
231 236
232 sdio3_clk: sdio3 { 237 usb_otg_ahb_clk: usb_otg_ahb {
233 compatible = "fixed-clock";
234 clock-frequency = <48000000>;
235 #clock-cells = <0>; 238 #clock-cells = <0>;
239 compatible = "fixed-clock";
240 clock-frequency = <52000000>;
236 }; 241 };
237 242
238 sdio4_clk: sdio4 { 243 ref_96m_clk: ref_96m {
239 compatible = "fixed-clock";
240 clock-frequency = <48000000>;
241 #clock-cells = <0>; 244 #clock-cells = <0>;
245 compatible = "fixed-clock";
246 clock-frequency = <96000000>;
242 }; 247 };
243 248
244 tmon_1m_clk: tmon_1m { 249 var_96m_clk: var_96m {
245 compatible = "fixed-clock";
246 clock-frequency = <1000000>;
247 #clock-cells = <0>; 250 #clock-cells = <0>;
251 compatible = "fixed-clock";
252 clock-frequency = <96000000>;
248 }; 253 };
249 254
250 uartb_clk: uartb { 255 ref_104m_clk: ref_104m {
251 compatible = "fixed-clock";
252 clock-frequency = <13000000>;
253 #clock-cells = <0>; 256 #clock-cells = <0>;
257 compatible = "fixed-clock";
258 clock-frequency = <104000000>;
254 }; 259 };
255 260
256 uartb2_clk: uartb2 { 261 var_104m_clk: var_104m {
257 compatible = "fixed-clock";
258 clock-frequency = <13000000>;
259 #clock-cells = <0>; 262 #clock-cells = <0>;
263 compatible = "fixed-clock";
264 clock-frequency = <104000000>;
260 }; 265 };
261 266
262 uartb3_clk: uartb3 { 267 ref_156m_clk: ref_156m {
263 compatible = "fixed-clock";
264 clock-frequency = <13000000>;
265 #clock-cells = <0>; 268 #clock-cells = <0>;
269 compatible = "fixed-clock";
270 clock-frequency = <156000000>;
266 }; 271 };
267 272
268 usb_otg_ahb_clk: usb_otg_ahb { 273 var_156m_clk: var_156m {
269 compatible = "fixed-clock";
270 clock-frequency = <52000000>;
271 #clock-cells = <0>; 274 #clock-cells = <0>;
275 compatible = "fixed-clock";
276 clock-frequency = <156000000>;
277 };
278
279 root_ccu: root_ccu {
280 compatible = BCM21664_DT_ROOT_CCU_COMPAT;
281 reg = <0x35001000 0x0f00>;
282 #clock-cells = <1>;
283 clock-output-names = "frac_1m";
284 };
285
286 aon_ccu: aon_ccu {
287 compatible = BCM21664_DT_AON_CCU_COMPAT;
288 reg = <0x35002000 0x0f00>;
289 #clock-cells = <1>;
290 clock-output-names = "hub_timer";
291 };
292
293 master_ccu: master_ccu {
294 compatible = BCM21664_DT_MASTER_CCU_COMPAT;
295 reg = <0x3f001000 0x0f00>;
296 #clock-cells = <1>;
297 clock-output-names = "sdio1",
298 "sdio2",
299 "sdio3",
300 "sdio4",
301 "sdio1_sleep",
302 "sdio2_sleep",
303 "sdio3_sleep",
304 "sdio4_sleep";
305 };
306
307 slave_ccu: slave_ccu {
308 compatible = BCM21664_DT_SLAVE_CCU_COMPAT;
309 reg = <0x3e011000 0x0f00>;
310 #clock-cells = <1>;
311 clock-output-names = "uartb",
312 "uartb2",
313 "uartb3",
314 "bsc1",
315 "bsc2",
316 "bsc3",
317 "bsc4";
272 }; 318 };
273 }; 319 };
274 320
diff --git a/arch/arm/boot/dts/bcm28155-ap.dts b/arch/arm/boot/dts/bcm28155-ap.dts
index af3da55eef49..9ce91dd60cb6 100644
--- a/arch/arm/boot/dts/bcm28155-ap.dts
+++ b/arch/arm/boot/dts/bcm28155-ap.dts
@@ -69,6 +69,10 @@
69 status = "okay"; 69 status = "okay";
70 }; 70 };
71 71
72 pwm: pwm@3e01a000 {
73 status = "okay";
74 };
75
72 usbotg: usb@3f120000 { 76 usbotg: usb@3f120000 {
73 vusb_d-supply = <&usbldo_reg>; 77 vusb_d-supply = <&usbldo_reg>;
74 vusb_a-supply = <&iosr1_reg>; 78 vusb_a-supply = <&iosr1_reg>;
diff --git a/arch/arm/boot/dts/bcm59056.dtsi b/arch/arm/boot/dts/bcm59056.dtsi
index dfadaaa89b05..066adfb10bd5 100644
--- a/arch/arm/boot/dts/bcm59056.dtsi
+++ b/arch/arm/boot/dts/bcm59056.dtsi
@@ -70,5 +70,26 @@
70 70
71 vsr_reg: vsr { 71 vsr_reg: vsr {
72 }; 72 };
73
74 gpldo1_reg: gpldo1 {
75 };
76
77 gpldo2_reg: gpldo2 {
78 };
79
80 gpldo3_reg: gpldo3 {
81 };
82
83 gpldo4_reg: gpldo4 {
84 };
85
86 gpldo5_reg: gpldo5 {
87 };
88
89 gpldo6_reg: gpldo6 {
90 };
91
92 vbus_reg: vbus {
93 };
73 }; 94 };
74}; 95};
diff --git a/arch/arm/boot/dts/berlin2.dtsi b/arch/arm/boot/dts/berlin2.dtsi
index 56a1af2f1052..2477dac4d643 100644
--- a/arch/arm/boot/dts/berlin2.dtsi
+++ b/arch/arm/boot/dts/berlin2.dtsi
@@ -12,6 +12,7 @@
12 */ 12 */
13 13
14#include "skeleton.dtsi" 14#include "skeleton.dtsi"
15#include <dt-bindings/clock/berlin2.h>
15#include <dt-bindings/interrupt-controller/arm-gic.h> 16#include <dt-bindings/interrupt-controller/arm-gic.h>
16 17
17/ { 18/ {
@@ -37,24 +38,10 @@
37 }; 38 };
38 }; 39 };
39 40
40 clocks { 41 refclk: oscillator {
41 smclk: sysmgr-clock { 42 compatible = "fixed-clock";
42 compatible = "fixed-clock"; 43 #clock-cells = <0>;
43 #clock-cells = <0>; 44 clock-frequency = <25000000>;
44 clock-frequency = <25000000>;
45 };
46
47 cfgclk: cfg-clock {
48 compatible = "fixed-clock";
49 #clock-cells = <0>;
50 clock-frequency = <100000000>;
51 };
52
53 sysclk: system-clock {
54 compatible = "fixed-clock";
55 #clock-cells = <0>;
56 clock-frequency = <400000000>;
57 };
58 }; 45 };
59 46
60 soc { 47 soc {
@@ -72,6 +59,11 @@
72 cache-level = <2>; 59 cache-level = <2>;
73 }; 60 };
74 61
62 scu: snoop-control-unit@ad0000 {
63 compatible = "arm,cortex-a9-scu";
64 reg = <0xad0000 0x58>;
65 };
66
75 gic: interrupt-controller@ad1000 { 67 gic: interrupt-controller@ad1000 {
76 compatible = "arm,cortex-a9-gic"; 68 compatible = "arm,cortex-a9-gic";
77 reg = <0xad1000 0x1000>, <0xad0100 0x0100>; 69 reg = <0xad1000 0x1000>, <0xad0100 0x0100>;
@@ -83,7 +75,7 @@
83 compatible = "arm,cortex-a9-twd-timer"; 75 compatible = "arm,cortex-a9-twd-timer";
84 reg = <0xad0600 0x20>; 76 reg = <0xad0600 0x20>;
85 interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>; 77 interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>;
86 clocks = <&sysclk>; 78 clocks = <&chip CLKID_TWD>;
87 }; 79 };
88 80
89 apb@e80000 { 81 apb@e80000 {
@@ -94,11 +86,83 @@
94 ranges = <0 0xe80000 0x10000>; 86 ranges = <0 0xe80000 0x10000>;
95 interrupt-parent = <&aic>; 87 interrupt-parent = <&aic>;
96 88
89 gpio0: gpio@0400 {
90 compatible = "snps,dw-apb-gpio";
91 reg = <0x0400 0x400>;
92 #address-cells = <1>;
93 #size-cells = <0>;
94
95 porta: gpio-port@0 {
96 compatible = "snps,dw-apb-gpio-port";
97 gpio-controller;
98 #gpio-cells = <2>;
99 snps,nr-gpios = <8>;
100 reg = <0>;
101 interrupt-controller;
102 #interrupt-cells = <2>;
103 interrupts = <0>;
104 };
105 };
106
107 gpio1: gpio@0800 {
108 compatible = "snps,dw-apb-gpio";
109 reg = <0x0800 0x400>;
110 #address-cells = <1>;
111 #size-cells = <0>;
112
113 portb: gpio-port@1 {
114 compatible = "snps,dw-apb-gpio-port";
115 gpio-controller;
116 #gpio-cells = <2>;
117 snps,nr-gpios = <8>;
118 reg = <0>;
119 interrupt-controller;
120 #interrupt-cells = <2>;
121 interrupts = <1>;
122 };
123 };
124
125 gpio2: gpio@0c00 {
126 compatible = "snps,dw-apb-gpio";
127 reg = <0x0c00 0x400>;
128 #address-cells = <1>;
129 #size-cells = <0>;
130
131 portc: gpio-port@2 {
132 compatible = "snps,dw-apb-gpio-port";
133 gpio-controller;
134 #gpio-cells = <2>;
135 snps,nr-gpios = <8>;
136 reg = <0>;
137 interrupt-controller;
138 #interrupt-cells = <2>;
139 interrupts = <2>;
140 };
141 };
142
143 gpio3: gpio@1000 {
144 compatible = "snps,dw-apb-gpio";
145 reg = <0x1000 0x400>;
146 #address-cells = <1>;
147 #size-cells = <0>;
148
149 portd: gpio-port@3 {
150 compatible = "snps,dw-apb-gpio-port";
151 gpio-controller;
152 #gpio-cells = <2>;
153 snps,nr-gpios = <8>;
154 reg = <0>;
155 interrupt-controller;
156 #interrupt-cells = <2>;
157 interrupts = <3>;
158 };
159 };
160
97 timer0: timer@2c00 { 161 timer0: timer@2c00 {
98 compatible = "snps,dw-apb-timer"; 162 compatible = "snps,dw-apb-timer";
99 reg = <0x2c00 0x14>; 163 reg = <0x2c00 0x14>;
100 interrupts = <8>; 164 interrupts = <8>;
101 clocks = <&cfgclk>; 165 clocks = <&chip CLKID_CFG>;
102 clock-names = "timer"; 166 clock-names = "timer";
103 status = "okay"; 167 status = "okay";
104 }; 168 };
@@ -107,7 +171,7 @@
107 compatible = "snps,dw-apb-timer"; 171 compatible = "snps,dw-apb-timer";
108 reg = <0x2c14 0x14>; 172 reg = <0x2c14 0x14>;
109 interrupts = <9>; 173 interrupts = <9>;
110 clocks = <&cfgclk>; 174 clocks = <&chip CLKID_CFG>;
111 clock-names = "timer"; 175 clock-names = "timer";
112 status = "okay"; 176 status = "okay";
113 }; 177 };
@@ -116,7 +180,7 @@
116 compatible = "snps,dw-apb-timer"; 180 compatible = "snps,dw-apb-timer";
117 reg = <0x2c28 0x14>; 181 reg = <0x2c28 0x14>;
118 interrupts = <10>; 182 interrupts = <10>;
119 clocks = <&cfgclk>; 183 clocks = <&chip CLKID_CFG>;
120 clock-names = "timer"; 184 clock-names = "timer";
121 status = "disabled"; 185 status = "disabled";
122 }; 186 };
@@ -125,7 +189,7 @@
125 compatible = "snps,dw-apb-timer"; 189 compatible = "snps,dw-apb-timer";
126 reg = <0x2c3c 0x14>; 190 reg = <0x2c3c 0x14>;
127 interrupts = <11>; 191 interrupts = <11>;
128 clocks = <&cfgclk>; 192 clocks = <&chip CLKID_CFG>;
129 clock-names = "timer"; 193 clock-names = "timer";
130 status = "disabled"; 194 status = "disabled";
131 }; 195 };
@@ -134,7 +198,7 @@
134 compatible = "snps,dw-apb-timer"; 198 compatible = "snps,dw-apb-timer";
135 reg = <0x2c50 0x14>; 199 reg = <0x2c50 0x14>;
136 interrupts = <12>; 200 interrupts = <12>;
137 clocks = <&cfgclk>; 201 clocks = <&chip CLKID_CFG>;
138 clock-names = "timer"; 202 clock-names = "timer";
139 status = "disabled"; 203 status = "disabled";
140 }; 204 };
@@ -143,7 +207,7 @@
143 compatible = "snps,dw-apb-timer"; 207 compatible = "snps,dw-apb-timer";
144 reg = <0x2c64 0x14>; 208 reg = <0x2c64 0x14>;
145 interrupts = <13>; 209 interrupts = <13>;
146 clocks = <&cfgclk>; 210 clocks = <&chip CLKID_CFG>;
147 clock-names = "timer"; 211 clock-names = "timer";
148 status = "disabled"; 212 status = "disabled";
149 }; 213 };
@@ -152,7 +216,7 @@
152 compatible = "snps,dw-apb-timer"; 216 compatible = "snps,dw-apb-timer";
153 reg = <0x2c78 0x14>; 217 reg = <0x2c78 0x14>;
154 interrupts = <14>; 218 interrupts = <14>;
155 clocks = <&cfgclk>; 219 clocks = <&chip CLKID_CFG>;
156 clock-names = "timer"; 220 clock-names = "timer";
157 status = "disabled"; 221 status = "disabled";
158 }; 222 };
@@ -161,7 +225,7 @@
161 compatible = "snps,dw-apb-timer"; 225 compatible = "snps,dw-apb-timer";
162 reg = <0x2c8c 0x14>; 226 reg = <0x2c8c 0x14>;
163 interrupts = <15>; 227 interrupts = <15>;
164 clocks = <&cfgclk>; 228 clocks = <&chip CLKID_CFG>;
165 clock-names = "timer"; 229 clock-names = "timer";
166 status = "disabled"; 230 status = "disabled";
167 }; 231 };
@@ -176,6 +240,14 @@
176 }; 240 };
177 }; 241 };
178 242
243 chip: chip-control@ea0000 {
244 compatible = "marvell,berlin2-chip-ctrl";
245 #clock-cells = <1>;
246 reg = <0xea0000 0x400>;
247 clocks = <&refclk>;
248 clock-names = "refclk";
249 };
250
179 apb@fc0000 { 251 apb@fc0000 {
180 compatible = "simple-bus"; 252 compatible = "simple-bus";
181 #address-cells = <1>; 253 #address-cells = <1>;
@@ -184,13 +256,48 @@
184 ranges = <0 0xfc0000 0x10000>; 256 ranges = <0 0xfc0000 0x10000>;
185 interrupt-parent = <&sic>; 257 interrupt-parent = <&sic>;
186 258
259 sm_gpio1: gpio@5000 {
260 compatible = "snps,dw-apb-gpio";
261 reg = <0x5000 0x400>;
262 #address-cells = <1>;
263 #size-cells = <0>;
264
265 portf: gpio-port@5 {
266 compatible = "snps,dw-apb-gpio-port";
267 gpio-controller;
268 #gpio-cells = <2>;
269 snps,nr-gpios = <8>;
270 reg = <0>;
271 };
272 };
273
274 sm_gpio0: gpio@c000 {
275 compatible = "snps,dw-apb-gpio";
276 reg = <0xc000 0x400>;
277 #address-cells = <1>;
278 #size-cells = <0>;
279
280 porte: gpio-port@4 {
281 compatible = "snps,dw-apb-gpio-port";
282 gpio-controller;
283 #gpio-cells = <2>;
284 snps,nr-gpios = <8>;
285 reg = <0>;
286 interrupt-controller;
287 #interrupt-cells = <2>;
288 interrupts = <11>;
289 };
290 };
291
187 uart0: serial@9000 { 292 uart0: serial@9000 {
188 compatible = "snps,dw-apb-uart"; 293 compatible = "snps,dw-apb-uart";
189 reg = <0x9000 0x100>; 294 reg = <0x9000 0x100>;
190 reg-shift = <2>; 295 reg-shift = <2>;
191 reg-io-width = <1>; 296 reg-io-width = <1>;
192 interrupts = <8>; 297 interrupts = <8>;
193 clocks = <&smclk>; 298 clocks = <&refclk>;
299 pinctrl-0 = <&uart0_pmux>;
300 pinctrl-names = "default";
194 status = "disabled"; 301 status = "disabled";
195 }; 302 };
196 303
@@ -200,7 +307,9 @@
200 reg-shift = <2>; 307 reg-shift = <2>;
201 reg-io-width = <1>; 308 reg-io-width = <1>;
202 interrupts = <9>; 309 interrupts = <9>;
203 clocks = <&smclk>; 310 clocks = <&refclk>;
311 pinctrl-0 = <&uart1_pmux>;
312 pinctrl-names = "default";
204 status = "disabled"; 313 status = "disabled";
205 }; 314 };
206 315
@@ -210,10 +319,32 @@
210 reg-shift = <2>; 319 reg-shift = <2>;
211 reg-io-width = <1>; 320 reg-io-width = <1>;
212 interrupts = <10>; 321 interrupts = <10>;
213 clocks = <&smclk>; 322 clocks = <&refclk>;
323 pinctrl-0 = <&uart2_pmux>;
324 pinctrl-names = "default";
214 status = "disabled"; 325 status = "disabled";
215 }; 326 };
216 327
328 sysctrl: system-controller@d000 {
329 compatible = "marvell,berlin2-system-ctrl";
330 reg = <0xd000 0x100>;
331
332 uart0_pmux: uart0-pmux {
333 groups = "GSM4";
334 function = "uart0";
335 };
336
337 uart1_pmux: uart1-pmux {
338 groups = "GSM5";
339 function = "uart1";
340 };
341
342 uart2_pmux: uart2-pmux {
343 groups = "GSM3";
344 function = "uart2";
345 };
346 };
347
217 sic: interrupt-controller@e000 { 348 sic: interrupt-controller@e000 {
218 compatible = "snps,dw-apb-ictl"; 349 compatible = "snps,dw-apb-ictl";
219 reg = <0xe000 0x400>; 350 reg = <0xe000 0x400>;
diff --git a/arch/arm/boot/dts/berlin2cd.dtsi b/arch/arm/boot/dts/berlin2cd.dtsi
index 094968c27533..cc1df65da504 100644
--- a/arch/arm/boot/dts/berlin2cd.dtsi
+++ b/arch/arm/boot/dts/berlin2cd.dtsi
@@ -12,6 +12,7 @@
12 */ 12 */
13 13
14#include "skeleton.dtsi" 14#include "skeleton.dtsi"
15#include <dt-bindings/clock/berlin2.h>
15#include <dt-bindings/interrupt-controller/arm-gic.h> 16#include <dt-bindings/interrupt-controller/arm-gic.h>
16 17
17/ { 18/ {
@@ -30,24 +31,10 @@
30 }; 31 };
31 }; 32 };
32 33
33 clocks { 34 refclk: oscillator {
34 smclk: sysmgr-clock { 35 compatible = "fixed-clock";
35 compatible = "fixed-clock"; 36 #clock-cells = <0>;
36 #clock-cells = <0>; 37 clock-frequency = <25000000>;
37 clock-frequency = <25000000>;
38 };
39
40 cfgclk: cfg-clock {
41 compatible = "fixed-clock";
42 #clock-cells = <0>;
43 clock-frequency = <75000000>;
44 };
45
46 sysclk: system-clock {
47 compatible = "fixed-clock";
48 #clock-cells = <0>;
49 clock-frequency = <300000000>;
50 };
51 }; 38 };
52 39
53 soc { 40 soc {
@@ -76,7 +63,7 @@
76 compatible = "arm,cortex-a9-twd-timer"; 63 compatible = "arm,cortex-a9-twd-timer";
77 reg = <0xad0600 0x20>; 64 reg = <0xad0600 0x20>;
78 interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>; 65 interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>;
79 clocks = <&sysclk>; 66 clocks = <&chip CLKID_TWD>;
80 }; 67 };
81 68
82 apb@e80000 { 69 apb@e80000 {
@@ -87,11 +74,83 @@
87 ranges = <0 0xe80000 0x10000>; 74 ranges = <0 0xe80000 0x10000>;
88 interrupt-parent = <&aic>; 75 interrupt-parent = <&aic>;
89 76
77 gpio0: gpio@0400 {
78 compatible = "snps,dw-apb-gpio";
79 reg = <0x0400 0x400>;
80 #address-cells = <1>;
81 #size-cells = <0>;
82
83 porta: gpio-port@0 {
84 compatible = "snps,dw-apb-gpio-port";
85 gpio-controller;
86 #gpio-cells = <2>;
87 snps,nr-gpios = <8>;
88 reg = <0>;
89 interrupt-controller;
90 #interrupt-cells = <2>;
91 interrupts = <0>;
92 };
93 };
94
95 gpio1: gpio@0800 {
96 compatible = "snps,dw-apb-gpio";
97 reg = <0x0800 0x400>;
98 #address-cells = <1>;
99 #size-cells = <0>;
100
101 portb: gpio-port@1 {
102 compatible = "snps,dw-apb-gpio-port";
103 gpio-controller;
104 #gpio-cells = <2>;
105 snps,nr-gpios = <8>;
106 reg = <0>;
107 interrupt-controller;
108 #interrupt-cells = <2>;
109 interrupts = <1>;
110 };
111 };
112
113 gpio2: gpio@0c00 {
114 compatible = "snps,dw-apb-gpio";
115 reg = <0x0c00 0x400>;
116 #address-cells = <1>;
117 #size-cells = <0>;
118
119 portc: gpio-port@2 {
120 compatible = "snps,dw-apb-gpio-port";
121 gpio-controller;
122 #gpio-cells = <2>;
123 snps,nr-gpios = <8>;
124 reg = <0>;
125 interrupt-controller;
126 #interrupt-cells = <2>;
127 interrupts = <2>;
128 };
129 };
130
131 gpio3: gpio@1000 {
132 compatible = "snps,dw-apb-gpio";
133 reg = <0x1000 0x400>;
134 #address-cells = <1>;
135 #size-cells = <0>;
136
137 portd: gpio-port@3 {
138 compatible = "snps,dw-apb-gpio-port";
139 gpio-controller;
140 #gpio-cells = <2>;
141 snps,nr-gpios = <8>;
142 reg = <0>;
143 interrupt-controller;
144 #interrupt-cells = <2>;
145 interrupts = <3>;
146 };
147 };
148
90 timer0: timer@2c00 { 149 timer0: timer@2c00 {
91 compatible = "snps,dw-apb-timer"; 150 compatible = "snps,dw-apb-timer";
92 reg = <0x2c00 0x14>; 151 reg = <0x2c00 0x14>;
93 interrupts = <8>; 152 interrupts = <8>;
94 clocks = <&cfgclk>; 153 clocks = <&chip CLKID_CFG>;
95 clock-names = "timer"; 154 clock-names = "timer";
96 status = "okay"; 155 status = "okay";
97 }; 156 };
@@ -100,7 +159,7 @@
100 compatible = "snps,dw-apb-timer"; 159 compatible = "snps,dw-apb-timer";
101 reg = <0x2c14 0x14>; 160 reg = <0x2c14 0x14>;
102 interrupts = <9>; 161 interrupts = <9>;
103 clocks = <&cfgclk>; 162 clocks = <&chip CLKID_CFG>;
104 clock-names = "timer"; 163 clock-names = "timer";
105 status = "okay"; 164 status = "okay";
106 }; 165 };
@@ -109,7 +168,7 @@
109 compatible = "snps,dw-apb-timer"; 168 compatible = "snps,dw-apb-timer";
110 reg = <0x2c28 0x14>; 169 reg = <0x2c28 0x14>;
111 interrupts = <10>; 170 interrupts = <10>;
112 clocks = <&cfgclk>; 171 clocks = <&chip CLKID_CFG>;
113 clock-names = "timer"; 172 clock-names = "timer";
114 status = "disabled"; 173 status = "disabled";
115 }; 174 };
@@ -118,7 +177,7 @@
118 compatible = "snps,dw-apb-timer"; 177 compatible = "snps,dw-apb-timer";
119 reg = <0x2c3c 0x14>; 178 reg = <0x2c3c 0x14>;
120 interrupts = <11>; 179 interrupts = <11>;
121 clocks = <&cfgclk>; 180 clocks = <&chip CLKID_CFG>;
122 clock-names = "timer"; 181 clock-names = "timer";
123 status = "disabled"; 182 status = "disabled";
124 }; 183 };
@@ -127,7 +186,7 @@
127 compatible = "snps,dw-apb-timer"; 186 compatible = "snps,dw-apb-timer";
128 reg = <0x2c50 0x14>; 187 reg = <0x2c50 0x14>;
129 interrupts = <12>; 188 interrupts = <12>;
130 clocks = <&cfgclk>; 189 clocks = <&chip CLKID_CFG>;
131 clock-names = "timer"; 190 clock-names = "timer";
132 status = "disabled"; 191 status = "disabled";
133 }; 192 };
@@ -136,7 +195,7 @@
136 compatible = "snps,dw-apb-timer"; 195 compatible = "snps,dw-apb-timer";
137 reg = <0x2c64 0x14>; 196 reg = <0x2c64 0x14>;
138 interrupts = <13>; 197 interrupts = <13>;
139 clocks = <&cfgclk>; 198 clocks = <&chip CLKID_CFG>;
140 clock-names = "timer"; 199 clock-names = "timer";
141 status = "disabled"; 200 status = "disabled";
142 }; 201 };
@@ -145,7 +204,7 @@
145 compatible = "snps,dw-apb-timer"; 204 compatible = "snps,dw-apb-timer";
146 reg = <0x2c78 0x14>; 205 reg = <0x2c78 0x14>;
147 interrupts = <14>; 206 interrupts = <14>;
148 clocks = <&cfgclk>; 207 clocks = <&chip CLKID_CFG>;
149 clock-names = "timer"; 208 clock-names = "timer";
150 status = "disabled"; 209 status = "disabled";
151 }; 210 };
@@ -154,7 +213,7 @@
154 compatible = "snps,dw-apb-timer"; 213 compatible = "snps,dw-apb-timer";
155 reg = <0x2c8c 0x14>; 214 reg = <0x2c8c 0x14>;
156 interrupts = <15>; 215 interrupts = <15>;
157 clocks = <&cfgclk>; 216 clocks = <&chip CLKID_CFG>;
158 clock-names = "timer"; 217 clock-names = "timer";
159 status = "disabled"; 218 status = "disabled";
160 }; 219 };
@@ -169,6 +228,19 @@
169 }; 228 };
170 }; 229 };
171 230
231 chip: chip-control@ea0000 {
232 compatible = "marvell,berlin2cd-chip-ctrl";
233 #clock-cells = <1>;
234 reg = <0xea0000 0x400>;
235 clocks = <&refclk>;
236 clock-names = "refclk";
237
238 uart0_pmux: uart0-pmux {
239 groups = "G6";
240 function = "uart0";
241 };
242 };
243
172 apb@fc0000 { 244 apb@fc0000 {
173 compatible = "simple-bus"; 245 compatible = "simple-bus";
174 #address-cells = <1>; 246 #address-cells = <1>;
@@ -177,13 +249,45 @@
177 ranges = <0 0xfc0000 0x10000>; 249 ranges = <0 0xfc0000 0x10000>;
178 interrupt-parent = <&sic>; 250 interrupt-parent = <&sic>;
179 251
252 sm_gpio1: gpio@5000 {
253 compatible = "snps,dw-apb-gpio";
254 reg = <0x5000 0x400>;
255 #address-cells = <1>;
256 #size-cells = <0>;
257
258 portf: gpio-port@5 {
259 compatible = "snps,dw-apb-gpio-port";
260 gpio-controller;
261 #gpio-cells = <2>;
262 snps,nr-gpios = <8>;
263 reg = <0>;
264 };
265 };
266
267 sm_gpio0: gpio@c000 {
268 compatible = "snps,dw-apb-gpio";
269 reg = <0xc000 0x400>;
270 #address-cells = <1>;
271 #size-cells = <0>;
272
273 porte: gpio-port@4 {
274 compatible = "snps,dw-apb-gpio-port";
275 gpio-controller;
276 #gpio-cells = <2>;
277 snps,nr-gpios = <8>;
278 reg = <0>;
279 };
280 };
281
180 uart0: serial@9000 { 282 uart0: serial@9000 {
181 compatible = "snps,dw-apb-uart"; 283 compatible = "snps,dw-apb-uart";
182 reg = <0x9000 0x100>; 284 reg = <0x9000 0x100>;
183 reg-shift = <2>; 285 reg-shift = <2>;
184 reg-io-width = <1>; 286 reg-io-width = <1>;
185 interrupts = <8>; 287 interrupts = <8>;
186 clocks = <&smclk>; 288 clocks = <&refclk>;
289 pinctrl-0 = <&uart0_pmux>;
290 pinctrl-names = "default";
187 status = "disabled"; 291 status = "disabled";
188 }; 292 };
189 293
@@ -193,10 +297,15 @@
193 reg-shift = <2>; 297 reg-shift = <2>;
194 reg-io-width = <1>; 298 reg-io-width = <1>;
195 interrupts = <9>; 299 interrupts = <9>;
196 clocks = <&smclk>; 300 clocks = <&refclk>;
197 status = "disabled"; 301 status = "disabled";
198 }; 302 };
199 303
304 sysctrl: system-controller@d000 {
305 compatible = "marvell,berlin2cd-system-ctrl";
306 reg = <0xd000 0x100>;
307 };
308
200 sic: interrupt-controller@e000 { 309 sic: interrupt-controller@e000 {
201 compatible = "snps,dw-apb-ictl"; 310 compatible = "snps,dw-apb-ictl";
202 reg = <0xe000 0x400>; 311 reg = <0xe000 0x400>;
diff --git a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
new file mode 100644
index 000000000000..995150f93795
--- /dev/null
+++ b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
@@ -0,0 +1,39 @@
1/*
2 * Copyright (C) 2014 Antoine Ténart <antoine.tenart@free-electrons.com>
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9/dts-v1/;
10#include "berlin2q.dtsi"
11
12/ {
13 model = "Marvell BG2-Q DMP";
14 compatible = "marvell,berlin2q-dmp", "marvell,berlin2q", "marvell,berlin";
15
16 memory {
17 device_type = "memory";
18 reg = <0x00000000 0x80000000>;
19 };
20
21 choosen {
22 bootargs = "console=ttyS0,115200 earlyprintk";
23 };
24};
25
26&sdhci1 {
27 broken-cd;
28 sdhci,wp-inverted;
29 status = "okay";
30};
31
32&sdhci2 {
33 non-removable;
34 status = "okay";
35};
36
37&uart0 {
38 status = "okay";
39};
diff --git a/arch/arm/boot/dts/berlin2q.dtsi b/arch/arm/boot/dts/berlin2q.dtsi
new file mode 100644
index 000000000000..635a16a64cb4
--- /dev/null
+++ b/arch/arm/boot/dts/berlin2q.dtsi
@@ -0,0 +1,363 @@
1/*
2 * Copyright (C) 2014 Antoine Ténart <antoine.tenart@free-electrons.com>
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#include <dt-bindings/clock/berlin2q.h>
10#include <dt-bindings/interrupt-controller/arm-gic.h>
11
12#include "skeleton.dtsi"
13
14/ {
15 model = "Marvell Armada 1500 pro (BG2-Q) SoC";
16 compatible = "marvell,berlin2q", "marvell,berlin";
17
18 cpus {
19 #address-cells = <1>;
20 #size-cells = <0>;
21
22 cpu@0 {
23 compatible = "arm,cortex-a9";
24 device_type = "cpu";
25 next-level-cache = <&l2>;
26 reg = <0>;
27 };
28
29 cpu@1 {
30 compatible = "arm,cortex-a9";
31 device_type = "cpu";
32 next-level-cache = <&l2>;
33 reg = <1>;
34 };
35
36 cpu@2 {
37 compatible = "arm,cortex-a9";
38 device_type = "cpu";
39 next-level-cache = <&l2>;
40 reg = <2>;
41 };
42
43 cpu@3 {
44 compatible = "arm,cortex-a9";
45 device_type = "cpu";
46 next-level-cache = <&l2>;
47 reg = <3>;
48 };
49 };
50
51 refclk: oscillator {
52 compatible = "fixed-clock";
53 #clock-cells = <0>;
54 clock-frequency = <25000000>;
55 };
56
57 soc {
58 compatible = "simple-bus";
59 #address-cells = <1>;
60 #size-cells = <1>;
61
62 ranges = <0 0xf7000000 0x1000000>;
63 interrupt-parent = <&gic>;
64
65 sdhci0: sdhci@ab0000 {
66 compatible = "mrvl,pxav3-mmc";
67 reg = <0xab0000 0x200>;
68 clocks = <&chip CLKID_SDIO1XIN>;
69 interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
70 status = "disabled";
71 };
72
73 sdhci1: sdhci@ab0800 {
74 compatible = "mrvl,pxav3-mmc";
75 reg = <0xab0800 0x200>;
76 clocks = <&chip CLKID_SDIO1XIN>;
77 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
78 status = "disabled";
79 };
80
81 sdhci2: sdhci@ab1000 {
82 compatible = "mrvl,pxav3-mmc";
83 reg = <0xab1000 0x200>;
84 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
85 clocks = <&chip CLKID_SDIO1XIN>;
86 status = "disabled";
87 };
88
89 l2: l2-cache-controller@ac0000 {
90 compatible = "arm,pl310-cache";
91 reg = <0xac0000 0x1000>;
92 cache-level = <2>;
93 };
94
95 scu: snoop-control-unit@ad0000 {
96 compatible = "arm,cortex-a9-scu";
97 reg = <0xad0000 0x58>;
98 };
99
100 local-timer@ad0600 {
101 compatible = "arm,cortex-a9-twd-timer";
102 reg = <0xad0600 0x20>;
103 clocks = <&chip CLKID_TWD>;
104 interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>;
105 };
106
107 gic: interrupt-controller@ad1000 {
108 compatible = "arm,cortex-a9-gic";
109 reg = <0xad1000 0x1000>, <0xad0100 0x100>;
110 interrupt-controller;
111 #interrupt-cells = <3>;
112 };
113
114 apb@e80000 {
115 compatible = "simple-bus";
116 #address-cells = <1>;
117 #size-cells = <1>;
118
119 ranges = <0 0xe80000 0x10000>;
120 interrupt-parent = <&aic>;
121
122 gpio0: gpio@0400 {
123 compatible = "snps,dw-apb-gpio";
124 reg = <0x0400 0x400>;
125 #address-cells = <1>;
126 #size-cells = <0>;
127
128 porta: gpio-port@0 {
129 compatible = "snps,dw-apb-gpio-port";
130 gpio-controller;
131 #gpio-cells = <2>;
132 snps,nr-gpios = <32>;
133 reg = <0>;
134 interrupt-controller;
135 #interrupt-cells = <2>;
136 interrupts = <0>;
137 };
138 };
139
140 gpio1: gpio@0800 {
141 compatible = "snps,dw-apb-gpio";
142 reg = <0x0800 0x400>;
143 #address-cells = <1>;
144 #size-cells = <0>;
145
146 portb: gpio-port@1 {
147 compatible = "snps,dw-apb-gpio-port";
148 gpio-controller;
149 #gpio-cells = <2>;
150 snps,nr-gpios = <32>;
151 reg = <0>;
152 interrupt-controller;
153 #interrupt-cells = <2>;
154 interrupts = <1>;
155 };
156 };
157
158 gpio2: gpio@0c00 {
159 compatible = "snps,dw-apb-gpio";
160 reg = <0x0c00 0x400>;
161 #address-cells = <1>;
162 #size-cells = <0>;
163
164 portc: gpio-port@2 {
165 compatible = "snps,dw-apb-gpio-port";
166 gpio-controller;
167 #gpio-cells = <2>;
168 snps,nr-gpios = <32>;
169 reg = <0>;
170 interrupt-controller;
171 #interrupt-cells = <2>;
172 interrupts = <2>;
173 };
174 };
175
176 gpio3: gpio@1000 {
177 compatible = "snps,dw-apb-gpio";
178 reg = <0x1000 0x400>;
179 #address-cells = <1>;
180 #size-cells = <0>;
181
182 portd: gpio-port@3 {
183 compatible = "snps,dw-apb-gpio-port";
184 gpio-controller;
185 #gpio-cells = <2>;
186 snps,nr-gpios = <32>;
187 reg = <0>;
188 interrupt-controller;
189 #interrupt-cells = <2>;
190 interrupts = <3>;
191 };
192 };
193
194 timer0: timer@2c00 {
195 compatible = "snps,dw-apb-timer";
196 reg = <0x2c00 0x14>;
197 clocks = <&chip CLKID_CFG>;
198 clock-names = "timer";
199 interrupts = <8>;
200 };
201
202 timer1: timer@2c14 {
203 compatible = "snps,dw-apb-timer";
204 reg = <0x2c14 0x14>;
205 clocks = <&chip CLKID_CFG>;
206 clock-names = "timer";
207 status = "disabled";
208 };
209
210 timer2: timer@2c28 {
211 compatible = "snps,dw-apb-timer";
212 reg = <0x2c28 0x14>;
213 clocks = <&chip CLKID_CFG>;
214 clock-names = "timer";
215 status = "disabled";
216 };
217
218 timer3: timer@2c3c {
219 compatible = "snps,dw-apb-timer";
220 reg = <0x2c3c 0x14>;
221 clocks = <&chip CLKID_CFG>;
222 clock-names = "timer";
223 status = "disabled";
224 };
225
226 timer4: timer@2c50 {
227 compatible = "snps,dw-apb-timer";
228 reg = <0x2c50 0x14>;
229 clocks = <&chip CLKID_CFG>;
230 clock-names = "timer";
231 status = "disabled";
232 };
233
234 timer5: timer@2c64 {
235 compatible = "snps,dw-apb-timer";
236 reg = <0x2c64 0x14>;
237 clocks = <&chip CLKID_CFG>;
238 clock-names = "timer";
239 status = "disabled";
240 };
241
242 timer6: timer@2c78 {
243 compatible = "snps,dw-apb-timer";
244 reg = <0x2c78 0x14>;
245 clocks = <&chip CLKID_CFG>;
246 clock-names = "timer";
247 status = "disabled";
248 };
249
250 timer7: timer@2c8c {
251 compatible = "snps,dw-apb-timer";
252 reg = <0x2c8c 0x14>;
253 clocks = <&chip CLKID_CFG>;
254 clock-names = "timer";
255 status = "disabled";
256 };
257
258 aic: interrupt-controller@3800 {
259 compatible = "snps,dw-apb-ictl";
260 reg = <0x3800 0x30>;
261 interrupt-controller;
262 #interrupt-cells = <1>;
263 interrupt-parent = <&gic>;
264 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
265 };
266
267 gpio4: gpio@5000 {
268 compatible = "snps,dw-apb-gpio";
269 reg = <0x5000 0x400>;
270 #address-cells = <1>;
271 #size-cells = <0>;
272
273 porte: gpio-port@4 {
274 compatible = "snps,dw-apb-gpio-port";
275 gpio-controller;
276 #gpio-cells = <2>;
277 snps,nr-gpios = <32>;
278 reg = <0>;
279 };
280 };
281
282 gpio5: gpio@c000 {
283 compatible = "snps,dw-apb-gpio";
284 reg = <0xc000 0x400>;
285 #address-cells = <1>;
286 #size-cells = <0>;
287
288 portf: gpio-port@5 {
289 compatible = "snps,dw-apb-gpio-port";
290 gpio-controller;
291 #gpio-cells = <2>;
292 snps,nr-gpios = <32>;
293 reg = <0>;
294 };
295 };
296 };
297
298 chip: chip-control@ea0000 {
299 compatible = "marvell,berlin2q-chip-ctrl";
300 #clock-cells = <1>;
301 reg = <0xea0000 0x400>, <0xdd0170 0x10>;
302 clocks = <&refclk>;
303 clock-names = "refclk";
304 };
305
306 apb@fc0000 {
307 compatible = "simple-bus";
308 #address-cells = <1>;
309 #size-cells = <1>;
310
311 ranges = <0 0xfc0000 0x10000>;
312 interrupt-parent = <&sic>;
313
314 uart0: uart@9000 {
315 compatible = "snps,dw-apb-uart";
316 reg = <0x9000 0x100>;
317 interrupt-parent = <&sic>;
318 interrupts = <8>;
319 clocks = <&refclk>;
320 reg-shift = <2>;
321 pinctrl-0 = <&uart0_pmux>;
322 pinctrl-names = "default";
323 status = "disabled";
324 };
325
326 uart1: uart@a000 {
327 compatible = "snps,dw-apb-uart";
328 reg = <0xa000 0x100>;
329 interrupt-parent = <&sic>;
330 interrupts = <9>;
331 clocks = <&refclk>;
332 reg-shift = <2>;
333 pinctrl-0 = <&uart1_pmux>;
334 pinctrl-names = "default";
335 status = "disabled";
336 };
337
338 sysctrl: pin-controller@d000 {
339 compatible = "marvell,berlin2q-system-ctrl";
340 reg = <0xd000 0x100>;
341
342 uart0_pmux: uart0-pmux {
343 groups = "GSM12";
344 function = "uart0";
345 };
346
347 uart1_pmux: uart1-pmux {
348 groups = "GSM14";
349 function = "uart1";
350 };
351 };
352
353 sic: interrupt-controller@e000 {
354 compatible = "snps,dw-apb-ictl";
355 reg = <0xe000 0x30>;
356 interrupt-controller;
357 #interrupt-cells = <1>;
358 interrupt-parent = <&gic>;
359 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
360 };
361 };
362 };
363};
diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
index 5babba0a3a75..4adc28039c30 100644
--- a/arch/arm/boot/dts/dra7-evm.dts
+++ b/arch/arm/boot/dts/dra7-evm.dts
@@ -7,11 +7,11 @@
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9 9
10#include "dra7.dtsi" 10#include "dra74x.dtsi"
11 11
12/ { 12/ {
13 model = "TI DRA7"; 13 model = "TI DRA742";
14 compatible = "ti,dra7-evm", "ti,dra752", "ti,dra7"; 14 compatible = "ti,dra7-evm", "ti,dra742", "ti,dra74", "ti,dra7";
15 15
16 memory { 16 memory {
17 device_type = "memory"; 17 device_type = "memory";
@@ -93,6 +93,64 @@
93 0x24c (PIN_INPUT_SLEW | MUX_MODE0) /* uart3_txd */ 93 0x24c (PIN_INPUT_SLEW | MUX_MODE0) /* uart3_txd */
94 >; 94 >;
95 }; 95 };
96
97 qspi1_pins: pinmux_qspi1_pins {
98 pinctrl-single,pins = <
99 0x4c (PIN_INPUT | MUX_MODE1) /* gpmc_a3.qspi1_cs2 */
100 0x50 (PIN_INPUT | MUX_MODE1) /* gpmc_a4.qspi1_cs3 */
101 0x74 (PIN_INPUT | MUX_MODE1) /* gpmc_a13.qspi1_rtclk */
102 0x78 (PIN_INPUT | MUX_MODE1) /* gpmc_a14.qspi1_d3 */
103 0x7c (PIN_INPUT | MUX_MODE1) /* gpmc_a15.qspi1_d2 */
104 0x80 (PIN_INPUT | MUX_MODE1) /* gpmc_a16.qspi1_d1 */
105 0x84 (PIN_INPUT | MUX_MODE1) /* gpmc_a17.qspi1_d0 */
106 0x88 (PIN_INPUT | MUX_MODE1) /* qpmc_a18.qspi1_sclk */
107 0xb8 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_cs2.qspi1_cs0 */
108 0xbc (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_cs3.qspi1_cs1 */
109 >;
110 };
111
112 usb1_pins: pinmux_usb1_pins {
113 pinctrl-single,pins = <
114 0x280 (PIN_INPUT_SLEW | MUX_MODE0) /* usb1_drvvbus */
115 >;
116 };
117
118 usb2_pins: pinmux_usb2_pins {
119 pinctrl-single,pins = <
120 0x284 (PIN_INPUT_SLEW | MUX_MODE0) /* usb2_drvvbus */
121 >;
122 };
123
124 nand_flash_x16: nand_flash_x16 {
125 /* On DRA7 EVM, GPMC_WPN and NAND_BOOTn comes from DIP switch
126 * So NAND flash requires following switch settings:
127 * SW5.9 (GPMC_WPN) = LOW
128 * SW5.1 (NAND_BOOTn) = HIGH */
129 pinctrl-single,pins = <
130 0x0 (PIN_INPUT | MUX_MODE0) /* gpmc_ad0 */
131 0x4 (PIN_INPUT | MUX_MODE0) /* gpmc_ad1 */
132 0x8 (PIN_INPUT | MUX_MODE0) /* gpmc_ad2 */
133 0xc (PIN_INPUT | MUX_MODE0) /* gpmc_ad3 */
134 0x10 (PIN_INPUT | MUX_MODE0) /* gpmc_ad4 */
135 0x14 (PIN_INPUT | MUX_MODE0) /* gpmc_ad5 */
136 0x18 (PIN_INPUT | MUX_MODE0) /* gpmc_ad6 */
137 0x1c (PIN_INPUT | MUX_MODE0) /* gpmc_ad7 */
138 0x20 (PIN_INPUT | MUX_MODE0) /* gpmc_ad8 */
139 0x24 (PIN_INPUT | MUX_MODE0) /* gpmc_ad9 */
140 0x28 (PIN_INPUT | MUX_MODE0) /* gpmc_ad10 */
141 0x2c (PIN_INPUT | MUX_MODE0) /* gpmc_ad11 */
142 0x30 (PIN_INPUT | MUX_MODE0) /* gpmc_ad12 */
143 0x34 (PIN_INPUT | MUX_MODE0) /* gpmc_ad13 */
144 0x38 (PIN_INPUT | MUX_MODE0) /* gpmc_ad14 */
145 0x3c (PIN_INPUT | MUX_MODE0) /* gpmc_ad15 */
146 0xd8 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0 */
147 0xcc (PIN_OUTPUT | MUX_MODE0) /* gpmc_wen */
148 0xb4 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* gpmc_csn0 */
149 0xc4 (PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale */
150 0xc8 (PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren */
151 0xd0 (PIN_OUTPUT | MUX_MODE0) /* gpmc_be0n_cle */
152 >;
153 };
96}; 154};
97 155
98&i2c1 { 156&i2c1 {
@@ -273,3 +331,167 @@
273&cpu0 { 331&cpu0 {
274 cpu0-supply = <&smps123_reg>; 332 cpu0-supply = <&smps123_reg>;
275}; 333};
334
335&qspi {
336 status = "okay";
337 pinctrl-names = "default";
338 pinctrl-0 = <&qspi1_pins>;
339
340 spi-max-frequency = <48000000>;
341 m25p80@0 {
342 compatible = "s25fl256s1";
343 spi-max-frequency = <48000000>;
344 reg = <0>;
345 spi-tx-bus-width = <1>;
346 spi-rx-bus-width = <4>;
347 spi-cpol;
348 spi-cpha;
349 #address-cells = <1>;
350 #size-cells = <1>;
351
352 /* MTD partition table.
353 * The ROM checks the first four physical blocks
354 * for a valid file to boot and the flash here is
355 * 64KiB block size.
356 */
357 partition@0 {
358 label = "QSPI.SPL";
359 reg = <0x00000000 0x000010000>;
360 };
361 partition@1 {
362 label = "QSPI.SPL.backup1";
363 reg = <0x00010000 0x00010000>;
364 };
365 partition@2 {
366 label = "QSPI.SPL.backup2";
367 reg = <0x00020000 0x00010000>;
368 };
369 partition@3 {
370 label = "QSPI.SPL.backup3";
371 reg = <0x00030000 0x00010000>;
372 };
373 partition@4 {
374 label = "QSPI.u-boot";
375 reg = <0x00040000 0x00100000>;
376 };
377 partition@5 {
378 label = "QSPI.u-boot-spl-os";
379 reg = <0x00140000 0x00010000>;
380 };
381 partition@6 {
382 label = "QSPI.u-boot-env";
383 reg = <0x00150000 0x00010000>;
384 };
385 partition@7 {
386 label = "QSPI.u-boot-env.backup1";
387 reg = <0x00160000 0x0010000>;
388 };
389 partition@8 {
390 label = "QSPI.kernel";
391 reg = <0x00170000 0x0800000>;
392 };
393 partition@9 {
394 label = "QSPI.file-system";
395 reg = <0x00970000 0x01690000>;
396 };
397 };
398};
399
400&usb1 {
401 dr_mode = "peripheral";
402 pinctrl-names = "default";
403 pinctrl-0 = <&usb1_pins>;
404};
405
406&usb2 {
407 dr_mode = "host";
408 pinctrl-names = "default";
409 pinctrl-0 = <&usb2_pins>;
410};
411
412&elm {
413 status = "okay";
414};
415
416&gpmc {
417 status = "okay";
418 pinctrl-names = "default";
419 pinctrl-0 = <&nand_flash_x16>;
420 ranges = <0 0 0 0x01000000>; /* minimum GPMC partition = 16MB */
421 nand@0,0 {
422 reg = <0 0 4>; /* device IO registers */
423 ti,nand-ecc-opt = "bch8";
424 ti,elm-id = <&elm>;
425 nand-bus-width = <16>;
426 gpmc,device-width = <2>;
427 gpmc,sync-clk-ps = <0>;
428 gpmc,cs-on-ns = <0>;
429 gpmc,cs-rd-off-ns = <40>;
430 gpmc,cs-wr-off-ns = <40>;
431 gpmc,adv-on-ns = <0>;
432 gpmc,adv-rd-off-ns = <30>;
433 gpmc,adv-wr-off-ns = <30>;
434 gpmc,we-on-ns = <5>;
435 gpmc,we-off-ns = <25>;
436 gpmc,oe-on-ns = <2>;
437 gpmc,oe-off-ns = <20>;
438 gpmc,access-ns = <20>;
439 gpmc,wr-access-ns = <40>;
440 gpmc,rd-cycle-ns = <40>;
441 gpmc,wr-cycle-ns = <40>;
442 gpmc,wait-pin = <0>;
443 gpmc,wait-on-read;
444 gpmc,wait-on-write;
445 gpmc,bus-turnaround-ns = <0>;
446 gpmc,cycle2cycle-delay-ns = <0>;
447 gpmc,clk-activation-ns = <0>;
448 gpmc,wait-monitoring-ns = <0>;
449 gpmc,wr-data-mux-bus-ns = <0>;
450 /* MTD partition table */
451 /* All SPL-* partitions are sized to minimal length
452 * which can be independently programmable. For
453 * NAND flash this is equal to size of erase-block */
454 #address-cells = <1>;
455 #size-cells = <1>;
456 partition@0 {
457 label = "NAND.SPL";
458 reg = <0x00000000 0x000020000>;
459 };
460 partition@1 {
461 label = "NAND.SPL.backup1";
462 reg = <0x00020000 0x00020000>;
463 };
464 partition@2 {
465 label = "NAND.SPL.backup2";
466 reg = <0x00040000 0x00020000>;
467 };
468 partition@3 {
469 label = "NAND.SPL.backup3";
470 reg = <0x00060000 0x00020000>;
471 };
472 partition@4 {
473 label = "NAND.u-boot-spl-os";
474 reg = <0x00080000 0x00040000>;
475 };
476 partition@5 {
477 label = "NAND.u-boot";
478 reg = <0x000c0000 0x00100000>;
479 };
480 partition@6 {
481 label = "NAND.u-boot-env";
482 reg = <0x001c0000 0x00020000>;
483 };
484 partition@7 {
485 label = "NAND.u-boot-env";
486 reg = <0x001e0000 0x00020000>;
487 };
488 partition@8 {
489 label = "NAND.kernel";
490 reg = <0x00200000 0x00800000>;
491 };
492 partition@9 {
493 label = "NAND.file-system";
494 reg = <0x00a00000 0x0f600000>;
495 };
496 };
497};
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index 149b55099935..c29945e07c5a 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -33,33 +33,6 @@
33 serial5 = &uart6; 33 serial5 = &uart6;
34 }; 34 };
35 35
36 cpus {
37 #address-cells = <1>;
38 #size-cells = <0>;
39
40 cpu0: cpu@0 {
41 device_type = "cpu";
42 compatible = "arm,cortex-a15";
43 reg = <0>;
44
45 operating-points = <
46 /* kHz uV */
47 1000000 1060000
48 1176000 1160000
49 >;
50
51 clocks = <&dpll_mpu_ck>;
52 clock-names = "cpu";
53
54 clock-latency = <300000>; /* From omap-cpufreq driver */
55 };
56 cpu@1 {
57 device_type = "cpu";
58 compatible = "arm,cortex-a15";
59 reg = <1>;
60 };
61 };
62
63 timer { 36 timer {
64 compatible = "arm,armv7-timer"; 37 compatible = "arm,armv7-timer";
65 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>, 38 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
@@ -99,13 +72,13 @@
99 * hierarchy. 72 * hierarchy.
100 */ 73 */
101 ocp { 74 ocp {
102 compatible = "ti,omap4-l3-noc", "simple-bus"; 75 compatible = "ti,dra7-l3-noc", "simple-bus";
103 #address-cells = <1>; 76 #address-cells = <1>;
104 #size-cells = <1>; 77 #size-cells = <1>;
105 ranges; 78 ranges;
106 ti,hwmods = "l3_main_1", "l3_main_2"; 79 ti,hwmods = "l3_main_1", "l3_main_2";
107 reg = <0x44000000 0x2000>, 80 reg = <0x44000000 0x1000000>,
108 <0x44800000 0x3000>; 81 <0x45000000 0x1000>;
109 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>, 82 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
110 <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; 83 <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
111 84
@@ -789,6 +762,228 @@
789 dma-names = "tx0", "rx0"; 762 dma-names = "tx0", "rx0";
790 status = "disabled"; 763 status = "disabled";
791 }; 764 };
765
766 qspi: qspi@4b300000 {
767 compatible = "ti,dra7xxx-qspi";
768 reg = <0x4b300000 0x100>;
769 reg-names = "qspi_base";
770 #address-cells = <1>;
771 #size-cells = <0>;
772 ti,hwmods = "qspi";
773 clocks = <&qspi_gfclk_div>;
774 clock-names = "fck";
775 num-cs = <4>;
776 interrupts = <0 343 0x4>;
777 status = "disabled";
778 };
779
780 omap_control_sata: control-phy@4a002374 {
781 compatible = "ti,control-phy-pipe3";
782 reg = <0x4a002374 0x4>;
783 reg-names = "power";
784 clocks = <&sys_clkin1>;
785 clock-names = "sysclk";
786 };
787
788 /* OCP2SCP3 */
789 ocp2scp@4a090000 {
790 compatible = "ti,omap-ocp2scp";
791 #address-cells = <1>;
792 #size-cells = <1>;
793 ranges;
794 reg = <0x4a090000 0x20>;
795 ti,hwmods = "ocp2scp3";
796 sata_phy: phy@4A096000 {
797 compatible = "ti,phy-pipe3-sata";
798 reg = <0x4A096000 0x80>, /* phy_rx */
799 <0x4A096400 0x64>, /* phy_tx */
800 <0x4A096800 0x40>; /* pll_ctrl */
801 reg-names = "phy_rx", "phy_tx", "pll_ctrl";
802 ctrl-module = <&omap_control_sata>;
803 clocks = <&sys_clkin1>;
804 clock-names = "sysclk";
805 #phy-cells = <0>;
806 };
807 };
808
809 sata: sata@4a141100 {
810 compatible = "snps,dwc-ahci";
811 reg = <0x4a140000 0x1100>, <0x4a141100 0x7>;
812 interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
813 phys = <&sata_phy>;
814 phy-names = "sata-phy";
815 clocks = <&sata_ref_clk>;
816 ti,hwmods = "sata";
817 };
818
819 omap_control_usb2phy1: control-phy@4a002300 {
820 compatible = "ti,control-phy-usb2";
821 reg = <0x4a002300 0x4>;
822 reg-names = "power";
823 };
824
825 omap_control_usb3phy1: control-phy@4a002370 {
826 compatible = "ti,control-phy-pipe3";
827 reg = <0x4a002370 0x4>;
828 reg-names = "power";
829 };
830
831 omap_control_usb2phy2: control-phy@0x4a002e74 {
832 compatible = "ti,control-phy-usb2-dra7";
833 reg = <0x4a002e74 0x4>;
834 reg-names = "power";
835 };
836
837 /* OCP2SCP1 */
838 ocp2scp@4a080000 {
839 compatible = "ti,omap-ocp2scp";
840 #address-cells = <1>;
841 #size-cells = <1>;
842 ranges;
843 reg = <0x4a080000 0x20>;
844 ti,hwmods = "ocp2scp1";
845
846 usb2_phy1: phy@4a084000 {
847 compatible = "ti,omap-usb2";
848 reg = <0x4a084000 0x400>;
849 ctrl-module = <&omap_control_usb2phy1>;
850 clocks = <&usb_phy1_always_on_clk32k>,
851 <&usb_otg_ss1_refclk960m>;
852 clock-names = "wkupclk",
853 "refclk";
854 #phy-cells = <0>;
855 };
856
857 usb2_phy2: phy@4a085000 {
858 compatible = "ti,omap-usb2";
859 reg = <0x4a085000 0x400>;
860 ctrl-module = <&omap_control_usb2phy2>;
861 clocks = <&usb_phy2_always_on_clk32k>,
862 <&usb_otg_ss2_refclk960m>;
863 clock-names = "wkupclk",
864 "refclk";
865 #phy-cells = <0>;
866 };
867
868 usb3_phy1: phy@4a084400 {
869 compatible = "ti,omap-usb3";
870 reg = <0x4a084400 0x80>,
871 <0x4a084800 0x64>,
872 <0x4a084c00 0x40>;
873 reg-names = "phy_rx", "phy_tx", "pll_ctrl";
874 ctrl-module = <&omap_control_usb3phy1>;
875 clocks = <&usb_phy3_always_on_clk32k>,
876 <&sys_clkin1>,
877 <&usb_otg_ss1_refclk960m>;
878 clock-names = "wkupclk",
879 "sysclk",
880 "refclk";
881 #phy-cells = <0>;
882 };
883 };
884
885 omap_dwc3_1@48880000 {
886 compatible = "ti,dwc3";
887 ti,hwmods = "usb_otg_ss1";
888 reg = <0x48880000 0x10000>;
889 interrupts = <0 77 4>;
890 #address-cells = <1>;
891 #size-cells = <1>;
892 utmi-mode = <2>;
893 ranges;
894 usb1: usb@48890000 {
895 compatible = "snps,dwc3";
896 reg = <0x48890000 0x17000>;
897 interrupts = <0 76 4>;
898 phys = <&usb2_phy1>, <&usb3_phy1>;
899 phy-names = "usb2-phy", "usb3-phy";
900 tx-fifo-resize;
901 maximum-speed = "super-speed";
902 dr_mode = "otg";
903 };
904 };
905
906 omap_dwc3_2@488c0000 {
907 compatible = "ti,dwc3";
908 ti,hwmods = "usb_otg_ss2";
909 reg = <0x488c0000 0x10000>;
910 interrupts = <0 92 4>;
911 #address-cells = <1>;
912 #size-cells = <1>;
913 utmi-mode = <2>;
914 ranges;
915 usb2: usb@488d0000 {
916 compatible = "snps,dwc3";
917 reg = <0x488d0000 0x17000>;
918 interrupts = <0 78 4>;
919 phys = <&usb2_phy2>;
920 phy-names = "usb2-phy";
921 tx-fifo-resize;
922 maximum-speed = "high-speed";
923 dr_mode = "otg";
924 };
925 };
926
927 /* IRQ for DWC3_3 and DWC3_4 need IRQ crossbar */
928 omap_dwc3_3@48900000 {
929 compatible = "ti,dwc3";
930 ti,hwmods = "usb_otg_ss3";
931 reg = <0x48900000 0x10000>;
932 /* interrupts = <0 TBD 4>; */
933 #address-cells = <1>;
934 #size-cells = <1>;
935 utmi-mode = <2>;
936 ranges;
937 status = "disabled";
938 usb3: usb@48910000 {
939 compatible = "snps,dwc3";
940 reg = <0x48910000 0x17000>;
941 /* interrupts = <0 93 4>; */
942 tx-fifo-resize;
943 maximum-speed = "high-speed";
944 dr_mode = "otg";
945 };
946 };
947
948 omap_dwc3_4@48940000 {
949 compatible = "ti,dwc3";
950 ti,hwmods = "usb_otg_ss4";
951 reg = <0x48940000 0x10000>;
952 /* interrupts = <0 TBD 4>; */
953 #address-cells = <1>;
954 #size-cells = <1>;
955 utmi-mode = <2>;
956 ranges;
957 status = "disabled";
958 usb4: usb@48950000 {
959 compatible = "snps,dwc3";
960 reg = <0x48950000 0x17000>;
961 /* interrupts = <0 TBD 4>; */
962 tx-fifo-resize;
963 maximum-speed = "high-speed";
964 dr_mode = "otg";
965 };
966 };
967
968 elm: elm@48078000 {
969 compatible = "ti,am3352-elm";
970 reg = <0x48078000 0xfc0>; /* device IO registers */
971 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
972 ti,hwmods = "elm";
973 status = "disabled";
974 };
975
976 gpmc: gpmc@50000000 {
977 compatible = "ti,am3352-gpmc";
978 ti,hwmods = "gpmc";
979 reg = <0x50000000 0x37c>; /* device IO registers */
980 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
981 gpmc,num-cs = <8>;
982 gpmc,num-waitpins = <2>;
983 #address-cells = <2>;
984 #size-cells = <1>;
985 status = "disabled";
986 };
792 }; 987 };
793}; 988};
794 989
diff --git a/arch/arm/boot/dts/dra72-evm.dts b/arch/arm/boot/dts/dra72-evm.dts
new file mode 100644
index 000000000000..514702348818
--- /dev/null
+++ b/arch/arm/boot/dts/dra72-evm.dts
@@ -0,0 +1,24 @@
1/*
2 * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
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/dts-v1/;
9
10#include "dra72x.dtsi"
11
12/ {
13 model = "TI DRA722";
14 compatible = "ti,dra72-evm", "ti,dra722", "ti,dra72", "ti,dra7";
15
16 memory {
17 device_type = "memory";
18 reg = <0x80000000 0x40000000>; /* 1024 MB */
19 };
20};
21
22&uart1 {
23 status = "okay";
24};
diff --git a/arch/arm/boot/dts/dra72x.dtsi b/arch/arm/boot/dts/dra72x.dtsi
new file mode 100644
index 000000000000..f1ec22f6ebf4
--- /dev/null
+++ b/arch/arm/boot/dts/dra72x.dtsi
@@ -0,0 +1,25 @@
1/*
2 * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
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 * Based on "omap4.dtsi"
8 */
9
10#include "dra7.dtsi"
11
12/ {
13 compatible = "ti,dra722", "ti,dra72", "ti,dra7";
14
15 cpus {
16 #address-cells = <1>;
17 #size-cells = <0>;
18
19 cpu0: cpu@0 {
20 device_type = "cpu";
21 compatible = "arm,cortex-a15";
22 reg = <0>;
23 };
24 };
25};
diff --git a/arch/arm/boot/dts/dra74x.dtsi b/arch/arm/boot/dts/dra74x.dtsi
new file mode 100644
index 000000000000..a4e8bb9f95c0
--- /dev/null
+++ b/arch/arm/boot/dts/dra74x.dtsi
@@ -0,0 +1,41 @@
1/*
2 * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
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 * Based on "omap4.dtsi"
8 */
9
10#include "dra7.dtsi"
11
12/ {
13 compatible = "ti,dra742", "ti,dra74", "ti,dra7";
14
15 cpus {
16 #address-cells = <1>;
17 #size-cells = <0>;
18
19 cpu0: cpu@0 {
20 device_type = "cpu";
21 compatible = "arm,cortex-a15";
22 reg = <0>;
23
24 operating-points = <
25 /* kHz uV */
26 1000000 1060000
27 1176000 1160000
28 >;
29
30 clocks = <&dpll_mpu_ck>;
31 clock-names = "cpu";
32
33 clock-latency = <300000>; /* From omap-cpufreq driver */
34 };
35 cpu@1 {
36 device_type = "cpu";
37 compatible = "arm,cortex-a15";
38 reg = <1>;
39 };
40 };
41};
diff --git a/arch/arm/boot/dts/dra7xx-clocks.dtsi b/arch/arm/boot/dts/dra7xx-clocks.dtsi
index 264b9caa9eef..b03cfe49d22b 100644
--- a/arch/arm/boot/dts/dra7xx-clocks.dtsi
+++ b/arch/arm/boot/dts/dra7xx-clocks.dtsi
@@ -1386,6 +1386,14 @@
1386 ti,dividers = <1>, <8>; 1386 ti,dividers = <1>, <8>;
1387 }; 1387 };
1388 1388
1389 l3init_960m_gfclk: l3init_960m_gfclk {
1390 #clock-cells = <0>;
1391 compatible = "ti,gate-clock";
1392 clocks = <&dpll_usb_clkdcoldo>;
1393 ti,bit-shift = <8>;
1394 reg = <0x06c0>;
1395 };
1396
1389 dss_32khz_clk: dss_32khz_clk { 1397 dss_32khz_clk: dss_32khz_clk {
1390 #clock-cells = <0>; 1398 #clock-cells = <0>;
1391 compatible = "ti,gate-clock"; 1399 compatible = "ti,gate-clock";
@@ -1533,7 +1541,7 @@
1533 usb_otg_ss1_refclk960m: usb_otg_ss1_refclk960m { 1541 usb_otg_ss1_refclk960m: usb_otg_ss1_refclk960m {
1534 #clock-cells = <0>; 1542 #clock-cells = <0>;
1535 compatible = "ti,gate-clock"; 1543 compatible = "ti,gate-clock";
1536 clocks = <&dpll_usb_clkdcoldo>; 1544 clocks = <&l3init_960m_gfclk>;
1537 ti,bit-shift = <8>; 1545 ti,bit-shift = <8>;
1538 reg = <0x13f0>; 1546 reg = <0x13f0>;
1539 }; 1547 };
@@ -1541,7 +1549,7 @@
1541 usb_otg_ss2_refclk960m: usb_otg_ss2_refclk960m { 1549 usb_otg_ss2_refclk960m: usb_otg_ss2_refclk960m {
1542 #clock-cells = <0>; 1550 #clock-cells = <0>;
1543 compatible = "ti,gate-clock"; 1551 compatible = "ti,gate-clock";
1544 clocks = <&dpll_usb_clkdcoldo>; 1552 clocks = <&l3init_960m_gfclk>;
1545 ti,bit-shift = <8>; 1553 ti,bit-shift = <8>;
1546 reg = <0x1340>; 1554 reg = <0x1340>;
1547 }; 1555 };
diff --git a/arch/arm/boot/dts/exynos3250-pinctrl.dtsi b/arch/arm/boot/dts/exynos3250-pinctrl.dtsi
new file mode 100644
index 000000000000..47b92c150f4e
--- /dev/null
+++ b/arch/arm/boot/dts/exynos3250-pinctrl.dtsi
@@ -0,0 +1,475 @@
1/*
2 * Samsung's Exynos3250 SoCs pin-mux and pin-config device tree source
3 *
4 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com
6 *
7 * Samsung's Exynos3250 SoCs pin-mux and pin-config optiosn are listed as device
8 * tree nodes are listed in this file.
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&pinctrl_0 {
16 gpa0: gpa0 {
17 gpio-controller;
18 #gpio-cells = <2>;
19
20 interrupt-controller;
21 #interrupt-cells = <2>;
22 };
23
24 gpa1: gpa1 {
25 gpio-controller;
26 #gpio-cells = <2>;
27
28 interrupt-controller;
29 #interrupt-cells = <2>;
30 };
31
32 gpb: gpb {
33 gpio-controller;
34 #gpio-cells = <2>;
35
36 interrupt-controller;
37 #interrupt-cells = <2>;
38 };
39
40 gpc0: gpc0 {
41 gpio-controller;
42 #gpio-cells = <2>;
43
44 interrupt-controller;
45 #interrupt-cells = <2>;
46 };
47
48 gpc1: gpc1 {
49 gpio-controller;
50 #gpio-cells = <2>;
51
52 interrupt-controller;
53 #interrupt-cells = <2>;
54 };
55
56 gpd0: gpd0 {
57 gpio-controller;
58 #gpio-cells = <2>;
59
60 interrupt-controller;
61 #interrupt-cells = <2>;
62 };
63
64 gpd1: gpd1 {
65 gpio-controller;
66 #gpio-cells = <2>;
67
68 interrupt-controller;
69 #interrupt-cells = <2>;
70 };
71
72 uart0_data: uart0-data {
73 samsung,pins = "gpa0-0", "gpa0-1";
74 samsung,pin-function = <0x2>;
75 samsung,pin-pud = <0>;
76 samsung,pin-drv = <0>;
77 };
78
79 uart0_fctl: uart0-fctl {
80 samsung,pins = "gpa0-2", "gpa0-3";
81 samsung,pin-function = <2>;
82 samsung,pin-pud = <0>;
83 samsung,pin-drv = <0>;
84 };
85
86 uart1_data: uart1-data {
87 samsung,pins = "gpa0-4", "gpa0-5";
88 samsung,pin-function = <2>;
89 samsung,pin-pud = <0>;
90 samsung,pin-drv = <0>;
91 };
92
93 uart1_fctl: uart1-fctl {
94 samsung,pins = "gpa0-6", "gpa0-7";
95 samsung,pin-function = <2>;
96 samsung,pin-pud = <0>;
97 samsung,pin-drv = <0>;
98 };
99
100 i2c2_bus: i2c2-bus {
101 samsung,pins = "gpa0-6", "gpa0-7";
102 samsung,pin-function = <3>;
103 samsung,pin-pud = <3>;
104 samsung,pin-drv = <0>;
105 };
106
107 i2c3_bus: i2c3-bus {
108 samsung,pins = "gpa1-2", "gpa1-3";
109 samsung,pin-function = <3>;
110 samsung,pin-pud = <3>;
111 samsung,pin-drv = <0>;
112 };
113
114 spi0_bus: spi0-bus {
115 samsung,pins = "gpb-0", "gpb-2", "gpb-3";
116 samsung,pin-function = <2>;
117 samsung,pin-pud = <3>;
118 samsung,pin-drv = <0>;
119 };
120
121 i2c4_bus: i2c4-bus {
122 samsung,pins = "gpb-0", "gpb-1";
123 samsung,pin-function = <3>;
124 samsung,pin-pud = <3>;
125 samsung,pin-drv = <0>;
126 };
127
128 spi1_bus: spi1-bus {
129 samsung,pins = "gpb-4", "gpb-6", "gpb-7";
130 samsung,pin-function = <2>;
131 samsung,pin-pud = <3>;
132 samsung,pin-drv = <0>;
133 };
134
135 i2c5_bus: i2c5-bus {
136 samsung,pins = "gpb-2", "gpb-3";
137 samsung,pin-function = <3>;
138 samsung,pin-pud = <3>;
139 samsung,pin-drv = <0>;
140 };
141
142 i2s2_bus: i2s2-bus {
143 samsung,pins = "gpc1-0", "gpc1-1", "gpc1-2", "gpc1-3",
144 "gpc1-4";
145 samsung,pin-function = <2>;
146 samsung,pin-pud = <0>;
147 samsung,pin-drv = <0>;
148 };
149
150 pcm2_bus: pcm2-bus {
151 samsung,pins = "gpc1-0", "gpc1-1", "gpc1-2", "gpc1-3",
152 "gpc1-4";
153 samsung,pin-function = <3>;
154 samsung,pin-pud = <0>;
155 samsung,pin-drv = <0>;
156 };
157
158 i2c6_bus: i2c6-bus {
159 samsung,pins = "gpc1-3", "gpc1-4";
160 samsung,pin-function = <4>;
161 samsung,pin-pud = <3>;
162 samsung,pin-drv = <0>;
163 };
164
165 pwm0_out: pwm0-out {
166 samsung,pins = "gpd0-0";
167 samsung,pin-function = <2>;
168 samsung,pin-pud = <0>;
169 samsung,pin-drv = <0>;
170 };
171
172 pwm1_out: pwm1-out {
173 samsung,pins = "gpd0-1";
174 samsung,pin-function = <2>;
175 samsung,pin-pud = <0>;
176 samsung,pin-drv = <0>;
177 };
178
179 i2c7_bus: i2c7-bus {
180 samsung,pins = "gpd0-2", "gpd0-3";
181 samsung,pin-function = <3>;
182 samsung,pin-pud = <3>;
183 samsung,pin-drv = <0>;
184 };
185
186 pwm2_out: pwm2-out {
187 samsung,pins = "gpd0-2";
188 samsung,pin-function = <2>;
189 samsung,pin-pud = <0>;
190 samsung,pin-drv = <0>;
191 };
192
193 pwm3_out: pwm3-out {
194 samsung,pins = "gpd0-3";
195 samsung,pin-function = <2>;
196 samsung,pin-pud = <0>;
197 samsung,pin-drv = <0>;
198 };
199
200 i2c0_bus: i2c0-bus {
201 samsung,pins = "gpd1-0", "gpd1-1";
202 samsung,pin-function = <2>;
203 samsung,pin-pud = <3>;
204 samsung,pin-drv = <0>;
205 };
206
207 mipi0_clk: mipi0-clk {
208 samsung,pins = "gpd1-0", "gpd1-1";
209 samsung,pin-function = <3>;
210 samsung,pin-pud = <0>;
211 samsung,pin-drv = <0>;
212 };
213
214 i2c1_bus: i2c1-bus {
215 samsung,pins = "gpd1-2", "gpd1-3";
216 samsung,pin-function = <2>;
217 samsung,pin-pud = <3>;
218 samsung,pin-drv = <0>;
219 };
220};
221
222&pinctrl_1 {
223 gpe0: gpe0 {
224 gpio-controller;
225 #gpio-cells = <2>;
226 };
227
228 gpe1: gpe1 {
229 gpio-controller;
230 #gpio-cells = <2>;
231 };
232
233 gpe2: gpe2 {
234 gpio-controller;
235 #gpio-cells = <2>;
236 };
237
238 gpk0: gpk0 {
239 gpio-controller;
240 #gpio-cells = <2>;
241
242 interrupt-controller;
243 #interrupt-cells = <2>;
244 };
245
246 gpk1: gpk1 {
247 gpio-controller;
248 #gpio-cells = <2>;
249
250 interrupt-controller;
251 #interrupt-cells = <2>;
252 };
253
254 gpk2: gpk2 {
255 gpio-controller;
256 #gpio-cells = <2>;
257
258 interrupt-controller;
259 #interrupt-cells = <2>;
260 };
261
262 gpl0: gpl0 {
263 gpio-controller;
264 #gpio-cells = <2>;
265
266 interrupt-controller;
267 #interrupt-cells = <2>;
268 };
269
270 gpm0: gpm0 {
271 gpio-controller;
272 #gpio-cells = <2>;
273
274 interrupt-controller;
275 #interrupt-cells = <2>;
276 };
277
278 gpm1: gpm1 {
279 gpio-controller;
280 #gpio-cells = <2>;
281
282 interrupt-controller;
283 #interrupt-cells = <2>;
284 };
285
286 gpm2: gpm2 {
287 gpio-controller;
288 #gpio-cells = <2>;
289
290 interrupt-controller;
291 #interrupt-cells = <2>;
292 };
293
294 gpm3: gpm3 {
295 gpio-controller;
296 #gpio-cells = <2>;
297
298 interrupt-controller;
299 #interrupt-cells = <2>;
300 };
301
302 gpm4: gpm4 {
303 gpio-controller;
304 #gpio-cells = <2>;
305
306 interrupt-controller;
307 #interrupt-cells = <2>;
308 };
309
310 gpx0: gpx0 {
311 gpio-controller;
312 #gpio-cells = <2>;
313
314 interrupt-controller;
315 interrupt-parent = <&gic>;
316 interrupts = <0 32 0>, <0 33 0>, <0 34 0>, <0 35 0>,
317 <0 36 0>, <0 37 0>, <0 38 0>, <0 39 0>;
318 #interrupt-cells = <2>;
319 };
320
321 gpx1: gpx1 {
322 gpio-controller;
323 #gpio-cells = <2>;
324
325 interrupt-controller;
326 interrupt-parent = <&gic>;
327 interrupts = <0 40 0>, <0 41 0>, <0 42 0>, <0 43 0>,
328 <0 44 0>, <0 45 0>, <0 46 0>, <0 47 0>;
329 #interrupt-cells = <2>;
330 };
331
332 gpx2: gpx2 {
333 gpio-controller;
334 #gpio-cells = <2>;
335
336 interrupt-controller;
337 #interrupt-cells = <2>;
338 };
339
340 gpx3: gpx3 {
341 gpio-controller;
342 #gpio-cells = <2>;
343
344 interrupt-controller;
345 #interrupt-cells = <2>;
346 };
347
348 sd0_clk: sd0-clk {
349 samsung,pins = "gpk0-0";
350 samsung,pin-function = <2>;
351 samsung,pin-pud = <0>;
352 samsung,pin-drv = <3>;
353 };
354
355 sd0_cmd: sd0-cmd {
356 samsung,pins = "gpk0-1";
357 samsung,pin-function = <2>;
358 samsung,pin-pud = <0>;
359 samsung,pin-drv = <3>;
360 };
361
362 sd0_cd: sd0-cd {
363 samsung,pins = "gpk0-2";
364 samsung,pin-function = <2>;
365 samsung,pin-pud = <3>;
366 samsung,pin-drv = <3>;
367 };
368
369 sd0_rdqs: sd0-rdqs {
370 samsung,pins = "gpk0-7";
371 samsung,pin-function = <2>;
372 samsung,pin-pud = <0>;
373 samsung,pin-drv = <3>;
374 };
375
376 sd0_bus1: sd0-bus-width1 {
377 samsung,pins = "gpk0-3";
378 samsung,pin-function = <2>;
379 samsung,pin-pud = <3>;
380 samsung,pin-drv = <3>;
381 };
382
383 sd0_bus4: sd0-bus-width4 {
384 samsung,pins = "gpk0-4", "gpk0-5", "gpk0-6";
385 samsung,pin-function = <2>;
386 samsung,pin-pud = <3>;
387 samsung,pin-drv = <3>;
388 };
389
390 sd0_bus8: sd0-bus-width8 {
391 samsung,pins = "gpl0-0", "gpl0-1", "gpl0-2", "gpl0-3";
392 samsung,pin-function = <2>;
393 samsung,pin-pud = <3>;
394 samsung,pin-drv = <3>;
395 };
396
397 sd1_clk: sd1-clk {
398 samsung,pins = "gpk1-0";
399 samsung,pin-function = <2>;
400 samsung,pin-pud = <0>;
401 samsung,pin-drv = <3>;
402 };
403
404 sd1_cmd: sd1-cmd {
405 samsung,pins = "gpk1-1";
406 samsung,pin-function = <2>;
407 samsung,pin-pud = <0>;
408 samsung,pin-drv = <3>;
409 };
410
411 sd1_cd: sd1-cd {
412 samsung,pins = "gpk1-2";
413 samsung,pin-function = <2>;
414 samsung,pin-pud = <3>;
415 samsung,pin-drv = <3>;
416 };
417
418 sd1_bus1: sd1-bus-width1 {
419 samsung,pins = "gpk1-3";
420 samsung,pin-function = <2>;
421 samsung,pin-pud = <3>;
422 samsung,pin-drv = <3>;
423 };
424
425 sd1_bus4: sd1-bus-width4 {
426 samsung,pins = "gpk1-4", "gpk1-5", "gpk1-6";
427 samsung,pin-function = <2>;
428 samsung,pin-pud = <3>;
429 samsung,pin-drv = <3>;
430 };
431
432 cam_port_b_io: cam-port-b-io {
433 samsung,pins = "gpm0-0", "gpm0-1", "gpm0-2", "gpm0-3",
434 "gpm0-4", "gpm0-5", "gpm0-6", "gpm0-7",
435 "gpm1-0", "gpm1-1", "gpm2-0", "gpm2-1";
436 samsung,pin-function = <3>;
437 samsung,pin-pud = <3>;
438 samsung,pin-drv = <0>;
439 };
440
441 cam_port_b_clk_active: cam-port-b-clk-active {
442 samsung,pins = "gpm2-2";
443 samsung,pin-function = <3>;
444 samsung,pin-pud = <0>;
445 samsung,pin-drv = <3>;
446 };
447
448 cam_port_b_clk_idle: cam-port-b-clk-idle {
449 samsung,pins = "gpm2-2";
450 samsung,pin-function = <0>;
451 samsung,pin-pud = <0>;
452 samsung,pin-drv = <0>;
453 };
454
455 fimc_is_i2c0: fimc-is-i2c0 {
456 samsung,pins = "gpm4-0", "gpm4-1";
457 samsung,pin-function = <2>;
458 samsung,pin-pud = <0>;
459 samsung,pin-drv = <0>;
460 };
461
462 fimc_is_i2c1: fimc-is-i2c1 {
463 samsung,pins = "gpm4-2", "gpm4-3";
464 samsung,pin-function = <2>;
465 samsung,pin-pud = <0>;
466 samsung,pin-drv = <0>;
467 };
468
469 fimc_is_uart: fimc-is-uart {
470 samsung,pins = "gpm3-5", "gpm3-7";
471 samsung,pin-function = <3>;
472 samsung,pin-pud = <0>;
473 samsung,pin-drv = <0>;
474 };
475};
diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
new file mode 100644
index 000000000000..3e678fa335bf
--- /dev/null
+++ b/arch/arm/boot/dts/exynos3250.dtsi
@@ -0,0 +1,444 @@
1/*
2 * Samsung's Exynos3250 SoC device tree source
3 *
4 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com
6 *
7 * Samsung's Exynos3250 SoC device nodes are listed in this file. Exynos3250
8 * based board files can include this file and provide values for board specfic
9 * bindings.
10 *
11 * Note: This file does not include device nodes for all the controllers in
12 * Exynos3250 SoC. As device tree coverage for Exynos3250 increases, additional
13 * nodes can be added to this file.
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License version 2 as
17 * published by the Free Software Foundation.
18 */
19
20#include "skeleton.dtsi"
21#include <dt-bindings/clock/exynos3250.h>
22
23/ {
24 compatible = "samsung,exynos3250";
25 interrupt-parent = <&gic>;
26
27 aliases {
28 pinctrl0 = &pinctrl_0;
29 pinctrl1 = &pinctrl_1;
30 mshc0 = &mshc_0;
31 mshc1 = &mshc_1;
32 spi0 = &spi_0;
33 spi1 = &spi_1;
34 i2c0 = &i2c_0;
35 i2c1 = &i2c_1;
36 i2c2 = &i2c_2;
37 i2c3 = &i2c_3;
38 i2c4 = &i2c_4;
39 i2c5 = &i2c_5;
40 i2c6 = &i2c_6;
41 i2c7 = &i2c_7;
42 };
43
44 cpus {
45 #address-cells = <1>;
46 #size-cells = <0>;
47
48 cpu0: cpu@0 {
49 device_type = "cpu";
50 compatible = "arm,cortex-a7";
51 reg = <0>;
52 clock-frequency = <1000000000>;
53 };
54
55 cpu1: cpu@1 {
56 device_type = "cpu";
57 compatible = "arm,cortex-a7";
58 reg = <1>;
59 clock-frequency = <1000000000>;
60 };
61 };
62
63 soc: soc {
64 compatible = "simple-bus";
65 #address-cells = <1>;
66 #size-cells = <1>;
67 ranges;
68
69 fixed-rate-clocks {
70 #address-cells = <1>;
71 #size-cells = <0>;
72
73 xusbxti: clock@0 {
74 compatible = "fixed-clock";
75 #address-cells = <1>;
76 #size-cells = <0>;
77 reg = <0>;
78 clock-frequency = <0>;
79 #clock-cells = <0>;
80 clock-output-names = "xusbxti";
81 };
82
83 xxti: clock@1 {
84 compatible = "fixed-clock";
85 reg = <1>;
86 clock-frequency = <0>;
87 #clock-cells = <0>;
88 clock-output-names = "xxti";
89 };
90
91 xtcxo: clock@2 {
92 compatible = "fixed-clock";
93 reg = <2>;
94 clock-frequency = <0>;
95 #clock-cells = <0>;
96 clock-output-names = "xtcxo";
97 };
98 };
99
100 sysram@02020000 {
101 compatible = "mmio-sram";
102 reg = <0x02020000 0x40000>;
103 #address-cells = <1>;
104 #size-cells = <1>;
105 ranges = <0 0x02020000 0x40000>;
106
107 smp-sysram@0 {
108 compatible = "samsung,exynos4210-sysram";
109 reg = <0x0 0x1000>;
110 };
111
112 smp-sysram@3f000 {
113 compatible = "samsung,exynos4210-sysram-ns";
114 reg = <0x3f000 0x1000>;
115 };
116 };
117
118 chipid@10000000 {
119 compatible = "samsung,exynos4210-chipid";
120 reg = <0x10000000 0x100>;
121 };
122
123 sys_reg: syscon@10010000 {
124 compatible = "samsung,exynos3-sysreg", "syscon";
125 reg = <0x10010000 0x400>;
126 };
127
128 pmu_system_controller: system-controller@10020000 {
129 compatible = "samsung,exynos3250-pmu", "syscon";
130 reg = <0x10020000 0x4000>;
131 };
132
133 pd_cam: cam-power-domain@10023C00 {
134 compatible = "samsung,exynos4210-pd";
135 reg = <0x10023C00 0x20>;
136 };
137
138 pd_mfc: mfc-power-domain@10023C40 {
139 compatible = "samsung,exynos4210-pd";
140 reg = <0x10023C40 0x20>;
141 };
142
143 pd_g3d: g3d-power-domain@10023C60 {
144 compatible = "samsung,exynos4210-pd";
145 reg = <0x10023C60 0x20>;
146 };
147
148 pd_lcd0: lcd0-power-domain@10023C80 {
149 compatible = "samsung,exynos4210-pd";
150 reg = <0x10023C80 0x20>;
151 };
152
153 pd_isp: isp-power-domain@10023CA0 {
154 compatible = "samsung,exynos4210-pd";
155 reg = <0x10023CA0 0x20>;
156 };
157
158 cmu: clock-controller@10030000 {
159 compatible = "samsung,exynos3250-cmu";
160 reg = <0x10030000 0x20000>;
161 #clock-cells = <1>;
162 };
163
164 rtc: rtc@10070000 {
165 compatible = "samsung,s3c6410-rtc";
166 reg = <0x10070000 0x100>;
167 interrupts = <0 73 0>, <0 74 0>;
168 status = "disabled";
169 };
170
171 gic: interrupt-controller@10481000 {
172 compatible = "arm,cortex-a15-gic";
173 #interrupt-cells = <3>;
174 interrupt-controller;
175 reg = <0x10481000 0x1000>,
176 <0x10482000 0x1000>,
177 <0x10484000 0x2000>,
178 <0x10486000 0x2000>;
179 interrupts = <1 9 0xf04>;
180 };
181
182 mct@10050000 {
183 compatible = "samsung,exynos4210-mct";
184 reg = <0x10050000 0x800>;
185 interrupts = <0 218 0>, <0 219 0>, <0 220 0>, <0 221 0>,
186 <0 223 0>, <0 226 0>, <0 227 0>, <0 228 0>;
187 clocks = <&cmu CLK_FIN_PLL>, <&cmu CLK_MCT>;
188 clock-names = "fin_pll", "mct";
189 };
190
191 pinctrl_1: pinctrl@11000000 {
192 compatible = "samsung,exynos3250-pinctrl";
193 reg = <0x11000000 0x1000>;
194 interrupts = <0 225 0>;
195
196 wakeup-interrupt-controller {
197 compatible = "samsung,exynos4210-wakeup-eint";
198 interrupt-parent = <&gic>;
199 interrupts = <0 48 0>;
200 };
201 };
202
203 pinctrl_0: pinctrl@11400000 {
204 compatible = "samsung,exynos3250-pinctrl";
205 reg = <0x11400000 0x1000>;
206 interrupts = <0 240 0>;
207 };
208
209 mshc_0: mshc@12510000 {
210 compatible = "samsung,exynos5250-dw-mshc";
211 reg = <0x12510000 0x1000>;
212 interrupts = <0 142 0>;
213 clocks = <&cmu CLK_SDMMC0>, <&cmu CLK_SCLK_MMC0>;
214 clock-names = "biu", "ciu";
215 fifo-depth = <0x80>;
216 #address-cells = <1>;
217 #size-cells = <0>;
218 status = "disabled";
219 };
220
221 mshc_1: mshc@12520000 {
222 compatible = "samsung,exynos5250-dw-mshc";
223 reg = <0x12520000 0x1000>;
224 interrupts = <0 143 0>;
225 clocks = <&cmu CLK_SDMMC1>, <&cmu CLK_SCLK_MMC1>;
226 clock-names = "biu", "ciu";
227 fifo-depth = <0x80>;
228 #address-cells = <1>;
229 #size-cells = <0>;
230 status = "disabled";
231 };
232
233 amba {
234 compatible = "arm,amba-bus";
235 #address-cells = <1>;
236 #size-cells = <1>;
237 interrupt-parent = <&gic>;
238 ranges;
239
240 pdma0: pdma@12680000 {
241 compatible = "arm,pl330", "arm,primecell";
242 reg = <0x12680000 0x1000>;
243 interrupts = <0 138 0>;
244 clocks = <&cmu CLK_PDMA0>;
245 clock-names = "apb_pclk";
246 #dma-cells = <1>;
247 #dma-channels = <8>;
248 #dma-requests = <32>;
249 };
250
251 pdma1: pdma@12690000 {
252 compatible = "arm,pl330", "arm,primecell";
253 reg = <0x12690000 0x1000>;
254 interrupts = <0 139 0>;
255 clocks = <&cmu CLK_PDMA1>;
256 clock-names = "apb_pclk";
257 #dma-cells = <1>;
258 #dma-channels = <8>;
259 #dma-requests = <32>;
260 };
261 };
262
263 adc: adc@126C0000 {
264 compatible = "samsung,exynos-adc-v3";
265 reg = <0x126C0000 0x100>, <0x10020718 0x4>;
266 interrupts = <0 137 0>;
267 clock-names = "adc", "sclk_tsadc";
268 clocks = <&cmu CLK_TSADC>, <&cmu CLK_SCLK_TSADC>;
269 #io-channel-cells = <1>;
270 io-channel-ranges;
271 status = "disabled";
272 };
273
274 serial_0: serial@13800000 {
275 compatible = "samsung,exynos4210-uart";
276 reg = <0x13800000 0x100>;
277 interrupts = <0 109 0>;
278 clocks = <&cmu CLK_UART0>, <&cmu CLK_SCLK_UART0>;
279 clock-names = "uart", "clk_uart_baud0";
280 status = "disabled";
281 };
282
283 serial_1: serial@13810000 {
284 compatible = "samsung,exynos4210-uart";
285 reg = <0x13810000 0x100>;
286 interrupts = <0 110 0>;
287 clocks = <&cmu CLK_UART1>, <&cmu CLK_SCLK_UART1>;
288 clock-names = "uart", "clk_uart_baud0";
289 status = "disabled";
290 };
291
292 i2c_0: i2c@13860000 {
293 #address-cells = <1>;
294 #size-cells = <0>;
295 compatible = "samsung,s3c2440-i2c";
296 reg = <0x13860000 0x100>;
297 interrupts = <0 113 0>;
298 clocks = <&cmu CLK_I2C0>;
299 clock-names = "i2c";
300 pinctrl-names = "default";
301 pinctrl-0 = <&i2c0_bus>;
302 status = "disabled";
303 };
304
305 i2c_1: i2c@13870000 {
306 #address-cells = <1>;
307 #size-cells = <0>;
308 compatible = "samsung,s3c2440-i2c";
309 reg = <0x13870000 0x100>;
310 interrupts = <0 114 0>;
311 clocks = <&cmu CLK_I2C1>;
312 clock-names = "i2c";
313 pinctrl-names = "default";
314 pinctrl-0 = <&i2c1_bus>;
315 status = "disabled";
316 };
317
318 i2c_2: i2c@13880000 {
319 #address-cells = <1>;
320 #size-cells = <0>;
321 compatible = "samsung,s3c2440-i2c";
322 reg = <0x13880000 0x100>;
323 interrupts = <0 115 0>;
324 clocks = <&cmu CLK_I2C2>;
325 clock-names = "i2c";
326 pinctrl-names = "default";
327 pinctrl-0 = <&i2c2_bus>;
328 status = "disabled";
329 };
330
331 i2c_3: i2c@13890000 {
332 #address-cells = <1>;
333 #size-cells = <0>;
334 compatible = "samsung,s3c2440-i2c";
335 reg = <0x13890000 0x100>;
336 interrupts = <0 116 0>;
337 clocks = <&cmu CLK_I2C3>;
338 clock-names = "i2c";
339 pinctrl-names = "default";
340 pinctrl-0 = <&i2c3_bus>;
341 status = "disabled";
342 };
343
344 i2c_4: i2c@138A0000 {
345 #address-cells = <1>;
346 #size-cells = <0>;
347 compatible = "samsung,s3c2440-i2c";
348 reg = <0x138A0000 0x100>;
349 interrupts = <0 117 0>;
350 clocks = <&cmu CLK_I2C4>;
351 clock-names = "i2c";
352 pinctrl-names = "default";
353 pinctrl-0 = <&i2c4_bus>;
354 status = "disabled";
355 };
356
357 i2c_5: i2c@138B0000 {
358 #address-cells = <1>;
359 #size-cells = <0>;
360 compatible = "samsung,s3c2440-i2c";
361 reg = <0x138B0000 0x100>;
362 interrupts = <0 118 0>;
363 clocks = <&cmu CLK_I2C5>;
364 clock-names = "i2c";
365 pinctrl-names = "default";
366 pinctrl-0 = <&i2c5_bus>;
367 status = "disabled";
368 };
369
370 i2c_6: i2c@138C0000 {
371 #address-cells = <1>;
372 #size-cells = <0>;
373 compatible = "samsung,s3c2440-i2c";
374 reg = <0x138C0000 0x100>;
375 interrupts = <0 119 0>;
376 clocks = <&cmu CLK_I2C6>;
377 clock-names = "i2c";
378 pinctrl-names = "default";
379 pinctrl-0 = <&i2c6_bus>;
380 status = "disabled";
381 };
382
383 i2c_7: i2c@138D0000 {
384 #address-cells = <1>;
385 #size-cells = <0>;
386 compatible = "samsung,s3c2440-i2c";
387 reg = <0x138D0000 0x100>;
388 interrupts = <0 120 0>;
389 clocks = <&cmu CLK_I2C7>;
390 clock-names = "i2c";
391 pinctrl-names = "default";
392 pinctrl-0 = <&i2c7_bus>;
393 status = "disabled";
394 };
395
396 spi_0: spi@13920000 {
397 compatible = "samsung,exynos4210-spi";
398 reg = <0x13920000 0x100>;
399 interrupts = <0 121 0>;
400 dmas = <&pdma0 7>, <&pdma0 6>;
401 dma-names = "tx", "rx";
402 #address-cells = <1>;
403 #size-cells = <0>;
404 clocks = <&cmu CLK_SPI0>, <&cmu CLK_SCLK_SPI0>;
405 clock-names = "spi", "spi_busclk0";
406 samsung,spi-src-clk = <0>;
407 pinctrl-names = "default";
408 pinctrl-0 = <&spi0_bus>;
409 status = "disabled";
410 };
411
412 spi_1: spi@13930000 {
413 compatible = "samsung,exynos4210-spi";
414 reg = <0x13930000 0x100>;
415 interrupts = <0 122 0>;
416 dmas = <&pdma1 7>, <&pdma1 6>;
417 dma-names = "tx", "rx";
418 #address-cells = <1>;
419 #size-cells = <0>;
420 clocks = <&cmu CLK_SPI1>, <&cmu CLK_SCLK_SPI1>;
421 clock-names = "spi", "spi_busclk0";
422 samsung,spi-src-clk = <0>;
423 pinctrl-names = "default";
424 pinctrl-0 = <&spi1_bus>;
425 status = "disabled";
426 };
427
428 pwm: pwm@139D0000 {
429 compatible = "samsung,exynos4210-pwm";
430 reg = <0x139D0000 0x1000>;
431 interrupts = <0 104 0>, <0 105 0>, <0 106 0>,
432 <0 107 0>, <0 108 0>;
433 #pwm-cells = <3>;
434 status = "disabled";
435 };
436
437 pmu {
438 compatible = "arm,cortex-a7-pmu";
439 interrupts = <0 18 0>, <0 19 0>;
440 };
441 };
442};
443
444#include "exynos3250-pinctrl.dtsi"
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index 2f8bcd068d17..b8ece4be41ca 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -20,6 +20,7 @@
20 */ 20 */
21 21
22#include <dt-bindings/clock/exynos4.h> 22#include <dt-bindings/clock/exynos4.h>
23#include <dt-bindings/clock/exynos-audss-clk.h>
23#include "skeleton.dtsi" 24#include "skeleton.dtsi"
24 25
25/ { 26/ {
@@ -45,6 +46,23 @@
45 fimc3 = &fimc_3; 46 fimc3 = &fimc_3;
46 }; 47 };
47 48
49 clock_audss: clock-controller@03810000 {
50 compatible = "samsung,exynos4210-audss-clock";
51 reg = <0x03810000 0x0C>;
52 #clock-cells = <1>;
53 };
54
55 i2s0: i2s@03830000 {
56 compatible = "samsung,s5pv210-i2s";
57 reg = <0x03830000 0x100>;
58 clocks = <&clock_audss EXYNOS_I2S_BUS>;
59 clock-names = "iis";
60 dmas = <&pdma0 12>, <&pdma0 11>, <&pdma0 10>;
61 dma-names = "tx", "rx", "tx-sec";
62 samsung,idma-addr = <0x03000000>;
63 status = "disabled";
64 };
65
48 chipid@10000000 { 66 chipid@10000000 {
49 compatible = "samsung,exynos4210-chipid"; 67 compatible = "samsung,exynos4210-chipid";
50 reg = <0x10000000 0x100>; 68 reg = <0x10000000 0x100>;
@@ -110,6 +128,11 @@
110 reg = <0x10010000 0x400>; 128 reg = <0x10010000 0x400>;
111 }; 129 };
112 130
131 pmu_system_controller: system-controller@10020000 {
132 compatible = "samsung,exynos4210-pmu", "syscon";
133 reg = <0x10020000 0x4000>;
134 };
135
113 dsi_0: dsi@11C80000 { 136 dsi_0: dsi@11C80000 {
114 compatible = "samsung,exynos4210-mipi-dsi"; 137 compatible = "samsung,exynos4210-mipi-dsi";
115 reg = <0x11C80000 0x10000>; 138 reg = <0x11C80000 0x10000>;
@@ -117,7 +140,7 @@
117 samsung,power-domain = <&pd_lcd0>; 140 samsung,power-domain = <&pd_lcd0>;
118 phys = <&mipi_phy 1>; 141 phys = <&mipi_phy 1>;
119 phy-names = "dsim"; 142 phy-names = "dsim";
120 clocks = <&clock 286>, <&clock 143>; 143 clocks = <&clock CLK_DSIM0>, <&clock CLK_SCLK_MIPI0>;
121 clock-names = "bus_clk", "pll_clk"; 144 clock-names = "bus_clk", "pll_clk";
122 status = "disabled"; 145 status = "disabled";
123 #address-cells = <1>; 146 #address-cells = <1>;
@@ -129,12 +152,10 @@
129 status = "disabled"; 152 status = "disabled";
130 #address-cells = <1>; 153 #address-cells = <1>;
131 #size-cells = <1>; 154 #size-cells = <1>;
155 #clock-cells = <1>;
156 clock-output-names = "cam_a_clkout", "cam_b_clkout";
132 ranges; 157 ranges;
133 158
134 clock_cam: clock-controller {
135 #clock-cells = <1>;
136 };
137
138 fimc_0: fimc@11800000 { 159 fimc_0: fimc@11800000 {
139 compatible = "samsung,exynos4210-fimc"; 160 compatible = "samsung,exynos4210-fimc";
140 reg = <0x11800000 0x1000>; 161 reg = <0x11800000 0x1000>;
@@ -273,6 +294,27 @@
273 status = "disabled"; 294 status = "disabled";
274 }; 295 };
275 296
297 exynos_usbphy: exynos-usbphy@125B0000 {
298 compatible = "samsung,exynos4210-usb2-phy";
299 reg = <0x125B0000 0x100>;
300 samsung,pmureg-phandle = <&pmu_system_controller>;
301 clocks = <&clock CLK_USB_DEVICE>, <&clock CLK_XUSBXTI>;
302 clock-names = "phy", "ref";
303 #phy-cells = <1>;
304 status = "disabled";
305 };
306
307 hsotg@12480000 {
308 compatible = "samsung,s3c6400-hsotg";
309 reg = <0x12480000 0x20000>;
310 interrupts = <0 71 0>;
311 clocks = <&clock CLK_USB_DEVICE>;
312 clock-names = "otg";
313 phys = <&exynos_usbphy 0>;
314 phy-names = "usb2-phy";
315 status = "disabled";
316 };
317
276 ehci@12580000 { 318 ehci@12580000 {
277 compatible = "samsung,exynos4210-ehci"; 319 compatible = "samsung,exynos4210-ehci";
278 reg = <0x12580000 0x100>; 320 reg = <0x12580000 0x100>;
@@ -291,6 +333,26 @@
291 status = "disabled"; 333 status = "disabled";
292 }; 334 };
293 335
336 i2s1: i2s@13960000 {
337 compatible = "samsung,s5pv210-i2s";
338 reg = <0x13960000 0x100>;
339 clocks = <&clock CLK_I2S1>;
340 clock-names = "iis";
341 dmas = <&pdma1 12>, <&pdma1 11>;
342 dma-names = "tx", "rx";
343 status = "disabled";
344 };
345
346 i2s2: i2s@13970000 {
347 compatible = "samsung,s5pv210-i2s";
348 reg = <0x13970000 0x100>;
349 clocks = <&clock CLK_I2S2>;
350 clock-names = "iis";
351 dmas = <&pdma0 14>, <&pdma0 13>;
352 dma-names = "tx", "rx";
353 status = "disabled";
354 };
355
294 mfc: codec@13400000 { 356 mfc: codec@13400000 {
295 compatible = "samsung,mfc-v5"; 357 compatible = "samsung,mfc-v5";
296 reg = <0x13400000 0x10000>; 358 reg = <0x13400000 0x10000>;
@@ -371,6 +433,8 @@
371 interrupts = <0 60 0>; 433 interrupts = <0 60 0>;
372 clocks = <&clock CLK_I2C2>; 434 clocks = <&clock CLK_I2C2>;
373 clock-names = "i2c"; 435 clock-names = "i2c";
436 pinctrl-names = "default";
437 pinctrl-0 = <&i2c2_bus>;
374 status = "disabled"; 438 status = "disabled";
375 }; 439 };
376 440
@@ -382,6 +446,8 @@
382 interrupts = <0 61 0>; 446 interrupts = <0 61 0>;
383 clocks = <&clock CLK_I2C3>; 447 clocks = <&clock CLK_I2C3>;
384 clock-names = "i2c"; 448 clock-names = "i2c";
449 pinctrl-names = "default";
450 pinctrl-0 = <&i2c3_bus>;
385 status = "disabled"; 451 status = "disabled";
386 }; 452 };
387 453
@@ -393,6 +459,8 @@
393 interrupts = <0 62 0>; 459 interrupts = <0 62 0>;
394 clocks = <&clock CLK_I2C4>; 460 clocks = <&clock CLK_I2C4>;
395 clock-names = "i2c"; 461 clock-names = "i2c";
462 pinctrl-names = "default";
463 pinctrl-0 = <&i2c4_bus>;
396 status = "disabled"; 464 status = "disabled";
397 }; 465 };
398 466
@@ -404,6 +472,8 @@
404 interrupts = <0 63 0>; 472 interrupts = <0 63 0>;
405 clocks = <&clock CLK_I2C5>; 473 clocks = <&clock CLK_I2C5>;
406 clock-names = "i2c"; 474 clock-names = "i2c";
475 pinctrl-names = "default";
476 pinctrl-0 = <&i2c5_bus>;
407 status = "disabled"; 477 status = "disabled";
408 }; 478 };
409 479
@@ -415,6 +485,8 @@
415 interrupts = <0 64 0>; 485 interrupts = <0 64 0>;
416 clocks = <&clock CLK_I2C6>; 486 clocks = <&clock CLK_I2C6>;
417 clock-names = "i2c"; 487 clock-names = "i2c";
488 pinctrl-names = "default";
489 pinctrl-0 = <&i2c6_bus>;
418 status = "disabled"; 490 status = "disabled";
419 }; 491 };
420 492
@@ -426,6 +498,8 @@
426 interrupts = <0 65 0>; 498 interrupts = <0 65 0>;
427 clocks = <&clock CLK_I2C7>; 499 clocks = <&clock CLK_I2C7>;
428 clock-names = "i2c"; 500 clock-names = "i2c";
501 pinctrl-names = "default";
502 pinctrl-0 = <&i2c7_bus>;
429 status = "disabled"; 503 status = "disabled";
430 }; 504 };
431 505
diff --git a/arch/arm/boot/dts/exynos4210-origen.dts b/arch/arm/boot/dts/exynos4210-origen.dts
index 72fb11f7ea21..f767c425d0b5 100644
--- a/arch/arm/boot/dts/exynos4210-origen.dts
+++ b/arch/arm/boot/dts/exynos4210-origen.dts
@@ -16,6 +16,7 @@
16 16
17/dts-v1/; 17/dts-v1/;
18#include "exynos4210.dtsi" 18#include "exynos4210.dtsi"
19#include <dt-bindings/input/input.h>
19 20
20/ { 21/ {
21 model = "Insignal Origen evaluation board based on Exynos4210"; 22 model = "Insignal Origen evaluation board based on Exynos4210";
@@ -48,6 +49,14 @@
48 }; 49 };
49 }; 50 };
50 51
52 watchdog@10060000 {
53 status = "okay";
54 };
55
56 rtc@10070000 {
57 status = "okay";
58 };
59
51 tmu@100C0000 { 60 tmu@100C0000 {
52 status = "okay"; 61 status = "okay";
53 }; 62 };
@@ -251,35 +260,35 @@
251 up { 260 up {
252 label = "Up"; 261 label = "Up";
253 gpios = <&gpx2 0 1>; 262 gpios = <&gpx2 0 1>;
254 linux,code = <103>; 263 linux,code = <KEY_UP>;
255 gpio-key,wakeup; 264 gpio-key,wakeup;
256 }; 265 };
257 266
258 down { 267 down {
259 label = "Down"; 268 label = "Down";
260 gpios = <&gpx2 1 1>; 269 gpios = <&gpx2 1 1>;
261 linux,code = <108>; 270 linux,code = <KEY_DOWN>;
262 gpio-key,wakeup; 271 gpio-key,wakeup;
263 }; 272 };
264 273
265 back { 274 back {
266 label = "Back"; 275 label = "Back";
267 gpios = <&gpx1 7 1>; 276 gpios = <&gpx1 7 1>;
268 linux,code = <158>; 277 linux,code = <KEY_BACK>;
269 gpio-key,wakeup; 278 gpio-key,wakeup;
270 }; 279 };
271 280
272 home { 281 home {
273 label = "Home"; 282 label = "Home";
274 gpios = <&gpx1 6 1>; 283 gpios = <&gpx1 6 1>;
275 linux,code = <102>; 284 linux,code = <KEY_HOME>;
276 gpio-key,wakeup; 285 gpio-key,wakeup;
277 }; 286 };
278 287
279 menu { 288 menu {
280 label = "Menu"; 289 label = "Menu";
281 gpios = <&gpx1 5 1>; 290 gpios = <&gpx1 5 1>;
282 linux,code = <139>; 291 linux,code = <KEY_MENU>;
283 gpio-key,wakeup; 292 gpio-key,wakeup;
284 }; 293 };
285 }; 294 };
diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts
index 63aa2bb24a4b..f516da9e8b3a 100644
--- a/arch/arm/boot/dts/exynos4210-trats.dts
+++ b/arch/arm/boot/dts/exynos4210-trats.dts
@@ -88,6 +88,12 @@
88 }; 88 };
89 }; 89 };
90 90
91 hsotg@12480000 {
92 vusb_d-supply = <&vusb_reg>;
93 vusb_a-supply = <&vusbdac_reg>;
94 status = "okay";
95 };
96
91 sdhci_emmc: sdhci@12510000 { 97 sdhci_emmc: sdhci@12510000 {
92 bus-width = <8>; 98 bus-width = <8>;
93 non-removable; 99 non-removable;
@@ -97,6 +103,10 @@
97 status = "okay"; 103 status = "okay";
98 }; 104 };
99 105
106 exynos-usbphy@125B0000 {
107 status = "okay";
108 };
109
100 serial@13800000 { 110 serial@13800000 {
101 status = "okay"; 111 status = "okay";
102 }; 112 };
diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts b/arch/arm/boot/dts/exynos4210-universal_c210.dts
index 63e34b24b04f..d50eb3aa708e 100644
--- a/arch/arm/boot/dts/exynos4210-universal_c210.dts
+++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts
@@ -28,6 +28,21 @@
28 bootargs = "console=ttySAC2,115200N8 root=/dev/mmcblk0p5 rw rootwait earlyprintk panic=5 maxcpus=1"; 28 bootargs = "console=ttySAC2,115200N8 root=/dev/mmcblk0p5 rw rootwait earlyprintk panic=5 maxcpus=1";
29 }; 29 };
30 30
31 sysram@02020000 {
32 smp-sysram@0 {
33 status = "disabled";
34 };
35
36 smp-sysram@5000 {
37 compatible = "samsung,exynos4210-sysram";
38 reg = <0x5000 0x1000>;
39 };
40
41 smp-sysram@1f000 {
42 status = "disabled";
43 };
44 };
45
31 mct@10050000 { 46 mct@10050000 {
32 compatible = "none"; 47 compatible = "none";
33 }; 48 };
@@ -53,6 +68,12 @@
53 enable-active-high; 68 enable-active-high;
54 }; 69 };
55 70
71 hsotg@12480000 {
72 vusb_d-supply = <&ldo3_reg>;
73 vusb_a-supply = <&ldo8_reg>;
74 status = "okay";
75 };
76
56 sdhci_emmc: sdhci@12510000 { 77 sdhci_emmc: sdhci@12510000 {
57 bus-width = <8>; 78 bus-width = <8>;
58 non-removable; 79 non-removable;
@@ -62,6 +83,34 @@
62 status = "okay"; 83 status = "okay";
63 }; 84 };
64 85
86 sdhci_sd: sdhci@12530000 {
87 bus-width = <4>;
88 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>;
89 pinctrl-names = "default";
90 vmmc-supply = <&ldo5_reg>;
91 cd-gpios = <&gpx3 4 0>;
92 cd-inverted;
93 status = "okay";
94 };
95
96 ehci@12580000 {
97 status = "okay";
98 port@0 {
99 status = "okay";
100 };
101 };
102
103 ohci@12590000 {
104 status = "okay";
105 port@0 {
106 status = "okay";
107 };
108 };
109
110 exynos-usbphy@125B0000 {
111 status = "okay";
112 };
113
65 serial@13800000 { 114 serial@13800000 {
66 status = "okay"; 115 status = "okay";
67 }; 116 };
@@ -201,6 +250,7 @@
201 regulator-name = "VUSB+MIPI_1.1V"; 250 regulator-name = "VUSB+MIPI_1.1V";
202 regulator-min-microvolt = <1100000>; 251 regulator-min-microvolt = <1100000>;
203 regulator-max-microvolt = <1100000>; 252 regulator-max-microvolt = <1100000>;
253 regulator-always-on;
204 }; 254 };
205 255
206 ldo4_reg: LDO4 { 256 ldo4_reg: LDO4 {
@@ -231,6 +281,7 @@
231 regulator-name = "VUSB+VDAC_3.3V"; 281 regulator-name = "VUSB+VDAC_3.3V";
232 regulator-min-microvolt = <3300000>; 282 regulator-min-microvolt = <3300000>;
233 regulator-max-microvolt = <3300000>; 283 regulator-max-microvolt = <3300000>;
284 regulator-always-on;
234 }; 285 };
235 286
236 ldo9_reg: LDO9 { 287 ldo9_reg: LDO9 {
@@ -413,6 +464,29 @@
413 compatible = "samsung,s5p6440-pwm"; 464 compatible = "samsung,s5p6440-pwm";
414 status = "okay"; 465 status = "okay";
415 }; 466 };
467
468 camera {
469 status = "okay";
470
471 pinctrl-names = "default";
472 pinctrl-0 = <>;
473
474 fimc_0: fimc@11800000 {
475 status = "okay";
476 };
477
478 fimc_1: fimc@11810000 {
479 status = "okay";
480 };
481
482 fimc_2: fimc@11820000 {
483 status = "okay";
484 };
485
486 fimc_3: fimc@11830000 {
487 status = "okay";
488 };
489 };
416}; 490};
417 491
418&mdma1 { 492&mdma1 {
diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi
index cacf6140dd2f..ee3001f38821 100644
--- a/arch/arm/boot/dts/exynos4210.dtsi
+++ b/arch/arm/boot/dts/exynos4210.dtsi
@@ -31,6 +31,24 @@
31 pinctrl2 = &pinctrl_2; 31 pinctrl2 = &pinctrl_2;
32 }; 32 };
33 33
34 sysram@02020000 {
35 compatible = "mmio-sram";
36 reg = <0x02020000 0x20000>;
37 #address-cells = <1>;
38 #size-cells = <1>;
39 ranges = <0 0x02020000 0x20000>;
40
41 smp-sysram@0 {
42 compatible = "samsung,exynos4210-sysram";
43 reg = <0x0 0x1000>;
44 };
45
46 smp-sysram@1f000 {
47 compatible = "samsung,exynos4210-sysram-ns";
48 reg = <0x1f000 0x1000>;
49 };
50 };
51
34 pd_lcd1: lcd1-power-domain@10023CA0 { 52 pd_lcd1: lcd1-power-domain@10023CA0 {
35 compatible = "samsung,exynos4210-pd"; 53 compatible = "samsung,exynos4210-pd";
36 reg = <0x10023CA0 0x20>; 54 reg = <0x10023CA0 0x20>;
diff --git a/arch/arm/boot/dts/exynos4412-origen.dts b/arch/arm/boot/dts/exynos4412-origen.dts
index e2c0dcab4d81..e925c9fbfb07 100644
--- a/arch/arm/boot/dts/exynos4412-origen.dts
+++ b/arch/arm/boot/dts/exynos4412-origen.dts
@@ -14,6 +14,7 @@
14 14
15/dts-v1/; 15/dts-v1/;
16#include "exynos4412.dtsi" 16#include "exynos4412.dtsi"
17#include <dt-bindings/input/input.h>
17 18
18/ { 19/ {
19 model = "Insignal Origen evaluation board based on Exynos4412"; 20 model = "Insignal Origen evaluation board based on Exynos4412";
@@ -48,6 +49,14 @@
48 }; 49 };
49 }; 50 };
50 51
52 watchdog@10060000 {
53 status = "okay";
54 };
55
56 rtc@10070000 {
57 status = "okay";
58 };
59
51 pinctrl@11000000 { 60 pinctrl@11000000 {
52 keypad_rows: keypad-rows { 61 keypad_rows: keypad-rows {
53 samsung,pins = "gpx2-0", "gpx2-1", "gpx2-2"; 62 samsung,pins = "gpx2-0", "gpx2-1", "gpx2-2";
@@ -76,37 +85,37 @@
76 key_home { 85 key_home {
77 keypad,row = <0>; 86 keypad,row = <0>;
78 keypad,column = <0>; 87 keypad,column = <0>;
79 linux,code = <102>; 88 linux,code = <KEY_HOME>;
80 }; 89 };
81 90
82 key_down { 91 key_down {
83 keypad,row = <0>; 92 keypad,row = <0>;
84 keypad,column = <1>; 93 keypad,column = <1>;
85 linux,code = <108>; 94 linux,code = <KEY_DOWN>;
86 }; 95 };
87 96
88 key_up { 97 key_up {
89 keypad,row = <1>; 98 keypad,row = <1>;
90 keypad,column = <0>; 99 keypad,column = <0>;
91 linux,code = <103>; 100 linux,code = <KEY_UP>;
92 }; 101 };
93 102
94 key_menu { 103 key_menu {
95 keypad,row = <1>; 104 keypad,row = <1>;
96 keypad,column = <1>; 105 keypad,column = <1>;
97 linux,code = <139>; 106 linux,code = <KEY_MENU>;
98 }; 107 };
99 108
100 key_back { 109 key_back {
101 keypad,row = <2>; 110 keypad,row = <2>;
102 keypad,column = <0>; 111 keypad,column = <0>;
103 linux,code = <158>; 112 linux,code = <KEY_BACK>;
104 }; 113 };
105 114
106 key_enter { 115 key_enter {
107 keypad,row = <2>; 116 keypad,row = <2>;
108 keypad,column = <1>; 117 keypad,column = <1>;
109 linux,code = <28>; 118 linux,code = <KEY_ENTER>;
110 }; 119 };
111 }; 120 };
112 121
diff --git a/arch/arm/boot/dts/exynos4412-trats2.dts b/arch/arm/boot/dts/exynos4412-trats2.dts
index 9583563dd0ef..77878447b312 100644
--- a/arch/arm/boot/dts/exynos4412-trats2.dts
+++ b/arch/arm/boot/dts/exynos4412-trats2.dts
@@ -20,7 +20,8 @@
20 compatible = "samsung,trats2", "samsung,exynos4412", "samsung,exynos4"; 20 compatible = "samsung,trats2", "samsung,exynos4412", "samsung,exynos4";
21 21
22 aliases { 22 aliases {
23 i2c8 = &i2c_ak8975; 23 i2c9 = &i2c_ak8975;
24 i2c10 = &i2c_cm36651;
24 }; 25 };
25 26
26 memory { 27 memory {
@@ -80,39 +81,67 @@
80 enable-active-high; 81 enable-active-high;
81 }; 82 };
82 83
83 /* More to come */ 84 cam_af_reg: voltage-regulator-3 {
85 compatible = "regulator-fixed";
86 regulator-name = "CAM_AF";
87 regulator-min-microvolt = <2800000>;
88 regulator-max-microvolt = <2800000>;
89 gpio = <&gpm0 4 0>;
90 enable-active-high;
91 };
92
93 cam_isp_core_reg: voltage-regulator-4 {
94 compatible = "regulator-fixed";
95 regulator-name = "CAM_ISP_CORE_1.2V_EN";
96 regulator-min-microvolt = <1200000>;
97 regulator-max-microvolt = <1200000>;
98 gpio = <&gpm0 3 0>;
99 enable-active-high;
100 regulator-always-on;
101 };
102
103 ps_als_reg: voltage-regulator-5 {
104 compatible = "regulator-fixed";
105 regulator-name = "LED_A_3.0V";
106 regulator-min-microvolt = <3000000>;
107 regulator-max-microvolt = <3000000>;
108 gpio = <&gpj0 5 0>;
109 enable-active-high;
110 };
84 }; 111 };
85 112
86 gpio-keys { 113 gpio-keys {
87 compatible = "gpio-keys"; 114 compatible = "gpio-keys";
88 115
89 key-down { 116 key-down {
90 interrupt-parent = <&gpj1>; 117 gpios = <&gpx3 3 1>;
91 interrupts = <2 0>;
92 gpios = <&gpj1 2 1>;
93 linux,code = <114>; 118 linux,code = <114>;
94 label = "volume down"; 119 label = "volume down";
95 debounce-interval = <10>; 120 debounce-interval = <10>;
96 }; 121 };
97 122
98 key-up { 123 key-up {
99 interrupt-parent = <&gpj1>; 124 gpios = <&gpx2 2 1>;
100 interrupts = <1 0>;
101 gpios = <&gpj1 1 1>;
102 linux,code = <115>; 125 linux,code = <115>;
103 label = "volume up"; 126 label = "volume up";
104 debounce-interval = <10>; 127 debounce-interval = <10>;
105 }; 128 };
106 129
107 key-power { 130 key-power {
108 interrupt-parent = <&gpx2>;
109 interrupts = <7 0>;
110 gpios = <&gpx2 7 1>; 131 gpios = <&gpx2 7 1>;
111 linux,code = <116>; 132 linux,code = <116>;
112 label = "power"; 133 label = "power";
113 debounce-interval = <10>; 134 debounce-interval = <10>;
114 gpio-key,wakeup; 135 gpio-key,wakeup;
115 }; 136 };
137
138 key-ok {
139 gpios = <&gpx0 1 1>;
140 linux,code = <139>;
141 label = "ok";
142 debounce-inteval = <10>;
143 gpio-key,wakeup;
144 };
116 }; 145 };
117 146
118 adc: adc@126C0000 { 147 adc: adc@126C0000 {
@@ -140,6 +169,38 @@
140 }; 169 };
141 }; 170 };
142 171
172 i2c_0: i2c@13860000 {
173 samsung,i2c-sda-delay = <100>;
174 samsung,i2c-slave-addr = <0x10>;
175 samsung,i2c-max-bus-freq = <400000>;
176 pinctrl-0 = <&i2c0_bus>;
177 pinctrl-names = "default";
178 status = "okay";
179
180 s5c73m3@3c {
181 compatible = "samsung,s5c73m3";
182 reg = <0x3c>;
183 standby-gpios = <&gpm0 1 1>; /* ISP_STANDBY */
184 xshutdown-gpios = <&gpf1 3 1>; /* ISP_RESET */
185 vdd-int-supply = <&buck9_reg>;
186 vddio-cis-supply = <&ldo9_reg>;
187 vdda-supply = <&ldo17_reg>;
188 vddio-host-supply = <&ldo18_reg>;
189 vdd-af-supply = <&cam_af_reg>;
190 vdd-reg-supply = <&cam_io_reg>;
191 clock-frequency = <24000000>;
192 /* CAM_A_CLKOUT */
193 clocks = <&camera 0>;
194 clock-names = "cis_extclk";
195 port {
196 s5c73m3_ep: endpoint {
197 remote-endpoint = <&csis0_ep>;
198 data-lanes = <1 2 3 4>;
199 };
200 };
201 };
202 };
203
143 i2c@138D0000 { 204 i2c@138D0000 {
144 samsung,i2c-sda-delay = <100>; 205 samsung,i2c-sda-delay = <100>;
145 samsung,i2c-slave-addr = <0x10>; 206 samsung,i2c-slave-addr = <0x10>;
@@ -503,12 +564,28 @@
503 status = "okay"; 564 status = "okay";
504 565
505 ak8975@0c { 566 ak8975@0c {
506 compatible = "ak,ak8975"; 567 compatible = "asahi-kasei,ak8975";
507 reg = <0x0c>; 568 reg = <0x0c>;
508 gpios = <&gpj0 7 0>; 569 gpios = <&gpj0 7 0>;
509 }; 570 };
510 }; 571 };
511 572
573 i2c_cm36651: i2c-gpio-2 {
574 compatible = "i2c-gpio";
575 gpios = <&gpf0 0 1>, <&gpf0 1 1>;
576 i2c-gpio,delay-us = <2>;
577 #address-cells = <1>;
578 #size-cells = <0>;
579
580 cm36651@18 {
581 compatible = "capella,cm36651";
582 reg = <0x18>;
583 interrupt-parent = <&gpx0>;
584 interrupts = <2 2>;
585 vled-supply = <&ps_als_reg>;
586 };
587 };
588
512 spi_1: spi@13930000 { 589 spi_1: spi@13930000 {
513 pinctrl-names = "default"; 590 pinctrl-names = "default";
514 pinctrl-0 = <&spi1_bus>; 591 pinctrl-0 = <&spi1_bus>;
@@ -586,8 +663,8 @@
586 status = "okay"; 663 status = "okay";
587 }; 664 };
588 665
589 camera { 666 camera: camera {
590 pinctrl-0 = <&cam_port_b_clk_active>; 667 pinctrl-0 = <&cam_port_a_clk_active &cam_port_b_clk_active>;
591 pinctrl-names = "default"; 668 pinctrl-names = "default";
592 status = "okay"; 669 status = "okay";
593 670
@@ -607,6 +684,23 @@
607 status = "okay"; 684 status = "okay";
608 }; 685 };
609 686
687 csis_0: csis@11880000 {
688 status = "okay";
689 vddcore-supply = <&ldo8_reg>;
690 vddio-supply = <&ldo10_reg>;
691 clock-frequency = <176000000>;
692
693 /* Camera C (3) MIPI CSI-2 (CSIS0) */
694 port@3 {
695 reg = <3>;
696 csis0_ep: endpoint {
697 remote-endpoint = <&s5c73m3_ep>;
698 data-lanes = <1 2 3 4>;
699 samsung,csis-hs-settle = <12>;
700 };
701 };
702 };
703
610 csis_1: csis@11890000 { 704 csis_1: csis@11890000 {
611 vddcore-supply = <&ldo8_reg>; 705 vddcore-supply = <&ldo8_reg>;
612 vddio-supply = <&ldo10_reg>; 706 vddio-supply = <&ldo10_reg>;
@@ -647,10 +741,11 @@
647 reg = <0x10>; 741 reg = <0x10>;
648 svdda-supply = <&cam_io_reg>; 742 svdda-supply = <&cam_io_reg>;
649 svddio-supply = <&ldo19_reg>; 743 svddio-supply = <&ldo19_reg>;
744 afvdd-supply = <&ldo19_reg>;
650 clock-frequency = <24000000>; 745 clock-frequency = <24000000>;
651 /* CAM_B_CLKOUT */ 746 /* CAM_B_CLKOUT */
652 clocks = <&clock_cam 1>; 747 clocks = <&camera 1>;
653 clock-names = "mclk"; 748 clock-names = "extclk";
654 samsung,camclk-out = <1>; 749 samsung,camclk-out = <1>;
655 gpios = <&gpm1 6 0>; 750 gpios = <&gpm1 6 0>;
656 751
@@ -665,6 +760,16 @@
665 }; 760 };
666 }; 761 };
667 762
763 exynos-usbphy@125B0000 {
764 status = "okay";
765 };
766
767 hsotg@12480000 {
768 vusb_d-supply = <&ldo15_reg>;
769 vusb_a-supply = <&ldo12_reg>;
770 status = "okay";
771 };
772
668 thermistor-ap@0 { 773 thermistor-ap@0 {
669 compatible = "ntc,ncp15wb473"; 774 compatible = "ntc,ncp15wb473";
670 pullup-uv = <1800000>; /* VCC_1.8V_AP */ 775 pullup-uv = <1800000>; /* VCC_1.8V_AP */
diff --git a/arch/arm/boot/dts/exynos4412.dtsi b/arch/arm/boot/dts/exynos4412.dtsi
index 15d3c0ac2f5f..c42a3e196cd5 100644
--- a/arch/arm/boot/dts/exynos4412.dtsi
+++ b/arch/arm/boot/dts/exynos4412.dtsi
@@ -29,4 +29,8 @@
29 gic: interrupt-controller@10490000 { 29 gic: interrupt-controller@10490000 {
30 cpu-offset = <0x4000>; 30 cpu-offset = <0x4000>;
31 }; 31 };
32
33 pmu_system_controller: system-controller@10020000 {
34 compatible = "samsung,exynos4412-pmu", "syscon";
35 };
32}; 36};
diff --git a/arch/arm/boot/dts/exynos4x12.dtsi b/arch/arm/boot/dts/exynos4x12.dtsi
index c4a9306f8529..c5a943df1cd7 100644
--- a/arch/arm/boot/dts/exynos4x12.dtsi
+++ b/arch/arm/boot/dts/exynos4x12.dtsi
@@ -37,6 +37,24 @@
37 interrupts = <2 2>, <3 2>, <18 2>, <19 2>; 37 interrupts = <2 2>, <3 2>, <18 2>, <19 2>;
38 }; 38 };
39 39
40 sysram@02020000 {
41 compatible = "mmio-sram";
42 reg = <0x02020000 0x40000>;
43 #address-cells = <1>;
44 #size-cells = <1>;
45 ranges = <0 0x02020000 0x40000>;
46
47 smp-sysram@0 {
48 compatible = "samsung,exynos4210-sysram";
49 reg = <0x0 0x1000>;
50 };
51
52 smp-sysram@2f000 {
53 compatible = "samsung,exynos4210-sysram-ns";
54 reg = <0x2f000 0x1000>;
55 };
56 };
57
40 pd_isp: isp-power-domain@10023CA0 { 58 pd_isp: isp-power-domain@10023CA0 {
41 compatible = "samsung,exynos4210-pd"; 59 compatible = "samsung,exynos4210-pd";
42 reg = <0x10023CA0 0x20>; 60 reg = <0x10023CA0 0x20>;
@@ -119,6 +137,10 @@
119 interrupts = <0 72 0>; 137 interrupts = <0 72 0>;
120 }; 138 };
121 139
140 pmu_system_controller: system-controller@10020000 {
141 compatible = "samsung,exynos4212-pmu", "syscon";
142 };
143
122 g2d@10800000 { 144 g2d@10800000 {
123 compatible = "samsung,exynos4212-g2d"; 145 compatible = "samsung,exynos4212-g2d";
124 reg = <0x10800000 0x1000>; 146 reg = <0x10800000 0x1000>;
@@ -243,4 +265,9 @@
243 clock-names = "biu", "ciu"; 265 clock-names = "biu", "ciu";
244 status = "disabled"; 266 status = "disabled";
245 }; 267 };
268
269 exynos-usbphy@125B0000 {
270 compatible = "samsung,exynos4x12-usb2-phy";
271 samsung,sysreg-phandle = <&sys_reg>;
272 };
246}; 273};
diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts
index 090f9830b129..d0de1f50d15b 100644
--- a/arch/arm/boot/dts/exynos5250-arndale.dts
+++ b/arch/arm/boot/dts/exynos5250-arndale.dts
@@ -12,6 +12,7 @@
12/dts-v1/; 12/dts-v1/;
13#include "exynos5250.dtsi" 13#include "exynos5250.dtsi"
14#include <dt-bindings/interrupt-controller/irq.h> 14#include <dt-bindings/interrupt-controller/irq.h>
15#include <dt-bindings/input/input.h>
15 16
16/ { 17/ {
17 model = "Insignal Arndale evaluation board based on EXYNOS5250"; 18 model = "Insignal Arndale evaluation board based on EXYNOS5250";
@@ -107,6 +108,7 @@
107 regulator-name = "VDD_IOPERI_1.8V"; 108 regulator-name = "VDD_IOPERI_1.8V";
108 regulator-min-microvolt = <1800000>; 109 regulator-min-microvolt = <1800000>;
109 regulator-max-microvolt = <1800000>; 110 regulator-max-microvolt = <1800000>;
111 regulator-always-on;
110 op_mode = <1>; 112 op_mode = <1>;
111 }; 113 };
112 114
@@ -444,42 +446,42 @@
444 menu { 446 menu {
445 label = "SW-TACT2"; 447 label = "SW-TACT2";
446 gpios = <&gpx1 4 1>; 448 gpios = <&gpx1 4 1>;
447 linux,code = <139>; 449 linux,code = <KEY_MENU>;
448 gpio-key,wakeup; 450 gpio-key,wakeup;
449 }; 451 };
450 452
451 home { 453 home {
452 label = "SW-TACT3"; 454 label = "SW-TACT3";
453 gpios = <&gpx1 5 1>; 455 gpios = <&gpx1 5 1>;
454 linux,code = <102>; 456 linux,code = <KEY_HOME>;
455 gpio-key,wakeup; 457 gpio-key,wakeup;
456 }; 458 };
457 459
458 up { 460 up {
459 label = "SW-TACT4"; 461 label = "SW-TACT4";
460 gpios = <&gpx1 6 1>; 462 gpios = <&gpx1 6 1>;
461 linux,code = <103>; 463 linux,code = <KEY_UP>;
462 gpio-key,wakeup; 464 gpio-key,wakeup;
463 }; 465 };
464 466
465 down { 467 down {
466 label = "SW-TACT5"; 468 label = "SW-TACT5";
467 gpios = <&gpx1 7 1>; 469 gpios = <&gpx1 7 1>;
468 linux,code = <108>; 470 linux,code = <KEY_DOWN>;
469 gpio-key,wakeup; 471 gpio-key,wakeup;
470 }; 472 };
471 473
472 back { 474 back {
473 label = "SW-TACT6"; 475 label = "SW-TACT6";
474 gpios = <&gpx2 0 1>; 476 gpios = <&gpx2 0 1>;
475 linux,code = <158>; 477 linux,code = <KEY_BACK>;
476 gpio-key,wakeup; 478 gpio-key,wakeup;
477 }; 479 };
478 480
479 wakeup { 481 wakeup {
480 label = "SW-TACT7"; 482 label = "SW-TACT7";
481 gpios = <&gpx2 1 1>; 483 gpios = <&gpx2 1 1>;
482 linux,code = <143>; 484 linux,code = <KEY_WAKEUP>;
483 gpio-key,wakeup; 485 gpio-key,wakeup;
484 }; 486 };
485 }; 487 };
diff --git a/arch/arm/boot/dts/exynos5250-cros-common.dtsi b/arch/arm/boot/dts/exynos5250-cros-common.dtsi
index 2c1560d52f1a..89ac90f59e2e 100644
--- a/arch/arm/boot/dts/exynos5250-cros-common.dtsi
+++ b/arch/arm/boot/dts/exynos5250-cros-common.dtsi
@@ -240,7 +240,7 @@
240 samsung,i2c-sda-delay = <100>; 240 samsung,i2c-sda-delay = <100>;
241 samsung,i2c-max-bus-freq = <378000>; 241 samsung,i2c-max-bus-freq = <378000>;
242 242
243 hdmiphy@38 { 243 hdmiphy: hdmiphy@38 {
244 compatible = "samsung,exynos4212-hdmiphy"; 244 compatible = "samsung,exynos4212-hdmiphy";
245 reg = <0x38>; 245 reg = <0x38>;
246 }; 246 };
@@ -304,6 +304,10 @@
304 304
305 hdmi { 305 hdmi {
306 hpd-gpio = <&gpx3 7 0>; 306 hpd-gpio = <&gpx3 7 0>;
307 pinctrl-names = "default";
308 pinctrl-0 = <&hdmi_hpd_irq>;
309 phy = <&hdmiphy>;
310 ddc = <&i2c_2>;
307 }; 311 };
308 312
309 gpio-keys { 313 gpio-keys {
diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
index 9a49e6804ae1..886cfca044ac 100644
--- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
+++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
@@ -351,6 +351,34 @@
351 samsung,pin-drv = <0>; 351 samsung,pin-drv = <0>;
352 }; 352 };
353 353
354 pwm0_out: pwm0-out {
355 samsung,pins = "gpb2-0";
356 samsung,pin-function = <2>;
357 samsung,pin-pud = <0>;
358 samsung,pin-drv = <0>;
359 };
360
361 pwm1_out: pwm1-out {
362 samsung,pins = "gpb2-1";
363 samsung,pin-function = <2>;
364 samsung,pin-pud = <0>;
365 samsung,pin-drv = <0>;
366 };
367
368 pwm2_out: pwm2-out {
369 samsung,pins = "gpb2-2";
370 samsung,pin-function = <2>;
371 samsung,pin-pud = <0>;
372 samsung,pin-drv = <0>;
373 };
374
375 pwm3_out: pwm3-out {
376 samsung,pins = "gpb2-3";
377 samsung,pin-function = <2>;
378 samsung,pin-pud = <0>;
379 samsung,pin-drv = <0>;
380 };
381
354 i2c7_bus: i2c7-bus { 382 i2c7_bus: i2c7-bus {
355 samsung,pins = "gpb2-2", "gpb2-3"; 383 samsung,pins = "gpb2-2", "gpb2-3";
356 samsung,pin-function = <3>; 384 samsung,pin-function = <3>;
diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts
index 1ce1088a00fb..079fdf9e3f18 100644
--- a/arch/arm/boot/dts/exynos5250-snow.dts
+++ b/arch/arm/boot/dts/exynos5250-snow.dts
@@ -25,6 +25,13 @@
25 }; 25 };
26 26
27 pinctrl@11400000 { 27 pinctrl@11400000 {
28 ec_irq: ec-irq {
29 samsung,pins = "gpx1-6";
30 samsung,pin-function = <0>;
31 samsung,pin-pud = <0>;
32 samsung,pin-drv = <0>;
33 };
34
28 sd3_clk: sd3-clk { 35 sd3_clk: sd3-clk {
29 samsung,pin-drv = <0>; 36 samsung,pin-drv = <0>;
30 }; 37 };
@@ -37,6 +44,50 @@
37 sd3_bus4: sd3-bus-width4 { 44 sd3_bus4: sd3-bus-width4 {
38 samsung,pin-drv = <0>; 45 samsung,pin-drv = <0>;
39 }; 46 };
47
48 max98095_en: max98095-en {
49 samsung,pins = "gpx1-7";
50 samsung,pin-function = <0>;
51 samsung,pin-pud = <3>;
52 samsung,pin-drv = <0>;
53 };
54
55 tps65090_irq: tps65090-irq {
56 samsung,pins = "gpx2-6";
57 samsung,pin-function = <0>;
58 samsung,pin-pud = <0>;
59 samsung,pin-drv = <0>;
60 };
61
62 usb3_vbus_en: usb3-vbus-en {
63 samsung,pins = "gpx2-7";
64 samsung,pin-function = <1>;
65 samsung,pin-pud = <0>;
66 samsung,pin-drv = <0>;
67 };
68
69 hdmi_hpd_irq: hdmi-hpd-irq {
70 samsung,pins = "gpx3-7";
71 samsung,pin-function = <0>;
72 samsung,pin-pud = <1>;
73 samsung,pin-drv = <0>;
74 };
75 };
76
77 pinctrl@13400000 {
78 arb_their_claim: arb-their-claim {
79 samsung,pins = "gpe0-4";
80 samsung,pin-function = <0>;
81 samsung,pin-pud = <3>;
82 samsung,pin-drv = <0>;
83 };
84
85 arb_our_claim: arb-our-claim {
86 samsung,pins = "gpf0-3";
87 samsung,pin-function = <1>;
88 samsung,pin-pud = <0>;
89 samsung,pin-drv = <0>;
90 };
40 }; 91 };
41 92
42 gpio-keys { 93 gpio-keys {
@@ -52,6 +103,12 @@
52 }; 103 };
53 }; 104 };
54 105
106 vbat: vbat-fixed-regulator {
107 compatible = "regulator-fixed";
108 regulator-name = "vbat-supply";
109 regulator-boot-on;
110 };
111
55 i2c-arbitrator { 112 i2c-arbitrator {
56 compatible = "i2c-arb-gpio-challenge"; 113 compatible = "i2c-arb-gpio-challenge";
57 #address-cells = <1>; 114 #address-cells = <1>;
@@ -65,6 +122,9 @@
65 wait-retry-us = <3000>; 122 wait-retry-us = <3000>;
66 wait-free-us = <50000>; 123 wait-free-us = <50000>;
67 124
125 pinctrl-names = "default";
126 pinctrl-0 = <&arb_our_claim &arb_their_claim>;
127
68 /* Use ID 104 as a hint that we're on physical bus 4 */ 128 /* Use ID 104 as a hint that we're on physical bus 4 */
69 i2c_104: i2c@0 { 129 i2c_104: i2c@0 {
70 reg = <0>; 130 reg = <0>;
@@ -82,6 +142,8 @@
82 reg = <0x1e>; 142 reg = <0x1e>;
83 interrupts = <6 0>; 143 interrupts = <6 0>;
84 interrupt-parent = <&gpx1>; 144 interrupt-parent = <&gpx1>;
145 pinctrl-names = "default";
146 pinctrl-0 = <&ec_irq>;
85 wakeup-source; 147 wakeup-source;
86 148
87 keyboard-controller { 149 keyboard-controller {
@@ -173,6 +235,83 @@
173 0x070c0069>; /* LEFT */ 235 0x070c0069>; /* LEFT */
174 }; 236 };
175 }; 237 };
238
239 power-regulator {
240 compatible = "ti,tps65090";
241 reg = <0x48>;
242
243 /*
244 * Config irq to disable internal pulls
245 * even though we run in polling mode.
246 */
247 pinctrl-names = "default";
248 pinctrl-0 = <&tps65090_irq>;
249
250 vsys1-supply = <&vbat>;
251 vsys2-supply = <&vbat>;
252 vsys3-supply = <&vbat>;
253 infet1-supply = <&vbat>;
254 infet2-supply = <&vbat>;
255 infet3-supply = <&vbat>;
256 infet4-supply = <&vbat>;
257 infet5-supply = <&vbat>;
258 infet6-supply = <&vbat>;
259 infet7-supply = <&vbat>;
260 vsys-l1-supply = <&vbat>;
261 vsys-l2-supply = <&vbat>;
262
263 regulators {
264 dcdc1 {
265 ti,enable-ext-control;
266 };
267 dcdc2 {
268 ti,enable-ext-control;
269 };
270 dcdc3 {
271 ti,enable-ext-control;
272 };
273 fet1 {
274 regulator-name = "vcd_led";
275 ti,overcurrent-wait = <3>;
276 };
277 tps65090_fet2: fet2 {
278 regulator-name = "video_mid";
279 regulator-always-on;
280 ti,overcurrent-wait = <3>;
281 };
282 fet3 {
283 regulator-name = "wwan_r";
284 regulator-always-on;
285 ti,overcurrent-wait = <3>;
286 };
287 fet4 {
288 regulator-name = "sdcard";
289 ti,overcurrent-wait = <3>;
290 };
291 fet5 {
292 regulator-name = "camout";
293 regulator-always-on;
294 ti,overcurrent-wait = <3>;
295 };
296 fet6 {
297 regulator-name = "lcd_vdd";
298 ti,overcurrent-wait = <3>;
299 };
300 tps65090_fet7: fet7 {
301 regulator-name = "video_mid_1a";
302 regulator-always-on;
303 ti,overcurrent-wait = <3>;
304 };
305 ldo1 {
306 };
307 ldo2 {
308 };
309 };
310
311 charger {
312 compatible = "ti,tps65090-charger";
313 };
314 };
176 }; 315 };
177 }; 316 };
178 317
@@ -196,6 +335,41 @@
196 }; 335 };
197 }; 336 };
198 337
338 i2c@12CD0000 {
339 max98095: codec@11 {
340 compatible = "maxim,max98095";
341 reg = <0x11>;
342 pinctrl-0 = <&max98095_en>;
343 pinctrl-names = "default";
344 };
345 };
346
347 i2s0: i2s@03830000 {
348 status = "okay";
349 };
350
351 sound {
352 compatible = "google,snow-audio-max98095";
353
354 samsung,i2s-controller = <&i2s0>;
355 samsung,audio-codec = <&max98095>;
356 };
357
358 usb3_vbus_reg: regulator-usb3 {
359 compatible = "regulator-fixed";
360 regulator-name = "P5.0V_USB3CON";
361 regulator-min-microvolt = <5000000>;
362 regulator-max-microvolt = <5000000>;
363 gpio = <&gpx2 7 0>;
364 pinctrl-names = "default";
365 pinctrl-0 = <&usb3_vbus_en>;
366 enable-active-high;
367 };
368
369 phy@12100000 {
370 vbus-supply = <&usb3_vbus_reg>;
371 };
372
199 usb@12110000 { 373 usb@12110000 {
200 samsung,vbus-gpio = <&gpx1 1 0>; 374 samsung,vbus-gpio = <&gpx1 1 0>;
201 }; 375 };
@@ -206,4 +380,54 @@
206 clock-frequency = <24000000>; 380 clock-frequency = <24000000>;
207 }; 381 };
208 }; 382 };
383
384 hdmi {
385 hdmi-en-supply = <&tps65090_fet7>;
386 vdd-supply = <&ldo8_reg>;
387 vdd_osc-supply = <&ldo10_reg>;
388 vdd_pll-supply = <&ldo8_reg>;
389 };
390
391 backlight {
392 compatible = "pwm-backlight";
393 pwms = <&pwm 0 1000000 0>;
394 brightness-levels = <0 100 500 1000 1500 2000 2500 2800>;
395 default-brightness-level = <7>;
396 pinctrl-0 = <&pwm0_out>;
397 pinctrl-names = "default";
398 };
399
400 fimd@14400000 {
401 status = "okay";
402 samsung,invert-vclk;
403 };
404
405 dp-controller@145B0000 {
406 status = "okay";
407 pinctrl-names = "default";
408 pinctrl-0 = <&dp_hpd>;
409 samsung,color-space = <0>;
410 samsung,dynamic-range = <0>;
411 samsung,ycbcr-coeff = <0>;
412 samsung,color-depth = <1>;
413 samsung,link-rate = <0x0a>;
414 samsung,lane-count = <2>;
415 samsung,hpd-gpio = <&gpx0 7 0>;
416
417 display-timings {
418 native-mode = <&timing1>;
419
420 timing1: timing@1 {
421 clock-frequency = <70589280>;
422 hactive = <1366>;
423 vactive = <768>;
424 hfront-porch = <40>;
425 hback-porch = <40>;
426 hsync-len = <32>;
427 vback-porch = <10>;
428 vfront-porch = <12>;
429 vsync-len = <6>;
430 };
431 };
432 };
209}; 433};
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 37423314a028..834fb5a5306f 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -72,6 +72,24 @@
72 }; 72 };
73 }; 73 };
74 74
75 sysram@02020000 {
76 compatible = "mmio-sram";
77 reg = <0x02020000 0x30000>;
78 #address-cells = <1>;
79 #size-cells = <1>;
80 ranges = <0 0x02020000 0x30000>;
81
82 smp-sysram@0 {
83 compatible = "samsung,exynos4210-sysram";
84 reg = <0x0 0x1000>;
85 };
86
87 smp-sysram@2f000 {
88 compatible = "samsung,exynos4210-sysram-ns";
89 reg = <0x2f000 0x1000>;
90 };
91 };
92
75 pd_gsc: gsc-power-domain@10044000 { 93 pd_gsc: gsc-power-domain@10044000 {
76 compatible = "samsung,exynos4210-pd"; 94 compatible = "samsung,exynos4210-pd";
77 reg = <0x10044000 0x20>; 95 reg = <0x10044000 0x20>;
@@ -175,6 +193,11 @@
175 reg = <0x10040000 0x5000>; 193 reg = <0x10040000 0x5000>;
176 }; 194 };
177 195
196 sysreg_system_controller: syscon@10050000 {
197 compatible = "samsung,exynos5-sysreg", "syscon";
198 reg = <0x10050000 0x5000>;
199 };
200
178 watchdog@101D0000 { 201 watchdog@101D0000 {
179 compatible = "samsung,exynos5250-wdt"; 202 compatible = "samsung,exynos5250-wdt";
180 reg = <0x101D0000 0x100>; 203 reg = <0x101D0000 0x100>;
@@ -250,7 +273,7 @@
250 sata_phy: sata-phy@12170000 { 273 sata_phy: sata-phy@12170000 {
251 compatible = "samsung,exynos5250-sata-phy"; 274 compatible = "samsung,exynos5250-sata-phy";
252 reg = <0x12170000 0x1ff>; 275 reg = <0x12170000 0x1ff>;
253 clocks = <&clock 287>; 276 clocks = <&clock CLK_SATA_PHYCTRL>;
254 clock-names = "sata_phyctrl"; 277 clock-names = "sata_phyctrl";
255 #phy-cells = <0>; 278 #phy-cells = <0>;
256 samsung,syscon-phandle = <&pmu_system_controller>; 279 samsung,syscon-phandle = <&pmu_system_controller>;
@@ -533,22 +556,18 @@
533 compatible = "synopsys,dwc3"; 556 compatible = "synopsys,dwc3";
534 reg = <0x12000000 0x10000>; 557 reg = <0x12000000 0x10000>;
535 interrupts = <0 72 0>; 558 interrupts = <0 72 0>;
536 usb-phy = <&usb2_phy &usb3_phy>; 559 phys = <&usbdrd_phy 0>, <&usbdrd_phy 1>;
560 phy-names = "usb2-phy", "usb3-phy";
537 }; 561 };
538 }; 562 };
539 563
540 usb3_phy: usbphy@12100000 { 564 usbdrd_phy: phy@12100000 {
541 compatible = "samsung,exynos5250-usb3phy"; 565 compatible = "samsung,exynos5250-usbdrd-phy";
542 reg = <0x12100000 0x100>; 566 reg = <0x12100000 0x100>;
543 clocks = <&clock CLK_FIN_PLL>, <&clock CLK_USB3>; 567 clocks = <&clock CLK_USB3>, <&clock CLK_FIN_PLL>;
544 clock-names = "ext_xtal", "usbdrd30"; 568 clock-names = "phy", "ref";
545 #address-cells = <1>; 569 samsung,pmu-syscon = <&pmu_system_controller>;
546 #size-cells = <1>; 570 #phy-cells = <1>;
547 ranges;
548
549 usbphy-sys {
550 reg = <0x10040704 0x8>;
551 };
552 }; 571 };
553 572
554 usb@12110000 { 573 usb@12110000 {
@@ -558,6 +577,12 @@
558 577
559 clocks = <&clock CLK_USB2>; 578 clocks = <&clock CLK_USB2>;
560 clock-names = "usbhost"; 579 clock-names = "usbhost";
580 #address-cells = <1>;
581 #size-cells = <0>;
582 port@0 {
583 reg = <0>;
584 phys = <&usb2_phy_gen 1>;
585 };
561 }; 586 };
562 587
563 usb@12120000 { 588 usb@12120000 {
@@ -567,6 +592,12 @@
567 592
568 clocks = <&clock CLK_USB2>; 593 clocks = <&clock CLK_USB2>;
569 clock-names = "usbhost"; 594 clock-names = "usbhost";
595 #address-cells = <1>;
596 #size-cells = <0>;
597 port@0 {
598 reg = <0>;
599 phys = <&usb2_phy_gen 1>;
600 };
570 }; 601 };
571 602
572 usb2_phy: usbphy@12130000 { 603 usb2_phy: usbphy@12130000 {
@@ -584,6 +615,16 @@
584 }; 615 };
585 }; 616 };
586 617
618 usb2_phy_gen: phy@12130000 {
619 compatible = "samsung,exynos5250-usb2-phy";
620 reg = <0x12130000 0x100>;
621 clocks = <&clock CLK_USB2>, <&clock CLK_FIN_PLL>;
622 clock-names = "phy", "ref";
623 #phy-cells = <1>;
624 samsung,sysreg-phandle = <&sysreg_system_controller>;
625 samsung,pmureg-phandle = <&pmu_system_controller>;
626 };
627
587 pwm: pwm@12dd0000 { 628 pwm: pwm@12dd0000 {
588 compatible = "samsung,exynos4210-pwm"; 629 compatible = "samsung,exynos4210-pwm";
589 reg = <0x12dd0000 0x100>; 630 reg = <0x12dd0000 0x100>;
@@ -690,6 +731,7 @@
690 <&clock CLK_MOUT_HDMI>; 731 <&clock CLK_MOUT_HDMI>;
691 clock-names = "hdmi", "sclk_hdmi", "sclk_pixel", 732 clock-names = "hdmi", "sclk_hdmi", "sclk_pixel",
692 "sclk_hdmiphy", "mout_hdmi"; 733 "sclk_hdmiphy", "mout_hdmi";
734 samsung,syscon-phandle = <&pmu_system_controller>;
693 }; 735 };
694 736
695 mixer { 737 mixer {
@@ -733,7 +775,7 @@
733 compatible = "samsung,exynos4210-secss"; 775 compatible = "samsung,exynos4210-secss";
734 reg = <0x10830000 0x10000>; 776 reg = <0x10830000 0x10000>;
735 interrupts = <0 112 0>; 777 interrupts = <0 112 0>;
736 clocks = <&clock 348>; 778 clocks = <&clock CLK_SSS>;
737 clock-names = "secss"; 779 clock-names = "secss";
738 }; 780 };
739}; 781};
diff --git a/arch/arm/boot/dts/exynos5260-pinctrl.dtsi b/arch/arm/boot/dts/exynos5260-pinctrl.dtsi
new file mode 100644
index 000000000000..f6ee55ea0708
--- /dev/null
+++ b/arch/arm/boot/dts/exynos5260-pinctrl.dtsi
@@ -0,0 +1,574 @@
1/*
2 * Samsung's Exynos5260 SoC pin-mux and pin-config device tree source
3 *
4 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com
6 *
7 * Samsung's Exynos5260 SoC pin-mux and pin-config options are listed as device
8 * tree nodes are listed in this file.
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#define PIN_PULL_NONE 0
16#define PIN_PULL_DOWN 1
17#define PIN_PULL_UP 3
18
19&pinctrl_0 {
20 gpa0: gpa0 {
21 gpio-controller;
22 #gpio-cells = <2>;
23
24 interrupt-controller;
25 #interrupt-cells = <2>;
26 };
27
28 gpa1: gpa1 {
29 gpio-controller;
30 #gpio-cells = <2>;
31
32 interrupt-controller;
33 #interrupt-cells = <2>;
34 };
35
36 gpa2: gpa2 {
37 gpio-controller;
38 #gpio-cells = <2>;
39
40 interrupt-controller;
41 #interrupt-cells = <2>;
42 };
43
44 gpb0: gpb0 {
45 gpio-controller;
46 #gpio-cells = <2>;
47
48 interrupt-controller;
49 #interrupt-cells = <2>;
50 };
51
52 gpb1: gpb1 {
53 gpio-controller;
54 #gpio-cells = <2>;
55
56 interrupt-controller;
57 #interrupt-cells = <2>;
58 };
59
60 gpb2: gpb2 {
61 gpio-controller;
62 #gpio-cells = <2>;
63
64 interrupt-controller;
65 #interrupt-cells = <2>;
66 };
67
68 gpb3: gpb3 {
69 gpio-controller;
70 #gpio-cells = <2>;
71
72 interrupt-controller;
73 #interrupt-cells = <2>;
74 };
75
76 gpb4: gpb4 {
77 gpio-controller;
78 #gpio-cells = <2>;
79
80 interrupt-controller;
81 #interrupt-cells = <2>;
82 };
83
84 gpb5: gpb5 {
85 gpio-controller;
86 #gpio-cells = <2>;
87
88 interrupt-controller;
89 #interrupt-cells = <2>;
90 };
91
92 gpd0: gpd0 {
93 gpio-controller;
94 #gpio-cells = <2>;
95
96 interrupt-controller;
97 #interrupt-cells = <2>;
98 };
99
100 gpd1: gpd1 {
101 gpio-controller;
102 #gpio-cells = <2>;
103
104 interrupt-controller;
105 #interrupt-cells = <2>;
106 };
107
108 gpd2: gpd2 {
109 gpio-controller;
110 #gpio-cells = <2>;
111
112 interrupt-controller;
113 #interrupt-cells = <2>;
114 };
115
116 gpe0: gpe0 {
117 gpio-controller;
118 #gpio-cells = <2>;
119
120 interrupt-controller;
121 #interrupt-cells = <2>;
122 };
123
124 gpe1: gpe1 {
125 gpio-controller;
126 #gpio-cells = <2>;
127
128 interrupt-controller;
129 #interrupt-cells = <2>;
130 };
131
132 gpf0: gpf0 {
133 gpio-controller;
134 #gpio-cells = <2>;
135
136 interrupt-controller;
137 #interrupt-cells = <2>;
138 };
139
140 gpf1: gpf1 {
141 gpio-controller;
142 #gpio-cells = <2>;
143
144 interrupt-controller;
145 #interrupt-cells = <2>;
146 };
147
148 gpk0: gpk0 {
149 gpio-controller;
150 #gpio-cells = <2>;
151
152 interrupt-controller;
153 #interrupt-cells = <2>;
154 };
155
156 gpx0: gpx0 {
157 gpio-controller;
158 #gpio-cells = <2>;
159
160 interrupt-controller;
161 #interrupt-cells = <2>;
162 };
163
164 gpx1: gpx1 {
165 gpio-controller;
166 #gpio-cells = <2>;
167
168 interrupt-controller;
169 #interrupt-cells = <2>;
170 };
171
172 gpx2: gpx2 {
173 gpio-controller;
174 #gpio-cells = <2>;
175
176 interrupt-controller;
177 #interrupt-cells = <2>;
178 };
179
180 gpx3: gpx3 {
181 gpio-controller;
182 #gpio-cells = <2>;
183
184 interrupt-controller;
185 #interrupt-cells = <2>;
186 };
187
188 uart0_data: uart0-data {
189 samsung,pins = "gpa0-0", "gpa0-1";
190 samsung,pin-function = <2>;
191 samsung,pin-pud = <PIN_PULL_NONE>;
192 samsung,pin-drv = <0>;
193 };
194
195 uart0_fctl: uart0-fctl {
196 samsung,pins = "gpa0-2", "gpa0-3";
197 samsung,pin-function = <2>;
198 samsung,pin-pud = <PIN_PULL_NONE>;
199 samsung,pin-drv = <0>;
200 };
201
202 uart1_data: uart1-data {
203 samsung,pins = "gpa1-0", "gpa1-1";
204 samsung,pin-function = <2>;
205 samsung,pin-pud = <PIN_PULL_NONE>;
206 samsung,pin-drv = <0>;
207 };
208
209 uart1_fctl: uart1-fctl {
210 samsung,pins = "gpa1-2", "gpa1-3";
211 samsung,pin-function = <2>;
212 samsung,pin-pud = <PIN_PULL_NONE>;
213 samsung,pin-drv = <0>;
214 };
215
216 uart2_data: uart2-data {
217 samsung,pins = "gpa1-4", "gpa1-5";
218 samsung,pin-function = <2>;
219 samsung,pin-pud = <PIN_PULL_NONE>;
220 samsung,pin-drv = <0>;
221 };
222
223 spi0_bus: spi0-bus {
224 samsung,pins = "gpa2-0", "gpa2-2", "gpa2-3";
225 samsung,pin-function = <2>;
226 samsung,pin-pud = <PIN_PULL_UP>;
227 samsung,pin-drv = <0>;
228 };
229
230 spi1_bus: spi1-bus {
231 samsung,pins = "gpa2-4", "gpa2-6", "gpa2-7";
232 samsung,pin-function = <2>;
233 samsung,pin-pud = <PIN_PULL_UP>;
234 samsung,pin-drv = <0>;
235 };
236
237 usb3_vbus0_en: usb3-vbus0-en {
238 samsung,pins = "gpa2-4";
239 samsung,pin-function = <1>;
240 samsung,pin-pud = <PIN_PULL_NONE>;
241 samsung,pin-drv = <0>;
242 };
243
244 i2s1_bus: i2s1-bus {
245 samsung,pins = "gpb0-0", "gpb0-1", "gpb0-2", "gpb0-3",
246 "gpb0-4";
247 samsung,pin-function = <2>;
248 samsung,pin-pud = <PIN_PULL_NONE>;
249 samsung,pin-drv = <0>;
250 };
251
252 pcm1_bus: pcm1-bus {
253 samsung,pins = "gpb0-0", "gpb0-1", "gpb0-2", "gpb0-3",
254 "gpb0-4";
255 samsung,pin-function = <3>;
256 samsung,pin-pud = <PIN_PULL_NONE>;
257 samsung,pin-drv = <0>;
258 };
259
260 spdif1_bus: spdif1-bus {
261 samsung,pins = "gpb0-0", "gpb0-1", "gpb0-2";
262 samsung,pin-function = <4>;
263 samsung,pin-pud = <PIN_PULL_NONE>;
264 samsung,pin-drv = <0>;
265 };
266
267 spi2_bus: spi2-bus {
268 samsung,pins = "gpb1-0", "gpb1-2", "gpb1-3";
269 samsung,pin-function = <2>;
270 samsung,pin-pud = <PIN_PULL_UP>;
271 samsung,pin-drv = <0>;
272 };
273
274 i2c0_hs_bus: i2c0-hs-bus {
275 samsung,pins = "gpb3-0", "gpb3-1";
276 samsung,pin-function = <2>;
277 samsung,pin-pud = <PIN_PULL_UP>;
278 samsung,pin-drv = <0>;
279 };
280
281 i2c1_hs_bus: i2c1-hs-bus {
282 samsung,pins = "gpb3-2", "gpb3-3";
283 samsung,pin-function = <2>;
284 samsung,pin-pud = <PIN_PULL_UP>;
285 samsung,pin-drv = <0>;
286 };
287
288 i2c2_hs_bus: i2c2-hs-bus {
289 samsung,pins = "gpb3-4", "gpb3-5";
290 samsung,pin-function = <2>;
291 samsung,pin-pud = <PIN_PULL_UP>;
292 samsung,pin-drv = <0>;
293 };
294
295 i2c3_hs_bus: i2c3-hs-bus {
296 samsung,pins = "gpb3-6", "gpb3-7";
297 samsung,pin-function = <2>;
298 samsung,pin-pud = <PIN_PULL_UP>;
299 samsung,pin-drv = <0>;
300 };
301
302 i2c4_bus: i2c4-bus {
303 samsung,pins = "gpb4-0", "gpb4-1";
304 samsung,pin-function = <2>;
305 samsung,pin-pud = <PIN_PULL_UP>;
306 samsung,pin-drv = <0>;
307 };
308
309 i2c5_bus: i2c5-bus {
310 samsung,pins = "gpb4-2", "gpb4-3";
311 samsung,pin-function = <2>;
312 samsung,pin-pud = <PIN_PULL_UP>;
313 samsung,pin-drv = <0>;
314 };
315
316 i2c6_bus: i2c6-bus {
317 samsung,pins = "gpb4-4", "gpb4-5";
318 samsung,pin-function = <2>;
319 samsung,pin-pud = <PIN_PULL_UP>;
320 samsung,pin-drv = <0>;
321 };
322
323 i2c7_bus: i2c7-bus {
324 samsung,pins = "gpb4-6", "gpb4-7";
325 samsung,pin-function = <2>;
326 samsung,pin-pud = <PIN_PULL_UP>;
327 samsung,pin-drv = <0>;
328 };
329
330 i2c8_bus: i2c8-bus {
331 samsung,pins = "gpb5-0", "gpb5-1";
332 samsung,pin-function = <2>;
333 samsung,pin-pud = <PIN_PULL_UP>;
334 samsung,pin-drv = <0>;
335 };
336
337 i2c9_bus: i2c9-bus {
338 samsung,pins = "gpb5-2", "gpb5-3";
339 samsung,pin-function = <2>;
340 samsung,pin-pud = <PIN_PULL_UP>;
341 samsung,pin-drv = <0>;
342 };
343
344 i2c10_bus: i2c10-bus {
345 samsung,pins = "gpb5-4", "gpb5-5";
346 samsung,pin-function = <2>;
347 samsung,pin-pud = <PIN_PULL_UP>;
348 samsung,pin-drv = <0>;
349 };
350
351 i2c11_bus: i2c11-bus {
352 samsung,pins = "gpb5-6", "gpb5-7";
353 samsung,pin-function = <2>;
354 samsung,pin-pud = <PIN_PULL_UP>;
355 samsung,pin-drv = <0>;
356 };
357
358 cam_gpio_a: cam-gpio-a {
359 samsung,pins = "gpe0-0", "gpe0-1", "gpe0-2", "gpe0-3",
360 "gpe0-4", "gpe0-5", "gpe0-6", "gpe0-7",
361 "gpe1-0", "gpe1-1";
362 samsung,pin-function = <2>;
363 samsung,pin-pud = <PIN_PULL_NONE>;
364 samsung,pin-drv = <0>;
365 };
366
367 cam_gpio_b: cam-gpio-b {
368 samsung,pins = "gpf0-0", "gpf0-1", "gpf0-2", "gpf0-3",
369 "gpf1-0", "gpf1-1", "gpf1-2", "gpf1-3";
370 samsung,pin-function = <3>;
371 samsung,pin-pud = <PIN_PULL_NONE>;
372 samsung,pin-drv = <0>;
373 };
374
375 cam_i2c1_bus: cam-i2c1-bus {
376 samsung,pins = "gpf0-2", "gpf0-3";
377 samsung,pin-function = <2>;
378 samsung,pin-pud = <PIN_PULL_UP>;
379 samsung,pin-drv = <0>;
380 };
381
382 cam_i2c0_bus: cam-i2c0-bus {
383 samsung,pins = "gpf0-0", "gpf0-1";
384 samsung,pin-function = <2>;
385 samsung,pin-pud = <PIN_PULL_UP>;
386 samsung,pin-drv = <0>;
387 };
388
389 cam_spi0_bus: cam-spi0-bus {
390 samsung,pins = "gpf1-0", "gpf1-1", "gpf1-2", "gpf1-3";
391 samsung,pin-function = <2>;
392 samsung,pin-pud = <PIN_PULL_NONE>;
393 samsung,pin-drv = <0>;
394 };
395
396 cam_spi1_bus: cam-spi1-bus {
397 samsung,pins = "gpf1-4", "gpf1-5", "gpf1-6", "gpf1-7";
398 samsung,pin-function = <2>;
399 samsung,pin-pud = <PIN_PULL_NONE>;
400 samsung,pin-drv = <0>;
401 };
402};
403
404&pinctrl_1 {
405 gpc0: gpc0 {
406 gpio-controller;
407 #gpio-cells = <2>;
408
409 interrupt-controller;
410 #interrupt-cells = <2>;
411 };
412
413 gpc1: gpc1 {
414 gpio-controller;
415 #gpio-cells = <2>;
416
417 interrupt-controller;
418 #interrupt-cells = <2>;
419 };
420
421 gpc2: gpc2 {
422 gpio-controller;
423 #gpio-cells = <2>;
424
425 interrupt-controller;
426 #interrupt-cells = <2>;
427 };
428
429 gpc3: gpc3 {
430 gpio-controller;
431 #gpio-cells = <2>;
432
433 interrupt-controller;
434 #interrupt-cells = <2>;
435 };
436
437 gpc4: gpc4 {
438 gpio-controller;
439 #gpio-cells = <2>;
440
441 interrupt-controller;
442 #interrupt-cells = <2>;
443 };
444
445 sd0_clk: sd0-clk {
446 samsung,pins = "gpc0-0";
447 samsung,pin-function = <2>;
448 samsung,pin-pud = <PIN_PULL_NONE>;
449 samsung,pin-drv = <3>;
450 };
451
452 sd0_cmd: sd0-cmd {
453 samsung,pins = "gpc0-1";
454 samsung,pin-function = <2>;
455 samsung,pin-pud = <PIN_PULL_NONE>;
456 samsung,pin-drv = <3>;
457 };
458
459 sd0_bus1: sd0-bus-width1 {
460 samsung,pins = "gpc0-2";
461 samsung,pin-function = <2>;
462 samsung,pin-pud = <PIN_PULL_UP>;
463 samsung,pin-drv = <3>;
464 };
465
466 sd0_bus4: sd0-bus-width4 {
467 samsung,pins = "gpc0-3", "gpc0-4", "gpc0-5";
468 samsung,pin-function = <2>;
469 samsung,pin-pud = <PIN_PULL_UP>;
470 samsung,pin-drv = <3>;
471 };
472
473 sd0_bus8: sd0-bus-width8 {
474 samsung,pins = "gpc3-0", "gpc3-1", "gpc3-2", "gpc3-3";
475 samsung,pin-function = <2>;
476 samsung,pin-pud = <PIN_PULL_UP>;
477 samsung,pin-drv = <3>;
478 };
479
480 sd0_rdqs: sd0-rdqs {
481 samsung,pins = "gpc0-6";
482 samsung,pin-function = <2>;
483 samsung,pin-pud = <PIN_PULL_UP>;
484 samsung,pin-drv = <3>;
485 };
486
487 sd1_clk: sd1-clk {
488 samsung,pins = "gpc1-0";
489 samsung,pin-function = <2>;
490 samsung,pin-pud = <PIN_PULL_NONE>;
491 samsung,pin-drv = <3>;
492 };
493
494 sd1_cmd: sd1-cmd {
495 samsung,pins = "gpc1-1";
496 samsung,pin-function = <2>;
497 samsung,pin-pud = <PIN_PULL_NONE>;
498 samsung,pin-drv = <3>;
499 };
500
501 sd1_bus1: sd1-bus-width1 {
502 samsung,pins = "gpc1-2";
503 samsung,pin-function = <2>;
504 samsung,pin-pud = <PIN_PULL_UP>;
505 samsung,pin-drv = <3>;
506 };
507
508 sd1_bus4: sd1-bus-width4 {
509 samsung,pins = "gpc1-3", "gpc1-4", "gpc1-5";
510 samsung,pin-function = <2>;
511 samsung,pin-pud = <PIN_PULL_UP>;
512 samsung,pin-drv = <3>;
513 };
514
515 sd1_bus8: sd1-bus-width8 {
516 samsung,pins = "gpc4-0", "gpc4-1", "gpc4-2", "gpc4-3";
517 samsung,pin-function = <2>;
518 samsung,pin-pud = <PIN_PULL_UP>;
519 samsung,pin-drv = <3>;
520 };
521
522 sd2_clk: sd2-clk {
523 samsung,pins = "gpc2-0";
524 samsung,pin-function = <2>;
525 samsung,pin-pud = <PIN_PULL_NONE>;
526 samsung,pin-drv = <3>;
527 };
528
529 sd2_cmd: sd2-cmd {
530 samsung,pins = "gpc2-1";
531 samsung,pin-function = <2>;
532 samsung,pin-pud = <PIN_PULL_NONE>;
533 samsung,pin-drv = <3>;
534 };
535
536 sd2_cd: sd2-cd {
537 samsung,pins = "gpc2-2";
538 samsung,pin-function = <2>;
539 samsung,pin-pud = <PIN_PULL_UP>;
540 samsung,pin-drv = <3>;
541 };
542
543 sd2_bus1: sd2-bus-width1 {
544 samsung,pins = "gpc2-3";
545 samsung,pin-function = <2>;
546 samsung,pin-pud = <PIN_PULL_UP>;
547 samsung,pin-drv = <3>;
548 };
549
550 sd2_bus4: sd2-bus-width4 {
551 samsung,pins = "gpc2-4", "gpc2-5", "gpc2-6";
552 samsung,pin-function = <2>;
553 samsung,pin-pud = <PIN_PULL_UP>;
554 samsung,pin-drv = <3>;
555 };
556};
557
558&pinctrl_2 {
559 gpz0: gpz0 {
560 gpio-controller;
561 #gpio-cells = <2>;
562
563 interrupt-controller;
564 #interrupt-cells = <2>;
565 };
566
567 gpz1: gpz1 {
568 gpio-controller;
569 #gpio-cells = <2>;
570
571 interrupt-controller;
572 #interrupt-cells = <2>;
573 };
574};
diff --git a/arch/arm/boot/dts/exynos5260-xyref5260.dts b/arch/arm/boot/dts/exynos5260-xyref5260.dts
new file mode 100644
index 000000000000..8c84ab27c19b
--- /dev/null
+++ b/arch/arm/boot/dts/exynos5260-xyref5260.dts
@@ -0,0 +1,103 @@
1/*
2 * SAMSUNG XYREF5260 board device tree source
3 *
4 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
5 * http://www.samsung.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 version 2 as
9 * published by the Free Software Foundation.
10*/
11
12/dts-v1/;
13#include "exynos5260.dtsi"
14
15/ {
16 model = "SAMSUNG XYREF5260 board based on EXYNOS5260";
17 compatible = "samsung,xyref5260", "samsung,exynos5260", "samsung,exynos5";
18
19 memory {
20 reg = <0x20000000 0x80000000>;
21 };
22
23 chosen {
24 bootargs = "console=ttySAC2,115200";
25 };
26
27 fin_pll: xxti {
28 compatible = "fixed-clock";
29 clock-frequency = <24000000>;
30 clock-output-names = "fin_pll";
31 #clock-cells = <0>;
32 };
33
34 xrtcxti: xrtcxti {
35 compatible = "fixed-clock";
36 clock-frequency = <32768>;
37 clock-output-names = "xrtcxti";
38 #clock-cells = <0>;
39 };
40};
41
42&pinctrl_0 {
43 hdmi_hpd_irq: hdmi-hpd-irq {
44 samsung,pins = "gpx3-7";
45 samsung,pin-function = <0>;
46 samsung,pin-pud = <1>;
47 samsung,pin-drv = <0>;
48 };
49};
50
51&uart0 {
52 status = "okay";
53};
54
55&uart1 {
56 status = "okay";
57};
58
59&uart2 {
60 status = "okay";
61};
62
63&uart3 {
64 status = "okay";
65};
66
67&mmc_0 {
68 status = "okay";
69 num-slots = <1>;
70 broken-cd;
71 bypass-smu;
72 supports-highspeed;
73 supports-hs200-mode; /* 200 Mhz */
74 card-detect-delay = <200>;
75 samsung,dw-mshc-ciu-div = <3>;
76 samsung,dw-mshc-sdr-timing = <0 4>;
77 samsung,dw-mshc-ddr-timing = <0 2>;
78 pinctrl-names = "default";
79 pinctrl-0 = <&sd0_rdqs &sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8>;
80
81 slot@0 {
82 reg = <0>;
83 bus-width = <8>;
84 };
85};
86
87&mmc_2 {
88 status = "okay";
89 num-slots = <1>;
90 supports-highspeed;
91 card-detect-delay = <200>;
92 samsung,dw-mshc-ciu-div = <3>;
93 samsung,dw-mshc-sdr-timing = <2 3>;
94 samsung,dw-mshc-ddr-timing = <1 2>;
95 pinctrl-names = "default";
96 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus1 &sd2_bus4>;
97
98 slot@0 {
99 reg = <0>;
100 bus-width = <4>;
101 disable-wp;
102 };
103};
diff --git a/arch/arm/boot/dts/exynos5260.dtsi b/arch/arm/boot/dts/exynos5260.dtsi
new file mode 100644
index 000000000000..5398a60207ca
--- /dev/null
+++ b/arch/arm/boot/dts/exynos5260.dtsi
@@ -0,0 +1,304 @@
1/*
2 * SAMSUNG EXYNOS5260 SoC device tree source
3 *
4 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
5 * http://www.samsung.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 version 2 as
9 * published by the Free Software Foundation.
10*/
11
12#include "skeleton.dtsi"
13
14#include <dt-bindings/clock/exynos5260-clk.h>
15
16/ {
17 compatible = "samsung,exynos5260", "samsung,exynos5";
18 interrupt-parent = <&gic>;
19
20 aliases {
21 pinctrl0 = &pinctrl_0;
22 pinctrl1 = &pinctrl_1;
23 pinctrl2 = &pinctrl_2;
24 };
25
26 cpus {
27 #address-cells = <1>;
28 #size-cells = <0>;
29
30 cpu@0 {
31 device_type = "cpu";
32 compatible = "arm,cortex-a15";
33 reg = <0x0>;
34 cci-control-port = <&cci_control1>;
35 };
36
37 cpu@1 {
38 device_type = "cpu";
39 compatible = "arm,cortex-a15";
40 reg = <0x1>;
41 cci-control-port = <&cci_control1>;
42 };
43
44 cpu@100 {
45 device_type = "cpu";
46 compatible = "arm,cortex-a7";
47 reg = <0x100>;
48 cci-control-port = <&cci_control0>;
49 };
50
51 cpu@101 {
52 device_type = "cpu";
53 compatible = "arm,cortex-a7";
54 reg = <0x101>;
55 cci-control-port = <&cci_control0>;
56 };
57
58 cpu@102 {
59 device_type = "cpu";
60 compatible = "arm,cortex-a7";
61 reg = <0x102>;
62 cci-control-port = <&cci_control0>;
63 };
64
65 cpu@103 {
66 device_type = "cpu";
67 compatible = "arm,cortex-a7";
68 reg = <0x103>;
69 cci-control-port = <&cci_control0>;
70 };
71 };
72
73 soc: soc {
74 compatible = "simple-bus";
75 #address-cells = <1>;
76 #size-cells = <1>;
77 ranges;
78
79 clock_top: clock-controller@10010000 {
80 compatible = "samsung,exynos5260-clock-top";
81 reg = <0x10010000 0x10000>;
82 #clock-cells = <1>;
83 };
84
85 clock_peri: clock-controller@10200000 {
86 compatible = "samsung,exynos5260-clock-peri";
87 reg = <0x10200000 0x10000>;
88 #clock-cells = <1>;
89 };
90
91 clock_egl: clock-controller@10600000 {
92 compatible = "samsung,exynos5260-clock-egl";
93 reg = <0x10600000 0x10000>;
94 #clock-cells = <1>;
95 };
96
97 clock_kfc: clock-controller@10700000 {
98 compatible = "samsung,exynos5260-clock-kfc";
99 reg = <0x10700000 0x10000>;
100 #clock-cells = <1>;
101 };
102
103 clock_g2d: clock-controller@10A00000 {
104 compatible = "samsung,exynos5260-clock-g2d";
105 reg = <0x10A00000 0x10000>;
106 #clock-cells = <1>;
107 };
108
109 clock_mif: clock-controller@10CE0000 {
110 compatible = "samsung,exynos5260-clock-mif";
111 reg = <0x10CE0000 0x10000>;
112 #clock-cells = <1>;
113 };
114
115 clock_mfc: clock-controller@11090000 {
116 compatible = "samsung,exynos5260-clock-mfc";
117 reg = <0x11090000 0x10000>;
118 #clock-cells = <1>;
119 };
120
121 clock_g3d: clock-controller@11830000 {
122 compatible = "samsung,exynos5260-clock-g3d";
123 reg = <0x11830000 0x10000>;
124 #clock-cells = <1>;
125 };
126
127 clock_fsys: clock-controller@122E0000 {
128 compatible = "samsung,exynos5260-clock-fsys";
129 reg = <0x122E0000 0x10000>;
130 #clock-cells = <1>;
131 };
132
133 clock_aud: clock-controller@128C0000 {
134 compatible = "samsung,exynos5260-clock-aud";
135 reg = <0x128C0000 0x10000>;
136 #clock-cells = <1>;
137 };
138
139 clock_isp: clock-controller@133C0000 {
140 compatible = "samsung,exynos5260-clock-isp";
141 reg = <0x133C0000 0x10000>;
142 #clock-cells = <1>;
143 };
144
145 clock_gscl: clock-controller@13F00000 {
146 compatible = "samsung,exynos5260-clock-gscl";
147 reg = <0x13F00000 0x10000>;
148 #clock-cells = <1>;
149 };
150
151 clock_disp: clock-controller@14550000 {
152 compatible = "samsung,exynos5260-clock-disp";
153 reg = <0x14550000 0x10000>;
154 #clock-cells = <1>;
155 };
156
157 gic: interrupt-controller@10481000 {
158 compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
159 #interrupt-cells = <3>;
160 #address-cells = <0>;
161 #size-cells = <0>;
162 interrupt-controller;
163 reg = <0x10481000 0x1000>,
164 <0x10482000 0x1000>,
165 <0x10484000 0x2000>,
166 <0x10486000 0x2000>;
167 interrupts = <1 9 0xf04>;
168 };
169
170 chipid: chipid@10000000 {
171 compatible = "samsung,exynos4210-chipid";
172 reg = <0x10000000 0x100>;
173 };
174
175 mct: mct@100B0000 {
176 compatible = "samsung,exynos4210-mct";
177 reg = <0x100B0000 0x1000>;
178 clocks = <&fin_pll>, <&clock_peri PERI_CLK_MCT>;
179 clock-names = "fin_pll", "mct";
180 interrupts = <0 104 0>, <0 105 0>, <0 106 0>,
181 <0 107 0>, <0 122 0>, <0 123 0>,
182 <0 124 0>, <0 125 0>, <0 126 0>,
183 <0 127 0>, <0 128 0>, <0 129 0>;
184 };
185
186 cci: cci@10F00000 {
187 compatible = "arm,cci-400";
188 #address-cells = <1>;
189 #size-cells = <1>;
190 reg = <0x10F00000 0x1000>;
191 ranges = <0x0 0x10F00000 0x6000>;
192
193 cci_control0: slave-if@4000 {
194 compatible = "arm,cci-400-ctrl-if";
195 interface-type = "ace";
196 reg = <0x4000 0x1000>;
197 };
198
199 cci_control1: slave-if@5000 {
200 compatible = "arm,cci-400-ctrl-if";
201 interface-type = "ace";
202 reg = <0x5000 0x1000>;
203 };
204 };
205
206 pinctrl_0: pinctrl@11600000 {
207 compatible = "samsung,exynos5260-pinctrl";
208 reg = <0x11600000 0x1000>;
209 interrupts = <0 79 0>;
210
211 wakeup-interrupt-controller {
212 compatible = "samsung,exynos4210-wakeup-eint";
213 interrupt-parent = <&gic>;
214 interrupts = <0 32 0>;
215 };
216 };
217
218 pinctrl_1: pinctrl@12290000 {
219 compatible = "samsung,exynos5260-pinctrl";
220 reg = <0x12290000 0x1000>;
221 interrupts = <0 157 0>;
222 };
223
224 pinctrl_2: pinctrl@128B0000 {
225 compatible = "samsung,exynos5260-pinctrl";
226 reg = <0x128B0000 0x1000>;
227 interrupts = <0 243 0>;
228 };
229
230 uart0: serial@12C00000 {
231 compatible = "samsung,exynos4210-uart";
232 reg = <0x12C00000 0x100>;
233 interrupts = <0 146 0>;
234 clocks = <&clock_peri PERI_CLK_UART0>, <&clock_peri PERI_SCLK_UART0>;
235 clock-names = "uart", "clk_uart_baud0";
236 status = "disabled";
237 };
238
239 uart1: serial@12C10000 {
240 compatible = "samsung,exynos4210-uart";
241 reg = <0x12C10000 0x100>;
242 interrupts = <0 147 0>;
243 clocks = <&clock_peri PERI_CLK_UART1>, <&clock_peri PERI_SCLK_UART1>;
244 clock-names = "uart", "clk_uart_baud0";
245 status = "disabled";
246 };
247
248 uart2: serial@12C20000 {
249 compatible = "samsung,exynos4210-uart";
250 reg = <0x12C20000 0x100>;
251 interrupts = <0 148 0>;
252 clocks = <&clock_peri PERI_CLK_UART2>, <&clock_peri PERI_SCLK_UART2>;
253 clock-names = "uart", "clk_uart_baud0";
254 status = "disabled";
255 };
256
257 uart3: serial@12860000 {
258 compatible = "samsung,exynos4210-uart";
259 reg = <0x12860000 0x100>;
260 interrupts = <0 145 0>;
261 clocks = <&clock_aud AUD_CLK_AUD_UART>, <&clock_aud AUD_SCLK_AUD_UART>;
262 clock-names = "uart", "clk_uart_baud0";
263 status = "disabled";
264 };
265
266 mmc_0: mmc@12140000 {
267 compatible = "samsung,exynos5250-dw-mshc";
268 reg = <0x12140000 0x2000>;
269 interrupts = <0 156 0>;
270 #address-cells = <1>;
271 #size-cells = <0>;
272 clocks = <&clock_fsys FSYS_CLK_MMC0>, <&clock_top TOP_SCLK_MMC0>;
273 clock-names = "biu", "ciu";
274 fifo-depth = <64>;
275 status = "disabled";
276 };
277
278 mmc_1: mmc@12150000 {
279 compatible = "samsung,exynos5250-dw-mshc";
280 reg = <0x12150000 0x2000>;
281 interrupts = <0 158 0>;
282 #address-cells = <1>;
283 #size-cells = <0>;
284 clocks = <&clock_fsys FSYS_CLK_MMC1>, <&clock_top TOP_SCLK_MMC1>;
285 clock-names = "biu", "ciu";
286 fifo-depth = <64>;
287 status = "disabled";
288 };
289
290 mmc_2: mmc@12160000 {
291 compatible = "samsung,exynos5250-dw-mshc";
292 reg = <0x12160000 0x2000>;
293 interrupts = <0 159 0>;
294 #address-cells = <1>;
295 #size-cells = <0>;
296 clocks = <&clock_fsys FSYS_CLK_MMC2>, <&clock_top TOP_SCLK_MMC2>;
297 clock-names = "biu", "ciu";
298 fifo-depth = <64>;
299 status = "disabled";
300 };
301 };
302};
303
304#include "exynos5260-pinctrl.dtsi"
diff --git a/arch/arm/boot/dts/exynos5410-smdk5410.dts b/arch/arm/boot/dts/exynos5410-smdk5410.dts
new file mode 100644
index 000000000000..7275bbd6fc4b
--- /dev/null
+++ b/arch/arm/boot/dts/exynos5410-smdk5410.dts
@@ -0,0 +1,82 @@
1/*
2 * SAMSUNG SMDK5410 board device tree source
3 *
4 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
5 * http://www.samsung.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 version 2 as
9 * published by the Free Software Foundation.
10*/
11
12/dts-v1/;
13#include "exynos5410.dtsi"
14/ {
15 model = "Samsung SMDK5410 board based on EXYNOS5410";
16 compatible = "samsung,smdk5410", "samsung,exynos5410", "samsung,exynos5";
17
18 memory {
19 reg = <0x40000000 0x80000000>;
20 };
21
22 chosen {
23 bootargs = "console=ttySAC2,115200";
24 };
25
26 fin_pll: xxti {
27 compatible = "fixed-clock";
28 clock-frequency = <24000000>;
29 clock-output-names = "fin_pll";
30 #clock-cells = <0>;
31 };
32
33 firmware@02037000 {
34 compatible = "samsung,secure-firmware";
35 reg = <0x02037000 0x1000>;
36 };
37
38};
39
40&mmc_0 {
41 status = "okay";
42 num-slots = <1>;
43 supports-highspeed;
44 broken-cd;
45 card-detect-delay = <200>;
46 samsung,dw-mshc-ciu-div = <3>;
47 samsung,dw-mshc-sdr-timing = <2 3>;
48 samsung,dw-mshc-ddr-timing = <1 2>;
49
50 slot@0 {
51 reg = <0>;
52 bus-width = <8>;
53 };
54};
55
56&mmc_2 {
57 status = "okay";
58 num-slots = <1>;
59 supports-highspeed;
60 card-detect-delay = <200>;
61 samsung,dw-mshc-ciu-div = <3>;
62 samsung,dw-mshc-sdr-timing = <2 3>;
63 samsung,dw-mshc-ddr-timing = <1 2>;
64
65 slot@0 {
66 reg = <0>;
67 bus-width = <4>;
68 disable-wp;
69 };
70};
71
72&uart0 {
73 status = "okay";
74};
75
76&uart1 {
77 status = "okay";
78};
79
80&uart2 {
81 status = "okay";
82};
diff --git a/arch/arm/boot/dts/exynos5410.dtsi b/arch/arm/boot/dts/exynos5410.dtsi
new file mode 100644
index 000000000000..3839c26f467f
--- /dev/null
+++ b/arch/arm/boot/dts/exynos5410.dtsi
@@ -0,0 +1,206 @@
1/*
2 * SAMSUNG EXYNOS5410 SoC device tree source
3 *
4 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com
6 *
7 * SAMSUNG EXYNOS5410 SoC device nodes are listed in this file.
8 * EXYNOS5410 based board files can include this file and provide
9 * values for board specfic bindings.
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 "skeleton.dtsi"
17#include <dt-bindings/clock/exynos5410.h>
18
19/ {
20 compatible = "samsung,exynos5410", "samsung,exynos5";
21 interrupt-parent = <&gic>;
22
23 cpus {
24 #address-cells = <1>;
25 #size-cells = <0>;
26
27 CPU0: cpu@0 {
28 device_type = "cpu";
29 compatible = "arm,cortex-a15";
30 reg = <0x0>;
31 };
32
33 CPU1: cpu@1 {
34 device_type = "cpu";
35 compatible = "arm,cortex-a15";
36 reg = <0x1>;
37 };
38
39 CPU2: cpu@2 {
40 device_type = "cpu";
41 compatible = "arm,cortex-a15";
42 reg = <0x2>;
43 };
44
45 CPU3: cpu@3 {
46 device_type = "cpu";
47 compatible = "arm,cortex-a15";
48 reg = <0x3>;
49 };
50 };
51
52 soc: soc {
53 compatible = "simple-bus";
54 #address-cells = <1>;
55 #size-cells = <1>;
56 ranges;
57
58 combiner: interrupt-controller@10440000 {
59 compatible = "samsung,exynos4210-combiner";
60 #interrupt-cells = <2>;
61 interrupt-controller;
62 samsung,combiner-nr = <32>;
63 reg = <0x10440000 0x1000>;
64 interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
65 <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>,
66 <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
67 <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>,
68 <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>,
69 <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>,
70 <0 24 0>, <0 25 0>, <0 26 0>, <0 27 0>,
71 <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>;
72 };
73
74 gic: interrupt-controller@10481000 {
75 compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
76 #interrupt-cells = <3>;
77 interrupt-controller;
78 reg = <0x10481000 0x1000>,
79 <0x10482000 0x1000>,
80 <0x10484000 0x2000>,
81 <0x10486000 0x2000>;
82 interrupts = <1 9 0xf04>;
83 };
84
85 chipid@10000000 {
86 compatible = "samsung,exynos4210-chipid";
87 reg = <0x10000000 0x100>;
88 };
89
90 mct: mct@101C0000 {
91 compatible = "samsung,exynos4210-mct";
92 reg = <0x101C0000 0xB00>;
93 interrupt-parent = <&interrupt_map>;
94 interrupts = <0>, <1>, <2>, <3>,
95 <4>, <5>, <6>, <7>,
96 <8>, <9>, <10>, <11>;
97 clocks = <&fin_pll>, <&clock CLK_MCT>;
98 clock-names = "fin_pll", "mct";
99
100 interrupt_map: interrupt-map {
101 #interrupt-cells = <1>;
102 #address-cells = <0>;
103 #size-cells = <0>;
104 interrupt-map = <0 &combiner 23 3>,
105 <1 &combiner 23 4>,
106 <2 &combiner 25 2>,
107 <3 &combiner 25 3>,
108 <4 &gic 0 120 0>,
109 <5 &gic 0 121 0>,
110 <6 &gic 0 122 0>,
111 <7 &gic 0 123 0>,
112 <8 &gic 0 128 0>,
113 <9 &gic 0 129 0>,
114 <10 &gic 0 130 0>,
115 <11 &gic 0 131 0>;
116 };
117 };
118
119 sysram@02020000 {
120 compatible = "mmio-sram";
121 reg = <0x02020000 0x54000>;
122 #address-cells = <1>;
123 #size-cells = <1>;
124 ranges = <0 0x02020000 0x54000>;
125
126 smp-sysram@0 {
127 compatible = "samsung,exynos4210-sysram";
128 reg = <0x0 0x1000>;
129 };
130
131 smp-sysram@53000 {
132 compatible = "samsung,exynos4210-sysram-ns";
133 reg = <0x53000 0x1000>;
134 };
135 };
136
137 clock: clock-controller@10010000 {
138 compatible = "samsung,exynos5410-clock";
139 reg = <0x10010000 0x30000>;
140 #clock-cells = <1>;
141 };
142
143 mmc_0: mmc@12200000 {
144 compatible = "samsung,exynos5250-dw-mshc";
145 reg = <0x12200000 0x1000>;
146 interrupts = <0 75 0>;
147 #address-cells = <1>;
148 #size-cells = <0>;
149 clocks = <&clock CLK_MMC0>, <&clock CLK_SCLK_MMC0>;
150 clock-names = "biu", "ciu";
151 fifo-depth = <0x80>;
152 status = "disabled";
153 };
154
155 mmc_1: mmc@12210000 {
156 compatible = "samsung,exynos5250-dw-mshc";
157 reg = <0x12210000 0x1000>;
158 interrupts = <0 76 0>;
159 #address-cells = <1>;
160 #size-cells = <0>;
161 clocks = <&clock CLK_MMC1>, <&clock CLK_SCLK_MMC1>;
162 clock-names = "biu", "ciu";
163 fifo-depth = <0x80>;
164 status = "disabled";
165 };
166
167 mmc_2: mmc@12220000 {
168 compatible = "samsung,exynos5250-dw-mshc";
169 reg = <0x12220000 0x1000>;
170 interrupts = <0 77 0>;
171 #address-cells = <1>;
172 #size-cells = <0>;
173 clocks = <&clock CLK_MMC2>, <&clock CLK_SCLK_MMC2>;
174 clock-names = "biu", "ciu";
175 fifo-depth = <0x80>;
176 status = "disabled";
177 };
178
179 uart0: serial@12C00000 {
180 compatible = "samsung,exynos4210-uart";
181 reg = <0x12C00000 0x100>;
182 interrupts = <0 51 0>;
183 clocks = <&clock CLK_UART0>, <&clock CLK_SCLK_UART0>;
184 clock-names = "uart", "clk_uart_baud0";
185 status = "disabled";
186 };
187
188 uart1: serial@12C10000 {
189 compatible = "samsung,exynos4210-uart";
190 reg = <0x12C10000 0x100>;
191 interrupts = <0 52 0>;
192 clocks = <&clock CLK_UART1>, <&clock CLK_SCLK_UART1>;
193 clock-names = "uart", "clk_uart_baud0";
194 status = "disabled";
195 };
196
197 uart2: serial@12C20000 {
198 compatible = "samsung,exynos4210-uart";
199 reg = <0x12C20000 0x100>;
200 interrupts = <0 53 0>;
201 clocks = <&clock CLK_UART2>, <&clock CLK_SCLK_UART2>;
202 clock-names = "uart", "clk_uart_baud0";
203 status = "disabled";
204 };
205 };
206};
diff --git a/arch/arm/boot/dts/exynos5420-arndale-octa.dts b/arch/arm/boot/dts/exynos5420-arndale-octa.dts
index 80a3bf4c5986..434fd9d3e09d 100644
--- a/arch/arm/boot/dts/exynos5420-arndale-octa.dts
+++ b/arch/arm/boot/dts/exynos5420-arndale-octa.dts
@@ -26,6 +26,11 @@
26 bootargs = "console=ttySAC3,115200"; 26 bootargs = "console=ttySAC3,115200";
27 }; 27 };
28 28
29 firmware@02073000 {
30 compatible = "samsung,secure-firmware";
31 reg = <0x02073000 0x1000>;
32 };
33
29 fixed-rate-clocks { 34 fixed-rate-clocks {
30 oscclk { 35 oscclk {
31 compatible = "samsung,exynos5420-oscclk"; 36 compatible = "samsung,exynos5420-oscclk";
@@ -37,6 +42,11 @@
37 status = "okay"; 42 status = "okay";
38 }; 43 };
39 44
45 codec@11000000 {
46 samsung,mfc-r = <0x43000000 0x800000>;
47 samsung,mfc-l = <0x51000000 0x800000>;
48 };
49
40 mmc@12200000 { 50 mmc@12200000 {
41 status = "okay"; 51 status = "okay";
42 broken-cd; 52 broken-cd;
@@ -364,16 +374,4 @@
364 gpio-key,wakeup; 374 gpio-key,wakeup;
365 }; 375 };
366 }; 376 };
367
368 amba {
369 mdma1: mdma@11C10000 {
370 /*
371 * MDMA1 can support both secure and non-secure
372 * AXI transactions. When this is enabled in the kernel
373 * for boards that run in secure mode, we are getting
374 * imprecise external aborts causing the kernel to oops.
375 */
376 status = "disabled";
377 };
378 };
379}; 377};
diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
new file mode 100644
index 000000000000..1c5b8f9f4a36
--- /dev/null
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -0,0 +1,287 @@
1/*
2 * Google Peach Pit Rev 6+ board device tree source
3 *
4 * Copyright (c) 2014 Google, Inc
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
11/dts-v1/;
12#include <dt-bindings/input/input.h>
13#include <dt-bindings/gpio/gpio.h>
14#include "exynos5420.dtsi"
15
16/ {
17 model = "Google Peach Pit Rev 6+";
18
19 compatible = "google,pit-rev16",
20 "google,pit-rev15", "google,pit-rev14",
21 "google,pit-rev13", "google,pit-rev12",
22 "google,pit-rev11", "google,pit-rev10",
23 "google,pit-rev9", "google,pit-rev8",
24 "google,pit-rev7", "google,pit-rev6",
25 "google,pit", "google,peach","samsung,exynos5420",
26 "samsung,exynos5";
27
28 memory {
29 reg = <0x20000000 0x80000000>;
30 };
31
32 fixed-rate-clocks {
33 oscclk {
34 compatible = "samsung,exynos5420-oscclk";
35 clock-frequency = <24000000>;
36 };
37 };
38
39 gpio-keys {
40 compatible = "gpio-keys";
41
42 pinctrl-names = "default";
43 pinctrl-0 = <&power_key_irq>;
44
45 power {
46 label = "Power";
47 gpios = <&gpx1 2 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_POWER>;
49 gpio-key,wakeup;
50 };
51 };
52
53 backlight {
54 compatible = "pwm-backlight";
55 pwms = <&pwm 0 1000000 0>;
56 brightness-levels = <0 100 500 1000 1500 2000 2500 2800>;
57 default-brightness-level = <7>;
58 pinctrl-0 = <&pwm0_out>;
59 pinctrl-names = "default";
60 };
61
62 sound {
63 compatible = "google,snow-audio-max98090";
64
65 samsung,i2s-controller = <&i2s0>;
66 samsung,audio-codec = <&max98090>;
67 };
68
69 usb300_vbus_reg: regulator-usb300 {
70 compatible = "regulator-fixed";
71 regulator-name = "P5.0V_USB3CON0";
72 regulator-min-microvolt = <5000000>;
73 regulator-max-microvolt = <5000000>;
74 gpio = <&gph0 0 0>;
75 pinctrl-names = "default";
76 pinctrl-0 = <&usb300_vbus_en>;
77 enable-active-high;
78 };
79
80 usb301_vbus_reg: regulator-usb301 {
81 compatible = "regulator-fixed";
82 regulator-name = "P5.0V_USB3CON1";
83 regulator-min-microvolt = <5000000>;
84 regulator-max-microvolt = <5000000>;
85 gpio = <&gph0 1 0>;
86 pinctrl-names = "default";
87 pinctrl-0 = <&usb301_vbus_en>;
88 enable-active-high;
89 };
90};
91
92&pinctrl_0 {
93 max98090_irq: max98090-irq {
94 samsung,pins = "gpx0-2";
95 samsung,pin-function = <0>;
96 samsung,pin-pud = <0>;
97 samsung,pin-drv = <0>;
98 };
99
100 tpm_irq: tpm-irq {
101 samsung,pins = "gpx1-0";
102 samsung,pin-function = <0>;
103 samsung,pin-pud = <0>;
104 samsung,pin-drv = <0>;
105 };
106
107 power_key_irq: power-key-irq {
108 samsung,pins = "gpx1-2";
109 samsung,pin-function = <0>;
110 samsung,pin-pud = <0>;
111 samsung,pin-drv = <0>;
112 };
113
114 hdmi_hpd_irq: hdmi-hpd-irq {
115 samsung,pins = "gpx3-7";
116 samsung,pin-function = <0>;
117 samsung,pin-pud = <1>;
118 samsung,pin-drv = <0>;
119 };
120
121 dp_hpd_gpio: dp_hpd_gpio {
122 samsung,pins = "gpx2-6";
123 samsung,pin-function = <0>;
124 samsung,pin-pud = <3>;
125 samsung,pin-drv = <0>;
126 };
127};
128
129&pinctrl_3 {
130 usb300_vbus_en: usb300-vbus-en {
131 samsung,pins = "gph0-0";
132 samsung,pin-function = <1>;
133 samsung,pin-pud = <0>;
134 samsung,pin-drv = <0>;
135 };
136
137 usb301_vbus_en: usb301-vbus-en {
138 samsung,pins = "gph0-1";
139 samsung,pin-function = <1>;
140 samsung,pin-pud = <0>;
141 samsung,pin-drv = <0>;
142 };
143};
144
145&rtc {
146 status = "okay";
147};
148
149&uart_3 {
150 status = "okay";
151};
152
153&mmc_0 {
154 status = "okay";
155 num-slots = <1>;
156 broken-cd;
157 caps2-mmc-hs200-1_8v;
158 supports-highspeed;
159 non-removable;
160 card-detect-delay = <200>;
161 clock-frequency = <400000000>;
162 samsung,dw-mshc-ciu-div = <3>;
163 samsung,dw-mshc-sdr-timing = <0 4>;
164 samsung,dw-mshc-ddr-timing = <0 2>;
165 pinctrl-names = "default";
166 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8>;
167
168 slot@0 {
169 reg = <0>;
170 bus-width = <8>;
171 };
172};
173
174&mmc_2 {
175 status = "okay";
176 num-slots = <1>;
177 supports-highspeed;
178 card-detect-delay = <200>;
179 clock-frequency = <400000000>;
180 samsung,dw-mshc-ciu-div = <3>;
181 samsung,dw-mshc-sdr-timing = <2 3>;
182 samsung,dw-mshc-ddr-timing = <1 2>;
183 pinctrl-names = "default";
184 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>;
185
186 slot@0 {
187 reg = <0>;
188 bus-width = <4>;
189 };
190};
191
192&hsi2c_7 {
193 status = "okay";
194
195 max98090: codec@10 {
196 compatible = "maxim,max98090";
197 reg = <0x10>;
198 interrupts = <2 0>;
199 interrupt-parent = <&gpx0>;
200 pinctrl-names = "default";
201 pinctrl-0 = <&max98090_irq>;
202 };
203};
204
205&hsi2c_9 {
206 status = "okay";
207 clock-frequency = <400000>;
208
209 tpm@20 {
210 compatible = "infineon,slb9645tt";
211 reg = <0x20>;
212
213 /* Unused irq; but still need to configure the pins */
214 pinctrl-names = "default";
215 pinctrl-0 = <&tpm_irq>;
216 };
217};
218
219&i2c_2 {
220 status = "okay";
221 samsung,i2c-sda-delay = <100>;
222 samsung,i2c-max-bus-freq = <66000>;
223 samsung,i2c-slave-addr = <0x50>;
224};
225
226&hdmi {
227 status = "okay";
228 hpd-gpio = <&gpx3 7 GPIO_ACTIVE_HIGH>;
229 pinctrl-names = "default";
230 pinctrl-0 = <&hdmi_hpd_irq>;
231 ddc = <&i2c_2>;
232};
233
234&usbdrd_phy0 {
235 vbus-supply = <&usb300_vbus_reg>;
236};
237
238&usbdrd_phy1 {
239 vbus-supply = <&usb301_vbus_reg>;
240};
241
242/*
243 * Use longest HW watchdog in SoC (32 seconds) since the hardware
244 * watchdog provides no debugging information (compared to soft/hard
245 * lockup detectors) and so should be last resort.
246 */
247&watchdog {
248 timeout-sec = <32>;
249};
250
251&i2s0 {
252 status = "okay";
253};
254
255&fimd {
256 status = "okay";
257 samsung,invert-vclk;
258};
259
260&dp {
261 status = "okay";
262 pinctrl-names = "default";
263 pinctrl-0 = <&dp_hpd_gpio>;
264 samsung,color-space = <0>;
265 samsung,dynamic-range = <0>;
266 samsung,ycbcr-coeff = <0>;
267 samsung,color-depth = <1>;
268 samsung,link-rate = <0x06>;
269 samsung,lane-count = <2>;
270 samsung,hpd-gpio = <&gpx2 6 0>;
271
272 display-timings {
273 native-mode = <&timing1>;
274
275 timing1: timing@1 {
276 clock-frequency = <70589280>;
277 hactive = <1366>;
278 vactive = <768>;
279 hfront-porch = <40>;
280 hback-porch = <40>;
281 hsync-len = <32>;
282 vback-porch = <10>;
283 vfront-porch = <12>;
284 vsync-len = <6>;
285 };
286 };
287};
diff --git a/arch/arm/boot/dts/exynos5420-pinctrl.dtsi b/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
index e62c8eb57438..ba686e40eac7 100644
--- a/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
+++ b/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
@@ -624,6 +624,34 @@
624 samsung,pin-drv = <0>; 624 samsung,pin-drv = <0>;
625 }; 625 };
626 626
627 pwm0_out: pwm0-out {
628 samsung,pins = "gpb2-0";
629 samsung,pin-function = <2>;
630 samsung,pin-pud = <0>;
631 samsung,pin-drv = <0>;
632 };
633
634 pwm1_out: pwm1-out {
635 samsung,pins = "gpb2-1";
636 samsung,pin-function = <2>;
637 samsung,pin-pud = <0>;
638 samsung,pin-drv = <0>;
639 };
640
641 pwm2_out: pwm2-out {
642 samsung,pins = "gpb2-2";
643 samsung,pin-function = <2>;
644 samsung,pin-pud = <0>;
645 samsung,pin-drv = <0>;
646 };
647
648 pwm3_out: pwm3-out {
649 samsung,pins = "gpb2-3";
650 samsung,pin-function = <2>;
651 samsung,pin-pud = <0>;
652 samsung,pin-drv = <0>;
653 };
654
627 i2c7_hs_bus: i2c7-hs-bus { 655 i2c7_hs_bus: i2c7-hs-bus {
628 samsung,pins = "gpb2-2", "gpb2-3"; 656 samsung,pins = "gpb2-2", "gpb2-3";
629 samsung,pin-function = <3>; 657 samsung,pin-function = <3>;
diff --git a/arch/arm/boot/dts/exynos5420-smdk5420.dts b/arch/arm/boot/dts/exynos5420-smdk5420.dts
index 69104850eb5e..6052aa9c5659 100644
--- a/arch/arm/boot/dts/exynos5420-smdk5420.dts
+++ b/arch/arm/boot/dts/exynos5420-smdk5420.dts
@@ -68,6 +68,11 @@
68 status = "okay"; 68 status = "okay";
69 }; 69 };
70 70
71 codec@11000000 {
72 samsung,mfc-r = <0x43000000 0x800000>;
73 samsung,mfc-l = <0x51000000 0x800000>;
74 };
75
71 mmc@12200000 { 76 mmc@12200000 {
72 status = "okay"; 77 status = "okay";
73 broken-cd; 78 broken-cd;
@@ -140,6 +145,22 @@
140 }; 145 };
141 }; 146 };
142 147
148 pinctrl@14000000 {
149 usb300_vbus_en: usb300-vbus-en {
150 samsung,pins = "gpg0-5";
151 samsung,pin-function = <1>;
152 samsung,pin-pud = <0>;
153 samsung,pin-drv = <0>;
154 };
155
156 usb301_vbus_en: usb301-vbus-en {
157 samsung,pins = "gpg1-4";
158 samsung,pin-function = <1>;
159 samsung,pin-pud = <0>;
160 samsung,pin-drv = <0>;
161 };
162 };
163
143 hdmi@14530000 { 164 hdmi@14530000 {
144 status = "okay"; 165 status = "okay";
145 hpd-gpio = <&gpx3 7 0>; 166 hpd-gpio = <&gpx3 7 0>;
@@ -147,6 +168,36 @@
147 pinctrl-0 = <&hdmi_hpd_irq>; 168 pinctrl-0 = <&hdmi_hpd_irq>;
148 }; 169 };
149 170
171 usb300_vbus_reg: regulator-usb300 {
172 compatible = "regulator-fixed";
173 regulator-name = "VBUS0";
174 regulator-min-microvolt = <5000000>;
175 regulator-max-microvolt = <5000000>;
176 gpio = <&gpg0 5 0>;
177 pinctrl-names = "default";
178 pinctrl-0 = <&usb300_vbus_en>;
179 enable-active-high;
180 };
181
182 usb301_vbus_reg: regulator-usb301 {
183 compatible = "regulator-fixed";
184 regulator-name = "VBUS1";
185 regulator-min-microvolt = <5000000>;
186 regulator-max-microvolt = <5000000>;
187 gpio = <&gpg1 4 0>;
188 pinctrl-names = "default";
189 pinctrl-0 = <&usb301_vbus_en>;
190 enable-active-high;
191 };
192
193 phy@12100000 {
194 vbus-supply = <&usb300_vbus_reg>;
195 };
196
197 phy@12500000 {
198 vbus-supply = <&usb301_vbus_reg>;
199 };
200
150 i2c_2: i2c@12C80000 { 201 i2c_2: i2c@12C80000 {
151 samsung,i2c-sda-delay = <100>; 202 samsung,i2c-sda-delay = <100>;
152 samsung,i2c-max-bus-freq = <66000>; 203 samsung,i2c-max-bus-freq = <66000>;
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index c3a9a66c5767..e38532271ef9 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -47,6 +47,8 @@
47 spi0 = &spi_0; 47 spi0 = &spi_0;
48 spi1 = &spi_1; 48 spi1 = &spi_1;
49 spi2 = &spi_2; 49 spi2 = &spi_2;
50 usbdrdphy0 = &usbdrd_phy0;
51 usbdrdphy1 = &usbdrd_phy1;
50 }; 52 };
51 53
52 cpus { 54 cpus {
@@ -58,6 +60,7 @@
58 compatible = "arm,cortex-a15"; 60 compatible = "arm,cortex-a15";
59 reg = <0x0>; 61 reg = <0x0>;
60 clock-frequency = <1800000000>; 62 clock-frequency = <1800000000>;
63 cci-control-port = <&cci_control1>;
61 }; 64 };
62 65
63 cpu1: cpu@1 { 66 cpu1: cpu@1 {
@@ -65,6 +68,7 @@
65 compatible = "arm,cortex-a15"; 68 compatible = "arm,cortex-a15";
66 reg = <0x1>; 69 reg = <0x1>;
67 clock-frequency = <1800000000>; 70 clock-frequency = <1800000000>;
71 cci-control-port = <&cci_control1>;
68 }; 72 };
69 73
70 cpu2: cpu@2 { 74 cpu2: cpu@2 {
@@ -72,6 +76,7 @@
72 compatible = "arm,cortex-a15"; 76 compatible = "arm,cortex-a15";
73 reg = <0x2>; 77 reg = <0x2>;
74 clock-frequency = <1800000000>; 78 clock-frequency = <1800000000>;
79 cci-control-port = <&cci_control1>;
75 }; 80 };
76 81
77 cpu3: cpu@3 { 82 cpu3: cpu@3 {
@@ -79,6 +84,7 @@
79 compatible = "arm,cortex-a15"; 84 compatible = "arm,cortex-a15";
80 reg = <0x3>; 85 reg = <0x3>;
81 clock-frequency = <1800000000>; 86 clock-frequency = <1800000000>;
87 cci-control-port = <&cci_control1>;
82 }; 88 };
83 89
84 cpu4: cpu@100 { 90 cpu4: cpu@100 {
@@ -86,6 +92,7 @@
86 compatible = "arm,cortex-a7"; 92 compatible = "arm,cortex-a7";
87 reg = <0x100>; 93 reg = <0x100>;
88 clock-frequency = <1000000000>; 94 clock-frequency = <1000000000>;
95 cci-control-port = <&cci_control0>;
89 }; 96 };
90 97
91 cpu5: cpu@101 { 98 cpu5: cpu@101 {
@@ -93,6 +100,7 @@
93 compatible = "arm,cortex-a7"; 100 compatible = "arm,cortex-a7";
94 reg = <0x101>; 101 reg = <0x101>;
95 clock-frequency = <1000000000>; 102 clock-frequency = <1000000000>;
103 cci-control-port = <&cci_control0>;
96 }; 104 };
97 105
98 cpu6: cpu@102 { 106 cpu6: cpu@102 {
@@ -100,6 +108,7 @@
100 compatible = "arm,cortex-a7"; 108 compatible = "arm,cortex-a7";
101 reg = <0x102>; 109 reg = <0x102>;
102 clock-frequency = <1000000000>; 110 clock-frequency = <1000000000>;
111 cci-control-port = <&cci_control0>;
103 }; 112 };
104 113
105 cpu7: cpu@103 { 114 cpu7: cpu@103 {
@@ -107,6 +116,44 @@
107 compatible = "arm,cortex-a7"; 116 compatible = "arm,cortex-a7";
108 reg = <0x103>; 117 reg = <0x103>;
109 clock-frequency = <1000000000>; 118 clock-frequency = <1000000000>;
119 cci-control-port = <&cci_control0>;
120 };
121 };
122
123 cci@10d20000 {
124 compatible = "arm,cci-400";
125 #address-cells = <1>;
126 #size-cells = <1>;
127 reg = <0x10d20000 0x1000>;
128 ranges = <0x0 0x10d20000 0x6000>;
129
130 cci_control0: slave-if@4000 {
131 compatible = "arm,cci-400-ctrl-if";
132 interface-type = "ace";
133 reg = <0x4000 0x1000>;
134 };
135 cci_control1: slave-if@5000 {
136 compatible = "arm,cci-400-ctrl-if";
137 interface-type = "ace";
138 reg = <0x5000 0x1000>;
139 };
140 };
141
142 sysram@02020000 {
143 compatible = "mmio-sram";
144 reg = <0x02020000 0x54000>;
145 #address-cells = <1>;
146 #size-cells = <1>;
147 ranges = <0 0x02020000 0x54000>;
148
149 smp-sysram@0 {
150 compatible = "samsung,exynos4210-sysram";
151 reg = <0x0 0x1000>;
152 };
153
154 smp-sysram@53000 {
155 compatible = "samsung,exynos4210-sysram-ns";
156 reg = <0x53000 0x1000>;
110 }; 157 };
111 }; 158 };
112 159
@@ -125,12 +172,13 @@
125 clock-names = "pll_ref", "pll_in", "sclk_audio", "sclk_pcm_in"; 172 clock-names = "pll_ref", "pll_in", "sclk_audio", "sclk_pcm_in";
126 }; 173 };
127 174
128 codec@11000000 { 175 mfc: codec@11000000 {
129 compatible = "samsung,mfc-v7"; 176 compatible = "samsung,mfc-v7";
130 reg = <0x11000000 0x10000>; 177 reg = <0x11000000 0x10000>;
131 interrupts = <0 96 0>; 178 interrupts = <0 96 0>;
132 clocks = <&clock CLK_MFC>; 179 clocks = <&clock CLK_MFC>;
133 clock-names = "mfc"; 180 clock-names = "mfc";
181 samsung,power-domain = <&mfc_pd>;
134 }; 182 };
135 183
136 mmc_0: mmc@12200000 { 184 mmc_0: mmc@12200000 {
@@ -169,7 +217,7 @@
169 status = "disabled"; 217 status = "disabled";
170 }; 218 };
171 219
172 mct@101C0000 { 220 mct: mct@101C0000 {
173 compatible = "samsung,exynos4210-mct"; 221 compatible = "samsung,exynos4210-mct";
174 reg = <0x101C0000 0x800>; 222 reg = <0x101C0000 0x800>;
175 interrupt-controller; 223 interrupt-controller;
@@ -219,16 +267,6 @@
219 reg = <0x100440C0 0x20>; 267 reg = <0x100440C0 0x20>;
220 }; 268 };
221 269
222 mau_pd: power-domain@100440E0 {
223 compatible = "samsung,exynos4210-pd";
224 reg = <0x100440E0 0x20>;
225 };
226
227 g2d_pd: power-domain@10044100 {
228 compatible = "samsung,exynos4210-pd";
229 reg = <0x10044100 0x20>;
230 };
231
232 msc_pd: power-domain@10044120 { 270 msc_pd: power-domain@10044120 {
233 compatible = "samsung,exynos4210-pd"; 271 compatible = "samsung,exynos4210-pd";
234 reg = <0x10044120 0x20>; 272 reg = <0x10044120 0x20>;
@@ -270,7 +308,7 @@
270 interrupts = <0 47 0>; 308 interrupts = <0 47 0>;
271 }; 309 };
272 310
273 rtc@101E0000 { 311 rtc: rtc@101E0000 {
274 clocks = <&clock CLK_RTC>; 312 clocks = <&clock CLK_RTC>;
275 clock-names = "rtc"; 313 clock-names = "rtc";
276 status = "disabled"; 314 status = "disabled";
@@ -336,6 +374,13 @@
336 #dma-cells = <1>; 374 #dma-cells = <1>;
337 #dma-channels = <8>; 375 #dma-channels = <8>;
338 #dma-requests = <1>; 376 #dma-requests = <1>;
377 /*
378 * MDMA1 can support both secure and non-secure
379 * AXI transactions. When this is enabled in the kernel
380 * for boards that run in secure mode, we are getting
381 * imprecise external aborts causing the kernel to oops.
382 */
383 status = "disabled";
339 }; 384 };
340 }; 385 };
341 386
@@ -385,7 +430,7 @@
385 spi_0: spi@12d20000 { 430 spi_0: spi@12d20000 {
386 compatible = "samsung,exynos4210-spi"; 431 compatible = "samsung,exynos4210-spi";
387 reg = <0x12d20000 0x100>; 432 reg = <0x12d20000 0x100>;
388 interrupts = <0 66 0>; 433 interrupts = <0 68 0>;
389 dmas = <&pdma0 5 434 dmas = <&pdma0 5
390 &pdma0 4>; 435 &pdma0 4>;
391 dma-names = "tx", "rx"; 436 dma-names = "tx", "rx";
@@ -401,7 +446,7 @@
401 spi_1: spi@12d30000 { 446 spi_1: spi@12d30000 {
402 compatible = "samsung,exynos4210-spi"; 447 compatible = "samsung,exynos4210-spi";
403 reg = <0x12d30000 0x100>; 448 reg = <0x12d30000 0x100>;
404 interrupts = <0 67 0>; 449 interrupts = <0 69 0>;
405 dmas = <&pdma1 5 450 dmas = <&pdma1 5
406 &pdma1 4>; 451 &pdma1 4>;
407 dma-names = "tx", "rx"; 452 dma-names = "tx", "rx";
@@ -417,7 +462,7 @@
417 spi_2: spi@12d40000 { 462 spi_2: spi@12d40000 {
418 compatible = "samsung,exynos4210-spi"; 463 compatible = "samsung,exynos4210-spi";
419 reg = <0x12d40000 0x100>; 464 reg = <0x12d40000 0x100>;
420 interrupts = <0 68 0>; 465 interrupts = <0 70 0>;
421 dmas = <&pdma0 7 466 dmas = <&pdma0 7
422 &pdma0 6>; 467 &pdma0 6>;
423 dma-names = "tx", "rx"; 468 dma-names = "tx", "rx";
@@ -430,22 +475,22 @@
430 status = "disabled"; 475 status = "disabled";
431 }; 476 };
432 477
433 serial@12C00000 { 478 uart_0: serial@12C00000 {
434 clocks = <&clock CLK_UART0>, <&clock CLK_SCLK_UART0>; 479 clocks = <&clock CLK_UART0>, <&clock CLK_SCLK_UART0>;
435 clock-names = "uart", "clk_uart_baud0"; 480 clock-names = "uart", "clk_uart_baud0";
436 }; 481 };
437 482
438 serial@12C10000 { 483 uart_1: serial@12C10000 {
439 clocks = <&clock CLK_UART1>, <&clock CLK_SCLK_UART1>; 484 clocks = <&clock CLK_UART1>, <&clock CLK_SCLK_UART1>;
440 clock-names = "uart", "clk_uart_baud0"; 485 clock-names = "uart", "clk_uart_baud0";
441 }; 486 };
442 487
443 serial@12C20000 { 488 uart_2: serial@12C20000 {
444 clocks = <&clock CLK_UART2>, <&clock CLK_SCLK_UART2>; 489 clocks = <&clock CLK_UART2>, <&clock CLK_SCLK_UART2>;
445 clock-names = "uart", "clk_uart_baud0"; 490 clock-names = "uart", "clk_uart_baud0";
446 }; 491 };
447 492
448 serial@12C30000 { 493 uart_3: serial@12C30000 {
449 clocks = <&clock CLK_UART3>, <&clock CLK_SCLK_UART3>; 494 clocks = <&clock CLK_UART3>, <&clock CLK_SCLK_UART3>;
450 clock-names = "uart", "clk_uart_baud0"; 495 clock-names = "uart", "clk_uart_baud0";
451 }; 496 };
@@ -465,14 +510,14 @@
465 #phy-cells = <0>; 510 #phy-cells = <0>;
466 }; 511 };
467 512
468 dp-controller@145B0000 { 513 dp: dp-controller@145B0000 {
469 clocks = <&clock CLK_DP1>; 514 clocks = <&clock CLK_DP1>;
470 clock-names = "dp"; 515 clock-names = "dp";
471 phys = <&dp_phy>; 516 phys = <&dp_phy>;
472 phy-names = "dp"; 517 phy-names = "dp";
473 }; 518 };
474 519
475 fimd@14400000 { 520 fimd: fimd@14400000 {
476 samsung,power-domain = <&disp_pd>; 521 samsung,power-domain = <&disp_pd>;
477 clocks = <&clock CLK_SCLK_FIMD1>, <&clock CLK_FIMD1>; 522 clocks = <&clock CLK_SCLK_FIMD1>, <&clock CLK_FIMD1>;
478 clock-names = "sclk_fimd", "fimd"; 523 clock-names = "sclk_fimd", "fimd";
@@ -549,7 +594,7 @@
549 #size-cells = <0>; 594 #size-cells = <0>;
550 pinctrl-names = "default"; 595 pinctrl-names = "default";
551 pinctrl-0 = <&i2c4_hs_bus>; 596 pinctrl-0 = <&i2c4_hs_bus>;
552 clocks = <&clock CLK_I2C4>; 597 clocks = <&clock CLK_USI0>;
553 clock-names = "hsi2c"; 598 clock-names = "hsi2c";
554 status = "disabled"; 599 status = "disabled";
555 }; 600 };
@@ -562,7 +607,7 @@
562 #size-cells = <0>; 607 #size-cells = <0>;
563 pinctrl-names = "default"; 608 pinctrl-names = "default";
564 pinctrl-0 = <&i2c5_hs_bus>; 609 pinctrl-0 = <&i2c5_hs_bus>;
565 clocks = <&clock CLK_I2C5>; 610 clocks = <&clock CLK_USI1>;
566 clock-names = "hsi2c"; 611 clock-names = "hsi2c";
567 status = "disabled"; 612 status = "disabled";
568 }; 613 };
@@ -575,7 +620,7 @@
575 #size-cells = <0>; 620 #size-cells = <0>;
576 pinctrl-names = "default"; 621 pinctrl-names = "default";
577 pinctrl-0 = <&i2c6_hs_bus>; 622 pinctrl-0 = <&i2c6_hs_bus>;
578 clocks = <&clock CLK_I2C6>; 623 clocks = <&clock CLK_USI2>;
579 clock-names = "hsi2c"; 624 clock-names = "hsi2c";
580 status = "disabled"; 625 status = "disabled";
581 }; 626 };
@@ -588,7 +633,7 @@
588 #size-cells = <0>; 633 #size-cells = <0>;
589 pinctrl-names = "default"; 634 pinctrl-names = "default";
590 pinctrl-0 = <&i2c7_hs_bus>; 635 pinctrl-0 = <&i2c7_hs_bus>;
591 clocks = <&clock CLK_I2C7>; 636 clocks = <&clock CLK_USI3>;
592 clock-names = "hsi2c"; 637 clock-names = "hsi2c";
593 status = "disabled"; 638 status = "disabled";
594 }; 639 };
@@ -601,7 +646,7 @@
601 #size-cells = <0>; 646 #size-cells = <0>;
602 pinctrl-names = "default"; 647 pinctrl-names = "default";
603 pinctrl-0 = <&i2c8_hs_bus>; 648 pinctrl-0 = <&i2c8_hs_bus>;
604 clocks = <&clock CLK_I2C8>; 649 clocks = <&clock CLK_USI4>;
605 clock-names = "hsi2c"; 650 clock-names = "hsi2c";
606 status = "disabled"; 651 status = "disabled";
607 }; 652 };
@@ -614,7 +659,7 @@
614 #size-cells = <0>; 659 #size-cells = <0>;
615 pinctrl-names = "default"; 660 pinctrl-names = "default";
616 pinctrl-0 = <&i2c9_hs_bus>; 661 pinctrl-0 = <&i2c9_hs_bus>;
617 clocks = <&clock CLK_I2C9>; 662 clocks = <&clock CLK_USI5>;
618 clock-names = "hsi2c"; 663 clock-names = "hsi2c";
619 status = "disabled"; 664 status = "disabled";
620 }; 665 };
@@ -627,13 +672,13 @@
627 #size-cells = <0>; 672 #size-cells = <0>;
628 pinctrl-names = "default"; 673 pinctrl-names = "default";
629 pinctrl-0 = <&i2c10_hs_bus>; 674 pinctrl-0 = <&i2c10_hs_bus>;
630 clocks = <&clock CLK_I2C10>; 675 clocks = <&clock CLK_USI6>;
631 clock-names = "hsi2c"; 676 clock-names = "hsi2c";
632 status = "disabled"; 677 status = "disabled";
633 }; 678 };
634 679
635 hdmi@14530000 { 680 hdmi: hdmi@14530000 {
636 compatible = "samsung,exynos4212-hdmi"; 681 compatible = "samsung,exynos5420-hdmi";
637 reg = <0x14530000 0x70000>; 682 reg = <0x14530000 0x70000>;
638 interrupts = <0 95 0>; 683 interrupts = <0 95 0>;
639 clocks = <&clock CLK_HDMI>, <&clock CLK_SCLK_HDMI>, 684 clocks = <&clock CLK_HDMI>, <&clock CLK_SCLK_HDMI>,
@@ -641,10 +686,16 @@
641 <&clock CLK_MOUT_HDMI>; 686 <&clock CLK_MOUT_HDMI>;
642 clock-names = "hdmi", "sclk_hdmi", "sclk_pixel", 687 clock-names = "hdmi", "sclk_hdmi", "sclk_pixel",
643 "sclk_hdmiphy", "mout_hdmi"; 688 "sclk_hdmiphy", "mout_hdmi";
689 phy = <&hdmiphy>;
690 samsung,syscon-phandle = <&pmu_system_controller>;
644 status = "disabled"; 691 status = "disabled";
645 }; 692 };
646 693
647 mixer@14450000 { 694 hdmiphy: hdmiphy@145D0000 {
695 reg = <0x145D0000 0x20>;
696 };
697
698 mixer: mixer@14450000 {
648 compatible = "samsung,exynos5420-mixer"; 699 compatible = "samsung,exynos5420-mixer";
649 reg = <0x14450000 0x10000>; 700 reg = <0x14450000 0x10000>;
650 interrupts = <0 94 0>; 701 interrupts = <0 94 0>;
@@ -675,6 +726,11 @@
675 reg = <0x10040000 0x5000>; 726 reg = <0x10040000 0x5000>;
676 }; 727 };
677 728
729 sysreg_system_controller: syscon@10050000 {
730 compatible = "samsung,exynos5-sysreg", "syscon";
731 reg = <0x10050000 0x5000>;
732 };
733
678 tmu_cpu0: tmu@10060000 { 734 tmu_cpu0: tmu@10060000 {
679 compatible = "samsung,exynos5420-tmu"; 735 compatible = "samsung,exynos5420-tmu";
680 reg = <0x10060000 0x100>; 736 reg = <0x10060000 0x100>;
@@ -715,7 +771,7 @@
715 clock-names = "tmu_apbif", "tmu_triminfo_apbif"; 771 clock-names = "tmu_apbif", "tmu_triminfo_apbif";
716 }; 772 };
717 773
718 watchdog@101D0000 { 774 watchdog: watchdog@101D0000 {
719 compatible = "samsung,exynos5420-wdt"; 775 compatible = "samsung,exynos5420-wdt";
720 reg = <0x101D0000 0x100>; 776 reg = <0x101D0000 0x100>;
721 interrupts = <0 42 0>; 777 interrupts = <0 42 0>;
@@ -724,12 +780,103 @@
724 samsung,syscon-phandle = <&pmu_system_controller>; 780 samsung,syscon-phandle = <&pmu_system_controller>;
725 }; 781 };
726 782
727 sss@10830000 { 783 sss: sss@10830000 {
728 compatible = "samsung,exynos4210-secss"; 784 compatible = "samsung,exynos4210-secss";
729 reg = <0x10830000 0x10000>; 785 reg = <0x10830000 0x10000>;
730 interrupts = <0 112 0>; 786 interrupts = <0 112 0>;
731 clocks = <&clock 471>; 787 clocks = <&clock CLK_SSS>;
732 clock-names = "secss"; 788 clock-names = "secss";
733 samsung,power-domain = <&g2d_pd>; 789 };
790
791 usbdrd3_0: usb@12000000 {
792 compatible = "samsung,exynos5250-dwusb3";
793 clocks = <&clock CLK_USBD300>;
794 clock-names = "usbdrd30";
795 #address-cells = <1>;
796 #size-cells = <1>;
797 ranges;
798
799 dwc3 {
800 compatible = "snps,dwc3";
801 reg = <0x12000000 0x10000>;
802 interrupts = <0 72 0>;
803 phys = <&usbdrd_phy0 0>, <&usbdrd_phy0 1>;
804 phy-names = "usb2-phy", "usb3-phy";
805 };
806 };
807
808 usbdrd_phy0: phy@12100000 {
809 compatible = "samsung,exynos5420-usbdrd-phy";
810 reg = <0x12100000 0x100>;
811 clocks = <&clock CLK_USBD300>, <&clock CLK_SCLK_USBPHY300>;
812 clock-names = "phy", "ref";
813 samsung,pmu-syscon = <&pmu_system_controller>;
814 #phy-cells = <1>;
815 };
816
817 usbdrd3_1: usb@12400000 {
818 compatible = "samsung,exynos5250-dwusb3";
819 clocks = <&clock CLK_USBD301>;
820 clock-names = "usbdrd30";
821 #address-cells = <1>;
822 #size-cells = <1>;
823 ranges;
824
825 dwc3 {
826 compatible = "snps,dwc3";
827 reg = <0x12400000 0x10000>;
828 interrupts = <0 73 0>;
829 phys = <&usbdrd_phy1 0>, <&usbdrd_phy1 1>;
830 phy-names = "usb2-phy", "usb3-phy";
831 };
832 };
833
834 usbdrd_phy1: phy@12500000 {
835 compatible = "samsung,exynos5420-usbdrd-phy";
836 reg = <0x12500000 0x100>;
837 clocks = <&clock CLK_USBD301>, <&clock CLK_SCLK_USBPHY301>;
838 clock-names = "phy", "ref";
839 samsung,pmu-syscon = <&pmu_system_controller>;
840 #phy-cells = <1>;
841 };
842
843 usbhost2: usb@12110000 {
844 compatible = "samsung,exynos4210-ehci";
845 reg = <0x12110000 0x100>;
846 interrupts = <0 71 0>;
847
848 clocks = <&clock CLK_USBH20>;
849 clock-names = "usbhost";
850 #address-cells = <1>;
851 #size-cells = <0>;
852 port@0 {
853 reg = <0>;
854 phys = <&usb2_phy 1>;
855 };
856 };
857
858 usbhost1: usb@12120000 {
859 compatible = "samsung,exynos4210-ohci";
860 reg = <0x12120000 0x100>;
861 interrupts = <0 71 0>;
862
863 clocks = <&clock CLK_USBH20>;
864 clock-names = "usbhost";
865 #address-cells = <1>;
866 #size-cells = <0>;
867 port@0 {
868 reg = <0>;
869 phys = <&usb2_phy 1>;
870 };
871 };
872
873 usb2_phy: phy@12130000 {
874 compatible = "samsung,exynos5250-usb2-phy";
875 reg = <0x12130000 0x100>;
876 clocks = <&clock CLK_USBH20>, <&clock CLK_SCLK_USBPHY300>;
877 clock-names = "phy", "ref";
878 #phy-cells = <1>;
879 samsung,sysreg-phandle = <&sysreg_system_controller>;
880 samsung,pmureg-phandle = <&pmu_system_controller>;
734 }; 881 };
735}; 882};
diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi
index 84f77c2fe4d4..ae3a17c791f6 100644
--- a/arch/arm/boot/dts/exynos5440.dtsi
+++ b/arch/arm/boot/dts/exynos5440.dtsi
@@ -176,7 +176,7 @@
176 clock-names = "i2c"; 176 clock-names = "i2c";
177 }; 177 };
178 178
179 watchdog { 179 watchdog@110000 {
180 compatible = "samsung,s3c2410-wdt"; 180 compatible = "samsung,s3c2410-wdt";
181 reg = <0x110000 0x1000>; 181 reg = <0x110000 0x1000>;
182 interrupts = <0 1 0>; 182 interrupts = <0 1 0>;
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
new file mode 100644
index 000000000000..f3af2079a063
--- /dev/null
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
@@ -0,0 +1,253 @@
1/*
2 * Google Peach Pi Rev 10+ board device tree source
3 *
4 * Copyright (c) 2014 Google, Inc
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
11/dts-v1/;
12#include <dt-bindings/input/input.h>
13#include <dt-bindings/gpio/gpio.h>
14#include "exynos5800.dtsi"
15
16/ {
17 model = "Google Peach Pi Rev 10+";
18
19 compatible = "google,pi-rev16",
20 "google,pi-rev15", "google,pi-rev14",
21 "google,pi-rev13", "google,pi-rev12",
22 "google,pi-rev11", "google,pi-rev10",
23 "google,pi", "google,peach", "samsung,exynos5800",
24 "samsung,exynos5";
25
26 memory {
27 reg = <0x20000000 0x80000000>;
28 };
29
30 fixed-rate-clocks {
31 oscclk {
32 compatible = "samsung,exynos5420-oscclk";
33 clock-frequency = <24000000>;
34 };
35 };
36
37 gpio-keys {
38 compatible = "gpio-keys";
39
40 pinctrl-names = "default";
41 pinctrl-0 = <&power_key_irq>;
42
43 power {
44 label = "Power";
45 gpios = <&gpx1 2 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_POWER>;
47 gpio-key,wakeup;
48 };
49 };
50
51 backlight {
52 compatible = "pwm-backlight";
53 pwms = <&pwm 0 1000000 0>;
54 brightness-levels = <0 100 500 1000 1500 2000 2500 2800>;
55 default-brightness-level = <7>;
56 pinctrl-0 = <&pwm0_out>;
57 pinctrl-names = "default";
58 };
59
60 usb300_vbus_reg: regulator-usb300 {
61 compatible = "regulator-fixed";
62 regulator-name = "P5.0V_USB3CON0";
63 regulator-min-microvolt = <5000000>;
64 regulator-max-microvolt = <5000000>;
65 gpio = <&gph0 0 0>;
66 pinctrl-names = "default";
67 pinctrl-0 = <&usb300_vbus_en>;
68 enable-active-high;
69 };
70
71 usb301_vbus_reg: regulator-usb301 {
72 compatible = "regulator-fixed";
73 regulator-name = "P5.0V_USB3CON1";
74 regulator-min-microvolt = <5000000>;
75 regulator-max-microvolt = <5000000>;
76 gpio = <&gph0 1 0>;
77 pinctrl-names = "default";
78 pinctrl-0 = <&usb301_vbus_en>;
79 enable-active-high;
80 };
81};
82
83&pinctrl_0 {
84 tpm_irq: tpm-irq {
85 samsung,pins = "gpx1-0";
86 samsung,pin-function = <0>;
87 samsung,pin-pud = <0>;
88 samsung,pin-drv = <0>;
89 };
90
91 power_key_irq: power-key-irq {
92 samsung,pins = "gpx1-2";
93 samsung,pin-function = <0>;
94 samsung,pin-pud = <0>;
95 samsung,pin-drv = <0>;
96 };
97
98 dp_hpd_gpio: dp_hpd_gpio {
99 samsung,pins = "gpx2-6";
100 samsung,pin-function = <0>;
101 samsung,pin-pud = <3>;
102 samsung,pin-drv = <0>;
103 };
104
105 hdmi_hpd_irq: hdmi-hpd-irq {
106 samsung,pins = "gpx3-7";
107 samsung,pin-function = <0>;
108 samsung,pin-pud = <1>;
109 samsung,pin-drv = <0>;
110 };
111};
112
113&pinctrl_3 {
114 usb300_vbus_en: usb300-vbus-en {
115 samsung,pins = "gph0-0";
116 samsung,pin-function = <1>;
117 samsung,pin-pud = <0>;
118 samsung,pin-drv = <0>;
119 };
120
121 usb301_vbus_en: usb301-vbus-en {
122 samsung,pins = "gph0-1";
123 samsung,pin-function = <1>;
124 samsung,pin-pud = <0>;
125 samsung,pin-drv = <0>;
126 };
127};
128
129&rtc {
130 status = "okay";
131};
132
133&uart_3 {
134 status = "okay";
135};
136
137&mmc_0 {
138 status = "okay";
139 num-slots = <1>;
140 broken-cd;
141 caps2-mmc-hs200-1_8v;
142 supports-highspeed;
143 non-removable;
144 card-detect-delay = <200>;
145 clock-frequency = <400000000>;
146 samsung,dw-mshc-ciu-div = <3>;
147 samsung,dw-mshc-sdr-timing = <0 4>;
148 samsung,dw-mshc-ddr-timing = <0 2>;
149 pinctrl-names = "default";
150 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8>;
151
152 slot@0 {
153 reg = <0>;
154 bus-width = <8>;
155 };
156};
157
158&mmc_2 {
159 status = "okay";
160 num-slots = <1>;
161 supports-highspeed;
162 card-detect-delay = <200>;
163 clock-frequency = <400000000>;
164 samsung,dw-mshc-ciu-div = <3>;
165 samsung,dw-mshc-sdr-timing = <2 3>;
166 samsung,dw-mshc-ddr-timing = <1 2>;
167 pinctrl-names = "default";
168 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>;
169
170 slot@0 {
171 reg = <0>;
172 bus-width = <4>;
173 };
174};
175
176&dp {
177 status = "okay";
178 pinctrl-names = "default";
179 pinctrl-0 = <&dp_hpd_gpio>;
180 samsung,color-space = <0>;
181 samsung,dynamic-range = <0>;
182 samsung,ycbcr-coeff = <0>;
183 samsung,color-depth = <1>;
184 samsung,link-rate = <0x0a>;
185 samsung,lane-count = <2>;
186 samsung,hpd-gpio = <&gpx2 6 0>;
187
188 display-timings {
189 native-mode = <&timing1>;
190
191 timing1: timing@1 {
192 clock-frequency = <150660000>;
193 hactive = <1920>;
194 vactive = <1080>;
195 hfront-porch = <60>;
196 hback-porch = <172>;
197 hsync-len = <80>;
198 vback-porch = <25>;
199 vfront-porch = <10>;
200 vsync-len = <10>;
201 };
202 };
203};
204
205&fimd {
206 status = "okay";
207 samsung,invert-vclk;
208};
209
210&hsi2c_9 {
211 status = "okay";
212 clock-frequency = <400000>;
213
214 tpm@20 {
215 compatible = "infineon,slb9645tt";
216 reg = <0x20>;
217 /* Unused irq; but still need to configure the pins */
218 pinctrl-names = "default";
219 pinctrl-0 = <&tpm_irq>;
220 };
221};
222
223&i2c_2 {
224 status = "okay";
225 samsung,i2c-sda-delay = <100>;
226 samsung,i2c-max-bus-freq = <66000>;
227 samsung,i2c-slave-addr = <0x50>;
228};
229
230&hdmi {
231 status = "okay";
232 hpd-gpio = <&gpx3 7 GPIO_ACTIVE_HIGH>;
233 pinctrl-names = "default";
234 pinctrl-0 = <&hdmi_hpd_irq>;
235 ddc = <&i2c_2>;
236};
237
238&usbdrd_phy0 {
239 vbus-supply = <&usb300_vbus_reg>;
240};
241
242&usbdrd_phy1 {
243 vbus-supply = <&usb301_vbus_reg>;
244};
245
246/*
247 * Use longest HW watchdog in SoC (32 seconds) since the hardware
248 * watchdog provides no debugging information (compared to soft/hard
249 * lockup detectors) and so should be last resort.
250 */
251&watchdog {
252 timeout-sec = <32>;
253};
diff --git a/arch/arm/boot/dts/exynos5800.dtsi b/arch/arm/boot/dts/exynos5800.dtsi
new file mode 100644
index 000000000000..c0bb3563cac1
--- /dev/null
+++ b/arch/arm/boot/dts/exynos5800.dtsi
@@ -0,0 +1,28 @@
1/*
2 * SAMSUNG EXYNOS5800 SoC device tree source
3 *
4 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com
6 *
7 * SAMSUNG EXYNOS5800 SoC device nodes are listed in this file.
8 * EXYNOS5800 based board files can include this file and provide
9 * values for board specfic bindings.
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 "exynos5420.dtsi"
17
18/ {
19 compatible = "samsung,exynos5800", "samsung,exynos5";
20};
21
22&clock {
23 compatible = "samsung,exynos5800-clock";
24};
25
26&mfc {
27 compatible = "samsung,mfc-v8";
28};
diff --git a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
index 62fb3da50bdb..ad12da38fc92 100644
--- a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
+++ b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
@@ -172,3 +172,16 @@
172 fsl,uart-has-rtscts; 172 fsl,uart-has-rtscts;
173 status = "okay"; 173 status = "okay";
174}; 174};
175
176&usbhost1 {
177 phy_type = "serial";
178 dr_mode = "host";
179 status = "okay";
180};
181
182&usbotg {
183 phy_type = "utmi";
184 dr_mode = "otg";
185 external-vbus-divider;
186 status = "okay";
187};
diff --git a/arch/arm/boot/dts/imx25-karo-tx25.dts b/arch/arm/boot/dts/imx25-karo-tx25.dts
index f8db366c46ff..9b31faa96377 100644
--- a/arch/arm/boot/dts/imx25-karo-tx25.dts
+++ b/arch/arm/boot/dts/imx25-karo-tx25.dts
@@ -16,21 +16,98 @@
16 model = "Ka-Ro TX25"; 16 model = "Ka-Ro TX25";
17 compatible = "karo,imx25-tx25", "fsl,imx25"; 17 compatible = "karo,imx25-tx25", "fsl,imx25";
18 18
19 chosen {
20 stdout-path = &uart1;
21 };
22
23 regulators {
24 compatible = "simple-bus";
25 #address-cells = <1>;
26 #size-cells = <0>;
27
28 reg_fec_phy: regulator@0 {
29 compatible = "regulator-fixed";
30 reg = <0>;
31 regulator-name = "fec-phy";
32 regulator-min-microvolt = <3300000>;
33 regulator-max-microvolt = <3300000>;
34 gpio = <&gpio4 9 0>;
35 enable-active-high;
36 };
37 };
38
19 memory { 39 memory {
20 reg = <0x80000000 0x02000000 0x90000000 0x02000000>; 40 reg = <0x80000000 0x02000000 0x90000000 0x02000000>;
21 }; 41 };
22}; 42};
23 43
44&iomuxc {
45 pinctrl_uart1: uart1grp {
46 fsl,pins = <
47 MX25_PAD_UART1_TXD__UART1_TXD 0x80000000
48 MX25_PAD_UART1_RXD__UART1_RXD 0x80000000
49 MX25_PAD_UART1_CTS__UART1_CTS 0x80000000
50 MX25_PAD_UART1_RTS__UART1_RTS 0x80000000
51 >;
52 };
53
54 pinctrl_fec: fecgrp {
55 fsl,pins = <
56 MX25_PAD_D11__GPIO_4_9 0x80000000 /* FEC PHY power on pin */
57 MX25_PAD_D13__GPIO_4_7 0x80000000 /* FEC reset */
58 MX25_PAD_FEC_MDC__FEC_MDC 0x80000000
59 MX25_PAD_FEC_MDIO__FEC_MDIO 0x80000000
60 MX25_PAD_FEC_TDATA0__FEC_TDATA0 0x80000000
61 MX25_PAD_FEC_TDATA1__FEC_TDATA1 0x80000000
62 MX25_PAD_FEC_TX_EN__FEC_TX_EN 0x80000000
63 MX25_PAD_FEC_RDATA0__FEC_RDATA0 0x80000000
64 MX25_PAD_FEC_RDATA1__FEC_RDATA1 0x80000000
65 MX25_PAD_FEC_RX_DV__FEC_RX_DV 0x80000000
66 MX25_PAD_FEC_TX_CLK__FEC_TX_CLK 0x80000000
67 >;
68 };
69
70 pinctrl_nfc: nfcgrp {
71 fsl,pins = <
72 MX25_PAD_NF_CE0__NF_CE0 0x80000000
73 MX25_PAD_NFWE_B__NFWE_B 0x80000000
74 MX25_PAD_NFRE_B__NFRE_B 0x80000000
75 MX25_PAD_NFALE__NFALE 0x80000000
76 MX25_PAD_NFCLE__NFCLE 0x80000000
77 MX25_PAD_NFWP_B__NFWP_B 0x80000000
78 MX25_PAD_NFRB__NFRB 0x80000000
79 MX25_PAD_D7__D7 0x80000000
80 MX25_PAD_D6__D6 0x80000000
81 MX25_PAD_D5__D5 0x80000000
82 MX25_PAD_D4__D4 0x80000000
83 MX25_PAD_D3__D3 0x80000000
84 MX25_PAD_D2__D2 0x80000000
85 MX25_PAD_D1__D1 0x80000000
86 MX25_PAD_D0__D0 0x80000000
87 >;
88 };
89};
90
24&uart1 { 91&uart1 {
92 pinctrl-names = "default";
93 pinctrl-0 = <&pinctrl_uart1>;
25 status = "okay"; 94 status = "okay";
26}; 95};
27 96
28&fec { 97&fec {
98 pinctrl-names = "default";
99 pinctrl-0 = <&pinctrl_fec>;
100 phy-reset-gpios = <&gpio3 7 0>;
29 phy-mode = "rmii"; 101 phy-mode = "rmii";
102 phy-supply = <&reg_fec_phy>;
30 status = "okay"; 103 status = "okay";
31}; 104};
32 105
33&nfc { 106&nfc {
107 pinctrl-names = "default";
108 pinctrl-0 = <&pinctrl_nfc>;
34 nand-on-flash-bbt; 109 nand-on-flash-bbt;
110 nand-ecc-mode = "hw";
111 nand-bus-width = <8>;
35 status = "okay"; 112 status = "okay";
36}; 113};
diff --git a/arch/arm/boot/dts/imx25-pdk.dts b/arch/arm/boot/dts/imx25-pdk.dts
index f607ce520eda..c608942b8a3b 100644
--- a/arch/arm/boot/dts/imx25-pdk.dts
+++ b/arch/arm/boot/dts/imx25-pdk.dts
@@ -10,6 +10,7 @@
10 */ 10 */
11 11
12/dts-v1/; 12/dts-v1/;
13#include <dt-bindings/input/input.h>
13#include "imx25.dtsi" 14#include "imx25.dtsi"
14 15
15/ { 16/ {
@@ -19,18 +20,232 @@
19 memory { 20 memory {
20 reg = <0x80000000 0x4000000>; 21 reg = <0x80000000 0x4000000>;
21 }; 22 };
23
24 regulators {
25 compatible = "simple-bus";
26 #address-cells = <1>;
27 #size-cells = <0>;
28
29 reg_fec_3v3: regulator@0 {
30 compatible = "regulator-fixed";
31 reg = <0>;
32 regulator-name = "fec-3v3";
33 regulator-min-microvolt = <3300000>;
34 regulator-max-microvolt = <3300000>;
35 gpio = <&gpio2 3 0>;
36 enable-active-high;
37 };
38
39 reg_2p5v: regulator@1 {
40 compatible = "regulator-fixed";
41 reg = <1>;
42 regulator-name = "2P5V";
43 regulator-min-microvolt = <2500000>;
44 regulator-max-microvolt = <2500000>;
45 };
46
47 reg_3p3v: regulator@2 {
48 compatible = "regulator-fixed";
49 reg = <2>;
50 regulator-name = "3P3V";
51 regulator-min-microvolt = <3300000>;
52 regulator-max-microvolt = <3300000>;
53 };
54
55 reg_can_3v3: regulator@3 {
56 compatible = "regulator-fixed";
57 reg = <3>;
58 regulator-name = "can-3v3";
59 regulator-min-microvolt = <3300000>;
60 regulator-max-microvolt = <3300000>;
61 gpio = <&gpio4 6 0>;
62 };
63 };
64
65 sound {
66 compatible = "fsl,imx25-pdk-sgtl5000",
67 "fsl,imx-audio-sgtl5000";
68 model = "imx25-pdk-sgtl5000";
69 ssi-controller = <&ssi1>;
70 audio-codec = <&codec>;
71 audio-routing =
72 "MIC_IN", "Mic Jack",
73 "Mic Jack", "Mic Bias",
74 "Headphone Jack", "HP_OUT";
75 mux-int-port = <1>;
76 mux-ext-port = <4>;
77 };
22}; 78};
23 79
24&uart1 { 80&audmux {
81 pinctrl-names = "default";
82 pinctrl-0 = <&pinctrl_audmux>;
83 status = "okay";
84};
85
86&can1 {
87 pinctrl-names = "default";
88 pinctrl-0 = <&pinctrl_can1>;
89 xceiver-supply = <&reg_can_3v3>;
90 status = "okay";
91};
92
93&esdhc1 {
94 pinctrl-names = "default";
95 pinctrl-0 = <&pinctrl_esdhc1>;
96 cd-gpios = <&gpio2 1 0>;
97 wp-gpios = <&gpio2 0 0>;
25 status = "okay"; 98 status = "okay";
26}; 99};
27 100
28&fec { 101&fec {
29 phy-mode = "rmii"; 102 phy-mode = "rmii";
103 pinctrl-names = "default";
104 pinctrl-0 = <&pinctrl_fec>;
105 phy-supply = <&reg_fec_3v3>;
106 phy-reset-gpios = <&gpio4 8 0>;
30 status = "okay"; 107 status = "okay";
31}; 108};
32 109
110&i2c1 {
111 clock-frequency = <100000>;
112 pinctrl-names = "default";
113 pinctrl-0 = <&pinctrl_i2c1>;
114 status = "okay";
115
116 codec: sgtl5000@0a {
117 compatible = "fsl,sgtl5000";
118 reg = <0x0a>;
119 clocks = <&clks 129>;
120 VDDA-supply = <&reg_2p5v>;
121 VDDIO-supply = <&reg_3p3v>;
122 };
123};
124
125&iomuxc {
126 imx25-pdk {
127 pinctrl_audmux: audmuxgrp {
128 fsl,pins = <
129 MX25_PAD_RW__AUD4_TXFS 0xe0
130 MX25_PAD_OE__AUD4_TXC 0xe0
131 MX25_PAD_EB0__AUD4_TXD 0xe0
132 MX25_PAD_EB1__AUD4_RXD 0xe0
133 >;
134 };
135
136 pinctrl_can1: can1grp {
137 fsl,pins = <
138 MX25_PAD_GPIO_A__CAN1_TX 0x0
139 MX25_PAD_GPIO_B__CAN1_RX 0x0
140 MX25_PAD_D14__GPIO_4_6 0x80000000
141 >;
142 };
143
144 pinctrl_esdhc1: esdhc1grp {
145 fsl,pins = <
146 MX25_PAD_SD1_CMD__SD1_CMD 0x80000000
147 MX25_PAD_SD1_CLK__SD1_CLK 0x80000000
148 MX25_PAD_SD1_DATA0__SD1_DATA0 0x80000000
149 MX25_PAD_SD1_DATA1__SD1_DATA1 0x80000000
150 MX25_PAD_SD1_DATA2__SD1_DATA2 0x80000000
151 MX25_PAD_SD1_DATA3__SD1_DATA3 0x80000000
152 MX25_PAD_A14__GPIO_2_0 0x80000000
153 MX25_PAD_A15__GPIO_2_1 0x80000000
154 >;
155 };
156
157 pinctrl_fec: fecgrp {
158 fsl,pins = <
159 MX25_PAD_FEC_MDC__FEC_MDC 0x80000000
160 MX25_PAD_FEC_MDIO__FEC_MDIO 0x400001e0
161 MX25_PAD_FEC_TDATA0__FEC_TDATA0 0x80000000
162 MX25_PAD_FEC_TDATA1__FEC_TDATA1 0x80000000
163 MX25_PAD_FEC_TX_EN__FEC_TX_EN 0x80000000
164 MX25_PAD_FEC_RDATA0__FEC_RDATA0 0x80000000
165 MX25_PAD_FEC_RDATA1__FEC_RDATA1 0x80000000
166 MX25_PAD_FEC_RX_DV__FEC_RX_DV 0x80000000
167 MX25_PAD_FEC_TX_CLK__FEC_TX_CLK 0x1c0
168 MX25_PAD_A17__GPIO_2_3 0x80000000
169 MX25_PAD_D12__GPIO_4_8 0x80000000
170 >;
171 };
172
173 pinctrl_i2c1: i2c1grp {
174 fsl,pins = <
175 MX25_PAD_I2C1_CLK__I2C1_CLK 0x80000000
176 MX25_PAD_I2C1_DAT__I2C1_DAT 0x80000000
177 >;
178 };
179
180 pinctrl_kpp: kppgrp {
181 fsl,pins = <
182 MX25_PAD_KPP_ROW0__KPP_ROW0 0x80000000
183 MX25_PAD_KPP_ROW1__KPP_ROW1 0x80000000
184 MX25_PAD_KPP_ROW2__KPP_ROW2 0x80000000
185 MX25_PAD_KPP_ROW3__KPP_ROW3 0x80000000
186 MX25_PAD_KPP_COL0__KPP_COL0 0x80000000
187 MX25_PAD_KPP_COL1__KPP_COL1 0x80000000
188 MX25_PAD_KPP_COL2__KPP_COL2 0x80000000
189 MX25_PAD_KPP_COL3__KPP_COL3 0x80000000
190 >;
191 };
192
193
194 pinctrl_uart1: uart1grp {
195 fsl,pins = <
196 MX25_PAD_UART1_RTS__UART1_RTS 0xe0
197 MX25_PAD_UART1_CTS__UART1_CTS 0xe0
198 MX25_PAD_UART1_TXD__UART1_TXD 0x80000000
199 MX25_PAD_UART1_RXD__UART1_RXD 0xc0
200 >;
201 };
202 };
203};
204
33&nfc { 205&nfc {
34 nand-on-flash-bbt; 206 nand-on-flash-bbt;
35 status = "okay"; 207 status = "okay";
36}; 208};
209
210&kpp {
211 pinctrl-names = "default";
212 pinctrl-0 = <&pinctrl_kpp>;
213 linux,keymap = <
214 MATRIX_KEY(0x0, 0x0, KEY_UP)
215 MATRIX_KEY(0x0, 0x1, KEY_DOWN)
216 MATRIX_KEY(0x0, 0x2, KEY_VOLUMEDOWN)
217 MATRIX_KEY(0x0, 0x3, KEY_HOME)
218 MATRIX_KEY(0x1, 0x0, KEY_RIGHT)
219 MATRIX_KEY(0x1, 0x1, KEY_LEFT)
220 MATRIX_KEY(0x1, 0x2, KEY_ENTER)
221 MATRIX_KEY(0x1, 0x3, KEY_VOLUMEUP)
222 MATRIX_KEY(0x2, 0x0, KEY_F6)
223 MATRIX_KEY(0x2, 0x1, KEY_F8)
224 MATRIX_KEY(0x2, 0x2, KEY_F9)
225 MATRIX_KEY(0x2, 0x3, KEY_F10)
226 MATRIX_KEY(0x3, 0x0, KEY_F1)
227 MATRIX_KEY(0x3, 0x1, KEY_F2)
228 MATRIX_KEY(0x3, 0x2, KEY_F3)
229 MATRIX_KEY(0x3, 0x2, KEY_POWER)
230 >;
231 status = "okay";
232};
233
234&ssi1 {
235 codec-handle = <&codec>;
236 fsl,mode = "i2s-slave";
237 status = "okay";
238};
239
240&uart1 {
241 pinctrl-names = "default";
242 pinctrl-0 = <&pinctrl_uart1>;
243 fsl,uart-has-rtscts;
244 status = "okay";
245};
246
247&usbhost1 {
248 phy_type = "serial";
249 dr_mode = "host";
250 status = "okay";
251};
diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
index ea323f09dc78..bb74d9582b7e 100644
--- a/arch/arm/boot/dts/imx25.dtsi
+++ b/arch/arm/boot/dts/imx25.dtsi
@@ -14,6 +14,7 @@
14 14
15/ { 15/ {
16 aliases { 16 aliases {
17 ethernet0 = &fec;
17 gpio0 = &gpio1; 18 gpio0 = &gpio1;
18 gpio1 = &gpio2; 19 gpio1 = &gpio2;
19 gpio2 = &gpio3; 20 gpio2 = &gpio3;
@@ -21,6 +22,8 @@
21 i2c0 = &i2c1; 22 i2c0 = &i2c1;
22 i2c1 = &i2c2; 23 i2c1 = &i2c2;
23 i2c2 = &i2c3; 24 i2c2 = &i2c3;
25 mmc0 = &esdhc1;
26 mmc1 = &esdhc2;
24 serial0 = &uart1; 27 serial0 = &uart1;
25 serial1 = &uart2; 28 serial1 = &uart2;
26 serial2 = &uart3; 29 serial2 = &uart3;
@@ -165,9 +168,10 @@
165 status = "disabled"; 168 status = "disabled";
166 }; 169 };
167 170
168 kpp@43fa8000 { 171 kpp: kpp@43fa8000 {
169 #address-cells = <1>; 172 #address-cells = <1>;
170 #size-cells = <0>; 173 #size-cells = <0>;
174 compatible = "fsl,imx25-kpp", "fsl,imx21-kpp";
171 reg = <0x43fa8000 0x4000>; 175 reg = <0x43fa8000 0x4000>;
172 clocks = <&clks 102>; 176 clocks = <&clks 102>;
173 clock-names = ""; 177 clock-names = "";
@@ -482,23 +486,13 @@
482 clocks = <&clks 99>; 486 clocks = <&clks 99>;
483 }; 487 };
484 488
485 usbphy1: usbphy@1 {
486 compatible = "nop-usbphy";
487 status = "disabled";
488 };
489
490 usbphy2: usbphy@2 {
491 compatible = "nop-usbphy";
492 status = "disabled";
493 };
494
495 usbotg: usb@53ff4000 { 489 usbotg: usb@53ff4000 {
496 compatible = "fsl,imx25-usb", "fsl,imx27-usb"; 490 compatible = "fsl,imx25-usb", "fsl,imx27-usb";
497 reg = <0x53ff4000 0x0200>; 491 reg = <0x53ff4000 0x0200>;
498 interrupts = <37>; 492 interrupts = <37>;
499 clocks = <&clks 9>, <&clks 70>, <&clks 8>; 493 clocks = <&clks 70>;
500 clock-names = "ipg", "ahb", "per";
501 fsl,usbmisc = <&usbmisc 0>; 494 fsl,usbmisc = <&usbmisc 0>;
495 fsl,usbphy = <&usbphy0>;
502 status = "disabled"; 496 status = "disabled";
503 }; 497 };
504 498
@@ -506,9 +500,9 @@
506 compatible = "fsl,imx25-usb", "fsl,imx27-usb"; 500 compatible = "fsl,imx25-usb", "fsl,imx27-usb";
507 reg = <0x53ff4400 0x0200>; 501 reg = <0x53ff4400 0x0200>;
508 interrupts = <35>; 502 interrupts = <35>;
509 clocks = <&clks 9>, <&clks 70>, <&clks 8>; 503 clocks = <&clks 70>;
510 clock-names = "ipg", "ahb", "per";
511 fsl,usbmisc = <&usbmisc 1>; 504 fsl,usbmisc = <&usbmisc 1>;
505 fsl,usbphy = <&usbphy1>;
512 status = "disabled"; 506 status = "disabled";
513 }; 507 };
514 508
@@ -518,7 +512,6 @@
518 clocks = <&clks 9>, <&clks 70>, <&clks 8>; 512 clocks = <&clks 9>, <&clks 70>, <&clks 8>;
519 clock-names = "ipg", "ahb", "per"; 513 clock-names = "ipg", "ahb", "per";
520 reg = <0x53ff4600 0x00f>; 514 reg = <0x53ff4600 0x00f>;
521 status = "disabled";
522 }; 515 };
523 516
524 dryice@53ffc000 { 517 dryice@53ffc000 {
@@ -530,6 +523,11 @@
530 }; 523 };
531 }; 524 };
532 525
526 iram: sram@78000000 {
527 compatible = "mmio-sram";
528 reg = <0x78000000 0x20000>;
529 };
530
533 emi@80000000 { 531 emi@80000000 {
534 compatible = "fsl,emi-bus", "simple-bus"; 532 compatible = "fsl,emi-bus", "simple-bus";
535 #address-cells = <1>; 533 #address-cells = <1>;
@@ -550,4 +548,20 @@
550 }; 548 };
551 }; 549 };
552 }; 550 };
551
552 usbphy {
553 compatible = "simple-bus";
554 #address-cells = <1>;
555 #size-cells = <0>;
556
557 usbphy0: usb-phy@0 {
558 reg = <0>;
559 compatible = "usb-nop-xceiv";
560 };
561
562 usbphy1: usb-phy@1 {
563 reg = <1>;
564 compatible = "usb-nop-xceiv";
565 };
566 };
553}; 567};
diff --git a/arch/arm/boot/dts/imx27-pdk.dts b/arch/arm/boot/dts/imx27-pdk.dts
index 5ce89aa275df..4c317716b510 100644
--- a/arch/arm/boot/dts/imx27-pdk.dts
+++ b/arch/arm/boot/dts/imx27-pdk.dts
@@ -17,15 +17,181 @@
17 compatible = "fsl,imx27-pdk", "fsl,imx27"; 17 compatible = "fsl,imx27-pdk", "fsl,imx27";
18 18
19 memory { 19 memory {
20 reg = <0x0 0x0>; 20 reg = <0xa0000000 0x08000000>;
21 }; 21 };
22
23 usbphy {
24 compatible = "simple-bus";
25 #address-cells = <1>;
26 #size-cells = <0>;
27
28 usbphy0: usbphy@0 {
29 compatible = "usb-nop-xceiv";
30 reg = <0>;
31 clocks = <&clks 0>;
32 clock-names = "main_clk";
33 };
34 };
35};
36
37&cspi2 {
38 pinctrl-names = "default";
39 pinctrl-0 = <&pinctrl_cspi2>;
40 fsl,spi-num-chipselects = <1>;
41 cs-gpios = <&gpio4 21 GPIO_ACTIVE_HIGH>;
42 status = "okay";
43
44 pmic: mc13783@0 {
45 compatible = "fsl,mc13783";
46 reg = <0>;
47 spi-cs-high;
48 spi-max-frequency = <1000000>;
49 interrupt-parent = <&gpio3>;
50 interrupts = <14 IRQ_TYPE_LEVEL_HIGH>;
51
52 regulators {
53 vgen_reg: vgen {
54 regulator-min-microvolt = <1500000>;
55 regulator-max-microvolt = <1500000>;
56 regulator-always-on;
57 regulator-boot-on;
58 };
59
60 vmmc1_reg: vmmc1 {
61 regulator-min-microvolt = <1600000>;
62 regulator-max-microvolt = <3000000>;
63 };
64
65 gpo1_reg: gpo1 {
66 regulator-always-on;
67 regulator-boot-on;
68 };
69
70 gpo3_reg: gpo3 {
71 regulator-always-on;
72 regulator-boot-on;
73 };
74 };
75 };
76};
77
78&fec {
79 phy-mode = "mii";
80 pinctrl-names = "default";
81 pinctrl-0 = <&pinctrl_fec>;
82 status = "okay";
83};
84
85&kpp {
86 linux,keymap = <
87 MATRIX_KEY(0, 0, KEY_UP)
88 MATRIX_KEY(0, 1, KEY_DOWN)
89 MATRIX_KEY(1, 0, KEY_RIGHT)
90 MATRIX_KEY(1, 1, KEY_LEFT)
91 MATRIX_KEY(1, 2, KEY_ENTER)
92 MATRIX_KEY(2, 0, KEY_F6)
93 MATRIX_KEY(2, 1, KEY_F8)
94 MATRIX_KEY(2, 2, KEY_F9)
95 MATRIX_KEY(2, 3, KEY_F10)
96 >;
97 status = "okay";
98};
99
100&nfc {
101 pinctrl-names = "default";
102 pinctrl-0 = <&pinctrl_nand>;
103 nand-ecc-mode = "hw";
104 nand-on-flash-bbt;
105 status = "okay";
22}; 106};
23 107
24&uart1 { 108&uart1 {
25 fsl,uart-has-rtscts; 109 fsl,uart-has-rtscts;
110 pinctrl-names = "default";
111 pinctrl-0 = <&pinctrl_uart1>;
26 status = "okay"; 112 status = "okay";
27}; 113};
28 114
29&fec { 115&usbotg {
116 pinctrl-names = "default";
117 pinctrl-0 = <&pinctrl_usbotg>;
118 dr_mode = "otg";
119 fsl,usbphy = <&usbphy0>;
120 phy_type = "ulpi";
30 status = "okay"; 121 status = "okay";
31}; 122};
123
124&iomuxc {
125 imx27-pdk {
126 pinctrl_cspi2: cspi2grp {
127 fsl,pins = <
128 MX27_PAD_CSPI2_MISO__CSPI2_MISO 0x0
129 MX27_PAD_CSPI2_MOSI__CSPI2_MOSI 0x0
130 MX27_PAD_CSPI2_SCLK__CSPI2_SCLK 0x0
131 MX27_PAD_CSPI2_SS0__GPIO4_21 0x0 /* SPI2 CS0 */
132 MX27_PAD_TOUT__GPIO3_14 0x0 /* PMIC IRQ */
133 >;
134 };
135
136 pinctrl_fec: fecgrp {
137 fsl,pins = <
138 MX27_PAD_SD3_CMD__FEC_TXD0 0x0
139 MX27_PAD_SD3_CLK__FEC_TXD1 0x0
140 MX27_PAD_ATA_DATA0__FEC_TXD2 0x0
141 MX27_PAD_ATA_DATA1__FEC_TXD3 0x0
142 MX27_PAD_ATA_DATA2__FEC_RX_ER 0x0
143 MX27_PAD_ATA_DATA3__FEC_RXD1 0x0
144 MX27_PAD_ATA_DATA4__FEC_RXD2 0x0
145 MX27_PAD_ATA_DATA5__FEC_RXD3 0x0
146 MX27_PAD_ATA_DATA6__FEC_MDIO 0x0
147 MX27_PAD_ATA_DATA7__FEC_MDC 0x0
148 MX27_PAD_ATA_DATA8__FEC_CRS 0x0
149 MX27_PAD_ATA_DATA9__FEC_TX_CLK 0x0
150 MX27_PAD_ATA_DATA10__FEC_RXD0 0x0
151 MX27_PAD_ATA_DATA11__FEC_RX_DV 0x0
152 MX27_PAD_ATA_DATA12__FEC_RX_CLK 0x0
153 MX27_PAD_ATA_DATA13__FEC_COL 0x0
154 MX27_PAD_ATA_DATA14__FEC_TX_ER 0x0
155 MX27_PAD_ATA_DATA15__FEC_TX_EN 0x0
156 >;
157 };
158
159 pinctrl_nand: nandgrp {
160 fsl,pins = <
161 MX27_PAD_NFRB__NFRB 0x0
162 MX27_PAD_NFCLE__NFCLE 0x0
163 MX27_PAD_NFWP_B__NFWP_B 0x0
164 MX27_PAD_NFCE_B__NFCE_B 0x0
165 MX27_PAD_NFALE__NFALE 0x0
166 MX27_PAD_NFRE_B__NFRE_B 0x0
167 MX27_PAD_NFWE_B__NFWE_B 0x0
168 >;
169 };
170
171 pinctrl_uart1: uart1grp {
172 fsl,pins = <
173 MX27_PAD_UART1_TXD__UART1_TXD 0x0
174 MX27_PAD_UART1_RXD__UART1_RXD 0x0
175 MX27_PAD_UART1_CTS__UART1_CTS 0x0
176 MX27_PAD_UART1_RTS__UART1_RTS 0x0
177 >;
178 };
179
180 pinctrl_usbotg: usbotggrp {
181 fsl,pins = <
182 MX27_PAD_USBOTG_NXT__USBOTG_NXT 0x0
183 MX27_PAD_USBOTG_STP__USBOTG_STP 0x0
184 MX27_PAD_USBOTG_DIR__USBOTG_DIR 0x0
185 MX27_PAD_USBOTG_CLK__USBOTG_CLK 0x0
186 MX27_PAD_USBOTG_DATA0__USBOTG_DATA0 0x0
187 MX27_PAD_USBOTG_DATA1__USBOTG_DATA1 0x0
188 MX27_PAD_USBOTG_DATA2__USBOTG_DATA2 0x0
189 MX27_PAD_USBOTG_DATA3__USBOTG_DATA3 0x0
190 MX27_PAD_USBOTG_DATA4__USBOTG_DATA4 0x0
191 MX27_PAD_USBOTG_DATA5__USBOTG_DATA5 0x0
192 MX27_PAD_USBOTG_DATA6__USBOTG_DATA6 0x0
193 MX27_PAD_USBOTG_DATA7__USBOTG_DATA7 0x0
194 >;
195 };
196 };
197};
diff --git a/arch/arm/boot/dts/imx27-phytec-phycard-s-rdk.dts b/arch/arm/boot/dts/imx27-phytec-phycard-s-rdk.dts
index 3c3964a99637..7c869fe3c30b 100644
--- a/arch/arm/boot/dts/imx27-phytec-phycard-s-rdk.dts
+++ b/arch/arm/boot/dts/imx27-phytec-phycard-s-rdk.dts
@@ -15,6 +15,10 @@
15 model = "Phytec pca100 rapid development kit"; 15 model = "Phytec pca100 rapid development kit";
16 compatible = "phytec,imx27-pca100-rdk", "phytec,imx27-pca100", "fsl,imx27"; 16 compatible = "phytec,imx27-pca100-rdk", "phytec,imx27-pca100", "fsl,imx27";
17 17
18 chosen {
19 stdout-path = &uart1;
20 };
21
18 display: display { 22 display: display {
19 model = "Primeview-PD050VL1"; 23 model = "Primeview-PD050VL1";
20 native-mode = <&timing0>; 24 native-mode = <&timing0>;
diff --git a/arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts b/arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts
index df3b2e731835..fe02bc7a24fd 100644
--- a/arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts
+++ b/arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts
@@ -12,14 +12,79 @@
12/ { 12/ {
13 model = "Phytec pcm970"; 13 model = "Phytec pcm970";
14 compatible = "phytec,imx27-pcm970", "phytec,imx27-pcm038", "fsl,imx27"; 14 compatible = "phytec,imx27-pcm970", "phytec,imx27-pcm038", "fsl,imx27";
15
16 chosen {
17 stdout-path = &uart1;
18 };
19
20 display0: LQ035Q7 {
21 model = "Sharp-LQ035Q7";
22 native-mode = <&timing0>;
23 bits-per-pixel = <16>;
24 fsl,pcr = <0xf00080c0>;
25
26 display-timings {
27 timing0: 240x320 {
28 clock-frequency = <5500000>;
29 hactive = <240>;
30 vactive = <320>;
31 hback-porch = <5>;
32 hsync-len = <7>;
33 hfront-porch = <16>;
34 vback-porch = <7>;
35 vsync-len = <1>;
36 vfront-porch = <9>;
37 pixelclk-active = <1>;
38 hsync-active = <1>;
39 vsync-active = <1>;
40 de-active = <0>;
41 };
42 };
43 };
44
45 regulators {
46 regulator@2 {
47 compatible = "regulator-fixed";
48 pinctrl-names = "default";
49 pinctrl-0 = <&pinctrl_csien>;
50 reg = <2>;
51 regulator-name = "CSI_EN";
52 regulator-min-microvolt = <3300000>;
53 regulator-max-microvolt = <3300000>;
54 gpio = <&gpio2 24 GPIO_ACTIVE_LOW>;
55 regulator-always-on;
56 };
57 };
58
59 usbphy {
60 usbphy2: usbphy@2 {
61 compatible = "usb-nop-xceiv";
62 reg = <2>;
63 vcc-supply = <&reg_5v0>;
64 clocks = <&clks 0>;
65 clock-names = "main_clk";
66 };
67 };
15}; 68};
16 69
17&cspi1 { 70&cspi1 {
71 pinctrl-0 = <&pinctrl_cspi1>, <&pinctrl_cspi1cs1>;
18 fsl,spi-num-chipselects = <2>; 72 fsl,spi-num-chipselects = <2>;
19 cs-gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>, 73 cs-gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>,
20 <&gpio4 27 GPIO_ACTIVE_LOW>; 74 <&gpio4 27 GPIO_ACTIVE_LOW>;
21}; 75};
22 76
77&fb {
78 pinctrl-names = "default";
79 pinctrl-0 = <&pinctrl_imxfb1>;
80 display = <&display0>;
81 lcd-supply = <&reg_5v0>;
82 fsl,dmacr = <0x00020010>;
83 fsl,lscr1 = <0x00120300>;
84 fsl,lpccr = <0x00a903ff>;
85 status = "okay";
86};
87
23&i2c1 { 88&i2c1 {
24 clock-frequency = <400000>; 89 clock-frequency = <400000>;
25 pinctrl-names = "default"; 90 pinctrl-names = "default";
@@ -36,6 +101,50 @@
36 101
37&iomuxc { 102&iomuxc {
38 imx27_phycore_rdk { 103 imx27_phycore_rdk {
104 pinctrl_csien: csiengrp {
105 fsl,pins = <
106 MX27_PAD_USB_OC_B__GPIO2_24 0x0
107 >;
108 };
109
110 pinctrl_cspi1cs1: cspi1cs1grp {
111 fsl,pins = <
112 MX27_PAD_CSPI1_SS1__GPIO4_27 0x0
113 >;
114 };
115
116 pinctrl_imxfb1: imxfbgrp {
117 fsl,pins = <
118 MX27_PAD_LD0__LD0 0x0
119 MX27_PAD_LD1__LD1 0x0
120 MX27_PAD_LD2__LD2 0x0
121 MX27_PAD_LD3__LD3 0x0
122 MX27_PAD_LD4__LD4 0x0
123 MX27_PAD_LD5__LD5 0x0
124 MX27_PAD_LD6__LD6 0x0
125 MX27_PAD_LD7__LD7 0x0
126 MX27_PAD_LD8__LD8 0x0
127 MX27_PAD_LD9__LD9 0x0
128 MX27_PAD_LD10__LD10 0x0
129 MX27_PAD_LD11__LD11 0x0
130 MX27_PAD_LD12__LD12 0x0
131 MX27_PAD_LD13__LD13 0x0
132 MX27_PAD_LD14__LD14 0x0
133 MX27_PAD_LD15__LD15 0x0
134 MX27_PAD_LD16__LD16 0x0
135 MX27_PAD_LD17__LD17 0x0
136 MX27_PAD_CLS__CLS 0x0
137 MX27_PAD_CONTRAST__CONTRAST 0x0
138 MX27_PAD_LSCLK__LSCLK 0x0
139 MX27_PAD_OE_ACD__OE_ACD 0x0
140 MX27_PAD_PS__PS 0x0
141 MX27_PAD_REV__REV 0x0
142 MX27_PAD_SPL_SPR__SPL_SPR 0x0
143 MX27_PAD_HSYNC__HSYNC 0x0
144 MX27_PAD_VSYNC__VSYNC 0x0
145 >;
146 };
147
39 pinctrl_i2c1: i2c1grp { 148 pinctrl_i2c1: i2c1grp {
40 /* Add pullup to DATA line */ 149 /* Add pullup to DATA line */
41 fsl,pins = < 150 fsl,pins = <
@@ -193,19 +302,16 @@
193 dr_mode = "host"; 302 dr_mode = "host";
194 phy_type = "ulpi"; 303 phy_type = "ulpi";
195 vbus-supply = <&reg_5v0>; 304 vbus-supply = <&reg_5v0>;
305 fsl,usbphy = <&usbphy2>;
196 disable-over-current; 306 disable-over-current;
197 status = "okay"; 307 status = "okay";
198}; 308};
199 309
200&usbphy2 {
201 vcc-supply = <&reg_5v0>;
202};
203
204&weim { 310&weim {
205 pinctrl-names = "default"; 311 pinctrl-names = "default";
206 pinctrl-0 = <&pinctrl_weim>; 312 pinctrl-0 = <&pinctrl_weim>;
207 313
208 can@d4000000 { 314 can@4,0 {
209 compatible = "nxp,sja1000"; 315 compatible = "nxp,sja1000";
210 reg = <4 0x00000000 0x00000100>; 316 reg = <4 0x00000000 0x00000100>;
211 interrupt-parent = <&gpio5>; 317 interrupt-parent = <&gpio5>;
diff --git a/arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi b/arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi
index cefaa6994623..31e9f7049f73 100644
--- a/arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi
+++ b/arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi
@@ -41,6 +41,20 @@
41 regulator-max-microvolt = <5000000>; 41 regulator-max-microvolt = <5000000>;
42 }; 42 };
43 }; 43 };
44
45 usbphy {
46 compatible = "simple-bus";
47 #address-cells = <1>;
48 #size-cells = <0>;
49
50 usbphy0: usbphy@0 {
51 compatible = "usb-nop-xceiv";
52 reg = <0>;
53 vcc-supply = <&sw3_reg>;
54 clocks = <&clks 0>;
55 clock-names = "main_clk";
56 };
57 };
44}; 58};
45 59
46&audmux { 60&audmux {
@@ -66,9 +80,9 @@
66 status = "okay"; 80 status = "okay";
67 81
68 pmic: mc13783@0 { 82 pmic: mc13783@0 {
69 #address-cells = <1>;
70 #size-cells = <0>;
71 compatible = "fsl,mc13783"; 83 compatible = "fsl,mc13783";
84 pinctrl-names = "default";
85 pinctrl-0 = <&pinctrl_pmic>;
72 reg = <0>; 86 reg = <0>;
73 spi-cs-high; 87 spi-cs-high;
74 spi-max-frequency = <20000000>; 88 spi-max-frequency = <20000000>;
@@ -166,7 +180,7 @@
166 180
167&fec { 181&fec {
168 phy-mode = "mii"; 182 phy-mode = "mii";
169 phy-reset-gpios = <&gpio3 30 GPIO_ACTIVE_HIGH>; 183 phy-reset-gpios = <&gpio3 30 GPIO_ACTIVE_LOW>;
170 phy-supply = <&reg_3v3>; 184 phy-supply = <&reg_3v3>;
171 pinctrl-names = "default"; 185 pinctrl-names = "default";
172 pinctrl-0 = <&pinctrl_fec1>; 186 pinctrl-0 = <&pinctrl_fec1>;
@@ -204,7 +218,6 @@
204 MX27_PAD_CSPI1_MOSI__CSPI1_MOSI 0x0 218 MX27_PAD_CSPI1_MOSI__CSPI1_MOSI 0x0
205 MX27_PAD_CSPI1_SCLK__CSPI1_SCLK 0x0 219 MX27_PAD_CSPI1_SCLK__CSPI1_SCLK 0x0
206 MX27_PAD_CSPI1_SS0__GPIO4_28 0x0 /* SPI1 CS0 */ 220 MX27_PAD_CSPI1_SS0__GPIO4_28 0x0 /* SPI1 CS0 */
207 MX27_PAD_USB_PWR__GPIO2_23 0x0 /* PMIC IRQ */
208 >; 221 >;
209 }; 222 };
210 223
@@ -251,6 +264,21 @@
251 >; 264 >;
252 }; 265 };
253 266
267 pinctrl_pmic: pmicgrp {
268 fsl,pins = <
269 MX27_PAD_USB_PWR__GPIO2_23 0x0 /* PMIC IRQ */
270 >;
271 };
272
273 pinctrl_ssi1: ssi1grp {
274 fsl,pins = <
275 MX27_PAD_SSI1_FS__SSI1_FS 0x0
276 MX27_PAD_SSI1_RXDAT__SSI1_RXDAT 0x0
277 MX27_PAD_SSI1_TXDAT__SSI1_TXDAT 0x0
278 MX27_PAD_SSI1_CLK__SSI1_CLK 0x0
279 >;
280 };
281
254 pinctrl_usbotg: usbotggrp { 282 pinctrl_usbotg: usbotggrp {
255 fsl,pins = < 283 fsl,pins = <
256 MX27_PAD_USBOTG_CLK__USBOTG_CLK 0x0 284 MX27_PAD_USBOTG_CLK__USBOTG_CLK 0x0
@@ -279,23 +307,28 @@
279 status = "okay"; 307 status = "okay";
280}; 308};
281 309
310&ssi1 {
311 pinctrl-names = "default";
312 pinctrl-0 = <&pinctrl_ssi1>;
313 fsl,mode = "i2s-slave";
314 status = "okay";
315};
316
282&usbotg { 317&usbotg {
283 pinctrl-names = "default"; 318 pinctrl-names = "default";
284 pinctrl-0 = <&pinctrl_usbotg>; 319 pinctrl-0 = <&pinctrl_usbotg>;
285 dr_mode = "otg"; 320 dr_mode = "otg";
286 phy_type = "ulpi"; 321 phy_type = "ulpi";
322 fsl,usbphy = <&usbphy0>;
287 vbus-supply = <&sw3_reg>; 323 vbus-supply = <&sw3_reg>;
324 disable-over-current;
288 status = "okay"; 325 status = "okay";
289}; 326};
290 327
291&usbphy0 {
292 vcc-supply = <&sw3_reg>;
293};
294
295&weim { 328&weim {
296 status = "okay"; 329 status = "okay";
297 330
298 nor: nor@c0000000 { 331 nor: nor@0,0 {
299 compatible = "cfi-flash"; 332 compatible = "cfi-flash";
300 reg = <0 0x00000000 0x02000000>; 333 reg = <0 0x00000000 0x02000000>;
301 bank-width = <2>; 334 bank-width = <2>;
@@ -305,7 +338,7 @@
305 #size-cells = <1>; 338 #size-cells = <1>;
306 }; 339 };
307 340
308 sram: sram@c8000000 { 341 sram: sram@1,0 {
309 compatible = "mtd-ram"; 342 compatible = "mtd-ram";
310 reg = <1 0x00000000 0x00800000>; 343 reg = <1 0x00000000 0x00800000>;
311 bank-width = <2>; 344 bank-width = <2>;
diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
index 137e010eab35..a75555c39533 100644
--- a/arch/arm/boot/dts/imx27.dtsi
+++ b/arch/arm/boot/dts/imx27.dtsi
@@ -11,11 +11,13 @@
11 11
12#include "skeleton.dtsi" 12#include "skeleton.dtsi"
13#include "imx27-pinfunc.h" 13#include "imx27-pinfunc.h"
14#include <dt-bindings/input/input.h>
14#include <dt-bindings/interrupt-controller/irq.h> 15#include <dt-bindings/interrupt-controller/irq.h>
15#include <dt-bindings/gpio/gpio.h> 16#include <dt-bindings/gpio/gpio.h>
16 17
17/ { 18/ {
18 aliases { 19 aliases {
20 ethernet0 = &fec;
19 gpio0 = &gpio1; 21 gpio0 = &gpio1;
20 gpio1 = &gpio2; 22 gpio1 = &gpio2;
21 gpio2 = &gpio3; 23 gpio2 = &gpio3;
@@ -71,26 +73,6 @@
71 }; 73 };
72 }; 74 };
73 75
74 usbphy {
75 compatible = "simple-bus";
76 #address-cells = <1>;
77 #size-cells = <0>;
78
79 usbphy0: usbphy@0 {
80 compatible = "usb-nop-xceiv";
81 reg = <0>;
82 clocks = <&clks 75>;
83 clock-names = "main_clk";
84 };
85
86 usbphy2: usbphy@2 {
87 compatible = "usb-nop-xceiv";
88 reg = <2>;
89 clocks = <&clks 75>;
90 clock-names = "main_clk";
91 };
92 };
93
94 soc { 76 soc {
95 #address-cells = <1>; 77 #address-cells = <1>;
96 #size-cells = <1>; 78 #size-cells = <1>;
@@ -464,9 +446,8 @@
464 compatible = "fsl,imx27-usb"; 446 compatible = "fsl,imx27-usb";
465 reg = <0x10024000 0x200>; 447 reg = <0x10024000 0x200>;
466 interrupts = <56>; 448 interrupts = <56>;
467 clocks = <&clks 15>; 449 clocks = <&clks 75>;
468 fsl,usbmisc = <&usbmisc 0>; 450 fsl,usbmisc = <&usbmisc 0>;
469 fsl,usbphy = <&usbphy0>;
470 status = "disabled"; 451 status = "disabled";
471 }; 452 };
472 453
@@ -474,7 +455,7 @@
474 compatible = "fsl,imx27-usb"; 455 compatible = "fsl,imx27-usb";
475 reg = <0x10024200 0x200>; 456 reg = <0x10024200 0x200>;
476 interrupts = <54>; 457 interrupts = <54>;
477 clocks = <&clks 15>; 458 clocks = <&clks 75>;
478 fsl,usbmisc = <&usbmisc 1>; 459 fsl,usbmisc = <&usbmisc 1>;
479 status = "disabled"; 460 status = "disabled";
480 }; 461 };
@@ -483,9 +464,8 @@
483 compatible = "fsl,imx27-usb"; 464 compatible = "fsl,imx27-usb";
484 reg = <0x10024400 0x200>; 465 reg = <0x10024400 0x200>;
485 interrupts = <55>; 466 interrupts = <55>;
486 clocks = <&clks 15>; 467 clocks = <&clks 75>;
487 fsl,usbmisc = <&usbmisc 2>; 468 fsl,usbmisc = <&usbmisc 2>;
488 fsl,usbphy = <&usbphy2>;
489 status = "disabled"; 469 status = "disabled";
490 }; 470 };
491 471
diff --git a/arch/arm/boot/dts/imx28-duckbill.dts b/arch/arm/boot/dts/imx28-duckbill.dts
index 5f326c1c1850..ce1a7effba37 100644
--- a/arch/arm/boot/dts/imx28-duckbill.dts
+++ b/arch/arm/boot/dts/imx28-duckbill.dts
@@ -25,9 +25,9 @@
25 ssp0: ssp@80010000 { 25 ssp0: ssp@80010000 {
26 compatible = "fsl,imx28-mmc"; 26 compatible = "fsl,imx28-mmc";
27 pinctrl-names = "default"; 27 pinctrl-names = "default";
28 pinctrl-0 = <&mmc0_8bit_pins_a 28 pinctrl-0 = <&mmc0_4bit_pins_a
29 &mmc0_cd_cfg &mmc0_sck_cfg>; 29 &mmc0_cd_cfg &mmc0_sck_cfg>;
30 bus-width = <8>; 30 bus-width = <4>;
31 vmmc-supply = <&reg_3p3v>; 31 vmmc-supply = <&reg_3p3v>;
32 status = "okay"; 32 status = "okay";
33 }; 33 };
@@ -39,7 +39,7 @@
39 hog_pins_a: hog@0 { 39 hog_pins_a: hog@0 {
40 reg = <0>; 40 reg = <0>;
41 fsl,pinmux-ids = < 41 fsl,pinmux-ids = <
42 MX28_PAD_ENET0_RX_CLK__GPIO_4_13 /* PHY Reset */ 42 MX28_PAD_SSP0_DATA7__GPIO_2_7 /* PHY Reset */
43 >; 43 >;
44 fsl,drive-strength = <MXS_DRIVE_4mA>; 44 fsl,drive-strength = <MXS_DRIVE_4mA>;
45 fsl,voltage = <MXS_VOLTAGE_HIGH>; 45 fsl,voltage = <MXS_VOLTAGE_HIGH>;
@@ -82,7 +82,7 @@
82 pinctrl-names = "default"; 82 pinctrl-names = "default";
83 pinctrl-0 = <&mac0_pins_a>; 83 pinctrl-0 = <&mac0_pins_a>;
84 phy-supply = <&reg_3p3v>; 84 phy-supply = <&reg_3p3v>;
85 phy-reset-gpios = <&gpio4 13 0>; 85 phy-reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
86 phy-reset-duration = <100>; 86 phy-reset-duration = <100>;
87 status = "okay"; 87 status = "okay";
88 }; 88 };
@@ -110,12 +110,12 @@
110 110
111 status { 111 status {
112 label = "duckbill:green:status"; 112 label = "duckbill:green:status";
113 gpios = <&gpio3 5 0>; 113 gpios = <&gpio3 5 GPIO_ACTIVE_HIGH>;
114 }; 114 };
115 115
116 failure { 116 failure {
117 label = "duckbill:red:status"; 117 label = "duckbill:red:status";
118 gpios = <&gpio3 4 0>; 118 gpios = <&gpio3 4 GPIO_ACTIVE_HIGH>;
119 }; 119 };
120 }; 120 };
121}; 121};
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
index 90a579532b8b..a95cc5358ff4 100644
--- a/arch/arm/boot/dts/imx28.dtsi
+++ b/arch/arm/boot/dts/imx28.dtsi
@@ -9,6 +9,7 @@
9 * http://www.gnu.org/copyleft/gpl.html 9 * http://www.gnu.org/copyleft/gpl.html
10 */ 10 */
11 11
12#include <dt-bindings/gpio/gpio.h>
12#include "skeleton.dtsi" 13#include "skeleton.dtsi"
13#include "imx28-pinfunc.h" 14#include "imx28-pinfunc.h"
14 15
diff --git a/arch/arm/boot/dts/imx35-eukrea-cpuimx35.dtsi b/arch/arm/boot/dts/imx35-eukrea-cpuimx35.dtsi
index 906ae937b013..9c2b715ab8bf 100644
--- a/arch/arm/boot/dts/imx35-eukrea-cpuimx35.dtsi
+++ b/arch/arm/boot/dts/imx35-eukrea-cpuimx35.dtsi
@@ -37,6 +37,17 @@
37 compatible = "nxp,pcf8563"; 37 compatible = "nxp,pcf8563";
38 reg = <0x51>; 38 reg = <0x51>;
39 }; 39 };
40
41 tsc2007: tsc2007@48 {
42 compatible = "ti,tsc2007";
43 gpios = <&gpio3 2 0>;
44 interrupt-parent = <&gpio3>;
45 interrupts = <0x2 0x8>;
46 pinctrl-names = "default";
47 pinctrl-0 = <&pinctrl_tsc2007_1>;
48 reg = <0x48>;
49 ti,x-plate-ohms = <180>;
50 };
40}; 51};
41 52
42&iomuxc { 53&iomuxc {
@@ -70,6 +81,10 @@
70 MX35_PAD_I2C1_DAT__I2C1_SDA 0x80000000 81 MX35_PAD_I2C1_DAT__I2C1_SDA 0x80000000
71 >; 82 >;
72 }; 83 };
84
85 pinctrl_tsc2007_1: tsc2007grp-1 {
86 fsl,pins = <MX35_PAD_ATA_DA2__GPIO3_2 0x80000000>;
87 };
73 }; 88 };
74}; 89};
75 90
diff --git a/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts b/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts
index 1bdec21f4533..f04ae91eea89 100644
--- a/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts
+++ b/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts
@@ -46,6 +46,14 @@
46 linux,default-trigger = "heartbeat"; 46 linux,default-trigger = "heartbeat";
47 }; 47 };
48 }; 48 };
49
50 sound {
51 compatible = "eukrea,asoc-tlv320";
52 eukrea,model = "imx35-eukrea-tlv320aic23";
53 ssi-controller = <&ssi1>;
54 fsl,mux-int-port = <1>;
55 fsl,mux-ext-port = <4>;
56 };
49}; 57};
50 58
51&audmux { 59&audmux {
@@ -124,6 +132,7 @@
124}; 132};
125 133
126&ssi1 { 134&ssi1 {
135 codec-handle = <&tlv320aic23>;
127 fsl,mode = "i2s-slave"; 136 fsl,mode = "i2s-slave";
128 status = "okay"; 137 status = "okay";
129}; 138};
@@ -141,3 +150,16 @@
141 fsl,uart-has-rtscts; 150 fsl,uart-has-rtscts;
142 status = "okay"; 151 status = "okay";
143}; 152};
153
154&usbhost1 {
155 phy_type = "serial";
156 dr_mode = "host";
157 status = "okay";
158};
159
160&usbotg {
161 phy_type = "utmi";
162 dr_mode = "otg";
163 external-vbus-divider;
164 status = "okay";
165};
diff --git a/arch/arm/boot/dts/imx35-pdk.dts b/arch/arm/boot/dts/imx35-pdk.dts
new file mode 100644
index 000000000000..8d715523708f
--- /dev/null
+++ b/arch/arm/boot/dts/imx35-pdk.dts
@@ -0,0 +1,68 @@
1/*
2 * Copyright 2013 Eukréa Electromatique <denis@eukrea.com>
3 * Copyright 2014 Freescale Semiconductor, Inc.
4 *
5 * The code contained herein is licensed under the GNU General Public
6 * License. You may obtain a copy of the GNU General Public License
7 * Version 2 or later at the following locations:
8 *
9 * http://www.opensource.org/licenses/gpl-license.html
10 * http://www.gnu.org/copyleft/gpl.html
11 */
12
13/dts-v1/;
14#include "imx35.dtsi"
15
16/ {
17 model = "Freescale i.MX35 Product Development Kit";
18 compatible = "fsl,imx35-pdk", "fsl,imx35";
19
20 memory {
21 reg = <0x80000000 0x8000000>,
22 <0x90000000 0x8000000>;
23 };
24};
25
26&esdhc1 {
27 pinctrl-names = "default";
28 pinctrl-0 = <&pinctrl_esdhc1>;
29 status = "okay";
30};
31
32&iomuxc {
33 imx35-pdk {
34 pinctrl_esdhc1: esdhc1grp {
35 fsl,pins = <
36 MX35_PAD_SD1_CMD__ESDHC1_CMD 0x80000000
37 MX35_PAD_SD1_CLK__ESDHC1_CLK 0x80000000
38 MX35_PAD_SD1_DATA0__ESDHC1_DAT0 0x80000000
39 MX35_PAD_SD1_DATA1__ESDHC1_DAT1 0x80000000
40 MX35_PAD_SD1_DATA2__ESDHC1_DAT2 0x80000000
41 MX35_PAD_SD1_DATA3__ESDHC1_DAT3 0x80000000
42 >;
43 };
44
45 pinctrl_uart1: uart1grp {
46 fsl,pins = <
47 MX35_PAD_TXD1__UART1_TXD_MUX 0x1c5
48 MX35_PAD_RXD1__UART1_RXD_MUX 0x1c5
49 MX35_PAD_CTS1__UART1_CTS 0x1c5
50 MX35_PAD_RTS1__UART1_RTS 0x1c5
51 >;
52 };
53 };
54};
55
56&nfc {
57 nand-bus-width = <16>;
58 nand-ecc-mode = "hw";
59 nand-on-flash-bbt;
60 status = "okay";
61};
62
63&uart1 {
64 pinctrl-names = "default";
65 pinctrl-0 = <&pinctrl_uart1>;
66 fsl,uart-has-rtscts;
67 status = "okay";
68};
diff --git a/arch/arm/boot/dts/imx35.dtsi b/arch/arm/boot/dts/imx35.dtsi
index 88b218f8f810..4759abb49436 100644
--- a/arch/arm/boot/dts/imx35.dtsi
+++ b/arch/arm/boot/dts/imx35.dtsi
@@ -13,6 +13,7 @@
13 13
14/ { 14/ {
15 aliases { 15 aliases {
16 ethernet0 = &fec;
16 gpio0 = &gpio1; 17 gpio0 = &gpio1;
17 gpio1 = &gpio2; 18 gpio1 = &gpio2;
18 gpio2 = &gpio3; 19 gpio2 = &gpio3;
@@ -295,9 +296,9 @@
295 compatible = "fsl,imx35-usb", "fsl,imx27-usb"; 296 compatible = "fsl,imx35-usb", "fsl,imx27-usb";
296 reg = <0x53ff4000 0x0200>; 297 reg = <0x53ff4000 0x0200>;
297 interrupts = <37>; 298 interrupts = <37>;
298 clocks = <&clks 9>, <&clks 73>, <&clks 28>; 299 clocks = <&clks 73>;
299 clock-names = "ipg", "ahb", "per";
300 fsl,usbmisc = <&usbmisc 0>; 300 fsl,usbmisc = <&usbmisc 0>;
301 fsl,usbphy = <&usbphy0>;
301 status = "disabled"; 302 status = "disabled";
302 }; 303 };
303 304
@@ -305,9 +306,9 @@
305 compatible = "fsl,imx35-usb", "fsl,imx27-usb"; 306 compatible = "fsl,imx35-usb", "fsl,imx27-usb";
306 reg = <0x53ff4400 0x0200>; 307 reg = <0x53ff4400 0x0200>;
307 interrupts = <35>; 308 interrupts = <35>;
308 clocks = <&clks 9>, <&clks 73>, <&clks 28>; 309 clocks = <&clks 73>;
309 clock-names = "ipg", "ahb", "per";
310 fsl,usbmisc = <&usbmisc 1>; 310 fsl,usbmisc = <&usbmisc 1>;
311 fsl,usbphy = <&usbphy1>;
311 status = "disabled"; 312 status = "disabled";
312 }; 313 };
313 314
@@ -356,4 +357,20 @@
356 }; 357 };
357 }; 358 };
358 }; 359 };
360
361 usbphy {
362 compatible = "simple-bus";
363 #address-cells = <1>;
364 #size-cells = <0>;
365
366 usbphy0: usb-phy@0 {
367 reg = <0>;
368 compatible = "usb-nop-xceiv";
369 };
370
371 usbphy1: usb-phy@1 {
372 reg = <1>;
373 compatible = "usb-nop-xceiv";
374 };
375 };
359}; 376};
diff --git a/arch/arm/boot/dts/imx50.dtsi b/arch/arm/boot/dts/imx50.dtsi
index 9c89d1ca97c2..6a201cf54366 100644
--- a/arch/arm/boot/dts/imx50.dtsi
+++ b/arch/arm/boot/dts/imx50.dtsi
@@ -17,6 +17,7 @@
17 17
18/ { 18/ {
19 aliases { 19 aliases {
20 ethernet0 = &fec;
20 gpio0 = &gpio1; 21 gpio0 = &gpio1;
21 gpio1 = &gpio2; 22 gpio1 = &gpio2;
22 gpio2 = &gpio3; 23 gpio2 = &gpio3;
diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts
index 9e9deb244b76..6bc3243a80d3 100644
--- a/arch/arm/boot/dts/imx51-babbage.dts
+++ b/arch/arm/boot/dts/imx51-babbage.dts
@@ -17,10 +17,28 @@
17 model = "Freescale i.MX51 Babbage Board"; 17 model = "Freescale i.MX51 Babbage Board";
18 compatible = "fsl,imx51-babbage", "fsl,imx51"; 18 compatible = "fsl,imx51-babbage", "fsl,imx51";
19 19
20 chosen {
21 stdout-path = &uart1;
22 };
23
20 memory { 24 memory {
21 reg = <0x90000000 0x20000000>; 25 reg = <0x90000000 0x20000000>;
22 }; 26 };
23 27
28 clocks {
29 ckih1 {
30 clock-frequency = <22579200>;
31 };
32
33 clk_26M: codec_clock {
34 compatible = "fixed-clock";
35 reg=<0>;
36 #clock-cells = <0>;
37 clock-frequency = <26000000>;
38 gpios = <&gpio4 26 GPIO_ACTIVE_LOW>;
39 };
40 };
41
24 display0: display@di0 { 42 display0: display@di0 {
25 compatible = "fsl,imx-parallel-display"; 43 compatible = "fsl,imx-parallel-display";
26 interface-pix-fmt = "rgb24"; 44 interface-pix-fmt = "rgb24";
@@ -82,11 +100,13 @@
82 100
83 gpio-keys { 101 gpio-keys {
84 compatible = "gpio-keys"; 102 compatible = "gpio-keys";
103 pinctrl-names = "default";
104 pinctrl-0 = <&pinctrl_gpio_keys>;
85 105
86 power { 106 power {
87 label = "Power Button"; 107 label = "Power Button";
88 gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>; 108 gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
89 linux,code = <116>; /* KEY_POWER */ 109 linux,code = <KEY_POWER>;
90 gpio-key,wakeup; 110 gpio-key,wakeup;
91 }; 111 };
92 }; 112 };
@@ -102,6 +122,36 @@
102 }; 122 };
103 }; 123 };
104 124
125 regulators {
126 compatible = "simple-bus";
127 #address-cells = <1>;
128 #size-cells = <0>;
129
130 reg_usbh1_vbus: regulator@0 {
131 compatible = "regulator-fixed";
132 pinctrl-names = "default";
133 pinctrl-0 = <&pinctrl_usbh1reg>;
134 reg = <0>;
135 regulator-name = "usbh1_vbus";
136 regulator-min-microvolt = <5000000>;
137 regulator-max-microvolt = <5000000>;
138 gpio = <&gpio2 5 GPIO_ACTIVE_HIGH>;
139 enable-active-high;
140 };
141
142 reg_usbotg_vbus: regulator@1 {
143 compatible = "regulator-fixed";
144 pinctrl-names = "default";
145 pinctrl-0 = <&pinctrl_usbotgreg>;
146 reg = <1>;
147 regulator-name = "usbotg_vbus";
148 regulator-min-microvolt = <5000000>;
149 regulator-max-microvolt = <5000000>;
150 gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>;
151 enable-active-high;
152 };
153 };
154
105 sound { 155 sound {
106 compatible = "fsl,imx51-babbage-sgtl5000", 156 compatible = "fsl,imx51-babbage-sgtl5000",
107 "fsl,imx-audio-sgtl5000"; 157 "fsl,imx-audio-sgtl5000";
@@ -116,41 +166,23 @@
116 mux-ext-port = <3>; 166 mux-ext-port = <3>;
117 }; 167 };
118 168
119 clocks { 169 usbphy {
120 ckih1 { 170 #address-cells = <1>;
121 clock-frequency = <22579200>; 171 #size-cells = <0>;
122 }; 172 compatible = "simple-bus";
123 173
124 clk_26M: codec_clock { 174 usbh1phy: usbh1phy@0 {
125 compatible = "fixed-clock"; 175 compatible = "usb-nop-xceiv";
126 reg=<0>; 176 reg = <0>;
127 #clock-cells = <0>; 177 clocks = <&clks IMX5_CLK_DUMMY>;
128 clock-frequency = <26000000>; 178 clock-names = "main_clk";
129 gpios = <&gpio4 26 GPIO_ACTIVE_LOW>;
130 }; 179 };
131 }; 180 };
132}; 181};
133 182
134&esdhc1 { 183&audmux {
135 pinctrl-names = "default";
136 pinctrl-0 = <&pinctrl_esdhc1>;
137 fsl,cd-controller;
138 fsl,wp-controller;
139 status = "okay";
140};
141
142&esdhc2 {
143 pinctrl-names = "default";
144 pinctrl-0 = <&pinctrl_esdhc2>;
145 cd-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
146 wp-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
147 status = "okay";
148};
149
150&uart3 {
151 pinctrl-names = "default"; 184 pinctrl-names = "default";
152 pinctrl-0 = <&pinctrl_uart3>; 185 pinctrl-0 = <&pinctrl_audmux>;
153 fsl,uart-has-rtscts;
154 status = "okay"; 186 status = "okay";
155}; 187};
156 188
@@ -163,9 +195,9 @@
163 status = "okay"; 195 status = "okay";
164 196
165 pmic: mc13892@0 { 197 pmic: mc13892@0 {
166 #address-cells = <1>;
167 #size-cells = <0>;
168 compatible = "fsl,mc13892"; 198 compatible = "fsl,mc13892";
199 pinctrl-names = "default";
200 pinctrl-0 = <&pinctrl_pmic>;
169 spi-max-frequency = <6000000>; 201 spi-max-frequency = <6000000>;
170 spi-cs-high; 202 spi-cs-high;
171 reg = <0>; 203 reg = <0>;
@@ -280,6 +312,53 @@
280 }; 312 };
281}; 313};
282 314
315&esdhc1 {
316 pinctrl-names = "default";
317 pinctrl-0 = <&pinctrl_esdhc1>;
318 fsl,cd-controller;
319 fsl,wp-controller;
320 status = "okay";
321};
322
323&esdhc2 {
324 pinctrl-names = "default";
325 pinctrl-0 = <&pinctrl_esdhc2>;
326 cd-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
327 wp-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
328 status = "okay";
329};
330
331&fec {
332 pinctrl-names = "default";
333 pinctrl-0 = <&pinctrl_fec>;
334 phy-mode = "mii";
335 phy-reset-gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
336 phy-reset-duration = <1>;
337 status = "okay";
338};
339
340&i2c1 {
341 pinctrl-names = "default";
342 pinctrl-0 = <&pinctrl_i2c1>;
343 status = "okay";
344};
345
346&i2c2 {
347 pinctrl-names = "default";
348 pinctrl-0 = <&pinctrl_i2c2>;
349 status = "okay";
350
351 sgtl5000: codec@0a {
352 compatible = "fsl,sgtl5000";
353 pinctrl-names = "default";
354 pinctrl-0 = <&pinctrl_clkcodec>;
355 reg = <0x0a>;
356 clocks = <&clk_26M>;
357 VDDA-supply = <&vdig_reg>;
358 VDDIO-supply = <&vvideo_reg>;
359 };
360};
361
283&ipu_di0_disp0 { 362&ipu_di0_disp0 {
284 remote-endpoint = <&display0_in>; 363 remote-endpoint = <&display0_in>;
285}; 364};
@@ -288,29 +367,74 @@
288 remote-endpoint = <&display1_in>; 367 remote-endpoint = <&display1_in>;
289}; 368};
290 369
370&kpp {
371 pinctrl-names = "default";
372 pinctrl-0 = <&pinctrl_kpp>;
373 linux,keymap = <
374 MATRIX_KEY(0, 0, KEY_UP)
375 MATRIX_KEY(0, 1, KEY_DOWN)
376 MATRIX_KEY(0, 2, KEY_VOLUMEDOWN)
377 MATRIX_KEY(0, 3, KEY_HOME)
378 MATRIX_KEY(1, 0, KEY_RIGHT)
379 MATRIX_KEY(1, 1, KEY_LEFT)
380 MATRIX_KEY(1, 2, KEY_ENTER)
381 MATRIX_KEY(1, 3, KEY_VOLUMEUP)
382 MATRIX_KEY(2, 0, KEY_F6)
383 MATRIX_KEY(2, 1, KEY_F8)
384 MATRIX_KEY(2, 2, KEY_F9)
385 MATRIX_KEY(2, 3, KEY_F10)
386 MATRIX_KEY(3, 0, KEY_F1)
387 MATRIX_KEY(3, 1, KEY_F2)
388 MATRIX_KEY(3, 2, KEY_F3)
389 MATRIX_KEY(3, 3, KEY_POWER)
390 >;
391 status = "okay";
392};
393
291&ssi2 { 394&ssi2 {
292 fsl,mode = "i2s-slave"; 395 fsl,mode = "i2s-slave";
293 status = "okay"; 396 status = "okay";
294}; 397};
295 398
296&iomuxc { 399&uart1 {
297 pinctrl-names = "default"; 400 pinctrl-names = "default";
298 pinctrl-0 = <&pinctrl_hog>; 401 pinctrl-0 = <&pinctrl_uart1>;
402 fsl,uart-has-rtscts;
403 status = "okay";
404};
299 405
300 imx51-babbage { 406&uart2 {
301 pinctrl_hog: hoggrp { 407 pinctrl-names = "default";
302 fsl,pins = < 408 pinctrl-0 = <&pinctrl_uart2>;
303 MX51_PAD_GPIO1_0__SD1_CD 0x20d5 409 status = "okay";
304 MX51_PAD_GPIO1_1__SD1_WP 0x20d5 410};
305 MX51_PAD_GPIO1_5__GPIO1_5 0x100 411
306 MX51_PAD_GPIO1_6__GPIO1_6 0x100 412&uart3 {
307 MX51_PAD_EIM_A27__GPIO2_21 0x5 413 pinctrl-names = "default";
308 MX51_PAD_CSPI1_SS0__GPIO4_24 0x85 414 pinctrl-0 = <&pinctrl_uart3>;
309 MX51_PAD_CSPI1_SS1__GPIO4_25 0x85 415 fsl,uart-has-rtscts;
310 MX51_PAD_CSPI1_RDY__GPIO4_26 0x80000000 416 status = "okay";
311 >; 417};
312 }; 418
419&usbh1 {
420 pinctrl-names = "default";
421 pinctrl-0 = <&pinctrl_usbh1>;
422 vbus-supply = <&reg_usbh1_vbus>;
423 fsl,usbphy = <&usbh1phy>;
424 phy_type = "ulpi";
425 status = "okay";
426};
313 427
428&usbotg {
429 dr_mode = "otg";
430 disable-over-current;
431 phy_type = "utmi_wide";
432 vbus-supply = <&reg_usbotg_vbus>;
433 status = "okay";
434};
435
436&iomuxc {
437 imx51-babbage {
314 pinctrl_audmux: audmuxgrp { 438 pinctrl_audmux: audmuxgrp {
315 fsl,pins = < 439 fsl,pins = <
316 MX51_PAD_AUD3_BB_TXD__AUD3_TXD 0x80000000 440 MX51_PAD_AUD3_BB_TXD__AUD3_TXD 0x80000000
@@ -320,11 +444,19 @@
320 >; 444 >;
321 }; 445 };
322 446
447 pinctrl_clkcodec: clkcodecgrp {
448 fsl,pins = <
449 MX51_PAD_CSPI1_RDY__GPIO4_26 0x80000000
450 >;
451 };
452
323 pinctrl_ecspi1: ecspi1grp { 453 pinctrl_ecspi1: ecspi1grp {
324 fsl,pins = < 454 fsl,pins = <
325 MX51_PAD_CSPI1_MISO__ECSPI1_MISO 0x185 455 MX51_PAD_CSPI1_MISO__ECSPI1_MISO 0x185
326 MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI 0x185 456 MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI 0x185
327 MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK 0x185 457 MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK 0x185
458 MX51_PAD_CSPI1_SS0__GPIO4_24 0x85 /* CS0 */
459 MX51_PAD_CSPI1_SS1__GPIO4_25 0x85 /* CS1 */
328 >; 460 >;
329 }; 461 };
330 462
@@ -336,6 +468,8 @@
336 MX51_PAD_SD1_DATA1__SD1_DATA1 0x20d5 468 MX51_PAD_SD1_DATA1__SD1_DATA1 0x20d5
337 MX51_PAD_SD1_DATA2__SD1_DATA2 0x20d5 469 MX51_PAD_SD1_DATA2__SD1_DATA2 0x20d5
338 MX51_PAD_SD1_DATA3__SD1_DATA3 0x20d5 470 MX51_PAD_SD1_DATA3__SD1_DATA3 0x20d5
471 MX51_PAD_GPIO1_0__SD1_CD 0x20d5
472 MX51_PAD_GPIO1_1__SD1_WP 0x20d5
339 >; 473 >;
340 }; 474 };
341 475
@@ -347,29 +481,38 @@
347 MX51_PAD_SD2_DATA1__SD2_DATA1 0x20d5 481 MX51_PAD_SD2_DATA1__SD2_DATA1 0x20d5
348 MX51_PAD_SD2_DATA2__SD2_DATA2 0x20d5 482 MX51_PAD_SD2_DATA2__SD2_DATA2 0x20d5
349 MX51_PAD_SD2_DATA3__SD2_DATA3 0x20d5 483 MX51_PAD_SD2_DATA3__SD2_DATA3 0x20d5
484 MX51_PAD_GPIO1_5__GPIO1_5 0x100 /* WP */
485 MX51_PAD_GPIO1_6__GPIO1_6 0x100 /* CD */
350 >; 486 >;
351 }; 487 };
352 488
353 pinctrl_fec: fecgrp { 489 pinctrl_fec: fecgrp {
354 fsl,pins = < 490 fsl,pins = <
355 MX51_PAD_EIM_EB2__FEC_MDIO 0x80000000 491 MX51_PAD_EIM_EB2__FEC_MDIO 0x000001f5
356 MX51_PAD_EIM_EB3__FEC_RDATA1 0x80000000 492 MX51_PAD_EIM_EB3__FEC_RDATA1 0x00000085
357 MX51_PAD_EIM_CS2__FEC_RDATA2 0x80000000 493 MX51_PAD_EIM_CS2__FEC_RDATA2 0x00000085
358 MX51_PAD_EIM_CS3__FEC_RDATA3 0x80000000 494 MX51_PAD_EIM_CS3__FEC_RDATA3 0x00000085
359 MX51_PAD_EIM_CS4__FEC_RX_ER 0x80000000 495 MX51_PAD_EIM_CS4__FEC_RX_ER 0x00000180
360 MX51_PAD_EIM_CS5__FEC_CRS 0x80000000 496 MX51_PAD_EIM_CS5__FEC_CRS 0x00000180
361 MX51_PAD_NANDF_RB2__FEC_COL 0x80000000 497 MX51_PAD_NANDF_RB2__FEC_COL 0x00000180
362 MX51_PAD_NANDF_RB3__FEC_RX_CLK 0x80000000 498 MX51_PAD_NANDF_RB3__FEC_RX_CLK 0x00000180
363 MX51_PAD_NANDF_D9__FEC_RDATA0 0x80000000 499 MX51_PAD_NANDF_D9__FEC_RDATA0 0x00002180
364 MX51_PAD_NANDF_D8__FEC_TDATA0 0x80000000 500 MX51_PAD_NANDF_D8__FEC_TDATA0 0x00002004
365 MX51_PAD_NANDF_CS2__FEC_TX_ER 0x80000000 501 MX51_PAD_NANDF_CS2__FEC_TX_ER 0x00002004
366 MX51_PAD_NANDF_CS3__FEC_MDC 0x80000000 502 MX51_PAD_NANDF_CS3__FEC_MDC 0x00002004
367 MX51_PAD_NANDF_CS4__FEC_TDATA1 0x80000000 503 MX51_PAD_NANDF_CS4__FEC_TDATA1 0x00002004
368 MX51_PAD_NANDF_CS5__FEC_TDATA2 0x80000000 504 MX51_PAD_NANDF_CS5__FEC_TDATA2 0x00002004
369 MX51_PAD_NANDF_CS6__FEC_TDATA3 0x80000000 505 MX51_PAD_NANDF_CS6__FEC_TDATA3 0x00002004
370 MX51_PAD_NANDF_CS7__FEC_TX_EN 0x80000000 506 MX51_PAD_NANDF_CS7__FEC_TX_EN 0x00002004
371 MX51_PAD_NANDF_RDY_INT__FEC_TX_CLK 0x80000000 507 MX51_PAD_NANDF_RDY_INT__FEC_TX_CLK 0x00002180
372 MX51_PAD_EIM_A20__GPIO2_14 0x85 /* Reset */ 508 MX51_PAD_NANDF_D11__FEC_RX_DV 0x000020a4
509 MX51_PAD_EIM_A20__GPIO2_14 0x00000085 /* Phy Reset */
510 >;
511 };
512
513 pinctrl_gpio_keys: gpiokeysgrp {
514 fsl,pins = <
515 MX51_PAD_EIM_A27__GPIO2_21 0x5
373 >; 516 >;
374 }; 517 };
375 518
@@ -379,6 +522,13 @@
379 >; 522 >;
380 }; 523 };
381 524
525 pinctrl_i2c1: i2c1grp {
526 fsl,pins = <
527 MX51_PAD_EIM_D19__I2C1_SCL 0x400001ed
528 MX51_PAD_EIM_D16__I2C1_SDA 0x400001ed
529 >;
530 };
531
382 pinctrl_i2c2: i2c2grp { 532 pinctrl_i2c2: i2c2grp {
383 fsl,pins = < 533 fsl,pins = <
384 MX51_PAD_KEY_COL4__I2C2_SCL 0x400001ed 534 MX51_PAD_KEY_COL4__I2C2_SCL 0x400001ed
@@ -455,6 +605,12 @@
455 >; 605 >;
456 }; 606 };
457 607
608 pinctrl_pmic: pmicgrp {
609 fsl,pins = <
610 MX51_PAD_GPIO1_8__GPIO1_8 0xe5 /* IRQ */
611 >;
612 };
613
458 pinctrl_uart1: uart1grp { 614 pinctrl_uart1: uart1grp {
459 fsl,pins = < 615 fsl,pins = <
460 MX51_PAD_UART1_RXD__UART1_RXD 0x1c5 616 MX51_PAD_UART1_RXD__UART1_RXD 0x1c5
@@ -479,71 +635,33 @@
479 MX51_PAD_EIM_D24__UART3_CTS 0x1c5 635 MX51_PAD_EIM_D24__UART3_CTS 0x1c5
480 >; 636 >;
481 }; 637 };
482 };
483};
484 638
485&uart1 { 639 pinctrl_usbh1: usbh1grp {
486 pinctrl-names = "default"; 640 fsl,pins = <
487 pinctrl-0 = <&pinctrl_uart1>; 641 MX51_PAD_USBH1_CLK__USBH1_CLK 0x80000000
488 fsl,uart-has-rtscts; 642 MX51_PAD_USBH1_DIR__USBH1_DIR 0x80000000
489 status = "okay"; 643 MX51_PAD_USBH1_NXT__USBH1_NXT 0x80000000
490}; 644 MX51_PAD_USBH1_DATA0__USBH1_DATA0 0x80000000
491 645 MX51_PAD_USBH1_DATA1__USBH1_DATA1 0x80000000
492&uart2 { 646 MX51_PAD_USBH1_DATA2__USBH1_DATA2 0x80000000
493 pinctrl-names = "default"; 647 MX51_PAD_USBH1_DATA3__USBH1_DATA3 0x80000000
494 pinctrl-0 = <&pinctrl_uart2>; 648 MX51_PAD_USBH1_DATA4__USBH1_DATA4 0x80000000
495 status = "okay"; 649 MX51_PAD_USBH1_DATA5__USBH1_DATA5 0x80000000
496}; 650 MX51_PAD_USBH1_DATA6__USBH1_DATA6 0x80000000
651 MX51_PAD_USBH1_DATA7__USBH1_DATA7 0x80000000
652 >;
653 };
497 654
498&i2c2 { 655 pinctrl_usbh1reg: usbh1reggrp {
499 pinctrl-names = "default"; 656 fsl,pins = <
500 pinctrl-0 = <&pinctrl_i2c2>; 657 MX51_PAD_EIM_D21__GPIO2_5 0x85
501 status = "okay"; 658 >;
659 };
502 660
503 sgtl5000: codec@0a { 661 pinctrl_usbotgreg: usbotgreggrp {
504 compatible = "fsl,sgtl5000"; 662 fsl,pins = <
505 reg = <0x0a>; 663 MX51_PAD_GPIO1_7__GPIO1_7 0x85
506 clocks = <&clk_26M>; 664 >;
507 VDDA-supply = <&vdig_reg>; 665 };
508 VDDIO-supply = <&vvideo_reg>;
509 }; 666 };
510}; 667};
511
512&audmux {
513 pinctrl-names = "default";
514 pinctrl-0 = <&pinctrl_audmux>;
515 status = "okay";
516};
517
518&fec {
519 pinctrl-names = "default";
520 pinctrl-0 = <&pinctrl_fec>;
521 phy-mode = "mii";
522 phy-reset-gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
523 phy-reset-duration = <1>;
524 status = "okay";
525};
526
527&kpp {
528 pinctrl-names = "default";
529 pinctrl-0 = <&pinctrl_kpp>;
530 linux,keymap = <
531 MATRIX_KEY(0, 0, KEY_UP)
532 MATRIX_KEY(0, 1, KEY_DOWN)
533 MATRIX_KEY(0, 2, KEY_VOLUMEDOWN)
534 MATRIX_KEY(0, 3, KEY_HOME)
535 MATRIX_KEY(1, 0, KEY_RIGHT)
536 MATRIX_KEY(1, 1, KEY_LEFT)
537 MATRIX_KEY(1, 2, KEY_ENTER)
538 MATRIX_KEY(1, 3, KEY_VOLUMEUP)
539 MATRIX_KEY(2, 0, KEY_F6)
540 MATRIX_KEY(2, 1, KEY_F8)
541 MATRIX_KEY(2, 2, KEY_F9)
542 MATRIX_KEY(2, 3, KEY_F10)
543 MATRIX_KEY(3, 0, KEY_F1)
544 MATRIX_KEY(3, 1, KEY_F2)
545 MATRIX_KEY(3, 2, KEY_F3)
546 MATRIX_KEY(3, 3, KEY_POWER)
547 >;
548 status = "okay";
549};
diff --git a/arch/arm/boot/dts/imx51-digi-connectcore-jsk.dts b/arch/arm/boot/dts/imx51-digi-connectcore-jsk.dts
new file mode 100644
index 000000000000..1db517d3d497
--- /dev/null
+++ b/arch/arm/boot/dts/imx51-digi-connectcore-jsk.dts
@@ -0,0 +1,108 @@
1/*
2 * Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru>
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12#include "imx51-digi-connectcore-som.dtsi"
13
14/ {
15 model = "Digi ConnectCore CC(W)-MX51 JSK";
16 compatible = "digi,connectcore-ccxmx51-jsk",
17 "digi,connectcore-ccxmx51-som", "fsl,imx51";
18
19 chosen {
20 linux,stdout-path = &uart1;
21 };
22};
23
24&owire {
25 pinctrl-names = "default";
26 pinctrl-0 = <&pinctrl_owire>;
27 status = "okay";
28};
29
30&uart1 {
31 pinctrl-names = "default";
32 pinctrl-0 = <&pinctrl_uart1>;
33 status = "okay";
34};
35
36&uart2 {
37 pinctrl-names = "default";
38 pinctrl-0 = <&pinctrl_uart2>;
39 status = "okay";
40};
41
42&uart3 {
43 pinctrl-names = "default";
44 pinctrl-0 = <&pinctrl_uart3>;
45 status = "okay";
46};
47
48&usbotg {
49 dr_mode = "otg";
50 status = "okay";
51};
52
53&usbh1 {
54 pinctrl-names = "default";
55 pinctrl-0 = <&pinctrl_usbh1>;
56 dr_mode = "host";
57 phy_type = "ulpi";
58 disable-over-current;
59 status = "okay";
60};
61
62&iomuxc {
63 imx51-digi-connectcore-jsk {
64 pinctrl_owire: owiregrp {
65 fsl,pins = <
66 MX51_PAD_OWIRE_LINE__OWIRE_LINE 0x40000000
67 >;
68 };
69
70 pinctrl_uart1: uart1grp {
71 fsl,pins = <
72 MX51_PAD_UART1_RXD__UART1_RXD 0x1c5
73 MX51_PAD_UART1_TXD__UART1_TXD 0x1c5
74 >;
75 };
76
77 pinctrl_uart2: uart2grp {
78 fsl,pins = <
79 MX51_PAD_UART2_RXD__UART2_RXD 0x1c5
80 MX51_PAD_UART2_TXD__UART2_TXD 0x1c5
81 >;
82 };
83
84 pinctrl_uart3: uart3grp {
85 fsl,pins = <
86 MX51_PAD_UART3_RXD__UART3_RXD 0x1c5
87 MX51_PAD_UART3_TXD__UART3_TXD 0x1c5
88 >;
89 };
90
91 pinctrl_usbh1: usbh1grp {
92 fsl,pins = <
93 MX51_PAD_USBH1_DATA0__USBH1_DATA0 0x1e5
94 MX51_PAD_USBH1_DATA1__USBH1_DATA1 0x1e5
95 MX51_PAD_USBH1_DATA2__USBH1_DATA2 0x1e5
96 MX51_PAD_USBH1_DATA3__USBH1_DATA3 0x1e5
97 MX51_PAD_USBH1_DATA4__USBH1_DATA4 0x1e5
98 MX51_PAD_USBH1_DATA5__USBH1_DATA5 0x1e5
99 MX51_PAD_USBH1_DATA6__USBH1_DATA6 0x1e5
100 MX51_PAD_USBH1_DATA7__USBH1_DATA7 0x1e5
101 MX51_PAD_USBH1_CLK__USBH1_CLK 0x1e5
102 MX51_PAD_USBH1_DIR__USBH1_DIR 0x1e5
103 MX51_PAD_USBH1_NXT__USBH1_NXT 0x1e5
104 MX51_PAD_USBH1_STP__USBH1_STP 0x1e5
105 >;
106 };
107 };
108};
diff --git a/arch/arm/boot/dts/imx51-digi-connectcore-som.dtsi b/arch/arm/boot/dts/imx51-digi-connectcore-som.dtsi
new file mode 100644
index 000000000000..321662f53e33
--- /dev/null
+++ b/arch/arm/boot/dts/imx51-digi-connectcore-som.dtsi
@@ -0,0 +1,377 @@
1/*
2 * Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru>
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12/dts-v1/;
13#include "imx51.dtsi"
14
15/ {
16 model = "Digi ConnectCore CC(W)-MX51";
17 compatible = "digi,connectcore-ccxmx51-som", "fsl,imx51";
18
19 memory {
20 reg = <0x90000000 0x08000000>;
21 };
22};
23
24&ecspi1 {
25 pinctrl-names = "default";
26 pinctrl-0 = <&pinctrl_ecspi1>;
27 fsl,spi-num-chipselects = <1>;
28 cs-gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>;
29 status = "okay";
30
31 pmic: mc13892@0 {
32 pinctrl-names = "default";
33 pinctrl-0 = <&pinctrl_mc13892>;
34 compatible = "fsl,mc13892";
35 spi-max-frequency = <16000000>;
36 spi-cs-high;
37 reg = <0>;
38 interrupt-parent = <&gpio1>;
39 interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
40 fsl,mc13xxx-uses-rtc;
41
42 regulators {
43 sw1_reg: sw1 {
44 regulator-min-microvolt = <1000000>;
45 regulator-max-microvolt = <1100000>;
46 regulator-boot-on;
47 regulator-always-on;
48 };
49
50 sw2_reg: sw2 {
51 regulator-min-microvolt = <1225000>;
52 regulator-max-microvolt = <1225000>;
53 regulator-boot-on;
54 regulator-always-on;
55 };
56
57 sw3_reg: sw3 {
58 regulator-min-microvolt = <1200000>;
59 regulator-max-microvolt = <1200000>;
60 regulator-boot-on;
61 regulator-always-on;
62 };
63
64 swbst_reg: swbst { };
65
66 viohi_reg: viohi {
67 regulator-always-on;
68 };
69
70 vpll_reg: vpll {
71 regulator-min-microvolt = <1800000>;
72 regulator-max-microvolt = <1800000>;
73 regulator-always-on;
74 };
75
76 vdig_reg: vdig {
77 regulator-min-microvolt = <1250000>;
78 regulator-max-microvolt = <1250000>;
79 regulator-always-on;
80 };
81
82 vsd_reg: vsd {
83 regulator-min-microvolt = <3150000>;
84 regulator-max-microvolt = <3150000>;
85 regulator-always-on;
86 };
87
88 vusb2_reg: vusb2 {
89 regulator-min-microvolt = <2600000>;
90 regulator-max-microvolt = <2600000>;
91 regulator-always-on;
92 };
93
94 vvideo_reg: vvideo {
95 regulator-min-microvolt = <2775000>;
96 regulator-max-microvolt = <2775000>;
97 regulator-always-on;
98 };
99
100 vaudio_reg: vaudio {
101 regulator-min-microvolt = <3000000>;
102 regulator-max-microvolt = <3000000>;
103 regulator-always-on;
104 };
105
106 vcam_reg: vcam {
107 regulator-min-microvolt = <2750000>;
108 regulator-max-microvolt = <2750000>;
109 regulator-always-on;
110 };
111
112 vgen1_reg: vgen1 {
113 regulator-min-microvolt = <1200000>;
114 regulator-max-microvolt = <1200000>;
115 regulator-always-on;
116 };
117
118 vgen2_reg: vgen2 {
119 regulator-min-microvolt = <3150000>;
120 regulator-max-microvolt = <3150000>;
121 regulator-always-on;
122 };
123
124 vgen3_reg: vgen3 {
125 regulator-min-microvolt = <1800000>;
126 regulator-max-microvolt = <1800000>;
127 regulator-always-on;
128 };
129
130 vusb_reg: vusb {
131 regulator-always-on;
132 };
133
134 gpo1_reg: gpo1 { };
135
136 gpo2_reg: gpo2 { };
137
138 gpo3_reg: gpo3 { };
139
140 gpo4_reg: gpo4 { };
141
142 pwgt2spi_reg: pwgt2spi {
143 regulator-always-on;
144 };
145
146 vcoincell_reg: vcoincell {
147 regulator-min-microvolt = <3000000>;
148 regulator-max-microvolt = <3000000>;
149 regulator-always-on;
150 };
151 };
152 };
153};
154
155&esdhc2 {
156 pinctrl-names = "default";
157 pinctrl-0 = <&pinctrl_esdhc2>;
158 cap-sdio-irq;
159 enable-sdio-wakeup;
160 keep-power-in-suspend;
161 max-frequency = <50000000>;
162 no-1-8-v;
163 non-removable;
164 vmmc-supply = <&gpo4_reg>;
165 status = "okay";
166};
167
168&fec {
169 pinctrl-names = "default";
170 pinctrl-0 = <&pinctrl_fec>;
171 phy-mode = "mii";
172 phy-supply = <&gpo3_reg>;
173 /* Pins shared with LCD2, keep status disabled */
174};
175
176&i2c2 {
177 pinctrl-names = "default";
178 pinctrl-0 = <&pinctrl_i2c2>;
179 clock-frequency = <400000>;
180 status = "okay";
181
182 mma7455l@1d {
183 pinctrl-names = "default";
184 pinctrl-0 = <&pinctrl_mma7455l>;
185 compatible = "fsl,mma7455l";
186 reg = <0x1d>;
187 interrupt-parent = <&gpio1>;
188 interrupts = <7 IRQ_TYPE_LEVEL_HIGH>, <6 IRQ_TYPE_LEVEL_HIGH>;
189 };
190};
191
192&nfc {
193 pinctrl-names = "default";
194 pinctrl-0 = <&pinctrl_nfc>;
195 nand-bus-width = <8>;
196 nand-ecc-mode = "hw";
197 nand-on-flash-bbt;
198 status = "okay";
199};
200
201&usbotg {
202 phy_type = "utmi_wide";
203 disable-over-current;
204 /* Device role is not known, keep status disabled */
205};
206
207&weim {
208 pinctrl-names = "default";
209 pinctrl-0 = <&pinctrl_weim>;
210 status = "okay";
211
212 lan9221: lan9221@5,0 {
213 pinctrl-names = "default";
214 pinctrl-0 = <&pinctrl_lan9221>;
215 compatible = "smsc,lan9221", "smsc,lan9115";
216 reg = <5 0x00000000 0x1000>;
217 fsl,weim-cs-timing = <
218 0x00420081 0x00000000
219 0x32260000 0x00000000
220 0x72080f00 0x00000000
221 >;
222 clocks = <&clks IMX5_CLK_DUMMY>;
223 interrupt-parent = <&gpio1>;
224 interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
225 phy-mode = "mii";
226 reg-io-width = <2>;
227 smsc,irq-push-pull;
228 vdd33a-supply = <&gpo2_reg>;
229 vddvario-supply = <&gpo2_reg>;
230 };
231};
232
233&iomuxc {
234 imx51-digi-connectcore-som {
235 pinctrl_ecspi1: ecspi1grp {
236 fsl,pins = <
237 MX51_PAD_CSPI1_MISO__ECSPI1_MISO 0x185
238 MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI 0x185
239 MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK 0x185
240 MX51_PAD_CSPI1_SS0__GPIO4_24 0x85 /* CS0 */
241 >;
242 };
243
244 pinctrl_esdhc2: esdhc2grp {
245 fsl,pins = <
246 MX51_PAD_SD2_CMD__SD2_CMD 0x400020d5
247 MX51_PAD_SD2_CLK__SD2_CLK 0x20d5
248 MX51_PAD_SD2_DATA0__SD2_DATA0 0x20d5
249 MX51_PAD_SD2_DATA1__SD2_DATA1 0x20d5
250 MX51_PAD_SD2_DATA2__SD2_DATA2 0x20d5
251 MX51_PAD_SD2_DATA3__SD2_DATA3 0x20d5
252 >;
253 };
254
255 pinctrl_fec: fecgrp {
256 fsl,pins = <
257 MX51_PAD_DI_GP3__FEC_TX_ER 0x80000000
258 MX51_PAD_DI2_PIN4__FEC_CRS 0x80000000
259 MX51_PAD_DI2_PIN2__FEC_MDC 0x80000000
260 MX51_PAD_DI2_PIN3__FEC_MDIO 0x80000000
261 MX51_PAD_DI2_DISP_CLK__FEC_RDATA1 0x80000000
262 MX51_PAD_DI_GP4__FEC_RDATA2 0x80000000
263 MX51_PAD_DISP2_DAT0__FEC_RDATA3 0x80000000
264 MX51_PAD_DISP2_DAT1__FEC_RX_ER 0x80000000
265 MX51_PAD_DISP2_DAT6__FEC_TDATA1 0x80000000
266 MX51_PAD_DISP2_DAT7__FEC_TDATA2 0x80000000
267 MX51_PAD_DISP2_DAT8__FEC_TDATA3 0x80000000
268 MX51_PAD_DISP2_DAT9__FEC_TX_EN 0x80000000
269 MX51_PAD_DISP2_DAT10__FEC_COL 0x80000000
270 MX51_PAD_DISP2_DAT11__FEC_RX_CLK 0x80000000
271 MX51_PAD_DISP2_DAT12__FEC_RX_DV 0x80000000
272 MX51_PAD_DISP2_DAT13__FEC_TX_CLK 0x80000000
273 MX51_PAD_DISP2_DAT14__FEC_RDATA0 0x80000000
274 MX51_PAD_DISP2_DAT15__FEC_TDATA0 0x80000000
275 >;
276 };
277
278 pinctrl_i2c2: i2c2grp {
279 fsl,pins = <
280 MX51_PAD_GPIO1_2__I2C2_SCL 0x400001ed
281 MX51_PAD_GPIO1_3__I2C2_SDA 0x400001ed
282 >;
283 };
284
285 pinctrl_nfc: nfcgrp {
286 fsl,pins = <
287 MX51_PAD_NANDF_D0__NANDF_D0 0x80000000
288 MX51_PAD_NANDF_D1__NANDF_D1 0x80000000
289 MX51_PAD_NANDF_D2__NANDF_D2 0x80000000
290 MX51_PAD_NANDF_D3__NANDF_D3 0x80000000
291 MX51_PAD_NANDF_D4__NANDF_D4 0x80000000
292 MX51_PAD_NANDF_D5__NANDF_D5 0x80000000
293 MX51_PAD_NANDF_D6__NANDF_D6 0x80000000
294 MX51_PAD_NANDF_D7__NANDF_D7 0x80000000
295 MX51_PAD_NANDF_ALE__NANDF_ALE 0x80000000
296 MX51_PAD_NANDF_CLE__NANDF_CLE 0x80000000
297 MX51_PAD_NANDF_RE_B__NANDF_RE_B 0x80000000
298 MX51_PAD_NANDF_WE_B__NANDF_WE_B 0x80000000
299 MX51_PAD_NANDF_WP_B__NANDF_WP_B 0x80000000
300 MX51_PAD_NANDF_CS0__NANDF_CS0 0x80000000
301 MX51_PAD_NANDF_RB0__NANDF_RB0 0x80000000
302 >;
303 };
304
305 pinctrl_lan9221: lan9221grp {
306 fsl,pins = <
307 MX51_PAD_GPIO1_9__GPIO1_9 0xe5 /* IRQ */
308 >;
309 };
310
311 pinctrl_mc13892: mc13892grp {
312 fsl,pins = <
313 MX51_PAD_GPIO1_5__GPIO1_5 0xe5 /* IRQ */
314 >;
315 };
316
317 pinctrl_mma7455l: mma7455lgrp {
318 fsl,pins = <
319 MX51_PAD_GPIO1_7__GPIO1_7 0xe5 /* IRQ1 */
320 MX51_PAD_GPIO1_6__GPIO1_6 0xe5 /* IRQ2 */
321 >;
322 };
323
324 pinctrl_weim: weimgrp {
325 fsl,pins = <
326 MX51_PAD_EIM_DA0__EIM_DA0 0x80000000
327 MX51_PAD_EIM_DA1__EIM_DA1 0x80000000
328 MX51_PAD_EIM_DA2__EIM_DA2 0x80000000
329 MX51_PAD_EIM_DA3__EIM_DA3 0x80000000
330 MX51_PAD_EIM_DA4__EIM_DA4 0x80000000
331 MX51_PAD_EIM_DA5__EIM_DA5 0x80000000
332 MX51_PAD_EIM_DA6__EIM_DA6 0x80000000
333 MX51_PAD_EIM_DA7__EIM_DA7 0x80000000
334 MX51_PAD_EIM_DA8__EIM_DA8 0x80000000
335 MX51_PAD_EIM_DA9__EIM_DA9 0x80000000
336 MX51_PAD_EIM_DA10__EIM_DA10 0x80000000
337 MX51_PAD_EIM_DA11__EIM_DA11 0x80000000
338 MX51_PAD_EIM_DA12__EIM_DA12 0x80000000
339 MX51_PAD_EIM_DA13__EIM_DA13 0x80000000
340 MX51_PAD_EIM_DA14__EIM_DA14 0x80000000
341 MX51_PAD_EIM_DA15__EIM_DA15 0x80000000
342 MX51_PAD_EIM_A16__EIM_A16 0x80000000
343 MX51_PAD_EIM_A17__EIM_A17 0x80000000
344 MX51_PAD_EIM_A18__EIM_A18 0x80000000
345 MX51_PAD_EIM_A19__EIM_A19 0x80000000
346 MX51_PAD_EIM_A20__EIM_A20 0x80000000
347 MX51_PAD_EIM_A21__EIM_A21 0x80000000
348 MX51_PAD_EIM_A22__EIM_A22 0x80000000
349 MX51_PAD_EIM_A23__EIM_A23 0x80000000
350 MX51_PAD_EIM_A24__EIM_A24 0x80000000
351 MX51_PAD_EIM_A25__EIM_A25 0x80000000
352 MX51_PAD_EIM_A26__EIM_A26 0x80000000
353 MX51_PAD_EIM_A27__EIM_A27 0x80000000
354 MX51_PAD_EIM_D16__EIM_D16 0x80000000
355 MX51_PAD_EIM_D17__EIM_D17 0x80000000
356 MX51_PAD_EIM_D18__EIM_D18 0x80000000
357 MX51_PAD_EIM_D19__EIM_D19 0x80000000
358 MX51_PAD_EIM_D20__EIM_D20 0x80000000
359 MX51_PAD_EIM_D21__EIM_D21 0x80000000
360 MX51_PAD_EIM_D22__EIM_D22 0x80000000
361 MX51_PAD_EIM_D23__EIM_D23 0x80000000
362 MX51_PAD_EIM_D24__EIM_D24 0x80000000
363 MX51_PAD_EIM_D25__EIM_D25 0x80000000
364 MX51_PAD_EIM_D26__EIM_D26 0x80000000
365 MX51_PAD_EIM_D27__EIM_D27 0x80000000
366 MX51_PAD_EIM_D28__EIM_D28 0x80000000
367 MX51_PAD_EIM_D29__EIM_D29 0x80000000
368 MX51_PAD_EIM_D30__EIM_D30 0x80000000
369 MX51_PAD_EIM_D31__EIM_D31 0x80000000
370 MX51_PAD_EIM_OE__EIM_OE 0x80000000
371 MX51_PAD_EIM_DTACK__EIM_DTACK 0x80000000
372 MX51_PAD_EIM_LBA__EIM_LBA 0x80000000
373 MX51_PAD_EIM_CS5__EIM_CS5 0x80000000 /* CS5 */
374 >;
375 };
376 };
377};
diff --git a/arch/arm/boot/dts/imx51-eukrea-cpuimx51.dtsi b/arch/arm/boot/dts/imx51-eukrea-cpuimx51.dtsi
index 9b3acf6e4282..63164266af83 100644
--- a/arch/arm/boot/dts/imx51-eukrea-cpuimx51.dtsi
+++ b/arch/arm/boot/dts/imx51-eukrea-cpuimx51.dtsi
@@ -42,6 +42,17 @@
42 compatible = "nxp,pcf8563"; 42 compatible = "nxp,pcf8563";
43 reg = <0x51>; 43 reg = <0x51>;
44 }; 44 };
45
46 tsc2007: tsc2007@49 {
47 compatible = "ti,tsc2007";
48 gpios = <&gpio4 0 1>;
49 interrupt-parent = <&gpio4>;
50 interrupts = <0x0 0x8>;
51 pinctrl-names = "default";
52 pinctrl-0 = <&pinctrl_tsc2007_1>;
53 reg = <0x49>;
54 ti,x-plate-ohms = <180>;
55 };
45}; 56};
46 57
47&iomuxc { 58&iomuxc {
diff --git a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts
index 5cec4f322096..75e66c9c6144 100644
--- a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts
+++ b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts
@@ -24,6 +24,14 @@
24 model = "Eukrea CPUIMX51"; 24 model = "Eukrea CPUIMX51";
25 compatible = "eukrea,mbimxsd51","eukrea,cpuimx51", "fsl,imx51"; 25 compatible = "eukrea,mbimxsd51","eukrea,cpuimx51", "fsl,imx51";
26 26
27 clocks {
28 clk24M: can_clock {
29 compatible = "fixed-clock";
30 #clock-cells = <0>;
31 clock-frequency = <24000000>;
32 };
33 };
34
27 gpio_keys { 35 gpio_keys {
28 compatible = "gpio-keys"; 36 compatible = "gpio-keys";
29 pinctrl-names = "default"; 37 pinctrl-names = "default";
@@ -50,6 +58,23 @@
50 }; 58 };
51 }; 59 };
52 60
61 regulators {
62 compatible = "simple-bus";
63 #address-cells = <1>;
64 #size-cells = <0>;
65
66 reg_can: regulator@0 {
67 compatible = "regulator-fixed";
68 reg = <0>;
69 regulator-name = "CAN_RST";
70 regulator-min-microvolt = <3300000>;
71 regulator-max-microvolt = <3300000>;
72 gpio = <&gpio4 15 GPIO_ACTIVE_HIGH>;
73 startup-delay-us = <20000>;
74 enable-active-high;
75 };
76 };
77
53 sound { 78 sound {
54 compatible = "eukrea,asoc-tlv320"; 79 compatible = "eukrea,asoc-tlv320";
55 eukrea,model = "imx51-eukrea-tlv320aic23"; 80 eukrea,model = "imx51-eukrea-tlv320aic23";
@@ -57,6 +82,20 @@
57 fsl,mux-int-port = <2>; 82 fsl,mux-int-port = <2>;
58 fsl,mux-ext-port = <3>; 83 fsl,mux-ext-port = <3>;
59 }; 84 };
85
86 usbphy {
87 #address-cells = <1>;
88 #size-cells = <0>;
89 compatible = "simple-bus";
90
91 usbh1phy: usbh1phy@0 {
92 compatible = "usb-nop-xceiv";
93 reg = <0>;
94 clocks = <&clks IMX5_CLK_USB_PHY_GATE>;
95 clock-names = "main_clk";
96 clock-frequency = <19200000>;
97 };
98 };
60}; 99};
61 100
62&audmux { 101&audmux {
@@ -72,6 +111,26 @@
72 status = "okay"; 111 status = "okay";
73}; 112};
74 113
114&ecspi1 {
115 pinctrl-names = "default";
116 pinctrl-0 = <&pinctrl_ecspi1>;
117 fsl,spi-num-chipselects = <1>;
118 cs-gpios = <&gpio4 24 GPIO_ACTIVE_LOW>;
119 status = "okay";
120
121 can0: can@0 {
122 pinctrl-names = "default";
123 pinctrl-0 = <&pinctrl_can>;
124 compatible = "microchip,mcp2515";
125 reg = <0>;
126 clocks = <&clk24M>;
127 spi-max-frequency = <10000000>;
128 interrupt-parent = <&gpio1>;
129 interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
130 vdd-supply = <&reg_can>;
131 };
132};
133
75&i2c1 { 134&i2c1 {
76 tlv320aic23: codec@1a { 135 tlv320aic23: codec@1a {
77 compatible = "ti,tlv320aic23"; 136 compatible = "ti,tlv320aic23";
@@ -90,6 +149,23 @@
90 >; 149 >;
91 }; 150 };
92 151
152
153 pinctrl_can: cangrp {
154 fsl,pins = <
155 MX51_PAD_CSI2_PIXCLK__GPIO4_15 0x80000000 /* nReset */
156 MX51_PAD_GPIO1_1__GPIO1_1 0x80000000 /* IRQ */
157 >;
158 };
159
160 pinctrl_ecspi1: ecspi1grp {
161 fsl,pins = <
162 MX51_PAD_CSPI1_MISO__ECSPI1_MISO 0x185
163 MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI 0x185
164 MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK 0x185
165 MX51_PAD_CSPI1_SS0__GPIO4_24 0x80000000 /* CS0 */
166 >;
167 };
168
93 pinctrl_esdhc1: esdhc1grp { 169 pinctrl_esdhc1: esdhc1grp {
94 fsl,pins = < 170 fsl,pins = <
95 MX51_PAD_SD1_CMD__SD1_CMD 0x400020d5 171 MX51_PAD_SD1_CMD__SD1_CMD 0x400020d5
@@ -151,6 +227,29 @@
151 MX51_PAD_CSI1_D9__GPIO3_13 0x1f5 227 MX51_PAD_CSI1_D9__GPIO3_13 0x1f5
152 >; 228 >;
153 }; 229 };
230
231 pinctrl_usbh1: usbh1grp {
232 fsl,pins = <
233 MX51_PAD_USBH1_CLK__USBH1_CLK 0x1e5
234 MX51_PAD_USBH1_DIR__USBH1_DIR 0x1e5
235 MX51_PAD_USBH1_NXT__USBH1_NXT 0x1e5
236 MX51_PAD_USBH1_DATA0__USBH1_DATA0 0x1e5
237 MX51_PAD_USBH1_DATA1__USBH1_DATA1 0x1e5
238 MX51_PAD_USBH1_DATA2__USBH1_DATA2 0x1e5
239 MX51_PAD_USBH1_DATA3__USBH1_DATA3 0x1e5
240 MX51_PAD_USBH1_DATA4__USBH1_DATA4 0x1e5
241 MX51_PAD_USBH1_DATA5__USBH1_DATA5 0x1e5
242 MX51_PAD_USBH1_DATA6__USBH1_DATA6 0x1e5
243 MX51_PAD_USBH1_DATA7__USBH1_DATA7 0x1e5
244 MX51_PAD_USBH1_STP__USBH1_STP 0x1e5
245 >;
246 };
247
248 pinctrl_usbh1_vbus: usbh1-vbusgrp {
249 fsl,pins = <
250 MX51_PAD_EIM_CS3__GPIO2_28 0x1f5
251 >;
252 };
154 }; 253 };
155}; 254};
156 255
@@ -173,3 +272,24 @@
173 fsl,uart-has-rtscts; 272 fsl,uart-has-rtscts;
174 status = "okay"; 273 status = "okay";
175}; 274};
275
276&usbh1 {
277 pinctrl-names = "default";
278 pinctrl-0 = <&pinctrl_usbh1>;
279 fsl,usbphy = <&usbh1phy>;
280 dr_mode = "host";
281 phy_type = "ulpi";
282 status = "okay";
283};
284
285&usbotg {
286 dr_mode = "otg";
287 phy_type = "utmi_wide";
288 status = "okay";
289};
290
291&usbphy0 {
292 pinctrl-names = "default";
293 pinctrl-0 = <&pinctrl_usbh1_vbus>;
294 reset-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
295};
diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
index 150bb4e2f744..bebbf3ba0d5e 100644
--- a/arch/arm/boot/dts/imx51.dtsi
+++ b/arch/arm/boot/dts/imx51.dtsi
@@ -19,6 +19,7 @@
19 19
20/ { 20/ {
21 aliases { 21 aliases {
22 ethernet0 = &fec;
22 gpio0 = &gpio1; 23 gpio0 = &gpio1;
23 gpio1 = &gpio2; 24 gpio1 = &gpio2;
24 gpio2 = &gpio3; 25 gpio2 = &gpio3;
@@ -537,6 +538,8 @@
537 }; 538 };
538 539
539 nfc: nand@83fdb000 { 540 nfc: nand@83fdb000 {
541 #address-cells = <1>;
542 #size-cells = <1>;
540 compatible = "fsl,imx51-nand"; 543 compatible = "fsl,imx51-nand";
541 reg = <0x83fdb000 0x1000 0xcfff0000 0x10000>; 544 reg = <0x83fdb000 0x1000 0xcfff0000 0x10000>;
542 interrupts = <8>; 545 interrupts = <8>;
diff --git a/arch/arm/boot/dts/imx53-mba53.dts b/arch/arm/boot/dts/imx53-mba53.dts
index 7c8c12969892..3e3f17aa93a1 100644
--- a/arch/arm/boot/dts/imx53-mba53.dts
+++ b/arch/arm/boot/dts/imx53-mba53.dts
@@ -17,6 +17,10 @@
17 model = "TQ MBa53 starter kit"; 17 model = "TQ MBa53 starter kit";
18 compatible = "tq,mba53", "tq,tqma53", "fsl,imx53"; 18 compatible = "tq,mba53", "tq,tqma53", "fsl,imx53";
19 19
20 chosen {
21 stdout-path = &uart2;
22 };
23
20 backlight { 24 backlight {
21 compatible = "pwm-backlight"; 25 compatible = "pwm-backlight";
22 pwms = <&pwm2 0 50000>; 26 pwms = <&pwm2 0 50000>;
@@ -244,7 +248,7 @@
244&tve { 248&tve {
245 pinctrl-names = "default"; 249 pinctrl-names = "default";
246 pinctrl-0 = <&pinctrl_vga_sync_1>; 250 pinctrl-0 = <&pinctrl_vga_sync_1>;
247 i2c-ddc-bus = <&i2c3>; 251 ddc-i2c-bus = <&i2c3>;
248 fsl,tve-mode = "vga"; 252 fsl,tve-mode = "vga";
249 fsl,hsync-pin = <4>; 253 fsl,hsync-pin = <4>;
250 fsl,vsync-pin = <6>; 254 fsl,vsync-pin = <6>;
diff --git a/arch/arm/boot/dts/imx53-qsb-common.dtsi b/arch/arm/boot/dts/imx53-qsb-common.dtsi
index ede04fa4161f..fd8c60dde7de 100644
--- a/arch/arm/boot/dts/imx53-qsb-common.dtsi
+++ b/arch/arm/boot/dts/imx53-qsb-common.dtsi
@@ -13,6 +13,10 @@
13#include "imx53.dtsi" 13#include "imx53.dtsi"
14 14
15/ { 15/ {
16 chosen {
17 stdout-path = &uart1;
18 };
19
16 memory { 20 memory {
17 reg = <0x70000000 0x20000000>, 21 reg = <0x70000000 0x20000000>,
18 <0xb0000000 0x20000000>; 22 <0xb0000000 0x20000000>;
@@ -272,6 +276,14 @@
272 >; 276 >;
273 }; 277 };
274 278
279 pinctrl_vga_sync: vgasync-grp {
280 fsl,pins = <
281 /* VGA_HSYNC, VSYNC with max drive strength */
282 MX53_PAD_EIM_OE__IPU_DI1_PIN7 0xe6
283 MX53_PAD_EIM_RW__IPU_DI1_PIN8 0xe6
284 >;
285 };
286
275 pinctrl_uart1: uart1grp { 287 pinctrl_uart1: uart1grp {
276 fsl,pins = < 288 fsl,pins = <
277 MX53_PAD_CSI0_DAT10__UART1_TXD_MUX 0x1e4 289 MX53_PAD_CSI0_DAT10__UART1_TXD_MUX 0x1e4
@@ -281,6 +293,15 @@
281 }; 293 };
282}; 294};
283 295
296&tve {
297 pinctrl-names = "default";
298 pinctrl-0 = <&pinctrl_vga_sync>;
299 fsl,tve-mode = "vga";
300 fsl,hsync-pin = <4>;
301 fsl,vsync-pin = <6>;
302 status = "okay";
303};
304
284&uart1 { 305&uart1 {
285 pinctrl-names = "default"; 306 pinctrl-names = "default";
286 pinctrl-0 = <&pinctrl_uart1>; 307 pinctrl-0 = <&pinctrl_uart1>;
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 9c2bff2252d0..6456a0084388 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -18,6 +18,7 @@
18 18
19/ { 19/ {
20 aliases { 20 aliases {
21 ethernet0 = &fec;
21 gpio0 = &gpio1; 22 gpio0 = &gpio1;
22 gpio1 = &gpio2; 23 gpio1 = &gpio2;
23 gpio2 = &gpio3; 24 gpio2 = &gpio3;
@@ -115,7 +116,7 @@
115 #address-cells = <1>; 116 #address-cells = <1>;
116 #size-cells = <0>; 117 #size-cells = <0>;
117 compatible = "fsl,imx53-ipu"; 118 compatible = "fsl,imx53-ipu";
118 reg = <0x18000000 0x080000000>; 119 reg = <0x18000000 0x08000000>;
119 interrupts = <11 10>; 120 interrupts = <11 10>;
120 clocks = <&clks IMX5_CLK_IPU_GATE>, 121 clocks = <&clks IMX5_CLK_IPU_GATE>,
121 <&clks IMX5_CLK_IPU_DI0_GATE>, 122 <&clks IMX5_CLK_IPU_DI0_GATE>,
@@ -726,8 +727,8 @@
726 clocks = <&clks IMX5_CLK_VPU_GATE>, 727 clocks = <&clks IMX5_CLK_VPU_GATE>,
727 <&clks IMX5_CLK_VPU_GATE>; 728 <&clks IMX5_CLK_VPU_GATE>;
728 clock-names = "per", "ahb"; 729 clock-names = "per", "ahb";
730 resets = <&src 1>;
729 iram = <&ocram>; 731 iram = <&ocram>;
730 status = "disabled";
731 }; 732 };
732 }; 733 };
733 734
diff --git a/arch/arm/boot/dts/imx6dl-hummingboard.dts b/arch/arm/boot/dts/imx6dl-hummingboard.dts
index 5bfae54fb780..5373a5f2782b 100644
--- a/arch/arm/boot/dts/imx6dl-hummingboard.dts
+++ b/arch/arm/boot/dts/imx6dl-hummingboard.dts
@@ -11,6 +11,10 @@
11 model = "SolidRun HummingBoard DL/Solo"; 11 model = "SolidRun HummingBoard DL/Solo";
12 compatible = "solidrun,hummingboard", "fsl,imx6dl"; 12 compatible = "solidrun,hummingboard", "fsl,imx6dl";
13 13
14 chosen {
15 stdout-path = &uart1;
16 };
17
14 ir_recv: ir-receiver { 18 ir_recv: ir-receiver {
15 compatible = "gpio-ir-receiver"; 19 compatible = "gpio-ir-receiver";
16 gpios = <&gpio1 2 1>; 20 gpios = <&gpio1 2 1>;
@@ -67,6 +71,13 @@
67 status = "okay"; 71 status = "okay";
68}; 72};
69 73
74&hdmi {
75 pinctrl-names = "default";
76 pinctrl-0 = <&pinctrl_hummingboard_hdmi>;
77 ddc-i2c-bus = <&i2c2>;
78 status = "okay";
79};
80
70&i2c1 { 81&i2c1 {
71 pinctrl-names = "default"; 82 pinctrl-names = "default";
72 pinctrl-0 = <&pinctrl_hummingboard_i2c1>; 83 pinctrl-0 = <&pinctrl_hummingboard_i2c1>;
@@ -82,6 +93,13 @@
82 */ 93 */
83}; 94};
84 95
96&i2c2 {
97 clock-frequency = <100000>;
98 pinctrl-names = "default";
99 pinctrl-0 = <&pinctrl_hummingboard_i2c2>;
100 status = "okay";
101};
102
85&iomuxc { 103&iomuxc {
86 hummingboard { 104 hummingboard {
87 pinctrl_hummingboard_flexcan1: hummingboard-flexcan1 { 105 pinctrl_hummingboard_flexcan1: hummingboard-flexcan1 {
@@ -97,6 +115,12 @@
97 >; 115 >;
98 }; 116 };
99 117
118 pinctrl_hummingboard_hdmi: hummingboard-hdmi {
119 fsl,pins = <
120 MX6QDL_PAD_KEY_ROW2__HDMI_TX_CEC_LINE 0x1f8b0
121 >;
122 };
123
100 pinctrl_hummingboard_i2c1: hummingboard-i2c1 { 124 pinctrl_hummingboard_i2c1: hummingboard-i2c1 {
101 fsl,pins = < 125 fsl,pins = <
102 MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1 126 MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
@@ -104,6 +128,13 @@
104 >; 128 >;
105 }; 129 };
106 130
131 pinctrl_hummingboard_i2c2: hummingboard-i2c2 {
132 fsl,pins = <
133 MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
134 MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
135 >;
136 };
137
107 pinctrl_hummingboard_spdif: hummingboard-spdif { 138 pinctrl_hummingboard_spdif: hummingboard-spdif {
108 fsl,pins = <MX6QDL_PAD_GPIO_17__SPDIF_OUT 0x13091>; 139 fsl,pins = <MX6QDL_PAD_GPIO_17__SPDIF_OUT 0x13091>;
109 }; 140 };
diff --git a/arch/arm/boot/dts/imx6dl-phytec-pbab01.dts b/arch/arm/boot/dts/imx6dl-phytec-pbab01.dts
new file mode 100644
index 000000000000..08e97801494e
--- /dev/null
+++ b/arch/arm/boot/dts/imx6dl-phytec-pbab01.dts
@@ -0,0 +1,19 @@
1/*
2 * Copyright 2013 Christian Hemp, Phytec Messtechnik GmbH
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12/dts-v1/;
13#include "imx6dl-phytec-pfla02.dtsi"
14#include "imx6qdl-phytec-pbab01.dtsi"
15
16/ {
17 model = "Phytec phyFLEX-i.MX6 DualLite/Solo Carrier-Board";
18 compatible = "phytec,imx6dl-pbab01", "phytec,imx6dl-pfla02", "fsl,imx6dl";
19};
diff --git a/arch/arm/boot/dts/imx6dl-phytec-pfla02.dtsi b/arch/arm/boot/dts/imx6dl-phytec-pfla02.dtsi
new file mode 100644
index 000000000000..964bc2ad3c5d
--- /dev/null
+++ b/arch/arm/boot/dts/imx6dl-phytec-pfla02.dtsi
@@ -0,0 +1,22 @@
1/*
2 * Copyright 2013 Christian Hemp, Phytec Messtechnik GmbH
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12#include "imx6dl.dtsi"
13#include "imx6qdl-phytec-pfla02.dtsi"
14
15/ {
16 model = "Phytec phyFLEX-i.MX6 DualLite/Solo";
17 compatible = "phytec,imx6dl-pfla02", "fsl,imx6dl";
18
19 memory {
20 reg = <0x10000000 0x20000000>;
21 };
22};
diff --git a/arch/arm/boot/dts/imx6dl-riotboard.dts b/arch/arm/boot/dts/imx6dl-riotboard.dts
new file mode 100644
index 000000000000..909fafc0b650
--- /dev/null
+++ b/arch/arm/boot/dts/imx6dl-riotboard.dts
@@ -0,0 +1,539 @@
1/*
2 * Copyright 2014 Iain Paton <ipaton0@gmail.com>
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
10/dts-v1/;
11#include "imx6dl.dtsi"
12#include <dt-bindings/gpio/gpio.h>
13
14/ {
15 model = "RIoTboard i.MX6S";
16 compatible = "riot,imx6s-riotboard", "fsl,imx6dl";
17
18 memory {
19 reg = <0x10000000 0x40000000>;
20 };
21
22 regulators {
23 compatible = "simple-bus";
24 #address-cells = <1>;
25 #size-cells = <0>;
26
27 reg_2p5v: regulator@0 {
28 compatible = "regulator-fixed";
29 reg = <0>;
30 regulator-name = "2P5V";
31 regulator-min-microvolt = <2500000>;
32 regulator-max-microvolt = <2500000>;
33 };
34
35 reg_3p3v: regulator@1 {
36 compatible = "regulator-fixed";
37 reg = <1>;
38 regulator-name = "3P3V";
39 regulator-min-microvolt = <3300000>;
40 regulator-max-microvolt = <3300000>;
41 };
42
43 reg_usb_otg_vbus: regulator@2 {
44 compatible = "regulator-fixed";
45 reg = <2>;
46 regulator-name = "usb_otg_vbus";
47 regulator-min-microvolt = <5000000>;
48 regulator-max-microvolt = <5000000>;
49 gpio = <&gpio3 22 0>;
50 enable-active-high;
51 };
52 };
53
54 leds {
55 compatible = "gpio-leds";
56 pinctrl-names = "default";
57 pinctrl-0 = <&pinctrl_led>;
58
59 led0: user1 {
60 label = "user1";
61 gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
62 default-state = "on";
63 linux,default-trigger = "heartbeat";
64 };
65
66 led1: user2 {
67 label = "user2";
68 gpios = <&gpio3 28 GPIO_ACTIVE_LOW>;
69 default-state = "off";
70 };
71 };
72
73 sound {
74 compatible = "fsl,imx-audio-sgtl5000";
75 model = "imx6-riotboard-sgtl5000";
76 ssi-controller = <&ssi1>;
77 audio-codec = <&codec>;
78 audio-routing =
79 "MIC_IN", "Mic Jack",
80 "Mic Jack", "Mic Bias",
81 "Headphone Jack", "HP_OUT";
82 mux-int-port = <1>;
83 mux-ext-port = <3>;
84 };
85};
86
87&audmux {
88 pinctrl-names = "default";
89 pinctrl-0 = <&pinctrl_audmux>;
90 status = "okay";
91};
92
93&fec {
94 pinctrl-names = "default";
95 pinctrl-0 = <&pinctrl_enet>;
96 phy-mode = "rgmii";
97 phy-reset-gpios = <&gpio3 31 0>;
98 interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>,
99 <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
100 status = "okay";
101};
102
103&hdmi {
104 ddc-i2c-bus = <&i2c2>;
105 status = "okay";
106};
107
108&i2c1 {
109 clock-frequency = <100000>;
110 pinctrl-names = "default";
111 pinctrl-0 = <&pinctrl_i2c1>;
112 status = "okay";
113
114 codec: sgtl5000@0a {
115 compatible = "fsl,sgtl5000";
116 reg = <0x0a>;
117 clocks = <&clks 201>;
118 VDDA-supply = <&reg_2p5v>;
119 VDDIO-supply = <&reg_3p3v>;
120 };
121
122 pmic: pf0100@08 {
123 compatible = "fsl,pfuze100";
124 reg = <0x08>;
125 interrupt-parent = <&gpio5>;
126 interrupts = <16 8>;
127
128 regulators {
129 reg_vddcore: sw1ab { /* VDDARM_IN */
130 regulator-min-microvolt = <300000>;
131 regulator-max-microvolt = <1875000>;
132 regulator-always-on;
133 };
134
135 reg_vddsoc: sw1c { /* VDDSOC_IN */
136 regulator-min-microvolt = <300000>;
137 regulator-max-microvolt = <1875000>;
138 regulator-always-on;
139 };
140
141 reg_gen_3v3: sw2 { /* VDDHIGH_IN */
142 regulator-min-microvolt = <800000>;
143 regulator-max-microvolt = <3300000>;
144 regulator-always-on;
145 };
146
147 reg_ddr_1v5a: sw3a { /* NVCC_DRAM, NVCC_RGMII */
148 regulator-min-microvolt = <400000>;
149 regulator-max-microvolt = <1975000>;
150 regulator-always-on;
151 };
152
153 reg_ddr_1v5b: sw3b { /* NVCC_DRAM, NVCC_RGMII */
154 regulator-min-microvolt = <400000>;
155 regulator-max-microvolt = <1975000>;
156 regulator-always-on;
157 };
158
159 reg_ddr_vtt: sw4 { /* MIPI conn */
160 regulator-min-microvolt = <400000>;
161 regulator-max-microvolt = <1975000>;
162 regulator-always-on;
163 };
164
165 reg_5v_600mA: swbst { /* not used */
166 regulator-min-microvolt = <5000000>;
167 regulator-max-microvolt = <5150000>;
168 };
169
170 reg_snvs_3v: vsnvs { /* VDD_SNVS_IN */
171 regulator-min-microvolt = <1500000>;
172 regulator-max-microvolt = <3000000>;
173 regulator-always-on;
174 };
175
176 vref_reg: vrefddr { /* VREF_DDR */
177 regulator-boot-on;
178 regulator-always-on;
179 };
180
181 reg_vgen1_1v5: vgen1 { /* not used */
182 regulator-min-microvolt = <800000>;
183 regulator-max-microvolt = <1550000>;
184 };
185
186 reg_vgen2_1v2_eth: vgen2 { /* pcie ? */
187 regulator-min-microvolt = <800000>;
188 regulator-max-microvolt = <1550000>;
189 regulator-always-on;
190 };
191
192 reg_vgen3_2v8: vgen3 { /* not used */
193 regulator-min-microvolt = <1800000>;
194 regulator-max-microvolt = <3300000>;
195 };
196 reg_vgen4_1v8: vgen4 { /* NVCC_SD3 */
197 regulator-min-microvolt = <1800000>;
198 regulator-max-microvolt = <3300000>;
199 regulator-always-on;
200 };
201
202 reg_vgen5_2v5_sgtl: vgen5 { /* Pwr LED & 5V0_delayed enable */
203 regulator-min-microvolt = <1800000>;
204 regulator-max-microvolt = <3300000>;
205 regulator-always-on;
206 };
207
208 reg_vgen6_3v3: vgen6 { /* #V#_DELAYED enable, MIPI */
209 regulator-min-microvolt = <1800000>;
210 regulator-max-microvolt = <3300000>;
211 regulator-always-on;
212 };
213 };
214 };
215};
216
217&i2c2 {
218 clock-frequency = <100000>;
219 pinctrl-names = "default";
220 pinctrl-0 = <&pinctrl_i2c2>;
221 status = "okay";
222};
223
224&i2c4 {
225 clock-frequency = <100000>;
226 pinctrl-names = "default";
227 pinctrl-0 = <&pinctrl_i2c4>;
228 clocks = <&clks 116>;
229 status = "okay";
230};
231
232&pwm1 {
233 pinctrl-names = "default";
234 pinctrl-0 = <&pinctrl_pwm1>;
235 status = "okay";
236};
237
238&pwm2 {
239 pinctrl-names = "default";
240 pinctrl-0 = <&pinctrl_pwm2>;
241 status = "okay";
242};
243
244&pwm3 {
245 pinctrl-names = "default";
246 pinctrl-0 = <&pinctrl_pwm3>;
247 status = "okay";
248};
249
250&pwm4 {
251 pinctrl-names = "default";
252 pinctrl-0 = <&pinctrl_pwm4>;
253 status = "okay";
254};
255
256&ssi1 {
257 fsl,mode = "i2s-slave";
258 status = "okay";
259};
260
261&uart1 {
262 pinctrl-names = "default";
263 pinctrl-0 = <&pinctrl_uart1>;
264 status = "okay";
265};
266
267&uart2 {
268 pinctrl-names = "default";
269 pinctrl-0 = <&pinctrl_uart2>;
270 status = "okay";
271};
272
273&uart3 {
274 pinctrl-names = "default";
275 pinctrl-0 = <&pinctrl_uart3>;
276 status = "okay";
277};
278
279&uart4 {
280 pinctrl-names = "default";
281 pinctrl-0 = <&pinctrl_uart4>;
282 status = "okay";
283};
284
285&uart5 {
286 pinctrl-names = "default";
287 pinctrl-0 = <&pinctrl_uart5>;
288 status = "okay";
289};
290
291&usbh1 {
292 dr_mode = "host";
293 disable-over-current;
294 status = "okay";
295};
296
297&usbotg {
298 vbus-supply = <&reg_usb_otg_vbus>;
299 pinctrl-names = "default";
300 pinctrl-0 = <&pinctrl_usbotg>;
301 disable-over-current;
302 dr_mode = "otg";
303 status = "okay";
304};
305
306&usdhc2 {
307 pinctrl-names = "default";
308 pinctrl-0 = <&pinctrl_usdhc2>;
309 cd-gpios = <&gpio1 4 0>;
310 wp-gpios = <&gpio1 2 0>;
311 vmmc-supply = <&reg_3p3v>;
312 status = "okay";
313};
314
315&usdhc3 {
316 pinctrl-names = "default";
317 pinctrl-0 = <&pinctrl_usdhc3>;
318 cd-gpios = <&gpio7 0 0>;
319 wp-gpios = <&gpio7 1 0>;
320 vmmc-supply = <&reg_3p3v>;
321 status = "okay";
322};
323
324&usdhc4 {
325 pinctrl-names = "default";
326 pinctrl-0 = <&pinctrl_usdhc4>;
327 vmmc-supply = <&reg_3p3v>;
328 non-removable;
329 status = "okay";
330};
331
332&iomuxc {
333 pinctrl-names = "default";
334
335 imx6-riotboard {
336 pinctrl_audmux: audmuxgrp {
337 fsl,pins = <
338 MX6QDL_PAD_CSI0_DAT7__AUD3_RXD 0x8000000
339 MX6QDL_PAD_CSI0_DAT4__AUD3_TXC 0x8000000
340 MX6QDL_PAD_CSI0_DAT5__AUD3_TXD 0x8000000
341 MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS 0x8000000
342 MX6QDL_PAD_GPIO_0__CCM_CLKO1 0x130b0 /* CAM_MCLK */
343 >;
344 };
345
346 pinctrl_ecspi1: ecspi1grp {
347 fsl,pins = <
348 MX6QDL_PAD_EIM_D16__ECSPI1_SCLK 0x100b1
349 MX6QDL_PAD_EIM_D17__ECSPI1_MISO 0x100b1
350 MX6QDL_PAD_EIM_D18__ECSPI1_MOSI 0x100b1
351 MX6QDL_PAD_DISP0_DAT23__GPIO5_IO17 0x000b1 /* CS0 */
352 >;
353 };
354
355 pinctrl_ecspi2: ecspi2grp {
356 fsl,pins = <
357 MX6QDL_PAD_DISP0_DAT15__GPIO5_IO09 0x000b1 /* CS1 */
358 MX6QDL_PAD_DISP0_DAT16__ECSPI2_MOSI 0x100b1
359 MX6QDL_PAD_DISP0_DAT17__ECSPI2_MISO 0x100b1
360 MX6QDL_PAD_DISP0_DAT18__GPIO5_IO12 0x000b1 /* CS0 */
361 MX6QDL_PAD_DISP0_DAT19__ECSPI2_SCLK 0x100b1
362 >;
363 };
364
365 pinctrl_ecspi3: ecspi3grp {
366 fsl,pins = <
367 MX6QDL_PAD_DISP0_DAT0__ECSPI3_SCLK 0x100b1
368 MX6QDL_PAD_DISP0_DAT1__ECSPI3_MOSI 0x100b1
369 MX6QDL_PAD_DISP0_DAT2__ECSPI3_MISO 0x100b1
370 MX6QDL_PAD_DISP0_DAT3__GPIO4_IO24 0x000b1 /* CS0 */
371 MX6QDL_PAD_DISP0_DAT4__GPIO4_IO25 0x000b1 /* CS1 */
372 >;
373 };
374
375 pinctrl_enet: enetgrp {
376 fsl,pins = <
377 MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0
378 MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0
379 MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x80000000
380 MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0
381 MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0
382 MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0
383 MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0
384 MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0
385 MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x0a0b1 /* AR8035 CLK_25M --> ENET_REF_CLK (V22) */
386 MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0 /* AR8035 pin strapping: IO voltage: pull up */
387 MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x130b0 /* AR8035 pin strapping: PHYADDR#0: pull down */
388 MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x130b0 /* AR8035 pin strapping: PHYADDR#1: pull down */
389 MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0 /* AR8035 pin strapping: MODE#1: pull up */
390 MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0 /* AR8035 pin strapping: MODE#3: pull up */
391 MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x130b0 /* AR8035 pin strapping: MODE#0: pull down */
392 MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0xc0000000 /* GPIO16 -> AR8035 25MHz */
393 MX6QDL_PAD_EIM_D31__GPIO3_IO31 0x130b0 /* RGMII_nRST */
394 MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28 0x80000000 /* AR8035 interrupt */
395 MX6QDL_PAD_GPIO_6__ENET_IRQ 0x000b1
396 >;
397 };
398
399 pinctrl_i2c1: i2c1grp {
400 fsl,pins = <
401 MX6QDL_PAD_CSI0_DAT8__I2C1_SDA 0x4001b8b1
402 MX6QDL_PAD_CSI0_DAT9__I2C1_SCL 0x4001b8b1
403 >;
404 };
405
406 pinctrl_i2c2: i2c2grp {
407 fsl,pins = <
408 MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
409 MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
410 >;
411 };
412
413 pinctrl_i2c3: i2c3grp {
414 fsl,pins = <
415 MX6QDL_PAD_GPIO_5__I2C3_SCL 0x4001b8b1
416 MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1
417 >;
418 };
419
420 pinctrl_i2c4: i2c4grp {
421 fsl,pins = <
422 MX6QDL_PAD_GPIO_7__I2C4_SCL 0x4001b8b1
423 MX6QDL_PAD_GPIO_8__I2C4_SDA 0x4001b8b1
424 >;
425 };
426
427 pinctrl_led: ledgrp {
428 fsl,pins = <
429 MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x80000000 /* user led0 */
430 MX6QDL_PAD_EIM_D28__GPIO3_IO28 0x80000000 /* user led1 */
431 >;
432 };
433
434 pinctrl_pwm1: pwm1grp {
435 fsl,pins = <
436 MX6QDL_PAD_DISP0_DAT8__PWM1_OUT 0x1b0b1
437 >;
438 };
439
440 pinctrl_pwm2: pwm2grp {
441 fsl,pins = <
442 MX6QDL_PAD_DISP0_DAT9__PWM2_OUT 0x1b0b1
443 >;
444 };
445
446 pinctrl_pwm3: pwm3grp {
447 fsl,pins = <
448 MX6QDL_PAD_SD1_DAT1__PWM3_OUT 0x1b0b1
449 >;
450 };
451
452 pinctrl_pwm4: pwm4grp {
453 fsl,pins = <
454 MX6QDL_PAD_SD1_CMD__PWM4_OUT 0x1b0b1
455 >;
456 };
457
458 pinctrl_uart1: uart1grp {
459 fsl,pins = <
460 MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA 0x1b0b1
461 MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA 0x1b0b1
462 >;
463 };
464
465 pinctrl_uart2: uart2grp {
466 fsl,pins = <
467 MX6QDL_PAD_EIM_D26__UART2_TX_DATA 0x1b0b1
468 MX6QDL_PAD_EIM_D27__UART2_RX_DATA 0x1b0b1
469 >;
470 };
471
472 pinctrl_uart3: uart3grp {
473 fsl,pins = <
474 MX6QDL_PAD_EIM_D24__UART3_TX_DATA 0x1b0b1
475 MX6QDL_PAD_EIM_D25__UART3_RX_DATA 0x1b0b1
476 >;
477 };
478
479 pinctrl_uart4: uart4grp {
480 fsl,pins = <
481 MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1
482 MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1
483 >;
484 };
485
486 pinctrl_uart5: uart5grp {
487 fsl,pins = <
488 MX6QDL_PAD_KEY_COL1__UART5_TX_DATA 0x1b0b1
489 MX6QDL_PAD_KEY_ROW1__UART5_RX_DATA 0x1b0b1
490 >;
491 };
492
493 pinctrl_usbotg: usbotggrp {
494 fsl,pins = <
495 MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059
496 MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x80000000 /* MX6QDL_PAD_EIM_D22__USB_OTG_PWR */
497 MX6QDL_PAD_EIM_D21__USB_OTG_OC 0x80000000
498 >;
499 };
500
501 pinctrl_usdhc2: usdhc2grp {
502 fsl,pins = <
503 MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17059
504 MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10059
505 MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059
506 MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
507 MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
508 MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17059
509 MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x80000000 /* SD2 CD */
510 MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x80000000 /* SD2 WP */
511 >;
512 };
513
514 pinctrl_usdhc3: usdhc3grp {
515 fsl,pins = <
516 MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059
517 MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059
518 MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059
519 MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
520 MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
521 MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
522 MX6QDL_PAD_SD3_DAT5__GPIO7_IO00 0x80000000 /* SD3 CD */
523 MX6QDL_PAD_SD3_DAT4__GPIO7_IO01 0x80000000 /* SD3 WP */
524 >;
525 };
526
527 pinctrl_usdhc4: usdhc4grp {
528 fsl,pins = <
529 MX6QDL_PAD_SD4_CMD__SD4_CMD 0x17059
530 MX6QDL_PAD_SD4_CLK__SD4_CLK 0x10059
531 MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17059
532 MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17059
533 MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17059
534 MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x17059
535 MX6QDL_PAD_NANDF_ALE__GPIO6_IO08 0x80000000 /* SD4 RST (eMMC) */
536 >;
537 };
538 };
539};
diff --git a/arch/arm/boot/dts/imx6dl.dtsi b/arch/arm/boot/dts/imx6dl.dtsi
index 5c5f574330f9..0a9c49d69d41 100644
--- a/arch/arm/boot/dts/imx6dl.dtsi
+++ b/arch/arm/boot/dts/imx6dl.dtsi
@@ -84,9 +84,10 @@
84 i2c4: i2c@021f8000 { 84 i2c4: i2c@021f8000 {
85 #address-cells = <1>; 85 #address-cells = <1>;
86 #size-cells = <0>; 86 #size-cells = <0>;
87 compatible = "fsl,imx1-i2c"; 87 compatible = "fsl,imx6q-i2c", "fsl,imx21-i2c";
88 reg = <0x021f8000 0x4000>; 88 reg = <0x021f8000 0x4000>;
89 interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>; 89 interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>;
90 clocks = <&clks 116>;
90 status = "disabled"; 91 status = "disabled";
91 }; 92 };
92 }; 93 };
diff --git a/arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts b/arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts
index e4ae38fd0269..e0302636aff5 100644
--- a/arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts
+++ b/arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts
@@ -18,6 +18,10 @@
18 model = "Data Modul eDM-QMX6 Board"; 18 model = "Data Modul eDM-QMX6 Board";
19 compatible = "dmo,imx6q-edmqmx6", "fsl,imx6q"; 19 compatible = "dmo,imx6q-edmqmx6", "fsl,imx6q";
20 20
21 chosen {
22 stdout-path = &uart2;
23 };
24
21 aliases { 25 aliases {
22 gpio7 = &stmpe_gpio1; 26 gpio7 = &stmpe_gpio1;
23 gpio8 = &stmpe_gpio2; 27 gpio8 = &stmpe_gpio2;
@@ -91,6 +95,20 @@
91 }; 95 };
92}; 96};
93 97
98&ecspi5 {
99 pinctrl-names = "default";
100 pinctrl-0 = <&pinctrl_ecspi5>;
101 fsl,spi-num-chipselects = <1>;
102 cs-gpios = <&gpio1 12 0>;
103 status = "okay";
104
105 flash: m25p80@0 {
106 compatible = "m25p80";
107 spi-max-frequency = <40000000>;
108 reg = <0>;
109 };
110};
111
94&fec { 112&fec {
95 pinctrl-names = "default"; 113 pinctrl-names = "default";
96 pinctrl-0 = <&pinctrl_enet>; 114 pinctrl-0 = <&pinctrl_enet>;
@@ -105,7 +123,8 @@
105 pinctrl-names = "default"; 123 pinctrl-names = "default";
106 pinctrl-0 = <&pinctrl_i2c2 124 pinctrl-0 = <&pinctrl_i2c2
107 &pinctrl_stmpe1 125 &pinctrl_stmpe1
108 &pinctrl_stmpe2>; 126 &pinctrl_stmpe2
127 &pinctrl_pfuze>;
109 status = "okay"; 128 status = "okay";
110 129
111 pmic: pfuze100@08 { 130 pmic: pfuze100@08 {
@@ -216,6 +235,8 @@
216 reg = <0x40>; 235 reg = <0x40>;
217 interrupts = <30 0>; 236 interrupts = <30 0>;
218 interrupt-parent = <&gpio3>; 237 interrupt-parent = <&gpio3>;
238 vcc-supply = <&sw2_reg>;
239 vio-supply = <&sw2_reg>;
219 240
220 stmpe_gpio1: stmpe_gpio { 241 stmpe_gpio1: stmpe_gpio {
221 #gpio-cells = <2>; 242 #gpio-cells = <2>;
@@ -228,6 +249,8 @@
228 reg = <0x44>; 249 reg = <0x44>;
229 interrupts = <2 0>; 250 interrupts = <2 0>;
230 interrupt-parent = <&gpio5>; 251 interrupt-parent = <&gpio5>;
252 vcc-supply = <&sw2_reg>;
253 vio-supply = <&sw2_reg>;
231 254
232 stmpe_gpio2: stmpe_gpio { 255 stmpe_gpio2: stmpe_gpio {
233 #gpio-cells = <2>; 256 #gpio-cells = <2>;
@@ -263,6 +286,15 @@
263 >; 286 >;
264 }; 287 };
265 288
289 pinctrl_ecspi5: ecspi5rp-1 {
290 fsl,pins = <
291 MX6QDL_PAD_SD1_DAT0__ECSPI5_MISO 0x80000000
292 MX6QDL_PAD_SD1_CMD__ECSPI5_MOSI 0x80000000
293 MX6QDL_PAD_SD1_CLK__ECSPI5_SCLK 0x80000000
294 MX6QDL_PAD_SD2_DAT3__GPIO1_IO12 0x80000000
295 >;
296 };
297
266 pinctrl_enet: enetgrp { 298 pinctrl_enet: enetgrp {
267 fsl,pins = < 299 fsl,pins = <
268 MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0 300 MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0
@@ -291,6 +323,12 @@
291 >; 323 >;
292 }; 324 };
293 325
326 pinctrl_pfuze: pfuze100grp1 {
327 fsl,pins = <
328 MX6QDL_PAD_EIM_D20__GPIO3_IO20 0x80000000
329 >;
330 };
331
294 pinctrl_stmpe1: stmpe1grp { 332 pinctrl_stmpe1: stmpe1grp {
295 fsl,pins = <MX6QDL_PAD_EIM_D30__GPIO3_IO30 0x80000000>; 333 fsl,pins = <MX6QDL_PAD_EIM_D30__GPIO3_IO30 0x80000000>;
296 }; 334 };
diff --git a/arch/arm/boot/dts/imx6q-gk802.dts b/arch/arm/boot/dts/imx6q-gk802.dts
index 4a9b4dc9afc0..703539cf36d3 100644
--- a/arch/arm/boot/dts/imx6q-gk802.dts
+++ b/arch/arm/boot/dts/imx6q-gk802.dts
@@ -14,7 +14,7 @@
14 compatible = "zealz,imx6q-gk802", "fsl,imx6q"; 14 compatible = "zealz,imx6q-gk802", "fsl,imx6q";
15 15
16 chosen { 16 chosen {
17 linux,stdout-path = &uart4; 17 stdout-path = &uart4;
18 }; 18 };
19 19
20 memory { 20 memory {
@@ -48,6 +48,11 @@
48 }; 48 };
49}; 49};
50 50
51&hdmi {
52 ddc-i2c-bus = <&i2c3>;
53 status = "okay";
54};
55
51/* Internal I2C */ 56/* Internal I2C */
52&i2c2 { 57&i2c2 {
53 pinctrl-names = "default"; 58 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/imx6q-gw5400-a.dts b/arch/arm/boot/dts/imx6q-gw5400-a.dts
index e51bb3f0fd56..3689eaa58826 100644
--- a/arch/arm/boot/dts/imx6q-gw5400-a.dts
+++ b/arch/arm/boot/dts/imx6q-gw5400-a.dts
@@ -157,6 +157,11 @@
157 status = "okay"; 157 status = "okay";
158}; 158};
159 159
160&hdmi {
161 ddc-i2c-bus = <&i2c3>;
162 status = "okay";
163};
164
160&i2c1 { 165&i2c1 {
161 clock-frequency = <100000>; 166 clock-frequency = <100000>;
162 pinctrl-names = "default"; 167 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/imx6q-phytec-pbab01.dts b/arch/arm/boot/dts/imx6q-phytec-pbab01.dts
index 5607c331fca8..c139ac0ebe15 100644
--- a/arch/arm/boot/dts/imx6q-phytec-pbab01.dts
+++ b/arch/arm/boot/dts/imx6q-phytec-pbab01.dts
@@ -11,40 +11,17 @@
11 11
12/dts-v1/; 12/dts-v1/;
13#include "imx6q-phytec-pfla02.dtsi" 13#include "imx6q-phytec-pfla02.dtsi"
14#include "imx6qdl-phytec-pbab01.dtsi"
14 15
15/ { 16/ {
16 model = "Phytec phyFLEX-i.MX6 Quad Carrier-Board"; 17 model = "Phytec phyFLEX-i.MX6 Quad Carrier-Board";
17 compatible = "phytec,imx6q-pbab01", "phytec,imx6q-pfla02", "fsl,imx6q"; 18 compatible = "phytec,imx6q-pbab01", "phytec,imx6q-pfla02", "fsl,imx6q";
18};
19
20&fec {
21 status = "okay";
22};
23 19
24&gpmi { 20 chosen {
25 status = "okay"; 21 stdout-path = &uart4;
22 };
26}; 23};
27 24
28&sata { 25&sata {
29 status = "okay"; 26 status = "okay";
30};
31
32&uart4 {
33 status = "okay";
34};
35
36&usbh1 {
37 status = "okay";
38};
39
40&usbotg {
41 status = "okay";
42};
43
44&usdhc2 {
45 status = "okay";
46};
47
48&usdhc3 {
49 status = "okay";
50}; 27};
diff --git a/arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi b/arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi
index 324f1550976b..cd20d0a948de 100644
--- a/arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi
+++ b/arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi
@@ -10,316 +10,13 @@
10 */ 10 */
11 11
12#include "imx6q.dtsi" 12#include "imx6q.dtsi"
13#include "imx6qdl-phytec-pfla02.dtsi"
13 14
14/ { 15/ {
15 model = "Phytec phyFLEX-i.MX6 Ouad"; 16 model = "Phytec phyFLEX-i.MX6 Quad";
16 compatible = "phytec,imx6q-pfla02", "fsl,imx6q"; 17 compatible = "phytec,imx6q-pfla02", "fsl,imx6q";
17 18
18 memory { 19 memory {
19 reg = <0x10000000 0x80000000>; 20 reg = <0x10000000 0x80000000>;
20 }; 21 };
21
22 regulators {
23 compatible = "simple-bus";
24 #address-cells = <1>;
25 #size-cells = <0>;
26
27 reg_usb_otg_vbus: regulator@0 {
28 compatible = "regulator-fixed";
29 reg = <0>;
30 regulator-name = "usb_otg_vbus";
31 regulator-min-microvolt = <5000000>;
32 regulator-max-microvolt = <5000000>;
33 gpio = <&gpio4 15 0>;
34 };
35
36 reg_usb_h1_vbus: regulator@1 {
37 compatible = "regulator-fixed";
38 reg = <1>;
39 regulator-name = "usb_h1_vbus";
40 regulator-min-microvolt = <5000000>;
41 regulator-max-microvolt = <5000000>;
42 gpio = <&gpio1 0 0>;
43 };
44 };
45};
46
47&ecspi3 {
48 pinctrl-names = "default";
49 pinctrl-0 = <&pinctrl_ecspi3>;
50 status = "okay";
51 fsl,spi-num-chipselects = <1>;
52 cs-gpios = <&gpio4 24 0>;
53
54 flash@0 {
55 compatible = "m25p80";
56 spi-max-frequency = <20000000>;
57 reg = <0>;
58 };
59};
60
61&i2c1 {
62 pinctrl-names = "default";
63 pinctrl-0 = <&pinctrl_i2c1>;
64 status = "okay";
65
66 eeprom@50 {
67 compatible = "atmel,24c32";
68 reg = <0x50>;
69 };
70
71 pmic@58 {
72 compatible = "dialog,da9063";
73 reg = <0x58>;
74 interrupt-parent = <&gpio4>;
75 interrupts = <17 0x8>; /* active-low GPIO4_17 */
76
77 regulators {
78 vddcore_reg: bcore1 {
79 regulator-min-microvolt = <730000>;
80 regulator-max-microvolt = <1380000>;
81 regulator-always-on;
82 };
83
84 vddsoc_reg: bcore2 {
85 regulator-min-microvolt = <730000>;
86 regulator-max-microvolt = <1380000>;
87 regulator-always-on;
88 };
89
90 vdd_ddr3_reg: bpro {
91 regulator-min-microvolt = <1500000>;
92 regulator-max-microvolt = <1500000>;
93 regulator-always-on;
94 };
95
96 vdd_3v3_reg: bperi {
97 regulator-min-microvolt = <3300000>;
98 regulator-max-microvolt = <3300000>;
99 regulator-always-on;
100 };
101
102 vdd_buckmem_reg: bmem {
103 regulator-min-microvolt = <3300000>;
104 regulator-max-microvolt = <3300000>;
105 regulator-always-on;
106 };
107
108 vdd_eth_reg: bio {
109 regulator-min-microvolt = <1200000>;
110 regulator-max-microvolt = <1200000>;
111 regulator-always-on;
112 };
113
114 vdd_eth_io_reg: ldo4 {
115 regulator-min-microvolt = <2500000>;
116 regulator-max-microvolt = <2500000>;
117 regulator-always-on;
118 };
119
120 vdd_mx6_snvs_reg: ldo5 {
121 regulator-min-microvolt = <3000000>;
122 regulator-max-microvolt = <3000000>;
123 regulator-always-on;
124 };
125
126 vdd_3v3_pmic_io_reg: ldo6 {
127 regulator-min-microvolt = <3300000>;
128 regulator-max-microvolt = <3300000>;
129 regulator-always-on;
130 };
131
132 vdd_sd0_reg: ldo9 {
133 regulator-min-microvolt = <3300000>;
134 regulator-max-microvolt = <3300000>;
135 };
136
137 vdd_sd1_reg: ldo10 {
138 regulator-min-microvolt = <3300000>;
139 regulator-max-microvolt = <3300000>;
140 };
141
142 vdd_mx6_high_reg: ldo11 {
143 regulator-min-microvolt = <3000000>;
144 regulator-max-microvolt = <3000000>;
145 regulator-always-on;
146 };
147 };
148 };
149};
150
151&iomuxc {
152 pinctrl-names = "default";
153 pinctrl-0 = <&pinctrl_hog>;
154
155 imx6q-phytec-pfla02 {
156 pinctrl_hog: hoggrp {
157 fsl,pins = <
158 MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000
159 MX6QDL_PAD_DISP0_DAT3__GPIO4_IO24 0x80000000 /* SPI NOR chipselect */
160 MX6QDL_PAD_DI0_PIN15__GPIO4_IO17 0x80000000 /* PMIC interrupt */
161 >;
162 };
163
164 pinctrl_ecspi3: ecspi3grp {
165 fsl,pins = <
166 MX6QDL_PAD_DISP0_DAT2__ECSPI3_MISO 0x100b1
167 MX6QDL_PAD_DISP0_DAT1__ECSPI3_MOSI 0x100b1
168 MX6QDL_PAD_DISP0_DAT0__ECSPI3_SCLK 0x100b1
169 >;
170 };
171
172 pinctrl_enet: enetgrp {
173 fsl,pins = <
174 MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0
175 MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0
176 MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0
177 MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0
178 MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0
179 MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0
180 MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0
181 MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0
182 MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0
183 MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0
184 MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0
185 MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0
186 MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0
187 MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0
188 MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0
189 MX6QDL_PAD_ENET_TX_EN__ENET_TX_EN 0x1b0b0
190 >;
191 };
192
193 pinctrl_gpmi_nand: gpminandgrp {
194 fsl,pins = <
195 MX6QDL_PAD_NANDF_CLE__NAND_CLE 0xb0b1
196 MX6QDL_PAD_NANDF_ALE__NAND_ALE 0xb0b1
197 MX6QDL_PAD_NANDF_WP_B__NAND_WP_B 0xb0b1
198 MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb000
199 MX6QDL_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1
200 MX6QDL_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1
201 MX6QDL_PAD_SD4_CMD__NAND_RE_B 0xb0b1
202 MX6QDL_PAD_SD4_CLK__NAND_WE_B 0xb0b1
203 MX6QDL_PAD_NANDF_D0__NAND_DATA00 0xb0b1
204 MX6QDL_PAD_NANDF_D1__NAND_DATA01 0xb0b1
205 MX6QDL_PAD_NANDF_D2__NAND_DATA02 0xb0b1
206 MX6QDL_PAD_NANDF_D3__NAND_DATA03 0xb0b1
207 MX6QDL_PAD_NANDF_D4__NAND_DATA04 0xb0b1
208 MX6QDL_PAD_NANDF_D5__NAND_DATA05 0xb0b1
209 MX6QDL_PAD_NANDF_D6__NAND_DATA06 0xb0b1
210 MX6QDL_PAD_NANDF_D7__NAND_DATA07 0xb0b1
211 MX6QDL_PAD_SD4_DAT0__NAND_DQS 0x00b1
212 >;
213 };
214
215 pinctrl_i2c1: i2c1grp {
216 fsl,pins = <
217 MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
218 MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
219 >;
220 };
221
222 pinctrl_uart4: uart4grp {
223 fsl,pins = <
224 MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1
225 MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1
226 >;
227 };
228
229 pinctrl_usbh1: usbh1grp {
230 fsl,pins = <
231 MX6QDL_PAD_GPIO_0__USB_H1_PWR 0x80000000
232 >;
233 };
234
235 pinctrl_usbotg: usbotggrp {
236 fsl,pins = <
237 MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x17059
238 MX6QDL_PAD_KEY_COL4__USB_OTG_OC 0x1b0b0
239 MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x80000000
240 >;
241 };
242
243 pinctrl_usdhc2: usdhc2grp {
244 fsl,pins = <
245 MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17059
246 MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10059
247 MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059
248 MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
249 MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
250 MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17059
251 >;
252 };
253
254 pinctrl_usdhc3: usdhc3grp {
255 fsl,pins = <
256 MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059
257 MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059
258 MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059
259 MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
260 MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
261 MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
262 >;
263 };
264
265 pinctrl_usdhc3_cdwp: usdhc3cdwp {
266 fsl,pins = <
267 MX6QDL_PAD_ENET_RXD0__GPIO1_IO27 0x80000000
268 MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x80000000
269 >;
270 };
271 };
272};
273
274&fec {
275 pinctrl-names = "default";
276 pinctrl-0 = <&pinctrl_enet>;
277 phy-mode = "rgmii";
278 phy-reset-gpios = <&gpio3 23 0>;
279 status = "disabled";
280};
281
282&gpmi {
283 pinctrl-names = "default";
284 pinctrl-0 = <&pinctrl_gpmi_nand>;
285 nand-on-flash-bbt;
286 status = "disabled";
287};
288
289&uart4 {
290 pinctrl-names = "default";
291 pinctrl-0 = <&pinctrl_uart4>;
292 status = "disabled";
293};
294
295&usbh1 {
296 vbus-supply = <&reg_usb_h1_vbus>;
297 pinctrl-names = "default";
298 pinctrl-0 = <&pinctrl_usbh1>;
299 status = "disabled";
300};
301
302&usbotg {
303 vbus-supply = <&reg_usb_otg_vbus>;
304 pinctrl-names = "default";
305 pinctrl-0 = <&pinctrl_usbotg>;
306 disable-over-current;
307 status = "disabled";
308};
309
310&usdhc2 {
311 pinctrl-names = "default";
312 pinctrl-0 = <&pinctrl_usdhc2>;
313 cd-gpios = <&gpio1 4 0>;
314 wp-gpios = <&gpio1 2 0>;
315 status = "disabled";
316};
317
318&usdhc3 {
319 pinctrl-names = "default";
320 pinctrl-0 = <&pinctrl_usdhc3
321 &pinctrl_usdhc3_cdwp>;
322 cd-gpios = <&gpio1 27 0>;
323 wp-gpios = <&gpio1 29 0>;
324 status = "disabled";
325}; 22};
diff --git a/arch/arm/boot/dts/imx6q-udoo.dts b/arch/arm/boot/dts/imx6q-udoo.dts
index ed397d149ab6..6c561060bf5c 100644
--- a/arch/arm/boot/dts/imx6q-udoo.dts
+++ b/arch/arm/boot/dts/imx6q-udoo.dts
@@ -16,6 +16,10 @@
16 model = "Udoo i.MX6 Quad Board"; 16 model = "Udoo i.MX6 Quad Board";
17 compatible = "udoo,imx6q-udoo", "fsl,imx6q"; 17 compatible = "udoo,imx6q-udoo", "fsl,imx6q";
18 18
19 chosen {
20 stdout-path = &uart2;
21 };
22
19 memory { 23 memory {
20 reg = <0x10000000 0x40000000>; 24 reg = <0x10000000 0x40000000>;
21 }; 25 };
@@ -28,6 +32,18 @@
28 status = "okay"; 32 status = "okay";
29}; 33};
30 34
35&hdmi {
36 ddc-i2c-bus = <&i2c2>;
37 status = "okay";
38};
39
40&i2c2 {
41 clock-frequency = <100000>;
42 pinctrl-names = "default";
43 pinctrl-0 = <&pinctrl_i2c2>;
44 status = "okay";
45};
46
31&iomuxc { 47&iomuxc {
32 imx6q-udoo { 48 imx6q-udoo {
33 pinctrl_enet: enetgrp { 49 pinctrl_enet: enetgrp {
@@ -51,6 +67,13 @@
51 >; 67 >;
52 }; 68 };
53 69
70 pinctrl_i2c2: i2c2grp {
71 fsl,pins = <
72 MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
73 MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
74 >;
75 };
76
54 pinctrl_uart2: uart2grp { 77 pinctrl_uart2: uart2grp {
55 fsl,pins = < 78 fsl,pins = <
56 MX6QDL_PAD_EIM_D26__UART2_TX_DATA 0x1b0b1 79 MX6QDL_PAD_EIM_D26__UART2_TX_DATA 0x1b0b1
diff --git a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
index c2a24888a276..25da82a03110 100644
--- a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
@@ -55,6 +55,20 @@
55 }; 55 };
56}; 56};
57 57
58&hdmi {
59 pinctrl-names = "default";
60 pinctrl-0 = <&pinctrl_cubox_i_hdmi>;
61 ddc-i2c-bus = <&i2c2>;
62 status = "okay";
63};
64
65&i2c2 {
66 clock-frequency = <100000>;
67 pinctrl-names = "default";
68 pinctrl-0 = <&pinctrl_cubox_i_i2c2>;
69 status = "okay";
70};
71
58&i2c3 { 72&i2c3 {
59 pinctrl-names = "default"; 73 pinctrl-names = "default";
60 pinctrl-0 = <&pinctrl_cubox_i_i2c3>; 74 pinctrl-0 = <&pinctrl_cubox_i_i2c3>;
@@ -69,6 +83,19 @@
69 83
70&iomuxc { 84&iomuxc {
71 cubox_i { 85 cubox_i {
86 pinctrl_cubox_i_hdmi: cubox-i-hdmi {
87 fsl,pins = <
88 MX6QDL_PAD_KEY_ROW2__HDMI_TX_CEC_LINE 0x1f8b0
89 >;
90 };
91
92 pinctrl_cubox_i_i2c2: cubox-i-i2c2 {
93 fsl,pins = <
94 MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
95 MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
96 >;
97 };
98
72 pinctrl_cubox_i_i2c3: cubox-i-i2c3 { 99 pinctrl_cubox_i_i2c3: cubox-i-i2c3 {
73 fsl,pins = < 100 fsl,pins = <
74 MX6QDL_PAD_EIM_D17__I2C3_SCL 0x4001b8b1 101 MX6QDL_PAD_EIM_D17__I2C3_SCL 0x4001b8b1
diff --git a/arch/arm/boot/dts/imx6qdl-dfi-fs700-m60.dtsi b/arch/arm/boot/dts/imx6qdl-dfi-fs700-m60.dtsi
index 25cf035dd36e..2c253d6d20bd 100644
--- a/arch/arm/boot/dts/imx6qdl-dfi-fs700-m60.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-dfi-fs700-m60.dtsi
@@ -22,7 +22,7 @@
22 }; 22 };
23 23
24 chosen { 24 chosen {
25 linux,stdout-path = &uart1; 25 stdout-path = &uart1;
26 }; 26 };
27}; 27};
28 28
diff --git a/arch/arm/boot/dts/imx6qdl-gw51xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw51xx.dtsi
index 98a422153ce7..31665adcbf39 100644
--- a/arch/arm/boot/dts/imx6qdl-gw51xx.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw51xx.dtsi
@@ -101,6 +101,11 @@
101 status = "okay"; 101 status = "okay";
102}; 102};
103 103
104&hdmi {
105 ddc-i2c-bus = <&i2c3>;
106 status = "okay";
107};
108
104&i2c1 { 109&i2c1 {
105 clock-frequency = <100000>; 110 clock-frequency = <100000>;
106 pinctrl-names = "default"; 111 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
index 035d3a85c318..367af3ec9435 100644
--- a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
@@ -27,6 +27,13 @@
27 bootargs = "console=ttymxc1,115200"; 27 bootargs = "console=ttymxc1,115200";
28 }; 28 };
29 29
30 backlight {
31 compatible = "pwm-backlight";
32 pwms = <&pwm4 0 5000000>;
33 brightness-levels = <0 4 8 16 32 64 128 255>;
34 default-brightness-level = <7>;
35 };
36
30 leds { 37 leds {
31 compatible = "gpio-leds"; 38 compatible = "gpio-leds";
32 39
@@ -148,6 +155,11 @@
148 status = "okay"; 155 status = "okay";
149}; 156};
150 157
158&hdmi {
159 ddc-i2c-bus = <&i2c3>;
160 status = "okay";
161};
162
151&i2c1 { 163&i2c1 {
152 clock-frequency = <100000>; 164 clock-frequency = <100000>;
153 pinctrl-names = "default"; 165 pinctrl-names = "default";
@@ -394,6 +406,12 @@
394 >; 406 >;
395 }; 407 };
396 408
409 pinctrl_pwm4: pwm4grp {
410 fsl,pins = <
411 MX6QDL_PAD_SD1_CMD__PWM4_OUT 0x1b0b1
412 >;
413 };
414
397 pinctrl_uart1: uart1grp { 415 pinctrl_uart1: uart1grp {
398 fsl,pins = < 416 fsl,pins = <
399 MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1 417 MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1
@@ -436,6 +454,27 @@
436 454
437&ldb { 455&ldb {
438 status = "okay"; 456 status = "okay";
457
458 lvds-channel@0 {
459 fsl,data-mapping = "spwg";
460 fsl,data-width = <18>;
461 status = "okay";
462
463 display-timings {
464 native-mode = <&timing0>;
465 timing0: hsd100pxn1 {
466 clock-frequency = <65000000>;
467 hactive = <1024>;
468 vactive = <768>;
469 hback-porch = <220>;
470 hfront-porch = <40>;
471 vback-porch = <21>;
472 vfront-porch = <7>;
473 hsync-len = <60>;
474 vsync-len = <10>;
475 };
476 };
477 };
439}; 478};
440 479
441&pcie { 480&pcie {
@@ -443,6 +482,12 @@
443 status = "okay"; 482 status = "okay";
444}; 483};
445 484
485&pwm4 {
486 pinctrl-names = "default";
487 pinctrl-0 = <&pinctrl_pwm4>;
488 status = "okay";
489};
490
446&ssi1 { 491&ssi1 {
447 fsl,mode = "i2s-slave"; 492 fsl,mode = "i2s-slave";
448 status = "okay"; 493 status = "okay";
diff --git a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
index c8e5ae06deaf..c91b5a6c769b 100644
--- a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
@@ -30,6 +30,13 @@
30 bootargs = "console=ttymxc1,115200"; 30 bootargs = "console=ttymxc1,115200";
31 }; 31 };
32 32
33 backlight {
34 compatible = "pwm-backlight";
35 pwms = <&pwm4 0 5000000>;
36 brightness-levels = <0 4 8 16 32 64 128 255>;
37 default-brightness-level = <7>;
38 };
39
33 leds { 40 leds {
34 compatible = "gpio-leds"; 41 compatible = "gpio-leds";
35 42
@@ -157,6 +164,11 @@
157 status = "okay"; 164 status = "okay";
158}; 165};
159 166
167&hdmi {
168 ddc-i2c-bus = <&i2c3>;
169 status = "okay";
170};
171
160&i2c1 { 172&i2c1 {
161 clock-frequency = <100000>; 173 clock-frequency = <100000>;
162 pinctrl-names = "default"; 174 pinctrl-names = "default";
@@ -434,6 +446,12 @@
434 >; 446 >;
435 }; 447 };
436 448
449 pinctrl_pwm4: pwm4grp {
450 fsl,pins = <
451 MX6QDL_PAD_SD1_CMD__PWM4_OUT 0x1b0b1
452 >;
453 };
454
437 pinctrl_uart1: uart1grp { 455 pinctrl_uart1: uart1grp {
438 fsl,pins = < 456 fsl,pins = <
439 MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1 457 MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1
@@ -508,6 +526,12 @@
508 }; 526 };
509}; 527};
510 528
529&pwm4 {
530 pinctrl-names = "default";
531 pinctrl-0 = <&pinctrl_pwm4>;
532 status = "okay";
533};
534
511&ssi1 { 535&ssi1 {
512 fsl,mode = "i2s-slave"; 536 fsl,mode = "i2s-slave";
513 status = "okay"; 537 status = "okay";
diff --git a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
index 2795dfc8c926..698d3063b295 100644
--- a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
@@ -30,6 +30,13 @@
30 bootargs = "console=ttymxc1,115200"; 30 bootargs = "console=ttymxc1,115200";
31 }; 31 };
32 32
33 backlight {
34 compatible = "pwm-backlight";
35 pwms = <&pwm4 0 5000000>;
36 brightness-levels = <0 4 8 16 32 64 128 255>;
37 default-brightness-level = <7>;
38 };
39
33 leds { 40 leds {
34 compatible = "gpio-leds"; 41 compatible = "gpio-leds";
35 42
@@ -147,6 +154,11 @@
147 status = "okay"; 154 status = "okay";
148}; 155};
149 156
157&hdmi {
158 ddc-i2c-bus = <&i2c3>;
159 status = "okay";
160};
161
150&i2c1 { 162&i2c1 {
151 clock-frequency = <100000>; 163 clock-frequency = <100000>;
152 pinctrl-names = "default"; 164 pinctrl-names = "default";
@@ -456,6 +468,12 @@
456 >; 468 >;
457 }; 469 };
458 470
471 pinctrl_pwm4: pwm4grp {
472 fsl,pins = <
473 MX6QDL_PAD_SD1_CMD__PWM4_OUT 0x1b0b1
474 >;
475 };
476
459 pinctrl_uart1: uart1grp { 477 pinctrl_uart1: uart1grp {
460 fsl,pins = < 478 fsl,pins = <
461 MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1 479 MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1
@@ -530,6 +548,12 @@
530 }; 548 };
531}; 549};
532 550
551&pwm4 {
552 pinctrl-names = "default";
553 pinctrl-0 = <&pinctrl_pwm4>;
554 status = "okay";
555};
556
533&ssi1 { 557&ssi1 {
534 fsl,mode = "i2s-slave"; 558 fsl,mode = "i2s-slave";
535 status = "okay"; 559 status = "okay";
diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi
index 99be301b5232..4c4b17596c8b 100644
--- a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi
@@ -14,6 +14,10 @@
14#include <dt-bindings/input/input.h> 14#include <dt-bindings/input/input.h>
15 15
16/ { 16/ {
17 chosen {
18 stdout-path = &uart2;
19 };
20
17 memory { 21 memory {
18 reg = <0x10000000 0x40000000>; 22 reg = <0x10000000 0x40000000>;
19 }; 23 };
diff --git a/arch/arm/boot/dts/imx6qdl-phytec-pbab01.dtsi b/arch/arm/boot/dts/imx6qdl-phytec-pbab01.dtsi
new file mode 100644
index 000000000000..584721264121
--- /dev/null
+++ b/arch/arm/boot/dts/imx6qdl-phytec-pbab01.dtsi
@@ -0,0 +1,102 @@
1/*
2 * Copyright 2013 Christian Hemp, Phytec Messtechnik GmbH
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12/ {
13 chosen {
14 linux,stdout-path = &uart4;
15 };
16};
17
18&fec {
19 status = "okay";
20};
21
22&gpmi {
23 status = "okay";
24};
25
26&hdmi {
27 status = "okay";
28};
29
30&i2c2 {
31 pinctrl-names = "default";
32 pinctrl-0 = <&pinctrl_i2c2>;
33 clock-frequency = <100000>;
34 status = "okay";
35
36 tlv320@18 {
37 compatible = "ti,tlv320aic3x";
38 reg = <0x18>;
39 };
40
41 stmpe@41 {
42 compatible = "st,stmpe811";
43 reg = <0x41>;
44 };
45
46 rtc@51 {
47 compatible = "nxp,rtc8564";
48 reg = <0x51>;
49 };
50
51 adc@64 {
52 compatible = "maxim,max1037";
53 reg = <0x64>;
54 };
55};
56
57&i2c3 {
58 pinctrl-names = "default";
59 pinctrl-0 = <&pinctrl_i2c3>;
60 clock-frequency = <100000>;
61 status = "okay";
62};
63
64&uart3 {
65 status = "okay";
66};
67
68&uart4 {
69 status = "okay";
70};
71
72&usbh1 {
73 status = "okay";
74};
75
76&usbotg {
77 status = "okay";
78};
79
80&usdhc2 {
81 status = "okay";
82};
83
84&usdhc3 {
85 status = "okay";
86};
87
88&iomuxc {
89 pinctrl_i2c2: i2c2grp {
90 fsl,pins = <
91 MX6QDL_PAD_EIM_EB2__I2C2_SCL 0x4001b8b1
92 MX6QDL_PAD_EIM_D16__I2C2_SDA 0x4001b8b1
93 >;
94 };
95
96 pinctrl_i2c3: i2c3grp {
97 fsl,pins = <
98 MX6QDL_PAD_EIM_D17__I2C3_SCL 0x4001b8b1
99 MX6QDL_PAD_EIM_D18__I2C3_SDA 0x4001b8b1
100 >;
101 };
102};
diff --git a/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi b/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi
new file mode 100644
index 000000000000..faa3494a69d4
--- /dev/null
+++ b/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi
@@ -0,0 +1,356 @@
1/*
2 * Copyright 2013 Christian Hemp, Phytec Messtechnik GmbH
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12#include <dt-bindings/gpio/gpio.h>
13
14/ {
15 model = "Phytec phyFLEX-i.MX6 Ouad";
16 compatible = "phytec,imx6q-pfla02", "fsl,imx6q";
17
18 memory {
19 reg = <0x10000000 0x80000000>;
20 };
21
22 regulators {
23 compatible = "simple-bus";
24 #address-cells = <1>;
25 #size-cells = <0>;
26
27 reg_usb_otg_vbus: regulator@0 {
28 compatible = "regulator-fixed";
29 reg = <0>;
30 regulator-name = "usb_otg_vbus";
31 regulator-min-microvolt = <5000000>;
32 regulator-max-microvolt = <5000000>;
33 gpio = <&gpio4 15 0>;
34 };
35
36 reg_usb_h1_vbus: regulator@1 {
37 compatible = "regulator-fixed";
38 reg = <1>;
39 regulator-name = "usb_h1_vbus";
40 regulator-min-microvolt = <5000000>;
41 regulator-max-microvolt = <5000000>;
42 gpio = <&gpio1 0 0>;
43 };
44 };
45
46 gpio_leds: leds {
47 compatible = "gpio-leds";
48
49 green {
50 label = "phyflex:green";
51 gpios = <&gpio1 30 0>;
52 };
53
54 red {
55 label = "phyflex:red";
56 gpios = <&gpio2 31 0>;
57 };
58 };
59};
60
61&ecspi3 {
62 pinctrl-names = "default";
63 pinctrl-0 = <&pinctrl_ecspi3>;
64 status = "okay";
65 fsl,spi-num-chipselects = <1>;
66 cs-gpios = <&gpio4 24 0>;
67
68 flash@0 {
69 compatible = "m25p80";
70 spi-max-frequency = <20000000>;
71 reg = <0>;
72 };
73};
74
75&i2c1 {
76 pinctrl-names = "default";
77 pinctrl-0 = <&pinctrl_i2c1>;
78 status = "okay";
79
80 eeprom@50 {
81 compatible = "atmel,24c32";
82 reg = <0x50>;
83 };
84
85 pmic@58 {
86 compatible = "dialog,da9063";
87 reg = <0x58>;
88 interrupt-parent = <&gpio4>;
89 interrupts = <17 0x8>; /* active-low GPIO4_17 */
90
91 regulators {
92 vddcore_reg: bcore1 {
93 regulator-min-microvolt = <730000>;
94 regulator-max-microvolt = <1380000>;
95 regulator-always-on;
96 };
97
98 vddsoc_reg: bcore2 {
99 regulator-min-microvolt = <730000>;
100 regulator-max-microvolt = <1380000>;
101 regulator-always-on;
102 };
103
104 vdd_ddr3_reg: bpro {
105 regulator-min-microvolt = <1500000>;
106 regulator-max-microvolt = <1500000>;
107 regulator-always-on;
108 };
109
110 vdd_3v3_reg: bperi {
111 regulator-min-microvolt = <3300000>;
112 regulator-max-microvolt = <3300000>;
113 regulator-always-on;
114 };
115
116 vdd_buckmem_reg: bmem {
117 regulator-min-microvolt = <3300000>;
118 regulator-max-microvolt = <3300000>;
119 regulator-always-on;
120 };
121
122 vdd_eth_reg: bio {
123 regulator-min-microvolt = <1200000>;
124 regulator-max-microvolt = <1200000>;
125 regulator-always-on;
126 };
127
128 vdd_eth_io_reg: ldo4 {
129 regulator-min-microvolt = <2500000>;
130 regulator-max-microvolt = <2500000>;
131 regulator-always-on;
132 };
133
134 vdd_mx6_snvs_reg: ldo5 {
135 regulator-min-microvolt = <3000000>;
136 regulator-max-microvolt = <3000000>;
137 regulator-always-on;
138 };
139
140 vdd_3v3_pmic_io_reg: ldo6 {
141 regulator-min-microvolt = <3300000>;
142 regulator-max-microvolt = <3300000>;
143 regulator-always-on;
144 };
145
146 vdd_sd0_reg: ldo9 {
147 regulator-min-microvolt = <3300000>;
148 regulator-max-microvolt = <3300000>;
149 };
150
151 vdd_sd1_reg: ldo10 {
152 regulator-min-microvolt = <3300000>;
153 regulator-max-microvolt = <3300000>;
154 };
155
156 vdd_mx6_high_reg: ldo11 {
157 regulator-min-microvolt = <3000000>;
158 regulator-max-microvolt = <3000000>;
159 regulator-always-on;
160 };
161 };
162 };
163};
164
165&iomuxc {
166 pinctrl-names = "default";
167 pinctrl-0 = <&pinctrl_hog>;
168
169 imx6q-phytec-pfla02 {
170 pinctrl_hog: hoggrp {
171 fsl,pins = <
172 MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000
173 MX6QDL_PAD_DISP0_DAT3__GPIO4_IO24 0x80000000 /* SPI NOR chipselect */
174 MX6QDL_PAD_DI0_PIN15__GPIO4_IO17 0x80000000 /* PMIC interrupt */
175 MX6QDL_PAD_ENET_TXD0__GPIO1_IO30 0x80000000 /* Green LED */
176 MX6QDL_PAD_EIM_EB3__GPIO2_IO31 0x80000000 /* Red LED */
177 >;
178 };
179
180 pinctrl_ecspi3: ecspi3grp {
181 fsl,pins = <
182 MX6QDL_PAD_DISP0_DAT2__ECSPI3_MISO 0x100b1
183 MX6QDL_PAD_DISP0_DAT1__ECSPI3_MOSI 0x100b1
184 MX6QDL_PAD_DISP0_DAT0__ECSPI3_SCLK 0x100b1
185 >;
186 };
187
188 pinctrl_enet: enetgrp {
189 fsl,pins = <
190 MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0
191 MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0
192 MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0
193 MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0
194 MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0
195 MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0
196 MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0
197 MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0
198 MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0
199 MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0
200 MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0
201 MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0
202 MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0
203 MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0
204 MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0
205 MX6QDL_PAD_ENET_TX_EN__ENET_TX_EN 0x1b0b0
206 >;
207 };
208
209 pinctrl_gpmi_nand: gpminandgrp {
210 fsl,pins = <
211 MX6QDL_PAD_NANDF_CLE__NAND_CLE 0xb0b1
212 MX6QDL_PAD_NANDF_ALE__NAND_ALE 0xb0b1
213 MX6QDL_PAD_NANDF_WP_B__NAND_WP_B 0xb0b1
214 MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb000
215 MX6QDL_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1
216 MX6QDL_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1
217 MX6QDL_PAD_SD4_CMD__NAND_RE_B 0xb0b1
218 MX6QDL_PAD_SD4_CLK__NAND_WE_B 0xb0b1
219 MX6QDL_PAD_NANDF_D0__NAND_DATA00 0xb0b1
220 MX6QDL_PAD_NANDF_D1__NAND_DATA01 0xb0b1
221 MX6QDL_PAD_NANDF_D2__NAND_DATA02 0xb0b1
222 MX6QDL_PAD_NANDF_D3__NAND_DATA03 0xb0b1
223 MX6QDL_PAD_NANDF_D4__NAND_DATA04 0xb0b1
224 MX6QDL_PAD_NANDF_D5__NAND_DATA05 0xb0b1
225 MX6QDL_PAD_NANDF_D6__NAND_DATA06 0xb0b1
226 MX6QDL_PAD_NANDF_D7__NAND_DATA07 0xb0b1
227 MX6QDL_PAD_SD4_DAT0__NAND_DQS 0x00b1
228 >;
229 };
230
231 pinctrl_i2c1: i2c1grp {
232 fsl,pins = <
233 MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
234 MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
235 >;
236 };
237
238 pinctrl_uart3: uart3grp {
239 fsl,pins = <
240 MX6QDL_PAD_EIM_D24__UART3_TX_DATA 0x1b0b1
241 MX6QDL_PAD_EIM_D25__UART3_RX_DATA 0x1b0b1
242 MX6QDL_PAD_EIM_D30__UART3_RTS_B 0x1b0b1
243 MX6QDL_PAD_EIM_D31__UART3_CTS_B 0x1b0b1
244 >;
245 };
246
247 pinctrl_uart4: uart4grp {
248 fsl,pins = <
249 MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1
250 MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1
251 >;
252 };
253
254 pinctrl_usbh1: usbh1grp {
255 fsl,pins = <
256 MX6QDL_PAD_GPIO_0__USB_H1_PWR 0x80000000
257 >;
258 };
259
260 pinctrl_usbotg: usbotggrp {
261 fsl,pins = <
262 MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x17059
263 MX6QDL_PAD_KEY_COL4__USB_OTG_OC 0x1b0b0
264 MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x80000000
265 >;
266 };
267
268 pinctrl_usdhc2: usdhc2grp {
269 fsl,pins = <
270 MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17059
271 MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10059
272 MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059
273 MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
274 MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
275 MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17059
276 >;
277 };
278
279 pinctrl_usdhc3: usdhc3grp {
280 fsl,pins = <
281 MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059
282 MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059
283 MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059
284 MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
285 MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
286 MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
287 >;
288 };
289
290 pinctrl_usdhc3_cdwp: usdhc3cdwp {
291 fsl,pins = <
292 MX6QDL_PAD_ENET_RXD0__GPIO1_IO27 0x80000000
293 MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x80000000
294 >;
295 };
296 };
297};
298
299&fec {
300 pinctrl-names = "default";
301 pinctrl-0 = <&pinctrl_enet>;
302 phy-mode = "rgmii";
303 phy-reset-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
304 status = "disabled";
305};
306
307&gpmi {
308 pinctrl-names = "default";
309 pinctrl-0 = <&pinctrl_gpmi_nand>;
310 nand-on-flash-bbt;
311 status = "disabled";
312};
313
314&uart3 {
315 pinctrl-names = "default";
316 pinctrl-0 = <&pinctrl_uart3>;
317 status = "disabled";
318};
319
320&uart4 {
321 pinctrl-names = "default";
322 pinctrl-0 = <&pinctrl_uart4>;
323 status = "disabled";
324};
325
326&usbh1 {
327 vbus-supply = <&reg_usb_h1_vbus>;
328 pinctrl-names = "default";
329 pinctrl-0 = <&pinctrl_usbh1>;
330 status = "disabled";
331};
332
333&usbotg {
334 vbus-supply = <&reg_usb_otg_vbus>;
335 pinctrl-names = "default";
336 pinctrl-0 = <&pinctrl_usbotg>;
337 disable-over-current;
338 status = "disabled";
339};
340
341&usdhc2 {
342 pinctrl-names = "default";
343 pinctrl-0 = <&pinctrl_usdhc2>;
344 cd-gpios = <&gpio1 4 0>;
345 wp-gpios = <&gpio1 2 0>;
346 status = "disabled";
347};
348
349&usdhc3 {
350 pinctrl-names = "default";
351 pinctrl-0 = <&pinctrl_usdhc3
352 &pinctrl_usdhc3_cdwp>;
353 cd-gpios = <&gpio1 27 0>;
354 wp-gpios = <&gpio1 29 0>;
355 status = "disabled";
356};
diff --git a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
index 3bec128c7971..6df6127bf835 100644
--- a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
@@ -13,6 +13,10 @@
13#include <dt-bindings/input/input.h> 13#include <dt-bindings/input/input.h>
14 14
15/ { 15/ {
16 chosen {
17 stdout-path = &uart2;
18 };
19
16 memory { 20 memory {
17 reg = <0x10000000 0x40000000>; 21 reg = <0x10000000 0x40000000>;
18 }; 22 };
diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
index 0d816d3be4b6..40ea36534643 100644
--- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
@@ -14,6 +14,10 @@
14#include <dt-bindings/input/input.h> 14#include <dt-bindings/input/input.h>
15 15
16/ { 16/ {
17 chosen {
18 stdout-path = &uart1;
19 };
20
17 memory { 21 memory {
18 reg = <0x10000000 0x40000000>; 22 reg = <0x10000000 0x40000000>;
19 }; 23 };
@@ -105,6 +109,17 @@
105 default-brightness-level = <7>; 109 default-brightness-level = <7>;
106 status = "okay"; 110 status = "okay";
107 }; 111 };
112
113 leds {
114 compatible = "gpio-leds";
115 pinctrl-names = "default";
116 pinctrl-0 = <&pinctrl_gpio_leds>;
117
118 red {
119 gpios = <&gpio1 2 0>;
120 default-state = "on";
121 };
122 };
108}; 123};
109 124
110&audmux { 125&audmux {
@@ -137,6 +152,11 @@
137 status = "okay"; 152 status = "okay";
138}; 153};
139 154
155&hdmi {
156 ddc-i2c-bus = <&i2c2>;
157 status = "okay";
158};
159
140&i2c1 { 160&i2c1 {
141 clock-frequency = <100000>; 161 clock-frequency = <100000>;
142 pinctrl-names = "default"; 162 pinctrl-names = "default";
@@ -373,6 +393,12 @@
373 >; 393 >;
374 }; 394 };
375 395
396 pinctrl_pcie: pciegrp {
397 fsl,pins = <
398 MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x80000000
399 >;
400 };
401
376 pinctrl_pwm1: pwm1grp { 402 pinctrl_pwm1: pwm1grp {
377 fsl,pins = < 403 fsl,pins = <
378 MX6QDL_PAD_SD1_DAT3__PWM1_OUT 0x1b0b1 404 MX6QDL_PAD_SD1_DAT3__PWM1_OUT 0x1b0b1
@@ -421,6 +447,29 @@
421 MX6QDL_PAD_SD3_DAT7__SD3_DATA7 0x17059 447 MX6QDL_PAD_SD3_DAT7__SD3_DATA7 0x17059
422 >; 448 >;
423 }; 449 };
450
451 pinctrl_usdhc4: usdhc4grp {
452 fsl,pins = <
453 MX6QDL_PAD_SD4_CMD__SD4_CMD 0x17059
454 MX6QDL_PAD_SD4_CLK__SD4_CLK 0x10059
455 MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17059
456 MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17059
457 MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17059
458 MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x17059
459 MX6QDL_PAD_SD4_DAT4__SD4_DATA4 0x17059
460 MX6QDL_PAD_SD4_DAT5__SD4_DATA5 0x17059
461 MX6QDL_PAD_SD4_DAT6__SD4_DATA6 0x17059
462 MX6QDL_PAD_SD4_DAT7__SD4_DATA7 0x17059
463 >;
464 };
465 };
466
467 gpio_leds {
468 pinctrl_gpio_leds: gpioledsgrp {
469 fsl,pins = <
470 MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x80000000
471 >;
472 };
424 }; 473 };
425}; 474};
426 475
@@ -449,6 +498,13 @@
449 }; 498 };
450}; 499};
451 500
501&pcie {
502 pinctrl-names = "default";
503 pinctrl-0 = <&pinctrl_pcie>;
504 reset-gpio = <&gpio7 12 0>;
505 status = "okay";
506};
507
452&pwm1 { 508&pwm1 {
453 pinctrl-names = "default"; 509 pinctrl-names = "default";
454 pinctrl-0 = <&pinctrl_pwm1>; 510 pinctrl-0 = <&pinctrl_pwm1>;
@@ -496,3 +552,12 @@
496 wp-gpios = <&gpio2 1 0>; 552 wp-gpios = <&gpio2 1 0>;
497 status = "okay"; 553 status = "okay";
498}; 554};
555
556&usdhc4 {
557 pinctrl-names = "default";
558 pinctrl-0 = <&pinctrl_usdhc4>;
559 bus-width = <8>;
560 non-removable;
561 no-1-8-v;
562 status = "okay";
563};
diff --git a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
index bdfdf89d405f..5c6f10c43f65 100644
--- a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
@@ -62,6 +62,18 @@
62 status = "okay"; 62 status = "okay";
63}; 63};
64 64
65&hdmi {
66 ddc-i2c-bus = <&i2c1>;
67 status = "okay";
68};
69
70&i2c1 {
71 clock-frequency = <100000>;
72 pinctrl-names = "default";
73 pinctrl-0 = <&pinctrl_i2c1>;
74 status = "okay";
75};
76
65&i2c2 { 77&i2c2 {
66 clock-frequency = <100000>; 78 clock-frequency = <100000>;
67 pinctrl-names = "default"; 79 pinctrl-names = "default";
@@ -127,6 +139,13 @@
127 >; 139 >;
128 }; 140 };
129 141
142 pinctrl_i2c1: i2c1grp {
143 fsl,pins = <
144 MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
145 MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
146 >;
147 };
148
130 pinctrl_i2c2: i2c2grp { 149 pinctrl_i2c2: i2c2grp {
131 fsl,pins = < 150 fsl,pins = <
132 MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1 151 MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index eca0971d4db1..ce0599134a69 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -16,6 +16,7 @@
16 16
17/ { 17/ {
18 aliases { 18 aliases {
19 ethernet0 = &fec;
19 can0 = &can1; 20 can0 = &can1;
20 can1 = &can2; 21 can1 = &can2;
21 gpio0 = &gpio1; 22 gpio0 = &gpio1;
@@ -140,15 +141,16 @@
140 0x81000000 0 0 0x01f80000 0 0x00010000 /* downstream I/O */ 141 0x81000000 0 0 0x01f80000 0 0x00010000 /* downstream I/O */
141 0x82000000 0 0x01000000 0x01000000 0 0x00f00000>; /* non-prefetchable memory */ 142 0x82000000 0 0x01000000 0x01000000 0 0x00f00000>; /* non-prefetchable memory */
142 num-lanes = <1>; 143 num-lanes = <1>;
143 interrupts = <0 123 IRQ_TYPE_LEVEL_HIGH>; 144 interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
145 interrupt-names = "msi";
144 #interrupt-cells = <1>; 146 #interrupt-cells = <1>;
145 interrupt-map-mask = <0 0 0 0x7>; 147 interrupt-map-mask = <0 0 0 0x7>;
146 interrupt-map = <0 0 0 1 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>, 148 interrupt-map = <0 0 0 1 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
147 <0 0 0 2 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>, 149 <0 0 0 2 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
148 <0 0 0 3 &intc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>, 150 <0 0 0 3 &intc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
149 <0 0 0 4 &intc GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>; 151 <0 0 0 4 &intc GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
150 clocks = <&clks 189>, <&clks 187>, <&clks 206>, <&clks 144>; 152 clocks = <&clks 144>, <&clks 206>, <&clks 189>;
151 clock-names = "pcie_ref_125m", "sata_ref_100m", "lvds_gate", "pcie_axi"; 153 clock-names = "pcie", "pcie_bus", "pcie_phy";
152 status = "disabled"; 154 status = "disabled";
153 }; 155 };
154 156
diff --git a/arch/arm/boot/dts/imx6sl.dtsi b/arch/arm/boot/dts/imx6sl.dtsi
index d26b099260a3..2d4e5285f3f3 100644
--- a/arch/arm/boot/dts/imx6sl.dtsi
+++ b/arch/arm/boot/dts/imx6sl.dtsi
@@ -14,6 +14,7 @@
14 14
15/ { 15/ {
16 aliases { 16 aliases {
17 ethernet0 = &fec;
17 gpio0 = &gpio1; 18 gpio0 = &gpio1;
18 gpio1 = &gpio2; 19 gpio1 = &gpio2;
19 gpio2 = &gpio3; 20 gpio2 = &gpio3;
diff --git a/arch/arm/boot/dts/k2e-evm.dts b/arch/arm/boot/dts/k2e-evm.dts
index 74b3b63e94cf..c568f067604d 100644
--- a/arch/arm/boot/dts/k2e-evm.dts
+++ b/arch/arm/boot/dts/k2e-evm.dts
@@ -58,3 +58,84 @@
58&usb1 { 58&usb1 {
59 status = "okay"; 59 status = "okay";
60}; 60};
61
62&i2c0 {
63 dtt@50 {
64 compatible = "at,24c1024";
65 reg = <0x50>;
66 };
67};
68
69&aemif {
70 cs0 {
71 #address-cells = <2>;
72 #size-cells = <1>;
73 clock-ranges;
74 ranges;
75
76 ti,cs-chipselect = <0>;
77 /* all timings in nanoseconds */
78 ti,cs-min-turnaround-ns = <12>;
79 ti,cs-read-hold-ns = <6>;
80 ti,cs-read-strobe-ns = <23>;
81 ti,cs-read-setup-ns = <9>;
82 ti,cs-write-hold-ns = <8>;
83 ti,cs-write-strobe-ns = <23>;
84 ti,cs-write-setup-ns = <8>;
85
86 nand@0,0 {
87 compatible = "ti,keystone-nand","ti,davinci-nand";
88 #address-cells = <1>;
89 #size-cells = <1>;
90 reg = <0 0 0x4000000
91 1 0 0x0000100>;
92
93 ti,davinci-chipselect = <0>;
94 ti,davinci-mask-ale = <0x2000>;
95 ti,davinci-mask-cle = <0x4000>;
96 ti,davinci-mask-chipsel = <0>;
97 nand-ecc-mode = "hw";
98 ti,davinci-ecc-bits = <4>;
99 nand-on-flash-bbt;
100
101 partition@0 {
102 label = "u-boot";
103 reg = <0x0 0x100000>;
104 read-only;
105 };
106
107 partition@100000 {
108 label = "params";
109 reg = <0x100000 0x80000>;
110 read-only;
111 };
112
113 partition@180000 {
114 label = "ubifs";
115 reg = <0x180000 0x1FE80000>;
116 };
117 };
118 };
119};
120
121&spi0 {
122 nor_flash: n25q128a11@0 {
123 #address-cells = <1>;
124 #size-cells = <1>;
125 compatible = "Micron,n25q128a11";
126 spi-max-frequency = <54000000>;
127 m25p,fast-read;
128 reg = <0>;
129
130 partition@0 {
131 label = "u-boot-spl";
132 reg = <0x0 0x80000>;
133 read-only;
134 };
135
136 partition@1 {
137 label = "misc";
138 reg = <0x80000 0xf80000>;
139 };
140 };
141};
diff --git a/arch/arm/boot/dts/k2hk-evm.dts b/arch/arm/boot/dts/k2hk-evm.dts
index c93d06f9f2a8..1f90cbf27fd7 100644
--- a/arch/arm/boot/dts/k2hk-evm.dts
+++ b/arch/arm/boot/dts/k2hk-evm.dts
@@ -138,3 +138,32 @@
138 }; 138 };
139 }; 139 };
140}; 140};
141
142&i2c0 {
143 dtt@50 {
144 compatible = "at,24c1024";
145 reg = <0x50>;
146 };
147};
148
149&spi0 {
150 nor_flash: n25q128a11@0 {
151 #address-cells = <1>;
152 #size-cells = <1>;
153 compatible = "Micron,n25q128a11";
154 spi-max-frequency = <54000000>;
155 m25p,fast-read;
156 reg = <0>;
157
158 partition@0 {
159 label = "u-boot-spl";
160 reg = <0x0 0x80000>;
161 read-only;
162 };
163
164 partition@1 {
165 label = "misc";
166 reg = <0x80000 0xf80000>;
167 };
168 };
169};
diff --git a/arch/arm/boot/dts/k2l-evm.dts b/arch/arm/boot/dts/k2l-evm.dts
index 50a70132ac9e..fec43128a2e0 100644
--- a/arch/arm/boot/dts/k2l-evm.dts
+++ b/arch/arm/boot/dts/k2l-evm.dts
@@ -35,3 +35,84 @@
35&usb { 35&usb {
36 status = "okay"; 36 status = "okay";
37}; 37};
38
39&i2c0 {
40 dtt@50 {
41 compatible = "at,24c1024";
42 reg = <0x50>;
43 };
44};
45
46&aemif {
47 cs0 {
48 #address-cells = <2>;
49 #size-cells = <1>;
50 clock-ranges;
51 ranges;
52
53 ti,cs-chipselect = <0>;
54 /* all timings in nanoseconds */
55 ti,cs-min-turnaround-ns = <12>;
56 ti,cs-read-hold-ns = <6>;
57 ti,cs-read-strobe-ns = <23>;
58 ti,cs-read-setup-ns = <9>;
59 ti,cs-write-hold-ns = <8>;
60 ti,cs-write-strobe-ns = <23>;
61 ti,cs-write-setup-ns = <8>;
62
63 nand@0,0 {
64 compatible = "ti,keystone-nand","ti,davinci-nand";
65 #address-cells = <1>;
66 #size-cells = <1>;
67 reg = <0 0 0x4000000
68 1 0 0x0000100>;
69
70 ti,davinci-chipselect = <0>;
71 ti,davinci-mask-ale = <0x2000>;
72 ti,davinci-mask-cle = <0x4000>;
73 ti,davinci-mask-chipsel = <0>;
74 nand-ecc-mode = "hw";
75 ti,davinci-ecc-bits = <4>;
76 nand-on-flash-bbt;
77
78 partition@0 {
79 label = "u-boot";
80 reg = <0x0 0x100000>;
81 read-only;
82 };
83
84 partition@100000 {
85 label = "params";
86 reg = <0x100000 0x80000>;
87 read-only;
88 };
89
90 partition@180000 {
91 label = "ubifs";
92 reg = <0x180000 0x7FE80000>;
93 };
94 };
95 };
96};
97
98&spi0 {
99 nor_flash: n25q128a11@0 {
100 #address-cells = <1>;
101 #size-cells = <1>;
102 compatible = "Micron,n25q128a11";
103 spi-max-frequency = <54000000>;
104 m25p,fast-read;
105 reg = <0>;
106
107 partition@0 {
108 label = "u-boot-spl";
109 reg = <0x0 0x80000>;
110 read-only;
111 };
112
113 partition@1 {
114 label = "misc";
115 reg = <0x80000 0xf80000>;
116 };
117 };
118};
diff --git a/arch/arm/boot/dts/keystone.dtsi b/arch/arm/boot/dts/keystone.dtsi
index 90823eb90c1b..d9f99e7deb83 100644
--- a/arch/arm/boot/dts/keystone.dtsi
+++ b/arch/arm/boot/dts/keystone.dtsi
@@ -28,8 +28,6 @@
28 gic: interrupt-controller { 28 gic: interrupt-controller {
29 compatible = "arm,cortex-a15-gic"; 29 compatible = "arm,cortex-a15-gic";
30 #interrupt-cells = <3>; 30 #interrupt-cells = <3>;
31 #size-cells = <0>;
32 #address-cells = <1>;
33 interrupt-controller; 31 interrupt-controller;
34 reg = <0x0 0x02561000 0x0 0x1000>, 32 reg = <0x0 0x02561000 0x0 0x1000>,
35 <0x0 0x02562000 0x0 0x2000>, 33 <0x0 0x02562000 0x0 0x2000>,
@@ -66,6 +64,7 @@
66 compatible = "ti,keystone","simple-bus"; 64 compatible = "ti,keystone","simple-bus";
67 interrupt-parent = <&gic>; 65 interrupt-parent = <&gic>;
68 ranges = <0x0 0x0 0x0 0xc0000000>; 66 ranges = <0x0 0x0 0x0 0xc0000000>;
67 dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
69 68
70 rstctrl: reset-controller { 69 rstctrl: reset-controller {
71 compatible = "ti,keystone-reset"; 70 compatible = "ti,keystone-reset";
@@ -102,11 +101,6 @@
102 interrupts = <GIC_SPI 283 IRQ_TYPE_EDGE_RISING>; 101 interrupts = <GIC_SPI 283 IRQ_TYPE_EDGE_RISING>;
103 #address-cells = <1>; 102 #address-cells = <1>;
104 #size-cells = <0>; 103 #size-cells = <0>;
105
106 dtt@50 {
107 compatible = "at,24c1024";
108 reg = <0x50>;
109 };
110 }; 104 };
111 105
112 i2c1: i2c@2530400 { 106 i2c1: i2c@2530400 {
@@ -115,6 +109,8 @@
115 clock-frequency = <100000>; 109 clock-frequency = <100000>;
116 clocks = <&clki2c>; 110 clocks = <&clki2c>;
117 interrupts = <GIC_SPI 286 IRQ_TYPE_EDGE_RISING>; 111 interrupts = <GIC_SPI 286 IRQ_TYPE_EDGE_RISING>;
112 #address-cells = <1>;
113 #size-cells = <0>;
118 }; 114 };
119 115
120 i2c2: i2c@2530800 { 116 i2c2: i2c@2530800 {
@@ -123,6 +119,8 @@
123 clock-frequency = <100000>; 119 clock-frequency = <100000>;
124 clocks = <&clki2c>; 120 clocks = <&clki2c>;
125 interrupts = <GIC_SPI 289 IRQ_TYPE_EDGE_RISING>; 121 interrupts = <GIC_SPI 289 IRQ_TYPE_EDGE_RISING>;
122 #address-cells = <1>;
123 #size-cells = <0>;
126 }; 124 };
127 125
128 spi0: spi@21000400 { 126 spi0: spi@21000400 {
@@ -132,6 +130,8 @@
132 ti,davinci-spi-intr-line = <0>; 130 ti,davinci-spi-intr-line = <0>;
133 interrupts = <GIC_SPI 292 IRQ_TYPE_EDGE_RISING>; 131 interrupts = <GIC_SPI 292 IRQ_TYPE_EDGE_RISING>;
134 clocks = <&clkspi>; 132 clocks = <&clkspi>;
133 #address-cells = <1>;
134 #size-cells = <0>;
135 }; 135 };
136 136
137 spi1: spi@21000600 { 137 spi1: spi@21000600 {
@@ -141,6 +141,8 @@
141 ti,davinci-spi-intr-line = <0>; 141 ti,davinci-spi-intr-line = <0>;
142 interrupts = <GIC_SPI 296 IRQ_TYPE_EDGE_RISING>; 142 interrupts = <GIC_SPI 296 IRQ_TYPE_EDGE_RISING>;
143 clocks = <&clkspi>; 143 clocks = <&clkspi>;
144 #address-cells = <1>;
145 #size-cells = <0>;
144 }; 146 };
145 147
146 spi2: spi@21000800 { 148 spi2: spi@21000800 {
@@ -150,6 +152,8 @@
150 ti,davinci-spi-intr-line = <0>; 152 ti,davinci-spi-intr-line = <0>;
151 interrupts = <GIC_SPI 300 IRQ_TYPE_EDGE_RISING>; 153 interrupts = <GIC_SPI 300 IRQ_TYPE_EDGE_RISING>;
152 clocks = <&clkspi>; 154 clocks = <&clkspi>;
155 #address-cells = <1>;
156 #size-cells = <0>;
153 }; 157 };
154 158
155 usb_phy: usb_phy@2620738 { 159 usb_phy: usb_phy@2620738 {
@@ -169,6 +173,8 @@
169 clock-names = "usb"; 173 clock-names = "usb";
170 interrupts = <GIC_SPI 393 IRQ_TYPE_EDGE_RISING>; 174 interrupts = <GIC_SPI 393 IRQ_TYPE_EDGE_RISING>;
171 ranges; 175 ranges;
176 dma-coherent;
177 dma-ranges;
172 status = "disabled"; 178 status = "disabled";
173 179
174 dwc3@2690000 { 180 dwc3@2690000 {
diff --git a/arch/arm/boot/dts/kirkwood-6192.dtsi b/arch/arm/boot/dts/kirkwood-6192.dtsi
index 3916937d6818..dd81508b919b 100644
--- a/arch/arm/boot/dts/kirkwood-6192.dtsi
+++ b/arch/arm/boot/dts/kirkwood-6192.dtsi
@@ -1,6 +1,6 @@
1/ { 1/ {
2 mbus { 2 mbus {
3 pcie-controller { 3 pciec: pcie-controller {
4 compatible = "marvell,kirkwood-pcie"; 4 compatible = "marvell,kirkwood-pcie";
5 status = "disabled"; 5 status = "disabled";
6 device_type = "pci"; 6 device_type = "pci";
@@ -15,7 +15,7 @@
15 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */ 15 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */
16 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */>; 16 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */>;
17 17
18 pcie@1,0 { 18 pcie0: pcie@1,0 {
19 device_type = "pci"; 19 device_type = "pci";
20 assigned-addresses = <0x82000800 0 0x00040000 0 0x2000>; 20 assigned-addresses = <0x82000800 0 0x00040000 0 0x2000>;
21 reg = <0x0800 0 0 0 0>; 21 reg = <0x0800 0 0 0 0>;
@@ -35,16 +35,9 @@
35 }; 35 };
36 36
37 ocp@f1000000 { 37 ocp@f1000000 {
38 pinctrl: pinctrl@10000 { 38 pinctrl: pin-controller@10000 {
39 compatible = "marvell,88f6192-pinctrl"; 39 compatible = "marvell,88f6192-pinctrl";
40 reg = <0x10000 0x20>;
41 40
42 pmx_nand: pmx-nand {
43 marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3",
44 "mpp4", "mpp5", "mpp18",
45 "mpp19";
46 marvell,function = "nand";
47 };
48 pmx_sata0: pmx-sata0 { 41 pmx_sata0: pmx-sata0 {
49 marvell,pins = "mpp5", "mpp21", "mpp23"; 42 marvell,pins = "mpp5", "mpp21", "mpp23";
50 marvell,function = "sata0"; 43 marvell,function = "sata0";
@@ -53,22 +46,6 @@
53 marvell,pins = "mpp4", "mpp20", "mpp22"; 46 marvell,pins = "mpp4", "mpp20", "mpp22";
54 marvell,function = "sata1"; 47 marvell,function = "sata1";
55 }; 48 };
56 pmx_spi: pmx-spi {
57 marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3";
58 marvell,function = "spi";
59 };
60 pmx_twsi0: pmx-twsi0 {
61 marvell,pins = "mpp8", "mpp9";
62 marvell,function = "twsi0";
63 };
64 pmx_uart0: pmx-uart0 {
65 marvell,pins = "mpp10", "mpp11";
66 marvell,function = "uart0";
67 };
68 pmx_uart1: pmx-uart1 {
69 marvell,pins = "mpp13", "mpp14";
70 marvell,function = "uart1";
71 };
72 pmx_sdio: pmx-sdio { 49 pmx_sdio: pmx-sdio {
73 marvell,pins = "mpp12", "mpp13", "mpp14", 50 marvell,pins = "mpp12", "mpp13", "mpp14",
74 "mpp15", "mpp16", "mpp17"; 51 "mpp15", "mpp16", "mpp17";
@@ -76,14 +53,14 @@
76 }; 53 };
77 }; 54 };
78 55
79 rtc@10300 { 56 rtc: rtc@10300 {
80 compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc"; 57 compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc";
81 reg = <0x10300 0x20>; 58 reg = <0x10300 0x20>;
82 interrupts = <53>; 59 interrupts = <53>;
83 clocks = <&gate_clk 7>; 60 clocks = <&gate_clk 7>;
84 }; 61 };
85 62
86 sata@80000 { 63 sata: sata@80000 {
87 compatible = "marvell,orion-sata"; 64 compatible = "marvell,orion-sata";
88 reg = <0x80000 0x5000>; 65 reg = <0x80000 0x5000>;
89 interrupts = <21>; 66 interrupts = <21>;
@@ -92,7 +69,7 @@
92 status = "disabled"; 69 status = "disabled";
93 }; 70 };
94 71
95 mvsdio@90000 { 72 sdio: mvsdio@90000 {
96 compatible = "marvell,orion-sdio"; 73 compatible = "marvell,orion-sdio";
97 reg = <0x90000 0x200>; 74 reg = <0x90000 0x200>;
98 interrupts = <28>; 75 interrupts = <28>;
diff --git a/arch/arm/boot/dts/kirkwood-6281.dtsi b/arch/arm/boot/dts/kirkwood-6281.dtsi
index 416d96e1302f..7dc7d6782e83 100644
--- a/arch/arm/boot/dts/kirkwood-6281.dtsi
+++ b/arch/arm/boot/dts/kirkwood-6281.dtsi
@@ -1,6 +1,6 @@
1/ { 1/ {
2 mbus { 2 mbus {
3 pcie-controller { 3 pciec: pcie-controller {
4 compatible = "marvell,kirkwood-pcie"; 4 compatible = "marvell,kirkwood-pcie";
5 status = "disabled"; 5 status = "disabled";
6 device_type = "pci"; 6 device_type = "pci";
@@ -15,7 +15,7 @@
15 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */ 15 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */
16 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */>; 16 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */>;
17 17
18 pcie@1,0 { 18 pcie0: pcie@1,0 {
19 device_type = "pci"; 19 device_type = "pci";
20 assigned-addresses = <0x82000800 0 0x00040000 0 0x2000>; 20 assigned-addresses = <0x82000800 0 0x00040000 0 0x2000>;
21 reg = <0x0800 0 0 0 0>; 21 reg = <0x0800 0 0 0 0>;
@@ -35,16 +35,9 @@
35 }; 35 };
36 36
37 ocp@f1000000 { 37 ocp@f1000000 {
38 pinctrl: pinctrl@10000 { 38 pinctrl: pin-controller@10000 {
39 compatible = "marvell,88f6281-pinctrl"; 39 compatible = "marvell,88f6281-pinctrl";
40 reg = <0x10000 0x20>;
41 40
42 pmx_nand: pmx-nand {
43 marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3",
44 "mpp4", "mpp5", "mpp18",
45 "mpp19";
46 marvell,function = "nand";
47 };
48 pmx_sata0: pmx-sata0 { 41 pmx_sata0: pmx-sata0 {
49 marvell,pins = "mpp5", "mpp21", "mpp23"; 42 marvell,pins = "mpp5", "mpp21", "mpp23";
50 marvell,function = "sata0"; 43 marvell,function = "sata0";
@@ -53,22 +46,6 @@
53 marvell,pins = "mpp4", "mpp20", "mpp22"; 46 marvell,pins = "mpp4", "mpp20", "mpp22";
54 marvell,function = "sata1"; 47 marvell,function = "sata1";
55 }; 48 };
56 pmx_spi: pmx-spi {
57 marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3";
58 marvell,function = "spi";
59 };
60 pmx_twsi0: pmx-twsi0 {
61 marvell,pins = "mpp8", "mpp9";
62 marvell,function = "twsi0";
63 };
64 pmx_uart0: pmx-uart0 {
65 marvell,pins = "mpp10", "mpp11";
66 marvell,function = "uart0";
67 };
68 pmx_uart1: pmx-uart1 {
69 marvell,pins = "mpp13", "mpp14";
70 marvell,function = "uart1";
71 };
72 pmx_sdio: pmx-sdio { 49 pmx_sdio: pmx-sdio {
73 marvell,pins = "mpp12", "mpp13", "mpp14", 50 marvell,pins = "mpp12", "mpp13", "mpp14",
74 "mpp15", "mpp16", "mpp17"; 51 "mpp15", "mpp16", "mpp17";
@@ -76,14 +53,14 @@
76 }; 53 };
77 }; 54 };
78 55
79 rtc@10300 { 56 rtc: rtc@10300 {
80 compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc"; 57 compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc";
81 reg = <0x10300 0x20>; 58 reg = <0x10300 0x20>;
82 interrupts = <53>; 59 interrupts = <53>;
83 clocks = <&gate_clk 7>; 60 clocks = <&gate_clk 7>;
84 }; 61 };
85 62
86 sata@80000 { 63 sata: sata@80000 {
87 compatible = "marvell,orion-sata"; 64 compatible = "marvell,orion-sata";
88 reg = <0x80000 0x5000>; 65 reg = <0x80000 0x5000>;
89 interrupts = <21>; 66 interrupts = <21>;
@@ -94,7 +71,7 @@
94 status = "disabled"; 71 status = "disabled";
95 }; 72 };
96 73
97 mvsdio@90000 { 74 sdio: mvsdio@90000 {
98 compatible = "marvell,orion-sdio"; 75 compatible = "marvell,orion-sdio";
99 reg = <0x90000 0x200>; 76 reg = <0x90000 0x200>;
100 interrupts = <28>; 77 interrupts = <28>;
diff --git a/arch/arm/boot/dts/kirkwood-6282.dtsi b/arch/arm/boot/dts/kirkwood-6282.dtsi
index 2902e0d7971d..4680eec990f0 100644
--- a/arch/arm/boot/dts/kirkwood-6282.dtsi
+++ b/arch/arm/boot/dts/kirkwood-6282.dtsi
@@ -1,6 +1,6 @@
1/ { 1/ {
2 mbus { 2 mbus {
3 pcie-controller { 3 pciec: pcie-controller {
4 compatible = "marvell,kirkwood-pcie"; 4 compatible = "marvell,kirkwood-pcie";
5 status = "disabled"; 5 status = "disabled";
6 device_type = "pci"; 6 device_type = "pci";
@@ -19,7 +19,7 @@
19 0x82000000 0x2 0 MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 1.0 MEM */ 19 0x82000000 0x2 0 MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 1.0 MEM */
20 0x81000000 0x2 0 MBUS_ID(0x04, 0xd0) 0 1 0 /* Port 1.0 IO */>; 20 0x81000000 0x2 0 MBUS_ID(0x04, 0xd0) 0 1 0 /* Port 1.0 IO */>;
21 21
22 pcie@1,0 { 22 pcie0: pcie@1,0 {
23 device_type = "pci"; 23 device_type = "pci";
24 assigned-addresses = <0x82000800 0 0x00040000 0 0x2000>; 24 assigned-addresses = <0x82000800 0 0x00040000 0 0x2000>;
25 reg = <0x0800 0 0 0 0>; 25 reg = <0x0800 0 0 0 0>;
@@ -36,7 +36,7 @@
36 status = "disabled"; 36 status = "disabled";
37 }; 37 };
38 38
39 pcie@2,0 { 39 pcie1: pcie@2,0 {
40 device_type = "pci"; 40 device_type = "pci";
41 assigned-addresses = <0x82001000 0 0x00044000 0 0x2000>; 41 assigned-addresses = <0x82001000 0 0x00044000 0 0x2000>;
42 reg = <0x1000 0 0 0 0>; 42 reg = <0x1000 0 0 0 0>;
@@ -56,15 +56,8 @@
56 }; 56 };
57 ocp@f1000000 { 57 ocp@f1000000 {
58 58
59 pinctrl: pinctrl@10000 { 59 pinctrl: pin-controller@10000 {
60 compatible = "marvell,88f6282-pinctrl"; 60 compatible = "marvell,88f6282-pinctrl";
61 reg = <0x10000 0x20>;
62
63 pmx_nand: pmx-nand {
64 marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3",
65 "mpp4", "mpp5", "mpp18", "mpp19";
66 marvell,function = "nand";
67 };
68 61
69 pmx_sata0: pmx-sata0 { 62 pmx_sata0: pmx-sata0 {
70 marvell,pins = "mpp5", "mpp21", "mpp23"; 63 marvell,pins = "mpp5", "mpp21", "mpp23";
@@ -74,29 +67,16 @@
74 marvell,pins = "mpp4", "mpp20", "mpp22"; 67 marvell,pins = "mpp4", "mpp20", "mpp22";
75 marvell,function = "sata1"; 68 marvell,function = "sata1";
76 }; 69 };
77 pmx_spi: pmx-spi {
78 marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3";
79 marvell,function = "spi";
80 };
81 pmx_twsi0: pmx-twsi0 {
82 marvell,pins = "mpp8", "mpp9";
83 marvell,function = "twsi0";
84 };
85 70
71 /*
72 * Default I2C1 pinctrl setting on mpp36/mpp37,
73 * overwrite marvell,pins on board level if required.
74 */
86 pmx_twsi1: pmx-twsi1 { 75 pmx_twsi1: pmx-twsi1 {
87 marvell,pins = "mpp36", "mpp37"; 76 marvell,pins = "mpp36", "mpp37";
88 marvell,function = "twsi1"; 77 marvell,function = "twsi1";
89 }; 78 };
90 79
91 pmx_uart0: pmx-uart0 {
92 marvell,pins = "mpp10", "mpp11";
93 marvell,function = "uart0";
94 };
95
96 pmx_uart1: pmx-uart1 {
97 marvell,pins = "mpp13", "mpp14";
98 marvell,function = "uart1";
99 };
100 pmx_sdio: pmx-sdio { 80 pmx_sdio: pmx-sdio {
101 marvell,pins = "mpp12", "mpp13", "mpp14", 81 marvell,pins = "mpp12", "mpp13", "mpp14",
102 "mpp15", "mpp16", "mpp17"; 82 "mpp15", "mpp16", "mpp17";
@@ -104,20 +84,20 @@
104 }; 84 };
105 }; 85 };
106 86
107 thermal@10078 { 87 thermal: thermal@10078 {
108 compatible = "marvell,kirkwood-thermal"; 88 compatible = "marvell,kirkwood-thermal";
109 reg = <0x10078 0x4>; 89 reg = <0x10078 0x4>;
110 status = "okay"; 90 status = "okay";
111 }; 91 };
112 92
113 rtc@10300 { 93 rtc: rtc@10300 {
114 compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc"; 94 compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc";
115 reg = <0x10300 0x20>; 95 reg = <0x10300 0x20>;
116 interrupts = <53>; 96 interrupts = <53>;
117 clocks = <&gate_clk 7>; 97 clocks = <&gate_clk 7>;
118 }; 98 };
119 99
120 i2c@11100 { 100 i2c1: i2c@11100 {
121 compatible = "marvell,mv64xxx-i2c"; 101 compatible = "marvell,mv64xxx-i2c";
122 reg = <0x11100 0x20>; 102 reg = <0x11100 0x20>;
123 #address-cells = <1>; 103 #address-cells = <1>;
@@ -125,10 +105,12 @@
125 interrupts = <32>; 105 interrupts = <32>;
126 clock-frequency = <100000>; 106 clock-frequency = <100000>;
127 clocks = <&gate_clk 7>; 107 clocks = <&gate_clk 7>;
108 pinctrl-0 = <&pmx_twsi1>;
109 pinctrl-names = "default";
128 status = "disabled"; 110 status = "disabled";
129 }; 111 };
130 112
131 sata@80000 { 113 sata: sata@80000 {
132 compatible = "marvell,orion-sata"; 114 compatible = "marvell,orion-sata";
133 reg = <0x80000 0x5000>; 115 reg = <0x80000 0x5000>;
134 interrupts = <21>; 116 interrupts = <21>;
@@ -139,7 +121,7 @@
139 status = "disabled"; 121 status = "disabled";
140 }; 122 };
141 123
142 mvsdio@90000 { 124 sdio: mvsdio@90000 {
143 compatible = "marvell,orion-sdio"; 125 compatible = "marvell,orion-sdio";
144 reg = <0x90000 0x200>; 126 reg = <0x90000 0x200>;
145 interrupts = <28>; 127 interrupts = <28>;
diff --git a/arch/arm/boot/dts/kirkwood-98dx4122.dtsi b/arch/arm/boot/dts/kirkwood-98dx4122.dtsi
index 3271e4c8ea07..9e1f741d74ff 100644
--- a/arch/arm/boot/dts/kirkwood-98dx4122.dtsi
+++ b/arch/arm/boot/dts/kirkwood-98dx4122.dtsi
@@ -1,31 +1,51 @@
1/ { 1/ {
2 mbus {
3 pciec: pcie-controller {
4 compatible = "marvell,kirkwood-pcie";
5 status = "disabled";
6 device_type = "pci";
7
8 #address-cells = <3>;
9 #size-cells = <2>;
10
11 bus-range = <0x00 0xff>;
12
13 ranges =
14 <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000
15 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */
16 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */>;
17
18 pcie0: pcie@1,0 {
19 device_type = "pci";
20 assigned-addresses = <0x82000800 0 0x00040000 0 0x2000>;
21 reg = <0x0800 0 0 0 0>;
22 #address-cells = <3>;
23 #size-cells = <2>;
24 #interrupt-cells = <1>;
25 ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0
26 0x81000000 0 0 0x81000000 0x1 0 1 0>;
27 interrupt-map-mask = <0 0 0 0>;
28 interrupt-map = <0 0 0 0 &intc 9>;
29 marvell,pcie-port = <0>;
30 marvell,pcie-lane = <0>;
31 clocks = <&gate_clk 2>;
32 status = "disabled";
33 };
34 };
35 };
36
2 ocp@f1000000 { 37 ocp@f1000000 {
3 pinctrl: pinctrl@10000 { 38 pinctrl: pin-controller@10000 {
4 compatible = "marvell,98dx4122-pinctrl"; 39 compatible = "marvell,98dx4122-pinctrl";
5 reg = <0x10000 0x20>;
6 40
7 pmx_nand: pmx-nand {
8 marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3",
9 "mpp4", "mpp5", "mpp18",
10 "mpp19";
11 marvell,function = "nand";
12 };
13 pmx_spi: pmx-spi {
14 marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3";
15 marvell,function = "spi";
16 };
17 pmx_twsi0: pmx-twsi0 {
18 marvell,pins = "mpp8", "mpp9";
19 marvell,function = "twsi0";
20 };
21 pmx_uart0: pmx-uart0 {
22 marvell,pins = "mpp10", "mpp11";
23 marvell,function = "uart0";
24 };
25 pmx_uart1: pmx-uart1 {
26 marvell,pins = "mpp13", "mpp14";
27 marvell,function = "uart1";
28 };
29 }; 41 };
30 }; 42 };
31}; 43};
44
45&sata_phy0 {
46 status = "disabled";
47};
48
49&sata_phy1 {
50 status = "disabled";
51};
diff --git a/arch/arm/boot/dts/kirkwood-b3.dts b/arch/arm/boot/dts/kirkwood-b3.dts
index 6becedebaa4e..c9247f8672ae 100644
--- a/arch/arm/boot/dts/kirkwood-b3.dts
+++ b/arch/arm/boot/dts/kirkwood-b3.dts
@@ -30,6 +30,7 @@
30 30
31 chosen { 31 chosen {
32 bootargs = "console=ttyS0,115200n8 earlyprintk"; 32 bootargs = "console=ttyS0,115200n8 earlyprintk";
33 stdout-path = &uart0;
33 }; 34 };
34 35
35 mbus { 36 mbus {
@@ -44,7 +45,7 @@
44 }; 45 };
45 46
46 ocp@f1000000 { 47 ocp@f1000000 {
47 pinctrl: pinctrl@10000 { 48 pinctrl: pin-controller@10000 {
48 pmx_button_power: pmx-button-power { 49 pmx_button_power: pmx-button-power {
49 marvell,pins = "mpp39"; 50 marvell,pins = "mpp39";
50 marvell,function = "gpio"; 51 marvell,function = "gpio";
@@ -69,8 +70,6 @@
69 70
70 spi@10600 { 71 spi@10600 {
71 status = "okay"; 72 status = "okay";
72 pinctrl-0 = <&pmx_spi>;
73 pinctrl-names = "default";
74 73
75 m25p16@0 { 74 m25p16@0 {
76 #address-cells = <1>; 75 #address-cells = <1>;
@@ -113,8 +112,6 @@
113 * UART0_TX = Testpoint 66 112 * UART0_TX = Testpoint 66
114 * See the Excito Wiki for more details. 113 * See the Excito Wiki for more details.
115 */ 114 */
116 pinctrl-0 = <&pmx_uart0>;
117 pinctrl-names = "default";
118 status = "okay"; 115 status = "okay";
119 }; 116 };
120 117
diff --git a/arch/arm/boot/dts/kirkwood-cloudbox.dts b/arch/arm/boot/dts/kirkwood-cloudbox.dts
index 3b62aeeaa3a2..ab6ab4933e6b 100644
--- a/arch/arm/boot/dts/kirkwood-cloudbox.dts
+++ b/arch/arm/boot/dts/kirkwood-cloudbox.dts
@@ -14,10 +14,11 @@
14 14
15 chosen { 15 chosen {
16 bootargs = "console=ttyS0,115200n8"; 16 bootargs = "console=ttyS0,115200n8";
17 stdout-path = &uart0;
17 }; 18 };
18 19
19 ocp@f1000000 { 20 ocp@f1000000 {
20 pinctrl: pinctrl@10000 { 21 pinctrl: pin-controller@10000 {
21 pmx_cloudbox_sata0: pmx-cloudbox-sata0 { 22 pmx_cloudbox_sata0: pmx-cloudbox-sata0 {
22 marvell,pins = "mpp15"; 23 marvell,pins = "mpp15";
23 marvell,function = "sata0"; 24 marvell,function = "sata0";
@@ -25,9 +26,6 @@
25 }; 26 };
26 27
27 serial@12000 { 28 serial@12000 {
28 pinctrl-0 = <&pmx_uart0>;
29 pinctrl-names = "default";
30 clock-frequency = <166666667>;
31 status = "okay"; 29 status = "okay";
32 }; 30 };
33 31
@@ -39,8 +37,6 @@
39 }; 37 };
40 38
41 spi@10600 { 39 spi@10600 {
42 pinctrl-0 = <&pmx_spi>;
43 pinctrl-names = "default";
44 status = "okay"; 40 status = "okay";
45 41
46 flash@0 { 42 flash@0 {
diff --git a/arch/arm/boot/dts/kirkwood-db.dtsi b/arch/arm/boot/dts/kirkwood-db.dtsi
index 02d1225ef99f..812df691ae3d 100644
--- a/arch/arm/boot/dts/kirkwood-db.dtsi
+++ b/arch/arm/boot/dts/kirkwood-db.dtsi
@@ -22,10 +22,11 @@
22 22
23 chosen { 23 chosen {
24 bootargs = "console=ttyS0,115200n8 earlyprintk"; 24 bootargs = "console=ttyS0,115200n8 earlyprintk";
25 stdout-path = &uart0;
25 }; 26 };
26 27
27 ocp@f1000000 { 28 ocp@f1000000 {
28 pinctrl@10000 { 29 pin-controller@10000 {
29 pmx_sdio_gpios: pmx-sdio-gpios { 30 pmx_sdio_gpios: pmx-sdio-gpios {
30 marvell,pins = "mpp37", "mpp38"; 31 marvell,pins = "mpp37", "mpp38";
31 marvell,function = "gpio"; 32 marvell,function = "gpio";
@@ -33,10 +34,7 @@
33 }; 34 };
34 35
35 serial@12000 { 36 serial@12000 {
36 pinctrl-0 = <&pmx_uart0>; 37 status = "okay";
37 pinctrl-names = "default";
38 clock-frequency = <200000000>;
39 status = "ok";
40 }; 38 };
41 39
42 sata@80000 { 40 sata@80000 {
@@ -59,8 +57,6 @@
59}; 57};
60 58
61&nand { 59&nand {
62 pinctrl-0 = <&pmx_nand>;
63 pinctrl-names = "default";
64 chip-delay = <25>; 60 chip-delay = <25>;
65 status = "okay"; 61 status = "okay";
66 62
diff --git a/arch/arm/boot/dts/kirkwood-dns320.dts b/arch/arm/boot/dts/kirkwood-dns320.dts
index bf7fe8ab88f4..d85ef0a91b50 100644
--- a/arch/arm/boot/dts/kirkwood-dns320.dts
+++ b/arch/arm/boot/dts/kirkwood-dns320.dts
@@ -13,6 +13,7 @@
13 13
14 chosen { 14 chosen {
15 bootargs = "console=ttyS0,115200n8 earlyprintk"; 15 bootargs = "console=ttyS0,115200n8 earlyprintk";
16 stdout-path = &uart0;
16 }; 17 };
17 18
18 gpio-leds { 19 gpio-leds {
@@ -51,8 +52,6 @@
51 }; 52 };
52 53
53 serial@12100 { 54 serial@12100 {
54 pinctrl-0 = <&pmx_uart1>;
55 pinctrl-names = "default";
56 status = "okay"; 55 status = "okay";
57 }; 56 };
58 }; 57 };
diff --git a/arch/arm/boot/dts/kirkwood-dns325.dts b/arch/arm/boot/dts/kirkwood-dns325.dts
index cb9978c652f2..5e586ed04c58 100644
--- a/arch/arm/boot/dts/kirkwood-dns325.dts
+++ b/arch/arm/boot/dts/kirkwood-dns325.dts
@@ -13,6 +13,7 @@
13 13
14 chosen { 14 chosen {
15 bootargs = "console=ttyS0,115200n8 earlyprintk"; 15 bootargs = "console=ttyS0,115200n8 earlyprintk";
16 stdout-path = &uart0;
16 }; 17 };
17 18
18 gpio-leds { 19 gpio-leds {
diff --git a/arch/arm/boot/dts/kirkwood-dnskw.dtsi b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
index d5aa9564a287..113dcf056dcf 100644
--- a/arch/arm/boot/dts/kirkwood-dnskw.dtsi
+++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
@@ -50,7 +50,7 @@
50 }; 50 };
51 51
52 ocp@f1000000 { 52 ocp@f1000000 {
53 pinctrl: pinctrl@10000 { 53 pinctrl: pin-controller@10000 {
54 54
55 pinctrl-0 = <&pmx_power_back_on &pmx_present_sata0 55 pinctrl-0 = <&pmx_power_back_on &pmx_present_sata0
56 &pmx_present_sata1 &pmx_fan_tacho 56 &pmx_present_sata1 &pmx_fan_tacho
@@ -183,8 +183,6 @@
183}; 183};
184 184
185&nand { 185&nand {
186 pinctrl-0 = <&pmx_nand>;
187 pinctrl-names = "default";
188 status = "okay"; 186 status = "okay";
189 chip-delay = <35>; 187 chip-delay = <35>;
190 188
diff --git a/arch/arm/boot/dts/kirkwood-dockstar.dts b/arch/arm/boot/dts/kirkwood-dockstar.dts
index f31312ebd0d6..849736349511 100644
--- a/arch/arm/boot/dts/kirkwood-dockstar.dts
+++ b/arch/arm/boot/dts/kirkwood-dockstar.dts
@@ -14,10 +14,11 @@
14 14
15 chosen { 15 chosen {
16 bootargs = "console=ttyS0,115200n8 earlyprintk root=/dev/sda1 rootdelay=10"; 16 bootargs = "console=ttyS0,115200n8 earlyprintk root=/dev/sda1 rootdelay=10";
17 stdout-path = &uart0;
17 }; 18 };
18 19
19 ocp@f1000000 { 20 ocp@f1000000 {
20 pinctrl: pinctrl@10000 { 21 pinctrl: pin-controller@10000 {
21 pmx_usb_power_enable: pmx-usb-power-enable { 22 pmx_usb_power_enable: pmx-usb-power-enable {
22 marvell,pins = "mpp29"; 23 marvell,pins = "mpp29";
23 marvell,function = "gpio"; 24 marvell,function = "gpio";
diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts
index 28b3ee369778..6467c7924195 100644
--- a/arch/arm/boot/dts/kirkwood-dreamplug.dts
+++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts
@@ -14,10 +14,11 @@
14 14
15 chosen { 15 chosen {
16 bootargs = "console=ttyS0,115200n8 earlyprintk"; 16 bootargs = "console=ttyS0,115200n8 earlyprintk";
17 stdout-path = &uart0;
17 }; 18 };
18 19
19 ocp@f1000000 { 20 ocp@f1000000 {
20 pinctrl: pinctrl@10000 { 21 pinctrl: pin-controller@10000 {
21 pmx_led_bluetooth: pmx-led-bluetooth { 22 pmx_led_bluetooth: pmx-led-bluetooth {
22 marvell,pins = "mpp47"; 23 marvell,pins = "mpp47";
23 marvell,function = "gpio"; 24 marvell,function = "gpio";
@@ -37,8 +38,6 @@
37 38
38 spi@10600 { 39 spi@10600 {
39 status = "okay"; 40 status = "okay";
40 pinctrl-0 = <&pmx_spi>;
41 pinctrl-names = "default";
42 41
43 m25p40@0 { 42 m25p40@0 {
44 #address-cells = <1>; 43 #address-cells = <1>;
diff --git a/arch/arm/boot/dts/kirkwood-ds109.dts b/arch/arm/boot/dts/kirkwood-ds109.dts
index 772092c94ca3..d4bcc1c7f6b3 100644
--- a/arch/arm/boot/dts/kirkwood-ds109.dts
+++ b/arch/arm/boot/dts/kirkwood-ds109.dts
@@ -25,6 +25,7 @@
25 25
26 chosen { 26 chosen {
27 bootargs = "console=ttyS0,115200n8"; 27 bootargs = "console=ttyS0,115200n8";
28 stdout-path = &uart0;
28 }; 29 };
29 30
30 gpio-fan-150-32-35 { 31 gpio-fan-150-32-35 {
diff --git a/arch/arm/boot/dts/kirkwood-ds110jv10.dts b/arch/arm/boot/dts/kirkwood-ds110jv10.dts
index aabafbe0da4c..95bf83b91b4a 100644
--- a/arch/arm/boot/dts/kirkwood-ds110jv10.dts
+++ b/arch/arm/boot/dts/kirkwood-ds110jv10.dts
@@ -25,6 +25,7 @@
25 25
26 chosen { 26 chosen {
27 bootargs = "console=ttyS0,115200n8"; 27 bootargs = "console=ttyS0,115200n8";
28 stdout-path = &uart0;
28 }; 29 };
29 30
30 gpio-fan-150-32-35 { 31 gpio-fan-150-32-35 {
diff --git a/arch/arm/boot/dts/kirkwood-ds111.dts b/arch/arm/boot/dts/kirkwood-ds111.dts
index 16ec7fbab573..61f47fbe44d0 100644
--- a/arch/arm/boot/dts/kirkwood-ds111.dts
+++ b/arch/arm/boot/dts/kirkwood-ds111.dts
@@ -24,6 +24,7 @@
24 24
25 chosen { 25 chosen {
26 bootargs = "console=ttyS0,115200n8"; 26 bootargs = "console=ttyS0,115200n8";
27 stdout-path = &uart0;
27 }; 28 };
28 29
29 gpio-fan-100-15-35-1 { 30 gpio-fan-100-15-35-1 {
diff --git a/arch/arm/boot/dts/kirkwood-ds112.dts b/arch/arm/boot/dts/kirkwood-ds112.dts
index cff1b2388765..bf4143c6cb8f 100644
--- a/arch/arm/boot/dts/kirkwood-ds112.dts
+++ b/arch/arm/boot/dts/kirkwood-ds112.dts
@@ -24,6 +24,7 @@
24 24
25 chosen { 25 chosen {
26 bootargs = "console=ttyS0,115200n8"; 26 bootargs = "console=ttyS0,115200n8";
27 stdout-path = &uart0;
27 }; 28 };
28 29
29 gpio-fan-100-15-35-1 { 30 gpio-fan-100-15-35-1 {
diff --git a/arch/arm/boot/dts/kirkwood-ds209.dts b/arch/arm/boot/dts/kirkwood-ds209.dts
index 330411993d38..6d25093a9ac4 100644
--- a/arch/arm/boot/dts/kirkwood-ds209.dts
+++ b/arch/arm/boot/dts/kirkwood-ds209.dts
@@ -24,6 +24,7 @@
24 24
25 chosen { 25 chosen {
26 bootargs = "console=ttyS0,115200n8"; 26 bootargs = "console=ttyS0,115200n8";
27 stdout-path = &uart0;
27 }; 28 };
28 29
29 gpio-fan-150-32-35 { 30 gpio-fan-150-32-35 {
diff --git a/arch/arm/boot/dts/kirkwood-ds210.dts b/arch/arm/boot/dts/kirkwood-ds210.dts
index 6052eaa37d4f..2f1933efcac1 100644
--- a/arch/arm/boot/dts/kirkwood-ds210.dts
+++ b/arch/arm/boot/dts/kirkwood-ds210.dts
@@ -26,6 +26,7 @@
26 26
27 chosen { 27 chosen {
28 bootargs = "console=ttyS0,115200n8"; 28 bootargs = "console=ttyS0,115200n8";
29 stdout-path = &uart0;
29 }; 30 };
30 31
31 gpio-fan-150-32-35 { 32 gpio-fan-150-32-35 {
diff --git a/arch/arm/boot/dts/kirkwood-ds212.dts b/arch/arm/boot/dts/kirkwood-ds212.dts
index 7f76cd30e84e..99afd462f956 100644
--- a/arch/arm/boot/dts/kirkwood-ds212.dts
+++ b/arch/arm/boot/dts/kirkwood-ds212.dts
@@ -27,6 +27,7 @@
27 27
28 chosen { 28 chosen {
29 bootargs = "console=ttyS0,115200n8"; 29 bootargs = "console=ttyS0,115200n8";
30 stdout-path = &uart0;
30 }; 31 };
31 32
32 gpio-fan-100-15-35-1 { 33 gpio-fan-100-15-35-1 {
diff --git a/arch/arm/boot/dts/kirkwood-ds212j.dts b/arch/arm/boot/dts/kirkwood-ds212j.dts
index 1f83a00f1f74..f5c4213fc67c 100644
--- a/arch/arm/boot/dts/kirkwood-ds212j.dts
+++ b/arch/arm/boot/dts/kirkwood-ds212j.dts
@@ -25,6 +25,7 @@
25 25
26 chosen { 26 chosen {
27 bootargs = "console=ttyS0,115200n8"; 27 bootargs = "console=ttyS0,115200n8";
28 stdout-path = &uart0;
28 }; 29 };
29 30
30 gpio-fan-100-32-35 { 31 gpio-fan-100-32-35 {
diff --git a/arch/arm/boot/dts/kirkwood-ds409.dts b/arch/arm/boot/dts/kirkwood-ds409.dts
index 0a573add44a2..e80a962ebba0 100644
--- a/arch/arm/boot/dts/kirkwood-ds409.dts
+++ b/arch/arm/boot/dts/kirkwood-ds409.dts
@@ -24,6 +24,7 @@
24 24
25 chosen { 25 chosen {
26 bootargs = "console=ttyS0,115200n8"; 26 bootargs = "console=ttyS0,115200n8";
27 stdout-path = &uart0;
27 }; 28 };
28 29
29 gpio-fan-150-15-18 { 30 gpio-fan-150-15-18 {
diff --git a/arch/arm/boot/dts/kirkwood-ds409slim.dts b/arch/arm/boot/dts/kirkwood-ds409slim.dts
index 1848a6245fd3..cae5af4b88b5 100644
--- a/arch/arm/boot/dts/kirkwood-ds409slim.dts
+++ b/arch/arm/boot/dts/kirkwood-ds409slim.dts
@@ -24,6 +24,7 @@
24 24
25 chosen { 25 chosen {
26 bootargs = "console=ttyS0,115200n8"; 26 bootargs = "console=ttyS0,115200n8";
27 stdout-path = &uart0;
27 }; 28 };
28 29
29 gpio-fan-150-32-35 { 30 gpio-fan-150-32-35 {
diff --git a/arch/arm/boot/dts/kirkwood-ds411.dts b/arch/arm/boot/dts/kirkwood-ds411.dts
index a1737b4311c6..623cd4a37d71 100644
--- a/arch/arm/boot/dts/kirkwood-ds411.dts
+++ b/arch/arm/boot/dts/kirkwood-ds411.dts
@@ -24,6 +24,7 @@
24 24
25 chosen { 25 chosen {
26 bootargs = "console=ttyS0,115200n8"; 26 bootargs = "console=ttyS0,115200n8";
27 stdout-path = &uart0;
27 }; 28 };
28 29
29 gpio-fan-100-15-35-1 { 30 gpio-fan-100-15-35-1 {
diff --git a/arch/arm/boot/dts/kirkwood-ds411j.dts b/arch/arm/boot/dts/kirkwood-ds411j.dts
index 0cde914eceae..3348e330f074 100644
--- a/arch/arm/boot/dts/kirkwood-ds411j.dts
+++ b/arch/arm/boot/dts/kirkwood-ds411j.dts
@@ -24,6 +24,7 @@
24 24
25 chosen { 25 chosen {
26 bootargs = "console=ttyS0,115200n8"; 26 bootargs = "console=ttyS0,115200n8";
27 stdout-path = &uart0;
27 }; 28 };
28 29
29 gpio-fan-150-15-18 { 30 gpio-fan-150-15-18 {
diff --git a/arch/arm/boot/dts/kirkwood-ds411slim.dts b/arch/arm/boot/dts/kirkwood-ds411slim.dts
index aef0cadc2c78..a0a1fad8b4de 100644
--- a/arch/arm/boot/dts/kirkwood-ds411slim.dts
+++ b/arch/arm/boot/dts/kirkwood-ds411slim.dts
@@ -24,6 +24,7 @@
24 24
25 chosen { 25 chosen {
26 bootargs = "console=ttyS0,115200n8"; 26 bootargs = "console=ttyS0,115200n8";
27 stdout-path = &uart0;
27 }; 28 };
28 29
29 gpio-fan-100-15-35-1 { 30 gpio-fan-100-15-35-1 {
diff --git a/arch/arm/boot/dts/kirkwood-goflexnet.dts b/arch/arm/boot/dts/kirkwood-goflexnet.dts
index eb9329420107..aa60a0b049a7 100644
--- a/arch/arm/boot/dts/kirkwood-goflexnet.dts
+++ b/arch/arm/boot/dts/kirkwood-goflexnet.dts
@@ -14,10 +14,11 @@
14 14
15 chosen { 15 chosen {
16 bootargs = "console=ttyS0,115200n8 earlyprintk root=/dev/sda1 rootdelay=10"; 16 bootargs = "console=ttyS0,115200n8 earlyprintk root=/dev/sda1 rootdelay=10";
17 stdout-path = &uart0;
17 }; 18 };
18 19
19 ocp@f1000000 { 20 ocp@f1000000 {
20 pinctrl: pinctrl@10000 { 21 pinctrl: pin-controller@10000 {
21 pmx_usb_power_enable: pmx-usb-power-enable { 22 pmx_usb_power_enable: pmx-usb-power-enable {
22 marvell,pins = "mpp29"; 23 marvell,pins = "mpp29";
23 marvell,function = "gpio"; 24 marvell,function = "gpio";
diff --git a/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts b/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
index 2d51fce74a5a..c5a1fc75c7a3 100644
--- a/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
+++ b/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
@@ -14,10 +14,11 @@
14 14
15 chosen { 15 chosen {
16 bootargs = "console=ttyS0,115200n8 earlyprintk"; 16 bootargs = "console=ttyS0,115200n8 earlyprintk";
17 stdout-path = &uart0;
17 }; 18 };
18 19
19 ocp@f1000000 { 20 ocp@f1000000 {
20 pinctrl: pinctrl@10000 { 21 pinctrl: pin-controller@10000 {
21 pmx_led_health_r: pmx-led-health-r { 22 pmx_led_health_r: pmx-led-health-r {
22 marvell,pins = "mpp46"; 23 marvell,pins = "mpp46";
23 marvell,function = "gpio"; 24 marvell,function = "gpio";
@@ -36,7 +37,6 @@
36 }; 37 };
37 }; 38 };
38 serial@12000 { 39 serial@12000 {
39 clock-frequency = <200000000>;
40 status = "ok"; 40 status = "ok";
41 }; 41 };
42 42
@@ -101,13 +101,19 @@
101 status = "okay"; 101 status = "okay";
102 102
103 ethphy0: ethernet-phy@0 { 103 ethphy0: ethernet-phy@0 {
104 compatible = "marvell,88e1121"; 104 /* Marvell 88E1121R */
105 compatible = "ethernet-phy-id0141.0cb0",
106 "ethernet-phy-ieee802.3-c22";
105 reg = <0>; 107 reg = <0>;
108 phy-connection-type = "rgmii-id";
106 }; 109 };
107 110
108 ethphy1: ethernet-phy@1 { 111 ethphy1: ethernet-phy@1 {
109 compatible = "marvell,88e1121"; 112 /* Marvell 88E1121R */
113 compatible = "ethernet-phy-id0141.0cb0",
114 "ethernet-phy-ieee802.3-c22";
110 reg = <1>; 115 reg = <1>;
116 phy-connection-type = "rgmii-id";
111 }; 117 };
112}; 118};
113 119
diff --git a/arch/arm/boot/dts/kirkwood-ib62x0.dts b/arch/arm/boot/dts/kirkwood-ib62x0.dts
index a1add3f215e3..bfa5edde179c 100644
--- a/arch/arm/boot/dts/kirkwood-ib62x0.dts
+++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts
@@ -14,10 +14,11 @@
14 14
15 chosen { 15 chosen {
16 bootargs = "console=ttyS0,115200n8 earlyprintk"; 16 bootargs = "console=ttyS0,115200n8 earlyprintk";
17 stdout-path = &uart0;
17 }; 18 };
18 19
19 ocp@f1000000 { 20 ocp@f1000000 {
20 pinctrl: pinctrl@10000 { 21 pinctrl: pin-controller@10000 {
21 pmx_led_os_red: pmx-led-os-red { 22 pmx_led_os_red: pmx-led-os-red {
22 marvell,pins = "mpp22"; 23 marvell,pins = "mpp22";
23 marvell,function = "gpio"; 24 marvell,function = "gpio";
@@ -104,8 +105,6 @@
104 105
105&nand { 106&nand {
106 status = "okay"; 107 status = "okay";
107 pinctrl-0 = <&pmx_nand>;
108 pinctrl-names = "default";
109 108
110 partition@0 { 109 partition@0 {
111 label = "u-boot"; 110 label = "u-boot";
diff --git a/arch/arm/boot/dts/kirkwood-iconnect.dts b/arch/arm/boot/dts/kirkwood-iconnect.dts
index 8d8c80e3656d..38e31d15a62d 100644
--- a/arch/arm/boot/dts/kirkwood-iconnect.dts
+++ b/arch/arm/boot/dts/kirkwood-iconnect.dts
@@ -14,6 +14,7 @@
14 14
15 chosen { 15 chosen {
16 bootargs = "console=ttyS0,115200n8 earlyprintk"; 16 bootargs = "console=ttyS0,115200n8 earlyprintk";
17 stdout-path = &uart0;
17 linux,initrd-start = <0x4500040>; 18 linux,initrd-start = <0x4500040>;
18 linux,initrd-end = <0x4800000>; 19 linux,initrd-end = <0x4800000>;
19 }; 20 };
@@ -29,7 +30,7 @@
29 }; 30 };
30 31
31 ocp@f1000000 { 32 ocp@f1000000 {
32 pinctrl: pinctrl@10000 { 33 pinctrl: pin-controller@10000 {
33 pmx_button_reset: pmx-button-reset { 34 pmx_button_reset: pmx-button-reset {
34 marvell,pins = "mpp12"; 35 marvell,pins = "mpp12";
35 marvell,function = "gpio"; 36 marvell,function = "gpio";
diff --git a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
index 59e7a5adeedb..05291f3990d0 100644
--- a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
+++ b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
@@ -14,10 +14,11 @@
14 14
15 chosen { 15 chosen {
16 bootargs = "console=ttyS0,115200n8 earlyprintk"; 16 bootargs = "console=ttyS0,115200n8 earlyprintk";
17 stdout-path = &uart0;
17 }; 18 };
18 19
19 ocp@f1000000 { 20 ocp@f1000000 {
20 pinctrl: pinctrl@10000 { 21 pinctrl: pin-controller@10000 {
21 pinctrl-0 = < &pmx_led_sata_brt_ctrl_1 22 pinctrl-0 = < &pmx_led_sata_brt_ctrl_1
22 &pmx_led_sata_brt_ctrl_2 23 &pmx_led_sata_brt_ctrl_2
23 &pmx_led_backup_brt_ctrl_1 24 &pmx_led_backup_brt_ctrl_1
diff --git a/arch/arm/boot/dts/kirkwood-km_common.dtsi b/arch/arm/boot/dts/kirkwood-km_common.dtsi
new file mode 100644
index 000000000000..8367c772c764
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-km_common.dtsi
@@ -0,0 +1,48 @@
1/ {
2 chosen {
3 bootargs = "console=ttyS0,115200n8 earlyprintk";
4 stdout-path = &uart0;
5 };
6
7 mbus {
8 pcie-controller {
9 status = "okay";
10
11 pcie@1,0 {
12 status = "okay";
13 };
14 };
15 };
16
17 ocp@f1000000 {
18 pinctrl: pin-controller@10000 {
19 pinctrl-0 = < &pmx_i2c_gpio_sda &pmx_i2c_gpio_scl >;
20 pinctrl-names = "default";
21
22 pmx_i2c_gpio_sda: pmx-gpio-sda {
23 marvell,pins = "mpp8";
24 marvell,function = "gpio";
25 };
26 pmx_i2c_gpio_scl: pmx-gpio-scl {
27 marvell,pins = "mpp9";
28 marvell,function = "gpio";
29 };
30 };
31
32 serial@12000 {
33 status = "okay";
34 };
35 };
36
37 i2c@0 {
38 compatible = "i2c-gpio";
39 gpios = < &gpio0 8 GPIO_ACTIVE_HIGH /* sda */
40 &gpio0 9 GPIO_ACTIVE_HIGH>; /* scl */
41 i2c-gpio,delay-us = <2>; /* ~100 kHz */
42 };
43};
44
45&nand {
46 status = "okay";
47 chip-delay = <25>;
48};
diff --git a/arch/arm/boot/dts/kirkwood-km_fixedeth.dts b/arch/arm/boot/dts/kirkwood-km_fixedeth.dts
new file mode 100644
index 000000000000..9895f2b10f8a
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-km_fixedeth.dts
@@ -0,0 +1,23 @@
1/dts-v1/;
2
3#include "kirkwood.dtsi"
4#include "kirkwood-98dx4122.dtsi"
5#include "kirkwood-km_common.dtsi"
6
7/ {
8 model = "Keymile Kirkwood Fixed Eth";
9 compatible = "keymile,km_fixedeth", "marvell,kirkwood-98DX4122", "marvell,kirkwood";
10
11 memory {
12 device_type = "memory";
13 reg = <0x00000000 0x10000000>;
14 };
15};
16
17&eth0 {
18 status = "okay";
19 ethernet0-port@0 {
20 speed = <1000>; /* <SPEED_1000> */
21 duplex = <1>; /* <DUPLEX_FULL> */
22 };
23};
diff --git a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts
index 04a1e44541b3..235bf382fff9 100644
--- a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts
+++ b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts
@@ -2,6 +2,7 @@
2 2
3#include "kirkwood.dtsi" 3#include "kirkwood.dtsi"
4#include "kirkwood-98dx4122.dtsi" 4#include "kirkwood-98dx4122.dtsi"
5#include "kirkwood-km_common.dtsi"
5 6
6/ { 7/ {
7 model = "Keymile Kirkwood Reference Design"; 8 model = "Keymile Kirkwood Reference Design";
@@ -11,44 +12,6 @@
11 device_type = "memory"; 12 device_type = "memory";
12 reg = <0x00000000 0x08000000>; 13 reg = <0x00000000 0x08000000>;
13 }; 14 };
14
15 chosen {
16 bootargs = "console=ttyS0,115200n8 earlyprintk";
17 };
18
19 ocp@f1000000 {
20 pinctrl: pinctrl@10000 {
21 pinctrl-0 = < &pmx_i2c_gpio_sda &pmx_i2c_gpio_scl >;
22 pinctrl-names = "default";
23
24 pmx_i2c_gpio_sda: pmx-gpio-sda {
25 marvell,pins = "mpp8";
26 marvell,function = "gpio";
27 };
28 pmx_i2c_gpio_scl: pmx-gpio-scl {
29 marvell,pins = "mpp9";
30 marvell,function = "gpio";
31 };
32 };
33
34 serial@12000 {
35 status = "ok";
36 };
37 };
38
39 i2c@0 {
40 compatible = "i2c-gpio";
41 gpios = < &gpio0 8 GPIO_ACTIVE_HIGH /* sda */
42 &gpio0 9 GPIO_ACTIVE_HIGH>; /* scl */
43 i2c-gpio,delay-us = <2>; /* ~100 kHz */
44 };
45};
46
47&nand {
48 pinctrl-0 = <&pmx_nand>;
49 pinctrl-names = "default";
50 status = "ok";
51 chip-delay = <25>;
52}; 15};
53 16
54&mdio { 17&mdio {
diff --git a/arch/arm/boot/dts/kirkwood-laplug.dts b/arch/arm/boot/dts/kirkwood-laplug.dts
index 6761ffa2c4ab..24425660e973 100644
--- a/arch/arm/boot/dts/kirkwood-laplug.dts
+++ b/arch/arm/boot/dts/kirkwood-laplug.dts
@@ -24,6 +24,7 @@
24 24
25 chosen { 25 chosen {
26 bootargs = "console=ttyS0,115200n8 earlyprintk"; 26 bootargs = "console=ttyS0,115200n8 earlyprintk";
27 stdout-path = &uart0;
27 }; 28 };
28 29
29 mbus { 30 mbus {
@@ -37,14 +38,10 @@
37 38
38 ocp@f1000000 { 39 ocp@f1000000 {
39 serial@12000 { 40 serial@12000 {
40 pinctrl-0 = <&pmx_uart0>;
41 pinctrl-names = "default";
42 status = "okay"; 41 status = "okay";
43 }; 42 };
44 43
45 i2c@11000 { 44 i2c@11000 {
46 pinctrl-0 = <&pmx_twsi0>;
47 pinctrl-names = "default";
48 status = "okay"; 45 status = "okay";
49 46
50 eeprom@50 { 47 eeprom@50 {
@@ -54,7 +51,7 @@
54 }; 51 };
55 }; 52 };
56 53
57 pinctrl: pinctrl@10000 { 54 pinctrl: pin-controller@10000 {
58 pmx_usb_power_enable: pmx-usb-power-enable { 55 pmx_usb_power_enable: pmx-usb-power-enable {
59 marvell,pins = "mpp14"; 56 marvell,pins = "mpp14";
60 marvell,function = "gpio"; 57 marvell,function = "gpio";
@@ -139,7 +136,6 @@
139&nand { 136&nand {
140 /* Total size : 512MB */ 137 /* Total size : 512MB */
141 status = "okay"; 138 status = "okay";
142 pinctrl-0 = <&pmx_nand>;
143 139
144 partition@0 { 140 partition@0 {
145 label = "u-boot"; 141 label = "u-boot";
diff --git a/arch/arm/boot/dts/kirkwood-lsxl.dtsi b/arch/arm/boot/dts/kirkwood-lsxl.dtsi
index 1656653d339b..53484474df1f 100644
--- a/arch/arm/boot/dts/kirkwood-lsxl.dtsi
+++ b/arch/arm/boot/dts/kirkwood-lsxl.dtsi
@@ -4,10 +4,11 @@
4/ { 4/ {
5 chosen { 5 chosen {
6 bootargs = "console=ttyS0,115200n8 earlyprintk"; 6 bootargs = "console=ttyS0,115200n8 earlyprintk";
7 stdout-path = &uart0;
7 }; 8 };
8 9
9 ocp@f1000000 { 10 ocp@f1000000 {
10 pinctrl: pinctrl@10000 { 11 pinctrl: pin-controller@10000 {
11 pmx_power_hdd: pmx-power-hdd { 12 pmx_power_hdd: pmx-power-hdd {
12 marvell,pins = "mpp10"; 13 marvell,pins = "mpp10";
13 marvell,function = "gpo"; 14 marvell,function = "gpo";
diff --git a/arch/arm/boot/dts/kirkwood-mplcec4.dts b/arch/arm/boot/dts/kirkwood-mplcec4.dts
index 73722c067501..f3a991837515 100644
--- a/arch/arm/boot/dts/kirkwood-mplcec4.dts
+++ b/arch/arm/boot/dts/kirkwood-mplcec4.dts
@@ -12,9 +12,10 @@
12 reg = <0x00000000 0x20000000>; 12 reg = <0x00000000 0x20000000>;
13 }; 13 };
14 14
15 chosen { 15 chosen {
16 bootargs = "console=ttyS0,115200n8 earlyprintk"; 16 bootargs = "console=ttyS0,115200n8 earlyprintk";
17 }; 17 stdout-path = &uart0;
18 };
18 19
19 mbus { 20 mbus {
20 pcie-controller { 21 pcie-controller {
@@ -27,7 +28,7 @@
27 }; 28 };
28 29
29 ocp@f1000000 { 30 ocp@f1000000 {
30 pinctrl: pinctrl@10000 { 31 pinctrl: pin-controller@10000 {
31 pmx_led_health: pmx-led-health { 32 pmx_led_health: pmx-led-health {
32 marvell,pins = "mpp7"; 33 marvell,pins = "mpp7";
33 marvell,function = "gpo"; 34 marvell,function = "gpo";
@@ -89,11 +90,9 @@
89 90
90 }; 91 };
91 92
92 serial@12000 { 93 serial@12000 {
93 status = "ok"; 94 status = "okay";
94 pinctrl-0 = <&pmx_uart0>; 95 };
95 pinctrl-names = "default";
96 };
97 96
98 rtc@10300 { 97 rtc@10300 {
99 status = "disabled"; 98 status = "disabled";
@@ -163,8 +162,6 @@
163}; 162};
164 163
165&nand { 164&nand {
166 pinctrl-0 = <&pmx_nand>;
167 pinctrl-names = "default";
168 status = "okay"; 165 status = "okay";
169 166
170 partition@0 { 167 partition@0 {
diff --git a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
index 32c6fb4a1162..8f76d28759a3 100644
--- a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
+++ b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
@@ -28,10 +28,21 @@
28 28
29 chosen { 29 chosen {
30 bootargs = "console=ttyS0,115200n8 earlyprintk"; 30 bootargs = "console=ttyS0,115200n8 earlyprintk";
31 stdout-path = &uart0;
31 }; 32 };
32 33
34 mbus {
35 pcie-controller {
36 status = "okay";
37
38 pcie@1,0 {
39 status = "okay";
40 };
41 };
42 };
43
33 ocp@f1000000 { 44 ocp@f1000000 {
34 pinctrl@10000 { 45 pin-controller@10000 {
35 pmx_usb_led: pmx-usb-led { 46 pmx_usb_led: pmx-usb-led {
36 marvell,pins = "mpp12"; 47 marvell,pins = "mpp12";
37 marvell,function = "gpo"; 48 marvell,function = "gpo";
@@ -49,8 +60,6 @@
49 }; 60 };
50 61
51 spi@10600 { 62 spi@10600 {
52 pinctrl-0 = <&pmx_spi>;
53 pinctrl-names = "default";
54 status = "okay"; 63 status = "okay";
55 64
56 flash@0 { 65 flash@0 {
@@ -64,22 +73,11 @@
64 }; 73 };
65 74
66 serial@12000 { 75 serial@12000 {
67 pinctrl-0 = <&pmx_uart0>;
68 pinctrl-names = "default";
69 clock-frequency = <200000000>;
70 status = "ok";
71 };
72
73 ehci@50000 {
74 status = "okay"; 76 status = "okay";
75 }; 77 };
76 78
77 pcie-controller { 79 ehci@50000 {
78 status = "okay"; 80 status = "okay";
79
80 pcie@1,0 {
81 status = "okay";
82 };
83 }; 81 };
84 }; 82 };
85 83
diff --git a/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts b/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts
index 4838478019cc..fd733c63bc27 100644
--- a/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts
+++ b/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts
@@ -25,6 +25,7 @@
25 25
26 chosen { 26 chosen {
27 bootargs = "console=ttyS0,115200n8 earlyprintk"; 27 bootargs = "console=ttyS0,115200n8 earlyprintk";
28 stdout-path = &uart0;
28 }; 29 };
29 30
30 mbus { 31 mbus {
@@ -38,7 +39,7 @@
38 }; 39 };
39 40
40 ocp@f1000000 { 41 ocp@f1000000 {
41 pinctrl: pinctrl@10000 { 42 pinctrl: pin-controller@10000 {
42 pmx_button_power: pmx-button-power { 43 pmx_button_power: pmx-button-power {
43 marvell,pins = "mpp47"; 44 marvell,pins = "mpp47";
44 marvell,function = "gpio"; 45 marvell,function = "gpio";
@@ -112,8 +113,6 @@
112 }; 113 };
113 114
114 serial@12000 { 115 serial@12000 {
115 pinctrl-0 = <&pmx_uart0>;
116 pinctrl-names = "default";
117 status = "okay"; 116 status = "okay";
118 }; 117 };
119 118
diff --git a/arch/arm/boot/dts/kirkwood-netgear_readynas_nv+_v2.dts b/arch/arm/boot/dts/kirkwood-netgear_readynas_nv+_v2.dts
index 7c8a0d9d8d1f..b514d643fb6c 100644
--- a/arch/arm/boot/dts/kirkwood-netgear_readynas_nv+_v2.dts
+++ b/arch/arm/boot/dts/kirkwood-netgear_readynas_nv+_v2.dts
@@ -25,6 +25,7 @@
25 25
26 chosen { 26 chosen {
27 bootargs = "console=ttyS0,115200n8 earlyprintk"; 27 bootargs = "console=ttyS0,115200n8 earlyprintk";
28 stdout-path = &uart0;
28 }; 29 };
29 30
30 mbus { 31 mbus {
@@ -40,7 +41,7 @@
40 }; 41 };
41 42
42 ocp@f1000000 { 43 ocp@f1000000 {
43 pinctrl: pinctrl@10000 { 44 pinctrl: pin-controller@10000 {
44 pmx_button_power: pmx-button-power { 45 pmx_button_power: pmx-button-power {
45 marvell,pins = "mpp47"; 46 marvell,pins = "mpp47";
46 marvell,function = "gpio"; 47 marvell,function = "gpio";
@@ -119,8 +120,6 @@
119 }; 120 };
120 121
121 serial@12000 { 122 serial@12000 {
122 pinctrl-0 = <&pmx_uart0>;
123 pinctrl-names = "default";
124 status = "okay"; 123 status = "okay";
125 }; 124 };
126 125
diff --git a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
index e6e5ec4fe6b9..fe6c0246db1a 100644
--- a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
+++ b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
@@ -4,10 +4,11 @@
4/ { 4/ {
5 chosen { 5 chosen {
6 bootargs = "console=ttyS0,115200n8"; 6 bootargs = "console=ttyS0,115200n8";
7 stdout-path = &uart0;
7 }; 8 };
8 9
9 ocp@f1000000 { 10 ocp@f1000000 {
10 pinctrl: pinctrl@10000 { 11 pinctrl: pin-controller@10000 {
11 pmx_ns2_sata0: pmx-ns2-sata0 { 12 pmx_ns2_sata0: pmx-ns2-sata0 {
12 marvell,pins = "mpp21"; 13 marvell,pins = "mpp21";
13 marvell,function = "sata0"; 14 marvell,function = "sata0";
@@ -19,14 +20,10 @@
19 }; 20 };
20 21
21 serial@12000 { 22 serial@12000 {
22 pinctrl-0 = <&pmx_uart0>;
23 pinctrl-names = "default";
24 status = "okay"; 23 status = "okay";
25 }; 24 };
26 25
27 spi@10600 { 26 spi@10600 {
28 pinctrl-0 = <&pmx_spi>;
29 pinctrl-names = "default";
30 status = "okay"; 27 status = "okay";
31 28
32 flash@0 { 29 flash@0 {
@@ -45,8 +42,6 @@
45 }; 42 };
46 43
47 i2c@11000 { 44 i2c@11000 {
48 pinctrl-0 = <&pmx_twsi0>;
49 pinctrl-names = "default";
50 status = "okay"; 45 status = "okay";
51 46
52 eeprom@50 { 47 eeprom@50 {
diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts
index 0a07af9d8e58..6139df0f376c 100644
--- a/arch/arm/boot/dts/kirkwood-nsa310.dts
+++ b/arch/arm/boot/dts/kirkwood-nsa310.dts
@@ -1,6 +1,6 @@
1/dts-v1/; 1/dts-v1/;
2 2
3#include "kirkwood-nsa310-common.dtsi" 3#include "kirkwood-nsa3x0-common.dtsi"
4 4
5/ { 5/ {
6 compatible = "zyxel,nsa310", "marvell,kirkwood-88f6281", "marvell,kirkwood"; 6 compatible = "zyxel,nsa310", "marvell,kirkwood-88f6281", "marvell,kirkwood";
@@ -12,6 +12,7 @@
12 12
13 chosen { 13 chosen {
14 bootargs = "console=ttyS0,115200"; 14 bootargs = "console=ttyS0,115200";
15 stdout-path = &uart0;
15 }; 16 };
16 17
17 mbus { 18 mbus {
@@ -25,7 +26,7 @@
25 }; 26 };
26 27
27 ocp@f1000000 { 28 ocp@f1000000 {
28 pinctrl: pinctrl@10000 { 29 pinctrl: pin-controller@10000 {
29 pinctrl-0 = <&pmx_unknown>; 30 pinctrl-0 = <&pmx_unknown>;
30 pinctrl-names = "default"; 31 pinctrl-names = "default";
31 32
@@ -59,26 +60,6 @@
59 marvell,function = "gpio"; 60 marvell,function = "gpio";
60 }; 61 };
61 62
62 pmx_btn_reset: pmx-btn-reset {
63 marvell,pins = "mpp36";
64 marvell,function = "gpio";
65 };
66
67 pmx_btn_copy: pmx-btn-copy {
68 marvell,pins = "mpp37";
69 marvell,function = "gpio";
70 };
71
72 pmx_led_copy_green: pmx-led-copy-green {
73 marvell,pins = "mpp39";
74 marvell,function = "gpio";
75 };
76
77 pmx_led_copy_red: pmx-led-copy-red {
78 marvell,pins = "mpp40";
79 marvell,function = "gpio";
80 };
81
82 pmx_led_hdd_green: pmx-led-hdd-green { 63 pmx_led_hdd_green: pmx-led-hdd-green {
83 marvell,pins = "mpp41"; 64 marvell,pins = "mpp41";
84 marvell,function = "gpio"; 65 marvell,function = "gpio";
@@ -94,10 +75,6 @@
94 marvell,function = "gpio"; 75 marvell,function = "gpio";
95 }; 76 };
96 77
97 pmx_btn_power: pmx-btn-power {
98 marvell,pins = "mpp46";
99 marvell,function = "gpio";
100 };
101 }; 78 };
102 79
103 i2c@11000 { 80 i2c@11000 {
@@ -110,30 +87,6 @@
110 }; 87 };
111 }; 88 };
112 89
113 gpio_keys {
114 compatible = "gpio-keys";
115 #address-cells = <1>;
116 #size-cells = <0>;
117 pinctrl-0 = <&pmx_btn_reset &pmx_btn_copy &pmx_btn_power>;
118 pinctrl-names = "default";
119
120 button@1 {
121 label = "Power Button";
122 linux,code = <KEY_POWER>;
123 gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
124 };
125 button@2 {
126 label = "Copy Button";
127 linux,code = <KEY_COPY>;
128 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
129 };
130 button@3 {
131 label = "Reset Button";
132 linux,code = <KEY_RESTART>;
133 gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
134 };
135 };
136
137 gpio-leds { 90 gpio-leds {
138 compatible = "gpio-leds"; 91 compatible = "gpio-leds";
139 pinctrl-0 = <&pmx_led_esata_green &pmx_led_esata_red 92 pinctrl-0 = <&pmx_led_esata_green &pmx_led_esata_red
diff --git a/arch/arm/boot/dts/kirkwood-nsa310a.dts b/arch/arm/boot/dts/kirkwood-nsa310a.dts
index 27ca6a79c48a..3d2b3d494c19 100644
--- a/arch/arm/boot/dts/kirkwood-nsa310a.dts
+++ b/arch/arm/boot/dts/kirkwood-nsa310a.dts
@@ -1,6 +1,6 @@
1/dts-v1/; 1/dts-v1/;
2 2
3#include "kirkwood-nsa310-common.dtsi" 3#include "kirkwood-nsa3x0-common.dtsi"
4 4
5/* 5/*
6 * There are at least two different NSA310 designs. This variant does 6 * There are at least two different NSA310 designs. This variant does
@@ -17,10 +17,11 @@
17 17
18 chosen { 18 chosen {
19 bootargs = "console=ttyS0,115200"; 19 bootargs = "console=ttyS0,115200";
20 stdout-path = &uart0;
20 }; 21 };
21 22
22 ocp@f1000000 { 23 ocp@f1000000 {
23 pinctrl: pinctrl@10000 { 24 pinctrl: pin-controller@10000 {
24 pinctrl-names = "default"; 25 pinctrl-names = "default";
25 26
26 pmx_led_esata_green: pmx-led-esata-green { 27 pmx_led_esata_green: pmx-led-esata-green {
@@ -38,11 +39,6 @@
38 marvell,function = "gpio"; 39 marvell,function = "gpio";
39 }; 40 };
40 41
41 pmx_usb_power_off: pmx-usb-power-off {
42 marvell,pins = "mpp21";
43 marvell,function = "gpio";
44 };
45
46 pmx_led_sys_green: pmx-led-sys-green { 42 pmx_led_sys_green: pmx-led-sys-green {
47 marvell,pins = "mpp28"; 43 marvell,pins = "mpp28";
48 marvell,function = "gpio"; 44 marvell,function = "gpio";
@@ -53,26 +49,6 @@
53 marvell,function = "gpio"; 49 marvell,function = "gpio";
54 }; 50 };
55 51
56 pmx_btn_reset: pmx-btn-reset {
57 marvell,pins = "mpp36";
58 marvell,function = "gpio";
59 };
60
61 pmx_btn_copy: pmx-btn-copy {
62 marvell,pins = "mpp37";
63 marvell,function = "gpio";
64 };
65
66 pmx_led_copy_green: pmx-led-copy-green {
67 marvell,pins = "mpp39";
68 marvell,function = "gpio";
69 };
70
71 pmx_led_copy_red: pmx-led-copy-red {
72 marvell,pins = "mpp40";
73 marvell,function = "gpio";
74 };
75
76 pmx_led_hdd_green: pmx-led-hdd-green { 52 pmx_led_hdd_green: pmx-led-hdd-green {
77 marvell,pins = "mpp41"; 53 marvell,pins = "mpp41";
78 marvell,function = "gpio"; 54 marvell,function = "gpio";
@@ -83,11 +59,6 @@
83 marvell,function = "gpio"; 59 marvell,function = "gpio";
84 }; 60 };
85 61
86 pmx_btn_power: pmx-btn-power {
87 marvell,pins = "mpp46";
88 marvell,function = "gpio";
89 };
90
91 }; 62 };
92 63
93 i2c@11000 { 64 i2c@11000 {
@@ -100,28 +71,6 @@
100 }; 71 };
101 }; 72 };
102 73
103 gpio_keys {
104 compatible = "gpio-keys";
105 #address-cells = <1>;
106 #size-cells = <0>;
107
108 button@1 {
109 label = "Power Button";
110 linux,code = <KEY_POWER>;
111 gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
112 };
113 button@2 {
114 label = "Copy Button";
115 linux,code = <KEY_COPY>;
116 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
117 };
118 button@3 {
119 label = "Reset Button";
120 linux,code = <KEY_RESTART>;
121 gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
122 };
123 };
124
125 gpio-leds { 74 gpio-leds {
126 compatible = "gpio-leds"; 75 compatible = "gpio-leds";
127 76
diff --git a/arch/arm/boot/dts/kirkwood-nsa320.dts b/arch/arm/boot/dts/kirkwood-nsa320.dts
new file mode 100644
index 000000000000..24f686d1044d
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-nsa320.dts
@@ -0,0 +1,215 @@
1/* Device tree file for the Zyxel NSA 320 NAS box.
2 *
3 * Copyright (c) 2014, Adam Baker <linux@baker-net.org.uk>
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
8 * 2 of the License, or (at your option) any later version.
9 *
10 * Based upon the board setup file created by Peter Schildmann */
11
12/dts-v1/;
13
14#include "kirkwood-nsa3x0-common.dtsi"
15
16/ {
17 model = "Zyxel NSA320";
18 compatible = "zyxel,nsa320", "marvell,kirkwood-88f6281", "marvell,kirkwood";
19
20 memory {
21 device_type = "memory";
22 reg = <0x00000000 0x20000000>;
23 };
24
25 chosen {
26 bootargs = "console=ttyS0,115200";
27 stdout-path = &uart0;
28 };
29
30 mbus {
31 pcie-controller {
32 status = "okay";
33
34 pcie@1,0 {
35 status = "okay";
36 };
37 };
38 };
39
40 ocp@f1000000 {
41 pinctrl: pin-controller@10000 {
42 pinctrl-names = "default";
43
44 /* SATA Activity and Present pins are not connected */
45 pmx_sata0: pmx-sata0 {
46 marvell,pins ;
47 marvell,function = "sata0";
48 };
49
50 pmx_sata1: pmx-sata1 {
51 marvell,pins ;
52 marvell,function = "sata1";
53 };
54
55 pmx_led_hdd2_green: pmx-led-hdd2-green {
56 marvell,pins = "mpp12";
57 marvell,function = "gpio";
58 };
59
60 pmx_led_hdd2_red: pmx-led-hdd2-red {
61 marvell,pins = "mpp13";
62 marvell,function = "gpio";
63 };
64
65 pmx_mcu_data: pmx-mcu-data {
66 marvell,pins = "mpp14";
67 marvell,function = "gpio";
68 };
69
70 pmx_led_usb_green: pmx-led-usb-green {
71 marvell,pins = "mpp15";
72 marvell,function = "gpio";
73 };
74
75 pmx_mcu_clk: pmx-mcu-clk {
76 marvell,pins = "mpp16";
77 marvell,function = "gpio";
78 };
79
80 pmx_mcu_act: pmx-mcu-act {
81 marvell,pins = "mpp17";
82 marvell,function = "gpio";
83 };
84
85 pmx_led_sys_green: pmx-led-sys-green {
86 marvell,pins = "mpp28";
87 marvell,function = "gpio";
88 };
89
90 pmx_led_sys_orange: pmx-led-sys-orange {
91 marvell,pins = "mpp29";
92 marvell,function = "gpio";
93 };
94
95 pmx_led_hdd1_green: pmx-led-hdd1-green {
96 marvell,pins = "mpp41";
97 marvell,function = "gpio";
98 };
99
100 pmx_led_hdd1_red: pmx-led-hdd1-red {
101 marvell,pins = "mpp42";
102 marvell,function = "gpio";
103 };
104
105 pmx_htp: pmx-htp {
106 marvell,pins = "mpp43";
107 marvell,function = "gpio";
108 };
109
110 /* Buzzer needs to be switched at around 1kHz so is
111 not compatible with the gpio-beeper driver. */
112 pmx_buzzer: pmx-buzzer {
113 marvell,pins = "mpp44";
114 marvell,function = "gpio";
115 };
116
117 pmx_vid_b1: pmx-vid-b1 {
118 marvell,pins = "mpp45";
119 marvell,function = "gpio";
120 };
121
122 pmx_power_resume_data: pmx-power-resume-data {
123 marvell,pins = "mpp47";
124 marvell,function = "gpio";
125 };
126
127 pmx_power_resume_clk: pmx-power-resume-clk {
128 marvell,pins = "mpp49";
129 marvell,function = "gpio";
130 };
131 };
132
133 i2c@11000 {
134 status = "okay";
135
136 pcf8563: pcf8563@51 {
137 compatible = "nxp,pcf8563";
138 reg = <0x51>;
139 };
140 };
141 };
142
143 regulators {
144 usb0_power: regulator@1 {
145 enable-active-high;
146 };
147 };
148
149 gpio-leds {
150 compatible = "gpio-leds";
151 pinctrl-0 = <&pmx_led_hdd2_green &pmx_led_hdd2_red
152 &pmx_led_usb_green
153 &pmx_led_sys_green &pmx_led_sys_orange
154 &pmx_led_copy_green &pmx_led_copy_red
155 &pmx_led_hdd1_green &pmx_led_hdd1_red>;
156 pinctrl-names = "default";
157
158 green-sys {
159 label = "nsa320:green:sys";
160 gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
161 };
162 orange-sys {
163 label = "nsa320:orange:sys";
164 gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
165 };
166 green-hdd1 {
167 label = "nsa320:green:hdd1";
168 gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
169 };
170 red-hdd1 {
171 label = "nsa320:red:hdd1";
172 gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
173 };
174 green-hdd2 {
175 label = "nsa320:green:hdd2";
176 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
177 };
178 red-hdd2 {
179 label = "nsa320:red:hdd2";
180 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
181 };
182 green-usb {
183 label = "nsa320:green:usb";
184 gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
185 };
186 green-copy {
187 label = "nsa320:green:copy";
188 gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
189 };
190 red-copy {
191 label = "nsa320:red:copy";
192 gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
193 };
194 };
195
196 /* The following pins are currently not assigned to a driver,
197 some of them should be configured as inputs.
198 pinctrl-0 = <&pmx_mcu_data &pmx_mcu_clk &pmx_mcu_act
199 &pmx_htp &pmx_vid_b1
200 &pmx_power_resume_data &pmx_power_resume_clk>; */
201};
202
203&mdio {
204 status = "okay";
205 ethphy0: ethernet-phy@1 {
206 reg = <1>;
207 };
208};
209
210&eth0 {
211 status = "okay";
212 ethernet0-port@0 {
213 phy-handle = <&ethphy0>;
214 };
215};
diff --git a/arch/arm/boot/dts/kirkwood-nsa310-common.dtsi b/arch/arm/boot/dts/kirkwood-nsa3x0-common.dtsi
index aa78c2d11fe7..2075a2e828f1 100644
--- a/arch/arm/boot/dts/kirkwood-nsa310-common.dtsi
+++ b/arch/arm/boot/dts/kirkwood-nsa3x0-common.dtsi
@@ -4,18 +4,53 @@
4/ { 4/ {
5 model = "ZyXEL NSA310"; 5 model = "ZyXEL NSA310";
6 6
7 mbus {
8 pcie-controller {
9 status = "okay";
10
11 pcie@1,0 {
12 status = "okay";
13 };
14 };
15 };
16
7 ocp@f1000000 { 17 ocp@f1000000 {
8 pinctrl: pinctrl@10000 { 18 pinctrl: pin-controller@10000 {
9 19
10 pmx_usb_power_off: pmx-usb-power-off { 20 pmx_usb_power: pmx-usb-power {
11 marvell,pins = "mpp21"; 21 marvell,pins = "mpp21";
12 marvell,function = "gpio"; 22 marvell,function = "gpio";
13 }; 23 };
24
14 pmx_pwr_off: pmx-pwr-off { 25 pmx_pwr_off: pmx-pwr-off {
15 marvell,pins = "mpp48"; 26 marvell,pins = "mpp48";
16 marvell,function = "gpio"; 27 marvell,function = "gpio";
17 }; 28 };
18 29
30 pmx_btn_reset: pmx-btn-reset {
31 marvell,pins = "mpp36";
32 marvell,function = "gpio";
33 };
34
35 pmx_btn_copy: pmx-btn-copy {
36 marvell,pins = "mpp37";
37 marvell,function = "gpio";
38 };
39
40 pmx_btn_power: pmx-btn-power {
41 marvell,pins = "mpp46";
42 marvell,function = "gpio";
43 };
44
45 pmx_led_copy_green: pmx-led-copy-green {
46 marvell,pins = "mpp39";
47 marvell,function = "gpio";
48 };
49
50 pmx_led_copy_red: pmx-led-copy-red {
51 marvell,pins = "mpp40";
52 marvell,function = "gpio";
53 };
19 }; 54 };
20 55
21 serial@12000 { 56 serial@12000 {
@@ -26,14 +61,6 @@
26 status = "okay"; 61 status = "okay";
27 nr-ports = <2>; 62 nr-ports = <2>;
28 }; 63 };
29
30 pcie-controller {
31 status = "okay";
32
33 pcie@1,0 {
34 status = "okay";
35 };
36 };
37 }; 64 };
38 65
39 gpio_poweroff { 66 gpio_poweroff {
@@ -43,17 +70,42 @@
43 gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>; 70 gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
44 }; 71 };
45 72
73 gpio_keys {
74 compatible = "gpio-keys";
75 #address-cells = <1>;
76 #size-cells = <0>;
77 pinctrl-0 = <&pmx_btn_reset &pmx_btn_copy &pmx_btn_power>;
78 pinctrl-names = "default";
79
80 button@1 {
81 label = "Power Button";
82 linux,code = <KEY_POWER>;
83 gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
84 };
85 button@2 {
86 label = "Copy Button";
87 linux,code = <KEY_COPY>;
88 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
89 };
90 button@3 {
91 label = "Reset Button";
92 linux,code = <KEY_RESTART>;
93 gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
94 };
95 };
96
97
46 regulators { 98 regulators {
47 compatible = "simple-bus"; 99 compatible = "simple-bus";
48 #address-cells = <1>; 100 #address-cells = <1>;
49 #size-cells = <0>; 101 #size-cells = <0>;
50 pinctrl-0 = <&pmx_usb_power_off>; 102 pinctrl-0 = <&pmx_usb_power>;
51 pinctrl-names = "default"; 103 pinctrl-names = "default";
52 104
53 usb0_power_off: regulator@1 { 105 usb0_power: regulator@1 {
54 compatible = "regulator-fixed"; 106 compatible = "regulator-fixed";
55 reg = <1>; 107 reg = <1>;
56 regulator-name = "USB Power Off"; 108 regulator-name = "USB Power";
57 regulator-min-microvolt = <5000000>; 109 regulator-min-microvolt = <5000000>;
58 regulator-max-microvolt = <5000000>; 110 regulator-max-microvolt = <5000000>;
59 regulator-always-on; 111 regulator-always-on;
diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
index 0650beafc1de..fb9dc227255d 100644
--- a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
+++ b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
@@ -14,19 +14,16 @@
14 14
15 chosen { 15 chosen {
16 bootargs = "console=ttyS0,115200n8 earlyprintk"; 16 bootargs = "console=ttyS0,115200n8 earlyprintk";
17 stdout-path = &uart0;
17 }; 18 };
18 19
19 ocp@f1000000 { 20 ocp@f1000000 {
20 serial@12000 { 21 serial@12000 {
21 status = "ok"; 22 status = "okay";
22 pinctrl-0 = <&pmx_uart0>;
23 pinctrl-names = "default";
24 }; 23 };
25 24
26 serial@12100 { 25 serial@12100 {
27 status = "ok"; 26 status = "okay";
28 pinctrl-0 = <&pmx_uart1>;
29 pinctrl-names = "default";
30 }; 27 };
31 28
32 sata@80000 { 29 sata@80000 {
@@ -36,8 +33,6 @@
36 33
37 i2c@11100 { 34 i2c@11100 {
38 status = "okay"; 35 status = "okay";
39 pinctrl-0 = <&pmx_twsi1>;
40 pinctrl-names = "default";
41 36
42 s35390a: s35390a@30 { 37 s35390a: s35390a@30 {
43 compatible = "sii,s35390a"; 38 compatible = "sii,s35390a";
@@ -45,7 +40,7 @@
45 }; 40 };
46 }; 41 };
47 42
48 pinctrl: pinctrl@10000 { 43 pinctrl: pin-controller@10000 {
49 pinctrl-0 = <&pmx_dip_switches &pmx_gpio_header>; 44 pinctrl-0 = <&pmx_dip_switches &pmx_gpio_header>;
50 pinctrl-names = "default"; 45 pinctrl-names = "default";
51 46
@@ -133,8 +128,6 @@
133&nand { 128&nand {
134 chip-delay = <25>; 129 chip-delay = <25>;
135 status = "okay"; 130 status = "okay";
136 pinctrl-0 = <&pmx_nand>;
137 pinctrl-names = "default";
138 131
139 partition@0 { 132 partition@0 {
140 label = "uboot"; 133 label = "uboot";
diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a7.dts b/arch/arm/boot/dts/kirkwood-openblocks_a7.dts
index 38520a287514..d5e3bc518968 100644
--- a/arch/arm/boot/dts/kirkwood-openblocks_a7.dts
+++ b/arch/arm/boot/dts/kirkwood-openblocks_a7.dts
@@ -26,19 +26,16 @@
26 26
27 chosen { 27 chosen {
28 bootargs = "console=ttyS0,115200n8 earlyprintk"; 28 bootargs = "console=ttyS0,115200n8 earlyprintk";
29 stdout-path = &uart0;
29 }; 30 };
30 31
31 ocp@f1000000 { 32 ocp@f1000000 {
32 serial@12000 { 33 serial@12000 {
33 status = "ok"; 34 status = "okay";
34 pinctrl-0 = <&pmx_uart0>;
35 pinctrl-names = "default";
36 }; 35 };
37 36
38 serial@12100 { 37 serial@12100 {
39 status = "ok"; 38 status = "okay";
40 pinctrl-0 = <&pmx_uart1>;
41 pinctrl-names = "default";
42 }; 39 };
43 40
44 sata@80000 { 41 sata@80000 {
@@ -48,8 +45,6 @@
48 45
49 i2c@11100 { 46 i2c@11100 {
50 status = "okay"; 47 status = "okay";
51 pinctrl-0 = <&pmx_twsi1>;
52 pinctrl-names = "default";
53 48
54 s24c02: s24c02@50 { 49 s24c02: s24c02@50 {
55 compatible = "atmel,24c02"; 50 compatible = "atmel,24c02";
@@ -57,7 +52,7 @@
57 }; 52 };
58 }; 53 };
59 54
60 pinctrl: pinctrl@10000 { 55 pinctrl: pin-controller@10000 {
61 pinctrl-0 = <&pmx_dip_switches &pmx_gpio_header>; 56 pinctrl-0 = <&pmx_dip_switches &pmx_gpio_header>;
62 pinctrl-names = "default"; 57 pinctrl-names = "default";
63 58
@@ -109,13 +104,6 @@
109 marvell,pins = "mpp41", "mpp42", "mpp43"; 104 marvell,pins = "mpp41", "mpp42", "mpp43";
110 marvell,function = "gpio"; 105 marvell,function = "gpio";
111 }; 106 };
112
113 pmx_ge1: pmx-ge1 {
114 marvell,pins = "mpp20", "mpp21", "mpp22", "mpp23",
115 "mpp24", "mpp25", "mpp26", "mpp27",
116 "mpp30", "mpp31", "mpp32", "mpp33";
117 marvell,function = "ge1";
118 };
119 }; 107 };
120 }; 108 };
121 109
@@ -158,8 +146,6 @@
158&nand { 146&nand {
159 chip-delay = <25>; 147 chip-delay = <25>;
160 status = "okay"; 148 status = "okay";
161 pinctrl-0 = <&pmx_nand>;
162 pinctrl-names = "default";
163 149
164 partition@0 { 150 partition@0 {
165 label = "uboot"; 151 label = "uboot";
@@ -213,8 +199,6 @@
213 199
214&eth1 { 200&eth1 {
215 status = "okay"; 201 status = "okay";
216 pinctrl-0 = <&pmx_ge1>;
217 pinctrl-names = "default";
218 ethernet1-port@0 { 202 ethernet1-port@0 {
219 phy-handle = <&ethphy1>; 203 phy-handle = <&ethphy1>;
220 }; 204 };
diff --git a/arch/arm/boot/dts/kirkwood-openrd-base.dts b/arch/arm/boot/dts/kirkwood-openrd-base.dts
new file mode 100644
index 000000000000..8af58999606d
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-openrd-base.dts
@@ -0,0 +1,42 @@
1/*
2 * Marvell OpenRD Base Board Description
3 *
4 * Andrew Lunn <andrew@lunn.ch>
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 * This file contains the definitions that are specific to OpenRD
11 * base variant of the Marvell Kirkwood Development Board.
12 */
13
14/dts-v1/;
15
16#include "kirkwood-openrd.dtsi"
17
18/ {
19 model = "OpenRD Base";
20 compatible = "marvell,openrd-base", "marvell,openrd", "marvell,kirkwood-88f6281", "marvell,kirkwood";
21
22 ocp@f1000000 {
23 serial@12100 {
24 status = "okay";
25 };
26 };
27};
28
29&mdio {
30 status = "okay";
31
32 ethphy0: ethernet-phy@8 {
33 reg = <8>;
34 };
35};
36
37&eth0 {
38 status = "okay";
39 ethernet0-port@0 {
40 phy-handle = <&ethphy0>;
41 };
42};
diff --git a/arch/arm/boot/dts/kirkwood-openrd-client.dts b/arch/arm/boot/dts/kirkwood-openrd-client.dts
new file mode 100644
index 000000000000..887b9c1fee43
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-openrd-client.dts
@@ -0,0 +1,73 @@
1/*
2 * Marvell OpenRD Client Board Description
3 *
4 * Andrew Lunn <andrew@lunn.ch>
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 * This file contains the definitions that are specific to OpenRD
11 * client variant of the Marvell Kirkwood Development Board.
12 */
13
14/dts-v1/;
15
16#include "kirkwood-openrd.dtsi"
17
18/ {
19 model = "OpenRD Client";
20 compatible = "marvell,openrd-client", "marvell,openrd", "marvell,kirkwood-88f6281", "marvell,kirkwood";
21
22 ocp@f1000000 {
23 i2c@11000 {
24 status = "okay";
25 clock-frequency = <400000>;
26
27 cs42l51: cs42l51@4a {
28 compatible = "cirrus,cs42l51";
29 reg = <0x4a>;
30 };
31 };
32 };
33
34 sound {
35 compatible = "simple-audio-card";
36 simple-audio-card,format = "i2s";
37 simple-audio-card,mclk-fs = <256>;
38
39 simple-audio-card,cpu {
40 sound-dai = <&audio0>;
41 };
42
43 simple-audio-card,codec {
44 sound-dai = <&cs42l51>;
45 };
46 };
47};
48
49&mdio {
50 status = "okay";
51
52 ethphy0: ethernet-phy@8 {
53 reg = <8>;
54 };
55 ethphy1: ethernet-phy@24 {
56 reg = <24>;
57 };
58};
59
60&eth0 {
61 status = "okay";
62 ethernet0-port@0 {
63 phy-handle = <&ethphy0>;
64 };
65};
66
67&eth1 {
68 status = "okay";
69 ethernet1-port@0 {
70 phy-handle = <&ethphy1>;
71 };
72};
73
diff --git a/arch/arm/boot/dts/kirkwood-openrd-ultimate.dts b/arch/arm/boot/dts/kirkwood-openrd-ultimate.dts
new file mode 100644
index 000000000000..9f12f8b53e24
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-openrd-ultimate.dts
@@ -0,0 +1,58 @@
1/*
2 * Marvell OpenRD Ultimate Board Description
3 *
4 * Andrew Lunn <andrew@lunn.ch>
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 * This file contains the definitions that are specific to OpenRD
11 * ultimate variant of the Marvell Kirkwood Development Board.
12 */
13
14/dts-v1/;
15
16#include "kirkwood-openrd.dtsi"
17
18/ {
19 model = "OpenRD Ultimate";
20 compatible = "marvell,openrd-ultimate", "marvell,openrd", "marvell,kirkwood-88f6281", "marvell,kirkwood";
21
22 ocp@f1000000 {
23 i2c@11000 {
24 status = "okay";
25 clock-frequency = <400000>;
26
27 cs42l51: cs42l51@4a {
28 compatible = "cirrus,cs42l51";
29 reg = <0x4a>;
30 };
31 };
32 };
33};
34
35&mdio {
36 status = "okay";
37
38 ethphy0: ethernet-phy@0 {
39 reg = <0>;
40 };
41 ethphy1: ethernet-phy@1 {
42 reg = <1>;
43 };
44};
45
46&eth0 {
47 status = "okay";
48 ethernet0-port@0 {
49 phy-handle = <&ethphy0>;
50 };
51};
52
53&eth1 {
54 status = "okay";
55 ethernet1-port@0 {
56 phy-handle = <&ethphy1>;
57 };
58};
diff --git a/arch/arm/boot/dts/kirkwood-openrd.dtsi b/arch/arm/boot/dts/kirkwood-openrd.dtsi
new file mode 100644
index 000000000000..d3330dadf7ed
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-openrd.dtsi
@@ -0,0 +1,90 @@
1/*
2 * Marvell OpenRD (Base|Client|Ultimate) Board Description
3 *
4 * Andrew Lunn <andrew@lunn.ch>
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 * This file contains the definitions that are common between the three
11 * variants of the Marvell Kirkwood Development Board.
12 */
13
14#include "kirkwood.dtsi"
15#include "kirkwood-6281.dtsi"
16
17/ {
18 memory {
19 device_type = "memory";
20 reg = <0x00000000 0x20000000>;
21 };
22
23 chosen {
24 bootargs = "console=ttyS0,115200n8";
25 stdout-path = &uart0;
26 };
27
28 mbus {
29 pcie-controller {
30 status = "okay";
31
32 pcie@1,0 {
33 status = "okay";
34 };
35 };
36 };
37
38 ocp@f1000000 {
39 pinctrl: pin-controller@10000 {
40 pinctrl-0 = <&pmx_select28 &pmx_sdio_cd &pmx_select34>;
41 pinctrl-names = "default";
42
43 pmx_select28: pmx-select-uart-sd {
44 marvell,pins = "mpp28";
45 marvell,function = "gpio";
46 };
47 pmx_sdio_cd: pmx-sdio-cd {
48 marvell,pins = "mpp29";
49 marvell,function = "gpio";
50 };
51 pmx_select34: pmx-select-rs232-rs484 {
52 marvell,pins = "mpp34";
53 marvell,function = "gpio";
54 };
55 };
56 serial@12000 {
57 status = "okay";
58
59 };
60 sata@80000 {
61 status = "okay";
62 nr-ports = <2>;
63 };
64 mvsdio@90000 {
65 status = "okay";
66 cd-gpios = <&gpio0 29 9>;
67 };
68 };
69};
70
71&nand {
72 status = "okay";
73 pinctrl-0 = <&pmx_nand>;
74 pinctrl-names = "default";
75
76 partition@0 {
77 label = "u-boot";
78 reg = <0x0000000 0x100000>;
79 };
80
81 partition@100000 {
82 label = "uImage";
83 reg = <0x0100000 0x400000>;
84 };
85
86 partition@600000 {
87 label = "root";
88 reg = <0x0600000 0x1FA00000>;
89 };
90};
diff --git a/arch/arm/boot/dts/kirkwood-rd88f6192.dts b/arch/arm/boot/dts/kirkwood-rd88f6192.dts
index e9dd85049297..35a29dee8dd8 100644
--- a/arch/arm/boot/dts/kirkwood-rd88f6192.dts
+++ b/arch/arm/boot/dts/kirkwood-rd88f6192.dts
@@ -26,6 +26,7 @@
26 26
27 chosen { 27 chosen {
28 bootargs = "console=ttyS0,115200n8"; 28 bootargs = "console=ttyS0,115200n8";
29 stdout-path = &uart0;
29 }; 30 };
30 31
31 mbus { 32 mbus {
@@ -39,7 +40,7 @@
39 }; 40 };
40 41
41 ocp@f1000000 { 42 ocp@f1000000 {
42 pinctrl: pinctrl@10000 { 43 pinctrl: pin-controller@10000 {
43 pinctrl-0 = <&pmx_usb_power>; 44 pinctrl-0 = <&pmx_usb_power>;
44 pinctrl-names = "default"; 45 pinctrl-names = "default";
45 46
@@ -56,8 +57,6 @@
56 57
57 spi@10600 { 58 spi@10600 {
58 status = "okay"; 59 status = "okay";
59 pinctrl-0 = <&pmx_spi>;
60 pinctrl-names = "default";
61 60
62 m25p128@0 { 61 m25p128@0 {
63 #address-cells = <1>; 62 #address-cells = <1>;
diff --git a/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi b/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
index d6368c39102e..26cf0e0ccefd 100644
--- a/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
+++ b/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
@@ -22,6 +22,7 @@
22 22
23 chosen { 23 chosen {
24 bootargs = "console=ttyS0,115200n8"; 24 bootargs = "console=ttyS0,115200n8";
25 stdout-path = &uart0;
25 }; 26 };
26 27
27 mbus { 28 mbus {
@@ -35,7 +36,7 @@
35 }; 36 };
36 37
37 ocp@f1000000 { 38 ocp@f1000000 {
38 pinctrl: pinctrl@10000 { 39 pinctrl: pin-controller@10000 {
39 pinctrl-0 = <&pmx_sdio_cd>; 40 pinctrl-0 = <&pmx_sdio_cd>;
40 pinctrl-names = "default"; 41 pinctrl-names = "default";
41 42
diff --git a/arch/arm/boot/dts/kirkwood-rs212.dts b/arch/arm/boot/dts/kirkwood-rs212.dts
index 93ec3d00c6ab..3b19f1fd4cac 100644
--- a/arch/arm/boot/dts/kirkwood-rs212.dts
+++ b/arch/arm/boot/dts/kirkwood-rs212.dts
@@ -24,6 +24,7 @@
24 24
25 chosen { 25 chosen {
26 bootargs = "console=ttyS0,115200n8"; 26 bootargs = "console=ttyS0,115200n8";
27 stdout-path = &uart0;
27 }; 28 };
28 29
29 gpio-fan-100-15-35-3 { 30 gpio-fan-100-15-35-3 {
diff --git a/arch/arm/boot/dts/kirkwood-rs409.dts b/arch/arm/boot/dts/kirkwood-rs409.dts
index 311df4e5aa28..921ca49e85a4 100644
--- a/arch/arm/boot/dts/kirkwood-rs409.dts
+++ b/arch/arm/boot/dts/kirkwood-rs409.dts
@@ -24,6 +24,7 @@
24 24
25 chosen { 25 chosen {
26 bootargs = "console=ttyS0,115200n8"; 26 bootargs = "console=ttyS0,115200n8";
27 stdout-path = &uart0;
27 }; 28 };
28 29
29 gpio-fan-150-15-18 { 30 gpio-fan-150-15-18 {
diff --git a/arch/arm/boot/dts/kirkwood-rs411.dts b/arch/arm/boot/dts/kirkwood-rs411.dts
index f90da850bb31..02852b0c809f 100644
--- a/arch/arm/boot/dts/kirkwood-rs411.dts
+++ b/arch/arm/boot/dts/kirkwood-rs411.dts
@@ -24,6 +24,7 @@
24 24
25 chosen { 25 chosen {
26 bootargs = "console=ttyS0,115200n8"; 26 bootargs = "console=ttyS0,115200n8";
27 stdout-path = &uart0;
27 }; 28 };
28 29
29 gpio-fan-100-15-35-3 { 30 gpio-fan-100-15-35-3 {
diff --git a/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi b/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi
index 1ff848d570a9..7196c7f3e109 100644
--- a/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi
+++ b/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi
@@ -17,10 +17,11 @@
17 17
18 chosen { 18 chosen {
19 bootargs = "console=ttyS0,115200n8 earlyprintk"; 19 bootargs = "console=ttyS0,115200n8 earlyprintk";
20 stdout-path = &uart0;
20 }; 21 };
21 22
22 ocp@f1000000 { 23 ocp@f1000000 {
23 pinctrl: pinctrl@10000 { 24 pinctrl: pin-controller@10000 {
24 25
25 pmx_usb_power_enable: pmx-usb-power-enable { 26 pmx_usb_power_enable: pmx-usb-power-enable {
26 marvell,pins = "mpp29"; 27 marvell,pins = "mpp29";
@@ -44,8 +45,6 @@
44 }; 45 };
45 }; 46 };
46 serial@12000 { 47 serial@12000 {
47 pinctrl-0 = <&pmx_uart0>;
48 pinctrl-names = "default";
49 status = "okay"; 48 status = "okay";
50 }; 49 };
51 }; 50 };
@@ -72,8 +71,6 @@
72}; 71};
73 72
74&nand { 73&nand {
75 pinctrl-0 = <&pmx_nand>;
76 pinctrl-names = "default";
77 status = "okay"; 74 status = "okay";
78 75
79 partition@0 { 76 partition@0 {
diff --git a/arch/arm/boot/dts/kirkwood-synology.dtsi b/arch/arm/boot/dts/kirkwood-synology.dtsi
index 4227c974729d..811e0971fc58 100644
--- a/arch/arm/boot/dts/kirkwood-synology.dtsi
+++ b/arch/arm/boot/dts/kirkwood-synology.dtsi
@@ -25,7 +25,7 @@
25 }; 25 };
26 26
27 ocp@f1000000 { 27 ocp@f1000000 {
28 pinctrl: pinctrl@10000 { 28 pinctrl: pin-controller@10000 {
29 pmx_alarmled_12: pmx-alarmled-12 { 29 pmx_alarmled_12: pmx-alarmled-12 {
30 marvell,pins = "mpp12"; 30 marvell,pins = "mpp12";
31 marvell,function = "gpio"; 31 marvell,function = "gpio";
@@ -213,8 +213,6 @@
213 213
214 spi@10600 { 214 spi@10600 {
215 status = "okay"; 215 status = "okay";
216 pinctrl-0 = <&pmx_spi>;
217 pinctrl-names = "default";
218 216
219 m25p80@0 { 217 m25p80@0 {
220 #address-cells = <1>; 218 #address-cells = <1>;
@@ -259,8 +257,6 @@
259 i2c@11000 { 257 i2c@11000 {
260 status = "okay"; 258 status = "okay";
261 clock-frequency = <400000>; 259 clock-frequency = <400000>;
262 pinctrl-0 = <&pmx_twsi0>;
263 pinctrl-names = "default";
264 260
265 rs5c372: rs5c372@32 { 261 rs5c372: rs5c372@32 {
266 status = "disabled"; 262 status = "disabled";
@@ -277,14 +273,10 @@
277 273
278 serial@12000 { 274 serial@12000 {
279 status = "okay"; 275 status = "okay";
280 pinctrl-0 = <&pmx_uart0>;
281 pinctrl-names = "default";
282 }; 276 };
283 277
284 serial@12100 { 278 serial@12100 {
285 status = "okay"; 279 status = "okay";
286 pinctrl-0 = <&pmx_uart1>;
287 pinctrl-names = "default";
288 }; 280 };
289 281
290 poweroff@12100 { 282 poweroff@12100 {
diff --git a/arch/arm/boot/dts/kirkwood-t5325.dts b/arch/arm/boot/dts/kirkwood-t5325.dts
index 7d1c7677a18f..610ec0f95858 100644
--- a/arch/arm/boot/dts/kirkwood-t5325.dts
+++ b/arch/arm/boot/dts/kirkwood-t5325.dts
@@ -27,6 +27,7 @@
27 27
28 chosen { 28 chosen {
29 bootargs = "console=ttyS0,115200n8"; 29 bootargs = "console=ttyS0,115200n8";
30 stdout-path = &uart0;
30 }; 31 };
31 32
32 mbus { 33 mbus {
@@ -40,7 +41,7 @@
40 }; 41 };
41 42
42 ocp@f1000000 { 43 ocp@f1000000 {
43 pinctrl: pinctrl@10000 { 44 pinctrl: pin-controller@10000 {
44 pinctrl-0 = <&pmx_i2s &pmx_sysrst>; 45 pinctrl-0 = <&pmx_i2s &pmx_sysrst>;
45 pinctrl-names = "default"; 46 pinctrl-names = "default";
46 47
@@ -64,10 +65,6 @@
64 marvell,function = "gpio"; 65 marvell,function = "gpio";
65 }; 66 };
66 67
67 /*
68 * Redefined from kirkwood-6281.dtsi, because
69 * we don't use SPI CS on MPP0, but on MPP7.
70 */
71 pmx_spi: pmx-spi { 68 pmx_spi: pmx-spi {
72 marvell,pins = "mpp1", "mpp2", "mpp3", "mpp7"; 69 marvell,pins = "mpp1", "mpp2", "mpp3", "mpp7";
73 marvell,function = "spi"; 70 marvell,function = "spi";
@@ -86,8 +83,6 @@
86 }; 83 };
87 84
88 spi@10600 { 85 spi@10600 {
89 pinctrl-0 = <&pmx_spi>;
90 pinctrl-names = "default";
91 status = "okay"; 86 status = "okay";
92 87
93 flash@0 { 88 flash@0 {
@@ -131,6 +126,9 @@
131 alc5621: alc5621@1a { 126 alc5621: alc5621@1a {
132 compatible = "realtek,alc5621"; 127 compatible = "realtek,alc5621";
133 reg = <0x1a>; 128 reg = <0x1a>;
129 #sound-dai-cells = <0>;
130 add-ctrl = <0x3700>;
131 jack-det-ctrl = <0x4810>;
134 }; 132 };
135 }; 133 };
136 134
@@ -189,6 +187,31 @@
189 gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>; 187 gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
190 }; 188 };
191 189
190 sound {
191 compatible = "simple-audio-card";
192 simple-audio-card,format = "i2s";
193 simple-audio-card,routing =
194 "Headphone Jack", "HPL",
195 "Headphone Jack", "HPR",
196 "Speaker", "SPKOUT",
197 "Speaker", "SPKOUTN",
198 "MIC1", "Mic Jack",
199 "MIC2", "Mic Jack";
200 simple-audio-card,widgets =
201 "Headphone", "Headphone Jack",
202 "Speaker", "Speaker",
203 "Microphone", "Mic Jack";
204
205 simple-audio-card,mclk-fs = <256>;
206
207 simple-audio-card,cpu {
208 sound-dai = <&audio>;
209 };
210
211 simple-audio-card,codec {
212 sound-dai = <&alc5621>;
213 };
214 };
192}; 215};
193 216
194&mdio { 217&mdio {
diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts
index 5fc817c2cb87..f5c8c0dd41dc 100644
--- a/arch/arm/boot/dts/kirkwood-topkick.dts
+++ b/arch/arm/boot/dts/kirkwood-topkick.dts
@@ -14,10 +14,11 @@
14 14
15 chosen { 15 chosen {
16 bootargs = "console=ttyS0,115200n8 earlyprintk"; 16 bootargs = "console=ttyS0,115200n8 earlyprintk";
17 stdout-path = &uart0;
17 }; 18 };
18 19
19 ocp@f1000000 { 20 ocp@f1000000 {
20 pinctrl: pinctrl@10000 { 21 pinctrl: pin-controller@10000 {
21 /* 22 /*
22 * Switch positions 23 * Switch positions
23 * 24 *
@@ -85,9 +86,7 @@
85 }; 86 };
86 87
87 serial@12000 { 88 serial@12000 {
88 status = "ok"; 89 status = "okay";
89 pinctrl-0 = <&pmx_uart0>;
90 pinctrl-names = "default";
91 }; 90 };
92 91
93 sata@80000 { 92 sata@80000 {
@@ -96,9 +95,7 @@
96 }; 95 };
97 96
98 i2c@11000 { 97 i2c@11000 {
99 status = "ok"; 98 status = "okay";
100 pinctrl-0 = <&pmx_twsi0>;
101 pinctrl-names = "default";
102 }; 99 };
103 100
104 mvsdio@90000 { 101 mvsdio@90000 {
@@ -175,8 +172,6 @@
175 172
176&nand { 173&nand {
177 status = "okay"; 174 status = "okay";
178 pinctrl-0 = <&pmx_nand>;
179 pinctrl-names = "default";
180 175
181 partition@0 { 176 partition@0 {
182 label = "u-boot"; 177 label = "u-boot";
diff --git a/arch/arm/boot/dts/kirkwood-ts219-6281.dts b/arch/arm/boot/dts/kirkwood-ts219-6281.dts
index c17ae45e19be..9767d73f3857 100644
--- a/arch/arm/boot/dts/kirkwood-ts219-6281.dts
+++ b/arch/arm/boot/dts/kirkwood-ts219-6281.dts
@@ -6,7 +6,7 @@
6 6
7/ { 7/ {
8 ocp@f1000000 { 8 ocp@f1000000 {
9 pinctrl: pinctrl@10000 { 9 pinctrl: pin-controller@10000 {
10 10
11 pinctrl-0 = <&pmx_ram_size &pmx_board_id>; 11 pinctrl-0 = <&pmx_ram_size &pmx_board_id>;
12 pinctrl-names = "default"; 12 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/kirkwood-ts219-6282.dts b/arch/arm/boot/dts/kirkwood-ts219-6282.dts
index 0713d072758a..bfc1a32d4e42 100644
--- a/arch/arm/boot/dts/kirkwood-ts219-6282.dts
+++ b/arch/arm/boot/dts/kirkwood-ts219-6282.dts
@@ -16,7 +16,7 @@
16 }; 16 };
17 17
18 ocp@f1000000 { 18 ocp@f1000000 {
19 pinctrl: pinctrl@10000 { 19 pinctrl: pin-controller@10000 {
20 20
21 pinctrl-0 = <&pmx_ram_size &pmx_board_id>; 21 pinctrl-0 = <&pmx_ram_size &pmx_board_id>;
22 pinctrl-names = "default"; 22 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/kirkwood-ts219.dtsi b/arch/arm/boot/dts/kirkwood-ts219.dtsi
index 911f3a8cee23..df7f15276575 100644
--- a/arch/arm/boot/dts/kirkwood-ts219.dtsi
+++ b/arch/arm/boot/dts/kirkwood-ts219.dtsi
@@ -9,6 +9,7 @@
9 9
10 chosen { 10 chosen {
11 bootargs = "console=ttyS0,115200n8"; 11 bootargs = "console=ttyS0,115200n8";
12 stdout-path = &uart0;
12 }; 13 };
13 14
14 mbus { 15 mbus {
@@ -25,8 +26,6 @@
25 i2c@11000 { 26 i2c@11000 {
26 status = "okay"; 27 status = "okay";
27 clock-frequency = <400000>; 28 clock-frequency = <400000>;
28 pinctrl-0 = <&pmx_twsi0>;
29 pinctrl-names = "default";
30 29
31 s35390a: s35390a@30 { 30 s35390a: s35390a@30 {
32 compatible = "s35390a"; 31 compatible = "s35390a";
@@ -34,16 +33,10 @@
34 }; 33 };
35 }; 34 };
36 serial@12000 { 35 serial@12000 {
37 clock-frequency = <200000000>;
38 status = "okay"; 36 status = "okay";
39 pinctrl-0 = <&pmx_uart0>;
40 pinctrl-names = "default";
41 }; 37 };
42 serial@12100 { 38 serial@12100 {
43 clock-frequency = <200000000>;
44 status = "okay"; 39 status = "okay";
45 pinctrl-0 = <&pmx_uart1>;
46 pinctrl-names = "default";
47 }; 40 };
48 poweroff@12100 { 41 poweroff@12100 {
49 compatible = "qnap,power-off"; 42 compatible = "qnap,power-off";
@@ -52,8 +45,6 @@
52 }; 45 };
53 spi@10600 { 46 spi@10600 {
54 status = "okay"; 47 status = "okay";
55 pinctrl-0 = <&pmx_spi>;
56 pinctrl-names = "default";
57 48
58 m25p128@0 { 49 m25p128@0 {
59 #address-cells = <1>; 50 #address-cells = <1>;
diff --git a/arch/arm/boot/dts/kirkwood-ts419.dtsi b/arch/arm/boot/dts/kirkwood-ts419.dtsi
index 1a9c624c7a92..30ab93bfb1e4 100644
--- a/arch/arm/boot/dts/kirkwood-ts419.dtsi
+++ b/arch/arm/boot/dts/kirkwood-ts419.dtsi
@@ -14,7 +14,7 @@
14 compatible = "qnap,ts419", "marvell,kirkwood"; 14 compatible = "qnap,ts419", "marvell,kirkwood";
15 15
16 ocp@f1000000 { 16 ocp@f1000000 {
17 pinctrl: pinctrl@10000 { 17 pinctrl: pin-controller@10000 {
18 pinctrl-names = "default"; 18 pinctrl-names = "default";
19 19
20 pmx_USB_copy_button: pmx-USB-copy-button { 20 pmx_USB_copy_button: pmx-USB-copy-button {
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
index 90384587c278..afc640cd80c5 100644
--- a/arch/arm/boot/dts/kirkwood.dtsi
+++ b/arch/arm/boot/dts/kirkwood.dtsi
@@ -40,7 +40,7 @@
40 pcie-mem-aperture = <0xe0000000 0x10000000>; /* 256 MiB memory space */ 40 pcie-mem-aperture = <0xe0000000 0x10000000>; /* 256 MiB memory space */
41 pcie-io-aperture = <0xf2000000 0x100000>; /* 1 MiB I/O space */ 41 pcie-io-aperture = <0xf2000000 0x100000>; /* 1 MiB I/O space */
42 42
43 crypto@0301 { 43 cesa: crypto@0301 {
44 compatible = "marvell,orion-crypto"; 44 compatible = "marvell,orion-crypto";
45 reg = <MBUS_ID(0xf0, 0x01) 0x30000 0x10000>, 45 reg = <MBUS_ID(0xf0, 0x01) 0x30000 0x10000>,
46 <MBUS_ID(0x03, 0x01) 0 0x800>; 46 <MBUS_ID(0x03, 0x01) 0 0x800>;
@@ -61,6 +61,8 @@
61 chip-delay = <25>; 61 chip-delay = <25>;
62 /* set partition map and/or chip-delay in board dts */ 62 /* set partition map and/or chip-delay in board dts */
63 clocks = <&gate_clk 7>; 63 clocks = <&gate_clk 7>;
64 pinctrl-0 = <&pmx_nand>;
65 pinctrl-names = "default";
64 status = "disabled"; 66 status = "disabled";
65 }; 67 };
66 }; 68 };
@@ -71,13 +73,59 @@
71 #address-cells = <1>; 73 #address-cells = <1>;
72 #size-cells = <1>; 74 #size-cells = <1>;
73 75
76 pinctrl: pin-controller@10000 {
77 /* set compatible property in SoC file */
78 reg = <0x10000 0x20>;
79
80 pmx_ge1: pmx-ge1 {
81 marvell,pins = "mpp20", "mpp21", "mpp22", "mpp23",
82 "mpp24", "mpp25", "mpp26", "mpp27",
83 "mpp30", "mpp31", "mpp32", "mpp33";
84 marvell,function = "ge1";
85 };
86
87 pmx_nand: pmx-nand {
88 marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3",
89 "mpp4", "mpp5", "mpp18", "mpp19";
90 marvell,function = "nand";
91 };
92
93 /*
94 * Default SPI0 pinctrl setting with CSn on mpp0,
95 * overwrite marvell,pins on board level if required.
96 */
97 pmx_spi: pmx-spi {
98 marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3";
99 marvell,function = "spi";
100 };
101
102 pmx_twsi0: pmx-twsi0 {
103 marvell,pins = "mpp8", "mpp9";
104 marvell,function = "twsi0";
105 };
106
107 /*
108 * Default UART pinctrl setting without RTS/CTS,
109 * overwrite marvell,pins on board level if required.
110 */
111 pmx_uart0: pmx-uart0 {
112 marvell,pins = "mpp10", "mpp11";
113 marvell,function = "uart0";
114 };
115
116 pmx_uart1: pmx-uart1 {
117 marvell,pins = "mpp13", "mpp14";
118 marvell,function = "uart1";
119 };
120 };
121
74 core_clk: core-clocks@10030 { 122 core_clk: core-clocks@10030 {
75 compatible = "marvell,kirkwood-core-clock"; 123 compatible = "marvell,kirkwood-core-clock";
76 reg = <0x10030 0x4>; 124 reg = <0x10030 0x4>;
77 #clock-cells = <1>; 125 #clock-cells = <1>;
78 }; 126 };
79 127
80 spi@10600 { 128 spi0: spi@10600 {
81 compatible = "marvell,orion-spi"; 129 compatible = "marvell,orion-spi";
82 #address-cells = <1>; 130 #address-cells = <1>;
83 #size-cells = <0>; 131 #size-cells = <0>;
@@ -85,6 +133,8 @@
85 interrupts = <23>; 133 interrupts = <23>;
86 reg = <0x10600 0x28>; 134 reg = <0x10600 0x28>;
87 clocks = <&gate_clk 7>; 135 clocks = <&gate_clk 7>;
136 pinctrl-0 = <&pmx_spi>;
137 pinctrl-names = "default";
88 status = "disabled"; 138 status = "disabled";
89 }; 139 };
90 140
@@ -120,24 +170,30 @@
120 interrupts = <29>; 170 interrupts = <29>;
121 clock-frequency = <100000>; 171 clock-frequency = <100000>;
122 clocks = <&gate_clk 7>; 172 clocks = <&gate_clk 7>;
173 pinctrl-0 = <&pmx_twsi0>;
174 pinctrl-names = "default";
123 status = "disabled"; 175 status = "disabled";
124 }; 176 };
125 177
126 serial@12000 { 178 uart0: serial@12000 {
127 compatible = "ns16550a"; 179 compatible = "ns16550a";
128 reg = <0x12000 0x100>; 180 reg = <0x12000 0x100>;
129 reg-shift = <2>; 181 reg-shift = <2>;
130 interrupts = <33>; 182 interrupts = <33>;
131 clocks = <&gate_clk 7>; 183 clocks = <&gate_clk 7>;
184 pinctrl-0 = <&pmx_uart0>;
185 pinctrl-names = "default";
132 status = "disabled"; 186 status = "disabled";
133 }; 187 };
134 188
135 serial@12100 { 189 uart1: serial@12100 {
136 compatible = "ns16550a"; 190 compatible = "ns16550a";
137 reg = <0x12100 0x100>; 191 reg = <0x12100 0x100>;
138 reg-shift = <2>; 192 reg-shift = <2>;
139 interrupts = <34>; 193 interrupts = <34>;
140 clocks = <&gate_clk 7>; 194 clocks = <&gate_clk 7>;
195 pinctrl-0 = <&pmx_uart1>;
196 pinctrl-names = "default";
141 status = "disabled"; 197 status = "disabled";
142 }; 198 };
143 199
@@ -146,7 +202,7 @@
146 reg = <0x20000 0x80>, <0x1500 0x20>; 202 reg = <0x20000 0x80>, <0x1500 0x20>;
147 }; 203 };
148 204
149 system-controller@20000 { 205 sysc: system-controller@20000 {
150 compatible = "marvell,orion-system-controller"; 206 compatible = "marvell,orion-system-controller";
151 reg = <0x20000 0x120>; 207 reg = <0x20000 0x120>;
152 }; 208 };
@@ -196,7 +252,7 @@
196 status = "okay"; 252 status = "okay";
197 }; 253 };
198 254
199 ehci@50000 { 255 usb0: ehci@50000 {
200 compatible = "marvell,orion-ehci"; 256 compatible = "marvell,orion-ehci";
201 reg = <0x50000 0x1000>; 257 reg = <0x50000 0x1000>;
202 interrupts = <19>; 258 interrupts = <19>;
@@ -204,7 +260,7 @@
204 status = "okay"; 260 status = "okay";
205 }; 261 };
206 262
207 xor@60800 { 263 dma0: xor@60800 {
208 compatible = "marvell,orion-xor"; 264 compatible = "marvell,orion-xor";
209 reg = <0x60800 0x100 265 reg = <0x60800 0x100
210 0x60A00 0x100>; 266 0x60A00 0x100>;
@@ -224,7 +280,7 @@
224 }; 280 };
225 }; 281 };
226 282
227 xor@60900 { 283 dma1: xor@60900 {
228 compatible = "marvell,orion-xor"; 284 compatible = "marvell,orion-xor";
229 reg = <0x60900 0x100 285 reg = <0x60900 0x100
230 0x60B00 0x100>; 286 0x60B00 0x100>;
@@ -282,6 +338,8 @@
282 reg = <0x76000 0x4000>; 338 reg = <0x76000 0x4000>;
283 clocks = <&gate_clk 19>; 339 clocks = <&gate_clk 19>;
284 marvell,tx-checksum-limit = <1600>; 340 marvell,tx-checksum-limit = <1600>;
341 pinctrl-0 = <&pmx_ge1>;
342 pinctrl-names = "default";
285 status = "disabled"; 343 status = "disabled";
286 344
287 ethernet1-port@0 { 345 ethernet1-port@0 {
@@ -314,6 +372,7 @@
314 372
315 audio0: audio-controller@a0000 { 373 audio0: audio-controller@a0000 {
316 compatible = "marvell,kirkwood-audio"; 374 compatible = "marvell,kirkwood-audio";
375 #sound-dai-cells = <0>;
317 reg = <0xa0000 0x2210>; 376 reg = <0xa0000 0x2210>;
318 interrupts = <24>; 377 interrupts = <24>;
319 clocks = <&gate_clk 9>; 378 clocks = <&gate_clk 9>;
diff --git a/arch/arm/boot/dts/marco.dtsi b/arch/arm/boot/dts/marco.dtsi
index 0c9647d28765..fb354225740a 100644
--- a/arch/arm/boot/dts/marco.dtsi
+++ b/arch/arm/boot/dts/marco.dtsi
@@ -36,7 +36,7 @@
36 ranges = <0x40000000 0x40000000 0xa0000000>; 36 ranges = <0x40000000 0x40000000 0xa0000000>;
37 37
38 l2-cache-controller@c0030000 { 38 l2-cache-controller@c0030000 {
39 compatible = "sirf,marco-pl310-cache", "arm,pl310-cache"; 39 compatible = "arm,pl310-cache";
40 reg = <0xc0030000 0x1000>; 40 reg = <0xc0030000 0x1000>;
41 interrupts = <0 59 0>; 41 interrupts = <0 59 0>;
42 arm,tag-latency = <1 1 1>; 42 arm,tag-latency = <1 1 1>;
diff --git a/arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi b/arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi
index f577b7df9a29..521c587acaee 100644
--- a/arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi
+++ b/arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi
@@ -24,11 +24,10 @@
24 compatible = "smsc,lan9221", "smsc,lan9115"; 24 compatible = "smsc,lan9221", "smsc,lan9115";
25 bank-width = <2>; 25 bank-width = <2>;
26 gpmc,mux-add-data; 26 gpmc,mux-add-data;
27 gpmc,cs-on-ns = <0>; 27 gpmc,cs-on-ns = <1>;
28 gpmc,cs-rd-off-ns = <186>; 28 gpmc,cs-rd-off-ns = <180>;
29 gpmc,cs-wr-off-ns = <186>; 29 gpmc,cs-wr-off-ns = <180>;
30 gpmc,adv-on-ns = <12>; 30 gpmc,adv-rd-off-ns = <18>;
31 gpmc,adv-rd-off-ns = <48>;
32 gpmc,adv-wr-off-ns = <48>; 31 gpmc,adv-wr-off-ns = <48>;
33 gpmc,oe-on-ns = <54>; 32 gpmc,oe-on-ns = <54>;
34 gpmc,oe-off-ns = <168>; 33 gpmc,oe-off-ns = <168>;
@@ -36,12 +35,10 @@
36 gpmc,we-off-ns = <168>; 35 gpmc,we-off-ns = <168>;
37 gpmc,rd-cycle-ns = <186>; 36 gpmc,rd-cycle-ns = <186>;
38 gpmc,wr-cycle-ns = <186>; 37 gpmc,wr-cycle-ns = <186>;
39 gpmc,access-ns = <114>; 38 gpmc,access-ns = <144>;
40 gpmc,page-burst-access-ns = <6>; 39 gpmc,page-burst-access-ns = <24>;
41 gpmc,bus-turnaround-ns = <12>; 40 gpmc,bus-turnaround-ns = <90>;
42 gpmc,cycle2cycle-delay-ns = <18>; 41 gpmc,cycle2cycle-delay-ns = <90>;
43 gpmc,wr-data-mux-bus-ns = <90>;
44 gpmc,wr-access-ns = <186>;
45 gpmc,cycle2cycle-samecsen; 42 gpmc,cycle2cycle-samecsen;
46 gpmc,cycle2cycle-diffcsen; 43 gpmc,cycle2cycle-diffcsen;
47 vddvario-supply = <&vddvario>; 44 vddvario-supply = <&vddvario>;
diff --git a/arch/arm/boot/dts/omap2.dtsi b/arch/arm/boot/dts/omap2.dtsi
index 22f35ea142c1..8f8c07da4ac1 100644
--- a/arch/arm/boot/dts/omap2.dtsi
+++ b/arch/arm/boot/dts/omap2.dtsi
@@ -71,13 +71,6 @@
71 interrupts = <58>; 71 interrupts = <58>;
72 }; 72 };
73 73
74 mailbox: mailbox@48094000 {
75 compatible = "ti,omap2-mailbox";
76 ti,hwmods = "mailbox";
77 reg = <0x48094000 0x200>;
78 interrupts = <26>;
79 };
80
81 intc: interrupt-controller@1 { 74 intc: interrupt-controller@1 {
82 compatible = "ti,omap2-intc"; 75 compatible = "ti,omap2-intc";
83 interrupt-controller; 76 interrupt-controller;
diff --git a/arch/arm/boot/dts/omap2420-clocks.dtsi b/arch/arm/boot/dts/omap2420-clocks.dtsi
new file mode 100644
index 000000000000..ce8c742d7e92
--- /dev/null
+++ b/arch/arm/boot/dts/omap2420-clocks.dtsi
@@ -0,0 +1,270 @@
1/*
2 * Device Tree Source for OMAP2420 clock data
3 *
4 * Copyright (C) 2014 Texas Instruments, Inc.
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
11&prcm_clocks {
12 sys_clkout2_src_gate: sys_clkout2_src_gate {
13 #clock-cells = <0>;
14 compatible = "ti,composite-no-wait-gate-clock";
15 clocks = <&core_ck>;
16 ti,bit-shift = <15>;
17 reg = <0x0070>;
18 };
19
20 sys_clkout2_src_mux: sys_clkout2_src_mux {
21 #clock-cells = <0>;
22 compatible = "ti,composite-mux-clock";
23 clocks = <&core_ck>, <&sys_ck>, <&func_96m_ck>, <&func_54m_ck>;
24 ti,bit-shift = <8>;
25 reg = <0x0070>;
26 };
27
28 sys_clkout2_src: sys_clkout2_src {
29 #clock-cells = <0>;
30 compatible = "ti,composite-clock";
31 clocks = <&sys_clkout2_src_gate>, <&sys_clkout2_src_mux>;
32 };
33
34 sys_clkout2: sys_clkout2 {
35 #clock-cells = <0>;
36 compatible = "ti,divider-clock";
37 clocks = <&sys_clkout2_src>;
38 ti,bit-shift = <11>;
39 ti,max-div = <64>;
40 reg = <0x0070>;
41 ti,index-power-of-two;
42 };
43
44 dsp_gate_ick: dsp_gate_ick {
45 #clock-cells = <0>;
46 compatible = "ti,composite-interface-clock";
47 clocks = <&dsp_fck>;
48 ti,bit-shift = <1>;
49 reg = <0x0810>;
50 };
51
52 dsp_div_ick: dsp_div_ick {
53 #clock-cells = <0>;
54 compatible = "ti,composite-divider-clock";
55 clocks = <&dsp_fck>;
56 ti,bit-shift = <5>;
57 ti,max-div = <3>;
58 reg = <0x0840>;
59 ti,index-starts-at-one;
60 };
61
62 dsp_ick: dsp_ick {
63 #clock-cells = <0>;
64 compatible = "ti,composite-clock";
65 clocks = <&dsp_gate_ick>, <&dsp_div_ick>;
66 };
67
68 iva1_gate_ifck: iva1_gate_ifck {
69 #clock-cells = <0>;
70 compatible = "ti,composite-gate-clock";
71 clocks = <&core_ck>;
72 ti,bit-shift = <10>;
73 reg = <0x0800>;
74 };
75
76 iva1_div_ifck: iva1_div_ifck {
77 #clock-cells = <0>;
78 compatible = "ti,composite-divider-clock";
79 clocks = <&core_ck>;
80 ti,bit-shift = <8>;
81 reg = <0x0840>;
82 ti,dividers = <0>, <1>, <2>, <3>, <4>, <0>, <6>, <0>, <8>, <0>, <0>, <0>, <12>;
83 };
84
85 iva1_ifck: iva1_ifck {
86 #clock-cells = <0>;
87 compatible = "ti,composite-clock";
88 clocks = <&iva1_gate_ifck>, <&iva1_div_ifck>;
89 };
90
91 iva1_ifck_div: iva1_ifck_div {
92 #clock-cells = <0>;
93 compatible = "fixed-factor-clock";
94 clocks = <&iva1_ifck>;
95 clock-mult = <1>;
96 clock-div = <2>;
97 };
98
99 iva1_mpu_int_ifck: iva1_mpu_int_ifck {
100 #clock-cells = <0>;
101 compatible = "ti,wait-gate-clock";
102 clocks = <&iva1_ifck_div>;
103 ti,bit-shift = <8>;
104 reg = <0x0800>;
105 };
106
107 wdt3_ick: wdt3_ick {
108 #clock-cells = <0>;
109 compatible = "ti,omap3-interface-clock";
110 clocks = <&l4_ck>;
111 ti,bit-shift = <28>;
112 reg = <0x0210>;
113 };
114
115 wdt3_fck: wdt3_fck {
116 #clock-cells = <0>;
117 compatible = "ti,wait-gate-clock";
118 clocks = <&func_32k_ck>;
119 ti,bit-shift = <28>;
120 reg = <0x0200>;
121 };
122
123 mmc_ick: mmc_ick {
124 #clock-cells = <0>;
125 compatible = "ti,omap3-interface-clock";
126 clocks = <&l4_ck>;
127 ti,bit-shift = <26>;
128 reg = <0x0210>;
129 };
130
131 mmc_fck: mmc_fck {
132 #clock-cells = <0>;
133 compatible = "ti,wait-gate-clock";
134 clocks = <&func_96m_ck>;
135 ti,bit-shift = <26>;
136 reg = <0x0200>;
137 };
138
139 eac_ick: eac_ick {
140 #clock-cells = <0>;
141 compatible = "ti,omap3-interface-clock";
142 clocks = <&l4_ck>;
143 ti,bit-shift = <24>;
144 reg = <0x0210>;
145 };
146
147 eac_fck: eac_fck {
148 #clock-cells = <0>;
149 compatible = "ti,wait-gate-clock";
150 clocks = <&func_96m_ck>;
151 ti,bit-shift = <24>;
152 reg = <0x0200>;
153 };
154
155 i2c1_fck: i2c1_fck {
156 #clock-cells = <0>;
157 compatible = "ti,wait-gate-clock";
158 clocks = <&func_12m_ck>;
159 ti,bit-shift = <19>;
160 reg = <0x0200>;
161 };
162
163 i2c2_fck: i2c2_fck {
164 #clock-cells = <0>;
165 compatible = "ti,wait-gate-clock";
166 clocks = <&func_12m_ck>;
167 ti,bit-shift = <20>;
168 reg = <0x0200>;
169 };
170
171 vlynq_ick: vlynq_ick {
172 #clock-cells = <0>;
173 compatible = "ti,omap3-interface-clock";
174 clocks = <&core_l3_ck>;
175 ti,bit-shift = <3>;
176 reg = <0x0210>;
177 };
178
179 vlynq_gate_fck: vlynq_gate_fck {
180 #clock-cells = <0>;
181 compatible = "ti,composite-gate-clock";
182 clocks = <&core_ck>;
183 ti,bit-shift = <3>;
184 reg = <0x0200>;
185 };
186
187 core_d18_ck: core_d18_ck {
188 #clock-cells = <0>;
189 compatible = "fixed-factor-clock";
190 clocks = <&core_ck>;
191 clock-mult = <1>;
192 clock-div = <18>;
193 };
194
195 vlynq_mux_fck: vlynq_mux_fck {
196 #clock-cells = <0>;
197 compatible = "ti,composite-mux-clock";
198 clocks = <&func_96m_ck>, <&core_ck>, <&core_d2_ck>, <&core_d3_ck>, <&core_d4_ck>, <&dummy_ck>, <&core_d6_ck>, <&dummy_ck>, <&core_d8_ck>, <&core_d9_ck>, <&dummy_ck>, <&dummy_ck>, <&core_d12_ck>, <&dummy_ck>, <&dummy_ck>, <&dummy_ck>, <&core_d16_ck>, <&dummy_ck>, <&core_d18_ck>;
199 ti,bit-shift = <15>;
200 reg = <0x0240>;
201 };
202
203 vlynq_fck: vlynq_fck {
204 #clock-cells = <0>;
205 compatible = "ti,composite-clock";
206 clocks = <&vlynq_gate_fck>, <&vlynq_mux_fck>;
207 };
208};
209
210&prcm_clockdomains {
211 gfx_clkdm: gfx_clkdm {
212 compatible = "ti,clockdomain";
213 clocks = <&gfx_ick>;
214 };
215
216 core_l3_clkdm: core_l3_clkdm {
217 compatible = "ti,clockdomain";
218 clocks = <&cam_fck>, <&vlynq_ick>, <&usb_fck>;
219 };
220
221 wkup_clkdm: wkup_clkdm {
222 compatible = "ti,clockdomain";
223 clocks = <&dpll_ck>, <&emul_ck>, <&gpt1_ick>, <&gpios_ick>,
224 <&gpios_fck>, <&mpu_wdt_ick>, <&mpu_wdt_fck>,
225 <&sync_32k_ick>, <&wdt1_ick>, <&omapctrl_ick>;
226 };
227
228 iva1_clkdm: iva1_clkdm {
229 compatible = "ti,clockdomain";
230 clocks = <&iva1_mpu_int_ifck>;
231 };
232
233 dss_clkdm: dss_clkdm {
234 compatible = "ti,clockdomain";
235 clocks = <&dss_ick>, <&dss_54m_fck>;
236 };
237
238 core_l4_clkdm: core_l4_clkdm {
239 compatible = "ti,clockdomain";
240 clocks = <&ssi_l4_ick>, <&gpt2_ick>, <&gpt3_ick>, <&gpt4_ick>,
241 <&gpt5_ick>, <&gpt6_ick>, <&gpt7_ick>, <&gpt8_ick>,
242 <&gpt9_ick>, <&gpt10_ick>, <&gpt11_ick>, <&gpt12_ick>,
243 <&mcbsp1_ick>, <&mcbsp2_ick>, <&mcspi1_ick>,
244 <&mcspi1_fck>, <&mcspi2_ick>, <&mcspi2_fck>,
245 <&uart1_ick>, <&uart1_fck>, <&uart2_ick>, <&uart2_fck>,
246 <&uart3_ick>, <&uart3_fck>, <&cam_ick>,
247 <&mailboxes_ick>, <&wdt4_ick>, <&wdt4_fck>,
248 <&wdt3_ick>, <&wdt3_fck>, <&mspro_ick>, <&mspro_fck>,
249 <&mmc_ick>, <&mmc_fck>, <&fac_ick>, <&fac_fck>,
250 <&eac_ick>, <&eac_fck>, <&hdq_ick>, <&hdq_fck>,
251 <&i2c1_ick>, <&i2c1_fck>, <&i2c2_ick>, <&i2c2_fck>,
252 <&des_ick>, <&sha_ick>, <&rng_ick>, <&aes_ick>,
253 <&pka_ick>;
254 };
255};
256
257&func_96m_ck {
258 compatible = "fixed-factor-clock";
259 clocks = <&apll96_ck>;
260 clock-mult = <1>;
261 clock-div = <1>;
262};
263
264&dsp_div_fck {
265 ti,dividers = <0>, <1>, <2>, <3>, <4>, <0>, <6>, <0>, <8>, <0>, <0>, <0>, <12>;
266};
267
268&ssi_ssr_sst_div_fck {
269 ti,dividers = <0>, <1>, <2>, <3>, <4>, <0>, <6>, <0>, <8>;
270};
diff --git a/arch/arm/boot/dts/omap2420.dtsi b/arch/arm/boot/dts/omap2420.dtsi
index 85b1fb014c43..e83b0468080c 100644
--- a/arch/arm/boot/dts/omap2420.dtsi
+++ b/arch/arm/boot/dts/omap2420.dtsi
@@ -14,6 +14,32 @@
14 compatible = "ti,omap2420", "ti,omap2"; 14 compatible = "ti,omap2420", "ti,omap2";
15 15
16 ocp { 16 ocp {
17 prcm: prcm@48008000 {
18 compatible = "ti,omap2-prcm";
19 reg = <0x48008000 0x1000>;
20
21 prcm_clocks: clocks {
22 #address-cells = <1>;
23 #size-cells = <0>;
24 };
25
26 prcm_clockdomains: clockdomains {
27 };
28 };
29
30 scrm: scrm@48000000 {
31 compatible = "ti,omap2-scrm";
32 reg = <0x48000000 0x1000>;
33
34 scrm_clocks: clocks {
35 #address-cells = <1>;
36 #size-cells = <0>;
37 };
38
39 scrm_clockdomains: clockdomains {
40 };
41 };
42
17 counter32k: counter@48004000 { 43 counter32k: counter@48004000 {
18 compatible = "ti,omap-counter32k"; 44 compatible = "ti,omap-counter32k";
19 reg = <0x48004000 0x20>; 45 reg = <0x48004000 0x20>;
@@ -125,6 +151,14 @@
125 dma-names = "tx", "rx"; 151 dma-names = "tx", "rx";
126 }; 152 };
127 153
154 mailbox: mailbox@48094000 {
155 compatible = "ti,omap2-mailbox";
156 reg = <0x48094000 0x200>;
157 interrupts = <26>, <34>;
158 interrupt-names = "dsp", "iva";
159 ti,hwmods = "mailbox";
160 };
161
128 timer1: timer@48028000 { 162 timer1: timer@48028000 {
129 compatible = "ti,omap2420-timer"; 163 compatible = "ti,omap2420-timer";
130 reg = <0x48028000 0x400>; 164 reg = <0x48028000 0x400>;
diff --git a/arch/arm/boot/dts/omap2430-clocks.dtsi b/arch/arm/boot/dts/omap2430-clocks.dtsi
new file mode 100644
index 000000000000..805f75df1cf2
--- /dev/null
+++ b/arch/arm/boot/dts/omap2430-clocks.dtsi
@@ -0,0 +1,344 @@
1/*
2 * Device Tree Source for OMAP2430 clock data
3 *
4 * Copyright (C) 2014 Texas Instruments, Inc.
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
11&scrm_clocks {
12 mcbsp3_mux_fck: mcbsp3_mux_fck {
13 #clock-cells = <0>;
14 compatible = "ti,composite-mux-clock";
15 clocks = <&func_96m_ck>, <&mcbsp_clks>;
16 reg = <0x02e8>;
17 };
18
19 mcbsp3_fck: mcbsp3_fck {
20 #clock-cells = <0>;
21 compatible = "ti,composite-clock";
22 clocks = <&mcbsp3_gate_fck>, <&mcbsp3_mux_fck>;
23 };
24
25 mcbsp4_mux_fck: mcbsp4_mux_fck {
26 #clock-cells = <0>;
27 compatible = "ti,composite-mux-clock";
28 clocks = <&func_96m_ck>, <&mcbsp_clks>;
29 ti,bit-shift = <2>;
30 reg = <0x02e8>;
31 };
32
33 mcbsp4_fck: mcbsp4_fck {
34 #clock-cells = <0>;
35 compatible = "ti,composite-clock";
36 clocks = <&mcbsp4_gate_fck>, <&mcbsp4_mux_fck>;
37 };
38
39 mcbsp5_mux_fck: mcbsp5_mux_fck {
40 #clock-cells = <0>;
41 compatible = "ti,composite-mux-clock";
42 clocks = <&func_96m_ck>, <&mcbsp_clks>;
43 ti,bit-shift = <4>;
44 reg = <0x02e8>;
45 };
46
47 mcbsp5_fck: mcbsp5_fck {
48 #clock-cells = <0>;
49 compatible = "ti,composite-clock";
50 clocks = <&mcbsp5_gate_fck>, <&mcbsp5_mux_fck>;
51 };
52};
53
54&prcm_clocks {
55 iva2_1_gate_ick: iva2_1_gate_ick {
56 #clock-cells = <0>;
57 compatible = "ti,composite-gate-clock";
58 clocks = <&dsp_fck>;
59 ti,bit-shift = <0>;
60 reg = <0x0800>;
61 };
62
63 iva2_1_div_ick: iva2_1_div_ick {
64 #clock-cells = <0>;
65 compatible = "ti,composite-divider-clock";
66 clocks = <&dsp_fck>;
67 ti,bit-shift = <5>;
68 ti,max-div = <3>;
69 reg = <0x0840>;
70 ti,index-starts-at-one;
71 };
72
73 iva2_1_ick: iva2_1_ick {
74 #clock-cells = <0>;
75 compatible = "ti,composite-clock";
76 clocks = <&iva2_1_gate_ick>, <&iva2_1_div_ick>;
77 };
78
79 mdm_gate_ick: mdm_gate_ick {
80 #clock-cells = <0>;
81 compatible = "ti,composite-interface-clock";
82 clocks = <&core_ck>;
83 ti,bit-shift = <0>;
84 reg = <0x0c10>;
85 };
86
87 mdm_div_ick: mdm_div_ick {
88 #clock-cells = <0>;
89 compatible = "ti,composite-divider-clock";
90 clocks = <&core_ck>;
91 reg = <0x0c40>;
92 ti,dividers = <0>, <1>, <0>, <0>, <4>, <0>, <6>, <0>, <0>, <9>;
93 };
94
95 mdm_ick: mdm_ick {
96 #clock-cells = <0>;
97 compatible = "ti,composite-clock";
98 clocks = <&mdm_gate_ick>, <&mdm_div_ick>;
99 };
100
101 mdm_osc_ck: mdm_osc_ck {
102 #clock-cells = <0>;
103 compatible = "ti,omap3-interface-clock";
104 clocks = <&osc_ck>;
105 ti,bit-shift = <1>;
106 reg = <0x0c00>;
107 };
108
109 mcbsp3_ick: mcbsp3_ick {
110 #clock-cells = <0>;
111 compatible = "ti,omap3-interface-clock";
112 clocks = <&l4_ck>;
113 ti,bit-shift = <3>;
114 reg = <0x0214>;
115 };
116
117 mcbsp3_gate_fck: mcbsp3_gate_fck {
118 #clock-cells = <0>;
119 compatible = "ti,composite-gate-clock";
120 clocks = <&mcbsp_clks>;
121 ti,bit-shift = <3>;
122 reg = <0x0204>;
123 };
124
125 mcbsp4_ick: mcbsp4_ick {
126 #clock-cells = <0>;
127 compatible = "ti,omap3-interface-clock";
128 clocks = <&l4_ck>;
129 ti,bit-shift = <4>;
130 reg = <0x0214>;
131 };
132
133 mcbsp4_gate_fck: mcbsp4_gate_fck {
134 #clock-cells = <0>;
135 compatible = "ti,composite-gate-clock";
136 clocks = <&mcbsp_clks>;
137 ti,bit-shift = <4>;
138 reg = <0x0204>;
139 };
140
141 mcbsp5_ick: mcbsp5_ick {
142 #clock-cells = <0>;
143 compatible = "ti,omap3-interface-clock";
144 clocks = <&l4_ck>;
145 ti,bit-shift = <5>;
146 reg = <0x0214>;
147 };
148
149 mcbsp5_gate_fck: mcbsp5_gate_fck {
150 #clock-cells = <0>;
151 compatible = "ti,composite-gate-clock";
152 clocks = <&mcbsp_clks>;
153 ti,bit-shift = <5>;
154 reg = <0x0204>;
155 };
156
157 mcspi3_ick: mcspi3_ick {
158 #clock-cells = <0>;
159 compatible = "ti,omap3-interface-clock";
160 clocks = <&l4_ck>;
161 ti,bit-shift = <9>;
162 reg = <0x0214>;
163 };
164
165 mcspi3_fck: mcspi3_fck {
166 #clock-cells = <0>;
167 compatible = "ti,wait-gate-clock";
168 clocks = <&func_48m_ck>;
169 ti,bit-shift = <9>;
170 reg = <0x0204>;
171 };
172
173 icr_ick: icr_ick {
174 #clock-cells = <0>;
175 compatible = "ti,omap3-interface-clock";
176 clocks = <&sys_ck>;
177 ti,bit-shift = <6>;
178 reg = <0x0410>;
179 };
180
181 i2chs1_fck: i2chs1_fck {
182 #clock-cells = <0>;
183 compatible = "ti,omap2430-interface-clock";
184 clocks = <&func_96m_ck>;
185 ti,bit-shift = <19>;
186 reg = <0x0204>;
187 };
188
189 i2chs2_fck: i2chs2_fck {
190 #clock-cells = <0>;
191 compatible = "ti,omap2430-interface-clock";
192 clocks = <&func_96m_ck>;
193 ti,bit-shift = <20>;
194 reg = <0x0204>;
195 };
196
197 usbhs_ick: usbhs_ick {
198 #clock-cells = <0>;
199 compatible = "ti,omap3-interface-clock";
200 clocks = <&core_l3_ck>;
201 ti,bit-shift = <6>;
202 reg = <0x0214>;
203 };
204
205 mmchs1_ick: mmchs1_ick {
206 #clock-cells = <0>;
207 compatible = "ti,omap3-interface-clock";
208 clocks = <&l4_ck>;
209 ti,bit-shift = <7>;
210 reg = <0x0214>;
211 };
212
213 mmchs1_fck: mmchs1_fck {
214 #clock-cells = <0>;
215 compatible = "ti,wait-gate-clock";
216 clocks = <&func_96m_ck>;
217 ti,bit-shift = <7>;
218 reg = <0x0204>;
219 };
220
221 mmchs2_ick: mmchs2_ick {
222 #clock-cells = <0>;
223 compatible = "ti,omap3-interface-clock";
224 clocks = <&l4_ck>;
225 ti,bit-shift = <8>;
226 reg = <0x0214>;
227 };
228
229 mmchs2_fck: mmchs2_fck {
230 #clock-cells = <0>;
231 compatible = "ti,wait-gate-clock";
232 clocks = <&func_96m_ck>;
233 ti,bit-shift = <8>;
234 reg = <0x0204>;
235 };
236
237 gpio5_ick: gpio5_ick {
238 #clock-cells = <0>;
239 compatible = "ti,omap3-interface-clock";
240 clocks = <&l4_ck>;
241 ti,bit-shift = <10>;
242 reg = <0x0214>;
243 };
244
245 gpio5_fck: gpio5_fck {
246 #clock-cells = <0>;
247 compatible = "ti,wait-gate-clock";
248 clocks = <&func_32k_ck>;
249 ti,bit-shift = <10>;
250 reg = <0x0204>;
251 };
252
253 mdm_intc_ick: mdm_intc_ick {
254 #clock-cells = <0>;
255 compatible = "ti,omap3-interface-clock";
256 clocks = <&l4_ck>;
257 ti,bit-shift = <11>;
258 reg = <0x0214>;
259 };
260
261 mmchsdb1_fck: mmchsdb1_fck {
262 #clock-cells = <0>;
263 compatible = "ti,wait-gate-clock";
264 clocks = <&func_32k_ck>;
265 ti,bit-shift = <16>;
266 reg = <0x0204>;
267 };
268
269 mmchsdb2_fck: mmchsdb2_fck {
270 #clock-cells = <0>;
271 compatible = "ti,wait-gate-clock";
272 clocks = <&func_32k_ck>;
273 ti,bit-shift = <17>;
274 reg = <0x0204>;
275 };
276};
277
278&prcm_clockdomains {
279 gfx_clkdm: gfx_clkdm {
280 compatible = "ti,clockdomain";
281 clocks = <&gfx_ick>;
282 };
283
284 core_l3_clkdm: core_l3_clkdm {
285 compatible = "ti,clockdomain";
286 clocks = <&cam_fck>, <&usb_fck>, <&usbhs_ick>;
287 };
288
289 wkup_clkdm: wkup_clkdm {
290 compatible = "ti,clockdomain";
291 clocks = <&dpll_ck>, <&emul_ck>, <&gpt1_ick>, <&gpios_ick>,
292 <&gpios_fck>, <&mpu_wdt_ick>, <&mpu_wdt_fck>,
293 <&sync_32k_ick>, <&wdt1_ick>, <&omapctrl_ick>,
294 <&icr_ick>;
295 };
296
297 dss_clkdm: dss_clkdm {
298 compatible = "ti,clockdomain";
299 clocks = <&dss_ick>, <&dss_54m_fck>;
300 };
301
302 core_l4_clkdm: core_l4_clkdm {
303 compatible = "ti,clockdomain";
304 clocks = <&ssi_l4_ick>, <&gpt2_ick>, <&gpt3_ick>, <&gpt4_ick>,
305 <&gpt5_ick>, <&gpt6_ick>, <&gpt7_ick>, <&gpt8_ick>,
306 <&gpt9_ick>, <&gpt10_ick>, <&gpt11_ick>, <&gpt12_ick>,
307 <&mcbsp1_ick>, <&mcbsp2_ick>, <&mcbsp3_ick>,
308 <&mcbsp4_ick>, <&mcbsp5_ick>, <&mcspi1_ick>,
309 <&mcspi1_fck>, <&mcspi2_ick>, <&mcspi2_fck>,
310 <&mcspi3_ick>, <&mcspi3_fck>, <&uart1_ick>,
311 <&uart1_fck>, <&uart2_ick>, <&uart2_fck>, <&uart3_ick>,
312 <&uart3_fck>, <&cam_ick>, <&mailboxes_ick>,
313 <&wdt4_ick>, <&wdt4_fck>, <&mspro_ick>, <&mspro_fck>,
314 <&fac_ick>, <&fac_fck>, <&hdq_ick>, <&hdq_fck>,
315 <&i2c1_ick>, <&i2chs1_fck>, <&i2c2_ick>, <&i2chs2_fck>,
316 <&des_ick>, <&sha_ick>, <&rng_ick>, <&aes_ick>,
317 <&pka_ick>, <&mmchs1_ick>, <&mmchs1_fck>,
318 <&mmchs2_ick>, <&mmchs2_fck>, <&gpio5_ick>,
319 <&gpio5_fck>, <&mdm_intc_ick>, <&mmchsdb1_fck>,
320 <&mmchsdb2_fck>;
321 };
322
323 mdm_clkdm: mdm_clkdm {
324 compatible = "ti,clockdomain";
325 clocks = <&mdm_osc_ck>;
326 };
327};
328
329&func_96m_ck {
330 compatible = "ti,mux-clock";
331 clocks = <&apll96_ck>, <&alt_ck>;
332 ti,bit-shift = <4>;
333 reg = <0x0540>;
334};
335
336&dsp_div_fck {
337 ti,max-div = <4>;
338 ti,index-starts-at-one;
339};
340
341&ssi_ssr_sst_div_fck {
342 ti,max-div = <5>;
343 ti,index-starts-at-one;
344};
diff --git a/arch/arm/boot/dts/omap2430.dtsi b/arch/arm/boot/dts/omap2430.dtsi
index d09697dab55e..c4e8013801ee 100644
--- a/arch/arm/boot/dts/omap2430.dtsi
+++ b/arch/arm/boot/dts/omap2430.dtsi
@@ -14,6 +14,32 @@
14 compatible = "ti,omap2430", "ti,omap2"; 14 compatible = "ti,omap2430", "ti,omap2";
15 15
16 ocp { 16 ocp {
17 prcm: prcm@49006000 {
18 compatible = "ti,omap2-prcm";
19 reg = <0x49006000 0x1000>;
20
21 prcm_clocks: clocks {
22 #address-cells = <1>;
23 #size-cells = <0>;
24 };
25
26 prcm_clockdomains: clockdomains {
27 };
28 };
29
30 scrm: scrm@49002000 {
31 compatible = "ti,omap2-scrm";
32 reg = <0x49002000 0x1000>;
33
34 scrm_clocks: clocks {
35 #address-cells = <1>;
36 #size-cells = <0>;
37 };
38
39 scrm_clockdomains: clockdomains {
40 };
41 };
42
17 counter32k: counter@49020000 { 43 counter32k: counter@49020000 {
18 compatible = "ti,omap-counter32k"; 44 compatible = "ti,omap-counter32k";
19 reg = <0x49020000 0x20>; 45 reg = <0x49020000 0x20>;
@@ -216,6 +242,13 @@
216 dma-names = "tx", "rx"; 242 dma-names = "tx", "rx";
217 }; 243 };
218 244
245 mailbox: mailbox@48094000 {
246 compatible = "ti,omap2-mailbox";
247 reg = <0x48094000 0x200>;
248 interrupts = <26>;
249 ti,hwmods = "mailbox";
250 };
251
219 timer1: timer@49018000 { 252 timer1: timer@49018000 {
220 compatible = "ti,omap2420-timer"; 253 compatible = "ti,omap2420-timer";
221 reg = <0x49018000 0x400>; 254 reg = <0x49018000 0x400>;
diff --git a/arch/arm/boot/dts/omap24xx-clocks.dtsi b/arch/arm/boot/dts/omap24xx-clocks.dtsi
new file mode 100644
index 000000000000..a1365ca926eb
--- /dev/null
+++ b/arch/arm/boot/dts/omap24xx-clocks.dtsi
@@ -0,0 +1,1244 @@
1/*
2 * Device Tree Source for OMAP24xx clock data
3 *
4 * Copyright (C) 2014 Texas Instruments, Inc.
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&scrm_clocks {
11 mcbsp1_mux_fck: mcbsp1_mux_fck {
12 #clock-cells = <0>;
13 compatible = "ti,composite-mux-clock";
14 clocks = <&func_96m_ck>, <&mcbsp_clks>;
15 ti,bit-shift = <2>;
16 reg = <0x0274>;
17 };
18
19 mcbsp1_fck: mcbsp1_fck {
20 #clock-cells = <0>;
21 compatible = "ti,composite-clock";
22 clocks = <&mcbsp1_gate_fck>, <&mcbsp1_mux_fck>;
23 };
24
25 mcbsp2_mux_fck: mcbsp2_mux_fck {
26 #clock-cells = <0>;
27 compatible = "ti,composite-mux-clock";
28 clocks = <&func_96m_ck>, <&mcbsp_clks>;
29 ti,bit-shift = <6>;
30 reg = <0x0274>;
31 };
32
33 mcbsp2_fck: mcbsp2_fck {
34 #clock-cells = <0>;
35 compatible = "ti,composite-clock";
36 clocks = <&mcbsp2_gate_fck>, <&mcbsp2_mux_fck>;
37 };
38};
39
40&prcm_clocks {
41 func_32k_ck: func_32k_ck {
42 #clock-cells = <0>;
43 compatible = "fixed-clock";
44 clock-frequency = <32768>;
45 };
46
47 secure_32k_ck: secure_32k_ck {
48 #clock-cells = <0>;
49 compatible = "fixed-clock";
50 clock-frequency = <32768>;
51 };
52
53 virt_12m_ck: virt_12m_ck {
54 #clock-cells = <0>;
55 compatible = "fixed-clock";
56 clock-frequency = <12000000>;
57 };
58
59 virt_13m_ck: virt_13m_ck {
60 #clock-cells = <0>;
61 compatible = "fixed-clock";
62 clock-frequency = <13000000>;
63 };
64
65 virt_19200000_ck: virt_19200000_ck {
66 #clock-cells = <0>;
67 compatible = "fixed-clock";
68 clock-frequency = <19200000>;
69 };
70
71 virt_26m_ck: virt_26m_ck {
72 #clock-cells = <0>;
73 compatible = "fixed-clock";
74 clock-frequency = <26000000>;
75 };
76
77 aplls_clkin_ck: aplls_clkin_ck {
78 #clock-cells = <0>;
79 compatible = "ti,mux-clock";
80 clocks = <&virt_19200000_ck>, <&virt_26m_ck>, <&virt_13m_ck>, <&virt_12m_ck>;
81 ti,bit-shift = <23>;
82 reg = <0x0540>;
83 };
84
85 aplls_clkin_x2_ck: aplls_clkin_x2_ck {
86 #clock-cells = <0>;
87 compatible = "fixed-factor-clock";
88 clocks = <&aplls_clkin_ck>;
89 clock-mult = <2>;
90 clock-div = <1>;
91 };
92
93 osc_ck: osc_ck {
94 #clock-cells = <0>;
95 compatible = "ti,mux-clock";
96 clocks = <&aplls_clkin_ck>, <&aplls_clkin_x2_ck>;
97 ti,bit-shift = <6>;
98 reg = <0x0060>;
99 ti,index-starts-at-one;
100 };
101
102 sys_ck: sys_ck {
103 #clock-cells = <0>;
104 compatible = "ti,divider-clock";
105 clocks = <&osc_ck>;
106 ti,bit-shift = <6>;
107 ti,max-div = <3>;
108 reg = <0x0060>;
109 ti,index-starts-at-one;
110 };
111
112 alt_ck: alt_ck {
113 #clock-cells = <0>;
114 compatible = "fixed-clock";
115 clock-frequency = <54000000>;
116 };
117
118 mcbsp_clks: mcbsp_clks {
119 #clock-cells = <0>;
120 compatible = "fixed-clock";
121 clock-frequency = <0x0>;
122 };
123
124 dpll_ck: dpll_ck {
125 #clock-cells = <0>;
126 compatible = "ti,omap2-dpll-core-clock";
127 clocks = <&sys_ck>, <&sys_ck>;
128 reg = <0x0500>, <0x0540>;
129 };
130
131 apll96_ck: apll96_ck {
132 #clock-cells = <0>;
133 compatible = "ti,omap2-apll-clock";
134 clocks = <&sys_ck>;
135 ti,bit-shift = <2>;
136 ti,idlest-shift = <8>;
137 ti,clock-frequency = <96000000>;
138 reg = <0x0500>, <0x0530>, <0x0520>;
139 };
140
141 apll54_ck: apll54_ck {
142 #clock-cells = <0>;
143 compatible = "ti,omap2-apll-clock";
144 clocks = <&sys_ck>;
145 ti,bit-shift = <6>;
146 ti,idlest-shift = <9>;
147 ti,clock-frequency = <54000000>;
148 reg = <0x0500>, <0x0530>, <0x0520>;
149 };
150
151 func_54m_ck: func_54m_ck {
152 #clock-cells = <0>;
153 compatible = "ti,mux-clock";
154 clocks = <&apll54_ck>, <&alt_ck>;
155 ti,bit-shift = <5>;
156 reg = <0x0540>;
157 };
158
159 core_ck: core_ck {
160 #clock-cells = <0>;
161 compatible = "fixed-factor-clock";
162 clocks = <&dpll_ck>;
163 clock-mult = <1>;
164 clock-div = <1>;
165 };
166
167 func_96m_ck: func_96m_ck {
168 #clock-cells = <0>;
169 };
170
171 apll96_d2_ck: apll96_d2_ck {
172 #clock-cells = <0>;
173 compatible = "fixed-factor-clock";
174 clocks = <&apll96_ck>;
175 clock-mult = <1>;
176 clock-div = <2>;
177 };
178
179 func_48m_ck: func_48m_ck {
180 #clock-cells = <0>;
181 compatible = "ti,mux-clock";
182 clocks = <&apll96_d2_ck>, <&alt_ck>;
183 ti,bit-shift = <3>;
184 reg = <0x0540>;
185 };
186
187 func_12m_ck: func_12m_ck {
188 #clock-cells = <0>;
189 compatible = "fixed-factor-clock";
190 clocks = <&func_48m_ck>;
191 clock-mult = <1>;
192 clock-div = <4>;
193 };
194
195 sys_clkout_src_gate: sys_clkout_src_gate {
196 #clock-cells = <0>;
197 compatible = "ti,composite-no-wait-gate-clock";
198 clocks = <&core_ck>;
199 ti,bit-shift = <7>;
200 reg = <0x0070>;
201 };
202
203 sys_clkout_src_mux: sys_clkout_src_mux {
204 #clock-cells = <0>;
205 compatible = "ti,composite-mux-clock";
206 clocks = <&core_ck>, <&sys_ck>, <&func_96m_ck>, <&func_54m_ck>;
207 reg = <0x0070>;
208 };
209
210 sys_clkout_src: sys_clkout_src {
211 #clock-cells = <0>;
212 compatible = "ti,composite-clock";
213 clocks = <&sys_clkout_src_gate>, <&sys_clkout_src_mux>;
214 };
215
216 sys_clkout: sys_clkout {
217 #clock-cells = <0>;
218 compatible = "ti,divider-clock";
219 clocks = <&sys_clkout_src>;
220 ti,bit-shift = <3>;
221 ti,max-div = <64>;
222 reg = <0x0070>;
223 ti,index-power-of-two;
224 };
225
226 emul_ck: emul_ck {
227 #clock-cells = <0>;
228 compatible = "ti,gate-clock";
229 clocks = <&func_54m_ck>;
230 ti,bit-shift = <0>;
231 reg = <0x0078>;
232 };
233
234 mpu_ck: mpu_ck {
235 #clock-cells = <0>;
236 compatible = "ti,divider-clock";
237 clocks = <&core_ck>;
238 ti,max-div = <31>;
239 reg = <0x0140>;
240 ti,index-starts-at-one;
241 };
242
243 dsp_gate_fck: dsp_gate_fck {
244 #clock-cells = <0>;
245 compatible = "ti,composite-gate-clock";
246 clocks = <&core_ck>;
247 ti,bit-shift = <0>;
248 reg = <0x0800>;
249 };
250
251 dsp_div_fck: dsp_div_fck {
252 #clock-cells = <0>;
253 compatible = "ti,composite-divider-clock";
254 clocks = <&core_ck>;
255 reg = <0x0840>;
256 };
257
258 dsp_fck: dsp_fck {
259 #clock-cells = <0>;
260 compatible = "ti,composite-clock";
261 clocks = <&dsp_gate_fck>, <&dsp_div_fck>;
262 };
263
264 core_l3_ck: core_l3_ck {
265 #clock-cells = <0>;
266 compatible = "ti,divider-clock";
267 clocks = <&core_ck>;
268 ti,max-div = <31>;
269 reg = <0x0240>;
270 ti,index-starts-at-one;
271 };
272
273 gfx_3d_gate_fck: gfx_3d_gate_fck {
274 #clock-cells = <0>;
275 compatible = "ti,composite-gate-clock";
276 clocks = <&core_l3_ck>;
277 ti,bit-shift = <2>;
278 reg = <0x0300>;
279 };
280
281 gfx_3d_div_fck: gfx_3d_div_fck {
282 #clock-cells = <0>;
283 compatible = "ti,composite-divider-clock";
284 clocks = <&core_l3_ck>;
285 ti,max-div = <4>;
286 reg = <0x0340>;
287 ti,index-starts-at-one;
288 };
289
290 gfx_3d_fck: gfx_3d_fck {
291 #clock-cells = <0>;
292 compatible = "ti,composite-clock";
293 clocks = <&gfx_3d_gate_fck>, <&gfx_3d_div_fck>;
294 };
295
296 gfx_2d_gate_fck: gfx_2d_gate_fck {
297 #clock-cells = <0>;
298 compatible = "ti,composite-gate-clock";
299 clocks = <&core_l3_ck>;
300 ti,bit-shift = <1>;
301 reg = <0x0300>;
302 };
303
304 gfx_2d_div_fck: gfx_2d_div_fck {
305 #clock-cells = <0>;
306 compatible = "ti,composite-divider-clock";
307 clocks = <&core_l3_ck>;
308 ti,max-div = <4>;
309 reg = <0x0340>;
310 ti,index-starts-at-one;
311 };
312
313 gfx_2d_fck: gfx_2d_fck {
314 #clock-cells = <0>;
315 compatible = "ti,composite-clock";
316 clocks = <&gfx_2d_gate_fck>, <&gfx_2d_div_fck>;
317 };
318
319 gfx_ick: gfx_ick {
320 #clock-cells = <0>;
321 compatible = "ti,wait-gate-clock";
322 clocks = <&core_l3_ck>;
323 ti,bit-shift = <0>;
324 reg = <0x0310>;
325 };
326
327 l4_ck: l4_ck {
328 #clock-cells = <0>;
329 compatible = "ti,divider-clock";
330 clocks = <&core_l3_ck>;
331 ti,bit-shift = <5>;
332 ti,max-div = <3>;
333 reg = <0x0240>;
334 ti,index-starts-at-one;
335 };
336
337 dss_ick: dss_ick {
338 #clock-cells = <0>;
339 compatible = "ti,omap3-no-wait-interface-clock";
340 clocks = <&l4_ck>;
341 ti,bit-shift = <0>;
342 reg = <0x0210>;
343 };
344
345 dss1_gate_fck: dss1_gate_fck {
346 #clock-cells = <0>;
347 compatible = "ti,composite-no-wait-gate-clock";
348 clocks = <&core_ck>;
349 ti,bit-shift = <0>;
350 reg = <0x0200>;
351 };
352
353 core_d2_ck: core_d2_ck {
354 #clock-cells = <0>;
355 compatible = "fixed-factor-clock";
356 clocks = <&core_ck>;
357 clock-mult = <1>;
358 clock-div = <2>;
359 };
360
361 core_d3_ck: core_d3_ck {
362 #clock-cells = <0>;
363 compatible = "fixed-factor-clock";
364 clocks = <&core_ck>;
365 clock-mult = <1>;
366 clock-div = <3>;
367 };
368
369 core_d4_ck: core_d4_ck {
370 #clock-cells = <0>;
371 compatible = "fixed-factor-clock";
372 clocks = <&core_ck>;
373 clock-mult = <1>;
374 clock-div = <4>;
375 };
376
377 core_d5_ck: core_d5_ck {
378 #clock-cells = <0>;
379 compatible = "fixed-factor-clock";
380 clocks = <&core_ck>;
381 clock-mult = <1>;
382 clock-div = <5>;
383 };
384
385 core_d6_ck: core_d6_ck {
386 #clock-cells = <0>;
387 compatible = "fixed-factor-clock";
388 clocks = <&core_ck>;
389 clock-mult = <1>;
390 clock-div = <6>;
391 };
392
393 dummy_ck: dummy_ck {
394 #clock-cells = <0>;
395 compatible = "fixed-clock";
396 clock-frequency = <0>;
397 };
398
399 core_d8_ck: core_d8_ck {
400 #clock-cells = <0>;
401 compatible = "fixed-factor-clock";
402 clocks = <&core_ck>;
403 clock-mult = <1>;
404 clock-div = <8>;
405 };
406
407 core_d9_ck: core_d9_ck {
408 #clock-cells = <0>;
409 compatible = "fixed-factor-clock";
410 clocks = <&core_ck>;
411 clock-mult = <1>;
412 clock-div = <9>;
413 };
414
415 core_d12_ck: core_d12_ck {
416 #clock-cells = <0>;
417 compatible = "fixed-factor-clock";
418 clocks = <&core_ck>;
419 clock-mult = <1>;
420 clock-div = <12>;
421 };
422
423 core_d16_ck: core_d16_ck {
424 #clock-cells = <0>;
425 compatible = "fixed-factor-clock";
426 clocks = <&core_ck>;
427 clock-mult = <1>;
428 clock-div = <16>;
429 };
430
431 dss1_mux_fck: dss1_mux_fck {
432 #clock-cells = <0>;
433 compatible = "ti,composite-mux-clock";
434 clocks = <&sys_ck>, <&core_ck>, <&core_d2_ck>, <&core_d3_ck>, <&core_d4_ck>, <&core_d5_ck>, <&core_d6_ck>, <&core_d8_ck>, <&core_d9_ck>, <&core_d12_ck>, <&core_d16_ck>;
435 ti,bit-shift = <8>;
436 reg = <0x0240>;
437 };
438
439 dss1_fck: dss1_fck {
440 #clock-cells = <0>;
441 compatible = "ti,composite-clock";
442 clocks = <&dss1_gate_fck>, <&dss1_mux_fck>;
443 };
444
445 dss2_gate_fck: dss2_gate_fck {
446 #clock-cells = <0>;
447 compatible = "ti,composite-no-wait-gate-clock";
448 clocks = <&func_48m_ck>;
449 ti,bit-shift = <1>;
450 reg = <0x0200>;
451 };
452
453 dss2_mux_fck: dss2_mux_fck {
454 #clock-cells = <0>;
455 compatible = "ti,composite-mux-clock";
456 clocks = <&sys_ck>, <&func_48m_ck>;
457 ti,bit-shift = <13>;
458 reg = <0x0240>;
459 };
460
461 dss2_fck: dss2_fck {
462 #clock-cells = <0>;
463 compatible = "ti,composite-clock";
464 clocks = <&dss2_gate_fck>, <&dss2_mux_fck>;
465 };
466
467 dss_54m_fck: dss_54m_fck {
468 #clock-cells = <0>;
469 compatible = "ti,wait-gate-clock";
470 clocks = <&func_54m_ck>;
471 ti,bit-shift = <2>;
472 reg = <0x0200>;
473 };
474
475 ssi_ssr_sst_gate_fck: ssi_ssr_sst_gate_fck {
476 #clock-cells = <0>;
477 compatible = "ti,composite-gate-clock";
478 clocks = <&core_ck>;
479 ti,bit-shift = <1>;
480 reg = <0x0204>;
481 };
482
483 ssi_ssr_sst_div_fck: ssi_ssr_sst_div_fck {
484 #clock-cells = <0>;
485 compatible = "ti,composite-divider-clock";
486 clocks = <&core_ck>;
487 ti,bit-shift = <20>;
488 reg = <0x0240>;
489 };
490
491 ssi_ssr_sst_fck: ssi_ssr_sst_fck {
492 #clock-cells = <0>;
493 compatible = "ti,composite-clock";
494 clocks = <&ssi_ssr_sst_gate_fck>, <&ssi_ssr_sst_div_fck>;
495 };
496
497 usb_l4_gate_ick: usb_l4_gate_ick {
498 #clock-cells = <0>;
499 compatible = "ti,composite-interface-clock";
500 clocks = <&core_l3_ck>;
501 ti,bit-shift = <0>;
502 reg = <0x0214>;
503 };
504
505 usb_l4_div_ick: usb_l4_div_ick {
506 #clock-cells = <0>;
507 compatible = "ti,composite-divider-clock";
508 clocks = <&core_l3_ck>;
509 ti,bit-shift = <25>;
510 reg = <0x0240>;
511 ti,dividers = <0>, <1>, <2>, <0>, <4>;
512 };
513
514 usb_l4_ick: usb_l4_ick {
515 #clock-cells = <0>;
516 compatible = "ti,composite-clock";
517 clocks = <&usb_l4_gate_ick>, <&usb_l4_div_ick>;
518 };
519
520 ssi_l4_ick: ssi_l4_ick {
521 #clock-cells = <0>;
522 compatible = "ti,omap3-interface-clock";
523 clocks = <&l4_ck>;
524 ti,bit-shift = <1>;
525 reg = <0x0214>;
526 };
527
528 gpt1_ick: gpt1_ick {
529 #clock-cells = <0>;
530 compatible = "ti,omap3-interface-clock";
531 clocks = <&sys_ck>;
532 ti,bit-shift = <0>;
533 reg = <0x0410>;
534 };
535
536 gpt1_gate_fck: gpt1_gate_fck {
537 #clock-cells = <0>;
538 compatible = "ti,composite-gate-clock";
539 clocks = <&func_32k_ck>;
540 ti,bit-shift = <0>;
541 reg = <0x0400>;
542 };
543
544 gpt1_mux_fck: gpt1_mux_fck {
545 #clock-cells = <0>;
546 compatible = "ti,composite-mux-clock";
547 clocks = <&func_32k_ck>, <&sys_ck>, <&alt_ck>;
548 reg = <0x0440>;
549 };
550
551 gpt1_fck: gpt1_fck {
552 #clock-cells = <0>;
553 compatible = "ti,composite-clock";
554 clocks = <&gpt1_gate_fck>, <&gpt1_mux_fck>;
555 };
556
557 gpt2_ick: gpt2_ick {
558 #clock-cells = <0>;
559 compatible = "ti,omap3-interface-clock";
560 clocks = <&l4_ck>;
561 ti,bit-shift = <4>;
562 reg = <0x0210>;
563 };
564
565 gpt2_gate_fck: gpt2_gate_fck {
566 #clock-cells = <0>;
567 compatible = "ti,composite-gate-clock";
568 clocks = <&func_32k_ck>;
569 ti,bit-shift = <4>;
570 reg = <0x0200>;
571 };
572
573 gpt2_mux_fck: gpt2_mux_fck {
574 #clock-cells = <0>;
575 compatible = "ti,composite-mux-clock";
576 clocks = <&func_32k_ck>, <&sys_ck>, <&alt_ck>;
577 ti,bit-shift = <2>;
578 reg = <0x0244>;
579 };
580
581 gpt2_fck: gpt2_fck {
582 #clock-cells = <0>;
583 compatible = "ti,composite-clock";
584 clocks = <&gpt2_gate_fck>, <&gpt2_mux_fck>;
585 };
586
587 gpt3_ick: gpt3_ick {
588 #clock-cells = <0>;
589 compatible = "ti,omap3-interface-clock";
590 clocks = <&l4_ck>;
591 ti,bit-shift = <5>;
592 reg = <0x0210>;
593 };
594
595 gpt3_gate_fck: gpt3_gate_fck {
596 #clock-cells = <0>;
597 compatible = "ti,composite-gate-clock";
598 clocks = <&func_32k_ck>;
599 ti,bit-shift = <5>;
600 reg = <0x0200>;
601 };
602
603 gpt3_mux_fck: gpt3_mux_fck {
604 #clock-cells = <0>;
605 compatible = "ti,composite-mux-clock";
606 clocks = <&func_32k_ck>, <&sys_ck>, <&alt_ck>;
607 ti,bit-shift = <4>;
608 reg = <0x0244>;
609 };
610
611 gpt3_fck: gpt3_fck {
612 #clock-cells = <0>;
613 compatible = "ti,composite-clock";
614 clocks = <&gpt3_gate_fck>, <&gpt3_mux_fck>;
615 };
616
617 gpt4_ick: gpt4_ick {
618 #clock-cells = <0>;
619 compatible = "ti,omap3-interface-clock";
620 clocks = <&l4_ck>;
621 ti,bit-shift = <6>;
622 reg = <0x0210>;
623 };
624
625 gpt4_gate_fck: gpt4_gate_fck {
626 #clock-cells = <0>;
627 compatible = "ti,composite-gate-clock";
628 clocks = <&func_32k_ck>;
629 ti,bit-shift = <6>;
630 reg = <0x0200>;
631 };
632
633 gpt4_mux_fck: gpt4_mux_fck {
634 #clock-cells = <0>;
635 compatible = "ti,composite-mux-clock";
636 clocks = <&func_32k_ck>, <&sys_ck>, <&alt_ck>;
637 ti,bit-shift = <6>;
638 reg = <0x0244>;
639 };
640
641 gpt4_fck: gpt4_fck {
642 #clock-cells = <0>;
643 compatible = "ti,composite-clock";
644 clocks = <&gpt4_gate_fck>, <&gpt4_mux_fck>;
645 };
646
647 gpt5_ick: gpt5_ick {
648 #clock-cells = <0>;
649 compatible = "ti,omap3-interface-clock";
650 clocks = <&l4_ck>;
651 ti,bit-shift = <7>;
652 reg = <0x0210>;
653 };
654
655 gpt5_gate_fck: gpt5_gate_fck {
656 #clock-cells = <0>;
657 compatible = "ti,composite-gate-clock";
658 clocks = <&func_32k_ck>;
659 ti,bit-shift = <7>;
660 reg = <0x0200>;
661 };
662
663 gpt5_mux_fck: gpt5_mux_fck {
664 #clock-cells = <0>;
665 compatible = "ti,composite-mux-clock";
666 clocks = <&func_32k_ck>, <&sys_ck>, <&alt_ck>;
667 ti,bit-shift = <8>;
668 reg = <0x0244>;
669 };
670
671 gpt5_fck: gpt5_fck {
672 #clock-cells = <0>;
673 compatible = "ti,composite-clock";
674 clocks = <&gpt5_gate_fck>, <&gpt5_mux_fck>;
675 };
676
677 gpt6_ick: gpt6_ick {
678 #clock-cells = <0>;
679 compatible = "ti,omap3-interface-clock";
680 clocks = <&l4_ck>;
681 ti,bit-shift = <8>;
682 reg = <0x0210>;
683 };
684
685 gpt6_gate_fck: gpt6_gate_fck {
686 #clock-cells = <0>;
687 compatible = "ti,composite-gate-clock";
688 clocks = <&func_32k_ck>;
689 ti,bit-shift = <8>;
690 reg = <0x0200>;
691 };
692
693 gpt6_mux_fck: gpt6_mux_fck {
694 #clock-cells = <0>;
695 compatible = "ti,composite-mux-clock";
696 clocks = <&func_32k_ck>, <&sys_ck>, <&alt_ck>;
697 ti,bit-shift = <10>;
698 reg = <0x0244>;
699 };
700
701 gpt6_fck: gpt6_fck {
702 #clock-cells = <0>;
703 compatible = "ti,composite-clock";
704 clocks = <&gpt6_gate_fck>, <&gpt6_mux_fck>;
705 };
706
707 gpt7_ick: gpt7_ick {
708 #clock-cells = <0>;
709 compatible = "ti,omap3-interface-clock";
710 clocks = <&l4_ck>;
711 ti,bit-shift = <9>;
712 reg = <0x0210>;
713 };
714
715 gpt7_gate_fck: gpt7_gate_fck {
716 #clock-cells = <0>;
717 compatible = "ti,composite-gate-clock";
718 clocks = <&func_32k_ck>;
719 ti,bit-shift = <9>;
720 reg = <0x0200>;
721 };
722
723 gpt7_mux_fck: gpt7_mux_fck {
724 #clock-cells = <0>;
725 compatible = "ti,composite-mux-clock";
726 clocks = <&func_32k_ck>, <&sys_ck>, <&alt_ck>;
727 ti,bit-shift = <12>;
728 reg = <0x0244>;
729 };
730
731 gpt7_fck: gpt7_fck {
732 #clock-cells = <0>;
733 compatible = "ti,composite-clock";
734 clocks = <&gpt7_gate_fck>, <&gpt7_mux_fck>;
735 };
736
737 gpt8_ick: gpt8_ick {
738 #clock-cells = <0>;
739 compatible = "ti,omap3-interface-clock";
740 clocks = <&l4_ck>;
741 ti,bit-shift = <10>;
742 reg = <0x0210>;
743 };
744
745 gpt8_gate_fck: gpt8_gate_fck {
746 #clock-cells = <0>;
747 compatible = "ti,composite-gate-clock";
748 clocks = <&func_32k_ck>;
749 ti,bit-shift = <10>;
750 reg = <0x0200>;
751 };
752
753 gpt8_mux_fck: gpt8_mux_fck {
754 #clock-cells = <0>;
755 compatible = "ti,composite-mux-clock";
756 clocks = <&func_32k_ck>, <&sys_ck>, <&alt_ck>;
757 ti,bit-shift = <14>;
758 reg = <0x0244>;
759 };
760
761 gpt8_fck: gpt8_fck {
762 #clock-cells = <0>;
763 compatible = "ti,composite-clock";
764 clocks = <&gpt8_gate_fck>, <&gpt8_mux_fck>;
765 };
766
767 gpt9_ick: gpt9_ick {
768 #clock-cells = <0>;
769 compatible = "ti,omap3-interface-clock";
770 clocks = <&l4_ck>;
771 ti,bit-shift = <11>;
772 reg = <0x0210>;
773 };
774
775 gpt9_gate_fck: gpt9_gate_fck {
776 #clock-cells = <0>;
777 compatible = "ti,composite-gate-clock";
778 clocks = <&func_32k_ck>;
779 ti,bit-shift = <11>;
780 reg = <0x0200>;
781 };
782
783 gpt9_mux_fck: gpt9_mux_fck {
784 #clock-cells = <0>;
785 compatible = "ti,composite-mux-clock";
786 clocks = <&func_32k_ck>, <&sys_ck>, <&alt_ck>;
787 ti,bit-shift = <16>;
788 reg = <0x0244>;
789 };
790
791 gpt9_fck: gpt9_fck {
792 #clock-cells = <0>;
793 compatible = "ti,composite-clock";
794 clocks = <&gpt9_gate_fck>, <&gpt9_mux_fck>;
795 };
796
797 gpt10_ick: gpt10_ick {
798 #clock-cells = <0>;
799 compatible = "ti,omap3-interface-clock";
800 clocks = <&l4_ck>;
801 ti,bit-shift = <12>;
802 reg = <0x0210>;
803 };
804
805 gpt10_gate_fck: gpt10_gate_fck {
806 #clock-cells = <0>;
807 compatible = "ti,composite-gate-clock";
808 clocks = <&func_32k_ck>;
809 ti,bit-shift = <12>;
810 reg = <0x0200>;
811 };
812
813 gpt10_mux_fck: gpt10_mux_fck {
814 #clock-cells = <0>;
815 compatible = "ti,composite-mux-clock";
816 clocks = <&func_32k_ck>, <&sys_ck>, <&alt_ck>;
817 ti,bit-shift = <18>;
818 reg = <0x0244>;
819 };
820
821 gpt10_fck: gpt10_fck {
822 #clock-cells = <0>;
823 compatible = "ti,composite-clock";
824 clocks = <&gpt10_gate_fck>, <&gpt10_mux_fck>;
825 };
826
827 gpt11_ick: gpt11_ick {
828 #clock-cells = <0>;
829 compatible = "ti,omap3-interface-clock";
830 clocks = <&l4_ck>;
831 ti,bit-shift = <13>;
832 reg = <0x0210>;
833 };
834
835 gpt11_gate_fck: gpt11_gate_fck {
836 #clock-cells = <0>;
837 compatible = "ti,composite-gate-clock";
838 clocks = <&func_32k_ck>;
839 ti,bit-shift = <13>;
840 reg = <0x0200>;
841 };
842
843 gpt11_mux_fck: gpt11_mux_fck {
844 #clock-cells = <0>;
845 compatible = "ti,composite-mux-clock";
846 clocks = <&func_32k_ck>, <&sys_ck>, <&alt_ck>;
847 ti,bit-shift = <20>;
848 reg = <0x0244>;
849 };
850
851 gpt11_fck: gpt11_fck {
852 #clock-cells = <0>;
853 compatible = "ti,composite-clock";
854 clocks = <&gpt11_gate_fck>, <&gpt11_mux_fck>;
855 };
856
857 gpt12_ick: gpt12_ick {
858 #clock-cells = <0>;
859 compatible = "ti,omap3-interface-clock";
860 clocks = <&l4_ck>;
861 ti,bit-shift = <14>;
862 reg = <0x0210>;
863 };
864
865 gpt12_gate_fck: gpt12_gate_fck {
866 #clock-cells = <0>;
867 compatible = "ti,composite-gate-clock";
868 clocks = <&func_32k_ck>;
869 ti,bit-shift = <14>;
870 reg = <0x0200>;
871 };
872
873 gpt12_mux_fck: gpt12_mux_fck {
874 #clock-cells = <0>;
875 compatible = "ti,composite-mux-clock";
876 clocks = <&func_32k_ck>, <&sys_ck>, <&alt_ck>;
877 ti,bit-shift = <22>;
878 reg = <0x0244>;
879 };
880
881 gpt12_fck: gpt12_fck {
882 #clock-cells = <0>;
883 compatible = "ti,composite-clock";
884 clocks = <&gpt12_gate_fck>, <&gpt12_mux_fck>;
885 };
886
887 mcbsp1_ick: mcbsp1_ick {
888 #clock-cells = <0>;
889 compatible = "ti,omap3-interface-clock";
890 clocks = <&l4_ck>;
891 ti,bit-shift = <15>;
892 reg = <0x0210>;
893 };
894
895 mcbsp1_gate_fck: mcbsp1_gate_fck {
896 #clock-cells = <0>;
897 compatible = "ti,composite-gate-clock";
898 clocks = <&mcbsp_clks>;
899 ti,bit-shift = <15>;
900 reg = <0x0200>;
901 };
902
903 mcbsp2_ick: mcbsp2_ick {
904 #clock-cells = <0>;
905 compatible = "ti,omap3-interface-clock";
906 clocks = <&l4_ck>;
907 ti,bit-shift = <16>;
908 reg = <0x0210>;
909 };
910
911 mcbsp2_gate_fck: mcbsp2_gate_fck {
912 #clock-cells = <0>;
913 compatible = "ti,composite-gate-clock";
914 clocks = <&mcbsp_clks>;
915 ti,bit-shift = <16>;
916 reg = <0x0200>;
917 };
918
919 mcspi1_ick: mcspi1_ick {
920 #clock-cells = <0>;
921 compatible = "ti,omap3-interface-clock";
922 clocks = <&l4_ck>;
923 ti,bit-shift = <17>;
924 reg = <0x0210>;
925 };
926
927 mcspi1_fck: mcspi1_fck {
928 #clock-cells = <0>;
929 compatible = "ti,wait-gate-clock";
930 clocks = <&func_48m_ck>;
931 ti,bit-shift = <17>;
932 reg = <0x0200>;
933 };
934
935 mcspi2_ick: mcspi2_ick {
936 #clock-cells = <0>;
937 compatible = "ti,omap3-interface-clock";
938 clocks = <&l4_ck>;
939 ti,bit-shift = <18>;
940 reg = <0x0210>;
941 };
942
943 mcspi2_fck: mcspi2_fck {
944 #clock-cells = <0>;
945 compatible = "ti,wait-gate-clock";
946 clocks = <&func_48m_ck>;
947 ti,bit-shift = <18>;
948 reg = <0x0200>;
949 };
950
951 uart1_ick: uart1_ick {
952 #clock-cells = <0>;
953 compatible = "ti,omap3-interface-clock";
954 clocks = <&l4_ck>;
955 ti,bit-shift = <21>;
956 reg = <0x0210>;
957 };
958
959 uart1_fck: uart1_fck {
960 #clock-cells = <0>;
961 compatible = "ti,wait-gate-clock";
962 clocks = <&func_48m_ck>;
963 ti,bit-shift = <21>;
964 reg = <0x0200>;
965 };
966
967 uart2_ick: uart2_ick {
968 #clock-cells = <0>;
969 compatible = "ti,omap3-interface-clock";
970 clocks = <&l4_ck>;
971 ti,bit-shift = <22>;
972 reg = <0x0210>;
973 };
974
975 uart2_fck: uart2_fck {
976 #clock-cells = <0>;
977 compatible = "ti,wait-gate-clock";
978 clocks = <&func_48m_ck>;
979 ti,bit-shift = <22>;
980 reg = <0x0200>;
981 };
982
983 uart3_ick: uart3_ick {
984 #clock-cells = <0>;
985 compatible = "ti,omap3-interface-clock";
986 clocks = <&l4_ck>;
987 ti,bit-shift = <2>;
988 reg = <0x0214>;
989 };
990
991 uart3_fck: uart3_fck {
992 #clock-cells = <0>;
993 compatible = "ti,wait-gate-clock";
994 clocks = <&func_48m_ck>;
995 ti,bit-shift = <2>;
996 reg = <0x0204>;
997 };
998
999 gpios_ick: gpios_ick {
1000 #clock-cells = <0>;
1001 compatible = "ti,omap3-interface-clock";
1002 clocks = <&sys_ck>;
1003 ti,bit-shift = <2>;
1004 reg = <0x0410>;
1005 };
1006
1007 gpios_fck: gpios_fck {
1008 #clock-cells = <0>;
1009 compatible = "ti,wait-gate-clock";
1010 clocks = <&func_32k_ck>;
1011 ti,bit-shift = <2>;
1012 reg = <0x0400>;
1013 };
1014
1015 mpu_wdt_ick: mpu_wdt_ick {
1016 #clock-cells = <0>;
1017 compatible = "ti,omap3-interface-clock";
1018 clocks = <&sys_ck>;
1019 ti,bit-shift = <3>;
1020 reg = <0x0410>;
1021 };
1022
1023 mpu_wdt_fck: mpu_wdt_fck {
1024 #clock-cells = <0>;
1025 compatible = "ti,wait-gate-clock";
1026 clocks = <&func_32k_ck>;
1027 ti,bit-shift = <3>;
1028 reg = <0x0400>;
1029 };
1030
1031 sync_32k_ick: sync_32k_ick {
1032 #clock-cells = <0>;
1033 compatible = "ti,omap3-interface-clock";
1034 clocks = <&sys_ck>;
1035 ti,bit-shift = <1>;
1036 reg = <0x0410>;
1037 };
1038
1039 wdt1_ick: wdt1_ick {
1040 #clock-cells = <0>;
1041 compatible = "ti,omap3-interface-clock";
1042 clocks = <&sys_ck>;
1043 ti,bit-shift = <4>;
1044 reg = <0x0410>;
1045 };
1046
1047 omapctrl_ick: omapctrl_ick {
1048 #clock-cells = <0>;
1049 compatible = "ti,omap3-interface-clock";
1050 clocks = <&sys_ck>;
1051 ti,bit-shift = <5>;
1052 reg = <0x0410>;
1053 };
1054
1055 cam_fck: cam_fck {
1056 #clock-cells = <0>;
1057 compatible = "ti,gate-clock";
1058 clocks = <&func_96m_ck>;
1059 ti,bit-shift = <31>;
1060 reg = <0x0200>;
1061 };
1062
1063 cam_ick: cam_ick {
1064 #clock-cells = <0>;
1065 compatible = "ti,omap3-no-wait-interface-clock";
1066 clocks = <&l4_ck>;
1067 ti,bit-shift = <31>;
1068 reg = <0x0210>;
1069 };
1070
1071 mailboxes_ick: mailboxes_ick {
1072 #clock-cells = <0>;
1073 compatible = "ti,omap3-interface-clock";
1074 clocks = <&l4_ck>;
1075 ti,bit-shift = <30>;
1076 reg = <0x0210>;
1077 };
1078
1079 wdt4_ick: wdt4_ick {
1080 #clock-cells = <0>;
1081 compatible = "ti,omap3-interface-clock";
1082 clocks = <&l4_ck>;
1083 ti,bit-shift = <29>;
1084 reg = <0x0210>;
1085 };
1086
1087 wdt4_fck: wdt4_fck {
1088 #clock-cells = <0>;
1089 compatible = "ti,wait-gate-clock";
1090 clocks = <&func_32k_ck>;
1091 ti,bit-shift = <29>;
1092 reg = <0x0200>;
1093 };
1094
1095 mspro_ick: mspro_ick {
1096 #clock-cells = <0>;
1097 compatible = "ti,omap3-interface-clock";
1098 clocks = <&l4_ck>;
1099 ti,bit-shift = <27>;
1100 reg = <0x0210>;
1101 };
1102
1103 mspro_fck: mspro_fck {
1104 #clock-cells = <0>;
1105 compatible = "ti,wait-gate-clock";
1106 clocks = <&func_96m_ck>;
1107 ti,bit-shift = <27>;
1108 reg = <0x0200>;
1109 };
1110
1111 fac_ick: fac_ick {
1112 #clock-cells = <0>;
1113 compatible = "ti,omap3-interface-clock";
1114 clocks = <&l4_ck>;
1115 ti,bit-shift = <25>;
1116 reg = <0x0210>;
1117 };
1118
1119 fac_fck: fac_fck {
1120 #clock-cells = <0>;
1121 compatible = "ti,wait-gate-clock";
1122 clocks = <&func_12m_ck>;
1123 ti,bit-shift = <25>;
1124 reg = <0x0200>;
1125 };
1126
1127 hdq_ick: hdq_ick {
1128 #clock-cells = <0>;
1129 compatible = "ti,omap3-interface-clock";
1130 clocks = <&l4_ck>;
1131 ti,bit-shift = <23>;
1132 reg = <0x0210>;
1133 };
1134
1135 hdq_fck: hdq_fck {
1136 #clock-cells = <0>;
1137 compatible = "ti,wait-gate-clock";
1138 clocks = <&func_12m_ck>;
1139 ti,bit-shift = <23>;
1140 reg = <0x0200>;
1141 };
1142
1143 i2c1_ick: i2c1_ick {
1144 #clock-cells = <0>;
1145 compatible = "ti,omap3-interface-clock";
1146 clocks = <&l4_ck>;
1147 ti,bit-shift = <19>;
1148 reg = <0x0210>;
1149 };
1150
1151 i2c2_ick: i2c2_ick {
1152 #clock-cells = <0>;
1153 compatible = "ti,omap3-interface-clock";
1154 clocks = <&l4_ck>;
1155 ti,bit-shift = <20>;
1156 reg = <0x0210>;
1157 };
1158
1159 gpmc_fck: gpmc_fck {
1160 #clock-cells = <0>;
1161 compatible = "ti,fixed-factor-clock";
1162 clocks = <&core_l3_ck>;
1163 ti,clock-div = <1>;
1164 ti,autoidle-shift = <1>;
1165 reg = <0x0238>;
1166 ti,clock-mult = <1>;
1167 };
1168
1169 sdma_fck: sdma_fck {
1170 #clock-cells = <0>;
1171 compatible = "fixed-factor-clock";
1172 clocks = <&core_l3_ck>;
1173 clock-mult = <1>;
1174 clock-div = <1>;
1175 };
1176
1177 sdma_ick: sdma_ick {
1178 #clock-cells = <0>;
1179 compatible = "ti,fixed-factor-clock";
1180 clocks = <&core_l3_ck>;
1181 ti,clock-div = <1>;
1182 ti,autoidle-shift = <0>;
1183 reg = <0x0238>;
1184 ti,clock-mult = <1>;
1185 };
1186
1187 sdrc_ick: sdrc_ick {
1188 #clock-cells = <0>;
1189 compatible = "ti,fixed-factor-clock";
1190 clocks = <&core_l3_ck>;
1191 ti,clock-div = <1>;
1192 ti,autoidle-shift = <2>;
1193 reg = <0x0238>;
1194 ti,clock-mult = <1>;
1195 };
1196
1197 des_ick: des_ick {
1198 #clock-cells = <0>;
1199 compatible = "ti,omap3-interface-clock";
1200 clocks = <&l4_ck>;
1201 ti,bit-shift = <0>;
1202 reg = <0x021c>;
1203 };
1204
1205 sha_ick: sha_ick {
1206 #clock-cells = <0>;
1207 compatible = "ti,omap3-interface-clock";
1208 clocks = <&l4_ck>;
1209 ti,bit-shift = <1>;
1210 reg = <0x021c>;
1211 };
1212
1213 rng_ick: rng_ick {
1214 #clock-cells = <0>;
1215 compatible = "ti,omap3-interface-clock";
1216 clocks = <&l4_ck>;
1217 ti,bit-shift = <2>;
1218 reg = <0x021c>;
1219 };
1220
1221 aes_ick: aes_ick {
1222 #clock-cells = <0>;
1223 compatible = "ti,omap3-interface-clock";
1224 clocks = <&l4_ck>;
1225 ti,bit-shift = <3>;
1226 reg = <0x021c>;
1227 };
1228
1229 pka_ick: pka_ick {
1230 #clock-cells = <0>;
1231 compatible = "ti,omap3-interface-clock";
1232 clocks = <&l4_ck>;
1233 ti,bit-shift = <4>;
1234 reg = <0x021c>;
1235 };
1236
1237 usb_fck: usb_fck {
1238 #clock-cells = <0>;
1239 compatible = "ti,wait-gate-clock";
1240 clocks = <&func_48m_ck>;
1241 ti,bit-shift = <0>;
1242 reg = <0x0204>;
1243 };
1244};
diff --git a/arch/arm/boot/dts/omap3-cm-t3x30.dtsi b/arch/arm/boot/dts/omap3-cm-t3x30.dtsi
index d00055809e31..25ba08331d88 100644
--- a/arch/arm/boot/dts/omap3-cm-t3x30.dtsi
+++ b/arch/arm/boot/dts/omap3-cm-t3x30.dtsi
@@ -10,18 +10,6 @@
10 cpu0-supply = <&vcc>; 10 cpu0-supply = <&vcc>;
11 }; 11 };
12 }; 12 };
13
14 vddvario: regulator-vddvario {
15 compatible = "regulator-fixed";
16 regulator-name = "vddvario";
17 regulator-always-on;
18 };
19
20 vdd33a: regulator-vdd33a {
21 compatible = "regulator-fixed";
22 regulator-name = "vdd33a";
23 regulator-always-on;
24 };
25}; 13};
26 14
27&omap3_pmx_core { 15&omap3_pmx_core {
@@ -35,58 +23,34 @@
35 23
36 hsusb0_pins: pinmux_hsusb0_pins { 24 hsusb0_pins: pinmux_hsusb0_pins {
37 pinctrl-single,pins = < 25 pinctrl-single,pins = <
38 OMAP3_CORE1_IOPAD(0x21a0, PIN_OUTPUT | MUX_MODE0) /* hsusb0_clk.hsusb0_clk */ 26 OMAP3_CORE1_IOPAD(0x21a2, PIN_OUTPUT | MUX_MODE0) /* hsusb0_clk.hsusb0_clk */
39 OMAP3_CORE1_IOPAD(0x21a2, PIN_OUTPUT | MUX_MODE0) /* hsusb0_stp.hsusb0_stp */ 27 OMAP3_CORE1_IOPAD(0x21a4, PIN_OUTPUT | MUX_MODE0) /* hsusb0_stp.hsusb0_stp */
40 OMAP3_CORE1_IOPAD(0x21a4, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_dir.hsusb0_dir */ 28 OMAP3_CORE1_IOPAD(0x21a6, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_dir.hsusb0_dir */
41 OMAP3_CORE1_IOPAD(0x21a6, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_nxt.hsusb0_nxt */ 29 OMAP3_CORE1_IOPAD(0x21a8, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_nxt.hsusb0_nxt */
42 OMAP3_CORE1_IOPAD(0x21a8, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data0.hsusb2_data0 */ 30 OMAP3_CORE1_IOPAD(0x21aa, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data0.hsusb2_data0 */
43 OMAP3_CORE1_IOPAD(0x21aa, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data1.hsusb0_data1 */ 31 OMAP3_CORE1_IOPAD(0x21ac, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data1.hsusb0_data1 */
44 OMAP3_CORE1_IOPAD(0x21ac, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data2.hsusb0_data2 */ 32 OMAP3_CORE1_IOPAD(0x21ae, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data2.hsusb0_data2 */
45 OMAP3_CORE1_IOPAD(0x21ae, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data3 */ 33 OMAP3_CORE1_IOPAD(0x21b0, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data3 */
46 OMAP3_CORE1_IOPAD(0x21b0, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data4 */ 34 OMAP3_CORE1_IOPAD(0x21b2, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data4 */
47 OMAP3_CORE1_IOPAD(0x21b2, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data5 */ 35 OMAP3_CORE1_IOPAD(0x21b4, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data5 */
48 OMAP3_CORE1_IOPAD(0x21b4, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data6 */ 36 OMAP3_CORE1_IOPAD(0x21b6, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data6 */
49 OMAP3_CORE1_IOPAD(0x21b6, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data7 */ 37 OMAP3_CORE1_IOPAD(0x21b8, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data7 */
50 >; 38 >;
51 }; 39 };
52}; 40};
53 41
42#include "omap-gpmc-smsc911x.dtsi"
43
54&gpmc { 44&gpmc {
55 ranges = <5 0 0x2c000000 0x01000000>; 45 ranges = <5 0 0x2c000000 0x01000000>;
56 46
57 smsc1: ethernet@5,0 { 47 smsc1: ethernet@gpmc {
58 compatible = "smsc,lan9221", "smsc,lan9115"; 48 compatible = "smsc,lan9221", "smsc,lan9115";
59 pinctrl-names = "default"; 49 pinctrl-names = "default";
60 pinctrl-0 = <&smsc1_pins>; 50 pinctrl-0 = <&smsc1_pins>;
61 interrupt-parent = <&gpio6>; 51 interrupt-parent = <&gpio6>;
62 interrupts = <3 IRQ_TYPE_LEVEL_LOW>; 52 interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
63 reg = <5 0 0xff>; 53 reg = <5 0 0xff>;
64 bank-width = <2>;
65 gpmc,mux-add-data;
66 gpmc,cs-on-ns = <0>;
67 gpmc,cs-rd-off-ns = <186>;
68 gpmc,cs-wr-off-ns = <186>;
69 gpmc,adv-on-ns = <12>;
70 gpmc,adv-rd-off-ns = <48>;
71 gpmc,adv-wr-off-ns = <48>;
72 gpmc,oe-on-ns = <54>;
73 gpmc,oe-off-ns = <168>;
74 gpmc,we-on-ns = <54>;
75 gpmc,we-off-ns = <168>;
76 gpmc,rd-cycle-ns = <186>;
77 gpmc,wr-cycle-ns = <186>;
78 gpmc,access-ns = <114>;
79 gpmc,page-burst-access-ns = <6>;
80 gpmc,bus-turnaround-ns = <12>;
81 gpmc,cycle2cycle-delay-ns = <18>;
82 gpmc,wr-data-mux-bus-ns = <90>;
83 gpmc,wr-access-ns = <186>;
84 gpmc,cycle2cycle-samecsen;
85 gpmc,cycle2cycle-diffcsen;
86 vddvario-supply = <&vddvario>;
87 vdd33a-supply = <&vdd33a>;
88 reg-io-width = <4>;
89 smsc,save-mac-address;
90 }; 54 };
91}; 55};
92 56
diff --git a/arch/arm/boot/dts/omap3-evm-37xx.dts b/arch/arm/boot/dts/omap3-evm-37xx.dts
index 4df68ad3736a..9cba94bed7ad 100644
--- a/arch/arm/boot/dts/omap3-evm-37xx.dts
+++ b/arch/arm/boot/dts/omap3-evm-37xx.dts
@@ -89,7 +89,16 @@
89 status = "disabled"; 89 status = "disabled";
90}; 90};
91 91
92&uart1 {
93 interrupts-extended = <&intc 72 &omap3_pmx_core OMAP3_UART1_RX>;
94};
95
96&uart2 {
97 interrupts-extended = <&intc 73 &omap3_pmx_core OMAP3_UART2_RX>;
98};
99
92&uart3 { 100&uart3 {
101 interrupts-extended = <&intc 74 &omap3_pmx_core OMAP3_UART3_RX>;
93 pinctrl-names = "default"; 102 pinctrl-names = "default";
94 pinctrl-0 = <&uart3_pins>; 103 pinctrl-0 = <&uart3_pins>;
95}; 104};
diff --git a/arch/arm/boot/dts/omap3-igep.dtsi b/arch/arm/boot/dts/omap3-igep.dtsi
index b97736d98a64..e2d163bf0619 100644
--- a/arch/arm/boot/dts/omap3-igep.dtsi
+++ b/arch/arm/boot/dts/omap3-igep.dtsi
@@ -107,7 +107,7 @@
107 >; 107 >;
108 }; 108 };
109 109
110 smsc911x_pins: pinmux_smsc911x_pins { 110 smsc9221_pins: pinmux_smsc9221_pins {
111 pinctrl-single,pins = < 111 pinctrl-single,pins = <
112 0x1a2 (PIN_INPUT | MUX_MODE4) /* mcspi1_cs2.gpio_176 */ 112 0x1a2 (PIN_INPUT | MUX_MODE4) /* mcspi1_cs2.gpio_176 */
113 >; 113 >;
diff --git a/arch/arm/boot/dts/omap3-igep0020.dts b/arch/arm/boot/dts/omap3-igep0020.dts
index 7abd64f6ae21..b22caaaf774b 100644
--- a/arch/arm/boot/dts/omap3-igep0020.dts
+++ b/arch/arm/boot/dts/omap3-igep0020.dts
@@ -10,7 +10,7 @@
10 */ 10 */
11 11
12#include "omap3-igep.dtsi" 12#include "omap3-igep.dtsi"
13#include "omap-gpmc-smsc911x.dtsi" 13#include "omap-gpmc-smsc9221.dtsi"
14 14
15/ { 15/ {
16 model = "IGEPv2 (TI OMAP AM/DM37x)"; 16 model = "IGEPv2 (TI OMAP AM/DM37x)";
@@ -248,7 +248,7 @@
248 248
249 ethernet@gpmc { 249 ethernet@gpmc {
250 pinctrl-names = "default"; 250 pinctrl-names = "default";
251 pinctrl-0 = <&smsc911x_pins>; 251 pinctrl-0 = <&smsc9221_pins>;
252 reg = <5 0 0xff>; 252 reg = <5 0 0xff>;
253 interrupt-parent = <&gpio6>; 253 interrupt-parent = <&gpio6>;
254 interrupts = <16 IRQ_TYPE_LEVEL_LOW>; 254 interrupts = <16 IRQ_TYPE_LEVEL_LOW>;
diff --git a/arch/arm/boot/dts/omap3-ldp.dts b/arch/arm/boot/dts/omap3-ldp.dts
index 0abe986a4ecc..476ff158ddb3 100644
--- a/arch/arm/boot/dts/omap3-ldp.dts
+++ b/arch/arm/boot/dts/omap3-ldp.dts
@@ -234,6 +234,10 @@
234 }; 234 };
235}; 235};
236 236
237&uart3 {
238 interrupts-extended = <&intc 74 &omap3_pmx_core OMAP3_UART3_RX>;
239};
240
237&usb_otg_hs { 241&usb_otg_hs {
238 pinctrl-names = "default"; 242 pinctrl-names = "default";
239 pinctrl-0 = <&musb_pins>; 243 pinctrl-0 = <&musb_pins>;
diff --git a/arch/arm/boot/dts/omap3-lilly-a83x.dtsi b/arch/arm/boot/dts/omap3-lilly-a83x.dtsi
index cc1dce6978f5..d97308896f0c 100644
--- a/arch/arm/boot/dts/omap3-lilly-a83x.dtsi
+++ b/arch/arm/boot/dts/omap3-lilly-a83x.dtsi
@@ -176,9 +176,6 @@
176 176
177&omap3_pmx_core2 { 177&omap3_pmx_core2 {
178 pinctrl-names = "default"; 178 pinctrl-names = "default";
179 pinctrl-0 = <
180 &hsusb1_2_pins
181 >;
182 179
183 hsusb1_2_pins: pinmux_hsusb1_2_pins { 180 hsusb1_2_pins: pinmux_hsusb1_2_pins {
184 pinctrl-single,pins = < 181 pinctrl-single,pins = <
@@ -357,6 +354,10 @@
357 power = <50>; 354 power = <50>;
358}; 355};
359 356
357&mcbsp2 {
358 status = "okay";
359};
360
360&gpmc { 361&gpmc {
361 ranges = <0 0 0x30000000 0x1000000>, 362 ranges = <0 0 0x30000000 0x1000000>,
362 <7 0 0x15000000 0x01000000>; 363 <7 0 0x15000000 0x01000000>;
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
index 1a57b61f5e24..059a8ff1e6ac 100644
--- a/arch/arm/boot/dts/omap3-n900.dts
+++ b/arch/arm/boot/dts/omap3-n900.dts
@@ -10,6 +10,7 @@
10/dts-v1/; 10/dts-v1/;
11 11
12#include "omap34xx-hs.dtsi" 12#include "omap34xx-hs.dtsi"
13#include <dt-bindings/input/input.h>
13 14
14/ { 15/ {
15 model = "Nokia N900"; 16 model = "Nokia N900";
@@ -21,6 +22,17 @@
21 }; 22 };
22 }; 23 };
23 24
25 leds {
26 compatible = "gpio-leds";
27 heartbeat {
28 label = "debug::sleep";
29 gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>; /* gpio162 */
30 linux,default-trigger = "default-on";
31 pinctrl-names = "default";
32 pinctrl-0 = <&debug_leds>;
33 };
34 };
35
24 memory { 36 memory {
25 device_type = "memory"; 37 device_type = "memory";
26 reg = <0x80000000 0x10000000>; /* 256 MB */ 38 reg = <0x80000000 0x10000000>; /* 256 MB */
@@ -90,6 +102,19 @@
90 }; 102 };
91 }; 103 };
92 }; 104 };
105
106 sound: n900-audio {
107 compatible = "nokia,n900-audio";
108
109 nokia,cpu-dai = <&mcbsp2>;
110 nokia,audio-codec = <&tlv320aic3x>, <&tlv320aic3x_aux>;
111 nokia,headphone-amplifier = <&tpa6130a2>;
112
113 tvout-selection-gpios = <&gpio2 8 GPIO_ACTIVE_HIGH>; /* 40 */
114 jack-detection-gpios = <&gpio6 17 GPIO_ACTIVE_HIGH>; /* 177 */
115 eci-switch-gpios = <&gpio6 22 GPIO_ACTIVE_HIGH>; /* 182 */
116 speaker-amplifier-gpios = <&twl_gpio 7 GPIO_ACTIVE_HIGH>;
117 };
93}; 118};
94 119
95&omap3_pmx_core { 120&omap3_pmx_core {
@@ -130,6 +155,21 @@
130 >; 155 >;
131 }; 156 };
132 157
158 debug_leds: pinmux_debug_led_pins {
159 pinctrl-single,pins = <
160 OMAP3_CORE1_IOPAD(0x2198, PIN_OUTPUT | MUX_MODE4) /* mcbsp1_clkx.gpio_162 */
161 >;
162 };
163
164 mcspi4_pins: pinmux_mcspi4_pins {
165 pinctrl-single,pins = <
166 0x15c (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mcspi4_clk */
167 0x162 (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mcspi4_somi */
168 0x160 (PIN_OUTPUT | MUX_MODE1) /* mcspi4_simo */
169 0x166 (PIN_OUTPUT | MUX_MODE1) /* mcspi4_cs0 */
170 >;
171 };
172
133 mmc1_pins: pinmux_mmc1_pins { 173 mmc1_pins: pinmux_mmc1_pins {
134 pinctrl-single,pins = < 174 pinctrl-single,pins = <
135 0x114 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_clk */ 175 0x114 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_clk */
@@ -173,6 +213,37 @@
173 0x0da (PIN_OUTPUT | MUX_MODE1) /* dss_data23.sdi_clkn */ 213 0x0da (PIN_OUTPUT | MUX_MODE1) /* dss_data23.sdi_clkn */
174 >; 214 >;
175 }; 215 };
216
217 wl1251_pins: pinmux_wl1251 {
218 pinctrl-single,pins = <
219 0x0ce (PIN_OUTPUT | MUX_MODE4) /* gpio 87 => wl1251 enable */
220 0x05a (PIN_INPUT | MUX_MODE4) /* gpio 42 => wl1251 irq */
221 >;
222 };
223
224 ssi_pins: pinmux_ssi {
225 pinctrl-single,pins = <
226 0x150 (PIN_INPUT_PULLUP | MUX_MODE1) /* ssi1_rdy_tx */
227 0x14e (PIN_OUTPUT | MUX_MODE1) /* ssi1_flag_tx */
228 0x152 (PIN_INPUT | WAKEUP_EN | MUX_MODE4) /* ssi1_wake_tx (cawake) */
229 0x14c (PIN_OUTPUT | MUX_MODE1) /* ssi1_dat_tx */
230 0x154 (PIN_INPUT | MUX_MODE1) /* ssi1_dat_rx */
231 0x156 (PIN_INPUT | MUX_MODE1) /* ssi1_flag_rx */
232 0x158 (PIN_OUTPUT | MUX_MODE1) /* ssi1_rdy_rx */
233 0x15a (PIN_OUTPUT | MUX_MODE1) /* ssi1_wake */
234 >;
235 };
236
237 modem_pins: pinmux_modem {
238 pinctrl-single,pins = <
239 0x0ac (PIN_OUTPUT | MUX_MODE4) /* gpio 70 => cmt_apeslpx */
240 0x0b0 (PIN_INPUT | WAKEUP_EN | MUX_MODE4) /* gpio 72 => ape_rst_rq */
241 0x0b2 (PIN_OUTPUT | MUX_MODE4) /* gpio 73 => cmt_rst_rq */
242 0x0b4 (PIN_OUTPUT | MUX_MODE4) /* gpio 74 => cmt_en */
243 0x0b6 (PIN_OUTPUT | MUX_MODE4) /* gpio 75 => cmt_rst */
244 0x15e (PIN_OUTPUT | MUX_MODE4) /* gpio 157 => cmt_bsi */
245 >;
246 };
176}; 247};
177 248
178&i2c1 { 249&i2c1 {
@@ -283,57 +354,57 @@
283}; 354};
284 355
285&twl_keypad { 356&twl_keypad {
286 linux,keymap = < 0x00000010 /* KEY_Q */ 357 linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_Q)
287 0x00010018 /* KEY_O */ 358 MATRIX_KEY(0x00, 0x01, KEY_O)
288 0x00020019 /* KEY_P */ 359 MATRIX_KEY(0x00, 0x02, KEY_P)
289 0x00030033 /* KEY_COMMA */ 360 MATRIX_KEY(0x00, 0x03, KEY_COMMA)
290 0x0004000e /* KEY_BACKSPACE */ 361 MATRIX_KEY(0x00, 0x04, KEY_BACKSPACE)
291 0x0006001e /* KEY_A */ 362 MATRIX_KEY(0x00, 0x06, KEY_A)
292 0x0007001f /* KEY_S */ 363 MATRIX_KEY(0x00, 0x07, KEY_S)
293 364
294 0x01000011 /* KEY_W */ 365 MATRIX_KEY(0x01, 0x00, KEY_W)
295 0x01010020 /* KEY_D */ 366 MATRIX_KEY(0x01, 0x01, KEY_D)
296 0x01020021 /* KEY_F */ 367 MATRIX_KEY(0x01, 0x02, KEY_F)
297 0x01030022 /* KEY_G */ 368 MATRIX_KEY(0x01, 0x03, KEY_G)
298 0x01040023 /* KEY_H */ 369 MATRIX_KEY(0x01, 0x04, KEY_H)
299 0x01050024 /* KEY_J */ 370 MATRIX_KEY(0x01, 0x05, KEY_J)
300 0x01060025 /* KEY_K */ 371 MATRIX_KEY(0x01, 0x06, KEY_K)
301 0x01070026 /* KEY_L */ 372 MATRIX_KEY(0x01, 0x07, KEY_L)
302 373
303 0x02000012 /* KEY_E */ 374 MATRIX_KEY(0x02, 0x00, KEY_E)
304 0x02010034 /* KEY_DOT */ 375 MATRIX_KEY(0x02, 0x01, KEY_DOT)
305 0x02020067 /* KEY_UP */ 376 MATRIX_KEY(0x02, 0x02, KEY_UP)
306 0x0203001c /* KEY_ENTER */ 377 MATRIX_KEY(0x02, 0x03, KEY_ENTER)
307 0x0205002c /* KEY_Z */ 378 MATRIX_KEY(0x02, 0x05, KEY_Z)
308 0x0206002d /* KEY_X */ 379 MATRIX_KEY(0x02, 0x06, KEY_X)
309 0x0207002e /* KEY_C */ 380 MATRIX_KEY(0x02, 0x07, KEY_C)
310 0x02080043 /* KEY_F9 */ 381 MATRIX_KEY(0x02, 0x08, KEY_F9)
311 382
312 0x03000013 /* KEY_R */ 383 MATRIX_KEY(0x03, 0x00, KEY_R)
313 0x0301002f /* KEY_V */ 384 MATRIX_KEY(0x03, 0x01, KEY_V)
314 0x03020030 /* KEY_B */ 385 MATRIX_KEY(0x03, 0x02, KEY_B)
315 0x03030031 /* KEY_N */ 386 MATRIX_KEY(0x03, 0x03, KEY_N)
316 0x03040032 /* KEY_M */ 387 MATRIX_KEY(0x03, 0x04, KEY_M)
317 0x03050039 /* KEY_SPACE */ 388 MATRIX_KEY(0x03, 0x05, KEY_SPACE)
318 0x03060039 /* KEY_SPACE */ 389 MATRIX_KEY(0x03, 0x06, KEY_SPACE)
319 0x03070069 /* KEY_LEFT */ 390 MATRIX_KEY(0x03, 0x07, KEY_LEFT)
320 391
321 0x04000014 /* KEY_T */ 392 MATRIX_KEY(0x04, 0x00, KEY_T)
322 0x0401006c /* KEY_DOWN */ 393 MATRIX_KEY(0x04, 0x01, KEY_DOWN)
323 0x0402006a /* KEY_RIGHT */ 394 MATRIX_KEY(0x04, 0x02, KEY_RIGHT)
324 0x0404001d /* KEY_LEFTCTRL */ 395 MATRIX_KEY(0x04, 0x04, KEY_LEFTCTRL)
325 0x04050064 /* KEY_RIGHTALT */ 396 MATRIX_KEY(0x04, 0x05, KEY_RIGHTALT)
326 0x0406002a /* KEY_LEFTSHIFT */ 397 MATRIX_KEY(0x04, 0x06, KEY_LEFTSHIFT)
327 0x04080044 /* KEY_F10 */ 398 MATRIX_KEY(0x04, 0x08, KEY_F10)
328 399
329 0x05000015 /* KEY_Y */ 400 MATRIX_KEY(0x05, 0x00, KEY_Y)
330 0x05080057 /* KEY_F11 */ 401 MATRIX_KEY(0x05, 0x08, KEY_F11)
331 402
332 0x06000016 /* KEY_U */ 403 MATRIX_KEY(0x06, 0x00, KEY_U)
333 404
334 0x07000017 /* KEY_I */ 405 MATRIX_KEY(0x07, 0x00, KEY_I)
335 0x07010041 /* KEY_F7 */ 406 MATRIX_KEY(0x07, 0x01, KEY_F7)
336 0x07020042 /* KEY_F8 */ 407 MATRIX_KEY(0x07, 0x02, KEY_F8)
337 >; 408 >;
338}; 409};
339 410
@@ -604,6 +675,30 @@
604 }; 675 };
605}; 676};
606 677
678&mcspi4 {
679 pinctrl-names = "default";
680 pinctrl-0 = <&mcspi4_pins>;
681
682 wl1251@0 {
683 pinctrl-names = "default";
684 pinctrl-0 = <&wl1251_pins>;
685
686 vio-supply = <&vio>;
687
688 compatible = "ti,wl1251";
689 reg = <0>;
690 spi-max-frequency = <48000000>;
691
692 spi-cpol;
693 spi-cpha;
694
695 ti,power-gpio = <&gpio3 23 GPIO_ACTIVE_HIGH>; /* 87 */
696
697 interrupt-parent = <&gpio2>;
698 interrupts = <10 IRQ_TYPE_NONE>; /* gpio line 42 */
699 };
700};
701
607&usb_otg_hs { 702&usb_otg_hs {
608 interface-type = <0>; 703 interface-type = <0>;
609 usb-phy = <&usb2_phy>; 704 usb-phy = <&usb2_phy>;
@@ -618,11 +713,13 @@
618}; 713};
619 714
620&uart2 { 715&uart2 {
716 interrupts-extended = <&intc 73 &omap3_pmx_core OMAP3_UART2_RX>;
621 pinctrl-names = "default"; 717 pinctrl-names = "default";
622 pinctrl-0 = <&uart2_pins>; 718 pinctrl-0 = <&uart2_pins>;
623}; 719};
624 720
625&uart3 { 721&uart3 {
722 interrupts-extended = <&intc 74 &omap3_pmx_core OMAP3_UART3_RX>;
626 pinctrl-names = "default"; 723 pinctrl-names = "default";
627 pinctrl-0 = <&uart3_pins>; 724 pinctrl-0 = <&uart3_pins>;
628}; 725};
@@ -662,3 +759,48 @@
662 }; 759 };
663 }; 760 };
664}; 761};
762
763&mcbsp2 {
764 status = "ok";
765};
766
767&ssi_port1 {
768 pinctrl-names = "default";
769 pinctrl-0 = <&ssi_pins>;
770
771 ti,ssi-cawake-gpio = <&gpio5 23 GPIO_ACTIVE_HIGH>; /* 151 */
772
773 modem: hsi-client {
774 compatible = "nokia,n900-modem";
775
776 pinctrl-names = "default";
777 pinctrl-0 = <&modem_pins>;
778
779 hsi-channel-ids = <0>, <1>, <2>, <3>;
780 hsi-channel-names = "mcsaab-control",
781 "speech-control",
782 "speech-data",
783 "mcsaab-data";
784 hsi-speed-kbps = <55000>;
785 hsi-mode = "frame";
786 hsi-flow = "synchronized";
787 hsi-arb-mode = "round-robin";
788
789 interrupts-extended = <&gpio3 8 IRQ_TYPE_EDGE_FALLING>; /* 72 */
790
791 gpios = <&gpio3 6 GPIO_ACTIVE_HIGH>, /* 70 */
792 <&gpio3 9 GPIO_ACTIVE_HIGH>, /* 73 */
793 <&gpio3 10 GPIO_ACTIVE_HIGH>, /* 74 */
794 <&gpio3 11 GPIO_ACTIVE_HIGH>, /* 75 */
795 <&gpio5 29 GPIO_ACTIVE_HIGH>; /* 157 */
796 gpio-names = "cmt_apeslpx",
797 "cmt_rst_rq",
798 "cmt_en",
799 "cmt_rst",
800 "cmt_bsi";
801 };
802};
803
804&ssi_port2 {
805 status = "disabled";
806};
diff --git a/arch/arm/boot/dts/omap3-n950-n9.dtsi b/arch/arm/boot/dts/omap3-n950-n9.dtsi
index 5c26c184f2c1..70addcba37c5 100644
--- a/arch/arm/boot/dts/omap3-n950-n9.dtsi
+++ b/arch/arm/boot/dts/omap3-n950-n9.dtsi
@@ -67,6 +67,20 @@
67 ti,pulldowns = <0x008106>; /* BIT(1) | BIT(2) | BIT(8) | BIT(15) */ 67 ti,pulldowns = <0x008106>; /* BIT(1) | BIT(2) | BIT(8) | BIT(15) */
68}; 68};
69 69
70/* CSI-2 receiver */
71&vaux2 {
72 regulator-name = "vaux2";
73 regulator-min-microvolt = <1800000>;
74 regulator-max-microvolt = <1800000>;
75};
76
77/* Cameras */
78&vaux3 {
79 regulator-name = "vaux3";
80 regulator-min-microvolt = <2800000>;
81 regulator-max-microvolt = <2800000>;
82};
83
70&i2c2 { 84&i2c2 {
71 clock-frequency = <400000>; 85 clock-frequency = <400000>;
72}; 86};
diff --git a/arch/arm/boot/dts/omap3-sb-t35.dtsi b/arch/arm/boot/dts/omap3-sb-t35.dtsi
index 7909c51b05a5..d59e3de1441e 100644
--- a/arch/arm/boot/dts/omap3-sb-t35.dtsi
+++ b/arch/arm/boot/dts/omap3-sb-t35.dtsi
@@ -2,20 +2,6 @@
2 * Common support for CompuLab SB-T35 used on SBC-T3530, SBC-T3517 and SBC-T3730 2 * Common support for CompuLab SB-T35 used on SBC-T3530, SBC-T3517 and SBC-T3730
3 */ 3 */
4 4
5/ {
6 vddvario_sb_t35: regulator-vddvario-sb-t35 {
7 compatible = "regulator-fixed";
8 regulator-name = "vddvario";
9 regulator-always-on;
10 };
11
12 vdd33a_sb_t35: regulator-vdd33a-sb-t35 {
13 compatible = "regulator-fixed";
14 regulator-name = "vdd33a";
15 regulator-always-on;
16 };
17};
18
19&omap3_pmx_core { 5&omap3_pmx_core {
20 smsc2_pins: pinmux_smsc2_pins { 6 smsc2_pins: pinmux_smsc2_pins {
21 pinctrl-single,pins = < 7 pinctrl-single,pins = <
@@ -37,11 +23,10 @@
37 reg = <4 0 0xff>; 23 reg = <4 0 0xff>;
38 bank-width = <2>; 24 bank-width = <2>;
39 gpmc,mux-add-data; 25 gpmc,mux-add-data;
40 gpmc,cs-on-ns = <0>; 26 gpmc,cs-on-ns = <1>;
41 gpmc,cs-rd-off-ns = <186>; 27 gpmc,cs-rd-off-ns = <180>;
42 gpmc,cs-wr-off-ns = <186>; 28 gpmc,cs-wr-off-ns = <180>;
43 gpmc,adv-on-ns = <12>; 29 gpmc,adv-rd-off-ns = <18>;
44 gpmc,adv-rd-off-ns = <48>;
45 gpmc,adv-wr-off-ns = <48>; 30 gpmc,adv-wr-off-ns = <48>;
46 gpmc,oe-on-ns = <54>; 31 gpmc,oe-on-ns = <54>;
47 gpmc,oe-off-ns = <168>; 32 gpmc,oe-off-ns = <168>;
@@ -49,16 +34,14 @@
49 gpmc,we-off-ns = <168>; 34 gpmc,we-off-ns = <168>;
50 gpmc,rd-cycle-ns = <186>; 35 gpmc,rd-cycle-ns = <186>;
51 gpmc,wr-cycle-ns = <186>; 36 gpmc,wr-cycle-ns = <186>;
52 gpmc,access-ns = <114>; 37 gpmc,access-ns = <144>;
53 gpmc,page-burst-access-ns = <6>; 38 gpmc,page-burst-access-ns = <24>;
54 gpmc,bus-turnaround-ns = <12>; 39 gpmc,bus-turnaround-ns = <90>;
55 gpmc,cycle2cycle-delay-ns = <18>; 40 gpmc,cycle2cycle-delay-ns = <90>;
56 gpmc,wr-data-mux-bus-ns = <90>;
57 gpmc,wr-access-ns = <186>;
58 gpmc,cycle2cycle-samecsen; 41 gpmc,cycle2cycle-samecsen;
59 gpmc,cycle2cycle-diffcsen; 42 gpmc,cycle2cycle-diffcsen;
60 vddvario-supply = <&vddvario_sb_t35>; 43 vddvario-supply = <&vddvario>;
61 vdd33a-supply = <&vdd33a_sb_t35>; 44 vdd33a-supply = <&vdd33a>;
62 reg-io-width = <4>; 45 reg-io-width = <4>;
63 smsc,save-mac-address; 46 smsc,save-mac-address;
64 }; 47 };
diff --git a/arch/arm/boot/dts/omap3-sbc-t3517.dts b/arch/arm/boot/dts/omap3-sbc-t3517.dts
index 024c9c6c682d..42189b65d393 100644
--- a/arch/arm/boot/dts/omap3-sbc-t3517.dts
+++ b/arch/arm/boot/dts/omap3-sbc-t3517.dts
@@ -8,6 +8,19 @@
8/ { 8/ {
9 model = "CompuLab SBC-T3517 with CM-T3517"; 9 model = "CompuLab SBC-T3517 with CM-T3517";
10 compatible = "compulab,omap3-sbc-t3517", "compulab,omap3-cm-t3517", "ti,am3517", "ti,omap3"; 10 compatible = "compulab,omap3-sbc-t3517", "compulab,omap3-cm-t3517", "ti,am3517", "ti,omap3";
11
12 /* Only one GPMC smsc9220 on SBC-T3517, CM-T3517 uses am35x Ethernet */
13 vddvario: regulator-vddvario-sb-t35 {
14 compatible = "regulator-fixed";
15 regulator-name = "vddvario";
16 regulator-always-on;
17 };
18
19 vdd33a: regulator-vdd33a-sb-t35 {
20 compatible = "regulator-fixed";
21 regulator-name = "vdd33a";
22 regulator-always-on;
23 };
11}; 24};
12 25
13&omap3_pmx_core { 26&omap3_pmx_core {
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index acb9019dc437..b2891a9a6975 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -61,7 +61,7 @@
61 ti,hwmods = "mpu"; 61 ti,hwmods = "mpu";
62 }; 62 };
63 63
64 iva { 64 iva: iva {
65 compatible = "ti,iva2.2"; 65 compatible = "ti,iva2.2";
66 ti,hwmods = "iva"; 66 ti,hwmods = "iva";
67 67
@@ -267,7 +267,7 @@
267 uart1: serial@4806a000 { 267 uart1: serial@4806a000 {
268 compatible = "ti,omap3-uart"; 268 compatible = "ti,omap3-uart";
269 reg = <0x4806a000 0x2000>; 269 reg = <0x4806a000 0x2000>;
270 interrupts = <72>; 270 interrupts-extended = <&intc 72>;
271 dmas = <&sdma 49 &sdma 50>; 271 dmas = <&sdma 49 &sdma 50>;
272 dma-names = "tx", "rx"; 272 dma-names = "tx", "rx";
273 ti,hwmods = "uart1"; 273 ti,hwmods = "uart1";
@@ -277,7 +277,7 @@
277 uart2: serial@4806c000 { 277 uart2: serial@4806c000 {
278 compatible = "ti,omap3-uart"; 278 compatible = "ti,omap3-uart";
279 reg = <0x4806c000 0x400>; 279 reg = <0x4806c000 0x400>;
280 interrupts = <73>; 280 interrupts-extended = <&intc 73>;
281 dmas = <&sdma 51 &sdma 52>; 281 dmas = <&sdma 51 &sdma 52>;
282 dma-names = "tx", "rx"; 282 dma-names = "tx", "rx";
283 ti,hwmods = "uart2"; 283 ti,hwmods = "uart2";
@@ -287,7 +287,7 @@
287 uart3: serial@49020000 { 287 uart3: serial@49020000 {
288 compatible = "ti,omap3-uart"; 288 compatible = "ti,omap3-uart";
289 reg = <0x49020000 0x400>; 289 reg = <0x49020000 0x400>;
290 interrupts = <74>; 290 interrupts-extended = <&intc 74>;
291 dmas = <&sdma 53 &sdma 54>; 291 dmas = <&sdma 53 &sdma 54>;
292 dma-names = "tx", "rx"; 292 dma-names = "tx", "rx";
293 ti,hwmods = "uart3"; 293 ti,hwmods = "uart3";
@@ -757,6 +757,51 @@
757 clock-names = "fck"; 757 clock-names = "fck";
758 }; 758 };
759 }; 759 };
760
761 ssi: ssi-controller@48058000 {
762 compatible = "ti,omap3-ssi";
763 ti,hwmods = "ssi";
764
765 status = "disabled";
766
767 reg = <0x48058000 0x1000>,
768 <0x48059000 0x1000>;
769 reg-names = "sys",
770 "gdd";
771
772 interrupts = <71>;
773 interrupt-names = "gdd_mpu";
774
775 #address-cells = <1>;
776 #size-cells = <1>;
777 ranges;
778
779 ssi_port1: ssi-port@4805a000 {
780 compatible = "ti,omap3-ssi-port";
781
782 reg = <0x4805a000 0x800>,
783 <0x4805a800 0x800>;
784 reg-names = "tx",
785 "rx";
786
787 interrupt-parent = <&intc>;
788 interrupts = <67>,
789 <68>;
790 };
791
792 ssi_port2: ssi-port@4805b000 {
793 compatible = "ti,omap3-ssi-port";
794
795 reg = <0x4805b000 0x800>,
796 <0x4805b800 0x800>;
797 reg-names = "tx",
798 "rx";
799
800 interrupt-parent = <&intc>;
801 interrupts = <69>,
802 <70>;
803 };
804 };
760 }; 805 };
761}; 806};
762 807
diff --git a/arch/arm/boot/dts/omap34xx.dtsi b/arch/arm/boot/dts/omap34xx.dtsi
index 2e92360da1f3..3819c1e91591 100644
--- a/arch/arm/boot/dts/omap34xx.dtsi
+++ b/arch/arm/boot/dts/omap34xx.dtsi
@@ -40,6 +40,17 @@
40 }; 40 };
41}; 41};
42 42
43&ssi {
44 status = "ok";
45
46 clocks = <&ssi_ssr_fck>,
47 <&ssi_sst_fck>,
48 <&ssi_ick>;
49 clock-names = "ssi_ssr_fck",
50 "ssi_sst_fck",
51 "ssi_ick";
52};
53
43/include/ "omap34xx-omap36xx-clocks.dtsi" 54/include/ "omap34xx-omap36xx-clocks.dtsi"
44/include/ "omap36xx-omap3430es2plus-clocks.dtsi" 55/include/ "omap36xx-omap3430es2plus-clocks.dtsi"
45/include/ "omap36xx-am35xx-omap3430es2plus-clocks.dtsi" 56/include/ "omap36xx-am35xx-omap3430es2plus-clocks.dtsi"
diff --git a/arch/arm/boot/dts/omap36xx-clocks.dtsi b/arch/arm/boot/dts/omap36xx-clocks.dtsi
index 6b5280d04a0e..200ae3a5cbbb 100644
--- a/arch/arm/boot/dts/omap36xx-clocks.dtsi
+++ b/arch/arm/boot/dts/omap36xx-clocks.dtsi
@@ -83,7 +83,7 @@
83}; 83};
84 84
85&dpll4_m5x2_mul_ck { 85&dpll4_m5x2_mul_ck {
86 clock-mult = <1>; 86 ti,clock-mult = <1>;
87}; 87};
88 88
89&dpll4_m6x2_mul_ck { 89&dpll4_m6x2_mul_ck {
diff --git a/arch/arm/boot/dts/omap36xx.dtsi b/arch/arm/boot/dts/omap36xx.dtsi
index 22cf4647087e..541704a59a5a 100644
--- a/arch/arm/boot/dts/omap36xx.dtsi
+++ b/arch/arm/boot/dts/omap36xx.dtsi
@@ -78,6 +78,17 @@
78 clock-names = "fck", "tv_dac_clk"; 78 clock-names = "fck", "tv_dac_clk";
79}; 79};
80 80
81&ssi {
82 status = "ok";
83
84 clocks = <&ssi_ssr_fck>,
85 <&ssi_sst_fck>,
86 <&ssi_ick>;
87 clock-names = "ssi_ssr_fck",
88 "ssi_sst_fck",
89 "ssi_ick";
90};
91
81/include/ "omap34xx-omap36xx-clocks.dtsi" 92/include/ "omap34xx-omap36xx-clocks.dtsi"
82/include/ "omap36xx-omap3430es2plus-clocks.dtsi" 93/include/ "omap36xx-omap3430es2plus-clocks.dtsi"
83/include/ "omap36xx-am35xx-omap3430es2plus-clocks.dtsi" 94/include/ "omap36xx-am35xx-omap3430es2plus-clocks.dtsi"
diff --git a/arch/arm/boot/dts/omap3xxx-clocks.dtsi b/arch/arm/boot/dts/omap3xxx-clocks.dtsi
index 12be2b35dae9..e47ff69dcf70 100644
--- a/arch/arm/boot/dts/omap3xxx-clocks.dtsi
+++ b/arch/arm/boot/dts/omap3xxx-clocks.dtsi
@@ -453,10 +453,11 @@
453 453
454 dpll4_m5x2_mul_ck: dpll4_m5x2_mul_ck { 454 dpll4_m5x2_mul_ck: dpll4_m5x2_mul_ck {
455 #clock-cells = <0>; 455 #clock-cells = <0>;
456 compatible = "fixed-factor-clock"; 456 compatible = "ti,fixed-factor-clock";
457 clocks = <&dpll4_m5_ck>; 457 clocks = <&dpll4_m5_ck>;
458 clock-mult = <2>; 458 ti,clock-mult = <2>;
459 clock-div = <1>; 459 ti,clock-div = <1>;
460 ti,set-rate-parent;
460 }; 461 };
461 462
462 dpll4_m5x2_ck: dpll4_m5x2_ck { 463 dpll4_m5x2_ck: dpll4_m5x2_ck {
diff --git a/arch/arm/boot/dts/omap4-duovero-parlor.dts b/arch/arm/boot/dts/omap4-duovero-parlor.dts
index 96f51d870812..cd53a64d8f2e 100644
--- a/arch/arm/boot/dts/omap4-duovero-parlor.dts
+++ b/arch/arm/boot/dts/omap4-duovero-parlor.dts
@@ -46,35 +46,35 @@
46 46
47 led_pins: pinmux_led_pins { 47 led_pins: pinmux_led_pins {
48 pinctrl-single,pins = < 48 pinctrl-single,pins = <
49 0xd6 (PIN_OUTPUT | MUX_MODE3) /* abe_dmic_din3.gpio_122 */ 49 OMAP4_IOPAD(0x116, PIN_OUTPUT | MUX_MODE3) /* abe_dmic_din3.gpio_122 */
50 >; 50 >;
51 }; 51 };
52 52
53 button_pins: pinmux_button_pins { 53 button_pins: pinmux_button_pins {
54 pinctrl-single,pins = < 54 pinctrl-single,pins = <
55 0xd4 (PIN_INPUT_PULLUP | MUX_MODE3) /* abe_dmic_din2.gpio_121 */ 55 OMAP4_IOPAD(0x114, PIN_INPUT_PULLUP | MUX_MODE3) /* abe_dmic_din2.gpio_121 */
56 >; 56 >;
57 }; 57 };
58 58
59 i2c2_pins: pinmux_i2c2_pins { 59 i2c2_pins: pinmux_i2c2_pins {
60 pinctrl-single,pins = < 60 pinctrl-single,pins = <
61 0xe6 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c2_scl */ 61 OMAP4_IOPAD(0x126, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c2_scl */
62 0xe8 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c2_sda */ 62 OMAP4_IOPAD(0x128, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c2_sda */
63 >; 63 >;
64 }; 64 };
65 65
66 i2c3_pins: pinmux_i2c3_pins { 66 i2c3_pins: pinmux_i2c3_pins {
67 pinctrl-single,pins = < 67 pinctrl-single,pins = <
68 0xea (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_scl */ 68 OMAP4_IOPAD(0x12a, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_scl */
69 0xec (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_sda */ 69 OMAP4_IOPAD(0x12c, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_sda */
70 >; 70 >;
71 }; 71 };
72 72
73 smsc_pins: pinmux_smsc_pins { 73 smsc_pins: pinmux_smsc_pins {
74 pinctrl-single,pins = < 74 pinctrl-single,pins = <
75 0x28 (PIN_INPUT | MUX_MODE3) /* gpmc_a20.gpio_44: IRQ */ 75 OMAP4_IOPAD(0x068, PIN_INPUT | MUX_MODE3) /* gpmc_a20.gpio_44: IRQ */
76 0x2a (PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_a21.gpio_45: nReset */ 76 OMAP4_IOPAD(0x06a, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_a21.gpio_45: nReset */
77 0x30 (PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_a24.gpio_48: amdix enabled */ 77 OMAP4_IOPAD(0x070, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_a24.gpio_48: amdix enabled */
78 >; 78 >;
79 }; 79 };
80}; 80};
diff --git a/arch/arm/boot/dts/omap4-duovero.dtsi b/arch/arm/boot/dts/omap4-duovero.dtsi
index a514791154eb..e860ccd9d09c 100644
--- a/arch/arm/boot/dts/omap4-duovero.dtsi
+++ b/arch/arm/boot/dts/omap4-duovero.dtsi
@@ -67,100 +67,98 @@
67 pinctrl-names = "default"; 67 pinctrl-names = "default";
68 pinctrl-0 = < 68 pinctrl-0 = <
69 &twl6040_pins 69 &twl6040_pins
70 &mcpdm_pins
71 &mcbsp1_pins
72 &hsusbb1_pins 70 &hsusbb1_pins
73 >; 71 >;
74 72
75 twl6040_pins: pinmux_twl6040_pins { 73 twl6040_pins: pinmux_twl6040_pins {
76 pinctrl-single,pins = < 74 pinctrl-single,pins = <
77 0x126 (PIN_OUTPUT | MUX_MODE3) /* usbb2_ulpitll_nxt.gpio_160 */ 75 OMAP4_IOPAD(0x166, PIN_OUTPUT | MUX_MODE3) /* usbb2_ulpitll_nxt.gpio_160 */
78 0x160 (PIN_INPUT | MUX_MODE0) /* sys_nirq2.sys_nirq2 */ 76 OMAP4_IOPAD(0x1a0, PIN_INPUT | MUX_MODE0) /* sys_nirq2.sys_nirq2 */
79 >; 77 >;
80 }; 78 };
81 79
82 mcpdm_pins: pinmux_mcpdm_pins { 80 mcpdm_pins: pinmux_mcpdm_pins {
83 pinctrl-single,pins = < 81 pinctrl-single,pins = <
84 0xc6 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_ul_data.abe_pdm_ul_data */ 82 OMAP4_IOPAD(0x106, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_ul_data.abe_pdm_ul_data */
85 0xc8 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_dl_data.abe_pdm_dl_data */ 83 OMAP4_IOPAD(0x108, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_dl_data.abe_pdm_dl_data */
86 0xca (PIN_INPUT_PULLUP | MUX_MODE0) /* abe_pdm_frame.abe_pdm_frame */ 84 OMAP4_IOPAD(0x10a, PIN_INPUT_PULLUP | MUX_MODE0) /* abe_pdm_frame.abe_pdm_frame */
87 0xcc (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_lb_clk.abe_pdm_lb_clk */ 85 OMAP4_IOPAD(0x10c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_lb_clk.abe_pdm_lb_clk */
88 0xce (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_clks.abe_clks */ 86 OMAP4_IOPAD(0x10e, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_clks.abe_clks */
89 >; 87 >;
90 }; 88 };
91 89
92 mcbsp1_pins: pinmux_mcbsp1_pins { 90 mcbsp1_pins: pinmux_mcbsp1_pins {
93 pinctrl-single,pins = < 91 pinctrl-single,pins = <
94 0xbe (PIN_INPUT | MUX_MODE0) /* abe_mcbsp1_clkx.abe_mcbsp1_clkx */ 92 OMAP4_IOPAD(0x0fe, PIN_INPUT | MUX_MODE0) /* abe_mcbsp1_clkx.abe_mcbsp1_clkx */
95 0xc0 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_mcbsp1_dr.abe_mcbsp1_dr */ 93 OMAP4_IOPAD(0x100, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_mcbsp1_dr.abe_mcbsp1_dr */
96 0xc2 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* abe_mcbsp1_dx.abe_mcbsp1_dx */ 94 OMAP4_IOPAD(0x102, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* abe_mcbsp1_dx.abe_mcbsp1_dx */
97 0xc4 (PIN_INPUT | MUX_MODE0) /* abe_mcbsp1_fsx.abe_mcbsp1_fsx */ 95 OMAP4_IOPAD(0x104, PIN_INPUT | MUX_MODE0) /* abe_mcbsp1_fsx.abe_mcbsp1_fsx */
98 >; 96 >;
99 }; 97 };
100 98
101 hsusbb1_pins: pinmux_hsusbb1_pins { 99 hsusbb1_pins: pinmux_hsusbb1_pins {
102 pinctrl-single,pins = < 100 pinctrl-single,pins = <
103 0x82 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_clk.usbb1_ulpiphy_clk */ 101 OMAP4_IOPAD(0x0c2, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_clk.usbb1_ulpiphy_clk */
104 0x84 (PIN_OUTPUT | MUX_MODE4) /* usbb1_ulpitll_stp.usbb1_ulpiphy_stp */ 102 OMAP4_IOPAD(0x0c4, PIN_OUTPUT | MUX_MODE4) /* usbb1_ulpitll_stp.usbb1_ulpiphy_stp */
105 0x86 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dir.usbb1_ulpiphy_dir */ 103 OMAP4_IOPAD(0x0c6, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dir.usbb1_ulpiphy_dir */
106 0x88 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_nxt.usbb1_ulpiphy_nxt */ 104 OMAP4_IOPAD(0x0c8, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_nxt.usbb1_ulpiphy_nxt */
107 0x8a (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat0.usbb1_ulpiphy_dat0 */ 105 OMAP4_IOPAD(0x0ca, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat0.usbb1_ulpiphy_dat0 */
108 0x8c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat1.usbb1_ulpiphy_dat1 */ 106 OMAP4_IOPAD(0x0cc, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat1.usbb1_ulpiphy_dat1 */
109 0x8e (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat2.usbb1_ulpiphy_dat2 */ 107 OMAP4_IOPAD(0x0ce, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat2.usbb1_ulpiphy_dat2 */
110 0x90 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat3.usbb1_ulpiphy_dat3 */ 108 OMAP4_IOPAD(0x0d0, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat3.usbb1_ulpiphy_dat3 */
111 0x92 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat4.usbb1_ulpiphy_dat4 */ 109 OMAP4_IOPAD(0x0d2, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat4.usbb1_ulpiphy_dat4 */
112 0x94 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat5.usbb1_ulpiphy_dat5 */ 110 OMAP4_IOPAD(0x0d4, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat5.usbb1_ulpiphy_dat5 */
113 0x96 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat6.usbb1_ulpiphy_dat6 */ 111 OMAP4_IOPAD(0x0d6, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat6.usbb1_ulpiphy_dat6 */
114 0x98 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat7.usbb1_ulpiphy_dat7 */ 112 OMAP4_IOPAD(0x0d8, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat7.usbb1_ulpiphy_dat7 */
115 >; 113 >;
116 }; 114 };
117 115
118 hsusb1phy_pins: pinmux_hsusb1phy_pins { 116 hsusb1phy_pins: pinmux_hsusb1phy_pins {
119 pinctrl-single,pins = < 117 pinctrl-single,pins = <
120 0x4c (PIN_OUTPUT | MUX_MODE3) /* gpmc_wait1.gpio_62 */ 118 OMAP4_IOPAD(0x08c, PIN_OUTPUT | MUX_MODE3) /* gpmc_wait1.gpio_62 */
121 >; 119 >;
122 }; 120 };
123 121
124 w2cbw0015_pins: pinmux_w2cbw0015_pins { 122 w2cbw0015_pins: pinmux_w2cbw0015_pins {
125 pinctrl-single,pins = < 123 pinctrl-single,pins = <
126 0x26 (PIN_OUTPUT | MUX_MODE3) /* gpmc_a19.gpio_43 */ 124 OMAP4_IOPAD(0x066, PIN_OUTPUT | MUX_MODE3) /* gpmc_a19.gpio_43 */
127 0x3a (PIN_INPUT | MUX_MODE3) /* gpmc_ncs3.gpio_53 */ 125 OMAP4_IOPAD(0x07a, PIN_INPUT | MUX_MODE3) /* gpmc_ncs3.gpio_53 */
128 >; 126 >;
129 }; 127 };
130 128
131 i2c1_pins: pinmux_i2c1_pins { 129 i2c1_pins: pinmux_i2c1_pins {
132 pinctrl-single,pins = < 130 pinctrl-single,pins = <
133 0xe2 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_scl */ 131 OMAP4_IOPAD(0x122, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_scl */
134 0xe4 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_sda */ 132 OMAP4_IOPAD(0x124, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_sda */
135 >; 133 >;
136 }; 134 };
137 135
138 i2c4_pins: pinmux_i2c4_pins { 136 i2c4_pins: pinmux_i2c4_pins {
139 pinctrl-single,pins = < 137 pinctrl-single,pins = <
140 0xee (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_scl */ 138 OMAP4_IOPAD(0x12e, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_scl */
141 0xf0 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_sda */ 139 OMAP4_IOPAD(0x130, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_sda */
142 >; 140 >;
143 }; 141 };
144 142
145 mmc1_pins: pinmux_mmc1_pins { 143 mmc1_pins: pinmux_mmc1_pins {
146 pinctrl-single,pins = < 144 pinctrl-single,pins = <
147 0xa2 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_clk */ 145 OMAP4_IOPAD(0x0e2, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_clk */
148 0xa4 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmcc1_cmd */ 146 OMAP4_IOPAD(0x0e4, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmcc1_cmd */
149 0xa6 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmcc1_dat0 */ 147 OMAP4_IOPAD(0x0e6, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmcc1_dat0 */
150 0xa8 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat1 */ 148 OMAP4_IOPAD(0x0e8, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat1 */
151 0xaa (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat2 */ 149 OMAP4_IOPAD(0x0ea, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat2 */
152 0xac (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat3 */ 150 OMAP4_IOPAD(0x0ec, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat3 */
153 >; 151 >;
154 }; 152 };
155 153
156 mmc5_pins: pinmux_mmc5_pins { 154 mmc5_pins: pinmux_mmc5_pins {
157 pinctrl-single,pins = < 155 pinctrl-single,pins = <
158 0x108 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_clk */ 156 OMAP4_IOPAD(0x148, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_clk */
159 0x10a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmcc5_cmd */ 157 OMAP4_IOPAD(0x14a, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmcc5_cmd */
160 0x10c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmcc5_dat0 */ 158 OMAP4_IOPAD(0x14c, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmcc5_dat0 */
161 0x10e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat1 */ 159 OMAP4_IOPAD(0x14e, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat1 */
162 0x110 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat2 */ 160 OMAP4_IOPAD(0x150, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat2 */
163 0x112 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat3 */ 161 OMAP4_IOPAD(0x152, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat3 */
164 >; 162 >;
165 }; 163 };
166}; 164};
@@ -202,6 +200,18 @@
202 clock-frequency = <400000>; 200 clock-frequency = <400000>;
203}; 201};
204 202
203&mcbsp1 {
204 pinctrl-names = "default";
205 pinctrl-0 = <&mcbsp1_pins>;
206 status = "okay";
207};
208
209&mcpdm {
210 pinctrl-names = "default";
211 pinctrl-0 = <&mcpdm_pins>;
212 status = "okay";
213};
214
205&mmc1 { 215&mmc1 {
206 pinctrl-names = "default"; 216 pinctrl-names = "default";
207 pinctrl-0 = <&mmc1_pins>; 217 pinctrl-0 = <&mmc1_pins>;
diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
index d2c45bfaaa2c..8cfa3c8a72b0 100644
--- a/arch/arm/boot/dts/omap4-panda-common.dtsi
+++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
@@ -481,6 +481,21 @@
481 usb-supply = <&vusb>; 481 usb-supply = <&vusb>;
482}; 482};
483 483
484&uart2 {
485 interrupts-extended = <&gic GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH
486 &omap4_pmx_core OMAP4_UART2_RX>;
487};
488
489&uart3 {
490 interrupts-extended = <&gic GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH
491 &omap4_pmx_core OMAP4_UART3_RX>;
492};
493
494&uart4 {
495 interrupts-extended = <&gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH
496 &omap4_pmx_core OMAP4_UART4_RX>;
497};
498
484&usb_otg_hs { 499&usb_otg_hs {
485 interface-type = <1>; 500 interface-type = <1>;
486 mode = <3>; 501 mode = <3>;
diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts
index 48983c8d56c2..3e1da43068f6 100644
--- a/arch/arm/boot/dts/omap4-sdp.dts
+++ b/arch/arm/boot/dts/omap4-sdp.dts
@@ -570,16 +570,22 @@
570}; 570};
571 571
572&uart2 { 572&uart2 {
573 interrupts-extended = <&gic GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH
574 &omap4_pmx_core OMAP4_UART2_RX>;
573 pinctrl-names = "default"; 575 pinctrl-names = "default";
574 pinctrl-0 = <&uart2_pins>; 576 pinctrl-0 = <&uart2_pins>;
575}; 577};
576 578
577&uart3 { 579&uart3 {
580 interrupts-extended = <&gic GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH
581 &omap4_pmx_core OMAP4_UART3_RX>;
578 pinctrl-names = "default"; 582 pinctrl-names = "default";
579 pinctrl-0 = <&uart3_pins>; 583 pinctrl-0 = <&uart3_pins>;
580}; 584};
581 585
582&uart4 { 586&uart4 {
587 interrupts-extended = <&gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH
588 &omap4_pmx_core OMAP4_UART4_RX>;
583 pinctrl-names = "default"; 589 pinctrl-names = "default";
584 pinctrl-0 = <&uart4_pins>; 590 pinctrl-0 = <&uart4_pins>;
585}; 591};
diff --git a/arch/arm/boot/dts/omap4-var-dvk-om44.dts b/arch/arm/boot/dts/omap4-var-dvk-om44.dts
new file mode 100644
index 000000000000..458d79fa378b
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-var-dvk-om44.dts
@@ -0,0 +1,71 @@
1/*
2 * Copyright (C) 2014 Joachim Eastwood <manabian@gmail.com>
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/dts-v1/;
9
10#include "omap4-var-som-om44.dtsi"
11#include "omap4-var-som-om44-wlan.dtsi"
12#include "omap4-var-om44customboard.dtsi"
13
14/ {
15 model = "Variscite VAR-DVK-OM44";
16 compatible = "variscite,var-dvk-om44", "variscite,var-som-om44", "ti,omap4460", "ti,omap4";
17
18 aliases {
19 display0 = &lcd0;
20 display1 = &hdmi0;
21 };
22
23 lcd0: display {
24 compatible = "innolux,at070tn83", "panel-dpi";
25 label = "lcd";
26 panel-timing {
27 clock-frequency = <33333333>;
28
29 hback-porch = <40>;
30 hactive = <800>;
31 hfront-porch = <40>;
32 hsync-len = <48>;
33
34 vback-porch = <29>;
35 vactive = <480>;
36 vfront-porch = <13>;
37 vsync-len = <3>;
38 };
39
40 port {
41 lcd_in: endpoint {
42 remote-endpoint = <&dpi_out>;
43 };
44 };
45 };
46
47 backlight {
48 compatible = "gpio-backlight";
49 pinctrl-names = "default";
50 pinctrl-0 = <&backlight_pins>;
51
52 gpios = <&gpio4 26 GPIO_ACTIVE_HIGH>; /* gpio 122 */
53 };
54};
55
56&dss {
57 pinctrl-names = "default";
58 pinctrl-0 = <&dss_dpi_pins>;
59
60 port {
61 dpi_out: endpoint {
62 remote-endpoint = <&lcd_in>;
63 data-lines = <24>;
64 };
65 };
66};
67
68&dsi2 {
69 status = "okay";
70 vdd-supply = <&vcxio>;
71};
diff --git a/arch/arm/boot/dts/omap4-var-om44customboard.dtsi b/arch/arm/boot/dts/omap4-var-om44customboard.dtsi
new file mode 100644
index 000000000000..f2d2fdb75628
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-var-om44customboard.dtsi
@@ -0,0 +1,235 @@
1/*
2 * Copyright (C) 2014 Joachim Eastwood <manabian@gmail.com>
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 <dt-bindings/input/input.h>
10
11/ {
12 aliases {
13 display0 = &hdmi0;
14 };
15
16 leds {
17 compatible = "gpio-leds";
18 pinctrl-names = "default";
19 pinctrl-0 = <&gpio_led_pins>;
20
21 led0 {
22 label = "var:green:led0";
23 gpios = <&gpio6 13 GPIO_ACTIVE_HIGH>; /* gpio 173 */
24 linux,default-trigger = "heartbeat";
25 };
26
27 led1 {
28 label = "var:green:led1";
29 gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>; /* gpio 172 */
30 };
31 };
32
33 gpio-keys {
34 compatible = "gpio-keys";
35 pinctrl-names = "default";
36 pinctrl-0 = <&gpio_key_pins>;
37 #address-cells = <1>;
38 #size-cells = <0>;
39
40 user-key@184 {
41 label = "user";
42 gpios = <&gpio6 24 GPIO_ACTIVE_HIGH>; /* gpio 184 */
43 linux,code = <BTN_EXTRA>;
44 gpio-key,wakeup;
45 };
46 };
47
48 hdmi0: connector@0 {
49 compatible = "hdmi-connector";
50 pinctrl-names = "default";
51 pinctrl-0 = <&hdmi_hpd_pins>;
52 label = "hdmi";
53 type = "a";
54
55 hpd-gpios = <&gpio2 31 GPIO_ACTIVE_HIGH>; /* gpio_63 */
56
57 port {
58 hdmi_connector_in: endpoint {
59 remote-endpoint = <&hdmi_out>;
60 };
61 };
62 };
63};
64
65&omap4_pmx_core {
66 uart1_pins: pinmux_uart1_pins {
67 pinctrl-single,pins = <
68 OMAP4_IOPAD(0x13c, PIN_INPUT_PULLUP | MUX_MODE1) /* mcspi1_cs2.uart1_cts */
69 OMAP4_IOPAD(0x13e, PIN_OUTPUT | MUX_MODE1) /* mcspi1_cs3.uart1_rts */
70 OMAP4_IOPAD(0x126, PIN_INPUT_PULLUP | MUX_MODE1) /* i2c2_scl.uart1_rx */
71 OMAP4_IOPAD(0x128, PIN_OUTPUT | MUX_MODE1) /* i2c2_sda.uart1_tx */
72 >;
73 };
74
75 mcspi1_pins: pinmux_mcspi1_pins {
76 pinctrl-single,pins = <
77 OMAP4_IOPAD(0x132, PIN_INPUT | MUX_MODE0) /* mcspi1_clk.mcspi1_clk */
78 OMAP4_IOPAD(0x134, PIN_INPUT | MUX_MODE0) /* mcspi1_somi.mcspi1_somi */
79 OMAP4_IOPAD(0x136, PIN_INPUT | MUX_MODE0) /* mcspi1_simo.mcspi1_simo */
80 OMAP4_IOPAD(0x138, PIN_INPUT | MUX_MODE0) /* mcspi1_cs0.mcspi1_cs0 */
81 >;
82 };
83
84 mcasp_pins: pinmux_mcsasp_pins {
85 pinctrl-single,pins = <
86 OMAP4_IOPAD(0x0f8, PIN_OUTPUT | MUX_MODE2) /* mcbsp2_dr.abe_mcasp_axr */
87 >;
88 };
89
90 dss_dpi_pins: pinmux_dss_dpi_pins {
91 pinctrl-single,pins = <
92 OMAP4_IOPAD(0x162, PIN_OUTPUT | MUX_MODE5) /* dispc2_data23 */
93 OMAP4_IOPAD(0x164, PIN_OUTPUT | MUX_MODE5) /* dispc2_data22 */
94 OMAP4_IOPAD(0x166, PIN_OUTPUT | MUX_MODE5) /* dispc2_data21 */
95 OMAP4_IOPAD(0x168, PIN_OUTPUT | MUX_MODE5) /* dispc2_data20 */
96 OMAP4_IOPAD(0x16a, PIN_OUTPUT | MUX_MODE5) /* dispc2_data19 */
97 OMAP4_IOPAD(0x16c, PIN_OUTPUT | MUX_MODE5) /* dispc2_data18 */
98 OMAP4_IOPAD(0x16e, PIN_OUTPUT | MUX_MODE5) /* dispc2_data15 */
99 OMAP4_IOPAD(0x170, PIN_OUTPUT | MUX_MODE5) /* dispc2_data14 */
100 OMAP4_IOPAD(0x172, PIN_OUTPUT | MUX_MODE5) /* dispc2_data13 */
101 OMAP4_IOPAD(0x174, PIN_OUTPUT | MUX_MODE5) /* dispc2_data12 */
102 OMAP4_IOPAD(0x176, PIN_OUTPUT | MUX_MODE5) /* dispc2_data11 */
103 OMAP4_IOPAD(0x1b4, PIN_OUTPUT | MUX_MODE5) /* dispc2_data10 */
104 OMAP4_IOPAD(0x1b6, PIN_OUTPUT | MUX_MODE5) /* dispc2_data9 */
105 OMAP4_IOPAD(0x1b8, PIN_OUTPUT | MUX_MODE5) /* dispc2_data16 */
106 OMAP4_IOPAD(0x1ba, PIN_OUTPUT | MUX_MODE5) /* dispc2_data17 */
107 OMAP4_IOPAD(0x1bc, PIN_OUTPUT | MUX_MODE5) /* dispc2_hsync */
108 OMAP4_IOPAD(0x1be, PIN_OUTPUT | MUX_MODE5) /* dispc2_pclk */
109 OMAP4_IOPAD(0x1c0, PIN_OUTPUT | MUX_MODE5) /* dispc2_vsync */
110 OMAP4_IOPAD(0x1c2, PIN_OUTPUT | MUX_MODE5) /* dispc2_de */
111 OMAP4_IOPAD(0x1c4, PIN_OUTPUT | MUX_MODE5) /* dispc2_data8 */
112 OMAP4_IOPAD(0x1c6, PIN_OUTPUT | MUX_MODE5) /* dispc2_data7 */
113 OMAP4_IOPAD(0x1c8, PIN_OUTPUT | MUX_MODE5) /* dispc2_data6 */
114 OMAP4_IOPAD(0x1ca, PIN_OUTPUT | MUX_MODE5) /* dispc2_data5 */
115 OMAP4_IOPAD(0x1cc, PIN_OUTPUT | MUX_MODE5) /* dispc2_data4 */
116 OMAP4_IOPAD(0x1ce, PIN_OUTPUT | MUX_MODE5) /* dispc2_data3 */
117 OMAP4_IOPAD(0x1d0, PIN_OUTPUT | MUX_MODE5) /* dispc2_data2 */
118 OMAP4_IOPAD(0x1d2, PIN_OUTPUT | MUX_MODE5) /* dispc2_data1 */
119 OMAP4_IOPAD(0x1d4, PIN_OUTPUT | MUX_MODE5) /* dispc2_data0 */
120 >;
121 };
122
123 dss_hdmi_pins: pinmux_dss_hdmi_pins {
124 pinctrl-single,pins = <
125 OMAP4_IOPAD(0x09a, PIN_INPUT_PULLUP | MUX_MODE0) /* hdmi_cec.hdmi_cec */
126 OMAP4_IOPAD(0x09c, PIN_INPUT_PULLUP | MUX_MODE0) /* hdmi_scl.hdmi_scl */
127 OMAP4_IOPAD(0x09e, PIN_INPUT_PULLUP | MUX_MODE0) /* hdmi_sda.hdmi_sda */
128 >;
129 };
130
131 i2c4_pins: pinmux_i2c4_pins {
132 pinctrl-single,pins = <
133 OMAP4_IOPAD(0x12e, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_scl */
134 OMAP4_IOPAD(0x130, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_sda */
135 >;
136 };
137
138 mmc5_pins: pinmux_mmc5_pins {
139 pinctrl-single,pins = <
140 OMAP4_IOPAD(0x0f6, PIN_INPUT | MUX_MODE3) /* abe_mcbsp2_clkx.gpio_110 */
141 OMAP4_IOPAD(0x148, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_clk.sdmmc5_clk */
142 OMAP4_IOPAD(0x14a, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_cmd.sdmmc5_cmd */
143 OMAP4_IOPAD(0x14c, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat0.sdmmc5_dat0 */
144 OMAP4_IOPAD(0x14e, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat1.sdmmc5_dat1 */
145 OMAP4_IOPAD(0x150, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat2.sdmmc5_dat2 */
146 OMAP4_IOPAD(0x152, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat3.sdmmc5_dat3 */
147 >;
148 };
149
150 gpio_led_pins: pinmux_gpio_led_pins {
151 pinctrl-single,pins = <
152 OMAP4_IOPAD(0x17e, PIN_OUTPUT | MUX_MODE3) /* kpd_col4.gpio_172 */
153 OMAP4_IOPAD(0x180, PIN_OUTPUT | MUX_MODE3) /* kpd_col5.gpio_173 */
154 >;
155 };
156
157 gpio_key_pins: pinmux_gpio_key_pins {
158 pinctrl-single,pins = <
159 OMAP4_IOPAD(0x1a2, PIN_INPUT | MUX_MODE3) /* sys_boot0.gpio_184 */
160 >;
161 };
162
163 ks8851_irq_pins: pinmux_ks8851_irq_pins {
164 pinctrl-single,pins = <
165 OMAP4_IOPAD(0x17c, PIN_INPUT_PULLUP | MUX_MODE3) /* kpd_col3.gpio_171 */
166 >;
167 };
168
169 hdmi_hpd_pins: pinmux_hdmi_hpd_pins {
170 pinctrl-single,pins = <
171 OMAP4_IOPAD(0x098, PIN_INPUT_PULLDOWN | MUX_MODE3) /* hdmi_hpd.gpio_63 */
172 >;
173 };
174
175 backlight_pins: pinmux_backlight_pins {
176 pinctrl-single,pins = <
177 OMAP4_IOPAD(0x116, PIN_OUTPUT | MUX_MODE3) /* abe_dmic_din3.gpio_122 */
178 >;
179 };
180};
181
182&i2c4 {
183 pinctrl-names = "default";
184 pinctrl-0 = <&i2c4_pins>;
185 clock-frequency = <400000>;
186 status = "okay";
187};
188
189&uart1 {
190 pinctrl-names = "default";
191 pinctrl-0 = <&uart1_pins>;
192 status = "okay";
193};
194
195&mcspi1 {
196 pinctrl-names = "default";
197 pinctrl-0 = <&mcspi1_pins>;
198 status = "okay";
199
200 eth@0 {
201 compatible = "ks8851";
202 pinctrl-names = "default";
203 pinctrl-0 = <&ks8851_irq_pins>;
204 spi-max-frequency = <24000000>;
205 reg = <0>;
206 interrupt-parent = <&gpio6>;
207 interrupts = <11 IRQ_TYPE_LEVEL_LOW>; /* gpio 171 */
208 };
209};
210
211&mmc5 {
212 pinctrl-names = "default";
213 pinctrl-0 = <&mmc5_pins>;
214 vmmc-supply = <&vbat>;
215 bus-width = <4>;
216 cd-gpios = <&gpio4 14 GPIO_ACTIVE_HIGH>; /* gpio 110 */
217 status = "okay";
218};
219
220&dss {
221 status = "okay";
222};
223
224&hdmi {
225 status = "okay";
226 pinctrl-names = "default";
227 pinctrl-0 = <&dss_hdmi_pins>;
228 vdda-supply = <&vdac>;
229
230 port {
231 hdmi_out: endpoint {
232 remote-endpoint = <&hdmi_connector_in>;
233 };
234 };
235};
diff --git a/arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi b/arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi
new file mode 100644
index 000000000000..cc66af419236
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi
@@ -0,0 +1,68 @@
1/*
2 * Copyright (C) 2014 Joachim Eastwood <manabian@gmail.com>
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/ {
10 /* regulator for wl12xx on sdio4 */
11 wl12xx_vmmc: wl12xx_vmmc {
12 pinctrl-names = "default";
13 pinctrl-0 = <&wl12xx_ctrl_pins>;
14 compatible = "regulator-fixed";
15 regulator-name = "vwl1271";
16 regulator-min-microvolt = <1800000>;
17 regulator-max-microvolt = <1800000>;
18 gpio = <&gpio2 11 0>; /* gpio 43 */
19 startup-delay-us = <70000>;
20 enable-active-high;
21 };
22};
23
24&omap4_pmx_core {
25 uart2_pins: pinmux_uart2_pins {
26 pinctrl-single,pins = <
27 OMAP4_IOPAD(0x118, PIN_INPUT_PULLUP | MUX_MODE0) /* uart2_cts.uart2_cts */
28 OMAP4_IOPAD(0x11a, PIN_OUTPUT | MUX_MODE0) /* uart2_rts.uart2_rts */
29 OMAP4_IOPAD(0x11c, PIN_INPUT_PULLUP | MUX_MODE0) /* uart2_rx.uart2_rx */
30 OMAP4_IOPAD(0x11e, PIN_OUTPUT | MUX_MODE0) /* uart2_tx.uart2_tx */
31 >;
32 };
33
34 wl12xx_ctrl_pins: pinmux_wl12xx_ctrl_pins {
35 pinctrl-single,pins = <
36 OMAP4_IOPAD(0x062, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_a17.gpio_41 (WLAN_IRQ) */
37 OMAP4_IOPAD(0x064, PIN_OUTPUT | MUX_MODE3) /* gpmc_a18.gpio_42 (BT_EN) */
38 OMAP4_IOPAD(0x066, PIN_OUTPUT | MUX_MODE3) /* gpmc_a19.gpio_43 (WLAN_EN) */
39 >;
40 };
41
42 mmc4_pins: pinmux_mmc4_pins {
43 pinctrl-single,pins = <
44 OMAP4_IOPAD(0x154, PIN_INPUT_PULLUP | MUX_MODE1) /* mcspi4_clk.sdmmc4_clk */
45 OMAP4_IOPAD(0x156, PIN_INPUT_PULLUP | MUX_MODE1) /* mcspi4_simo.sdmmc4_cmd */
46 OMAP4_IOPAD(0x158, PIN_INPUT_PULLUP | MUX_MODE1) /* mcspi4_somi.sdmmc4_dat0 */
47 OMAP4_IOPAD(0x15e, PIN_INPUT_PULLUP | MUX_MODE1) /* uart4_tx.sdmmc4_dat1 */
48 OMAP4_IOPAD(0x15c, PIN_INPUT_PULLUP | MUX_MODE1) /* uart4_rx.sdmmc4_dat2 */
49 OMAP4_IOPAD(0x15a, PIN_INPUT_PULLUP | MUX_MODE1) /* mcspi4_cs0.sdmmc4_dat3 */
50 >;
51 };
52};
53
54&uart2 {
55 pinctrl-names = "default";
56 pinctrl-0 = <&uart2_pins>;
57 status = "okay";
58};
59
60&mmc4 {
61 pinctrl-names = "default";
62 pinctrl-0 = <&mmc4_pins>;
63 vmmc-supply = <&wl12xx_vmmc>;
64 non-removable;
65 bus-width = <4>;
66 cap-power-off-card;
67 status = "okay";
68};
diff --git a/arch/arm/boot/dts/omap4-var-som-om44.dtsi b/arch/arm/boot/dts/omap4-var-som-om44.dtsi
new file mode 100644
index 000000000000..062701e1a898
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-var-som-om44.dtsi
@@ -0,0 +1,343 @@
1/*
2 * Copyright (C) 2014 Joachim Eastwood <manabian@gmail.com>
3 * Copyright (C) 2012 Variscite Ltd. - http://www.variscite.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#include "omap4460.dtsi"
10
11/ {
12 model = "Variscite VAR-SOM-OM44";
13 compatible = "variscite,var-som-om44", "ti,omap4460", "ti,omap4";
14
15 memory {
16 device_type = "memory";
17 reg = <0x80000000 0x40000000>; /* 1 GB */
18 };
19
20 sound: sound@0 {
21 compatible = "ti,abe-twl6040";
22 ti,model = "VAR-SOM-OM44";
23
24 ti,mclk-freq = <38400000>;
25 ti,mcpdm = <&mcpdm>;
26 ti,twl6040 = <&twl6040>;
27
28 /* Audio routing */
29 ti,audio-routing =
30 "Headset Stereophone", "HSOL",
31 "Headset Stereophone", "HSOR",
32 "AFML", "Line In",
33 "AFMR", "Line In";
34 };
35
36 /* HS USB Host PHY on PORT 1 */
37 hsusb1_phy: hsusb1_phy {
38 compatible = "usb-nop-xceiv";
39 pinctrl-names = "default";
40 pinctrl-0 = <
41 &hsusbb1_phy_clk_pins
42 &hsusbb1_phy_rst_pins
43 >;
44
45 reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>; /* gpio 177 */
46 vcc-supply = <&vbat>;
47
48 clocks = <&auxclk3_ck>;
49 clock-names = "main_clk";
50 clock-frequency = <19200000>;
51 };
52
53 vbat: fixedregulator-vbat {
54 compatible = "regulator-fixed";
55 regulator-name = "VBAT";
56 regulator-min-microvolt = <3300000>;
57 regulator-max-microvolt = <3300000>;
58 regulator-always-on;
59 regulator-boot-on;
60 };
61};
62
63&omap4_pmx_core {
64 pinctrl-names = "default";
65 pinctrl-0 = <
66 &hsusbb1_pins
67 >;
68
69 twl6040_pins: pinmux_twl6040_pins {
70 pinctrl-single,pins = <
71 OMAP4_IOPAD(0x19c, PIN_OUTPUT | MUX_MODE3) /* fref_clk2_out.gpio_182 */
72 OMAP4_IOPAD(0x1a0, PIN_INPUT | MUX_MODE0) /* sys_nirq2.sys_nirq2 */
73 >;
74 };
75
76 mcpdm_pins: pinmux_mcpdm_pins {
77 pinctrl-single,pins = <
78 OMAP4_IOPAD(0x106, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_ul_data.abe_pdm_ul_data */
79 OMAP4_IOPAD(0x108, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_dl_data.abe_pdm_dl_data */
80 OMAP4_IOPAD(0x10a, PIN_INPUT_PULLUP | MUX_MODE0) /* abe_pdm_frame.abe_pdm_frame */
81 OMAP4_IOPAD(0x10c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_lb_clk.abe_pdm_lb_clk */
82 OMAP4_IOPAD(0x10e, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_clks.abe_clks */
83 >;
84 };
85
86 tsc2004_pins: pinmux_tsc2004_pins {
87 pinctrl-single,pins = <
88 OMAP4_IOPAD(0x090, PIN_INPUT | MUX_MODE3) /* gpmc_ncs4.gpio_101 (irq) */
89 OMAP4_IOPAD(0x092, PIN_OUTPUT | MUX_MODE3) /* gpmc_ncs5.gpio_102 (rst) */
90 >;
91 };
92
93 uart3_pins: pinmux_uart3_pins {
94 pinctrl-single,pins = <
95 OMAP4_IOPAD(0x140, PIN_INPUT_PULLUP | MUX_MODE0) /* uart3_cts_rctx.uart3_cts_rctx */
96 OMAP4_IOPAD(0x142, PIN_OUTPUT | MUX_MODE0) /* uart3_rts_sd.uart3_rts_sd */
97 OMAP4_IOPAD(0x144, PIN_INPUT | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */
98 OMAP4_IOPAD(0x146, PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx */
99 >;
100 };
101
102 hsusbb1_pins: pinmux_hsusbb1_pins {
103 pinctrl-single,pins = <
104 OMAP4_IOPAD(0x0c2, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_clk.usbb1_ulpiphy_clk */
105 OMAP4_IOPAD(0x0c4, PIN_OUTPUT | MUX_MODE4) /* usbb1_ulpitll_stp.usbb1_ulpiphy_stp */
106 OMAP4_IOPAD(0x0c6, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dir.usbb1_ulpiphy_dir */
107 OMAP4_IOPAD(0x0c8, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_nxt.usbb1_ulpiphy_nxt */
108 OMAP4_IOPAD(0x0ca, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat0.usbb1_ulpiphy_dat0 */
109 OMAP4_IOPAD(0x0cc, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat1.usbb1_ulpiphy_dat1 */
110 OMAP4_IOPAD(0x0ce, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat2.usbb1_ulpiphy_dat2 */
111 OMAP4_IOPAD(0x0d0, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat3.usbb1_ulpiphy_dat3 */
112 OMAP4_IOPAD(0x0d2, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat4.usbb1_ulpiphy_dat4 */
113 OMAP4_IOPAD(0x0d4, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat5.usbb1_ulpiphy_dat5 */
114 OMAP4_IOPAD(0x0d6, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat6.usbb1_ulpiphy_dat6 */
115 OMAP4_IOPAD(0x0d8, PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat7.usbb1_ulpiphy_dat7 */
116 >;
117 };
118
119 hsusbb1_phy_rst_pins: pinmux_hsusbb1_phy_rst_pins {
120 pinctrl-single,pins = <
121 OMAP4_IOPAD(0x18c, PIN_OUTPUT | MUX_MODE3) /* kpd_row2.gpio_177 */
122 >;
123 };
124
125 i2c1_pins: pinmux_i2c1_pins {
126 pinctrl-single,pins = <
127 OMAP4_IOPAD(0x122, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_scl */
128 OMAP4_IOPAD(0x124, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_sda */
129 >;
130 };
131
132 i2c3_pins: pinmux_i2c3_pins {
133 pinctrl-single,pins = <
134 OMAP4_IOPAD(0x12a, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_scl */
135 OMAP4_IOPAD(0x12c, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_sda */
136 >;
137 };
138
139 mmc1_pins: pinmux_mmc1_pins {
140 pinctrl-single,pins = <
141 OMAP4_IOPAD(0x0e2, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_clk.sdmmc1_clk */
142 OMAP4_IOPAD(0x0e4, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_cmd.sdmmc1_cmd */
143 OMAP4_IOPAD(0x0e6, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat0.sdmmc1_dat0 */
144 OMAP4_IOPAD(0x0e8, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat1.sdmmc1_dat1 */
145 OMAP4_IOPAD(0x0ea, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat2.sdmmc1_dat2 */
146 OMAP4_IOPAD(0x0ec, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat3.sdmmc1_dat3 */
147 >;
148 };
149};
150
151&omap4_pmx_wkup {
152 pinctrl-names = "default";
153 pinctrl-0 = <
154 &hsusbb1_hub_rst_pins
155 &lan7500_rst_pins
156 >;
157
158 hsusbb1_phy_clk_pins: pinmux_hsusbb1_phy_clk_pins {
159 pinctrl-single,pins = <
160 OMAP4_IOPAD(0x058, PIN_OUTPUT | MUX_MODE0) /* fref_clk3_out */
161 >;
162 };
163
164 hsusbb1_hub_rst_pins: pinmux_hsusbb1_hub_rst_pins {
165 pinctrl-single,pins = <
166 OMAP4_IOPAD(0x042, PIN_OUTPUT | MUX_MODE3) /* gpio_wk1 */
167 >;
168 };
169
170 lan7500_rst_pins: pinmux_lan7500_rst_pins {
171 pinctrl-single,pins = <
172 OMAP4_IOPAD(0x040, PIN_OUTPUT | MUX_MODE3) /* gpio_wk0 */
173 >;
174 };
175};
176
177&i2c1 {
178 pinctrl-names = "default";
179 pinctrl-0 = <&i2c1_pins>;
180 status = "okay";
181
182 clock-frequency = <400000>;
183
184 twl: twl@48 {
185 reg = <0x48>;
186 /* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */
187 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_1N cascaded to gic */
188 interrupt-parent = <&gic>;
189 };
190
191 twl6040: twl@4b {
192 compatible = "ti,twl6040";
193 reg = <0x4b>;
194
195 pinctrl-names = "default";
196 pinctrl-0 = <&twl6040_pins>;
197
198 /* SPI = 0, IRQ# = 119, 4 = active high level-sensitive */
199 interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_2N cascaded to gic */
200 interrupt-parent = <&gic>;
201 ti,audpwron-gpio = <&gpio6 22 0>; /* gpio 182 */
202
203 vio-supply = <&v1v8>;
204 v2v1-supply = <&v2v1>;
205 enable-active-high;
206 };
207};
208
209#include "twl6030.dtsi"
210#include "twl6030_omap4.dtsi"
211
212&vusim {
213 regulator-min-microvolt = <3000000>;
214 regulator-max-microvolt = <3000000>;
215 regulator-always-on;
216};
217
218&i2c2 {
219 status = "disabled";
220};
221
222&i2c3 {
223 pinctrl-names = "default";
224 pinctrl-0 = <&i2c3_pins>;
225 status = "okay";
226
227 clock-frequency = <400000>;
228
229 touchscreen: tsc2004@48 {
230 compatible = "ti,tsc2004";
231 reg = <0x48>;
232 pinctrl-names = "default";
233 pinctrl-0 = <&tsc2004_pins>;
234 interrupt-parent = <&gpio4>;
235 interrupts = <5 IRQ_TYPE_LEVEL_LOW>; /* gpio 101 */
236 status = "disabled";
237 };
238
239 tmp105@49 {
240 compatible = "ti,tmp105";
241 reg = <0x49>;
242 };
243
244 eeprom@50 {
245 compatible = "microchip,24c32";
246 reg = <0x50>;
247 };
248};
249
250&i2c4 {
251 status = "disabled";
252};
253
254&mcpdm {
255 pinctrl-names = "default";
256 pinctrl-0 = <&mcpdm_pins>;
257 status = "okay";
258};
259
260&gpmc {
261 status = "disabled";
262};
263
264&mcspi1 {
265 status = "disabled";
266};
267
268&mcspi2 {
269 status = "disabled";
270};
271
272&mcspi3 {
273 status = "disabled";
274};
275
276&mcspi4 {
277 status = "disabled";
278};
279
280&mmc1 {
281 pinctrl-names = "default";
282 pinctrl-0 = <&mmc1_pins>;
283 vmmc-supply = <&vmmc>;
284 bus-width = <4>;
285 ti,non-removable;
286 status = "okay";
287};
288
289&mmc2 {
290 status = "disabled";
291};
292
293&mmc3 {
294 status = "disabled";
295};
296
297&mmc4 {
298 status = "disabled";
299};
300
301&mmc5 {
302 status = "disabled";
303};
304
305&uart1 {
306 status = "disabled";
307};
308
309&uart2 {
310 status = "disabled";
311};
312
313&uart3 {
314 pinctrl-names = "default";
315 pinctrl-0 = <&uart3_pins>;
316 status = "okay";
317};
318
319&uart4 {
320 status = "disabled";
321};
322
323&keypad {
324 status = "disabled";
325};
326
327&twl_usb_comparator {
328 usb-supply = <&vusb>;
329};
330
331&usb_otg_hs {
332 interface-type = <1>;
333 mode = <3>;
334 power = <50>;
335};
336
337&usbhshost {
338 port1-mode = "ehci-phy";
339};
340
341&usbhsehci {
342 phys = <&hsusb1_phy>;
343};
diff --git a/arch/arm/boot/dts/omap4-var-som.dts b/arch/arm/boot/dts/omap4-var-som.dts
deleted file mode 100644
index b41269e871dd..000000000000
--- a/arch/arm/boot/dts/omap4-var-som.dts
+++ /dev/null
@@ -1,96 +0,0 @@
1/*
2 * Copyright (C) 2012 Variscite Ltd. - http://www.variscite.com
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/dts-v1/;
9
10#include "omap443x.dtsi"
11
12/ {
13 model = "Variscite OMAP4 SOM";
14 compatible = "var,omap4-var_som", "ti,omap4430", "ti,omap4";
15
16 memory {
17 device_type = "memory";
18 reg = <0x80000000 0x40000000>; /* 1 GB */
19 };
20
21 vdd_eth: fixedregulator@0 {
22 compatible = "regulator-fixed";
23 regulator-name = "VDD_ETH";
24 regulator-min-microvolt = <3300000>;
25 regulator-max-microvolt = <3300000>;
26 enable-active-high;
27 regulator-boot-on;
28 };
29};
30
31&i2c1 {
32 clock-frequency = <400000>;
33
34 twl: twl@48 {
35 reg = <0x48>;
36 /* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */
37 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_1N cascaded to gic */
38 interrupt-parent = <&gic>;
39 };
40};
41
42#include "twl6030.dtsi"
43
44&i2c2 {
45 clock-frequency = <400000>;
46};
47
48&i2c3 {
49 clock-frequency = <400000>;
50
51 /*
52 * Temperature Sensor
53 * http://www.ti.com/lit/ds/symlink/tmp105.pdf
54 */
55 tmp105@49 {
56 compatible = "ti,tmp105";
57 reg = <0x49>;
58 };
59};
60
61&i2c4 {
62 clock-frequency = <400000>;
63};
64
65&mcspi1 {
66 eth@0 {
67 compatible = "ks8851";
68 spi-max-frequency = <24000000>;
69 reg = <0>;
70 interrupt-parent = <&gpio6>;
71 interrupts = <11 IRQ_TYPE_LEVEL_LOW>; /* gpio line 171 */
72 vdd-supply = <&vdd_eth>;
73 };
74};
75
76&mmc1 {
77 vmmc-supply = <&vmmc>;
78 ti,bus-width = <8>;
79 ti,non-removable;
80};
81
82&mmc2 {
83 status = "disabled";
84};
85
86&mmc3 {
87 status = "disabled";
88};
89
90&mmc4 {
91 status = "disabled";
92};
93
94&mmc5 {
95 ti,bus-width = <4>;
96};
diff --git a/arch/arm/boot/dts/omap4-var-stk-om44.dts b/arch/arm/boot/dts/omap4-var-stk-om44.dts
new file mode 100644
index 000000000000..56b64e618608
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-var-stk-om44.dts
@@ -0,0 +1,17 @@
1/*
2 * Copyright (C) 2014 Joachim Eastwood <manabian@gmail.com>
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/dts-v1/;
9
10#include "omap4-var-som-om44.dtsi"
11#include "omap4-var-som-om44-wlan.dtsi"
12#include "omap4-var-om44customboard.dtsi"
13
14/ {
15 model = "Variscite VAR-STK-OM44";
16 compatible = "variscite,var-stk-om44", "variscite,var-som-om44", "ti,omap4460", "ti,omap4";
17};
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 649b5cd38b40..43a587e097d4 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -67,6 +67,7 @@
67 67
68 local-timer@48240600 { 68 local-timer@48240600 {
69 compatible = "arm,cortex-a9-twd-timer"; 69 compatible = "arm,cortex-a9-twd-timer";
70 clocks = <&mpu_periphclk>;
70 reg = <0x48240600 0x20>; 71 reg = <0x48240600 0x20>;
71 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_HIGH)>; 72 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_HIGH)>;
72 }; 73 };
@@ -311,7 +312,7 @@
311 uart2: serial@4806c000 { 312 uart2: serial@4806c000 {
312 compatible = "ti,omap4-uart"; 313 compatible = "ti,omap4-uart";
313 reg = <0x4806c000 0x100>; 314 reg = <0x4806c000 0x100>;
314 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; 315 interrupts-extended = <&gic GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
315 ti,hwmods = "uart2"; 316 ti,hwmods = "uart2";
316 clock-frequency = <48000000>; 317 clock-frequency = <48000000>;
317 }; 318 };
@@ -319,7 +320,7 @@
319 uart3: serial@48020000 { 320 uart3: serial@48020000 {
320 compatible = "ti,omap4-uart"; 321 compatible = "ti,omap4-uart";
321 reg = <0x48020000 0x100>; 322 reg = <0x48020000 0x100>;
322 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; 323 interrupts-extended = <&gic GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
323 ti,hwmods = "uart3"; 324 ti,hwmods = "uart3";
324 clock-frequency = <48000000>; 325 clock-frequency = <48000000>;
325 }; 326 };
@@ -327,7 +328,7 @@
327 uart4: serial@4806e000 { 328 uart4: serial@4806e000 {
328 compatible = "ti,omap4-uart"; 329 compatible = "ti,omap4-uart";
329 reg = <0x4806e000 0x100>; 330 reg = <0x4806e000 0x100>;
330 interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; 331 interrupts-extended = <&gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
331 ti,hwmods = "uart4"; 332 ti,hwmods = "uart4";
332 clock-frequency = <48000000>; 333 clock-frequency = <48000000>;
333 }; 334 };
@@ -642,6 +643,8 @@
642 compatible = "ti,omap-usb2"; 643 compatible = "ti,omap-usb2";
643 reg = <0x4a0ad080 0x58>; 644 reg = <0x4a0ad080 0x58>;
644 ctrl-module = <&omap_control_usb2phy>; 645 ctrl-module = <&omap_control_usb2phy>;
646 clocks = <&usb_phy_cm_clk32k>;
647 clock-names = "wkupclk";
645 #phy-cells = <0>; 648 #phy-cells = <0>;
646 }; 649 };
647 }; 650 };
diff --git a/arch/arm/boot/dts/omap5-cm-t54.dts b/arch/arm/boot/dts/omap5-cm-t54.dts
new file mode 100644
index 000000000000..b8698ca68647
--- /dev/null
+++ b/arch/arm/boot/dts/omap5-cm-t54.dts
@@ -0,0 +1,413 @@
1/*
2 * Support for CompuLab CM-T54
3 */
4/dts-v1/;
5
6#include "omap5.dtsi"
7#include <dt-bindings/interrupt-controller/irq.h>
8#include <dt-bindings/interrupt-controller/arm-gic.h>
9
10/ {
11 model = "CompuLab CM-T54";
12 compatible = "compulab,omap5-cm-t54", "ti,omap5";
13
14 memory {
15 device_type = "memory";
16 reg = <0x80000000 0x7F000000>; /* 2048 MB */
17 };
18
19 vmmcsd_fixed: fixed-regulator-mmcsd {
20 compatible = "regulator-fixed";
21 regulator-name = "vmmcsd_fixed";
22 regulator-min-microvolt = <3300000>;
23 regulator-max-microvolt = <3300000>;
24 };
25
26 vwlan_pdn_fixed: fixed-regulator-vwlan-pdn {
27 compatible = "regulator-fixed";
28 regulator-name = "vwlan_pdn_fixed";
29 regulator-min-microvolt = <3300000>;
30 regulator-max-microvolt = <3300000>;
31 vin-supply = <&ldo2_reg>;
32 gpio = <&gpio4 13 GPIO_ACTIVE_HIGH>; /* gpio4_109 */
33 startup-delay-us = <1000>;
34 enable-active-high;
35 };
36
37 vwlan_fixed: fixed-regulator-vwlan {
38 compatible = "regulator-fixed";
39 regulator-name = "vwlan_fixed";
40 regulator-min-microvolt = <3300000>;
41 regulator-max-microvolt = <3300000>;
42 vin-supply = <&vwlan_pdn_fixed>;
43 gpio = <&gpio4 14 GPIO_ACTIVE_HIGH>; /* gpio4_110 */
44 startup-delay-us = <1000>;
45 enable-active-high;
46 };
47
48 /* HS USB Host PHY on PORT 2 */
49 hsusb2_phy: hsusb2_phy {
50 compatible = "usb-nop-xceiv";
51 reset-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>; /* gpio3_76 HUB_RESET */
52 };
53
54 /* HS USB Host PHY on PORT 3 */
55 hsusb3_phy: hsusb3_phy {
56 compatible = "usb-nop-xceiv";
57 reset-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>; /* gpio3_83 ETH_RESET */
58 };
59
60 leds {
61 compatible = "gpio-leds";
62 led@1 {
63 label = "Heartbeat";
64 gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>; /* gpio3_80 ACT_LED */
65 linux,default-trigger = "heartbeat";
66 default-state = "off";
67 };
68 };
69};
70
71&omap5_pmx_core {
72 pinctrl-names = "default";
73 pinctrl-0 = <
74 &led_gpio_pins
75 &usbhost_pins
76 >;
77
78 led_gpio_pins: pinmux_led_gpio_pins {
79 pinctrl-single,pins = <
80 OMAP5_IOPAD(0x00b0, PIN_OUTPUT | MUX_MODE6) /* hsi2_caflag.gpio3_80 */
81 >;
82 };
83
84 i2c1_pins: pinmux_i2c1_pins {
85 pinctrl-single,pins = <
86 OMAP5_IOPAD(0x01f2, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_pmic_scl */
87 OMAP5_IOPAD(0x01f4, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_pmic_sda */
88 >;
89 };
90
91 mmc1_pins: pinmux_mmc1_pins {
92 pinctrl-single,pins = <
93 OMAP5_IOPAD(0x01e2, PIN_INPUT_PULLUP | MUX_MODE0) /* sdcard_clk */
94 OMAP5_IOPAD(0x01e4, PIN_INPUT_PULLUP | MUX_MODE0) /* sdcard_cmd */
95 OMAP5_IOPAD(0x01e6, PIN_INPUT_PULLUP | MUX_MODE0) /* sdcard_data2 */
96 OMAP5_IOPAD(0x01e8, PIN_INPUT_PULLUP | MUX_MODE0) /* sdcard_data3 */
97 OMAP5_IOPAD(0x01ea, PIN_INPUT_PULLUP | MUX_MODE0) /* sdcard_data0 */
98 OMAP5_IOPAD(0x01ec, PIN_INPUT_PULLUP | MUX_MODE0) /* sdcard_data1 */
99 >;
100 };
101
102 mmc2_pins: pinmux_mmc2_pins {
103 pinctrl-single,pins = <
104 OMAP5_IOPAD(0x0040, PIN_INPUT_PULLUP | MUX_MODE0) /* emmc_clk */
105 OMAP5_IOPAD(0x0042, PIN_INPUT_PULLUP | MUX_MODE0) /* emmc_cmd */
106 OMAP5_IOPAD(0x0044, PIN_INPUT_PULLUP | MUX_MODE0) /* emmc_data0 */
107 OMAP5_IOPAD(0x0046, PIN_INPUT_PULLUP | MUX_MODE0) /* emmc_data1 */
108 OMAP5_IOPAD(0x0048, PIN_INPUT_PULLUP | MUX_MODE0) /* emmc_data2 */
109 OMAP5_IOPAD(0x004a, PIN_INPUT_PULLUP | MUX_MODE0) /* emmc_data3 */
110 OMAP5_IOPAD(0x004c, PIN_INPUT_PULLUP | MUX_MODE0) /* emmc_data4 */
111 OMAP5_IOPAD(0x004e, PIN_INPUT_PULLUP | MUX_MODE0) /* emmc_data5 */
112 OMAP5_IOPAD(0x0050, PIN_INPUT_PULLUP | MUX_MODE0) /* emmc_data6 */
113 OMAP5_IOPAD(0x0052, PIN_INPUT_PULLUP | MUX_MODE0) /* emmc_data7 */
114 >;
115 };
116
117 mmc3_pins: pinmux_mmc3_pins {
118 pinctrl-single,pins = <
119 OMAP5_IOPAD(0x01a4, PIN_INPUT_PULLUP | MUX_MODE0) /* wlsdio_clk */
120 OMAP5_IOPAD(0x01a6, PIN_INPUT_PULLUP | MUX_MODE0) /* wlsdio_cmd */
121 OMAP5_IOPAD(0x01a8, PIN_INPUT_PULLUP | MUX_MODE0) /* wlsdio_data0 */
122 OMAP5_IOPAD(0x01aa, PIN_INPUT_PULLUP | MUX_MODE0) /* wlsdio_data1 */
123 OMAP5_IOPAD(0x01ac, PIN_INPUT_PULLUP | MUX_MODE0) /* wlsdio_data2 */
124 OMAP5_IOPAD(0x01ae, PIN_INPUT_PULLUP | MUX_MODE0) /* wlsdio_data3 */
125 >;
126 };
127
128 wlan_gpios_pins: pinmux_wlan_gpios_pins {
129 pinctrl-single,pins = <
130 OMAP5_IOPAD(0x019c, PIN_OUTPUT_PULLDOWN | MUX_MODE6) /* gpio4_109 */
131 OMAP5_IOPAD(0x019e, PIN_OUTPUT_PULLDOWN | MUX_MODE6) /* gpio4_110 */
132 >;
133 };
134
135 usbhost_pins: pinmux_usbhost_pins {
136 pinctrl-single,pins = <
137 OMAP5_IOPAD(0x00c4, PIN_INPUT | MUX_MODE0) /* usbb2_hsic_strobe */
138 OMAP5_IOPAD(0x00c6, PIN_INPUT | MUX_MODE0) /* usbb2_hsic_data */
139
140 OMAP5_IOPAD(0x01dc, PIN_INPUT | MUX_MODE0) /* usbb3_hsic_strobe */
141 OMAP5_IOPAD(0x01de, PIN_INPUT | MUX_MODE0) /* usbb3_hsic_data */
142
143 OMAP5_IOPAD(0x00a8, PIN_OUTPUT | MUX_MODE6) /* hsi2_caready.gpio3_76 */
144 OMAP5_IOPAD(0x00b6, PIN_OUTPUT | MUX_MODE6) /* hsi2_acdata.gpio3_83 */
145 >;
146 };
147};
148
149&mmc1 {
150 pinctrl-names = "default";
151 pinctrl-0 = <&mmc1_pins>;
152 vmmc-supply = <&ldo9_reg>;
153 bus-width = <4>;
154};
155
156&mmc2 {
157 pinctrl-names = "default";
158 pinctrl-0 = <&mmc2_pins>;
159 vmmc-supply = <&vmmcsd_fixed>;
160 bus-width = <8>;
161 ti,non-removable;
162};
163
164&mmc3 {
165 pinctrl-names = "default";
166 pinctrl-0 = <
167 &mmc3_pins
168 &wlan_gpios_pins
169 >;
170 vmmc-supply = <&vwlan_fixed>;
171 bus-width = <4>;
172 ti,non-removable;
173};
174
175&mmc4 {
176 status = "disabled";
177};
178
179&mmc5 {
180 status = "disabled";
181};
182
183&i2c1 {
184 pinctrl-names = "default";
185 pinctrl-0 = <&i2c1_pins>;
186
187 clock-frequency = <400000>;
188
189 at24@50 {
190 compatible = "at24,24c02";
191 pagesize = <16>;
192 reg = <0x50>;
193 };
194
195 palmas: palmas@48 {
196 compatible = "ti,palmas";
197 interrupts = <GIC_SPI 7 IRQ_TYPE_NONE>; /* IRQ_SYS_1N */
198 interrupt-parent = <&gic>;
199 reg = <0x48>;
200 interrupt-controller;
201 #interrupt-cells = <2>;
202 ti,system-power-controller;
203
204 extcon_usb3: palmas_usb {
205 compatible = "ti,palmas-usb-vid";
206 ti,enable-vbus-detection;
207 ti,enable-id-detection;
208 ti,wakeup;
209 };
210
211 rtc {
212 compatible = "ti,palmas-rtc";
213 interrupt-parent = <&palmas>;
214 interrupts = <8 IRQ_TYPE_NONE>;
215 };
216
217 palmas_pmic {
218 compatible = "ti,palmas-pmic";
219 interrupt-parent = <&palmas>;
220 interrupts = <14 IRQ_TYPE_NONE>;
221 interrupt-name = "short-irq";
222
223 ti,ldo6-vibrator;
224
225 regulators {
226 smps123_reg: smps123 {
227 /* VDD_OPP_MPU */
228 regulator-name = "smps123";
229 regulator-min-microvolt = < 600000>;
230 regulator-max-microvolt = <1500000>;
231 regulator-always-on;
232 regulator-boot-on;
233 };
234
235 smps45_reg: smps45 {
236 /* VDD_OPP_MM */
237 regulator-name = "smps45";
238 regulator-min-microvolt = < 600000>;
239 regulator-max-microvolt = <1310000>;
240 regulator-always-on;
241 regulator-boot-on;
242 };
243
244 smps6_reg: smps6 {
245 /* VDD_DDR3 - over VDD_SMPS6 */
246 regulator-name = "smps6";
247 regulator-min-microvolt = <1500000>;
248 regulator-max-microvolt = <1500000>;
249 regulator-always-on;
250 regulator-boot-on;
251 };
252
253 smps7_reg: smps7 {
254 /* VDDS_1v8_OMAP over VDDS_1v8_MAIN */
255 regulator-name = "smps7";
256 regulator-min-microvolt = <1800000>;
257 regulator-max-microvolt = <1800000>;
258 regulator-always-on;
259 regulator-boot-on;
260 };
261
262 smps8_reg: smps8 {
263 /* VDD_OPP_CORE */
264 regulator-name = "smps8";
265 regulator-min-microvolt = < 600000>;
266 regulator-max-microvolt = <1310000>;
267 regulator-always-on;
268 regulator-boot-on;
269 };
270
271 smps9_reg: smps9 {
272 /* VDDA_2v1_AUD over VDD_2v1 */
273 regulator-name = "smps9";
274 regulator-min-microvolt = <3300000>;
275 regulator-max-microvolt = <3300000>;
276 ti,smps-range = <0x80>;
277 regulator-always-on;
278 regulator-boot-on;
279 };
280
281 smps10_out2_reg: smps10_out2 {
282 /* VBUS_5V_OTG */
283 regulator-name = "smps10_out2";
284 regulator-min-microvolt = <5000000>;
285 regulator-max-microvolt = <5000000>;
286 regulator-always-on;
287 regulator-boot-on;
288 };
289
290 smps10_out1_reg: smps10_out1 {
291 /* VBUS_5V_OTG */
292 regulator-name = "smps10_out1";
293 regulator-min-microvolt = <5000000>;
294 regulator-max-microvolt = <5000000>;
295 };
296
297 ldo1_reg: ldo1 {
298 /* VDDAPHY_CAM: vdda_csiport */
299 regulator-name = "ldo1";
300 regulator-min-microvolt = <1500000>;
301 regulator-max-microvolt = <1800000>;
302 };
303
304 ldo2_reg: ldo2 {
305 /* VDD_3V3_WLAN */
306 regulator-name = "ldo2";
307 regulator-min-microvolt = <3300000>;
308 regulator-max-microvolt = <3300000>;
309 startup-delay-us = <1000>;
310 };
311
312 ldo3_reg: ldo3 {
313 /* VCC_1V5_AUD */
314 regulator-name = "ldo3";
315 regulator-min-microvolt = <1500000>;
316 regulator-max-microvolt = <1500000>;
317 regulator-always-on;
318 regulator-boot-on;
319 };
320
321 ldo4_reg: ldo4 {
322 /* VDDAPHY_DISP: vdda_dsiport/hdmi */
323 regulator-name = "ldo4";
324 regulator-min-microvolt = <1500000>;
325 regulator-max-microvolt = <1800000>;
326 };
327
328 ldo5_reg: ldo5 {
329 /* VDDA_1V8_PHY: usb/sata/hdmi.. */
330 regulator-name = "ldo5";
331 regulator-min-microvolt = <1800000>;
332 regulator-max-microvolt = <1800000>;
333 regulator-always-on;
334 regulator-boot-on;
335 };
336
337 ldo6_reg: ldo6 {
338 /* VDDS_1V2_WKUP: hsic/ldo_emu_wkup */
339 regulator-name = "ldo6";
340 regulator-min-microvolt = <1200000>;
341 regulator-max-microvolt = <1200000>;
342 regulator-always-on;
343 regulator-boot-on;
344 };
345
346 ldo7_reg: ldo7 {
347 /* VDD_VPP: vpp1 */
348 regulator-name = "ldo7";
349 regulator-min-microvolt = <2000000>;
350 regulator-max-microvolt = <2000000>;
351 /* Only for efuse reprograming! */
352 status = "disabled";
353 };
354
355 ldo8_reg: ldo8 {
356 /* VDD_3v0: Does not go anywhere */
357 regulator-name = "ldo8";
358 regulator-min-microvolt = <3000000>;
359 regulator-max-microvolt = <3000000>;
360 regulator-boot-on;
361 /* Unused */
362 status = "disabled";
363 };
364
365 ldo9_reg: ldo9 {
366 /* VCC_DV_SDIO: vdds_sdcard */
367 regulator-name = "ldo9";
368 regulator-min-microvolt = <1800000>;
369 regulator-max-microvolt = <3000000>;
370 regulator-boot-on;
371 };
372
373 ldoln_reg: ldoln {
374 /* VDDA_1v8_REF: vdds_osc/mm_l4per.. */
375 regulator-name = "ldoln";
376 regulator-min-microvolt = <1800000>;
377 regulator-max-microvolt = <1800000>;
378 regulator-always-on;
379 regulator-boot-on;
380 };
381
382 ldousb_reg: ldousb {
383 /* VDDA_3V_USB: VDDA_USBHS33 */
384 regulator-name = "ldousb";
385 regulator-min-microvolt = <3250000>;
386 regulator-max-microvolt = <3250000>;
387 regulator-always-on;
388 regulator-boot-on;
389 };
390
391 regen3_reg: regen3 {
392 /* REGEN3 controls LDO9 supply to card */
393 regulator-name = "regen3";
394 regulator-always-on;
395 regulator-boot-on;
396 };
397 };
398 };
399 };
400};
401
402&usbhshost {
403 port2-mode = "ehci-hsic";
404 port3-mode = "ehci-hsic";
405};
406
407&usbhsehci {
408 phys = <0 &hsusb2_phy &hsusb3_phy>;
409};
410
411&cpu0 {
412 cpu0-supply = <&smps123_reg>;
413};
diff --git a/arch/arm/boot/dts/omap5-sbc-t54.dts b/arch/arm/boot/dts/omap5-sbc-t54.dts
new file mode 100644
index 000000000000..aa98fea3f2b3
--- /dev/null
+++ b/arch/arm/boot/dts/omap5-sbc-t54.dts
@@ -0,0 +1,51 @@
1/*
2 * Suppport for CompuLab SBC-T54 with CM-T54
3 */
4
5#include "omap5-cm-t54.dts"
6
7/ {
8 model = "CompuLab SBC-T54 with CM-T54";
9 compatible = "compulab,omap5-sbc-t54", "compulab,omap5-cm-t54", "ti,omap5";
10};
11
12&omap5_pmx_core {
13 i2c4_pins: pinmux_i2c4_pins {
14 pinctrl-single,pins = <
15 OMAP5_IOPAD(0x00f8, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_scl */
16 OMAP5_IOPAD(0x00fa, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_sda */
17 >;
18 };
19
20 mmc1_aux_pins: pinmux_mmc1_aux_pins {
21 pinctrl-single,pins = <
22 OMAP5_IOPAD(0x0174, PIN_INPUT_PULLUP | MUX_MODE6) /* gpio8_228 */
23 OMAP5_IOPAD(0x0176, PIN_INPUT_PULLUP | MUX_MODE6) /* gpio8_229 */
24 >;
25 };
26};
27
28&mmc1 {
29 pinctrl-names = "default";
30 pinctrl-0 = <
31 &mmc1_pins
32 &mmc1_aux_pins
33 >;
34 cd-inverted;
35 wp-inverted;
36 cd-gpios = <&gpio8 4 GPIO_ACTIVE_LOW>; /* gpio8_228 */
37 wp-gpios = <&gpio8 5 GPIO_ACTIVE_LOW>; /* gpio8_229 */
38};
39
40&i2c4 {
41 pinctrl-names = "default";
42 pinctrl-0 = <&i2c4_pins>;
43
44 clock-frequency = <400000>;
45
46 at24@50 {
47 compatible = "at24,24c02";
48 pagesize = <16>;
49 reg = <0x50>;
50 };
51};
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index f8c9855ce587..e58be57984ab 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -82,6 +82,12 @@
82 <GIC_PPI 10 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_LOW)>; 82 <GIC_PPI 10 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_LOW)>;
83 }; 83 };
84 84
85 pmu {
86 compatible = "arm,cortex-a15-pmu";
87 interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
88 <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
89 };
90
85 gic: interrupt-controller@48211000 { 91 gic: interrupt-controller@48211000 {
86 compatible = "arm,cortex-a15-gic"; 92 compatible = "arm,cortex-a15-gic";
87 interrupt-controller; 93 interrupt-controller;
@@ -630,6 +636,13 @@
630 status = "disabled"; 636 status = "disabled";
631 }; 637 };
632 638
639 mailbox: mailbox@4a0f4000 {
640 compatible = "ti,omap4-mailbox";
641 reg = <0x4a0f4000 0x200>;
642 interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
643 ti,hwmods = "mailbox";
644 };
645
633 timer1: timer@4ae18000 { 646 timer1: timer@4ae18000 {
634 compatible = "ti,omap5430-timer"; 647 compatible = "ti,omap5430-timer";
635 reg = <0x4ae18000 0x80>; 648 reg = <0x4ae18000 0x80>;
@@ -803,6 +816,8 @@
803 compatible = "ti,omap-usb2"; 816 compatible = "ti,omap-usb2";
804 reg = <0x4a084000 0x7c>; 817 reg = <0x4a084000 0x7c>;
805 ctrl-module = <&omap_control_usb2phy>; 818 ctrl-module = <&omap_control_usb2phy>;
819 clocks = <&usb_phy_cm_clk32k>, <&usb_otg_ss_refclk960m>;
820 clock-names = "wkupclk", "refclk";
806 #phy-cells = <0>; 821 #phy-cells = <0>;
807 }; 822 };
808 823
@@ -869,6 +884,46 @@
869 884
870 #thermal-sensor-cells = <1>; 885 #thermal-sensor-cells = <1>;
871 }; 886 };
887
888 omap_control_sata: control-phy@4a002374 {
889 compatible = "ti,control-phy-pipe3";
890 reg = <0x4a002374 0x4>;
891 reg-names = "power";
892 clocks = <&sys_clkin>;
893 clock-names = "sysclk";
894 };
895
896 /* OCP2SCP3 */
897 ocp2scp@4a090000 {
898 compatible = "ti,omap-ocp2scp";
899 #address-cells = <1>;
900 #size-cells = <1>;
901 reg = <0x4a090000 0x20>;
902 ranges;
903 ti,hwmods = "ocp2scp3";
904 sata_phy: phy@4a096000 {
905 compatible = "ti,phy-pipe3-sata";
906 reg = <0x4A096000 0x80>, /* phy_rx */
907 <0x4A096400 0x64>, /* phy_tx */
908 <0x4A096800 0x40>; /* pll_ctrl */
909 reg-names = "phy_rx", "phy_tx", "pll_ctrl";
910 ctrl-module = <&omap_control_sata>;
911 clocks = <&sys_clkin>;
912 clock-names = "sysclk";
913 #phy-cells = <0>;
914 };
915 };
916
917 sata: sata@4a141100 {
918 compatible = "snps,dwc-ahci";
919 reg = <0x4a140000 0x1100>, <0x4a141100 0x7>;
920 interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
921 phys = <&sata_phy>;
922 phy-names = "sata-phy";
923 clocks = <&sata_ref_clk>;
924 ti,hwmods = "sata";
925 };
926
872 }; 927 };
873}; 928};
874 929
diff --git a/arch/arm/boot/dts/omap54xx-clocks.dtsi b/arch/arm/boot/dts/omap54xx-clocks.dtsi
index 465505cada59..e67a23b5d788 100644
--- a/arch/arm/boot/dts/omap54xx-clocks.dtsi
+++ b/arch/arm/boot/dts/omap54xx-clocks.dtsi
@@ -120,10 +120,8 @@
120 compatible = "ti,divider-clock"; 120 compatible = "ti,divider-clock";
121 clocks = <&dpll_abe_x2_ck>; 121 clocks = <&dpll_abe_x2_ck>;
122 ti,max-div = <31>; 122 ti,max-div = <31>;
123 ti,autoidle-shift = <8>;
124 reg = <0x01f0>; 123 reg = <0x01f0>;
125 ti,index-starts-at-one; 124 ti,index-starts-at-one;
126 ti,invert-autoidle-bit;
127 }; 125 };
128 126
129 abe_24m_fclk: abe_24m_fclk { 127 abe_24m_fclk: abe_24m_fclk {
@@ -145,10 +143,11 @@
145 143
146 abe_iclk: abe_iclk { 144 abe_iclk: abe_iclk {
147 #clock-cells = <0>; 145 #clock-cells = <0>;
148 compatible = "fixed-factor-clock"; 146 compatible = "ti,divider-clock";
149 clocks = <&abe_clk>; 147 clocks = <&aess_fclk>;
150 clock-mult = <1>; 148 ti,bit-shift = <24>;
151 clock-div = <2>; 149 reg = <0x0528>;
150 ti,dividers = <2>, <1>;
152 }; 151 };
153 152
154 abe_lp_clk_div: abe_lp_clk_div { 153 abe_lp_clk_div: abe_lp_clk_div {
@@ -164,10 +163,8 @@
164 compatible = "ti,divider-clock"; 163 compatible = "ti,divider-clock";
165 clocks = <&dpll_abe_x2_ck>; 164 clocks = <&dpll_abe_x2_ck>;
166 ti,max-div = <31>; 165 ti,max-div = <31>;
167 ti,autoidle-shift = <8>;
168 reg = <0x01f4>; 166 reg = <0x01f4>;
169 ti,index-starts-at-one; 167 ti,index-starts-at-one;
170 ti,invert-autoidle-bit;
171 }; 168 };
172 169
173 dpll_core_ck: dpll_core_ck { 170 dpll_core_ck: dpll_core_ck {
@@ -188,10 +185,8 @@
188 compatible = "ti,divider-clock"; 185 compatible = "ti,divider-clock";
189 clocks = <&dpll_core_x2_ck>; 186 clocks = <&dpll_core_x2_ck>;
190 ti,max-div = <63>; 187 ti,max-div = <63>;
191 ti,autoidle-shift = <8>;
192 reg = <0x0150>; 188 reg = <0x0150>;
193 ti,index-starts-at-one; 189 ti,index-starts-at-one;
194 ti,invert-autoidle-bit;
195 }; 190 };
196 191
197 c2c_fclk: c2c_fclk { 192 c2c_fclk: c2c_fclk {
@@ -215,10 +210,8 @@
215 compatible = "ti,divider-clock"; 210 compatible = "ti,divider-clock";
216 clocks = <&dpll_core_x2_ck>; 211 clocks = <&dpll_core_x2_ck>;
217 ti,max-div = <63>; 212 ti,max-div = <63>;
218 ti,autoidle-shift = <8>;
219 reg = <0x0138>; 213 reg = <0x0138>;
220 ti,index-starts-at-one; 214 ti,index-starts-at-one;
221 ti,invert-autoidle-bit;
222 }; 215 };
223 216
224 dpll_core_h12x2_ck: dpll_core_h12x2_ck { 217 dpll_core_h12x2_ck: dpll_core_h12x2_ck {
@@ -226,10 +219,8 @@
226 compatible = "ti,divider-clock"; 219 compatible = "ti,divider-clock";
227 clocks = <&dpll_core_x2_ck>; 220 clocks = <&dpll_core_x2_ck>;
228 ti,max-div = <63>; 221 ti,max-div = <63>;
229 ti,autoidle-shift = <8>;
230 reg = <0x013c>; 222 reg = <0x013c>;
231 ti,index-starts-at-one; 223 ti,index-starts-at-one;
232 ti,invert-autoidle-bit;
233 }; 224 };
234 225
235 dpll_core_h13x2_ck: dpll_core_h13x2_ck { 226 dpll_core_h13x2_ck: dpll_core_h13x2_ck {
@@ -237,10 +228,8 @@
237 compatible = "ti,divider-clock"; 228 compatible = "ti,divider-clock";
238 clocks = <&dpll_core_x2_ck>; 229 clocks = <&dpll_core_x2_ck>;
239 ti,max-div = <63>; 230 ti,max-div = <63>;
240 ti,autoidle-shift = <8>;
241 reg = <0x0140>; 231 reg = <0x0140>;
242 ti,index-starts-at-one; 232 ti,index-starts-at-one;
243 ti,invert-autoidle-bit;
244 }; 233 };
245 234
246 dpll_core_h14x2_ck: dpll_core_h14x2_ck { 235 dpll_core_h14x2_ck: dpll_core_h14x2_ck {
@@ -248,10 +237,8 @@
248 compatible = "ti,divider-clock"; 237 compatible = "ti,divider-clock";
249 clocks = <&dpll_core_x2_ck>; 238 clocks = <&dpll_core_x2_ck>;
250 ti,max-div = <63>; 239 ti,max-div = <63>;
251 ti,autoidle-shift = <8>;
252 reg = <0x0144>; 240 reg = <0x0144>;
253 ti,index-starts-at-one; 241 ti,index-starts-at-one;
254 ti,invert-autoidle-bit;
255 }; 242 };
256 243
257 dpll_core_h22x2_ck: dpll_core_h22x2_ck { 244 dpll_core_h22x2_ck: dpll_core_h22x2_ck {
@@ -259,10 +246,8 @@
259 compatible = "ti,divider-clock"; 246 compatible = "ti,divider-clock";
260 clocks = <&dpll_core_x2_ck>; 247 clocks = <&dpll_core_x2_ck>;
261 ti,max-div = <63>; 248 ti,max-div = <63>;
262 ti,autoidle-shift = <8>;
263 reg = <0x0154>; 249 reg = <0x0154>;
264 ti,index-starts-at-one; 250 ti,index-starts-at-one;
265 ti,invert-autoidle-bit;
266 }; 251 };
267 252
268 dpll_core_h23x2_ck: dpll_core_h23x2_ck { 253 dpll_core_h23x2_ck: dpll_core_h23x2_ck {
@@ -270,10 +255,8 @@
270 compatible = "ti,divider-clock"; 255 compatible = "ti,divider-clock";
271 clocks = <&dpll_core_x2_ck>; 256 clocks = <&dpll_core_x2_ck>;
272 ti,max-div = <63>; 257 ti,max-div = <63>;
273 ti,autoidle-shift = <8>;
274 reg = <0x0158>; 258 reg = <0x0158>;
275 ti,index-starts-at-one; 259 ti,index-starts-at-one;
276 ti,invert-autoidle-bit;
277 }; 260 };
278 261
279 dpll_core_h24x2_ck: dpll_core_h24x2_ck { 262 dpll_core_h24x2_ck: dpll_core_h24x2_ck {
@@ -281,10 +264,8 @@
281 compatible = "ti,divider-clock"; 264 compatible = "ti,divider-clock";
282 clocks = <&dpll_core_x2_ck>; 265 clocks = <&dpll_core_x2_ck>;
283 ti,max-div = <63>; 266 ti,max-div = <63>;
284 ti,autoidle-shift = <8>;
285 reg = <0x015c>; 267 reg = <0x015c>;
286 ti,index-starts-at-one; 268 ti,index-starts-at-one;
287 ti,invert-autoidle-bit;
288 }; 269 };
289 270
290 dpll_core_m2_ck: dpll_core_m2_ck { 271 dpll_core_m2_ck: dpll_core_m2_ck {
@@ -292,10 +273,8 @@
292 compatible = "ti,divider-clock"; 273 compatible = "ti,divider-clock";
293 clocks = <&dpll_core_ck>; 274 clocks = <&dpll_core_ck>;
294 ti,max-div = <31>; 275 ti,max-div = <31>;
295 ti,autoidle-shift = <8>;
296 reg = <0x0130>; 276 reg = <0x0130>;
297 ti,index-starts-at-one; 277 ti,index-starts-at-one;
298 ti,invert-autoidle-bit;
299 }; 278 };
300 279
301 dpll_core_m3x2_ck: dpll_core_m3x2_ck { 280 dpll_core_m3x2_ck: dpll_core_m3x2_ck {
@@ -303,10 +282,8 @@
303 compatible = "ti,divider-clock"; 282 compatible = "ti,divider-clock";
304 clocks = <&dpll_core_x2_ck>; 283 clocks = <&dpll_core_x2_ck>;
305 ti,max-div = <31>; 284 ti,max-div = <31>;
306 ti,autoidle-shift = <8>;
307 reg = <0x0134>; 285 reg = <0x0134>;
308 ti,index-starts-at-one; 286 ti,index-starts-at-one;
309 ti,invert-autoidle-bit;
310 }; 287 };
311 288
312 iva_dpll_hs_clk_div: iva_dpll_hs_clk_div { 289 iva_dpll_hs_clk_div: iva_dpll_hs_clk_div {
@@ -335,10 +312,8 @@
335 compatible = "ti,divider-clock"; 312 compatible = "ti,divider-clock";
336 clocks = <&dpll_iva_x2_ck>; 313 clocks = <&dpll_iva_x2_ck>;
337 ti,max-div = <63>; 314 ti,max-div = <63>;
338 ti,autoidle-shift = <8>;
339 reg = <0x01b8>; 315 reg = <0x01b8>;
340 ti,index-starts-at-one; 316 ti,index-starts-at-one;
341 ti,invert-autoidle-bit;
342 }; 317 };
343 318
344 dpll_iva_h12x2_ck: dpll_iva_h12x2_ck { 319 dpll_iva_h12x2_ck: dpll_iva_h12x2_ck {
@@ -346,10 +321,8 @@
346 compatible = "ti,divider-clock"; 321 compatible = "ti,divider-clock";
347 clocks = <&dpll_iva_x2_ck>; 322 clocks = <&dpll_iva_x2_ck>;
348 ti,max-div = <63>; 323 ti,max-div = <63>;
349 ti,autoidle-shift = <8>;
350 reg = <0x01bc>; 324 reg = <0x01bc>;
351 ti,index-starts-at-one; 325 ti,index-starts-at-one;
352 ti,invert-autoidle-bit;
353 }; 326 };
354 327
355 mpu_dpll_hs_clk_div: mpu_dpll_hs_clk_div { 328 mpu_dpll_hs_clk_div: mpu_dpll_hs_clk_div {
@@ -372,10 +345,8 @@
372 compatible = "ti,divider-clock"; 345 compatible = "ti,divider-clock";
373 clocks = <&dpll_mpu_ck>; 346 clocks = <&dpll_mpu_ck>;
374 ti,max-div = <31>; 347 ti,max-div = <31>;
375 ti,autoidle-shift = <8>;
376 reg = <0x0170>; 348 reg = <0x0170>;
377 ti,index-starts-at-one; 349 ti,index-starts-at-one;
378 ti,invert-autoidle-bit;
379 }; 350 };
380 351
381 per_dpll_hs_clk_div: per_dpll_hs_clk_div { 352 per_dpll_hs_clk_div: per_dpll_hs_clk_div {
@@ -642,10 +613,8 @@
642 compatible = "ti,divider-clock"; 613 compatible = "ti,divider-clock";
643 clocks = <&dpll_per_x2_ck>; 614 clocks = <&dpll_per_x2_ck>;
644 ti,max-div = <63>; 615 ti,max-div = <63>;
645 ti,autoidle-shift = <8>;
646 reg = <0x0158>; 616 reg = <0x0158>;
647 ti,index-starts-at-one; 617 ti,index-starts-at-one;
648 ti,invert-autoidle-bit;
649 }; 618 };
650 619
651 dpll_per_h12x2_ck: dpll_per_h12x2_ck { 620 dpll_per_h12x2_ck: dpll_per_h12x2_ck {
@@ -653,10 +622,8 @@
653 compatible = "ti,divider-clock"; 622 compatible = "ti,divider-clock";
654 clocks = <&dpll_per_x2_ck>; 623 clocks = <&dpll_per_x2_ck>;
655 ti,max-div = <63>; 624 ti,max-div = <63>;
656 ti,autoidle-shift = <8>;
657 reg = <0x015c>; 625 reg = <0x015c>;
658 ti,index-starts-at-one; 626 ti,index-starts-at-one;
659 ti,invert-autoidle-bit;
660 }; 627 };
661 628
662 dpll_per_h14x2_ck: dpll_per_h14x2_ck { 629 dpll_per_h14x2_ck: dpll_per_h14x2_ck {
@@ -664,10 +631,8 @@
664 compatible = "ti,divider-clock"; 631 compatible = "ti,divider-clock";
665 clocks = <&dpll_per_x2_ck>; 632 clocks = <&dpll_per_x2_ck>;
666 ti,max-div = <63>; 633 ti,max-div = <63>;
667 ti,autoidle-shift = <8>;
668 reg = <0x0164>; 634 reg = <0x0164>;
669 ti,index-starts-at-one; 635 ti,index-starts-at-one;
670 ti,invert-autoidle-bit;
671 }; 636 };
672 637
673 dpll_per_m2_ck: dpll_per_m2_ck { 638 dpll_per_m2_ck: dpll_per_m2_ck {
@@ -675,10 +640,8 @@
675 compatible = "ti,divider-clock"; 640 compatible = "ti,divider-clock";
676 clocks = <&dpll_per_ck>; 641 clocks = <&dpll_per_ck>;
677 ti,max-div = <31>; 642 ti,max-div = <31>;
678 ti,autoidle-shift = <8>;
679 reg = <0x0150>; 643 reg = <0x0150>;
680 ti,index-starts-at-one; 644 ti,index-starts-at-one;
681 ti,invert-autoidle-bit;
682 }; 645 };
683 646
684 dpll_per_m2x2_ck: dpll_per_m2x2_ck { 647 dpll_per_m2x2_ck: dpll_per_m2x2_ck {
@@ -686,10 +649,8 @@
686 compatible = "ti,divider-clock"; 649 compatible = "ti,divider-clock";
687 clocks = <&dpll_per_x2_ck>; 650 clocks = <&dpll_per_x2_ck>;
688 ti,max-div = <31>; 651 ti,max-div = <31>;
689 ti,autoidle-shift = <8>;
690 reg = <0x0150>; 652 reg = <0x0150>;
691 ti,index-starts-at-one; 653 ti,index-starts-at-one;
692 ti,invert-autoidle-bit;
693 }; 654 };
694 655
695 dpll_per_m3x2_ck: dpll_per_m3x2_ck { 656 dpll_per_m3x2_ck: dpll_per_m3x2_ck {
@@ -697,10 +658,8 @@
697 compatible = "ti,divider-clock"; 658 compatible = "ti,divider-clock";
698 clocks = <&dpll_per_x2_ck>; 659 clocks = <&dpll_per_x2_ck>;
699 ti,max-div = <31>; 660 ti,max-div = <31>;
700 ti,autoidle-shift = <8>;
701 reg = <0x0154>; 661 reg = <0x0154>;
702 ti,index-starts-at-one; 662 ti,index-starts-at-one;
703 ti,invert-autoidle-bit;
704 }; 663 };
705 664
706 dpll_unipro1_ck: dpll_unipro1_ck { 665 dpll_unipro1_ck: dpll_unipro1_ck {
@@ -723,10 +682,8 @@
723 compatible = "ti,divider-clock"; 682 compatible = "ti,divider-clock";
724 clocks = <&dpll_unipro1_ck>; 683 clocks = <&dpll_unipro1_ck>;
725 ti,max-div = <127>; 684 ti,max-div = <127>;
726 ti,autoidle-shift = <8>;
727 reg = <0x0210>; 685 reg = <0x0210>;
728 ti,index-starts-at-one; 686 ti,index-starts-at-one;
729 ti,invert-autoidle-bit;
730 }; 687 };
731 688
732 dpll_unipro2_ck: dpll_unipro2_ck { 689 dpll_unipro2_ck: dpll_unipro2_ck {
@@ -749,10 +706,8 @@
749 compatible = "ti,divider-clock"; 706 compatible = "ti,divider-clock";
750 clocks = <&dpll_unipro2_ck>; 707 clocks = <&dpll_unipro2_ck>;
751 ti,max-div = <127>; 708 ti,max-div = <127>;
752 ti,autoidle-shift = <8>;
753 reg = <0x01d0>; 709 reg = <0x01d0>;
754 ti,index-starts-at-one; 710 ti,index-starts-at-one;
755 ti,invert-autoidle-bit;
756 }; 711 };
757 712
758 dpll_usb_ck: dpll_usb_ck { 713 dpll_usb_ck: dpll_usb_ck {
@@ -775,10 +730,8 @@
775 compatible = "ti,divider-clock"; 730 compatible = "ti,divider-clock";
776 clocks = <&dpll_usb_ck>; 731 clocks = <&dpll_usb_ck>;
777 ti,max-div = <127>; 732 ti,max-div = <127>;
778 ti,autoidle-shift = <8>;
779 reg = <0x0190>; 733 reg = <0x0190>;
780 ti,index-starts-at-one; 734 ti,index-starts-at-one;
781 ti,invert-autoidle-bit;
782 }; 735 };
783 736
784 func_128m_clk: func_128m_clk { 737 func_128m_clk: func_128m_clk {
@@ -851,6 +804,7 @@
851 clocks = <&dpll_per_h12x2_ck>; 804 clocks = <&dpll_per_h12x2_ck>;
852 ti,bit-shift = <8>; 805 ti,bit-shift = <8>;
853 reg = <0x1420>; 806 reg = <0x1420>;
807 ti,set-rate-parent;
854 }; 808 };
855 809
856 dss_sys_clk: dss_sys_clk { 810 dss_sys_clk: dss_sys_clk {
diff --git a/arch/arm/boot/dts/orion5x-lacie-d2-network.dts b/arch/arm/boot/dts/orion5x-lacie-d2-network.dts
new file mode 100644
index 000000000000..c701e8d16bbb
--- /dev/null
+++ b/arch/arm/boot/dts/orion5x-lacie-d2-network.dts
@@ -0,0 +1,236 @@
1/*
2 * Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 * Copyright (C) 2009 Simon Guinot <sguinot@lacie.com>
4 *
5 * This file is licensed under the terms of the GNU General Public
6 * License version 2. This program is licensed "as is" without any
7 * warranty of any kind, whether express or implied.
8 */
9
10/dts-v1/;
11
12#include <dt-bindings/gpio/gpio.h>
13#include <dt-bindings/input/input.h>
14#include <dt-bindings/interrupt-controller/irq.h>
15#include "orion5x-mv88f5182.dtsi"
16
17/ {
18 model = "LaCie d2 Network";
19 compatible = "lacie,d2-network", "marvell,orion5x-88f5182", "marvell,orion5x";
20
21 memory {
22 reg = <0x00000000 0x4000000>; /* 64 MB */
23 };
24
25 chosen {
26 bootargs = "console=ttyS0,115200n8 earlyprintk";
27 linux,stdout-path = &uart0;
28 };
29
30 soc {
31 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>,
32 <MBUS_ID(0x09, 0x00) 0 0xf2200000 0x800>,
33 <MBUS_ID(0x01, 0x0f) 0 0xfff80000 0x80000>;
34 };
35
36 gpio-keys {
37 compatible = "gpio-keys";
38 pinctrl-0 = <&pmx_buttons>;
39 pinctrl-names = "default";
40 #address-cells = <1>;
41 #size-cells = <0>;
42 front_button {
43 label = "Front Push Button";
44 linux,code = <KEY_POWER>;
45 gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
46 };
47
48 power_rocker_sw_on {
49 label = "Power rocker switch (on|auto)";
50 linux,input-type = <5>; /* EV_SW */
51 linux,code = <1>; /* D2NET_SWITCH_POWER_ON */
52 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
53 };
54
55 power_rocker_sw_off {
56 label = "Power rocker switch (auto|off)";
57 linux,input-type = <5>; /* EV_SW */
58 linux,code = <2>; /* D2NET_SWITCH_POWER_OFF */
59 gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
60 };
61 };
62
63 regulators {
64 compatible = "simple-bus";
65 #address-cells = <1>;
66 #size-cells = <0>;
67 pinctrl-0 = <&pmx_sata0_power &pmx_sata1_power>;
68 pinctrl-names = "default";
69
70 sata0_power: regulator@0 {
71 compatible = "regulator-fixed";
72 reg = <0>;
73 regulator-name = "SATA0 Power";
74 regulator-min-microvolt = <5000000>;
75 regulator-max-microvolt = <5000000>;
76 enable-active-high;
77 regulator-always-on;
78 regulator-boot-on;
79 gpio = <&gpio0 3 GPIO_ACTIVE_HIGH>;
80 };
81
82 sata1_power: regulator@1 {
83 compatible = "regulator-fixed";
84 reg = <1>;
85 regulator-name = "SATA1 Power";
86 regulator-min-microvolt = <5000000>;
87 regulator-max-microvolt = <5000000>;
88 enable-active-high;
89 regulator-always-on;
90 regulator-boot-on;
91 gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
92 };
93 };
94};
95
96&devbus_bootcs {
97 status = "okay";
98
99 devbus,keep-config;
100
101 /*
102 * Currently the MTD code does not recognize the MX29LV400CBCT
103 * as a bottom-type device. This could cause risks of
104 * accidentally erasing critical flash sectors. We thus define
105 * a single, write-protected partition covering the whole
106 * flash. TODO: once the flash part TOP/BOTTOM detection
107 * issue is sorted out in the MTD code, break this into at
108 * least three partitions: 'u-boot code', 'u-boot environment'
109 * and 'whatever is left'.
110 */
111 flash@0 {
112 compatible = "cfi-flash";
113 reg = <0 0x80000>;
114 bank-width = <1>;
115 #address-cells = <1>;
116 #size-cells = <1>;
117
118 partition@0 {
119 label = "Full512Kb";
120 reg = <0 0x80000>;
121 read-only;
122 };
123 };
124};
125
126&mdio {
127 status = "okay";
128
129 ethphy: ethernet-phy {
130 reg = <8>;
131 };
132};
133
134&ehci0 {
135 status = "okay";
136};
137
138&eth {
139 status = "okay";
140
141 ethernet-port@0 {
142 phy-handle = <&ethphy>;
143 };
144};
145
146&i2c {
147 status = "okay";
148 clock-frequency = <100000>;
149 #address-cells = <1>;
150
151 rtc@32 {
152 compatible = "ricoh,rs5c372b";
153 reg = <0x32>;
154 };
155
156 fan@3e {
157 compatible = "gmt,g762";
158 reg = <0x3e>;
159
160 /* Not enough HW info */
161 status = "disabled";
162 };
163
164 eeprom@50 {
165 compatible = "atmel,24c08";
166 reg = <0x50>;
167 };
168};
169
170&pinctrl {
171 pinctrl-0 = <&pmx_leds &pmx_board_id &pmx_fan_fail>;
172 pinctrl-names = "default";
173
174 pmx_board_id: pmx-board-id {
175 marvell,pins = "mpp0", "mpp1", "mpp2";
176 marvell,function = "gpio";
177 };
178
179 pmx_buttons: pmx-buttons {
180 marvell,pins = "mpp8", "mpp9", "mpp18";
181 marvell,function = "gpio";
182 };
183
184 pmx_fan_fail: pmx-fan-fail {
185 marvell,pins = "mpp5";
186 marvell,function = "gpio";
187 };
188
189 /*
190 * MPP6: Red front LED
191 * MPP16: Blue front LED blink control
192 */
193 pmx_leds: pmx-leds {
194 marvell,pins = "mpp6", "mpp16";
195 marvell,function = "gpio";
196 };
197
198 pmx_sata0_led_active: pmx-sata0-led-active {
199 marvell,pins = "mpp14";
200 marvell,function = "sata0";
201 };
202
203 pmx_sata0_power: pmx-sata0-power {
204 marvell,pins = "mpp3";
205 marvell,function = "gpio";
206 };
207
208 pmx_sata1_led_active: pmx-sata1-led-active {
209 marvell,pins = "mpp15";
210 marvell,function = "sata1";
211 };
212
213 pmx_sata1_power: pmx-sata1-power {
214 marvell,pins = "mpp12";
215 marvell,function = "gpio";
216 };
217
218 /*
219 * Non MPP GPIOs:
220 * GPIO 22: USB port 1 fuse (0 = Fail, 1 = Ok)
221 * GPIO 23: Blue front LED off
222 * GPIO 24: Inhibit board power off (0 = Disabled, 1 = Enabled)
223 */
224};
225
226&sata {
227 pinctrl-0 = <&pmx_sata0_led_active
228 &pmx_sata1_led_active>;
229 pinctrl-names = "default";
230 status = "okay";
231 nr-ports = <2>;
232};
233
234&uart0 {
235 status = "okay";
236};
diff --git a/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts b/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts
index 5ed6c1376901..89ff404a528c 100644
--- a/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts
+++ b/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts
@@ -6,8 +6,19 @@
6 * warranty of any kind, whether express or implied. 6 * warranty of any kind, whether express or implied.
7 */ 7 */
8 8
9/*
10 * TODO: add Orion USB device port init when kernel.org support is added.
11 * TODO: add flash write support: see below.
12 * TODO: add power-off support.
13 * TODO: add I2C EEPROM support.
14 */
15
9/dts-v1/; 16/dts-v1/;
10/include/ "orion5x.dtsi" 17
18#include <dt-bindings/gpio/gpio.h>
19#include <dt-bindings/input/input.h>
20#include <dt-bindings/interrupt-controller/irq.h>
21#include "orion5x-mv88f5182.dtsi"
11 22
12/ { 23/ {
13 model = "LaCie Ethernet Disk mini V2"; 24 model = "LaCie Ethernet Disk mini V2";
@@ -19,49 +30,84 @@
19 30
20 chosen { 31 chosen {
21 bootargs = "console=ttyS0,115200n8 earlyprintk"; 32 bootargs = "console=ttyS0,115200n8 earlyprintk";
33 linux,stdout-path = &uart0;
22 }; 34 };
23 35
24 ocp@f1000000 { 36 soc {
25 serial@12000 { 37 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>,
26 clock-frequency = <166666667>; 38 <MBUS_ID(0x09, 0x00) 0 0xf2200000 0x800>,
27 status = "okay"; 39 <MBUS_ID(0x01, 0x0f) 0 0xfff80000 0x80000>;
28 };
29
30 sata@80000 {
31 status = "okay";
32 nr-ports = <2>;
33 };
34 }; 40 };
35 41
36 gpio_keys { 42 gpio-keys {
37 compatible = "gpio-keys"; 43 compatible = "gpio-keys";
44 pinctrl-0 = <&pmx_power_button>;
45 pinctrl-names = "default";
38 #address-cells = <1>; 46 #address-cells = <1>;
39 #size-cells = <0>; 47 #size-cells = <0>;
40 button@1 { 48 button@1 {
41 label = "Power-on Switch"; 49 label = "Power-on Switch";
42 linux,code = <116>; /* KEY_POWER */ 50 linux,code = <KEY_POWER>;
43 gpios = <&gpio0 18 0>; 51 gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
44 }; 52 };
45 }; 53 };
46 54
47 gpio_leds { 55 gpio-leds {
48 compatible = "gpio-leds"; 56 compatible = "gpio-leds";
57 pinctrl-0 = <&pmx_power_led>;
58 pinctrl-names = "default";
49 59
50 led@1 { 60 led@1 {
51 label = "power:blue"; 61 label = "power:blue";
52 gpios = <&gpio0 16 1>; 62 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
53 }; 63 };
54 }; 64 };
55}; 65};
56 66
57&mdio { 67&devbus_bootcs {
58 status = "okay"; 68 status = "okay";
59 69
60 ethphy: ethernet-phy { 70 /* Read parameters */
61 reg = <8>; 71 devbus,bus-width = <8>;
72 devbus,turn-off-ps = <90000>;
73 devbus,badr-skew-ps = <0>;
74 devbus,acc-first-ps = <186000>;
75 devbus,acc-next-ps = <186000>;
76
77 /* Write parameters */
78 devbus,wr-high-ps = <90000>;
79 devbus,wr-low-ps = <90000>;
80 devbus,ale-wr-ps = <90000>;
81
82 /*
83 * Currently the MTD code does not recognize the MX29LV400CBCT
84 * as a bottom-type device. This could cause risks of
85 * accidentally erasing critical flash sectors. We thus define
86 * a single, write-protected partition covering the whole
87 * flash. TODO: once the flash part TOP/BOTTOM detection
88 * issue is sorted out in the MTD code, break this into at
89 * least three partitions: 'u-boot code', 'u-boot environment'
90 * and 'whatever is left'.
91 */
92 flash@0 {
93 compatible = "cfi-flash";
94 reg = <0 0x80000>;
95 bank-width = <1>;
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 partition@0 {
100 label = "Full512Kb";
101 reg = <0 0x80000>;
102 read-only;
103 };
62 }; 104 };
63}; 105};
64 106
107&ehci0 {
108 status = "okay";
109};
110
65&eth { 111&eth {
66 status = "okay"; 112 status = "okay";
67 113
@@ -69,3 +115,60 @@
69 phy-handle = <&ethphy>; 115 phy-handle = <&ethphy>;
70 }; 116 };
71}; 117};
118
119&i2c {
120 status = "okay";
121 clock-frequency = <100000>;
122 #address-cells = <1>;
123
124 rtc@32 {
125 compatible = "ricoh,rs5c372a";
126 reg = <0x32>;
127 interrupt-parent = <&gpio0>;
128 interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
129 };
130};
131
132&mdio {
133 status = "okay";
134
135 ethphy: ethernet-phy {
136 reg = <8>;
137 };
138};
139
140&pinctrl {
141 pinctrl-0 = <&pmx_rtc &pmx_power_led_ctrl>;
142 pinctrl-names = "default";
143
144 pmx_power_button: pmx-power-button {
145 marvell,pins = "mpp18";
146 marvell,function = "gpio";
147 };
148
149 pmx_power_led: pmx-power-led {
150 marvell,pins = "mpp16";
151 marvell,function = "gpio";
152 };
153
154 pmx_power_led_ctrl: pmx-power-led-ctrl {
155 marvell,pins = "mpp17";
156 marvell,function = "gpio";
157 };
158
159 pmx_rtc: pmx-rtc {
160 marvell,pins = "mpp3";
161 marvell,function = "gpio";
162 };
163};
164
165&sata {
166 pinctrl-0 = <&pmx_sata0 &pmx_sata1>;
167 pinctrl-names = "default";
168 status = "okay";
169 nr-ports = <2>;
170};
171
172&uart0 {
173 status = "okay";
174};
diff --git a/arch/arm/boot/dts/orion5x-maxtor-shared-storage-2.dts b/arch/arm/boot/dts/orion5x-maxtor-shared-storage-2.dts
new file mode 100644
index 000000000000..ff3484904294
--- /dev/null
+++ b/arch/arm/boot/dts/orion5x-maxtor-shared-storage-2.dts
@@ -0,0 +1,178 @@
1/*
2 * Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 * Copyright (C) Sylver Bruneau <sylver.bruneau@googlemail.com>
4 *
5 * This file is licensed under the terms of the GNU General Public
6 * License version 2. This program is licensed "as is" without any
7 * warranty of any kind, whether express or implied.
8 */
9
10/dts-v1/;
11
12#include <dt-bindings/gpio/gpio.h>
13#include <dt-bindings/input/input.h>
14#include <dt-bindings/interrupt-controller/irq.h>
15#include "orion5x-mv88f5182.dtsi"
16
17/ {
18 model = "Maxtor Shared Storage II";
19 compatible = "maxtor,shared-storage-2", "marvell,orion5x-88f5182", "marvell,orion5x";
20
21 memory {
22 reg = <0x00000000 0x4000000>; /* 64 MB */
23 };
24
25 chosen {
26 bootargs = "console=ttyS0,115200n8 earlyprintk";
27 linux,stdout-path = &uart0;
28 };
29
30 soc {
31 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>,
32 <MBUS_ID(0x09, 0x00) 0 0xf2200000 0x800>,
33 <MBUS_ID(0x01, 0x0f) 0 0xff800000 0x40000>;
34 };
35
36 gpio-keys {
37 compatible = "gpio-keys";
38 pinctrl-0 = <&pmx_buttons>;
39 pinctrl-names = "default";
40 #address-cells = <1>;
41 #size-cells = <0>;
42 power {
43 label = "Power";
44 linux,code = <KEY_POWER>;
45 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
46 };
47
48 reset {
49 label = "Reset";
50 linux,code = <KEY_RESTART>;
51 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
52 };
53 };
54};
55
56&devbus_bootcs {
57 status = "okay";
58
59 devbus,keep-config;
60
61 /*
62 * Currently the MTD code does not recognize the MX29LV400CBCT
63 * as a bottom-type device. This could cause risks of
64 * accidentally erasing critical flash sectors. We thus define
65 * a single, write-protected partition covering the whole
66 * flash. TODO: once the flash part TOP/BOTTOM detection
67 * issue is sorted out in the MTD code, break this into at
68 * least three partitions: 'u-boot code', 'u-boot environment'
69 * and 'whatever is left'.
70 */
71 flash@0 {
72 compatible = "cfi-flash";
73 reg = <0 0x40000>;
74 bank-width = <1>;
75 #address-cells = <1>;
76 #size-cells = <1>;
77 };
78};
79
80&mdio {
81 status = "okay";
82
83 ethphy: ethernet-phy {
84 reg = <8>;
85 };
86};
87
88&ehci0 {
89 status = "okay";
90};
91
92&eth {
93 status = "okay";
94
95 ethernet-port@0 {
96 phy-handle = <&ethphy>;
97 };
98};
99
100&i2c {
101 status = "okay";
102 clock-frequency = <100000>;
103 #address-cells = <1>;
104
105 rtc@68 {
106 compatible = "st,m41t81";
107 reg = <0x68>;
108 pinctrl-0 = <&pmx_rtc>;
109 pinctrl-names = "default";
110 interrupt-parent = <&gpio0>;
111 interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
112 };
113};
114
115&pinctrl {
116 pinctrl-0 = <&pmx_leds &pmx_misc>;
117 pinctrl-names = "default";
118
119 pmx_buttons: pmx-buttons {
120 marvell,pins = "mpp11", "mpp12";
121 marvell,function = "gpio";
122 };
123
124 /*
125 * MPP0: Power LED
126 * MPP1: Error LED
127 */
128 pmx_leds: pmx-leds {
129 marvell,pins = "mpp0", "mpp1";
130 marvell,function = "gpio";
131 };
132
133 /*
134 * MPP4: HDD ind. (Single/Dual)
135 * MPP5: HD0 5V control
136 * MPP6: HD0 12V control
137 * MPP7: HD1 5V control
138 * MPP8: HD1 12V control
139 */
140 pmx_misc: pmx-misc {
141 marvell,pins = "mpp4", "mpp5", "mpp6", "mpp7", "mpp8", "mpp10";
142 marvell,function = "gpio";
143 };
144
145 pmx_rtc: pmx-rtc {
146 marvell,pins = "mpp3";
147 marvell,function = "gpio";
148 };
149
150 pmx_sata0_led_active: pmx-sata0-led-active {
151 marvell,pins = "mpp14";
152 marvell,function = "sata0";
153 };
154
155 pmx_sata1_led_active: pmx-sata1-led-active {
156 marvell,pins = "mpp15";
157 marvell,function = "sata1";
158 };
159
160 /*
161 * Non MPP GPIOs:
162 * GPIO 22: USB port 1 fuse (0 = Fail, 1 = Ok)
163 * GPIO 23: Blue front LED off
164 * GPIO 24: Inhibit board power off (0 = Disabled, 1 = Enabled)
165 */
166};
167
168&sata {
169 pinctrl-0 = <&pmx_sata0_led_active
170 &pmx_sata1_led_active>;
171 pinctrl-names = "default";
172 status = "okay";
173 nr-ports = <2>;
174};
175
176&uart0 {
177 status = "okay";
178};
diff --git a/arch/arm/boot/dts/orion5x-mv88f5182.dtsi b/arch/arm/boot/dts/orion5x-mv88f5182.dtsi
new file mode 100644
index 000000000000..d1ed71c60209
--- /dev/null
+++ b/arch/arm/boot/dts/orion5x-mv88f5182.dtsi
@@ -0,0 +1,45 @@
1/*
2 * Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#include "orion5x.dtsi"
10
11/ {
12 compatible = "marvell,orion5x-88f5182", "marvell,orion5x";
13
14 soc {
15 compatible = "marvell,orion5x-88f5182-mbus", "simple-bus";
16
17 internal-regs {
18 pinctrl: pinctrl@10000 {
19 compatible = "marvell,88f5182-pinctrl";
20 reg = <0x10000 0x8>, <0x10050 0x4>;
21
22 pmx_sata0: pmx-sata0 {
23 marvell,pins = "mpp12", "mpp14";
24 marvell,function = "sata0";
25 };
26
27 pmx_sata1: pmx-sata1 {
28 marvell,pins = "mpp13", "mpp15";
29 marvell,function = "sata1";
30 };
31 };
32
33 core_clk: core-clocks@10030 {
34 compatible = "marvell,mv88f5182-core-clock";
35 reg = <0x10010 0x4>;
36 #clock-cells = <1>;
37 };
38
39 mbusc: mbus-controller@20000 {
40 compatible = "marvell,mbus-controller";
41 reg = <0x20000 0x100>, <0x1500 0x20>;
42 };
43 };
44 };
45};
diff --git a/arch/arm/boot/dts/orion5x-rd88f5182-nas.dts b/arch/arm/boot/dts/orion5x-rd88f5182-nas.dts
new file mode 100644
index 000000000000..6fb052507b36
--- /dev/null
+++ b/arch/arm/boot/dts/orion5x-rd88f5182-nas.dts
@@ -0,0 +1,177 @@
1/*
2 * Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9/dts-v1/;
10
11#include <dt-bindings/gpio/gpio.h>
12#include "orion5x-mv88f5182.dtsi"
13
14/ {
15 model = "Marvell Reference Design 88F5182 NAS";
16 compatible = "marvell,rd-88f5182-nas", "marvell,orion5x-88f5182", "marvell,orion5x";
17
18 memory {
19 reg = <0x00000000 0x4000000>; /* 64 MB */
20 };
21
22 chosen {
23 bootargs = "console=ttyS0,115200n8 earlyprintk";
24 linux,stdout-path = &uart0;
25 };
26
27 soc {
28 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>,
29 <MBUS_ID(0x09, 0x00) 0 0xf2200000 0x800>,
30 <MBUS_ID(0x01, 0x0f) 0 0xf4000000 0x80000>,
31 <MBUS_ID(0x01, 0x1d) 0 0xfc000000 0x1000000>;
32 };
33
34 gpio-leds {
35 compatible = "gpio-leds";
36 pinctrl-0 = <&pmx_debug_led>;
37 pinctrl-names = "default";
38
39 led@0 {
40 label = "rd88f5182:cpu";
41 linux,default-trigger = "heartbeat";
42 gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
43 };
44 };
45};
46
47&devbus_bootcs {
48 status = "okay";
49
50 /* Read parameters */
51 devbus,bus-width = <8>;
52 devbus,turn-off-ps = <90000>;
53 devbus,badr-skew-ps = <0>;
54 devbus,acc-first-ps = <186000>;
55 devbus,acc-next-ps = <186000>;
56
57 /* Write parameters */
58 devbus,wr-high-ps = <90000>;
59 devbus,wr-low-ps = <90000>;
60 devbus,ale-wr-ps = <90000>;
61
62 flash@0 {
63 compatible = "cfi-flash";
64 reg = <0 0x80000>;
65 bank-width = <1>;
66 };
67};
68
69&devbus_cs1 {
70 status = "okay";
71
72 /* Read parameters */
73 devbus,bus-width = <8>;
74 devbus,turn-off-ps = <90000>;
75 devbus,badr-skew-ps = <0>;
76 devbus,acc-first-ps = <186000>;
77 devbus,acc-next-ps = <186000>;
78
79 /* Write parameters */
80 devbus,wr-high-ps = <90000>;
81 devbus,wr-low-ps = <90000>;
82 devbus,ale-wr-ps = <90000>;
83
84 flash@0 {
85 compatible = "cfi-flash";
86 reg = <0 0x1000000>;
87 bank-width = <1>;
88 };
89};
90
91&ehci0 {
92 status = "okay";
93};
94
95&ehci1 {
96 status = "okay";
97};
98
99&eth {
100 status = "okay";
101
102 ethernet-port@0 {
103 phy-handle = <&ethphy>;
104 };
105};
106
107&i2c {
108 status = "okay";
109 clock-frequency = <100000>;
110 #address-cells = <1>;
111
112 rtc@68 {
113 pinctrl-0 = <&pmx_rtc>;
114 pinctrl-names = "default";
115 compatible = "dallas,ds1338";
116 reg = <0x68>;
117 };
118};
119
120&mdio {
121 status = "okay";
122
123 ethphy: ethernet-phy {
124 reg = <8>;
125 };
126};
127
128&pinctrl {
129 pinctrl-0 = <&pmx_reset_switch &pmx_misc_gpios
130 &pmx_pci_gpios>;
131 pinctrl-names = "default";
132
133 /*
134 * MPP[20] PCI Clock to MV88F5182
135 * MPP[21] PCI Clock to mini PCI CON11
136 * MPP[22] USB 0 over current indication
137 * MPP[23] USB 1 over current indication
138 * MPP[24] USB 1 over current enable
139 * MPP[25] USB 0 over current enable
140 */
141
142 pmx_debug_led: pmx-debug_led {
143 marvell,pins = "mpp0";
144 marvell,function = "gpio";
145 };
146
147 pmx_reset_switch: pmx-reset-switch {
148 marvell,pins = "mpp1";
149 marvell,function = "gpio";
150 };
151
152 pmx_rtc: pmx-rtc {
153 marvell,pins = "mpp3";
154 marvell,function = "gpio";
155 };
156
157 pmx_misc_gpios: pmx-misc-gpios {
158 marvell,pins = "mpp4", "mpp5";
159 marvell,function = "gpio";
160 };
161
162 pmx_pci_gpios: pmx-pci-gpios {
163 marvell,pins = "mpp6", "mpp7";
164 marvell,function = "gpio";
165 };
166};
167
168&sata {
169 pinctrl-0 = <&pmx_sata0 &pmx_sata1>;
170 pinctrl-names = "default";
171 status = "okay";
172 nr-ports = <2>;
173};
174
175&uart0 {
176 status = "okay";
177};
diff --git a/arch/arm/boot/dts/orion5x.dtsi b/arch/arm/boot/dts/orion5x.dtsi
index 174d89241f70..75cd01bd6024 100644
--- a/arch/arm/boot/dts/orion5x.dtsi
+++ b/arch/arm/boot/dts/orion5x.dtsi
@@ -6,7 +6,9 @@
6 * warranty of any kind, whether express or implied. 6 * warranty of any kind, whether express or implied.
7 */ 7 */
8 8
9/include/ "skeleton.dtsi" 9#include "skeleton.dtsi"
10
11#define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
10 12
11/ { 13/ {
12 model = "Marvell Orion5x SoC"; 14 model = "Marvell Orion5x SoC";
@@ -17,149 +19,214 @@
17 gpio0 = &gpio0; 19 gpio0 = &gpio0;
18 }; 20 };
19 21
20 intc: interrupt-controller { 22 soc {
21 compatible = "marvell,orion-intc"; 23 #address-cells = <2>;
22 interrupt-controller;
23 #interrupt-cells = <1>;
24 reg = <0xf1020200 0x08>;
25 };
26
27 ocp@f1000000 {
28 compatible = "simple-bus";
29 ranges = <0x00000000 0xf1000000 0x4000000
30 0xf2200000 0xf2200000 0x0000800>;
31 #address-cells = <1>;
32 #size-cells = <1>; 24 #size-cells = <1>;
25 controller = <&mbusc>;
33 26
34 gpio0: gpio@10100 { 27 devbus_bootcs: devbus-bootcs {
35 compatible = "marvell,orion-gpio"; 28 compatible = "marvell,orion-devbus";
36 #gpio-cells = <2>; 29 reg = <MBUS_ID(0xf0, 0x01) 0x1046C 0x4>;
37 gpio-controller; 30 ranges = <0 MBUS_ID(0x01, 0x0f) 0 0xffffffff>;
38 reg = <0x10100 0x40>;
39 ngpios = <32>;
40 interrupt-controller;
41 #interrupt-cells = <2>;
42 interrupts = <6>, <7>, <8>, <9>;
43 };
44
45 spi@10600 {
46 compatible = "marvell,orion-spi";
47 #address-cells = <1>; 31 #address-cells = <1>;
48 #size-cells = <0>; 32 #size-cells = <1>;
49 cell-index = <0>; 33 clocks = <&core_clk 0>;
50 reg = <0x10600 0x28>;
51 status = "disabled"; 34 status = "disabled";
52 }; 35 };
53 36
54 i2c@11000 { 37 devbus_cs0: devbus-cs0 {
55 compatible = "marvell,mv64xxx-i2c"; 38 compatible = "marvell,orion-devbus";
56 reg = <0x11000 0x20>; 39 reg = <MBUS_ID(0xf0, 0x01) 0x1045C 0x4>;
40 ranges = <0 MBUS_ID(0x01, 0x1e) 0 0xffffffff>;
57 #address-cells = <1>; 41 #address-cells = <1>;
58 #size-cells = <0>; 42 #size-cells = <1>;
59 interrupts = <5>; 43 clocks = <&core_clk 0>;
60 clock-frequency = <100000>;
61 status = "disabled"; 44 status = "disabled";
62 }; 45 };
63 46
64 serial@12000 { 47 devbus_cs1: devbus-cs1 {
65 compatible = "ns16550a"; 48 compatible = "marvell,orion-devbus";
66 reg = <0x12000 0x100>; 49 reg = <MBUS_ID(0xf0, 0x01) 0x10460 0x4>;
67 reg-shift = <2>; 50 ranges = <0 MBUS_ID(0x01, 0x1d) 0 0xffffffff>;
68 interrupts = <3>; 51 #address-cells = <1>;
69 /* set clock-frequency in board dts */ 52 #size-cells = <1>;
53 clocks = <&core_clk 0>;
70 status = "disabled"; 54 status = "disabled";
71 }; 55 };
72 56
73 serial@12100 { 57 devbus_cs2: devbus-cs2 {
74 compatible = "ns16550a"; 58 compatible = "marvell,orion-devbus";
75 reg = <0x12100 0x100>; 59 reg = <MBUS_ID(0xf0, 0x01) 0x10464 0x4>;
76 reg-shift = <2>; 60 ranges = <0 MBUS_ID(0x01, 0x1b) 0 0xffffffff>;
77 interrupts = <4>; 61 #address-cells = <1>;
78 /* set clock-frequency in board dts */ 62 #size-cells = <1>;
63 clocks = <&core_clk 0>;
79 status = "disabled"; 64 status = "disabled";
80 }; 65 };
81 66
82 wdt@20300 { 67 internal-regs {
83 compatible = "marvell,orion-wdt"; 68 compatible = "simple-bus";
84 reg = <0x20300 0x28>; 69 #address-cells = <1>;
85 status = "okay"; 70 #size-cells = <1>;
86 }; 71 ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>;
72
73 gpio0: gpio@10100 {
74 compatible = "marvell,orion-gpio";
75 #gpio-cells = <2>;
76 gpio-controller;
77 reg = <0x10100 0x40>;
78 ngpios = <32>;
79 interrupt-controller;
80 #interrupt-cells = <2>;
81 interrupts = <6>, <7>, <8>, <9>;
82 };
87 83
88 ehci@50000 { 84 spi: spi@10600 {
89 compatible = "marvell,orion-ehci"; 85 compatible = "marvell,orion-spi";
90 reg = <0x50000 0x1000>; 86 #address-cells = <1>;
91 interrupts = <17>; 87 #size-cells = <0>;
92 status = "disabled"; 88 cell-index = <0>;
93 }; 89 reg = <0x10600 0x28>;
90 status = "disabled";
91 };
94 92
95 xor@60900 { 93 i2c: i2c@11000 {
96 compatible = "marvell,orion-xor"; 94 compatible = "marvell,mv64xxx-i2c";
97 reg = <0x60900 0x100 95 reg = <0x11000 0x20>;
98 0x60b00 0x100>; 96 #address-cells = <1>;
99 status = "okay"; 97 #size-cells = <0>;
98 interrupts = <5>;
99 clocks = <&core_clk 0>;
100 status = "disabled";
101 };
100 102
101 xor00 { 103 uart0: serial@12000 {
102 interrupts = <30>; 104 compatible = "ns16550a";
103 dmacap,memcpy; 105 reg = <0x12000 0x100>;
104 dmacap,xor; 106 reg-shift = <2>;
107 interrupts = <3>;
108 clocks = <&core_clk 0>;
109 status = "disabled";
105 }; 110 };
106 xor01 { 111
107 interrupts = <31>; 112 uart1: serial@12100 {
108 dmacap,memcpy; 113 compatible = "ns16550a";
109 dmacap,xor; 114 reg = <0x12100 0x100>;
110 dmacap,memset; 115 reg-shift = <2>;
116 interrupts = <4>;
117 clocks = <&core_clk 0>;
118 status = "disabled";
111 }; 119 };
112 };
113 120
114 eth: ethernet-controller@72000 { 121 bridge_intc: bridge-interrupt-ctrl@20110 {
115 compatible = "marvell,orion-eth"; 122 compatible = "marvell,orion-bridge-intc";
116 #address-cells = <1>; 123 interrupt-controller;
117 #size-cells = <0>; 124 #interrupt-cells = <1>;
118 reg = <0x72000 0x4000>; 125 reg = <0x20110 0x8>;
119 marvell,tx-checksum-limit = <1600>; 126 interrupts = <0>;
120 status = "disabled"; 127 marvell,#interrupts = <4>;
128 };
121 129
122 ethernet-port@0 { 130 intc: interrupt-controller@20200 {
123 compatible = "marvell,orion-eth-port"; 131 compatible = "marvell,orion-intc";
124 reg = <0>; 132 interrupt-controller;
125 /* overwrite MAC address in bootloader */ 133 #interrupt-cells = <1>;
126 local-mac-address = [00 00 00 00 00 00]; 134 reg = <0x20200 0x08>;
127 /* set phy-handle property in board file */
128 }; 135 };
129 };
130 136
131 mdio: mdio-bus@72004 { 137 timer: timer@20300 {
132 compatible = "marvell,orion-mdio"; 138 compatible = "marvell,orion-timer";
133 #address-cells = <1>; 139 reg = <0x20300 0x20>;
134 #size-cells = <0>; 140 interrupt-parent = <&bridge_intc>;
135 reg = <0x72004 0x84>; 141 interrupts = <1>, <2>;
136 interrupts = <22>; 142 clocks = <&core_clk 0>;
137 status = "disabled"; 143 };
138 144
139 /* add phy nodes in board file */ 145 wdt: wdt@20300 {
140 }; 146 compatible = "marvell,orion-wdt";
147 reg = <0x20300 0x28>;
148 interrupt-parent = <&bridge_intc>;
149 interrupts = <3>;
150 status = "okay";
151 };
141 152
142 sata@80000 { 153 ehci0: ehci@50000 {
143 compatible = "marvell,orion-sata"; 154 compatible = "marvell,orion-ehci";
144 reg = <0x80000 0x5000>; 155 reg = <0x50000 0x1000>;
145 interrupts = <29>; 156 interrupts = <17>;
146 status = "disabled"; 157 status = "disabled";
158 };
159
160 xor: dma-controller@60900 {
161 compatible = "marvell,orion-xor";
162 reg = <0x60900 0x100
163 0x60b00 0x100>;
164 status = "okay";
165
166 xor00 {
167 interrupts = <30>;
168 dmacap,memcpy;
169 dmacap,xor;
170 };
171 xor01 {
172 interrupts = <31>;
173 dmacap,memcpy;
174 dmacap,xor;
175 dmacap,memset;
176 };
177 };
178
179 eth: ethernet-controller@72000 {
180 compatible = "marvell,orion-eth";
181 #address-cells = <1>;
182 #size-cells = <0>;
183 reg = <0x72000 0x4000>;
184 marvell,tx-checksum-limit = <1600>;
185 status = "disabled";
186
187 ethport: ethernet-port@0 {
188 compatible = "marvell,orion-eth-port";
189 reg = <0>;
190 interrupts = <21>;
191 /* overwrite MAC address in bootloader */
192 local-mac-address = [00 00 00 00 00 00];
193 /* set phy-handle property in board file */
194 };
195 };
196
197 mdio: mdio-bus@72004 {
198 compatible = "marvell,orion-mdio";
199 #address-cells = <1>;
200 #size-cells = <0>;
201 reg = <0x72004 0x84>;
202 interrupts = <22>;
203 status = "disabled";
204
205 /* add phy nodes in board file */
206 };
207
208 sata: sata@80000 {
209 compatible = "marvell,orion-sata";
210 reg = <0x80000 0x5000>;
211 interrupts = <29>;
212 status = "disabled";
213 };
214
215 ehci1: ehci@a0000 {
216 compatible = "marvell,orion-ehci";
217 reg = <0xa0000 0x1000>;
218 interrupts = <12>;
219 status = "disabled";
220 };
147 }; 221 };
148 222
149 crypto@90000 { 223 cesa: crypto@90000 {
150 compatible = "marvell,orion-crypto"; 224 compatible = "marvell,orion-crypto";
151 reg = <0x90000 0x10000>, 225 reg = <MBUS_ID(0xf0, 0x01) 0x90000 0x10000>,
152 <0xf2200000 0x800>; 226 <MBUS_ID(0x09, 0x00) 0x0 0x800>;
153 reg-names = "regs", "sram"; 227 reg-names = "regs", "sram";
154 interrupts = <28>; 228 interrupts = <28>;
155 status = "okay"; 229 status = "okay";
156 }; 230 };
157
158 ehci@a0000 {
159 compatible = "marvell,orion-ehci";
160 reg = <0xa0000 0x1000>;
161 interrupts = <12>;
162 status = "disabled";
163 };
164 }; 231 };
165}; 232};
diff --git a/arch/arm/boot/dts/prima2.dtsi b/arch/arm/boot/dts/prima2.dtsi
index 1e82571d6823..963b7e54ab15 100644
--- a/arch/arm/boot/dts/prima2.dtsi
+++ b/arch/arm/boot/dts/prima2.dtsi
@@ -48,7 +48,7 @@
48 ranges = <0x40000000 0x40000000 0x80000000>; 48 ranges = <0x40000000 0x40000000 0x80000000>;
49 49
50 l2-cache-controller@80040000 { 50 l2-cache-controller@80040000 {
51 compatible = "arm,pl310-cache", "sirf,prima2-pl310-cache"; 51 compatible = "arm,pl310-cache";
52 reg = <0x80040000 0x1000>; 52 reg = <0x80040000 0x1000>;
53 interrupts = <59>; 53 interrupts = <59>;
54 arm,tag-latency = <1 1 1>; 54 arm,tag-latency = <1 1 1>;
@@ -201,6 +201,7 @@
201 compatible = "sirf,prima2-tick"; 201 compatible = "sirf,prima2-tick";
202 reg = <0xb0020000 0x1000>; 202 reg = <0xb0020000 0x1000>;
203 interrupts = <0>; 203 interrupts = <0>;
204 clocks = <&clks 11>;
204 }; 205 };
205 206
206 nand@b0030000 { 207 nand@b0030000 {
@@ -313,8 +314,9 @@
313 reg = <0xb00d0000 0x10000>; 314 reg = <0xb00d0000 0x10000>;
314 interrupts = <15>; 315 interrupts = <15>;
315 sirf,spi-num-chipselects = <1>; 316 sirf,spi-num-chipselects = <1>;
316 sirf,spi-dma-rx-channel = <25>; 317 dmas = <&dmac1 9>,
317 sirf,spi-dma-tx-channel = <20>; 318 <&dmac1 4>;
319 dma-names = "rx", "tx";
318 #address-cells = <1>; 320 #address-cells = <1>;
319 #size-cells = <0>; 321 #size-cells = <0>;
320 clocks = <&clks 19>; 322 clocks = <&clks 19>;
@@ -327,8 +329,9 @@
327 reg = <0xb0170000 0x10000>; 329 reg = <0xb0170000 0x10000>;
328 interrupts = <16>; 330 interrupts = <16>;
329 sirf,spi-num-chipselects = <1>; 331 sirf,spi-num-chipselects = <1>;
330 sirf,spi-dma-rx-channel = <12>; 332 dmas = <&dmac0 12>,
331 sirf,spi-dma-tx-channel = <13>; 333 <&dmac0 13>;
334 dma-names = "rx", "tx";
332 #address-cells = <1>; 335 #address-cells = <1>;
333 #size-cells = <0>; 336 #size-cells = <0>;
334 clocks = <&clks 20>; 337 clocks = <&clks 20>;
diff --git a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
new file mode 100644
index 000000000000..7c2441d526bc
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
@@ -0,0 +1,16 @@
1#include "qcom-apq8064-v2.0.dtsi"
2
3/ {
4 model = "Qualcomm APQ8064/IFC6410";
5 compatible = "qcom,apq8064-ifc6410", "qcom,apq8064";
6
7 soc {
8 gsbi@16600000 {
9 status = "ok";
10 qcom,mode = <GSBI_PROT_I2C_UART>;
11 serial@16640000 {
12 status = "ok";
13 };
14 };
15 };
16};
diff --git a/arch/arm/boot/dts/qcom-apq8064-v2.0.dtsi b/arch/arm/boot/dts/qcom-apq8064-v2.0.dtsi
new file mode 100644
index 000000000000..935c3945fc5e
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-apq8064-v2.0.dtsi
@@ -0,0 +1 @@
#include "qcom-apq8064.dtsi"
diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
new file mode 100644
index 000000000000..92bf793622c3
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -0,0 +1,170 @@
1/dts-v1/;
2
3#include "skeleton.dtsi"
4#include <dt-bindings/clock/qcom,gcc-msm8960.h>
5#include <dt-bindings/soc/qcom,gsbi.h>
6
7/ {
8 model = "Qualcomm APQ8064";
9 compatible = "qcom,apq8064";
10 interrupt-parent = <&intc>;
11
12 cpus {
13 #address-cells = <1>;
14 #size-cells = <0>;
15
16 cpu@0 {
17 compatible = "qcom,krait";
18 enable-method = "qcom,kpss-acc-v1";
19 device_type = "cpu";
20 reg = <0>;
21 next-level-cache = <&L2>;
22 qcom,acc = <&acc0>;
23 qcom,saw = <&saw0>;
24 };
25
26 cpu@1 {
27 compatible = "qcom,krait";
28 enable-method = "qcom,kpss-acc-v1";
29 device_type = "cpu";
30 reg = <1>;
31 next-level-cache = <&L2>;
32 qcom,acc = <&acc1>;
33 qcom,saw = <&saw1>;
34 };
35
36 cpu@2 {
37 compatible = "qcom,krait";
38 enable-method = "qcom,kpss-acc-v1";
39 device_type = "cpu";
40 reg = <2>;
41 next-level-cache = <&L2>;
42 qcom,acc = <&acc2>;
43 qcom,saw = <&saw2>;
44 };
45
46 cpu@3 {
47 compatible = "qcom,krait";
48 enable-method = "qcom,kpss-acc-v1";
49 device_type = "cpu";
50 reg = <3>;
51 next-level-cache = <&L2>;
52 qcom,acc = <&acc3>;
53 qcom,saw = <&saw3>;
54 };
55
56 L2: l2-cache {
57 compatible = "cache";
58 cache-level = <2>;
59 };
60 };
61
62 cpu-pmu {
63 compatible = "qcom,krait-pmu";
64 interrupts = <1 10 0x304>;
65 };
66
67 soc: soc {
68 #address-cells = <1>;
69 #size-cells = <1>;
70 ranges;
71 compatible = "simple-bus";
72
73 intc: interrupt-controller@2000000 {
74 compatible = "qcom,msm-qgic2";
75 interrupt-controller;
76 #interrupt-cells = <3>;
77 reg = <0x02000000 0x1000>,
78 <0x02002000 0x1000>;
79 };
80
81 timer@200a000 {
82 compatible = "qcom,kpss-timer", "qcom,msm-timer";
83 interrupts = <1 1 0x301>,
84 <1 2 0x301>,
85 <1 3 0x301>;
86 reg = <0x0200a000 0x100>;
87 clock-frequency = <27000000>,
88 <32768>;
89 cpu-offset = <0x80000>;
90 };
91
92 acc0: clock-controller@2088000 {
93 compatible = "qcom,kpss-acc-v1";
94 reg = <0x02088000 0x1000>, <0x02008000 0x1000>;
95 };
96
97 acc1: clock-controller@2098000 {
98 compatible = "qcom,kpss-acc-v1";
99 reg = <0x02098000 0x1000>, <0x02008000 0x1000>;
100 };
101
102 acc2: clock-controller@20a8000 {
103 compatible = "qcom,kpss-acc-v1";
104 reg = <0x020a8000 0x1000>, <0x02008000 0x1000>;
105 };
106
107 acc3: clock-controller@20b8000 {
108 compatible = "qcom,kpss-acc-v1";
109 reg = <0x020b8000 0x1000>, <0x02008000 0x1000>;
110 };
111
112 saw0: regulator@2089000 {
113 compatible = "qcom,saw2";
114 reg = <0x02089000 0x1000>, <0x02009000 0x1000>;
115 regulator;
116 };
117
118 saw1: regulator@2099000 {
119 compatible = "qcom,saw2";
120 reg = <0x02099000 0x1000>, <0x02009000 0x1000>;
121 regulator;
122 };
123
124 saw2: regulator@20a9000 {
125 compatible = "qcom,saw2";
126 reg = <0x020a9000 0x1000>, <0x02009000 0x1000>;
127 regulator;
128 };
129
130 saw3: regulator@20b9000 {
131 compatible = "qcom,saw2";
132 reg = <0x020b9000 0x1000>, <0x02009000 0x1000>;
133 regulator;
134 };
135
136 gsbi7: gsbi@16600000 {
137 status = "disabled";
138 compatible = "qcom,gsbi-v1.0.0";
139 reg = <0x16600000 0x100>;
140 clocks = <&gcc GSBI7_H_CLK>;
141 clock-names = "iface";
142 #address-cells = <1>;
143 #size-cells = <1>;
144 ranges;
145
146 serial@16640000 {
147 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
148 reg = <0x16640000 0x1000>,
149 <0x16600000 0x1000>;
150 interrupts = <0 158 0x0>;
151 clocks = <&gcc GSBI7_UART_CLK>, <&gcc GSBI7_H_CLK>;
152 clock-names = "core", "iface";
153 status = "disabled";
154 };
155 };
156
157 qcom,ssbi@500000 {
158 compatible = "qcom,ssbi";
159 reg = <0x00500000 0x1000>;
160 qcom,controller-type = "pmic-arbiter";
161 };
162
163 gcc: clock-controller@900000 {
164 compatible = "qcom,gcc-apq8064";
165 reg = <0x00900000 0x4000>;
166 #clock-cells = <1>;
167 #reset-cells = <1>;
168 };
169 };
170};
diff --git a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
index 13ac3e222495..b4dfb01fe6fb 100644
--- a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
+++ b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
@@ -3,4 +3,43 @@
3/ { 3/ {
4 model = "Qualcomm APQ8074 Dragonboard"; 4 model = "Qualcomm APQ8074 Dragonboard";
5 compatible = "qcom,apq8074-dragonboard", "qcom,apq8074"; 5 compatible = "qcom,apq8074-dragonboard", "qcom,apq8074";
6
7 soc {
8 serial@f991e000 {
9 status = "ok";
10 };
11
12 sdhci@f9824900 {
13 bus-width = <8>;
14 non-removable;
15 status = "ok";
16 };
17
18 sdhci@f98a4900 {
19 cd-gpios = <&msmgpio 62 0x1>;
20 bus-width = <4>;
21 };
22
23
24 pinctrl@fd510000 {
25 spi8_default: spi8_default {
26 mosi {
27 pins = "gpio45";
28 function = "blsp_spi8";
29 };
30 miso {
31 pins = "gpio46";
32 function = "blsp_spi8";
33 };
34 cs {
35 pins = "gpio47";
36 function = "blsp_spi8";
37 };
38 clk {
39 pins = "gpio48";
40 function = "blsp_spi8";
41 };
42 };
43 };
44 };
6}; 45};
diff --git a/arch/arm/boot/dts/qcom-apq8084-mtp.dts b/arch/arm/boot/dts/qcom-apq8084-mtp.dts
new file mode 100644
index 000000000000..9dae3878b71d
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-apq8084-mtp.dts
@@ -0,0 +1,6 @@
1#include "qcom-apq8084.dtsi"
2
3/ {
4 model = "Qualcomm APQ 8084-MTP";
5 compatible = "qcom,apq8084-mtp", "qcom,apq8084";
6};
diff --git a/arch/arm/boot/dts/qcom-apq8084.dtsi b/arch/arm/boot/dts/qcom-apq8084.dtsi
new file mode 100644
index 000000000000..e3e009a5912b
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-apq8084.dtsi
@@ -0,0 +1,179 @@
1/dts-v1/;
2
3#include "skeleton.dtsi"
4
5/ {
6 model = "Qualcomm APQ 8084";
7 compatible = "qcom,apq8084";
8 interrupt-parent = <&intc>;
9
10 cpus {
11 #address-cells = <1>;
12 #size-cells = <0>;
13
14 cpu@0 {
15 device_type = "cpu";
16 compatible = "qcom,krait";
17 reg = <0>;
18 enable-method = "qcom,kpss-acc-v2";
19 next-level-cache = <&L2>;
20 qcom,acc = <&acc0>;
21 };
22
23 cpu@1 {
24 device_type = "cpu";
25 compatible = "qcom,krait";
26 reg = <1>;
27 enable-method = "qcom,kpss-acc-v2";
28 next-level-cache = <&L2>;
29 qcom,acc = <&acc1>;
30 };
31
32 cpu@2 {
33 device_type = "cpu";
34 compatible = "qcom,krait";
35 reg = <2>;
36 enable-method = "qcom,kpss-acc-v2";
37 next-level-cache = <&L2>;
38 qcom,acc = <&acc2>;
39 };
40
41 cpu@3 {
42 device_type = "cpu";
43 compatible = "qcom,krait";
44 reg = <3>;
45 enable-method = "qcom,kpss-acc-v2";
46 next-level-cache = <&L2>;
47 qcom,acc = <&acc3>;
48 };
49
50 L2: l2-cache {
51 compatible = "qcom,arch-cache";
52 cache-level = <2>;
53 qcom,saw = <&saw_l2>;
54 };
55 };
56
57 cpu-pmu {
58 compatible = "qcom,krait-pmu";
59 interrupts = <1 7 0xf04>;
60 };
61
62 timer {
63 compatible = "arm,armv7-timer";
64 interrupts = <1 2 0xf08>,
65 <1 3 0xf08>,
66 <1 4 0xf08>,
67 <1 1 0xf08>;
68 clock-frequency = <19200000>;
69 };
70
71 soc: soc {
72 #address-cells = <1>;
73 #size-cells = <1>;
74 ranges;
75 compatible = "simple-bus";
76
77 intc: interrupt-controller@f9000000 {
78 compatible = "qcom,msm-qgic2";
79 interrupt-controller;
80 #interrupt-cells = <3>;
81 reg = <0xf9000000 0x1000>,
82 <0xf9002000 0x1000>;
83 };
84
85 timer@f9020000 {
86 #address-cells = <1>;
87 #size-cells = <1>;
88 ranges;
89 compatible = "arm,armv7-timer-mem";
90 reg = <0xf9020000 0x1000>;
91 clock-frequency = <19200000>;
92
93 frame@f9021000 {
94 frame-number = <0>;
95 interrupts = <0 8 0x4>,
96 <0 7 0x4>;
97 reg = <0xf9021000 0x1000>,
98 <0xf9022000 0x1000>;
99 };
100
101 frame@f9023000 {
102 frame-number = <1>;
103 interrupts = <0 9 0x4>;
104 reg = <0xf9023000 0x1000>;
105 status = "disabled";
106 };
107
108 frame@f9024000 {
109 frame-number = <2>;
110 interrupts = <0 10 0x4>;
111 reg = <0xf9024000 0x1000>;
112 status = "disabled";
113 };
114
115 frame@f9025000 {
116 frame-number = <3>;
117 interrupts = <0 11 0x4>;
118 reg = <0xf9025000 0x1000>;
119 status = "disabled";
120 };
121
122 frame@f9026000 {
123 frame-number = <4>;
124 interrupts = <0 12 0x4>;
125 reg = <0xf9026000 0x1000>;
126 status = "disabled";
127 };
128
129 frame@f9027000 {
130 frame-number = <5>;
131 interrupts = <0 13 0x4>;
132 reg = <0xf9027000 0x1000>;
133 status = "disabled";
134 };
135
136 frame@f9028000 {
137 frame-number = <6>;
138 interrupts = <0 14 0x4>;
139 reg = <0xf9028000 0x1000>;
140 status = "disabled";
141 };
142 };
143
144 saw_l2: regulator@f9012000 {
145 compatible = "qcom,saw2";
146 reg = <0xf9012000 0x1000>;
147 regulator;
148 };
149
150 acc0: clock-controller@f9088000 {
151 compatible = "qcom,kpss-acc-v2";
152 reg = <0xf9088000 0x1000>,
153 <0xf9008000 0x1000>;
154 };
155
156 acc1: clock-controller@f9098000 {
157 compatible = "qcom,kpss-acc-v2";
158 reg = <0xf9098000 0x1000>,
159 <0xf9008000 0x1000>;
160 };
161
162 acc2: clock-controller@f90a8000 {
163 compatible = "qcom,kpss-acc-v2";
164 reg = <0xf90a8000 0x1000>,
165 <0xf9008000 0x1000>;
166 };
167
168 acc3: clock-controller@f90b8000 {
169 compatible = "qcom,kpss-acc-v2";
170 reg = <0xf90b8000 0x1000>,
171 <0xf9008000 0x1000>;
172 };
173
174 restart@fc4ab000 {
175 compatible = "qcom,pshold";
176 reg = <0xfc4ab000 0x4>;
177 };
178 };
179};
diff --git a/arch/arm/boot/dts/qcom-msm8660-surf.dts b/arch/arm/boot/dts/qcom-msm8660-surf.dts
index 169bad90dac9..45180adfadf1 100644
--- a/arch/arm/boot/dts/qcom-msm8660-surf.dts
+++ b/arch/arm/boot/dts/qcom-msm8660-surf.dts
@@ -3,4 +3,14 @@
3/ { 3/ {
4 model = "Qualcomm MSM8660 SURF"; 4 model = "Qualcomm MSM8660 SURF";
5 compatible = "qcom,msm8660-surf", "qcom,msm8660"; 5 compatible = "qcom,msm8660-surf", "qcom,msm8660";
6
7 soc {
8 gsbi@19c00000 {
9 status = "ok";
10 qcom,mode = <GSBI_PROT_I2C_UART>;
11 serial@19c40000 {
12 status = "ok";
13 };
14 };
15 };
6}; 16};
diff --git a/arch/arm/boot/dts/qcom-msm8660.dtsi b/arch/arm/boot/dts/qcom-msm8660.dtsi
index c52a9e964a44..53837aaa2f72 100644
--- a/arch/arm/boot/dts/qcom-msm8660.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8660.dtsi
@@ -3,6 +3,7 @@
3/include/ "skeleton.dtsi" 3/include/ "skeleton.dtsi"
4 4
5#include <dt-bindings/clock/qcom,gcc-msm8660.h> 5#include <dt-bindings/clock/qcom,gcc-msm8660.h>
6#include <dt-bindings/soc/qcom,gsbi.h>
6 7
7/ { 8/ {
8 model = "Qualcomm MSM8660"; 9 model = "Qualcomm MSM8660";
@@ -12,16 +13,18 @@
12 cpus { 13 cpus {
13 #address-cells = <1>; 14 #address-cells = <1>;
14 #size-cells = <0>; 15 #size-cells = <0>;
15 compatible = "qcom,scorpion";
16 enable-method = "qcom,gcc-msm8660";
17 16
18 cpu@0 { 17 cpu@0 {
18 compatible = "qcom,scorpion";
19 enable-method = "qcom,gcc-msm8660";
19 device_type = "cpu"; 20 device_type = "cpu";
20 reg = <0>; 21 reg = <0>;
21 next-level-cache = <&L2>; 22 next-level-cache = <&L2>;
22 }; 23 };
23 24
24 cpu@1 { 25 cpu@1 {
26 compatible = "qcom,scorpion";
27 enable-method = "qcom,gcc-msm8660";
25 device_type = "cpu"; 28 device_type = "cpu";
26 reg = <1>; 29 reg = <1>;
27 next-level-cache = <&L2>; 30 next-level-cache = <&L2>;
@@ -33,55 +36,73 @@
33 }; 36 };
34 }; 37 };
35 38
36 intc: interrupt-controller@2080000 { 39 soc: soc {
37 compatible = "qcom,msm-8660-qgic"; 40 #address-cells = <1>;
38 interrupt-controller; 41 #size-cells = <1>;
39 #interrupt-cells = <3>; 42 ranges;
40 reg = < 0x02080000 0x1000 >, 43 compatible = "simple-bus";
41 < 0x02081000 0x1000 >;
42 };
43 44
44 timer@2000000 { 45 intc: interrupt-controller@2080000 {
45 compatible = "qcom,scss-timer", "qcom,msm-timer"; 46 compatible = "qcom,msm-8660-qgic";
46 interrupts = <1 0 0x301>, 47 interrupt-controller;
47 <1 1 0x301>, 48 #interrupt-cells = <3>;
48 <1 2 0x301>; 49 reg = < 0x02080000 0x1000 >,
49 reg = <0x02000000 0x100>; 50 < 0x02081000 0x1000 >;
50 clock-frequency = <27000000>, 51 };
51 <32768>;
52 cpu-offset = <0x40000>;
53 };
54 52
55 msmgpio: gpio@800000 { 53 timer@2000000 {
56 compatible = "qcom,msm-gpio"; 54 compatible = "qcom,scss-timer", "qcom,msm-timer";
57 reg = <0x00800000 0x4000>; 55 interrupts = <1 0 0x301>,
58 gpio-controller; 56 <1 1 0x301>,
59 #gpio-cells = <2>; 57 <1 2 0x301>;
60 ngpio = <173>; 58 reg = <0x02000000 0x100>;
61 interrupts = <0 16 0x4>; 59 clock-frequency = <27000000>,
62 interrupt-controller; 60 <32768>;
63 #interrupt-cells = <2>; 61 cpu-offset = <0x40000>;
64 }; 62 };
65 63
66 gcc: clock-controller@900000 { 64 msmgpio: gpio@800000 {
67 compatible = "qcom,gcc-msm8660"; 65 compatible = "qcom,msm-gpio";
68 #clock-cells = <1>; 66 reg = <0x00800000 0x4000>;
69 #reset-cells = <1>; 67 gpio-controller;
70 reg = <0x900000 0x4000>; 68 #gpio-cells = <2>;
71 }; 69 ngpio = <173>;
70 interrupts = <0 16 0x4>;
71 interrupt-controller;
72 #interrupt-cells = <2>;
73 };
72 74
73 serial@19c40000 { 75 gcc: clock-controller@900000 {
74 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; 76 compatible = "qcom,gcc-msm8660";
75 reg = <0x19c40000 0x1000>, 77 #clock-cells = <1>;
76 <0x19c00000 0x1000>; 78 #reset-cells = <1>;
77 interrupts = <0 195 0x0>; 79 reg = <0x900000 0x4000>;
78 clocks = <&gcc GSBI12_UART_CLK>, <&gcc GSBI12_H_CLK>; 80 };
79 clock-names = "core", "iface"; 81
80 }; 82 gsbi12: gsbi@19c00000 {
83 compatible = "qcom,gsbi-v1.0.0";
84 reg = <0x19c00000 0x100>;
85 clocks = <&gcc GSBI12_H_CLK>;
86 clock-names = "iface";
87 #address-cells = <1>;
88 #size-cells = <1>;
89 ranges;
81 90
82 qcom,ssbi@500000 { 91 serial@19c40000 {
83 compatible = "qcom,ssbi"; 92 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
84 reg = <0x500000 0x1000>; 93 reg = <0x19c40000 0x1000>,
85 qcom,controller-type = "pmic-arbiter"; 94 <0x19c00000 0x1000>;
95 interrupts = <0 195 0x0>;
96 clocks = <&gcc GSBI12_UART_CLK>, <&gcc GSBI12_H_CLK>;
97 clock-names = "core", "iface";
98 status = "disabled";
99 };
100 };
101
102 qcom,ssbi@500000 {
103 compatible = "qcom,ssbi";
104 reg = <0x500000 0x1000>;
105 qcom,controller-type = "pmic-arbiter";
106 };
86 }; 107 };
87}; 108};
diff --git a/arch/arm/boot/dts/qcom-msm8960-cdp.dts b/arch/arm/boot/dts/qcom-msm8960-cdp.dts
index a58fb88315f6..8f75cc4c8340 100644
--- a/arch/arm/boot/dts/qcom-msm8960-cdp.dts
+++ b/arch/arm/boot/dts/qcom-msm8960-cdp.dts
@@ -3,4 +3,14 @@
3/ { 3/ {
4 model = "Qualcomm MSM8960 CDP"; 4 model = "Qualcomm MSM8960 CDP";
5 compatible = "qcom,msm8960-cdp", "qcom,msm8960"; 5 compatible = "qcom,msm8960-cdp", "qcom,msm8960";
6
7 soc {
8 gsbi@16400000 {
9 status = "ok";
10 qcom,mode = <GSBI_PROT_I2C_UART>;
11 serial@16440000 {
12 status = "ok";
13 };
14 };
15 };
6}; 16};
diff --git a/arch/arm/boot/dts/qcom-msm8960.dtsi b/arch/arm/boot/dts/qcom-msm8960.dtsi
index 997b7b94e117..5303e53e34dc 100644
--- a/arch/arm/boot/dts/qcom-msm8960.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8960.dtsi
@@ -3,6 +3,7 @@
3/include/ "skeleton.dtsi" 3/include/ "skeleton.dtsi"
4 4
5#include <dt-bindings/clock/qcom,gcc-msm8960.h> 5#include <dt-bindings/clock/qcom,gcc-msm8960.h>
6#include <dt-bindings/soc/qcom,gsbi.h>
6 7
7/ { 8/ {
8 model = "Qualcomm MSM8960"; 9 model = "Qualcomm MSM8960";
@@ -13,10 +14,10 @@
13 #address-cells = <1>; 14 #address-cells = <1>;
14 #size-cells = <0>; 15 #size-cells = <0>;
15 interrupts = <1 14 0x304>; 16 interrupts = <1 14 0x304>;
16 compatible = "qcom,krait";
17 enable-method = "qcom,kpss-acc-v1";
18 17
19 cpu@0 { 18 cpu@0 {
19 compatible = "qcom,krait";
20 enable-method = "qcom,kpss-acc-v1";
20 device_type = "cpu"; 21 device_type = "cpu";
21 reg = <0>; 22 reg = <0>;
22 next-level-cache = <&L2>; 23 next-level-cache = <&L2>;
@@ -25,6 +26,8 @@
25 }; 26 };
26 27
27 cpu@1 { 28 cpu@1 {
29 compatible = "qcom,krait";
30 enable-method = "qcom,kpss-acc-v1";
28 device_type = "cpu"; 31 device_type = "cpu";
29 reg = <1>; 32 reg = <1>;
30 next-level-cache = <&L2>; 33 next-level-cache = <&L2>;
@@ -35,7 +38,6 @@
35 L2: l2-cache { 38 L2: l2-cache {
36 compatible = "cache"; 39 compatible = "cache";
37 cache-level = <2>; 40 cache-level = <2>;
38 interrupts = <0 2 0x4>;
39 }; 41 };
40 }; 42 };
41 43
@@ -45,91 +47,109 @@
45 qcom,no-pc-write; 47 qcom,no-pc-write;
46 }; 48 };
47 49
48 intc: interrupt-controller@2000000 { 50 soc: soc {
49 compatible = "qcom,msm-qgic2"; 51 #address-cells = <1>;
50 interrupt-controller; 52 #size-cells = <1>;
51 #interrupt-cells = <3>; 53 ranges;
52 reg = < 0x02000000 0x1000 >, 54 compatible = "simple-bus";
53 < 0x02002000 0x1000 >; 55
54 }; 56 intc: interrupt-controller@2000000 {
57 compatible = "qcom,msm-qgic2";
58 interrupt-controller;
59 #interrupt-cells = <3>;
60 reg = <0x02000000 0x1000>,
61 <0x02002000 0x1000>;
62 };
55 63
56 timer@200a000 { 64 timer@200a000 {
57 compatible = "qcom,kpss-timer", "qcom,msm-timer"; 65 compatible = "qcom,kpss-timer", "qcom,msm-timer";
58 interrupts = <1 1 0x301>, 66 interrupts = <1 1 0x301>,
59 <1 2 0x301>, 67 <1 2 0x301>,
60 <1 3 0x301>; 68 <1 3 0x301>;
61 reg = <0x0200a000 0x100>; 69 reg = <0x0200a000 0x100>;
62 clock-frequency = <27000000>, 70 clock-frequency = <27000000>,
63 <32768>; 71 <32768>;
64 cpu-offset = <0x80000>; 72 cpu-offset = <0x80000>;
65 }; 73 };
66 74
67 msmgpio: gpio@800000 { 75 msmgpio: gpio@800000 {
68 compatible = "qcom,msm-gpio"; 76 compatible = "qcom,msm-gpio";
69 gpio-controller; 77 gpio-controller;
70 #gpio-cells = <2>; 78 #gpio-cells = <2>;
71 ngpio = <150>; 79 ngpio = <150>;
72 interrupts = <0 16 0x4>; 80 interrupts = <0 16 0x4>;
73 interrupt-controller; 81 interrupt-controller;
74 #interrupt-cells = <2>; 82 #interrupt-cells = <2>;
75 reg = <0x800000 0x4000>; 83 reg = <0x800000 0x4000>;
76 }; 84 };
77 85
78 gcc: clock-controller@900000 { 86 gcc: clock-controller@900000 {
79 compatible = "qcom,gcc-msm8960"; 87 compatible = "qcom,gcc-msm8960";
80 #clock-cells = <1>; 88 #clock-cells = <1>;
81 #reset-cells = <1>; 89 #reset-cells = <1>;
82 reg = <0x900000 0x4000>; 90 reg = <0x900000 0x4000>;
83 }; 91 };
84 92
85 clock-controller@4000000 { 93 clock-controller@4000000 {
86 compatible = "qcom,mmcc-msm8960"; 94 compatible = "qcom,mmcc-msm8960";
87 reg = <0x4000000 0x1000>; 95 reg = <0x4000000 0x1000>;
88 #clock-cells = <1>; 96 #clock-cells = <1>;
89 #reset-cells = <1>; 97 #reset-cells = <1>;
90 }; 98 };
91 99
92 acc0: clock-controller@2088000 { 100 acc0: clock-controller@2088000 {
93 compatible = "qcom,kpss-acc-v1"; 101 compatible = "qcom,kpss-acc-v1";
94 reg = <0x02088000 0x1000>, <0x02008000 0x1000>; 102 reg = <0x02088000 0x1000>, <0x02008000 0x1000>;
95 }; 103 };
96 104
97 acc1: clock-controller@2098000 { 105 acc1: clock-controller@2098000 {
98 compatible = "qcom,kpss-acc-v1"; 106 compatible = "qcom,kpss-acc-v1";
99 reg = <0x02098000 0x1000>, <0x02008000 0x1000>; 107 reg = <0x02098000 0x1000>, <0x02008000 0x1000>;
100 }; 108 };
101 109
102 saw0: regulator@2089000 { 110 saw0: regulator@2089000 {
103 compatible = "qcom,saw2"; 111 compatible = "qcom,saw2";
104 reg = <0x02089000 0x1000>, <0x02009000 0x1000>; 112 reg = <0x02089000 0x1000>, <0x02009000 0x1000>;
105 regulator; 113 regulator;
106 }; 114 };
107 115
108 saw1: regulator@2099000 { 116 saw1: regulator@2099000 {
109 compatible = "qcom,saw2"; 117 compatible = "qcom,saw2";
110 reg = <0x02099000 0x1000>, <0x02009000 0x1000>; 118 reg = <0x02099000 0x1000>, <0x02009000 0x1000>;
111 regulator; 119 regulator;
112 }; 120 };
113 121
114 serial@16440000 { 122 gsbi5: gsbi@16400000 {
115 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; 123 compatible = "qcom,gsbi-v1.0.0";
116 reg = <0x16440000 0x1000>, 124 reg = <0x16400000 0x100>;
117 <0x16400000 0x1000>; 125 clocks = <&gcc GSBI5_H_CLK>;
118 interrupts = <0 154 0x0>; 126 clock-names = "iface";
119 clocks = <&gcc GSBI5_UART_CLK>, <&gcc GSBI5_H_CLK>; 127 #address-cells = <1>;
120 clock-names = "core", "iface"; 128 #size-cells = <1>;
121 }; 129 ranges;
130
131 serial@16440000 {
132 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
133 reg = <0x16440000 0x1000>,
134 <0x16400000 0x1000>;
135 interrupts = <0 154 0x0>;
136 clocks = <&gcc GSBI5_UART_CLK>, <&gcc GSBI5_H_CLK>;
137 clock-names = "core", "iface";
138 status = "disabled";
139 };
140 };
122 141
123 qcom,ssbi@500000 { 142 qcom,ssbi@500000 {
124 compatible = "qcom,ssbi"; 143 compatible = "qcom,ssbi";
125 reg = <0x500000 0x1000>; 144 reg = <0x500000 0x1000>;
126 qcom,controller-type = "pmic-arbiter"; 145 qcom,controller-type = "pmic-arbiter";
127 }; 146 };
128 147
129 rng@1a500000 { 148 rng@1a500000 {
130 compatible = "qcom,prng"; 149 compatible = "qcom,prng";
131 reg = <0x1a500000 0x200>; 150 reg = <0x1a500000 0x200>;
132 clocks = <&gcc PRNG_CLK>; 151 clocks = <&gcc PRNG_CLK>;
133 clock-names = "core"; 152 clock-names = "core";
153 };
134 }; 154 };
135}; 155};
diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index f68723918b3f..69dca2aca25a 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -13,10 +13,10 @@
13 #address-cells = <1>; 13 #address-cells = <1>;
14 #size-cells = <0>; 14 #size-cells = <0>;
15 interrupts = <1 9 0xf04>; 15 interrupts = <1 9 0xf04>;
16 compatible = "qcom,krait";
17 enable-method = "qcom,kpss-acc-v2";
18 16
19 cpu@0 { 17 cpu@0 {
18 compatible = "qcom,krait";
19 enable-method = "qcom,kpss-acc-v2";
20 device_type = "cpu"; 20 device_type = "cpu";
21 reg = <0>; 21 reg = <0>;
22 next-level-cache = <&L2>; 22 next-level-cache = <&L2>;
@@ -24,6 +24,8 @@
24 }; 24 };
25 25
26 cpu@1 { 26 cpu@1 {
27 compatible = "qcom,krait";
28 enable-method = "qcom,kpss-acc-v2";
27 device_type = "cpu"; 29 device_type = "cpu";
28 reg = <1>; 30 reg = <1>;
29 next-level-cache = <&L2>; 31 next-level-cache = <&L2>;
@@ -31,6 +33,8 @@
31 }; 33 };
32 34
33 cpu@2 { 35 cpu@2 {
36 compatible = "qcom,krait";
37 enable-method = "qcom,kpss-acc-v2";
34 device_type = "cpu"; 38 device_type = "cpu";
35 reg = <2>; 39 reg = <2>;
36 next-level-cache = <&L2>; 40 next-level-cache = <&L2>;
@@ -38,6 +42,8 @@
38 }; 42 };
39 43
40 cpu@3 { 44 cpu@3 {
45 compatible = "qcom,krait";
46 enable-method = "qcom,kpss-acc-v2";
41 device_type = "cpu"; 47 device_type = "cpu";
42 reg = <3>; 48 reg = <3>;
43 next-level-cache = <&L2>; 49 next-level-cache = <&L2>;
@@ -47,7 +53,6 @@
47 L2: l2-cache { 53 L2: l2-cache {
48 compatible = "cache"; 54 compatible = "cache";
49 cache-level = <2>; 55 cache-level = <2>;
50 interrupts = <0 2 0x4>;
51 qcom,saw = <&saw_l2>; 56 qcom,saw = <&saw_l2>;
52 }; 57 };
53 }; 58 };
@@ -57,6 +62,15 @@
57 interrupts = <1 7 0xf04>; 62 interrupts = <1 7 0xf04>;
58 }; 63 };
59 64
65 timer {
66 compatible = "arm,armv7-timer";
67 interrupts = <1 2 0xf08>,
68 <1 3 0xf08>,
69 <1 4 0xf08>,
70 <1 1 0xf08>;
71 clock-frequency = <19200000>;
72 };
73
60 soc: soc { 74 soc: soc {
61 #address-cells = <1>; 75 #address-cells = <1>;
62 #size-cells = <1>; 76 #size-cells = <1>;
@@ -71,15 +85,6 @@
71 <0xf9002000 0x1000>; 85 <0xf9002000 0x1000>;
72 }; 86 };
73 87
74 timer {
75 compatible = "arm,armv7-timer";
76 interrupts = <1 2 0xf08>,
77 <1 3 0xf08>,
78 <1 4 0xf08>,
79 <1 1 0xf08>;
80 clock-frequency = <19200000>;
81 };
82
83 timer@f9020000 { 88 timer@f9020000 {
84 #address-cells = <1>; 89 #address-cells = <1>;
85 #size-cells = <1>; 90 #size-cells = <1>;
@@ -190,6 +195,29 @@
190 interrupts = <0 108 0x0>; 195 interrupts = <0 108 0x0>;
191 clocks = <&gcc GCC_BLSP1_UART2_APPS_CLK>, <&gcc GCC_BLSP1_AHB_CLK>; 196 clocks = <&gcc GCC_BLSP1_UART2_APPS_CLK>, <&gcc GCC_BLSP1_AHB_CLK>;
192 clock-names = "core", "iface"; 197 clock-names = "core", "iface";
198 status = "disabled";
199 };
200
201 sdhci@f9824900 {
202 compatible = "qcom,sdhci-msm-v4";
203 reg = <0xf9824900 0x11c>, <0xf9824000 0x800>;
204 reg-names = "hc_mem", "core_mem";
205 interrupts = <0 123 0>, <0 138 0>;
206 interrupt-names = "hc_irq", "pwr_irq";
207 clocks = <&gcc GCC_SDCC1_APPS_CLK>, <&gcc GCC_SDCC1_AHB_CLK>;
208 clock-names = "core", "iface";
209 status = "disabled";
210 };
211
212 sdhci@f98a4900 {
213 compatible = "qcom,sdhci-msm-v4";
214 reg = <0xf98a4900 0x11c>, <0xf98a4000 0x800>;
215 reg-names = "hc_mem", "core_mem";
216 interrupts = <0 125 0>, <0 221 0>;
217 interrupt-names = "hc_irq", "pwr_irq";
218 clocks = <&gcc GCC_SDCC2_APPS_CLK>, <&gcc GCC_SDCC2_AHB_CLK>;
219 clock-names = "core", "iface";
220 status = "disabled";
193 }; 221 };
194 222
195 rng@f9bff000 { 223 rng@f9bff000 {
@@ -198,5 +226,15 @@
198 clocks = <&gcc GCC_PRNG_AHB_CLK>; 226 clocks = <&gcc GCC_PRNG_AHB_CLK>;
199 clock-names = "core"; 227 clock-names = "core";
200 }; 228 };
229
230 msmgpio: pinctrl@fd510000 {
231 compatible = "qcom,msm8974-pinctrl";
232 reg = <0xfd510000 0x4000>;
233 gpio-controller;
234 #gpio-cells = <2>;
235 interrupt-controller;
236 #interrupt-cells = <2>;
237 interrupts = <0 208 0>;
238 };
201 }; 239 };
202}; 240};
diff --git a/arch/arm/boot/dts/r7s72100-genmai-reference.dts b/arch/arm/boot/dts/r7s72100-genmai-reference.dts
deleted file mode 100644
index e664611a47c8..000000000000
--- a/arch/arm/boot/dts/r7s72100-genmai-reference.dts
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 * Device Tree Source for the Genmai 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 "r7s72100.dtsi"
13
14/ {
15 model = "Genmai";
16 compatible = "renesas,genmai-reference", "renesas,r7s72100";
17
18 chosen {
19 bootargs = "console=ttySC2,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
20 };
21
22 memory {
23 device_type = "memory";
24 reg = <0x08000000 0x08000000>;
25 };
26
27 lbsc {
28 #address-cells = <1>;
29 #size-cells = <1>;
30 };
31};
32
33&i2c2 {
34 status = "okay";
35 clock-frequency = <400000>;
36
37 eeprom@50 {
38 compatible = "renesas,24c128";
39 reg = <0x50>;
40 pagesize = <64>;
41 };
42};
diff --git a/arch/arm/boot/dts/r7s72100-genmai.dts b/arch/arm/boot/dts/r7s72100-genmai.dts
index b1deaf7e2e06..56849b55e1c2 100644
--- a/arch/arm/boot/dts/r7s72100-genmai.dts
+++ b/arch/arm/boot/dts/r7s72100-genmai.dts
@@ -1,7 +1,8 @@
1/* 1/*
2 * Device Tree Source for the Genmai board 2 * Device Tree Source for the Genmai board
3 * 3 *
4 * Copyright (C) 2013 Renesas Solutions Corp. 4 * Copyright (C) 2013-14 Renesas Solutions Corp.
5 * Copyright (C) 2014 Wolfram Sang, Sang Engineering <wsa@sang-engineering.com>
5 * 6 *
6 * This file is licensed under the terms of the GNU General Public License 7 * 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 * version 2. This program is licensed "as is" without any warranty of any
@@ -15,6 +16,10 @@
15 model = "Genmai"; 16 model = "Genmai";
16 compatible = "renesas,genmai", "renesas,r7s72100"; 17 compatible = "renesas,genmai", "renesas,r7s72100";
17 18
19 aliases {
20 serial2 = &scif2;
21 };
22
18 chosen { 23 chosen {
19 bootargs = "console=ttySC2,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp"; 24 bootargs = "console=ttySC2,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
20 }; 25 };
@@ -29,3 +34,26 @@
29 #size-cells = <1>; 34 #size-cells = <1>;
30 }; 35 };
31}; 36};
37
38&extal_clk {
39 clock-frequency = <13330000>;
40};
41
42&usb_x1_clk {
43 clock-frequency = <48000000>;
44};
45
46&i2c2 {
47 status = "okay";
48 clock-frequency = <400000>;
49
50 eeprom@50 {
51 compatible = "renesas,24c128";
52 reg = <0x50>;
53 pagesize = <64>;
54 };
55};
56
57&scif2 {
58 status = "okay";
59};
diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi
index ee700717a34b..f50fbc8f3bd9 100644
--- a/arch/arm/boot/dts/r7s72100.dtsi
+++ b/arch/arm/boot/dts/r7s72100.dtsi
@@ -1,13 +1,15 @@
1/* 1/*
2 * Device Tree Source for the r7s72100 SoC 2 * Device Tree Source for the r7s72100 SoC
3 * 3 *
4 * Copyright (C) 2013 Renesas Solutions Corp. 4 * Copyright (C) 2013-14 Renesas Solutions Corp.
5 * Copyright (C) 2014 Wolfram Sang, Sang Engineering <wsa@sang-engineering.com>
5 * 6 *
6 * This file is licensed under the terms of the GNU General Public License 7 * 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 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied. 9 * kind, whether express or implied.
9 */ 10 */
10 11
12#include <dt-bindings/clock/r7s72100-clock.h>
11#include <dt-bindings/interrupt-controller/irq.h> 13#include <dt-bindings/interrupt-controller/irq.h>
12 14
13/ { 15/ {
@@ -28,6 +30,112 @@
28 spi4 = &spi4; 30 spi4 = &spi4;
29 }; 31 };
30 32
33 clocks {
34 ranges;
35 #address-cells = <1>;
36 #size-cells = <1>;
37
38 /* External clocks */
39 extal_clk: extal_clk {
40 #clock-cells = <0>;
41 compatible = "fixed-clock";
42 /* If clk present, value must be set by board */
43 clock-frequency = <0>;
44 clock-output-names = "extal";
45 };
46
47 usb_x1_clk: usb_x1_clk {
48 #clock-cells = <0>;
49 compatible = "fixed-clock";
50 /* If clk present, value must be set by board */
51 clock-frequency = <0>;
52 clock-output-names = "usb_x1";
53 };
54
55 /* Special CPG clocks */
56 cpg_clocks: cpg_clocks@fcfe0000 {
57 #clock-cells = <1>;
58 compatible = "renesas,r7s72100-cpg-clocks",
59 "renesas,rz-cpg-clocks";
60 reg = <0xfcfe0000 0x18>;
61 clocks = <&extal_clk>, <&usb_x1_clk>;
62 clock-output-names = "pll", "i", "g";
63 };
64
65 /* Fixed factor clocks */
66 b_clk: b_clk {
67 #clock-cells = <0>;
68 compatible = "fixed-factor-clock";
69 clocks = <&cpg_clocks R7S72100_CLK_PLL>;
70 clock-mult = <1>;
71 clock-div = <3>;
72 clock-output-names = "b";
73 };
74 p1_clk: p1_clk {
75 #clock-cells = <0>;
76 compatible = "fixed-factor-clock";
77 clocks = <&cpg_clocks R7S72100_CLK_PLL>;
78 clock-mult = <1>;
79 clock-div = <6>;
80 clock-output-names = "p1";
81 };
82 p0_clk: p0_clk {
83 #clock-cells = <0>;
84 compatible = "fixed-factor-clock";
85 clocks = <&cpg_clocks R7S72100_CLK_PLL>;
86 clock-mult = <1>;
87 clock-div = <12>;
88 clock-output-names = "p0";
89 };
90
91 /* MSTP clocks */
92 mstp3_clks: mstp3_clks@fcfe0420 {
93 #clock-cells = <1>;
94 compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-clocks";
95 reg = <0xfcfe0420 4>;
96 clocks = <&p0_clk>;
97 clock-indices = <R7S72100_CLK_MTU2>;
98 clock-output-names = "mtu2";
99 };
100
101 mstp4_clks: mstp4_clks@fcfe0424 {
102 #clock-cells = <1>;
103 compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-clocks";
104 reg = <0xfcfe0424 4>;
105 clocks = <&p1_clk>, <&p1_clk>, <&p1_clk>, <&p1_clk>,
106 <&p1_clk>, <&p1_clk>, <&p1_clk>, <&p1_clk>;
107 clock-indices = <
108 R7S72100_CLK_SCIF0 R7S72100_CLK_SCIF1 R7S72100_CLK_SCIF2 R7S72100_CLK_SCIF3
109 R7S72100_CLK_SCIF4 R7S72100_CLK_SCIF5 R7S72100_CLK_SCIF6 R7S72100_CLK_SCIF7
110 >;
111 clock-output-names = "scif0", "scif1", "scif2", "scif3", "scif4", "scif5", "scif6", "scif7";
112 };
113
114 mstp9_clks: mstp9_clks@fcfe0438 {
115 #clock-cells = <1>;
116 compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-clocks";
117 reg = <0xfcfe0438 4>;
118 clocks = <&p0_clk>, <&p0_clk>, <&p0_clk>, <&p0_clk>;
119 clock-indices = <
120 R7S72100_CLK_I2C0 R7S72100_CLK_I2C1 R7S72100_CLK_I2C2 R7S72100_CLK_I2C3
121 >;
122 clock-output-names = "i2c0", "i2c1", "i2c2", "i2c3";
123 };
124
125 mstp10_clks: mstp10_clks@fcfe043c {
126 #clock-cells = <1>;
127 compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-clocks";
128 reg = <0xfcfe043c 4>;
129 clocks = <&p1_clk>, <&p1_clk>, <&p1_clk>, <&p1_clk>,
130 <&p1_clk>;
131 clock-indices = <
132 R7S72100_CLK_SPI0 R7S72100_CLK_SPI1 R7S72100_CLK_SPI2 R7S72100_CLK_SPI3
133 R7S72100_CLK_SPI4
134 >;
135 clock-output-names = "spi0", "spi1", "spi2", "spi3", "spi4";
136 };
137 };
138
31 cpus { 139 cpus {
32 #address-cells = <1>; 140 #address-cells = <1>;
33 #size-cells = <0>; 141 #size-cells = <0>;
@@ -61,6 +169,7 @@
61 <0 162 IRQ_TYPE_LEVEL_HIGH>, 169 <0 162 IRQ_TYPE_LEVEL_HIGH>,
62 <0 163 IRQ_TYPE_LEVEL_HIGH>, 170 <0 163 IRQ_TYPE_LEVEL_HIGH>,
63 <0 164 IRQ_TYPE_LEVEL_HIGH>; 171 <0 164 IRQ_TYPE_LEVEL_HIGH>;
172 clocks = <&mstp9_clks R7S72100_CLK_I2C0>;
64 clock-frequency = <100000>; 173 clock-frequency = <100000>;
65 status = "disabled"; 174 status = "disabled";
66 }; 175 };
@@ -78,6 +187,7 @@
78 <0 170 IRQ_TYPE_LEVEL_HIGH>, 187 <0 170 IRQ_TYPE_LEVEL_HIGH>,
79 <0 171 IRQ_TYPE_LEVEL_HIGH>, 188 <0 171 IRQ_TYPE_LEVEL_HIGH>,
80 <0 172 IRQ_TYPE_LEVEL_HIGH>; 189 <0 172 IRQ_TYPE_LEVEL_HIGH>;
190 clocks = <&mstp9_clks R7S72100_CLK_I2C1>;
81 clock-frequency = <100000>; 191 clock-frequency = <100000>;
82 status = "disabled"; 192 status = "disabled";
83 }; 193 };
@@ -95,6 +205,7 @@
95 <0 178 IRQ_TYPE_LEVEL_HIGH>, 205 <0 178 IRQ_TYPE_LEVEL_HIGH>,
96 <0 179 IRQ_TYPE_LEVEL_HIGH>, 206 <0 179 IRQ_TYPE_LEVEL_HIGH>,
97 <0 180 IRQ_TYPE_LEVEL_HIGH>; 207 <0 180 IRQ_TYPE_LEVEL_HIGH>;
208 clocks = <&mstp9_clks R7S72100_CLK_I2C2>;
98 clock-frequency = <100000>; 209 clock-frequency = <100000>;
99 status = "disabled"; 210 status = "disabled";
100 }; 211 };
@@ -112,10 +223,107 @@
112 <0 186 IRQ_TYPE_LEVEL_HIGH>, 223 <0 186 IRQ_TYPE_LEVEL_HIGH>,
113 <0 187 IRQ_TYPE_LEVEL_HIGH>, 224 <0 187 IRQ_TYPE_LEVEL_HIGH>,
114 <0 188 IRQ_TYPE_LEVEL_HIGH>; 225 <0 188 IRQ_TYPE_LEVEL_HIGH>;
226 clocks = <&mstp9_clks R7S72100_CLK_I2C3>;
115 clock-frequency = <100000>; 227 clock-frequency = <100000>;
116 status = "disabled"; 228 status = "disabled";
117 }; 229 };
118 230
231 scif0: serial@e8007000 {
232 compatible = "renesas,scif-r7s72100", "renesas,scif";
233 reg = <0xe8007000 64>;
234 interrupts = <0 190 IRQ_TYPE_LEVEL_HIGH>,
235 <0 191 IRQ_TYPE_LEVEL_HIGH>,
236 <0 192 IRQ_TYPE_LEVEL_HIGH>,
237 <0 189 IRQ_TYPE_LEVEL_HIGH>;
238 clocks = <&mstp4_clks R7S72100_CLK_SCIF0>;
239 clock-names = "sci_ick";
240 status = "disabled";
241 };
242
243 scif1: serial@e8007800 {
244 compatible = "renesas,scif-r7s72100", "renesas,scif";
245 reg = <0xe8007800 64>;
246 interrupts = <0 194 IRQ_TYPE_LEVEL_HIGH>,
247 <0 195 IRQ_TYPE_LEVEL_HIGH>,
248 <0 196 IRQ_TYPE_LEVEL_HIGH>,
249 <0 193 IRQ_TYPE_LEVEL_HIGH>;
250 clocks = <&mstp4_clks R7S72100_CLK_SCIF1>;
251 clock-names = "sci_ick";
252 status = "disabled";
253 };
254
255 scif2: serial@e8008000 {
256 compatible = "renesas,scif-r7s72100", "renesas,scif";
257 reg = <0xe8008000 64>;
258 interrupts = <0 198 IRQ_TYPE_LEVEL_HIGH>,
259 <0 199 IRQ_TYPE_LEVEL_HIGH>,
260 <0 200 IRQ_TYPE_LEVEL_HIGH>,
261 <0 197 IRQ_TYPE_LEVEL_HIGH>;
262 clocks = <&mstp4_clks R7S72100_CLK_SCIF2>;
263 clock-names = "sci_ick";
264 status = "disabled";
265 };
266
267 scif3: serial@e8008800 {
268 compatible = "renesas,scif-r7s72100", "renesas,scif";
269 reg = <0xe8008800 64>;
270 interrupts = <0 202 IRQ_TYPE_LEVEL_HIGH>,
271 <0 203 IRQ_TYPE_LEVEL_HIGH>,
272 <0 204 IRQ_TYPE_LEVEL_HIGH>,
273 <0 201 IRQ_TYPE_LEVEL_HIGH>;
274 clocks = <&mstp4_clks R7S72100_CLK_SCIF3>;
275 clock-names = "sci_ick";
276 status = "disabled";
277 };
278
279 scif4: serial@e8009000 {
280 compatible = "renesas,scif-r7s72100", "renesas,scif";
281 reg = <0xe8009000 64>;
282 interrupts = <0 206 IRQ_TYPE_LEVEL_HIGH>,
283 <0 207 IRQ_TYPE_LEVEL_HIGH>,
284 <0 208 IRQ_TYPE_LEVEL_HIGH>,
285 <0 205 IRQ_TYPE_LEVEL_HIGH>;
286 clocks = <&mstp4_clks R7S72100_CLK_SCIF4>;
287 clock-names = "sci_ick";
288 status = "disabled";
289 };
290
291 scif5: serial@e8009800 {
292 compatible = "renesas,scif-r7s72100", "renesas,scif";
293 reg = <0xe8009800 64>;
294 interrupts = <0 210 IRQ_TYPE_LEVEL_HIGH>,
295 <0 211 IRQ_TYPE_LEVEL_HIGH>,
296 <0 212 IRQ_TYPE_LEVEL_HIGH>,
297 <0 209 IRQ_TYPE_LEVEL_HIGH>;
298 clocks = <&mstp4_clks R7S72100_CLK_SCIF5>;
299 clock-names = "sci_ick";
300 status = "disabled";
301 };
302
303 scif6: serial@e800a000 {
304 compatible = "renesas,scif-r7s72100", "renesas,scif";
305 reg = <0xe800a000 64>;
306 interrupts = <0 214 IRQ_TYPE_LEVEL_HIGH>,
307 <0 215 IRQ_TYPE_LEVEL_HIGH>,
308 <0 216 IRQ_TYPE_LEVEL_HIGH>,
309 <0 213 IRQ_TYPE_LEVEL_HIGH>;
310 clocks = <&mstp4_clks R7S72100_CLK_SCIF6>;
311 clock-names = "sci_ick";
312 status = "disabled";
313 };
314
315 scif7: serial@e800a800 {
316 compatible = "renesas,scif-r7s72100", "renesas,scif";
317 reg = <0xe800a800 64>;
318 interrupts = <0 218 IRQ_TYPE_LEVEL_HIGH>,
319 <0 219 IRQ_TYPE_LEVEL_HIGH>,
320 <0 220 IRQ_TYPE_LEVEL_HIGH>,
321 <0 217 IRQ_TYPE_LEVEL_HIGH>;
322 clocks = <&mstp4_clks R7S72100_CLK_SCIF7>;
323 clock-names = "sci_ick";
324 status = "disabled";
325 };
326
119 spi0: spi@e800c800 { 327 spi0: spi@e800c800 {
120 compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz"; 328 compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz";
121 reg = <0xe800c800 0x24>; 329 reg = <0xe800c800 0x24>;
@@ -123,6 +331,7 @@
123 <0 239 IRQ_TYPE_LEVEL_HIGH>, 331 <0 239 IRQ_TYPE_LEVEL_HIGH>,
124 <0 240 IRQ_TYPE_LEVEL_HIGH>; 332 <0 240 IRQ_TYPE_LEVEL_HIGH>;
125 interrupt-names = "error", "rx", "tx"; 333 interrupt-names = "error", "rx", "tx";
334 clocks = <&mstp10_clks R7S72100_CLK_SPI0>;
126 num-cs = <1>; 335 num-cs = <1>;
127 #address-cells = <1>; 336 #address-cells = <1>;
128 #size-cells = <0>; 337 #size-cells = <0>;
@@ -136,6 +345,7 @@
136 <0 242 IRQ_TYPE_LEVEL_HIGH>, 345 <0 242 IRQ_TYPE_LEVEL_HIGH>,
137 <0 243 IRQ_TYPE_LEVEL_HIGH>; 346 <0 243 IRQ_TYPE_LEVEL_HIGH>;
138 interrupt-names = "error", "rx", "tx"; 347 interrupt-names = "error", "rx", "tx";
348 clocks = <&mstp10_clks R7S72100_CLK_SPI1>;
139 num-cs = <1>; 349 num-cs = <1>;
140 #address-cells = <1>; 350 #address-cells = <1>;
141 #size-cells = <0>; 351 #size-cells = <0>;
@@ -149,6 +359,7 @@
149 <0 245 IRQ_TYPE_LEVEL_HIGH>, 359 <0 245 IRQ_TYPE_LEVEL_HIGH>,
150 <0 246 IRQ_TYPE_LEVEL_HIGH>; 360 <0 246 IRQ_TYPE_LEVEL_HIGH>;
151 interrupt-names = "error", "rx", "tx"; 361 interrupt-names = "error", "rx", "tx";
362 clocks = <&mstp10_clks R7S72100_CLK_SPI2>;
152 num-cs = <1>; 363 num-cs = <1>;
153 #address-cells = <1>; 364 #address-cells = <1>;
154 #size-cells = <0>; 365 #size-cells = <0>;
@@ -162,6 +373,7 @@
162 <0 248 IRQ_TYPE_LEVEL_HIGH>, 373 <0 248 IRQ_TYPE_LEVEL_HIGH>,
163 <0 249 IRQ_TYPE_LEVEL_HIGH>; 374 <0 249 IRQ_TYPE_LEVEL_HIGH>;
164 interrupt-names = "error", "rx", "tx"; 375 interrupt-names = "error", "rx", "tx";
376 clocks = <&mstp10_clks R7S72100_CLK_SPI3>;
165 num-cs = <1>; 377 num-cs = <1>;
166 #address-cells = <1>; 378 #address-cells = <1>;
167 #size-cells = <0>; 379 #size-cells = <0>;
@@ -175,6 +387,7 @@
175 <0 251 IRQ_TYPE_LEVEL_HIGH>, 387 <0 251 IRQ_TYPE_LEVEL_HIGH>,
176 <0 252 IRQ_TYPE_LEVEL_HIGH>; 388 <0 252 IRQ_TYPE_LEVEL_HIGH>;
177 interrupt-names = "error", "rx", "tx"; 389 interrupt-names = "error", "rx", "tx";
390 clocks = <&mstp10_clks R7S72100_CLK_SPI4>;
178 num-cs = <1>; 391 num-cs = <1>;
179 #address-cells = <1>; 392 #address-cells = <1>;
180 #size-cells = <0>; 393 #size-cells = <0>;
diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi
index 62d0211bd192..82c5ac825386 100644
--- a/arch/arm/boot/dts/r8a73a4.dtsi
+++ b/arch/arm/boot/dts/r8a73a4.dtsi
@@ -55,7 +55,6 @@
55 #interrupt-cells = <2>; 55 #interrupt-cells = <2>;
56 interrupt-controller; 56 interrupt-controller;
57 reg = <0 0xe61c0000 0 0x200>; 57 reg = <0 0xe61c0000 0 0x200>;
58 interrupt-parent = <&gic>;
59 interrupts = <0 0 IRQ_TYPE_LEVEL_HIGH>, 58 interrupts = <0 0 IRQ_TYPE_LEVEL_HIGH>,
60 <0 1 IRQ_TYPE_LEVEL_HIGH>, 59 <0 1 IRQ_TYPE_LEVEL_HIGH>,
61 <0 2 IRQ_TYPE_LEVEL_HIGH>, 60 <0 2 IRQ_TYPE_LEVEL_HIGH>,
@@ -95,7 +94,6 @@
95 #interrupt-cells = <2>; 94 #interrupt-cells = <2>;
96 interrupt-controller; 95 interrupt-controller;
97 reg = <0 0xe61c0200 0 0x200>; 96 reg = <0 0xe61c0200 0 0x200>;
98 interrupt-parent = <&gic>;
99 interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>, 97 interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>,
100 <0 33 IRQ_TYPE_LEVEL_HIGH>, 98 <0 33 IRQ_TYPE_LEVEL_HIGH>,
101 <0 34 IRQ_TYPE_LEVEL_HIGH>, 99 <0 34 IRQ_TYPE_LEVEL_HIGH>,
@@ -136,7 +134,6 @@
136 dma0: dma-controller@e6700020 { 134 dma0: dma-controller@e6700020 {
137 compatible = "renesas,shdma-r8a73a4"; 135 compatible = "renesas,shdma-r8a73a4";
138 reg = <0 0xe6700020 0 0x89e0>; 136 reg = <0 0xe6700020 0 0x89e0>;
139 interrupt-parent = <&gic>;
140 interrupts = <0 220 IRQ_TYPE_LEVEL_HIGH 137 interrupts = <0 220 IRQ_TYPE_LEVEL_HIGH
141 0 200 IRQ_TYPE_LEVEL_HIGH 138 0 200 IRQ_TYPE_LEVEL_HIGH
142 0 201 IRQ_TYPE_LEVEL_HIGH 139 0 201 IRQ_TYPE_LEVEL_HIGH
@@ -171,7 +168,6 @@
171 compatible = "renesas,rcar-thermal"; 168 compatible = "renesas,rcar-thermal";
172 reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>, 169 reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>,
173 <0 0xe61f0200 0 0x38>, <0 0xe61f0300 0 0x38>; 170 <0 0xe61f0200 0 0x38>, <0 0xe61f0300 0 0x38>;
174 interrupt-parent = <&gic>;
175 interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>; 171 interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>;
176 }; 172 };
177 173
@@ -180,7 +176,6 @@
180 #size-cells = <0>; 176 #size-cells = <0>;
181 compatible = "renesas,rmobile-iic"; 177 compatible = "renesas,rmobile-iic";
182 reg = <0 0xe6500000 0 0x428>; 178 reg = <0 0xe6500000 0 0x428>;
183 interrupt-parent = <&gic>;
184 interrupts = <0 174 IRQ_TYPE_LEVEL_HIGH>; 179 interrupts = <0 174 IRQ_TYPE_LEVEL_HIGH>;
185 status = "disabled"; 180 status = "disabled";
186 }; 181 };
@@ -190,7 +185,6 @@
190 #size-cells = <0>; 185 #size-cells = <0>;
191 compatible = "renesas,rmobile-iic"; 186 compatible = "renesas,rmobile-iic";
192 reg = <0 0xe6510000 0 0x428>; 187 reg = <0 0xe6510000 0 0x428>;
193 interrupt-parent = <&gic>;
194 interrupts = <0 175 IRQ_TYPE_LEVEL_HIGH>; 188 interrupts = <0 175 IRQ_TYPE_LEVEL_HIGH>;
195 status = "disabled"; 189 status = "disabled";
196 }; 190 };
@@ -200,7 +194,6 @@
200 #size-cells = <0>; 194 #size-cells = <0>;
201 compatible = "renesas,rmobile-iic"; 195 compatible = "renesas,rmobile-iic";
202 reg = <0 0xe6520000 0 0x428>; 196 reg = <0 0xe6520000 0 0x428>;
203 interrupt-parent = <&gic>;
204 interrupts = <0 176 IRQ_TYPE_LEVEL_HIGH>; 197 interrupts = <0 176 IRQ_TYPE_LEVEL_HIGH>;
205 status = "disabled"; 198 status = "disabled";
206 }; 199 };
@@ -210,7 +203,6 @@
210 #size-cells = <0>; 203 #size-cells = <0>;
211 compatible = "renesas,rmobile-iic"; 204 compatible = "renesas,rmobile-iic";
212 reg = <0 0xe6530000 0 0x428>; 205 reg = <0 0xe6530000 0 0x428>;
213 interrupt-parent = <&gic>;
214 interrupts = <0 177 IRQ_TYPE_LEVEL_HIGH>; 206 interrupts = <0 177 IRQ_TYPE_LEVEL_HIGH>;
215 status = "disabled"; 207 status = "disabled";
216 }; 208 };
@@ -220,7 +212,6 @@
220 #size-cells = <0>; 212 #size-cells = <0>;
221 compatible = "renesas,rmobile-iic"; 213 compatible = "renesas,rmobile-iic";
222 reg = <0 0xe6540000 0 0x428>; 214 reg = <0 0xe6540000 0 0x428>;
223 interrupt-parent = <&gic>;
224 interrupts = <0 178 IRQ_TYPE_LEVEL_HIGH>; 215 interrupts = <0 178 IRQ_TYPE_LEVEL_HIGH>;
225 status = "disabled"; 216 status = "disabled";
226 }; 217 };
@@ -230,7 +221,6 @@
230 #size-cells = <0>; 221 #size-cells = <0>;
231 compatible = "renesas,rmobile-iic"; 222 compatible = "renesas,rmobile-iic";
232 reg = <0 0xe60b0000 0 0x428>; 223 reg = <0 0xe60b0000 0 0x428>;
233 interrupt-parent = <&gic>;
234 interrupts = <0 179 IRQ_TYPE_LEVEL_HIGH>; 224 interrupts = <0 179 IRQ_TYPE_LEVEL_HIGH>;
235 status = "disabled"; 225 status = "disabled";
236 }; 226 };
@@ -240,7 +230,6 @@
240 #size-cells = <0>; 230 #size-cells = <0>;
241 compatible = "renesas,rmobile-iic"; 231 compatible = "renesas,rmobile-iic";
242 reg = <0 0xe6550000 0 0x428>; 232 reg = <0 0xe6550000 0 0x428>;
243 interrupt-parent = <&gic>;
244 interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>; 233 interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
245 status = "disabled"; 234 status = "disabled";
246 }; 235 };
@@ -250,7 +239,6 @@
250 #size-cells = <0>; 239 #size-cells = <0>;
251 compatible = "renesas,rmobile-iic"; 240 compatible = "renesas,rmobile-iic";
252 reg = <0 0xe6560000 0 0x428>; 241 reg = <0 0xe6560000 0 0x428>;
253 interrupt-parent = <&gic>;
254 interrupts = <0 185 IRQ_TYPE_LEVEL_HIGH>; 242 interrupts = <0 185 IRQ_TYPE_LEVEL_HIGH>;
255 status = "disabled"; 243 status = "disabled";
256 }; 244 };
@@ -260,7 +248,6 @@
260 #size-cells = <0>; 248 #size-cells = <0>;
261 compatible = "renesas,rmobile-iic"; 249 compatible = "renesas,rmobile-iic";
262 reg = <0 0xe6570000 0 0x428>; 250 reg = <0 0xe6570000 0 0x428>;
263 interrupt-parent = <&gic>;
264 interrupts = <0 173 IRQ_TYPE_LEVEL_HIGH>; 251 interrupts = <0 173 IRQ_TYPE_LEVEL_HIGH>;
265 status = "disabled"; 252 status = "disabled";
266 }; 253 };
@@ -268,7 +255,6 @@
268 mmcif0: mmc@ee200000 { 255 mmcif0: mmc@ee200000 {
269 compatible = "renesas,sh-mmcif"; 256 compatible = "renesas,sh-mmcif";
270 reg = <0 0xee200000 0 0x80>; 257 reg = <0 0xee200000 0 0x80>;
271 interrupt-parent = <&gic>;
272 interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>; 258 interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>;
273 reg-io-width = <4>; 259 reg-io-width = <4>;
274 status = "disabled"; 260 status = "disabled";
@@ -277,7 +263,6 @@
277 mmcif1: mmc@ee220000 { 263 mmcif1: mmc@ee220000 {
278 compatible = "renesas,sh-mmcif"; 264 compatible = "renesas,sh-mmcif";
279 reg = <0 0xee220000 0 0x80>; 265 reg = <0 0xee220000 0 0x80>;
280 interrupt-parent = <&gic>;
281 interrupts = <0 170 IRQ_TYPE_LEVEL_HIGH>; 266 interrupts = <0 170 IRQ_TYPE_LEVEL_HIGH>;
282 reg-io-width = <4>; 267 reg-io-width = <4>;
283 status = "disabled"; 268 status = "disabled";
@@ -309,7 +294,6 @@
309 sdhi0: sd@ee100000 { 294 sdhi0: sd@ee100000 {
310 compatible = "renesas,sdhi-r8a73a4"; 295 compatible = "renesas,sdhi-r8a73a4";
311 reg = <0 0xee100000 0 0x100>; 296 reg = <0 0xee100000 0 0x100>;
312 interrupt-parent = <&gic>;
313 interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>; 297 interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>;
314 cap-sd-highspeed; 298 cap-sd-highspeed;
315 status = "disabled"; 299 status = "disabled";
@@ -318,7 +302,6 @@
318 sdhi1: sd@ee120000 { 302 sdhi1: sd@ee120000 {
319 compatible = "renesas,sdhi-r8a73a4"; 303 compatible = "renesas,sdhi-r8a73a4";
320 reg = <0 0xee120000 0 0x100>; 304 reg = <0 0xee120000 0 0x100>;
321 interrupt-parent = <&gic>;
322 interrupts = <0 166 IRQ_TYPE_LEVEL_HIGH>; 305 interrupts = <0 166 IRQ_TYPE_LEVEL_HIGH>;
323 cap-sd-highspeed; 306 cap-sd-highspeed;
324 status = "disabled"; 307 status = "disabled";
@@ -327,7 +310,6 @@
327 sdhi2: sd@ee140000 { 310 sdhi2: sd@ee140000 {
328 compatible = "renesas,sdhi-r8a73a4"; 311 compatible = "renesas,sdhi-r8a73a4";
329 reg = <0 0xee140000 0 0x100>; 312 reg = <0 0xee140000 0 0x100>;
330 interrupt-parent = <&gic>;
331 interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>; 313 interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>;
332 cap-sd-highspeed; 314 cap-sd-highspeed;
333 status = "disabled"; 315 status = "disabled";
diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
index 95a849bf921f..486007d7ffe4 100644
--- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
+++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
@@ -11,6 +11,7 @@
11/dts-v1/; 11/dts-v1/;
12#include "r8a7740.dtsi" 12#include "r8a7740.dtsi"
13#include <dt-bindings/gpio/gpio.h> 13#include <dt-bindings/gpio/gpio.h>
14#include <dt-bindings/input/input.h>
14#include <dt-bindings/interrupt-controller/irq.h> 15#include <dt-bindings/interrupt-controller/irq.h>
15#include <dt-bindings/pwm/pwm.h> 16#include <dt-bindings/pwm/pwm.h>
16 17
@@ -77,26 +78,26 @@
77 78
78 power-key { 79 power-key {
79 gpios = <&pfc 99 GPIO_ACTIVE_LOW>; 80 gpios = <&pfc 99 GPIO_ACTIVE_LOW>;
80 linux,code = <116>; 81 linux,code = <KEY_POWER>;
81 label = "SW3"; 82 label = "SW3";
82 gpio-key,wakeup; 83 gpio-key,wakeup;
83 }; 84 };
84 85
85 back-key { 86 back-key {
86 gpios = <&pfc 100 GPIO_ACTIVE_LOW>; 87 gpios = <&pfc 100 GPIO_ACTIVE_LOW>;
87 linux,code = <158>; 88 linux,code = <KEY_BACK>;
88 label = "SW4"; 89 label = "SW4";
89 }; 90 };
90 91
91 menu-key { 92 menu-key {
92 gpios = <&pfc 97 GPIO_ACTIVE_LOW>; 93 gpios = <&pfc 97 GPIO_ACTIVE_LOW>;
93 linux,code = <139>; 94 linux,code = <KEY_MENU>;
94 label = "SW5"; 95 label = "SW5";
95 }; 96 };
96 97
97 home-key { 98 home-key {
98 gpios = <&pfc 98 GPIO_ACTIVE_LOW>; 99 gpios = <&pfc 98 GPIO_ACTIVE_LOW>;
99 linux,code = <102>; 100 linux,code = <KEY_HOME>;
100 label = "SW6"; 101 label = "SW6";
101 }; 102 };
102 }; 103 };
@@ -117,6 +118,16 @@
117 }; 118 };
118 }; 119 };
119 120
121 i2c2: i2c@2 {
122 #address-cells = <1>;
123 #size-cells = <0>;
124 compatible = "i2c-gpio";
125 gpios = <&pfc 208 GPIO_ACTIVE_HIGH /* sda */
126 &pfc 91 GPIO_ACTIVE_HIGH /* scl */
127 >;
128 i2c-gpio,delay-us = <5>;
129 };
130
120 backlight { 131 backlight {
121 compatible = "pwm-backlight"; 132 compatible = "pwm-backlight";
122 pwms = <&tpu 2 33333 PWM_POLARITY_INVERTED>; 133 pwms = <&tpu 2 33333 PWM_POLARITY_INVERTED>;
@@ -147,6 +158,18 @@
147 }; 158 };
148}; 159};
149 160
161&ether {
162 pinctrl-0 = <&ether_pins>;
163 pinctrl-names = "default";
164
165 phy-handle = <&phy0>;
166 status = "ok";
167
168 phy0: ethernet-phy@0 {
169 reg = <0>;
170 };
171};
172
150&i2c0 { 173&i2c0 {
151 status = "okay"; 174 status = "okay";
152 touchscreen@55 { 175 touchscreen@55 {
@@ -166,10 +189,23 @@
166 }; 189 };
167}; 190};
168 191
192&i2c2 {
193 status = "okay";
194 rtc@30 {
195 compatible = "sii,s35390a";
196 reg = <0x30>;
197 };
198};
199
169&pfc { 200&pfc {
170 pinctrl-0 = <&scifa1_pins>; 201 pinctrl-0 = <&scifa1_pins>;
171 pinctrl-names = "default"; 202 pinctrl-names = "default";
172 203
204 ether_pins: ether {
205 renesas,groups = "gether_mii", "gether_int";
206 renesas,function = "gether";
207 };
208
173 scifa1_pins: serial1 { 209 scifa1_pins: serial1 {
174 renesas,groups = "scifa1_data"; 210 renesas,groups = "scifa1_data";
175 renesas,function = "scifa1"; 211 renesas,function = "scifa1";
diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
index 2551e9438d35..55d29f4d2ed6 100644
--- a/arch/arm/boot/dts/r8a7740.dtsi
+++ b/arch/arm/boot/dts/r8a7740.dtsi
@@ -14,6 +14,7 @@
14 14
15/ { 15/ {
16 compatible = "renesas,r8a7740"; 16 compatible = "renesas,r8a7740";
17 interrupt-parent = <&gic>;
17 18
18 cpus { 19 cpus {
19 #address-cells = <1>; 20 #address-cells = <1>;
@@ -22,6 +23,7 @@
22 compatible = "arm,cortex-a9"; 23 compatible = "arm,cortex-a9";
23 device_type = "cpu"; 24 device_type = "cpu";
24 reg = <0x0>; 25 reg = <0x0>;
26 clock-frequency = <800000000>;
25 }; 27 };
26 }; 28 };
27 29
@@ -48,7 +50,6 @@
48 <0xe6900020 1>, 50 <0xe6900020 1>,
49 <0xe6900040 1>, 51 <0xe6900040 1>,
50 <0xe6900060 1>; 52 <0xe6900060 1>;
51 interrupt-parent = <&gic>;
52 interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH 53 interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH
53 0 149 IRQ_TYPE_LEVEL_HIGH 54 0 149 IRQ_TYPE_LEVEL_HIGH
54 0 149 IRQ_TYPE_LEVEL_HIGH 55 0 149 IRQ_TYPE_LEVEL_HIGH
@@ -69,7 +70,6 @@
69 <0xe6900024 1>, 70 <0xe6900024 1>,
70 <0xe6900044 1>, 71 <0xe6900044 1>,
71 <0xe6900064 1>; 72 <0xe6900064 1>;
72 interrupt-parent = <&gic>;
73 interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH 73 interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH
74 0 149 IRQ_TYPE_LEVEL_HIGH 74 0 149 IRQ_TYPE_LEVEL_HIGH
75 0 149 IRQ_TYPE_LEVEL_HIGH 75 0 149 IRQ_TYPE_LEVEL_HIGH
@@ -90,7 +90,6 @@
90 <0xe6900028 1>, 90 <0xe6900028 1>,
91 <0xe6900048 1>, 91 <0xe6900048 1>,
92 <0xe6900068 1>; 92 <0xe6900068 1>;
93 interrupt-parent = <&gic>;
94 interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH 93 interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH
95 0 149 IRQ_TYPE_LEVEL_HIGH 94 0 149 IRQ_TYPE_LEVEL_HIGH
96 0 149 IRQ_TYPE_LEVEL_HIGH 95 0 149 IRQ_TYPE_LEVEL_HIGH
@@ -111,7 +110,6 @@
111 <0xe690002c 1>, 110 <0xe690002c 1>,
112 <0xe690004c 1>, 111 <0xe690004c 1>,
113 <0xe690006c 1>; 112 <0xe690006c 1>;
114 interrupt-parent = <&gic>;
115 interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH 113 interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH
116 0 149 IRQ_TYPE_LEVEL_HIGH 114 0 149 IRQ_TYPE_LEVEL_HIGH
117 0 149 IRQ_TYPE_LEVEL_HIGH 115 0 149 IRQ_TYPE_LEVEL_HIGH
@@ -122,12 +120,23 @@
122 0 149 IRQ_TYPE_LEVEL_HIGH>; 120 0 149 IRQ_TYPE_LEVEL_HIGH>;
123 }; 121 };
124 122
123 ether: ethernet@e9a00000 {
124 compatible = "renesas,gether-r8a7740";
125 reg = <0xe9a00000 0x800>,
126 <0xe9a01800 0x800>;
127 interrupts = <0 110 IRQ_TYPE_LEVEL_HIGH>;
128 /* clocks = <&mstp3_clks R8A7740_CLK_GETHER>; */
129 phy-mode = "mii";
130 #address-cells = <1>;
131 #size-cells = <0>;
132 status = "disabled";
133 };
134
125 i2c0: i2c@fff20000 { 135 i2c0: i2c@fff20000 {
126 #address-cells = <1>; 136 #address-cells = <1>;
127 #size-cells = <0>; 137 #size-cells = <0>;
128 compatible = "renesas,rmobile-iic"; 138 compatible = "renesas,iic-r8a7740", "renesas,rmobile-iic";
129 reg = <0xfff20000 0x425>; 139 reg = <0xfff20000 0x425>;
130 interrupt-parent = <&gic>;
131 interrupts = <0 201 IRQ_TYPE_LEVEL_HIGH 140 interrupts = <0 201 IRQ_TYPE_LEVEL_HIGH
132 0 202 IRQ_TYPE_LEVEL_HIGH 141 0 202 IRQ_TYPE_LEVEL_HIGH
133 0 203 IRQ_TYPE_LEVEL_HIGH 142 0 203 IRQ_TYPE_LEVEL_HIGH
@@ -138,9 +147,8 @@
138 i2c1: i2c@e6c20000 { 147 i2c1: i2c@e6c20000 {
139 #address-cells = <1>; 148 #address-cells = <1>;
140 #size-cells = <0>; 149 #size-cells = <0>;
141 compatible = "renesas,rmobile-iic"; 150 compatible = "renesas,iic-r8a7740", "renesas,rmobile-iic";
142 reg = <0xe6c20000 0x425>; 151 reg = <0xe6c20000 0x425>;
143 interrupt-parent = <&gic>;
144 interrupts = <0 70 IRQ_TYPE_LEVEL_HIGH 152 interrupts = <0 70 IRQ_TYPE_LEVEL_HIGH
145 0 71 IRQ_TYPE_LEVEL_HIGH 153 0 71 IRQ_TYPE_LEVEL_HIGH
146 0 72 IRQ_TYPE_LEVEL_HIGH 154 0 72 IRQ_TYPE_LEVEL_HIGH
@@ -173,9 +181,8 @@
173 }; 181 };
174 182
175 mmcif0: mmc@e6bd0000 { 183 mmcif0: mmc@e6bd0000 {
176 compatible = "renesas,sh-mmcif"; 184 compatible = "renesas,mmcif-r8a7740", "renesas,sh-mmcif";
177 reg = <0xe6bd0000 0x100>; 185 reg = <0xe6bd0000 0x100>;
178 interrupt-parent = <&gic>;
179 interrupts = <0 56 IRQ_TYPE_LEVEL_HIGH 186 interrupts = <0 56 IRQ_TYPE_LEVEL_HIGH
180 0 57 IRQ_TYPE_LEVEL_HIGH>; 187 0 57 IRQ_TYPE_LEVEL_HIGH>;
181 status = "disabled"; 188 status = "disabled";
@@ -184,7 +191,6 @@
184 sdhi0: sd@e6850000 { 191 sdhi0: sd@e6850000 {
185 compatible = "renesas,sdhi-r8a7740"; 192 compatible = "renesas,sdhi-r8a7740";
186 reg = <0xe6850000 0x100>; 193 reg = <0xe6850000 0x100>;
187 interrupt-parent = <&gic>;
188 interrupts = <0 117 IRQ_TYPE_LEVEL_HIGH 194 interrupts = <0 117 IRQ_TYPE_LEVEL_HIGH
189 0 118 IRQ_TYPE_LEVEL_HIGH 195 0 118 IRQ_TYPE_LEVEL_HIGH
190 0 119 IRQ_TYPE_LEVEL_HIGH>; 196 0 119 IRQ_TYPE_LEVEL_HIGH>;
@@ -196,7 +202,6 @@
196 sdhi1: sd@e6860000 { 202 sdhi1: sd@e6860000 {
197 compatible = "renesas,sdhi-r8a7740"; 203 compatible = "renesas,sdhi-r8a7740";
198 reg = <0xe6860000 0x100>; 204 reg = <0xe6860000 0x100>;
199 interrupt-parent = <&gic>;
200 interrupts = <0 121 IRQ_TYPE_LEVEL_HIGH 205 interrupts = <0 121 IRQ_TYPE_LEVEL_HIGH
201 0 122 IRQ_TYPE_LEVEL_HIGH 206 0 122 IRQ_TYPE_LEVEL_HIGH
202 0 123 IRQ_TYPE_LEVEL_HIGH>; 207 0 123 IRQ_TYPE_LEVEL_HIGH>;
@@ -208,7 +213,6 @@
208 sdhi2: sd@e6870000 { 213 sdhi2: sd@e6870000 {
209 compatible = "renesas,sdhi-r8a7740"; 214 compatible = "renesas,sdhi-r8a7740";
210 reg = <0xe6870000 0x100>; 215 reg = <0xe6870000 0x100>;
211 interrupt-parent = <&gic>;
212 interrupts = <0 125 IRQ_TYPE_LEVEL_HIGH 216 interrupts = <0 125 IRQ_TYPE_LEVEL_HIGH
213 0 126 IRQ_TYPE_LEVEL_HIGH 217 0 126 IRQ_TYPE_LEVEL_HIGH
214 0 127 IRQ_TYPE_LEVEL_HIGH>; 218 0 127 IRQ_TYPE_LEVEL_HIGH>;
@@ -219,9 +223,8 @@
219 223
220 sh_fsi2: sound@fe1f0000 { 224 sh_fsi2: sound@fe1f0000 {
221 #sound-dai-cells = <1>; 225 #sound-dai-cells = <1>;
222 compatible = "renesas,sh_fsi2"; 226 compatible = "renesas,fsi2-r8a7740", "renesas,sh_fsi2";
223 reg = <0xfe1f0000 0x400>; 227 reg = <0xfe1f0000 0x400>;
224 interrupt-parent = <&gic>;
225 interrupts = <0 9 0x4>; 228 interrupts = <0 9 0x4>;
226 status = "disabled"; 229 status = "disabled";
227 }; 230 };
diff --git a/arch/arm/boot/dts/r8a7778-bockw-reference.dts b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
index 06cda19dac6a..f76f6ec01e19 100644
--- a/arch/arm/boot/dts/r8a7778-bockw-reference.dts
+++ b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
@@ -109,4 +109,18 @@
109 pinctrl-0 = <&hspi0_pins>; 109 pinctrl-0 = <&hspi0_pins>;
110 pinctrl-names = "default"; 110 pinctrl-names = "default";
111 status = "okay"; 111 status = "okay";
112
113 flash: flash@0 {
114 #address-cells = <1>;
115 #size-cells = <1>;
116 compatible = "spansion,s25fl008k";
117 reg = <0>;
118 spi-max-frequency = <104000000>;
119 m25p,fast-read;
120
121 partition@0 {
122 label = "data(spi)";
123 reg = <0x00000000 0x00100000>;
124 };
125 };
112}; 126};
diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi
index 85c5b3b99f5e..3af0a2187493 100644
--- a/arch/arm/boot/dts/r8a7778.dtsi
+++ b/arch/arm/boot/dts/r8a7778.dtsi
@@ -20,6 +20,7 @@
20 20
21/ { 21/ {
22 compatible = "renesas,r8a7778"; 22 compatible = "renesas,r8a7778";
23 interrupt-parent = <&gic>;
23 24
24 cpus { 25 cpus {
25 cpu@0 { 26 cpu@0 {
@@ -52,7 +53,6 @@
52 <0xfe780024 4>, 53 <0xfe780024 4>,
53 <0xfe780044 4>, 54 <0xfe780044 4>,
54 <0xfe780064 4>; 55 <0xfe780064 4>;
55 interrupt-parent = <&gic>;
56 interrupts = <0 27 IRQ_TYPE_LEVEL_HIGH 56 interrupts = <0 27 IRQ_TYPE_LEVEL_HIGH
57 0 28 IRQ_TYPE_LEVEL_HIGH 57 0 28 IRQ_TYPE_LEVEL_HIGH
58 0 29 IRQ_TYPE_LEVEL_HIGH 58 0 29 IRQ_TYPE_LEVEL_HIGH
@@ -63,7 +63,6 @@
63 gpio0: gpio@ffc40000 { 63 gpio0: gpio@ffc40000 {
64 compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; 64 compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar";
65 reg = <0xffc40000 0x2c>; 65 reg = <0xffc40000 0x2c>;
66 interrupt-parent = <&gic>;
67 interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>; 66 interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>;
68 #gpio-cells = <2>; 67 #gpio-cells = <2>;
69 gpio-controller; 68 gpio-controller;
@@ -75,7 +74,6 @@
75 gpio1: gpio@ffc41000 { 74 gpio1: gpio@ffc41000 {
76 compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; 75 compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar";
77 reg = <0xffc41000 0x2c>; 76 reg = <0xffc41000 0x2c>;
78 interrupt-parent = <&gic>;
79 interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>; 77 interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>;
80 #gpio-cells = <2>; 78 #gpio-cells = <2>;
81 gpio-controller; 79 gpio-controller;
@@ -87,7 +85,6 @@
87 gpio2: gpio@ffc42000 { 85 gpio2: gpio@ffc42000 {
88 compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; 86 compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar";
89 reg = <0xffc42000 0x2c>; 87 reg = <0xffc42000 0x2c>;
90 interrupt-parent = <&gic>;
91 interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>; 88 interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>;
92 #gpio-cells = <2>; 89 #gpio-cells = <2>;
93 gpio-controller; 90 gpio-controller;
@@ -99,7 +96,6 @@
99 gpio3: gpio@ffc43000 { 96 gpio3: gpio@ffc43000 {
100 compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; 97 compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar";
101 reg = <0xffc43000 0x2c>; 98 reg = <0xffc43000 0x2c>;
102 interrupt-parent = <&gic>;
103 interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>; 99 interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>;
104 #gpio-cells = <2>; 100 #gpio-cells = <2>;
105 gpio-controller; 101 gpio-controller;
@@ -111,7 +107,6 @@
111 gpio4: gpio@ffc44000 { 107 gpio4: gpio@ffc44000 {
112 compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; 108 compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar";
113 reg = <0xffc44000 0x2c>; 109 reg = <0xffc44000 0x2c>;
114 interrupt-parent = <&gic>;
115 interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>; 110 interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>;
116 #gpio-cells = <2>; 111 #gpio-cells = <2>;
117 gpio-controller; 112 gpio-controller;
@@ -130,7 +125,6 @@
130 #size-cells = <0>; 125 #size-cells = <0>;
131 compatible = "renesas,i2c-r8a7778"; 126 compatible = "renesas,i2c-r8a7778";
132 reg = <0xffc70000 0x1000>; 127 reg = <0xffc70000 0x1000>;
133 interrupt-parent = <&gic>;
134 interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>; 128 interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>;
135 status = "disabled"; 129 status = "disabled";
136 }; 130 };
@@ -140,7 +134,6 @@
140 #size-cells = <0>; 134 #size-cells = <0>;
141 compatible = "renesas,i2c-r8a7778"; 135 compatible = "renesas,i2c-r8a7778";
142 reg = <0xffc71000 0x1000>; 136 reg = <0xffc71000 0x1000>;
143 interrupt-parent = <&gic>;
144 interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>; 137 interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>;
145 status = "disabled"; 138 status = "disabled";
146 }; 139 };
@@ -150,7 +143,6 @@
150 #size-cells = <0>; 143 #size-cells = <0>;
151 compatible = "renesas,i2c-r8a7778"; 144 compatible = "renesas,i2c-r8a7778";
152 reg = <0xffc72000 0x1000>; 145 reg = <0xffc72000 0x1000>;
153 interrupt-parent = <&gic>;
154 interrupts = <0 76 IRQ_TYPE_LEVEL_HIGH>; 146 interrupts = <0 76 IRQ_TYPE_LEVEL_HIGH>;
155 status = "disabled"; 147 status = "disabled";
156 }; 148 };
@@ -160,7 +152,6 @@
160 #size-cells = <0>; 152 #size-cells = <0>;
161 compatible = "renesas,i2c-r8a7778"; 153 compatible = "renesas,i2c-r8a7778";
162 reg = <0xffc73000 0x1000>; 154 reg = <0xffc73000 0x1000>;
163 interrupt-parent = <&gic>;
164 interrupts = <0 77 IRQ_TYPE_LEVEL_HIGH>; 155 interrupts = <0 77 IRQ_TYPE_LEVEL_HIGH>;
165 status = "disabled"; 156 status = "disabled";
166 }; 157 };
@@ -168,7 +159,6 @@
168 mmcif: mmc@ffe4e000 { 159 mmcif: mmc@ffe4e000 {
169 compatible = "renesas,sh-mmcif"; 160 compatible = "renesas,sh-mmcif";
170 reg = <0xffe4e000 0x100>; 161 reg = <0xffe4e000 0x100>;
171 interrupt-parent = <&gic>;
172 interrupts = <0 61 IRQ_TYPE_LEVEL_HIGH>; 162 interrupts = <0 61 IRQ_TYPE_LEVEL_HIGH>;
173 status = "disabled"; 163 status = "disabled";
174 }; 164 };
@@ -176,7 +166,6 @@
176 sdhi0: sd@ffe4c000 { 166 sdhi0: sd@ffe4c000 {
177 compatible = "renesas,sdhi-r8a7778"; 167 compatible = "renesas,sdhi-r8a7778";
178 reg = <0xffe4c000 0x100>; 168 reg = <0xffe4c000 0x100>;
179 interrupt-parent = <&gic>;
180 interrupts = <0 87 IRQ_TYPE_LEVEL_HIGH>; 169 interrupts = <0 87 IRQ_TYPE_LEVEL_HIGH>;
181 cap-sd-highspeed; 170 cap-sd-highspeed;
182 cap-sdio-irq; 171 cap-sdio-irq;
@@ -186,7 +175,6 @@
186 sdhi1: sd@ffe4d000 { 175 sdhi1: sd@ffe4d000 {
187 compatible = "renesas,sdhi-r8a7778"; 176 compatible = "renesas,sdhi-r8a7778";
188 reg = <0xffe4d000 0x100>; 177 reg = <0xffe4d000 0x100>;
189 interrupt-parent = <&gic>;
190 interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>; 178 interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
191 cap-sd-highspeed; 179 cap-sd-highspeed;
192 cap-sdio-irq; 180 cap-sdio-irq;
@@ -196,7 +184,6 @@
196 sdhi2: sd@ffe4f000 { 184 sdhi2: sd@ffe4f000 {
197 compatible = "renesas,sdhi-r8a7778"; 185 compatible = "renesas,sdhi-r8a7778";
198 reg = <0xffe4f000 0x100>; 186 reg = <0xffe4f000 0x100>;
199 interrupt-parent = <&gic>;
200 interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>; 187 interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
201 cap-sd-highspeed; 188 cap-sd-highspeed;
202 cap-sdio-irq; 189 cap-sdio-irq;
@@ -204,26 +191,29 @@
204 }; 191 };
205 192
206 hspi0: spi@fffc7000 { 193 hspi0: spi@fffc7000 {
207 compatible = "renesas,hspi"; 194 compatible = "renesas,hspi-r8a7778", "renesas,hspi";
208 reg = <0xfffc7000 0x18>; 195 reg = <0xfffc7000 0x18>;
209 interrupt-controller = <&gic>;
210 interrupts = <0 63 IRQ_TYPE_LEVEL_HIGH>; 196 interrupts = <0 63 IRQ_TYPE_LEVEL_HIGH>;
197 #address-cells = <1>;
198 #size-cells = <0>;
211 status = "disabled"; 199 status = "disabled";
212 }; 200 };
213 201
214 hspi1: spi@fffc8000 { 202 hspi1: spi@fffc8000 {
215 compatible = "renesas,hspi"; 203 compatible = "renesas,hspi-r8a7778", "renesas,hspi";
216 reg = <0xfffc8000 0x18>; 204 reg = <0xfffc8000 0x18>;
217 interrupt-controller = <&gic>;
218 interrupts = <0 84 IRQ_TYPE_LEVEL_HIGH>; 205 interrupts = <0 84 IRQ_TYPE_LEVEL_HIGH>;
206 #address-cells = <1>;
207 #size-cells = <0>;
219 status = "disabled"; 208 status = "disabled";
220 }; 209 };
221 210
222 hspi2: spi@fffc6000 { 211 hspi2: spi@fffc6000 {
223 compatible = "renesas,hspi"; 212 compatible = "renesas,hspi-r8a7778", "renesas,hspi";
224 reg = <0xfffc6000 0x18>; 213 reg = <0xfffc6000 0x18>;
225 interrupt-controller = <&gic>;
226 interrupts = <0 85 IRQ_TYPE_LEVEL_HIGH>; 214 interrupts = <0 85 IRQ_TYPE_LEVEL_HIGH>;
215 #address-cells = <1>;
216 #size-cells = <0>;
227 status = "disabled"; 217 status = "disabled";
228 }; 218 };
229}; 219};
diff --git a/arch/arm/boot/dts/r8a7779-marzen-reference.dts b/arch/arm/boot/dts/r8a7779-marzen-reference.dts
index 76f5eef7d1cc..b27c6373ff4d 100644
--- a/arch/arm/boot/dts/r8a7779-marzen-reference.dts
+++ b/arch/arm/boot/dts/r8a7779-marzen-reference.dts
@@ -45,6 +45,7 @@
45 phy-mode = "mii"; 45 phy-mode = "mii";
46 interrupt-parent = <&irqpin0>; 46 interrupt-parent = <&irqpin0>;
47 interrupts = <1 IRQ_TYPE_EDGE_FALLING>; 47 interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
48 smsc,irq-push-pull;
48 reg-io-width = <4>; 49 reg-io-width = <4>;
49 vddvario-supply = <&fixedregulator3v3>; 50 vddvario-supply = <&fixedregulator3v3>;
50 vdd33a-supply = <&fixedregulator3v3>; 51 vdd33a-supply = <&fixedregulator3v3>;
diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
index d0561d4c7c46..b517c8e6b420 100644
--- a/arch/arm/boot/dts/r8a7779.dtsi
+++ b/arch/arm/boot/dts/r8a7779.dtsi
@@ -15,6 +15,7 @@
15 15
16/ { 16/ {
17 compatible = "renesas,r8a7779"; 17 compatible = "renesas,r8a7779";
18 interrupt-parent = <&gic>;
18 19
19 cpus { 20 cpus {
20 #address-cells = <1>; 21 #address-cells = <1>;
@@ -59,7 +60,6 @@
59 gpio0: gpio@ffc40000 { 60 gpio0: gpio@ffc40000 {
60 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; 61 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
61 reg = <0xffc40000 0x2c>; 62 reg = <0xffc40000 0x2c>;
62 interrupt-parent = <&gic>;
63 interrupts = <0 141 IRQ_TYPE_LEVEL_HIGH>; 63 interrupts = <0 141 IRQ_TYPE_LEVEL_HIGH>;
64 #gpio-cells = <2>; 64 #gpio-cells = <2>;
65 gpio-controller; 65 gpio-controller;
@@ -71,7 +71,6 @@
71 gpio1: gpio@ffc41000 { 71 gpio1: gpio@ffc41000 {
72 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; 72 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
73 reg = <0xffc41000 0x2c>; 73 reg = <0xffc41000 0x2c>;
74 interrupt-parent = <&gic>;
75 interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>; 74 interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>;
76 #gpio-cells = <2>; 75 #gpio-cells = <2>;
77 gpio-controller; 76 gpio-controller;
@@ -83,7 +82,6 @@
83 gpio2: gpio@ffc42000 { 82 gpio2: gpio@ffc42000 {
84 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; 83 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
85 reg = <0xffc42000 0x2c>; 84 reg = <0xffc42000 0x2c>;
86 interrupt-parent = <&gic>;
87 interrupts = <0 143 IRQ_TYPE_LEVEL_HIGH>; 85 interrupts = <0 143 IRQ_TYPE_LEVEL_HIGH>;
88 #gpio-cells = <2>; 86 #gpio-cells = <2>;
89 gpio-controller; 87 gpio-controller;
@@ -95,7 +93,6 @@
95 gpio3: gpio@ffc43000 { 93 gpio3: gpio@ffc43000 {
96 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; 94 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
97 reg = <0xffc43000 0x2c>; 95 reg = <0xffc43000 0x2c>;
98 interrupt-parent = <&gic>;
99 interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>; 96 interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>;
100 #gpio-cells = <2>; 97 #gpio-cells = <2>;
101 gpio-controller; 98 gpio-controller;
@@ -107,7 +104,6 @@
107 gpio4: gpio@ffc44000 { 104 gpio4: gpio@ffc44000 {
108 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; 105 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
109 reg = <0xffc44000 0x2c>; 106 reg = <0xffc44000 0x2c>;
110 interrupt-parent = <&gic>;
111 interrupts = <0 145 IRQ_TYPE_LEVEL_HIGH>; 107 interrupts = <0 145 IRQ_TYPE_LEVEL_HIGH>;
112 #gpio-cells = <2>; 108 #gpio-cells = <2>;
113 gpio-controller; 109 gpio-controller;
@@ -119,7 +115,6 @@
119 gpio5: gpio@ffc45000 { 115 gpio5: gpio@ffc45000 {
120 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; 116 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
121 reg = <0xffc45000 0x2c>; 117 reg = <0xffc45000 0x2c>;
122 interrupt-parent = <&gic>;
123 interrupts = <0 146 IRQ_TYPE_LEVEL_HIGH>; 118 interrupts = <0 146 IRQ_TYPE_LEVEL_HIGH>;
124 #gpio-cells = <2>; 119 #gpio-cells = <2>;
125 gpio-controller; 120 gpio-controller;
@@ -131,7 +126,6 @@
131 gpio6: gpio@ffc46000 { 126 gpio6: gpio@ffc46000 {
132 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; 127 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
133 reg = <0xffc46000 0x2c>; 128 reg = <0xffc46000 0x2c>;
134 interrupt-parent = <&gic>;
135 interrupts = <0 147 IRQ_TYPE_LEVEL_HIGH>; 129 interrupts = <0 147 IRQ_TYPE_LEVEL_HIGH>;
136 #gpio-cells = <2>; 130 #gpio-cells = <2>;
137 gpio-controller; 131 gpio-controller;
@@ -150,7 +144,6 @@
150 <0xfe780024 4>, 144 <0xfe780024 4>,
151 <0xfe780044 4>, 145 <0xfe780044 4>,
152 <0xfe780064 4>; 146 <0xfe780064 4>;
153 interrupt-parent = <&gic>;
154 interrupts = <0 27 IRQ_TYPE_LEVEL_HIGH 147 interrupts = <0 27 IRQ_TYPE_LEVEL_HIGH
155 0 28 IRQ_TYPE_LEVEL_HIGH 148 0 28 IRQ_TYPE_LEVEL_HIGH
156 0 29 IRQ_TYPE_LEVEL_HIGH 149 0 29 IRQ_TYPE_LEVEL_HIGH
@@ -163,7 +156,6 @@
163 #size-cells = <0>; 156 #size-cells = <0>;
164 compatible = "renesas,i2c-r8a7779"; 157 compatible = "renesas,i2c-r8a7779";
165 reg = <0xffc70000 0x1000>; 158 reg = <0xffc70000 0x1000>;
166 interrupt-parent = <&gic>;
167 interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>; 159 interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>;
168 status = "disabled"; 160 status = "disabled";
169 }; 161 };
@@ -173,7 +165,6 @@
173 #size-cells = <0>; 165 #size-cells = <0>;
174 compatible = "renesas,i2c-r8a7779"; 166 compatible = "renesas,i2c-r8a7779";
175 reg = <0xffc71000 0x1000>; 167 reg = <0xffc71000 0x1000>;
176 interrupt-parent = <&gic>;
177 interrupts = <0 82 IRQ_TYPE_LEVEL_HIGH>; 168 interrupts = <0 82 IRQ_TYPE_LEVEL_HIGH>;
178 status = "disabled"; 169 status = "disabled";
179 }; 170 };
@@ -183,7 +174,6 @@
183 #size-cells = <0>; 174 #size-cells = <0>;
184 compatible = "renesas,i2c-r8a7779"; 175 compatible = "renesas,i2c-r8a7779";
185 reg = <0xffc72000 0x1000>; 176 reg = <0xffc72000 0x1000>;
186 interrupt-parent = <&gic>;
187 interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>; 177 interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>;
188 status = "disabled"; 178 status = "disabled";
189 }; 179 };
@@ -193,7 +183,6 @@
193 #size-cells = <0>; 183 #size-cells = <0>;
194 compatible = "renesas,i2c-r8a7779"; 184 compatible = "renesas,i2c-r8a7779";
195 reg = <0xffc73000 0x1000>; 185 reg = <0xffc73000 0x1000>;
196 interrupt-parent = <&gic>;
197 interrupts = <0 81 IRQ_TYPE_LEVEL_HIGH>; 186 interrupts = <0 81 IRQ_TYPE_LEVEL_HIGH>;
198 status = "disabled"; 187 status = "disabled";
199 }; 188 };
@@ -211,14 +200,12 @@
211 sata: sata@fc600000 { 200 sata: sata@fc600000 {
212 compatible = "renesas,rcar-sata"; 201 compatible = "renesas,rcar-sata";
213 reg = <0xfc600000 0x2000>; 202 reg = <0xfc600000 0x2000>;
214 interrupt-parent = <&gic>;
215 interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>; 203 interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
216 }; 204 };
217 205
218 sdhi0: sd@ffe4c000 { 206 sdhi0: sd@ffe4c000 {
219 compatible = "renesas,sdhi-r8a7779"; 207 compatible = "renesas,sdhi-r8a7779";
220 reg = <0xffe4c000 0x100>; 208 reg = <0xffe4c000 0x100>;
221 interrupt-parent = <&gic>;
222 interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>; 209 interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>;
223 cap-sd-highspeed; 210 cap-sd-highspeed;
224 cap-sdio-irq; 211 cap-sdio-irq;
@@ -228,7 +215,6 @@
228 sdhi1: sd@ffe4d000 { 215 sdhi1: sd@ffe4d000 {
229 compatible = "renesas,sdhi-r8a7779"; 216 compatible = "renesas,sdhi-r8a7779";
230 reg = <0xffe4d000 0x100>; 217 reg = <0xffe4d000 0x100>;
231 interrupt-parent = <&gic>;
232 interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>; 218 interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
233 cap-sd-highspeed; 219 cap-sd-highspeed;
234 cap-sdio-irq; 220 cap-sdio-irq;
@@ -238,7 +224,6 @@
238 sdhi2: sd@ffe4e000 { 224 sdhi2: sd@ffe4e000 {
239 compatible = "renesas,sdhi-r8a7779"; 225 compatible = "renesas,sdhi-r8a7779";
240 reg = <0xffe4e000 0x100>; 226 reg = <0xffe4e000 0x100>;
241 interrupt-parent = <&gic>;
242 interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>; 227 interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
243 cap-sd-highspeed; 228 cap-sd-highspeed;
244 cap-sdio-irq; 229 cap-sdio-irq;
@@ -248,7 +233,6 @@
248 sdhi3: sd@ffe4f000 { 233 sdhi3: sd@ffe4f000 {
249 compatible = "renesas,sdhi-r8a7779"; 234 compatible = "renesas,sdhi-r8a7779";
250 reg = <0xffe4f000 0x100>; 235 reg = <0xffe4f000 0x100>;
251 interrupt-parent = <&gic>;
252 interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>; 236 interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>;
253 cap-sd-highspeed; 237 cap-sd-highspeed;
254 cap-sdio-irq; 238 cap-sdio-irq;
@@ -256,26 +240,29 @@
256 }; 240 };
257 241
258 hspi0: spi@fffc7000 { 242 hspi0: spi@fffc7000 {
259 compatible = "renesas,hspi"; 243 compatible = "renesas,hspi-r8a7779", "renesas,hspi";
260 reg = <0xfffc7000 0x18>; 244 reg = <0xfffc7000 0x18>;
261 interrupt-controller = <&gic>;
262 interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>; 245 interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>;
246 #address-cells = <1>;
247 #size-cells = <0>;
263 status = "disabled"; 248 status = "disabled";
264 }; 249 };
265 250
266 hspi1: spi@fffc8000 { 251 hspi1: spi@fffc8000 {
267 compatible = "renesas,hspi"; 252 compatible = "renesas,hspi-r8a7779", "renesas,hspi";
268 reg = <0xfffc8000 0x18>; 253 reg = <0xfffc8000 0x18>;
269 interrupt-controller = <&gic>;
270 interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>; 254 interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>;
255 #address-cells = <1>;
256 #size-cells = <0>;
271 status = "disabled"; 257 status = "disabled";
272 }; 258 };
273 259
274 hspi2: spi@fffc6000 { 260 hspi2: spi@fffc6000 {
275 compatible = "renesas,hspi"; 261 compatible = "renesas,hspi-r8a7779", "renesas,hspi";
276 reg = <0xfffc6000 0x18>; 262 reg = <0xfffc6000 0x18>;
277 interrupt-controller = <&gic>;
278 interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>; 263 interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>;
264 #address-cells = <1>;
265 #size-cells = <0>;
279 status = "disabled"; 266 status = "disabled";
280 }; 267 };
281}; 268};
diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
index d01048ab3e77..dd2fe46073f2 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -12,11 +12,17 @@
12/dts-v1/; 12/dts-v1/;
13#include "r8a7790.dtsi" 13#include "r8a7790.dtsi"
14#include <dt-bindings/gpio/gpio.h> 14#include <dt-bindings/gpio/gpio.h>
15#include <dt-bindings/input/input.h>
15 16
16/ { 17/ {
17 model = "Lager"; 18 model = "Lager";
18 compatible = "renesas,lager", "renesas,r8a7790"; 19 compatible = "renesas,lager", "renesas,r8a7790";
19 20
21 aliases {
22 serial6 = &scif0;
23 serial7 = &scif1;
24 };
25
20 chosen { 26 chosen {
21 bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp"; 27 bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
22 }; 28 };
@@ -36,6 +42,39 @@
36 #size-cells = <1>; 42 #size-cells = <1>;
37 }; 43 };
38 44
45 gpio_keys {
46 compatible = "gpio-keys";
47
48 button@1 {
49 linux,code = <KEY_1>;
50 label = "SW2-1";
51 gpio-key,wakeup;
52 debounce-interval = <20>;
53 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
54 };
55 button@2 {
56 linux,code = <KEY_2>;
57 label = "SW2-2";
58 gpio-key,wakeup;
59 debounce-interval = <20>;
60 gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
61 };
62 button@3 {
63 linux,code = <KEY_3>;
64 label = "SW2-3";
65 gpio-key,wakeup;
66 debounce-interval = <20>;
67 gpios = <&gpio1 26 GPIO_ACTIVE_LOW>;
68 };
69 button@4 {
70 linux,code = <KEY_4>;
71 label = "SW2-4";
72 gpio-key,wakeup;
73 debounce-interval = <20>;
74 gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
75 };
76 };
77
39 leds { 78 leds {
40 compatible = "gpio-leds"; 79 compatible = "gpio-leds";
41 led6 { 80 led6 {
@@ -112,7 +151,7 @@
112}; 151};
113 152
114&pfc { 153&pfc {
115 pinctrl-0 = <&du_pins &scif0_pins &scif1_pins>; 154 pinctrl-0 = <&du_pins>;
116 pinctrl-names = "default"; 155 pinctrl-names = "default";
117 156
118 du_pins: du { 157 du_pins: du {
@@ -155,10 +194,16 @@
155 renesas,function = "mmc1"; 194 renesas,function = "mmc1";
156 }; 195 };
157 196
158 qspi_pins: spi { 197 qspi_pins: spi0 {
159 renesas,groups = "qspi_ctrl", "qspi_data4"; 198 renesas,groups = "qspi_ctrl", "qspi_data4";
160 renesas,function = "qspi"; 199 renesas,function = "qspi";
161 }; 200 };
201
202 msiof1_pins: spi2 {
203 renesas,groups = "msiof1_clk", "msiof1_sync", "msiof1_rx",
204 "msiof1_tx";
205 renesas,function = "msiof1";
206 };
162}; 207};
163 208
164&ether { 209&ether {
@@ -173,6 +218,7 @@
173 reg = <1>; 218 reg = <1>;
174 interrupt-parent = <&irqc0>; 219 interrupt-parent = <&irqc0>;
175 interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 220 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
221 micrel,led-mode = <1>;
176 }; 222 };
177}; 223};
178 224
@@ -190,7 +236,7 @@
190 status = "okay"; 236 status = "okay";
191}; 237};
192 238
193&spi { 239&qspi {
194 pinctrl-0 = <&qspi_pins>; 240 pinctrl-0 = <&qspi_pins>;
195 pinctrl-names = "default"; 241 pinctrl-names = "default";
196 242
@@ -202,6 +248,8 @@
202 compatible = "spansion,s25fl512s"; 248 compatible = "spansion,s25fl512s";
203 reg = <0>; 249 reg = <0>;
204 spi-max-frequency = <30000000>; 250 spi-max-frequency = <30000000>;
251 spi-tx-bus-width = <4>;
252 spi-rx-bus-width = <4>;
205 m25p,fast-read; 253 m25p,fast-read;
206 254
207 partition@0 { 255 partition@0 {
@@ -221,6 +269,35 @@
221 }; 269 };
222}; 270};
223 271
272&scif0 {
273 pinctrl-0 = <&scif0_pins>;
274 pinctrl-names = "default";
275
276 status = "okay";
277};
278
279&scif1 {
280 pinctrl-0 = <&scif1_pins>;
281 pinctrl-names = "default";
282
283 status = "okay";
284};
285
286&msiof1 {
287 pinctrl-0 = <&msiof1_pins>;
288 pinctrl-names = "default";
289
290 status = "okay";
291
292 pmic: pmic@0 {
293 compatible = "renesas,r2a11302ft";
294 reg = <0>;
295 spi-max-frequency = <6000000>;
296 spi-cpol;
297 spi-cpha;
298 };
299};
300
224&sdhi0 { 301&sdhi0 {
225 pinctrl-0 = <&sdhi0_pins>; 302 pinctrl-0 = <&sdhi0_pins>;
226 pinctrl-names = "default"; 303 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 618e5b537eaf..7ff29601f962 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -24,6 +24,15 @@
24 i2c1 = &i2c1; 24 i2c1 = &i2c1;
25 i2c2 = &i2c2; 25 i2c2 = &i2c2;
26 i2c3 = &i2c3; 26 i2c3 = &i2c3;
27 i2c4 = &iic0;
28 i2c5 = &iic1;
29 i2c6 = &iic2;
30 i2c7 = &iic3;
31 spi0 = &qspi;
32 spi1 = &msiof0;
33 spi2 = &msiof1;
34 spi3 = &msiof2;
35 spi4 = &msiof3;
27 }; 36 };
28 37
29 cpus { 38 cpus {
@@ -108,6 +117,7 @@
108 gpio-ranges = <&pfc 0 0 32>; 117 gpio-ranges = <&pfc 0 0 32>;
109 #interrupt-cells = <2>; 118 #interrupt-cells = <2>;
110 interrupt-controller; 119 interrupt-controller;
120 clocks = <&mstp9_clks R8A7790_CLK_GPIO0>;
111 }; 121 };
112 122
113 gpio1: gpio@e6051000 { 123 gpio1: gpio@e6051000 {
@@ -119,6 +129,7 @@
119 gpio-ranges = <&pfc 0 32 32>; 129 gpio-ranges = <&pfc 0 32 32>;
120 #interrupt-cells = <2>; 130 #interrupt-cells = <2>;
121 interrupt-controller; 131 interrupt-controller;
132 clocks = <&mstp9_clks R8A7790_CLK_GPIO1>;
122 }; 133 };
123 134
124 gpio2: gpio@e6052000 { 135 gpio2: gpio@e6052000 {
@@ -130,6 +141,7 @@
130 gpio-ranges = <&pfc 0 64 32>; 141 gpio-ranges = <&pfc 0 64 32>;
131 #interrupt-cells = <2>; 142 #interrupt-cells = <2>;
132 interrupt-controller; 143 interrupt-controller;
144 clocks = <&mstp9_clks R8A7790_CLK_GPIO2>;
133 }; 145 };
134 146
135 gpio3: gpio@e6053000 { 147 gpio3: gpio@e6053000 {
@@ -141,6 +153,7 @@
141 gpio-ranges = <&pfc 0 96 32>; 153 gpio-ranges = <&pfc 0 96 32>;
142 #interrupt-cells = <2>; 154 #interrupt-cells = <2>;
143 interrupt-controller; 155 interrupt-controller;
156 clocks = <&mstp9_clks R8A7790_CLK_GPIO3>;
144 }; 157 };
145 158
146 gpio4: gpio@e6054000 { 159 gpio4: gpio@e6054000 {
@@ -152,6 +165,7 @@
152 gpio-ranges = <&pfc 0 128 32>; 165 gpio-ranges = <&pfc 0 128 32>;
153 #interrupt-cells = <2>; 166 #interrupt-cells = <2>;
154 interrupt-controller; 167 interrupt-controller;
168 clocks = <&mstp9_clks R8A7790_CLK_GPIO4>;
155 }; 169 };
156 170
157 gpio5: gpio@e6055000 { 171 gpio5: gpio@e6055000 {
@@ -163,6 +177,7 @@
163 gpio-ranges = <&pfc 0 160 32>; 177 gpio-ranges = <&pfc 0 160 32>;
164 #interrupt-cells = <2>; 178 #interrupt-cells = <2>;
165 interrupt-controller; 179 interrupt-controller;
180 clocks = <&mstp9_clks R8A7790_CLK_GPIO5>;
166 }; 181 };
167 182
168 thermal@e61f0000 { 183 thermal@e61f0000 {
@@ -231,6 +246,46 @@
231 status = "disabled"; 246 status = "disabled";
232 }; 247 };
233 248
249 iic0: i2c@e6500000 {
250 #address-cells = <1>;
251 #size-cells = <0>;
252 compatible = "renesas,iic-r8a7790", "renesas,rmobile-iic";
253 reg = <0 0xe6500000 0 0x425>;
254 interrupts = <0 174 IRQ_TYPE_LEVEL_HIGH>;
255 clocks = <&mstp3_clks R8A7790_CLK_IIC0>;
256 status = "disabled";
257 };
258
259 iic1: i2c@e6510000 {
260 #address-cells = <1>;
261 #size-cells = <0>;
262 compatible = "renesas,iic-r8a7790", "renesas,rmobile-iic";
263 reg = <0 0xe6510000 0 0x425>;
264 interrupts = <0 175 IRQ_TYPE_LEVEL_HIGH>;
265 clocks = <&mstp3_clks R8A7790_CLK_IIC1>;
266 status = "disabled";
267 };
268
269 iic2: i2c@e6520000 {
270 #address-cells = <1>;
271 #size-cells = <0>;
272 compatible = "renesas,iic-r8a7790", "renesas,rmobile-iic";
273 reg = <0 0xe6520000 0 0x425>;
274 interrupts = <0 176 IRQ_TYPE_LEVEL_HIGH>;
275 clocks = <&mstp3_clks R8A7790_CLK_IIC2>;
276 status = "disabled";
277 };
278
279 iic3: i2c@e60b0000 {
280 #address-cells = <1>;
281 #size-cells = <0>;
282 compatible = "renesas,iic-r8a7790", "renesas,rmobile-iic";
283 reg = <0 0xe60b0000 0 0x425>;
284 interrupts = <0 173 IRQ_TYPE_LEVEL_HIGH>;
285 clocks = <&mstp9_clks R8A7790_CLK_IICDVFS>;
286 status = "disabled";
287 };
288
234 mmcif0: mmcif@ee200000 { 289 mmcif0: mmcif@ee200000 {
235 compatible = "renesas,mmcif-r8a7790", "renesas,sh-mmcif"; 290 compatible = "renesas,mmcif-r8a7790", "renesas,sh-mmcif";
236 reg = <0 0xee200000 0 0x80>; 291 reg = <0 0xee200000 0 0x80>;
@@ -673,7 +728,7 @@
673 renesas,clock-indices = < 728 renesas,clock-indices = <
674 R8A7790_CLK_TMU1 R8A7790_CLK_TMU3 R8A7790_CLK_TMU2 729 R8A7790_CLK_TMU1 R8A7790_CLK_TMU3 R8A7790_CLK_TMU2
675 R8A7790_CLK_CMT0 R8A7790_CLK_TMU0 R8A7790_CLK_VSP1_DU1 730 R8A7790_CLK_CMT0 R8A7790_CLK_TMU0 R8A7790_CLK_VSP1_DU1
676 R8A7790_CLK_VSP1_DU0 R8A7790_CLK_VSP1_RT R8A7790_CLK_VSP1_SY 731 R8A7790_CLK_VSP1_DU0 R8A7790_CLK_VSP1_R R8A7790_CLK_VSP1_S
677 >; 732 >;
678 clock-output-names = 733 clock-output-names =
679 "tmu1", "tmu3", "tmu2", "cmt0", "tmu0", "vsp1-du1", 734 "tmu1", "tmu3", "tmu2", "cmt0", "tmu0", "vsp1-du1",
@@ -697,18 +752,19 @@
697 mstp3_clks: mstp3_clks@e615013c { 752 mstp3_clks: mstp3_clks@e615013c {
698 compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks"; 753 compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
699 reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>; 754 reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
700 clocks = <&cp_clk>, <&mmc1_clk>, <&sd3_clk>, <&sd2_clk>, 755 clocks = <&hp_clk>, <&cp_clk>, <&mmc1_clk>, <&sd3_clk>,
701 <&cpg_clocks R8A7790_CLK_SD1>, <&cpg_clocks R8A7790_CLK_SD0>, 756 <&sd2_clk>, <&cpg_clocks R8A7790_CLK_SD1>, <&cpg_clocks R8A7790_CLK_SD0>, <&mmc0_clk>,
702 <&mmc0_clk>, <&rclk_clk>; 757 <&hp_clk>, <&hp_clk>, <&rclk_clk>;
703 #clock-cells = <1>; 758 #clock-cells = <1>;
704 renesas,clock-indices = < 759 renesas,clock-indices = <
705 R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3 760 R8A7790_CLK_IIC2 R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3
706 R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0 761 R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0 R8A7790_CLK_MMCIF0
707 R8A7790_CLK_MMCIF0 R8A7790_CLK_CMT1 762 R8A7790_CLK_IIC0 R8A7790_CLK_IIC1 R8A7790_CLK_CMT1
708 >; 763 >;
709 clock-output-names = 764 clock-output-names =
710 "tpu0", "mmcif1", "sdhi3", "sdhi2", 765 "iic2", "tpu0", "mmcif1", "sdhi3",
711 "sdhi1", "sdhi0", "mmcif0", "cmt1"; 766 "sdhi2", "sdhi1", "sdhi0", "mmcif0",
767 "iic0", "iic1", "cmt1";
712 }; 768 };
713 mstp5_clks: mstp5_clks@e6150144 { 769 mstp5_clks: mstp5_clks@e6150144 {
714 compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks"; 770 compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
@@ -752,20 +808,25 @@
752 mstp9_clks: mstp9_clks@e6150994 { 808 mstp9_clks: mstp9_clks@e6150994 {
753 compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks"; 809 compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
754 reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>; 810 reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>;
755 clocks = <&p_clk>, <&p_clk>, <&cpg_clocks R8A7790_CLK_QSPI>, 811 clocks = <&cp_clk>, <&cp_clk>, <&cp_clk>,
756 <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>; 812 <&cp_clk>, <&cp_clk>, <&cp_clk>,
813 <&p_clk>, <&p_clk>, <&cpg_clocks R8A7790_CLK_QSPI>, <&cp_clk>,
814 <&hp_clk>, <&hp_clk>, <&hp_clk>, <&hp_clk>;
757 #clock-cells = <1>; 815 #clock-cells = <1>;
758 renesas,clock-indices = < 816 renesas,clock-indices = <
759 R8A7790_CLK_RCAN1 R8A7790_CLK_RCAN0 R8A7790_CLK_QSPI_MOD 817 R8A7790_CLK_GPIO5 R8A7790_CLK_GPIO4 R8A7790_CLK_GPIO3
760 R8A7790_CLK_I2C3 R8A7790_CLK_I2C2 R8A7790_CLK_I2C1 818 R8A7790_CLK_GPIO2 R8A7790_CLK_GPIO1 R8A7790_CLK_GPIO0
761 R8A7790_CLK_I2C0 819 R8A7790_CLK_RCAN1 R8A7790_CLK_RCAN0 R8A7790_CLK_QSPI_MOD R8A7790_CLK_IICDVFS
820 R8A7790_CLK_I2C3 R8A7790_CLK_I2C2 R8A7790_CLK_I2C1 R8A7790_CLK_I2C0
762 >; 821 >;
763 clock-output-names = 822 clock-output-names =
764 "rcan1", "rcan0", "qspi_mod", "i2c3", "i2c2", "i2c1", "i2c0"; 823 "gpio5", "gpio4", "gpio3", "gpio2", "gpio1", "gpio0",
824 "rcan1", "rcan0", "qspi_mod", "iic3",
825 "i2c3", "i2c2", "i2c1", "i2c0";
765 }; 826 };
766 }; 827 };
767 828
768 spi: spi@e6b10000 { 829 qspi: spi@e6b10000 {
769 compatible = "renesas,qspi-r8a7790", "renesas,qspi"; 830 compatible = "renesas,qspi-r8a7790", "renesas,qspi";
770 reg = <0 0xe6b10000 0 0x2c>; 831 reg = <0 0xe6b10000 0 0x2c>;
771 interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>; 832 interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
@@ -775,4 +836,44 @@
775 #size-cells = <0>; 836 #size-cells = <0>;
776 status = "disabled"; 837 status = "disabled";
777 }; 838 };
839
840 msiof0: spi@e6e20000 {
841 compatible = "renesas,msiof-r8a7790";
842 reg = <0 0xe6e20000 0 0x0064>;
843 interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
844 clocks = <&mstp0_clks R8A7790_CLK_MSIOF0>;
845 #address-cells = <1>;
846 #size-cells = <0>;
847 status = "disabled";
848 };
849
850 msiof1: spi@e6e10000 {
851 compatible = "renesas,msiof-r8a7790";
852 reg = <0 0xe6e10000 0 0x0064>;
853 interrupts = <0 157 IRQ_TYPE_LEVEL_HIGH>;
854 clocks = <&mstp2_clks R8A7790_CLK_MSIOF1>;
855 #address-cells = <1>;
856 #size-cells = <0>;
857 status = "disabled";
858 };
859
860 msiof2: spi@e6e00000 {
861 compatible = "renesas,msiof-r8a7790";
862 reg = <0 0xe6e00000 0 0x0064>;
863 interrupts = <0 158 IRQ_TYPE_LEVEL_HIGH>;
864 clocks = <&mstp2_clks R8A7790_CLK_MSIOF2>;
865 #address-cells = <1>;
866 #size-cells = <0>;
867 status = "disabled";
868 };
869
870 msiof3: spi@e6c90000 {
871 compatible = "renesas,msiof-r8a7790";
872 reg = <0 0xe6c90000 0 0x0064>;
873 interrupts = <0 159 IRQ_TYPE_LEVEL_HIGH>;
874 clocks = <&mstp2_clks R8A7790_CLK_MSIOF3>;
875 #address-cells = <1>;
876 #size-cells = <0>;
877 status = "disabled";
878 };
778}; 879};
diff --git a/arch/arm/boot/dts/r8a7791-henninger.dts b/arch/arm/boot/dts/r8a7791-henninger.dts
new file mode 100644
index 000000000000..cc6d992e8db2
--- /dev/null
+++ b/arch/arm/boot/dts/r8a7791-henninger.dts
@@ -0,0 +1,219 @@
1/*
2 * Device Tree Source for the Henninger board
3 *
4 * Copyright (C) 2014 Renesas Solutions Corp.
5 * Copyright (C) 2014 Cogent Embedded, Inc.
6 *
7 * This file is licensed under the terms of the GNU General Public License
8 * version 2. This program is licensed "as is" without any warranty of any
9 * kind, whether express or implied.
10 */
11
12/dts-v1/;
13#include "r8a7791.dtsi"
14#include <dt-bindings/gpio/gpio.h>
15
16/ {
17 model = "Henninger";
18 compatible = "renesas,henninger", "renesas,r8a7791";
19
20 aliases {
21 serial0 = &scif0;
22 };
23
24 chosen {
25 bootargs = "console=ttySC0,38400 ignore_loglevel rw root=/dev/nfs ip=dhcp";
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_sdhi0: regulator@0 {
39 compatible = "regulator-fixed";
40
41 regulator-name = "SDHI0 Vcc";
42 regulator-min-microvolt = <3300000>;
43 regulator-max-microvolt = <3300000>;
44 regulator-always-on;
45 };
46
47 vccq_sdhi0: regulator@1 {
48 compatible = "regulator-gpio";
49
50 regulator-name = "SDHI0 VccQ";
51 regulator-min-microvolt = <1800000>;
52 regulator-max-microvolt = <3300000>;
53
54 gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
55 gpios-states = <1>;
56 states = <3300000 1
57 1800000 0>;
58 };
59
60 vcc_sdhi2: regulator@2 {
61 compatible = "regulator-fixed";
62
63 regulator-name = "SDHI2 Vcc";
64 regulator-min-microvolt = <3300000>;
65 regulator-max-microvolt = <3300000>;
66 regulator-always-on;
67 };
68
69 vccq_sdhi2: regulator@3 {
70 compatible = "regulator-gpio";
71
72 regulator-name = "SDHI2 VccQ";
73 regulator-min-microvolt = <1800000>;
74 regulator-max-microvolt = <3300000>;
75
76 gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
77 gpios-states = <1>;
78 states = <3300000 1
79 1800000 0>;
80 };
81};
82
83&extal_clk {
84 clock-frequency = <20000000>;
85};
86
87&pfc {
88 scif0_pins: serial0 {
89 renesas,groups = "scif0_data_d";
90 renesas,function = "scif0";
91 };
92
93 ether_pins: ether {
94 renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
95 renesas,function = "eth";
96 };
97
98 phy1_pins: phy1 {
99 renesas,groups = "intc_irq0";
100 renesas,function = "intc";
101 };
102
103 sdhi0_pins: sd0 {
104 renesas,groups = "sdhi0_data4", "sdhi0_ctrl";
105 renesas,function = "sdhi0";
106 };
107
108 sdhi2_pins: sd2 {
109 renesas,groups = "sdhi2_data4", "sdhi2_ctrl";
110 renesas,function = "sdhi2";
111 };
112
113 qspi_pins: spi0 {
114 renesas,groups = "qspi_ctrl", "qspi_data4";
115 renesas,function = "qspi";
116 };
117
118 msiof0_pins: spi1 {
119 renesas,groups = "msiof0_clk", "msiof0_sync", "msiof0_rx",
120 "msiof0_tx";
121 renesas,function = "msiof0";
122 };
123};
124
125&scif0 {
126 pinctrl-0 = <&scif0_pins>;
127 pinctrl-names = "default";
128
129 status = "okay";
130};
131
132&ether {
133 pinctrl-0 = <&ether_pins &phy1_pins>;
134 pinctrl-names = "default";
135
136 phy-handle = <&phy1>;
137 renesas,ether-link-active-low;
138 status = "ok";
139
140 phy1: ethernet-phy@1 {
141 reg = <1>;
142 interrupt-parent = <&irqc0>;
143 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
144 micrel,led-mode = <1>;
145 };
146};
147
148&sata0 {
149 status = "okay";
150};
151
152&sdhi0 {
153 pinctrl-0 = <&sdhi0_pins>;
154 pinctrl-names = "default";
155
156 vmmc-supply = <&vcc_sdhi0>;
157 vqmmc-supply = <&vccq_sdhi0>;
158 cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
159 wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
160 status = "okay";
161};
162
163&sdhi2 {
164 pinctrl-0 = <&sdhi2_pins>;
165 pinctrl-names = "default";
166
167 vmmc-supply = <&vcc_sdhi2>;
168 vqmmc-supply = <&vccq_sdhi2>;
169 cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>;
170 status = "okay";
171};
172
173&qspi {
174 pinctrl-0 = <&qspi_pins>;
175 pinctrl-names = "default";
176
177 status = "okay";
178
179 flash@0 {
180 #address-cells = <1>;
181 #size-cells = <1>;
182 compatible = "spansion,s25fl512s";
183 reg = <0>;
184 spi-max-frequency = <30000000>;
185 spi-tx-bus-width = <4>;
186 spi-rx-bus-width = <4>;
187 m25p,fast-read;
188
189 partition@0 {
190 label = "loader_prg";
191 reg = <0x00000000 0x00040000>;
192 read-only;
193 };
194 partition@40000 {
195 label = "user_prg";
196 reg = <0x00040000 0x00400000>;
197 read-only;
198 };
199 partition@440000 {
200 label = "flash_fs";
201 reg = <0x00440000 0x03bc0000>;
202 };
203 };
204};
205
206&msiof0 {
207 pinctrl-0 = <&msiof0_pins>;
208 pinctrl-names = "default";
209
210 status = "okay";
211
212 pmic@0 {
213 compatible = "renesas,r2a11302ft";
214 reg = <0>;
215 spi-max-frequency = <6000000>;
216 spi-cpol;
217 spi-cpha;
218 };
219};
diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
index de1b6977c69a..05d44f9b202f 100644
--- a/arch/arm/boot/dts/r8a7791-koelsch.dts
+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
@@ -13,11 +13,17 @@
13/dts-v1/; 13/dts-v1/;
14#include "r8a7791.dtsi" 14#include "r8a7791.dtsi"
15#include <dt-bindings/gpio/gpio.h> 15#include <dt-bindings/gpio/gpio.h>
16#include <dt-bindings/input/input.h>
16 17
17/ { 18/ {
18 model = "Koelsch"; 19 model = "Koelsch";
19 compatible = "renesas,koelsch", "renesas,r8a7791"; 20 compatible = "renesas,koelsch", "renesas,r8a7791";
20 21
22 aliases {
23 serial6 = &scif0;
24 serial7 = &scif1;
25 };
26
21 chosen { 27 chosen {
22 bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp"; 28 bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
23 }; 29 };
@@ -40,51 +46,79 @@
40 gpio-keys { 46 gpio-keys {
41 compatible = "gpio-keys"; 47 compatible = "gpio-keys";
42 48
49 key-1 {
50 gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_1>;
52 label = "SW2-1";
53 gpio-key,wakeup;
54 debounce-interval = <20>;
55 };
56 key-2 {
57 gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
58 linux,code = <KEY_2>;
59 label = "SW2-2";
60 gpio-key,wakeup;
61 debounce-interval = <20>;
62 };
63 key-3 {
64 gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_3>;
66 label = "SW2-3";
67 gpio-key,wakeup;
68 debounce-interval = <20>;
69 };
70 key-4 {
71 gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
72 linux,code = <KEY_4>;
73 label = "SW2-4";
74 gpio-key,wakeup;
75 debounce-interval = <20>;
76 };
43 key-a { 77 key-a {
44 gpios = <&gpio7 0 GPIO_ACTIVE_LOW>; 78 gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
45 linux,code = <30>; 79 linux,code = <KEY_A>;
46 label = "SW30"; 80 label = "SW30";
47 gpio-key,wakeup; 81 gpio-key,wakeup;
48 debounce-interval = <20>; 82 debounce-interval = <20>;
49 }; 83 };
50 key-b { 84 key-b {
51 gpios = <&gpio7 1 GPIO_ACTIVE_LOW>; 85 gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
52 linux,code = <48>; 86 linux,code = <KEY_B>;
53 label = "SW31"; 87 label = "SW31";
54 gpio-key,wakeup; 88 gpio-key,wakeup;
55 debounce-interval = <20>; 89 debounce-interval = <20>;
56 }; 90 };
57 key-c { 91 key-c {
58 gpios = <&gpio7 2 GPIO_ACTIVE_LOW>; 92 gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
59 linux,code = <46>; 93 linux,code = <KEY_C>;
60 label = "SW32"; 94 label = "SW32";
61 gpio-key,wakeup; 95 gpio-key,wakeup;
62 debounce-interval = <20>; 96 debounce-interval = <20>;
63 }; 97 };
64 key-d { 98 key-d {
65 gpios = <&gpio7 3 GPIO_ACTIVE_LOW>; 99 gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
66 linux,code = <32>; 100 linux,code = <KEY_D>;
67 label = "SW33"; 101 label = "SW33";
68 gpio-key,wakeup; 102 gpio-key,wakeup;
69 debounce-interval = <20>; 103 debounce-interval = <20>;
70 }; 104 };
71 key-e { 105 key-e {
72 gpios = <&gpio7 4 GPIO_ACTIVE_LOW>; 106 gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
73 linux,code = <18>; 107 linux,code = <KEY_E>;
74 label = "SW34"; 108 label = "SW34";
75 gpio-key,wakeup; 109 gpio-key,wakeup;
76 debounce-interval = <20>; 110 debounce-interval = <20>;
77 }; 111 };
78 key-f { 112 key-f {
79 gpios = <&gpio7 5 GPIO_ACTIVE_LOW>; 113 gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
80 linux,code = <33>; 114 linux,code = <KEY_F>;
81 label = "SW35"; 115 label = "SW35";
82 gpio-key,wakeup; 116 gpio-key,wakeup;
83 debounce-interval = <20>; 117 debounce-interval = <20>;
84 }; 118 };
85 key-g { 119 key-g {
86 gpios = <&gpio7 6 GPIO_ACTIVE_LOW>; 120 gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
87 linux,code = <34>; 121 linux,code = <KEY_G>;
88 label = "SW36"; 122 label = "SW36";
89 gpio-key,wakeup; 123 gpio-key,wakeup;
90 debounce-interval = <20>; 124 debounce-interval = <20>;
@@ -195,11 +229,16 @@
195 }; 229 };
196}; 230};
197 231
232&i2c6 {
233 status = "okay";
234 clock-frequency = <100000>;
235};
236
198&pfc { 237&pfc {
199 pinctrl-0 = <&du_pins &scif0_pins &scif1_pins>; 238 pinctrl-0 = <&du_pins>;
200 pinctrl-names = "default"; 239 pinctrl-names = "default";
201 240
202 i2c2_pins: i2c { 241 i2c2_pins: i2c2 {
203 renesas,groups = "i2c2"; 242 renesas,groups = "i2c2";
204 renesas,function = "i2c2"; 243 renesas,function = "i2c2";
205 }; 244 };
@@ -244,10 +283,16 @@
244 renesas,function = "sdhi2"; 283 renesas,function = "sdhi2";
245 }; 284 };
246 285
247 qspi_pins: spi { 286 qspi_pins: spi0 {
248 renesas,groups = "qspi_ctrl", "qspi_data4"; 287 renesas,groups = "qspi_ctrl", "qspi_data4";
249 renesas,function = "qspi"; 288 renesas,function = "qspi";
250 }; 289 };
290
291 msiof0_pins: spi1 {
292 renesas,groups = "msiof0_clk", "msiof0_sync", "msiof0_rx",
293 "msiof0_tx";
294 renesas,function = "msiof0";
295 };
251}; 296};
252 297
253&ether { 298&ether {
@@ -262,6 +307,7 @@
262 reg = <1>; 307 reg = <1>;
263 interrupt-parent = <&irqc0>; 308 interrupt-parent = <&irqc0>;
264 interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 309 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
310 micrel,led-mode = <1>;
265 }; 311 };
266}; 312};
267 313
@@ -269,6 +315,20 @@
269 status = "okay"; 315 status = "okay";
270}; 316};
271 317
318&scif0 {
319 pinctrl-0 = <&scif0_pins>;
320 pinctrl-names = "default";
321
322 status = "okay";
323};
324
325&scif1 {
326 pinctrl-0 = <&scif1_pins>;
327 pinctrl-names = "default";
328
329 status = "okay";
330};
331
272&sdhi0 { 332&sdhi0 {
273 pinctrl-0 = <&sdhi0_pins>; 333 pinctrl-0 = <&sdhi0_pins>;
274 pinctrl-names = "default"; 334 pinctrl-names = "default";
@@ -301,7 +361,7 @@
301 status = "okay"; 361 status = "okay";
302}; 362};
303 363
304&spi { 364&qspi {
305 pinctrl-0 = <&qspi_pins>; 365 pinctrl-0 = <&qspi_pins>;
306 pinctrl-names = "default"; 366 pinctrl-names = "default";
307 367
@@ -313,6 +373,8 @@
313 compatible = "spansion,s25fl512s"; 373 compatible = "spansion,s25fl512s";
314 reg = <0>; 374 reg = <0>;
315 spi-max-frequency = <30000000>; 375 spi-max-frequency = <30000000>;
376 spi-tx-bus-width = <4>;
377 spi-rx-bus-width = <4>;
316 m25p,fast-read; 378 m25p,fast-read;
317 379
318 partition@0 { 380 partition@0 {
@@ -331,3 +393,18 @@
331 }; 393 };
332 }; 394 };
333}; 395};
396
397&msiof0 {
398 pinctrl-0 = <&msiof0_pins>;
399 pinctrl-names = "default";
400
401 status = "okay";
402
403 pmic: pmic@0 {
404 compatible = "renesas,r2a11302ft";
405 reg = <0>;
406 spi-max-frequency = <6000000>;
407 spi-cpol;
408 spi-cpha;
409 };
410};
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index 46181708e59c..8d7ffaeff6e0 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -27,6 +27,13 @@
27 i2c3 = &i2c3; 27 i2c3 = &i2c3;
28 i2c4 = &i2c4; 28 i2c4 = &i2c4;
29 i2c5 = &i2c5; 29 i2c5 = &i2c5;
30 i2c6 = &i2c6;
31 i2c7 = &i2c7;
32 i2c8 = &i2c8;
33 spi0 = &qspi;
34 spi1 = &msiof0;
35 spi2 = &msiof1;
36 spi3 = &msiof2;
30 }; 37 };
31 38
32 cpus { 39 cpus {
@@ -37,14 +44,14 @@
37 device_type = "cpu"; 44 device_type = "cpu";
38 compatible = "arm,cortex-a15"; 45 compatible = "arm,cortex-a15";
39 reg = <0>; 46 reg = <0>;
40 clock-frequency = <1300000000>; 47 clock-frequency = <1500000000>;
41 }; 48 };
42 49
43 cpu1: cpu@1 { 50 cpu1: cpu@1 {
44 device_type = "cpu"; 51 device_type = "cpu";
45 compatible = "arm,cortex-a15"; 52 compatible = "arm,cortex-a15";
46 reg = <1>; 53 reg = <1>;
47 clock-frequency = <1300000000>; 54 clock-frequency = <1500000000>;
48 }; 55 };
49 }; 56 };
50 57
@@ -69,6 +76,7 @@
69 gpio-ranges = <&pfc 0 0 32>; 76 gpio-ranges = <&pfc 0 0 32>;
70 #interrupt-cells = <2>; 77 #interrupt-cells = <2>;
71 interrupt-controller; 78 interrupt-controller;
79 clocks = <&mstp9_clks R8A7791_CLK_GPIO0>;
72 }; 80 };
73 81
74 gpio1: gpio@e6051000 { 82 gpio1: gpio@e6051000 {
@@ -80,6 +88,7 @@
80 gpio-ranges = <&pfc 0 32 32>; 88 gpio-ranges = <&pfc 0 32 32>;
81 #interrupt-cells = <2>; 89 #interrupt-cells = <2>;
82 interrupt-controller; 90 interrupt-controller;
91 clocks = <&mstp9_clks R8A7791_CLK_GPIO1>;
83 }; 92 };
84 93
85 gpio2: gpio@e6052000 { 94 gpio2: gpio@e6052000 {
@@ -91,6 +100,7 @@
91 gpio-ranges = <&pfc 0 64 32>; 100 gpio-ranges = <&pfc 0 64 32>;
92 #interrupt-cells = <2>; 101 #interrupt-cells = <2>;
93 interrupt-controller; 102 interrupt-controller;
103 clocks = <&mstp9_clks R8A7791_CLK_GPIO2>;
94 }; 104 };
95 105
96 gpio3: gpio@e6053000 { 106 gpio3: gpio@e6053000 {
@@ -102,6 +112,7 @@
102 gpio-ranges = <&pfc 0 96 32>; 112 gpio-ranges = <&pfc 0 96 32>;
103 #interrupt-cells = <2>; 113 #interrupt-cells = <2>;
104 interrupt-controller; 114 interrupt-controller;
115 clocks = <&mstp9_clks R8A7791_CLK_GPIO3>;
105 }; 116 };
106 117
107 gpio4: gpio@e6054000 { 118 gpio4: gpio@e6054000 {
@@ -113,6 +124,7 @@
113 gpio-ranges = <&pfc 0 128 32>; 124 gpio-ranges = <&pfc 0 128 32>;
114 #interrupt-cells = <2>; 125 #interrupt-cells = <2>;
115 interrupt-controller; 126 interrupt-controller;
127 clocks = <&mstp9_clks R8A7791_CLK_GPIO4>;
116 }; 128 };
117 129
118 gpio5: gpio@e6055000 { 130 gpio5: gpio@e6055000 {
@@ -124,6 +136,7 @@
124 gpio-ranges = <&pfc 0 160 32>; 136 gpio-ranges = <&pfc 0 160 32>;
125 #interrupt-cells = <2>; 137 #interrupt-cells = <2>;
126 interrupt-controller; 138 interrupt-controller;
139 clocks = <&mstp9_clks R8A7791_CLK_GPIO5>;
127 }; 140 };
128 141
129 gpio6: gpio@e6055400 { 142 gpio6: gpio@e6055400 {
@@ -135,6 +148,7 @@
135 gpio-ranges = <&pfc 0 192 32>; 148 gpio-ranges = <&pfc 0 192 32>;
136 #interrupt-cells = <2>; 149 #interrupt-cells = <2>;
137 interrupt-controller; 150 interrupt-controller;
151 clocks = <&mstp9_clks R8A7791_CLK_GPIO6>;
138 }; 152 };
139 153
140 gpio7: gpio@e6055800 { 154 gpio7: gpio@e6055800 {
@@ -146,6 +160,7 @@
146 gpio-ranges = <&pfc 0 224 26>; 160 gpio-ranges = <&pfc 0 224 26>;
147 #interrupt-cells = <2>; 161 #interrupt-cells = <2>;
148 interrupt-controller; 162 interrupt-controller;
163 clocks = <&mstp9_clks R8A7791_CLK_GPIO7>;
149 }; 164 };
150 165
151 thermal@e61f0000 { 166 thermal@e61f0000 {
@@ -180,6 +195,7 @@
180 <0 17 IRQ_TYPE_LEVEL_HIGH>; 195 <0 17 IRQ_TYPE_LEVEL_HIGH>;
181 }; 196 };
182 197
198 /* The memory map in the User's Manual maps the cores to bus numbers */
183 i2c0: i2c@e6508000 { 199 i2c0: i2c@e6508000 {
184 #address-cells = <1>; 200 #address-cells = <1>;
185 #size-cells = <0>; 201 #size-cells = <0>;
@@ -231,6 +247,7 @@
231 }; 247 };
232 248
233 i2c5: i2c@e6528000 { 249 i2c5: i2c@e6528000 {
250 /* doesn't need pinmux */
234 #address-cells = <1>; 251 #address-cells = <1>;
235 #size-cells = <0>; 252 #size-cells = <0>;
236 compatible = "renesas,i2c-r8a7791"; 253 compatible = "renesas,i2c-r8a7791";
@@ -240,6 +257,37 @@
240 status = "disabled"; 257 status = "disabled";
241 }; 258 };
242 259
260 i2c6: i2c@e60b0000 {
261 /* doesn't need pinmux */
262 #address-cells = <1>;
263 #size-cells = <0>;
264 compatible = "renesas,iic-r8a7791", "renesas,rmobile-iic";
265 reg = <0 0xe60b0000 0 0x425>;
266 interrupts = <0 173 IRQ_TYPE_LEVEL_HIGH>;
267 clocks = <&mstp9_clks R8A7791_CLK_IICDVFS>;
268 status = "disabled";
269 };
270
271 i2c7: i2c@e6500000 {
272 #address-cells = <1>;
273 #size-cells = <0>;
274 compatible = "renesas,iic-r8a7791", "renesas,rmobile-iic";
275 reg = <0 0xe6500000 0 0x425>;
276 interrupts = <0 174 IRQ_TYPE_LEVEL_HIGH>;
277 clocks = <&mstp3_clks R8A7791_CLK_IIC0>;
278 status = "disabled";
279 };
280
281 i2c8: i2c@e6510000 {
282 #address-cells = <1>;
283 #size-cells = <0>;
284 compatible = "renesas,iic-r8a7791", "renesas,rmobile-iic";
285 reg = <0 0xe6510000 0 0x425>;
286 interrupts = <0 175 IRQ_TYPE_LEVEL_HIGH>;
287 clocks = <&mstp3_clks R8A7791_CLK_IIC1>;
288 status = "disabled";
289 };
290
243 pfc: pfc@e6060000 { 291 pfc: pfc@e6060000 {
244 compatible = "renesas,pfc-r8a7791"; 292 compatible = "renesas,pfc-r8a7791";
245 reg = <0 0xe6060000 0 0x250>; 293 reg = <0 0xe6060000 0 0x250>;
@@ -249,7 +297,6 @@
249 sdhi0: sd@ee100000 { 297 sdhi0: sd@ee100000 {
250 compatible = "renesas,sdhi-r8a7791"; 298 compatible = "renesas,sdhi-r8a7791";
251 reg = <0 0xee100000 0 0x200>; 299 reg = <0 0xee100000 0 0x200>;
252 interrupt-parent = <&gic>;
253 interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>; 300 interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>;
254 clocks = <&mstp3_clks R8A7791_CLK_SDHI0>; 301 clocks = <&mstp3_clks R8A7791_CLK_SDHI0>;
255 status = "disabled"; 302 status = "disabled";
@@ -258,7 +305,6 @@
258 sdhi1: sd@ee140000 { 305 sdhi1: sd@ee140000 {
259 compatible = "renesas,sdhi-r8a7791"; 306 compatible = "renesas,sdhi-r8a7791";
260 reg = <0 0xee140000 0 0x100>; 307 reg = <0 0xee140000 0 0x100>;
261 interrupt-parent = <&gic>;
262 interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>; 308 interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>;
263 clocks = <&mstp3_clks R8A7791_CLK_SDHI1>; 309 clocks = <&mstp3_clks R8A7791_CLK_SDHI1>;
264 status = "disabled"; 310 status = "disabled";
@@ -267,7 +313,6 @@
267 sdhi2: sd@ee160000 { 313 sdhi2: sd@ee160000 {
268 compatible = "renesas,sdhi-r8a7791"; 314 compatible = "renesas,sdhi-r8a7791";
269 reg = <0 0xee160000 0 0x100>; 315 reg = <0 0xee160000 0 0x100>;
270 interrupt-parent = <&gic>;
271 interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>; 316 interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>;
272 clocks = <&mstp3_clks R8A7791_CLK_SDHI2>; 317 clocks = <&mstp3_clks R8A7791_CLK_SDHI2>;
273 status = "disabled"; 318 status = "disabled";
@@ -688,7 +733,7 @@
688 renesas,clock-indices = < 733 renesas,clock-indices = <
689 R8A7791_CLK_TMU1 R8A7791_CLK_TMU3 R8A7791_CLK_TMU2 734 R8A7791_CLK_TMU1 R8A7791_CLK_TMU3 R8A7791_CLK_TMU2
690 R8A7791_CLK_CMT0 R8A7791_CLK_TMU0 R8A7791_CLK_VSP1_DU1 735 R8A7791_CLK_CMT0 R8A7791_CLK_TMU0 R8A7791_CLK_VSP1_DU1
691 R8A7791_CLK_VSP1_DU0 R8A7791_CLK_VSP1_SY 736 R8A7791_CLK_VSP1_DU0 R8A7791_CLK_VSP1_S
692 >; 737 >;
693 clock-output-names = 738 clock-output-names =
694 "tmu1", "tmu3", "tmu2", "cmt0", "tmu0", "vsp1-du1", 739 "tmu1", "tmu3", "tmu2", "cmt0", "tmu0", "vsp1-du1",
@@ -712,15 +757,16 @@
712 mstp3_clks: mstp3_clks@e615013c { 757 mstp3_clks: mstp3_clks@e615013c {
713 compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks"; 758 compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
714 reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>; 759 reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
715 clocks = <&cp_clk>, <&sd2_clk>, <&sd1_clk>, 760 clocks = <&cp_clk>, <&sd2_clk>, <&sd1_clk>, <&cpg_clocks R8A7791_CLK_SD0>,
716 <&cpg_clocks R8A7791_CLK_SD0>, <&mmc0_clk>, <&rclk_clk>; 761 <&mmc0_clk>, <&hp_clk>, <&hp_clk>, <&rclk_clk>;
717 #clock-cells = <1>; 762 #clock-cells = <1>;
718 renesas,clock-indices = < 763 renesas,clock-indices = <
719 R8A7791_CLK_TPU0 R8A7791_CLK_SDHI2 R8A7791_CLK_SDHI1 764 R8A7791_CLK_TPU0 R8A7791_CLK_SDHI2 R8A7791_CLK_SDHI1 R8A7791_CLK_SDHI0
720 R8A7791_CLK_SDHI0 R8A7791_CLK_MMCIF0 R8A7791_CLK_CMT1 765 R8A7791_CLK_MMCIF0 R8A7791_CLK_IIC0 R8A7791_CLK_IIC1 R8A7791_CLK_CMT1
721 >; 766 >;
722 clock-output-names = 767 clock-output-names =
723 "tpu0", "sdhi2", "sdhi1", "sdhi0", "mmcif0", "cmt1"; 768 "tpu0", "sdhi2", "sdhi1", "sdhi0",
769 "mmcif0", "i2c7", "i2c8", "cmt1";
724 }; 770 };
725 mstp5_clks: mstp5_clks@e6150144 { 771 mstp5_clks: mstp5_clks@e6150144 {
726 compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks"; 772 compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
@@ -733,19 +779,19 @@
733 mstp7_clks: mstp7_clks@e615014c { 779 mstp7_clks: mstp7_clks@e615014c {
734 compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks"; 780 compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
735 reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>; 781 reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>;
736 clocks = <&mp_clk>, <&zs_clk>, <&p_clk>, <&p_clk>, <&zs_clk>, 782 clocks = <&mp_clk>, <&mp_clk>, <&zs_clk>, <&p_clk>, <&p_clk>, <&zs_clk>,
737 <&zs_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, 783 <&zs_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
738 <&zx_clk>, <&zx_clk>, <&zx_clk>; 784 <&zx_clk>, <&zx_clk>, <&zx_clk>;
739 #clock-cells = <1>; 785 #clock-cells = <1>;
740 renesas,clock-indices = < 786 renesas,clock-indices = <
741 R8A7791_CLK_HSUSB R8A7791_CLK_HSCIF2 R8A7791_CLK_SCIF5 787 R8A7791_CLK_EHCI R8A7791_CLK_HSUSB R8A7791_CLK_HSCIF2 R8A7791_CLK_SCIF5
742 R8A7791_CLK_SCIF4 R8A7791_CLK_HSCIF1 R8A7791_CLK_HSCIF0 788 R8A7791_CLK_SCIF4 R8A7791_CLK_HSCIF1 R8A7791_CLK_HSCIF0
743 R8A7791_CLK_SCIF3 R8A7791_CLK_SCIF2 R8A7791_CLK_SCIF1 789 R8A7791_CLK_SCIF3 R8A7791_CLK_SCIF2 R8A7791_CLK_SCIF1
744 R8A7791_CLK_SCIF0 R8A7791_CLK_DU1 R8A7791_CLK_DU0 790 R8A7791_CLK_SCIF0 R8A7791_CLK_DU1 R8A7791_CLK_DU0
745 R8A7791_CLK_LVDS0 791 R8A7791_CLK_LVDS0
746 >; 792 >;
747 clock-output-names = 793 clock-output-names =
748 "hsusb", "hscif2", "scif5", "scif4", "hscif1", "hscif0", 794 "ehci", "hsusb", "hscif2", "scif5", "scif4", "hscif1", "hscif0",
749 "scif3", "scif2", "scif1", "scif0", "du1", "du0", "lvds0"; 795 "scif3", "scif2", "scif1", "scif0", "du1", "du0", "lvds0";
750 }; 796 };
751 mstp8_clks: mstp8_clks@e6150990 { 797 mstp8_clks: mstp8_clks@e6150990 {
@@ -764,18 +810,23 @@
764 mstp9_clks: mstp9_clks@e6150994 { 810 mstp9_clks: mstp9_clks@e6150994 {
765 compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks"; 811 compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
766 reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>; 812 reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>;
767 clocks = <&p_clk>, <&p_clk>, <&cpg_clocks R8A7791_CLK_QSPI>, 813 clocks = <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>,
768 <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, 814 <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>,
769 <&p_clk>; 815 <&p_clk>, <&p_clk>, <&cpg_clocks R8A7791_CLK_QSPI>, <&hp_clk>,
816 <&cp_clk>, <&hp_clk>, <&hp_clk>, <&hp_clk>,
817 <&hp_clk>, <&hp_clk>;
770 #clock-cells = <1>; 818 #clock-cells = <1>;
771 renesas,clock-indices = < 819 renesas,clock-indices = <
772 R8A7791_CLK_RCAN1 R8A7791_CLK_RCAN0 R8A7791_CLK_QSPI_MOD 820 R8A7791_CLK_GPIO7 R8A7791_CLK_GPIO6 R8A7791_CLK_GPIO5 R8A7791_CLK_GPIO4
773 R8A7791_CLK_I2C5 R8A7791_CLK_I2C4 R8A7791_CLK_I2C3 821 R8A7791_CLK_GPIO3 R8A7791_CLK_GPIO2 R8A7791_CLK_GPIO1 R8A7791_CLK_GPIO0
774 R8A7791_CLK_I2C2 R8A7791_CLK_I2C1 R8A7791_CLK_I2C0 822 R8A7791_CLK_RCAN1 R8A7791_CLK_RCAN0 R8A7791_CLK_QSPI_MOD R8A7791_CLK_I2C5
823 R8A7791_CLK_IICDVFS R8A7791_CLK_I2C4 R8A7791_CLK_I2C3 R8A7791_CLK_I2C2
824 R8A7791_CLK_I2C1 R8A7791_CLK_I2C0
775 >; 825 >;
776 clock-output-names = 826 clock-output-names =
777 "rcan1", "rcan0", "qspi_mod", "i2c5", "i2c4", "i2c3", 827 "gpio7", "gpio6", "gpio5", "gpio4", "gpio3", "gpio2", "gpio1", "gpio0",
778 "i2c2", "i2c1", "i2c0"; 828 "rcan1", "rcan0", "qspi_mod", "i2c5", "i2c6", "i2c4", "i2c3", "i2c2",
829 "i2c1", "i2c0";
779 }; 830 };
780 mstp11_clks: mstp11_clks@e615099c { 831 mstp11_clks: mstp11_clks@e615099c {
781 compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks"; 832 compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
@@ -789,7 +840,7 @@
789 }; 840 };
790 }; 841 };
791 842
792 spi: spi@e6b10000 { 843 qspi: spi@e6b10000 {
793 compatible = "renesas,qspi-r8a7791", "renesas,qspi"; 844 compatible = "renesas,qspi-r8a7791", "renesas,qspi";
794 reg = <0 0xe6b10000 0 0x2c>; 845 reg = <0 0xe6b10000 0 0x2c>;
795 interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>; 846 interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
@@ -799,4 +850,34 @@
799 #size-cells = <0>; 850 #size-cells = <0>;
800 status = "disabled"; 851 status = "disabled";
801 }; 852 };
853
854 msiof0: spi@e6e20000 {
855 compatible = "renesas,msiof-r8a7791";
856 reg = <0 0xe6e20000 0 0x0064>;
857 interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
858 clocks = <&mstp0_clks R8A7791_CLK_MSIOF0>;
859 #address-cells = <1>;
860 #size-cells = <0>;
861 status = "disabled";
862 };
863
864 msiof1: spi@e6e10000 {
865 compatible = "renesas,msiof-r8a7791";
866 reg = <0 0xe6e10000 0 0x0064>;
867 interrupts = <0 157 IRQ_TYPE_LEVEL_HIGH>;
868 clocks = <&mstp2_clks R8A7791_CLK_MSIOF1>;
869 #address-cells = <1>;
870 #size-cells = <0>;
871 status = "disabled";
872 };
873
874 msiof2: spi@e6e00000 {
875 compatible = "renesas,msiof-r8a7791";
876 reg = <0 0xe6e00000 0 0x0064>;
877 interrupts = <0 158 IRQ_TYPE_LEVEL_HIGH>;
878 clocks = <&mstp2_clks R8A7791_CLK_MSIOF2>;
879 #address-cells = <1>;
880 #size-cells = <0>;
881 status = "disabled";
882 };
802}; 883};
diff --git a/arch/arm/boot/dts/rk3066a-bqcurie2.dts b/arch/arm/boot/dts/rk3066a-bqcurie2.dts
index 035df4053c21..afb327322a4a 100644
--- a/arch/arm/boot/dts/rk3066a-bqcurie2.dts
+++ b/arch/arm/boot/dts/rk3066a-bqcurie2.dts
@@ -18,6 +18,7 @@
18 18
19/ { 19/ {
20 model = "bq Curie 2"; 20 model = "bq Curie 2";
21 compatible = "mundoreader,bq-curie2", "rockchip,rk3066a";
21 22
22 memory { 23 memory {
23 reg = <0x60000000 0x40000000>; 24 reg = <0x60000000 0x40000000>;
diff --git a/arch/arm/boot/dts/rk3066a.dtsi b/arch/arm/boot/dts/rk3066a.dtsi
index 4d4dfbb59f4b..4387cfd420ba 100644
--- a/arch/arm/boot/dts/rk3066a.dtsi
+++ b/arch/arm/boot/dts/rk3066a.dtsi
@@ -24,6 +24,7 @@
24 cpus { 24 cpus {
25 #address-cells = <1>; 25 #address-cells = <1>;
26 #size-cells = <0>; 26 #size-cells = <0>;
27 enable-method = "rockchip,rk3066-smp";
27 28
28 cpu@0 { 29 cpu@0 {
29 device_type = "cpu"; 30 device_type = "cpu";
@@ -79,7 +80,7 @@
79 80
80 pinctrl@20008000 { 81 pinctrl@20008000 {
81 compatible = "rockchip,rk3066a-pinctrl"; 82 compatible = "rockchip,rk3066a-pinctrl";
82 reg = <0x20008000 0x150>; 83 rockchip,grf = <&grf>;
83 #address-cells = <1>; 84 #address-cells = <1>;
84 #size-cells = <1>; 85 #size-cells = <1>;
85 ranges; 86 ranges;
diff --git a/arch/arm/boot/dts/rk3188-radxarock.dts b/arch/arm/boot/dts/rk3188-radxarock.dts
index 3ba1968a70ab..a5eee55079cb 100644
--- a/arch/arm/boot/dts/rk3188-radxarock.dts
+++ b/arch/arm/boot/dts/rk3188-radxarock.dts
@@ -17,6 +17,7 @@
17 17
18/ { 18/ {
19 model = "Radxa Rock"; 19 model = "Radxa Rock";
20 compatible = "radxa,rock", "rockchip,rk3188";
20 21
21 memory { 22 memory {
22 reg = <0x60000000 0x80000000>; 23 reg = <0x60000000 0x80000000>;
diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arch/arm/boot/dts/rk3188.dtsi
index ed9a70af3e3f..238c996d4a7f 100644
--- a/arch/arm/boot/dts/rk3188.dtsi
+++ b/arch/arm/boot/dts/rk3188.dtsi
@@ -24,6 +24,7 @@
24 cpus { 24 cpus {
25 #address-cells = <1>; 25 #address-cells = <1>;
26 #size-cells = <0>; 26 #size-cells = <0>;
27 enable-method = "rockchip,rk3066-smp";
27 28
28 cpu@0 { 29 cpu@0 {
29 device_type = "cpu"; 30 device_type = "cpu";
@@ -75,17 +76,16 @@
75 76
76 pinctrl@20008000 { 77 pinctrl@20008000 {
77 compatible = "rockchip,rk3188-pinctrl"; 78 compatible = "rockchip,rk3188-pinctrl";
78 reg = <0x20008000 0xa0>, 79 rockchip,grf = <&grf>;
79 <0x20008164 0x1a0>; 80 rockchip,pmu = <&pmu>;
80 reg-names = "base", "pull"; 81
81 #address-cells = <1>; 82 #address-cells = <1>;
82 #size-cells = <1>; 83 #size-cells = <1>;
83 ranges; 84 ranges;
84 85
85 gpio0: gpio0@0x2000a000 { 86 gpio0: gpio0@0x2000a000 {
86 compatible = "rockchip,rk3188-gpio-bank0"; 87 compatible = "rockchip,rk3188-gpio-bank0";
87 reg = <0x2000a000 0x100>, 88 reg = <0x2000a000 0x100>;
88 <0x20004064 0x8>;
89 interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; 89 interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
90 clocks = <&clk_gates8 9>; 90 clocks = <&clk_gates8 9>;
91 91
diff --git a/arch/arm/boot/dts/rk3xxx.dtsi b/arch/arm/boot/dts/rk3xxx.dtsi
index 26e5a968d49d..2adf1cc9e85d 100644
--- a/arch/arm/boot/dts/rk3xxx.dtsi
+++ b/arch/arm/boot/dts/rk3xxx.dtsi
@@ -31,11 +31,16 @@
31 reg = <0x1013c000 0x100>; 31 reg = <0x1013c000 0x100>;
32 }; 32 };
33 33
34 pmu@20004000 { 34 pmu: pmu@20004000 {
35 compatible = "rockchip,rk3066-pmu"; 35 compatible = "rockchip,rk3066-pmu", "syscon";
36 reg = <0x20004000 0x100>; 36 reg = <0x20004000 0x100>;
37 }; 37 };
38 38
39 grf: grf@20008000 {
40 compatible = "syscon";
41 reg = <0x20008000 0x200>;
42 };
43
39 gic: interrupt-controller@1013d000 { 44 gic: interrupt-controller@1013d000 {
40 compatible = "arm,cortex-a9-gic"; 45 compatible = "arm,cortex-a9-gic";
41 interrupt-controller; 46 interrupt-controller;
diff --git a/arch/arm/boot/dts/s3c2416-smdk2416.dts b/arch/arm/boot/dts/s3c2416-smdk2416.dts
index 59594cf15998..ea92fd69529a 100644
--- a/arch/arm/boot/dts/s3c2416-smdk2416.dts
+++ b/arch/arm/boot/dts/s3c2416-smdk2416.dts
@@ -19,6 +19,19 @@
19 reg = <0x30000000 0x4000000>; 19 reg = <0x30000000 0x4000000>;
20 }; 20 };
21 21
22 clocks {
23 compatible = "simple-bus";
24 #address-cells = <1>;
25 #size-cells = <1>;
26
27 xti: xti {
28 compatible = "fixed-clock";
29 clock-frequency = <12000000>;
30 clock-output-names = "xti";
31 #clock-cells = <0>;
32 };
33 };
34
22 serial@50000000 { 35 serial@50000000 {
23 status = "okay"; 36 status = "okay";
24 pinctrl-names = "default"; 37 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/s3c2416.dtsi b/arch/arm/boot/dts/s3c2416.dtsi
index e6555bdd81b8..955e4a4f8c31 100644
--- a/arch/arm/boot/dts/s3c2416.dtsi
+++ b/arch/arm/boot/dts/s3c2416.dtsi
@@ -8,6 +8,7 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10 10
11#include <dt-bindings/clock/s3c2443.h>
11#include "s3c24xx.dtsi" 12#include "s3c24xx.dtsi"
12#include "s3c2416-pinctrl.dtsi" 13#include "s3c2416-pinctrl.dtsi"
13 14
@@ -28,26 +29,53 @@
28 compatible = "samsung,s3c2416-irq"; 29 compatible = "samsung,s3c2416-irq";
29 }; 30 };
30 31
32 clocks: clock-controller@0x4c000000 {
33 compatible = "samsung,s3c2416-clock";
34 reg = <0x4c000000 0x40>;
35 #clock-cells = <1>;
36 };
37
31 pinctrl@56000000 { 38 pinctrl@56000000 {
32 compatible = "samsung,s3c2416-pinctrl"; 39 compatible = "samsung,s3c2416-pinctrl";
33 }; 40 };
34 41
42 timer@51000000 {
43 clocks = <&clocks PCLK_PWM>;
44 clock-names = "timers";
45 };
46
35 serial@50000000 { 47 serial@50000000 {
36 compatible = "samsung,s3c2440-uart"; 48 compatible = "samsung,s3c2440-uart";
49 clock-names = "uart", "clk_uart_baud2",
50 "clk_uart_baud3";
51 clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>,
52 <&clocks SCLK_UART>;
37 }; 53 };
38 54
39 serial@50004000 { 55 serial@50004000 {
40 compatible = "samsung,s3c2440-uart"; 56 compatible = "samsung,s3c2440-uart";
57 clock-names = "uart", "clk_uart_baud2",
58 "clk_uart_baud3";
59 clocks = <&clocks PCLK_UART1>, <&clocks PCLK_UART1>,
60 <&clocks SCLK_UART>;
41 }; 61 };
42 62
43 serial@50008000 { 63 serial@50008000 {
44 compatible = "samsung,s3c2440-uart"; 64 compatible = "samsung,s3c2440-uart";
65 clock-names = "uart", "clk_uart_baud2",
66 "clk_uart_baud3";
67 clocks = <&clocks PCLK_UART2>, <&clocks PCLK_UART2>,
68 <&clocks SCLK_UART>;
45 }; 69 };
46 70
47 serial@5000C000 { 71 serial@5000C000 {
48 compatible = "samsung,s3c2440-uart"; 72 compatible = "samsung,s3c2440-uart";
49 reg = <0x5000C000 0x4000>; 73 reg = <0x5000C000 0x4000>;
50 interrupts = <1 18 24 4>, <1 18 25 4>; 74 interrupts = <1 18 24 4>, <1 18 25 4>;
75 clock-names = "uart", "clk_uart_baud2",
76 "clk_uart_baud3";
77 clocks = <&clocks PCLK_UART3>, <&clocks PCLK_UART3>,
78 <&clocks SCLK_UART>;
51 status = "disabled"; 79 status = "disabled";
52 }; 80 };
53 81
@@ -55,6 +83,10 @@
55 compatible = "samsung,s3c6410-sdhci"; 83 compatible = "samsung,s3c6410-sdhci";
56 reg = <0x4AC00000 0x100>; 84 reg = <0x4AC00000 0x100>;
57 interrupts = <0 0 21 3>; 85 interrupts = <0 0 21 3>;
86 clock-names = "hsmmc", "mmc_busclk.0",
87 "mmc_busclk.2";
88 clocks = <&clocks HCLK_HSMMC0>, <&clocks HCLK_HSMMC0>,
89 <&clocks MUX_HSMMC0>;
58 status = "disabled"; 90 status = "disabled";
59 }; 91 };
60 92
@@ -62,18 +94,28 @@
62 compatible = "samsung,s3c6410-sdhci"; 94 compatible = "samsung,s3c6410-sdhci";
63 reg = <0x4A800000 0x100>; 95 reg = <0x4A800000 0x100>;
64 interrupts = <0 0 20 3>; 96 interrupts = <0 0 20 3>;
97 clock-names = "hsmmc", "mmc_busclk.0",
98 "mmc_busclk.2";
99 clocks = <&clocks HCLK_HSMMC1>, <&clocks HCLK_HSMMC1>,
100 <&clocks MUX_HSMMC1>;
65 status = "disabled"; 101 status = "disabled";
66 }; 102 };
67 103
68 watchdog@53000000 { 104 watchdog@53000000 {
69 interrupts = <1 9 27 3>; 105 interrupts = <1 9 27 3>;
106 clocks = <&clocks PCLK_WDT>;
107 clock-names = "watchdog";
70 }; 108 };
71 109
72 rtc@57000000 { 110 rtc@57000000 {
73 compatible = "samsung,s3c2416-rtc"; 111 compatible = "samsung,s3c2416-rtc";
112 clocks = <&clocks PCLK_RTC>;
113 clock-names = "rtc";
74 }; 114 };
75 115
76 i2c@54000000 { 116 i2c@54000000 {
77 compatible = "samsung,s3c2440-i2c"; 117 compatible = "samsung,s3c2440-i2c";
118 clocks = <&clocks PCLK_I2C0>;
119 clock-names = "i2c";
78 }; 120 };
79}; 121};
diff --git a/arch/arm/boot/dts/sama5d3.dtsi b/arch/arm/boot/dts/sama5d3.dtsi
index eabcfdbb403a..e0b15a6e8897 100644
--- a/arch/arm/boot/dts/sama5d3.dtsi
+++ b/arch/arm/boot/dts/sama5d3.dtsi
@@ -13,7 +13,7 @@
13#include <dt-bindings/pinctrl/at91.h> 13#include <dt-bindings/pinctrl/at91.h>
14#include <dt-bindings/interrupt-controller/irq.h> 14#include <dt-bindings/interrupt-controller/irq.h>
15#include <dt-bindings/gpio/gpio.h> 15#include <dt-bindings/gpio/gpio.h>
16#include <dt-bindings/clk/at91.h> 16#include <dt-bindings/clock/at91.h>
17 17
18/ { 18/ {
19 model = "Atmel SAMA5D3 family SoC"; 19 model = "Atmel SAMA5D3 family SoC";
@@ -58,6 +58,18 @@
58 reg = <0x20000000 0x8000000>; 58 reg = <0x20000000 0x8000000>;
59 }; 59 };
60 60
61 slow_xtal: slow_xtal {
62 compatible = "fixed-clock";
63 #clock-cells = <0>;
64 clock-frequency = <0>;
65 };
66
67 main_xtal: main_xtal {
68 compatible = "fixed-clock";
69 #clock-cells = <0>;
70 clock-frequency = <0>;
71 };
72
61 clocks { 73 clocks {
62 adc_op_clk: adc_op_clk{ 74 adc_op_clk: adc_op_clk{
63 compatible = "fixed-clock"; 75 compatible = "fixed-clock";
@@ -113,6 +125,9 @@
113 compatible = "atmel,at91sam9g45-ssc"; 125 compatible = "atmel,at91sam9g45-ssc";
114 reg = <0xf0008000 0x4000>; 126 reg = <0xf0008000 0x4000>;
115 interrupts = <38 IRQ_TYPE_LEVEL_HIGH 4>; 127 interrupts = <38 IRQ_TYPE_LEVEL_HIGH 4>;
128 dmas = <&dma0 2 AT91_DMA_CFG_PER_ID(13)>,
129 <&dma0 2 AT91_DMA_CFG_PER_ID(14)>;
130 dma-names = "tx", "rx";
116 pinctrl-names = "default"; 131 pinctrl-names = "default";
117 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; 132 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
118 clocks = <&ssc0_clk>; 133 clocks = <&ssc0_clk>;
@@ -231,6 +246,9 @@
231 compatible = "atmel,at91sam9g45-ssc"; 246 compatible = "atmel,at91sam9g45-ssc";
232 reg = <0xf800c000 0x4000>; 247 reg = <0xf800c000 0x4000>;
233 interrupts = <39 IRQ_TYPE_LEVEL_HIGH 4>; 248 interrupts = <39 IRQ_TYPE_LEVEL_HIGH 4>;
249 dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(3)>,
250 <&dma1 2 AT91_DMA_CFG_PER_ID(4)>;
251 dma-names = "tx", "rx";
234 pinctrl-names = "default"; 252 pinctrl-names = "default";
235 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>; 253 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
236 clocks = <&ssc1_clk>; 254 clocks = <&ssc1_clk>;
@@ -577,6 +595,84 @@
577 }; 595 };
578 }; 596 };
579 597
598 pwm0 {
599 pinctrl_pwm0_pwmh0_0: pwm0_pwmh0-0 {
600 atmel,pins =
601 <AT91_PIOA 20 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with ISI_D4 and LCDDAT20 */
602 };
603 pinctrl_pwm0_pwmh0_1: pwm0_pwmh0-1 {
604 atmel,pins =
605 <AT91_PIOB 0 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with GTX0 */
606 };
607 pinctrl_pwm0_pwml0_0: pwm0_pwml0-0 {
608 atmel,pins =
609 <AT91_PIOA 21 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with ISI_D5 and LCDDAT21 */
610 };
611 pinctrl_pwm0_pwml0_1: pwm0_pwml0-1 {
612 atmel,pins =
613 <AT91_PIOB 1 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with GTX1 */
614 };
615
616 pinctrl_pwm0_pwmh1_0: pwm0_pwmh1-0 {
617 atmel,pins =
618 <AT91_PIOA 22 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with ISI_D6 and LCDDAT22 */
619 };
620 pinctrl_pwm0_pwmh1_1: pwm0_pwmh1-1 {
621 atmel,pins =
622 <AT91_PIOB 4 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with GRX0 */
623 };
624 pinctrl_pwm0_pwmh1_2: pwm0_pwmh1-2 {
625 atmel,pins =
626 <AT91_PIOB 27 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* conflicts with G125CKO and RTS1 */
627 };
628 pinctrl_pwm0_pwml1_0: pwm0_pwml1-0 {
629 atmel,pins =
630 <AT91_PIOA 23 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with ISI_D7 and LCDDAT23 */
631 };
632 pinctrl_pwm0_pwml1_1: pwm0_pwml1-1 {
633 atmel,pins =
634 <AT91_PIOB 5 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with GRX1 */
635 };
636 pinctrl_pwm0_pwml1_2: pwm0_pwml1-2 {
637 atmel,pins =
638 <AT91_PIOE 31 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with IRQ */
639 };
640
641 pinctrl_pwm0_pwmh2_0: pwm0_pwmh2-0 {
642 atmel,pins =
643 <AT91_PIOB 8 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with GTXCK */
644 };
645 pinctrl_pwm0_pwmh2_1: pwm0_pwmh2-1 {
646 atmel,pins =
647 <AT91_PIOD 5 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* conflicts with MCI0_DA4 and TIOA0 */
648 };
649 pinctrl_pwm0_pwml2_0: pwm0_pwml2-0 {
650 atmel,pins =
651 <AT91_PIOB 9 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with GTXEN */
652 };
653 pinctrl_pwm0_pwml2_1: pwm0_pwml2-1 {
654 atmel,pins =
655 <AT91_PIOD 6 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* conflicts with MCI0_DA5 and TIOB0 */
656 };
657
658 pinctrl_pwm0_pwmh3_0: pwm0_pwmh3-0 {
659 atmel,pins =
660 <AT91_PIOB 12 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with GRXDV */
661 };
662 pinctrl_pwm0_pwmh3_1: pwm0_pwmh3-1 {
663 atmel,pins =
664 <AT91_PIOD 7 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* conflicts with MCI0_DA6 and TCLK0 */
665 };
666 pinctrl_pwm0_pwml3_0: pwm0_pwml3-0 {
667 atmel,pins =
668 <AT91_PIOB 13 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* conflicts with GRXER */
669 };
670 pinctrl_pwm0_pwml3_1: pwm0_pwml3-1 {
671 atmel,pins =
672 <AT91_PIOD 8 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* conflicts with MCI0_DA7 */
673 };
674 };
675
580 spi0 { 676 spi0 {
581 pinctrl_spi0: spi0-0 { 677 pinctrl_spi0: spi0-0 {
582 atmel,pins = 678 atmel,pins =
@@ -749,18 +845,29 @@
749 #size-cells = <0>; 845 #size-cells = <0>;
750 #interrupt-cells = <1>; 846 #interrupt-cells = <1>;
751 847
752 clk32k: slck { 848 main_rc_osc: main_rc_osc {
753 compatible = "fixed-clock"; 849 compatible = "atmel,at91sam9x5-clk-main-rc-osc";
754 #clock-cells = <0>; 850 #clock-cells = <0>;
755 clock-frequency = <32768>; 851 interrupt-parent = <&pmc>;
852 interrupts = <AT91_PMC_MOSCRCS>;
853 clock-frequency = <12000000>;
854 clock-accuracy = <50000000>;
756 }; 855 };
757 856
758 main: mainck { 857 main_osc: main_osc {
759 compatible = "atmel,at91rm9200-clk-main"; 858 compatible = "atmel,at91rm9200-clk-main-osc";
760 #clock-cells = <0>; 859 #clock-cells = <0>;
761 interrupt-parent = <&pmc>; 860 interrupt-parent = <&pmc>;
762 interrupts = <AT91_PMC_MOSCS>; 861 interrupts = <AT91_PMC_MOSCS>;
763 clocks = <&clk32k>; 862 clocks = <&main_xtal>;
863 };
864
865 main: mainck {
866 compatible = "atmel,at91sam9x5-clk-main";
867 #clock-cells = <0>;
868 interrupt-parent = <&pmc>;
869 interrupts = <AT91_PMC_MOSCSELS>;
870 clocks = <&main_rc_osc &main_osc>;
764 }; 871 };
765 872
766 plla: pllack { 873 plla: pllack {
@@ -1089,6 +1196,32 @@
1089 status = "disabled"; 1196 status = "disabled";
1090 }; 1197 };
1091 1198
1199 sckc@fffffe50 {
1200 compatible = "atmel,at91sam9x5-sckc";
1201 reg = <0xfffffe50 0x4>;
1202
1203 slow_rc_osc: slow_rc_osc {
1204 compatible = "atmel,at91sam9x5-clk-slow-rc-osc";
1205 #clock-cells = <0>;
1206 clock-frequency = <32768>;
1207 clock-accuracy = <50000000>;
1208 atmel,startup-time-usec = <75>;
1209 };
1210
1211 slow_osc: slow_osc {
1212 compatible = "atmel,at91sam9x5-clk-slow-osc";
1213 #clock-cells = <0>;
1214 clocks = <&slow_xtal>;
1215 atmel,startup-time-usec = <1200000>;
1216 };
1217
1218 clk32k: slowck {
1219 compatible = "atmel,at91sam9x5-clk-slow";
1220 #clock-cells = <0>;
1221 clocks = <&slow_rc_osc &slow_osc>;
1222 };
1223 };
1224
1092 rtc@fffffeb0 { 1225 rtc@fffffeb0 {
1093 compatible = "atmel,at91rm9200-rtc"; 1226 compatible = "atmel,at91rm9200-rtc";
1094 reg = <0xfffffeb0 0x30>; 1227 reg = <0xfffffeb0 0x30>;
diff --git a/arch/arm/boot/dts/sama5d3_mci2.dtsi b/arch/arm/boot/dts/sama5d3_mci2.dtsi
index b029fe7ef17a..1b02208ea6ff 100644
--- a/arch/arm/boot/dts/sama5d3_mci2.dtsi
+++ b/arch/arm/boot/dts/sama5d3_mci2.dtsi
@@ -9,7 +9,7 @@
9 9
10#include <dt-bindings/pinctrl/at91.h> 10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h> 11#include <dt-bindings/interrupt-controller/irq.h>
12#include <dt-bindings/clk/at91.h> 12#include <dt-bindings/clock/at91.h>
13 13
14/ { 14/ {
15 ahb { 15 ahb {
diff --git a/arch/arm/boot/dts/sama5d3_tcb1.dtsi b/arch/arm/boot/dts/sama5d3_tcb1.dtsi
index 382b04431f66..02848453ca0c 100644
--- a/arch/arm/boot/dts/sama5d3_tcb1.dtsi
+++ b/arch/arm/boot/dts/sama5d3_tcb1.dtsi
@@ -9,7 +9,7 @@
9 9
10#include <dt-bindings/pinctrl/at91.h> 10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h> 11#include <dt-bindings/interrupt-controller/irq.h>
12#include <dt-bindings/clk/at91.h> 12#include <dt-bindings/clock/at91.h>
13 13
14/ { 14/ {
15 aliases { 15 aliases {
diff --git a/arch/arm/boot/dts/sama5d3_uart.dtsi b/arch/arm/boot/dts/sama5d3_uart.dtsi
index a9fa75e41652..7a8d4c6115f7 100644
--- a/arch/arm/boot/dts/sama5d3_uart.dtsi
+++ b/arch/arm/boot/dts/sama5d3_uart.dtsi
@@ -9,7 +9,7 @@
9 9
10#include <dt-bindings/pinctrl/at91.h> 10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h> 11#include <dt-bindings/interrupt-controller/irq.h>
12#include <dt-bindings/clk/at91.h> 12#include <dt-bindings/clock/at91.h>
13 13
14/ { 14/ {
15 aliases { 15 aliases {
diff --git a/arch/arm/boot/dts/sama5d3xcm.dtsi b/arch/arm/boot/dts/sama5d3xcm.dtsi
index f55ed072c8e6..b0b1331c1974 100644
--- a/arch/arm/boot/dts/sama5d3xcm.dtsi
+++ b/arch/arm/boot/dts/sama5d3xcm.dtsi
@@ -18,6 +18,14 @@
18 reg = <0x20000000 0x20000000>; 18 reg = <0x20000000 0x20000000>;
19 }; 19 };
20 20
21 slow_xtal {
22 clock-frequency = <32768>;
23 };
24
25 main_xtal {
26 clock-frequency = <12000000>;
27 };
28
21 ahb { 29 ahb {
22 apb { 30 apb {
23 spi0: spi@f0004000 { 31 spi0: spi@f0004000 {
diff --git a/arch/arm/boot/dts/sama5d3xmb.dtsi b/arch/arm/boot/dts/sama5d3xmb.dtsi
index dba739b6ef36..306eef0f97ef 100644
--- a/arch/arm/boot/dts/sama5d3xmb.dtsi
+++ b/arch/arm/boot/dts/sama5d3xmb.dtsi
@@ -32,6 +32,10 @@
32 }; 32 };
33 }; 33 };
34 34
35 ssc0: ssc@f0008000 {
36 atmel,clk-from-rk-pin;
37 };
38
35 /* 39 /*
36 * i2c0 conflicts with ISI: 40 * i2c0 conflicts with ISI:
37 * disable it to allow the use of ISI 41 * disable it to allow the use of ISI
@@ -156,7 +160,7 @@
156 }; 160 };
157 161
158 sound { 162 sound {
159 compatible = "atmel,sama5d3ek-wm8904"; 163 compatible = "atmel,asoc-wm8904";
160 pinctrl-names = "default"; 164 pinctrl-names = "default";
161 pinctrl-0 = <&pinctrl_pck0_as_audio_mck>; 165 pinctrl-0 = <&pinctrl_pck0_as_audio_mck>;
162 166
@@ -166,9 +170,12 @@
166 "Headphone Jack", "HPOUTR", 170 "Headphone Jack", "HPOUTR",
167 "IN2L", "Line In Jack", 171 "IN2L", "Line In Jack",
168 "IN2R", "Line In Jack", 172 "IN2R", "Line In Jack",
173 "MICBIAS", "IN1L",
169 "IN1L", "Mic"; 174 "IN1L", "Mic";
170 175
171 atmel,ssc-controller = <&ssc0>; 176 atmel,ssc-controller = <&ssc0>;
172 atmel,audio-codec = <&wm8904>; 177 atmel,audio-codec = <&wm8904>;
178
179 status = "disabled";
173 }; 180 };
174}; 181};
diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
index eb8886b535e4..a99171c8a782 100644
--- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
+++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
@@ -14,6 +14,7 @@
14/dts-v1/; 14/dts-v1/;
15#include "sh73a0.dtsi" 15#include "sh73a0.dtsi"
16#include <dt-bindings/gpio/gpio.h> 16#include <dt-bindings/gpio/gpio.h>
17#include <dt-bindings/input/input.h>
17#include <dt-bindings/interrupt-controller/irq.h> 18#include <dt-bindings/interrupt-controller/irq.h>
18 19
19/ { 20/ {
@@ -112,43 +113,43 @@
112 113
113 back-key { 114 back-key {
114 gpios = <&pcf8575 8 GPIO_ACTIVE_LOW>; 115 gpios = <&pcf8575 8 GPIO_ACTIVE_LOW>;
115 linux,code = <158>; 116 linux,code = <KEY_BACK>;
116 label = "SW3"; 117 label = "SW3";
117 }; 118 };
118 119
119 right-key { 120 right-key {
120 gpios = <&pcf8575 9 GPIO_ACTIVE_LOW>; 121 gpios = <&pcf8575 9 GPIO_ACTIVE_LOW>;
121 linux,code = <106>; 122 linux,code = <KEY_RIGHT>;
122 label = "SW2-R"; 123 label = "SW2-R";
123 }; 124 };
124 125
125 left-key { 126 left-key {
126 gpios = <&pcf8575 10 GPIO_ACTIVE_LOW>; 127 gpios = <&pcf8575 10 GPIO_ACTIVE_LOW>;
127 linux,code = <105>; 128 linux,code = <KEY_LEFT>;
128 label = "SW2-L"; 129 label = "SW2-L";
129 }; 130 };
130 131
131 enter-key { 132 enter-key {
132 gpios = <&pcf8575 11 GPIO_ACTIVE_LOW>; 133 gpios = <&pcf8575 11 GPIO_ACTIVE_LOW>;
133 linux,code = <28>; 134 linux,code = <KEY_ENTER>;
134 label = "SW2-P"; 135 label = "SW2-P";
135 }; 136 };
136 137
137 up-key { 138 up-key {
138 gpios = <&pcf8575 12 GPIO_ACTIVE_LOW>; 139 gpios = <&pcf8575 12 GPIO_ACTIVE_LOW>;
139 linux,code = <103>; 140 linux,code = <KEY_UP>;
140 label = "SW2-U"; 141 label = "SW2-U";
141 }; 142 };
142 143
143 down-key { 144 down-key {
144 gpios = <&pcf8575 13 GPIO_ACTIVE_LOW>; 145 gpios = <&pcf8575 13 GPIO_ACTIVE_LOW>;
145 linux,code = <108>; 146 linux,code = <KEY_DOWN>;
146 label = "SW2-D"; 147 label = "SW2-D";
147 }; 148 };
148 149
149 home-key { 150 home-key {
150 gpios = <&pcf8575 14 GPIO_ACTIVE_LOW>; 151 gpios = <&pcf8575 14 GPIO_ACTIVE_LOW>;
151 linux,code = <102>; 152 linux,code = <KEY_HOME>;
152 label = "SW1"; 153 label = "SW1";
153 }; 154 };
154 }; 155 };
diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi
index 56fc214e6d2c..4676f25e87a7 100644
--- a/arch/arm/boot/dts/socfpga.dtsi
+++ b/arch/arm/boot/dts/socfpga.dtsi
@@ -15,7 +15,8 @@
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18/include/ "skeleton.dtsi" 18#include "skeleton.dtsi"
19#include <dt-bindings/reset/altr,rst-mgr.h>
19 20
20/ { 21/ {
21 #address-cells = <1>; 22 #address-cells = <1>;
@@ -75,7 +76,14 @@
75 pdma: pdma@ffe01000 { 76 pdma: pdma@ffe01000 {
76 compatible = "arm,pl330", "arm,primecell"; 77 compatible = "arm,pl330", "arm,primecell";
77 reg = <0xffe01000 0x1000>; 78 reg = <0xffe01000 0x1000>;
78 interrupts = <0 180 4>; 79 interrupts = <0 104 4>,
80 <0 105 4>,
81 <0 106 4>,
82 <0 107 4>,
83 <0 108 4>,
84 <0 109 4>,
85 <0 110 4>,
86 <0 111 4>;
79 #dma-cells = <1>; 87 #dma-cells = <1>;
80 #dma-channels = <8>; 88 #dma-channels = <8>;
81 #dma-requests = <32>; 89 #dma-requests = <32>;
@@ -84,6 +92,22 @@
84 }; 92 };
85 }; 93 };
86 94
95 can0: can@ffc00000 {
96 compatible = "bosch,d_can";
97 reg = <0xffc00000 0x1000>;
98 interrupts = <0 131 4>, <0 132 4>, <0 133 4>, <0 134 4>;
99 clocks = <&can0_clk>;
100 status = "disabled";
101 };
102
103 can1: can@ffc01000 {
104 compatible = "bosch,d_can";
105 reg = <0xffc01000 0x1000>;
106 interrupts = <0 135 4>, <0 136 4>, <0 137 4>, <0 138 4>;
107 clocks = <&can1_clk>;
108 status = "disabled";
109 };
110
87 clkmgr@ffd04000 { 111 clkmgr@ffd04000 {
88 compatible = "altr,clk-mgr"; 112 compatible = "altr,clk-mgr";
89 reg = <0xffd04000 0x1000>; 113 reg = <0xffd04000 0x1000>;
@@ -124,7 +148,7 @@
124 #clock-cells = <0>; 148 #clock-cells = <0>;
125 compatible = "altr,socfpga-perip-clk"; 149 compatible = "altr,socfpga-perip-clk";
126 clocks = <&main_pll>; 150 clocks = <&main_pll>;
127 fixed-divider = <2>; 151 div-reg = <0xe0 0 9>;
128 reg = <0x48>; 152 reg = <0x48>;
129 }; 153 };
130 154
@@ -132,7 +156,7 @@
132 #clock-cells = <0>; 156 #clock-cells = <0>;
133 compatible = "altr,socfpga-perip-clk"; 157 compatible = "altr,socfpga-perip-clk";
134 clocks = <&main_pll>; 158 clocks = <&main_pll>;
135 fixed-divider = <4>; 159 div-reg = <0xe4 0 9>;
136 reg = <0x4C>; 160 reg = <0x4C>;
137 }; 161 };
138 162
@@ -140,7 +164,7 @@
140 #clock-cells = <0>; 164 #clock-cells = <0>;
141 compatible = "altr,socfpga-perip-clk"; 165 compatible = "altr,socfpga-perip-clk";
142 clocks = <&main_pll>; 166 clocks = <&main_pll>;
143 fixed-divider = <4>; 167 div-reg = <0xe8 0 9>;
144 reg = <0x50>; 168 reg = <0x50>;
145 }; 169 };
146 170
@@ -460,6 +484,8 @@
460 mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */ 484 mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */
461 clocks = <&emac0_clk>; 485 clocks = <&emac0_clk>;
462 clock-names = "stmmaceth"; 486 clock-names = "stmmaceth";
487 resets = <&rst EMAC0_RESET>;
488 reset-names = "stmmaceth";
463 status = "disabled"; 489 status = "disabled";
464 }; 490 };
465 491
@@ -472,9 +498,111 @@
472 mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */ 498 mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */
473 clocks = <&emac1_clk>; 499 clocks = <&emac1_clk>;
474 clock-names = "stmmaceth"; 500 clock-names = "stmmaceth";
501 resets = <&rst EMAC1_RESET>;
502 reset-names = "stmmaceth";
503 status = "disabled";
504 };
505
506 i2c0: i2c@ffc04000 {
507 #address-cells = <1>;
508 #size-cells = <0>;
509 compatible = "snps,designware-i2c";
510 reg = <0xffc04000 0x1000>;
511 clocks = <&l4_sp_clk>;
512 interrupts = <0 158 0x4>;
513 status = "disabled";
514 };
515
516 i2c1: i2c@ffc05000 {
517 #address-cells = <1>;
518 #size-cells = <0>;
519 compatible = "snps,designware-i2c";
520 reg = <0xffc05000 0x1000>;
521 clocks = <&l4_sp_clk>;
522 interrupts = <0 159 0x4>;
475 status = "disabled"; 523 status = "disabled";
476 }; 524 };
477 525
526 i2c2: i2c@ffc06000 {
527 #address-cells = <1>;
528 #size-cells = <0>;
529 compatible = "snps,designware-i2c";
530 reg = <0xffc06000 0x1000>;
531 clocks = <&l4_sp_clk>;
532 interrupts = <0 160 0x4>;
533 status = "disabled";
534 };
535
536 i2c3: i2c@ffc07000 {
537 #address-cells = <1>;
538 #size-cells = <0>;
539 compatible = "snps,designware-i2c";
540 reg = <0xffc07000 0x1000>;
541 clocks = <&l4_sp_clk>;
542 interrupts = <0 161 0x4>;
543 status = "disabled";
544 };
545
546 gpio@ff708000 {
547 #address-cells = <1>;
548 #size-cells = <0>;
549 compatible = "snps,dw-apb-gpio";
550 reg = <0xff708000 0x1000>;
551 clocks = <&per_base_clk>;
552 status = "disabled";
553
554 gpio0: gpio-controller@0 {
555 compatible = "snps,dw-apb-gpio-port";
556 gpio-controller;
557 #gpio-cells = <2>;
558 snps,nr-gpios = <29>;
559 reg = <0>;
560 interrupt-controller;
561 #interrupt-cells = <2>;
562 interrupts = <0 164 4>;
563 };
564 };
565
566 gpio@ff709000 {
567 #address-cells = <1>;
568 #size-cells = <0>;
569 compatible = "snps,dw-apb-gpio";
570 reg = <0xff709000 0x1000>;
571 clocks = <&per_base_clk>;
572 status = "disabled";
573
574 gpio1: gpio-controller@0 {
575 compatible = "snps,dw-apb-gpio-port";
576 gpio-controller;
577 #gpio-cells = <2>;
578 snps,nr-gpios = <29>;
579 reg = <0>;
580 interrupt-controller;
581 #interrupt-cells = <2>;
582 interrupts = <0 165 4>;
583 };
584 };
585
586 gpio@ff70a000 {
587 #address-cells = <1>;
588 #size-cells = <0>;
589 compatible = "snps,dw-apb-gpio";
590 reg = <0xff70a000 0x1000>;
591 clocks = <&per_base_clk>;
592 status = "disabled";
593
594 gpio2: gpio-controller@0 {
595 compatible = "snps,dw-apb-gpio-port";
596 gpio-controller;
597 #gpio-cells = <2>;
598 snps,nr-gpios = <27>;
599 reg = <0>;
600 interrupt-controller;
601 #interrupt-cells = <2>;
602 interrupts = <0 166 4>;
603 };
604 };
605
478 L2: l2-cache@fffef000 { 606 L2: l2-cache@fffef000 {
479 compatible = "arm,pl310-cache"; 607 compatible = "arm,pl310-cache";
480 reg = <0xfffef000 0x1000>; 608 reg = <0xfffef000 0x1000>;
@@ -508,24 +636,32 @@
508 compatible = "snps,dw-apb-timer"; 636 compatible = "snps,dw-apb-timer";
509 interrupts = <0 167 4>; 637 interrupts = <0 167 4>;
510 reg = <0xffc08000 0x1000>; 638 reg = <0xffc08000 0x1000>;
639 clocks = <&l4_sp_clk>;
640 clock-names = "timer";
511 }; 641 };
512 642
513 timer1: timer1@ffc09000 { 643 timer1: timer1@ffc09000 {
514 compatible = "snps,dw-apb-timer"; 644 compatible = "snps,dw-apb-timer";
515 interrupts = <0 168 4>; 645 interrupts = <0 168 4>;
516 reg = <0xffc09000 0x1000>; 646 reg = <0xffc09000 0x1000>;
647 clocks = <&l4_sp_clk>;
648 clock-names = "timer";
517 }; 649 };
518 650
519 timer2: timer2@ffd00000 { 651 timer2: timer2@ffd00000 {
520 compatible = "snps,dw-apb-timer"; 652 compatible = "snps,dw-apb-timer";
521 interrupts = <0 169 4>; 653 interrupts = <0 169 4>;
522 reg = <0xffd00000 0x1000>; 654 reg = <0xffd00000 0x1000>;
655 clocks = <&osc1>;
656 clock-names = "timer";
523 }; 657 };
524 658
525 timer3: timer3@ffd01000 { 659 timer3: timer3@ffd01000 {
526 compatible = "snps,dw-apb-timer"; 660 compatible = "snps,dw-apb-timer";
527 interrupts = <0 170 4>; 661 interrupts = <0 170 4>;
528 reg = <0xffd01000 0x1000>; 662 reg = <0xffd01000 0x1000>;
663 clocks = <&osc1>;
664 clock-names = "timer";
529 }; 665 };
530 666
531 uart0: serial0@ffc02000 { 667 uart0: serial0@ffc02000 {
@@ -534,6 +670,7 @@
534 interrupts = <0 162 4>; 670 interrupts = <0 162 4>;
535 reg-shift = <2>; 671 reg-shift = <2>;
536 reg-io-width = <4>; 672 reg-io-width = <4>;
673 clocks = <&l4_sp_clk>;
537 }; 674 };
538 675
539 uart1: serial1@ffc03000 { 676 uart1: serial1@ffc03000 {
@@ -542,13 +679,58 @@
542 interrupts = <0 163 4>; 679 interrupts = <0 163 4>;
543 reg-shift = <2>; 680 reg-shift = <2>;
544 reg-io-width = <4>; 681 reg-io-width = <4>;
682 clocks = <&l4_sp_clk>;
545 }; 683 };
546 684
547 rstmgr@ffd05000 { 685 rst: rstmgr@ffd05000 {
548 compatible = "altr,rst-mgr"; 686 compatible = "altr,rst-mgr";
549 reg = <0xffd05000 0x1000>; 687 reg = <0xffd05000 0x1000>;
550 }; 688 };
551 689
690 usbphy0: usbphy@0 {
691 #phy-cells = <0>;
692 compatible = "usb-nop-xceiv";
693 status = "okay";
694 };
695
696 usb0: usb@ffb00000 {
697 compatible = "snps,dwc2";
698 reg = <0xffb00000 0xffff>;
699 interrupts = <0 125 4>;
700 clocks = <&usb_mp_clk>;
701 clock-names = "otg";
702 phys = <&usbphy0>;
703 phy-names = "usb2-phy";
704 status = "disabled";
705 };
706
707 usb1: usb@ffb40000 {
708 compatible = "snps,dwc2";
709 reg = <0xffb40000 0xffff>;
710 interrupts = <0 128 4>;
711 clocks = <&usb_mp_clk>;
712 clock-names = "otg";
713 phys = <&usbphy0>;
714 phy-names = "usb2-phy";
715 status = "disabled";
716 };
717
718 watchdog0: watchdog@ffd02000 {
719 compatible = "snps,dw-wdt";
720 reg = <0xffd02000 0x1000>;
721 interrupts = <0 171 4>;
722 clocks = <&osc1>;
723 status = "disabled";
724 };
725
726 watchdog1: watchdog@ffd03000 {
727 compatible = "snps,dw-wdt";
728 reg = <0xffd03000 0x1000>;
729 interrupts = <0 172 4>;
730 clocks = <&osc1>;
731 status = "disabled";
732 };
733
552 sysmgr: sysmgr@ffd08000 { 734 sysmgr: sysmgr@ffd08000 {
553 compatible = "altr,sys-mgr", "syscon"; 735 compatible = "altr,sys-mgr", "syscon";
554 reg = <0xffd08000 0x4000>; 736 reg = <0xffd08000 0x4000>;
diff --git a/arch/arm/boot/dts/socfpga_arria5.dtsi b/arch/arm/boot/dts/socfpga_arria5.dtsi
index 6c87b7070ca7..12d1c2ccaf5b 100644
--- a/arch/arm/boot/dts/socfpga_arria5.dtsi
+++ b/arch/arm/boot/dts/socfpga_arria5.dtsi
@@ -15,7 +15,7 @@
15 */ 15 */
16 16
17/dts-v1/; 17/dts-v1/;
18/include/ "socfpga.dtsi" 18#include "socfpga.dtsi"
19 19
20/ { 20/ {
21 soc { 21 soc {
@@ -38,32 +38,8 @@
38 }; 38 };
39 }; 39 };
40 40
41 serial0@ffc02000 {
42 clock-frequency = <100000000>;
43 };
44
45 serial1@ffc03000 {
46 clock-frequency = <100000000>;
47 };
48
49 sysmgr@ffd08000 { 41 sysmgr@ffd08000 {
50 cpu1-start-addr = <0xffd080c4>; 42 cpu1-start-addr = <0xffd080c4>;
51 }; 43 };
52
53 timer0@ffc08000 {
54 clock-frequency = <100000000>;
55 };
56
57 timer1@ffc09000 {
58 clock-frequency = <100000000>;
59 };
60
61 timer2@ffd00000 {
62 clock-frequency = <25000000>;
63 };
64
65 timer3@ffd01000 {
66 clock-frequency = <25000000>;
67 };
68 }; 44 };
69}; 45};
diff --git a/arch/arm/boot/dts/socfpga_arria5_socdk.dts b/arch/arm/boot/dts/socfpga_arria5_socdk.dts
index a87ee1c07661..d532d171e391 100644
--- a/arch/arm/boot/dts/socfpga_arria5_socdk.dts
+++ b/arch/arm/boot/dts/socfpga_arria5_socdk.dts
@@ -15,7 +15,7 @@
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18/include/ "socfpga_arria5.dtsi" 18#include "socfpga_arria5.dtsi"
19 19
20/ { 20/ {
21 model = "Altera SOCFPGA Arria V SoC Development Kit"; 21 model = "Altera SOCFPGA Arria V SoC Development Kit";
@@ -59,3 +59,22 @@
59 rxdv-skew-ps = <0>; 59 rxdv-skew-ps = <0>;
60 rxc-skew-ps = <2000>; 60 rxc-skew-ps = <2000>;
61}; 61};
62
63&i2c0 {
64 status = "okay";
65
66 eeprom@51 {
67 compatible = "atmel,24c32";
68 reg = <0x51>;
69 pagesize = <32>;
70 };
71
72 rtc@68 {
73 compatible = "dallas,ds1339";
74 reg = <0x68>;
75 };
76};
77
78&usb1 {
79 status = "okay";
80};
diff --git a/arch/arm/boot/dts/socfpga_cyclone5.dtsi b/arch/arm/boot/dts/socfpga_cyclone5.dtsi
index ca41b0ebf461..bf511828729f 100644
--- a/arch/arm/boot/dts/socfpga_cyclone5.dtsi
+++ b/arch/arm/boot/dts/socfpga_cyclone5.dtsi
@@ -16,7 +16,7 @@
16 */ 16 */
17 17
18/dts-v1/; 18/dts-v1/;
19/include/ "socfpga.dtsi" 19#include "socfpga.dtsi"
20 20
21/ { 21/ {
22 soc { 22 soc {
@@ -45,30 +45,6 @@
45 status = "okay"; 45 status = "okay";
46 }; 46 };
47 47
48 timer0@ffc08000 {
49 clock-frequency = <100000000>;
50 };
51
52 timer1@ffc09000 {
53 clock-frequency = <100000000>;
54 };
55
56 timer2@ffd00000 {
57 clock-frequency = <25000000>;
58 };
59
60 timer3@ffd01000 {
61 clock-frequency = <25000000>;
62 };
63
64 serial0@ffc02000 {
65 clock-frequency = <100000000>;
66 };
67
68 serial1@ffc03000 {
69 clock-frequency = <100000000>;
70 };
71
72 sysmgr@ffd08000 { 48 sysmgr@ffd08000 {
73 cpu1-start-addr = <0xffd080c4>; 49 cpu1-start-addr = <0xffd080c4>;
74 }; 50 };
diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
index ae16d975196d..45de1514af0a 100644
--- a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
+++ b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
@@ -15,7 +15,7 @@
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18/include/ "socfpga_cyclone5.dtsi" 18#include "socfpga_cyclone5.dtsi"
19 19
20/ { 20/ {
21 model = "Altera SOCFPGA Cyclone V SoC Development Kit"; 21 model = "Altera SOCFPGA Cyclone V SoC Development Kit";
@@ -52,3 +52,22 @@
52 rxdv-skew-ps = <0>; 52 rxdv-skew-ps = <0>;
53 rxc-skew-ps = <2000>; 53 rxc-skew-ps = <2000>;
54}; 54};
55
56&i2c0 {
57 status = "okay";
58
59 eeprom@51 {
60 compatible = "atmel,24c32";
61 reg = <0x51>;
62 pagesize = <32>;
63 };
64
65 rtc@68 {
66 compatible = "dallas,ds1339";
67 reg = <0x68>;
68 };
69};
70
71&usb1 {
72 status = "okay";
73};
diff --git a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
index b79e2a2bf175..d26f155f5fd9 100644
--- a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
+++ b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
@@ -15,7 +15,7 @@
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18/include/ "socfpga_cyclone5.dtsi" 18#include "socfpga_cyclone5.dtsi"
19 19
20/ { 20/ {
21 model = "Terasic SoCkit"; 21 model = "Terasic SoCkit";
@@ -52,3 +52,7 @@
52 rxdv-skew-ps = <0>; 52 rxdv-skew-ps = <0>;
53 rxc-skew-ps = <2000>; 53 rxc-skew-ps = <2000>;
54}; 54};
55
56&usb1 {
57 status = "okay";
58};
diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts b/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
new file mode 100644
index 000000000000..a1814b457450
--- /dev/null
+++ b/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
@@ -0,0 +1,50 @@
1/*
2 * Copyright (C) 2014 Steffen Trumtrar <s.trumtrar@pengutronix.de>
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 as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
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 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "socfpga_cyclone5.dtsi"
19
20/ {
21 model = "EBV SOCrates";
22 compatible = "ebv,socrates", "altr,socfpga-cyclone5", "altr,socfpga";
23
24 chosen {
25 bootargs = "console=ttyS0,115200";
26 };
27
28 memory {
29 name = "memory";
30 device_type = "memory";
31 reg = <0x0 0x40000000>; /* 1GB */
32 };
33};
34
35&gmac1 {
36 status = "okay";
37};
38
39&i2c0 {
40 status = "okay";
41
42 rtc: rtc@68 {
43 compatible = "stm,m41t82";
44 reg = <0x68>;
45 };
46};
47
48&mmc {
49 status = "okay";
50};
diff --git a/arch/arm/boot/dts/socfpga_vt.dts b/arch/arm/boot/dts/socfpga_vt.dts
index 87d6f759a9c1..09792b411110 100644
--- a/arch/arm/boot/dts/socfpga_vt.dts
+++ b/arch/arm/boot/dts/socfpga_vt.dts
@@ -16,7 +16,7 @@
16 */ 16 */
17 17
18/dts-v1/; 18/dts-v1/;
19/include/ "socfpga.dtsi" 19#include "socfpga.dtsi"
20 20
21/ { 21/ {
22 model = "Altera SOCFPGA VT"; 22 model = "Altera SOCFPGA VT";
diff --git a/arch/arm/boot/dts/ste-ccu8540.dts b/arch/arm/boot/dts/ste-ccu8540.dts
index 7f3baf51a3a9..32dd55e5f4e6 100644
--- a/arch/arm/boot/dts/ste-ccu8540.dts
+++ b/arch/arm/boot/dts/ste-ccu8540.dts
@@ -18,6 +18,7 @@
18 compatible = "st-ericsson,ccu8540", "st-ericsson,u8540"; 18 compatible = "st-ericsson,ccu8540", "st-ericsson,u8540";
19 19
20 memory@0 { 20 memory@0 {
21 device_type = "memory";
21 reg = <0x20000000 0x1f000000>, <0xc0000000 0x3f000000>; 22 reg = <0x20000000 0x1f000000>, <0xc0000000 0x3f000000>;
22 }; 23 };
23 24
diff --git a/arch/arm/boot/dts/ste-ccu9540.dts b/arch/arm/boot/dts/ste-ccu9540.dts
index 229508750890..651c56d400a4 100644
--- a/arch/arm/boot/dts/ste-ccu9540.dts
+++ b/arch/arm/boot/dts/ste-ccu9540.dts
@@ -38,8 +38,8 @@
38 arm,primecell-periphid = <0x10480180>; 38 arm,primecell-periphid = <0x10480180>;
39 max-frequency = <100000000>; 39 max-frequency = <100000000>;
40 bus-width = <4>; 40 bus-width = <4>;
41 mmc-cap-sd-highspeed; 41 cap-sd-highspeed;
42 mmc-cap-mmc-highspeed; 42 cap-mmc-highspeed;
43 vmmc-supply = <&ab8500_ldo_aux3_reg>; 43 vmmc-supply = <&ab8500_ldo_aux3_reg>;
44 44
45 cd-gpios = <&gpio7 6 0x4>; // 230 45 cd-gpios = <&gpio7 6 0x4>; // 230
@@ -63,7 +63,7 @@
63 arm,primecell-periphid = <0x10480180>; 63 arm,primecell-periphid = <0x10480180>;
64 max-frequency = <100000000>; 64 max-frequency = <100000000>;
65 bus-width = <8>; 65 bus-width = <8>;
66 mmc-cap-mmc-highspeed; 66 cap-mmc-highspeed;
67 vmmc-supply = <&ab8500_ldo_aux2_reg>; 67 vmmc-supply = <&ab8500_ldo_aux2_reg>;
68 68
69 status = "okay"; 69 status = "okay";
diff --git a/arch/arm/boot/dts/ste-href.dtsi b/arch/arm/boot/dts/ste-href.dtsi
index 6cb9b68e2188..bf8f0eddc2c0 100644
--- a/arch/arm/boot/dts/ste-href.dtsi
+++ b/arch/arm/boot/dts/ste-href.dtsi
@@ -116,8 +116,15 @@
116 arm,primecell-periphid = <0x10480180>; 116 arm,primecell-periphid = <0x10480180>;
117 max-frequency = <100000000>; 117 max-frequency = <100000000>;
118 bus-width = <4>; 118 bus-width = <4>;
119 mmc-cap-sd-highspeed; 119 cap-sd-highspeed;
120 mmc-cap-mmc-highspeed; 120 cap-mmc-highspeed;
121 sd-uhs-sdr12;
122 sd-uhs-sdr25;
123 full-pwr-cycle;
124 st,sig-dir-dat0;
125 st,sig-dir-dat2;
126 st,sig-dir-cmd;
127 st,sig-pin-fbclk;
121 vmmc-supply = <&ab8500_ldo_aux3_reg>; 128 vmmc-supply = <&ab8500_ldo_aux3_reg>;
122 vqmmc-supply = <&vmmci>; 129 vqmmc-supply = <&vmmci>;
123 pinctrl-names = "default", "sleep"; 130 pinctrl-names = "default", "sleep";
@@ -132,6 +139,7 @@
132 arm,primecell-periphid = <0x10480180>; 139 arm,primecell-periphid = <0x10480180>;
133 max-frequency = <100000000>; 140 max-frequency = <100000000>;
134 bus-width = <4>; 141 bus-width = <4>;
142 non-removable;
135 pinctrl-names = "default", "sleep"; 143 pinctrl-names = "default", "sleep";
136 pinctrl-0 = <&sdi1_default_mode>; 144 pinctrl-0 = <&sdi1_default_mode>;
137 pinctrl-1 = <&sdi1_sleep_mode>; 145 pinctrl-1 = <&sdi1_sleep_mode>;
@@ -144,7 +152,9 @@
144 arm,primecell-periphid = <0x10480180>; 152 arm,primecell-periphid = <0x10480180>;
145 max-frequency = <100000000>; 153 max-frequency = <100000000>;
146 bus-width = <8>; 154 bus-width = <8>;
147 mmc-cap-mmc-highspeed; 155 cap-mmc-highspeed;
156 non-removable;
157 vmmc-supply = <&db8500_vsmps2_reg>;
148 pinctrl-names = "default", "sleep"; 158 pinctrl-names = "default", "sleep";
149 pinctrl-0 = <&sdi2_default_mode>; 159 pinctrl-0 = <&sdi2_default_mode>;
150 pinctrl-1 = <&sdi2_sleep_mode>; 160 pinctrl-1 = <&sdi2_sleep_mode>;
@@ -157,7 +167,8 @@
157 arm,primecell-periphid = <0x10480180>; 167 arm,primecell-periphid = <0x10480180>;
158 max-frequency = <100000000>; 168 max-frequency = <100000000>;
159 bus-width = <8>; 169 bus-width = <8>;
160 mmc-cap-mmc-highspeed; 170 cap-mmc-highspeed;
171 non-removable;
161 vmmc-supply = <&ab8500_ldo_aux2_reg>; 172 vmmc-supply = <&ab8500_ldo_aux2_reg>;
162 pinctrl-names = "default", "sleep"; 173 pinctrl-names = "default", "sleep";
163 pinctrl-0 = <&sdi4_default_mode>; 174 pinctrl-0 = <&sdi4_default_mode>;
diff --git a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
index 5acc0449676a..d316c955bd5f 100644
--- a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
+++ b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
@@ -840,8 +840,8 @@
840 interrupts = <22>; 840 interrupts = <22>;
841 max-frequency = <48000000>; 841 max-frequency = <48000000>;
842 bus-width = <4>; 842 bus-width = <4>;
843 mmc-cap-mmc-highspeed; 843 cap-mmc-highspeed;
844 mmc-cap-sd-highspeed; 844 cap-sd-highspeed;
845 cd-gpios = <&gpio3 15 0x1>; 845 cd-gpios = <&gpio3 15 0x1>;
846 cd-inverted; 846 cd-inverted;
847 pinctrl-names = "default"; 847 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/ste-snowball.dts b/arch/arm/boot/dts/ste-snowball.dts
index a2f632d0be2a..474ef83229cd 100644
--- a/arch/arm/boot/dts/ste-snowball.dts
+++ b/arch/arm/boot/dts/ste-snowball.dts
@@ -156,7 +156,7 @@
156 arm,primecell-periphid = <0x10480180>; 156 arm,primecell-periphid = <0x10480180>;
157 max-frequency = <100000000>; 157 max-frequency = <100000000>;
158 bus-width = <4>; 158 bus-width = <4>;
159 mmc-cap-mmc-highspeed; 159 cap-mmc-highspeed;
160 vmmc-supply = <&ab8500_ldo_aux3_reg>; 160 vmmc-supply = <&ab8500_ldo_aux3_reg>;
161 vqmmc-supply = <&vmmci>; 161 vqmmc-supply = <&vmmci>;
162 pinctrl-names = "default", "sleep"; 162 pinctrl-names = "default", "sleep";
@@ -195,7 +195,7 @@
195 arm,primecell-periphid = <0x10480180>; 195 arm,primecell-periphid = <0x10480180>;
196 max-frequency = <100000000>; 196 max-frequency = <100000000>;
197 bus-width = <8>; 197 bus-width = <8>;
198 mmc-cap-mmc-highspeed; 198 cap-mmc-highspeed;
199 vmmc-supply = <&ab8500_ldo_aux2_reg>; 199 vmmc-supply = <&ab8500_ldo_aux2_reg>;
200 pinctrl-names = "default", "sleep"; 200 pinctrl-names = "default", "sleep";
201 pinctrl-0 = <&sdi4_default_mode>; 201 pinctrl-0 = <&sdi4_default_mode>;
diff --git a/arch/arm/boot/dts/ste-u300.dts b/arch/arm/boot/dts/ste-u300.dts
index 6fe688e9e4da..82a661677e97 100644
--- a/arch/arm/boot/dts/ste-u300.dts
+++ b/arch/arm/boot/dts/ste-u300.dts
@@ -442,8 +442,8 @@
442 clock-names = "apb_pclk", "mclk"; 442 clock-names = "apb_pclk", "mclk";
443 max-frequency = <24000000>; 443 max-frequency = <24000000>;
444 bus-width = <4>; // SD-card slot 444 bus-width = <4>; // SD-card slot
445 mmc-cap-mmc-highspeed; 445 cap-mmc-highspeed;
446 mmc-cap-sd-highspeed; 446 cap-sd-highspeed;
447 cd-gpios = <&gpio 12 0x4>; 447 cd-gpios = <&gpio 12 0x4>;
448 cd-inverted; 448 cd-inverted;
449 vmmc-supply = <&ab3100_ldo_g_reg>; 449 vmmc-supply = <&ab3100_ldo_g_reg>;
diff --git a/arch/arm/boot/dts/stih407-b2120.dts b/arch/arm/boot/dts/stih407-b2120.dts
new file mode 100644
index 000000000000..fe69f92e5f82
--- /dev/null
+++ b/arch/arm/boot/dts/stih407-b2120.dts
@@ -0,0 +1,78 @@
1/*
2 * Copyright (C) 2014 STMicroelectronics (R&D) Limited.
3 * Author: Giuseppe Cavallaro <peppe.cavallaro@st.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/dts-v1/;
10#include "stih407.dtsi"
11/ {
12 model = "STiH407 B2120";
13 compatible = "st,stih407-b2120", "st,stih407";
14
15 chosen {
16 bootargs = "console=ttyAS0,115200";
17 linux,stdout-path = &sbc_serial0;
18 };
19
20 memory {
21 device_type = "memory";
22 reg = <0x40000000 0x80000000>;
23 };
24
25 aliases {
26 ttyAS0 = &sbc_serial0;
27 };
28
29 soc {
30 sbc_serial0: serial@9530000 {
31 status = "okay";
32 };
33
34 leds {
35 compatible = "gpio-leds";
36 red {
37 #gpio-cells = <2>;
38 label = "Front Panel LED";
39 gpios = <&pio4 1 0>;
40 linux,default-trigger = "heartbeat";
41 };
42 green {
43 #gpio-cells = <2>;
44 gpios = <&pio1 3 0>;
45 default-state = "off";
46 };
47 };
48
49 i2c@9842000 {
50 status = "okay";
51 };
52
53 i2c@9843000 {
54 status = "okay";
55 };
56
57 i2c@9844000 {
58 status = "okay";
59 };
60
61 i2c@9845000 {
62 status = "okay";
63 };
64
65 i2c@9540000 {
66 status = "okay";
67 };
68
69 /* SSC11 to HDMI */
70 i2c@9541000 {
71 status = "okay";
72 /* HDMI V1.3a supports Standard mode only */
73 clock-frequency = <100000>;
74 st,i2c-min-scl-pulse-width-us = <0>;
75 st,i2c-min-sda-pulse-width-us = <5>;
76 };
77 };
78};
diff --git a/arch/arm/boot/dts/stih407-clock.dtsi b/arch/arm/boot/dts/stih407-clock.dtsi
new file mode 100644
index 000000000000..800f46f009f3
--- /dev/null
+++ b/arch/arm/boot/dts/stih407-clock.dtsi
@@ -0,0 +1,39 @@
1/*
2 * Copyright (C) 2014 STMicroelectronics R&D Limited
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 clocks {
10 /*
11 * Fixed 30MHz oscillator inputs to SoC
12 */
13 clk_sysin: clk-sysin {
14 #clock-cells = <0>;
15 compatible = "fixed-clock";
16 clock-frequency = <30000000>;
17 };
18
19 /*
20 * ARM Peripheral clock for timers
21 */
22 arm_periph_clk: arm-periph-clk {
23 #clock-cells = <0>;
24 compatible = "fixed-clock";
25 clock-frequency = <600000000>;
26 };
27
28 /*
29 * Bootloader initialized system infrastructure clock for
30 * serial devices.
31 */
32 clk_ext2f_a9: clockgen-c0@13 {
33 #clock-cells = <0>;
34 compatible = "fixed-clock";
35 clock-frequency = <200000000>;
36 clock-output-names = "clk-s-icn-reg-0";
37 };
38 };
39};
diff --git a/arch/arm/boot/dts/stih407-pinctrl.dtsi b/arch/arm/boot/dts/stih407-pinctrl.dtsi
new file mode 100644
index 000000000000..402844cb3152
--- /dev/null
+++ b/arch/arm/boot/dts/stih407-pinctrl.dtsi
@@ -0,0 +1,615 @@
1/*
2 * Copyright (C) 2014 STMicroelectronics Limited.
3 * Author: Giuseppe Cavallaro <peppe.cavallaro@st.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 * publishhed by the Free Software Foundation.
8 */
9#include "st-pincfg.h"
10#include <dt-bindings/interrupt-controller/arm-gic.h>
11/ {
12
13 aliases {
14 /* 0-5: PIO_SBC */
15 gpio0 = &pio0;
16 gpio1 = &pio1;
17 gpio2 = &pio2;
18 gpio3 = &pio3;
19 gpio4 = &pio4;
20 gpio5 = &pio5;
21 /* 10-19: PIO_FRONT0 */
22 gpio6 = &pio10;
23 gpio7 = &pio11;
24 gpio8 = &pio12;
25 gpio9 = &pio13;
26 gpio10 = &pio14;
27 gpio11 = &pio15;
28 gpio12 = &pio16;
29 gpio13 = &pio17;
30 gpio14 = &pio18;
31 gpio15 = &pio19;
32 /* 20: PIO_FRONT1 */
33 gpio16 = &pio20;
34 /* 30-35: PIO_REAR */
35 gpio17 = &pio30;
36 gpio18 = &pio31;
37 gpio19 = &pio32;
38 gpio20 = &pio33;
39 gpio21 = &pio34;
40 gpio22 = &pio35;
41 /* 40-42: PIO_FLASH */
42 gpio23 = &pio40;
43 gpio24 = &pio41;
44 gpio25 = &pio42;
45 };
46
47 soc {
48 pin-controller-sbc {
49 #address-cells = <1>;
50 #size-cells = <1>;
51 compatible = "st,stih407-sbc-pinctrl";
52 st,syscfg = <&syscfg_sbc>;
53 reg = <0x0961f080 0x4>;
54 reg-names = "irqmux";
55 interrupts = <GIC_SPI 188 IRQ_TYPE_NONE>;
56 interrupts-names = "irqmux";
57 ranges = <0 0x09610000 0x6000>;
58
59 pio0: gpio@09610000 {
60 gpio-controller;
61 #gpio-cells = <1>;
62 interrupt-controller;
63 #interrupt-cells = <2>;
64 reg = <0x0 0x100>;
65 st,bank-name = "PIO0";
66 };
67 pio1: gpio@09611000 {
68 gpio-controller;
69 #gpio-cells = <1>;
70 interrupt-controller;
71 #interrupt-cells = <2>;
72 reg = <0x1000 0x100>;
73 st,bank-name = "PIO1";
74 };
75 pio2: gpio@09612000 {
76 gpio-controller;
77 #gpio-cells = <1>;
78 interrupt-controller;
79 #interrupt-cells = <2>;
80 reg = <0x2000 0x100>;
81 st,bank-name = "PIO2";
82 };
83 pio3: gpio@09613000 {
84 gpio-controller;
85 #gpio-cells = <1>;
86 interrupt-controller;
87 #interrupt-cells = <2>;
88 reg = <0x3000 0x100>;
89 st,bank-name = "PIO3";
90 };
91 pio4: gpio@09614000 {
92 gpio-controller;
93 #gpio-cells = <1>;
94 interrupt-controller;
95 #interrupt-cells = <2>;
96 reg = <0x4000 0x100>;
97 st,bank-name = "PIO4";
98 };
99
100 pio5: gpio@09615000 {
101 gpio-controller;
102 #gpio-cells = <1>;
103 interrupt-controller;
104 #interrupt-cells = <2>;
105 reg = <0x5000 0x100>;
106 st,bank-name = "PIO5";
107 };
108
109 rc {
110 pinctrl_ir: ir0 {
111 st,pins {
112 ir = <&pio4 0 ALT2 IN>;
113 };
114 };
115 };
116
117 /* SBC_ASC0 - UART10 */
118 sbc_serial0 {
119 pinctrl_sbc_serial0: sbc_serial0-0 {
120 st,pins {
121 tx = <&pio3 4 ALT1 OUT>;
122 rx = <&pio3 5 ALT1 IN>;
123 };
124 };
125 };
126 /* SBC_ASC1 - UART11 */
127 sbc_serial1 {
128 pinctrl_sbc_serial1: sbc_serial1-0 {
129 st,pins {
130 tx = <&pio2 6 ALT3 OUT>;
131 rx = <&pio2 7 ALT3 IN>;
132 };
133 };
134 };
135
136 i2c10 {
137 pinctrl_i2c10_default: i2c10-default {
138 st,pins {
139 sda = <&pio4 6 ALT1 BIDIR>;
140 scl = <&pio4 5 ALT1 BIDIR>;
141 };
142 };
143 };
144
145 i2c11 {
146 pinctrl_i2c11_default: i2c11-default {
147 st,pins {
148 sda = <&pio5 1 ALT1 BIDIR>;
149 scl = <&pio5 0 ALT1 BIDIR>;
150 };
151 };
152 };
153
154 keyscan {
155 pinctrl_keyscan: keyscan {
156 st,pins {
157 keyin0 = <&pio4 0 ALT6 IN>;
158 keyin1 = <&pio4 5 ALT4 IN>;
159 keyin2 = <&pio0 4 ALT2 IN>;
160 keyin3 = <&pio2 6 ALT2 IN>;
161
162 keyout0 = <&pio4 6 ALT4 OUT>;
163 keyout1 = <&pio1 7 ALT2 OUT>;
164 keyout2 = <&pio0 6 ALT2 OUT>;
165 keyout3 = <&pio2 7 ALT2 OUT>;
166 };
167 };
168 };
169
170 gmac1 {
171 /*
172 * Almost all the boards based on STiH407 SoC have an embedded
173 * switch where the mdio/mdc have been used for managing the SMI
174 * iface via I2C. For this reason these lines can be allocated
175 * by using dedicated configuration (in case of there will be a
176 * standard PHY transceiver on-board).
177 */
178 pinctrl_rgmii1: rgmii1-0 {
179 st,pins {
180
181 txd0 = <&pio0 0 ALT1 OUT DE_IO 0 CLK_A>;
182 txd1 = <&pio0 1 ALT1 OUT DE_IO 0 CLK_A>;
183 txd2 = <&pio0 2 ALT1 OUT DE_IO 0 CLK_A>;
184 txd3 = <&pio0 3 ALT1 OUT DE_IO 0 CLK_A>;
185 txen = <&pio0 5 ALT1 OUT DE_IO 0 CLK_A>;
186 txclk = <&pio0 6 ALT1 IN NICLK 0 CLK_A>;
187 rxd0 = <&pio1 4 ALT1 IN DE_IO 0 CLK_A>;
188 rxd1 = <&pio1 5 ALT1 IN DE_IO 0 CLK_A>;
189 rxd2 = <&pio1 6 ALT1 IN DE_IO 0 CLK_A>;
190 rxd3 = <&pio1 7 ALT1 IN DE_IO 0 CLK_A>;
191 rxdv = <&pio2 0 ALT1 IN DE_IO 0 CLK_A>;
192 rxclk = <&pio2 2 ALT1 IN NICLK 500 CLK_A>;
193 clk125 = <&pio3 7 ALT4 IN NICLK 0 CLK_A>;
194 phyclk = <&pio2 3 ALT4 OUT NICLK 1750 CLK_B>;
195 };
196 };
197
198 pinctrl_rgmii1_mdio: rgmii1-mdio {
199 st,pins {
200 mdio = <&pio1 0 ALT1 OUT BYPASS 0>;
201 mdc = <&pio1 1 ALT1 OUT NICLK 0 CLK_A>;
202 mdint = <&pio1 3 ALT1 IN BYPASS 0>;
203 };
204 };
205
206 pinctrl_mii1: mii1 {
207 st,pins {
208 txd0 = <&pio0 0 ALT1 OUT SE_NICLK_IO 0 CLK_A>;
209 txd1 = <&pio0 1 ALT1 OUT SE_NICLK_IO 0 CLK_A>;
210 txd2 = <&pio0 2 ALT1 OUT SE_NICLK_IO 0 CLK_A>;
211 txd3 = <&pio0 3 ALT1 OUT SE_NICLK_IO 0 CLK_A>;
212 txer = <&pio0 4 ALT1 OUT SE_NICLK_IO 0 CLK_A>;
213 txen = <&pio0 5 ALT1 OUT SE_NICLK_IO 0 CLK_A>;
214 txclk = <&pio0 6 ALT1 IN NICLK 0 CLK_A>;
215 col = <&pio0 7 ALT1 IN BYPASS 1000>;
216
217 mdio = <&pio1 0 ALT1 OUT BYPASS 1500>;
218 mdc = <&pio1 1 ALT1 OUT NICLK 0 CLK_A>;
219 crs = <&pio1 2 ALT1 IN BYPASS 1000>;
220 mdint = <&pio1 3 ALT1 IN BYPASS 0>;
221 rxd0 = <&pio1 4 ALT1 IN SE_NICLK_IO 0 CLK_A>;
222 rxd1 = <&pio1 5 ALT1 IN SE_NICLK_IO 0 CLK_A>;
223 rxd2 = <&pio1 6 ALT1 IN SE_NICLK_IO 0 CLK_A>;
224 rxd3 = <&pio1 7 ALT1 IN SE_NICLK_IO 0 CLK_A>;
225
226 rxdv = <&pio2 0 ALT1 IN SE_NICLK_IO 0 CLK_A>;
227 rx_er = <&pio2 1 ALT1 IN SE_NICLK_IO 0 CLK_A>;
228 rxclk = <&pio2 2 ALT1 IN NICLK 0 CLK_A>;
229 phyclk = <&pio2 3 ALT1 OUT NICLK 0 CLK_A>;
230 };
231 };
232 };
233
234 pwm1 {
235 pinctrl_pwm1_chan0_default: pwm1-0-default {
236 st,pins {
237 pwm-out = <&pio3 0 ALT1 OUT>;
238 };
239 };
240 pinctrl_pwm1_chan1_default: pwm1-1-default {
241 st,pins {
242 pwm-out = <&pio4 4 ALT1 OUT>;
243 };
244 };
245 pinctrl_pwm1_chan2_default: pwm1-2-default {
246 st,pins {
247 pwm-out = <&pio4 6 ALT3 OUT>;
248 };
249 };
250 pinctrl_pwm1_chan3_default: pwm1-3-default {
251 st,pins {
252 pwm-out = <&pio4 7 ALT3 OUT>;
253 };
254 };
255 };
256 };
257
258 pin-controller-front0 {
259 #address-cells = <1>;
260 #size-cells = <1>;
261 compatible = "st,stih407-front-pinctrl";
262 st,syscfg = <&syscfg_front>;
263 reg = <0x0920f080 0x4>;
264 reg-names = "irqmux";
265 interrupts = <GIC_SPI 189 IRQ_TYPE_NONE>;
266 interrupts-names = "irqmux";
267 ranges = <0 0x09200000 0x10000>;
268
269 pio10: pio@09200000 {
270 gpio-controller;
271 #gpio-cells = <1>;
272 interrupt-controller;
273 #interrupt-cells = <2>;
274 reg = <0x0 0x100>;
275 st,bank-name = "PIO10";
276 };
277 pio11: pio@09201000 {
278 gpio-controller;
279 #gpio-cells = <1>;
280 interrupt-controller;
281 #interrupt-cells = <2>;
282 reg = <0x1000 0x100>;
283 st,bank-name = "PIO11";
284 };
285 pio12: pio@09202000 {
286 gpio-controller;
287 #gpio-cells = <1>;
288 interrupt-controller;
289 #interrupt-cells = <2>;
290 reg = <0x2000 0x100>;
291 st,bank-name = "PIO12";
292 };
293 pio13: pio@09203000 {
294 gpio-controller;
295 #gpio-cells = <1>;
296 interrupt-controller;
297 #interrupt-cells = <2>;
298 reg = <0x3000 0x100>;
299 st,bank-name = "PIO13";
300 };
301 pio14: pio@09204000 {
302 gpio-controller;
303 #gpio-cells = <1>;
304 interrupt-controller;
305 #interrupt-cells = <2>;
306 reg = <0x4000 0x100>;
307 st,bank-name = "PIO14";
308 };
309 pio15: pio@09205000 {
310 gpio-controller;
311 #gpio-cells = <1>;
312 interrupt-controller;
313 #interrupt-cells = <2>;
314 reg = <0x5000 0x100>;
315 st,bank-name = "PIO15";
316 };
317 pio16: pio@09206000 {
318 gpio-controller;
319 #gpio-cells = <1>;
320 interrupt-controller;
321 #interrupt-cells = <2>;
322 reg = <0x6000 0x100>;
323 st,bank-name = "PIO16";
324 };
325 pio17: pio@09207000 {
326 gpio-controller;
327 #gpio-cells = <1>;
328 interrupt-controller;
329 #interrupt-cells = <2>;
330 reg = <0x7000 0x100>;
331 st,bank-name = "PIO17";
332 };
333 pio18: pio@09208000 {
334 gpio-controller;
335 #gpio-cells = <1>;
336 interrupt-controller;
337 #interrupt-cells = <2>;
338 reg = <0x8000 0x100>;
339 st,bank-name = "PIO18";
340 };
341 pio19: pio@09209000 {
342 gpio-controller;
343 #gpio-cells = <1>;
344 interrupt-controller;
345 #interrupt-cells = <2>;
346 reg = <0x9000 0x100>;
347 st,bank-name = "PIO19";
348 };
349
350 /* Comms */
351 serial0 {
352 pinctrl_serial0: serial0-0 {
353 st,pins {
354 tx = <&pio17 0 ALT1 OUT>;
355 rx = <&pio17 1 ALT1 IN>;
356 };
357 };
358 };
359
360 serial1 {
361 pinctrl_serial1: serial1-0 {
362 st,pins {
363 tx = <&pio16 0 ALT1 OUT>;
364 rx = <&pio16 1 ALT1 IN>;
365 };
366 };
367 };
368
369 serial2 {
370 pinctrl_serial2: serial2-0 {
371 st,pins {
372 tx = <&pio15 0 ALT1 OUT>;
373 rx = <&pio15 1 ALT1 IN>;
374 };
375 };
376 };
377
378 mmc1 {
379 pinctrl_sd1: sd1-0 {
380 st,pins {
381 sd_clk = <&pio19 3 ALT5 BIDIR NICLK 0 CLK_B>;
382 sd_cmd = <&pio19 2 ALT5 BIDIR_PU BYPASS 0>;
383 sd_dat0 = <&pio19 4 ALT5 BIDIR_PU BYPASS 0>;
384 sd_dat1 = <&pio19 5 ALT5 BIDIR_PU BYPASS 0>;
385 sd_dat2 = <&pio19 6 ALT5 BIDIR_PU BYPASS 0>;
386 sd_dat3 = <&pio19 7 ALT5 BIDIR_PU BYPASS 0>;
387 sd_led = <&pio16 6 ALT6 OUT>;
388 sd_pwren = <&pio16 7 ALT6 OUT>;
389 sd_cd = <&pio19 0 ALT6 IN>;
390 sd_wp = <&pio19 1 ALT6 IN>;
391 };
392 };
393 };
394
395
396 i2c0 {
397 pinctrl_i2c0_default: i2c0-default {
398 st,pins {
399 sda = <&pio10 6 ALT2 BIDIR>;
400 scl = <&pio10 5 ALT2 BIDIR>;
401 };
402 };
403 };
404
405 i2c1 {
406 pinctrl_i2c1_default: i2c1-default {
407 st,pins {
408 sda = <&pio11 1 ALT2 BIDIR>;
409 scl = <&pio11 0 ALT2 BIDIR>;
410 };
411 };
412 };
413
414 i2c2 {
415 pinctrl_i2c2_default: i2c2-default {
416 st,pins {
417 sda = <&pio15 6 ALT2 BIDIR>;
418 scl = <&pio15 5 ALT2 BIDIR>;
419 };
420 };
421 };
422
423 i2c3 {
424 pinctrl_i2c3_default: i2c3-default {
425 st,pins {
426 sda = <&pio18 6 ALT1 BIDIR>;
427 scl = <&pio18 5 ALT1 BIDIR>;
428 };
429 };
430 };
431
432 spi0 {
433 pinctrl_spi0_default: spi0-default {
434 st,pins {
435 mtsr = <&pio12 6 ALT2 BIDIR>;
436 mrst = <&pio12 7 ALT2 BIDIR>;
437 scl = <&pio12 5 ALT2 BIDIR>;
438 };
439 };
440 };
441 };
442
443 pin-controller-front1 {
444 #address-cells = <1>;
445 #size-cells = <1>;
446 compatible = "st,stih407-front-pinctrl";
447 st,syscfg = <&syscfg_front>;
448 reg = <0x0921f080 0x4>;
449 reg-names = "irqmux";
450 interrupts = <GIC_SPI 190 IRQ_TYPE_NONE>;
451 interrupts-names = "irqmux";
452 ranges = <0 0x09210000 0x10000>;
453
454 pio20: pio@09210000 {
455 gpio-controller;
456 #gpio-cells = <1>;
457 interrupt-controller;
458 #interrupt-cells = <2>;
459 reg = <0x0 0x100>;
460 st,bank-name = "PIO20";
461 };
462 };
463
464 pin-controller-rear {
465 #address-cells = <1>;
466 #size-cells = <1>;
467 compatible = "st,stih407-rear-pinctrl";
468 st,syscfg = <&syscfg_rear>;
469 reg = <0x0922f080 0x4>;
470 reg-names = "irqmux";
471 interrupts = <GIC_SPI 191 IRQ_TYPE_NONE>;
472 interrupts-names = "irqmux";
473 ranges = <0 0x09220000 0x6000>;
474
475 pio30: gpio@09220000 {
476 gpio-controller;
477 #gpio-cells = <1>;
478 interrupt-controller;
479 #interrupt-cells = <2>;
480 reg = <0x0 0x100>;
481 st,bank-name = "PIO30";
482 };
483 pio31: gpio@09221000 {
484 gpio-controller;
485 #gpio-cells = <1>;
486 interrupt-controller;
487 #interrupt-cells = <2>;
488 reg = <0x1000 0x100>;
489 st,bank-name = "PIO31";
490 };
491 pio32: gpio@09222000 {
492 gpio-controller;
493 #gpio-cells = <1>;
494 interrupt-controller;
495 #interrupt-cells = <2>;
496 reg = <0x2000 0x100>;
497 st,bank-name = "PIO32";
498 };
499 pio33: gpio@09223000 {
500 gpio-controller;
501 #gpio-cells = <1>;
502 interrupt-controller;
503 #interrupt-cells = <2>;
504 reg = <0x3000 0x100>;
505 st,bank-name = "PIO33";
506 };
507 pio34: gpio@09224000 {
508 gpio-controller;
509 #gpio-cells = <1>;
510 interrupt-controller;
511 #interrupt-cells = <2>;
512 reg = <0x4000 0x100>;
513 st,bank-name = "PIO34";
514 };
515 pio35: gpio@09225000 {
516 gpio-controller;
517 #gpio-cells = <1>;
518 interrupt-controller;
519 #interrupt-cells = <2>;
520 reg = <0x5000 0x100>;
521 st,bank-name = "PIO35";
522 };
523
524 i2c4 {
525 pinctrl_i2c4_default: i2c4-default {
526 st,pins {
527 sda = <&pio30 1 ALT1 BIDIR>;
528 scl = <&pio30 0 ALT1 BIDIR>;
529 };
530 };
531 };
532
533 i2c5 {
534 pinctrl_i2c5_default: i2c5-default {
535 st,pins {
536 sda = <&pio34 4 ALT1 BIDIR>;
537 scl = <&pio34 3 ALT1 BIDIR>;
538 };
539 };
540 };
541
542 usb3 {
543 pinctrl_usb3: usb3-2 {
544 st,pins {
545 usb-oc-detect = <&pio35 4 ALT1 IN>;
546 usb-pwr-enable = <&pio35 5 ALT1 OUT>;
547 usb-vbus-valid = <&pio35 6 ALT1 IN>;
548 };
549 };
550 };
551
552 pwm0 {
553 pinctrl_pwm0_chan0_default: pwm0-0-default {
554 st,pins {
555 pwm-out = <&pio31 1 ALT1 OUT>;
556 };
557 };
558 };
559 };
560
561 pin-controller-flash {
562 #address-cells = <1>;
563 #size-cells = <1>;
564 compatible = "st,stih407-flash-pinctrl";
565 st,syscfg = <&syscfg_flash>;
566 reg = <0x0923f080 0x4>;
567 reg-names = "irqmux";
568 interrupts = <GIC_SPI 192 IRQ_TYPE_NONE>;
569 interrupts-names = "irqmux";
570 ranges = <0 0x09230000 0x3000>;
571
572 pio40: gpio@09230000 {
573 gpio-controller;
574 #gpio-cells = <1>;
575 interrupt-controller;
576 #interrupt-cells = <2>;
577 reg = <0 0x100>;
578 st,bank-name = "PIO40";
579 };
580 pio41: gpio@09231000 {
581 gpio-controller;
582 #gpio-cells = <1>;
583 interrupt-controller;
584 #interrupt-cells = <2>;
585 reg = <0x1000 0x100>;
586 st,bank-name = "PIO41";
587 };
588 pio42: gpio@09232000 {
589 gpio-controller;
590 #gpio-cells = <1>;
591 interrupt-controller;
592 #interrupt-cells = <2>;
593 reg = <0x2000 0x100>;
594 st,bank-name = "PIO42";
595 };
596
597 mmc0 {
598 pinctrl_mmc0: mmc0-0 {
599 st,pins {
600 emmc_clk = <&pio40 6 ALT1 BIDIR>;
601 emmc_cmd = <&pio40 7 ALT1 BIDIR_PU>;
602 emmc_d0 = <&pio41 0 ALT1 BIDIR_PU>;
603 emmc_d1 = <&pio41 1 ALT1 BIDIR_PU>;
604 emmc_d2 = <&pio41 2 ALT1 BIDIR_PU>;
605 emmc_d3 = <&pio41 3 ALT1 BIDIR_PU>;
606 emmc_d4 = <&pio41 4 ALT1 BIDIR_PU>;
607 emmc_d5 = <&pio41 5 ALT1 BIDIR_PU>;
608 emmc_d6 = <&pio41 6 ALT1 BIDIR_PU>;
609 emmc_d7 = <&pio41 7 ALT1 BIDIR_PU>;
610 };
611 };
612 };
613 };
614 };
615};
diff --git a/arch/arm/boot/dts/stih407.dtsi b/arch/arm/boot/dts/stih407.dtsi
new file mode 100644
index 000000000000..4f9024f19866
--- /dev/null
+++ b/arch/arm/boot/dts/stih407.dtsi
@@ -0,0 +1,263 @@
1/*
2 * Copyright (C) 2014 STMicroelectronics Limited.
3 * Author: Giuseppe Cavallaro <peppe.cavallaro@st.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 * publishhed by the Free Software Foundation.
8 */
9#include "stih407-clock.dtsi"
10#include "stih407-pinctrl.dtsi"
11/ {
12 #address-cells = <1>;
13 #size-cells = <1>;
14
15 cpus {
16 #address-cells = <1>;
17 #size-cells = <0>;
18 cpu@0 {
19 device_type = "cpu";
20 compatible = "arm,cortex-a9";
21 reg = <0>;
22 };
23 cpu@1 {
24 device_type = "cpu";
25 compatible = "arm,cortex-a9";
26 reg = <1>;
27 };
28 };
29
30 intc: interrupt-controller@08761000 {
31 compatible = "arm,cortex-a9-gic";
32 #interrupt-cells = <3>;
33 interrupt-controller;
34 reg = <0x08761000 0x1000>, <0x08760100 0x100>;
35 };
36
37 scu@08760000 {
38 compatible = "arm,cortex-a9-scu";
39 reg = <0x08760000 0x1000>;
40 };
41
42 timer@08760200 {
43 interrupt-parent = <&intc>;
44 compatible = "arm,cortex-a9-global-timer";
45 reg = <0x08760200 0x100>;
46 interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
47 clocks = <&arm_periph_clk>;
48 };
49
50 l2: cache-controller {
51 compatible = "arm,pl310-cache";
52 reg = <0x08762000 0x1000>;
53 arm,data-latency = <3 3 3>;
54 arm,tag-latency = <2 2 2>;
55 cache-unified;
56 cache-level = <2>;
57 };
58
59 soc {
60 #address-cells = <1>;
61 #size-cells = <1>;
62 interrupt-parent = <&intc>;
63 ranges;
64 compatible = "simple-bus";
65
66 syscfg_sbc: sbc-syscfg@9620000 {
67 compatible = "st,stih407-sbc-syscfg", "syscon";
68 reg = <0x9620000 0x1000>;
69 };
70
71 syscfg_front: front-syscfg@9280000 {
72 compatible = "st,stih407-front-syscfg", "syscon";
73 reg = <0x9280000 0x1000>;
74 };
75
76 syscfg_rear: rear-syscfg@9290000 {
77 compatible = "st,stih407-rear-syscfg", "syscon";
78 reg = <0x9290000 0x1000>;
79 };
80
81 syscfg_flash: flash-syscfg@92a0000 {
82 compatible = "st,stih407-flash-syscfg", "syscon";
83 reg = <0x92a0000 0x1000>;
84 };
85
86 syscfg_sbc_reg: fvdp-lite-syscfg@9600000 {
87 compatible = "st,stih407-sbc-reg-syscfg", "syscon";
88 reg = <0x9600000 0x1000>;
89 };
90
91 syscfg_core: core-syscfg@92b0000 {
92 compatible = "st,stih407-core-syscfg", "syscon";
93 reg = <0x92b0000 0x1000>;
94 };
95
96 syscfg_lpm: lpm-syscfg@94b5100 {
97 compatible = "st,stih407-lpm-syscfg", "syscon";
98 reg = <0x94b5100 0x1000>;
99 };
100
101 serial@9830000 {
102 compatible = "st,asc";
103 reg = <0x9830000 0x2c>;
104 interrupts = <GIC_SPI 122 IRQ_TYPE_NONE>;
105 pinctrl-names = "default";
106 pinctrl-0 = <&pinctrl_serial0>;
107 clocks = <&clk_ext2f_a9>;
108
109 status = "disabled";
110 };
111
112 serial@9831000 {
113 compatible = "st,asc";
114 reg = <0x9831000 0x2c>;
115 interrupts = <GIC_SPI 123 IRQ_TYPE_NONE>;
116 pinctrl-names = "default";
117 pinctrl-0 = <&pinctrl_serial1>;
118 clocks = <&clk_ext2f_a9>;
119
120 status = "disabled";
121 };
122
123 serial@9832000 {
124 compatible = "st,asc";
125 reg = <0x9832000 0x2c>;
126 interrupts = <GIC_SPI 124 IRQ_TYPE_NONE>;
127 pinctrl-names = "default";
128 pinctrl-0 = <&pinctrl_serial2>;
129 clocks = <&clk_ext2f_a9>;
130
131 status = "disabled";
132 };
133
134 /* SBC_ASC0 - UART10 */
135 sbc_serial0: serial@9530000 {
136 compatible = "st,asc";
137 reg = <0x9530000 0x2c>;
138 interrupts = <GIC_SPI 138 IRQ_TYPE_NONE>;
139 pinctrl-names = "default";
140 pinctrl-0 = <&pinctrl_sbc_serial0>;
141 clocks = <&clk_sysin>;
142
143 status = "disabled";
144 };
145
146 serial@9531000 {
147 compatible = "st,asc";
148 reg = <0x9531000 0x2c>;
149 interrupts = <GIC_SPI 139 IRQ_TYPE_NONE>;
150 pinctrl-names = "default";
151 pinctrl-0 = <&pinctrl_sbc_serial1>;
152 clocks = <&clk_sysin>;
153
154 status = "disabled";
155 };
156
157 i2c@9840000 {
158 compatible = "st,comms-ssc4-i2c";
159 interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
160 reg = <0x9840000 0x110>;
161 clocks = <&clk_ext2f_a9>;
162 clock-names = "ssc";
163 clock-frequency = <400000>;
164 pinctrl-names = "default";
165 pinctrl-0 = <&pinctrl_i2c0_default>;
166
167 status = "disabled";
168 };
169
170 i2c@9841000 {
171 compatible = "st,comms-ssc4-i2c";
172 reg = <0x9841000 0x110>;
173 interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
174 clocks = <&clk_ext2f_a9>;
175 clock-names = "ssc";
176 clock-frequency = <400000>;
177 pinctrl-names = "default";
178 pinctrl-0 = <&pinctrl_i2c1_default>;
179
180 status = "disabled";
181 };
182
183 i2c@9842000 {
184 compatible = "st,comms-ssc4-i2c";
185 reg = <0x9842000 0x110>;
186 interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
187 clocks = <&clk_ext2f_a9>;
188 clock-names = "ssc";
189 clock-frequency = <400000>;
190 pinctrl-names = "default";
191 pinctrl-0 = <&pinctrl_i2c2_default>;
192
193 status = "disabled";
194 };
195
196 i2c@9843000 {
197 compatible = "st,comms-ssc4-i2c";
198 reg = <0x9843000 0x110>;
199 interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
200 clocks = <&clk_ext2f_a9>;
201 clock-names = "ssc";
202 clock-frequency = <400000>;
203 pinctrl-names = "default";
204 pinctrl-0 = <&pinctrl_i2c3_default>;
205
206 status = "disabled";
207 };
208
209 i2c@9844000 {
210 compatible = "st,comms-ssc4-i2c";
211 reg = <0x9844000 0x110>;
212 interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
213 clocks = <&clk_ext2f_a9>;
214 clock-names = "ssc";
215 clock-frequency = <400000>;
216 pinctrl-names = "default";
217 pinctrl-0 = <&pinctrl_i2c4_default>;
218
219 status = "disabled";
220 };
221
222 i2c@9845000 {
223 compatible = "st,comms-ssc4-i2c";
224 reg = <0x9845000 0x110>;
225 interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
226 clocks = <&clk_ext2f_a9>;
227 clock-names = "ssc";
228 clock-frequency = <400000>;
229 pinctrl-names = "default";
230 pinctrl-0 = <&pinctrl_i2c5_default>;
231
232 status = "disabled";
233 };
234
235
236 /* SSCs on SBC */
237 i2c@9540000 {
238 compatible = "st,comms-ssc4-i2c";
239 reg = <0x9540000 0x110>;
240 interrupts = <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>;
241 clocks = <&clk_sysin>;
242 clock-names = "ssc";
243 clock-frequency = <400000>;
244 pinctrl-names = "default";
245 pinctrl-0 = <&pinctrl_i2c10_default>;
246
247 status = "disabled";
248 };
249
250 i2c@9541000 {
251 compatible = "st,comms-ssc4-i2c";
252 reg = <0x9541000 0x110>;
253 interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
254 clocks = <&clk_sysin>;
255 clock-names = "ssc";
256 clock-frequency = <400000>;
257 pinctrl-names = "default";
258 pinctrl-0 = <&pinctrl_i2c11_default>;
259
260 status = "disabled";
261 };
262 };
263};
diff --git a/arch/arm/boot/dts/stih415-b2000.dts b/arch/arm/boot/dts/stih415-b2000.dts
index d4af53160435..bdfbd3765db2 100644
--- a/arch/arm/boot/dts/stih415-b2000.dts
+++ b/arch/arm/boot/dts/stih415-b2000.dts
@@ -11,5 +11,5 @@
11#include "stih41x-b2000.dtsi" 11#include "stih41x-b2000.dtsi"
12/ { 12/ {
13 model = "STiH415 B2000 Board"; 13 model = "STiH415 B2000 Board";
14 compatible = "st,stih415", "st,stih415-b2000"; 14 compatible = "st,stih415-b2000", "st,stih415";
15}; 15};
diff --git a/arch/arm/boot/dts/stih415-b2020.dts b/arch/arm/boot/dts/stih415-b2020.dts
index 442b019e9a3a..71903a87bd31 100644
--- a/arch/arm/boot/dts/stih415-b2020.dts
+++ b/arch/arm/boot/dts/stih415-b2020.dts
@@ -11,5 +11,5 @@
11#include "stih41x-b2020.dtsi" 11#include "stih41x-b2020.dtsi"
12/ { 12/ {
13 model = "STiH415 B2020 Board"; 13 model = "STiH415 B2020 Board";
14 compatible = "st,stih415", "st,stih415-b2020"; 14 compatible = "st,stih415-b2020", "st,stih415";
15}; 15};
diff --git a/arch/arm/boot/dts/stih415-clock.dtsi b/arch/arm/boot/dts/stih415-clock.dtsi
index d047dbc28d61..3ee34514bc4b 100644
--- a/arch/arm/boot/dts/stih415-clock.dtsi
+++ b/arch/arm/boot/dts/stih415-clock.dtsi
@@ -5,48 +5,529 @@
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
9#include <dt-bindings/clock/stih415-clks.h>
10
8/ { 11/ {
9 clocks { 12 clocks {
13 #address-cells = <1>;
14 #size-cells = <1>;
15 ranges;
16
10 /* 17 /*
11 * Fixed 30MHz oscillator input to SoC 18 * Fixed 30MHz oscillator input to SoC
12 */ 19 */
13 CLK_SYSIN: CLK_SYSIN { 20 clk_sysin: clk-sysin {
14 #clock-cells = <0>; 21 #clock-cells = <0>;
15 compatible = "fixed-clock"; 22 compatible = "fixed-clock";
16 clock-frequency = <30000000>; 23 clock-frequency = <30000000>;
17 }; 24 };
18 25
19 /* 26 /*
20 * ARM Peripheral clock for timers 27 * ClockGenAs on SASG1
21 */ 28 */
22 arm_periph_clk: arm_periph_clk { 29 clockgen-a@fee62000 {
23 #clock-cells = <0>; 30 reg = <0xfee62000 0xb48>;
24 compatible = "fixed-clock"; 31
25 clock-frequency = <500000000>; 32 clk_s_a0_pll: clk-s-a0-pll {
33 #clock-cells = <1>;
34 compatible = "st,clkgena-plls-c65";
35
36 clocks = <&clk_sysin>;
37
38 clock-output-names = "clk-s-a0-pll0-hs",
39 "clk-s-a0-pll0-ls",
40 "clk-s-a0-pll1";
41 };
42
43 clk_s_a0_osc_prediv: clk-s-a0-osc-prediv {
44 #clock-cells = <0>;
45 compatible = "st,clkgena-prediv-c65",
46 "st,clkgena-prediv";
47
48 clocks = <&clk_sysin>;
49
50 clock-output-names = "clk-s-a0-osc-prediv";
51 };
52
53 clk_s_a0_hs: clk-s-a0-hs {
54 #clock-cells = <1>;
55 compatible = "st,clkgena-divmux-c65-hs",
56 "st,clkgena-divmux";
57
58 clocks = <&clk_s_a0_osc_prediv>,
59 <&clk_s_a0_pll 0>, /* PLL0 HS */
60 <&clk_s_a0_pll 2>; /* PLL1 */
61
62 clock-output-names = "clk-s-fdma-0",
63 "clk-s-fdma-1",
64 ""; /* clk-s-jit-sense */
65 /* Fourth output unused */
66 };
67
68 clk_s_a0_ls: clk-s-a0-ls {
69 #clock-cells = <1>;
70 compatible = "st,clkgena-divmux-c65-ls",
71 "st,clkgena-divmux";
72
73 clocks = <&clk_s_a0_osc_prediv>,
74 <&clk_s_a0_pll 1>, /* PLL0 LS */
75 <&clk_s_a0_pll 2>; /* PLL1 */
76
77 clock-output-names = "clk-s-icn-reg-0",
78 "clk-s-icn-if-0",
79 "clk-s-icn-reg-lp-0",
80 "clk-s-emiss",
81 "clk-s-eth1-phy",
82 "clk-s-mii-ref-out";
83 /* Remaining outputs unused */
84 };
85 };
86
87 clockgen-a@fee81000 {
88 reg = <0xfee81000 0xb48>;
89
90 clk_s_a1_pll: clk-s-a1-pll {
91 #clock-cells = <1>;
92 compatible = "st,clkgena-plls-c65";
93
94 clocks = <&clk_sysin>;
95
96 clock-output-names = "clk-s-a1-pll0-hs",
97 "clk-s-a1-pll0-ls",
98 "clk-s-a1-pll1";
99 };
100
101 clk_s_a1_osc_prediv: clk-s-a1-osc-prediv {
102 #clock-cells = <0>;
103 compatible = "st,clkgena-prediv-c65",
104 "st,clkgena-prediv";
105
106 clocks = <&clk_sysin>;
107
108 clock-output-names = "clk-s-a1-osc-prediv";
109 };
110
111 clk_s_a1_hs: clk-s-a1-hs {
112 #clock-cells = <1>;
113 compatible = "st,clkgena-divmux-c65-hs",
114 "st,clkgena-divmux";
115
116 clocks = <&clk_s_a1_osc_prediv>,
117 <&clk_s_a1_pll 0>, /* PLL0 HS */
118 <&clk_s_a1_pll 2>; /* PLL1 */
119
120 clock-output-names = "", /* Reserved */
121 "", /* Reserved */
122 "clk-s-stac-phy",
123 "clk-s-vtac-tx-phy";
124 };
125
126 clk_s_a1_ls: clk-s-a1-ls {
127 #clock-cells = <1>;
128 compatible = "st,clkgena-divmux-c65-ls",
129 "st,clkgena-divmux";
130
131 clocks = <&clk_s_a1_osc_prediv>,
132 <&clk_s_a1_pll 1>, /* PLL0 LS */
133 <&clk_s_a1_pll 2>; /* PLL1 */
134
135 clock-output-names = "clk-s-icn-if-2",
136 "clk-s-card-mmc",
137 "clk-s-icn-if-1",
138 "clk-s-gmac0-phy",
139 "clk-s-nand-ctrl",
140 "", /* Reserved */
141 "clk-s-mii0-ref-out",
142 ""; /* clk-s-stac-sys */
143 /* Remaining outputs unused */
144 };
26 }; 145 };
27 146
28 /* 147 /*
29 * Bootloader initialized system infrastructure clock for 148 * ClockGenAs on MPE41
30 * serial devices.
31 */ 149 */
32 CLKS_ICN_REG_0: CLKS_ICN_REG_0 { 150 clockgen-a@fde12000 {
151 reg = <0xfde12000 0xb50>;
152
153 clk_m_a0_pll0: clk-m-a0-pll0 {
154 #clock-cells = <1>;
155 compatible = "st,plls-c32-a1x-0", "st,clkgen-plls-c32";
156
157 clocks = <&clk_sysin>;
158
159 clock-output-names = "clk-m-a0-pll0-phi0",
160 "clk-m-a0-pll0-phi1",
161 "clk-m-a0-pll0-phi2",
162 "clk-m-a0-pll0-phi3";
163 };
164
165 clk_m_a0_pll1: clk-m-a0-pll1 {
166 #clock-cells = <1>;
167 compatible = "st,plls-c32-a1x-1", "st,clkgen-plls-c32";
168
169 clocks = <&clk_sysin>;
170
171 clock-output-names = "clk-m-a0-pll1-phi0",
172 "clk-m-a0-pll1-phi1",
173 "clk-m-a0-pll1-phi2",
174 "clk-m-a0-pll1-phi3";
175 };
176
177 clk_m_a0_osc_prediv: clk-m-a0-osc-prediv {
178 #clock-cells = <0>;
179 compatible = "st,clkgena-prediv-c32",
180 "st,clkgena-prediv";
181
182 clocks = <&clk_sysin>;
183
184 clock-output-names = "clk-m-a0-osc-prediv";
185 };
186
187 clk_m_a0_div0: clk-m-a0-div0 {
188 #clock-cells = <1>;
189 compatible = "st,clkgena-divmux-c32-odf0",
190 "st,clkgena-divmux";
191
192 clocks = <&clk_m_a0_osc_prediv>,
193 <&clk_m_a0_pll0 0>, /* PLL0 PHI0 */
194 <&clk_m_a0_pll1 0>; /* PLL1 PHI0 */
195
196 clock-output-names = "clk-m-apb-pm", /* Unused */
197 "", /* Unused */
198 "", /* Unused */
199 "", /* Unused */
200 "clk-m-pp-dmu-0",
201 "clk-m-pp-dmu-1",
202 "clk-m-icm-disp",
203 ""; /* Unused */
204 };
205
206 clk_m_a0_div1: clk-m-a0-div1 {
207 #clock-cells = <1>;
208 compatible = "st,clkgena-divmux-c32-odf1",
209 "st,clkgena-divmux";
210
211 clocks = <&clk_m_a0_osc_prediv>,
212 <&clk_m_a0_pll0 1>, /* PLL0 PHI1 */
213 <&clk_m_a0_pll1 1>; /* PLL1 PHI1 */
214
215 clock-output-names = "", /* Unused */
216 "", /* Unused */
217 "clk-m-a9-ext2f",
218 "clk-m-st40rt",
219 "clk-m-st231-dmu-0",
220 "clk-m-st231-dmu-1",
221 "clk-m-st231-aud",
222 "clk-m-st231-gp-0";
223 };
224
225 clk_m_a0_div2: clk-m-a0-div2 {
226 #clock-cells = <1>;
227 compatible = "st,clkgena-divmux-c32-odf2",
228 "st,clkgena-divmux";
229
230 clocks = <&clk_m_a0_osc_prediv>,
231 <&clk_m_a0_pll0 2>, /* PLL0 PHI2 */
232 <&clk_m_a0_pll1 2>; /* PLL1 PHI2 */
233
234 clock-output-names = "clk-m-st231-gp-1",
235 "clk-m-icn-cpu",
236 "clk-m-icn-stac",
237 "clk-m-icn-dmu-0",
238 "clk-m-icn-dmu-1",
239 "", /* Unused */
240 "", /* Unused */
241 ""; /* Unused */
242 };
243
244 clk_m_a0_div3: clk-m-a0-div3 {
245 #clock-cells = <1>;
246 compatible = "st,clkgena-divmux-c32-odf3",
247 "st,clkgena-divmux";
248
249 clocks = <&clk_m_a0_osc_prediv>,
250 <&clk_m_a0_pll0 3>, /* PLL0 PHI3 */
251 <&clk_m_a0_pll1 3>; /* PLL1 PHI3 */
252
253 clock-output-names = "", /* Unused */
254 "", /* Unused */
255 "", /* Unused */
256 "", /* Unused */
257 "", /* Unused */
258 "", /* Unused */
259 "clk-m-icn-eram",
260 "clk-m-a9-trace";
261 };
262 };
263
264 clockgen-a@fd6db000 {
265 reg = <0xfd6db000 0xb50>;
266
267 clk_m_a1_pll0: clk-m-a1-pll0 {
268 #clock-cells = <1>;
269 compatible = "st,plls-c32-a1x-0", "st,clkgen-plls-c32";
270
271 clocks = <&clk_sysin>;
272
273 clock-output-names = "clk-m-a1-pll0-phi0",
274 "clk-m-a1-pll0-phi1",
275 "clk-m-a1-pll0-phi2",
276 "clk-m-a1-pll0-phi3";
277 };
278
279 clk_m_a1_pll1: clk-m-a1-pll1 {
280 #clock-cells = <1>;
281 compatible = "st,plls-c32-a1x-1", "st,clkgen-plls-c32";
282
283 clocks = <&clk_sysin>;
284
285 clock-output-names = "clk-m-a1-pll1-phi0",
286 "clk-m-a1-pll1-phi1",
287 "clk-m-a1-pll1-phi2",
288 "clk-m-a1-pll1-phi3";
289 };
290
291 clk_m_a1_osc_prediv: clk-m-a1-osc-prediv {
292 #clock-cells = <0>;
293 compatible = "st,clkgena-prediv-c32",
294 "st,clkgena-prediv";
295
296 clocks = <&clk_sysin>;
297
298 clock-output-names = "clk-m-a1-osc-prediv";
299 };
300
301 clk_m_a1_div0: clk-m-a1-div0 {
302 #clock-cells = <1>;
303 compatible = "st,clkgena-divmux-c32-odf0",
304 "st,clkgena-divmux";
305
306 clocks = <&clk_m_a1_osc_prediv>,
307 <&clk_m_a1_pll0 0>, /* PLL0 PHI0 */
308 <&clk_m_a1_pll1 0>; /* PLL1 PHI0 */
309
310 clock-output-names = "clk-m-fdma-12",
311 "clk-m-fdma-10",
312 "clk-m-fdma-11",
313 "clk-m-hva-lmi",
314 "clk-m-proc-sc",
315 "clk-m-tp",
316 "clk-m-icn-gpu",
317 "clk-m-icn-vdp-0";
318 };
319
320 clk_m_a1_div1: clk-m-a1-div1 {
321 #clock-cells = <1>;
322 compatible = "st,clkgena-divmux-c32-odf1",
323 "st,clkgena-divmux";
324
325 clocks = <&clk_m_a1_osc_prediv>,
326 <&clk_m_a1_pll0 1>, /* PLL0 PHI1 */
327 <&clk_m_a1_pll1 1>; /* PLL1 PHI1 */
328
329 clock-output-names = "clk-m-icn-vdp-1",
330 "clk-m-icn-vdp-2",
331 "clk-m-icn-vdp-3",
332 "clk-m-prv-t1-bus",
333 "clk-m-icn-vdp-4",
334 "clk-m-icn-reg-10",
335 "", /* Unused */
336 ""; /* clk-m-icn-st231 */
337 };
338
339 clk_m_a1_div2: clk-m-a1-div2 {
340 #clock-cells = <1>;
341 compatible = "st,clkgena-divmux-c32-odf2",
342 "st,clkgena-divmux";
343
344 clocks = <&clk_m_a1_osc_prediv>,
345 <&clk_m_a1_pll0 2>, /* PLL0 PHI2 */
346 <&clk_m_a1_pll1 2>; /* PLL1 PHI2 */
347
348 clock-output-names = "clk-m-fvdp-proc-alt",
349 "", /* Unused */
350 "", /* Unused */
351 "", /* Unused */
352 "", /* Unused */
353 "", /* Unused */
354 "", /* Unused */
355 ""; /* Unused */
356 };
357
358 clk_m_a1_div3: clk-m-a1-div3 {
359 #clock-cells = <1>;
360 compatible = "st,clkgena-divmux-c32-odf3",
361 "st,clkgena-divmux";
362
363 clocks = <&clk_m_a1_osc_prediv>,
364 <&clk_m_a1_pll0 3>, /* PLL0 PHI3 */
365 <&clk_m_a1_pll1 3>; /* PLL1 PHI3 */
366
367 clock-output-names = "", /* Unused */
368 "", /* Unused */
369 "", /* Unused */
370 "", /* Unused */
371 "", /* Unused */
372 "", /* Unused */
373 "", /* Unused */
374 ""; /* Unused */
375 };
376 };
377
378 clk_m_a9_ext2f_div2: clk-m-a9-ext2f-div2 {
33 #clock-cells = <0>; 379 #clock-cells = <0>;
34 compatible = "fixed-clock"; 380 compatible = "fixed-factor-clock";
35 clock-frequency = <100000000>; 381 clocks = <&clk_m_a0_div1 2>;
382 clock-div = <2>;
383 clock-mult = <1>;
36 }; 384 };
37 385
38 CLKS_GMAC0_PHY: clockgenA1@7 { 386 clockgen-a@fd345000 {
387 reg = <0xfd345000 0xb50>;
388
389 clk_m_a2_pll0: clk-m-a2-pll0 {
390 #clock-cells = <1>;
391 compatible = "st,plls-c32-a1x-0", "st,clkgen-plls-c32";
392
393 clocks = <&clk_sysin>;
394
395 clock-output-names = "clk-m-a2-pll0-phi0",
396 "clk-m-a2-pll0-phi1",
397 "clk-m-a2-pll0-phi2",
398 "clk-m-a2-pll0-phi3";
399 };
400
401 clk_m_a2_pll1: clk-m-a2-pll1 {
402 #clock-cells = <1>;
403 compatible = "st,plls-c32-a1x-1", "st,clkgen-plls-c32";
404
405 clocks = <&clk_sysin>;
406
407 clock-output-names = "clk-m-a2-pll1-phi0",
408 "clk-m-a2-pll1-phi1",
409 "clk-m-a2-pll1-phi2",
410 "clk-m-a2-pll1-phi3";
411 };
412
413 clk_m_a2_osc_prediv: clk-m-a2-osc-prediv {
414 #clock-cells = <0>;
415 compatible = "st,clkgena-prediv-c32",
416 "st,clkgena-prediv";
417
418 clocks = <&clk_sysin>;
419
420 clock-output-names = "clk-m-a2-osc-prediv";
421 };
422
423 clk_m_a2_div0: clk-m-a2-div0 {
424 #clock-cells = <1>;
425 compatible = "st,clkgena-divmux-c32-odf0",
426 "st,clkgena-divmux";
427
428 clocks = <&clk_m_a2_osc_prediv>,
429 <&clk_m_a2_pll0 0>, /* PLL0 PHI0 */
430 <&clk_m_a2_pll1 0>; /* PLL1 PHI0 */
431
432 clock-output-names = "clk-m-vtac-main-phy",
433 "clk-m-vtac-aux-phy",
434 "clk-m-stac-phy",
435 "clk-m-stac-sys",
436 "", /* clk-m-mpestac-pg */
437 "", /* clk-m-mpestac-wc */
438 "", /* clk-m-mpevtacaux-pg*/
439 ""; /* clk-m-mpevtacmain-pg*/
440 };
441
442 clk_m_a2_div1: clk-m-a2-div1 {
443 #clock-cells = <1>;
444 compatible = "st,clkgena-divmux-c32-odf1",
445 "st,clkgena-divmux";
446
447 clocks = <&clk_m_a2_osc_prediv>,
448 <&clk_m_a2_pll0 1>, /* PLL0 PHI1 */
449 <&clk_m_a2_pll1 1>; /* PLL1 PHI1 */
450
451 clock-output-names = "", /* clk-m-mpevtacrx0-wc */
452 "", /* clk-m-mpevtacrx1-wc */
453 "clk-m-compo-main",
454 "clk-m-compo-aux",
455 "clk-m-bdisp-0",
456 "clk-m-bdisp-1",
457 "clk-m-icn-bdisp-0",
458 "clk-m-icn-bdisp-1";
459 };
460
461 clk_m_a2_div2: clk-m-a2-div2 {
462 #clock-cells = <1>;
463 compatible = "st,clkgena-divmux-c32-odf2",
464 "st,clkgena-divmux";
465
466 clocks = <&clk_m_a2_osc_prediv>,
467 <&clk_m_a2_pll0 2>, /* PLL0 PHI2 */
468 <&clk_m_a2_pll1 2>; /* PLL1 PHI2 */
469
470 clock-output-names = "", /* clk-m-icn-hqvdp0 */
471 "", /* clk-m-icn-hqvdp1 */
472 "clk-m-icn-compo",
473 "", /* clk-m-icn-vdpaux */
474 "clk-m-icn-ts",
475 "clk-m-icn-reg-lp-10",
476 "clk-m-dcephy-impctrl",
477 ""; /* Unused */
478 };
479
480 clk_m_a2_div3: clk-m-a2-div3 {
481 #clock-cells = <1>;
482 compatible = "st,clkgena-divmux-c32-odf3",
483 "st,clkgena-divmux";
484
485 clocks = <&clk_m_a2_osc_prediv>,
486 <&clk_m_a2_pll0 3>, /* PLL0 PHI3 */
487 <&clk_m_a2_pll1 3>; /* PLL1 PHI3 */
488
489 clock-output-names = ""; /* Unused */
490 /* Remaining outputs unused */
491 };
492 };
493
494 /*
495 * A9 PLL
496 */
497 clockgen-a9@fdde00d8 {
498 reg = <0xfdde00d8 0x70>;
499
500 clockgen_a9_pll: clockgen-a9-pll {
501 #clock-cells = <1>;
502 compatible = "st,stih415-plls-c32-a9", "st,clkgen-plls-c32";
503
504 clocks = <&clk_sysin>;
505 clock-output-names = "clockgen-a9-pll-odf";
506 };
507 };
508
509 /*
510 * ARM CPU related clocks
511 */
512 clk_m_a9: clk-m-a9@fdde00d8 {
39 #clock-cells = <0>; 513 #clock-cells = <0>;
40 compatible = "fixed-clock"; 514 compatible = "st,stih415-clkgen-a9-mux", "st,clkgen-mux";
41 clock-frequency = <25000000>; 515 reg = <0xfdde00d8 0x4>;
42 clock-output-names = "CLKS_GMAC0_PHY"; 516 clocks = <&clockgen_a9_pll 0>,
517 <&clockgen_a9_pll 0>,
518 <&clk_m_a0_div1 2>,
519 <&clk_m_a9_ext2f_div2>;
43 }; 520 };
44 521
45 CLKS_ETH1_PHY: clockgenA0@7 { 522 /*
523 * ARM Peripheral clock for timers
524 */
525 arm_periph_clk: clk-m-a9-periphs {
46 #clock-cells = <0>; 526 #clock-cells = <0>;
47 compatible = "fixed-clock"; 527 compatible = "fixed-factor-clock";
48 clock-frequency = <25000000>; 528 clocks = <&clk_m_a9>;
49 clock-output-names = "CLKS_ETH1_PHY"; 529 clock-div = <2>;
530 clock-mult = <1>;
50 }; 531 };
51 }; 532 };
52}; 533};
diff --git a/arch/arm/boot/dts/stih415-pinctrl.dtsi b/arch/arm/boot/dts/stih415-pinctrl.dtsi
index f09fb10a3791..8509a037ae21 100644
--- a/arch/arm/boot/dts/stih415-pinctrl.dtsi
+++ b/arch/arm/boot/dts/stih415-pinctrl.dtsi
@@ -49,7 +49,7 @@
49 reg = <0xfe61f080 0x4>; 49 reg = <0xfe61f080 0x4>;
50 reg-names = "irqmux"; 50 reg-names = "irqmux";
51 interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>; 51 interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>;
52 interrupts-names = "irqmux"; 52 interrupt-names = "irqmux";
53 ranges = <0 0xfe610000 0x5000>; 53 ranges = <0 0xfe610000 0x5000>;
54 54
55 PIO0: gpio@fe610000 { 55 PIO0: gpio@fe610000 {
@@ -102,6 +102,22 @@
102 }; 102 };
103 }; 103 };
104 104
105 keyscan {
106 pinctrl_keyscan: keyscan {
107 st,pins {
108 keyin0 = <&PIO0 2 ALT2 IN>;
109 keyin1 = <&PIO0 3 ALT2 IN>;
110 keyin2 = <&PIO0 4 ALT2 IN>;
111 keyin3 = <&PIO2 6 ALT2 IN>;
112
113 keyout0 = <&PIO1 6 ALT2 OUT>;
114 keyout1 = <&PIO1 7 ALT2 OUT>;
115 keyout2 = <&PIO0 6 ALT2 OUT>;
116 keyout3 = <&PIO2 7 ALT2 OUT>;
117 };
118 };
119 };
120
105 sbc_i2c0 { 121 sbc_i2c0 {
106 pinctrl_sbc_i2c0_default: sbc_i2c0-default { 122 pinctrl_sbc_i2c0_default: sbc_i2c0-default {
107 st,pins { 123 st,pins {
@@ -187,7 +203,7 @@
187 reg = <0xfee0f080 0x4>; 203 reg = <0xfee0f080 0x4>;
188 reg-names = "irqmux"; 204 reg-names = "irqmux";
189 interrupts = <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>; 205 interrupts = <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>;
190 interrupts-names = "irqmux"; 206 interrupt-names = "irqmux";
191 ranges = <0 0xfee00000 0x8000>; 207 ranges = <0 0xfee00000 0x8000>;
192 208
193 PIO5: gpio@fee00000 { 209 PIO5: gpio@fee00000 {
@@ -282,7 +298,7 @@
282 reg = <0xfe82f080 0x4>; 298 reg = <0xfe82f080 0x4>;
283 reg-names = "irqmux"; 299 reg-names = "irqmux";
284 interrupts = <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>; 300 interrupts = <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>;
285 interrupts-names = "irqmux"; 301 interrupt-names = "irqmux";
286 ranges = <0 0xfe820000 0x8000>; 302 ranges = <0 0xfe820000 0x8000>;
287 303
288 PIO13: gpio@fe820000 { 304 PIO13: gpio@fe820000 {
@@ -423,7 +439,7 @@
423 reg = <0xfd6bf080 0x4>; 439 reg = <0xfd6bf080 0x4>;
424 reg-names = "irqmux"; 440 reg-names = "irqmux";
425 interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>; 441 interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
426 interrupts-names = "irqmux"; 442 interrupt-names = "irqmux";
427 ranges = <0 0xfd6b0000 0x3000>; 443 ranges = <0 0xfd6b0000 0x3000>;
428 444
429 PIO100: gpio@fd6b0000 { 445 PIO100: gpio@fd6b0000 {
@@ -460,7 +476,7 @@
460 reg = <0xfd33f080 0x4>; 476 reg = <0xfd33f080 0x4>;
461 reg-names = "irqmux"; 477 reg-names = "irqmux";
462 interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>; 478 interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
463 interrupts-names = "irqmux"; 479 interrupt-names = "irqmux";
464 ranges = <0 0xfd330000 0x5000>; 480 ranges = <0 0xfd330000 0x5000>;
465 481
466 PIO103: gpio@fd330000 { 482 PIO103: gpio@fd330000 {
diff --git a/arch/arm/boot/dts/stih415.dtsi b/arch/arm/boot/dts/stih415.dtsi
index d89064c20c8a..d6f254f302fe 100644
--- a/arch/arm/boot/dts/stih415.dtsi
+++ b/arch/arm/boot/dts/stih415.dtsi
@@ -82,7 +82,7 @@
82 interrupts = <0 197 0>; 82 interrupts = <0 197 0>;
83 pinctrl-names = "default"; 83 pinctrl-names = "default";
84 pinctrl-0 = <&pinctrl_serial2>; 84 pinctrl-0 = <&pinctrl_serial2>;
85 clocks = <&CLKS_ICN_REG_0>; 85 clocks = <&clk_s_a0_ls CLK_ICN_REG>;
86 }; 86 };
87 87
88 /* SBC comms block ASCs in SASG1 */ 88 /* SBC comms block ASCs in SASG1 */
@@ -91,7 +91,7 @@
91 status = "disabled"; 91 status = "disabled";
92 reg = <0xfe531000 0x2c>; 92 reg = <0xfe531000 0x2c>;
93 interrupts = <0 210 0>; 93 interrupts = <0 210 0>;
94 clocks = <&CLK_SYSIN>; 94 clocks = <&clk_sysin>;
95 pinctrl-names = "default"; 95 pinctrl-names = "default";
96 pinctrl-0 = <&pinctrl_sbc_serial1>; 96 pinctrl-0 = <&pinctrl_sbc_serial1>;
97 }; 97 };
@@ -100,7 +100,7 @@
100 compatible = "st,comms-ssc4-i2c"; 100 compatible = "st,comms-ssc4-i2c";
101 reg = <0xfed40000 0x110>; 101 reg = <0xfed40000 0x110>;
102 interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>; 102 interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
103 clocks = <&CLKS_ICN_REG_0>; 103 clocks = <&clk_s_a0_ls CLK_ICN_REG>;
104 clock-names = "ssc"; 104 clock-names = "ssc";
105 clock-frequency = <400000>; 105 clock-frequency = <400000>;
106 pinctrl-names = "default"; 106 pinctrl-names = "default";
@@ -113,7 +113,7 @@
113 compatible = "st,comms-ssc4-i2c"; 113 compatible = "st,comms-ssc4-i2c";
114 reg = <0xfed41000 0x110>; 114 reg = <0xfed41000 0x110>;
115 interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>; 115 interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
116 clocks = <&CLKS_ICN_REG_0>; 116 clocks = <&clk_s_a0_ls CLK_ICN_REG>;
117 clock-names = "ssc"; 117 clock-names = "ssc";
118 clock-frequency = <400000>; 118 clock-frequency = <400000>;
119 pinctrl-names = "default"; 119 pinctrl-names = "default";
@@ -126,7 +126,7 @@
126 compatible = "st,comms-ssc4-i2c"; 126 compatible = "st,comms-ssc4-i2c";
127 reg = <0xfe540000 0x110>; 127 reg = <0xfe540000 0x110>;
128 interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>; 128 interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
129 clocks = <&CLK_SYSIN>; 129 clocks = <&clk_sysin>;
130 clock-names = "ssc"; 130 clock-names = "ssc";
131 clock-frequency = <400000>; 131 clock-frequency = <400000>;
132 pinctrl-names = "default"; 132 pinctrl-names = "default";
@@ -139,7 +139,7 @@
139 compatible = "st,comms-ssc4-i2c"; 139 compatible = "st,comms-ssc4-i2c";
140 reg = <0xfe541000 0x110>; 140 reg = <0xfe541000 0x110>;
141 interrupts = <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>; 141 interrupts = <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>;
142 clocks = <&CLK_SYSIN>; 142 clocks = <&clk_sysin>;
143 clock-names = "ssc"; 143 clock-names = "ssc";
144 clock-frequency = <400000>; 144 clock-frequency = <400000>;
145 pinctrl-names = "default"; 145 pinctrl-names = "default";
@@ -170,7 +170,7 @@
170 pinctrl-names = "default"; 170 pinctrl-names = "default";
171 pinctrl-0 = <&pinctrl_mii0>; 171 pinctrl-0 = <&pinctrl_mii0>;
172 clock-names = "stmmaceth"; 172 clock-names = "stmmaceth";
173 clocks = <&CLKS_GMAC0_PHY>; 173 clocks = <&clk_s_a1_ls CLK_GMAC0_PHY>;
174 }; 174 };
175 175
176 ethernet1: dwmac@fef08000 { 176 ethernet1: dwmac@fef08000 {
@@ -193,18 +193,30 @@
193 pinctrl-names = "default"; 193 pinctrl-names = "default";
194 pinctrl-0 = <&pinctrl_mii1>; 194 pinctrl-0 = <&pinctrl_mii1>;
195 clock-names = "stmmaceth"; 195 clock-names = "stmmaceth";
196 clocks = <&CLKS_ETH1_PHY>; 196 clocks = <&clk_s_a0_ls CLK_ETH1_PHY>;
197 }; 197 };
198 198
199 rc: rc@fe518000 { 199 rc: rc@fe518000 {
200 compatible = "st,comms-irb"; 200 compatible = "st,comms-irb";
201 reg = <0xfe518000 0x234>; 201 reg = <0xfe518000 0x234>;
202 interrupts = <0 203 0>; 202 interrupts = <0 203 0>;
203 clocks = <&CLK_SYSIN>; 203 clocks = <&clk_sysin>;
204 rx-mode = "infrared"; 204 rx-mode = "infrared";
205 pinctrl-names = "default"; 205 pinctrl-names = "default";
206 pinctrl-0 = <&pinctrl_ir>; 206 pinctrl-0 = <&pinctrl_ir>;
207 resets = <&softreset STIH415_IRB_SOFTRESET>; 207 resets = <&softreset STIH415_IRB_SOFTRESET>;
208 }; 208 };
209
210 keyscan: keyscan@fe4b0000 {
211 compatible = "st,sti-keyscan";
212 status = "disabled";
213 reg = <0xfe4b0000 0x2000>;
214 interrupts = <GIC_SPI 212 IRQ_TYPE_NONE>;
215 clocks = <&clk_sysin>;
216 pinctrl-names = "default";
217 pinctrl-0 = <&pinctrl_keyscan>;
218 resets = <&powerdown STIH415_KEYSCAN_POWERDOWN>,
219 <&softreset STIH415_KEYSCAN_SOFTRESET>;
220 };
209 }; 221 };
210}; 222};
diff --git a/arch/arm/boot/dts/stih416-b2000.dts b/arch/arm/boot/dts/stih416-b2000.dts
index a5eb6eee10bf..488e80a5d69d 100644
--- a/arch/arm/boot/dts/stih416-b2000.dts
+++ b/arch/arm/boot/dts/stih416-b2000.dts
@@ -9,8 +9,7 @@
9/dts-v1/; 9/dts-v1/;
10#include "stih416.dtsi" 10#include "stih416.dtsi"
11#include "stih41x-b2000.dtsi" 11#include "stih41x-b2000.dtsi"
12
13/ { 12/ {
14 compatible = "st,stih416", "st,stih416-b2000";
15 model = "STiH416 B2000"; 13 model = "STiH416 B2000";
14 compatible = "st,stih416-b2000", "st,stih416";
16}; 15};
diff --git a/arch/arm/boot/dts/stih416-b2020-revE.dts b/arch/arm/boot/dts/stih416-b2020-revE.dts
new file mode 100644
index 000000000000..ba0fa2caaf18
--- /dev/null
+++ b/arch/arm/boot/dts/stih416-b2020-revE.dts
@@ -0,0 +1,35 @@
1/*
2 * Copyright (C) 2014 STMicroelectronics (R&D) Limited.
3 * Author: Lee Jones <lee.jones@linaro.org>
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 * publishhed by the Free Software Foundation.
8 */
9/dts-v1/;
10#include "stih416.dtsi"
11#include "stih41x-b2020.dtsi"
12/ {
13 model = "STiH416 B2020 REV-E";
14 compatible = "st,stih416-b2020", "st,stih416";
15
16 soc {
17 leds {
18 compatible = "gpio-leds";
19 red {
20 #gpio-cells = <1>;
21 label = "Front Panel LED";
22 gpios = <&PIO4 1>;
23 linux,default-trigger = "heartbeat";
24 };
25 green {
26 gpios = <&PIO1 3>;
27 default-state = "off";
28 };
29 };
30
31 ethernet1: dwmac@fef08000 {
32 snps,reset-gpio = <&PIO0 7>;
33 };
34 };
35};
diff --git a/arch/arm/boot/dts/stih416-b2020.dts b/arch/arm/boot/dts/stih416-b2020.dts
index 276f28da573a..4e2df66b99ea 100644
--- a/arch/arm/boot/dts/stih416-b2020.dts
+++ b/arch/arm/boot/dts/stih416-b2020.dts
@@ -11,6 +11,5 @@
11#include "stih41x-b2020.dtsi" 11#include "stih41x-b2020.dtsi"
12/ { 12/ {
13 model = "STiH416 B2020"; 13 model = "STiH416 B2020";
14 compatible = "st,stih416", "st,stih416-b2020"; 14 compatible = "st,stih416-b2020", "st,stih416";
15
16}; 15};
diff --git a/arch/arm/boot/dts/stih416-clock.dtsi b/arch/arm/boot/dts/stih416-clock.dtsi
index a6942c75cbbb..5b4fb838cddb 100644
--- a/arch/arm/boot/dts/stih416-clock.dtsi
+++ b/arch/arm/boot/dts/stih416-clock.dtsi
@@ -6,50 +6,751 @@
6 * it under the terms of the GNU General Public License version 2 as 6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 */ 8 */
9
10#include <dt-bindings/clock/stih416-clks.h>
11
9/ { 12/ {
10 clocks { 13 clocks {
14 #address-cells = <1>;
15 #size-cells = <1>;
16 ranges;
17
11 /* 18 /*
12 * Fixed 30MHz oscillator inputs to SoC 19 * Fixed 30MHz oscillator inputs to SoC
13 */ 20 */
14 CLK_SYSIN: CLK_SYSIN { 21 clk_sysin: clk-sysin {
15 #clock-cells = <0>; 22 #clock-cells = <0>;
16 compatible = "fixed-clock"; 23 compatible = "fixed-clock";
17 clock-frequency = <30000000>; 24 clock-frequency = <30000000>;
18 clock-output-names = "CLK_SYSIN"; 25 };
26
27 /*
28 * ClockGenAs on SASG2
29 */
30 clockgen-a@fee62000 {
31 reg = <0xfee62000 0xb48>;
32
33 clk_s_a0_pll: clk-s-a0-pll {
34 #clock-cells = <1>;
35 compatible = "st,clkgena-plls-c65";
36
37 clocks = <&clk_sysin>;
38
39 clock-output-names = "clk-s-a0-pll0-hs",
40 "clk-s-a0-pll0-ls",
41 "clk-s-a0-pll1";
42 };
43
44 clk_s_a0_osc_prediv: clk-s-a0-osc-prediv {
45 #clock-cells = <0>;
46 compatible = "st,clkgena-prediv-c65",
47 "st,clkgena-prediv";
48
49 clocks = <&clk_sysin>;
50
51 clock-output-names = "clk-s-a0-osc-prediv";
52 };
53
54 clk_s_a0_hs: clk-s-a0-hs {
55 #clock-cells = <1>;
56 compatible = "st,clkgena-divmux-c65-hs",
57 "st,clkgena-divmux";
58
59 clocks = <&clk_s_a0_osc_prediv>,
60 <&clk_s_a0_pll 0>, /* PLL0 HS */
61 <&clk_s_a0_pll 2>; /* PLL1 */
62
63 clock-output-names = "clk-s-fdma-0",
64 "clk-s-fdma-1",
65 ""; /* clk-s-jit-sense */
66 /* Fourth output unused */
67 };
68
69 clk_s_a0_ls: clk-s-a0-ls {
70 #clock-cells = <1>;
71 compatible = "st,clkgena-divmux-c65-ls",
72 "st,clkgena-divmux";
73
74 clocks = <&clk_s_a0_osc_prediv>,
75 <&clk_s_a0_pll 1>, /* PLL0 LS */
76 <&clk_s_a0_pll 2>; /* PLL1 */
77
78 clock-output-names = "clk-s-icn-reg-0",
79 "clk-s-icn-if-0",
80 "clk-s-icn-reg-lp-0",
81 "clk-s-emiss",
82 "clk-s-eth1-phy",
83 "clk-s-mii-ref-out";
84 /* Remaining outputs unused */
85 };
86 };
87
88 clockgen-a@fee81000 {
89 reg = <0xfee81000 0xb48>;
90
91 clk_s_a1_pll: clk-s-a1-pll {
92 #clock-cells = <1>;
93 compatible = "st,clkgena-plls-c65";
94
95 clocks = <&clk_sysin>;
96
97 clock-output-names = "clk-s-a1-pll0-hs",
98 "clk-s-a1-pll0-ls",
99 "clk-s-a1-pll1";
100 };
101
102 clk_s_a1_osc_prediv: clk-s-a1-osc-prediv {
103 #clock-cells = <0>;
104 compatible = "st,clkgena-prediv-c65",
105 "st,clkgena-prediv";
106
107 clocks = <&clk_sysin>;
108
109 clock-output-names = "clk-s-a1-osc-prediv";
110 };
111
112 clk_s_a1_hs: clk-s-a1-hs {
113 #clock-cells = <1>;
114 compatible = "st,clkgena-divmux-c65-hs",
115 "st,clkgena-divmux";
116
117 clocks = <&clk_s_a1_osc_prediv>,
118 <&clk_s_a1_pll 0>, /* PLL0 HS */
119 <&clk_s_a1_pll 2>; /* PLL1 */
120
121 clock-output-names = "", /* Reserved */
122 "", /* Reserved */
123 "clk-s-stac-phy",
124 "clk-s-vtac-tx-phy";
125 };
126
127 clk_s_a1_ls: clk-s-a1-ls {
128 #clock-cells = <1>;
129 compatible = "st,clkgena-divmux-c65-ls",
130 "st,clkgena-divmux";
131
132 clocks = <&clk_s_a1_osc_prediv>,
133 <&clk_s_a1_pll 1>, /* PLL0 LS */
134 <&clk_s_a1_pll 2>; /* PLL1 */
135
136 clock-output-names = "clk-s-icn-if-2",
137 "clk-s-card-mmc-0",
138 "clk-s-icn-if-1",
139 "clk-s-gmac0-phy",
140 "clk-s-nand-ctrl",
141 "", /* Reserved */
142 "clk-s-mii0-ref-out",
143 "clk-s-stac-sys",
144 "clk-s-card-mmc-1";
145 /* Remaining outputs unused */
146 };
147 };
148
149 /*
150 * ClockGenAs on MPE42
151 */
152 clockgen-a@fde12000 {
153 reg = <0xfde12000 0xb50>;
154
155 clk_m_a0_pll0: clk-m-a0-pll0 {
156 #clock-cells = <1>;
157 compatible = "st,plls-c32-a1x-0", "st,clkgen-plls-c32";
158
159 clocks = <&clk_sysin>;
160
161 clock-output-names = "clk-m-a0-pll0-phi0",
162 "clk-m-a0-pll0-phi1",
163 "clk-m-a0-pll0-phi2",
164 "clk-m-a0-pll0-phi3";
165 };
166
167 clk_m_a0_pll1: clk-m-a0-pll1 {
168 #clock-cells = <1>;
169 compatible = "st,plls-c32-a1x-1", "st,clkgen-plls-c32";
170
171 clocks = <&clk_sysin>;
172
173 clock-output-names = "clk-m-a0-pll1-phi0",
174 "clk-m-a0-pll1-phi1",
175 "clk-m-a0-pll1-phi2",
176 "clk-m-a0-pll1-phi3";
177 };
178
179 clk_m_a0_osc_prediv: clk-m-a0-osc-prediv {
180 #clock-cells = <0>;
181 compatible = "st,clkgena-prediv-c32",
182 "st,clkgena-prediv";
183
184 clocks = <&clk_sysin>;
185
186 clock-output-names = "clk-m-a0-osc-prediv";
187 };
188
189 clk_m_a0_div0: clk-m-a0-div0 {
190 #clock-cells = <1>;
191 compatible = "st,clkgena-divmux-c32-odf0",
192 "st,clkgena-divmux";
193
194 clocks = <&clk_m_a0_osc_prediv>,
195 <&clk_m_a0_pll0 0>, /* PLL0 PHI0 */
196 <&clk_m_a0_pll1 0>; /* PLL1 PHI0 */
197
198 clock-output-names = "", /* Unused */
199 "", /* Unused */
200 "clk-m-fdma-12",
201 "", /* Unused */
202 "clk-m-pp-dmu-0",
203 "clk-m-pp-dmu-1",
204 "clk-m-icm-lmi",
205 "clk-m-vid-dmu-0";
206 };
207
208 clk_m_a0_div1: clk-m-a0-div1 {
209 #clock-cells = <1>;
210 compatible = "st,clkgena-divmux-c32-odf1",
211 "st,clkgena-divmux";
212
213 clocks = <&clk_m_a0_osc_prediv>,
214 <&clk_m_a0_pll0 1>, /* PLL0 PHI1 */
215 <&clk_m_a0_pll1 1>; /* PLL1 PHI1 */
216
217 clock-output-names = "clk-m-vid-dmu-1",
218 "", /* Unused */
219 "clk-m-a9-ext2f",
220 "clk-m-st40rt",
221 "clk-m-st231-dmu-0",
222 "clk-m-st231-dmu-1",
223 "clk-m-st231-aud",
224 "clk-m-st231-gp-0";
225 };
226
227 clk_m_a0_div2: clk-m-a0-div2 {
228 #clock-cells = <1>;
229 compatible = "st,clkgena-divmux-c32-odf2",
230 "st,clkgena-divmux";
231
232 clocks = <&clk_m_a0_osc_prediv>,
233 <&clk_m_a0_pll0 2>, /* PLL0 PHI2 */
234 <&clk_m_a0_pll1 2>; /* PLL1 PHI2 */
235
236 clock-output-names = "clk-m-st231-gp-1",
237 "clk-m-icn-cpu",
238 "clk-m-icn-stac",
239 "clk-m-tx-icn-dmu-0",
240 "clk-m-tx-icn-dmu-1",
241 "clk-m-tx-icn-ts",
242 "clk-m-icn-vdp-0",
243 "clk-m-icn-vdp-1";
244 };
245
246 clk_m_a0_div3: clk-m-a0-div3 {
247 #clock-cells = <1>;
248 compatible = "st,clkgena-divmux-c32-odf3",
249 "st,clkgena-divmux";
250
251 clocks = <&clk_m_a0_osc_prediv>,
252 <&clk_m_a0_pll0 3>, /* PLL0 PHI3 */
253 <&clk_m_a0_pll1 3>; /* PLL1 PHI3 */
254
255 clock-output-names = "", /* Unused */
256 "", /* Unused */
257 "", /* Unused */
258 "", /* Unused */
259 "clk-m-icn-vp8",
260 "", /* Unused */
261 "clk-m-icn-reg-11",
262 "clk-m-a9-trace";
263 };
264 };
265
266 clockgen-a@fd6db000 {
267 reg = <0xfd6db000 0xb50>;
268
269 clk_m_a1_pll0: clk-m-a1-pll0 {
270 #clock-cells = <1>;
271 compatible = "st,plls-c32-a1x-0", "st,clkgen-plls-c32";
272
273 clocks = <&clk_sysin>;
274
275 clock-output-names = "clk-m-a1-pll0-phi0",
276 "clk-m-a1-pll0-phi1",
277 "clk-m-a1-pll0-phi2",
278 "clk-m-a1-pll0-phi3";
279 };
280
281 clk_m_a1_pll1: clk-m-a1-pll1 {
282 #clock-cells = <1>;
283 compatible = "st,plls-c32-a1x-1", "st,clkgen-plls-c32";
284
285 clocks = <&clk_sysin>;
286
287 clock-output-names = "clk-m-a1-pll1-phi0",
288 "clk-m-a1-pll1-phi1",
289 "clk-m-a1-pll1-phi2",
290 "clk-m-a1-pll1-phi3";
291 };
292
293 clk_m_a1_osc_prediv: clk-m-a1-osc-prediv {
294 #clock-cells = <0>;
295 compatible = "st,clkgena-prediv-c32",
296 "st,clkgena-prediv";
297
298 clocks = <&clk_sysin>;
299
300 clock-output-names = "clk-m-a1-osc-prediv";
301 };
302
303 clk_m_a1_div0: clk-m-a1-div0 {
304 #clock-cells = <1>;
305 compatible = "st,clkgena-divmux-c32-odf0",
306 "st,clkgena-divmux";
307
308 clocks = <&clk_m_a1_osc_prediv>,
309 <&clk_m_a1_pll0 0>, /* PLL0 PHI0 */
310 <&clk_m_a1_pll1 0>; /* PLL1 PHI0 */
311
312 clock-output-names = "", /* Unused */
313 "clk-m-fdma-10",
314 "clk-m-fdma-11",
315 "clk-m-hva-alt",
316 "clk-m-proc-sc",
317 "clk-m-tp",
318 "clk-m-rx-icn-dmu-0",
319 "clk-m-rx-icn-dmu-1";
320 };
321
322 clk_m_a1_div1: clk-m-a1-div1 {
323 #clock-cells = <1>;
324 compatible = "st,clkgena-divmux-c32-odf1",
325 "st,clkgena-divmux";
326
327 clocks = <&clk_m_a1_osc_prediv>,
328 <&clk_m_a1_pll0 1>, /* PLL0 PHI1 */
329 <&clk_m_a1_pll1 1>; /* PLL1 PHI1 */
330
331 clock-output-names = "clk-m-rx-icn-ts",
332 "clk-m-rx-icn-vdp-0",
333 "", /* Unused */
334 "clk-m-prv-t1-bus",
335 "clk-m-icn-reg-12",
336 "clk-m-icn-reg-10",
337 "", /* Unused */
338 "clk-m-icn-st231";
339 };
340
341 clk_m_a1_div2: clk-m-a1-div2 {
342 #clock-cells = <1>;
343 compatible = "st,clkgena-divmux-c32-odf2",
344 "st,clkgena-divmux";
345
346 clocks = <&clk_m_a1_osc_prediv>,
347 <&clk_m_a1_pll0 2>, /* PLL0 PHI2 */
348 <&clk_m_a1_pll1 2>; /* PLL1 PHI2 */
349
350 clock-output-names = "clk-m-fvdp-proc-alt",
351 "clk-m-icn-reg-13",
352 "clk-m-tx-icn-gpu",
353 "clk-m-rx-icn-gpu",
354 "", /* Unused */
355 "", /* Unused */
356 "", /* clk-m-apb-pm-12 */
357 ""; /* Unused */
358 };
359
360 clk_m_a1_div3: clk-m-a1-div3 {
361 #clock-cells = <1>;
362 compatible = "st,clkgena-divmux-c32-odf3",
363 "st,clkgena-divmux";
364
365 clocks = <&clk_m_a1_osc_prediv>,
366 <&clk_m_a1_pll0 3>, /* PLL0 PHI3 */
367 <&clk_m_a1_pll1 3>; /* PLL1 PHI3 */
368
369 clock-output-names = "", /* Unused */
370 "", /* Unused */
371 "", /* Unused */
372 "", /* Unused */
373 "", /* Unused */
374 "", /* Unused */
375 "", /* Unused */
376 ""; /* clk-m-gpu-alt */
377 };
378 };
379
380 clk_m_a9_ext2f_div2: clk-m-a9-ext2f-div2 {
381 #clock-cells = <0>;
382 compatible = "fixed-factor-clock";
383 clocks = <&clk_m_a0_div1 2>;
384 clock-div = <2>;
385 clock-mult = <1>;
386 };
387
388 clockgen-a@fd345000 {
389 reg = <0xfd345000 0xb50>;
390
391 clk_m_a2_pll0: clk-m-a2-pll0 {
392 #clock-cells = <1>;
393 compatible = "st,plls-c32-a1x-0", "st,clkgen-plls-c32";
394
395 clocks = <&clk_sysin>;
396
397 clock-output-names = "clk-m-a2-pll0-phi0",
398 "clk-m-a2-pll0-phi1",
399 "clk-m-a2-pll0-phi2",
400 "clk-m-a2-pll0-phi3";
401 };
402
403 clk_m_a2_pll1: clk-m-a2-pll1 {
404 #clock-cells = <1>;
405 compatible = "st,plls-c32-a1x-1", "st,clkgen-plls-c32";
406
407 clocks = <&clk_sysin>;
408
409 clock-output-names = "clk-m-a2-pll1-phi0",
410 "clk-m-a2-pll1-phi1",
411 "clk-m-a2-pll1-phi2",
412 "clk-m-a2-pll1-phi3";
413 };
414
415 clk_m_a2_osc_prediv: clk-m-a2-osc-prediv {
416 #clock-cells = <0>;
417 compatible = "st,clkgena-prediv-c32",
418 "st,clkgena-prediv";
419
420 clocks = <&clk_sysin>;
421
422 clock-output-names = "clk-m-a2-osc-prediv";
423 };
424
425 clk_m_a2_div0: clk-m-a2-div0 {
426 #clock-cells = <1>;
427 compatible = "st,clkgena-divmux-c32-odf0",
428 "st,clkgena-divmux";
429
430 clocks = <&clk_m_a2_osc_prediv>,
431 <&clk_m_a2_pll0 0>, /* PLL0 PHI0 */
432 <&clk_m_a2_pll1 0>; /* PLL1 PHI0 */
433
434 clock-output-names = "clk-m-vtac-main-phy",
435 "clk-m-vtac-aux-phy",
436 "clk-m-stac-phy",
437 "clk-m-stac-sys",
438 "", /* clk-m-mpestac-pg */
439 "", /* clk-m-mpestac-wc */
440 "", /* clk-m-mpevtacaux-pg*/
441 ""; /* clk-m-mpevtacmain-pg*/
442 };
443
444 clk_m_a2_div1: clk-m-a2-div1 {
445 #clock-cells = <1>;
446 compatible = "st,clkgena-divmux-c32-odf1",
447 "st,clkgena-divmux";
448
449 clocks = <&clk_m_a2_osc_prediv>,
450 <&clk_m_a2_pll0 1>, /* PLL0 PHI1 */
451 <&clk_m_a2_pll1 1>; /* PLL1 PHI1 */
452
453 clock-output-names = "", /* clk-m-mpevtacrx0-wc */
454 "", /* clk-m-mpevtacrx1-wc */
455 "clk-m-compo-main",
456 "clk-m-compo-aux",
457 "clk-m-bdisp-0",
458 "clk-m-bdisp-1",
459 "clk-m-icn-bdisp",
460 "clk-m-icn-compo";
461 };
462
463 clk_m_a2_div2: clk-m-a2-div2 {
464 #clock-cells = <1>;
465 compatible = "st,clkgena-divmux-c32-odf2",
466 "st,clkgena-divmux";
467
468 clocks = <&clk_m_a2_osc_prediv>,
469 <&clk_m_a2_pll0 2>, /* PLL0 PHI2 */
470 <&clk_m_a2_pll1 2>; /* PLL1 PHI2 */
471
472 clock-output-names = "clk-m-icn-vdp-2",
473 "", /* Unused */
474 "clk-m-icn-reg-14",
475 "clk-m-mdtp",
476 "clk-m-jpegdec",
477 "", /* Unused */
478 "clk-m-dcephy-impctrl",
479 ""; /* Unused */
480 };
481
482 clk_m_a2_div3: clk-m-a2-div3 {
483 #clock-cells = <1>;
484 compatible = "st,clkgena-divmux-c32-odf3",
485 "st,clkgena-divmux";
486
487 clocks = <&clk_m_a2_osc_prediv>,
488 <&clk_m_a2_pll0 3>, /* PLL0 PHI3 */
489 <&clk_m_a2_pll1 3>; /* PLL1 PHI3 */
490
491 clock-output-names = "", /* Unused */
492 ""; /* clk-m-apb-pm-11 */
493 /* Remaining outputs unused */
494 };
495 };
496
497 /*
498 * A9 PLL
499 */
500 clockgen-a9@fdde08b0 {
501 reg = <0xfdde08b0 0x70>;
502
503 clockgen_a9_pll: clockgen-a9-pll {
504 #clock-cells = <1>;
505 compatible = "st,stih416-plls-c32-a9", "st,clkgen-plls-c32";
506
507 clocks = <&clk_sysin>;
508 clock-output-names = "clockgen-a9-pll-odf";
509 };
510 };
511
512 /*
513 * ARM CPU related clocks
514 */
515 clk_m_a9: clk-m-a9@fdde08ac {
516 #clock-cells = <0>;
517 compatible = "st,stih416-clkgen-a9-mux", "st,clkgen-mux";
518 reg = <0xfdde08ac 0x4>;
519 clocks = <&clockgen_a9_pll 0>,
520 <&clockgen_a9_pll 0>,
521 <&clk_m_a0_div1 2>,
522 <&clk_m_a9_ext2f_div2>;
19 }; 523 };
20 524
21 /* 525 /*
22 * ARM Peripheral clock for timers 526 * ARM Peripheral clock for timers
23 */ 527 */
24 arm_periph_clk: arm_periph_clk { 528 arm_periph_clk: clk-m-a9-periphs {
25 #clock-cells = <0>; 529 #clock-cells = <0>;
26 compatible = "fixed-clock"; 530 compatible = "fixed-factor-clock";
27 clock-frequency = <600000000>; 531 clocks = <&clk_m_a9>;
532 clock-div = <2>;
533 clock-mult = <1>;
28 }; 534 };
29 535
30 /* 536 /*
31 * Bootloader initialized system infrastructure clock for 537 * Frequency synthesizers on the SASG2
32 * serial devices.
33 */ 538 */
34 CLK_S_ICN_REG_0: clockgenA0@4 { 539 clockgen_b0: clockgen-b0@fee108b4 {
540 #clock-cells = <1>;
541 compatible = "st,stih416-quadfs216", "st,quadfs";
542 reg = <0xfee108b4 0x44>;
543
544 clocks = <&clk_sysin>;
545 clock-output-names = "clk-s-usb48",
546 "clk-s-dss",
547 "clk-s-stfe-frc-2",
548 "clk-s-thsens-scard";
549 };
550
551 clockgen_b1: clockgen-b1@fe8308c4 {
552 #clock-cells = <1>;
553 compatible = "st,stih416-quadfs216", "st,quadfs";
554 reg = <0xfe8308c4 0x44>;
555
556 clocks = <&clk_sysin>;
557 clock-output-names = "clk-s-pcm-0",
558 "clk-s-pcm-1",
559 "clk-s-pcm-2",
560 "clk-s-pcm-3";
561 };
562
563 clockgen_c: clockgen-c@fe8307d0 {
564 #clock-cells = <1>;
565 compatible = "st,stih416-quadfs432", "st,quadfs";
566 reg = <0xfe8307d0 0x44>;
567
568 clocks = <&clk_sysin>;
569 clock-output-names = "clk-s-c-fs0-ch0",
570 "clk-s-c-vcc-sd",
571 "clk-s-c-fs0-ch2";
572 };
573
574 clk_s_vcc_hd: clk-s-vcc-hd@fe8308b8 {
35 #clock-cells = <0>; 575 #clock-cells = <0>;
36 compatible = "fixed-clock"; 576 compatible = "st,stih416-clkgenc-vcc-hd", "st,clkgen-mux";
37 clock-frequency = <100000000>; 577 reg = <0xfe8308b8 0x4>; /* SYSCFG2558 */
38 clock-output-names = "CLK_S_ICN_REG_0"; 578
579 clocks = <&clk_sysin>,
580 <&clockgen_c 0>;
39 }; 581 };
40 582
41 CLK_S_GMAC0_PHY: clockgenA1@7 { 583 /*
584 * Add a dummy clock for the HDMI PHY for the VCC input mux
585 */
586 clk_s_tmds_fromphy: clk-s-tmds-fromphy {
42 #clock-cells = <0>; 587 #clock-cells = <0>;
43 compatible = "fixed-clock"; 588 compatible = "fixed-clock";
44 clock-frequency = <25000000>; 589 clock-frequency = <0>;
45 clock-output-names = "CLK_S_GMAC0_PHY"; 590 };
591
592 clockgen_c_vcc: clockgen-c-vcc@fe8308ac {
593 #clock-cells = <1>;
594 compatible = "st,stih416-clkgenc", "st,clkgen-vcc";
595 reg = <0xfe8308ac 0xc>; /* SYSCFG2555,2556,2557 */
596
597 clocks = <&clk_s_vcc_hd>,
598 <&clockgen_c 1>,
599 <&clk_s_tmds_fromphy>,
600 <&clockgen_c 2>;
601
602 clock-output-names = "clk-s-pix-hdmi",
603 "clk-s-pix-dvo",
604 "clk-s-out-dvo",
605 "clk-s-pix-hd",
606 "clk-s-hddac",
607 "clk-s-denc",
608 "clk-s-sddac",
609 "clk-s-pix-main",
610 "clk-s-pix-aux",
611 "clk-s-stfe-frc-0",
612 "clk-s-ref-mcru",
613 "clk-s-slave-mcru",
614 "clk-s-tmds-hdmi",
615 "clk-s-hdmi-reject-pll",
616 "clk-s-thsens";
46 }; 617 };
47 618
48 CLK_S_ETH1_PHY: clockgenA0@7 { 619 clockgen_d: clockgen-d@fee107e0 {
620 #clock-cells = <1>;
621 compatible = "st,stih416-quadfs216", "st,quadfs";
622 reg = <0xfee107e0 0x44>;
623
624 clocks = <&clk_sysin>;
625 clock-output-names = "clk-s-ccsc",
626 "clk-s-stfe-frc-1",
627 "clk-s-tsout-1",
628 "clk-s-mchi";
629 };
630
631 /*
632 * Frequency synthesizers on the MPE42
633 */
634 clockgen_e: clockgen-e@fd3208bc {
635 #clock-cells = <1>;
636 compatible = "st,stih416-quadfs660-E", "st,quadfs";
637 reg = <0xfd3208bc 0xb0>;
638
639 clocks = <&clk_sysin>;
640 clock-output-names = "clk-m-pix-mdtp-0",
641 "clk-m-pix-mdtp-1",
642 "clk-m-pix-mdtp-2",
643 "clk-m-mpelpc";
644 };
645
646 clockgen_f: clockgen-f@fd320878 {
647 #clock-cells = <1>;
648 compatible = "st,stih416-quadfs660-F", "st,quadfs";
649 reg = <0xfd320878 0xf0>;
650
651 clocks = <&clk_sysin>;
652 clock-output-names = "clk-m-main-vidfs",
653 "clk-m-hva-fs",
654 "clk-m-fvdp-vcpu",
655 "clk-m-fvdp-proc-fs";
656 };
657
658 clk_m_fvdp_proc: clk-m-fvdp-proc@fd320910 {
659 #clock-cells = <0>;
660 compatible = "st,stih416-clkgenf-vcc-fvdp", "st,clkgen-mux";
661 reg = <0xfd320910 0x4>; /* SYSCFG8580 */
662
663 clocks = <&clk_m_a1_div2 0>,
664 <&clockgen_f 3>;
665 };
666
667 clk_m_hva: clk-m-hva@fd690868 {
668 #clock-cells = <0>;
669 compatible = "st,stih416-clkgenf-vcc-hva", "st,clkgen-mux";
670 reg = <0xfd690868 0x4>; /* SYSCFG9538 */
671
672 clocks = <&clockgen_f 1>,
673 <&clk_m_a1_div0 3>;
674 };
675
676 clk_m_f_vcc_hd: clk-m-f-vcc-hd@fd32086c {
677 #clock-cells = <0>;
678 compatible = "st,stih416-clkgenf-vcc-hd", "st,clkgen-mux";
679 reg = <0xfd32086c 0x4>; /* SYSCFG8539 */
680
681 clocks = <&clockgen_c_vcc 7>,
682 <&clockgen_f 0>;
683 };
684
685 clk_m_f_vcc_sd: clk-m-f-vcc-sd@fd32086c {
686 #clock-cells = <0>;
687 compatible = "st,stih416-clkgenf-vcc-sd", "st,clkgen-mux";
688 reg = <0xfd32086c 0x4>; /* SYSCFG8539 */
689
690 clocks = <&clockgen_c_vcc 8>,
691 <&clockgen_f 1>;
692 };
693
694 /*
695 * Add a dummy clock for the HDMIRx external signal clock
696 */
697 clk_m_pix_hdmirx_sas: clk-m-pix-hdmirx-sas {
49 #clock-cells = <0>; 698 #clock-cells = <0>;
50 compatible = "fixed-clock"; 699 compatible = "fixed-clock";
51 clock-frequency = <25000000>; 700 clock-frequency = <0>;
52 clock-output-names = "CLK_S_ETH1_PHY"; 701 };
702
703 clockgen_f_vcc: clockgen-f-vcc@fd32086c {
704 #clock-cells = <1>;
705 compatible = "st,stih416-clkgenf", "st,clkgen-vcc";
706 reg = <0xfd32086c 0xc>; /* SYSCFG8539,8540,8541 */
707
708 clocks = <&clk_m_f_vcc_hd>,
709 <&clk_m_f_vcc_sd>,
710 <&clockgen_f 0>,
711 <&clk_m_pix_hdmirx_sas>;
712
713 clock-output-names = "clk-m-pix-main-pipe",
714 "clk-m-pix-aux-pipe",
715 "clk-m-pix-main-cru",
716 "clk-m-pix-aux-cru",
717 "clk-m-xfer-be-compo",
718 "clk-m-xfer-pip-compo",
719 "clk-m-xfer-aux-compo",
720 "clk-m-vsens",
721 "clk-m-pix-hdmirx-0",
722 "clk-m-pix-hdmirx-1";
723 };
724
725 /*
726 * DDR PLL
727 */
728 clockgen-ddr@0xfdde07d8 {
729 reg = <0xfdde07d8 0x110>;
730
731 clockgen_ddr_pll: clockgen-ddr-pll {
732 #clock-cells = <1>;
733 compatible = "st,stih416-plls-c32-ddr", "st,clkgen-plls-c32";
734
735 clocks = <&clk_sysin>;
736 clock-output-names = "clockgen-ddr0",
737 "clockgen-ddr1";
738 };
739 };
740
741 /*
742 * GPU PLL
743 */
744 clockgen-gpu@fd68ff00 {
745 reg = <0xfd68ff00 0x910>;
746
747 clockgen_gpu_pll: clockgen-gpu-pll {
748 #clock-cells = <1>;
749 compatible = "st,stih416-gpu-pll-c32", "st,clkgengpu-pll-c32";
750
751 clocks = <&clk_sysin>;
752 clock-output-names = "clockgen-gpu-pll";
753 };
53 }; 754 };
54 }; 755 };
55}; 756};
diff --git a/arch/arm/boot/dts/stih416-pinctrl.dtsi b/arch/arm/boot/dts/stih416-pinctrl.dtsi
index aeea304086eb..ee6c119e261e 100644
--- a/arch/arm/boot/dts/stih416-pinctrl.dtsi
+++ b/arch/arm/boot/dts/stih416-pinctrl.dtsi
@@ -53,7 +53,7 @@
53 reg = <0xfe61f080 0x4>; 53 reg = <0xfe61f080 0x4>;
54 reg-names = "irqmux"; 54 reg-names = "irqmux";
55 interrupts = <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>; 55 interrupts = <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>;
56 interrupts-names = "irqmux"; 56 interrupt-names = "irqmux";
57 ranges = <0 0xfe610000 0x6000>; 57 ranges = <0 0xfe610000 0x6000>;
58 58
59 PIO0: gpio@fe610000 { 59 PIO0: gpio@fe610000 {
@@ -122,6 +122,22 @@
122 }; 122 };
123 }; 123 };
124 124
125 keyscan {
126 pinctrl_keyscan: keyscan {
127 st,pins {
128 keyin0 = <&PIO0 2 ALT2 IN>;
129 keyin1 = <&PIO0 3 ALT2 IN>;
130 keyin2 = <&PIO0 4 ALT2 IN>;
131 keyin3 = <&PIO2 6 ALT2 IN>;
132
133 keyout0 = <&PIO1 6 ALT2 OUT>;
134 keyout1 = <&PIO1 7 ALT2 OUT>;
135 keyout2 = <&PIO0 6 ALT2 OUT>;
136 keyout3 = <&PIO2 7 ALT2 OUT>;
137 };
138 };
139 };
140
125 sbc_i2c0 { 141 sbc_i2c0 {
126 pinctrl_sbc_i2c0_default: sbc_i2c0-default { 142 pinctrl_sbc_i2c0_default: sbc_i2c0-default {
127 st,pins { 143 st,pins {
@@ -201,7 +217,7 @@
201 reg = <0xfee0f080 0x4>; 217 reg = <0xfee0f080 0x4>;
202 reg-names = "irqmux"; 218 reg-names = "irqmux";
203 interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>; 219 interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>;
204 interrupts-names = "irqmux"; 220 interrupt-names = "irqmux";
205 ranges = <0 0xfee00000 0x10000>; 221 ranges = <0 0xfee00000 0x10000>;
206 222
207 PIO5: gpio@fee00000 { 223 PIO5: gpio@fee00000 {
@@ -333,7 +349,7 @@
333 reg = <0xfe82f080 0x4>; 349 reg = <0xfe82f080 0x4>;
334 reg-names = "irqmux"; 350 reg-names = "irqmux";
335 interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>; 351 interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
336 interrupts-names = "irqmux"; 352 interrupt-names = "irqmux";
337 ranges = <0 0xfe820000 0x6000>; 353 ranges = <0 0xfe820000 0x6000>;
338 354
339 PIO13: gpio@fe820000 { 355 PIO13: gpio@fe820000 {
@@ -461,7 +477,7 @@
461 reg = <0xfd6bf080 0x4>; 477 reg = <0xfd6bf080 0x4>;
462 reg-names = "irqmux"; 478 reg-names = "irqmux";
463 interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>; 479 interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
464 interrupts-names = "irqmux"; 480 interrupt-names = "irqmux";
465 ranges = <0 0xfd6b0000 0x3000>; 481 ranges = <0 0xfd6b0000 0x3000>;
466 482
467 PIO100: gpio@fd6b0000 { 483 PIO100: gpio@fd6b0000 {
@@ -498,7 +514,7 @@
498 reg = <0xfd33f080 0x4>; 514 reg = <0xfd33f080 0x4>;
499 reg-names = "irqmux"; 515 reg-names = "irqmux";
500 interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>; 516 interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
501 interrupts-names = "irqmux"; 517 interrupt-names = "irqmux";
502 ranges = <0 0xfd330000 0x5000>; 518 ranges = <0 0xfd330000 0x5000>;
503 519
504 PIO103: gpio@fd330000 { 520 PIO103: gpio@fd330000 {
diff --git a/arch/arm/boot/dts/stih416.dtsi b/arch/arm/boot/dts/stih416.dtsi
index 78746d20382e..06473c5d9ea9 100644
--- a/arch/arm/boot/dts/stih416.dtsi
+++ b/arch/arm/boot/dts/stih416.dtsi
@@ -89,7 +89,7 @@
89 status = "disabled"; 89 status = "disabled";
90 reg = <0xfed32000 0x2c>; 90 reg = <0xfed32000 0x2c>;
91 interrupts = <0 197 0>; 91 interrupts = <0 197 0>;
92 clocks = <&CLK_S_ICN_REG_0>; 92 clocks = <&clk_s_a0_ls CLK_ICN_REG>;
93 pinctrl-names = "default"; 93 pinctrl-names = "default";
94 pinctrl-0 = <&pinctrl_serial2 &pinctrl_serial2_oe>; 94 pinctrl-0 = <&pinctrl_serial2 &pinctrl_serial2_oe>;
95 }; 95 };
@@ -102,14 +102,14 @@
102 interrupts = <0 210 0>; 102 interrupts = <0 210 0>;
103 pinctrl-names = "default"; 103 pinctrl-names = "default";
104 pinctrl-0 = <&pinctrl_sbc_serial1>; 104 pinctrl-0 = <&pinctrl_sbc_serial1>;
105 clocks = <&CLK_SYSIN>; 105 clocks = <&clk_sysin>;
106 }; 106 };
107 107
108 i2c@fed40000 { 108 i2c@fed40000 {
109 compatible = "st,comms-ssc4-i2c"; 109 compatible = "st,comms-ssc4-i2c";
110 reg = <0xfed40000 0x110>; 110 reg = <0xfed40000 0x110>;
111 interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>; 111 interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
112 clocks = <&CLK_S_ICN_REG_0>; 112 clocks = <&clk_s_a0_ls CLK_ICN_REG>;
113 clock-names = "ssc"; 113 clock-names = "ssc";
114 clock-frequency = <400000>; 114 clock-frequency = <400000>;
115 pinctrl-names = "default"; 115 pinctrl-names = "default";
@@ -122,7 +122,7 @@
122 compatible = "st,comms-ssc4-i2c"; 122 compatible = "st,comms-ssc4-i2c";
123 reg = <0xfed41000 0x110>; 123 reg = <0xfed41000 0x110>;
124 interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>; 124 interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
125 clocks = <&CLK_S_ICN_REG_0>; 125 clocks = <&clk_s_a0_ls CLK_ICN_REG>;
126 clock-names = "ssc"; 126 clock-names = "ssc";
127 clock-frequency = <400000>; 127 clock-frequency = <400000>;
128 pinctrl-names = "default"; 128 pinctrl-names = "default";
@@ -135,7 +135,7 @@
135 compatible = "st,comms-ssc4-i2c"; 135 compatible = "st,comms-ssc4-i2c";
136 reg = <0xfe540000 0x110>; 136 reg = <0xfe540000 0x110>;
137 interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>; 137 interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
138 clocks = <&CLK_SYSIN>; 138 clocks = <&clk_sysin>;
139 clock-names = "ssc"; 139 clock-names = "ssc";
140 clock-frequency = <400000>; 140 clock-frequency = <400000>;
141 pinctrl-names = "default"; 141 pinctrl-names = "default";
@@ -148,7 +148,7 @@
148 compatible = "st,comms-ssc4-i2c"; 148 compatible = "st,comms-ssc4-i2c";
149 reg = <0xfe541000 0x110>; 149 reg = <0xfe541000 0x110>;
150 interrupts = <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>; 150 interrupts = <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>;
151 clocks = <&CLK_SYSIN>; 151 clocks = <&clk_sysin>;
152 clock-names = "ssc"; 152 clock-names = "ssc";
153 clock-frequency = <400000>; 153 clock-frequency = <400000>;
154 pinctrl-names = "default"; 154 pinctrl-names = "default";
@@ -176,7 +176,7 @@
176 pinctrl-names = "default"; 176 pinctrl-names = "default";
177 pinctrl-0 = <&pinctrl_mii0>; 177 pinctrl-0 = <&pinctrl_mii0>;
178 clock-names = "stmmaceth"; 178 clock-names = "stmmaceth";
179 clocks = <&CLK_S_GMAC0_PHY>; 179 clocks = <&clk_s_a1_ls CLK_GMAC0_PHY>;
180 }; 180 };
181 181
182 ethernet1: dwmac@fef08000 { 182 ethernet1: dwmac@fef08000 {
@@ -198,7 +198,7 @@
198 pinctrl-names = "default"; 198 pinctrl-names = "default";
199 pinctrl-0 = <&pinctrl_mii1>; 199 pinctrl-0 = <&pinctrl_mii1>;
200 clock-names = "stmmaceth"; 200 clock-names = "stmmaceth";
201 clocks = <&CLK_S_ETH1_PHY>; 201 clocks = <&clk_s_a0_ls CLK_ETH1_PHY>;
202 }; 202 };
203 203
204 rc: rc@fe518000 { 204 rc: rc@fe518000 {
@@ -206,7 +206,7 @@
206 reg = <0xfe518000 0x234>; 206 reg = <0xfe518000 0x234>;
207 interrupts = <0 203 0>; 207 interrupts = <0 203 0>;
208 rx-mode = "infrared"; 208 rx-mode = "infrared";
209 clocks = <&CLK_SYSIN>; 209 clocks = <&clk_sysin>;
210 pinctrl-names = "default"; 210 pinctrl-names = "default";
211 pinctrl-0 = <&pinctrl_ir>; 211 pinctrl-0 = <&pinctrl_ir>;
212 resets = <&softreset STIH416_IRB_SOFTRESET>; 212 resets = <&softreset STIH416_IRB_SOFTRESET>;
@@ -224,5 +224,17 @@
224 224
225 status = "disabled"; 225 status = "disabled";
226 }; 226 };
227
228 keyscan: keyscan@fe4b0000 {
229 compatible = "st,sti-keyscan";
230 status = "disabled";
231 reg = <0xfe4b0000 0x2000>;
232 interrupts = <GIC_SPI 212 IRQ_TYPE_NONE>;
233 clocks = <&clk_sysin>;
234 pinctrl-names = "default";
235 pinctrl-0 = <&pinctrl_keyscan>;
236 resets = <&powerdown STIH416_KEYSCAN_POWERDOWN>,
237 <&softreset STIH416_KEYSCAN_SOFTRESET>;
238 };
227 }; 239 };
228}; 240};
diff --git a/arch/arm/boot/dts/stih41x-b2000.dtsi b/arch/arm/boot/dts/stih41x-b2000.dtsi
index bf65c49095af..b3dd6ca5c2ae 100644
--- a/arch/arm/boot/dts/stih41x-b2000.dtsi
+++ b/arch/arm/boot/dts/stih41x-b2000.dtsi
@@ -6,6 +6,7 @@
6 * it under the terms of the GNU General Public License version 2 as 6 * it under the terms of the GNU General Public License version 2 as
7 * publishhed by the Free Software Foundation. 7 * publishhed by the Free Software Foundation.
8 */ 8 */
9#include <dt-bindings/input/input.h>
9/ { 10/ {
10 11
11 memory{ 12 memory{
@@ -14,7 +15,7 @@
14 }; 15 };
15 16
16 chosen { 17 chosen {
17 bootargs = "console=ttyAS0,115200"; 18 bootargs = "console=ttyAS0,115200 clk_ignore_unused";
18 linux,stdout-path = &serial2; 19 linux,stdout-path = &serial2;
19 }; 20 };
20 21
@@ -68,5 +69,27 @@
68 snps,reset-active-low; 69 snps,reset-active-low;
69 snps,reset-delays-us = <0 10000 10000>; 70 snps,reset-delays-us = <0 10000 10000>;
70 }; 71 };
72
73 keyscan: keyscan@fe4b0000 {
74 keypad,num-rows = <4>;
75 keypad,num-columns = <4>;
76 st,debounce-us = <5000>;
77 linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_F13)
78 MATRIX_KEY(0x00, 0x01, KEY_F9)
79 MATRIX_KEY(0x00, 0x02, KEY_F5)
80 MATRIX_KEY(0x00, 0x03, KEY_F1)
81 MATRIX_KEY(0x01, 0x00, KEY_F14)
82 MATRIX_KEY(0x01, 0x01, KEY_F10)
83 MATRIX_KEY(0x01, 0x02, KEY_F6)
84 MATRIX_KEY(0x01, 0x03, KEY_F2)
85 MATRIX_KEY(0x02, 0x00, KEY_F15)
86 MATRIX_KEY(0x02, 0x01, KEY_F11)
87 MATRIX_KEY(0x02, 0x02, KEY_F7)
88 MATRIX_KEY(0x02, 0x03, KEY_F3)
89 MATRIX_KEY(0x03, 0x00, KEY_F16)
90 MATRIX_KEY(0x03, 0x01, KEY_F12)
91 MATRIX_KEY(0x03, 0x02, KEY_F8)
92 MATRIX_KEY(0x03, 0x03, KEY_F4) >;
93 };
71 }; 94 };
72}; 95};
diff --git a/arch/arm/boot/dts/stih41x-b2020.dtsi b/arch/arm/boot/dts/stih41x-b2020.dtsi
index 838513f9ddc0..d8a84295c328 100644
--- a/arch/arm/boot/dts/stih41x-b2020.dtsi
+++ b/arch/arm/boot/dts/stih41x-b2020.dtsi
@@ -14,7 +14,7 @@
14 }; 14 };
15 15
16 chosen { 16 chosen {
17 bootargs = "console=ttyAS0,115200"; 17 bootargs = "console=ttyAS0,115200 clk_ignore_unused";
18 linux,stdout-path = &sbc_serial1; 18 linux,stdout-path = &sbc_serial1;
19 }; 19 };
20 20
diff --git a/arch/arm/boot/dts/stih41x.dtsi b/arch/arm/boot/dts/stih41x.dtsi
index f5b9898d9c6e..5cb0e63376b5 100644
--- a/arch/arm/boot/dts/stih41x.dtsi
+++ b/arch/arm/boot/dts/stih41x.dtsi
@@ -1,3 +1,10 @@
1/*
2 * Copyright (C) 2014 STMicroelectronics Limited.
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 * publishhed by the Free Software Foundation.
7 */
1/ { 8/ {
2 #address-cells = <1>; 9 #address-cells = <1>;
3 #size-cells = <1>; 10 #size-cells = <1>;
diff --git a/arch/arm/boot/dts/sun4i-a10-a1000.dts b/arch/arm/boot/dts/sun4i-a10-a1000.dts
index fa746aea5e66..0b97c071dd56 100644
--- a/arch/arm/boot/dts/sun4i-a10-a1000.dts
+++ b/arch/arm/boot/dts/sun4i-a10-a1000.dts
@@ -36,6 +36,16 @@
36 }; 36 };
37 }; 37 };
38 38
39 mmc0: mmc@01c0f000 {
40 pinctrl-names = "default";
41 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
42 vmmc-supply = <&reg_vcc3v3>;
43 bus-width = <4>;
44 cd-gpios = <&pio 7 1 0>; /* PH1 */
45 cd-inverted;
46 status = "okay";
47 };
48
39 usbphy: phy@01c13400 { 49 usbphy: phy@01c13400 {
40 usb1_vbus-supply = <&reg_usb1_vbus>; 50 usb1_vbus-supply = <&reg_usb1_vbus>;
41 usb2_vbus-supply = <&reg_usb2_vbus>; 51 usb2_vbus-supply = <&reg_usb2_vbus>;
diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
index 4684cbe6843b..c200eacc66e8 100644
--- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
+++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
@@ -34,6 +34,16 @@
34 }; 34 };
35 }; 35 };
36 36
37 mmc0: mmc@01c0f000 {
38 pinctrl-names = "default";
39 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
40 vmmc-supply = <&reg_vcc3v3>;
41 bus-width = <4>;
42 cd-gpios = <&pio 7 1 0>; /* PH1 */
43 cd-inverted;
44 status = "okay";
45 };
46
37 usbphy: phy@01c13400 { 47 usbphy: phy@01c13400 {
38 usb1_vbus-supply = <&reg_usb1_vbus>; 48 usb1_vbus-supply = <&reg_usb1_vbus>;
39 usb2_vbus-supply = <&reg_usb2_vbus>; 49 usb2_vbus-supply = <&reg_usb2_vbus>;
diff --git a/arch/arm/boot/dts/sun4i-a10-hackberry.dts b/arch/arm/boot/dts/sun4i-a10-hackberry.dts
index d7c17e46ce23..547fadcb984b 100644
--- a/arch/arm/boot/dts/sun4i-a10-hackberry.dts
+++ b/arch/arm/boot/dts/sun4i-a10-hackberry.dts
@@ -36,6 +36,16 @@
36 }; 36 };
37 }; 37 };
38 38
39 mmc0: mmc@01c0f000 {
40 pinctrl-names = "default";
41 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
42 vmmc-supply = <&reg_vcc3v3>;
43 bus-width = <4>;
44 cd-gpios = <&pio 7 1 0>; /* PH1 */
45 cd-inverted;
46 status = "okay";
47 };
48
39 usbphy: phy@01c13400 { 49 usbphy: phy@01c13400 {
40 usb1_vbus-supply = <&reg_usb1_vbus>; 50 usb1_vbus-supply = <&reg_usb1_vbus>;
41 usb2_vbus-supply = <&reg_usb2_vbus>; 51 usb2_vbus-supply = <&reg_usb2_vbus>;
diff --git a/arch/arm/boot/dts/sun4i-a10-inet97fv2.dts b/arch/arm/boot/dts/sun4i-a10-inet97fv2.dts
index fe9272ee55c3..f13723e18b86 100644
--- a/arch/arm/boot/dts/sun4i-a10-inet97fv2.dts
+++ b/arch/arm/boot/dts/sun4i-a10-inet97fv2.dts
@@ -24,6 +24,16 @@
24 }; 24 };
25 25
26 soc@01c00000 { 26 soc@01c00000 {
27 mmc0: mmc@01c0f000 {
28 pinctrl-names = "default";
29 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
30 vmmc-supply = <&reg_vcc3v3>;
31 bus-width = <4>;
32 cd-gpios = <&pio 7 1 0>; /* PH1 */
33 cd-inverted;
34 status = "okay";
35 };
36
27 uart0: serial@01c28000 { 37 uart0: serial@01c28000 {
28 pinctrl-names = "default"; 38 pinctrl-names = "default";
29 pinctrl-0 = <&uart0_pins_a>; 39 pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts b/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts
index dd84a9e313b3..c01cea50cf0c 100644
--- a/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts
+++ b/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts
@@ -20,6 +20,16 @@
20 compatible = "pineriver,mini-xplus", "allwinner,sun4i-a10"; 20 compatible = "pineriver,mini-xplus", "allwinner,sun4i-a10";
21 21
22 soc@01c00000 { 22 soc@01c00000 {
23 mmc0: mmc@01c0f000 {
24 pinctrl-names = "default";
25 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
26 vmmc-supply = <&reg_vcc3v3>;
27 bus-width = <4>;
28 cd-gpios = <&pio 7 1 0>; /* PH1 */
29 cd-inverted;
30 status = "okay";
31 };
32
23 usbphy: phy@01c13400 { 33 usbphy: phy@01c13400 {
24 usb1_vbus-supply = <&reg_usb1_vbus>; 34 usb1_vbus-supply = <&reg_usb1_vbus>;
25 usb2_vbus-supply = <&reg_usb2_vbus>; 35 usb2_vbus-supply = <&reg_usb2_vbus>;
diff --git a/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts b/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
index 66cf0c7cf5b7..d46a7dbecef5 100644
--- a/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
+++ b/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
@@ -33,6 +33,16 @@
33 }; 33 };
34 }; 34 };
35 35
36 mmc0: mmc@01c0f000 {
37 pinctrl-names = "default";
38 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
39 vmmc-supply = <&reg_vcc3v3>;
40 bus-width = <4>;
41 cd-gpios = <&pio 7 1 0>; /* PH1 */
42 cd-inverted;
43 status = "okay";
44 };
45
36 usbphy: phy@01c13400 { 46 usbphy: phy@01c13400 {
37 usb1_vbus-supply = <&reg_usb1_vbus>; 47 usb1_vbus-supply = <&reg_usb1_vbus>;
38 usb2_vbus-supply = <&reg_usb2_vbus>; 48 usb2_vbus-supply = <&reg_usb2_vbus>;
diff --git a/arch/arm/boot/dts/sun4i-a10-pcduino.dts b/arch/arm/boot/dts/sun4i-a10-pcduino.dts
index 255b47e7019c..fb03bccb78d2 100644
--- a/arch/arm/boot/dts/sun4i-a10-pcduino.dts
+++ b/arch/arm/boot/dts/sun4i-a10-pcduino.dts
@@ -34,6 +34,16 @@
34 }; 34 };
35 }; 35 };
36 36
37 mmc0: mmc@01c0f000 {
38 pinctrl-names = "default";
39 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
40 vmmc-supply = <&reg_vcc3v3>;
41 bus-width = <4>;
42 cd-gpios = <&pio 7 1 0>; /* PH1 */
43 cd-inverted;
44 status = "okay";
45 };
46
37 usbphy: phy@01c13400 { 47 usbphy: phy@01c13400 {
38 usb1_vbus-supply = <&reg_usb1_vbus>; 48 usb1_vbus-supply = <&reg_usb1_vbus>;
39 usb2_vbus-supply = <&reg_usb2_vbus>; 49 usb2_vbus-supply = <&reg_usb2_vbus>;
diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index 9174724571e2..d96e179490ce 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -377,6 +377,42 @@
377 #size-cells = <0>; 377 #size-cells = <0>;
378 }; 378 };
379 379
380 mmc0: mmc@01c0f000 {
381 compatible = "allwinner,sun4i-a10-mmc";
382 reg = <0x01c0f000 0x1000>;
383 clocks = <&ahb_gates 8>, <&mmc0_clk>;
384 clock-names = "ahb", "mmc";
385 interrupts = <32>;
386 status = "disabled";
387 };
388
389 mmc1: mmc@01c10000 {
390 compatible = "allwinner,sun4i-a10-mmc";
391 reg = <0x01c10000 0x1000>;
392 clocks = <&ahb_gates 9>, <&mmc1_clk>;
393 clock-names = "ahb", "mmc";
394 interrupts = <33>;
395 status = "disabled";
396 };
397
398 mmc2: mmc@01c11000 {
399 compatible = "allwinner,sun4i-a10-mmc";
400 reg = <0x01c11000 0x1000>;
401 clocks = <&ahb_gates 10>, <&mmc2_clk>;
402 clock-names = "ahb", "mmc";
403 interrupts = <34>;
404 status = "disabled";
405 };
406
407 mmc3: mmc@01c12000 {
408 compatible = "allwinner,sun4i-a10-mmc";
409 reg = <0x01c12000 0x1000>;
410 clocks = <&ahb_gates 11>, <&mmc3_clk>;
411 clock-names = "ahb", "mmc";
412 interrupts = <35>;
413 status = "disabled";
414 };
415
380 usbphy: phy@01c13400 { 416 usbphy: phy@01c13400 {
381 #phy-cells = <1>; 417 #phy-cells = <1>;
382 compatible = "allwinner,sun4i-a10-usb-phy"; 418 compatible = "allwinner,sun4i-a10-usb-phy";
@@ -477,6 +513,20 @@
477 #size-cells = <0>; 513 #size-cells = <0>;
478 #gpio-cells = <3>; 514 #gpio-cells = <3>;
479 515
516 pwm0_pins_a: pwm0@0 {
517 allwinner,pins = "PB2";
518 allwinner,function = "pwm";
519 allwinner,drive = <0>;
520 allwinner,pull = <0>;
521 };
522
523 pwm1_pins_a: pwm1@0 {
524 allwinner,pins = "PI3";
525 allwinner,function = "pwm";
526 allwinner,drive = <0>;
527 allwinner,pull = <0>;
528 };
529
480 uart0_pins_a: uart0@0 { 530 uart0_pins_a: uart0@0 {
481 allwinner,pins = "PB22", "PB23"; 531 allwinner,pins = "PB22", "PB23";
482 allwinner,function = "uart0"; 532 allwinner,function = "uart0";
@@ -529,6 +579,20 @@
529 allwinner,drive = <0>; 579 allwinner,drive = <0>;
530 allwinner,pull = <0>; 580 allwinner,pull = <0>;
531 }; 581 };
582
583 mmc0_pins_a: mmc0@0 {
584 allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5";
585 allwinner,function = "mmc0";
586 allwinner,drive = <2>;
587 allwinner,pull = <0>;
588 };
589
590 mmc0_cd_pin_reference_design: mmc0_cd_pin@0 {
591 allwinner,pins = "PH1";
592 allwinner,function = "gpio_in";
593 allwinner,drive = <0>;
594 allwinner,pull = <1>;
595 };
532 }; 596 };
533 597
534 timer@01c20c00 { 598 timer@01c20c00 {
@@ -549,6 +613,14 @@
549 interrupts = <24>; 613 interrupts = <24>;
550 }; 614 };
551 615
616 pwm: pwm@01c20e00 {
617 compatible = "allwinner,sun4i-a10-pwm";
618 reg = <0x01c20e00 0xc>;
619 clocks = <&osc24M>;
620 #pwm-cells = <3>;
621 status = "disabled";
622 };
623
552 sid: eeprom@01c23800 { 624 sid: eeprom@01c23800 {
553 compatible = "allwinner,sun4i-a10-sid"; 625 compatible = "allwinner,sun4i-a10-sid";
554 reg = <0x01c23800 0x10>; 626 reg = <0x01c23800 0x10>;
@@ -641,30 +713,36 @@
641 }; 713 };
642 714
643 i2c0: i2c@01c2ac00 { 715 i2c0: i2c@01c2ac00 {
644 compatible = "allwinner,sun4i-i2c"; 716 compatible = "allwinner,sun4i-a10-i2c";
645 reg = <0x01c2ac00 0x400>; 717 reg = <0x01c2ac00 0x400>;
646 interrupts = <7>; 718 interrupts = <7>;
647 clocks = <&apb1_gates 0>; 719 clocks = <&apb1_gates 0>;
648 clock-frequency = <100000>; 720 clock-frequency = <100000>;
649 status = "disabled"; 721 status = "disabled";
722 #address-cells = <1>;
723 #size-cells = <0>;
650 }; 724 };
651 725
652 i2c1: i2c@01c2b000 { 726 i2c1: i2c@01c2b000 {
653 compatible = "allwinner,sun4i-i2c"; 727 compatible = "allwinner,sun4i-a10-i2c";
654 reg = <0x01c2b000 0x400>; 728 reg = <0x01c2b000 0x400>;
655 interrupts = <8>; 729 interrupts = <8>;
656 clocks = <&apb1_gates 1>; 730 clocks = <&apb1_gates 1>;
657 clock-frequency = <100000>; 731 clock-frequency = <100000>;
658 status = "disabled"; 732 status = "disabled";
733 #address-cells = <1>;
734 #size-cells = <0>;
659 }; 735 };
660 736
661 i2c2: i2c@01c2b400 { 737 i2c2: i2c@01c2b400 {
662 compatible = "allwinner,sun4i-i2c"; 738 compatible = "allwinner,sun4i-a10-i2c";
663 reg = <0x01c2b400 0x400>; 739 reg = <0x01c2b400 0x400>;
664 interrupts = <9>; 740 interrupts = <9>;
665 clocks = <&apb1_gates 2>; 741 clocks = <&apb1_gates 2>;
666 clock-frequency = <100000>; 742 clock-frequency = <100000>;
667 status = "disabled"; 743 status = "disabled";
744 #address-cells = <1>;
745 #size-cells = <0>;
668 }; 746 };
669 }; 747 };
670}; 748};
diff --git a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
index 23611b71d3aa..ea9519da5764 100644
--- a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
+++ b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
@@ -35,6 +35,26 @@
35 }; 35 };
36 }; 36 };
37 37
38 mmc0: mmc@01c0f000 {
39 pinctrl-names = "default";
40 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino_micro>;
41 vmmc-supply = <&reg_vcc3v3>;
42 bus-width = <4>;
43 cd-gpios = <&pio 6 1 0>; /* PG1 */
44 cd-inverted;
45 status = "okay";
46 };
47
48 mmc1: mmc@01c10000 {
49 pinctrl-names = "default";
50 pinctrl-0 = <&mmc1_pins_a>, <&mmc1_cd_pin_olinuxino_micro>;
51 vmmc-supply = <&reg_vcc3v3>;
52 bus-width = <4>;
53 cd-gpios = <&pio 6 13 0>; /* PG13 */
54 cd-inverted;
55 status = "okay";
56 };
57
38 usbphy: phy@01c13400 { 58 usbphy: phy@01c13400 {
39 usb1_vbus-supply = <&reg_usb1_vbus>; 59 usb1_vbus-supply = <&reg_usb1_vbus>;
40 status = "okay"; 60 status = "okay";
@@ -49,6 +69,20 @@
49 }; 69 };
50 70
51 pinctrl@01c20800 { 71 pinctrl@01c20800 {
72 mmc0_cd_pin_olinuxino_micro: mmc0_cd_pin@0 {
73 allwinner,pins = "PG1";
74 allwinner,function = "gpio_in";
75 allwinner,drive = <0>;
76 allwinner,pull = <1>;
77 };
78
79 mmc1_cd_pin_olinuxino_micro: mmc1_cd_pin@0 {
80 allwinner,pins = "PG13";
81 allwinner,function = "gpio_in";
82 allwinner,drive = <0>;
83 allwinner,pull = <1>;
84 };
85
52 led_pins_olinuxino: led_pins@0 { 86 led_pins_olinuxino: led_pins@0 {
53 allwinner,pins = "PE3"; 87 allwinner,pins = "PE3";
54 allwinner,function = "gpio_out"; 88 allwinner,function = "gpio_out";
diff --git a/arch/arm/boot/dts/sun5i-a10s-r7-tv-dongle.dts b/arch/arm/boot/dts/sun5i-a10s-r7-tv-dongle.dts
new file mode 100644
index 000000000000..43a93762d4f2
--- /dev/null
+++ b/arch/arm/boot/dts/sun5i-a10s-r7-tv-dongle.dts
@@ -0,0 +1,100 @@
1/*
2 * Copyright 2014 Hans de Goede <hdegoede@redhat.com>
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12/dts-v1/;
13/include/ "sun5i-a10s.dtsi"
14/include/ "sunxi-common-regulators.dtsi"
15
16/ {
17 model = "R7 A10s hdmi tv-stick";
18 compatible = "allwinner,r7-tv-dongle", "allwinner,sun5i-a10s";
19
20 soc@01c00000 {
21 mmc0: mmc@01c0f000 {
22 pinctrl-names = "default";
23 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_r7>;
24 vmmc-supply = <&reg_vcc3v3>;
25 bus-width = <4>;
26 cd-gpios = <&pio 6 1 0>; /* PG1 */
27 cd-inverted;
28 status = "okay";
29 };
30
31 mmc1: mmc@01c10000 {
32 pinctrl-names = "default";
33 pinctrl-0 = <&mmc1_pins_a>;
34 vmmc-supply = <&reg_vcc3v3>;
35 bus-width = <4>;
36 non-removable;
37 status = "okay";
38 };
39
40 usbphy: phy@01c13400 {
41 usb1_vbus-supply = <&reg_usb1_vbus>;
42 status = "okay";
43 };
44
45 ehci0: usb@01c14000 {
46 status = "okay";
47 };
48
49 ohci0: usb@01c14400 {
50 status = "okay";
51 };
52
53 pinctrl@01c20800 {
54 mmc0_cd_pin_r7: mmc0_cd_pin@0 {
55 allwinner,pins = "PG1";
56 allwinner,function = "gpio_in";
57 allwinner,drive = <0>;
58 allwinner,pull = <1>;
59 };
60
61 led_pins_r7: led_pins@0 {
62 allwinner,pins = "PB2";
63 allwinner,function = "gpio_out";
64 allwinner,drive = <1>;
65 allwinner,pull = <0>;
66 };
67
68 usb1_vbus_pin_r7: usb1_vbus_pin@0 {
69 allwinner,pins = "PG13";
70 allwinner,function = "gpio_out";
71 allwinner,drive = <0>;
72 allwinner,pull = <0>;
73 };
74 };
75
76 uart0: serial@01c28000 {
77 pinctrl-names = "default";
78 pinctrl-0 = <&uart0_pins_a>;
79 status = "okay";
80 };
81 };
82
83 leds {
84 compatible = "gpio-leds";
85 pinctrl-names = "default";
86 pinctrl-0 = <&led_pins_r7>;
87
88 green {
89 label = "r7-tv-dongle:green:usr";
90 gpios = <&pio 1 2 0>;
91 default-state = "on";
92 };
93 };
94
95 reg_usb1_vbus: usb1-vbus {
96 pinctrl-0 = <&usb1_vbus_pin_r7>;
97 gpio = <&pio 6 13 0>;
98 status = "okay";
99 };
100};
diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
index 79989ed5658d..b64f705d9008 100644
--- a/arch/arm/boot/dts/sun5i-a10s.dtsi
+++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
@@ -338,6 +338,33 @@
338 #size-cells = <0>; 338 #size-cells = <0>;
339 }; 339 };
340 340
341 mmc0: mmc@01c0f000 {
342 compatible = "allwinner,sun5i-a13-mmc";
343 reg = <0x01c0f000 0x1000>;
344 clocks = <&ahb_gates 8>, <&mmc0_clk>;
345 clock-names = "ahb", "mmc";
346 interrupts = <32>;
347 status = "disabled";
348 };
349
350 mmc1: mmc@01c10000 {
351 compatible = "allwinner,sun5i-a13-mmc";
352 reg = <0x01c10000 0x1000>;
353 clocks = <&ahb_gates 9>, <&mmc1_clk>;
354 clock-names = "ahb", "mmc";
355 interrupts = <33>;
356 status = "disabled";
357 };
358
359 mmc2: mmc@01c11000 {
360 compatible = "allwinner,sun5i-a13-mmc";
361 reg = <0x01c11000 0x1000>;
362 clocks = <&ahb_gates 10>, <&mmc2_clk>;
363 clock-names = "ahb", "mmc";
364 interrupts = <34>;
365 status = "disabled";
366 };
367
341 usbphy: phy@01c13400 { 368 usbphy: phy@01c13400 {
342 #phy-cells = <1>; 369 #phy-cells = <1>;
343 compatible = "allwinner,sun5i-a13-usb-phy"; 370 compatible = "allwinner,sun5i-a13-usb-phy";
@@ -451,6 +478,20 @@
451 allwinner,drive = <0>; 478 allwinner,drive = <0>;
452 allwinner,pull = <0>; 479 allwinner,pull = <0>;
453 }; 480 };
481
482 mmc0_pins_a: mmc0@0 {
483 allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5";
484 allwinner,function = "mmc0";
485 allwinner,drive = <2>;
486 allwinner,pull = <0>;
487 };
488
489 mmc1_pins_a: mmc1@0 {
490 allwinner,pins = "PG3","PG4","PG5","PG6","PG7","PG8";
491 allwinner,function = "mmc1";
492 allwinner,drive = <2>;
493 allwinner,pull = <0>;
494 };
454 }; 495 };
455 496
456 timer@01c20c00 { 497 timer@01c20c00 {
@@ -519,7 +560,7 @@
519 i2c0: i2c@01c2ac00 { 560 i2c0: i2c@01c2ac00 {
520 #address-cells = <1>; 561 #address-cells = <1>;
521 #size-cells = <0>; 562 #size-cells = <0>;
522 compatible = "allwinner,sun4i-i2c"; 563 compatible = "allwinner,sun5i-a10s-i2c", "allwinner,sun4i-a10-i2c";
523 reg = <0x01c2ac00 0x400>; 564 reg = <0x01c2ac00 0x400>;
524 interrupts = <7>; 565 interrupts = <7>;
525 clocks = <&apb1_gates 0>; 566 clocks = <&apb1_gates 0>;
@@ -530,7 +571,7 @@
530 i2c1: i2c@01c2b000 { 571 i2c1: i2c@01c2b000 {
531 #address-cells = <1>; 572 #address-cells = <1>;
532 #size-cells = <0>; 573 #size-cells = <0>;
533 compatible = "allwinner,sun4i-i2c"; 574 compatible = "allwinner,sun5i-a10s-i2c", "allwinner,sun4i-a10-i2c";
534 reg = <0x01c2b000 0x400>; 575 reg = <0x01c2b000 0x400>;
535 interrupts = <8>; 576 interrupts = <8>;
536 clocks = <&apb1_gates 1>; 577 clocks = <&apb1_gates 1>;
@@ -541,7 +582,7 @@
541 i2c2: i2c@01c2b400 { 582 i2c2: i2c@01c2b400 {
542 #address-cells = <1>; 583 #address-cells = <1>;
543 #size-cells = <0>; 584 #size-cells = <0>;
544 compatible = "allwinner,sun4i-i2c"; 585 compatible = "allwinner,sun5i-a10s-i2c", "allwinner,sun4i-a10-i2c";
545 reg = <0x01c2b400 0x400>; 586 reg = <0x01c2b400 0x400>;
546 interrupts = <9>; 587 interrupts = <9>;
547 clocks = <&apb1_gates 2>; 588 clocks = <&apb1_gates 2>;
diff --git a/arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts b/arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts
index 11169d5b5b86..fa44b026483b 100644
--- a/arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts
+++ b/arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts
@@ -21,6 +21,16 @@
21 compatible = "olimex,a13-olinuxino-micro", "allwinner,sun5i-a13"; 21 compatible = "olimex,a13-olinuxino-micro", "allwinner,sun5i-a13";
22 22
23 soc@01c00000 { 23 soc@01c00000 {
24 mmc0: mmc@01c0f000 {
25 pinctrl-names = "default";
26 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxinom>;
27 vmmc-supply = <&reg_vcc3v3>;
28 bus-width = <4>;
29 cd-gpios = <&pio 6 0 0>; /* PG0 */
30 cd-inverted;
31 status = "okay";
32 };
33
24 usbphy: phy@01c13400 { 34 usbphy: phy@01c13400 {
25 usb1_vbus-supply = <&reg_usb1_vbus>; 35 usb1_vbus-supply = <&reg_usb1_vbus>;
26 status = "okay"; 36 status = "okay";
@@ -35,6 +45,13 @@
35 }; 45 };
36 46
37 pinctrl@01c20800 { 47 pinctrl@01c20800 {
48 mmc0_cd_pin_olinuxinom: mmc0_cd_pin@0 {
49 allwinner,pins = "PG0";
50 allwinner,function = "gpio_in";
51 allwinner,drive = <0>;
52 allwinner,pull = <1>;
53 };
54
38 led_pins_olinuxinom: led_pins@0 { 55 led_pins_olinuxinom: led_pins@0 {
39 allwinner,pins = "PG9"; 56 allwinner,pins = "PG9";
40 allwinner,function = "gpio_out"; 57 allwinner,function = "gpio_out";
diff --git a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
index 7a9187bbeb28..429994e1943e 100644
--- a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
+++ b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
@@ -20,6 +20,16 @@
20 compatible = "olimex,a13-olinuxino", "allwinner,sun5i-a13"; 20 compatible = "olimex,a13-olinuxino", "allwinner,sun5i-a13";
21 21
22 soc@01c00000 { 22 soc@01c00000 {
23 mmc0: mmc@01c0f000 {
24 pinctrl-names = "default";
25 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino>;
26 vmmc-supply = <&reg_vcc3v3>;
27 bus-width = <4>;
28 cd-gpios = <&pio 6 0 0>; /* PG0 */
29 cd-inverted;
30 status = "okay";
31 };
32
23 usbphy: phy@01c13400 { 33 usbphy: phy@01c13400 {
24 usb1_vbus-supply = <&reg_usb1_vbus>; 34 usb1_vbus-supply = <&reg_usb1_vbus>;
25 status = "okay"; 35 status = "okay";
@@ -34,6 +44,13 @@
34 }; 44 };
35 45
36 pinctrl@01c20800 { 46 pinctrl@01c20800 {
47 mmc0_cd_pin_olinuxino: mmc0_cd_pin@0 {
48 allwinner,pins = "PG0";
49 allwinner,function = "gpio_in";
50 allwinner,drive = <0>;
51 allwinner,pull = <1>;
52 };
53
37 led_pins_olinuxino: led_pins@0 { 54 led_pins_olinuxino: led_pins@0 {
38 allwinner,pins = "PG9"; 55 allwinner,pins = "PG9";
39 allwinner,function = "gpio_out"; 56 allwinner,function = "gpio_out";
diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
index f01c315bdc4b..3b2a94c40f6e 100644
--- a/arch/arm/boot/dts/sun5i-a13.dtsi
+++ b/arch/arm/boot/dts/sun5i-a13.dtsi
@@ -320,6 +320,24 @@
320 #size-cells = <0>; 320 #size-cells = <0>;
321 }; 321 };
322 322
323 mmc0: mmc@01c0f000 {
324 compatible = "allwinner,sun5i-a13-mmc";
325 reg = <0x01c0f000 0x1000>;
326 clocks = <&ahb_gates 8>, <&mmc0_clk>;
327 clock-names = "ahb", "mmc";
328 interrupts = <32>;
329 status = "disabled";
330 };
331
332 mmc2: mmc@01c11000 {
333 compatible = "allwinner,sun5i-a13-mmc";
334 reg = <0x01c11000 0x1000>;
335 clocks = <&ahb_gates 10>, <&mmc2_clk>;
336 clock-names = "ahb", "mmc";
337 interrupts = <34>;
338 status = "disabled";
339 };
340
323 usbphy: phy@01c13400 { 341 usbphy: phy@01c13400 {
324 #phy-cells = <1>; 342 #phy-cells = <1>;
325 compatible = "allwinner,sun5i-a13-usb-phy"; 343 compatible = "allwinner,sun5i-a13-usb-phy";
@@ -415,6 +433,13 @@
415 allwinner,drive = <0>; 433 allwinner,drive = <0>;
416 allwinner,pull = <0>; 434 allwinner,pull = <0>;
417 }; 435 };
436
437 mmc0_pins_a: mmc0@0 {
438 allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5";
439 allwinner,function = "mmc0";
440 allwinner,drive = <2>;
441 allwinner,pull = <0>;
442 };
418 }; 443 };
419 444
420 timer@01c20c00 { 445 timer@01c20c00 {
@@ -461,30 +486,36 @@
461 }; 486 };
462 487
463 i2c0: i2c@01c2ac00 { 488 i2c0: i2c@01c2ac00 {
464 compatible = "allwinner,sun4i-i2c"; 489 compatible = "allwinner,sun5i-a13-i2c", "allwinner,sun4i-a10-i2c";
465 reg = <0x01c2ac00 0x400>; 490 reg = <0x01c2ac00 0x400>;
466 interrupts = <7>; 491 interrupts = <7>;
467 clocks = <&apb1_gates 0>; 492 clocks = <&apb1_gates 0>;
468 clock-frequency = <100000>; 493 clock-frequency = <100000>;
469 status = "disabled"; 494 status = "disabled";
495 #address-cells = <1>;
496 #size-cells = <0>;
470 }; 497 };
471 498
472 i2c1: i2c@01c2b000 { 499 i2c1: i2c@01c2b000 {
473 compatible = "allwinner,sun4i-i2c"; 500 compatible = "allwinner,sun5i-a13-i2c", "allwinner,sun4i-a10-i2c";
474 reg = <0x01c2b000 0x400>; 501 reg = <0x01c2b000 0x400>;
475 interrupts = <8>; 502 interrupts = <8>;
476 clocks = <&apb1_gates 1>; 503 clocks = <&apb1_gates 1>;
477 clock-frequency = <100000>; 504 clock-frequency = <100000>;
478 status = "disabled"; 505 status = "disabled";
506 #address-cells = <1>;
507 #size-cells = <0>;
479 }; 508 };
480 509
481 i2c2: i2c@01c2b400 { 510 i2c2: i2c@01c2b400 {
482 compatible = "allwinner,sun4i-i2c"; 511 compatible = "allwinner,sun5i-a13-i2c", "allwinner,sun4i-a10-i2c";
483 reg = <0x01c2b400 0x400>; 512 reg = <0x01c2b400 0x400>;
484 interrupts = <9>; 513 interrupts = <9>;
485 clocks = <&apb1_gates 2>; 514 clocks = <&apb1_gates 2>;
486 clock-frequency = <100000>; 515 clock-frequency = <100000>;
487 status = "disabled"; 516 status = "disabled";
517 #address-cells = <1>;
518 #size-cells = <0>;
488 }; 519 };
489 520
490 timer@01c60000 { 521 timer@01c60000 {
diff --git a/arch/arm/boot/dts/sun6i-a31-app4-evb1.dts b/arch/arm/boot/dts/sun6i-a31-app4-evb1.dts
new file mode 100644
index 000000000000..2bbf8867362b
--- /dev/null
+++ b/arch/arm/boot/dts/sun6i-a31-app4-evb1.dts
@@ -0,0 +1,57 @@
1/*
2 * Copyright 2014 Boris Brezillon
3 *
4 * Boris Brezillon <boris.brezillon@free-electrons.com>
5 *
6 * The code contained herein is licensed under the GNU General Public
7 * License. You may obtain a copy of the GNU General Public License
8 * Version 2 or later at the following locations:
9 *
10 * http://www.opensource.org/licenses/gpl-license.html
11 * http://www.gnu.org/copyleft/gpl.html
12 */
13
14/dts-v1/;
15/include/ "sun6i-a31.dtsi"
16/include/ "sunxi-common-regulators.dtsi"
17
18/ {
19 model = "Allwinner A31 APP4 EVB1 Evaluation Board";
20 compatible = "allwinner,app4-evb1", "allwinner,sun6i-a31";
21
22 chosen {
23 bootargs = "earlyprintk console=ttyS0,115200";
24 };
25
26 soc@01c00000 {
27 pio: pinctrl@01c20800 {
28 usb1_vbus_pin_a: usb1_vbus_pin@0 {
29 allwinner,pins = "PH27";
30 allwinner,function = "gpio_out";
31 allwinner,drive = <0>;
32 allwinner,pull = <0>;
33 };
34 };
35
36 usbphy: phy@01c19400 {
37 usb1_vbus-supply = <&reg_usb1_vbus>;
38 status = "okay";
39 };
40
41 ehci0: usb@01c1a000 {
42 status = "okay";
43 };
44
45 uart0: serial@01c28000 {
46 pinctrl-names = "default";
47 pinctrl-0 = <&uart0_pins_a>;
48 status = "okay";
49 };
50 };
51
52 reg_usb1_vbus: usb1-vbus {
53 pinctrl-0 = <&usb1_vbus_pin_a>;
54 gpio = <&pio 7 27 0>;
55 status = "okay";
56 };
57};
diff --git a/arch/arm/boot/dts/sun6i-a31-colombus.dts b/arch/arm/boot/dts/sun6i-a31-colombus.dts
index 3898a7bce831..546cf6eff5c7 100644
--- a/arch/arm/boot/dts/sun6i-a31-colombus.dts
+++ b/arch/arm/boot/dts/sun6i-a31-colombus.dts
@@ -13,6 +13,7 @@
13 13
14/dts-v1/; 14/dts-v1/;
15/include/ "sun6i-a31.dtsi" 15/include/ "sun6i-a31.dtsi"
16/include/ "sunxi-common-regulators.dtsi"
16 17
17/ { 18/ {
18 model = "WITS A31 Colombus Evaluation Board"; 19 model = "WITS A31 Colombus Evaluation Board";
@@ -23,6 +24,45 @@
23 }; 24 };
24 25
25 soc@01c00000 { 26 soc@01c00000 {
27 mmc0: mmc@01c0f000 {
28 pinctrl-names = "default";
29 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_colombus>;
30 vmmc-supply = <&reg_vcc3v0>;
31 bus-width = <4>;
32 cd-gpios = <&pio 0 8 0>; /* PA8 */
33 cd-inverted;
34 status = "okay";
35 };
36
37 usbphy: phy@01c19400 {
38 usb2_vbus-supply = <&reg_usb2_vbus>;
39 status = "okay";
40 };
41
42 ehci1: usb@01c1b000 {
43 status = "okay";
44 };
45
46 pio: pinctrl@01c20800 {
47 mmc0_pins_a: mmc0@0 {
48 allwinner,pull = <1>;
49 };
50
51 mmc0_cd_pin_colombus: mmc0_cd_pin@0 {
52 allwinner,pins = "PA8";
53 allwinner,function = "gpio_in";
54 allwinner,drive = <0>;
55 allwinner,pull = <1>;
56 };
57
58 usb2_vbus_pin_colombus: usb2_vbus_pin@0 {
59 allwinner,pins = "PH24";
60 allwinner,function = "gpio_out";
61 allwinner,drive = <0>;
62 allwinner,pull = <0>;
63 };
64 };
65
26 uart0: serial@01c28000 { 66 uart0: serial@01c28000 {
27 pinctrl-names = "default"; 67 pinctrl-names = "default";
28 pinctrl-0 = <&uart0_pins_a>; 68 pinctrl-0 = <&uart0_pins_a>;
@@ -47,4 +87,11 @@
47 status = "okay"; 87 status = "okay";
48 }; 88 };
49 }; 89 };
90
91 reg_usb2_vbus: usb2-vbus {
92 pinctrl-names = "default";
93 pinctrl-0 = <&usb2_vbus_pin_colombus>;
94 gpio = <&pio 7 24 0>;
95 status = "okay";
96 };
50}; 97};
diff --git a/arch/arm/boot/dts/sun6i-a31-m9.dts b/arch/arm/boot/dts/sun6i-a31-m9.dts
new file mode 100644
index 000000000000..bc6115da5ae1
--- /dev/null
+++ b/arch/arm/boot/dts/sun6i-a31-m9.dts
@@ -0,0 +1,50 @@
1/*
2 * Copyright 2014 Hans de Goede <hdegoede@redhat.com>
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12/dts-v1/;
13/include/ "sun6i-a31.dtsi"
14/include/ "sunxi-common-regulators.dtsi"
15
16/ {
17 model = "Mele M9 / A1000G Quad top set box";
18 compatible = "mele,m9", "allwinner,sun6i-a31";
19
20 chosen {
21 bootargs = "earlyprintk console=ttyS0,115200";
22 };
23
24 soc@01c00000 {
25 mmc0: mmc@01c0f000 {
26 pinctrl-names = "default";
27 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_m9>;
28 vmmc-supply = <&reg_vcc3v3>;
29 bus-width = <4>;
30 cd-gpios = <&pio 7 22 0>; /* PH22 */
31 cd-inverted;
32 status = "okay";
33 };
34
35 pio: pinctrl@01c20800 {
36 mmc0_cd_pin_m9: mmc0_cd_pin@0 {
37 allwinner,pins = "PH22";
38 allwinner,function = "gpio_in";
39 allwinner,drive = <0>;
40 allwinner,pull = <1>;
41 };
42 };
43
44 uart0: serial@01c28000 {
45 pinctrl-names = "default";
46 pinctrl-0 = <&uart0_pins_a>;
47 status = "okay";
48 };
49 };
50};
diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
index d45efa74827c..a9dfa12eb735 100644
--- a/arch/arm/boot/dts/sun6i-a31.dtsi
+++ b/arch/arm/boot/dts/sun6i-a31.dtsi
@@ -27,6 +27,7 @@
27 27
28 28
29 cpus { 29 cpus {
30 enable-method = "allwinner,sun6i-a31";
30 #address-cells = <1>; 31 #address-cells = <1>;
31 #size-cells = <0>; 32 #size-cells = <0>;
32 33
@@ -59,6 +60,14 @@
59 reg = <0x40000000 0x80000000>; 60 reg = <0x40000000 0x80000000>;
60 }; 61 };
61 62
63 pmu {
64 compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu";
65 interrupts = <0 120 4>,
66 <0 121 4>,
67 <0 122 4>,
68 <0 123 4>;
69 };
70
62 clocks { 71 clocks {
63 #address-cells = <1>; 72 #address-cells = <1>;
64 #size-cells = <1>; 73 #size-cells = <1>;
@@ -198,6 +207,38 @@
198 "apb2_uart4", "apb2_uart5"; 207 "apb2_uart4", "apb2_uart5";
199 }; 208 };
200 209
210 mmc0_clk: clk@01c20088 {
211 #clock-cells = <0>;
212 compatible = "allwinner,sun4i-a10-mod0-clk";
213 reg = <0x01c20088 0x4>;
214 clocks = <&osc24M>, <&pll6>;
215 clock-output-names = "mmc0";
216 };
217
218 mmc1_clk: clk@01c2008c {
219 #clock-cells = <0>;
220 compatible = "allwinner,sun4i-a10-mod0-clk";
221 reg = <0x01c2008c 0x4>;
222 clocks = <&osc24M>, <&pll6>;
223 clock-output-names = "mmc1";
224 };
225
226 mmc2_clk: clk@01c20090 {
227 #clock-cells = <0>;
228 compatible = "allwinner,sun4i-a10-mod0-clk";
229 reg = <0x01c20090 0x4>;
230 clocks = <&osc24M>, <&pll6>;
231 clock-output-names = "mmc2";
232 };
233
234 mmc3_clk: clk@01c20094 {
235 #clock-cells = <0>;
236 compatible = "allwinner,sun4i-a10-mod0-clk";
237 reg = <0x01c20094 0x4>;
238 clocks = <&osc24M>, <&pll6>;
239 clock-output-names = "mmc3";
240 };
241
201 spi0_clk: clk@01c200a0 { 242 spi0_clk: clk@01c200a0 {
202 #clock-cells = <0>; 243 #clock-cells = <0>;
203 compatible = "allwinner,sun4i-a10-mod0-clk"; 244 compatible = "allwinner,sun4i-a10-mod0-clk";
@@ -229,6 +270,17 @@
229 clocks = <&osc24M>, <&pll6>; 270 clocks = <&osc24M>, <&pll6>;
230 clock-output-names = "spi3"; 271 clock-output-names = "spi3";
231 }; 272 };
273
274 usb_clk: clk@01c200cc {
275 #clock-cells = <1>;
276 #reset-cells = <1>;
277 compatible = "allwinner,sun6i-a31-usb-clk";
278 reg = <0x01c200cc 0x4>;
279 clocks = <&osc24M>;
280 clock-output-names = "usb_phy0", "usb_phy1", "usb_phy2",
281 "usb_ohci0", "usb_ohci1",
282 "usb_ohci2";
283 };
232 }; 284 };
233 285
234 soc@01c00000 { 286 soc@01c00000 {
@@ -237,12 +289,134 @@
237 #size-cells = <1>; 289 #size-cells = <1>;
238 ranges; 290 ranges;
239 291
240 nmi_intc: interrupt-controller@01f00c0c { 292 dma: dma-controller@01c02000 {
241 compatible = "allwinner,sun6i-a31-sc-nmi"; 293 compatible = "allwinner,sun6i-a31-dma";
242 interrupt-controller; 294 reg = <0x01c02000 0x1000>;
243 #interrupt-cells = <2>; 295 interrupts = <0 50 4>;
244 reg = <0x01f00c0c 0x38>; 296 clocks = <&ahb1_gates 6>;
245 interrupts = <0 32 4>; 297 resets = <&ahb1_rst 6>;
298 #dma-cells = <1>;
299 };
300
301 mmc0: mmc@01c0f000 {
302 compatible = "allwinner,sun5i-a13-mmc";
303 reg = <0x01c0f000 0x1000>;
304 clocks = <&ahb1_gates 8>, <&mmc0_clk>;
305 clock-names = "ahb", "mmc";
306 resets = <&ahb1_rst 8>;
307 reset-names = "ahb";
308 interrupts = <0 60 4>;
309 status = "disabled";
310 };
311
312 mmc1: mmc@01c10000 {
313 compatible = "allwinner,sun5i-a13-mmc";
314 reg = <0x01c10000 0x1000>;
315 clocks = <&ahb1_gates 9>, <&mmc1_clk>;
316 clock-names = "ahb", "mmc";
317 resets = <&ahb1_rst 9>;
318 reset-names = "ahb";
319 interrupts = <0 61 4>;
320 status = "disabled";
321 };
322
323 mmc2: mmc@01c11000 {
324 compatible = "allwinner,sun5i-a13-mmc";
325 reg = <0x01c11000 0x1000>;
326 clocks = <&ahb1_gates 10>, <&mmc2_clk>;
327 clock-names = "ahb", "mmc";
328 resets = <&ahb1_rst 10>;
329 reset-names = "ahb";
330 interrupts = <0 62 4>;
331 status = "disabled";
332 };
333
334 mmc3: mmc@01c12000 {
335 compatible = "allwinner,sun5i-a13-mmc";
336 reg = <0x01c12000 0x1000>;
337 clocks = <&ahb1_gates 11>, <&mmc3_clk>;
338 clock-names = "ahb", "mmc";
339 resets = <&ahb1_rst 11>;
340 reset-names = "ahb";
341 interrupts = <0 63 4>;
342 status = "disabled";
343 };
344
345 usbphy: phy@01c19400 {
346 compatible = "allwinner,sun6i-a31-usb-phy";
347 reg = <0x01c19400 0x10>,
348 <0x01c1a800 0x4>,
349 <0x01c1b800 0x4>;
350 reg-names = "phy_ctrl",
351 "pmu1",
352 "pmu2";
353 clocks = <&usb_clk 8>,
354 <&usb_clk 9>,
355 <&usb_clk 10>;
356 clock-names = "usb0_phy",
357 "usb1_phy",
358 "usb2_phy";
359 resets = <&usb_clk 0>,
360 <&usb_clk 1>,
361 <&usb_clk 2>;
362 reset-names = "usb0_reset",
363 "usb1_reset",
364 "usb2_reset";
365 status = "disabled";
366 #phy-cells = <1>;
367 };
368
369 ehci0: usb@01c1a000 {
370 compatible = "allwinner,sun6i-a31-ehci", "generic-ehci";
371 reg = <0x01c1a000 0x100>;
372 interrupts = <0 72 4>;
373 clocks = <&ahb1_gates 26>;
374 resets = <&ahb1_rst 26>;
375 phys = <&usbphy 1>;
376 phy-names = "usb";
377 status = "disabled";
378 };
379
380 ohci0: usb@01c1a400 {
381 compatible = "allwinner,sun6i-a31-ohci", "generic-ohci";
382 reg = <0x01c1a400 0x100>;
383 interrupts = <0 73 4>;
384 clocks = <&ahb1_gates 29>, <&usb_clk 16>;
385 resets = <&ahb1_rst 29>;
386 phys = <&usbphy 1>;
387 phy-names = "usb";
388 status = "disabled";
389 };
390
391 ehci1: usb@01c1b000 {
392 compatible = "allwinner,sun6i-a31-ehci", "generic-ehci";
393 reg = <0x01c1b000 0x100>;
394 interrupts = <0 74 4>;
395 clocks = <&ahb1_gates 27>;
396 resets = <&ahb1_rst 27>;
397 phys = <&usbphy 2>;
398 phy-names = "usb";
399 status = "disabled";
400 };
401
402 ohci1: usb@01c1b400 {
403 compatible = "allwinner,sun6i-a31-ohci", "generic-ohci";
404 reg = <0x01c1b400 0x100>;
405 interrupts = <0 75 4>;
406 clocks = <&ahb1_gates 30>, <&usb_clk 17>;
407 resets = <&ahb1_rst 30>;
408 phys = <&usbphy 2>;
409 phy-names = "usb";
410 status = "disabled";
411 };
412
413 ohci2: usb@01c1c400 {
414 compatible = "allwinner,sun6i-a31-ohci", "generic-ohci";
415 reg = <0x01c1c400 0x100>;
416 interrupts = <0 77 4>;
417 clocks = <&ahb1_gates 31>, <&usb_clk 18>;
418 resets = <&ahb1_rst 31>;
419 status = "disabled";
246 }; 420 };
247 421
248 pio: pinctrl@01c20800 { 422 pio: pinctrl@01c20800 {
@@ -286,6 +460,13 @@
286 allwinner,drive = <0>; 460 allwinner,drive = <0>;
287 allwinner,pull = <0>; 461 allwinner,pull = <0>;
288 }; 462 };
463
464 mmc0_pins_a: mmc0@0 {
465 allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5";
466 allwinner,function = "mmc0";
467 allwinner,drive = <2>;
468 allwinner,pull = <0>;
469 };
289 }; 470 };
290 471
291 ahb1_rst: reset@01c202c0 { 472 ahb1_rst: reset@01c202c0 {
@@ -330,6 +511,8 @@
330 reg-io-width = <4>; 511 reg-io-width = <4>;
331 clocks = <&apb2_gates 16>; 512 clocks = <&apb2_gates 16>;
332 resets = <&apb2_rst 16>; 513 resets = <&apb2_rst 16>;
514 dmas = <&dma 6>, <&dma 6>;
515 dma-names = "rx", "tx";
333 status = "disabled"; 516 status = "disabled";
334 }; 517 };
335 518
@@ -341,6 +524,8 @@
341 reg-io-width = <4>; 524 reg-io-width = <4>;
342 clocks = <&apb2_gates 17>; 525 clocks = <&apb2_gates 17>;
343 resets = <&apb2_rst 17>; 526 resets = <&apb2_rst 17>;
527 dmas = <&dma 7>, <&dma 7>;
528 dma-names = "rx", "tx";
344 status = "disabled"; 529 status = "disabled";
345 }; 530 };
346 531
@@ -352,6 +537,8 @@
352 reg-io-width = <4>; 537 reg-io-width = <4>;
353 clocks = <&apb2_gates 18>; 538 clocks = <&apb2_gates 18>;
354 resets = <&apb2_rst 18>; 539 resets = <&apb2_rst 18>;
540 dmas = <&dma 8>, <&dma 8>;
541 dma-names = "rx", "tx";
355 status = "disabled"; 542 status = "disabled";
356 }; 543 };
357 544
@@ -363,6 +550,8 @@
363 reg-io-width = <4>; 550 reg-io-width = <4>;
364 clocks = <&apb2_gates 19>; 551 clocks = <&apb2_gates 19>;
365 resets = <&apb2_rst 19>; 552 resets = <&apb2_rst 19>;
553 dmas = <&dma 9>, <&dma 9>;
554 dma-names = "rx", "tx";
366 status = "disabled"; 555 status = "disabled";
367 }; 556 };
368 557
@@ -374,6 +563,8 @@
374 reg-io-width = <4>; 563 reg-io-width = <4>;
375 clocks = <&apb2_gates 20>; 564 clocks = <&apb2_gates 20>;
376 resets = <&apb2_rst 20>; 565 resets = <&apb2_rst 20>;
566 dmas = <&dma 10>, <&dma 10>;
567 dma-names = "rx", "tx";
377 status = "disabled"; 568 status = "disabled";
378 }; 569 };
379 570
@@ -385,6 +576,8 @@
385 reg-io-width = <4>; 576 reg-io-width = <4>;
386 clocks = <&apb2_gates 21>; 577 clocks = <&apb2_gates 21>;
387 resets = <&apb2_rst 21>; 578 resets = <&apb2_rst 21>;
579 dmas = <&dma 22>, <&dma 22>;
580 dma-names = "rx", "tx";
388 status = "disabled"; 581 status = "disabled";
389 }; 582 };
390 583
@@ -428,12 +621,25 @@
428 status = "disabled"; 621 status = "disabled";
429 }; 622 };
430 623
624 timer@01c60000 {
625 compatible = "allwinner,sun6i-a31-hstimer", "allwinner,sun7i-a20-hstimer";
626 reg = <0x01c60000 0x1000>;
627 interrupts = <0 51 4>,
628 <0 52 4>,
629 <0 53 4>,
630 <0 54 4>;
631 clocks = <&ahb1_gates 19>;
632 resets = <&ahb1_rst 19>;
633 };
634
431 spi0: spi@01c68000 { 635 spi0: spi@01c68000 {
432 compatible = "allwinner,sun6i-a31-spi"; 636 compatible = "allwinner,sun6i-a31-spi";
433 reg = <0x01c68000 0x1000>; 637 reg = <0x01c68000 0x1000>;
434 interrupts = <0 65 4>; 638 interrupts = <0 65 4>;
435 clocks = <&ahb1_gates 20>, <&spi0_clk>; 639 clocks = <&ahb1_gates 20>, <&spi0_clk>;
436 clock-names = "ahb", "mod"; 640 clock-names = "ahb", "mod";
641 dmas = <&dma 23>, <&dma 23>;
642 dma-names = "rx", "tx";
437 resets = <&ahb1_rst 20>; 643 resets = <&ahb1_rst 20>;
438 status = "disabled"; 644 status = "disabled";
439 }; 645 };
@@ -444,6 +650,8 @@
444 interrupts = <0 66 4>; 650 interrupts = <0 66 4>;
445 clocks = <&ahb1_gates 21>, <&spi1_clk>; 651 clocks = <&ahb1_gates 21>, <&spi1_clk>;
446 clock-names = "ahb", "mod"; 652 clock-names = "ahb", "mod";
653 dmas = <&dma 24>, <&dma 24>;
654 dma-names = "rx", "tx";
447 resets = <&ahb1_rst 21>; 655 resets = <&ahb1_rst 21>;
448 status = "disabled"; 656 status = "disabled";
449 }; 657 };
@@ -454,6 +662,8 @@
454 interrupts = <0 67 4>; 662 interrupts = <0 67 4>;
455 clocks = <&ahb1_gates 22>, <&spi2_clk>; 663 clocks = <&ahb1_gates 22>, <&spi2_clk>;
456 clock-names = "ahb", "mod"; 664 clock-names = "ahb", "mod";
665 dmas = <&dma 25>, <&dma 25>;
666 dma-names = "rx", "tx";
457 resets = <&ahb1_rst 22>; 667 resets = <&ahb1_rst 22>;
458 status = "disabled"; 668 status = "disabled";
459 }; 669 };
@@ -464,6 +674,8 @@
464 interrupts = <0 68 4>; 674 interrupts = <0 68 4>;
465 clocks = <&ahb1_gates 23>, <&spi3_clk>; 675 clocks = <&ahb1_gates 23>, <&spi3_clk>;
466 clock-names = "ahb", "mod"; 676 clock-names = "ahb", "mod";
677 dmas = <&dma 26>, <&dma 26>;
678 dma-names = "rx", "tx";
467 resets = <&ahb1_rst 23>; 679 resets = <&ahb1_rst 23>;
468 status = "disabled"; 680 status = "disabled";
469 }; 681 };
@@ -479,14 +691,74 @@
479 interrupts = <1 9 0xf04>; 691 interrupts = <1 9 0xf04>;
480 }; 692 };
481 693
694 nmi_intc: interrupt-controller@01f00c0c {
695 compatible = "allwinner,sun6i-a31-sc-nmi";
696 interrupt-controller;
697 #interrupt-cells = <2>;
698 reg = <0x01f00c0c 0x38>;
699 interrupts = <0 32 4>;
700 };
701
702 prcm@01f01400 {
703 compatible = "allwinner,sun6i-a31-prcm";
704 reg = <0x01f01400 0x200>;
705
706 ar100: ar100_clk {
707 compatible = "allwinner,sun6i-a31-ar100-clk";
708 #clock-cells = <0>;
709 clocks = <&osc32k>, <&osc24M>, <&pll6>, <&pll6>;
710 clock-output-names = "ar100";
711 };
712
713 ahb0: ahb0_clk {
714 compatible = "fixed-factor-clock";
715 #clock-cells = <0>;
716 clock-div = <1>;
717 clock-mult = <1>;
718 clocks = <&ar100>;
719 clock-output-names = "ahb0";
720 };
721
722 apb0: apb0_clk {
723 compatible = "allwinner,sun6i-a31-apb0-clk";
724 #clock-cells = <0>;
725 clocks = <&ahb0>;
726 clock-output-names = "apb0";
727 };
728
729 apb0_gates: apb0_gates_clk {
730 compatible = "allwinner,sun6i-a31-apb0-gates-clk";
731 #clock-cells = <1>;
732 clocks = <&apb0>;
733 clock-output-names = "apb0_pio", "apb0_ir",
734 "apb0_timer", "apb0_p2wi",
735 "apb0_uart", "apb0_1wire",
736 "apb0_i2c";
737 };
738
739 apb0_rst: apb0_rst {
740 compatible = "allwinner,sun6i-a31-clock-reset";
741 #reset-cells = <1>;
742 };
743 };
744
482 cpucfg@01f01c00 { 745 cpucfg@01f01c00 {
483 compatible = "allwinner,sun6i-a31-cpuconfig"; 746 compatible = "allwinner,sun6i-a31-cpuconfig";
484 reg = <0x01f01c00 0x300>; 747 reg = <0x01f01c00 0x300>;
485 }; 748 };
486 749
487 prcm@01f01c00 { 750 r_pio: pinctrl@01f02c00 {
488 compatible = "allwinner,sun6i-a31-prcm"; 751 compatible = "allwinner,sun6i-a31-r-pinctrl";
489 reg = <0x01f01400 0x200>; 752 reg = <0x01f02c00 0x400>;
753 interrupts = <0 45 4>,
754 <0 46 4>;
755 clocks = <&apb0_gates 0>;
756 resets = <&apb0_rst 0>;
757 gpio-controller;
758 interrupt-controller;
759 #address-cells = <1>;
760 #size-cells = <0>;
761 #gpio-cells = <3>;
490 }; 762 };
491 }; 763 };
492}; 764};
diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
index 68de89ffbdfa..a5ad945197e8 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
@@ -20,6 +20,16 @@
20 compatible = "cubietech,cubieboard2", "allwinner,sun7i-a20"; 20 compatible = "cubietech,cubieboard2", "allwinner,sun7i-a20";
21 21
22 soc@01c00000 { 22 soc@01c00000 {
23 mmc0: mmc@01c0f000 {
24 pinctrl-names = "default";
25 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
26 vmmc-supply = <&reg_vcc3v3>;
27 bus-width = <4>;
28 cd-gpios = <&pio 7 1 0>; /* PH1 */
29 cd-inverted;
30 status = "okay";
31 };
32
23 usbphy: phy@01c13400 { 33 usbphy: phy@01c13400 {
24 usb1_vbus-supply = <&reg_usb1_vbus>; 34 usb1_vbus-supply = <&reg_usb1_vbus>;
25 usb2_vbus-supply = <&reg_usb2_vbus>; 35 usb2_vbus-supply = <&reg_usb2_vbus>;
diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
index cb25d3c8da58..b87fea901489 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
@@ -20,6 +20,25 @@
20 compatible = "cubietech,cubietruck", "allwinner,sun7i-a20"; 20 compatible = "cubietech,cubietruck", "allwinner,sun7i-a20";
21 21
22 soc@01c00000 { 22 soc@01c00000 {
23 mmc0: mmc@01c0f000 {
24 pinctrl-names = "default";
25 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
26 vmmc-supply = <&reg_vcc3v3>;
27 bus-width = <4>;
28 cd-gpios = <&pio 7 1 0>; /* PH1 */
29 cd-inverted;
30 status = "okay";
31 };
32
33 mmc3: mmc@01c12000 {
34 pinctrl-names = "default";
35 pinctrl-0 = <&mmc3_pins_a>;
36 vmmc-supply = <&reg_vmmc3>;
37 bus-width = <4>;
38 non-removable;
39 status = "okay";
40 };
41
23 usbphy: phy@01c13400 { 42 usbphy: phy@01c13400 {
24 usb1_vbus-supply = <&reg_usb1_vbus>; 43 usb1_vbus-supply = <&reg_usb1_vbus>;
25 usb2_vbus-supply = <&reg_usb2_vbus>; 44 usb2_vbus-supply = <&reg_usb2_vbus>;
@@ -48,6 +67,18 @@
48 }; 67 };
49 68
50 pinctrl@01c20800 { 69 pinctrl@01c20800 {
70 mmc3_pins_a: mmc3@0 {
71 /* AP6210 requires pull-up */
72 allwinner,pull = <1>;
73 };
74
75 vmmc3_pin_cubietruck: vmmc3_pin@0 {
76 allwinner,pins = "PH9";
77 allwinner,function = "gpio_out";
78 allwinner,drive = <0>;
79 allwinner,pull = <0>;
80 };
81
51 ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 { 82 ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 {
52 allwinner,pins = "PH12"; 83 allwinner,pins = "PH12";
53 allwinner,function = "gpio_out"; 84 allwinner,function = "gpio_out";
@@ -63,6 +94,12 @@
63 }; 94 };
64 }; 95 };
65 96
97 pwm: pwm@01c20e00 {
98 pinctrl-names = "default";
99 pinctrl-0 = <&pwm0_pins_a>, <&pwm1_pins_a>;
100 status = "okay";
101 };
102
66 uart0: serial@01c28000 { 103 uart0: serial@01c28000 {
67 pinctrl-names = "default"; 104 pinctrl-names = "default";
68 pinctrl-0 = <&uart0_pins_a>; 105 pinctrl-0 = <&uart0_pins_a>;
@@ -139,4 +176,15 @@
139 reg_usb2_vbus: usb2-vbus { 176 reg_usb2_vbus: usb2-vbus {
140 status = "okay"; 177 status = "okay";
141 }; 178 };
179
180 reg_vmmc3: vmmc3 {
181 compatible = "regulator-fixed";
182 pinctrl-names = "default";
183 pinctrl-0 = <&vmmc3_pin_cubietruck>;
184 regulator-name = "vmmc3";
185 regulator-min-microvolt = <3300000>;
186 regulator-max-microvolt = <3300000>;
187 enable-active-high;
188 gpio = <&pio 7 9 0>;
189 };
142}; 190};
diff --git a/arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts b/arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts
new file mode 100644
index 000000000000..b77308e90199
--- /dev/null
+++ b/arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts
@@ -0,0 +1,176 @@
1/*
2 * Copyright 2014 Hans de Goede <hdegoede@redhat.com>
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12/dts-v1/;
13/include/ "sun7i-a20.dtsi"
14/include/ "sunxi-common-regulators.dtsi"
15
16/ {
17 model = "I12 / Q5 / QT840A A20 tvbox";
18 compatible = "allwinner,i12-tvbox", "allwinner,sun7i-a20";
19
20 soc@01c00000 {
21 mmc0: mmc@01c0f000 {
22 pinctrl-names = "default";
23 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
24 vmmc-supply = <&reg_vcc3v3>;
25 bus-width = <4>;
26 cd-gpios = <&pio 7 1 0>; /* PH1 */
27 cd-inverted;
28 status = "okay";
29 };
30
31 mmc3: mmc@01c12000 {
32 pinctrl-names = "default";
33 pinctrl-0 = <&mmc3_pins_a>;
34 vmmc-supply = <&reg_vmmc3>;
35 bus-width = <4>;
36 non-removable;
37 status = "okay";
38 };
39
40 usbphy: phy@01c13400 {
41 usb1_vbus-supply = <&reg_usb1_vbus>;
42 usb2_vbus-supply = <&reg_usb2_vbus>;
43 status = "okay";
44 };
45
46 ehci0: usb@01c14000 {
47 status = "okay";
48 };
49
50 ohci0: usb@01c14400 {
51 status = "okay";
52 };
53
54 ehci1: usb@01c1c000 {
55 status = "okay";
56 };
57
58 ohci1: usb@01c1c400 {
59 status = "okay";
60 };
61
62 pinctrl@01c20800 {
63 mmc3_pins_a: mmc3@0 {
64 /* AP6210 / AP6330 requires pull-up */
65 allwinner,pull = <1>;
66 };
67
68 vmmc3_pin_i12_tvbox: vmmc3_pin@0 {
69 allwinner,pins = "PH2";
70 allwinner,function = "gpio_out";
71 allwinner,drive = <0>;
72 allwinner,pull = <0>;
73 };
74
75 vmmc3_io_pin_i12_tvbox: vmmc3_io_pin@0 {
76 allwinner,pins = "PH12";
77 allwinner,function = "gpio_out";
78 allwinner,drive = <0>;
79 allwinner,pull = <0>;
80 };
81
82 gmac_power_pin_i12_tvbox: gmac_power_pin@0 {
83 allwinner,pins = "PH21";
84 allwinner,function = "gpio_out";
85 allwinner,drive = <0>;
86 allwinner,pull = <0>;
87 };
88
89 led_pins_i12_tvbox: led_pins@0 {
90 allwinner,pins = "PH9", "PH20";
91 allwinner,function = "gpio_out";
92 allwinner,drive = <0>;
93 allwinner,pull = <0>;
94 };
95 };
96
97 uart0: serial@01c28000 {
98 pinctrl-names = "default";
99 pinctrl-0 = <&uart0_pins_a>;
100 status = "okay";
101 };
102
103 gmac: ethernet@01c50000 {
104 pinctrl-names = "default";
105 pinctrl-0 = <&gmac_pins_mii_a>;
106 phy = <&phy1>;
107 phy-mode = "mii";
108 phy-supply = <&reg_gmac_3v3>;
109 status = "okay";
110
111 phy1: ethernet-phy@1 {
112 reg = <1>;
113 };
114 };
115 };
116
117 leds {
118 compatible = "gpio-leds";
119 pinctrl-names = "default";
120 pinctrl-0 = <&led_pins_i12_tvbox>;
121
122 red {
123 label = "i12_tvbox:red:usr";
124 gpios = <&pio 7 9 1>;
125 };
126
127 blue {
128 label = "i12_tvbox:blue:usr";
129 gpios = <&pio 7 20 0>;
130 };
131 };
132
133 reg_usb1_vbus: usb1-vbus {
134 status = "okay";
135 };
136
137 reg_usb2_vbus: usb2-vbus {
138 status = "okay";
139 };
140
141 reg_vmmc3: vmmc3 {
142 compatible = "regulator-fixed";
143 pinctrl-names = "default";
144 pinctrl-0 = <&vmmc3_pin_i12_tvbox>;
145 regulator-name = "vmmc3";
146 regulator-min-microvolt = <3300000>;
147 regulator-max-microvolt = <3300000>;
148 enable-active-high;
149 gpio = <&pio 7 2 0>;
150 };
151
152 reg_vmmc3_io: vmmc3-io {
153 compatible = "regulator-fixed";
154 pinctrl-names = "default";
155 pinctrl-0 = <&vmmc3_io_pin_i12_tvbox>;
156 regulator-name = "vmmc3-io";
157 regulator-min-microvolt = <3300000>;
158 regulator-max-microvolt = <3300000>;
159 /* This controls VCC-PI, must be always on! */
160 regulator-always-on;
161 enable-active-high;
162 gpio = <&pio 7 12 0>;
163 };
164
165 reg_gmac_3v3: gmac-3v3 {
166 compatible = "regulator-fixed";
167 pinctrl-names = "default";
168 pinctrl-0 = <&gmac_power_pin_i12_tvbox>;
169 regulator-name = "gmac-3v3";
170 regulator-min-microvolt = <3300000>;
171 regulator-max-microvolt = <3300000>;
172 startup-delay-us = <50000>;
173 enable-active-high;
174 gpio = <&pio 7 21 0>;
175 };
176};
diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
index eeadf76362fa..b759630bc9a9 100644
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
@@ -31,6 +31,26 @@
31 status = "okay"; 31 status = "okay";
32 }; 32 };
33 33
34 mmc0: mmc@01c0f000 {
35 pinctrl-names = "default";
36 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
37 vmmc-supply = <&reg_vcc3v3>;
38 bus-width = <4>;
39 cd-gpios = <&pio 7 1 0>; /* PH1 */
40 cd-inverted;
41 status = "okay";
42 };
43
44 mmc3: mmc@01c12000 {
45 pinctrl-names = "default";
46 pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olinuxinom>;
47 vmmc-supply = <&reg_vcc3v3>;
48 bus-width = <4>;
49 cd-gpios = <&pio 7 11 0>; /* PH11 */
50 cd-inverted;
51 status = "okay";
52 };
53
34 usbphy: phy@01c13400 { 54 usbphy: phy@01c13400 {
35 usb1_vbus-supply = <&reg_usb1_vbus>; 55 usb1_vbus-supply = <&reg_usb1_vbus>;
36 usb2_vbus-supply = <&reg_usb2_vbus>; 56 usb2_vbus-supply = <&reg_usb2_vbus>;
@@ -65,6 +85,13 @@
65 }; 85 };
66 86
67 pinctrl@01c20800 { 87 pinctrl@01c20800 {
88 mmc3_cd_pin_olinuxinom: mmc3_cd_pin@0 {
89 allwinner,pins = "PH11";
90 allwinner,function = "gpio_in";
91 allwinner,drive = <0>;
92 allwinner,pull = <1>;
93 };
94
68 led_pins_olinuxino: led_pins@0 { 95 led_pins_olinuxino: led_pins@0 {
69 allwinner,pins = "PH2"; 96 allwinner,pins = "PH2";
70 allwinner,function = "gpio_out"; 97 allwinner,function = "gpio_out";
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 32efc105df83..01e94664232a 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -57,6 +57,12 @@
57 <1 10 0xf08>; 57 <1 10 0xf08>;
58 }; 58 };
59 59
60 pmu {
61 compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu";
62 interrupts = <0 120 4>,
63 <0 121 4>;
64 };
65
60 clocks { 66 clocks {
61 #address-cells = <1>; 67 #address-cells = <1>;
62 #size-cells = <1>; 68 #size-cells = <1>;
@@ -87,7 +93,7 @@
87 93
88 pll4: clk@01c20018 { 94 pll4: clk@01c20018 {
89 #clock-cells = <0>; 95 #clock-cells = <0>;
90 compatible = "allwinner,sun4i-a10-pll1-clk"; 96 compatible = "allwinner,sun7i-a20-pll4-clk";
91 reg = <0x01c20018 0x4>; 97 reg = <0x01c20018 0x4>;
92 clocks = <&osc24M>; 98 clocks = <&osc24M>;
93 clock-output-names = "pll4"; 99 clock-output-names = "pll4";
@@ -109,6 +115,14 @@
109 clock-output-names = "pll6_sata", "pll6_other", "pll6"; 115 clock-output-names = "pll6_sata", "pll6_other", "pll6";
110 }; 116 };
111 117
118 pll8: clk@01c20040 {
119 #clock-cells = <0>;
120 compatible = "allwinner,sun7i-a20-pll4-clk";
121 reg = <0x01c20040 0x4>;
122 clocks = <&osc24M>;
123 clock-output-names = "pll8";
124 };
125
112 cpu: cpu@01c20054 { 126 cpu: cpu@01c20054 {
113 #clock-cells = <0>; 127 #clock-cells = <0>;
114 compatible = "allwinner,sun4i-a10-cpu-clk"; 128 compatible = "allwinner,sun4i-a10-cpu-clk";
@@ -447,6 +461,42 @@
447 #size-cells = <0>; 461 #size-cells = <0>;
448 }; 462 };
449 463
464 mmc0: mmc@01c0f000 {
465 compatible = "allwinner,sun5i-a13-mmc";
466 reg = <0x01c0f000 0x1000>;
467 clocks = <&ahb_gates 8>, <&mmc0_clk>;
468 clock-names = "ahb", "mmc";
469 interrupts = <0 32 4>;
470 status = "disabled";
471 };
472
473 mmc1: mmc@01c10000 {
474 compatible = "allwinner,sun5i-a13-mmc";
475 reg = <0x01c10000 0x1000>;
476 clocks = <&ahb_gates 9>, <&mmc1_clk>;
477 clock-names = "ahb", "mmc";
478 interrupts = <0 33 4>;
479 status = "disabled";
480 };
481
482 mmc2: mmc@01c11000 {
483 compatible = "allwinner,sun5i-a13-mmc";
484 reg = <0x01c11000 0x1000>;
485 clocks = <&ahb_gates 10>, <&mmc2_clk>;
486 clock-names = "ahb", "mmc";
487 interrupts = <0 34 4>;
488 status = "disabled";
489 };
490
491 mmc3: mmc@01c12000 {
492 compatible = "allwinner,sun5i-a13-mmc";
493 reg = <0x01c12000 0x1000>;
494 clocks = <&ahb_gates 11>, <&mmc3_clk>;
495 clock-names = "ahb", "mmc";
496 interrupts = <0 35 4>;
497 status = "disabled";
498 };
499
450 usbphy: phy@01c13400 { 500 usbphy: phy@01c13400 {
451 #phy-cells = <1>; 501 #phy-cells = <1>;
452 compatible = "allwinner,sun7i-a20-usb-phy"; 502 compatible = "allwinner,sun7i-a20-usb-phy";
@@ -540,6 +590,20 @@
540 #size-cells = <0>; 590 #size-cells = <0>;
541 #gpio-cells = <3>; 591 #gpio-cells = <3>;
542 592
593 pwm0_pins_a: pwm0@0 {
594 allwinner,pins = "PB2";
595 allwinner,function = "pwm";
596 allwinner,drive = <0>;
597 allwinner,pull = <0>;
598 };
599
600 pwm1_pins_a: pwm1@0 {
601 allwinner,pins = "PI3";
602 allwinner,function = "pwm";
603 allwinner,drive = <0>;
604 allwinner,pull = <0>;
605 };
606
543 uart0_pins_a: uart0@0 { 607 uart0_pins_a: uart0@0 {
544 allwinner,pins = "PB22", "PB23"; 608 allwinner,pins = "PB22", "PB23";
545 allwinner,function = "uart0"; 609 allwinner,function = "uart0";
@@ -653,6 +717,27 @@
653 allwinner,drive = <0>; 717 allwinner,drive = <0>;
654 allwinner,pull = <0>; 718 allwinner,pull = <0>;
655 }; 719 };
720
721 mmc0_pins_a: mmc0@0 {
722 allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5";
723 allwinner,function = "mmc0";
724 allwinner,drive = <2>;
725 allwinner,pull = <0>;
726 };
727
728 mmc0_cd_pin_reference_design: mmc0_cd_pin@0 {
729 allwinner,pins = "PH1";
730 allwinner,function = "gpio_in";
731 allwinner,drive = <0>;
732 allwinner,pull = <1>;
733 };
734
735 mmc3_pins_a: mmc3@0 {
736 allwinner,pins = "PI4","PI5","PI6","PI7","PI8","PI9";
737 allwinner,function = "mmc3";
738 allwinner,drive = <2>;
739 allwinner,pull = <0>;
740 };
656 }; 741 };
657 742
658 timer@01c20c00 { 743 timer@01c20c00 {
@@ -678,6 +763,14 @@
678 interrupts = <0 24 4>; 763 interrupts = <0 24 4>;
679 }; 764 };
680 765
766 pwm: pwm@01c20e00 {
767 compatible = "allwinner,sun7i-a20-pwm";
768 reg = <0x01c20e00 0xc>;
769 clocks = <&osc24M>;
770 #pwm-cells = <3>;
771 status = "disabled";
772 };
773
681 sid: eeprom@01c23800 { 774 sid: eeprom@01c23800 {
682 compatible = "allwinner,sun7i-a20-sid"; 775 compatible = "allwinner,sun7i-a20-sid";
683 reg = <0x01c23800 0x200>; 776 reg = <0x01c23800 0x200>;
@@ -770,48 +863,58 @@
770 }; 863 };
771 864
772 i2c0: i2c@01c2ac00 { 865 i2c0: i2c@01c2ac00 {
773 compatible = "allwinner,sun4i-i2c"; 866 compatible = "allwinner,sun7i-a20-i2c", "allwinner,sun4i-a10-i2c";
774 reg = <0x01c2ac00 0x400>; 867 reg = <0x01c2ac00 0x400>;
775 interrupts = <0 7 4>; 868 interrupts = <0 7 4>;
776 clocks = <&apb1_gates 0>; 869 clocks = <&apb1_gates 0>;
777 clock-frequency = <100000>; 870 clock-frequency = <100000>;
778 status = "disabled"; 871 status = "disabled";
872 #address-cells = <1>;
873 #size-cells = <0>;
779 }; 874 };
780 875
781 i2c1: i2c@01c2b000 { 876 i2c1: i2c@01c2b000 {
782 compatible = "allwinner,sun4i-i2c"; 877 compatible = "allwinner,sun7i-a20-i2c", "allwinner,sun4i-a10-i2c";
783 reg = <0x01c2b000 0x400>; 878 reg = <0x01c2b000 0x400>;
784 interrupts = <0 8 4>; 879 interrupts = <0 8 4>;
785 clocks = <&apb1_gates 1>; 880 clocks = <&apb1_gates 1>;
786 clock-frequency = <100000>; 881 clock-frequency = <100000>;
787 status = "disabled"; 882 status = "disabled";
883 #address-cells = <1>;
884 #size-cells = <0>;
788 }; 885 };
789 886
790 i2c2: i2c@01c2b400 { 887 i2c2: i2c@01c2b400 {
791 compatible = "allwinner,sun4i-i2c"; 888 compatible = "allwinner,sun7i-a20-i2c", "allwinner,sun4i-a10-i2c";
792 reg = <0x01c2b400 0x400>; 889 reg = <0x01c2b400 0x400>;
793 interrupts = <0 9 4>; 890 interrupts = <0 9 4>;
794 clocks = <&apb1_gates 2>; 891 clocks = <&apb1_gates 2>;
795 clock-frequency = <100000>; 892 clock-frequency = <100000>;
796 status = "disabled"; 893 status = "disabled";
894 #address-cells = <1>;
895 #size-cells = <0>;
797 }; 896 };
798 897
799 i2c3: i2c@01c2b800 { 898 i2c3: i2c@01c2b800 {
800 compatible = "allwinner,sun4i-i2c"; 899 compatible = "allwinner,sun7i-a20-i2c", "allwinner,sun4i-a10-i2c";
801 reg = <0x01c2b800 0x400>; 900 reg = <0x01c2b800 0x400>;
802 interrupts = <0 88 4>; 901 interrupts = <0 88 4>;
803 clocks = <&apb1_gates 3>; 902 clocks = <&apb1_gates 3>;
804 clock-frequency = <100000>; 903 clock-frequency = <100000>;
805 status = "disabled"; 904 status = "disabled";
905 #address-cells = <1>;
906 #size-cells = <0>;
806 }; 907 };
807 908
808 i2c4: i2c@01c2bc00 { 909 i2c4: i2c@01c2c000 {
809 compatible = "allwinner,sun4i-i2c"; 910 compatible = "allwinner,sun7i-a20-i2c", "allwinner,sun4i-a10-i2c";
810 reg = <0x01c2bc00 0x400>; 911 reg = <0x01c2c000 0x400>;
811 interrupts = <0 89 4>; 912 interrupts = <0 89 4>;
812 clocks = <&apb1_gates 15>; 913 clocks = <&apb1_gates 15>;
813 clock-frequency = <100000>; 914 clock-frequency = <100000>;
814 status = "disabled"; 915 status = "disabled";
916 #address-cells = <1>;
917 #size-cells = <0>;
815 }; 918 };
816 919
817 gmac: ethernet@01c50000 { 920 gmac: ethernet@01c50000 {
diff --git a/arch/arm/boot/dts/sunxi-common-regulators.dtsi b/arch/arm/boot/dts/sunxi-common-regulators.dtsi
index 18eeac0670b9..3d021efd1a38 100644
--- a/arch/arm/boot/dts/sunxi-common-regulators.dtsi
+++ b/arch/arm/boot/dts/sunxi-common-regulators.dtsi
@@ -72,4 +72,18 @@
72 gpio = <&pio 7 3 0>; 72 gpio = <&pio 7 3 0>;
73 status = "disabled"; 73 status = "disabled";
74 }; 74 };
75
76 reg_vcc3v0: vcc3v0 {
77 compatible = "regulator-fixed";
78 regulator-name = "vcc3v0";
79 regulator-min-microvolt = <3000000>;
80 regulator-max-microvolt = <3000000>;
81 };
82
83 reg_vcc3v3: vcc3v3 {
84 compatible = "regulator-fixed";
85 regulator-name = "vcc3v3";
86 regulator-min-microvolt = <3300000>;
87 regulator-max-microvolt = <3300000>;
88 };
75}; 89};
diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts
index a288a12823ed..5c21d216515a 100644
--- a/arch/arm/boot/dts/tegra114-dalmore.dts
+++ b/arch/arm/boot/dts/tegra114-dalmore.dts
@@ -25,6 +25,7 @@
25 hdmi@54280000 { 25 hdmi@54280000 {
26 status = "okay"; 26 status = "okay";
27 27
28 hdmi-supply = <&vdd_5v0_hdmi>;
28 vdd-supply = <&vdd_hdmi_reg>; 29 vdd-supply = <&vdd_hdmi_reg>;
29 pll-supply = <&palmas_smps3_reg>; 30 pll-supply = <&palmas_smps3_reg>;
30 31
@@ -36,6 +37,8 @@
36 dsi@54300000 { 37 dsi@54300000 {
37 status = "okay"; 38 status = "okay";
38 39
40 avdd-dsi-csi-supply = <&avdd_1v2_reg>;
41
39 panel@0 { 42 panel@0 {
40 compatible = "panasonic,vvx10f004b00", 43 compatible = "panasonic,vvx10f004b00",
41 "simple-panel"; 44 "simple-panel";
@@ -982,12 +985,10 @@
982 regulator-max-microvolt = <2800000>; 985 regulator-max-microvolt = <2800000>;
983 }; 986 };
984 987
985 ldo3 { 988 avdd_1v2_reg: ldo3 {
986 regulator-name = "avdd-dsi-csi"; 989 regulator-name = "avdd-dsi-csi";
987 regulator-min-microvolt = <1200000>; 990 regulator-min-microvolt = <1200000>;
988 regulator-max-microvolt = <1200000>; 991 regulator-max-microvolt = <1200000>;
989 regulator-always-on;
990 regulator-boot-on;
991 }; 992 };
992 993
993 ldo4 { 994 ldo4 {
@@ -1105,6 +1106,7 @@
1105 1106
1106 sdhci@78000400 { 1107 sdhci@78000400 {
1107 cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>; 1108 cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
1109 wp-gpios = <&gpio TEGRA_GPIO(Q, 4) GPIO_ACTIVE_HIGH>;
1108 bus-width = <4>; 1110 bus-width = <4>;
1109 status = "okay"; 1111 status = "okay";
1110 }; 1112 };
@@ -1231,8 +1233,6 @@
1231 regulator-name = "vdd_hdmi_5v0"; 1233 regulator-name = "vdd_hdmi_5v0";
1232 regulator-min-microvolt = <5000000>; 1234 regulator-min-microvolt = <5000000>;
1233 regulator-max-microvolt = <5000000>; 1235 regulator-max-microvolt = <5000000>;
1234 enable-active-high;
1235 gpio = <&gpio TEGRA_GPIO(K, 1) GPIO_ACTIVE_HIGH>;
1236 vin-supply = <&tps65090_dcdc1_reg>; 1236 vin-supply = <&tps65090_dcdc1_reg>;
1237 }; 1237 };
1238 1238
@@ -1245,6 +1245,17 @@
1245 enable-active-high; 1245 enable-active-high;
1246 gpio = <&palmas_gpio 6 0>; 1246 gpio = <&palmas_gpio 6 0>;
1247 }; 1247 };
1248
1249 vdd_5v0_hdmi: regulator@7 {
1250 compatible = "regulator-fixed";
1251 reg = <7>;
1252 regulator-name = "VDD_5V0_HDMI_CON";
1253 regulator-min-microvolt = <5000000>;
1254 regulator-max-microvolt = <5000000>;
1255 gpio = <&gpio TEGRA_GPIO(K, 1) GPIO_ACTIVE_HIGH>;
1256 enable-active-high;
1257 vin-supply = <&tps65090_dcdc1_reg>;
1258 };
1248 }; 1259 };
1249 1260
1250 sound { 1261 sound {
diff --git a/arch/arm/boot/dts/tegra114-roth.dts b/arch/arm/boot/dts/tegra114-roth.dts
new file mode 100644
index 000000000000..0b0e8e07d965
--- /dev/null
+++ b/arch/arm/boot/dts/tegra114-roth.dts
@@ -0,0 +1,1113 @@
1/dts-v1/;
2
3#include <dt-bindings/input/input.h>
4#include "tegra114.dtsi"
5
6/ {
7 model = "NVIDIA SHIELD";
8 compatible = "nvidia,roth", "nvidia,tegra114";
9
10 chosen {
11 /* SHIELD's bootloader's arguments need to be overridden */
12 bootargs = "console=ttyS0,115200n8 console=tty1 gpt fbcon=rotate:1";
13 /* SHIELD's bootloader will place initrd at this address */
14 linux,initrd-start = <0x82000000>;
15 linux,initrd-end = <0x82800000>;
16 };
17
18 firmware {
19 trusted-foundations {
20 compatible = "tlm,trusted-foundations";
21 tlm,version-major = <2>;
22 tlm,version-minor = <8>;
23 };
24 };
25
26 memory {
27 /* memory >= 0x79600000 is reserved for firmware usage */
28 reg = <0x80000000 0x79600000>;
29 };
30
31 pinmux@70000868 {
32 pinctrl-names = "default";
33 pinctrl-0 = <&state_default>;
34
35 state_default: pinmux {
36 clk1_out_pw4 {
37 nvidia,pins = "clk1_out_pw4";
38 nvidia,function = "extperiph1";
39 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
40 nvidia,tristate = <TEGRA_PIN_DISABLE>;
41 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
42 };
43 dap1_din_pn1 {
44 nvidia,pins = "dap1_din_pn1";
45 nvidia,function = "i2s0";
46 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
47 nvidia,tristate = <TEGRA_PIN_ENABLE>;
48 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
49 };
50 dap1_dout_pn2 {
51 nvidia,pins = "dap1_dout_pn2",
52 "dap1_fs_pn0",
53 "dap1_sclk_pn3";
54 nvidia,function = "i2s0";
55 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
56 nvidia,tristate = <TEGRA_PIN_DISABLE>;
57 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
58 };
59 dap2_din_pa4 {
60 nvidia,pins = "dap2_din_pa4";
61 nvidia,function = "i2s1";
62 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
63 nvidia,tristate = <TEGRA_PIN_ENABLE>;
64 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
65 };
66 dap2_dout_pa5 {
67 nvidia,pins = "dap2_dout_pa5",
68 "dap2_fs_pa2",
69 "dap2_sclk_pa3";
70 nvidia,function = "i2s1";
71 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
72 nvidia,tristate = <TEGRA_PIN_DISABLE>;
73 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
74 };
75 dap4_din_pp5 {
76 nvidia,pins = "dap4_din_pp5",
77 "dap4_dout_pp6",
78 "dap4_fs_pp4",
79 "dap4_sclk_pp7";
80 nvidia,function = "i2s3";
81 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
82 nvidia,tristate = <TEGRA_PIN_DISABLE>;
83 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
84 };
85 dvfs_pwm_px0 {
86 nvidia,pins = "dvfs_pwm_px0",
87 "dvfs_clk_px2";
88 nvidia,function = "cldvfs";
89 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
90 nvidia,tristate = <TEGRA_PIN_DISABLE>;
91 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
92 };
93 ulpi_clk_py0 {
94 nvidia,pins = "ulpi_clk_py0",
95 "ulpi_data0_po1",
96 "ulpi_data1_po2",
97 "ulpi_data2_po3",
98 "ulpi_data3_po4",
99 "ulpi_data4_po5",
100 "ulpi_data5_po6",
101 "ulpi_data6_po7",
102 "ulpi_data7_po0";
103 nvidia,function = "ulpi";
104 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
105 nvidia,tristate = <TEGRA_PIN_DISABLE>;
106 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
107 };
108 ulpi_dir_py1 {
109 nvidia,pins = "ulpi_dir_py1",
110 "ulpi_nxt_py2";
111 nvidia,function = "ulpi";
112 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
113 nvidia,tristate = <TEGRA_PIN_ENABLE>;
114 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
115 };
116 ulpi_stp_py3 {
117 nvidia,pins = "ulpi_stp_py3";
118 nvidia,function = "ulpi";
119 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
120 nvidia,tristate = <TEGRA_PIN_DISABLE>;
121 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
122 };
123 cam_i2c_scl_pbb1 {
124 nvidia,pins = "cam_i2c_scl_pbb1",
125 "cam_i2c_sda_pbb2";
126 nvidia,function = "i2c3";
127 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
128 nvidia,tristate = <TEGRA_PIN_DISABLE>;
129 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
130 nvidia,lock = <TEGRA_PIN_DISABLE>;
131 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
132 };
133 cam_mclk_pcc0 {
134 nvidia,pins = "cam_mclk_pcc0",
135 "pbb0";
136 nvidia,function = "vi_alt3";
137 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
138 nvidia,tristate = <TEGRA_PIN_DISABLE>;
139 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
140 nvidia,lock = <TEGRA_PIN_DISABLE>;
141 };
142 pbb4 {
143 nvidia,pins = "pbb4";
144 nvidia,function = "vgp4";
145 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
146 nvidia,tristate = <TEGRA_PIN_DISABLE>;
147 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
148 nvidia,lock = <TEGRA_PIN_DISABLE>;
149 };
150 gen2_i2c_scl_pt5 {
151 nvidia,pins = "gen2_i2c_scl_pt5",
152 "gen2_i2c_sda_pt6";
153 nvidia,function = "i2c2";
154 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
155 nvidia,tristate = <TEGRA_PIN_DISABLE>;
156 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
157 nvidia,lock = <TEGRA_PIN_DISABLE>;
158 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
159 };
160 gmi_a16_pj7 {
161 nvidia,pins = "gmi_a16_pj7",
162 "gmi_a19_pk7";
163 nvidia,function = "uartd";
164 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
165 nvidia,tristate = <TEGRA_PIN_DISABLE>;
166 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
167 };
168 gmi_a17_pb0 {
169 nvidia,pins = "gmi_a17_pb0",
170 "gmi_a18_pb1";
171 nvidia,function = "uartd";
172 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
173 nvidia,tristate = <TEGRA_PIN_ENABLE>;
174 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
175 };
176 gmi_ad5_pg5 {
177 nvidia,pins = "gmi_ad5_pg5",
178 "gmi_wr_n_pi0";
179 nvidia,function = "spi4";
180 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
181 nvidia,tristate = <TEGRA_PIN_DISABLE>;
182 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
183 };
184 gmi_ad6_pg6 {
185 nvidia,pins = "gmi_ad6_pg6",
186 "gmi_ad7_pg7";
187 nvidia,function = "spi4";
188 nvidia,pull = <TEGRA_PIN_PULL_UP>;
189 nvidia,tristate = <TEGRA_PIN_DISABLE>;
190 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
191 };
192 gmi_ad12_ph4 {
193 nvidia,pins = "gmi_ad12_ph4";
194 nvidia,function = "rsvd4";
195 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
196 nvidia,tristate = <TEGRA_PIN_DISABLE>;
197 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
198 };
199 gmi_cs6_n_pi13 {
200 nvidia,pins = "gmi_cs6_n_pi3";
201 nvidia,function = "nand";
202 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
203 nvidia,tristate = <TEGRA_PIN_ENABLE>;
204 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
205 };
206 gmi_ad9_ph1 {
207 nvidia,pins = "gmi_ad9_ph1";
208 nvidia,function = "pwm1";
209 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
210 nvidia,tristate = <TEGRA_PIN_DISABLE>;
211 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
212 };
213 gmi_cs1_n_pj2 {
214 nvidia,pins = "gmi_cs1_n_pj2",
215 "gmi_oe_n_pi1";
216 nvidia,function = "soc";
217 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
218 nvidia,tristate = <TEGRA_PIN_ENABLE>;
219 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
220 };
221 gmi_rst_n_pi4 {
222 nvidia,pins = "gmi_rst_n_pi4";
223 nvidia,function = "gmi";
224 nvidia,pull = <TEGRA_PIN_PULL_UP>;
225 nvidia,tristate = <TEGRA_PIN_DISABLE>;
226 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
227 };
228 gmi_iordy_pi5 {
229 nvidia,pins = "gmi_iordy_pi5";
230 nvidia,function = "gmi";
231 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
232 nvidia,tristate = <TEGRA_PIN_ENABLE>;
233 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
234 };
235 clk2_out_pw5 {
236 nvidia,pins = "clk2_out_pw5";
237 nvidia,function = "extperiph2";
238 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
239 nvidia,tristate = <TEGRA_PIN_DISABLE>;
240 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
241 };
242 sdmmc1_clk_pz0 {
243 nvidia,pins = "sdmmc1_clk_pz0";
244 nvidia,function = "sdmmc1";
245 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
246 nvidia,tristate = <TEGRA_PIN_DISABLE>;
247 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
248 };
249 sdmmc1_cmd_pz1 {
250 nvidia,pins = "sdmmc1_cmd_pz1",
251 "sdmmc1_dat0_py7",
252 "sdmmc1_dat1_py6",
253 "sdmmc1_dat2_py5",
254 "sdmmc1_dat3_py4";
255 nvidia,function = "sdmmc1";
256 nvidia,pull = <TEGRA_PIN_PULL_UP>;
257 nvidia,tristate = <TEGRA_PIN_DISABLE>;
258 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
259 };
260 sdmmc3_clk_pa6 {
261 nvidia,pins = "sdmmc3_clk_pa6";
262 nvidia,function = "sdmmc3";
263 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
264 nvidia,tristate = <TEGRA_PIN_DISABLE>;
265 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
266 };
267 sdmmc3_cmd_pa7 {
268 nvidia,pins = "sdmmc3_cmd_pa7",
269 "sdmmc3_dat0_pb7",
270 "sdmmc3_dat1_pb6",
271 "sdmmc3_dat2_pb5",
272 "sdmmc3_dat3_pb4",
273 "sdmmc3_cd_n_pv2",
274 "sdmmc3_clk_lb_out_pee4",
275 "sdmmc3_clk_lb_in_pee5";
276 nvidia,function = "sdmmc3";
277 nvidia,pull = <TEGRA_PIN_PULL_UP>;
278 nvidia,tristate = <TEGRA_PIN_DISABLE>;
279 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
280 };
281 kb_col4_pq4 {
282 nvidia,pins = "kb_col4_pq4";
283 nvidia,function = "sdmmc3";
284 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
285 nvidia,tristate = <TEGRA_PIN_ENABLE>;
286 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
287 };
288 sdmmc4_clk_pcc4 {
289 nvidia,pins = "sdmmc4_clk_pcc4";
290 nvidia,function = "sdmmc4";
291 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
292 nvidia,tristate = <TEGRA_PIN_DISABLE>;
293 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
294 };
295 sdmmc4_cmd_pt7 {
296 nvidia,pins = "sdmmc4_cmd_pt7",
297 "sdmmc4_dat0_paa0",
298 "sdmmc4_dat1_paa1",
299 "sdmmc4_dat2_paa2",
300 "sdmmc4_dat3_paa3",
301 "sdmmc4_dat4_paa4",
302 "sdmmc4_dat5_paa5",
303 "sdmmc4_dat6_paa6",
304 "sdmmc4_dat7_paa7";
305 nvidia,function = "sdmmc4";
306 nvidia,pull = <TEGRA_PIN_PULL_UP>;
307 nvidia,tristate = <TEGRA_PIN_DISABLE>;
308 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
309 };
310 clk_32k_out_pa0 {
311 nvidia,pins = "clk_32k_out_pa0";
312 nvidia,function = "blink";
313 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
314 nvidia,tristate = <TEGRA_PIN_DISABLE>;
315 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
316 };
317 kb_col0_pq0 {
318 nvidia,pins = "kb_col0_pq0",
319 "kb_col1_pq1",
320 "kb_col2_pq2",
321 "kb_row0_pr0",
322 "kb_row1_pr1",
323 "kb_row2_pr2",
324 "kb_row8_ps0";
325 nvidia,function = "kbc";
326 nvidia,pull = <TEGRA_PIN_PULL_UP>;
327 nvidia,tristate = <TEGRA_PIN_DISABLE>;
328 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
329 };
330 kb_row7_pr7 {
331 nvidia,pins = "kb_row7_pr7";
332 nvidia,function = "rsvd2";
333 nvidia,pull = <TEGRA_PIN_PULL_UP>;
334 nvidia,tristate = <TEGRA_PIN_DISABLE>;
335 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
336 };
337 kb_row10_ps2 {
338 nvidia,pins = "kb_row10_ps2";
339 nvidia,function = "uarta";
340 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
341 nvidia,tristate = <TEGRA_PIN_ENABLE>;
342 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
343 };
344 kb_row9_ps1 {
345 nvidia,pins = "kb_row9_ps1";
346 nvidia,function = "uarta";
347 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
348 nvidia,tristate = <TEGRA_PIN_DISABLE>;
349 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
350 };
351 pwr_i2c_scl_pz6 {
352 nvidia,pins = "pwr_i2c_scl_pz6",
353 "pwr_i2c_sda_pz7";
354 nvidia,function = "i2cpwr";
355 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
356 nvidia,tristate = <TEGRA_PIN_DISABLE>;
357 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
358 nvidia,lock = <TEGRA_PIN_DISABLE>;
359 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
360 };
361 sys_clk_req_pz5 {
362 nvidia,pins = "sys_clk_req_pz5";
363 nvidia,function = "sysclk";
364 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
365 nvidia,tristate = <TEGRA_PIN_DISABLE>;
366 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
367 };
368 core_pwr_req {
369 nvidia,pins = "core_pwr_req";
370 nvidia,function = "pwron";
371 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
372 nvidia,tristate = <TEGRA_PIN_DISABLE>;
373 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
374 };
375 cpu_pwr_req {
376 nvidia,pins = "cpu_pwr_req";
377 nvidia,function = "cpu";
378 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
379 nvidia,tristate = <TEGRA_PIN_DISABLE>;
380 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
381 };
382 pwr_int_n {
383 nvidia,pins = "pwr_int_n";
384 nvidia,function = "pmi";
385 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
386 nvidia,tristate = <TEGRA_PIN_ENABLE>;
387 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
388 };
389 reset_out_n {
390 nvidia,pins = "reset_out_n";
391 nvidia,function = "reset_out_n";
392 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
393 nvidia,tristate = <TEGRA_PIN_DISABLE>;
394 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
395 };
396 clk3_out_pee0 {
397 nvidia,pins = "clk3_out_pee0";
398 nvidia,function = "extperiph3";
399 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
400 nvidia,tristate = <TEGRA_PIN_DISABLE>;
401 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
402 };
403 gen1_i2c_scl_pc4 {
404 nvidia,pins = "gen1_i2c_scl_pc4",
405 "gen1_i2c_sda_pc5";
406 nvidia,function = "i2c1";
407 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
408 nvidia,tristate = <TEGRA_PIN_DISABLE>;
409 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
410 nvidia,lock = <TEGRA_PIN_DISABLE>;
411 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
412 };
413 uart2_cts_n_pj5 {
414 nvidia,pins = "uart2_cts_n_pj5";
415 nvidia,function = "uartb";
416 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
417 nvidia,tristate = <TEGRA_PIN_ENABLE>;
418 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
419 };
420 uart2_rts_n_pj6 {
421 nvidia,pins = "uart2_rts_n_pj6";
422 nvidia,function = "uartb";
423 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
424 nvidia,tristate = <TEGRA_PIN_DISABLE>;
425 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
426 };
427 uart2_rxd_pc3 {
428 nvidia,pins = "uart2_rxd_pc3";
429 nvidia,function = "irda";
430 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
431 nvidia,tristate = <TEGRA_PIN_ENABLE>;
432 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
433 };
434 uart2_txd_pc2 {
435 nvidia,pins = "uart2_txd_pc2";
436 nvidia,function = "irda";
437 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
438 nvidia,tristate = <TEGRA_PIN_DISABLE>;
439 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
440 };
441 uart3_cts_n_pa1 {
442 nvidia,pins = "uart3_cts_n_pa1",
443 "uart3_rxd_pw7";
444 nvidia,function = "uartc";
445 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
446 nvidia,tristate = <TEGRA_PIN_ENABLE>;
447 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
448 };
449 uart3_rts_n_pc0 {
450 nvidia,pins = "uart3_rts_n_pc0",
451 "uart3_txd_pw6";
452 nvidia,function = "uartc";
453 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
454 nvidia,tristate = <TEGRA_PIN_DISABLE>;
455 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
456 };
457 owr {
458 nvidia,pins = "owr";
459 nvidia,function = "owr";
460 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
461 nvidia,tristate = <TEGRA_PIN_DISABLE>;
462 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
463 };
464 hdmi_cec_pee3 {
465 nvidia,pins = "hdmi_cec_pee3";
466 nvidia,function = "cec";
467 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
468 nvidia,tristate = <TEGRA_PIN_DISABLE>;
469 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
470 nvidia,lock = <TEGRA_PIN_DISABLE>;
471 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
472 };
473 ddc_scl_pv4 {
474 nvidia,pins = "ddc_scl_pv4",
475 "ddc_sda_pv5";
476 nvidia,function = "i2c4";
477 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
478 nvidia,tristate = <TEGRA_PIN_DISABLE>;
479 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
480 nvidia,lock = <TEGRA_PIN_DISABLE>;
481 nvidia,rcv-sel = <TEGRA_PIN_ENABLE>;
482 };
483 spdif_in_pk6 {
484 nvidia,pins = "spdif_in_pk6";
485 nvidia,function = "usb";
486 nvidia,pull = <TEGRA_PIN_PULL_UP>;
487 nvidia,tristate = <TEGRA_PIN_DISABLE>;
488 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
489 nvidia,lock = <TEGRA_PIN_DISABLE>;
490 };
491 usb_vbus_en0_pn4 {
492 nvidia,pins = "usb_vbus_en0_pn4";
493 nvidia,function = "usb";
494 nvidia,pull = <TEGRA_PIN_PULL_UP>;
495 nvidia,tristate = <TEGRA_PIN_DISABLE>;
496 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
497 nvidia,lock = <TEGRA_PIN_DISABLE>;
498 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
499 };
500 gpio_x6_aud_px6 {
501 nvidia,pins = "gpio_x6_aud_px6";
502 nvidia,function = "spi6";
503 nvidia,pull = <TEGRA_PIN_PULL_UP>;
504 nvidia,tristate = <TEGRA_PIN_ENABLE>;
505 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
506 };
507 gpio_x1_aud_px1 {
508 nvidia,pins = "gpio_x1_aud_px1";
509 nvidia,function = "rsvd2";
510 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
511 nvidia,tristate = <TEGRA_PIN_DISABLE>;
512 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
513 };
514 gpio_x7_aud_px7 {
515 nvidia,pins = "gpio_x7_aud_px7";
516 nvidia,function = "rsvd1";
517 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
518 nvidia,tristate = <TEGRA_PIN_DISABLE>;
519 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
520 };
521 gmi_adv_n_pk0 {
522 nvidia,pins = "gmi_adv_n_pk0";
523 nvidia,function = "gmi";
524 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
525 nvidia,tristate = <TEGRA_PIN_ENABLE>;
526 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
527 };
528 gmi_cs0_n_pj0 {
529 nvidia,pins = "gmi_cs0_n_pj0";
530 nvidia,function = "gmi";
531 nvidia,pull = <TEGRA_PIN_PULL_UP>;
532 nvidia,tristate = <TEGRA_PIN_DISABLE>;
533 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
534 };
535 pu3 {
536 nvidia,pins = "pu3";
537 nvidia,function = "pwm0";
538 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
539 nvidia,tristate = <TEGRA_PIN_DISABLE>;
540 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
541 };
542 gpio_x4_aud_px4 {
543 nvidia,pins = "gpio_x4_aud_px4",
544 "gpio_x5_aud_px5";
545 nvidia,function = "rsvd1";
546 nvidia,pull = <TEGRA_PIN_PULL_UP>;
547 nvidia,tristate = <TEGRA_PIN_DISABLE>;
548 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
549 };
550 gpio_x3_aud_px3 {
551 nvidia,pins = "gpio_x3_aud_px3";
552 nvidia,function = "rsvd4";
553 nvidia,pull = <TEGRA_PIN_PULL_UP>;
554 nvidia,tristate = <TEGRA_PIN_DISABLE>;
555 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
556 };
557 gpio_w2_aud_pw2 {
558 nvidia,pins = "gpio_w2_aud_pw2";
559 nvidia,function = "rsvd2";
560 nvidia,pull = <TEGRA_PIN_PULL_UP>;
561 nvidia,tristate = <TEGRA_PIN_DISABLE>;
562 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
563 };
564 gpio_w3_aud_pw3 {
565 nvidia,pins = "gpio_w3_aud_pw3";
566 nvidia,function = "spi6";
567 nvidia,pull = <TEGRA_PIN_PULL_UP>;
568 nvidia,tristate = <TEGRA_PIN_DISABLE>;
569 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
570 };
571 dap3_fs_pp0 {
572 nvidia,pins = "dap3_fs_pp0",
573 "dap3_din_pp1",
574 "dap3_dout_pp2",
575 "dap3_sclk_pp3";
576 nvidia,function = "i2s2";
577 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
578 nvidia,tristate = <TEGRA_PIN_DISABLE>;
579 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
580 };
581 pv0 {
582 nvidia,pins = "pv0";
583 nvidia,function = "rsvd4";
584 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
585 nvidia,tristate = <TEGRA_PIN_DISABLE>;
586 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
587 };
588 pv1 {
589 nvidia,pins = "pv1";
590 nvidia,function = "rsvd1";
591 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
592 nvidia,tristate = <TEGRA_PIN_DISABLE>;
593 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
594 };
595 pbb3 {
596 nvidia,pins = "pbb3",
597 "pbb5",
598 "pbb6",
599 "pbb7";
600 nvidia,function = "rsvd4";
601 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
602 nvidia,tristate = <TEGRA_PIN_DISABLE>;
603 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
604 };
605 pcc1 {
606 nvidia,pins = "pcc1",
607 "pcc2";
608 nvidia,function = "rsvd4";
609 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
610 nvidia,tristate = <TEGRA_PIN_DISABLE>;
611 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
612 };
613 gmi_ad0_pg0 {
614 nvidia,pins = "gmi_ad0_pg0",
615 "gmi_ad1_pg1";
616 nvidia,function = "gmi";
617 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
618 nvidia,tristate = <TEGRA_PIN_DISABLE>;
619 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
620 };
621 gmi_ad10_ph2 {
622 nvidia,pins = "gmi_ad10_ph2",
623 "gmi_ad12_ph4",
624 "gmi_ad15_ph7",
625 "gmi_cs3_n_pk4";
626 nvidia,function = "gmi";
627 nvidia,pull = <TEGRA_PIN_PULL_UP>;
628 nvidia,tristate = <TEGRA_PIN_DISABLE>;
629 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
630 };
631 gmi_ad11_ph3 {
632 nvidia,pins = "gmi_ad11_ph3",
633 "gmi_ad13_ph5",
634 "gmi_ad8_ph0",
635 "gmi_clk_pk1",
636 "gmi_cs2_n_pk3";
637 nvidia,function = "gmi";
638 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
639 nvidia,tristate = <TEGRA_PIN_DISABLE>;
640 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
641 };
642 gmi_ad14_ph6 {
643 nvidia,pins = "gmi_ad14_ph6",
644 "gmi_cs0_n_pj0",
645 "gmi_cs4_n_pk2",
646 "gmi_cs7_n_pi6",
647 "gmi_dqs_p_pj3",
648 "gmi_wp_n_pc7";
649 nvidia,function = "gmi";
650 nvidia,pull = <TEGRA_PIN_PULL_UP>;
651 nvidia,tristate = <TEGRA_PIN_DISABLE>;
652 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
653 };
654 gmi_ad2_pg2 {
655 nvidia,pins = "gmi_ad2_pg2",
656 "gmi_ad3_pg3";
657 nvidia,function = "gmi";
658 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
659 nvidia,tristate = <TEGRA_PIN_DISABLE>;
660 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
661 };
662 sdmmc1_wp_n_pv3 {
663 nvidia,pins = "sdmmc1_wp_n_pv3";
664 nvidia,function = "spi4";
665 nvidia,pull = <TEGRA_PIN_PULL_UP>;
666 nvidia,tristate = <TEGRA_PIN_DISABLE>;
667 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
668 };
669 clk2_req_pcc5 {
670 nvidia,pins = "clk2_req_pcc5";
671 nvidia,function = "rsvd4";
672 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
673 nvidia,tristate = <TEGRA_PIN_DISABLE>;
674 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
675 };
676 kb_col3_pq3 {
677 nvidia,pins = "kb_col3_pq3";
678 nvidia,function = "pwm2";
679 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
680 nvidia,tristate = <TEGRA_PIN_DISABLE>;
681 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
682 };
683 kb_col5_pq5 {
684 nvidia,pins = "kb_col5_pq5";
685 nvidia,function = "kbc";
686 nvidia,pull = <TEGRA_PIN_PULL_UP>;
687 nvidia,tristate = <TEGRA_PIN_DISABLE>;
688 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
689 };
690 kb_col6_pq6 {
691 nvidia,pins = "kb_col6_pq6",
692 "kb_col7_pq7";
693 nvidia,function = "kbc";
694 nvidia,pull = <TEGRA_PIN_PULL_UP>;
695 nvidia,tristate = <TEGRA_PIN_DISABLE>;
696 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
697 };
698 kb_row3_pr3 {
699 nvidia,pins = "kb_row3_pr3",
700 "kb_row4_pr4",
701 "kb_row6_pr6";
702 nvidia,function = "kbc";
703 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
704 nvidia,tristate = <TEGRA_PIN_DISABLE>;
705 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
706 };
707 clk3_req_pee1 {
708 nvidia,pins = "clk3_req_pee1";
709 nvidia,function = "rsvd4";
710 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
711 nvidia,tristate = <TEGRA_PIN_DISABLE>;
712 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
713 };
714 pu2 {
715 nvidia,pins = "pu2";
716 nvidia,function = "rsvd1";
717 nvidia,pull = <TEGRA_PIN_PULL_UP>;
718 nvidia,tristate = <TEGRA_PIN_DISABLE>;
719 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
720 };
721 hdmi_int_pn7 {
722 nvidia,pins = "hdmi_int_pn7";
723 nvidia,function = "rsvd1";
724 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
725 nvidia,tristate = <TEGRA_PIN_DISABLE>;
726 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
727 };
728
729 drive_sdio1 {
730 nvidia,pins = "drive_sdio1";
731 nvidia,high-speed-mode = <TEGRA_PIN_ENABLE>;
732 nvidia,schmitt = <TEGRA_PIN_DISABLE>;
733 nvidia,low-power-mode = <TEGRA_PIN_LP_DRIVE_DIV_1>;
734 nvidia,pull-down-strength = <36>;
735 nvidia,pull-up-strength = <20>;
736 nvidia,slew-rate-rising = <TEGRA_PIN_SLEW_RATE_SLOW>;
737 nvidia,slew-rate-falling = <TEGRA_PIN_SLEW_RATE_SLOW>;
738 };
739 drive_sdio3 {
740 nvidia,pins = "drive_sdio3";
741 nvidia,high-speed-mode = <TEGRA_PIN_ENABLE>;
742 nvidia,schmitt = <TEGRA_PIN_DISABLE>;
743 nvidia,low-power-mode = <TEGRA_PIN_LP_DRIVE_DIV_1>;
744 nvidia,pull-down-strength = <36>;
745 nvidia,pull-up-strength = <20>;
746 nvidia,slew-rate-rising = <TEGRA_PIN_SLEW_RATE_FASTEST>;
747 nvidia,slew-rate-falling = <TEGRA_PIN_SLEW_RATE_FASTEST>;
748 };
749 drive_gma {
750 nvidia,pins = "drive_gma";
751 nvidia,high-speed-mode = <TEGRA_PIN_ENABLE>;
752 nvidia,schmitt = <TEGRA_PIN_DISABLE>;
753 nvidia,low-power-mode = <TEGRA_PIN_LP_DRIVE_DIV_1>;
754 nvidia,pull-down-strength = <2>;
755 nvidia,pull-up-strength = <2>;
756 nvidia,slew-rate-rising = <TEGRA_PIN_SLEW_RATE_FASTEST>;
757 nvidia,slew-rate-falling = <TEGRA_PIN_SLEW_RATE_FASTEST>;
758 nvidia,drive-type = <1>;
759 };
760 };
761 };
762
763 /* Usable on reworked devices only */
764 serial@70006300 {
765 status = "okay";
766 };
767
768 pwm@7000a000 {
769 status = "okay";
770 };
771
772 i2c@7000d000 {
773 status = "okay";
774 clock-frequency = <400000>;
775
776 regulator@43 {
777 compatible = "ti,tps51632";
778 reg = <0x43>;
779 regulator-name = "vdd-cpu";
780 regulator-min-microvolt = <500000>;
781 regulator-max-microvolt = <1520000>;
782 regulator-always-on;
783 regulator-boot-on;
784 };
785
786 palmas: pmic@58 {
787 compatible = "ti,palmas";
788 reg = <0x58>;
789 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_LOW>;
790
791 #interrupt-cells = <2>;
792 interrupt-controller;
793
794 ti,system-power-controller;
795
796 palmas_gpio: gpio {
797 compatible = "ti,palmas-gpio";
798 gpio-controller;
799 #gpio-cells = <2>;
800 };
801
802 pmic {
803 compatible = "ti,tps65913-pmic", "ti,palmas-pmic";
804
805 regulators {
806 smps12 {
807 regulator-name = "vdd-ddr";
808 regulator-min-microvolt = <1200000>;
809 regulator-max-microvolt = <1500000>;
810 regulator-always-on;
811 regulator-boot-on;
812 };
813
814 vdd_1v8: smps3 {
815 regulator-name = "vdd-1v8";
816 regulator-min-microvolt = <1800000>;
817 regulator-max-microvolt = <1800000>;
818 regulator-always-on;
819 regulator-boot-on;
820 };
821
822 smps457 {
823 regulator-name = "vdd-soc";
824 regulator-min-microvolt = <900000>;
825 regulator-max-microvolt = <1400000>;
826 regulator-always-on;
827 regulator-boot-on;
828 };
829
830 smps8 {
831 regulator-name = "avdd-pll-1v05";
832 regulator-min-microvolt = <1050000>;
833 regulator-max-microvolt = <1050000>;
834 regulator-always-on;
835 regulator-boot-on;
836 };
837
838 smps9 {
839 regulator-name = "vdd-2v85-emmc";
840 regulator-min-microvolt = <2800000>;
841 regulator-max-microvolt = <2800000>;
842 regulator-always-on;
843 };
844
845 smps10_out1 {
846 regulator-name = "vdd-fan";
847 regulator-min-microvolt = <5000000>;
848 regulator-max-microvolt = <5000000>;
849 regulator-always-on;
850 regulator-boot-on;
851 };
852
853 smps10_out2 {
854 regulator-name = "vdd-5v0-sys";
855 regulator-min-microvolt = <5000000>;
856 regulator-max-microvolt = <5000000>;
857 regulator-always-on;
858 regulator-boot-on;
859 };
860
861 ldo2 {
862 regulator-name = "vdd-2v8-display";
863 regulator-min-microvolt = <2800000>;
864 regulator-max-microvolt = <2800000>;
865 regulator-boot-on;
866 };
867
868 ldo3 {
869 regulator-name = "avdd-1v2";
870 regulator-min-microvolt = <1200000>;
871 regulator-max-microvolt = <1200000>;
872 regulator-always-on;
873 regulator-boot-on;
874 };
875
876 ldo4 {
877 regulator-name = "vpp-fuse";
878 regulator-min-microvolt = <1800000>;
879 regulator-max-microvolt = <1800000>;
880 };
881
882 ldo5 {
883 regulator-name = "avdd-hdmi-pll";
884 regulator-min-microvolt = <1200000>;
885 regulator-max-microvolt = <1200000>;
886 };
887
888 ldo6 {
889 regulator-name = "vdd-sensor-2v8";
890 regulator-min-microvolt = <2850000>;
891 regulator-max-microvolt = <2850000>;
892 };
893
894 ldo8 {
895 regulator-name = "vdd-rtc";
896 regulator-min-microvolt = <1100000>;
897 regulator-max-microvolt = <1100000>;
898 regulator-always-on;
899 regulator-boot-on;
900 ti,enable-ldo8-tracking;
901 };
902
903 vddio_sdmmc3: ldo9 {
904 regulator-name = "vddio-sdmmc3";
905 regulator-min-microvolt = <1800000>;
906 regulator-max-microvolt = <3300000>;
907 regulator-always-on;
908 regulator-boot-on;
909 };
910
911 ldousb {
912 regulator-name = "avdd-usb-hdmi";
913 regulator-min-microvolt = <3300000>;
914 regulator-max-microvolt = <3300000>;
915 regulator-always-on;
916 regulator-boot-on;
917 };
918
919 vdd_3v3_sys: regen1 {
920 regulator-name = "rail-3v3";
921 regulator-max-microvolt = <3300000>;
922 regulator-always-on;
923 regulator-boot-on;
924 };
925
926 regen2 {
927 regulator-name = "rail-5v0";
928 regulator-max-microvolt = <5000000>;
929 regulator-always-on;
930 regulator-boot-on;
931 };
932
933 };
934 };
935
936 rtc {
937 compatible = "ti,palmas-rtc";
938 interrupt-parent = <&palmas>;
939 interrupts = <8 0>;
940 };
941
942 };
943 };
944
945 pmc@7000e400 {
946 nvidia,invert-interrupt;
947 };
948
949 /* SD card */
950 sdhci@78000400 {
951 status = "okay";
952 bus-width = <4>;
953 vmmc-supply = <&vddio_sdmmc3>;
954 cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
955 power-gpios = <&gpio TEGRA_GPIO(H, 0) GPIO_ACTIVE_HIGH>;
956 };
957
958 /* eMMC */
959 sdhci@78000600 {
960 status = "okay";
961 bus-width = <8>;
962 vmmc-supply = <&vdd_1v8>;
963 non-removable;
964 };
965
966 /* External USB port (must be powered) */
967 usb@7d000000 {
968 status = "okay";
969 };
970
971 usb-phy@7d000000 {
972 status = "okay";
973 nvidia,xcvr-setup = <7>;
974 nvidia,xcvr-lsfslew = <2>;
975 nvidia,xcvr-lsrslew = <2>;
976 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
977 /* Should be changed to "otg" once we have vbus_supply */
978 /* As of now, USB devices need to be powered externally */
979 dr_mode = "host";
980 };
981
982 /* SHIELD controller */
983 usb@7d008000 {
984 status = "okay";
985 };
986
987 usb-phy@7d008000 {
988 status = "okay";
989 nvidia,xcvr-setup = <7>;
990 nvidia,xcvr-lsfslew = <2>;
991 nvidia,xcvr-lsrslew = <2>;
992 };
993
994 backlight: backlight {
995 compatible = "pwm-backlight";
996 pwms = <&pwm 1 40000>;
997
998 brightness-levels = <0 4 8 16 32 64 128 255>;
999 default-brightness-level = <6>;
1000
1001 power-supply = <&lcd_bl_en>;
1002 enable-gpios = <&gpio TEGRA_GPIO(H, 2) GPIO_ACTIVE_HIGH>;
1003 };
1004
1005 clocks {
1006 compatible = "simple-bus";
1007 #address-cells = <1>;
1008 #size-cells = <0>;
1009
1010 clk32k_in: clock {
1011 compatible = "fixed-clock";
1012 reg=<0>;
1013 #clock-cells = <0>;
1014 clock-frequency = <32768>;
1015 };
1016 };
1017
1018 gpio-keys {
1019 compatible = "gpio-keys";
1020
1021 back {
1022 label = "Back";
1023 gpios = <&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_LOW>;
1024 linux,code = <KEY_BACK>;
1025 };
1026
1027 home {
1028 label = "Home";
1029 gpios = <&gpio TEGRA_GPIO(R, 1) GPIO_ACTIVE_LOW>;
1030 linux,code = <KEY_HOME>;
1031 };
1032
1033 power {
1034 label = "Power";
1035 gpios = <&gpio TEGRA_GPIO(Q, 0) GPIO_ACTIVE_LOW>;
1036 linux,code = <KEY_POWER>;
1037 gpio-key,wakeup;
1038 };
1039 };
1040
1041 regulators {
1042 compatible = "simple-bus";
1043 #address-cells = <1>;
1044 #size-cells = <0>;
1045
1046 lcd_bl_en: regulator@0 {
1047 compatible = "regulator-fixed";
1048 reg = <0>;
1049 regulator-name = "lcd_bl_en";
1050 regulator-min-microvolt = <5000000>;
1051 regulator-max-microvolt = <5000000>;
1052 regulator-boot-on;
1053 };
1054
1055 regulator@1 {
1056 compatible = "regulator-fixed";
1057 reg = <1>;
1058 regulator-name = "vdd_lcd_1v8";
1059 regulator-min-microvolt = <1800000>;
1060 regulator-max-microvolt = <1800000>;
1061 vin-supply = <&vdd_1v8>;
1062 enable-active-high;
1063 gpio = <&gpio TEGRA_GPIO(U, 4) GPIO_ACTIVE_HIGH>;
1064 regulator-boot-on;
1065 };
1066
1067 regulator@2 {
1068 compatible = "regulator-fixed";
1069 reg = <2>;
1070 regulator-name = "vdd_1v8_ts";
1071 regulator-min-microvolt = <1800000>;
1072 regulator-max-microvolt = <1800000>;
1073 gpio = <&gpio TEGRA_GPIO(K, 3) GPIO_ACTIVE_LOW>;
1074 regulator-boot-on;
1075 };
1076
1077 regulator@3 {
1078 compatible = "regulator-fixed";
1079 reg = <3>;
1080 regulator-name = "vdd_3v3_ts";
1081 regulator-min-microvolt = <3300000>;
1082 regulator-max-microvolt = <3300000>;
1083 enable-active-high;
1084 gpio = <&gpio TEGRA_GPIO(H, 5) GPIO_ACTIVE_HIGH>;
1085 regulator-boot-on;
1086 };
1087
1088 regulator@4 {
1089 compatible = "regulator-fixed";
1090 reg = <4>;
1091 regulator-name = "vdd_1v8_com";
1092 regulator-min-microvolt = <1800000>;
1093 regulator-max-microvolt = <1800000>;
1094 vin-supply = <&vdd_1v8>;
1095 enable-active-high;
1096 gpio = <&gpio TEGRA_GPIO(X, 1) GPIO_ACTIVE_HIGH>;
1097 regulator-boot-on;
1098 };
1099
1100 regulator@5 {
1101 compatible = "regulator-fixed";
1102 reg = <5>;
1103 regulator-name = "vdd_3v3_com";
1104 regulator-min-microvolt = <3300000>;
1105 regulator-max-microvolt = <3300000>;
1106 vin-supply = <&vdd_3v3_sys>;
1107 enable-active-high;
1108 gpio = <&gpio TEGRA_GPIO(X, 7) GPIO_ACTIVE_HIGH>;
1109 regulator-always-on;
1110 regulator-boot-on;
1111 };
1112 };
1113};
diff --git a/arch/arm/boot/dts/tegra114-tn7.dts b/arch/arm/boot/dts/tegra114-tn7.dts
new file mode 100644
index 000000000000..963662145635
--- /dev/null
+++ b/arch/arm/boot/dts/tegra114-tn7.dts
@@ -0,0 +1,348 @@
1/dts-v1/;
2
3#include <dt-bindings/input/input.h>
4#include "tegra114.dtsi"
5
6/ {
7 model = "Tegra Note 7";
8 compatible = "nvidia,tn7", "nvidia,tegra114";
9
10 chosen {
11 /* TN7's bootloader's arguments need to be overridden */
12 bootargs = "console=ttyS0,115200n8 console=tty1 gpt fbcon=rotate:2";
13 /* TN7's bootloader will place initrd at this address */
14 linux,initrd-start = <0x82000000>;
15 linux,initrd-end = <0x82800000>;
16 };
17
18 firmware {
19 trusted-foundations {
20 compatible = "tlm,trusted-foundations";
21 tlm,version-major = <2>;
22 tlm,version-minor = <8>;
23 };
24 };
25
26 memory {
27 /* memory >= 0x37e00000 is reserved for firmware usage */
28 reg = <0x80000000 0x37e00000>;
29 };
30
31 host1x@50000000 {
32 dsi@54300000 {
33 status = "okay";
34
35 vdd-supply = <&vdd_1v2_ap>;
36
37 panel@0 {
38 compatible = "lg,ld070wx3-sl01";
39 reg = <0>;
40
41 power-supply = <&vdd_lcd>;
42 backlight = <&backlight>;
43 };
44 };
45 };
46
47 serial@70006300 {
48 status = "okay";
49 };
50
51 pwm@7000a000 {
52 status = "okay";
53 };
54
55 i2c@7000d000 {
56 status = "okay";
57 clock-frequency = <400000>;
58
59 palmas: pmic@58 {
60 compatible = "ti,palmas";
61 reg = <0x58>;
62 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_LOW>;
63
64 #interrupt-cells = <2>;
65 interrupt-controller;
66
67 ti,system-power-controller;
68
69 palmas_gpio: gpio {
70 compatible = "ti,palmas-gpio";
71 gpio-controller;
72 #gpio-cells = <2>;
73 };
74
75 pmic {
76 compatible = "ti,tps65913-pmic", "ti,palmas-pmic";
77
78 ldoln-in-supply = <&vdd_smps10_out2>;
79
80 regulators {
81 smps123 {
82 regulator-name = "vd-cpu";
83 regulator-min-microvolt = <1000000>;
84 regulator-max-microvolt = <1000000>;
85 regulator-always-on;
86 regulator-boot-on;
87 };
88
89 smps45 {
90 regulator-name = "vd-soc";
91 regulator-min-microvolt = <1100000>;
92 regulator-max-microvolt = <1100000>;
93 regulator-always-on;
94 regulator-boot-on;
95 };
96
97 smps6 {
98 regulator-name = "va-lcd-hv";
99 regulator-min-microvolt = <3000000>;
100 regulator-max-microvolt = <3000000>;
101 regulator-always-on;
102 regulator-boot-on;
103 };
104
105 smps7 {
106 regulator-name = "vd-ddr";
107 regulator-min-microvolt = <1350000>;
108 regulator-max-microvolt = <1350000>;
109 regulator-always-on;
110 regulator-boot-on;
111 };
112
113 vdd_1v8: smps8 {
114 regulator-name = "vs-pmu-1v8";
115 regulator-min-microvolt = <1800000>;
116 regulator-max-microvolt = <1800000>;
117 regulator-always-on;
118 regulator-boot-on;
119 };
120
121 vdd_2v9_sys: smps9 {
122 regulator-name = "vs-sys-2v9";
123 regulator-min-microvolt = <2900000>;
124 regulator-max-microvolt = <2900000>;
125 regulator-always-on;
126 regulator-boot-on;
127 };
128
129 vdd_smps10_out1: smps10_out1 {
130 regulator-name = "vd-smps10-out1";
131 regulator-min-microvolt = <5000000>;
132 regulator-max-microvolt = <5000000>;
133 regulator-always-on;
134 regulator-boot-on;
135 };
136
137 vdd_smps10_out2: smps10_out2 {
138 regulator-name = "vd-smps10-out2";
139 regulator-min-microvolt = <5000000>;
140 regulator-max-microvolt = <5000000>;
141 regulator-always-on;
142 regulator-boot-on;
143 };
144
145 ldo1 {
146 regulator-name = "va-pllx";
147 regulator-min-microvolt = <1050000>;
148 regulator-max-microvolt = <1050000>;
149 regulator-always-on;
150 regulator-boot-on;
151 };
152
153 vdd_1v2_ap: ldo2 {
154 regulator-name = "va-ap-1v2";
155 regulator-min-microvolt = <1200000>;
156 regulator-max-microvolt = <1200000>;
157 regulator-always-on;
158 regulator-boot-on;
159 };
160
161 ldo3 {
162 regulator-name = "vd-fuse";
163 regulator-min-microvolt = <1800000>;
164 regulator-max-microvolt = <1800000>;
165 regulator-always-on;
166 regulator-boot-on;
167 };
168
169 ldo4 {
170 regulator-name = "vd-ts-hv";
171 regulator-min-microvolt = <3200000>;
172 regulator-max-microvolt = <3200000>;
173 regulator-always-on;
174 regulator-boot-on;
175 };
176
177 ldo5 {
178 regulator-name = "va-cam2-hv";
179 regulator-min-microvolt = <2700000>;
180 regulator-max-microvolt = <2700000>;
181 };
182
183 ldo6 {
184 regulator-name = "va-sns-hv";
185 regulator-min-microvolt = <2850000>;
186 regulator-max-microvolt = <2850000>;
187 };
188
189 ldo7 {
190 regulator-name = "va-cam1-hv";
191 regulator-min-microvolt = <2700000>;
192 regulator-max-microvolt = <2700000>;
193 };
194
195 ldo8 {
196 regulator-name = "va-ap-rtc";
197 regulator-min-microvolt = <1100000>;
198 regulator-max-microvolt = <1100000>;
199 ti,enable-ldo8-tracking;
200 regulator-always-on;
201 regulator-boot-on;
202 };
203
204 ldo9 {
205 regulator-name = "vi-sdcard";
206 regulator-min-microvolt = <2900000>;
207 regulator-max-microvolt = <2900000>;
208 };
209
210 ldousb {
211 regulator-name = "avdd-usb";
212 regulator-min-microvolt = <3300000>;
213 regulator-max-microvolt = <3300000>;
214 regulator-always-on;
215 regulator-boot-on;
216 };
217
218 ldoln {
219 regulator-name = "va-hdmi";
220 regulator-min-microvolt = <3300000>;
221 regulator-max-microvolt = <3300000>;
222 };
223 };
224 };
225
226 rtc {
227 compatible = "ti,palmas-rtc";
228 interrupt-parent = <&palmas>;
229 interrupts = <8 0>;
230 };
231
232 };
233 };
234
235 pmc@7000e400 {
236 nvidia,invert-interrupt;
237 };
238
239 /* eMMC */
240 sdhci@78000600 {
241 status = "okay";
242 bus-width = <8>;
243 vmmc-supply = <&vdd_1v8>;
244 non-removable;
245 };
246
247 usb@7d000000 {
248 status = "okay";
249 };
250
251 usb-phy@7d000000 {
252 status = "okay";
253 nvidia,xcvr-setup = <7>;
254 nvidia,xcvr-lsfslew = <2>;
255 nvidia,xcvr-lsrslew = <2>;
256 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
257 /* Should be changed to "otg" once we have vbus_supply */
258 /* As of now, USB devices need to be powered externally */
259 dr_mode = "host";
260 };
261
262 backlight: backlight {
263 compatible = "pwm-backlight";
264 pwms = <&pwm 1 40000>;
265
266 brightness-levels = <0 4 8 16 32 64 128 255>;
267 default-brightness-level = <6>;
268
269 power-supply = <&lcd_bl_en>;
270 };
271
272 clocks {
273 compatible = "simple-bus";
274 #address-cells = <1>;
275 #size-cells = <0>;
276
277 clk32k_in: clock {
278 compatible = "fixed-clock";
279 reg = <0>;
280 #clock-cells = <0>;
281 clock-frequency = <32768>;
282 };
283 };
284
285 gpio-keys {
286 compatible = "gpio-keys";
287
288 power {
289 label = "Power";
290 gpios = <&gpio TEGRA_GPIO(Q, 0) GPIO_ACTIVE_LOW>;
291 linux,code = <KEY_POWER>;
292 gpio-key,wakeup;
293 };
294
295 volume_down {
296 label = "Volume Down";
297 gpios = <&gpio TEGRA_GPIO(Q, 2) GPIO_ACTIVE_LOW>;
298 linux,code = <KEY_VOLUMEDOWN>;
299 };
300
301 volume_up {
302 label = "Volume Up";
303 gpios = <&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_LOW>;
304 linux,code = <KEY_VOLUMEUP>;
305 };
306 };
307
308 regulators {
309 compatible = "simple-bus";
310 #address-cells = <1>;
311 #size-cells = <0>;
312
313 /* FIXME: output of BQ24192 */
314 vs_sys: regulator@0 {
315 compatible = "regulator-fixed";
316 reg = <0>;
317 regulator-name = "VS_SYS";
318 regulator-min-microvolt = <4200000>;
319 regulator-max-microvolt = <4200000>;
320 regulator-always-on;
321 regulator-boot-on;
322 };
323
324 lcd_bl_en: regulator@1 {
325 compatible = "regulator-fixed";
326 reg = <1>;
327 regulator-name = "VDD_LCD_BL";
328 regulator-min-microvolt = <16500000>;
329 regulator-max-microvolt = <16500000>;
330 gpio = <&gpio TEGRA_GPIO(H, 2) GPIO_ACTIVE_HIGH>;
331 enable-active-high;
332 vin-supply = <&vs_sys>;
333 regulator-boot-on;
334 };
335
336 vdd_lcd: regulator@2 {
337 compatible = "regulator-fixed";
338 reg = <2>;
339 regulator-name = "VD_LCD_1V8";
340 regulator-min-microvolt = <1800000>;
341 regulator-max-microvolt = <1800000>;
342 gpio = <&palmas_gpio 4 GPIO_ACTIVE_HIGH>;
343 enable-active-high;
344 vin-supply = <&vdd_1v8>;
345 regulator-boot-on;
346 };
347 };
348};
diff --git a/arch/arm/boot/dts/tegra124-jetson-tk1.dts b/arch/arm/boot/dts/tegra124-jetson-tk1.dts
new file mode 100644
index 000000000000..e31fb61a81d3
--- /dev/null
+++ b/arch/arm/boot/dts/tegra124-jetson-tk1.dts
@@ -0,0 +1,1827 @@
1/dts-v1/;
2
3#include <dt-bindings/input/input.h>
4#include "tegra124.dtsi"
5
6/ {
7 model = "NVIDIA Tegra124 Jetson TK1";
8 compatible = "nvidia,jetson-tk1", "nvidia,tegra124";
9
10 aliases {
11 rtc0 = "/i2c@0,7000d000/pmic@40";
12 rtc1 = "/rtc@0,7000e000";
13 };
14
15 memory {
16 reg = <0x0 0x80000000 0x0 0x80000000>;
17 };
18
19 host1x@0,50000000 {
20 hdmi@0,54280000 {
21 status = "okay";
22
23 hdmi-supply = <&vdd_5v0_hdmi>;
24 pll-supply = <&vdd_hdmi_pll>;
25 vdd-supply = <&vdd_3v3_hdmi>;
26
27 nvidia,ddc-i2c-bus = <&hdmi_ddc>;
28 nvidia,hpd-gpio =
29 <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
30 };
31 };
32
33 pinmux: pinmux@0,70000868 {
34 pinctrl-names = "default";
35 pinctrl-0 = <&state_default>;
36
37 state_default: pinmux {
38 clk_32k_out_pa0 {
39 nvidia,pins = "clk_32k_out_pa0";
40 nvidia,function = "soc";
41 nvidia,pull = <TEGRA_PIN_PULL_UP>;
42 nvidia,tristate = <TEGRA_PIN_DISABLE>;
43 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
44 };
45 uart3_cts_n_pa1 {
46 nvidia,pins = "uart3_cts_n_pa1";
47 nvidia,function = "uartc";
48 nvidia,pull = <TEGRA_PIN_PULL_UP>;
49 nvidia,tristate = <TEGRA_PIN_DISABLE>;
50 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
51 };
52 dap2_fs_pa2 {
53 nvidia,pins = "dap2_fs_pa2";
54 nvidia,function = "i2s1";
55 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
56 nvidia,tristate = <TEGRA_PIN_DISABLE>;
57 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
58 };
59 dap2_sclk_pa3 {
60 nvidia,pins = "dap2_sclk_pa3";
61 nvidia,function = "i2s1";
62 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
63 nvidia,tristate = <TEGRA_PIN_DISABLE>;
64 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
65 };
66 dap2_din_pa4 {
67 nvidia,pins = "dap2_din_pa4";
68 nvidia,function = "i2s1";
69 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
70 nvidia,tristate = <TEGRA_PIN_DISABLE>;
71 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
72 };
73 dap2_dout_pa5 {
74 nvidia,pins = "dap2_dout_pa5";
75 nvidia,function = "i2s1";
76 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
77 nvidia,tristate = <TEGRA_PIN_DISABLE>;
78 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
79 };
80 sdmmc3_clk_pa6 {
81 nvidia,pins = "sdmmc3_clk_pa6";
82 nvidia,function = "sdmmc3";
83 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
84 nvidia,tristate = <TEGRA_PIN_DISABLE>;
85 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
86 };
87 sdmmc3_cmd_pa7 {
88 nvidia,pins = "sdmmc3_cmd_pa7";
89 nvidia,function = "sdmmc3";
90 nvidia,pull = <TEGRA_PIN_PULL_UP>;
91 nvidia,tristate = <TEGRA_PIN_DISABLE>;
92 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
93 };
94 pb0 {
95 nvidia,pins = "pb0";
96 nvidia,function = "uartd";
97 nvidia,pull = <TEGRA_PIN_PULL_UP>;
98 nvidia,tristate = <TEGRA_PIN_DISABLE>;
99 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
100 };
101 pb1 {
102 nvidia,pins = "pb1";
103 nvidia,function = "uartd";
104 nvidia,pull = <TEGRA_PIN_PULL_UP>;
105 nvidia,tristate = <TEGRA_PIN_DISABLE>;
106 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
107 };
108 sdmmc3_dat3_pb4 {
109 nvidia,pins = "sdmmc3_dat3_pb4";
110 nvidia,function = "sdmmc3";
111 nvidia,pull = <TEGRA_PIN_PULL_UP>;
112 nvidia,tristate = <TEGRA_PIN_DISABLE>;
113 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
114 };
115 sdmmc3_dat2_pb5 {
116 nvidia,pins = "sdmmc3_dat2_pb5";
117 nvidia,function = "sdmmc3";
118 nvidia,pull = <TEGRA_PIN_PULL_UP>;
119 nvidia,tristate = <TEGRA_PIN_DISABLE>;
120 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
121 };
122 sdmmc3_dat1_pb6 {
123 nvidia,pins = "sdmmc3_dat1_pb6";
124 nvidia,function = "sdmmc3";
125 nvidia,pull = <TEGRA_PIN_PULL_UP>;
126 nvidia,tristate = <TEGRA_PIN_DISABLE>;
127 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
128 };
129 sdmmc3_dat0_pb7 {
130 nvidia,pins = "sdmmc3_dat0_pb7";
131 nvidia,function = "sdmmc3";
132 nvidia,pull = <TEGRA_PIN_PULL_UP>;
133 nvidia,tristate = <TEGRA_PIN_DISABLE>;
134 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
135 };
136 uart3_rts_n_pc0 {
137 nvidia,pins = "uart3_rts_n_pc0";
138 nvidia,function = "uartc";
139 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
140 nvidia,tristate = <TEGRA_PIN_DISABLE>;
141 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
142 };
143 uart2_txd_pc2 {
144 nvidia,pins = "uart2_txd_pc2";
145 nvidia,function = "irda";
146 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
147 nvidia,tristate = <TEGRA_PIN_DISABLE>;
148 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
149 };
150 uart2_rxd_pc3 {
151 nvidia,pins = "uart2_rxd_pc3";
152 nvidia,function = "irda";
153 nvidia,pull = <TEGRA_PIN_PULL_UP>;
154 nvidia,tristate = <TEGRA_PIN_DISABLE>;
155 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
156 };
157 gen1_i2c_scl_pc4 {
158 nvidia,pins = "gen1_i2c_scl_pc4";
159 nvidia,function = "i2c1";
160 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
161 nvidia,tristate = <TEGRA_PIN_DISABLE>;
162 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
163 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
164 };
165 gen1_i2c_sda_pc5 {
166 nvidia,pins = "gen1_i2c_sda_pc5";
167 nvidia,function = "i2c1";
168 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
169 nvidia,tristate = <TEGRA_PIN_DISABLE>;
170 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
171 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
172 };
173 pc7 {
174 nvidia,pins = "pc7";
175 nvidia,function = "rsvd1";
176 nvidia,pull = <TEGRA_PIN_PULL_UP>;
177 nvidia,tristate = <TEGRA_PIN_DISABLE>;
178 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
179 };
180 pg0 {
181 nvidia,pins = "pg0";
182 nvidia,function = "rsvd1";
183 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
184 nvidia,tristate = <TEGRA_PIN_DISABLE>;
185 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
186 };
187 pg1 {
188 nvidia,pins = "pg1";
189 nvidia,function = "rsvd1";
190 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
191 nvidia,tristate = <TEGRA_PIN_DISABLE>;
192 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
193 };
194 pg2 {
195 nvidia,pins = "pg2";
196 nvidia,function = "rsvd1";
197 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
198 nvidia,tristate = <TEGRA_PIN_DISABLE>;
199 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
200 };
201 pg3 {
202 nvidia,pins = "pg3";
203 nvidia,function = "rsvd1";
204 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
205 nvidia,tristate = <TEGRA_PIN_DISABLE>;
206 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
207 };
208 pg4 {
209 nvidia,pins = "pg4";
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 pg5 {
216 nvidia,pins = "pg5";
217 nvidia,function = "spi4";
218 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
219 nvidia,tristate = <TEGRA_PIN_DISABLE>;
220 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
221 };
222 pg6 {
223 nvidia,pins = "pg6";
224 nvidia,function = "spi4";
225 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
226 nvidia,tristate = <TEGRA_PIN_DISABLE>;
227 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
228 };
229 pg7 {
230 nvidia,pins = "pg7";
231 nvidia,function = "spi4";
232 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
233 nvidia,tristate = <TEGRA_PIN_DISABLE>;
234 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
235 };
236 ph0 {
237 nvidia,pins = "ph0";
238 nvidia,function = "gmi";
239 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
240 nvidia,tristate = <TEGRA_PIN_ENABLE>;
241 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
242 };
243 ph1 {
244 nvidia,pins = "ph1";
245 nvidia,function = "pwm1";
246 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
247 nvidia,tristate = <TEGRA_PIN_DISABLE>;
248 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
249 };
250 ph2 {
251 nvidia,pins = "ph2";
252 nvidia,function = "gmi";
253 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
254 nvidia,tristate = <TEGRA_PIN_DISABLE>;
255 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
256 };
257 ph3 {
258 nvidia,pins = "ph3";
259 nvidia,function = "gmi";
260 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
261 nvidia,tristate = <TEGRA_PIN_DISABLE>;
262 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
263 };
264 ph4 {
265 nvidia,pins = "ph4";
266 nvidia,function = "rsvd2";
267 nvidia,pull = <TEGRA_PIN_PULL_UP>;
268 nvidia,tristate = <TEGRA_PIN_DISABLE>;
269 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
270 };
271 ph5 {
272 nvidia,pins = "ph5";
273 nvidia,function = "rsvd2";
274 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
275 nvidia,tristate = <TEGRA_PIN_DISABLE>;
276 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
277 };
278 ph6 {
279 nvidia,pins = "ph6";
280 nvidia,function = "gmi";
281 nvidia,pull = <TEGRA_PIN_PULL_UP>;
282 nvidia,tristate = <TEGRA_PIN_DISABLE>;
283 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
284 };
285 ph7 {
286 nvidia,pins = "ph7";
287 nvidia,function = "gmi";
288 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
289 nvidia,tristate = <TEGRA_PIN_DISABLE>;
290 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
291 };
292 pi0 {
293 nvidia,pins = "pi0";
294 nvidia,function = "rsvd1";
295 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
296 nvidia,tristate = <TEGRA_PIN_DISABLE>;
297 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
298 };
299 pi1 {
300 nvidia,pins = "pi1";
301 nvidia,function = "rsvd1";
302 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
303 nvidia,tristate = <TEGRA_PIN_ENABLE>;
304 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
305 };
306 pi2 {
307 nvidia,pins = "pi2";
308 nvidia,function = "rsvd4";
309 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
310 nvidia,tristate = <TEGRA_PIN_DISABLE>;
311 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
312 };
313 pi3 {
314 nvidia,pins = "pi3";
315 nvidia,function = "spi4";
316 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
317 nvidia,tristate = <TEGRA_PIN_DISABLE>;
318 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
319 };
320 pi4 {
321 nvidia,pins = "pi4";
322 nvidia,function = "gmi";
323 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
324 nvidia,tristate = <TEGRA_PIN_DISABLE>;
325 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
326 };
327 pi5 {
328 nvidia,pins = "pi5";
329 nvidia,function = "rsvd2";
330 nvidia,pull = <TEGRA_PIN_PULL_UP>;
331 nvidia,tristate = <TEGRA_PIN_DISABLE>;
332 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
333 };
334 pi6 {
335 nvidia,pins = "pi6";
336 nvidia,function = "rsvd1";
337 nvidia,pull = <TEGRA_PIN_PULL_UP>;
338 nvidia,tristate = <TEGRA_PIN_DISABLE>;
339 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
340 };
341 pi7 {
342 nvidia,pins = "pi7";
343 nvidia,function = "rsvd1";
344 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
345 nvidia,tristate = <TEGRA_PIN_ENABLE>;
346 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
347 };
348 pj0 {
349 nvidia,pins = "pj0";
350 nvidia,function = "rsvd1";
351 nvidia,pull = <TEGRA_PIN_PULL_UP>;
352 nvidia,tristate = <TEGRA_PIN_DISABLE>;
353 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
354 };
355 pj2 {
356 nvidia,pins = "pj2";
357 nvidia,function = "rsvd1";
358 nvidia,pull = <TEGRA_PIN_PULL_UP>;
359 nvidia,tristate = <TEGRA_PIN_DISABLE>;
360 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
361 };
362 uart2_cts_n_pj5 {
363 nvidia,pins = "uart2_cts_n_pj5";
364 nvidia,function = "uartb";
365 nvidia,pull = <TEGRA_PIN_PULL_UP>;
366 nvidia,tristate = <TEGRA_PIN_DISABLE>;
367 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
368 };
369 uart2_rts_n_pj6 {
370 nvidia,pins = "uart2_rts_n_pj6";
371 nvidia,function = "uartb";
372 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
373 nvidia,tristate = <TEGRA_PIN_DISABLE>;
374 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
375 };
376 pj7 {
377 nvidia,pins = "pj7";
378 nvidia,function = "uartd";
379 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
380 nvidia,tristate = <TEGRA_PIN_DISABLE>;
381 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
382 };
383 pk0 {
384 nvidia,pins = "pk0";
385 nvidia,function = "soc";
386 nvidia,pull = <TEGRA_PIN_PULL_UP>;
387 nvidia,tristate = <TEGRA_PIN_DISABLE>;
388 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
389 };
390 pk1 {
391 nvidia,pins = "pk1";
392 nvidia,function = "rsvd4";
393 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
394 nvidia,tristate = <TEGRA_PIN_DISABLE>;
395 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
396 };
397 pk2 {
398 nvidia,pins = "pk2";
399 nvidia,function = "rsvd1";
400 nvidia,pull = <TEGRA_PIN_PULL_UP>;
401 nvidia,tristate = <TEGRA_PIN_DISABLE>;
402 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
403 };
404 pk3 {
405 nvidia,pins = "pk3";
406 nvidia,function = "gmi";
407 nvidia,pull = <TEGRA_PIN_PULL_UP>;
408 nvidia,tristate = <TEGRA_PIN_DISABLE>;
409 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
410 };
411 pk4 {
412 nvidia,pins = "pk4";
413 nvidia,function = "rsvd2";
414 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
415 nvidia,tristate = <TEGRA_PIN_DISABLE>;
416 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
417 };
418 spdif_out_pk5 {
419 nvidia,pins = "spdif_out_pk5";
420 nvidia,function = "rsvd2";
421 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
422 nvidia,tristate = <TEGRA_PIN_DISABLE>;
423 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
424 };
425 spdif_in_pk6 {
426 nvidia,pins = "spdif_in_pk6";
427 nvidia,function = "rsvd2";
428 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
429 nvidia,tristate = <TEGRA_PIN_DISABLE>;
430 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
431 };
432 pk7 {
433 nvidia,pins = "pk7";
434 nvidia,function = "uartd";
435 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
436 nvidia,tristate = <TEGRA_PIN_DISABLE>;
437 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
438 };
439 dap1_fs_pn0 {
440 nvidia,pins = "dap1_fs_pn0";
441 nvidia,function = "i2s0";
442 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
443 nvidia,tristate = <TEGRA_PIN_DISABLE>;
444 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
445 };
446 dap1_din_pn1 {
447 nvidia,pins = "dap1_din_pn1";
448 nvidia,function = "i2s0";
449 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
450 nvidia,tristate = <TEGRA_PIN_DISABLE>;
451 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
452 };
453 dap1_dout_pn2 {
454 nvidia,pins = "dap1_dout_pn2";
455 nvidia,function = "sata";
456 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
457 nvidia,tristate = <TEGRA_PIN_DISABLE>;
458 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
459 };
460 dap1_sclk_pn3 {
461 nvidia,pins = "dap1_sclk_pn3";
462 nvidia,function = "i2s0";
463 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
464 nvidia,tristate = <TEGRA_PIN_DISABLE>;
465 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
466 };
467 usb_vbus_en0_pn4 {
468 nvidia,pins = "usb_vbus_en0_pn4";
469 nvidia,function = "usb";
470 nvidia,pull = <TEGRA_PIN_PULL_UP>;
471 nvidia,tristate = <TEGRA_PIN_DISABLE>;
472 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
473 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
474 };
475 usb_vbus_en1_pn5 {
476 nvidia,pins = "usb_vbus_en1_pn5";
477 nvidia,function = "usb";
478 nvidia,pull = <TEGRA_PIN_PULL_UP>;
479 nvidia,tristate = <TEGRA_PIN_DISABLE>;
480 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
481 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
482 };
483 hdmi_int_pn7 {
484 nvidia,pins = "hdmi_int_pn7";
485 nvidia,function = "rsvd1";
486 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
487 nvidia,tristate = <TEGRA_PIN_DISABLE>;
488 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
489 nvidia,rcv-sel = <TEGRA_PIN_DISABLE>;
490 };
491 ulpi_data7_po0 {
492 nvidia,pins = "ulpi_data7_po0";
493 nvidia,function = "ulpi";
494 nvidia,pull = <TEGRA_PIN_PULL_UP>;
495 nvidia,tristate = <TEGRA_PIN_DISABLE>;
496 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
497 };
498 ulpi_data0_po1 {
499 nvidia,pins = "ulpi_data0_po1";
500 nvidia,function = "ulpi";
501 nvidia,pull = <TEGRA_PIN_PULL_UP>;
502 nvidia,tristate = <TEGRA_PIN_DISABLE>;
503 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
504 };
505 ulpi_data1_po2 {
506 nvidia,pins = "ulpi_data1_po2";
507 nvidia,function = "ulpi";
508 nvidia,pull = <TEGRA_PIN_PULL_UP>;
509 nvidia,tristate = <TEGRA_PIN_DISABLE>;
510 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
511 };
512 ulpi_data2_po3 {
513 nvidia,pins = "ulpi_data2_po3";
514 nvidia,function = "ulpi";
515 nvidia,pull = <TEGRA_PIN_PULL_UP>;
516 nvidia,tristate = <TEGRA_PIN_DISABLE>;
517 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
518 };
519 ulpi_data3_po4 {
520 nvidia,pins = "ulpi_data3_po4";
521 nvidia,function = "ulpi";
522 nvidia,pull = <TEGRA_PIN_PULL_UP>;
523 nvidia,tristate = <TEGRA_PIN_DISABLE>;
524 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
525 };
526 ulpi_data4_po5 {
527 nvidia,pins = "ulpi_data4_po5";
528 nvidia,function = "ulpi";
529 nvidia,pull = <TEGRA_PIN_PULL_UP>;
530 nvidia,tristate = <TEGRA_PIN_DISABLE>;
531 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
532 };
533 ulpi_data5_po6 {
534 nvidia,pins = "ulpi_data5_po6";
535 nvidia,function = "ulpi";
536 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
537 nvidia,tristate = <TEGRA_PIN_DISABLE>;
538 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
539 };
540 ulpi_data6_po7 {
541 nvidia,pins = "ulpi_data6_po7";
542 nvidia,function = "ulpi";
543 nvidia,pull = <TEGRA_PIN_PULL_UP>;
544 nvidia,tristate = <TEGRA_PIN_DISABLE>;
545 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
546 };
547 dap3_fs_pp0 {
548 nvidia,pins = "dap3_fs_pp0";
549 nvidia,function = "i2s2";
550 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
551 nvidia,tristate = <TEGRA_PIN_DISABLE>;
552 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
553 };
554 dap3_din_pp1 {
555 nvidia,pins = "dap3_din_pp1";
556 nvidia,function = "i2s2";
557 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
558 nvidia,tristate = <TEGRA_PIN_DISABLE>;
559 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
560 };
561 dap3_dout_pp2 {
562 nvidia,pins = "dap3_dout_pp2";
563 nvidia,function = "rsvd4";
564 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
565 nvidia,tristate = <TEGRA_PIN_DISABLE>;
566 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
567 };
568 dap3_sclk_pp3 {
569 nvidia,pins = "dap3_sclk_pp3";
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 dap4_fs_pp4 {
576 nvidia,pins = "dap4_fs_pp4";
577 nvidia,function = "i2s3";
578 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
579 nvidia,tristate = <TEGRA_PIN_DISABLE>;
580 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
581 };
582 dap4_din_pp5 {
583 nvidia,pins = "dap4_din_pp5";
584 nvidia,function = "i2s3";
585 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
586 nvidia,tristate = <TEGRA_PIN_DISABLE>;
587 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
588 };
589 dap4_dout_pp6 {
590 nvidia,pins = "dap4_dout_pp6";
591 nvidia,function = "i2s3";
592 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
593 nvidia,tristate = <TEGRA_PIN_DISABLE>;
594 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
595 };
596 dap4_sclk_pp7 {
597 nvidia,pins = "dap4_sclk_pp7";
598 nvidia,function = "i2s3";
599 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
600 nvidia,tristate = <TEGRA_PIN_DISABLE>;
601 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
602 };
603 kb_col0_pq0 {
604 nvidia,pins = "kb_col0_pq0";
605 nvidia,function = "rsvd2";
606 nvidia,pull = <TEGRA_PIN_PULL_UP>;
607 nvidia,tristate = <TEGRA_PIN_DISABLE>;
608 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
609 };
610 kb_col1_pq1 {
611 nvidia,pins = "kb_col1_pq1";
612 nvidia,function = "rsvd2";
613 nvidia,pull = <TEGRA_PIN_PULL_UP>;
614 nvidia,tristate = <TEGRA_PIN_DISABLE>;
615 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
616 };
617 kb_col2_pq2 {
618 nvidia,pins = "kb_col2_pq2";
619 nvidia,function = "rsvd2";
620 nvidia,pull = <TEGRA_PIN_PULL_UP>;
621 nvidia,tristate = <TEGRA_PIN_DISABLE>;
622 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
623 };
624 kb_col3_pq3 {
625 nvidia,pins = "kb_col3_pq3";
626 nvidia,function = "kbc";
627 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
628 nvidia,tristate = <TEGRA_PIN_ENABLE>;
629 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
630 };
631 kb_col4_pq4 {
632 nvidia,pins = "kb_col4_pq4";
633 nvidia,function = "sdmmc3";
634 nvidia,pull = <TEGRA_PIN_PULL_UP>;
635 nvidia,tristate = <TEGRA_PIN_DISABLE>;
636 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
637 };
638 kb_col5_pq5 {
639 nvidia,pins = "kb_col5_pq5";
640 nvidia,function = "rsvd2";
641 nvidia,pull = <TEGRA_PIN_PULL_UP>;
642 nvidia,tristate = <TEGRA_PIN_DISABLE>;
643 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
644 };
645 kb_col6_pq6 {
646 nvidia,pins = "kb_col6_pq6";
647 nvidia,function = "rsvd2";
648 nvidia,pull = <TEGRA_PIN_PULL_UP>;
649 nvidia,tristate = <TEGRA_PIN_DISABLE>;
650 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
651 };
652 kb_col7_pq7 {
653 nvidia,pins = "kb_col7_pq7";
654 nvidia,function = "rsvd2";
655 nvidia,pull = <TEGRA_PIN_PULL_UP>;
656 nvidia,tristate = <TEGRA_PIN_DISABLE>;
657 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
658 };
659 kb_row0_pr0 {
660 nvidia,pins = "kb_row0_pr0";
661 nvidia,function = "rsvd2";
662 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
663 nvidia,tristate = <TEGRA_PIN_DISABLE>;
664 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
665 };
666 kb_row1_pr1 {
667 nvidia,pins = "kb_row1_pr1";
668 nvidia,function = "rsvd2";
669 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
670 nvidia,tristate = <TEGRA_PIN_DISABLE>;
671 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
672 };
673 kb_row2_pr2 {
674 nvidia,pins = "kb_row2_pr2";
675 nvidia,function = "rsvd2";
676 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
677 nvidia,tristate = <TEGRA_PIN_DISABLE>;
678 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
679 };
680 kb_row3_pr3 {
681 nvidia,pins = "kb_row3_pr3";
682 nvidia,function = "sys";
683 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
684 nvidia,tristate = <TEGRA_PIN_DISABLE>;
685 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
686 };
687 kb_row4_pr4 {
688 nvidia,pins = "kb_row4_pr4";
689 nvidia,function = "rsvd3";
690 nvidia,pull = <TEGRA_PIN_PULL_UP>;
691 nvidia,tristate = <TEGRA_PIN_DISABLE>;
692 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
693 };
694 kb_row5_pr5 {
695 nvidia,pins = "kb_row5_pr5";
696 nvidia,function = "rsvd3";
697 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
698 nvidia,tristate = <TEGRA_PIN_DISABLE>;
699 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
700 };
701 kb_row6_pr6 {
702 nvidia,pins = "kb_row6_pr6";
703 nvidia,function = "displaya_alt";
704 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
705 nvidia,tristate = <TEGRA_PIN_DISABLE>;
706 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
707 };
708 kb_row7_pr7 {
709 nvidia,pins = "kb_row7_pr7";
710 nvidia,function = "rsvd2";
711 nvidia,pull = <TEGRA_PIN_PULL_UP>;
712 nvidia,tristate = <TEGRA_PIN_DISABLE>;
713 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
714 };
715 kb_row8_ps0 {
716 nvidia,pins = "kb_row8_ps0";
717 nvidia,function = "rsvd2";
718 nvidia,pull = <TEGRA_PIN_PULL_UP>;
719 nvidia,tristate = <TEGRA_PIN_DISABLE>;
720 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
721 };
722 kb_row9_ps1 {
723 nvidia,pins = "kb_row9_ps1";
724 nvidia,function = "rsvd2";
725 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
726 nvidia,tristate = <TEGRA_PIN_DISABLE>;
727 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
728 };
729 kb_row10_ps2 {
730 nvidia,pins = "kb_row10_ps2";
731 nvidia,function = "rsvd2";
732 nvidia,pull = <TEGRA_PIN_PULL_UP>;
733 nvidia,tristate = <TEGRA_PIN_DISABLE>;
734 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
735 };
736 kb_row11_ps3 {
737 nvidia,pins = "kb_row11_ps3";
738 nvidia,function = "rsvd2";
739 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
740 nvidia,tristate = <TEGRA_PIN_DISABLE>;
741 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
742 };
743 kb_row12_ps4 {
744 nvidia,pins = "kb_row12_ps4";
745 nvidia,function = "rsvd2";
746 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
747 nvidia,tristate = <TEGRA_PIN_DISABLE>;
748 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
749 };
750 kb_row13_ps5 {
751 nvidia,pins = "kb_row13_ps5";
752 nvidia,function = "rsvd2";
753 nvidia,pull = <TEGRA_PIN_PULL_UP>;
754 nvidia,tristate = <TEGRA_PIN_DISABLE>;
755 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
756 };
757 kb_row14_ps6 {
758 nvidia,pins = "kb_row14_ps6";
759 nvidia,function = "rsvd2";
760 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
761 nvidia,tristate = <TEGRA_PIN_DISABLE>;
762 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
763 };
764 kb_row15_ps7 {
765 nvidia,pins = "kb_row15_ps7";
766 nvidia,function = "soc";
767 nvidia,pull = <TEGRA_PIN_PULL_UP>;
768 nvidia,tristate = <TEGRA_PIN_DISABLE>;
769 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
770 };
771 kb_row16_pt0 {
772 nvidia,pins = "kb_row16_pt0";
773 nvidia,function = "rsvd2";
774 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
775 nvidia,tristate = <TEGRA_PIN_DISABLE>;
776 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
777 };
778 kb_row17_pt1 {
779 nvidia,pins = "kb_row17_pt1";
780 nvidia,function = "rsvd2";
781 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
782 nvidia,tristate = <TEGRA_PIN_DISABLE>;
783 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
784 };
785 gen2_i2c_scl_pt5 {
786 nvidia,pins = "gen2_i2c_scl_pt5";
787 nvidia,function = "i2c2";
788 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
789 nvidia,tristate = <TEGRA_PIN_DISABLE>;
790 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
791 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
792 };
793 gen2_i2c_sda_pt6 {
794 nvidia,pins = "gen2_i2c_sda_pt6";
795 nvidia,function = "i2c2";
796 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
797 nvidia,tristate = <TEGRA_PIN_DISABLE>;
798 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
799 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
800 };
801 sdmmc4_cmd_pt7 {
802 nvidia,pins = "sdmmc4_cmd_pt7";
803 nvidia,function = "sdmmc4";
804 nvidia,pull = <TEGRA_PIN_PULL_UP>;
805 nvidia,tristate = <TEGRA_PIN_DISABLE>;
806 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
807 };
808 pu0 {
809 nvidia,pins = "pu0";
810 nvidia,function = "rsvd4";
811 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
812 nvidia,tristate = <TEGRA_PIN_DISABLE>;
813 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
814 };
815 pu1 {
816 nvidia,pins = "pu1";
817 nvidia,function = "rsvd1";
818 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
819 nvidia,tristate = <TEGRA_PIN_DISABLE>;
820 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
821 };
822 pu2 {
823 nvidia,pins = "pu2";
824 nvidia,function = "rsvd1";
825 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
826 nvidia,tristate = <TEGRA_PIN_DISABLE>;
827 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
828 };
829 pu3 {
830 nvidia,pins = "pu3";
831 nvidia,function = "gmi";
832 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
833 nvidia,tristate = <TEGRA_PIN_DISABLE>;
834 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
835 };
836 pu4 {
837 nvidia,pins = "pu4";
838 nvidia,function = "gmi";
839 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
840 nvidia,tristate = <TEGRA_PIN_DISABLE>;
841 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
842 };
843 pu5 {
844 nvidia,pins = "pu5";
845 nvidia,function = "gmi";
846 nvidia,pull = <TEGRA_PIN_PULL_UP>;
847 nvidia,tristate = <TEGRA_PIN_DISABLE>;
848 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
849 };
850 pu6 {
851 nvidia,pins = "pu6";
852 nvidia,function = "rsvd3";
853 nvidia,pull = <TEGRA_PIN_PULL_UP>;
854 nvidia,tristate = <TEGRA_PIN_DISABLE>;
855 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
856 };
857 pv0 {
858 nvidia,pins = "pv0";
859 nvidia,function = "rsvd1";
860 nvidia,pull = <TEGRA_PIN_PULL_UP>;
861 nvidia,tristate = <TEGRA_PIN_DISABLE>;
862 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
863 };
864 pv1 {
865 nvidia,pins = "pv1";
866 nvidia,function = "rsvd1";
867 nvidia,pull = <TEGRA_PIN_PULL_UP>;
868 nvidia,tristate = <TEGRA_PIN_DISABLE>;
869 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
870 };
871 sdmmc3_cd_n_pv2 {
872 nvidia,pins = "sdmmc3_cd_n_pv2";
873 nvidia,function = "sdmmc3";
874 nvidia,pull = <TEGRA_PIN_PULL_UP>;
875 nvidia,tristate = <TEGRA_PIN_DISABLE>;
876 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
877 };
878 sdmmc1_wp_n_pv3 {
879 nvidia,pins = "sdmmc1_wp_n_pv3";
880 nvidia,function = "sdmmc1";
881 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
882 nvidia,tristate = <TEGRA_PIN_ENABLE>;
883 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
884 };
885 ddc_scl_pv4 {
886 nvidia,pins = "ddc_scl_pv4";
887 nvidia,function = "i2c4";
888 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
889 nvidia,tristate = <TEGRA_PIN_DISABLE>;
890 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
891 nvidia,rcv-sel = <TEGRA_PIN_DISABLE>;
892 };
893 ddc_sda_pv5 {
894 nvidia,pins = "ddc_sda_pv5";
895 nvidia,function = "i2c4";
896 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
897 nvidia,tristate = <TEGRA_PIN_DISABLE>;
898 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
899 nvidia,rcv-sel = <TEGRA_PIN_DISABLE>;
900 };
901 gpio_w2_aud_pw2 {
902 nvidia,pins = "gpio_w2_aud_pw2";
903 nvidia,function = "rsvd2";
904 nvidia,pull = <TEGRA_PIN_PULL_UP>;
905 nvidia,tristate = <TEGRA_PIN_DISABLE>;
906 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
907 };
908 gpio_w3_aud_pw3 {
909 nvidia,pins = "gpio_w3_aud_pw3";
910 nvidia,function = "spi6";
911 nvidia,pull = <TEGRA_PIN_PULL_UP>;
912 nvidia,tristate = <TEGRA_PIN_DISABLE>;
913 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
914 };
915 dap_mclk1_pw4 {
916 nvidia,pins = "dap_mclk1_pw4";
917 nvidia,function = "extperiph1";
918 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
919 nvidia,tristate = <TEGRA_PIN_DISABLE>;
920 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
921 };
922 clk2_out_pw5 {
923 nvidia,pins = "clk2_out_pw5";
924 nvidia,function = "extperiph2";
925 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
926 nvidia,tristate = <TEGRA_PIN_DISABLE>;
927 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
928 };
929 uart3_txd_pw6 {
930 nvidia,pins = "uart3_txd_pw6";
931 nvidia,function = "uartc";
932 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
933 nvidia,tristate = <TEGRA_PIN_DISABLE>;
934 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
935 };
936 uart3_rxd_pw7 {
937 nvidia,pins = "uart3_rxd_pw7";
938 nvidia,function = "uartc";
939 nvidia,pull = <TEGRA_PIN_PULL_UP>;
940 nvidia,tristate = <TEGRA_PIN_DISABLE>;
941 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
942 };
943 dvfs_pwm_px0 {
944 nvidia,pins = "dvfs_pwm_px0";
945 nvidia,function = "cldvfs";
946 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
947 nvidia,tristate = <TEGRA_PIN_DISABLE>;
948 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
949 };
950 gpio_x1_aud_px1 {
951 nvidia,pins = "gpio_x1_aud_px1";
952 nvidia,function = "rsvd2";
953 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
954 nvidia,tristate = <TEGRA_PIN_DISABLE>;
955 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
956 };
957 dvfs_clk_px2 {
958 nvidia,pins = "dvfs_clk_px2";
959 nvidia,function = "cldvfs";
960 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
961 nvidia,tristate = <TEGRA_PIN_DISABLE>;
962 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
963 };
964 gpio_x3_aud_px3 {
965 nvidia,pins = "gpio_x3_aud_px3";
966 nvidia,function = "rsvd4";
967 nvidia,pull = <TEGRA_PIN_PULL_UP>;
968 nvidia,tristate = <TEGRA_PIN_DISABLE>;
969 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
970 };
971 gpio_x4_aud_px4 {
972 nvidia,pins = "gpio_x4_aud_px4";
973 nvidia,function = "gmi";
974 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
975 nvidia,tristate = <TEGRA_PIN_DISABLE>;
976 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
977 };
978 gpio_x5_aud_px5 {
979 nvidia,pins = "gpio_x5_aud_px5";
980 nvidia,function = "rsvd4";
981 nvidia,pull = <TEGRA_PIN_PULL_UP>;
982 nvidia,tristate = <TEGRA_PIN_DISABLE>;
983 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
984 };
985 gpio_x6_aud_px6 {
986 nvidia,pins = "gpio_x6_aud_px6";
987 nvidia,function = "gmi";
988 nvidia,pull = <TEGRA_PIN_PULL_UP>;
989 nvidia,tristate = <TEGRA_PIN_DISABLE>;
990 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
991 };
992 gpio_x7_aud_px7 {
993 nvidia,pins = "gpio_x7_aud_px7";
994 nvidia,function = "rsvd1";
995 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
996 nvidia,tristate = <TEGRA_PIN_DISABLE>;
997 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
998 };
999 ulpi_clk_py0 {
1000 nvidia,pins = "ulpi_clk_py0";
1001 nvidia,function = "spi1";
1002 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1003 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1004 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1005 };
1006 ulpi_dir_py1 {
1007 nvidia,pins = "ulpi_dir_py1";
1008 nvidia,function = "spi1";
1009 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1010 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1011 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1012 };
1013 ulpi_nxt_py2 {
1014 nvidia,pins = "ulpi_nxt_py2";
1015 nvidia,function = "spi1";
1016 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1017 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1018 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1019 };
1020 ulpi_stp_py3 {
1021 nvidia,pins = "ulpi_stp_py3";
1022 nvidia,function = "spi1";
1023 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1024 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1025 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1026 };
1027 sdmmc1_dat3_py4 {
1028 nvidia,pins = "sdmmc1_dat3_py4";
1029 nvidia,function = "sdmmc1";
1030 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1031 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1032 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1033 };
1034 sdmmc1_dat2_py5 {
1035 nvidia,pins = "sdmmc1_dat2_py5";
1036 nvidia,function = "sdmmc1";
1037 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1038 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1039 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1040 };
1041 sdmmc1_dat1_py6 {
1042 nvidia,pins = "sdmmc1_dat1_py6";
1043 nvidia,function = "sdmmc1";
1044 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1045 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1046 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1047 };
1048 sdmmc1_dat0_py7 {
1049 nvidia,pins = "sdmmc1_dat0_py7";
1050 nvidia,function = "sdmmc1";
1051 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1052 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1053 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1054 };
1055 sdmmc1_clk_pz0 {
1056 nvidia,pins = "sdmmc1_clk_pz0";
1057 nvidia,function = "sdmmc1";
1058 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1059 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1060 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1061 };
1062 sdmmc1_cmd_pz1 {
1063 nvidia,pins = "sdmmc1_cmd_pz1";
1064 nvidia,function = "sdmmc1";
1065 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1066 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1067 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1068 };
1069 pwr_i2c_scl_pz6 {
1070 nvidia,pins = "pwr_i2c_scl_pz6";
1071 nvidia,function = "i2cpwr";
1072 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1073 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1074 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1075 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
1076 };
1077 pwr_i2c_sda_pz7 {
1078 nvidia,pins = "pwr_i2c_sda_pz7";
1079 nvidia,function = "i2cpwr";
1080 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1081 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1082 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1083 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
1084 };
1085 sdmmc4_dat0_paa0 {
1086 nvidia,pins = "sdmmc4_dat0_paa0";
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 sdmmc4_dat1_paa1 {
1093 nvidia,pins = "sdmmc4_dat1_paa1";
1094 nvidia,function = "sdmmc4";
1095 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1096 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1097 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1098 };
1099 sdmmc4_dat2_paa2 {
1100 nvidia,pins = "sdmmc4_dat2_paa2";
1101 nvidia,function = "sdmmc4";
1102 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1103 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1104 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1105 };
1106 sdmmc4_dat3_paa3 {
1107 nvidia,pins = "sdmmc4_dat3_paa3";
1108 nvidia,function = "sdmmc4";
1109 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1110 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1111 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1112 };
1113 sdmmc4_dat4_paa4 {
1114 nvidia,pins = "sdmmc4_dat4_paa4";
1115 nvidia,function = "sdmmc4";
1116 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1117 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1118 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1119 };
1120 sdmmc4_dat5_paa5 {
1121 nvidia,pins = "sdmmc4_dat5_paa5";
1122 nvidia,function = "sdmmc4";
1123 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1124 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1125 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1126 };
1127 sdmmc4_dat6_paa6 {
1128 nvidia,pins = "sdmmc4_dat6_paa6";
1129 nvidia,function = "sdmmc4";
1130 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1131 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1132 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1133 };
1134 sdmmc4_dat7_paa7 {
1135 nvidia,pins = "sdmmc4_dat7_paa7";
1136 nvidia,function = "sdmmc4";
1137 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1138 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1139 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1140 };
1141 pbb0 {
1142 nvidia,pins = "pbb0";
1143 nvidia,function = "vimclk2_alt";
1144 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1145 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1146 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1147 };
1148 cam_i2c_scl_pbb1 {
1149 nvidia,pins = "cam_i2c_scl_pbb1";
1150 nvidia,function = "i2c3";
1151 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1152 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1153 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1154 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
1155 };
1156 cam_i2c_sda_pbb2 {
1157 nvidia,pins = "cam_i2c_sda_pbb2";
1158 nvidia,function = "i2c3";
1159 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1160 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1161 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1162 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
1163 };
1164 pbb3 {
1165 nvidia,pins = "pbb3";
1166 nvidia,function = "vgp3";
1167 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1168 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1169 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1170 };
1171 pbb4 {
1172 nvidia,pins = "pbb4";
1173 nvidia,function = "vgp4";
1174 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1175 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1176 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1177 };
1178 pbb5 {
1179 nvidia,pins = "pbb5";
1180 nvidia,function = "rsvd3";
1181 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1182 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1183 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1184 };
1185 pbb6 {
1186 nvidia,pins = "pbb6";
1187 nvidia,function = "rsvd2";
1188 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1189 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1190 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1191 };
1192 pbb7 {
1193 nvidia,pins = "pbb7";
1194 nvidia,function = "rsvd2";
1195 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1196 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1197 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1198 };
1199 cam_mclk_pcc0 {
1200 nvidia,pins = "cam_mclk_pcc0";
1201 nvidia,function = "vi_alt3";
1202 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1203 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1204 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1205 };
1206 pcc1 {
1207 nvidia,pins = "pcc1";
1208 nvidia,function = "rsvd2";
1209 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1210 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1211 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1212 };
1213 pcc2 {
1214 nvidia,pins = "pcc2";
1215 nvidia,function = "rsvd2";
1216 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1217 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1218 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1219 };
1220 sdmmc4_clk_pcc4 {
1221 nvidia,pins = "sdmmc4_clk_pcc4";
1222 nvidia,function = "sdmmc4";
1223 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1224 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1225 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1226 };
1227 clk2_req_pcc5 {
1228 nvidia,pins = "clk2_req_pcc5";
1229 nvidia,function = "rsvd2";
1230 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1231 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1232 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1233 };
1234 clk3_out_pee0 {
1235 nvidia,pins = "clk3_out_pee0";
1236 nvidia,function = "extperiph3";
1237 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1238 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1239 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1240 };
1241 clk3_req_pee1 {
1242 nvidia,pins = "clk3_req_pee1";
1243 nvidia,function = "rsvd2";
1244 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1245 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1246 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1247 };
1248 dap_mclk1_req_pee2 {
1249 nvidia,pins = "dap_mclk1_req_pee2";
1250 nvidia,function = "sata";
1251 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1252 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1253 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1254 };
1255 hdmi_cec_pee3 {
1256 nvidia,pins = "hdmi_cec_pee3";
1257 nvidia,function = "cec";
1258 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1259 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1260 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1261 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
1262 };
1263 sdmmc3_clk_lb_out_pee4 {
1264 nvidia,pins = "sdmmc3_clk_lb_out_pee4";
1265 nvidia,function = "sdmmc3";
1266 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1267 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1268 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1269 };
1270 sdmmc3_clk_lb_in_pee5 {
1271 nvidia,pins = "sdmmc3_clk_lb_in_pee5";
1272 nvidia,function = "sdmmc3";
1273 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1274 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1275 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1276 };
1277 dp_hpd_pff0 {
1278 nvidia,pins = "dp_hpd_pff0";
1279 nvidia,function = "dp";
1280 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1281 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1282 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1283 };
1284 usb_vbus_en2_pff1 {
1285 nvidia,pins = "usb_vbus_en2_pff1";
1286 nvidia,function = "rsvd2";
1287 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1288 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1289 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1290 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
1291 };
1292 pff2 {
1293 nvidia,pins = "pff2";
1294 nvidia,function = "rsvd2";
1295 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1296 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1297 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1298 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
1299 };
1300 core_pwr_req {
1301 nvidia,pins = "core_pwr_req";
1302 nvidia,function = "pwron";
1303 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1304 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1305 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1306 };
1307 cpu_pwr_req {
1308 nvidia,pins = "cpu_pwr_req";
1309 nvidia,function = "rsvd2";
1310 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1311 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1312 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1313 };
1314 pwr_int_n {
1315 nvidia,pins = "pwr_int_n";
1316 nvidia,function = "pmi";
1317 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1318 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1319 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1320 };
1321 reset_out_n {
1322 nvidia,pins = "reset_out_n";
1323 nvidia,function = "reset_out_n";
1324 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1325 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1326 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1327 };
1328 owr {
1329 nvidia,pins = "owr";
1330 nvidia,function = "rsvd2";
1331 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1332 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1333 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1334 nvidia,rcv-sel = <TEGRA_PIN_DISABLE>;
1335 };
1336 clk_32k_in {
1337 nvidia,pins = "clk_32k_in";
1338 nvidia,function = "rsvd2";
1339 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1340 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1341 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1342 };
1343 jtag_rtck {
1344 nvidia,pins = "jtag_rtck";
1345 nvidia,function = "rtck";
1346 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1347 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1348 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1349 };
1350 };
1351 };
1352
1353 /* DB9 serial port */
1354 serial@0,70006300 {
1355 status = "okay";
1356 };
1357
1358 /* Expansion GEN1_I2C_*, mini-PCIe I2C, on-board components */
1359 i2c@0,7000c000 {
1360 status = "okay";
1361 clock-frequency = <100000>;
1362
1363 rt5639: audio-codec@1c {
1364 compatible = "realtek,rt5639";
1365 reg = <0x1c>;
1366 interrupt-parent = <&gpio>;
1367 interrupts = <TEGRA_GPIO(H, 4) GPIO_ACTIVE_HIGH>;
1368 realtek,ldo1-en-gpios =
1369 <&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_HIGH>;
1370 };
1371
1372 temperature-sensor@4c {
1373 compatible = "ti,tmp451";
1374 reg = <0x4c>;
1375 interrupt-parent = <&gpio>;
1376 interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_LEVEL_LOW>;
1377 };
1378
1379 eeprom@56 {
1380 compatible = "atmel,24c02";
1381 reg = <0x56>;
1382 pagesize = <8>;
1383 };
1384 };
1385
1386 /* Expansion GEN2_I2C_* */
1387 i2c@0,7000c400 {
1388 status = "okay";
1389 clock-frequency = <100000>;
1390 };
1391
1392 /* Expansion CAM_I2C_* */
1393 i2c@0,7000c500 {
1394 status = "okay";
1395 clock-frequency = <100000>;
1396 };
1397
1398 /* HDMI DDC */
1399 hdmi_ddc: i2c@0,7000c700 {
1400 status = "okay";
1401 clock-frequency = <100000>;
1402 };
1403
1404 /* Expansion PWR_I2C_*, on-board components */
1405 i2c@0,7000d000 {
1406 status = "okay";
1407 clock-frequency = <400000>;
1408
1409 pmic: pmic@40 {
1410 compatible = "ams,as3722";
1411 reg = <0x40>;
1412 interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
1413
1414 ams,system-power-controller;
1415
1416 #interrupt-cells = <2>;
1417 interrupt-controller;
1418
1419 gpio-controller;
1420 #gpio-cells = <2>;
1421
1422 pinctrl-names = "default";
1423 pinctrl-0 = <&as3722_default>;
1424
1425 as3722_default: pinmux {
1426 gpio0 {
1427 pins = "gpio0";
1428 function = "gpio";
1429 bias-pull-down;
1430 };
1431
1432 gpio1_2_4_7 {
1433 pins = "gpio1", "gpio2", "gpio4", "gpio7";
1434 function = "gpio";
1435 bias-pull-up;
1436 };
1437
1438 gpio3_5_6 {
1439 pins = "gpio3", "gpio5", "gpio6";
1440 bias-high-impedance;
1441 };
1442 };
1443
1444 regulators {
1445 vsup-sd2-supply = <&vdd_5v0_sys>;
1446 vsup-sd3-supply = <&vdd_5v0_sys>;
1447 vsup-sd4-supply = <&vdd_5v0_sys>;
1448 vsup-sd5-supply = <&vdd_5v0_sys>;
1449 vin-ldo0-supply = <&vdd_1v35_lp0>;
1450 vin-ldo1-6-supply = <&vdd_3v3_run>;
1451 vin-ldo2-5-7-supply = <&vddio_1v8>;
1452 vin-ldo3-4-supply = <&vdd_3v3_sys>;
1453 vin-ldo9-10-supply = <&vdd_5v0_sys>;
1454 vin-ldo11-supply = <&vdd_3v3_run>;
1455
1456 sd0 {
1457 regulator-name = "+VDD_CPU_AP";
1458 regulator-min-microvolt = <700000>;
1459 regulator-max-microvolt = <1400000>;
1460 regulator-min-microamp = <3500000>;
1461 regulator-max-microamp = <3500000>;
1462 regulator-always-on;
1463 regulator-boot-on;
1464 ams,external-control = <2>;
1465 };
1466
1467 sd1 {
1468 regulator-name = "+VDD_CORE";
1469 regulator-min-microvolt = <700000>;
1470 regulator-max-microvolt = <1350000>;
1471 regulator-min-microamp = <2500000>;
1472 regulator-max-microamp = <2500000>;
1473 regulator-always-on;
1474 regulator-boot-on;
1475 ams,external-control = <1>;
1476 };
1477
1478 vdd_1v35_lp0: sd2 {
1479 regulator-name = "+1.35V_LP0(sd2)";
1480 regulator-min-microvolt = <1350000>;
1481 regulator-max-microvolt = <1350000>;
1482 regulator-always-on;
1483 regulator-boot-on;
1484 };
1485
1486 sd3 {
1487 regulator-name = "+1.35V_LP0(sd3)";
1488 regulator-min-microvolt = <1350000>;
1489 regulator-max-microvolt = <1350000>;
1490 regulator-always-on;
1491 regulator-boot-on;
1492 };
1493
1494 vdd_1v05_run: sd4 {
1495 regulator-name = "+1.05V_RUN";
1496 regulator-min-microvolt = <1050000>;
1497 regulator-max-microvolt = <1050000>;
1498 };
1499
1500 vddio_1v8: sd5 {
1501 regulator-name = "+1.8V_VDDIO";
1502 regulator-min-microvolt = <1800000>;
1503 regulator-max-microvolt = <1800000>;
1504 regulator-boot-on;
1505 regulator-always-on;
1506 };
1507
1508 sd6 {
1509 regulator-name = "+VDD_GPU_AP";
1510 regulator-min-microvolt = <650000>;
1511 regulator-max-microvolt = <1200000>;
1512 regulator-min-microamp = <3500000>;
1513 regulator-max-microamp = <3500000>;
1514 regulator-boot-on;
1515 regulator-always-on;
1516 };
1517
1518 ldo0 {
1519 regulator-name = "+1.05V_RUN_AVDD";
1520 regulator-min-microvolt = <1050000>;
1521 regulator-max-microvolt = <1050000>;
1522 regulator-boot-on;
1523 regulator-always-on;
1524 ams,external-control = <1>;
1525 };
1526
1527 ldo1 {
1528 regulator-name = "+1.8V_RUN_CAM";
1529 regulator-min-microvolt = <1800000>;
1530 regulator-max-microvolt = <1800000>;
1531 };
1532
1533 ldo2 {
1534 regulator-name = "+1.2V_GEN_AVDD";
1535 regulator-min-microvolt = <1200000>;
1536 regulator-max-microvolt = <1200000>;
1537 regulator-boot-on;
1538 regulator-always-on;
1539 };
1540
1541 ldo3 {
1542 regulator-name = "+1.05V_LP0_VDD_RTC";
1543 regulator-min-microvolt = <1000000>;
1544 regulator-max-microvolt = <1000000>;
1545 regulator-boot-on;
1546 regulator-always-on;
1547 ams,enable-tracking;
1548 };
1549
1550 ldo4 {
1551 regulator-name = "+2.8V_RUN_CAM";
1552 regulator-min-microvolt = <2800000>;
1553 regulator-max-microvolt = <2800000>;
1554 };
1555
1556 ldo5 {
1557 regulator-name = "+1.2V_RUN_CAM_FRONT";
1558 regulator-min-microvolt = <1200000>;
1559 regulator-max-microvolt = <1200000>;
1560 };
1561
1562 vddio_sdmmc3: ldo6 {
1563 regulator-name = "+VDDIO_SDMMC3";
1564 regulator-min-microvolt = <1800000>;
1565 regulator-max-microvolt = <3300000>;
1566 };
1567
1568 ldo7 {
1569 regulator-name = "+1.05V_RUN_CAM_REAR";
1570 regulator-min-microvolt = <1050000>;
1571 regulator-max-microvolt = <1050000>;
1572 };
1573
1574 ldo9 {
1575 regulator-name = "+3.3V_RUN_TOUCH";
1576 regulator-min-microvolt = <2800000>;
1577 regulator-max-microvolt = <2800000>;
1578 };
1579
1580 ldo10 {
1581 regulator-name = "+2.8V_RUN_CAM_AF";
1582 regulator-min-microvolt = <2800000>;
1583 regulator-max-microvolt = <2800000>;
1584 };
1585
1586 ldo11 {
1587 regulator-name = "+1.8V_RUN_VPP_FUSE";
1588 regulator-min-microvolt = <1800000>;
1589 regulator-max-microvolt = <1800000>;
1590 };
1591 };
1592 };
1593 };
1594
1595 /* Expansion TS_SPI_* */
1596 spi@0,7000d400 {
1597 status = "okay";
1598 };
1599
1600 /* Internal SPI */
1601 spi@0,7000da00 {
1602 status = "okay";
1603 spi-max-frequency = <25000000>;
1604 spi-flash@0 {
1605 compatible = "winbond,w25q32dw";
1606 reg = <0>;
1607 spi-max-frequency = <20000000>;
1608 };
1609 };
1610
1611 pmc@0,7000e400 {
1612 nvidia,invert-interrupt;
1613 nvidia,suspend-mode = <1>;
1614 nvidia,cpu-pwr-good-time = <500>;
1615 nvidia,cpu-pwr-off-time = <300>;
1616 nvidia,core-pwr-good-time = <641 3845>;
1617 nvidia,core-pwr-off-time = <61036>;
1618 nvidia,core-power-req-active-high;
1619 nvidia,sys-clock-req-active-high;
1620 };
1621
1622 /* SD card */
1623 sdhci@0,700b0400 {
1624 status = "okay";
1625 cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
1626 power-gpios = <&gpio TEGRA_GPIO(R, 0) GPIO_ACTIVE_HIGH>;
1627 wp-gpios = <&gpio TEGRA_GPIO(Q, 4) GPIO_ACTIVE_HIGH>;
1628 bus-width = <4>;
1629 vqmmc-supply = <&vddio_sdmmc3>;
1630 };
1631
1632 /* eMMC */
1633 sdhci@0,700b0600 {
1634 status = "okay";
1635 bus-width = <8>;
1636 };
1637
1638 ahub@0,70300000 {
1639 i2s@0,70301100 {
1640 status = "okay";
1641 };
1642 };
1643
1644 /* mini-PCIe USB */
1645 usb@0,7d004000 {
1646 status = "okay";
1647 };
1648
1649 usb-phy@0,7d004000 {
1650 status = "okay";
1651 };
1652
1653 /* USB A connector */
1654 usb@0,7d008000 {
1655 status = "okay";
1656 };
1657
1658 usb-phy@0,7d008000 {
1659 status = "okay";
1660 vbus-supply = <&vdd_usb3_vbus>;
1661 };
1662
1663 clocks {
1664 compatible = "simple-bus";
1665 #address-cells = <1>;
1666 #size-cells = <0>;
1667
1668 clk32k_in: clock@0 {
1669 compatible = "fixed-clock";
1670 reg = <0>;
1671 #clock-cells = <0>;
1672 clock-frequency = <32768>;
1673 };
1674 };
1675
1676 gpio-keys {
1677 compatible = "gpio-keys";
1678
1679 power {
1680 label = "Power";
1681 gpios = <&gpio TEGRA_GPIO(Q, 0) GPIO_ACTIVE_LOW>;
1682 linux,code = <KEY_POWER>;
1683 debounce-interval = <10>;
1684 gpio-key,wakeup;
1685 };
1686 };
1687
1688 regulators {
1689 compatible = "simple-bus";
1690 #address-cells = <1>;
1691 #size-cells = <0>;
1692
1693 vdd_mux: regulator@0 {
1694 compatible = "regulator-fixed";
1695 reg = <0>;
1696 regulator-name = "+VDD_MUX";
1697 regulator-min-microvolt = <12000000>;
1698 regulator-max-microvolt = <12000000>;
1699 regulator-always-on;
1700 regulator-boot-on;
1701 };
1702
1703 vdd_5v0_sys: regulator@1 {
1704 compatible = "regulator-fixed";
1705 reg = <1>;
1706 regulator-name = "+5V_SYS";
1707 regulator-min-microvolt = <5000000>;
1708 regulator-max-microvolt = <5000000>;
1709 regulator-always-on;
1710 regulator-boot-on;
1711 vin-supply = <&vdd_mux>;
1712 };
1713
1714 vdd_3v3_sys: regulator@2 {
1715 compatible = "regulator-fixed";
1716 reg = <2>;
1717 regulator-name = "+3.3V_SYS";
1718 regulator-min-microvolt = <3300000>;
1719 regulator-max-microvolt = <3300000>;
1720 regulator-always-on;
1721 regulator-boot-on;
1722 vin-supply = <&vdd_mux>;
1723 };
1724
1725 vdd_3v3_run: regulator@3 {
1726 compatible = "regulator-fixed";
1727 reg = <3>;
1728 regulator-name = "+3.3V_RUN";
1729 regulator-min-microvolt = <3300000>;
1730 regulator-max-microvolt = <3300000>;
1731 regulator-always-on;
1732 regulator-boot-on;
1733 gpio = <&pmic 1 GPIO_ACTIVE_HIGH>;
1734 enable-active-high;
1735 vin-supply = <&vdd_3v3_sys>;
1736 };
1737
1738 vdd_3v3_hdmi: regulator@4 {
1739 compatible = "regulator-fixed";
1740 reg = <4>;
1741 regulator-name = "+3.3V_AVDD_HDMI_AP_GATED";
1742 regulator-min-microvolt = <3300000>;
1743 regulator-max-microvolt = <3300000>;
1744 vin-supply = <&vdd_3v3_run>;
1745 };
1746
1747 vdd_usb1_vbus: regulator@7 {
1748 compatible = "regulator-fixed";
1749 reg = <7>;
1750 regulator-name = "+USB0_VBUS_SW";
1751 regulator-min-microvolt = <5000000>;
1752 regulator-max-microvolt = <5000000>;
1753 gpio = <&gpio TEGRA_GPIO(N, 4) GPIO_ACTIVE_HIGH>;
1754 enable-active-high;
1755 gpio-open-drain;
1756 vin-supply = <&vdd_5v0_sys>;
1757 };
1758
1759 vdd_usb3_vbus: regulator@8 {
1760 compatible = "regulator-fixed";
1761 reg = <8>;
1762 regulator-name = "+5V_USB_HS";
1763 regulator-min-microvolt = <5000000>;
1764 regulator-max-microvolt = <5000000>;
1765 gpio = <&gpio TEGRA_GPIO(N, 5) GPIO_ACTIVE_HIGH>;
1766 enable-active-high;
1767 gpio-open-drain;
1768 vin-supply = <&vdd_5v0_sys>;
1769 };
1770
1771 vdd_3v3_lp0: regulator@10 {
1772 compatible = "regulator-fixed";
1773 reg = <10>;
1774 regulator-name = "+3.3V_LP0";
1775 regulator-min-microvolt = <3300000>;
1776 regulator-max-microvolt = <3300000>;
1777 regulator-always-on;
1778 regulator-boot-on;
1779 gpio = <&pmic 2 GPIO_ACTIVE_HIGH>;
1780 enable-active-high;
1781 vin-supply = <&vdd_3v3_sys>;
1782 };
1783
1784 vdd_hdmi_pll: regulator@11 {
1785 compatible = "regulator-fixed";
1786 reg = <11>;
1787 regulator-name = "+1.05V_RUN_AVDD_HDMI_PLL";
1788 regulator-min-microvolt = <1050000>;
1789 regulator-max-microvolt = <1050000>;
1790 gpio = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_LOW>;
1791 vin-supply = <&vdd_1v05_run>;
1792 };
1793
1794 vdd_5v0_hdmi: regulator@12 {
1795 compatible = "regulator-fixed";
1796 reg = <12>;
1797 regulator-name = "+5V_HDMI_CON";
1798 regulator-min-microvolt = <5000000>;
1799 regulator-max-microvolt = <5000000>;
1800 gpio = <&gpio TEGRA_GPIO(K, 6) GPIO_ACTIVE_HIGH>;
1801 enable-active-high;
1802 vin-supply = <&vdd_5v0_sys>;
1803 };
1804 };
1805
1806 sound {
1807 compatible = "nvidia,tegra-audio-rt5640-jetson-tk1",
1808 "nvidia,tegra-audio-rt5640";
1809 nvidia,model = "NVIDIA Tegra Jetson TK1";
1810
1811 nvidia,audio-routing =
1812 "Headphones", "HPOR",
1813 "Headphones", "HPOL",
1814 "Mic Jack", "MICBIAS1",
1815 "IN2P", "Mic Jack";
1816
1817 nvidia,i2s-controller = <&tegra_i2s1>;
1818 nvidia,audio-codec = <&rt5639>;
1819
1820 nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(R, 7) GPIO_ACTIVE_LOW>;
1821
1822 clocks = <&tegra_car TEGRA124_CLK_PLL_A>,
1823 <&tegra_car TEGRA124_CLK_PLL_A_OUT0>,
1824 <&tegra_car TEGRA124_CLK_EXTERN1>;
1825 clock-names = "pll_a", "pll_a_out0", "mclk";
1826 };
1827};
diff --git a/arch/arm/boot/dts/tegra124-venice2.dts b/arch/arm/boot/dts/tegra124-venice2.dts
index c17283c04598..f0bb84244025 100644
--- a/arch/arm/boot/dts/tegra124-venice2.dts
+++ b/arch/arm/boot/dts/tegra124-venice2.dts
@@ -17,6 +17,18 @@
17 }; 17 };
18 18
19 host1x@0,50000000 { 19 host1x@0,50000000 {
20 hdmi@0,54280000 {
21 status = "okay";
22
23 vdd-supply = <&vdd_3v3_hdmi>;
24 pll-supply = <&vdd_hdmi_pll>;
25 hdmi-supply = <&vdd_5v0_hdmi>;
26
27 nvidia,ddc-i2c-bus = <&hdmi_ddc>;
28 nvidia,hpd-gpio =
29 <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
30 };
31
20 sor@0,54540000 { 32 sor@0,54540000 {
21 status = "okay"; 33 status = "okay";
22 34
@@ -601,7 +613,7 @@
601 clock-frequency = <100000>; 613 clock-frequency = <100000>;
602 }; 614 };
603 615
604 i2c@0,7000c700 { 616 hdmi_ddc: i2c@0,7000c700 {
605 status = "okay"; 617 status = "okay";
606 clock-frequency = <100000>; 618 clock-frequency = <100000>;
607 }; 619 };
@@ -700,7 +712,7 @@
700 regulator-boot-on; 712 regulator-boot-on;
701 }; 713 };
702 714
703 sd4 { 715 vdd_1v05_run: sd4 {
704 regulator-name = "+1.05V_RUN"; 716 regulator-name = "+1.05V_RUN";
705 regulator-min-microvolt = <1050000>; 717 regulator-min-microvolt = <1050000>;
706 regulator-max-microvolt = <1050000>; 718 regulator-max-microvolt = <1050000>;
@@ -931,9 +943,10 @@
931 sdhci@0,700b0400 { 943 sdhci@0,700b0400 {
932 cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>; 944 cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
933 power-gpios = <&gpio TEGRA_GPIO(R, 0) GPIO_ACTIVE_HIGH>; 945 power-gpios = <&gpio TEGRA_GPIO(R, 0) GPIO_ACTIVE_HIGH>;
946 wp-gpios = <&gpio TEGRA_GPIO(Q, 4) GPIO_ACTIVE_LOW>;
934 status = "okay"; 947 status = "okay";
935 bus-width = <4>; 948 bus-width = <4>;
936 vmmc-supply = <&vddio_sdmmc3>; 949 vqmmc-supply = <&vddio_sdmmc3>;
937 }; 950 };
938 951
939 sdhci@0,700b0600 { 952 sdhci@0,700b0600 {
@@ -1060,6 +1073,8 @@
1060 regulator-name = "+3.3V_RUN"; 1073 regulator-name = "+3.3V_RUN";
1061 regulator-min-microvolt = <3300000>; 1074 regulator-min-microvolt = <3300000>;
1062 regulator-max-microvolt = <3300000>; 1075 regulator-max-microvolt = <3300000>;
1076 regulator-always-on;
1077 regulator-boot-on;
1063 gpio = <&pmic 1 GPIO_ACTIVE_HIGH>; 1078 gpio = <&pmic 1 GPIO_ACTIVE_HIGH>;
1064 enable-active-high; 1079 enable-active-high;
1065 vin-supply = <&vdd_3v3_sys>; 1080 vin-supply = <&vdd_3v3_sys>;
@@ -1145,6 +1160,27 @@
1145 enable-active-high; 1160 enable-active-high;
1146 vin-supply = <&vdd_3v3_sys>; 1161 vin-supply = <&vdd_3v3_sys>;
1147 }; 1162 };
1163
1164 vdd_hdmi_pll: regulator@11 {
1165 compatible = "regulator-fixed";
1166 reg = <11>;
1167 regulator-name = "+1.05V_RUN_AVDD_HDMI_PLL";
1168 regulator-min-microvolt = <1050000>;
1169 regulator-max-microvolt = <1050000>;
1170 gpio = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_LOW>;
1171 vin-supply = <&vdd_1v05_run>;
1172 };
1173
1174 vdd_5v0_hdmi: regulator@12 {
1175 compatible = "regulator-fixed";
1176 reg = <12>;
1177 regulator-name = "+5V_HDMI_CON";
1178 regulator-min-microvolt = <5000000>;
1179 regulator-max-microvolt = <5000000>;
1180 gpio = <&gpio TEGRA_GPIO(K, 6) GPIO_ACTIVE_HIGH>;
1181 enable-active-high;
1182 vin-supply = <&vdd_5v0_sys>;
1183 };
1148 }; 1184 };
1149 1185
1150 sound { 1186 sound {
diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi
index 6d540a025148..6e6bc4e8185c 100644
--- a/arch/arm/boot/dts/tegra124.dtsi
+++ b/arch/arm/boot/dts/tegra124.dtsi
@@ -51,6 +51,18 @@
51 nvidia,head = <1>; 51 nvidia,head = <1>;
52 }; 52 };
53 53
54 hdmi@0,54280000 {
55 compatible = "nvidia,tegra124-hdmi";
56 reg = <0x0 0x54280000 0x0 0x00040000>;
57 interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
58 clocks = <&tegra_car TEGRA124_CLK_HDMI>,
59 <&tegra_car TEGRA124_CLK_PLL_D2_OUT0>;
60 clock-names = "hdmi", "parent";
61 resets = <&tegra_car 51>;
62 reset-names = "hdmi";
63 status = "disabled";
64 };
65
54 sor@0,54540000 { 66 sor@0,54540000 {
55 compatible = "nvidia,tegra124-sor"; 67 compatible = "nvidia,tegra124-sor";
56 reg = <0x0 0x54540000 0x0 0x00040000>; 68 reg = <0x0 0x54540000 0x0 0x00040000>;
diff --git a/arch/arm/boot/dts/tegra20-harmony.dts b/arch/arm/boot/dts/tegra20-harmony.dts
index 3fb1f50f6d46..f45aad688d9b 100644
--- a/arch/arm/boot/dts/tegra20-harmony.dts
+++ b/arch/arm/boot/dts/tegra20-harmony.dts
@@ -28,6 +28,7 @@
28 hdmi@54280000 { 28 hdmi@54280000 {
29 status = "okay"; 29 status = "okay";
30 30
31 hdmi-supply = <&vdd_5v0_hdmi>;
31 vdd-supply = <&hdmi_vdd_reg>; 32 vdd-supply = <&hdmi_vdd_reg>;
32 pll-supply = <&hdmi_pll_reg>; 33 pll-supply = <&hdmi_pll_reg>;
33 34
@@ -724,6 +725,17 @@
724 gpio = <&gpio TEGRA_GPIO(W, 0) GPIO_ACTIVE_HIGH>; 725 gpio = <&gpio TEGRA_GPIO(W, 0) GPIO_ACTIVE_HIGH>;
725 enable-active-high; 726 enable-active-high;
726 }; 727 };
728
729 vdd_5v0_hdmi: regulator@6 {
730 compatible = "regulator-fixed";
731 reg = <6>;
732 regulator-name = "VDDIO_HDMI";
733 regulator-min-microvolt = <5000000>;
734 regulator-max-microvolt = <5000000>;
735 gpio = <&gpio TEGRA_GPIO(T, 2) GPIO_ACTIVE_HIGH>;
736 enable-active-high;
737 vin-supply = <&vdd_5v0_reg>;
738 };
727 }; 739 };
728 740
729 sound { 741 sound {
diff --git a/arch/arm/boot/dts/tegra30-beaver.dts b/arch/arm/boot/dts/tegra30-beaver.dts
index e93fe45b7803..3189791a9289 100644
--- a/arch/arm/boot/dts/tegra30-beaver.dts
+++ b/arch/arm/boot/dts/tegra30-beaver.dts
@@ -40,6 +40,7 @@
40 hdmi@54280000 { 40 hdmi@54280000 {
41 status = "okay"; 41 status = "okay";
42 42
43 hdmi-supply = <&vdd_5v0_hdmi>;
43 vdd-supply = <&sys_3v3_reg>; 44 vdd-supply = <&sys_3v3_reg>;
44 pll-supply = <&vio_reg>; 45 pll-supply = <&vio_reg>;
45 46
@@ -478,6 +479,17 @@
478 gpio = <&gpio TEGRA_GPIO(L, 7) GPIO_ACTIVE_HIGH>; 479 gpio = <&gpio TEGRA_GPIO(L, 7) GPIO_ACTIVE_HIGH>;
479 vin-supply = <&sys_3v3_reg>; 480 vin-supply = <&sys_3v3_reg>;
480 }; 481 };
482
483 vdd_5v0_hdmi: regulator@8 {
484 compatible = "regulator-fixed";
485 reg = <8>;
486 regulator-name = "+VDD_5V_HDMI";
487 regulator-min-microvolt = <5000000>;
488 regulator-max-microvolt = <5000000>;
489 regulator-always-on;
490 regulator-boot-on;
491 vin-supply = <&sys_3v3_reg>;
492 };
481 }; 493 };
482 494
483 sound { 495 sound {
diff --git a/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts b/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
new file mode 100644
index 000000000000..7793abd5bef1
--- /dev/null
+++ b/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
@@ -0,0 +1,205 @@
1/dts-v1/;
2
3#include "tegra30-colibri.dtsi"
4
5/ {
6 model = "Toradex Colibri T30 on Colibri Evaluation Board";
7 compatible = "toradex,colibri_t30-eval-v3", "toradex,colibri_t30", "nvidia,tegra30";
8
9 aliases {
10 rtc0 = "/i2c@7000c000/rtc@68";
11 rtc1 = "/i2c@7000d000/tps65911@2d";
12 rtc2 = "/rtc@7000e000";
13 };
14
15 host1x@50000000 {
16 dc@54200000 {
17 rgb {
18 status = "okay";
19 nvidia,panel = <&panel>;
20 };
21 };
22 hdmi@54280000 {
23 status = "okay";
24 };
25 };
26
27 serial@70006000 {
28 status = "okay";
29 };
30
31 serial@70006040 {
32 compatible = "nvidia,tegra30-hsuart";
33 status = "okay";
34 };
35
36 serial@70006300 {
37 compatible = "nvidia,tegra30-hsuart";
38 status = "okay";
39 };
40
41 pwm@7000a000 {
42 status = "okay";
43 };
44
45 /*
46 * GEN1_I2C: I2C_SDA/SCL on SODIMM pin 194/196 (e.g. RTC on carrier
47 * board)
48 */
49 i2c@7000c000 {
50 status = "okay";
51 clock-frequency = <100000>;
52
53 /* M41T0M6 real time clock on carrier board */
54 rtc@68 {
55 compatible = "stm,m41t00";
56 reg = <0x68>;
57 };
58 };
59
60 /* DDC_CLOCK/DATA on X3 pin 15/16 (e.g. display EDID) */
61 hdmiddc: i2c@7000c700 {
62 status = "okay";
63 };
64
65 /* SPI1: Colibri SSP */
66 spi@7000d400 {
67 status = "okay";
68 spi-max-frequency = <25000000>;
69 can0: can@0 {
70 compatible = "microchip,mcp2515";
71 reg = <0>;
72 clocks = <&clk16m>;
73 interrupt-parent = <&gpio>;
74 interrupts = <TEGRA_GPIO(S, 0) GPIO_ACTIVE_LOW>;
75 spi-max-frequency = <10000000>;
76 };
77 spidev0: spi@1 {
78 compatible = "spidev";
79 reg = <1>;
80 spi-max-frequency = <25000000>;
81 };
82 };
83
84 sdhci@78000200 {
85 status = "okay";
86 bus-width = <4>;
87 cd-gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>;
88 no-1-8-v;
89 };
90
91 /* EHCI instance 0: USB1_DP/N -> USBC_P/N */
92 usb@7d000000 {
93 status = "okay";
94 };
95
96 usb-phy@7d000000 {
97 status = "okay";
98 dr_mode = "otg";
99 vbus-supply = <&usbc_vbus_reg>;
100 };
101
102 /* EHCI instance 2: USB3_DP/N -> USBH_P/N */
103 usb@7d008000 {
104 status = "okay";
105 };
106
107 usb-phy@7d008000 {
108 status = "okay";
109 vbus-supply = <&usbh_vbus_reg>;
110 };
111
112 backlight: backlight {
113 compatible = "pwm-backlight";
114
115 /* PWM<A> */
116 pwms = <&pwm 0 5000000>;
117 brightness-levels = <255 128 64 32 16 8 4 0>;
118 default-brightness-level = <6>;
119 /* BL_ON */
120 enable-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
121 };
122
123 clocks {
124 clk16m: clk@1 {
125 compatible = "fixed-clock";
126 reg=<1>;
127 #clock-cells = <0>;
128 clock-frequency = <16000000>;
129 clock-output-names = "clk16m";
130 };
131 };
132
133 gpio-keys {
134 compatible = "gpio-keys";
135
136 power {
137 label = "Power";
138 gpios = <&gpio TEGRA_GPIO(V, 1) GPIO_ACTIVE_HIGH>;
139 linux,code = <KEY_POWER>;
140 debounce-interval = <10>;
141 gpio-key,wakeup;
142 };
143 };
144
145 panel: panel {
146 /*
147 * edt,et057090dhu: EDT 5.7" LCD TFT
148 * edt,et070080dh6: EDT 7.0" LCD TFT
149 */
150 compatible = "edt,et057090dhu", "simple-panel";
151
152 backlight = <&backlight>;
153 };
154
155 pwmleds {
156 compatible = "pwm-leds";
157
158 pwmb {
159 label = "PWM<B>";
160 pwms = <&pwm 1 19600>;
161 max-brightness = <255>;
162 };
163 pwmc {
164 label = "PWM<C>";
165 pwms = <&pwm 2 19600>;
166 max-brightness = <255>;
167 };
168 pwmd {
169 label = "PWM<D>";
170 pwms = <&pwm 3 19600>;
171 max-brightness = <255>;
172 };
173 };
174
175 regulators {
176 sys_5v0_reg: regulator@1 {
177 compatible = "regulator-fixed";
178 reg = <1>;
179 regulator-name = "5v0";
180 regulator-min-microvolt = <5000000>;
181 regulator-max-microvolt = <5000000>;
182 regulator-always-on;
183 };
184
185 usbc_vbus_reg: regulator@2 {
186 compatible = "regulator-fixed";
187 reg = <2>;
188 regulator-name = "usbc_vbus";
189 regulator-min-microvolt = <5000000>;
190 regulator-max-microvolt = <5000000>;
191 vin-supply = <&sys_5v0_reg>;
192 };
193
194 /* USBH_PEN */
195 usbh_vbus_reg: regulator@3 {
196 compatible = "regulator-fixed";
197 reg = <3>;
198 regulator-name = "usbh_vbus";
199 regulator-min-microvolt = <5000000>;
200 regulator-max-microvolt = <5000000>;
201 gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;
202 vin-supply = <&sys_5v0_reg>;
203 };
204 };
205};
diff --git a/arch/arm/boot/dts/tegra30-colibri.dtsi b/arch/arm/boot/dts/tegra30-colibri.dtsi
new file mode 100644
index 000000000000..bf16f8e65627
--- /dev/null
+++ b/arch/arm/boot/dts/tegra30-colibri.dtsi
@@ -0,0 +1,377 @@
1#include <dt-bindings/input/input.h>
2#include "tegra30.dtsi"
3
4/*
5 * Toradex Colibri T30 Device Tree
6 * Compatible for Revisions 1.1B/1.1C/1.1D
7 */
8/ {
9 model = "Toradex Colibri T30";
10 compatible = "toradex,colibri_t30", "nvidia,tegra30";
11
12 memory {
13 reg = <0x80000000 0x40000000>;
14 };
15
16 host1x@50000000 {
17 hdmi@54280000 {
18 vdd-supply = <&sys_3v3_reg>;
19 pll-supply = <&vio_reg>;
20
21 nvidia,hpd-gpio =
22 <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
23 nvidia,ddc-i2c-bus = <&hdmiddc>;
24 };
25 };
26
27 pinmux@70000868 {
28 pinctrl-names = "default";
29 pinctrl-0 = <&state_default>;
30
31 state_default: pinmux {
32 /* Colibri BL_ON */
33 pv2 {
34 nvidia,pins = "pv2";
35 nvidia,function = "rsvd4";
36 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
37 nvidia,tristate = <TEGRA_PIN_DISABLE>;
38 };
39
40 /* Colibri Backlight PWM<A> */
41 sdmmc3_dat3_pb4 {
42 nvidia,pins = "sdmmc3_dat3_pb4";
43 nvidia,function = "pwm0";
44 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
45 nvidia,tristate = <TEGRA_PIN_DISABLE>;
46 };
47
48 /* Colibri CAN_INT */
49 kb_row8_ps0 {
50 nvidia,pins = "kb_row8_ps0";
51 nvidia,function = "kbc";
52 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
53 nvidia,tristate = <TEGRA_PIN_DISABLE>;
54 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
55 };
56
57 /*
58 * Colibri L_BIAS, LCD_M1 is muxed with LCD_DE
59 * todays display need DE, disable LCD_M1
60 */
61 lcd_m1_pw1 {
62 nvidia,pins = "lcd_m1_pw1";
63 nvidia,function = "rsvd3";
64 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
65 nvidia,tristate = <TEGRA_PIN_DISABLE>;
66 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
67 };
68
69 /* Thermal alert, need to be disabled */
70 lcd_dc1_pd2 {
71 nvidia,pins = "lcd_dc1_pd2";
72 nvidia,function = "rsvd3";
73 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
74 nvidia,tristate = <TEGRA_PIN_DISABLE>;
75 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
76 };
77
78 /* Colibri MMC */
79 kb_row10_ps2 {
80 nvidia,pins = "kb_row10_ps2";
81 nvidia,function = "sdmmc2";
82 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
83 nvidia,tristate = <TEGRA_PIN_DISABLE>;
84 };
85 kb_row11_ps3 {
86 nvidia,pins = "kb_row11_ps3",
87 "kb_row12_ps4",
88 "kb_row13_ps5",
89 "kb_row14_ps6",
90 "kb_row15_ps7";
91 nvidia,function = "sdmmc2";
92 nvidia,pull = <TEGRA_PIN_PULL_UP>;
93 nvidia,tristate = <TEGRA_PIN_DISABLE>;
94 };
95
96 /* Colibri SSP */
97 ulpi_clk_py0 {
98 nvidia,pins = "ulpi_clk_py0",
99 "ulpi_dir_py1",
100 "ulpi_nxt_py2",
101 "ulpi_stp_py3";
102 nvidia,function = "spi1";
103 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
104 nvidia,tristate = <TEGRA_PIN_DISABLE>;
105 };
106 sdmmc3_dat6_pd3 {
107 nvidia,pins = "sdmmc3_dat6_pd3",
108 "sdmmc3_dat7_pd4";
109 nvidia,function = "spdif";
110 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
111 nvidia,tristate = <TEGRA_PIN_ENABLE>;
112 };
113
114 /* Colibri UART_A */
115 ulpi_data0 {
116 nvidia,pins = "ulpi_data0_po1",
117 "ulpi_data1_po2",
118 "ulpi_data2_po3",
119 "ulpi_data3_po4",
120 "ulpi_data4_po5",
121 "ulpi_data5_po6",
122 "ulpi_data6_po7",
123 "ulpi_data7_po0";
124 nvidia,function = "uarta";
125 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
126 nvidia,tristate = <TEGRA_PIN_DISABLE>;
127 };
128
129 /* Colibri UART_B */
130 gmi_a16_pj7 {
131 nvidia,pins = "gmi_a16_pj7",
132 "gmi_a17_pb0",
133 "gmi_a18_pb1",
134 "gmi_a19_pk7";
135 nvidia,function = "uartd";
136 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
137 nvidia,tristate = <TEGRA_PIN_DISABLE>;
138 };
139
140 /* Colibri UART_C */
141 uart2_rxd {
142 nvidia,pins = "uart2_rxd_pc3",
143 "uart2_txd_pc2";
144 nvidia,function = "uartb";
145 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
146 nvidia,tristate = <TEGRA_PIN_DISABLE>;
147 };
148
149 /* eMMC */
150 sdmmc4_clk_pcc4 {
151 nvidia,pins = "sdmmc4_clk_pcc4",
152 "sdmmc4_rst_n_pcc3";
153 nvidia,function = "sdmmc4";
154 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
155 nvidia,tristate = <TEGRA_PIN_DISABLE>;
156 };
157 sdmmc4_dat0_paa0 {
158 nvidia,pins = "sdmmc4_dat0_paa0",
159 "sdmmc4_dat1_paa1",
160 "sdmmc4_dat2_paa2",
161 "sdmmc4_dat3_paa3",
162 "sdmmc4_dat4_paa4",
163 "sdmmc4_dat5_paa5",
164 "sdmmc4_dat6_paa6",
165 "sdmmc4_dat7_paa7";
166 nvidia,function = "sdmmc4";
167 nvidia,pull = <TEGRA_PIN_PULL_UP>;
168 nvidia,tristate = <TEGRA_PIN_DISABLE>;
169 };
170 };
171 };
172
173 hdmiddc: i2c@7000c700 {
174 clock-frequency = <100000>;
175 };
176
177 /*
178 * PWR_I2C: power I2C to audio codec, PMIC, temperature sensor and
179 * touch screen controller
180 */
181 i2c@7000d000 {
182 status = "okay";
183 clock-frequency = <100000>;
184
185 pmic: tps65911@2d {
186 compatible = "ti,tps65911";
187 reg = <0x2d>;
188
189 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
190 #interrupt-cells = <2>;
191 interrupt-controller;
192
193 ti,system-power-controller;
194
195 #gpio-cells = <2>;
196 gpio-controller;
197
198 vcc1-supply = <&sys_3v3_reg>;
199 vcc2-supply = <&sys_3v3_reg>;
200 vcc3-supply = <&vio_reg>;
201 vcc4-supply = <&sys_3v3_reg>;
202 vcc5-supply = <&sys_3v3_reg>;
203 vcc6-supply = <&vio_reg>;
204 vcc7-supply = <&sys_5v0_reg>;
205 vccio-supply = <&sys_3v3_reg>;
206
207 regulators {
208 /* SW1: +V1.35_VDDIO_DDR */
209 vdd1_reg: vdd1 {
210 regulator-name = "vddio_ddr_1v35";
211 regulator-min-microvolt = <1350000>;
212 regulator-max-microvolt = <1350000>;
213 regulator-always-on;
214 };
215
216 /* SW2: unused */
217
218 /* SW CTRL: +V1.0_VDD_CPU */
219 vddctrl_reg: vddctrl {
220 regulator-name = "vdd_cpu,vdd_sys";
221 regulator-min-microvolt = <1150000>;
222 regulator-max-microvolt = <1150000>;
223 regulator-always-on;
224 };
225
226 /* SWIO: +V1.8 */
227 vio_reg: vio {
228 regulator-name = "vdd_1v8_gen";
229 regulator-min-microvolt = <1800000>;
230 regulator-max-microvolt = <1800000>;
231 regulator-always-on;
232 };
233
234 /* LDO1: unused */
235
236 /*
237 * EN_+V3.3 switching via FET:
238 * +V3.3_AUDIO_AVDD_S, +V3.3 and +V1.8_VDD_LAN
239 * see also v3_3 fixed supply
240 */
241 ldo2_reg: ldo2 {
242 regulator-name = "en_3v3";
243 regulator-min-microvolt = <3300000>;
244 regulator-max-microvolt = <3300000>;
245 regulator-always-on;
246 };
247
248 /* LDO3: unused */
249
250 /* +V1.2_VDD_RTC */
251 ldo4_reg: ldo4 {
252 regulator-name = "vdd_rtc";
253 regulator-min-microvolt = <1200000>;
254 regulator-max-microvolt = <1200000>;
255 regulator-always-on;
256 };
257
258 /*
259 * +V2.8_AVDD_VDAC:
260 * only required for analog RGB
261 */
262 ldo5_reg: ldo5 {
263 regulator-name = "avdd_vdac";
264 regulator-min-microvolt = <2800000>;
265 regulator-max-microvolt = <2800000>;
266 regulator-always-on;
267 };
268
269 /*
270 * +V1.05_AVDD_PLLE: avdd_plle should be 1.05V
271 * but LDO6 can't set voltage in 50mV
272 * granularity
273 */
274 ldo6_reg: ldo6 {
275 regulator-name = "avdd_plle";
276 regulator-min-microvolt = <1100000>;
277 regulator-max-microvolt = <1100000>;
278 };
279
280 /* +V1.2_AVDD_PLL */
281 ldo7_reg: ldo7 {
282 regulator-name = "avdd_pll";
283 regulator-min-microvolt = <1200000>;
284 regulator-max-microvolt = <1200000>;
285 regulator-always-on;
286 };
287
288 /* +V1.0_VDD_DDR_HS */
289 ldo8_reg: ldo8 {
290 regulator-name = "vdd_ddr_hs";
291 regulator-min-microvolt = <1000000>;
292 regulator-max-microvolt = <1000000>;
293 regulator-always-on;
294 };
295 };
296 };
297
298 /*
299 * LM95245 temperature sensor
300 * Note: OVERT_N directly connected to PMIC PWRDN
301 */
302 temp-sensor@4c {
303 compatible = "national,lm95245";
304 reg = <0x4c>;
305 };
306
307 /* SW: +V1.2_VDD_CORE */
308 tps62362@60 {
309 compatible = "ti,tps62362";
310 reg = <0x60>;
311
312 regulator-name = "tps62362-vout";
313 regulator-min-microvolt = <900000>;
314 regulator-max-microvolt = <1400000>;
315 regulator-boot-on;
316 regulator-always-on;
317 ti,vsel0-state-low;
318 /* VSEL1: EN_CORE_DVFS_N low for DVFS */
319 ti,vsel1-state-low;
320 };
321 };
322
323 pmc@7000e400 {
324 nvidia,invert-interrupt;
325 nvidia,suspend-mode = <1>;
326 nvidia,cpu-pwr-good-time = <5000>;
327 nvidia,cpu-pwr-off-time = <5000>;
328 nvidia,core-pwr-good-time = <3845 3845>;
329 nvidia,core-pwr-off-time = <0>;
330 nvidia,core-power-req-active-high;
331 nvidia,sys-clock-req-active-high;
332 };
333
334 emmc: sdhci@78000600 {
335 status = "okay";
336 bus-width = <8>;
337 non-removable;
338 };
339
340 /* EHCI instance 1: USB2_DP/N -> AX88772B */
341 usb@7d004000 {
342 status = "okay";
343 };
344
345 usb-phy@7d004000 {
346 status = "okay";
347 nvidia,is-wired = <1>;
348 };
349
350 clocks {
351 compatible = "simple-bus";
352 #address-cells = <1>;
353 #size-cells = <0>;
354
355 clk32k_in: clk@0 {
356 compatible = "fixed-clock";
357 reg=<0>;
358 #clock-cells = <0>;
359 clock-frequency = <32768>;
360 };
361 };
362
363 regulators {
364 compatible = "simple-bus";
365 #address-cells = <1>;
366 #size-cells = <0>;
367
368 sys_3v3_reg: regulator@100 {
369 compatible = "regulator-fixed";
370 reg = <100>;
371 regulator-name = "3v3";
372 regulator-min-microvolt = <3300000>;
373 regulator-max-microvolt = <3300000>;
374 regulator-always-on;
375 };
376 };
377};
diff --git a/arch/arm/boot/dts/twl4030.dtsi b/arch/arm/boot/dts/twl4030.dtsi
index 86cfc7d15ca7..36ae9160b558 100644
--- a/arch/arm/boot/dts/twl4030.dtsi
+++ b/arch/arm/boot/dts/twl4030.dtsi
@@ -152,4 +152,10 @@
152 keypad,num-rows = <8>; 152 keypad,num-rows = <8>;
153 keypad,num-columns = <8>; 153 keypad,num-columns = <8>;
154 }; 154 };
155
156 twl_madc: madc {
157 compatible = "ti,twl4030-madc";
158 interrupts = <3>;
159 #io-channel-cells = <1>;
160 };
155}; 161};
diff --git a/arch/arm/boot/dts/twl4030_omap3.dtsi b/arch/arm/boot/dts/twl4030_omap3.dtsi
index c353ef0a6ac7..3537ae5b2146 100644
--- a/arch/arm/boot/dts/twl4030_omap3.dtsi
+++ b/arch/arm/boot/dts/twl4030_omap3.dtsi
@@ -8,7 +8,7 @@
8 8
9&twl { 9&twl {
10 pinctrl-names = "default"; 10 pinctrl-names = "default";
11 pinctrl-0 = <&twl4030_pins>; 11 pinctrl-0 = <&twl4030_pins &twl4030_vpins>;
12}; 12};
13 13
14&omap3_pmx_core { 14&omap3_pmx_core {
@@ -23,3 +23,20 @@
23 >; 23 >;
24 }; 24 };
25}; 25};
26
27/*
28 * If your board is not using the I2C4 pins with twl4030, then don't include
29 * this file. For proper idle mode signaling with sys_clkreq and sys_off_mode
30 * pins we need to configure I2C4, or else use the legacy sys_nvmode1 and
31 * sys_nvmode2 signaling.
32 */
33&omap3_pmx_wkup {
34 twl4030_vpins: pinmux_twl4030_vpins {
35 pinctrl-single,pins = <
36 OMAP3_WKUP_IOPAD(0x2a00, PIN_INPUT | MUX_MODE0) /* i2c4_scl.i2c4_scl */
37 OMAP3_WKUP_IOPAD(0x2a02, PIN_INPUT | MUX_MODE0) /* i2c4_sda.i2c4_sda */
38 OMAP3_WKUP_IOPAD(0x2a06, PIN_OUTPUT | MUX_MODE0) /* sys_clkreq.sys_clkreq */
39 OMAP3_WKUP_IOPAD(0x2a18, PIN_OUTPUT | MUX_MODE0) /* sys_off_mode.sys_off_mode */
40 >;
41 };
42};
diff --git a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi
index ac870fb3fa0d..756c986995a3 100644
--- a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi
+++ b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi
@@ -74,8 +74,24 @@
74 v2m_sysreg: sysreg@010000 { 74 v2m_sysreg: sysreg@010000 {
75 compatible = "arm,vexpress-sysreg"; 75 compatible = "arm,vexpress-sysreg";
76 reg = <0x010000 0x1000>; 76 reg = <0x010000 0x1000>;
77 gpio-controller; 77
78 #gpio-cells = <2>; 78 v2m_led_gpios: sys_led@08 {
79 compatible = "arm,vexpress-sysreg,sys_led";
80 gpio-controller;
81 #gpio-cells = <2>;
82 };
83
84 v2m_mmc_gpios: sys_mci@48 {
85 compatible = "arm,vexpress-sysreg,sys_mci";
86 gpio-controller;
87 #gpio-cells = <2>;
88 };
89
90 v2m_flash_gpios: sys_flash@4c {
91 compatible = "arm,vexpress-sysreg,sys_flash";
92 gpio-controller;
93 #gpio-cells = <2>;
94 };
79 }; 95 };
80 96
81 v2m_sysctl: sysctl@020000 { 97 v2m_sysctl: sysctl@020000 {
@@ -113,8 +129,8 @@
113 compatible = "arm,pl180", "arm,primecell"; 129 compatible = "arm,pl180", "arm,primecell";
114 reg = <0x050000 0x1000>; 130 reg = <0x050000 0x1000>;
115 interrupts = <9 10>; 131 interrupts = <9 10>;
116 cd-gpios = <&v2m_sysreg 0 0>; 132 cd-gpios = <&v2m_mmc_gpios 0 0>;
117 wp-gpios = <&v2m_sysreg 1 0>; 133 wp-gpios = <&v2m_mmc_gpios 1 0>;
118 max-frequency = <12000000>; 134 max-frequency = <12000000>;
119 vmmc-supply = <&v2m_fixed_3v3>; 135 vmmc-supply = <&v2m_fixed_3v3>;
120 clocks = <&v2m_clk24mhz>, <&smbclk>; 136 clocks = <&v2m_clk24mhz>, <&smbclk>;
@@ -265,6 +281,58 @@
265 clock-output-names = "v2m:refclk32khz"; 281 clock-output-names = "v2m:refclk32khz";
266 }; 282 };
267 283
284 leds {
285 compatible = "gpio-leds";
286
287 user@1 {
288 label = "v2m:green:user1";
289 gpios = <&v2m_led_gpios 0 0>;
290 linux,default-trigger = "heartbeat";
291 };
292
293 user@2 {
294 label = "v2m:green:user2";
295 gpios = <&v2m_led_gpios 1 0>;
296 linux,default-trigger = "mmc0";
297 };
298
299 user@3 {
300 label = "v2m:green:user3";
301 gpios = <&v2m_led_gpios 2 0>;
302 linux,default-trigger = "cpu0";
303 };
304
305 user@4 {
306 label = "v2m:green:user4";
307 gpios = <&v2m_led_gpios 3 0>;
308 linux,default-trigger = "cpu1";
309 };
310
311 user@5 {
312 label = "v2m:green:user5";
313 gpios = <&v2m_led_gpios 4 0>;
314 linux,default-trigger = "cpu2";
315 };
316
317 user@6 {
318 label = "v2m:green:user6";
319 gpios = <&v2m_led_gpios 5 0>;
320 linux,default-trigger = "cpu3";
321 };
322
323 user@7 {
324 label = "v2m:green:user7";
325 gpios = <&v2m_led_gpios 6 0>;
326 linux,default-trigger = "cpu4";
327 };
328
329 user@8 {
330 label = "v2m:green:user8";
331 gpios = <&v2m_led_gpios 7 0>;
332 linux,default-trigger = "cpu5";
333 };
334 };
335
268 mcc { 336 mcc {
269 compatible = "arm,vexpress,config-bus"; 337 compatible = "arm,vexpress,config-bus";
270 arm,vexpress,config-bridge = <&v2m_sysreg>; 338 arm,vexpress,config-bridge = <&v2m_sysreg>;
diff --git a/arch/arm/boot/dts/vexpress-v2m.dtsi b/arch/arm/boot/dts/vexpress-v2m.dtsi
index f1420368355b..ba856d604fb7 100644
--- a/arch/arm/boot/dts/vexpress-v2m.dtsi
+++ b/arch/arm/boot/dts/vexpress-v2m.dtsi
@@ -73,8 +73,24 @@
73 v2m_sysreg: sysreg@00000 { 73 v2m_sysreg: sysreg@00000 {
74 compatible = "arm,vexpress-sysreg"; 74 compatible = "arm,vexpress-sysreg";
75 reg = <0x00000 0x1000>; 75 reg = <0x00000 0x1000>;
76 gpio-controller; 76
77 #gpio-cells = <2>; 77 v2m_led_gpios: sys_led@08 {
78 compatible = "arm,vexpress-sysreg,sys_led";
79 gpio-controller;
80 #gpio-cells = <2>;
81 };
82
83 v2m_mmc_gpios: sys_mci@48 {
84 compatible = "arm,vexpress-sysreg,sys_mci";
85 gpio-controller;
86 #gpio-cells = <2>;
87 };
88
89 v2m_flash_gpios: sys_flash@4c {
90 compatible = "arm,vexpress-sysreg,sys_flash";
91 gpio-controller;
92 #gpio-cells = <2>;
93 };
78 }; 94 };
79 95
80 v2m_sysctl: sysctl@01000 { 96 v2m_sysctl: sysctl@01000 {
@@ -112,8 +128,8 @@
112 compatible = "arm,pl180", "arm,primecell"; 128 compatible = "arm,pl180", "arm,primecell";
113 reg = <0x05000 0x1000>; 129 reg = <0x05000 0x1000>;
114 interrupts = <9 10>; 130 interrupts = <9 10>;
115 cd-gpios = <&v2m_sysreg 0 0>; 131 cd-gpios = <&v2m_mmc_gpios 0 0>;
116 wp-gpios = <&v2m_sysreg 1 0>; 132 wp-gpios = <&v2m_mmc_gpios 1 0>;
117 max-frequency = <12000000>; 133 max-frequency = <12000000>;
118 vmmc-supply = <&v2m_fixed_3v3>; 134 vmmc-supply = <&v2m_fixed_3v3>;
119 clocks = <&v2m_clk24mhz>, <&smbclk>; 135 clocks = <&v2m_clk24mhz>, <&smbclk>;
@@ -264,6 +280,58 @@
264 clock-output-names = "v2m:refclk32khz"; 280 clock-output-names = "v2m:refclk32khz";
265 }; 281 };
266 282
283 leds {
284 compatible = "gpio-leds";
285
286 user@1 {
287 label = "v2m:green:user1";
288 gpios = <&v2m_led_gpios 0 0>;
289 linux,default-trigger = "heartbeat";
290 };
291
292 user@2 {
293 label = "v2m:green:user2";
294 gpios = <&v2m_led_gpios 1 0>;
295 linux,default-trigger = "mmc0";
296 };
297
298 user@3 {
299 label = "v2m:green:user3";
300 gpios = <&v2m_led_gpios 2 0>;
301 linux,default-trigger = "cpu0";
302 };
303
304 user@4 {
305 label = "v2m:green:user4";
306 gpios = <&v2m_led_gpios 3 0>;
307 linux,default-trigger = "cpu1";
308 };
309
310 user@5 {
311 label = "v2m:green:user5";
312 gpios = <&v2m_led_gpios 4 0>;
313 linux,default-trigger = "cpu2";
314 };
315
316 user@6 {
317 label = "v2m:green:user6";
318 gpios = <&v2m_led_gpios 5 0>;
319 linux,default-trigger = "cpu3";
320 };
321
322 user@7 {
323 label = "v2m:green:user7";
324 gpios = <&v2m_led_gpios 6 0>;
325 linux,default-trigger = "cpu4";
326 };
327
328 user@8 {
329 label = "v2m:green:user8";
330 gpios = <&v2m_led_gpios 7 0>;
331 linux,default-trigger = "cpu5";
332 };
333 };
334
267 mcc { 335 mcc {
268 compatible = "arm,vexpress,config-bus"; 336 compatible = "arm,vexpress,config-bus";
269 arm,vexpress,config-bridge = <&v2m_sysreg>; 337 arm,vexpress,config-bridge = <&v2m_sysreg>;
diff --git a/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts b/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
index 15f98cbcb75a..a25c262326dc 100644
--- a/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
+++ b/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
@@ -312,6 +312,7 @@
312 arm,vexpress-sysreg,func = <12 0>; 312 arm,vexpress-sysreg,func = <12 0>;
313 label = "A15 Pcore"; 313 label = "A15 Pcore";
314 }; 314 };
315
315 power@1 { 316 power@1 {
316 /* Total power for the three A7 cores */ 317 /* Total power for the three A7 cores */
317 compatible = "arm,vexpress-power"; 318 compatible = "arm,vexpress-power";
@@ -322,14 +323,14 @@
322 energy@0 { 323 energy@0 {
323 /* Total energy for the two A15 cores */ 324 /* Total energy for the two A15 cores */
324 compatible = "arm,vexpress-energy"; 325 compatible = "arm,vexpress-energy";
325 arm,vexpress-sysreg,func = <13 0>; 326 arm,vexpress-sysreg,func = <13 0>, <13 1>;
326 label = "A15 Jcore"; 327 label = "A15 Jcore";
327 }; 328 };
328 329
329 energy@2 { 330 energy@2 {
330 /* Total energy for the three A7 cores */ 331 /* Total energy for the three A7 cores */
331 compatible = "arm,vexpress-energy"; 332 compatible = "arm,vexpress-energy";
332 arm,vexpress-sysreg,func = <13 2>; 333 arm,vexpress-sysreg,func = <13 2>, <13 3>;
333 label = "A7 Jcore"; 334 label = "A7 Jcore";
334 }; 335 };
335 }; 336 };
diff --git a/arch/arm/boot/dts/vexpress-v2p-ca5s.dts b/arch/arm/boot/dts/vexpress-v2p-ca5s.dts
index c544a5504591..d2709b73316b 100644
--- a/arch/arm/boot/dts/vexpress-v2p-ca5s.dts
+++ b/arch/arm/boot/dts/vexpress-v2p-ca5s.dts
@@ -88,6 +88,14 @@
88 interrupts = <1 13 0x304>; 88 interrupts = <1 13 0x304>;
89 }; 89 };
90 90
91 timer@2c000200 {
92 compatible = "arm,cortex-a5-global-timer",
93 "arm,cortex-a9-global-timer";
94 reg = <0x2c000200 0x20>;
95 interrupts = <1 11 0x304>;
96 clocks = <&oscclk0>;
97 };
98
91 watchdog@2c000620 { 99 watchdog@2c000620 {
92 compatible = "arm,cortex-a5-twd-wdt"; 100 compatible = "arm,cortex-a5-twd-wdt";
93 reg = <0x2c000620 0x20>; 101 reg = <0x2c000620 0x20>;
@@ -120,7 +128,7 @@
120 compatible = "arm,vexpress,config-bus"; 128 compatible = "arm,vexpress,config-bus";
121 arm,vexpress,config-bridge = <&v2m_sysreg>; 129 arm,vexpress,config-bridge = <&v2m_sysreg>;
122 130
123 osc@0 { 131 oscclk0: osc@0 {
124 /* CPU and internal AXI reference clock */ 132 /* CPU and internal AXI reference clock */
125 compatible = "arm,vexpress-osc"; 133 compatible = "arm,vexpress-osc";
126 arm,vexpress-sysreg,func = <1 0>; 134 arm,vexpress-sysreg,func = <1 0>;
diff --git a/arch/arm/boot/dts/vf610-colibri.dts b/arch/arm/boot/dts/vf610-colibri.dts
new file mode 100644
index 000000000000..aecc7dbc65e8
--- /dev/null
+++ b/arch/arm/boot/dts/vf610-colibri.dts
@@ -0,0 +1,123 @@
1/*
2 * Copyright 2014 Toradex AG
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 as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 */
9
10/dts-v1/;
11#include "vf610.dtsi"
12
13/ {
14 model = "Toradex Colibri VF61 COM";
15 compatible = "toradex,vf610-colibri", "fsl,vf610";
16
17 chosen {
18 bootargs = "console=ttyLP0,115200";
19 };
20
21 memory {
22 reg = <0x80000000 0x10000000>;
23 };
24
25 clocks {
26 enet_ext {
27 compatible = "fixed-clock";
28 #clock-cells = <0>;
29 clock-frequency = <50000000>;
30 };
31 };
32
33};
34
35&esdhc1 {
36 pinctrl-names = "default";
37 pinctrl-0 = <&pinctrl_esdhc1>;
38 bus-width = <4>;
39 status = "okay";
40};
41
42&fec1 {
43 phy-mode = "rmii";
44 pinctrl-names = "default";
45 pinctrl-0 = <&pinctrl_fec1>;
46 status = "okay";
47};
48
49&L2 {
50 arm,data-latency = <2 1 2>;
51 arm,tag-latency = <3 2 3>;
52};
53
54&uart0 {
55 pinctrl-names = "default";
56 pinctrl-0 = <&pinctrl_uart0>;
57 status = "okay";
58};
59
60&uart1 {
61 pinctrl-names = "default";
62 pinctrl-0 = <&pinctrl_uart1>;
63 status = "okay";
64};
65
66&uart2 {
67 pinctrl-names = "default";
68 pinctrl-0 = <&pinctrl_uart2>;
69 status = "okay";
70};
71
72&iomuxc {
73 vf610-colibri {
74 pinctrl_esdhc1: esdhc1grp {
75 fsl,fsl,pins = <
76 VF610_PAD_PTA24__ESDHC1_CLK 0x31ef
77 VF610_PAD_PTA25__ESDHC1_CMD 0x31ef
78 VF610_PAD_PTA26__ESDHC1_DAT0 0x31ef
79 VF610_PAD_PTA27__ESDHC1_DAT1 0x31ef
80 VF610_PAD_PTA28__ESDHC1_DATA2 0x31ef
81 VF610_PAD_PTA29__ESDHC1_DAT3 0x31ef
82 VF610_PAD_PTB20__GPIO_42 0x219d
83 >;
84 };
85
86 pinctrl_fec1: fec1grp {
87 fsl,pins = <
88 VF610_PAD_PTC9__ENET_RMII1_MDC 0x30d2
89 VF610_PAD_PTC10__ENET_RMII1_MDIO 0x30d3
90 VF610_PAD_PTC11__ENET_RMII1_CRS 0x30d1
91 VF610_PAD_PTC12__ENET_RMII_RXD1 0x30d1
92 VF610_PAD_PTC13__ENET_RMII1_RXD0 0x30d1
93 VF610_PAD_PTC14__ENET_RMII1_RXER 0x30d1
94 VF610_PAD_PTC15__ENET_RMII1_TXD1 0x30d2
95 VF610_PAD_PTC16__ENET_RMII1_TXD0 0x30d2
96 VF610_PAD_PTC17__ENET_RMII1_TXEN 0x30d2
97 >;
98 };
99
100 pinctrl_uart0: uart0grp {
101 fsl,pins = <
102 VF610_PAD_PTB10__UART0_TX 0x21a2
103 VF610_PAD_PTB11__UART0_RX 0x21a1
104 >;
105 };
106
107 pinctrl_uart1: uart1grp {
108 fsl,pins = <
109 VF610_PAD_PTB4__UART1_TX 0x21a2
110 VF610_PAD_PTB5__UART1_RX 0x21a1
111 >;
112 };
113
114 pinctrl_uart2: uart2grp {
115 fsl,pins = <
116 VF610_PAD_PTD0__UART2_TX 0x21a2
117 VF610_PAD_PTD1__UART2_RX 0x21a1
118 VF610_PAD_PTD2__UART2_RTS 0x21a2
119 VF610_PAD_PTD3__UART2_CTS 0x21a1
120 >;
121 };
122 };
123};
diff --git a/arch/arm/boot/dts/vf610-twr.dts b/arch/arm/boot/dts/vf610-twr.dts
index ded361075aab..11d733406c7e 100644
--- a/arch/arm/boot/dts/vf610-twr.dts
+++ b/arch/arm/boot/dts/vf610-twr.dts
@@ -113,6 +113,13 @@
113 }; 113 };
114}; 114};
115 115
116&esdhc1 {
117 pinctrl-names = "default";
118 pinctrl-0 = <&pinctrl_esdhc1>;
119 bus-width = <4>;
120 status = "okay";
121};
122
116&fec0 { 123&fec0 {
117 phy-mode = "rmii"; 124 phy-mode = "rmii";
118 pinctrl-names = "default"; 125 pinctrl-names = "default";
@@ -160,6 +167,18 @@
160 >; 167 >;
161 }; 168 };
162 169
170 pinctrl_esdhc1: esdhc1grp {
171 fsl,fsl,pins = <
172 VF610_PAD_PTA24__ESDHC1_CLK 0x31ef
173 VF610_PAD_PTA25__ESDHC1_CMD 0x31ef
174 VF610_PAD_PTA26__ESDHC1_DAT0 0x31ef
175 VF610_PAD_PTA27__ESDHC1_DAT1 0x31ef
176 VF610_PAD_PTA28__ESDHC1_DATA2 0x31ef
177 VF610_PAD_PTA29__ESDHC1_DAT3 0x31ef
178 VF610_PAD_PTA7__GPIO_134 0x219d
179 >;
180 };
181
163 pinctrl_fec0: fec0grp { 182 pinctrl_fec0: fec0grp {
164 fsl,pins = < 183 fsl,pins = <
165 VF610_PAD_PTA6__RMII_CLKIN 0x30d1 184 VF610_PAD_PTA6__RMII_CLKIN 0x30d1
@@ -196,6 +215,17 @@
196 >; 215 >;
197 }; 216 };
198 217
218 pinctrl_pwm0: pwm0grp {
219 fsl,pins = <
220 VF610_PAD_PTB0__FTM0_CH0 0x1582
221 VF610_PAD_PTB1__FTM0_CH1 0x1582
222 VF610_PAD_PTB2__FTM0_CH2 0x1582
223 VF610_PAD_PTB3__FTM0_CH3 0x1582
224 VF610_PAD_PTB6__FTM0_CH6 0x1582
225 VF610_PAD_PTB7__FTM0_CH7 0x1582
226 >;
227 };
228
199 pinctrl_sai2: sai2grp { 229 pinctrl_sai2: sai2grp {
200 fsl,pins = < 230 fsl,pins = <
201 VF610_PAD_PTA16__SAI2_TX_BCLK 0x02ed 231 VF610_PAD_PTA16__SAI2_TX_BCLK 0x02ed
@@ -217,6 +247,12 @@
217 }; 247 };
218}; 248};
219 249
250&pwm0 {
251 pinctrl-names = "default";
252 pinctrl-0 = <&pinctrl_pwm0>;
253 status = "okay";
254};
255
220&sai2 { 256&sai2 {
221 #sound-dai-cells = <0>; 257 #sound-dai-cells = <0>;
222 pinctrl-names = "default"; 258 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/vf610.dtsi b/arch/arm/boot/dts/vf610.dtsi
index b8ce0aa7b157..6cc314e7b8fb 100644
--- a/arch/arm/boot/dts/vf610.dtsi
+++ b/arch/arm/boot/dts/vf610.dtsi
@@ -183,6 +183,19 @@
183 clock-names = "pit"; 183 clock-names = "pit";
184 }; 184 };
185 185
186 pwm0: pwm@40038000 {
187 compatible = "fsl,vf610-ftm-pwm";
188 #pwm-cells = <3>;
189 reg = <0x40038000 0x1000>;
190 clock-names = "ftm_sys", "ftm_ext",
191 "ftm_fix", "ftm_cnt_clk_en";
192 clocks = <&clks VF610_CLK_FTM0>,
193 <&clks VF610_CLK_FTM0_EXT_SEL>,
194 <&clks VF610_CLK_FTM0_FIX_SEL>,
195 <&clks VF610_CLK_FTM0_EXT_FIX_EN>;
196 status = "disabled";
197 };
198
186 adc0: adc@4003b000 { 199 adc0: adc@4003b000 {
187 compatible = "fsl,vf610-adc"; 200 compatible = "fsl,vf610-adc";
188 reg = <0x4003b000 0x1000>; 201 reg = <0x4003b000 0x1000>;
@@ -347,6 +360,30 @@
347 status = "disabled"; 360 status = "disabled";
348 }; 361 };
349 362
363 esdhc1: esdhc@400b2000 {
364 compatible = "fsl,imx53-esdhc";
365 reg = <0x400b2000 0x4000>;
366 interrupts = <0 28 0x04>;
367 clocks = <&clks VF610_CLK_IPG_BUS>,
368 <&clks VF610_CLK_PLATFORM_BUS>,
369 <&clks VF610_CLK_ESDHC1>;
370 clock-names = "ipg", "ahb", "per";
371 status = "disabled";
372 };
373
374 ftm: ftm@400b8000 {
375 compatible = "fsl,ftm-timer";
376 reg = <0x400b8000 0x1000 0x400b9000 0x1000>;
377 interrupts = <0 44 IRQ_TYPE_LEVEL_HIGH>;
378 clock-names = "ftm-evt", "ftm-src",
379 "ftm-evt-counter-en", "ftm-src-counter-en";
380 clocks = <&clks VF610_CLK_FTM2>,
381 <&clks VF610_CLK_FTM3>,
382 <&clks VF610_CLK_FTM2_EXT_FIX_EN>,
383 <&clks VF610_CLK_FTM3_EXT_FIX_EN>;
384 status = "disabled";
385 };
386
350 fec0: ethernet@400d0000 { 387 fec0: ethernet@400d0000 {
351 compatible = "fsl,mvf600-fec"; 388 compatible = "fsl,mvf600-fec";
352 reg = <0x400d0000 0x1000>; 389 reg = <0x400d0000 0x1000>;
diff --git a/arch/arm/boot/dts/zynq-7000.dtsi b/arch/arm/boot/dts/zynq-7000.dtsi
index c1176abc34d9..760bbc463c5b 100644
--- a/arch/arm/boot/dts/zynq-7000.dtsi
+++ b/arch/arm/boot/dts/zynq-7000.dtsi
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2011 Xilinx 2 * Copyright (C) 2011 - 2014 Xilinx
3 * 3 *
4 * This software is licensed under the terms of the GNU General Public 4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and 5 * License version 2, as published by the Free Software Foundation, and
@@ -25,6 +25,7 @@
25 reg = <0>; 25 reg = <0>;
26 clocks = <&clkc 3>; 26 clocks = <&clkc 3>;
27 clock-latency = <1000>; 27 clock-latency = <1000>;
28 cpu0-supply = <&regulator_vccpint>;
28 operating-points = < 29 operating-points = <
29 /* kHz uV */ 30 /* kHz uV */
30 666667 1000000 31 666667 1000000
@@ -48,6 +49,15 @@
48 reg = < 0xf8891000 0x1000 0xf8893000 0x1000 >; 49 reg = < 0xf8891000 0x1000 0xf8893000 0x1000 >;
49 }; 50 };
50 51
52 regulator_vccpint: fixedregulator@0 {
53 compatible = "regulator-fixed";
54 regulator-name = "VCCPINT";
55 regulator-min-microvolt = <1000000>;
56 regulator-max-microvolt = <1000000>;
57 regulator-boot-on;
58 regulator-always-on;
59 };
60
51 amba { 61 amba {
52 compatible = "simple-bus"; 62 compatible = "simple-bus";
53 #address-cells = <1>; 63 #address-cells = <1>;
@@ -55,7 +65,7 @@
55 interrupt-parent = <&intc>; 65 interrupt-parent = <&intc>;
56 ranges; 66 ranges;
57 67
58 i2c0: zynq-i2c@e0004000 { 68 i2c0: i2c@e0004000 {
59 compatible = "cdns,i2c-r1p10"; 69 compatible = "cdns,i2c-r1p10";
60 status = "disabled"; 70 status = "disabled";
61 clocks = <&clkc 38>; 71 clocks = <&clkc 38>;
@@ -66,7 +76,7 @@
66 #size-cells = <0>; 76 #size-cells = <0>;
67 }; 77 };
68 78
69 i2c1: zynq-i2c@e0005000 { 79 i2c1: i2c@e0005000 {
70 compatible = "cdns,i2c-r1p10"; 80 compatible = "cdns,i2c-r1p10";
71 status = "disabled"; 81 status = "disabled";
72 clocks = <&clkc 39>; 82 clocks = <&clkc 39>;
@@ -80,7 +90,6 @@
80 intc: interrupt-controller@f8f01000 { 90 intc: interrupt-controller@f8f01000 {
81 compatible = "arm,cortex-a9-gic"; 91 compatible = "arm,cortex-a9-gic";
82 #interrupt-cells = <3>; 92 #interrupt-cells = <3>;
83 #address-cells = <1>;
84 interrupt-controller; 93 interrupt-controller;
85 reg = <0xF8F01000 0x1000>, 94 reg = <0xF8F01000 0x1000>,
86 <0xF8F00100 0x100>; 95 <0xF8F00100 0x100>;
@@ -95,7 +104,7 @@
95 cache-level = <2>; 104 cache-level = <2>;
96 }; 105 };
97 106
98 uart0: uart@e0000000 { 107 uart0: serial@e0000000 {
99 compatible = "xlnx,xuartps"; 108 compatible = "xlnx,xuartps";
100 status = "disabled"; 109 status = "disabled";
101 clocks = <&clkc 23>, <&clkc 40>; 110 clocks = <&clkc 23>, <&clkc 40>;
@@ -104,7 +113,7 @@
104 interrupts = <0 27 4>; 113 interrupts = <0 27 4>;
105 }; 114 };
106 115
107 uart1: uart@e0001000 { 116 uart1: serial@e0001000 {
108 compatible = "xlnx,xuartps"; 117 compatible = "xlnx,xuartps";
109 status = "disabled"; 118 status = "disabled";
110 clocks = <&clkc 24>, <&clkc 41>; 119 clocks = <&clkc 24>, <&clkc 41>;
@@ -131,7 +140,7 @@
131 clock-names = "pclk", "hclk", "tx_clk"; 140 clock-names = "pclk", "hclk", "tx_clk";
132 }; 141 };
133 142
134 sdhci0: ps7-sdhci@e0100000 { 143 sdhci0: sdhci@e0100000 {
135 compatible = "arasan,sdhci-8.9a"; 144 compatible = "arasan,sdhci-8.9a";
136 status = "disabled"; 145 status = "disabled";
137 clock-names = "clk_xin", "clk_ahb"; 146 clock-names = "clk_xin", "clk_ahb";
@@ -141,7 +150,7 @@
141 reg = <0xe0100000 0x1000>; 150 reg = <0xe0100000 0x1000>;
142 } ; 151 } ;
143 152
144 sdhci1: ps7-sdhci@e0101000 { 153 sdhci1: sdhci@e0101000 {
145 compatible = "arasan,sdhci-8.9a"; 154 compatible = "arasan,sdhci-8.9a";
146 status = "disabled"; 155 status = "disabled";
147 clock-names = "clk_xin", "clk_ahb"; 156 clock-names = "clk_xin", "clk_ahb";
@@ -177,6 +186,11 @@
177 }; 186 };
178 }; 187 };
179 188
189 devcfg: devcfg@f8007000 {
190 compatible = "xlnx,zynq-devcfg-1.0";
191 reg = <0xf8007000 0x100>;
192 } ;
193
180 global_timer: timer@f8f00200 { 194 global_timer: timer@f8f00200 {
181 compatible = "arm,cortex-a9-global-timer"; 195 compatible = "arm,cortex-a9-global-timer";
182 reg = <0xf8f00200 0x20>; 196 reg = <0xf8f00200 0x20>;
@@ -185,26 +199,27 @@
185 clocks = <&clkc 4>; 199 clocks = <&clkc 4>;
186 }; 200 };
187 201
188 ttc0: ttc0@f8001000 { 202 ttc0: timer@f8001000 {
189 interrupt-parent = <&intc>; 203 interrupt-parent = <&intc>;
190 interrupts = < 0 10 4 0 11 4 0 12 4 >; 204 interrupts = <0 10 4>, <0 11 4>, <0 12 4>;
191 compatible = "cdns,ttc"; 205 compatible = "cdns,ttc";
192 clocks = <&clkc 6>; 206 clocks = <&clkc 6>;
193 reg = <0xF8001000 0x1000>; 207 reg = <0xF8001000 0x1000>;
194 }; 208 };
195 209
196 ttc1: ttc1@f8002000 { 210 ttc1: timer@f8002000 {
197 interrupt-parent = <&intc>; 211 interrupt-parent = <&intc>;
198 interrupts = < 0 37 4 0 38 4 0 39 4 >; 212 interrupts = <0 37 4>, <0 38 4>, <0 39 4>;
199 compatible = "cdns,ttc"; 213 compatible = "cdns,ttc";
200 clocks = <&clkc 6>; 214 clocks = <&clkc 6>;
201 reg = <0xF8002000 0x1000>; 215 reg = <0xF8002000 0x1000>;
202 }; 216 };
203 scutimer: scutimer@f8f00600 { 217
218 scutimer: timer@f8f00600 {
204 interrupt-parent = <&intc>; 219 interrupt-parent = <&intc>;
205 interrupts = < 1 13 0x301 >; 220 interrupts = <1 13 0x301>;
206 compatible = "arm,cortex-a9-twd-timer"; 221 compatible = "arm,cortex-a9-twd-timer";
207 reg = < 0xf8f00600 0x20 >; 222 reg = <0xf8f00600 0x20>;
208 clocks = <&clkc 4>; 223 clocks = <&clkc 4>;
209 } ; 224 } ;
210 }; 225 };
diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c
index f01c0ee0c87e..490f3dced749 100644
--- a/arch/arm/common/bL_switcher.c
+++ b/arch/arm/common/bL_switcher.c
@@ -433,8 +433,12 @@ static void bL_switcher_restore_cpus(void)
433{ 433{
434 int i; 434 int i;
435 435
436 for_each_cpu(i, &bL_switcher_removed_logical_cpus) 436 for_each_cpu(i, &bL_switcher_removed_logical_cpus) {
437 cpu_up(i); 437 struct device *cpu_dev = get_cpu_device(i);
438 int ret = device_online(cpu_dev);
439 if (ret)
440 dev_err(cpu_dev, "switcher: unable to restore CPU\n");
441 }
438} 442}
439 443
440static int bL_switcher_halve_cpus(void) 444static int bL_switcher_halve_cpus(void)
@@ -521,7 +525,7 @@ static int bL_switcher_halve_cpus(void)
521 continue; 525 continue;
522 } 526 }
523 527
524 ret = cpu_down(i); 528 ret = device_offline(get_cpu_device(i));
525 if (ret) { 529 if (ret) {
526 bL_switcher_restore_cpus(); 530 bL_switcher_restore_cpus();
527 return ret; 531 return ret;
diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
index 41bca32409fc..485be42519b9 100644
--- a/arch/arm/common/edma.c
+++ b/arch/arm/common/edma.c
@@ -102,7 +102,13 @@
102#define PARM_OFFSET(param_no) (EDMA_PARM + ((param_no) << 5)) 102#define PARM_OFFSET(param_no) (EDMA_PARM + ((param_no) << 5))
103 103
104#define EDMA_DCHMAP 0x0100 /* 64 registers */ 104#define EDMA_DCHMAP 0x0100 /* 64 registers */
105#define CHMAP_EXIST BIT(24) 105
106/* CCCFG register */
107#define GET_NUM_DMACH(x) (x & 0x7) /* bits 0-2 */
108#define GET_NUM_PAENTRY(x) ((x & 0x7000) >> 12) /* bits 12-14 */
109#define GET_NUM_EVQUE(x) ((x & 0x70000) >> 16) /* bits 16-18 */
110#define GET_NUM_REGN(x) ((x & 0x300000) >> 20) /* bits 20-21 */
111#define CHMAP_EXIST BIT(24)
106 112
107#define EDMA_MAX_DMACH 64 113#define EDMA_MAX_DMACH 64
108#define EDMA_MAX_PARAMENTRY 512 114#define EDMA_MAX_PARAMENTRY 512
@@ -233,7 +239,6 @@ struct edma {
233 unsigned num_region; 239 unsigned num_region;
234 unsigned num_slots; 240 unsigned num_slots;
235 unsigned num_tc; 241 unsigned num_tc;
236 unsigned num_cc;
237 enum dma_event_q default_queue; 242 enum dma_event_q default_queue;
238 243
239 /* list of channels with no even trigger; terminated by "-1" */ 244 /* list of channels with no even trigger; terminated by "-1" */
@@ -290,12 +295,6 @@ static void map_dmach_queue(unsigned ctlr, unsigned ch_no,
290 ~(0x7 << bit), queue_no << bit); 295 ~(0x7 << bit), queue_no << bit);
291} 296}
292 297
293static void __init map_queue_tc(unsigned ctlr, int queue_no, int tc_no)
294{
295 int bit = queue_no * 4;
296 edma_modify(ctlr, EDMA_QUETCMAP, ~(0x7 << bit), ((tc_no & 0x7) << bit));
297}
298
299static void __init assign_priority_to_queue(unsigned ctlr, int queue_no, 298static void __init assign_priority_to_queue(unsigned ctlr, int queue_no,
300 int priority) 299 int priority)
301{ 300{
@@ -994,29 +993,23 @@ void edma_set_dest(unsigned slot, dma_addr_t dest_port,
994EXPORT_SYMBOL(edma_set_dest); 993EXPORT_SYMBOL(edma_set_dest);
995 994
996/** 995/**
997 * edma_get_position - returns the current transfer points 996 * edma_get_position - returns the current transfer point
998 * @slot: parameter RAM slot being examined 997 * @slot: parameter RAM slot being examined
999 * @src: pointer to source port position 998 * @dst: true selects the dest position, false the source
1000 * @dst: pointer to destination port position
1001 * 999 *
1002 * Returns current source and destination addresses for a particular 1000 * Returns the position of the current active slot
1003 * parameter RAM slot. Its channel should not be active when this is called.
1004 */ 1001 */
1005void edma_get_position(unsigned slot, dma_addr_t *src, dma_addr_t *dst) 1002dma_addr_t edma_get_position(unsigned slot, bool dst)
1006{ 1003{
1007 struct edmacc_param temp; 1004 u32 offs, ctlr = EDMA_CTLR(slot);
1008 unsigned ctlr;
1009 1005
1010 ctlr = EDMA_CTLR(slot);
1011 slot = EDMA_CHAN_SLOT(slot); 1006 slot = EDMA_CHAN_SLOT(slot);
1012 1007
1013 edma_read_slot(EDMA_CTLR_CHAN(ctlr, slot), &temp); 1008 offs = PARM_OFFSET(slot);
1014 if (src != NULL) 1009 offs += dst ? PARM_DST : PARM_SRC;
1015 *src = temp.src; 1010
1016 if (dst != NULL) 1011 return edma_read(ctlr, offs);
1017 *dst = temp.dst;
1018} 1012}
1019EXPORT_SYMBOL(edma_get_position);
1020 1013
1021/** 1014/**
1022 * edma_set_src_index - configure DMA source address indexing 1015 * edma_set_src_index - configure DMA source address indexing
@@ -1421,57 +1414,101 @@ void edma_clear_event(unsigned channel)
1421} 1414}
1422EXPORT_SYMBOL(edma_clear_event); 1415EXPORT_SYMBOL(edma_clear_event);
1423 1416
1424#if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_DMADEVICES) 1417static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata,
1425 1418 struct edma *edma_cc)
1426static int edma_of_read_u32_to_s16_array(const struct device_node *np,
1427 const char *propname, s16 *out_values,
1428 size_t sz)
1429{ 1419{
1430 int ret; 1420 int i;
1421 u32 value, cccfg;
1422 s8 (*queue_priority_map)[2];
1431 1423
1432 ret = of_property_read_u16_array(np, propname, out_values, sz); 1424 /* Decode the eDMA3 configuration from CCCFG register */
1433 if (ret) 1425 cccfg = edma_read(0, EDMA_CCCFG);
1434 return ret; 1426
1427 value = GET_NUM_REGN(cccfg);
1428 edma_cc->num_region = BIT(value);
1429
1430 value = GET_NUM_DMACH(cccfg);
1431 edma_cc->num_channels = BIT(value + 1);
1432
1433 value = GET_NUM_PAENTRY(cccfg);
1434 edma_cc->num_slots = BIT(value + 4);
1435 1435
1436 /* Terminate it */ 1436 value = GET_NUM_EVQUE(cccfg);
1437 *out_values++ = -1; 1437 edma_cc->num_tc = value + 1;
1438 *out_values++ = -1; 1438
1439 dev_dbg(dev, "eDMA3 HW configuration (cccfg: 0x%08x):\n", cccfg);
1440 dev_dbg(dev, "num_region: %u\n", edma_cc->num_region);
1441 dev_dbg(dev, "num_channel: %u\n", edma_cc->num_channels);
1442 dev_dbg(dev, "num_slot: %u\n", edma_cc->num_slots);
1443 dev_dbg(dev, "num_tc: %u\n", edma_cc->num_tc);
1444
1445 /* Nothing need to be done if queue priority is provided */
1446 if (pdata->queue_priority_mapping)
1447 return 0;
1448
1449 /*
1450 * Configure TC/queue priority as follows:
1451 * Q0 - priority 0
1452 * Q1 - priority 1
1453 * Q2 - priority 2
1454 * ...
1455 * The meaning of priority numbers: 0 highest priority, 7 lowest
1456 * priority. So Q0 is the highest priority queue and the last queue has
1457 * the lowest priority.
1458 */
1459 queue_priority_map = devm_kzalloc(dev,
1460 (edma_cc->num_tc + 1) * sizeof(s8),
1461 GFP_KERNEL);
1462 if (!queue_priority_map)
1463 return -ENOMEM;
1464
1465 for (i = 0; i < edma_cc->num_tc; i++) {
1466 queue_priority_map[i][0] = i;
1467 queue_priority_map[i][1] = i;
1468 }
1469 queue_priority_map[i][0] = -1;
1470 queue_priority_map[i][1] = -1;
1471
1472 pdata->queue_priority_mapping = queue_priority_map;
1473 pdata->default_queue = 0;
1439 1474
1440 return 0; 1475 return 0;
1441} 1476}
1442 1477
1443static int edma_xbar_event_map(struct device *dev, 1478#if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_DMADEVICES)
1444 struct device_node *node, 1479
1445 struct edma_soc_info *pdata, int len) 1480static int edma_xbar_event_map(struct device *dev, struct device_node *node,
1481 struct edma_soc_info *pdata, size_t sz)
1446{ 1482{
1447 int ret, i; 1483 const char pname[] = "ti,edma-xbar-event-map";
1448 struct resource res; 1484 struct resource res;
1449 void __iomem *xbar; 1485 void __iomem *xbar;
1450 const s16 (*xbar_chans)[2]; 1486 s16 (*xbar_chans)[2];
1487 size_t nelm = sz / sizeof(s16);
1451 u32 shift, offset, mux; 1488 u32 shift, offset, mux;
1489 int ret, i;
1452 1490
1453 xbar_chans = devm_kzalloc(dev, 1491 xbar_chans = devm_kzalloc(dev, (nelm + 2) * sizeof(s16), GFP_KERNEL);
1454 len/sizeof(s16) + 2*sizeof(s16),
1455 GFP_KERNEL);
1456 if (!xbar_chans) 1492 if (!xbar_chans)
1457 return -ENOMEM; 1493 return -ENOMEM;
1458 1494
1459 ret = of_address_to_resource(node, 1, &res); 1495 ret = of_address_to_resource(node, 1, &res);
1460 if (ret) 1496 if (ret)
1461 return -EIO; 1497 return -ENOMEM;
1462 1498
1463 xbar = devm_ioremap(dev, res.start, resource_size(&res)); 1499 xbar = devm_ioremap(dev, res.start, resource_size(&res));
1464 if (!xbar) 1500 if (!xbar)
1465 return -ENOMEM; 1501 return -ENOMEM;
1466 1502
1467 ret = edma_of_read_u32_to_s16_array(node, 1503 ret = of_property_read_u16_array(node, pname, (u16 *)xbar_chans, nelm);
1468 "ti,edma-xbar-event-map",
1469 (s16 *)xbar_chans,
1470 len/sizeof(u32));
1471 if (ret) 1504 if (ret)
1472 return -EIO; 1505 return -EIO;
1473 1506
1474 for (i = 0; xbar_chans[i][0] != -1; i++) { 1507 /* Invalidate last entry for the other user of this mess */
1508 nelm >>= 1;
1509 xbar_chans[nelm][0] = xbar_chans[nelm][1] = -1;
1510
1511 for (i = 0; i < nelm; i++) {
1475 shift = (xbar_chans[i][1] & 0x03) << 3; 1512 shift = (xbar_chans[i][1] & 0x03) << 3;
1476 offset = xbar_chans[i][1] & 0xfffffffc; 1513 offset = xbar_chans[i][1] & 0xfffffffc;
1477 mux = readl(xbar + offset); 1514 mux = readl(xbar + offset);
@@ -1480,8 +1517,7 @@ static int edma_xbar_event_map(struct device *dev,
1480 writel(mux, (xbar + offset)); 1517 writel(mux, (xbar + offset));
1481 } 1518 }
1482 1519
1483 pdata->xbar_chans = xbar_chans; 1520 pdata->xbar_chans = (const s16 (*)[2]) xbar_chans;
1484
1485 return 0; 1521 return 0;
1486} 1522}
1487 1523
@@ -1489,65 +1525,16 @@ static int edma_of_parse_dt(struct device *dev,
1489 struct device_node *node, 1525 struct device_node *node,
1490 struct edma_soc_info *pdata) 1526 struct edma_soc_info *pdata)
1491{ 1527{
1492 int ret = 0, i; 1528 int ret = 0;
1493 u32 value;
1494 struct property *prop; 1529 struct property *prop;
1495 size_t sz; 1530 size_t sz;
1496 struct edma_rsv_info *rsv_info; 1531 struct edma_rsv_info *rsv_info;
1497 s8 (*queue_tc_map)[2], (*queue_priority_map)[2];
1498
1499 memset(pdata, 0, sizeof(struct edma_soc_info));
1500
1501 ret = of_property_read_u32(node, "dma-channels", &value);
1502 if (ret < 0)
1503 return ret;
1504 pdata->n_channel = value;
1505
1506 ret = of_property_read_u32(node, "ti,edma-regions", &value);
1507 if (ret < 0)
1508 return ret;
1509 pdata->n_region = value;
1510
1511 ret = of_property_read_u32(node, "ti,edma-slots", &value);
1512 if (ret < 0)
1513 return ret;
1514 pdata->n_slot = value;
1515
1516 pdata->n_cc = 1;
1517 1532
1518 rsv_info = devm_kzalloc(dev, sizeof(struct edma_rsv_info), GFP_KERNEL); 1533 rsv_info = devm_kzalloc(dev, sizeof(struct edma_rsv_info), GFP_KERNEL);
1519 if (!rsv_info) 1534 if (!rsv_info)
1520 return -ENOMEM; 1535 return -ENOMEM;
1521 pdata->rsv = rsv_info; 1536 pdata->rsv = rsv_info;
1522 1537
1523 queue_tc_map = devm_kzalloc(dev, 8*sizeof(s8), GFP_KERNEL);
1524 if (!queue_tc_map)
1525 return -ENOMEM;
1526
1527 for (i = 0; i < 3; i++) {
1528 queue_tc_map[i][0] = i;
1529 queue_tc_map[i][1] = i;
1530 }
1531 queue_tc_map[i][0] = -1;
1532 queue_tc_map[i][1] = -1;
1533
1534 pdata->queue_tc_mapping = queue_tc_map;
1535
1536 queue_priority_map = devm_kzalloc(dev, 8*sizeof(s8), GFP_KERNEL);
1537 if (!queue_priority_map)
1538 return -ENOMEM;
1539
1540 for (i = 0; i < 3; i++) {
1541 queue_priority_map[i][0] = i;
1542 queue_priority_map[i][1] = i;
1543 }
1544 queue_priority_map[i][0] = -1;
1545 queue_priority_map[i][1] = -1;
1546
1547 pdata->queue_priority_mapping = queue_priority_map;
1548
1549 pdata->default_queue = 0;
1550
1551 prop = of_find_property(node, "ti,edma-xbar-event-map", &sz); 1538 prop = of_find_property(node, "ti,edma-xbar-event-map", &sz);
1552 if (prop) 1539 if (prop)
1553 ret = edma_xbar_event_map(dev, node, pdata, sz); 1540 ret = edma_xbar_event_map(dev, node, pdata, sz);
@@ -1574,6 +1561,7 @@ static struct edma_soc_info *edma_setup_info_from_dt(struct device *dev,
1574 return ERR_PTR(ret); 1561 return ERR_PTR(ret);
1575 1562
1576 dma_cap_set(DMA_SLAVE, edma_filter_info.dma_cap); 1563 dma_cap_set(DMA_SLAVE, edma_filter_info.dma_cap);
1564 dma_cap_set(DMA_CYCLIC, edma_filter_info.dma_cap);
1577 of_dma_controller_register(dev->of_node, of_dma_simple_xlate, 1565 of_dma_controller_register(dev->of_node, of_dma_simple_xlate,
1578 &edma_filter_info); 1566 &edma_filter_info);
1579 1567
@@ -1592,7 +1580,6 @@ static int edma_probe(struct platform_device *pdev)
1592 struct edma_soc_info **info = pdev->dev.platform_data; 1580 struct edma_soc_info **info = pdev->dev.platform_data;
1593 struct edma_soc_info *ninfo[EDMA_MAX_CC] = {NULL}; 1581 struct edma_soc_info *ninfo[EDMA_MAX_CC] = {NULL};
1594 s8 (*queue_priority_mapping)[2]; 1582 s8 (*queue_priority_mapping)[2];
1595 s8 (*queue_tc_mapping)[2];
1596 int i, j, off, ln, found = 0; 1583 int i, j, off, ln, found = 0;
1597 int status = -1; 1584 int status = -1;
1598 const s16 (*rsv_chans)[2]; 1585 const s16 (*rsv_chans)[2];
@@ -1603,7 +1590,6 @@ static int edma_probe(struct platform_device *pdev)
1603 struct resource *r[EDMA_MAX_CC] = {NULL}; 1590 struct resource *r[EDMA_MAX_CC] = {NULL};
1604 struct resource res[EDMA_MAX_CC]; 1591 struct resource res[EDMA_MAX_CC];
1605 char res_name[10]; 1592 char res_name[10];
1606 char irq_name[10];
1607 struct device_node *node = pdev->dev.of_node; 1593 struct device_node *node = pdev->dev.of_node;
1608 struct device *dev = &pdev->dev; 1594 struct device *dev = &pdev->dev;
1609 int ret; 1595 int ret;
@@ -1668,12 +1654,10 @@ static int edma_probe(struct platform_device *pdev)
1668 if (!edma_cc[j]) 1654 if (!edma_cc[j])
1669 return -ENOMEM; 1655 return -ENOMEM;
1670 1656
1671 edma_cc[j]->num_channels = min_t(unsigned, info[j]->n_channel, 1657 /* Get eDMA3 configuration from IP */
1672 EDMA_MAX_DMACH); 1658 ret = edma_setup_from_hw(dev, info[j], edma_cc[j]);
1673 edma_cc[j]->num_slots = min_t(unsigned, info[j]->n_slot, 1659 if (ret)
1674 EDMA_MAX_PARAMENTRY); 1660 return ret;
1675 edma_cc[j]->num_cc = min_t(unsigned, info[j]->n_cc,
1676 EDMA_MAX_CC);
1677 1661
1678 edma_cc[j]->default_queue = info[j]->default_queue; 1662 edma_cc[j]->default_queue = info[j]->default_queue;
1679 1663
@@ -1725,14 +1709,21 @@ static int edma_probe(struct platform_device *pdev)
1725 1709
1726 if (node) { 1710 if (node) {
1727 irq[j] = irq_of_parse_and_map(node, 0); 1711 irq[j] = irq_of_parse_and_map(node, 0);
1712 err_irq[j] = irq_of_parse_and_map(node, 2);
1728 } else { 1713 } else {
1714 char irq_name[10];
1715
1729 sprintf(irq_name, "edma%d", j); 1716 sprintf(irq_name, "edma%d", j);
1730 irq[j] = platform_get_irq_byname(pdev, irq_name); 1717 irq[j] = platform_get_irq_byname(pdev, irq_name);
1718
1719 sprintf(irq_name, "edma%d_err", j);
1720 err_irq[j] = platform_get_irq_byname(pdev, irq_name);
1731 } 1721 }
1732 edma_cc[j]->irq_res_start = irq[j]; 1722 edma_cc[j]->irq_res_start = irq[j];
1733 status = devm_request_irq(&pdev->dev, irq[j], 1723 edma_cc[j]->irq_res_end = err_irq[j];
1734 dma_irq_handler, 0, "edma", 1724
1735 &pdev->dev); 1725 status = devm_request_irq(dev, irq[j], dma_irq_handler, 0,
1726 "edma", dev);
1736 if (status < 0) { 1727 if (status < 0) {
1737 dev_dbg(&pdev->dev, 1728 dev_dbg(&pdev->dev,
1738 "devm_request_irq %d failed --> %d\n", 1729 "devm_request_irq %d failed --> %d\n",
@@ -1740,16 +1731,8 @@ static int edma_probe(struct platform_device *pdev)
1740 return status; 1731 return status;
1741 } 1732 }
1742 1733
1743 if (node) { 1734 status = devm_request_irq(dev, err_irq[j], dma_ccerr_handler, 0,
1744 err_irq[j] = irq_of_parse_and_map(node, 2); 1735 "edma_error", dev);
1745 } else {
1746 sprintf(irq_name, "edma%d_err", j);
1747 err_irq[j] = platform_get_irq_byname(pdev, irq_name);
1748 }
1749 edma_cc[j]->irq_res_end = err_irq[j];
1750 status = devm_request_irq(&pdev->dev, err_irq[j],
1751 dma_ccerr_handler, 0,
1752 "edma_error", &pdev->dev);
1753 if (status < 0) { 1736 if (status < 0) {
1754 dev_dbg(&pdev->dev, 1737 dev_dbg(&pdev->dev,
1755 "devm_request_irq %d failed --> %d\n", 1738 "devm_request_irq %d failed --> %d\n",
@@ -1760,14 +1743,8 @@ static int edma_probe(struct platform_device *pdev)
1760 for (i = 0; i < edma_cc[j]->num_channels; i++) 1743 for (i = 0; i < edma_cc[j]->num_channels; i++)
1761 map_dmach_queue(j, i, info[j]->default_queue); 1744 map_dmach_queue(j, i, info[j]->default_queue);
1762 1745
1763 queue_tc_mapping = info[j]->queue_tc_mapping;
1764 queue_priority_mapping = info[j]->queue_priority_mapping; 1746 queue_priority_mapping = info[j]->queue_priority_mapping;
1765 1747
1766 /* Event queue to TC mapping */
1767 for (i = 0; queue_tc_mapping[i][0] != -1; i++)
1768 map_queue_tc(j, queue_tc_mapping[i][0],
1769 queue_tc_mapping[i][1]);
1770
1771 /* Event queue priority mapping */ 1748 /* Event queue priority mapping */
1772 for (i = 0; queue_priority_mapping[i][0] != -1; i++) 1749 for (i = 0; queue_priority_mapping[i][0] != -1; i++)
1773 assign_priority_to_queue(j, 1750 assign_priority_to_queue(j,
@@ -1780,7 +1757,7 @@ static int edma_probe(struct platform_device *pdev)
1780 if (edma_read(j, EDMA_CCCFG) & CHMAP_EXIST) 1757 if (edma_read(j, EDMA_CCCFG) & CHMAP_EXIST)
1781 map_dmach_param(j); 1758 map_dmach_param(j);
1782 1759
1783 for (i = 0; i < info[j]->n_region; i++) { 1760 for (i = 0; i < edma_cc[j]->num_region; i++) {
1784 edma_write_array2(j, EDMA_DRAE, i, 0, 0x0); 1761 edma_write_array2(j, EDMA_DRAE, i, 0, 0x0);
1785 edma_write_array2(j, EDMA_DRAE, i, 1, 0x0); 1762 edma_write_array2(j, EDMA_DRAE, i, 1, 0x0);
1786 edma_write_array(j, EDMA_QRAE, i, 0x0); 1763 edma_write_array(j, EDMA_QRAE, i, 0x0);
diff --git a/arch/arm/common/mcpm_entry.c b/arch/arm/common/mcpm_entry.c
index 86fd60fefbc9..f91136ab447e 100644
--- a/arch/arm/common/mcpm_entry.c
+++ b/arch/arm/common/mcpm_entry.c
@@ -106,14 +106,14 @@ void mcpm_cpu_power_down(void)
106 BUG(); 106 BUG();
107} 107}
108 108
109int mcpm_cpu_power_down_finish(unsigned int cpu, unsigned int cluster) 109int mcpm_wait_for_cpu_powerdown(unsigned int cpu, unsigned int cluster)
110{ 110{
111 int ret; 111 int ret;
112 112
113 if (WARN_ON_ONCE(!platform_ops || !platform_ops->power_down_finish)) 113 if (WARN_ON_ONCE(!platform_ops || !platform_ops->wait_for_powerdown))
114 return -EUNATCH; 114 return -EUNATCH;
115 115
116 ret = platform_ops->power_down_finish(cpu, cluster); 116 ret = platform_ops->wait_for_powerdown(cpu, cluster);
117 if (ret) 117 if (ret)
118 pr_warn("%s: cpu %u, cluster %u failed to power down (%d)\n", 118 pr_warn("%s: cpu %u, cluster %u failed to power down (%d)\n",
119 __func__, cpu, cluster, ret); 119 __func__, cpu, cluster, ret);
diff --git a/arch/arm/common/mcpm_platsmp.c b/arch/arm/common/mcpm_platsmp.c
index 177251a4dd9a..92e54d7c6f46 100644
--- a/arch/arm/common/mcpm_platsmp.c
+++ b/arch/arm/common/mcpm_platsmp.c
@@ -62,7 +62,7 @@ static int mcpm_cpu_kill(unsigned int cpu)
62 62
63 cpu_to_pcpu(cpu, &pcpu, &pcluster); 63 cpu_to_pcpu(cpu, &pcpu, &pcluster);
64 64
65 return !mcpm_cpu_power_down_finish(pcpu, pcluster); 65 return !mcpm_wait_for_cpu_powerdown(pcpu, pcluster);
66} 66}
67 67
68static int mcpm_cpu_disable(unsigned int cpu) 68static int mcpm_cpu_disable(unsigned int cpu)
diff --git a/arch/arm/configs/at91sam9g45_defconfig b/arch/arm/configs/at91sam9g45_defconfig
index e181a50fd65a..c6661a60025d 100644
--- a/arch/arm/configs/at91sam9g45_defconfig
+++ b/arch/arm/configs/at91sam9g45_defconfig
@@ -83,7 +83,6 @@ CONFIG_KEYBOARD_GPIO=y
83# CONFIG_INPUT_MOUSE is not set 83# CONFIG_INPUT_MOUSE is not set
84CONFIG_INPUT_TOUCHSCREEN=y 84CONFIG_INPUT_TOUCHSCREEN=y
85CONFIG_TOUCHSCREEN_ATMEL_MXT=m 85CONFIG_TOUCHSCREEN_ATMEL_MXT=m
86CONFIG_TOUCHSCREEN_ATMEL_TSADCC=y
87# CONFIG_SERIO is not set 86# CONFIG_SERIO is not set
88# CONFIG_LEGACY_PTYS is not set 87# CONFIG_LEGACY_PTYS is not set
89CONFIG_SERIAL_ATMEL=y 88CONFIG_SERIAL_ATMEL=y
@@ -146,6 +145,8 @@ CONFIG_DMADEVICES=y
146CONFIG_AT_HDMAC=y 145CONFIG_AT_HDMAC=y
147CONFIG_DMATEST=m 146CONFIG_DMATEST=m
148# CONFIG_IOMMU_SUPPORT is not set 147# CONFIG_IOMMU_SUPPORT is not set
148CONFIG_IIO=y
149CONFIG_AT91_ADC=y
149CONFIG_EXT4_FS=y 150CONFIG_EXT4_FS=y
150CONFIG_FANOTIFY=y 151CONFIG_FANOTIFY=y
151CONFIG_VFAT_FS=y 152CONFIG_VFAT_FS=y
diff --git a/arch/arm/configs/at91sam9rl_defconfig b/arch/arm/configs/at91sam9rl_defconfig
index 85f846ae9ff2..5d7797d43d23 100644
--- a/arch/arm/configs/at91sam9rl_defconfig
+++ b/arch/arm/configs/at91sam9rl_defconfig
@@ -45,7 +45,6 @@ CONFIG_INPUT_EVDEV=y
45# CONFIG_INPUT_KEYBOARD is not set 45# CONFIG_INPUT_KEYBOARD is not set
46# CONFIG_INPUT_MOUSE is not set 46# CONFIG_INPUT_MOUSE is not set
47CONFIG_INPUT_TOUCHSCREEN=y 47CONFIG_INPUT_TOUCHSCREEN=y
48CONFIG_TOUCHSCREEN_ATMEL_TSADCC=y
49# CONFIG_SERIO is not set 48# CONFIG_SERIO is not set
50CONFIG_SERIAL_ATMEL=y 49CONFIG_SERIAL_ATMEL=y
51CONFIG_SERIAL_ATMEL_CONSOLE=y 50CONFIG_SERIAL_ATMEL_CONSOLE=y
@@ -65,6 +64,8 @@ CONFIG_MMC=y
65CONFIG_MMC_ATMELMCI=m 64CONFIG_MMC_ATMELMCI=m
66CONFIG_RTC_CLASS=y 65CONFIG_RTC_CLASS=y
67CONFIG_RTC_DRV_AT91SAM9=y 66CONFIG_RTC_DRV_AT91SAM9=y
67CONFIG_IIO=y
68CONFIG_AT91_ADC=y
68CONFIG_EXT2_FS=y 69CONFIG_EXT2_FS=y
69CONFIG_MSDOS_FS=y 70CONFIG_MSDOS_FS=y
70CONFIG_VFAT_FS=y 71CONFIG_VFAT_FS=y
diff --git a/arch/arm/configs/axm55xx_defconfig b/arch/arm/configs/axm55xx_defconfig
new file mode 100644
index 000000000000..d3260d7d5af1
--- /dev/null
+++ b/arch/arm/configs/axm55xx_defconfig
@@ -0,0 +1,248 @@
1CONFIG_SYSVIPC=y
2CONFIG_POSIX_MQUEUE=y
3CONFIG_FHANDLE=y
4CONFIG_AUDIT=y
5CONFIG_HIGH_RES_TIMERS=y
6CONFIG_BSD_PROCESS_ACCT=y
7CONFIG_BSD_PROCESS_ACCT_V3=y
8CONFIG_TASKSTATS=y
9CONFIG_TASK_DELAY_ACCT=y
10CONFIG_TASK_XACCT=y
11CONFIG_TASK_IO_ACCOUNTING=y
12CONFIG_IKCONFIG=y
13CONFIG_IKCONFIG_PROC=y
14CONFIG_LOG_BUF_SHIFT=16
15CONFIG_NAMESPACES=y
16# CONFIG_UTS_NS is not set
17# CONFIG_IPC_NS is not set
18# CONFIG_PID_NS is not set
19# CONFIG_NET_NS is not set
20CONFIG_SCHED_AUTOGROUP=y
21CONFIG_RELAY=y
22CONFIG_BLK_DEV_INITRD=y
23CONFIG_SYSCTL_SYSCALL=y
24CONFIG_EMBEDDED=y
25# CONFIG_COMPAT_BRK is not set
26CONFIG_PROFILING=y
27CONFIG_MODULES=y
28CONFIG_MODULE_UNLOAD=y
29# CONFIG_IOSCHED_DEADLINE is not set
30CONFIG_ARCH_AXXIA=y
31CONFIG_GPIO_PCA953X=y
32CONFIG_ARM_LPAE=y
33CONFIG_ARM_THUMBEE=y
34CONFIG_ARM_ERRATA_430973=y
35CONFIG_ARM_ERRATA_643719=y
36CONFIG_ARM_ERRATA_720789=y
37CONFIG_ARM_ERRATA_754322=y
38CONFIG_ARM_ERRATA_754327=y
39CONFIG_ARM_ERRATA_764369=y
40CONFIG_ARM_ERRATA_775420=y
41CONFIG_ARM_ERRATA_798181=y
42CONFIG_PCI=y
43CONFIG_PCI_MSI=y
44CONFIG_PCIE_AXXIA=y
45CONFIG_SMP=y
46CONFIG_NR_CPUS=16
47CONFIG_HOTPLUG_CPU=y
48CONFIG_PREEMPT=y
49CONFIG_AEABI=y
50CONFIG_OABI_COMPAT=y
51CONFIG_HIGHMEM=y
52CONFIG_KSM=y
53CONFIG_ZBOOT_ROM_TEXT=0x0
54CONFIG_ZBOOT_ROM_BSS=0x0
55CONFIG_ARM_APPENDED_DTB=y
56CONFIG_ARM_ATAG_DTB_COMPAT=y
57CONFIG_VFP=y
58CONFIG_NEON=y
59# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
60CONFIG_BINFMT_MISC=y
61# CONFIG_SUSPEND is not set
62CONFIG_NET=y
63CONFIG_PACKET=y
64CONFIG_UNIX=y
65CONFIG_XFRM_USER=y
66CONFIG_XFRM_SUB_POLICY=y
67CONFIG_XFRM_MIGRATE=y
68CONFIG_XFRM_STATISTICS=y
69CONFIG_NET_KEY=y
70CONFIG_INET=y
71CONFIG_IP_PNP=y
72CONFIG_IP_PNP_DHCP=y
73CONFIG_IP_PNP_BOOTP=y
74CONFIG_INET_AH=y
75CONFIG_INET_ESP=y
76CONFIG_INET_IPCOMP=y
77# CONFIG_INET_LRO is not set
78# CONFIG_IPV6 is not set
79CONFIG_NETWORK_PHY_TIMESTAMPING=y
80CONFIG_BRIDGE=y
81# CONFIG_WIRELESS is not set
82CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
83CONFIG_DEVTMPFS=y
84CONFIG_DEVTMPFS_MOUNT=y
85CONFIG_MTD=y
86CONFIG_MTD_CMDLINE_PARTS=y
87CONFIG_MTD_AFS_PARTS=y
88CONFIG_MTD_BLOCK=y
89CONFIG_MTD_CFI=y
90CONFIG_MTD_CFI_INTELEXT=y
91CONFIG_MTD_CFI_AMDSTD=y
92CONFIG_MTD_CFI_STAA=y
93CONFIG_MTD_PHYSMAP=y
94CONFIG_MTD_PHYSMAP_OF=y
95CONFIG_MTD_M25P80=y
96CONFIG_PROC_DEVICETREE=y
97CONFIG_BLK_DEV_LOOP=y
98CONFIG_BLK_DEV_RAM=y
99CONFIG_EEPROM_AT24=y
100CONFIG_EEPROM_AT25=y
101CONFIG_BLK_DEV_SD=y
102CONFIG_CHR_DEV_SG=y
103CONFIG_ATA=y
104CONFIG_PATA_PLATFORM=y
105CONFIG_PATA_OF_PLATFORM=y
106CONFIG_MD=y
107CONFIG_BLK_DEV_DM=y
108CONFIG_DM_UEVENT=y
109CONFIG_NETDEVICES=y
110CONFIG_TUN=y
111CONFIG_VETH=y
112CONFIG_VIRTIO_NET=y
113# CONFIG_NET_CADENCE is not set
114# CONFIG_NET_VENDOR_BROADCOM is not set
115# CONFIG_NET_VENDOR_CIRRUS is not set
116# CONFIG_NET_VENDOR_FARADAY is not set
117# CONFIG_NET_VENDOR_INTEL is not set
118# CONFIG_NET_VENDOR_MARVELL is not set
119# CONFIG_NET_VENDOR_MICREL is not set
120# CONFIG_NET_VENDOR_NATSEMI is not set
121# CONFIG_NET_VENDOR_SEEQ is not set
122# CONFIG_NET_VENDOR_SMSC is not set
123# CONFIG_NET_VENDOR_STMICRO is not set
124# CONFIG_NET_VENDOR_VIA is not set
125# CONFIG_NET_VENDOR_WIZNET is not set
126CONFIG_BROADCOM_PHY=y
127# CONFIG_WLAN is not set
128# CONFIG_MOUSE_PS2_ALPS is not set
129# CONFIG_MOUSE_PS2_LOGIPS2PP is not set
130# CONFIG_MOUSE_PS2_SYNAPTICS is not set
131# CONFIG_MOUSE_PS2_TRACKPOINT is not set
132# CONFIG_SERIO_SERPORT is not set
133CONFIG_SERIO_AMBAKMI=y
134CONFIG_LEGACY_PTY_COUNT=16
135CONFIG_SERIAL_AMBA_PL011=y
136CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
137CONFIG_VIRTIO_CONSOLE=y
138# CONFIG_HW_RANDOM is not set
139CONFIG_I2C=y
140CONFIG_I2C_CHARDEV=y
141CONFIG_I2C_MUX=y
142CONFIG_I2C_AXXIA=y
143CONFIG_SPI=y
144CONFIG_SPI_PL022=y
145CONFIG_DP83640_PHY=y
146CONFIG_GPIOLIB=y
147CONFIG_GPIO_SYSFS=y
148CONFIG_GPIO_PL061=y
149CONFIG_POWER_SUPPLY=y
150CONFIG_POWER_RESET=y
151CONFIG_POWER_RESET_AXXIA=y
152CONFIG_SENSORS_ADT7475=y
153CONFIG_SENSORS_JC42=y
154CONFIG_SENSORS_LM75=y
155CONFIG_PMBUS=y
156CONFIG_SENSORS_LTC2978=y
157CONFIG_WATCHDOG=y
158CONFIG_ARM_SP805_WATCHDOG=y
159CONFIG_FB=y
160CONFIG_FB_ARMCLCD=y
161CONFIG_FRAMEBUFFER_CONSOLE=y
162CONFIG_LOGO=y
163# CONFIG_LOGO_LINUX_MONO is not set
164# CONFIG_LOGO_LINUX_VGA16 is not set
165CONFIG_HID_A4TECH=y
166CONFIG_HID_APPLE=y
167CONFIG_HID_BELKIN=y
168CONFIG_HID_CHERRY=y
169CONFIG_HID_CHICONY=y
170CONFIG_HID_CYPRESS=y
171CONFIG_HID_DRAGONRISE=y
172CONFIG_HID_EZKEY=y
173CONFIG_HID_KYE=y
174CONFIG_HID_GYRATION=y
175CONFIG_HID_TWINHAN=y
176CONFIG_HID_KENSINGTON=y
177CONFIG_HID_LOGITECH=y
178CONFIG_HID_MICROSOFT=y
179CONFIG_HID_MONTEREY=y
180CONFIG_HID_NTRIG=y
181CONFIG_HID_ORTEK=y
182CONFIG_HID_PANTHERLORD=y
183CONFIG_HID_PETALYNX=y
184CONFIG_HID_SAMSUNG=y
185CONFIG_HID_SUNPLUS=y
186CONFIG_HID_GREENASIA=y
187CONFIG_HID_SMARTJOYPLUS=y
188CONFIG_HID_TOPSEED=y
189CONFIG_HID_THRUSTMASTER=y
190CONFIG_HID_ZEROPLUS=y
191CONFIG_USB=y
192CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
193CONFIG_USB_EHCI_HCD=y
194# CONFIG_USB_EHCI_TT_NEWSCHED is not set
195CONFIG_USB_EHCI_HCD_AXXIA=y
196CONFIG_USB_STORAGE=y
197CONFIG_MMC=y
198CONFIG_MMC_ARMMMCI=y
199CONFIG_DMADEVICES=y
200CONFIG_PL330_DMA=y
201CONFIG_VIRT_DRIVERS=y
202CONFIG_VIRTIO_MMIO=y
203CONFIG_MAILBOX=y
204CONFIG_PL320_MBOX=y
205# CONFIG_IOMMU_SUPPORT is not set
206CONFIG_EXT2_FS=y
207CONFIG_EXT3_FS=y
208# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
209CONFIG_EXT4_FS=y
210CONFIG_AUTOFS4_FS=y
211CONFIG_FUSE_FS=y
212CONFIG_CUSE=y
213CONFIG_FSCACHE=y
214CONFIG_FSCACHE_STATS=y
215CONFIG_FSCACHE_HISTOGRAM=y
216CONFIG_FSCACHE_DEBUG=y
217CONFIG_FSCACHE_OBJECT_LIST=y
218CONFIG_CACHEFILES=y
219CONFIG_CACHEFILES_HISTOGRAM=y
220CONFIG_ISO9660_FS=y
221CONFIG_UDF_FS=y
222CONFIG_MSDOS_FS=y
223CONFIG_VFAT_FS=y
224CONFIG_NTFS_FS=y
225CONFIG_TMPFS=y
226CONFIG_JFFS2_FS=y
227CONFIG_CRAMFS=y
228CONFIG_NFS_FS=y
229CONFIG_NFS_V4=y
230CONFIG_ROOT_NFS=y
231CONFIG_NFS_FSCACHE=y
232CONFIG_SUNRPC_DEBUG=y
233CONFIG_NLS_CODEPAGE_437=y
234CONFIG_NLS_ISO8859_1=y
235CONFIG_PRINTK_TIME=y
236CONFIG_DEBUG_INFO=y
237CONFIG_DEBUG_FS=y
238CONFIG_MAGIC_SYSRQ=y
239# CONFIG_SCHED_DEBUG is not set
240CONFIG_RCU_CPU_STALL_TIMEOUT=60
241# CONFIG_FTRACE is not set
242CONFIG_DEBUG_USER=y
243CONFIG_CRYPTO_GCM=y
244CONFIG_CRYPTO_XCBC=y
245CONFIG_CRYPTO_SHA256=y
246# CONFIG_CRYPTO_ANSI_CPRNG is not set
247CONFIG_VIRTUALIZATION=y
248CONFIG_KVM=y
diff --git a/arch/arm/configs/badge4_defconfig b/arch/arm/configs/badge4_defconfig
index 5b54abbeb0b3..0494c8f229a2 100644
--- a/arch/arm/configs/badge4_defconfig
+++ b/arch/arm/configs/badge4_defconfig
@@ -73,8 +73,6 @@ CONFIG_SA1100_WATCHDOG=m
73CONFIG_SOUND=y 73CONFIG_SOUND=y
74CONFIG_SOUND_PRIME=y 74CONFIG_SOUND_PRIME=y
75CONFIG_USB=y 75CONFIG_USB=y
76CONFIG_USB_DEBUG=y
77CONFIG_USB_DEVICEFS=y
78CONFIG_USB_MON=y 76CONFIG_USB_MON=y
79CONFIG_USB_ACM=m 77CONFIG_USB_ACM=m
80CONFIG_USB_PRINTER=m 78CONFIG_USB_PRINTER=m
diff --git a/arch/arm/configs/bcm_defconfig b/arch/arm/configs/bcm_defconfig
index 3df3f3a79ef4..9d13dae99125 100644
--- a/arch/arm/configs/bcm_defconfig
+++ b/arch/arm/configs/bcm_defconfig
@@ -91,6 +91,7 @@ CONFIG_FB=y
91CONFIG_BACKLIGHT_LCD_SUPPORT=y 91CONFIG_BACKLIGHT_LCD_SUPPORT=y
92CONFIG_LCD_CLASS_DEVICE=y 92CONFIG_LCD_CLASS_DEVICE=y
93CONFIG_BACKLIGHT_CLASS_DEVICE=y 93CONFIG_BACKLIGHT_CLASS_DEVICE=y
94CONFIG_BACKLIGHT_PWM=y
94# CONFIG_USB_SUPPORT is not set 95# CONFIG_USB_SUPPORT is not set
95CONFIG_MMC=y 96CONFIG_MMC=y
96CONFIG_MMC_UNSAFE_RESUME=y 97CONFIG_MMC_UNSAFE_RESUME=y
@@ -104,6 +105,8 @@ CONFIG_LEDS_TRIGGERS=y
104CONFIG_LEDS_TRIGGER_TIMER=y 105CONFIG_LEDS_TRIGGER_TIMER=y
105CONFIG_LEDS_TRIGGER_HEARTBEAT=y 106CONFIG_LEDS_TRIGGER_HEARTBEAT=y
106CONFIG_LEDS_TRIGGER_DEFAULT_ON=y 107CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
108CONFIG_PWM=y
109CONFIG_PWM_BCM_KONA=y
107CONFIG_EXT4_FS=y 110CONFIG_EXT4_FS=y
108CONFIG_EXT4_FS_POSIX_ACL=y 111CONFIG_EXT4_FS_POSIX_ACL=y
109CONFIG_EXT4_FS_SECURITY=y 112CONFIG_EXT4_FS_SECURITY=y
diff --git a/arch/arm/configs/cm_x2xx_defconfig b/arch/arm/configs/cm_x2xx_defconfig
index a93ff8da5bab..dc01c049a520 100644
--- a/arch/arm/configs/cm_x2xx_defconfig
+++ b/arch/arm/configs/cm_x2xx_defconfig
@@ -144,7 +144,6 @@ CONFIG_HID_SAMSUNG=y
144CONFIG_HID_SONY=y 144CONFIG_HID_SONY=y
145CONFIG_HID_SUNPLUS=y 145CONFIG_HID_SUNPLUS=y
146CONFIG_USB=y 146CONFIG_USB=y
147CONFIG_USB_DEVICEFS=y
148# CONFIG_USB_DEVICE_CLASS is not set 147# CONFIG_USB_DEVICE_CLASS is not set
149CONFIG_USB_MON=y 148CONFIG_USB_MON=y
150CONFIG_USB_OHCI_HCD=y 149CONFIG_USB_OHCI_HCD=y
diff --git a/arch/arm/configs/cm_x300_defconfig b/arch/arm/configs/cm_x300_defconfig
index f4b767256f95..7df040e91c1c 100644
--- a/arch/arm/configs/cm_x300_defconfig
+++ b/arch/arm/configs/cm_x300_defconfig
@@ -129,7 +129,6 @@ CONFIG_HID_TOPSEED=y
129CONFIG_HID_THRUSTMASTER=y 129CONFIG_HID_THRUSTMASTER=y
130CONFIG_HID_ZEROPLUS=y 130CONFIG_HID_ZEROPLUS=y
131CONFIG_USB=y 131CONFIG_USB=y
132CONFIG_USB_DEVICEFS=y
133# CONFIG_USB_DEVICE_CLASS is not set 132# CONFIG_USB_DEVICE_CLASS is not set
134CONFIG_USB_MON=y 133CONFIG_USB_MON=y
135CONFIG_USB_OHCI_HCD=y 134CONFIG_USB_OHCI_HCD=y
diff --git a/arch/arm/configs/colibri_pxa270_defconfig b/arch/arm/configs/colibri_pxa270_defconfig
index 2ef2c5e8aaec..18c311ae1113 100644
--- a/arch/arm/configs/colibri_pxa270_defconfig
+++ b/arch/arm/configs/colibri_pxa270_defconfig
@@ -124,7 +124,6 @@ CONFIG_FONT_8x16=y
124CONFIG_LOGO=y 124CONFIG_LOGO=y
125# CONFIG_USB_HID is not set 125# CONFIG_USB_HID is not set
126CONFIG_USB=y 126CONFIG_USB=y
127CONFIG_USB_DEVICEFS=y
128# CONFIG_USB_DEVICE_CLASS is not set 127# CONFIG_USB_DEVICE_CLASS is not set
129CONFIG_USB_SERIAL=m 128CONFIG_USB_SERIAL=m
130CONFIG_USB_GADGET=m 129CONFIG_USB_GADGET=m
diff --git a/arch/arm/configs/colibri_pxa300_defconfig b/arch/arm/configs/colibri_pxa300_defconfig
index b985334e42dd..be02fe2b14cb 100644
--- a/arch/arm/configs/colibri_pxa300_defconfig
+++ b/arch/arm/configs/colibri_pxa300_defconfig
@@ -47,9 +47,7 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
47CONFIG_LOGO=y 47CONFIG_LOGO=y
48# CONFIG_HID_SUPPORT is not set 48# CONFIG_HID_SUPPORT is not set
49CONFIG_USB=y 49CONFIG_USB=y
50CONFIG_USB_DEBUG=y
51CONFIG_USB_ANNOUNCE_NEW_DEVICES=y 50CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
52CONFIG_USB_DEVICEFS=y
53CONFIG_USB_MON=y 51CONFIG_USB_MON=y
54CONFIG_USB_STORAGE=y 52CONFIG_USB_STORAGE=y
55CONFIG_MMC=y 53CONFIG_MMC=y
diff --git a/arch/arm/configs/corgi_defconfig b/arch/arm/configs/corgi_defconfig
index 1fd1d1de3220..c1470a00f55a 100644
--- a/arch/arm/configs/corgi_defconfig
+++ b/arch/arm/configs/corgi_defconfig
@@ -172,7 +172,6 @@ CONFIG_HID_SAMSUNG=m
172CONFIG_HID_SONY=m 172CONFIG_HID_SONY=m
173CONFIG_HID_SUNPLUS=m 173CONFIG_HID_SUNPLUS=m
174CONFIG_USB=m 174CONFIG_USB=m
175CONFIG_USB_DEVICEFS=y
176CONFIG_USB_MON=m 175CONFIG_USB_MON=m
177CONFIG_USB_SL811_HCD=m 176CONFIG_USB_SL811_HCD=m
178CONFIG_USB_SL811_CS=m 177CONFIG_USB_SL811_CS=m
diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs/davinci_all_defconfig
index 2a282c051cfd..f95f72d62db7 100644
--- a/arch/arm/configs/davinci_all_defconfig
+++ b/arch/arm/configs/davinci_all_defconfig
@@ -157,10 +157,8 @@ CONFIG_HID_SAMSUNG=m
157CONFIG_HID_SONY=m 157CONFIG_HID_SONY=m
158CONFIG_HID_SUNPLUS=m 158CONFIG_HID_SUNPLUS=m
159CONFIG_USB=m 159CONFIG_USB=m
160CONFIG_USB_DEVICEFS=y
161CONFIG_USB_MON=m 160CONFIG_USB_MON=m
162CONFIG_USB_MUSB_HDRC=m 161CONFIG_USB_MUSB_HDRC=m
163CONFIG_USB_MUSB_PERIPHERAL=y
164CONFIG_USB_GADGET_MUSB_HDRC=y 162CONFIG_USB_GADGET_MUSB_HDRC=y
165CONFIG_MUSB_PIO_ONLY=y 163CONFIG_MUSB_PIO_ONLY=y
166CONFIG_USB_STORAGE=m 164CONFIG_USB_STORAGE=m
diff --git a/arch/arm/configs/dove_defconfig b/arch/arm/configs/dove_defconfig
index f15955144175..701677f9248c 100644
--- a/arch/arm/configs/dove_defconfig
+++ b/arch/arm/configs/dove_defconfig
@@ -37,7 +37,6 @@ CONFIG_DEVTMPFS=y
37CONFIG_DEVTMPFS_MOUNT=y 37CONFIG_DEVTMPFS_MOUNT=y
38CONFIG_MTD=y 38CONFIG_MTD=y
39CONFIG_MTD_CMDLINE_PARTS=y 39CONFIG_MTD_CMDLINE_PARTS=y
40CONFIG_MTD_CHAR=y
41CONFIG_MTD_BLOCK=y 40CONFIG_MTD_BLOCK=y
42CONFIG_MTD_CFI=y 41CONFIG_MTD_CFI=y
43CONFIG_MTD_JEDECPROBE=y 42CONFIG_MTD_JEDECPROBE=y
@@ -48,6 +47,7 @@ CONFIG_MTD_CFI_INTELEXT=y
48CONFIG_MTD_CFI_STAA=y 47CONFIG_MTD_CFI_STAA=y
49CONFIG_MTD_PHYSMAP=y 48CONFIG_MTD_PHYSMAP=y
50CONFIG_MTD_M25P80=y 49CONFIG_MTD_M25P80=y
50CONFIG_MTD_SPI_NOR=y
51CONFIG_BLK_DEV_LOOP=y 51CONFIG_BLK_DEV_LOOP=y
52CONFIG_BLK_DEV_RAM=y 52CONFIG_BLK_DEV_RAM=y
53CONFIG_BLK_DEV_RAM_COUNT=1 53CONFIG_BLK_DEV_RAM_COUNT=1
diff --git a/arch/arm/configs/em_x270_defconfig b/arch/arm/configs/em_x270_defconfig
index 60a21e01eb70..4560c9ca6636 100644
--- a/arch/arm/configs/em_x270_defconfig
+++ b/arch/arm/configs/em_x270_defconfig
@@ -144,7 +144,6 @@ CONFIG_HID_SAMSUNG=y
144CONFIG_HID_SONY=y 144CONFIG_HID_SONY=y
145CONFIG_HID_SUNPLUS=y 145CONFIG_HID_SUNPLUS=y
146CONFIG_USB=y 146CONFIG_USB=y
147CONFIG_USB_DEVICEFS=y
148# CONFIG_USB_DEVICE_CLASS is not set 147# CONFIG_USB_DEVICE_CLASS is not set
149CONFIG_USB_MON=y 148CONFIG_USB_MON=y
150CONFIG_USB_OHCI_HCD=y 149CONFIG_USB_OHCI_HCD=y
diff --git a/arch/arm/configs/ep93xx_defconfig b/arch/arm/configs/ep93xx_defconfig
index 6ac5ea73bd0a..1b650c85bdd0 100644
--- a/arch/arm/configs/ep93xx_defconfig
+++ b/arch/arm/configs/ep93xx_defconfig
@@ -80,7 +80,6 @@ CONFIG_I2C_DEBUG_BUS=y
80CONFIG_WATCHDOG=y 80CONFIG_WATCHDOG=y
81CONFIG_EP93XX_WATCHDOG=y 81CONFIG_EP93XX_WATCHDOG=y
82CONFIG_USB=y 82CONFIG_USB=y
83CONFIG_USB_DEBUG=y
84CONFIG_USB_DYNAMIC_MINORS=y 83CONFIG_USB_DYNAMIC_MINORS=y
85CONFIG_USB_OHCI_HCD=y 84CONFIG_USB_OHCI_HCD=y
86CONFIG_USB_OHCI_HCD_PLATFORM=y 85CONFIG_USB_OHCI_HCD_PLATFORM=y
diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
index 4ce7b70ea901..e07a227ec0db 100644
--- a/arch/arm/configs/exynos_defconfig
+++ b/arch/arm/configs/exynos_defconfig
@@ -65,6 +65,7 @@ CONFIG_TCG_TIS_I2C_INFINEON=y
65CONFIG_I2C=y 65CONFIG_I2C=y
66CONFIG_I2C_MUX=y 66CONFIG_I2C_MUX=y
67CONFIG_I2C_ARB_GPIO_CHALLENGE=y 67CONFIG_I2C_ARB_GPIO_CHALLENGE=y
68CONFIG_I2C_EXYNOS5=y
68CONFIG_I2C_S3C2410=y 69CONFIG_I2C_S3C2410=y
69CONFIG_DEBUG_GPIO=y 70CONFIG_DEBUG_GPIO=y
70# CONFIG_HWMON is not set 71# CONFIG_HWMON is not set
diff --git a/arch/arm/configs/footbridge_defconfig b/arch/arm/configs/footbridge_defconfig
index 038518ab39a8..87e020f303ab 100644
--- a/arch/arm/configs/footbridge_defconfig
+++ b/arch/arm/configs/footbridge_defconfig
@@ -100,8 +100,6 @@ CONFIG_FB_CYBER2000=y
100CONFIG_SOUND=m 100CONFIG_SOUND=m
101# CONFIG_USB_HID is not set 101# CONFIG_USB_HID is not set
102CONFIG_USB=m 102CONFIG_USB=m
103CONFIG_USB_DEBUG=y
104CONFIG_USB_DEVICEFS=y
105CONFIG_USB_MON=m 103CONFIG_USB_MON=m
106CONFIG_USB_PRINTER=m 104CONFIG_USB_PRINTER=m
107CONFIG_EXT2_FS=y 105CONFIG_EXT2_FS=y
diff --git a/arch/arm/configs/imx_v4_v5_defconfig b/arch/arm/configs/imx_v4_v5_defconfig
index f1aeb7d72712..bada59d93b67 100644
--- a/arch/arm/configs/imx_v4_v5_defconfig
+++ b/arch/arm/configs/imx_v4_v5_defconfig
@@ -80,6 +80,7 @@ CONFIG_MTD_UBI=y
80CONFIG_EEPROM_AT24=y 80CONFIG_EEPROM_AT24=y
81CONFIG_EEPROM_AT25=y 81CONFIG_EEPROM_AT25=y
82CONFIG_ATA=y 82CONFIG_ATA=y
83CONFIG_BLK_DEV_SD=y
83CONFIG_PATA_IMX=y 84CONFIG_PATA_IMX=y
84CONFIG_NETDEVICES=y 85CONFIG_NETDEVICES=y
85CONFIG_CS89x0=y 86CONFIG_CS89x0=y
@@ -153,8 +154,12 @@ CONFIG_USB_HID=m
153CONFIG_USB=y 154CONFIG_USB=y
154CONFIG_USB_EHCI_HCD=y 155CONFIG_USB_EHCI_HCD=y
155CONFIG_USB_EHCI_MXC=y 156CONFIG_USB_EHCI_MXC=y
157CONFIG_USB_STORAGE=y
158CONFIG_USB_CHIPIDEA=y
159CONFIG_USB_CHIPIDEA_UDC=y
160CONFIG_USB_CHIPIDEA_HOST=y
161CONFIG_NOP_USB_XCEIV=y
156CONFIG_MMC=y 162CONFIG_MMC=y
157CONFIG_MMC_UNSAFE_RESUME=y
158CONFIG_MMC_SDHCI=y 163CONFIG_MMC_SDHCI=y
159CONFIG_MMC_SDHCI_PLTFM=y 164CONFIG_MMC_SDHCI_PLTFM=y
160CONFIG_MMC_SDHCI_ESDHC_IMX=y 165CONFIG_MMC_SDHCI_ESDHC_IMX=y
@@ -177,7 +182,6 @@ CONFIG_RTC_DRV_MXC=y
177CONFIG_DMADEVICES=y 182CONFIG_DMADEVICES=y
178CONFIG_IMX_SDMA=y 183CONFIG_IMX_SDMA=y
179CONFIG_IMX_DMA=y 184CONFIG_IMX_DMA=y
180CONFIG_COMMON_CLK_DEBUG=y
181# CONFIG_IOMMU_SUPPORT is not set 185# CONFIG_IOMMU_SUPPORT is not set
182CONFIG_EXT2_FS=y 186CONFIG_EXT2_FS=y
183CONFIG_EXT3_FS=y 187CONFIG_EXT3_FS=y
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
index 09e974392fa1..ef8815327e5b 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -1,4 +1,3 @@
1# CONFIG_LOCALVERSION_AUTO is not set
2CONFIG_KERNEL_LZO=y 1CONFIG_KERNEL_LZO=y
3CONFIG_SYSVIPC=y 2CONFIG_SYSVIPC=y
4CONFIG_NO_HZ=y 3CONFIG_NO_HZ=y
@@ -33,7 +32,6 @@ CONFIG_MACH_PCM043=y
33CONFIG_MACH_MX35_3DS=y 32CONFIG_MACH_MX35_3DS=y
34CONFIG_MACH_VPR200=y 33CONFIG_MACH_VPR200=y
35CONFIG_MACH_IMX51_DT=y 34CONFIG_MACH_IMX51_DT=y
36CONFIG_MACH_EUKREA_CPUIMX51SD=y
37CONFIG_SOC_IMX50=y 35CONFIG_SOC_IMX50=y
38CONFIG_SOC_IMX53=y 36CONFIG_SOC_IMX53=y
39CONFIG_SOC_IMX6Q=y 37CONFIG_SOC_IMX6Q=y
@@ -46,7 +44,11 @@ CONFIG_VMSPLIT_2G=y
46CONFIG_PREEMPT_VOLUNTARY=y 44CONFIG_PREEMPT_VOLUNTARY=y
47CONFIG_AEABI=y 45CONFIG_AEABI=y
48CONFIG_HIGHMEM=y 46CONFIG_HIGHMEM=y
47CONFIG_CMA=y
49CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" 48CONFIG_CMDLINE="noinitrd console=ttymxc0,115200"
49CONFIG_CPU_FREQ=y
50CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
51CONFIG_ARM_IMX6Q_CPUFREQ=y
50CONFIG_VFP=y 52CONFIG_VFP=y
51CONFIG_NEON=y 53CONFIG_NEON=y
52CONFIG_BINFMT_MISC=m 54CONFIG_BINFMT_MISC=m
@@ -72,6 +74,7 @@ CONFIG_RFKILL_INPUT=y
72CONFIG_DEVTMPFS=y 74CONFIG_DEVTMPFS=y
73CONFIG_DEVTMPFS_MOUNT=y 75CONFIG_DEVTMPFS_MOUNT=y
74# CONFIG_STANDALONE is not set 76# CONFIG_STANDALONE is not set
77CONFIG_DMA_CMA=y
75CONFIG_IMX_WEIM=y 78CONFIG_IMX_WEIM=y
76CONFIG_CONNECTOR=y 79CONFIG_CONNECTOR=y
77CONFIG_MTD=y 80CONFIG_MTD=y
@@ -89,6 +92,7 @@ CONFIG_MTD_SST25L=y
89CONFIG_MTD_NAND=y 92CONFIG_MTD_NAND=y
90CONFIG_MTD_NAND_GPMI_NAND=y 93CONFIG_MTD_NAND_GPMI_NAND=y
91CONFIG_MTD_NAND_MXC=y 94CONFIG_MTD_NAND_MXC=y
95CONFIG_MTD_SPI_NOR=y
92CONFIG_MTD_UBI=y 96CONFIG_MTD_UBI=y
93CONFIG_BLK_DEV_LOOP=y 97CONFIG_BLK_DEV_LOOP=y
94CONFIG_BLK_DEV_RAM=y 98CONFIG_BLK_DEV_RAM=y
@@ -183,6 +187,7 @@ CONFIG_V4L_MEM2MEM_DRIVERS=y
183CONFIG_VIDEO_CODA=y 187CONFIG_VIDEO_CODA=y
184CONFIG_SOC_CAMERA_OV2640=y 188CONFIG_SOC_CAMERA_OV2640=y
185CONFIG_DRM=y 189CONFIG_DRM=y
190CONFIG_DRM_PANEL_SIMPLE=y
186CONFIG_BACKLIGHT_LCD_SUPPORT=y 191CONFIG_BACKLIGHT_LCD_SUPPORT=y
187CONFIG_LCD_CLASS_DEVICE=y 192CONFIG_LCD_CLASS_DEVICE=y
188CONFIG_LCD_L4F00242T03=y 193CONFIG_LCD_L4F00242T03=y
@@ -215,7 +220,6 @@ CONFIG_USB_GADGET=y
215CONFIG_USB_ETH=m 220CONFIG_USB_ETH=m
216CONFIG_USB_MASS_STORAGE=m 221CONFIG_USB_MASS_STORAGE=m
217CONFIG_MMC=y 222CONFIG_MMC=y
218CONFIG_MMC_UNSAFE_RESUME=y
219CONFIG_MMC_SDHCI=y 223CONFIG_MMC_SDHCI=y
220CONFIG_MMC_SDHCI_PLTFM=y 224CONFIG_MMC_SDHCI_PLTFM=y
221CONFIG_MMC_SDHCI_ESDHC_IMX=y 225CONFIG_MMC_SDHCI_ESDHC_IMX=y
@@ -245,7 +249,7 @@ CONFIG_DRM_IMX_TVE=y
245CONFIG_DRM_IMX_LDB=y 249CONFIG_DRM_IMX_LDB=y
246CONFIG_DRM_IMX_IPUV3_CORE=y 250CONFIG_DRM_IMX_IPUV3_CORE=y
247CONFIG_DRM_IMX_IPUV3=y 251CONFIG_DRM_IMX_IPUV3=y
248CONFIG_COMMON_CLK_DEBUG=y 252CONFIG_DRM_IMX_HDMI=y
249# CONFIG_IOMMU_SUPPORT is not set 253# CONFIG_IOMMU_SUPPORT is not set
250CONFIG_PWM=y 254CONFIG_PWM=y
251CONFIG_PWM_IMX=y 255CONFIG_PWM_IMX=y
diff --git a/arch/arm/configs/ixp4xx_defconfig b/arch/arm/configs/ixp4xx_defconfig
index 063e2ab2c8f1..1af665e847d1 100644
--- a/arch/arm/configs/ixp4xx_defconfig
+++ b/arch/arm/configs/ixp4xx_defconfig
@@ -169,7 +169,6 @@ CONFIG_SENSORS_W83781D=y
169CONFIG_WATCHDOG=y 169CONFIG_WATCHDOG=y
170CONFIG_IXP4XX_WATCHDOG=y 170CONFIG_IXP4XX_WATCHDOG=y
171CONFIG_USB=y 171CONFIG_USB=y
172CONFIG_USB_DEVICEFS=y
173# CONFIG_USB_DEVICE_CLASS is not set 172# CONFIG_USB_DEVICE_CLASS is not set
174CONFIG_USB_EHCI_HCD=y 173CONFIG_USB_EHCI_HCD=y
175CONFIG_USB_OHCI_HCD=y 174CONFIG_USB_OHCI_HCD=y
diff --git a/arch/arm/configs/keystone_defconfig b/arch/arm/configs/keystone_defconfig
index ec9a41d50680..095bb52671f6 100644
--- a/arch/arm/configs/keystone_defconfig
+++ b/arch/arm/configs/keystone_defconfig
@@ -135,7 +135,6 @@ CONFIG_WATCHDOG=y
135CONFIG_WATCHDOG_CORE=y 135CONFIG_WATCHDOG_CORE=y
136CONFIG_DAVINCI_WATCHDOG=y 136CONFIG_DAVINCI_WATCHDOG=y
137CONFIG_USB=y 137CONFIG_USB=y
138CONFIG_USB_DEBUG=y
139CONFIG_USB_ANNOUNCE_NEW_DEVICES=y 138CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
140CONFIG_USB_MON=y 139CONFIG_USB_MON=y
141CONFIG_USB_XHCI_HCD=y 140CONFIG_USB_XHCI_HCD=y
diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig
index 2e762d94e94b..b9e480c10b10 100644
--- a/arch/arm/configs/kirkwood_defconfig
+++ b/arch/arm/configs/kirkwood_defconfig
@@ -61,6 +61,7 @@ CONFIG_MTD_PHYSMAP=y
61CONFIG_MTD_M25P80=y 61CONFIG_MTD_M25P80=y
62CONFIG_MTD_NAND=y 62CONFIG_MTD_NAND=y
63CONFIG_MTD_NAND_ORION=y 63CONFIG_MTD_NAND_ORION=y
64CONFIG_MTD_SPI_NOR=y
64CONFIG_BLK_DEV_LOOP=y 65CONFIG_BLK_DEV_LOOP=y
65CONFIG_EEPROM_AT24=y 66CONFIG_EEPROM_AT24=y
66# CONFIG_SCSI_PROC_FS is not set 67# CONFIG_SCSI_PROC_FS is not set
diff --git a/arch/arm/configs/kzm9g_defconfig b/arch/arm/configs/kzm9g_defconfig
index 12bd1f63c399..bd097d455f87 100644
--- a/arch/arm/configs/kzm9g_defconfig
+++ b/arch/arm/configs/kzm9g_defconfig
@@ -106,7 +106,6 @@ CONFIG_SND_SOC=y
106CONFIG_SND_SOC_SH4_FSI=y 106CONFIG_SND_SOC_SH4_FSI=y
107# CONFIG_HID_SUPPORT is not set 107# CONFIG_HID_SUPPORT is not set
108CONFIG_USB=y 108CONFIG_USB=y
109CONFIG_USB_DEVICEFS=y
110CONFIG_USB_R8A66597_HCD=y 109CONFIG_USB_R8A66597_HCD=y
111CONFIG_USB_RENESAS_USBHS=y 110CONFIG_USB_RENESAS_USBHS=y
112CONFIG_USB_STORAGE=y 111CONFIG_USB_STORAGE=y
diff --git a/arch/arm/configs/mini2440_defconfig b/arch/arm/configs/mini2440_defconfig
index a07948a87caa..9c93f5655248 100644
--- a/arch/arm/configs/mini2440_defconfig
+++ b/arch/arm/configs/mini2440_defconfig
@@ -217,7 +217,6 @@ CONFIG_HID_SONY=y
217CONFIG_HID_SUNPLUS=y 217CONFIG_HID_SUNPLUS=y
218CONFIG_HID_TOPSEED=y 218CONFIG_HID_TOPSEED=y
219CONFIG_USB=y 219CONFIG_USB=y
220CONFIG_USB_DEVICEFS=y
221# CONFIG_USB_DEVICE_CLASS is not set 220# CONFIG_USB_DEVICE_CLASS is not set
222CONFIG_USB_OHCI_HCD=y 221CONFIG_USB_OHCI_HCD=y
223CONFIG_USB_ACM=m 222CONFIG_USB_ACM=m
diff --git a/arch/arm/configs/msm_defconfig b/arch/arm/configs/msm_defconfig
index c5858b9eb516..7f52dad97f51 100644
--- a/arch/arm/configs/msm_defconfig
+++ b/arch/arm/configs/msm_defconfig
@@ -17,21 +17,14 @@ CONFIG_MODULE_UNLOAD=y
17CONFIG_MODULE_FORCE_UNLOAD=y 17CONFIG_MODULE_FORCE_UNLOAD=y
18CONFIG_MODVERSIONS=y 18CONFIG_MODVERSIONS=y
19CONFIG_PARTITION_ADVANCED=y 19CONFIG_PARTITION_ADVANCED=y
20CONFIG_ARCH_MSM_DT=y 20CONFIG_ARCH_MSM=y
21CONFIG_ARCH_MSM8X60=y
22CONFIG_ARCH_MSM8960=y
23CONFIG_ARCH_MSM8974=y
24CONFIG_SMP=y
25CONFIG_PREEMPT=y 21CONFIG_PREEMPT=y
26CONFIG_AEABI=y 22CONFIG_AEABI=y
27CONFIG_HIGHMEM=y 23CONFIG_HIGHMEM=y
28CONFIG_HIGHPTE=y 24CONFIG_HIGHPTE=y
29CONFIG_CLEANCACHE=y 25CONFIG_CLEANCACHE=y
30CONFIG_CC_STACKPROTECTOR=y 26CONFIG_AUTO_ZRELADDR=y
31CONFIG_ARM_APPENDED_DTB=y
32CONFIG_ARM_ATAG_DTB_COMPAT=y
33CONFIG_VFP=y 27CONFIG_VFP=y
34CONFIG_NEON=y
35# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 28# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
36CONFIG_NET=y 29CONFIG_NET=y
37CONFIG_PACKET=y 30CONFIG_PACKET=y
@@ -79,16 +72,12 @@ CONFIG_SERIO_LIBPS2=y
79# CONFIG_LEGACY_PTYS is not set 72# CONFIG_LEGACY_PTYS is not set
80CONFIG_SERIAL_MSM=y 73CONFIG_SERIAL_MSM=y
81CONFIG_SERIAL_MSM_CONSOLE=y 74CONFIG_SERIAL_MSM_CONSOLE=y
82CONFIG_HW_RANDOM=y 75# CONFIG_HW_RANDOM is not set
83CONFIG_HW_RANDOM_MSM=y
84CONFIG_I2C=y 76CONFIG_I2C=y
85CONFIG_I2C_CHARDEV=y 77CONFIG_I2C_CHARDEV=y
86CONFIG_SPI=y 78CONFIG_SPI=y
87CONFIG_DEBUG_GPIO=y 79CONFIG_DEBUG_GPIO=y
88CONFIG_GPIO_SYSFS=y 80CONFIG_GPIO_SYSFS=y
89CONFIG_POWER_SUPPLY=y
90CONFIG_POWER_RESET=y
91CONFIG_POWER_RESET_MSM=y
92CONFIG_THERMAL=y 81CONFIG_THERMAL=y
93CONFIG_REGULATOR=y 82CONFIG_REGULATOR=y
94CONFIG_MEDIA_SUPPORT=y 83CONFIG_MEDIA_SUPPORT=y
@@ -100,25 +89,17 @@ CONFIG_SND_DYNAMIC_MINORS=y
100# CONFIG_SND_SPI is not set 89# CONFIG_SND_SPI is not set
101# CONFIG_SND_USB is not set 90# CONFIG_SND_USB is not set
102CONFIG_SND_SOC=y 91CONFIG_SND_SOC=y
103CONFIG_HID_BATTERY_STRENGTH=y
104CONFIG_USB=y 92CONFIG_USB=y
105CONFIG_USB_ANNOUNCE_NEW_DEVICES=y 93CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
106CONFIG_USB_MON=y 94CONFIG_USB_MON=y
107CONFIG_USB_EHCI_HCD=y 95CONFIG_USB_EHCI_HCD=y
108CONFIG_USB_EHCI_MSM=y
109CONFIG_USB_ACM=y 96CONFIG_USB_ACM=y
110CONFIG_USB_SERIAL=y 97CONFIG_USB_SERIAL=y
111CONFIG_USB_GADGET=y 98CONFIG_USB_GADGET=y
112CONFIG_USB_GADGET_DEBUG_FILES=y 99CONFIG_USB_GADGET_DEBUG_FILES=y
113CONFIG_USB_GADGET_VBUS_DRAW=500 100CONFIG_USB_GADGET_VBUS_DRAW=500
114CONFIG_NEW_LEDS=y
115CONFIG_RTC_CLASS=y 101CONFIG_RTC_CLASS=y
116CONFIG_STAGING=y 102CONFIG_STAGING=y
117CONFIG_COMMON_CLK_QCOM=y
118CONFIG_MSM_GCC_8660=y
119CONFIG_MSM_MMCC_8960=y
120CONFIG_MSM_MMCC_8974=y
121CONFIG_MSM_IOMMU=y
122CONFIG_EXT2_FS=y 103CONFIG_EXT2_FS=y
123CONFIG_EXT2_FS_XATTR=y 104CONFIG_EXT2_FS_XATTR=y
124CONFIG_EXT3_FS=y 105CONFIG_EXT3_FS=y
diff --git a/arch/arm/configs/multi_v5_defconfig b/arch/arm/configs/multi_v5_defconfig
index aa3dfb084fed..5ebfa8bf8509 100644
--- a/arch/arm/configs/multi_v5_defconfig
+++ b/arch/arm/configs/multi_v5_defconfig
@@ -11,7 +11,6 @@ CONFIG_MODULE_UNLOAD=y
11# CONFIG_ARCH_MULTI_V7 is not set 11# CONFIG_ARCH_MULTI_V7 is not set
12CONFIG_ARCH_MVEBU=y 12CONFIG_ARCH_MVEBU=y
13CONFIG_MACH_KIRKWOOD=y 13CONFIG_MACH_KIRKWOOD=y
14CONFIG_MACH_T5325=y
15CONFIG_ARCH_MXC=y 14CONFIG_ARCH_MXC=y
16CONFIG_MACH_IMX25_DT=y 15CONFIG_MACH_IMX25_DT=y
17CONFIG_MACH_IMX27_DT=y 16CONFIG_MACH_IMX27_DT=y
@@ -108,6 +107,8 @@ CONFIG_SND=y
108CONFIG_SND_SOC=y 107CONFIG_SND_SOC=y
109CONFIG_SND_KIRKWOOD_SOC=y 108CONFIG_SND_KIRKWOOD_SOC=y
110CONFIG_SND_KIRKWOOD_SOC_T5325=y 109CONFIG_SND_KIRKWOOD_SOC_T5325=y
110CONFIG_SND_SOC_ALC5623=y
111CONFIG_SND_SIMPLE_CARD=y
111# CONFIG_ABX500_CORE is not set 112# CONFIG_ABX500_CORE is not set
112CONFIG_REGULATOR=y 113CONFIG_REGULATOR=y
113CONFIG_REGULATOR_FIXED_VOLTAGE=y 114CONFIG_REGULATOR_FIXED_VOLTAGE=y
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index d4e8a47a2f7c..e2d62048e198 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -5,9 +5,11 @@ CONFIG_NO_HZ=y
5CONFIG_HIGH_RES_TIMERS=y 5CONFIG_HIGH_RES_TIMERS=y
6CONFIG_BLK_DEV_INITRD=y 6CONFIG_BLK_DEV_INITRD=y
7CONFIG_EMBEDDED=y 7CONFIG_EMBEDDED=y
8CONFIG_PERF_EVENTS=y
8CONFIG_MODULES=y 9CONFIG_MODULES=y
9CONFIG_MODULE_UNLOAD=y 10CONFIG_MODULE_UNLOAD=y
10CONFIG_PARTITION_ADVANCED=y 11CONFIG_PARTITION_ADVANCED=y
12CONFIG_ARCH_VIRT=y
11CONFIG_ARCH_MVEBU=y 13CONFIG_ARCH_MVEBU=y
12CONFIG_MACH_ARMADA_370=y 14CONFIG_MACH_ARMADA_370=y
13CONFIG_MACH_ARMADA_375=y 15CONFIG_MACH_ARMADA_375=y
@@ -15,12 +17,12 @@ CONFIG_MACH_ARMADA_38X=y
15CONFIG_MACH_ARMADA_XP=y 17CONFIG_MACH_ARMADA_XP=y
16CONFIG_MACH_DOVE=y 18CONFIG_MACH_DOVE=y
17CONFIG_ARCH_BCM=y 19CONFIG_ARCH_BCM=y
18CONFIG_ARCH_BCM_5301X=y
19CONFIG_ARCH_BCM_MOBILE=y 20CONFIG_ARCH_BCM_MOBILE=y
21CONFIG_ARCH_BCM_5301X=y
20CONFIG_ARCH_BERLIN=y 22CONFIG_ARCH_BERLIN=y
21CONFIG_MACH_BERLIN_BG2=y 23CONFIG_MACH_BERLIN_BG2=y
22CONFIG_MACH_BERLIN_BG2CD=y 24CONFIG_MACH_BERLIN_BG2CD=y
23CONFIG_GPIO_PCA953X=y 25CONFIG_MACH_BERLIN_BG2Q=y
24CONFIG_ARCH_HIGHBANK=y 26CONFIG_ARCH_HIGHBANK=y
25CONFIG_ARCH_HI3xxx=y 27CONFIG_ARCH_HI3xxx=y
26CONFIG_ARCH_KEYSTONE=y 28CONFIG_ARCH_KEYSTONE=y
@@ -34,8 +36,8 @@ CONFIG_ARCH_OMAP3=y
34CONFIG_ARCH_OMAP4=y 36CONFIG_ARCH_OMAP4=y
35CONFIG_SOC_OMAP5=y 37CONFIG_SOC_OMAP5=y
36CONFIG_SOC_AM33XX=y 38CONFIG_SOC_AM33XX=y
37CONFIG_SOC_DRA7XX=y
38CONFIG_SOC_AM43XX=y 39CONFIG_SOC_AM43XX=y
40CONFIG_SOC_DRA7XX=y
39CONFIG_ARCH_QCOM=y 41CONFIG_ARCH_QCOM=y
40CONFIG_ARCH_MSM8X60=y 42CONFIG_ARCH_MSM8X60=y
41CONFIG_ARCH_MSM8960=y 43CONFIG_ARCH_MSM8960=y
@@ -47,6 +49,7 @@ CONFIG_ARCH_SPEAR13XX=y
47CONFIG_MACH_SPEAR1310=y 49CONFIG_MACH_SPEAR1310=y
48CONFIG_MACH_SPEAR1340=y 50CONFIG_MACH_SPEAR1340=y
49CONFIG_ARCH_STI=y 51CONFIG_ARCH_STI=y
52CONFIG_ARCH_EXYNOS=y
50CONFIG_ARCH_SUNXI=y 53CONFIG_ARCH_SUNXI=y
51CONFIG_ARCH_SIRF=y 54CONFIG_ARCH_SIRF=y
52CONFIG_ARCH_TEGRA=y 55CONFIG_ARCH_TEGRA=y
@@ -61,7 +64,6 @@ CONFIG_MACH_SNOWBALL=y
61CONFIG_MACH_UX500_DT=y 64CONFIG_MACH_UX500_DT=y
62CONFIG_ARCH_VEXPRESS=y 65CONFIG_ARCH_VEXPRESS=y
63CONFIG_ARCH_VEXPRESS_CA9X4=y 66CONFIG_ARCH_VEXPRESS_CA9X4=y
64CONFIG_ARCH_VIRT=y
65CONFIG_ARCH_WM8850=y 67CONFIG_ARCH_WM8850=y
66CONFIG_ARCH_ZYNQ=y 68CONFIG_ARCH_ZYNQ=y
67CONFIG_NEON=y 69CONFIG_NEON=y
@@ -71,6 +73,7 @@ CONFIG_PCI_MSI=y
71CONFIG_PCI_MVEBU=y 73CONFIG_PCI_MVEBU=y
72CONFIG_PCI_TEGRA=y 74CONFIG_PCI_TEGRA=y
73CONFIG_SMP=y 75CONFIG_SMP=y
76CONFIG_NR_CPUS=8
74CONFIG_HIGHPTE=y 77CONFIG_HIGHPTE=y
75CONFIG_CMA=y 78CONFIG_CMA=y
76CONFIG_ARM_APPENDED_DTB=y 79CONFIG_ARM_APPENDED_DTB=y
@@ -96,6 +99,11 @@ CONFIG_INET6_IPCOMP=m
96CONFIG_IPV6_MIP6=m 99CONFIG_IPV6_MIP6=m
97CONFIG_IPV6_TUNNEL=m 100CONFIG_IPV6_TUNNEL=m
98CONFIG_IPV6_MULTIPLE_TABLES=y 101CONFIG_IPV6_MULTIPLE_TABLES=y
102CONFIG_CAN=y
103CONFIG_CAN_RAW=y
104CONFIG_CAN_BCM=y
105CONFIG_CAN_DEV=y
106CONFIG_CAN_MCP251X=y
99CONFIG_CFG80211=m 107CONFIG_CFG80211=m
100CONFIG_MAC80211=m 108CONFIG_MAC80211=m
101CONFIG_RFKILL=y 109CONFIG_RFKILL=y
@@ -112,15 +120,19 @@ CONFIG_BLK_DEV_LOOP=y
112CONFIG_ICS932S401=y 120CONFIG_ICS932S401=y
113CONFIG_APDS9802ALS=y 121CONFIG_APDS9802ALS=y
114CONFIG_ISL29003=y 122CONFIG_ISL29003=y
123CONFIG_EEPROM_AT24=y
124CONFIG_EEPROM_SUNXI_SID=y
115CONFIG_BLK_DEV_SD=y 125CONFIG_BLK_DEV_SD=y
116CONFIG_BLK_DEV_SR=y 126CONFIG_BLK_DEV_SR=y
117CONFIG_SCSI_MULTI_LUN=y 127CONFIG_SCSI_MULTI_LUN=y
118CONFIG_ATA=y 128CONFIG_ATA=y
119CONFIG_SATA_AHCI_PLATFORM=y 129CONFIG_SATA_AHCI_PLATFORM=y
130CONFIG_AHCI_SUNXI=y
120CONFIG_SATA_HIGHBANK=y 131CONFIG_SATA_HIGHBANK=y
121CONFIG_SATA_MV=y 132CONFIG_SATA_MV=y
122CONFIG_NETDEVICES=y 133CONFIG_NETDEVICES=y
123CONFIG_SUN4I_EMAC=y 134CONFIG_SUN4I_EMAC=y
135CONFIG_MACB=y
124CONFIG_NET_CALXEDA_XGMAC=y 136CONFIG_NET_CALXEDA_XGMAC=y
125CONFIG_MV643XX_ETH=y 137CONFIG_MV643XX_ETH=y
126CONFIG_MVNETA=y 138CONFIG_MVNETA=y
@@ -153,6 +165,8 @@ CONFIG_SERIAL_8250_CONSOLE=y
153CONFIG_SERIAL_8250_DW=y 165CONFIG_SERIAL_8250_DW=y
154CONFIG_SERIAL_AMBA_PL011=y 166CONFIG_SERIAL_AMBA_PL011=y
155CONFIG_SERIAL_AMBA_PL011_CONSOLE=y 167CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
168CONFIG_SERIAL_SAMSUNG=y
169CONFIG_SERIAL_SAMSUNG_CONSOLE=y
156CONFIG_SERIAL_SIRFSOC=y 170CONFIG_SERIAL_SIRFSOC=y
157CONFIG_SERIAL_SIRFSOC_CONSOLE=y 171CONFIG_SERIAL_SIRFSOC_CONSOLE=y
158CONFIG_SERIAL_TEGRA=y 172CONFIG_SERIAL_TEGRA=y
@@ -175,7 +189,9 @@ CONFIG_I2C_CHARDEV=y
175CONFIG_I2C_MUX=y 189CONFIG_I2C_MUX=y
176CONFIG_I2C_MUX_PCA954x=y 190CONFIG_I2C_MUX_PCA954x=y
177CONFIG_I2C_MUX_PINCTRL=y 191CONFIG_I2C_MUX_PINCTRL=y
192CONFIG_I2C_CADENCE=y
178CONFIG_I2C_DESIGNWARE_PLATFORM=y 193CONFIG_I2C_DESIGNWARE_PLATFORM=y
194CONFIG_I2C_EXYNOS5=y
179CONFIG_I2C_MV64XXX=y 195CONFIG_I2C_MV64XXX=y
180CONFIG_I2C_SIRF=y 196CONFIG_I2C_SIRF=y
181CONFIG_I2C_TEGRA=y 197CONFIG_I2C_TEGRA=y
@@ -184,6 +200,8 @@ CONFIG_SPI_OMAP24XX=y
184CONFIG_SPI_ORION=y 200CONFIG_SPI_ORION=y
185CONFIG_SPI_PL022=y 201CONFIG_SPI_PL022=y
186CONFIG_SPI_SIRF=y 202CONFIG_SPI_SIRF=y
203CONFIG_SPI_SUN4I=y
204CONFIG_SPI_SUN6I=y
187CONFIG_SPI_TEGRA114=y 205CONFIG_SPI_TEGRA114=y
188CONFIG_SPI_TEGRA20_SFLASH=y 206CONFIG_SPI_TEGRA20_SFLASH=y
189CONFIG_SPI_TEGRA20_SLINK=y 207CONFIG_SPI_TEGRA20_SLINK=y
@@ -191,6 +209,8 @@ CONFIG_PINCTRL_AS3722=y
191CONFIG_PINCTRL_PALMAS=y 209CONFIG_PINCTRL_PALMAS=y
192CONFIG_GPIO_SYSFS=y 210CONFIG_GPIO_SYSFS=y
193CONFIG_GPIO_GENERIC_PLATFORM=y 211CONFIG_GPIO_GENERIC_PLATFORM=y
212CONFIG_GPIO_DWAPB=y
213CONFIG_GPIO_PCA953X=y
194CONFIG_GPIO_PCA953X_IRQ=y 214CONFIG_GPIO_PCA953X_IRQ=y
195CONFIG_GPIO_TWL4030=y 215CONFIG_GPIO_TWL4030=y
196CONFIG_GPIO_PALMAS=y 216CONFIG_GPIO_PALMAS=y
@@ -200,16 +220,19 @@ CONFIG_BATTERY_SBS=y
200CONFIG_CHARGER_TPS65090=y 220CONFIG_CHARGER_TPS65090=y
201CONFIG_POWER_RESET_AS3722=y 221CONFIG_POWER_RESET_AS3722=y
202CONFIG_POWER_RESET_GPIO=y 222CONFIG_POWER_RESET_GPIO=y
223CONFIG_POWER_RESET_SUN6I=y
203CONFIG_SENSORS_LM90=y 224CONFIG_SENSORS_LM90=y
204CONFIG_THERMAL=y 225CONFIG_THERMAL=y
205CONFIG_DOVE_THERMAL=y 226CONFIG_DOVE_THERMAL=y
206CONFIG_ARMADA_THERMAL=y 227CONFIG_ARMADA_THERMAL=y
207CONFIG_WATCHDOG=y 228CONFIG_WATCHDOG=y
208CONFIG_ORION_WATCHDOG=y 229CONFIG_ORION_WATCHDOG=y
230CONFIG_SUNXI_WATCHDOG=y
209CONFIG_MFD_AS3722=y 231CONFIG_MFD_AS3722=y
210CONFIG_MFD_CROS_EC=y 232CONFIG_MFD_CROS_EC=y
211CONFIG_MFD_CROS_EC_SPI=y 233CONFIG_MFD_CROS_EC_SPI=y
212CONFIG_MFD_MAX8907=y 234CONFIG_MFD_MAX8907=y
235CONFIG_MFD_SEC_CORE=y
213CONFIG_MFD_PALMAS=y 236CONFIG_MFD_PALMAS=y
214CONFIG_MFD_TPS65090=y 237CONFIG_MFD_TPS65090=y
215CONFIG_MFD_TPS6586X=y 238CONFIG_MFD_TPS6586X=y
@@ -220,6 +243,8 @@ CONFIG_REGULATOR_AS3722=y
220CONFIG_REGULATOR_GPIO=y 243CONFIG_REGULATOR_GPIO=y
221CONFIG_REGULATOR_MAX8907=y 244CONFIG_REGULATOR_MAX8907=y
222CONFIG_REGULATOR_PALMAS=y 245CONFIG_REGULATOR_PALMAS=y
246CONFIG_REGULATOR_S2MPS11=y
247CONFIG_REGULATOR_S5M8767=y
223CONFIG_REGULATOR_TPS51632=y 248CONFIG_REGULATOR_TPS51632=y
224CONFIG_REGULATOR_TPS62360=y 249CONFIG_REGULATOR_TPS62360=y
225CONFIG_REGULATOR_TPS65090=y 250CONFIG_REGULATOR_TPS65090=y
@@ -254,10 +279,13 @@ CONFIG_SND_SOC_TEGRA_ALC5632=y
254CONFIG_SND_SOC_TEGRA_MAX98090=y 279CONFIG_SND_SOC_TEGRA_MAX98090=y
255CONFIG_USB=y 280CONFIG_USB=y
256CONFIG_USB_XHCI_HCD=y 281CONFIG_USB_XHCI_HCD=y
282CONFIG_USB_XHCI_MVEBU=y
257CONFIG_USB_EHCI_HCD=y 283CONFIG_USB_EHCI_HCD=y
258CONFIG_USB_EHCI_TEGRA=y 284CONFIG_USB_EHCI_TEGRA=y
259CONFIG_USB_EHCI_HCD_PLATFORM=y 285CONFIG_USB_EHCI_HCD_PLATFORM=y
260CONFIG_USB_ISP1760_HCD=y 286CONFIG_USB_ISP1760_HCD=y
287CONFIG_USB_OHCI_HCD=y
288CONFIG_USB_OHCI_HCD_PLATFORM=y
261CONFIG_USB_STORAGE=y 289CONFIG_USB_STORAGE=y
262CONFIG_USB_CHIPIDEA=y 290CONFIG_USB_CHIPIDEA=y
263CONFIG_USB_CHIPIDEA_HOST=y 291CONFIG_USB_CHIPIDEA_HOST=y
@@ -272,20 +300,28 @@ CONFIG_MMC=y
272CONFIG_MMC_BLOCK_MINORS=16 300CONFIG_MMC_BLOCK_MINORS=16
273CONFIG_MMC_ARMMMCI=y 301CONFIG_MMC_ARMMMCI=y
274CONFIG_MMC_SDHCI=y 302CONFIG_MMC_SDHCI=y
303CONFIG_MMC_SDHCI_OF_ARASAN=y
275CONFIG_MMC_SDHCI_ESDHC_IMX=y 304CONFIG_MMC_SDHCI_ESDHC_IMX=y
276CONFIG_MMC_SDHCI_TEGRA=y
277CONFIG_MMC_SDHCI_DOVE=y 305CONFIG_MMC_SDHCI_DOVE=y
306CONFIG_MMC_SDHCI_TEGRA=y
307CONFIG_MMC_SDHCI_PXAV3=y
278CONFIG_MMC_SDHCI_SPEAR=y 308CONFIG_MMC_SDHCI_SPEAR=y
309CONFIG_MMC_SDHCI_S3C=y
310CONFIG_MMC_SDHCI_S3C_DMA=y
279CONFIG_MMC_SDHCI_BCM_KONA=y 311CONFIG_MMC_SDHCI_BCM_KONA=y
280CONFIG_MMC_OMAP=y 312CONFIG_MMC_OMAP=y
281CONFIG_MMC_OMAP_HS=y 313CONFIG_MMC_OMAP_HS=y
282CONFIG_MMC_MVSDIO=y 314CONFIG_MMC_MVSDIO=y
315CONFIG_MMC_SUNXI=y
316CONFIG_MMC_DW=y
317CONFIG_MMC_DW_EXYNOS=y
283CONFIG_EDAC=y 318CONFIG_EDAC=y
284CONFIG_EDAC_MM_EDAC=y 319CONFIG_EDAC_MM_EDAC=y
285CONFIG_EDAC_HIGHBANK_MC=y 320CONFIG_EDAC_HIGHBANK_MC=y
286CONFIG_EDAC_HIGHBANK_L2=y 321CONFIG_EDAC_HIGHBANK_L2=y
287CONFIG_RTC_CLASS=y 322CONFIG_RTC_CLASS=y
288CONFIG_RTC_DRV_AS3722=y 323CONFIG_RTC_DRV_AS3722=y
324CONFIG_RTC_DRV_DS1307=y
289CONFIG_RTC_DRV_MAX8907=y 325CONFIG_RTC_DRV_MAX8907=y
290CONFIG_RTC_DRV_PALMAS=y 326CONFIG_RTC_DRV_PALMAS=y
291CONFIG_RTC_DRV_TWL4030=y 327CONFIG_RTC_DRV_TWL4030=y
@@ -294,6 +330,7 @@ CONFIG_RTC_DRV_TPS65910=y
294CONFIG_RTC_DRV_EM3027=y 330CONFIG_RTC_DRV_EM3027=y
295CONFIG_RTC_DRV_PL031=y 331CONFIG_RTC_DRV_PL031=y
296CONFIG_RTC_DRV_VT8500=y 332CONFIG_RTC_DRV_VT8500=y
333CONFIG_RTC_DRV_SUNXI=y
297CONFIG_RTC_DRV_MV=y 334CONFIG_RTC_DRV_MV=y
298CONFIG_RTC_DRV_TEGRA=y 335CONFIG_RTC_DRV_TEGRA=y
299CONFIG_DMADEVICES=y 336CONFIG_DMADEVICES=y
@@ -328,6 +365,7 @@ CONFIG_PWM=y
328CONFIG_PWM_TEGRA=y 365CONFIG_PWM_TEGRA=y
329CONFIG_PWM_VT8500=y 366CONFIG_PWM_VT8500=y
330CONFIG_OMAP_USB2=y 367CONFIG_OMAP_USB2=y
368CONFIG_PHY_SUN4I_USB=y
331CONFIG_EXT4_FS=y 369CONFIG_EXT4_FS=y
332CONFIG_VFAT_FS=y 370CONFIG_VFAT_FS=y
333CONFIG_TMPFS=y 371CONFIG_TMPFS=y
diff --git a/arch/arm/configs/mv78xx0_defconfig b/arch/arm/configs/mv78xx0_defconfig
index 1f08219c1b3c..0dae1c1f007a 100644
--- a/arch/arm/configs/mv78xx0_defconfig
+++ b/arch/arm/configs/mv78xx0_defconfig
@@ -80,7 +80,6 @@ CONFIG_I2C=y
80CONFIG_I2C_CHARDEV=y 80CONFIG_I2C_CHARDEV=y
81CONFIG_I2C_MV64XXX=y 81CONFIG_I2C_MV64XXX=y
82CONFIG_USB=y 82CONFIG_USB=y
83CONFIG_USB_DEVICEFS=y
84CONFIG_USB_EHCI_HCD=y 83CONFIG_USB_EHCI_HCD=y
85CONFIG_USB_EHCI_ROOT_HUB_TT=y 84CONFIG_USB_EHCI_ROOT_HUB_TT=y
86CONFIG_USB_EHCI_TT_NEWSCHED=y 85CONFIG_USB_EHCI_TT_NEWSCHED=y
diff --git a/arch/arm/configs/mvebu_v5_defconfig b/arch/arm/configs/mvebu_v5_defconfig
index 36484a37a1ca..27c732fdf21e 100644
--- a/arch/arm/configs/mvebu_v5_defconfig
+++ b/arch/arm/configs/mvebu_v5_defconfig
@@ -1,4 +1,5 @@
1CONFIG_SYSVIPC=y 1CONFIG_SYSVIPC=y
2CONFIG_FHANDLE=y
2CONFIG_NO_HZ=y 3CONFIG_NO_HZ=y
3CONFIG_HIGH_RES_TIMERS=y 4CONFIG_HIGH_RES_TIMERS=y
4CONFIG_LOG_BUF_SHIFT=19 5CONFIG_LOG_BUF_SHIFT=19
@@ -11,7 +12,6 @@ CONFIG_MODULE_UNLOAD=y
11# CONFIG_ARCH_MULTI_V7 is not set 12# CONFIG_ARCH_MULTI_V7 is not set
12CONFIG_ARCH_MVEBU=y 13CONFIG_ARCH_MVEBU=y
13CONFIG_MACH_KIRKWOOD=y 14CONFIG_MACH_KIRKWOOD=y
14CONFIG_MACH_T5325=y
15# CONFIG_CPU_FEROCEON_OLD_ID is not set 15# CONFIG_CPU_FEROCEON_OLD_ID is not set
16CONFIG_PCI_MVEBU=y 16CONFIG_PCI_MVEBU=y
17CONFIG_PREEMPT=y 17CONFIG_PREEMPT=y
@@ -50,6 +50,7 @@ CONFIG_MTD_PHYSMAP=y
50CONFIG_MTD_M25P80=y 50CONFIG_MTD_M25P80=y
51CONFIG_MTD_NAND=y 51CONFIG_MTD_NAND=y
52CONFIG_MTD_NAND_ORION=y 52CONFIG_MTD_NAND_ORION=y
53CONFIG_MTD_SPI_NOR=y
53CONFIG_BLK_DEV_LOOP=y 54CONFIG_BLK_DEV_LOOP=y
54CONFIG_EEPROM_AT24=y 55CONFIG_EEPROM_AT24=y
55# CONFIG_SCSI_PROC_FS is not set 56# CONFIG_SCSI_PROC_FS is not set
@@ -100,6 +101,8 @@ CONFIG_SND=y
100CONFIG_SND_SOC=y 101CONFIG_SND_SOC=y
101CONFIG_SND_KIRKWOOD_SOC=y 102CONFIG_SND_KIRKWOOD_SOC=y
102CONFIG_SND_KIRKWOOD_SOC_T5325=y 103CONFIG_SND_KIRKWOOD_SOC_T5325=y
104CONFIG_SND_SOC_ALC5623=y
105CONFIG_SND_SIMPLE_CARD=y
103CONFIG_REGULATOR=y 106CONFIG_REGULATOR=y
104CONFIG_REGULATOR_FIXED_VOLTAGE=y 107CONFIG_REGULATOR_FIXED_VOLTAGE=y
105CONFIG_HID_DRAGONRISE=y 108CONFIG_HID_DRAGONRISE=y
diff --git a/arch/arm/configs/mvebu_v7_defconfig b/arch/arm/configs/mvebu_v7_defconfig
index a34713d8db9f..e11170e37442 100644
--- a/arch/arm/configs/mvebu_v7_defconfig
+++ b/arch/arm/configs/mvebu_v7_defconfig
@@ -1,5 +1,6 @@
1CONFIG_EXPERIMENTAL=y 1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y 2CONFIG_SYSVIPC=y
3CONFIG_FHANDLE=y
3CONFIG_IRQ_DOMAIN_DEBUG=y 4CONFIG_IRQ_DOMAIN_DEBUG=y
4CONFIG_HIGH_RES_TIMERS=y 5CONFIG_HIGH_RES_TIMERS=y
5CONFIG_LOG_BUF_SHIFT=14 6CONFIG_LOG_BUF_SHIFT=14
@@ -17,6 +18,7 @@ CONFIG_NEON=y
17# CONFIG_CACHE_L2X0 is not set 18# CONFIG_CACHE_L2X0 is not set
18# CONFIG_SWP_EMULATE is not set 19# CONFIG_SWP_EMULATE is not set
19CONFIG_PCI=y 20CONFIG_PCI=y
21CONFIG_PCI_MSI=y
20CONFIG_PCI_MVEBU=y 22CONFIG_PCI_MVEBU=y
21CONFIG_SMP=y 23CONFIG_SMP=y
22CONFIG_AEABI=y 24CONFIG_AEABI=y
@@ -29,6 +31,9 @@ CONFIG_ARM_ATAG_DTB_COMPAT=y
29CONFIG_VFP=y 31CONFIG_VFP=y
30CONFIG_NET=y 32CONFIG_NET=y
31CONFIG_INET=y 33CONFIG_INET=y
34CONFIG_IP_PNP=y
35CONFIG_IP_PNP_DHCP=y
36CONFIG_IP_PNP_BOOTP=y
32CONFIG_BT=y 37CONFIG_BT=y
33CONFIG_BT_MRVL=y 38CONFIG_BT_MRVL=y
34CONFIG_BT_MRVL_SDIO=y 39CONFIG_BT_MRVL_SDIO=y
@@ -36,6 +41,7 @@ CONFIG_CFG80211=y
36CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 41CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
37CONFIG_BLK_DEV_SD=y 42CONFIG_BLK_DEV_SD=y
38CONFIG_ATA=y 43CONFIG_ATA=y
44CONFIG_AHCI_MVEBU=y
39CONFIG_SATA_MV=y 45CONFIG_SATA_MV=y
40CONFIG_NETDEVICES=y 46CONFIG_NETDEVICES=y
41CONFIG_MVNETA=y 47CONFIG_MVNETA=y
@@ -53,6 +59,7 @@ CONFIG_I2C_MV64XXX=y
53CONFIG_MTD=y 59CONFIG_MTD=y
54CONFIG_MTD_CHAR=y 60CONFIG_MTD_CHAR=y
55CONFIG_MTD_M25P80=y 61CONFIG_MTD_M25P80=y
62CONFIG_MTD_SPI_NOR=y
56CONFIG_MTD_CFI=y 63CONFIG_MTD_CFI=y
57CONFIG_MTD_CFI_INTELEXT=y 64CONFIG_MTD_CFI_INTELEXT=y
58CONFIG_MTD_CFI_AMDSTD=y 65CONFIG_MTD_CFI_AMDSTD=y
@@ -78,7 +85,9 @@ CONFIG_USB_EHCI_HCD=y
78CONFIG_USB_EHCI_ROOT_HUB_TT=y 85CONFIG_USB_EHCI_ROOT_HUB_TT=y
79CONFIG_USB_STORAGE=y 86CONFIG_USB_STORAGE=y
80CONFIG_USB_XHCI_HCD=y 87CONFIG_USB_XHCI_HCD=y
88CONFIG_USB_XHCI_MVEBU=y
81CONFIG_MMC=y 89CONFIG_MMC=y
90CONFIG_MMC_SDHCI_PXAV3=y
82CONFIG_MMC_MVSDIO=y 91CONFIG_MMC_MVSDIO=y
83CONFIG_NEW_LEDS=y 92CONFIG_NEW_LEDS=y
84CONFIG_LEDS_GPIO=y 93CONFIG_LEDS_GPIO=y
@@ -103,6 +112,8 @@ CONFIG_UDF_FS=m
103CONFIG_MSDOS_FS=y 112CONFIG_MSDOS_FS=y
104CONFIG_VFAT_FS=y 113CONFIG_VFAT_FS=y
105CONFIG_TMPFS=y 114CONFIG_TMPFS=y
115CONFIG_NFS_FS=y
116CONFIG_ROOT_NFS=y
106CONFIG_NLS_CODEPAGE_437=y 117CONFIG_NLS_CODEPAGE_437=y
107CONFIG_NLS_CODEPAGE_850=y 118CONFIG_NLS_CODEPAGE_850=y
108CONFIG_NLS_ISO8859_1=y 119CONFIG_NLS_ISO8859_1=y
diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig
index 6150108e15de..a9f992335eb2 100644
--- a/arch/arm/configs/mxs_defconfig
+++ b/arch/arm/configs/mxs_defconfig
@@ -26,7 +26,6 @@ CONFIG_ARCH_MXS=y
26# CONFIG_ARM_THUMB is not set 26# CONFIG_ARM_THUMB is not set
27CONFIG_PREEMPT_VOLUNTARY=y 27CONFIG_PREEMPT_VOLUNTARY=y
28CONFIG_AEABI=y 28CONFIG_AEABI=y
29CONFIG_FPE_NWFPE=y
30CONFIG_NET=y 29CONFIG_NET=y
31CONFIG_PACKET=y 30CONFIG_PACKET=y
32CONFIG_UNIX=y 31CONFIG_UNIX=y
@@ -51,10 +50,10 @@ CONFIG_MTD_CMDLINE_PARTS=y
51CONFIG_MTD_BLOCK=y 50CONFIG_MTD_BLOCK=y
52CONFIG_MTD_DATAFLASH=y 51CONFIG_MTD_DATAFLASH=y
53CONFIG_MTD_M25P80=y 52CONFIG_MTD_M25P80=y
54# CONFIG_M25PXX_USE_FAST_READ is not set
55CONFIG_MTD_SST25L=y 53CONFIG_MTD_SST25L=y
56CONFIG_MTD_NAND=y 54CONFIG_MTD_NAND=y
57CONFIG_MTD_NAND_GPMI_NAND=y 55CONFIG_MTD_NAND_GPMI_NAND=y
56CONFIG_MTD_SPI_NOR=y
58CONFIG_MTD_UBI=y 57CONFIG_MTD_UBI=y
59# CONFIG_BLK_DEV is not set 58# CONFIG_BLK_DEV is not set
60CONFIG_EEPROM_AT24=y 59CONFIG_EEPROM_AT24=y
@@ -120,7 +119,6 @@ CONFIG_USB_GADGET=y
120CONFIG_USB_ETH=m 119CONFIG_USB_ETH=m
121CONFIG_USB_MASS_STORAGE=m 120CONFIG_USB_MASS_STORAGE=m
122CONFIG_MMC=y 121CONFIG_MMC=y
123CONFIG_MMC_UNSAFE_RESUME=y
124CONFIG_MMC_MXS=y 122CONFIG_MMC_MXS=y
125CONFIG_NEW_LEDS=y 123CONFIG_NEW_LEDS=y
126CONFIG_LEDS_CLASS=y 124CONFIG_LEDS_CLASS=y
@@ -138,7 +136,6 @@ CONFIG_DMADEVICES=y
138CONFIG_MXS_DMA=y 136CONFIG_MXS_DMA=y
139CONFIG_STAGING=y 137CONFIG_STAGING=y
140CONFIG_MXS_LRADC=y 138CONFIG_MXS_LRADC=y
141CONFIG_COMMON_CLK_DEBUG=y
142CONFIG_IIO=y 139CONFIG_IIO=y
143CONFIG_IIO_SYSFS_TRIGGER=y 140CONFIG_IIO_SYSFS_TRIGGER=y
144CONFIG_PWM=y 141CONFIG_PWM=y
@@ -180,7 +177,7 @@ CONFIG_BLK_DEV_IO_TRACE=y
180CONFIG_STRICT_DEVMEM=y 177CONFIG_STRICT_DEVMEM=y
181CONFIG_DEBUG_USER=y 178CONFIG_DEBUG_USER=y
182# CONFIG_CRYPTO_ANSI_CPRNG is not set 179# CONFIG_CRYPTO_ANSI_CPRNG is not set
183# CONFIG_CRYPTO_HW is not set 180CONFIG_CRYPTO_DEV_MXS_DCP=y
184CONFIG_CRC_ITU_T=m 181CONFIG_CRC_ITU_T=m
185CONFIG_CRC7=m 182CONFIG_CRC7=m
186CONFIG_FONTS=y 183CONFIG_FONTS=y
diff --git a/arch/arm/configs/neponset_defconfig b/arch/arm/configs/neponset_defconfig
index d7dc9922cfff..460dca4a4f98 100644
--- a/arch/arm/configs/neponset_defconfig
+++ b/arch/arm/configs/neponset_defconfig
@@ -68,8 +68,6 @@ CONFIG_SOUND=y
68CONFIG_SOUND_PRIME=y 68CONFIG_SOUND_PRIME=y
69# CONFIG_USB_HID is not set 69# CONFIG_USB_HID is not set
70CONFIG_USB=m 70CONFIG_USB=m
71CONFIG_USB_DEBUG=y
72CONFIG_USB_DEVICEFS=y
73CONFIG_USB_MON=m 71CONFIG_USB_MON=m
74CONFIG_USB_OHCI_HCD=m 72CONFIG_USB_OHCI_HCD=m
75CONFIG_USB_STORAGE=m 73CONFIG_USB_STORAGE=m
diff --git a/arch/arm/configs/omap1_defconfig b/arch/arm/configs/omap1_defconfig
index d74edbad18fc..ce541bb3c2de 100644
--- a/arch/arm/configs/omap1_defconfig
+++ b/arch/arm/configs/omap1_defconfig
@@ -197,8 +197,6 @@ CONFIG_SND_OMAP_SOC=y
197# CONFIG_USB_HID is not set 197# CONFIG_USB_HID is not set
198CONFIG_USB=y 198CONFIG_USB=y
199CONFIG_USB_PHY=y 199CONFIG_USB_PHY=y
200CONFIG_USB_DEBUG=y
201CONFIG_USB_DEVICEFS=y
202# CONFIG_USB_DEVICE_CLASS is not set 200# CONFIG_USB_DEVICE_CLASS is not set
203CONFIG_USB_MON=y 201CONFIG_USB_MON=y
204CONFIG_USB_OHCI_HCD=y 202CONFIG_USB_OHCI_HCD=y
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index a4e8d017f25b..59066cf0271a 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -21,6 +21,8 @@ CONFIG_MODULE_SRCVERSION_ALL=y
21# CONFIG_BLK_DEV_BSG is not set 21# CONFIG_BLK_DEV_BSG is not set
22CONFIG_PARTITION_ADVANCED=y 22CONFIG_PARTITION_ADVANCED=y
23CONFIG_ARCH_MULTI_V6=y 23CONFIG_ARCH_MULTI_V6=y
24CONFIG_POWER_AVS_OMAP=y
25CONFIG_POWER_AVS_OMAP_CLASS3=y
24CONFIG_OMAP_RESET_CLOCKS=y 26CONFIG_OMAP_RESET_CLOCKS=y
25CONFIG_OMAP_MUX_DEBUG=y 27CONFIG_OMAP_MUX_DEBUG=y
26CONFIG_ARCH_OMAP2=y 28CONFIG_ARCH_OMAP2=y
@@ -42,6 +44,7 @@ CONFIG_ARM_ATAG_DTB_COMPAT=y
42CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200" 44CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200"
43CONFIG_KEXEC=y 45CONFIG_KEXEC=y
44CONFIG_FPE_NWFPE=y 46CONFIG_FPE_NWFPE=y
47CONFIG_CPU_IDLE=y
45CONFIG_BINFMT_MISC=y 48CONFIG_BINFMT_MISC=y
46CONFIG_PM_DEBUG=y 49CONFIG_PM_DEBUG=y
47CONFIG_NET=y 50CONFIG_NET=y
@@ -159,11 +162,14 @@ CONFIG_GPIO_SYSFS=y
159CONFIG_GPIO_TWL4030=y 162CONFIG_GPIO_TWL4030=y
160CONFIG_W1=y 163CONFIG_W1=y
161CONFIG_POWER_SUPPLY=y 164CONFIG_POWER_SUPPLY=y
165CONFIG_POWER_AVS=y
162CONFIG_SENSORS_LM75=m 166CONFIG_SENSORS_LM75=m
163CONFIG_THERMAL=y 167CONFIG_THERMAL=y
164CONFIG_THERMAL_GOV_FAIR_SHARE=y 168CONFIG_THERMAL_GOV_FAIR_SHARE=y
165CONFIG_THERMAL_GOV_USER_SPACE=y 169CONFIG_THERMAL_GOV_USER_SPACE=y
170CONFIG_CPU_THERMAL=y
166CONFIG_TI_SOC_THERMAL=y 171CONFIG_TI_SOC_THERMAL=y
172CONFIG_TI_THERMAL=y
167CONFIG_OMAP4_THERMAL=y 173CONFIG_OMAP4_THERMAL=y
168CONFIG_OMAP5_THERMAL=y 174CONFIG_OMAP5_THERMAL=y
169CONFIG_DRA752_THERMAL=y 175CONFIG_DRA752_THERMAL=y
@@ -177,6 +183,7 @@ CONFIG_MFD_TPS65910=y
177CONFIG_TWL6040_CORE=y 183CONFIG_TWL6040_CORE=y
178CONFIG_REGULATOR_FIXED_VOLTAGE=y 184CONFIG_REGULATOR_FIXED_VOLTAGE=y
179CONFIG_REGULATOR_PALMAS=y 185CONFIG_REGULATOR_PALMAS=y
186CONFIG_REGULATOR_TI_ABB=y
180CONFIG_REGULATOR_TPS65023=y 187CONFIG_REGULATOR_TPS65023=y
181CONFIG_REGULATOR_TPS6507X=y 188CONFIG_REGULATOR_TPS6507X=y
182CONFIG_REGULATOR_TPS65217=y 189CONFIG_REGULATOR_TPS65217=y
@@ -217,7 +224,6 @@ CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m
217CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m 224CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m
218CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m 225CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m
219CONFIG_USB=y 226CONFIG_USB=y
220CONFIG_USB_DEBUG=y
221CONFIG_USB_ANNOUNCE_NEW_DEVICES=y 227CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
222CONFIG_USB_MON=y 228CONFIG_USB_MON=y
223CONFIG_USB_WDM=y 229CONFIG_USB_WDM=y
@@ -239,6 +245,7 @@ CONFIG_SDIO_UART=y
239CONFIG_MMC_OMAP=y 245CONFIG_MMC_OMAP=y
240CONFIG_MMC_OMAP_HS=y 246CONFIG_MMC_OMAP_HS=y
241CONFIG_NEW_LEDS=y 247CONFIG_NEW_LEDS=y
248CONFIG_LEDS_CLASS=y
242CONFIG_LEDS_GPIO=y 249CONFIG_LEDS_GPIO=y
243CONFIG_LEDS_TRIGGERS=y 250CONFIG_LEDS_TRIGGERS=y
244CONFIG_LEDS_TRIGGER_TIMER=y 251CONFIG_LEDS_TRIGGER_TIMER=y
diff --git a/arch/arm/configs/pcm027_defconfig b/arch/arm/configs/pcm027_defconfig
index 2f136c30a989..0a847d04ddc1 100644
--- a/arch/arm/configs/pcm027_defconfig
+++ b/arch/arm/configs/pcm027_defconfig
@@ -76,7 +76,6 @@ CONFIG_SND_PCM_OSS=y
76CONFIG_SND_PXA2XX_AC97=y 76CONFIG_SND_PXA2XX_AC97=y
77# CONFIG_HID_SUPPORT is not set 77# CONFIG_HID_SUPPORT is not set
78CONFIG_USB=y 78CONFIG_USB=y
79CONFIG_USB_DEVICEFS=y
80CONFIG_USB_OHCI_HCD=y 79CONFIG_USB_OHCI_HCD=y
81CONFIG_USB_STORAGE=y 80CONFIG_USB_STORAGE=y
82CONFIG_MMC=y 81CONFIG_MMC=y
diff --git a/arch/arm/configs/qcom_defconfig b/arch/arm/configs/qcom_defconfig
new file mode 100644
index 000000000000..42ebd72799e6
--- /dev/null
+++ b/arch/arm/configs/qcom_defconfig
@@ -0,0 +1,165 @@
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_QCOM=y
21CONFIG_ARCH_MSM8X60=y
22CONFIG_ARCH_MSM8960=y
23CONFIG_ARCH_MSM8974=y
24CONFIG_SMP=y
25CONFIG_PREEMPT=y
26CONFIG_AEABI=y
27CONFIG_HIGHMEM=y
28CONFIG_HIGHPTE=y
29CONFIG_CLEANCACHE=y
30CONFIG_ARM_APPENDED_DTB=y
31CONFIG_ARM_ATAG_DTB_COMPAT=y
32CONFIG_VFP=y
33CONFIG_NEON=y
34# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
35CONFIG_NET=y
36CONFIG_PACKET=y
37CONFIG_UNIX=y
38CONFIG_INET=y
39CONFIG_IP_ADVANCED_ROUTER=y
40CONFIG_IP_MULTIPLE_TABLES=y
41CONFIG_IP_ROUTE_VERBOSE=y
42CONFIG_IP_PNP=y
43CONFIG_IP_PNP_DHCP=y
44# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
45# CONFIG_INET_XFRM_MODE_TUNNEL is not set
46# CONFIG_INET_XFRM_MODE_BEET is not set
47# CONFIG_INET_LRO is not set
48# CONFIG_IPV6 is not set
49CONFIG_CFG80211=y
50CONFIG_RFKILL=y
51CONFIG_DEVTMPFS=y
52CONFIG_DEVTMPFS_MOUNT=y
53CONFIG_MTD=y
54CONFIG_MTD_BLOCK=y
55CONFIG_MTD_M25P80=y
56CONFIG_BLK_DEV_LOOP=y
57CONFIG_BLK_DEV_RAM=y
58CONFIG_SCSI=y
59CONFIG_SCSI_TGT=y
60CONFIG_BLK_DEV_SD=y
61CONFIG_CHR_DEV_SG=y
62CONFIG_CHR_DEV_SCH=y
63CONFIG_SCSI_MULTI_LUN=y
64CONFIG_SCSI_CONSTANTS=y
65CONFIG_SCSI_LOGGING=y
66CONFIG_SCSI_SCAN_ASYNC=y
67CONFIG_NETDEVICES=y
68CONFIG_DUMMY=y
69CONFIG_MDIO_BITBANG=y
70CONFIG_MDIO_GPIO=y
71CONFIG_SLIP=y
72CONFIG_SLIP_COMPRESSED=y
73CONFIG_SLIP_MODE_SLIP6=y
74CONFIG_USB_USBNET=y
75# CONFIG_USB_NET_AX8817X is not set
76# CONFIG_USB_NET_ZAURUS is not set
77CONFIG_INPUT_EVDEV=y
78# CONFIG_KEYBOARD_ATKBD is not set
79# CONFIG_MOUSE_PS2 is not set
80CONFIG_INPUT_JOYSTICK=y
81CONFIG_INPUT_TOUCHSCREEN=y
82CONFIG_INPUT_MISC=y
83CONFIG_INPUT_UINPUT=y
84CONFIG_SERIO_LIBPS2=y
85# CONFIG_LEGACY_PTYS is not set
86CONFIG_SERIAL_MSM=y
87CONFIG_SERIAL_MSM_CONSOLE=y
88CONFIG_HW_RANDOM=y
89CONFIG_HW_RANDOM_MSM=y
90CONFIG_I2C=y
91CONFIG_I2C_CHARDEV=y
92CONFIG_I2C_QUP=y
93CONFIG_SPI=y
94CONFIG_SPI_QUP=y
95CONFIG_SPMI=y
96CONFIG_PINCTRL_APQ8064=y
97CONFIG_PINCTRL_IPQ8064=y
98CONFIG_PINCTRL_MSM8X74=y
99CONFIG_DEBUG_GPIO=y
100CONFIG_GPIO_SYSFS=y
101CONFIG_POWER_SUPPLY=y
102CONFIG_POWER_RESET=y
103CONFIG_POWER_RESET_MSM=y
104CONFIG_THERMAL=y
105CONFIG_REGULATOR=y
106CONFIG_MEDIA_SUPPORT=y
107CONFIG_FB=y
108CONFIG_SOUND=y
109CONFIG_SND=y
110CONFIG_SND_DYNAMIC_MINORS=y
111# CONFIG_SND_ARM is not set
112# CONFIG_SND_SPI is not set
113# CONFIG_SND_USB is not set
114CONFIG_SND_SOC=y
115CONFIG_HID_BATTERY_STRENGTH=y
116CONFIG_USB=y
117CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
118CONFIG_USB_MON=y
119CONFIG_USB_EHCI_HCD=y
120CONFIG_USB_ACM=y
121CONFIG_USB_SERIAL=y
122CONFIG_USB_GADGET=y
123CONFIG_USB_GADGET_DEBUG_FILES=y
124CONFIG_USB_GADGET_VBUS_DRAW=500
125CONFIG_MMC=y
126CONFIG_MMC_BLOCK_MINORS=16
127CONFIG_MMC_SDHCI=y
128CONFIG_MMC_SDHCI_PLTFM=y
129CONFIG_MMC_SDHCI_MSM=y
130CONFIG_RTC_CLASS=y
131CONFIG_DMADEVICES=y
132CONFIG_QCOM_BAM_DMA=y
133CONFIG_STAGING=y
134CONFIG_QCOM_GSBI=y
135CONFIG_COMMON_CLK_QCOM=y
136CONFIG_MSM_GCC_8660=y
137CONFIG_MSM_MMCC_8960=y
138CONFIG_MSM_MMCC_8974=y
139CONFIG_MSM_IOMMU=y
140CONFIG_GENERIC_PHY=y
141CONFIG_EXT2_FS=y
142CONFIG_EXT2_FS_XATTR=y
143CONFIG_EXT3_FS=y
144# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
145CONFIG_EXT4_FS=y
146CONFIG_FUSE_FS=y
147CONFIG_VFAT_FS=y
148CONFIG_TMPFS=y
149CONFIG_JFFS2_FS=y
150CONFIG_NFS_FS=y
151CONFIG_NFS_V3_ACL=y
152CONFIG_NFS_V4=y
153CONFIG_CIFS=y
154CONFIG_NLS_CODEPAGE_437=y
155CONFIG_NLS_ASCII=y
156CONFIG_NLS_ISO8859_1=y
157CONFIG_NLS_UTF8=y
158CONFIG_PRINTK_TIME=y
159CONFIG_DYNAMIC_DEBUG=y
160CONFIG_DEBUG_INFO=y
161CONFIG_MAGIC_SYSRQ=y
162CONFIG_LOCKUP_DETECTOR=y
163# CONFIG_DETECT_HUNG_TASK is not set
164# CONFIG_SCHED_DEBUG is not set
165CONFIG_TIMER_STATS=y
diff --git a/arch/arm/configs/raumfeld_defconfig b/arch/arm/configs/raumfeld_defconfig
index f7caa909b40d..3d833aea545a 100644
--- a/arch/arm/configs/raumfeld_defconfig
+++ b/arch/arm/configs/raumfeld_defconfig
@@ -122,7 +122,6 @@ CONFIG_HID_TOPSEED=y
122CONFIG_HID_THRUSTMASTER=y 122CONFIG_HID_THRUSTMASTER=y
123CONFIG_HID_ZEROPLUS=y 123CONFIG_HID_ZEROPLUS=y
124CONFIG_USB=y 124CONFIG_USB=y
125CONFIG_USB_DEBUG=y
126CONFIG_USB_ANNOUNCE_NEW_DEVICES=y 125CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
127CONFIG_USB_MON=y 126CONFIG_USB_MON=y
128CONFIG_USB_OHCI_HCD=y 127CONFIG_USB_OHCI_HCD=y
diff --git a/arch/arm/configs/realview-smp_defconfig b/arch/arm/configs/realview-smp_defconfig
index abe61bf379d2..1da5d9e48224 100644
--- a/arch/arm/configs/realview-smp_defconfig
+++ b/arch/arm/configs/realview-smp_defconfig
@@ -76,8 +76,10 @@ CONFIG_MMC=y
76CONFIG_MMC_ARMMMCI=y 76CONFIG_MMC_ARMMMCI=y
77CONFIG_NEW_LEDS=y 77CONFIG_NEW_LEDS=y
78CONFIG_LEDS_CLASS=y 78CONFIG_LEDS_CLASS=y
79CONFIG_LEDS_VERSATILE=y
79CONFIG_LEDS_TRIGGERS=y 80CONFIG_LEDS_TRIGGERS=y
80CONFIG_LEDS_TRIGGER_HEARTBEAT=y 81CONFIG_LEDS_TRIGGER_HEARTBEAT=y
82CONFIG_LEDS_TRIGGER_CPU=y
81CONFIG_RTC_CLASS=y 83CONFIG_RTC_CLASS=y
82CONFIG_RTC_DRV_DS1307=y 84CONFIG_RTC_DRV_DS1307=y
83CONFIG_RTC_DRV_PL031=y 85CONFIG_RTC_DRV_PL031=y
diff --git a/arch/arm/configs/realview_defconfig b/arch/arm/configs/realview_defconfig
index 7079cbe898a8..d02e9d911bb7 100644
--- a/arch/arm/configs/realview_defconfig
+++ b/arch/arm/configs/realview_defconfig
@@ -75,8 +75,10 @@ CONFIG_MMC=y
75CONFIG_MMC_ARMMMCI=y 75CONFIG_MMC_ARMMMCI=y
76CONFIG_NEW_LEDS=y 76CONFIG_NEW_LEDS=y
77CONFIG_LEDS_CLASS=y 77CONFIG_LEDS_CLASS=y
78CONFIG_LEDS_VERSATILE=y
78CONFIG_LEDS_TRIGGERS=y 79CONFIG_LEDS_TRIGGERS=y
79CONFIG_LEDS_TRIGGER_HEARTBEAT=y 80CONFIG_LEDS_TRIGGER_HEARTBEAT=y
81CONFIG_LEDS_TRIGGER_CPU=y
80CONFIG_RTC_CLASS=y 82CONFIG_RTC_CLASS=y
81CONFIG_RTC_DRV_DS1307=y 83CONFIG_RTC_DRV_DS1307=y
82CONFIG_RTC_DRV_PL031=y 84CONFIG_RTC_DRV_PL031=y
diff --git a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig
index 193448f31284..eb4d204bff47 100644
--- a/arch/arm/configs/s3c2410_defconfig
+++ b/arch/arm/configs/s3c2410_defconfig
@@ -324,7 +324,6 @@ CONFIG_SND_USB_CAIAQ=m
324CONFIG_SND_SOC=y 324CONFIG_SND_SOC=y
325# CONFIG_USB_HID is not set 325# CONFIG_USB_HID is not set
326CONFIG_USB=y 326CONFIG_USB=y
327CONFIG_USB_DEVICEFS=y
328CONFIG_USB_MON=y 327CONFIG_USB_MON=y
329CONFIG_USB_OHCI_HCD=y 328CONFIG_USB_OHCI_HCD=y
330CONFIG_USB_ACM=m 329CONFIG_USB_ACM=m
diff --git a/arch/arm/configs/s3c6400_defconfig b/arch/arm/configs/s3c6400_defconfig
index 3a186d653dac..e2f9fa5bb54b 100644
--- a/arch/arm/configs/s3c6400_defconfig
+++ b/arch/arm/configs/s3c6400_defconfig
@@ -56,7 +56,6 @@ CONFIG_SND_S3C24XX_SOC=m
56CONFIG_SND_SOC_SMDK_WM9713=m 56CONFIG_SND_SOC_SMDK_WM9713=m
57CONFIG_USB=y 57CONFIG_USB=y
58CONFIG_USB_ANNOUNCE_NEW_DEVICES=y 58CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
59CONFIG_USB_DEVICEFS=y
60CONFIG_USB_OHCI_HCD=y 59CONFIG_USB_OHCI_HCD=y
61CONFIG_USB_ACM=m 60CONFIG_USB_ACM=m
62CONFIG_USB_PRINTER=m 61CONFIG_USB_PRINTER=m
diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig
index dc3881e07630..4414990521d3 100644
--- a/arch/arm/configs/sama5_defconfig
+++ b/arch/arm/configs/sama5_defconfig
@@ -122,7 +122,6 @@ CONFIG_KEYBOARD_GPIO=y
122# CONFIG_INPUT_MOUSE is not set 122# CONFIG_INPUT_MOUSE is not set
123CONFIG_INPUT_TOUCHSCREEN=y 123CONFIG_INPUT_TOUCHSCREEN=y
124CONFIG_TOUCHSCREEN_ATMEL_MXT=y 124CONFIG_TOUCHSCREEN_ATMEL_MXT=y
125CONFIG_TOUCHSCREEN_ATMEL_TSADCC=y
126# CONFIG_SERIO is not set 125# CONFIG_SERIO is not set
127CONFIG_LEGACY_PTY_COUNT=4 126CONFIG_LEGACY_PTY_COUNT=4
128CONFIG_SERIAL_ATMEL=y 127CONFIG_SERIAL_ATMEL=y
@@ -138,6 +137,8 @@ CONFIG_SPI_GPIO=y
138CONFIG_GPIO_SYSFS=y 137CONFIG_GPIO_SYSFS=y
139# CONFIG_HWMON is not set 138# CONFIG_HWMON is not set
140CONFIG_SSB=m 139CONFIG_SSB=m
140CONFIG_REGULATOR=y
141CONFIG_REGULATOR_ACT8865=y
141CONFIG_FB=y 142CONFIG_FB=y
142CONFIG_BACKLIGHT_LCD_SUPPORT=y 143CONFIG_BACKLIGHT_LCD_SUPPORT=y
143# CONFIG_LCD_CLASS_DEVICE is not set 144# CONFIG_LCD_CLASS_DEVICE is not set
diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
index 83b07258a385..6d6437cbbc52 100644
--- a/arch/arm/configs/shmobile_defconfig
+++ b/arch/arm/configs/shmobile_defconfig
@@ -25,6 +25,7 @@ CONFIG_SCHED_MC=y
25CONFIG_HAVE_ARM_ARCH_TIMER=y 25CONFIG_HAVE_ARM_ARCH_TIMER=y
26CONFIG_NR_CPUS=8 26CONFIG_NR_CPUS=8
27CONFIG_AEABI=y 27CONFIG_AEABI=y
28CONFIG_HIGHMEM=y
28CONFIG_ZBOOT_ROM_TEXT=0x0 29CONFIG_ZBOOT_ROM_TEXT=0x0
29CONFIG_ZBOOT_ROM_BSS=0x0 30CONFIG_ZBOOT_ROM_BSS=0x0
30CONFIG_ARM_APPENDED_DTB=y 31CONFIG_ARM_APPENDED_DTB=y
@@ -43,6 +44,7 @@ CONFIG_DEVTMPFS=y
43CONFIG_DEVTMPFS_MOUNT=y 44CONFIG_DEVTMPFS_MOUNT=y
44CONFIG_MTD=y 45CONFIG_MTD=y
45CONFIG_MTD_M25P80=y 46CONFIG_MTD_M25P80=y
47CONFIG_EEPROM_AT24=y
46CONFIG_BLK_DEV_SD=y 48CONFIG_BLK_DEV_SD=y
47CONFIG_ATA=y 49CONFIG_ATA=y
48CONFIG_SATA_RCAR=y 50CONFIG_SATA_RCAR=y
@@ -75,9 +77,11 @@ CONFIG_SERIAL_SH_SCI=y
75CONFIG_SERIAL_SH_SCI_NR_UARTS=20 77CONFIG_SERIAL_SH_SCI_NR_UARTS=20
76CONFIG_SERIAL_SH_SCI_CONSOLE=y 78CONFIG_SERIAL_SH_SCI_CONSOLE=y
77CONFIG_I2C_GPIO=y 79CONFIG_I2C_GPIO=y
80CONFIG_I2C_SH_MOBILE=y
78CONFIG_I2C_RCAR=y 81CONFIG_I2C_RCAR=y
79CONFIG_SPI=y 82CONFIG_SPI=y
80CONFIG_SPI_RSPI=y 83CONFIG_SPI_RSPI=y
84CONFIG_SPI_SH_MSIOF=y
81CONFIG_GPIO_EM=y 85CONFIG_GPIO_EM=y
82CONFIG_GPIO_RCAR=y 86CONFIG_GPIO_RCAR=y
83# CONFIG_HWMON is not set 87# CONFIG_HWMON is not set
@@ -88,10 +92,14 @@ CONFIG_REGULATOR_FIXED_VOLTAGE=y
88CONFIG_REGULATOR_GPIO=y 92CONFIG_REGULATOR_GPIO=y
89CONFIG_MEDIA_SUPPORT=y 93CONFIG_MEDIA_SUPPORT=y
90CONFIG_MEDIA_CAMERA_SUPPORT=y 94CONFIG_MEDIA_CAMERA_SUPPORT=y
95CONFIG_MEDIA_CONTROLLER=y
96CONFIG_VIDEO_V4L2_SUBDEV_API=y
91CONFIG_V4L_PLATFORM_DRIVERS=y 97CONFIG_V4L_PLATFORM_DRIVERS=y
92CONFIG_SOC_CAMERA=y 98CONFIG_SOC_CAMERA=y
93CONFIG_SOC_CAMERA_PLATFORM=y 99CONFIG_SOC_CAMERA_PLATFORM=y
94CONFIG_VIDEO_RCAR_VIN=y 100CONFIG_VIDEO_RCAR_VIN=y
101CONFIG_V4L_MEM2MEM_DRIVERS=y
102CONFIG_VIDEO_RENESAS_VSP1=y
95# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set 103# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set
96CONFIG_VIDEO_ADV7180=y 104CONFIG_VIDEO_ADV7180=y
97CONFIG_DRM=y 105CONFIG_DRM=y
@@ -100,7 +108,13 @@ CONFIG_SOUND=y
100CONFIG_SND=y 108CONFIG_SND=y
101CONFIG_SND_SOC=y 109CONFIG_SND_SOC=y
102CONFIG_SND_SOC_RCAR=y 110CONFIG_SND_SOC_RCAR=y
111CONFIG_USB=y
103CONFIG_USB_RCAR_GEN2_PHY=y 112CONFIG_USB_RCAR_GEN2_PHY=y
113CONFIG_USB_EHCI_HCD=y
114CONFIG_USB_OHCI_HCD=y
115CONFIG_USB_RENESAS_USBHS=y
116CONFIG_USB_GADGET=y
117CONFIG_USB_RENESAS_USBHS_UDC=y
104CONFIG_MMC=y 118CONFIG_MMC=y
105CONFIG_MMC_SDHI=y 119CONFIG_MMC_SDHI=y
106CONFIG_MMC_SH_MMCIF=y 120CONFIG_MMC_SH_MMCIF=y
diff --git a/arch/arm/configs/spitz_defconfig b/arch/arm/configs/spitz_defconfig
index 2e0419d1b964..a1ede1966baf 100644
--- a/arch/arm/configs/spitz_defconfig
+++ b/arch/arm/configs/spitz_defconfig
@@ -166,7 +166,6 @@ CONFIG_HID_SAMSUNG=m
166CONFIG_HID_SONY=m 166CONFIG_HID_SONY=m
167CONFIG_HID_SUNPLUS=m 167CONFIG_HID_SUNPLUS=m
168CONFIG_USB=m 168CONFIG_USB=m
169CONFIG_USB_DEVICEFS=y
170CONFIG_USB_MON=m 169CONFIG_USB_MON=m
171CONFIG_USB_OHCI_HCD=m 170CONFIG_USB_OHCI_HCD=m
172CONFIG_USB_SL811_HCD=m 171CONFIG_USB_SL811_HCD=m
diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig
index b5df4a511b0a..7209bfd62074 100644
--- a/arch/arm/configs/sunxi_defconfig
+++ b/arch/arm/configs/sunxi_defconfig
@@ -1,13 +1,17 @@
1CONFIG_NO_HZ=y 1CONFIG_NO_HZ=y
2CONFIG_HIGH_RES_TIMERS=y 2CONFIG_HIGH_RES_TIMERS=y
3CONFIG_BLK_DEV_INITRD=y 3CONFIG_BLK_DEV_INITRD=y
4CONFIG_PERF_EVENTS=y
4CONFIG_ARCH_SUNXI=y 5CONFIG_ARCH_SUNXI=y
5CONFIG_SMP=y 6CONFIG_SMP=y
6CONFIG_AEABI=y 7CONFIG_AEABI=y
7CONFIG_HIGHMEM=y 8CONFIG_HIGHMEM=y
8CONFIG_HIGHPTE=y 9CONFIG_HIGHPTE=y
10CONFIG_ARM_APPENDED_DTB=y
11CONFIG_ARM_ATAG_DTB_COMPAT=y
9CONFIG_VFP=y 12CONFIG_VFP=y
10CONFIG_NEON=y 13CONFIG_NEON=y
14CONFIG_PM_RUNTIME=y
11CONFIG_NET=y 15CONFIG_NET=y
12CONFIG_PACKET=y 16CONFIG_PACKET=y
13CONFIG_UNIX=y 17CONFIG_UNIX=y
@@ -25,8 +29,12 @@ CONFIG_IP_PNP_BOOTP=y
25CONFIG_DEVTMPFS=y 29CONFIG_DEVTMPFS=y
26CONFIG_DEVTMPFS_MOUNT=y 30CONFIG_DEVTMPFS_MOUNT=y
27CONFIG_EEPROM_SUNXI_SID=y 31CONFIG_EEPROM_SUNXI_SID=y
32CONFIG_BLK_DEV_SD=y
33CONFIG_ATA=y
34CONFIG_AHCI_SUNXI=y
28CONFIG_NETDEVICES=y 35CONFIG_NETDEVICES=y
29CONFIG_SUN4I_EMAC=y 36CONFIG_SUN4I_EMAC=y
37# CONFIG_NET_VENDOR_ARC is not set
30# CONFIG_NET_CADENCE is not set 38# CONFIG_NET_CADENCE is not set
31# CONFIG_NET_VENDOR_BROADCOM is not set 39# CONFIG_NET_VENDOR_BROADCOM is not set
32# CONFIG_NET_VENDOR_CIRRUS is not set 40# CONFIG_NET_VENDOR_CIRRUS is not set
@@ -34,38 +42,66 @@ CONFIG_SUN4I_EMAC=y
34# CONFIG_NET_VENDOR_INTEL is not set 42# CONFIG_NET_VENDOR_INTEL is not set
35# CONFIG_NET_VENDOR_MARVELL is not set 43# CONFIG_NET_VENDOR_MARVELL is not set
36# CONFIG_NET_VENDOR_MICREL is not set 44# CONFIG_NET_VENDOR_MICREL is not set
45# CONFIG_NET_VENDOR_MICROCHIP is not set
37# CONFIG_NET_VENDOR_NATSEMI is not set 46# CONFIG_NET_VENDOR_NATSEMI is not set
47# CONFIG_NET_VENDOR_SAMSUNG is not set
38# CONFIG_NET_VENDOR_SEEQ is not set 48# CONFIG_NET_VENDOR_SEEQ is not set
39# CONFIG_NET_VENDOR_SMSC is not set 49# CONFIG_NET_VENDOR_SMSC is not set
40# CONFIG_NET_VENDOR_STMICRO is not set 50CONFIG_STMMAC_ETH=y
51# CONFIG_NET_VENDOR_VIA is not set
41# CONFIG_NET_VENDOR_WIZNET is not set 52# CONFIG_NET_VENDOR_WIZNET is not set
42# CONFIG_WLAN is not set 53# CONFIG_WLAN is not set
54# CONFIG_INPUT_MOUSEDEV is not set
55# CONFIG_INPUT_KEYBOARD is not set
56# CONFIG_INPUT_MOUSE is not set
43CONFIG_SERIAL_8250=y 57CONFIG_SERIAL_8250=y
44CONFIG_SERIAL_8250_CONSOLE=y 58CONFIG_SERIAL_8250_CONSOLE=y
45CONFIG_SERIAL_8250_NR_UARTS=8 59CONFIG_SERIAL_8250_NR_UARTS=8
46CONFIG_SERIAL_8250_RUNTIME_UARTS=8 60CONFIG_SERIAL_8250_RUNTIME_UARTS=8
47CONFIG_SERIAL_8250_DW=y 61CONFIG_SERIAL_8250_DW=y
62CONFIG_SERIAL_OF_PLATFORM=y
63# CONFIG_HW_RANDOM is not set
48CONFIG_I2C=y 64CONFIG_I2C=y
49# CONFIG_I2C_COMPAT is not set
50CONFIG_I2C_CHARDEV=y 65CONFIG_I2C_CHARDEV=y
51CONFIG_I2C_MV64XXX=y 66CONFIG_I2C_MV64XXX=y
52CONFIG_SPI=y 67CONFIG_SPI=y
68CONFIG_SPI_SUN4I=y
53CONFIG_SPI_SUN6I=y 69CONFIG_SPI_SUN6I=y
54CONFIG_GPIO_SYSFS=y 70CONFIG_GPIO_SYSFS=y
71CONFIG_POWER_SUPPLY=y
72CONFIG_POWER_RESET=y
73CONFIG_POWER_RESET_SUN6I=y
55# CONFIG_HWMON is not set 74# CONFIG_HWMON is not set
56CONFIG_WATCHDOG=y 75CONFIG_WATCHDOG=y
57CONFIG_SUNXI_WATCHDOG=y 76CONFIG_SUNXI_WATCHDOG=y
58# CONFIG_USB_SUPPORT is not set 77CONFIG_MFD_AXP20X=y
78CONFIG_REGULATOR_VIRTUAL_CONSUMER=y
79CONFIG_REGULATOR_GPIO=y
80CONFIG_USB=y
81CONFIG_USB_EHCI_HCD=y
82CONFIG_USB_EHCI_HCD_PLATFORM=y
83CONFIG_USB_OHCI_HCD=y
84CONFIG_USB_OHCI_HCD_PLATFORM=y
85CONFIG_MMC=y
86CONFIG_MMC_SUNXI=y
59CONFIG_NEW_LEDS=y 87CONFIG_NEW_LEDS=y
60CONFIG_LEDS_CLASS=y 88CONFIG_LEDS_CLASS=y
61CONFIG_LEDS_GPIO=y 89CONFIG_LEDS_GPIO=y
62CONFIG_LEDS_TRIGGERS=y 90CONFIG_LEDS_TRIGGERS=y
63CONFIG_LEDS_TRIGGER_HEARTBEAT=y 91CONFIG_LEDS_TRIGGER_HEARTBEAT=y
64CONFIG_LEDS_TRIGGER_DEFAULT_ON=y 92CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
65CONFIG_COMMON_CLK_DEBUG=y 93CONFIG_RTC_CLASS=y
94# CONFIG_RTC_INTF_SYSFS is not set
95# CONFIG_RTC_INTF_PROC is not set
96CONFIG_RTC_DRV_SUNXI=y
66# CONFIG_IOMMU_SUPPORT is not set 97# CONFIG_IOMMU_SUPPORT is not set
98CONFIG_PHY_SUN4I_USB=y
99CONFIG_EXT4_FS=y
100CONFIG_VFAT_FS=y
67CONFIG_TMPFS=y 101CONFIG_TMPFS=y
68CONFIG_NFS_FS=y 102CONFIG_NFS_FS=y
103CONFIG_NFS_V3_ACL=y
104CONFIG_NFS_V4=y
69CONFIG_ROOT_NFS=y 105CONFIG_ROOT_NFS=y
70CONFIG_NLS=y
71CONFIG_PRINTK_TIME=y 106CONFIG_PRINTK_TIME=y
107CONFIG_DEBUG_FS=y
diff --git a/arch/arm/configs/tct_hammer_defconfig b/arch/arm/configs/tct_hammer_defconfig
index 71277a1591ba..7209a2caefcf 100644
--- a/arch/arm/configs/tct_hammer_defconfig
+++ b/arch/arm/configs/tct_hammer_defconfig
@@ -47,7 +47,6 @@ CONFIG_BLK_DEV_RAM_SIZE=10240
47# CONFIG_VGA_CONSOLE is not set 47# CONFIG_VGA_CONSOLE is not set
48# CONFIG_HID_SUPPORT is not set 48# CONFIG_HID_SUPPORT is not set
49CONFIG_USB=y 49CONFIG_USB=y
50CONFIG_USB_DEBUG=y
51# CONFIG_USB_DEVICE_CLASS is not set 50# CONFIG_USB_DEVICE_CLASS is not set
52CONFIG_USB_MON=y 51CONFIG_USB_MON=y
53CONFIG_USB_OHCI_HCD=y 52CONFIG_USB_OHCI_HCD=y
diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig
index 2926281368ab..fb25e2982f64 100644
--- a/arch/arm/configs/tegra_defconfig
+++ b/arch/arm/configs/tegra_defconfig
@@ -73,6 +73,11 @@ CONFIG_INET6_IPCOMP=y
73CONFIG_IPV6_MIP6=y 73CONFIG_IPV6_MIP6=y
74CONFIG_IPV6_TUNNEL=y 74CONFIG_IPV6_TUNNEL=y
75CONFIG_IPV6_MULTIPLE_TABLES=y 75CONFIG_IPV6_MULTIPLE_TABLES=y
76CONFIG_CAN=y
77CONFIG_CAN_RAW=y
78CONFIG_CAN_BCM=y
79CONFIG_CAN_DEV=y
80CONFIG_CAN_MCP251X=y
76CONFIG_BT=y 81CONFIG_BT=y
77CONFIG_BT_RFCOMM=y 82CONFIG_BT_RFCOMM=y
78CONFIG_BT_BNEP=y 83CONFIG_BT_BNEP=y
@@ -90,6 +95,7 @@ CONFIG_DMA_CMA=y
90CONFIG_CMA_SIZE_MBYTES=64 95CONFIG_CMA_SIZE_MBYTES=64
91CONFIG_MTD=y 96CONFIG_MTD=y
92CONFIG_MTD_M25P80=y 97CONFIG_MTD_M25P80=y
98CONFIG_MTD_SPI_NOR=y
93CONFIG_PROC_DEVICETREE=y 99CONFIG_PROC_DEVICETREE=y
94CONFIG_BLK_DEV_LOOP=y 100CONFIG_BLK_DEV_LOOP=y
95CONFIG_AD525X_DPOT=y 101CONFIG_AD525X_DPOT=y
@@ -97,6 +103,7 @@ CONFIG_AD525X_DPOT_I2C=y
97CONFIG_ICS932S401=y 103CONFIG_ICS932S401=y
98CONFIG_APDS9802ALS=y 104CONFIG_APDS9802ALS=y
99CONFIG_ISL29003=y 105CONFIG_ISL29003=y
106CONFIG_EEPROM_AT24=y
100CONFIG_SCSI=y 107CONFIG_SCSI=y
101CONFIG_BLK_DEV_SD=y 108CONFIG_BLK_DEV_SD=y
102CONFIG_BLK_DEV_SR=y 109CONFIG_BLK_DEV_SR=y
@@ -112,6 +119,7 @@ CONFIG_USB_NET_SMSC95XX=y
112CONFIG_BRCMFMAC=m 119CONFIG_BRCMFMAC=m
113CONFIG_RT2X00=y 120CONFIG_RT2X00=y
114CONFIG_RT2800USB=m 121CONFIG_RT2800USB=m
122CONFIG_INPUT_JOYDEV=y
115CONFIG_INPUT_EVDEV=y 123CONFIG_INPUT_EVDEV=y
116CONFIG_KEYBOARD_GPIO=y 124CONFIG_KEYBOARD_GPIO=y
117CONFIG_KEYBOARD_TEGRA=y 125CONFIG_KEYBOARD_TEGRA=y
@@ -181,6 +189,7 @@ CONFIG_BACKLIGHT_CLASS_DEVICE=y
181# CONFIG_BACKLIGHT_GENERIC is not set 189# CONFIG_BACKLIGHT_GENERIC is not set
182CONFIG_BACKLIGHT_PWM=y 190CONFIG_BACKLIGHT_PWM=y
183CONFIG_FRAMEBUFFER_CONSOLE=y 191CONFIG_FRAMEBUFFER_CONSOLE=y
192CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
184CONFIG_LOGO=y 193CONFIG_LOGO=y
185CONFIG_SOUND=y 194CONFIG_SOUND=y
186CONFIG_SND=y 195CONFIG_SND=y
@@ -222,6 +231,7 @@ CONFIG_LEDS_TRIGGER_TRANSIENT=y
222CONFIG_LEDS_TRIGGER_CAMERA=y 231CONFIG_LEDS_TRIGGER_CAMERA=y
223CONFIG_RTC_CLASS=y 232CONFIG_RTC_CLASS=y
224CONFIG_RTC_DRV_AS3722=y 233CONFIG_RTC_DRV_AS3722=y
234CONFIG_RTC_DRV_DS1307=y
225CONFIG_RTC_DRV_MAX8907=y 235CONFIG_RTC_DRV_MAX8907=y
226CONFIG_RTC_DRV_PALMAS=y 236CONFIG_RTC_DRV_PALMAS=y
227CONFIG_RTC_DRV_TPS6586X=y 237CONFIG_RTC_DRV_TPS6586X=y
diff --git a/arch/arm/configs/trizeps4_defconfig b/arch/arm/configs/trizeps4_defconfig
index 3162173fa75a..932ee4e4a13a 100644
--- a/arch/arm/configs/trizeps4_defconfig
+++ b/arch/arm/configs/trizeps4_defconfig
@@ -165,7 +165,6 @@ CONFIG_SND_PXA2XX_AC97=y
165CONFIG_SND_USB_AUDIO=m 165CONFIG_SND_USB_AUDIO=m
166# CONFIG_USB_HID is not set 166# CONFIG_USB_HID is not set
167CONFIG_USB=y 167CONFIG_USB=y
168CONFIG_USB_DEVICEFS=y
169# CONFIG_USB_DEVICE_CLASS is not set 168# CONFIG_USB_DEVICE_CLASS is not set
170CONFIG_USB_OHCI_HCD=y 169CONFIG_USB_OHCI_HCD=y
171CONFIG_USB_STORAGE=m 170CONFIG_USB_STORAGE=m
diff --git a/arch/arm/configs/versatile_defconfig b/arch/arm/configs/versatile_defconfig
index 073541a50e23..d52b4ffe2012 100644
--- a/arch/arm/configs/versatile_defconfig
+++ b/arch/arm/configs/versatile_defconfig
@@ -61,6 +61,9 @@ CONFIG_SND_ARMAACI=m
61CONFIG_MMC=y 61CONFIG_MMC=y
62CONFIG_MMC_ARMMMCI=m 62CONFIG_MMC_ARMMMCI=m
63CONFIG_NEW_LEDS=y 63CONFIG_NEW_LEDS=y
64CONFIG_LEDS_CLASS=y
65CONFIG_LEDS_VERSATILE=y
66CONFIG_LEDS_TRIGGERS=y
64CONFIG_LEDS_TRIGGER_HEARTBEAT=y 67CONFIG_LEDS_TRIGGER_HEARTBEAT=y
65CONFIG_LEDS_TRIGGER_CPU=y 68CONFIG_LEDS_TRIGGER_CPU=y
66CONFIG_EXT2_FS=y 69CONFIG_EXT2_FS=y
diff --git a/arch/arm/configs/viper_defconfig b/arch/arm/configs/viper_defconfig
index d36e0d3c86ec..0d717a5eff29 100644
--- a/arch/arm/configs/viper_defconfig
+++ b/arch/arm/configs/viper_defconfig
@@ -127,7 +127,6 @@ CONFIG_SND_MIXER_OSS=m
127CONFIG_SND_PCM_OSS=m 127CONFIG_SND_PCM_OSS=m
128CONFIG_SND_PXA2XX_AC97=m 128CONFIG_SND_PXA2XX_AC97=m
129CONFIG_USB=m 129CONFIG_USB=m
130CONFIG_USB_DEVICEFS=y
131CONFIG_USB_ISP116X_HCD=m 130CONFIG_USB_ISP116X_HCD=m
132CONFIG_USB_SL811_HCD=m 131CONFIG_USB_SL811_HCD=m
133CONFIG_USB_R8A66597_HCD=m 132CONFIG_USB_R8A66597_HCD=m
diff --git a/arch/arm/configs/zeus_defconfig b/arch/arm/configs/zeus_defconfig
index 731d4f985310..cd11da8b5123 100644
--- a/arch/arm/configs/zeus_defconfig
+++ b/arch/arm/configs/zeus_defconfig
@@ -132,7 +132,6 @@ CONFIG_SND_SOC=m
132CONFIG_SND_PXA2XX_SOC=m 132CONFIG_SND_PXA2XX_SOC=m
133# CONFIG_HID_SUPPORT is not set 133# CONFIG_HID_SUPPORT is not set
134CONFIG_USB=m 134CONFIG_USB=m
135CONFIG_USB_DEVICEFS=y
136CONFIG_USB_OHCI_HCD=m 135CONFIG_USB_OHCI_HCD=m
137CONFIG_USB_ACM=m 136CONFIG_USB_ACM=m
138CONFIG_USB_STORAGE=m 137CONFIG_USB_STORAGE=m
diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild
index 23e728ecf8ab..f5a357601983 100644
--- a/arch/arm/include/asm/Kbuild
+++ b/arch/arm/include/asm/Kbuild
@@ -21,6 +21,7 @@ generic-y += parport.h
21generic-y += poll.h 21generic-y += poll.h
22generic-y += preempt.h 22generic-y += preempt.h
23generic-y += resource.h 23generic-y += resource.h
24generic-y += rwsem.h
24generic-y += sections.h 25generic-y += sections.h
25generic-y += segment.h 26generic-y += segment.h
26generic-y += sembuf.h 27generic-y += sembuf.h
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
index b974184f9941..57f0584e8d97 100644
--- a/arch/arm/include/asm/assembler.h
+++ b/arch/arm/include/asm/assembler.h
@@ -312,7 +312,7 @@
312 * you cannot return to the original mode. 312 * you cannot return to the original mode.
313 */ 313 */
314.macro safe_svcmode_maskall reg:req 314.macro safe_svcmode_maskall reg:req
315#if __LINUX_ARM_ARCH__ >= 6 315#if __LINUX_ARM_ARCH__ >= 6 && !defined(CONFIG_CPU_V7M)
316 mrs \reg , cpsr 316 mrs \reg , cpsr
317 eor \reg, \reg, #HYP_MODE 317 eor \reg, \reg, #HYP_MODE
318 tst \reg, #MODE_MASK 318 tst \reg, #MODE_MASK
diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
index 9a92fd7864a8..3040359094d9 100644
--- a/arch/arm/include/asm/atomic.h
+++ b/arch/arm/include/asm/atomic.h
@@ -241,11 +241,6 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
241 241
242#define atomic_add_negative(i,v) (atomic_add_return(i, v) < 0) 242#define atomic_add_negative(i,v) (atomic_add_return(i, v) < 0)
243 243
244#define smp_mb__before_atomic_dec() smp_mb()
245#define smp_mb__after_atomic_dec() smp_mb()
246#define smp_mb__before_atomic_inc() smp_mb()
247#define smp_mb__after_atomic_inc() smp_mb()
248
249#ifndef CONFIG_GENERIC_ATOMIC64 244#ifndef CONFIG_GENERIC_ATOMIC64
250typedef struct { 245typedef struct {
251 long long counter; 246 long long counter;
diff --git a/arch/arm/include/asm/barrier.h b/arch/arm/include/asm/barrier.h
index 2f59f7443396..c6a3e73a6e24 100644
--- a/arch/arm/include/asm/barrier.h
+++ b/arch/arm/include/asm/barrier.h
@@ -79,5 +79,8 @@ do { \
79 79
80#define set_mb(var, value) do { var = value; smp_mb(); } while (0) 80#define set_mb(var, value) do { var = value; smp_mb(); } while (0)
81 81
82#define smp_mb__before_atomic() smp_mb()
83#define smp_mb__after_atomic() smp_mb()
84
82#endif /* !__ASSEMBLY__ */ 85#endif /* !__ASSEMBLY__ */
83#endif /* __ASM_BARRIER_H */ 86#endif /* __ASM_BARRIER_H */
diff --git a/arch/arm/include/asm/bitops.h b/arch/arm/include/asm/bitops.h
index b2e298a90d76..56380995f4c3 100644
--- a/arch/arm/include/asm/bitops.h
+++ b/arch/arm/include/asm/bitops.h
@@ -25,9 +25,7 @@
25 25
26#include <linux/compiler.h> 26#include <linux/compiler.h>
27#include <linux/irqflags.h> 27#include <linux/irqflags.h>
28 28#include <asm/barrier.h>
29#define smp_mb__before_clear_bit() smp_mb()
30#define smp_mb__after_clear_bit() smp_mb()
31 29
32/* 30/*
33 * These functions are the basis of our bit ops. 31 * These functions are the basis of our bit ops.
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h
index 8b8b61685a34..fd43f7f55b70 100644
--- a/arch/arm/include/asm/cacheflush.h
+++ b/arch/arm/include/asm/cacheflush.h
@@ -212,7 +212,7 @@ extern void copy_to_user_page(struct vm_area_struct *, struct page *,
212static inline void __flush_icache_all(void) 212static inline void __flush_icache_all(void)
213{ 213{
214 __flush_icache_preferred(); 214 __flush_icache_preferred();
215 dsb(); 215 dsb(ishst);
216} 216}
217 217
218/* 218/*
@@ -487,4 +487,6 @@ int set_memory_rw(unsigned long addr, int numpages);
487int set_memory_x(unsigned long addr, int numpages); 487int set_memory_x(unsigned long addr, int numpages);
488int set_memory_nx(unsigned long addr, int numpages); 488int set_memory_nx(unsigned long addr, int numpages);
489 489
490void flush_uprobe_xol_access(struct page *page, unsigned long uaddr,
491 void *kaddr, unsigned long len);
490#endif 492#endif
diff --git a/arch/arm/include/asm/cp15.h b/arch/arm/include/asm/cp15.h
index 6493802f880a..c3f11524f10c 100644
--- a/arch/arm/include/asm/cp15.h
+++ b/arch/arm/include/asm/cp15.h
@@ -42,24 +42,23 @@
42#ifndef __ASSEMBLY__ 42#ifndef __ASSEMBLY__
43 43
44#if __LINUX_ARM_ARCH__ >= 4 44#if __LINUX_ARM_ARCH__ >= 4
45#define vectors_high() (cr_alignment & CR_V) 45#define vectors_high() (get_cr() & CR_V)
46#else 46#else
47#define vectors_high() (0) 47#define vectors_high() (0)
48#endif 48#endif
49 49
50#ifdef CONFIG_CPU_CP15 50#ifdef CONFIG_CPU_CP15
51 51
52extern unsigned long cr_no_alignment; /* defined in entry-armv.S */
53extern unsigned long cr_alignment; /* defined in entry-armv.S */ 52extern unsigned long cr_alignment; /* defined in entry-armv.S */
54 53
55static inline unsigned int get_cr(void) 54static inline unsigned long get_cr(void)
56{ 55{
57 unsigned int val; 56 unsigned long val;
58 asm("mrc p15, 0, %0, c1, c0, 0 @ get CR" : "=r" (val) : : "cc"); 57 asm("mrc p15, 0, %0, c1, c0, 0 @ get CR" : "=r" (val) : : "cc");
59 return val; 58 return val;
60} 59}
61 60
62static inline void set_cr(unsigned int val) 61static inline void set_cr(unsigned long val)
63{ 62{
64 asm volatile("mcr p15, 0, %0, c1, c0, 0 @ set CR" 63 asm volatile("mcr p15, 0, %0, c1, c0, 0 @ set CR"
65 : : "r" (val) : "cc"); 64 : : "r" (val) : "cc");
@@ -80,10 +79,6 @@ static inline void set_auxcr(unsigned int val)
80 isb(); 79 isb();
81} 80}
82 81
83#ifndef CONFIG_SMP
84extern void adjust_cr(unsigned long mask, unsigned long set);
85#endif
86
87#define CPACC_FULL(n) (3 << (n * 2)) 82#define CPACC_FULL(n) (3 << (n * 2))
88#define CPACC_SVC(n) (1 << (n * 2)) 83#define CPACC_SVC(n) (1 << (n * 2))
89#define CPACC_DISABLE(n) (0 << (n * 2)) 84#define CPACC_DISABLE(n) (0 << (n * 2))
@@ -106,13 +101,17 @@ static inline void set_copro_access(unsigned int val)
106#else /* ifdef CONFIG_CPU_CP15 */ 101#else /* ifdef CONFIG_CPU_CP15 */
107 102
108/* 103/*
109 * cr_alignment and cr_no_alignment are tightly coupled to cp15 (at least in the 104 * cr_alignment is tightly coupled to cp15 (at least in the minds of the
110 * minds of the developers). Yielding 0 for machines without a cp15 (and making 105 * developers). Yielding 0 for machines without a cp15 (and making it
111 * it read-only) is fine for most cases and saves quite some #ifdeffery. 106 * read-only) is fine for most cases and saves quite some #ifdeffery.
112 */ 107 */
113#define cr_no_alignment UL(0)
114#define cr_alignment UL(0) 108#define cr_alignment UL(0)
115 109
110static inline unsigned long get_cr(void)
111{
112 return 0;
113}
114
116#endif /* ifdef CONFIG_CPU_CP15 / else */ 115#endif /* ifdef CONFIG_CPU_CP15 / else */
117 116
118#endif /* ifndef __ASSEMBLY__ */ 117#endif /* ifndef __ASSEMBLY__ */
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
index 4764344367d4..8c2b7321a478 100644
--- a/arch/arm/include/asm/cputype.h
+++ b/arch/arm/include/asm/cputype.h
@@ -72,6 +72,7 @@
72#define ARM_CPU_PART_CORTEX_A15 0xC0F0 72#define ARM_CPU_PART_CORTEX_A15 0xC0F0
73#define ARM_CPU_PART_CORTEX_A7 0xC070 73#define ARM_CPU_PART_CORTEX_A7 0xC070
74#define ARM_CPU_PART_CORTEX_A12 0xC0D0 74#define ARM_CPU_PART_CORTEX_A12 0xC0D0
75#define ARM_CPU_PART_CORTEX_A17 0xC0E0
75 76
76#define ARM_CPU_XSCALE_ARCH_MASK 0xe000 77#define ARM_CPU_XSCALE_ARCH_MASK 0xe000
77#define ARM_CPU_XSCALE_ARCH_V1 0x2000 78#define ARM_CPU_XSCALE_ARCH_V1 0x2000
diff --git a/arch/arm/include/asm/dcc.h b/arch/arm/include/asm/dcc.h
new file mode 100644
index 000000000000..b74899de0774
--- /dev/null
+++ b/arch/arm/include/asm/dcc.h
@@ -0,0 +1,41 @@
1/* Copyright (c) 2010, 2014 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
13#include <asm/barrier.h>
14
15static inline u32 __dcc_getstatus(void)
16{
17 u32 __ret;
18 asm volatile("mrc p14, 0, %0, c0, c1, 0 @ read comms ctrl reg"
19 : "=r" (__ret) : : "cc");
20
21 return __ret;
22}
23
24static inline char __dcc_getchar(void)
25{
26 char __c;
27
28 asm volatile("mrc p14, 0, %0, c0, c5, 0 @ read comms data reg"
29 : "=r" (__c));
30 isb();
31
32 return __c;
33}
34
35static inline void __dcc_putchar(char c)
36{
37 asm volatile("mcr p14, 0, %0, c0, c5, 0 @ write a char"
38 : /* no output register */
39 : "r" (c));
40 isb();
41}
diff --git a/arch/arm/include/asm/dma-iommu.h b/arch/arm/include/asm/dma-iommu.h
index eec0a12c5c1d..8e3fcb924db6 100644
--- a/arch/arm/include/asm/dma-iommu.h
+++ b/arch/arm/include/asm/dma-iommu.h
@@ -18,7 +18,6 @@ struct dma_iommu_mapping {
18 unsigned int extensions; 18 unsigned int extensions;
19 size_t bitmap_size; /* size of a single bitmap */ 19 size_t bitmap_size; /* size of a single bitmap */
20 size_t bits; /* per bitmap */ 20 size_t bits; /* per bitmap */
21 unsigned int size; /* per bitmap */
22 dma_addr_t base; 21 dma_addr_t base;
23 22
24 spinlock_t lock; 23 spinlock_t lock;
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index e701a4d9aa59..c45b61a4b4a5 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -58,21 +58,37 @@ static inline int dma_set_mask(struct device *dev, u64 mask)
58#ifndef __arch_pfn_to_dma 58#ifndef __arch_pfn_to_dma
59static inline dma_addr_t pfn_to_dma(struct device *dev, unsigned long pfn) 59static inline dma_addr_t pfn_to_dma(struct device *dev, unsigned long pfn)
60{ 60{
61 if (dev)
62 pfn -= dev->dma_pfn_offset;
61 return (dma_addr_t)__pfn_to_bus(pfn); 63 return (dma_addr_t)__pfn_to_bus(pfn);
62} 64}
63 65
64static inline unsigned long dma_to_pfn(struct device *dev, dma_addr_t addr) 66static inline unsigned long dma_to_pfn(struct device *dev, dma_addr_t addr)
65{ 67{
66 return __bus_to_pfn(addr); 68 unsigned long pfn = __bus_to_pfn(addr);
69
70 if (dev)
71 pfn += dev->dma_pfn_offset;
72
73 return pfn;
67} 74}
68 75
69static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) 76static inline void *dma_to_virt(struct device *dev, dma_addr_t addr)
70{ 77{
78 if (dev) {
79 unsigned long pfn = dma_to_pfn(dev, addr);
80
81 return phys_to_virt(__pfn_to_phys(pfn));
82 }
83
71 return (void *)__bus_to_virt((unsigned long)addr); 84 return (void *)__bus_to_virt((unsigned long)addr);
72} 85}
73 86
74static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) 87static inline dma_addr_t virt_to_dma(struct device *dev, void *addr)
75{ 88{
89 if (dev)
90 return pfn_to_dma(dev, virt_to_pfn(addr));
91
76 return (dma_addr_t)__virt_to_bus((unsigned long)(addr)); 92 return (dma_addr_t)__virt_to_bus((unsigned long)(addr));
77} 93}
78 94
@@ -105,6 +121,13 @@ static inline unsigned long dma_max_pfn(struct device *dev)
105} 121}
106#define dma_max_pfn(dev) dma_max_pfn(dev) 122#define dma_max_pfn(dev) dma_max_pfn(dev)
107 123
124static inline int set_arch_dma_coherent_ops(struct device *dev)
125{
126 set_dma_ops(dev, &arm_coherent_dma_ops);
127 return 0;
128}
129#define set_arch_dma_coherent_ops(dev) set_arch_dma_coherent_ops(dev)
130
108static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) 131static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
109{ 132{
110 unsigned int offset = paddr & ~PAGE_MASK; 133 unsigned int offset = paddr & ~PAGE_MASK;
diff --git a/arch/arm/include/asm/fixmap.h b/arch/arm/include/asm/fixmap.h
index bbae919bceb4..74124b0d0d79 100644
--- a/arch/arm/include/asm/fixmap.h
+++ b/arch/arm/include/asm/fixmap.h
@@ -1,24 +1,11 @@
1#ifndef _ASM_FIXMAP_H 1#ifndef _ASM_FIXMAP_H
2#define _ASM_FIXMAP_H 2#define _ASM_FIXMAP_H
3 3
4/* 4#define FIXADDR_START 0xffc00000UL
5 * Nothing too fancy for now. 5#define FIXADDR_TOP 0xffe00000UL
6 *
7 * On ARM we already have well known fixed virtual addresses imposed by
8 * the architecture such as the vector page which is located at 0xffff0000,
9 * therefore a second level page table is already allocated covering
10 * 0xfff00000 upwards.
11 *
12 * The cache flushing code in proc-xscale.S uses the virtual area between
13 * 0xfffe0000 and 0xfffeffff.
14 */
15
16#define FIXADDR_START 0xfff00000UL
17#define FIXADDR_TOP 0xfffe0000UL
18#define FIXADDR_SIZE (FIXADDR_TOP - FIXADDR_START) 6#define FIXADDR_SIZE (FIXADDR_TOP - FIXADDR_START)
19 7
20#define FIX_KMAP_BEGIN 0 8#define FIX_KMAP_NR_PTES (FIXADDR_SIZE >> PAGE_SHIFT)
21#define FIX_KMAP_END (FIXADDR_SIZE >> PAGE_SHIFT)
22 9
23#define __fix_to_virt(x) (FIXADDR_START + ((x) << PAGE_SHIFT)) 10#define __fix_to_virt(x) (FIXADDR_START + ((x) << PAGE_SHIFT))
24#define __virt_to_fix(x) (((x) - FIXADDR_START) >> PAGE_SHIFT) 11#define __virt_to_fix(x) (((x) - FIXADDR_START) >> PAGE_SHIFT)
@@ -27,7 +14,7 @@ extern void __this_fixmap_does_not_exist(void);
27 14
28static inline unsigned long fix_to_virt(const unsigned int idx) 15static inline unsigned long fix_to_virt(const unsigned int idx)
29{ 16{
30 if (idx >= FIX_KMAP_END) 17 if (idx >= FIX_KMAP_NR_PTES)
31 __this_fixmap_does_not_exist(); 18 __this_fixmap_does_not_exist();
32 return __fix_to_virt(idx); 19 return __fix_to_virt(idx);
33} 20}
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
index f89515adac60..eb577f4f5f70 100644
--- a/arch/arm/include/asm/ftrace.h
+++ b/arch/arm/include/asm/ftrace.h
@@ -52,15 +52,7 @@ extern inline void *return_address(unsigned int level)
52 52
53#endif 53#endif
54 54
55#define HAVE_ARCH_CALLER_ADDR 55#define ftrace_return_addr(n) return_address(n)
56
57#define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
58#define CALLER_ADDR1 ((unsigned long)return_address(1))
59#define CALLER_ADDR2 ((unsigned long)return_address(2))
60#define CALLER_ADDR3 ((unsigned long)return_address(3))
61#define CALLER_ADDR4 ((unsigned long)return_address(4))
62#define CALLER_ADDR5 ((unsigned long)return_address(5))
63#define CALLER_ADDR6 ((unsigned long)return_address(6))
64 56
65#endif /* ifndef __ASSEMBLY__ */ 57#endif /* ifndef __ASSEMBLY__ */
66 58
diff --git a/arch/arm/include/asm/glue-cache.h b/arch/arm/include/asm/glue-cache.h
index c81adc08b3fb..a3c24cd5b7c8 100644
--- a/arch/arm/include/asm/glue-cache.h
+++ b/arch/arm/include/asm/glue-cache.h
@@ -130,22 +130,22 @@
130#endif 130#endif
131 131
132#ifndef __ASSEMBLER__ 132#ifndef __ASSEMBLER__
133extern inline void nop_flush_icache_all(void) { } 133static inline void nop_flush_icache_all(void) { }
134extern inline void nop_flush_kern_cache_all(void) { } 134static inline void nop_flush_kern_cache_all(void) { }
135extern inline void nop_flush_kern_cache_louis(void) { } 135static inline void nop_flush_kern_cache_louis(void) { }
136extern inline void nop_flush_user_cache_all(void) { } 136static inline void nop_flush_user_cache_all(void) { }
137extern inline void nop_flush_user_cache_range(unsigned long a, 137static inline void nop_flush_user_cache_range(unsigned long a,
138 unsigned long b, unsigned int c) { } 138 unsigned long b, unsigned int c) { }
139 139
140extern inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { } 140static inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { }
141extern inline int nop_coherent_user_range(unsigned long a, 141static inline int nop_coherent_user_range(unsigned long a,
142 unsigned long b) { return 0; } 142 unsigned long b) { return 0; }
143extern inline void nop_flush_kern_dcache_area(void *a, size_t s) { } 143static inline void nop_flush_kern_dcache_area(void *a, size_t s) { }
144 144
145extern inline void nop_dma_flush_range(const void *a, const void *b) { } 145static inline void nop_dma_flush_range(const void *a, const void *b) { }
146 146
147extern inline void nop_dma_map_area(const void *s, size_t l, int f) { } 147static inline void nop_dma_map_area(const void *s, size_t l, int f) { }
148extern inline void nop_dma_unmap_area(const void *s, size_t l, int f) { } 148static inline void nop_dma_unmap_area(const void *s, size_t l, int f) { }
149#endif 149#endif
150 150
151#ifndef MULTI_CACHE 151#ifndef MULTI_CACHE
diff --git a/arch/arm/include/asm/glue-df.h b/arch/arm/include/asm/glue-df.h
index 6b70f1b46a6e..04e18b656659 100644
--- a/arch/arm/include/asm/glue-df.h
+++ b/arch/arm/include/asm/glue-df.h
@@ -31,14 +31,6 @@
31#undef CPU_DABORT_HANDLER 31#undef CPU_DABORT_HANDLER
32#undef MULTI_DABORT 32#undef MULTI_DABORT
33 33
34#if defined(CONFIG_CPU_ARM710)
35# ifdef CPU_DABORT_HANDLER
36# define MULTI_DABORT 1
37# else
38# define CPU_DABORT_HANDLER cpu_arm7_data_abort
39# endif
40#endif
41
42#ifdef CONFIG_CPU_ABRT_EV4 34#ifdef CONFIG_CPU_ABRT_EV4
43# ifdef CPU_DABORT_HANDLER 35# ifdef CPU_DABORT_HANDLER
44# define MULTI_DABORT 1 36# define MULTI_DABORT 1
diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h
index 6795ff743b3d..3a5ec1c25659 100644
--- a/arch/arm/include/asm/hardware/cache-l2x0.h
+++ b/arch/arm/include/asm/hardware/cache-l2x0.h
@@ -26,8 +26,8 @@
26#define L2X0_CACHE_TYPE 0x004 26#define L2X0_CACHE_TYPE 0x004
27#define L2X0_CTRL 0x100 27#define L2X0_CTRL 0x100
28#define L2X0_AUX_CTRL 0x104 28#define L2X0_AUX_CTRL 0x104
29#define L2X0_TAG_LATENCY_CTRL 0x108 29#define L310_TAG_LATENCY_CTRL 0x108
30#define L2X0_DATA_LATENCY_CTRL 0x10C 30#define L310_DATA_LATENCY_CTRL 0x10C
31#define L2X0_EVENT_CNT_CTRL 0x200 31#define L2X0_EVENT_CNT_CTRL 0x200
32#define L2X0_EVENT_CNT1_CFG 0x204 32#define L2X0_EVENT_CNT1_CFG 0x204
33#define L2X0_EVENT_CNT0_CFG 0x208 33#define L2X0_EVENT_CNT0_CFG 0x208
@@ -54,53 +54,93 @@
54#define L2X0_LOCKDOWN_WAY_D_BASE 0x900 54#define L2X0_LOCKDOWN_WAY_D_BASE 0x900
55#define L2X0_LOCKDOWN_WAY_I_BASE 0x904 55#define L2X0_LOCKDOWN_WAY_I_BASE 0x904
56#define L2X0_LOCKDOWN_STRIDE 0x08 56#define L2X0_LOCKDOWN_STRIDE 0x08
57#define L2X0_ADDR_FILTER_START 0xC00 57#define L310_ADDR_FILTER_START 0xC00
58#define L2X0_ADDR_FILTER_END 0xC04 58#define L310_ADDR_FILTER_END 0xC04
59#define L2X0_TEST_OPERATION 0xF00 59#define L2X0_TEST_OPERATION 0xF00
60#define L2X0_LINE_DATA 0xF10 60#define L2X0_LINE_DATA 0xF10
61#define L2X0_LINE_TAG 0xF30 61#define L2X0_LINE_TAG 0xF30
62#define L2X0_DEBUG_CTRL 0xF40 62#define L2X0_DEBUG_CTRL 0xF40
63#define L2X0_PREFETCH_CTRL 0xF60 63#define L310_PREFETCH_CTRL 0xF60
64#define L2X0_POWER_CTRL 0xF80 64#define L310_POWER_CTRL 0xF80
65#define L2X0_DYNAMIC_CLK_GATING_EN (1 << 1) 65#define L310_DYNAMIC_CLK_GATING_EN (1 << 1)
66#define L2X0_STNDBY_MODE_EN (1 << 0) 66#define L310_STNDBY_MODE_EN (1 << 0)
67 67
68/* Registers shifts and masks */ 68/* Registers shifts and masks */
69#define L2X0_CACHE_ID_PART_MASK (0xf << 6) 69#define L2X0_CACHE_ID_PART_MASK (0xf << 6)
70#define L2X0_CACHE_ID_PART_L210 (1 << 6) 70#define L2X0_CACHE_ID_PART_L210 (1 << 6)
71#define L2X0_CACHE_ID_PART_L220 (2 << 6)
71#define L2X0_CACHE_ID_PART_L310 (3 << 6) 72#define L2X0_CACHE_ID_PART_L310 (3 << 6)
72#define L2X0_CACHE_ID_RTL_MASK 0x3f 73#define L2X0_CACHE_ID_RTL_MASK 0x3f
73#define L2X0_CACHE_ID_RTL_R0P0 0x0 74#define L210_CACHE_ID_RTL_R0P2_02 0x00
74#define L2X0_CACHE_ID_RTL_R1P0 0x2 75#define L210_CACHE_ID_RTL_R0P1 0x01
75#define L2X0_CACHE_ID_RTL_R2P0 0x4 76#define L210_CACHE_ID_RTL_R0P2_01 0x02
76#define L2X0_CACHE_ID_RTL_R3P0 0x5 77#define L210_CACHE_ID_RTL_R0P3 0x03
77#define L2X0_CACHE_ID_RTL_R3P1 0x6 78#define L210_CACHE_ID_RTL_R0P4 0x0b
78#define L2X0_CACHE_ID_RTL_R3P2 0x8 79#define L210_CACHE_ID_RTL_R0P5 0x0f
80#define L220_CACHE_ID_RTL_R1P7_01REL0 0x06
81#define L310_CACHE_ID_RTL_R0P0 0x00
82#define L310_CACHE_ID_RTL_R1P0 0x02
83#define L310_CACHE_ID_RTL_R2P0 0x04
84#define L310_CACHE_ID_RTL_R3P0 0x05
85#define L310_CACHE_ID_RTL_R3P1 0x06
86#define L310_CACHE_ID_RTL_R3P1_50REL0 0x07
87#define L310_CACHE_ID_RTL_R3P2 0x08
88#define L310_CACHE_ID_RTL_R3P3 0x09
79 89
80#define L2X0_AUX_CTRL_MASK 0xc0000fff 90/* L2C auxiliary control register - bits common to L2C-210/220/310 */
91#define L2C_AUX_CTRL_WAY_SIZE_SHIFT 17
92#define L2C_AUX_CTRL_WAY_SIZE_MASK (7 << 17)
93#define L2C_AUX_CTRL_WAY_SIZE(n) ((n) << 17)
94#define L2C_AUX_CTRL_EVTMON_ENABLE BIT(20)
95#define L2C_AUX_CTRL_PARITY_ENABLE BIT(21)
96#define L2C_AUX_CTRL_SHARED_OVERRIDE BIT(22)
97/* L2C-210/220 common bits */
81#define L2X0_AUX_CTRL_DATA_RD_LATENCY_SHIFT 0 98#define L2X0_AUX_CTRL_DATA_RD_LATENCY_SHIFT 0
82#define L2X0_AUX_CTRL_DATA_RD_LATENCY_MASK 0x7 99#define L2X0_AUX_CTRL_DATA_RD_LATENCY_MASK (7 << 0)
83#define L2X0_AUX_CTRL_DATA_WR_LATENCY_SHIFT 3 100#define L2X0_AUX_CTRL_DATA_WR_LATENCY_SHIFT 3
84#define L2X0_AUX_CTRL_DATA_WR_LATENCY_MASK (0x7 << 3) 101#define L2X0_AUX_CTRL_DATA_WR_LATENCY_MASK (7 << 3)
85#define L2X0_AUX_CTRL_TAG_LATENCY_SHIFT 6 102#define L2X0_AUX_CTRL_TAG_LATENCY_SHIFT 6
86#define L2X0_AUX_CTRL_TAG_LATENCY_MASK (0x7 << 6) 103#define L2X0_AUX_CTRL_TAG_LATENCY_MASK (7 << 6)
87#define L2X0_AUX_CTRL_DIRTY_LATENCY_SHIFT 9 104#define L2X0_AUX_CTRL_DIRTY_LATENCY_SHIFT 9
88#define L2X0_AUX_CTRL_DIRTY_LATENCY_MASK (0x7 << 9) 105#define L2X0_AUX_CTRL_DIRTY_LATENCY_MASK (7 << 9)
89#define L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT 16 106#define L2X0_AUX_CTRL_ASSOC_SHIFT 13
90#define L2X0_AUX_CTRL_WAY_SIZE_SHIFT 17 107#define L2X0_AUX_CTRL_ASSOC_MASK (15 << 13)
91#define L2X0_AUX_CTRL_WAY_SIZE_MASK (0x7 << 17) 108/* L2C-210 specific bits */
92#define L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT 22 109#define L210_AUX_CTRL_WRAP_DISABLE BIT(12)
93#define L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT 26 110#define L210_AUX_CTRL_WA_OVERRIDE BIT(23)
94#define L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT 27 111#define L210_AUX_CTRL_EXCLUSIVE_ABORT BIT(24)
95#define L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT 28 112/* L2C-220 specific bits */
96#define L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT 29 113#define L220_AUX_CTRL_EXCLUSIVE_CACHE BIT(12)
97#define L2X0_AUX_CTRL_EARLY_BRESP_SHIFT 30 114#define L220_AUX_CTRL_FWA_SHIFT 23
115#define L220_AUX_CTRL_FWA_MASK (3 << 23)
116#define L220_AUX_CTRL_NS_LOCKDOWN BIT(26)
117#define L220_AUX_CTRL_NS_INT_CTRL BIT(27)
118/* L2C-310 specific bits */
119#define L310_AUX_CTRL_FULL_LINE_ZERO BIT(0) /* R2P0+ */
120#define L310_AUX_CTRL_HIGHPRIO_SO_DEV BIT(10) /* R2P0+ */
121#define L310_AUX_CTRL_STORE_LIMITATION BIT(11) /* R2P0+ */
122#define L310_AUX_CTRL_EXCLUSIVE_CACHE BIT(12)
123#define L310_AUX_CTRL_ASSOCIATIVITY_16 BIT(16)
124#define L310_AUX_CTRL_CACHE_REPLACE_RR BIT(25) /* R2P0+ */
125#define L310_AUX_CTRL_NS_LOCKDOWN BIT(26)
126#define L310_AUX_CTRL_NS_INT_CTRL BIT(27)
127#define L310_AUX_CTRL_DATA_PREFETCH BIT(28)
128#define L310_AUX_CTRL_INSTR_PREFETCH BIT(29)
129#define L310_AUX_CTRL_EARLY_BRESP BIT(30) /* R2P0+ */
98 130
99#define L2X0_LATENCY_CTRL_SETUP_SHIFT 0 131#define L310_LATENCY_CTRL_SETUP(n) ((n) << 0)
100#define L2X0_LATENCY_CTRL_RD_SHIFT 4 132#define L310_LATENCY_CTRL_RD(n) ((n) << 4)
101#define L2X0_LATENCY_CTRL_WR_SHIFT 8 133#define L310_LATENCY_CTRL_WR(n) ((n) << 8)
102 134
103#define L2X0_ADDR_FILTER_EN 1 135#define L310_ADDR_FILTER_EN 1
136
137#define L310_PREFETCH_CTRL_OFFSET_MASK 0x1f
138#define L310_PREFETCH_CTRL_DBL_LINEFILL_INCR BIT(23)
139#define L310_PREFETCH_CTRL_PREFETCH_DROP BIT(24)
140#define L310_PREFETCH_CTRL_DBL_LINEFILL_WRAP BIT(27)
141#define L310_PREFETCH_CTRL_DATA_PREFETCH BIT(28)
142#define L310_PREFETCH_CTRL_INSTR_PREFETCH BIT(29)
143#define L310_PREFETCH_CTRL_DBL_LINEFILL BIT(30)
104 144
105#define L2X0_CTRL_EN 1 145#define L2X0_CTRL_EN 1
106 146
diff --git a/arch/arm/include/asm/highmem.h b/arch/arm/include/asm/highmem.h
index 91b99abe7a95..535579511ed0 100644
--- a/arch/arm/include/asm/highmem.h
+++ b/arch/arm/include/asm/highmem.h
@@ -18,6 +18,7 @@
18 } while (0) 18 } while (0)
19 19
20extern pte_t *pkmap_page_table; 20extern pte_t *pkmap_page_table;
21extern pte_t *fixmap_page_table;
21 22
22extern void *kmap_high(struct page *page); 23extern void *kmap_high(struct page *page);
23extern void kunmap_high(struct page *page); 24extern void kunmap_high(struct page *page);
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index 8aa4cca74501..3d23418cbddd 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -179,6 +179,12 @@ static inline void __iomem *__typesafe_io(unsigned long addr)
179/* PCI fixed i/o mapping */ 179/* PCI fixed i/o mapping */
180#define PCI_IO_VIRT_BASE 0xfee00000 180#define PCI_IO_VIRT_BASE 0xfee00000
181 181
182#if defined(CONFIG_PCI)
183void pci_ioremap_set_mem_type(int mem_type);
184#else
185static inline void pci_ioremap_set_mem_type(int mem_type) {}
186#endif
187
182extern int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr); 188extern int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr);
183 189
184/* 190/*
diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
index 09af14999c9b..193ceaf01bfd 100644
--- a/arch/arm/include/asm/kvm_host.h
+++ b/arch/arm/include/asm/kvm_host.h
@@ -36,7 +36,7 @@
36#define KVM_COALESCED_MMIO_PAGE_OFFSET 1 36#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
37#define KVM_HAVE_ONE_REG 37#define KVM_HAVE_ONE_REG
38 38
39#define KVM_VCPU_MAX_FEATURES 1 39#define KVM_VCPU_MAX_FEATURES 2
40 40
41#include <kvm/arm_vgic.h> 41#include <kvm/arm_vgic.h>
42 42
diff --git a/arch/arm/include/asm/kvm_psci.h b/arch/arm/include/asm/kvm_psci.h
index 9a83d98bf170..6bda945d31fa 100644
--- a/arch/arm/include/asm/kvm_psci.h
+++ b/arch/arm/include/asm/kvm_psci.h
@@ -18,6 +18,10 @@
18#ifndef __ARM_KVM_PSCI_H__ 18#ifndef __ARM_KVM_PSCI_H__
19#define __ARM_KVM_PSCI_H__ 19#define __ARM_KVM_PSCI_H__
20 20
21bool kvm_psci_call(struct kvm_vcpu *vcpu); 21#define KVM_ARM_PSCI_0_1 1
22#define KVM_ARM_PSCI_0_2 2
23
24int kvm_psci_version(struct kvm_vcpu *vcpu);
25int kvm_psci_call(struct kvm_vcpu *vcpu);
22 26
23#endif /* __ARM_KVM_PSCI_H__ */ 27#endif /* __ARM_KVM_PSCI_H__ */
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
index 17a3fa2979e8..060a75e99263 100644
--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -14,7 +14,6 @@
14#include <linux/reboot.h> 14#include <linux/reboot.h>
15 15
16struct tag; 16struct tag;
17struct meminfo;
18struct pt_regs; 17struct pt_regs;
19struct smp_operations; 18struct smp_operations;
20#ifdef CONFIG_SMP 19#ifdef CONFIG_SMP
@@ -45,10 +44,12 @@ struct machine_desc {
45 unsigned char reserve_lp1 :1; /* never has lp1 */ 44 unsigned char reserve_lp1 :1; /* never has lp1 */
46 unsigned char reserve_lp2 :1; /* never has lp2 */ 45 unsigned char reserve_lp2 :1; /* never has lp2 */
47 enum reboot_mode reboot_mode; /* default restart mode */ 46 enum reboot_mode reboot_mode; /* default restart mode */
47 unsigned l2c_aux_val; /* L2 cache aux value */
48 unsigned l2c_aux_mask; /* L2 cache aux mask */
49 void (*l2c_write_sec)(unsigned long, unsigned);
48 struct smp_operations *smp; /* SMP operations */ 50 struct smp_operations *smp; /* SMP operations */
49 bool (*smp_init)(void); 51 bool (*smp_init)(void);
50 void (*fixup)(struct tag *, char **, 52 void (*fixup)(struct tag *, char **);
51 struct meminfo *);
52 void (*init_meminfo)(void); 53 void (*init_meminfo)(void);
53 void (*reserve)(void);/* reserve mem blocks */ 54 void (*reserve)(void);/* reserve mem blocks */
54 void (*map_io)(void);/* IO mapping function */ 55 void (*map_io)(void);/* IO mapping function */
diff --git a/arch/arm/include/asm/mcpm.h b/arch/arm/include/asm/mcpm.h
index a5ff410dcdb6..d9702eb0b02b 100644
--- a/arch/arm/include/asm/mcpm.h
+++ b/arch/arm/include/asm/mcpm.h
@@ -98,14 +98,14 @@ int mcpm_cpu_power_up(unsigned int cpu, unsigned int cluster);
98 * previously in which case the caller should take appropriate action. 98 * previously in which case the caller should take appropriate action.
99 * 99 *
100 * On success, the CPU is not guaranteed to be truly halted until 100 * On success, the CPU is not guaranteed to be truly halted until
101 * mcpm_cpu_power_down_finish() subsequently returns non-zero for the 101 * mcpm_wait_for_cpu_powerdown() subsequently returns non-zero for the
102 * specified cpu. Until then, other CPUs should make sure they do not 102 * specified cpu. Until then, other CPUs should make sure they do not
103 * trash memory the target CPU might be executing/accessing. 103 * trash memory the target CPU might be executing/accessing.
104 */ 104 */
105void mcpm_cpu_power_down(void); 105void mcpm_cpu_power_down(void);
106 106
107/** 107/**
108 * mcpm_cpu_power_down_finish - wait for a specified CPU to halt, and 108 * mcpm_wait_for_cpu_powerdown - wait for a specified CPU to halt, and
109 * make sure it is powered off 109 * make sure it is powered off
110 * 110 *
111 * @cpu: CPU number within given cluster 111 * @cpu: CPU number within given cluster
@@ -127,7 +127,7 @@ void mcpm_cpu_power_down(void);
127 * - zero if the CPU is in a safely parked state 127 * - zero if the CPU is in a safely parked state
128 * - nonzero otherwise (e.g., timeout) 128 * - nonzero otherwise (e.g., timeout)
129 */ 129 */
130int mcpm_cpu_power_down_finish(unsigned int cpu, unsigned int cluster); 130int mcpm_wait_for_cpu_powerdown(unsigned int cpu, unsigned int cluster);
131 131
132/** 132/**
133 * mcpm_cpu_suspend - bring the calling CPU in a suspended state 133 * mcpm_cpu_suspend - bring the calling CPU in a suspended state
@@ -171,7 +171,7 @@ int mcpm_cpu_powered_up(void);
171struct mcpm_platform_ops { 171struct mcpm_platform_ops {
172 int (*power_up)(unsigned int cpu, unsigned int cluster); 172 int (*power_up)(unsigned int cpu, unsigned int cluster);
173 void (*power_down)(void); 173 void (*power_down)(void);
174 int (*power_down_finish)(unsigned int cpu, unsigned int cluster); 174 int (*wait_for_powerdown)(unsigned int cpu, unsigned int cluster);
175 void (*suspend)(u64); 175 void (*suspend)(u64);
176 void (*powered_up)(void); 176 void (*powered_up)(void);
177}; 177};
diff --git a/arch/arm/include/asm/memblock.h b/arch/arm/include/asm/memblock.h
index c2f5102ae659..bf47a6c110a2 100644
--- a/arch/arm/include/asm/memblock.h
+++ b/arch/arm/include/asm/memblock.h
@@ -1,10 +1,9 @@
1#ifndef _ASM_ARM_MEMBLOCK_H 1#ifndef _ASM_ARM_MEMBLOCK_H
2#define _ASM_ARM_MEMBLOCK_H 2#define _ASM_ARM_MEMBLOCK_H
3 3
4struct meminfo;
5struct machine_desc; 4struct machine_desc;
6 5
7void arm_memblock_init(struct meminfo *, const struct machine_desc *); 6void arm_memblock_init(const struct machine_desc *);
8phys_addr_t arm_memblock_steal(phys_addr_t size, phys_addr_t align); 7phys_addr_t arm_memblock_steal(phys_addr_t size, phys_addr_t align);
9 8
10#endif 9#endif
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 02fa2558f662..2b751464d6ff 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -83,8 +83,6 @@
83 */ 83 */
84#define IOREMAP_MAX_ORDER 24 84#define IOREMAP_MAX_ORDER 24
85 85
86#define CONSISTENT_END (0xffe00000UL)
87
88#else /* CONFIG_MMU */ 86#else /* CONFIG_MMU */
89 87
90/* 88/*
diff --git a/arch/arm/include/asm/outercache.h b/arch/arm/include/asm/outercache.h
index f94784f0e3a6..891a56b35bcf 100644
--- a/arch/arm/include/asm/outercache.h
+++ b/arch/arm/include/asm/outercache.h
@@ -28,53 +28,84 @@ struct outer_cache_fns {
28 void (*clean_range)(unsigned long, unsigned long); 28 void (*clean_range)(unsigned long, unsigned long);
29 void (*flush_range)(unsigned long, unsigned long); 29 void (*flush_range)(unsigned long, unsigned long);
30 void (*flush_all)(void); 30 void (*flush_all)(void);
31 void (*inv_all)(void);
32 void (*disable)(void); 31 void (*disable)(void);
33#ifdef CONFIG_OUTER_CACHE_SYNC 32#ifdef CONFIG_OUTER_CACHE_SYNC
34 void (*sync)(void); 33 void (*sync)(void);
35#endif 34#endif
36 void (*set_debug)(unsigned long);
37 void (*resume)(void); 35 void (*resume)(void);
36
37 /* This is an ARM L2C thing */
38 void (*write_sec)(unsigned long, unsigned);
38}; 39};
39 40
40extern struct outer_cache_fns outer_cache; 41extern struct outer_cache_fns outer_cache;
41 42
42#ifdef CONFIG_OUTER_CACHE 43#ifdef CONFIG_OUTER_CACHE
43 44/**
45 * outer_inv_range - invalidate range of outer cache lines
46 * @start: starting physical address, inclusive
47 * @end: end physical address, exclusive
48 */
44static inline void outer_inv_range(phys_addr_t start, phys_addr_t end) 49static inline void outer_inv_range(phys_addr_t start, phys_addr_t end)
45{ 50{
46 if (outer_cache.inv_range) 51 if (outer_cache.inv_range)
47 outer_cache.inv_range(start, end); 52 outer_cache.inv_range(start, end);
48} 53}
54
55/**
56 * outer_clean_range - clean dirty outer cache lines
57 * @start: starting physical address, inclusive
58 * @end: end physical address, exclusive
59 */
49static inline void outer_clean_range(phys_addr_t start, phys_addr_t end) 60static inline void outer_clean_range(phys_addr_t start, phys_addr_t end)
50{ 61{
51 if (outer_cache.clean_range) 62 if (outer_cache.clean_range)
52 outer_cache.clean_range(start, end); 63 outer_cache.clean_range(start, end);
53} 64}
65
66/**
67 * outer_flush_range - clean and invalidate outer cache lines
68 * @start: starting physical address, inclusive
69 * @end: end physical address, exclusive
70 */
54static inline void outer_flush_range(phys_addr_t start, phys_addr_t end) 71static inline void outer_flush_range(phys_addr_t start, phys_addr_t end)
55{ 72{
56 if (outer_cache.flush_range) 73 if (outer_cache.flush_range)
57 outer_cache.flush_range(start, end); 74 outer_cache.flush_range(start, end);
58} 75}
59 76
77/**
78 * outer_flush_all - clean and invalidate all cache lines in the outer cache
79 *
80 * Note: depending on implementation, this may not be atomic - it must
81 * only be called with interrupts disabled and no other active outer
82 * cache masters.
83 *
84 * It is intended that this function is only used by implementations
85 * needing to override the outer_cache.disable() method due to security.
86 * (Some implementations perform this as a clean followed by an invalidate.)
87 */
60static inline void outer_flush_all(void) 88static inline void outer_flush_all(void)
61{ 89{
62 if (outer_cache.flush_all) 90 if (outer_cache.flush_all)
63 outer_cache.flush_all(); 91 outer_cache.flush_all();
64} 92}
65 93
66static inline void outer_inv_all(void) 94/**
67{ 95 * outer_disable - clean, invalidate and disable the outer cache
68 if (outer_cache.inv_all) 96 *
69 outer_cache.inv_all(); 97 * Disable the outer cache, ensuring that any data contained in the outer
70} 98 * cache is pushed out to lower levels of system memory. The note and
71 99 * conditions above concerning outer_flush_all() applies here.
72static inline void outer_disable(void) 100 */
73{ 101extern void outer_disable(void);
74 if (outer_cache.disable)
75 outer_cache.disable();
76}
77 102
103/**
104 * outer_resume - restore the cache configuration and re-enable outer cache
105 *
106 * Restore any configuration that the cache had when previously enabled,
107 * and re-enable the outer cache.
108 */
78static inline void outer_resume(void) 109static inline void outer_resume(void)
79{ 110{
80 if (outer_cache.resume) 111 if (outer_cache.resume)
@@ -90,13 +121,18 @@ static inline void outer_clean_range(phys_addr_t start, phys_addr_t end)
90static inline void outer_flush_range(phys_addr_t start, phys_addr_t end) 121static inline void outer_flush_range(phys_addr_t start, phys_addr_t end)
91{ } 122{ }
92static inline void outer_flush_all(void) { } 123static inline void outer_flush_all(void) { }
93static inline void outer_inv_all(void) { }
94static inline void outer_disable(void) { } 124static inline void outer_disable(void) { }
95static inline void outer_resume(void) { } 125static inline void outer_resume(void) { }
96 126
97#endif 127#endif
98 128
99#ifdef CONFIG_OUTER_CACHE_SYNC 129#ifdef CONFIG_OUTER_CACHE_SYNC
130/**
131 * outer_sync - perform a sync point for outer cache
132 *
133 * Ensure that all outer cache operations are complete and any store
134 * buffers are drained.
135 */
100static inline void outer_sync(void) 136static inline void outer_sync(void)
101{ 137{
102 if (outer_cache.sync) 138 if (outer_cache.sync)
diff --git a/arch/arm/include/asm/pci.h b/arch/arm/include/asm/pci.h
index 680a83e94467..7e95d8535e24 100644
--- a/arch/arm/include/asm/pci.h
+++ b/arch/arm/include/asm/pci.h
@@ -31,11 +31,6 @@ static inline int pci_proc_domain(struct pci_bus *bus)
31} 31}
32#endif /* CONFIG_PCI_DOMAINS */ 32#endif /* CONFIG_PCI_DOMAINS */
33 33
34static inline void pcibios_penalize_isa_irq(int irq, int active)
35{
36 /* We don't do dynamic PCI IRQ allocation */
37}
38
39/* 34/*
40 * The PCI address space does equal the physical memory address space. 35 * The PCI address space does equal the physical memory address space.
41 * The networking and block device layers use this boolean for bounce 36 * The networking and block device layers use this boolean for bounce
diff --git a/arch/arm/include/asm/prom.h b/arch/arm/include/asm/prom.h
index b681575ad3de..cd94ef2ef283 100644
--- a/arch/arm/include/asm/prom.h
+++ b/arch/arm/include/asm/prom.h
@@ -14,7 +14,6 @@
14#ifdef CONFIG_OF 14#ifdef CONFIG_OF
15 15
16extern const struct machine_desc *setup_machine_fdt(unsigned int dt_phys); 16extern const struct machine_desc *setup_machine_fdt(unsigned int dt_phys);
17extern void arm_dt_memblock_reserve(void);
18extern void __init arm_dt_init_cpu_maps(void); 17extern void __init arm_dt_init_cpu_maps(void);
19 18
20#else /* CONFIG_OF */ 19#else /* CONFIG_OF */
@@ -24,7 +23,6 @@ static inline const struct machine_desc *setup_machine_fdt(unsigned int dt_phys)
24 return NULL; 23 return NULL;
25} 24}
26 25
27static inline void arm_dt_memblock_reserve(void) { }
28static inline void arm_dt_init_cpu_maps(void) { } 26static inline void arm_dt_init_cpu_maps(void) { }
29 27
30#endif /* CONFIG_OF */ 28#endif /* CONFIG_OF */
diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h
index c4ae171850f8..c25ef3ec6d1f 100644
--- a/arch/arm/include/asm/psci.h
+++ b/arch/arm/include/asm/psci.h
@@ -29,16 +29,19 @@ struct psci_operations {
29 int (*cpu_off)(struct psci_power_state state); 29 int (*cpu_off)(struct psci_power_state state);
30 int (*cpu_on)(unsigned long cpuid, unsigned long entry_point); 30 int (*cpu_on)(unsigned long cpuid, unsigned long entry_point);
31 int (*migrate)(unsigned long cpuid); 31 int (*migrate)(unsigned long cpuid);
32 int (*affinity_info)(unsigned long target_affinity,
33 unsigned long lowest_affinity_level);
34 int (*migrate_info_type)(void);
32}; 35};
33 36
34extern struct psci_operations psci_ops; 37extern struct psci_operations psci_ops;
35extern struct smp_operations psci_smp_ops; 38extern struct smp_operations psci_smp_ops;
36 39
37#ifdef CONFIG_ARM_PSCI 40#ifdef CONFIG_ARM_PSCI
38void psci_init(void); 41int psci_init(void);
39bool psci_smp_available(void); 42bool psci_smp_available(void);
40#else 43#else
41static inline void psci_init(void) { } 44static inline int psci_init(void) { return 0; }
42static inline bool psci_smp_available(void) { return false; } 45static inline bool psci_smp_available(void) { return false; }
43#endif 46#endif
44 47
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
index 8d6a089dfb76..e0adb9f1bf94 100644
--- a/arch/arm/include/asm/setup.h
+++ b/arch/arm/include/asm/setup.h
@@ -21,34 +21,6 @@
21#define __tagtable(tag, fn) \ 21#define __tagtable(tag, fn) \
22static const struct tagtable __tagtable_##fn __tag = { tag, fn } 22static const struct tagtable __tagtable_##fn __tag = { tag, fn }
23 23
24/*
25 * Memory map description
26 */
27#define NR_BANKS CONFIG_ARM_NR_BANKS
28
29struct membank {
30 phys_addr_t start;
31 phys_addr_t size;
32 unsigned int highmem;
33};
34
35struct meminfo {
36 int nr_banks;
37 struct membank bank[NR_BANKS];
38};
39
40extern struct meminfo meminfo;
41
42#define for_each_bank(iter,mi) \
43 for (iter = 0; iter < (mi)->nr_banks; iter++)
44
45#define bank_pfn_start(bank) __phys_to_pfn((bank)->start)
46#define bank_pfn_end(bank) __phys_to_pfn((bank)->start + (bank)->size)
47#define bank_pfn_size(bank) ((bank)->size >> PAGE_SHIFT)
48#define bank_phys_start(bank) (bank)->start
49#define bank_phys_end(bank) ((bank)->start + (bank)->size)
50#define bank_phys_size(bank) (bank)->size
51
52extern int arm_add_memory(u64 start, u64 size); 24extern int arm_add_memory(u64 start, u64 size);
53extern void early_print(const char *str, ...); 25extern void early_print(const char *str, ...);
54extern void dump_machine_table(void); 26extern void dump_machine_table(void);
diff --git a/arch/arm/include/asm/trusted_foundations.h b/arch/arm/include/asm/trusted_foundations.h
index b5f7705abcb0..624e1d436c6c 100644
--- a/arch/arm/include/asm/trusted_foundations.h
+++ b/arch/arm/include/asm/trusted_foundations.h
@@ -54,7 +54,9 @@ static inline void register_trusted_foundations(
54 */ 54 */
55 pr_err("No support for Trusted Foundations, continuing in degraded mode.\n"); 55 pr_err("No support for Trusted Foundations, continuing in degraded mode.\n");
56 pr_err("Secondary processors as well as CPU PM will be disabled.\n"); 56 pr_err("Secondary processors as well as CPU PM will be disabled.\n");
57#if IS_ENABLED(CONFIG_SMP)
57 setup_max_cpus = 0; 58 setup_max_cpus = 0;
59#endif
58 cpu_idle_poll_ctrl(true); 60 cpu_idle_poll_ctrl(true);
59} 61}
60 62
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
index 12c3a5decc60..75d95799b6e6 100644
--- a/arch/arm/include/asm/uaccess.h
+++ b/arch/arm/include/asm/uaccess.h
@@ -171,8 +171,9 @@ extern int __put_user_8(void *, unsigned long long);
171#define __put_user_check(x,p) \ 171#define __put_user_check(x,p) \
172 ({ \ 172 ({ \
173 unsigned long __limit = current_thread_info()->addr_limit - 1; \ 173 unsigned long __limit = current_thread_info()->addr_limit - 1; \
174 const typeof(*(p)) __user *__tmp_p = (p); \
174 register const typeof(*(p)) __r2 asm("r2") = (x); \ 175 register const typeof(*(p)) __r2 asm("r2") = (x); \
175 register const typeof(*(p)) __user *__p asm("r0") = (p);\ 176 register const typeof(*(p)) __user *__p asm("r0") = __tmp_p; \
176 register unsigned long __l asm("r1") = __limit; \ 177 register unsigned long __l asm("r1") = __limit; \
177 register int __e asm("r0"); \ 178 register int __e asm("r0"); \
178 switch (sizeof(*(__p))) { \ 179 switch (sizeof(*(__p))) { \
diff --git a/arch/arm/include/asm/xen/hypercall.h b/arch/arm/include/asm/xen/hypercall.h
index 7704e28c3483..712b50e0a6dc 100644
--- a/arch/arm/include/asm/xen/hypercall.h
+++ b/arch/arm/include/asm/xen/hypercall.h
@@ -34,6 +34,7 @@
34#define _ASM_ARM_XEN_HYPERCALL_H 34#define _ASM_ARM_XEN_HYPERCALL_H
35 35
36#include <xen/interface/xen.h> 36#include <xen/interface/xen.h>
37#include <xen/interface/sched.h>
37 38
38long privcmd_call(unsigned call, unsigned long a1, 39long privcmd_call(unsigned call, unsigned long a1,
39 unsigned long a2, unsigned long a3, 40 unsigned long a2, unsigned long a3,
@@ -48,6 +49,16 @@ int HYPERVISOR_memory_op(unsigned int cmd, void *arg);
48int HYPERVISOR_physdev_op(int cmd, void *arg); 49int HYPERVISOR_physdev_op(int cmd, void *arg);
49int HYPERVISOR_vcpu_op(int cmd, int vcpuid, void *extra_args); 50int HYPERVISOR_vcpu_op(int cmd, int vcpuid, void *extra_args);
50int HYPERVISOR_tmem_op(void *arg); 51int HYPERVISOR_tmem_op(void *arg);
52int HYPERVISOR_multicall(struct multicall_entry *calls, uint32_t nr);
53
54static inline int
55HYPERVISOR_suspend(unsigned long start_info_mfn)
56{
57 struct sched_shutdown r = { .reason = SHUTDOWN_suspend };
58
59 /* start_info_mfn is unused on ARM */
60 return HYPERVISOR_sched_op(SCHEDOP_shutdown, &r);
61}
51 62
52static inline void 63static inline void
53MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va, 64MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va,
@@ -63,9 +74,4 @@ MULTI_mmu_update(struct multicall_entry *mcl, struct mmu_update *req,
63 BUG(); 74 BUG();
64} 75}
65 76
66static inline int
67HYPERVISOR_multicall(void *call_list, int nr_calls)
68{
69 BUG();
70}
71#endif /* _ASM_ARM_XEN_HYPERCALL_H */ 77#endif /* _ASM_ARM_XEN_HYPERCALL_H */
diff --git a/arch/arm/include/asm/xen/interface.h b/arch/arm/include/asm/xen/interface.h
index 1151188bcd83..50066006e6bd 100644
--- a/arch/arm/include/asm/xen/interface.h
+++ b/arch/arm/include/asm/xen/interface.h
@@ -40,6 +40,8 @@ typedef uint64_t xen_pfn_t;
40#define PRI_xen_pfn "llx" 40#define PRI_xen_pfn "llx"
41typedef uint64_t xen_ulong_t; 41typedef uint64_t xen_ulong_t;
42#define PRI_xen_ulong "llx" 42#define PRI_xen_ulong "llx"
43typedef int64_t xen_long_t;
44#define PRI_xen_long "llx"
43/* Guest handles for primitive C types. */ 45/* Guest handles for primitive C types. */
44__DEFINE_GUEST_HANDLE(uchar, unsigned char); 46__DEFINE_GUEST_HANDLE(uchar, unsigned char);
45__DEFINE_GUEST_HANDLE(uint, unsigned int); 47__DEFINE_GUEST_HANDLE(uint, unsigned int);
diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h
index cf4f3e867395..ded062f9b358 100644
--- a/arch/arm/include/asm/xen/page.h
+++ b/arch/arm/include/asm/xen/page.h
@@ -77,7 +77,6 @@ static inline xpaddr_t machine_to_phys(xmaddr_t machine)
77} 77}
78/* VIRT <-> MACHINE conversion */ 78/* VIRT <-> MACHINE conversion */
79#define virt_to_machine(v) (phys_to_machine(XPADDR(__pa(v)))) 79#define virt_to_machine(v) (phys_to_machine(XPADDR(__pa(v))))
80#define virt_to_pfn(v) (PFN_DOWN(__pa(v)))
81#define virt_to_mfn(v) (pfn_to_mfn(virt_to_pfn(v))) 80#define virt_to_mfn(v) (pfn_to_mfn(virt_to_pfn(v)))
82#define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) 81#define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT))
83 82
diff --git a/arch/arm/include/debug/imx-uart.h b/arch/arm/include/debug/imx-uart.h
index 42b823cd2d22..032a316eb802 100644
--- a/arch/arm/include/debug/imx-uart.h
+++ b/arch/arm/include/debug/imx-uart.h
@@ -81,6 +81,15 @@
81#define IMX6SL_UART_BASE_ADDR(n) IMX6SL_UART##n##_BASE_ADDR 81#define IMX6SL_UART_BASE_ADDR(n) IMX6SL_UART##n##_BASE_ADDR
82#define IMX6SL_UART_BASE(n) IMX6SL_UART_BASE_ADDR(n) 82#define IMX6SL_UART_BASE(n) IMX6SL_UART_BASE_ADDR(n)
83 83
84#define IMX6SX_UART1_BASE_ADDR 0x02020000
85#define IMX6SX_UART2_BASE_ADDR 0x021e8000
86#define IMX6SX_UART3_BASE_ADDR 0x021ec000
87#define IMX6SX_UART4_BASE_ADDR 0x021f0000
88#define IMX6SX_UART5_BASE_ADDR 0x021f4000
89#define IMX6SX_UART6_BASE_ADDR 0x022a0000
90#define IMX6SX_UART_BASE_ADDR(n) IMX6SX_UART##n##_BASE_ADDR
91#define IMX6SX_UART_BASE(n) IMX6SX_UART_BASE_ADDR(n)
92
84#define IMX_DEBUG_UART_BASE(soc) soc##_UART_BASE(CONFIG_DEBUG_IMX_UART_PORT) 93#define IMX_DEBUG_UART_BASE(soc) soc##_UART_BASE(CONFIG_DEBUG_IMX_UART_PORT)
85 94
86#ifdef CONFIG_DEBUG_IMX1_UART 95#ifdef CONFIG_DEBUG_IMX1_UART
@@ -103,6 +112,8 @@
103#define UART_PADDR IMX_DEBUG_UART_BASE(IMX6Q) 112#define UART_PADDR IMX_DEBUG_UART_BASE(IMX6Q)
104#elif defined(CONFIG_DEBUG_IMX6SL_UART) 113#elif defined(CONFIG_DEBUG_IMX6SL_UART)
105#define UART_PADDR IMX_DEBUG_UART_BASE(IMX6SL) 114#define UART_PADDR IMX_DEBUG_UART_BASE(IMX6SL)
115#elif defined(CONFIG_DEBUG_IMX6SX_UART)
116#define UART_PADDR IMX_DEBUG_UART_BASE(IMX6SX)
106#endif 117#endif
107 118
108#endif /* __DEBUG_IMX_UART_H */ 119#endif /* __DEBUG_IMX_UART_H */
diff --git a/arch/arm/include/debug/msm.S b/arch/arm/include/debug/msm.S
index 9d653d475903..9ef57612811d 100644
--- a/arch/arm/include/debug/msm.S
+++ b/arch/arm/include/debug/msm.S
@@ -15,51 +15,15 @@
15 * 15 *
16 */ 16 */
17 17
18#if defined(CONFIG_ARCH_MSM7X00A) || defined(CONFIG_ARCH_QSD8X50)
19#define MSM_UART1_PHYS 0xA9A00000
20#define MSM_UART2_PHYS 0xA9B00000
21#define MSM_UART3_PHYS 0xA9C00000
22#elif defined(CONFIG_ARCH_MSM7X30)
23#define MSM_UART1_PHYS 0xACA00000
24#define MSM_UART2_PHYS 0xACB00000
25#define MSM_UART3_PHYS 0xACC00000
26#endif
27
28#if defined(CONFIG_DEBUG_MSM_UART1)
29#define MSM_DEBUG_UART_BASE 0xE1000000
30#define MSM_DEBUG_UART_PHYS MSM_UART1_PHYS
31#elif defined(CONFIG_DEBUG_MSM_UART2)
32#define MSM_DEBUG_UART_BASE 0xE1000000
33#define MSM_DEBUG_UART_PHYS MSM_UART2_PHYS
34#elif defined(CONFIG_DEBUG_MSM_UART3)
35#define MSM_DEBUG_UART_BASE 0xE1000000
36#define MSM_DEBUG_UART_PHYS MSM_UART3_PHYS
37#endif
38
39#ifdef CONFIG_DEBUG_MSM8660_UART
40#define MSM_DEBUG_UART_BASE 0xF0040000
41#define MSM_DEBUG_UART_PHYS 0x19C40000
42#endif
43
44#ifdef CONFIG_DEBUG_MSM8960_UART
45#define MSM_DEBUG_UART_BASE 0xF0040000
46#define MSM_DEBUG_UART_PHYS 0x16440000
47#endif
48
49#ifdef CONFIG_DEBUG_MSM8974_UART
50#define MSM_DEBUG_UART_BASE 0xFA71E000
51#define MSM_DEBUG_UART_PHYS 0xF991E000
52#endif
53
54 .macro addruart, rp, rv, tmp 18 .macro addruart, rp, rv, tmp
55#ifdef MSM_DEBUG_UART_PHYS 19#ifdef CONFIG_DEBUG_UART_PHYS
56 ldr \rp, =MSM_DEBUG_UART_PHYS 20 ldr \rp, =CONFIG_DEBUG_UART_PHYS
57 ldr \rv, =MSM_DEBUG_UART_BASE 21 ldr \rv, =CONFIG_DEBUG_UART_VIRT
58#endif 22#endif
59 .endm 23 .endm
60 24
61 .macro senduart, rd, rx 25 .macro senduart, rd, rx
62#ifdef CONFIG_MSM_HAS_DEBUG_UART_HS 26#ifdef CONFIG_DEBUG_QCOM_UARTDM
63 @ Write the 1 character to UARTDM_TF 27 @ Write the 1 character to UARTDM_TF
64 str \rd, [\rx, #0x70] 28 str \rd, [\rx, #0x70]
65#else 29#else
@@ -68,7 +32,7 @@
68 .endm 32 .endm
69 33
70 .macro waituart, rd, rx 34 .macro waituart, rd, rx
71#ifdef CONFIG_MSM_HAS_DEBUG_UART_HS 35#ifdef CONFIG_DEBUG_QCOM_UARTDM
72 @ check for TX_EMT in UARTDM_SR 36 @ check for TX_EMT in UARTDM_SR
73 ldr \rd, [\rx, #0x08] 37 ldr \rd, [\rx, #0x08]
74 tst \rd, #0x08 38 tst \rd, #0x08
diff --git a/arch/arm/include/debug/s3c24xx.S b/arch/arm/include/debug/s3c24xx.S
new file mode 100644
index 000000000000..b1f54dc4888c
--- /dev/null
+++ b/arch/arm/include/debug/s3c24xx.S
@@ -0,0 +1,46 @@
1/* arch/arm/mach-s3c2410/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Copyright (C) 2005 Simtec Electronics
7 *
8 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
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/serial_s3c.h>
16
17#define S3C2410_UART1_OFF (0x4000)
18
19 .macro addruart, rp, rv, tmp
20 ldr \rp, = CONFIG_DEBUG_UART_PHYS
21 ldr \rv, = CONFIG_DEBUG_UART_VIRT
22 .endm
23
24 .macro fifo_full_s3c2410 rd, rx
25 ldr \rd, [\rx, # S3C2410_UFSTAT]
26 tst \rd, #S3C2410_UFSTAT_TXFULL
27 .endm
28
29 .macro fifo_level_s3c2410 rd, rx
30 ldr \rd, [\rx, # S3C2410_UFSTAT]
31 and \rd, \rd, #S3C2410_UFSTAT_TXMASK
32 .endm
33
34/* Select the correct implementation depending on the configuration. The
35 * S3C2440 will get selected by default, as these are the most widely
36 * used variants of these
37*/
38
39#if defined(CONFIG_DEBUG_S3C2410_UART)
40#define fifo_full fifo_full_s3c2410
41#define fifo_level fifo_level_s3c2410
42#endif
43
44/* include the reset of the code which will do the work */
45
46#include <debug/samsung.S>
diff --git a/arch/arm/include/debug/vf.S b/arch/arm/include/debug/vf.S
index ba12cc44b2cb..b88933849a17 100644
--- a/arch/arm/include/debug/vf.S
+++ b/arch/arm/include/debug/vf.S
@@ -7,9 +7,20 @@
7 * 7 *
8 */ 8 */
9 9
10#define VF_UART0_BASE_ADDR 0x40027000
11#define VF_UART1_BASE_ADDR 0x40028000
12#define VF_UART2_BASE_ADDR 0x40029000
13#define VF_UART3_BASE_ADDR 0x4002a000
14#define VF_UART_BASE_ADDR(n) VF_UART##n##_BASE_ADDR
15#define VF_UART_BASE(n) VF_UART_BASE_ADDR(n)
16#define VF_UART_PHYSICAL_BASE VF_UART_BASE(CONFIG_DEBUG_VF_UART_PORT)
17
18#define VF_UART_VIRTUAL_BASE 0xfe000000
19
10 .macro addruart, rp, rv, tmp 20 .macro addruart, rp, rv, tmp
11 ldr \rp, =0x40028000 @ physical 21 ldr \rp, =VF_UART_PHYSICAL_BASE @ physical
12 ldr \rv, =0xfe028000 @ virtual 22 and \rv, \rp, #0xffffff @ offset within 16MB section
23 add \rv, \rv, #VF_UART_VIRTUAL_BASE
13 .endm 24 .endm
14 25
15 .macro senduart, rd, rx 26 .macro senduart, rd, rx
diff --git a/arch/arm/include/debug/zynq.S b/arch/arm/include/debug/zynq.S
index 0b762fafa758..bd13dedbdeff 100644
--- a/arch/arm/include/debug/zynq.S
+++ b/arch/arm/include/debug/zynq.S
@@ -20,18 +20,18 @@
20#define UART_SR_TXEMPTY 0x00000008 /* TX FIFO empty */ 20#define UART_SR_TXEMPTY 0x00000008 /* TX FIFO empty */
21 21
22#define UART0_PHYS 0xE0000000 22#define UART0_PHYS 0xE0000000
23#define UART0_VIRT 0xF0000000
23#define UART1_PHYS 0xE0001000 24#define UART1_PHYS 0xE0001000
24#define UART_SIZE SZ_4K 25#define UART1_VIRT 0xF0001000
25#define UART_VIRT 0xF0001000
26 26
27#if IS_ENABLED(CONFIG_DEBUG_ZYNQ_UART1) 27#if IS_ENABLED(CONFIG_DEBUG_ZYNQ_UART1)
28# define LL_UART_PADDR UART1_PHYS 28# define LL_UART_PADDR UART1_PHYS
29# define LL_UART_VADDR UART1_VIRT
29#else 30#else
30# define LL_UART_PADDR UART0_PHYS 31# define LL_UART_PADDR UART0_PHYS
32# define LL_UART_VADDR UART0_VIRT
31#endif 33#endif
32 34
33#define LL_UART_VADDR UART_VIRT
34
35 .macro addruart, rp, rv, tmp 35 .macro addruart, rp, rv, tmp
36 ldr \rp, =LL_UART_PADDR @ physical 36 ldr \rp, =LL_UART_PADDR @ physical
37 ldr \rv, =LL_UART_VADDR @ virtual 37 ldr \rv, =LL_UART_VADDR @ virtual
@@ -43,12 +43,14 @@
43 43
44 .macro waituart,rd,rx 44 .macro waituart,rd,rx
451001: ldr \rd, [\rx, #UART_SR_OFFSET] 451001: ldr \rd, [\rx, #UART_SR_OFFSET]
46ARM_BE8( rev \rd, \rd )
46 tst \rd, #UART_SR_TXEMPTY 47 tst \rd, #UART_SR_TXEMPTY
47 beq 1001b 48 beq 1001b
48 .endm 49 .endm
49 50
50 .macro busyuart,rd,rx 51 .macro busyuart,rd,rx
511002: ldr \rd, [\rx, #UART_SR_OFFSET] @ get status register 521002: ldr \rd, [\rx, #UART_SR_OFFSET] @ get status register
53ARM_BE8( rev \rd, \rd )
52 tst \rd, #UART_SR_TXFULL @ 54 tst \rd, #UART_SR_TXFULL @
53 bne 1002b @ wait if FIFO is full 55 bne 1002b @ wait if FIFO is full
54 .endm 56 .endm
diff --git a/arch/arm/include/uapi/asm/kvm.h b/arch/arm/include/uapi/asm/kvm.h
index ef0c8785ba16..e6ebdd3471e5 100644
--- a/arch/arm/include/uapi/asm/kvm.h
+++ b/arch/arm/include/uapi/asm/kvm.h
@@ -20,6 +20,7 @@
20#define __ARM_KVM_H__ 20#define __ARM_KVM_H__
21 21
22#include <linux/types.h> 22#include <linux/types.h>
23#include <linux/psci.h>
23#include <asm/ptrace.h> 24#include <asm/ptrace.h>
24 25
25#define __KVM_HAVE_GUEST_DEBUG 26#define __KVM_HAVE_GUEST_DEBUG
@@ -83,6 +84,7 @@ struct kvm_regs {
83#define KVM_VGIC_V2_CPU_SIZE 0x2000 84#define KVM_VGIC_V2_CPU_SIZE 0x2000
84 85
85#define KVM_ARM_VCPU_POWER_OFF 0 /* CPU is started in OFF state */ 86#define KVM_ARM_VCPU_POWER_OFF 0 /* CPU is started in OFF state */
87#define KVM_ARM_VCPU_PSCI_0_2 1 /* CPU uses PSCI v0.2 */
86 88
87struct kvm_vcpu_init { 89struct kvm_vcpu_init {
88 __u32 target; 90 __u32 target;
@@ -201,9 +203,9 @@ struct kvm_arch_memory_slot {
201#define KVM_PSCI_FN_CPU_ON KVM_PSCI_FN(2) 203#define KVM_PSCI_FN_CPU_ON KVM_PSCI_FN(2)
202#define KVM_PSCI_FN_MIGRATE KVM_PSCI_FN(3) 204#define KVM_PSCI_FN_MIGRATE KVM_PSCI_FN(3)
203 205
204#define KVM_PSCI_RET_SUCCESS 0 206#define KVM_PSCI_RET_SUCCESS PSCI_RET_SUCCESS
205#define KVM_PSCI_RET_NI ((unsigned long)-1) 207#define KVM_PSCI_RET_NI PSCI_RET_NOT_SUPPORTED
206#define KVM_PSCI_RET_INVAL ((unsigned long)-2) 208#define KVM_PSCI_RET_INVAL PSCI_RET_INVALID_PARAMS
207#define KVM_PSCI_RET_DENIED ((unsigned long)-3) 209#define KVM_PSCI_RET_DENIED PSCI_RET_DENIED
208 210
209#endif /* __ARM_KVM_H__ */ 211#endif /* __ARM_KVM_H__ */
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 040619c32d68..38ddd9f83d0e 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -39,6 +39,7 @@ obj-$(CONFIG_ARTHUR) += arthur.o
39obj-$(CONFIG_ISA_DMA) += dma-isa.o 39obj-$(CONFIG_ISA_DMA) += dma-isa.o
40obj-$(CONFIG_PCI) += bios32.o isa.o 40obj-$(CONFIG_PCI) += bios32.o isa.o
41obj-$(CONFIG_ARM_CPU_SUSPEND) += sleep.o suspend.o 41obj-$(CONFIG_ARM_CPU_SUSPEND) += sleep.o suspend.o
42obj-$(CONFIG_HIBERNATION) += hibernate.o
42obj-$(CONFIG_SMP) += smp.o 43obj-$(CONFIG_SMP) += smp.o
43ifdef CONFIG_MMU 44ifdef CONFIG_MMU
44obj-$(CONFIG_SMP) += smp_tlb.o 45obj-$(CONFIG_SMP) += smp_tlb.o
diff --git a/arch/arm/kernel/atags_parse.c b/arch/arm/kernel/atags_parse.c
index 8c14de8180c0..7807ef58a2ab 100644
--- a/arch/arm/kernel/atags_parse.c
+++ b/arch/arm/kernel/atags_parse.c
@@ -22,6 +22,7 @@
22#include <linux/fs.h> 22#include <linux/fs.h>
23#include <linux/root_dev.h> 23#include <linux/root_dev.h>
24#include <linux/screen_info.h> 24#include <linux/screen_info.h>
25#include <linux/memblock.h>
25 26
26#include <asm/setup.h> 27#include <asm/setup.h>
27#include <asm/system_info.h> 28#include <asm/system_info.h>
@@ -222,10 +223,10 @@ setup_machine_tags(phys_addr_t __atags_pointer, unsigned int machine_nr)
222 } 223 }
223 224
224 if (mdesc->fixup) 225 if (mdesc->fixup)
225 mdesc->fixup(tags, &from, &meminfo); 226 mdesc->fixup(tags, &from);
226 227
227 if (tags->hdr.tag == ATAG_CORE) { 228 if (tags->hdr.tag == ATAG_CORE) {
228 if (meminfo.nr_banks != 0) 229 if (memblock_phys_mem_size())
229 squash_mem_tags(tags); 230 squash_mem_tags(tags);
230 save_atags(tags); 231 save_atags(tags);
231 parse_tags(tags); 232 parse_tags(tags);
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index 16d43cd45619..17a26c17f7f5 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -545,6 +545,18 @@ void pci_common_init_dev(struct device *parent, struct hw_pci *hw)
545 */ 545 */
546 pci_bus_add_devices(bus); 546 pci_bus_add_devices(bus);
547 } 547 }
548
549 list_for_each_entry(sys, &head, node) {
550 struct pci_bus *bus = sys->bus;
551
552 /* Configure PCI Express settings */
553 if (bus && !pci_has_flag(PCI_PROBE_ONLY)) {
554 struct pci_bus *child;
555
556 list_for_each_entry(child, &bus->children, node)
557 pcie_bus_configure_settings(child);
558 }
559 }
548} 560}
549 561
550#ifndef CONFIG_PCI_HOST_ITE8152 562#ifndef CONFIG_PCI_HOST_ITE8152
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
index c7419a585ddc..e94a157ddff1 100644
--- a/arch/arm/kernel/devtree.c
+++ b/arch/arm/kernel/devtree.c
@@ -27,56 +27,23 @@
27#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
28#include <asm/mach-types.h> 28#include <asm/mach-types.h>
29 29
30void __init early_init_dt_add_memory_arch(u64 base, u64 size)
31{
32 arm_add_memory(base, size);
33}
34
35void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
36{
37 return memblock_virt_alloc(size, align);
38}
39
40void __init arm_dt_memblock_reserve(void)
41{
42 u64 *reserve_map, base, size;
43
44 if (!initial_boot_params)
45 return;
46 30
47 /* Reserve the dtb region */ 31#ifdef CONFIG_SMP
48 memblock_reserve(virt_to_phys(initial_boot_params), 32extern struct of_cpu_method __cpu_method_of_table[];
49 be32_to_cpu(initial_boot_params->totalsize));
50 33
51 /* 34static const struct of_cpu_method __cpu_method_of_table_sentinel
52 * Process the reserve map. This will probably overlap the initrd 35 __used __section(__cpu_method_of_table_end);
53 * and dtb locations which are already reserved, but overlaping
54 * doesn't hurt anything
55 */
56 reserve_map = ((void*)initial_boot_params) +
57 be32_to_cpu(initial_boot_params->off_mem_rsvmap);
58 while (1) {
59 base = be64_to_cpup(reserve_map++);
60 size = be64_to_cpup(reserve_map++);
61 if (!size)
62 break;
63 memblock_reserve(base, size);
64 }
65}
66 36
67#ifdef CONFIG_SMP
68extern struct of_cpu_method __cpu_method_of_table_begin[];
69extern struct of_cpu_method __cpu_method_of_table_end[];
70 37
71static int __init set_smp_ops_by_method(struct device_node *node) 38static int __init set_smp_ops_by_method(struct device_node *node)
72{ 39{
73 const char *method; 40 const char *method;
74 struct of_cpu_method *m = __cpu_method_of_table_begin; 41 struct of_cpu_method *m = __cpu_method_of_table;
75 42
76 if (of_property_read_string(node, "enable-method", &method)) 43 if (of_property_read_string(node, "enable-method", &method))
77 return 0; 44 return 0;
78 45
79 for (; m < __cpu_method_of_table_end; m++) 46 for (; m->method; m++)
80 if (!strcmp(m->method, method)) { 47 if (!strcmp(m->method, method)) {
81 smp_set_ops(m->ops); 48 smp_set_ops(m->ops);
82 return 1; 49 return 1;
@@ -252,7 +219,7 @@ const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)
252 219
253 if (!mdesc) { 220 if (!mdesc) {
254 const char *prop; 221 const char *prop;
255 long size; 222 int size;
256 unsigned long dt_root; 223 unsigned long dt_root;
257 224
258 early_print("\nError: unrecognized/unsupported " 225 early_print("\nError: unrecognized/unsupported "
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 1879e8dd2acc..52a949a8077d 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -344,7 +344,7 @@ ENDPROC(__pabt_svc)
344 @ 344 @
345 @ Enable the alignment trap while in kernel mode 345 @ Enable the alignment trap while in kernel mode
346 @ 346 @
347 alignment_trap r0 347 alignment_trap r0, .LCcralign
348 348
349 @ 349 @
350 @ Clear FP to mark the first stack frame 350 @ Clear FP to mark the first stack frame
@@ -413,6 +413,11 @@ __und_usr:
413 @ 413 @
414 adr r9, BSYM(ret_from_exception) 414 adr r9, BSYM(ret_from_exception)
415 415
416 @ IRQs must be enabled before attempting to read the instruction from
417 @ user space since that could cause a page/translation fault if the
418 @ page table was modified by another CPU.
419 enable_irq
420
416 tst r3, #PSR_T_BIT @ Thumb mode? 421 tst r3, #PSR_T_BIT @ Thumb mode?
417 bne __und_usr_thumb 422 bne __und_usr_thumb
418 sub r4, r2, #4 @ ARM instr at LR - 4 423 sub r4, r2, #4 @ ARM instr at LR - 4
@@ -484,7 +489,8 @@ ENDPROC(__und_usr)
484 */ 489 */
485 .pushsection .fixup, "ax" 490 .pushsection .fixup, "ax"
486 .align 2 491 .align 2
4874: mov pc, r9 4924: str r4, [sp, #S_PC] @ retry current instruction
493 mov pc, r9
488 .popsection 494 .popsection
489 .pushsection __ex_table,"a" 495 .pushsection __ex_table,"a"
490 .long 1b, 4b 496 .long 1b, 4b
@@ -517,7 +523,7 @@ ENDPROC(__und_usr)
517 * r9 = normal "successful" return address 523 * r9 = normal "successful" return address
518 * r10 = this threads thread_info structure 524 * r10 = this threads thread_info structure
519 * lr = unrecognised instruction return address 525 * lr = unrecognised instruction return address
520 * IRQs disabled, FIQs enabled. 526 * IRQs enabled, FIQs enabled.
521 */ 527 */
522 @ 528 @
523 @ Fall-through from Thumb-2 __und_usr 529 @ Fall-through from Thumb-2 __und_usr
@@ -624,7 +630,6 @@ call_fpe:
624#endif 630#endif
625 631
626do_fpe: 632do_fpe:
627 enable_irq
628 ldr r4, .LCfp 633 ldr r4, .LCfp
629 add r10, r10, #TI_FPSTATE @ r10 = workspace 634 add r10, r10, #TI_FPSTATE @ r10 = workspace
630 ldr pc, [r4] @ Call FP module USR entry point 635 ldr pc, [r4] @ Call FP module USR entry point
@@ -652,8 +657,7 @@ __und_usr_fault_32:
652 b 1f 657 b 1f
653__und_usr_fault_16: 658__und_usr_fault_16:
654 mov r1, #2 659 mov r1, #2
6551: enable_irq 6601: mov r0, sp
656 mov r0, sp
657 adr lr, BSYM(ret_from_exception) 661 adr lr, BSYM(ret_from_exception)
658 b __und_fault 662 b __und_fault
659ENDPROC(__und_usr_fault_32) 663ENDPROC(__und_usr_fault_32)
@@ -1143,11 +1147,8 @@ __vectors_start:
1143 .data 1147 .data
1144 1148
1145 .globl cr_alignment 1149 .globl cr_alignment
1146 .globl cr_no_alignment
1147cr_alignment: 1150cr_alignment:
1148 .space 4 1151 .space 4
1149cr_no_alignment:
1150 .space 4
1151 1152
1152#ifdef CONFIG_MULTI_IRQ_HANDLER 1153#ifdef CONFIG_MULTI_IRQ_HANDLER
1153 .globl handle_arch_irq 1154 .globl handle_arch_irq
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index a2dcafdf1bc8..7139d4a7dea7 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -365,13 +365,7 @@ ENTRY(vector_swi)
365 str r0, [sp, #S_OLD_R0] @ Save OLD_R0 365 str r0, [sp, #S_OLD_R0] @ Save OLD_R0
366#endif 366#endif
367 zero_fp 367 zero_fp
368 368 alignment_trap ip, __cr_alignment
369#ifdef CONFIG_ALIGNMENT_TRAP
370 ldr ip, __cr_alignment
371 ldr ip, [ip]
372 mcr p15, 0, ip, c1, c0 @ update control register
373#endif
374
375 enable_irq 369 enable_irq
376 ct_user_exit 370 ct_user_exit
377 get_thread_info tsk 371 get_thread_info tsk
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
index 1420725142ca..5d702f8900b1 100644
--- a/arch/arm/kernel/entry-header.S
+++ b/arch/arm/kernel/entry-header.S
@@ -37,9 +37,9 @@
37#endif 37#endif
38 .endm 38 .endm
39 39
40 .macro alignment_trap, rtemp 40 .macro alignment_trap, rtemp, label
41#ifdef CONFIG_ALIGNMENT_TRAP 41#ifdef CONFIG_ALIGNMENT_TRAP
42 ldr \rtemp, .LCcralign 42 ldr \rtemp, \label
43 ldr \rtemp, [\rtemp] 43 ldr \rtemp, [\rtemp]
44 mcr p15, 0, \rtemp, c1, c0 44 mcr p15, 0, \rtemp, c1, c0
45#endif 45#endif
@@ -132,6 +132,10 @@
132 orrne r5, V7M_xPSR_FRAMEPTRALIGN 132 orrne r5, V7M_xPSR_FRAMEPTRALIGN
133 biceq r5, V7M_xPSR_FRAMEPTRALIGN 133 biceq r5, V7M_xPSR_FRAMEPTRALIGN
134 134
135 @ ensure bit 0 is cleared in the PC, otherwise behaviour is
136 @ unpredictable
137 bic r4, #1
138
135 @ write basic exception frame 139 @ write basic exception frame
136 stmdb r2!, {r1, r3-r5} 140 stmdb r2!, {r1, r3-r5}
137 ldmia sp, {r1, r3-r5} 141 ldmia sp, {r1, r3-r5}
diff --git a/arch/arm/kernel/ftrace.c b/arch/arm/kernel/ftrace.c
index c108ddcb9ba4..af9a8a927a4e 100644
--- a/arch/arm/kernel/ftrace.c
+++ b/arch/arm/kernel/ftrace.c
@@ -14,6 +14,7 @@
14 14
15#include <linux/ftrace.h> 15#include <linux/ftrace.h>
16#include <linux/uaccess.h> 16#include <linux/uaccess.h>
17#include <linux/module.h>
17 18
18#include <asm/cacheflush.h> 19#include <asm/cacheflush.h>
19#include <asm/opcodes.h> 20#include <asm/opcodes.h>
@@ -63,6 +64,18 @@ static unsigned long adjust_address(struct dyn_ftrace *rec, unsigned long addr)
63} 64}
64#endif 65#endif
65 66
67int ftrace_arch_code_modify_prepare(void)
68{
69 set_all_modules_text_rw();
70 return 0;
71}
72
73int ftrace_arch_code_modify_post_process(void)
74{
75 set_all_modules_text_ro();
76 return 0;
77}
78
66static unsigned long ftrace_call_replace(unsigned long pc, unsigned long addr) 79static unsigned long ftrace_call_replace(unsigned long pc, unsigned long addr)
67{ 80{
68 return arm_gen_branch_link(pc, addr); 81 return arm_gen_branch_link(pc, addr);
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S
index c96ecacb2021..572a38335c96 100644
--- a/arch/arm/kernel/head-common.S
+++ b/arch/arm/kernel/head-common.S
@@ -99,8 +99,7 @@ __mmap_switched:
99 str r1, [r5] @ Save machine type 99 str r1, [r5] @ Save machine type
100 str r2, [r6] @ Save atags pointer 100 str r2, [r6] @ Save atags pointer
101 cmp r7, #0 101 cmp r7, #0
102 bicne r4, r0, #CR_A @ Clear 'A' bit 102 strne r0, [r7] @ Save control register values
103 stmneia r7, {r0, r4} @ Save control register values
104 b start_kernel 103 b start_kernel
105ENDPROC(__mmap_switched) 104ENDPROC(__mmap_switched)
106 105
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 591d6e4a6492..2c35f0ff2fdc 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -475,7 +475,7 @@ ENDPROC(__turn_mmu_on)
475 475
476 476
477#ifdef CONFIG_SMP_ON_UP 477#ifdef CONFIG_SMP_ON_UP
478 __INIT 478 __HEAD
479__fixup_smp: 479__fixup_smp:
480 and r3, r9, #0x000f0000 @ architecture version 480 and r3, r9, #0x000f0000 @ architecture version
481 teq r3, #0x000f0000 @ CPU ID supported? 481 teq r3, #0x000f0000 @ CPU ID supported?
diff --git a/arch/arm/kernel/hibernate.c b/arch/arm/kernel/hibernate.c
new file mode 100644
index 000000000000..bb8b79648643
--- /dev/null
+++ b/arch/arm/kernel/hibernate.c
@@ -0,0 +1,107 @@
1/*
2 * Hibernation support specific for ARM
3 *
4 * Derived from work on ARM hibernation support by:
5 *
6 * Ubuntu project, hibernation support for mach-dove
7 * Copyright (C) 2010 Nokia Corporation (Hiroshi Doyu)
8 * Copyright (C) 2010 Texas Instruments, Inc. (Teerth Reddy et al.)
9 * https://lkml.org/lkml/2010/6/18/4
10 * https://lists.linux-foundation.org/pipermail/linux-pm/2010-June/027422.html
11 * https://patchwork.kernel.org/patch/96442/
12 *
13 * Copyright (C) 2006 Rafael J. Wysocki <rjw@sisk.pl>
14 *
15 * License terms: GNU General Public License (GPL) version 2
16 */
17
18#include <linux/mm.h>
19#include <linux/suspend.h>
20#include <asm/system_misc.h>
21#include <asm/idmap.h>
22#include <asm/suspend.h>
23#include <asm/memory.h>
24
25extern const void __nosave_begin, __nosave_end;
26
27int pfn_is_nosave(unsigned long pfn)
28{
29 unsigned long nosave_begin_pfn = virt_to_pfn(&__nosave_begin);
30 unsigned long nosave_end_pfn = virt_to_pfn(&__nosave_end - 1);
31
32 return (pfn >= nosave_begin_pfn) && (pfn <= nosave_end_pfn);
33}
34
35void notrace save_processor_state(void)
36{
37 WARN_ON(num_online_cpus() != 1);
38 local_fiq_disable();
39}
40
41void notrace restore_processor_state(void)
42{
43 local_fiq_enable();
44}
45
46/*
47 * Snapshot kernel memory and reset the system.
48 *
49 * swsusp_save() is executed in the suspend finisher so that the CPU
50 * context pointer and memory are part of the saved image, which is
51 * required by the resume kernel image to restart execution from
52 * swsusp_arch_suspend().
53 *
54 * soft_restart is not technically needed, but is used to get success
55 * returned from cpu_suspend.
56 *
57 * When soft reboot completes, the hibernation snapshot is written out.
58 */
59static int notrace arch_save_image(unsigned long unused)
60{
61 int ret;
62
63 ret = swsusp_save();
64 if (ret == 0)
65 soft_restart(virt_to_phys(cpu_resume));
66 return ret;
67}
68
69/*
70 * Save the current CPU state before suspend / poweroff.
71 */
72int notrace swsusp_arch_suspend(void)
73{
74 return cpu_suspend(0, arch_save_image);
75}
76
77/*
78 * Restore page contents for physical pages that were in use during loading
79 * hibernation image. Switch to idmap_pgd so the physical page tables
80 * are overwritten with the same contents.
81 */
82static void notrace arch_restore_image(void *unused)
83{
84 struct pbe *pbe;
85
86 cpu_switch_mm(idmap_pgd, &init_mm);
87 for (pbe = restore_pblist; pbe; pbe = pbe->next)
88 copy_page(pbe->orig_address, pbe->address);
89
90 soft_restart(virt_to_phys(cpu_resume));
91}
92
93static u64 resume_stack[PAGE_SIZE/2/sizeof(u64)] __nosavedata;
94
95/*
96 * Resume from the hibernation image.
97 * Due to the kernel heap / data restore, stack contents change underneath
98 * and that would make function calls impossible; switch to a temporary
99 * stack within the nosave region to avoid that problem.
100 */
101int swsusp_arch_resume(void)
102{
103 extern void call_with_stack(void (*fn)(void *), void *arg, void *sp);
104 call_with_stack(arch_restore_image, 0,
105 resume_stack + ARRAY_SIZE(resume_stack));
106 return 0;
107}
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index 9723d17b8f38..2c4257604513 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -37,6 +37,7 @@
37#include <linux/proc_fs.h> 37#include <linux/proc_fs.h>
38#include <linux/export.h> 38#include <linux/export.h>
39 39
40#include <asm/hardware/cache-l2x0.h>
40#include <asm/exception.h> 41#include <asm/exception.h>
41#include <asm/mach/arch.h> 42#include <asm/mach/arch.h>
42#include <asm/mach/irq.h> 43#include <asm/mach/irq.h>
@@ -115,10 +116,21 @@ EXPORT_SYMBOL_GPL(set_irq_flags);
115 116
116void __init init_IRQ(void) 117void __init init_IRQ(void)
117{ 118{
119 int ret;
120
118 if (IS_ENABLED(CONFIG_OF) && !machine_desc->init_irq) 121 if (IS_ENABLED(CONFIG_OF) && !machine_desc->init_irq)
119 irqchip_init(); 122 irqchip_init();
120 else 123 else
121 machine_desc->init_irq(); 124 machine_desc->init_irq();
125
126 if (IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_CACHE_L2X0) &&
127 (machine_desc->l2c_aux_mask || machine_desc->l2c_aux_val)) {
128 outer_cache.write_sec = machine_desc->l2c_write_sec;
129 ret = l2x0_of_init(machine_desc->l2c_aux_val,
130 machine_desc->l2c_aux_mask);
131 if (ret)
132 pr_err("L2C: failed to init: %d\n", ret);
133 }
122} 134}
123 135
124#ifdef CONFIG_MULTI_IRQ_HANDLER 136#ifdef CONFIG_MULTI_IRQ_HANDLER
diff --git a/arch/arm/kernel/isa.c b/arch/arm/kernel/isa.c
index 346485910732..9d1cf7156895 100644
--- a/arch/arm/kernel/isa.c
+++ b/arch/arm/kernel/isa.c
@@ -20,7 +20,7 @@
20 20
21static unsigned int isa_membase, isa_portbase, isa_portshift; 21static unsigned int isa_membase, isa_portbase, isa_portshift;
22 22
23static ctl_table ctl_isa_vars[4] = { 23static struct ctl_table ctl_isa_vars[4] = {
24 { 24 {
25 .procname = "membase", 25 .procname = "membase",
26 .data = &isa_membase, 26 .data = &isa_membase,
@@ -44,7 +44,7 @@ static ctl_table ctl_isa_vars[4] = {
44 44
45static struct ctl_table_header *isa_sysctl_header; 45static struct ctl_table_header *isa_sysctl_header;
46 46
47static ctl_table ctl_isa[2] = { 47static struct ctl_table ctl_isa[2] = {
48 { 48 {
49 .procname = "isa", 49 .procname = "isa",
50 .mode = 0555, 50 .mode = 0555,
@@ -52,7 +52,7 @@ static ctl_table ctl_isa[2] = {
52 }, {} 52 }, {}
53}; 53};
54 54
55static ctl_table ctl_bus[2] = { 55static struct ctl_table ctl_bus[2] = {
56 { 56 {
57 .procname = "bus", 57 .procname = "bus",
58 .mode = 0555, 58 .mode = 0555,
diff --git a/arch/arm/kernel/iwmmxt.S b/arch/arm/kernel/iwmmxt.S
index 2452dd1bef53..a5599cfc43cb 100644
--- a/arch/arm/kernel/iwmmxt.S
+++ b/arch/arm/kernel/iwmmxt.S
@@ -18,6 +18,7 @@
18#include <asm/ptrace.h> 18#include <asm/ptrace.h>
19#include <asm/thread_info.h> 19#include <asm/thread_info.h>
20#include <asm/asm-offsets.h> 20#include <asm/asm-offsets.h>
21#include <asm/assembler.h>
21 22
22#if defined(CONFIG_CPU_PJ4) || defined(CONFIG_CPU_PJ4B) 23#if defined(CONFIG_CPU_PJ4) || defined(CONFIG_CPU_PJ4B)
23#define PJ4(code...) code 24#define PJ4(code...) code
@@ -65,17 +66,18 @@
65 * r9 = ret_from_exception 66 * r9 = ret_from_exception
66 * lr = undefined instr exit 67 * lr = undefined instr exit
67 * 68 *
68 * called from prefetch exception handler with interrupts disabled 69 * called from prefetch exception handler with interrupts enabled
69 */ 70 */
70 71
71ENTRY(iwmmxt_task_enable) 72ENTRY(iwmmxt_task_enable)
73 inc_preempt_count r10, r3
72 74
73 XSC(mrc p15, 0, r2, c15, c1, 0) 75 XSC(mrc p15, 0, r2, c15, c1, 0)
74 PJ4(mrc p15, 0, r2, c1, c0, 2) 76 PJ4(mrc p15, 0, r2, c1, c0, 2)
75 @ CP0 and CP1 accessible? 77 @ CP0 and CP1 accessible?
76 XSC(tst r2, #0x3) 78 XSC(tst r2, #0x3)
77 PJ4(tst r2, #0xf) 79 PJ4(tst r2, #0xf)
78 movne pc, lr @ if so no business here 80 bne 4f @ if so no business here
79 @ enable access to CP0 and CP1 81 @ enable access to CP0 and CP1
80 XSC(orr r2, r2, #0x3) 82 XSC(orr r2, r2, #0x3)
81 XSC(mcr p15, 0, r2, c15, c1, 0) 83 XSC(mcr p15, 0, r2, c15, c1, 0)
@@ -136,7 +138,7 @@ concan_dump:
136 wstrd wR15, [r1, #MMX_WR15] 138 wstrd wR15, [r1, #MMX_WR15]
137 139
1382: teq r0, #0 @ anything to load? 1402: teq r0, #0 @ anything to load?
139 moveq pc, lr 141 beq 3f
140 142
141concan_load: 143concan_load:
142 144
@@ -169,8 +171,14 @@ concan_load:
169 @ clear CUP/MUP (only if r1 != 0) 171 @ clear CUP/MUP (only if r1 != 0)
170 teq r1, #0 172 teq r1, #0
171 mov r2, #0 173 mov r2, #0
172 moveq pc, lr 174 beq 3f
173 tmcr wCon, r2 175 tmcr wCon, r2
176
1773:
178#ifdef CONFIG_PREEMPT_COUNT
179 get_thread_info r10
180#endif
1814: dec_preempt_count r10, r3
174 mov pc, lr 182 mov pc, lr
175 183
176/* 184/*
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c
index 51798d7854ac..a71ae1523620 100644
--- a/arch/arm/kernel/perf_event_cpu.c
+++ b/arch/arm/kernel/perf_event_cpu.c
@@ -221,6 +221,7 @@ static struct notifier_block cpu_pmu_hotplug_notifier = {
221 * PMU platform driver and devicetree bindings. 221 * PMU platform driver and devicetree bindings.
222 */ 222 */
223static struct of_device_id cpu_pmu_of_device_ids[] = { 223static struct of_device_id cpu_pmu_of_device_ids[] = {
224 {.compatible = "arm,cortex-a17-pmu", .data = armv7_a17_pmu_init},
224 {.compatible = "arm,cortex-a15-pmu", .data = armv7_a15_pmu_init}, 225 {.compatible = "arm,cortex-a15-pmu", .data = armv7_a15_pmu_init},
225 {.compatible = "arm,cortex-a12-pmu", .data = armv7_a12_pmu_init}, 226 {.compatible = "arm,cortex-a12-pmu", .data = armv7_a12_pmu_init},
226 {.compatible = "arm,cortex-a9-pmu", .data = armv7_a9_pmu_init}, 227 {.compatible = "arm,cortex-a9-pmu", .data = armv7_a9_pmu_init},
diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c
index f4ef3981ed02..2037f7205987 100644
--- a/arch/arm/kernel/perf_event_v7.c
+++ b/arch/arm/kernel/perf_event_v7.c
@@ -1599,6 +1599,13 @@ static int armv7_a12_pmu_init(struct arm_pmu *cpu_pmu)
1599 return 0; 1599 return 0;
1600} 1600}
1601 1601
1602static int armv7_a17_pmu_init(struct arm_pmu *cpu_pmu)
1603{
1604 armv7_a12_pmu_init(cpu_pmu);
1605 cpu_pmu->name = "ARMv7 Cortex-A17";
1606 return 0;
1607}
1608
1602/* 1609/*
1603 * Krait Performance Monitor Region Event Selection Register (PMRESRn) 1610 * Krait Performance Monitor Region Event Selection Register (PMRESRn)
1604 * 1611 *
@@ -2021,6 +2028,11 @@ static inline int armv7_a12_pmu_init(struct arm_pmu *cpu_pmu)
2021 return -ENODEV; 2028 return -ENODEV;
2022} 2029}
2023 2030
2031static inline int armv7_a17_pmu_init(struct arm_pmu *cpu_pmu)
2032{
2033 return -ENODEV;
2034}
2035
2024static inline int krait_pmu_init(struct arm_pmu *cpu_pmu) 2036static inline int krait_pmu_init(struct arm_pmu *cpu_pmu)
2025{ 2037{
2026 return -ENODEV; 2038 return -ENODEV;
diff --git a/arch/arm/kernel/psci.c b/arch/arm/kernel/psci.c
index 46931880093d..f73891b6b730 100644
--- a/arch/arm/kernel/psci.c
+++ b/arch/arm/kernel/psci.c
@@ -17,63 +17,58 @@
17 17
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/of.h> 19#include <linux/of.h>
20#include <linux/reboot.h>
21#include <linux/pm.h>
22#include <uapi/linux/psci.h>
20 23
21#include <asm/compiler.h> 24#include <asm/compiler.h>
22#include <asm/errno.h> 25#include <asm/errno.h>
23#include <asm/opcodes-sec.h> 26#include <asm/opcodes-sec.h>
24#include <asm/opcodes-virt.h> 27#include <asm/opcodes-virt.h>
25#include <asm/psci.h> 28#include <asm/psci.h>
29#include <asm/system_misc.h>
26 30
27struct psci_operations psci_ops; 31struct psci_operations psci_ops;
28 32
29static int (*invoke_psci_fn)(u32, u32, u32, u32); 33static int (*invoke_psci_fn)(u32, u32, u32, u32);
34typedef int (*psci_initcall_t)(const struct device_node *);
30 35
31enum psci_function { 36enum psci_function {
32 PSCI_FN_CPU_SUSPEND, 37 PSCI_FN_CPU_SUSPEND,
33 PSCI_FN_CPU_ON, 38 PSCI_FN_CPU_ON,
34 PSCI_FN_CPU_OFF, 39 PSCI_FN_CPU_OFF,
35 PSCI_FN_MIGRATE, 40 PSCI_FN_MIGRATE,
41 PSCI_FN_AFFINITY_INFO,
42 PSCI_FN_MIGRATE_INFO_TYPE,
36 PSCI_FN_MAX, 43 PSCI_FN_MAX,
37}; 44};
38 45
39static u32 psci_function_id[PSCI_FN_MAX]; 46static u32 psci_function_id[PSCI_FN_MAX];
40 47
41#define PSCI_RET_SUCCESS 0
42#define PSCI_RET_EOPNOTSUPP -1
43#define PSCI_RET_EINVAL -2
44#define PSCI_RET_EPERM -3
45
46static int psci_to_linux_errno(int errno) 48static int psci_to_linux_errno(int errno)
47{ 49{
48 switch (errno) { 50 switch (errno) {
49 case PSCI_RET_SUCCESS: 51 case PSCI_RET_SUCCESS:
50 return 0; 52 return 0;
51 case PSCI_RET_EOPNOTSUPP: 53 case PSCI_RET_NOT_SUPPORTED:
52 return -EOPNOTSUPP; 54 return -EOPNOTSUPP;
53 case PSCI_RET_EINVAL: 55 case PSCI_RET_INVALID_PARAMS:
54 return -EINVAL; 56 return -EINVAL;
55 case PSCI_RET_EPERM: 57 case PSCI_RET_DENIED:
56 return -EPERM; 58 return -EPERM;
57 }; 59 };
58 60
59 return -EINVAL; 61 return -EINVAL;
60} 62}
61 63
62#define PSCI_POWER_STATE_ID_MASK 0xffff
63#define PSCI_POWER_STATE_ID_SHIFT 0
64#define PSCI_POWER_STATE_TYPE_MASK 0x1
65#define PSCI_POWER_STATE_TYPE_SHIFT 16
66#define PSCI_POWER_STATE_AFFL_MASK 0x3
67#define PSCI_POWER_STATE_AFFL_SHIFT 24
68
69static u32 psci_power_state_pack(struct psci_power_state state) 64static u32 psci_power_state_pack(struct psci_power_state state)
70{ 65{
71 return ((state.id & PSCI_POWER_STATE_ID_MASK) 66 return ((state.id << PSCI_0_2_POWER_STATE_ID_SHIFT)
72 << PSCI_POWER_STATE_ID_SHIFT) | 67 & PSCI_0_2_POWER_STATE_ID_MASK) |
73 ((state.type & PSCI_POWER_STATE_TYPE_MASK) 68 ((state.type << PSCI_0_2_POWER_STATE_TYPE_SHIFT)
74 << PSCI_POWER_STATE_TYPE_SHIFT) | 69 & PSCI_0_2_POWER_STATE_TYPE_MASK) |
75 ((state.affinity_level & PSCI_POWER_STATE_AFFL_MASK) 70 ((state.affinity_level << PSCI_0_2_POWER_STATE_AFFL_SHIFT)
76 << PSCI_POWER_STATE_AFFL_SHIFT); 71 & PSCI_0_2_POWER_STATE_AFFL_MASK);
77} 72}
78 73
79/* 74/*
@@ -110,6 +105,14 @@ static noinline int __invoke_psci_fn_smc(u32 function_id, u32 arg0, u32 arg1,
110 return function_id; 105 return function_id;
111} 106}
112 107
108static int psci_get_version(void)
109{
110 int err;
111
112 err = invoke_psci_fn(PSCI_0_2_FN_PSCI_VERSION, 0, 0, 0);
113 return err;
114}
115
113static int psci_cpu_suspend(struct psci_power_state state, 116static int psci_cpu_suspend(struct psci_power_state state,
114 unsigned long entry_point) 117 unsigned long entry_point)
115{ 118{
@@ -153,26 +156,36 @@ static int psci_migrate(unsigned long cpuid)
153 return psci_to_linux_errno(err); 156 return psci_to_linux_errno(err);
154} 157}
155 158
156static const struct of_device_id psci_of_match[] __initconst = { 159static int psci_affinity_info(unsigned long target_affinity,
157 { .compatible = "arm,psci", }, 160 unsigned long lowest_affinity_level)
158 {}, 161{
159}; 162 int err;
163 u32 fn;
164
165 fn = psci_function_id[PSCI_FN_AFFINITY_INFO];
166 err = invoke_psci_fn(fn, target_affinity, lowest_affinity_level, 0);
167 return err;
168}
160 169
161void __init psci_init(void) 170static int psci_migrate_info_type(void)
162{ 171{
163 struct device_node *np; 172 int err;
164 const char *method; 173 u32 fn;
165 u32 id;
166 174
167 np = of_find_matching_node(NULL, psci_of_match); 175 fn = psci_function_id[PSCI_FN_MIGRATE_INFO_TYPE];
168 if (!np) 176 err = invoke_psci_fn(fn, 0, 0, 0);
169 return; 177 return err;
178}
179
180static int get_set_conduit_method(struct device_node *np)
181{
182 const char *method;
170 183
171 pr_info("probing function IDs from device-tree\n"); 184 pr_info("probing for conduit method from DT.\n");
172 185
173 if (of_property_read_string(np, "method", &method)) { 186 if (of_property_read_string(np, "method", &method)) {
174 pr_warning("missing \"method\" property\n"); 187 pr_warn("missing \"method\" property\n");
175 goto out_put_node; 188 return -ENXIO;
176 } 189 }
177 190
178 if (!strcmp("hvc", method)) { 191 if (!strcmp("hvc", method)) {
@@ -180,10 +193,99 @@ void __init psci_init(void)
180 } else if (!strcmp("smc", method)) { 193 } else if (!strcmp("smc", method)) {
181 invoke_psci_fn = __invoke_psci_fn_smc; 194 invoke_psci_fn = __invoke_psci_fn_smc;
182 } else { 195 } else {
183 pr_warning("invalid \"method\" property: %s\n", method); 196 pr_warn("invalid \"method\" property: %s\n", method);
197 return -EINVAL;
198 }
199 return 0;
200}
201
202static void psci_sys_reset(enum reboot_mode reboot_mode, const char *cmd)
203{
204 invoke_psci_fn(PSCI_0_2_FN_SYSTEM_RESET, 0, 0, 0);
205}
206
207static void psci_sys_poweroff(void)
208{
209 invoke_psci_fn(PSCI_0_2_FN_SYSTEM_OFF, 0, 0, 0);
210}
211
212/*
213 * PSCI Function IDs for v0.2+ are well defined so use
214 * standard values.
215 */
216static int psci_0_2_init(struct device_node *np)
217{
218 int err, ver;
219
220 err = get_set_conduit_method(np);
221
222 if (err)
223 goto out_put_node;
224
225 ver = psci_get_version();
226
227 if (ver == PSCI_RET_NOT_SUPPORTED) {
228 /* PSCI v0.2 mandates implementation of PSCI_ID_VERSION. */
229 pr_err("PSCI firmware does not comply with the v0.2 spec.\n");
230 err = -EOPNOTSUPP;
184 goto out_put_node; 231 goto out_put_node;
232 } else {
233 pr_info("PSCIv%d.%d detected in firmware.\n",
234 PSCI_VERSION_MAJOR(ver),
235 PSCI_VERSION_MINOR(ver));
236
237 if (PSCI_VERSION_MAJOR(ver) == 0 &&
238 PSCI_VERSION_MINOR(ver) < 2) {
239 err = -EINVAL;
240 pr_err("Conflicting PSCI version detected.\n");
241 goto out_put_node;
242 }
185 } 243 }
186 244
245 pr_info("Using standard PSCI v0.2 function IDs\n");
246 psci_function_id[PSCI_FN_CPU_SUSPEND] = PSCI_0_2_FN_CPU_SUSPEND;
247 psci_ops.cpu_suspend = psci_cpu_suspend;
248
249 psci_function_id[PSCI_FN_CPU_OFF] = PSCI_0_2_FN_CPU_OFF;
250 psci_ops.cpu_off = psci_cpu_off;
251
252 psci_function_id[PSCI_FN_CPU_ON] = PSCI_0_2_FN_CPU_ON;
253 psci_ops.cpu_on = psci_cpu_on;
254
255 psci_function_id[PSCI_FN_MIGRATE] = PSCI_0_2_FN_MIGRATE;
256 psci_ops.migrate = psci_migrate;
257
258 psci_function_id[PSCI_FN_AFFINITY_INFO] = PSCI_0_2_FN_AFFINITY_INFO;
259 psci_ops.affinity_info = psci_affinity_info;
260
261 psci_function_id[PSCI_FN_MIGRATE_INFO_TYPE] =
262 PSCI_0_2_FN_MIGRATE_INFO_TYPE;
263 psci_ops.migrate_info_type = psci_migrate_info_type;
264
265 arm_pm_restart = psci_sys_reset;
266
267 pm_power_off = psci_sys_poweroff;
268
269out_put_node:
270 of_node_put(np);
271 return err;
272}
273
274/*
275 * PSCI < v0.2 get PSCI Function IDs via DT.
276 */
277static int psci_0_1_init(struct device_node *np)
278{
279 u32 id;
280 int err;
281
282 err = get_set_conduit_method(np);
283
284 if (err)
285 goto out_put_node;
286
287 pr_info("Using PSCI v0.1 Function IDs from DT\n");
288
187 if (!of_property_read_u32(np, "cpu_suspend", &id)) { 289 if (!of_property_read_u32(np, "cpu_suspend", &id)) {
188 psci_function_id[PSCI_FN_CPU_SUSPEND] = id; 290 psci_function_id[PSCI_FN_CPU_SUSPEND] = id;
189 psci_ops.cpu_suspend = psci_cpu_suspend; 291 psci_ops.cpu_suspend = psci_cpu_suspend;
@@ -206,5 +308,25 @@ void __init psci_init(void)
206 308
207out_put_node: 309out_put_node:
208 of_node_put(np); 310 of_node_put(np);
209 return; 311 return err;
312}
313
314static const struct of_device_id psci_of_match[] __initconst = {
315 { .compatible = "arm,psci", .data = psci_0_1_init},
316 { .compatible = "arm,psci-0.2", .data = psci_0_2_init},
317 {},
318};
319
320int __init psci_init(void)
321{
322 struct device_node *np;
323 const struct of_device_id *matched_np;
324 psci_initcall_t init_fn;
325
326 np = of_find_matching_node_and_match(NULL, psci_of_match, &matched_np);
327 if (!np)
328 return -ENODEV;
329
330 init_fn = (psci_initcall_t)matched_np->data;
331 return init_fn(np);
210} 332}
diff --git a/arch/arm/kernel/psci_smp.c b/arch/arm/kernel/psci_smp.c
index 570a48cc3d64..28a1db4da704 100644
--- a/arch/arm/kernel/psci_smp.c
+++ b/arch/arm/kernel/psci_smp.c
@@ -16,6 +16,8 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/smp.h> 17#include <linux/smp.h>
18#include <linux/of.h> 18#include <linux/of.h>
19#include <linux/delay.h>
20#include <uapi/linux/psci.h>
19 21
20#include <asm/psci.h> 22#include <asm/psci.h>
21#include <asm/smp_plat.h> 23#include <asm/smp_plat.h>
@@ -66,6 +68,36 @@ void __ref psci_cpu_die(unsigned int cpu)
66 /* We should never return */ 68 /* We should never return */
67 panic("psci: cpu %d failed to shutdown\n", cpu); 69 panic("psci: cpu %d failed to shutdown\n", cpu);
68} 70}
71
72int __ref psci_cpu_kill(unsigned int cpu)
73{
74 int err, i;
75
76 if (!psci_ops.affinity_info)
77 return 1;
78 /*
79 * cpu_kill could race with cpu_die and we can
80 * potentially end up declaring this cpu undead
81 * while it is dying. So, try again a few times.
82 */
83
84 for (i = 0; i < 10; i++) {
85 err = psci_ops.affinity_info(cpu_logical_map(cpu), 0);
86 if (err == PSCI_0_2_AFFINITY_LEVEL_OFF) {
87 pr_info("CPU%d killed.\n", cpu);
88 return 1;
89 }
90
91 msleep(10);
92 pr_info("Retrying again to check for CPU kill\n");
93 }
94
95 pr_warn("CPU%d may not have shut down cleanly (AFFINITY_INFO reports %d)\n",
96 cpu, err);
97 /* Make platform_cpu_kill() fail. */
98 return 0;
99}
100
69#endif 101#endif
70 102
71bool __init psci_smp_available(void) 103bool __init psci_smp_available(void)
@@ -78,5 +110,6 @@ struct smp_operations __initdata psci_smp_ops = {
78 .smp_boot_secondary = psci_boot_secondary, 110 .smp_boot_secondary = psci_boot_secondary,
79#ifdef CONFIG_HOTPLUG_CPU 111#ifdef CONFIG_HOTPLUG_CPU
80 .cpu_die = psci_cpu_die, 112 .cpu_die = psci_cpu_die,
113 .cpu_kill = psci_cpu_kill,
81#endif 114#endif
82}; 115};
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 50e198c1e9c8..8a16ee5d8a95 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -72,6 +72,7 @@ static int __init fpe_setup(char *line)
72__setup("fpe=", fpe_setup); 72__setup("fpe=", fpe_setup);
73#endif 73#endif
74 74
75extern void init_default_cache_policy(unsigned long);
75extern void paging_init(const struct machine_desc *desc); 76extern void paging_init(const struct machine_desc *desc);
76extern void early_paging_init(const struct machine_desc *, 77extern void early_paging_init(const struct machine_desc *,
77 struct proc_info_list *); 78 struct proc_info_list *);
@@ -590,7 +591,7 @@ static void __init setup_processor(void)
590 591
591 pr_info("CPU: %s [%08x] revision %d (ARMv%s), cr=%08lx\n", 592 pr_info("CPU: %s [%08x] revision %d (ARMv%s), cr=%08lx\n",
592 cpu_name, read_cpuid_id(), read_cpuid_id() & 15, 593 cpu_name, read_cpuid_id(), read_cpuid_id() & 15,
593 proc_arch[cpu_architecture()], cr_alignment); 594 proc_arch[cpu_architecture()], get_cr());
594 595
595 snprintf(init_utsname()->machine, __NEW_UTS_LEN + 1, "%s%c", 596 snprintf(init_utsname()->machine, __NEW_UTS_LEN + 1, "%s%c",
596 list->arch_name, ENDIANNESS); 597 list->arch_name, ENDIANNESS);
@@ -603,7 +604,9 @@ static void __init setup_processor(void)
603#ifndef CONFIG_ARM_THUMB 604#ifndef CONFIG_ARM_THUMB
604 elf_hwcap &= ~(HWCAP_THUMB | HWCAP_IDIVT); 605 elf_hwcap &= ~(HWCAP_THUMB | HWCAP_IDIVT);
605#endif 606#endif
606 607#ifdef CONFIG_MMU
608 init_default_cache_policy(list->__cpu_mm_mmu_flags);
609#endif
607 erratum_a15_798181_init(); 610 erratum_a15_798181_init();
608 611
609 feat_v6_fixup(); 612 feat_v6_fixup();
@@ -628,15 +631,8 @@ void __init dump_machine_table(void)
628 631
629int __init arm_add_memory(u64 start, u64 size) 632int __init arm_add_memory(u64 start, u64 size)
630{ 633{
631 struct membank *bank = &meminfo.bank[meminfo.nr_banks];
632 u64 aligned_start; 634 u64 aligned_start;
633 635
634 if (meminfo.nr_banks >= NR_BANKS) {
635 pr_crit("NR_BANKS too low, ignoring memory at 0x%08llx\n",
636 (long long)start);
637 return -EINVAL;
638 }
639
640 /* 636 /*
641 * Ensure that start/size are aligned to a page boundary. 637 * Ensure that start/size are aligned to a page boundary.
642 * Size is appropriately rounded down, start is rounded up. 638 * Size is appropriately rounded down, start is rounded up.
@@ -677,17 +673,17 @@ int __init arm_add_memory(u64 start, u64 size)
677 aligned_start = PHYS_OFFSET; 673 aligned_start = PHYS_OFFSET;
678 } 674 }
679 675
680 bank->start = aligned_start; 676 start = aligned_start;
681 bank->size = size & ~(phys_addr_t)(PAGE_SIZE - 1); 677 size = size & ~(phys_addr_t)(PAGE_SIZE - 1);
682 678
683 /* 679 /*
684 * Check whether this memory region has non-zero size or 680 * Check whether this memory region has non-zero size or
685 * invalid node number. 681 * invalid node number.
686 */ 682 */
687 if (bank->size == 0) 683 if (size == 0)
688 return -EINVAL; 684 return -EINVAL;
689 685
690 meminfo.nr_banks++; 686 memblock_add(start, size);
691 return 0; 687 return 0;
692} 688}
693 689
@@ -695,6 +691,7 @@ int __init arm_add_memory(u64 start, u64 size)
695 * Pick out the memory size. We look for mem=size@start, 691 * Pick out the memory size. We look for mem=size@start,
696 * where start and size are "size[KkMm]" 692 * where start and size are "size[KkMm]"
697 */ 693 */
694
698static int __init early_mem(char *p) 695static int __init early_mem(char *p)
699{ 696{
700 static int usermem __initdata = 0; 697 static int usermem __initdata = 0;
@@ -709,7 +706,8 @@ static int __init early_mem(char *p)
709 */ 706 */
710 if (usermem == 0) { 707 if (usermem == 0) {
711 usermem = 1; 708 usermem = 1;
712 meminfo.nr_banks = 0; 709 memblock_remove(memblock_start_of_DRAM(),
710 memblock_end_of_DRAM() - memblock_start_of_DRAM());
713 } 711 }
714 712
715 start = PHYS_OFFSET; 713 start = PHYS_OFFSET;
@@ -854,13 +852,6 @@ static void __init reserve_crashkernel(void)
854static inline void reserve_crashkernel(void) {} 852static inline void reserve_crashkernel(void) {}
855#endif /* CONFIG_KEXEC */ 853#endif /* CONFIG_KEXEC */
856 854
857static int __init meminfo_cmp(const void *_a, const void *_b)
858{
859 const struct membank *a = _a, *b = _b;
860 long cmp = bank_pfn_start(a) - bank_pfn_start(b);
861 return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
862}
863
864void __init hyp_mode_check(void) 855void __init hyp_mode_check(void)
865{ 856{
866#ifdef CONFIG_ARM_VIRT_EXT 857#ifdef CONFIG_ARM_VIRT_EXT
@@ -903,12 +894,10 @@ void __init setup_arch(char **cmdline_p)
903 894
904 parse_early_param(); 895 parse_early_param();
905 896
906 sort(&meminfo.bank, meminfo.nr_banks, sizeof(meminfo.bank[0]), meminfo_cmp, NULL);
907
908 early_paging_init(mdesc, lookup_processor_type(read_cpuid_id())); 897 early_paging_init(mdesc, lookup_processor_type(read_cpuid_id()));
909 setup_dma_zone(mdesc); 898 setup_dma_zone(mdesc);
910 sanity_check_meminfo(); 899 sanity_check_meminfo();
911 arm_memblock_init(&meminfo, mdesc); 900 arm_memblock_init(mdesc);
912 901
913 paging_init(mdesc); 902 paging_init(mdesc);
914 request_standard_resources(mdesc); 903 request_standard_resources(mdesc);
diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S
index b907d9b790ab..1b880db2a033 100644
--- a/arch/arm/kernel/sleep.S
+++ b/arch/arm/kernel/sleep.S
@@ -127,6 +127,10 @@ ENDPROC(cpu_resume_after_mmu)
127 .align 127 .align
128ENTRY(cpu_resume) 128ENTRY(cpu_resume)
129ARM_BE8(setend be) @ ensure we are in BE mode 129ARM_BE8(setend be) @ ensure we are in BE mode
130#ifdef CONFIG_ARM_VIRT_EXT
131 bl __hyp_stub_install_secondary
132#endif
133 safe_svcmode_maskall r1
130 mov r1, #0 134 mov r1, #0
131 ALT_SMP(mrc p15, 0, r0, c0, c0, 5) 135 ALT_SMP(mrc p15, 0, r0, c0, c0, 5)
132 ALT_UP_B(1f) 136 ALT_UP_B(1f)
@@ -144,7 +148,6 @@ ARM_BE8(setend be) @ ensure we are in BE mode
144 ldr r0, [r0, #SLEEP_SAVE_SP_PHYS] 148 ldr r0, [r0, #SLEEP_SAVE_SP_PHYS]
145 ldr r0, [r0, r1, lsl #2] 149 ldr r0, [r0, r1, lsl #2]
146 150
147 setmode PSR_I_BIT | PSR_F_BIT | SVC_MODE, r1 @ set SVC, irqs off
148 @ load phys pgd, stack, resume fn 151 @ load phys pgd, stack, resume fn
149 ARM( ldmia r0!, {r1, sp, pc} ) 152 ARM( ldmia r0!, {r1, sp, pc} )
150THUMB( ldmia r0!, {r1, r2, r3} ) 153THUMB( ldmia r0!, {r1, r2, r3} )
diff --git a/arch/arm/kernel/stacktrace.c b/arch/arm/kernel/stacktrace.c
index af4e8c8a5422..f065eb05d254 100644
--- a/arch/arm/kernel/stacktrace.c
+++ b/arch/arm/kernel/stacktrace.c
@@ -3,6 +3,7 @@
3#include <linux/stacktrace.h> 3#include <linux/stacktrace.h>
4 4
5#include <asm/stacktrace.h> 5#include <asm/stacktrace.h>
6#include <asm/traps.h>
6 7
7#if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) 8#if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND)
8/* 9/*
@@ -61,6 +62,7 @@ EXPORT_SYMBOL(walk_stackframe);
61#ifdef CONFIG_STACKTRACE 62#ifdef CONFIG_STACKTRACE
62struct stack_trace_data { 63struct stack_trace_data {
63 struct stack_trace *trace; 64 struct stack_trace *trace;
65 unsigned long last_pc;
64 unsigned int no_sched_functions; 66 unsigned int no_sched_functions;
65 unsigned int skip; 67 unsigned int skip;
66}; 68};
@@ -69,6 +71,7 @@ static int save_trace(struct stackframe *frame, void *d)
69{ 71{
70 struct stack_trace_data *data = d; 72 struct stack_trace_data *data = d;
71 struct stack_trace *trace = data->trace; 73 struct stack_trace *trace = data->trace;
74 struct pt_regs *regs;
72 unsigned long addr = frame->pc; 75 unsigned long addr = frame->pc;
73 76
74 if (data->no_sched_functions && in_sched_functions(addr)) 77 if (data->no_sched_functions && in_sched_functions(addr))
@@ -80,16 +83,39 @@ static int save_trace(struct stackframe *frame, void *d)
80 83
81 trace->entries[trace->nr_entries++] = addr; 84 trace->entries[trace->nr_entries++] = addr;
82 85
86 if (trace->nr_entries >= trace->max_entries)
87 return 1;
88
89 /*
90 * in_exception_text() is designed to test if the PC is one of
91 * the functions which has an exception stack above it, but
92 * unfortunately what is in frame->pc is the return LR value,
93 * not the saved PC value. So, we need to track the previous
94 * frame PC value when doing this.
95 */
96 addr = data->last_pc;
97 data->last_pc = frame->pc;
98 if (!in_exception_text(addr))
99 return 0;
100
101 regs = (struct pt_regs *)frame->sp;
102
103 trace->entries[trace->nr_entries++] = regs->ARM_pc;
104
83 return trace->nr_entries >= trace->max_entries; 105 return trace->nr_entries >= trace->max_entries;
84} 106}
85 107
86void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) 108/* This must be noinline to so that our skip calculation works correctly */
109static noinline void __save_stack_trace(struct task_struct *tsk,
110 struct stack_trace *trace, unsigned int nosched)
87{ 111{
88 struct stack_trace_data data; 112 struct stack_trace_data data;
89 struct stackframe frame; 113 struct stackframe frame;
90 114
91 data.trace = trace; 115 data.trace = trace;
116 data.last_pc = ULONG_MAX;
92 data.skip = trace->skip; 117 data.skip = trace->skip;
118 data.no_sched_functions = nosched;
93 119
94 if (tsk != current) { 120 if (tsk != current) {
95#ifdef CONFIG_SMP 121#ifdef CONFIG_SMP
@@ -102,7 +128,6 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
102 trace->entries[trace->nr_entries++] = ULONG_MAX; 128 trace->entries[trace->nr_entries++] = ULONG_MAX;
103 return; 129 return;
104#else 130#else
105 data.no_sched_functions = 1;
106 frame.fp = thread_saved_fp(tsk); 131 frame.fp = thread_saved_fp(tsk);
107 frame.sp = thread_saved_sp(tsk); 132 frame.sp = thread_saved_sp(tsk);
108 frame.lr = 0; /* recovered from the stack */ 133 frame.lr = 0; /* recovered from the stack */
@@ -111,11 +136,12 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
111 } else { 136 } else {
112 register unsigned long current_sp asm ("sp"); 137 register unsigned long current_sp asm ("sp");
113 138
114 data.no_sched_functions = 0; 139 /* We don't want this function nor the caller */
140 data.skip += 2;
115 frame.fp = (unsigned long)__builtin_frame_address(0); 141 frame.fp = (unsigned long)__builtin_frame_address(0);
116 frame.sp = current_sp; 142 frame.sp = current_sp;
117 frame.lr = (unsigned long)__builtin_return_address(0); 143 frame.lr = (unsigned long)__builtin_return_address(0);
118 frame.pc = (unsigned long)save_stack_trace_tsk; 144 frame.pc = (unsigned long)__save_stack_trace;
119 } 145 }
120 146
121 walk_stackframe(&frame, save_trace, &data); 147 walk_stackframe(&frame, save_trace, &data);
@@ -123,9 +149,33 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
123 trace->entries[trace->nr_entries++] = ULONG_MAX; 149 trace->entries[trace->nr_entries++] = ULONG_MAX;
124} 150}
125 151
152void save_stack_trace_regs(struct pt_regs *regs, struct stack_trace *trace)
153{
154 struct stack_trace_data data;
155 struct stackframe frame;
156
157 data.trace = trace;
158 data.skip = trace->skip;
159 data.no_sched_functions = 0;
160
161 frame.fp = regs->ARM_fp;
162 frame.sp = regs->ARM_sp;
163 frame.lr = regs->ARM_lr;
164 frame.pc = regs->ARM_pc;
165
166 walk_stackframe(&frame, save_trace, &data);
167 if (trace->nr_entries < trace->max_entries)
168 trace->entries[trace->nr_entries++] = ULONG_MAX;
169}
170
171void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
172{
173 __save_stack_trace(tsk, trace, 1);
174}
175
126void save_stack_trace(struct stack_trace *trace) 176void save_stack_trace(struct stack_trace *trace)
127{ 177{
128 save_stack_trace_tsk(current, trace); 178 __save_stack_trace(current, trace, 0);
129} 179}
130EXPORT_SYMBOL_GPL(save_stack_trace); 180EXPORT_SYMBOL_GPL(save_stack_trace);
131#endif 181#endif
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
index 0bc94b1fd1ae..3997c411c140 100644
--- a/arch/arm/kernel/topology.c
+++ b/arch/arm/kernel/topology.c
@@ -91,13 +91,13 @@ static void __init parse_dt_topology(void)
91{ 91{
92 const struct cpu_efficiency *cpu_eff; 92 const struct cpu_efficiency *cpu_eff;
93 struct device_node *cn = NULL; 93 struct device_node *cn = NULL;
94 unsigned long min_capacity = (unsigned long)(-1); 94 unsigned long min_capacity = ULONG_MAX;
95 unsigned long max_capacity = 0; 95 unsigned long max_capacity = 0;
96 unsigned long capacity = 0; 96 unsigned long capacity = 0;
97 int alloc_size, cpu = 0; 97 int cpu = 0;
98 98
99 alloc_size = nr_cpu_ids * sizeof(*__cpu_capacity); 99 __cpu_capacity = kcalloc(nr_cpu_ids, sizeof(*__cpu_capacity),
100 __cpu_capacity = kzalloc(alloc_size, GFP_NOWAIT); 100 GFP_NOWAIT);
101 101
102 for_each_possible_cpu(cpu) { 102 for_each_possible_cpu(cpu) {
103 const u32 *rate; 103 const u32 *rate;
@@ -185,6 +185,15 @@ const struct cpumask *cpu_coregroup_mask(int cpu)
185 return &cpu_topology[cpu].core_sibling; 185 return &cpu_topology[cpu].core_sibling;
186} 186}
187 187
188/*
189 * The current assumption is that we can power gate each core independently.
190 * This will be superseded by DT binding once available.
191 */
192const struct cpumask *cpu_corepower_mask(int cpu)
193{
194 return &cpu_topology[cpu].thread_sibling;
195}
196
188static void update_siblings_masks(unsigned int cpuid) 197static void update_siblings_masks(unsigned int cpuid)
189{ 198{
190 struct cputopo_arm *cpu_topo, *cpuid_topo = &cpu_topology[cpuid]; 199 struct cputopo_arm *cpu_topo, *cpuid_topo = &cpu_topology[cpuid];
@@ -266,6 +275,20 @@ void store_cpu_topology(unsigned int cpuid)
266 cpu_topology[cpuid].socket_id, mpidr); 275 cpu_topology[cpuid].socket_id, mpidr);
267} 276}
268 277
278static inline const int cpu_corepower_flags(void)
279{
280 return SD_SHARE_PKG_RESOURCES | SD_SHARE_POWERDOMAIN;
281}
282
283static struct sched_domain_topology_level arm_topology[] = {
284#ifdef CONFIG_SCHED_MC
285 { cpu_corepower_mask, cpu_corepower_flags, SD_INIT_NAME(GMC) },
286 { cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) },
287#endif
288 { cpu_cpu_mask, SD_INIT_NAME(DIE) },
289 { NULL, },
290};
291
269/* 292/*
270 * init_cpu_topology is called at boot when only one cpu is running 293 * init_cpu_topology is called at boot when only one cpu is running
271 * which prevent simultaneous write access to cpu_topology array 294 * which prevent simultaneous write access to cpu_topology array
@@ -289,4 +312,7 @@ void __init init_cpu_topology(void)
289 smp_wmb(); 312 smp_wmb();
290 313
291 parse_dt_topology(); 314 parse_dt_topology();
315
316 /* Set scheduler topology descriptor */
317 set_sched_topology(arm_topology);
292} 318}
diff --git a/arch/arm/kernel/unwind.c b/arch/arm/kernel/unwind.c
index 3c217694ebec..e67682f02cb2 100644
--- a/arch/arm/kernel/unwind.c
+++ b/arch/arm/kernel/unwind.c
@@ -31,7 +31,7 @@
31#warning Your compiler does not have EABI support. 31#warning Your compiler does not have EABI support.
32#warning ARM unwind is known to compile only with EABI compilers. 32#warning ARM unwind is known to compile only with EABI compilers.
33#warning Change compiler or disable ARM_UNWIND option. 33#warning Change compiler or disable ARM_UNWIND option.
34#elif (__GNUC__ == 4 && __GNUC_MINOR__ <= 2) 34#elif (__GNUC__ == 4 && __GNUC_MINOR__ <= 2) && !defined(__clang__)
35#warning Your compiler is too buggy; it is known to not compile ARM unwind support. 35#warning Your compiler is too buggy; it is known to not compile ARM unwind support.
36#warning Change compiler or disable ARM_UNWIND option. 36#warning Change compiler or disable ARM_UNWIND option.
37#endif 37#endif
@@ -285,7 +285,7 @@ static int unwind_exec_pop_r4_to_rN(struct unwind_ctrl_block *ctrl,
285 if (unwind_pop_register(ctrl, &vsp, reg)) 285 if (unwind_pop_register(ctrl, &vsp, reg))
286 return -URC_FAILURE; 286 return -URC_FAILURE;
287 287
288 if (insn & 0x80) 288 if (insn & 0x8)
289 if (unwind_pop_register(ctrl, &vsp, 14)) 289 if (unwind_pop_register(ctrl, &vsp, 14))
290 return -URC_FAILURE; 290 return -URC_FAILURE;
291 291
diff --git a/arch/arm/kernel/uprobes.c b/arch/arm/kernel/uprobes.c
index f9bacee973bf..56adf9c1fde0 100644
--- a/arch/arm/kernel/uprobes.c
+++ b/arch/arm/kernel/uprobes.c
@@ -113,6 +113,26 @@ int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm,
113 return 0; 113 return 0;
114} 114}
115 115
116void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr,
117 void *src, unsigned long len)
118{
119 void *xol_page_kaddr = kmap_atomic(page);
120 void *dst = xol_page_kaddr + (vaddr & ~PAGE_MASK);
121
122 preempt_disable();
123
124 /* Initialize the slot */
125 memcpy(dst, src, len);
126
127 /* flush caches (dcache/icache) */
128 flush_uprobe_xol_access(page, vaddr, dst, len);
129
130 preempt_enable();
131
132 kunmap_atomic(xol_page_kaddr);
133}
134
135
116int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) 136int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs)
117{ 137{
118 struct uprobe_task *utask = current->utask; 138 struct uprobe_task *utask = current->utask;
diff --git a/arch/arm/kvm/Kconfig b/arch/arm/kvm/Kconfig
index 466bd299b1a8..4be5bb150bdd 100644
--- a/arch/arm/kvm/Kconfig
+++ b/arch/arm/kvm/Kconfig
@@ -23,7 +23,7 @@ config KVM
23 select HAVE_KVM_CPU_RELAX_INTERCEPT 23 select HAVE_KVM_CPU_RELAX_INTERCEPT
24 select KVM_MMIO 24 select KVM_MMIO
25 select KVM_ARM_HOST 25 select KVM_ARM_HOST
26 depends on ARM_VIRT_EXT && ARM_LPAE 26 depends on ARM_VIRT_EXT && ARM_LPAE && !CPU_BIG_ENDIAN
27 ---help--- 27 ---help---
28 Support hosting virtualized guest machines. You will also 28 Support hosting virtualized guest machines. You will also
29 need to select one or more of the processor modules below. 29 need to select one or more of the processor modules below.
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index f0e50a0f3a65..3c82b37c0f9e 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -197,6 +197,7 @@ int kvm_dev_ioctl_check_extension(long ext)
197 case KVM_CAP_DESTROY_MEMORY_REGION_WORKS: 197 case KVM_CAP_DESTROY_MEMORY_REGION_WORKS:
198 case KVM_CAP_ONE_REG: 198 case KVM_CAP_ONE_REG:
199 case KVM_CAP_ARM_PSCI: 199 case KVM_CAP_ARM_PSCI:
200 case KVM_CAP_ARM_PSCI_0_2:
200 r = 1; 201 r = 1;
201 break; 202 break;
202 case KVM_CAP_COALESCED_MMIO: 203 case KVM_CAP_COALESCED_MMIO:
diff --git a/arch/arm/kvm/handle_exit.c b/arch/arm/kvm/handle_exit.c
index 0de91fc6de0f..4c979d466cc1 100644
--- a/arch/arm/kvm/handle_exit.c
+++ b/arch/arm/kvm/handle_exit.c
@@ -38,14 +38,18 @@ static int handle_svc_hyp(struct kvm_vcpu *vcpu, struct kvm_run *run)
38 38
39static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run) 39static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run)
40{ 40{
41 int ret;
42
41 trace_kvm_hvc(*vcpu_pc(vcpu), *vcpu_reg(vcpu, 0), 43 trace_kvm_hvc(*vcpu_pc(vcpu), *vcpu_reg(vcpu, 0),
42 kvm_vcpu_hvc_get_imm(vcpu)); 44 kvm_vcpu_hvc_get_imm(vcpu));
43 45
44 if (kvm_psci_call(vcpu)) 46 ret = kvm_psci_call(vcpu);
47 if (ret < 0) {
48 kvm_inject_undefined(vcpu);
45 return 1; 49 return 1;
50 }
46 51
47 kvm_inject_undefined(vcpu); 52 return ret;
48 return 1;
49} 53}
50 54
51static int handle_smc(struct kvm_vcpu *vcpu, struct kvm_run *run) 55static int handle_smc(struct kvm_vcpu *vcpu, struct kvm_run *run)
diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
index 80bb1e6c2c29..16f804938b8f 100644
--- a/arch/arm/kvm/mmu.c
+++ b/arch/arm/kvm/mmu.c
@@ -42,6 +42,8 @@ static unsigned long hyp_idmap_start;
42static unsigned long hyp_idmap_end; 42static unsigned long hyp_idmap_end;
43static phys_addr_t hyp_idmap_vector; 43static phys_addr_t hyp_idmap_vector;
44 44
45#define pgd_order get_order(PTRS_PER_PGD * sizeof(pgd_t))
46
45#define kvm_pmd_huge(_x) (pmd_huge(_x) || pmd_trans_huge(_x)) 47#define kvm_pmd_huge(_x) (pmd_huge(_x) || pmd_trans_huge(_x))
46 48
47static void kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa) 49static void kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)
@@ -293,14 +295,14 @@ void free_boot_hyp_pgd(void)
293 if (boot_hyp_pgd) { 295 if (boot_hyp_pgd) {
294 unmap_range(NULL, boot_hyp_pgd, hyp_idmap_start, PAGE_SIZE); 296 unmap_range(NULL, boot_hyp_pgd, hyp_idmap_start, PAGE_SIZE);
295 unmap_range(NULL, boot_hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE); 297 unmap_range(NULL, boot_hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE);
296 kfree(boot_hyp_pgd); 298 free_pages((unsigned long)boot_hyp_pgd, pgd_order);
297 boot_hyp_pgd = NULL; 299 boot_hyp_pgd = NULL;
298 } 300 }
299 301
300 if (hyp_pgd) 302 if (hyp_pgd)
301 unmap_range(NULL, hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE); 303 unmap_range(NULL, hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE);
302 304
303 kfree(init_bounce_page); 305 free_page((unsigned long)init_bounce_page);
304 init_bounce_page = NULL; 306 init_bounce_page = NULL;
305 307
306 mutex_unlock(&kvm_hyp_pgd_mutex); 308 mutex_unlock(&kvm_hyp_pgd_mutex);
@@ -330,7 +332,7 @@ void free_hyp_pgds(void)
330 for (addr = VMALLOC_START; is_vmalloc_addr((void*)addr); addr += PGDIR_SIZE) 332 for (addr = VMALLOC_START; is_vmalloc_addr((void*)addr); addr += PGDIR_SIZE)
331 unmap_range(NULL, hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE); 333 unmap_range(NULL, hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE);
332 334
333 kfree(hyp_pgd); 335 free_pages((unsigned long)hyp_pgd, pgd_order);
334 hyp_pgd = NULL; 336 hyp_pgd = NULL;
335 } 337 }
336 338
@@ -1024,7 +1026,7 @@ int kvm_mmu_init(void)
1024 size_t len = __hyp_idmap_text_end - __hyp_idmap_text_start; 1026 size_t len = __hyp_idmap_text_end - __hyp_idmap_text_start;
1025 phys_addr_t phys_base; 1027 phys_addr_t phys_base;
1026 1028
1027 init_bounce_page = kmalloc(PAGE_SIZE, GFP_KERNEL); 1029 init_bounce_page = (void *)__get_free_page(GFP_KERNEL);
1028 if (!init_bounce_page) { 1030 if (!init_bounce_page) {
1029 kvm_err("Couldn't allocate HYP init bounce page\n"); 1031 kvm_err("Couldn't allocate HYP init bounce page\n");
1030 err = -ENOMEM; 1032 err = -ENOMEM;
@@ -1050,8 +1052,9 @@ int kvm_mmu_init(void)
1050 (unsigned long)phys_base); 1052 (unsigned long)phys_base);
1051 } 1053 }
1052 1054
1053 hyp_pgd = kzalloc(PTRS_PER_PGD * sizeof(pgd_t), GFP_KERNEL); 1055 hyp_pgd = (pgd_t *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, pgd_order);
1054 boot_hyp_pgd = kzalloc(PTRS_PER_PGD * sizeof(pgd_t), GFP_KERNEL); 1056 boot_hyp_pgd = (pgd_t *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, pgd_order);
1057
1055 if (!hyp_pgd || !boot_hyp_pgd) { 1058 if (!hyp_pgd || !boot_hyp_pgd) {
1056 kvm_err("Hyp mode PGD not allocated\n"); 1059 kvm_err("Hyp mode PGD not allocated\n");
1057 err = -ENOMEM; 1060 err = -ENOMEM;
diff --git a/arch/arm/kvm/psci.c b/arch/arm/kvm/psci.c
index 448f60e8d23c..09cf37737ee2 100644
--- a/arch/arm/kvm/psci.c
+++ b/arch/arm/kvm/psci.c
@@ -27,6 +27,36 @@
27 * as described in ARM document number ARM DEN 0022A. 27 * as described in ARM document number ARM DEN 0022A.
28 */ 28 */
29 29
30#define AFFINITY_MASK(level) ~((0x1UL << ((level) * MPIDR_LEVEL_BITS)) - 1)
31
32static unsigned long psci_affinity_mask(unsigned long affinity_level)
33{
34 if (affinity_level <= 3)
35 return MPIDR_HWID_BITMASK & AFFINITY_MASK(affinity_level);
36
37 return 0;
38}
39
40static unsigned long kvm_psci_vcpu_suspend(struct kvm_vcpu *vcpu)
41{
42 /*
43 * NOTE: For simplicity, we make VCPU suspend emulation to be
44 * same-as WFI (Wait-for-interrupt) emulation.
45 *
46 * This means for KVM the wakeup events are interrupts and
47 * this is consistent with intended use of StateID as described
48 * in section 5.4.1 of PSCI v0.2 specification (ARM DEN 0022A).
49 *
50 * Further, we also treat power-down request to be same as
51 * stand-by request as-per section 5.4.2 clause 3 of PSCI v0.2
52 * specification (ARM DEN 0022A). This means all suspend states
53 * for KVM will preserve the register state.
54 */
55 kvm_vcpu_block(vcpu);
56
57 return PSCI_RET_SUCCESS;
58}
59
30static void kvm_psci_vcpu_off(struct kvm_vcpu *vcpu) 60static void kvm_psci_vcpu_off(struct kvm_vcpu *vcpu)
31{ 61{
32 vcpu->arch.pause = true; 62 vcpu->arch.pause = true;
@@ -38,6 +68,7 @@ static unsigned long kvm_psci_vcpu_on(struct kvm_vcpu *source_vcpu)
38 struct kvm_vcpu *vcpu = NULL, *tmp; 68 struct kvm_vcpu *vcpu = NULL, *tmp;
39 wait_queue_head_t *wq; 69 wait_queue_head_t *wq;
40 unsigned long cpu_id; 70 unsigned long cpu_id;
71 unsigned long context_id;
41 unsigned long mpidr; 72 unsigned long mpidr;
42 phys_addr_t target_pc; 73 phys_addr_t target_pc;
43 int i; 74 int i;
@@ -58,10 +89,17 @@ static unsigned long kvm_psci_vcpu_on(struct kvm_vcpu *source_vcpu)
58 * Make sure the caller requested a valid CPU and that the CPU is 89 * Make sure the caller requested a valid CPU and that the CPU is
59 * turned off. 90 * turned off.
60 */ 91 */
61 if (!vcpu || !vcpu->arch.pause) 92 if (!vcpu)
62 return KVM_PSCI_RET_INVAL; 93 return PSCI_RET_INVALID_PARAMS;
94 if (!vcpu->arch.pause) {
95 if (kvm_psci_version(source_vcpu) != KVM_ARM_PSCI_0_1)
96 return PSCI_RET_ALREADY_ON;
97 else
98 return PSCI_RET_INVALID_PARAMS;
99 }
63 100
64 target_pc = *vcpu_reg(source_vcpu, 2); 101 target_pc = *vcpu_reg(source_vcpu, 2);
102 context_id = *vcpu_reg(source_vcpu, 3);
65 103
66 kvm_reset_vcpu(vcpu); 104 kvm_reset_vcpu(vcpu);
67 105
@@ -76,26 +114,160 @@ static unsigned long kvm_psci_vcpu_on(struct kvm_vcpu *source_vcpu)
76 kvm_vcpu_set_be(vcpu); 114 kvm_vcpu_set_be(vcpu);
77 115
78 *vcpu_pc(vcpu) = target_pc; 116 *vcpu_pc(vcpu) = target_pc;
117 /*
118 * NOTE: We always update r0 (or x0) because for PSCI v0.1
119 * the general puspose registers are undefined upon CPU_ON.
120 */
121 *vcpu_reg(vcpu, 0) = context_id;
79 vcpu->arch.pause = false; 122 vcpu->arch.pause = false;
80 smp_mb(); /* Make sure the above is visible */ 123 smp_mb(); /* Make sure the above is visible */
81 124
82 wq = kvm_arch_vcpu_wq(vcpu); 125 wq = kvm_arch_vcpu_wq(vcpu);
83 wake_up_interruptible(wq); 126 wake_up_interruptible(wq);
84 127
85 return KVM_PSCI_RET_SUCCESS; 128 return PSCI_RET_SUCCESS;
86} 129}
87 130
88/** 131static unsigned long kvm_psci_vcpu_affinity_info(struct kvm_vcpu *vcpu)
89 * kvm_psci_call - handle PSCI call if r0 value is in range 132{
90 * @vcpu: Pointer to the VCPU struct 133 int i;
91 * 134 unsigned long mpidr;
92 * Handle PSCI calls from guests through traps from HVC instructions. 135 unsigned long target_affinity;
93 * The calling convention is similar to SMC calls to the secure world where 136 unsigned long target_affinity_mask;
94 * the function number is placed in r0 and this function returns true if the 137 unsigned long lowest_affinity_level;
95 * function number specified in r0 is withing the PSCI range, and false 138 struct kvm *kvm = vcpu->kvm;
96 * otherwise. 139 struct kvm_vcpu *tmp;
97 */ 140
98bool kvm_psci_call(struct kvm_vcpu *vcpu) 141 target_affinity = *vcpu_reg(vcpu, 1);
142 lowest_affinity_level = *vcpu_reg(vcpu, 2);
143
144 /* Determine target affinity mask */
145 target_affinity_mask = psci_affinity_mask(lowest_affinity_level);
146 if (!target_affinity_mask)
147 return PSCI_RET_INVALID_PARAMS;
148
149 /* Ignore other bits of target affinity */
150 target_affinity &= target_affinity_mask;
151
152 /*
153 * If one or more VCPU matching target affinity are running
154 * then ON else OFF
155 */
156 kvm_for_each_vcpu(i, tmp, kvm) {
157 mpidr = kvm_vcpu_get_mpidr(tmp);
158 if (((mpidr & target_affinity_mask) == target_affinity) &&
159 !tmp->arch.pause) {
160 return PSCI_0_2_AFFINITY_LEVEL_ON;
161 }
162 }
163
164 return PSCI_0_2_AFFINITY_LEVEL_OFF;
165}
166
167static void kvm_prepare_system_event(struct kvm_vcpu *vcpu, u32 type)
168{
169 memset(&vcpu->run->system_event, 0, sizeof(vcpu->run->system_event));
170 vcpu->run->system_event.type = type;
171 vcpu->run->exit_reason = KVM_EXIT_SYSTEM_EVENT;
172}
173
174static void kvm_psci_system_off(struct kvm_vcpu *vcpu)
175{
176 kvm_prepare_system_event(vcpu, KVM_SYSTEM_EVENT_SHUTDOWN);
177}
178
179static void kvm_psci_system_reset(struct kvm_vcpu *vcpu)
180{
181 kvm_prepare_system_event(vcpu, KVM_SYSTEM_EVENT_RESET);
182}
183
184int kvm_psci_version(struct kvm_vcpu *vcpu)
185{
186 if (test_bit(KVM_ARM_VCPU_PSCI_0_2, vcpu->arch.features))
187 return KVM_ARM_PSCI_0_2;
188
189 return KVM_ARM_PSCI_0_1;
190}
191
192static int kvm_psci_0_2_call(struct kvm_vcpu *vcpu)
193{
194 int ret = 1;
195 unsigned long psci_fn = *vcpu_reg(vcpu, 0) & ~((u32) 0);
196 unsigned long val;
197
198 switch (psci_fn) {
199 case PSCI_0_2_FN_PSCI_VERSION:
200 /*
201 * Bits[31:16] = Major Version = 0
202 * Bits[15:0] = Minor Version = 2
203 */
204 val = 2;
205 break;
206 case PSCI_0_2_FN_CPU_SUSPEND:
207 case PSCI_0_2_FN64_CPU_SUSPEND:
208 val = kvm_psci_vcpu_suspend(vcpu);
209 break;
210 case PSCI_0_2_FN_CPU_OFF:
211 kvm_psci_vcpu_off(vcpu);
212 val = PSCI_RET_SUCCESS;
213 break;
214 case PSCI_0_2_FN_CPU_ON:
215 case PSCI_0_2_FN64_CPU_ON:
216 val = kvm_psci_vcpu_on(vcpu);
217 break;
218 case PSCI_0_2_FN_AFFINITY_INFO:
219 case PSCI_0_2_FN64_AFFINITY_INFO:
220 val = kvm_psci_vcpu_affinity_info(vcpu);
221 break;
222 case PSCI_0_2_FN_MIGRATE:
223 case PSCI_0_2_FN64_MIGRATE:
224 val = PSCI_RET_NOT_SUPPORTED;
225 break;
226 case PSCI_0_2_FN_MIGRATE_INFO_TYPE:
227 /*
228 * Trusted OS is MP hence does not require migration
229 * or
230 * Trusted OS is not present
231 */
232 val = PSCI_0_2_TOS_MP;
233 break;
234 case PSCI_0_2_FN_MIGRATE_INFO_UP_CPU:
235 case PSCI_0_2_FN64_MIGRATE_INFO_UP_CPU:
236 val = PSCI_RET_NOT_SUPPORTED;
237 break;
238 case PSCI_0_2_FN_SYSTEM_OFF:
239 kvm_psci_system_off(vcpu);
240 /*
241 * We should'nt be going back to guest VCPU after
242 * receiving SYSTEM_OFF request.
243 *
244 * If user space accidently/deliberately resumes
245 * guest VCPU after SYSTEM_OFF request then guest
246 * VCPU should see internal failure from PSCI return
247 * value. To achieve this, we preload r0 (or x0) with
248 * PSCI return value INTERNAL_FAILURE.
249 */
250 val = PSCI_RET_INTERNAL_FAILURE;
251 ret = 0;
252 break;
253 case PSCI_0_2_FN_SYSTEM_RESET:
254 kvm_psci_system_reset(vcpu);
255 /*
256 * Same reason as SYSTEM_OFF for preloading r0 (or x0)
257 * with PSCI return value INTERNAL_FAILURE.
258 */
259 val = PSCI_RET_INTERNAL_FAILURE;
260 ret = 0;
261 break;
262 default:
263 return -EINVAL;
264 }
265
266 *vcpu_reg(vcpu, 0) = val;
267 return ret;
268}
269
270static int kvm_psci_0_1_call(struct kvm_vcpu *vcpu)
99{ 271{
100 unsigned long psci_fn = *vcpu_reg(vcpu, 0) & ~((u32) 0); 272 unsigned long psci_fn = *vcpu_reg(vcpu, 0) & ~((u32) 0);
101 unsigned long val; 273 unsigned long val;
@@ -103,20 +275,45 @@ bool kvm_psci_call(struct kvm_vcpu *vcpu)
103 switch (psci_fn) { 275 switch (psci_fn) {
104 case KVM_PSCI_FN_CPU_OFF: 276 case KVM_PSCI_FN_CPU_OFF:
105 kvm_psci_vcpu_off(vcpu); 277 kvm_psci_vcpu_off(vcpu);
106 val = KVM_PSCI_RET_SUCCESS; 278 val = PSCI_RET_SUCCESS;
107 break; 279 break;
108 case KVM_PSCI_FN_CPU_ON: 280 case KVM_PSCI_FN_CPU_ON:
109 val = kvm_psci_vcpu_on(vcpu); 281 val = kvm_psci_vcpu_on(vcpu);
110 break; 282 break;
111 case KVM_PSCI_FN_CPU_SUSPEND: 283 case KVM_PSCI_FN_CPU_SUSPEND:
112 case KVM_PSCI_FN_MIGRATE: 284 case KVM_PSCI_FN_MIGRATE:
113 val = KVM_PSCI_RET_NI; 285 val = PSCI_RET_NOT_SUPPORTED;
114 break; 286 break;
115
116 default: 287 default:
117 return false; 288 return -EINVAL;
118 } 289 }
119 290
120 *vcpu_reg(vcpu, 0) = val; 291 *vcpu_reg(vcpu, 0) = val;
121 return true; 292 return 1;
293}
294
295/**
296 * kvm_psci_call - handle PSCI call if r0 value is in range
297 * @vcpu: Pointer to the VCPU struct
298 *
299 * Handle PSCI calls from guests through traps from HVC instructions.
300 * The calling convention is similar to SMC calls to the secure world
301 * where the function number is placed in r0.
302 *
303 * This function returns: > 0 (success), 0 (success but exit to user
304 * space), and < 0 (errors)
305 *
306 * Errors:
307 * -EINVAL: Unrecognized PSCI function
308 */
309int kvm_psci_call(struct kvm_vcpu *vcpu)
310{
311 switch (kvm_psci_version(vcpu)) {
312 case KVM_ARM_PSCI_0_2:
313 return kvm_psci_0_2_call(vcpu);
314 case KVM_ARM_PSCI_0_1:
315 return kvm_psci_0_1_call(vcpu);
316 default:
317 return -EINVAL;
318 };
122} 319}
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index b2d2cf4dc052..45b55e0f0db6 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -167,7 +167,6 @@ config SOC_AT91SAM9X5
167 select HAVE_AT91_DBGU0 167 select HAVE_AT91_DBGU0
168 select HAVE_FB_ATMEL 168 select HAVE_FB_ATMEL
169 select SOC_AT91SAM9 169 select SOC_AT91SAM9
170 select AT91_USE_OLD_CLK
171 select HAVE_AT91_UTMI 170 select HAVE_AT91_UTMI
172 select HAVE_AT91_SMD 171 select HAVE_AT91_SMD
173 select HAVE_AT91_USB_CLK 172 select HAVE_AT91_USB_CLK
@@ -183,7 +182,6 @@ config SOC_AT91SAM9N12
183 select HAVE_AT91_DBGU0 182 select HAVE_AT91_DBGU0
184 select HAVE_FB_ATMEL 183 select HAVE_FB_ATMEL
185 select SOC_AT91SAM9 184 select SOC_AT91SAM9
186 select AT91_USE_OLD_CLK
187 select HAVE_AT91_USB_CLK 185 select HAVE_AT91_USB_CLK
188 help 186 help
189 Select this if you are using Atmel's AT91SAM9N12 SoC. 187 Select this if you are using Atmel's AT91SAM9N12 SoC.
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index f3f19f21352a..3f4bb58aea54 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -15,6 +15,7 @@
15 15
16#include <linux/dma-mapping.h> 16#include <linux/dma-mapping.h>
17#include <linux/gpio.h> 17#include <linux/gpio.h>
18#include <linux/gpio/driver.h>
18#include <linux/platform_device.h> 19#include <linux/platform_device.h>
19#include <linux/i2c-gpio.h> 20#include <linux/i2c-gpio.h>
20 21
@@ -25,6 +26,7 @@
25 26
26#include "board.h" 27#include "board.h"
27#include "generic.h" 28#include "generic.h"
29#include "gpio.h"
28 30
29 31
30/* -------------------------------------------------------------------- 32/* --------------------------------------------------------------------
@@ -923,7 +925,6 @@ static struct resource dbgu_resources[] = {
923static struct atmel_uart_data dbgu_data = { 925static struct atmel_uart_data dbgu_data = {
924 .use_dma_tx = 0, 926 .use_dma_tx = 0,
925 .use_dma_rx = 0, /* DBGU not capable of receive DMA */ 927 .use_dma_rx = 0, /* DBGU not capable of receive DMA */
926 .rts_gpio = -EINVAL,
927}; 928};
928 929
929static u64 dbgu_dmamask = DMA_BIT_MASK(32); 930static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@ -962,7 +963,14 @@ static struct resource uart0_resources[] = {
962static struct atmel_uart_data uart0_data = { 963static struct atmel_uart_data uart0_data = {
963 .use_dma_tx = 1, 964 .use_dma_tx = 1,
964 .use_dma_rx = 1, 965 .use_dma_rx = 1,
965 .rts_gpio = -EINVAL, 966};
967
968static struct gpiod_lookup_table uart0_gpios_table = {
969 .dev_id = "atmel_usart",
970 .table = {
971 GPIO_LOOKUP("pioA", 21, "rts", GPIO_ACTIVE_LOW),
972 { },
973 },
966}; 974};
967 975
968static u64 uart0_dmamask = DMA_BIT_MASK(32); 976static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@ -993,7 +1001,7 @@ static inline void configure_usart0_pins(unsigned pins)
993 * We need to drive the pin manually. The serial driver will driver 1001 * We need to drive the pin manually. The serial driver will driver
994 * this to high when initializing. 1002 * this to high when initializing.
995 */ 1003 */
996 uart0_data.rts_gpio = AT91_PIN_PA21; 1004 gpiod_add_lookup_table(&uart0_gpios_table);
997 } 1005 }
998} 1006}
999 1007
@@ -1013,7 +1021,6 @@ static struct resource uart1_resources[] = {
1013static struct atmel_uart_data uart1_data = { 1021static struct atmel_uart_data uart1_data = {
1014 .use_dma_tx = 1, 1022 .use_dma_tx = 1,
1015 .use_dma_rx = 1, 1023 .use_dma_rx = 1,
1016 .rts_gpio = -EINVAL,
1017}; 1024};
1018 1025
1019static u64 uart1_dmamask = DMA_BIT_MASK(32); 1026static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@ -1065,7 +1072,6 @@ static struct resource uart2_resources[] = {
1065static struct atmel_uart_data uart2_data = { 1072static struct atmel_uart_data uart2_data = {
1066 .use_dma_tx = 1, 1073 .use_dma_tx = 1,
1067 .use_dma_rx = 1, 1074 .use_dma_rx = 1,
1068 .rts_gpio = -EINVAL,
1069}; 1075};
1070 1076
1071static u64 uart2_dmamask = DMA_BIT_MASK(32); 1077static u64 uart2_dmamask = DMA_BIT_MASK(32);
@@ -1109,7 +1115,6 @@ static struct resource uart3_resources[] = {
1109static struct atmel_uart_data uart3_data = { 1115static struct atmel_uart_data uart3_data = {
1110 .use_dma_tx = 1, 1116 .use_dma_tx = 1,
1111 .use_dma_rx = 1, 1117 .use_dma_rx = 1,
1112 .rts_gpio = -EINVAL,
1113}; 1118};
1114 1119
1115static u64 uart3_dmamask = DMA_BIT_MASK(32); 1120static u64 uart3_dmamask = DMA_BIT_MASK(32);
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index a0282928e9c1..ef88e0fe4e80 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -24,12 +24,11 @@
24#include <mach/at91sam9260_matrix.h> 24#include <mach/at91sam9260_matrix.h>
25#include <mach/at91_matrix.h> 25#include <mach/at91_matrix.h>
26#include <mach/at91sam9_smc.h> 26#include <mach/at91sam9_smc.h>
27#include <mach/at91_adc.h>
28#include <mach/hardware.h> 27#include <mach/hardware.h>
29 28
30#include "board.h" 29#include "board.h"
31#include "generic.h" 30#include "generic.h"
32 31#include "gpio.h"
33 32
34/* -------------------------------------------------------------------- 33/* --------------------------------------------------------------------
35 * USB Host 34 * USB Host
@@ -820,7 +819,6 @@ static struct resource dbgu_resources[] = {
820static struct atmel_uart_data dbgu_data = { 819static struct atmel_uart_data dbgu_data = {
821 .use_dma_tx = 0, 820 .use_dma_tx = 0,
822 .use_dma_rx = 0, /* DBGU not capable of receive DMA */ 821 .use_dma_rx = 0, /* DBGU not capable of receive DMA */
823 .rts_gpio = -EINVAL,
824}; 822};
825 823
826static u64 dbgu_dmamask = DMA_BIT_MASK(32); 824static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@ -859,7 +857,6 @@ static struct resource uart0_resources[] = {
859static struct atmel_uart_data uart0_data = { 857static struct atmel_uart_data uart0_data = {
860 .use_dma_tx = 1, 858 .use_dma_tx = 1,
861 .use_dma_rx = 1, 859 .use_dma_rx = 1,
862 .rts_gpio = -EINVAL,
863}; 860};
864 861
865static u64 uart0_dmamask = DMA_BIT_MASK(32); 862static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@ -911,7 +908,6 @@ static struct resource uart1_resources[] = {
911static struct atmel_uart_data uart1_data = { 908static struct atmel_uart_data uart1_data = {
912 .use_dma_tx = 1, 909 .use_dma_tx = 1,
913 .use_dma_rx = 1, 910 .use_dma_rx = 1,
914 .rts_gpio = -EINVAL,
915}; 911};
916 912
917static u64 uart1_dmamask = DMA_BIT_MASK(32); 913static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@ -955,7 +951,6 @@ static struct resource uart2_resources[] = {
955static struct atmel_uart_data uart2_data = { 951static struct atmel_uart_data uart2_data = {
956 .use_dma_tx = 1, 952 .use_dma_tx = 1,
957 .use_dma_rx = 1, 953 .use_dma_rx = 1,
958 .rts_gpio = -EINVAL,
959}; 954};
960 955
961static u64 uart2_dmamask = DMA_BIT_MASK(32); 956static u64 uart2_dmamask = DMA_BIT_MASK(32);
@@ -999,7 +994,6 @@ static struct resource uart3_resources[] = {
999static struct atmel_uart_data uart3_data = { 994static struct atmel_uart_data uart3_data = {
1000 .use_dma_tx = 1, 995 .use_dma_tx = 1,
1001 .use_dma_rx = 1, 996 .use_dma_rx = 1,
1002 .rts_gpio = -EINVAL,
1003}; 997};
1004 998
1005static u64 uart3_dmamask = DMA_BIT_MASK(32); 999static u64 uart3_dmamask = DMA_BIT_MASK(32);
@@ -1043,7 +1037,6 @@ static struct resource uart4_resources[] = {
1043static struct atmel_uart_data uart4_data = { 1037static struct atmel_uart_data uart4_data = {
1044 .use_dma_tx = 1, 1038 .use_dma_tx = 1,
1045 .use_dma_rx = 1, 1039 .use_dma_rx = 1,
1046 .rts_gpio = -EINVAL,
1047}; 1040};
1048 1041
1049static u64 uart4_dmamask = DMA_BIT_MASK(32); 1042static u64 uart4_dmamask = DMA_BIT_MASK(32);
@@ -1082,7 +1075,6 @@ static struct resource uart5_resources[] = {
1082static struct atmel_uart_data uart5_data = { 1075static struct atmel_uart_data uart5_data = {
1083 .use_dma_tx = 1, 1076 .use_dma_tx = 1,
1084 .use_dma_rx = 1, 1077 .use_dma_rx = 1,
1085 .rts_gpio = -EINVAL,
1086}; 1078};
1087 1079
1088static u64 uart5_dmamask = DMA_BIT_MASK(32); 1080static u64 uart5_dmamask = DMA_BIT_MASK(32);
@@ -1308,30 +1300,23 @@ static struct platform_device at91_adc_device = {
1308static struct at91_adc_trigger at91_adc_triggers[] = { 1300static struct at91_adc_trigger at91_adc_triggers[] = {
1309 [0] = { 1301 [0] = {
1310 .name = "timer-counter-0", 1302 .name = "timer-counter-0",
1311 .value = AT91_ADC_TRGSEL_TC0 | AT91_ADC_TRGEN, 1303 .value = 0x1,
1312 }, 1304 },
1313 [1] = { 1305 [1] = {
1314 .name = "timer-counter-1", 1306 .name = "timer-counter-1",
1315 .value = AT91_ADC_TRGSEL_TC1 | AT91_ADC_TRGEN, 1307 .value = 0x3,
1316 }, 1308 },
1317 [2] = { 1309 [2] = {
1318 .name = "timer-counter-2", 1310 .name = "timer-counter-2",
1319 .value = AT91_ADC_TRGSEL_TC2 | AT91_ADC_TRGEN, 1311 .value = 0x5,
1320 }, 1312 },
1321 [3] = { 1313 [3] = {
1322 .name = "external", 1314 .name = "external",
1323 .value = AT91_ADC_TRGSEL_EXTERNAL | AT91_ADC_TRGEN, 1315 .value = 0xd,
1324 .is_external = true, 1316 .is_external = true,
1325 }, 1317 },
1326}; 1318};
1327 1319
1328static struct at91_adc_reg_desc at91_adc_register_g20 = {
1329 .channel_base = AT91_ADC_CHR(0),
1330 .drdy_mask = AT91_ADC_DRDY,
1331 .status_register = AT91_ADC_SR,
1332 .trigger_register = AT91_ADC_MR,
1333};
1334
1335void __init at91_add_device_adc(struct at91_adc_data *data) 1320void __init at91_add_device_adc(struct at91_adc_data *data)
1336{ 1321{
1337 if (!data) 1322 if (!data)
@@ -1349,9 +1334,7 @@ void __init at91_add_device_adc(struct at91_adc_data *data)
1349 if (data->use_external_triggers) 1334 if (data->use_external_triggers)
1350 at91_set_A_periph(AT91_PIN_PA22, 0); 1335 at91_set_A_periph(AT91_PIN_PA22, 0);
1351 1336
1352 data->num_channels = 4;
1353 data->startup_time = 10; 1337 data->startup_time = 10;
1354 data->registers = &at91_adc_register_g20;
1355 data->trigger_number = 4; 1338 data->trigger_number = 4;
1356 data->trigger_list = at91_adc_triggers; 1339 data->trigger_list = at91_adc_triggers;
1357 1340
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index 80e35895d28f..29baacb5c359 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -29,7 +29,7 @@
29 29
30#include "board.h" 30#include "board.h"
31#include "generic.h" 31#include "generic.h"
32 32#include "gpio.h"
33 33
34/* -------------------------------------------------------------------- 34/* --------------------------------------------------------------------
35 * USB Host 35 * USB Host
@@ -881,7 +881,6 @@ static struct resource dbgu_resources[] = {
881static struct atmel_uart_data dbgu_data = { 881static struct atmel_uart_data dbgu_data = {
882 .use_dma_tx = 0, 882 .use_dma_tx = 0,
883 .use_dma_rx = 0, /* DBGU not capable of receive DMA */ 883 .use_dma_rx = 0, /* DBGU not capable of receive DMA */
884 .rts_gpio = -EINVAL,
885}; 884};
886 885
887static u64 dbgu_dmamask = DMA_BIT_MASK(32); 886static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@ -920,7 +919,6 @@ static struct resource uart0_resources[] = {
920static struct atmel_uart_data uart0_data = { 919static struct atmel_uart_data uart0_data = {
921 .use_dma_tx = 1, 920 .use_dma_tx = 1,
922 .use_dma_rx = 1, 921 .use_dma_rx = 1,
923 .rts_gpio = -EINVAL,
924}; 922};
925 923
926static u64 uart0_dmamask = DMA_BIT_MASK(32); 924static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@ -964,7 +962,6 @@ static struct resource uart1_resources[] = {
964static struct atmel_uart_data uart1_data = { 962static struct atmel_uart_data uart1_data = {
965 .use_dma_tx = 1, 963 .use_dma_tx = 1,
966 .use_dma_rx = 1, 964 .use_dma_rx = 1,
967 .rts_gpio = -EINVAL,
968}; 965};
969 966
970static u64 uart1_dmamask = DMA_BIT_MASK(32); 967static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@ -1008,7 +1005,6 @@ static struct resource uart2_resources[] = {
1008static struct atmel_uart_data uart2_data = { 1005static struct atmel_uart_data uart2_data = {
1009 .use_dma_tx = 1, 1006 .use_dma_tx = 1,
1010 .use_dma_rx = 1, 1007 .use_dma_rx = 1,
1011 .rts_gpio = -EINVAL,
1012}; 1008};
1013 1009
1014static u64 uart2_dmamask = DMA_BIT_MASK(32); 1010static u64 uart2_dmamask = DMA_BIT_MASK(32);
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index 43d53d6156dd..309390d8e2f8 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -28,6 +28,7 @@
28 28
29#include "board.h" 29#include "board.h"
30#include "generic.h" 30#include "generic.h"
31#include "gpio.h"
31 32
32 33
33/* -------------------------------------------------------------------- 34/* --------------------------------------------------------------------
@@ -1325,7 +1326,6 @@ static struct resource dbgu_resources[] = {
1325static struct atmel_uart_data dbgu_data = { 1326static struct atmel_uart_data dbgu_data = {
1326 .use_dma_tx = 0, 1327 .use_dma_tx = 0,
1327 .use_dma_rx = 0, /* DBGU not capable of receive DMA */ 1328 .use_dma_rx = 0, /* DBGU not capable of receive DMA */
1328 .rts_gpio = -EINVAL,
1329}; 1329};
1330 1330
1331static u64 dbgu_dmamask = DMA_BIT_MASK(32); 1331static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@ -1364,7 +1364,6 @@ static struct resource uart0_resources[] = {
1364static struct atmel_uart_data uart0_data = { 1364static struct atmel_uart_data uart0_data = {
1365 .use_dma_tx = 1, 1365 .use_dma_tx = 1,
1366 .use_dma_rx = 1, 1366 .use_dma_rx = 1,
1367 .rts_gpio = -EINVAL,
1368}; 1367};
1369 1368
1370static u64 uart0_dmamask = DMA_BIT_MASK(32); 1369static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@ -1408,7 +1407,6 @@ static struct resource uart1_resources[] = {
1408static struct atmel_uart_data uart1_data = { 1407static struct atmel_uart_data uart1_data = {
1409 .use_dma_tx = 1, 1408 .use_dma_tx = 1,
1410 .use_dma_rx = 1, 1409 .use_dma_rx = 1,
1411 .rts_gpio = -EINVAL,
1412}; 1410};
1413 1411
1414static u64 uart1_dmamask = DMA_BIT_MASK(32); 1412static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@ -1452,7 +1450,6 @@ static struct resource uart2_resources[] = {
1452static struct atmel_uart_data uart2_data = { 1450static struct atmel_uart_data uart2_data = {
1453 .use_dma_tx = 1, 1451 .use_dma_tx = 1,
1454 .use_dma_rx = 1, 1452 .use_dma_rx = 1,
1455 .rts_gpio = -EINVAL,
1456}; 1453};
1457 1454
1458static u64 uart2_dmamask = DMA_BIT_MASK(32); 1455static u64 uart2_dmamask = DMA_BIT_MASK(32);
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index 5e6f498db0a8..9d3d544ac19c 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -182,7 +182,7 @@ static struct clk vdec_clk = {
182static struct clk adc_op_clk = { 182static struct clk adc_op_clk = {
183 .name = "adc_op_clk", 183 .name = "adc_op_clk",
184 .type = CLK_TYPE_PERIPHERAL, 184 .type = CLK_TYPE_PERIPHERAL,
185 .rate_hz = 13200000, 185 .rate_hz = 300000,
186}; 186};
187 187
188/* AES/TDES/SHA clock - Only for sam9m11/sam9g56 */ 188/* AES/TDES/SHA clock - Only for sam9m11/sam9g56 */
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index dab362c06487..391ab6bb536a 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -25,7 +25,6 @@
25#include <linux/fb.h> 25#include <linux/fb.h>
26#include <video/atmel_lcdc.h> 26#include <video/atmel_lcdc.h>
27 27
28#include <mach/at91_adc.h>
29#include <mach/at91sam9g45.h> 28#include <mach/at91sam9g45.h>
30#include <mach/at91sam9g45_matrix.h> 29#include <mach/at91sam9g45_matrix.h>
31#include <mach/at91_matrix.h> 30#include <mach/at91_matrix.h>
@@ -39,6 +38,7 @@
39#include "board.h" 38#include "board.h"
40#include "generic.h" 39#include "generic.h"
41#include "clock.h" 40#include "clock.h"
41#include "gpio.h"
42 42
43 43
44/* -------------------------------------------------------------------- 44/* --------------------------------------------------------------------
@@ -1133,58 +1133,7 @@ static void __init at91_add_device_rtc(void) {}
1133 1133
1134 1134
1135/* -------------------------------------------------------------------- 1135/* --------------------------------------------------------------------
1136 * Touchscreen 1136 * ADC and touchscreen
1137 * -------------------------------------------------------------------- */
1138
1139#if defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) || defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC_MODULE)
1140static u64 tsadcc_dmamask = DMA_BIT_MASK(32);
1141static struct at91_tsadcc_data tsadcc_data;
1142
1143static struct resource tsadcc_resources[] = {
1144 [0] = {
1145 .start = AT91SAM9G45_BASE_TSC,
1146 .end = AT91SAM9G45_BASE_TSC + SZ_16K - 1,
1147 .flags = IORESOURCE_MEM,
1148 },
1149 [1] = {
1150 .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_TSC,
1151 .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_TSC,
1152 .flags = IORESOURCE_IRQ,
1153 }
1154};
1155
1156static struct platform_device at91sam9g45_tsadcc_device = {
1157 .name = "atmel_tsadcc",
1158 .id = -1,
1159 .dev = {
1160 .dma_mask = &tsadcc_dmamask,
1161 .coherent_dma_mask = DMA_BIT_MASK(32),
1162 .platform_data = &tsadcc_data,
1163 },
1164 .resource = tsadcc_resources,
1165 .num_resources = ARRAY_SIZE(tsadcc_resources),
1166};
1167
1168void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data)
1169{
1170 if (!data)
1171 return;
1172
1173 at91_set_gpio_input(AT91_PIN_PD20, 0); /* AD0_XR */
1174 at91_set_gpio_input(AT91_PIN_PD21, 0); /* AD1_XL */
1175 at91_set_gpio_input(AT91_PIN_PD22, 0); /* AD2_YT */
1176 at91_set_gpio_input(AT91_PIN_PD23, 0); /* AD3_TB */
1177
1178 tsadcc_data = *data;
1179 platform_device_register(&at91sam9g45_tsadcc_device);
1180}
1181#else
1182void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) {}
1183#endif
1184
1185
1186/* --------------------------------------------------------------------
1187 * ADC
1188 * -------------------------------------------------------------------- */ 1137 * -------------------------------------------------------------------- */
1189 1138
1190#if IS_ENABLED(CONFIG_AT91_ADC) 1139#if IS_ENABLED(CONFIG_AT91_ADC)
@@ -1236,13 +1185,6 @@ static struct at91_adc_trigger at91_adc_triggers[] = {
1236 }, 1185 },
1237}; 1186};
1238 1187
1239static struct at91_adc_reg_desc at91_adc_register_g45 = {
1240 .channel_base = AT91_ADC_CHR(0),
1241 .drdy_mask = AT91_ADC_DRDY,
1242 .status_register = AT91_ADC_SR,
1243 .trigger_register = 0x08,
1244};
1245
1246void __init at91_add_device_adc(struct at91_adc_data *data) 1188void __init at91_add_device_adc(struct at91_adc_data *data)
1247{ 1189{
1248 if (!data) 1190 if (!data)
@@ -1268,9 +1210,7 @@ void __init at91_add_device_adc(struct at91_adc_data *data)
1268 if (data->use_external_triggers) 1210 if (data->use_external_triggers)
1269 at91_set_A_periph(AT91_PIN_PD28, 0); 1211 at91_set_A_periph(AT91_PIN_PD28, 0);
1270 1212
1271 data->num_channels = 8;
1272 data->startup_time = 40; 1213 data->startup_time = 40;
1273 data->registers = &at91_adc_register_g45;
1274 data->trigger_number = 4; 1214 data->trigger_number = 4;
1275 data->trigger_list = at91_adc_triggers; 1215 data->trigger_list = at91_adc_triggers;
1276 1216
@@ -1588,7 +1528,6 @@ static struct resource dbgu_resources[] = {
1588static struct atmel_uart_data dbgu_data = { 1528static struct atmel_uart_data dbgu_data = {
1589 .use_dma_tx = 0, 1529 .use_dma_tx = 0,
1590 .use_dma_rx = 0, 1530 .use_dma_rx = 0,
1591 .rts_gpio = -EINVAL,
1592}; 1531};
1593 1532
1594static u64 dbgu_dmamask = DMA_BIT_MASK(32); 1533static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@ -1627,7 +1566,6 @@ static struct resource uart0_resources[] = {
1627static struct atmel_uart_data uart0_data = { 1566static struct atmel_uart_data uart0_data = {
1628 .use_dma_tx = 1, 1567 .use_dma_tx = 1,
1629 .use_dma_rx = 1, 1568 .use_dma_rx = 1,
1630 .rts_gpio = -EINVAL,
1631}; 1569};
1632 1570
1633static u64 uart0_dmamask = DMA_BIT_MASK(32); 1571static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@ -1671,7 +1609,6 @@ static struct resource uart1_resources[] = {
1671static struct atmel_uart_data uart1_data = { 1609static struct atmel_uart_data uart1_data = {
1672 .use_dma_tx = 1, 1610 .use_dma_tx = 1,
1673 .use_dma_rx = 1, 1611 .use_dma_rx = 1,
1674 .rts_gpio = -EINVAL,
1675}; 1612};
1676 1613
1677static u64 uart1_dmamask = DMA_BIT_MASK(32); 1614static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@ -1715,7 +1652,6 @@ static struct resource uart2_resources[] = {
1715static struct atmel_uart_data uart2_data = { 1652static struct atmel_uart_data uart2_data = {
1716 .use_dma_tx = 1, 1653 .use_dma_tx = 1,
1717 .use_dma_rx = 1, 1654 .use_dma_rx = 1,
1718 .rts_gpio = -EINVAL,
1719}; 1655};
1720 1656
1721static u64 uart2_dmamask = DMA_BIT_MASK(32); 1657static u64 uart2_dmamask = DMA_BIT_MASK(32);
@@ -1759,7 +1695,6 @@ static struct resource uart3_resources[] = {
1759static struct atmel_uart_data uart3_data = { 1695static struct atmel_uart_data uart3_data = {
1760 .use_dma_tx = 1, 1696 .use_dma_tx = 1,
1761 .use_dma_rx = 1, 1697 .use_dma_rx = 1,
1762 .rts_gpio = -EINVAL,
1763}; 1698};
1764 1699
1765static u64 uart3_dmamask = DMA_BIT_MASK(32); 1700static u64 uart3_dmamask = DMA_BIT_MASK(32);
diff --git a/arch/arm/mach-at91/at91sam9n12.c b/arch/arm/mach-at91/at91sam9n12.c
index f2ea7b0a02da..c8988fe5ff70 100644
--- a/arch/arm/mach-at91/at91sam9n12.c
+++ b/arch/arm/mach-at91/at91sam9n12.c
@@ -19,9 +19,10 @@
19#include "board.h" 19#include "board.h"
20#include "soc.h" 20#include "soc.h"
21#include "generic.h" 21#include "generic.h"
22#include "clock.h"
23#include "sam9_smc.h" 22#include "sam9_smc.h"
24 23
24#if defined(CONFIG_OLD_CLK_AT91)
25#include "clock.h"
25/* -------------------------------------------------------------------- 26/* --------------------------------------------------------------------
26 * Clocks 27 * Clocks
27 * -------------------------------------------------------------------- */ 28 * -------------------------------------------------------------------- */
@@ -215,6 +216,9 @@ static void __init at91sam9n12_register_clocks(void)
215 ARRAY_SIZE(periph_clocks_lookups)); 216 ARRAY_SIZE(periph_clocks_lookups));
216 217
217} 218}
219#else
220#define at91sam9n12_register_clocks NULL
221#endif
218 222
219/* -------------------------------------------------------------------- 223/* --------------------------------------------------------------------
220 * AT91SAM9N12 processor initialization 224 * AT91SAM9N12 processor initialization
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c
index 57f12d86c0e6..a79960f57e6a 100644
--- a/arch/arm/mach-at91/at91sam9rl.c
+++ b/arch/arm/mach-at91/at91sam9rl.c
@@ -153,6 +153,11 @@ static struct clk ac97_clk = {
153 .pmc_mask = 1 << AT91SAM9RL_ID_AC97C, 153 .pmc_mask = 1 << AT91SAM9RL_ID_AC97C,
154 .type = CLK_TYPE_PERIPHERAL, 154 .type = CLK_TYPE_PERIPHERAL,
155}; 155};
156static struct clk adc_op_clk = {
157 .name = "adc_op_clk",
158 .type = CLK_TYPE_PERIPHERAL,
159 .rate_hz = 1000000,
160};
156 161
157static struct clk *periph_clocks[] __initdata = { 162static struct clk *periph_clocks[] __initdata = {
158 &pioA_clk, 163 &pioA_clk,
@@ -178,6 +183,7 @@ static struct clk *periph_clocks[] __initdata = {
178 &udphs_clk, 183 &udphs_clk,
179 &lcdc_clk, 184 &lcdc_clk,
180 &ac97_clk, 185 &ac97_clk,
186 &adc_op_clk,
181 // irq0 187 // irq0
182}; 188};
183 189
@@ -216,6 +222,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
216 CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioB_clk), 222 CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioB_clk),
217 CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioC_clk), 223 CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioC_clk),
218 CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioD_clk), 224 CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioD_clk),
225 CLKDEV_CON_ID("adc_clk", &tsc_clk),
219}; 226};
220 227
221static struct clk_lookup usart_clocks_lookups[] = { 228static struct clk_lookup usart_clocks_lookups[] = {
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index 428fc412aaf1..0b1d71a7d9bf 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -23,9 +23,11 @@
23#include <mach/at91sam9_smc.h> 23#include <mach/at91sam9_smc.h>
24#include <mach/hardware.h> 24#include <mach/hardware.h>
25#include <linux/platform_data/dma-atmel.h> 25#include <linux/platform_data/dma-atmel.h>
26#include <linux/platform_data/at91_adc.h>
26 27
27#include "board.h" 28#include "board.h"
28#include "generic.h" 29#include "generic.h"
30#include "gpio.h"
29 31
30 32
31/* -------------------------------------------------------------------- 33/* --------------------------------------------------------------------
@@ -608,14 +610,13 @@ static void __init at91_add_device_tc(void) { }
608 610
609 611
610/* -------------------------------------------------------------------- 612/* --------------------------------------------------------------------
611 * Touchscreen 613 * ADC and Touchscreen
612 * -------------------------------------------------------------------- */ 614 * -------------------------------------------------------------------- */
613 615
614#if defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) || defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC_MODULE) 616#if IS_ENABLED(CONFIG_AT91_ADC)
615static u64 tsadcc_dmamask = DMA_BIT_MASK(32); 617static struct at91_adc_data adc_data;
616static struct at91_tsadcc_data tsadcc_data;
617 618
618static struct resource tsadcc_resources[] = { 619static struct resource adc_resources[] = {
619 [0] = { 620 [0] = {
620 .start = AT91SAM9RL_BASE_TSC, 621 .start = AT91SAM9RL_BASE_TSC,
621 .end = AT91SAM9RL_BASE_TSC + SZ_16K - 1, 622 .end = AT91SAM9RL_BASE_TSC + SZ_16K - 1,
@@ -628,36 +629,71 @@ static struct resource tsadcc_resources[] = {
628 } 629 }
629}; 630};
630 631
631static struct platform_device at91sam9rl_tsadcc_device = { 632static struct platform_device at91_adc_device = {
632 .name = "atmel_tsadcc", 633 .name = "at91sam9rl-adc",
633 .id = -1, 634 .id = -1,
634 .dev = { 635 .dev = {
635 .dma_mask = &tsadcc_dmamask, 636 .platform_data = &adc_data,
636 .coherent_dma_mask = DMA_BIT_MASK(32),
637 .platform_data = &tsadcc_data,
638 }, 637 },
639 .resource = tsadcc_resources, 638 .resource = adc_resources,
640 .num_resources = ARRAY_SIZE(tsadcc_resources), 639 .num_resources = ARRAY_SIZE(adc_resources),
641}; 640};
642 641
643void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) 642static struct at91_adc_trigger at91_adc_triggers[] = {
643 [0] = {
644 .name = "external-rising",
645 .value = 1,
646 .is_external = true,
647 },
648 [1] = {
649 .name = "external-falling",
650 .value = 2,
651 .is_external = true,
652 },
653 [2] = {
654 .name = "external-any",
655 .value = 3,
656 .is_external = true,
657 },
658 [3] = {
659 .name = "continuous",
660 .value = 6,
661 .is_external = false,
662 },
663};
664
665void __init at91_add_device_adc(struct at91_adc_data *data)
644{ 666{
645 if (!data) 667 if (!data)
646 return; 668 return;
647 669
648 at91_set_A_periph(AT91_PIN_PA17, 0); /* AD0_XR */ 670 if (test_bit(0, &data->channels_used))
649 at91_set_A_periph(AT91_PIN_PA18, 0); /* AD1_XL */ 671 at91_set_A_periph(AT91_PIN_PA17, 0);
650 at91_set_A_periph(AT91_PIN_PA19, 0); /* AD2_YT */ 672 if (test_bit(1, &data->channels_used))
651 at91_set_A_periph(AT91_PIN_PA20, 0); /* AD3_TB */ 673 at91_set_A_periph(AT91_PIN_PA18, 0);
652 674 if (test_bit(2, &data->channels_used))
653 tsadcc_data = *data; 675 at91_set_A_periph(AT91_PIN_PA19, 0);
654 platform_device_register(&at91sam9rl_tsadcc_device); 676 if (test_bit(3, &data->channels_used))
677 at91_set_A_periph(AT91_PIN_PA20, 0);
678 if (test_bit(4, &data->channels_used))
679 at91_set_A_periph(AT91_PIN_PD6, 0);
680 if (test_bit(5, &data->channels_used))
681 at91_set_A_periph(AT91_PIN_PD7, 0);
682
683 if (data->use_external_triggers)
684 at91_set_A_periph(AT91_PIN_PB15, 0);
685
686 data->startup_time = 40;
687 data->trigger_number = 4;
688 data->trigger_list = at91_adc_triggers;
689
690 adc_data = *data;
691 platform_device_register(&at91_adc_device);
655} 692}
656#else 693#else
657void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) {} 694void __init at91_add_device_adc(struct at91_adc_data *data) {}
658#endif 695#endif
659 696
660
661/* -------------------------------------------------------------------- 697/* --------------------------------------------------------------------
662 * RTC 698 * RTC
663 * -------------------------------------------------------------------- */ 699 * -------------------------------------------------------------------- */
@@ -957,7 +993,6 @@ static struct resource dbgu_resources[] = {
957static struct atmel_uart_data dbgu_data = { 993static struct atmel_uart_data dbgu_data = {
958 .use_dma_tx = 0, 994 .use_dma_tx = 0,
959 .use_dma_rx = 0, /* DBGU not capable of receive DMA */ 995 .use_dma_rx = 0, /* DBGU not capable of receive DMA */
960 .rts_gpio = -EINVAL,
961}; 996};
962 997
963static u64 dbgu_dmamask = DMA_BIT_MASK(32); 998static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@ -996,7 +1031,6 @@ static struct resource uart0_resources[] = {
996static struct atmel_uart_data uart0_data = { 1031static struct atmel_uart_data uart0_data = {
997 .use_dma_tx = 1, 1032 .use_dma_tx = 1,
998 .use_dma_rx = 1, 1033 .use_dma_rx = 1,
999 .rts_gpio = -EINVAL,
1000}; 1034};
1001 1035
1002static u64 uart0_dmamask = DMA_BIT_MASK(32); 1036static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@ -1048,7 +1082,6 @@ static struct resource uart1_resources[] = {
1048static struct atmel_uart_data uart1_data = { 1082static struct atmel_uart_data uart1_data = {
1049 .use_dma_tx = 1, 1083 .use_dma_tx = 1,
1050 .use_dma_rx = 1, 1084 .use_dma_rx = 1,
1051 .rts_gpio = -EINVAL,
1052}; 1085};
1053 1086
1054static u64 uart1_dmamask = DMA_BIT_MASK(32); 1087static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@ -1092,7 +1125,6 @@ static struct resource uart2_resources[] = {
1092static struct atmel_uart_data uart2_data = { 1125static struct atmel_uart_data uart2_data = {
1093 .use_dma_tx = 1, 1126 .use_dma_tx = 1,
1094 .use_dma_rx = 1, 1127 .use_dma_rx = 1,
1095 .rts_gpio = -EINVAL,
1096}; 1128};
1097 1129
1098static u64 uart2_dmamask = DMA_BIT_MASK(32); 1130static u64 uart2_dmamask = DMA_BIT_MASK(32);
@@ -1136,7 +1168,6 @@ static struct resource uart3_resources[] = {
1136static struct atmel_uart_data uart3_data = { 1168static struct atmel_uart_data uart3_data = {
1137 .use_dma_tx = 1, 1169 .use_dma_tx = 1,
1138 .use_dma_rx = 1, 1170 .use_dma_rx = 1,
1139 .rts_gpio = -EINVAL,
1140}; 1171};
1141 1172
1142static u64 uart3_dmamask = DMA_BIT_MASK(32); 1173static u64 uart3_dmamask = DMA_BIT_MASK(32);
diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c
index 9ad781d5ee7c..028268ff3722 100644
--- a/arch/arm/mach-at91/at91sam9x5.c
+++ b/arch/arm/mach-at91/at91sam9x5.c
@@ -19,9 +19,10 @@
19#include "board.h" 19#include "board.h"
20#include "soc.h" 20#include "soc.h"
21#include "generic.h" 21#include "generic.h"
22#include "clock.h"
23#include "sam9_smc.h" 22#include "sam9_smc.h"
24 23
24#if defined(CONFIG_OLD_CLK_AT91)
25#include "clock.h"
25/* -------------------------------------------------------------------- 26/* --------------------------------------------------------------------
26 * Clocks 27 * Clocks
27 * -------------------------------------------------------------------- */ 28 * -------------------------------------------------------------------- */
@@ -313,6 +314,9 @@ static void __init at91sam9x5_register_clocks(void)
313 clk_register(&pck0); 314 clk_register(&pck0);
314 clk_register(&pck1); 315 clk_register(&pck1);
315} 316}
317#else
318#define at91sam9x5_register_clocks NULL
319#endif
316 320
317/* -------------------------------------------------------------------- 321/* --------------------------------------------------------------------
318 * AT91SAM9x5 processor initialization 322 * AT91SAM9x5 processor initialization
diff --git a/arch/arm/mach-at91/board-1arm.c b/arch/arm/mach-at91/board-1arm.c
index 35ab632bbf68..3f6dbcc34022 100644
--- a/arch/arm/mach-at91/board-1arm.c
+++ b/arch/arm/mach-at91/board-1arm.c
@@ -39,7 +39,7 @@
39#include "at91_aic.h" 39#include "at91_aic.h"
40#include "board.h" 40#include "board.h"
41#include "generic.h" 41#include "generic.h"
42 42#include "gpio.h"
43 43
44static void __init onearm_init_early(void) 44static void __init onearm_init_early(void)
45{ 45{
diff --git a/arch/arm/mach-at91/board-afeb-9260v1.c b/arch/arm/mach-at91/board-afeb-9260v1.c
index f95e31cda4b3..597c649170aa 100644
--- a/arch/arm/mach-at91/board-afeb-9260v1.c
+++ b/arch/arm/mach-at91/board-afeb-9260v1.c
@@ -46,6 +46,7 @@
46#include "at91_aic.h" 46#include "at91_aic.h"
47#include "board.h" 47#include "board.h"
48#include "generic.h" 48#include "generic.h"
49#include "gpio.h"
49 50
50 51
51static void __init afeb9260_init_early(void) 52static void __init afeb9260_init_early(void)
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c
index 112e867c4abe..a30502c8d379 100644
--- a/arch/arm/mach-at91/board-cam60.c
+++ b/arch/arm/mach-at91/board-cam60.c
@@ -44,6 +44,7 @@
44#include "board.h" 44#include "board.h"
45#include "sam9_smc.h" 45#include "sam9_smc.h"
46#include "generic.h" 46#include "generic.h"
47#include "gpio.h"
47 48
48 49
49static void __init cam60_init_early(void) 50static void __init cam60_init_early(void)
diff --git a/arch/arm/mach-at91/board-carmeva.c b/arch/arm/mach-at91/board-carmeva.c
index 92983050a9bd..47313d3ee037 100644
--- a/arch/arm/mach-at91/board-carmeva.c
+++ b/arch/arm/mach-at91/board-carmeva.c
@@ -39,6 +39,7 @@
39#include "at91_aic.h" 39#include "at91_aic.h"
40#include "board.h" 40#include "board.h"
41#include "generic.h" 41#include "generic.h"
42#include "gpio.h"
42 43
43 44
44static void __init carmeva_init_early(void) 45static void __init carmeva_init_early(void)
diff --git a/arch/arm/mach-at91/board-cpu9krea.c b/arch/arm/mach-at91/board-cpu9krea.c
index 008527efdbcf..2037f78c84e7 100644
--- a/arch/arm/mach-at91/board-cpu9krea.c
+++ b/arch/arm/mach-at91/board-cpu9krea.c
@@ -48,6 +48,7 @@
48#include "board.h" 48#include "board.h"
49#include "sam9_smc.h" 49#include "sam9_smc.h"
50#include "generic.h" 50#include "generic.h"
51#include "gpio.h"
51 52
52static void __init cpu9krea_init_early(void) 53static void __init cpu9krea_init_early(void)
53{ 54{
diff --git a/arch/arm/mach-at91/board-cpuat91.c b/arch/arm/mach-at91/board-cpuat91.c
index 42f1353a4baf..c094350c9314 100644
--- a/arch/arm/mach-at91/board-cpuat91.c
+++ b/arch/arm/mach-at91/board-cpuat91.c
@@ -43,6 +43,8 @@
43#include "at91_aic.h" 43#include "at91_aic.h"
44#include "board.h" 44#include "board.h"
45#include "generic.h" 45#include "generic.h"
46#include "gpio.h"
47
46 48
47static struct gpio_led cpuat91_leds[] = { 49static struct gpio_led cpuat91_leds[] = {
48 { 50 {
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c
index e5fde215225b..0e35a45cf8d4 100644
--- a/arch/arm/mach-at91/board-csb337.c
+++ b/arch/arm/mach-at91/board-csb337.c
@@ -42,7 +42,7 @@
42#include "at91_aic.h" 42#include "at91_aic.h"
43#include "board.h" 43#include "board.h"
44#include "generic.h" 44#include "generic.h"
45 45#include "gpio.h"
46 46
47static void __init csb337_init_early(void) 47static void __init csb337_init_early(void)
48{ 48{
diff --git a/arch/arm/mach-at91/board-csb637.c b/arch/arm/mach-at91/board-csb637.c
index fdf11061c577..18d027f529a8 100644
--- a/arch/arm/mach-at91/board-csb637.c
+++ b/arch/arm/mach-at91/board-csb637.c
@@ -39,6 +39,7 @@
39#include "at91_aic.h" 39#include "at91_aic.h"
40#include "board.h" 40#include "board.h"
41#include "generic.h" 41#include "generic.h"
42#include "gpio.h"
42 43
43 44
44static void __init csb637_init_early(void) 45static void __init csb637_init_early(void)
diff --git a/arch/arm/mach-at91/board-eb9200.c b/arch/arm/mach-at91/board-eb9200.c
index f9be8161bbfa..aa457a8b22f5 100644
--- a/arch/arm/mach-at91/board-eb9200.c
+++ b/arch/arm/mach-at91/board-eb9200.c
@@ -38,6 +38,7 @@
38#include "at91_aic.h" 38#include "at91_aic.h"
39#include "board.h" 39#include "board.h"
40#include "generic.h" 40#include "generic.h"
41#include "gpio.h"
41 42
42 43
43static void __init eb9200_init_early(void) 44static void __init eb9200_init_early(void)
diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c
index b2fcd71262ba..ede1373ccaba 100644
--- a/arch/arm/mach-at91/board-ecbat91.c
+++ b/arch/arm/mach-at91/board-ecbat91.c
@@ -42,6 +42,7 @@
42#include "at91_aic.h" 42#include "at91_aic.h"
43#include "board.h" 43#include "board.h"
44#include "generic.h" 44#include "generic.h"
45#include "gpio.h"
45 46
46 47
47static void __init ecb_at91init_early(void) 48static void __init ecb_at91init_early(void)
diff --git a/arch/arm/mach-at91/board-eco920.c b/arch/arm/mach-at91/board-eco920.c
index 77de410efc90..4e75321a8f2a 100644
--- a/arch/arm/mach-at91/board-eco920.c
+++ b/arch/arm/mach-at91/board-eco920.c
@@ -31,6 +31,8 @@
31#include "at91_aic.h" 31#include "at91_aic.h"
32#include "board.h" 32#include "board.h"
33#include "generic.h" 33#include "generic.h"
34#include "gpio.h"
35
34 36
35static void __init eco920_init_early(void) 37static void __init eco920_init_early(void)
36{ 38{
diff --git a/arch/arm/mach-at91/board-flexibity.c b/arch/arm/mach-at91/board-flexibity.c
index 737c08563628..68f1ab6bd08f 100644
--- a/arch/arm/mach-at91/board-flexibity.c
+++ b/arch/arm/mach-at91/board-flexibity.c
@@ -37,6 +37,7 @@
37#include "at91_aic.h" 37#include "at91_aic.h"
38#include "board.h" 38#include "board.h"
39#include "generic.h" 39#include "generic.h"
40#include "gpio.h"
40 41
41static void __init flexibity_init_early(void) 42static void __init flexibity_init_early(void)
42{ 43{
diff --git a/arch/arm/mach-at91/board-foxg20.c b/arch/arm/mach-at91/board-foxg20.c
index c20a870ea9c9..8b22c60bb238 100644
--- a/arch/arm/mach-at91/board-foxg20.c
+++ b/arch/arm/mach-at91/board-foxg20.c
@@ -47,6 +47,7 @@
47#include "board.h" 47#include "board.h"
48#include "sam9_smc.h" 48#include "sam9_smc.h"
49#include "generic.h" 49#include "generic.h"
50#include "gpio.h"
50 51
51/* 52/*
52 * The FOX Board G20 hardware comes as the "Netus G20" board with 53 * The FOX Board G20 hardware comes as the "Netus G20" board with
diff --git a/arch/arm/mach-at91/board-gsia18s.c b/arch/arm/mach-at91/board-gsia18s.c
index 416bae8435ee..b729dd1271bf 100644
--- a/arch/arm/mach-at91/board-gsia18s.c
+++ b/arch/arm/mach-at91/board-gsia18s.c
@@ -39,6 +39,7 @@
39#include "generic.h" 39#include "generic.h"
40#include "gsia18s.h" 40#include "gsia18s.h"
41#include "stamp9g20.h" 41#include "stamp9g20.h"
42#include "gpio.h"
42 43
43static void __init gsia18s_init_early(void) 44static void __init gsia18s_init_early(void)
44{ 45{
diff --git a/arch/arm/mach-at91/board-kafa.c b/arch/arm/mach-at91/board-kafa.c
index 88e2f5d2d16d..93b1df42f639 100644
--- a/arch/arm/mach-at91/board-kafa.c
+++ b/arch/arm/mach-at91/board-kafa.c
@@ -39,6 +39,7 @@
39#include "at91_aic.h" 39#include "at91_aic.h"
40#include "board.h" 40#include "board.h"
41#include "generic.h" 41#include "generic.h"
42#include "gpio.h"
42 43
43 44
44static void __init kafa_init_early(void) 45static void __init kafa_init_early(void)
diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c
index 0c519d9ebffc..d58d36225e08 100644
--- a/arch/arm/mach-at91/board-kb9202.c
+++ b/arch/arm/mach-at91/board-kb9202.c
@@ -42,6 +42,7 @@
42#include "at91_aic.h" 42#include "at91_aic.h"
43#include "board.h" 43#include "board.h"
44#include "generic.h" 44#include "generic.h"
45#include "gpio.h"
45 46
46 47
47static void __init kb9202_init_early(void) 48static void __init kb9202_init_early(void)
diff --git a/arch/arm/mach-at91/board-pcontrol-g20.c b/arch/arm/mach-at91/board-pcontrol-g20.c
index 5f25fa54eb93..b48d95ec5152 100644
--- a/arch/arm/mach-at91/board-pcontrol-g20.c
+++ b/arch/arm/mach-at91/board-pcontrol-g20.c
@@ -37,6 +37,7 @@
37#include "sam9_smc.h" 37#include "sam9_smc.h"
38#include "generic.h" 38#include "generic.h"
39#include "stamp9g20.h" 39#include "stamp9g20.h"
40#include "gpio.h"
40 41
41 42
42static void __init pcontrol_g20_init_early(void) 43static void __init pcontrol_g20_init_early(void)
diff --git a/arch/arm/mach-at91/board-picotux200.c b/arch/arm/mach-at91/board-picotux200.c
index ab2b2ec36c14..2c0f2d554d84 100644
--- a/arch/arm/mach-at91/board-picotux200.c
+++ b/arch/arm/mach-at91/board-picotux200.c
@@ -43,6 +43,7 @@
43#include "at91_aic.h" 43#include "at91_aic.h"
44#include "board.h" 44#include "board.h"
45#include "generic.h" 45#include "generic.h"
46#include "gpio.h"
46 47
47 48
48static void __init picotux200_init_early(void) 49static void __init picotux200_init_early(void)
diff --git a/arch/arm/mach-at91/board-rm9200ek.c b/arch/arm/mach-at91/board-rm9200ek.c
index 8b17dadc1aba..953cea416754 100644
--- a/arch/arm/mach-at91/board-rm9200ek.c
+++ b/arch/arm/mach-at91/board-rm9200ek.c
@@ -45,6 +45,7 @@
45#include "at91_aic.h" 45#include "at91_aic.h"
46#include "board.h" 46#include "board.h"
47#include "generic.h" 47#include "generic.h"
48#include "gpio.h"
48 49
49 50
50static void __init ek_init_early(void) 51static void __init ek_init_early(void)
diff --git a/arch/arm/mach-at91/board-rsi-ews.c b/arch/arm/mach-at91/board-rsi-ews.c
index f6d7f1958c7e..f28e8b74df4b 100644
--- a/arch/arm/mach-at91/board-rsi-ews.c
+++ b/arch/arm/mach-at91/board-rsi-ews.c
@@ -31,6 +31,7 @@
31#include "at91_aic.h" 31#include "at91_aic.h"
32#include "board.h" 32#include "board.h"
33#include "generic.h" 33#include "generic.h"
34#include "gpio.h"
34 35
35static void __init rsi_ews_init_early(void) 36static void __init rsi_ews_init_early(void)
36{ 37{
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c
index 43ee4dc43b50..d24dda67e2d3 100644
--- a/arch/arm/mach-at91/board-sam9-l9260.c
+++ b/arch/arm/mach-at91/board-sam9-l9260.c
@@ -43,6 +43,7 @@
43#include "board.h" 43#include "board.h"
44#include "sam9_smc.h" 44#include "sam9_smc.h"
45#include "generic.h" 45#include "generic.h"
46#include "gpio.h"
46 47
47 48
48static void __init ek_init_early(void) 49static void __init ek_init_early(void)
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c
index f4f8735315da..65dea12d685e 100644
--- a/arch/arm/mach-at91/board-sam9260ek.c
+++ b/arch/arm/mach-at91/board-sam9260ek.c
@@ -49,6 +49,7 @@
49#include "board.h" 49#include "board.h"
50#include "sam9_smc.h" 50#include "sam9_smc.h"
51#include "generic.h" 51#include "generic.h"
52#include "gpio.h"
52 53
53 54
54static void __init ek_init_early(void) 55static void __init ek_init_early(void)
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index 473546b9408b..4637432de08f 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -53,6 +53,7 @@
53#include "board.h" 53#include "board.h"
54#include "sam9_smc.h" 54#include "sam9_smc.h"
55#include "generic.h" 55#include "generic.h"
56#include "gpio.h"
56 57
57 58
58static void __init ek_init_early(void) 59static void __init ek_init_early(void)
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index 2f931915c80c..cd2726ee5add 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -52,6 +52,7 @@
52#include "board.h" 52#include "board.h"
53#include "sam9_smc.h" 53#include "sam9_smc.h"
54#include "generic.h" 54#include "generic.h"
55#include "gpio.h"
55 56
56 57
57static void __init ek_init_early(void) 58static void __init ek_init_early(void)
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c
index f9cd1f2c7146..e1be6e25b380 100644
--- a/arch/arm/mach-at91/board-sam9g20ek.c
+++ b/arch/arm/mach-at91/board-sam9g20ek.c
@@ -50,6 +50,7 @@
50#include "board.h" 50#include "board.h"
51#include "sam9_smc.h" 51#include "sam9_smc.h"
52#include "generic.h" 52#include "generic.h"
53#include "gpio.h"
53 54
54/* 55/*
55 * board revision encoding 56 * board revision encoding
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c
index ef39078c8ce2..1ea61328f30d 100644
--- a/arch/arm/mach-at91/board-sam9m10g45ek.c
+++ b/arch/arm/mach-at91/board-sam9m10g45ek.c
@@ -50,6 +50,7 @@
50#include "board.h" 50#include "board.h"
51#include "sam9_smc.h" 51#include "sam9_smc.h"
52#include "generic.h" 52#include "generic.h"
53#include "gpio.h"
53 54
54 55
55static void __init ek_init_early(void) 56static void __init ek_init_early(void)
@@ -300,21 +301,13 @@ static struct atmel_lcdfb_pdata __initdata ek_lcdc_data;
300 301
301 302
302/* 303/*
303 * Touchscreen 304 * ADCs and touchscreen
304 */
305static struct at91_tsadcc_data ek_tsadcc_data = {
306 .adc_clock = 300000,
307 .pendet_debounce = 0x0d,
308 .ts_sample_hold_time = 0x0a,
309};
310
311/*
312 * ADCs
313 */ 305 */
314static struct at91_adc_data ek_adc_data = { 306static struct at91_adc_data ek_adc_data = {
315 .channels_used = BIT(0) | BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5) | BIT(6) | BIT(7), 307 .channels_used = BIT(0) | BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5) | BIT(6) | BIT(7),
316 .use_external_triggers = true, 308 .use_external_triggers = true,
317 .vref = 3300, 309 .vref = 3300,
310 .touchscreen_type = ATMEL_ADC_TOUCHSCREEN_4WIRE,
318}; 311};
319 312
320/* 313/*
@@ -485,9 +478,7 @@ static void __init ek_board_init(void)
485 at91_add_device_isi(&isi_data, true); 478 at91_add_device_isi(&isi_data, true);
486 /* LCD Controller */ 479 /* LCD Controller */
487 at91_add_device_lcdc(&ek_lcdc_data); 480 at91_add_device_lcdc(&ek_lcdc_data);
488 /* Touch Screen */ 481 /* ADC and touchscreen */
489 at91_add_device_tsadcc(&ek_tsadcc_data);
490 /* ADC */
491 at91_add_device_adc(&ek_adc_data); 482 at91_add_device_adc(&ek_adc_data);
492 /* Push Buttons */ 483 /* Push Buttons */
493 ek_add_device_buttons(); 484 ek_add_device_buttons();
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c
index 604eecf6cd70..b64648b4a1fc 100644
--- a/arch/arm/mach-at91/board-sam9rlek.c
+++ b/arch/arm/mach-at91/board-sam9rlek.c
@@ -18,6 +18,7 @@
18#include <linux/clk.h> 18#include <linux/clk.h>
19#include <linux/input.h> 19#include <linux/input.h>
20#include <linux/gpio_keys.h> 20#include <linux/gpio_keys.h>
21#include <linux/platform_data/at91_adc.h>
21 22
22#include <video/atmel_lcdc.h> 23#include <video/atmel_lcdc.h>
23 24
@@ -38,6 +39,7 @@
38#include "board.h" 39#include "board.h"
39#include "sam9_smc.h" 40#include "sam9_smc.h"
40#include "generic.h" 41#include "generic.h"
42#include "gpio.h"
41 43
42 44
43static void __init ek_init_early(void) 45static void __init ek_init_early(void)
@@ -229,12 +231,13 @@ static struct gpio_led ek_leds[] = {
229 231
230 232
231/* 233/*
232 * Touchscreen 234 * ADC + Touchscreen
233 */ 235 */
234static struct at91_tsadcc_data ek_tsadcc_data = { 236static struct at91_adc_data ek_adc_data = {
235 .adc_clock = 1000000, 237 .channels_used = BIT(0) | BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5),
236 .pendet_debounce = 0x0f, 238 .use_external_triggers = true,
237 .ts_sample_hold_time = 0x03, 239 .vref = 3300,
240 .touchscreen_type = ATMEL_ADC_TOUCHSCREEN_4WIRE,
238}; 241};
239 242
240 243
@@ -310,8 +313,8 @@ static void __init ek_board_init(void)
310 at91_add_device_lcdc(&ek_lcdc_data); 313 at91_add_device_lcdc(&ek_lcdc_data);
311 /* AC97 */ 314 /* AC97 */
312 at91_add_device_ac97(&ek_ac97_data); 315 at91_add_device_ac97(&ek_ac97_data);
313 /* Touch Screen Controller */ 316 /* Touch Screen Controller + ADC */
314 at91_add_device_tsadcc(&ek_tsadcc_data); 317 at91_add_device_adc(&ek_adc_data);
315 /* LEDs */ 318 /* LEDs */
316 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds)); 319 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
317 /* Push Buttons */ 320 /* Push Buttons */
diff --git a/arch/arm/mach-at91/board-snapper9260.c b/arch/arm/mach-at91/board-snapper9260.c
index f1d49e929ccb..1b870e6def0c 100644
--- a/arch/arm/mach-at91/board-snapper9260.c
+++ b/arch/arm/mach-at91/board-snapper9260.c
@@ -38,6 +38,7 @@
38#include "board.h" 38#include "board.h"
39#include "sam9_smc.h" 39#include "sam9_smc.h"
40#include "generic.h" 40#include "generic.h"
41#include "gpio.h"
41 42
42#define SNAPPER9260_IO_EXP_GPIO(x) (NR_BUILTIN_GPIO + (x)) 43#define SNAPPER9260_IO_EXP_GPIO(x) (NR_BUILTIN_GPIO + (x))
43 44
diff --git a/arch/arm/mach-at91/board-stamp9g20.c b/arch/arm/mach-at91/board-stamp9g20.c
index e4a5ac17cdbc..3b575036ff96 100644
--- a/arch/arm/mach-at91/board-stamp9g20.c
+++ b/arch/arm/mach-at91/board-stamp9g20.c
@@ -32,6 +32,7 @@
32#include "board.h" 32#include "board.h"
33#include "sam9_smc.h" 33#include "sam9_smc.h"
34#include "generic.h" 34#include "generic.h"
35#include "gpio.h"
35 36
36 37
37void __init stamp9g20_init_early(void) 38void __init stamp9g20_init_early(void)
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c
index be083771df2e..46fdb0c68a68 100644
--- a/arch/arm/mach-at91/board-yl-9200.c
+++ b/arch/arm/mach-at91/board-yl-9200.c
@@ -50,6 +50,7 @@
50#include "at91_aic.h" 50#include "at91_aic.h"
51#include "board.h" 51#include "board.h"
52#include "generic.h" 52#include "generic.h"
53#include "gpio.h"
53 54
54 55
55static void __init yl9200_init_early(void) 56static void __init yl9200_init_early(void)
diff --git a/arch/arm/mach-at91/board.h b/arch/arm/mach-at91/board.h
index 6c08b341167d..4e773b55bc2d 100644
--- a/arch/arm/mach-at91/board.h
+++ b/arch/arm/mach-at91/board.h
@@ -118,9 +118,6 @@ struct isi_platform_data;
118extern void __init at91_add_device_isi(struct isi_platform_data *data, 118extern void __init at91_add_device_isi(struct isi_platform_data *data,
119 bool use_pck_as_mck); 119 bool use_pck_as_mck);
120 120
121 /* Touchscreen Controller */
122extern void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data);
123
124/* CAN */ 121/* CAN */
125extern void __init at91_add_device_can(struct at91_can_data *data); 122extern void __init at91_add_device_can(struct at91_can_data *data);
126 123
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c
index a5afcf76550e..d3f05aaad8ba 100644
--- a/arch/arm/mach-at91/gpio.c
+++ b/arch/arm/mach-at91/gpio.c
@@ -29,6 +29,7 @@
29#include <mach/at91_pio.h> 29#include <mach/at91_pio.h>
30 30
31#include "generic.h" 31#include "generic.h"
32#include "gpio.h"
32 33
33#define MAX_NB_GPIO_PER_BANK 32 34#define MAX_NB_GPIO_PER_BANK 32
34 35
@@ -49,6 +50,7 @@ static int at91_gpiolib_request(struct gpio_chip *chip, unsigned offset);
49static void at91_gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip); 50static void at91_gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip);
50static void at91_gpiolib_set(struct gpio_chip *chip, unsigned offset, int val); 51static void at91_gpiolib_set(struct gpio_chip *chip, unsigned offset, int val);
51static int at91_gpiolib_get(struct gpio_chip *chip, unsigned offset); 52static int at91_gpiolib_get(struct gpio_chip *chip, unsigned offset);
53static int at91_gpiolib_get_direction(struct gpio_chip *chip, unsigned offset);
52static int at91_gpiolib_direction_output(struct gpio_chip *chip, 54static int at91_gpiolib_direction_output(struct gpio_chip *chip,
53 unsigned offset, int val); 55 unsigned offset, int val);
54static int at91_gpiolib_direction_input(struct gpio_chip *chip, 56static int at91_gpiolib_direction_input(struct gpio_chip *chip,
@@ -60,6 +62,7 @@ static int at91_gpiolib_to_irq(struct gpio_chip *chip, unsigned offset);
60 .chip = { \ 62 .chip = { \
61 .label = name, \ 63 .label = name, \
62 .request = at91_gpiolib_request, \ 64 .request = at91_gpiolib_request, \
65 .get_direction = at91_gpiolib_get_direction, \
63 .direction_input = at91_gpiolib_direction_input, \ 66 .direction_input = at91_gpiolib_direction_input, \
64 .direction_output = at91_gpiolib_direction_output, \ 67 .direction_output = at91_gpiolib_direction_output, \
65 .get = at91_gpiolib_get, \ 68 .get = at91_gpiolib_get, \
@@ -799,6 +802,17 @@ static int at91_gpiolib_request(struct gpio_chip *chip, unsigned offset)
799 return 0; 802 return 0;
800} 803}
801 804
805static int at91_gpiolib_get_direction(struct gpio_chip *chip, unsigned offset)
806{
807 struct at91_gpio_chip *at91_gpio = to_at91_gpio_chip(chip);
808 void __iomem *pio = at91_gpio->regbase;
809 unsigned mask = 1 << offset;
810 u32 osr;
811
812 osr = __raw_readl(pio + PIO_OSR);
813 return !(osr & mask);
814}
815
802static int at91_gpiolib_direction_input(struct gpio_chip *chip, 816static int at91_gpiolib_direction_input(struct gpio_chip *chip,
803 unsigned offset) 817 unsigned offset)
804{ 818{
diff --git a/arch/arm/mach-at91/include/mach/gpio.h b/arch/arm/mach-at91/gpio.h
index 5fc23771c154..eed465ab0dd7 100644
--- a/arch/arm/mach-at91/include/mach/gpio.h
+++ b/arch/arm/mach-at91/gpio.h
@@ -209,14 +209,6 @@ extern int at91_get_gpio_value(unsigned pin);
209extern void at91_gpio_suspend(void); 209extern void at91_gpio_suspend(void);
210extern void at91_gpio_resume(void); 210extern void at91_gpio_resume(void);
211 211
212#ifdef CONFIG_PINCTRL_AT91
213extern void at91_pinctrl_gpio_suspend(void);
214extern void at91_pinctrl_gpio_resume(void);
215#else
216static inline void at91_pinctrl_gpio_suspend(void) {}
217static inline void at91_pinctrl_gpio_resume(void) {}
218#endif
219
220#endif /* __ASSEMBLY__ */ 212#endif /* __ASSEMBLY__ */
221 213
222#endif 214#endif
diff --git a/arch/arm/mach-at91/include/mach/at91_adc.h b/arch/arm/mach-at91/include/mach/at91_adc.h
deleted file mode 100644
index c287307b9a3b..000000000000
--- a/arch/arm/mach-at91/include/mach/at91_adc.h
+++ /dev/null
@@ -1,107 +0,0 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_adc.h
3 *
4 * Copyright (C) SAN People
5 *
6 * Analog-to-Digital Converter (ADC) registers.
7 * Based on AT91SAM9260 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 AT91_ADC_H
16#define AT91_ADC_H
17
18#define AT91_ADC_CR 0x00 /* Control Register */
19#define AT91_ADC_SWRST (1 << 0) /* Software Reset */
20#define AT91_ADC_START (1 << 1) /* Start Conversion */
21
22#define AT91_ADC_MR 0x04 /* Mode Register */
23#define AT91_ADC_TRGEN (1 << 0) /* Trigger Enable */
24#define AT91_ADC_TRGSEL (7 << 1) /* Trigger Selection */
25#define AT91_ADC_TRGSEL_TC0 (0 << 1)
26#define AT91_ADC_TRGSEL_TC1 (1 << 1)
27#define AT91_ADC_TRGSEL_TC2 (2 << 1)
28#define AT91_ADC_TRGSEL_EXTERNAL (6 << 1)
29#define AT91_ADC_LOWRES (1 << 4) /* Low Resolution */
30#define AT91_ADC_SLEEP (1 << 5) /* Sleep Mode */
31#define AT91_ADC_PRESCAL_9260 (0x3f << 8) /* Prescalar Rate Selection */
32#define AT91_ADC_PRESCAL_9G45 (0xff << 8)
33#define AT91_ADC_PRESCAL_(x) ((x) << 8)
34#define AT91_ADC_STARTUP_9260 (0x1f << 16) /* Startup Up Time */
35#define AT91_ADC_STARTUP_9G45 (0x7f << 16)
36#define AT91_ADC_STARTUP_9X5 (0xf << 16)
37#define AT91_ADC_STARTUP_(x) ((x) << 16)
38#define AT91_ADC_SHTIM (0xf << 24) /* Sample & Hold Time */
39#define AT91_ADC_SHTIM_(x) ((x) << 24)
40
41#define AT91_ADC_CHER 0x10 /* Channel Enable Register */
42#define AT91_ADC_CHDR 0x14 /* Channel Disable Register */
43#define AT91_ADC_CHSR 0x18 /* Channel Status Register */
44#define AT91_ADC_CH(n) (1 << (n)) /* Channel Number */
45
46#define AT91_ADC_SR 0x1C /* Status Register */
47#define AT91_ADC_EOC(n) (1 << (n)) /* End of Conversion on Channel N */
48#define AT91_ADC_OVRE(n) (1 << ((n) + 8))/* Overrun Error on Channel N */
49#define AT91_ADC_DRDY (1 << 16) /* Data Ready */
50#define AT91_ADC_GOVRE (1 << 17) /* General Overrun Error */
51#define AT91_ADC_ENDRX (1 << 18) /* End of RX Buffer */
52#define AT91_ADC_RXFUFF (1 << 19) /* RX Buffer Full */
53
54#define AT91_ADC_SR_9X5 0x30 /* Status Register for 9x5 */
55#define AT91_ADC_SR_DRDY_9X5 (1 << 24) /* Data Ready */
56
57#define AT91_ADC_LCDR 0x20 /* Last Converted Data Register */
58#define AT91_ADC_LDATA (0x3ff)
59
60#define AT91_ADC_IER 0x24 /* Interrupt Enable Register */
61#define AT91_ADC_IDR 0x28 /* Interrupt Disable Register */
62#define AT91_ADC_IMR 0x2C /* Interrupt Mask Register */
63#define AT91_ADC_IER_PEN (1 << 29)
64#define AT91_ADC_IER_NOPEN (1 << 30)
65#define AT91_ADC_IER_XRDY (1 << 20)
66#define AT91_ADC_IER_YRDY (1 << 21)
67#define AT91_ADC_IER_PRDY (1 << 22)
68#define AT91_ADC_ISR_PENS (1 << 31)
69
70#define AT91_ADC_CHR(n) (0x30 + ((n) * 4)) /* Channel Data Register N */
71#define AT91_ADC_DATA (0x3ff)
72
73#define AT91_ADC_CDR0_9X5 (0x50) /* Channel Data Register 0 for 9X5 */
74
75#define AT91_ADC_ACR 0x94 /* Analog Control Register */
76#define AT91_ADC_ACR_PENDETSENS (0x3 << 0) /* pull-up resistor */
77
78#define AT91_ADC_TSMR 0xB0
79#define AT91_ADC_TSMR_TSMODE (3 << 0) /* Touch Screen Mode */
80#define AT91_ADC_TSMR_TSMODE_NONE (0 << 0)
81#define AT91_ADC_TSMR_TSMODE_4WIRE_NO_PRESS (1 << 0)
82#define AT91_ADC_TSMR_TSMODE_4WIRE_PRESS (2 << 0)
83#define AT91_ADC_TSMR_TSMODE_5WIRE (3 << 0)
84#define AT91_ADC_TSMR_TSAV (3 << 4) /* Averages samples */
85#define AT91_ADC_TSMR_TSAV_(x) ((x) << 4)
86#define AT91_ADC_TSMR_SCTIM (0x0f << 16) /* Switch closure time */
87#define AT91_ADC_TSMR_PENDBC (0x0f << 28) /* Pen Debounce time */
88#define AT91_ADC_TSMR_PENDBC_(x) ((x) << 28)
89#define AT91_ADC_TSMR_NOTSDMA (1 << 22) /* No Touchscreen DMA */
90#define AT91_ADC_TSMR_PENDET_DIS (0 << 24) /* Pen contact detection disable */
91#define AT91_ADC_TSMR_PENDET_ENA (1 << 24) /* Pen contact detection enable */
92
93#define AT91_ADC_TSXPOSR 0xB4
94#define AT91_ADC_TSYPOSR 0xB8
95#define AT91_ADC_TSPRESSR 0xBC
96
97#define AT91_ADC_TRGR_9260 AT91_ADC_MR
98#define AT91_ADC_TRGR_9G45 0x08
99#define AT91_ADC_TRGR_9X5 0xC0
100
101/* Trigger Register bit field */
102#define AT91_ADC_TRGR_TRGPER (0xffff << 16)
103#define AT91_ADC_TRGR_TRGPER_(x) ((x) << 16)
104#define AT91_ADC_TRGR_TRGMOD (0x7 << 0)
105#define AT91_ADC_TRGR_MOD_PERIOD_TRIG (5 << 0)
106
107#endif
diff --git a/arch/arm/mach-at91/include/mach/hardware.h b/arch/arm/mach-at91/include/mach/hardware.h
index f17aa3150019..56338245653a 100644
--- a/arch/arm/mach-at91/include/mach/hardware.h
+++ b/arch/arm/mach-at91/include/mach/hardware.h
@@ -104,5 +104,20 @@
104/* Clocks */ 104/* Clocks */
105#define AT91_SLOW_CLOCK 32768 /* slow clock */ 105#define AT91_SLOW_CLOCK 32768 /* slow clock */
106 106
107/*
108 * FIXME: this is needed to communicate between the pinctrl driver and
109 * the PM implementation in the machine. Possibly part of the PM
110 * implementation should be moved down into the pinctrl driver and get
111 * called as part of the generic suspend/resume path.
112 */
113#ifndef __ASSEMBLY__
114#ifdef CONFIG_PINCTRL_AT91
115extern void at91_pinctrl_gpio_suspend(void);
116extern void at91_pinctrl_gpio_resume(void);
117#else
118static inline void at91_pinctrl_gpio_suspend(void) {}
119static inline void at91_pinctrl_gpio_resume(void) {}
120#endif
121#endif
107 122
108#endif 123#endif
diff --git a/arch/arm/mach-at91/leds.c b/arch/arm/mach-at91/leds.c
index 3e22978b5547..77c4d8fd03fd 100644
--- a/arch/arm/mach-at91/leds.c
+++ b/arch/arm/mach-at91/leds.c
@@ -16,6 +16,7 @@
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17 17
18#include "board.h" 18#include "board.h"
19#include "gpio.h"
19 20
20 21
21/* ------------------------------------------------------------------------- */ 22/* ------------------------------------------------------------------------- */
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 8bda1cefdf96..e95554532987 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -32,6 +32,7 @@
32#include "at91_aic.h" 32#include "at91_aic.h"
33#include "generic.h" 33#include "generic.h"
34#include "pm.h" 34#include "pm.h"
35#include "gpio.h"
35 36
36/* 37/*
37 * Show the reason for the previous system reset. 38 * Show the reason for the previous system reset.
diff --git a/arch/arm/mach-at91/sysirq_mask.c b/arch/arm/mach-at91/sysirq_mask.c
index 2ba694f9626b..f8bc3511a8c8 100644
--- a/arch/arm/mach-at91/sysirq_mask.c
+++ b/arch/arm/mach-at91/sysirq_mask.c
@@ -25,24 +25,28 @@
25 25
26#include "generic.h" 26#include "generic.h"
27 27
28#define AT91_RTC_IDR 0x24 /* Interrupt Disable Register */ 28#define AT91_RTC_IDR 0x24 /* Interrupt Disable Register */
29#define AT91_RTC_IMR 0x28 /* Interrupt Mask Register */ 29#define AT91_RTC_IMR 0x28 /* Interrupt Mask Register */
30#define AT91_RTC_IRQ_MASK 0x1f /* Available IRQs mask */
30 31
31void __init at91_sysirq_mask_rtc(u32 rtc_base) 32void __init at91_sysirq_mask_rtc(u32 rtc_base)
32{ 33{
33 void __iomem *base; 34 void __iomem *base;
34 u32 mask;
35 35
36 base = ioremap(rtc_base, 64); 36 base = ioremap(rtc_base, 64);
37 if (!base) 37 if (!base)
38 return; 38 return;
39 39
40 mask = readl_relaxed(base + AT91_RTC_IMR); 40 /*
41 if (mask) { 41 * sam9x5 SoCs have the following errata:
42 pr_info("AT91: Disabling rtc irq\n"); 42 * "RTC: Interrupt Mask Register cannot be used
43 writel_relaxed(mask, base + AT91_RTC_IDR); 43 * Interrupt Mask Register read always returns 0."
44 (void)readl_relaxed(base + AT91_RTC_IMR); /* flush */ 44 *
45 } 45 * Hence we're not relying on IMR values to disable
46 * interrupts.
47 */
48 writel_relaxed(AT91_RTC_IRQ_MASK, base + AT91_RTC_IDR);
49 (void)readl_relaxed(base + AT91_RTC_IMR); /* flush */
46 50
47 iounmap(base); 51 iounmap(base);
48} 52}
diff --git a/arch/arm/mach-axxia/Kconfig b/arch/arm/mach-axxia/Kconfig
new file mode 100644
index 000000000000..8be7e0ae1922
--- /dev/null
+++ b/arch/arm/mach-axxia/Kconfig
@@ -0,0 +1,16 @@
1config ARCH_AXXIA
2 bool "LSI Axxia platforms" if (ARCH_MULTI_V7 && ARM_LPAE)
3 select ARCH_DMA_ADDR_T_64BIT
4 select ARM_AMBA
5 select ARM_GIC
6 select ARM_TIMER_SP804
7 select HAVE_ARM_ARCH_TIMER
8 select MFD_SYSCON
9 select MIGHT_HAVE_PCI
10 select PCI_DOMAINS if PCI
11 select ZONE_DMA
12 help
13 This enables support for the LSI Axxia devices.
14
15 The LSI Axxia platforms require a Flattened Device Tree to be passed
16 to the kernel.
diff --git a/arch/arm/mach-axxia/Makefile b/arch/arm/mach-axxia/Makefile
new file mode 100644
index 000000000000..ec4f68b460c6
--- /dev/null
+++ b/arch/arm/mach-axxia/Makefile
@@ -0,0 +1,2 @@
1obj-y += axxia.o
2obj-$(CONFIG_SMP) += platsmp.o
diff --git a/arch/arm/mach-axxia/axxia.c b/arch/arm/mach-axxia/axxia.c
new file mode 100644
index 000000000000..19e5a1d95397
--- /dev/null
+++ b/arch/arm/mach-axxia/axxia.c
@@ -0,0 +1,28 @@
1/*
2 * Support for the LSI Axxia SoC devices based on ARM cores.
3 *
4 * Copyright (C) 2012 LSI
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#include <linux/init.h>
17#include <asm/mach/arch.h>
18
19static const char *axxia_dt_match[] __initconst = {
20 "lsi,axm5516",
21 "lsi,axm5516-sim",
22 "lsi,axm5516-emu",
23 NULL
24};
25
26DT_MACHINE_START(AXXIA_DT, "LSI Axxia AXM55XX")
27 .dt_compat = axxia_dt_match,
28MACHINE_END
diff --git a/arch/arm/mach-axxia/platsmp.c b/arch/arm/mach-axxia/platsmp.c
new file mode 100644
index 000000000000..959d4df3d2b6
--- /dev/null
+++ b/arch/arm/mach-axxia/platsmp.c
@@ -0,0 +1,89 @@
1/*
2 * linux/arch/arm/mach-axxia/platsmp.c
3 *
4 * Copyright (C) 2012 LSI Corporation
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
11#include <linux/init.h>
12#include <linux/io.h>
13#include <linux/smp.h>
14#include <linux/of.h>
15#include <linux/of_address.h>
16#include <asm/cacheflush.h>
17
18/* Syscon register offsets for releasing cores from reset */
19#define SC_CRIT_WRITE_KEY 0x1000
20#define SC_RST_CPU_HOLD 0x1010
21
22/*
23 * Write the kernel entry point for secondary CPUs to the specified address
24 */
25static void write_release_addr(u32 release_phys)
26{
27 u32 *virt = (u32 *) phys_to_virt(release_phys);
28 writel_relaxed(virt_to_phys(secondary_startup), virt);
29 /* Make sure this store is visible to other CPUs */
30 smp_wmb();
31 __cpuc_flush_dcache_area(virt, sizeof(u32));
32}
33
34static int axxia_boot_secondary(unsigned int cpu, struct task_struct *idle)
35{
36 struct device_node *syscon_np;
37 void __iomem *syscon;
38 u32 tmp;
39
40 syscon_np = of_find_compatible_node(NULL, NULL, "lsi,axxia-syscon");
41 if (!syscon_np)
42 return -ENOENT;
43
44 syscon = of_iomap(syscon_np, 0);
45 if (!syscon)
46 return -ENOMEM;
47
48 tmp = readl(syscon + SC_RST_CPU_HOLD);
49 writel(0xab, syscon + SC_CRIT_WRITE_KEY);
50 tmp &= ~(1 << cpu);
51 writel(tmp, syscon + SC_RST_CPU_HOLD);
52
53 return 0;
54}
55
56static void __init axxia_smp_prepare_cpus(unsigned int max_cpus)
57{
58 int cpu_count = 0;
59 int cpu;
60
61 /*
62 * Initialise the present map, which describes the set of CPUs actually
63 * populated at the present time.
64 */
65 for_each_possible_cpu(cpu) {
66 struct device_node *np;
67 u32 release_phys;
68
69 np = of_get_cpu_node(cpu, NULL);
70 if (!np)
71 continue;
72 if (of_property_read_u32(np, "cpu-release-addr", &release_phys))
73 continue;
74
75 if (cpu_count < max_cpus) {
76 set_cpu_present(cpu, true);
77 cpu_count++;
78 }
79
80 if (release_phys != 0)
81 write_release_addr(release_phys);
82 }
83}
84
85static struct smp_operations axxia_smp_ops __initdata = {
86 .smp_prepare_cpus = axxia_smp_prepare_cpus,
87 .smp_boot_secondary = axxia_boot_secondary,
88};
89CPU_METHOD_OF_DECLARE(axxia_smp, "lsi,syscon-release", &axxia_smp_ops);
diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
index 49c914cd9c7a..9bc6db1c1348 100644
--- a/arch/arm/mach-bcm/Kconfig
+++ b/arch/arm/mach-bcm/Kconfig
@@ -1,31 +1,58 @@
1config ARCH_BCM 1config ARCH_BCM
2 bool "Broadcom SoC Support" 2 bool "Broadcom SoC Support" if ARCH_MULTI_V6_V7
3 depends on ARCH_MULTIPLATFORM
4 help 3 help
5 This enables support for Broadcom ARM based SoC 4 This enables support for Broadcom ARM based SoC chips
6 chips
7
8if ARCH_BCM
9 5
10menu "Broadcom SoC Selection" 6menu "Broadcom SoC Selection"
7 depends on ARCH_BCM
11 8
12config ARCH_BCM_MOBILE 9config ARCH_BCM_MOBILE
13 bool "Broadcom Mobile SoC" if ARCH_MULTI_V7 10 bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7
14 depends on MMU
15 select ARCH_REQUIRE_GPIOLIB 11 select ARCH_REQUIRE_GPIOLIB
16 select ARM_ERRATA_754322 12 select ARM_ERRATA_754322
17 select ARM_ERRATA_764369 if SMP 13 select ARM_ERRATA_764369 if SMP
14 select ARM_ERRATA_775420
18 select ARM_GIC 15 select ARM_GIC
19 select GPIO_BCM_KONA 16 select GPIO_BCM_KONA
20 select TICK_ONESHOT 17 select TICK_ONESHOT
21 select CACHE_L2X0
22 select HAVE_ARM_ARCH_TIMER 18 select HAVE_ARM_ARCH_TIMER
23 select PINCTRL 19 select PINCTRL
24 help 20 help
25 This enables support for systems based on Broadcom mobile SoCs. 21 This enables support for systems based on Broadcom mobile SoCs.
26 It currently supports the 'BCM281XX' family, which includes 22
27 BCM11130, BCM11140, BCM11351, BCM28145 and 23if ARCH_BCM_MOBILE
28 BCM28155 variants. 24
25menu "Broadcom Mobile SoC Selection"
26
27config ARCH_BCM_281XX
28 bool "Broadcom BCM281XX SoC family"
29 default y
30 help
31 Enable support for the the BCM281XX family, which includes
32 BCM11130, BCM11140, BCM11351, BCM28145 and BCM28155
33 variants.
34
35config ARCH_BCM_21664
36 bool "Broadcom BCM21664 SoC family"
37 default y
38 help
39 Enable support for the the BCM21664 family, which includes
40 BCM21663 and BCM21664 variants.
41
42config ARCH_BCM_MOBILE_L2_CACHE
43 bool "Broadcom mobile SoC level 2 cache support"
44 depends on (ARCH_BCM_281XX || ARCH_BCM_21664)
45 default y
46 select CACHE_L2X0
47 select ARCH_BCM_MOBILE_SMC
48
49config ARCH_BCM_MOBILE_SMC
50 bool
51 depends on ARCH_BCM_281XX || ARCH_BCM_21664
52
53endmenu
54
55endif
29 56
30config ARCH_BCM2835 57config ARCH_BCM2835
31 bool "Broadcom BCM2835 family" if ARCH_MULTI_V6 58 bool "Broadcom BCM2835 family" if ARCH_MULTI_V6
@@ -33,10 +60,7 @@ config ARCH_BCM2835
33 select ARM_AMBA 60 select ARM_AMBA
34 select ARM_ERRATA_411920 61 select ARM_ERRATA_411920
35 select ARM_TIMER_SP804 62 select ARM_TIMER_SP804
36 select CLKDEV_LOOKUP
37 select CLKSRC_OF 63 select CLKSRC_OF
38 select CPU_V6
39 select GENERIC_CLOCKEVENTS
40 select PINCTRL 64 select PINCTRL
41 select PINCTRL_BCM2835 65 select PINCTRL_BCM2835
42 help 66 help
@@ -45,17 +69,12 @@ config ARCH_BCM2835
45 69
46config ARCH_BCM_5301X 70config ARCH_BCM_5301X
47 bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7 71 bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7
48 depends on MMU
49 select ARM_GIC 72 select ARM_GIC
50 select CACHE_L2X0 73 select CACHE_L2X0
51 select HAVE_ARM_SCU if SMP 74 select HAVE_ARM_SCU if SMP
52 select HAVE_ARM_TWD if SMP 75 select HAVE_ARM_TWD if SMP
53 select HAVE_SMP
54 select COMMON_CLK
55 select GENERIC_CLOCKEVENTS
56 select ARM_GLOBAL_TIMER 76 select ARM_GLOBAL_TIMER
57 select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK 77 select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
58 select MIGHT_HAVE_PCI
59 help 78 help
60 Support for Broadcom BCM470X and BCM5301X SoCs with ARM CPU cores. 79 Support for Broadcom BCM470X and BCM5301X SoCs with ARM CPU cores.
61 80
@@ -70,5 +89,3 @@ config ARCH_BCM_5301X
70 network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx 89 network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx
71 90
72endmenu 91endmenu
73
74endif
diff --git a/arch/arm/mach-bcm/Makefile b/arch/arm/mach-bcm/Makefile
index a326b28c4406..731292114975 100644
--- a/arch/arm/mach-bcm/Makefile
+++ b/arch/arm/mach-bcm/Makefile
@@ -10,10 +10,23 @@
10# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details. 11# GNU General Public License for more details.
12 12
13obj-$(CONFIG_ARCH_BCM_MOBILE) := board_bcm281xx.o board_bcm21664.o \ 13# BCM281XX
14 bcm_kona_smc.o bcm_kona_smc_asm.o kona.o 14obj-$(CONFIG_ARCH_BCM_281XX) += board_bcm281xx.o
15
16# BCM21664
17obj-$(CONFIG_ARCH_BCM_21664) += board_bcm21664.o
18
19# BCM281XX and BCM21664 L2 cache control
20obj-$(CONFIG_ARCH_BCM_MOBILE_L2_CACHE) += kona_l2_cache.o
21
22# Support for secure monitor traps
23obj-$(CONFIG_ARCH_BCM_MOBILE_SMC) += bcm_kona_smc.o
24ifeq ($(call as-instr,.arch_extension sec,as_has_sec),as_has_sec)
25CFLAGS_bcm_kona_smc.o += -Wa,-march=armv7-a+sec -DREQUIRES_SEC
26endif
27
28# BCM2835
15obj-$(CONFIG_ARCH_BCM2835) += board_bcm2835.o 29obj-$(CONFIG_ARCH_BCM2835) += board_bcm2835.o
16 30
17plus_sec := $(call as-instr,.arch_extension sec,+sec) 31# BCM5301X
18AFLAGS_bcm_kona_smc_asm.o :=-Wa,-march=armv7-a$(plus_sec)
19obj-$(CONFIG_ARCH_BCM_5301X) += bcm_5301x.o 32obj-$(CONFIG_ARCH_BCM_5301X) += bcm_5301x.o
diff --git a/arch/arm/mach-bcm/bcm_5301x.c b/arch/arm/mach-bcm/bcm_5301x.c
index edff69761e04..e9bcbdbce555 100644
--- a/arch/arm/mach-bcm/bcm_5301x.c
+++ b/arch/arm/mach-bcm/bcm_5301x.c
@@ -43,19 +43,14 @@ static void __init bcm5301x_init_early(void)
43 "imprecise external abort"); 43 "imprecise external abort");
44} 44}
45 45
46static void __init bcm5301x_dt_init(void)
47{
48 l2x0_of_init(0, ~0UL);
49 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
50}
51
52static const char __initconst *bcm5301x_dt_compat[] = { 46static const char __initconst *bcm5301x_dt_compat[] = {
53 "brcm,bcm4708", 47 "brcm,bcm4708",
54 NULL, 48 NULL,
55}; 49};
56 50
57DT_MACHINE_START(BCM5301X, "BCM5301X") 51DT_MACHINE_START(BCM5301X, "BCM5301X")
52 .l2c_aux_val = 0,
53 .l2c_aux_mask = ~0,
58 .init_early = bcm5301x_init_early, 54 .init_early = bcm5301x_init_early,
59 .init_machine = bcm5301x_dt_init,
60 .dt_compat = bcm5301x_dt_compat, 55 .dt_compat = bcm5301x_dt_compat,
61MACHINE_END 56MACHINE_END
diff --git a/arch/arm/mach-bcm/bcm_kona_smc.c b/arch/arm/mach-bcm/bcm_kona_smc.c
index 5e31e918f325..a55a7ecf146a 100644
--- a/arch/arm/mach-bcm/bcm_kona_smc.c
+++ b/arch/arm/mach-bcm/bcm_kona_smc.c
@@ -21,11 +21,8 @@
21 21
22#include "bcm_kona_smc.h" 22#include "bcm_kona_smc.h"
23 23
24struct secure_bridge_data { 24static u32 bcm_smc_buffer_phys; /* physical address */
25 void __iomem *bounce; /* virtual address */ 25static void __iomem *bcm_smc_buffer; /* virtual address */
26 u32 __iomem buffer_addr; /* physical address */
27 int initialized;
28} bridge_data;
29 26
30struct bcm_kona_smc_data { 27struct bcm_kona_smc_data {
31 unsigned service_id; 28 unsigned service_id;
@@ -33,6 +30,7 @@ struct bcm_kona_smc_data {
33 unsigned arg1; 30 unsigned arg1;
34 unsigned arg2; 31 unsigned arg2;
35 unsigned arg3; 32 unsigned arg3;
33 unsigned result;
36}; 34};
37 35
38static const struct of_device_id bcm_kona_smc_ids[] __initconst = { 36static const struct of_device_id bcm_kona_smc_ids[] __initconst = {
@@ -41,59 +39,125 @@ static const struct of_device_id bcm_kona_smc_ids[] __initconst = {
41 {}, 39 {},
42}; 40};
43 41
44/* Map in the bounce area */ 42/* Map in the args buffer area */
45int __init bcm_kona_smc_init(void) 43int __init bcm_kona_smc_init(void)
46{ 44{
47 struct device_node *node; 45 struct device_node *node;
46 const __be32 *prop_val;
47 u64 prop_size = 0;
48 unsigned long buffer_size;
49 u32 buffer_phys;
48 50
49 /* Read buffer addr and size from the device tree node */ 51 /* Read buffer addr and size from the device tree node */
50 node = of_find_matching_node(NULL, bcm_kona_smc_ids); 52 node = of_find_matching_node(NULL, bcm_kona_smc_ids);
51 if (!node) 53 if (!node)
52 return -ENODEV; 54 return -ENODEV;
53 55
54 /* Don't care about size or flags of the DT node */ 56 prop_val = of_get_address(node, 0, &prop_size, NULL);
55 bridge_data.buffer_addr = 57 if (!prop_val)
56 be32_to_cpu(*of_get_address(node, 0, NULL, NULL)); 58 return -EINVAL;
57 BUG_ON(!bridge_data.buffer_addr);
58 59
59 bridge_data.bounce = of_iomap(node, 0); 60 /* We assume space for four 32-bit arguments */
60 BUG_ON(!bridge_data.bounce); 61 if (prop_size < 4 * sizeof(u32) || prop_size > (u64)ULONG_MAX)
62 return -EINVAL;
63 buffer_size = (unsigned long)prop_size;
61 64
62 bridge_data.initialized = 1; 65 buffer_phys = be32_to_cpup(prop_val);
66 if (!buffer_phys)
67 return -EINVAL;
68
69 bcm_smc_buffer = ioremap(buffer_phys, buffer_size);
70 if (!bcm_smc_buffer)
71 return -ENOMEM;
72 bcm_smc_buffer_phys = buffer_phys;
63 73
64 pr_info("Kona Secure API initialized\n"); 74 pr_info("Kona Secure API initialized\n");
65 75
66 return 0; 76 return 0;
67} 77}
68 78
79/*
80 * int bcm_kona_do_smc(u32 service_id, u32 buffer_addr)
81 *
82 * Only core 0 can run the secure monitor code. If an "smc" request
83 * is initiated on a different core it must be redirected to core 0
84 * for execution. We rely on the caller to handle this.
85 *
86 * Each "smc" request supplies a service id and the address of a
87 * buffer containing parameters related to the service to be
88 * performed. A flags value defines the behavior of the level 2
89 * cache and interrupt handling while the secure monitor executes.
90 *
91 * Parameters to the "smc" request are passed in r4-r6 as follows:
92 * r4 service id
93 * r5 flags (SEC_ROM_*)
94 * r6 physical address of buffer with other parameters
95 *
96 * Execution of an "smc" request produces two distinct results.
97 *
98 * First, the secure monitor call itself (regardless of the specific
99 * service request) can succeed, or can produce an error. When an
100 * "smc" request completes this value is found in r12; it should
101 * always be SEC_EXIT_NORMAL.
102 *
103 * In addition, the particular service performed produces a result.
104 * The values that should be expected depend on the service. We
105 * therefore return this value to the caller, so it can handle the
106 * request result appropriately. This result value is found in r0
107 * when the "smc" request completes.
108 */
109static int bcm_kona_do_smc(u32 service_id, u32 buffer_phys)
110{
111 register u32 ip asm("ip"); /* Also called r12 */
112 register u32 r0 asm("r0");
113 register u32 r4 asm("r4");
114 register u32 r5 asm("r5");
115 register u32 r6 asm("r6");
116
117 r4 = service_id;
118 r5 = 0x3; /* Keep IRQ and FIQ off in SM */
119 r6 = buffer_phys;
120
121 asm volatile (
122 /* Make sure we got the registers we want */
123 __asmeq("%0", "ip")
124 __asmeq("%1", "r0")
125 __asmeq("%2", "r4")
126 __asmeq("%3", "r5")
127 __asmeq("%4", "r6")
128#ifdef REQUIRES_SEC
129 ".arch_extension sec\n"
130#endif
131 " smc #0\n"
132 : "=r" (ip), "=r" (r0)
133 : "r" (r4), "r" (r5), "r" (r6)
134 : "r1", "r2", "r3", "r7", "lr");
135
136 BUG_ON(ip != SEC_EXIT_NORMAL);
137
138 return r0;
139}
140
69/* __bcm_kona_smc() should only run on CPU 0, with pre-emption disabled */ 141/* __bcm_kona_smc() should only run on CPU 0, with pre-emption disabled */
70static void __bcm_kona_smc(void *info) 142static void __bcm_kona_smc(void *info)
71{ 143{
72 struct bcm_kona_smc_data *data = info; 144 struct bcm_kona_smc_data *data = info;
73 u32 *args = bridge_data.bounce; 145 u32 *args = bcm_smc_buffer;
74 int rc = 0;
75 146
76 /* Must run on CPU 0 */
77 BUG_ON(smp_processor_id() != 0); 147 BUG_ON(smp_processor_id() != 0);
148 BUG_ON(!args);
78 149
79 /* Check map in the bounce area */ 150 /* Copy the four 32 bit argument values into the bounce area */
80 BUG_ON(!bridge_data.initialized); 151 writel_relaxed(data->arg0, args++);
81 152 writel_relaxed(data->arg1, args++);
82 /* Copy one 32 bit word into the bounce area */ 153 writel_relaxed(data->arg2, args++);
83 args[0] = data->arg0; 154 writel(data->arg3, args);
84 args[1] = data->arg1;
85 args[2] = data->arg2;
86 args[3] = data->arg3;
87 155
88 /* Flush caches for input data passed to Secure Monitor */ 156 /* Flush caches for input data passed to Secure Monitor */
89 if (data->service_id != SSAPI_BRCM_START_VC_CORE) 157 flush_cache_all();
90 flush_cache_all();
91
92 /* Trap into Secure Monitor */
93 rc = bcm_kona_smc_asm(data->service_id, bridge_data.buffer_addr);
94 158
95 if (rc != SEC_ROM_RET_OK) 159 /* Trap into Secure Monitor and record the request result */
96 pr_err("Secure Monitor call failed (0x%x)!\n", rc); 160 data->result = bcm_kona_do_smc(data->service_id, bcm_smc_buffer_phys);
97} 161}
98 162
99unsigned bcm_kona_smc(unsigned service_id, unsigned arg0, unsigned arg1, 163unsigned bcm_kona_smc(unsigned service_id, unsigned arg0, unsigned arg1,
@@ -106,17 +170,13 @@ unsigned bcm_kona_smc(unsigned service_id, unsigned arg0, unsigned arg1,
106 data.arg1 = arg1; 170 data.arg1 = arg1;
107 data.arg2 = arg2; 171 data.arg2 = arg2;
108 data.arg3 = arg3; 172 data.arg3 = arg3;
173 data.result = 0;
109 174
110 /* 175 /*
111 * Due to a limitation of the secure monitor, we must use the SMP 176 * Due to a limitation of the secure monitor, we must use the SMP
112 * infrastructure to forward all secure monitor calls to Core 0. 177 * infrastructure to forward all secure monitor calls to Core 0.
113 */ 178 */
114 if (get_cpu() != 0) 179 smp_call_function_single(0, __bcm_kona_smc, &data, 1);
115 smp_call_function_single(0, __bcm_kona_smc, (void *)&data, 1);
116 else
117 __bcm_kona_smc(&data);
118 180
119 put_cpu(); 181 return data.result;
120
121 return 0;
122} 182}
diff --git a/arch/arm/mach-bcm/bcm_kona_smc.h b/arch/arm/mach-bcm/bcm_kona_smc.h
index d098a7e76744..2e29ec67e414 100644
--- a/arch/arm/mach-bcm/bcm_kona_smc.h
+++ b/arch/arm/mach-bcm/bcm_kona_smc.h
@@ -15,55 +15,12 @@
15#define BCM_KONA_SMC_H 15#define BCM_KONA_SMC_H
16 16
17#include <linux/types.h> 17#include <linux/types.h>
18#define FLAGS (SEC_ROM_ICACHE_ENABLE_MASK | SEC_ROM_DCACHE_ENABLE_MASK | \
19 SEC_ROM_IRQ_ENABLE_MASK | SEC_ROM_FIQ_ENABLE_MASK)
20 18
21/*! 19/* Broadcom Secure Service API service IDs, return codes, and exit codes */
22 * Definitions for IRQ & FIQ Mask for ARM 20#define SSAPI_ENABLE_L2_CACHE 0x01000002
23 */
24
25#define FIQ_IRQ_MASK 0xC0
26#define FIQ_MASK 0x40
27#define IRQ_MASK 0x80
28
29/*!
30 * Secure Mode FLAGs
31 */
32
33/* When set, enables ICache within the secure mode */
34#define SEC_ROM_ICACHE_ENABLE_MASK 0x00000001
35
36/* When set, enables DCache within the secure mode */
37#define SEC_ROM_DCACHE_ENABLE_MASK 0x00000002
38
39/* When set, enables IRQ within the secure mode */
40#define SEC_ROM_IRQ_ENABLE_MASK 0x00000004
41
42/* When set, enables FIQ within the secure mode */
43#define SEC_ROM_FIQ_ENABLE_MASK 0x00000008
44
45/* When set, enables Unified L2 cache within the secure mode */
46#define SEC_ROM_UL2_CACHE_ENABLE_MASK 0x00000010
47
48/* Broadcom Secure Service API Service IDs */
49#define SSAPI_DORMANT_ENTRY_SERV 0x01000000
50#define SSAPI_PUBLIC_OTP_SERV 0x01000001
51#define SSAPI_ENABLE_L2_CACHE 0x01000002
52#define SSAPI_DISABLE_L2_CACHE 0x01000003
53#define SSAPI_WRITE_SCU_STATUS 0x01000004
54#define SSAPI_WRITE_PWR_GATE 0x01000005
55
56/* Broadcom Secure Service API Return Codes */
57#define SEC_ROM_RET_OK 0x00000001 21#define SEC_ROM_RET_OK 0x00000001
58#define SEC_ROM_RET_FAIL 0x00000009
59
60#define SSAPI_RET_FROM_INT_SERV 0x4
61#define SEC_EXIT_NORMAL 0x1 22#define SEC_EXIT_NORMAL 0x1
62 23
63#define SSAPI_ROW_AES 0x0E000006
64#define SSAPI_BRCM_START_VC_CORE 0x0E000008
65
66#ifndef __ASSEMBLY__
67extern int __init bcm_kona_smc_init(void); 24extern int __init bcm_kona_smc_init(void);
68 25
69extern unsigned bcm_kona_smc(unsigned service_id, 26extern unsigned bcm_kona_smc(unsigned service_id,
@@ -72,9 +29,4 @@ extern unsigned bcm_kona_smc(unsigned service_id,
72 unsigned arg2, 29 unsigned arg2,
73 unsigned arg3); 30 unsigned arg3);
74 31
75extern int bcm_kona_smc_asm(u32 service_id,
76 u32 buffer_addr);
77
78#endif /* __ASSEMBLY__ */
79
80#endif /* BCM_KONA_SMC_H */ 32#endif /* BCM_KONA_SMC_H */
diff --git a/arch/arm/mach-bcm/bcm_kona_smc_asm.S b/arch/arm/mach-bcm/bcm_kona_smc_asm.S
deleted file mode 100644
index a1608480d60d..000000000000
--- a/arch/arm/mach-bcm/bcm_kona_smc_asm.S
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * Copyright (C) 2013 Broadcom Corporation
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 as
6 * published by the Free Software Foundation version 2.
7 *
8 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
9 * kind, whether express or implied; without even the implied warranty
10 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#include <linux/linkage.h>
15#include "bcm_kona_smc.h"
16
17/*
18 * int bcm_kona_smc_asm(u32 service_id, u32 buffer_addr)
19 */
20
21ENTRY(bcm_kona_smc_asm)
22 stmfd sp!, {r4-r12, lr}
23 mov r4, r0 @ service_id
24 mov r5, #3 @ Keep IRQ and FIQ off in SM
25 /*
26 * Since interrupts are disabled in the open mode, we must keep
27 * interrupts disabled in secure mode by setting R5=0x3. If interrupts
28 * are enabled in open mode, we can set R5=0x0 to allow interrupts in
29 * secure mode. If we did this, the secure monitor would return back
30 * control to the open mode to handle the interrupt prior to completing
31 * the secure service. If this happened, R12 would not be
32 * SEC_EXIT_NORMAL and we would need to call SMC again after resetting
33 * R5 (it gets clobbered by the secure monitor) and setting R4 to
34 * SSAPI_RET_FROM_INT_SERV to indicate that we want the secure monitor
35 * to finish up the previous uncompleted secure service.
36 */
37 mov r6, r1 @ buffer_addr
38 smc #0
39 /* Check r12 for SEC_EXIT_NORMAL here if interrupts are enabled */
40 ldmfd sp!, {r4-r12, pc}
41ENDPROC(bcm_kona_smc_asm)
diff --git a/arch/arm/mach-bcm/board_bcm21664.c b/arch/arm/mach-bcm/board_bcm21664.c
index acc1573fd005..f0521cc0640d 100644
--- a/arch/arm/mach-bcm/board_bcm21664.c
+++ b/arch/arm/mach-bcm/board_bcm21664.c
@@ -11,14 +11,13 @@
11 * GNU General Public License for more details. 11 * GNU General Public License for more details.
12 */ 12 */
13 13
14#include <linux/clocksource.h>
15#include <linux/of_address.h> 14#include <linux/of_address.h>
16#include <linux/of_platform.h> 15#include <linux/of_platform.h>
16#include <linux/io.h>
17 17
18#include <asm/mach/arch.h> 18#include <asm/mach/arch.h>
19 19
20#include "bcm_kona_smc.h" 20#include "kona_l2_cache.h"
21#include "kona.h"
22 21
23#define RSTMGR_DT_STRING "brcm,bcm21664-resetmgr" 22#define RSTMGR_DT_STRING "brcm,bcm21664-resetmgr"
24 23
diff --git a/arch/arm/mach-bcm/board_bcm281xx.c b/arch/arm/mach-bcm/board_bcm281xx.c
index 6be54c10f8cb..1ac59fc0cb15 100644
--- a/arch/arm/mach-bcm/board_bcm281xx.c
+++ b/arch/arm/mach-bcm/board_bcm281xx.c
@@ -17,7 +17,7 @@
17 17
18#include <asm/mach/arch.h> 18#include <asm/mach/arch.h>
19 19
20#include "kona.h" 20#include "kona_l2_cache.h"
21 21
22#define SECWDOG_OFFSET 0x00000000 22#define SECWDOG_OFFSET 0x00000000
23#define SECWDOG_RESERVED_MASK 0xe2000000 23#define SECWDOG_RESERVED_MASK 0xe2000000
diff --git a/arch/arm/mach-bcm/kona.c b/arch/arm/mach-bcm/kona_l2_cache.c
index 768bc2837bf5..b31970377c20 100644
--- a/arch/arm/mach-bcm/kona.c
+++ b/arch/arm/mach-bcm/kona_l2_cache.c
@@ -11,19 +11,18 @@
11 * GNU General Public License for more details. 11 * GNU General Public License for more details.
12 */ 12 */
13 13
14#include <linux/of_platform.h> 14
15#include <linux/init.h>
16#include <linux/printk.h>
15#include <asm/hardware/cache-l2x0.h> 17#include <asm/hardware/cache-l2x0.h>
16 18
17#include "bcm_kona_smc.h" 19#include "bcm_kona_smc.h"
18#include "kona.h"
19 20
20void __init kona_l2_cache_init(void) 21void __init kona_l2_cache_init(void)
21{ 22{
23 unsigned int result;
22 int ret; 24 int ret;
23 25
24 if (!IS_ENABLED(CONFIG_CACHE_L2X0))
25 return;
26
27 ret = bcm_kona_smc_init(); 26 ret = bcm_kona_smc_init();
28 if (ret) { 27 if (ret) {
29 pr_info("Secure API not available (%d). Skipping L2 init.\n", 28 pr_info("Secure API not available (%d). Skipping L2 init.\n",
@@ -31,7 +30,12 @@ void __init kona_l2_cache_init(void)
31 return; 30 return;
32 } 31 }
33 32
34 bcm_kona_smc(SSAPI_ENABLE_L2_CACHE, 0, 0, 0, 0); 33 result = bcm_kona_smc(SSAPI_ENABLE_L2_CACHE, 0, 0, 0, 0);
34 if (result != SEC_ROM_RET_OK) {
35 pr_err("Secure Monitor call failed (%u)! Skipping L2 init.\n",
36 result);
37 return;
38 }
35 39
36 /* 40 /*
37 * The aux_val and aux_mask have no effect since L2 cache is already 41 * The aux_val and aux_mask have no effect since L2 cache is already
diff --git a/arch/arm/mach-bcm/kona.h b/arch/arm/mach-bcm/kona_l2_cache.h
index 3a7a017c29cd..46f84a95ab1c 100644
--- a/arch/arm/mach-bcm/kona.h
+++ b/arch/arm/mach-bcm/kona_l2_cache.h
@@ -11,4 +11,8 @@
11 * GNU General Public License for more details. 11 * GNU General Public License for more details.
12 */ 12 */
13 13
14void __init kona_l2_cache_init(void); 14#ifdef CONFIG_ARCH_BCM_MOBILE_L2_CACHE
15void kona_l2_cache_init(void);
16#else
17#define kona_l2_cache_init() ((void)0)
18#endif
diff --git a/arch/arm/mach-berlin/Kconfig b/arch/arm/mach-berlin/Kconfig
index b0cb0722acd2..101e0f356730 100644
--- a/arch/arm/mach-berlin/Kconfig
+++ b/arch/arm/mach-berlin/Kconfig
@@ -1,9 +1,11 @@
1config ARCH_BERLIN 1config ARCH_BERLIN
2 bool "Marvell Berlin SoCs" if ARCH_MULTI_V7 2 bool "Marvell Berlin SoCs" if ARCH_MULTI_V7
3 select ARCH_REQUIRE_GPIOLIB
3 select ARM_GIC 4 select ARM_GIC
4 select GENERIC_IRQ_CHIP 5 select GENERIC_IRQ_CHIP
5 select DW_APB_ICTL 6 select DW_APB_ICTL
6 select DW_APB_TIMER_OF 7 select DW_APB_TIMER_OF
8 select PINCTRL
7 9
8if ARCH_BERLIN 10if ARCH_BERLIN
9 11
@@ -14,11 +16,19 @@ config MACH_BERLIN_BG2
14 select CACHE_L2X0 16 select CACHE_L2X0
15 select CPU_PJ4B 17 select CPU_PJ4B
16 select HAVE_ARM_TWD if SMP 18 select HAVE_ARM_TWD if SMP
19 select PINCTRL_BERLIN_BG2
17 20
18config MACH_BERLIN_BG2CD 21config MACH_BERLIN_BG2CD
19 bool "Marvell Armada 1500-mini (BG2CD)" 22 bool "Marvell Armada 1500-mini (BG2CD)"
20 select CACHE_L2X0 23 select CACHE_L2X0
21 select HAVE_ARM_TWD if SMP 24 select HAVE_ARM_TWD if SMP
25 select PINCTRL_BERLIN_BG2CD
26
27config MACH_BERLIN_BG2Q
28 bool "Marvell Armada 1500 Pro (BG2-Q)"
29 select CACHE_L2X0
30 select HAVE_ARM_TWD if SMP
31 select PINCTRL_BERLIN_BG2Q
22 32
23endmenu 33endmenu
24 34
diff --git a/arch/arm/mach-berlin/berlin.c b/arch/arm/mach-berlin/berlin.c
index 025bcb5473eb..ac181c6797ee 100644
--- a/arch/arm/mach-berlin/berlin.c
+++ b/arch/arm/mach-berlin/berlin.c
@@ -18,16 +18,6 @@
18#include <asm/hardware/cache-l2x0.h> 18#include <asm/hardware/cache-l2x0.h>
19#include <asm/mach/arch.h> 19#include <asm/mach/arch.h>
20 20
21static void __init berlin_init_machine(void)
22{
23 /*
24 * with DT probing for L2CCs, berlin_init_machine can be removed.
25 * Note: 88DE3005 (Armada 1500-mini) uses pl310 l2cc
26 */
27 l2x0_of_init(0x70c00000, 0xfeffffff);
28 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
29}
30
31static const char * const berlin_dt_compat[] = { 21static const char * const berlin_dt_compat[] = {
32 "marvell,berlin", 22 "marvell,berlin",
33 NULL, 23 NULL,
@@ -35,5 +25,10 @@ static const char * const berlin_dt_compat[] = {
35 25
36DT_MACHINE_START(BERLIN_DT, "Marvell Berlin") 26DT_MACHINE_START(BERLIN_DT, "Marvell Berlin")
37 .dt_compat = berlin_dt_compat, 27 .dt_compat = berlin_dt_compat,
38 .init_machine = berlin_init_machine, 28 /*
29 * with DT probing for L2CCs, berlin_init_machine can be removed.
30 * Note: 88DE3005 (Armada 1500-mini) uses pl310 l2cc
31 */
32 .l2c_aux_val = 0x30c00000,
33 .l2c_aux_mask = 0xfeffffff,
39MACHINE_END 34MACHINE_END
diff --git a/arch/arm/mach-clps711x/board-clep7312.c b/arch/arm/mach-clps711x/board-clep7312.c
index 221b9de32dd6..94a7add88a3f 100644
--- a/arch/arm/mach-clps711x/board-clep7312.c
+++ b/arch/arm/mach-clps711x/board-clep7312.c
@@ -18,6 +18,7 @@
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/types.h> 19#include <linux/types.h>
20#include <linux/string.h> 20#include <linux/string.h>
21#include <linux/memblock.h>
21 22
22#include <asm/setup.h> 23#include <asm/setup.h>
23#include <asm/mach-types.h> 24#include <asm/mach-types.h>
@@ -26,11 +27,9 @@
26#include "common.h" 27#include "common.h"
27 28
28static void __init 29static void __init
29fixup_clep7312(struct tag *tags, char **cmdline, struct meminfo *mi) 30fixup_clep7312(struct tag *tags, char **cmdline)
30{ 31{
31 mi->nr_banks=1; 32 memblock_add(0xc0000000, 0x01000000);
32 mi->bank[0].start = 0xc0000000;
33 mi->bank[0].size = 0x01000000;
34} 33}
35 34
36MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312") 35MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312")
diff --git a/arch/arm/mach-clps711x/board-edb7211.c b/arch/arm/mach-clps711x/board-edb7211.c
index 077609841f14..f9828f89972a 100644
--- a/arch/arm/mach-clps711x/board-edb7211.c
+++ b/arch/arm/mach-clps711x/board-edb7211.c
@@ -16,6 +16,7 @@
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/backlight.h> 17#include <linux/backlight.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/memblock.h>
19 20
20#include <linux/mtd/physmap.h> 21#include <linux/mtd/physmap.h>
21#include <linux/mtd/partitions.h> 22#include <linux/mtd/partitions.h>
@@ -133,7 +134,7 @@ static void __init edb7211_reserve(void)
133} 134}
134 135
135static void __init 136static void __init
136fixup_edb7211(struct tag *tags, char **cmdline, struct meminfo *mi) 137fixup_edb7211(struct tag *tags, char **cmdline)
137{ 138{
138 /* 139 /*
139 * Bank start addresses are not present in the information 140 * Bank start addresses are not present in the information
@@ -143,11 +144,8 @@ fixup_edb7211(struct tag *tags, char **cmdline, struct meminfo *mi)
143 * Banks sizes _are_ present in the param block, but we're 144 * Banks sizes _are_ present in the param block, but we're
144 * not using that information yet. 145 * not using that information yet.
145 */ 146 */
146 mi->bank[0].start = 0xc0000000; 147 memblock_add(0xc0000000, SZ_8M);
147 mi->bank[0].size = SZ_8M; 148 memblock_add(0xc1000000, SZ_8M);
148 mi->bank[1].start = 0xc1000000;
149 mi->bank[1].size = SZ_8M;
150 mi->nr_banks = 2;
151} 149}
152 150
153static void __init edb7211_init(void) 151static void __init edb7211_init(void)
diff --git a/arch/arm/mach-clps711x/board-p720t.c b/arch/arm/mach-clps711x/board-p720t.c
index 67b733744ed7..0cf0e51e6546 100644
--- a/arch/arm/mach-clps711x/board-p720t.c
+++ b/arch/arm/mach-clps711x/board-p720t.c
@@ -295,7 +295,7 @@ static struct generic_bl_info p720t_lcd_backlight_pdata = {
295}; 295};
296 296
297static void __init 297static void __init
298fixup_p720t(struct tag *tag, char **cmdline, struct meminfo *mi) 298fixup_p720t(struct tag *tag, char **cmdline)
299{ 299{
300 /* 300 /*
301 * Our bootloader doesn't setup any tags (yet). 301 * Our bootloader doesn't setup any tags (yet).
diff --git a/arch/arm/mach-cns3xxx/Kconfig b/arch/arm/mach-cns3xxx/Kconfig
index dce8decd5d46..66838f42037f 100644
--- a/arch/arm/mach-cns3xxx/Kconfig
+++ b/arch/arm/mach-cns3xxx/Kconfig
@@ -1,7 +1,6 @@
1config ARCH_CNS3XXX 1config ARCH_CNS3XXX
2 bool "Cavium Networks CNS3XXX family" if ARCH_MULTI_V6 2 bool "Cavium Networks CNS3XXX family" if ARCH_MULTI_V6
3 select ARM_GIC 3 select ARM_GIC
4 select MIGHT_HAVE_PCI
5 select PCI_DOMAINS if PCI 4 select PCI_DOMAINS if PCI
6 help 5 help
7 Support for Cavium Networks CNS3XXX platform. 6 Support for Cavium Networks CNS3XXX platform.
diff --git a/arch/arm/mach-cns3xxx/core.c b/arch/arm/mach-cns3xxx/core.c
index 2ae28a69e3e5..f85449a6accd 100644
--- a/arch/arm/mach-cns3xxx/core.c
+++ b/arch/arm/mach-cns3xxx/core.c
@@ -272,9 +272,9 @@ void __init cns3xxx_l2x0_init(void)
272 * 272 *
273 * 1 cycle of latency for setup, read and write accesses 273 * 1 cycle of latency for setup, read and write accesses
274 */ 274 */
275 val = readl(base + L2X0_TAG_LATENCY_CTRL); 275 val = readl(base + L310_TAG_LATENCY_CTRL);
276 val &= 0xfffff888; 276 val &= 0xfffff888;
277 writel(val, base + L2X0_TAG_LATENCY_CTRL); 277 writel(val, base + L310_TAG_LATENCY_CTRL);
278 278
279 /* 279 /*
280 * Data RAM Control register 280 * Data RAM Control register
@@ -285,12 +285,12 @@ void __init cns3xxx_l2x0_init(void)
285 * 285 *
286 * 1 cycle of latency for setup, read and write accesses 286 * 1 cycle of latency for setup, read and write accesses
287 */ 287 */
288 val = readl(base + L2X0_DATA_LATENCY_CTRL); 288 val = readl(base + L310_DATA_LATENCY_CTRL);
289 val &= 0xfffff888; 289 val &= 0xfffff888;
290 writel(val, base + L2X0_DATA_LATENCY_CTRL); 290 writel(val, base + L310_DATA_LATENCY_CTRL);
291 291
292 /* 32 KiB, 8-way, parity disable */ 292 /* 32 KiB, 8-way, parity disable */
293 l2x0_init(base, 0x00540000, 0xfe000fff); 293 l2x0_init(base, 0x00500000, 0xfe0f0fff);
294} 294}
295 295
296#endif /* CONFIG_CACHE_L2X0 */ 296#endif /* CONFIG_CACHE_L2X0 */
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
index ecdc7d44fa70..06d63d5651f3 100644
--- a/arch/arm/mach-davinci/board-dm355-evm.c
+++ b/arch/arm/mach-davinci/board-dm355-evm.c
@@ -350,11 +350,7 @@ static struct davinci_mmc_config dm355evm_mmc_config = {
350 * you have proper Mini-B or Mini-A cables (or Mini-A adapters) 350 * you have proper Mini-B or Mini-A cables (or Mini-A adapters)
351 * the ID pin won't need any help. 351 * the ID pin won't need any help.
352 */ 352 */
353#ifdef CONFIG_USB_MUSB_PERIPHERAL
354#define USB_ID_VALUE 0 /* ID pulled high; *should* float */
355#else
356#define USB_ID_VALUE 1 /* ID pulled low */ 353#define USB_ID_VALUE 1 /* ID pulled low */
357#endif
358 354
359static struct spi_eeprom at25640a = { 355static struct spi_eeprom at25640a = {
360 .byte_len = SZ_64K / 8, 356 .byte_len = SZ_64K / 8,
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c
index 43bacbf15314..680a7a2d9102 100644
--- a/arch/arm/mach-davinci/board-dm355-leopard.c
+++ b/arch/arm/mach-davinci/board-dm355-leopard.c
@@ -208,11 +208,7 @@ static struct davinci_mmc_config dm355leopard_mmc_config = {
208 * you have proper Mini-B or Mini-A cables (or Mini-A adapters) 208 * you have proper Mini-B or Mini-A cables (or Mini-A adapters)
209 * the ID pin won't need any help. 209 * the ID pin won't need any help.
210 */ 210 */
211#ifdef CONFIG_USB_MUSB_PERIPHERAL
212#define USB_ID_VALUE 0 /* ID pulled high; *should* float */
213#else
214#define USB_ID_VALUE 1 /* ID pulled low */ 211#define USB_ID_VALUE 1 /* ID pulled low */
215#endif
216 212
217static struct spi_eeprom at25640a = { 213static struct spi_eeprom at25640a = {
218 .byte_len = SZ_64K / 8, 214 .byte_len = SZ_64K / 8,
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 85399c98f84a..45ce065e7170 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -1092,20 +1092,21 @@ int da850_register_cpufreq(char *async_clk)
1092 1092
1093static int da850_round_armrate(struct clk *clk, unsigned long rate) 1093static int da850_round_armrate(struct clk *clk, unsigned long rate)
1094{ 1094{
1095 int i, ret = 0, diff; 1095 int ret = 0, diff;
1096 unsigned int best = (unsigned int) -1; 1096 unsigned int best = (unsigned int) -1;
1097 struct cpufreq_frequency_table *table = cpufreq_info.freq_table; 1097 struct cpufreq_frequency_table *table = cpufreq_info.freq_table;
1098 struct cpufreq_frequency_table *pos;
1098 1099
1099 rate /= 1000; /* convert to kHz */ 1100 rate /= 1000; /* convert to kHz */
1100 1101
1101 for (i = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) { 1102 cpufreq_for_each_entry(pos, table) {
1102 diff = table[i].frequency - rate; 1103 diff = pos->frequency - rate;
1103 if (diff < 0) 1104 if (diff < 0)
1104 diff = -diff; 1105 diff = -diff;
1105 1106
1106 if (diff < best) { 1107 if (diff < best) {
1107 best = diff; 1108 best = diff;
1108 ret = table[i].frequency; 1109 ret = pos->frequency;
1109 } 1110 }
1110 } 1111 }
1111 1112
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
index 56ea41d5f849..b85b781b05fd 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -134,13 +134,6 @@ struct platform_device da8xx_serial_device[] = {
134 } 134 }
135}; 135};
136 136
137static s8 da8xx_queue_tc_mapping[][2] = {
138 /* {event queue no, TC no} */
139 {0, 0},
140 {1, 1},
141 {-1, -1}
142};
143
144static s8 da8xx_queue_priority_mapping[][2] = { 137static s8 da8xx_queue_priority_mapping[][2] = {
145 /* {event queue no, Priority} */ 138 /* {event queue no, Priority} */
146 {0, 3}, 139 {0, 3},
@@ -148,12 +141,6 @@ static s8 da8xx_queue_priority_mapping[][2] = {
148 {-1, -1} 141 {-1, -1}
149}; 142};
150 143
151static s8 da850_queue_tc_mapping[][2] = {
152 /* {event queue no, TC no} */
153 {0, 0},
154 {-1, -1}
155};
156
157static s8 da850_queue_priority_mapping[][2] = { 144static s8 da850_queue_priority_mapping[][2] = {
158 /* {event queue no, Priority} */ 145 /* {event queue no, Priority} */
159 {0, 3}, 146 {0, 3},
@@ -161,12 +148,6 @@ static s8 da850_queue_priority_mapping[][2] = {
161}; 148};
162 149
163static struct edma_soc_info da830_edma_cc0_info = { 150static struct edma_soc_info da830_edma_cc0_info = {
164 .n_channel = 32,
165 .n_region = 4,
166 .n_slot = 128,
167 .n_tc = 2,
168 .n_cc = 1,
169 .queue_tc_mapping = da8xx_queue_tc_mapping,
170 .queue_priority_mapping = da8xx_queue_priority_mapping, 151 .queue_priority_mapping = da8xx_queue_priority_mapping,
171 .default_queue = EVENTQ_1, 152 .default_queue = EVENTQ_1,
172}; 153};
@@ -177,22 +158,10 @@ static struct edma_soc_info *da830_edma_info[EDMA_MAX_CC] = {
177 158
178static struct edma_soc_info da850_edma_cc_info[] = { 159static struct edma_soc_info da850_edma_cc_info[] = {
179 { 160 {
180 .n_channel = 32,
181 .n_region = 4,
182 .n_slot = 128,
183 .n_tc = 2,
184 .n_cc = 1,
185 .queue_tc_mapping = da8xx_queue_tc_mapping,
186 .queue_priority_mapping = da8xx_queue_priority_mapping, 161 .queue_priority_mapping = da8xx_queue_priority_mapping,
187 .default_queue = EVENTQ_1, 162 .default_queue = EVENTQ_1,
188 }, 163 },
189 { 164 {
190 .n_channel = 32,
191 .n_region = 4,
192 .n_slot = 128,
193 .n_tc = 1,
194 .n_cc = 1,
195 .queue_tc_mapping = da850_queue_tc_mapping,
196 .queue_priority_mapping = da850_queue_priority_mapping, 165 .queue_priority_mapping = da850_queue_priority_mapping,
197 .default_queue = EVENTQ_0, 166 .default_queue = EVENTQ_0,
198 }, 167 },
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index 07381d8cea62..2f3ed3a58d57 100644
--- a/arch/arm/mach-davinci/dm355.c
+++ b/arch/arm/mach-davinci/dm355.c
@@ -569,14 +569,6 @@ static u8 dm355_default_priorities[DAVINCI_N_AINTC_IRQ] = {
569/*----------------------------------------------------------------------*/ 569/*----------------------------------------------------------------------*/
570 570
571static s8 571static s8
572queue_tc_mapping[][2] = {
573 /* {event queue no, TC no} */
574 {0, 0},
575 {1, 1},
576 {-1, -1},
577};
578
579static s8
580queue_priority_mapping[][2] = { 572queue_priority_mapping[][2] = {
581 /* {event queue no, Priority} */ 573 /* {event queue no, Priority} */
582 {0, 3}, 574 {0, 3},
@@ -585,12 +577,6 @@ queue_priority_mapping[][2] = {
585}; 577};
586 578
587static struct edma_soc_info edma_cc0_info = { 579static struct edma_soc_info edma_cc0_info = {
588 .n_channel = 64,
589 .n_region = 4,
590 .n_slot = 128,
591 .n_tc = 2,
592 .n_cc = 1,
593 .queue_tc_mapping = queue_tc_mapping,
594 .queue_priority_mapping = queue_priority_mapping, 580 .queue_priority_mapping = queue_priority_mapping,
595 .default_queue = EVENTQ_1, 581 .default_queue = EVENTQ_1,
596}; 582};
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
index 08a61b938333..0ae8114f5cc9 100644
--- a/arch/arm/mach-davinci/dm365.c
+++ b/arch/arm/mach-davinci/dm365.c
@@ -853,16 +853,6 @@ static u8 dm365_default_priorities[DAVINCI_N_AINTC_IRQ] = {
853 853
854/* Four Transfer Controllers on DM365 */ 854/* Four Transfer Controllers on DM365 */
855static s8 855static s8
856dm365_queue_tc_mapping[][2] = {
857 /* {event queue no, TC no} */
858 {0, 0},
859 {1, 1},
860 {2, 2},
861 {3, 3},
862 {-1, -1},
863};
864
865static s8
866dm365_queue_priority_mapping[][2] = { 856dm365_queue_priority_mapping[][2] = {
867 /* {event queue no, Priority} */ 857 /* {event queue no, Priority} */
868 {0, 7}, 858 {0, 7},
@@ -873,12 +863,6 @@ dm365_queue_priority_mapping[][2] = {
873}; 863};
874 864
875static struct edma_soc_info edma_cc0_info = { 865static struct edma_soc_info edma_cc0_info = {
876 .n_channel = 64,
877 .n_region = 4,
878 .n_slot = 256,
879 .n_tc = 4,
880 .n_cc = 1,
881 .queue_tc_mapping = dm365_queue_tc_mapping,
882 .queue_priority_mapping = dm365_queue_priority_mapping, 866 .queue_priority_mapping = dm365_queue_priority_mapping,
883 .default_queue = EVENTQ_3, 867 .default_queue = EVENTQ_3,
884}; 868};
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index 5debffba4b24..dc52657909c4 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -499,14 +499,6 @@ static u8 dm644x_default_priorities[DAVINCI_N_AINTC_IRQ] = {
499/*----------------------------------------------------------------------*/ 499/*----------------------------------------------------------------------*/
500 500
501static s8 501static s8
502queue_tc_mapping[][2] = {
503 /* {event queue no, TC no} */
504 {0, 0},
505 {1, 1},
506 {-1, -1},
507};
508
509static s8
510queue_priority_mapping[][2] = { 502queue_priority_mapping[][2] = {
511 /* {event queue no, Priority} */ 503 /* {event queue no, Priority} */
512 {0, 3}, 504 {0, 3},
@@ -515,12 +507,6 @@ queue_priority_mapping[][2] = {
515}; 507};
516 508
517static struct edma_soc_info edma_cc0_info = { 509static struct edma_soc_info edma_cc0_info = {
518 .n_channel = 64,
519 .n_region = 4,
520 .n_slot = 128,
521 .n_tc = 2,
522 .n_cc = 1,
523 .queue_tc_mapping = queue_tc_mapping,
524 .queue_priority_mapping = queue_priority_mapping, 510 .queue_priority_mapping = queue_priority_mapping,
525 .default_queue = EVENTQ_1, 511 .default_queue = EVENTQ_1,
526}; 512};
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index 332d00d24dc2..6c3bbea7d77d 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -533,16 +533,6 @@ static u8 dm646x_default_priorities[DAVINCI_N_AINTC_IRQ] = {
533 533
534/* Four Transfer Controllers on DM646x */ 534/* Four Transfer Controllers on DM646x */
535static s8 535static s8
536dm646x_queue_tc_mapping[][2] = {
537 /* {event queue no, TC no} */
538 {0, 0},
539 {1, 1},
540 {2, 2},
541 {3, 3},
542 {-1, -1},
543};
544
545static s8
546dm646x_queue_priority_mapping[][2] = { 536dm646x_queue_priority_mapping[][2] = {
547 /* {event queue no, Priority} */ 537 /* {event queue no, Priority} */
548 {0, 4}, 538 {0, 4},
@@ -553,12 +543,6 @@ dm646x_queue_priority_mapping[][2] = {
553}; 543};
554 544
555static struct edma_soc_info edma_cc0_info = { 545static struct edma_soc_info edma_cc0_info = {
556 .n_channel = 64,
557 .n_region = 6, /* 0-1, 4-7 */
558 .n_slot = 512,
559 .n_tc = 4,
560 .n_cc = 1,
561 .queue_tc_mapping = dm646x_queue_tc_mapping,
562 .queue_priority_mapping = dm646x_queue_priority_mapping, 546 .queue_priority_mapping = dm646x_queue_priority_mapping,
563 .default_queue = EVENTQ_1, 547 .default_queue = EVENTQ_1,
564}; 548};
diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-dove/irq.c
index bc4344aa1009..4a5a7aedcb76 100644
--- a/arch/arm/mach-dove/irq.c
+++ b/arch/arm/mach-dove/irq.c
@@ -108,6 +108,38 @@ static int __initdata gpio2_irqs[4] = {
108 0, 108 0,
109}; 109};
110 110
111#ifdef CONFIG_MULTI_IRQ_HANDLER
112/*
113 * Compiling with both non-DT and DT support enabled, will
114 * break asm irq handler used by non-DT boards. Therefore,
115 * we provide a C-style irq handler even for non-DT boards,
116 * if MULTI_IRQ_HANDLER is set.
117 */
118
119static void __iomem *dove_irq_base = IRQ_VIRT_BASE;
120
121static asmlinkage void
122__exception_irq_entry dove_legacy_handle_irq(struct pt_regs *regs)
123{
124 u32 stat;
125
126 stat = readl_relaxed(dove_irq_base + IRQ_CAUSE_LOW_OFF);
127 stat &= readl_relaxed(dove_irq_base + IRQ_MASK_LOW_OFF);
128 if (stat) {
129 unsigned int hwirq = __fls(stat);
130 handle_IRQ(hwirq, regs);
131 return;
132 }
133 stat = readl_relaxed(dove_irq_base + IRQ_CAUSE_HIGH_OFF);
134 stat &= readl_relaxed(dove_irq_base + IRQ_MASK_HIGH_OFF);
135 if (stat) {
136 unsigned int hwirq = 32 + __fls(stat);
137 handle_IRQ(hwirq, regs);
138 return;
139 }
140}
141#endif
142
111void __init dove_init_irq(void) 143void __init dove_init_irq(void)
112{ 144{
113 int i; 145 int i;
@@ -115,6 +147,10 @@ void __init dove_init_irq(void)
115 orion_irq_init(0, IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF); 147 orion_irq_init(0, IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF);
116 orion_irq_init(32, IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF); 148 orion_irq_init(32, IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF);
117 149
150#ifdef CONFIG_MULTI_IRQ_HANDLER
151 set_handle_irq(dove_legacy_handle_irq);
152#endif
153
118 /* 154 /*
119 * Initialize gpiolib for GPIOs 0-71. 155 * Initialize gpiolib for GPIOs 0-71.
120 */ 156 */
diff --git a/arch/arm/mach-ep93xx/crunch-bits.S b/arch/arm/mach-ep93xx/crunch-bits.S
index 0ec9bb48fab9..e96923a3017b 100644
--- a/arch/arm/mach-ep93xx/crunch-bits.S
+++ b/arch/arm/mach-ep93xx/crunch-bits.S
@@ -16,6 +16,7 @@
16#include <asm/ptrace.h> 16#include <asm/ptrace.h>
17#include <asm/thread_info.h> 17#include <asm/thread_info.h>
18#include <asm/asm-offsets.h> 18#include <asm/asm-offsets.h>
19#include <asm/assembler.h>
19#include <mach/ep93xx-regs.h> 20#include <mach/ep93xx-regs.h>
20 21
21/* 22/*
@@ -62,14 +63,16 @@
62 * r9 = ret_from_exception 63 * r9 = ret_from_exception
63 * lr = undefined instr exit 64 * lr = undefined instr exit
64 * 65 *
65 * called from prefetch exception handler with interrupts disabled 66 * called from prefetch exception handler with interrupts enabled
66 */ 67 */
67ENTRY(crunch_task_enable) 68ENTRY(crunch_task_enable)
69 inc_preempt_count r10, r3
70
68 ldr r8, =(EP93XX_APB_VIRT_BASE + 0x00130000) @ syscon addr 71 ldr r8, =(EP93XX_APB_VIRT_BASE + 0x00130000) @ syscon addr
69 72
70 ldr r1, [r8, #0x80] 73 ldr r1, [r8, #0x80]
71 tst r1, #0x00800000 @ access to crunch enabled? 74 tst r1, #0x00800000 @ access to crunch enabled?
72 movne pc, lr @ if so no business here 75 bne 2f @ if so no business here
73 mov r3, #0xaa @ unlock syscon swlock 76 mov r3, #0xaa @ unlock syscon swlock
74 str r3, [r8, #0xc0] 77 str r3, [r8, #0xc0]
75 orr r1, r1, #0x00800000 @ enable access to crunch 78 orr r1, r1, #0x00800000 @ enable access to crunch
@@ -142,7 +145,7 @@ crunch_save:
142 145
143 teq r0, #0 @ anything to load? 146 teq r0, #0 @ anything to load?
144 cfldr64eq mvdx0, [r1, #CRUNCH_MVDX0] @ mvdx0 was clobbered 147 cfldr64eq mvdx0, [r1, #CRUNCH_MVDX0] @ mvdx0 was clobbered
145 moveq pc, lr 148 beq 1f
146 149
147crunch_load: 150crunch_load:
148 cfldr64 mvdx0, [r0, #CRUNCH_DSPSC] @ load status word 151 cfldr64 mvdx0, [r0, #CRUNCH_DSPSC] @ load status word
@@ -190,6 +193,11 @@ crunch_load:
190 cfldr64 mvdx14, [r0, #CRUNCH_MVDX14] 193 cfldr64 mvdx14, [r0, #CRUNCH_MVDX14]
191 cfldr64 mvdx15, [r0, #CRUNCH_MVDX15] 194 cfldr64 mvdx15, [r0, #CRUNCH_MVDX15]
192 195
1961:
197#ifdef CONFIG_PREEMPT_COUNT
198 get_thread_info r10
199#endif
2002: dec_preempt_count r10, r3
193 mov pc, lr 201 mov pc, lr
194 202
195/* 203/*
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index fc8bf18e222d..d58995c9a95a 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -7,97 +7,102 @@
7 7
8# Configuration options for the EXYNOS4 8# Configuration options for the EXYNOS4
9 9
10config ARCH_EXYNOS
11 bool "Samsung EXYNOS" if ARCH_MULTI_V7
12 select ARCH_HAS_BANDGAP
13 select ARCH_HAS_CPUFREQ
14 select ARCH_HAS_HOLES_MEMORYMODEL
15 select ARCH_REQUIRE_GPIOLIB
16 select ARM_AMBA
17 select ARM_GIC
18 select COMMON_CLK_SAMSUNG
19 select HAVE_ARM_SCU if SMP
20 select HAVE_S3C2410_I2C if I2C
21 select HAVE_S3C2410_WATCHDOG if WATCHDOG
22 select HAVE_S3C_RTC if RTC_CLASS
23 select PINCTRL
24 select PINCTRL_EXYNOS
25 select PM_GENERIC_DOMAINS if PM_RUNTIME
26 select S5P_DEV_MFC
27 select SRAM
28 help
29 Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5)
30
10if ARCH_EXYNOS 31if ARCH_EXYNOS
11 32
12menu "SAMSUNG EXYNOS SoCs Support" 33menu "SAMSUNG EXYNOS SoCs Support"
13 34
35config ARCH_EXYNOS3
36 bool "SAMSUNG EXYNOS3"
37 select ARM_CPU_SUSPEND if PM
38 help
39 Samsung EXYNOS3 (Crotex-A7) SoC based systems
40
14config ARCH_EXYNOS4 41config ARCH_EXYNOS4
15 bool "SAMSUNG EXYNOS4" 42 bool "SAMSUNG EXYNOS4"
16 default y 43 default y
17 select ARM_AMBA 44 select ARM_CPU_SUSPEND if PM_SLEEP
18 select CLKSRC_OF
19 select CLKSRC_SAMSUNG_PWM if CPU_EXYNOS4210 45 select CLKSRC_SAMSUNG_PWM if CPU_EXYNOS4210
20 select CPU_EXYNOS4210 46 select CPU_EXYNOS4210
21 select GIC_NON_BANKED 47 select GIC_NON_BANKED
22 select KEYBOARD_SAMSUNG if INPUT_KEYBOARD 48 select KEYBOARD_SAMSUNG if INPUT_KEYBOARD
23 select HAVE_ARM_SCU if SMP
24 select HAVE_SMP
25 select MIGHT_HAVE_CACHE_L2X0 49 select MIGHT_HAVE_CACHE_L2X0
26 select PINCTRL
27 select PM_GENERIC_DOMAINS if PM_RUNTIME
28 select S5P_DEV_MFC
29 help 50 help
30 Samsung EXYNOS4 SoCs based systems 51 Samsung EXYNOS4 (Cortex-A9) SoC based systems
31 52
32config ARCH_EXYNOS5 53config ARCH_EXYNOS5
33 bool "SAMSUNG EXYNOS5" 54 bool "SAMSUNG EXYNOS5"
34 select ARM_AMBA 55 default y
35 select CLKSRC_OF
36 select HAVE_ARM_SCU if SMP
37 select HAVE_SMP
38 select PINCTRL
39 help 56 help
40 Samsung EXYNOS5 (Cortex-A15) SoC based systems 57 Samsung EXYNOS5 (Cortex-A15/A7) SoC based systems
41 58
42comment "EXYNOS SoCs" 59comment "EXYNOS SoCs"
43 60
61config SOC_EXYNOS3250
62 bool "SAMSUNG EXYNOS3250"
63 default y
64 depends on ARCH_EXYNOS3
65
44config CPU_EXYNOS4210 66config CPU_EXYNOS4210
45 bool "SAMSUNG EXYNOS4210" 67 bool "SAMSUNG EXYNOS4210"
46 default y 68 default y
47 depends on ARCH_EXYNOS4 69 depends on ARCH_EXYNOS4
48 select ARCH_HAS_BANDGAP
49 select ARM_CPU_SUSPEND if PM_SLEEP
50 select PINCTRL_EXYNOS
51 select SAMSUNG_DMADEV
52 help
53 Enable EXYNOS4210 CPU support
54 70
55config SOC_EXYNOS4212 71config SOC_EXYNOS4212
56 bool "SAMSUNG EXYNOS4212" 72 bool "SAMSUNG EXYNOS4212"
57 default y 73 default y
58 depends on ARCH_EXYNOS4 74 depends on ARCH_EXYNOS4
59 select ARCH_HAS_BANDGAP
60 select PINCTRL_EXYNOS
61 select SAMSUNG_DMADEV
62 help
63 Enable EXYNOS4212 SoC support
64 75
65config SOC_EXYNOS4412 76config SOC_EXYNOS4412
66 bool "SAMSUNG EXYNOS4412" 77 bool "SAMSUNG EXYNOS4412"
67 default y 78 default y
68 depends on ARCH_EXYNOS4 79 depends on ARCH_EXYNOS4
69 select ARCH_HAS_BANDGAP
70 select PINCTRL_EXYNOS
71 select SAMSUNG_DMADEV
72 help
73 Enable EXYNOS4412 SoC support
74 80
75config SOC_EXYNOS5250 81config SOC_EXYNOS5250
76 bool "SAMSUNG EXYNOS5250" 82 bool "SAMSUNG EXYNOS5250"
77 default y 83 default y
78 depends on ARCH_EXYNOS5 84 depends on ARCH_EXYNOS5
79 select ARCH_HAS_BANDGAP 85
80 select PINCTRL_EXYNOS 86config SOC_EXYNOS5260
81 select PM_GENERIC_DOMAINS if PM_RUNTIME 87 bool "SAMSUNG EXYNOS5260"
82 select S5P_DEV_MFC 88 default y
83 select SAMSUNG_DMADEV 89 depends on ARCH_EXYNOS5
84 help 90
85 Enable EXYNOS5250 SoC support 91config SOC_EXYNOS5410
92 bool "SAMSUNG EXYNOS5410"
93 default y
94 depends on ARCH_EXYNOS5
86 95
87config SOC_EXYNOS5420 96config SOC_EXYNOS5420
88 bool "SAMSUNG EXYNOS5420" 97 bool "SAMSUNG EXYNOS5420"
89 default y 98 default y
90 depends on ARCH_EXYNOS5 99 depends on ARCH_EXYNOS5
91 select PM_GENERIC_DOMAINS if PM_RUNTIME
92 help
93 Enable EXYNOS5420 SoC support
94 100
95config SOC_EXYNOS5440 101config SOC_EXYNOS5440
96 bool "SAMSUNG EXYNOS5440" 102 bool "SAMSUNG EXYNOS5440"
97 default y 103 default y
98 depends on ARCH_EXYNOS5 104 depends on ARCH_EXYNOS5
99 select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE 105 select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
100 select ARCH_HAS_BANDGAP
101 select ARCH_HAS_OPP 106 select ARCH_HAS_OPP
102 select HAVE_ARM_ARCH_TIMER 107 select HAVE_ARM_ARCH_TIMER
103 select AUTO_ZRELADDR 108 select AUTO_ZRELADDR
@@ -108,6 +113,19 @@ config SOC_EXYNOS5440
108 help 113 help
109 Enable EXYNOS5440 SoC support 114 Enable EXYNOS5440 SoC support
110 115
116config SOC_EXYNOS5800
117 bool "SAMSUNG EXYNOS5800"
118 default y
119 depends on SOC_EXYNOS5420
120
111endmenu 121endmenu
112 122
123config EXYNOS5420_MCPM
124 bool "Exynos5420 Multi-Cluster PM support"
125 depends on MCPM && SOC_EXYNOS5420
126 select ARM_CCI
127 help
128 This is needed to provide CPU and cluster power management
129 on Exynos5420 implementing big.LITTLE.
130
113endif 131endif
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index a656dbe3b78c..788f26d21141 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -5,6 +5,8 @@
5# 5#
6# Licensed under GPLv2 6# Licensed under GPLv2
7 7
8ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include
9
8obj-y := 10obj-y :=
9obj-m := 11obj-m :=
10obj-n := 12obj-n :=
@@ -12,20 +14,18 @@ obj- :=
12 14
13# Core 15# Core
14 16
15obj-$(CONFIG_ARCH_EXYNOS) += exynos.o 17obj-$(CONFIG_ARCH_EXYNOS) += exynos.o pmu.o exynos-smc.o firmware.o
16 18
17obj-$(CONFIG_PM_SLEEP) += pm.o sleep.o 19obj-$(CONFIG_PM_SLEEP) += pm.o sleep.o
18obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o 20obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o
19obj-$(CONFIG_CPU_IDLE) += cpuidle.o
20
21obj-$(CONFIG_ARCH_EXYNOS) += pmu.o
22 21
23obj-$(CONFIG_SMP) += platsmp.o headsmp.o 22obj-$(CONFIG_SMP) += platsmp.o headsmp.o
24 23
25obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o 24obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
26 25CFLAGS_hotplug.o += -march=armv7-a
27obj-$(CONFIG_ARCH_EXYNOS) += exynos-smc.o
28obj-$(CONFIG_ARCH_EXYNOS) += firmware.o
29 26
30plus_sec := $(call as-instr,.arch_extension sec,+sec) 27plus_sec := $(call as-instr,.arch_extension sec,+sec)
31AFLAGS_exynos-smc.o :=-Wa,-march=armv7-a$(plus_sec) 28AFLAGS_exynos-smc.o :=-Wa,-march=armv7-a$(plus_sec)
29
30obj-$(CONFIG_EXYNOS5420_MCPM) += mcpm-exynos.o
31CFLAGS_mcpm-exynos.o += -march=armv7-a
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 9ef3f83efaff..16617bdb37a9 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -15,9 +15,107 @@
15#include <linux/reboot.h> 15#include <linux/reboot.h>
16#include <linux/of.h> 16#include <linux/of.h>
17 17
18#define EXYNOS3250_SOC_ID 0xE3472000
19#define EXYNOS3_SOC_MASK 0xFFFFF000
20
21#define EXYNOS4210_CPU_ID 0x43210000
22#define EXYNOS4212_CPU_ID 0x43220000
23#define EXYNOS4412_CPU_ID 0xE4412200
24#define EXYNOS4_CPU_MASK 0xFFFE0000
25
26#define EXYNOS5250_SOC_ID 0x43520000
27#define EXYNOS5410_SOC_ID 0xE5410000
28#define EXYNOS5420_SOC_ID 0xE5420000
29#define EXYNOS5440_SOC_ID 0xE5440000
30#define EXYNOS5800_SOC_ID 0xE5422000
31#define EXYNOS5_SOC_MASK 0xFFFFF000
32
33extern unsigned long samsung_cpu_id;
34
35#define IS_SAMSUNG_CPU(name, id, mask) \
36static inline int is_samsung_##name(void) \
37{ \
38 return ((samsung_cpu_id & mask) == (id & mask)); \
39}
40
41IS_SAMSUNG_CPU(exynos3250, EXYNOS3250_SOC_ID, EXYNOS3_SOC_MASK)
42IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK)
43IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK)
44IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK)
45IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK)
46IS_SAMSUNG_CPU(exynos5410, EXYNOS5410_SOC_ID, EXYNOS5_SOC_MASK)
47IS_SAMSUNG_CPU(exynos5420, EXYNOS5420_SOC_ID, EXYNOS5_SOC_MASK)
48IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK)
49IS_SAMSUNG_CPU(exynos5800, EXYNOS5800_SOC_ID, EXYNOS5_SOC_MASK)
50
51#if defined(CONFIG_SOC_EXYNOS3250)
52# define soc_is_exynos3250() is_samsung_exynos3250()
53#else
54# define soc_is_exynos3250() 0
55#endif
56
57#if defined(CONFIG_CPU_EXYNOS4210)
58# define soc_is_exynos4210() is_samsung_exynos4210()
59#else
60# define soc_is_exynos4210() 0
61#endif
62
63#if defined(CONFIG_SOC_EXYNOS4212)
64# define soc_is_exynos4212() is_samsung_exynos4212()
65#else
66# define soc_is_exynos4212() 0
67#endif
68
69#if defined(CONFIG_SOC_EXYNOS4412)
70# define soc_is_exynos4412() is_samsung_exynos4412()
71#else
72# define soc_is_exynos4412() 0
73#endif
74
75#define EXYNOS4210_REV_0 (0x0)
76#define EXYNOS4210_REV_1_0 (0x10)
77#define EXYNOS4210_REV_1_1 (0x11)
78
79#if defined(CONFIG_SOC_EXYNOS5250)
80# define soc_is_exynos5250() is_samsung_exynos5250()
81#else
82# define soc_is_exynos5250() 0
83#endif
84
85#if defined(CONFIG_SOC_EXYNOS5410)
86# define soc_is_exynos5410() is_samsung_exynos5410()
87#else
88# define soc_is_exynos5410() 0
89#endif
90
91#if defined(CONFIG_SOC_EXYNOS5420)
92# define soc_is_exynos5420() is_samsung_exynos5420()
93#else
94# define soc_is_exynos5420() 0
95#endif
96
97#if defined(CONFIG_SOC_EXYNOS5440)
98# define soc_is_exynos5440() is_samsung_exynos5440()
99#else
100# define soc_is_exynos5440() 0
101#endif
102
103#if defined(CONFIG_SOC_EXYNOS5800)
104# define soc_is_exynos5800() is_samsung_exynos5800()
105#else
106# define soc_is_exynos5800() 0
107#endif
108
109#define soc_is_exynos4() (soc_is_exynos4210() || soc_is_exynos4212() || \
110 soc_is_exynos4412())
111#define soc_is_exynos5() (soc_is_exynos5250() || soc_is_exynos5410() || \
112 soc_is_exynos5420() || soc_is_exynos5800())
113
18void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1); 114void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1);
19 115
20struct map_desc; 116struct map_desc;
117extern void __iomem *sysram_ns_base_addr;
118extern void __iomem *sysram_base_addr;
21void exynos_init_io(void); 119void exynos_init_io(void);
22void exynos_restart(enum reboot_mode mode, const char *cmd); 120void exynos_restart(enum reboot_mode mode, const char *cmd);
23void exynos_cpuidle_init(void); 121void exynos_cpuidle_init(void);
@@ -55,12 +153,21 @@ enum sys_powerdown {
55 NUM_SYS_POWERDOWN, 153 NUM_SYS_POWERDOWN,
56}; 154};
57 155
58extern unsigned long l2x0_regs_phys;
59struct exynos_pmu_conf { 156struct exynos_pmu_conf {
60 void __iomem *reg; 157 void __iomem *reg;
61 unsigned int val[NUM_SYS_POWERDOWN]; 158 unsigned int val[NUM_SYS_POWERDOWN];
62}; 159};
63 160
64extern void exynos_sys_powerdown_conf(enum sys_powerdown mode); 161extern void exynos_sys_powerdown_conf(enum sys_powerdown mode);
162extern void exynos_cpu_power_down(int cpu);
163extern void exynos_cpu_power_up(int cpu);
164extern int exynos_cpu_power_state(int cpu);
165extern void exynos_cluster_power_down(int cluster);
166extern void exynos_cluster_power_up(int cluster);
167extern int exynos_cluster_power_state(int cluster);
168extern void exynos_enter_aftr(void);
169
170extern void s5p_init_cpu(void __iomem *cpuid_addr);
171extern unsigned int samsung_rev(void);
65 172
66#endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */ 173#endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
deleted file mode 100644
index c57cae0e8779..000000000000
--- a/arch/arm/mach-exynos/cpuidle.c
+++ /dev/null
@@ -1,256 +0,0 @@
1/* linux/arch/arm/mach-exynos4/cpuidle.c
2 *
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
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
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/cpuidle.h>
14#include <linux/cpu_pm.h>
15#include <linux/io.h>
16#include <linux/export.h>
17#include <linux/module.h>
18#include <linux/time.h>
19#include <linux/platform_device.h>
20
21#include <asm/proc-fns.h>
22#include <asm/smp_scu.h>
23#include <asm/suspend.h>
24#include <asm/unified.h>
25#include <asm/cpuidle.h>
26
27#include <plat/cpu.h>
28#include <plat/pm.h>
29
30#include <mach/map.h>
31
32#include "common.h"
33#include "regs-pmu.h"
34
35#define REG_DIRECTGO_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \
36 S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \
37 (S5P_VA_SYSRAM + 0x24) : S5P_INFORM0))
38#define REG_DIRECTGO_FLAG (samsung_rev() == EXYNOS4210_REV_1_1 ? \
39 S5P_INFORM6 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \
40 (S5P_VA_SYSRAM + 0x20) : S5P_INFORM1))
41
42#define S5P_CHECK_AFTR 0xFCBA0D10
43
44#define EXYNOS5_PWR_CTRL1 (S5P_VA_CMU + 0x01020)
45#define EXYNOS5_PWR_CTRL2 (S5P_VA_CMU + 0x01024)
46
47#define PWR_CTRL1_CORE2_DOWN_RATIO (7 << 28)
48#define PWR_CTRL1_CORE1_DOWN_RATIO (7 << 16)
49#define PWR_CTRL1_DIV2_DOWN_EN (1 << 9)
50#define PWR_CTRL1_DIV1_DOWN_EN (1 << 8)
51#define PWR_CTRL1_USE_CORE1_WFE (1 << 5)
52#define PWR_CTRL1_USE_CORE0_WFE (1 << 4)
53#define PWR_CTRL1_USE_CORE1_WFI (1 << 1)
54#define PWR_CTRL1_USE_CORE0_WFI (1 << 0)
55
56#define PWR_CTRL2_DIV2_UP_EN (1 << 25)
57#define PWR_CTRL2_DIV1_UP_EN (1 << 24)
58#define PWR_CTRL2_DUR_STANDBY2_VAL (1 << 16)
59#define PWR_CTRL2_DUR_STANDBY1_VAL (1 << 8)
60#define PWR_CTRL2_CORE2_UP_RATIO (1 << 4)
61#define PWR_CTRL2_CORE1_UP_RATIO (1 << 0)
62
63static int exynos4_enter_lowpower(struct cpuidle_device *dev,
64 struct cpuidle_driver *drv,
65 int index);
66
67static DEFINE_PER_CPU(struct cpuidle_device, exynos4_cpuidle_device);
68
69static struct cpuidle_driver exynos4_idle_driver = {
70 .name = "exynos4_idle",
71 .owner = THIS_MODULE,
72 .states = {
73 [0] = ARM_CPUIDLE_WFI_STATE,
74 [1] = {
75 .enter = exynos4_enter_lowpower,
76 .exit_latency = 300,
77 .target_residency = 100000,
78 .flags = CPUIDLE_FLAG_TIME_VALID,
79 .name = "C1",
80 .desc = "ARM power down",
81 },
82 },
83 .state_count = 2,
84 .safe_state_index = 0,
85};
86
87/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */
88static void exynos4_set_wakeupmask(void)
89{
90 __raw_writel(0x0000ff3e, S5P_WAKEUP_MASK);
91}
92
93static unsigned int g_pwr_ctrl, g_diag_reg;
94
95static void save_cpu_arch_register(void)
96{
97 /*read power control register*/
98 asm("mrc p15, 0, %0, c15, c0, 0" : "=r"(g_pwr_ctrl) : : "cc");
99 /*read diagnostic register*/
100 asm("mrc p15, 0, %0, c15, c0, 1" : "=r"(g_diag_reg) : : "cc");
101 return;
102}
103
104static void restore_cpu_arch_register(void)
105{
106 /*write power control register*/
107 asm("mcr p15, 0, %0, c15, c0, 0" : : "r"(g_pwr_ctrl) : "cc");
108 /*write diagnostic register*/
109 asm("mcr p15, 0, %0, c15, c0, 1" : : "r"(g_diag_reg) : "cc");
110 return;
111}
112
113static int idle_finisher(unsigned long flags)
114{
115 cpu_do_idle();
116 return 1;
117}
118
119static int exynos4_enter_core0_aftr(struct cpuidle_device *dev,
120 struct cpuidle_driver *drv,
121 int index)
122{
123 unsigned long tmp;
124
125 exynos4_set_wakeupmask();
126
127 /* Set value of power down register for aftr mode */
128 exynos_sys_powerdown_conf(SYS_AFTR);
129
130 __raw_writel(virt_to_phys(exynos_cpu_resume), REG_DIRECTGO_ADDR);
131 __raw_writel(S5P_CHECK_AFTR, REG_DIRECTGO_FLAG);
132
133 save_cpu_arch_register();
134
135 /* Setting Central Sequence Register for power down mode */
136 tmp = __raw_readl(S5P_CENTRAL_SEQ_CONFIGURATION);
137 tmp &= ~S5P_CENTRAL_LOWPWR_CFG;
138 __raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION);
139
140 cpu_pm_enter();
141 cpu_suspend(0, idle_finisher);
142
143#ifdef CONFIG_SMP
144 if (!soc_is_exynos5250())
145 scu_enable(S5P_VA_SCU);
146#endif
147 cpu_pm_exit();
148
149 restore_cpu_arch_register();
150
151 /*
152 * If PMU failed while entering sleep mode, WFI will be
153 * ignored by PMU and then exiting cpu_do_idle().
154 * S5P_CENTRAL_LOWPWR_CFG bit will not be set automatically
155 * in this situation.
156 */
157 tmp = __raw_readl(S5P_CENTRAL_SEQ_CONFIGURATION);
158 if (!(tmp & S5P_CENTRAL_LOWPWR_CFG)) {
159 tmp |= S5P_CENTRAL_LOWPWR_CFG;
160 __raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION);
161 }
162
163 /* Clear wakeup state register */
164 __raw_writel(0x0, S5P_WAKEUP_STAT);
165
166 return index;
167}
168
169static int exynos4_enter_lowpower(struct cpuidle_device *dev,
170 struct cpuidle_driver *drv,
171 int index)
172{
173 int new_index = index;
174
175 /* AFTR can only be entered when cores other than CPU0 are offline */
176 if (num_online_cpus() > 1 || dev->cpu != 0)
177 new_index = drv->safe_state_index;
178
179 if (new_index == 0)
180 return arm_cpuidle_simple_enter(dev, drv, new_index);
181 else
182 return exynos4_enter_core0_aftr(dev, drv, new_index);
183}
184
185static void __init exynos5_core_down_clk(void)
186{
187 unsigned int tmp;
188
189 /*
190 * Enable arm clock down (in idle) and set arm divider
191 * ratios in WFI/WFE state.
192 */
193 tmp = PWR_CTRL1_CORE2_DOWN_RATIO | \
194 PWR_CTRL1_CORE1_DOWN_RATIO | \
195 PWR_CTRL1_DIV2_DOWN_EN | \
196 PWR_CTRL1_DIV1_DOWN_EN | \
197 PWR_CTRL1_USE_CORE1_WFE | \
198 PWR_CTRL1_USE_CORE0_WFE | \
199 PWR_CTRL1_USE_CORE1_WFI | \
200 PWR_CTRL1_USE_CORE0_WFI;
201 __raw_writel(tmp, EXYNOS5_PWR_CTRL1);
202
203 /*
204 * Enable arm clock up (on exiting idle). Set arm divider
205 * ratios when not in idle along with the standby duration
206 * ratios.
207 */
208 tmp = PWR_CTRL2_DIV2_UP_EN | \
209 PWR_CTRL2_DIV1_UP_EN | \
210 PWR_CTRL2_DUR_STANDBY2_VAL | \
211 PWR_CTRL2_DUR_STANDBY1_VAL | \
212 PWR_CTRL2_CORE2_UP_RATIO | \
213 PWR_CTRL2_CORE1_UP_RATIO;
214 __raw_writel(tmp, EXYNOS5_PWR_CTRL2);
215}
216
217static int exynos_cpuidle_probe(struct platform_device *pdev)
218{
219 int cpu_id, ret;
220 struct cpuidle_device *device;
221
222 if (soc_is_exynos5250())
223 exynos5_core_down_clk();
224
225 if (soc_is_exynos5440())
226 exynos4_idle_driver.state_count = 1;
227
228 ret = cpuidle_register_driver(&exynos4_idle_driver);
229 if (ret) {
230 dev_err(&pdev->dev, "failed to register cpuidle driver\n");
231 return ret;
232 }
233
234 for_each_online_cpu(cpu_id) {
235 device = &per_cpu(exynos4_cpuidle_device, cpu_id);
236 device->cpu = cpu_id;
237
238 ret = cpuidle_register_device(device);
239 if (ret) {
240 dev_err(&pdev->dev, "failed to register cpuidle device\n");
241 return ret;
242 }
243 }
244
245 return 0;
246}
247
248static struct platform_driver exynos_cpuidle_driver = {
249 .probe = exynos_cpuidle_probe,
250 .driver = {
251 .name = "exynos_cpuidle",
252 .owner = THIS_MODULE,
253 },
254};
255
256module_platform_driver(exynos_cpuidle_driver);
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index b32a907d021d..90aab4d75d08 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -26,15 +26,10 @@
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
27#include <asm/memory.h> 27#include <asm/memory.h>
28 28
29#include <plat/cpu.h>
30
31#include "common.h" 29#include "common.h"
32#include "mfc.h" 30#include "mfc.h"
33#include "regs-pmu.h" 31#include "regs-pmu.h"
34 32
35#define L2_AUX_VAL 0x7C470001
36#define L2_AUX_MASK 0xC200ffff
37
38static struct map_desc exynos4_iodesc[] __initdata = { 33static struct map_desc exynos4_iodesc[] __initdata = {
39 { 34 {
40 .virtual = (unsigned long)S3C_VA_SYS, 35 .virtual = (unsigned long)S3C_VA_SYS,
@@ -114,51 +109,6 @@ static struct map_desc exynos4_iodesc[] __initdata = {
114 }, 109 },
115}; 110};
116 111
117static struct map_desc exynos4_iodesc0[] __initdata = {
118 {
119 .virtual = (unsigned long)S5P_VA_SYSRAM,
120 .pfn = __phys_to_pfn(EXYNOS4_PA_SYSRAM0),
121 .length = SZ_4K,
122 .type = MT_DEVICE,
123 },
124};
125
126static struct map_desc exynos4_iodesc1[] __initdata = {
127 {
128 .virtual = (unsigned long)S5P_VA_SYSRAM,
129 .pfn = __phys_to_pfn(EXYNOS4_PA_SYSRAM1),
130 .length = SZ_4K,
131 .type = MT_DEVICE,
132 },
133};
134
135static struct map_desc exynos4210_iodesc[] __initdata = {
136 {
137 .virtual = (unsigned long)S5P_VA_SYSRAM_NS,
138 .pfn = __phys_to_pfn(EXYNOS4210_PA_SYSRAM_NS),
139 .length = SZ_4K,
140 .type = MT_DEVICE,
141 },
142};
143
144static struct map_desc exynos4x12_iodesc[] __initdata = {
145 {
146 .virtual = (unsigned long)S5P_VA_SYSRAM_NS,
147 .pfn = __phys_to_pfn(EXYNOS4x12_PA_SYSRAM_NS),
148 .length = SZ_4K,
149 .type = MT_DEVICE,
150 },
151};
152
153static struct map_desc exynos5250_iodesc[] __initdata = {
154 {
155 .virtual = (unsigned long)S5P_VA_SYSRAM_NS,
156 .pfn = __phys_to_pfn(EXYNOS5250_PA_SYSRAM_NS),
157 .length = SZ_4K,
158 .type = MT_DEVICE,
159 },
160};
161
162static struct map_desc exynos5_iodesc[] __initdata = { 112static struct map_desc exynos5_iodesc[] __initdata = {
163 { 113 {
164 .virtual = (unsigned long)S3C_VA_SYS, 114 .virtual = (unsigned long)S3C_VA_SYS,
@@ -181,11 +131,6 @@ static struct map_desc exynos5_iodesc[] __initdata = {
181 .length = SZ_4K, 131 .length = SZ_4K,
182 .type = MT_DEVICE, 132 .type = MT_DEVICE,
183 }, { 133 }, {
184 .virtual = (unsigned long)S5P_VA_SYSRAM,
185 .pfn = __phys_to_pfn(EXYNOS5_PA_SYSRAM),
186 .length = SZ_4K,
187 .type = MT_DEVICE,
188 }, {
189 .virtual = (unsigned long)S5P_VA_CMU, 134 .virtual = (unsigned long)S5P_VA_CMU,
190 .pfn = __phys_to_pfn(EXYNOS5_PA_CMU), 135 .pfn = __phys_to_pfn(EXYNOS5_PA_CMU),
191 .length = 144 * SZ_1K, 136 .length = 144 * SZ_1K,
@@ -221,12 +166,16 @@ void exynos_restart(enum reboot_mode mode, const char *cmd)
221} 166}
222 167
223static struct platform_device exynos_cpuidle = { 168static struct platform_device exynos_cpuidle = {
224 .name = "exynos_cpuidle", 169 .name = "exynos_cpuidle",
225 .id = -1, 170 .dev.platform_data = exynos_enter_aftr,
171 .id = -1,
226}; 172};
227 173
228void __init exynos_cpuidle_init(void) 174void __init exynos_cpuidle_init(void)
229{ 175{
176 if (soc_is_exynos5440())
177 return;
178
230 platform_device_register(&exynos_cpuidle); 179 platform_device_register(&exynos_cpuidle);
231} 180}
232 181
@@ -250,7 +199,7 @@ static int __init exynos_fdt_map_chipid(unsigned long node, const char *uname,
250{ 199{
251 struct map_desc iodesc; 200 struct map_desc iodesc;
252 __be32 *reg; 201 __be32 *reg;
253 unsigned long len; 202 int len;
254 203
255 if (!of_flat_dt_is_compatible(node, "samsung,exynos4210-chipid") && 204 if (!of_flat_dt_is_compatible(node, "samsung,exynos4210-chipid") &&
256 !of_flat_dt_is_compatible(node, "samsung,exynos5440-clock")) 205 !of_flat_dt_is_compatible(node, "samsung,exynos5440-clock"))
@@ -280,20 +229,6 @@ static void __init exynos_map_io(void)
280 229
281 if (soc_is_exynos5()) 230 if (soc_is_exynos5())
282 iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc)); 231 iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc));
283
284 if (soc_is_exynos4210()) {
285 if (samsung_rev() == EXYNOS4210_REV_0)
286 iotable_init(exynos4_iodesc0,
287 ARRAY_SIZE(exynos4_iodesc0));
288 else
289 iotable_init(exynos4_iodesc1,
290 ARRAY_SIZE(exynos4_iodesc1));
291 iotable_init(exynos4210_iodesc, ARRAY_SIZE(exynos4210_iodesc));
292 }
293 if (soc_is_exynos4212() || soc_is_exynos4412())
294 iotable_init(exynos4x12_iodesc, ARRAY_SIZE(exynos4x12_iodesc));
295 if (soc_is_exynos5250())
296 iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc));
297} 232}
298 233
299void __init exynos_init_io(void) 234void __init exynos_init_io(void)
@@ -308,33 +243,6 @@ void __init exynos_init_io(void)
308 exynos_map_io(); 243 exynos_map_io();
309} 244}
310 245
311struct bus_type exynos_subsys = {
312 .name = "exynos-core",
313 .dev_name = "exynos-core",
314};
315
316static int __init exynos_core_init(void)
317{
318 return subsys_system_register(&exynos_subsys, NULL);
319}
320core_initcall(exynos_core_init);
321
322static int __init exynos4_l2x0_cache_init(void)
323{
324 int ret;
325
326 ret = l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK);
327 if (ret)
328 return ret;
329
330 if (IS_ENABLED(CONFIG_S5P_SLEEP)) {
331 l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs);
332 clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long));
333 }
334 return 0;
335}
336early_initcall(exynos4_l2x0_cache_init);
337
338static void __init exynos_dt_machine_init(void) 246static void __init exynos_dt_machine_init(void)
339{ 247{
340 struct device_node *i2c_np; 248 struct device_node *i2c_np;
@@ -370,12 +278,15 @@ static void __init exynos_dt_machine_init(void)
370} 278}
371 279
372static char const *exynos_dt_compat[] __initconst = { 280static char const *exynos_dt_compat[] __initconst = {
281 "samsung,exynos3",
282 "samsung,exynos3250",
373 "samsung,exynos4", 283 "samsung,exynos4",
374 "samsung,exynos4210", 284 "samsung,exynos4210",
375 "samsung,exynos4212", 285 "samsung,exynos4212",
376 "samsung,exynos4412", 286 "samsung,exynos4412",
377 "samsung,exynos5", 287 "samsung,exynos5",
378 "samsung,exynos5250", 288 "samsung,exynos5250",
289 "samsung,exynos5260",
379 "samsung,exynos5420", 290 "samsung,exynos5420",
380 "samsung,exynos5440", 291 "samsung,exynos5440",
381 NULL 292 NULL
@@ -400,6 +311,8 @@ static void __init exynos_reserve(void)
400DT_MACHINE_START(EXYNOS_DT, "SAMSUNG EXYNOS (Flattened Device Tree)") 311DT_MACHINE_START(EXYNOS_DT, "SAMSUNG EXYNOS (Flattened Device Tree)")
401 /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */ 312 /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */
402 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ 313 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
314 .l2c_aux_val = 0x3c400001,
315 .l2c_aux_mask = 0xc20fffff,
403 .smp = smp_ops(exynos_smp_ops), 316 .smp = smp_ops(exynos_smp_ops),
404 .map_io = exynos_init_io, 317 .map_io = exynos_init_io,
405 .init_early = exynos_firmware_init, 318 .init_early = exynos_firmware_init,
diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c
index 932129ef26c6..eb91d2350f8c 100644
--- a/arch/arm/mach-exynos/firmware.c
+++ b/arch/arm/mach-exynos/firmware.c
@@ -18,6 +18,7 @@
18 18
19#include <mach/map.h> 19#include <mach/map.h>
20 20
21#include "common.h"
21#include "smc.h" 22#include "smc.h"
22 23
23static int exynos_do_idle(void) 24static int exynos_do_idle(void)
@@ -28,13 +29,36 @@ static int exynos_do_idle(void)
28 29
29static int exynos_cpu_boot(int cpu) 30static int exynos_cpu_boot(int cpu)
30{ 31{
32 /*
33 * Exynos3250 doesn't need to send smc command for secondary CPU boot
34 * because Exynos3250 removes WFE in secure mode.
35 */
36 if (soc_is_exynos3250())
37 return 0;
38
39 /*
40 * The second parameter of SMC_CMD_CPU1BOOT command means CPU id.
41 * But, Exynos4212 has only one secondary CPU so second parameter
42 * isn't used for informing secure firmware about CPU id.
43 */
44 if (soc_is_exynos4212())
45 cpu = 0;
46
31 exynos_smc(SMC_CMD_CPU1BOOT, cpu, 0, 0); 47 exynos_smc(SMC_CMD_CPU1BOOT, cpu, 0, 0);
32 return 0; 48 return 0;
33} 49}
34 50
35static int exynos_set_cpu_boot_addr(int cpu, unsigned long boot_addr) 51static int exynos_set_cpu_boot_addr(int cpu, unsigned long boot_addr)
36{ 52{
37 void __iomem *boot_reg = S5P_VA_SYSRAM_NS + 0x1c + 4*cpu; 53 void __iomem *boot_reg;
54
55 if (!sysram_ns_base_addr)
56 return -ENODEV;
57
58 boot_reg = sysram_ns_base_addr + 0x1c;
59
60 if (!soc_is_exynos4212() && !soc_is_exynos3250())
61 boot_reg += 4*cpu;
38 62
39 __raw_writel(boot_addr, boot_reg); 63 __raw_writel(boot_addr, boot_reg);
40 return 0; 64 return 0;
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c
index 5eead530c6f8..69fa48397394 100644
--- a/arch/arm/mach-exynos/hotplug.c
+++ b/arch/arm/mach-exynos/hotplug.c
@@ -19,61 +19,9 @@
19#include <asm/cp15.h> 19#include <asm/cp15.h>
20#include <asm/smp_plat.h> 20#include <asm/smp_plat.h>
21 21
22#include <plat/cpu.h>
23
24#include "common.h" 22#include "common.h"
25#include "regs-pmu.h" 23#include "regs-pmu.h"
26 24
27static inline void cpu_enter_lowpower_a9(void)
28{
29 unsigned int v;
30
31 asm volatile(
32 " mcr p15, 0, %1, c7, c5, 0\n"
33 " mcr p15, 0, %1, c7, c10, 4\n"
34 /*
35 * Turn off coherency
36 */
37 " mrc p15, 0, %0, c1, c0, 1\n"
38 " bic %0, %0, %3\n"
39 " mcr p15, 0, %0, c1, c0, 1\n"
40 " mrc p15, 0, %0, c1, c0, 0\n"
41 " bic %0, %0, %2\n"
42 " mcr p15, 0, %0, c1, c0, 0\n"
43 : "=&r" (v)
44 : "r" (0), "Ir" (CR_C), "Ir" (0x40)
45 : "cc");
46}
47
48static inline void cpu_enter_lowpower_a15(void)
49{
50 unsigned int v;
51
52 asm volatile(
53 " mrc p15, 0, %0, c1, c0, 0\n"
54 " bic %0, %0, %1\n"
55 " mcr p15, 0, %0, c1, c0, 0\n"
56 : "=&r" (v)
57 : "Ir" (CR_C)
58 : "cc");
59
60 flush_cache_louis();
61
62 asm volatile(
63 /*
64 * Turn off coherency
65 */
66 " mrc p15, 0, %0, c1, c0, 1\n"
67 " bic %0, %0, %1\n"
68 " mcr p15, 0, %0, c1, c0, 1\n"
69 : "=&r" (v)
70 : "Ir" (0x40)
71 : "cc");
72
73 isb();
74 dsb();
75}
76
77static inline void cpu_leave_lowpower(void) 25static inline void cpu_leave_lowpower(void)
78{ 26{
79 unsigned int v; 27 unsigned int v;
@@ -96,7 +44,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
96 44
97 /* make cpu1 to be turned off at next WFI command */ 45 /* make cpu1 to be turned off at next WFI command */
98 if (cpu == 1) 46 if (cpu == 1)
99 __raw_writel(0, S5P_ARM_CORE1_CONFIGURATION); 47 exynos_cpu_power_down(cpu);
100 48
101 /* 49 /*
102 * here's the WFI 50 * here's the WFI
@@ -132,19 +80,8 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
132void __ref exynos_cpu_die(unsigned int cpu) 80void __ref exynos_cpu_die(unsigned int cpu)
133{ 81{
134 int spurious = 0; 82 int spurious = 0;
135 int primary_part = 0;
136 83
137 /* 84 v7_exit_coherency_flush(louis);
138 * we're ready for shutdown now, so do it.
139 * Exynos4 is A9 based while Exynos5 is A15; check the CPU part
140 * number by reading the Main ID register and then perform the
141 * appropriate sequence for entering low power.
142 */
143 asm("mrc p15, 0, %0, c0, c0, 0" : "=r"(primary_part) : : "cc");
144 if ((primary_part & 0xfff0) == 0xc0f0)
145 cpu_enter_lowpower_a15();
146 else
147 cpu_enter_lowpower_a9();
148 85
149 platform_do_lowpower(cpu, &spurious); 86 platform_do_lowpower(cpu, &spurious);
150 87
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h
index 7b046b59d9ec..548269a60634 100644
--- a/arch/arm/mach-exynos/include/mach/map.h
+++ b/arch/arm/mach-exynos/include/mach/map.h
@@ -23,13 +23,6 @@
23 23
24#include <plat/map-s5p.h> 24#include <plat/map-s5p.h>
25 25
26#define EXYNOS4_PA_SYSRAM0 0x02025000
27#define EXYNOS4_PA_SYSRAM1 0x02020000
28#define EXYNOS5_PA_SYSRAM 0x02020000
29#define EXYNOS4210_PA_SYSRAM_NS 0x0203F000
30#define EXYNOS4x12_PA_SYSRAM_NS 0x0204F000
31#define EXYNOS5250_PA_SYSRAM_NS 0x0204F000
32
33#define EXYNOS_PA_CHIPID 0x10000000 26#define EXYNOS_PA_CHIPID 0x10000000
34 27
35#define EXYNOS4_PA_SYSCON 0x10010000 28#define EXYNOS4_PA_SYSCON 0x10010000
diff --git a/arch/arm/mach-exynos/mcpm-exynos.c b/arch/arm/mach-exynos/mcpm-exynos.c
new file mode 100644
index 000000000000..0498d0b887ef
--- /dev/null
+++ b/arch/arm/mach-exynos/mcpm-exynos.c
@@ -0,0 +1,357 @@
1/*
2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 * http://www.samsung.com
4 *
5 * arch/arm/mach-exynos/mcpm-exynos.c
6 *
7 * Based on arch/arm/mach-vexpress/dcscb.c
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/arm-cci.h>
15#include <linux/delay.h>
16#include <linux/io.h>
17#include <linux/of_address.h>
18
19#include <asm/cputype.h>
20#include <asm/cp15.h>
21#include <asm/mcpm.h>
22
23#include "regs-pmu.h"
24#include "common.h"
25
26#define EXYNOS5420_CPUS_PER_CLUSTER 4
27#define EXYNOS5420_NR_CLUSTERS 2
28#define MCPM_BOOT_ADDR_OFFSET 0x1c
29
30/*
31 * The common v7_exit_coherency_flush API could not be used because of the
32 * Erratum 799270 workaround. This macro is the same as the common one (in
33 * arch/arm/include/asm/cacheflush.h) except for the erratum handling.
34 */
35#define exynos_v7_exit_coherency_flush(level) \
36 asm volatile( \
37 "stmfd sp!, {fp, ip}\n\t"\
38 "mrc p15, 0, r0, c1, c0, 0 @ get SCTLR\n\t" \
39 "bic r0, r0, #"__stringify(CR_C)"\n\t" \
40 "mcr p15, 0, r0, c1, c0, 0 @ set SCTLR\n\t" \
41 "isb\n\t"\
42 "bl v7_flush_dcache_"__stringify(level)"\n\t" \
43 "clrex\n\t"\
44 "mrc p15, 0, r0, c1, c0, 1 @ get ACTLR\n\t" \
45 "bic r0, r0, #(1 << 6) @ disable local coherency\n\t" \
46 /* Dummy Load of a device register to avoid Erratum 799270 */ \
47 "ldr r4, [%0]\n\t" \
48 "and r4, r4, #0\n\t" \
49 "orr r0, r0, r4\n\t" \
50 "mcr p15, 0, r0, c1, c0, 1 @ set ACTLR\n\t" \
51 "isb\n\t" \
52 "dsb\n\t" \
53 "ldmfd sp!, {fp, ip}" \
54 : \
55 : "Ir" (S5P_INFORM0) \
56 : "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
57 "r9", "r10", "lr", "memory")
58
59/*
60 * We can't use regular spinlocks. In the switcher case, it is possible
61 * for an outbound CPU to call power_down() after its inbound counterpart
62 * is already live using the same logical CPU number which trips lockdep
63 * debugging.
64 */
65static arch_spinlock_t exynos_mcpm_lock = __ARCH_SPIN_LOCK_UNLOCKED;
66static int
67cpu_use_count[EXYNOS5420_CPUS_PER_CLUSTER][EXYNOS5420_NR_CLUSTERS];
68
69#define exynos_cluster_usecnt(cluster) \
70 (cpu_use_count[0][cluster] + \
71 cpu_use_count[1][cluster] + \
72 cpu_use_count[2][cluster] + \
73 cpu_use_count[3][cluster])
74
75#define exynos_cluster_unused(cluster) !exynos_cluster_usecnt(cluster)
76
77static int exynos_cluster_power_control(unsigned int cluster, int enable)
78{
79 unsigned int tries = 100;
80 unsigned int val;
81
82 if (enable) {
83 exynos_cluster_power_up(cluster);
84 val = S5P_CORE_LOCAL_PWR_EN;
85 } else {
86 exynos_cluster_power_down(cluster);
87 val = 0;
88 }
89
90 /* Wait until cluster power control is applied */
91 while (tries--) {
92 if (exynos_cluster_power_state(cluster) == val)
93 return 0;
94
95 cpu_relax();
96 }
97 pr_debug("timed out waiting for cluster %u to power %s\n", cluster,
98 enable ? "on" : "off");
99
100 return -ETIMEDOUT;
101}
102
103static int exynos_power_up(unsigned int cpu, unsigned int cluster)
104{
105 unsigned int cpunr = cpu + (cluster * EXYNOS5420_CPUS_PER_CLUSTER);
106 int err = 0;
107
108 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
109 if (cpu >= EXYNOS5420_CPUS_PER_CLUSTER ||
110 cluster >= EXYNOS5420_NR_CLUSTERS)
111 return -EINVAL;
112
113 /*
114 * Since this is called with IRQs enabled, and no arch_spin_lock_irq
115 * variant exists, we need to disable IRQs manually here.
116 */
117 local_irq_disable();
118 arch_spin_lock(&exynos_mcpm_lock);
119
120 cpu_use_count[cpu][cluster]++;
121 if (cpu_use_count[cpu][cluster] == 1) {
122 bool was_cluster_down =
123 (exynos_cluster_usecnt(cluster) == 1);
124
125 /*
126 * Turn on the cluster (L2/COMMON) and then power on the
127 * cores.
128 */
129 if (was_cluster_down)
130 err = exynos_cluster_power_control(cluster, 1);
131
132 if (!err)
133 exynos_cpu_power_up(cpunr);
134 else
135 exynos_cluster_power_control(cluster, 0);
136 } else if (cpu_use_count[cpu][cluster] != 2) {
137 /*
138 * The only possible values are:
139 * 0 = CPU down
140 * 1 = CPU (still) up
141 * 2 = CPU requested to be up before it had a chance
142 * to actually make itself down.
143 * Any other value is a bug.
144 */
145 BUG();
146 }
147
148 arch_spin_unlock(&exynos_mcpm_lock);
149 local_irq_enable();
150
151 return err;
152}
153
154/*
155 * NOTE: This function requires the stack data to be visible through power down
156 * and can only be executed on processors like A15 and A7 that hit the cache
157 * with the C bit clear in the SCTLR register.
158 */
159static void exynos_power_down(void)
160{
161 unsigned int mpidr, cpu, cluster;
162 bool last_man = false, skip_wfi = false;
163 unsigned int cpunr;
164
165 mpidr = read_cpuid_mpidr();
166 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
167 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
168 cpunr = cpu + (cluster * EXYNOS5420_CPUS_PER_CLUSTER);
169
170 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
171 BUG_ON(cpu >= EXYNOS5420_CPUS_PER_CLUSTER ||
172 cluster >= EXYNOS5420_NR_CLUSTERS);
173
174 __mcpm_cpu_going_down(cpu, cluster);
175
176 arch_spin_lock(&exynos_mcpm_lock);
177 BUG_ON(__mcpm_cluster_state(cluster) != CLUSTER_UP);
178 cpu_use_count[cpu][cluster]--;
179 if (cpu_use_count[cpu][cluster] == 0) {
180 exynos_cpu_power_down(cpunr);
181
182 if (exynos_cluster_unused(cluster))
183 /* TODO: Turn off the cluster here to save power. */
184 last_man = true;
185 } else if (cpu_use_count[cpu][cluster] == 1) {
186 /*
187 * A power_up request went ahead of us.
188 * Even if we do not want to shut this CPU down,
189 * the caller expects a certain state as if the WFI
190 * was aborted. So let's continue with cache cleaning.
191 */
192 skip_wfi = true;
193 } else {
194 BUG();
195 }
196
197 if (last_man && __mcpm_outbound_enter_critical(cpu, cluster)) {
198 arch_spin_unlock(&exynos_mcpm_lock);
199
200 if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A15) {
201 /*
202 * On the Cortex-A15 we need to disable
203 * L2 prefetching before flushing the cache.
204 */
205 asm volatile(
206 "mcr p15, 1, %0, c15, c0, 3\n\t"
207 "isb\n\t"
208 "dsb"
209 : : "r" (0x400));
210 }
211
212 /* Flush all cache levels for this cluster. */
213 exynos_v7_exit_coherency_flush(all);
214
215 /*
216 * Disable cluster-level coherency by masking
217 * incoming snoops and DVM messages:
218 */
219 cci_disable_port_by_cpu(mpidr);
220
221 __mcpm_outbound_leave_critical(cluster, CLUSTER_DOWN);
222 } else {
223 arch_spin_unlock(&exynos_mcpm_lock);
224
225 /* Disable and flush the local CPU cache. */
226 exynos_v7_exit_coherency_flush(louis);
227 }
228
229 __mcpm_cpu_down(cpu, cluster);
230
231 /* Now we are prepared for power-down, do it: */
232 if (!skip_wfi)
233 wfi();
234
235 /* Not dead at this point? Let our caller cope. */
236}
237
238static int exynos_wait_for_powerdown(unsigned int cpu, unsigned int cluster)
239{
240 unsigned int tries = 100;
241 unsigned int cpunr = cpu + (cluster * EXYNOS5420_CPUS_PER_CLUSTER);
242
243 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
244 BUG_ON(cpu >= EXYNOS5420_CPUS_PER_CLUSTER ||
245 cluster >= EXYNOS5420_NR_CLUSTERS);
246
247 /* Wait for the core state to be OFF */
248 while (tries--) {
249 if (ACCESS_ONCE(cpu_use_count[cpu][cluster]) == 0) {
250 if ((exynos_cpu_power_state(cpunr) == 0))
251 return 0; /* success: the CPU is halted */
252 }
253
254 /* Otherwise, wait and retry: */
255 msleep(1);
256 }
257
258 return -ETIMEDOUT; /* timeout */
259}
260
261static const struct mcpm_platform_ops exynos_power_ops = {
262 .power_up = exynos_power_up,
263 .power_down = exynos_power_down,
264 .wait_for_powerdown = exynos_wait_for_powerdown,
265};
266
267static void __init exynos_mcpm_usage_count_init(void)
268{
269 unsigned int mpidr, cpu, cluster;
270
271 mpidr = read_cpuid_mpidr();
272 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
273 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
274
275 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
276 BUG_ON(cpu >= EXYNOS5420_CPUS_PER_CLUSTER ||
277 cluster >= EXYNOS5420_NR_CLUSTERS);
278
279 cpu_use_count[cpu][cluster] = 1;
280}
281
282/*
283 * Enable cluster-level coherency, in preparation for turning on the MMU.
284 */
285static void __naked exynos_pm_power_up_setup(unsigned int affinity_level)
286{
287 asm volatile ("\n"
288 "cmp r0, #1\n"
289 "bxne lr\n"
290 "b cci_enable_port_for_self");
291}
292
293static const struct of_device_id exynos_dt_mcpm_match[] = {
294 { .compatible = "samsung,exynos5420" },
295 { .compatible = "samsung,exynos5800" },
296 {},
297};
298
299static int __init exynos_mcpm_init(void)
300{
301 struct device_node *node;
302 void __iomem *ns_sram_base_addr;
303 int ret;
304
305 node = of_find_matching_node(NULL, exynos_dt_mcpm_match);
306 if (!node)
307 return -ENODEV;
308 of_node_put(node);
309
310 if (!cci_probed())
311 return -ENODEV;
312
313 node = of_find_compatible_node(NULL, NULL,
314 "samsung,exynos4210-sysram-ns");
315 if (!node)
316 return -ENODEV;
317
318 ns_sram_base_addr = of_iomap(node, 0);
319 of_node_put(node);
320 if (!ns_sram_base_addr) {
321 pr_err("failed to map non-secure iRAM base address\n");
322 return -ENOMEM;
323 }
324
325 /*
326 * To increase the stability of KFC reset we need to program
327 * the PMU SPARE3 register
328 */
329 __raw_writel(EXYNOS5420_SWRESET_KFC_SEL, S5P_PMU_SPARE3);
330
331 exynos_mcpm_usage_count_init();
332
333 ret = mcpm_platform_register(&exynos_power_ops);
334 if (!ret)
335 ret = mcpm_sync_init(exynos_pm_power_up_setup);
336 if (ret) {
337 iounmap(ns_sram_base_addr);
338 return ret;
339 }
340
341 mcpm_smp_set_ops();
342
343 pr_info("Exynos MCPM support installed\n");
344
345 /*
346 * Future entries into the kernel can now go
347 * through the cluster entry vectors.
348 */
349 __raw_writel(virt_to_phys(mcpm_entry_point),
350 ns_sram_base_addr + MCPM_BOOT_ADDR_OFFSET);
351
352 iounmap(ns_sram_base_addr);
353
354 return ret;
355}
356
357early_initcall(exynos_mcpm_init);
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 03e5e9f94705..ec02422e8499 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -20,24 +20,45 @@
20#include <linux/jiffies.h> 20#include <linux/jiffies.h>
21#include <linux/smp.h> 21#include <linux/smp.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/of_address.h>
23 24
24#include <asm/cacheflush.h> 25#include <asm/cacheflush.h>
25#include <asm/smp_plat.h> 26#include <asm/smp_plat.h>
26#include <asm/smp_scu.h> 27#include <asm/smp_scu.h>
27#include <asm/firmware.h> 28#include <asm/firmware.h>
28 29
29#include <plat/cpu.h>
30
31#include "common.h" 30#include "common.h"
32#include "regs-pmu.h" 31#include "regs-pmu.h"
33 32
34extern void exynos4_secondary_startup(void); 33extern void exynos4_secondary_startup(void);
35 34
35void __iomem *sysram_base_addr;
36void __iomem *sysram_ns_base_addr;
37
38static void __init exynos_smp_prepare_sysram(void)
39{
40 struct device_node *node;
41
42 for_each_compatible_node(node, NULL, "samsung,exynos4210-sysram") {
43 if (!of_device_is_available(node))
44 continue;
45 sysram_base_addr = of_iomap(node, 0);
46 break;
47 }
48
49 for_each_compatible_node(node, NULL, "samsung,exynos4210-sysram-ns") {
50 if (!of_device_is_available(node))
51 continue;
52 sysram_ns_base_addr = of_iomap(node, 0);
53 break;
54 }
55}
56
36static inline void __iomem *cpu_boot_reg_base(void) 57static inline void __iomem *cpu_boot_reg_base(void)
37{ 58{
38 if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1) 59 if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1)
39 return S5P_INFORM5; 60 return S5P_INFORM5;
40 return S5P_VA_SYSRAM; 61 return sysram_base_addr;
41} 62}
42 63
43static inline void __iomem *cpu_boot_reg(int cpu) 64static inline void __iomem *cpu_boot_reg(int cpu)
@@ -45,9 +66,11 @@ static inline void __iomem *cpu_boot_reg(int cpu)
45 void __iomem *boot_reg; 66 void __iomem *boot_reg;
46 67
47 boot_reg = cpu_boot_reg_base(); 68 boot_reg = cpu_boot_reg_base();
69 if (!boot_reg)
70 return ERR_PTR(-ENODEV);
48 if (soc_is_exynos4412()) 71 if (soc_is_exynos4412())
49 boot_reg += 4*cpu; 72 boot_reg += 4*cpu;
50 else if (soc_is_exynos5420()) 73 else if (soc_is_exynos5420() || soc_is_exynos5800())
51 boot_reg += 4; 74 boot_reg += 4;
52 return boot_reg; 75 return boot_reg;
53} 76}
@@ -90,6 +113,7 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
90{ 113{
91 unsigned long timeout; 114 unsigned long timeout;
92 unsigned long phys_cpu = cpu_logical_map(cpu); 115 unsigned long phys_cpu = cpu_logical_map(cpu);
116 int ret = -ENOSYS;
93 117
94 /* 118 /*
95 * Set synchronisation state between this boot processor 119 * Set synchronisation state between this boot processor
@@ -107,15 +131,12 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
107 */ 131 */
108 write_pen_release(phys_cpu); 132 write_pen_release(phys_cpu);
109 133
110 if (!(__raw_readl(S5P_ARM_CORE1_STATUS) & S5P_CORE_LOCAL_PWR_EN)) { 134 if (!exynos_cpu_power_state(cpu)) {
111 __raw_writel(S5P_CORE_LOCAL_PWR_EN, 135 exynos_cpu_power_up(cpu);
112 S5P_ARM_CORE1_CONFIGURATION);
113
114 timeout = 10; 136 timeout = 10;
115 137
116 /* wait max 10 ms until cpu1 is on */ 138 /* wait max 10 ms until cpu1 is on */
117 while ((__raw_readl(S5P_ARM_CORE1_STATUS) 139 while (exynos_cpu_power_state(cpu) != S5P_CORE_LOCAL_PWR_EN) {
118 & S5P_CORE_LOCAL_PWR_EN) != S5P_CORE_LOCAL_PWR_EN) {
119 if (timeout-- == 0) 140 if (timeout-- == 0)
120 break; 141 break;
121 142
@@ -146,8 +167,18 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
146 * Try to set boot address using firmware first 167 * Try to set boot address using firmware first
147 * and fall back to boot register if it fails. 168 * and fall back to boot register if it fails.
148 */ 169 */
149 if (call_firmware_op(set_cpu_boot_addr, phys_cpu, boot_addr)) 170 ret = call_firmware_op(set_cpu_boot_addr, phys_cpu, boot_addr);
171 if (ret && ret != -ENOSYS)
172 goto fail;
173 if (ret == -ENOSYS) {
174 void __iomem *boot_reg = cpu_boot_reg(phys_cpu);
175
176 if (IS_ERR(boot_reg)) {
177 ret = PTR_ERR(boot_reg);
178 goto fail;
179 }
150 __raw_writel(boot_addr, cpu_boot_reg(phys_cpu)); 180 __raw_writel(boot_addr, cpu_boot_reg(phys_cpu));
181 }
151 182
152 call_firmware_op(cpu_boot, phys_cpu); 183 call_firmware_op(cpu_boot, phys_cpu);
153 184
@@ -163,9 +194,10 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
163 * now the secondary core is starting up let it run its 194 * now the secondary core is starting up let it run its
164 * calibrations, then wait for it to finish 195 * calibrations, then wait for it to finish
165 */ 196 */
197fail:
166 spin_unlock(&boot_lock); 198 spin_unlock(&boot_lock);
167 199
168 return pen_release != -1 ? -ENOSYS : 0; 200 return pen_release != -1 ? ret : 0;
169} 201}
170 202
171/* 203/*
@@ -205,6 +237,8 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
205 if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9) 237 if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9)
206 scu_enable(scu_base_addr()); 238 scu_enable(scu_base_addr());
207 239
240 exynos_smp_prepare_sysram();
241
208 /* 242 /*
209 * Write the address of secondary startup into the 243 * Write the address of secondary startup into the
210 * system-wide flags register. The boot monitor waits 244 * system-wide flags register. The boot monitor waits
@@ -217,12 +251,21 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
217 for (i = 1; i < max_cpus; ++i) { 251 for (i = 1; i < max_cpus; ++i) {
218 unsigned long phys_cpu; 252 unsigned long phys_cpu;
219 unsigned long boot_addr; 253 unsigned long boot_addr;
254 int ret;
220 255
221 phys_cpu = cpu_logical_map(i); 256 phys_cpu = cpu_logical_map(i);
222 boot_addr = virt_to_phys(exynos4_secondary_startup); 257 boot_addr = virt_to_phys(exynos4_secondary_startup);
223 258
224 if (call_firmware_op(set_cpu_boot_addr, phys_cpu, boot_addr)) 259 ret = call_firmware_op(set_cpu_boot_addr, phys_cpu, boot_addr);
260 if (ret && ret != -ENOSYS)
261 break;
262 if (ret == -ENOSYS) {
263 void __iomem *boot_reg = cpu_boot_reg(phys_cpu);
264
265 if (IS_ERR(boot_reg))
266 break;
225 __raw_writel(boot_addr, cpu_boot_reg(phys_cpu)); 267 __raw_writel(boot_addr, cpu_boot_reg(phys_cpu));
268 }
226 } 269 }
227} 270}
228 271
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index 15af0ceb0a66..87c0d34c7fba 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -16,6 +16,7 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/suspend.h> 17#include <linux/suspend.h>
18#include <linux/syscore_ops.h> 18#include <linux/syscore_ops.h>
19#include <linux/cpu_pm.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>
21#include <linux/err.h> 22#include <linux/err.h>
@@ -26,7 +27,6 @@
26#include <asm/smp_scu.h> 27#include <asm/smp_scu.h>
27#include <asm/suspend.h> 28#include <asm/suspend.h>
28 29
29#include <plat/cpu.h>
30#include <plat/pm-common.h> 30#include <plat/pm-common.h>
31#include <plat/pll.h> 31#include <plat/pll.h>
32#include <plat/regs-srom.h> 32#include <plat/regs-srom.h>
@@ -100,9 +100,141 @@ static int exynos_irq_set_wake(struct irq_data *data, unsigned int state)
100 return -ENOENT; 100 return -ENOENT;
101} 101}
102 102
103/**
104 * exynos_core_power_down : power down the specified cpu
105 * @cpu : the cpu to power down
106 *
107 * Power down the specified cpu. The sequence must be finished by a
108 * call to cpu_do_idle()
109 *
110 */
111void exynos_cpu_power_down(int cpu)
112{
113 __raw_writel(0, EXYNOS_ARM_CORE_CONFIGURATION(cpu));
114}
115
116/**
117 * exynos_cpu_power_up : power up the specified cpu
118 * @cpu : the cpu to power up
119 *
120 * Power up the specified cpu
121 */
122void exynos_cpu_power_up(int cpu)
123{
124 __raw_writel(S5P_CORE_LOCAL_PWR_EN,
125 EXYNOS_ARM_CORE_CONFIGURATION(cpu));
126}
127
128/**
129 * exynos_cpu_power_state : returns the power state of the cpu
130 * @cpu : the cpu to retrieve the power state from
131 *
132 */
133int exynos_cpu_power_state(int cpu)
134{
135 return (__raw_readl(EXYNOS_ARM_CORE_STATUS(cpu)) &
136 S5P_CORE_LOCAL_PWR_EN);
137}
138
139/**
140 * exynos_cluster_power_down : power down the specified cluster
141 * @cluster : the cluster to power down
142 */
143void exynos_cluster_power_down(int cluster)
144{
145 __raw_writel(0, EXYNOS_COMMON_CONFIGURATION(cluster));
146}
147
148/**
149 * exynos_cluster_power_up : power up the specified cluster
150 * @cluster : the cluster to power up
151 */
152void exynos_cluster_power_up(int cluster)
153{
154 __raw_writel(S5P_CORE_LOCAL_PWR_EN,
155 EXYNOS_COMMON_CONFIGURATION(cluster));
156}
157
158/**
159 * exynos_cluster_power_state : returns the power state of the cluster
160 * @cluster : the cluster to retrieve the power state from
161 *
162 */
163int exynos_cluster_power_state(int cluster)
164{
165 return (__raw_readl(EXYNOS_COMMON_STATUS(cluster)) &
166 S5P_CORE_LOCAL_PWR_EN);
167}
168
169#define EXYNOS_BOOT_VECTOR_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \
170 S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \
171 (sysram_base_addr + 0x24) : S5P_INFORM0))
172#define EXYNOS_BOOT_VECTOR_FLAG (samsung_rev() == EXYNOS4210_REV_1_1 ? \
173 S5P_INFORM6 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \
174 (sysram_base_addr + 0x20) : S5P_INFORM1))
175
176#define S5P_CHECK_AFTR 0xFCBA0D10
177#define S5P_CHECK_SLEEP 0x00000BAD
178
179/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */
180static void exynos_set_wakeupmask(long mask)
181{
182 __raw_writel(mask, S5P_WAKEUP_MASK);
183}
184
185static void exynos_cpu_set_boot_vector(long flags)
186{
187 __raw_writel(virt_to_phys(exynos_cpu_resume), EXYNOS_BOOT_VECTOR_ADDR);
188 __raw_writel(flags, EXYNOS_BOOT_VECTOR_FLAG);
189}
190
191void exynos_enter_aftr(void)
192{
193 exynos_set_wakeupmask(0x0000ff3e);
194 exynos_cpu_set_boot_vector(S5P_CHECK_AFTR);
195 /* Set value of power down register for aftr mode */
196 exynos_sys_powerdown_conf(SYS_AFTR);
197}
198
103/* For Cortex-A9 Diagnostic and Power control register */ 199/* For Cortex-A9 Diagnostic and Power control register */
104static unsigned int save_arm_register[2]; 200static unsigned int save_arm_register[2];
105 201
202static void exynos_cpu_save_register(void)
203{
204 unsigned long tmp;
205
206 /* Save Power control register */
207 asm ("mrc p15, 0, %0, c15, c0, 0"
208 : "=r" (tmp) : : "cc");
209
210 save_arm_register[0] = tmp;
211
212 /* Save Diagnostic register */
213 asm ("mrc p15, 0, %0, c15, c0, 1"
214 : "=r" (tmp) : : "cc");
215
216 save_arm_register[1] = tmp;
217}
218
219static void exynos_cpu_restore_register(void)
220{
221 unsigned long tmp;
222
223 /* Restore Power control register */
224 tmp = save_arm_register[0];
225
226 asm volatile ("mcr p15, 0, %0, c15, c0, 0"
227 : : "r" (tmp)
228 : "cc");
229
230 /* Restore Diagnostic register */
231 tmp = save_arm_register[1];
232
233 asm volatile ("mcr p15, 0, %0, c15, c0, 1"
234 : : "r" (tmp)
235 : "cc");
236}
237
106static int exynos_cpu_suspend(unsigned long arg) 238static int exynos_cpu_suspend(unsigned long arg)
107{ 239{
108#ifdef CONFIG_CACHE_L2X0 240#ifdef CONFIG_CACHE_L2X0
@@ -147,37 +279,34 @@ static void exynos_pm_prepare(void)
147 __raw_writel(virt_to_phys(exynos_cpu_resume), S5P_INFORM0); 279 __raw_writel(virt_to_phys(exynos_cpu_resume), S5P_INFORM0);
148} 280}
149 281
150static int exynos_pm_suspend(void) 282static void exynos_pm_central_suspend(void)
151{ 283{
152 unsigned long tmp; 284 unsigned long tmp;
153 285
154 /* Setting Central Sequence Register for power down mode */ 286 /* Setting Central Sequence Register for power down mode */
155
156 tmp = __raw_readl(S5P_CENTRAL_SEQ_CONFIGURATION); 287 tmp = __raw_readl(S5P_CENTRAL_SEQ_CONFIGURATION);
157 tmp &= ~S5P_CENTRAL_LOWPWR_CFG; 288 tmp &= ~S5P_CENTRAL_LOWPWR_CFG;
158 __raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION); 289 __raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION);
290}
291
292static int exynos_pm_suspend(void)
293{
294 unsigned long tmp;
295
296 exynos_pm_central_suspend();
159 297
160 /* Setting SEQ_OPTION register */ 298 /* Setting SEQ_OPTION register */
161 299
162 tmp = (S5P_USE_STANDBY_WFI0 | S5P_USE_STANDBY_WFE0); 300 tmp = (S5P_USE_STANDBY_WFI0 | S5P_USE_STANDBY_WFE0);
163 __raw_writel(tmp, S5P_CENTRAL_SEQ_OPTION); 301 __raw_writel(tmp, S5P_CENTRAL_SEQ_OPTION);
164 302
165 if (!soc_is_exynos5250()) { 303 if (!soc_is_exynos5250())
166 /* Save Power control register */ 304 exynos_cpu_save_register();
167 asm ("mrc p15, 0, %0, c15, c0, 0"
168 : "=r" (tmp) : : "cc");
169 save_arm_register[0] = tmp;
170
171 /* Save Diagnostic register */
172 asm ("mrc p15, 0, %0, c15, c0, 1"
173 : "=r" (tmp) : : "cc");
174 save_arm_register[1] = tmp;
175 }
176 305
177 return 0; 306 return 0;
178} 307}
179 308
180static void exynos_pm_resume(void) 309static int exynos_pm_central_resume(void)
181{ 310{
182 unsigned long tmp; 311 unsigned long tmp;
183 312
@@ -194,22 +323,20 @@ static void exynos_pm_resume(void)
194 /* clear the wakeup state register */ 323 /* clear the wakeup state register */
195 __raw_writel(0x0, S5P_WAKEUP_STAT); 324 __raw_writel(0x0, S5P_WAKEUP_STAT);
196 /* No need to perform below restore code */ 325 /* No need to perform below restore code */
197 goto early_wakeup; 326 return -1;
198 }
199 if (!soc_is_exynos5250()) {
200 /* Restore Power control register */
201 tmp = save_arm_register[0];
202 asm volatile ("mcr p15, 0, %0, c15, c0, 0"
203 : : "r" (tmp)
204 : "cc");
205
206 /* Restore Diagnostic register */
207 tmp = save_arm_register[1];
208 asm volatile ("mcr p15, 0, %0, c15, c0, 1"
209 : : "r" (tmp)
210 : "cc");
211 } 327 }
212 328
329 return 0;
330}
331
332static void exynos_pm_resume(void)
333{
334 if (exynos_pm_central_resume())
335 goto early_wakeup;
336
337 if (!soc_is_exynos5250())
338 exynos_cpu_restore_register();
339
213 /* For release retention */ 340 /* For release retention */
214 341
215 __raw_writel((1 << 28), S5P_PAD_RET_MAUDIO_OPTION); 342 __raw_writel((1 << 28), S5P_PAD_RET_MAUDIO_OPTION);
@@ -226,7 +353,7 @@ static void exynos_pm_resume(void)
226 353
227 s3c_pm_do_restore_core(exynos_core_save, ARRAY_SIZE(exynos_core_save)); 354 s3c_pm_do_restore_core(exynos_core_save, ARRAY_SIZE(exynos_core_save));
228 355
229 if (IS_ENABLED(CONFIG_SMP) && !soc_is_exynos5250()) 356 if (!soc_is_exynos5250())
230 scu_enable(S5P_VA_SCU); 357 scu_enable(S5P_VA_SCU);
231 358
232early_wakeup: 359early_wakeup:
@@ -304,10 +431,42 @@ static const struct platform_suspend_ops exynos_suspend_ops = {
304 .valid = suspend_valid_only_mem, 431 .valid = suspend_valid_only_mem,
305}; 432};
306 433
434static int exynos_cpu_pm_notifier(struct notifier_block *self,
435 unsigned long cmd, void *v)
436{
437 int cpu = smp_processor_id();
438
439 switch (cmd) {
440 case CPU_PM_ENTER:
441 if (cpu == 0) {
442 exynos_pm_central_suspend();
443 exynos_cpu_save_register();
444 }
445 break;
446
447 case CPU_PM_EXIT:
448 if (cpu == 0) {
449 if (!soc_is_exynos5250())
450 scu_enable(S5P_VA_SCU);
451 exynos_cpu_restore_register();
452 exynos_pm_central_resume();
453 }
454 break;
455 }
456
457 return NOTIFY_OK;
458}
459
460static struct notifier_block exynos_cpu_pm_notifier_block = {
461 .notifier_call = exynos_cpu_pm_notifier,
462};
463
307void __init exynos_pm_init(void) 464void __init exynos_pm_init(void)
308{ 465{
309 u32 tmp; 466 u32 tmp;
310 467
468 cpu_pm_register_notifier(&exynos_cpu_pm_notifier_block);
469
311 /* Platform-specific GIC callback */ 470 /* Platform-specific GIC callback */
312 gic_arch_extn.irq_set_wake = exynos_irq_set_wake; 471 gic_arch_extn.irq_set_wake = exynos_irq_set_wake;
313 472
diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c
index 05c7ce15322a..fb0deda3b3a4 100644
--- a/arch/arm/mach-exynos/pmu.c
+++ b/arch/arm/mach-exynos/pmu.c
@@ -13,8 +13,6 @@
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/bug.h> 14#include <linux/bug.h>
15 15
16#include <plat/cpu.h>
17
18#include "common.h" 16#include "common.h"
19#include "regs-pmu.h" 17#include "regs-pmu.h"
20 18
diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h
index 4f6a2560d022..1d13b08708f0 100644
--- a/arch/arm/mach-exynos/regs-pmu.h
+++ b/arch/arm/mach-exynos/regs-pmu.h
@@ -38,6 +38,7 @@
38#define S5P_INFORM5 S5P_PMUREG(0x0814) 38#define S5P_INFORM5 S5P_PMUREG(0x0814)
39#define S5P_INFORM6 S5P_PMUREG(0x0818) 39#define S5P_INFORM6 S5P_PMUREG(0x0818)
40#define S5P_INFORM7 S5P_PMUREG(0x081C) 40#define S5P_INFORM7 S5P_PMUREG(0x081C)
41#define S5P_PMU_SPARE3 S5P_PMUREG(0x090C)
41 42
42#define S5P_ARM_CORE0_LOWPWR S5P_PMUREG(0x1000) 43#define S5P_ARM_CORE0_LOWPWR S5P_PMUREG(0x1000)
43#define S5P_DIS_IRQ_CORE0 S5P_PMUREG(0x1004) 44#define S5P_DIS_IRQ_CORE0 S5P_PMUREG(0x1004)
@@ -105,8 +106,17 @@
105#define S5P_GPS_LOWPWR S5P_PMUREG(0x139C) 106#define S5P_GPS_LOWPWR S5P_PMUREG(0x139C)
106#define S5P_GPS_ALIVE_LOWPWR S5P_PMUREG(0x13A0) 107#define S5P_GPS_ALIVE_LOWPWR S5P_PMUREG(0x13A0)
107 108
108#define S5P_ARM_CORE1_CONFIGURATION S5P_PMUREG(0x2080) 109#define EXYNOS_ARM_CORE0_CONFIGURATION S5P_PMUREG(0x2000)
109#define S5P_ARM_CORE1_STATUS S5P_PMUREG(0x2084) 110#define EXYNOS_ARM_CORE_CONFIGURATION(_nr) \
111 (EXYNOS_ARM_CORE0_CONFIGURATION + (0x80 * (_nr)))
112#define EXYNOS_ARM_CORE_STATUS(_nr) \
113 (EXYNOS_ARM_CORE_CONFIGURATION(_nr) + 0x4)
114
115#define EXYNOS_ARM_COMMON_CONFIGURATION S5P_PMUREG(0x2500)
116#define EXYNOS_COMMON_CONFIGURATION(_nr) \
117 (EXYNOS_ARM_COMMON_CONFIGURATION + (0x80 * (_nr)))
118#define EXYNOS_COMMON_STATUS(_nr) \
119 (EXYNOS_COMMON_CONFIGURATION(_nr) + 0x4)
110 120
111#define S5P_PAD_RET_MAUDIO_OPTION S5P_PMUREG(0x3028) 121#define S5P_PAD_RET_MAUDIO_OPTION S5P_PMUREG(0x3028)
112#define S5P_PAD_RET_GPIO_OPTION S5P_PMUREG(0x3108) 122#define S5P_PAD_RET_GPIO_OPTION S5P_PMUREG(0x3108)
@@ -119,8 +129,6 @@
119#define S5P_CORE_LOCAL_PWR_EN 0x3 129#define S5P_CORE_LOCAL_PWR_EN 0x3
120#define S5P_INT_LOCAL_PWR_EN 0x7 130#define S5P_INT_LOCAL_PWR_EN 0x7
121 131
122#define S5P_CHECK_SLEEP 0x00000BAD
123
124/* Only for EXYNOS4210 */ 132/* Only for EXYNOS4210 */
125#define S5P_CMU_CLKSTOP_LCD1_LOWPWR S5P_PMUREG(0x1154) 133#define S5P_CMU_CLKSTOP_LCD1_LOWPWR S5P_PMUREG(0x1154)
126#define S5P_CMU_RESET_LCD1_LOWPWR S5P_PMUREG(0x1174) 134#define S5P_CMU_RESET_LCD1_LOWPWR S5P_PMUREG(0x1174)
@@ -313,4 +321,6 @@
313 321
314#define EXYNOS5_OPTION_USE_RETENTION (1 << 4) 322#define EXYNOS5_OPTION_USE_RETENTION (1 << 4)
315 323
324#define EXYNOS5420_SWRESET_KFC_SEL 0x3
325
316#endif /* __ASM_ARCH_REGS_PMU_H */ 326#endif /* __ASM_ARCH_REGS_PMU_H */
diff --git a/arch/arm/mach-exynos/sleep.S b/arch/arm/mach-exynos/sleep.S
index a2613e944e10..108a45f4bb62 100644
--- a/arch/arm/mach-exynos/sleep.S
+++ b/arch/arm/mach-exynos/sleep.S
@@ -16,8 +16,6 @@
16 */ 16 */
17 17
18#include <linux/linkage.h> 18#include <linux/linkage.h>
19#include <asm/asm-offsets.h>
20#include <asm/hardware/cache-l2x0.h>
21 19
22#define CPU_MASK 0xff0ffff0 20#define CPU_MASK 0xff0ffff0
23#define CPU_CORTEX_A9 0x410fc090 21#define CPU_CORTEX_A9 0x410fc090
@@ -53,33 +51,7 @@ ENTRY(exynos_cpu_resume)
53 and r0, r0, r1 51 and r0, r0, r1
54 ldr r1, =CPU_CORTEX_A9 52 ldr r1, =CPU_CORTEX_A9
55 cmp r0, r1 53 cmp r0, r1
56 bne skip_l2_resume 54 bleq l2c310_early_resume
57 adr r0, l2x0_regs_phys
58 ldr r0, [r0]
59 cmp r0, #0
60 beq skip_l2_resume
61 ldr r1, [r0, #L2X0_R_PHY_BASE]
62 ldr r2, [r1, #L2X0_CTRL]
63 tst r2, #0x1
64 bne skip_l2_resume
65 ldr r2, [r0, #L2X0_R_AUX_CTRL]
66 str r2, [r1, #L2X0_AUX_CTRL]
67 ldr r2, [r0, #L2X0_R_TAG_LATENCY]
68 str r2, [r1, #L2X0_TAG_LATENCY_CTRL]
69 ldr r2, [r0, #L2X0_R_DATA_LATENCY]
70 str r2, [r1, #L2X0_DATA_LATENCY_CTRL]
71 ldr r2, [r0, #L2X0_R_PREFETCH_CTRL]
72 str r2, [r1, #L2X0_PREFETCH_CTRL]
73 ldr r2, [r0, #L2X0_R_PWR_CTRL]
74 str r2, [r1, #L2X0_POWER_CTRL]
75 mov r2, #1
76 str r2, [r1, #L2X0_CTRL]
77skip_l2_resume:
78#endif 55#endif
79 b cpu_resume 56 b cpu_resume
80ENDPROC(exynos_cpu_resume) 57ENDPROC(exynos_cpu_resume)
81#ifdef CONFIG_CACHE_L2X0
82 .globl l2x0_regs_phys
83l2x0_regs_phys:
84 .long 0
85#endif
diff --git a/arch/arm/mach-footbridge/cats-hw.c b/arch/arm/mach-footbridge/cats-hw.c
index da0415094856..8f05489671b7 100644
--- a/arch/arm/mach-footbridge/cats-hw.c
+++ b/arch/arm/mach-footbridge/cats-hw.c
@@ -76,7 +76,7 @@ __initcall(cats_hw_init);
76 * hard reboots fail on early boards. 76 * hard reboots fail on early boards.
77 */ 77 */
78static void __init 78static void __init
79fixup_cats(struct tag *tags, char **cmdline, struct meminfo *mi) 79fixup_cats(struct tag *tags, char **cmdline)
80{ 80{
81#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) 81#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
82 screen_info.orig_video_lines = 25; 82 screen_info.orig_video_lines = 25;
diff --git a/arch/arm/mach-footbridge/netwinder-hw.c b/arch/arm/mach-footbridge/netwinder-hw.c
index eb1fa5c84723..cdee08c6d239 100644
--- a/arch/arm/mach-footbridge/netwinder-hw.c
+++ b/arch/arm/mach-footbridge/netwinder-hw.c
@@ -620,7 +620,7 @@ __initcall(nw_hw_init);
620 * the parameter page. 620 * the parameter page.
621 */ 621 */
622static void __init 622static void __init
623fixup_netwinder(struct tag *tags, char **cmdline, struct meminfo *mi) 623fixup_netwinder(struct tag *tags, char **cmdline)
624{ 624{
625#ifdef CONFIG_ISAPNP 625#ifdef CONFIG_ISAPNP
626 extern int isapnp_disable; 626 extern int isapnp_disable;
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index c7de89b263dd..8c35ae4ff176 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -51,11 +51,13 @@ static void __init highbank_scu_map_io(void)
51} 51}
52 52
53 53
54static void highbank_l2x0_disable(void) 54static void highbank_l2c310_write_sec(unsigned long val, unsigned reg)
55{ 55{
56 outer_flush_all(); 56 if (reg == L2X0_CTRL)
57 /* Disable PL310 L2 Cache controller */ 57 highbank_smc1(0x102, val);
58 highbank_smc1(0x102, 0x0); 58 else
59 WARN_ONCE(1, "Highbank L2C310: ignoring write to reg 0x%x\n",
60 reg);
59} 61}
60 62
61static void __init highbank_init_irq(void) 63static void __init highbank_init_irq(void)
@@ -64,14 +66,6 @@ static void __init highbank_init_irq(void)
64 66
65 if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9")) 67 if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9"))
66 highbank_scu_map_io(); 68 highbank_scu_map_io();
67
68 /* Enable PL310 L2 Cache controller */
69 if (IS_ENABLED(CONFIG_CACHE_L2X0) &&
70 of_find_compatible_node(NULL, NULL, "arm,pl310-cache")) {
71 highbank_smc1(0x102, 0x1);
72 l2x0_of_init(0, ~0UL);
73 outer_cache.disable = highbank_l2x0_disable;
74 }
75} 69}
76 70
77static void highbank_power_off(void) 71static void highbank_power_off(void)
@@ -185,6 +179,9 @@ DT_MACHINE_START(HIGHBANK, "Highbank")
185#if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE) 179#if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE)
186 .dma_zone_size = (4ULL * SZ_1G), 180 .dma_zone_size = (4ULL * SZ_1G),
187#endif 181#endif
182 .l2c_aux_val = 0,
183 .l2c_aux_mask = ~0,
184 .l2c_write_sec = highbank_l2c310_write_sec,
188 .init_irq = highbank_init_irq, 185 .init_irq = highbank_init_irq,
189 .init_machine = highbank_init, 186 .init_machine = highbank_init,
190 .dt_compat = highbank_match, 187 .dt_compat = highbank_match,
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 5740296dc429..8d42eab76d53 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -702,61 +702,6 @@ endif
702 702
703if ARCH_MULTI_V7 703if ARCH_MULTI_V7
704 704
705comment "i.MX51 machines:"
706
707config MACH_IMX51_DT
708 bool "Support i.MX51 platforms from device tree"
709 select SOC_IMX51
710 help
711 Include support for Freescale i.MX51 based platforms
712 using the device tree for discovery
713
714config MACH_MX51_BABBAGE
715 bool "Support MX51 BABBAGE platforms"
716 select IMX_HAVE_PLATFORM_FSL_USB2_UDC
717 select IMX_HAVE_PLATFORM_IMX2_WDT
718 select IMX_HAVE_PLATFORM_IMX_I2C
719 select IMX_HAVE_PLATFORM_IMX_UART
720 select IMX_HAVE_PLATFORM_MXC_EHCI
721 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
722 select IMX_HAVE_PLATFORM_SPI_IMX
723 select SOC_IMX51
724 help
725 Include support for MX51 Babbage platform, also known as MX51EVK in
726 u-boot. This includes specific configurations for the board and its
727 peripherals.
728
729config MACH_EUKREA_CPUIMX51SD
730 bool "Support Eukrea CPUIMX51SD module"
731 select IMX_HAVE_PLATFORM_FSL_USB2_UDC
732 select IMX_HAVE_PLATFORM_IMX2_WDT
733 select IMX_HAVE_PLATFORM_IMX_I2C
734 select IMX_HAVE_PLATFORM_IMX_UART
735 select IMX_HAVE_PLATFORM_MXC_EHCI
736 select IMX_HAVE_PLATFORM_MXC_NAND
737 select IMX_HAVE_PLATFORM_SPI_IMX
738 select SOC_IMX51
739 help
740 Include support for Eukrea CPUIMX51SD platform. This includes
741 specific configurations for the module and its peripherals.
742
743choice
744 prompt "Baseboard"
745 depends on MACH_EUKREA_CPUIMX51SD
746 default MACH_EUKREA_MBIMXSD51_BASEBOARD
747
748config MACH_EUKREA_MBIMXSD51_BASEBOARD
749 prompt "Eukrea MBIMXSD development board"
750 bool
751 select IMX_HAVE_PLATFORM_IMX_SSI
752 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
753 select LEDS_GPIO_REGISTER
754 help
755 This adds board specific devices that can be found on Eukrea's
756 MBIMXSD evaluation board.
757
758endchoice
759
760comment "Device tree only" 705comment "Device tree only"
761 706
762config SOC_IMX50 707config SOC_IMX50
@@ -768,6 +713,12 @@ config SOC_IMX50
768 help 713 help
769 This enables support for Freescale i.MX50 processor. 714 This enables support for Freescale i.MX50 processor.
770 715
716config MACH_IMX51_DT
717 bool "i.MX51 support"
718 select SOC_IMX51
719 help
720 This enables support for Freescale i.MX51 processor
721
771config SOC_IMX53 722config SOC_IMX53
772 bool "i.MX53 support" 723 bool "i.MX53 support"
773 select HAVE_IMX_SRC 724 select HAVE_IMX_SRC
@@ -796,7 +747,6 @@ config SOC_IMX6Q
796 select ARM_ERRATA_764369 if SMP 747 select ARM_ERRATA_764369 if SMP
797 select HAVE_ARM_SCU if SMP 748 select HAVE_ARM_SCU if SMP
798 select HAVE_ARM_TWD if SMP 749 select HAVE_ARM_TWD if SMP
799 select MIGHT_HAVE_PCI
800 select PCI_DOMAINS if PCI 750 select PCI_DOMAINS if PCI
801 select PINCTRL_IMX6Q 751 select PINCTRL_IMX6Q
802 select SOC_IMX6 752 select SOC_IMX6
@@ -812,6 +762,14 @@ config SOC_IMX6SL
812 help 762 help
813 This enables support for Freescale i.MX6 SoloLite processor. 763 This enables support for Freescale i.MX6 SoloLite processor.
814 764
765config SOC_IMX6SX
766 bool "i.MX6 SoloX support"
767 select PINCTRL_IMX6SX
768 select SOC_IMX6
769
770 help
771 This enables support for Freescale i.MX6 SoloX processor.
772
815config SOC_VF610 773config SOC_VF610
816 bool "Vybrid Family VF610 support" 774 bool "Vybrid Family VF610 support"
817 select ARM_GIC 775 select ARM_GIC
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index f4ed83032dd0..bbe93bbfd003 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -101,6 +101,7 @@ obj-$(CONFIG_SMP) += headsmp.o platsmp.o
101obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o 101obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
102obj-$(CONFIG_SOC_IMX6Q) += clk-imx6q.o mach-imx6q.o 102obj-$(CONFIG_SOC_IMX6Q) += clk-imx6q.o mach-imx6q.o
103obj-$(CONFIG_SOC_IMX6SL) += clk-imx6sl.o mach-imx6sl.o 103obj-$(CONFIG_SOC_IMX6SL) += clk-imx6sl.o mach-imx6sl.o
104obj-$(CONFIG_SOC_IMX6SX) += clk-imx6sx.o mach-imx6sx.o
104 105
105ifeq ($(CONFIG_SUSPEND),y) 106ifeq ($(CONFIG_SUSPEND),y)
106AFLAGS_suspend-imx6.o :=-Wa,-march=armv7-a 107AFLAGS_suspend-imx6.o :=-Wa,-march=armv7-a
@@ -108,11 +109,6 @@ obj-$(CONFIG_SOC_IMX6) += suspend-imx6.o
108endif 109endif
109obj-$(CONFIG_SOC_IMX6) += pm-imx6.o 110obj-$(CONFIG_SOC_IMX6) += pm-imx6.o
110 111
111# i.MX5 based machines
112obj-$(CONFIG_MACH_MX51_BABBAGE) += mach-mx51_babbage.o
113obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += mach-cpuimx51sd.o
114obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd51-baseboard.o
115
116obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o 112obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o
117obj-$(CONFIG_SOC_IMX50) += mach-imx50.o 113obj-$(CONFIG_SOC_IMX50) += mach-imx50.o
118obj-$(CONFIG_SOC_IMX53) += mach-imx53.o 114obj-$(CONFIG_SOC_IMX53) += mach-imx53.o
diff --git a/arch/arm/mach-imx/avic.c b/arch/arm/mach-imx/avic.c
index 8d1df2e4b7ac..24b103c67f82 100644
--- a/arch/arm/mach-imx/avic.c
+++ b/arch/arm/mach-imx/avic.c
@@ -135,7 +135,7 @@ static __init void avic_init_gc(int idx, unsigned int irq_start)
135 irq_setup_generic_chip(gc, IRQ_MSK(32), 0, IRQ_NOREQUEST, 0); 135 irq_setup_generic_chip(gc, IRQ_MSK(32), 0, IRQ_NOREQUEST, 0);
136} 136}
137 137
138asmlinkage void __exception_irq_entry avic_handle_irq(struct pt_regs *regs) 138static void __exception_irq_entry avic_handle_irq(struct pt_regs *regs)
139{ 139{
140 u32 nivector; 140 u32 nivector;
141 141
@@ -190,6 +190,8 @@ void __init mxc_init_irq(void __iomem *irqbase)
190 for (i = 0; i < 8; i++) 190 for (i = 0; i < 8; i++)
191 __raw_writel(0, avic_base + AVIC_NIPRIORITY(i)); 191 __raw_writel(0, avic_base + AVIC_NIPRIORITY(i));
192 192
193 set_handle_irq(avic_handle_irq);
194
193#ifdef CONFIG_FIQ 195#ifdef CONFIG_FIQ
194 /* Initialize FIQ */ 196 /* Initialize FIQ */
195 init_FIQ(FIQ_START); 197 init_FIQ(FIQ_START);
diff --git a/arch/arm/mach-imx/clk-gate2.c b/arch/arm/mach-imx/clk-gate2.c
index a2ecc006b322..4ba587da89d2 100644
--- a/arch/arm/mach-imx/clk-gate2.c
+++ b/arch/arm/mach-imx/clk-gate2.c
@@ -27,48 +27,61 @@
27 * parent - fixed parent. No clk_set_parent support 27 * parent - fixed parent. No clk_set_parent support
28 */ 28 */
29 29
30#define to_clk_gate(_hw) container_of(_hw, struct clk_gate, hw) 30struct clk_gate2 {
31 struct clk_hw hw;
32 void __iomem *reg;
33 u8 bit_idx;
34 u8 flags;
35 spinlock_t *lock;
36 unsigned int *share_count;
37};
38
39#define to_clk_gate2(_hw) container_of(_hw, struct clk_gate2, hw)
31 40
32static int clk_gate2_enable(struct clk_hw *hw) 41static int clk_gate2_enable(struct clk_hw *hw)
33{ 42{
34 struct clk_gate *gate = to_clk_gate(hw); 43 struct clk_gate2 *gate = to_clk_gate2(hw);
35 u32 reg; 44 u32 reg;
36 unsigned long flags = 0; 45 unsigned long flags = 0;
37 46
38 if (gate->lock) 47 spin_lock_irqsave(gate->lock, flags);
39 spin_lock_irqsave(gate->lock, flags); 48
49 if (gate->share_count && (*gate->share_count)++ > 0)
50 goto out;
40 51
41 reg = readl(gate->reg); 52 reg = readl(gate->reg);
42 reg |= 3 << gate->bit_idx; 53 reg |= 3 << gate->bit_idx;
43 writel(reg, gate->reg); 54 writel(reg, gate->reg);
44 55
45 if (gate->lock) 56out:
46 spin_unlock_irqrestore(gate->lock, flags); 57 spin_unlock_irqrestore(gate->lock, flags);
47 58
48 return 0; 59 return 0;
49} 60}
50 61
51static void clk_gate2_disable(struct clk_hw *hw) 62static void clk_gate2_disable(struct clk_hw *hw)
52{ 63{
53 struct clk_gate *gate = to_clk_gate(hw); 64 struct clk_gate2 *gate = to_clk_gate2(hw);
54 u32 reg; 65 u32 reg;
55 unsigned long flags = 0; 66 unsigned long flags = 0;
56 67
57 if (gate->lock) 68 spin_lock_irqsave(gate->lock, flags);
58 spin_lock_irqsave(gate->lock, flags); 69
70 if (gate->share_count && --(*gate->share_count) > 0)
71 goto out;
59 72
60 reg = readl(gate->reg); 73 reg = readl(gate->reg);
61 reg &= ~(3 << gate->bit_idx); 74 reg &= ~(3 << gate->bit_idx);
62 writel(reg, gate->reg); 75 writel(reg, gate->reg);
63 76
64 if (gate->lock) 77out:
65 spin_unlock_irqrestore(gate->lock, flags); 78 spin_unlock_irqrestore(gate->lock, flags);
66} 79}
67 80
68static int clk_gate2_is_enabled(struct clk_hw *hw) 81static int clk_gate2_is_enabled(struct clk_hw *hw)
69{ 82{
70 u32 reg; 83 u32 reg;
71 struct clk_gate *gate = to_clk_gate(hw); 84 struct clk_gate2 *gate = to_clk_gate2(hw);
72 85
73 reg = readl(gate->reg); 86 reg = readl(gate->reg);
74 87
@@ -87,21 +100,23 @@ static struct clk_ops clk_gate2_ops = {
87struct clk *clk_register_gate2(struct device *dev, const char *name, 100struct clk *clk_register_gate2(struct device *dev, const char *name,
88 const char *parent_name, unsigned long flags, 101 const char *parent_name, unsigned long flags,
89 void __iomem *reg, u8 bit_idx, 102 void __iomem *reg, u8 bit_idx,
90 u8 clk_gate2_flags, spinlock_t *lock) 103 u8 clk_gate2_flags, spinlock_t *lock,
104 unsigned int *share_count)
91{ 105{
92 struct clk_gate *gate; 106 struct clk_gate2 *gate;
93 struct clk *clk; 107 struct clk *clk;
94 struct clk_init_data init; 108 struct clk_init_data init;
95 109
96 gate = kzalloc(sizeof(struct clk_gate), GFP_KERNEL); 110 gate = kzalloc(sizeof(struct clk_gate2), GFP_KERNEL);
97 if (!gate) 111 if (!gate)
98 return ERR_PTR(-ENOMEM); 112 return ERR_PTR(-ENOMEM);
99 113
100 /* struct clk_gate assignments */ 114 /* struct clk_gate2 assignments */
101 gate->reg = reg; 115 gate->reg = reg;
102 gate->bit_idx = bit_idx; 116 gate->bit_idx = bit_idx;
103 gate->flags = clk_gate2_flags; 117 gate->flags = clk_gate2_flags;
104 gate->lock = lock; 118 gate->lock = lock;
119 gate->share_count = share_count;
105 120
106 init.name = name; 121 init.name = name;
107 init.ops = &clk_gate2_ops; 122 init.ops = &clk_gate2_ops;
diff --git a/arch/arm/mach-imx/clk-imx1.c b/arch/arm/mach-imx/clk-imx1.c
index 15f9d223cf0b..7f739be3de2c 100644
--- a/arch/arm/mach-imx/clk-imx1.c
+++ b/arch/arm/mach-imx/clk-imx1.c
@@ -40,12 +40,14 @@
40#define SCM_GCCR IO_ADDR_SCM(0xc) 40#define SCM_GCCR IO_ADDR_SCM(0xc)
41 41
42static const char *prem_sel_clks[] = { "clk32_premult", "clk16m", }; 42static const char *prem_sel_clks[] = { "clk32_premult", "clk16m", };
43static const char *clko_sel_clks[] = { "per1", "hclk", "clk48m", "clk16m", "prem", 43static const char *clko_sel_clks[] = { "per1", "hclk", "clk48m", "clk16m",
44 "fclk", }; 44 "prem", "fclk", };
45
45enum imx1_clks { 46enum imx1_clks {
46 dummy, clk32, clk16m_ext, clk16m, clk32_premult, prem, mpll, spll, mcu, 47 dummy, clk32, clk16m_ext, clk16m, clk32_premult, prem, mpll, mpll_gate,
47 fclk, hclk, clk48m, per1, per2, per3, clko, dma_gate, csi_gate, 48 spll, spll_gate, mcu, fclk, hclk, clk48m, per1, per2, per3, clko,
48 mma_gate, usbd_gate, clk_max 49 uart3_gate, ssi2_gate, brom_gate, dma_gate, csi_gate, mma_gate,
50 usbd_gate, clk_max
49}; 51};
50 52
51static struct clk *clk[clk_max]; 53static struct clk *clk[clk_max];
@@ -62,17 +64,22 @@ int __init mx1_clocks_init(unsigned long fref)
62 clk[prem] = imx_clk_mux("prem", CCM_CSCR, 16, 1, prem_sel_clks, 64 clk[prem] = imx_clk_mux("prem", CCM_CSCR, 16, 1, prem_sel_clks,
63 ARRAY_SIZE(prem_sel_clks)); 65 ARRAY_SIZE(prem_sel_clks));
64 clk[mpll] = imx_clk_pllv1("mpll", "clk32_premult", CCM_MPCTL0); 66 clk[mpll] = imx_clk_pllv1("mpll", "clk32_premult", CCM_MPCTL0);
67 clk[mpll_gate] = imx_clk_gate("mpll_gate", "mpll", CCM_CSCR, 0);
65 clk[spll] = imx_clk_pllv1("spll", "prem", CCM_SPCTL0); 68 clk[spll] = imx_clk_pllv1("spll", "prem", CCM_SPCTL0);
69 clk[spll_gate] = imx_clk_gate("spll_gate", "spll", CCM_CSCR, 1);
66 clk[mcu] = imx_clk_divider("mcu", "clk32_premult", CCM_CSCR, 15, 1); 70 clk[mcu] = imx_clk_divider("mcu", "clk32_premult", CCM_CSCR, 15, 1);
67 clk[fclk] = imx_clk_divider("fclk", "mpll", CCM_CSCR, 15, 1); 71 clk[fclk] = imx_clk_divider("fclk", "mpll_gate", CCM_CSCR, 15, 1);
68 clk[hclk] = imx_clk_divider("hclk", "spll", CCM_CSCR, 10, 4); 72 clk[hclk] = imx_clk_divider("hclk", "spll_gate", CCM_CSCR, 10, 4);
69 clk[clk48m] = imx_clk_divider("clk48m", "spll", CCM_CSCR, 26, 3); 73 clk[clk48m] = imx_clk_divider("clk48m", "spll_gate", CCM_CSCR, 26, 3);
70 clk[per1] = imx_clk_divider("per1", "spll", CCM_PCDR, 0, 4); 74 clk[per1] = imx_clk_divider("per1", "spll_gate", CCM_PCDR, 0, 4);
71 clk[per2] = imx_clk_divider("per2", "spll", CCM_PCDR, 4, 4); 75 clk[per2] = imx_clk_divider("per2", "spll_gate", CCM_PCDR, 4, 4);
72 clk[per3] = imx_clk_divider("per3", "spll", CCM_PCDR, 16, 7); 76 clk[per3] = imx_clk_divider("per3", "spll_gate", CCM_PCDR, 16, 7);
73 clk[clko] = imx_clk_mux("clko", CCM_CSCR, 29, 3, clko_sel_clks, 77 clk[clko] = imx_clk_mux("clko", CCM_CSCR, 29, 3, clko_sel_clks,
74 ARRAY_SIZE(clko_sel_clks)); 78 ARRAY_SIZE(clko_sel_clks));
75 clk[dma_gate] = imx_clk_gate("dma_gate", "hclk", SCM_GCCR, 4); 79 clk[uart3_gate] = imx_clk_gate("uart3_gate", "hclk", SCM_GCCR, 6);
80 clk[ssi2_gate] = imx_clk_gate("ssi2_gate", "hclk", SCM_GCCR, 5);
81 clk[brom_gate] = imx_clk_gate("brom_gate", "hclk", SCM_GCCR, 4);
82 clk[dma_gate] = imx_clk_gate("dma_gate", "hclk", SCM_GCCR, 3);
76 clk[csi_gate] = imx_clk_gate("csi_gate", "hclk", SCM_GCCR, 2); 83 clk[csi_gate] = imx_clk_gate("csi_gate", "hclk", SCM_GCCR, 2);
77 clk[mma_gate] = imx_clk_gate("mma_gate", "hclk", SCM_GCCR, 1); 84 clk[mma_gate] = imx_clk_gate("mma_gate", "hclk", SCM_GCCR, 1);
78 clk[usbd_gate] = imx_clk_gate("usbd_gate", "clk48m", SCM_GCCR, 0); 85 clk[usbd_gate] = imx_clk_gate("usbd_gate", "clk48m", SCM_GCCR, 0);
@@ -84,9 +91,6 @@ int __init mx1_clocks_init(unsigned long fref)
84 91
85 clk_register_clkdev(clk[dma_gate], "ahb", "imx1-dma"); 92 clk_register_clkdev(clk[dma_gate], "ahb", "imx1-dma");
86 clk_register_clkdev(clk[hclk], "ipg", "imx1-dma"); 93 clk_register_clkdev(clk[hclk], "ipg", "imx1-dma");
87 clk_register_clkdev(clk[csi_gate], NULL, "mx1-camera.0");
88 clk_register_clkdev(clk[mma_gate], "mma", NULL);
89 clk_register_clkdev(clk[usbd_gate], NULL, "imx_udc.0");
90 clk_register_clkdev(clk[per1], "per", "imx-gpt.0"); 94 clk_register_clkdev(clk[per1], "per", "imx-gpt.0");
91 clk_register_clkdev(clk[hclk], "ipg", "imx-gpt.0"); 95 clk_register_clkdev(clk[hclk], "ipg", "imx-gpt.0");
92 clk_register_clkdev(clk[per1], "per", "imx1-uart.0"); 96 clk_register_clkdev(clk[per1], "per", "imx1-uart.0");
@@ -94,20 +98,15 @@ int __init mx1_clocks_init(unsigned long fref)
94 clk_register_clkdev(clk[per1], "per", "imx1-uart.1"); 98 clk_register_clkdev(clk[per1], "per", "imx1-uart.1");
95 clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.1"); 99 clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.1");
96 clk_register_clkdev(clk[per1], "per", "imx1-uart.2"); 100 clk_register_clkdev(clk[per1], "per", "imx1-uart.2");
97 clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.2"); 101 clk_register_clkdev(clk[uart3_gate], "ipg", "imx1-uart.2");
98 clk_register_clkdev(clk[hclk], NULL, "imx1-i2c.0"); 102 clk_register_clkdev(clk[hclk], NULL, "imx1-i2c.0");
99 clk_register_clkdev(clk[per2], "per", "imx1-cspi.0"); 103 clk_register_clkdev(clk[per2], "per", "imx1-cspi.0");
100 clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.0"); 104 clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.0");
101 clk_register_clkdev(clk[per2], "per", "imx1-cspi.1"); 105 clk_register_clkdev(clk[per2], "per", "imx1-cspi.1");
102 clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.1"); 106 clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.1");
103 clk_register_clkdev(clk[per2], NULL, "imx-mmc.0");
104 clk_register_clkdev(clk[per2], "per", "imx1-fb.0"); 107 clk_register_clkdev(clk[per2], "per", "imx1-fb.0");
105 clk_register_clkdev(clk[dummy], "ipg", "imx1-fb.0"); 108 clk_register_clkdev(clk[dummy], "ipg", "imx1-fb.0");
106 clk_register_clkdev(clk[dummy], "ahb", "imx1-fb.0"); 109 clk_register_clkdev(clk[dummy], "ahb", "imx1-fb.0");
107 clk_register_clkdev(clk[hclk], "mshc", NULL);
108 clk_register_clkdev(clk[per3], "ssi", NULL);
109 clk_register_clkdev(clk[clk32], NULL, "imx1-rtc.0");
110 clk_register_clkdev(clk[clko], "clko", NULL);
111 110
112 mxc_timer_init(MX1_IO_ADDRESS(MX1_TIM1_BASE_ADDR), MX1_TIM1_INT); 111 mxc_timer_init(MX1_IO_ADDRESS(MX1_TIM1_BASE_ADDR), MX1_TIM1_INT);
113 112
diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c
index dc36e6c2f1da..ae578c096ad8 100644
--- a/arch/arm/mach-imx/clk-imx25.c
+++ b/arch/arm/mach-imx/clk-imx25.c
@@ -62,6 +62,10 @@ static struct clk_onecell_data clk_data;
62 62
63static const char *cpu_sel_clks[] = { "mpll", "mpll_cpu_3_4", }; 63static const char *cpu_sel_clks[] = { "mpll", "mpll_cpu_3_4", };
64static const char *per_sel_clks[] = { "ahb", "upll", }; 64static const char *per_sel_clks[] = { "ahb", "upll", };
65static const char *cko_sel_clks[] = { "dummy", "osc", "cpu", "ahb",
66 "ipg", "dummy", "dummy", "dummy",
67 "dummy", "dummy", "per0", "per2",
68 "per13", "per14", "usbotg_ahb", "dummy",};
65 69
66enum mx25_clks { 70enum mx25_clks {
67 dummy, osc, mpll, upll, mpll_cpu_3_4, cpu_sel, cpu, ahb, usb_div, ipg, 71 dummy, osc, mpll, upll, mpll_cpu_3_4, cpu_sel, cpu, ahb, usb_div, ipg,
@@ -82,7 +86,7 @@ enum mx25_clks {
82 pwm2_ipg, pwm3_ipg, pwm4_ipg, rngb_ipg, reserved16, scc_ipg, sdma_ipg, 86 pwm2_ipg, pwm3_ipg, pwm4_ipg, rngb_ipg, reserved16, scc_ipg, sdma_ipg,
83 sim1_ipg, sim2_ipg, slcdc_ipg, spba_ipg, ssi1_ipg, ssi2_ipg, tsc_ipg, 87 sim1_ipg, sim2_ipg, slcdc_ipg, spba_ipg, ssi1_ipg, ssi2_ipg, tsc_ipg,
84 uart1_ipg, uart2_ipg, uart3_ipg, uart4_ipg, uart5_ipg, reserved17, 88 uart1_ipg, uart2_ipg, uart3_ipg, uart4_ipg, uart5_ipg, reserved17,
85 wdt_ipg, clk_max 89 wdt_ipg, cko_div, cko_sel, cko, clk_max
86}; 90};
87 91
88static struct clk *clk[clk_max]; 92static struct clk *clk[clk_max];
@@ -117,6 +121,9 @@ static int __init __mx25_clocks_init(unsigned long osc_rate)
117 clk[per13_sel] = imx_clk_mux("per13_sel", ccm(CCM_MCR), 13, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks)); 121 clk[per13_sel] = imx_clk_mux("per13_sel", ccm(CCM_MCR), 13, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks));
118 clk[per14_sel] = imx_clk_mux("per14_sel", ccm(CCM_MCR), 14, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks)); 122 clk[per14_sel] = imx_clk_mux("per14_sel", ccm(CCM_MCR), 14, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks));
119 clk[per15_sel] = imx_clk_mux("per15_sel", ccm(CCM_MCR), 15, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks)); 123 clk[per15_sel] = imx_clk_mux("per15_sel", ccm(CCM_MCR), 15, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks));
124 clk[cko_div] = imx_clk_divider("cko_div", "cko_sel", ccm(CCM_MCR), 24, 6);
125 clk[cko_sel] = imx_clk_mux("cko_sel", ccm(CCM_MCR), 20, 4, cko_sel_clks, ARRAY_SIZE(cko_sel_clks));
126 clk[cko] = imx_clk_gate("cko", "cko_div", ccm(CCM_MCR), 30);
120 clk[per0] = imx_clk_divider("per0", "per0_sel", ccm(CCM_PCDR0), 0, 6); 127 clk[per0] = imx_clk_divider("per0", "per0_sel", ccm(CCM_PCDR0), 0, 6);
121 clk[per1] = imx_clk_divider("per1", "per1_sel", ccm(CCM_PCDR0), 8, 6); 128 clk[per1] = imx_clk_divider("per1", "per1_sel", ccm(CCM_PCDR0), 8, 6);
122 clk[per2] = imx_clk_divider("per2", "per2_sel", ccm(CCM_PCDR0), 16, 6); 129 clk[per2] = imx_clk_divider("per2", "per2_sel", ccm(CCM_PCDR0), 16, 6);
@@ -230,6 +237,12 @@ static int __init __mx25_clocks_init(unsigned long osc_rate)
230 clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0"); 237 clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0");
231 clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0"); 238 clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0");
232 239
240 /*
241 * Let's initially set up CLKO parent as ipg, since this configuration
242 * is used on some imx25 board designs to clock the audio codec.
243 */
244 clk_set_parent(clk[cko_sel], clk[ipg]);
245
233 return 0; 246 return 0;
234} 247}
235 248
@@ -304,8 +317,6 @@ int __init mx25_clocks_init(void)
304int __init mx25_clocks_init_dt(void) 317int __init mx25_clocks_init_dt(void)
305{ 318{
306 struct device_node *np; 319 struct device_node *np;
307 void __iomem *base;
308 int irq;
309 unsigned long osc_rate = 24000000; 320 unsigned long osc_rate = 24000000;
310 321
311 /* retrieve the freqency of fixed clocks from device tree */ 322 /* retrieve the freqency of fixed clocks from device tree */
@@ -325,12 +336,7 @@ int __init mx25_clocks_init_dt(void)
325 336
326 __mx25_clocks_init(osc_rate); 337 __mx25_clocks_init(osc_rate);
327 338
328 np = of_find_compatible_node(NULL, NULL, "fsl,imx25-gpt"); 339 mxc_timer_init_dt(of_find_compatible_node(NULL, NULL, "fsl,imx25-gpt"));
329 base = of_iomap(np, 0);
330 WARN_ON(!base);
331 irq = irq_of_parse_and_map(np, 0);
332
333 mxc_timer_init(base, irq);
334 340
335 return 0; 341 return 0;
336} 342}
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c
index d2da8908b268..317a662626d6 100644
--- a/arch/arm/mach-imx/clk-imx27.c
+++ b/arch/arm/mach-imx/clk-imx27.c
@@ -82,7 +82,8 @@ enum mx27_clks {
82 csi_ahb_gate, brom_ahb_gate, ata_ahb_gate, wdog_ipg_gate, usb_ipg_gate, 82 csi_ahb_gate, brom_ahb_gate, ata_ahb_gate, wdog_ipg_gate, usb_ipg_gate,
83 uart6_ipg_gate, uart5_ipg_gate, uart4_ipg_gate, uart3_ipg_gate, 83 uart6_ipg_gate, uart5_ipg_gate, uart4_ipg_gate, uart3_ipg_gate,
84 uart2_ipg_gate, uart1_ipg_gate, ckih_div1p5, fpm, mpll_osc_sel, 84 uart2_ipg_gate, uart1_ipg_gate, ckih_div1p5, fpm, mpll_osc_sel,
85 mpll_sel, spll_gate, clk_max 85 mpll_sel, spll_gate, mshc_div, rtic_ipg_gate, mshc_ipg_gate,
86 rtic_ahb_gate, mshc_baud_gate, clk_max
86}; 87};
87 88
88static struct clk *clk[clk_max]; 89static struct clk *clk[clk_max];
@@ -117,6 +118,7 @@ int __init mx27_clocks_init(unsigned long fref)
117 clk[ipg] = imx_clk_divider("ipg", "ahb", CCM_CSCR, 8, 1); 118 clk[ipg] = imx_clk_divider("ipg", "ahb", CCM_CSCR, 8, 1);
118 } 119 }
119 120
121 clk[mshc_div] = imx_clk_divider("mshc_div", "ahb", CCM_PCDR0, 0, 6);
120 clk[nfc_div] = imx_clk_divider("nfc_div", "ahb", CCM_PCDR0, 6, 4); 122 clk[nfc_div] = imx_clk_divider("nfc_div", "ahb", CCM_PCDR0, 6, 4);
121 clk[per1_div] = imx_clk_divider("per1_div", "mpll_main2", CCM_PCDR1, 0, 6); 123 clk[per1_div] = imx_clk_divider("per1_div", "mpll_main2", CCM_PCDR1, 0, 6);
122 clk[per2_div] = imx_clk_divider("per2_div", "mpll_main2", CCM_PCDR1, 8, 6); 124 clk[per2_div] = imx_clk_divider("per2_div", "mpll_main2", CCM_PCDR1, 8, 6);
@@ -145,9 +147,11 @@ int __init mx27_clocks_init(unsigned long fref)
145 clk[sdhc1_ipg_gate] = imx_clk_gate("sdhc1_ipg_gate", "ipg", CCM_PCCR0, 5); 147 clk[sdhc1_ipg_gate] = imx_clk_gate("sdhc1_ipg_gate", "ipg", CCM_PCCR0, 5);
146 clk[scc_ipg_gate] = imx_clk_gate("scc_ipg_gate", "ipg", CCM_PCCR0, 6); 148 clk[scc_ipg_gate] = imx_clk_gate("scc_ipg_gate", "ipg", CCM_PCCR0, 6);
147 clk[sahara_ipg_gate] = imx_clk_gate("sahara_ipg_gate", "ipg", CCM_PCCR0, 7); 149 clk[sahara_ipg_gate] = imx_clk_gate("sahara_ipg_gate", "ipg", CCM_PCCR0, 7);
150 clk[rtic_ipg_gate] = imx_clk_gate("rtic_ipg_gate", "ipg", CCM_PCCR0, 8);
148 clk[rtc_ipg_gate] = imx_clk_gate("rtc_ipg_gate", "ipg", CCM_PCCR0, 9); 151 clk[rtc_ipg_gate] = imx_clk_gate("rtc_ipg_gate", "ipg", CCM_PCCR0, 9);
149 clk[pwm_ipg_gate] = imx_clk_gate("pwm_ipg_gate", "ipg", CCM_PCCR0, 11); 152 clk[pwm_ipg_gate] = imx_clk_gate("pwm_ipg_gate", "ipg", CCM_PCCR0, 11);
150 clk[owire_ipg_gate] = imx_clk_gate("owire_ipg_gate", "ipg", CCM_PCCR0, 12); 153 clk[owire_ipg_gate] = imx_clk_gate("owire_ipg_gate", "ipg", CCM_PCCR0, 12);
154 clk[mshc_ipg_gate] = imx_clk_gate("mshc_ipg_gate", "ipg", CCM_PCCR0, 13);
151 clk[lcdc_ipg_gate] = imx_clk_gate("lcdc_ipg_gate", "ipg", CCM_PCCR0, 14); 155 clk[lcdc_ipg_gate] = imx_clk_gate("lcdc_ipg_gate", "ipg", CCM_PCCR0, 14);
152 clk[kpp_ipg_gate] = imx_clk_gate("kpp_ipg_gate", "ipg", CCM_PCCR0, 15); 156 clk[kpp_ipg_gate] = imx_clk_gate("kpp_ipg_gate", "ipg", CCM_PCCR0, 15);
153 clk[iim_ipg_gate] = imx_clk_gate("iim_ipg_gate", "ipg", CCM_PCCR0, 16); 157 clk[iim_ipg_gate] = imx_clk_gate("iim_ipg_gate", "ipg", CCM_PCCR0, 16);
@@ -166,6 +170,7 @@ int __init mx27_clocks_init(unsigned long fref)
166 clk[cspi3_ipg_gate] = imx_clk_gate("cspi3_ipg_gate", "ipg", CCM_PCCR0, 29); 170 clk[cspi3_ipg_gate] = imx_clk_gate("cspi3_ipg_gate", "ipg", CCM_PCCR0, 29);
167 clk[cspi2_ipg_gate] = imx_clk_gate("cspi2_ipg_gate", "ipg", CCM_PCCR0, 30); 171 clk[cspi2_ipg_gate] = imx_clk_gate("cspi2_ipg_gate", "ipg", CCM_PCCR0, 30);
168 clk[cspi1_ipg_gate] = imx_clk_gate("cspi1_ipg_gate", "ipg", CCM_PCCR0, 31); 172 clk[cspi1_ipg_gate] = imx_clk_gate("cspi1_ipg_gate", "ipg", CCM_PCCR0, 31);
173 clk[mshc_baud_gate] = imx_clk_gate("mshc_baud_gate", "mshc_div", CCM_PCCR1, 2);
169 clk[nfc_baud_gate] = imx_clk_gate("nfc_baud_gate", "nfc_div", CCM_PCCR1, 3); 174 clk[nfc_baud_gate] = imx_clk_gate("nfc_baud_gate", "nfc_div", CCM_PCCR1, 3);
170 clk[ssi2_baud_gate] = imx_clk_gate("ssi2_baud_gate", "ssi2_div", CCM_PCCR1, 4); 175 clk[ssi2_baud_gate] = imx_clk_gate("ssi2_baud_gate", "ssi2_div", CCM_PCCR1, 4);
171 clk[ssi1_baud_gate] = imx_clk_gate("ssi1_baud_gate", "ssi1_div", CCM_PCCR1, 5); 176 clk[ssi1_baud_gate] = imx_clk_gate("ssi1_baud_gate", "ssi1_div", CCM_PCCR1, 5);
@@ -177,6 +182,7 @@ int __init mx27_clocks_init(unsigned long fref)
177 clk[usb_ahb_gate] = imx_clk_gate("usb_ahb_gate", "ahb", CCM_PCCR1, 11); 182 clk[usb_ahb_gate] = imx_clk_gate("usb_ahb_gate", "ahb", CCM_PCCR1, 11);
178 clk[slcdc_ahb_gate] = imx_clk_gate("slcdc_ahb_gate", "ahb", CCM_PCCR1, 12); 183 clk[slcdc_ahb_gate] = imx_clk_gate("slcdc_ahb_gate", "ahb", CCM_PCCR1, 12);
179 clk[sahara_ahb_gate] = imx_clk_gate("sahara_ahb_gate", "ahb", CCM_PCCR1, 13); 184 clk[sahara_ahb_gate] = imx_clk_gate("sahara_ahb_gate", "ahb", CCM_PCCR1, 13);
185 clk[rtic_ahb_gate] = imx_clk_gate("rtic_ahb_gate", "ahb", CCM_PCCR1, 14);
180 clk[lcdc_ahb_gate] = imx_clk_gate("lcdc_ahb_gate", "ahb", CCM_PCCR1, 15); 186 clk[lcdc_ahb_gate] = imx_clk_gate("lcdc_ahb_gate", "ahb", CCM_PCCR1, 15);
181 clk[vpu_ahb_gate] = imx_clk_gate("vpu_ahb_gate", "ahb", CCM_PCCR1, 16); 187 clk[vpu_ahb_gate] = imx_clk_gate("vpu_ahb_gate", "ahb", CCM_PCCR1, 16);
182 clk[fec_ahb_gate] = imx_clk_gate("fec_ahb_gate", "ahb", CCM_PCCR1, 17); 188 clk[fec_ahb_gate] = imx_clk_gate("fec_ahb_gate", "ahb", CCM_PCCR1, 17);
@@ -221,16 +227,6 @@ int __init mx27_clocks_init(unsigned long fref)
221 clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.5"); 227 clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.5");
222 clk_register_clkdev(clk[gpt1_ipg_gate], "ipg", "imx-gpt.0"); 228 clk_register_clkdev(clk[gpt1_ipg_gate], "ipg", "imx-gpt.0");
223 clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.0"); 229 clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.0");
224 clk_register_clkdev(clk[gpt2_ipg_gate], "ipg", "imx-gpt.1");
225 clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.1");
226 clk_register_clkdev(clk[gpt3_ipg_gate], "ipg", "imx-gpt.2");
227 clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.2");
228 clk_register_clkdev(clk[gpt4_ipg_gate], "ipg", "imx-gpt.3");
229 clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.3");
230 clk_register_clkdev(clk[gpt5_ipg_gate], "ipg", "imx-gpt.4");
231 clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.4");
232 clk_register_clkdev(clk[gpt6_ipg_gate], "ipg", "imx-gpt.5");
233 clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.5");
234 clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.0"); 230 clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.0");
235 clk_register_clkdev(clk[sdhc1_ipg_gate], "ipg", "imx21-mmc.0"); 231 clk_register_clkdev(clk[sdhc1_ipg_gate], "ipg", "imx21-mmc.0");
236 clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.1"); 232 clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.1");
@@ -278,14 +274,7 @@ int __init mx27_clocks_init(unsigned long fref)
278 clk_register_clkdev(clk[emma_ipg_gate], "emma-ipg", "imx27-camera.0"); 274 clk_register_clkdev(clk[emma_ipg_gate], "emma-ipg", "imx27-camera.0");
279 clk_register_clkdev(clk[emma_ahb_gate], "ahb", "m2m-emmaprp.0"); 275 clk_register_clkdev(clk[emma_ahb_gate], "ahb", "m2m-emmaprp.0");
280 clk_register_clkdev(clk[emma_ipg_gate], "ipg", "m2m-emmaprp.0"); 276 clk_register_clkdev(clk[emma_ipg_gate], "ipg", "m2m-emmaprp.0");
281 clk_register_clkdev(clk[iim_ipg_gate], "iim", NULL);
282 clk_register_clkdev(clk[gpio_ipg_gate], "gpio", NULL);
283 clk_register_clkdev(clk[brom_ahb_gate], "brom", NULL);
284 clk_register_clkdev(clk[ata_ahb_gate], "ata", NULL);
285 clk_register_clkdev(clk[rtc_ipg_gate], NULL, "imx21-rtc");
286 clk_register_clkdev(clk[scc_ipg_gate], "scc", NULL);
287 clk_register_clkdev(clk[cpu_div], NULL, "cpu0"); 277 clk_register_clkdev(clk[cpu_div], NULL, "cpu0");
288 clk_register_clkdev(clk[emi_ahb_gate], "emi_ahb" , NULL);
289 278
290 mxc_timer_init(MX27_IO_ADDRESS(MX27_GPT1_BASE_ADDR), MX27_INT_GPT1); 279 mxc_timer_init(MX27_IO_ADDRESS(MX27_GPT1_BASE_ADDR), MX27_INT_GPT1);
291 280
@@ -296,7 +285,6 @@ int __init mx27_clocks_init(unsigned long fref)
296 return 0; 285 return 0;
297} 286}
298 287
299#ifdef CONFIG_OF
300int __init mx27_clocks_init_dt(void) 288int __init mx27_clocks_init_dt(void)
301{ 289{
302 struct device_node *np; 290 struct device_node *np;
@@ -312,4 +300,3 @@ int __init mx27_clocks_init_dt(void)
312 300
313 return mx27_clocks_init(fref); 301 return mx27_clocks_init(fref);
314} 302}
315#endif
diff --git a/arch/arm/mach-imx/clk-imx31.c b/arch/arm/mach-imx/clk-imx31.c
index b5b65f3efaf1..4a9de0835eb1 100644
--- a/arch/arm/mach-imx/clk-imx31.c
+++ b/arch/arm/mach-imx/clk-imx31.c
@@ -191,7 +191,6 @@ int __init mx31_clocks_init(unsigned long fref)
191 return 0; 191 return 0;
192} 192}
193 193
194#ifdef CONFIG_OF
195int __init mx31_clocks_init_dt(void) 194int __init mx31_clocks_init_dt(void)
196{ 195{
197 struct device_node *np; 196 struct device_node *np;
@@ -207,4 +206,3 @@ int __init mx31_clocks_init_dt(void)
207 206
208 return mx31_clocks_init(fref); 207 return mx31_clocks_init(fref);
209} 208}
210#endif
diff --git a/arch/arm/mach-imx/clk-imx35.c b/arch/arm/mach-imx/clk-imx35.c
index a4d5e425cd82..71c86a2f856d 100644
--- a/arch/arm/mach-imx/clk-imx35.c
+++ b/arch/arm/mach-imx/clk-imx35.c
@@ -289,14 +289,12 @@ int __init mx35_clocks_init(void)
289 return 0; 289 return 0;
290} 290}
291 291
292static int __init mx35_clocks_init_dt(struct device_node *ccm_node) 292static void __init mx35_clocks_init_dt(struct device_node *ccm_node)
293{ 293{
294 clk_data.clks = clk; 294 clk_data.clks = clk;
295 clk_data.clk_num = ARRAY_SIZE(clk); 295 clk_data.clk_num = ARRAY_SIZE(clk);
296 of_clk_add_provider(ccm_node, of_clk_src_onecell_get, &clk_data); 296 of_clk_add_provider(ccm_node, of_clk_src_onecell_get, &clk_data);
297 297
298 mx35_clocks_init(); 298 mx35_clocks_init();
299
300 return 0;
301} 299}
302CLK_OF_DECLARE(imx35, "fsl,imx35-ccm", mx35_clocks_init_dt); 300CLK_OF_DECLARE(imx35, "fsl,imx35-ccm", mx35_clocks_init_dt);
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c
index 568ef0a4de84..21d2b111c83d 100644
--- a/arch/arm/mach-imx/clk-imx51-imx53.c
+++ b/arch/arm/mach-imx/clk-imx51-imx53.c
@@ -322,9 +322,8 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
322 322
323static void __init mx50_clocks_init(struct device_node *np) 323static void __init mx50_clocks_init(struct device_node *np)
324{ 324{
325 void __iomem *base;
326 unsigned long r; 325 unsigned long r;
327 int i, irq; 326 int i;
328 327
329 clk[IMX5_CLK_PLL1_SW] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE); 328 clk[IMX5_CLK_PLL1_SW] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE);
330 clk[IMX5_CLK_PLL2_SW] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE); 329 clk[IMX5_CLK_PLL2_SW] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE);
@@ -372,11 +371,7 @@ static void __init mx50_clocks_init(struct device_node *np)
372 r = clk_round_rate(clk[IMX5_CLK_USBOH3_PER_GATE], 54000000); 371 r = clk_round_rate(clk[IMX5_CLK_USBOH3_PER_GATE], 54000000);
373 clk_set_rate(clk[IMX5_CLK_USBOH3_PER_GATE], r); 372 clk_set_rate(clk[IMX5_CLK_USBOH3_PER_GATE], r);
374 373
375 np = of_find_compatible_node(NULL, NULL, "fsl,imx50-gpt"); 374 mxc_timer_init_dt(of_find_compatible_node(NULL, NULL, "fsl,imx50-gpt"));
376 base = of_iomap(np, 0);
377 WARN_ON(!base);
378 irq = irq_of_parse_and_map(np, 0);
379 mxc_timer_init(base, irq);
380} 375}
381CLK_OF_DECLARE(imx50_ccm, "fsl,imx50-ccm", mx50_clocks_init); 376CLK_OF_DECLARE(imx50_ccm, "fsl,imx50-ccm", mx50_clocks_init);
382 377
@@ -436,7 +431,6 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
436 431
437 clk_register_clkdev(clk[IMX5_CLK_HSI2C_GATE], NULL, "imx21-i2c.2"); 432 clk_register_clkdev(clk[IMX5_CLK_HSI2C_GATE], NULL, "imx21-i2c.2");
438 clk_register_clkdev(clk[IMX5_CLK_MX51_MIPI], "mipi_hsp", NULL); 433 clk_register_clkdev(clk[IMX5_CLK_MX51_MIPI], "mipi_hsp", NULL);
439 clk_register_clkdev(clk[IMX5_CLK_VPU_GATE], NULL, "imx51-vpu.0");
440 clk_register_clkdev(clk[IMX5_CLK_FEC_GATE], NULL, "imx27-fec.0"); 434 clk_register_clkdev(clk[IMX5_CLK_FEC_GATE], NULL, "imx27-fec.0");
441 clk_register_clkdev(clk[IMX5_CLK_USB_PHY_GATE], "phy", "mxc-ehci.0"); 435 clk_register_clkdev(clk[IMX5_CLK_USB_PHY_GATE], "phy", "mxc-ehci.0");
442 clk_register_clkdev(clk[IMX5_CLK_ESDHC1_IPG_GATE], "ipg", "sdhci-esdhc-imx51.0"); 436 clk_register_clkdev(clk[IMX5_CLK_ESDHC1_IPG_GATE], "ipg", "sdhci-esdhc-imx51.0");
@@ -492,9 +486,8 @@ CLK_OF_DECLARE(imx51_ccm, "fsl,imx51-ccm", mx51_clocks_init_dt);
492 486
493static void __init mx53_clocks_init(struct device_node *np) 487static void __init mx53_clocks_init(struct device_node *np)
494{ 488{
495 int i, irq; 489 int i;
496 unsigned long r; 490 unsigned long r;
497 void __iomem *base;
498 491
499 clk[IMX5_CLK_PLL1_SW] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE); 492 clk[IMX5_CLK_PLL1_SW] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE);
500 clk[IMX5_CLK_PLL2_SW] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE); 493 clk[IMX5_CLK_PLL2_SW] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE);
@@ -561,7 +554,6 @@ static void __init mx53_clocks_init(struct device_node *np)
561 554
562 mx5_clocks_common_init(0, 0, 0, 0); 555 mx5_clocks_common_init(0, 0, 0, 0);
563 556
564 clk_register_clkdev(clk[IMX5_CLK_VPU_GATE], NULL, "imx53-vpu.0");
565 clk_register_clkdev(clk[IMX5_CLK_I2C3_GATE], NULL, "imx21-i2c.2"); 557 clk_register_clkdev(clk[IMX5_CLK_I2C3_GATE], NULL, "imx21-i2c.2");
566 clk_register_clkdev(clk[IMX5_CLK_FEC_GATE], NULL, "imx25-fec.0"); 558 clk_register_clkdev(clk[IMX5_CLK_FEC_GATE], NULL, "imx25-fec.0");
567 clk_register_clkdev(clk[IMX5_CLK_USB_PHY1_GATE], "usb_phy1", "mxc-ehci.0"); 559 clk_register_clkdev(clk[IMX5_CLK_USB_PHY1_GATE], "usb_phy1", "mxc-ehci.0");
@@ -592,10 +584,6 @@ static void __init mx53_clocks_init(struct device_node *np)
592 r = clk_round_rate(clk[IMX5_CLK_USBOH3_PER_GATE], 54000000); 584 r = clk_round_rate(clk[IMX5_CLK_USBOH3_PER_GATE], 54000000);
593 clk_set_rate(clk[IMX5_CLK_USBOH3_PER_GATE], r); 585 clk_set_rate(clk[IMX5_CLK_USBOH3_PER_GATE], r);
594 586
595 np = of_find_compatible_node(NULL, NULL, "fsl,imx53-gpt"); 587 mxc_timer_init_dt(of_find_compatible_node(NULL, NULL, "fsl,imx53-gpt"));
596 base = of_iomap(np, 0);
597 WARN_ON(!base);
598 irq = irq_of_parse_and_map(np, 0);
599 mxc_timer_init(base, irq);
600} 588}
601CLK_OF_DECLARE(imx53_ccm, "fsl,imx53-ccm", mx53_clocks_init); 589CLK_OF_DECLARE(imx53_ccm, "fsl,imx53-ccm", mx53_clocks_init);
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
index 2b4d6acfa34a..8e795dea02ec 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -107,7 +107,7 @@ enum mx6q_clks {
107 sata_ref, sata_ref_100m, pcie_ref, pcie_ref_125m, enet_ref, usbphy1_gate, 107 sata_ref, sata_ref_100m, pcie_ref, pcie_ref_125m, enet_ref, usbphy1_gate,
108 usbphy2_gate, pll4_post_div, pll5_post_div, pll5_video_div, eim_slow, 108 usbphy2_gate, pll4_post_div, pll5_post_div, pll5_video_div, eim_slow,
109 spdif, cko2_sel, cko2_podf, cko2, cko, vdoa, pll4_audio_div, 109 spdif, cko2_sel, cko2_podf, cko2, cko, vdoa, pll4_audio_div,
110 lvds1_sel, lvds2_sel, lvds1_gate, lvds2_gate, clk_max 110 lvds1_sel, lvds2_sel, lvds1_gate, lvds2_gate, esai_ahb, clk_max
111}; 111};
112 112
113static struct clk *clk[clk_max]; 113static struct clk *clk[clk_max];
@@ -140,11 +140,13 @@ static struct clk_div_table video_div_table[] = {
140 { /* sentinel */ } 140 { /* sentinel */ }
141}; 141};
142 142
143static unsigned int share_count_esai;
144
143static void __init imx6q_clocks_init(struct device_node *ccm_node) 145static void __init imx6q_clocks_init(struct device_node *ccm_node)
144{ 146{
145 struct device_node *np; 147 struct device_node *np;
146 void __iomem *base; 148 void __iomem *base;
147 int i, irq; 149 int i;
148 int ret; 150 int ret;
149 151
150 clk[dummy] = imx_clk_fixed("dummy", 0); 152 clk[dummy] = imx_clk_fixed("dummy", 0);
@@ -352,9 +354,14 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
352 clk[ecspi2] = imx_clk_gate2("ecspi2", "ecspi_root", base + 0x6c, 2); 354 clk[ecspi2] = imx_clk_gate2("ecspi2", "ecspi_root", base + 0x6c, 2);
353 clk[ecspi3] = imx_clk_gate2("ecspi3", "ecspi_root", base + 0x6c, 4); 355 clk[ecspi3] = imx_clk_gate2("ecspi3", "ecspi_root", base + 0x6c, 4);
354 clk[ecspi4] = imx_clk_gate2("ecspi4", "ecspi_root", base + 0x6c, 6); 356 clk[ecspi4] = imx_clk_gate2("ecspi4", "ecspi_root", base + 0x6c, 6);
355 clk[ecspi5] = imx_clk_gate2("ecspi5", "ecspi_root", base + 0x6c, 8); 357 if (cpu_is_imx6dl())
358 /* ecspi5 is replaced with i2c4 on imx6dl & imx6s */
359 clk[ecspi5] = imx_clk_gate2("i2c4", "ipg_per", base + 0x6c, 8);
360 else
361 clk[ecspi5] = imx_clk_gate2("ecspi5", "ecspi_root", base + 0x6c, 8);
356 clk[enet] = imx_clk_gate2("enet", "ipg", base + 0x6c, 10); 362 clk[enet] = imx_clk_gate2("enet", "ipg", base + 0x6c, 10);
357 clk[esai] = imx_clk_gate2("esai", "esai_podf", base + 0x6c, 16); 363 clk[esai] = imx_clk_gate2_shared("esai", "esai_podf", base + 0x6c, 16, &share_count_esai);
364 clk[esai_ahb] = imx_clk_gate2_shared("esai_ahb", "ahb", base + 0x6c, 16, &share_count_esai);
358 clk[gpt_ipg] = imx_clk_gate2("gpt_ipg", "ipg", base + 0x6c, 20); 365 clk[gpt_ipg] = imx_clk_gate2("gpt_ipg", "ipg", base + 0x6c, 20);
359 clk[gpt_ipg_per] = imx_clk_gate2("gpt_ipg_per", "ipg_per", base + 0x6c, 22); 366 clk[gpt_ipg_per] = imx_clk_gate2("gpt_ipg_per", "ipg_per", base + 0x6c, 22);
360 if (cpu_is_imx6dl()) 367 if (cpu_is_imx6dl())
@@ -489,10 +496,6 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
489 /* Set initial power mode */ 496 /* Set initial power mode */
490 imx6q_set_lpm(WAIT_CLOCKED); 497 imx6q_set_lpm(WAIT_CLOCKED);
491 498
492 np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); 499 mxc_timer_init_dt(of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"));
493 base = of_iomap(np, 0);
494 WARN_ON(!base);
495 irq = irq_of_parse_and_map(np, 0);
496 mxc_timer_init(base, irq);
497} 500}
498CLK_OF_DECLARE(imx6q, "fsl,imx6q-ccm", imx6q_clocks_init); 501CLK_OF_DECLARE(imx6q, "fsl,imx6q-ccm", imx6q_clocks_init);
diff --git a/arch/arm/mach-imx/clk-imx6sl.c b/arch/arm/mach-imx/clk-imx6sl.c
index f7073c0782fb..21cf06cebade 100644
--- a/arch/arm/mach-imx/clk-imx6sl.c
+++ b/arch/arm/mach-imx/clk-imx6sl.c
@@ -169,7 +169,6 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node)
169{ 169{
170 struct device_node *np; 170 struct device_node *np;
171 void __iomem *base; 171 void __iomem *base;
172 int irq;
173 int i; 172 int i;
174 int ret; 173 int ret;
175 174
@@ -385,9 +384,6 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node)
385 imx6q_set_lpm(WAIT_CLOCKED); 384 imx6q_set_lpm(WAIT_CLOCKED);
386 385
387 np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-gpt"); 386 np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-gpt");
388 base = of_iomap(np, 0); 387 mxc_timer_init_dt(np);
389 WARN_ON(!base);
390 irq = irq_of_parse_and_map(np, 0);
391 mxc_timer_init(base, irq);
392} 388}
393CLK_OF_DECLARE(imx6sl, "fsl,imx6sl-ccm", imx6sl_clocks_init); 389CLK_OF_DECLARE(imx6sl, "fsl,imx6sl-ccm", imx6sl_clocks_init);
diff --git a/arch/arm/mach-imx/clk-imx6sx.c b/arch/arm/mach-imx/clk-imx6sx.c
new file mode 100644
index 000000000000..72f8902235d1
--- /dev/null
+++ b/arch/arm/mach-imx/clk-imx6sx.c
@@ -0,0 +1,524 @@
1/*
2 * Copyright (C) 2014 Freescale Semiconductor, Inc.
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12#include <dt-bindings/clock/imx6sx-clock.h>
13#include <linux/clk.h>
14#include <linux/clkdev.h>
15#include <linux/err.h>
16#include <linux/init.h>
17#include <linux/io.h>
18#include <linux/of.h>
19#include <linux/of_address.h>
20#include <linux/of_irq.h>
21#include <linux/types.h>
22
23#include "clk.h"
24#include "common.h"
25
26#define CCDR 0x4
27#define BM_CCM_CCDR_MMDC_CH0_MASK (0x2 << 16)
28
29static const char *step_sels[] = { "osc", "pll2_pfd2_396m", };
30static const char *pll1_sw_sels[] = { "pll1_sys", "step", };
31static const char *periph_pre_sels[] = { "pll2_bus", "pll2_pfd2_396m", "pll2_pfd0_352m", "pll2_198m", };
32static const char *periph2_pre_sels[] = { "pll2_bus", "pll2_pfd2_396m", "pll2_pfd0_352m", "pll4_audio_div", };
33static const char *periph_clk2_sels[] = { "pll3_usb_otg", "osc", "osc", };
34static const char *periph2_clk2_sels[] = { "pll3_usb_otg", "osc", };
35static const char *periph_sels[] = { "periph_pre", "periph_clk2", };
36static const char *periph2_sels[] = { "periph2_pre", "periph2_clk2", };
37static const char *ocram_sels[] = { "periph", "pll2_pfd2_396m", "periph", "pll3_pfd1_540m", };
38static const char *audio_sels[] = { "pll4_audio_div", "pll3_pfd2_508m", "pll5_video_div", "pll3_usb_otg", };
39static const char *gpu_axi_sels[] = { "pll2_pfd2_396m", "pll3_pfd0_720m", "pll3_pfd1_540m", "pll2_bus", };
40static const char *gpu_core_sels[] = { "pll3_pfd1_540m", "pll3_pfd0_720m", "pll2_bus", "pll2_pfd2_396m", };
41static const char *ldb_di0_div_sels[] = { "ldb_di0_div_3_5", "ldb_di0_div_7", };
42static const char *ldb_di1_div_sels[] = { "ldb_di1_div_3_5", "ldb_di1_div_7", };
43static const char *ldb_di0_sels[] = { "pll5_video_div", "pll2_pfd0_352m", "pll2_pfd2_396m", "pll2_pfd3_594m", "pll2_pfd1_594m", "pll3_pfd3_454m", };
44static const char *ldb_di1_sels[] = { "pll3_usb_otg", "pll2_pfd0_352m", "pll2_pfd2_396m", "pll2_bus", "pll3_pfd3_454m", "pll3_pfd2_508m", };
45static const char *pcie_axi_sels[] = { "axi", "ahb", };
46static const char *ssi_sels[] = { "pll3_pfd2_508m", "pll5_video_div", "pll4_audio_div", };
47static const char *qspi1_sels[] = { "pll3_usb_otg", "pll2_pfd0_352m", "pll2_pfd2_396m", "pll2_bus", "pll3_pfd3_454m", "pll3_pfd2_508m", };
48static const char *perclk_sels[] = { "ipg", "osc", };
49static const char *usdhc_sels[] = { "pll2_pfd2_396m", "pll2_pfd0_352m", };
50static const char *vid_sels[] = { "pll3_pfd1_540m", "pll3_usb_otg", "pll3_pfd3_454m", "pll4_audio_div", "pll5_video_div", };
51static const char *can_sels[] = { "pll3_60m", "osc", "pll3_80m", "dummy", };
52static const char *uart_sels[] = { "pll3_80m", "osc", };
53static const char *qspi2_sels[] = { "pll2_pfd0_352m", "pll2_bus", "pll3_usb_otg", "pll2_pfd2_396m", "pll3_pfd3_454m", "dummy", "dummy", "dummy", };
54static const char *enet_pre_sels[] = { "pll2_bus", "pll3_usb_otg", "pll5_video_div", "pll2_pfd0_352m", "pll2_pfd2_396m", "pll3_pfd2_508m", };
55static const char *enet_sels[] = { "enet_podf", "ipp_di0", "ipp_di1", "ldb_di0", "ldb_di1", };
56static const char *m4_pre_sels[] = { "pll2_bus", "pll3_usb_otg", "osc", "pll2_pfd0_352m", "pll2_pfd2_396m", "pll3_pfd3_454m", };
57static const char *m4_sels[] = { "m4_pre_sel", "ipp_di0", "ipp_di1", "ldb_di0", "ldb_di1", };
58static const char *eim_slow_sels[] = { "ocram", "pll3_usb_otg", "pll2_pfd2_396m", "pll2_pfd0_352m", };
59static const char *ecspi_sels[] = { "pll3_60m", "osc", };
60static const char *lcdif1_pre_sels[] = { "pll2_bus", "pll3_pfd3_454m", "pll5_video_div", "pll2_pfd0_352m", "pll2_pfd1_594m", "pll3_pfd1_540m", };
61static const char *lcdif1_sels[] = { "lcdif1_podf", "ipp_di0", "ipp_di1", "ldb_di0", "ldb_di1", };
62static const char *lcdif2_pre_sels[] = { "pll2_bus", "pll3_pfd3_454m", "pll5_video_div", "pll2_pfd0_352m", "pll2_pfd3_594m", "pll3_pfd1_540m", };
63static const char *lcdif2_sels[] = { "lcdif2_podf", "ipp_di0", "ipp_di1", "ldb_di0", "ldb_di1", };
64static const char *display_sels[] = { "pll2_bus", "pll2_pfd2_396m", "pll3_usb_otg", "pll3_pfd1_540m", };
65static const char *csi_sels[] = { "osc", "pll2_pfd2_396m", "pll3_120m", "pll3_pfd1_540m", };
66static const char *cko1_sels[] = {
67 "pll3_usb_otg", "pll2_bus", "pll1_sys", "pll5_video_div",
68 "dummy", "ocram", "dummy", "pxp_axi", "epdc_axi", "lcdif_pix",
69 "epdc_pix", "ahb", "ipg", "perclk", "ckil", "pll4_audio_div",
70};
71static const char *cko2_sels[] = {
72 "dummy", "mmdc_p0_fast", "usdhc4", "usdhc1", "dummy", "wrck",
73 "ecspi_root", "dummy", "usdhc3", "pcie", "arm", "csi_core",
74 "lcdif_axi", "dummy", "osc", "dummy", "gpu2d_ovg_core",
75 "usdhc2", "ssi1", "ssi2", "ssi3", "gpu2d_core", "dummy",
76 "dummy", "dummy", "dummy", "esai_extal", "eim_slow", "uart_serial",
77 "spdif", "asrc", "dummy",
78};
79static const char *cko_sels[] = { "cko1", "cko2", };
80static const char *lvds_sels[] = {
81 "arm", "pll1_sys", "dummy", "dummy", "dummy", "dummy", "dummy", "pll5_video_div",
82 "dummy", "dummy", "pcie_ref_125m", "dummy", "usbphy1", "usbphy2",
83};
84
85static struct clk *clks[IMX6SX_CLK_CLK_END];
86static struct clk_onecell_data clk_data;
87
88static int const clks_init_on[] __initconst = {
89 IMX6SX_CLK_AIPS_TZ1, IMX6SX_CLK_AIPS_TZ2, IMX6SX_CLK_AIPS_TZ3,
90 IMX6SX_CLK_IPMUX1, IMX6SX_CLK_IPMUX2, IMX6SX_CLK_IPMUX3,
91 IMX6SX_CLK_WAKEUP, IMX6SX_CLK_MMDC_P0_FAST, IMX6SX_CLK_MMDC_P0_IPG,
92 IMX6SX_CLK_ROM, IMX6SX_CLK_ARM, IMX6SX_CLK_IPG, IMX6SX_CLK_OCRAM,
93 IMX6SX_CLK_PER2_MAIN, IMX6SX_CLK_PERCLK, IMX6SX_CLK_M4,
94 IMX6SX_CLK_QSPI1, IMX6SX_CLK_QSPI2, IMX6SX_CLK_UART_IPG,
95 IMX6SX_CLK_UART_SERIAL, IMX6SX_CLK_I2C3, IMX6SX_CLK_ECSPI5,
96 IMX6SX_CLK_CAN1_IPG, IMX6SX_CLK_CAN1_SERIAL, IMX6SX_CLK_CAN2_IPG,
97 IMX6SX_CLK_CAN2_SERIAL, IMX6SX_CLK_CANFD, IMX6SX_CLK_EPIT1,
98 IMX6SX_CLK_EPIT2,
99};
100
101static struct clk_div_table clk_enet_ref_table[] = {
102 { .val = 0, .div = 20, },
103 { .val = 1, .div = 10, },
104 { .val = 2, .div = 5, },
105 { .val = 3, .div = 4, },
106 { }
107};
108
109static struct clk_div_table post_div_table[] = {
110 { .val = 2, .div = 1, },
111 { .val = 1, .div = 2, },
112 { .val = 0, .div = 4, },
113 { }
114};
115
116static struct clk_div_table video_div_table[] = {
117 { .val = 0, .div = 1, },
118 { .val = 1, .div = 2, },
119 { .val = 2, .div = 1, },
120 { .val = 3, .div = 4, },
121 { }
122};
123
124static u32 share_count_asrc;
125static u32 share_count_audio;
126static u32 share_count_esai;
127
128static void __init imx6sx_clocks_init(struct device_node *ccm_node)
129{
130 struct device_node *np;
131 void __iomem *base;
132 int i;
133
134 clks[IMX6SX_CLK_DUMMY] = imx_clk_fixed("dummy", 0);
135
136 clks[IMX6SX_CLK_CKIL] = of_clk_get_by_name(ccm_node, "ckil");
137 clks[IMX6SX_CLK_OSC] = of_clk_get_by_name(ccm_node, "osc");
138
139 /* ipp_di clock is external input */
140 clks[IMX6SX_CLK_IPP_DI0] = of_clk_get_by_name(ccm_node, "ipp_di0");
141 clks[IMX6SX_CLK_IPP_DI1] = of_clk_get_by_name(ccm_node, "ipp_di1");
142
143 np = of_find_compatible_node(NULL, NULL, "fsl,imx6sx-anatop");
144 base = of_iomap(np, 0);
145 WARN_ON(!base);
146
147 /* type name parent_name base div_mask */
148 clks[IMX6SX_CLK_PLL1_SYS] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1_sys", "osc", base, 0x7f);
149 clks[IMX6SX_CLK_PLL2_BUS] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2_bus", "osc", base + 0x30, 0x1);
150 clks[IMX6SX_CLK_PLL3_USB_OTG] = imx_clk_pllv3(IMX_PLLV3_USB, "pll3_usb_otg", "osc", base + 0x10, 0x3);
151 clks[IMX6SX_CLK_PLL4_AUDIO] = imx_clk_pllv3(IMX_PLLV3_AV, "pll4_audio", "osc", base + 0x70, 0x7f);
152 clks[IMX6SX_CLK_PLL5_VIDEO] = imx_clk_pllv3(IMX_PLLV3_AV, "pll5_video", "osc", base + 0xa0, 0x7f);
153 clks[IMX6SX_CLK_PLL6_ENET] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll6_enet", "osc", base + 0xe0, 0x3);
154 clks[IMX6SX_CLK_PLL7_USB_HOST] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7_usb_host", "osc", base + 0x20, 0x3);
155
156 /*
157 * Bit 20 is the reserved and read-only bit, we do this only for:
158 * - Do nothing for usbphy clk_enable/disable
159 * - Keep refcount when do usbphy clk_enable/disable, in that case,
160 * the clk framework may need to enable/disable usbphy's parent
161 */
162 clks[IMX6SX_CLK_USBPHY1] = imx_clk_gate("usbphy1", "pll3_usb_otg", base + 0x10, 20);
163 clks[IMX6SX_CLK_USBPHY2] = imx_clk_gate("usbphy2", "pll7_usb_host", base + 0x20, 20);
164
165 /*
166 * usbphy*_gate needs to be on after system boots up, and software
167 * never needs to control it anymore.
168 */
169 clks[IMX6SX_CLK_USBPHY1_GATE] = imx_clk_gate("usbphy1_gate", "dummy", base + 0x10, 6);
170 clks[IMX6SX_CLK_USBPHY2_GATE] = imx_clk_gate("usbphy2_gate", "dummy", base + 0x20, 6);
171
172 /* FIXME 100Mhz is used for pcie ref for all imx6 pcie, excepted imx6q */
173 clks[IMX6SX_CLK_PCIE_REF] = imx_clk_fixed_factor("pcie_ref", "pll6_enet", 1, 5);
174 clks[IMX6SX_CLK_PCIE_REF_125M] = imx_clk_gate("pcie_ref_125m", "pcie_ref", base + 0xe0, 19);
175
176 clks[IMX6SX_CLK_LVDS1_OUT] = imx_clk_gate("lvds1_out", "lvds1_sel", base + 0x160, 10);
177
178 clks[IMX6SX_CLK_ENET_REF] = clk_register_divider_table(NULL, "enet_ref", "pll6_enet", 0,
179 base + 0xe0, 0, 2, 0, clk_enet_ref_table,
180 &imx_ccm_lock);
181 clks[IMX6SX_CLK_ENET2_REF] = clk_register_divider_table(NULL, "enet2_ref", "pll6_enet", 0,
182 base + 0xe0, 2, 2, 0, clk_enet_ref_table,
183 &imx_ccm_lock);
184 clks[IMX6SX_CLK_ENET2_REF_125M] = imx_clk_gate("enet2_ref_125m", "enet2_ref", base + 0xe0, 20);
185
186 clks[IMX6SX_CLK_ENET_PTP_REF] = imx_clk_fixed_factor("enet_ptp_ref", "pll6_enet", 1, 20);
187 clks[IMX6SX_CLK_ENET_PTP] = imx_clk_gate("enet_ptp_25m", "enet_ptp_ref", base + 0xe0, 21);
188
189 /* name parent_name reg idx */
190 clks[IMX6SX_CLK_PLL2_PFD0] = imx_clk_pfd("pll2_pfd0_352m", "pll2_bus", base + 0x100, 0);
191 clks[IMX6SX_CLK_PLL2_PFD1] = imx_clk_pfd("pll2_pfd1_594m", "pll2_bus", base + 0x100, 1);
192 clks[IMX6SX_CLK_PLL2_PFD2] = imx_clk_pfd("pll2_pfd2_396m", "pll2_bus", base + 0x100, 2);
193 clks[IMX6SX_CLK_PLL2_PFD3] = imx_clk_pfd("pll2_pfd3_594m", "pll2_bus", base + 0x100, 3);
194 clks[IMX6SX_CLK_PLL3_PFD0] = imx_clk_pfd("pll3_pfd0_720m", "pll3_usb_otg", base + 0xf0, 0);
195 clks[IMX6SX_CLK_PLL3_PFD1] = imx_clk_pfd("pll3_pfd1_540m", "pll3_usb_otg", base + 0xf0, 1);
196 clks[IMX6SX_CLK_PLL3_PFD2] = imx_clk_pfd("pll3_pfd2_508m", "pll3_usb_otg", base + 0xf0, 2);
197 clks[IMX6SX_CLK_PLL3_PFD3] = imx_clk_pfd("pll3_pfd3_454m", "pll3_usb_otg", base + 0xf0, 3);
198
199 /* name parent_name mult div */
200 clks[IMX6SX_CLK_PLL2_198M] = imx_clk_fixed_factor("pll2_198m", "pll2_pfd2_396m", 1, 2);
201 clks[IMX6SX_CLK_PLL3_120M] = imx_clk_fixed_factor("pll3_120m", "pll3_usb_otg", 1, 4);
202 clks[IMX6SX_CLK_PLL3_80M] = imx_clk_fixed_factor("pll3_80m", "pll3_usb_otg", 1, 6);
203 clks[IMX6SX_CLK_PLL3_60M] = imx_clk_fixed_factor("pll3_60m", "pll3_usb_otg", 1, 8);
204 clks[IMX6SX_CLK_TWD] = imx_clk_fixed_factor("twd", "arm", 1, 2);
205 clks[IMX6SX_CLK_GPT_3M] = imx_clk_fixed_factor("gpt_3m", "osc", 1, 8);
206
207 clks[IMX6SX_CLK_PLL4_POST_DIV] = clk_register_divider_table(NULL, "pll4_post_div", "pll4_audio",
208 CLK_SET_RATE_PARENT, base + 0x70, 19, 2, 0, post_div_table, &imx_ccm_lock);
209 clks[IMX6SX_CLK_PLL4_AUDIO_DIV] = clk_register_divider(NULL, "pll4_audio_div", "pll4_post_div",
210 CLK_SET_RATE_PARENT, base + 0x170, 15, 1, 0, &imx_ccm_lock);
211 clks[IMX6SX_CLK_PLL5_POST_DIV] = clk_register_divider_table(NULL, "pll5_post_div", "pll5_video",
212 CLK_SET_RATE_PARENT, base + 0xa0, 19, 2, 0, post_div_table, &imx_ccm_lock);
213 clks[IMX6SX_CLK_PLL5_VIDEO_DIV] = clk_register_divider_table(NULL, "pll5_video_div", "pll5_post_div",
214 CLK_SET_RATE_PARENT, base + 0x170, 30, 2, 0, video_div_table, &imx_ccm_lock);
215
216 /* name reg shift width parent_names num_parents */
217 clks[IMX6SX_CLK_LVDS1_SEL] = imx_clk_mux("lvds1_sel", base + 0x160, 0, 5, lvds_sels, ARRAY_SIZE(lvds_sels));
218
219 np = ccm_node;
220 base = of_iomap(np, 0);
221 WARN_ON(!base);
222
223 imx6q_pm_set_ccm_base(base);
224
225 /* name reg shift width parent_names num_parents */
226 clks[IMX6SX_CLK_STEP] = imx_clk_mux("step", base + 0xc, 8, 1, step_sels, ARRAY_SIZE(step_sels));
227 clks[IMX6SX_CLK_PLL1_SW] = imx_clk_mux("pll1_sw", base + 0xc, 2, 1, pll1_sw_sels, ARRAY_SIZE(pll1_sw_sels));
228 clks[IMX6SX_CLK_OCRAM_SEL] = imx_clk_mux("ocram_sel", base + 0x14, 6, 2, ocram_sels, ARRAY_SIZE(ocram_sels));
229 clks[IMX6SX_CLK_PERIPH_PRE] = imx_clk_mux("periph_pre", base + 0x18, 18, 2, periph_pre_sels, ARRAY_SIZE(periph_pre_sels));
230 clks[IMX6SX_CLK_PERIPH2_PRE] = imx_clk_mux("periph2_pre", base + 0x18, 21, 2, periph2_pre_sels, ARRAY_SIZE(periph2_pre_sels));
231 clks[IMX6SX_CLK_PERIPH_CLK2_SEL] = imx_clk_mux("periph_clk2_sel", base + 0x18, 12, 2, periph_clk2_sels, ARRAY_SIZE(periph_clk2_sels));
232 clks[IMX6SX_CLK_PERIPH2_CLK2_SEL] = imx_clk_mux("periph2_clk2_sel", base + 0x18, 20, 1, periph2_clk2_sels, ARRAY_SIZE(periph2_clk2_sels));
233 clks[IMX6SX_CLK_PCIE_AXI_SEL] = imx_clk_mux("pcie_axi_sel", base + 0x18, 10, 1, pcie_axi_sels, ARRAY_SIZE(pcie_axi_sels));
234 clks[IMX6SX_CLK_GPU_AXI_SEL] = imx_clk_mux("gpu_axi_sel", base + 0x18, 8, 2, gpu_axi_sels, ARRAY_SIZE(gpu_axi_sels));
235 clks[IMX6SX_CLK_GPU_CORE_SEL] = imx_clk_mux("gpu_core_sel", base + 0x18, 4, 2, gpu_core_sels, ARRAY_SIZE(gpu_core_sels));
236 clks[IMX6SX_CLK_EIM_SLOW_SEL] = imx_clk_mux("eim_slow_sel", base + 0x1c, 29, 2, eim_slow_sels, ARRAY_SIZE(eim_slow_sels));
237 clks[IMX6SX_CLK_USDHC1_SEL] = imx_clk_mux("usdhc1_sel", base + 0x1c, 16, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels));
238 clks[IMX6SX_CLK_USDHC2_SEL] = imx_clk_mux("usdhc2_sel", base + 0x1c, 17, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels));
239 clks[IMX6SX_CLK_USDHC3_SEL] = imx_clk_mux("usdhc3_sel", base + 0x1c, 18, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels));
240 clks[IMX6SX_CLK_USDHC4_SEL] = imx_clk_mux("usdhc4_sel", base + 0x1c, 19, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels));
241 clks[IMX6SX_CLK_SSI3_SEL] = imx_clk_mux("ssi3_sel", base + 0x1c, 14, 2, ssi_sels, ARRAY_SIZE(ssi_sels));
242 clks[IMX6SX_CLK_SSI2_SEL] = imx_clk_mux("ssi2_sel", base + 0x1c, 12, 2, ssi_sels, ARRAY_SIZE(ssi_sels));
243 clks[IMX6SX_CLK_SSI1_SEL] = imx_clk_mux("ssi1_sel", base + 0x1c, 10, 2, ssi_sels, ARRAY_SIZE(ssi_sels));
244 clks[IMX6SX_CLK_QSPI1_SEL] = imx_clk_mux_flags("qspi1_sel", base + 0x1c, 7, 3, qspi1_sels, ARRAY_SIZE(qspi1_sels), CLK_SET_RATE_PARENT);
245 clks[IMX6SX_CLK_PERCLK_SEL] = imx_clk_mux("perclk_sel", base + 0x1c, 6, 1, perclk_sels, ARRAY_SIZE(perclk_sels));
246 clks[IMX6SX_CLK_VID_SEL] = imx_clk_mux("vid_sel", base + 0x20, 21, 3, vid_sels, ARRAY_SIZE(vid_sels));
247 clks[IMX6SX_CLK_ESAI_SEL] = imx_clk_mux("esai_sel", base + 0x20, 19, 2, audio_sels, ARRAY_SIZE(audio_sels));
248 clks[IMX6SX_CLK_CAN_SEL] = imx_clk_mux("can_sel", base + 0x20, 8, 2, can_sels, ARRAY_SIZE(can_sels));
249 clks[IMX6SX_CLK_UART_SEL] = imx_clk_mux("uart_sel", base + 0x24, 6, 1, uart_sels, ARRAY_SIZE(uart_sels));
250 clks[IMX6SX_CLK_QSPI2_SEL] = imx_clk_mux_flags("qspi2_sel", base + 0x2c, 15, 3, qspi2_sels, ARRAY_SIZE(qspi2_sels), CLK_SET_RATE_PARENT);
251 clks[IMX6SX_CLK_SPDIF_SEL] = imx_clk_mux("spdif_sel", base + 0x30, 20, 2, audio_sels, ARRAY_SIZE(audio_sels));
252 clks[IMX6SX_CLK_AUDIO_SEL] = imx_clk_mux("audio_sel", base + 0x30, 7, 2, audio_sels, ARRAY_SIZE(audio_sels));
253 clks[IMX6SX_CLK_ENET_PRE_SEL] = imx_clk_mux("enet_pre_sel", base + 0x34, 15, 3, enet_pre_sels, ARRAY_SIZE(enet_pre_sels));
254 clks[IMX6SX_CLK_ENET_SEL] = imx_clk_mux("enet_sel", base + 0x34, 9, 3, enet_sels, ARRAY_SIZE(enet_sels));
255 clks[IMX6SX_CLK_M4_PRE_SEL] = imx_clk_mux("m4_pre_sel", base + 0x34, 6, 3, m4_pre_sels, ARRAY_SIZE(m4_pre_sels));
256 clks[IMX6SX_CLK_M4_SEL] = imx_clk_mux("m4_sel", base + 0x34, 0, 3, m4_sels, ARRAY_SIZE(m4_sels));
257 clks[IMX6SX_CLK_ECSPI_SEL] = imx_clk_mux("ecspi_sel", base + 0x38, 18, 1, ecspi_sels, ARRAY_SIZE(ecspi_sels));
258 clks[IMX6SX_CLK_LCDIF2_PRE_SEL] = imx_clk_mux("lcdif2_pre_sel", base + 0x38, 6, 3, lcdif2_pre_sels, ARRAY_SIZE(lcdif2_pre_sels));
259 clks[IMX6SX_CLK_LCDIF2_SEL] = imx_clk_mux("lcdif2_sel", base + 0x38, 0, 3, lcdif2_sels, ARRAY_SIZE(lcdif2_sels));
260 clks[IMX6SX_CLK_DISPLAY_SEL] = imx_clk_mux("display_sel", base + 0x3c, 14, 2, display_sels, ARRAY_SIZE(display_sels));
261 clks[IMX6SX_CLK_CSI_SEL] = imx_clk_mux("csi_sel", base + 0x3c, 9, 2, csi_sels, ARRAY_SIZE(csi_sels));
262 clks[IMX6SX_CLK_CKO1_SEL] = imx_clk_mux("cko1_sel", base + 0x60, 0, 4, cko1_sels, ARRAY_SIZE(cko1_sels));
263 clks[IMX6SX_CLK_CKO2_SEL] = imx_clk_mux("cko2_sel", base + 0x60, 16, 5, cko2_sels, ARRAY_SIZE(cko2_sels));
264 clks[IMX6SX_CLK_CKO] = imx_clk_mux("cko", base + 0x60, 8, 1, cko_sels, ARRAY_SIZE(cko_sels));
265
266 clks[IMX6SX_CLK_LDB_DI1_DIV_SEL] = imx_clk_mux_flags("ldb_di1_div_sel", base + 0x20, 11, 1, ldb_di1_div_sels, ARRAY_SIZE(ldb_di1_div_sels), CLK_SET_RATE_PARENT);
267 clks[IMX6SX_CLK_LDB_DI0_DIV_SEL] = imx_clk_mux_flags("ldb_di0_div_sel", base + 0x20, 10, 1, ldb_di0_div_sels, ARRAY_SIZE(ldb_di0_div_sels), CLK_SET_RATE_PARENT);
268 clks[IMX6SX_CLK_LDB_DI1_SEL] = imx_clk_mux_flags("ldb_di1_sel", base + 0x2c, 12, 3, ldb_di1_sels, ARRAY_SIZE(ldb_di1_sels), CLK_SET_RATE_PARENT);
269 clks[IMX6SX_CLK_LDB_DI0_SEL] = imx_clk_mux_flags("ldb_di0_sel", base + 0x2c, 9, 3, ldb_di0_sels, ARRAY_SIZE(ldb_di0_sels), CLK_SET_RATE_PARENT);
270 clks[IMX6SX_CLK_LCDIF1_PRE_SEL] = imx_clk_mux_flags("lcdif1_pre_sel", base + 0x38, 15, 3, lcdif1_pre_sels, ARRAY_SIZE(lcdif1_pre_sels), CLK_SET_RATE_PARENT);
271 clks[IMX6SX_CLK_LCDIF1_SEL] = imx_clk_mux_flags("lcdif1_sel", base + 0x38, 9, 3, lcdif1_sels, ARRAY_SIZE(lcdif1_sels), CLK_SET_RATE_PARENT);
272
273 /* name parent_name reg shift width */
274 clks[IMX6SX_CLK_PERIPH_CLK2] = imx_clk_divider("periph_clk2", "periph_clk2_sel", base + 0x14, 27, 3);
275 clks[IMX6SX_CLK_PERIPH2_CLK2] = imx_clk_divider("periph2_clk2", "periph2_clk2_sel", base + 0x14, 0, 3);
276 clks[IMX6SX_CLK_IPG] = imx_clk_divider("ipg", "ahb", base + 0x14, 8, 2);
277 clks[IMX6SX_CLK_GPU_CORE_PODF] = imx_clk_divider("gpu_core_podf", "gpu_core_sel", base + 0x18, 29, 3);
278 clks[IMX6SX_CLK_GPU_AXI_PODF] = imx_clk_divider("gpu_axi_podf", "gpu_axi_sel", base + 0x18, 26, 3);
279 clks[IMX6SX_CLK_LCDIF1_PODF] = imx_clk_divider("lcdif1_podf", "lcdif1_pred", base + 0x18, 23, 3);
280 clks[IMX6SX_CLK_QSPI1_PODF] = imx_clk_divider("qspi1_podf", "qspi1_sel", base + 0x1c, 26, 3);
281 clks[IMX6SX_CLK_EIM_SLOW_PODF] = imx_clk_divider("eim_slow_podf", "eim_slow_sel", base + 0x1c, 23, 3);
282 clks[IMX6SX_CLK_LCDIF2_PODF] = imx_clk_divider("lcdif2_podf", "lcdif2_pred", base + 0x1c, 20, 3);
283 clks[IMX6SX_CLK_PERCLK] = imx_clk_divider("perclk", "perclk_sel", base + 0x1c, 0, 6);
284 clks[IMX6SX_CLK_VID_PODF] = imx_clk_divider("vid_podf", "vid_sel", base + 0x20, 24, 2);
285 clks[IMX6SX_CLK_CAN_PODF] = imx_clk_divider("can_podf", "can_sel", base + 0x20, 2, 6);
286 clks[IMX6SX_CLK_USDHC4_PODF] = imx_clk_divider("usdhc4_podf", "usdhc4_sel", base + 0x24, 22, 3);
287 clks[IMX6SX_CLK_USDHC3_PODF] = imx_clk_divider("usdhc3_podf", "usdhc3_sel", base + 0x24, 19, 3);
288 clks[IMX6SX_CLK_USDHC2_PODF] = imx_clk_divider("usdhc2_podf", "usdhc2_sel", base + 0x24, 16, 3);
289 clks[IMX6SX_CLK_USDHC1_PODF] = imx_clk_divider("usdhc1_podf", "usdhc1_sel", base + 0x24, 11, 3);
290 clks[IMX6SX_CLK_UART_PODF] = imx_clk_divider("uart_podf", "uart_sel", base + 0x24, 0, 6);
291 clks[IMX6SX_CLK_ESAI_PRED] = imx_clk_divider("esai_pred", "esai_sel", base + 0x28, 9, 3);
292 clks[IMX6SX_CLK_ESAI_PODF] = imx_clk_divider("esai_podf", "esai_pred", base + 0x28, 25, 3);
293 clks[IMX6SX_CLK_SSI3_PRED] = imx_clk_divider("ssi3_pred", "ssi3_sel", base + 0x28, 22, 3);
294 clks[IMX6SX_CLK_SSI3_PODF] = imx_clk_divider("ssi3_podf", "ssi3_pred", base + 0x28, 16, 6);
295 clks[IMX6SX_CLK_SSI1_PRED] = imx_clk_divider("ssi1_pred", "ssi1_sel", base + 0x28, 6, 3);
296 clks[IMX6SX_CLK_SSI1_PODF] = imx_clk_divider("ssi1_podf", "ssi1_pred", base + 0x28, 0, 6);
297 clks[IMX6SX_CLK_QSPI2_PRED] = imx_clk_divider("qspi2_pred", "qspi2_sel", base + 0x2c, 18, 3);
298 clks[IMX6SX_CLK_QSPI2_PODF] = imx_clk_divider("qspi2_podf", "qspi2_pred", base + 0x2c, 21, 6);
299 clks[IMX6SX_CLK_SSI2_PRED] = imx_clk_divider("ssi2_pred", "ssi2_sel", base + 0x2c, 6, 3);
300 clks[IMX6SX_CLK_SSI2_PODF] = imx_clk_divider("ssi2_podf", "ssi2_pred", base + 0x2c, 0, 6);
301 clks[IMX6SX_CLK_SPDIF_PRED] = imx_clk_divider("spdif_pred", "spdif_sel", base + 0x30, 25, 3);
302 clks[IMX6SX_CLK_SPDIF_PODF] = imx_clk_divider("spdif_podf", "spdif_pred", base + 0x30, 22, 3);
303 clks[IMX6SX_CLK_AUDIO_PRED] = imx_clk_divider("audio_pred", "audio_sel", base + 0x30, 12, 3);
304 clks[IMX6SX_CLK_AUDIO_PODF] = imx_clk_divider("audio_podf", "audio_pred", base + 0x30, 9, 3);
305 clks[IMX6SX_CLK_ENET_PODF] = imx_clk_divider("enet_podf", "enet_pre_sel", base + 0x34, 12, 3);
306 clks[IMX6SX_CLK_M4_PODF] = imx_clk_divider("m4_podf", "m4_sel", base + 0x34, 3, 3);
307 clks[IMX6SX_CLK_ECSPI_PODF] = imx_clk_divider("ecspi_podf", "ecspi_sel", base + 0x38, 19, 6);
308 clks[IMX6SX_CLK_LCDIF1_PRED] = imx_clk_divider("lcdif1_pred", "lcdif1_pre_sel", base + 0x38, 12, 3);
309 clks[IMX6SX_CLK_LCDIF2_PRED] = imx_clk_divider("lcdif2_pred", "lcdif2_pre_sel", base + 0x38, 3, 3);
310 clks[IMX6SX_CLK_DISPLAY_PODF] = imx_clk_divider("display_podf", "display_sel", base + 0x3c, 16, 3);
311 clks[IMX6SX_CLK_CSI_PODF] = imx_clk_divider("csi_podf", "csi_sel", base + 0x3c, 11, 3);
312 clks[IMX6SX_CLK_CKO1_PODF] = imx_clk_divider("cko1_podf", "cko1_sel", base + 0x60, 4, 3);
313 clks[IMX6SX_CLK_CKO2_PODF] = imx_clk_divider("cko2_podf", "cko2_sel", base + 0x60, 21, 3);
314
315 clks[IMX6SX_CLK_LDB_DI0_DIV_3_5] = imx_clk_fixed_factor("ldb_di0_div_3_5", "ldb_di0_sel", 2, 7);
316 clks[IMX6SX_CLK_LDB_DI0_DIV_7] = imx_clk_fixed_factor("ldb_di0_div_7", "ldb_di0_sel", 1, 7);
317 clks[IMX6SX_CLK_LDB_DI1_DIV_3_5] = imx_clk_fixed_factor("ldb_di1_div_3_5", "ldb_di1_sel", 2, 7);
318 clks[IMX6SX_CLK_LDB_DI1_DIV_7] = imx_clk_fixed_factor("ldb_di1_div_7", "ldb_di1_sel", 1, 7);
319
320 /* name reg shift width busy: reg, shift parent_names num_parents */
321 clks[IMX6SX_CLK_PERIPH] = imx_clk_busy_mux("periph", base + 0x14, 25, 1, base + 0x48, 5, periph_sels, ARRAY_SIZE(periph_sels));
322 clks[IMX6SX_CLK_PERIPH2] = imx_clk_busy_mux("periph2", base + 0x14, 26, 1, base + 0x48, 3, periph2_sels, ARRAY_SIZE(periph2_sels));
323 /* name parent_name reg shift width busy: reg, shift */
324 clks[IMX6SX_CLK_OCRAM_PODF] = imx_clk_busy_divider("ocram_podf", "ocram_sel", base + 0x14, 16, 3, base + 0x48, 0);
325 clks[IMX6SX_CLK_AHB] = imx_clk_busy_divider("ahb", "periph", base + 0x14, 10, 3, base + 0x48, 1);
326 clks[IMX6SX_CLK_MMDC_PODF] = imx_clk_busy_divider("mmdc_podf", "periph2", base + 0x14, 3, 3, base + 0x48, 2);
327 clks[IMX6SX_CLK_ARM] = imx_clk_busy_divider("arm", "pll1_sw", base + 0x10, 0, 3, base + 0x48, 16);
328
329 /* name parent_name reg shift */
330 /* CCGR0 */
331 clks[IMX6SX_CLK_AIPS_TZ1] = imx_clk_gate2("aips_tz1", "ahb", base + 0x68, 0);
332 clks[IMX6SX_CLK_AIPS_TZ2] = imx_clk_gate2("aips_tz2", "ahb", base + 0x68, 2);
333 clks[IMX6SX_CLK_APBH_DMA] = imx_clk_gate2("apbh_dma", "usdhc3", base + 0x68, 4);
334 clks[IMX6SX_CLK_ASRC_MEM] = imx_clk_gate2_shared("asrc_mem", "ahb", base + 0x68, 6, &share_count_asrc);
335 clks[IMX6SX_CLK_ASRC_IPG] = imx_clk_gate2_shared("asrc_ipg", "ahb", base + 0x68, 6, &share_count_asrc);
336 clks[IMX6SX_CLK_CAAM_MEM] = imx_clk_gate2("caam_mem", "ahb", base + 0x68, 8);
337 clks[IMX6SX_CLK_CAAM_ACLK] = imx_clk_gate2("caam_aclk", "ahb", base + 0x68, 10);
338 clks[IMX6SX_CLK_CAAM_IPG] = imx_clk_gate2("caam_ipg", "ipg", base + 0x68, 12);
339 clks[IMX6SX_CLK_CAN1_IPG] = imx_clk_gate2("can1_ipg", "ipg", base + 0x68, 14);
340 clks[IMX6SX_CLK_CAN1_SERIAL] = imx_clk_gate2("can1_serial", "can_podf", base + 0x68, 16);
341 clks[IMX6SX_CLK_CAN2_IPG] = imx_clk_gate2("can2_ipg", "ipg", base + 0x68, 18);
342 clks[IMX6SX_CLK_CAN2_SERIAL] = imx_clk_gate2("can2_serial", "can_podf", base + 0x68, 20);
343 clks[IMX6SX_CLK_DCIC1] = imx_clk_gate2("dcic1", "display_podf", base + 0x68, 24);
344 clks[IMX6SX_CLK_DCIC2] = imx_clk_gate2("dcic2", "display_podf", base + 0x68, 26);
345 clks[IMX6SX_CLK_AIPS_TZ3] = imx_clk_gate2("aips_tz3", "ahb", base + 0x68, 30);
346
347 /* CCGR1 */
348 clks[IMX6SX_CLK_ECSPI1] = imx_clk_gate2("ecspi1", "ecspi_podf", base + 0x6c, 0);
349 clks[IMX6SX_CLK_ECSPI2] = imx_clk_gate2("ecspi2", "ecspi_podf", base + 0x6c, 2);
350 clks[IMX6SX_CLK_ECSPI3] = imx_clk_gate2("ecspi3", "ecspi_podf", base + 0x6c, 4);
351 clks[IMX6SX_CLK_ECSPI4] = imx_clk_gate2("ecspi4", "ecspi_podf", base + 0x6c, 6);
352 clks[IMX6SX_CLK_ECSPI5] = imx_clk_gate2("ecspi5", "ecspi_podf", base + 0x6c, 8);
353 clks[IMX6SX_CLK_EPIT1] = imx_clk_gate2("epit1", "perclk", base + 0x6c, 12);
354 clks[IMX6SX_CLK_EPIT2] = imx_clk_gate2("epit2", "perclk", base + 0x6c, 14);
355 clks[IMX6SX_CLK_ESAI_EXTAL] = imx_clk_gate2_shared("esai_extal", "esai_podf", base + 0x6c, 16, &share_count_esai);
356 clks[IMX6SX_CLK_ESAI_IPG] = imx_clk_gate2_shared("esai_ipg", "ahb", base + 0x6c, 16, &share_count_esai);
357 clks[IMX6SX_CLK_ESAI_MEM] = imx_clk_gate2_shared("esai_mem", "ahb", base + 0x6c, 16, &share_count_esai);
358 clks[IMX6SX_CLK_WAKEUP] = imx_clk_gate2("wakeup", "ipg", base + 0x6c, 18);
359 clks[IMX6SX_CLK_GPT_BUS] = imx_clk_gate2("gpt_bus", "perclk", base + 0x6c, 20);
360 clks[IMX6SX_CLK_GPT_SERIAL] = imx_clk_gate2("gpt_serial", "perclk", base + 0x6c, 22);
361 clks[IMX6SX_CLK_GPU] = imx_clk_gate2("gpu", "gpu_core_podf", base + 0x6c, 26);
362 clks[IMX6SX_CLK_CANFD] = imx_clk_gate2("canfd", "can_podf", base + 0x6c, 30);
363
364 /* CCGR2 */
365 clks[IMX6SX_CLK_CSI] = imx_clk_gate2("csi", "csi_podf", base + 0x70, 2);
366 clks[IMX6SX_CLK_I2C1] = imx_clk_gate2("i2c1", "perclk", base + 0x70, 6);
367 clks[IMX6SX_CLK_I2C2] = imx_clk_gate2("i2c2", "perclk", base + 0x70, 8);
368 clks[IMX6SX_CLK_I2C3] = imx_clk_gate2("i2c3", "perclk", base + 0x70, 10);
369 clks[IMX6SX_CLK_OCOTP] = imx_clk_gate2("ocotp", "ipg", base + 0x70, 12);
370 clks[IMX6SX_CLK_IOMUXC] = imx_clk_gate2("iomuxc", "lcdif1_podf", base + 0x70, 14);
371 clks[IMX6SX_CLK_IPMUX1] = imx_clk_gate2("ipmux1", "ahb", base + 0x70, 16);
372 clks[IMX6SX_CLK_IPMUX2] = imx_clk_gate2("ipmux2", "ahb", base + 0x70, 18);
373 clks[IMX6SX_CLK_IPMUX3] = imx_clk_gate2("ipmux3", "ahb", base + 0x70, 20);
374 clks[IMX6SX_CLK_TZASC1] = imx_clk_gate2("tzasc1", "mmdc_podf", base + 0x70, 22);
375 clks[IMX6SX_CLK_LCDIF_APB] = imx_clk_gate2("lcdif_apb", "display_podf", base + 0x70, 28);
376 clks[IMX6SX_CLK_PXP_AXI] = imx_clk_gate2("pxp_axi", "display_podf", base + 0x70, 30);
377
378 /* CCGR3 */
379 clks[IMX6SX_CLK_M4] = imx_clk_gate2("m4", "m4_podf", base + 0x74, 2);
380 clks[IMX6SX_CLK_ENET] = imx_clk_gate2("enet", "ipg", base + 0x74, 4);
381 clks[IMX6SX_CLK_ENET_AHB] = imx_clk_gate2("enet_ahb", "enet_sel", base + 0x74, 4);
382 clks[IMX6SX_CLK_DISPLAY_AXI] = imx_clk_gate2("display_axi", "display_podf", base + 0x74, 6);
383 clks[IMX6SX_CLK_LCDIF2_PIX] = imx_clk_gate2("lcdif2_pix", "lcdif2_sel", base + 0x74, 8);
384 clks[IMX6SX_CLK_LCDIF1_PIX] = imx_clk_gate2("lcdif1_pix", "lcdif1_sel", base + 0x74, 10);
385 clks[IMX6SX_CLK_LDB_DI0] = imx_clk_gate2("ldb_di0", "ldb_di0_div_sel", base + 0x74, 12);
386 clks[IMX6SX_CLK_QSPI1] = imx_clk_gate2("qspi1", "qspi1_podf", base + 0x74, 14);
387 clks[IMX6SX_CLK_MLB] = imx_clk_gate2("mlb", "ahb", base + 0x74, 18);
388 clks[IMX6SX_CLK_MMDC_P0_FAST] = imx_clk_gate2("mmdc_p0_fast", "mmdc_podf", base + 0x74, 20);
389 clks[IMX6SX_CLK_MMDC_P0_IPG] = imx_clk_gate2("mmdc_p0_ipg", "ipg", base + 0x74, 24);
390 clks[IMX6SX_CLK_OCRAM] = imx_clk_gate2("ocram", "ocram_podf", base + 0x74, 28);
391
392 /* CCGR4 */
393 clks[IMX6SX_CLK_PCIE_AXI] = imx_clk_gate2("pcie_axi", "display_podf", base + 0x78, 0);
394 clks[IMX6SX_CLK_QSPI2] = imx_clk_gate2("qspi2", "qspi2_podf", base + 0x78, 10);
395 clks[IMX6SX_CLK_PER1_BCH] = imx_clk_gate2("per1_bch", "usdhc3", base + 0x78, 12);
396 clks[IMX6SX_CLK_PER2_MAIN] = imx_clk_gate2("per2_main", "ahb", base + 0x78, 14);
397 clks[IMX6SX_CLK_PWM1] = imx_clk_gate2("pwm1", "perclk", base + 0x78, 16);
398 clks[IMX6SX_CLK_PWM2] = imx_clk_gate2("pwm2", "perclk", base + 0x78, 18);
399 clks[IMX6SX_CLK_PWM3] = imx_clk_gate2("pwm3", "perclk", base + 0x78, 20);
400 clks[IMX6SX_CLK_PWM4] = imx_clk_gate2("pwm4", "perclk", base + 0x78, 22);
401 clks[IMX6SX_CLK_GPMI_BCH_APB] = imx_clk_gate2("gpmi_bch_apb", "usdhc3", base + 0x78, 24);
402 clks[IMX6SX_CLK_GPMI_BCH] = imx_clk_gate2("gpmi_bch", "usdhc4", base + 0x78, 26);
403 clks[IMX6SX_CLK_GPMI_IO] = imx_clk_gate2("gpmi_io", "qspi2_podf", base + 0x78, 28);
404 clks[IMX6SX_CLK_GPMI_APB] = imx_clk_gate2("gpmi_apb", "usdhc3", base + 0x78, 30);
405
406 /* CCGR5 */
407 clks[IMX6SX_CLK_ROM] = imx_clk_gate2("rom", "ahb", base + 0x7c, 0);
408 clks[IMX6SX_CLK_SDMA] = imx_clk_gate2("sdma", "ahb", base + 0x7c, 6);
409 clks[IMX6SX_CLK_SPBA] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12);
410 clks[IMX6SX_CLK_AUDIO] = imx_clk_gate2_shared("audio", "audio_podf", base + 0x7c, 14, &share_count_audio);
411 clks[IMX6SX_CLK_SPDIF] = imx_clk_gate2_shared("spdif", "spdif_podf", base + 0x7c, 14, &share_count_audio);
412 clks[IMX6SX_CLK_SSI1_IPG] = imx_clk_gate2("ssi1_ipg", "ipg", base + 0x7c, 18);
413 clks[IMX6SX_CLK_SSI2_IPG] = imx_clk_gate2("ssi2_ipg", "ipg", base + 0x7c, 20);
414 clks[IMX6SX_CLK_SSI3_IPG] = imx_clk_gate2("ssi3_ipg", "ipg", base + 0x7c, 22);
415 clks[IMX6SX_CLK_SSI1] = imx_clk_gate2("ssi1", "ssi1_podf", base + 0x7c, 18);
416 clks[IMX6SX_CLK_SSI2] = imx_clk_gate2("ssi2", "ssi2_podf", base + 0x7c, 20);
417 clks[IMX6SX_CLK_SSI3] = imx_clk_gate2("ssi3", "ssi3_podf", base + 0x7c, 22);
418 clks[IMX6SX_CLK_UART_IPG] = imx_clk_gate2("uart_ipg", "ipg", base + 0x7c, 24);
419 clks[IMX6SX_CLK_UART_SERIAL] = imx_clk_gate2("uart_serial", "uart_podf", base + 0x7c, 26);
420 clks[IMX6SX_CLK_SAI1_IPG] = imx_clk_gate2("sai1_ipg", "ipg", base + 0x7c, 28);
421 clks[IMX6SX_CLK_SAI2_IPG] = imx_clk_gate2("sai2_ipg", "ipg", base + 0x7c, 30);
422 clks[IMX6SX_CLK_SAI1] = imx_clk_gate2("sai1", "ssi1_podf", base + 0x7c, 28);
423 clks[IMX6SX_CLK_SAI2] = imx_clk_gate2("sai2", "ssi2_podf", base + 0x7c, 30);
424
425 /* CCGR6 */
426 clks[IMX6SX_CLK_USBOH3] = imx_clk_gate2("usboh3", "ipg", base + 0x80, 0);
427 clks[IMX6SX_CLK_USDHC1] = imx_clk_gate2("usdhc1", "usdhc1_podf", base + 0x80, 2);
428 clks[IMX6SX_CLK_USDHC2] = imx_clk_gate2("usdhc2", "usdhc2_podf", base + 0x80, 4);
429 clks[IMX6SX_CLK_USDHC3] = imx_clk_gate2("usdhc3", "usdhc3_podf", base + 0x80, 6);
430 clks[IMX6SX_CLK_USDHC4] = imx_clk_gate2("usdhc4", "usdhc4_podf", base + 0x80, 8);
431 clks[IMX6SX_CLK_EIM_SLOW] = imx_clk_gate2("eim_slow", "eim_slow_podf", base + 0x80, 10);
432 clks[IMX6SX_CLK_PWM8] = imx_clk_gate2("pwm8", "perclk", base + 0x80, 16);
433 clks[IMX6SX_CLK_VADC] = imx_clk_gate2("vadc", "vid_podf", base + 0x80, 20);
434 clks[IMX6SX_CLK_GIS] = imx_clk_gate2("gis", "display_podf", base + 0x80, 22);
435 clks[IMX6SX_CLK_I2C4] = imx_clk_gate2("i2c4", "perclk", base + 0x80, 24);
436 clks[IMX6SX_CLK_PWM5] = imx_clk_gate2("pwm5", "perclk", base + 0x80, 26);
437 clks[IMX6SX_CLK_PWM6] = imx_clk_gate2("pwm6", "perclk", base + 0x80, 28);
438 clks[IMX6SX_CLK_PWM7] = imx_clk_gate2("pwm7", "perclk", base + 0x80, 30);
439
440 clks[IMX6SX_CLK_CKO1] = imx_clk_gate("cko1", "cko1_podf", base + 0x60, 7);
441 clks[IMX6SX_CLK_CKO2] = imx_clk_gate("cko2", "cko2_podf", base + 0x60, 24);
442
443 /* mask handshake of mmdc */
444 writel_relaxed(BM_CCM_CCDR_MMDC_CH0_MASK, base + CCDR);
445
446 for (i = 0; i < ARRAY_SIZE(clks); i++)
447 if (IS_ERR(clks[i]))
448 pr_err("i.MX6sx clk %d: register failed with %ld\n", i, PTR_ERR(clks[i]));
449
450 clk_data.clks = clks;
451 clk_data.clk_num = ARRAY_SIZE(clks);
452 of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
453
454 clk_register_clkdev(clks[IMX6SX_CLK_GPT_BUS], "ipg", "imx-gpt.0");
455 clk_register_clkdev(clks[IMX6SX_CLK_GPT_SERIAL], "per", "imx-gpt.0");
456
457 for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
458 clk_prepare_enable(clks[clks_init_on[i]]);
459
460 if (IS_ENABLED(CONFIG_USB_MXS_PHY)) {
461 clk_prepare_enable(clks[IMX6SX_CLK_USBPHY1_GATE]);
462 clk_prepare_enable(clks[IMX6SX_CLK_USBPHY2_GATE]);
463 }
464
465 /* Set the default 132MHz for EIM module */
466 clk_set_parent(clks[IMX6SX_CLK_EIM_SLOW_SEL], clks[IMX6SX_CLK_PLL2_PFD2]);
467 clk_set_rate(clks[IMX6SX_CLK_EIM_SLOW], 132000000);
468
469 /* set parent clock for LCDIF1 pixel clock */
470 clk_set_parent(clks[IMX6SX_CLK_LCDIF1_PRE_SEL], clks[IMX6SX_CLK_PLL5_VIDEO_DIV]);
471 clk_set_parent(clks[IMX6SX_CLK_LCDIF1_SEL], clks[IMX6SX_CLK_LCDIF1_PODF]);
472
473 /* Set the parent clks of PCIe lvds1 and pcie_axi to be pcie ref, axi */
474 if (clk_set_parent(clks[IMX6SX_CLK_LVDS1_SEL], clks[IMX6SX_CLK_PCIE_REF_125M]))
475 pr_err("Failed to set pcie bus parent clk.\n");
476 if (clk_set_parent(clks[IMX6SX_CLK_PCIE_AXI_SEL], clks[IMX6SX_CLK_AXI]))
477 pr_err("Failed to set pcie parent clk.\n");
478
479 /*
480 * Init enet system AHB clock, set to 200Mhz
481 * pll2_pfd2_396m-> ENET_PODF-> ENET_AHB
482 */
483 clk_set_parent(clks[IMX6SX_CLK_ENET_PRE_SEL], clks[IMX6SX_CLK_PLL2_PFD2]);
484 clk_set_parent(clks[IMX6SX_CLK_ENET_SEL], clks[IMX6SX_CLK_ENET_PODF]);
485 clk_set_rate(clks[IMX6SX_CLK_ENET_PODF], 200000000);
486 clk_set_rate(clks[IMX6SX_CLK_ENET_REF], 125000000);
487 clk_set_rate(clks[IMX6SX_CLK_ENET2_REF], 125000000);
488
489 /* Audio clocks */
490 clk_set_rate(clks[IMX6SX_CLK_PLL4_AUDIO_DIV], 393216000);
491
492 clk_set_parent(clks[IMX6SX_CLK_SPDIF_SEL], clks[IMX6SX_CLK_PLL4_AUDIO_DIV]);
493 clk_set_rate(clks[IMX6SX_CLK_SPDIF_PODF], 98304000);
494
495 clk_set_parent(clks[IMX6SX_CLK_AUDIO_SEL], clks[IMX6SX_CLK_PLL3_USB_OTG]);
496 clk_set_rate(clks[IMX6SX_CLK_AUDIO_PODF], 24000000);
497
498 clk_set_parent(clks[IMX6SX_CLK_SSI1_SEL], clks[IMX6SX_CLK_PLL4_AUDIO_DIV]);
499 clk_set_parent(clks[IMX6SX_CLK_SSI2_SEL], clks[IMX6SX_CLK_PLL4_AUDIO_DIV]);
500 clk_set_parent(clks[IMX6SX_CLK_SSI3_SEL], clks[IMX6SX_CLK_PLL4_AUDIO_DIV]);
501 clk_set_rate(clks[IMX6SX_CLK_SSI1_PODF], 24576000);
502 clk_set_rate(clks[IMX6SX_CLK_SSI2_PODF], 24576000);
503 clk_set_rate(clks[IMX6SX_CLK_SSI3_PODF], 24576000);
504
505 clk_set_parent(clks[IMX6SX_CLK_ESAI_SEL], clks[IMX6SX_CLK_PLL4_AUDIO_DIV]);
506 clk_set_rate(clks[IMX6SX_CLK_ESAI_PODF], 24576000);
507
508 /* Set parent clock for vadc */
509 clk_set_parent(clks[IMX6SX_CLK_VID_SEL], clks[IMX6SX_CLK_PLL3_USB_OTG]);
510
511 /* default parent of can_sel clock is invalid, manually set it here */
512 clk_set_parent(clks[IMX6SX_CLK_CAN_SEL], clks[IMX6SX_CLK_PLL3_60M]);
513
514 /* Update gpu clock from default 528M to 720M */
515 clk_set_parent(clks[IMX6SX_CLK_GPU_CORE_SEL], clks[IMX6SX_CLK_PLL3_PFD0]);
516 clk_set_parent(clks[IMX6SX_CLK_GPU_AXI_SEL], clks[IMX6SX_CLK_PLL3_PFD0]);
517
518 /* Set initial power mode */
519 imx6q_set_lpm(WAIT_CLOCKED);
520
521 np = of_find_compatible_node(NULL, NULL, "fsl,imx6sx-gpt");
522 mxc_timer_init_dt(np);
523}
524CLK_OF_DECLARE(imx6sx, "fsl,imx6sx-ccm", imx6sx_clocks_init);
diff --git a/arch/arm/mach-imx/clk.h b/arch/arm/mach-imx/clk.h
index 048c5ad8a80b..e29f6ebe9f39 100644
--- a/arch/arm/mach-imx/clk.h
+++ b/arch/arm/mach-imx/clk.h
@@ -28,7 +28,8 @@ struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name,
28struct clk *clk_register_gate2(struct device *dev, const char *name, 28struct clk *clk_register_gate2(struct device *dev, const char *name,
29 const char *parent_name, unsigned long flags, 29 const char *parent_name, unsigned long flags,
30 void __iomem *reg, u8 bit_idx, 30 void __iomem *reg, u8 bit_idx,
31 u8 clk_gate_flags, spinlock_t *lock); 31 u8 clk_gate_flags, spinlock_t *lock,
32 unsigned int *share_count);
32 33
33struct clk * imx_obtain_fixed_clock( 34struct clk * imx_obtain_fixed_clock(
34 const char *name, unsigned long rate); 35 const char *name, unsigned long rate);
@@ -37,7 +38,15 @@ static inline struct clk *imx_clk_gate2(const char *name, const char *parent,
37 void __iomem *reg, u8 shift) 38 void __iomem *reg, u8 shift)
38{ 39{
39 return clk_register_gate2(NULL, name, parent, CLK_SET_RATE_PARENT, reg, 40 return clk_register_gate2(NULL, name, parent, CLK_SET_RATE_PARENT, reg,
40 shift, 0, &imx_ccm_lock); 41 shift, 0, &imx_ccm_lock, NULL);
42}
43
44static inline struct clk *imx_clk_gate2_shared(const char *name,
45 const char *parent, void __iomem *reg, u8 shift,
46 unsigned int *share_count)
47{
48 return clk_register_gate2(NULL, name, parent, CLK_SET_RATE_PARENT, reg,
49 shift, 0, &imx_ccm_lock, share_count);
41} 50}
42 51
43struct clk *imx_clk_pfd(const char *name, const char *parent_name, 52struct clk *imx_clk_pfd(const char *name, const char *parent_name,
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h
index b5241ea76706..9ab785ce13e8 100644
--- a/arch/arm/mach-imx/common.h
+++ b/arch/arm/mach-imx/common.h
@@ -17,6 +17,7 @@ struct irq_data;
17struct platform_device; 17struct platform_device;
18struct pt_regs; 18struct pt_regs;
19struct clk; 19struct clk;
20struct device_node;
20enum mxc_cpu_pwr_mode; 21enum mxc_cpu_pwr_mode;
21 22
22void mx1_map_io(void); 23void mx1_map_io(void);
@@ -56,6 +57,7 @@ void imx51_init_late(void);
56void imx53_init_late(void); 57void imx53_init_late(void);
57void epit_timer_init(void __iomem *base, int irq); 58void epit_timer_init(void __iomem *base, int irq);
58void mxc_timer_init(void __iomem *, int); 59void mxc_timer_init(void __iomem *, int);
60void mxc_timer_init_dt(struct device_node *);
59int mx1_clocks_init(unsigned long fref); 61int mx1_clocks_init(unsigned long fref);
60int mx21_clocks_init(unsigned long lref, unsigned long fref); 62int mx21_clocks_init(unsigned long lref, unsigned long fref);
61int mx25_clocks_init(void); 63int mx25_clocks_init(void);
@@ -99,19 +101,6 @@ enum mx3_cpu_pwr_mode {
99void mx3_cpu_lp_set(enum mx3_cpu_pwr_mode mode); 101void mx3_cpu_lp_set(enum mx3_cpu_pwr_mode mode);
100void imx_print_silicon_rev(const char *cpu, int srev); 102void imx_print_silicon_rev(const char *cpu, int srev);
101 103
102void avic_handle_irq(struct pt_regs *);
103void tzic_handle_irq(struct pt_regs *);
104
105#define imx1_handle_irq avic_handle_irq
106#define imx21_handle_irq avic_handle_irq
107#define imx25_handle_irq avic_handle_irq
108#define imx27_handle_irq avic_handle_irq
109#define imx31_handle_irq avic_handle_irq
110#define imx35_handle_irq avic_handle_irq
111#define imx50_handle_irq tzic_handle_irq
112#define imx51_handle_irq tzic_handle_irq
113#define imx53_handle_irq tzic_handle_irq
114
115void imx_enable_cpu(int cpu, bool enable); 104void imx_enable_cpu(int cpu, bool enable);
116void imx_set_cpu_jump(int cpu, void *jump_addr); 105void imx_set_cpu_jump(int cpu, void *jump_addr);
117u32 imx_get_cpu_arg(int cpu); 106u32 imx_get_cpu_arg(int cpu);
diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c
index ba3b498a67ec..bbe8ff1f0412 100644
--- a/arch/arm/mach-imx/cpu.c
+++ b/arch/arm/mach-imx/cpu.c
@@ -111,6 +111,9 @@ struct device * __init imx_soc_device_init(void)
111 case MXC_CPU_IMX6DL: 111 case MXC_CPU_IMX6DL:
112 soc_id = "i.MX6DL"; 112 soc_id = "i.MX6DL";
113 break; 113 break;
114 case MXC_CPU_IMX6SX:
115 soc_id = "i.MX6SX";
116 break;
114 case MXC_CPU_IMX6Q: 117 case MXC_CPU_IMX6Q:
115 soc_id = "i.MX6Q"; 118 soc_id = "i.MX6Q";
116 break; 119 break;
diff --git a/arch/arm/mach-imx/devices/platform-ipu-core.c b/arch/arm/mach-imx/devices/platform-ipu-core.c
index fc4dd7cedc11..6bd7c3f37ac0 100644
--- a/arch/arm/mach-imx/devices/platform-ipu-core.c
+++ b/arch/arm/mach-imx/devices/platform-ipu-core.c
@@ -77,7 +77,7 @@ struct platform_device *__init imx_alloc_mx3_camera(
77 77
78 pdev = platform_device_alloc("mx3-camera", 0); 78 pdev = platform_device_alloc("mx3-camera", 0);
79 if (!pdev) 79 if (!pdev)
80 goto err; 80 return ERR_PTR(-ENOMEM);
81 81
82 pdev->dev.dma_mask = kmalloc(sizeof(*pdev->dev.dma_mask), GFP_KERNEL); 82 pdev->dev.dma_mask = kmalloc(sizeof(*pdev->dev.dma_mask), GFP_KERNEL);
83 if (!pdev->dev.dma_mask) 83 if (!pdev->dev.dma_mask)
diff --git a/arch/arm/mach-imx/devices/platform-mx2-emma.c b/arch/arm/mach-imx/devices/platform-mx2-emma.c
index 11bd01d402f2..0dc0651825b1 100644
--- a/arch/arm/mach-imx/devices/platform-mx2-emma.c
+++ b/arch/arm/mach-imx/devices/platform-mx2-emma.c
@@ -12,7 +12,7 @@
12#define imx_mx2_emmaprp_data_entry_single(soc) \ 12#define imx_mx2_emmaprp_data_entry_single(soc) \
13 { \ 13 { \
14 .iobase = soc ## _EMMAPRP_BASE_ADDR, \ 14 .iobase = soc ## _EMMAPRP_BASE_ADDR, \
15 .iosize = SZ_32, \ 15 .iosize = SZ_256, \
16 .irq = soc ## _INT_EMMAPRP, \ 16 .irq = soc ## _INT_EMMAPRP, \
17 } 17 }
18 18
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c
deleted file mode 100644
index 9be6c1e69d68..000000000000
--- a/arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c
+++ /dev/null
@@ -1,231 +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/types.h>
23#include <linux/init.h>
24
25#include <linux/gpio.h>
26#include <linux/interrupt.h>
27#include <linux/leds.h>
28#include <linux/platform_device.h>
29#include <linux/input.h>
30#include <linux/i2c.h>
31#include <video/platform_lcd.h>
32#include <linux/backlight.h>
33
34#include <asm/mach-types.h>
35#include <asm/mach/arch.h>
36#include <asm/mach/time.h>
37#include <asm/mach/map.h>
38
39#include "common.h"
40#include "devices-imx51.h"
41#include "hardware.h"
42#include "iomux-mx51.h"
43
44static iomux_v3_cfg_t eukrea_mbimxsd51_pads[] = {
45 /* LED */
46 MX51_PAD_NANDF_D10__GPIO3_30,
47 /* SWITCH */
48 NEW_PAD_CTRL(MX51_PAD_NANDF_D9__GPIO3_31, PAD_CTL_PUS_22K_UP |
49 PAD_CTL_PKE | PAD_CTL_SRE_FAST |
50 PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),
51 /* UART2 */
52 MX51_PAD_UART2_RXD__UART2_RXD,
53 MX51_PAD_UART2_TXD__UART2_TXD,
54 /* UART 3 */
55 MX51_PAD_UART3_RXD__UART3_RXD,
56 MX51_PAD_UART3_TXD__UART3_TXD,
57 MX51_PAD_KEY_COL4__UART3_RTS,
58 MX51_PAD_KEY_COL5__UART3_CTS,
59 /* SD */
60 MX51_PAD_SD1_CMD__SD1_CMD,
61 MX51_PAD_SD1_CLK__SD1_CLK,
62 MX51_PAD_SD1_DATA0__SD1_DATA0,
63 MX51_PAD_SD1_DATA1__SD1_DATA1,
64 MX51_PAD_SD1_DATA2__SD1_DATA2,
65 MX51_PAD_SD1_DATA3__SD1_DATA3,
66 /* SD1 CD */
67 NEW_PAD_CTRL(MX51_PAD_GPIO1_0__SD1_CD, PAD_CTL_PUS_22K_UP |
68 PAD_CTL_PKE | PAD_CTL_SRE_FAST |
69 PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),
70 /* SSI */
71 MX51_PAD_AUD3_BB_TXD__AUD3_TXD,
72 MX51_PAD_AUD3_BB_RXD__AUD3_RXD,
73 MX51_PAD_AUD3_BB_CK__AUD3_TXC,
74 MX51_PAD_AUD3_BB_FS__AUD3_TXFS,
75 /* LCD Backlight */
76 MX51_PAD_DI1_D1_CS__GPIO3_4,
77 /* LCD RST */
78 MX51_PAD_CSI1_D9__GPIO3_13,
79};
80
81#define GPIO_LED1 IMX_GPIO_NR(3, 30)
82#define GPIO_SWITCH1 IMX_GPIO_NR(3, 31)
83#define GPIO_LCDRST IMX_GPIO_NR(3, 13)
84#define GPIO_LCDBL IMX_GPIO_NR(3, 4)
85
86static void eukrea_mbimxsd51_lcd_power_set(struct plat_lcd_data *pd,
87 unsigned int power)
88{
89 if (power)
90 gpio_direction_output(GPIO_LCDRST, 1);
91 else
92 gpio_direction_output(GPIO_LCDRST, 0);
93}
94
95static struct plat_lcd_data eukrea_mbimxsd51_lcd_power_data = {
96 .set_power = eukrea_mbimxsd51_lcd_power_set,
97};
98
99static struct platform_device eukrea_mbimxsd51_lcd_powerdev = {
100 .name = "platform-lcd",
101 .dev.platform_data = &eukrea_mbimxsd51_lcd_power_data,
102};
103
104static void eukrea_mbimxsd51_bl_set_intensity(int intensity)
105{
106 if (intensity)
107 gpio_direction_output(GPIO_LCDBL, 1);
108 else
109 gpio_direction_output(GPIO_LCDBL, 0);
110}
111
112static struct generic_bl_info eukrea_mbimxsd51_bl_info = {
113 .name = "eukrea_mbimxsd51-bl",
114 .max_intensity = 0xff,
115 .default_intensity = 0xff,
116 .set_bl_intensity = eukrea_mbimxsd51_bl_set_intensity,
117};
118
119static struct platform_device eukrea_mbimxsd51_bl_dev = {
120 .name = "generic-bl",
121 .id = 1,
122 .dev = {
123 .platform_data = &eukrea_mbimxsd51_bl_info,
124 },
125};
126
127static const struct gpio_led eukrea_mbimxsd51_leds[] __initconst = {
128 {
129 .name = "led1",
130 .default_trigger = "heartbeat",
131 .active_low = 1,
132 .gpio = GPIO_LED1,
133 },
134};
135
136static const struct gpio_led_platform_data
137 eukrea_mbimxsd51_led_info __initconst = {
138 .leds = eukrea_mbimxsd51_leds,
139 .num_leds = ARRAY_SIZE(eukrea_mbimxsd51_leds),
140};
141
142static struct gpio_keys_button eukrea_mbimxsd51_gpio_buttons[] = {
143 {
144 .gpio = GPIO_SWITCH1,
145 .code = BTN_0,
146 .desc = "BP1",
147 .active_low = 1,
148 .wakeup = 1,
149 },
150};
151
152static const struct gpio_keys_platform_data
153 eukrea_mbimxsd51_button_data __initconst = {
154 .buttons = eukrea_mbimxsd51_gpio_buttons,
155 .nbuttons = ARRAY_SIZE(eukrea_mbimxsd51_gpio_buttons),
156};
157
158static const struct imxuart_platform_data uart_pdata __initconst = {
159 .flags = IMXUART_HAVE_RTSCTS,
160};
161
162static struct i2c_board_info eukrea_mbimxsd51_i2c_devices[] = {
163 {
164 I2C_BOARD_INFO("tlv320aic23", 0x1a),
165 },
166};
167
168static const
169struct imx_ssi_platform_data eukrea_mbimxsd51_ssi_pdata __initconst = {
170 .flags = IMX_SSI_SYN | IMX_SSI_NET | IMX_SSI_USE_I2S_SLAVE,
171};
172
173static int screen_type;
174
175static int __init eukrea_mbimxsd51_screen_type(char *options)
176{
177 if (!strcmp(options, "dvi"))
178 screen_type = 1;
179 else if (!strcmp(options, "tft"))
180 screen_type = 0;
181
182 return 0;
183}
184__setup("screen_type=", eukrea_mbimxsd51_screen_type);
185
186/*
187 * system init for baseboard usage. Will be called by cpuimx51sd init.
188 *
189 * Add platform devices present on this baseboard and init
190 * them from CPU side as far as required to use them later on
191 */
192void __init eukrea_mbimxsd51_baseboard_init(void)
193{
194 if (mxc_iomux_v3_setup_multiple_pads(eukrea_mbimxsd51_pads,
195 ARRAY_SIZE(eukrea_mbimxsd51_pads)))
196 printk(KERN_ERR "error setting mbimxsd pads !\n");
197
198 imx51_add_imx_uart(1, NULL);
199 imx51_add_imx_uart(2, &uart_pdata);
200
201 imx51_add_sdhci_esdhc_imx(0, NULL);
202
203 imx51_add_imx_ssi(0, &eukrea_mbimxsd51_ssi_pdata);
204
205 gpio_request(GPIO_LED1, "LED1");
206 gpio_direction_output(GPIO_LED1, 1);
207 gpio_free(GPIO_LED1);
208
209 gpio_request(GPIO_SWITCH1, "SWITCH1");
210 gpio_direction_input(GPIO_SWITCH1);
211 gpio_free(GPIO_SWITCH1);
212
213 gpio_request(GPIO_LCDRST, "LCDRST");
214 gpio_direction_output(GPIO_LCDRST, 0);
215 gpio_request(GPIO_LCDBL, "LCDBL");
216 gpio_direction_output(GPIO_LCDBL, 0);
217 if (!screen_type) {
218 platform_device_register(&eukrea_mbimxsd51_bl_dev);
219 platform_device_register(&eukrea_mbimxsd51_lcd_powerdev);
220 } else {
221 gpio_free(GPIO_LCDRST);
222 gpio_free(GPIO_LCDBL);
223 }
224
225 i2c_register_board_info(0, eukrea_mbimxsd51_i2c_devices,
226 ARRAY_SIZE(eukrea_mbimxsd51_i2c_devices));
227
228 gpio_led_register_device(-1, &eukrea_mbimxsd51_led_info);
229 imx_add_gpio_keys(&eukrea_mbimxsd51_button_data);
230 imx_add_platform_device("eukrea_tlv320", 0, NULL, 0, NULL, 0);
231}
diff --git a/arch/arm/mach-imx/imx25-dt.c b/arch/arm/mach-imx/imx25-dt.c
index 3e1ec5ffe630..42a65e067443 100644
--- a/arch/arm/mach-imx/imx25-dt.c
+++ b/arch/arm/mach-imx/imx25-dt.c
@@ -38,7 +38,6 @@ DT_MACHINE_START(IMX25_DT, "Freescale i.MX25 (Device Tree Support)")
38 .map_io = mx25_map_io, 38 .map_io = mx25_map_io,
39 .init_early = imx25_init_early, 39 .init_early = imx25_init_early,
40 .init_irq = mx25_init_irq, 40 .init_irq = mx25_init_irq,
41 .handle_irq = imx25_handle_irq,
42 .init_time = imx25_timer_init, 41 .init_time = imx25_timer_init,
43 .init_machine = imx25_dt_init, 42 .init_machine = imx25_dt_init,
44 .dt_compat = imx25_dt_board_compat, 43 .dt_compat = imx25_dt_board_compat,
diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
index 4e235ecb4021..17bd4058133d 100644
--- a/arch/arm/mach-imx/imx27-dt.c
+++ b/arch/arm/mach-imx/imx27-dt.c
@@ -43,7 +43,6 @@ DT_MACHINE_START(IMX27_DT, "Freescale i.MX27 (Device Tree Support)")
43 .map_io = mx27_map_io, 43 .map_io = mx27_map_io,
44 .init_early = imx27_init_early, 44 .init_early = imx27_init_early,
45 .init_irq = mx27_init_irq, 45 .init_irq = mx27_init_irq,
46 .handle_irq = imx27_handle_irq,
47 .init_time = imx27_timer_init, 46 .init_time = imx27_timer_init,
48 .init_machine = imx27_dt_init, 47 .init_machine = imx27_dt_init,
49 .dt_compat = imx27_dt_board_compat, 48 .dt_compat = imx27_dt_board_compat,
diff --git a/arch/arm/mach-imx/imx31-dt.c b/arch/arm/mach-imx/imx31-dt.c
index e1e70ef7bc2d..581f4d6c9b8a 100644
--- a/arch/arm/mach-imx/imx31-dt.c
+++ b/arch/arm/mach-imx/imx31-dt.c
@@ -39,7 +39,6 @@ DT_MACHINE_START(IMX31_DT, "Freescale i.MX31 (Device Tree Support)")
39 .map_io = mx31_map_io, 39 .map_io = mx31_map_io,
40 .init_early = imx31_init_early, 40 .init_early = imx31_init_early,
41 .init_irq = mx31_init_irq, 41 .init_irq = mx31_init_irq,
42 .handle_irq = imx31_handle_irq,
43 .init_time = imx31_dt_timer_init, 42 .init_time = imx31_dt_timer_init,
44 .init_machine = imx31_dt_init, 43 .init_machine = imx31_dt_init,
45 .dt_compat = imx31_dt_board_compat, 44 .dt_compat = imx31_dt_board_compat,
diff --git a/arch/arm/mach-imx/imx35-dt.c b/arch/arm/mach-imx/imx35-dt.c
index 9d48e0065a63..a62854c59240 100644
--- a/arch/arm/mach-imx/imx35-dt.c
+++ b/arch/arm/mach-imx/imx35-dt.c
@@ -43,7 +43,6 @@ DT_MACHINE_START(IMX35_DT, "Freescale i.MX35 (Device Tree Support)")
43 .map_io = mx35_map_io, 43 .map_io = mx35_map_io,
44 .init_early = imx35_init_early, 44 .init_early = imx35_init_early,
45 .init_irq = imx35_irq_init, 45 .init_irq = imx35_irq_init,
46 .handle_irq = imx35_handle_irq,
47 .init_machine = imx35_dt_init, 46 .init_machine = imx35_dt_init,
48 .dt_compat = imx35_dt_board_compat, 47 .dt_compat = imx35_dt_board_compat,
49 .restart = mxc_restart, 48 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c
index 0230d78d1413..b8cd968faa52 100644
--- a/arch/arm/mach-imx/imx51-dt.c
+++ b/arch/arm/mach-imx/imx51-dt.c
@@ -38,7 +38,6 @@ DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)")
38 .map_io = mx51_map_io, 38 .map_io = mx51_map_io,
39 .init_early = imx51_init_early, 39 .init_early = imx51_init_early,
40 .init_irq = mx51_init_irq, 40 .init_irq = mx51_init_irq,
41 .handle_irq = imx51_handle_irq,
42 .init_machine = imx51_dt_init, 41 .init_machine = imx51_dt_init,
43 .init_late = imx51_init_late, 42 .init_late = imx51_init_late,
44 .dt_compat = imx51_dt_board_compat, 43 .dt_compat = imx51_dt_board_compat,
diff --git a/arch/arm/mach-imx/mach-apf9328.c b/arch/arm/mach-imx/mach-apf9328.c
index 067580b2969b..ebbb5ab63529 100644
--- a/arch/arm/mach-imx/mach-apf9328.c
+++ b/arch/arm/mach-imx/mach-apf9328.c
@@ -142,7 +142,6 @@ MACHINE_START(APF9328, "Armadeus APF9328")
142 .map_io = mx1_map_io, 142 .map_io = mx1_map_io,
143 .init_early = imx1_init_early, 143 .init_early = imx1_init_early,
144 .init_irq = mx1_init_irq, 144 .init_irq = mx1_init_irq,
145 .handle_irq = imx1_handle_irq,
146 .init_time = apf9328_timer_init, 145 .init_time = apf9328_timer_init,
147 .init_machine = apf9328_init, 146 .init_machine = apf9328_init,
148 .restart = mxc_restart, 147 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c
index 58b864a3fc20..39406b7e3228 100644
--- a/arch/arm/mach-imx/mach-armadillo5x0.c
+++ b/arch/arm/mach-imx/mach-armadillo5x0.c
@@ -562,7 +562,6 @@ MACHINE_START(ARMADILLO5X0, "Armadillo-500")
562 .map_io = mx31_map_io, 562 .map_io = mx31_map_io,
563 .init_early = imx31_init_early, 563 .init_early = imx31_init_early,
564 .init_irq = mx31_init_irq, 564 .init_irq = mx31_init_irq,
565 .handle_irq = imx31_handle_irq,
566 .init_time = armadillo5x0_timer_init, 565 .init_time = armadillo5x0_timer_init,
567 .init_machine = armadillo5x0_init, 566 .init_machine = armadillo5x0_init,
568 .restart = mxc_restart, 567 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-bug.c b/arch/arm/mach-imx/mach-bug.c
index 2d00476f7d2c..c97d7cb39135 100644
--- a/arch/arm/mach-imx/mach-bug.c
+++ b/arch/arm/mach-imx/mach-bug.c
@@ -57,7 +57,6 @@ MACHINE_START(BUG, "BugLabs BUGBase")
57 .map_io = mx31_map_io, 57 .map_io = mx31_map_io,
58 .init_early = imx31_init_early, 58 .init_early = imx31_init_early,
59 .init_irq = mx31_init_irq, 59 .init_irq = mx31_init_irq,
60 .handle_irq = imx31_handle_irq,
61 .init_time = bug_timer_init, 60 .init_time = bug_timer_init,
62 .init_machine = bug_board_init, 61 .init_machine = bug_board_init,
63 .restart = mxc_restart, 62 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c
index ea50870bda80..75b7b6aa2720 100644
--- a/arch/arm/mach-imx/mach-cpuimx27.c
+++ b/arch/arm/mach-imx/mach-cpuimx27.c
@@ -314,7 +314,6 @@ MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27")
314 .map_io = mx27_map_io, 314 .map_io = mx27_map_io,
315 .init_early = imx27_init_early, 315 .init_early = imx27_init_early,
316 .init_irq = mx27_init_irq, 316 .init_irq = mx27_init_irq,
317 .handle_irq = imx27_handle_irq,
318 .init_time = eukrea_cpuimx27_timer_init, 317 .init_time = eukrea_cpuimx27_timer_init,
319 .init_machine = eukrea_cpuimx27_init, 318 .init_machine = eukrea_cpuimx27_init,
320 .restart = mxc_restart, 319 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c
index 65e4c53e1554..1ffa27169045 100644
--- a/arch/arm/mach-imx/mach-cpuimx35.c
+++ b/arch/arm/mach-imx/mach-cpuimx35.c
@@ -199,7 +199,6 @@ MACHINE_START(EUKREA_CPUIMX35SD, "Eukrea CPUIMX35")
199 .map_io = mx35_map_io, 199 .map_io = mx35_map_io,
200 .init_early = imx35_init_early, 200 .init_early = imx35_init_early,
201 .init_irq = mx35_init_irq, 201 .init_irq = mx35_init_irq,
202 .handle_irq = imx35_handle_irq,
203 .init_time = eukrea_cpuimx35_timer_init, 202 .init_time = eukrea_cpuimx35_timer_init,
204 .init_machine = eukrea_cpuimx35_init, 203 .init_machine = eukrea_cpuimx35_init,
205 .restart = mxc_restart, 204 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-cpuimx51sd.c b/arch/arm/mach-imx/mach-cpuimx51sd.c
deleted file mode 100644
index 1fba2b8e983f..000000000000
--- a/arch/arm/mach-imx/mach-cpuimx51sd.c
+++ /dev/null
@@ -1,364 +0,0 @@
1/*
2 *
3 * Copyright (C) 2010 Eric Bénard <eric@eukrea.com>
4 *
5 * based on board-mx51_babbage.c which is
6 * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved.
7 * Copyright (C) 2009-2010 Amit Kucheria <amit.kucheria@canonical.com>
8 *
9 * The code contained herein is licensed under the GNU General Public
10 * License. You may obtain a copy of the GNU General Public License
11 * Version 2 or later at the following locations:
12 *
13 * http://www.opensource.org/licenses/gpl-license.html
14 * http://www.gnu.org/copyleft/gpl.html
15 */
16
17#include <linux/init.h>
18#include <linux/platform_device.h>
19#include <linux/i2c.h>
20#include <linux/i2c/tsc2007.h>
21#include <linux/gpio.h>
22#include <linux/delay.h>
23#include <linux/io.h>
24#include <linux/interrupt.h>
25#include <linux/i2c-gpio.h>
26#include <linux/spi/spi.h>
27#include <linux/can/platform/mcp251x.h>
28
29#include <asm/setup.h>
30#include <asm/mach-types.h>
31#include <asm/mach/arch.h>
32#include <asm/mach/time.h>
33
34#include "common.h"
35#include "devices-imx51.h"
36#include "eukrea-baseboards.h"
37#include "hardware.h"
38#include "iomux-mx51.h"
39
40#define USBH1_RST IMX_GPIO_NR(2, 28)
41#define ETH_RST IMX_GPIO_NR(2, 31)
42#define TSC2007_IRQGPIO_REV2 IMX_GPIO_NR(3, 12)
43#define TSC2007_IRQGPIO_REV3 IMX_GPIO_NR(4, 0)
44#define CAN_IRQGPIO IMX_GPIO_NR(1, 1)
45#define CAN_RST IMX_GPIO_NR(4, 15)
46#define CAN_NCS IMX_GPIO_NR(4, 24)
47#define CAN_RXOBF_REV2 IMX_GPIO_NR(1, 4)
48#define CAN_RXOBF_REV3 IMX_GPIO_NR(3, 12)
49#define CAN_RX1BF IMX_GPIO_NR(1, 6)
50#define CAN_TXORTS IMX_GPIO_NR(1, 7)
51#define CAN_TX1RTS IMX_GPIO_NR(1, 8)
52#define CAN_TX2RTS IMX_GPIO_NR(1, 9)
53#define I2C_SCL IMX_GPIO_NR(4, 16)
54#define I2C_SDA IMX_GPIO_NR(4, 17)
55
56/* USB_CTRL_1 */
57#define MX51_USB_CTRL_1_OFFSET 0x10
58#define MX51_USB_CTRL_UH1_EXT_CLK_EN (1 << 25)
59
60#define MX51_USB_PLLDIV_12_MHZ 0x00
61#define MX51_USB_PLL_DIV_19_2_MHZ 0x01
62#define MX51_USB_PLL_DIV_24_MHZ 0x02
63
64static iomux_v3_cfg_t eukrea_cpuimx51sd_pads[] = {
65 /* UART1 */
66 MX51_PAD_UART1_RXD__UART1_RXD,
67 MX51_PAD_UART1_TXD__UART1_TXD,
68 MX51_PAD_UART1_RTS__UART1_RTS,
69 MX51_PAD_UART1_CTS__UART1_CTS,
70
71 /* USB HOST1 */
72 MX51_PAD_USBH1_CLK__USBH1_CLK,
73 MX51_PAD_USBH1_DIR__USBH1_DIR,
74 MX51_PAD_USBH1_NXT__USBH1_NXT,
75 MX51_PAD_USBH1_DATA0__USBH1_DATA0,
76 MX51_PAD_USBH1_DATA1__USBH1_DATA1,
77 MX51_PAD_USBH1_DATA2__USBH1_DATA2,
78 MX51_PAD_USBH1_DATA3__USBH1_DATA3,
79 MX51_PAD_USBH1_DATA4__USBH1_DATA4,
80 MX51_PAD_USBH1_DATA5__USBH1_DATA5,
81 MX51_PAD_USBH1_DATA6__USBH1_DATA6,
82 MX51_PAD_USBH1_DATA7__USBH1_DATA7,
83 MX51_PAD_USBH1_STP__USBH1_STP,
84 MX51_PAD_EIM_CS3__GPIO2_28, /* PHY nRESET */
85
86 /* FEC */
87 MX51_PAD_EIM_DTACK__GPIO2_31, /* PHY nRESET */
88
89 /* HSI2C */
90 MX51_PAD_I2C1_CLK__GPIO4_16,
91 MX51_PAD_I2C1_DAT__GPIO4_17,
92
93 /* I2C1 */
94 MX51_PAD_SD2_CMD__I2C1_SCL,
95 MX51_PAD_SD2_CLK__I2C1_SDA,
96
97 /* CAN */
98 MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI,
99 MX51_PAD_CSPI1_MISO__ECSPI1_MISO,
100 MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK,
101 MX51_PAD_CSPI1_SS0__GPIO4_24, /* nCS */
102 MX51_PAD_CSI2_PIXCLK__GPIO4_15, /* nReset */
103 MX51_PAD_GPIO1_1__GPIO1_1, /* IRQ */
104 MX51_PAD_GPIO1_4__GPIO1_4, /* Control signals */
105 MX51_PAD_GPIO1_6__GPIO1_6,
106 MX51_PAD_GPIO1_7__GPIO1_7,
107 MX51_PAD_GPIO1_8__GPIO1_8,
108 MX51_PAD_GPIO1_9__GPIO1_9,
109
110 /* Touchscreen */
111 /* IRQ */
112 NEW_PAD_CTRL(MX51_PAD_GPIO_NAND__GPIO_NAND, PAD_CTL_PUS_22K_UP |
113 PAD_CTL_PKE | PAD_CTL_SRE_FAST |
114 PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),
115 NEW_PAD_CTRL(MX51_PAD_NANDF_D8__GPIO4_0, PAD_CTL_PUS_22K_UP |
116 PAD_CTL_PKE | PAD_CTL_SRE_FAST |
117 PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),
118};
119
120static const struct imxuart_platform_data uart_pdata __initconst = {
121 .flags = IMXUART_HAVE_RTSCTS,
122};
123
124static int tsc2007_get_pendown_state(struct device *dev)
125{
126 if (mx51_revision() < IMX_CHIP_REVISION_3_0)
127 return !gpio_get_value(TSC2007_IRQGPIO_REV2);
128 else
129 return !gpio_get_value(TSC2007_IRQGPIO_REV3);
130}
131
132static struct tsc2007_platform_data tsc2007_info = {
133 .model = 2007,
134 .x_plate_ohms = 180,
135 .get_pendown_state = tsc2007_get_pendown_state,
136};
137
138static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = {
139 {
140 I2C_BOARD_INFO("pcf8563", 0x51),
141 }, {
142 I2C_BOARD_INFO("tsc2007", 0x49),
143 .platform_data = &tsc2007_info,
144 },
145};
146
147static const struct mxc_nand_platform_data
148 eukrea_cpuimx51sd_nand_board_info __initconst = {
149 .width = 1,
150 .hw_ecc = 1,
151 .flash_bbt = 1,
152};
153
154/* This function is board specific as the bit mask for the plldiv will also
155be different for other Freescale SoCs, thus a common bitmask is not
156possible and cannot get place in /plat-mxc/ehci.c.*/
157static int initialize_otg_port(struct platform_device *pdev)
158{
159 u32 v;
160 void __iomem *usb_base;
161 void __iomem *usbother_base;
162
163 usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
164 if (!usb_base)
165 return -ENOMEM;
166 usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
167
168 /* Set the PHY clock to 19.2MHz */
169 v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
170 v &= ~MX5_USB_UTMI_PHYCTRL1_PLLDIV_MASK;
171 v |= MX51_USB_PLL_DIV_19_2_MHZ;
172 __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
173 iounmap(usb_base);
174
175 mdelay(10);
176
177 return mx51_initialize_usb_hw(0, MXC_EHCI_INTERNAL_PHY);
178}
179
180static int initialize_usbh1_port(struct platform_device *pdev)
181{
182 u32 v;
183 void __iomem *usb_base;
184 void __iomem *usbother_base;
185
186 usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
187 if (!usb_base)
188 return -ENOMEM;
189 usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
190
191 /* The clock for the USBH1 ULPI port will come from the PHY. */
192 v = __raw_readl(usbother_base + MX51_USB_CTRL_1_OFFSET);
193 __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN,
194 usbother_base + MX51_USB_CTRL_1_OFFSET);
195 iounmap(usb_base);
196
197 mdelay(10);
198
199 return mx51_initialize_usb_hw(1, MXC_EHCI_POWER_PINS_ENABLED |
200 MXC_EHCI_ITC_NO_THRESHOLD);
201}
202
203static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
204 .init = initialize_otg_port,
205 .portsc = MXC_EHCI_UTMI_16BIT,
206};
207
208static const struct fsl_usb2_platform_data usb_pdata __initconst = {
209 .operating_mode = FSL_USB2_DR_DEVICE,
210 .phy_mode = FSL_USB2_PHY_UTMI_WIDE,
211};
212
213static const struct mxc_usbh_platform_data usbh1_config __initconst = {
214 .init = initialize_usbh1_port,
215 .portsc = MXC_EHCI_MODE_ULPI,
216};
217
218static bool otg_mode_host __initdata;
219
220static int __init eukrea_cpuimx51sd_otg_mode(char *options)
221{
222 if (!strcmp(options, "host"))
223 otg_mode_host = true;
224 else if (!strcmp(options, "device"))
225 otg_mode_host = false;
226 else
227 pr_info("otg_mode neither \"host\" nor \"device\". "
228 "Defaulting to device\n");
229 return 1;
230}
231__setup("otg_mode=", eukrea_cpuimx51sd_otg_mode);
232
233static struct i2c_gpio_platform_data pdata = {
234 .sda_pin = I2C_SDA,
235 .sda_is_open_drain = 0,
236 .scl_pin = I2C_SCL,
237 .scl_is_open_drain = 0,
238 .udelay = 2,
239};
240
241static struct platform_device hsi2c_gpio_device = {
242 .name = "i2c-gpio",
243 .id = 0,
244 .dev.platform_data = &pdata,
245};
246
247static struct mcp251x_platform_data mcp251x_info = {
248 .oscillator_frequency = 24E6,
249};
250
251static struct spi_board_info cpuimx51sd_spi_device[] = {
252 {
253 .modalias = "mcp2515",
254 .max_speed_hz = 10000000,
255 .bus_num = 0,
256 .mode = SPI_MODE_0,
257 .chip_select = 0,
258 .platform_data = &mcp251x_info,
259 /* irq number is run-time assigned */
260 },
261};
262
263static int cpuimx51sd_spi1_cs[] = {
264 CAN_NCS,
265};
266
267static const struct spi_imx_master cpuimx51sd_ecspi1_pdata __initconst = {
268 .chipselect = cpuimx51sd_spi1_cs,
269 .num_chipselect = ARRAY_SIZE(cpuimx51sd_spi1_cs),
270};
271
272static struct platform_device *rev2_platform_devices[] __initdata = {
273 &hsi2c_gpio_device,
274};
275
276static const struct imxi2c_platform_data cpuimx51sd_i2c_data __initconst = {
277 .bitrate = 100000,
278};
279
280static void __init eukrea_cpuimx51sd_init(void)
281{
282 imx51_soc_init();
283
284 mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx51sd_pads,
285 ARRAY_SIZE(eukrea_cpuimx51sd_pads));
286
287 imx51_add_imx_uart(0, &uart_pdata);
288 imx51_add_mxc_nand(&eukrea_cpuimx51sd_nand_board_info);
289 imx51_add_imx2_wdt(0);
290
291 gpio_request(ETH_RST, "eth_rst");
292 gpio_set_value(ETH_RST, 1);
293 imx51_add_fec(NULL);
294
295 gpio_request(CAN_IRQGPIO, "can_irq");
296 gpio_direction_input(CAN_IRQGPIO);
297 gpio_free(CAN_IRQGPIO);
298 gpio_request(CAN_NCS, "can_ncs");
299 gpio_direction_output(CAN_NCS, 1);
300 gpio_free(CAN_NCS);
301 gpio_request(CAN_RST, "can_rst");
302 gpio_direction_output(CAN_RST, 0);
303 msleep(20);
304 gpio_set_value(CAN_RST, 1);
305 imx51_add_ecspi(0, &cpuimx51sd_ecspi1_pdata);
306 cpuimx51sd_spi_device[0].irq = gpio_to_irq(CAN_IRQGPIO);
307 spi_register_board_info(cpuimx51sd_spi_device,
308 ARRAY_SIZE(cpuimx51sd_spi_device));
309
310 if (mx51_revision() < IMX_CHIP_REVISION_3_0) {
311 eukrea_cpuimx51sd_i2c_devices[1].irq =
312 gpio_to_irq(TSC2007_IRQGPIO_REV2),
313 platform_add_devices(rev2_platform_devices,
314 ARRAY_SIZE(rev2_platform_devices));
315 gpio_request(TSC2007_IRQGPIO_REV2, "tsc2007_irq");
316 gpio_direction_input(TSC2007_IRQGPIO_REV2);
317 gpio_free(TSC2007_IRQGPIO_REV2);
318 } else {
319 eukrea_cpuimx51sd_i2c_devices[1].irq =
320 gpio_to_irq(TSC2007_IRQGPIO_REV3),
321 imx51_add_imx_i2c(0, &cpuimx51sd_i2c_data);
322 gpio_request(TSC2007_IRQGPIO_REV3, "tsc2007_irq");
323 gpio_direction_input(TSC2007_IRQGPIO_REV3);
324 gpio_free(TSC2007_IRQGPIO_REV3);
325 }
326
327 i2c_register_board_info(0, eukrea_cpuimx51sd_i2c_devices,
328 ARRAY_SIZE(eukrea_cpuimx51sd_i2c_devices));
329
330 if (otg_mode_host)
331 imx51_add_mxc_ehci_otg(&dr_utmi_config);
332 else {
333 initialize_otg_port(NULL);
334 imx51_add_fsl_usb2_udc(&usb_pdata);
335 }
336
337 gpio_request(USBH1_RST, "usb_rst");
338 gpio_direction_output(USBH1_RST, 0);
339 msleep(20);
340 gpio_set_value(USBH1_RST, 1);
341 imx51_add_mxc_ehci_hs(1, &usbh1_config);
342
343#ifdef CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD
344 eukrea_mbimxsd51_baseboard_init();
345#endif
346}
347
348static void __init eukrea_cpuimx51sd_timer_init(void)
349{
350 mx51_clocks_init(32768, 24000000, 22579200, 0);
351}
352
353MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD")
354 /* Maintainer: Eric Bénard <eric@eukrea.com> */
355 .atag_offset = 0x100,
356 .map_io = mx51_map_io,
357 .init_early = imx51_init_early,
358 .init_irq = mx51_init_irq,
359 .handle_irq = imx51_handle_irq,
360 .init_time = eukrea_cpuimx51sd_timer_init,
361 .init_machine = eukrea_cpuimx51sd_init,
362 .init_late = imx51_init_late,
363 .restart = mxc_restart,
364MACHINE_END
diff --git a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
index 4bf454424249..e978dda1434c 100644
--- a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
+++ b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
@@ -165,7 +165,6 @@ MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25")
165 .map_io = mx25_map_io, 165 .map_io = mx25_map_io,
166 .init_early = imx25_init_early, 166 .init_early = imx25_init_early,
167 .init_irq = mx25_init_irq, 167 .init_irq = mx25_init_irq,
168 .handle_irq = imx25_handle_irq,
169 .init_time = eukrea_cpuimx25_timer_init, 168 .init_time = eukrea_cpuimx25_timer_init,
170 .init_machine = eukrea_cpuimx25_init, 169 .init_machine = eukrea_cpuimx25_init,
171 .restart = mxc_restart, 170 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
index 97f9c6297fcf..b61bd8ed5568 100644
--- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
+++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
@@ -604,7 +604,6 @@ MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10")
604 .map_io = mx27_map_io, 604 .map_io = mx27_map_io,
605 .init_early = imx27_init_early, 605 .init_early = imx27_init_early,
606 .init_irq = mx27_init_irq, 606 .init_irq = mx27_init_irq,
607 .handle_irq = imx27_handle_irq,
608 .init_time = visstrim_m10_timer_init, 607 .init_time = visstrim_m10_timer_init,
609 .init_machine = visstrim_m10_board_init, 608 .init_machine = visstrim_m10_board_init,
610 .restart = mxc_restart, 609 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-imx27ipcam.c b/arch/arm/mach-imx/mach-imx27ipcam.c
index 1a851aea6832..bb3ca0429680 100644
--- a/arch/arm/mach-imx/mach-imx27ipcam.c
+++ b/arch/arm/mach-imx/mach-imx27ipcam.c
@@ -71,7 +71,6 @@ MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM")
71 .map_io = mx27_map_io, 71 .map_io = mx27_map_io,
72 .init_early = imx27_init_early, 72 .init_early = imx27_init_early,
73 .init_irq = mx27_init_irq, 73 .init_irq = mx27_init_irq,
74 .handle_irq = imx27_handle_irq,
75 .init_time = mx27ipcam_timer_init, 74 .init_time = mx27ipcam_timer_init,
76 .init_machine = mx27ipcam_init, 75 .init_machine = mx27ipcam_init,
77 .restart = mxc_restart, 76 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-imx27lite.c b/arch/arm/mach-imx/mach-imx27lite.c
index 3da2e3e44ce9..9992089d3ad1 100644
--- a/arch/arm/mach-imx/mach-imx27lite.c
+++ b/arch/arm/mach-imx/mach-imx27lite.c
@@ -77,7 +77,6 @@ MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE")
77 .map_io = mx27_map_io, 77 .map_io = mx27_map_io,
78 .init_early = imx27_init_early, 78 .init_early = imx27_init_early,
79 .init_irq = mx27_init_irq, 79 .init_irq = mx27_init_irq,
80 .handle_irq = imx27_handle_irq,
81 .init_time = mx27lite_timer_init, 80 .init_time = mx27lite_timer_init,
82 .init_machine = mx27lite_init, 81 .init_machine = mx27lite_init,
83 .restart = mxc_restart, 82 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-imx50.c b/arch/arm/mach-imx/mach-imx50.c
index 77b77a92bb5d..b899c0b59afd 100644
--- a/arch/arm/mach-imx/mach-imx50.c
+++ b/arch/arm/mach-imx/mach-imx50.c
@@ -31,7 +31,6 @@ static const char *imx50_dt_board_compat[] __initconst = {
31DT_MACHINE_START(IMX50_DT, "Freescale i.MX50 (Device Tree Support)") 31DT_MACHINE_START(IMX50_DT, "Freescale i.MX50 (Device Tree Support)")
32 .map_io = mx53_map_io, 32 .map_io = mx53_map_io,
33 .init_irq = mx53_init_irq, 33 .init_irq = mx53_init_irq,
34 .handle_irq = imx50_handle_irq,
35 .init_machine = imx50_dt_init, 34 .init_machine = imx50_dt_init,
36 .dt_compat = imx50_dt_board_compat, 35 .dt_compat = imx50_dt_board_compat,
37 .restart = mxc_restart, 36 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c
index 65850908a4b4..2bad387956c0 100644
--- a/arch/arm/mach-imx/mach-imx53.c
+++ b/arch/arm/mach-imx/mach-imx53.c
@@ -40,7 +40,6 @@ DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)")
40 .map_io = mx53_map_io, 40 .map_io = mx53_map_io,
41 .init_early = imx53_init_early, 41 .init_early = imx53_init_early,
42 .init_irq = mx53_init_irq, 42 .init_irq = mx53_init_irq,
43 .handle_irq = imx53_handle_irq,
44 .init_machine = imx53_dt_init, 43 .init_machine = imx53_dt_init,
45 .init_late = imx53_init_late, 44 .init_late = imx53_init_late,
46 .dt_compat = imx53_dt_board_compat, 45 .dt_compat = imx53_dt_board_compat,
diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c
new file mode 100644
index 000000000000..02fccf6033ac
--- /dev/null
+++ b/arch/arm/mach-imx/mach-imx6sx.c
@@ -0,0 +1,51 @@
1/*
2 * Copyright 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#include <linux/irqchip.h>
10#include <linux/of_platform.h>
11#include <asm/mach/arch.h>
12#include <asm/mach/map.h>
13
14#include "common.h"
15
16static void __init imx6sx_init_machine(void)
17{
18 struct device *parent;
19
20 mxc_arch_reset_init_dt();
21
22 parent = imx_soc_device_init();
23 if (parent == NULL)
24 pr_warn("failed to initialize soc device\n");
25
26 of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);
27
28 imx_anatop_init();
29}
30
31static void __init imx6sx_init_irq(void)
32{
33 imx_init_revision_from_anatop();
34 imx_init_l2cache();
35 imx_src_init();
36 imx_gpc_init();
37 irqchip_init();
38}
39
40static const char *imx6sx_dt_compat[] __initconst = {
41 "fsl,imx6sx",
42 NULL,
43};
44
45DT_MACHINE_START(IMX6SX, "Freescale i.MX6 SoloX (Device Tree)")
46 .map_io = debug_ll_io_init,
47 .init_irq = imx6sx_init_irq,
48 .init_machine = imx6sx_init_machine,
49 .dt_compat = imx6sx_dt_compat,
50 .restart = mxc_restart,
51MACHINE_END
diff --git a/arch/arm/mach-imx/mach-kzm_arm11_01.c b/arch/arm/mach-imx/mach-kzm_arm11_01.c
index c7bc41d6b468..31df4361996f 100644
--- a/arch/arm/mach-imx/mach-kzm_arm11_01.c
+++ b/arch/arm/mach-imx/mach-kzm_arm11_01.c
@@ -289,7 +289,6 @@ MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01")
289 .map_io = kzm_map_io, 289 .map_io = kzm_map_io,
290 .init_early = imx31_init_early, 290 .init_early = imx31_init_early,
291 .init_irq = mx31_init_irq, 291 .init_irq = mx31_init_irq,
292 .handle_irq = imx31_handle_irq,
293 .init_time = kzm_timer_init, 292 .init_time = kzm_timer_init,
294 .init_machine = kzm_board_init, 293 .init_machine = kzm_board_init,
295 .restart = mxc_restart, 294 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c
index 9f883e4d6fc9..77fda3de4290 100644
--- a/arch/arm/mach-imx/mach-mx1ads.c
+++ b/arch/arm/mach-imx/mach-mx1ads.c
@@ -138,7 +138,6 @@ MACHINE_START(MX1ADS, "Freescale MX1ADS")
138 .map_io = mx1_map_io, 138 .map_io = mx1_map_io,
139 .init_early = imx1_init_early, 139 .init_early = imx1_init_early,
140 .init_irq = mx1_init_irq, 140 .init_irq = mx1_init_irq,
141 .handle_irq = imx1_handle_irq,
142 .init_time = mx1ads_timer_init, 141 .init_time = mx1ads_timer_init,
143 .init_machine = mx1ads_init, 142 .init_machine = mx1ads_init,
144 .restart = mxc_restart, 143 .restart = mxc_restart,
@@ -149,7 +148,6 @@ MACHINE_START(MXLADS, "Freescale MXLADS")
149 .map_io = mx1_map_io, 148 .map_io = mx1_map_io,
150 .init_early = imx1_init_early, 149 .init_early = imx1_init_early,
151 .init_irq = mx1_init_irq, 150 .init_irq = mx1_init_irq,
152 .handle_irq = imx1_handle_irq,
153 .init_time = mx1ads_timer_init, 151 .init_time = mx1ads_timer_init,
154 .init_machine = mx1ads_init, 152 .init_machine = mx1ads_init,
155 .restart = mxc_restart, 153 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c
index a06aa4dc37fc..703ce31d7379 100644
--- a/arch/arm/mach-imx/mach-mx21ads.c
+++ b/arch/arm/mach-imx/mach-mx21ads.c
@@ -17,51 +17,46 @@
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/mtd/mtd.h> 18#include <linux/mtd/mtd.h>
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/basic_mmio_gpio.h>
20#include <linux/gpio.h> 21#include <linux/gpio.h>
22#include <linux/regulator/fixed.h>
23#include <linux/regulator/machine.h>
21#include <asm/mach-types.h> 24#include <asm/mach-types.h>
22#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
23#include <asm/mach/time.h>
24#include <asm/mach/map.h>
25 26
26#include "common.h" 27#include "common.h"
27#include "devices-imx21.h" 28#include "devices-imx21.h"
28#include "hardware.h" 29#include "hardware.h"
29#include "iomux-mx21.h" 30#include "iomux-mx21.h"
30 31
31/* 32#define MX21ADS_CS8900A_REG (MX21_CS1_BASE_ADDR + 0x000000)
32 * Memory-mapped I/O on MX21ADS base board 33#define MX21ADS_ST16C255_IOBASE_REG (MX21_CS1_BASE_ADDR + 0x200000)
33 */ 34#define MX21ADS_VERSION_REG (MX21_CS1_BASE_ADDR + 0x400000)
34#define MX21ADS_MMIO_BASE_ADDR 0xf5000000 35#define MX21ADS_IO_REG (MX21_CS1_BASE_ADDR + 0x800000)
35#define MX21ADS_MMIO_SIZE 0xc00000
36
37#define MX21ADS_REG_ADDR(offset) (void __force __iomem *) \
38 (MX21ADS_MMIO_BASE_ADDR + (offset))
39 36
40#define MX21ADS_CS8900A_MMIO_SIZE 0x200000 37#define MX21ADS_MMC_CD IMX_GPIO_NR(4, 25)
41#define MX21ADS_CS8900A_IRQ_GPIO IMX_GPIO_NR(5, 11) 38#define MX21ADS_CS8900A_IRQ_GPIO IMX_GPIO_NR(5, 11)
42#define MX21ADS_ST16C255_IOBASE_REG MX21ADS_REG_ADDR(0x200000) 39#define MX21ADS_MMGPIO_BASE (6 * 32)
43#define MX21ADS_VERSION_REG MX21ADS_REG_ADDR(0x400000)
44#define MX21ADS_IO_REG MX21ADS_REG_ADDR(0x800000)
45 40
46/* MX21ADS_IO_REG bit definitions */ 41/* MX21ADS_IO_REG bit definitions */
47#define MX21ADS_IO_SD_WP 0x0001 /* read */ 42#define MX21ADS_IO_SD_WP (MX21ADS_MMGPIO_BASE + 0)
48#define MX21ADS_IO_TP6 0x0001 /* write */ 43#define MX21ADS_IO_TP6 (MX21ADS_IO_SD_WP)
49#define MX21ADS_IO_SW_SEL 0x0002 /* read */ 44#define MX21ADS_IO_SW_SEL (MX21ADS_MMGPIO_BASE + 1)
50#define MX21ADS_IO_TP7 0x0002 /* write */ 45#define MX21ADS_IO_TP7 (MX21ADS_IO_SW_SEL)
51#define MX21ADS_IO_RESET_E_UART 0x0004 46#define MX21ADS_IO_RESET_E_UART (MX21ADS_MMGPIO_BASE + 2)
52#define MX21ADS_IO_RESET_BASE 0x0008 47#define MX21ADS_IO_RESET_BASE (MX21ADS_MMGPIO_BASE + 3)
53#define MX21ADS_IO_CSI_CTL2 0x0010 48#define MX21ADS_IO_CSI_CTL2 (MX21ADS_MMGPIO_BASE + 4)
54#define MX21ADS_IO_CSI_CTL1 0x0020 49#define MX21ADS_IO_CSI_CTL1 (MX21ADS_MMGPIO_BASE + 5)
55#define MX21ADS_IO_CSI_CTL0 0x0040 50#define MX21ADS_IO_CSI_CTL0 (MX21ADS_MMGPIO_BASE + 6)
56#define MX21ADS_IO_UART1_EN 0x0080 51#define MX21ADS_IO_UART1_EN (MX21ADS_MMGPIO_BASE + 7)
57#define MX21ADS_IO_UART4_EN 0x0100 52#define MX21ADS_IO_UART4_EN (MX21ADS_MMGPIO_BASE + 8)
58#define MX21ADS_IO_LCDON 0x0200 53#define MX21ADS_IO_LCDON (MX21ADS_MMGPIO_BASE + 9)
59#define MX21ADS_IO_IRDA_EN 0x0400 54#define MX21ADS_IO_IRDA_EN (MX21ADS_MMGPIO_BASE + 10)
60#define MX21ADS_IO_IRDA_FIR_SEL 0x0800 55#define MX21ADS_IO_IRDA_FIR_SEL (MX21ADS_MMGPIO_BASE + 11)
61#define MX21ADS_IO_IRDA_MD0_B 0x1000 56#define MX21ADS_IO_IRDA_MD0_B (MX21ADS_MMGPIO_BASE + 12)
62#define MX21ADS_IO_IRDA_MD1 0x2000 57#define MX21ADS_IO_IRDA_MD1 (MX21ADS_MMGPIO_BASE + 13)
63#define MX21ADS_IO_LED4_ON 0x4000 58#define MX21ADS_IO_LED4_ON (MX21ADS_MMGPIO_BASE + 14)
64#define MX21ADS_IO_LED3_ON 0x8000 59#define MX21ADS_IO_LED3_ON (MX21ADS_MMGPIO_BASE + 15)
65 60
66static const int mx21ads_pins[] __initconst = { 61static const int mx21ads_pins[] __initconst = {
67 62
@@ -143,11 +138,8 @@ static struct physmap_flash_data mx21ads_flash_data = {
143 .width = 4, 138 .width = 4,
144}; 139};
145 140
146static struct resource mx21ads_flash_resource = { 141static struct resource mx21ads_flash_resource =
147 .start = MX21_CS0_BASE_ADDR, 142 DEFINE_RES_MEM(MX21_CS0_BASE_ADDR, SZ_32M);
148 .end = MX21_CS0_BASE_ADDR + 0x02000000 - 1,
149 .flags = IORESOURCE_MEM,
150};
151 143
152static struct platform_device mx21ads_nor_mtd_device = { 144static struct platform_device mx21ads_nor_mtd_device = {
153 .name = "physmap-flash", 145 .name = "physmap-flash",
@@ -160,7 +152,7 @@ static struct platform_device mx21ads_nor_mtd_device = {
160}; 152};
161 153
162static struct resource mx21ads_cs8900_resources[] __initdata = { 154static struct resource mx21ads_cs8900_resources[] __initdata = {
163 DEFINE_RES_MEM(MX21_CS1_BASE_ADDR, MX21ADS_CS8900A_MMIO_SIZE), 155 DEFINE_RES_MEM(MX21ADS_CS8900A_REG, SZ_1K),
164 /* irq number is run-time assigned */ 156 /* irq number is run-time assigned */
165 DEFINE_RES_IRQ(-1), 157 DEFINE_RES_IRQ(-1),
166}; 158};
@@ -179,24 +171,50 @@ static const struct imxuart_platform_data uart_pdata_rts __initconst = {
179static const struct imxuart_platform_data uart_pdata_norts __initconst = { 171static const struct imxuart_platform_data uart_pdata_norts __initconst = {
180}; 172};
181 173
182static int mx21ads_fb_init(struct platform_device *pdev) 174static struct resource mx21ads_mmgpio_resource =
183{ 175 DEFINE_RES_MEM_NAMED(MX21ADS_IO_REG, SZ_2, "dat");
184 u16 tmp;
185 176
186 tmp = __raw_readw(MX21ADS_IO_REG); 177static struct bgpio_pdata mx21ads_mmgpio_pdata = {
187 tmp |= MX21ADS_IO_LCDON; 178 .base = MX21ADS_MMGPIO_BASE,
188 __raw_writew(tmp, MX21ADS_IO_REG); 179 .ngpio = 16,
189 return 0; 180};
190}
191 181
192static void mx21ads_fb_exit(struct platform_device *pdev) 182static struct platform_device mx21ads_mmgpio = {
193{ 183 .name = "basic-mmio-gpio",
194 u16 tmp; 184 .id = PLATFORM_DEVID_AUTO,
185 .resource = &mx21ads_mmgpio_resource,
186 .num_resources = 1,
187 .dev = {
188 .platform_data = &mx21ads_mmgpio_pdata,
189 },
190};
195 191
196 tmp = __raw_readw(MX21ADS_IO_REG); 192static struct regulator_consumer_supply mx21ads_lcd_regulator_consumer =
197 tmp &= ~MX21ADS_IO_LCDON; 193 REGULATOR_SUPPLY("lcd", "imx-fb.0");
198 __raw_writew(tmp, MX21ADS_IO_REG); 194
199} 195static struct regulator_init_data mx21ads_lcd_regulator_init_data = {
196 .constraints = {
197 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
198 },
199 .consumer_supplies = &mx21ads_lcd_regulator_consumer,
200 .num_consumer_supplies = 1,
201};
202
203static struct fixed_voltage_config mx21ads_lcd_regulator_pdata = {
204 .supply_name = "LCD",
205 .microvolts = 3300000,
206 .gpio = MX21ADS_IO_LCDON,
207 .enable_high = 1,
208 .init_data = &mx21ads_lcd_regulator_init_data,
209};
210
211static struct platform_device mx21ads_lcd_regulator = {
212 .name = "reg-fixed-voltage",
213 .id = PLATFORM_DEVID_AUTO,
214 .dev = {
215 .platform_data = &mx21ads_lcd_regulator_pdata,
216 },
217};
200 218
201/* 219/*
202 * Connected is a portrait Sharp-QVGA display 220 * Connected is a portrait Sharp-QVGA display
@@ -229,26 +247,30 @@ static const struct imx_fb_platform_data mx21ads_fb_data __initconst = {
229 .pwmr = 0x00a903ff, 247 .pwmr = 0x00a903ff,
230 .lscr1 = 0x00120300, 248 .lscr1 = 0x00120300,
231 .dmacr = 0x00020008, 249 .dmacr = 0x00020008,
232
233 .init = mx21ads_fb_init,
234 .exit = mx21ads_fb_exit,
235}; 250};
236 251
237static int mx21ads_sdhc_get_ro(struct device *dev) 252static int mx21ads_sdhc_get_ro(struct device *dev)
238{ 253{
239 return (__raw_readw(MX21ADS_IO_REG) & MX21ADS_IO_SD_WP) ? 1 : 0; 254 return gpio_get_value(MX21ADS_IO_SD_WP);
240} 255}
241 256
242static int mx21ads_sdhc_init(struct device *dev, irq_handler_t detect_irq, 257static int mx21ads_sdhc_init(struct device *dev, irq_handler_t detect_irq,
243 void *data) 258 void *data)
244{ 259{
245 return request_irq(gpio_to_irq(IMX_GPIO_NR(4, 25)), detect_irq, 260 int ret;
246 IRQF_TRIGGER_FALLING, "mmc-detect", data); 261
262 ret = gpio_request(MX21ADS_IO_SD_WP, "mmc-ro");
263 if (ret)
264 return ret;
265
266 return request_irq(gpio_to_irq(MX21ADS_MMC_CD), detect_irq,
267 IRQF_TRIGGER_FALLING, "mmc-detect", data);
247} 268}
248 269
249static void mx21ads_sdhc_exit(struct device *dev, void *data) 270static void mx21ads_sdhc_exit(struct device *dev, void *data)
250{ 271{
251 free_irq(gpio_to_irq(IMX_GPIO_NR(4, 25)), data); 272 free_irq(gpio_to_irq(MX21ADS_MMC_CD), data);
273 gpio_free(MX21ADS_IO_SD_WP);
252} 274}
253 275
254static const struct imxmmc_platform_data mx21ads_sdhc_pdata __initconst = { 276static const struct imxmmc_platform_data mx21ads_sdhc_pdata __initconst = {
@@ -264,29 +286,9 @@ mx21ads_nand_board_info __initconst = {
264 .hw_ecc = 1, 286 .hw_ecc = 1,
265}; 287};
266 288
267static struct map_desc mx21ads_io_desc[] __initdata = {
268 /*
269 * Memory-mapped I/O on MX21ADS Base board:
270 * - CS8900A Ethernet controller
271 * - ST16C2552CJ UART
272 * - CPU and Base board version
273 * - Base board I/O register
274 */
275 {
276 .virtual = MX21ADS_MMIO_BASE_ADDR,
277 .pfn = __phys_to_pfn(MX21_CS1_BASE_ADDR),
278 .length = MX21ADS_MMIO_SIZE,
279 .type = MT_DEVICE,
280 },
281};
282
283static void __init mx21ads_map_io(void)
284{
285 mx21_map_io();
286 iotable_init(mx21ads_io_desc, ARRAY_SIZE(mx21ads_io_desc));
287}
288
289static struct platform_device *platform_devices[] __initdata = { 289static struct platform_device *platform_devices[] __initdata = {
290 &mx21ads_mmgpio,
291 &mx21ads_lcd_regulator,
290 &mx21ads_nor_mtd_device, 292 &mx21ads_nor_mtd_device,
291}; 293};
292 294
@@ -300,12 +302,13 @@ static void __init mx21ads_board_init(void)
300 imx21_add_imx_uart0(&uart_pdata_rts); 302 imx21_add_imx_uart0(&uart_pdata_rts);
301 imx21_add_imx_uart2(&uart_pdata_norts); 303 imx21_add_imx_uart2(&uart_pdata_norts);
302 imx21_add_imx_uart3(&uart_pdata_rts); 304 imx21_add_imx_uart3(&uart_pdata_rts);
303 imx21_add_imx_fb(&mx21ads_fb_data);
304 imx21_add_mxc_mmc(0, &mx21ads_sdhc_pdata); 305 imx21_add_mxc_mmc(0, &mx21ads_sdhc_pdata);
305 imx21_add_mxc_nand(&mx21ads_nand_board_info); 306 imx21_add_mxc_nand(&mx21ads_nand_board_info);
306 307
307 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 308 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
308 309
310 imx21_add_imx_fb(&mx21ads_fb_data);
311
309 mx21ads_cs8900_resources[1].start = 312 mx21ads_cs8900_resources[1].start =
310 gpio_to_irq(MX21ADS_CS8900A_IRQ_GPIO); 313 gpio_to_irq(MX21ADS_CS8900A_IRQ_GPIO);
311 mx21ads_cs8900_resources[1].end = 314 mx21ads_cs8900_resources[1].end =
@@ -321,10 +324,9 @@ static void __init mx21ads_timer_init(void)
321MACHINE_START(MX21ADS, "Freescale i.MX21ADS") 324MACHINE_START(MX21ADS, "Freescale i.MX21ADS")
322 /* maintainer: Freescale Semiconductor, Inc. */ 325 /* maintainer: Freescale Semiconductor, Inc. */
323 .atag_offset = 0x100, 326 .atag_offset = 0x100,
324 .map_io = mx21ads_map_io, 327 .map_io = mx21_map_io,
325 .init_early = imx21_init_early, 328 .init_early = imx21_init_early,
326 .init_irq = mx21_init_irq, 329 .init_irq = mx21_init_irq,
327 .handle_irq = imx21_handle_irq,
328 .init_time = mx21ads_timer_init, 330 .init_time = mx21ads_timer_init,
329 .init_machine = mx21ads_board_init, 331 .init_machine = mx21ads_board_init,
330 .restart = mxc_restart, 332 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-mx25_3ds.c b/arch/arm/mach-imx/mach-mx25_3ds.c
index 13490c203050..ea1fa199c148 100644
--- a/arch/arm/mach-imx/mach-mx25_3ds.c
+++ b/arch/arm/mach-imx/mach-mx25_3ds.c
@@ -263,7 +263,6 @@ MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)")
263 .map_io = mx25_map_io, 263 .map_io = mx25_map_io,
264 .init_early = imx25_init_early, 264 .init_early = imx25_init_early,
265 .init_irq = mx25_init_irq, 265 .init_irq = mx25_init_irq,
266 .handle_irq = imx25_handle_irq,
267 .init_time = mx25pdk_timer_init, 266 .init_time = mx25pdk_timer_init,
268 .init_machine = mx25pdk_init, 267 .init_machine = mx25pdk_init,
269 .restart = mxc_restart, 268 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c
index 25b3e4c9bc0a..435a5428a678 100644
--- a/arch/arm/mach-imx/mach-mx27_3ds.c
+++ b/arch/arm/mach-imx/mach-mx27_3ds.c
@@ -544,7 +544,6 @@ MACHINE_START(MX27_3DS, "Freescale MX27PDK")
544 .map_io = mx27_map_io, 544 .map_io = mx27_map_io,
545 .init_early = imx27_init_early, 545 .init_early = imx27_init_early,
546 .init_irq = mx27_init_irq, 546 .init_irq = mx27_init_irq,
547 .handle_irq = imx27_handle_irq,
548 .init_time = mx27pdk_timer_init, 547 .init_time = mx27pdk_timer_init,
549 .init_machine = mx27pdk_init, 548 .init_machine = mx27pdk_init,
550 .restart = mxc_restart, 549 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c
index a7a4a9c67615..2f834ce8f39c 100644
--- a/arch/arm/mach-imx/mach-mx27ads.c
+++ b/arch/arm/mach-imx/mach-mx27ads.c
@@ -391,7 +391,6 @@ MACHINE_START(MX27ADS, "Freescale i.MX27ADS")
391 .map_io = mx27ads_map_io, 391 .map_io = mx27ads_map_io,
392 .init_early = imx27_init_early, 392 .init_early = imx27_init_early,
393 .init_irq = mx27_init_irq, 393 .init_irq = mx27_init_irq,
394 .handle_irq = imx27_handle_irq,
395 .init_time = mx27ads_timer_init, 394 .init_time = mx27ads_timer_init,
396 .init_machine = mx27ads_board_init, 395 .init_machine = mx27ads_board_init,
397 .restart = mxc_restart, 396 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c
index 50044a21b388..4217871a9653 100644
--- a/arch/arm/mach-imx/mach-mx31_3ds.c
+++ b/arch/arm/mach-imx/mach-mx31_3ds.c
@@ -775,7 +775,6 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
775 .map_io = mx31_map_io, 775 .map_io = mx31_map_io,
776 .init_early = imx31_init_early, 776 .init_early = imx31_init_early,
777 .init_irq = mx31_init_irq, 777 .init_irq = mx31_init_irq,
778 .handle_irq = imx31_handle_irq,
779 .init_time = mx31_3ds_timer_init, 778 .init_time = mx31_3ds_timer_init,
780 .init_machine = mx31_3ds_init, 779 .init_machine = mx31_3ds_init,
781 .reserve = mx31_3ds_reserve, 780 .reserve = mx31_3ds_reserve,
diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c
index daf8889125cc..d08c37c696f6 100644
--- a/arch/arm/mach-imx/mach-mx31ads.c
+++ b/arch/arm/mach-imx/mach-mx31ads.c
@@ -582,7 +582,6 @@ MACHINE_START(MX31ADS, "Freescale MX31ADS")
582 .map_io = mx31ads_map_io, 582 .map_io = mx31ads_map_io,
583 .init_early = imx31_init_early, 583 .init_early = imx31_init_early,
584 .init_irq = mx31ads_init_irq, 584 .init_irq = mx31ads_init_irq,
585 .handle_irq = imx31_handle_irq,
586 .init_time = mx31ads_timer_init, 585 .init_time = mx31ads_timer_init,
587 .init_machine = mx31ads_init, 586 .init_machine = mx31ads_init,
588 .restart = mxc_restart, 587 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-mx31lilly.c b/arch/arm/mach-imx/mach-mx31lilly.c
index 832b1e2f964e..eee042fa2768 100644
--- a/arch/arm/mach-imx/mach-mx31lilly.c
+++ b/arch/arm/mach-imx/mach-mx31lilly.c
@@ -308,7 +308,6 @@ MACHINE_START(LILLY1131, "INCO startec LILLY-1131")
308 .map_io = mx31_map_io, 308 .map_io = mx31_map_io,
309 .init_early = imx31_init_early, 309 .init_early = imx31_init_early,
310 .init_irq = mx31_init_irq, 310 .init_irq = mx31_init_irq,
311 .handle_irq = imx31_handle_irq,
312 .init_time = mx31lilly_timer_init, 311 .init_time = mx31lilly_timer_init,
313 .init_machine = mx31lilly_board_init, 312 .init_machine = mx31lilly_board_init,
314 .restart = mxc_restart, 313 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c
index bea07299b61a..fa15d0b6118d 100644
--- a/arch/arm/mach-imx/mach-mx31lite.c
+++ b/arch/arm/mach-imx/mach-mx31lite.c
@@ -291,7 +291,6 @@ MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM")
291 .map_io = mx31lite_map_io, 291 .map_io = mx31lite_map_io,
292 .init_early = imx31_init_early, 292 .init_early = imx31_init_early,
293 .init_irq = mx31_init_irq, 293 .init_irq = mx31_init_irq,
294 .handle_irq = imx31_handle_irq,
295 .init_time = mx31lite_timer_init, 294 .init_time = mx31lite_timer_init,
296 .init_machine = mx31lite_init, 295 .init_machine = mx31lite_init,
297 .restart = mxc_restart, 296 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c
index 8f45afe785f8..08730f238449 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -600,7 +600,6 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
600 .map_io = mx31_map_io, 600 .map_io = mx31_map_io,
601 .init_early = imx31_init_early, 601 .init_early = imx31_init_early,
602 .init_irq = mx31_init_irq, 602 .init_irq = mx31_init_irq,
603 .handle_irq = imx31_handle_irq,
604 .init_time = mx31moboard_timer_init, 603 .init_time = mx31moboard_timer_init,
605 .init_machine = mx31moboard_init, 604 .init_machine = mx31moboard_init,
606 .restart = mxc_restart, 605 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c
index a42f4f07051f..4e8b184d773b 100644
--- a/arch/arm/mach-imx/mach-mx35_3ds.c
+++ b/arch/arm/mach-imx/mach-mx35_3ds.c
@@ -615,7 +615,6 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK")
615 .map_io = mx35_map_io, 615 .map_io = mx35_map_io,
616 .init_early = imx35_init_early, 616 .init_early = imx35_init_early,
617 .init_irq = mx35_init_irq, 617 .init_irq = mx35_init_irq,
618 .handle_irq = imx35_handle_irq,
619 .init_time = mx35pdk_timer_init, 618 .init_time = mx35pdk_timer_init,
620 .init_machine = mx35_3ds_init, 619 .init_machine = mx35_3ds_init,
621 .reserve = mx35_3ds_reserve, 620 .reserve = mx35_3ds_reserve,
diff --git a/arch/arm/mach-imx/mach-mx51_babbage.c b/arch/arm/mach-imx/mach-mx51_babbage.c
deleted file mode 100644
index f3d264a636fa..000000000000
--- a/arch/arm/mach-imx/mach-mx51_babbage.c
+++ /dev/null
@@ -1,428 +0,0 @@
1/*
2 * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved.
3 * Copyright (C) 2009-2010 Amit Kucheria <amit.kucheria@canonical.com>
4 *
5 * The code contained herein is licensed under the GNU General Public
6 * License. You may obtain a copy of the GNU General Public License
7 * Version 2 or later at the following locations:
8 *
9 * http://www.opensource.org/licenses/gpl-license.html
10 * http://www.gnu.org/copyleft/gpl.html
11 */
12
13#include <linux/init.h>
14#include <linux/platform_device.h>
15#include <linux/i2c.h>
16#include <linux/gpio.h>
17#include <linux/delay.h>
18#include <linux/io.h>
19#include <linux/input.h>
20#include <linux/spi/flash.h>
21#include <linux/spi/spi.h>
22
23#include <asm/setup.h>
24#include <asm/mach-types.h>
25#include <asm/mach/arch.h>
26#include <asm/mach/time.h>
27
28#include "common.h"
29#include "devices-imx51.h"
30#include "hardware.h"
31#include "iomux-mx51.h"
32
33#define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7)
34#define BABBAGE_USBH1_STP IMX_GPIO_NR(1, 27)
35#define BABBAGE_USB_PHY_RESET IMX_GPIO_NR(2, 5)
36#define BABBAGE_FEC_PHY_RESET IMX_GPIO_NR(2, 14)
37#define BABBAGE_POWER_KEY IMX_GPIO_NR(2, 21)
38#define BABBAGE_ECSPI1_CS0 IMX_GPIO_NR(4, 24)
39#define BABBAGE_ECSPI1_CS1 IMX_GPIO_NR(4, 25)
40#define BABBAGE_SD2_CD IMX_GPIO_NR(1, 6)
41#define BABBAGE_SD2_WP IMX_GPIO_NR(1, 5)
42
43/* USB_CTRL_1 */
44#define MX51_USB_CTRL_1_OFFSET 0x10
45#define MX51_USB_CTRL_UH1_EXT_CLK_EN (1 << 25)
46
47#define MX51_USB_PLLDIV_12_MHZ 0x00
48#define MX51_USB_PLL_DIV_19_2_MHZ 0x01
49#define MX51_USB_PLL_DIV_24_MHZ 0x02
50
51static struct gpio_keys_button babbage_buttons[] = {
52 {
53 .gpio = BABBAGE_POWER_KEY,
54 .code = BTN_0,
55 .desc = "PWR",
56 .active_low = 1,
57 .wakeup = 1,
58 },
59};
60
61static const struct gpio_keys_platform_data imx_button_data __initconst = {
62 .buttons = babbage_buttons,
63 .nbuttons = ARRAY_SIZE(babbage_buttons),
64};
65
66static iomux_v3_cfg_t mx51babbage_pads[] = {
67 /* UART1 */
68 MX51_PAD_UART1_RXD__UART1_RXD,
69 MX51_PAD_UART1_TXD__UART1_TXD,
70 MX51_PAD_UART1_RTS__UART1_RTS,
71 MX51_PAD_UART1_CTS__UART1_CTS,
72
73 /* UART2 */
74 MX51_PAD_UART2_RXD__UART2_RXD,
75 MX51_PAD_UART2_TXD__UART2_TXD,
76
77 /* UART3 */
78 MX51_PAD_EIM_D25__UART3_RXD,
79 MX51_PAD_EIM_D26__UART3_TXD,
80 MX51_PAD_EIM_D27__UART3_RTS,
81 MX51_PAD_EIM_D24__UART3_CTS,
82
83 /* I2C1 */
84 MX51_PAD_EIM_D16__I2C1_SDA,
85 MX51_PAD_EIM_D19__I2C1_SCL,
86
87 /* I2C2 */
88 MX51_PAD_KEY_COL4__I2C2_SCL,
89 MX51_PAD_KEY_COL5__I2C2_SDA,
90
91 /* HSI2C */
92 MX51_PAD_I2C1_CLK__I2C1_CLK,
93 MX51_PAD_I2C1_DAT__I2C1_DAT,
94
95 /* USB HOST1 */
96 MX51_PAD_USBH1_CLK__USBH1_CLK,
97 MX51_PAD_USBH1_DIR__USBH1_DIR,
98 MX51_PAD_USBH1_NXT__USBH1_NXT,
99 MX51_PAD_USBH1_DATA0__USBH1_DATA0,
100 MX51_PAD_USBH1_DATA1__USBH1_DATA1,
101 MX51_PAD_USBH1_DATA2__USBH1_DATA2,
102 MX51_PAD_USBH1_DATA3__USBH1_DATA3,
103 MX51_PAD_USBH1_DATA4__USBH1_DATA4,
104 MX51_PAD_USBH1_DATA5__USBH1_DATA5,
105 MX51_PAD_USBH1_DATA6__USBH1_DATA6,
106 MX51_PAD_USBH1_DATA7__USBH1_DATA7,
107
108 /* USB HUB reset line*/
109 MX51_PAD_GPIO1_7__GPIO1_7,
110
111 /* USB PHY reset line */
112 MX51_PAD_EIM_D21__GPIO2_5,
113
114 /* FEC */
115 MX51_PAD_EIM_EB2__FEC_MDIO,
116 MX51_PAD_EIM_EB3__FEC_RDATA1,
117 MX51_PAD_EIM_CS2__FEC_RDATA2,
118 MX51_PAD_EIM_CS3__FEC_RDATA3,
119 MX51_PAD_EIM_CS4__FEC_RX_ER,
120 MX51_PAD_EIM_CS5__FEC_CRS,
121 MX51_PAD_NANDF_RB2__FEC_COL,
122 MX51_PAD_NANDF_RB3__FEC_RX_CLK,
123 MX51_PAD_NANDF_D9__FEC_RDATA0,
124 MX51_PAD_NANDF_D8__FEC_TDATA0,
125 MX51_PAD_NANDF_CS2__FEC_TX_ER,
126 MX51_PAD_NANDF_CS3__FEC_MDC,
127 MX51_PAD_NANDF_CS4__FEC_TDATA1,
128 MX51_PAD_NANDF_CS5__FEC_TDATA2,
129 MX51_PAD_NANDF_CS6__FEC_TDATA3,
130 MX51_PAD_NANDF_CS7__FEC_TX_EN,
131 MX51_PAD_NANDF_RDY_INT__FEC_TX_CLK,
132
133 /* FEC PHY reset line */
134 MX51_PAD_EIM_A20__GPIO2_14,
135
136 /* SD 1 */
137 MX51_PAD_SD1_CMD__SD1_CMD,
138 MX51_PAD_SD1_CLK__SD1_CLK,
139 MX51_PAD_SD1_DATA0__SD1_DATA0,
140 MX51_PAD_SD1_DATA1__SD1_DATA1,
141 MX51_PAD_SD1_DATA2__SD1_DATA2,
142 MX51_PAD_SD1_DATA3__SD1_DATA3,
143 /* CD/WP from controller */
144 MX51_PAD_GPIO1_0__SD1_CD,
145 MX51_PAD_GPIO1_1__SD1_WP,
146
147 /* SD 2 */
148 MX51_PAD_SD2_CMD__SD2_CMD,
149 MX51_PAD_SD2_CLK__SD2_CLK,
150 MX51_PAD_SD2_DATA0__SD2_DATA0,
151 MX51_PAD_SD2_DATA1__SD2_DATA1,
152 MX51_PAD_SD2_DATA2__SD2_DATA2,
153 MX51_PAD_SD2_DATA3__SD2_DATA3,
154 /* CD/WP gpio */
155 MX51_PAD_GPIO1_6__GPIO1_6,
156 MX51_PAD_GPIO1_5__GPIO1_5,
157
158 /* eCSPI1 */
159 MX51_PAD_CSPI1_MISO__ECSPI1_MISO,
160 MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI,
161 MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK,
162 MX51_PAD_CSPI1_SS0__GPIO4_24,
163 MX51_PAD_CSPI1_SS1__GPIO4_25,
164
165 /* Audio */
166 MX51_PAD_AUD3_BB_TXD__AUD3_TXD,
167 MX51_PAD_AUD3_BB_RXD__AUD3_RXD,
168 MX51_PAD_AUD3_BB_CK__AUD3_TXC,
169 MX51_PAD_AUD3_BB_FS__AUD3_TXFS,
170};
171
172/* Serial ports */
173static const struct imxuart_platform_data uart_pdata __initconst = {
174 .flags = IMXUART_HAVE_RTSCTS,
175};
176
177static const struct imxi2c_platform_data babbage_i2c_data __initconst = {
178 .bitrate = 100000,
179};
180
181static const struct imxi2c_platform_data babbage_hsi2c_data __initconst = {
182 .bitrate = 400000,
183};
184
185static struct gpio mx51_babbage_usbh1_gpios[] = {
186 { BABBAGE_USBH1_STP, GPIOF_OUT_INIT_LOW, "usbh1_stp" },
187 { BABBAGE_USB_PHY_RESET, GPIOF_OUT_INIT_LOW, "usbh1_phy_reset" },
188};
189
190static int gpio_usbh1_active(void)
191{
192 iomux_v3_cfg_t usbh1stp_gpio = MX51_PAD_USBH1_STP__GPIO1_27;
193 int ret;
194
195 /* Set USBH1_STP to GPIO and toggle it */
196 mxc_iomux_v3_setup_pad(usbh1stp_gpio);
197 ret = gpio_request_array(mx51_babbage_usbh1_gpios,
198 ARRAY_SIZE(mx51_babbage_usbh1_gpios));
199
200 if (ret) {
201 pr_debug("failed to get USBH1 pins: %d\n", ret);
202 return ret;
203 }
204
205 msleep(100);
206 gpio_set_value(BABBAGE_USBH1_STP, 1);
207 gpio_set_value(BABBAGE_USB_PHY_RESET, 1);
208 gpio_free_array(mx51_babbage_usbh1_gpios,
209 ARRAY_SIZE(mx51_babbage_usbh1_gpios));
210 return 0;
211}
212
213static inline void babbage_usbhub_reset(void)
214{
215 int ret;
216
217 /* Reset USB hub */
218 ret = gpio_request_one(BABBAGE_USB_HUB_RESET,
219 GPIOF_OUT_INIT_LOW, "GPIO1_7");
220 if (ret) {
221 printk(KERN_ERR"failed to get GPIO_USB_HUB_RESET: %d\n", ret);
222 return;
223 }
224
225 msleep(2);
226 /* Deassert reset */
227 gpio_set_value(BABBAGE_USB_HUB_RESET, 1);
228}
229
230static inline void babbage_fec_reset(void)
231{
232 int ret;
233
234 /* reset FEC PHY */
235 ret = gpio_request_one(BABBAGE_FEC_PHY_RESET,
236 GPIOF_OUT_INIT_LOW, "fec-phy-reset");
237 if (ret) {
238 printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret);
239 return;
240 }
241 msleep(1);
242 gpio_set_value(BABBAGE_FEC_PHY_RESET, 1);
243}
244
245/* This function is board specific as the bit mask for the plldiv will also
246be different for other Freescale SoCs, thus a common bitmask is not
247possible and cannot get place in /plat-mxc/ehci.c.*/
248static int initialize_otg_port(struct platform_device *pdev)
249{
250 u32 v;
251 void __iomem *usb_base;
252 void __iomem *usbother_base;
253
254 usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
255 if (!usb_base)
256 return -ENOMEM;
257 usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
258
259 /* Set the PHY clock to 19.2MHz */
260 v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
261 v &= ~MX5_USB_UTMI_PHYCTRL1_PLLDIV_MASK;
262 v |= MX51_USB_PLL_DIV_19_2_MHZ;
263 __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
264 iounmap(usb_base);
265
266 mdelay(10);
267
268 return mx51_initialize_usb_hw(0, MXC_EHCI_INTERNAL_PHY);
269}
270
271static int initialize_usbh1_port(struct platform_device *pdev)
272{
273 u32 v;
274 void __iomem *usb_base;
275 void __iomem *usbother_base;
276
277 usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
278 if (!usb_base)
279 return -ENOMEM;
280 usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
281
282 /* The clock for the USBH1 ULPI port will come externally from the PHY. */
283 v = __raw_readl(usbother_base + MX51_USB_CTRL_1_OFFSET);
284 __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN, usbother_base + MX51_USB_CTRL_1_OFFSET);
285 iounmap(usb_base);
286
287 mdelay(10);
288
289 return mx51_initialize_usb_hw(1, MXC_EHCI_POWER_PINS_ENABLED |
290 MXC_EHCI_ITC_NO_THRESHOLD);
291}
292
293static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
294 .init = initialize_otg_port,
295 .portsc = MXC_EHCI_UTMI_16BIT,
296};
297
298static const struct fsl_usb2_platform_data usb_pdata __initconst = {
299 .operating_mode = FSL_USB2_DR_DEVICE,
300 .phy_mode = FSL_USB2_PHY_UTMI_WIDE,
301};
302
303static const struct mxc_usbh_platform_data usbh1_config __initconst = {
304 .init = initialize_usbh1_port,
305 .portsc = MXC_EHCI_MODE_ULPI,
306};
307
308static bool otg_mode_host __initdata;
309
310static int __init babbage_otg_mode(char *options)
311{
312 if (!strcmp(options, "host"))
313 otg_mode_host = true;
314 else if (!strcmp(options, "device"))
315 otg_mode_host = false;
316 else
317 pr_info("otg_mode neither \"host\" nor \"device\". "
318 "Defaulting to device\n");
319 return 1;
320}
321__setup("otg_mode=", babbage_otg_mode);
322
323static struct spi_board_info mx51_babbage_spi_board_info[] __initdata = {
324 {
325 .modalias = "mtd_dataflash",
326 .max_speed_hz = 25000000,
327 .bus_num = 0,
328 .chip_select = 1,
329 .mode = SPI_MODE_0,
330 .platform_data = NULL,
331 },
332};
333
334static int mx51_babbage_spi_cs[] = {
335 BABBAGE_ECSPI1_CS0,
336 BABBAGE_ECSPI1_CS1,
337};
338
339static const struct spi_imx_master mx51_babbage_spi_pdata __initconst = {
340 .chipselect = mx51_babbage_spi_cs,
341 .num_chipselect = ARRAY_SIZE(mx51_babbage_spi_cs),
342};
343
344static const struct esdhc_platform_data mx51_babbage_sd1_data __initconst = {
345 .cd_type = ESDHC_CD_CONTROLLER,
346 .wp_type = ESDHC_WP_CONTROLLER,
347};
348
349static const struct esdhc_platform_data mx51_babbage_sd2_data __initconst = {
350 .cd_gpio = BABBAGE_SD2_CD,
351 .wp_gpio = BABBAGE_SD2_WP,
352 .cd_type = ESDHC_CD_GPIO,
353 .wp_type = ESDHC_WP_GPIO,
354};
355
356void __init imx51_babbage_common_init(void)
357{
358 mxc_iomux_v3_setup_multiple_pads(mx51babbage_pads,
359 ARRAY_SIZE(mx51babbage_pads));
360}
361
362/*
363 * Board specific initialization.
364 */
365static void __init mx51_babbage_init(void)
366{
367 iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP;
368 iomux_v3_cfg_t power_key = NEW_PAD_CTRL(MX51_PAD_EIM_A27__GPIO2_21,
369 PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH);
370
371 imx51_soc_init();
372
373 imx51_babbage_common_init();
374
375 imx51_add_imx_uart(0, &uart_pdata);
376 imx51_add_imx_uart(1, NULL);
377 imx51_add_imx_uart(2, &uart_pdata);
378
379 babbage_fec_reset();
380 imx51_add_fec(NULL);
381
382 /* Set the PAD settings for the pwr key. */
383 mxc_iomux_v3_setup_pad(power_key);
384 imx_add_gpio_keys(&imx_button_data);
385
386 imx51_add_imx_i2c(0, &babbage_i2c_data);
387 imx51_add_imx_i2c(1, &babbage_i2c_data);
388 imx51_add_hsi2c(&babbage_hsi2c_data);
389
390 if (otg_mode_host)
391 imx51_add_mxc_ehci_otg(&dr_utmi_config);
392 else {
393 initialize_otg_port(NULL);
394 imx51_add_fsl_usb2_udc(&usb_pdata);
395 }
396
397 gpio_usbh1_active();
398 imx51_add_mxc_ehci_hs(1, &usbh1_config);
399 /* setback USBH1_STP to be function */
400 mxc_iomux_v3_setup_pad(usbh1stp);
401 babbage_usbhub_reset();
402
403 imx51_add_sdhci_esdhc_imx(0, &mx51_babbage_sd1_data);
404 imx51_add_sdhci_esdhc_imx(1, &mx51_babbage_sd2_data);
405
406 spi_register_board_info(mx51_babbage_spi_board_info,
407 ARRAY_SIZE(mx51_babbage_spi_board_info));
408 imx51_add_ecspi(0, &mx51_babbage_spi_pdata);
409 imx51_add_imx2_wdt(0);
410}
411
412static void __init mx51_babbage_timer_init(void)
413{
414 mx51_clocks_init(32768, 24000000, 22579200, 0);
415}
416
417MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board")
418 /* Maintainer: Amit Kucheria <amit.kucheria@canonical.com> */
419 .atag_offset = 0x100,
420 .map_io = mx51_map_io,
421 .init_early = imx51_init_early,
422 .init_irq = mx51_init_irq,
423 .handle_irq = imx51_handle_irq,
424 .init_time = mx51_babbage_timer_init,
425 .init_machine = mx51_babbage_init,
426 .init_late = imx51_init_late,
427 .restart = mxc_restart,
428MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mxt_td60.c b/arch/arm/mach-imx/mach-mxt_td60.c
index c91894003da9..0b5d1ca31b9f 100644
--- a/arch/arm/mach-imx/mach-mxt_td60.c
+++ b/arch/arm/mach-imx/mach-mxt_td60.c
@@ -267,7 +267,6 @@ MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60")
267 .map_io = mx27_map_io, 267 .map_io = mx27_map_io,
268 .init_early = imx27_init_early, 268 .init_early = imx27_init_early,
269 .init_irq = mx27_init_irq, 269 .init_irq = mx27_init_irq,
270 .handle_irq = imx27_handle_irq,
271 .init_time = mxt_td60_timer_init, 270 .init_time = mxt_td60_timer_init,
272 .init_machine = mxt_td60_board_init, 271 .init_machine = mxt_td60_board_init,
273 .restart = mxc_restart, 272 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c
index bf3ac51d5aca..12212378c672 100644
--- a/arch/arm/mach-imx/mach-pca100.c
+++ b/arch/arm/mach-imx/mach-pca100.c
@@ -245,8 +245,7 @@ static int pca100_sdhc2_init(struct device *dev, irq_handler_t detect_irq,
245 int ret; 245 int ret;
246 246
247 ret = request_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), detect_irq, 247 ret = request_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), detect_irq,
248 IRQF_DISABLED | IRQF_TRIGGER_FALLING, 248 IRQF_TRIGGER_FALLING, "imx-mmc-detect", data);
249 "imx-mmc-detect", data);
250 if (ret) 249 if (ret)
251 printk(KERN_ERR 250 printk(KERN_ERR
252 "pca100: Failed to request irq for sd/mmc detection\n"); 251 "pca100: Failed to request irq for sd/mmc detection\n");
@@ -421,7 +420,6 @@ MACHINE_START(PCA100, "phyCARD-i.MX27")
421 .map_io = mx27_map_io, 420 .map_io = mx27_map_io,
422 .init_early = imx27_init_early, 421 .init_early = imx27_init_early,
423 .init_irq = mx27_init_irq, 422 .init_irq = mx27_init_irq,
424 .handle_irq = imx27_handle_irq,
425 .init_machine = pca100_init, 423 .init_machine = pca100_init,
426 .init_time = pca100_timer_init, 424 .init_time = pca100_timer_init,
427 .restart = mxc_restart, 425 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c
index 639a3dfb0092..81b8affb9448 100644
--- a/arch/arm/mach-imx/mach-pcm037.c
+++ b/arch/arm/mach-imx/mach-pcm037.c
@@ -703,7 +703,6 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037")
703 .map_io = mx31_map_io, 703 .map_io = mx31_map_io,
704 .init_early = imx31_init_early, 704 .init_early = imx31_init_early,
705 .init_irq = mx31_init_irq, 705 .init_irq = mx31_init_irq,
706 .handle_irq = imx31_handle_irq,
707 .init_time = pcm037_timer_init, 706 .init_time = pcm037_timer_init,
708 .init_machine = pcm037_init, 707 .init_machine = pcm037_init,
709 .init_late = pcm037_init_late, 708 .init_late = pcm037_init_late,
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c
index 592ddbe031ac..6c56fb5553c7 100644
--- a/arch/arm/mach-imx/mach-pcm038.c
+++ b/arch/arm/mach-imx/mach-pcm038.c
@@ -351,7 +351,6 @@ MACHINE_START(PCM038, "phyCORE-i.MX27")
351 .map_io = mx27_map_io, 351 .map_io = mx27_map_io,
352 .init_early = imx27_init_early, 352 .init_early = imx27_init_early,
353 .init_irq = mx27_init_irq, 353 .init_irq = mx27_init_irq,
354 .handle_irq = imx27_handle_irq,
355 .init_time = pcm038_timer_init, 354 .init_time = pcm038_timer_init,
356 .init_machine = pcm038_init, 355 .init_machine = pcm038_init,
357 .restart = mxc_restart, 356 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c
index ac504b67326b..c62b5d261345 100644
--- a/arch/arm/mach-imx/mach-pcm043.c
+++ b/arch/arm/mach-imx/mach-pcm043.c
@@ -400,7 +400,6 @@ MACHINE_START(PCM043, "Phytec Phycore pcm043")
400 .map_io = mx35_map_io, 400 .map_io = mx35_map_io,
401 .init_early = imx35_init_early, 401 .init_early = imx35_init_early,
402 .init_irq = mx35_init_irq, 402 .init_irq = mx35_init_irq,
403 .handle_irq = imx35_handle_irq,
404 .init_time = pcm043_timer_init, 403 .init_time = pcm043_timer_init,
405 .init_machine = pcm043_init, 404 .init_machine = pcm043_init,
406 .restart = mxc_restart, 405 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-qong.c b/arch/arm/mach-imx/mach-qong.c
index 22af27ed457e..a213e7b9cb1c 100644
--- a/arch/arm/mach-imx/mach-qong.c
+++ b/arch/arm/mach-imx/mach-qong.c
@@ -266,7 +266,6 @@ MACHINE_START(QONG, "Dave/DENX QongEVB-LITE")
266 .map_io = mx31_map_io, 266 .map_io = mx31_map_io,
267 .init_early = imx31_init_early, 267 .init_early = imx31_init_early,
268 .init_irq = mx31_init_irq, 268 .init_irq = mx31_init_irq,
269 .handle_irq = imx31_handle_irq,
270 .init_time = qong_timer_init, 269 .init_time = qong_timer_init,
271 .init_machine = qong_init, 270 .init_machine = qong_init,
272 .restart = mxc_restart, 271 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-scb9328.c b/arch/arm/mach-imx/mach-scb9328.c
index b0fa10dd79fe..1f6bc3f7ae14 100644
--- a/arch/arm/mach-imx/mach-scb9328.c
+++ b/arch/arm/mach-imx/mach-scb9328.c
@@ -137,7 +137,6 @@ MACHINE_START(SCB9328, "Synertronixx scb9328")
137 .map_io = mx1_map_io, 137 .map_io = mx1_map_io,
138 .init_early = imx1_init_early, 138 .init_early = imx1_init_early,
139 .init_irq = mx1_init_irq, 139 .init_irq = mx1_init_irq,
140 .handle_irq = imx1_handle_irq,
141 .init_time = scb9328_timer_init, 140 .init_time = scb9328_timer_init,
142 .init_machine = scb9328_init, 141 .init_machine = scb9328_init,
143 .restart = mxc_restart, 142 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c
index 2d8aef5a6efa..c44602758120 100644
--- a/arch/arm/mach-imx/mach-vf610.c
+++ b/arch/arm/mach-imx/mach-vf610.c
@@ -20,19 +20,14 @@ static void __init vf610_init_machine(void)
20 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 20 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
21} 21}
22 22
23static void __init vf610_init_irq(void)
24{
25 l2x0_of_init(0, ~0UL);
26 irqchip_init();
27}
28
29static const char *vf610_dt_compat[] __initconst = { 23static const char *vf610_dt_compat[] __initconst = {
30 "fsl,vf610", 24 "fsl,vf610",
31 NULL, 25 NULL,
32}; 26};
33 27
34DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF610 (Device Tree)") 28DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF610 (Device Tree)")
35 .init_irq = vf610_init_irq, 29 .l2c_aux_val = 0,
30 .l2c_aux_mask = ~0,
36 .init_machine = vf610_init_machine, 31 .init_machine = vf610_init_machine,
37 .dt_compat = vf610_dt_compat, 32 .dt_compat = vf610_dt_compat,
38 .restart = mxc_restart, 33 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c
index 8825d1217d18..872b3c6ba408 100644
--- a/arch/arm/mach-imx/mach-vpr200.c
+++ b/arch/arm/mach-imx/mach-vpr200.c
@@ -310,7 +310,6 @@ MACHINE_START(VPR200, "VPR200")
310 .map_io = mx35_map_io, 310 .map_io = mx35_map_io,
311 .init_early = imx35_init_early, 311 .init_early = imx35_init_early,
312 .init_irq = mx35_init_irq, 312 .init_irq = mx35_init_irq,
313 .handle_irq = imx35_handle_irq,
314 .init_time = vpr200_timer_init, 313 .init_time = vpr200_timer_init,
315 .init_machine = vpr200_board_init, 314 .init_machine = vpr200_board_init,
316 .restart = mxc_restart, 315 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mxc.h b/arch/arm/mach-imx/mxc.h
index b08ab3ad4a6d..75d6a37e1ae4 100644
--- a/arch/arm/mach-imx/mxc.h
+++ b/arch/arm/mach-imx/mxc.h
@@ -36,6 +36,7 @@
36#define MXC_CPU_MX53 53 36#define MXC_CPU_MX53 53
37#define MXC_CPU_IMX6SL 0x60 37#define MXC_CPU_IMX6SL 0x60
38#define MXC_CPU_IMX6DL 0x61 38#define MXC_CPU_IMX6DL 0x61
39#define MXC_CPU_IMX6SX 0x62
39#define MXC_CPU_IMX6Q 0x63 40#define MXC_CPU_IMX6Q 0x63
40 41
41#define IMX_CHIP_REVISION_1_0 0x10 42#define IMX_CHIP_REVISION_1_0 0x10
@@ -163,6 +164,11 @@ static inline bool cpu_is_imx6dl(void)
163 return __mxc_cpu_type == MXC_CPU_IMX6DL; 164 return __mxc_cpu_type == MXC_CPU_IMX6DL;
164} 165}
165 166
167static inline bool cpu_is_imx6sx(void)
168{
169 return __mxc_cpu_type == MXC_CPU_IMX6SX;
170}
171
166static inline bool cpu_is_imx6q(void) 172static inline bool cpu_is_imx6q(void)
167{ 173{
168 return __mxc_cpu_type == MXC_CPU_IMX6Q; 174 return __mxc_cpu_type == MXC_CPU_IMX6Q;
diff --git a/arch/arm/mach-imx/suspend-imx6.S b/arch/arm/mach-imx/suspend-imx6.S
index 20048ff05739..fe123b079c05 100644
--- a/arch/arm/mach-imx/suspend-imx6.S
+++ b/arch/arm/mach-imx/suspend-imx6.S
@@ -334,28 +334,10 @@ ENDPROC(imx6_suspend)
334 * turned into relative ones. 334 * turned into relative ones.
335 */ 335 */
336 336
337#ifdef CONFIG_CACHE_L2X0
338 .macro pl310_resume
339 adr r0, l2x0_saved_regs_offset
340 ldr r2, [r0]
341 add r2, r2, r0
342 ldr r0, [r2, #L2X0_R_PHY_BASE] @ get physical base of l2x0
343 ldr r1, [r2, #L2X0_R_AUX_CTRL] @ get aux_ctrl value
344 str r1, [r0, #L2X0_AUX_CTRL] @ restore aux_ctrl
345 mov r1, #0x1
346 str r1, [r0, #L2X0_CTRL] @ re-enable L2
347 .endm
348
349l2x0_saved_regs_offset:
350 .word l2x0_saved_regs - .
351
352#else
353 .macro pl310_resume
354 .endm
355#endif
356
357ENTRY(v7_cpu_resume) 337ENTRY(v7_cpu_resume)
358 bl v7_invalidate_l1 338 bl v7_invalidate_l1
359 pl310_resume 339#ifdef CONFIG_CACHE_L2X0
340 bl l2c310_early_resume
341#endif
360 b cpu_resume 342 b cpu_resume
361ENDPROC(v7_cpu_resume) 343ENDPROC(v7_cpu_resume)
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index 5e3027d3692f..3b0733edb68c 100644
--- a/arch/arm/mach-imx/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -124,7 +124,7 @@ void __init imx_init_l2cache(void)
124 } 124 }
125 125
126 /* Configure the L2 PREFETCH and POWER registers */ 126 /* Configure the L2 PREFETCH and POWER registers */
127 val = readl_relaxed(l2x0_base + L2X0_PREFETCH_CTRL); 127 val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL);
128 val |= 0x70800000; 128 val |= 0x70800000;
129 /* 129 /*
130 * The L2 cache controller(PL310) version on the i.MX6D/Q is r3p1-50rel0 130 * The L2 cache controller(PL310) version on the i.MX6D/Q is r3p1-50rel0
@@ -137,14 +137,12 @@ void __init imx_init_l2cache(void)
137 */ 137 */
138 if (cpu_is_imx6q()) 138 if (cpu_is_imx6q())
139 val &= ~(1 << 30 | 1 << 23); 139 val &= ~(1 << 30 | 1 << 23);
140 writel_relaxed(val, l2x0_base + L2X0_PREFETCH_CTRL); 140 writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL);
141 val = L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN;
142 writel_relaxed(val, l2x0_base + L2X0_POWER_CTRL);
143 141
144 iounmap(l2x0_base); 142 iounmap(l2x0_base);
145 of_node_put(np); 143 of_node_put(np);
146 144
147out: 145out:
148 l2x0_of_init(0, ~0UL); 146 l2x0_of_init(0, ~0);
149} 147}
150#endif 148#endif
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c
index 65222ea0df6d..bed081e58262 100644
--- a/arch/arm/mach-imx/time.c
+++ b/arch/arm/mach-imx/time.c
@@ -28,6 +28,9 @@
28#include <linux/delay.h> 28#include <linux/delay.h>
29#include <linux/err.h> 29#include <linux/err.h>
30#include <linux/sched_clock.h> 30#include <linux/sched_clock.h>
31#include <linux/of.h>
32#include <linux/of_address.h>
33#include <linux/of_irq.h>
31 34
32#include <asm/mach/time.h> 35#include <asm/mach/time.h>
33 36
@@ -328,3 +331,15 @@ void __init mxc_timer_init(void __iomem *base, int irq)
328 /* Make irqs happen */ 331 /* Make irqs happen */
329 setup_irq(irq, &mxc_timer_irq); 332 setup_irq(irq, &mxc_timer_irq);
330} 333}
334
335void __init mxc_timer_init_dt(struct device_node *np)
336{
337 void __iomem *base;
338 int irq;
339
340 base = of_iomap(np, 0);
341 WARN_ON(!base);
342 irq = irq_of_parse_and_map(np, 0);
343
344 mxc_timer_init(base, irq);
345}
diff --git a/arch/arm/mach-imx/tzic.c b/arch/arm/mach-imx/tzic.c
index 8183178d5aa3..7828af4b2022 100644
--- a/arch/arm/mach-imx/tzic.c
+++ b/arch/arm/mach-imx/tzic.c
@@ -125,7 +125,7 @@ static __init void tzic_init_gc(int idx, unsigned int irq_start)
125 irq_setup_generic_chip(gc, IRQ_MSK(32), 0, IRQ_NOREQUEST, 0); 125 irq_setup_generic_chip(gc, IRQ_MSK(32), 0, IRQ_NOREQUEST, 0);
126} 126}
127 127
128asmlinkage void __exception_irq_entry tzic_handle_irq(struct pt_regs *regs) 128static void __exception_irq_entry tzic_handle_irq(struct pt_regs *regs)
129{ 129{
130 u32 stat; 130 u32 stat;
131 int i, irqofs, handled; 131 int i, irqofs, handled;
@@ -189,6 +189,8 @@ void __init tzic_init_irq(void __iomem *irqbase)
189 for (i = 0; i < 4; i++, irq_base += 32) 189 for (i = 0; i < 4; i++, irq_base += 32)
190 tzic_init_gc(i, irq_base); 190 tzic_init_gc(i, irq_base);
191 191
192 set_handle_irq(tzic_handle_irq);
193
192#ifdef CONFIG_FIQ 194#ifdef CONFIG_FIQ
193 /* Initialize FIQ */ 195 /* Initialize FIQ */
194 init_FIQ(FIQ_START); 196 init_FIQ(FIQ_START);
diff --git a/arch/arm/mach-iop13xx/include/mach/irqs.h b/arch/arm/mach-iop13xx/include/mach/irqs.h
index 054e7acb5bfa..e8d24d32121a 100644
--- a/arch/arm/mach-iop13xx/include/mach/irqs.h
+++ b/arch/arm/mach-iop13xx/include/mach/irqs.h
@@ -191,6 +191,4 @@ static inline u32 read_intpnd_3(void)
191#define NR_IOP13XX_IRQS (IRQ_IOP13XX_HPI + 1) 191#define NR_IOP13XX_IRQS (IRQ_IOP13XX_HPI + 1)
192#endif 192#endif
193 193
194#define NR_IRQS NR_IOP13XX_IRQS
195
196#endif /* _IOP13XX_IRQ_H_ */ 194#endif /* _IOP13XX_IRQ_H_ */
diff --git a/arch/arm/mach-iop13xx/include/mach/time.h b/arch/arm/mach-iop13xx/include/mach/time.h
index f1c00d6d560b..15bc9bb78a6b 100644
--- a/arch/arm/mach-iop13xx/include/mach/time.h
+++ b/arch/arm/mach-iop13xx/include/mach/time.h
@@ -1,5 +1,8 @@
1#ifndef _IOP13XX_TIME_H_ 1#ifndef _IOP13XX_TIME_H_
2#define _IOP13XX_TIME_H_ 2#define _IOP13XX_TIME_H_
3
4#include <mach/irqs.h>
5
3#define IRQ_IOP_TIMER0 IRQ_IOP13XX_TIMER0 6#define IRQ_IOP_TIMER0 IRQ_IOP13XX_TIMER0
4 7
5#define IOP_TMR_EN 0x02 8#define IOP_TMR_EN 0x02
diff --git a/arch/arm/mach-iop13xx/iq81340mc.c b/arch/arm/mach-iop13xx/iq81340mc.c
index 02a8228ac2d3..9cd07d396093 100644
--- a/arch/arm/mach-iop13xx/iq81340mc.c
+++ b/arch/arm/mach-iop13xx/iq81340mc.c
@@ -93,4 +93,5 @@ MACHINE_START(IQ81340MC, "Intel IQ81340MC")
93 .init_time = iq81340mc_timer_init, 93 .init_time = iq81340mc_timer_init,
94 .init_machine = iq81340mc_init, 94 .init_machine = iq81340mc_init,
95 .restart = iop13xx_restart, 95 .restart = iop13xx_restart,
96 .nr_irqs = NR_IOP13XX_IRQS,
96MACHINE_END 97MACHINE_END
diff --git a/arch/arm/mach-iop13xx/iq81340sc.c b/arch/arm/mach-iop13xx/iq81340sc.c
index 1b80f10722b3..b3ec11cb707e 100644
--- a/arch/arm/mach-iop13xx/iq81340sc.c
+++ b/arch/arm/mach-iop13xx/iq81340sc.c
@@ -95,4 +95,5 @@ MACHINE_START(IQ81340SC, "Intel IQ81340SC")
95 .init_time = iq81340sc_timer_init, 95 .init_time = iq81340sc_timer_init,
96 .init_machine = iq81340sc_init, 96 .init_machine = iq81340sc_init,
97 .restart = iop13xx_restart, 97 .restart = iop13xx_restart,
98 .nr_irqs = NR_IOP13XX_IRQS,
98MACHINE_END 99MACHINE_END
diff --git a/arch/arm/mach-iop13xx/msi.c b/arch/arm/mach-iop13xx/msi.c
index 560d5b2dec22..e7730cf9c15d 100644
--- a/arch/arm/mach-iop13xx/msi.c
+++ b/arch/arm/mach-iop13xx/msi.c
@@ -23,10 +23,7 @@
23#include <linux/msi.h> 23#include <linux/msi.h>
24#include <asm/mach/irq.h> 24#include <asm/mach/irq.h>
25#include <asm/irq.h> 25#include <asm/irq.h>
26 26#include <mach/irqs.h>
27
28#define IOP13XX_NUM_MSI_IRQS 128
29static DECLARE_BITMAP(msi_irq_in_use, IOP13XX_NUM_MSI_IRQS);
30 27
31/* IMIPR0 CP6 R8 Page 1 28/* IMIPR0 CP6 R8 Page 1
32 */ 29 */
@@ -121,41 +118,6 @@ void __init iop13xx_msi_init(void)
121 irq_set_chained_handler(IRQ_IOP13XX_INBD_MSI, iop13xx_msi_handler); 118 irq_set_chained_handler(IRQ_IOP13XX_INBD_MSI, iop13xx_msi_handler);
122} 119}
123 120
124/*
125 * Dynamic irq allocate and deallocation
126 */
127int create_irq(void)
128{
129 int irq, pos;
130
131again:
132 pos = find_first_zero_bit(msi_irq_in_use, IOP13XX_NUM_MSI_IRQS);
133 irq = IRQ_IOP13XX_MSI_0 + pos;
134 if (irq > NR_IRQS)
135 return -ENOSPC;
136 /* test_and_set_bit operates on 32-bits at a time */
137 if (test_and_set_bit(pos, msi_irq_in_use))
138 goto again;
139
140 dynamic_irq_init(irq);
141
142 return irq;
143}
144
145void destroy_irq(unsigned int irq)
146{
147 int pos = irq - IRQ_IOP13XX_MSI_0;
148
149 dynamic_irq_cleanup(irq);
150
151 clear_bit(pos, msi_irq_in_use);
152}
153
154void arch_teardown_msi_irq(unsigned int irq)
155{
156 destroy_irq(irq);
157}
158
159static void iop13xx_msi_nop(struct irq_data *d) 121static void iop13xx_msi_nop(struct irq_data *d)
160{ 122{
161 return; 123 return;
@@ -172,12 +134,17 @@ static struct irq_chip iop13xx_msi_chip = {
172 134
173int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc) 135int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
174{ 136{
175 int id, irq = create_irq(); 137 int id, irq = irq_alloc_desc_from(IRQ_IOP13XX_MSI_0, -1);
176 struct msi_msg msg; 138 struct msi_msg msg;
177 139
178 if (irq < 0) 140 if (irq < 0)
179 return irq; 141 return irq;
180 142
143 if (irq >= NR_IOP13XX_IRQS) {
144 irq_free_desc(irq);
145 return -ENOSPC;
146 }
147
181 irq_set_msi_desc(irq, desc); 148 irq_set_msi_desc(irq, desc);
182 149
183 msg.address_hi = 0x0; 150 msg.address_hi = 0x0;
@@ -191,3 +158,8 @@ int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
191 158
192 return 0; 159 return 0;
193} 160}
161
162void arch_teardown_msi_irq(unsigned int irq)
163{
164 irq_free_desc(irq);
165}
diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c
index 96e6c7a6793b..bca96f433495 100644
--- a/arch/arm/mach-iop13xx/setup.c
+++ b/arch/arm/mach-iop13xx/setup.c
@@ -27,6 +27,7 @@
27#include <mach/hardware.h> 27#include <mach/hardware.h>
28#include <asm/irq.h> 28#include <asm/irq.h>
29#include <asm/hardware/iop_adma.h> 29#include <asm/hardware/iop_adma.h>
30#include <mach/irqs.h>
30 31
31#define IOP13XX_UART_XTAL 33334000 32#define IOP13XX_UART_XTAL 33334000
32#define IOP13XX_SETUP_DEBUG 0 33#define IOP13XX_SETUP_DEBUG 0
diff --git a/arch/arm/mach-iop13xx/tpmi.c b/arch/arm/mach-iop13xx/tpmi.c
index 6fdad7a0425a..db511ec2b1df 100644
--- a/arch/arm/mach-iop13xx/tpmi.c
+++ b/arch/arm/mach-iop13xx/tpmi.c
@@ -24,6 +24,7 @@
24#include <linux/io.h> 24#include <linux/io.h>
25#include <asm/irq.h> 25#include <asm/irq.h>
26#include <asm/sizes.h> 26#include <asm/sizes.h>
27#include <mach/irqs.h>
27 28
28/* assumes CONTROLLER_ONLY# is never asserted in the ESSR register */ 29/* assumes CONTROLLER_ONLY# is never asserted in the ESSR register */
29#define IOP13XX_TPMI_MMR(dev) IOP13XX_REG_ADDR32_PHYS(0x48000 + (dev << 12)) 30#define IOP13XX_TPMI_MMR(dev) IOP13XX_REG_ADDR32_PHYS(0x48000 + (dev << 12))
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index 2801da49e2a3..ff18ff20f71f 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -195,7 +195,7 @@ static void __init kirkwood_dt_init(void)
195{ 195{
196 kirkwood_disable_mbus_error_propagation(); 196 kirkwood_disable_mbus_error_propagation();
197 197
198 BUG_ON(mvebu_mbus_dt_init()); 198 BUG_ON(mvebu_mbus_dt_init(false));
199 199
200#ifdef CONFIG_CACHE_FEROCEON_L2 200#ifdef CONFIG_CACHE_FEROCEON_L2
201 feroceon_of_init(); 201 feroceon_of_init();
diff --git a/arch/arm/mach-kirkwood/irq.c b/arch/arm/mach-kirkwood/irq.c
index 2a97a2e4163c..2c47a8ad0e27 100644
--- a/arch/arm/mach-kirkwood/irq.c
+++ b/arch/arm/mach-kirkwood/irq.c
@@ -7,6 +7,7 @@
7 * License version 2. This program is licensed "as is" without any 7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10#include <asm/exception.h>
10#include <linux/gpio.h> 11#include <linux/gpio.h>
11#include <linux/kernel.h> 12#include <linux/kernel.h>
12#include <linux/irq.h> 13#include <linux/irq.h>
@@ -30,11 +31,47 @@ static int __initdata gpio1_irqs[4] = {
30 0, 31 0,
31}; 32};
32 33
34#ifdef CONFIG_MULTI_IRQ_HANDLER
35/*
36 * Compiling with both non-DT and DT support enabled, will
37 * break asm irq handler used by non-DT boards. Therefore,
38 * we provide a C-style irq handler even for non-DT boards,
39 * if MULTI_IRQ_HANDLER is set.
40 */
41
42static void __iomem *kirkwood_irq_base = IRQ_VIRT_BASE;
43
44asmlinkage void
45__exception_irq_entry kirkwood_legacy_handle_irq(struct pt_regs *regs)
46{
47 u32 stat;
48
49 stat = readl_relaxed(kirkwood_irq_base + IRQ_CAUSE_LOW_OFF);
50 stat &= readl_relaxed(kirkwood_irq_base + IRQ_MASK_LOW_OFF);
51 if (stat) {
52 unsigned int hwirq = __fls(stat);
53 handle_IRQ(hwirq, regs);
54 return;
55 }
56 stat = readl_relaxed(kirkwood_irq_base + IRQ_CAUSE_HIGH_OFF);
57 stat &= readl_relaxed(kirkwood_irq_base + IRQ_MASK_HIGH_OFF);
58 if (stat) {
59 unsigned int hwirq = 32 + __fls(stat);
60 handle_IRQ(hwirq, regs);
61 return;
62 }
63}
64#endif
65
33void __init kirkwood_init_irq(void) 66void __init kirkwood_init_irq(void)
34{ 67{
35 orion_irq_init(0, IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF); 68 orion_irq_init(0, IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF);
36 orion_irq_init(32, IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF); 69 orion_irq_init(32, IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF);
37 70
71#ifdef CONFIG_MULTI_IRQ_HANDLER
72 set_handle_irq(kirkwood_legacy_handle_irq);
73#endif
74
38 /* 75 /*
39 * Initialize gpiolib for GPIOs 0-49. 76 * Initialize gpiolib for GPIOs 0-49.
40 */ 77 */
diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c
index 34932e0e31fa..7858d5b6f6ce 100644
--- a/arch/arm/mach-lpc32xx/phy3250.c
+++ b/arch/arm/mach-lpc32xx/phy3250.c
@@ -202,9 +202,6 @@ static struct mmci_platform_data lpc32xx_mmci_data = {
202 .ocr_mask = MMC_VDD_30_31 | MMC_VDD_31_32 | 202 .ocr_mask = MMC_VDD_30_31 | MMC_VDD_31_32 |
203 MMC_VDD_32_33 | MMC_VDD_33_34, 203 MMC_VDD_32_33 | MMC_VDD_33_34,
204 .ios_handler = mmc_handle_ios, 204 .ios_handler = mmc_handle_ios,
205 .dma_filter = NULL,
206 /* No DMA for now since AMBA PL080 dmaengine driver only does scatter
207 * gather, and the MMCI driver doesn't do it this way */
208}; 205};
209 206
210static struct lpc32xx_slc_platform_data lpc32xx_slc_data = { 207static struct lpc32xx_slc_platform_data lpc32xx_slc_data = {
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index a7f959e58c3d..9b26976fb084 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -42,9 +42,6 @@ config ARCH_QSD8X50
42 42
43endchoice 43endchoice
44 44
45config MSM_HAS_DEBUG_UART_HS
46 bool
47
48config MSM_SOC_REV_A 45config MSM_SOC_REV_A
49 bool 46 bool
50 47
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c
index a77529887cbc..61bfe584a9d7 100644
--- a/arch/arm/mach-msm/board-halibut.c
+++ b/arch/arm/mach-msm/board-halibut.c
@@ -83,11 +83,6 @@ static void __init halibut_init(void)
83 platform_add_devices(devices, ARRAY_SIZE(devices)); 83 platform_add_devices(devices, ARRAY_SIZE(devices));
84} 84}
85 85
86static void __init halibut_fixup(struct tag *tags, char **cmdline,
87 struct meminfo *mi)
88{
89}
90
91static void __init halibut_map_io(void) 86static void __init halibut_map_io(void)
92{ 87{
93 msm_map_common_io(); 88 msm_map_common_io();
@@ -100,7 +95,6 @@ static void __init halibut_init_late(void)
100 95
101MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)") 96MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
102 .atag_offset = 0x100, 97 .atag_offset = 0x100,
103 .fixup = halibut_fixup,
104 .map_io = halibut_map_io, 98 .map_io = halibut_map_io,
105 .init_early = halibut_init_early, 99 .init_early = halibut_init_early,
106 .init_irq = halibut_init_irq, 100 .init_irq = halibut_init_irq,
diff --git a/arch/arm/mach-msm/board-mahimahi.c b/arch/arm/mach-msm/board-mahimahi.c
index 7d9981cb400e..873c3ca3cd7e 100644
--- a/arch/arm/mach-msm/board-mahimahi.c
+++ b/arch/arm/mach-msm/board-mahimahi.c
@@ -22,6 +22,7 @@
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/memblock.h>
25 26
26#include <asm/mach-types.h> 27#include <asm/mach-types.h>
27#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
@@ -52,16 +53,10 @@ static void __init mahimahi_init(void)
52 platform_add_devices(devices, ARRAY_SIZE(devices)); 53 platform_add_devices(devices, ARRAY_SIZE(devices));
53} 54}
54 55
55static void __init mahimahi_fixup(struct tag *tags, char **cmdline, 56static void __init mahimahi_fixup(struct tag *tags, char **cmdline)
56 struct meminfo *mi)
57{ 57{
58 mi->nr_banks = 2; 58 memblock_add(PHYS_OFFSET, 219*SZ_1M);
59 mi->bank[0].start = PHYS_OFFSET; 59 memblock_add(MSM_HIGHMEM_BASE, MSM_HIGHMEM_SIZE);
60 mi->bank[0].node = PHYS_TO_NID(PHYS_OFFSET);
61 mi->bank[0].size = (219*1024*1024);
62 mi->bank[1].start = MSM_HIGHMEM_BASE;
63 mi->bank[1].node = PHYS_TO_NID(MSM_HIGHMEM_BASE);
64 mi->bank[1].size = MSM_HIGHMEM_SIZE;
65} 60}
66 61
67static void __init mahimahi_map_io(void) 62static void __init mahimahi_map_io(void)
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
index 46de789ad3ae..245884319d2e 100644
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ b/arch/arm/mach-msm/board-msm7x30.c
@@ -40,8 +40,7 @@
40#include "proc_comm.h" 40#include "proc_comm.h"
41#include "common.h" 41#include "common.h"
42 42
43static void __init msm7x30_fixup(struct tag *tag, char **cmdline, 43static void __init msm7x30_fixup(struct tag *tag, char **cmdline)
44 struct meminfo *mi)
45{ 44{
46 for (; tag->hdr.size; tag = tag_next(tag)) 45 for (; tag->hdr.size; tag = tag_next(tag))
47 if (tag->hdr.tag == ATAG_MEM && tag->u.mem.start == 0x200000) { 46 if (tag->hdr.tag == ATAG_MEM && tag->u.mem.start == 0x200000) {
@@ -95,7 +94,7 @@ static int hsusb_phy_clk_reset(struct clk *phy_clk)
95 94
96static struct msm_otg_platform_data msm_otg_pdata = { 95static struct msm_otg_platform_data msm_otg_pdata = {
97 .phy_init_seq = hsusb_phy_init_seq, 96 .phy_init_seq = hsusb_phy_init_seq,
98 .mode = USB_PERIPHERAL, 97 .mode = USB_DR_MODE_PERIPHERAL,
99 .otg_control = OTG_PHY_CONTROL, 98 .otg_control = OTG_PHY_CONTROL,
100 .link_clk_reset = hsusb_link_clk_reset, 99 .link_clk_reset = hsusb_link_clk_reset,
101 .phy_clk_reset = hsusb_phy_clk_reset, 100 .phy_clk_reset = hsusb_phy_clk_reset,
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c
index 9169ec324a43..4c748616ef47 100644
--- a/arch/arm/mach-msm/board-qsd8x50.c
+++ b/arch/arm/mach-msm/board-qsd8x50.c
@@ -116,7 +116,7 @@ static int hsusb_phy_clk_reset(struct clk *phy_clk)
116 116
117static struct msm_otg_platform_data msm_otg_pdata = { 117static struct msm_otg_platform_data msm_otg_pdata = {
118 .phy_init_seq = hsusb_phy_init_seq, 118 .phy_init_seq = hsusb_phy_init_seq,
119 .mode = USB_PERIPHERAL, 119 .mode = USB_DR_MODE_PERIPHERAL,
120 .otg_control = OTG_PHY_CONTROL, 120 .otg_control = OTG_PHY_CONTROL,
121 .link_clk_reset = hsusb_link_clk_reset, 121 .link_clk_reset = hsusb_link_clk_reset,
122 .phy_clk_reset = hsusb_phy_clk_reset, 122 .phy_clk_reset = hsusb_phy_clk_reset,
diff --git a/arch/arm/mach-msm/board-sapphire.c b/arch/arm/mach-msm/board-sapphire.c
index 327605174d63..e50967926dcd 100644
--- a/arch/arm/mach-msm/board-sapphire.c
+++ b/arch/arm/mach-msm/board-sapphire.c
@@ -35,6 +35,7 @@
35 35
36#include <linux/mtd/nand.h> 36#include <linux/mtd/nand.h>
37#include <linux/mtd/partitions.h> 37#include <linux/mtd/partitions.h>
38#include <linux/memblock.h>
38 39
39#include "gpio_chip.h" 40#include "gpio_chip.h"
40#include "board-sapphire.h" 41#include "board-sapphire.h"
@@ -74,22 +75,18 @@ static struct map_desc sapphire_io_desc[] __initdata = {
74 } 75 }
75}; 76};
76 77
77static void __init sapphire_fixup(struct tag *tags, char **cmdline, 78static void __init sapphire_fixup(struct tag *tags, char **cmdline)
78 struct meminfo *mi)
79{ 79{
80 int smi_sz = parse_tag_smi((const struct tag *)tags); 80 int smi_sz = parse_tag_smi((const struct tag *)tags);
81 81
82 mi->nr_banks = 1;
83 mi->bank[0].start = PHYS_OFFSET;
84 mi->bank[0].node = PHYS_TO_NID(PHYS_OFFSET);
85 if (smi_sz == 32) { 82 if (smi_sz == 32) {
86 mi->bank[0].size = (84*1024*1024); 83 memblock_add(PHYS_OFFSET, 84*SZ_1M);
87 } else if (smi_sz == 64) { 84 } else if (smi_sz == 64) {
88 mi->bank[0].size = (101*1024*1024); 85 memblock_add(PHYS_OFFSET, 101*SZ_1M);
89 } else { 86 } else {
87 memblock_add(PHYS_OFFSET, 101*SZ_1M);
90 /* Give a default value when not get smi size */ 88 /* Give a default value when not get smi size */
91 smi_sz = 64; 89 smi_sz = 64;
92 mi->bank[0].size = (101*1024*1024);
93 } 90 }
94} 91}
95 92
diff --git a/arch/arm/mach-msm/board-trout-gpio.c b/arch/arm/mach-msm/board-trout-gpio.c
index 87e1d01edecc..2c25050209ce 100644
--- a/arch/arm/mach-msm/board-trout-gpio.c
+++ b/arch/arm/mach-msm/board-trout-gpio.c
@@ -89,7 +89,7 @@ static int trout_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
89 .base = base_gpio, \ 89 .base = base_gpio, \
90 .ngpio = 8, \ 90 .ngpio = 8, \
91 }, \ 91 }, \
92 .reg = (void *) reg_num + TROUT_CPLD_BASE, \ 92 .reg = reg_num + TROUT_CPLD_BASE, \
93 .shadow = shadow_val, \ 93 .shadow = shadow_val, \
94 } 94 }
95 95
diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c
index 015d544aa017..f72b07de2152 100644
--- a/arch/arm/mach-msm/board-trout.c
+++ b/arch/arm/mach-msm/board-trout.c
@@ -19,6 +19,7 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/clkdev.h> 21#include <linux/clkdev.h>
22#include <linux/memblock.h>
22 23
23#include <asm/system_info.h> 24#include <asm/system_info.h>
24#include <asm/mach-types.h> 25#include <asm/mach-types.h>
@@ -55,12 +56,9 @@ static void __init trout_init_irq(void)
55 msm_init_irq(); 56 msm_init_irq();
56} 57}
57 58
58static void __init trout_fixup(struct tag *tags, char **cmdline, 59static void __init trout_fixup(struct tag *tags, char **cmdline)
59 struct meminfo *mi)
60{ 60{
61 mi->nr_banks = 1; 61 memblock_add(PHYS_OFFSET, 101*SZ_1M);
62 mi->bank[0].start = PHYS_OFFSET;
63 mi->bank[0].size = (101*1024*1024);
64} 62}
65 63
66static void __init trout_init(void) 64static void __init trout_init(void)
@@ -78,7 +76,7 @@ static void __init trout_init(void)
78 76
79static struct map_desc trout_io_desc[] __initdata = { 77static struct map_desc trout_io_desc[] __initdata = {
80 { 78 {
81 .virtual = TROUT_CPLD_BASE, 79 .virtual = (unsigned long)TROUT_CPLD_BASE,
82 .pfn = __phys_to_pfn(TROUT_CPLD_START), 80 .pfn = __phys_to_pfn(TROUT_CPLD_START),
83 .length = TROUT_CPLD_SIZE, 81 .length = TROUT_CPLD_SIZE,
84 .type = MT_DEVICE_NONSHARED 82 .type = MT_DEVICE_NONSHARED
diff --git a/arch/arm/mach-msm/board-trout.h b/arch/arm/mach-msm/board-trout.h
index b2379ede43bc..adb757abbb92 100644
--- a/arch/arm/mach-msm/board-trout.h
+++ b/arch/arm/mach-msm/board-trout.h
@@ -58,7 +58,7 @@
58#define TROUT_4_TP_LS_EN 19 58#define TROUT_4_TP_LS_EN 19
59#define TROUT_5_TP_LS_EN 1 59#define TROUT_5_TP_LS_EN 1
60 60
61#define TROUT_CPLD_BASE 0xE8100000 61#define TROUT_CPLD_BASE IOMEM(0xE8100000)
62#define TROUT_CPLD_START 0x98000000 62#define TROUT_CPLD_START 0x98000000
63#define TROUT_CPLD_SIZE SZ_4K 63#define TROUT_CPLD_SIZE SZ_4K
64 64
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 3f73eecbcfb0..6090b9eb00c8 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -3,15 +3,13 @@ config ARCH_MVEBU
3 select ARCH_SUPPORTS_BIG_ENDIAN 3 select ARCH_SUPPORTS_BIG_ENDIAN
4 select CLKSRC_MMIO 4 select CLKSRC_MMIO
5 select GENERIC_IRQ_CHIP 5 select GENERIC_IRQ_CHIP
6 select IRQ_DOMAIN
7 select PINCTRL 6 select PINCTRL
8 select PLAT_ORION 7 select PLAT_ORION
8 select SOC_BUS
9 select MVEBU_MBUS 9 select MVEBU_MBUS
10 select ZONE_DMA if ARM_LPAE 10 select ZONE_DMA if ARM_LPAE
11 select ARCH_REQUIRE_GPIOLIB 11 select ARCH_REQUIRE_GPIOLIB
12 select MIGHT_HAVE_PCI
13 select PCI_QUIRKS if PCI 12 select PCI_QUIRKS if PCI
14 select OF_ADDRESS_PCI
15 13
16if ARCH_MVEBU 14if ARCH_MVEBU
17 15
@@ -38,7 +36,9 @@ config MACH_ARMADA_375
38 select ARM_ERRATA_753970 36 select ARM_ERRATA_753970
39 select ARM_GIC 37 select ARM_GIC
40 select ARMADA_375_CLK 38 select ARMADA_375_CLK
41 select CPU_V7 39 select HAVE_ARM_SCU
40 select HAVE_ARM_TWD if SMP
41 select HAVE_SMP
42 select MACH_MVEBU_V7 42 select MACH_MVEBU_V7
43 select PINCTRL_ARMADA_375 43 select PINCTRL_ARMADA_375
44 help 44 help
@@ -51,7 +51,9 @@ config MACH_ARMADA_38X
51 select ARM_ERRATA_753970 51 select ARM_ERRATA_753970
52 select ARM_GIC 52 select ARM_GIC
53 select ARMADA_38X_CLK 53 select ARMADA_38X_CLK
54 select CPU_V7 54 select HAVE_ARM_SCU
55 select HAVE_ARM_TWD if SMP
56 select HAVE_SMP
55 select MACH_MVEBU_V7 57 select MACH_MVEBU_V7
56 select PINCTRL_ARMADA_38X 58 select PINCTRL_ARMADA_38X
57 help 59 help
@@ -86,24 +88,15 @@ config MACH_KIRKWOOD
86 select ARCH_REQUIRE_GPIOLIB 88 select ARCH_REQUIRE_GPIOLIB
87 select CPU_FEROCEON 89 select CPU_FEROCEON
88 select KIRKWOOD_CLK 90 select KIRKWOOD_CLK
89 select OF_IRQ
90 select ORION_IRQCHIP 91 select ORION_IRQCHIP
91 select ORION_TIMER 92 select ORION_TIMER
92 select PCI 93 select PCI
93 select PCI_QUIRKS 94 select PCI_QUIRKS
94 select PINCTRL_KIRKWOOD 95 select PINCTRL_KIRKWOOD
95 select USE_OF
96 help 96 help
97 Say 'Y' here if you want your kernel to support boards based 97 Say 'Y' here if you want your kernel to support boards based
98 on the Marvell Kirkwood device tree. 98 on the Marvell Kirkwood device tree.
99 99
100config MACH_T5325
101 bool "HP T5325 thin client"
102 depends on MACH_KIRKWOOD
103 help
104 Say 'Y' here if you want your kernel to support the
105 HP T5325 Thin client
106
107endmenu 100endmenu
108 101
109endif 102endif
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index a63e43b6b451..2ecb828e4a8b 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -2,12 +2,15 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
2 -I$(srctree)/arch/arm/plat-orion/include 2 -I$(srctree)/arch/arm/plat-orion/include
3 3
4AFLAGS_coherency_ll.o := -Wa,-march=armv7-a 4AFLAGS_coherency_ll.o := -Wa,-march=armv7-a
5CFLAGS_pmsu.o := -march=armv7-a
5 6
6obj-y += system-controller.o mvebu-soc-id.o 7obj-y += system-controller.o mvebu-soc-id.o
7obj-$(CONFIG_MACH_MVEBU_V7) += board-v7.o 8
9ifeq ($(CONFIG_MACH_MVEBU_V7),y)
10obj-y += cpu-reset.o board-v7.o coherency.o coherency_ll.o pmsu.o
11obj-$(CONFIG_SMP) += platsmp.o headsmp.o platsmp-a9.o headsmp-a9.o
12obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
13endif
14
8obj-$(CONFIG_MACH_DOVE) += dove.o 15obj-$(CONFIG_MACH_DOVE) += dove.o
9obj-$(CONFIG_ARCH_MVEBU) += coherency.o coherency_ll.o pmsu.o
10obj-$(CONFIG_SMP) += platsmp.o headsmp.o
11obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
12obj-$(CONFIG_MACH_KIRKWOOD) += kirkwood.o kirkwood-pm.o 16obj-$(CONFIG_MACH_KIRKWOOD) += kirkwood.o kirkwood-pm.o
13obj-$(CONFIG_MACH_T5325) += board-t5325.o
diff --git a/arch/arm/mach-mvebu/armada-370-xp.h b/arch/arm/mach-mvebu/armada-370-xp.h
index 237c86b83390..c3465f5b1250 100644
--- a/arch/arm/mach-mvebu/armada-370-xp.h
+++ b/arch/arm/mach-mvebu/armada-370-xp.h
@@ -20,8 +20,6 @@
20 20
21#define ARMADA_XP_MAX_CPUS 4 21#define ARMADA_XP_MAX_CPUS 4
22 22
23void armada_mpic_send_doorbell(const struct cpumask *mask, unsigned int irq);
24void armada_xp_mpic_smp_cpu_init(void);
25void armada_xp_secondary_startup(void); 23void armada_xp_secondary_startup(void);
26extern struct smp_operations armada_xp_smp_ops; 24extern struct smp_operations armada_xp_smp_ops;
27#endif 25#endif
diff --git a/arch/arm/mach-mvebu/board-t5325.c b/arch/arm/mach-mvebu/board-t5325.c
deleted file mode 100644
index 65ace6db9f28..000000000000
--- a/arch/arm/mach-mvebu/board-t5325.c
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * HP T5325 Board Setup
3 *
4 * Copyright (C) 2014
5 *
6 * Andrew Lunn <andrew@lunn.ch>
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#include <linux/kernel.h>
14#include <linux/i2c.h>
15#include <linux/init.h>
16#include <linux/platform_device.h>
17#include <sound/alc5623.h>
18#include "board.h"
19
20static struct platform_device hp_t5325_audio_device = {
21 .name = "t5325-audio",
22 .id = -1,
23};
24
25static struct alc5623_platform_data alc5621_data = {
26 .add_ctrl = 0x3700,
27 .jack_det_ctrl = 0x4810,
28};
29
30static struct i2c_board_info i2c_board_info[] __initdata = {
31 {
32 I2C_BOARD_INFO("alc5621", 0x1a),
33 .platform_data = &alc5621_data,
34 },
35};
36
37void __init t5325_init(void)
38{
39 i2c_register_board_info(0, i2c_board_info, ARRAY_SIZE(i2c_board_info));
40 platform_device_register(&hp_t5325_audio_device);
41}
diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
index 333fca8fdc41..8bb742fdf5ca 100644
--- a/arch/arm/mach-mvebu/board-v7.c
+++ b/arch/arm/mach-mvebu/board-v7.c
@@ -27,12 +27,30 @@
27#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
28#include <asm/mach/map.h> 28#include <asm/mach/map.h>
29#include <asm/mach/time.h> 29#include <asm/mach/time.h>
30#include <asm/smp_scu.h>
30#include "armada-370-xp.h" 31#include "armada-370-xp.h"
31#include "common.h" 32#include "common.h"
32#include "coherency.h" 33#include "coherency.h"
33#include "mvebu-soc-id.h" 34#include "mvebu-soc-id.h"
34 35
35/* 36/*
37 * Enables the SCU when available. Obviously, this is only useful on
38 * Cortex-A based SOCs, not on PJ4B based ones.
39 */
40static void __init mvebu_scu_enable(void)
41{
42 void __iomem *scu_base;
43
44 struct device_node *np =
45 of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu");
46 if (np) {
47 scu_base = of_iomap(np, 0);
48 scu_enable(scu_base);
49 of_node_put(np);
50 }
51}
52
53/*
36 * Early versions of Armada 375 SoC have a bug where the BootROM 54 * Early versions of Armada 375 SoC have a bug where the BootROM
37 * leaves an external data abort pending. The kernel is hit by this 55 * leaves an external data abort pending. The kernel is hit by this
38 * data abort as soon as it enters userspace, because it unmasks the 56 * data abort as soon as it enters userspace, because it unmasks the
@@ -57,11 +75,9 @@ static void __init mvebu_timer_and_clk_init(void)
57{ 75{
58 of_clk_init(NULL); 76 of_clk_init(NULL);
59 clocksource_of_init(); 77 clocksource_of_init();
78 mvebu_scu_enable();
60 coherency_init(); 79 coherency_init();
61 BUG_ON(mvebu_mbus_dt_init()); 80 BUG_ON(mvebu_mbus_dt_init(coherency_available()));
62#ifdef CONFIG_CACHE_L2X0
63 l2x0_of_init(0, ~0UL);
64#endif
65 81
66 if (of_machine_is_compatible("marvell,armada375")) 82 if (of_machine_is_compatible("marvell,armada375"))
67 hook_fault_code(16 + 6, armada_375_external_abort_wa, SIGBUS, 0, 83 hook_fault_code(16 + 6, armada_375_external_abort_wa, SIGBUS, 0,
@@ -78,7 +94,7 @@ static void __init i2c_quirk(void)
78 * mechanism. We can exit only if we are sure that we can 94 * mechanism. We can exit only if we are sure that we can
79 * get the SoC revision and it is more recent than A0. 95 * get the SoC revision and it is more recent than A0.
80 */ 96 */
81 if (mvebu_get_soc_id(&rev, &dev) == 0 && dev > MV78XX0_A0_REV) 97 if (mvebu_get_soc_id(&dev, &rev) == 0 && rev > MV78XX0_A0_REV)
82 return; 98 return;
83 99
84 for_each_compatible_node(np, NULL, "marvell,mv78230-i2c") { 100 for_each_compatible_node(np, NULL, "marvell,mv78230-i2c") {
@@ -96,10 +112,66 @@ static void __init i2c_quirk(void)
96 return; 112 return;
97} 113}
98 114
115#define A375_Z1_THERMAL_FIXUP_OFFSET 0xc
116
117static void __init thermal_quirk(void)
118{
119 struct device_node *np;
120 u32 dev, rev;
121
122 if (mvebu_get_soc_id(&dev, &rev) == 0 && rev > ARMADA_375_Z1_REV)
123 return;
124
125 for_each_compatible_node(np, NULL, "marvell,armada375-thermal") {
126 struct property *prop;
127 __be32 newval, *newprop, *oldprop;
128 int len;
129
130 /*
131 * The register offset is at a wrong location. This quirk
132 * creates a new reg property as a clone of the previous
133 * one and corrects the offset.
134 */
135 oldprop = (__be32 *)of_get_property(np, "reg", &len);
136 if (!oldprop)
137 continue;
138
139 /* Create a duplicate of the 'reg' property */
140 prop = kzalloc(sizeof(*prop), GFP_KERNEL);
141 prop->length = len;
142 prop->name = kstrdup("reg", GFP_KERNEL);
143 prop->value = kzalloc(len, GFP_KERNEL);
144 memcpy(prop->value, oldprop, len);
145
146 /* Fixup the register offset of the second entry */
147 oldprop += 2;
148 newprop = (__be32 *)prop->value + 2;
149 newval = cpu_to_be32(be32_to_cpu(*oldprop) -
150 A375_Z1_THERMAL_FIXUP_OFFSET);
151 *newprop = newval;
152 of_update_property(np, prop);
153
154 /*
155 * The thermal controller needs some quirk too, so let's change
156 * the compatible string to reflect this.
157 */
158 prop = kzalloc(sizeof(*prop), GFP_KERNEL);
159 prop->name = kstrdup("compatible", GFP_KERNEL);
160 prop->length = sizeof("marvell,armada375-z1-thermal");
161 prop->value = kstrdup("marvell,armada375-z1-thermal",
162 GFP_KERNEL);
163 of_update_property(np, prop);
164 }
165 return;
166}
167
99static void __init mvebu_dt_init(void) 168static void __init mvebu_dt_init(void)
100{ 169{
101 if (of_machine_is_compatible("plathome,openblocks-ax3-4")) 170 if (of_machine_is_compatible("plathome,openblocks-ax3-4"))
102 i2c_quirk(); 171 i2c_quirk();
172 if (of_machine_is_compatible("marvell,a375-db"))
173 thermal_quirk();
174
103 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 175 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
104} 176}
105 177
@@ -109,6 +181,8 @@ static const char * const armada_370_xp_dt_compat[] = {
109}; 181};
110 182
111DT_MACHINE_START(ARMADA_370_XP_DT, "Marvell Armada 370/XP (Device Tree)") 183DT_MACHINE_START(ARMADA_370_XP_DT, "Marvell Armada 370/XP (Device Tree)")
184 .l2c_aux_val = 0,
185 .l2c_aux_mask = ~0,
112 .smp = smp_ops(armada_xp_smp_ops), 186 .smp = smp_ops(armada_xp_smp_ops),
113 .init_machine = mvebu_dt_init, 187 .init_machine = mvebu_dt_init,
114 .init_time = mvebu_timer_and_clk_init, 188 .init_time = mvebu_timer_and_clk_init,
@@ -122,7 +196,10 @@ static const char * const armada_375_dt_compat[] = {
122}; 196};
123 197
124DT_MACHINE_START(ARMADA_375_DT, "Marvell Armada 375 (Device Tree)") 198DT_MACHINE_START(ARMADA_375_DT, "Marvell Armada 375 (Device Tree)")
199 .l2c_aux_val = 0,
200 .l2c_aux_mask = ~0,
125 .init_time = mvebu_timer_and_clk_init, 201 .init_time = mvebu_timer_and_clk_init,
202 .init_machine = mvebu_dt_init,
126 .restart = mvebu_restart, 203 .restart = mvebu_restart,
127 .dt_compat = armada_375_dt_compat, 204 .dt_compat = armada_375_dt_compat,
128MACHINE_END 205MACHINE_END
@@ -134,6 +211,8 @@ static const char * const armada_38x_dt_compat[] = {
134}; 211};
135 212
136DT_MACHINE_START(ARMADA_38X_DT, "Marvell Armada 380/385 (Device Tree)") 213DT_MACHINE_START(ARMADA_38X_DT, "Marvell Armada 380/385 (Device Tree)")
214 .l2c_aux_val = 0,
215 .l2c_aux_mask = ~0,
137 .init_time = mvebu_timer_and_clk_init, 216 .init_time = mvebu_timer_and_clk_init,
138 .restart = mvebu_restart, 217 .restart = mvebu_restart,
139 .dt_compat = armada_38x_dt_compat, 218 .dt_compat = armada_38x_dt_compat,
diff --git a/arch/arm/mach-mvebu/board.h b/arch/arm/mach-mvebu/board.h
index de7f0a191394..9c7bb4386f8b 100644
--- a/arch/arm/mach-mvebu/board.h
+++ b/arch/arm/mach-mvebu/board.h
@@ -13,10 +13,4 @@
13#ifndef __ARCH_MVEBU_BOARD_H 13#ifndef __ARCH_MVEBU_BOARD_H
14#define __ARCH_MVEBU_BOARD_H 14#define __ARCH_MVEBU_BOARD_H
15 15
16#ifdef CONFIG_MACH_T5325
17void t5325_init(void);
18#else
19static inline void t5325_init(void) {};
20#endif
21
22#endif 16#endif
diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c
index 4e9d58148ca7..477202fd39cc 100644
--- a/arch/arm/mach-mvebu/coherency.c
+++ b/arch/arm/mach-mvebu/coherency.c
@@ -17,6 +17,8 @@
17 * supplies basic routines for configuring and controlling hardware coherency 17 * supplies basic routines for configuring and controlling hardware coherency
18 */ 18 */
19 19
20#define pr_fmt(fmt) "mvebu-coherency: " fmt
21
20#include <linux/kernel.h> 22#include <linux/kernel.h>
21#include <linux/init.h> 23#include <linux/init.h>
22#include <linux/of_address.h> 24#include <linux/of_address.h>
@@ -24,13 +26,19 @@
24#include <linux/smp.h> 26#include <linux/smp.h>
25#include <linux/dma-mapping.h> 27#include <linux/dma-mapping.h>
26#include <linux/platform_device.h> 28#include <linux/platform_device.h>
29#include <linux/slab.h>
30#include <linux/mbus.h>
31#include <linux/clk.h>
32#include <linux/pci.h>
27#include <asm/smp_plat.h> 33#include <asm/smp_plat.h>
28#include <asm/cacheflush.h> 34#include <asm/cacheflush.h>
35#include <asm/mach/map.h>
29#include "armada-370-xp.h" 36#include "armada-370-xp.h"
30#include "coherency.h" 37#include "coherency.h"
38#include "mvebu-soc-id.h"
31 39
32unsigned long coherency_phys_base; 40unsigned long coherency_phys_base;
33static void __iomem *coherency_base; 41void __iomem *coherency_base;
34static void __iomem *coherency_cpu_base; 42static void __iomem *coherency_cpu_base;
35 43
36/* Coherency fabric registers */ 44/* Coherency fabric registers */
@@ -38,27 +46,190 @@ static void __iomem *coherency_cpu_base;
38 46
39#define IO_SYNC_BARRIER_CTL_OFFSET 0x0 47#define IO_SYNC_BARRIER_CTL_OFFSET 0x0
40 48
49enum {
50 COHERENCY_FABRIC_TYPE_NONE,
51 COHERENCY_FABRIC_TYPE_ARMADA_370_XP,
52 COHERENCY_FABRIC_TYPE_ARMADA_375,
53 COHERENCY_FABRIC_TYPE_ARMADA_380,
54};
55
41static struct of_device_id of_coherency_table[] = { 56static struct of_device_id of_coherency_table[] = {
42 {.compatible = "marvell,coherency-fabric"}, 57 {.compatible = "marvell,coherency-fabric",
58 .data = (void *) COHERENCY_FABRIC_TYPE_ARMADA_370_XP },
59 {.compatible = "marvell,armada-375-coherency-fabric",
60 .data = (void *) COHERENCY_FABRIC_TYPE_ARMADA_375 },
61 {.compatible = "marvell,armada-380-coherency-fabric",
62 .data = (void *) COHERENCY_FABRIC_TYPE_ARMADA_380 },
43 { /* end of list */ }, 63 { /* end of list */ },
44}; 64};
45 65
46/* Function defined in coherency_ll.S */ 66/* Functions defined in coherency_ll.S */
47int ll_set_cpu_coherent(void __iomem *base_addr, unsigned int hw_cpu_id); 67int ll_enable_coherency(void);
68void ll_add_cpu_to_smp_group(void);
48 69
49int set_cpu_coherent(unsigned int hw_cpu_id, int smp_group_id) 70int set_cpu_coherent(void)
50{ 71{
51 if (!coherency_base) { 72 if (!coherency_base) {
52 pr_warn("Can't make CPU %d cache coherent.\n", hw_cpu_id); 73 pr_warn("Can't make current CPU cache coherent.\n");
53 pr_warn("Coherency fabric is not initialized\n"); 74 pr_warn("Coherency fabric is not initialized\n");
54 return 1; 75 return 1;
55 } 76 }
56 77
57 return ll_set_cpu_coherent(coherency_base, hw_cpu_id); 78 ll_add_cpu_to_smp_group();
79 return ll_enable_coherency();
80}
81
82/*
83 * The below code implements the I/O coherency workaround on Armada
84 * 375. This workaround consists in using the two channels of the
85 * first XOR engine to trigger a XOR transaction that serves as the
86 * I/O coherency barrier.
87 */
88
89static void __iomem *xor_base, *xor_high_base;
90static dma_addr_t coherency_wa_buf_phys[CONFIG_NR_CPUS];
91static void *coherency_wa_buf[CONFIG_NR_CPUS];
92static bool coherency_wa_enabled;
93
94#define XOR_CONFIG(chan) (0x10 + (chan * 4))
95#define XOR_ACTIVATION(chan) (0x20 + (chan * 4))
96#define WINDOW_BAR_ENABLE(chan) (0x240 + ((chan) << 2))
97#define WINDOW_BASE(w) (0x250 + ((w) << 2))
98#define WINDOW_SIZE(w) (0x270 + ((w) << 2))
99#define WINDOW_REMAP_HIGH(w) (0x290 + ((w) << 2))
100#define WINDOW_OVERRIDE_CTRL(chan) (0x2A0 + ((chan) << 2))
101#define XOR_DEST_POINTER(chan) (0x2B0 + (chan * 4))
102#define XOR_BLOCK_SIZE(chan) (0x2C0 + (chan * 4))
103#define XOR_INIT_VALUE_LOW 0x2E0
104#define XOR_INIT_VALUE_HIGH 0x2E4
105
106static inline void mvebu_hwcc_armada375_sync_io_barrier_wa(void)
107{
108 int idx = smp_processor_id();
109
110 /* Write '1' to the first word of the buffer */
111 writel(0x1, coherency_wa_buf[idx]);
112
113 /* Wait until the engine is idle */
114 while ((readl(xor_base + XOR_ACTIVATION(idx)) >> 4) & 0x3)
115 ;
116
117 dmb();
118
119 /* Trigger channel */
120 writel(0x1, xor_base + XOR_ACTIVATION(idx));
121
122 /* Poll the data until it is cleared by the XOR transaction */
123 while (readl(coherency_wa_buf[idx]))
124 ;
125}
126
127static void __init armada_375_coherency_init_wa(void)
128{
129 const struct mbus_dram_target_info *dram;
130 struct device_node *xor_node;
131 struct property *xor_status;
132 struct clk *xor_clk;
133 u32 win_enable = 0;
134 int i;
135
136 pr_warn("enabling coherency workaround for Armada 375 Z1, one XOR engine disabled\n");
137
138 /*
139 * Since the workaround uses one XOR engine, we grab a
140 * reference to its Device Tree node first.
141 */
142 xor_node = of_find_compatible_node(NULL, NULL, "marvell,orion-xor");
143 BUG_ON(!xor_node);
144
145 /*
146 * Then we mark it as disabled so that the real XOR driver
147 * will not use it.
148 */
149 xor_status = kzalloc(sizeof(struct property), GFP_KERNEL);
150 BUG_ON(!xor_status);
151
152 xor_status->value = kstrdup("disabled", GFP_KERNEL);
153 BUG_ON(!xor_status->value);
154
155 xor_status->length = 8;
156 xor_status->name = kstrdup("status", GFP_KERNEL);
157 BUG_ON(!xor_status->name);
158
159 of_update_property(xor_node, xor_status);
160
161 /*
162 * And we remap the registers, get the clock, and do the
163 * initial configuration of the XOR engine.
164 */
165 xor_base = of_iomap(xor_node, 0);
166 xor_high_base = of_iomap(xor_node, 1);
167
168 xor_clk = of_clk_get_by_name(xor_node, NULL);
169 BUG_ON(!xor_clk);
170
171 clk_prepare_enable(xor_clk);
172
173 dram = mv_mbus_dram_info();
174
175 for (i = 0; i < 8; i++) {
176 writel(0, xor_base + WINDOW_BASE(i));
177 writel(0, xor_base + WINDOW_SIZE(i));
178 if (i < 4)
179 writel(0, xor_base + WINDOW_REMAP_HIGH(i));
180 }
181
182 for (i = 0; i < dram->num_cs; i++) {
183 const struct mbus_dram_window *cs = dram->cs + i;
184 writel((cs->base & 0xffff0000) |
185 (cs->mbus_attr << 8) |
186 dram->mbus_dram_target_id, xor_base + WINDOW_BASE(i));
187 writel((cs->size - 1) & 0xffff0000, xor_base + WINDOW_SIZE(i));
188
189 win_enable |= (1 << i);
190 win_enable |= 3 << (16 + (2 * i));
191 }
192
193 writel(win_enable, xor_base + WINDOW_BAR_ENABLE(0));
194 writel(win_enable, xor_base + WINDOW_BAR_ENABLE(1));
195 writel(0, xor_base + WINDOW_OVERRIDE_CTRL(0));
196 writel(0, xor_base + WINDOW_OVERRIDE_CTRL(1));
197
198 for (i = 0; i < CONFIG_NR_CPUS; i++) {
199 coherency_wa_buf[i] = kzalloc(PAGE_SIZE, GFP_KERNEL);
200 BUG_ON(!coherency_wa_buf[i]);
201
202 /*
203 * We can't use the DMA mapping API, since we don't
204 * have a valid 'struct device' pointer
205 */
206 coherency_wa_buf_phys[i] =
207 virt_to_phys(coherency_wa_buf[i]);
208 BUG_ON(!coherency_wa_buf_phys[i]);
209
210 /*
211 * Configure the XOR engine for memset operation, with
212 * a 128 bytes block size
213 */
214 writel(0x444, xor_base + XOR_CONFIG(i));
215 writel(128, xor_base + XOR_BLOCK_SIZE(i));
216 writel(coherency_wa_buf_phys[i],
217 xor_base + XOR_DEST_POINTER(i));
218 }
219
220 writel(0x0, xor_base + XOR_INIT_VALUE_LOW);
221 writel(0x0, xor_base + XOR_INIT_VALUE_HIGH);
222
223 coherency_wa_enabled = true;
58} 224}
59 225
60static inline void mvebu_hwcc_sync_io_barrier(void) 226static inline void mvebu_hwcc_sync_io_barrier(void)
61{ 227{
228 if (coherency_wa_enabled) {
229 mvebu_hwcc_armada375_sync_io_barrier_wa();
230 return;
231 }
232
62 writel(0x1, coherency_cpu_base + IO_SYNC_BARRIER_CTL_OFFSET); 233 writel(0x1, coherency_cpu_base + IO_SYNC_BARRIER_CTL_OFFSET);
63 while (readl(coherency_cpu_base + IO_SYNC_BARRIER_CTL_OFFSET) & 0x1); 234 while (readl(coherency_cpu_base + IO_SYNC_BARRIER_CTL_OFFSET) & 0x1);
64} 235}
@@ -105,8 +276,8 @@ static struct dma_map_ops mvebu_hwcc_dma_ops = {
105 .set_dma_mask = arm_dma_set_mask, 276 .set_dma_mask = arm_dma_set_mask,
106}; 277};
107 278
108static int mvebu_hwcc_platform_notifier(struct notifier_block *nb, 279static int mvebu_hwcc_notifier(struct notifier_block *nb,
109 unsigned long event, void *__dev) 280 unsigned long event, void *__dev)
110{ 281{
111 struct device *dev = __dev; 282 struct device *dev = __dev;
112 283
@@ -117,47 +288,148 @@ static int mvebu_hwcc_platform_notifier(struct notifier_block *nb,
117 return NOTIFY_OK; 288 return NOTIFY_OK;
118} 289}
119 290
120static struct notifier_block mvebu_hwcc_platform_nb = { 291static struct notifier_block mvebu_hwcc_nb = {
121 .notifier_call = mvebu_hwcc_platform_notifier, 292 .notifier_call = mvebu_hwcc_notifier,
122}; 293};
123 294
124int __init coherency_init(void) 295static void __init armada_370_coherency_init(struct device_node *np)
296{
297 struct resource res;
298
299 of_address_to_resource(np, 0, &res);
300 coherency_phys_base = res.start;
301 /*
302 * Ensure secondary CPUs will see the updated value,
303 * which they read before they join the coherency
304 * fabric, and therefore before they are coherent with
305 * the boot CPU cache.
306 */
307 sync_cache_w(&coherency_phys_base);
308 coherency_base = of_iomap(np, 0);
309 coherency_cpu_base = of_iomap(np, 1);
310 set_cpu_coherent();
311}
312
313/*
314 * This ioremap hook is used on Armada 375/38x to ensure that PCIe
315 * memory areas are mapped as MT_UNCACHED instead of MT_DEVICE. This
316 * is needed as a workaround for a deadlock issue between the PCIe
317 * interface and the cache controller.
318 */
319static void __iomem *
320armada_pcie_wa_ioremap_caller(phys_addr_t phys_addr, size_t size,
321 unsigned int mtype, void *caller)
322{
323 struct resource pcie_mem;
324
325 mvebu_mbus_get_pcie_mem_aperture(&pcie_mem);
326
327 if (pcie_mem.start <= phys_addr && (phys_addr + size) <= pcie_mem.end)
328 mtype = MT_UNCACHED;
329
330 return __arm_ioremap_caller(phys_addr, size, mtype, caller);
331}
332
333static void __init armada_375_380_coherency_init(struct device_node *np)
334{
335 struct device_node *cache_dn;
336
337 coherency_cpu_base = of_iomap(np, 0);
338 arch_ioremap_caller = armada_pcie_wa_ioremap_caller;
339
340 /*
341 * Add the PL310 property "arm,io-coherent". This makes sure the
342 * outer sync operation is not used, which allows to
343 * workaround the system erratum that causes deadlocks when
344 * doing PCIe in an SMP situation on Armada 375 and Armada
345 * 38x.
346 */
347 for_each_compatible_node(cache_dn, NULL, "arm,pl310-cache") {
348 struct property *p;
349
350 p = kzalloc(sizeof(*p), GFP_KERNEL);
351 p->name = kstrdup("arm,io-coherent", GFP_KERNEL);
352 of_add_property(cache_dn, p);
353 }
354}
355
356static int coherency_type(void)
125{ 357{
126 struct device_node *np; 358 struct device_node *np;
359 const struct of_device_id *match;
127 360
128 np = of_find_matching_node(NULL, of_coherency_table); 361 np = of_find_matching_node_and_match(NULL, of_coherency_table, &match);
129 if (np) { 362 if (np) {
130 struct resource res; 363 int type = (int) match->data;
131 pr_info("Initializing Coherency fabric\n"); 364
132 of_address_to_resource(np, 0, &res); 365 /* Armada 370/XP coherency works in both UP and SMP */
133 coherency_phys_base = res.start; 366 if (type == COHERENCY_FABRIC_TYPE_ARMADA_370_XP)
134 /* 367 return type;
135 * Ensure secondary CPUs will see the updated value, 368
136 * which they read before they join the coherency 369 /* Armada 375 coherency works only on SMP */
137 * fabric, and therefore before they are coherent with 370 else if (type == COHERENCY_FABRIC_TYPE_ARMADA_375 && is_smp())
138 * the boot CPU cache. 371 return type;
139 */ 372
140 sync_cache_w(&coherency_phys_base); 373 /* Armada 380 coherency works only on SMP */
141 coherency_base = of_iomap(np, 0); 374 else if (type == COHERENCY_FABRIC_TYPE_ARMADA_380 && is_smp())
142 coherency_cpu_base = of_iomap(np, 1); 375 return type;
143 set_cpu_coherent(cpu_logical_map(smp_processor_id()), 0);
144 of_node_put(np);
145 } 376 }
146 377
147 return 0; 378 return COHERENCY_FABRIC_TYPE_NONE;
148} 379}
149 380
150static int __init coherency_late_init(void) 381int coherency_available(void)
382{
383 return coherency_type() != COHERENCY_FABRIC_TYPE_NONE;
384}
385
386int __init coherency_init(void)
151{ 387{
388 int type = coherency_type();
152 struct device_node *np; 389 struct device_node *np;
153 390
154 np = of_find_matching_node(NULL, of_coherency_table); 391 np = of_find_matching_node(NULL, of_coherency_table);
155 if (np) { 392
156 bus_register_notifier(&platform_bus_type, 393 if (type == COHERENCY_FABRIC_TYPE_ARMADA_370_XP)
157 &mvebu_hwcc_platform_nb); 394 armada_370_coherency_init(np);
158 of_node_put(np); 395 else if (type == COHERENCY_FABRIC_TYPE_ARMADA_375 ||
396 type == COHERENCY_FABRIC_TYPE_ARMADA_380)
397 armada_375_380_coherency_init(np);
398
399 return 0;
400}
401
402static int __init coherency_late_init(void)
403{
404 int type = coherency_type();
405
406 if (type == COHERENCY_FABRIC_TYPE_NONE)
407 return 0;
408
409 if (type == COHERENCY_FABRIC_TYPE_ARMADA_375) {
410 u32 dev, rev;
411
412 if (mvebu_get_soc_id(&dev, &rev) == 0 &&
413 rev == ARMADA_375_Z1_REV)
414 armada_375_coherency_init_wa();
159 } 415 }
416
417 bus_register_notifier(&platform_bus_type,
418 &mvebu_hwcc_nb);
419
160 return 0; 420 return 0;
161} 421}
162 422
163postcore_initcall(coherency_late_init); 423postcore_initcall(coherency_late_init);
424
425#if IS_ENABLED(CONFIG_PCI)
426static int __init coherency_pci_init(void)
427{
428 if (coherency_available())
429 bus_register_notifier(&pci_bus_type,
430 &mvebu_hwcc_nb);
431 return 0;
432}
433
434arch_initcall(coherency_pci_init);
435#endif
diff --git a/arch/arm/mach-mvebu/coherency.h b/arch/arm/mach-mvebu/coherency.h
index 760226c41353..54cb7607b526 100644
--- a/arch/arm/mach-mvebu/coherency.h
+++ b/arch/arm/mach-mvebu/coherency.h
@@ -15,8 +15,9 @@
15#define __MACH_370_XP_COHERENCY_H 15#define __MACH_370_XP_COHERENCY_H
16 16
17extern unsigned long coherency_phys_base; 17extern unsigned long coherency_phys_base;
18int set_cpu_coherent(void);
18 19
19int set_cpu_coherent(unsigned int cpu_id, int smp_group_id);
20int coherency_init(void); 20int coherency_init(void);
21int coherency_available(void);
21 22
22#endif /* __MACH_370_XP_COHERENCY_H */ 23#endif /* __MACH_370_XP_COHERENCY_H */
diff --git a/arch/arm/mach-mvebu/coherency_ll.S b/arch/arm/mach-mvebu/coherency_ll.S
index ee7598fe75db..510c29e079ca 100644
--- a/arch/arm/mach-mvebu/coherency_ll.S
+++ b/arch/arm/mach-mvebu/coherency_ll.S
@@ -21,38 +21,129 @@
21#define ARMADA_XP_CFB_CFG_REG_OFFSET 0x4 21#define ARMADA_XP_CFB_CFG_REG_OFFSET 0x4
22 22
23#include <asm/assembler.h> 23#include <asm/assembler.h>
24#include <asm/cp15.h>
24 25
25 .text 26 .text
27/* Returns the coherency base address in r1 (r0 is untouched) */
28ENTRY(ll_get_coherency_base)
29 mrc p15, 0, r1, c1, c0, 0
30 tst r1, #CR_M @ Check MMU bit enabled
31 bne 1f
32
33 /*
34 * MMU is disabled, use the physical address of the coherency
35 * base address.
36 */
37 adr r1, 3f
38 ldr r3, [r1]
39 ldr r1, [r1, r3]
40 b 2f
411:
42 /*
43 * MMU is enabled, use the virtual address of the coherency
44 * base address.
45 */
46 ldr r1, =coherency_base
47 ldr r1, [r1]
482:
49 mov pc, lr
50ENDPROC(ll_get_coherency_base)
51
26/* 52/*
27 * r0: Coherency fabric base register address 53 * Returns the coherency CPU mask in r3 (r0 is untouched). This
28 * r1: HW CPU id 54 * coherency CPU mask can be used with the coherency fabric
55 * configuration and control registers. Note that the mask is already
56 * endian-swapped as appropriate so that the calling functions do not
57 * have to care about endianness issues while accessing the coherency
58 * fabric registers
29 */ 59 */
30ENTRY(ll_set_cpu_coherent) 60ENTRY(ll_get_coherency_cpumask)
31 /* Create bit by cpu index */ 61 mrc 15, 0, r3, cr0, cr0, 5
32 mov r3, #(1 << 24) 62 and r3, r3, #15
33 lsl r1, r3, r1 63 mov r2, #(1 << 24)
34ARM_BE8(rev r1, r1) 64 lsl r3, r2, r3
35 65ARM_BE8(rev r3, r3)
36 /* Add CPU to SMP group - Atomic */ 66 mov pc, lr
37 add r3, r0, #ARMADA_XP_CFB_CTL_REG_OFFSET 67ENDPROC(ll_get_coherency_cpumask)
381: 68
39 ldrex r2, [r3] 69/*
40 orr r2, r2, r1 70 * ll_add_cpu_to_smp_group(), ll_enable_coherency() and
41 strex r0, r2, [r3] 71 * ll_disable_coherency() use the strex/ldrex instructions while the
42 cmp r0, #0 72 * MMU can be disabled. The Armada XP SoC has an exclusive monitor
43 bne 1b 73 * that tracks transactions to Device and/or SO memory and thanks to
44 74 * that, exclusive transactions are functional even when the MMU is
45 /* Enable coherency on CPU - Atomic */ 75 * disabled.
46 add r3, r3, #ARMADA_XP_CFB_CFG_REG_OFFSET 76 */
77
78ENTRY(ll_add_cpu_to_smp_group)
79 /*
80 * As r0 is not modified by ll_get_coherency_base() and
81 * ll_get_coherency_cpumask(), we use it to temporarly save lr
82 * and avoid it being modified by the branch and link
83 * calls. This function is used very early in the secondary
84 * CPU boot, and no stack is available at this point.
85 */
86 mov r0, lr
87 bl ll_get_coherency_base
88 bl ll_get_coherency_cpumask
89 mov lr, r0
90 add r0, r1, #ARMADA_XP_CFB_CFG_REG_OFFSET
471: 911:
48 ldrex r2, [r3] 92 ldrex r2, [r0]
49 orr r2, r2, r1 93 orr r2, r2, r3
50 strex r0, r2, [r3] 94 strex r1, r2, [r0]
51 cmp r0, #0 95 cmp r1, #0
52 bne 1b 96 bne 1b
97 mov pc, lr
98ENDPROC(ll_add_cpu_to_smp_group)
53 99
100ENTRY(ll_enable_coherency)
101 /*
102 * As r0 is not modified by ll_get_coherency_base() and
103 * ll_get_coherency_cpumask(), we use it to temporarly save lr
104 * and avoid it being modified by the branch and link
105 * calls. This function is used very early in the secondary
106 * CPU boot, and no stack is available at this point.
107 */
108 mov r0, lr
109 bl ll_get_coherency_base
110 bl ll_get_coherency_cpumask
111 mov lr, r0
112 add r0, r1, #ARMADA_XP_CFB_CTL_REG_OFFSET
1131:
114 ldrex r2, [r0]
115 orr r2, r2, r3
116 strex r1, r2, [r0]
117 cmp r1, #0
118 bne 1b
54 dsb 119 dsb
55
56 mov r0, #0 120 mov r0, #0
57 mov pc, lr 121 mov pc, lr
58ENDPROC(ll_set_cpu_coherent) 122ENDPROC(ll_enable_coherency)
123
124ENTRY(ll_disable_coherency)
125 /*
126 * As r0 is not modified by ll_get_coherency_base() and
127 * ll_get_coherency_cpumask(), we use it to temporarly save lr
128 * and avoid it being modified by the branch and link
129 * calls. This function is used very early in the secondary
130 * CPU boot, and no stack is available at this point.
131 */
132 mov r0, lr
133 bl ll_get_coherency_base
134 bl ll_get_coherency_cpumask
135 mov lr, r0
136 add r0, r1, #ARMADA_XP_CFB_CTL_REG_OFFSET
1371:
138 ldrex r2, [r0]
139 bic r2, r2, r3
140 strex r1, r2, [r0]
141 cmp r1, #0
142 bne 1b
143 dsb
144 mov pc, lr
145ENDPROC(ll_disable_coherency)
146
147 .align 2
1483:
149 .long coherency_phys_base - .
diff --git a/arch/arm/mach-mvebu/common.h b/arch/arm/mach-mvebu/common.h
index 55449c487c9e..b67fb7a10d8b 100644
--- a/arch/arm/mach-mvebu/common.h
+++ b/arch/arm/mach-mvebu/common.h
@@ -18,6 +18,9 @@
18#include <linux/reboot.h> 18#include <linux/reboot.h>
19 19
20void mvebu_restart(enum reboot_mode mode, const char *cmd); 20void mvebu_restart(enum reboot_mode mode, const char *cmd);
21int mvebu_cpu_reset_deassert(int cpu);
22void mvebu_pmsu_set_cpu_boot_addr(int hw_cpu, void *boot_addr);
23void mvebu_system_controller_set_cpu_boot_addr(void *boot_addr);
21 24
22void armada_xp_cpu_die(unsigned int cpu); 25void armada_xp_cpu_die(unsigned int cpu);
23 26
diff --git a/arch/arm/mach-mvebu/cpu-reset.c b/arch/arm/mach-mvebu/cpu-reset.c
new file mode 100644
index 000000000000..4a8f9eebebea
--- /dev/null
+++ b/arch/arm/mach-mvebu/cpu-reset.c
@@ -0,0 +1,103 @@
1/*
2 * Copyright (C) 2014 Marvell
3 *
4 * Thomas Petazzoni <thomas.petazzoni@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#define pr_fmt(fmt) "mvebu-cpureset: " fmt
12
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/of_address.h>
16#include <linux/io.h>
17#include <linux/resource.h>
18#include "armada-370-xp.h"
19
20static void __iomem *cpu_reset_base;
21static size_t cpu_reset_size;
22
23#define CPU_RESET_OFFSET(cpu) (cpu * 0x8)
24#define CPU_RESET_ASSERT BIT(0)
25
26int mvebu_cpu_reset_deassert(int cpu)
27{
28 u32 reg;
29
30 if (!cpu_reset_base)
31 return -ENODEV;
32
33 if (CPU_RESET_OFFSET(cpu) >= cpu_reset_size)
34 return -EINVAL;
35
36 reg = readl(cpu_reset_base + CPU_RESET_OFFSET(cpu));
37 reg &= ~CPU_RESET_ASSERT;
38 writel(reg, cpu_reset_base + CPU_RESET_OFFSET(cpu));
39
40 return 0;
41}
42
43static int mvebu_cpu_reset_map(struct device_node *np, int res_idx)
44{
45 struct resource res;
46
47 if (of_address_to_resource(np, res_idx, &res)) {
48 pr_err("unable to get resource\n");
49 return -ENOENT;
50 }
51
52 if (!request_mem_region(res.start, resource_size(&res),
53 np->full_name)) {
54 pr_err("unable to request region\n");
55 return -EBUSY;
56 }
57
58 cpu_reset_base = ioremap(res.start, resource_size(&res));
59 if (!cpu_reset_base) {
60 pr_err("unable to map registers\n");
61 release_mem_region(res.start, resource_size(&res));
62 return -ENOMEM;
63 }
64
65 cpu_reset_size = resource_size(&res);
66
67 return 0;
68}
69
70int __init mvebu_cpu_reset_init(void)
71{
72 struct device_node *np;
73 int res_idx;
74 int ret;
75
76 np = of_find_compatible_node(NULL, NULL,
77 "marvell,armada-370-cpu-reset");
78 if (np) {
79 res_idx = 0;
80 } else {
81 /*
82 * This code is kept for backward compatibility with
83 * old Device Trees.
84 */
85 np = of_find_compatible_node(NULL, NULL,
86 "marvell,armada-370-xp-pmsu");
87 if (np) {
88 pr_warn(FW_WARN "deprecated pmsu binding\n");
89 res_idx = 1;
90 }
91 }
92
93 /* No reset node found */
94 if (!np)
95 return -ENODEV;
96
97 ret = mvebu_cpu_reset_map(np, res_idx);
98 of_node_put(np);
99
100 return ret;
101}
102
103early_initcall(mvebu_cpu_reset_init);
diff --git a/arch/arm/mach-mvebu/dove.c b/arch/arm/mach-mvebu/dove.c
index 5e5a43624237..b50464ec1130 100644
--- a/arch/arm/mach-mvebu/dove.c
+++ b/arch/arm/mach-mvebu/dove.c
@@ -23,7 +23,7 @@ static void __init dove_init(void)
23#ifdef CONFIG_CACHE_TAUROS2 23#ifdef CONFIG_CACHE_TAUROS2
24 tauros2_init(0); 24 tauros2_init(0);
25#endif 25#endif
26 BUG_ON(mvebu_mbus_dt_init()); 26 BUG_ON(mvebu_mbus_dt_init(false));
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
diff --git a/arch/arm/mach-mvebu/headsmp-a9.S b/arch/arm/mach-mvebu/headsmp-a9.S
new file mode 100644
index 000000000000..5925366bc03c
--- /dev/null
+++ b/arch/arm/mach-mvebu/headsmp-a9.S
@@ -0,0 +1,34 @@
1/*
2 * SMP support: Entry point for secondary CPUs of Marvell EBU
3 * Cortex-A9 based SOCs (Armada 375 and Armada 38x).
4 *
5 * Copyright (C) 2014 Marvell
6 *
7 * Gregory CLEMENT <gregory.clement@free-electrons.com>
8 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#include <linux/linkage.h>
16#include <linux/init.h>
17
18 __CPUINIT
19#define CPU_RESUME_ADDR_REG 0xf10182d4
20
21.global armada_375_smp_cpu1_enable_code_start
22.global armada_375_smp_cpu1_enable_code_end
23
24armada_375_smp_cpu1_enable_code_start:
25 ldr r0, [pc, #4]
26 ldr r1, [r0]
27 mov pc, r1
28 .word CPU_RESUME_ADDR_REG
29armada_375_smp_cpu1_enable_code_end:
30
31ENTRY(mvebu_cortex_a9_secondary_startup)
32 bl v7_invalidate_l1
33 b secondary_startup
34ENDPROC(mvebu_cortex_a9_secondary_startup)
diff --git a/arch/arm/mach-mvebu/headsmp.S b/arch/arm/mach-mvebu/headsmp.S
index 3dd80df428f7..2c4032e368ba 100644
--- a/arch/arm/mach-mvebu/headsmp.S
+++ b/arch/arm/mach-mvebu/headsmp.S
@@ -31,21 +31,10 @@
31ENTRY(armada_xp_secondary_startup) 31ENTRY(armada_xp_secondary_startup)
32 ARM_BE8(setend be ) @ go BE8 if entered LE 32 ARM_BE8(setend be ) @ go BE8 if entered LE
33 33
34 /* Get coherency fabric base physical address */ 34 bl ll_add_cpu_to_smp_group
35 adr r0, 1f
36 ldr r1, [r0]
37 ldr r0, [r0, r1]
38 35
39 /* Read CPU id */ 36 bl ll_enable_coherency
40 mrc p15, 0, r1, c0, c0, 5
41 and r1, r1, #0xF
42 37
43 /* Add CPU to coherency fabric */
44 bl ll_set_cpu_coherent
45 b secondary_startup 38 b secondary_startup
46 39
47ENDPROC(armada_xp_secondary_startup) 40ENDPROC(armada_xp_secondary_startup)
48
49 .align 2
501:
51 .long coherency_phys_base - .
diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c
index 120207fc36f1..46f105913c84 100644
--- a/arch/arm/mach-mvebu/kirkwood.c
+++ b/arch/arm/mach-mvebu/kirkwood.c
@@ -169,7 +169,7 @@ static void __init kirkwood_dt_init(void)
169{ 169{
170 kirkwood_disable_mbus_error_propagation(); 170 kirkwood_disable_mbus_error_propagation();
171 171
172 BUG_ON(mvebu_mbus_dt_init()); 172 BUG_ON(mvebu_mbus_dt_init(false));
173 173
174#ifdef CONFIG_CACHE_FEROCEON_L2 174#ifdef CONFIG_CACHE_FEROCEON_L2
175 feroceon_of_init(); 175 feroceon_of_init();
@@ -180,9 +180,6 @@ static void __init kirkwood_dt_init(void)
180 kirkwood_pm_init(); 180 kirkwood_pm_init();
181 kirkwood_dt_eth_fixup(); 181 kirkwood_dt_eth_fixup();
182 182
183 if (of_machine_is_compatible("hp,t5325"))
184 t5325_init();
185
186 of_platform_populate(NULL, of_default_bus_match_table, auxdata, NULL); 183 of_platform_populate(NULL, of_default_bus_match_table, auxdata, NULL);
187} 184}
188 185
diff --git a/arch/arm/mach-mvebu/mvebu-soc-id.c b/arch/arm/mach-mvebu/mvebu-soc-id.c
index f3d4cf53f746..d0f35b4d4a23 100644
--- a/arch/arm/mach-mvebu/mvebu-soc-id.c
+++ b/arch/arm/mach-mvebu/mvebu-soc-id.c
@@ -23,6 +23,8 @@
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24#include <linux/of.h> 24#include <linux/of.h>
25#include <linux/of_address.h> 25#include <linux/of_address.h>
26#include <linux/slab.h>
27#include <linux/sys_soc.h>
26#include "mvebu-soc-id.h" 28#include "mvebu-soc-id.h"
27 29
28#define PCIE_DEV_ID_OFF 0x0 30#define PCIE_DEV_ID_OFF 0x0
@@ -108,7 +110,18 @@ static int __init mvebu_soc_id_init(void)
108 iounmap(pci_base); 110 iounmap(pci_base);
109 111
110res_ioremap: 112res_ioremap:
111 clk_disable_unprepare(clk); 113 /*
114 * If the PCIe unit is actually enabled and we have PCI
115 * support in the kernel, we intentionally do not release the
116 * reference to the clock. We want to keep it running since
117 * the bootloader does some PCIe link configuration that the
118 * kernel is for now unable to do, and gating the clock would
119 * make us loose this precious configuration.
120 */
121 if (!of_device_is_available(child) || !IS_ENABLED(CONFIG_PCI_MVEBU)) {
122 clk_disable_unprepare(clk);
123 clk_put(clk);
124 }
112 125
113clk_err: 126clk_err:
114 of_node_put(child); 127 of_node_put(child);
@@ -116,5 +129,33 @@ clk_err:
116 129
117 return ret; 130 return ret;
118} 131}
119core_initcall(mvebu_soc_id_init); 132early_initcall(mvebu_soc_id_init);
133
134static int __init mvebu_soc_device(void)
135{
136 struct soc_device_attribute *soc_dev_attr;
137 struct soc_device *soc_dev;
138
139 /* Also protects against running on non-mvebu systems */
140 if (!is_id_valid)
141 return 0;
142
143 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
144 if (!soc_dev_attr)
145 return -ENOMEM;
146
147 soc_dev_attr->family = kasprintf(GFP_KERNEL, "Marvell");
148 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%X", soc_rev);
149 soc_dev_attr->soc_id = kasprintf(GFP_KERNEL, "%X", soc_dev_id);
120 150
151 soc_dev = soc_device_register(soc_dev_attr);
152 if (IS_ERR(soc_dev)) {
153 kfree(soc_dev_attr->family);
154 kfree(soc_dev_attr->revision);
155 kfree(soc_dev_attr->soc_id);
156 kfree(soc_dev_attr);
157 }
158
159 return 0;
160}
161postcore_initcall(mvebu_soc_device);
diff --git a/arch/arm/mach-mvebu/mvebu-soc-id.h b/arch/arm/mach-mvebu/mvebu-soc-id.h
index 31654252fe35..c16bb68ca81f 100644
--- a/arch/arm/mach-mvebu/mvebu-soc-id.h
+++ b/arch/arm/mach-mvebu/mvebu-soc-id.h
@@ -20,6 +20,10 @@
20#define MV78XX0_A0_REV 0x1 20#define MV78XX0_A0_REV 0x1
21#define MV78XX0_B0_REV 0x2 21#define MV78XX0_B0_REV 0x2
22 22
23/* Armada 375 */
24#define ARMADA_375_Z1_REV 0x0
25#define ARMADA_375_A0_REV 0x3
26
23#ifdef CONFIG_ARCH_MVEBU 27#ifdef CONFIG_ARCH_MVEBU
24int mvebu_get_soc_id(u32 *dev, u32 *rev); 28int mvebu_get_soc_id(u32 *dev, u32 *rev);
25#else 29#else
diff --git a/arch/arm/mach-mvebu/platsmp-a9.c b/arch/arm/mach-mvebu/platsmp-a9.c
new file mode 100644
index 000000000000..96c2c59e34b6
--- /dev/null
+++ b/arch/arm/mach-mvebu/platsmp-a9.c
@@ -0,0 +1,102 @@
1/*
2 * Symmetric Multi Processing (SMP) support for Marvell EBU Cortex-A9
3 * based SOCs (Armada 375/38x).
4 *
5 * Copyright (C) 2014 Marvell
6 *
7 * Gregory CLEMENT <gregory.clement@free-electrons.com>
8 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#include <linux/init.h>
16#include <linux/io.h>
17#include <linux/of.h>
18#include <linux/smp.h>
19#include <linux/mbus.h>
20#include <asm/smp_scu.h>
21#include <asm/smp_plat.h>
22#include "common.h"
23#include "mvebu-soc-id.h"
24#include "pmsu.h"
25
26#define CRYPT0_ENG_ID 41
27#define CRYPT0_ENG_ATTR 0x1
28#define SRAM_PHYS_BASE 0xFFFF0000
29
30#define BOOTROM_BASE 0xFFF00000
31#define BOOTROM_SIZE 0x100000
32
33extern unsigned char armada_375_smp_cpu1_enable_code_end;
34extern unsigned char armada_375_smp_cpu1_enable_code_start;
35
36void armada_375_smp_cpu1_enable_wa(void)
37{
38 void __iomem *sram_virt_base;
39
40 mvebu_mbus_del_window(BOOTROM_BASE, BOOTROM_SIZE);
41 mvebu_mbus_add_window_by_id(CRYPT0_ENG_ID, CRYPT0_ENG_ATTR,
42 SRAM_PHYS_BASE, SZ_64K);
43 sram_virt_base = ioremap(SRAM_PHYS_BASE, SZ_64K);
44
45 memcpy(sram_virt_base, &armada_375_smp_cpu1_enable_code_start,
46 &armada_375_smp_cpu1_enable_code_end
47 - &armada_375_smp_cpu1_enable_code_start);
48}
49
50extern void mvebu_cortex_a9_secondary_startup(void);
51
52static int __cpuinit mvebu_cortex_a9_boot_secondary(unsigned int cpu,
53 struct task_struct *idle)
54{
55 int ret, hw_cpu;
56
57 pr_info("Booting CPU %d\n", cpu);
58
59 /*
60 * Write the address of secondary startup into the system-wide
61 * flags register. The boot monitor waits until it receives a
62 * soft interrupt, and then the secondary CPU branches to this
63 * address.
64 */
65 hw_cpu = cpu_logical_map(cpu);
66
67 if (of_machine_is_compatible("marvell,armada375")) {
68 u32 dev, rev;
69
70 if (mvebu_get_soc_id(&dev, &rev) == 0 &&
71 rev == ARMADA_375_Z1_REV)
72 armada_375_smp_cpu1_enable_wa();
73
74 mvebu_system_controller_set_cpu_boot_addr(mvebu_cortex_a9_secondary_startup);
75 }
76 else {
77 mvebu_pmsu_set_cpu_boot_addr(hw_cpu,
78 mvebu_cortex_a9_secondary_startup);
79 }
80
81 smp_wmb();
82 ret = mvebu_cpu_reset_deassert(hw_cpu);
83 if (ret) {
84 pr_err("Could not start the secondary CPU: %d\n", ret);
85 return ret;
86 }
87 arch_send_wakeup_ipi_mask(cpumask_of(cpu));
88
89 return 0;
90}
91
92static struct smp_operations mvebu_cortex_a9_smp_ops __initdata = {
93 .smp_boot_secondary = mvebu_cortex_a9_boot_secondary,
94#ifdef CONFIG_HOTPLUG_CPU
95 .cpu_die = armada_xp_cpu_die,
96#endif
97};
98
99CPU_METHOD_OF_DECLARE(mvebu_armada_375_smp, "marvell,armada-375-smp",
100 &mvebu_cortex_a9_smp_ops);
101CPU_METHOD_OF_DECLARE(mvebu_armada_380_smp, "marvell,armada-380-smp",
102 &mvebu_cortex_a9_smp_ops);
diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c
index a6da03f5b24e..88b976b31719 100644
--- a/arch/arm/mach-mvebu/platsmp.c
+++ b/arch/arm/mach-mvebu/platsmp.c
@@ -70,16 +70,19 @@ static void __init set_secondary_cpus_clock(void)
70 } 70 }
71} 71}
72 72
73static void armada_xp_secondary_init(unsigned int cpu)
74{
75 armada_xp_mpic_smp_cpu_init();
76}
77
78static int armada_xp_boot_secondary(unsigned int cpu, struct task_struct *idle) 73static int armada_xp_boot_secondary(unsigned int cpu, struct task_struct *idle)
79{ 74{
75 int ret, hw_cpu;
76
80 pr_info("Booting CPU %d\n", cpu); 77 pr_info("Booting CPU %d\n", cpu);
81 78
82 armada_xp_boot_cpu(cpu, armada_xp_secondary_startup); 79 hw_cpu = cpu_logical_map(cpu);
80 mvebu_pmsu_set_cpu_boot_addr(hw_cpu, armada_xp_secondary_startup);
81 ret = mvebu_cpu_reset_deassert(hw_cpu);
82 if (ret) {
83 pr_warn("unable to boot CPU: %d\n", ret);
84 return ret;
85 }
83 86
84 return 0; 87 return 0;
85} 88}
@@ -90,8 +93,6 @@ static void __init armada_xp_smp_init_cpus(void)
90 93
91 if (ncores == 0 || ncores > ARMADA_XP_MAX_CPUS) 94 if (ncores == 0 || ncores > ARMADA_XP_MAX_CPUS)
92 panic("Invalid number of CPUs in DT\n"); 95 panic("Invalid number of CPUs in DT\n");
93
94 set_smp_cross_call(armada_mpic_send_doorbell);
95} 96}
96 97
97static void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus) 98static void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus)
@@ -102,7 +103,7 @@ static void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus)
102 103
103 set_secondary_cpus_clock(); 104 set_secondary_cpus_clock();
104 flush_cache_all(); 105 flush_cache_all();
105 set_cpu_coherent(cpu_logical_map(smp_processor_id()), 0); 106 set_cpu_coherent();
106 107
107 /* 108 /*
108 * In order to boot the secondary CPUs we need to ensure 109 * In order to boot the secondary CPUs we need to ensure
@@ -124,9 +125,11 @@ static void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus)
124struct smp_operations armada_xp_smp_ops __initdata = { 125struct smp_operations armada_xp_smp_ops __initdata = {
125 .smp_init_cpus = armada_xp_smp_init_cpus, 126 .smp_init_cpus = armada_xp_smp_init_cpus,
126 .smp_prepare_cpus = armada_xp_smp_prepare_cpus, 127 .smp_prepare_cpus = armada_xp_smp_prepare_cpus,
127 .smp_secondary_init = armada_xp_secondary_init,
128 .smp_boot_secondary = armada_xp_boot_secondary, 128 .smp_boot_secondary = armada_xp_boot_secondary,
129#ifdef CONFIG_HOTPLUG_CPU 129#ifdef CONFIG_HOTPLUG_CPU
130 .cpu_die = armada_xp_cpu_die, 130 .cpu_die = armada_xp_cpu_die,
131#endif 131#endif
132}; 132};
133
134CPU_METHOD_OF_DECLARE(armada_xp_smp, "marvell,armada-xp-smp",
135 &armada_xp_smp_ops);
diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c
index d71ef53107c4..53a55c8520bf 100644
--- a/arch/arm/mach-mvebu/pmsu.c
+++ b/arch/arm/mach-mvebu/pmsu.c
@@ -16,62 +16,283 @@
16 * other SOC units 16 * other SOC units
17 */ 17 */
18 18
19#define pr_fmt(fmt) "mvebu-pmsu: " fmt
20
21#include <linux/cpu_pm.h>
19#include <linux/kernel.h> 22#include <linux/kernel.h>
20#include <linux/init.h> 23#include <linux/init.h>
21#include <linux/of_address.h> 24#include <linux/of_address.h>
22#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/platform_device.h>
23#include <linux/smp.h> 27#include <linux/smp.h>
28#include <linux/resource.h>
29#include <asm/cacheflush.h>
30#include <asm/cp15.h>
24#include <asm/smp_plat.h> 31#include <asm/smp_plat.h>
25#include "pmsu.h" 32#include <asm/suspend.h>
33#include <asm/tlbflush.h>
34#include "common.h"
26 35
27static void __iomem *pmsu_mp_base; 36static void __iomem *pmsu_mp_base;
28static void __iomem *pmsu_reset_base;
29 37
30#define PMSU_BOOT_ADDR_REDIRECT_OFFSET(cpu) ((cpu * 0x100) + 0x24) 38#define PMSU_BASE_OFFSET 0x100
31#define PMSU_RESET_CTL_OFFSET(cpu) (cpu * 0x8) 39#define PMSU_REG_SIZE 0x1000
40
41/* PMSU MP registers */
42#define PMSU_CONTROL_AND_CONFIG(cpu) ((cpu * 0x100) + 0x104)
43#define PMSU_CONTROL_AND_CONFIG_DFS_REQ BIT(18)
44#define PMSU_CONTROL_AND_CONFIG_PWDDN_REQ BIT(16)
45#define PMSU_CONTROL_AND_CONFIG_L2_PWDDN BIT(20)
46
47#define PMSU_CPU_POWER_DOWN_CONTROL(cpu) ((cpu * 0x100) + 0x108)
48
49#define PMSU_CPU_POWER_DOWN_DIS_SNP_Q_SKIP BIT(0)
50
51#define PMSU_STATUS_AND_MASK(cpu) ((cpu * 0x100) + 0x10c)
52#define PMSU_STATUS_AND_MASK_CPU_IDLE_WAIT BIT(16)
53#define PMSU_STATUS_AND_MASK_SNP_Q_EMPTY_WAIT BIT(17)
54#define PMSU_STATUS_AND_MASK_IRQ_WAKEUP BIT(20)
55#define PMSU_STATUS_AND_MASK_FIQ_WAKEUP BIT(21)
56#define PMSU_STATUS_AND_MASK_DBG_WAKEUP BIT(22)
57#define PMSU_STATUS_AND_MASK_IRQ_MASK BIT(24)
58#define PMSU_STATUS_AND_MASK_FIQ_MASK BIT(25)
59
60#define PMSU_BOOT_ADDR_REDIRECT_OFFSET(cpu) ((cpu * 0x100) + 0x124)
61
62/* PMSU fabric registers */
63#define L2C_NFABRIC_PM_CTL 0x4
64#define L2C_NFABRIC_PM_CTL_PWR_DOWN BIT(20)
65
66extern void ll_disable_coherency(void);
67extern void ll_enable_coherency(void);
68
69static struct platform_device armada_xp_cpuidle_device = {
70 .name = "cpuidle-armada-370-xp",
71};
32 72
33static struct of_device_id of_pmsu_table[] = { 73static struct of_device_id of_pmsu_table[] = {
34 {.compatible = "marvell,armada-370-xp-pmsu"}, 74 { .compatible = "marvell,armada-370-pmsu", },
75 { .compatible = "marvell,armada-370-xp-pmsu", },
76 { .compatible = "marvell,armada-380-pmsu", },
35 { /* end of list */ }, 77 { /* end of list */ },
36}; 78};
37 79
38#ifdef CONFIG_SMP 80void mvebu_pmsu_set_cpu_boot_addr(int hw_cpu, void *boot_addr)
39int armada_xp_boot_cpu(unsigned int cpu_id, void *boot_addr)
40{ 81{
41 int reg, hw_cpu; 82 writel(virt_to_phys(boot_addr), pmsu_mp_base +
83 PMSU_BOOT_ADDR_REDIRECT_OFFSET(hw_cpu));
84}
85
86static int __init armada_370_xp_pmsu_init(void)
87{
88 struct device_node *np;
89 struct resource res;
90 int ret = 0;
91
92 np = of_find_matching_node(NULL, of_pmsu_table);
93 if (!np)
94 return 0;
95
96 pr_info("Initializing Power Management Service Unit\n");
42 97
43 if (!pmsu_mp_base || !pmsu_reset_base) { 98 if (of_address_to_resource(np, 0, &res)) {
44 pr_warn("Can't boot CPU. PMSU is uninitialized\n"); 99 pr_err("unable to get resource\n");
45 return 1; 100 ret = -ENOENT;
101 goto out;
46 } 102 }
47 103
48 hw_cpu = cpu_logical_map(cpu_id); 104 if (of_device_is_compatible(np, "marvell,armada-370-xp-pmsu")) {
105 pr_warn(FW_WARN "deprecated pmsu binding\n");
106 res.start = res.start - PMSU_BASE_OFFSET;
107 res.end = res.start + PMSU_REG_SIZE - 1;
108 }
49 109
50 writel(virt_to_phys(boot_addr), pmsu_mp_base + 110 if (!request_mem_region(res.start, resource_size(&res),
51 PMSU_BOOT_ADDR_REDIRECT_OFFSET(hw_cpu)); 111 np->full_name)) {
112 pr_err("unable to request region\n");
113 ret = -EBUSY;
114 goto out;
115 }
116
117 pmsu_mp_base = ioremap(res.start, resource_size(&res));
118 if (!pmsu_mp_base) {
119 pr_err("unable to map registers\n");
120 release_mem_region(res.start, resource_size(&res));
121 ret = -ENOMEM;
122 goto out;
123 }
124
125 out:
126 of_node_put(np);
127 return ret;
128}
129
130static void armada_370_xp_pmsu_enable_l2_powerdown_onidle(void)
131{
132 u32 reg;
133
134 if (pmsu_mp_base == NULL)
135 return;
136
137 /* Enable L2 & Fabric powerdown in Deep-Idle mode - Fabric */
138 reg = readl(pmsu_mp_base + L2C_NFABRIC_PM_CTL);
139 reg |= L2C_NFABRIC_PM_CTL_PWR_DOWN;
140 writel(reg, pmsu_mp_base + L2C_NFABRIC_PM_CTL);
141}
142
143static void armada_370_xp_cpu_resume(void)
144{
145 asm volatile("bl ll_add_cpu_to_smp_group\n\t"
146 "bl ll_enable_coherency\n\t"
147 "b cpu_resume\n\t");
148}
149
150/* No locking is needed because we only access per-CPU registers */
151void armada_370_xp_pmsu_idle_prepare(bool deepidle)
152{
153 unsigned int hw_cpu = cpu_logical_map(smp_processor_id());
154 u32 reg;
155
156 if (pmsu_mp_base == NULL)
157 return;
52 158
53 /* Release CPU from reset by clearing reset bit*/ 159 /*
54 reg = readl(pmsu_reset_base + PMSU_RESET_CTL_OFFSET(hw_cpu)); 160 * Adjust the PMSU configuration to wait for WFI signal, enable
55 reg &= (~0x1); 161 * IRQ and FIQ as wakeup events, set wait for snoop queue empty
56 writel(reg, pmsu_reset_base + PMSU_RESET_CTL_OFFSET(hw_cpu)); 162 * indication and mask IRQ and FIQ from CPU
163 */
164 reg = readl(pmsu_mp_base + PMSU_STATUS_AND_MASK(hw_cpu));
165 reg |= PMSU_STATUS_AND_MASK_CPU_IDLE_WAIT |
166 PMSU_STATUS_AND_MASK_IRQ_WAKEUP |
167 PMSU_STATUS_AND_MASK_FIQ_WAKEUP |
168 PMSU_STATUS_AND_MASK_SNP_Q_EMPTY_WAIT |
169 PMSU_STATUS_AND_MASK_IRQ_MASK |
170 PMSU_STATUS_AND_MASK_FIQ_MASK;
171 writel(reg, pmsu_mp_base + PMSU_STATUS_AND_MASK(hw_cpu));
172
173 reg = readl(pmsu_mp_base + PMSU_CONTROL_AND_CONFIG(hw_cpu));
174 /* ask HW to power down the L2 Cache if needed */
175 if (deepidle)
176 reg |= PMSU_CONTROL_AND_CONFIG_L2_PWDDN;
177
178 /* request power down */
179 reg |= PMSU_CONTROL_AND_CONFIG_PWDDN_REQ;
180 writel(reg, pmsu_mp_base + PMSU_CONTROL_AND_CONFIG(hw_cpu));
181
182 /* Disable snoop disable by HW - SW is taking care of it */
183 reg = readl(pmsu_mp_base + PMSU_CPU_POWER_DOWN_CONTROL(hw_cpu));
184 reg |= PMSU_CPU_POWER_DOWN_DIS_SNP_Q_SKIP;
185 writel(reg, pmsu_mp_base + PMSU_CPU_POWER_DOWN_CONTROL(hw_cpu));
186}
187
188static noinline int do_armada_370_xp_cpu_suspend(unsigned long deepidle)
189{
190 armada_370_xp_pmsu_idle_prepare(deepidle);
191
192 v7_exit_coherency_flush(all);
193
194 ll_disable_coherency();
195
196 dsb();
197
198 wfi();
199
200 /* If we are here, wfi failed. As processors run out of
201 * coherency for some time, tlbs might be stale, so flush them
202 */
203 local_flush_tlb_all();
204
205 ll_enable_coherency();
206
207 /* Test the CR_C bit and set it if it was cleared */
208 asm volatile(
209 "mrc p15, 0, %0, c1, c0, 0 \n\t"
210 "tst %0, #(1 << 2) \n\t"
211 "orreq %0, %0, #(1 << 2) \n\t"
212 "mcreq p15, 0, %0, c1, c0, 0 \n\t"
213 "isb "
214 : : "r" (0));
215
216 pr_warn("Failed to suspend the system\n");
57 217
58 return 0; 218 return 0;
59} 219}
60#endif
61 220
62static int __init armada_370_xp_pmsu_init(void) 221static int armada_370_xp_cpu_suspend(unsigned long deepidle)
222{
223 return cpu_suspend(deepidle, do_armada_370_xp_cpu_suspend);
224}
225
226/* No locking is needed because we only access per-CPU registers */
227static noinline void armada_370_xp_pmsu_idle_restore(void)
228{
229 unsigned int hw_cpu = cpu_logical_map(smp_processor_id());
230 u32 reg;
231
232 if (pmsu_mp_base == NULL)
233 return;
234
235 /* cancel ask HW to power down the L2 Cache if possible */
236 reg = readl(pmsu_mp_base + PMSU_CONTROL_AND_CONFIG(hw_cpu));
237 reg &= ~PMSU_CONTROL_AND_CONFIG_L2_PWDDN;
238 writel(reg, pmsu_mp_base + PMSU_CONTROL_AND_CONFIG(hw_cpu));
239
240 /* cancel Enable wakeup events and mask interrupts */
241 reg = readl(pmsu_mp_base + PMSU_STATUS_AND_MASK(hw_cpu));
242 reg &= ~(PMSU_STATUS_AND_MASK_IRQ_WAKEUP | PMSU_STATUS_AND_MASK_FIQ_WAKEUP);
243 reg &= ~PMSU_STATUS_AND_MASK_CPU_IDLE_WAIT;
244 reg &= ~PMSU_STATUS_AND_MASK_SNP_Q_EMPTY_WAIT;
245 reg &= ~(PMSU_STATUS_AND_MASK_IRQ_MASK | PMSU_STATUS_AND_MASK_FIQ_MASK);
246 writel(reg, pmsu_mp_base + PMSU_STATUS_AND_MASK(hw_cpu));
247}
248
249static int armada_370_xp_cpu_pm_notify(struct notifier_block *self,
250 unsigned long action, void *hcpu)
251{
252 if (action == CPU_PM_ENTER) {
253 unsigned int hw_cpu = cpu_logical_map(smp_processor_id());
254 mvebu_pmsu_set_cpu_boot_addr(hw_cpu, armada_370_xp_cpu_resume);
255 } else if (action == CPU_PM_EXIT) {
256 armada_370_xp_pmsu_idle_restore();
257 }
258
259 return NOTIFY_OK;
260}
261
262static struct notifier_block armada_370_xp_cpu_pm_notifier = {
263 .notifier_call = armada_370_xp_cpu_pm_notify,
264};
265
266int __init armada_370_xp_cpu_pm_init(void)
63{ 267{
64 struct device_node *np; 268 struct device_node *np;
65 269
270 /*
271 * Check that all the requirements are available to enable
272 * cpuidle. So far, it is only supported on Armada XP, cpuidle
273 * needs the coherency fabric and the PMSU enabled
274 */
275
276 if (!of_machine_is_compatible("marvell,armadaxp"))
277 return 0;
278
279 np = of_find_compatible_node(NULL, NULL, "marvell,coherency-fabric");
280 if (!np)
281 return 0;
282 of_node_put(np);
283
66 np = of_find_matching_node(NULL, of_pmsu_table); 284 np = of_find_matching_node(NULL, of_pmsu_table);
67 if (np) { 285 if (!np)
68 pr_info("Initializing Power Management Service Unit\n"); 286 return 0;
69 pmsu_mp_base = of_iomap(np, 0); 287 of_node_put(np);
70 pmsu_reset_base = of_iomap(np, 1); 288
71 of_node_put(np); 289 armada_370_xp_pmsu_enable_l2_powerdown_onidle();
72 } 290 armada_xp_cpuidle_device.dev.platform_data = armada_370_xp_cpu_suspend;
291 platform_device_register(&armada_xp_cpuidle_device);
292 cpu_pm_register_notifier(&armada_370_xp_cpu_pm_notifier);
73 293
74 return 0; 294 return 0;
75} 295}
76 296
297arch_initcall(armada_370_xp_cpu_pm_init);
77early_initcall(armada_370_xp_pmsu_init); 298early_initcall(armada_370_xp_pmsu_init);
diff --git a/arch/arm/mach-mvebu/system-controller.c b/arch/arm/mach-mvebu/system-controller.c
index 614ba6832ff3..0c5524ac75b7 100644
--- a/arch/arm/mach-mvebu/system-controller.c
+++ b/arch/arm/mach-mvebu/system-controller.c
@@ -37,6 +37,8 @@ struct mvebu_system_controller {
37 37
38 u32 rstoutn_mask_reset_out_en; 38 u32 rstoutn_mask_reset_out_en;
39 u32 system_soft_reset; 39 u32 system_soft_reset;
40
41 u32 resume_boot_addr;
40}; 42};
41static struct mvebu_system_controller *mvebu_sc; 43static struct mvebu_system_controller *mvebu_sc;
42 44
@@ -52,6 +54,7 @@ static const struct mvebu_system_controller armada_375_system_controller = {
52 .system_soft_reset_offset = 0x58, 54 .system_soft_reset_offset = 0x58,
53 .rstoutn_mask_reset_out_en = 0x1, 55 .rstoutn_mask_reset_out_en = 0x1,
54 .system_soft_reset = 0x1, 56 .system_soft_reset = 0x1,
57 .resume_boot_addr = 0xd4,
55}; 58};
56 59
57static const struct mvebu_system_controller orion_system_controller = { 60static const struct mvebu_system_controller orion_system_controller = {
@@ -98,6 +101,16 @@ void mvebu_restart(enum reboot_mode mode, const char *cmd)
98 ; 101 ;
99} 102}
100 103
104#ifdef CONFIG_SMP
105void mvebu_system_controller_set_cpu_boot_addr(void *boot_addr)
106{
107 BUG_ON(system_controller_base == NULL);
108 BUG_ON(mvebu_sc->resume_boot_addr == 0);
109 writel(virt_to_phys(boot_addr), system_controller_base +
110 mvebu_sc->resume_boot_addr);
111}
112#endif
113
101static int __init mvebu_system_controller_init(void) 114static int __init mvebu_system_controller_init(void)
102{ 115{
103 const struct of_device_id *match; 116 const struct of_device_id *match;
@@ -114,4 +127,4 @@ static int __init mvebu_system_controller_init(void)
114 return 0; 127 return 0;
115} 128}
116 129
117arch_initcall(mvebu_system_controller_init); 130early_initcall(mvebu_system_controller_init);
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c
index 4a1065e41e9c..9116ca476d7c 100644
--- a/arch/arm/mach-nomadik/cpu-8815.c
+++ b/arch/arm/mach-nomadik/cpu-8815.c
@@ -143,23 +143,16 @@ static int __init cpu8815_mmcsd_init(void)
143} 143}
144device_initcall(cpu8815_mmcsd_init); 144device_initcall(cpu8815_mmcsd_init);
145 145
146static void __init cpu8815_init_of(void)
147{
148#ifdef CONFIG_CACHE_L2X0
149 /* At full speed latency must be >=2, so 0x249 in low bits */
150 l2x0_of_init(0x00730249, 0xfe000fff);
151#endif
152 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
153}
154
155static const char * cpu8815_board_compat[] = { 146static const char * cpu8815_board_compat[] = {
156 "calaosystems,usb-s8815", 147 "calaosystems,usb-s8815",
157 NULL, 148 NULL,
158}; 149};
159 150
160DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815") 151DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815")
152 /* At full speed latency must be >=2, so 0x249 in low bits */
153 .l2c_aux_val = 0x00700249,
154 .l2c_aux_mask = 0xfe0fefff,
161 .map_io = cpu8815_map_io, 155 .map_io = cpu8815_map_io,
162 .init_machine = cpu8815_init_of,
163 .restart = cpu8815_restart, 156 .restart = cpu8815_restart,
164 .dt_compat = cpu8815_board_compat, 157 .dt_compat = cpu8815_board_compat,
165MACHINE_END 158MACHINE_END
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 65d2acb31498..5b45d266d83e 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -346,7 +346,7 @@ static struct omap_usb_config h2_usb_config __initdata = {
346 /* usb1 has a Mini-AB port and external isp1301 transceiver */ 346 /* usb1 has a Mini-AB port and external isp1301 transceiver */
347 .otg = 2, 347 .otg = 2,
348 348
349#ifdef CONFIG_USB_GADGET_OMAP 349#if IS_ENABLED(CONFIG_USB_OMAP)
350 .hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled */ 350 .hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled */
351 /* .hmc_mode = 21,*/ /* 0:host(off) 1:dev(loopback) 2:host(loopback) */ 351 /* .hmc_mode = 21,*/ /* 0:host(off) 1:dev(loopback) 2:host(loopback) */
352#elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) 352#elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 816ecd13f81e..bfed4f928663 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -366,7 +366,7 @@ static struct omap_usb_config h3_usb_config __initdata = {
366 /* usb1 has a Mini-AB port and external isp1301 transceiver */ 366 /* usb1 has a Mini-AB port and external isp1301 transceiver */
367 .otg = 2, 367 .otg = 2,
368 368
369#ifdef CONFIG_USB_GADGET_OMAP 369#if IS_ENABLED(CONFIG_USB_OMAP)
370 .hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled */ 370 .hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled */
371#elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) 371#elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
372 /* NONSTANDARD CABLE NEEDED (B-to-Mini-B) */ 372 /* NONSTANDARD CABLE NEEDED (B-to-Mini-B) */
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
index bd5f02e9c354..c49ce83cc1eb 100644
--- a/arch/arm/mach-omap1/board-innovator.c
+++ b/arch/arm/mach-omap1/board-innovator.c
@@ -312,7 +312,7 @@ static struct omap_usb_config h2_usb_config __initdata = {
312 /* usb1 has a Mini-AB port and external isp1301 transceiver */ 312 /* usb1 has a Mini-AB port and external isp1301 transceiver */
313 .otg = 2, 313 .otg = 2,
314 314
315#ifdef CONFIG_USB_GADGET_OMAP 315#if IS_ENABLED(CONFIG_USB_OMAP)
316 .hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled */ 316 .hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled */
317 /* .hmc_mode = 21,*/ /* 0:host(off) 1:dev(loopback) 2:host(loopback) */ 317 /* .hmc_mode = 21,*/ /* 0:host(off) 1:dev(loopback) 2:host(loopback) */
318#elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) 318#elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index 3a0262156e93..7436d4cf6596 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -283,7 +283,7 @@ static struct omap_usb_config osk_usb_config __initdata = {
283 * be used, with a NONSTANDARD gender-bending cable/dongle, as 283 * be used, with a NONSTANDARD gender-bending cable/dongle, as
284 * a peripheral. 284 * a peripheral.
285 */ 285 */
286#ifdef CONFIG_USB_GADGET_OMAP 286#if IS_ENABLED(CONFIG_USB_OMAP)
287 .register_dev = 1, 287 .register_dev = 1,
288 .hmc_mode = 0, 288 .hmc_mode = 0,
289#else 289#else
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c
index 0a8d3349149c..29e526235dc2 100644
--- a/arch/arm/mach-omap1/board-sx1.c
+++ b/arch/arm/mach-omap1/board-sx1.c
@@ -266,31 +266,6 @@ static struct physmap_flash_data sx1_flash_data = {
266 .nr_parts = ARRAY_SIZE(sx1_partitions), 266 .nr_parts = ARRAY_SIZE(sx1_partitions),
267}; 267};
268 268
269#ifdef CONFIG_SX1_OLD_FLASH
270/* MTD Intel StrataFlash - old flashes */
271static struct resource sx1_old_flash_resource[] = {
272 [0] = {
273 .start = OMAP_CS0_PHYS, /* Physical */
274 .end = OMAP_CS0_PHYS + SZ_16M - 1,,
275 .flags = IORESOURCE_MEM,
276 },
277 [1] = {
278 .start = OMAP_CS1_PHYS,
279 .end = OMAP_CS1_PHYS + SZ_8M - 1,
280 .flags = IORESOURCE_MEM,
281 },
282};
283
284static struct platform_device sx1_flash_device = {
285 .name = "physmap-flash",
286 .id = 0,
287 .dev = {
288 .platform_data = &sx1_flash_data,
289 },
290 .num_resources = 2,
291 .resource = &sx1_old_flash_resource,
292};
293#else
294/* MTD Intel 4000 flash - new flashes */ 269/* MTD Intel 4000 flash - new flashes */
295static struct resource sx1_new_flash_resource = { 270static struct resource sx1_new_flash_resource = {
296 .start = OMAP_CS0_PHYS, 271 .start = OMAP_CS0_PHYS,
@@ -307,7 +282,6 @@ static struct platform_device sx1_flash_device = {
307 .num_resources = 1, 282 .num_resources = 1,
308 .resource = &sx1_new_flash_resource, 283 .resource = &sx1_new_flash_resource,
309}; 284};
310#endif
311 285
312/*----------- USB -------------------------*/ 286/*----------- USB -------------------------*/
313 287
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index dbee729e3b6d..34b4c0044961 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -123,19 +123,8 @@ void omap1_pm_idle(void)
123#warning Enable 32kHz OS timer in order to allow sleep states in idle 123#warning Enable 32kHz OS timer in order to allow sleep states in idle
124 use_idlect1 = use_idlect1 & ~(1 << 9); 124 use_idlect1 = use_idlect1 & ~(1 << 9);
125#else 125#else
126 126 if (enable_dyn_sleep)
127 while (enable_dyn_sleep) {
128
129#ifdef CONFIG_CBUS_TAHVO_USB
130 extern int vbus_active;
131 /* Clock requirements? */
132 if (vbus_active)
133 break;
134#endif
135 do_sleep = 1; 127 do_sleep = 1;
136 break;
137 }
138
139#endif 128#endif
140 129
141#ifdef CONFIG_OMAP_DM_TIMER 130#ifdef CONFIG_OMAP_DM_TIMER
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index cb31d4390d52..0ba482638ebf 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -65,6 +65,7 @@ config SOC_AM43XX
65 select ARCH_HAS_OPP 65 select ARCH_HAS_OPP
66 select ARM_GIC 66 select ARM_GIC
67 select MACH_OMAP_GENERIC 67 select MACH_OMAP_GENERIC
68 select MIGHT_HAVE_CACHE_L2X0
68 69
69config SOC_DRA7XX 70config SOC_DRA7XX
70 bool "TI DRA7XX" 71 bool "TI DRA7XX"
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 543d9a882de3..4f9383cecf76 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -262,12 +262,7 @@ static struct usbhs_phy_data phy_data[] __initdata = {
262 262
263static struct usbhs_omap_platform_data usbhs_bdata __initdata = { 263static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
264 .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, 264 .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
265#if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \
266 defined(CONFIG_PANEL_SHARP_LQ043T1DG01_MODULE)
267 .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
268#else
269 .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, 265 .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
270#endif
271}; 266};
272 267
273#ifdef CONFIG_OMAP_MUX 268#ifdef CONFIG_OMAP_MUX
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c
index ac82512b9c8c..e87f2a83d6bf 100644
--- a/arch/arm/mach-omap2/board-flash.c
+++ b/arch/arm/mach-omap2/board-flash.c
@@ -142,7 +142,7 @@ __init board_nand_init(struct mtd_partition *nand_parts, u8 nr_parts, u8 cs,
142 board_nand_data.nr_parts = nr_parts; 142 board_nand_data.nr_parts = nr_parts;
143 board_nand_data.devsize = nand_type; 143 board_nand_data.devsize = nand_type;
144 144
145 board_nand_data.ecc_opt = OMAP_ECC_BCH8_CODE_HW; 145 board_nand_data.ecc_opt = OMAP_ECC_HAM1_CODE_HW;
146 gpmc_nand_init(&board_nand_data, gpmc_t); 146 gpmc_nand_init(&board_nand_data, gpmc_t);
147} 147}
148#endif /* CONFIG_MTD_NAND_OMAP2 || CONFIG_MTD_NAND_OMAP2_MODULE */ 148#endif /* CONFIG_MTD_NAND_OMAP2 || CONFIG_MTD_NAND_OMAP2_MODULE */
@@ -160,13 +160,13 @@ static u8 get_gpmc0_type(void)
160 if (!fpga_map_addr) 160 if (!fpga_map_addr)
161 return -ENOMEM; 161 return -ENOMEM;
162 162
163 if (!(__raw_readw(fpga_map_addr + REG_FPGA_REV))) 163 if (!(readw_relaxed(fpga_map_addr + REG_FPGA_REV)))
164 /* we dont have an DEBUG FPGA??? */ 164 /* we dont have an DEBUG FPGA??? */
165 /* Depend on #defines!! default to strata boot return param */ 165 /* Depend on #defines!! default to strata boot return param */
166 goto unmap; 166 goto unmap;
167 167
168 /* S8-DIP-OFF = 1, S8-DIP-ON = 0 */ 168 /* S8-DIP-OFF = 1, S8-DIP-ON = 0 */
169 cs = __raw_readw(fpga_map_addr + REG_FPGA_DIP_SWITCH_INPUT2) & 0xf; 169 cs = readw_relaxed(fpga_map_addr + REG_FPGA_DIP_SWITCH_INPUT2) & 0xf;
170 170
171 /* ES2.0 SDP's onwards 4 dip switches are provided for CS */ 171 /* ES2.0 SDP's onwards 4 dip switches are provided for CS */
172 if (omap_rev() >= OMAP3430_REV_ES1_0) 172 if (omap_rev() >= OMAP3430_REV_ES1_0)
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index b8920b6bc104..9480997ba616 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -43,7 +43,7 @@ static void __init omap_generic_init(void)
43} 43}
44 44
45#ifdef CONFIG_SOC_OMAP2420 45#ifdef CONFIG_SOC_OMAP2420
46static const char *omap242x_boards_compat[] __initdata = { 46static const char *omap242x_boards_compat[] __initconst = {
47 "ti,omap2420", 47 "ti,omap2420",
48 NULL, 48 NULL,
49}; 49};
@@ -62,7 +62,7 @@ MACHINE_END
62#endif 62#endif
63 63
64#ifdef CONFIG_SOC_OMAP2430 64#ifdef CONFIG_SOC_OMAP2430
65static const char *omap243x_boards_compat[] __initdata = { 65static const char *omap243x_boards_compat[] __initconst = {
66 "ti,omap2430", 66 "ti,omap2430",
67 NULL, 67 NULL,
68}; 68};
@@ -81,7 +81,7 @@ MACHINE_END
81#endif 81#endif
82 82
83#ifdef CONFIG_ARCH_OMAP3 83#ifdef CONFIG_ARCH_OMAP3
84static const char *omap3_boards_compat[] __initdata = { 84static const char *omap3_boards_compat[] __initconst = {
85 "ti,omap3430", 85 "ti,omap3430",
86 "ti,omap3", 86 "ti,omap3",
87 NULL, 87 NULL,
@@ -100,7 +100,7 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
100 .restart = omap3xxx_restart, 100 .restart = omap3xxx_restart,
101MACHINE_END 101MACHINE_END
102 102
103static const char *omap36xx_boards_compat[] __initdata = { 103static const char *omap36xx_boards_compat[] __initconst = {
104 "ti,omap36xx", 104 "ti,omap36xx",
105 NULL, 105 NULL,
106}; 106};
@@ -118,7 +118,7 @@ DT_MACHINE_START(OMAP36XX_DT, "Generic OMAP36xx (Flattened Device Tree)")
118 .restart = omap3xxx_restart, 118 .restart = omap3xxx_restart,
119MACHINE_END 119MACHINE_END
120 120
121static const char *omap3_gp_boards_compat[] __initdata = { 121static const char *omap3_gp_boards_compat[] __initconst = {
122 "ti,omap3-beagle", 122 "ti,omap3-beagle",
123 "timll,omap3-devkit8000", 123 "timll,omap3-devkit8000",
124 NULL, 124 NULL,
@@ -137,7 +137,7 @@ DT_MACHINE_START(OMAP3_GP_DT, "Generic OMAP3-GP (Flattened Device Tree)")
137 .restart = omap3xxx_restart, 137 .restart = omap3xxx_restart,
138MACHINE_END 138MACHINE_END
139 139
140static const char *am3517_boards_compat[] __initdata = { 140static const char *am3517_boards_compat[] __initconst = {
141 "ti,am3517", 141 "ti,am3517",
142 NULL, 142 NULL,
143}; 143};
@@ -157,7 +157,7 @@ MACHINE_END
157#endif 157#endif
158 158
159#ifdef CONFIG_SOC_AM33XX 159#ifdef CONFIG_SOC_AM33XX
160static const char *am33xx_boards_compat[] __initdata = { 160static const char *am33xx_boards_compat[] __initconst = {
161 "ti,am33xx", 161 "ti,am33xx",
162 NULL, 162 NULL,
163}; 163};
@@ -177,7 +177,7 @@ MACHINE_END
177#endif 177#endif
178 178
179#ifdef CONFIG_ARCH_OMAP4 179#ifdef CONFIG_ARCH_OMAP4
180static const char *omap4_boards_compat[] __initdata = { 180static const char *omap4_boards_compat[] __initconst = {
181 "ti,omap4460", 181 "ti,omap4460",
182 "ti,omap4430", 182 "ti,omap4430",
183 "ti,omap4", 183 "ti,omap4",
@@ -199,7 +199,7 @@ MACHINE_END
199#endif 199#endif
200 200
201#ifdef CONFIG_SOC_OMAP5 201#ifdef CONFIG_SOC_OMAP5
202static const char *omap5_boards_compat[] __initdata = { 202static const char *omap5_boards_compat[] __initconst = {
203 "ti,omap5432", 203 "ti,omap5432",
204 "ti,omap5430", 204 "ti,omap5430",
205 "ti,omap5", 205 "ti,omap5",
@@ -221,7 +221,7 @@ MACHINE_END
221#endif 221#endif
222 222
223#ifdef CONFIG_SOC_AM43XX 223#ifdef CONFIG_SOC_AM43XX
224static const char *am43_boards_compat[] __initdata = { 224static const char *am43_boards_compat[] __initconst = {
225 "ti,am4372", 225 "ti,am4372",
226 "ti,am43", 226 "ti,am43",
227 NULL, 227 NULL,
@@ -240,13 +240,13 @@ MACHINE_END
240#endif 240#endif
241 241
242#ifdef CONFIG_SOC_DRA7XX 242#ifdef CONFIG_SOC_DRA7XX
243static const char *dra7xx_boards_compat[] __initdata = { 243static const char *dra74x_boards_compat[] __initconst = {
244 "ti,dra7xx", 244 "ti,dra742",
245 "ti,dra7", 245 "ti,dra7",
246 NULL, 246 NULL,
247}; 247};
248 248
249DT_MACHINE_START(DRA7XX_DT, "Generic DRA7XX (Flattened Device Tree)") 249DT_MACHINE_START(DRA74X_DT, "Generic DRA74X (Flattened Device Tree)")
250 .reserve = omap_reserve, 250 .reserve = omap_reserve,
251 .smp = smp_ops(omap4_smp_ops), 251 .smp = smp_ops(omap4_smp_ops),
252 .map_io = omap5_map_io, 252 .map_io = omap5_map_io,
@@ -255,7 +255,24 @@ DT_MACHINE_START(DRA7XX_DT, "Generic DRA7XX (Flattened Device Tree)")
255 .init_irq = omap_gic_of_init, 255 .init_irq = omap_gic_of_init,
256 .init_machine = omap_generic_init, 256 .init_machine = omap_generic_init,
257 .init_time = omap5_realtime_timer_init, 257 .init_time = omap5_realtime_timer_init,
258 .dt_compat = dra7xx_boards_compat, 258 .dt_compat = dra74x_boards_compat,
259 .restart = omap44xx_restart,
260MACHINE_END
261
262static const char *dra72x_boards_compat[] __initconst = {
263 "ti,dra722",
264 NULL,
265};
266
267DT_MACHINE_START(DRA72X_DT, "Generic DRA72X (Flattened Device Tree)")
268 .reserve = omap_reserve,
269 .map_io = omap5_map_io,
270 .init_early = dra7xx_init_early,
271 .init_late = dra7xx_init_late,
272 .init_irq = omap_gic_of_init,
273 .init_machine = omap_generic_init,
274 .init_time = omap5_realtime_timer_init,
275 .dt_compat = dra72x_boards_compat,
259 .restart = omap44xx_restart, 276 .restart = omap44xx_restart,
260MACHINE_END 277MACHINE_END
261#endif 278#endif
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index d6ed819ff15c..660bfc5a70d7 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -33,7 +33,6 @@
33#include <linux/mtd/nand.h> 33#include <linux/mtd/nand.h>
34#include <linux/mmc/host.h> 34#include <linux/mmc/host.h>
35#include <linux/usb/phy.h> 35#include <linux/usb/phy.h>
36#include <linux/usb/usb_phy_gen_xceiv.h>
37 36
38#include <linux/regulator/machine.h> 37#include <linux/regulator/machine.h>
39#include <linux/i2c/twl.h> 38#include <linux/i2c/twl.h>
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 119efaf5808a..a2e035e0792a 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -121,11 +121,7 @@ static struct platform_device omap3stalker_tfp410_device = {
121static struct connector_atv_platform_data omap3stalker_tv_pdata = { 121static struct connector_atv_platform_data omap3stalker_tv_pdata = {
122 .name = "tv", 122 .name = "tv",
123 .source = "venc.0", 123 .source = "venc.0",
124#if defined(CONFIG_OMAP2_VENC_OUT_TYPE_SVIDEO)
125 .connector_type = OMAP_DSS_VENC_TYPE_SVIDEO,
126#elif defined(CONFIG_OMAP2_VENC_OUT_TYPE_COMPOSITE)
127 .connector_type = OMAP_DSS_VENC_TYPE_COMPOSITE, 124 .connector_type = OMAP_DSS_VENC_TYPE_COMPOSITE,
128#endif
129 .invert_polarity = false, 125 .invert_polarity = false,
130}; 126};
131 127
diff --git a/arch/arm/mach-omap2/cclock3xxx_data.c b/arch/arm/mach-omap2/cclock3xxx_data.c
index 8f5121b89688..eb8c75ec3b1a 100644
--- a/arch/arm/mach-omap2/cclock3xxx_data.c
+++ b/arch/arm/mach-omap2/cclock3xxx_data.c
@@ -456,7 +456,8 @@ static struct clk_hw_omap dpll4_m5x2_ck_hw = {
456 .clkdm_name = "dpll4_clkdm", 456 .clkdm_name = "dpll4_clkdm",
457}; 457};
458 458
459DEFINE_STRUCT_CLK(dpll4_m5x2_ck, dpll4_m5x2_ck_parent_names, dpll4_m5x2_ck_ops); 459DEFINE_STRUCT_CLK_FLAGS(dpll4_m5x2_ck, dpll4_m5x2_ck_parent_names,
460 dpll4_m5x2_ck_ops, CLK_SET_RATE_PARENT);
460 461
461static struct clk dpll4_m5x2_ck_3630 = { 462static struct clk dpll4_m5x2_ck_3630 = {
462 .name = "dpll4_m5x2_ck", 463 .name = "dpll4_m5x2_ck",
diff --git a/arch/arm/mach-omap2/clkt2xxx_dpllcore.c b/arch/arm/mach-omap2/clkt2xxx_dpllcore.c
index 3ff32543493c..59cf310bc1e9 100644
--- a/arch/arm/mach-omap2/clkt2xxx_dpllcore.c
+++ b/arch/arm/mach-omap2/clkt2xxx_dpllcore.c
@@ -138,7 +138,7 @@ int omap2_reprogram_dpllcore(struct clk_hw *hw, unsigned long rate,
138 if (!dd) 138 if (!dd)
139 return -EINVAL; 139 return -EINVAL;
140 140
141 tmpset.cm_clksel1_pll = __raw_readl(dd->mult_div1_reg); 141 tmpset.cm_clksel1_pll = readl_relaxed(dd->mult_div1_reg);
142 tmpset.cm_clksel1_pll &= ~(dd->mult_mask | 142 tmpset.cm_clksel1_pll &= ~(dd->mult_mask |
143 dd->div1_mask); 143 dd->div1_mask);
144 div = ((curr_prcm_set->xtal_speed / 1000000) - 1); 144 div = ((curr_prcm_set->xtal_speed / 1000000) - 1);
diff --git a/arch/arm/mach-omap2/clkt2xxx_osc.c b/arch/arm/mach-omap2/clkt2xxx_osc.c
index 19f54d433490..0717dff1bc04 100644
--- a/arch/arm/mach-omap2/clkt2xxx_osc.c
+++ b/arch/arm/mach-omap2/clkt2xxx_osc.c
@@ -39,9 +39,9 @@ int omap2_enable_osc_ck(struct clk_hw *clk)
39{ 39{
40 u32 pcc; 40 u32 pcc;
41 41
42 pcc = __raw_readl(prcm_clksrc_ctrl); 42 pcc = readl_relaxed(prcm_clksrc_ctrl);
43 43
44 __raw_writel(pcc & ~OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl); 44 writel_relaxed(pcc & ~OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl);
45 45
46 return 0; 46 return 0;
47} 47}
@@ -57,9 +57,9 @@ void omap2_disable_osc_ck(struct clk_hw *clk)
57{ 57{
58 u32 pcc; 58 u32 pcc;
59 59
60 pcc = __raw_readl(prcm_clksrc_ctrl); 60 pcc = readl_relaxed(prcm_clksrc_ctrl);
61 61
62 __raw_writel(pcc | OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl); 62 writel_relaxed(pcc | OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl);
63} 63}
64 64
65unsigned long omap2_osc_clk_recalc(struct clk_hw *clk, 65unsigned long omap2_osc_clk_recalc(struct clk_hw *clk,
diff --git a/arch/arm/mach-omap2/clkt2xxx_sys.c b/arch/arm/mach-omap2/clkt2xxx_sys.c
index f467d072cd02..58dd3a9b726c 100644
--- a/arch/arm/mach-omap2/clkt2xxx_sys.c
+++ b/arch/arm/mach-omap2/clkt2xxx_sys.c
@@ -33,7 +33,7 @@ u32 omap2xxx_get_sysclkdiv(void)
33{ 33{
34 u32 div; 34 u32 div;
35 35
36 div = __raw_readl(prcm_clksrc_ctrl); 36 div = readl_relaxed(prcm_clksrc_ctrl);
37 div &= OMAP_SYSCLKDIV_MASK; 37 div &= OMAP_SYSCLKDIV_MASK;
38 div >>= OMAP_SYSCLKDIV_SHIFT; 38 div >>= OMAP_SYSCLKDIV_SHIFT;
39 39
diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h
index f17f00697cc0..82c37b1becc4 100644
--- a/arch/arm/mach-omap2/clockdomain.h
+++ b/arch/arm/mach-omap2/clockdomain.h
@@ -18,7 +18,6 @@
18 18
19#include "powerdomain.h" 19#include "powerdomain.h"
20#include "clock.h" 20#include "clock.h"
21#include "omap_hwmod.h"
22 21
23/* 22/*
24 * Clockdomain flags 23 * Clockdomain flags
@@ -98,6 +97,8 @@ struct clkdm_dep {
98/* Possible flags for struct clockdomain._flags */ 97/* Possible flags for struct clockdomain._flags */
99#define _CLKDM_FLAG_HWSUP_ENABLED BIT(0) 98#define _CLKDM_FLAG_HWSUP_ENABLED BIT(0)
100 99
100struct omap_hwmod;
101
101/** 102/**
102 * struct clockdomain - OMAP clockdomain 103 * struct clockdomain - OMAP clockdomain
103 * @name: clockdomain name 104 * @name: clockdomain name
diff --git a/arch/arm/mach-omap2/cm2xxx.c b/arch/arm/mach-omap2/cm2xxx.c
index ce25abbcffae..8be6ea50c092 100644
--- a/arch/arm/mach-omap2/cm2xxx.c
+++ b/arch/arm/mach-omap2/cm2xxx.c
@@ -18,9 +18,6 @@
18#include <linux/err.h> 18#include <linux/err.h>
19#include <linux/io.h> 19#include <linux/io.h>
20 20
21#include "soc.h"
22#include "iomap.h"
23#include "common.h"
24#include "prm2xxx.h" 21#include "prm2xxx.h"
25#include "cm.h" 22#include "cm.h"
26#include "cm2xxx.h" 23#include "cm2xxx.h"
@@ -390,7 +387,7 @@ void omap2xxx_cm_set_mod_dividers(u32 mpu, u32 dsp, u32 gfx, u32 core, u32 mdm)
390 tmp = omap2_cm_read_mod_reg(CORE_MOD, CM_CLKSEL1) & 387 tmp = omap2_cm_read_mod_reg(CORE_MOD, CM_CLKSEL1) &
391 OMAP24XX_CLKSEL_DSS2_MASK; 388 OMAP24XX_CLKSEL_DSS2_MASK;
392 omap2_cm_write_mod_reg(core | tmp, CORE_MOD, CM_CLKSEL1); 389 omap2_cm_write_mod_reg(core | tmp, CORE_MOD, CM_CLKSEL1);
393 if (cpu_is_omap2430()) 390 if (mdm)
394 omap2_cm_write_mod_reg(mdm, OMAP2430_MDM_MOD, CM_CLKSEL); 391 omap2_cm_write_mod_reg(mdm, OMAP2430_MDM_MOD, CM_CLKSEL);
395} 392}
396 393
@@ -405,19 +402,11 @@ static struct cm_ll_data omap2xxx_cm_ll_data = {
405 402
406int __init omap2xxx_cm_init(void) 403int __init omap2xxx_cm_init(void)
407{ 404{
408 if (!cpu_is_omap24xx())
409 return 0;
410
411 return cm_register(&omap2xxx_cm_ll_data); 405 return cm_register(&omap2xxx_cm_ll_data);
412} 406}
413 407
414static void __exit omap2xxx_cm_exit(void) 408static void __exit omap2xxx_cm_exit(void)
415{ 409{
416 if (!cpu_is_omap24xx()) 410 cm_unregister(&omap2xxx_cm_ll_data);
417 return;
418
419 /* Should never happen */
420 WARN(cm_unregister(&omap2xxx_cm_ll_data),
421 "%s: cm_ll_data function pointer mismatch\n", __func__);
422} 411}
423__exitcall(omap2xxx_cm_exit); 412__exitcall(omap2xxx_cm_exit);
diff --git a/arch/arm/mach-omap2/cm2xxx_3xxx.h b/arch/arm/mach-omap2/cm2xxx_3xxx.h
index bfbd16fe9151..72928a3ce2aa 100644
--- a/arch/arm/mach-omap2/cm2xxx_3xxx.h
+++ b/arch/arm/mach-omap2/cm2xxx_3xxx.h
@@ -52,12 +52,12 @@
52 52
53static inline u32 omap2_cm_read_mod_reg(s16 module, u16 idx) 53static inline u32 omap2_cm_read_mod_reg(s16 module, u16 idx)
54{ 54{
55 return __raw_readl(cm_base + module + idx); 55 return readl_relaxed(cm_base + module + idx);
56} 56}
57 57
58static inline void omap2_cm_write_mod_reg(u32 val, s16 module, u16 idx) 58static inline void omap2_cm_write_mod_reg(u32 val, s16 module, u16 idx)
59{ 59{
60 __raw_writel(val, cm_base + module + idx); 60 writel_relaxed(val, cm_base + module + idx);
61} 61}
62 62
63/* Read-modify-write a register in a CM module. Caller must lock */ 63/* Read-modify-write a register in a CM module. Caller must lock */
diff --git a/arch/arm/mach-omap2/cm33xx.c b/arch/arm/mach-omap2/cm33xx.c
index 40a22e5649ae..b3f99e93def0 100644
--- a/arch/arm/mach-omap2/cm33xx.c
+++ b/arch/arm/mach-omap2/cm33xx.c
@@ -50,13 +50,13 @@
50/* Read a register in a CM instance */ 50/* Read a register in a CM instance */
51static inline u32 am33xx_cm_read_reg(u16 inst, u16 idx) 51static inline u32 am33xx_cm_read_reg(u16 inst, u16 idx)
52{ 52{
53 return __raw_readl(cm_base + inst + idx); 53 return readl_relaxed(cm_base + inst + idx);
54} 54}
55 55
56/* Write into a register in a CM */ 56/* Write into a register in a CM */
57static inline void am33xx_cm_write_reg(u32 val, u16 inst, u16 idx) 57static inline void am33xx_cm_write_reg(u32 val, u16 inst, u16 idx)
58{ 58{
59 __raw_writel(val, cm_base + inst + idx); 59 writel_relaxed(val, cm_base + inst + idx);
60} 60}
61 61
62/* Read-modify-write a register in CM */ 62/* Read-modify-write a register in CM */
diff --git a/arch/arm/mach-omap2/cm33xx.h b/arch/arm/mach-omap2/cm33xx.h
index cfb8891b0c0e..15a778ce7707 100644
--- a/arch/arm/mach-omap2/cm33xx.h
+++ b/arch/arm/mach-omap2/cm33xx.h
@@ -17,11 +17,8 @@
17#ifndef __ARCH_ARM_MACH_OMAP2_CM_33XX_H 17#ifndef __ARCH_ARM_MACH_OMAP2_CM_33XX_H
18#define __ARCH_ARM_MACH_OMAP2_CM_33XX_H 18#define __ARCH_ARM_MACH_OMAP2_CM_33XX_H
19 19
20#include "common.h"
21
22#include "cm.h" 20#include "cm.h"
23#include "cm-regbits-33xx.h" 21#include "cm-regbits-33xx.h"
24#include "iomap.h"
25 22
26/* CM base address */ 23/* CM base address */
27#define AM33XX_CM_BASE 0x44e00000 24#define AM33XX_CM_BASE 0x44e00000
diff --git a/arch/arm/mach-omap2/cm3xxx.c b/arch/arm/mach-omap2/cm3xxx.c
index f6f028867bfe..129a4e7f6ef5 100644
--- a/arch/arm/mach-omap2/cm3xxx.c
+++ b/arch/arm/mach-omap2/cm3xxx.c
@@ -18,9 +18,6 @@
18#include <linux/err.h> 18#include <linux/err.h>
19#include <linux/io.h> 19#include <linux/io.h>
20 20
21#include "soc.h"
22#include "iomap.h"
23#include "common.h"
24#include "prm2xxx_3xxx.h" 21#include "prm2xxx_3xxx.h"
25#include "cm.h" 22#include "cm.h"
26#include "cm3xxx.h" 23#include "cm3xxx.h"
@@ -388,7 +385,8 @@ void omap3_cm_save_context(void)
388 omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_CLKSEL1); 385 omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_CLKSEL1);
389 cm_context.iva2_cm_clksel2 = 386 cm_context.iva2_cm_clksel2 =
390 omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_CLKSEL2); 387 omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_CLKSEL2);
391 cm_context.cm_sysconfig = __raw_readl(OMAP3430_CM_SYSCONFIG); 388 cm_context.cm_sysconfig =
389 omap2_cm_read_mod_reg(OCP_MOD, OMAP3430_CM_SYSCONFIG);
392 cm_context.sgx_cm_clksel = 390 cm_context.sgx_cm_clksel =
393 omap2_cm_read_mod_reg(OMAP3430ES2_SGX_MOD, CM_CLKSEL); 391 omap2_cm_read_mod_reg(OMAP3430ES2_SGX_MOD, CM_CLKSEL);
394 cm_context.dss_cm_clksel = 392 cm_context.dss_cm_clksel =
@@ -418,7 +416,8 @@ void omap3_cm_save_context(void)
418 omap2_cm_read_mod_reg(PLL_MOD, OMAP3430ES2_CM_CLKSEL5); 416 omap2_cm_read_mod_reg(PLL_MOD, OMAP3430ES2_CM_CLKSEL5);
419 cm_context.pll_cm_clken2 = 417 cm_context.pll_cm_clken2 =
420 omap2_cm_read_mod_reg(PLL_MOD, OMAP3430ES2_CM_CLKEN2); 418 omap2_cm_read_mod_reg(PLL_MOD, OMAP3430ES2_CM_CLKEN2);
421 cm_context.cm_polctrl = __raw_readl(OMAP3430_CM_POLCTRL); 419 cm_context.cm_polctrl =
420 omap2_cm_read_mod_reg(OCP_MOD, OMAP3430_CM_POLCTRL);
422 cm_context.iva2_cm_fclken = 421 cm_context.iva2_cm_fclken =
423 omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_FCLKEN); 422 omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_FCLKEN);
424 cm_context.iva2_cm_clken_pll = 423 cm_context.iva2_cm_clken_pll =
@@ -519,7 +518,8 @@ void omap3_cm_restore_context(void)
519 CM_CLKSEL1); 518 CM_CLKSEL1);
520 omap2_cm_write_mod_reg(cm_context.iva2_cm_clksel2, OMAP3430_IVA2_MOD, 519 omap2_cm_write_mod_reg(cm_context.iva2_cm_clksel2, OMAP3430_IVA2_MOD,
521 CM_CLKSEL2); 520 CM_CLKSEL2);
522 __raw_writel(cm_context.cm_sysconfig, OMAP3430_CM_SYSCONFIG); 521 omap2_cm_write_mod_reg(cm_context.cm_sysconfig, OCP_MOD,
522 OMAP3430_CM_SYSCONFIG);
523 omap2_cm_write_mod_reg(cm_context.sgx_cm_clksel, OMAP3430ES2_SGX_MOD, 523 omap2_cm_write_mod_reg(cm_context.sgx_cm_clksel, OMAP3430ES2_SGX_MOD,
524 CM_CLKSEL); 524 CM_CLKSEL);
525 omap2_cm_write_mod_reg(cm_context.dss_cm_clksel, OMAP3430_DSS_MOD, 525 omap2_cm_write_mod_reg(cm_context.dss_cm_clksel, OMAP3430_DSS_MOD,
@@ -547,7 +547,8 @@ void omap3_cm_restore_context(void)
547 OMAP3430ES2_CM_CLKSEL5); 547 OMAP3430ES2_CM_CLKSEL5);
548 omap2_cm_write_mod_reg(cm_context.pll_cm_clken2, PLL_MOD, 548 omap2_cm_write_mod_reg(cm_context.pll_cm_clken2, PLL_MOD,
549 OMAP3430ES2_CM_CLKEN2); 549 OMAP3430ES2_CM_CLKEN2);
550 __raw_writel(cm_context.cm_polctrl, OMAP3430_CM_POLCTRL); 550 omap2_cm_write_mod_reg(cm_context.cm_polctrl, OCP_MOD,
551 OMAP3430_CM_POLCTRL);
551 omap2_cm_write_mod_reg(cm_context.iva2_cm_fclken, OMAP3430_IVA2_MOD, 552 omap2_cm_write_mod_reg(cm_context.iva2_cm_fclken, OMAP3430_IVA2_MOD,
552 CM_FCLKEN); 553 CM_FCLKEN);
553 omap2_cm_write_mod_reg(cm_context.iva2_cm_clken_pll, OMAP3430_IVA2_MOD, 554 omap2_cm_write_mod_reg(cm_context.iva2_cm_clken_pll, OMAP3430_IVA2_MOD,
@@ -669,19 +670,11 @@ static struct cm_ll_data omap3xxx_cm_ll_data = {
669 670
670int __init omap3xxx_cm_init(void) 671int __init omap3xxx_cm_init(void)
671{ 672{
672 if (!cpu_is_omap34xx())
673 return 0;
674
675 return cm_register(&omap3xxx_cm_ll_data); 673 return cm_register(&omap3xxx_cm_ll_data);
676} 674}
677 675
678static void __exit omap3xxx_cm_exit(void) 676static void __exit omap3xxx_cm_exit(void)
679{ 677{
680 if (!cpu_is_omap34xx()) 678 cm_unregister(&omap3xxx_cm_ll_data);
681 return;
682
683 /* Should never happen */
684 WARN(cm_unregister(&omap3xxx_cm_ll_data),
685 "%s: cm_ll_data function pointer mismatch\n", __func__);
686} 679}
687__exitcall(omap3xxx_cm_exit); 680__exitcall(omap3xxx_cm_exit);
diff --git a/arch/arm/mach-omap2/cm3xxx.h b/arch/arm/mach-omap2/cm3xxx.h
index 8224c91b4d7a..7a16b5598127 100644
--- a/arch/arm/mach-omap2/cm3xxx.h
+++ b/arch/arm/mach-omap2/cm3xxx.h
@@ -29,9 +29,8 @@
29 * These registers appear once per CM module. 29 * These registers appear once per CM module.
30 */ 30 */
31 31
32#define OMAP3430_CM_REVISION OMAP34XX_CM_REGADDR(OCP_MOD, 0x0000) 32#define OMAP3430_CM_SYSCONFIG 0x0010
33#define OMAP3430_CM_SYSCONFIG OMAP34XX_CM_REGADDR(OCP_MOD, 0x0010) 33#define OMAP3430_CM_POLCTRL 0x009c
34#define OMAP3430_CM_POLCTRL OMAP34XX_CM_REGADDR(OCP_MOD, 0x009c)
35 34
36#define OMAP3_CM_CLKOUT_CTRL_OFFSET 0x0070 35#define OMAP3_CM_CLKOUT_CTRL_OFFSET 0x0070
37#define OMAP3430_CM_CLKOUT_CTRL OMAP_CM_REGADDR(OMAP3430_CCR_MOD, 0x0070) 36#define OMAP3430_CM_CLKOUT_CTRL OMAP_CM_REGADDR(OMAP3430_CCR_MOD, 0x0070)
diff --git a/arch/arm/mach-omap2/cm44xx.c b/arch/arm/mach-omap2/cm44xx.c
index 535d66e2822c..fe5cc7bae489 100644
--- a/arch/arm/mach-omap2/cm44xx.c
+++ b/arch/arm/mach-omap2/cm44xx.c
@@ -18,35 +18,32 @@
18#include <linux/err.h> 18#include <linux/err.h>
19#include <linux/io.h> 19#include <linux/io.h>
20 20
21#include "iomap.h"
22#include "common.h"
23#include "cm.h" 21#include "cm.h"
24#include "cm1_44xx.h" 22#include "cm1_44xx.h"
25#include "cm2_44xx.h" 23#include "cm2_44xx.h"
26#include "cm-regbits-44xx.h"
27 24
28/* CM1 hardware module low-level functions */ 25/* CM1 hardware module low-level functions */
29 26
30/* Read a register in CM1 */ 27/* Read a register in CM1 */
31u32 omap4_cm1_read_inst_reg(s16 inst, u16 reg) 28u32 omap4_cm1_read_inst_reg(s16 inst, u16 reg)
32{ 29{
33 return __raw_readl(OMAP44XX_CM1_REGADDR(inst, reg)); 30 return readl_relaxed(cm_base + inst + reg);
34} 31}
35 32
36/* Write into a register in CM1 */ 33/* Write into a register in CM1 */
37void omap4_cm1_write_inst_reg(u32 val, s16 inst, u16 reg) 34void omap4_cm1_write_inst_reg(u32 val, s16 inst, u16 reg)
38{ 35{
39 __raw_writel(val, OMAP44XX_CM1_REGADDR(inst, reg)); 36 writel_relaxed(val, cm_base + inst + reg);
40} 37}
41 38
42/* Read a register in CM2 */ 39/* Read a register in CM2 */
43u32 omap4_cm2_read_inst_reg(s16 inst, u16 reg) 40u32 omap4_cm2_read_inst_reg(s16 inst, u16 reg)
44{ 41{
45 return __raw_readl(OMAP44XX_CM2_REGADDR(inst, reg)); 42 return readl_relaxed(cm2_base + inst + reg);
46} 43}
47 44
48/* Write into a register in CM2 */ 45/* Write into a register in CM2 */
49void omap4_cm2_write_inst_reg(u32 val, s16 inst, u16 reg) 46void omap4_cm2_write_inst_reg(u32 val, s16 inst, u16 reg)
50{ 47{
51 __raw_writel(val, OMAP44XX_CM2_REGADDR(inst, reg)); 48 writel_relaxed(val, cm2_base + inst + reg);
52} 49}
diff --git a/arch/arm/mach-omap2/cm_common.c b/arch/arm/mach-omap2/cm_common.c
index 40b3b5a84458..8f6c4710877e 100644
--- a/arch/arm/mach-omap2/cm_common.c
+++ b/arch/arm/mach-omap2/cm_common.c
@@ -14,11 +14,11 @@
14#include <linux/kernel.h> 14#include <linux/kernel.h>
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 18
18#include "cm2xxx.h" 19#include "cm2xxx.h"
19#include "cm3xxx.h" 20#include "cm3xxx.h"
20#include "cm44xx.h" 21#include "cm44xx.h"
21#include "common.h"
22 22
23/* 23/*
24 * cm_ll_data: function pointers to SoC-specific implementations of 24 * cm_ll_data: function pointers to SoC-specific implementations of
diff --git a/arch/arm/mach-omap2/cminst44xx.c b/arch/arm/mach-omap2/cminst44xx.c
index f5c4731b6f06..12aca56942c0 100644
--- a/arch/arm/mach-omap2/cminst44xx.c
+++ b/arch/arm/mach-omap2/cminst44xx.c
@@ -21,8 +21,6 @@
21#include <linux/err.h> 21#include <linux/err.h>
22#include <linux/io.h> 22#include <linux/io.h>
23 23
24#include "iomap.h"
25#include "common.h"
26#include "clockdomain.h" 24#include "clockdomain.h"
27#include "cm.h" 25#include "cm.h"
28#include "cm1_44xx.h" 26#include "cm1_44xx.h"
@@ -30,12 +28,18 @@
30#include "cm44xx.h" 28#include "cm44xx.h"
31#include "cminst44xx.h" 29#include "cminst44xx.h"
32#include "cm-regbits-34xx.h" 30#include "cm-regbits-34xx.h"
33#include "cm-regbits-44xx.h"
34#include "prcm44xx.h" 31#include "prcm44xx.h"
35#include "prm44xx.h" 32#include "prm44xx.h"
36#include "prcm_mpu44xx.h" 33#include "prcm_mpu44xx.h"
37#include "prcm-common.h" 34#include "prcm-common.h"
38 35
36#define OMAP4430_IDLEST_SHIFT 16
37#define OMAP4430_IDLEST_MASK (0x3 << 16)
38#define OMAP4430_CLKTRCTRL_SHIFT 0
39#define OMAP4430_CLKTRCTRL_MASK (0x3 << 0)
40#define OMAP4430_MODULEMODE_SHIFT 0
41#define OMAP4430_MODULEMODE_MASK (0x3 << 0)
42
39/* 43/*
40 * CLKCTRL_IDLEST_*: possible values for the CM_*_CLKCTRL.IDLEST bitfield: 44 * CLKCTRL_IDLEST_*: possible values for the CM_*_CLKCTRL.IDLEST bitfield:
41 * 45 *
@@ -116,7 +120,7 @@ u32 omap4_cminst_read_inst_reg(u8 part, u16 inst, u16 idx)
116 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || 120 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
117 part == OMAP4430_INVALID_PRCM_PARTITION || 121 part == OMAP4430_INVALID_PRCM_PARTITION ||
118 !_cm_bases[part]); 122 !_cm_bases[part]);
119 return __raw_readl(_cm_bases[part] + inst + idx); 123 return readl_relaxed(_cm_bases[part] + inst + idx);
120} 124}
121 125
122/* Write into a register in a CM instance */ 126/* Write into a register in a CM instance */
@@ -125,7 +129,7 @@ void omap4_cminst_write_inst_reg(u32 val, u8 part, u16 inst, u16 idx)
125 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || 129 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
126 part == OMAP4430_INVALID_PRCM_PARTITION || 130 part == OMAP4430_INVALID_PRCM_PARTITION ||
127 !_cm_bases[part]); 131 !_cm_bases[part]);
128 __raw_writel(val, _cm_bases[part] + inst + idx); 132 writel_relaxed(val, _cm_bases[part] + inst + idx);
129} 133}
130 134
131/* Read-modify-write a register in CM1. Caller must lock */ 135/* Read-modify-write a register in CM1. Caller must lock */
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index d88aff7baff8..ff029737c8f0 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -91,6 +91,7 @@ extern void omap3_sync32k_timer_init(void);
91extern void omap3_secure_sync32k_timer_init(void); 91extern void omap3_secure_sync32k_timer_init(void);
92extern void omap3_gptimer_timer_init(void); 92extern void omap3_gptimer_timer_init(void);
93extern void omap4_local_timer_init(void); 93extern void omap4_local_timer_init(void);
94int omap_l2_cache_init(void);
94extern void omap5_realtime_timer_init(void); 95extern void omap5_realtime_timer_init(void);
95 96
96void omap2420_init_early(void); 97void omap2420_init_early(void);
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index 44bb4d544dcf..751f3549bf6f 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -151,32 +151,32 @@ void __iomem *omap_ctrl_base_get(void)
151 151
152u8 omap_ctrl_readb(u16 offset) 152u8 omap_ctrl_readb(u16 offset)
153{ 153{
154 return __raw_readb(OMAP_CTRL_REGADDR(offset)); 154 return readb_relaxed(OMAP_CTRL_REGADDR(offset));
155} 155}
156 156
157u16 omap_ctrl_readw(u16 offset) 157u16 omap_ctrl_readw(u16 offset)
158{ 158{
159 return __raw_readw(OMAP_CTRL_REGADDR(offset)); 159 return readw_relaxed(OMAP_CTRL_REGADDR(offset));
160} 160}
161 161
162u32 omap_ctrl_readl(u16 offset) 162u32 omap_ctrl_readl(u16 offset)
163{ 163{
164 return __raw_readl(OMAP_CTRL_REGADDR(offset)); 164 return readl_relaxed(OMAP_CTRL_REGADDR(offset));
165} 165}
166 166
167void omap_ctrl_writeb(u8 val, u16 offset) 167void omap_ctrl_writeb(u8 val, u16 offset)
168{ 168{
169 __raw_writeb(val, OMAP_CTRL_REGADDR(offset)); 169 writeb_relaxed(val, OMAP_CTRL_REGADDR(offset));
170} 170}
171 171
172void omap_ctrl_writew(u16 val, u16 offset) 172void omap_ctrl_writew(u16 val, u16 offset)
173{ 173{
174 __raw_writew(val, OMAP_CTRL_REGADDR(offset)); 174 writew_relaxed(val, OMAP_CTRL_REGADDR(offset));
175} 175}
176 176
177void omap_ctrl_writel(u32 val, u16 offset) 177void omap_ctrl_writel(u32 val, u16 offset)
178{ 178{
179 __raw_writel(val, OMAP_CTRL_REGADDR(offset)); 179 writel_relaxed(val, OMAP_CTRL_REGADDR(offset));
180} 180}
181 181
182/* 182/*
@@ -188,12 +188,12 @@ void omap_ctrl_writel(u32 val, u16 offset)
188 188
189u32 omap4_ctrl_pad_readl(u16 offset) 189u32 omap4_ctrl_pad_readl(u16 offset)
190{ 190{
191 return __raw_readl(OMAP4_CTRL_PAD_REGADDR(offset)); 191 return readl_relaxed(OMAP4_CTRL_PAD_REGADDR(offset));
192} 192}
193 193
194void omap4_ctrl_pad_writel(u32 val, u16 offset) 194void omap4_ctrl_pad_writel(u32 val, u16 offset)
195{ 195{
196 __raw_writel(val, OMAP4_CTRL_PAD_REGADDR(offset)); 196 writel_relaxed(val, OMAP4_CTRL_PAD_REGADDR(offset));
197} 197}
198 198
199#ifdef CONFIG_ARCH_OMAP3 199#ifdef CONFIG_ARCH_OMAP3
@@ -222,7 +222,7 @@ void omap3_ctrl_write_boot_mode(u8 bootmode)
222 * 222 *
223 * XXX This should use some omap_ctrl_writel()-type function 223 * XXX This should use some omap_ctrl_writel()-type function
224 */ 224 */
225 __raw_writel(l, OMAP2_L4_IO_ADDRESS(OMAP343X_SCRATCHPAD + 4)); 225 writel_relaxed(l, OMAP2_L4_IO_ADDRESS(OMAP343X_SCRATCHPAD + 4));
226} 226}
227 227
228#endif 228#endif
@@ -285,7 +285,7 @@ void omap3_clear_scratchpad_contents(void)
285 if (omap2_prm_read_mod_reg(OMAP3430_GR_MOD, OMAP3_PRM_RSTST_OFFSET) & 285 if (omap2_prm_read_mod_reg(OMAP3430_GR_MOD, OMAP3_PRM_RSTST_OFFSET) &
286 OMAP3430_GLOBAL_COLD_RST_MASK) { 286 OMAP3430_GLOBAL_COLD_RST_MASK) {
287 for ( ; offset <= max_offset; offset += 0x4) 287 for ( ; offset <= max_offset; offset += 0x4)
288 __raw_writel(0x0, (v_addr + offset)); 288 writel_relaxed(0x0, (v_addr + offset));
289 omap2_prm_set_mod_reg_bits(OMAP3430_GLOBAL_COLD_RST_MASK, 289 omap2_prm_set_mod_reg_bits(OMAP3430_GLOBAL_COLD_RST_MASK,
290 OMAP3430_GR_MOD, 290 OMAP3430_GR_MOD,
291 OMAP3_PRM_RSTST_OFFSET); 291 OMAP3_PRM_RSTST_OFFSET);
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c
index 01fc710c8181..2498ab025fa2 100644
--- a/arch/arm/mach-omap2/cpuidle44xx.c
+++ b/arch/arm/mach-omap2/cpuidle44xx.c
@@ -14,6 +14,7 @@
14#include <linux/cpuidle.h> 14#include <linux/cpuidle.h>
15#include <linux/cpu_pm.h> 15#include <linux/cpu_pm.h>
16#include <linux/export.h> 16#include <linux/export.h>
17#include <linux/clockchips.h>
17 18
18#include <asm/cpuidle.h> 19#include <asm/cpuidle.h>
19#include <asm/proc-fns.h> 20#include <asm/proc-fns.h>
@@ -83,6 +84,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
83{ 84{
84 struct idle_statedata *cx = state_ptr + index; 85 struct idle_statedata *cx = state_ptr + index;
85 u32 mpuss_can_lose_context = 0; 86 u32 mpuss_can_lose_context = 0;
87 int cpu_id = smp_processor_id();
86 88
87 /* 89 /*
88 * CPU0 has to wait and stay ON until CPU1 is OFF state. 90 * CPU0 has to wait and stay ON until CPU1 is OFF state.
@@ -110,6 +112,8 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
110 mpuss_can_lose_context = (cx->mpu_state == PWRDM_POWER_RET) && 112 mpuss_can_lose_context = (cx->mpu_state == PWRDM_POWER_RET) &&
111 (cx->mpu_logic_state == PWRDM_POWER_OFF); 113 (cx->mpu_logic_state == PWRDM_POWER_OFF);
112 114
115 clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu_id);
116
113 /* 117 /*
114 * Call idle CPU PM enter notifier chain so that 118 * Call idle CPU PM enter notifier chain so that
115 * VFP and per CPU interrupt context is saved. 119 * VFP and per CPU interrupt context is saved.
@@ -165,6 +169,8 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
165 if (dev->cpu == 0 && mpuss_can_lose_context) 169 if (dev->cpu == 0 && mpuss_can_lose_context)
166 cpu_cluster_pm_exit(); 170 cpu_cluster_pm_exit();
167 171
172 clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu_id);
173
168fail: 174fail:
169 cpuidle_coupled_parallel_barrier(dev, &abort_barrier); 175 cpuidle_coupled_parallel_barrier(dev, &abort_barrier);
170 cpu_done[dev->cpu] = false; 176 cpu_done[dev->cpu] = false;
@@ -172,6 +178,16 @@ fail:
172 return index; 178 return index;
173} 179}
174 180
181/*
182 * For each cpu, setup the broadcast timer because local timers
183 * stops for the states above C1.
184 */
185static void omap_setup_broadcast_timer(void *arg)
186{
187 int cpu = smp_processor_id();
188 clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ON, &cpu);
189}
190
175static struct cpuidle_driver omap4_idle_driver = { 191static struct cpuidle_driver omap4_idle_driver = {
176 .name = "omap4_idle", 192 .name = "omap4_idle",
177 .owner = THIS_MODULE, 193 .owner = THIS_MODULE,
@@ -189,8 +205,7 @@ static struct cpuidle_driver omap4_idle_driver = {
189 /* C2 - CPU0 OFF + CPU1 OFF + MPU CSWR */ 205 /* C2 - CPU0 OFF + CPU1 OFF + MPU CSWR */
190 .exit_latency = 328 + 440, 206 .exit_latency = 328 + 440,
191 .target_residency = 960, 207 .target_residency = 960,
192 .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_COUPLED | 208 .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_COUPLED,
193 CPUIDLE_FLAG_TIMER_STOP,
194 .enter = omap_enter_idle_coupled, 209 .enter = omap_enter_idle_coupled,
195 .name = "C2", 210 .name = "C2",
196 .desc = "CPUx OFF, MPUSS CSWR", 211 .desc = "CPUx OFF, MPUSS CSWR",
@@ -199,8 +214,7 @@ static struct cpuidle_driver omap4_idle_driver = {
199 /* C3 - CPU0 OFF + CPU1 OFF + MPU OSWR */ 214 /* C3 - CPU0 OFF + CPU1 OFF + MPU OSWR */
200 .exit_latency = 460 + 518, 215 .exit_latency = 460 + 518,
201 .target_residency = 1100, 216 .target_residency = 1100,
202 .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_COUPLED | 217 .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_COUPLED,
203 CPUIDLE_FLAG_TIMER_STOP,
204 .enter = omap_enter_idle_coupled, 218 .enter = omap_enter_idle_coupled,
205 .name = "C3", 219 .name = "C3",
206 .desc = "CPUx OFF, MPUSS OSWR", 220 .desc = "CPUx OFF, MPUSS OSWR",
@@ -231,5 +245,8 @@ int __init omap4_idle_init(void)
231 if (!cpu_clkdm[0] || !cpu_clkdm[1]) 245 if (!cpu_clkdm[0] || !cpu_clkdm[1])
232 return -ENODEV; 246 return -ENODEV;
233 247
248 /* Configure the broadcast timer on each cpu */
249 on_each_cpu(omap_setup_broadcast_timer, NULL, 1);
250
234 return cpuidle_register(&omap4_idle_driver, cpu_online_mask); 251 return cpuidle_register(&omap4_idle_driver, cpu_online_mask);
235} 252}
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 16d33d831287..bf852d7ae951 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -279,6 +279,8 @@ static enum omapdss_version __init omap_display_get_version(void)
279 return OMAPDSS_VER_OMAP4; 279 return OMAPDSS_VER_OMAP4;
280 else if (soc_is_omap54xx()) 280 else if (soc_is_omap54xx())
281 return OMAPDSS_VER_OMAP5; 281 return OMAPDSS_VER_OMAP5;
282 else if (soc_is_am43xx())
283 return OMAPDSS_VER_AM43xx;
282 else 284 else
283 return OMAPDSS_VER_UNKNOWN; 285 return OMAPDSS_VER_UNKNOWN;
284} 286}
@@ -555,65 +557,9 @@ int omap_dss_reset(struct omap_hwmod *oh)
555 return r; 557 return r;
556} 558}
557 559
558/* list of 'compatible' nodes to convert to omapdss specific */
559static const char * const dss_compat_conv_list[] __initconst = {
560 "composite-connector",
561 "dvi-connector",
562 "hdmi-connector",
563 "panel-dpi",
564 "panel-dsi-cm",
565 "sony,acx565akm",
566 "svideo-connector",
567 "ti,tfp410",
568 "ti,tpd12s015",
569};
570
571/* prepend compatible string with "omapdss," */
572static __init void omapdss_omapify_node(struct device_node *node,
573 const char *compat)
574{
575 char *new_compat;
576 struct property *prop;
577
578 new_compat = kasprintf(GFP_KERNEL, "omapdss,%s", compat);
579
580 prop = kzalloc(sizeof(*prop), GFP_KERNEL);
581
582 if (!prop) {
583 pr_err("omapdss_omapify_node: kzalloc failed\n");
584 return;
585 }
586
587 prop->name = "compatible";
588 prop->value = new_compat;
589 prop->length = strlen(new_compat) + 1;
590
591 of_update_property(node, prop);
592}
593
594/*
595 * As omapdss panel drivers are omapdss specific, but we want to define the
596 * DT-data in generic manner, we convert the compatible strings of the panel
597 * nodes from "panel-foo" to "omapdss,panel-foo". This way we can have both
598 * correct DT data and omapdss specific drivers.
599 *
600 * When we get generic panel drivers to the kernel, this will be removed.
601 */
602void __init omapdss_early_init_of(void) 560void __init omapdss_early_init_of(void)
603{ 561{
604 int i;
605
606 for (i = 0; i < ARRAY_SIZE(dss_compat_conv_list); ++i) {
607 const char *compat = dss_compat_conv_list[i];
608 struct device_node *node = NULL;
609
610 while ((node = of_find_compatible_node(node, NULL, compat))) {
611 if (!of_device_is_available(node))
612 continue;
613 562
614 omapdss_omapify_node(node, compat);
615 }
616 }
617} 563}
618 564
619struct device_node * __init omapdss_find_dss_of_node(void) 565struct device_node * __init omapdss_find_dss_of_node(void)
@@ -632,6 +578,10 @@ struct device_node * __init omapdss_find_dss_of_node(void)
632 if (node) 578 if (node)
633 return node; 579 return node;
634 580
581 node = of_find_compatible_node(NULL, NULL, "ti,omap5-dss");
582 if (node)
583 return node;
584
635 return NULL; 585 return NULL;
636} 586}
637 587
diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
index 5689c88d986d..a6d2cf1f8d02 100644
--- a/arch/arm/mach-omap2/dma.c
+++ b/arch/arm/mach-omap2/dma.c
@@ -91,7 +91,7 @@ static inline void dma_write(u32 val, int reg, int lch)
91 addr += reg_map[reg].offset; 91 addr += reg_map[reg].offset;
92 addr += reg_map[reg].stride * lch; 92 addr += reg_map[reg].stride * lch;
93 93
94 __raw_writel(val, addr); 94 writel_relaxed(val, addr);
95} 95}
96 96
97static inline u32 dma_read(int reg, int lch) 97static inline u32 dma_read(int reg, int lch)
@@ -101,7 +101,7 @@ static inline u32 dma_read(int reg, int lch)
101 addr += reg_map[reg].offset; 101 addr += reg_map[reg].offset;
102 addr += reg_map[reg].stride * lch; 102 addr += reg_map[reg].stride * lch;
103 103
104 return __raw_readl(addr); 104 return readl_relaxed(addr);
105} 105}
106 106
107static void omap2_clear_dma(int lch) 107static void omap2_clear_dma(int lch)
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
index 4349e82debfe..17cd39360afe 100644
--- a/arch/arm/mach-omap2/gpmc-nand.c
+++ b/arch/arm/mach-omap2/gpmc-nand.c
@@ -46,7 +46,7 @@ static struct platform_device gpmc_nand_device = {
46static bool gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt) 46static bool gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt)
47{ 47{
48 /* platforms which support all ECC schemes */ 48 /* platforms which support all ECC schemes */
49 if (soc_is_am33xx() || cpu_is_omap44xx() || 49 if (soc_is_am33xx() || soc_is_am43xx() || cpu_is_omap44xx() ||
50 soc_is_omap54xx() || soc_is_dra7xx()) 50 soc_is_omap54xx() || soc_is_dra7xx())
51 return 1; 51 return 1;
52 52
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 9fe8c949305c..852b19a367f0 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -170,12 +170,12 @@ static irqreturn_t gpmc_handle_irq(int irq, void *dev);
170 170
171static void gpmc_write_reg(int idx, u32 val) 171static void gpmc_write_reg(int idx, u32 val)
172{ 172{
173 __raw_writel(val, gpmc_base + idx); 173 writel_relaxed(val, gpmc_base + idx);
174} 174}
175 175
176static u32 gpmc_read_reg(int idx) 176static u32 gpmc_read_reg(int idx)
177{ 177{
178 return __raw_readl(gpmc_base + idx); 178 return readl_relaxed(gpmc_base + idx);
179} 179}
180 180
181void gpmc_cs_write_reg(int cs, int idx, u32 val) 181void gpmc_cs_write_reg(int cs, int idx, u32 val)
@@ -183,7 +183,7 @@ void gpmc_cs_write_reg(int cs, int idx, u32 val)
183 void __iomem *reg_addr; 183 void __iomem *reg_addr;
184 184
185 reg_addr = gpmc_base + GPMC_CS0_OFFSET + (cs * GPMC_CS_SIZE) + idx; 185 reg_addr = gpmc_base + GPMC_CS0_OFFSET + (cs * GPMC_CS_SIZE) + idx;
186 __raw_writel(val, reg_addr); 186 writel_relaxed(val, reg_addr);
187} 187}
188 188
189static u32 gpmc_cs_read_reg(int cs, int idx) 189static u32 gpmc_cs_read_reg(int cs, int idx)
@@ -191,7 +191,7 @@ static u32 gpmc_cs_read_reg(int cs, int idx)
191 void __iomem *reg_addr; 191 void __iomem *reg_addr;
192 192
193 reg_addr = gpmc_base + GPMC_CS0_OFFSET + (cs * GPMC_CS_SIZE) + idx; 193 reg_addr = gpmc_base + GPMC_CS0_OFFSET + (cs * GPMC_CS_SIZE) + idx;
194 return __raw_readl(reg_addr); 194 return readl_relaxed(reg_addr);
195} 195}
196 196
197/* TODO: Add support for gpmc_fck to clock framework and use it */ 197/* TODO: Add support for gpmc_fck to clock framework and use it */
diff --git a/arch/arm/mach-omap2/hdq1w.c b/arch/arm/mach-omap2/hdq1w.c
index cbc8e3c480e0..f78b4a161959 100644
--- a/arch/arm/mach-omap2/hdq1w.c
+++ b/arch/arm/mach-omap2/hdq1w.c
@@ -76,6 +76,7 @@ int omap_hdq1w_reset(struct omap_hwmod *oh)
76 return 0; 76 return 0;
77} 77}
78 78
79#ifndef CONFIG_OF
79static int __init omap_init_hdq(void) 80static int __init omap_init_hdq(void)
80{ 81{
81 int id = -1; 82 int id = -1;
@@ -95,3 +96,4 @@ static int __init omap_init_hdq(void)
95 return 0; 96 return 0;
96} 97}
97omap_arch_initcall(omap_init_hdq); 98omap_arch_initcall(omap_init_hdq);
99#endif
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 157412e4273a..43969da5d50b 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -94,7 +94,7 @@ EXPORT_SYMBOL(omap_type);
94#define OMAP_TAP_DIE_ID_44XX_2 0x020c 94#define OMAP_TAP_DIE_ID_44XX_2 0x020c
95#define OMAP_TAP_DIE_ID_44XX_3 0x0210 95#define OMAP_TAP_DIE_ID_44XX_3 0x0210
96 96
97#define read_tap_reg(reg) __raw_readl(tap_base + (reg)) 97#define read_tap_reg(reg) readl_relaxed(tap_base + (reg))
98 98
99struct omap_id { 99struct omap_id {
100 u16 hawkeye; /* Silicon type (Hawkeye id) */ 100 u16 hawkeye; /* Silicon type (Hawkeye id) */
@@ -628,6 +628,41 @@ void __init omap5xxx_check_revision(void)
628 pr_info("%s %s\n", soc_name, soc_rev); 628 pr_info("%s %s\n", soc_name, soc_rev);
629} 629}
630 630
631void __init dra7xxx_check_revision(void)
632{
633 u32 idcode;
634 u16 hawkeye;
635 u8 rev;
636
637 idcode = read_tap_reg(OMAP_TAP_IDCODE);
638 hawkeye = (idcode >> 12) & 0xffff;
639 rev = (idcode >> 28) & 0xff;
640 switch (hawkeye) {
641 case 0xb990:
642 switch (rev) {
643 case 0:
644 omap_revision = DRA752_REV_ES1_0;
645 break;
646 case 1:
647 default:
648 omap_revision = DRA752_REV_ES1_1;
649 }
650 break;
651
652 default:
653 /* Unknown default to latest silicon rev as default*/
654 pr_warn("%s: unknown idcode=0x%08x (hawkeye=0x%08x,rev=0x%d)\n",
655 __func__, idcode, hawkeye, rev);
656 omap_revision = DRA752_REV_ES1_1;
657 }
658
659 sprintf(soc_name, "DRA%03x", omap_rev() >> 16);
660 sprintf(soc_rev, "ES%d.%d", (omap_rev() >> 12) & 0xf,
661 (omap_rev() >> 8) & 0xf);
662
663 pr_info("%s %s\n", soc_name, soc_rev);
664}
665
631/* 666/*
632 * Set up things for map_io and processor detection later on. Gets called 667 * Set up things for map_io and processor detection later on. Gets called
633 * pretty much first thing from board init. For multi-omap, this gets 668 * pretty much first thing from board init. For multi-omap, this gets
@@ -669,6 +704,8 @@ static const char * __init omap_get_family(void)
669 return kasprintf(GFP_KERNEL, "OMAP5"); 704 return kasprintf(GFP_KERNEL, "OMAP5");
670 else if (soc_is_am43xx()) 705 else if (soc_is_am43xx())
671 return kasprintf(GFP_KERNEL, "AM43xx"); 706 return kasprintf(GFP_KERNEL, "AM43xx");
707 else if (soc_is_dra7xx())
708 return kasprintf(GFP_KERNEL, "DRA7");
672 else 709 else
673 return kasprintf(GFP_KERNEL, "Unknown"); 710 return kasprintf(GFP_KERNEL, "Unknown");
674} 711}
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index f14f9ac2dca1..8f559450c876 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -609,6 +609,7 @@ void __init am43xx_init_early(void)
609 am43xx_clockdomains_init(); 609 am43xx_clockdomains_init();
610 am43xx_hwmod_init(); 610 am43xx_hwmod_init();
611 omap_hwmod_init_postsetup(); 611 omap_hwmod_init_postsetup();
612 omap_l2_cache_init();
612 omap_clk_soc_init = am43xx_dt_clk_init; 613 omap_clk_soc_init = am43xx_dt_clk_init;
613} 614}
614 615
@@ -640,6 +641,7 @@ void __init omap4430_init_early(void)
640 omap44xx_clockdomains_init(); 641 omap44xx_clockdomains_init();
641 omap44xx_hwmod_init(); 642 omap44xx_hwmod_init();
642 omap_hwmod_init_postsetup(); 643 omap_hwmod_init_postsetup();
644 omap_l2_cache_init();
643 omap_clk_soc_init = omap4xxx_dt_clk_init; 645 omap_clk_soc_init = omap4xxx_dt_clk_init;
644} 646}
645 647
@@ -693,6 +695,7 @@ void __init dra7xx_init_early(void)
693 omap_prm_base_init(); 695 omap_prm_base_init();
694 omap_cm_base_init(); 696 omap_cm_base_init();
695 omap44xx_prm_init(); 697 omap44xx_prm_init();
698 dra7xxx_check_revision();
696 dra7xx_powerdomains_init(); 699 dra7xx_powerdomains_init();
697 dra7xx_clockdomains_init(); 700 dra7xx_clockdomains_init();
698 dra7xx_hwmod_init(); 701 dra7xx_hwmod_init();
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 6037a9a01ed5..35b8590c322e 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -83,12 +83,12 @@ struct omap3_intc_regs {
83 83
84static void intc_bank_write_reg(u32 val, struct omap_irq_bank *bank, u16 reg) 84static void intc_bank_write_reg(u32 val, struct omap_irq_bank *bank, u16 reg)
85{ 85{
86 __raw_writel(val, bank->base_reg + reg); 86 writel_relaxed(val, bank->base_reg + reg);
87} 87}
88 88
89static u32 intc_bank_read_reg(struct omap_irq_bank *bank, u16 reg) 89static u32 intc_bank_read_reg(struct omap_irq_bank *bank, u16 reg)
90{ 90{
91 return __raw_readl(bank->base_reg + reg); 91 return readl_relaxed(bank->base_reg + reg);
92} 92}
93 93
94/* XXX: FIQ and additional INTC support (only MPU at the moment) */ 94/* XXX: FIQ and additional INTC support (only MPU at the moment) */
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 48094b58c88f..fd88edeb027f 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -70,18 +70,18 @@ struct omap_mux_partition *omap_mux_get(const char *name)
70u16 omap_mux_read(struct omap_mux_partition *partition, u16 reg) 70u16 omap_mux_read(struct omap_mux_partition *partition, u16 reg)
71{ 71{
72 if (partition->flags & OMAP_MUX_REG_8BIT) 72 if (partition->flags & OMAP_MUX_REG_8BIT)
73 return __raw_readb(partition->base + reg); 73 return readb_relaxed(partition->base + reg);
74 else 74 else
75 return __raw_readw(partition->base + reg); 75 return readw_relaxed(partition->base + reg);
76} 76}
77 77
78void omap_mux_write(struct omap_mux_partition *partition, u16 val, 78void omap_mux_write(struct omap_mux_partition *partition, u16 val,
79 u16 reg) 79 u16 reg)
80{ 80{
81 if (partition->flags & OMAP_MUX_REG_8BIT) 81 if (partition->flags & OMAP_MUX_REG_8BIT)
82 __raw_writeb(val, partition->base + reg); 82 writeb_relaxed(val, partition->base + reg);
83 else 83 else
84 __raw_writew(val, partition->base + reg); 84 writew_relaxed(val, partition->base + reg);
85} 85}
86 86
87void omap_mux_write_array(struct omap_mux_partition *partition, 87void omap_mux_write_array(struct omap_mux_partition *partition,
diff --git a/arch/arm/mach-omap2/omap-headsmp.S b/arch/arm/mach-omap2/omap-headsmp.S
index 75e92952c18e..4993d4bfe9b2 100644
--- a/arch/arm/mach-omap2/omap-headsmp.S
+++ b/arch/arm/mach-omap2/omap-headsmp.S
@@ -1,7 +1,7 @@
1/* 1/*
2 * Secondary CPU startup routine source file. 2 * Secondary CPU startup routine source file.
3 * 3 *
4 * Copyright (C) 2009 Texas Instruments, Inc. 4 * Copyright (C) 2009-2014 Texas Instruments, Inc.
5 * 5 *
6 * Author: 6 * Author:
7 * Santosh Shilimkar <santosh.shilimkar@ti.com> 7 * Santosh Shilimkar <santosh.shilimkar@ti.com>
@@ -28,7 +28,7 @@
28 * code. This routine also provides a holding flag into which 28 * code. This routine also provides a holding flag into which
29 * secondary core is held until we're ready for it to initialise. 29 * secondary core is held until we're ready for it to initialise.
30 * The primary core will update this flag using a hardware 30 * The primary core will update this flag using a hardware
31+ * register AuxCoreBoot0. 31 * register AuxCoreBoot0.
32 */ 32 */
33ENTRY(omap5_secondary_startup) 33ENTRY(omap5_secondary_startup)
34wait: ldr r2, =AUX_CORE_BOOT0_PA @ read from AuxCoreBoot0 34wait: ldr r2, =AUX_CORE_BOOT0_PA @ read from AuxCoreBoot0
@@ -39,7 +39,7 @@ wait: ldr r2, =AUX_CORE_BOOT0_PA @ read from AuxCoreBoot0
39 cmp r0, r4 39 cmp r0, r4
40 bne wait 40 bne wait
41 b secondary_startup 41 b secondary_startup
42END(omap5_secondary_startup) 42ENDPROC(omap5_secondary_startup)
43/* 43/*
44 * OMAP4 specific entry point for secondary CPU to jump from ROM 44 * OMAP4 specific entry point for secondary CPU to jump from ROM
45 * code. This routine also provides a holding flag into which 45 * code. This routine also provides a holding flag into which
diff --git a/arch/arm/mach-omap2/omap-hotplug.c b/arch/arm/mach-omap2/omap-hotplug.c
index 458f72f9dc8f..971791fe9a3f 100644
--- a/arch/arm/mach-omap2/omap-hotplug.c
+++ b/arch/arm/mach-omap2/omap-hotplug.c
@@ -39,7 +39,7 @@ void __ref omap4_cpu_die(unsigned int cpu)
39 if (omap_modify_auxcoreboot0(0x0, 0x200) != 0x0) 39 if (omap_modify_auxcoreboot0(0x0, 0x200) != 0x0)
40 pr_err("Secure clear status failed\n"); 40 pr_err("Secure clear status failed\n");
41 } else { 41 } else {
42 __raw_writel(0, base + OMAP_AUX_CORE_BOOT_0); 42 writel_relaxed(0, base + OMAP_AUX_CORE_BOOT_0);
43 } 43 }
44 44
45 45
@@ -53,7 +53,7 @@ void __ref omap4_cpu_die(unsigned int cpu)
53 boot_cpu = omap_read_auxcoreboot0(); 53 boot_cpu = omap_read_auxcoreboot0();
54 else 54 else
55 boot_cpu = 55 boot_cpu =
56 __raw_readl(base + OMAP_AUX_CORE_BOOT_0) >> 5; 56 readl_relaxed(base + OMAP_AUX_CORE_BOOT_0) >> 5;
57 57
58 if (boot_cpu == smp_processor_id()) { 58 if (boot_cpu == smp_processor_id()) {
59 /* 59 /*
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
index 667915d236f3..4001325f90fb 100644
--- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c
+++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
@@ -116,7 +116,7 @@ static inline void set_cpu_wakeup_addr(unsigned int cpu_id, u32 addr)
116{ 116{
117 struct omap4_cpu_pm_info *pm_info = &per_cpu(omap4_pm_info, cpu_id); 117 struct omap4_cpu_pm_info *pm_info = &per_cpu(omap4_pm_info, cpu_id);
118 118
119 __raw_writel(addr, pm_info->wkup_sar_addr); 119 writel_relaxed(addr, pm_info->wkup_sar_addr);
120} 120}
121 121
122/* 122/*
@@ -141,7 +141,7 @@ static void scu_pwrst_prepare(unsigned int cpu_id, unsigned int cpu_state)
141 break; 141 break;
142 } 142 }
143 143
144 __raw_writel(scu_pwr_st, pm_info->scu_sar_addr); 144 writel_relaxed(scu_pwr_st, pm_info->scu_sar_addr);
145} 145}
146 146
147/* Helper functions for MPUSS OSWR */ 147/* Helper functions for MPUSS OSWR */
@@ -179,7 +179,7 @@ static void l2x0_pwrst_prepare(unsigned int cpu_id, unsigned int save_state)
179{ 179{
180 struct omap4_cpu_pm_info *pm_info = &per_cpu(omap4_pm_info, cpu_id); 180 struct omap4_cpu_pm_info *pm_info = &per_cpu(omap4_pm_info, cpu_id);
181 181
182 __raw_writel(save_state, pm_info->l2x0_sar_addr); 182 writel_relaxed(save_state, pm_info->l2x0_sar_addr);
183} 183}
184 184
185/* 185/*
@@ -187,19 +187,15 @@ static void l2x0_pwrst_prepare(unsigned int cpu_id, unsigned int save_state)
187 * in every restore MPUSS OFF path. 187 * in every restore MPUSS OFF path.
188 */ 188 */
189#ifdef CONFIG_CACHE_L2X0 189#ifdef CONFIG_CACHE_L2X0
190static void save_l2x0_context(void) 190static void __init save_l2x0_context(void)
191{ 191{
192 u32 val; 192 writel_relaxed(l2x0_saved_regs.aux_ctrl,
193 void __iomem *l2x0_base = omap4_get_l2cache_base(); 193 sar_base + L2X0_AUXCTRL_OFFSET);
194 if (l2x0_base) { 194 writel_relaxed(l2x0_saved_regs.prefetch_ctrl,
195 val = __raw_readl(l2x0_base + L2X0_AUX_CTRL); 195 sar_base + L2X0_PREFETCH_CTRL_OFFSET);
196 __raw_writel(val, sar_base + L2X0_AUXCTRL_OFFSET);
197 val = __raw_readl(l2x0_base + L2X0_PREFETCH_CTRL);
198 __raw_writel(val, sar_base + L2X0_PREFETCH_CTRL_OFFSET);
199 }
200} 196}
201#else 197#else
202static void save_l2x0_context(void) 198static void __init save_l2x0_context(void)
203{} 199{}
204#endif 200#endif
205 201
@@ -386,9 +382,9 @@ int __init omap4_mpuss_init(void)
386 382
387 /* Save device type on scratchpad for low level code to use */ 383 /* Save device type on scratchpad for low level code to use */
388 if (omap_type() != OMAP2_DEVICE_TYPE_GP) 384 if (omap_type() != OMAP2_DEVICE_TYPE_GP)
389 __raw_writel(1, sar_base + OMAP_TYPE_OFFSET); 385 writel_relaxed(1, sar_base + OMAP_TYPE_OFFSET);
390 else 386 else
391 __raw_writel(0, sar_base + OMAP_TYPE_OFFSET); 387 writel_relaxed(0, sar_base + OMAP_TYPE_OFFSET);
392 388
393 save_l2x0_context(); 389 save_l2x0_context();
394 390
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 17550aa39d0f..256e84ef0f67 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -99,7 +99,7 @@ static int omap4_boot_secondary(unsigned int cpu, struct task_struct *idle)
99 if (omap_secure_apis_support()) 99 if (omap_secure_apis_support())
100 omap_modify_auxcoreboot0(0x200, 0xfffffdff); 100 omap_modify_auxcoreboot0(0x200, 0xfffffdff);
101 else 101 else
102 __raw_writel(0x20, base + OMAP_AUX_CORE_BOOT_0); 102 writel_relaxed(0x20, base + OMAP_AUX_CORE_BOOT_0);
103 103
104 if (!cpu1_clkdm && !cpu1_pwrdm) { 104 if (!cpu1_clkdm && !cpu1_pwrdm) {
105 cpu1_clkdm = clkdm_lookup("mpu1_clkdm"); 105 cpu1_clkdm = clkdm_lookup("mpu1_clkdm");
@@ -227,8 +227,8 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
227 if (omap_secure_apis_support()) 227 if (omap_secure_apis_support())
228 omap_auxcoreboot_addr(virt_to_phys(startup_addr)); 228 omap_auxcoreboot_addr(virt_to_phys(startup_addr));
229 else 229 else
230 __raw_writel(virt_to_phys(omap5_secondary_startup), 230 writel_relaxed(virt_to_phys(omap5_secondary_startup),
231 base + OMAP_AUX_CORE_BOOT_1); 231 base + OMAP_AUX_CORE_BOOT_1);
232 232
233} 233}
234 234
diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c
index 693fe486e917..37843a7d3639 100644
--- a/arch/arm/mach-omap2/omap-wakeupgen.c
+++ b/arch/arm/mach-omap2/omap-wakeupgen.c
@@ -60,19 +60,19 @@ static unsigned int omap_secure_apis;
60 */ 60 */
61static inline u32 wakeupgen_readl(u8 idx, u32 cpu) 61static inline u32 wakeupgen_readl(u8 idx, u32 cpu)
62{ 62{
63 return __raw_readl(wakeupgen_base + OMAP_WKG_ENB_A_0 + 63 return readl_relaxed(wakeupgen_base + OMAP_WKG_ENB_A_0 +
64 (cpu * CPU_ENA_OFFSET) + (idx * 4)); 64 (cpu * CPU_ENA_OFFSET) + (idx * 4));
65} 65}
66 66
67static inline void wakeupgen_writel(u32 val, u8 idx, u32 cpu) 67static inline void wakeupgen_writel(u32 val, u8 idx, u32 cpu)
68{ 68{
69 __raw_writel(val, wakeupgen_base + OMAP_WKG_ENB_A_0 + 69 writel_relaxed(val, wakeupgen_base + OMAP_WKG_ENB_A_0 +
70 (cpu * CPU_ENA_OFFSET) + (idx * 4)); 70 (cpu * CPU_ENA_OFFSET) + (idx * 4));
71} 71}
72 72
73static inline void sar_writel(u32 val, u32 offset, u8 idx) 73static inline void sar_writel(u32 val, u32 offset, u8 idx)
74{ 74{
75 __raw_writel(val, sar_base + offset + (idx * 4)); 75 writel_relaxed(val, sar_base + offset + (idx * 4));
76} 76}
77 77
78static inline int _wakeupgen_get_irq_info(u32 irq, u32 *bit_posn, u8 *reg_index) 78static inline int _wakeupgen_get_irq_info(u32 irq, u32 *bit_posn, u8 *reg_index)
@@ -231,21 +231,21 @@ static inline void omap4_irq_save_context(void)
231 } 231 }
232 232
233 /* Save AuxBoot* registers */ 233 /* Save AuxBoot* registers */
234 val = __raw_readl(wakeupgen_base + OMAP_AUX_CORE_BOOT_0); 234 val = readl_relaxed(wakeupgen_base + OMAP_AUX_CORE_BOOT_0);
235 __raw_writel(val, sar_base + AUXCOREBOOT0_OFFSET); 235 writel_relaxed(val, sar_base + AUXCOREBOOT0_OFFSET);
236 val = __raw_readl(wakeupgen_base + OMAP_AUX_CORE_BOOT_1); 236 val = readl_relaxed(wakeupgen_base + OMAP_AUX_CORE_BOOT_1);
237 __raw_writel(val, sar_base + AUXCOREBOOT1_OFFSET); 237 writel_relaxed(val, sar_base + AUXCOREBOOT1_OFFSET);
238 238
239 /* Save SyncReq generation logic */ 239 /* Save SyncReq generation logic */
240 val = __raw_readl(wakeupgen_base + OMAP_PTMSYNCREQ_MASK); 240 val = readl_relaxed(wakeupgen_base + OMAP_PTMSYNCREQ_MASK);
241 __raw_writel(val, sar_base + PTMSYNCREQ_MASK_OFFSET); 241 writel_relaxed(val, sar_base + PTMSYNCREQ_MASK_OFFSET);
242 val = __raw_readl(wakeupgen_base + OMAP_PTMSYNCREQ_EN); 242 val = readl_relaxed(wakeupgen_base + OMAP_PTMSYNCREQ_EN);
243 __raw_writel(val, sar_base + PTMSYNCREQ_EN_OFFSET); 243 writel_relaxed(val, sar_base + PTMSYNCREQ_EN_OFFSET);
244 244
245 /* Set the Backup Bit Mask status */ 245 /* Set the Backup Bit Mask status */
246 val = __raw_readl(sar_base + SAR_BACKUP_STATUS_OFFSET); 246 val = readl_relaxed(sar_base + SAR_BACKUP_STATUS_OFFSET);
247 val |= SAR_BACKUP_STATUS_WAKEUPGEN; 247 val |= SAR_BACKUP_STATUS_WAKEUPGEN;
248 __raw_writel(val, sar_base + SAR_BACKUP_STATUS_OFFSET); 248 writel_relaxed(val, sar_base + SAR_BACKUP_STATUS_OFFSET);
249 249
250} 250}
251 251
@@ -264,15 +264,15 @@ static inline void omap5_irq_save_context(void)
264 } 264 }
265 265
266 /* Save AuxBoot* registers */ 266 /* Save AuxBoot* registers */
267 val = __raw_readl(wakeupgen_base + OMAP_AUX_CORE_BOOT_0); 267 val = readl_relaxed(wakeupgen_base + OMAP_AUX_CORE_BOOT_0);
268 __raw_writel(val, sar_base + OMAP5_AUXCOREBOOT0_OFFSET); 268 writel_relaxed(val, sar_base + OMAP5_AUXCOREBOOT0_OFFSET);
269 val = __raw_readl(wakeupgen_base + OMAP_AUX_CORE_BOOT_0); 269 val = readl_relaxed(wakeupgen_base + OMAP_AUX_CORE_BOOT_0);
270 __raw_writel(val, sar_base + OMAP5_AUXCOREBOOT1_OFFSET); 270 writel_relaxed(val, sar_base + OMAP5_AUXCOREBOOT1_OFFSET);
271 271
272 /* Set the Backup Bit Mask status */ 272 /* Set the Backup Bit Mask status */
273 val = __raw_readl(sar_base + OMAP5_SAR_BACKUP_STATUS_OFFSET); 273 val = readl_relaxed(sar_base + OMAP5_SAR_BACKUP_STATUS_OFFSET);
274 val |= SAR_BACKUP_STATUS_WAKEUPGEN; 274 val |= SAR_BACKUP_STATUS_WAKEUPGEN;
275 __raw_writel(val, sar_base + OMAP5_SAR_BACKUP_STATUS_OFFSET); 275 writel_relaxed(val, sar_base + OMAP5_SAR_BACKUP_STATUS_OFFSET);
276 276
277} 277}
278 278
@@ -306,9 +306,9 @@ static void irq_sar_clear(void)
306 if (soc_is_omap54xx()) 306 if (soc_is_omap54xx())
307 offset = OMAP5_SAR_BACKUP_STATUS_OFFSET; 307 offset = OMAP5_SAR_BACKUP_STATUS_OFFSET;
308 308
309 val = __raw_readl(sar_base + offset); 309 val = readl_relaxed(sar_base + offset);
310 val &= ~SAR_BACKUP_STATUS_WAKEUPGEN; 310 val &= ~SAR_BACKUP_STATUS_WAKEUPGEN;
311 __raw_writel(val, sar_base + offset); 311 writel_relaxed(val, sar_base + offset);
312} 312}
313 313
314/* 314/*
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 95e171a055f3..326cd982a3cb 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -125,25 +125,25 @@ void __init gic_init_irq(void)
125void gic_dist_disable(void) 125void gic_dist_disable(void)
126{ 126{
127 if (gic_dist_base_addr) 127 if (gic_dist_base_addr)
128 __raw_writel(0x0, gic_dist_base_addr + GIC_DIST_CTRL); 128 writel_relaxed(0x0, gic_dist_base_addr + GIC_DIST_CTRL);
129} 129}
130 130
131void gic_dist_enable(void) 131void gic_dist_enable(void)
132{ 132{
133 if (gic_dist_base_addr) 133 if (gic_dist_base_addr)
134 __raw_writel(0x1, gic_dist_base_addr + GIC_DIST_CTRL); 134 writel_relaxed(0x1, gic_dist_base_addr + GIC_DIST_CTRL);
135} 135}
136 136
137bool gic_dist_disabled(void) 137bool gic_dist_disabled(void)
138{ 138{
139 return !(__raw_readl(gic_dist_base_addr + GIC_DIST_CTRL) & 0x1); 139 return !(readl_relaxed(gic_dist_base_addr + GIC_DIST_CTRL) & 0x1);
140} 140}
141 141
142void gic_timer_retrigger(void) 142void gic_timer_retrigger(void)
143{ 143{
144 u32 twd_int = __raw_readl(twd_base + TWD_TIMER_INTSTAT); 144 u32 twd_int = readl_relaxed(twd_base + TWD_TIMER_INTSTAT);
145 u32 gic_int = __raw_readl(gic_dist_base_addr + GIC_DIST_PENDING_SET); 145 u32 gic_int = readl_relaxed(gic_dist_base_addr + GIC_DIST_PENDING_SET);
146 u32 twd_ctrl = __raw_readl(twd_base + TWD_TIMER_CONTROL); 146 u32 twd_ctrl = readl_relaxed(twd_base + TWD_TIMER_CONTROL);
147 147
148 if (twd_int && !(gic_int & BIT(IRQ_LOCALTIMER))) { 148 if (twd_int && !(gic_int & BIT(IRQ_LOCALTIMER))) {
149 /* 149 /*
@@ -151,11 +151,11 @@ void gic_timer_retrigger(void)
151 * disabled. Ack the pending interrupt, and retrigger it. 151 * disabled. Ack the pending interrupt, and retrigger it.
152 */ 152 */
153 pr_warn("%s: lost localtimer interrupt\n", __func__); 153 pr_warn("%s: lost localtimer interrupt\n", __func__);
154 __raw_writel(1, twd_base + TWD_TIMER_INTSTAT); 154 writel_relaxed(1, twd_base + TWD_TIMER_INTSTAT);
155 if (!(twd_ctrl & TWD_TIMER_CONTROL_PERIODIC)) { 155 if (!(twd_ctrl & TWD_TIMER_CONTROL_PERIODIC)) {
156 __raw_writel(1, twd_base + TWD_TIMER_COUNTER); 156 writel_relaxed(1, twd_base + TWD_TIMER_COUNTER);
157 twd_ctrl |= TWD_TIMER_CONTROL_ENABLE; 157 twd_ctrl |= TWD_TIMER_CONTROL_ENABLE;
158 __raw_writel(twd_ctrl, twd_base + TWD_TIMER_CONTROL); 158 writel_relaxed(twd_ctrl, twd_base + TWD_TIMER_CONTROL);
159 } 159 }
160 } 160 }
161} 161}
@@ -167,75 +167,57 @@ void __iomem *omap4_get_l2cache_base(void)
167 return l2cache_base; 167 return l2cache_base;
168} 168}
169 169
170static void omap4_l2x0_disable(void) 170static void omap4_l2c310_write_sec(unsigned long val, unsigned reg)
171{ 171{
172 outer_flush_all(); 172 unsigned smc_op;
173 /* Disable PL310 L2 Cache controller */
174 omap_smc1(0x102, 0x0);
175}
176 173
177static void omap4_l2x0_set_debug(unsigned long val) 174 switch (reg) {
178{ 175 case L2X0_CTRL:
179 /* Program PL310 L2 Cache controller debug register */ 176 smc_op = OMAP4_MON_L2X0_CTRL_INDEX;
180 omap_smc1(0x100, val); 177 break;
178
179 case L2X0_AUX_CTRL:
180 smc_op = OMAP4_MON_L2X0_AUXCTRL_INDEX;
181 break;
182
183 case L2X0_DEBUG_CTRL:
184 smc_op = OMAP4_MON_L2X0_DBG_CTRL_INDEX;
185 break;
186
187 case L310_PREFETCH_CTRL:
188 smc_op = OMAP4_MON_L2X0_PREFETCH_INDEX;
189 break;
190
191 default:
192 WARN_ONCE(1, "OMAP L2C310: ignoring write to reg 0x%x\n", reg);
193 return;
194 }
195
196 omap_smc1(smc_op, val);
181} 197}
182 198
183static int __init omap_l2_cache_init(void) 199int __init omap_l2_cache_init(void)
184{ 200{
185 u32 aux_ctrl = 0; 201 u32 aux_ctrl;
186
187 /*
188 * To avoid code running on other OMAPs in
189 * multi-omap builds
190 */
191 if (!cpu_is_omap44xx())
192 return -ENODEV;
193 202
194 /* Static mapping, never released */ 203 /* Static mapping, never released */
195 l2cache_base = ioremap(OMAP44XX_L2CACHE_BASE, SZ_4K); 204 l2cache_base = ioremap(OMAP44XX_L2CACHE_BASE, SZ_4K);
196 if (WARN_ON(!l2cache_base)) 205 if (WARN_ON(!l2cache_base))
197 return -ENOMEM; 206 return -ENOMEM;
198 207
199 /* 208 /* 16-way associativity, parity disabled, way size - 64KB (es2.0 +) */
200 * 16-way associativity, parity disabled 209 aux_ctrl = L2C_AUX_CTRL_SHARED_OVERRIDE |
201 * Way size - 32KB (es1.0) 210 L310_AUX_CTRL_DATA_PREFETCH |
202 * Way size - 64KB (es2.0 +) 211 L310_AUX_CTRL_INSTR_PREFETCH;
203 */
204 aux_ctrl = ((1 << L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT) |
205 (0x1 << 25) |
206 (0x1 << L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT) |
207 (0x1 << L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT));
208
209 if (omap_rev() == OMAP4430_REV_ES1_0) {
210 aux_ctrl |= 0x2 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT;
211 } else {
212 aux_ctrl |= ((0x3 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT) |
213 (1 << L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT) |
214 (1 << L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT) |
215 (1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
216 (1 << L2X0_AUX_CTRL_EARLY_BRESP_SHIFT));
217 }
218 if (omap_rev() != OMAP4430_REV_ES1_0)
219 omap_smc1(0x109, aux_ctrl);
220
221 /* Enable PL310 L2 Cache controller */
222 omap_smc1(0x102, 0x1);
223 212
213 outer_cache.write_sec = omap4_l2c310_write_sec;
224 if (of_have_populated_dt()) 214 if (of_have_populated_dt())
225 l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK); 215 l2x0_of_init(aux_ctrl, 0xcf9fffff);
226 else 216 else
227 l2x0_init(l2cache_base, aux_ctrl, L2X0_AUX_CTRL_MASK); 217 l2x0_init(l2cache_base, aux_ctrl, 0xcf9fffff);
228
229 /*
230 * Override default outer_cache.disable with a OMAP4
231 * specific one
232 */
233 outer_cache.disable = omap4_l2x0_disable;
234 outer_cache.set_debug = omap4_l2x0_set_debug;
235 218
236 return 0; 219 return 0;
237} 220}
238omap_early_initcall(omap_l2_cache_init);
239#endif 221#endif
240 222
241void __iomem *omap4_get_sar_ram_base(void) 223void __iomem *omap4_get_sar_ram_base(void)
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 66c60fe1104c..f7bb435bb543 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -72,7 +72,7 @@
72 * | (../mach-omap2/omap_hwmod*) | 72 * | (../mach-omap2/omap_hwmod*) |
73 * +-------------------------------+ 73 * +-------------------------------+
74 * | OMAP clock/PRCM/register fns | 74 * | OMAP clock/PRCM/register fns |
75 * | (__raw_{read,write}l, clk*) | 75 * | ({read,write}l_relaxed, clk*) |
76 * +-------------------------------+ 76 * +-------------------------------+
77 * 77 *
78 * Device drivers should not contain any OMAP-specific code or data in 78 * Device drivers should not contain any OMAP-specific code or data in
@@ -3230,17 +3230,17 @@ static int _am33xx_is_hardreset_asserted(struct omap_hwmod *oh,
3230u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs) 3230u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs)
3231{ 3231{
3232 if (oh->flags & HWMOD_16BIT_REG) 3232 if (oh->flags & HWMOD_16BIT_REG)
3233 return __raw_readw(oh->_mpu_rt_va + reg_offs); 3233 return readw_relaxed(oh->_mpu_rt_va + reg_offs);
3234 else 3234 else
3235 return __raw_readl(oh->_mpu_rt_va + reg_offs); 3235 return readl_relaxed(oh->_mpu_rt_va + reg_offs);
3236} 3236}
3237 3237
3238void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs) 3238void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs)
3239{ 3239{
3240 if (oh->flags & HWMOD_16BIT_REG) 3240 if (oh->flags & HWMOD_16BIT_REG)
3241 __raw_writew(v, oh->_mpu_rt_va + reg_offs); 3241 writew_relaxed(v, oh->_mpu_rt_va + reg_offs);
3242 else 3242 else
3243 __raw_writel(v, oh->_mpu_rt_va + reg_offs); 3243 writel_relaxed(v, oh->_mpu_rt_va + reg_offs);
3244} 3244}
3245 3245
3246/** 3246/**
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
index 0f178623e7da..a579b89ce9b7 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
@@ -24,6 +24,7 @@
24#include "prm33xx.h" 24#include "prm33xx.h"
25#include "omap_hwmod_33xx_43xx_common_data.h" 25#include "omap_hwmod_33xx_43xx_common_data.h"
26#include "prcm43xx.h" 26#include "prcm43xx.h"
27#include "common.h"
27 28
28#define CLKCTRL(oh, clkctrl) ((oh).prcm.omap4.clkctrl_offs = (clkctrl)) 29#define CLKCTRL(oh, clkctrl) ((oh).prcm.omap4.clkctrl_offs = (clkctrl))
29#define RSTCTRL(oh, rstctrl) ((oh).prcm.omap4.rstctrl_offs = (rstctrl)) 30#define RSTCTRL(oh, rstctrl) ((oh).prcm.omap4.rstctrl_offs = (rstctrl))
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 71ac7d5f3385..1cd0cfdc03e0 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -3689,12 +3689,9 @@ static struct omap_hwmod_class_sysconfig omap34xx_ssi_sysc = {
3689 .rev_offs = 0x0000, 3689 .rev_offs = 0x0000,
3690 .sysc_offs = 0x0010, 3690 .sysc_offs = 0x0010,
3691 .syss_offs = 0x0014, 3691 .syss_offs = 0x0014,
3692 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_EMUFREE | 3692 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_MIDLEMODE |
3693 SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE | 3693 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
3694 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), 3694 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
3695 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3696 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
3697 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
3698 .sysc_fields = &omap_hwmod_sysc_type1, 3695 .sysc_fields = &omap_hwmod_sysc_type1,
3699}; 3696};
3700 3697
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 1219280bb976..41e54f759934 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -3635,15 +3635,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = {
3635 .master = &omap44xx_l4_abe_hwmod, 3635 .master = &omap44xx_l4_abe_hwmod,
3636 .slave = &omap44xx_dmic_hwmod, 3636 .slave = &omap44xx_dmic_hwmod,
3637 .clk = "ocp_abe_iclk", 3637 .clk = "ocp_abe_iclk",
3638 .user = OCP_USER_MPU, 3638 .user = OCP_USER_MPU | OCP_USER_SDMA,
3639};
3640
3641/* l4_abe -> dmic (dma) */
3642static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = {
3643 .master = &omap44xx_l4_abe_hwmod,
3644 .slave = &omap44xx_dmic_hwmod,
3645 .clk = "ocp_abe_iclk",
3646 .user = OCP_USER_SDMA,
3647}; 3639};
3648 3640
3649/* dsp -> iva */ 3641/* dsp -> iva */
@@ -4209,15 +4201,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = {
4209 .master = &omap44xx_l4_abe_hwmod, 4201 .master = &omap44xx_l4_abe_hwmod,
4210 .slave = &omap44xx_mcbsp1_hwmod, 4202 .slave = &omap44xx_mcbsp1_hwmod,
4211 .clk = "ocp_abe_iclk", 4203 .clk = "ocp_abe_iclk",
4212 .user = OCP_USER_MPU, 4204 .user = OCP_USER_MPU | OCP_USER_SDMA,
4213};
4214
4215/* l4_abe -> mcbsp1 (dma) */
4216static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = {
4217 .master = &omap44xx_l4_abe_hwmod,
4218 .slave = &omap44xx_mcbsp1_hwmod,
4219 .clk = "ocp_abe_iclk",
4220 .user = OCP_USER_SDMA,
4221}; 4205};
4222 4206
4223/* l4_abe -> mcbsp2 */ 4207/* l4_abe -> mcbsp2 */
@@ -4225,15 +4209,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = {
4225 .master = &omap44xx_l4_abe_hwmod, 4209 .master = &omap44xx_l4_abe_hwmod,
4226 .slave = &omap44xx_mcbsp2_hwmod, 4210 .slave = &omap44xx_mcbsp2_hwmod,
4227 .clk = "ocp_abe_iclk", 4211 .clk = "ocp_abe_iclk",
4228 .user = OCP_USER_MPU, 4212 .user = OCP_USER_MPU | OCP_USER_SDMA,
4229};
4230
4231/* l4_abe -> mcbsp2 (dma) */
4232static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = {
4233 .master = &omap44xx_l4_abe_hwmod,
4234 .slave = &omap44xx_mcbsp2_hwmod,
4235 .clk = "ocp_abe_iclk",
4236 .user = OCP_USER_SDMA,
4237}; 4213};
4238 4214
4239/* l4_abe -> mcbsp3 */ 4215/* l4_abe -> mcbsp3 */
@@ -4241,15 +4217,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = {
4241 .master = &omap44xx_l4_abe_hwmod, 4217 .master = &omap44xx_l4_abe_hwmod,
4242 .slave = &omap44xx_mcbsp3_hwmod, 4218 .slave = &omap44xx_mcbsp3_hwmod,
4243 .clk = "ocp_abe_iclk", 4219 .clk = "ocp_abe_iclk",
4244 .user = OCP_USER_MPU, 4220 .user = OCP_USER_MPU | OCP_USER_SDMA,
4245};
4246
4247/* l4_abe -> mcbsp3 (dma) */
4248static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = {
4249 .master = &omap44xx_l4_abe_hwmod,
4250 .slave = &omap44xx_mcbsp3_hwmod,
4251 .clk = "ocp_abe_iclk",
4252 .user = OCP_USER_SDMA,
4253}; 4221};
4254 4222
4255/* l4_per -> mcbsp4 */ 4223/* l4_per -> mcbsp4 */
@@ -4265,15 +4233,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = {
4265 .master = &omap44xx_l4_abe_hwmod, 4233 .master = &omap44xx_l4_abe_hwmod,
4266 .slave = &omap44xx_mcpdm_hwmod, 4234 .slave = &omap44xx_mcpdm_hwmod,
4267 .clk = "ocp_abe_iclk", 4235 .clk = "ocp_abe_iclk",
4268 .user = OCP_USER_MPU, 4236 .user = OCP_USER_MPU | OCP_USER_SDMA,
4269};
4270
4271/* l4_abe -> mcpdm (dma) */
4272static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = {
4273 .master = &omap44xx_l4_abe_hwmod,
4274 .slave = &omap44xx_mcpdm_hwmod,
4275 .clk = "ocp_abe_iclk",
4276 .user = OCP_USER_SDMA,
4277}; 4237};
4278 4238
4279/* l4_per -> mcspi1 */ 4239/* l4_per -> mcspi1 */
@@ -4575,15 +4535,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = {
4575 .master = &omap44xx_l4_abe_hwmod, 4535 .master = &omap44xx_l4_abe_hwmod,
4576 .slave = &omap44xx_timer5_hwmod, 4536 .slave = &omap44xx_timer5_hwmod,
4577 .clk = "ocp_abe_iclk", 4537 .clk = "ocp_abe_iclk",
4578 .user = OCP_USER_MPU, 4538 .user = OCP_USER_MPU | OCP_USER_SDMA,
4579};
4580
4581/* l4_abe -> timer5 (dma) */
4582static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = {
4583 .master = &omap44xx_l4_abe_hwmod,
4584 .slave = &omap44xx_timer5_hwmod,
4585 .clk = "ocp_abe_iclk",
4586 .user = OCP_USER_SDMA,
4587}; 4539};
4588 4540
4589/* l4_abe -> timer6 */ 4541/* l4_abe -> timer6 */
@@ -4591,15 +4543,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = {
4591 .master = &omap44xx_l4_abe_hwmod, 4543 .master = &omap44xx_l4_abe_hwmod,
4592 .slave = &omap44xx_timer6_hwmod, 4544 .slave = &omap44xx_timer6_hwmod,
4593 .clk = "ocp_abe_iclk", 4545 .clk = "ocp_abe_iclk",
4594 .user = OCP_USER_MPU, 4546 .user = OCP_USER_MPU | OCP_USER_SDMA,
4595};
4596
4597/* l4_abe -> timer6 (dma) */
4598static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = {
4599 .master = &omap44xx_l4_abe_hwmod,
4600 .slave = &omap44xx_timer6_hwmod,
4601 .clk = "ocp_abe_iclk",
4602 .user = OCP_USER_SDMA,
4603}; 4547};
4604 4548
4605/* l4_abe -> timer7 */ 4549/* l4_abe -> timer7 */
@@ -4607,15 +4551,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = {
4607 .master = &omap44xx_l4_abe_hwmod, 4551 .master = &omap44xx_l4_abe_hwmod,
4608 .slave = &omap44xx_timer7_hwmod, 4552 .slave = &omap44xx_timer7_hwmod,
4609 .clk = "ocp_abe_iclk", 4553 .clk = "ocp_abe_iclk",
4610 .user = OCP_USER_MPU, 4554 .user = OCP_USER_MPU | OCP_USER_SDMA,
4611};
4612
4613/* l4_abe -> timer7 (dma) */
4614static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = {
4615 .master = &omap44xx_l4_abe_hwmod,
4616 .slave = &omap44xx_timer7_hwmod,
4617 .clk = "ocp_abe_iclk",
4618 .user = OCP_USER_SDMA,
4619}; 4555};
4620 4556
4621/* l4_abe -> timer8 */ 4557/* l4_abe -> timer8 */
@@ -4623,15 +4559,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = {
4623 .master = &omap44xx_l4_abe_hwmod, 4559 .master = &omap44xx_l4_abe_hwmod,
4624 .slave = &omap44xx_timer8_hwmod, 4560 .slave = &omap44xx_timer8_hwmod,
4625 .clk = "ocp_abe_iclk", 4561 .clk = "ocp_abe_iclk",
4626 .user = OCP_USER_MPU, 4562 .user = OCP_USER_MPU | OCP_USER_SDMA,
4627};
4628
4629/* l4_abe -> timer8 (dma) */
4630static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = {
4631 .master = &omap44xx_l4_abe_hwmod,
4632 .slave = &omap44xx_timer8_hwmod,
4633 .clk = "ocp_abe_iclk",
4634 .user = OCP_USER_SDMA,
4635}; 4563};
4636 4564
4637/* l4_per -> timer9 */ 4565/* l4_per -> timer9 */
@@ -4831,7 +4759,6 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
4831 &omap44xx_l3_instr__debugss, 4759 &omap44xx_l3_instr__debugss,
4832 &omap44xx_l4_cfg__dma_system, 4760 &omap44xx_l4_cfg__dma_system,
4833 &omap44xx_l4_abe__dmic, 4761 &omap44xx_l4_abe__dmic,
4834 &omap44xx_l4_abe__dmic_dma,
4835 &omap44xx_dsp__iva, 4762 &omap44xx_dsp__iva,
4836 /* &omap44xx_dsp__sl2if, */ 4763 /* &omap44xx_dsp__sl2if, */
4837 &omap44xx_l4_cfg__dsp, 4764 &omap44xx_l4_cfg__dsp,
@@ -4874,14 +4801,10 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
4874 &omap44xx_l4_abe__mcasp, 4801 &omap44xx_l4_abe__mcasp,
4875 &omap44xx_l4_abe__mcasp_dma, 4802 &omap44xx_l4_abe__mcasp_dma,
4876 &omap44xx_l4_abe__mcbsp1, 4803 &omap44xx_l4_abe__mcbsp1,
4877 &omap44xx_l4_abe__mcbsp1_dma,
4878 &omap44xx_l4_abe__mcbsp2, 4804 &omap44xx_l4_abe__mcbsp2,
4879 &omap44xx_l4_abe__mcbsp2_dma,
4880 &omap44xx_l4_abe__mcbsp3, 4805 &omap44xx_l4_abe__mcbsp3,
4881 &omap44xx_l4_abe__mcbsp3_dma,
4882 &omap44xx_l4_per__mcbsp4, 4806 &omap44xx_l4_per__mcbsp4,
4883 &omap44xx_l4_abe__mcpdm, 4807 &omap44xx_l4_abe__mcpdm,
4884 &omap44xx_l4_abe__mcpdm_dma,
4885 &omap44xx_l4_per__mcspi1, 4808 &omap44xx_l4_per__mcspi1,
4886 &omap44xx_l4_per__mcspi2, 4809 &omap44xx_l4_per__mcspi2,
4887 &omap44xx_l4_per__mcspi3, 4810 &omap44xx_l4_per__mcspi3,
@@ -4913,13 +4836,9 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
4913 &omap44xx_l4_per__timer3, 4836 &omap44xx_l4_per__timer3,
4914 &omap44xx_l4_per__timer4, 4837 &omap44xx_l4_per__timer4,
4915 &omap44xx_l4_abe__timer5, 4838 &omap44xx_l4_abe__timer5,
4916 &omap44xx_l4_abe__timer5_dma,
4917 &omap44xx_l4_abe__timer6, 4839 &omap44xx_l4_abe__timer6,
4918 &omap44xx_l4_abe__timer6_dma,
4919 &omap44xx_l4_abe__timer7, 4840 &omap44xx_l4_abe__timer7,
4920 &omap44xx_l4_abe__timer7_dma,
4921 &omap44xx_l4_abe__timer8, 4841 &omap44xx_l4_abe__timer8,
4922 &omap44xx_l4_abe__timer8_dma,
4923 &omap44xx_l4_per__timer9, 4842 &omap44xx_l4_per__timer9,
4924 &omap44xx_l4_per__timer10, 4843 &omap44xx_l4_per__timer10,
4925 &omap44xx_l4_per__timer11, 4844 &omap44xx_l4_per__timer11,
diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
index 892317294fdc..290213f2cbe3 100644
--- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
@@ -334,6 +334,235 @@ static struct omap_hwmod omap54xx_dmic_hwmod = {
334}; 334};
335 335
336/* 336/*
337 * 'dss' class
338 * display sub-system
339 */
340static struct omap_hwmod_class_sysconfig omap54xx_dss_sysc = {
341 .rev_offs = 0x0000,
342 .syss_offs = 0x0014,
343 .sysc_flags = SYSS_HAS_RESET_STATUS,
344};
345
346static struct omap_hwmod_class omap54xx_dss_hwmod_class = {
347 .name = "dss",
348 .sysc = &omap54xx_dss_sysc,
349 .reset = omap_dss_reset,
350};
351
352/* dss */
353static struct omap_hwmod_opt_clk dss_opt_clks[] = {
354 { .role = "32khz_clk", .clk = "dss_32khz_clk" },
355 { .role = "sys_clk", .clk = "dss_sys_clk" },
356 { .role = "hdmi_clk", .clk = "dss_48mhz_clk" },
357};
358
359static struct omap_hwmod omap54xx_dss_hwmod = {
360 .name = "dss_core",
361 .class = &omap54xx_dss_hwmod_class,
362 .clkdm_name = "dss_clkdm",
363 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
364 .main_clk = "dss_dss_clk",
365 .prcm = {
366 .omap4 = {
367 .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET,
368 .context_offs = OMAP54XX_RM_DSS_DSS_CONTEXT_OFFSET,
369 .modulemode = MODULEMODE_SWCTRL,
370 },
371 },
372 .opt_clks = dss_opt_clks,
373 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
374};
375
376/*
377 * 'dispc' class
378 * display controller
379 */
380
381static struct omap_hwmod_class_sysconfig omap54xx_dispc_sysc = {
382 .rev_offs = 0x0000,
383 .sysc_offs = 0x0010,
384 .syss_offs = 0x0014,
385 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
386 SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE |
387 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
388 SYSS_HAS_RESET_STATUS),
389 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
390 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
391 .sysc_fields = &omap_hwmod_sysc_type1,
392};
393
394static struct omap_hwmod_class omap54xx_dispc_hwmod_class = {
395 .name = "dispc",
396 .sysc = &omap54xx_dispc_sysc,
397};
398
399/* dss_dispc */
400static struct omap_hwmod_opt_clk dss_dispc_opt_clks[] = {
401 { .role = "sys_clk", .clk = "dss_sys_clk" },
402};
403
404/* dss_dispc dev_attr */
405static struct omap_dss_dispc_dev_attr dss_dispc_dev_attr = {
406 .has_framedonetv_irq = 1,
407 .manager_count = 4,
408};
409
410static struct omap_hwmod omap54xx_dss_dispc_hwmod = {
411 .name = "dss_dispc",
412 .class = &omap54xx_dispc_hwmod_class,
413 .clkdm_name = "dss_clkdm",
414 .main_clk = "dss_dss_clk",
415 .prcm = {
416 .omap4 = {
417 .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET,
418 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
419 },
420 },
421 .opt_clks = dss_dispc_opt_clks,
422 .opt_clks_cnt = ARRAY_SIZE(dss_dispc_opt_clks),
423 .dev_attr = &dss_dispc_dev_attr,
424};
425
426/*
427 * 'dsi1' class
428 * display serial interface controller
429 */
430
431static struct omap_hwmod_class_sysconfig omap54xx_dsi1_sysc = {
432 .rev_offs = 0x0000,
433 .sysc_offs = 0x0010,
434 .syss_offs = 0x0014,
435 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
436 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
437 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
438 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
439 .sysc_fields = &omap_hwmod_sysc_type1,
440};
441
442static struct omap_hwmod_class omap54xx_dsi1_hwmod_class = {
443 .name = "dsi1",
444 .sysc = &omap54xx_dsi1_sysc,
445};
446
447/* dss_dsi1_a */
448static struct omap_hwmod_opt_clk dss_dsi1_a_opt_clks[] = {
449 { .role = "sys_clk", .clk = "dss_sys_clk" },
450};
451
452static struct omap_hwmod omap54xx_dss_dsi1_a_hwmod = {
453 .name = "dss_dsi1",
454 .class = &omap54xx_dsi1_hwmod_class,
455 .clkdm_name = "dss_clkdm",
456 .main_clk = "dss_dss_clk",
457 .prcm = {
458 .omap4 = {
459 .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET,
460 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
461 },
462 },
463 .opt_clks = dss_dsi1_a_opt_clks,
464 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_a_opt_clks),
465};
466
467/* dss_dsi1_c */
468static struct omap_hwmod_opt_clk dss_dsi1_c_opt_clks[] = {
469 { .role = "sys_clk", .clk = "dss_sys_clk" },
470};
471
472static struct omap_hwmod omap54xx_dss_dsi1_c_hwmod = {
473 .name = "dss_dsi2",
474 .class = &omap54xx_dsi1_hwmod_class,
475 .clkdm_name = "dss_clkdm",
476 .main_clk = "dss_dss_clk",
477 .prcm = {
478 .omap4 = {
479 .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET,
480 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
481 },
482 },
483 .opt_clks = dss_dsi1_c_opt_clks,
484 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_c_opt_clks),
485};
486
487/*
488 * 'hdmi' class
489 * hdmi controller
490 */
491
492static struct omap_hwmod_class_sysconfig omap54xx_hdmi_sysc = {
493 .rev_offs = 0x0000,
494 .sysc_offs = 0x0010,
495 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
496 SYSC_HAS_SOFTRESET),
497 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
498 SIDLE_SMART_WKUP),
499 .sysc_fields = &omap_hwmod_sysc_type2,
500};
501
502static struct omap_hwmod_class omap54xx_hdmi_hwmod_class = {
503 .name = "hdmi",
504 .sysc = &omap54xx_hdmi_sysc,
505};
506
507static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
508 { .role = "sys_clk", .clk = "dss_sys_clk" },
509};
510
511static struct omap_hwmod omap54xx_dss_hdmi_hwmod = {
512 .name = "dss_hdmi",
513 .class = &omap54xx_hdmi_hwmod_class,
514 .clkdm_name = "dss_clkdm",
515 .main_clk = "dss_48mhz_clk",
516 .prcm = {
517 .omap4 = {
518 .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET,
519 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
520 },
521 },
522 .opt_clks = dss_hdmi_opt_clks,
523 .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks),
524};
525
526/*
527 * 'rfbi' class
528 * remote frame buffer interface
529 */
530
531static struct omap_hwmod_class_sysconfig omap54xx_rfbi_sysc = {
532 .rev_offs = 0x0000,
533 .sysc_offs = 0x0010,
534 .syss_offs = 0x0014,
535 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
536 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
537 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
538 .sysc_fields = &omap_hwmod_sysc_type1,
539};
540
541static struct omap_hwmod_class omap54xx_rfbi_hwmod_class = {
542 .name = "rfbi",
543 .sysc = &omap54xx_rfbi_sysc,
544};
545
546/* dss_rfbi */
547static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
548 { .role = "ick", .clk = "l3_iclk_div" },
549};
550
551static struct omap_hwmod omap54xx_dss_rfbi_hwmod = {
552 .name = "dss_rfbi",
553 .class = &omap54xx_rfbi_hwmod_class,
554 .clkdm_name = "dss_clkdm",
555 .prcm = {
556 .omap4 = {
557 .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET,
558 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
559 },
560 },
561 .opt_clks = dss_rfbi_opt_clks,
562 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
563};
564
565/*
337 * 'emif' class 566 * 'emif' class
338 * external memory interface no1 (wrapper) 567 * external memory interface no1 (wrapper)
339 */ 568 */
@@ -895,7 +1124,7 @@ static struct omap_hwmod omap54xx_mcpdm_hwmod = {
895 * current exception. 1124 * current exception.
896 */ 1125 */
897 1126
898 .flags = HWMOD_EXT_OPT_MAIN_CLK, 1127 .flags = HWMOD_EXT_OPT_MAIN_CLK | HWMOD_SWSUP_SIDLE,
899 .main_clk = "pad_clks_ck", 1128 .main_clk = "pad_clks_ck",
900 .prcm = { 1129 .prcm = {
901 .omap4 = { 1130 .omap4 = {
@@ -1974,6 +2203,54 @@ static struct omap_hwmod_ocp_if omap54xx_l4_abe__dmic = {
1974 .user = OCP_USER_MPU, 2203 .user = OCP_USER_MPU,
1975}; 2204};
1976 2205
2206/* l3_main_2 -> dss */
2207static struct omap_hwmod_ocp_if omap54xx_l3_main_2__dss = {
2208 .master = &omap54xx_l3_main_2_hwmod,
2209 .slave = &omap54xx_dss_hwmod,
2210 .clk = "l3_iclk_div",
2211 .user = OCP_USER_MPU | OCP_USER_SDMA,
2212};
2213
2214/* l3_main_2 -> dss_dispc */
2215static struct omap_hwmod_ocp_if omap54xx_l3_main_2__dss_dispc = {
2216 .master = &omap54xx_l3_main_2_hwmod,
2217 .slave = &omap54xx_dss_dispc_hwmod,
2218 .clk = "l3_iclk_div",
2219 .user = OCP_USER_MPU | OCP_USER_SDMA,
2220};
2221
2222/* l3_main_2 -> dss_dsi1_a */
2223static struct omap_hwmod_ocp_if omap54xx_l3_main_2__dss_dsi1_a = {
2224 .master = &omap54xx_l3_main_2_hwmod,
2225 .slave = &omap54xx_dss_dsi1_a_hwmod,
2226 .clk = "l3_iclk_div",
2227 .user = OCP_USER_MPU | OCP_USER_SDMA,
2228};
2229
2230/* l3_main_2 -> dss_dsi1_c */
2231static struct omap_hwmod_ocp_if omap54xx_l3_main_2__dss_dsi1_c = {
2232 .master = &omap54xx_l3_main_2_hwmod,
2233 .slave = &omap54xx_dss_dsi1_c_hwmod,
2234 .clk = "l3_iclk_div",
2235 .user = OCP_USER_MPU | OCP_USER_SDMA,
2236};
2237
2238/* l3_main_2 -> dss_hdmi */
2239static struct omap_hwmod_ocp_if omap54xx_l3_main_2__dss_hdmi = {
2240 .master = &omap54xx_l3_main_2_hwmod,
2241 .slave = &omap54xx_dss_hdmi_hwmod,
2242 .clk = "l3_iclk_div",
2243 .user = OCP_USER_MPU | OCP_USER_SDMA,
2244};
2245
2246/* l3_main_2 -> dss_rfbi */
2247static struct omap_hwmod_ocp_if omap54xx_l3_main_2__dss_rfbi = {
2248 .master = &omap54xx_l3_main_2_hwmod,
2249 .slave = &omap54xx_dss_rfbi_hwmod,
2250 .clk = "l3_iclk_div",
2251 .user = OCP_USER_MPU | OCP_USER_SDMA,
2252};
2253
1977/* mpu -> emif1 */ 2254/* mpu -> emif1 */
1978static struct omap_hwmod_ocp_if omap54xx_mpu__emif1 = { 2255static struct omap_hwmod_ocp_if omap54xx_mpu__emif1 = {
1979 .master = &omap54xx_mpu_hwmod, 2256 .master = &omap54xx_mpu_hwmod,
@@ -2427,6 +2704,12 @@ static struct omap_hwmod_ocp_if *omap54xx_hwmod_ocp_ifs[] __initdata = {
2427 &omap54xx_l4_cfg__dma_system, 2704 &omap54xx_l4_cfg__dma_system,
2428 &omap54xx_l4_abe__dmic, 2705 &omap54xx_l4_abe__dmic,
2429 &omap54xx_l4_cfg__mmu_dsp, 2706 &omap54xx_l4_cfg__mmu_dsp,
2707 &omap54xx_l3_main_2__dss,
2708 &omap54xx_l3_main_2__dss_dispc,
2709 &omap54xx_l3_main_2__dss_dsi1_a,
2710 &omap54xx_l3_main_2__dss_dsi1_c,
2711 &omap54xx_l3_main_2__dss_hdmi,
2712 &omap54xx_l3_main_2__dss_rfbi,
2430 &omap54xx_mpu__emif1, 2713 &omap54xx_mpu__emif1,
2431 &omap54xx_mpu__emif2, 2714 &omap54xx_mpu__emif2,
2432 &omap54xx_l4_wkup__gpio1, 2715 &omap54xx_l4_wkup__gpio1,
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index 810c205d668b..20b4398cec05 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -2318,21 +2318,11 @@ static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu = {
2318 .user = OCP_USER_MPU | OCP_USER_SDMA, 2318 .user = OCP_USER_MPU | OCP_USER_SDMA,
2319}; 2319};
2320 2320
2321static struct omap_hwmod_addr_space dra7xx_ocp2scp1_addrs[] = {
2322 {
2323 .pa_start = 0x4a080000,
2324 .pa_end = 0x4a08001f,
2325 .flags = ADDR_TYPE_RT
2326 },
2327 { }
2328};
2329
2330/* l4_cfg -> ocp2scp1 */ 2321/* l4_cfg -> ocp2scp1 */
2331static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1 = { 2322static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1 = {
2332 .master = &dra7xx_l4_cfg_hwmod, 2323 .master = &dra7xx_l4_cfg_hwmod,
2333 .slave = &dra7xx_ocp2scp1_hwmod, 2324 .slave = &dra7xx_ocp2scp1_hwmod,
2334 .clk = "l4_root_clk_div", 2325 .clk = "l4_root_clk_div",
2335 .addr = dra7xx_ocp2scp1_addrs,
2336 .user = OCP_USER_MPU | OCP_USER_SDMA, 2326 .user = OCP_USER_MPU | OCP_USER_SDMA,
2337}; 2327};
2338 2328
diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c
index eb8a25de67ed..50640b38f0bf 100644
--- a/arch/arm/mach-omap2/omap_phy_internal.c
+++ b/arch/arm/mach-omap2/omap_phy_internal.c
@@ -57,7 +57,7 @@ static int __init omap4430_phy_power_down(void)
57 } 57 }
58 58
59 /* Power down the phy */ 59 /* Power down the phy */
60 __raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF); 60 writel_relaxed(PHY_PD, ctrl_base + CONTROL_DEV_CONF);
61 61
62 iounmap(ctrl_base); 62 iounmap(ctrl_base);
63 63
@@ -162,7 +162,7 @@ void ti81xx_musb_phy_power(u8 on)
162 return; 162 return;
163 } 163 }
164 164
165 usbphycfg = __raw_readl(scm_base + USBCTRL0); 165 usbphycfg = readl_relaxed(scm_base + USBCTRL0);
166 166
167 if (on) { 167 if (on) {
168 if (cpu_is_ti816x()) { 168 if (cpu_is_ti816x()) {
@@ -181,7 +181,7 @@ void ti81xx_musb_phy_power(u8 on)
181 usbphycfg |= USBPHY_CM_PWRDN | USBPHY_OTG_PWRDN; 181 usbphycfg |= USBPHY_CM_PWRDN | USBPHY_OTG_PWRDN;
182 182
183 } 183 }
184 __raw_writel(usbphycfg, scm_base + USBCTRL0); 184 writel_relaxed(usbphycfg, scm_base + USBCTRL0);
185 185
186 iounmap(scm_base); 186 iounmap(scm_base);
187} 187}
diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c
index 615e5b1fb025..6bf626700557 100644
--- a/arch/arm/mach-omap2/omap_twl.c
+++ b/arch/arm/mach-omap2/omap_twl.c
@@ -46,15 +46,8 @@
46 46
47static bool is_offset_valid; 47static bool is_offset_valid;
48static u8 smps_offset; 48static u8 smps_offset;
49/*
50 * Flag to ensure Smartreflex bit in TWL
51 * being cleared in board file is not overwritten.
52 */
53static bool __initdata twl_sr_enable_autoinit;
54 49
55#define TWL4030_DCDC_GLOBAL_CFG 0x06
56#define REG_SMPS_OFFSET 0xE0 50#define REG_SMPS_OFFSET 0xE0
57#define SMARTREFLEX_ENABLE BIT(3)
58 51
59static unsigned long twl4030_vsel_to_uv(const u8 vsel) 52static unsigned long twl4030_vsel_to_uv(const u8 vsel)
60{ 53{
@@ -251,18 +244,6 @@ int __init omap3_twl_init(void)
251 if (!cpu_is_omap34xx()) 244 if (!cpu_is_omap34xx())
252 return -ENODEV; 245 return -ENODEV;
253 246
254 /*
255 * The smartreflex bit on twl4030 specifies if the setting of voltage
256 * is done over the I2C_SR path. Since this setting is independent of
257 * the actual usage of smartreflex AVS module, we enable TWL SR bit
258 * by default irrespective of whether smartreflex AVS module is enabled
259 * on the OMAP side or not. This is because without this bit enabled,
260 * the voltage scaling through vp forceupdate/bypass mechanism of
261 * voltage scaling will not function on TWL over I2C_SR.
262 */
263 if (!twl_sr_enable_autoinit)
264 omap3_twl_set_sr_bit(true);
265
266 voltdm = voltdm_lookup("mpu_iva"); 247 voltdm = voltdm_lookup("mpu_iva");
267 omap_voltage_register_pmic(voltdm, &omap3_mpu_pmic); 248 omap_voltage_register_pmic(voltdm, &omap3_mpu_pmic);
268 249
@@ -271,44 +252,3 @@ int __init omap3_twl_init(void)
271 252
272 return 0; 253 return 0;
273} 254}
274
275/**
276 * omap3_twl_set_sr_bit() - Set/Clear SR bit on TWL
277 * @enable: enable SR mode in twl or not
278 *
279 * If 'enable' is true, enables Smartreflex bit on TWL 4030 to make sure
280 * voltage scaling through OMAP SR works. Else, the smartreflex bit
281 * on twl4030 is cleared as there are platforms which use OMAP3 and T2 but
282 * use Synchronized Scaling Hardware Strategy (ENABLE_VMODE=1) and Direct
283 * Strategy Software Scaling Mode (ENABLE_VMODE=0), for setting the voltages,
284 * in those scenarios this bit is to be cleared (enable = false).
285 *
286 * Returns 0 on success, error is returned if I2C read/write fails.
287 */
288int __init omap3_twl_set_sr_bit(bool enable)
289{
290 u8 temp;
291 int ret;
292 if (twl_sr_enable_autoinit)
293 pr_warning("%s: unexpected multiple calls\n", __func__);
294
295 ret = twl_i2c_read_u8(TWL_MODULE_PM_RECEIVER, &temp,
296 TWL4030_DCDC_GLOBAL_CFG);
297 if (ret)
298 goto err;
299
300 if (enable)
301 temp |= SMARTREFLEX_ENABLE;
302 else
303 temp &= ~SMARTREFLEX_ENABLE;
304
305 ret = twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, temp,
306 TWL4030_DCDC_GLOBAL_CFG);
307 if (!ret) {
308 twl_sr_enable_autoinit = true;
309 return 0;
310 }
311err:
312 pr_err("%s: Error access to TWL4030 (%d)\n", __func__, ret);
313 return ret;
314}
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index c3b73351cb7a..90c88d498485 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -226,6 +226,14 @@ static void __init am3517_evm_legacy_init(void)
226 am35xx_emac_reset(); 226 am35xx_emac_reset();
227} 227}
228 228
229static struct platform_device omap3_rom_rng_device = {
230 .name = "omap3-rom-rng",
231 .id = -1,
232 .dev = {
233 .platform_data = rx51_secure_rng_call,
234 },
235};
236
229static void __init nokia_n900_legacy_init(void) 237static void __init nokia_n900_legacy_init(void)
230{ 238{
231 hsmmc2_internal_input_clk(); 239 hsmmc2_internal_input_clk();
@@ -239,6 +247,10 @@ static void __init nokia_n900_legacy_init(void)
239 pr_warning("RX-51: Not enabling ARM errata 430973 workaround\n"); 247 pr_warning("RX-51: Not enabling ARM errata 430973 workaround\n");
240 pr_warning("Thumb binaries may crash randomly without this workaround\n"); 248 pr_warning("Thumb binaries may crash randomly without this workaround\n");
241 } 249 }
250
251 pr_info("RX-51: Registring OMAP3 HWRNG device\n");
252 platform_device_register(&omap3_rom_rng_device);
253
242 } 254 }
243} 255}
244#endif /* CONFIG_ARCH_OMAP3 */ 256#endif /* CONFIG_ARCH_OMAP3 */
@@ -254,6 +266,11 @@ static void __init omap4_panda_legacy_init(void)
254{ 266{
255 legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 53); 267 legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 53);
256} 268}
269
270static void __init var_som_om44_legacy_init(void)
271{
272 legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 41);
273}
257#endif 274#endif
258 275
259#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) 276#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
@@ -364,6 +381,8 @@ static struct pdata_init pdata_quirks[] __initdata = {
364#ifdef CONFIG_ARCH_OMAP4 381#ifdef CONFIG_ARCH_OMAP4
365 { "ti,omap4-sdp", omap4_sdp_legacy_init, }, 382 { "ti,omap4-sdp", omap4_sdp_legacy_init, },
366 { "ti,omap4-panda", omap4_panda_legacy_init, }, 383 { "ti,omap4-panda", omap4_panda_legacy_init, },
384 { "variscite,var-dvk-om44", var_som_om44_legacy_init, },
385 { "variscite,var-stk-om44", var_som_om44_legacy_init, },
367#endif 386#endif
368#ifdef CONFIG_SOC_AM33XX 387#ifdef CONFIG_SOC_AM33XX
369 { "ti,am335x-evmsk", am335x_evmsk_legacy_init, }, 388 { "ti,am335x-evmsk", am335x_evmsk_legacy_init, },
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index e1b41416fbf1..828aee9ea6a8 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -32,11 +32,13 @@
32#include "pm.h" 32#include "pm.h"
33#include "twl-common.h" 33#include "twl-common.h"
34 34
35#ifdef CONFIG_SUSPEND
35/* 36/*
36 * omap_pm_suspend: points to a function that does the SoC-specific 37 * omap_pm_suspend: points to a function that does the SoC-specific
37 * suspend work 38 * suspend work
38 */ 39 */
39int (*omap_pm_suspend)(void); 40static int (*omap_pm_suspend)(void);
41#endif
40 42
41#ifdef CONFIG_PM 43#ifdef CONFIG_PM
42/** 44/**
@@ -243,6 +245,15 @@ static const struct platform_suspend_ops omap_pm_ops = {
243 .valid = suspend_valid_only_mem, 245 .valid = suspend_valid_only_mem,
244}; 246};
245 247
248/**
249 * omap_common_suspend_init - Set common suspend routines for OMAP SoCs
250 * @pm_suspend: function pointer to SoC specific suspend function
251 */
252void omap_common_suspend_init(void *pm_suspend)
253{
254 omap_pm_suspend = pm_suspend;
255 suspend_set_ops(&omap_pm_ops);
256}
246#endif /* CONFIG_SUSPEND */ 257#endif /* CONFIG_SUSPEND */
247 258
248static void __init omap3_init_voltages(void) 259static void __init omap3_init_voltages(void)
@@ -287,32 +298,24 @@ omap_postcore_initcall(omap2_common_pm_init);
287 298
288int __init omap2_common_pm_late_init(void) 299int __init omap2_common_pm_late_init(void)
289{ 300{
290 /* 301 if (of_have_populated_dt()) {
291 * In the case of DT, the PMIC and SR initialization will be done using 302 omap3_twl_init();
292 * a completely different mechanism. 303 omap4_twl_init();
293 * Disable this part if a DT blob is available. 304 }
294 */
295 if (!of_have_populated_dt()) {
296
297 /* Init the voltage layer */
298 omap_pmic_late_init();
299 omap_voltage_late_init();
300 305
301 /* Initialize the voltages */ 306 /* Init the voltage layer */
302 omap3_init_voltages(); 307 omap_pmic_late_init();
303 omap4_init_voltages(); 308 omap_voltage_late_init();
304 309
305 /* Smartreflex device init */ 310 /* Initialize the voltages */
306 omap_devinit_smartreflex(); 311 omap3_init_voltages();
312 omap4_init_voltages();
307 313
308 } 314 /* Smartreflex device init */
315 omap_devinit_smartreflex();
309 316
310 /* cpufreq dummy device instantiation */ 317 /* cpufreq dummy device instantiation */
311 omap_init_cpufreq(); 318 omap_init_cpufreq();
312 319
313#ifdef CONFIG_SUSPEND
314 suspend_set_ops(&omap_pm_ops);
315#endif
316
317 return 0; 320 return 0;
318} 321}
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index d4d0fce325c7..e150102d6c06 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -34,7 +34,6 @@ extern void *omap3_secure_ram_storage;
34extern void omap3_pm_off_mode_enable(int); 34extern void omap3_pm_off_mode_enable(int);
35extern void omap_sram_idle(void); 35extern void omap_sram_idle(void);
36extern int omap_pm_clkdms_setup(struct clockdomain *clkdm, void *unused); 36extern int omap_pm_clkdms_setup(struct clockdomain *clkdm, void *unused);
37extern int (*omap_pm_suspend)(void);
38 37
39#if defined(CONFIG_PM_OPP) 38#if defined(CONFIG_PM_OPP)
40extern int omap3_opp_init(void); 39extern int omap3_opp_init(void);
@@ -147,4 +146,11 @@ static inline void omap_pm_get_oscillator(u32 *tstart, u32 *tshut) { *tstart = *
147static inline void omap_pm_setup_sr_i2c_pcb_length(u32 mm) { } 146static inline void omap_pm_setup_sr_i2c_pcb_length(u32 mm) { }
148#endif 147#endif
149 148
149#ifdef CONFIG_SUSPEND
150void omap_common_suspend_init(void *pm_suspend);
151#else
152static inline void omap_common_suspend_init(void *pm_suspend)
153{
154}
155#endif /* CONFIG_SUSPEND */
150#endif 156#endif
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index 8c0759496c8d..a5ea988ff340 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -229,9 +229,7 @@ static void __init prcm_setup_regs(void)
229 clkdm_for_each(omap_pm_clkdms_setup, NULL); 229 clkdm_for_each(omap_pm_clkdms_setup, NULL);
230 clkdm_add_wkdep(mpu_clkdm, wkup_clkdm); 230 clkdm_add_wkdep(mpu_clkdm, wkup_clkdm);
231 231
232#ifdef CONFIG_SUSPEND 232 omap_common_suspend_init(omap2_enter_full_retention);
233 omap_pm_suspend = omap2_enter_full_retention;
234#endif
235 233
236 /* REVISIT: Configure number of 32 kHz clock cycles for sys_clk 234 /* REVISIT: Configure number of 32 kHz clock cycles for sys_clk
237 * stabilisation */ 235 * stabilisation */
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 87099bb6de69..507d8eeaab95 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -50,6 +50,7 @@
50#include "sdrc.h" 50#include "sdrc.h"
51#include "sram.h" 51#include "sram.h"
52#include "control.h" 52#include "control.h"
53#include "vc.h"
53 54
54/* pm34xx errata defined in pm.h */ 55/* pm34xx errata defined in pm.h */
55u16 pm34xx_errata; 56u16 pm34xx_errata;
@@ -288,6 +289,9 @@ void omap_sram_idle(void)
288 } 289 }
289 } 290 }
290 291
292 /* Configure PMIC signaling for I2C4 or sys_off_mode */
293 omap3_vc_set_pmic_signaling(core_next_state);
294
291 omap3_intc_prepare_idle(); 295 omap3_intc_prepare_idle();
292 296
293 /* 297 /*
@@ -391,7 +395,8 @@ restore:
391 395
392 return ret; 396 return ret;
393} 397}
394 398#else
399#define omap3_pm_suspend NULL
395#endif /* CONFIG_SUSPEND */ 400#endif /* CONFIG_SUSPEND */
396 401
397 402
@@ -705,9 +710,7 @@ int __init omap3_pm_init(void)
705 per_clkdm = clkdm_lookup("per_clkdm"); 710 per_clkdm = clkdm_lookup("per_clkdm");
706 wkup_clkdm = clkdm_lookup("wkup_clkdm"); 711 wkup_clkdm = clkdm_lookup("wkup_clkdm");
707 712
708#ifdef CONFIG_SUSPEND 713 omap_common_suspend_init(omap3_pm_suspend);
709 omap_pm_suspend = omap3_pm_suspend;
710#endif
711 714
712 arm_pm_idle = omap3_pm_idle; 715 arm_pm_idle = omap3_pm_idle;
713 omap3_idle_init(); 716 omap3_idle_init();
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index eefb30cfcabd..0dda6cf8b855 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -96,6 +96,8 @@ static int omap4_pm_suspend(void)
96 96
97 return 0; 97 return 0;
98} 98}
99#else
100#define omap4_pm_suspend NULL
99#endif /* CONFIG_SUSPEND */ 101#endif /* CONFIG_SUSPEND */
100 102
101static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused) 103static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
@@ -251,9 +253,7 @@ int __init omap4_pm_init(void)
251 253
252 (void) clkdm_for_each(omap_pm_clkdms_setup, NULL); 254 (void) clkdm_for_each(omap_pm_clkdms_setup, NULL);
253 255
254#ifdef CONFIG_SUSPEND 256 omap_common_suspend_init(omap4_pm_suspend);
255 omap_pm_suspend = omap4_pm_suspend;
256#endif
257 257
258 /* Overwrite the default cpu_do_idle() */ 258 /* Overwrite the default cpu_do_idle() */
259 arm_pm_idle = omap_default_idle; 259 arm_pm_idle = omap_default_idle;
diff --git a/arch/arm/mach-omap2/powerdomain-common.c b/arch/arm/mach-omap2/powerdomain-common.c
index c0aeabfcf009..c40e5f009826 100644
--- a/arch/arm/mach-omap2/powerdomain-common.c
+++ b/arch/arm/mach-omap2/powerdomain-common.c
@@ -17,7 +17,6 @@
17#include "pm.h" 17#include "pm.h"
18#include "cm.h" 18#include "cm.h"
19#include "cm-regbits-34xx.h" 19#include "cm-regbits-34xx.h"
20#include "cm-regbits-44xx.h"
21#include "prm-regbits-34xx.h" 20#include "prm-regbits-34xx.h"
22#include "prm-regbits-44xx.h" 21#include "prm-regbits-44xx.h"
23 22
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index 93a2a6e4260f..faebd5f076af 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -32,6 +32,7 @@
32 32
33#include "powerdomain.h" 33#include "powerdomain.h"
34#include "clockdomain.h" 34#include "clockdomain.h"
35#include "voltage.h"
35 36
36#include "soc.h" 37#include "soc.h"
37#include "pm.h" 38#include "pm.h"
diff --git a/arch/arm/mach-omap2/powerdomain.h b/arch/arm/mach-omap2/powerdomain.h
index da5a59ae77b6..f4727117f6cc 100644
--- a/arch/arm/mach-omap2/powerdomain.h
+++ b/arch/arm/mach-omap2/powerdomain.h
@@ -21,8 +21,6 @@
21#include <linux/list.h> 21#include <linux/list.h>
22#include <linux/spinlock.h> 22#include <linux/spinlock.h>
23 23
24#include "voltage.h"
25
26/* Powerdomain basic power states */ 24/* Powerdomain basic power states */
27#define PWRDM_POWER_OFF 0x0 25#define PWRDM_POWER_OFF 0x0
28#define PWRDM_POWER_RET 0x1 26#define PWRDM_POWER_RET 0x1
@@ -75,6 +73,7 @@
75 73
76struct clockdomain; 74struct clockdomain;
77struct powerdomain; 75struct powerdomain;
76struct voltagedomain;
78 77
79/** 78/**
80 * struct powerdomain - OMAP powerdomain 79 * struct powerdomain - OMAP powerdomain
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h
index 0e841fd9498a..a8e4b582c527 100644
--- a/arch/arm/mach-omap2/prcm-common.h
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -428,6 +428,28 @@
428#define MAX_IOPAD_LATCH_TIME 100 428#define MAX_IOPAD_LATCH_TIME 100
429# ifndef __ASSEMBLER__ 429# ifndef __ASSEMBLER__
430 430
431#include <linux/delay.h>
432
433/**
434 * omap_test_timeout - busy-loop, testing a condition
435 * @cond: condition to test until it evaluates to true
436 * @timeout: maximum number of microseconds in the timeout
437 * @index: loop index (integer)
438 *
439 * Loop waiting for @cond to become true or until at least @timeout
440 * microseconds have passed. To use, define some integer @index in the
441 * calling code. After running, if @index == @timeout, then the loop has
442 * timed out.
443 */
444#define omap_test_timeout(cond, timeout, index) \
445({ \
446 for (index = 0; index < timeout; index++) { \
447 if (cond) \
448 break; \
449 udelay(1); \
450 } \
451})
452
431/** 453/**
432 * struct omap_prcm_irq - describes a PRCM interrupt bit 454 * struct omap_prcm_irq - describes a PRCM interrupt bit
433 * @name: a short name describing the interrupt type, e.g. "wkup" or "io" 455 * @name: a short name describing the interrupt type, e.g. "wkup" or "io"
@@ -458,6 +480,7 @@ struct omap_prcm_irq {
458 * @ocp_barrier: fn ptr to force buffered PRM writes to complete 480 * @ocp_barrier: fn ptr to force buffered PRM writes to complete
459 * @save_and_clear_irqen: fn ptr to save and clear IRQENABLE regs 481 * @save_and_clear_irqen: fn ptr to save and clear IRQENABLE regs
460 * @restore_irqen: fn ptr to save and clear IRQENABLE regs 482 * @restore_irqen: fn ptr to save and clear IRQENABLE regs
483 * @reconfigure_io_chain: fn ptr to reconfigure IO chain
461 * @saved_mask: IRQENABLE regs are saved here during suspend 484 * @saved_mask: IRQENABLE regs are saved here during suspend
462 * @priority_mask: 1 bit per IRQ, set to 1 if omap_prcm_irq.priority = true 485 * @priority_mask: 1 bit per IRQ, set to 1 if omap_prcm_irq.priority = true
463 * @base_irq: base dynamic IRQ number, returned from irq_alloc_descs() in init 486 * @base_irq: base dynamic IRQ number, returned from irq_alloc_descs() in init
@@ -479,6 +502,7 @@ struct omap_prcm_irq_setup {
479 void (*ocp_barrier)(void); 502 void (*ocp_barrier)(void);
480 void (*save_and_clear_irqen)(u32 *saved_mask); 503 void (*save_and_clear_irqen)(u32 *saved_mask);
481 void (*restore_irqen)(u32 *saved_mask); 504 void (*restore_irqen)(u32 *saved_mask);
505 void (*reconfigure_io_chain)(void);
482 u32 *saved_mask; 506 u32 *saved_mask;
483 u32 *priority_mask; 507 u32 *priority_mask;
484 int base_irq; 508 int base_irq;
diff --git a/arch/arm/mach-omap2/prcm_mpu44xx.c b/arch/arm/mach-omap2/prcm_mpu44xx.c
index c30e44a7fab0..cdbee6326d29 100644
--- a/arch/arm/mach-omap2/prcm_mpu44xx.c
+++ b/arch/arm/mach-omap2/prcm_mpu44xx.c
@@ -30,12 +30,12 @@ void __iomem *prcm_mpu_base;
30 30
31u32 omap4_prcm_mpu_read_inst_reg(s16 inst, u16 reg) 31u32 omap4_prcm_mpu_read_inst_reg(s16 inst, u16 reg)
32{ 32{
33 return __raw_readl(OMAP44XX_PRCM_MPU_REGADDR(inst, reg)); 33 return readl_relaxed(OMAP44XX_PRCM_MPU_REGADDR(inst, reg));
34} 34}
35 35
36void omap4_prcm_mpu_write_inst_reg(u32 val, s16 inst, u16 reg) 36void omap4_prcm_mpu_write_inst_reg(u32 val, s16 inst, u16 reg)
37{ 37{
38 __raw_writel(val, OMAP44XX_PRCM_MPU_REGADDR(inst, reg)); 38 writel_relaxed(val, OMAP44XX_PRCM_MPU_REGADDR(inst, reg));
39} 39}
40 40
41u32 omap4_prcm_mpu_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 reg) 41u32 omap4_prcm_mpu_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 reg)
diff --git a/arch/arm/mach-omap2/prcm_mpu44xx.h b/arch/arm/mach-omap2/prcm_mpu44xx.h
index 059bd4f49035..ac9cb4550239 100644
--- a/arch/arm/mach-omap2/prcm_mpu44xx.h
+++ b/arch/arm/mach-omap2/prcm_mpu44xx.h
@@ -26,7 +26,6 @@
26#define __ARCH_ARM_MACH_OMAP2_PRCM_MPU44XX_H 26#define __ARCH_ARM_MACH_OMAP2_PRCM_MPU44XX_H
27 27
28#include "prcm_mpu_44xx_54xx.h" 28#include "prcm_mpu_44xx_54xx.h"
29#include "common.h"
30 29
31#define OMAP4430_PRCM_MPU_BASE 0x48243000 30#define OMAP4430_PRCM_MPU_BASE 0x48243000
32 31
diff --git a/arch/arm/mach-omap2/prm-regbits-34xx.h b/arch/arm/mach-omap2/prm-regbits-34xx.h
index cebad565ed37..106132db532b 100644
--- a/arch/arm/mach-omap2/prm-regbits-34xx.h
+++ b/arch/arm/mach-omap2/prm-regbits-34xx.h
@@ -123,8 +123,15 @@
123#define OMAP3430_GLOBAL_SW_RST_SHIFT 1 123#define OMAP3430_GLOBAL_SW_RST_SHIFT 1
124#define OMAP3430_GLOBAL_COLD_RST_SHIFT 0 124#define OMAP3430_GLOBAL_COLD_RST_SHIFT 0
125#define OMAP3430_GLOBAL_COLD_RST_MASK (1 << 0) 125#define OMAP3430_GLOBAL_COLD_RST_MASK (1 << 0)
126#define OMAP3430_SEL_OFF_MASK (1 << 3) 126#define OMAP3430_PRM_VOLTCTRL_SEL_VMODE (1 << 4)
127#define OMAP3430_AUTO_OFF_MASK (1 << 2) 127#define OMAP3430_PRM_VOLTCTRL_SEL_OFF (1 << 3)
128#define OMAP3430_PRM_VOLTCTRL_AUTO_OFF (1 << 2)
129#define OMAP3430_PRM_VOLTCTRL_AUTO_RET (1 << 1)
130#define OMAP3430_PRM_VOLTCTRL_AUTO_SLEEP (1 << 0)
128#define OMAP3430_SETUP_TIME2_MASK (0xffff << 16) 131#define OMAP3430_SETUP_TIME2_MASK (0xffff << 16)
129#define OMAP3430_SETUP_TIME1_MASK (0xffff << 0) 132#define OMAP3430_SETUP_TIME1_MASK (0xffff << 0)
133#define OMAP3430_PRM_POLCTRL_OFFMODE_POL (1 << 3)
134#define OMAP3430_PRM_POLCTRL_CLKOUT_POL (1 << 2)
135#define OMAP3430_PRM_POLCTRL_CLKREQ_POL (1 << 1)
136#define OMAP3430_PRM_POLCTRL_EXTVOL_POL (1 << 0)
130#endif 137#endif
diff --git a/arch/arm/mach-omap2/prm.h b/arch/arm/mach-omap2/prm.h
index 623db40fdbbd..48480d557b61 100644
--- a/arch/arm/mach-omap2/prm.h
+++ b/arch/arm/mach-omap2/prm.h
@@ -17,10 +17,18 @@
17 17
18# ifndef __ASSEMBLER__ 18# ifndef __ASSEMBLER__
19extern void __iomem *prm_base; 19extern void __iomem *prm_base;
20extern u16 prm_features;
20extern void omap2_set_globals_prm(void __iomem *prm); 21extern void omap2_set_globals_prm(void __iomem *prm);
21int of_prcm_init(void); 22int of_prcm_init(void);
22# endif 23# endif
23 24
25/*
26 * prm_features flag values
27 *
28 * PRM_HAS_IO_WAKEUP: has IO wakeup capability
29 * PRM_HAS_VOLTAGE: has voltage domains
30 */
31#define PRM_HAS_IO_WAKEUP (1 << 0)
24 32
25/* 33/*
26 * MAX_MODULE_SOFTRESET_WAIT: Maximum microseconds to wait for OMAP 34 * MAX_MODULE_SOFTRESET_WAIT: Maximum microseconds to wait for OMAP
@@ -118,6 +126,7 @@ struct prm_reset_src_map {
118 * @read_reset_sources: ptr to the SoC PRM-specific get_reset_source impl 126 * @read_reset_sources: ptr to the SoC PRM-specific get_reset_source impl
119 * @was_any_context_lost_old: ptr to the SoC PRM context loss test fn 127 * @was_any_context_lost_old: ptr to the SoC PRM context loss test fn
120 * @clear_context_loss_flags_old: ptr to the SoC PRM context loss flag clear fn 128 * @clear_context_loss_flags_old: ptr to the SoC PRM context loss flag clear fn
129 * @late_init: ptr to the late init function
121 * 130 *
122 * XXX @was_any_context_lost_old and @clear_context_loss_flags_old are 131 * XXX @was_any_context_lost_old and @clear_context_loss_flags_old are
123 * deprecated. 132 * deprecated.
@@ -126,6 +135,7 @@ struct prm_ll_data {
126 u32 (*read_reset_sources)(void); 135 u32 (*read_reset_sources)(void);
127 bool (*was_any_context_lost_old)(u8 part, s16 inst, u16 idx); 136 bool (*was_any_context_lost_old)(u8 part, s16 inst, u16 idx);
128 void (*clear_context_loss_flags_old)(u8 part, s16 inst, u16 idx); 137 void (*clear_context_loss_flags_old)(u8 part, s16 inst, u16 idx);
138 int (*late_init)(void);
129}; 139};
130 140
131extern int prm_register(struct prm_ll_data *pld); 141extern int prm_register(struct prm_ll_data *pld);
diff --git a/arch/arm/mach-omap2/prm2xxx.c b/arch/arm/mach-omap2/prm2xxx.c
index 418de9c3b319..a3a3cca2bcc4 100644
--- a/arch/arm/mach-omap2/prm2xxx.c
+++ b/arch/arm/mach-omap2/prm2xxx.c
@@ -18,9 +18,6 @@
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/irq.h> 19#include <linux/irq.h>
20 20
21#include "soc.h"
22#include "common.h"
23#include "vp.h"
24#include "powerdomain.h" 21#include "powerdomain.h"
25#include "clockdomain.h" 22#include "clockdomain.h"
26#include "prm2xxx.h" 23#include "prm2xxx.h"
@@ -201,19 +198,11 @@ static struct prm_ll_data omap2xxx_prm_ll_data = {
201 198
202int __init omap2xxx_prm_init(void) 199int __init omap2xxx_prm_init(void)
203{ 200{
204 if (!cpu_is_omap24xx())
205 return 0;
206
207 return prm_register(&omap2xxx_prm_ll_data); 201 return prm_register(&omap2xxx_prm_ll_data);
208} 202}
209 203
210static void __exit omap2xxx_prm_exit(void) 204static void __exit omap2xxx_prm_exit(void)
211{ 205{
212 if (!cpu_is_omap24xx()) 206 prm_unregister(&omap2xxx_prm_ll_data);
213 return;
214
215 /* Should never happen */
216 WARN(prm_unregister(&omap2xxx_prm_ll_data),
217 "%s: prm_ll_data function pointer mismatch\n", __func__);
218} 207}
219__exitcall(omap2xxx_prm_exit); 208__exitcall(omap2xxx_prm_exit);
diff --git a/arch/arm/mach-omap2/prm2xxx.h b/arch/arm/mach-omap2/prm2xxx.h
index 3194dd87e0e4..d2cb6365716f 100644
--- a/arch/arm/mach-omap2/prm2xxx.h
+++ b/arch/arm/mach-omap2/prm2xxx.h
@@ -27,7 +27,7 @@
27 27
28/* 28/*
29 * OMAP2-specific global PRM registers 29 * OMAP2-specific global PRM registers
30 * Use __raw_{read,write}l() with these registers. 30 * Use {read,write}l_relaxed() with these registers.
31 * 31 *
32 * With a few exceptions, these are the register names beginning with 32 * With a few exceptions, these are the register names beginning with
33 * PRCM_* on 24xx. (The exceptions are the IRQSTATUS and IRQENABLE 33 * PRCM_* on 24xx. (The exceptions are the IRQSTATUS and IRQENABLE
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.c b/arch/arm/mach-omap2/prm2xxx_3xxx.c
index 947f6adfed0c..c13b4e293ffa 100644
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.c
@@ -16,7 +16,6 @@
16#include <linux/err.h> 16#include <linux/err.h>
17#include <linux/io.h> 17#include <linux/io.h>
18 18
19#include "common.h"
20#include "powerdomain.h" 19#include "powerdomain.h"
21#include "prm2xxx_3xxx.h" 20#include "prm2xxx_3xxx.h"
22#include "prm-regbits-24xx.h" 21#include "prm-regbits-24xx.h"
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.h b/arch/arm/mach-omap2/prm2xxx_3xxx.h
index 9624b40836d4..1a3a96392b97 100644
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.h
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.h
@@ -55,12 +55,12 @@
55/* Power/reset management domain register get/set */ 55/* Power/reset management domain register get/set */
56static inline u32 omap2_prm_read_mod_reg(s16 module, u16 idx) 56static inline u32 omap2_prm_read_mod_reg(s16 module, u16 idx)
57{ 57{
58 return __raw_readl(prm_base + module + idx); 58 return readl_relaxed(prm_base + module + idx);
59} 59}
60 60
61static inline void omap2_prm_write_mod_reg(u32 val, s16 module, u16 idx) 61static inline void omap2_prm_write_mod_reg(u32 val, s16 module, u16 idx)
62{ 62{
63 __raw_writel(val, prm_base + module + idx); 63 writel_relaxed(val, prm_base + module + idx);
64} 64}
65 65
66/* Read-modify-write a register in a PRM module. Caller must lock */ 66/* Read-modify-write a register in a PRM module. Caller must lock */
diff --git a/arch/arm/mach-omap2/prm33xx.c b/arch/arm/mach-omap2/prm33xx.c
index 720440737744..62709cd2f9c5 100644
--- a/arch/arm/mach-omap2/prm33xx.c
+++ b/arch/arm/mach-omap2/prm33xx.c
@@ -19,7 +19,6 @@
19#include <linux/err.h> 19#include <linux/err.h>
20#include <linux/io.h> 20#include <linux/io.h>
21 21
22#include "common.h"
23#include "powerdomain.h" 22#include "powerdomain.h"
24#include "prm33xx.h" 23#include "prm33xx.h"
25#include "prm-regbits-33xx.h" 24#include "prm-regbits-33xx.h"
@@ -27,13 +26,13 @@
27/* Read a register in a PRM instance */ 26/* Read a register in a PRM instance */
28u32 am33xx_prm_read_reg(s16 inst, u16 idx) 27u32 am33xx_prm_read_reg(s16 inst, u16 idx)
29{ 28{
30 return __raw_readl(prm_base + inst + idx); 29 return readl_relaxed(prm_base + inst + idx);
31} 30}
32 31
33/* Write into a register in a PRM instance */ 32/* Write into a register in a PRM instance */
34void am33xx_prm_write_reg(u32 val, s16 inst, u16 idx) 33void am33xx_prm_write_reg(u32 val, s16 inst, u16 idx)
35{ 34{
36 __raw_writel(val, prm_base + inst + idx); 35 writel_relaxed(val, prm_base + inst + idx);
37} 36}
38 37
39/* Read-modify-write a register in PRM. Caller must lock */ 38/* Read-modify-write a register in PRM. Caller must lock */
diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c
index 7721990d2006..4bd7a2dca8af 100644
--- a/arch/arm/mach-omap2/prm3xxx.c
+++ b/arch/arm/mach-omap2/prm3xxx.c
@@ -43,6 +43,7 @@ static struct omap_prcm_irq_setup omap3_prcm_irq_setup = {
43 .ocp_barrier = &omap3xxx_prm_ocp_barrier, 43 .ocp_barrier = &omap3xxx_prm_ocp_barrier,
44 .save_and_clear_irqen = &omap3xxx_prm_save_and_clear_irqen, 44 .save_and_clear_irqen = &omap3xxx_prm_save_and_clear_irqen,
45 .restore_irqen = &omap3xxx_prm_restore_irqen, 45 .restore_irqen = &omap3xxx_prm_restore_irqen,
46 .reconfigure_io_chain = &omap3xxx_prm_reconfigure_io_chain,
46}; 47};
47 48
48/* 49/*
@@ -246,7 +247,7 @@ void omap3xxx_prm_reconfigure_io_chain(void)
246 */ 247 */
247static void __init omap3xxx_prm_enable_io_wakeup(void) 248static void __init omap3xxx_prm_enable_io_wakeup(void)
248{ 249{
249 if (omap3_has_io_wakeup()) 250 if (prm_features & PRM_HAS_IO_WAKEUP)
250 omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, 251 omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD,
251 PM_WKEN); 252 PM_WKEN);
252} 253}
@@ -400,23 +401,26 @@ struct pwrdm_ops omap3_pwrdm_operations = {
400 * 401 *
401 */ 402 */
402 403
404static int omap3xxx_prm_late_init(void);
405
403static struct prm_ll_data omap3xxx_prm_ll_data = { 406static struct prm_ll_data omap3xxx_prm_ll_data = {
404 .read_reset_sources = &omap3xxx_prm_read_reset_sources, 407 .read_reset_sources = &omap3xxx_prm_read_reset_sources,
408 .late_init = &omap3xxx_prm_late_init,
405}; 409};
406 410
407int __init omap3xxx_prm_init(void) 411int __init omap3xxx_prm_init(void)
408{ 412{
409 if (!cpu_is_omap34xx()) 413 if (omap3_has_io_wakeup())
410 return 0; 414 prm_features |= PRM_HAS_IO_WAKEUP;
411 415
412 return prm_register(&omap3xxx_prm_ll_data); 416 return prm_register(&omap3xxx_prm_ll_data);
413} 417}
414 418
415static int __init omap3xxx_prm_late_init(void) 419static int omap3xxx_prm_late_init(void)
416{ 420{
417 int ret; 421 int ret;
418 422
419 if (!cpu_is_omap34xx()) 423 if (!(prm_features & PRM_HAS_IO_WAKEUP))
420 return 0; 424 return 0;
421 425
422 omap3xxx_prm_enable_io_wakeup(); 426 omap3xxx_prm_enable_io_wakeup();
@@ -427,15 +431,9 @@ static int __init omap3xxx_prm_late_init(void)
427 431
428 return ret; 432 return ret;
429} 433}
430omap_subsys_initcall(omap3xxx_prm_late_init);
431 434
432static void __exit omap3xxx_prm_exit(void) 435static void __exit omap3xxx_prm_exit(void)
433{ 436{
434 if (!cpu_is_omap34xx()) 437 prm_unregister(&omap3xxx_prm_ll_data);
435 return;
436
437 /* Should never happen */
438 WARN(prm_unregister(&omap3xxx_prm_ll_data),
439 "%s: prm_ll_data function pointer mismatch\n", __func__);
440} 438}
441__exitcall(omap3xxx_prm_exit); 439__exitcall(omap3xxx_prm_exit);
diff --git a/arch/arm/mach-omap2/prm3xxx.h b/arch/arm/mach-omap2/prm3xxx.h
index f8eb83323b1a..1dacfc5b1959 100644
--- a/arch/arm/mach-omap2/prm3xxx.h
+++ b/arch/arm/mach-omap2/prm3xxx.h
@@ -26,7 +26,7 @@
26 26
27/* 27/*
28 * OMAP3-specific global PRM registers 28 * OMAP3-specific global PRM registers
29 * Use __raw_{read,write}l() with these registers. 29 * Use {read,write}l_relaxed() with these registers.
30 * 30 *
31 * With a few exceptions, these are the register names beginning with 31 * With a few exceptions, these are the register names beginning with
32 * PRM_* on 34xx. (The exceptions are the IRQSTATUS and IRQENABLE 32 * PRM_* on 34xx. (The exceptions are the IRQSTATUS and IRQENABLE
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
index 03a603476cfc..a7f6ea27180a 100644
--- a/arch/arm/mach-omap2/prm44xx.c
+++ b/arch/arm/mach-omap2/prm44xx.c
@@ -47,6 +47,7 @@ static struct omap_prcm_irq_setup omap4_prcm_irq_setup = {
47 .ocp_barrier = &omap44xx_prm_ocp_barrier, 47 .ocp_barrier = &omap44xx_prm_ocp_barrier,
48 .save_and_clear_irqen = &omap44xx_prm_save_and_clear_irqen, 48 .save_and_clear_irqen = &omap44xx_prm_save_and_clear_irqen,
49 .restore_irqen = &omap44xx_prm_restore_irqen, 49 .restore_irqen = &omap44xx_prm_restore_irqen,
50 .reconfigure_io_chain = &omap44xx_prm_reconfigure_io_chain,
50}; 51};
51 52
52/* 53/*
@@ -81,13 +82,13 @@ static struct prm_reset_src_map omap44xx_prm_reset_src_map[] = {
81/* Read a register in a CM/PRM instance in the PRM module */ 82/* Read a register in a CM/PRM instance in the PRM module */
82u32 omap4_prm_read_inst_reg(s16 inst, u16 reg) 83u32 omap4_prm_read_inst_reg(s16 inst, u16 reg)
83{ 84{
84 return __raw_readl(prm_base + inst + reg); 85 return readl_relaxed(prm_base + inst + reg);
85} 86}
86 87
87/* Write into a register in a CM/PRM instance in the PRM module */ 88/* Write into a register in a CM/PRM instance in the PRM module */
88void omap4_prm_write_inst_reg(u32 val, s16 inst, u16 reg) 89void omap4_prm_write_inst_reg(u32 val, s16 inst, u16 reg)
89{ 90{
90 __raw_writel(val, prm_base + inst + reg); 91 writel_relaxed(val, prm_base + inst + reg);
91} 92}
92 93
93/* Read-modify-write a register in a PRM module. Caller must lock */ 94/* Read-modify-write a register in a PRM module. Caller must lock */
@@ -649,6 +650,8 @@ struct pwrdm_ops omap4_pwrdm_operations = {
649 .pwrdm_has_voltdm = omap4_check_vcvp, 650 .pwrdm_has_voltdm = omap4_check_vcvp,
650}; 651};
651 652
653static int omap44xx_prm_late_init(void);
654
652/* 655/*
653 * XXX document 656 * XXX document
654 */ 657 */
@@ -656,34 +659,29 @@ static struct prm_ll_data omap44xx_prm_ll_data = {
656 .read_reset_sources = &omap44xx_prm_read_reset_sources, 659 .read_reset_sources = &omap44xx_prm_read_reset_sources,
657 .was_any_context_lost_old = &omap44xx_prm_was_any_context_lost_old, 660 .was_any_context_lost_old = &omap44xx_prm_was_any_context_lost_old,
658 .clear_context_loss_flags_old = &omap44xx_prm_clear_context_loss_flags_old, 661 .clear_context_loss_flags_old = &omap44xx_prm_clear_context_loss_flags_old,
662 .late_init = &omap44xx_prm_late_init,
659}; 663};
660 664
661int __init omap44xx_prm_init(void) 665int __init omap44xx_prm_init(void)
662{ 666{
663 if (!cpu_is_omap44xx() && !soc_is_omap54xx() && !soc_is_dra7xx()) 667 if (cpu_is_omap44xx())
664 return 0; 668 prm_features |= PRM_HAS_IO_WAKEUP;
665 669
666 return prm_register(&omap44xx_prm_ll_data); 670 return prm_register(&omap44xx_prm_ll_data);
667} 671}
668 672
669static int __init omap44xx_prm_late_init(void) 673static int omap44xx_prm_late_init(void)
670{ 674{
671 if (!cpu_is_omap44xx()) 675 if (!(prm_features & PRM_HAS_IO_WAKEUP))
672 return 0; 676 return 0;
673 677
674 omap44xx_prm_enable_io_wakeup(); 678 omap44xx_prm_enable_io_wakeup();
675 679
676 return omap_prcm_register_chain_handler(&omap4_prcm_irq_setup); 680 return omap_prcm_register_chain_handler(&omap4_prcm_irq_setup);
677} 681}
678omap_subsys_initcall(omap44xx_prm_late_init);
679 682
680static void __exit omap44xx_prm_exit(void) 683static void __exit omap44xx_prm_exit(void)
681{ 684{
682 if (!cpu_is_omap44xx()) 685 prm_unregister(&omap44xx_prm_ll_data);
683 return;
684
685 /* Should never happen */
686 WARN(prm_unregister(&omap44xx_prm_ll_data),
687 "%s: prm_ll_data function pointer mismatch\n", __func__);
688} 686}
689__exitcall(omap44xx_prm_exit); 687__exitcall(omap44xx_prm_exit);
diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c
index b4c4ab9c8044..25e8b8232115 100644
--- a/arch/arm/mach-omap2/prm_common.c
+++ b/arch/arm/mach-omap2/prm_common.c
@@ -62,6 +62,8 @@ static struct omap_prcm_irq_setup *prcm_irq_setup;
62/* prm_base: base virtual address of the PRM IP block */ 62/* prm_base: base virtual address of the PRM IP block */
63void __iomem *prm_base; 63void __iomem *prm_base;
64 64
65u16 prm_features;
66
65/* 67/*
66 * prm_ll_data: function pointers to SoC-specific implementations of 68 * prm_ll_data: function pointers to SoC-specific implementations of
67 * common PRM functions 69 * common PRM functions
@@ -330,12 +332,7 @@ int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup)
330 332
331 if (of_have_populated_dt()) { 333 if (of_have_populated_dt()) {
332 int irq = omap_prcm_event_to_irq("io"); 334 int irq = omap_prcm_event_to_irq("io");
333 if (cpu_is_omap34xx()) 335 omap_pcs_legacy_init(irq, irq_setup->reconfigure_io_chain);
334 omap_pcs_legacy_init(irq,
335 omap3xxx_prm_reconfigure_io_chain);
336 else
337 omap_pcs_legacy_init(irq,
338 omap44xx_prm_reconfigure_io_chain);
339 } 336 }
340 337
341 return 0; 338 return 0;
@@ -530,3 +527,11 @@ int __init of_prcm_init(void)
530 527
531 return 0; 528 return 0;
532} 529}
530
531static int __init prm_late_init(void)
532{
533 if (prm_ll_data->late_init)
534 return prm_ll_data->late_init();
535 return 0;
536}
537subsys_initcall(prm_late_init);
diff --git a/arch/arm/mach-omap2/prminst44xx.c b/arch/arm/mach-omap2/prminst44xx.c
index 05fcf6de44ee..69f0dd08629c 100644
--- a/arch/arm/mach-omap2/prminst44xx.c
+++ b/arch/arm/mach-omap2/prminst44xx.c
@@ -49,7 +49,7 @@ u32 omap4_prminst_read_inst_reg(u8 part, s16 inst, u16 idx)
49 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || 49 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
50 part == OMAP4430_INVALID_PRCM_PARTITION || 50 part == OMAP4430_INVALID_PRCM_PARTITION ||
51 !_prm_bases[part]); 51 !_prm_bases[part]);
52 return __raw_readl(_prm_bases[part] + inst + idx); 52 return readl_relaxed(_prm_bases[part] + inst + idx);
53} 53}
54 54
55/* Write into a register in a PRM instance */ 55/* Write into a register in a PRM instance */
@@ -58,7 +58,7 @@ void omap4_prminst_write_inst_reg(u32 val, u8 part, s16 inst, u16 idx)
58 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || 58 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
59 part == OMAP4430_INVALID_PRCM_PARTITION || 59 part == OMAP4430_INVALID_PRCM_PARTITION ||
60 !_prm_bases[part]); 60 !_prm_bases[part]);
61 __raw_writel(val, _prm_bases[part] + inst + idx); 61 writel_relaxed(val, _prm_bases[part] + inst + idx);
62} 62}
63 63
64/* Read-modify-write a register in PRM. Caller must lock */ 64/* Read-modify-write a register in PRM. Caller must lock */
diff --git a/arch/arm/mach-omap2/sdrc.h b/arch/arm/mach-omap2/sdrc.h
index 446aa13511fd..645a2a46b213 100644
--- a/arch/arm/mach-omap2/sdrc.h
+++ b/arch/arm/mach-omap2/sdrc.h
@@ -31,24 +31,24 @@ extern void __iomem *omap2_sms_base;
31 31
32static inline void sdrc_write_reg(u32 val, u16 reg) 32static inline void sdrc_write_reg(u32 val, u16 reg)
33{ 33{
34 __raw_writel(val, OMAP_SDRC_REGADDR(reg)); 34 writel_relaxed(val, OMAP_SDRC_REGADDR(reg));
35} 35}
36 36
37static inline u32 sdrc_read_reg(u16 reg) 37static inline u32 sdrc_read_reg(u16 reg)
38{ 38{
39 return __raw_readl(OMAP_SDRC_REGADDR(reg)); 39 return readl_relaxed(OMAP_SDRC_REGADDR(reg));
40} 40}
41 41
42/* SMS global register get/set */ 42/* SMS global register get/set */
43 43
44static inline void sms_write_reg(u32 val, u16 reg) 44static inline void sms_write_reg(u32 val, u16 reg)
45{ 45{
46 __raw_writel(val, OMAP_SMS_REGADDR(reg)); 46 writel_relaxed(val, OMAP_SMS_REGADDR(reg));
47} 47}
48 48
49static inline u32 sms_read_reg(u16 reg) 49static inline u32 sms_read_reg(u16 reg)
50{ 50{
51 return __raw_readl(OMAP_SMS_REGADDR(reg)); 51 return readl_relaxed(OMAP_SMS_REGADDR(reg));
52} 52}
53 53
54extern void omap2_set_globals_sdrc(void __iomem *sdrc, void __iomem *sms); 54extern void omap2_set_globals_sdrc(void __iomem *sdrc, void __iomem *sms);
diff --git a/arch/arm/mach-omap2/sdrc2xxx.c b/arch/arm/mach-omap2/sdrc2xxx.c
index 907291714643..ae3f1553158d 100644
--- a/arch/arm/mach-omap2/sdrc2xxx.c
+++ b/arch/arm/mach-omap2/sdrc2xxx.c
@@ -103,9 +103,9 @@ u32 omap2xxx_sdrc_reprogram(u32 level, u32 force)
103 * prm2xxx.c function 103 * prm2xxx.c function
104 */ 104 */
105 if (cpu_is_omap2420()) 105 if (cpu_is_omap2420())
106 __raw_writel(0xffff, OMAP2420_PRCM_VOLTSETUP); 106 writel_relaxed(0xffff, OMAP2420_PRCM_VOLTSETUP);
107 else 107 else
108 __raw_writel(0xffff, OMAP2430_PRCM_VOLTSETUP); 108 writel_relaxed(0xffff, OMAP2430_PRCM_VOLTSETUP);
109 omap2_sram_reprogram_sdrc(level, dll_ctrl, m_type); 109 omap2_sram_reprogram_sdrc(level, dll_ctrl, m_type);
110 curr_perf_level = level; 110 curr_perf_level = level;
111 local_irq_restore(flags); 111 local_irq_restore(flags);
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
index 30abcc8b20e0..de2a34c423a7 100644
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -459,10 +459,15 @@ IS_OMAP_TYPE(3430, 0x3430)
459#define OMAP5430_REV_ES2_0 (OMAP54XX_CLASS | (0x30 << 16) | (0x20 << 8)) 459#define OMAP5430_REV_ES2_0 (OMAP54XX_CLASS | (0x30 << 16) | (0x20 << 8))
460#define OMAP5432_REV_ES2_0 (OMAP54XX_CLASS | (0x32 << 16) | (0x20 << 8)) 460#define OMAP5432_REV_ES2_0 (OMAP54XX_CLASS | (0x32 << 16) | (0x20 << 8))
461 461
462#define DRA7XX_CLASS 0x07000000
463#define DRA752_REV_ES1_0 (DRA7XX_CLASS | (0x52 << 16) | (0x10 << 8))
464#define DRA752_REV_ES1_1 (DRA7XX_CLASS | (0x52 << 16) | (0x11 << 8))
465
462void omap2xxx_check_revision(void); 466void omap2xxx_check_revision(void);
463void omap3xxx_check_revision(void); 467void omap3xxx_check_revision(void);
464void omap4xxx_check_revision(void); 468void omap4xxx_check_revision(void);
465void omap5xxx_check_revision(void); 469void omap5xxx_check_revision(void);
470void dra7xxx_check_revision(void);
466void omap3xxx_check_features(void); 471void omap3xxx_check_features(void);
467void ti81xx_check_features(void); 472void ti81xx_check_features(void);
468void am33xx_check_features(void); 473void am33xx_check_features(void);
diff --git a/arch/arm/mach-omap2/sr_device.c b/arch/arm/mach-omap2/sr_device.c
index d7bc33f15344..1b91ef0c182a 100644
--- a/arch/arm/mach-omap2/sr_device.c
+++ b/arch/arm/mach-omap2/sr_device.c
@@ -57,7 +57,7 @@ static void __init sr_set_nvalues(struct omap_volt_data *volt_data,
57 57
58 /* 58 /*
59 * In OMAP4 the efuse registers are 24 bit aligned. 59 * In OMAP4 the efuse registers are 24 bit aligned.
60 * A __raw_readl will fail for non-32 bit aligned address 60 * A readl_relaxed will fail for non-32 bit aligned address
61 * and hence the 8-bit read and shift. 61 * and hence the 8-bit read and shift.
62 */ 62 */
63 if (cpu_is_omap44xx()) { 63 if (cpu_is_omap44xx()) {
diff --git a/arch/arm/mach-omap2/sram.c b/arch/arm/mach-omap2/sram.c
index 4bd096836235..ddf1818af228 100644
--- a/arch/arm/mach-omap2/sram.c
+++ b/arch/arm/mach-omap2/sram.c
@@ -70,16 +70,16 @@ static int is_sram_locked(void)
70 if (OMAP2_DEVICE_TYPE_GP == omap_type()) { 70 if (OMAP2_DEVICE_TYPE_GP == omap_type()) {
71 /* RAMFW: R/W access to all initiators for all qualifier sets */ 71 /* RAMFW: R/W access to all initiators for all qualifier sets */
72 if (cpu_is_omap242x()) { 72 if (cpu_is_omap242x()) {
73 __raw_writel(0xFF, OMAP24XX_VA_REQINFOPERM0); /* all q-vects */ 73 writel_relaxed(0xFF, OMAP24XX_VA_REQINFOPERM0); /* all q-vects */
74 __raw_writel(0xCFDE, OMAP24XX_VA_READPERM0); /* all i-read */ 74 writel_relaxed(0xCFDE, OMAP24XX_VA_READPERM0); /* all i-read */
75 __raw_writel(0xCFDE, OMAP24XX_VA_WRITEPERM0); /* all i-write */ 75 writel_relaxed(0xCFDE, OMAP24XX_VA_WRITEPERM0); /* all i-write */
76 } 76 }
77 if (cpu_is_omap34xx()) { 77 if (cpu_is_omap34xx()) {
78 __raw_writel(0xFFFF, OMAP34XX_VA_REQINFOPERM0); /* all q-vects */ 78 writel_relaxed(0xFFFF, OMAP34XX_VA_REQINFOPERM0); /* all q-vects */
79 __raw_writel(0xFFFF, OMAP34XX_VA_READPERM0); /* all i-read */ 79 writel_relaxed(0xFFFF, OMAP34XX_VA_READPERM0); /* all i-read */
80 __raw_writel(0xFFFF, OMAP34XX_VA_WRITEPERM0); /* all i-write */ 80 writel_relaxed(0xFFFF, OMAP34XX_VA_WRITEPERM0); /* all i-write */
81 __raw_writel(0x0, OMAP34XX_VA_ADDR_MATCH2); 81 writel_relaxed(0x0, OMAP34XX_VA_ADDR_MATCH2);
82 __raw_writel(0xFFFFFFFF, OMAP34XX_VA_SMS_RG_ATT0); 82 writel_relaxed(0xFFFFFFFF, OMAP34XX_VA_SMS_RG_ATT0);
83 } 83 }
84 return 0; 84 return 0;
85 } else 85 } else
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index b62de9f9d05c..43d03fbf4c0b 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -361,7 +361,7 @@ static void __init omap2_gp_clockevent_init(int gptimer_id,
361 361
362/* Clocksource code */ 362/* Clocksource code */
363static struct omap_dm_timer clksrc; 363static struct omap_dm_timer clksrc;
364static bool use_gptimer_clksrc; 364static bool use_gptimer_clksrc __initdata;
365 365
366/* 366/*
367 * clocksource 367 * clocksource
@@ -546,15 +546,15 @@ static void __init realtime_counter_init(void)
546 } 546 }
547 547
548 /* Program numerator and denumerator registers */ 548 /* Program numerator and denumerator registers */
549 reg = __raw_readl(base + INCREMENTER_NUMERATOR_OFFSET) & 549 reg = readl_relaxed(base + INCREMENTER_NUMERATOR_OFFSET) &
550 NUMERATOR_DENUMERATOR_MASK; 550 NUMERATOR_DENUMERATOR_MASK;
551 reg |= num; 551 reg |= num;
552 __raw_writel(reg, base + INCREMENTER_NUMERATOR_OFFSET); 552 writel_relaxed(reg, base + INCREMENTER_NUMERATOR_OFFSET);
553 553
554 reg = __raw_readl(base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET) & 554 reg = readl_relaxed(base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET) &
555 NUMERATOR_DENUMERATOR_MASK; 555 NUMERATOR_DENUMERATOR_MASK;
556 reg |= den; 556 reg |= den;
557 __raw_writel(reg, base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET); 557 writel_relaxed(reg, base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET);
558 558
559 arch_timer_freq = (rate / den) * num; 559 arch_timer_freq = (rate / den) * num;
560 set_cntfreq(); 560 set_cntfreq();
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
index 10855eb4ccc1..745367c0c2bb 100644
--- a/arch/arm/mach-omap2/usb-host.c
+++ b/arch/arm/mach-omap2/usb-host.c
@@ -28,7 +28,7 @@
28#include <linux/io.h> 28#include <linux/io.h>
29#include <linux/gpio.h> 29#include <linux/gpio.h>
30#include <linux/usb/phy.h> 30#include <linux/usb/phy.h>
31#include <linux/usb/usb_phy_gen_xceiv.h> 31#include <linux/usb/usb_phy_generic.h>
32 32
33#include "soc.h" 33#include "soc.h"
34#include "omap_device.h" 34#include "omap_device.h"
@@ -349,7 +349,7 @@ static struct fixed_voltage_config hsusb_reg_config = {
349 /* .init_data filled later */ 349 /* .init_data filled later */
350}; 350};
351 351
352static const char *nop_name = "usb_phy_gen_xceiv"; /* NOP PHY driver */ 352static const char *nop_name = "usb_phy_generic"; /* NOP PHY driver */
353static const char *reg_name = "reg-fixed-voltage"; /* Regulator driver */ 353static const char *reg_name = "reg-fixed-voltage"; /* Regulator driver */
354 354
355/** 355/**
@@ -435,7 +435,7 @@ int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys)
435 struct platform_device *pdev; 435 struct platform_device *pdev;
436 char *phy_id; 436 char *phy_id;
437 struct platform_device_info pdevinfo; 437 struct platform_device_info pdevinfo;
438 struct usb_phy_gen_xceiv_platform_data nop_pdata; 438 struct usb_phy_generic_platform_data nop_pdata;
439 439
440 for (i = 0; i < num_phys; i++) { 440 for (i = 0; i < num_phys; i++) {
441 441
@@ -469,8 +469,8 @@ int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys)
469 pdevinfo.id = phy->port; 469 pdevinfo.id = phy->port;
470 pdevinfo.data = &nop_pdata; 470 pdevinfo.data = &nop_pdata;
471 pdevinfo.size_data = 471 pdevinfo.size_data =
472 sizeof(struct usb_phy_gen_xceiv_platform_data); 472 sizeof(struct usb_phy_generic_platform_data);
473 scnprintf(phy_id, MAX_STR, "usb_phy_gen_xceiv.%d", 473 scnprintf(phy_id, MAX_STR, "usb_phy_generic.%d",
474 phy->port); 474 phy->port);
475 pdev = platform_device_register_full(&pdevinfo); 475 pdev = platform_device_register_full(&pdevinfo);
476 if (IS_ERR(pdev)) { 476 if (IS_ERR(pdev)) {
diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c
index 49ac7977e03e..a4628a9e760c 100644
--- a/arch/arm/mach-omap2/vc.c
+++ b/arch/arm/mach-omap2/vc.c
@@ -220,10 +220,126 @@ static inline u32 omap_usec_to_32k(u32 usec)
220 return DIV_ROUND_UP_ULL(32768ULL * (u64)usec, 1000000ULL); 220 return DIV_ROUND_UP_ULL(32768ULL * (u64)usec, 1000000ULL);
221} 221}
222 222
223/* Set oscillator setup time for omap3 */ 223struct omap3_vc_timings {
224static void omap3_set_clksetup(u32 usec, struct voltagedomain *voltdm) 224 u32 voltsetup1;
225 u32 voltsetup2;
226};
227
228struct omap3_vc {
229 struct voltagedomain *vd;
230 u32 voltctrl;
231 u32 voltsetup1;
232 u32 voltsetup2;
233 struct omap3_vc_timings timings[2];
234};
235static struct omap3_vc vc;
236
237void omap3_vc_set_pmic_signaling(int core_next_state)
238{
239 struct voltagedomain *vd = vc.vd;
240 struct omap3_vc_timings *c = vc.timings;
241 u32 voltctrl, voltsetup1, voltsetup2;
242
243 voltctrl = vc.voltctrl;
244 voltsetup1 = vc.voltsetup1;
245 voltsetup2 = vc.voltsetup2;
246
247 switch (core_next_state) {
248 case PWRDM_POWER_OFF:
249 voltctrl &= ~(OMAP3430_PRM_VOLTCTRL_AUTO_RET |
250 OMAP3430_PRM_VOLTCTRL_AUTO_SLEEP);
251 voltctrl |= OMAP3430_PRM_VOLTCTRL_AUTO_OFF;
252 if (voltctrl & OMAP3430_PRM_VOLTCTRL_SEL_OFF)
253 voltsetup2 = c->voltsetup2;
254 else
255 voltsetup1 = c->voltsetup1;
256 break;
257 case PWRDM_POWER_RET:
258 default:
259 c++;
260 voltctrl &= ~(OMAP3430_PRM_VOLTCTRL_AUTO_OFF |
261 OMAP3430_PRM_VOLTCTRL_AUTO_SLEEP);
262 voltctrl |= OMAP3430_PRM_VOLTCTRL_AUTO_RET;
263 voltsetup1 = c->voltsetup1;
264 break;
265 }
266
267 if (voltctrl != vc.voltctrl) {
268 vd->write(voltctrl, OMAP3_PRM_VOLTCTRL_OFFSET);
269 vc.voltctrl = voltctrl;
270 }
271 if (voltsetup1 != vc.voltsetup1) {
272 vd->write(c->voltsetup1,
273 OMAP3_PRM_VOLTSETUP1_OFFSET);
274 vc.voltsetup1 = voltsetup1;
275 }
276 if (voltsetup2 != vc.voltsetup2) {
277 vd->write(c->voltsetup2,
278 OMAP3_PRM_VOLTSETUP2_OFFSET);
279 vc.voltsetup2 = voltsetup2;
280 }
281}
282
283#define PRM_POLCTRL_TWL_MASK (OMAP3430_PRM_POLCTRL_CLKREQ_POL | \
284 OMAP3430_PRM_POLCTRL_CLKREQ_POL)
285#define PRM_POLCTRL_TWL_VAL OMAP3430_PRM_POLCTRL_CLKREQ_POL
286
287/*
288 * Configure signal polarity for sys_clkreq and sys_off_mode pins
289 * as the default values are wrong and can cause the system to hang
290 * if any twl4030 scripts are loaded.
291 */
292static void __init omap3_vc_init_pmic_signaling(struct voltagedomain *voltdm)
293{
294 u32 val;
295
296 if (vc.vd)
297 return;
298
299 vc.vd = voltdm;
300
301 val = voltdm->read(OMAP3_PRM_POLCTRL_OFFSET);
302 if (!(val & OMAP3430_PRM_POLCTRL_CLKREQ_POL) ||
303 (val & OMAP3430_PRM_POLCTRL_CLKREQ_POL)) {
304 val |= OMAP3430_PRM_POLCTRL_CLKREQ_POL;
305 val &= ~OMAP3430_PRM_POLCTRL_OFFMODE_POL;
306 pr_debug("PM: fixing sys_clkreq and sys_off_mode polarity to 0x%x\n",
307 val);
308 voltdm->write(val, OMAP3_PRM_POLCTRL_OFFSET);
309 }
310
311 /*
312 * By default let's use I2C4 signaling for retention idle
313 * and sys_off_mode pin signaling for off idle. This way we
314 * have sys_clk_req pin go down for retention and both
315 * sys_clk_req and sys_off_mode pins will go down for off
316 * idle. And we can also scale voltages to zero for off-idle.
317 * Note that no actual voltage scaling during off-idle will
318 * happen unless the board specific twl4030 PMIC scripts are
319 * loaded.
320 */
321 val = voltdm->read(OMAP3_PRM_VOLTCTRL_OFFSET);
322 if (!(val & OMAP3430_PRM_VOLTCTRL_SEL_OFF)) {
323 val |= OMAP3430_PRM_VOLTCTRL_SEL_OFF;
324 pr_debug("PM: setting voltctrl sys_off_mode signaling to 0x%x\n",
325 val);
326 voltdm->write(val, OMAP3_PRM_VOLTCTRL_OFFSET);
327 }
328 vc.voltctrl = val;
329
330 omap3_vc_set_pmic_signaling(PWRDM_POWER_ON);
331}
332
333static void omap3_init_voltsetup1(struct voltagedomain *voltdm,
334 struct omap3_vc_timings *c, u32 idle)
225{ 335{
226 voltdm->write(omap_usec_to_32k(usec), OMAP3_PRM_CLKSETUP_OFFSET); 336 unsigned long val;
337
338 val = (voltdm->vc_param->on - idle) / voltdm->pmic->slew_rate;
339 val *= voltdm->sys_clk.rate / 8 / 1000000 + 1;
340 val <<= __ffs(voltdm->vfsm->voltsetup_mask);
341 c->voltsetup1 &= ~voltdm->vfsm->voltsetup_mask;
342 c->voltsetup1 |= val;
227} 343}
228 344
229/** 345/**
@@ -236,37 +352,21 @@ static void omap3_set_clksetup(u32 usec, struct voltagedomain *voltdm)
236 * or retention. Off mode has additionally an option to use sys_off_mode 352 * or retention. Off mode has additionally an option to use sys_off_mode
237 * pad, which uses a global signal to program the whole power IC to 353 * pad, which uses a global signal to program the whole power IC to
238 * off-mode. 354 * off-mode.
355 *
356 * Note that pmic is not controlling the voltage scaling during
357 * retention signaled over I2C4, so we can keep voltsetup2 as 0.
358 * And the oscillator is not shut off over I2C4, so no need to
359 * set clksetup.
239 */ 360 */
240static void omap3_set_i2c_timings(struct voltagedomain *voltdm, bool off_mode) 361static void omap3_set_i2c_timings(struct voltagedomain *voltdm)
241{ 362{
242 unsigned long voltsetup1; 363 struct omap3_vc_timings *c = vc.timings;
243 u32 tgt_volt;
244
245 /*
246 * Oscillator is shut down only if we are using sys_off_mode pad,
247 * thus we set a minimal setup time here
248 */
249 omap3_set_clksetup(1, voltdm);
250 364
251 if (off_mode) 365 /* Configure PRWDM_POWER_OFF over I2C4 */
252 tgt_volt = voltdm->vc_param->off; 366 omap3_init_voltsetup1(voltdm, c, voltdm->vc_param->off);
253 else 367 c++;
254 tgt_volt = voltdm->vc_param->ret; 368 /* Configure PRWDM_POWER_RET over I2C4 */
255 369 omap3_init_voltsetup1(voltdm, c, voltdm->vc_param->ret);
256 voltsetup1 = (voltdm->vc_param->on - tgt_volt) /
257 voltdm->pmic->slew_rate;
258
259 voltsetup1 = voltsetup1 * voltdm->sys_clk.rate / 8 / 1000000 + 1;
260
261 voltdm->rmw(voltdm->vfsm->voltsetup_mask,
262 voltsetup1 << __ffs(voltdm->vfsm->voltsetup_mask),
263 voltdm->vfsm->voltsetup_reg);
264
265 /*
266 * pmic is not controlling the voltage scaling during retention,
267 * thus set voltsetup2 to 0
268 */
269 voltdm->write(0, OMAP3_PRM_VOLTSETUP2_OFFSET);
270} 370}
271 371
272/** 372/**
@@ -275,69 +375,49 @@ static void omap3_set_i2c_timings(struct voltagedomain *voltdm, bool off_mode)
275 * 375 *
276 * Calculates and sets up off-mode timings for a channel. Off-mode 376 * Calculates and sets up off-mode timings for a channel. Off-mode
277 * can use either I2C based voltage scaling, or alternatively 377 * can use either I2C based voltage scaling, or alternatively
278 * sys_off_mode pad can be used to send a global command to power IC. 378 * sys_off_mode pad can be used to send a global command to power IC.n,
279 * This function first checks which mode is being used, and calls
280 * omap3_set_i2c_timings() if the system is using I2C control mode.
281 * sys_off_mode has the additional benefit that voltages can be 379 * sys_off_mode has the additional benefit that voltages can be
282 * scaled to zero volt level with TWL4030 / TWL5030, I2C can only 380 * scaled to zero volt level with TWL4030 / TWL5030, I2C can only
283 * scale to 600mV. 381 * scale to 600mV.
382 *
383 * Note that omap is not controlling the voltage scaling during
384 * off idle signaled by sys_off_mode, so we can keep voltsetup1
385 * as 0.
284 */ 386 */
285static void omap3_set_off_timings(struct voltagedomain *voltdm) 387static void omap3_set_off_timings(struct voltagedomain *voltdm)
286{ 388{
287 unsigned long clksetup; 389 struct omap3_vc_timings *c = vc.timings;
288 unsigned long voltsetup2; 390 u32 tstart, tshut, clksetup, voltoffset;
289 unsigned long voltsetup2_old;
290 u32 val;
291 u32 tstart, tshut;
292 391
293 /* check if sys_off_mode is used to control off-mode voltages */ 392 if (c->voltsetup2)
294 val = voltdm->read(OMAP3_PRM_VOLTCTRL_OFFSET);
295 if (!(val & OMAP3430_SEL_OFF_MASK)) {
296 /* No, omap is controlling them over I2C */
297 omap3_set_i2c_timings(voltdm, true);
298 return; 393 return;
299 }
300 394
301 omap_pm_get_oscillator(&tstart, &tshut); 395 omap_pm_get_oscillator(&tstart, &tshut);
302 omap3_set_clksetup(tstart, voltdm); 396 if (tstart == ULONG_MAX) {
303 397 pr_debug("PM: oscillator start-up time not initialized, using 10ms\n");
304 clksetup = voltdm->read(OMAP3_PRM_CLKSETUP_OFFSET); 398 clksetup = omap_usec_to_32k(10000);
305 399 } else {
306 /* voltsetup 2 in us */ 400 clksetup = omap_usec_to_32k(tstart);
307 voltsetup2 = voltdm->vc_param->on / voltdm->pmic->slew_rate; 401 }
308
309 /* convert to 32k clk cycles */
310 voltsetup2 = DIV_ROUND_UP(voltsetup2 * 32768, 1000000);
311
312 voltsetup2_old = voltdm->read(OMAP3_PRM_VOLTSETUP2_OFFSET);
313
314 /*
315 * Update voltsetup2 if higher than current value (needed because
316 * we have multiple channels with different ramp times), also
317 * update voltoffset always to value recommended by TRM
318 */
319 if (voltsetup2 > voltsetup2_old) {
320 voltdm->write(voltsetup2, OMAP3_PRM_VOLTSETUP2_OFFSET);
321 voltdm->write(clksetup - voltsetup2,
322 OMAP3_PRM_VOLTOFFSET_OFFSET);
323 } else
324 voltdm->write(clksetup - voltsetup2_old,
325 OMAP3_PRM_VOLTOFFSET_OFFSET);
326 402
327 /* 403 /*
328 * omap is not controlling voltage scaling during off-mode, 404 * For twl4030 errata 27, we need to allow minimum ~488.32 us wait to
329 * thus set voltsetup1 to 0 405 * switch from HFCLKIN to internal oscillator. That means timings
406 * have voltoffset fixed to 0xa in rounded up 32 KiHz cycles. And
407 * that means we can calculate the value based on the oscillator
408 * start-up time since voltoffset2 = clksetup - voltoffset.
330 */ 409 */
331 voltdm->rmw(voltdm->vfsm->voltsetup_mask, 0, 410 voltoffset = omap_usec_to_32k(488);
332 voltdm->vfsm->voltsetup_reg); 411 c->voltsetup2 = clksetup - voltoffset;
333 412 voltdm->write(clksetup, OMAP3_PRM_CLKSETUP_OFFSET);
334 /* voltoffset must be clksetup minus voltsetup2 according to TRM */ 413 voltdm->write(voltoffset, OMAP3_PRM_VOLTOFFSET_OFFSET);
335 voltdm->write(clksetup - voltsetup2, OMAP3_PRM_VOLTOFFSET_OFFSET);
336} 414}
337 415
338static void __init omap3_vc_init_channel(struct voltagedomain *voltdm) 416static void __init omap3_vc_init_channel(struct voltagedomain *voltdm)
339{ 417{
418 omap3_vc_init_pmic_signaling(voltdm);
340 omap3_set_off_timings(voltdm); 419 omap3_set_off_timings(voltdm);
420 omap3_set_i2c_timings(voltdm);
341} 421}
342 422
343/** 423/**
@@ -462,7 +542,7 @@ static void omap4_set_timings(struct voltagedomain *voltdm, bool off_mode)
462 val |= omap4_usec_to_val_scrm(tshut, OMAP4_DOWNTIME_SHIFT, 542 val |= omap4_usec_to_val_scrm(tshut, OMAP4_DOWNTIME_SHIFT,
463 OMAP4_DOWNTIME_MASK); 543 OMAP4_DOWNTIME_MASK);
464 544
465 __raw_writel(val, OMAP4_SCRM_CLKSETUPTIME); 545 writel_relaxed(val, OMAP4_SCRM_CLKSETUPTIME);
466} 546}
467 547
468/* OMAP4 specific voltage init functions */ 548/* OMAP4 specific voltage init functions */
@@ -584,7 +664,7 @@ static void __init omap4_vc_i2c_timing_init(struct voltagedomain *voltdm)
584 val = i2c_data->loadbits << 25 | i2c_data->loadbits << 29; 664 val = i2c_data->loadbits << 25 | i2c_data->loadbits << 29;
585 665
586 /* Write to SYSCTRL_PADCONF_WKUP_CTRL_I2C_2 to setup I2C pull */ 666 /* Write to SYSCTRL_PADCONF_WKUP_CTRL_I2C_2 to setup I2C pull */
587 __raw_writel(val, OMAP2_L4_IO_ADDRESS(OMAP4_CTRL_MODULE_PAD_WKUP + 667 writel_relaxed(val, OMAP2_L4_IO_ADDRESS(OMAP4_CTRL_MODULE_PAD_WKUP +
588 OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_I2C_2)); 668 OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_I2C_2));
589 669
590 /* HSSCLH can always be zero */ 670 /* HSSCLH can always be zero */
diff --git a/arch/arm/mach-omap2/vc.h b/arch/arm/mach-omap2/vc.h
index 91c8d75bf2ea..cdbdd78e755e 100644
--- a/arch/arm/mach-omap2/vc.h
+++ b/arch/arm/mach-omap2/vc.h
@@ -117,6 +117,9 @@ extern struct omap_vc_param omap4_mpu_vc_data;
117extern struct omap_vc_param omap4_iva_vc_data; 117extern struct omap_vc_param omap4_iva_vc_data;
118extern struct omap_vc_param omap4_core_vc_data; 118extern struct omap_vc_param omap4_core_vc_data;
119 119
120void omap3_vc_set_pmic_signaling(int core_next_state);
121
122
120void omap_vc_init_channel(struct voltagedomain *voltdm); 123void omap_vc_init_channel(struct voltagedomain *voltdm);
121int omap_vc_pre_scale(struct voltagedomain *voltdm, 124int omap_vc_pre_scale(struct voltagedomain *voltdm,
122 unsigned long target_volt, 125 unsigned long target_volt,
diff --git a/arch/arm/mach-omap2/wd_timer.c b/arch/arm/mach-omap2/wd_timer.c
index d15c7bbab8e2..97d6607d447a 100644
--- a/arch/arm/mach-omap2/wd_timer.c
+++ b/arch/arm/mach-omap2/wd_timer.c
@@ -49,12 +49,12 @@ int omap2_wd_timer_disable(struct omap_hwmod *oh)
49 } 49 }
50 50
51 /* sequence required to disable watchdog */ 51 /* sequence required to disable watchdog */
52 __raw_writel(0xAAAA, base + OMAP_WDT_SPR); 52 writel_relaxed(0xAAAA, base + OMAP_WDT_SPR);
53 while (__raw_readl(base + OMAP_WDT_WPS) & 0x10) 53 while (readl_relaxed(base + OMAP_WDT_WPS) & 0x10)
54 cpu_relax(); 54 cpu_relax();
55 55
56 __raw_writel(0x5555, base + OMAP_WDT_SPR); 56 writel_relaxed(0x5555, base + OMAP_WDT_SPR);
57 while (__raw_readl(base + OMAP_WDT_WPS) & 0x10) 57 while (readl_relaxed(base + OMAP_WDT_WPS) & 0x10)
58 cpu_relax(); 58 cpu_relax();
59 59
60 return 0; 60 return 0;
diff --git a/arch/arm/mach-orion5x/Kconfig b/arch/arm/mach-orion5x/Kconfig
index 14f2cae4109c..2412efb6cdd9 100644
--- a/arch/arm/mach-orion5x/Kconfig
+++ b/arch/arm/mach-orion5x/Kconfig
@@ -5,6 +5,11 @@ menu "Orion Implementations"
5config ARCH_ORION5X_DT 5config ARCH_ORION5X_DT
6 bool "Marvell Orion5x Flattened Device Tree" 6 bool "Marvell Orion5x Flattened Device Tree"
7 select USE_OF 7 select USE_OF
8 select ORION_CLK
9 select ORION_IRQCHIP
10 select ORION_TIMER
11 select PINCTRL
12 select PINCTRL_ORION
8 help 13 help
9 Say 'Y' here if you want your kernel to support the 14 Say 'Y' here if you want your kernel to support the
10 Marvell Orion5x using flattened device tree. 15 Marvell Orion5x using flattened device tree.
@@ -23,6 +28,14 @@ config MACH_RD88F5182
23 Say 'Y' here if you want your kernel to support the 28 Say 'Y' here if you want your kernel to support the
24 Marvell Orion-NAS (88F5182) RD2 29 Marvell Orion-NAS (88F5182) RD2
25 30
31config MACH_RD88F5182_DT
32 bool "Marvell Orion-NAS Reference Design (Flattened Device Tree)"
33 select ARCH_ORION5X_DT
34 select I2C_BOARDINFO
35 help
36 Say 'Y' here if you want your kernel to support the Marvell
37 Orion-NAS (88F5182) RD2, Flattened Device Tree.
38
26config MACH_KUROBOX_PRO 39config MACH_KUROBOX_PRO
27 bool "KuroBox Pro" 40 bool "KuroBox Pro"
28 select I2C_BOARDINFO 41 select I2C_BOARDINFO
@@ -102,28 +115,13 @@ config MACH_MV2120
102 Say 'Y' here if you want your kernel to support the 115 Say 'Y' here if you want your kernel to support the
103 HP Media Vault mv2120 or mv5100. 116 HP Media Vault mv2120 or mv5100.
104 117
105config MACH_EDMINI_V2_DT 118config MACH_D2NET_DT
106 bool "LaCie Ethernet Disk mini V2 (Flattened Device Tree)" 119 bool "LaCie d2 Network / Big Disk Network (Flattened Device Tree)"
107 select I2C_BOARDINFO
108 select ARCH_ORION5X_DT 120 select ARCH_ORION5X_DT
109 help 121 help
110 Say 'Y' here if you want your kernel to support the 122 Say 'Y' here if you want your kernel to support the
111 LaCie Ethernet Disk mini V2 (Flattened Device Tree).
112
113config MACH_D2NET
114 bool "LaCie d2 Network"
115 select I2C_BOARDINFO
116 help
117 Say 'Y' here if you want your kernel to support the
118 LaCie d2 Network NAS. 123 LaCie d2 Network NAS.
119 124
120config MACH_BIGDISK
121 bool "LaCie Big Disk Network"
122 select I2C_BOARDINFO
123 help
124 Say 'Y' here if you want your kernel to support the
125 LaCie Big Disk Network NAS.
126
127config MACH_NET2BIG 125config MACH_NET2BIG
128 bool "LaCie 2Big Network" 126 bool "LaCie 2Big Network"
129 select I2C_BOARDINFO 127 select I2C_BOARDINFO
@@ -131,8 +129,9 @@ config MACH_NET2BIG
131 Say 'Y' here if you want your kernel to support the 129 Say 'Y' here if you want your kernel to support the
132 LaCie 2Big Network NAS. 130 LaCie 2Big Network NAS.
133 131
134config MACH_MSS2 132config MACH_MSS2_DT
135 bool "Maxtor Shared Storage II" 133 bool "Maxtor Shared Storage II (Flattened Device Tree)"
134 select ARCH_ORION5X_DT
136 help 135 help
137 Say 'Y' here if you want your kernel to support the 136 Say 'Y' here if you want your kernel to support the
138 Maxtor Shared Storage II platform. 137 Maxtor Shared Storage II platform.
diff --git a/arch/arm/mach-orion5x/Makefile b/arch/arm/mach-orion5x/Makefile
index 45da805fb236..a40b5c9a58c4 100644
--- a/arch/arm/mach-orion5x/Makefile
+++ b/arch/arm/mach-orion5x/Makefile
@@ -12,10 +12,7 @@ obj-$(CONFIG_MACH_TS409) += ts409-setup.o tsx09-common.o
12obj-$(CONFIG_MACH_WRT350N_V2) += wrt350n-v2-setup.o 12obj-$(CONFIG_MACH_WRT350N_V2) += wrt350n-v2-setup.o
13obj-$(CONFIG_MACH_TS78XX) += ts78xx-setup.o 13obj-$(CONFIG_MACH_TS78XX) += ts78xx-setup.o
14obj-$(CONFIG_MACH_MV2120) += mv2120-setup.o 14obj-$(CONFIG_MACH_MV2120) += mv2120-setup.o
15obj-$(CONFIG_MACH_D2NET) += d2net-setup.o
16obj-$(CONFIG_MACH_BIGDISK) += d2net-setup.o
17obj-$(CONFIG_MACH_NET2BIG) += net2big-setup.o 15obj-$(CONFIG_MACH_NET2BIG) += net2big-setup.o
18obj-$(CONFIG_MACH_MSS2) += mss2-setup.o
19obj-$(CONFIG_MACH_WNR854T) += wnr854t-setup.o 16obj-$(CONFIG_MACH_WNR854T) += wnr854t-setup.o
20obj-$(CONFIG_MACH_RD88F5181L_GE) += rd88f5181l-ge-setup.o 17obj-$(CONFIG_MACH_RD88F5181L_GE) += rd88f5181l-ge-setup.o
21obj-$(CONFIG_MACH_RD88F5181L_FXO) += rd88f5181l-fxo-setup.o 18obj-$(CONFIG_MACH_RD88F5181L_FXO) += rd88f5181l-fxo-setup.o
@@ -23,4 +20,6 @@ obj-$(CONFIG_MACH_RD88F6183AP_GE) += rd88f6183ap-ge-setup.o
23obj-$(CONFIG_MACH_LINKSTATION_LSCHL) += ls-chl-setup.o 20obj-$(CONFIG_MACH_LINKSTATION_LSCHL) += ls-chl-setup.o
24 21
25obj-$(CONFIG_ARCH_ORION5X_DT) += board-dt.o 22obj-$(CONFIG_ARCH_ORION5X_DT) += board-dt.o
26obj-$(CONFIG_MACH_EDMINI_V2_DT) += edmini_v2-setup.o 23obj-$(CONFIG_MACH_D2NET_DT) += board-d2net.o
24obj-$(CONFIG_MACH_MSS2_DT) += board-mss2.o
25obj-$(CONFIG_MACH_RD88F5182_DT) += board-rd88f5182.o
diff --git a/arch/arm/mach-orion5x/board-d2net.c b/arch/arm/mach-orion5x/board-d2net.c
new file mode 100644
index 000000000000..8a7284124153
--- /dev/null
+++ b/arch/arm/mach-orion5x/board-d2net.c
@@ -0,0 +1,109 @@
1/*
2 * arch/arm/mach-orion5x/board-d2net.c
3 *
4 * LaCie d2Network and Big Disk Network NAS setup
5 *
6 * Copyright (C) 2009 Simon Guinot <sguinot@lacie.com>
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#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/platform_device.h>
16#include <linux/pci.h>
17#include <linux/irq.h>
18#include <linux/leds.h>
19#include <linux/gpio.h>
20#include <asm/mach-types.h>
21#include <asm/mach/arch.h>
22#include <asm/mach/pci.h>
23#include <mach/orion5x.h>
24#include <plat/orion-gpio.h>
25#include "common.h"
26
27/*****************************************************************************
28 * LaCie d2 Network Info
29 ****************************************************************************/
30
31/*****************************************************************************
32 * GPIO LED's
33 ****************************************************************************/
34
35/*
36 * The blue front LED is wired to the CPLD and can blink in relation with the
37 * SATA activity.
38 *
39 * The following array detail the different LED registers and the combination
40 * of their possible values:
41 *
42 * led_off | blink_ctrl | SATA active | LED state
43 * | | |
44 * 1 | x | x | off
45 * 0 | 0 | 0 | off
46 * 0 | 1 | 0 | blink (rate 300ms)
47 * 0 | x | 1 | on
48 *
49 * Notes: The blue and the red front LED's can't be on at the same time.
50 * Red LED have priority.
51 */
52
53#define D2NET_GPIO_RED_LED 6
54#define D2NET_GPIO_BLUE_LED_BLINK_CTRL 16
55#define D2NET_GPIO_BLUE_LED_OFF 23
56
57static struct gpio_led d2net_leds[] = {
58 {
59 .name = "d2net:blue:sata",
60 .default_trigger = "default-on",
61 .gpio = D2NET_GPIO_BLUE_LED_OFF,
62 .active_low = 1,
63 },
64 {
65 .name = "d2net:red:fail",
66 .gpio = D2NET_GPIO_RED_LED,
67 },
68};
69
70static struct gpio_led_platform_data d2net_led_data = {
71 .num_leds = ARRAY_SIZE(d2net_leds),
72 .leds = d2net_leds,
73};
74
75static struct platform_device d2net_gpio_leds = {
76 .name = "leds-gpio",
77 .id = -1,
78 .dev = {
79 .platform_data = &d2net_led_data,
80 },
81};
82
83static void __init d2net_gpio_leds_init(void)
84{
85 int err;
86
87 /* Configure register blink_ctrl to allow SATA activity LED blinking. */
88 err = gpio_request(D2NET_GPIO_BLUE_LED_BLINK_CTRL, "blue LED blink");
89 if (err == 0) {
90 err = gpio_direction_output(D2NET_GPIO_BLUE_LED_BLINK_CTRL, 1);
91 if (err)
92 gpio_free(D2NET_GPIO_BLUE_LED_BLINK_CTRL);
93 }
94 if (err)
95 pr_err("d2net: failed to configure blue LED blink GPIO\n");
96
97 platform_device_register(&d2net_gpio_leds);
98}
99
100/*****************************************************************************
101 * General Setup
102 ****************************************************************************/
103
104void __init d2net_init(void)
105{
106 d2net_gpio_leds_init();
107
108 pr_notice("d2net: Flash write are not yet supported.\n");
109}
diff --git a/arch/arm/mach-orion5x/board-dt.c b/arch/arm/mach-orion5x/board-dt.c
index c134a826070a..35d418faf8f1 100644
--- a/arch/arm/mach-orion5x/board-dt.c
+++ b/arch/arm/mach-orion5x/board-dt.c
@@ -15,10 +15,16 @@
15#include <linux/of.h> 15#include <linux/of.h>
16#include <linux/of_platform.h> 16#include <linux/of_platform.h>
17#include <linux/cpu.h> 17#include <linux/cpu.h>
18#include <linux/mbus.h>
19#include <linux/clk-provider.h>
20#include <linux/clocksource.h>
18#include <asm/system_misc.h> 21#include <asm/system_misc.h>
19#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
23#include <asm/mach/map.h>
20#include <mach/orion5x.h> 24#include <mach/orion5x.h>
25#include <mach/bridge-regs.h>
21#include <plat/irq.h> 26#include <plat/irq.h>
27#include <plat/time.h>
22#include "common.h" 28#include "common.h"
23 29
24static struct of_dev_auxdata orion5x_auxdata_lookup[] __initdata = { 30static struct of_dev_auxdata orion5x_auxdata_lookup[] __initdata = {
@@ -39,14 +45,13 @@ static void __init orion5x_dt_init(void)
39 orion5x_id(&dev, &rev, &dev_name); 45 orion5x_id(&dev, &rev, &dev_name);
40 printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, orion5x_tclk); 46 printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, orion5x_tclk);
41 47
48 BUG_ON(mvebu_mbus_dt_init());
49
42 /* 50 /*
43 * Setup Orion address map 51 * Setup Orion address map
44 */ 52 */
45 orion5x_setup_wins(); 53 orion5x_setup_wins();
46 54
47 /* Setup root of clk tree */
48 clk_init();
49
50 /* 55 /*
51 * Don't issue "Wait for Interrupt" instruction if we are 56 * Don't issue "Wait for Interrupt" instruction if we are
52 * running on D0 5281 silicon. 57 * running on D0 5281 silicon.
@@ -56,8 +61,8 @@ static void __init orion5x_dt_init(void)
56 cpu_idle_poll_ctrl(true); 61 cpu_idle_poll_ctrl(true);
57 } 62 }
58 63
59 if (of_machine_is_compatible("lacie,ethernet-disk-mini-v2")) 64 if (of_machine_is_compatible("maxtor,shared-storage-2"))
60 edmini_v2_init(); 65 mss2_init();
61 66
62 of_platform_populate(NULL, of_default_bus_match_table, 67 of_platform_populate(NULL, of_default_bus_match_table,
63 orion5x_auxdata_lookup, NULL); 68 orion5x_auxdata_lookup, NULL);
@@ -71,9 +76,6 @@ static const char *orion5x_dt_compat[] = {
71DT_MACHINE_START(ORION5X_DT, "Marvell Orion5x (Flattened Device Tree)") 76DT_MACHINE_START(ORION5X_DT, "Marvell Orion5x (Flattened Device Tree)")
72 /* Maintainer: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> */ 77 /* Maintainer: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> */
73 .map_io = orion5x_map_io, 78 .map_io = orion5x_map_io,
74 .init_early = orion5x_init_early,
75 .init_irq = orion_dt_init_irq,
76 .init_time = orion5x_timer_init,
77 .init_machine = orion5x_dt_init, 79 .init_machine = orion5x_dt_init,
78 .restart = orion5x_restart, 80 .restart = orion5x_restart,
79 .dt_compat = orion5x_dt_compat, 81 .dt_compat = orion5x_dt_compat,
diff --git a/arch/arm/mach-orion5x/board-mss2.c b/arch/arm/mach-orion5x/board-mss2.c
new file mode 100644
index 000000000000..66f9c3ba86cc
--- /dev/null
+++ b/arch/arm/mach-orion5x/board-mss2.c
@@ -0,0 +1,90 @@
1/*
2 * Maxtor Shared Storage II Board Setup
3 *
4 * Maintainer: Sylver Bruneau <sylver.bruneau@googlemail.com>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/platform_device.h>
15#include <linux/pci.h>
16#include <linux/irq.h>
17#include <asm/mach-types.h>
18#include <asm/mach/arch.h>
19#include <asm/mach/pci.h>
20#include <mach/orion5x.h>
21#include <mach/bridge-regs.h>
22#include "common.h"
23
24/*****************************************************************************
25 * Maxtor Shared Storage II Info
26 ****************************************************************************/
27
28/****************************************************************************
29 * PCI setup
30 ****************************************************************************/
31static int __init mss2_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
32{
33 int irq;
34
35 /*
36 * Check for devices with hard-wired IRQs.
37 */
38 irq = orion5x_pci_map_irq(dev, slot, pin);
39 if (irq != -1)
40 return irq;
41
42 return -1;
43}
44
45static struct hw_pci mss2_pci __initdata = {
46 .nr_controllers = 2,
47 .setup = orion5x_pci_sys_setup,
48 .scan = orion5x_pci_sys_scan_bus,
49 .map_irq = mss2_pci_map_irq,
50};
51
52static int __init mss2_pci_init(void)
53{
54 if (machine_is_mss2())
55 pci_common_init(&mss2_pci);
56
57 return 0;
58}
59subsys_initcall(mss2_pci_init);
60
61/*****************************************************************************
62 * MSS2 power off method
63 ****************************************************************************/
64/*
65 * On the Maxtor Shared Storage II, the shutdown process is the following :
66 * - Userland modifies U-boot env to tell U-boot to go idle at next boot
67 * - The board reboots
68 * - U-boot starts and go into an idle mode until the user press "power"
69 */
70static void mss2_power_off(void)
71{
72 u32 reg;
73
74 /*
75 * Enable and issue soft reset
76 */
77 reg = readl(RSTOUTn_MASK);
78 reg |= 1 << 2;
79 writel(reg, RSTOUTn_MASK);
80
81 reg = readl(CPU_SOFT_RESET);
82 reg |= 1;
83 writel(reg, CPU_SOFT_RESET);
84}
85
86void __init mss2_init(void)
87{
88 /* register mss2 specific power-off method */
89 pm_power_off = mss2_power_off;
90}
diff --git a/arch/arm/mach-orion5x/board-rd88f5182.c b/arch/arm/mach-orion5x/board-rd88f5182.c
new file mode 100644
index 000000000000..270824b0e50f
--- /dev/null
+++ b/arch/arm/mach-orion5x/board-rd88f5182.c
@@ -0,0 +1,116 @@
1/*
2 * arch/arm/mach-orion5x/rd88f5182-setup.c
3 *
4 * Marvell Orion-NAS Reference Design Setup
5 *
6 * Maintainer: Ronen Shitrit <rshitrit@marvell.com>
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#include <linux/gpio.h>
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/platform_device.h>
16#include <linux/pci.h>
17#include <linux/irq.h>
18#include <asm/mach-types.h>
19#include <asm/mach/arch.h>
20#include <asm/mach/pci.h>
21#include <mach/orion5x.h>
22#include "common.h"
23
24/*****************************************************************************
25 * RD-88F5182 Info
26 ****************************************************************************/
27
28/*
29 * PCI
30 */
31
32#define RD88F5182_PCI_SLOT0_OFFS 7
33#define RD88F5182_PCI_SLOT0_IRQ_A_PIN 7
34#define RD88F5182_PCI_SLOT0_IRQ_B_PIN 6
35
36/*****************************************************************************
37 * PCI
38 ****************************************************************************/
39
40static void __init rd88f5182_pci_preinit(void)
41{
42 int pin;
43
44 /*
45 * Configure PCI GPIO IRQ pins
46 */
47 pin = RD88F5182_PCI_SLOT0_IRQ_A_PIN;
48 if (gpio_request(pin, "PCI IntA") == 0) {
49 if (gpio_direction_input(pin) == 0) {
50 irq_set_irq_type(gpio_to_irq(pin), IRQ_TYPE_LEVEL_LOW);
51 } else {
52 printk(KERN_ERR "rd88f5182_pci_preinit failed to "
53 "set_irq_type pin %d\n", pin);
54 gpio_free(pin);
55 }
56 } else {
57 printk(KERN_ERR "rd88f5182_pci_preinit failed to request gpio %d\n", pin);
58 }
59
60 pin = RD88F5182_PCI_SLOT0_IRQ_B_PIN;
61 if (gpio_request(pin, "PCI IntB") == 0) {
62 if (gpio_direction_input(pin) == 0) {
63 irq_set_irq_type(gpio_to_irq(pin), IRQ_TYPE_LEVEL_LOW);
64 } else {
65 printk(KERN_ERR "rd88f5182_pci_preinit failed to "
66 "set_irq_type pin %d\n", pin);
67 gpio_free(pin);
68 }
69 } else {
70 printk(KERN_ERR "rd88f5182_pci_preinit failed to gpio_request %d\n", pin);
71 }
72}
73
74static int __init rd88f5182_pci_map_irq(const struct pci_dev *dev, u8 slot,
75 u8 pin)
76{
77 int irq;
78
79 /*
80 * Check for devices with hard-wired IRQs.
81 */
82 irq = orion5x_pci_map_irq(dev, slot, pin);
83 if (irq != -1)
84 return irq;
85
86 /*
87 * PCI IRQs are connected via GPIOs
88 */
89 switch (slot - RD88F5182_PCI_SLOT0_OFFS) {
90 case 0:
91 if (pin == 1)
92 return gpio_to_irq(RD88F5182_PCI_SLOT0_IRQ_A_PIN);
93 else
94 return gpio_to_irq(RD88F5182_PCI_SLOT0_IRQ_B_PIN);
95 default:
96 return -1;
97 }
98}
99
100static struct hw_pci rd88f5182_pci __initdata = {
101 .nr_controllers = 2,
102 .preinit = rd88f5182_pci_preinit,
103 .setup = orion5x_pci_sys_setup,
104 .scan = orion5x_pci_sys_scan_bus,
105 .map_irq = rd88f5182_pci_map_irq,
106};
107
108static int __init rd88f5182_pci_init(void)
109{
110 if (of_machine_is_compatible("marvell,rd-88f5182-nas"))
111 pci_common_init(&rd88f5182_pci);
112
113 return 0;
114}
115
116subsys_initcall(rd88f5182_pci_init);
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index 3f1de1111e0f..6bbb7b55c6d1 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -365,8 +365,7 @@ void orion5x_restart(enum reboot_mode mode, const char *cmd)
365 * Many orion-based systems have buggy bootloader implementations. 365 * Many orion-based systems have buggy bootloader implementations.
366 * This is a common fixup for bogus memory tags. 366 * This is a common fixup for bogus memory tags.
367 */ 367 */
368void __init tag_fixup_mem32(struct tag *t, char **from, 368void __init tag_fixup_mem32(struct tag *t, char **from)
369 struct meminfo *meminfo)
370{ 369{
371 for (; t->hdr.size; t = tag_next(t)) 370 for (; t->hdr.size; t = tag_next(t))
372 if (t->hdr.tag == ATAG_MEM && 371 if (t->hdr.tag == ATAG_MEM &&
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h
index f565f9944af2..cd0389c6e822 100644
--- a/arch/arm/mach-orion5x/common.h
+++ b/arch/arm/mach-orion5x/common.h
@@ -21,7 +21,7 @@ struct mv_sata_platform_data;
21#define ORION_MBUS_DEVBUS_BOOT_ATTR 0x0f 21#define ORION_MBUS_DEVBUS_BOOT_ATTR 0x0f
22#define ORION_MBUS_DEVBUS_TARGET(cs) 0x01 22#define ORION_MBUS_DEVBUS_TARGET(cs) 0x01
23#define ORION_MBUS_DEVBUS_ATTR(cs) (~(1 << cs)) 23#define ORION_MBUS_DEVBUS_ATTR(cs) (~(1 << cs))
24#define ORION_MBUS_SRAM_TARGET 0x00 24#define ORION_MBUS_SRAM_TARGET 0x09
25#define ORION_MBUS_SRAM_ATTR 0x00 25#define ORION_MBUS_SRAM_ATTR 0x00
26 26
27/* 27/*
@@ -64,17 +64,15 @@ int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys);
64struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); 64struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys);
65int orion5x_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); 65int orion5x_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
66 66
67/* board init functions for boards not fully converted to fdt */ 67struct tag;
68#ifdef CONFIG_MACH_EDMINI_V2_DT 68extern void __init tag_fixup_mem32(struct tag *, char **);
69void edmini_v2_init(void); 69
70#ifdef CONFIG_MACH_MSS2_DT
71extern void mss2_init(void);
70#else 72#else
71static inline void edmini_v2_init(void) {}; 73static inline void mss2_init(void) {}
72#endif 74#endif
73 75
74struct meminfo;
75struct tag;
76extern void __init tag_fixup_mem32(struct tag *, char **, struct meminfo *);
77
78/***************************************************************************** 76/*****************************************************************************
79 * Helpers to access Orion registers 77 * Helpers to access Orion registers
80 ****************************************************************************/ 78 ****************************************************************************/
diff --git a/arch/arm/mach-orion5x/d2net-setup.c b/arch/arm/mach-orion5x/d2net-setup.c
deleted file mode 100644
index 8f68b745c1d5..000000000000
--- a/arch/arm/mach-orion5x/d2net-setup.c
+++ /dev/null
@@ -1,365 +0,0 @@
1/*
2 * arch/arm/mach-orion5x/d2net-setup.c
3 *
4 * LaCie d2Network and Big Disk Network NAS setup
5 *
6 * Copyright (C) 2009 Simon Guinot <sguinot@lacie.com>
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#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/platform_device.h>
16#include <linux/pci.h>
17#include <linux/irq.h>
18#include <linux/mtd/physmap.h>
19#include <linux/mv643xx_eth.h>
20#include <linux/leds.h>
21#include <linux/gpio_keys.h>
22#include <linux/input.h>
23#include <linux/i2c.h>
24#include <linux/ata_platform.h>
25#include <linux/gpio.h>
26#include <asm/mach-types.h>
27#include <asm/mach/arch.h>
28#include <asm/mach/pci.h>
29#include <mach/orion5x.h>
30#include <plat/orion-gpio.h>
31#include "common.h"
32#include "mpp.h"
33
34/*****************************************************************************
35 * LaCie d2 Network Info
36 ****************************************************************************/
37
38/*
39 * 512KB NOR flash Device bus boot chip select
40 */
41
42#define D2NET_NOR_BOOT_BASE 0xfff80000
43#define D2NET_NOR_BOOT_SIZE SZ_512K
44
45/*****************************************************************************
46 * 512KB NOR Flash on Boot Device
47 ****************************************************************************/
48
49/*
50 * TODO: Check write support on flash MX29LV400CBTC-70G
51 */
52
53static struct mtd_partition d2net_partitions[] = {
54 {
55 .name = "Full512kb",
56 .size = MTDPART_SIZ_FULL,
57 .offset = 0,
58 .mask_flags = MTD_WRITEABLE,
59 },
60};
61
62static struct physmap_flash_data d2net_nor_flash_data = {
63 .width = 1,
64 .parts = d2net_partitions,
65 .nr_parts = ARRAY_SIZE(d2net_partitions),
66};
67
68static struct resource d2net_nor_flash_resource = {
69 .flags = IORESOURCE_MEM,
70 .start = D2NET_NOR_BOOT_BASE,
71 .end = D2NET_NOR_BOOT_BASE
72 + D2NET_NOR_BOOT_SIZE - 1,
73};
74
75static struct platform_device d2net_nor_flash = {
76 .name = "physmap-flash",
77 .id = 0,
78 .dev = {
79 .platform_data = &d2net_nor_flash_data,
80 },
81 .num_resources = 1,
82 .resource = &d2net_nor_flash_resource,
83};
84
85/*****************************************************************************
86 * Ethernet
87 ****************************************************************************/
88
89static struct mv643xx_eth_platform_data d2net_eth_data = {
90 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
91};
92
93/*****************************************************************************
94 * I2C devices
95 ****************************************************************************/
96
97/*
98 * i2c addr | chip | description
99 * 0x32 | Ricoh 5C372b | RTC
100 * 0x3e | GMT G762 | PWM fan controller
101 * 0x50 | HT24LC08 | eeprom (1kB)
102 *
103 * TODO: Add G762 support to the g760a driver.
104 */
105static struct i2c_board_info __initdata d2net_i2c_devices[] = {
106 {
107 I2C_BOARD_INFO("rs5c372b", 0x32),
108 }, {
109 I2C_BOARD_INFO("24c08", 0x50),
110 },
111};
112
113/*****************************************************************************
114 * SATA
115 ****************************************************************************/
116
117static struct mv_sata_platform_data d2net_sata_data = {
118 .n_ports = 2,
119};
120
121#define D2NET_GPIO_SATA0_POWER 3
122#define D2NET_GPIO_SATA1_POWER 12
123
124static void __init d2net_sata_power_init(void)
125{
126 int err;
127
128 err = gpio_request(D2NET_GPIO_SATA0_POWER, "SATA0 power");
129 if (err == 0) {
130 err = gpio_direction_output(D2NET_GPIO_SATA0_POWER, 1);
131 if (err)
132 gpio_free(D2NET_GPIO_SATA0_POWER);
133 }
134 if (err)
135 pr_err("d2net: failed to configure SATA0 power GPIO\n");
136
137 err = gpio_request(D2NET_GPIO_SATA1_POWER, "SATA1 power");
138 if (err == 0) {
139 err = gpio_direction_output(D2NET_GPIO_SATA1_POWER, 1);
140 if (err)
141 gpio_free(D2NET_GPIO_SATA1_POWER);
142 }
143 if (err)
144 pr_err("d2net: failed to configure SATA1 power GPIO\n");
145}
146
147/*****************************************************************************
148 * GPIO LED's
149 ****************************************************************************/
150
151/*
152 * The blue front LED is wired to the CPLD and can blink in relation with the
153 * SATA activity.
154 *
155 * The following array detail the different LED registers and the combination
156 * of their possible values:
157 *
158 * led_off | blink_ctrl | SATA active | LED state
159 * | | |
160 * 1 | x | x | off
161 * 0 | 0 | 0 | off
162 * 0 | 1 | 0 | blink (rate 300ms)
163 * 0 | x | 1 | on
164 *
165 * Notes: The blue and the red front LED's can't be on at the same time.
166 * Red LED have priority.
167 */
168
169#define D2NET_GPIO_RED_LED 6
170#define D2NET_GPIO_BLUE_LED_BLINK_CTRL 16
171#define D2NET_GPIO_BLUE_LED_OFF 23
172
173static struct gpio_led d2net_leds[] = {
174 {
175 .name = "d2net:blue:sata",
176 .default_trigger = "default-on",
177 .gpio = D2NET_GPIO_BLUE_LED_OFF,
178 .active_low = 1,
179 },
180 {
181 .name = "d2net:red:fail",
182 .gpio = D2NET_GPIO_RED_LED,
183 },
184};
185
186static struct gpio_led_platform_data d2net_led_data = {
187 .num_leds = ARRAY_SIZE(d2net_leds),
188 .leds = d2net_leds,
189};
190
191static struct platform_device d2net_gpio_leds = {
192 .name = "leds-gpio",
193 .id = -1,
194 .dev = {
195 .platform_data = &d2net_led_data,
196 },
197};
198
199static void __init d2net_gpio_leds_init(void)
200{
201 int err;
202
203 /* Configure GPIO over MPP max number. */
204 orion_gpio_set_valid(D2NET_GPIO_BLUE_LED_OFF, 1);
205
206 /* Configure register blink_ctrl to allow SATA activity LED blinking. */
207 err = gpio_request(D2NET_GPIO_BLUE_LED_BLINK_CTRL, "blue LED blink");
208 if (err == 0) {
209 err = gpio_direction_output(D2NET_GPIO_BLUE_LED_BLINK_CTRL, 1);
210 if (err)
211 gpio_free(D2NET_GPIO_BLUE_LED_BLINK_CTRL);
212 }
213 if (err)
214 pr_err("d2net: failed to configure blue LED blink GPIO\n");
215
216 platform_device_register(&d2net_gpio_leds);
217}
218
219/****************************************************************************
220 * GPIO keys
221 ****************************************************************************/
222
223#define D2NET_GPIO_PUSH_BUTTON 18
224#define D2NET_GPIO_POWER_SWITCH_ON 8
225#define D2NET_GPIO_POWER_SWITCH_OFF 9
226
227#define D2NET_SWITCH_POWER_ON 0x1
228#define D2NET_SWITCH_POWER_OFF 0x2
229
230static struct gpio_keys_button d2net_buttons[] = {
231 {
232 .type = EV_SW,
233 .code = D2NET_SWITCH_POWER_OFF,
234 .gpio = D2NET_GPIO_POWER_SWITCH_OFF,
235 .desc = "Power rocker switch (auto|off)",
236 .active_low = 0,
237 },
238 {
239 .type = EV_SW,
240 .code = D2NET_SWITCH_POWER_ON,
241 .gpio = D2NET_GPIO_POWER_SWITCH_ON,
242 .desc = "Power rocker switch (on|auto)",
243 .active_low = 0,
244 },
245 {
246 .type = EV_KEY,
247 .code = KEY_POWER,
248 .gpio = D2NET_GPIO_PUSH_BUTTON,
249 .desc = "Front Push Button",
250 .active_low = 0,
251 },
252};
253
254static struct gpio_keys_platform_data d2net_button_data = {
255 .buttons = d2net_buttons,
256 .nbuttons = ARRAY_SIZE(d2net_buttons),
257};
258
259static struct platform_device d2net_gpio_buttons = {
260 .name = "gpio-keys",
261 .id = -1,
262 .dev = {
263 .platform_data = &d2net_button_data,
264 },
265};
266
267/*****************************************************************************
268 * General Setup
269 ****************************************************************************/
270
271static unsigned int d2net_mpp_modes[] __initdata = {
272 MPP0_GPIO, /* Board ID (bit 0) */
273 MPP1_GPIO, /* Board ID (bit 1) */
274 MPP2_GPIO, /* Board ID (bit 2) */
275 MPP3_GPIO, /* SATA 0 power */
276 MPP4_UNUSED,
277 MPP5_GPIO, /* Fan fail detection */
278 MPP6_GPIO, /* Red front LED */
279 MPP7_UNUSED,
280 MPP8_GPIO, /* Rear power switch (on|auto) */
281 MPP9_GPIO, /* Rear power switch (auto|off) */
282 MPP10_UNUSED,
283 MPP11_UNUSED,
284 MPP12_GPIO, /* SATA 1 power */
285 MPP13_UNUSED,
286 MPP14_SATA_LED, /* SATA 0 active */
287 MPP15_SATA_LED, /* SATA 1 active */
288 MPP16_GPIO, /* Blue front LED blink control */
289 MPP17_UNUSED,
290 MPP18_GPIO, /* Front button (0 = Released, 1 = Pushed ) */
291 MPP19_UNUSED,
292 0,
293 /* 22: USB port 1 fuse (0 = Fail, 1 = Ok) */
294 /* 23: Blue front LED off */
295 /* 24: Inhibit board power off (0 = Disabled, 1 = Enabled) */
296};
297
298#define D2NET_GPIO_INHIBIT_POWER_OFF 24
299
300static void __init d2net_init(void)
301{
302 /*
303 * Setup basic Orion functions. Need to be called early.
304 */
305 orion5x_init();
306
307 orion5x_mpp_conf(d2net_mpp_modes);
308
309 /*
310 * Configure peripherals.
311 */
312 orion5x_ehci0_init();
313 orion5x_eth_init(&d2net_eth_data);
314 orion5x_i2c_init();
315 orion5x_uart0_init();
316
317 d2net_sata_power_init();
318 orion5x_sata_init(&d2net_sata_data);
319
320 mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET,
321 ORION_MBUS_DEVBUS_BOOT_ATTR,
322 D2NET_NOR_BOOT_BASE,
323 D2NET_NOR_BOOT_SIZE);
324 platform_device_register(&d2net_nor_flash);
325
326 platform_device_register(&d2net_gpio_buttons);
327
328 d2net_gpio_leds_init();
329
330 pr_notice("d2net: Flash write are not yet supported.\n");
331
332 i2c_register_board_info(0, d2net_i2c_devices,
333 ARRAY_SIZE(d2net_i2c_devices));
334
335 orion_gpio_set_valid(D2NET_GPIO_INHIBIT_POWER_OFF, 1);
336}
337
338/* Warning: LaCie use a wrong mach-type (0x20e=526) in their bootloader. */
339
340#ifdef CONFIG_MACH_D2NET
341MACHINE_START(D2NET, "LaCie d2 Network")
342 .atag_offset = 0x100,
343 .init_machine = d2net_init,
344 .map_io = orion5x_map_io,
345 .init_early = orion5x_init_early,
346 .init_irq = orion5x_init_irq,
347 .init_time = orion5x_timer_init,
348 .fixup = tag_fixup_mem32,
349 .restart = orion5x_restart,
350MACHINE_END
351#endif
352
353#ifdef CONFIG_MACH_BIGDISK
354MACHINE_START(BIGDISK, "LaCie Big Disk Network")
355 .atag_offset = 0x100,
356 .init_machine = d2net_init,
357 .map_io = orion5x_map_io,
358 .init_early = orion5x_init_early,
359 .init_irq = orion5x_init_irq,
360 .init_time = orion5x_timer_init,
361 .fixup = tag_fixup_mem32,
362 .restart = orion5x_restart,
363MACHINE_END
364#endif
365
diff --git a/arch/arm/mach-orion5x/edmini_v2-setup.c b/arch/arm/mach-orion5x/edmini_v2-setup.c
deleted file mode 100644
index f66c1b2ee8c1..000000000000
--- a/arch/arm/mach-orion5x/edmini_v2-setup.c
+++ /dev/null
@@ -1,169 +0,0 @@
1/*
2 * arch/arm/mach-orion5x/edmini_v2-setup.c
3 *
4 * LaCie Ethernet Disk mini V2 Setup
5 *
6 * Copyright (C) 2008 Christopher Moore <moore@free.fr>
7 * Copyright (C) 2008 Albert Aribaud <albert.aribaud@free.fr>
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14/*
15 * TODO: add Orion USB device port init when kernel.org support is added.
16 * TODO: add flash write support: see below.
17 * TODO: add power-off support.
18 * TODO: add I2C EEPROM support.
19 */
20
21#include <linux/kernel.h>
22#include <linux/init.h>
23#include <linux/platform_device.h>
24#include <linux/pci.h>
25#include <linux/irq.h>
26#include <linux/mbus.h>
27#include <linux/mtd/physmap.h>
28#include <linux/leds.h>
29#include <linux/gpio_keys.h>
30#include <linux/input.h>
31#include <linux/i2c.h>
32#include <linux/ata_platform.h>
33#include <linux/gpio.h>
34#include <asm/mach-types.h>
35#include <asm/mach/arch.h>
36#include <asm/mach/pci.h>
37#include <mach/orion5x.h>
38#include "common.h"
39#include "mpp.h"
40
41/*****************************************************************************
42 * EDMINI_V2 Info
43 ****************************************************************************/
44
45/*
46 * 512KB NOR flash Device bus boot chip select
47 */
48
49#define EDMINI_V2_NOR_BOOT_BASE 0xfff80000
50#define EDMINI_V2_NOR_BOOT_SIZE SZ_512K
51
52/*****************************************************************************
53 * 512KB NOR Flash on BOOT Device
54 ****************************************************************************/
55
56/*
57 * Currently the MTD code does not recognize the MX29LV400CBCT as a bottom
58 * -type device. This could cause risks of accidentally erasing critical
59 * flash sectors. We thus define a single, write-protected partition covering
60 * the whole flash.
61 * TODO: once the flash part TOP/BOTTOM detection issue is sorted out in the MTD
62 * code, break this into at least three partitions: 'u-boot code', 'u-boot
63 * environment' and 'whatever is left'.
64 */
65
66static struct mtd_partition edmini_v2_partitions[] = {
67 {
68 .name = "Full512kb",
69 .size = 0x00080000,
70 .offset = 0x00000000,
71 .mask_flags = MTD_WRITEABLE,
72 },
73};
74
75static struct physmap_flash_data edmini_v2_nor_flash_data = {
76 .width = 1,
77 .parts = edmini_v2_partitions,
78 .nr_parts = ARRAY_SIZE(edmini_v2_partitions),
79};
80
81static struct resource edmini_v2_nor_flash_resource = {
82 .flags = IORESOURCE_MEM,
83 .start = EDMINI_V2_NOR_BOOT_BASE,
84 .end = EDMINI_V2_NOR_BOOT_BASE
85 + EDMINI_V2_NOR_BOOT_SIZE - 1,
86};
87
88static struct platform_device edmini_v2_nor_flash = {
89 .name = "physmap-flash",
90 .id = 0,
91 .dev = {
92 .platform_data = &edmini_v2_nor_flash_data,
93 },
94 .num_resources = 1,
95 .resource = &edmini_v2_nor_flash_resource,
96};
97
98/*****************************************************************************
99 * RTC 5C372a on I2C bus
100 ****************************************************************************/
101
102#define EDMINIV2_RTC_GPIO 3
103
104static struct i2c_board_info __initdata edmini_v2_i2c_rtc = {
105 I2C_BOARD_INFO("rs5c372a", 0x32),
106 .irq = 0,
107};
108
109/*****************************************************************************
110 * General Setup
111 ****************************************************************************/
112static unsigned int edminiv2_mpp_modes[] __initdata = {
113 MPP0_UNUSED,
114 MPP1_UNUSED,
115 MPP2_UNUSED,
116 MPP3_GPIO, /* RTC interrupt */
117 MPP4_UNUSED,
118 MPP5_UNUSED,
119 MPP6_UNUSED,
120 MPP7_UNUSED,
121 MPP8_UNUSED,
122 MPP9_UNUSED,
123 MPP10_UNUSED,
124 MPP11_UNUSED,
125 MPP12_SATA_LED, /* SATA 0 presence */
126 MPP13_SATA_LED, /* SATA 1 presence */
127 MPP14_SATA_LED, /* SATA 0 active */
128 MPP15_SATA_LED, /* SATA 1 active */
129 /* 16: Power LED control (0 = On, 1 = Off) */
130 MPP16_GPIO,
131 /* 17: Power LED control select (0 = CPLD, 1 = GPIO16) */
132 MPP17_GPIO,
133 /* 18: Power button status (0 = Released, 1 = Pressed) */
134 MPP18_GPIO,
135 MPP19_UNUSED,
136 0,
137};
138
139void __init edmini_v2_init(void)
140{
141 orion5x_mpp_conf(edminiv2_mpp_modes);
142
143 /*
144 * Configure peripherals.
145 */
146 orion5x_ehci0_init();
147
148 mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET,
149 ORION_MBUS_DEVBUS_BOOT_ATTR,
150 EDMINI_V2_NOR_BOOT_BASE,
151 EDMINI_V2_NOR_BOOT_SIZE);
152 platform_device_register(&edmini_v2_nor_flash);
153
154 pr_notice("edmini_v2: USB device port, flash write and power-off "
155 "are not yet supported.\n");
156
157 /* Get RTC IRQ and register the chip */
158 if (gpio_request(EDMINIV2_RTC_GPIO, "rtc") == 0) {
159 if (gpio_direction_input(EDMINIV2_RTC_GPIO) == 0)
160 edmini_v2_i2c_rtc.irq = gpio_to_irq(EDMINIV2_RTC_GPIO);
161 else
162 gpio_free(EDMINIV2_RTC_GPIO);
163 }
164
165 if (edmini_v2_i2c_rtc.irq == 0)
166 pr_warning("edmini_v2: failed to get RTC IRQ\n");
167
168 i2c_register_board_info(0, &edmini_v2_i2c_rtc, 1);
169}
diff --git a/arch/arm/mach-orion5x/irq.c b/arch/arm/mach-orion5x/irq.c
index 9654b0cc5892..cd4bac4d7e43 100644
--- a/arch/arm/mach-orion5x/irq.c
+++ b/arch/arm/mach-orion5x/irq.c
@@ -16,6 +16,7 @@
16#include <mach/bridge-regs.h> 16#include <mach/bridge-regs.h>
17#include <plat/orion-gpio.h> 17#include <plat/orion-gpio.h>
18#include <plat/irq.h> 18#include <plat/irq.h>
19#include <asm/exception.h>
19#include "common.h" 20#include "common.h"
20 21
21static int __initdata gpio0_irqs[4] = { 22static int __initdata gpio0_irqs[4] = {
@@ -25,10 +26,37 @@ static int __initdata gpio0_irqs[4] = {
25 IRQ_ORION5X_GPIO_24_31, 26 IRQ_ORION5X_GPIO_24_31,
26}; 27};
27 28
29#ifdef CONFIG_MULTI_IRQ_HANDLER
30/*
31 * Compiling with both non-DT and DT support enabled, will
32 * break asm irq handler used by non-DT boards. Therefore,
33 * we provide a C-style irq handler even for non-DT boards,
34 * if MULTI_IRQ_HANDLER is set.
35 */
36
37asmlinkage void
38__exception_irq_entry orion5x_legacy_handle_irq(struct pt_regs *regs)
39{
40 u32 stat;
41
42 stat = readl_relaxed(MAIN_IRQ_CAUSE);
43 stat &= readl_relaxed(MAIN_IRQ_MASK);
44 if (stat) {
45 unsigned int hwirq = __fls(stat);
46 handle_IRQ(hwirq, regs);
47 return;
48 }
49}
50#endif
51
28void __init orion5x_init_irq(void) 52void __init orion5x_init_irq(void)
29{ 53{
30 orion_irq_init(0, MAIN_IRQ_MASK); 54 orion_irq_init(0, MAIN_IRQ_MASK);
31 55
56#ifdef CONFIG_MULTI_IRQ_HANDLER
57 set_handle_irq(orion5x_legacy_handle_irq);
58#endif
59
32 /* 60 /*
33 * Initialize gpiolib for GPIOs 0-31. 61 * Initialize gpiolib for GPIOs 0-31.
34 */ 62 */
diff --git a/arch/arm/mach-orion5x/mss2-setup.c b/arch/arm/mach-orion5x/mss2-setup.c
deleted file mode 100644
index e105130ba51c..000000000000
--- a/arch/arm/mach-orion5x/mss2-setup.c
+++ /dev/null
@@ -1,274 +0,0 @@
1/*
2 * Maxtor Shared Storage II Board Setup
3 *
4 * Maintainer: Sylver Bruneau <sylver.bruneau@googlemail.com>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/platform_device.h>
15#include <linux/pci.h>
16#include <linux/irq.h>
17#include <linux/mtd/physmap.h>
18#include <linux/mv643xx_eth.h>
19#include <linux/leds.h>
20#include <linux/gpio_keys.h>
21#include <linux/input.h>
22#include <linux/i2c.h>
23#include <linux/ata_platform.h>
24#include <linux/gpio.h>
25#include <asm/mach-types.h>
26#include <asm/mach/arch.h>
27#include <asm/mach/pci.h>
28#include <mach/orion5x.h>
29#include <mach/bridge-regs.h>
30#include "common.h"
31#include "mpp.h"
32
33#define MSS2_NOR_BOOT_BASE 0xff800000
34#define MSS2_NOR_BOOT_SIZE SZ_256K
35
36/*****************************************************************************
37 * Maxtor Shared Storage II Info
38 ****************************************************************************/
39
40/*
41 * Maxtor Shared Storage II hardware :
42 * - Marvell 88F5182-A2 C500
43 * - Marvell 88E1111 Gigabit Ethernet PHY
44 * - RTC M41T81 (@0x68) on I2C bus
45 * - 256KB NOR flash
46 * - 64MB of RAM
47 */
48
49/*****************************************************************************
50 * 256KB NOR Flash on BOOT Device
51 ****************************************************************************/
52
53static struct physmap_flash_data mss2_nor_flash_data = {
54 .width = 1,
55};
56
57static struct resource mss2_nor_flash_resource = {
58 .flags = IORESOURCE_MEM,
59 .start = MSS2_NOR_BOOT_BASE,
60 .end = MSS2_NOR_BOOT_BASE + MSS2_NOR_BOOT_SIZE - 1,
61};
62
63static struct platform_device mss2_nor_flash = {
64 .name = "physmap-flash",
65 .id = 0,
66 .dev = {
67 .platform_data = &mss2_nor_flash_data,
68 },
69 .resource = &mss2_nor_flash_resource,
70 .num_resources = 1,
71};
72
73/****************************************************************************
74 * PCI setup
75 ****************************************************************************/
76static int __init mss2_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
77{
78 int irq;
79
80 /*
81 * Check for devices with hard-wired IRQs.
82 */
83 irq = orion5x_pci_map_irq(dev, slot, pin);
84 if (irq != -1)
85 return irq;
86
87 return -1;
88}
89
90static struct hw_pci mss2_pci __initdata = {
91 .nr_controllers = 2,
92 .setup = orion5x_pci_sys_setup,
93 .scan = orion5x_pci_sys_scan_bus,
94 .map_irq = mss2_pci_map_irq,
95};
96
97static int __init mss2_pci_init(void)
98{
99 if (machine_is_mss2())
100 pci_common_init(&mss2_pci);
101
102 return 0;
103}
104subsys_initcall(mss2_pci_init);
105
106
107/*****************************************************************************
108 * Ethernet
109 ****************************************************************************/
110
111static struct mv643xx_eth_platform_data mss2_eth_data = {
112 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
113};
114
115/*****************************************************************************
116 * SATA
117 ****************************************************************************/
118
119static struct mv_sata_platform_data mss2_sata_data = {
120 .n_ports = 2,
121};
122
123/*****************************************************************************
124 * GPIO buttons
125 ****************************************************************************/
126
127#define MSS2_GPIO_KEY_RESET 12
128#define MSS2_GPIO_KEY_POWER 11
129
130static struct gpio_keys_button mss2_buttons[] = {
131 {
132 .code = KEY_POWER,
133 .gpio = MSS2_GPIO_KEY_POWER,
134 .desc = "Power",
135 .active_low = 1,
136 }, {
137 .code = KEY_RESTART,
138 .gpio = MSS2_GPIO_KEY_RESET,
139 .desc = "Reset",
140 .active_low = 1,
141 },
142};
143
144static struct gpio_keys_platform_data mss2_button_data = {
145 .buttons = mss2_buttons,
146 .nbuttons = ARRAY_SIZE(mss2_buttons),
147};
148
149static struct platform_device mss2_button_device = {
150 .name = "gpio-keys",
151 .id = -1,
152 .dev = {
153 .platform_data = &mss2_button_data,
154 },
155};
156
157/*****************************************************************************
158 * RTC m41t81 on I2C bus
159 ****************************************************************************/
160
161#define MSS2_GPIO_RTC_IRQ 3
162
163static struct i2c_board_info __initdata mss2_i2c_rtc = {
164 I2C_BOARD_INFO("m41t81", 0x68),
165};
166
167/*****************************************************************************
168 * MSS2 power off method
169 ****************************************************************************/
170/*
171 * On the Maxtor Shared Storage II, the shutdown process is the following :
172 * - Userland modifies U-boot env to tell U-boot to go idle at next boot
173 * - The board reboots
174 * - U-boot starts and go into an idle mode until the user press "power"
175 */
176static void mss2_power_off(void)
177{
178 u32 reg;
179
180 /*
181 * Enable and issue soft reset
182 */
183 reg = readl(RSTOUTn_MASK);
184 reg |= 1 << 2;
185 writel(reg, RSTOUTn_MASK);
186
187 reg = readl(CPU_SOFT_RESET);
188 reg |= 1;
189 writel(reg, CPU_SOFT_RESET);
190}
191
192/****************************************************************************
193 * General Setup
194 ****************************************************************************/
195static unsigned int mss2_mpp_modes[] __initdata = {
196 MPP0_GPIO, /* Power LED */
197 MPP1_GPIO, /* Error LED */
198 MPP2_UNUSED,
199 MPP3_GPIO, /* RTC interrupt */
200 MPP4_GPIO, /* HDD ind. (Single/Dual)*/
201 MPP5_GPIO, /* HD0 5V control */
202 MPP6_GPIO, /* HD0 12V control */
203 MPP7_GPIO, /* HD1 5V control */
204 MPP8_GPIO, /* HD1 12V control */
205 MPP9_UNUSED,
206 MPP10_GPIO, /* Fan control */
207 MPP11_GPIO, /* Power button */
208 MPP12_GPIO, /* Reset button */
209 MPP13_UNUSED,
210 MPP14_SATA_LED, /* SATA 0 active */
211 MPP15_SATA_LED, /* SATA 1 active */
212 MPP16_UNUSED,
213 MPP17_UNUSED,
214 MPP18_UNUSED,
215 MPP19_UNUSED,
216 0,
217};
218
219static void __init mss2_init(void)
220{
221 /* Setup basic Orion functions. Need to be called early. */
222 orion5x_init();
223
224 orion5x_mpp_conf(mss2_mpp_modes);
225
226 /*
227 * MPP[20] Unused
228 * MPP[21] PCI clock
229 * MPP[22] USB 0 over current
230 * MPP[23] USB 1 over current
231 */
232
233 /*
234 * Configure peripherals.
235 */
236 orion5x_ehci0_init();
237 orion5x_ehci1_init();
238 orion5x_eth_init(&mss2_eth_data);
239 orion5x_i2c_init();
240 orion5x_sata_init(&mss2_sata_data);
241 orion5x_uart0_init();
242 orion5x_xor_init();
243
244 mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET,
245 ORION_MBUS_DEVBUS_BOOT_ATTR,
246 MSS2_NOR_BOOT_BASE,
247 MSS2_NOR_BOOT_SIZE);
248 platform_device_register(&mss2_nor_flash);
249
250 platform_device_register(&mss2_button_device);
251
252 if (gpio_request(MSS2_GPIO_RTC_IRQ, "rtc") == 0) {
253 if (gpio_direction_input(MSS2_GPIO_RTC_IRQ) == 0)
254 mss2_i2c_rtc.irq = gpio_to_irq(MSS2_GPIO_RTC_IRQ);
255 else
256 gpio_free(MSS2_GPIO_RTC_IRQ);
257 }
258 i2c_register_board_info(0, &mss2_i2c_rtc, 1);
259
260 /* register mss2 specific power-off method */
261 pm_power_off = mss2_power_off;
262}
263
264MACHINE_START(MSS2, "Maxtor Shared Storage II")
265 /* Maintainer: Sylver Bruneau <sylver.bruneau@googlemail.com> */
266 .atag_offset = 0x100,
267 .init_machine = mss2_init,
268 .map_io = orion5x_map_io,
269 .init_early = orion5x_init_early,
270 .init_irq = orion5x_init_irq,
271 .init_time = orion5x_timer_init,
272 .fixup = tag_fixup_mem32,
273 .restart = orion5x_restart,
274MACHINE_END
diff --git a/arch/arm/mach-prima2/Makefile b/arch/arm/mach-prima2/Makefile
index 7a6b4a323125..8846e7d87ea5 100644
--- a/arch/arm/mach-prima2/Makefile
+++ b/arch/arm/mach-prima2/Makefile
@@ -2,7 +2,6 @@ obj-y += rstc.o
2obj-y += common.o 2obj-y += common.o
3obj-y += rtciobrg.o 3obj-y += rtciobrg.o
4obj-$(CONFIG_DEBUG_LL) += lluart.o 4obj-$(CONFIG_DEBUG_LL) += lluart.o
5obj-$(CONFIG_CACHE_L2X0) += l2x0.o
6obj-$(CONFIG_SUSPEND) += pm.o sleep.o 5obj-$(CONFIG_SUSPEND) += pm.o sleep.o
7obj-$(CONFIG_SMP) += platsmp.o headsmp.o 6obj-$(CONFIG_SMP) += platsmp.o headsmp.o
8obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o 7obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c
index 47c7819edb9b..a860ea27e8ae 100644
--- a/arch/arm/mach-prima2/common.c
+++ b/arch/arm/mach-prima2/common.c
@@ -34,6 +34,8 @@ static const char *atlas6_dt_match[] __initconst = {
34 34
35DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)") 35DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)")
36 /* Maintainer: Barry Song <baohua.song@csr.com> */ 36 /* Maintainer: Barry Song <baohua.song@csr.com> */
37 .l2c_aux_val = 0,
38 .l2c_aux_mask = ~0,
37 .map_io = sirfsoc_map_io, 39 .map_io = sirfsoc_map_io,
38 .init_late = sirfsoc_init_late, 40 .init_late = sirfsoc_init_late,
39 .dt_compat = atlas6_dt_match, 41 .dt_compat = atlas6_dt_match,
@@ -48,6 +50,8 @@ static const char *prima2_dt_match[] __initconst = {
48 50
49DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") 51DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
50 /* Maintainer: Barry Song <baohua.song@csr.com> */ 52 /* Maintainer: Barry Song <baohua.song@csr.com> */
53 .l2c_aux_val = 0,
54 .l2c_aux_mask = ~0,
51 .map_io = sirfsoc_map_io, 55 .map_io = sirfsoc_map_io,
52 .dma_zone_size = SZ_256M, 56 .dma_zone_size = SZ_256M,
53 .init_late = sirfsoc_init_late, 57 .init_late = sirfsoc_init_late,
@@ -63,6 +67,8 @@ static const char *marco_dt_match[] __initconst = {
63 67
64DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)") 68DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)")
65 /* Maintainer: Barry Song <baohua.song@csr.com> */ 69 /* Maintainer: Barry Song <baohua.song@csr.com> */
70 .l2c_aux_val = 0,
71 .l2c_aux_mask = ~0,
66 .smp = smp_ops(sirfsoc_smp_ops), 72 .smp = smp_ops(sirfsoc_smp_ops),
67 .map_io = sirfsoc_map_io, 73 .map_io = sirfsoc_map_io,
68 .init_late = sirfsoc_init_late, 74 .init_late = sirfsoc_init_late,
diff --git a/arch/arm/mach-prima2/l2x0.c b/arch/arm/mach-prima2/l2x0.c
deleted file mode 100644
index c7102539c0b0..000000000000
--- a/arch/arm/mach-prima2/l2x0.c
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * l2 cache initialization for CSR SiRFprimaII
3 *
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5 *
6 * Licensed under GPLv2 or later.
7 */
8
9#include <linux/init.h>
10#include <linux/kernel.h>
11#include <linux/of.h>
12#include <asm/hardware/cache-l2x0.h>
13
14struct l2x0_aux {
15 u32 val;
16 u32 mask;
17};
18
19static const struct l2x0_aux prima2_l2x0_aux __initconst = {
20 .val = 2 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT,
21 .mask = 0,
22};
23
24static const struct l2x0_aux marco_l2x0_aux __initconst = {
25 .val = (2 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT) |
26 (1 << L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT),
27 .mask = L2X0_AUX_CTRL_MASK,
28};
29
30static const struct of_device_id sirf_l2x0_ids[] __initconst = {
31 { .compatible = "sirf,prima2-pl310-cache", .data = &prima2_l2x0_aux, },
32 { .compatible = "sirf,marco-pl310-cache", .data = &marco_l2x0_aux, },
33 {},
34};
35
36static int __init sirfsoc_l2x0_init(void)
37{
38 struct device_node *np;
39 const struct l2x0_aux *aux;
40
41 np = of_find_matching_node(NULL, sirf_l2x0_ids);
42 if (np) {
43 aux = of_match_node(sirf_l2x0_ids, np)->data;
44 return l2x0_of_init(aux->val, aux->mask);
45 }
46
47 return 0;
48}
49early_initcall(sirfsoc_l2x0_init);
diff --git a/arch/arm/mach-prima2/pm.c b/arch/arm/mach-prima2/pm.c
index c4525a88e5da..96e9bc102117 100644
--- a/arch/arm/mach-prima2/pm.c
+++ b/arch/arm/mach-prima2/pm.c
@@ -71,7 +71,6 @@ static int sirfsoc_pm_enter(suspend_state_t state)
71 case PM_SUSPEND_MEM: 71 case PM_SUSPEND_MEM:
72 sirfsoc_pre_suspend_power_off(); 72 sirfsoc_pre_suspend_power_off();
73 73
74 outer_flush_all();
75 outer_disable(); 74 outer_disable();
76 /* go zzz */ 75 /* go zzz */
77 cpu_suspend(0, sirfsoc_finish_suspend); 76 cpu_suspend(0, sirfsoc_finish_suspend);
diff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-prima2/rstc.c
index 4887a2a4c698..3dffcb2d714e 100644
--- a/arch/arm/mach-prima2/rstc.c
+++ b/arch/arm/mach-prima2/rstc.c
@@ -36,27 +36,33 @@ static int sirfsoc_reset_module(struct reset_controller_dev *rcdev,
36 36
37 if (of_device_is_compatible(rcdev->of_node, "sirf,prima2-rstc")) { 37 if (of_device_is_compatible(rcdev->of_node, "sirf,prima2-rstc")) {
38 /* 38 /*
39 * Writing 1 to this bit resets corresponding block. Writing 0 to this 39 * Writing 1 to this bit resets corresponding block.
40 * bit de-asserts reset signal of the corresponding block. 40 * Writing 0 to this bit de-asserts reset signal of the
41 * datasheet doesn't require explicit delay between the set and clear 41 * corresponding block. datasheet doesn't require explicit
42 * of reset bit. it could be shorter if tests pass. 42 * delay between the set and clear of reset bit. it could
43 * be shorter if tests pass.
43 */ 44 */
44 writel(readl(sirfsoc_rstc_base + (reset_bit / 32) * 4) | (1 << reset_bit), 45 writel(readl(sirfsoc_rstc_base +
46 (reset_bit / 32) * 4) | (1 << reset_bit),
45 sirfsoc_rstc_base + (reset_bit / 32) * 4); 47 sirfsoc_rstc_base + (reset_bit / 32) * 4);
46 msleep(10); 48 msleep(20);
47 writel(readl(sirfsoc_rstc_base + (reset_bit / 32) * 4) & ~(1 << reset_bit), 49 writel(readl(sirfsoc_rstc_base +
50 (reset_bit / 32) * 4) & ~(1 << reset_bit),
48 sirfsoc_rstc_base + (reset_bit / 32) * 4); 51 sirfsoc_rstc_base + (reset_bit / 32) * 4);
49 } else { 52 } else {
50 /* 53 /*
51 * For MARCO and POLO 54 * For MARCO and POLO
52 * Writing 1 to SET register resets corresponding block. Writing 1 to CLEAR 55 * Writing 1 to SET register resets corresponding block.
53 * register de-asserts reset signal of the corresponding block. 56 * Writing 1 to CLEAR register de-asserts reset signal of the
54 * datasheet doesn't require explicit delay between the set and clear 57 * corresponding block.
55 * of reset bit. it could be shorter if tests pass. 58 * datasheet doesn't require explicit delay between the set and
59 * clear of reset bit. it could be shorter if tests pass.
56 */ 60 */
57 writel(1 << reset_bit, sirfsoc_rstc_base + (reset_bit / 32) * 8); 61 writel(1 << reset_bit,
58 msleep(10); 62 sirfsoc_rstc_base + (reset_bit / 32) * 8);
59 writel(1 << reset_bit, sirfsoc_rstc_base + (reset_bit / 32) * 8 + 4); 63 msleep(20);
64 writel(1 << reset_bit,
65 sirfsoc_rstc_base + (reset_bit / 32) * 8 + 4);
60 } 66 }
61 67
62 mutex_unlock(&rstc_lock); 68 mutex_unlock(&rstc_lock);
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index 584439bfa59f..4d3588d26c2a 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -837,8 +837,7 @@ static void __init cm_x300_init(void)
837 cm_x300_init_bl(); 837 cm_x300_init_bl();
838} 838}
839 839
840static void __init cm_x300_fixup(struct tag *tags, char **cmdline, 840static void __init cm_x300_fixup(struct tag *tags, char **cmdline)
841 struct meminfo *mi)
842{ 841{
843 /* Make sure that mi->bank[0].start = PHYS_ADDR */ 842 /* Make sure that mi->bank[0].start = PHYS_ADDR */
844 for (; tags->hdr.size; tags = tag_next(tags)) 843 for (; tags->hdr.size; tags = tag_next(tags))
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index 57d60542f982..91dd1c7cdbcd 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -34,6 +34,7 @@
34#include <linux/input/matrix_keypad.h> 34#include <linux/input/matrix_keypad.h>
35#include <linux/gpio_keys.h> 35#include <linux/gpio_keys.h>
36#include <linux/module.h> 36#include <linux/module.h>
37#include <linux/memblock.h>
37#include <video/w100fb.h> 38#include <video/w100fb.h>
38 39
39#include <asm/setup.h> 40#include <asm/setup.h>
@@ -753,16 +754,13 @@ static void __init corgi_init(void)
753 platform_add_devices(devices, ARRAY_SIZE(devices)); 754 platform_add_devices(devices, ARRAY_SIZE(devices));
754} 755}
755 756
756static void __init fixup_corgi(struct tag *tags, char **cmdline, 757static void __init fixup_corgi(struct tag *tags, char **cmdline)
757 struct meminfo *mi)
758{ 758{
759 sharpsl_save_param(); 759 sharpsl_save_param();
760 mi->nr_banks=1;
761 mi->bank[0].start = 0xa0000000;
762 if (machine_is_corgi()) 760 if (machine_is_corgi())
763 mi->bank[0].size = (32*1024*1024); 761 memblock_add(0xa0000000, SZ_32M);
764 else 762 else
765 mi->bank[0].size = (64*1024*1024); 763 memblock_add(0xa0000000, SZ_64M);
766} 764}
767 765
768#ifdef CONFIG_MACH_CORGI 766#ifdef CONFIG_MACH_CORGI
diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c
index 8280ebcaab9f..cfb864173ce3 100644
--- a/arch/arm/mach-pxa/eseries.c
+++ b/arch/arm/mach-pxa/eseries.c
@@ -21,6 +21,7 @@
21#include <linux/mtd/nand.h> 21#include <linux/mtd/nand.h>
22#include <linux/mtd/partitions.h> 22#include <linux/mtd/partitions.h>
23#include <linux/usb/gpio_vbus.h> 23#include <linux/usb/gpio_vbus.h>
24#include <linux/memblock.h>
24 25
25#include <video/w100fb.h> 26#include <video/w100fb.h>
26 27
@@ -41,14 +42,12 @@
41#include "clock.h" 42#include "clock.h"
42 43
43/* Only e800 has 128MB RAM */ 44/* Only e800 has 128MB RAM */
44void __init eseries_fixup(struct tag *tags, char **cmdline, struct meminfo *mi) 45void __init eseries_fixup(struct tag *tags, char **cmdline)
45{ 46{
46 mi->nr_banks=1;
47 mi->bank[0].start = 0xa0000000;
48 if (machine_is_e800()) 47 if (machine_is_e800())
49 mi->bank[0].size = (128*1024*1024); 48 memblock_add(0xa0000000, SZ_128M);
50 else 49 else
51 mi->bank[0].size = (64*1024*1024); 50 memblock_add(0xa0000000, SZ_64M);
52} 51}
53 52
54struct gpio_vbus_mach_info e7xx_udc_info = { 53struct gpio_vbus_mach_info e7xx_udc_info = {
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index aedf053a1de5..131991629116 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -29,6 +29,7 @@
29#include <linux/spi/ads7846.h> 29#include <linux/spi/ads7846.h>
30#include <linux/spi/pxa2xx_spi.h> 30#include <linux/spi/pxa2xx_spi.h>
31#include <linux/mtd/sharpsl.h> 31#include <linux/mtd/sharpsl.h>
32#include <linux/memblock.h>
32 33
33#include <mach/hardware.h> 34#include <mach/hardware.h>
34#include <asm/mach-types.h> 35#include <asm/mach-types.h>
@@ -456,13 +457,10 @@ static void __init poodle_init(void)
456 poodle_init_spi(); 457 poodle_init_spi();
457} 458}
458 459
459static void __init fixup_poodle(struct tag *tags, char **cmdline, 460static void __init fixup_poodle(struct tag *tags, char **cmdline)
460 struct meminfo *mi)
461{ 461{
462 sharpsl_save_param(); 462 sharpsl_save_param();
463 mi->nr_banks=1; 463 memblock_add(0xa0000000, SZ_32M);
464 mi->bank[0].start = 0xa0000000;
465 mi->bank[0].size = (32*1024*1024);
466} 464}
467 465
468MACHINE_START(POODLE, "SHARP Poodle") 466MACHINE_START(POODLE, "SHARP Poodle")
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 0b11c1af51c4..840c3a48e720 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -32,6 +32,7 @@
32#include <linux/io.h> 32#include <linux/io.h>
33#include <linux/module.h> 33#include <linux/module.h>
34#include <linux/reboot.h> 34#include <linux/reboot.h>
35#include <linux/memblock.h>
35 36
36#include <asm/setup.h> 37#include <asm/setup.h>
37#include <asm/mach-types.h> 38#include <asm/mach-types.h>
@@ -971,13 +972,10 @@ static void __init spitz_init(void)
971 spitz_i2c_init(); 972 spitz_i2c_init();
972} 973}
973 974
974static void __init spitz_fixup(struct tag *tags, char **cmdline, 975static void __init spitz_fixup(struct tag *tags, char **cmdline)
975 struct meminfo *mi)
976{ 976{
977 sharpsl_save_param(); 977 sharpsl_save_param();
978 mi->nr_banks = 1; 978 memblock_add(0xa0000000, SZ_64M);
979 mi->bank[0].start = 0xa0000000;
980 mi->bank[0].size = (64*1024*1024);
981} 979}
982 980
983#ifdef CONFIG_MACH_SPITZ 981#ifdef CONFIG_MACH_SPITZ
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index ef5557b807ed..c158a6e3e0aa 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -37,6 +37,7 @@
37#include <linux/i2c/pxa-i2c.h> 37#include <linux/i2c/pxa-i2c.h>
38#include <linux/usb/gpio_vbus.h> 38#include <linux/usb/gpio_vbus.h>
39#include <linux/reboot.h> 39#include <linux/reboot.h>
40#include <linux/memblock.h>
40 41
41#include <asm/setup.h> 42#include <asm/setup.h>
42#include <asm/mach-types.h> 43#include <asm/mach-types.h>
@@ -960,13 +961,10 @@ static void __init tosa_init(void)
960 platform_add_devices(devices, ARRAY_SIZE(devices)); 961 platform_add_devices(devices, ARRAY_SIZE(devices));
961} 962}
962 963
963static void __init fixup_tosa(struct tag *tags, char **cmdline, 964static void __init fixup_tosa(struct tag *tags, char **cmdline)
964 struct meminfo *mi)
965{ 965{
966 sharpsl_save_param(); 966 sharpsl_save_param();
967 mi->nr_banks=1; 967 memblock_add(0xa0000000, SZ_64M);
968 mi->bank[0].start = 0xa0000000;
969 mi->bank[0].size = (64*1024*1024);
970} 968}
971 969
972MACHINE_START(TOSA, "SHARP Tosa") 970MACHINE_START(TOSA, "SHARP Tosa")
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index b19d1c361cab..205f9bf3821e 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -413,7 +413,7 @@ static struct fixed_voltage_config can_regulator_pdata = {
413 413
414static struct platform_device can_regulator_device = { 414static struct platform_device can_regulator_device = {
415 .name = "reg-fixed-volage", 415 .name = "reg-fixed-volage",
416 .id = -1, 416 .id = 0,
417 .dev = { 417 .dev = {
418 .platform_data = &can_regulator_pdata, 418 .platform_data = &can_regulator_pdata,
419 }, 419 },
@@ -510,18 +510,6 @@ struct platform_device zeus_max6369_device = {
510 .num_resources = 1, 510 .num_resources = 1,
511}; 511};
512 512
513static struct platform_device *zeus_devices[] __initdata = {
514 &zeus_serial_device,
515 &zeus_mtd_devices[0],
516 &zeus_dm9k0_device,
517 &zeus_dm9k1_device,
518 &zeus_sram_device,
519 &zeus_leds_device,
520 &zeus_pcmcia_device,
521 &zeus_max6369_device,
522 &can_regulator_device,
523};
524
525/* AC'97 */ 513/* AC'97 */
526static pxa2xx_audio_ops_t zeus_ac97_info = { 514static pxa2xx_audio_ops_t zeus_ac97_info = {
527 .reset_gpio = 95, 515 .reset_gpio = 95,
@@ -532,44 +520,50 @@ static pxa2xx_audio_ops_t zeus_ac97_info = {
532 * USB host 520 * USB host
533 */ 521 */
534 522
535static int zeus_ohci_init(struct device *dev) 523static struct regulator_consumer_supply zeus_ohci_regulator_supplies[] = {
536{ 524 REGULATOR_SUPPLY("vbus2", "pxa27x-ohci"),
537 int err; 525};
538
539 /* Switch on port 2. */
540 if ((err = gpio_request(ZEUS_USB2_PWREN_GPIO, "USB2_PWREN"))) {
541 dev_err(dev, "Can't request USB2_PWREN\n");
542 return err;
543 }
544
545 if ((err = gpio_direction_output(ZEUS_USB2_PWREN_GPIO, 1))) {
546 gpio_free(ZEUS_USB2_PWREN_GPIO);
547 dev_err(dev, "Can't enable USB2_PWREN\n");
548 return err;
549 }
550 526
551 /* Port 2 is shared between host and client interface. */ 527static struct regulator_init_data zeus_ohci_regulator_data = {
552 UP2OCR = UP2OCR_HXOE | UP2OCR_HXS | UP2OCR_DMPDE | UP2OCR_DPPDE; 528 .constraints = {
529 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
530 },
531 .num_consumer_supplies = ARRAY_SIZE(zeus_ohci_regulator_supplies),
532 .consumer_supplies = zeus_ohci_regulator_supplies,
533};
553 534
554 return 0; 535static struct fixed_voltage_config zeus_ohci_regulator_config = {
555} 536 .supply_name = "vbus2",
537 .microvolts = 5000000, /* 5.0V */
538 .gpio = ZEUS_USB2_PWREN_GPIO,
539 .enable_high = 1,
540 .startup_delay = 0,
541 .init_data = &zeus_ohci_regulator_data,
542};
556 543
557static void zeus_ohci_exit(struct device *dev) 544static struct platform_device zeus_ohci_regulator_device = {
558{ 545 .name = "reg-fixed-voltage",
559 /* Power-off port 2 */ 546 .id = 1,
560 gpio_direction_output(ZEUS_USB2_PWREN_GPIO, 0); 547 .dev = {
561 gpio_free(ZEUS_USB2_PWREN_GPIO); 548 .platform_data = &zeus_ohci_regulator_config,
562} 549 },
550};
563 551
564static struct pxaohci_platform_data zeus_ohci_platform_data = { 552static struct pxaohci_platform_data zeus_ohci_platform_data = {
565 .port_mode = PMM_NPS_MODE, 553 .port_mode = PMM_NPS_MODE,
566 /* Clear Power Control Polarity Low and set Power Sense 554 /* Clear Power Control Polarity Low and set Power Sense
567 * Polarity Low. Supply power to USB ports. */ 555 * Polarity Low. Supply power to USB ports. */
568 .flags = ENABLE_PORT_ALL | POWER_SENSE_LOW, 556 .flags = ENABLE_PORT_ALL | POWER_SENSE_LOW,
569 .init = zeus_ohci_init,
570 .exit = zeus_ohci_exit,
571}; 557};
572 558
559static void zeus_register_ohci(void)
560{
561 /* Port 2 is shared between host and client interface. */
562 UP2OCR = UP2OCR_HXOE | UP2OCR_HXS | UP2OCR_DMPDE | UP2OCR_DPPDE;
563
564 pxa_set_ohci_info(&zeus_ohci_platform_data);
565}
566
573/* 567/*
574 * Flat Panel 568 * Flat Panel
575 */ 569 */
@@ -677,6 +671,19 @@ static struct pxa2xx_udc_mach_info zeus_udc_info = {
677 .udc_command = zeus_udc_command, 671 .udc_command = zeus_udc_command,
678}; 672};
679 673
674static struct platform_device *zeus_devices[] __initdata = {
675 &zeus_serial_device,
676 &zeus_mtd_devices[0],
677 &zeus_dm9k0_device,
678 &zeus_dm9k1_device,
679 &zeus_sram_device,
680 &zeus_leds_device,
681 &zeus_pcmcia_device,
682 &zeus_max6369_device,
683 &can_regulator_device,
684 &zeus_ohci_regulator_device,
685};
686
680#ifdef CONFIG_PM 687#ifdef CONFIG_PM
681static void zeus_power_off(void) 688static void zeus_power_off(void)
682{ 689{
@@ -847,7 +854,7 @@ static void __init zeus_init(void)
847 854
848 platform_add_devices(zeus_devices, ARRAY_SIZE(zeus_devices)); 855 platform_add_devices(zeus_devices, ARRAY_SIZE(zeus_devices));
849 856
850 pxa_set_ohci_info(&zeus_ohci_platform_data); 857 zeus_register_ohci();
851 858
852 if (zeus_setup_fb_gpios()) 859 if (zeus_setup_fb_gpios())
853 pr_err("Failed to setup fb gpios\n"); 860 pr_err("Failed to setup fb gpios\n");
diff --git a/arch/arm/mach-qcom/Kconfig b/arch/arm/mach-qcom/Kconfig
index a028be234334..fd2b99dceb89 100644
--- a/arch/arm/mach-qcom/Kconfig
+++ b/arch/arm/mach-qcom/Kconfig
@@ -2,9 +2,9 @@ config ARCH_QCOM
2 bool "Qualcomm Support" if ARCH_MULTI_V7 2 bool "Qualcomm Support" if ARCH_MULTI_V7
3 select ARCH_REQUIRE_GPIOLIB 3 select ARCH_REQUIRE_GPIOLIB
4 select ARM_GIC 4 select ARM_GIC
5 select ARM_AMBA
5 select CLKSRC_OF 6 select CLKSRC_OF
6 select GENERIC_CLOCKEVENTS 7 select PINCTRL
7 select HAVE_SMP
8 select QCOM_SCM if SMP 8 select QCOM_SCM if SMP
9 help 9 help
10 Support for Qualcomm's devicetree based systems. 10 Support for Qualcomm's devicetree based systems.
diff --git a/arch/arm/mach-qcom/board.c b/arch/arm/mach-qcom/board.c
index bae617ef0b31..c437a9941726 100644
--- a/arch/arm/mach-qcom/board.c
+++ b/arch/arm/mach-qcom/board.c
@@ -15,9 +15,11 @@
15#include <asm/mach/arch.h> 15#include <asm/mach/arch.h>
16 16
17static const char * const qcom_dt_match[] __initconst = { 17static const char * const qcom_dt_match[] __initconst = {
18 "qcom,apq8064",
19 "qcom,apq8074-dragonboard",
20 "qcom,apq8084",
18 "qcom,msm8660-surf", 21 "qcom,msm8660-surf",
19 "qcom,msm8960-cdp", 22 "qcom,msm8960-cdp",
20 "qcom,apq8074-dragonboard",
21 NULL 23 NULL
22}; 24};
23 25
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index 1d5ee5c9a1dc..8c1b39a0caa0 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -31,6 +31,7 @@
31#include <linux/amba/mmci.h> 31#include <linux/amba/mmci.h>
32#include <linux/gfp.h> 32#include <linux/gfp.h>
33#include <linux/mtd/physmap.h> 33#include <linux/mtd/physmap.h>
34#include <linux/memblock.h>
34 35
35#include <mach/hardware.h> 36#include <mach/hardware.h>
36#include <asm/irq.h> 37#include <asm/irq.h>
@@ -148,6 +149,21 @@ struct platform_device realview_cf_device = {
148 }, 149 },
149}; 150};
150 151
152static struct resource realview_leds_resources[] = {
153 {
154 .start = REALVIEW_SYS_BASE + REALVIEW_SYS_LED_OFFSET,
155 .end = REALVIEW_SYS_BASE + REALVIEW_SYS_LED_OFFSET + 4,
156 .flags = IORESOURCE_MEM,
157 },
158};
159
160struct platform_device realview_leds_device = {
161 .name = "versatile-leds",
162 .id = -1,
163 .num_resources = ARRAY_SIZE(realview_leds_resources),
164 .resource = realview_leds_resources,
165};
166
151static struct resource realview_i2c_resource = { 167static struct resource realview_i2c_resource = {
152 .start = REALVIEW_I2C_BASE, 168 .start = REALVIEW_I2C_BASE,
153 .end = REALVIEW_I2C_BASE + SZ_4K - 1, 169 .end = REALVIEW_I2C_BASE + SZ_4K - 1,
@@ -370,19 +386,15 @@ void __init realview_timer_init(unsigned int timer_irq)
370/* 386/*
371 * Setup the memory banks. 387 * Setup the memory banks.
372 */ 388 */
373void realview_fixup(struct tag *tags, char **from, struct meminfo *meminfo) 389void realview_fixup(struct tag *tags, char **from)
374{ 390{
375 /* 391 /*
376 * Most RealView platforms have 512MB contiguous RAM at 0x70000000. 392 * Most RealView platforms have 512MB contiguous RAM at 0x70000000.
377 * Half of this is mirrored at 0. 393 * Half of this is mirrored at 0.
378 */ 394 */
379#ifdef CONFIG_REALVIEW_HIGH_PHYS_OFFSET 395#ifdef CONFIG_REALVIEW_HIGH_PHYS_OFFSET
380 meminfo->bank[0].start = 0x70000000; 396 memblock_add(0x70000000, SZ_512M);
381 meminfo->bank[0].size = SZ_512M;
382 meminfo->nr_banks = 1;
383#else 397#else
384 meminfo->bank[0].start = 0; 398 memblock_add(0, SZ_256M);
385 meminfo->bank[0].size = SZ_256M;
386 meminfo->nr_banks = 1;
387#endif 399#endif
388} 400}
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h
index 602ca5ec52c5..868ece221978 100644
--- a/arch/arm/mach-realview/core.h
+++ b/arch/arm/mach-realview/core.h
@@ -37,6 +37,7 @@ struct machine_desc;
37 37
38extern struct platform_device realview_flash_device; 38extern struct platform_device realview_flash_device;
39extern struct platform_device realview_cf_device; 39extern struct platform_device realview_cf_device;
40extern struct platform_device realview_leds_device;
40extern struct platform_device realview_i2c_device; 41extern struct platform_device realview_i2c_device;
41extern struct mmci_platform_data realview_mmc0_plat_data; 42extern struct mmci_platform_data realview_mmc0_plat_data;
42extern struct mmci_platform_data realview_mmc1_plat_data; 43extern struct mmci_platform_data realview_mmc1_plat_data;
@@ -51,8 +52,7 @@ extern int realview_flash_register(struct resource *res, u32 num);
51extern int realview_eth_register(const char *name, struct resource *res); 52extern int realview_eth_register(const char *name, struct resource *res);
52extern int realview_usb_register(struct resource *res); 53extern int realview_usb_register(struct resource *res);
53extern void realview_init_early(void); 54extern void realview_init_early(void);
54extern void realview_fixup(struct tag *tags, char **from, 55extern void realview_fixup(struct tag *tags, char **from);
55 struct meminfo *meminfo);
56 56
57extern struct smp_operations realview_smp_ops; 57extern struct smp_operations realview_smp_ops;
58extern void realview_cpu_die(unsigned int cpu); 58extern void realview_cpu_die(unsigned int cpu);
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index c85ddb2a0ad0..739d4f113097 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -442,8 +442,13 @@ static void __init realview_eb_init(void)
442 realview_eb11mp_fixup(); 442 realview_eb11mp_fixup();
443 443
444#ifdef CONFIG_CACHE_L2X0 444#ifdef CONFIG_CACHE_L2X0
445 /* 1MB (128KB/way), 8-way associativity, evmon/parity/share enabled 445 /*
446 * Bits: .... ...0 0111 1001 0000 .... .... .... */ 446 * The PL220 needs to be manually configured as the hardware
447 * doesn't report the correct sizes.
448 * 1MB (128KB/way), 8-way associativity, event monitor and
449 * parity enabled, ignore share bit, no force write allocate
450 * Bits: .... ...0 0111 1001 0000 .... .... ....
451 */
447 l2x0_init(__io_address(REALVIEW_EB11MP_L220_BASE), 0x00790000, 0xfe000fff); 452 l2x0_init(__io_address(REALVIEW_EB11MP_L220_BASE), 0x00790000, 0xfe000fff);
448#endif 453#endif
449 platform_device_register(&pmu_device); 454 platform_device_register(&pmu_device);
@@ -452,6 +457,7 @@ static void __init realview_eb_init(void)
452 realview_flash_register(&realview_eb_flash_resource, 1); 457 realview_flash_register(&realview_eb_flash_resource, 1);
453 platform_device_register(&realview_i2c_device); 458 platform_device_register(&realview_i2c_device);
454 platform_device_register(&char_lcd_device); 459 platform_device_register(&char_lcd_device);
460 platform_device_register(&realview_leds_device);
455 eth_device_register(); 461 eth_device_register();
456 realview_usb_register(realview_eb_isp1761_resources); 462 realview_usb_register(realview_eb_isp1761_resources);
457 463
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c
index c5eade76461b..b0e0dcaed944 100644
--- a/arch/arm/mach-realview/realview_pb1176.c
+++ b/arch/arm/mach-realview/realview_pb1176.c
@@ -32,6 +32,7 @@
32#include <linux/irqchip/arm-gic.h> 32#include <linux/irqchip/arm-gic.h>
33#include <linux/platform_data/clk-realview.h> 33#include <linux/platform_data/clk-realview.h>
34#include <linux/reboot.h> 34#include <linux/reboot.h>
35#include <linux/memblock.h>
35 36
36#include <mach/hardware.h> 37#include <mach/hardware.h>
37#include <asm/irq.h> 38#include <asm/irq.h>
@@ -339,15 +340,12 @@ static void realview_pb1176_restart(enum reboot_mode mode, const char *cmd)
339 dsb(); 340 dsb();
340} 341}
341 342
342static void realview_pb1176_fixup(struct tag *tags, char **from, 343static void realview_pb1176_fixup(struct tag *tags, char **from)
343 struct meminfo *meminfo)
344{ 344{
345 /* 345 /*
346 * RealView PB1176 only has 128MB of RAM mapped at 0. 346 * RealView PB1176 only has 128MB of RAM mapped at 0.
347 */ 347 */
348 meminfo->bank[0].start = 0; 348 memblock_add(0, SZ_128M);
349 meminfo->bank[0].size = SZ_128M;
350 meminfo->nr_banks = 1;
351} 349}
352 350
353static void __init realview_pb1176_init(void) 351static void __init realview_pb1176_init(void)
@@ -355,7 +353,13 @@ static void __init realview_pb1176_init(void)
355 int i; 353 int i;
356 354
357#ifdef CONFIG_CACHE_L2X0 355#ifdef CONFIG_CACHE_L2X0
358 /* 128Kb (16Kb/way) 8-way associativity. evmon/parity/share enabled. */ 356 /*
357 * The PL220 needs to be manually configured as the hardware
358 * doesn't report the correct sizes.
359 * 128kB (16kB/way), 8-way associativity, event monitor and
360 * parity enabled, ignore share bit, no force write allocate
361 * Bits: .... ...0 0111 0011 0000 .... .... ....
362 */
359 l2x0_init(__io_address(REALVIEW_PB1176_L220_BASE), 0x00730000, 0xfe000fff); 363 l2x0_init(__io_address(REALVIEW_PB1176_L220_BASE), 0x00730000, 0xfe000fff);
360#endif 364#endif
361 365
@@ -367,6 +371,7 @@ static void __init realview_pb1176_init(void)
367 realview_usb_register(realview_pb1176_isp1761_resources); 371 realview_usb_register(realview_pb1176_isp1761_resources);
368 platform_device_register(&pmu_device); 372 platform_device_register(&pmu_device);
369 platform_device_register(&char_lcd_device); 373 platform_device_register(&char_lcd_device);
374 platform_device_register(&realview_leds_device);
370 375
371 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { 376 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
372 struct amba_device *d = amba_devs[i]; 377 struct amba_device *d = amba_devs[i];
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c
index f4b0962578fe..47bf55fdbf27 100644
--- a/arch/arm/mach-realview/realview_pb11mp.c
+++ b/arch/arm/mach-realview/realview_pb11mp.c
@@ -337,8 +337,13 @@ static void __init realview_pb11mp_init(void)
337 int i; 337 int i;
338 338
339#ifdef CONFIG_CACHE_L2X0 339#ifdef CONFIG_CACHE_L2X0
340 /* 1MB (128KB/way), 8-way associativity, evmon/parity/share enabled 340 /*
341 * Bits: .... ...0 0111 1001 0000 .... .... .... */ 341 * The PL220 needs to be manually configured as the hardware
342 * doesn't report the correct sizes.
343 * 1MB (128KB/way), 8-way associativity, event monitor and
344 * parity enabled, ignore share bit, no force write allocate
345 * Bits: .... ...0 0111 1001 0000 .... .... ....
346 */
342 l2x0_init(__io_address(REALVIEW_TC11MP_L220_BASE), 0x00790000, 0xfe000fff); 347 l2x0_init(__io_address(REALVIEW_TC11MP_L220_BASE), 0x00790000, 0xfe000fff);
343#endif 348#endif
344 349
@@ -347,6 +352,7 @@ static void __init realview_pb11mp_init(void)
347 realview_eth_register(NULL, realview_pb11mp_smsc911x_resources); 352 realview_eth_register(NULL, realview_pb11mp_smsc911x_resources);
348 platform_device_register(&realview_i2c_device); 353 platform_device_register(&realview_i2c_device);
349 platform_device_register(&realview_cf_device); 354 platform_device_register(&realview_cf_device);
355 platform_device_register(&realview_leds_device);
350 realview_usb_register(realview_pb11mp_isp1761_resources); 356 realview_usb_register(realview_pb11mp_isp1761_resources);
351 platform_device_register(&pmu_device); 357 platform_device_register(&pmu_device);
352 358
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c
index 10a3e1d76891..4e57a8599265 100644
--- a/arch/arm/mach-realview/realview_pba8.c
+++ b/arch/arm/mach-realview/realview_pba8.c
@@ -289,6 +289,7 @@ static void __init realview_pba8_init(void)
289 realview_eth_register(NULL, realview_pba8_smsc911x_resources); 289 realview_eth_register(NULL, realview_pba8_smsc911x_resources);
290 platform_device_register(&realview_i2c_device); 290 platform_device_register(&realview_i2c_device);
291 platform_device_register(&realview_cf_device); 291 platform_device_register(&realview_cf_device);
292 platform_device_register(&realview_leds_device);
292 realview_usb_register(realview_pba8_isp1761_resources); 293 realview_usb_register(realview_pba8_isp1761_resources);
293 platform_device_register(&pmu_device); 294 platform_device_register(&pmu_device);
294 295
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index 9d75493e3f0c..d89eb4023467 100644
--- a/arch/arm/mach-realview/realview_pbx.c
+++ b/arch/arm/mach-realview/realview_pbx.c
@@ -29,6 +29,7 @@
29#include <linux/irqchip/arm-gic.h> 29#include <linux/irqchip/arm-gic.h>
30#include <linux/platform_data/clk-realview.h> 30#include <linux/platform_data/clk-realview.h>
31#include <linux/reboot.h> 31#include <linux/reboot.h>
32#include <linux/memblock.h>
32 33
33#include <asm/irq.h> 34#include <asm/irq.h>
34#include <asm/mach-types.h> 35#include <asm/mach-types.h>
@@ -325,23 +326,19 @@ static void __init realview_pbx_timer_init(void)
325 realview_pbx_twd_init(); 326 realview_pbx_twd_init();
326} 327}
327 328
328static void realview_pbx_fixup(struct tag *tags, char **from, 329static void realview_pbx_fixup(struct tag *tags, char **from)
329 struct meminfo *meminfo)
330{ 330{
331#ifdef CONFIG_SPARSEMEM 331#ifdef CONFIG_SPARSEMEM
332 /* 332 /*
333 * Memory configuration with SPARSEMEM enabled on RealView PBX (see 333 * Memory configuration with SPARSEMEM enabled on RealView PBX (see
334 * asm/mach/memory.h for more information). 334 * asm/mach/memory.h for more information).
335 */ 335 */
336 meminfo->bank[0].start = 0; 336
337 meminfo->bank[0].size = SZ_256M; 337 memblock_add(0, SZ_256M);
338 meminfo->bank[1].start = 0x20000000; 338 memblock_add(0x20000000, SZ_512M);
339 meminfo->bank[1].size = SZ_512M; 339 memblock_add(0x80000000, SZ_256M);
340 meminfo->bank[2].start = 0x80000000;
341 meminfo->bank[2].size = SZ_256M;
342 meminfo->nr_banks = 3;
343#else 340#else
344 realview_fixup(tags, from, meminfo); 341 realview_fixup(tags, from);
345#endif 342#endif
346} 343}
347 344
@@ -370,8 +367,8 @@ static void __init realview_pbx_init(void)
370 __io_address(REALVIEW_PBX_TILE_L220_BASE); 367 __io_address(REALVIEW_PBX_TILE_L220_BASE);
371 368
372 /* set RAM latencies to 1 cycle for eASIC */ 369 /* set RAM latencies to 1 cycle for eASIC */
373 writel(0, l2x0_base + L2X0_TAG_LATENCY_CTRL); 370 writel(0, l2x0_base + L310_TAG_LATENCY_CTRL);
374 writel(0, l2x0_base + L2X0_DATA_LATENCY_CTRL); 371 writel(0, l2x0_base + L310_DATA_LATENCY_CTRL);
375 372
376 /* 16KB way size, 8-way associativity, parity disabled 373 /* 16KB way size, 8-way associativity, parity disabled
377 * Bits: .. 0 0 0 0 1 00 1 0 1 001 0 000 0 .... .... .... */ 374 * Bits: .. 0 0 0 0 1 00 1 0 1 001 0 000 0 .... .... .... */
@@ -385,6 +382,7 @@ static void __init realview_pbx_init(void)
385 realview_eth_register(NULL, realview_pbx_smsc911x_resources); 382 realview_eth_register(NULL, realview_pbx_smsc911x_resources);
386 platform_device_register(&realview_i2c_device); 383 platform_device_register(&realview_i2c_device);
387 platform_device_register(&realview_cf_device); 384 platform_device_register(&realview_cf_device);
385 platform_device_register(&realview_leds_device);
388 realview_usb_register(realview_pbx_isp1761_resources); 386 realview_usb_register(realview_pbx_isp1761_resources);
389 387
390 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { 388 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
diff --git a/arch/arm/mach-rockchip/core.h b/arch/arm/mach-rockchip/core.h
index e2e7c9dbb200..39bca96b555a 100644
--- a/arch/arm/mach-rockchip/core.h
+++ b/arch/arm/mach-rockchip/core.h
@@ -18,5 +18,3 @@ extern char rockchip_secondary_trampoline_end;
18 18
19extern unsigned long rockchip_boot_fn; 19extern unsigned long rockchip_boot_fn;
20extern void rockchip_secondary_startup(void); 20extern void rockchip_secondary_startup(void);
21
22extern struct smp_operations rockchip_smp_ops;
diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c
index 072842f6491b..910835d4ccf4 100644
--- a/arch/arm/mach-rockchip/platsmp.c
+++ b/arch/arm/mach-rockchip/platsmp.c
@@ -178,7 +178,8 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)
178 pmu_set_power_domain(0 + i, false); 178 pmu_set_power_domain(0 + i, false);
179} 179}
180 180
181struct smp_operations rockchip_smp_ops __initdata = { 181static struct smp_operations rockchip_smp_ops __initdata = {
182 .smp_prepare_cpus = rockchip_smp_prepare_cpus, 182 .smp_prepare_cpus = rockchip_smp_prepare_cpus,
183 .smp_boot_secondary = rockchip_boot_secondary, 183 .smp_boot_secondary = rockchip_boot_secondary,
184}; 184};
185CPU_METHOD_OF_DECLARE(rk3066_smp, "rockchip,rk3066-smp", &rockchip_smp_ops);
diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c
index d211d6fa0d98..968cc348e624 100644
--- a/arch/arm/mach-rockchip/rockchip.c
+++ b/arch/arm/mach-rockchip/rockchip.c
@@ -24,12 +24,6 @@
24#include <asm/hardware/cache-l2x0.h> 24#include <asm/hardware/cache-l2x0.h>
25#include "core.h" 25#include "core.h"
26 26
27static void __init rockchip_dt_init(void)
28{
29 l2x0_of_init(0, ~0UL);
30 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
31}
32
33static const char * const rockchip_board_dt_compat[] = { 27static const char * const rockchip_board_dt_compat[] = {
34 "rockchip,rk2928", 28 "rockchip,rk2928",
35 "rockchip,rk3066a", 29 "rockchip,rk3066a",
@@ -39,7 +33,7 @@ static const char * const rockchip_board_dt_compat[] = {
39}; 33};
40 34
41DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)") 35DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)")
42 .smp = smp_ops(rockchip_smp_ops), 36 .l2c_aux_val = 0,
43 .init_machine = rockchip_dt_init, 37 .l2c_aux_mask = ~0,
44 .dt_compat = rockchip_board_dt_compat, 38 .dt_compat = rockchip_board_dt_compat,
45MACHINE_END 39MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index 40cf50b9940c..04284de7aca5 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -18,6 +18,8 @@ config PLAT_S3C24XX
18 help 18 help
19 Base platform code for any Samsung S3C24XX device 19 Base platform code for any Samsung S3C24XX device
20 20
21
22
21menu "SAMSUNG S3C24XX SoCs Support" 23menu "SAMSUNG S3C24XX SoCs Support"
22 24
23comment "S3C24XX SoCs" 25comment "S3C24XX SoCs"
@@ -26,8 +28,7 @@ config CPU_S3C2410
26 bool "SAMSUNG S3C2410" 28 bool "SAMSUNG S3C2410"
27 default y 29 default y
28 select CPU_ARM920T 30 select CPU_ARM920T
29 select CPU_LLSERIAL_S3C2410 31 select S3C2410_COMMON_CLK
30 select S3C2410_CLOCK
31 select S3C2410_DMA if S3C24XX_DMA 32 select S3C2410_DMA if S3C24XX_DMA
32 select ARM_S3C2410_CPUFREQ if ARM_S3C24XX_CPUFREQ 33 select ARM_S3C2410_CPUFREQ if ARM_S3C24XX_CPUFREQ
33 select S3C2410_PM if PM 34 select S3C2410_PM if PM
@@ -39,7 +40,7 @@ config CPU_S3C2410
39config CPU_S3C2412 40config CPU_S3C2412
40 bool "SAMSUNG S3C2412" 41 bool "SAMSUNG S3C2412"
41 select CPU_ARM926T 42 select CPU_ARM926T
42 select CPU_LLSERIAL_S3C2440 43 select S3C2412_COMMON_CLK
43 select S3C2412_DMA if S3C24XX_DMA 44 select S3C2412_DMA if S3C24XX_DMA
44 select S3C2412_PM if PM 45 select S3C2412_PM if PM
45 help 46 help
@@ -48,19 +49,16 @@ config CPU_S3C2412
48config CPU_S3C2416 49config CPU_S3C2416
49 bool "SAMSUNG S3C2416/S3C2450" 50 bool "SAMSUNG S3C2416/S3C2450"
50 select CPU_ARM926T 51 select CPU_ARM926T
51 select CPU_LLSERIAL_S3C2440
52 select S3C2416_PM if PM 52 select S3C2416_PM if PM
53 select S3C2443_COMMON 53 select S3C2443_COMMON_CLK
54 select S3C2443_DMA if S3C24XX_DMA 54 select S3C2443_DMA if S3C24XX_DMA
55 select SAMSUNG_CLKSRC
56 help 55 help
57 Support for the S3C2416 SoC from the S3C24XX line 56 Support for the S3C2416 SoC from the S3C24XX line
58 57
59config CPU_S3C2440 58config CPU_S3C2440
60 bool "SAMSUNG S3C2440" 59 bool "SAMSUNG S3C2440"
61 select CPU_ARM920T 60 select CPU_ARM920T
62 select CPU_LLSERIAL_S3C2440 61 select S3C2410_COMMON_CLK
63 select S3C2410_CLOCK
64 select S3C2410_PM if PM 62 select S3C2410_PM if PM
65 select S3C2440_DMA if S3C24XX_DMA 63 select S3C2440_DMA if S3C24XX_DMA
66 help 64 help
@@ -69,8 +67,7 @@ config CPU_S3C2440
69config CPU_S3C2442 67config CPU_S3C2442
70 bool "SAMSUNG S3C2442" 68 bool "SAMSUNG S3C2442"
71 select CPU_ARM920T 69 select CPU_ARM920T
72 select CPU_LLSERIAL_S3C2440 70 select S3C2410_COMMON_CLK
73 select S3C2410_CLOCK
74 select S3C2410_DMA if S3C24XX_DMA 71 select S3C2410_DMA if S3C24XX_DMA
75 select S3C2410_PM if PM 72 select S3C2410_PM if PM
76 help 73 help
@@ -84,26 +81,13 @@ config CPU_S3C244X
84config CPU_S3C2443 81config CPU_S3C2443
85 bool "SAMSUNG S3C2443" 82 bool "SAMSUNG S3C2443"
86 select CPU_ARM920T 83 select CPU_ARM920T
87 select CPU_LLSERIAL_S3C2440 84 select S3C2443_COMMON_CLK
88 select S3C2443_COMMON
89 select S3C2443_DMA if S3C24XX_DMA 85 select S3C2443_DMA if S3C24XX_DMA
90 select SAMSUNG_CLKSRC
91 help 86 help
92 Support for the S3C2443 SoC from the S3C24XX line 87 Support for the S3C2443 SoC from the S3C24XX line
93 88
94# common code 89# common code
95 90
96config S3C2410_CLOCK
97 bool
98 help
99 Clock code for the S3C2410, and similar processors which
100 is currently includes the S3C2410, S3C2440, S3C2442.
101
102config S3C24XX_DCLK
103 bool
104 help
105 Clock code for supporting DCLK/CLKOUT on S3C24XX architectures
106
107config S3C24XX_SMDK 91config S3C24XX_SMDK
108 bool 92 bool
109 help 93 help
@@ -158,28 +142,6 @@ config S3C2410_PM
158 help 142 help
159 Power Management code common to S3C2410 and better 143 Power Management code common to S3C2410 and better
160 144
161# low-level serial option nodes
162
163config CPU_LLSERIAL_S3C2410_ONLY
164 bool
165 default y if CPU_LLSERIAL_S3C2410 && !CPU_LLSERIAL_S3C2440
166
167config CPU_LLSERIAL_S3C2440_ONLY
168 bool
169 default y if CPU_LLSERIAL_S3C2440 && !CPU_LLSERIAL_S3C2410
170
171config CPU_LLSERIAL_S3C2410
172 bool
173 help
174 Selected if there is an S3C2410 (or register compatible) serial
175 low-level implementation needed
176
177config CPU_LLSERIAL_S3C2440
178 bool
179 help
180 Selected if there is an S3C2440 (or register compatible) serial
181 low-level implementation needed
182
183config S3C24XX_PLL 145config S3C24XX_PLL
184 bool "Support CPUfreq changing of PLL frequency (EXPERIMENTAL)" 146 bool "Support CPUfreq changing of PLL frequency (EXPERIMENTAL)"
185 depends on ARM_S3C24XX_CPUFREQ 147 depends on ARM_S3C24XX_CPUFREQ
@@ -258,8 +220,8 @@ config ARCH_BAST
258 bool "Simtec Electronics BAST (EB2410ITX)" 220 bool "Simtec Electronics BAST (EB2410ITX)"
259 select ISA 221 select ISA
260 select MACH_BAST_IDE 222 select MACH_BAST_IDE
223 select S3C2410_COMMON_DCLK
261 select S3C2410_IOTIMING if ARM_S3C2410_CPUFREQ 224 select S3C2410_IOTIMING if ARM_S3C2410_CPUFREQ
262 select S3C24XX_DCLK
263 select S3C24XX_SIMTEC_NOR 225 select S3C24XX_SIMTEC_NOR
264 select S3C24XX_SIMTEC_PM if PM 226 select S3C24XX_SIMTEC_PM if PM
265 select S3C24XX_SIMTEC_USB 227 select S3C24XX_SIMTEC_USB
@@ -340,7 +302,7 @@ config MACH_TCT_HAMMER
340config MACH_VR1000 302config MACH_VR1000
341 bool "Thorcom VR1000" 303 bool "Thorcom VR1000"
342 select MACH_BAST_IDE 304 select MACH_BAST_IDE
343 select S3C24XX_DCLK 305 select S3C2410_COMMON_DCLK
344 select S3C24XX_SIMTEC_NOR 306 select S3C24XX_SIMTEC_NOR
345 select S3C24XX_SIMTEC_PM if PM 307 select S3C24XX_SIMTEC_PM if PM
346 select S3C24XX_SIMTEC_USB 308 select S3C24XX_SIMTEC_USB
@@ -519,8 +481,8 @@ comment "S3C2440 Boards"
519config MACH_ANUBIS 481config MACH_ANUBIS
520 bool "Simtec Electronics ANUBIS" 482 bool "Simtec Electronics ANUBIS"
521 select HAVE_PATA_PLATFORM 483 select HAVE_PATA_PLATFORM
484 select S3C2410_COMMON_DCLK
522 select S3C2440_XTAL_12000000 485 select S3C2440_XTAL_12000000
523 select S3C24XX_DCLK
524 select S3C24XX_SIMTEC_PM if PM 486 select S3C24XX_SIMTEC_PM if PM
525 select S3C_DEV_USB_HOST 487 select S3C_DEV_USB_HOST
526 help 488 help
@@ -558,9 +520,9 @@ config MACH_NEXCODER_2440
558 520
559config MACH_OSIRIS 521config MACH_OSIRIS
560 bool "Simtec IM2440D20 (OSIRIS) module" 522 bool "Simtec IM2440D20 (OSIRIS) module"
523 select S3C2410_COMMON_DCLK
561 select S3C2410_IOTIMING if ARM_S3C2440_CPUFREQ 524 select S3C2410_IOTIMING if ARM_S3C2440_CPUFREQ
562 select S3C2440_XTAL_12000000 525 select S3C2440_XTAL_12000000
563 select S3C24XX_DCLK
564 select S3C24XX_SIMTEC_PM if PM 526 select S3C24XX_SIMTEC_PM if PM
565 select S3C_DEV_NAND 527 select S3C_DEV_NAND
566 select S3C_DEV_USB_HOST 528 select S3C_DEV_USB_HOST
@@ -629,9 +591,9 @@ config MACH_RX1950
629 bool "HP iPAQ rx1950" 591 bool "HP iPAQ rx1950"
630 select I2C 592 select I2C
631 select PM_H1940 if PM 593 select PM_H1940 if PM
594 select S3C2410_COMMON_DCLK
632 select S3C2410_IOTIMING if ARM_S3C2440_CPUFREQ 595 select S3C2410_IOTIMING if ARM_S3C2440_CPUFREQ
633 select S3C2440_XTAL_16934400 596 select S3C2440_XTAL_16934400
634 select S3C24XX_DCLK
635 select S3C24XX_PWM 597 select S3C24XX_PWM
636 select S3C_DEV_NAND 598 select S3C_DEV_NAND
637 help 599 help
@@ -641,12 +603,6 @@ endif # CPU_S3C2442
641 603
642if CPU_S3C2443 || CPU_S3C2416 604if CPU_S3C2443 || CPU_S3C2416
643 605
644config S3C2443_COMMON
645 bool
646 help
647 Common code for the S3C2443 and similar processors, which includes
648 the S3C2416 and S3C2450.
649
650config S3C2443_DMA 606config S3C2443_DMA
651 bool 607 bool
652 help 608 help
diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile
index 7f54e5b954ca..2235d0d3b38d 100644
--- a/arch/arm/mach-s3c24xx/Makefile
+++ b/arch/arm/mach-s3c24xx/Makefile
@@ -21,22 +21,22 @@ obj-$(CONFIG_S3C2410_DMA) += dma-s3c2410.o
21obj-$(CONFIG_S3C2410_PLL) += pll-s3c2410.o 21obj-$(CONFIG_S3C2410_PLL) += pll-s3c2410.o
22obj-$(CONFIG_S3C2410_PM) += pm-s3c2410.o sleep-s3c2410.o 22obj-$(CONFIG_S3C2410_PM) += pm-s3c2410.o sleep-s3c2410.o
23 23
24obj-$(CONFIG_CPU_S3C2412) += s3c2412.o clock-s3c2412.o 24obj-$(CONFIG_CPU_S3C2412) += s3c2412.o
25obj-$(CONFIG_S3C2412_DMA) += dma-s3c2412.o 25obj-$(CONFIG_S3C2412_DMA) += dma-s3c2412.o
26obj-$(CONFIG_S3C2412_PM) += pm-s3c2412.o 26obj-$(CONFIG_S3C2412_PM) += pm-s3c2412.o
27obj-$(CONFIG_S3C2412_PM_SLEEP) += sleep-s3c2412.o 27obj-$(CONFIG_S3C2412_PM_SLEEP) += sleep-s3c2412.o
28 28
29obj-$(CONFIG_CPU_S3C2416) += s3c2416.o clock-s3c2416.o 29obj-$(CONFIG_CPU_S3C2416) += s3c2416.o
30obj-$(CONFIG_S3C2416_PM) += pm-s3c2416.o 30obj-$(CONFIG_S3C2416_PM) += pm-s3c2416.o
31 31
32obj-$(CONFIG_CPU_S3C2440) += s3c2440.o clock-s3c2440.o 32obj-$(CONFIG_CPU_S3C2440) += s3c2440.o
33obj-$(CONFIG_CPU_S3C2442) += s3c2442.o 33obj-$(CONFIG_CPU_S3C2442) += s3c2442.o
34obj-$(CONFIG_CPU_S3C244X) += s3c244x.o clock-s3c244x.o 34obj-$(CONFIG_CPU_S3C244X) += s3c244x.o
35obj-$(CONFIG_S3C2440_DMA) += dma-s3c2440.o 35obj-$(CONFIG_S3C2440_DMA) += dma-s3c2440.o
36obj-$(CONFIG_S3C2440_PLL_12000000) += pll-s3c2440-12000000.o 36obj-$(CONFIG_S3C2440_PLL_12000000) += pll-s3c2440-12000000.o
37obj-$(CONFIG_S3C2440_PLL_16934400) += pll-s3c2440-16934400.o 37obj-$(CONFIG_S3C2440_PLL_16934400) += pll-s3c2440-16934400.o
38 38
39obj-$(CONFIG_CPU_S3C2443) += s3c2443.o clock-s3c2443.o 39obj-$(CONFIG_CPU_S3C2443) += s3c2443.o
40 40
41# PM 41# PM
42 42
@@ -44,16 +44,13 @@ obj-$(CONFIG_PM) += pm.o irq-pm.o sleep.o
44 44
45# common code 45# common code
46 46
47obj-$(CONFIG_S3C24XX_DCLK) += clock-dclk.o
48obj-$(CONFIG_S3C24XX_DMA) += dma.o 47obj-$(CONFIG_S3C24XX_DMA) += dma.o
49 48
50obj-$(CONFIG_S3C2410_CLOCK) += clock-s3c2410.o
51obj-$(CONFIG_S3C2410_CPUFREQ_UTILS) += cpufreq-utils.o 49obj-$(CONFIG_S3C2410_CPUFREQ_UTILS) += cpufreq-utils.o
52 50
53obj-$(CONFIG_S3C2410_IOTIMING) += iotiming-s3c2410.o 51obj-$(CONFIG_S3C2410_IOTIMING) += iotiming-s3c2410.o
54obj-$(CONFIG_S3C2412_IOTIMING) += iotiming-s3c2412.o 52obj-$(CONFIG_S3C2412_IOTIMING) += iotiming-s3c2412.o
55 53
56obj-$(CONFIG_S3C2443_COMMON) += common-s3c2443.o
57obj-$(CONFIG_S3C2443_DMA) += dma-s3c2443.o 54obj-$(CONFIG_S3C2443_DMA) += dma-s3c2443.o
58 55
59# 56#
diff --git a/arch/arm/mach-s3c24xx/clock-dclk.c b/arch/arm/mach-s3c24xx/clock-dclk.c
deleted file mode 100644
index 1edd9b2369c5..000000000000
--- a/arch/arm/mach-s3c24xx/clock-dclk.c
+++ /dev/null
@@ -1,195 +0,0 @@
1/*
2 * Copyright (c) 2004-2008 Simtec Electronics
3 * Ben Dooks <ben@simtec.co.uk>
4 * http://armlinux.simtec.co.uk/
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 * S3C24XX - definitions for DCLK and CLKOUT registers
11 */
12
13#include <linux/kernel.h>
14#include <linux/errno.h>
15#include <linux/clk.h>
16#include <linux/io.h>
17
18#include <mach/regs-clock.h>
19#include <mach/regs-gpio.h>
20
21#include <plat/clock.h>
22#include <plat/cpu.h>
23
24/* clocks that could be registered by external code */
25
26static int s3c24xx_dclk_enable(struct clk *clk, int enable)
27{
28 unsigned long dclkcon = __raw_readl(S3C24XX_DCLKCON);
29
30 if (enable)
31 dclkcon |= clk->ctrlbit;
32 else
33 dclkcon &= ~clk->ctrlbit;
34
35 __raw_writel(dclkcon, S3C24XX_DCLKCON);
36
37 return 0;
38}
39
40static int s3c24xx_dclk_setparent(struct clk *clk, struct clk *parent)
41{
42 unsigned long dclkcon;
43 unsigned int uclk;
44
45 if (parent == &clk_upll)
46 uclk = 1;
47 else if (parent == &clk_p)
48 uclk = 0;
49 else
50 return -EINVAL;
51
52 clk->parent = parent;
53
54 dclkcon = __raw_readl(S3C24XX_DCLKCON);
55
56 if (clk->ctrlbit == S3C2410_DCLKCON_DCLK0EN) {
57 if (uclk)
58 dclkcon |= S3C2410_DCLKCON_DCLK0_UCLK;
59 else
60 dclkcon &= ~S3C2410_DCLKCON_DCLK0_UCLK;
61 } else {
62 if (uclk)
63 dclkcon |= S3C2410_DCLKCON_DCLK1_UCLK;
64 else
65 dclkcon &= ~S3C2410_DCLKCON_DCLK1_UCLK;
66 }
67
68 __raw_writel(dclkcon, S3C24XX_DCLKCON);
69
70 return 0;
71}
72static unsigned long s3c24xx_calc_div(struct clk *clk, unsigned long rate)
73{
74 unsigned long div;
75
76 if ((rate == 0) || !clk->parent)
77 return 0;
78
79 div = clk_get_rate(clk->parent) / rate;
80 if (div < 2)
81 div = 2;
82 else if (div > 16)
83 div = 16;
84
85 return div;
86}
87
88static unsigned long s3c24xx_round_dclk_rate(struct clk *clk,
89 unsigned long rate)
90{
91 unsigned long div = s3c24xx_calc_div(clk, rate);
92
93 if (div == 0)
94 return 0;
95
96 return clk_get_rate(clk->parent) / div;
97}
98
99static int s3c24xx_set_dclk_rate(struct clk *clk, unsigned long rate)
100{
101 unsigned long mask, data, div = s3c24xx_calc_div(clk, rate);
102
103 if (div == 0)
104 return -EINVAL;
105
106 if (clk == &s3c24xx_dclk0) {
107 mask = S3C2410_DCLKCON_DCLK0_DIV_MASK |
108 S3C2410_DCLKCON_DCLK0_CMP_MASK;
109 data = S3C2410_DCLKCON_DCLK0_DIV(div) |
110 S3C2410_DCLKCON_DCLK0_CMP((div + 1) / 2);
111 } else if (clk == &s3c24xx_dclk1) {
112 mask = S3C2410_DCLKCON_DCLK1_DIV_MASK |
113 S3C2410_DCLKCON_DCLK1_CMP_MASK;
114 data = S3C2410_DCLKCON_DCLK1_DIV(div) |
115 S3C2410_DCLKCON_DCLK1_CMP((div + 1) / 2);
116 } else
117 return -EINVAL;
118
119 clk->rate = clk_get_rate(clk->parent) / div;
120 __raw_writel(((__raw_readl(S3C24XX_DCLKCON) & ~mask) | data),
121 S3C24XX_DCLKCON);
122 return clk->rate;
123}
124static int s3c24xx_clkout_setparent(struct clk *clk, struct clk *parent)
125{
126 unsigned long mask;
127 unsigned long source;
128
129 /* calculate the MISCCR setting for the clock */
130
131 if (parent == &clk_mpll)
132 source = S3C2410_MISCCR_CLK0_MPLL;
133 else if (parent == &clk_upll)
134 source = S3C2410_MISCCR_CLK0_UPLL;
135 else if (parent == &clk_f)
136 source = S3C2410_MISCCR_CLK0_FCLK;
137 else if (parent == &clk_h)
138 source = S3C2410_MISCCR_CLK0_HCLK;
139 else if (parent == &clk_p)
140 source = S3C2410_MISCCR_CLK0_PCLK;
141 else if (clk == &s3c24xx_clkout0 && parent == &s3c24xx_dclk0)
142 source = S3C2410_MISCCR_CLK0_DCLK0;
143 else if (clk == &s3c24xx_clkout1 && parent == &s3c24xx_dclk1)
144 source = S3C2410_MISCCR_CLK0_DCLK0;
145 else
146 return -EINVAL;
147
148 clk->parent = parent;
149
150 if (clk == &s3c24xx_clkout0)
151 mask = S3C2410_MISCCR_CLK0_MASK;
152 else {
153 source <<= 4;
154 mask = S3C2410_MISCCR_CLK1_MASK;
155 }
156
157 s3c2410_modify_misccr(mask, source);
158 return 0;
159}
160
161/* external clock definitions */
162
163static struct clk_ops dclk_ops = {
164 .set_parent = s3c24xx_dclk_setparent,
165 .set_rate = s3c24xx_set_dclk_rate,
166 .round_rate = s3c24xx_round_dclk_rate,
167};
168
169struct clk s3c24xx_dclk0 = {
170 .name = "dclk0",
171 .ctrlbit = S3C2410_DCLKCON_DCLK0EN,
172 .enable = s3c24xx_dclk_enable,
173 .ops = &dclk_ops,
174};
175
176struct clk s3c24xx_dclk1 = {
177 .name = "dclk1",
178 .ctrlbit = S3C2410_DCLKCON_DCLK1EN,
179 .enable = s3c24xx_dclk_enable,
180 .ops = &dclk_ops,
181};
182
183static struct clk_ops clkout_ops = {
184 .set_parent = s3c24xx_clkout_setparent,
185};
186
187struct clk s3c24xx_clkout0 = {
188 .name = "clkout0",
189 .ops = &clkout_ops,
190};
191
192struct clk s3c24xx_clkout1 = {
193 .name = "clkout1",
194 .ops = &clkout_ops,
195};
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2410.c b/arch/arm/mach-s3c24xx/clock-s3c2410.c
deleted file mode 100644
index d1afcf9252d1..000000000000
--- a/arch/arm/mach-s3c24xx/clock-s3c2410.c
+++ /dev/null
@@ -1,284 +0,0 @@
1/*
2 * Copyright (c) 2006 Simtec Electronics
3 * Ben Dooks <ben@simtec.co.uk>
4 *
5 * S3C2410,S3C2440,S3C2442 Clock control support
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/init.h>
23#include <linux/module.h>
24#include <linux/kernel.h>
25#include <linux/list.h>
26#include <linux/errno.h>
27#include <linux/err.h>
28#include <linux/device.h>
29#include <linux/clk.h>
30#include <linux/mutex.h>
31#include <linux/delay.h>
32#include <linux/serial_core.h>
33#include <linux/serial_s3c.h>
34#include <linux/io.h>
35
36#include <asm/mach/map.h>
37
38#include <mach/hardware.h>
39#include <mach/regs-clock.h>
40#include <mach/regs-gpio.h>
41
42#include <plat/clock.h>
43#include <plat/cpu.h>
44
45int s3c2410_clkcon_enable(struct clk *clk, int enable)
46{
47 unsigned int clocks = clk->ctrlbit;
48 unsigned long clkcon;
49
50 clkcon = __raw_readl(S3C2410_CLKCON);
51
52 if (enable)
53 clkcon |= clocks;
54 else
55 clkcon &= ~clocks;
56
57 /* ensure none of the special function bits set */
58 clkcon &= ~(S3C2410_CLKCON_IDLE|S3C2410_CLKCON_POWER);
59
60 __raw_writel(clkcon, S3C2410_CLKCON);
61
62 return 0;
63}
64
65static int s3c2410_upll_enable(struct clk *clk, int enable)
66{
67 unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW);
68 unsigned long orig = clkslow;
69
70 if (enable)
71 clkslow &= ~S3C2410_CLKSLOW_UCLK_OFF;
72 else
73 clkslow |= S3C2410_CLKSLOW_UCLK_OFF;
74
75 __raw_writel(clkslow, S3C2410_CLKSLOW);
76
77 /* if we started the UPLL, then allow to settle */
78
79 if (enable && (orig & S3C2410_CLKSLOW_UCLK_OFF))
80 udelay(200);
81
82 return 0;
83}
84
85/* standard clock definitions */
86
87static struct clk init_clocks_off[] = {
88 {
89 .name = "nand",
90 .parent = &clk_h,
91 .enable = s3c2410_clkcon_enable,
92 .ctrlbit = S3C2410_CLKCON_NAND,
93 }, {
94 .name = "sdi",
95 .parent = &clk_p,
96 .enable = s3c2410_clkcon_enable,
97 .ctrlbit = S3C2410_CLKCON_SDI,
98 }, {
99 .name = "adc",
100 .parent = &clk_p,
101 .enable = s3c2410_clkcon_enable,
102 .ctrlbit = S3C2410_CLKCON_ADC,
103 }, {
104 .name = "i2c",
105 .parent = &clk_p,
106 .enable = s3c2410_clkcon_enable,
107 .ctrlbit = S3C2410_CLKCON_IIC,
108 }, {
109 .name = "iis",
110 .parent = &clk_p,
111 .enable = s3c2410_clkcon_enable,
112 .ctrlbit = S3C2410_CLKCON_IIS,
113 }, {
114 .name = "spi",
115 .parent = &clk_p,
116 .enable = s3c2410_clkcon_enable,
117 .ctrlbit = S3C2410_CLKCON_SPI,
118 }
119};
120
121static struct clk clk_lcd = {
122 .name = "lcd",
123 .parent = &clk_h,
124 .enable = s3c2410_clkcon_enable,
125 .ctrlbit = S3C2410_CLKCON_LCDC,
126};
127
128static struct clk clk_gpio = {
129 .name = "gpio",
130 .parent = &clk_p,
131 .enable = s3c2410_clkcon_enable,
132 .ctrlbit = S3C2410_CLKCON_GPIO,
133};
134
135static struct clk clk_usb_host = {
136 .name = "usb-host",
137 .parent = &clk_h,
138 .enable = s3c2410_clkcon_enable,
139 .ctrlbit = S3C2410_CLKCON_USBH,
140};
141
142static struct clk clk_usb_device = {
143 .name = "usb-device",
144 .parent = &clk_h,
145 .enable = s3c2410_clkcon_enable,
146 .ctrlbit = S3C2410_CLKCON_USBD,
147};
148
149static struct clk clk_timers = {
150 .name = "timers",
151 .parent = &clk_p,
152 .enable = s3c2410_clkcon_enable,
153 .ctrlbit = S3C2410_CLKCON_PWMT,
154};
155
156struct clk s3c24xx_clk_uart0 = {
157 .name = "uart",
158 .devname = "s3c2410-uart.0",
159 .parent = &clk_p,
160 .enable = s3c2410_clkcon_enable,
161 .ctrlbit = S3C2410_CLKCON_UART0,
162};
163
164struct clk s3c24xx_clk_uart1 = {
165 .name = "uart",
166 .devname = "s3c2410-uart.1",
167 .parent = &clk_p,
168 .enable = s3c2410_clkcon_enable,
169 .ctrlbit = S3C2410_CLKCON_UART1,
170};
171
172struct clk s3c24xx_clk_uart2 = {
173 .name = "uart",
174 .devname = "s3c2410-uart.2",
175 .parent = &clk_p,
176 .enable = s3c2410_clkcon_enable,
177 .ctrlbit = S3C2410_CLKCON_UART2,
178};
179
180static struct clk clk_rtc = {
181 .name = "rtc",
182 .parent = &clk_p,
183 .enable = s3c2410_clkcon_enable,
184 .ctrlbit = S3C2410_CLKCON_RTC,
185};
186
187static struct clk clk_watchdog = {
188 .name = "watchdog",
189 .parent = &clk_p,
190 .ctrlbit = 0,
191};
192
193static struct clk clk_usb_bus_host = {
194 .name = "usb-bus-host",
195 .parent = &clk_usb_bus,
196};
197
198static struct clk clk_usb_bus_gadget = {
199 .name = "usb-bus-gadget",
200 .parent = &clk_usb_bus,
201};
202
203static struct clk *init_clocks[] = {
204 &clk_lcd,
205 &clk_gpio,
206 &clk_usb_host,
207 &clk_usb_device,
208 &clk_timers,
209 &s3c24xx_clk_uart0,
210 &s3c24xx_clk_uart1,
211 &s3c24xx_clk_uart2,
212 &clk_rtc,
213 &clk_watchdog,
214 &clk_usb_bus_host,
215 &clk_usb_bus_gadget,
216};
217
218/* s3c2410_baseclk_add()
219 *
220 * Add all the clocks used by the s3c2410 or compatible CPUs
221 * such as the S3C2440 and S3C2442.
222 *
223 * We cannot use a system device as we are needed before any
224 * of the init-calls that initialise the devices are actually
225 * done.
226*/
227
228int __init s3c2410_baseclk_add(void)
229{
230 unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW);
231 unsigned long clkcon = __raw_readl(S3C2410_CLKCON);
232 struct clk *xtal;
233 int ret;
234 int ptr;
235
236 clk_upll.enable = s3c2410_upll_enable;
237
238 if (s3c24xx_register_clock(&clk_usb_bus) < 0)
239 printk(KERN_ERR "failed to register usb bus clock\n");
240
241 /* register clocks from clock array */
242
243 for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++) {
244 struct clk *clkp = init_clocks[ptr];
245
246 /* ensure that we note the clock state */
247
248 clkp->usage = clkcon & clkp->ctrlbit ? 1 : 0;
249
250 ret = s3c24xx_register_clock(clkp);
251 if (ret < 0) {
252 printk(KERN_ERR "Failed to register clock %s (%d)\n",
253 clkp->name, ret);
254 }
255 }
256
257 /* We must be careful disabling the clocks we are not intending to
258 * be using at boot time, as subsystems such as the LCD which do
259 * their own DMA requests to the bus can cause the system to lockup
260 * if they where in the middle of requesting bus access.
261 *
262 * Disabling the LCD clock if the LCD is active is very dangerous,
263 * and therefore the bootloader should be careful to not enable
264 * the LCD clock if it is not needed.
265 */
266
267 /* install (and disable) the clocks we do not need immediately */
268
269 s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
270 s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
271
272 /* show the clock-slow value */
273
274 xtal = clk_get(NULL, "xtal");
275
276 printk("CLOCK: Slow mode (%ld.%ld MHz), %s, MPLL %s, UPLL %s\n",
277 print_mhz(clk_get_rate(xtal) /
278 ( 2 * S3C2410_CLKSLOW_GET_SLOWVAL(clkslow))),
279 (clkslow & S3C2410_CLKSLOW_SLOW) ? "slow" : "fast",
280 (clkslow & S3C2410_CLKSLOW_MPLL_OFF) ? "off" : "on",
281 (clkslow & S3C2410_CLKSLOW_UCLK_OFF) ? "off" : "on");
282
283 return 0;
284}
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2412.c b/arch/arm/mach-s3c24xx/clock-s3c2412.c
deleted file mode 100644
index 192a5b2550b0..000000000000
--- a/arch/arm/mach-s3c24xx/clock-s3c2412.c
+++ /dev/null
@@ -1,760 +0,0 @@
1/* linux/arch/arm/mach-s3c2412/clock.c
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2412,S3C2413 Clock control support
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 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21*/
22
23#include <linux/init.h>
24#include <linux/module.h>
25#include <linux/kernel.h>
26#include <linux/list.h>
27#include <linux/errno.h>
28#include <linux/err.h>
29#include <linux/device.h>
30#include <linux/clk.h>
31#include <linux/mutex.h>
32#include <linux/delay.h>
33#include <linux/serial_core.h>
34#include <linux/serial_s3c.h>
35#include <linux/io.h>
36
37#include <asm/mach/map.h>
38
39#include <mach/hardware.h>
40#include <mach/regs-clock.h>
41#include <mach/regs-gpio.h>
42
43#include <plat/clock.h>
44#include <plat/cpu.h>
45
46/* We currently have to assume that the system is running
47 * from the XTPll input, and that all ***REFCLKs are being
48 * fed from it, as we cannot read the state of OM[4] from
49 * software.
50 *
51 * It would be possible for each board initialisation to
52 * set the correct muxing at initialisation
53*/
54
55static int s3c2412_clkcon_enable(struct clk *clk, int enable)
56{
57 unsigned int clocks = clk->ctrlbit;
58 unsigned long clkcon;
59
60 clkcon = __raw_readl(S3C2410_CLKCON);
61
62 if (enable)
63 clkcon |= clocks;
64 else
65 clkcon &= ~clocks;
66
67 __raw_writel(clkcon, S3C2410_CLKCON);
68
69 return 0;
70}
71
72static int s3c2412_upll_enable(struct clk *clk, int enable)
73{
74 unsigned long upllcon = __raw_readl(S3C2410_UPLLCON);
75 unsigned long orig = upllcon;
76
77 if (!enable)
78 upllcon |= S3C2412_PLLCON_OFF;
79 else
80 upllcon &= ~S3C2412_PLLCON_OFF;
81
82 __raw_writel(upllcon, S3C2410_UPLLCON);
83
84 /* allow ~150uS for the PLL to settle and lock */
85
86 if (enable && (orig & S3C2412_PLLCON_OFF))
87 udelay(150);
88
89 return 0;
90}
91
92/* clock selections */
93
94static struct clk clk_erefclk = {
95 .name = "erefclk",
96};
97
98static struct clk clk_urefclk = {
99 .name = "urefclk",
100};
101
102static int s3c2412_setparent_usysclk(struct clk *clk, struct clk *parent)
103{
104 unsigned long clksrc = __raw_readl(S3C2412_CLKSRC);
105
106 if (parent == &clk_urefclk)
107 clksrc &= ~S3C2412_CLKSRC_USYSCLK_UPLL;
108 else if (parent == &clk_upll)
109 clksrc |= S3C2412_CLKSRC_USYSCLK_UPLL;
110 else
111 return -EINVAL;
112
113 clk->parent = parent;
114
115 __raw_writel(clksrc, S3C2412_CLKSRC);
116 return 0;
117}
118
119static struct clk clk_usysclk = {
120 .name = "usysclk",
121 .parent = &clk_xtal,
122 .ops = &(struct clk_ops) {
123 .set_parent = s3c2412_setparent_usysclk,
124 },
125};
126
127static struct clk clk_mrefclk = {
128 .name = "mrefclk",
129 .parent = &clk_xtal,
130};
131
132static struct clk clk_mdivclk = {
133 .name = "mdivclk",
134 .parent = &clk_xtal,
135};
136
137static int s3c2412_setparent_usbsrc(struct clk *clk, struct clk *parent)
138{
139 unsigned long clksrc = __raw_readl(S3C2412_CLKSRC);
140
141 if (parent == &clk_usysclk)
142 clksrc &= ~S3C2412_CLKSRC_USBCLK_HCLK;
143 else if (parent == &clk_h)
144 clksrc |= S3C2412_CLKSRC_USBCLK_HCLK;
145 else
146 return -EINVAL;
147
148 clk->parent = parent;
149
150 __raw_writel(clksrc, S3C2412_CLKSRC);
151 return 0;
152}
153
154static unsigned long s3c2412_roundrate_usbsrc(struct clk *clk,
155 unsigned long rate)
156{
157 unsigned long parent_rate = clk_get_rate(clk->parent);
158 int div;
159
160 if (rate > parent_rate)
161 return parent_rate;
162
163 div = parent_rate / rate;
164 if (div > 2)
165 div = 2;
166
167 return parent_rate / div;
168}
169
170static unsigned long s3c2412_getrate_usbsrc(struct clk *clk)
171{
172 unsigned long parent_rate = clk_get_rate(clk->parent);
173 unsigned long div = __raw_readl(S3C2410_CLKDIVN);
174
175 return parent_rate / ((div & S3C2412_CLKDIVN_USB48DIV) ? 2 : 1);
176}
177
178static int s3c2412_setrate_usbsrc(struct clk *clk, unsigned long rate)
179{
180 unsigned long parent_rate = clk_get_rate(clk->parent);
181 unsigned long clkdivn = __raw_readl(S3C2410_CLKDIVN);
182
183 rate = s3c2412_roundrate_usbsrc(clk, rate);
184
185 if ((parent_rate / rate) == 2)
186 clkdivn |= S3C2412_CLKDIVN_USB48DIV;
187 else
188 clkdivn &= ~S3C2412_CLKDIVN_USB48DIV;
189
190 __raw_writel(clkdivn, S3C2410_CLKDIVN);
191 return 0;
192}
193
194static struct clk clk_usbsrc = {
195 .name = "usbsrc",
196 .ops = &(struct clk_ops) {
197 .get_rate = s3c2412_getrate_usbsrc,
198 .set_rate = s3c2412_setrate_usbsrc,
199 .round_rate = s3c2412_roundrate_usbsrc,
200 .set_parent = s3c2412_setparent_usbsrc,
201 },
202};
203
204static int s3c2412_setparent_msysclk(struct clk *clk, struct clk *parent)
205{
206 unsigned long clksrc = __raw_readl(S3C2412_CLKSRC);
207
208 if (parent == &clk_mdivclk)
209 clksrc &= ~S3C2412_CLKSRC_MSYSCLK_MPLL;
210 else if (parent == &clk_mpll)
211 clksrc |= S3C2412_CLKSRC_MSYSCLK_MPLL;
212 else
213 return -EINVAL;
214
215 clk->parent = parent;
216
217 __raw_writel(clksrc, S3C2412_CLKSRC);
218 return 0;
219}
220
221static struct clk clk_msysclk = {
222 .name = "msysclk",
223 .ops = &(struct clk_ops) {
224 .set_parent = s3c2412_setparent_msysclk,
225 },
226};
227
228static int s3c2412_setparent_armclk(struct clk *clk, struct clk *parent)
229{
230 unsigned long flags;
231 unsigned long clkdiv;
232 unsigned long dvs;
233
234 /* Note, we current equate fclk andf msysclk for S3C2412 */
235
236 if (parent == &clk_msysclk || parent == &clk_f)
237 dvs = 0;
238 else if (parent == &clk_h)
239 dvs = S3C2412_CLKDIVN_DVSEN;
240 else
241 return -EINVAL;
242
243 clk->parent = parent;
244
245 /* update this under irq lockdown, clkdivn is not protected
246 * by the clock system. */
247
248 local_irq_save(flags);
249
250 clkdiv = __raw_readl(S3C2410_CLKDIVN);
251 clkdiv &= ~S3C2412_CLKDIVN_DVSEN;
252 clkdiv |= dvs;
253 __raw_writel(clkdiv, S3C2410_CLKDIVN);
254
255 local_irq_restore(flags);
256
257 return 0;
258}
259
260static struct clk clk_armclk = {
261 .name = "armclk",
262 .parent = &clk_msysclk,
263 .ops = &(struct clk_ops) {
264 .set_parent = s3c2412_setparent_armclk,
265 },
266};
267
268/* these next clocks have an divider immediately after them,
269 * so we can register them with their divider and leave out the
270 * intermediate clock stage
271*/
272static unsigned long s3c2412_roundrate_clksrc(struct clk *clk,
273 unsigned long rate)
274{
275 unsigned long parent_rate = clk_get_rate(clk->parent);
276 int div;
277
278 if (rate > parent_rate)
279 return parent_rate;
280
281 /* note, we remove the +/- 1 calculations as they cancel out */
282
283 div = (rate / parent_rate);
284
285 if (div < 1)
286 div = 1;
287 else if (div > 16)
288 div = 16;
289
290 return parent_rate / div;
291}
292
293static int s3c2412_setparent_uart(struct clk *clk, struct clk *parent)
294{
295 unsigned long clksrc = __raw_readl(S3C2412_CLKSRC);
296
297 if (parent == &clk_erefclk)
298 clksrc &= ~S3C2412_CLKSRC_UARTCLK_MPLL;
299 else if (parent == &clk_mpll)
300 clksrc |= S3C2412_CLKSRC_UARTCLK_MPLL;
301 else
302 return -EINVAL;
303
304 clk->parent = parent;
305
306 __raw_writel(clksrc, S3C2412_CLKSRC);
307 return 0;
308}
309
310static unsigned long s3c2412_getrate_uart(struct clk *clk)
311{
312 unsigned long parent_rate = clk_get_rate(clk->parent);
313 unsigned long div = __raw_readl(S3C2410_CLKDIVN);
314
315 div &= S3C2412_CLKDIVN_UARTDIV_MASK;
316 div >>= S3C2412_CLKDIVN_UARTDIV_SHIFT;
317
318 return parent_rate / (div + 1);
319}
320
321static int s3c2412_setrate_uart(struct clk *clk, unsigned long rate)
322{
323 unsigned long parent_rate = clk_get_rate(clk->parent);
324 unsigned long clkdivn = __raw_readl(S3C2410_CLKDIVN);
325
326 rate = s3c2412_roundrate_clksrc(clk, rate);
327
328 clkdivn &= ~S3C2412_CLKDIVN_UARTDIV_MASK;
329 clkdivn |= ((parent_rate / rate) - 1) << S3C2412_CLKDIVN_UARTDIV_SHIFT;
330
331 __raw_writel(clkdivn, S3C2410_CLKDIVN);
332 return 0;
333}
334
335static struct clk clk_uart = {
336 .name = "uartclk",
337 .ops = &(struct clk_ops) {
338 .get_rate = s3c2412_getrate_uart,
339 .set_rate = s3c2412_setrate_uart,
340 .set_parent = s3c2412_setparent_uart,
341 .round_rate = s3c2412_roundrate_clksrc,
342 },
343};
344
345static int s3c2412_setparent_i2s(struct clk *clk, struct clk *parent)
346{
347 unsigned long clksrc = __raw_readl(S3C2412_CLKSRC);
348
349 if (parent == &clk_erefclk)
350 clksrc &= ~S3C2412_CLKSRC_I2SCLK_MPLL;
351 else if (parent == &clk_mpll)
352 clksrc |= S3C2412_CLKSRC_I2SCLK_MPLL;
353 else
354 return -EINVAL;
355
356 clk->parent = parent;
357
358 __raw_writel(clksrc, S3C2412_CLKSRC);
359 return 0;
360}
361
362static unsigned long s3c2412_getrate_i2s(struct clk *clk)
363{
364 unsigned long parent_rate = clk_get_rate(clk->parent);
365 unsigned long div = __raw_readl(S3C2410_CLKDIVN);
366
367 div &= S3C2412_CLKDIVN_I2SDIV_MASK;
368 div >>= S3C2412_CLKDIVN_I2SDIV_SHIFT;
369
370 return parent_rate / (div + 1);
371}
372
373static int s3c2412_setrate_i2s(struct clk *clk, unsigned long rate)
374{
375 unsigned long parent_rate = clk_get_rate(clk->parent);
376 unsigned long clkdivn = __raw_readl(S3C2410_CLKDIVN);
377
378 rate = s3c2412_roundrate_clksrc(clk, rate);
379
380 clkdivn &= ~S3C2412_CLKDIVN_I2SDIV_MASK;
381 clkdivn |= ((parent_rate / rate) - 1) << S3C2412_CLKDIVN_I2SDIV_SHIFT;
382
383 __raw_writel(clkdivn, S3C2410_CLKDIVN);
384 return 0;
385}
386
387static struct clk clk_i2s = {
388 .name = "i2sclk",
389 .ops = &(struct clk_ops) {
390 .get_rate = s3c2412_getrate_i2s,
391 .set_rate = s3c2412_setrate_i2s,
392 .set_parent = s3c2412_setparent_i2s,
393 .round_rate = s3c2412_roundrate_clksrc,
394 },
395};
396
397static int s3c2412_setparent_cam(struct clk *clk, struct clk *parent)
398{
399 unsigned long clksrc = __raw_readl(S3C2412_CLKSRC);
400
401 if (parent == &clk_usysclk)
402 clksrc &= ~S3C2412_CLKSRC_CAMCLK_HCLK;
403 else if (parent == &clk_h)
404 clksrc |= S3C2412_CLKSRC_CAMCLK_HCLK;
405 else
406 return -EINVAL;
407
408 clk->parent = parent;
409
410 __raw_writel(clksrc, S3C2412_CLKSRC);
411 return 0;
412}
413static unsigned long s3c2412_getrate_cam(struct clk *clk)
414{
415 unsigned long parent_rate = clk_get_rate(clk->parent);
416 unsigned long div = __raw_readl(S3C2410_CLKDIVN);
417
418 div &= S3C2412_CLKDIVN_CAMDIV_MASK;
419 div >>= S3C2412_CLKDIVN_CAMDIV_SHIFT;
420
421 return parent_rate / (div + 1);
422}
423
424static int s3c2412_setrate_cam(struct clk *clk, unsigned long rate)
425{
426 unsigned long parent_rate = clk_get_rate(clk->parent);
427 unsigned long clkdivn = __raw_readl(S3C2410_CLKDIVN);
428
429 rate = s3c2412_roundrate_clksrc(clk, rate);
430
431 clkdivn &= ~S3C2412_CLKDIVN_CAMDIV_MASK;
432 clkdivn |= ((parent_rate / rate) - 1) << S3C2412_CLKDIVN_CAMDIV_SHIFT;
433
434 __raw_writel(clkdivn, S3C2410_CLKDIVN);
435 return 0;
436}
437
438static struct clk clk_cam = {
439 .name = "camif-upll", /* same as 2440 name */
440 .ops = &(struct clk_ops) {
441 .get_rate = s3c2412_getrate_cam,
442 .set_rate = s3c2412_setrate_cam,
443 .set_parent = s3c2412_setparent_cam,
444 .round_rate = s3c2412_roundrate_clksrc,
445 },
446};
447
448/* standard clock definitions */
449
450static struct clk init_clocks_disable[] = {
451 {
452 .name = "nand",
453 .parent = &clk_h,
454 .enable = s3c2412_clkcon_enable,
455 .ctrlbit = S3C2412_CLKCON_NAND,
456 }, {
457 .name = "sdi",
458 .parent = &clk_p,
459 .enable = s3c2412_clkcon_enable,
460 .ctrlbit = S3C2412_CLKCON_SDI,
461 }, {
462 .name = "adc",
463 .parent = &clk_p,
464 .enable = s3c2412_clkcon_enable,
465 .ctrlbit = S3C2412_CLKCON_ADC,
466 }, {
467 .name = "i2c",
468 .parent = &clk_p,
469 .enable = s3c2412_clkcon_enable,
470 .ctrlbit = S3C2412_CLKCON_IIC,
471 }, {
472 .name = "iis",
473 .parent = &clk_p,
474 .enable = s3c2412_clkcon_enable,
475 .ctrlbit = S3C2412_CLKCON_IIS,
476 }, {
477 .name = "spi",
478 .parent = &clk_p,
479 .enable = s3c2412_clkcon_enable,
480 .ctrlbit = S3C2412_CLKCON_SPI,
481 }
482};
483
484static struct clk init_clocks[] = {
485 {
486 .name = "dma.0",
487 .parent = &clk_h,
488 .enable = s3c2412_clkcon_enable,
489 .ctrlbit = S3C2412_CLKCON_DMA0,
490 }, {
491 .name = "dma.1",
492 .parent = &clk_h,
493 .enable = s3c2412_clkcon_enable,
494 .ctrlbit = S3C2412_CLKCON_DMA1,
495 }, {
496 .name = "dma.2",
497 .parent = &clk_h,
498 .enable = s3c2412_clkcon_enable,
499 .ctrlbit = S3C2412_CLKCON_DMA2,
500 }, {
501 .name = "dma.3",
502 .parent = &clk_h,
503 .enable = s3c2412_clkcon_enable,
504 .ctrlbit = S3C2412_CLKCON_DMA3,
505 }, {
506 .name = "lcd",
507 .parent = &clk_h,
508 .enable = s3c2412_clkcon_enable,
509 .ctrlbit = S3C2412_CLKCON_LCDC,
510 }, {
511 .name = "gpio",
512 .parent = &clk_p,
513 .enable = s3c2412_clkcon_enable,
514 .ctrlbit = S3C2412_CLKCON_GPIO,
515 }, {
516 .name = "usb-host",
517 .parent = &clk_h,
518 .enable = s3c2412_clkcon_enable,
519 .ctrlbit = S3C2412_CLKCON_USBH,
520 }, {
521 .name = "usb-device",
522 .parent = &clk_h,
523 .enable = s3c2412_clkcon_enable,
524 .ctrlbit = S3C2412_CLKCON_USBD,
525 }, {
526 .name = "timers",
527 .parent = &clk_p,
528 .enable = s3c2412_clkcon_enable,
529 .ctrlbit = S3C2412_CLKCON_PWMT,
530 }, {
531 .name = "uart",
532 .devname = "s3c2412-uart.0",
533 .parent = &clk_p,
534 .enable = s3c2412_clkcon_enable,
535 .ctrlbit = S3C2412_CLKCON_UART0,
536 }, {
537 .name = "uart",
538 .devname = "s3c2412-uart.1",
539 .parent = &clk_p,
540 .enable = s3c2412_clkcon_enable,
541 .ctrlbit = S3C2412_CLKCON_UART1,
542 }, {
543 .name = "uart",
544 .devname = "s3c2412-uart.2",
545 .parent = &clk_p,
546 .enable = s3c2412_clkcon_enable,
547 .ctrlbit = S3C2412_CLKCON_UART2,
548 }, {
549 .name = "rtc",
550 .parent = &clk_p,
551 .enable = s3c2412_clkcon_enable,
552 .ctrlbit = S3C2412_CLKCON_RTC,
553 }, {
554 .name = "watchdog",
555 .parent = &clk_p,
556 .ctrlbit = 0,
557 }, {
558 .name = "usb-bus-gadget",
559 .parent = &clk_usb_bus,
560 .enable = s3c2412_clkcon_enable,
561 .ctrlbit = S3C2412_CLKCON_USB_DEV48,
562 }, {
563 .name = "usb-bus-host",
564 .parent = &clk_usb_bus,
565 .enable = s3c2412_clkcon_enable,
566 .ctrlbit = S3C2412_CLKCON_USB_HOST48,
567 }
568};
569
570/* clocks to add where we need to check their parentage */
571
572struct clk_init {
573 struct clk *clk;
574 unsigned int bit;
575 struct clk *src_0;
576 struct clk *src_1;
577};
578
579static struct clk_init clks_src[] __initdata = {
580 {
581 .clk = &clk_usysclk,
582 .bit = S3C2412_CLKSRC_USBCLK_HCLK,
583 .src_0 = &clk_urefclk,
584 .src_1 = &clk_upll,
585 }, {
586 .clk = &clk_i2s,
587 .bit = S3C2412_CLKSRC_I2SCLK_MPLL,
588 .src_0 = &clk_erefclk,
589 .src_1 = &clk_mpll,
590 }, {
591 .clk = &clk_cam,
592 .bit = S3C2412_CLKSRC_CAMCLK_HCLK,
593 .src_0 = &clk_usysclk,
594 .src_1 = &clk_h,
595 }, {
596 .clk = &clk_msysclk,
597 .bit = S3C2412_CLKSRC_MSYSCLK_MPLL,
598 .src_0 = &clk_mdivclk,
599 .src_1 = &clk_mpll,
600 }, {
601 .clk = &clk_uart,
602 .bit = S3C2412_CLKSRC_UARTCLK_MPLL,
603 .src_0 = &clk_erefclk,
604 .src_1 = &clk_mpll,
605 }, {
606 .clk = &clk_usbsrc,
607 .bit = S3C2412_CLKSRC_USBCLK_HCLK,
608 .src_0 = &clk_usysclk,
609 .src_1 = &clk_h,
610 /* here we assume OM[4] select xtal */
611 }, {
612 .clk = &clk_erefclk,
613 .bit = S3C2412_CLKSRC_EREFCLK_EXTCLK,
614 .src_0 = &clk_xtal,
615 .src_1 = &clk_ext,
616 }, {
617 .clk = &clk_urefclk,
618 .bit = S3C2412_CLKSRC_UREFCLK_EXTCLK,
619 .src_0 = &clk_xtal,
620 .src_1 = &clk_ext,
621 },
622};
623
624/* s3c2412_clk_initparents
625 *
626 * Initialise the parents for the clocks that we get at start-time
627*/
628
629static void __init s3c2412_clk_initparents(void)
630{
631 unsigned long clksrc = __raw_readl(S3C2412_CLKSRC);
632 struct clk_init *cip = clks_src;
633 struct clk *src;
634 int ptr;
635 int ret;
636
637 for (ptr = 0; ptr < ARRAY_SIZE(clks_src); ptr++, cip++) {
638 ret = s3c24xx_register_clock(cip->clk);
639 if (ret < 0) {
640 printk(KERN_ERR "Failed to register clock %s (%d)\n",
641 cip->clk->name, ret);
642 }
643
644 src = (clksrc & cip->bit) ? cip->src_1 : cip->src_0;
645
646 printk(KERN_INFO "%s: parent %s\n", cip->clk->name, src->name);
647 clk_set_parent(cip->clk, src);
648 }
649}
650
651/* clocks to add straight away */
652
653static struct clk *clks[] __initdata = {
654 &clk_ext,
655 &clk_usb_bus,
656 &clk_mrefclk,
657 &clk_armclk,
658};
659
660static struct clk_lookup s3c2412_clk_lookup[] = {
661 CLKDEV_INIT(NULL, "clk_uart_baud1", &s3c24xx_uclk),
662 CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p),
663 CLKDEV_INIT(NULL, "clk_uart_baud3", &clk_usysclk),
664};
665
666int __init s3c2412_baseclk_add(void)
667{
668 unsigned long clkcon = __raw_readl(S3C2410_CLKCON);
669 unsigned int dvs;
670 struct clk *clkp;
671 int ret;
672 int ptr;
673
674 clk_upll.enable = s3c2412_upll_enable;
675 clk_usb_bus.parent = &clk_usbsrc;
676 clk_usb_bus.rate = 0x0;
677
678 clk_f.parent = &clk_msysclk;
679
680 s3c2412_clk_initparents();
681
682 for (ptr = 0; ptr < ARRAY_SIZE(clks); ptr++) {
683 clkp = clks[ptr];
684
685 ret = s3c24xx_register_clock(clkp);
686 if (ret < 0) {
687 printk(KERN_ERR "Failed to register clock %s (%d)\n",
688 clkp->name, ret);
689 }
690 }
691
692 /* set the dvs state according to what we got at boot time */
693
694 dvs = __raw_readl(S3C2410_CLKDIVN) & S3C2412_CLKDIVN_DVSEN;
695
696 if (dvs)
697 clk_armclk.parent = &clk_h;
698
699 printk(KERN_INFO "S3C2412: DVS is %s\n", dvs ? "on" : "off");
700
701 /* ensure usb bus clock is within correct rate of 48MHz */
702
703 if (clk_get_rate(&clk_usb_bus) != (48 * 1000 * 1000)) {
704 printk(KERN_INFO "Warning: USB bus clock not at 48MHz\n");
705
706 /* for the moment, let's use the UPLL, and see if we can
707 * get 48MHz */
708
709 clk_set_parent(&clk_usysclk, &clk_upll);
710 clk_set_parent(&clk_usbsrc, &clk_usysclk);
711 clk_set_rate(&clk_usbsrc, 48*1000*1000);
712 }
713
714 printk("S3C2412: upll %s, %ld.%03ld MHz, usb-bus %ld.%03ld MHz\n",
715 (__raw_readl(S3C2410_UPLLCON) & S3C2412_PLLCON_OFF) ? "off":"on",
716 print_mhz(clk_get_rate(&clk_upll)),
717 print_mhz(clk_get_rate(&clk_usb_bus)));
718
719 /* register clocks from clock array */
720
721 clkp = init_clocks;
722 for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) {
723 /* ensure that we note the clock state */
724
725 clkp->usage = clkcon & clkp->ctrlbit ? 1 : 0;
726
727 ret = s3c24xx_register_clock(clkp);
728 if (ret < 0) {
729 printk(KERN_ERR "Failed to register clock %s (%d)\n",
730 clkp->name, ret);
731 }
732 }
733
734 /* We must be careful disabling the clocks we are not intending to
735 * be using at boot time, as subsystems such as the LCD which do
736 * their own DMA requests to the bus can cause the system to lockup
737 * if they where in the middle of requesting bus access.
738 *
739 * Disabling the LCD clock if the LCD is active is very dangerous,
740 * and therefore the bootloader should be careful to not enable
741 * the LCD clock if it is not needed.
742 */
743
744 /* install (and disable) the clocks we do not need immediately */
745
746 clkp = init_clocks_disable;
747 for (ptr = 0; ptr < ARRAY_SIZE(init_clocks_disable); ptr++, clkp++) {
748
749 ret = s3c24xx_register_clock(clkp);
750 if (ret < 0) {
751 printk(KERN_ERR "Failed to register clock %s (%d)\n",
752 clkp->name, ret);
753 }
754
755 s3c2412_clkcon_enable(clkp, 0);
756 }
757
758 clkdev_add_table(s3c2412_clk_lookup, ARRAY_SIZE(s3c2412_clk_lookup));
759 return 0;
760}
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2416.c b/arch/arm/mach-s3c24xx/clock-s3c2416.c
deleted file mode 100644
index d421a72920a5..000000000000
--- a/arch/arm/mach-s3c24xx/clock-s3c2416.c
+++ /dev/null
@@ -1,171 +0,0 @@
1/* linux/arch/arm/mach-s3c2416/clock.c
2 *
3 * Copyright (c) 2010 Simtec Electronics
4 * Copyright (c) 2010 Ben Dooks <ben-linux@fluff.org>
5 *
6 * S3C2416 Clock control support
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/init.h>
15#include <linux/clk.h>
16
17#include <plat/clock.h>
18#include <plat/clock-clksrc.h>
19#include <plat/cpu.h>
20
21#include <plat/cpu-freq.h>
22#include <plat/pll.h>
23
24#include <asm/mach/map.h>
25
26#include <mach/regs-clock.h>
27#include <mach/regs-s3c2443-clock.h>
28
29/* armdiv
30 *
31 * this clock is sourced from msysclk and can have a number of
32 * divider values applied to it to then be fed into armclk.
33 * The real clock definition is done in s3c2443-clock.c,
34 * only the armdiv divisor table must be defined here.
35*/
36
37static unsigned int armdiv[8] = {
38 [0] = 1,
39 [1] = 2,
40 [2] = 3,
41 [3] = 4,
42 [5] = 6,
43 [7] = 8,
44};
45
46static struct clksrc_clk hsspi_eplldiv = {
47 .clk = {
48 .name = "hsspi-eplldiv",
49 .parent = &clk_esysclk.clk,
50 .ctrlbit = (1 << 14),
51 .enable = s3c2443_clkcon_enable_s,
52 },
53 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 24 },
54};
55
56static struct clk *hsspi_sources[] = {
57 [0] = &hsspi_eplldiv.clk,
58 [1] = NULL, /* to fix */
59};
60
61static struct clksrc_clk hsspi_mux = {
62 .clk = {
63 .name = "hsspi-if",
64 },
65 .sources = &(struct clksrc_sources) {
66 .sources = hsspi_sources,
67 .nr_sources = ARRAY_SIZE(hsspi_sources),
68 },
69 .reg_src = { .reg = S3C2443_CLKSRC, .size = 1, .shift = 18 },
70};
71
72static struct clksrc_clk hsmmc_div[] = {
73 [0] = {
74 .clk = {
75 .name = "hsmmc-div",
76 .devname = "s3c-sdhci.0",
77 .parent = &clk_esysclk.clk,
78 },
79 .reg_div = { .reg = S3C2416_CLKDIV2, .size = 2, .shift = 6 },
80 },
81 [1] = {
82 .clk = {
83 .name = "hsmmc-div",
84 .devname = "s3c-sdhci.1",
85 .parent = &clk_esysclk.clk,
86 },
87 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 },
88 },
89};
90
91static struct clksrc_clk hsmmc_mux0 = {
92 .clk = {
93 .name = "hsmmc-if",
94 .devname = "s3c-sdhci.0",
95 .ctrlbit = (1 << 6),
96 .enable = s3c2443_clkcon_enable_s,
97 },
98 .sources = &(struct clksrc_sources) {
99 .nr_sources = 2,
100 .sources = (struct clk * []) {
101 [0] = &hsmmc_div[0].clk,
102 [1] = NULL, /* to fix */
103 },
104 },
105 .reg_src = { .reg = S3C2443_CLKSRC, .size = 1, .shift = 16 },
106};
107
108static struct clksrc_clk hsmmc_mux1 = {
109 .clk = {
110 .name = "hsmmc-if",
111 .devname = "s3c-sdhci.1",
112 .ctrlbit = (1 << 12),
113 .enable = s3c2443_clkcon_enable_s,
114 },
115 .sources = &(struct clksrc_sources) {
116 .nr_sources = 2,
117 .sources = (struct clk * []) {
118 [0] = &hsmmc_div[1].clk,
119 [1] = NULL, /* to fix */
120 },
121 },
122 .reg_src = { .reg = S3C2443_CLKSRC, .size = 1, .shift = 17 },
123};
124
125static struct clk hsmmc0_clk = {
126 .name = "hsmmc",
127 .devname = "s3c-sdhci.0",
128 .parent = &clk_h,
129 .enable = s3c2443_clkcon_enable_h,
130 .ctrlbit = S3C2416_HCLKCON_HSMMC0,
131};
132
133static struct clksrc_clk *clksrcs[] __initdata = {
134 &hsspi_eplldiv,
135 &hsspi_mux,
136 &hsmmc_div[0],
137 &hsmmc_div[1],
138 &hsmmc_mux0,
139 &hsmmc_mux1,
140};
141
142static struct clk_lookup s3c2416_clk_lookup[] = {
143 CLKDEV_INIT("s3c-sdhci.0", "mmc_busclk.0", &hsmmc0_clk),
144 CLKDEV_INIT("s3c-sdhci.0", "mmc_busclk.2", &hsmmc_mux0.clk),
145 CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &hsmmc_mux1.clk),
146 /* s3c2443-spi.0 is used on s3c2416 and s3c2450 as well */
147 CLKDEV_INIT("s3c2443-spi.0", "spi_busclk2", &hsspi_mux.clk),
148};
149
150void __init s3c2416_init_clocks(int xtal)
151{
152 u32 epllcon = __raw_readl(S3C2443_EPLLCON);
153 u32 epllcon1 = __raw_readl(S3C2443_EPLLCON+4);
154 int ptr;
155
156 /* s3c2416 EPLL compatible with s3c64xx */
157 clk_epll.rate = s3c_get_pll6553x(xtal, epllcon, epllcon1);
158
159 clk_epll.parent = &clk_epllref.clk;
160
161 s3c2443_common_init_clocks(xtal, s3c2416_get_pll,
162 armdiv, ARRAY_SIZE(armdiv),
163 S3C2416_CLKDIV0_ARMDIV_MASK);
164
165 for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
166 s3c_register_clksrc(clksrcs[ptr], 1);
167
168 s3c24xx_register_clock(&hsmmc0_clk);
169 clkdev_add_table(s3c2416_clk_lookup, ARRAY_SIZE(s3c2416_clk_lookup));
170
171}
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2440.c b/arch/arm/mach-s3c24xx/clock-s3c2440.c
deleted file mode 100644
index 5527226fd61f..000000000000
--- a/arch/arm/mach-s3c24xx/clock-s3c2440.c
+++ /dev/null
@@ -1,217 +0,0 @@
1/* linux/arch/arm/mach-s3c2440/clock.c
2 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * S3C2440 Clock support
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 * This program 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 License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22*/
23
24#include <linux/init.h>
25#include <linux/module.h>
26#include <linux/kernel.h>
27#include <linux/list.h>
28#include <linux/errno.h>
29#include <linux/err.h>
30#include <linux/device.h>
31#include <linux/interrupt.h>
32#include <linux/ioport.h>
33#include <linux/mutex.h>
34#include <linux/clk.h>
35#include <linux/io.h>
36#include <linux/serial_core.h>
37#include <linux/serial_s3c.h>
38
39#include <mach/hardware.h>
40#include <linux/atomic.h>
41#include <asm/irq.h>
42
43#include <mach/regs-clock.h>
44
45#include <plat/clock.h>
46#include <plat/cpu.h>
47
48/* S3C2440 extended clock support */
49
50static unsigned long s3c2440_camif_upll_round(struct clk *clk,
51 unsigned long rate)
52{
53 unsigned long parent_rate = clk_get_rate(clk->parent);
54 int div;
55
56 if (rate > parent_rate)
57 return parent_rate;
58
59 /* note, we remove the +/- 1 calculations for the divisor */
60
61 div = (parent_rate / rate) / 2;
62
63 if (div < 1)
64 div = 1;
65 else if (div > 16)
66 div = 16;
67
68 return parent_rate / (div * 2);
69}
70
71static int s3c2440_camif_upll_setrate(struct clk *clk, unsigned long rate)
72{
73 unsigned long parent_rate = clk_get_rate(clk->parent);
74 unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN);
75
76 rate = s3c2440_camif_upll_round(clk, rate);
77
78 camdivn &= ~(S3C2440_CAMDIVN_CAMCLK_SEL | S3C2440_CAMDIVN_CAMCLK_MASK);
79
80 if (rate != parent_rate) {
81 camdivn |= S3C2440_CAMDIVN_CAMCLK_SEL;
82 camdivn |= (((parent_rate / rate) / 2) - 1);
83 }
84
85 __raw_writel(camdivn, S3C2440_CAMDIVN);
86
87 return 0;
88}
89
90static unsigned long s3c2440_camif_upll_getrate(struct clk *clk)
91{
92 unsigned long parent_rate = clk_get_rate(clk->parent);
93 unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN);
94
95 if (!(camdivn & S3C2440_CAMDIVN_CAMCLK_SEL))
96 return parent_rate;
97
98 camdivn &= S3C2440_CAMDIVN_CAMCLK_MASK;
99
100 return parent_rate / (camdivn + 1) / 2;
101}
102
103/* Extra S3C2440 clocks */
104
105static struct clk s3c2440_clk_cam = {
106 .name = "camif",
107 .enable = s3c2410_clkcon_enable,
108 .ctrlbit = S3C2440_CLKCON_CAMERA,
109};
110
111static struct clk s3c2440_clk_cam_upll = {
112 .name = "camif-upll",
113 .ops = &(struct clk_ops) {
114 .set_rate = s3c2440_camif_upll_setrate,
115 .get_rate = s3c2440_camif_upll_getrate,
116 .round_rate = s3c2440_camif_upll_round,
117 },
118};
119
120static struct clk s3c2440_clk_ac97 = {
121 .name = "ac97",
122 .enable = s3c2410_clkcon_enable,
123 .ctrlbit = S3C2440_CLKCON_AC97,
124};
125
126#define S3C24XX_VA_UART0 (S3C_VA_UART)
127#define S3C24XX_VA_UART1 (S3C_VA_UART + 0x4000 )
128#define S3C24XX_VA_UART2 (S3C_VA_UART + 0x8000 )
129#define S3C24XX_VA_UART3 (S3C_VA_UART + 0xC000 )
130
131static unsigned long s3c2440_fclk_n_getrate(struct clk *clk)
132{
133 unsigned long ucon0, ucon1, ucon2, divisor;
134
135 /* the fun of calculating the uart divisors on the s3c2440 */
136 ucon0 = __raw_readl(S3C24XX_VA_UART0 + S3C2410_UCON);
137 ucon1 = __raw_readl(S3C24XX_VA_UART1 + S3C2410_UCON);
138 ucon2 = __raw_readl(S3C24XX_VA_UART2 + S3C2410_UCON);
139
140 ucon0 &= S3C2440_UCON0_DIVMASK;
141 ucon1 &= S3C2440_UCON1_DIVMASK;
142 ucon2 &= S3C2440_UCON2_DIVMASK;
143
144 if (ucon0 != 0)
145 divisor = (ucon0 >> S3C2440_UCON_DIVSHIFT) + 6;
146 else if (ucon1 != 0)
147 divisor = (ucon1 >> S3C2440_UCON_DIVSHIFT) + 21;
148 else if (ucon2 != 0)
149 divisor = (ucon2 >> S3C2440_UCON_DIVSHIFT) + 36;
150 else
151 /* manual calims 44, seems to be 9 */
152 divisor = 9;
153
154 return clk_get_rate(clk->parent) / divisor;
155}
156
157static struct clk s3c2440_clk_fclk_n = {
158 .name = "fclk_n",
159 .parent = &clk_f,
160 .ops = &(struct clk_ops) {
161 .get_rate = s3c2440_fclk_n_getrate,
162 },
163};
164
165static struct clk_lookup s3c2440_clk_lookup[] = {
166 CLKDEV_INIT(NULL, "clk_uart_baud1", &s3c24xx_uclk),
167 CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p),
168 CLKDEV_INIT(NULL, "clk_uart_baud3", &s3c2440_clk_fclk_n),
169 CLKDEV_INIT("s3c2440-uart.0", "uart", &s3c24xx_clk_uart0),
170 CLKDEV_INIT("s3c2440-uart.1", "uart", &s3c24xx_clk_uart1),
171 CLKDEV_INIT("s3c2440-uart.2", "uart", &s3c24xx_clk_uart2),
172 CLKDEV_INIT("s3c2440-camif", "camera", &s3c2440_clk_cam_upll),
173};
174
175static int __init_refok s3c2440_clk_add(struct device *dev, struct subsys_interface *sif)
176{
177 struct clk *clock_upll;
178 struct clk *clock_h;
179 struct clk *clock_p;
180
181 clock_p = clk_get(NULL, "pclk");
182 clock_h = clk_get(NULL, "hclk");
183 clock_upll = clk_get(NULL, "upll");
184
185 if (IS_ERR(clock_p) || IS_ERR(clock_h) || IS_ERR(clock_upll)) {
186 printk(KERN_ERR "S3C2440: Failed to get parent clocks\n");
187 return -EINVAL;
188 }
189
190 s3c2440_clk_cam.parent = clock_h;
191 s3c2440_clk_ac97.parent = clock_p;
192 s3c2440_clk_cam_upll.parent = clock_upll;
193 s3c24xx_register_clock(&s3c2440_clk_fclk_n);
194
195 s3c24xx_register_clock(&s3c2440_clk_ac97);
196 s3c24xx_register_clock(&s3c2440_clk_cam);
197 s3c24xx_register_clock(&s3c2440_clk_cam_upll);
198 clkdev_add_table(s3c2440_clk_lookup, ARRAY_SIZE(s3c2440_clk_lookup));
199
200 clk_disable(&s3c2440_clk_ac97);
201 clk_disable(&s3c2440_clk_cam);
202
203 return 0;
204}
205
206static struct subsys_interface s3c2440_clk_interface = {
207 .name = "s3c2440_clk",
208 .subsys = &s3c2440_subsys,
209 .add_dev = s3c2440_clk_add,
210};
211
212static __init int s3c24xx_clk_init(void)
213{
214 return subsys_interface_register(&s3c2440_clk_interface);
215}
216
217arch_initcall(s3c24xx_clk_init);
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2443.c b/arch/arm/mach-s3c24xx/clock-s3c2443.c
deleted file mode 100644
index 76cd31f7804e..000000000000
--- a/arch/arm/mach-s3c24xx/clock-s3c2443.c
+++ /dev/null
@@ -1,212 +0,0 @@
1/* linux/arch/arm/mach-s3c2443/clock.c
2 *
3 * Copyright (c) 2007, 2010 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2443 Clock control support
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 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21*/
22
23#include <linux/init.h>
24
25#include <linux/module.h>
26#include <linux/kernel.h>
27#include <linux/list.h>
28#include <linux/errno.h>
29#include <linux/err.h>
30#include <linux/device.h>
31#include <linux/clk.h>
32#include <linux/mutex.h>
33#include <linux/serial_core.h>
34#include <linux/io.h>
35
36#include <asm/mach/map.h>
37
38#include <mach/hardware.h>
39
40#include <mach/regs-s3c2443-clock.h>
41
42#include <plat/cpu-freq.h>
43
44#include <plat/clock.h>
45#include <plat/clock-clksrc.h>
46#include <plat/cpu.h>
47
48/* We currently have to assume that the system is running
49 * from the XTPll input, and that all ***REFCLKs are being
50 * fed from it, as we cannot read the state of OM[4] from
51 * software.
52 *
53 * It would be possible for each board initialisation to
54 * set the correct muxing at initialisation
55*/
56
57/* clock selections */
58
59/* armdiv
60 *
61 * this clock is sourced from msysclk and can have a number of
62 * divider values applied to it to then be fed into armclk.
63 * The real clock definition is done in s3c2443-clock.c,
64 * only the armdiv divisor table must be defined here.
65*/
66
67static unsigned int armdiv[16] = {
68 [S3C2443_CLKDIV0_ARMDIV_1 >> S3C2443_CLKDIV0_ARMDIV_SHIFT] = 1,
69 [S3C2443_CLKDIV0_ARMDIV_2 >> S3C2443_CLKDIV0_ARMDIV_SHIFT] = 2,
70 [S3C2443_CLKDIV0_ARMDIV_3 >> S3C2443_CLKDIV0_ARMDIV_SHIFT] = 3,
71 [S3C2443_CLKDIV0_ARMDIV_4 >> S3C2443_CLKDIV0_ARMDIV_SHIFT] = 4,
72 [S3C2443_CLKDIV0_ARMDIV_6 >> S3C2443_CLKDIV0_ARMDIV_SHIFT] = 6,
73 [S3C2443_CLKDIV0_ARMDIV_8 >> S3C2443_CLKDIV0_ARMDIV_SHIFT] = 8,
74 [S3C2443_CLKDIV0_ARMDIV_12 >> S3C2443_CLKDIV0_ARMDIV_SHIFT] = 12,
75 [S3C2443_CLKDIV0_ARMDIV_16 >> S3C2443_CLKDIV0_ARMDIV_SHIFT] = 16,
76};
77
78/* hsspi
79 *
80 * high-speed spi clock, sourced from esysclk
81*/
82
83static struct clksrc_clk clk_hsspi = {
84 .clk = {
85 .name = "hsspi-if",
86 .parent = &clk_esysclk.clk,
87 .ctrlbit = S3C2443_SCLKCON_HSSPICLK,
88 .enable = s3c2443_clkcon_enable_s,
89 },
90 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 4 },
91};
92
93
94/* clk_hsmcc_div
95 *
96 * this clock is sourced from epll, and is fed through a divider,
97 * to a mux controlled by sclkcon where either it or a extclk can
98 * be fed to the hsmmc block
99*/
100
101static struct clksrc_clk clk_hsmmc_div = {
102 .clk = {
103 .name = "hsmmc-div",
104 .devname = "s3c-sdhci.1",
105 .parent = &clk_esysclk.clk,
106 },
107 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 },
108};
109
110static int s3c2443_setparent_hsmmc(struct clk *clk, struct clk *parent)
111{
112 unsigned long clksrc = __raw_readl(S3C2443_SCLKCON);
113
114 clksrc &= ~(S3C2443_SCLKCON_HSMMCCLK_EXT |
115 S3C2443_SCLKCON_HSMMCCLK_EPLL);
116
117 if (parent == &clk_epll)
118 clksrc |= S3C2443_SCLKCON_HSMMCCLK_EPLL;
119 else if (parent == &clk_ext)
120 clksrc |= S3C2443_SCLKCON_HSMMCCLK_EXT;
121 else
122 return -EINVAL;
123
124 if (clk->usage > 0) {
125 __raw_writel(clksrc, S3C2443_SCLKCON);
126 }
127
128 clk->parent = parent;
129 return 0;
130}
131
132static int s3c2443_enable_hsmmc(struct clk *clk, int enable)
133{
134 return s3c2443_setparent_hsmmc(clk, clk->parent);
135}
136
137static struct clk clk_hsmmc = {
138 .name = "hsmmc-if",
139 .devname = "s3c-sdhci.1",
140 .parent = &clk_hsmmc_div.clk,
141 .enable = s3c2443_enable_hsmmc,
142 .ops = &(struct clk_ops) {
143 .set_parent = s3c2443_setparent_hsmmc,
144 },
145};
146
147/* standard clock definitions */
148
149static struct clk init_clocks_off[] = {
150 {
151 .name = "sdi",
152 .parent = &clk_p,
153 .enable = s3c2443_clkcon_enable_p,
154 .ctrlbit = S3C2443_PCLKCON_SDI,
155 }, {
156 .name = "spi",
157 .devname = "s3c2410-spi.0",
158 .parent = &clk_p,
159 .enable = s3c2443_clkcon_enable_p,
160 .ctrlbit = S3C2443_PCLKCON_SPI1,
161 }
162};
163
164/* clocks to add straight away */
165
166static struct clksrc_clk *clksrcs[] __initdata = {
167 &clk_hsspi,
168 &clk_hsmmc_div,
169};
170
171static struct clk *clks[] __initdata = {
172 &clk_hsmmc,
173};
174
175static struct clk_lookup s3c2443_clk_lookup[] = {
176 CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &clk_hsmmc),
177 CLKDEV_INIT("s3c2443-spi.0", "spi_busclk2", &clk_hsspi.clk),
178};
179
180void __init s3c2443_init_clocks(int xtal)
181{
182 unsigned long epllcon = __raw_readl(S3C2443_EPLLCON);
183 int ptr;
184
185 clk_epll.rate = s3c2443_get_epll(epllcon, xtal);
186 clk_epll.parent = &clk_epllref.clk;
187
188 s3c2443_common_init_clocks(xtal, s3c2443_get_mpll,
189 armdiv, ARRAY_SIZE(armdiv),
190 S3C2443_CLKDIV0_ARMDIV_MASK);
191
192 s3c24xx_register_clocks(clks, ARRAY_SIZE(clks));
193
194 for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
195 s3c_register_clksrc(clksrcs[ptr], 1);
196
197 /* We must be careful disabling the clocks we are not intending to
198 * be using at boot time, as subsystems such as the LCD which do
199 * their own DMA requests to the bus can cause the system to lockup
200 * if they where in the middle of requesting bus access.
201 *
202 * Disabling the LCD clock if the LCD is active is very dangerous,
203 * and therefore the bootloader should be careful to not enable
204 * the LCD clock if it is not needed.
205 */
206
207 /* install (and disable) the clocks we do not need immediately */
208
209 s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
210 s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
211 clkdev_add_table(s3c2443_clk_lookup, ARRAY_SIZE(s3c2443_clk_lookup));
212}
diff --git a/arch/arm/mach-s3c24xx/clock-s3c244x.c b/arch/arm/mach-s3c24xx/clock-s3c244x.c
deleted file mode 100644
index 6d9b688c442b..000000000000
--- a/arch/arm/mach-s3c24xx/clock-s3c244x.c
+++ /dev/null
@@ -1,141 +0,0 @@
1/* linux/arch/arm/plat-s3c24xx/s3c24xx-clock.c
2 *
3 * Copyright (c) 2004-2008 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * S3C2440/S3C2442 Common clock support
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 * This program 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 License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22*/
23
24#include <linux/init.h>
25#include <linux/module.h>
26#include <linux/kernel.h>
27#include <linux/list.h>
28#include <linux/errno.h>
29#include <linux/err.h>
30#include <linux/device.h>
31#include <linux/interrupt.h>
32#include <linux/ioport.h>
33#include <linux/clk.h>
34#include <linux/io.h>
35
36#include <mach/hardware.h>
37#include <linux/atomic.h>
38#include <asm/irq.h>
39
40#include <mach/regs-clock.h>
41
42#include <plat/clock.h>
43#include <plat/cpu.h>
44
45static int s3c2440_setparent_armclk(struct clk *clk, struct clk *parent)
46{
47 unsigned long camdivn;
48 unsigned long dvs;
49
50 if (parent == &clk_f)
51 dvs = 0;
52 else if (parent == &clk_h)
53 dvs = S3C2440_CAMDIVN_DVSEN;
54 else
55 return -EINVAL;
56
57 clk->parent = parent;
58
59 camdivn = __raw_readl(S3C2440_CAMDIVN);
60 camdivn &= ~S3C2440_CAMDIVN_DVSEN;
61 camdivn |= dvs;
62 __raw_writel(camdivn, S3C2440_CAMDIVN);
63
64 return 0;
65}
66
67static struct clk clk_arm = {
68 .name = "armclk",
69 .id = -1,
70 .ops = &(struct clk_ops) {
71 .set_parent = s3c2440_setparent_armclk,
72 },
73};
74
75static int s3c244x_clk_add(struct device *dev, struct subsys_interface *sif)
76{
77 unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN);
78 unsigned long clkdivn;
79 struct clk *clock_upll;
80 int ret;
81
82 printk("S3C244X: Clock Support, DVS %s\n",
83 (camdivn & S3C2440_CAMDIVN_DVSEN) ? "on" : "off");
84
85 clk_arm.parent = (camdivn & S3C2440_CAMDIVN_DVSEN) ? &clk_h : &clk_f;
86
87 ret = s3c24xx_register_clock(&clk_arm);
88 if (ret < 0) {
89 printk(KERN_ERR "S3C24XX: Failed to add armclk (%d)\n", ret);
90 return ret;
91 }
92
93 clock_upll = clk_get(NULL, "upll");
94 if (IS_ERR(clock_upll)) {
95 printk(KERN_ERR "S3C244X: Failed to get upll clock\n");
96 return -ENOENT;
97 }
98
99 /* check rate of UPLL, and if it is near 96MHz, then change
100 * to using half the UPLL rate for the system */
101
102 if (clk_get_rate(clock_upll) > (94 * MHZ)) {
103 clk_usb_bus.rate = clk_get_rate(clock_upll) / 2;
104
105 spin_lock(&clocks_lock);
106
107 clkdivn = __raw_readl(S3C2410_CLKDIVN);
108 clkdivn |= S3C2440_CLKDIVN_UCLK;
109 __raw_writel(clkdivn, S3C2410_CLKDIVN);
110
111 spin_unlock(&clocks_lock);
112 }
113
114 return 0;
115}
116
117static struct subsys_interface s3c2440_clk_interface = {
118 .name = "s3c2440_clk",
119 .subsys = &s3c2440_subsys,
120 .add_dev = s3c244x_clk_add,
121};
122
123static int s3c2440_clk_init(void)
124{
125 return subsys_interface_register(&s3c2440_clk_interface);
126}
127
128arch_initcall(s3c2440_clk_init);
129
130static struct subsys_interface s3c2442_clk_interface = {
131 .name = "s3c2442_clk",
132 .subsys = &s3c2442_subsys,
133 .add_dev = s3c244x_clk_add,
134};
135
136static int s3c2442_clk_init(void)
137{
138 return subsys_interface_register(&s3c2442_clk_interface);
139}
140
141arch_initcall(s3c2442_clk_init);
diff --git a/arch/arm/mach-s3c24xx/common-s3c2443.c b/arch/arm/mach-s3c24xx/common-s3c2443.c
deleted file mode 100644
index 65d3eef73090..000000000000
--- a/arch/arm/mach-s3c24xx/common-s3c2443.c
+++ /dev/null
@@ -1,675 +0,0 @@
1/*
2 * Common code for SoCs starting with the S3C2443
3 *
4 * Copyright (c) 2007, 2010 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
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
18#include <linux/init.h>
19#include <linux/clk.h>
20#include <linux/io.h>
21
22#include <mach/regs-s3c2443-clock.h>
23
24#include <plat/clock.h>
25#include <plat/clock-clksrc.h>
26#include <plat/cpu.h>
27
28#include <plat/cpu-freq.h>
29
30
31static int s3c2443_gate(void __iomem *reg, struct clk *clk, int enable)
32{
33 u32 ctrlbit = clk->ctrlbit;
34 u32 con = __raw_readl(reg);
35
36 if (enable)
37 con |= ctrlbit;
38 else
39 con &= ~ctrlbit;
40
41 __raw_writel(con, reg);
42 return 0;
43}
44
45int s3c2443_clkcon_enable_h(struct clk *clk, int enable)
46{
47 return s3c2443_gate(S3C2443_HCLKCON, clk, enable);
48}
49
50int s3c2443_clkcon_enable_p(struct clk *clk, int enable)
51{
52 return s3c2443_gate(S3C2443_PCLKCON, clk, enable);
53}
54
55int s3c2443_clkcon_enable_s(struct clk *clk, int enable)
56{
57 return s3c2443_gate(S3C2443_SCLKCON, clk, enable);
58}
59
60/* mpllref is a direct descendant of clk_xtal by default, but it is not
61 * elided as the EPLL can be either sourced by the XTAL or EXTCLK and as
62 * such directly equating the two source clocks is impossible.
63 */
64static struct clk clk_mpllref = {
65 .name = "mpllref",
66 .parent = &clk_xtal,
67};
68
69static struct clk *clk_epllref_sources[] = {
70 [0] = &clk_mpllref,
71 [1] = &clk_mpllref,
72 [2] = &clk_xtal,
73 [3] = &clk_ext,
74};
75
76struct clksrc_clk clk_epllref = {
77 .clk = {
78 .name = "epllref",
79 },
80 .sources = &(struct clksrc_sources) {
81 .sources = clk_epllref_sources,
82 .nr_sources = ARRAY_SIZE(clk_epllref_sources),
83 },
84 .reg_src = { .reg = S3C2443_CLKSRC, .size = 2, .shift = 7 },
85};
86
87/* esysclk
88 *
89 * this is sourced from either the EPLL or the EPLLref clock
90*/
91
92static struct clk *clk_sysclk_sources[] = {
93 [0] = &clk_epllref.clk,
94 [1] = &clk_epll,
95};
96
97struct clksrc_clk clk_esysclk = {
98 .clk = {
99 .name = "esysclk",
100 .parent = &clk_epll,
101 },
102 .sources = &(struct clksrc_sources) {
103 .sources = clk_sysclk_sources,
104 .nr_sources = ARRAY_SIZE(clk_sysclk_sources),
105 },
106 .reg_src = { .reg = S3C2443_CLKSRC, .size = 1, .shift = 6 },
107};
108
109static unsigned long s3c2443_getrate_mdivclk(struct clk *clk)
110{
111 unsigned long parent_rate = clk_get_rate(clk->parent);
112 unsigned long div = __raw_readl(S3C2443_CLKDIV0);
113
114 div &= S3C2443_CLKDIV0_EXTDIV_MASK;
115 div >>= (S3C2443_CLKDIV0_EXTDIV_SHIFT-1); /* x2 */
116
117 return parent_rate / (div + 1);
118}
119
120static struct clk clk_mdivclk = {
121 .name = "mdivclk",
122 .parent = &clk_mpllref,
123 .ops = &(struct clk_ops) {
124 .get_rate = s3c2443_getrate_mdivclk,
125 },
126};
127
128static struct clk *clk_msysclk_sources[] = {
129 [0] = &clk_mpllref,
130 [1] = &clk_mpll,
131 [2] = &clk_mdivclk,
132 [3] = &clk_mpllref,
133};
134
135static struct clksrc_clk clk_msysclk = {
136 .clk = {
137 .name = "msysclk",
138 .parent = &clk_xtal,
139 },
140 .sources = &(struct clksrc_sources) {
141 .sources = clk_msysclk_sources,
142 .nr_sources = ARRAY_SIZE(clk_msysclk_sources),
143 },
144 .reg_src = { .reg = S3C2443_CLKSRC, .size = 2, .shift = 3 },
145};
146
147/* prediv
148 *
149 * this divides the msysclk down to pass to h/p/etc.
150 */
151
152static unsigned long s3c2443_prediv_getrate(struct clk *clk)
153{
154 unsigned long rate = clk_get_rate(clk->parent);
155 unsigned long clkdiv0 = __raw_readl(S3C2443_CLKDIV0);
156
157 clkdiv0 &= S3C2443_CLKDIV0_PREDIV_MASK;
158 clkdiv0 >>= S3C2443_CLKDIV0_PREDIV_SHIFT;
159
160 return rate / (clkdiv0 + 1);
161}
162
163static struct clk clk_prediv = {
164 .name = "prediv",
165 .parent = &clk_msysclk.clk,
166 .ops = &(struct clk_ops) {
167 .get_rate = s3c2443_prediv_getrate,
168 },
169};
170
171/* hclk divider
172 *
173 * divides the prediv and provides the hclk.
174 */
175
176static unsigned long s3c2443_hclkdiv_getrate(struct clk *clk)
177{
178 unsigned long rate = clk_get_rate(clk->parent);
179 unsigned long clkdiv0 = __raw_readl(S3C2443_CLKDIV0);
180
181 clkdiv0 &= S3C2443_CLKDIV0_HCLKDIV_MASK;
182
183 return rate / (clkdiv0 + 1);
184}
185
186static struct clk_ops clk_h_ops = {
187 .get_rate = s3c2443_hclkdiv_getrate,
188};
189
190/* pclk divider
191 *
192 * divides the hclk and provides the pclk.
193 */
194
195static unsigned long s3c2443_pclkdiv_getrate(struct clk *clk)
196{
197 unsigned long rate = clk_get_rate(clk->parent);
198 unsigned long clkdiv0 = __raw_readl(S3C2443_CLKDIV0);
199
200 clkdiv0 = ((clkdiv0 & S3C2443_CLKDIV0_HALF_PCLK) ? 1 : 0);
201
202 return rate / (clkdiv0 + 1);
203}
204
205static struct clk_ops clk_p_ops = {
206 .get_rate = s3c2443_pclkdiv_getrate,
207};
208
209/* armdiv
210 *
211 * this clock is sourced from msysclk and can have a number of
212 * divider values applied to it to then be fed into armclk.
213*/
214
215static unsigned int *armdiv;
216static int nr_armdiv;
217static int armdivmask;
218
219static unsigned long s3c2443_armclk_roundrate(struct clk *clk,
220 unsigned long rate)
221{
222 unsigned long parent = clk_get_rate(clk->parent);
223 unsigned long calc;
224 unsigned best = 256; /* bigger than any value */
225 unsigned div;
226 int ptr;
227
228 if (!nr_armdiv)
229 return -EINVAL;
230
231 for (ptr = 0; ptr < nr_armdiv; ptr++) {
232 div = armdiv[ptr];
233 if (div) {
234 /* cpufreq provides 266mhz as 266666000 not 266666666 */
235 calc = (parent / div / 1000) * 1000;
236 if (calc <= rate && div < best)
237 best = div;
238 }
239 }
240
241 return parent / best;
242}
243
244static unsigned long s3c2443_armclk_getrate(struct clk *clk)
245{
246 unsigned long rate = clk_get_rate(clk->parent);
247 unsigned long clkcon0;
248 int val;
249
250 if (!nr_armdiv || !armdivmask)
251 return -EINVAL;
252
253 clkcon0 = __raw_readl(S3C2443_CLKDIV0);
254 clkcon0 &= armdivmask;
255 val = clkcon0 >> S3C2443_CLKDIV0_ARMDIV_SHIFT;
256
257 return rate / armdiv[val];
258}
259
260static int s3c2443_armclk_setrate(struct clk *clk, unsigned long rate)
261{
262 unsigned long parent = clk_get_rate(clk->parent);
263 unsigned long calc;
264 unsigned div;
265 unsigned best = 256; /* bigger than any value */
266 int ptr;
267 int val = -1;
268
269 if (!nr_armdiv || !armdivmask)
270 return -EINVAL;
271
272 for (ptr = 0; ptr < nr_armdiv; ptr++) {
273 div = armdiv[ptr];
274 if (div) {
275 /* cpufreq provides 266mhz as 266666000 not 266666666 */
276 calc = (parent / div / 1000) * 1000;
277 if (calc <= rate && div < best) {
278 best = div;
279 val = ptr;
280 }
281 }
282 }
283
284 if (val >= 0) {
285 unsigned long clkcon0;
286
287 clkcon0 = __raw_readl(S3C2443_CLKDIV0);
288 clkcon0 &= ~armdivmask;
289 clkcon0 |= val << S3C2443_CLKDIV0_ARMDIV_SHIFT;
290 __raw_writel(clkcon0, S3C2443_CLKDIV0);
291 }
292
293 return (val == -1) ? -EINVAL : 0;
294}
295
296static struct clk clk_armdiv = {
297 .name = "armdiv",
298 .parent = &clk_msysclk.clk,
299 .ops = &(struct clk_ops) {
300 .round_rate = s3c2443_armclk_roundrate,
301 .get_rate = s3c2443_armclk_getrate,
302 .set_rate = s3c2443_armclk_setrate,
303 },
304};
305
306/* armclk
307 *
308 * this is the clock fed into the ARM core itself, from armdiv or from hclk.
309 */
310
311static struct clk *clk_arm_sources[] = {
312 [0] = &clk_armdiv,
313 [1] = &clk_h,
314};
315
316static struct clksrc_clk clk_arm = {
317 .clk = {
318 .name = "armclk",
319 },
320 .sources = &(struct clksrc_sources) {
321 .sources = clk_arm_sources,
322 .nr_sources = ARRAY_SIZE(clk_arm_sources),
323 },
324 .reg_src = { .reg = S3C2443_CLKDIV0, .size = 1, .shift = 13 },
325};
326
327/* usbhost
328 *
329 * usb host bus-clock, usually 48MHz to provide USB bus clock timing
330*/
331
332static struct clksrc_clk clk_usb_bus_host = {
333 .clk = {
334 .name = "usb-bus-host-parent",
335 .parent = &clk_esysclk.clk,
336 .ctrlbit = S3C2443_SCLKCON_USBHOST,
337 .enable = s3c2443_clkcon_enable_s,
338 },
339 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 4 },
340};
341
342/* common clksrc clocks */
343
344static struct clksrc_clk clksrc_clks[] = {
345 {
346 /* camera interface bus-clock, divided down from esysclk */
347 .clk = {
348 .name = "camif-upll", /* same as 2440 name */
349 .parent = &clk_esysclk.clk,
350 .ctrlbit = S3C2443_SCLKCON_CAMCLK,
351 .enable = s3c2443_clkcon_enable_s,
352 },
353 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 26 },
354 }, {
355 .clk = {
356 .name = "display-if",
357 .parent = &clk_esysclk.clk,
358 .ctrlbit = S3C2443_SCLKCON_DISPCLK,
359 .enable = s3c2443_clkcon_enable_s,
360 },
361 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 8, .shift = 16 },
362 },
363};
364
365static struct clksrc_clk clk_esys_uart = {
366 /* ART baud-rate clock sourced from esysclk via a divisor */
367 .clk = {
368 .name = "uartclk",
369 .parent = &clk_esysclk.clk,
370 },
371 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 8 },
372};
373
374static struct clk clk_i2s_ext = {
375 .name = "i2s-ext",
376};
377
378/* i2s_eplldiv
379 *
380 * This clock is the output from the I2S divisor of ESYSCLK, and is separate
381 * from the mux that comes after it (cannot merge into one single clock)
382*/
383
384static struct clksrc_clk clk_i2s_eplldiv = {
385 .clk = {
386 .name = "i2s-eplldiv",
387 .parent = &clk_esysclk.clk,
388 },
389 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 12, },
390};
391
392/* i2s-ref
393 *
394 * i2s bus reference clock, selectable from external, esysclk or epllref
395 *
396 * Note, this used to be two clocks, but was compressed into one.
397*/
398
399static struct clk *clk_i2s_srclist[] = {
400 [0] = &clk_i2s_eplldiv.clk,
401 [1] = &clk_i2s_ext,
402 [2] = &clk_epllref.clk,
403 [3] = &clk_epllref.clk,
404};
405
406static struct clksrc_clk clk_i2s = {
407 .clk = {
408 .name = "i2s-if",
409 .ctrlbit = S3C2443_SCLKCON_I2SCLK,
410 .enable = s3c2443_clkcon_enable_s,
411
412 },
413 .sources = &(struct clksrc_sources) {
414 .sources = clk_i2s_srclist,
415 .nr_sources = ARRAY_SIZE(clk_i2s_srclist),
416 },
417 .reg_src = { .reg = S3C2443_CLKSRC, .size = 2, .shift = 14 },
418};
419
420static struct clk init_clocks_off[] = {
421 {
422 .name = "iis",
423 .parent = &clk_p,
424 .enable = s3c2443_clkcon_enable_p,
425 .ctrlbit = S3C2443_PCLKCON_IIS,
426 }, {
427 .name = "adc",
428 .parent = &clk_p,
429 .enable = s3c2443_clkcon_enable_p,
430 .ctrlbit = S3C2443_PCLKCON_ADC,
431 }, {
432 .name = "i2c",
433 .parent = &clk_p,
434 .enable = s3c2443_clkcon_enable_p,
435 .ctrlbit = S3C2443_PCLKCON_IIC,
436 }
437};
438
439static struct clk init_clocks[] = {
440 {
441 .name = "dma.0",
442 .parent = &clk_h,
443 .enable = s3c2443_clkcon_enable_h,
444 .ctrlbit = S3C2443_HCLKCON_DMA0,
445 }, {
446 .name = "dma.1",
447 .parent = &clk_h,
448 .enable = s3c2443_clkcon_enable_h,
449 .ctrlbit = S3C2443_HCLKCON_DMA1,
450 }, {
451 .name = "dma.2",
452 .parent = &clk_h,
453 .enable = s3c2443_clkcon_enable_h,
454 .ctrlbit = S3C2443_HCLKCON_DMA2,
455 }, {
456 .name = "dma.3",
457 .parent = &clk_h,
458 .enable = s3c2443_clkcon_enable_h,
459 .ctrlbit = S3C2443_HCLKCON_DMA3,
460 }, {
461 .name = "dma.4",
462 .parent = &clk_h,
463 .enable = s3c2443_clkcon_enable_h,
464 .ctrlbit = S3C2443_HCLKCON_DMA4,
465 }, {
466 .name = "dma.5",
467 .parent = &clk_h,
468 .enable = s3c2443_clkcon_enable_h,
469 .ctrlbit = S3C2443_HCLKCON_DMA5,
470 }, {
471 .name = "gpio",
472 .parent = &clk_p,
473 .enable = s3c2443_clkcon_enable_p,
474 .ctrlbit = S3C2443_PCLKCON_GPIO,
475 }, {
476 .name = "usb-host",
477 .parent = &clk_h,
478 .enable = s3c2443_clkcon_enable_h,
479 .ctrlbit = S3C2443_HCLKCON_USBH,
480 }, {
481 .name = "usb-device",
482 .parent = &clk_h,
483 .enable = s3c2443_clkcon_enable_h,
484 .ctrlbit = S3C2443_HCLKCON_USBD,
485 }, {
486 .name = "lcd",
487 .parent = &clk_h,
488 .enable = s3c2443_clkcon_enable_h,
489 .ctrlbit = S3C2443_HCLKCON_LCDC,
490
491 }, {
492 .name = "timers",
493 .parent = &clk_p,
494 .enable = s3c2443_clkcon_enable_p,
495 .ctrlbit = S3C2443_PCLKCON_PWMT,
496 }, {
497 .name = "cfc",
498 .parent = &clk_h,
499 .enable = s3c2443_clkcon_enable_h,
500 .ctrlbit = S3C2443_HCLKCON_CFC,
501 }, {
502 .name = "ssmc",
503 .parent = &clk_h,
504 .enable = s3c2443_clkcon_enable_h,
505 .ctrlbit = S3C2443_HCLKCON_SSMC,
506 }, {
507 .name = "uart",
508 .devname = "s3c2440-uart.0",
509 .parent = &clk_p,
510 .enable = s3c2443_clkcon_enable_p,
511 .ctrlbit = S3C2443_PCLKCON_UART0,
512 }, {
513 .name = "uart",
514 .devname = "s3c2440-uart.1",
515 .parent = &clk_p,
516 .enable = s3c2443_clkcon_enable_p,
517 .ctrlbit = S3C2443_PCLKCON_UART1,
518 }, {
519 .name = "uart",
520 .devname = "s3c2440-uart.2",
521 .parent = &clk_p,
522 .enable = s3c2443_clkcon_enable_p,
523 .ctrlbit = S3C2443_PCLKCON_UART2,
524 }, {
525 .name = "uart",
526 .devname = "s3c2440-uart.3",
527 .parent = &clk_p,
528 .enable = s3c2443_clkcon_enable_p,
529 .ctrlbit = S3C2443_PCLKCON_UART3,
530 }, {
531 .name = "rtc",
532 .parent = &clk_p,
533 .enable = s3c2443_clkcon_enable_p,
534 .ctrlbit = S3C2443_PCLKCON_RTC,
535 }, {
536 .name = "watchdog",
537 .parent = &clk_p,
538 .ctrlbit = S3C2443_PCLKCON_WDT,
539 }, {
540 .name = "ac97",
541 .parent = &clk_p,
542 .ctrlbit = S3C2443_PCLKCON_AC97,
543 }, {
544 .name = "nand",
545 .parent = &clk_h,
546 }, {
547 .name = "usb-bus-host",
548 .parent = &clk_usb_bus_host.clk,
549 }
550};
551
552static struct clk hsmmc1_clk = {
553 .name = "hsmmc",
554 .devname = "s3c-sdhci.1",
555 .parent = &clk_h,
556 .enable = s3c2443_clkcon_enable_h,
557 .ctrlbit = S3C2443_HCLKCON_HSMMC,
558};
559
560static struct clk hsspi_clk = {
561 .name = "spi",
562 .devname = "s3c2443-spi.0",
563 .parent = &clk_p,
564 .enable = s3c2443_clkcon_enable_p,
565 .ctrlbit = S3C2443_PCLKCON_HSSPI,
566};
567
568/* EPLLCON compatible enough to get on/off information */
569
570void __init_or_cpufreq s3c2443_common_setup_clocks(pll_fn get_mpll)
571{
572 unsigned long epllcon = __raw_readl(S3C2443_EPLLCON);
573 unsigned long mpllcon = __raw_readl(S3C2443_MPLLCON);
574 struct clk *xtal_clk;
575 unsigned long xtal;
576 unsigned long pll;
577 int ptr;
578
579 xtal_clk = clk_get(NULL, "xtal");
580 xtal = clk_get_rate(xtal_clk);
581 clk_put(xtal_clk);
582
583 pll = get_mpll(mpllcon, xtal);
584 clk_msysclk.clk.rate = pll;
585 clk_mpll.rate = pll;
586
587 printk("CPU: MPLL %s %ld.%03ld MHz, cpu %ld.%03ld MHz, mem %ld.%03ld MHz, pclk %ld.%03ld MHz\n",
588 (mpllcon & S3C2443_PLLCON_OFF) ? "off" : "on",
589 print_mhz(pll), print_mhz(clk_get_rate(&clk_armdiv)),
590 print_mhz(clk_get_rate(&clk_h)),
591 print_mhz(clk_get_rate(&clk_p)));
592
593 for (ptr = 0; ptr < ARRAY_SIZE(clksrc_clks); ptr++)
594 s3c_set_clksrc(&clksrc_clks[ptr], true);
595
596 /* ensure usb bus clock is within correct rate of 48MHz */
597
598 if (clk_get_rate(&clk_usb_bus_host.clk) != (48 * 1000 * 1000)) {
599 printk(KERN_INFO "Warning: USB host bus not at 48MHz\n");
600 clk_set_rate(&clk_usb_bus_host.clk, 48*1000*1000);
601 }
602
603 printk("CPU: EPLL %s %ld.%03ld MHz, usb-bus %ld.%03ld MHz\n",
604 (epllcon & S3C2443_PLLCON_OFF) ? "off" : "on",
605 print_mhz(clk_get_rate(&clk_epll)),
606 print_mhz(clk_get_rate(&clk_usb_bus)));
607}
608
609static struct clk *clks[] __initdata = {
610 &clk_prediv,
611 &clk_mpllref,
612 &clk_mdivclk,
613 &clk_ext,
614 &clk_epll,
615 &clk_usb_bus,
616 &clk_armdiv,
617 &hsmmc1_clk,
618 &hsspi_clk,
619};
620
621static struct clksrc_clk *clksrcs[] __initdata = {
622 &clk_i2s_eplldiv,
623 &clk_i2s,
624 &clk_usb_bus_host,
625 &clk_epllref,
626 &clk_esysclk,
627 &clk_msysclk,
628 &clk_arm,
629};
630
631static struct clk_lookup s3c2443_clk_lookup[] = {
632 CLKDEV_INIT(NULL, "clk_uart_baud1", &s3c24xx_uclk),
633 CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p),
634 CLKDEV_INIT(NULL, "clk_uart_baud3", &clk_esys_uart.clk),
635 CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.0", &hsmmc1_clk),
636 CLKDEV_INIT("s3c2443-spi.0", "spi_busclk0", &hsspi_clk),
637};
638
639void __init s3c2443_common_init_clocks(int xtal, pll_fn get_mpll,
640 unsigned int *divs, int nr_divs,
641 int divmask)
642{
643 int ptr;
644
645 armdiv = divs;
646 nr_armdiv = nr_divs;
647 armdivmask = divmask;
648
649 /* s3c2443 parents h clock from prediv */
650 clk_h.parent = &clk_prediv;
651 clk_h.ops = &clk_h_ops;
652
653 /* and p clock from h clock */
654 clk_p.parent = &clk_h;
655 clk_p.ops = &clk_p_ops;
656
657 clk_usb_bus.parent = &clk_usb_bus_host.clk;
658 clk_epll.parent = &clk_epllref.clk;
659
660 s3c24xx_register_baseclocks(xtal);
661 s3c24xx_register_clocks(clks, ARRAY_SIZE(clks));
662
663 for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
664 s3c_register_clksrc(clksrcs[ptr], 1);
665
666 s3c_register_clksrc(clksrc_clks, ARRAY_SIZE(clksrc_clks));
667 s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks));
668
669 /* See s3c2443/etc notes on disabling clocks at init time */
670 s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
671 s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
672 clkdev_add_table(s3c2443_clk_lookup, ARRAY_SIZE(s3c2443_clk_lookup));
673
674 s3c2443_common_setup_clocks(get_mpll);
675}
diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
index 1bc8e73c94f9..c0763b837745 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c24xx/common.c
@@ -53,6 +53,7 @@
53#include <plat/cpu-freq.h> 53#include <plat/cpu-freq.h>
54#include <plat/pll.h> 54#include <plat/pll.h>
55#include <plat/pwm-core.h> 55#include <plat/pwm-core.h>
56#include <plat/watchdog-reset.h>
56 57
57#include "common.h" 58#include "common.h"
58 59
@@ -73,7 +74,6 @@ static struct cpu_table cpu_ids[] __initdata = {
73 .idcode = 0x32410000, 74 .idcode = 0x32410000,
74 .idmask = 0xffffffff, 75 .idmask = 0xffffffff,
75 .map_io = s3c2410_map_io, 76 .map_io = s3c2410_map_io,
76 .init_clocks = s3c2410_init_clocks,
77 .init_uarts = s3c2410_init_uarts, 77 .init_uarts = s3c2410_init_uarts,
78 .init = s3c2410_init, 78 .init = s3c2410_init,
79 .name = name_s3c2410 79 .name = name_s3c2410
@@ -82,7 +82,6 @@ static struct cpu_table cpu_ids[] __initdata = {
82 .idcode = 0x32410002, 82 .idcode = 0x32410002,
83 .idmask = 0xffffffff, 83 .idmask = 0xffffffff,
84 .map_io = s3c2410_map_io, 84 .map_io = s3c2410_map_io,
85 .init_clocks = s3c2410_init_clocks,
86 .init_uarts = s3c2410_init_uarts, 85 .init_uarts = s3c2410_init_uarts,
87 .init = s3c2410a_init, 86 .init = s3c2410a_init,
88 .name = name_s3c2410a 87 .name = name_s3c2410a
@@ -91,7 +90,6 @@ static struct cpu_table cpu_ids[] __initdata = {
91 .idcode = 0x32440000, 90 .idcode = 0x32440000,
92 .idmask = 0xffffffff, 91 .idmask = 0xffffffff,
93 .map_io = s3c2440_map_io, 92 .map_io = s3c2440_map_io,
94 .init_clocks = s3c244x_init_clocks,
95 .init_uarts = s3c244x_init_uarts, 93 .init_uarts = s3c244x_init_uarts,
96 .init = s3c2440_init, 94 .init = s3c2440_init,
97 .name = name_s3c2440 95 .name = name_s3c2440
@@ -100,7 +98,6 @@ static struct cpu_table cpu_ids[] __initdata = {
100 .idcode = 0x32440001, 98 .idcode = 0x32440001,
101 .idmask = 0xffffffff, 99 .idmask = 0xffffffff,
102 .map_io = s3c2440_map_io, 100 .map_io = s3c2440_map_io,
103 .init_clocks = s3c244x_init_clocks,
104 .init_uarts = s3c244x_init_uarts, 101 .init_uarts = s3c244x_init_uarts,
105 .init = s3c2440_init, 102 .init = s3c2440_init,
106 .name = name_s3c2440a 103 .name = name_s3c2440a
@@ -109,7 +106,6 @@ static struct cpu_table cpu_ids[] __initdata = {
109 .idcode = 0x32440aaa, 106 .idcode = 0x32440aaa,
110 .idmask = 0xffffffff, 107 .idmask = 0xffffffff,
111 .map_io = s3c2442_map_io, 108 .map_io = s3c2442_map_io,
112 .init_clocks = s3c244x_init_clocks,
113 .init_uarts = s3c244x_init_uarts, 109 .init_uarts = s3c244x_init_uarts,
114 .init = s3c2442_init, 110 .init = s3c2442_init,
115 .name = name_s3c2442 111 .name = name_s3c2442
@@ -118,7 +114,6 @@ static struct cpu_table cpu_ids[] __initdata = {
118 .idcode = 0x32440aab, 114 .idcode = 0x32440aab,
119 .idmask = 0xffffffff, 115 .idmask = 0xffffffff,
120 .map_io = s3c2442_map_io, 116 .map_io = s3c2442_map_io,
121 .init_clocks = s3c244x_init_clocks,
122 .init_uarts = s3c244x_init_uarts, 117 .init_uarts = s3c244x_init_uarts,
123 .init = s3c2442_init, 118 .init = s3c2442_init,
124 .name = name_s3c2442b 119 .name = name_s3c2442b
@@ -127,7 +122,6 @@ static struct cpu_table cpu_ids[] __initdata = {
127 .idcode = 0x32412001, 122 .idcode = 0x32412001,
128 .idmask = 0xffffffff, 123 .idmask = 0xffffffff,
129 .map_io = s3c2412_map_io, 124 .map_io = s3c2412_map_io,
130 .init_clocks = s3c2412_init_clocks,
131 .init_uarts = s3c2412_init_uarts, 125 .init_uarts = s3c2412_init_uarts,
132 .init = s3c2412_init, 126 .init = s3c2412_init,
133 .name = name_s3c2412, 127 .name = name_s3c2412,
@@ -136,7 +130,6 @@ static struct cpu_table cpu_ids[] __initdata = {
136 .idcode = 0x32412003, 130 .idcode = 0x32412003,
137 .idmask = 0xffffffff, 131 .idmask = 0xffffffff,
138 .map_io = s3c2412_map_io, 132 .map_io = s3c2412_map_io,
139 .init_clocks = s3c2412_init_clocks,
140 .init_uarts = s3c2412_init_uarts, 133 .init_uarts = s3c2412_init_uarts,
141 .init = s3c2412_init, 134 .init = s3c2412_init,
142 .name = name_s3c2412, 135 .name = name_s3c2412,
@@ -145,7 +138,6 @@ static struct cpu_table cpu_ids[] __initdata = {
145 .idcode = 0x32450003, 138 .idcode = 0x32450003,
146 .idmask = 0xffffffff, 139 .idmask = 0xffffffff,
147 .map_io = s3c2416_map_io, 140 .map_io = s3c2416_map_io,
148 .init_clocks = s3c2416_init_clocks,
149 .init_uarts = s3c2416_init_uarts, 141 .init_uarts = s3c2416_init_uarts,
150 .init = s3c2416_init, 142 .init = s3c2416_init,
151 .name = name_s3c2416, 143 .name = name_s3c2416,
@@ -154,7 +146,6 @@ static struct cpu_table cpu_ids[] __initdata = {
154 .idcode = 0x32443001, 146 .idcode = 0x32443001,
155 .idmask = 0xffffffff, 147 .idmask = 0xffffffff,
156 .map_io = s3c2443_map_io, 148 .map_io = s3c2443_map_io,
157 .init_clocks = s3c2443_init_clocks,
158 .init_uarts = s3c2443_init_uarts, 149 .init_uarts = s3c2443_init_uarts,
159 .init = s3c2443_init, 150 .init = s3c2443_init,
160 .name = name_s3c2443, 151 .name = name_s3c2443,
@@ -316,21 +307,6 @@ struct s3c24xx_uart_resources s3c2410_uart_resources[] __initdata = {
316 }, 307 },
317}; 308};
318 309
319/* initialise all the clocks */
320
321void __init_or_cpufreq s3c24xx_setup_clocks(unsigned long fclk,
322 unsigned long hclk,
323 unsigned long pclk)
324{
325 clk_upll.rate = s3c24xx_get_pll(__raw_readl(S3C2410_UPLLCON),
326 clk_xtal.rate);
327
328 clk_mpll.rate = fclk;
329 clk_h.rate = hclk;
330 clk_p.rate = pclk;
331 clk_f.rate = fclk;
332}
333
334#if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \ 310#if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \
335 defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) 311 defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442)
336static struct resource s3c2410_dma_resource[] = { 312static struct resource s3c2410_dma_resource[] = {
@@ -534,3 +510,62 @@ struct platform_device s3c2443_device_dma = {
534 }, 510 },
535}; 511};
536#endif 512#endif
513
514#if defined(CONFIG_COMMON_CLK) && defined(CONFIG_CPU_S3C2410)
515void __init s3c2410_init_clocks(int xtal)
516{
517 s3c2410_common_clk_init(NULL, xtal, 0, S3C24XX_VA_CLKPWR);
518 samsung_wdt_reset_init(S3C24XX_VA_WATCHDOG);
519}
520#endif
521
522#ifdef CONFIG_CPU_S3C2412
523void __init s3c2412_init_clocks(int xtal)
524{
525 s3c2412_common_clk_init(NULL, xtal, 0, S3C24XX_VA_CLKPWR);
526}
527#endif
528
529#ifdef CONFIG_CPU_S3C2416
530void __init s3c2416_init_clocks(int xtal)
531{
532 s3c2443_common_clk_init(NULL, xtal, 0, S3C24XX_VA_CLKPWR);
533}
534#endif
535
536#if defined(CONFIG_COMMON_CLK) && defined(CONFIG_CPU_S3C2440)
537void __init s3c2440_init_clocks(int xtal)
538{
539 s3c2410_common_clk_init(NULL, xtal, 1, S3C24XX_VA_CLKPWR);
540 samsung_wdt_reset_init(S3C24XX_VA_WATCHDOG);
541}
542#endif
543
544#if defined(CONFIG_COMMON_CLK) && defined(CONFIG_CPU_S3C2442)
545void __init s3c2442_init_clocks(int xtal)
546{
547 s3c2410_common_clk_init(NULL, xtal, 2, S3C24XX_VA_CLKPWR);
548 samsung_wdt_reset_init(S3C24XX_VA_WATCHDOG);
549}
550#endif
551
552#ifdef CONFIG_CPU_S3C2443
553void __init s3c2443_init_clocks(int xtal)
554{
555 s3c2443_common_clk_init(NULL, xtal, 1, S3C24XX_VA_CLKPWR);
556}
557#endif
558
559#if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2440) || \
560 defined(CONFIG_CPU_S3C2442)
561static struct resource s3c2410_dclk_resource[] = {
562 [0] = DEFINE_RES_MEM(0x56000084, 0x4),
563};
564
565struct platform_device s3c2410_device_dclk = {
566 .name = "s3c2410-dclk",
567 .id = 0,
568 .num_resources = ARRAY_SIZE(s3c2410_dclk_resource),
569 .resource = s3c2410_dclk_resource,
570};
571#endif
diff --git a/arch/arm/mach-s3c24xx/common.h b/arch/arm/mach-s3c24xx/common.h
index e46c10417216..ac3ff12a0601 100644
--- a/arch/arm/mach-s3c24xx/common.h
+++ b/arch/arm/mach-s3c24xx/common.h
@@ -67,16 +67,15 @@ extern struct syscore_ops s3c2416_irq_syscore_ops;
67#if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) 67#if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442)
68extern void s3c244x_map_io(void); 68extern void s3c244x_map_io(void);
69extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no); 69extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no);
70extern void s3c244x_init_clocks(int xtal);
71extern void s3c244x_restart(enum reboot_mode mode, const char *cmd); 70extern void s3c244x_restart(enum reboot_mode mode, const char *cmd);
72#else 71#else
73#define s3c244x_init_clocks NULL
74#define s3c244x_init_uarts NULL 72#define s3c244x_init_uarts NULL
75#endif 73#endif
76 74
77#ifdef CONFIG_CPU_S3C2440 75#ifdef CONFIG_CPU_S3C2440
78extern int s3c2440_init(void); 76extern int s3c2440_init(void);
79extern void s3c2440_map_io(void); 77extern void s3c2440_map_io(void);
78extern void s3c2440_init_clocks(int xtal);
80extern void s3c2440_init_irq(void); 79extern void s3c2440_init_irq(void);
81#else 80#else
82#define s3c2440_init NULL 81#define s3c2440_init NULL
@@ -86,6 +85,7 @@ extern void s3c2440_init_irq(void);
86#ifdef CONFIG_CPU_S3C2442 85#ifdef CONFIG_CPU_S3C2442
87extern int s3c2442_init(void); 86extern int s3c2442_init(void);
88extern void s3c2442_map_io(void); 87extern void s3c2442_map_io(void);
88extern void s3c2442_init_clocks(int xtal);
89extern void s3c2442_init_irq(void); 89extern void s3c2442_init_irq(void);
90#else 90#else
91#define s3c2442_init NULL 91#define s3c2442_init NULL
@@ -114,4 +114,21 @@ extern struct platform_device s3c2412_device_dma;
114extern struct platform_device s3c2440_device_dma; 114extern struct platform_device s3c2440_device_dma;
115extern struct platform_device s3c2443_device_dma; 115extern struct platform_device s3c2443_device_dma;
116 116
117extern struct platform_device s3c2410_device_dclk;
118
119#ifdef CONFIG_S3C2410_COMMON_CLK
120void __init s3c2410_common_clk_init(struct device_node *np, unsigned long xti_f,
121 int current_soc,
122 void __iomem *reg_base);
123#endif
124#ifdef CONFIG_S3C2412_COMMON_CLK
125void __init s3c2412_common_clk_init(struct device_node *np, unsigned long xti_f,
126 unsigned long ext_f, void __iomem *reg_base);
127#endif
128#ifdef CONFIG_S3C2443_COMMON_CLK
129void __init s3c2443_common_clk_init(struct device_node *np, unsigned long xti_f,
130 int current_soc,
131 void __iomem *reg_base);
132#endif
133
117#endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */ 134#endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */
diff --git a/arch/arm/mach-s3c24xx/cpufreq-utils.c b/arch/arm/mach-s3c24xx/cpufreq-utils.c
index 2a0aa5684e72..d4d9514335f4 100644
--- a/arch/arm/mach-s3c24xx/cpufreq-utils.c
+++ b/arch/arm/mach-s3c24xx/cpufreq-utils.c
@@ -14,6 +14,7 @@
14#include <linux/errno.h> 14#include <linux/errno.h>
15#include <linux/cpufreq.h> 15#include <linux/cpufreq.h>
16#include <linux/io.h> 16#include <linux/io.h>
17#include <linux/clk.h>
17 18
18#include <mach/map.h> 19#include <mach/map.h>
19#include <mach/regs-clock.h> 20#include <mach/regs-clock.h>
@@ -60,5 +61,6 @@ void s3c2410_cpufreq_setrefresh(struct s3c_cpufreq_config *cfg)
60 */ 61 */
61void s3c2410_set_fvco(struct s3c_cpufreq_config *cfg) 62void s3c2410_set_fvco(struct s3c_cpufreq_config *cfg)
62{ 63{
63 __raw_writel(cfg->pll.driver_data, S3C2410_MPLLCON); 64 if (!IS_ERR(cfg->mpll))
65 clk_set_rate(cfg->mpll, cfg->pll.frequency);
64} 66}
diff --git a/arch/arm/mach-s3c24xx/include/mach/debug-macro.S b/arch/arm/mach-s3c24xx/include/mach/debug-macro.S
deleted file mode 100644
index 2f39737544c0..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/debug-macro.S
+++ /dev/null
@@ -1,101 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Copyright (C) 2005 Simtec Electronics
7 *
8 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
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 <mach/map.h>
16#include <mach/regs-gpio.h>
17#include <linux/serial_s3c.h>
18
19#define S3C2410_UART1_OFF (0x4000)
20#define SHIFT_2440TXF (14-9)
21
22 .macro addruart, rp, rv, tmp
23 ldr \rp, = S3C24XX_PA_UART
24 ldr \rv, = S3C24XX_VA_UART
25#if CONFIG_DEBUG_S3C_UART != 0
26 add \rp, \rp, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C_UART)
27 add \rv, \rv, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C_UART)
28#endif
29 .endm
30
31 .macro fifo_full_s3c24xx rd, rx
32 @ check for arm920 vs arm926. currently assume all arm926
33 @ devices have an 64 byte FIFO identical to the s3c2440
34 mrc p15, 0, \rd, c0, c0
35 and \rd, \rd, #0xff0
36 teq \rd, #0x260
37 beq 1004f
38 mrc p15, 0, \rd, c1, c0
39 tst \rd, #1
40 addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART)
41 addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART)
42 bic \rd, \rd, #0xff000
43 ldr \rd, [\rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0)]
44 and \rd, \rd, #0x00ff0000
45 teq \rd, #0x00440000 @ is it 2440?
461004:
47 ldr \rd, [\rx, # S3C2410_UFSTAT]
48 moveq \rd, \rd, lsr #SHIFT_2440TXF
49 tst \rd, #S3C2410_UFSTAT_TXFULL
50 .endm
51
52 .macro fifo_full_s3c2410 rd, rx
53 ldr \rd, [\rx, # S3C2410_UFSTAT]
54 tst \rd, #S3C2410_UFSTAT_TXFULL
55 .endm
56
57/* fifo level reading */
58
59 .macro fifo_level_s3c24xx rd, rx
60 @ check for arm920 vs arm926. currently assume all arm926
61 @ devices have an 64 byte FIFO identical to the s3c2440
62 mrc p15, 0, \rd, c0, c0
63 and \rd, \rd, #0xff0
64 teq \rd, #0x260
65 beq 10000f
66 mrc p15, 0, \rd, c1, c0
67 tst \rd, #1
68 addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART)
69 addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART)
70 bic \rd, \rd, #0xff000
71 ldr \rd, [\rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0)]
72 and \rd, \rd, #0x00ff0000
73 teq \rd, #0x00440000 @ is it 2440?
74
7510000:
76 ldr \rd, [\rx, # S3C2410_UFSTAT]
77 andne \rd, \rd, #S3C2410_UFSTAT_TXMASK
78 andeq \rd, \rd, #S3C2440_UFSTAT_TXMASK
79 .endm
80
81 .macro fifo_level_s3c2410 rd, rx
82 ldr \rd, [\rx, # S3C2410_UFSTAT]
83 and \rd, \rd, #S3C2410_UFSTAT_TXMASK
84 .endm
85
86/* Select the correct implementation depending on the configuration. The
87 * S3C2440 will get selected by default, as these are the most widely
88 * used variants of these
89*/
90
91#if defined(CONFIG_CPU_LLSERIAL_S3C2410_ONLY)
92#define fifo_full fifo_full_s3c2410
93#define fifo_level fifo_level_s3c2410
94#elif !defined(CONFIG_CPU_LLSERIAL_S3C2440_ONLY)
95#define fifo_full fifo_full_s3c24xx
96#define fifo_level fifo_level_s3c24xx
97#endif
98
99/* include the reset of the code which will do the work */
100
101#include <debug/samsung.S>
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-clock.h b/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
index 3415b60082d7..3db6c10de023 100644
--- a/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
+++ b/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
@@ -42,24 +42,6 @@
42#define S3C2410_CLKCON_IIS (1<<17) 42#define S3C2410_CLKCON_IIS (1<<17)
43#define S3C2410_CLKCON_SPI (1<<18) 43#define S3C2410_CLKCON_SPI (1<<18)
44 44
45/* DCLKCON register addresses in gpio.h */
46
47#define S3C2410_DCLKCON_DCLK0EN (1<<0)
48#define S3C2410_DCLKCON_DCLK0_PCLK (0<<1)
49#define S3C2410_DCLKCON_DCLK0_UCLK (1<<1)
50#define S3C2410_DCLKCON_DCLK0_DIV(x) (((x) - 1 )<<4)
51#define S3C2410_DCLKCON_DCLK0_CMP(x) (((x) - 1 )<<8)
52#define S3C2410_DCLKCON_DCLK0_DIV_MASK ((0xf)<<4)
53#define S3C2410_DCLKCON_DCLK0_CMP_MASK ((0xf)<<8)
54
55#define S3C2410_DCLKCON_DCLK1EN (1<<16)
56#define S3C2410_DCLKCON_DCLK1_PCLK (0<<17)
57#define S3C2410_DCLKCON_DCLK1_UCLK (1<<17)
58#define S3C2410_DCLKCON_DCLK1_DIV(x) (((x) - 1) <<20)
59#define S3C2410_DCLKCON_DCLK1_CMP(x) (((x) - 1) <<24)
60#define S3C2410_DCLKCON_DCLK1_DIV_MASK ((0xf) <<20)
61#define S3C2410_DCLKCON_DCLK1_CMP_MASK ((0xf) <<24)
62
63#define S3C2410_CLKDIVN_PDIVN (1<<0) 45#define S3C2410_CLKDIVN_PDIVN (1<<0)
64#define S3C2410_CLKDIVN_HDIVN (1<<1) 46#define S3C2410_CLKDIVN_HDIVN (1<<1)
65 47
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
index c2ef016032ab..c6583cfa5835 100644
--- a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
+++ b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
@@ -457,9 +457,6 @@
457 457
458/* miscellaneous control */ 458/* miscellaneous control */
459#define S3C2410_MISCCR S3C2410_GPIOREG(0x80) 459#define S3C2410_MISCCR S3C2410_GPIOREG(0x80)
460#define S3C2410_DCLKCON S3C2410_GPIOREG(0x84)
461
462#define S3C24XX_DCLKCON S3C24XX_GPIOREG2(0x84)
463 460
464/* see clock.h for dclk definitions */ 461/* see clock.h for dclk definitions */
465 462
diff --git a/arch/arm/mach-s3c24xx/mach-amlm5900.c b/arch/arm/mach-s3c24xx/mach-amlm5900.c
index 8ac9554aa996..5157e250dd13 100644
--- a/arch/arm/mach-s3c24xx/mach-amlm5900.c
+++ b/arch/arm/mach-s3c24xx/mach-amlm5900.c
@@ -161,11 +161,16 @@ static struct platform_device *amlm5900_devices[] __initdata = {
161static void __init amlm5900_map_io(void) 161static void __init amlm5900_map_io(void)
162{ 162{
163 s3c24xx_init_io(amlm5900_iodesc, ARRAY_SIZE(amlm5900_iodesc)); 163 s3c24xx_init_io(amlm5900_iodesc, ARRAY_SIZE(amlm5900_iodesc));
164 s3c24xx_init_clocks(0);
165 s3c24xx_init_uarts(amlm5900_uartcfgs, ARRAY_SIZE(amlm5900_uartcfgs)); 164 s3c24xx_init_uarts(amlm5900_uartcfgs, ARRAY_SIZE(amlm5900_uartcfgs));
166 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 165 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
167} 166}
168 167
168static void __init amlm5900_init_time(void)
169{
170 s3c2410_init_clocks(12000000);
171 samsung_timer_init();
172}
173
169#ifdef CONFIG_FB_S3C2410 174#ifdef CONFIG_FB_S3C2410
170static struct s3c2410fb_display __initdata amlm5900_lcd_info = { 175static struct s3c2410fb_display __initdata amlm5900_lcd_info = {
171 .width = 160, 176 .width = 160,
@@ -241,6 +246,6 @@ MACHINE_START(AML_M5900, "AML_M5900")
241 .map_io = amlm5900_map_io, 246 .map_io = amlm5900_map_io,
242 .init_irq = s3c2410_init_irq, 247 .init_irq = s3c2410_init_irq,
243 .init_machine = amlm5900_init, 248 .init_machine = amlm5900_init,
244 .init_time = samsung_timer_init, 249 .init_time = amlm5900_init_time,
245 .restart = s3c2410_restart, 250 .restart = s3c2410_restart,
246MACHINE_END 251MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-anubis.c b/arch/arm/mach-s3c24xx/mach-anubis.c
index 81a270af2336..e053581cab0b 100644
--- a/arch/arm/mach-s3c24xx/mach-anubis.c
+++ b/arch/arm/mach-s3c24xx/mach-anubis.c
@@ -46,7 +46,6 @@
46 46
47#include <net/ax88796.h> 47#include <net/ax88796.h>
48 48
49#include <plat/clock.h>
50#include <plat/devs.h> 49#include <plat/devs.h>
51#include <plat/cpu.h> 50#include <plat/cpu.h>
52#include <linux/platform_data/asoc-s3c24xx_simtec.h> 51#include <linux/platform_data/asoc-s3c24xx_simtec.h>
@@ -352,6 +351,7 @@ static struct platform_device anubis_device_sm501 = {
352/* Standard Anubis devices */ 351/* Standard Anubis devices */
353 352
354static struct platform_device *anubis_devices[] __initdata = { 353static struct platform_device *anubis_devices[] __initdata = {
354 &s3c2410_device_dclk,
355 &s3c_device_ohci, 355 &s3c_device_ohci,
356 &s3c_device_wdt, 356 &s3c_device_wdt,
357 &s3c_device_adc, 357 &s3c_device_adc,
@@ -364,14 +364,6 @@ static struct platform_device *anubis_devices[] __initdata = {
364 &anubis_device_sm501, 364 &anubis_device_sm501,
365}; 365};
366 366
367static struct clk *anubis_clocks[] __initdata = {
368 &s3c24xx_dclk0,
369 &s3c24xx_dclk1,
370 &s3c24xx_clkout0,
371 &s3c24xx_clkout1,
372 &s3c24xx_uclk,
373};
374
375/* I2C devices. */ 367/* I2C devices. */
376 368
377static struct i2c_board_info anubis_i2c_devs[] __initdata = { 369static struct i2c_board_info anubis_i2c_devs[] __initdata = {
@@ -394,23 +386,7 @@ static struct s3c24xx_audio_simtec_pdata __initdata anubis_audio = {
394 386
395static void __init anubis_map_io(void) 387static void __init anubis_map_io(void)
396{ 388{
397 /* initialise the clocks */
398
399 s3c24xx_dclk0.parent = &clk_upll;
400 s3c24xx_dclk0.rate = 12*1000*1000;
401
402 s3c24xx_dclk1.parent = &clk_upll;
403 s3c24xx_dclk1.rate = 24*1000*1000;
404
405 s3c24xx_clkout0.parent = &s3c24xx_dclk0;
406 s3c24xx_clkout1.parent = &s3c24xx_dclk1;
407
408 s3c24xx_uclk.parent = &s3c24xx_clkout1;
409
410 s3c24xx_register_clocks(anubis_clocks, ARRAY_SIZE(anubis_clocks));
411
412 s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc)); 389 s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc));
413 s3c24xx_init_clocks(0);
414 s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs)); 390 s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs));
415 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 391 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
416 392
@@ -428,6 +404,12 @@ static void __init anubis_map_io(void)
428 } 404 }
429} 405}
430 406
407static void __init anubis_init_time(void)
408{
409 s3c2440_init_clocks(12000000);
410 samsung_timer_init();
411}
412
431static void __init anubis_init(void) 413static void __init anubis_init(void)
432{ 414{
433 s3c_i2c0_set_platdata(NULL); 415 s3c_i2c0_set_platdata(NULL);
@@ -447,6 +429,6 @@ MACHINE_START(ANUBIS, "Simtec-Anubis")
447 .map_io = anubis_map_io, 429 .map_io = anubis_map_io,
448 .init_machine = anubis_init, 430 .init_machine = anubis_init,
449 .init_irq = s3c2440_init_irq, 431 .init_irq = s3c2440_init_irq,
450 .init_time = samsung_timer_init, 432 .init_time = anubis_init_time,
451 .restart = s3c244x_restart, 433 .restart = s3c244x_restart,
452MACHINE_END 434MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c24xx/mach-at2440evb.c
index d8f6bb1096cb..9db768f448a5 100644
--- a/arch/arm/mach-s3c24xx/mach-at2440evb.c
+++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c
@@ -45,7 +45,6 @@
45#include <linux/mtd/nand_ecc.h> 45#include <linux/mtd/nand_ecc.h>
46#include <linux/mtd/partitions.h> 46#include <linux/mtd/partitions.h>
47 47
48#include <plat/clock.h>
49#include <plat/devs.h> 48#include <plat/devs.h>
50#include <plat/cpu.h> 49#include <plat/cpu.h>
51#include <linux/platform_data/mmc-s3cmci.h> 50#include <linux/platform_data/mmc-s3cmci.h>
@@ -192,11 +191,16 @@ static struct platform_device *at2440evb_devices[] __initdata = {
192static void __init at2440evb_map_io(void) 191static void __init at2440evb_map_io(void)
193{ 192{
194 s3c24xx_init_io(at2440evb_iodesc, ARRAY_SIZE(at2440evb_iodesc)); 193 s3c24xx_init_io(at2440evb_iodesc, ARRAY_SIZE(at2440evb_iodesc));
195 s3c24xx_init_clocks(16934400);
196 s3c24xx_init_uarts(at2440evb_uartcfgs, ARRAY_SIZE(at2440evb_uartcfgs)); 194 s3c24xx_init_uarts(at2440evb_uartcfgs, ARRAY_SIZE(at2440evb_uartcfgs));
197 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 195 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
198} 196}
199 197
198static void __init at2440evb_init_time(void)
199{
200 s3c2440_init_clocks(16934400);
201 samsung_timer_init();
202}
203
200static void __init at2440evb_init(void) 204static void __init at2440evb_init(void)
201{ 205{
202 s3c24xx_fb_set_platdata(&at2440evb_fb_info); 206 s3c24xx_fb_set_platdata(&at2440evb_fb_info);
@@ -213,6 +217,6 @@ MACHINE_START(AT2440EVB, "AT2440EVB")
213 .map_io = at2440evb_map_io, 217 .map_io = at2440evb_map_io,
214 .init_machine = at2440evb_init, 218 .init_machine = at2440evb_init,
215 .init_irq = s3c2440_init_irq, 219 .init_irq = s3c2440_init_irq,
216 .init_time = samsung_timer_init, 220 .init_time = at2440evb_init_time,
217 .restart = s3c244x_restart, 221 .restart = s3c244x_restart,
218MACHINE_END 222MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-bast.c b/arch/arm/mach-s3c24xx/mach-bast.c
index e371ff53a408..f9112b801a33 100644
--- a/arch/arm/mach-s3c24xx/mach-bast.c
+++ b/arch/arm/mach-s3c24xx/mach-bast.c
@@ -51,7 +51,6 @@
51#include <mach/regs-lcd.h> 51#include <mach/regs-lcd.h>
52#include <mach/gpio-samsung.h> 52#include <mach/gpio-samsung.h>
53 53
54#include <plat/clock.h>
55#include <plat/cpu.h> 54#include <plat/cpu.h>
56#include <plat/cpu-freq.h> 55#include <plat/cpu-freq.h>
57#include <plat/devs.h> 56#include <plat/devs.h>
@@ -523,6 +522,7 @@ static struct s3c_hwmon_pdata bast_hwmon_info = {
523// cat /sys/devices/platform/s3c24xx-adc/s3c-hwmon/in_0 522// cat /sys/devices/platform/s3c24xx-adc/s3c-hwmon/in_0
524 523
525static struct platform_device *bast_devices[] __initdata = { 524static struct platform_device *bast_devices[] __initdata = {
525 &s3c2410_device_dclk,
526 &s3c_device_ohci, 526 &s3c_device_ohci,
527 &s3c_device_lcd, 527 &s3c_device_lcd,
528 &s3c_device_wdt, 528 &s3c_device_wdt,
@@ -537,14 +537,6 @@ static struct platform_device *bast_devices[] __initdata = {
537 &bast_sio, 537 &bast_sio,
538}; 538};
539 539
540static struct clk *bast_clocks[] __initdata = {
541 &s3c24xx_dclk0,
542 &s3c24xx_dclk1,
543 &s3c24xx_clkout0,
544 &s3c24xx_clkout1,
545 &s3c24xx_uclk,
546};
547
548static struct s3c_cpufreq_board __initdata bast_cpufreq = { 540static struct s3c_cpufreq_board __initdata bast_cpufreq = {
549 .refresh = 7800, /* 7.8usec */ 541 .refresh = 7800, /* 7.8usec */
550 .auto_io = 1, 542 .auto_io = 1,
@@ -558,29 +550,19 @@ static struct s3c24xx_audio_simtec_pdata __initdata bast_audio = {
558 550
559static void __init bast_map_io(void) 551static void __init bast_map_io(void)
560{ 552{
561 /* initialise the clocks */
562
563 s3c24xx_dclk0.parent = &clk_upll;
564 s3c24xx_dclk0.rate = 12*1000*1000;
565
566 s3c24xx_dclk1.parent = &clk_upll;
567 s3c24xx_dclk1.rate = 24*1000*1000;
568
569 s3c24xx_clkout0.parent = &s3c24xx_dclk0;
570 s3c24xx_clkout1.parent = &s3c24xx_dclk1;
571
572 s3c24xx_uclk.parent = &s3c24xx_clkout1;
573
574 s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks));
575
576 s3c_hwmon_set_platdata(&bast_hwmon_info); 553 s3c_hwmon_set_platdata(&bast_hwmon_info);
577 554
578 s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); 555 s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
579 s3c24xx_init_clocks(0);
580 s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs)); 556 s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs));
581 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 557 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
582} 558}
583 559
560static void __init bast_init_time(void)
561{
562 s3c2410_init_clocks(12000000);
563 samsung_timer_init();
564}
565
584static void __init bast_init(void) 566static void __init bast_init(void)
585{ 567{
586 register_syscore_ops(&bast_pm_syscore_ops); 568 register_syscore_ops(&bast_pm_syscore_ops);
@@ -608,6 +590,6 @@ MACHINE_START(BAST, "Simtec-BAST")
608 .map_io = bast_map_io, 590 .map_io = bast_map_io,
609 .init_irq = s3c2410_init_irq, 591 .init_irq = s3c2410_init_irq,
610 .init_machine = bast_init, 592 .init_machine = bast_init,
611 .init_time = samsung_timer_init, 593 .init_time = bast_init_time,
612 .restart = s3c2410_restart, 594 .restart = s3c2410_restart,
613MACHINE_END 595MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
index dc4db849f0fd..fc3a08d0cb3f 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c24xx/mach-gta02.c
@@ -501,7 +501,6 @@ static struct platform_device gta02_buttons_device = {
501static void __init gta02_map_io(void) 501static void __init gta02_map_io(void)
502{ 502{
503 s3c24xx_init_io(gta02_iodesc, ARRAY_SIZE(gta02_iodesc)); 503 s3c24xx_init_io(gta02_iodesc, ARRAY_SIZE(gta02_iodesc));
504 s3c24xx_init_clocks(12000000);
505 s3c24xx_init_uarts(gta02_uartcfgs, ARRAY_SIZE(gta02_uartcfgs)); 504 s3c24xx_init_uarts(gta02_uartcfgs, ARRAY_SIZE(gta02_uartcfgs));
506 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 505 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
507} 506}
@@ -585,6 +584,11 @@ static void __init gta02_machine_init(void)
585 regulator_has_full_constraints(); 584 regulator_has_full_constraints();
586} 585}
587 586
587static void __init gta02_init_time(void)
588{
589 s3c2442_init_clocks(12000000);
590 samsung_timer_init();
591}
588 592
589MACHINE_START(NEO1973_GTA02, "GTA02") 593MACHINE_START(NEO1973_GTA02, "GTA02")
590 /* Maintainer: Nelson Castillo <arhuaco@freaks-unidos.net> */ 594 /* Maintainer: Nelson Castillo <arhuaco@freaks-unidos.net> */
@@ -592,6 +596,6 @@ MACHINE_START(NEO1973_GTA02, "GTA02")
592 .map_io = gta02_map_io, 596 .map_io = gta02_map_io,
593 .init_irq = s3c2442_init_irq, 597 .init_irq = s3c2442_init_irq,
594 .init_machine = gta02_machine_init, 598 .init_machine = gta02_machine_init,
595 .init_time = samsung_timer_init, 599 .init_time = gta02_init_time,
596 .restart = s3c244x_restart, 600 .restart = s3c244x_restart,
597MACHINE_END 601MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index e453acd92cbf..fbf5487ae5d1 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -57,7 +57,6 @@
57#include <mach/regs-lcd.h> 57#include <mach/regs-lcd.h>
58#include <mach/gpio-samsung.h> 58#include <mach/gpio-samsung.h>
59 59
60#include <plat/clock.h>
61#include <plat/cpu.h> 60#include <plat/cpu.h>
62#include <plat/devs.h> 61#include <plat/devs.h>
63#include <plat/gpio-cfg.h> 62#include <plat/gpio-cfg.h>
@@ -646,7 +645,6 @@ static struct platform_device *h1940_devices[] __initdata = {
646static void __init h1940_map_io(void) 645static void __init h1940_map_io(void)
647{ 646{
648 s3c24xx_init_io(h1940_iodesc, ARRAY_SIZE(h1940_iodesc)); 647 s3c24xx_init_io(h1940_iodesc, ARRAY_SIZE(h1940_iodesc));
649 s3c24xx_init_clocks(0);
650 s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs)); 648 s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs));
651 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 649 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
652 650
@@ -662,6 +660,12 @@ static void __init h1940_map_io(void)
662 WARN_ON(gpiochip_add(&h1940_latch_gpiochip)); 660 WARN_ON(gpiochip_add(&h1940_latch_gpiochip));
663} 661}
664 662
663static void __init h1940_init_time(void)
664{
665 s3c2410_init_clocks(12000000);
666 samsung_timer_init();
667}
668
665/* H1940 and RX3715 need to reserve this for suspend */ 669/* H1940 and RX3715 need to reserve this for suspend */
666static void __init h1940_reserve(void) 670static void __init h1940_reserve(void)
667{ 671{
@@ -739,6 +743,6 @@ MACHINE_START(H1940, "IPAQ-H1940")
739 .reserve = h1940_reserve, 743 .reserve = h1940_reserve,
740 .init_irq = s3c2410_init_irq, 744 .init_irq = s3c2410_init_irq,
741 .init_machine = h1940_init, 745 .init_machine = h1940_init,
742 .init_time = samsung_timer_init, 746 .init_time = h1940_init_time,
743 .restart = s3c2410_restart, 747 .restart = s3c2410_restart,
744MACHINE_END 748MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c24xx/mach-jive.c
index 5faa7239e7d6..e81ea82c55f9 100644
--- a/arch/arm/mach-s3c24xx/mach-jive.c
+++ b/arch/arm/mach-s3c24xx/mach-jive.c
@@ -507,11 +507,16 @@ static struct syscore_ops jive_pm_syscore_ops = {
507static void __init jive_map_io(void) 507static void __init jive_map_io(void)
508{ 508{
509 s3c24xx_init_io(jive_iodesc, ARRAY_SIZE(jive_iodesc)); 509 s3c24xx_init_io(jive_iodesc, ARRAY_SIZE(jive_iodesc));
510 s3c24xx_init_clocks(12000000);
511 s3c24xx_init_uarts(jive_uartcfgs, ARRAY_SIZE(jive_uartcfgs)); 510 s3c24xx_init_uarts(jive_uartcfgs, ARRAY_SIZE(jive_uartcfgs));
512 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 511 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
513} 512}
514 513
514static void __init jive_init_time(void)
515{
516 s3c2412_init_clocks(12000000);
517 samsung_timer_init();
518}
519
515static void jive_power_off(void) 520static void jive_power_off(void)
516{ 521{
517 printk(KERN_INFO "powering system down...\n"); 522 printk(KERN_INFO "powering system down...\n");
@@ -665,6 +670,6 @@ MACHINE_START(JIVE, "JIVE")
665 .init_irq = s3c2412_init_irq, 670 .init_irq = s3c2412_init_irq,
666 .map_io = jive_map_io, 671 .map_io = jive_map_io,
667 .init_machine = jive_machine_init, 672 .init_machine = jive_machine_init,
668 .init_time = samsung_timer_init, 673 .init_time = jive_init_time,
669 .restart = s3c2412_restart, 674 .restart = s3c2412_restart,
670MACHINE_END 675MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index 9e57fd9f4f3b..5cc40ec1d254 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -54,7 +54,6 @@
54#include <linux/mtd/partitions.h> 54#include <linux/mtd/partitions.h>
55 55
56#include <plat/gpio-cfg.h> 56#include <plat/gpio-cfg.h>
57#include <plat/clock.h>
58#include <plat/devs.h> 57#include <plat/devs.h>
59#include <plat/cpu.h> 58#include <plat/cpu.h>
60#include <plat/samsung-time.h> 59#include <plat/samsung-time.h>
@@ -525,11 +524,16 @@ static struct platform_device *mini2440_devices[] __initdata = {
525static void __init mini2440_map_io(void) 524static void __init mini2440_map_io(void)
526{ 525{
527 s3c24xx_init_io(mini2440_iodesc, ARRAY_SIZE(mini2440_iodesc)); 526 s3c24xx_init_io(mini2440_iodesc, ARRAY_SIZE(mini2440_iodesc));
528 s3c24xx_init_clocks(12000000);
529 s3c24xx_init_uarts(mini2440_uartcfgs, ARRAY_SIZE(mini2440_uartcfgs)); 527 s3c24xx_init_uarts(mini2440_uartcfgs, ARRAY_SIZE(mini2440_uartcfgs));
530 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 528 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
531} 529}
532 530
531static void __init mini2440_init_time(void)
532{
533 s3c2440_init_clocks(12000000);
534 samsung_timer_init();
535}
536
533/* 537/*
534 * mini2440_features string 538 * mini2440_features string
535 * 539 *
@@ -690,6 +694,6 @@ MACHINE_START(MINI2440, "MINI2440")
690 .map_io = mini2440_map_io, 694 .map_io = mini2440_map_io,
691 .init_machine = mini2440_init, 695 .init_machine = mini2440_init,
692 .init_irq = s3c2440_init_irq, 696 .init_irq = s3c2440_init_irq,
693 .init_time = samsung_timer_init, 697 .init_time = mini2440_init_time,
694 .restart = s3c244x_restart, 698 .restart = s3c244x_restart,
695MACHINE_END 699MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c
index 4cccaad34847..3ac2a54348d6 100644
--- a/arch/arm/mach-s3c24xx/mach-n30.c
+++ b/arch/arm/mach-s3c24xx/mach-n30.c
@@ -45,7 +45,6 @@
45 45
46#include <linux/platform_data/i2c-s3c2410.h> 46#include <linux/platform_data/i2c-s3c2410.h>
47 47
48#include <plat/clock.h>
49#include <plat/cpu.h> 48#include <plat/cpu.h>
50#include <plat/devs.h> 49#include <plat/devs.h>
51#include <linux/platform_data/mmc-s3cmci.h> 50#include <linux/platform_data/mmc-s3cmci.h>
@@ -535,11 +534,16 @@ static void __init n30_map_io(void)
535{ 534{
536 s3c24xx_init_io(n30_iodesc, ARRAY_SIZE(n30_iodesc)); 535 s3c24xx_init_io(n30_iodesc, ARRAY_SIZE(n30_iodesc));
537 n30_hwinit(); 536 n30_hwinit();
538 s3c24xx_init_clocks(0);
539 s3c24xx_init_uarts(n30_uartcfgs, ARRAY_SIZE(n30_uartcfgs)); 537 s3c24xx_init_uarts(n30_uartcfgs, ARRAY_SIZE(n30_uartcfgs));
540 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 538 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
541} 539}
542 540
541static void __init n30_init_time(void)
542{
543 s3c2410_init_clocks(12000000);
544 samsung_timer_init();
545}
546
543/* GPB3 is the line that controls the pull-up for the USB D+ line */ 547/* GPB3 is the line that controls the pull-up for the USB D+ line */
544 548
545static void __init n30_init(void) 549static void __init n30_init(void)
@@ -591,7 +595,7 @@ MACHINE_START(N30, "Acer-N30")
591 Ben Dooks <ben-linux@fluff.org> 595 Ben Dooks <ben-linux@fluff.org>
592 */ 596 */
593 .atag_offset = 0x100, 597 .atag_offset = 0x100,
594 .init_time = samsung_timer_init, 598 .init_time = n30_init_time,
595 .init_machine = n30_init, 599 .init_machine = n30_init,
596 .init_irq = s3c2410_init_irq, 600 .init_irq = s3c2410_init_irq,
597 .map_io = n30_map_io, 601 .map_io = n30_map_io,
@@ -602,7 +606,7 @@ MACHINE_START(N35, "Acer-N35")
602 /* Maintainer: Christer Weinigel <christer@weinigel.se> 606 /* Maintainer: Christer Weinigel <christer@weinigel.se>
603 */ 607 */
604 .atag_offset = 0x100, 608 .atag_offset = 0x100,
605 .init_time = samsung_timer_init, 609 .init_time = n30_init_time,
606 .init_machine = n30_init, 610 .init_machine = n30_init,
607 .init_irq = s3c2410_init_irq, 611 .init_irq = s3c2410_init_irq,
608 .map_io = n30_map_io, 612 .map_io = n30_map_io,
diff --git a/arch/arm/mach-s3c24xx/mach-nexcoder.c b/arch/arm/mach-s3c24xx/mach-nexcoder.c
index 3066851f584d..c82c281ce351 100644
--- a/arch/arm/mach-s3c24xx/mach-nexcoder.c
+++ b/arch/arm/mach-s3c24xx/mach-nexcoder.c
@@ -42,7 +42,6 @@
42#include <linux/platform_data/i2c-s3c2410.h> 42#include <linux/platform_data/i2c-s3c2410.h>
43 43
44#include <plat/gpio-cfg.h> 44#include <plat/gpio-cfg.h>
45#include <plat/clock.h>
46#include <plat/devs.h> 45#include <plat/devs.h>
47#include <plat/cpu.h> 46#include <plat/cpu.h>
48#include <plat/samsung-time.h> 47#include <plat/samsung-time.h>
@@ -135,13 +134,18 @@ static void __init nexcoder_sensorboard_init(void)
135static void __init nexcoder_map_io(void) 134static void __init nexcoder_map_io(void)
136{ 135{
137 s3c24xx_init_io(nexcoder_iodesc, ARRAY_SIZE(nexcoder_iodesc)); 136 s3c24xx_init_io(nexcoder_iodesc, ARRAY_SIZE(nexcoder_iodesc));
138 s3c24xx_init_clocks(0);
139 s3c24xx_init_uarts(nexcoder_uartcfgs, ARRAY_SIZE(nexcoder_uartcfgs)); 137 s3c24xx_init_uarts(nexcoder_uartcfgs, ARRAY_SIZE(nexcoder_uartcfgs));
140 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 138 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
141 139
142 nexcoder_sensorboard_init(); 140 nexcoder_sensorboard_init();
143} 141}
144 142
143static void __init nexcoder_init_time(void)
144{
145 s3c2440_init_clocks(12000000);
146 samsung_timer_init();
147}
148
145static void __init nexcoder_init(void) 149static void __init nexcoder_init(void)
146{ 150{
147 s3c_i2c0_set_platdata(NULL); 151 s3c_i2c0_set_platdata(NULL);
@@ -154,6 +158,6 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440")
154 .map_io = nexcoder_map_io, 158 .map_io = nexcoder_map_io,
155 .init_machine = nexcoder_init, 159 .init_machine = nexcoder_init,
156 .init_irq = s3c2440_init_irq, 160 .init_irq = s3c2440_init_irq,
157 .init_time = samsung_timer_init, 161 .init_time = nexcoder_init_time,
158 .restart = s3c244x_restart, 162 .restart = s3c244x_restart,
159MACHINE_END 163MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c24xx/mach-osiris.c
index a4ae4bb3666d..189147b80eca 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris.c
+++ b/arch/arm/mach-s3c24xx/mach-osiris.c
@@ -40,7 +40,6 @@
40#include <linux/mtd/nand_ecc.h> 40#include <linux/mtd/nand_ecc.h>
41#include <linux/mtd/partitions.h> 41#include <linux/mtd/partitions.h>
42 42
43#include <plat/clock.h>
44#include <plat/cpu.h> 43#include <plat/cpu.h>
45#include <plat/cpu-freq.h> 44#include <plat/cpu-freq.h>
46#include <plat/devs.h> 45#include <plat/devs.h>
@@ -344,20 +343,13 @@ static struct i2c_board_info osiris_i2c_devs[] __initdata = {
344/* Standard Osiris devices */ 343/* Standard Osiris devices */
345 344
346static struct platform_device *osiris_devices[] __initdata = { 345static struct platform_device *osiris_devices[] __initdata = {
346 &s3c2410_device_dclk,
347 &s3c_device_i2c0, 347 &s3c_device_i2c0,
348 &s3c_device_wdt, 348 &s3c_device_wdt,
349 &s3c_device_nand, 349 &s3c_device_nand,
350 &osiris_pcmcia, 350 &osiris_pcmcia,
351}; 351};
352 352
353static struct clk *osiris_clocks[] __initdata = {
354 &s3c24xx_dclk0,
355 &s3c24xx_dclk1,
356 &s3c24xx_clkout0,
357 &s3c24xx_clkout1,
358 &s3c24xx_uclk,
359};
360
361static struct s3c_cpufreq_board __initdata osiris_cpufreq = { 353static struct s3c_cpufreq_board __initdata osiris_cpufreq = {
362 .refresh = 7800, /* refresh period is 7.8usec */ 354 .refresh = 7800, /* refresh period is 7.8usec */
363 .auto_io = 1, 355 .auto_io = 1,
@@ -368,23 +360,7 @@ static void __init osiris_map_io(void)
368{ 360{
369 unsigned long flags; 361 unsigned long flags;
370 362
371 /* initialise the clocks */
372
373 s3c24xx_dclk0.parent = &clk_upll;
374 s3c24xx_dclk0.rate = 12*1000*1000;
375
376 s3c24xx_dclk1.parent = &clk_upll;
377 s3c24xx_dclk1.rate = 24*1000*1000;
378
379 s3c24xx_clkout0.parent = &s3c24xx_dclk0;
380 s3c24xx_clkout1.parent = &s3c24xx_dclk1;
381
382 s3c24xx_uclk.parent = &s3c24xx_clkout1;
383
384 s3c24xx_register_clocks(osiris_clocks, ARRAY_SIZE(osiris_clocks));
385
386 s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc)); 363 s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc));
387 s3c24xx_init_clocks(0);
388 s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs)); 364 s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs));
389 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 365 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
390 366
@@ -408,6 +384,12 @@ static void __init osiris_map_io(void)
408 local_irq_restore(flags); 384 local_irq_restore(flags);
409} 385}
410 386
387static void __init osiris_init_time(void)
388{
389 s3c2440_init_clocks(12000000);
390 samsung_timer_init();
391}
392
411static void __init osiris_init(void) 393static void __init osiris_init(void)
412{ 394{
413 register_syscore_ops(&osiris_pm_syscore_ops); 395 register_syscore_ops(&osiris_pm_syscore_ops);
@@ -429,6 +411,6 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS")
429 .map_io = osiris_map_io, 411 .map_io = osiris_map_io,
430 .init_irq = s3c2440_init_irq, 412 .init_irq = s3c2440_init_irq,
431 .init_machine = osiris_init, 413 .init_machine = osiris_init,
432 .init_time = samsung_timer_init, 414 .init_time = osiris_init_time,
433 .restart = s3c244x_restart, 415 .restart = s3c244x_restart,
434MACHINE_END 416MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-otom.c b/arch/arm/mach-s3c24xx/mach-otom.c
index bdb3faac2d9b..45833001186d 100644
--- a/arch/arm/mach-s3c24xx/mach-otom.c
+++ b/arch/arm/mach-s3c24xx/mach-otom.c
@@ -30,7 +30,6 @@
30#include <mach/hardware.h> 30#include <mach/hardware.h>
31#include <mach/regs-gpio.h> 31#include <mach/regs-gpio.h>
32 32
33#include <plat/clock.h>
34#include <plat/cpu.h> 33#include <plat/cpu.h>
35#include <plat/devs.h> 34#include <plat/devs.h>
36#include <plat/samsung-time.h> 35#include <plat/samsung-time.h>
@@ -100,11 +99,16 @@ static struct platform_device *otom11_devices[] __initdata = {
100static void __init otom11_map_io(void) 99static void __init otom11_map_io(void)
101{ 100{
102 s3c24xx_init_io(otom11_iodesc, ARRAY_SIZE(otom11_iodesc)); 101 s3c24xx_init_io(otom11_iodesc, ARRAY_SIZE(otom11_iodesc));
103 s3c24xx_init_clocks(0);
104 s3c24xx_init_uarts(otom11_uartcfgs, ARRAY_SIZE(otom11_uartcfgs)); 102 s3c24xx_init_uarts(otom11_uartcfgs, ARRAY_SIZE(otom11_uartcfgs));
105 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 103 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
106} 104}
107 105
106static void __init otom11_init_time(void)
107{
108 s3c2410_init_clocks(12000000);
109 samsung_timer_init();
110}
111
108static void __init otom11_init(void) 112static void __init otom11_init(void)
109{ 113{
110 s3c_i2c0_set_platdata(NULL); 114 s3c_i2c0_set_platdata(NULL);
@@ -117,6 +121,6 @@ MACHINE_START(OTOM, "Nex Vision - Otom 1.1")
117 .map_io = otom11_map_io, 121 .map_io = otom11_map_io,
118 .init_machine = otom11_init, 122 .init_machine = otom11_init,
119 .init_irq = s3c2410_init_irq, 123 .init_irq = s3c2410_init_irq,
120 .init_time = samsung_timer_init, 124 .init_time = otom11_init_time,
121 .restart = s3c2410_restart, 125 .restart = s3c2410_restart,
122MACHINE_END 126MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c
index 8c12787a8fd3..228c9094519d 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c24xx/mach-qt2410.c
@@ -304,11 +304,16 @@ __setup("tft=", qt2410_tft_setup);
304static void __init qt2410_map_io(void) 304static void __init qt2410_map_io(void)
305{ 305{
306 s3c24xx_init_io(qt2410_iodesc, ARRAY_SIZE(qt2410_iodesc)); 306 s3c24xx_init_io(qt2410_iodesc, ARRAY_SIZE(qt2410_iodesc));
307 s3c24xx_init_clocks(12*1000*1000);
308 s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs)); 307 s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs));
309 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 308 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
310} 309}
311 310
311static void __init qt2410_init_time(void)
312{
313 s3c2410_init_clocks(12000000);
314 samsung_timer_init();
315}
316
312static void __init qt2410_machine_init(void) 317static void __init qt2410_machine_init(void)
313{ 318{
314 s3c_nand_set_platdata(&qt2410_nand_info); 319 s3c_nand_set_platdata(&qt2410_nand_info);
@@ -346,6 +351,6 @@ MACHINE_START(QT2410, "QT2410")
346 .map_io = qt2410_map_io, 351 .map_io = qt2410_map_io,
347 .init_irq = s3c2410_init_irq, 352 .init_irq = s3c2410_init_irq,
348 .init_machine = qt2410_machine_init, 353 .init_machine = qt2410_machine_init,
349 .init_time = samsung_timer_init, 354 .init_time = qt2410_init_time,
350 .restart = s3c2410_restart, 355 .restart = s3c2410_restart,
351MACHINE_END 356MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index afb784e934c8..e2c6541909c1 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -54,7 +54,6 @@
54#include <mach/regs-lcd.h> 54#include <mach/regs-lcd.h>
55#include <mach/gpio-samsung.h> 55#include <mach/gpio-samsung.h>
56 56
57#include <plat/clock.h>
58#include <plat/cpu.h> 57#include <plat/cpu.h>
59#include <plat/devs.h> 58#include <plat/devs.h>
60#include <plat/pm.h> 59#include <plat/pm.h>
@@ -710,6 +709,7 @@ static struct i2c_board_info rx1950_i2c_devices[] = {
710}; 709};
711 710
712static struct platform_device *rx1950_devices[] __initdata = { 711static struct platform_device *rx1950_devices[] __initdata = {
712 &s3c2410_device_dclk,
713 &s3c_device_lcd, 713 &s3c_device_lcd,
714 &s3c_device_wdt, 714 &s3c_device_wdt,
715 &s3c_device_i2c0, 715 &s3c_device_i2c0,
@@ -728,20 +728,9 @@ static struct platform_device *rx1950_devices[] __initdata = {
728 &rx1950_leds, 728 &rx1950_leds,
729}; 729};
730 730
731static struct clk *rx1950_clocks[] __initdata = {
732 &s3c24xx_clkout0,
733 &s3c24xx_clkout1,
734};
735
736static void __init rx1950_map_io(void) 731static void __init rx1950_map_io(void)
737{ 732{
738 s3c24xx_clkout0.parent = &clk_h;
739 s3c24xx_clkout1.parent = &clk_f;
740
741 s3c24xx_register_clocks(rx1950_clocks, ARRAY_SIZE(rx1950_clocks));
742
743 s3c24xx_init_io(rx1950_iodesc, ARRAY_SIZE(rx1950_iodesc)); 733 s3c24xx_init_io(rx1950_iodesc, ARRAY_SIZE(rx1950_iodesc));
744 s3c24xx_init_clocks(16934000);
745 s3c24xx_init_uarts(rx1950_uartcfgs, ARRAY_SIZE(rx1950_uartcfgs)); 734 s3c24xx_init_uarts(rx1950_uartcfgs, ARRAY_SIZE(rx1950_uartcfgs));
746 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 735 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
747 736
@@ -754,6 +743,12 @@ static void __init rx1950_map_io(void)
754 s3c_pm_init(); 743 s3c_pm_init();
755} 744}
756 745
746static void __init rx1950_init_time(void)
747{
748 s3c2442_init_clocks(16934000);
749 samsung_timer_init();
750}
751
757static void __init rx1950_init_machine(void) 752static void __init rx1950_init_machine(void)
758{ 753{
759 int i; 754 int i;
@@ -816,6 +811,6 @@ MACHINE_START(RX1950, "HP iPAQ RX1950")
816 .reserve = rx1950_reserve, 811 .reserve = rx1950_reserve,
817 .init_irq = s3c2442_init_irq, 812 .init_irq = s3c2442_init_irq,
818 .init_machine = rx1950_init_machine, 813 .init_machine = rx1950_init_machine,
819 .init_time = samsung_timer_init, 814 .init_time = rx1950_init_time,
820 .restart = s3c244x_restart, 815 .restart = s3c244x_restart,
821MACHINE_END 816MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-rx3715.c b/arch/arm/mach-s3c24xx/mach-rx3715.c
index e6535ce1bc5c..6e749ec3a2ea 100644
--- a/arch/arm/mach-s3c24xx/mach-rx3715.c
+++ b/arch/arm/mach-s3c24xx/mach-rx3715.c
@@ -46,7 +46,6 @@
46#include <mach/regs-lcd.h> 46#include <mach/regs-lcd.h>
47#include <mach/gpio-samsung.h> 47#include <mach/gpio-samsung.h>
48 48
49#include <plat/clock.h>
50#include <plat/cpu.h> 49#include <plat/cpu.h>
51#include <plat/devs.h> 50#include <plat/devs.h>
52#include <plat/pm.h> 51#include <plat/pm.h>
@@ -179,11 +178,16 @@ static struct platform_device *rx3715_devices[] __initdata = {
179static void __init rx3715_map_io(void) 178static void __init rx3715_map_io(void)
180{ 179{
181 s3c24xx_init_io(rx3715_iodesc, ARRAY_SIZE(rx3715_iodesc)); 180 s3c24xx_init_io(rx3715_iodesc, ARRAY_SIZE(rx3715_iodesc));
182 s3c24xx_init_clocks(16934000);
183 s3c24xx_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs)); 181 s3c24xx_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs));
184 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 182 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
185} 183}
186 184
185static void __init rx3715_init_time(void)
186{
187 s3c2440_init_clocks(16934000);
188 samsung_timer_init();
189}
190
187/* H1940 and RX3715 need to reserve this for suspend */ 191/* H1940 and RX3715 need to reserve this for suspend */
188static void __init rx3715_reserve(void) 192static void __init rx3715_reserve(void)
189{ 193{
@@ -210,6 +214,6 @@ MACHINE_START(RX3715, "IPAQ-RX3715")
210 .reserve = rx3715_reserve, 214 .reserve = rx3715_reserve,
211 .init_irq = s3c2440_init_irq, 215 .init_irq = s3c2440_init_irq,
212 .init_machine = rx3715_init_machine, 216 .init_machine = rx3715_init_machine,
213 .init_time = samsung_timer_init, 217 .init_time = rx3715_init_time,
214 .restart = s3c244x_restart, 218 .restart = s3c244x_restart,
215MACHINE_END 219MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
index 70f0900d4bca..e4dcb9aa2ca2 100644
--- a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
+++ b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
@@ -18,7 +18,6 @@
18#include <linux/clocksource.h> 18#include <linux/clocksource.h>
19#include <linux/irqchip.h> 19#include <linux/irqchip.h>
20#include <linux/of_platform.h> 20#include <linux/of_platform.h>
21#include <linux/serial_core.h>
22#include <linux/serial_s3c.h> 21#include <linux/serial_s3c.h>
23 22
24#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
@@ -29,48 +28,14 @@
29 28
30#include "common.h" 29#include "common.h"
31 30
32/*
33 * The following lookup table is used to override device names when devices
34 * are registered from device tree. This is temporarily added to enable
35 * device tree support addition for the S3C2416 architecture.
36 *
37 * For drivers that require platform data to be provided from the machine
38 * file, a platform data pointer can also be supplied along with the
39 * devices names. Usually, the platform data elements that cannot be parsed
40 * from the device tree by the drivers (example: function pointers) are
41 * supplied. But it should be noted that this is a temporary mechanism and
42 * at some point, the drivers should be capable of parsing all the platform
43 * data from the device tree.
44 */
45static const struct of_dev_auxdata s3c2416_auxdata_lookup[] __initconst = {
46 OF_DEV_AUXDATA("samsung,s3c2440-uart", S3C24XX_PA_UART,
47 "s3c2440-uart.0", NULL),
48 OF_DEV_AUXDATA("samsung,s3c2440-uart", S3C24XX_PA_UART + 0x4000,
49 "s3c2440-uart.1", NULL),
50 OF_DEV_AUXDATA("samsung,s3c2440-uart", S3C24XX_PA_UART + 0x8000,
51 "s3c2440-uart.2", NULL),
52 OF_DEV_AUXDATA("samsung,s3c2440-uart", S3C24XX_PA_UART + 0xC000,
53 "s3c2440-uart.3", NULL),
54 OF_DEV_AUXDATA("samsung,s3c6410-sdhci", S3C_PA_HSMMC0,
55 "s3c-sdhci.0", NULL),
56 OF_DEV_AUXDATA("samsung,s3c6410-sdhci", S3C_PA_HSMMC1,
57 "s3c-sdhci.1", NULL),
58 OF_DEV_AUXDATA("samsung,s3c2440-i2c", S3C_PA_IIC,
59 "s3c2440-i2c.0", NULL),
60 {},
61};
62
63static void __init s3c2416_dt_map_io(void) 31static void __init s3c2416_dt_map_io(void)
64{ 32{
65 s3c24xx_init_io(NULL, 0); 33 s3c24xx_init_io(NULL, 0);
66 s3c24xx_init_clocks(12000000);
67} 34}
68 35
69static void __init s3c2416_dt_machine_init(void) 36static void __init s3c2416_dt_machine_init(void)
70{ 37{
71 of_platform_populate(NULL, of_default_bus_match_table, 38 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
72 s3c2416_auxdata_lookup, NULL);
73
74 s3c_pm_init(); 39 s3c_pm_init();
75} 40}
76 41
@@ -86,6 +51,5 @@ DT_MACHINE_START(S3C2416_DT, "Samsung S3C2416 (Flattened Device Tree)")
86 .map_io = s3c2416_dt_map_io, 51 .map_io = s3c2416_dt_map_io,
87 .init_irq = irqchip_init, 52 .init_irq = irqchip_init,
88 .init_machine = s3c2416_dt_machine_init, 53 .init_machine = s3c2416_dt_machine_init,
89 .init_time = clocksource_of_init,
90 .restart = s3c2416_restart, 54 .restart = s3c2416_restart,
91MACHINE_END 55MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2410.c b/arch/arm/mach-s3c24xx/mach-smdk2410.c
index f32924ee0e9f..419fadd6e446 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2410.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2410.c
@@ -99,11 +99,16 @@ static struct platform_device *smdk2410_devices[] __initdata = {
99static void __init smdk2410_map_io(void) 99static void __init smdk2410_map_io(void)
100{ 100{
101 s3c24xx_init_io(smdk2410_iodesc, ARRAY_SIZE(smdk2410_iodesc)); 101 s3c24xx_init_io(smdk2410_iodesc, ARRAY_SIZE(smdk2410_iodesc));
102 s3c24xx_init_clocks(0);
103 s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs)); 102 s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs));
104 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 103 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
105} 104}
106 105
106static void __init smdk2410_init_time(void)
107{
108 s3c2410_init_clocks(12000000);
109 samsung_timer_init();
110}
111
107static void __init smdk2410_init(void) 112static void __init smdk2410_init(void)
108{ 113{
109 s3c_i2c0_set_platdata(NULL); 114 s3c_i2c0_set_platdata(NULL);
@@ -118,6 +123,6 @@ MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switc
118 .map_io = smdk2410_map_io, 123 .map_io = smdk2410_map_io,
119 .init_irq = s3c2410_init_irq, 124 .init_irq = s3c2410_init_irq,
120 .init_machine = smdk2410_init, 125 .init_machine = smdk2410_init,
121 .init_time = samsung_timer_init, 126 .init_time = smdk2410_init_time,
122 .restart = s3c2410_restart, 127 .restart = s3c2410_restart,
123MACHINE_END 128MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2413.c b/arch/arm/mach-s3c24xx/mach-smdk2413.c
index 233fe52d2015..fb3b80e44595 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2413.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2413.c
@@ -22,6 +22,7 @@
22#include <linux/serial_s3c.h> 22#include <linux/serial_s3c.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/memblock.h>
25 26
26#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
27#include <asm/mach/map.h> 28#include <asm/mach/map.h>
@@ -93,24 +94,26 @@ static struct platform_device *smdk2413_devices[] __initdata = {
93 &s3c2412_device_dma, 94 &s3c2412_device_dma,
94}; 95};
95 96
96static void __init smdk2413_fixup(struct tag *tags, char **cmdline, 97static void __init smdk2413_fixup(struct tag *tags, char **cmdline)
97 struct meminfo *mi)
98{ 98{
99 if (tags != phys_to_virt(S3C2410_SDRAM_PA + 0x100)) { 99 if (tags != phys_to_virt(S3C2410_SDRAM_PA + 0x100)) {
100 mi->nr_banks=1; 100 memblock_add(0x30000000, SZ_64M);
101 mi->bank[0].start = 0x30000000;
102 mi->bank[0].size = SZ_64M;
103 } 101 }
104} 102}
105 103
106static void __init smdk2413_map_io(void) 104static void __init smdk2413_map_io(void)
107{ 105{
108 s3c24xx_init_io(smdk2413_iodesc, ARRAY_SIZE(smdk2413_iodesc)); 106 s3c24xx_init_io(smdk2413_iodesc, ARRAY_SIZE(smdk2413_iodesc));
109 s3c24xx_init_clocks(12000000);
110 s3c24xx_init_uarts(smdk2413_uartcfgs, ARRAY_SIZE(smdk2413_uartcfgs)); 107 s3c24xx_init_uarts(smdk2413_uartcfgs, ARRAY_SIZE(smdk2413_uartcfgs));
111 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 108 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
112} 109}
113 110
111static void __init smdk2413_init_time(void)
112{
113 s3c2412_init_clocks(12000000);
114 samsung_timer_init();
115}
116
114static void __init smdk2413_machine_init(void) 117static void __init smdk2413_machine_init(void)
115{ /* Turn off suspend on both USB ports, and switch the 118{ /* Turn off suspend on both USB ports, and switch the
116 * selectable USB port to USB device mode. */ 119 * selectable USB port to USB device mode. */
@@ -159,6 +162,6 @@ MACHINE_START(SMDK2413, "SMDK2413")
159 .init_irq = s3c2412_init_irq, 162 .init_irq = s3c2412_init_irq,
160 .map_io = smdk2413_map_io, 163 .map_io = smdk2413_map_io,
161 .init_machine = smdk2413_machine_init, 164 .init_machine = smdk2413_machine_init,
162 .init_time = samsung_timer_init, 165 .init_time = smdk2413_init_time,
163 .restart = s3c2412_restart, 166 .restart = s3c2412_restart,
164MACHINE_END 167MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c24xx/mach-smdk2416.c
index b3b54d8e1410..fa6f30d23601 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2416.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2416.c
@@ -219,10 +219,15 @@ static struct platform_device *smdk2416_devices[] __initdata = {
219 &s3c2443_device_dma, 219 &s3c2443_device_dma,
220}; 220};
221 221
222static void __init smdk2416_init_time(void)
223{
224 s3c2416_init_clocks(12000000);
225 samsung_timer_init();
226}
227
222static void __init smdk2416_map_io(void) 228static void __init smdk2416_map_io(void)
223{ 229{
224 s3c24xx_init_io(smdk2416_iodesc, ARRAY_SIZE(smdk2416_iodesc)); 230 s3c24xx_init_io(smdk2416_iodesc, ARRAY_SIZE(smdk2416_iodesc));
225 s3c24xx_init_clocks(12000000);
226 s3c24xx_init_uarts(smdk2416_uartcfgs, ARRAY_SIZE(smdk2416_uartcfgs)); 231 s3c24xx_init_uarts(smdk2416_uartcfgs, ARRAY_SIZE(smdk2416_uartcfgs));
227 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 232 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
228} 233}
@@ -257,6 +262,6 @@ MACHINE_START(SMDK2416, "SMDK2416")
257 .init_irq = s3c2416_init_irq, 262 .init_irq = s3c2416_init_irq,
258 .map_io = smdk2416_map_io, 263 .map_io = smdk2416_map_io,
259 .init_machine = smdk2416_machine_init, 264 .init_machine = smdk2416_machine_init,
260 .init_time = samsung_timer_init, 265 .init_time = smdk2416_init_time,
261 .restart = s3c2416_restart, 266 .restart = s3c2416_restart,
262MACHINE_END 267MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2440.c b/arch/arm/mach-s3c24xx/mach-smdk2440.c
index d071dcfea548..5fb89c0ae17a 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2440.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2440.c
@@ -38,7 +38,6 @@
38#include <mach/fb.h> 38#include <mach/fb.h>
39#include <linux/platform_data/i2c-s3c2410.h> 39#include <linux/platform_data/i2c-s3c2410.h>
40 40
41#include <plat/clock.h>
42#include <plat/devs.h> 41#include <plat/devs.h>
43#include <plat/cpu.h> 42#include <plat/cpu.h>
44#include <plat/samsung-time.h> 43#include <plat/samsung-time.h>
@@ -159,11 +158,16 @@ static struct platform_device *smdk2440_devices[] __initdata = {
159static void __init smdk2440_map_io(void) 158static void __init smdk2440_map_io(void)
160{ 159{
161 s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc)); 160 s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc));
162 s3c24xx_init_clocks(16934400);
163 s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs)); 161 s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs));
164 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 162 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
165} 163}
166 164
165static void __init smdk2440_init_time(void)
166{
167 s3c2440_init_clocks(16934400);
168 samsung_timer_init();
169}
170
167static void __init smdk2440_machine_init(void) 171static void __init smdk2440_machine_init(void)
168{ 172{
169 s3c24xx_fb_set_platdata(&smdk2440_fb_info); 173 s3c24xx_fb_set_platdata(&smdk2440_fb_info);
@@ -180,6 +184,6 @@ MACHINE_START(S3C2440, "SMDK2440")
180 .init_irq = s3c2440_init_irq, 184 .init_irq = s3c2440_init_irq,
181 .map_io = smdk2440_map_io, 185 .map_io = smdk2440_map_io,
182 .init_machine = smdk2440_machine_init, 186 .init_machine = smdk2440_machine_init,
183 .init_time = samsung_timer_init, 187 .init_time = smdk2440_init_time,
184 .restart = s3c244x_restart, 188 .restart = s3c244x_restart,
185MACHINE_END 189MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2443.c b/arch/arm/mach-s3c24xx/mach-smdk2443.c
index 06c4d77de3a5..ef5d5ea33182 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2443.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2443.c
@@ -121,11 +121,16 @@ static struct platform_device *smdk2443_devices[] __initdata = {
121static void __init smdk2443_map_io(void) 121static void __init smdk2443_map_io(void)
122{ 122{
123 s3c24xx_init_io(smdk2443_iodesc, ARRAY_SIZE(smdk2443_iodesc)); 123 s3c24xx_init_io(smdk2443_iodesc, ARRAY_SIZE(smdk2443_iodesc));
124 s3c24xx_init_clocks(12000000);
125 s3c24xx_init_uarts(smdk2443_uartcfgs, ARRAY_SIZE(smdk2443_uartcfgs)); 124 s3c24xx_init_uarts(smdk2443_uartcfgs, ARRAY_SIZE(smdk2443_uartcfgs));
126 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 125 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
127} 126}
128 127
128static void __init smdk2443_init_time(void)
129{
130 s3c2443_init_clocks(12000000);
131 samsung_timer_init();
132}
133
129static void __init smdk2443_machine_init(void) 134static void __init smdk2443_machine_init(void)
130{ 135{
131 s3c_i2c0_set_platdata(NULL); 136 s3c_i2c0_set_platdata(NULL);
@@ -145,6 +150,6 @@ MACHINE_START(SMDK2443, "SMDK2443")
145 .init_irq = s3c2443_init_irq, 150 .init_irq = s3c2443_init_irq,
146 .map_io = smdk2443_map_io, 151 .map_io = smdk2443_map_io,
147 .init_machine = smdk2443_machine_init, 152 .init_machine = smdk2443_machine_init,
148 .init_time = samsung_timer_init, 153 .init_time = smdk2443_init_time,
149 .restart = s3c2443_restart, 154 .restart = s3c2443_restart,
150MACHINE_END 155MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-tct_hammer.c b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
index 4108b2f0cede..c616ca2d409e 100644
--- a/arch/arm/mach-s3c24xx/mach-tct_hammer.c
+++ b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
@@ -135,11 +135,16 @@ static struct platform_device *tct_hammer_devices[] __initdata = {
135static void __init tct_hammer_map_io(void) 135static void __init tct_hammer_map_io(void)
136{ 136{
137 s3c24xx_init_io(tct_hammer_iodesc, ARRAY_SIZE(tct_hammer_iodesc)); 137 s3c24xx_init_io(tct_hammer_iodesc, ARRAY_SIZE(tct_hammer_iodesc));
138 s3c24xx_init_clocks(0);
139 s3c24xx_init_uarts(tct_hammer_uartcfgs, ARRAY_SIZE(tct_hammer_uartcfgs)); 138 s3c24xx_init_uarts(tct_hammer_uartcfgs, ARRAY_SIZE(tct_hammer_uartcfgs));
140 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 139 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
141} 140}
142 141
142static void __init tct_hammer_init_time(void)
143{
144 s3c2410_init_clocks(12000000);
145 samsung_timer_init();
146}
147
143static void __init tct_hammer_init(void) 148static void __init tct_hammer_init(void)
144{ 149{
145 s3c_i2c0_set_platdata(NULL); 150 s3c_i2c0_set_platdata(NULL);
@@ -151,6 +156,6 @@ MACHINE_START(TCT_HAMMER, "TCT_HAMMER")
151 .map_io = tct_hammer_map_io, 156 .map_io = tct_hammer_map_io,
152 .init_irq = s3c2410_init_irq, 157 .init_irq = s3c2410_init_irq,
153 .init_machine = tct_hammer_init, 158 .init_machine = tct_hammer_init,
154 .init_time = samsung_timer_init, 159 .init_time = tct_hammer_init_time,
155 .restart = s3c2410_restart, 160 .restart = s3c2410_restart,
156MACHINE_END 161MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-vr1000.c b/arch/arm/mach-s3c24xx/mach-vr1000.c
index 1cc5b1bd51cd..f88c584c3001 100644
--- a/arch/arm/mach-s3c24xx/mach-vr1000.c
+++ b/arch/arm/mach-s3c24xx/mach-vr1000.c
@@ -43,7 +43,6 @@
43#include <mach/regs-gpio.h> 43#include <mach/regs-gpio.h>
44#include <mach/gpio-samsung.h> 44#include <mach/gpio-samsung.h>
45 45
46#include <plat/clock.h>
47#include <plat/cpu.h> 46#include <plat/cpu.h>
48#include <plat/devs.h> 47#include <plat/devs.h>
49#include <plat/samsung-time.h> 48#include <plat/samsung-time.h>
@@ -286,6 +285,7 @@ static struct i2c_board_info vr1000_i2c_devs[] __initdata = {
286/* devices for this board */ 285/* devices for this board */
287 286
288static struct platform_device *vr1000_devices[] __initdata = { 287static struct platform_device *vr1000_devices[] __initdata = {
288 &s3c2410_device_dclk,
289 &s3c_device_ohci, 289 &s3c_device_ohci,
290 &s3c_device_lcd, 290 &s3c_device_lcd,
291 &s3c_device_wdt, 291 &s3c_device_wdt,
@@ -299,14 +299,6 @@ static struct platform_device *vr1000_devices[] __initdata = {
299 &vr1000_led3, 299 &vr1000_led3,
300}; 300};
301 301
302static struct clk *vr1000_clocks[] __initdata = {
303 &s3c24xx_dclk0,
304 &s3c24xx_dclk1,
305 &s3c24xx_clkout0,
306 &s3c24xx_clkout1,
307 &s3c24xx_uclk,
308};
309
310static void vr1000_power_off(void) 302static void vr1000_power_off(void)
311{ 303{
312 gpio_direction_output(S3C2410_GPB(9), 1); 304 gpio_direction_output(S3C2410_GPB(9), 1);
@@ -314,29 +306,19 @@ static void vr1000_power_off(void)
314 306
315static void __init vr1000_map_io(void) 307static void __init vr1000_map_io(void)
316{ 308{
317 /* initialise clock sources */
318
319 s3c24xx_dclk0.parent = &clk_upll;
320 s3c24xx_dclk0.rate = 12*1000*1000;
321
322 s3c24xx_dclk1.parent = NULL;
323 s3c24xx_dclk1.rate = 3692307;
324
325 s3c24xx_clkout0.parent = &s3c24xx_dclk0;
326 s3c24xx_clkout1.parent = &s3c24xx_dclk1;
327
328 s3c24xx_uclk.parent = &s3c24xx_clkout1;
329
330 s3c24xx_register_clocks(vr1000_clocks, ARRAY_SIZE(vr1000_clocks));
331
332 pm_power_off = vr1000_power_off; 309 pm_power_off = vr1000_power_off;
333 310
334 s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc)); 311 s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc));
335 s3c24xx_init_clocks(0);
336 s3c24xx_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs)); 312 s3c24xx_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs));
337 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 313 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
338} 314}
339 315
316static void __init vr1000_init_time(void)
317{
318 s3c2410_init_clocks(12000000);
319 samsung_timer_init();
320}
321
340static void __init vr1000_init(void) 322static void __init vr1000_init(void)
341{ 323{
342 s3c_i2c0_set_platdata(NULL); 324 s3c_i2c0_set_platdata(NULL);
@@ -357,6 +339,6 @@ MACHINE_START(VR1000, "Thorcom-VR1000")
357 .map_io = vr1000_map_io, 339 .map_io = vr1000_map_io,
358 .init_machine = vr1000_init, 340 .init_machine = vr1000_init,
359 .init_irq = s3c2410_init_irq, 341 .init_irq = s3c2410_init_irq,
360 .init_time = samsung_timer_init, 342 .init_time = vr1000_init_time,
361 .restart = s3c2410_restart, 343 .restart = s3c2410_restart,
362MACHINE_END 344MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-vstms.c b/arch/arm/mach-s3c24xx/mach-vstms.c
index 40868c0e0a68..9104c2be36c9 100644
--- a/arch/arm/mach-s3c24xx/mach-vstms.c
+++ b/arch/arm/mach-s3c24xx/mach-vstms.c
@@ -23,6 +23,7 @@
23#include <linux/mtd/nand.h> 23#include <linux/mtd/nand.h>
24#include <linux/mtd/nand_ecc.h> 24#include <linux/mtd/nand_ecc.h>
25#include <linux/mtd/partitions.h> 25#include <linux/mtd/partitions.h>
26#include <linux/memblock.h>
26 27
27#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
28#include <asm/mach/map.h> 29#include <asm/mach/map.h>
@@ -129,24 +130,26 @@ static struct platform_device *vstms_devices[] __initdata = {
129 &s3c2412_device_dma, 130 &s3c2412_device_dma,
130}; 131};
131 132
132static void __init vstms_fixup(struct tag *tags, char **cmdline, 133static void __init vstms_fixup(struct tag *tags, char **cmdline)
133 struct meminfo *mi)
134{ 134{
135 if (tags != phys_to_virt(S3C2410_SDRAM_PA + 0x100)) { 135 if (tags != phys_to_virt(S3C2410_SDRAM_PA + 0x100)) {
136 mi->nr_banks=1; 136 memblock_add(0x30000000, SZ_64M);
137 mi->bank[0].start = 0x30000000;
138 mi->bank[0].size = SZ_64M;
139 } 137 }
140} 138}
141 139
142static void __init vstms_map_io(void) 140static void __init vstms_map_io(void)
143{ 141{
144 s3c24xx_init_io(vstms_iodesc, ARRAY_SIZE(vstms_iodesc)); 142 s3c24xx_init_io(vstms_iodesc, ARRAY_SIZE(vstms_iodesc));
145 s3c24xx_init_clocks(12000000);
146 s3c24xx_init_uarts(vstms_uartcfgs, ARRAY_SIZE(vstms_uartcfgs)); 143 s3c24xx_init_uarts(vstms_uartcfgs, ARRAY_SIZE(vstms_uartcfgs));
147 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 144 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
148} 145}
149 146
147static void __init vstms_init_time(void)
148{
149 s3c2412_init_clocks(12000000);
150 samsung_timer_init();
151}
152
150static void __init vstms_init(void) 153static void __init vstms_init(void)
151{ 154{
152 s3c_i2c0_set_platdata(NULL); 155 s3c_i2c0_set_platdata(NULL);
@@ -162,6 +165,6 @@ MACHINE_START(VSTMS, "VSTMS")
162 .init_irq = s3c2412_init_irq, 165 .init_irq = s3c2412_init_irq,
163 .init_machine = vstms_init, 166 .init_machine = vstms_init,
164 .map_io = vstms_map_io, 167 .map_io = vstms_map_io,
165 .init_time = samsung_timer_init, 168 .init_time = vstms_init_time,
166 .restart = s3c2412_restart, 169 .restart = s3c2412_restart,
167MACHINE_END 170MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/pm.c b/arch/arm/mach-s3c24xx/pm.c
index 68ea5b7e5dc7..b19256ec8d40 100644
--- a/arch/arm/mach-s3c24xx/pm.c
+++ b/arch/arm/mach-s3c24xx/pm.c
@@ -51,9 +51,6 @@
51#define PFX "s3c24xx-pm: " 51#define PFX "s3c24xx-pm: "
52 52
53static struct sleep_save core_save[] = { 53static struct sleep_save core_save[] = {
54 SAVE_ITEM(S3C2410_LOCKTIME),
55 SAVE_ITEM(S3C2410_CLKCON),
56
57 /* we restore the timings here, with the proviso that the board 54 /* we restore the timings here, with the proviso that the board
58 * brings the system up in an slower, or equal frequency setting 55 * brings the system up in an slower, or equal frequency setting
59 * to the original system. 56 * to the original system.
@@ -69,18 +66,6 @@ static struct sleep_save core_save[] = {
69 SAVE_ITEM(S3C2410_BANKCON3), 66 SAVE_ITEM(S3C2410_BANKCON3),
70 SAVE_ITEM(S3C2410_BANKCON4), 67 SAVE_ITEM(S3C2410_BANKCON4),
71 SAVE_ITEM(S3C2410_BANKCON5), 68 SAVE_ITEM(S3C2410_BANKCON5),
72
73#ifndef CONFIG_CPU_FREQ
74 SAVE_ITEM(S3C2410_CLKDIVN),
75 SAVE_ITEM(S3C2410_MPLLCON),
76 SAVE_ITEM(S3C2410_REFRESH),
77#endif
78 SAVE_ITEM(S3C2410_UPLLCON),
79 SAVE_ITEM(S3C2410_CLKSLOW),
80};
81
82static struct sleep_save misc_save[] = {
83 SAVE_ITEM(S3C2410_DCLKCON),
84}; 69};
85 70
86/* s3c_pm_check_resume_pin 71/* s3c_pm_check_resume_pin
@@ -140,12 +125,10 @@ void s3c_pm_configure_extint(void)
140void s3c_pm_restore_core(void) 125void s3c_pm_restore_core(void)
141{ 126{
142 s3c_pm_do_restore_core(core_save, ARRAY_SIZE(core_save)); 127 s3c_pm_do_restore_core(core_save, ARRAY_SIZE(core_save));
143 s3c_pm_do_restore(misc_save, ARRAY_SIZE(misc_save));
144} 128}
145 129
146void s3c_pm_save_core(void) 130void s3c_pm_save_core(void)
147{ 131{
148 s3c_pm_do_save(misc_save, ARRAY_SIZE(misc_save));
149 s3c_pm_do_save(core_save, ARRAY_SIZE(core_save)); 132 s3c_pm_do_save(core_save, ARRAY_SIZE(core_save));
150} 133}
151 134
diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c
index 04b58cb49888..7eab88829883 100644
--- a/arch/arm/mach-s3c24xx/s3c2410.c
+++ b/arch/arm/mach-s3c24xx/s3c2410.c
@@ -85,62 +85,6 @@ void __init s3c2410_map_io(void)
85 85
86void __init_or_cpufreq s3c2410_setup_clocks(void) 86void __init_or_cpufreq s3c2410_setup_clocks(void)
87{ 87{
88 struct clk *xtal_clk;
89 unsigned long tmp;
90 unsigned long xtal;
91 unsigned long fclk;
92 unsigned long hclk;
93 unsigned long pclk;
94
95 xtal_clk = clk_get(NULL, "xtal");
96 xtal = clk_get_rate(xtal_clk);
97 clk_put(xtal_clk);
98
99 /* now we've got our machine bits initialised, work out what
100 * clocks we've got */
101
102 fclk = s3c24xx_get_pll(__raw_readl(S3C2410_MPLLCON), xtal);
103
104 tmp = __raw_readl(S3C2410_CLKDIVN);
105
106 /* work out clock scalings */
107
108 hclk = fclk / ((tmp & S3C2410_CLKDIVN_HDIVN) ? 2 : 1);
109 pclk = hclk / ((tmp & S3C2410_CLKDIVN_PDIVN) ? 2 : 1);
110
111 /* print brieft summary of clocks, etc */
112
113 printk("S3C2410: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n",
114 print_mhz(fclk), print_mhz(hclk), print_mhz(pclk));
115
116 /* initialise the clocks here, to allow other things like the
117 * console to use them
118 */
119
120 s3c24xx_setup_clocks(fclk, hclk, pclk);
121}
122
123/* fake ARMCLK for use with cpufreq, etc. */
124
125static struct clk s3c2410_armclk = {
126 .name = "armclk",
127 .parent = &clk_f,
128 .id = -1,
129};
130
131static struct clk_lookup s3c2410_clk_lookup[] = {
132 CLKDEV_INIT(NULL, "clk_uart_baud0", &clk_p),
133 CLKDEV_INIT(NULL, "clk_uart_baud1", &s3c24xx_uclk),
134};
135
136void __init s3c2410_init_clocks(int xtal)
137{
138 s3c24xx_register_baseclocks(xtal);
139 s3c2410_setup_clocks();
140 s3c2410_baseclk_add();
141 s3c24xx_register_clock(&s3c2410_armclk);
142 clkdev_add_table(s3c2410_clk_lookup, ARRAY_SIZE(s3c2410_clk_lookup));
143 samsung_wdt_reset_init(S3C24XX_VA_WATCHDOG);
144} 88}
145 89
146struct bus_type s3c2410_subsys = { 90struct bus_type s3c2410_subsys = {
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c
index 657cbaca80ac..d49f52fbc842 100644
--- a/arch/arm/mach-s3c24xx/s3c2412.c
+++ b/arch/arm/mach-s3c24xx/s3c2412.c
@@ -173,49 +173,6 @@ void __init s3c2412_map_io(void)
173 173
174void __init_or_cpufreq s3c2412_setup_clocks(void) 174void __init_or_cpufreq s3c2412_setup_clocks(void)
175{ 175{
176 struct clk *xtal_clk;
177 unsigned long tmp;
178 unsigned long xtal;
179 unsigned long fclk;
180 unsigned long hclk;
181 unsigned long pclk;
182
183 xtal_clk = clk_get(NULL, "xtal");
184 xtal = clk_get_rate(xtal_clk);
185 clk_put(xtal_clk);
186
187 /* now we've got our machine bits initialised, work out what
188 * clocks we've got */
189
190 fclk = s3c24xx_get_pll(__raw_readl(S3C2410_MPLLCON), xtal * 2);
191
192 clk_mpll.rate = fclk;
193
194 tmp = __raw_readl(S3C2410_CLKDIVN);
195
196 /* work out clock scalings */
197
198 hclk = fclk / ((tmp & S3C2412_CLKDIVN_HDIVN_MASK) + 1);
199 hclk /= ((tmp & S3C2412_CLKDIVN_ARMDIVN) ? 2 : 1);
200 pclk = hclk / ((tmp & S3C2412_CLKDIVN_PDIVN) ? 2 : 1);
201
202 /* print brieft summary of clocks, etc */
203
204 printk("S3C2412: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n",
205 print_mhz(fclk), print_mhz(hclk), print_mhz(pclk));
206
207 s3c24xx_setup_clocks(fclk, hclk, pclk);
208}
209
210void __init s3c2412_init_clocks(int xtal)
211{
212 /* initialise the clocks here, to allow other things like the
213 * console to use them
214 */
215
216 s3c24xx_register_baseclocks(xtal);
217 s3c2412_setup_clocks();
218 s3c2412_baseclk_add();
219} 176}
220 177
221/* need to register the subsystem before we actually register the device, and 178/* need to register the subsystem before we actually register the device, and
diff --git a/arch/arm/mach-s3c24xx/s3c2442.c b/arch/arm/mach-s3c24xx/s3c2442.c
index 2c8adc028538..fb9da2b603a2 100644
--- a/arch/arm/mach-s3c24xx/s3c2442.c
+++ b/arch/arm/mach-s3c24xx/s3c2442.c
@@ -53,117 +53,6 @@
53 53
54#include "common.h" 54#include "common.h"
55 55
56/* S3C2442 extended clock support */
57
58static unsigned long s3c2442_camif_upll_round(struct clk *clk,
59 unsigned long rate)
60{
61 unsigned long parent_rate = clk_get_rate(clk->parent);
62 int div;
63
64 if (rate > parent_rate)
65 return parent_rate;
66
67 div = parent_rate / rate;
68
69 if (div == 3)
70 return parent_rate / 3;
71
72 /* note, we remove the +/- 1 calculations for the divisor */
73
74 div /= 2;
75
76 if (div < 1)
77 div = 1;
78 else if (div > 16)
79 div = 16;
80
81 return parent_rate / (div * 2);
82}
83
84static int s3c2442_camif_upll_setrate(struct clk *clk, unsigned long rate)
85{
86 unsigned long parent_rate = clk_get_rate(clk->parent);
87 unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN);
88
89 rate = s3c2442_camif_upll_round(clk, rate);
90
91 camdivn &= ~S3C2442_CAMDIVN_CAMCLK_DIV3;
92
93 if (rate == parent_rate) {
94 camdivn &= ~S3C2440_CAMDIVN_CAMCLK_SEL;
95 } else if ((parent_rate / rate) == 3) {
96 camdivn |= S3C2440_CAMDIVN_CAMCLK_SEL;
97 camdivn |= S3C2442_CAMDIVN_CAMCLK_DIV3;
98 } else {
99 camdivn &= ~S3C2440_CAMDIVN_CAMCLK_MASK;
100 camdivn |= S3C2440_CAMDIVN_CAMCLK_SEL;
101 camdivn |= (((parent_rate / rate) / 2) - 1);
102 }
103
104 __raw_writel(camdivn, S3C2440_CAMDIVN);
105
106 return 0;
107}
108
109/* Extra S3C2442 clocks */
110
111static struct clk s3c2442_clk_cam = {
112 .name = "camif",
113 .id = -1,
114 .enable = s3c2410_clkcon_enable,
115 .ctrlbit = S3C2440_CLKCON_CAMERA,
116};
117
118static struct clk s3c2442_clk_cam_upll = {
119 .name = "camif-upll",
120 .id = -1,
121 .ops = &(struct clk_ops) {
122 .set_rate = s3c2442_camif_upll_setrate,
123 .round_rate = s3c2442_camif_upll_round,
124 },
125};
126
127static int s3c2442_clk_add(struct device *dev, struct subsys_interface *sif)
128{
129 struct clk *clock_upll;
130 struct clk *clock_h;
131 struct clk *clock_p;
132
133 clock_p = clk_get(NULL, "pclk");
134 clock_h = clk_get(NULL, "hclk");
135 clock_upll = clk_get(NULL, "upll");
136
137 if (IS_ERR(clock_p) || IS_ERR(clock_h) || IS_ERR(clock_upll)) {
138 printk(KERN_ERR "S3C2442: Failed to get parent clocks\n");
139 return -EINVAL;
140 }
141
142 s3c2442_clk_cam.parent = clock_h;
143 s3c2442_clk_cam_upll.parent = clock_upll;
144
145 s3c24xx_register_clock(&s3c2442_clk_cam);
146 s3c24xx_register_clock(&s3c2442_clk_cam_upll);
147
148 clk_disable(&s3c2442_clk_cam);
149
150 return 0;
151}
152
153static struct subsys_interface s3c2442_clk_interface = {
154 .name = "s3c2442_clk",
155 .subsys = &s3c2442_subsys,
156 .add_dev = s3c2442_clk_add,
157};
158
159static __init int s3c2442_clk_init(void)
160{
161 return subsys_interface_register(&s3c2442_clk_interface);
162}
163
164arch_initcall(s3c2442_clk_init);
165
166
167static struct device s3c2442_dev = { 56static struct device s3c2442_dev = {
168 .bus = &s3c2442_subsys, 57 .bus = &s3c2442_subsys,
169}; 58};
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c
index fe30ebb234d2..4a64bcc9eb51 100644
--- a/arch/arm/mach-s3c24xx/s3c244x.c
+++ b/arch/arm/mach-s3c24xx/s3c244x.c
@@ -46,6 +46,7 @@
46#include <plat/nand-core.h> 46#include <plat/nand-core.h>
47#include <plat/watchdog-reset.h> 47#include <plat/watchdog-reset.h>
48 48
49#include "common.h"
49#include "regs-dsc.h" 50#include "regs-dsc.h"
50 51
51static struct map_desc s3c244x_iodesc[] __initdata = { 52static struct map_desc s3c244x_iodesc[] __initdata = {
@@ -74,67 +75,11 @@ void __init s3c244x_map_io(void)
74 s3c_nand_setname("s3c2440-nand"); 75 s3c_nand_setname("s3c2440-nand");
75 s3c_device_ts.name = "s3c2440-ts"; 76 s3c_device_ts.name = "s3c2440-ts";
76 s3c_device_usbgadget.name = "s3c2440-usbgadget"; 77 s3c_device_usbgadget.name = "s3c2440-usbgadget";
78 s3c2410_device_dclk.name = "s3c2440-dclk";
77} 79}
78 80
79void __init_or_cpufreq s3c244x_setup_clocks(void) 81void __init_or_cpufreq s3c244x_setup_clocks(void)
80{ 82{
81 struct clk *xtal_clk;
82 unsigned long clkdiv;
83 unsigned long camdiv;
84 unsigned long xtal;
85 unsigned long hclk, fclk, pclk;
86 int hdiv = 1;
87
88 xtal_clk = clk_get(NULL, "xtal");
89 xtal = clk_get_rate(xtal_clk);
90 clk_put(xtal_clk);
91
92 fclk = s3c24xx_get_pll(__raw_readl(S3C2410_MPLLCON), xtal) * 2;
93
94 clkdiv = __raw_readl(S3C2410_CLKDIVN);
95 camdiv = __raw_readl(S3C2440_CAMDIVN);
96
97 /* work out clock scalings */
98
99 switch (clkdiv & S3C2440_CLKDIVN_HDIVN_MASK) {
100 case S3C2440_CLKDIVN_HDIVN_1:
101 hdiv = 1;
102 break;
103
104 case S3C2440_CLKDIVN_HDIVN_2:
105 hdiv = 2;
106 break;
107
108 case S3C2440_CLKDIVN_HDIVN_4_8:
109 hdiv = (camdiv & S3C2440_CAMDIVN_HCLK4_HALF) ? 8 : 4;
110 break;
111
112 case S3C2440_CLKDIVN_HDIVN_3_6:
113 hdiv = (camdiv & S3C2440_CAMDIVN_HCLK3_HALF) ? 6 : 3;
114 break;
115 }
116
117 hclk = fclk / hdiv;
118 pclk = hclk / ((clkdiv & S3C2440_CLKDIVN_PDIVN) ? 2 : 1);
119
120 /* print brief summary of clocks, etc */
121
122 printk("S3C244X: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n",
123 print_mhz(fclk), print_mhz(hclk), print_mhz(pclk));
124
125 s3c24xx_setup_clocks(fclk, hclk, pclk);
126}
127
128void __init s3c244x_init_clocks(int xtal)
129{
130 /* initialise the clocks here, to allow other things like the
131 * console to use them, and to add new ones after the initialisation
132 */
133
134 s3c24xx_register_baseclocks(xtal);
135 s3c244x_setup_clocks();
136 s3c2410_baseclk_add();
137 samsung_wdt_reset_init(S3C24XX_VA_WATCHDOG);
138} 83}
139 84
140/* Since the S3C2442 and S3C2440 share items, put both subsystems here */ 85/* Since the S3C2442 and S3C2440 share items, put both subsystems here */
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index b41a38a75844..6c719eccb94e 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -49,11 +49,6 @@
49#include <plat/clock.h> 49#include <plat/clock.h>
50#include <plat/samsung-time.h> 50#include <plat/samsung-time.h>
51#include <plat/mfc.h> 51#include <plat/mfc.h>
52#include <plat/camport.h>
53
54#include <media/v4l2-mediabus.h>
55#include <media/s5p_fimc.h>
56#include <media/noon010pc30.h>
57 52
58#include "common.h" 53#include "common.h"
59 54
@@ -285,14 +280,6 @@ static void __init goni_tsp_init(void)
285/* USB OTG */ 280/* USB OTG */
286static struct s3c_hsotg_plat goni_hsotg_pdata; 281static struct s3c_hsotg_plat goni_hsotg_pdata;
287 282
288static void goni_camera_init(void)
289{
290 s5pv210_fimc_setup_gpio(S5P_CAMPORT_A);
291
292 /* Set max driver strength on CAM_A_CLKOUT pin. */
293 s5p_gpio_set_drvstr(S5PV210_GPE1(3), S5P_GPIO_DRVSTR_LV4);
294}
295
296/* MAX8998 regulators */ 283/* MAX8998 regulators */
297#if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE) 284#if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE)
298 285
@@ -825,34 +812,6 @@ static void goni_setup_sdhci(void)
825 s3c_sdhci2_set_platdata(&goni_hsmmc2_data); 812 s3c_sdhci2_set_platdata(&goni_hsmmc2_data);
826}; 813};
827 814
828static struct noon010pc30_platform_data noon010pc30_pldata = {
829 .clk_rate = 16000000UL,
830 .gpio_nreset = S5PV210_GPB(2), /* CAM_CIF_NRST */
831 .gpio_nstby = S5PV210_GPB(0), /* CAM_CIF_NSTBY */
832};
833
834static struct i2c_board_info noon010pc30_board_info = {
835 I2C_BOARD_INFO("NOON010PC30", 0x60 >> 1),
836 .platform_data = &noon010pc30_pldata,
837};
838
839static struct fimc_source_info goni_camera_sensors[] = {
840 {
841 .mux_id = 0,
842 .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING |
843 V4L2_MBUS_VSYNC_ACTIVE_LOW,
844 .fimc_bus_type = FIMC_BUS_TYPE_ITU_601,
845 .board_info = &noon010pc30_board_info,
846 .i2c_bus_num = 0,
847 .clk_frequency = 16000000UL,
848 },
849};
850
851static struct s5p_platform_fimc goni_fimc_md_platdata __initdata = {
852 .source_info = goni_camera_sensors,
853 .num_clients = ARRAY_SIZE(goni_camera_sensors),
854};
855
856/* Audio device */ 815/* Audio device */
857static struct platform_device goni_device_audio = { 816static struct platform_device goni_device_audio = {
858 .name = "smdk-audio", 817 .name = "smdk-audio",
@@ -874,10 +833,6 @@ static struct platform_device *goni_devices[] __initdata = {
874 &s5p_device_mixer, 833 &s5p_device_mixer,
875 &s5p_device_sdo, 834 &s5p_device_sdo,
876 &s3c_device_i2c0, 835 &s3c_device_i2c0,
877 &s5p_device_fimc0,
878 &s5p_device_fimc1,
879 &s5p_device_fimc2,
880 &s5p_device_fimc_md,
881 &s3c_device_hsmmc0, 836 &s3c_device_hsmmc0,
882 &s3c_device_hsmmc1, 837 &s3c_device_hsmmc1,
883 &s3c_device_hsmmc2, 838 &s3c_device_hsmmc2,
@@ -946,14 +901,8 @@ static void __init goni_machine_init(void)
946 /* FB */ 901 /* FB */
947 s3c_fb_set_platdata(&goni_lcd_pdata); 902 s3c_fb_set_platdata(&goni_lcd_pdata);
948 903
949 /* FIMC */
950 s3c_set_platdata(&goni_fimc_md_platdata, sizeof(goni_fimc_md_platdata),
951 &s5p_device_fimc_md);
952
953 s3c_hsotg_set_platdata(&goni_hsotg_pdata); 904 s3c_hsotg_set_platdata(&goni_hsotg_pdata);
954 905
955 goni_camera_init();
956
957 /* SPI */ 906 /* SPI */
958 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); 907 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
959 908
diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c
index 8443a27bca2f..7dd894ece9ae 100644
--- a/arch/arm/mach-sa1100/assabet.c
+++ b/arch/arm/mach-sa1100/assabet.c
@@ -531,7 +531,7 @@ static void __init get_assabet_scr(void)
531} 531}
532 532
533static void __init 533static void __init
534fixup_assabet(struct tag *tags, char **cmdline, struct meminfo *mi) 534fixup_assabet(struct tag *tags, char **cmdline)
535{ 535{
536 /* This must be done before any call to machine_has_neponset() */ 536 /* This must be done before any call to machine_has_neponset() */
537 map_sa1100_gpio_regs(); 537 map_sa1100_gpio_regs();
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 0f92ba8e7884..dbd954e61aa7 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -8,7 +8,6 @@ config ARCH_SHMOBILE_MULTI
8 select HAVE_ARM_SCU if SMP 8 select HAVE_ARM_SCU if SMP
9 select HAVE_ARM_TWD if SMP 9 select HAVE_ARM_TWD if SMP
10 select ARM_GIC 10 select ARM_GIC
11 select MIGHT_HAVE_PCI
12 select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE 11 select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
13 select NO_IOPORT_MAP 12 select NO_IOPORT_MAP
14 select PINCTRL 13 select PINCTRL
@@ -108,6 +107,7 @@ config ARCH_R8A7778
108 select SH_CLK_CPG 107 select SH_CLK_CPG
109 select ARM_GIC 108 select ARM_GIC
110 select SYS_SUPPORTS_SH_TMU 109 select SYS_SUPPORTS_SH_TMU
110 select RENESAS_INTC_IRQPIN
111 111
112config ARCH_R8A7779 112config ARCH_R8A7779
113 bool "R-Car H1 (R8A77790)" 113 bool "R-Car H1 (R8A77790)"
@@ -140,16 +140,6 @@ config ARCH_R8A7791
140 select SYS_SUPPORTS_SH_CMT 140 select SYS_SUPPORTS_SH_CMT
141 select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE 141 select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
142 142
143config ARCH_EMEV2
144 bool "Emma Mobile EV2"
145 select ARCH_WANT_OPTIONAL_GPIOLIB
146 select ARM_GIC
147 select CPU_V7
148 select MIGHT_HAVE_PCI
149 select USE_OF
150 select AUTO_ZRELADDR
151 select SYS_SUPPORTS_EM_STI
152
153config ARCH_R7S72100 143config ARCH_R7S72100
154 bool "RZ/A1H (R7S72100)" 144 bool "RZ/A1H (R7S72100)"
155 select ARCH_WANT_OPTIONAL_GPIOLIB 145 select ARCH_WANT_OPTIONAL_GPIOLIB
@@ -205,8 +195,8 @@ config MACH_ARMADILLO800EVA_REFERENCE
205 select SND_SOC_WM8978 if SND_SIMPLE_CARD 195 select SND_SOC_WM8978 if SND_SIMPLE_CARD
206 select USE_OF 196 select USE_OF
207 ---help--- 197 ---help---
208 Use reference implementation of Aramdillo800 EVA board support 198 Use reference implementation of Armadillo800 EVA board support
209 which makes a greater use of device tree at the expense 199 which makes greater use of device tree at the expense
210 of not supporting a number of devices. 200 of not supporting a number of devices.
211 201
212 This is intended to aid developers 202 This is intended to aid developers
@@ -216,7 +206,6 @@ config MACH_BOCKW
216 depends on ARCH_R8A7778 206 depends on ARCH_R8A7778
217 select ARCH_REQUIRE_GPIOLIB 207 select ARCH_REQUIRE_GPIOLIB
218 select REGULATOR_FIXED_VOLTAGE if REGULATOR 208 select REGULATOR_FIXED_VOLTAGE if REGULATOR
219 select RENESAS_INTC_IRQPIN
220 select SND_SOC_AK4554 if SND_SIMPLE_CARD 209 select SND_SOC_AK4554 if SND_SIMPLE_CARD
221 select SND_SOC_AK4642 if SND_SIMPLE_CARD 210 select SND_SOC_AK4642 if SND_SIMPLE_CARD
222 select USE_OF 211 select USE_OF
@@ -225,7 +214,6 @@ config MACH_BOCKW_REFERENCE
225 bool "BOCK-W - Reference Device Tree Implementation" 214 bool "BOCK-W - Reference Device Tree Implementation"
226 depends on ARCH_R8A7778 215 depends on ARCH_R8A7778
227 select ARCH_REQUIRE_GPIOLIB 216 select ARCH_REQUIRE_GPIOLIB
228 select RENESAS_INTC_IRQPIN
229 select REGULATOR_FIXED_VOLTAGE if REGULATOR 217 select REGULATOR_FIXED_VOLTAGE if REGULATOR
230 select USE_OF 218 select USE_OF
231 ---help--- 219 ---help---
@@ -240,17 +228,6 @@ config MACH_GENMAI
240 depends on ARCH_R7S72100 228 depends on ARCH_R7S72100
241 select USE_OF 229 select USE_OF
242 230
243config MACH_GENMAI_REFERENCE
244 bool "Genmai board - Reference Device Tree Implementation"
245 depends on ARCH_R7S72100
246 select USE_OF
247 ---help---
248 Use reference implementation of Genmai board support
249 which makes use of device tree at the expense
250 of not supporting a number of devices.
251
252 This is intended to aid developers
253
254config MACH_MARZEN 231config MACH_MARZEN
255 bool "MARZEN board" 232 bool "MARZEN board"
256 depends on ARCH_R8A7779 233 depends on ARCH_R8A7779
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index 4caffc912a81..38d5fe825e93 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -21,8 +21,8 @@ obj-$(CONFIG_ARCH_EMEV2) += setup-emev2.o
21obj-$(CONFIG_ARCH_R7S72100) += setup-r7s72100.o 21obj-$(CONFIG_ARCH_R7S72100) += setup-r7s72100.o
22 22
23# Clock objects 23# Clock objects
24ifndef CONFIG_COMMON_CLK
25obj-y += clock.o 24obj-y += clock.o
25ifndef CONFIG_COMMON_CLK
26obj-$(CONFIG_ARCH_SH7372) += clock-sh7372.o 26obj-$(CONFIG_ARCH_SH7372) += clock-sh7372.o
27obj-$(CONFIG_ARCH_SH73A0) += clock-sh73a0.o 27obj-$(CONFIG_ARCH_SH73A0) += clock-sh73a0.o
28obj-$(CONFIG_ARCH_R8A73A4) += clock-r8a73a4.o 28obj-$(CONFIG_ARCH_R8A73A4) += clock-r8a73a4.o
@@ -31,7 +31,6 @@ obj-$(CONFIG_ARCH_R8A7778) += clock-r8a7778.o
31obj-$(CONFIG_ARCH_R8A7779) += clock-r8a7779.o 31obj-$(CONFIG_ARCH_R8A7779) += clock-r8a7779.o
32obj-$(CONFIG_ARCH_R8A7790) += clock-r8a7790.o 32obj-$(CONFIG_ARCH_R8A7790) += clock-r8a7790.o
33obj-$(CONFIG_ARCH_R8A7791) += clock-r8a7791.o 33obj-$(CONFIG_ARCH_R8A7791) += clock-r8a7791.o
34obj-$(CONFIG_ARCH_EMEV2) += clock-emev2.o
35obj-$(CONFIG_ARCH_R7S72100) += clock-r7s72100.o 34obj-$(CONFIG_ARCH_R7S72100) += clock-r7s72100.o
36endif 35endif
37 36
@@ -67,7 +66,6 @@ obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o
67obj-$(CONFIG_MACH_BOCKW) += board-bockw.o 66obj-$(CONFIG_MACH_BOCKW) += board-bockw.o
68obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o 67obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o
69obj-$(CONFIG_MACH_GENMAI) += board-genmai.o 68obj-$(CONFIG_MACH_GENMAI) += board-genmai.o
70obj-$(CONFIG_MACH_GENMAI_REFERENCE) += board-genmai-reference.o
71obj-$(CONFIG_MACH_MARZEN) += board-marzen.o 69obj-$(CONFIG_MACH_MARZEN) += board-marzen.o
72obj-$(CONFIG_MACH_MARZEN_REFERENCE) += board-marzen-reference.o 70obj-$(CONFIG_MACH_MARZEN_REFERENCE) += board-marzen-reference.o
73obj-$(CONFIG_MACH_LAGER) += board-lager.o 71obj-$(CONFIG_MACH_LAGER) += board-lager.o
diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot
index 99455ecafa05..918fccffa1b6 100644
--- a/arch/arm/mach-shmobile/Makefile.boot
+++ b/arch/arm/mach-shmobile/Makefile.boot
@@ -7,7 +7,6 @@ loadaddr-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += 0x40008000
7loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000 7loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000
8loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000 8loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000
9loadaddr-$(CONFIG_MACH_GENMAI) += 0x08008000 9loadaddr-$(CONFIG_MACH_GENMAI) += 0x08008000
10loadaddr-$(CONFIG_MACH_GENMAI_REFERENCE) += 0x08008000
11loadaddr-$(CONFIG_MACH_KOELSCH) += 0x40008000 10loadaddr-$(CONFIG_MACH_KOELSCH) += 0x40008000
12loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 11loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000
13loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 12loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
index 57d1a78367b6..f660fbb96e0b 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
@@ -164,8 +164,8 @@ static void __init eva_init(void)
164 r8a7740_meram_workaround(); 164 r8a7740_meram_workaround();
165 165
166#ifdef CONFIG_CACHE_L2X0 166#ifdef CONFIG_CACHE_L2X0
167 /* Early BRESP enable, Shared attribute override enable, 32K*8way */ 167 /* Shared attribute override enable, 32K*8way */
168 l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff); 168 l2x0_init(IOMEM(0xf0002000), 0x00400000, 0xc20f0fff);
169#endif 169#endif
170 170
171 r8a7740_add_standard_devices_dt(); 171 r8a7740_add_standard_devices_dt();
@@ -187,7 +187,7 @@ static const char *eva_boards_compat_dt[] __initdata = {
187 187
188DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva-reference") 188DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva-reference")
189 .map_io = r8a7740_map_io, 189 .map_io = r8a7740_map_io,
190 .init_early = r8a7740_init_delay, 190 .init_early = shmobile_init_delay,
191 .init_irq = r8a7740_init_irq_of, 191 .init_irq = r8a7740_init_irq_of,
192 .init_machine = eva_init, 192 .init_machine = eva_init,
193 .init_late = shmobile_init_late, 193 .init_late = shmobile_init_late,
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index 486063db2a2f..01f81100c330 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -1017,7 +1017,7 @@ static struct asoc_simple_card_info fsi2_hdmi_info = {
1017 .platform = "sh_fsi2", 1017 .platform = "sh_fsi2",
1018 .cpu_dai = { 1018 .cpu_dai = {
1019 .name = "fsib-dai", 1019 .name = "fsib-dai",
1020 .fmt = SND_SOC_DAIFMT_CBM_CFM, 1020 .fmt = SND_SOC_DAIFMT_CBS_CFS,
1021 }, 1021 },
1022 .codec_dai = { 1022 .codec_dai = {
1023 .name = "sh_mobile_hdmi-hifi", 1023 .name = "sh_mobile_hdmi-hifi",
@@ -1271,8 +1271,8 @@ static void __init eva_init(void)
1271 1271
1272 1272
1273#ifdef CONFIG_CACHE_L2X0 1273#ifdef CONFIG_CACHE_L2X0
1274 /* Early BRESP enable, Shared attribute override enable, 32K*8way */ 1274 /* Shared attribute override enable, 32K*8way */
1275 l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff); 1275 l2x0_init(IOMEM(0xf0002000), 0x00400000, 0xc20f0fff);
1276#endif 1276#endif
1277 1277
1278 i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices)); 1278 i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices));
@@ -1300,11 +1300,6 @@ static void __init eva_earlytimer_init(void)
1300 eva_clock_init(); 1300 eva_clock_init();
1301} 1301}
1302 1302
1303static void __init eva_add_early_devices(void)
1304{
1305 r8a7740_add_early_devices();
1306}
1307
1308#define RESCNT2 IOMEM(0xe6188020) 1303#define RESCNT2 IOMEM(0xe6188020)
1309static void eva_restart(enum reboot_mode mode, const char *cmd) 1304static void eva_restart(enum reboot_mode mode, const char *cmd)
1310{ 1305{
@@ -1319,7 +1314,7 @@ static const char *eva_boards_compat_dt[] __initdata = {
1319 1314
1320DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva") 1315DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva")
1321 .map_io = r8a7740_map_io, 1316 .map_io = r8a7740_map_io,
1322 .init_early = eva_add_early_devices, 1317 .init_early = r8a7740_add_early_devices,
1323 .init_irq = r8a7740_init_irq_of, 1318 .init_irq = r8a7740_init_irq_of,
1324 .init_machine = eva_init, 1319 .init_machine = eva_init,
1325 .init_late = shmobile_init_late, 1320 .init_late = shmobile_init_late,
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
index b4122f8cb8d9..f444be2f241e 100644
--- a/arch/arm/mach-shmobile/board-bockw.c
+++ b/arch/arm/mach-shmobile/board-bockw.c
@@ -345,24 +345,39 @@ static struct rsnd_ssi_platform_info rsnd_ssi[] = {
345 RSND_SSI_UNUSED, /* SSI 0 */ 345 RSND_SSI_UNUSED, /* SSI 0 */
346 RSND_SSI_UNUSED, /* SSI 1 */ 346 RSND_SSI_UNUSED, /* SSI 1 */
347 RSND_SSI_UNUSED, /* SSI 2 */ 347 RSND_SSI_UNUSED, /* SSI 2 */
348 RSND_SSI_SET(1, HPBDMA_SLAVE_HPBIF3_TX, gic_iid(0x85), RSND_SSI_PLAY), 348 RSND_SSI(HPBDMA_SLAVE_HPBIF3_TX, gic_iid(0x85), 0),
349 RSND_SSI_SET(2, HPBDMA_SLAVE_HPBIF4_RX, gic_iid(0x85), RSND_SSI_CLK_PIN_SHARE), 349 RSND_SSI(HPBDMA_SLAVE_HPBIF4_RX, gic_iid(0x85), RSND_SSI_CLK_PIN_SHARE),
350 RSND_SSI_SET(0, HPBDMA_SLAVE_HPBIF5_TX, gic_iid(0x86), RSND_SSI_PLAY), 350 RSND_SSI(HPBDMA_SLAVE_HPBIF5_TX, gic_iid(0x86), 0),
351 RSND_SSI_SET(0, HPBDMA_SLAVE_HPBIF6_RX, gic_iid(0x86), 0), 351 RSND_SSI(HPBDMA_SLAVE_HPBIF6_RX, gic_iid(0x86), 0),
352 RSND_SSI_SET(3, HPBDMA_SLAVE_HPBIF7_TX, gic_iid(0x86), RSND_SSI_PLAY), 352 RSND_SSI(HPBDMA_SLAVE_HPBIF7_TX, gic_iid(0x86), 0),
353 RSND_SSI_SET(4, HPBDMA_SLAVE_HPBIF8_RX, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE), 353 RSND_SSI(HPBDMA_SLAVE_HPBIF8_RX, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE),
354}; 354};
355 355
356static struct rsnd_scu_platform_info rsnd_scu[9] = { 356static struct rsnd_src_platform_info rsnd_src[9] = {
357 { .flags = 0, }, /* SRU 0 */ 357 RSND_SRC_UNUSED, /* SRU 0 */
358 { .flags = 0, }, /* SRU 1 */ 358 RSND_SRC_UNUSED, /* SRU 1 */
359 { .flags = 0, }, /* SRU 2 */ 359 RSND_SRC_UNUSED, /* SRU 2 */
360 { .flags = RSND_SCU_USE_HPBIF, }, 360 RSND_SRC(0, 0),
361 { .flags = RSND_SCU_USE_HPBIF, }, 361 RSND_SRC(0, 0),
362 { .flags = RSND_SCU_USE_HPBIF, }, 362 RSND_SRC(0, 0),
363 { .flags = RSND_SCU_USE_HPBIF, }, 363 RSND_SRC(0, 0),
364 { .flags = RSND_SCU_USE_HPBIF, }, 364 RSND_SRC(0, 0),
365 { .flags = RSND_SCU_USE_HPBIF, }, 365 RSND_SRC(0, 0),
366};
367
368static struct rsnd_dai_platform_info rsnd_dai[] = {
369 {
370 .playback = { .ssi = &rsnd_ssi[5], .src = &rsnd_src[5] },
371 .capture = { .ssi = &rsnd_ssi[6], .src = &rsnd_src[6] },
372 }, {
373 .playback = { .ssi = &rsnd_ssi[3], .src = &rsnd_src[3] },
374 }, {
375 .capture = { .ssi = &rsnd_ssi[4], .src = &rsnd_src[4] },
376 }, {
377 .playback = { .ssi = &rsnd_ssi[7], .src = &rsnd_src[7] },
378 }, {
379 .capture = { .ssi = &rsnd_ssi[8], .src = &rsnd_src[8] },
380 },
366}; 381};
367 382
368enum { 383enum {
@@ -437,8 +452,10 @@ static struct rcar_snd_info rsnd_info = {
437 .flags = RSND_GEN1, 452 .flags = RSND_GEN1,
438 .ssi_info = rsnd_ssi, 453 .ssi_info = rsnd_ssi,
439 .ssi_info_nr = ARRAY_SIZE(rsnd_ssi), 454 .ssi_info_nr = ARRAY_SIZE(rsnd_ssi),
440 .scu_info = rsnd_scu, 455 .src_info = rsnd_src,
441 .scu_info_nr = ARRAY_SIZE(rsnd_scu), 456 .src_info_nr = ARRAY_SIZE(rsnd_src),
457 .dai_info = rsnd_dai,
458 .dai_info_nr = ARRAY_SIZE(rsnd_dai),
442 .start = rsnd_start, 459 .start = rsnd_start,
443 .stop = rsnd_stop, 460 .stop = rsnd_stop,
444}; 461};
@@ -591,6 +608,7 @@ static void __init bockw_init(void)
591{ 608{
592 void __iomem *base; 609 void __iomem *base;
593 struct clk *clk; 610 struct clk *clk;
611 struct platform_device *pdev;
594 int i; 612 int i;
595 613
596 r8a7778_clock_init(); 614 r8a7778_clock_init();
@@ -673,9 +691,6 @@ static void __init bockw_init(void)
673 } 691 }
674 692
675 /* for Audio */ 693 /* for Audio */
676 clk = clk_get(NULL, "audio_clk_b");
677 clk_set_rate(clk, 24576000);
678 clk_put(clk);
679 rsnd_codec_power(5, 1); /* enable ak4642 */ 694 rsnd_codec_power(5, 1); /* enable ak4642 */
680 695
681 platform_device_register_simple( 696 platform_device_register_simple(
@@ -684,11 +699,15 @@ static void __init bockw_init(void)
684 platform_device_register_simple( 699 platform_device_register_simple(
685 "ak4554-adc-dac", 1, NULL, 0); 700 "ak4554-adc-dac", 1, NULL, 0);
686 701
687 platform_device_register_resndata( 702 pdev = platform_device_register_resndata(
688 &platform_bus, "rcar_sound", -1, 703 &platform_bus, "rcar_sound", -1,
689 rsnd_resources, ARRAY_SIZE(rsnd_resources), 704 rsnd_resources, ARRAY_SIZE(rsnd_resources),
690 &rsnd_info, sizeof(rsnd_info)); 705 &rsnd_info, sizeof(rsnd_info));
691 706
707 clk = clk_get(&pdev->dev, "clk_b");
708 clk_set_rate(clk, 24576000);
709 clk_put(clk);
710
692 for (i = 0; i < ARRAY_SIZE(rsnd_card_info); i++) { 711 for (i = 0; i < ARRAY_SIZE(rsnd_card_info); i++) {
693 struct platform_device_info cardinfo = { 712 struct platform_device_info cardinfo = {
694 .parent = &platform_bus, 713 .parent = &platform_bus,
diff --git a/arch/arm/mach-shmobile/board-genmai-reference.c b/arch/arm/mach-shmobile/board-genmai-reference.c
index 7630c1053e32..2ff6ad6e608e 100644
--- a/arch/arm/mach-shmobile/board-genmai-reference.c
+++ b/arch/arm/mach-shmobile/board-genmai-reference.c
@@ -18,27 +18,31 @@
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 19 */
20 20
21#include <linux/clk-provider.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/of_platform.h> 22#include <linux/of_platform.h>
23#include <mach/clock.h>
24#include <mach/common.h> 24#include <mach/common.h>
25#include <mach/r7s72100.h> 25#include <mach/r7s72100.h>
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
28 28
29/*
30 * This is a really crude hack to provide clkdev support to platform
31 * devices until they get moved to DT.
32 */
33static const struct clk_name clk_names[] = {
34 { "mtu2", "fck", "sh-mtu2" },
35};
36
29static void __init genmai_add_standard_devices(void) 37static void __init genmai_add_standard_devices(void)
30{ 38{
31#ifdef CONFIG_COMMON_CLK 39 shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), true);
32 of_clk_init(NULL);
33#else
34 r7s72100_clock_init();
35#endif
36 r7s72100_add_dt_devices(); 40 r7s72100_add_dt_devices();
37 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 41 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
38} 42}
39 43
40static const char * const genmai_boards_compat_dt[] __initconst = { 44static const char * const genmai_boards_compat_dt[] __initconst = {
41 "renesas,genmai-reference", 45 "renesas,genmai",
42 NULL, 46 NULL,
43}; 47};
44 48
diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c
index 6c328d63b819..c94201ee8596 100644
--- a/arch/arm/mach-shmobile/board-genmai.c
+++ b/arch/arm/mach-shmobile/board-genmai.c
@@ -21,6 +21,7 @@
21 21
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/serial_sci.h>
24#include <linux/sh_eth.h> 25#include <linux/sh_eth.h>
25#include <linux/spi/rspi.h> 26#include <linux/spi/rspi.h>
26#include <linux/spi/spi.h> 27#include <linux/spi/spi.h>
@@ -89,6 +90,40 @@ static const struct spi_board_info spi_info[] __initconst = {
89 }, 90 },
90}; 91};
91 92
93/* SCIF */
94#define R7S72100_SCIF(index, baseaddr, irq) \
95static const struct plat_sci_port scif##index##_platform_data = { \
96 .type = PORT_SCIF, \
97 .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, \
98 .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \
99 .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | \
100 SCSCR_REIE, \
101}; \
102 \
103static struct resource scif##index##_resources[] = { \
104 DEFINE_RES_MEM(baseaddr, 0x100), \
105 DEFINE_RES_IRQ(irq + 1), \
106 DEFINE_RES_IRQ(irq + 2), \
107 DEFINE_RES_IRQ(irq + 3), \
108 DEFINE_RES_IRQ(irq), \
109} \
110
111R7S72100_SCIF(0, 0xe8007000, gic_iid(221));
112R7S72100_SCIF(1, 0xe8007800, gic_iid(225));
113R7S72100_SCIF(2, 0xe8008000, gic_iid(229));
114R7S72100_SCIF(3, 0xe8008800, gic_iid(233));
115R7S72100_SCIF(4, 0xe8009000, gic_iid(237));
116R7S72100_SCIF(5, 0xe8009800, gic_iid(241));
117R7S72100_SCIF(6, 0xe800a000, gic_iid(245));
118R7S72100_SCIF(7, 0xe800a800, gic_iid(249));
119
120#define r7s72100_register_scif(index) \
121 platform_device_register_resndata(&platform_bus, "sh-sci", index, \
122 scif##index##_resources, \
123 ARRAY_SIZE(scif##index##_resources), \
124 &scif##index##_platform_data, \
125 sizeof(scif##index##_platform_data))
126
92static void __init genmai_add_standard_devices(void) 127static void __init genmai_add_standard_devices(void)
93{ 128{
94 r7s72100_clock_init(); 129 r7s72100_clock_init();
@@ -102,6 +137,15 @@ static void __init genmai_add_standard_devices(void)
102 r7s72100_register_rspi(3); 137 r7s72100_register_rspi(3);
103 r7s72100_register_rspi(4); 138 r7s72100_register_rspi(4);
104 spi_register_board_info(spi_info, ARRAY_SIZE(spi_info)); 139 spi_register_board_info(spi_info, ARRAY_SIZE(spi_info));
140
141 r7s72100_register_scif(0);
142 r7s72100_register_scif(1);
143 r7s72100_register_scif(2);
144 r7s72100_register_scif(3);
145 r7s72100_register_scif(4);
146 r7s72100_register_scif(5);
147 r7s72100_register_scif(6);
148 r7s72100_register_scif(7);
105} 149}
106 150
107static const char * const genmai_boards_compat_dt[] __initconst = { 151static const char * const genmai_boards_compat_dt[] __initconst = {
diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
index a3fd30242bd8..d322a162b4b0 100644
--- a/arch/arm/mach-shmobile/board-koelsch-reference.c
+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
@@ -19,12 +19,11 @@
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */ 20 */
21 21
22#include <linux/clk.h>
23#include <linux/clkdev.h>
24#include <linux/dma-mapping.h> 22#include <linux/dma-mapping.h>
25#include <linux/kernel.h> 23#include <linux/kernel.h>
26#include <linux/of_platform.h> 24#include <linux/of_platform.h>
27#include <linux/platform_data/rcar-du.h> 25#include <linux/platform_data/rcar-du.h>
26#include <mach/clock.h>
28#include <mach/common.h> 27#include <mach/common.h>
29#include <mach/irqs.h> 28#include <mach/irqs.h>
30#include <mach/rcar-gen2.h> 29#include <mach/rcar-gen2.h>
@@ -82,49 +81,35 @@ static void __init koelsch_add_du_device(void)
82 platform_device_register_full(&info); 81 platform_device_register_full(&info);
83} 82}
84 83
85static void __init koelsch_add_standard_devices(void) 84/*
86{ 85 * This is a really crude hack to provide clkdev support to platform
87 /* 86 * devices until they get moved to DT.
88 * This is a really crude hack to provide clkdev support to the CMT and 87 */
89 * DU devices until they get moved to DT. 88static const struct clk_name clk_names[] __initconst = {
90 */ 89 { "cmt0", "fck", "sh-cmt-48-gen2.0" },
91 static const struct clk_name { 90 { "du0", "du.0", "rcar-du-r8a7791" },
92 const char *clk; 91 { "du1", "du.1", "rcar-du-r8a7791" },
93 const char *con_id; 92 { "lvds0", "lvds.0", "rcar-du-r8a7791" },
94 const char *dev_id; 93};
95 } clk_names[] = {
96 { "cmt0", NULL, "sh_cmt.0" },
97 { "scifa0", NULL, "sh-sci.0" },
98 { "scifa1", NULL, "sh-sci.1" },
99 { "scifb0", NULL, "sh-sci.2" },
100 { "scifb1", NULL, "sh-sci.3" },
101 { "scifb2", NULL, "sh-sci.4" },
102 { "scifa2", NULL, "sh-sci.5" },
103 { "scif0", NULL, "sh-sci.6" },
104 { "scif1", NULL, "sh-sci.7" },
105 { "scif2", NULL, "sh-sci.8" },
106 { "scif3", NULL, "sh-sci.9" },
107 { "scif4", NULL, "sh-sci.10" },
108 { "scif5", NULL, "sh-sci.11" },
109 { "scifa3", NULL, "sh-sci.12" },
110 { "scifa4", NULL, "sh-sci.13" },
111 { "scifa5", NULL, "sh-sci.14" },
112 { "du0", "du.0", "rcar-du-r8a7791" },
113 { "du1", "du.1", "rcar-du-r8a7791" },
114 { "lvds0", "lvds.0", "rcar-du-r8a7791" },
115 };
116 struct clk *clk;
117 unsigned int i;
118 94
119 for (i = 0; i < ARRAY_SIZE(clk_names); ++i) { 95/*
120 clk = clk_get(NULL, clk_names[i].clk); 96 * This is a really crude hack to work around core platform clock issues
121 if (!IS_ERR(clk)) { 97 */
122 clk_register_clkdev(clk, clk_names[i].con_id, 98static const struct clk_name clk_enables[] __initconst = {
123 clk_names[i].dev_id); 99 { "ether", NULL, "ee700000.ethernet" },
124 clk_put(clk); 100 { "i2c2", NULL, "e6530000.i2c" },
125 } 101 { "msiof0", NULL, "e6e20000.spi" },
126 } 102 { "qspi_mod", NULL, "e6b10000.spi" },
103 { "sdhi0", NULL, "ee100000.sd" },
104 { "sdhi1", NULL, "ee140000.sd" },
105 { "sdhi2", NULL, "ee160000.sd" },
106 { "thermal", NULL, "e61f0000.thermal" },
107};
127 108
109static void __init koelsch_add_standard_devices(void)
110{
111 shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
112 shmobile_clk_workaround(clk_enables, ARRAY_SIZE(clk_enables), true);
128 r8a7791_add_dt_devices(); 113 r8a7791_add_dt_devices();
129 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 114 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
130 115
@@ -139,7 +124,7 @@ static const char * const koelsch_boards_compat_dt[] __initconst = {
139 124
140DT_MACHINE_START(KOELSCH_DT, "koelsch") 125DT_MACHINE_START(KOELSCH_DT, "koelsch")
141 .smp = smp_ops(r8a7791_smp_ops), 126 .smp = smp_ops(r8a7791_smp_ops),
142 .init_early = r8a7791_init_early, 127 .init_early = shmobile_init_delay,
143 .init_time = rcar_gen2_timer_init, 128 .init_time = rcar_gen2_timer_init,
144 .init_machine = koelsch_add_standard_devices, 129 .init_machine = koelsch_add_standard_devices,
145 .init_late = shmobile_init_late, 130 .init_late = shmobile_init_late,
diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
index 5a034ff405d0..c6c68892caa3 100644
--- a/arch/arm/mach-shmobile/board-koelsch.c
+++ b/arch/arm/mach-shmobile/board-koelsch.c
@@ -216,7 +216,7 @@ static const struct spi_board_info spi_info[] __initconst = {
216 { 216 {
217 .modalias = "m25p80", 217 .modalias = "m25p80",
218 .platform_data = &spi_flash_data, 218 .platform_data = &spi_flash_data,
219 .mode = SPI_MODE_0, 219 .mode = SPI_MODE_0 | SPI_TX_QUAD | SPI_RX_QUAD,
220 .max_speed_hz = 30000000, 220 .max_speed_hz = 30000000,
221 .bus_num = 0, 221 .bus_num = 0,
222 .chip_select = 0, 222 .chip_select = 0,
@@ -522,7 +522,7 @@ static const char * const koelsch_boards_compat_dt[] __initconst = {
522 522
523DT_MACHINE_START(KOELSCH_DT, "koelsch") 523DT_MACHINE_START(KOELSCH_DT, "koelsch")
524 .smp = smp_ops(r8a7791_smp_ops), 524 .smp = smp_ops(r8a7791_smp_ops),
525 .init_early = r8a7791_init_early, 525 .init_early = shmobile_init_delay,
526 .init_time = rcar_gen2_timer_init, 526 .init_time = rcar_gen2_timer_init,
527 .init_machine = koelsch_init, 527 .init_machine = koelsch_init,
528 .init_late = shmobile_init_late, 528 .init_late = shmobile_init_late,
diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c
index 598e32488410..a735a1d80c28 100644
--- a/arch/arm/mach-shmobile/board-kzm9g-reference.c
+++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c
@@ -36,8 +36,8 @@ static void __init kzm_init(void)
36 sh73a0_add_standard_devices_dt(); 36 sh73a0_add_standard_devices_dt();
37 37
38#ifdef CONFIG_CACHE_L2X0 38#ifdef CONFIG_CACHE_L2X0
39 /* Early BRESP enable, Shared attribute override enable, 64K*8way */ 39 /* Shared attribute override enable, 64K*8way */
40 l2x0_init(IOMEM(0xf0100000), 0x40460000, 0x82000fff); 40 l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff);
41#endif 41#endif
42} 42}
43 43
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index 03dc3ac84502..f94ec8ca42c1 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -876,8 +876,8 @@ static void __init kzm_init(void)
876 gpio_request_one(223, GPIOF_IN, NULL); /* IRQ8 */ 876 gpio_request_one(223, GPIOF_IN, NULL); /* IRQ8 */
877 877
878#ifdef CONFIG_CACHE_L2X0 878#ifdef CONFIG_CACHE_L2X0
879 /* Early BRESP enable, Shared attribute override enable, 64K*8way */ 879 /* Shared attribute override enable, 64K*8way */
880 l2x0_init(IOMEM(0xf0100000), 0x40460000, 0x82000fff); 880 l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff);
881#endif 881#endif
882 882
883 i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices)); 883 i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices));
diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
index 440aac36d693..749832e3f33c 100644
--- a/arch/arm/mach-shmobile/board-lager-reference.c
+++ b/arch/arm/mach-shmobile/board-lager-reference.c
@@ -18,12 +18,11 @@
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 19 */
20 20
21#include <linux/clk.h>
22#include <linux/clkdev.h>
23#include <linux/dma-mapping.h> 21#include <linux/dma-mapping.h>
24#include <linux/init.h> 22#include <linux/init.h>
25#include <linux/of_platform.h> 23#include <linux/of_platform.h>
26#include <linux/platform_data/rcar-du.h> 24#include <linux/platform_data/rcar-du.h>
25#include <mach/clock.h>
27#include <mach/common.h> 26#include <mach/common.h>
28#include <mach/irqs.h> 27#include <mach/irqs.h>
29#include <mach/rcar-gen2.h> 28#include <mach/rcar-gen2.h>
@@ -86,46 +85,36 @@ static void __init lager_add_du_device(void)
86 platform_device_register_full(&info); 85 platform_device_register_full(&info);
87} 86}
88 87
89static void __init lager_add_standard_devices(void) 88/*
90{ 89 * This is a really crude hack to provide clkdev support to platform
91 /* 90 * devices until they get moved to DT.
92 * This is a really crude hack to provide clkdev support to platform 91 */
93 * devices until they get moved to DT. 92static const struct clk_name clk_names[] __initconst = {
94 */ 93 { "cmt0", "fck", "sh-cmt-48-gen2.0" },
95 static const struct clk_name { 94 { "du0", "du.0", "rcar-du-r8a7790" },
96 const char *clk; 95 { "du1", "du.1", "rcar-du-r8a7790" },
97 const char *con_id; 96 { "du2", "du.2", "rcar-du-r8a7790" },
98 const char *dev_id; 97 { "lvds0", "lvds.0", "rcar-du-r8a7790" },
99 } clk_names[] = { 98 { "lvds1", "lvds.1", "rcar-du-r8a7790" },
100 { "cmt0", NULL, "sh_cmt.0" }, 99};
101 { "scifa0", NULL, "sh-sci.0" },
102 { "scifa1", NULL, "sh-sci.1" },
103 { "scifb0", NULL, "sh-sci.2" },
104 { "scifb1", NULL, "sh-sci.3" },
105 { "scifb2", NULL, "sh-sci.4" },
106 { "scifa2", NULL, "sh-sci.5" },
107 { "scif0", NULL, "sh-sci.6" },
108 { "scif1", NULL, "sh-sci.7" },
109 { "hscif0", NULL, "sh-sci.8" },
110 { "hscif1", NULL, "sh-sci.9" },
111 { "du0", "du.0", "rcar-du-r8a7790" },
112 { "du1", "du.1", "rcar-du-r8a7790" },
113 { "du2", "du.2", "rcar-du-r8a7790" },
114 { "lvds0", "lvds.0", "rcar-du-r8a7790" },
115 { "lvds1", "lvds.1", "rcar-du-r8a7790" },
116 };
117 struct clk *clk;
118 unsigned int i;
119 100
120 for (i = 0; i < ARRAY_SIZE(clk_names); ++i) { 101/*
121 clk = clk_get(NULL, clk_names[i].clk); 102 * This is a really crude hack to work around core platform clock issues
122 if (!IS_ERR(clk)) { 103 */
123 clk_register_clkdev(clk, clk_names[i].con_id, 104static const struct clk_name clk_enables[] __initconst = {
124 clk_names[i].dev_id); 105 { "ether", NULL, "ee700000.ethernet" },
125 clk_put(clk); 106 { "msiof1", NULL, "e6e10000.spi" },
126 } 107 { "mmcif1", NULL, "ee220000.mmc" },
127 } 108 { "qspi_mod", NULL, "e6b10000.spi" },
109 { "sdhi0", NULL, "ee100000.sd" },
110 { "sdhi2", NULL, "ee140000.sd" },
111 { "thermal", NULL, "e61f0000.thermal" },
112};
128 113
114static void __init lager_add_standard_devices(void)
115{
116 shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
117 shmobile_clk_workaround(clk_enables, ARRAY_SIZE(clk_enables), true);
129 r8a7790_add_dt_devices(); 118 r8a7790_add_dt_devices();
130 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 119 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
131 120
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
index 18c7e0311aa6..f8b1e05463cc 100644
--- a/arch/arm/mach-shmobile/board-lager.c
+++ b/arch/arm/mach-shmobile/board-lager.c
@@ -325,12 +325,12 @@ static const struct rspi_plat_data qspi_pdata __initconst = {
325 325
326static const struct spi_board_info spi_info[] __initconst = { 326static const struct spi_board_info spi_info[] __initconst = {
327 { 327 {
328 .modalias = "m25p80", 328 .modalias = "m25p80",
329 .platform_data = &spi_flash_data, 329 .platform_data = &spi_flash_data,
330 .mode = SPI_MODE_0, 330 .mode = SPI_MODE_0 | SPI_TX_QUAD | SPI_RX_QUAD,
331 .max_speed_hz = 30000000, 331 .max_speed_hz = 30000000,
332 .bus_num = 0, 332 .bus_num = 0,
333 .chip_select = 0, 333 .chip_select = 0,
334 }, 334 },
335}; 335};
336 336
@@ -567,20 +567,27 @@ static struct resource rsnd_resources[] __initdata = {
567}; 567};
568 568
569static struct rsnd_ssi_platform_info rsnd_ssi[] = { 569static struct rsnd_ssi_platform_info rsnd_ssi[] = {
570 RSND_SSI_SET(0, 0, gic_spi(370), RSND_SSI_PLAY), 570 RSND_SSI(0, gic_spi(370), 0),
571 RSND_SSI_SET(0, 0, gic_spi(371), RSND_SSI_CLK_PIN_SHARE), 571 RSND_SSI(0, gic_spi(371), RSND_SSI_CLK_PIN_SHARE),
572}; 572};
573 573
574static struct rsnd_scu_platform_info rsnd_scu[2] = { 574static struct rsnd_src_platform_info rsnd_src[2] = {
575 /* no member at this point */ 575 /* no member at this point */
576}; 576};
577 577
578static struct rsnd_dai_platform_info rsnd_dai = {
579 .playback = { .ssi = &rsnd_ssi[0], },
580 .capture = { .ssi = &rsnd_ssi[1], },
581};
582
578static struct rcar_snd_info rsnd_info = { 583static struct rcar_snd_info rsnd_info = {
579 .flags = RSND_GEN2, 584 .flags = RSND_GEN2,
580 .ssi_info = rsnd_ssi, 585 .ssi_info = rsnd_ssi,
581 .ssi_info_nr = ARRAY_SIZE(rsnd_ssi), 586 .ssi_info_nr = ARRAY_SIZE(rsnd_ssi),
582 .scu_info = rsnd_scu, 587 .src_info = rsnd_src,
583 .scu_info_nr = ARRAY_SIZE(rsnd_scu), 588 .src_info_nr = ARRAY_SIZE(rsnd_src),
589 .dai_info = &rsnd_dai,
590 .dai_info_nr = 1,
584}; 591};
585 592
586static struct asoc_simple_card_info rsnd_card_info = { 593static struct asoc_simple_card_info rsnd_card_info = {
diff --git a/arch/arm/mach-shmobile/clock-emev2.c b/arch/arm/mach-shmobile/clock-emev2.c
deleted file mode 100644
index 5ac13ba71d54..000000000000
--- a/arch/arm/mach-shmobile/clock-emev2.c
+++ /dev/null
@@ -1,231 +0,0 @@
1/*
2 * Emma Mobile EV2 clock framework support
3 *
4 * Copyright (C) 2012 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 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19#include <linux/init.h>
20#include <linux/kernel.h>
21#include <linux/io.h>
22#include <linux/sh_clk.h>
23#include <linux/clkdev.h>
24#include <mach/common.h>
25
26#define EMEV2_SMU_BASE 0xe0110000
27
28/* EMEV2 SMU registers */
29#define USIAU0_RSTCTRL 0x094
30#define USIBU1_RSTCTRL 0x0ac
31#define USIBU2_RSTCTRL 0x0b0
32#define USIBU3_RSTCTRL 0x0b4
33#define STI_RSTCTRL 0x124
34#define USIAU0GCLKCTRL 0x4a0
35#define USIBU1GCLKCTRL 0x4b8
36#define USIBU2GCLKCTRL 0x4bc
37#define USIBU3GCLKCTRL 0x04c0
38#define STIGCLKCTRL 0x528
39#define USIAU0SCLKDIV 0x61c
40#define USIB2SCLKDIV 0x65c
41#define USIB3SCLKDIV 0x660
42#define STI_CLKSEL 0x688
43
44/* not pretty, but hey */
45static void __iomem *smu_base;
46
47static void emev2_smu_write(unsigned long value, int offs)
48{
49 BUG_ON(!smu_base || (offs >= PAGE_SIZE));
50 iowrite32(value, smu_base + offs);
51}
52
53static struct clk_mapping smu_mapping = {
54 .phys = EMEV2_SMU_BASE,
55 .len = PAGE_SIZE,
56};
57
58/* Fixed 32 KHz root clock from C32K pin */
59static struct clk c32k_clk = {
60 .rate = 32768,
61 .mapping = &smu_mapping,
62};
63
64/* PLL3 multiplies C32K with 7000 */
65static unsigned long pll3_recalc(struct clk *clk)
66{
67 return clk->parent->rate * 7000;
68}
69
70static struct sh_clk_ops pll3_clk_ops = {
71 .recalc = pll3_recalc,
72};
73
74static struct clk pll3_clk = {
75 .ops = &pll3_clk_ops,
76 .parent = &c32k_clk,
77};
78
79static struct clk *main_clks[] = {
80 &c32k_clk,
81 &pll3_clk,
82};
83
84enum { SCLKDIV_USIAU0, SCLKDIV_USIBU2, SCLKDIV_USIBU1, SCLKDIV_USIBU3,
85 SCLKDIV_NR };
86
87#define SCLKDIV(_reg, _shift) \
88{ \
89 .parent = &pll3_clk, \
90 .enable_reg = IOMEM(EMEV2_SMU_BASE + (_reg)), \
91 .enable_bit = _shift, \
92}
93
94static struct clk sclkdiv_clks[SCLKDIV_NR] = {
95 [SCLKDIV_USIAU0] = SCLKDIV(USIAU0SCLKDIV, 0),
96 [SCLKDIV_USIBU2] = SCLKDIV(USIB2SCLKDIV, 16),
97 [SCLKDIV_USIBU1] = SCLKDIV(USIB2SCLKDIV, 0),
98 [SCLKDIV_USIBU3] = SCLKDIV(USIB3SCLKDIV, 0),
99};
100
101enum { GCLK_USIAU0_SCLK, GCLK_USIBU1_SCLK, GCLK_USIBU2_SCLK, GCLK_USIBU3_SCLK,
102 GCLK_STI_SCLK,
103 GCLK_NR };
104
105#define GCLK_SCLK(_parent, _reg) \
106{ \
107 .parent = _parent, \
108 .enable_reg = IOMEM(EMEV2_SMU_BASE + (_reg)), \
109 .enable_bit = 1, /* SCLK_GCC */ \
110}
111
112static struct clk gclk_clks[GCLK_NR] = {
113 [GCLK_USIAU0_SCLK] = GCLK_SCLK(&sclkdiv_clks[SCLKDIV_USIAU0],
114 USIAU0GCLKCTRL),
115 [GCLK_USIBU1_SCLK] = GCLK_SCLK(&sclkdiv_clks[SCLKDIV_USIBU1],
116 USIBU1GCLKCTRL),
117 [GCLK_USIBU2_SCLK] = GCLK_SCLK(&sclkdiv_clks[SCLKDIV_USIBU2],
118 USIBU2GCLKCTRL),
119 [GCLK_USIBU3_SCLK] = GCLK_SCLK(&sclkdiv_clks[SCLKDIV_USIBU3],
120 USIBU3GCLKCTRL),
121 [GCLK_STI_SCLK] = GCLK_SCLK(&c32k_clk, STIGCLKCTRL),
122};
123
124static int emev2_gclk_enable(struct clk *clk)
125{
126 iowrite32(ioread32(clk->mapped_reg) | (1 << clk->enable_bit),
127 clk->mapped_reg);
128 return 0;
129}
130
131static void emev2_gclk_disable(struct clk *clk)
132{
133 iowrite32(ioread32(clk->mapped_reg) & ~(1 << clk->enable_bit),
134 clk->mapped_reg);
135}
136
137static struct sh_clk_ops emev2_gclk_clk_ops = {
138 .enable = emev2_gclk_enable,
139 .disable = emev2_gclk_disable,
140 .recalc = followparent_recalc,
141};
142
143static int __init emev2_gclk_register(struct clk *clks, int nr)
144{
145 struct clk *clkp;
146 int ret = 0;
147 int k;
148
149 for (k = 0; !ret && (k < nr); k++) {
150 clkp = clks + k;
151 clkp->ops = &emev2_gclk_clk_ops;
152 ret |= clk_register(clkp);
153 }
154
155 return ret;
156}
157
158static unsigned long emev2_sclkdiv_recalc(struct clk *clk)
159{
160 unsigned int sclk_div;
161
162 sclk_div = (ioread32(clk->mapped_reg) >> clk->enable_bit) & 0xff;
163
164 return clk->parent->rate / (sclk_div + 1);
165}
166
167static struct sh_clk_ops emev2_sclkdiv_clk_ops = {
168 .recalc = emev2_sclkdiv_recalc,
169};
170
171static int __init emev2_sclkdiv_register(struct clk *clks, int nr)
172{
173 struct clk *clkp;
174 int ret = 0;
175 int k;
176
177 for (k = 0; !ret && (k < nr); k++) {
178 clkp = clks + k;
179 clkp->ops = &emev2_sclkdiv_clk_ops;
180 ret |= clk_register(clkp);
181 }
182
183 return ret;
184}
185
186static struct clk_lookup lookups[] = {
187 CLKDEV_DEV_ID("serial8250-em.0", &gclk_clks[GCLK_USIAU0_SCLK]),
188 CLKDEV_DEV_ID("e1020000.uart", &gclk_clks[GCLK_USIAU0_SCLK]),
189 CLKDEV_DEV_ID("serial8250-em.1", &gclk_clks[GCLK_USIBU1_SCLK]),
190 CLKDEV_DEV_ID("e1030000.uart", &gclk_clks[GCLK_USIBU1_SCLK]),
191 CLKDEV_DEV_ID("serial8250-em.2", &gclk_clks[GCLK_USIBU2_SCLK]),
192 CLKDEV_DEV_ID("e1040000.uart", &gclk_clks[GCLK_USIBU2_SCLK]),
193 CLKDEV_DEV_ID("serial8250-em.3", &gclk_clks[GCLK_USIBU3_SCLK]),
194 CLKDEV_DEV_ID("e1050000.uart", &gclk_clks[GCLK_USIBU3_SCLK]),
195 CLKDEV_DEV_ID("em_sti.0", &gclk_clks[GCLK_STI_SCLK]),
196 CLKDEV_DEV_ID("e0180000.sti", &gclk_clks[GCLK_STI_SCLK]),
197};
198
199void __init emev2_clock_init(void)
200{
201 int k, ret = 0;
202
203 smu_base = ioremap(EMEV2_SMU_BASE, PAGE_SIZE);
204 BUG_ON(!smu_base);
205
206 /* setup STI timer to run on 32.768 kHz and deassert reset */
207 emev2_smu_write(0, STI_CLKSEL);
208 emev2_smu_write(1, STI_RSTCTRL);
209
210 /* deassert reset for UART0->UART3 */
211 emev2_smu_write(2, USIAU0_RSTCTRL);
212 emev2_smu_write(2, USIBU1_RSTCTRL);
213 emev2_smu_write(2, USIBU2_RSTCTRL);
214 emev2_smu_write(2, USIBU3_RSTCTRL);
215
216 for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++)
217 ret = clk_register(main_clks[k]);
218
219 if (!ret)
220 ret = emev2_sclkdiv_register(sclkdiv_clks, SCLKDIV_NR);
221
222 if (!ret)
223 ret = emev2_gclk_register(gclk_clks, GCLK_NR);
224
225 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
226
227 if (!ret)
228 shmobile_clk_init();
229 else
230 panic("failed to setup emev2 clocks\n");
231}
diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c
index bee0073c9b64..df187484de5d 100644
--- a/arch/arm/mach-shmobile/clock-r7s72100.c
+++ b/arch/arm/mach-shmobile/clock-r7s72100.c
@@ -194,17 +194,7 @@ static struct clk_lookup lookups[] = {
194 CLKDEV_DEV_ID("rspi-rz.2", &mstp_clks[MSTP105]), 194 CLKDEV_DEV_ID("rspi-rz.2", &mstp_clks[MSTP105]),
195 CLKDEV_DEV_ID("rspi-rz.3", &mstp_clks[MSTP104]), 195 CLKDEV_DEV_ID("rspi-rz.3", &mstp_clks[MSTP104]),
196 CLKDEV_DEV_ID("rspi-rz.4", &mstp_clks[MSTP103]), 196 CLKDEV_DEV_ID("rspi-rz.4", &mstp_clks[MSTP103]),
197 CLKDEV_DEV_ID("e800c800.spi", &mstp_clks[MSTP107]),
198 CLKDEV_DEV_ID("e800d000.spi", &mstp_clks[MSTP106]),
199 CLKDEV_DEV_ID("e800d800.spi", &mstp_clks[MSTP105]),
200 CLKDEV_DEV_ID("e800e000.spi", &mstp_clks[MSTP104]),
201 CLKDEV_DEV_ID("e800e800.spi", &mstp_clks[MSTP103]),
202 CLKDEV_DEV_ID("fcfee000.i2c", &mstp_clks[MSTP97]),
203 CLKDEV_DEV_ID("fcfee400.i2c", &mstp_clks[MSTP96]),
204 CLKDEV_DEV_ID("fcfee800.i2c", &mstp_clks[MSTP95]),
205 CLKDEV_DEV_ID("fcfeec00.i2c", &mstp_clks[MSTP94]),
206 CLKDEV_DEV_ID("r7s72100-ether", &mstp_clks[MSTP74]), 197 CLKDEV_DEV_ID("r7s72100-ether", &mstp_clks[MSTP74]),
207 CLKDEV_CON_ID("mtu2_fck", &mstp_clks[MSTP33]),
208 198
209 /* ICK */ 199 /* ICK */
210 CLKDEV_ICK_ID("sci_fck", "sh-sci.0", &mstp_clks[MSTP47]), 200 CLKDEV_ICK_ID("sci_fck", "sh-sci.0", &mstp_clks[MSTP47]),
@@ -215,6 +205,7 @@ static struct clk_lookup lookups[] = {
215 CLKDEV_ICK_ID("sci_fck", "sh-sci.5", &mstp_clks[MSTP42]), 205 CLKDEV_ICK_ID("sci_fck", "sh-sci.5", &mstp_clks[MSTP42]),
216 CLKDEV_ICK_ID("sci_fck", "sh-sci.6", &mstp_clks[MSTP41]), 206 CLKDEV_ICK_ID("sci_fck", "sh-sci.6", &mstp_clks[MSTP41]),
217 CLKDEV_ICK_ID("sci_fck", "sh-sci.7", &mstp_clks[MSTP40]), 207 CLKDEV_ICK_ID("sci_fck", "sh-sci.7", &mstp_clks[MSTP40]),
208 CLKDEV_ICK_ID("fck", "sh-mtu2", &mstp_clks[MSTP33]),
218}; 209};
219 210
220void __init r7s72100_clock_init(void) 211void __init r7s72100_clock_init(void)
diff --git a/arch/arm/mach-shmobile/clock-r8a73a4.c b/arch/arm/mach-shmobile/clock-r8a73a4.c
index 7348d58f500e..b5bc22c6a858 100644
--- a/arch/arm/mach-shmobile/clock-r8a73a4.c
+++ b/arch/arm/mach-shmobile/clock-r8a73a4.c
@@ -597,7 +597,7 @@ static struct clk_lookup lookups[] = {
597 CLKDEV_DEV_ID("e6560000.i2c", &mstp_clks[MSTP317]), 597 CLKDEV_DEV_ID("e6560000.i2c", &mstp_clks[MSTP317]),
598 CLKDEV_DEV_ID("e6500000.i2c", &mstp_clks[MSTP318]), 598 CLKDEV_DEV_ID("e6500000.i2c", &mstp_clks[MSTP318]),
599 CLKDEV_DEV_ID("e6510000.i2c", &mstp_clks[MSTP323]), 599 CLKDEV_DEV_ID("e6510000.i2c", &mstp_clks[MSTP323]),
600 CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), 600 CLKDEV_ICK_ID("fck", "sh-cmt-48-gen2.1", &mstp_clks[MSTP329]),
601 CLKDEV_DEV_ID("e60b0000.i2c", &mstp_clks[MSTP409]), 601 CLKDEV_DEV_ID("e60b0000.i2c", &mstp_clks[MSTP409]),
602 CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP410]), 602 CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP410]),
603 CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP411]), 603 CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP411]),
diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
index dd989f93498f..50931e3c97c7 100644
--- a/arch/arm/mach-shmobile/clock-r8a7740.c
+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
@@ -548,15 +548,9 @@ static struct clk_lookup lookups[] = {
548 548
549 /* MSTP32 clocks */ 549 /* MSTP32 clocks */
550 CLKDEV_DEV_ID("sh_mobile_lcdc_fb.0", &mstp_clks[MSTP100]), 550 CLKDEV_DEV_ID("sh_mobile_lcdc_fb.0", &mstp_clks[MSTP100]),
551 CLKDEV_DEV_ID("sh_tmu.3", &mstp_clks[MSTP111]),
552 CLKDEV_DEV_ID("sh_tmu.4", &mstp_clks[MSTP111]),
553 CLKDEV_DEV_ID("sh_tmu.5", &mstp_clks[MSTP111]),
554 CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), 551 CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]),
555 CLKDEV_DEV_ID("fff20000.i2c", &mstp_clks[MSTP116]), 552 CLKDEV_DEV_ID("fff20000.i2c", &mstp_clks[MSTP116]),
556 CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]), 553 CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]),
557 CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]),
558 CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP125]),
559 CLKDEV_DEV_ID("sh_tmu.2", &mstp_clks[MSTP125]),
560 CLKDEV_DEV_ID("sh_mobile_ceu.0", &mstp_clks[MSTP127]), 554 CLKDEV_DEV_ID("sh_mobile_ceu.0", &mstp_clks[MSTP127]),
561 CLKDEV_DEV_ID("sh_mobile_ceu.1", &mstp_clks[MSTP128]), 555 CLKDEV_DEV_ID("sh_mobile_ceu.1", &mstp_clks[MSTP128]),
562 556
@@ -583,7 +577,6 @@ static struct clk_lookup lookups[] = {
583 CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP230]), 577 CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP230]),
584 CLKDEV_DEV_ID("e6cc0000.sci", &mstp_clks[MSTP230]), 578 CLKDEV_DEV_ID("e6cc0000.sci", &mstp_clks[MSTP230]),
585 579
586 CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]),
587 CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), 580 CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]),
588 CLKDEV_DEV_ID("fe1f0000.sound", &mstp_clks[MSTP328]), 581 CLKDEV_DEV_ID("fe1f0000.sound", &mstp_clks[MSTP328]),
589 CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), 582 CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]),
@@ -596,7 +589,7 @@ static struct clk_lookup lookups[] = {
596 CLKDEV_DEV_ID("sh_mmcif", &mstp_clks[MSTP312]), 589 CLKDEV_DEV_ID("sh_mmcif", &mstp_clks[MSTP312]),
597 CLKDEV_DEV_ID("e6bd0000.mmc", &mstp_clks[MSTP312]), 590 CLKDEV_DEV_ID("e6bd0000.mmc", &mstp_clks[MSTP312]),
598 CLKDEV_DEV_ID("r8a7740-gether", &mstp_clks[MSTP309]), 591 CLKDEV_DEV_ID("r8a7740-gether", &mstp_clks[MSTP309]),
599 CLKDEV_DEV_ID("e9a00000.sh-eth", &mstp_clks[MSTP309]), 592 CLKDEV_DEV_ID("e9a00000.ethernet", &mstp_clks[MSTP309]),
600 CLKDEV_DEV_ID("renesas-tpu-pwm", &mstp_clks[MSTP304]), 593 CLKDEV_DEV_ID("renesas-tpu-pwm", &mstp_clks[MSTP304]),
601 CLKDEV_DEV_ID("e6600000.pwm", &mstp_clks[MSTP304]), 594 CLKDEV_DEV_ID("e6600000.pwm", &mstp_clks[MSTP304]),
602 595
@@ -604,6 +597,9 @@ static struct clk_lookup lookups[] = {
604 CLKDEV_DEV_ID("e6870000.sd", &mstp_clks[MSTP415]), 597 CLKDEV_DEV_ID("e6870000.sd", &mstp_clks[MSTP415]),
605 598
606 /* ICK */ 599 /* ICK */
600 CLKDEV_ICK_ID("fck", "sh-tmu.1", &mstp_clks[MSTP111]),
601 CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP125]),
602 CLKDEV_ICK_ID("fck", "sh-cmt-48.1", &mstp_clks[MSTP329]),
607 CLKDEV_ICK_ID("host", "renesas_usbhs", &mstp_clks[MSTP416]), 603 CLKDEV_ICK_ID("host", "renesas_usbhs", &mstp_clks[MSTP416]),
608 CLKDEV_ICK_ID("func", "renesas_usbhs", &mstp_clks[MSTP407]), 604 CLKDEV_ICK_ID("func", "renesas_usbhs", &mstp_clks[MSTP407]),
609 CLKDEV_ICK_ID("phy", "renesas_usbhs", &mstp_clks[MSTP406]), 605 CLKDEV_ICK_ID("phy", "renesas_usbhs", &mstp_clks[MSTP406]),
diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c
index 9989b1b06ffd..13f8f3ab8840 100644
--- a/arch/arm/mach-shmobile/clock-r8a7778.c
+++ b/arch/arm/mach-shmobile/clock-r8a7778.c
@@ -175,10 +175,6 @@ static struct clk mstp_clks[MSTP_NR] = {
175 175
176static struct clk_lookup lookups[] = { 176static struct clk_lookup lookups[] = {
177 /* main */ 177 /* main */
178 CLKDEV_CON_ID("audio_clk_a", &audio_clk_a),
179 CLKDEV_CON_ID("audio_clk_b", &audio_clk_b),
180 CLKDEV_CON_ID("audio_clk_c", &audio_clk_c),
181 CLKDEV_CON_ID("audio_clk_internal", &s1_clk),
182 CLKDEV_CON_ID("shyway_clk", &s_clk), 178 CLKDEV_CON_ID("shyway_clk", &s_clk),
183 CLKDEV_CON_ID("peripheral_clk", &p_clk), 179 CLKDEV_CON_ID("peripheral_clk", &p_clk),
184 180
@@ -211,8 +207,6 @@ static struct clk_lookup lookups[] = {
211 CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP023]), /* SCIF3 */ 207 CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP023]), /* SCIF3 */
212 CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */ 208 CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */
213 CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */ 209 CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */
214 CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP016]), /* TMU00 */
215 CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP015]), /* TMU01 */
216 CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */ 210 CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */
217 CLKDEV_DEV_ID("fffc7000.spi", &mstp_clks[MSTP007]), /* HSPI0 */ 211 CLKDEV_DEV_ID("fffc7000.spi", &mstp_clks[MSTP007]), /* HSPI0 */
218 CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */ 212 CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */
@@ -234,15 +228,17 @@ static struct clk_lookup lookups[] = {
234 CLKDEV_ICK_ID("ssi.6", "rcar_sound", &mstp_clks[MSTP309]), 228 CLKDEV_ICK_ID("ssi.6", "rcar_sound", &mstp_clks[MSTP309]),
235 CLKDEV_ICK_ID("ssi.7", "rcar_sound", &mstp_clks[MSTP308]), 229 CLKDEV_ICK_ID("ssi.7", "rcar_sound", &mstp_clks[MSTP308]),
236 CLKDEV_ICK_ID("ssi.8", "rcar_sound", &mstp_clks[MSTP307]), 230 CLKDEV_ICK_ID("ssi.8", "rcar_sound", &mstp_clks[MSTP307]),
237 CLKDEV_ICK_ID("scu.0", "rcar_sound", &mstp_clks[MSTP531]), 231 CLKDEV_ICK_ID("src.0", "rcar_sound", &mstp_clks[MSTP531]),
238 CLKDEV_ICK_ID("scu.1", "rcar_sound", &mstp_clks[MSTP530]), 232 CLKDEV_ICK_ID("src.1", "rcar_sound", &mstp_clks[MSTP530]),
239 CLKDEV_ICK_ID("scu.2", "rcar_sound", &mstp_clks[MSTP529]), 233 CLKDEV_ICK_ID("src.2", "rcar_sound", &mstp_clks[MSTP529]),
240 CLKDEV_ICK_ID("scu.3", "rcar_sound", &mstp_clks[MSTP528]), 234 CLKDEV_ICK_ID("src.3", "rcar_sound", &mstp_clks[MSTP528]),
241 CLKDEV_ICK_ID("scu.4", "rcar_sound", &mstp_clks[MSTP527]), 235 CLKDEV_ICK_ID("src.4", "rcar_sound", &mstp_clks[MSTP527]),
242 CLKDEV_ICK_ID("scu.5", "rcar_sound", &mstp_clks[MSTP526]), 236 CLKDEV_ICK_ID("src.5", "rcar_sound", &mstp_clks[MSTP526]),
243 CLKDEV_ICK_ID("scu.6", "rcar_sound", &mstp_clks[MSTP525]), 237 CLKDEV_ICK_ID("src.6", "rcar_sound", &mstp_clks[MSTP525]),
244 CLKDEV_ICK_ID("scu.7", "rcar_sound", &mstp_clks[MSTP524]), 238 CLKDEV_ICK_ID("src.7", "rcar_sound", &mstp_clks[MSTP524]),
245 CLKDEV_ICK_ID("scu.8", "rcar_sound", &mstp_clks[MSTP523]), 239 CLKDEV_ICK_ID("src.8", "rcar_sound", &mstp_clks[MSTP523]),
240 CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP016]),
241 CLKDEV_ICK_ID("fck", "sh-tmu.1", &mstp_clks[MSTP015]),
246}; 242};
247 243
248void __init r8a7778_clock_init(void) 244void __init r8a7778_clock_init(void)
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
index 8e403ae0c7b2..a13298bd37a8 100644
--- a/arch/arm/mach-shmobile/clock-r8a7779.c
+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
@@ -173,9 +173,7 @@ static struct clk_lookup lookups[] = {
173 CLKDEV_DEV_ID("ohci-platform.1", &mstp_clks[MSTP101]), /* USB OHCI port2 */ 173 CLKDEV_DEV_ID("ohci-platform.1", &mstp_clks[MSTP101]), /* USB OHCI port2 */
174 CLKDEV_DEV_ID("ehci-platform.0", &mstp_clks[MSTP100]), /* USB EHCI port0/1 */ 174 CLKDEV_DEV_ID("ehci-platform.0", &mstp_clks[MSTP100]), /* USB EHCI port0/1 */
175 CLKDEV_DEV_ID("ohci-platform.0", &mstp_clks[MSTP100]), /* USB OHCI port0/1 */ 175 CLKDEV_DEV_ID("ohci-platform.0", &mstp_clks[MSTP100]), /* USB OHCI port0/1 */
176 CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP016]), /* TMU00 */ 176 CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP016]), /* TMU0 */
177 CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP016]), /* TMU01 */
178 CLKDEV_DEV_ID("sh_tmu.2", &mstp_clks[MSTP016]), /* TMU02 */
179 CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */ 177 CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */
180 CLKDEV_DEV_ID("ffc70000.i2c", &mstp_clks[MSTP030]), /* I2C0 */ 178 CLKDEV_DEV_ID("ffc70000.i2c", &mstp_clks[MSTP030]), /* I2C0 */
181 CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP029]), /* I2C1 */ 179 CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP029]), /* I2C1 */
diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
index 3f93503f5b96..296a057109e4 100644
--- a/arch/arm/mach-shmobile/clock-r8a7790.c
+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
@@ -249,10 +249,10 @@ static struct clk mstp_clks[MSTP_NR] = {
249 [MSTP1007] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 7, MSTPSR10, 0), /* SSI8 */ 249 [MSTP1007] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 7, MSTPSR10, 0), /* SSI8 */
250 [MSTP1006] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 6, MSTPSR10, 0), /* SSI9 */ 250 [MSTP1006] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 6, MSTPSR10, 0), /* SSI9 */
251 [MSTP1005] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 5, MSTPSR10, 0), /* SSI ALL */ 251 [MSTP1005] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 5, MSTPSR10, 0), /* SSI ALL */
252 [MSTP931] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 31, MSTPSR9, 0), /* I2C0 */ 252 [MSTP931] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 31, MSTPSR9, 0), /* I2C0 */
253 [MSTP930] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 30, MSTPSR9, 0), /* I2C1 */ 253 [MSTP930] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 30, MSTPSR9, 0), /* I2C1 */
254 [MSTP929] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 29, MSTPSR9, 0), /* I2C2 */ 254 [MSTP929] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 29, MSTPSR9, 0), /* I2C2 */
255 [MSTP928] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */ 255 [MSTP928] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */
256 [MSTP917] = SH_CLK_MSTP32_STS(&qspi_clk, SMSTPCR9, 17, MSTPSR9, 0), /* QSPI */ 256 [MSTP917] = SH_CLK_MSTP32_STS(&qspi_clk, SMSTPCR9, 17, MSTPSR9, 0), /* QSPI */
257 [MSTP815] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 15, MSTPSR8, 0), /* SATA0 */ 257 [MSTP815] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 15, MSTPSR8, 0), /* SATA0 */
258 [MSTP814] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 14, MSTPSR8, 0), /* SATA1 */ 258 [MSTP814] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 14, MSTPSR8, 0), /* SATA1 */
@@ -294,10 +294,6 @@ static struct clk mstp_clks[MSTP_NR] = {
294static struct clk_lookup lookups[] = { 294static struct clk_lookup lookups[] = {
295 295
296 /* main clocks */ 296 /* main clocks */
297 CLKDEV_CON_ID("audio_clk_a", &audio_clk_a),
298 CLKDEV_CON_ID("audio_clk_b", &audio_clk_b),
299 CLKDEV_CON_ID("audio_clk_c", &audio_clk_c),
300 CLKDEV_CON_ID("audio_clk_internal", &m2_clk),
301 CLKDEV_CON_ID("extal", &extal_clk), 297 CLKDEV_CON_ID("extal", &extal_clk),
302 CLKDEV_CON_ID("extal_div2", &extal_div2_clk), 298 CLKDEV_CON_ID("extal_div2", &extal_div2_clk),
303 CLKDEV_CON_ID("main", &main_clk), 299 CLKDEV_CON_ID("main", &main_clk),
@@ -361,7 +357,6 @@ static struct clk_lookup lookups[] = {
361 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP312]), 357 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP312]),
362 CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP311]), 358 CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP311]),
363 CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]), 359 CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]),
364 CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]),
365 CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]), 360 CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]),
366 CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP704]), 361 CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP704]),
367 CLKDEV_DEV_ID("pci-rcar-gen2.0", &mstp_clks[MSTP703]), 362 CLKDEV_DEV_ID("pci-rcar-gen2.0", &mstp_clks[MSTP703]),
@@ -371,6 +366,7 @@ static struct clk_lookup lookups[] = {
371 CLKDEV_DEV_ID("sata-r8a7790.1", &mstp_clks[MSTP814]), 366 CLKDEV_DEV_ID("sata-r8a7790.1", &mstp_clks[MSTP814]),
372 367
373 /* ICK */ 368 /* ICK */
369 CLKDEV_ICK_ID("fck", "sh-cmt-48-gen2.0", &mstp_clks[MSTP124]),
374 CLKDEV_ICK_ID("usbhs", "usb_phy_rcar_gen2", &mstp_clks[MSTP704]), 370 CLKDEV_ICK_ID("usbhs", "usb_phy_rcar_gen2", &mstp_clks[MSTP704]),
375 CLKDEV_ICK_ID("lvds.0", "rcar-du-r8a7790", &mstp_clks[MSTP726]), 371 CLKDEV_ICK_ID("lvds.0", "rcar-du-r8a7790", &mstp_clks[MSTP726]),
376 CLKDEV_ICK_ID("lvds.1", "rcar-du-r8a7790", &mstp_clks[MSTP725]), 372 CLKDEV_ICK_ID("lvds.1", "rcar-du-r8a7790", &mstp_clks[MSTP725]),
@@ -381,16 +377,16 @@ static struct clk_lookup lookups[] = {
381 CLKDEV_ICK_ID("clk_b", "rcar_sound", &audio_clk_b), 377 CLKDEV_ICK_ID("clk_b", "rcar_sound", &audio_clk_b),
382 CLKDEV_ICK_ID("clk_c", "rcar_sound", &audio_clk_c), 378 CLKDEV_ICK_ID("clk_c", "rcar_sound", &audio_clk_c),
383 CLKDEV_ICK_ID("clk_i", "rcar_sound", &m2_clk), 379 CLKDEV_ICK_ID("clk_i", "rcar_sound", &m2_clk),
384 CLKDEV_ICK_ID("scu.0", "rcar_sound", &mstp_clks[MSTP1031]), 380 CLKDEV_ICK_ID("src.0", "rcar_sound", &mstp_clks[MSTP1031]),
385 CLKDEV_ICK_ID("scu.1", "rcar_sound", &mstp_clks[MSTP1030]), 381 CLKDEV_ICK_ID("src.1", "rcar_sound", &mstp_clks[MSTP1030]),
386 CLKDEV_ICK_ID("scu.2", "rcar_sound", &mstp_clks[MSTP1029]), 382 CLKDEV_ICK_ID("src.2", "rcar_sound", &mstp_clks[MSTP1029]),
387 CLKDEV_ICK_ID("scu.3", "rcar_sound", &mstp_clks[MSTP1028]), 383 CLKDEV_ICK_ID("src.3", "rcar_sound", &mstp_clks[MSTP1028]),
388 CLKDEV_ICK_ID("scu.4", "rcar_sound", &mstp_clks[MSTP1027]), 384 CLKDEV_ICK_ID("src.4", "rcar_sound", &mstp_clks[MSTP1027]),
389 CLKDEV_ICK_ID("scu.5", "rcar_sound", &mstp_clks[MSTP1026]), 385 CLKDEV_ICK_ID("src.5", "rcar_sound", &mstp_clks[MSTP1026]),
390 CLKDEV_ICK_ID("scu.6", "rcar_sound", &mstp_clks[MSTP1025]), 386 CLKDEV_ICK_ID("src.6", "rcar_sound", &mstp_clks[MSTP1025]),
391 CLKDEV_ICK_ID("scu.7", "rcar_sound", &mstp_clks[MSTP1024]), 387 CLKDEV_ICK_ID("src.7", "rcar_sound", &mstp_clks[MSTP1024]),
392 CLKDEV_ICK_ID("scu.8", "rcar_sound", &mstp_clks[MSTP1023]), 388 CLKDEV_ICK_ID("src.8", "rcar_sound", &mstp_clks[MSTP1023]),
393 CLKDEV_ICK_ID("scu.9", "rcar_sound", &mstp_clks[MSTP1022]), 389 CLKDEV_ICK_ID("src.9", "rcar_sound", &mstp_clks[MSTP1022]),
394 CLKDEV_ICK_ID("ssi.0", "rcar_sound", &mstp_clks[MSTP1015]), 390 CLKDEV_ICK_ID("ssi.0", "rcar_sound", &mstp_clks[MSTP1015]),
395 CLKDEV_ICK_ID("ssi.1", "rcar_sound", &mstp_clks[MSTP1014]), 391 CLKDEV_ICK_ID("ssi.1", "rcar_sound", &mstp_clks[MSTP1014]),
396 CLKDEV_ICK_ID("ssi.2", "rcar_sound", &mstp_clks[MSTP1013]), 392 CLKDEV_ICK_ID("ssi.2", "rcar_sound", &mstp_clks[MSTP1013]),
diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
index 701383fe3267..e2fdfcc14436 100644
--- a/arch/arm/mach-shmobile/clock-r8a7791.c
+++ b/arch/arm/mach-shmobile/clock-r8a7791.c
@@ -25,6 +25,7 @@
25#include <linux/clkdev.h> 25#include <linux/clkdev.h>
26#include <mach/clock.h> 26#include <mach/clock.h>
27#include <mach/common.h> 27#include <mach/common.h>
28#include <mach/rcar-gen2.h>
28 29
29/* 30/*
30 * MD EXTAL PLL0 PLL1 PLL3 31 * MD EXTAL PLL0 PLL1 PLL3
@@ -43,8 +44,6 @@
43 * see "p1 / 2" on R8A7791_CLOCK_ROOT() below 44 * see "p1 / 2" on R8A7791_CLOCK_ROOT() below
44 */ 45 */
45 46
46#define MD(nr) (1 << nr)
47
48#define CPG_BASE 0xe6150000 47#define CPG_BASE 0xe6150000
49#define CPG_LEN 0x1000 48#define CPG_LEN 0x1000
50 49
@@ -68,7 +67,6 @@
68#define MSTPSR9 IOMEM(0xe61509a4) 67#define MSTPSR9 IOMEM(0xe61509a4)
69#define MSTPSR11 IOMEM(0xe61509ac) 68#define MSTPSR11 IOMEM(0xe61509ac)
70 69
71#define MODEMR 0xE6160060
72#define SDCKCR 0xE6150074 70#define SDCKCR 0xE6150074
73#define SD1CKCR 0xE6150078 71#define SD1CKCR 0xE6150078
74#define SD2CKCR 0xE615026c 72#define SD2CKCR 0xE615026c
@@ -190,12 +188,12 @@ static struct clk mstp_clks[MSTP_NR] = {
190 [MSTP1108] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 8, MSTPSR11, 0), /* SCIFA5 */ 188 [MSTP1108] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 8, MSTPSR11, 0), /* SCIFA5 */
191 [MSTP1107] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 7, MSTPSR11, 0), /* SCIFA4 */ 189 [MSTP1107] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 7, MSTPSR11, 0), /* SCIFA4 */
192 [MSTP1106] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 6, MSTPSR11, 0), /* SCIFA3 */ 190 [MSTP1106] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 6, MSTPSR11, 0), /* SCIFA3 */
193 [MSTP931] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 31, MSTPSR9, 0), /* I2C0 */ 191 [MSTP931] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 31, MSTPSR9, 0), /* I2C0 */
194 [MSTP930] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 30, MSTPSR9, 0), /* I2C1 */ 192 [MSTP930] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 30, MSTPSR9, 0), /* I2C1 */
195 [MSTP929] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 29, MSTPSR9, 0), /* I2C2 */ 193 [MSTP929] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 29, MSTPSR9, 0), /* I2C2 */
196 [MSTP928] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */ 194 [MSTP928] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */
197 [MSTP927] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 27, MSTPSR9, 0), /* I2C4 */ 195 [MSTP927] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 27, MSTPSR9, 0), /* I2C4 */
198 [MSTP925] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 25, MSTPSR9, 0), /* I2C5 */ 196 [MSTP925] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 25, MSTPSR9, 0), /* I2C5 */
199 [MSTP917] = SH_CLK_MSTP32_STS(&qspi_clk, SMSTPCR9, 17, MSTPSR9, 0), /* QSPI */ 197 [MSTP917] = SH_CLK_MSTP32_STS(&qspi_clk, SMSTPCR9, 17, MSTPSR9, 0), /* QSPI */
200 [MSTP815] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 15, MSTPSR8, 0), /* SATA0 */ 198 [MSTP815] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 15, MSTPSR8, 0), /* SATA0 */
201 [MSTP814] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 14, MSTPSR8, 0), /* SATA1 */ 199 [MSTP814] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 14, MSTPSR8, 0), /* SATA1 */
@@ -266,7 +264,7 @@ static struct clk_lookup lookups[] = {
266 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), 264 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]),
267 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP312]), 265 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP312]),
268 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP311]), 266 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP311]),
269 CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), 267 CLKDEV_ICK_ID("fck", "sh-cmt-48-gen2.0", &mstp_clks[MSTP124]),
270 CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]), 268 CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]),
271 CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), 269 CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
272 CLKDEV_DEV_ID("i2c-rcar_gen2.0", &mstp_clks[MSTP931]), 270 CLKDEV_DEV_ID("i2c-rcar_gen2.0", &mstp_clks[MSTP931]),
@@ -295,14 +293,9 @@ static struct clk_lookup lookups[] = {
295 293
296void __init r8a7791_clock_init(void) 294void __init r8a7791_clock_init(void)
297{ 295{
298 void __iomem *modemr = ioremap_nocache(MODEMR, PAGE_SIZE); 296 u32 mode = rcar_gen2_read_mode_pins();
299 u32 mode;
300 int k, ret = 0; 297 int k, ret = 0;
301 298
302 BUG_ON(!modemr);
303 mode = ioread32(modemr);
304 iounmap(modemr);
305
306 switch (mode & (MD(14) | MD(13))) { 299 switch (mode & (MD(14) | MD(13))) {
307 case 0: 300 case 0:
308 R8A7791_CLOCK_ROOT(15, &extal_clk, 172, 208, 106, 88); 301 R8A7791_CLOCK_ROOT(15, &extal_clk, 172, 208, 106, 88);
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
index 28489978b09c..d16d9ca7f79e 100644
--- a/arch/arm/mach-shmobile/clock-sh7372.c
+++ b/arch/arm/mach-shmobile/clock-sh7372.c
@@ -515,8 +515,6 @@ static struct clk_lookup lookups[] = {
515 CLKDEV_DEV_ID("uio_pdrv_genirq.1", &mstp_clks[MSTP128]), /* VEU0 */ 515 CLKDEV_DEV_ID("uio_pdrv_genirq.1", &mstp_clks[MSTP128]), /* VEU0 */
516 CLKDEV_DEV_ID("sh_mobile_ceu.0", &mstp_clks[MSTP127]), /* CEU */ 516 CLKDEV_DEV_ID("sh_mobile_ceu.0", &mstp_clks[MSTP127]), /* CEU */
517 CLKDEV_DEV_ID("sh-mobile-csi2.0", &mstp_clks[MSTP126]), /* CSI2 */ 517 CLKDEV_DEV_ID("sh-mobile-csi2.0", &mstp_clks[MSTP126]), /* CSI2 */
518 CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]), /* TMU00 */
519 CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP125]), /* TMU01 */
520 CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX0 */ 518 CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX0 */
521 CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]), /* LCDC1 */ 519 CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]), /* LCDC1 */
522 CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* IIC0 */ 520 CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* IIC0 */
@@ -565,10 +563,7 @@ static struct clk_lookup lookups[] = {
565 CLKDEV_DEV_ID("r8a66597_hcd.1", &mstp_clks[MSTP406]), /* USB1 */ 563 CLKDEV_DEV_ID("r8a66597_hcd.1", &mstp_clks[MSTP406]), /* USB1 */
566 CLKDEV_DEV_ID("r8a66597_udc.1", &mstp_clks[MSTP406]), /* USB1 */ 564 CLKDEV_DEV_ID("r8a66597_udc.1", &mstp_clks[MSTP406]), /* USB1 */
567 CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */ 565 CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */
568 CLKDEV_DEV_ID("sh_cmt.4", &mstp_clks[MSTP405]), /* CMT4 */
569 CLKDEV_DEV_ID("sh_cmt.3", &mstp_clks[MSTP404]), /* CMT3 */
570 CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ 566 CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */
571 CLKDEV_DEV_ID("sh_cmt.2", &mstp_clks[MSTP400]), /* CMT2 */
572 567
573 /* ICK */ 568 /* ICK */
574 CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), 569 CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]),
@@ -580,7 +575,11 @@ static struct clk_lookup lookups[] = {
580 CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]), 575 CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]),
581 CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), 576 CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]),
582 CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), 577 CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]),
578 CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP125]), /* TMU0 */
583 CLKDEV_ICK_ID("spu2", "sh_fsi2", &mstp_clks[MSTP223]), 579 CLKDEV_ICK_ID("spu2", "sh_fsi2", &mstp_clks[MSTP223]),
580 CLKDEV_ICK_ID("fck", "sh-cmt-32-fast.4", &mstp_clks[MSTP405]), /* CMT4 */
581 CLKDEV_ICK_ID("fck", "sh-cmt-32-fast.3", &mstp_clks[MSTP404]), /* CMT3 */
582 CLKDEV_ICK_ID("fck", "sh-cmt-32-fast.2", &mstp_clks[MSTP400]), /* CMT2 */
584 CLKDEV_ICK_ID("diva", "sh_fsi2", &fsidivs[FSIDIV_A]), 583 CLKDEV_ICK_ID("diva", "sh_fsi2", &fsidivs[FSIDIV_A]),
585 CLKDEV_ICK_ID("divb", "sh_fsi2", &fsidivs[FSIDIV_B]), 584 CLKDEV_ICK_ID("divb", "sh_fsi2", &fsidivs[FSIDIV_B]),
586 CLKDEV_ICK_ID("xcka", "sh_fsi2", &fsiack_clk), 585 CLKDEV_ICK_ID("xcka", "sh_fsi2", &fsiack_clk),
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c
index 23edf8360c27..0d9cd1fe0212 100644
--- a/arch/arm/mach-shmobile/clock-sh73a0.c
+++ b/arch/arm/mach-shmobile/clock-sh73a0.c
@@ -633,8 +633,6 @@ static struct clk_lookup lookups[] = {
633 CLKDEV_DEV_ID("sh-mobile-csi2.1", &mstp_clks[MSTP128]), /* CSI2-RX1 */ 633 CLKDEV_DEV_ID("sh-mobile-csi2.1", &mstp_clks[MSTP128]), /* CSI2-RX1 */
634 CLKDEV_DEV_ID("sh_mobile_ceu.0", &mstp_clks[MSTP127]), /* CEU0 */ 634 CLKDEV_DEV_ID("sh_mobile_ceu.0", &mstp_clks[MSTP127]), /* CEU0 */
635 CLKDEV_DEV_ID("sh-mobile-csi2.0", &mstp_clks[MSTP126]), /* CSI2-RX0 */ 635 CLKDEV_DEV_ID("sh-mobile-csi2.0", &mstp_clks[MSTP126]), /* CSI2-RX0 */
636 CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]), /* TMU00 */
637 CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP125]), /* TMU01 */
638 CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX */ 636 CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX */
639 CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* I2C0 */ 637 CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* I2C0 */
640 CLKDEV_DEV_ID("e6820000.i2c", &mstp_clks[MSTP116]), /* I2C0 */ 638 CLKDEV_DEV_ID("e6820000.i2c", &mstp_clks[MSTP116]), /* I2C0 */
@@ -650,7 +648,6 @@ static struct clk_lookup lookups[] = {
650 CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */ 648 CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */
651 CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ 649 CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */
652 CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */ 650 CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */
653 CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */
654 CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI */ 651 CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI */
655 CLKDEV_DEV_ID("ec230000.sound", &mstp_clks[MSTP328]), /* FSI */ 652 CLKDEV_DEV_ID("ec230000.sound", &mstp_clks[MSTP328]), /* FSI */
656 CLKDEV_DEV_ID("sh_irda.0", &mstp_clks[MSTP325]), /* IrDA */ 653 CLKDEV_DEV_ID("sh_irda.0", &mstp_clks[MSTP325]), /* IrDA */
@@ -683,6 +680,8 @@ static struct clk_lookup lookups[] = {
683 CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), 680 CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]),
684 CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.0", &dsi0phy_clk), 681 CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.0", &dsi0phy_clk),
685 CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.1", &dsi1phy_clk), 682 CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.1", &dsi1phy_clk),
683 CLKDEV_ICK_ID("fck", "sh-cmt-48.1", &mstp_clks[MSTP329]), /* CMT1 */
684 CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP125]), /* TMU0 */
686}; 685};
687 686
688void __init sh73a0_clock_init(void) 687void __init sh73a0_clock_init(void)
diff --git a/arch/arm/mach-shmobile/clock.c b/arch/arm/mach-shmobile/clock.c
index ad7df629d995..e7232a0373b9 100644
--- a/arch/arm/mach-shmobile/clock.c
+++ b/arch/arm/mach-shmobile/clock.c
@@ -21,6 +21,32 @@
21 */ 21 */
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/init.h> 23#include <linux/init.h>
24
25#ifdef CONFIG_COMMON_CLK
26#include <linux/clk.h>
27#include <linux/clkdev.h>
28#include <mach/clock.h>
29
30void __init shmobile_clk_workaround(const struct clk_name *clks,
31 int nr_clks, bool enable)
32{
33 const struct clk_name *clkn;
34 struct clk *clk;
35 unsigned int i;
36
37 for (i = 0; i < nr_clks; ++i) {
38 clkn = clks + i;
39 clk = clk_get(NULL, clkn->clk);
40 if (!IS_ERR(clk)) {
41 clk_register_clkdev(clk, clkn->con_id, clkn->dev_id);
42 if (enable)
43 clk_prepare_enable(clk);
44 clk_put(clk);
45 }
46 }
47}
48
49#else /* CONFIG_COMMON_CLK */
24#include <linux/sh_clk.h> 50#include <linux/sh_clk.h>
25#include <linux/export.h> 51#include <linux/export.h>
26#include <mach/clock.h> 52#include <mach/clock.h>
@@ -58,3 +84,5 @@ void __clk_put(struct clk *clk)
58{ 84{
59} 85}
60EXPORT_SYMBOL(__clk_put); 86EXPORT_SYMBOL(__clk_put);
87
88#endif /* CONFIG_COMMON_CLK */
diff --git a/arch/arm/mach-shmobile/include/mach/clock.h b/arch/arm/mach-shmobile/include/mach/clock.h
index 03e56074928c..31b6417463e6 100644
--- a/arch/arm/mach-shmobile/include/mach/clock.h
+++ b/arch/arm/mach-shmobile/include/mach/clock.h
@@ -1,6 +1,22 @@
1#ifndef CLOCK_H 1#ifndef CLOCK_H
2#define CLOCK_H 2#define CLOCK_H
3 3
4#ifdef CONFIG_COMMON_CLK
5/* temporary clock configuration helper for platform devices */
6
7struct clk_name {
8 const char *clk;
9 const char *con_id;
10 const char *dev_id;
11};
12
13void shmobile_clk_workaround(const struct clk_name *clks, int nr_clks,
14 bool enable);
15
16#else /* CONFIG_COMMON_CLK */
17/* legacy clock implementation */
18
19struct clk;
4unsigned long shmobile_fixed_ratio_clk_recalc(struct clk *clk); 20unsigned long shmobile_fixed_ratio_clk_recalc(struct clk *clk);
5extern struct sh_clk_ops shmobile_fixed_ratio_clk_ops; 21extern struct sh_clk_ops shmobile_fixed_ratio_clk_ops;
6 22
@@ -36,4 +52,5 @@ do { \
36 (p)->div = d; \ 52 (p)->div = d; \
37} while (0) 53} while (0)
38 54
55#endif /* CONFIG_COMMON_CLK */
39#endif 56#endif
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index cb8e32deb2a3..f7a360edcc35 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -4,6 +4,7 @@
4extern void shmobile_earlytimer_init(void); 4extern void shmobile_earlytimer_init(void);
5extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz, 5extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz,
6 unsigned int mult, unsigned int div); 6 unsigned int mult, unsigned int div);
7extern void shmobile_init_delay(void);
7struct twd_local_timer; 8struct twd_local_timer;
8extern void shmobile_setup_console(void); 9extern void shmobile_setup_console(void);
9extern void shmobile_boot_vector(void); 10extern void shmobile_boot_vector(void);
diff --git a/arch/arm/mach-shmobile/include/mach/emev2.h b/arch/arm/mach-shmobile/include/mach/emev2.h
deleted file mode 100644
index fcb142a14e07..000000000000
--- a/arch/arm/mach-shmobile/include/mach/emev2.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef __ASM_EMEV2_H__
2#define __ASM_EMEV2_H__
3
4extern void emev2_map_io(void);
5extern void emev2_init_delay(void);
6extern void emev2_clock_init(void);
7extern struct smp_operations emev2_smp_ops;
8
9#endif /* __ASM_EMEV2_H__ */
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7740.h b/arch/arm/mach-shmobile/include/mach/r8a7740.h
index d07932f872b6..5e3c9ec06303 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7740.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7740.h
@@ -47,7 +47,6 @@ enum {
47}; 47};
48 48
49extern void r8a7740_meram_workaround(void); 49extern void r8a7740_meram_workaround(void);
50extern void r8a7740_init_delay(void);
51extern void r8a7740_init_irq_of(void); 50extern void r8a7740_init_irq_of(void);
52extern void r8a7740_map_io(void); 51extern void r8a7740_map_io(void);
53extern void r8a7740_add_early_devices(void); 52extern void r8a7740_add_early_devices(void);
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7791.h b/arch/arm/mach-shmobile/include/mach/r8a7791.h
index 200fa699f730..664274cc4b64 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7791.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7791.h
@@ -5,7 +5,6 @@ void r8a7791_add_standard_devices(void);
5void r8a7791_add_dt_devices(void); 5void r8a7791_add_dt_devices(void);
6void r8a7791_clock_init(void); 6void r8a7791_clock_init(void);
7void r8a7791_pinmux_init(void); 7void r8a7791_pinmux_init(void);
8void r8a7791_init_early(void);
9extern struct smp_operations r8a7791_smp_ops; 8extern struct smp_operations r8a7791_smp_ops;
10 9
11#endif /* __ASM_R8A7791_H__ */ 10#endif /* __ASM_R8A7791_H__ */
diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c
index 1fc05d9453d0..f710235aff2f 100644
--- a/arch/arm/mach-shmobile/pm-rmobile.c
+++ b/arch/arm/mach-shmobile/pm-rmobile.c
@@ -99,39 +99,7 @@ static int rmobile_pd_power_up(struct generic_pm_domain *genpd)
99 99
100static bool rmobile_pd_active_wakeup(struct device *dev) 100static bool rmobile_pd_active_wakeup(struct device *dev)
101{ 101{
102 bool (*active_wakeup)(struct device *dev); 102 return true;
103
104 active_wakeup = dev_gpd_data(dev)->ops.active_wakeup;
105 return active_wakeup ? active_wakeup(dev) : true;
106}
107
108static int rmobile_pd_stop_dev(struct device *dev)
109{
110 int (*stop)(struct device *dev);
111
112 stop = dev_gpd_data(dev)->ops.stop;
113 if (stop) {
114 int ret = stop(dev);
115 if (ret)
116 return ret;
117 }
118 return pm_clk_suspend(dev);
119}
120
121static int rmobile_pd_start_dev(struct device *dev)
122{
123 int (*start)(struct device *dev);
124 int ret;
125
126 ret = pm_clk_resume(dev);
127 if (ret)
128 return ret;
129
130 start = dev_gpd_data(dev)->ops.start;
131 if (start)
132 ret = start(dev);
133
134 return ret;
135} 103}
136 104
137static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd) 105static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd)
@@ -140,8 +108,8 @@ static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd)
140 struct dev_power_governor *gov = rmobile_pd->gov; 108 struct dev_power_governor *gov = rmobile_pd->gov;
141 109
142 pm_genpd_init(genpd, gov ? : &simple_qos_governor, false); 110 pm_genpd_init(genpd, gov ? : &simple_qos_governor, false);
143 genpd->dev_ops.stop = rmobile_pd_stop_dev; 111 genpd->dev_ops.stop = pm_clk_suspend;
144 genpd->dev_ops.start = rmobile_pd_start_dev; 112 genpd->dev_ops.start = pm_clk_resume;
145 genpd->dev_ops.active_wakeup = rmobile_pd_active_wakeup; 113 genpd->dev_ops.active_wakeup = rmobile_pd_active_wakeup;
146 genpd->dev_irq_safe = true; 114 genpd->dev_irq_safe = true;
147 genpd->power_off = rmobile_pd_power_down; 115 genpd->power_off = rmobile_pd_power_down;
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
index c71d667007b8..d953ff6e78a2 100644
--- a/arch/arm/mach-shmobile/setup-emev2.c
+++ b/arch/arm/mach-shmobile/setup-emev2.c
@@ -21,7 +21,6 @@
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/of_platform.h> 22#include <linux/of_platform.h>
23#include <mach/common.h> 23#include <mach/common.h>
24#include <mach/emev2.h>
25#include <asm/mach-types.h> 24#include <asm/mach-types.h>
26#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
27#include <asm/mach/map.h> 26#include <asm/mach/map.h>
@@ -38,23 +37,19 @@ static struct map_desc emev2_io_desc[] __initdata = {
38#endif 37#endif
39}; 38};
40 39
41void __init emev2_map_io(void) 40static void __init emev2_map_io(void)
42{ 41{
43 iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc)); 42 iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc));
44} 43}
45 44
46void __init emev2_init_delay(void) 45static void __init emev2_init_delay(void)
47{ 46{
48 shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */ 47 shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */
49} 48}
50 49
51static void __init emev2_add_standard_devices_dt(void) 50static void __init emev2_add_standard_devices_dt(void)
52{ 51{
53#ifdef CONFIG_COMMON_CLK
54 of_clk_init(NULL); 52 of_clk_init(NULL);
55#else
56 emev2_clock_init();
57#endif
58 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 53 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
59} 54}
60 55
@@ -63,6 +58,8 @@ static const char *emev2_boards_compat_dt[] __initconst = {
63 NULL, 58 NULL,
64}; 59};
65 60
61extern struct smp_operations emev2_smp_ops;
62
66DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)") 63DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
67 .smp = smp_ops(emev2_smp_ops), 64 .smp = smp_ops(emev2_smp_ops),
68 .map_io = emev2_map_io, 65 .map_io = emev2_map_io,
diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c
index 9c0b3a9d5f7a..412e179429cd 100644
--- a/arch/arm/mach-shmobile/setup-r7s72100.c
+++ b/arch/arm/mach-shmobile/setup-r7s72100.c
@@ -21,77 +21,26 @@
21#include <linux/irq.h> 21#include <linux/irq.h>
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/of_platform.h> 23#include <linux/of_platform.h>
24#include <linux/serial_sci.h>
25#include <linux/sh_timer.h> 24#include <linux/sh_timer.h>
26#include <mach/common.h> 25#include <mach/common.h>
27#include <mach/irqs.h> 26#include <mach/irqs.h>
28#include <mach/r7s72100.h> 27#include <mach/r7s72100.h>
29#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
30 29
31#define R7S72100_SCIF(index, baseaddr, irq) \ 30static struct resource mtu2_resources[] __initdata = {
32static const struct plat_sci_port scif##index##_platform_data = { \ 31 DEFINE_RES_MEM(0xfcff0000, 0x400),
33 .type = PORT_SCIF, \ 32 DEFINE_RES_IRQ_NAMED(gic_iid(139), "tgi0a"),
34 .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, \
35 .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \
36 .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | \
37 SCSCR_REIE, \
38}; \
39 \
40static struct resource scif##index##_resources[] = { \
41 DEFINE_RES_MEM(baseaddr, 0x100), \
42 DEFINE_RES_IRQ(irq + 1), \
43 DEFINE_RES_IRQ(irq + 2), \
44 DEFINE_RES_IRQ(irq + 3), \
45 DEFINE_RES_IRQ(irq), \
46} \
47
48R7S72100_SCIF(0, 0xe8007000, gic_iid(221));
49R7S72100_SCIF(1, 0xe8007800, gic_iid(225));
50R7S72100_SCIF(2, 0xe8008000, gic_iid(229));
51R7S72100_SCIF(3, 0xe8008800, gic_iid(233));
52R7S72100_SCIF(4, 0xe8009000, gic_iid(237));
53R7S72100_SCIF(5, 0xe8009800, gic_iid(241));
54R7S72100_SCIF(6, 0xe800a000, gic_iid(245));
55R7S72100_SCIF(7, 0xe800a800, gic_iid(249));
56
57#define r7s72100_register_scif(index) \
58 platform_device_register_resndata(&platform_bus, "sh-sci", index, \
59 scif##index##_resources, \
60 ARRAY_SIZE(scif##index##_resources), \
61 &scif##index##_platform_data, \
62 sizeof(scif##index##_platform_data))
63
64
65static struct sh_timer_config mtu2_0_platform_data __initdata = {
66 .name = "MTU2_0",
67 .timer_bit = 0,
68 .channel_offset = -0x80,
69 .clockevent_rating = 200,
70};
71
72static struct resource mtu2_0_resources[] __initdata = {
73 DEFINE_RES_MEM(0xfcff0300, 0x27),
74 DEFINE_RES_IRQ(gic_iid(139)), /* MTU2 TGI0A */
75}; 33};
76 34
77#define r7s72100_register_mtu2(idx) \ 35#define r7s72100_register_mtu2() \
78 platform_device_register_resndata(&platform_bus, "sh_mtu2", \ 36 platform_device_register_resndata(&platform_bus, "sh-mtu2", \
79 idx, mtu2_##idx##_resources, \ 37 -1, mtu2_resources, \
80 ARRAY_SIZE(mtu2_##idx##_resources), \ 38 ARRAY_SIZE(mtu2_resources), \
81 &mtu2_##idx##_platform_data, \ 39 NULL, 0)
82 sizeof(struct sh_timer_config))
83 40
84void __init r7s72100_add_dt_devices(void) 41void __init r7s72100_add_dt_devices(void)
85{ 42{
86 r7s72100_register_scif(0); 43 r7s72100_register_mtu2();
87 r7s72100_register_scif(1);
88 r7s72100_register_scif(2);
89 r7s72100_register_scif(3);
90 r7s72100_register_scif(4);
91 r7s72100_register_scif(5);
92 r7s72100_register_scif(6);
93 r7s72100_register_scif(7);
94 r7s72100_register_mtu2(0);
95} 44}
96 45
97void __init r7s72100_init_early(void) 46void __init r7s72100_init_early(void)
diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c
index cd36f8078325..9333770cfac2 100644
--- a/arch/arm/mach-shmobile/setup-r8a73a4.c
+++ b/arch/arm/mach-shmobile/setup-r8a73a4.c
@@ -169,20 +169,17 @@ static const struct resource thermal0_resources[] = {
169 thermal0_resources, \ 169 thermal0_resources, \
170 ARRAY_SIZE(thermal0_resources)) 170 ARRAY_SIZE(thermal0_resources))
171 171
172static struct sh_timer_config cmt10_platform_data = { 172static struct sh_timer_config cmt1_platform_data = {
173 .name = "CMT10", 173 .channels_mask = 0xff,
174 .timer_bit = 0,
175 .clockevent_rating = 80,
176}; 174};
177 175
178static struct resource cmt10_resources[] = { 176static struct resource cmt1_resources[] = {
179 DEFINE_RES_MEM(0xe6130010, 0x0c), 177 DEFINE_RES_MEM(0xe6130000, 0x1004),
180 DEFINE_RES_MEM(0xe6130000, 0x04), 178 DEFINE_RES_IRQ(gic_spi(120)),
181 DEFINE_RES_IRQ(gic_spi(120)), /* CMT1_0 */
182}; 179};
183 180
184#define r8a7790_register_cmt(idx) \ 181#define r8a7790_register_cmt(idx) \
185 platform_device_register_resndata(&platform_bus, "sh_cmt", \ 182 platform_device_register_resndata(&platform_bus, "sh-cmt-48-gen2", \
186 idx, cmt##idx##_resources, \ 183 idx, cmt##idx##_resources, \
187 ARRAY_SIZE(cmt##idx##_resources), \ 184 ARRAY_SIZE(cmt##idx##_resources), \
188 &cmt##idx##_platform_data, \ 185 &cmt##idx##_platform_data, \
@@ -196,7 +193,7 @@ void __init r8a73a4_add_dt_devices(void)
196 r8a73a4_register_scif(3); 193 r8a73a4_register_scif(3);
197 r8a73a4_register_scif(4); 194 r8a73a4_register_scif(4);
198 r8a73a4_register_scif(5); 195 r8a73a4_register_scif(5);
199 r8a7790_register_cmt(10); 196 r8a7790_register_cmt(1);
200} 197}
201 198
202/* DMA */ 199/* DMA */
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 8f3c68101d59..35dec233301e 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -237,126 +237,45 @@ R8A7740_SCIF(PORT_SCIFA, 7, 0xe6cd0000, gic_spi(107));
237R8A7740_SCIF(PORT_SCIFB, 8, 0xe6c30000, gic_spi(108)); 237R8A7740_SCIF(PORT_SCIFB, 8, 0xe6c30000, gic_spi(108));
238 238
239/* CMT */ 239/* CMT */
240static struct sh_timer_config cmt10_platform_data = { 240static struct sh_timer_config cmt1_platform_data = {
241 .name = "CMT10", 241 .channels_mask = 0x3f,
242 .channel_offset = 0x10,
243 .timer_bit = 0,
244 .clockevent_rating = 125,
245 .clocksource_rating = 125,
246}; 242};
247 243
248static struct resource cmt10_resources[] = { 244static struct resource cmt1_resources[] = {
249 [0] = { 245 DEFINE_RES_MEM(0xe6138000, 0x170),
250 .name = "CMT10", 246 DEFINE_RES_IRQ(gic_spi(58)),
251 .start = 0xe6138010,
252 .end = 0xe613801b,
253 .flags = IORESOURCE_MEM,
254 },
255 [1] = {
256 .start = gic_spi(58),
257 .flags = IORESOURCE_IRQ,
258 },
259}; 247};
260 248
261static struct platform_device cmt10_device = { 249static struct platform_device cmt1_device = {
262 .name = "sh_cmt", 250 .name = "sh-cmt-48",
263 .id = 10, 251 .id = 1,
264 .dev = { 252 .dev = {
265 .platform_data = &cmt10_platform_data, 253 .platform_data = &cmt1_platform_data,
266 }, 254 },
267 .resource = cmt10_resources, 255 .resource = cmt1_resources,
268 .num_resources = ARRAY_SIZE(cmt10_resources), 256 .num_resources = ARRAY_SIZE(cmt1_resources),
269}; 257};
270 258
271/* TMU */ 259/* TMU */
272static struct sh_timer_config tmu00_platform_data = { 260static struct sh_timer_config tmu0_platform_data = {
273 .name = "TMU00", 261 .channels_mask = 7,
274 .channel_offset = 0x4,
275 .timer_bit = 0,
276 .clockevent_rating = 200,
277}; 262};
278 263
279static struct resource tmu00_resources[] = { 264static struct resource tmu0_resources[] = {
280 [0] = { 265 DEFINE_RES_MEM(0xfff80000, 0x2c),
281 .name = "TMU00", 266 DEFINE_RES_IRQ(gic_spi(198)),
282 .start = 0xfff80008, 267 DEFINE_RES_IRQ(gic_spi(199)),
283 .end = 0xfff80014 - 1, 268 DEFINE_RES_IRQ(gic_spi(200)),
284 .flags = IORESOURCE_MEM,
285 },
286 [1] = {
287 .start = gic_spi(198),
288 .flags = IORESOURCE_IRQ,
289 },
290}; 269};
291 270
292static struct platform_device tmu00_device = { 271static struct platform_device tmu0_device = {
293 .name = "sh_tmu", 272 .name = "sh-tmu",
294 .id = 0, 273 .id = 0,
295 .dev = { 274 .dev = {
296 .platform_data = &tmu00_platform_data, 275 .platform_data = &tmu0_platform_data,
297 },
298 .resource = tmu00_resources,
299 .num_resources = ARRAY_SIZE(tmu00_resources),
300};
301
302static struct sh_timer_config tmu01_platform_data = {
303 .name = "TMU01",
304 .channel_offset = 0x10,
305 .timer_bit = 1,
306 .clocksource_rating = 200,
307};
308
309static struct resource tmu01_resources[] = {
310 [0] = {
311 .name = "TMU01",
312 .start = 0xfff80014,
313 .end = 0xfff80020 - 1,
314 .flags = IORESOURCE_MEM,
315 },
316 [1] = {
317 .start = gic_spi(199),
318 .flags = IORESOURCE_IRQ,
319 },
320};
321
322static struct platform_device tmu01_device = {
323 .name = "sh_tmu",
324 .id = 1,
325 .dev = {
326 .platform_data = &tmu01_platform_data,
327 }, 276 },
328 .resource = tmu01_resources, 277 .resource = tmu0_resources,
329 .num_resources = ARRAY_SIZE(tmu01_resources), 278 .num_resources = ARRAY_SIZE(tmu0_resources),
330};
331
332static struct sh_timer_config tmu02_platform_data = {
333 .name = "TMU02",
334 .channel_offset = 0x1C,
335 .timer_bit = 2,
336 .clocksource_rating = 200,
337};
338
339static struct resource tmu02_resources[] = {
340 [0] = {
341 .name = "TMU02",
342 .start = 0xfff80020,
343 .end = 0xfff8002C - 1,
344 .flags = IORESOURCE_MEM,
345 },
346 [1] = {
347 .start = gic_spi(200),
348 .flags = IORESOURCE_IRQ,
349 },
350};
351
352static struct platform_device tmu02_device = {
353 .name = "sh_tmu",
354 .id = 2,
355 .dev = {
356 .platform_data = &tmu02_platform_data,
357 },
358 .resource = tmu02_resources,
359 .num_resources = ARRAY_SIZE(tmu02_resources),
360}; 279};
361 280
362/* IPMMUI (an IPMMU module for ICB/LMB) */ 281/* IPMMUI (an IPMMU module for ICB/LMB) */
@@ -400,7 +319,7 @@ static struct platform_device *r8a7740_devices_dt[] __initdata = {
400 &scif6_device, 319 &scif6_device,
401 &scif7_device, 320 &scif7_device,
402 &scif8_device, 321 &scif8_device,
403 &cmt10_device, 322 &cmt1_device,
404}; 323};
405 324
406static struct platform_device *r8a7740_early_devices[] __initdata = { 325static struct platform_device *r8a7740_early_devices[] __initdata = {
@@ -408,9 +327,7 @@ static struct platform_device *r8a7740_early_devices[] __initdata = {
408 &irqpin1_device, 327 &irqpin1_device,
409 &irqpin2_device, 328 &irqpin2_device,
410 &irqpin3_device, 329 &irqpin3_device,
411 &tmu00_device, 330 &tmu0_device,
412 &tmu01_device,
413 &tmu02_device,
414 &ipmmu_device, 331 &ipmmu_device,
415}; 332};
416 333
@@ -765,7 +682,7 @@ static struct platform_device *r8a7740_late_devices[] __initdata = {
765 * "Media RAM (MERAM)" on r8a7740 documentation 682 * "Media RAM (MERAM)" on r8a7740 documentation
766 */ 683 */
767#define MEBUFCNTR 0xFE950098 684#define MEBUFCNTR 0xFE950098
768void r8a7740_meram_workaround(void) 685void __init r8a7740_meram_workaround(void)
769{ 686{
770 void __iomem *reg; 687 void __iomem *reg;
771 688
@@ -869,17 +786,6 @@ void __init r8a7740_add_early_devices(void)
869 786
870#ifdef CONFIG_USE_OF 787#ifdef CONFIG_USE_OF
871 788
872void __init r8a7740_add_early_devices_dt(void)
873{
874 shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
875
876 early_platform_add_devices(r8a7740_early_devices,
877 ARRAY_SIZE(r8a7740_early_devices));
878
879 /* setup early console here as well */
880 shmobile_setup_console();
881}
882
883void __init r8a7740_add_standard_devices_dt(void) 789void __init r8a7740_add_standard_devices_dt(void)
884{ 790{
885 platform_add_devices(r8a7740_devices_dt, 791 platform_add_devices(r8a7740_devices_dt,
@@ -887,11 +793,6 @@ void __init r8a7740_add_standard_devices_dt(void)
887 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 793 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
888} 794}
889 795
890void __init r8a7740_init_delay(void)
891{
892 shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
893};
894
895void __init r8a7740_init_irq_of(void) 796void __init r8a7740_init_irq_of(void)
896{ 797{
897 void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10); 798 void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10);
@@ -935,9 +836,10 @@ static const char *r8a7740_boards_compat_dt[] __initdata = {
935 836
936DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)") 837DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)")
937 .map_io = r8a7740_map_io, 838 .map_io = r8a7740_map_io,
938 .init_early = r8a7740_init_delay, 839 .init_early = shmobile_init_delay,
939 .init_irq = r8a7740_init_irq_of, 840 .init_irq = r8a7740_init_irq_of,
940 .init_machine = r8a7740_generic_init, 841 .init_machine = r8a7740_generic_init,
842 .init_late = shmobile_init_late,
941 .dt_compat = r8a7740_boards_compat_dt, 843 .dt_compat = r8a7740_boards_compat_dt,
942MACHINE_END 844MACHINE_END
943 845
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index 6d694526e4ca..d311ef903b39 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -71,33 +71,20 @@ R8A7778_SCIF(5, 0xffe45000, gic_iid(0x6b));
71 sizeof(scif##index##_platform_data)) 71 sizeof(scif##index##_platform_data))
72 72
73/* TMU */ 73/* TMU */
74static struct resource sh_tmu0_resources[] __initdata = { 74static struct sh_timer_config sh_tmu0_platform_data = {
75 DEFINE_RES_MEM(0xffd80008, 12), 75 .channels_mask = 7,
76 DEFINE_RES_IRQ(gic_iid(0x40)),
77};
78
79static struct sh_timer_config sh_tmu0_platform_data __initdata = {
80 .name = "TMU00",
81 .channel_offset = 0x4,
82 .timer_bit = 0,
83 .clockevent_rating = 200,
84}; 76};
85 77
86static struct resource sh_tmu1_resources[] __initdata = { 78static struct resource sh_tmu0_resources[] = {
87 DEFINE_RES_MEM(0xffd80014, 12), 79 DEFINE_RES_MEM(0xffd80000, 0x30),
80 DEFINE_RES_IRQ(gic_iid(0x40)),
88 DEFINE_RES_IRQ(gic_iid(0x41)), 81 DEFINE_RES_IRQ(gic_iid(0x41)),
89}; 82 DEFINE_RES_IRQ(gic_iid(0x42)),
90
91static struct sh_timer_config sh_tmu1_platform_data __initdata = {
92 .name = "TMU01",
93 .channel_offset = 0x10,
94 .timer_bit = 1,
95 .clocksource_rating = 200,
96}; 83};
97 84
98#define r8a7778_register_tmu(idx) \ 85#define r8a7778_register_tmu(idx) \
99 platform_device_register_resndata( \ 86 platform_device_register_resndata( \
100 &platform_bus, "sh_tmu", idx, \ 87 &platform_bus, "sh-tmu", idx, \
101 sh_tmu##idx##_resources, \ 88 sh_tmu##idx##_resources, \
102 ARRAY_SIZE(sh_tmu##idx##_resources), \ 89 ARRAY_SIZE(sh_tmu##idx##_resources), \
103 &sh_tmu##idx##_platform_data, \ 90 &sh_tmu##idx##_platform_data, \
@@ -298,10 +285,10 @@ void __init r8a7778_add_dt_devices(void)
298 void __iomem *base = ioremap_nocache(0xf0100000, 0x1000); 285 void __iomem *base = ioremap_nocache(0xf0100000, 0x1000);
299 if (base) { 286 if (base) {
300 /* 287 /*
301 * Early BRESP enable, Shared attribute override enable, 64K*16way 288 * Shared attribute override enable, 64K*16way
302 * don't call iounmap(base) 289 * don't call iounmap(base)
303 */ 290 */
304 l2x0_init(base, 0x40470000, 0x82000fff); 291 l2x0_init(base, 0x00400000, 0xc20f0fff);
305 } 292 }
306#endif 293#endif
307 294
@@ -312,7 +299,6 @@ void __init r8a7778_add_dt_devices(void)
312 r8a7778_register_scif(4); 299 r8a7778_register_scif(4);
313 r8a7778_register_scif(5); 300 r8a7778_register_scif(5);
314 r8a7778_register_tmu(0); 301 r8a7778_register_tmu(0);
315 r8a7778_register_tmu(1);
316} 302}
317 303
318/* HPB-DMA */ 304/* HPB-DMA */
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 8e860b36997a..aba4ed652d54 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -219,64 +219,25 @@ R8A7779_SCIF(4, 0xffe44000, gic_iid(0x7c));
219R8A7779_SCIF(5, 0xffe45000, gic_iid(0x7d)); 219R8A7779_SCIF(5, 0xffe45000, gic_iid(0x7d));
220 220
221/* TMU */ 221/* TMU */
222static struct sh_timer_config tmu00_platform_data = { 222static struct sh_timer_config tmu0_platform_data = {
223 .name = "TMU00", 223 .channels_mask = 7,
224 .channel_offset = 0x4,
225 .timer_bit = 0,
226 .clockevent_rating = 200,
227}; 224};
228 225
229static struct resource tmu00_resources[] = { 226static struct resource tmu0_resources[] = {
230 [0] = { 227 DEFINE_RES_MEM(0xffd80000, 0x30),
231 .name = "TMU00", 228 DEFINE_RES_IRQ(gic_iid(0x40)),
232 .start = 0xffd80008, 229 DEFINE_RES_IRQ(gic_iid(0x41)),
233 .end = 0xffd80013, 230 DEFINE_RES_IRQ(gic_iid(0x42)),
234 .flags = IORESOURCE_MEM,
235 },
236 [1] = {
237 .start = gic_iid(0x40),
238 .flags = IORESOURCE_IRQ,
239 },
240}; 231};
241 232
242static struct platform_device tmu00_device = { 233static struct platform_device tmu0_device = {
243 .name = "sh_tmu", 234 .name = "sh-tmu",
244 .id = 0, 235 .id = 0,
245 .dev = { 236 .dev = {
246 .platform_data = &tmu00_platform_data, 237 .platform_data = &tmu0_platform_data,
247 },
248 .resource = tmu00_resources,
249 .num_resources = ARRAY_SIZE(tmu00_resources),
250};
251
252static struct sh_timer_config tmu01_platform_data = {
253 .name = "TMU01",
254 .channel_offset = 0x10,
255 .timer_bit = 1,
256 .clocksource_rating = 200,
257};
258
259static struct resource tmu01_resources[] = {
260 [0] = {
261 .name = "TMU01",
262 .start = 0xffd80014,
263 .end = 0xffd8001f,
264 .flags = IORESOURCE_MEM,
265 },
266 [1] = {
267 .start = gic_iid(0x41),
268 .flags = IORESOURCE_IRQ,
269 },
270};
271
272static struct platform_device tmu01_device = {
273 .name = "sh_tmu",
274 .id = 1,
275 .dev = {
276 .platform_data = &tmu01_platform_data,
277 }, 238 },
278 .resource = tmu01_resources, 239 .resource = tmu0_resources,
279 .num_resources = ARRAY_SIZE(tmu01_resources), 240 .num_resources = ARRAY_SIZE(tmu0_resources),
280}; 241};
281 242
282/* I2C */ 243/* I2C */
@@ -685,8 +646,7 @@ static struct platform_device *r8a7779_devices_dt[] __initdata = {
685 &scif3_device, 646 &scif3_device,
686 &scif4_device, 647 &scif4_device,
687 &scif5_device, 648 &scif5_device,
688 &tmu00_device, 649 &tmu0_device,
689 &tmu01_device,
690}; 650};
691 651
692static struct platform_device *r8a7779_standard_devices[] __initdata = { 652static struct platform_device *r8a7779_standard_devices[] __initdata = {
@@ -700,8 +660,8 @@ static struct platform_device *r8a7779_standard_devices[] __initdata = {
700void __init r8a7779_add_standard_devices(void) 660void __init r8a7779_add_standard_devices(void)
701{ 661{
702#ifdef CONFIG_CACHE_L2X0 662#ifdef CONFIG_CACHE_L2X0
703 /* Early BRESP enable, Shared attribute override enable, 64K*16way */ 663 /* Shared attribute override enable, 64K*16way */
704 l2x0_init(IOMEM(0xf0100000), 0x40470000, 0x82000fff); 664 l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff);
705#endif 665#endif
706 r8a7779_pm_init(); 666 r8a7779_pm_init();
707 667
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
index c4616f0698c6..6bd08b127fa4 100644
--- a/arch/arm/mach-shmobile/setup-r8a7790.c
+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
@@ -185,12 +185,6 @@ void __init r8a7790_pinmux_init(void)
185 r8a7790_register_gpio(3); 185 r8a7790_register_gpio(3);
186 r8a7790_register_gpio(4); 186 r8a7790_register_gpio(4);
187 r8a7790_register_gpio(5); 187 r8a7790_register_gpio(5);
188 r8a7790_register_i2c(0);
189 r8a7790_register_i2c(1);
190 r8a7790_register_i2c(2);
191 r8a7790_register_i2c(3);
192 r8a7790_register_audio_dmac(0);
193 r8a7790_register_audio_dmac(1);
194} 188}
195 189
196#define __R8A7790_SCIF(scif_type, _scscr, index, baseaddr, irq) \ 190#define __R8A7790_SCIF(scif_type, _scscr, index, baseaddr, irq) \
@@ -269,20 +263,17 @@ static const struct resource thermal_resources[] __initconst = {
269 thermal_resources, \ 263 thermal_resources, \
270 ARRAY_SIZE(thermal_resources)) 264 ARRAY_SIZE(thermal_resources))
271 265
272static const struct sh_timer_config cmt00_platform_data __initconst = { 266static struct sh_timer_config cmt0_platform_data = {
273 .name = "CMT00", 267 .channels_mask = 0x60,
274 .timer_bit = 0,
275 .clockevent_rating = 80,
276}; 268};
277 269
278static const struct resource cmt00_resources[] __initconst = { 270static struct resource cmt0_resources[] = {
279 DEFINE_RES_MEM(0xffca0510, 0x0c), 271 DEFINE_RES_MEM(0xffca0000, 0x1004),
280 DEFINE_RES_MEM(0xffca0500, 0x04), 272 DEFINE_RES_IRQ(gic_spi(142)),
281 DEFINE_RES_IRQ(gic_spi(142)), /* CMT0_0 */
282}; 273};
283 274
284#define r8a7790_register_cmt(idx) \ 275#define r8a7790_register_cmt(idx) \
285 platform_device_register_resndata(&platform_bus, "sh_cmt", \ 276 platform_device_register_resndata(&platform_bus, "sh-cmt-48-gen2", \
286 idx, cmt##idx##_resources, \ 277 idx, cmt##idx##_resources, \
287 ARRAY_SIZE(cmt##idx##_resources), \ 278 ARRAY_SIZE(cmt##idx##_resources), \
288 &cmt##idx##_platform_data, \ 279 &cmt##idx##_platform_data, \
@@ -290,6 +281,11 @@ static const struct resource cmt00_resources[] __initconst = {
290 281
291void __init r8a7790_add_dt_devices(void) 282void __init r8a7790_add_dt_devices(void)
292{ 283{
284 r8a7790_register_cmt(0);
285}
286
287void __init r8a7790_add_standard_devices(void)
288{
293 r8a7790_register_scif(0); 289 r8a7790_register_scif(0);
294 r8a7790_register_scif(1); 290 r8a7790_register_scif(1);
295 r8a7790_register_scif(2); 291 r8a7790_register_scif(2);
@@ -300,14 +296,15 @@ void __init r8a7790_add_dt_devices(void)
300 r8a7790_register_scif(7); 296 r8a7790_register_scif(7);
301 r8a7790_register_scif(8); 297 r8a7790_register_scif(8);
302 r8a7790_register_scif(9); 298 r8a7790_register_scif(9);
303 r8a7790_register_cmt(00);
304}
305
306void __init r8a7790_add_standard_devices(void)
307{
308 r8a7790_add_dt_devices(); 299 r8a7790_add_dt_devices();
309 r8a7790_register_irqc(0); 300 r8a7790_register_irqc(0);
310 r8a7790_register_thermal(); 301 r8a7790_register_thermal();
302 r8a7790_register_i2c(0);
303 r8a7790_register_i2c(1);
304 r8a7790_register_i2c(2);
305 r8a7790_register_i2c(3);
306 r8a7790_register_audio_dmac(0);
307 r8a7790_register_audio_dmac(1);
311} 308}
312 309
313void __init r8a7790_init_early(void) 310void __init r8a7790_init_early(void)
diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c
index e28404e43860..04a96ddb3224 100644
--- a/arch/arm/mach-shmobile/setup-r8a7791.c
+++ b/arch/arm/mach-shmobile/setup-r8a7791.c
@@ -128,20 +128,17 @@ R8A7791_SCIFA(14, 0xe6c80000, gic_spi(31)); /* SCIFA5 */
128 &scif##index##_platform_data, \ 128 &scif##index##_platform_data, \
129 sizeof(scif##index##_platform_data)) 129 sizeof(scif##index##_platform_data))
130 130
131static const struct sh_timer_config cmt00_platform_data __initconst = { 131static struct sh_timer_config cmt0_platform_data = {
132 .name = "CMT00", 132 .channels_mask = 0x60,
133 .timer_bit = 0,
134 .clockevent_rating = 80,
135}; 133};
136 134
137static const struct resource cmt00_resources[] __initconst = { 135static struct resource cmt0_resources[] = {
138 DEFINE_RES_MEM(0xffca0510, 0x0c), 136 DEFINE_RES_MEM(0xffca0000, 0x1004),
139 DEFINE_RES_MEM(0xffca0500, 0x04), 137 DEFINE_RES_IRQ(gic_spi(142)),
140 DEFINE_RES_IRQ(gic_spi(142)), /* CMT0_0 */
141}; 138};
142 139
143#define r8a7791_register_cmt(idx) \ 140#define r8a7791_register_cmt(idx) \
144 platform_device_register_resndata(&platform_bus, "sh_cmt", \ 141 platform_device_register_resndata(&platform_bus, "sh-cmt-48-gen2", \
145 idx, cmt##idx##_resources, \ 142 idx, cmt##idx##_resources, \
146 ARRAY_SIZE(cmt##idx##_resources), \ 143 ARRAY_SIZE(cmt##idx##_resources), \
147 &cmt##idx##_platform_data, \ 144 &cmt##idx##_platform_data, \
@@ -185,6 +182,11 @@ static const struct resource thermal_resources[] __initconst = {
185 182
186void __init r8a7791_add_dt_devices(void) 183void __init r8a7791_add_dt_devices(void)
187{ 184{
185 r8a7791_register_cmt(0);
186}
187
188void __init r8a7791_add_standard_devices(void)
189{
188 r8a7791_register_scif(0); 190 r8a7791_register_scif(0);
189 r8a7791_register_scif(1); 191 r8a7791_register_scif(1);
190 r8a7791_register_scif(2); 192 r8a7791_register_scif(2);
@@ -200,23 +202,11 @@ void __init r8a7791_add_dt_devices(void)
200 r8a7791_register_scif(12); 202 r8a7791_register_scif(12);
201 r8a7791_register_scif(13); 203 r8a7791_register_scif(13);
202 r8a7791_register_scif(14); 204 r8a7791_register_scif(14);
203 r8a7791_register_cmt(00);
204}
205
206void __init r8a7791_add_standard_devices(void)
207{
208 r8a7791_add_dt_devices(); 205 r8a7791_add_dt_devices();
209 r8a7791_register_irqc(0); 206 r8a7791_register_irqc(0);
210 r8a7791_register_thermal(); 207 r8a7791_register_thermal();
211} 208}
212 209
213void __init r8a7791_init_early(void)
214{
215#ifndef CONFIG_ARM_ARCH_TIMER
216 shmobile_setup_delay(1300, 2, 4); /* Cortex-A15 @ 1300MHz */
217#endif
218}
219
220#ifdef CONFIG_USE_OF 210#ifdef CONFIG_USE_OF
221static const char *r8a7791_boards_compat_dt[] __initdata = { 211static const char *r8a7791_boards_compat_dt[] __initdata = {
222 "renesas,r8a7791", 212 "renesas,r8a7791",
@@ -225,7 +215,7 @@ static const char *r8a7791_boards_compat_dt[] __initdata = {
225 215
226DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)") 216DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)")
227 .smp = smp_ops(r8a7791_smp_ops), 217 .smp = smp_ops(r8a7791_smp_ops),
228 .init_early = r8a7791_init_early, 218 .init_early = shmobile_init_delay,
229 .init_time = rcar_gen2_timer_init, 219 .init_time = rcar_gen2_timer_init,
230 .dt_compat = r8a7791_boards_compat_dt, 220 .dt_compat = r8a7791_boards_compat_dt,
231MACHINE_END 221MACHINE_END
diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
index 10604480f325..542c5a47173f 100644
--- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
@@ -30,12 +30,16 @@
30 30
31u32 rcar_gen2_read_mode_pins(void) 31u32 rcar_gen2_read_mode_pins(void)
32{ 32{
33 void __iomem *modemr = ioremap_nocache(MODEMR, 4); 33 static u32 mode;
34 u32 mode; 34 static bool mode_valid;
35 35
36 BUG_ON(!modemr); 36 if (!mode_valid) {
37 mode = ioread32(modemr); 37 void __iomem *modemr = ioremap_nocache(MODEMR, 4);
38 iounmap(modemr); 38 BUG_ON(!modemr);
39 mode = ioread32(modemr);
40 iounmap(modemr);
41 mode_valid = true;
42 }
39 43
40 return mode; 44 return mode;
41} 45}
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
index 27301278c208..2a8b9f2a2f54 100644
--- a/arch/arm/mach-shmobile/setup-sh7372.c
+++ b/arch/arm/mach-shmobile/setup-sh7372.c
@@ -119,28 +119,16 @@ SH7372_SCIF(PORT_SCIFB, 6, 0xe6c30000, evt2irq(0x0d60));
119 119
120/* CMT */ 120/* CMT */
121static struct sh_timer_config cmt2_platform_data = { 121static struct sh_timer_config cmt2_platform_data = {
122 .name = "CMT2", 122 .channels_mask = 0x20,
123 .channel_offset = 0x40,
124 .timer_bit = 5,
125 .clockevent_rating = 125,
126 .clocksource_rating = 125,
127}; 123};
128 124
129static struct resource cmt2_resources[] = { 125static struct resource cmt2_resources[] = {
130 [0] = { 126 DEFINE_RES_MEM(0xe6130000, 0x50),
131 .name = "CMT2", 127 DEFINE_RES_IRQ(evt2irq(0x0b80)),
132 .start = 0xe6130040,
133 .end = 0xe613004b,
134 .flags = IORESOURCE_MEM,
135 },
136 [1] = {
137 .start = evt2irq(0x0b80), /* CMT2 */
138 .flags = IORESOURCE_IRQ,
139 },
140}; 128};
141 129
142static struct platform_device cmt2_device = { 130static struct platform_device cmt2_device = {
143 .name = "sh_cmt", 131 .name = "sh-cmt-32-fast",
144 .id = 2, 132 .id = 2,
145 .dev = { 133 .dev = {
146 .platform_data = &cmt2_platform_data, 134 .platform_data = &cmt2_platform_data,
@@ -150,64 +138,25 @@ static struct platform_device cmt2_device = {
150}; 138};
151 139
152/* TMU */ 140/* TMU */
153static struct sh_timer_config tmu00_platform_data = { 141static struct sh_timer_config tmu0_platform_data = {
154 .name = "TMU00", 142 .channels_mask = 7,
155 .channel_offset = 0x4,
156 .timer_bit = 0,
157 .clockevent_rating = 200,
158}; 143};
159 144
160static struct resource tmu00_resources[] = { 145static struct resource tmu0_resources[] = {
161 [0] = { 146 DEFINE_RES_MEM(0xfff60000, 0x2c),
162 .name = "TMU00", 147 DEFINE_RES_IRQ(intcs_evt2irq(0xe80)),
163 .start = 0xfff60008, 148 DEFINE_RES_IRQ(intcs_evt2irq(0xea0)),
164 .end = 0xfff60013, 149 DEFINE_RES_IRQ(intcs_evt2irq(0xec0)),
165 .flags = IORESOURCE_MEM,
166 },
167 [1] = {
168 .start = intcs_evt2irq(0xe80), /* TMU_TUNI0 */
169 .flags = IORESOURCE_IRQ,
170 },
171}; 150};
172 151
173static struct platform_device tmu00_device = { 152static struct platform_device tmu0_device = {
174 .name = "sh_tmu", 153 .name = "sh-tmu",
175 .id = 0, 154 .id = 0,
176 .dev = { 155 .dev = {
177 .platform_data = &tmu00_platform_data, 156 .platform_data = &tmu0_platform_data,
178 },
179 .resource = tmu00_resources,
180 .num_resources = ARRAY_SIZE(tmu00_resources),
181};
182
183static struct sh_timer_config tmu01_platform_data = {
184 .name = "TMU01",
185 .channel_offset = 0x10,
186 .timer_bit = 1,
187 .clocksource_rating = 200,
188};
189
190static struct resource tmu01_resources[] = {
191 [0] = {
192 .name = "TMU01",
193 .start = 0xfff60014,
194 .end = 0xfff6001f,
195 .flags = IORESOURCE_MEM,
196 },
197 [1] = {
198 .start = intcs_evt2irq(0xea0), /* TMU_TUNI1 */
199 .flags = IORESOURCE_IRQ,
200 },
201};
202
203static struct platform_device tmu01_device = {
204 .name = "sh_tmu",
205 .id = 1,
206 .dev = {
207 .platform_data = &tmu01_platform_data,
208 }, 157 },
209 .resource = tmu01_resources, 158 .resource = tmu0_resources,
210 .num_resources = ARRAY_SIZE(tmu01_resources), 159 .num_resources = ARRAY_SIZE(tmu0_resources),
211}; 160};
212 161
213/* I2C */ 162/* I2C */
@@ -952,8 +901,7 @@ static struct platform_device *sh7372_early_devices[] __initdata = {
952 &scif5_device, 901 &scif5_device,
953 &scif6_device, 902 &scif6_device,
954 &cmt2_device, 903 &cmt2_device,
955 &tmu00_device, 904 &tmu0_device,
956 &tmu01_device,
957 &ipmmu_device, 905 &ipmmu_device,
958}; 906};
959 907
@@ -1000,8 +948,7 @@ void __init sh7372_add_standard_devices(void)
1000 { "A4R", &veu2_device, }, 948 { "A4R", &veu2_device, },
1001 { "A4R", &veu3_device, }, 949 { "A4R", &veu3_device, },
1002 { "A4R", &jpu_device, }, 950 { "A4R", &jpu_device, },
1003 { "A4R", &tmu00_device, }, 951 { "A4R", &tmu0_device, },
1004 { "A4R", &tmu01_device, },
1005 }; 952 };
1006 953
1007 sh7372_init_pm_domains(); 954 sh7372_init_pm_domains();
@@ -1037,11 +984,7 @@ void __init sh7372_add_early_devices_dt(void)
1037{ 984{
1038 shmobile_setup_delay(800, 1, 3); /* Cortex-A8 @ 800MHz */ 985 shmobile_setup_delay(800, 1, 3); /* Cortex-A8 @ 800MHz */
1039 986
1040 early_platform_add_devices(sh7372_early_devices, 987 sh7372_add_early_devices();
1041 ARRAY_SIZE(sh7372_early_devices));
1042
1043 /* setup early console here as well */
1044 shmobile_setup_console();
1045} 988}
1046 989
1047void __init sh7372_add_standard_devices_dt(void) 990void __init sh7372_add_standard_devices_dt(void)
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index f74ab530c71d..ad00724a2269 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -104,86 +104,45 @@ SH73A0_SCIF(PORT_SCIFA, 6, 0xe6cc0000, gic_spi(156));
104SH73A0_SCIF(PORT_SCIFA, 7, 0xe6cd0000, gic_spi(143)); 104SH73A0_SCIF(PORT_SCIFA, 7, 0xe6cd0000, gic_spi(143));
105SH73A0_SCIF(PORT_SCIFB, 8, 0xe6c30000, gic_spi(80)); 105SH73A0_SCIF(PORT_SCIFB, 8, 0xe6c30000, gic_spi(80));
106 106
107static struct sh_timer_config cmt10_platform_data = { 107static struct sh_timer_config cmt1_platform_data = {
108 .name = "CMT10", 108 .channels_mask = 0x3f,
109 .channel_offset = 0x10,
110 .timer_bit = 0,
111 .clockevent_rating = 80,
112 .clocksource_rating = 125,
113}; 109};
114 110
115static struct resource cmt10_resources[] = { 111static struct resource cmt1_resources[] = {
116 [0] = { 112 DEFINE_RES_MEM(0xe6138000, 0x200),
117 .name = "CMT10", 113 DEFINE_RES_IRQ(gic_spi(65)),
118 .start = 0xe6138010,
119 .end = 0xe613801b,
120 .flags = IORESOURCE_MEM,
121 },
122 [1] = {
123 .start = gic_spi(65),
124 .flags = IORESOURCE_IRQ,
125 },
126}; 114};
127 115
128static struct platform_device cmt10_device = { 116static struct platform_device cmt1_device = {
129 .name = "sh_cmt", 117 .name = "sh-cmt-48",
130 .id = 10, 118 .id = 1,
131 .dev = { 119 .dev = {
132 .platform_data = &cmt10_platform_data, 120 .platform_data = &cmt1_platform_data,
133 }, 121 },
134 .resource = cmt10_resources, 122 .resource = cmt1_resources,
135 .num_resources = ARRAY_SIZE(cmt10_resources), 123 .num_resources = ARRAY_SIZE(cmt1_resources),
136}; 124};
137 125
138/* TMU */ 126/* TMU */
139static struct sh_timer_config tmu00_platform_data = { 127static struct sh_timer_config tmu0_platform_data = {
140 .name = "TMU00", 128 .channels_mask = 7,
141 .channel_offset = 0x4,
142 .timer_bit = 0,
143 .clockevent_rating = 200,
144}; 129};
145 130
146static struct resource tmu00_resources[] = { 131static struct resource tmu0_resources[] = {
147 [0] = DEFINE_RES_MEM(0xfff60008, 0xc), 132 DEFINE_RES_MEM(0xfff60000, 0x2c),
148 [1] = { 133 DEFINE_RES_IRQ(intcs_evt2irq(0xe80)),
149 .start = intcs_evt2irq(0x0e80), /* TMU0_TUNI00 */ 134 DEFINE_RES_IRQ(intcs_evt2irq(0xea0)),
150 .flags = IORESOURCE_IRQ, 135 DEFINE_RES_IRQ(intcs_evt2irq(0xec0)),
151 },
152}; 136};
153 137
154static struct platform_device tmu00_device = { 138static struct platform_device tmu0_device = {
155 .name = "sh_tmu", 139 .name = "sh-tmu",
156 .id = 0, 140 .id = 0,
157 .dev = { 141 .dev = {
158 .platform_data = &tmu00_platform_data, 142 .platform_data = &tmu0_platform_data,
159 },
160 .resource = tmu00_resources,
161 .num_resources = ARRAY_SIZE(tmu00_resources),
162};
163
164static struct sh_timer_config tmu01_platform_data = {
165 .name = "TMU01",
166 .channel_offset = 0x10,
167 .timer_bit = 1,
168 .clocksource_rating = 200,
169};
170
171static struct resource tmu01_resources[] = {
172 [0] = DEFINE_RES_MEM(0xfff60014, 0xc),
173 [1] = {
174 .start = intcs_evt2irq(0x0ea0), /* TMU0_TUNI01 */
175 .flags = IORESOURCE_IRQ,
176 },
177};
178
179static struct platform_device tmu01_device = {
180 .name = "sh_tmu",
181 .id = 1,
182 .dev = {
183 .platform_data = &tmu01_platform_data,
184 }, 143 },
185 .resource = tmu01_resources, 144 .resource = tmu0_resources,
186 .num_resources = ARRAY_SIZE(tmu01_resources), 145 .num_resources = ARRAY_SIZE(tmu0_resources),
187}; 146};
188 147
189static struct resource i2c0_resources[] = { 148static struct resource i2c0_resources[] = {
@@ -746,12 +705,11 @@ static struct platform_device *sh73a0_devices_dt[] __initdata = {
746 &scif6_device, 705 &scif6_device,
747 &scif7_device, 706 &scif7_device,
748 &scif8_device, 707 &scif8_device,
749 &cmt10_device, 708 &cmt1_device,
750}; 709};
751 710
752static struct platform_device *sh73a0_early_devices[] __initdata = { 711static struct platform_device *sh73a0_early_devices[] __initdata = {
753 &tmu00_device, 712 &tmu0_device,
754 &tmu01_device,
755 &ipmmu_device, 713 &ipmmu_device,
756}; 714};
757 715
diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c
index f2ca92308f75..2dfd748da7f3 100644
--- a/arch/arm/mach-shmobile/smp-emev2.c
+++ b/arch/arm/mach-shmobile/smp-emev2.c
@@ -24,7 +24,6 @@
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/delay.h> 25#include <linux/delay.h>
26#include <mach/common.h> 26#include <mach/common.h>
27#include <mach/emev2.h>
28#include <asm/smp_plat.h> 27#include <asm/smp_plat.h>
29#include <asm/smp_scu.h> 28#include <asm/smp_scu.h>
30 29
diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c
index 2df5bd190fe4..ec979529f30f 100644
--- a/arch/arm/mach-shmobile/smp-r8a7791.c
+++ b/arch/arm/mach-shmobile/smp-r8a7791.c
@@ -20,6 +20,7 @@
20#include <asm/smp_plat.h> 20#include <asm/smp_plat.h>
21#include <mach/common.h> 21#include <mach/common.h>
22#include <mach/r8a7791.h> 22#include <mach/r8a7791.h>
23#include <mach/rcar-gen2.h>
23 24
24#define RST 0xe6160000 25#define RST 0xe6160000
25#define CA15BAR 0x0020 26#define CA15BAR 0x0020
@@ -51,9 +52,21 @@ static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus)
51 iounmap(p); 52 iounmap(p);
52} 53}
53 54
55static int r8a7791_smp_boot_secondary(unsigned int cpu,
56 struct task_struct *idle)
57{
58 /* Error out when hardware debug mode is enabled */
59 if (rcar_gen2_read_mode_pins() & BIT(21)) {
60 pr_warn("Unable to boot CPU%u when MD21 is set\n", cpu);
61 return -ENOTSUPP;
62 }
63
64 return shmobile_smp_apmu_boot_secondary(cpu, idle);
65}
66
54struct smp_operations r8a7791_smp_ops __initdata = { 67struct smp_operations r8a7791_smp_ops __initdata = {
55 .smp_prepare_cpus = r8a7791_smp_prepare_cpus, 68 .smp_prepare_cpus = r8a7791_smp_prepare_cpus,
56 .smp_boot_secondary = shmobile_smp_apmu_boot_secondary, 69 .smp_boot_secondary = r8a7791_smp_boot_secondary,
57#ifdef CONFIG_HOTPLUG_CPU 70#ifdef CONFIG_HOTPLUG_CPU
58 .cpu_disable = shmobile_smp_cpu_disable, 71 .cpu_disable = shmobile_smp_cpu_disable,
59 .cpu_die = shmobile_smp_apmu_cpu_die, 72 .cpu_die = shmobile_smp_apmu_cpu_die,
diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c
index 62d7052d6f21..68bc0b82226d 100644
--- a/arch/arm/mach-shmobile/timer.c
+++ b/arch/arm/mach-shmobile/timer.c
@@ -21,6 +21,24 @@
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/clocksource.h> 22#include <linux/clocksource.h>
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/of_address.h>
25
26void __init shmobile_setup_delay_hz(unsigned int max_cpu_core_hz,
27 unsigned int mult, unsigned int div)
28{
29 /* calculate a worst-case loops-per-jiffy value
30 * based on maximum cpu core hz setting and the
31 * __delay() implementation in arch/arm/lib/delay.S
32 *
33 * this will result in a longer delay than expected
34 * when the cpu core runs on lower frequencies.
35 */
36
37 unsigned int value = HZ * div / mult;
38
39 if (!preset_lpj)
40 preset_lpj = max_cpu_core_hz / value;
41}
24 42
25void __init shmobile_setup_delay(unsigned int max_cpu_core_mhz, 43void __init shmobile_setup_delay(unsigned int max_cpu_core_mhz,
26 unsigned int mult, unsigned int div) 44 unsigned int mult, unsigned int div)
@@ -39,6 +57,33 @@ void __init shmobile_setup_delay(unsigned int max_cpu_core_mhz,
39 preset_lpj = max_cpu_core_mhz * value; 57 preset_lpj = max_cpu_core_mhz * value;
40} 58}
41 59
60void __init shmobile_init_delay(void)
61{
62 struct device_node *np, *parent;
63 u32 max_freq, freq;
64
65 max_freq = 0;
66
67 parent = of_find_node_by_path("/cpus");
68 if (parent) {
69 for_each_child_of_node(parent, np) {
70 if (!of_property_read_u32(np, "clock-frequency", &freq))
71 max_freq = max(max_freq, freq);
72 }
73 of_node_put(parent);
74 }
75
76 if (max_freq) {
77 if (of_find_compatible_node(NULL, NULL, "arm,cortex-a8"))
78 shmobile_setup_delay_hz(max_freq, 1, 3);
79 else if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9"))
80 shmobile_setup_delay_hz(max_freq, 1, 3);
81 else if (of_find_compatible_node(NULL, NULL, "arm,cortex-a15"))
82 if (!IS_ENABLED(CONFIG_ARM_ARCH_TIMER))
83 shmobile_setup_delay_hz(max_freq, 2, 4);
84 }
85}
86
42static void __init shmobile_late_time_init(void) 87static void __init shmobile_late_time_init(void)
43{ 88{
44 /* 89 /*
diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c
index d86231e11b34..adbf38314ca8 100644
--- a/arch/arm/mach-socfpga/socfpga.c
+++ b/arch/arm/mach-socfpga/socfpga.c
@@ -98,22 +98,17 @@ static void socfpga_cyclone5_restart(enum reboot_mode mode, const char *cmd)
98 writel(temp, rst_manager_base_addr + SOCFPGA_RSTMGR_CTRL); 98 writel(temp, rst_manager_base_addr + SOCFPGA_RSTMGR_CTRL);
99} 99}
100 100
101static void __init socfpga_cyclone5_init(void)
102{
103 l2x0_of_init(0, ~0UL);
104 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
105}
106
107static const char *altera_dt_match[] = { 101static const char *altera_dt_match[] = {
108 "altr,socfpga", 102 "altr,socfpga",
109 NULL 103 NULL
110}; 104};
111 105
112DT_MACHINE_START(SOCFPGA, "Altera SOCFPGA") 106DT_MACHINE_START(SOCFPGA, "Altera SOCFPGA")
107 .l2c_aux_val = 0,
108 .l2c_aux_mask = ~0,
113 .smp = smp_ops(socfpga_smp_ops), 109 .smp = smp_ops(socfpga_smp_ops),
114 .map_io = socfpga_map_io, 110 .map_io = socfpga_map_io,
115 .init_irq = socfpga_init_irq, 111 .init_irq = socfpga_init_irq,
116 .init_machine = socfpga_cyclone5_init,
117 .restart = socfpga_cyclone5_restart, 112 .restart = socfpga_cyclone5_restart,
118 .dt_compat = altera_dt_match, 113 .dt_compat = altera_dt_match,
119MACHINE_END 114MACHINE_END
diff --git a/arch/arm/mach-spear/platsmp.c b/arch/arm/mach-spear/platsmp.c
index c19751fff2c6..fd4297713d67 100644
--- a/arch/arm/mach-spear/platsmp.c
+++ b/arch/arm/mach-spear/platsmp.c
@@ -20,6 +20,18 @@
20#include <mach/spear.h> 20#include <mach/spear.h>
21#include "generic.h" 21#include "generic.h"
22 22
23/*
24 * Write pen_release in a way that is guaranteed to be visible to all
25 * observers, irrespective of whether they're taking part in coherency
26 * or not. This is necessary for the hotplug code to work reliably.
27 */
28static void write_pen_release(int val)
29{
30 pen_release = val;
31 smp_wmb();
32 sync_cache_w(&pen_release);
33}
34
23static DEFINE_SPINLOCK(boot_lock); 35static DEFINE_SPINLOCK(boot_lock);
24 36
25static void __iomem *scu_base = IOMEM(VA_SCU_BASE); 37static void __iomem *scu_base = IOMEM(VA_SCU_BASE);
@@ -30,8 +42,7 @@ static void spear13xx_secondary_init(unsigned int cpu)
30 * let the primary processor know we're out of the 42 * let the primary processor know we're out of the
31 * pen, then head off into the C entry point 43 * pen, then head off into the C entry point
32 */ 44 */
33 pen_release = -1; 45 write_pen_release(-1);
34 smp_wmb();
35 46
36 /* 47 /*
37 * Synchronise with the boot thread. 48 * Synchronise with the boot thread.
@@ -58,9 +69,7 @@ static int spear13xx_boot_secondary(unsigned int cpu, struct task_struct *idle)
58 * Note that "pen_release" is the hardware CPU ID, whereas 69 * Note that "pen_release" is the hardware CPU ID, whereas
59 * "cpu" is Linux's internal ID. 70 * "cpu" is Linux's internal ID.
60 */ 71 */
61 pen_release = cpu; 72 write_pen_release(cpu);
62 flush_cache_all();
63 outer_flush_all();
64 73
65 timeout = jiffies + (1 * HZ); 74 timeout = jiffies + (1 * HZ);
66 while (time_before(jiffies, timeout)) { 75 while (time_before(jiffies, timeout)) {
diff --git a/arch/arm/mach-spear/spear13xx.c b/arch/arm/mach-spear/spear13xx.c
index 7aa6e8cf830f..c9897ea38980 100644
--- a/arch/arm/mach-spear/spear13xx.c
+++ b/arch/arm/mach-spear/spear13xx.c
@@ -38,15 +38,15 @@ void __init spear13xx_l2x0_init(void)
38 if (!IS_ENABLED(CONFIG_CACHE_L2X0)) 38 if (!IS_ENABLED(CONFIG_CACHE_L2X0))
39 return; 39 return;
40 40
41 writel_relaxed(0x06, VA_L2CC_BASE + L2X0_PREFETCH_CTRL); 41 writel_relaxed(0x06, VA_L2CC_BASE + L310_PREFETCH_CTRL);
42 42
43 /* 43 /*
44 * Program following latencies in order to make 44 * Program following latencies in order to make
45 * SPEAr1340 work at 600 MHz 45 * SPEAr1340 work at 600 MHz
46 */ 46 */
47 writel_relaxed(0x221, VA_L2CC_BASE + L2X0_TAG_LATENCY_CTRL); 47 writel_relaxed(0x221, VA_L2CC_BASE + L310_TAG_LATENCY_CTRL);
48 writel_relaxed(0x441, VA_L2CC_BASE + L2X0_DATA_LATENCY_CTRL); 48 writel_relaxed(0x441, VA_L2CC_BASE + L310_DATA_LATENCY_CTRL);
49 l2x0_init(VA_L2CC_BASE, 0x70A60001, 0xfe00ffff); 49 l2x0_init(VA_L2CC_BASE, 0x30a00001, 0xfe0fffff);
50} 50}
51 51
52/* 52/*
diff --git a/arch/arm/mach-sti/board-dt.c b/arch/arm/mach-sti/board-dt.c
index 1217fb598cfd..3cf6ef8d4317 100644
--- a/arch/arm/mach-sti/board-dt.c
+++ b/arch/arm/mach-sti/board-dt.c
@@ -14,33 +14,19 @@
14 14
15#include "smp.h" 15#include "smp.h"
16 16
17void __init stih41x_l2x0_init(void)
18{
19 u32 way_size = 0x4;
20 u32 aux_ctrl;
21 /* may be this can be encoded in macros like BIT*() */
22 aux_ctrl = (0x1 << L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT) |
23 (0x1 << L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT) |
24 (0x1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
25 (way_size << L2X0_AUX_CTRL_WAY_SIZE_SHIFT);
26
27 l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK);
28}
29
30static void __init stih41x_machine_init(void)
31{
32 stih41x_l2x0_init();
33 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
34}
35
36static const char *stih41x_dt_match[] __initdata = { 17static const char *stih41x_dt_match[] __initdata = {
37 "st,stih415", 18 "st,stih415",
38 "st,stih416", 19 "st,stih416",
20 "st,stih407",
39 NULL 21 NULL
40}; 22};
41 23
42DT_MACHINE_START(STM, "STiH415/416 SoC with Flattened Device Tree") 24DT_MACHINE_START(STM, "STiH415/416 SoC with Flattened Device Tree")
43 .init_machine = stih41x_machine_init,
44 .smp = smp_ops(sti_smp_ops),
45 .dt_compat = stih41x_dt_match, 25 .dt_compat = stih41x_dt_match,
26 .l2c_aux_val = L2C_AUX_CTRL_SHARED_OVERRIDE |
27 L310_AUX_CTRL_DATA_PREFETCH |
28 L310_AUX_CTRL_INSTR_PREFETCH |
29 L2C_AUX_CTRL_WAY_SIZE(4),
30 .l2c_aux_mask = 0xc0000fff,
31 .smp = smp_ops(sti_smp_ops),
46MACHINE_END 32MACHINE_END
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index b57d7d53b9d3..0fbd4f156bfa 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -1,14 +1,38 @@
1config ARCH_SUNXI 1menuconfig ARCH_SUNXI
2 bool "Allwinner A1X SOCs" if ARCH_MULTI_V7 2 bool "Allwinner SoCs" if ARCH_MULTI_V7
3 select ARCH_HAS_RESET_CONTROLLER
4 select ARCH_REQUIRE_GPIOLIB 3 select ARCH_REQUIRE_GPIOLIB
5 select ARM_GIC
6 select ARM_PSCI
7 select CLKSRC_MMIO 4 select CLKSRC_MMIO
8 select GENERIC_IRQ_CHIP 5 select GENERIC_IRQ_CHIP
9 select HAVE_ARM_ARCH_TIMER
10 select PINCTRL 6 select PINCTRL
11 select PINCTRL_SUNXI 7 select PINCTRL_SUNXI
12 select RESET_CONTROLLER
13 select SUN4I_TIMER 8 select SUN4I_TIMER
9
10if ARCH_SUNXI
11
12config MACH_SUN4I
13 bool "Allwinner A10 (sun4i) SoCs support"
14 default ARCH_SUNXI
15
16config MACH_SUN5I
17 bool "Allwinner A10s / A13 (sun5i) SoCs support"
18 default ARCH_SUNXI
19 select SUN5I_HSTIMER
20
21config MACH_SUN6I
22 bool "Allwinner A31 (sun6i) SoCs support"
23 default ARCH_SUNXI
24 select ARCH_HAS_RESET_CONTROLLER
25 select ARM_GIC
26 select MFD_SUN6I_PRCM
27 select RESET_CONTROLLER
28 select SUN5I_HSTIMER
29
30config MACH_SUN7I
31 bool "Allwinner A20 (sun7i) SoCs support"
32 default ARCH_SUNXI
33 select ARM_GIC
34 select ARM_PSCI
35 select HAVE_ARM_ARCH_TIMER
14 select SUN5I_HSTIMER 36 select SUN5I_HSTIMER
37
38endif
diff --git a/arch/arm/mach-sunxi/common.h b/arch/arm/mach-sunxi/common.h
deleted file mode 100644
index 9e5ac4756cbb..000000000000
--- a/arch/arm/mach-sunxi/common.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * Core functions for Allwinner SoCs
3 *
4 * Copyright (C) 2013 Maxime Ripard
5 *
6 * Maxime Ripard <maxime.ripard@free-electrons.com>
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#ifndef __ARCH_SUNXI_COMMON_H_
14#define __ARCH_SUNXI_COMMON_H_
15
16void sun6i_secondary_startup(void);
17extern struct smp_operations sun6i_smp_ops;
18
19#endif /* __ARCH_SUNXI_COMMON_H_ */
diff --git a/arch/arm/mach-sunxi/platsmp.c b/arch/arm/mach-sunxi/platsmp.c
index 0c7dbce033cc..c53077bb8c3f 100644
--- a/arch/arm/mach-sunxi/platsmp.c
+++ b/arch/arm/mach-sunxi/platsmp.c
@@ -21,8 +21,6 @@
21#include <linux/of_address.h> 21#include <linux/of_address.h>
22#include <linux/smp.h> 22#include <linux/smp.h>
23 23
24#include "common.h"
25
26#define CPUCFG_CPU_PWR_CLAMP_STATUS_REG(cpu) ((cpu) * 0x40 + 0x64) 24#define CPUCFG_CPU_PWR_CLAMP_STATUS_REG(cpu) ((cpu) * 0x40 + 0x64)
27#define CPUCFG_CPU_RST_CTRL_REG(cpu) (((cpu) + 1) * 0x40) 25#define CPUCFG_CPU_RST_CTRL_REG(cpu) (((cpu) + 1) * 0x40)
28#define CPUCFG_CPU_CTRL_REG(cpu) (((cpu) + 1) * 0x40 + 0x04) 26#define CPUCFG_CPU_CTRL_REG(cpu) (((cpu) + 1) * 0x40 + 0x04)
@@ -122,3 +120,4 @@ struct smp_operations sun6i_smp_ops __initdata = {
122 .smp_prepare_cpus = sun6i_smp_prepare_cpus, 120 .smp_prepare_cpus = sun6i_smp_prepare_cpus,
123 .smp_boot_secondary = sun6i_smp_boot_secondary, 121 .smp_boot_secondary = sun6i_smp_boot_secondary,
124}; 122};
123CPU_METHOD_OF_DECLARE(sun6i_smp, "allwinner,sun6i-a31", &sun6i_smp_ops);
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c
index 460b5a4962ef..3f9587bb51f6 100644
--- a/arch/arm/mach-sunxi/sunxi.c
+++ b/arch/arm/mach-sunxi/sunxi.c
@@ -12,111 +12,8 @@
12 12
13#include <linux/clk-provider.h> 13#include <linux/clk-provider.h>
14#include <linux/clocksource.h> 14#include <linux/clocksource.h>
15#include <linux/delay.h>
16#include <linux/kernel.h>
17#include <linux/init.h>
18#include <linux/of_address.h>
19#include <linux/of_irq.h>
20#include <linux/of_platform.h>
21#include <linux/io.h>
22#include <linux/reboot.h>
23 15
24#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
25#include <asm/mach/map.h>
26#include <asm/system_misc.h>
27
28#include "common.h"
29
30#define SUN4I_WATCHDOG_CTRL_REG 0x00
31#define SUN4I_WATCHDOG_CTRL_RESTART BIT(0)
32#define SUN4I_WATCHDOG_MODE_REG 0x04
33#define SUN4I_WATCHDOG_MODE_ENABLE BIT(0)
34#define SUN4I_WATCHDOG_MODE_RESET_ENABLE BIT(1)
35
36#define SUN6I_WATCHDOG1_IRQ_REG 0x00
37#define SUN6I_WATCHDOG1_CTRL_REG 0x10
38#define SUN6I_WATCHDOG1_CTRL_RESTART BIT(0)
39#define SUN6I_WATCHDOG1_CONFIG_REG 0x14
40#define SUN6I_WATCHDOG1_CONFIG_RESTART BIT(0)
41#define SUN6I_WATCHDOG1_CONFIG_IRQ BIT(1)
42#define SUN6I_WATCHDOG1_MODE_REG 0x18
43#define SUN6I_WATCHDOG1_MODE_ENABLE BIT(0)
44
45static void __iomem *wdt_base;
46
47static void sun4i_restart(enum reboot_mode mode, const char *cmd)
48{
49 if (!wdt_base)
50 return;
51
52 /* Enable timer and set reset bit in the watchdog */
53 writel(SUN4I_WATCHDOG_MODE_ENABLE | SUN4I_WATCHDOG_MODE_RESET_ENABLE,
54 wdt_base + SUN4I_WATCHDOG_MODE_REG);
55
56 /*
57 * Restart the watchdog. The default (and lowest) interval
58 * value for the watchdog is 0.5s.
59 */
60 writel(SUN4I_WATCHDOG_CTRL_RESTART, wdt_base + SUN4I_WATCHDOG_CTRL_REG);
61
62 while (1) {
63 mdelay(5);
64 writel(SUN4I_WATCHDOG_MODE_ENABLE | SUN4I_WATCHDOG_MODE_RESET_ENABLE,
65 wdt_base + SUN4I_WATCHDOG_MODE_REG);
66 }
67}
68
69static void sun6i_restart(enum reboot_mode mode, const char *cmd)
70{
71 if (!wdt_base)
72 return;
73
74 /* Disable interrupts */
75 writel(0, wdt_base + SUN6I_WATCHDOG1_IRQ_REG);
76
77 /* We want to disable the IRQ and just reset the whole system */
78 writel(SUN6I_WATCHDOG1_CONFIG_RESTART,
79 wdt_base + SUN6I_WATCHDOG1_CONFIG_REG);
80
81 /* Enable timer. The default and lowest interval value is 0.5s */
82 writel(SUN6I_WATCHDOG1_MODE_ENABLE,
83 wdt_base + SUN6I_WATCHDOG1_MODE_REG);
84
85 /* Restart the watchdog. */
86 writel(SUN6I_WATCHDOG1_CTRL_RESTART,
87 wdt_base + SUN6I_WATCHDOG1_CTRL_REG);
88
89 while (1) {
90 mdelay(5);
91 writel(SUN6I_WATCHDOG1_MODE_ENABLE,
92 wdt_base + SUN6I_WATCHDOG1_MODE_REG);
93 }
94}
95
96static struct of_device_id sunxi_restart_ids[] = {
97 { .compatible = "allwinner,sun4i-a10-wdt" },
98 { .compatible = "allwinner,sun6i-a31-wdt" },
99 { /*sentinel*/ }
100};
101
102static void sunxi_setup_restart(void)
103{
104 struct device_node *np;
105
106 np = of_find_matching_node(NULL, sunxi_restart_ids);
107 if (WARN(!np, "unable to setup watchdog restart"))
108 return;
109
110 wdt_base = of_iomap(np, 0);
111 WARN(!wdt_base, "failed to map watchdog base address");
112}
113
114static void __init sunxi_dt_init(void)
115{
116 sunxi_setup_restart();
117
118 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
119}
120 17
121static const char * const sunxi_board_dt_compat[] = { 18static const char * const sunxi_board_dt_compat[] = {
122 "allwinner,sun4i-a10", 19 "allwinner,sun4i-a10",
@@ -126,9 +23,7 @@ static const char * const sunxi_board_dt_compat[] = {
126}; 23};
127 24
128DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)") 25DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)")
129 .init_machine = sunxi_dt_init,
130 .dt_compat = sunxi_board_dt_compat, 26 .dt_compat = sunxi_board_dt_compat,
131 .restart = sun4i_restart,
132MACHINE_END 27MACHINE_END
133 28
134static const char * const sun6i_board_dt_compat[] = { 29static const char * const sun6i_board_dt_compat[] = {
@@ -140,16 +35,14 @@ extern void __init sun6i_reset_init(void);
140static void __init sun6i_timer_init(void) 35static void __init sun6i_timer_init(void)
141{ 36{
142 of_clk_init(NULL); 37 of_clk_init(NULL);
143 sun6i_reset_init(); 38 if (IS_ENABLED(CONFIG_RESET_CONTROLLER))
39 sun6i_reset_init();
144 clocksource_of_init(); 40 clocksource_of_init();
145} 41}
146 42
147DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family") 43DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family")
148 .init_machine = sunxi_dt_init,
149 .init_time = sun6i_timer_init, 44 .init_time = sun6i_timer_init,
150 .dt_compat = sun6i_board_dt_compat, 45 .dt_compat = sun6i_board_dt_compat,
151 .restart = sun6i_restart,
152 .smp = smp_ops(sun6i_smp_ops),
153MACHINE_END 46MACHINE_END
154 47
155static const char * const sun7i_board_dt_compat[] = { 48static const char * const sun7i_board_dt_compat[] = {
@@ -158,7 +51,5 @@ static const char * const sun7i_board_dt_compat[] = {
158}; 51};
159 52
160DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family") 53DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family")
161 .init_machine = sunxi_dt_init,
162 .dt_compat = sun7i_board_dt_compat, 54 .dt_compat = sun7i_board_dt_compat,
163 .restart = sun4i_restart,
164MACHINE_END 55MACHINE_END
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 55b305d51669..e16999e5b735 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -7,7 +7,6 @@ config ARCH_TEGRA
7 select CLKSRC_MMIO 7 select CLKSRC_MMIO
8 select HAVE_ARM_SCU if SMP 8 select HAVE_ARM_SCU if SMP
9 select HAVE_ARM_TWD if SMP 9 select HAVE_ARM_TWD if SMP
10 select MIGHT_HAVE_PCI
11 select PINCTRL 10 select PINCTRL
12 select ARCH_HAS_RESET_CONTROLLER 11 select ARCH_HAS_RESET_CONTROLLER
13 select RESET_CONTROLLER 12 select RESET_CONTROLLER
diff --git a/arch/arm/mach-tegra/pm.h b/arch/arm/mach-tegra/pm.h
index 6e92a7c2ecbd..f4a89698e5b0 100644
--- a/arch/arm/mach-tegra/pm.h
+++ b/arch/arm/mach-tegra/pm.h
@@ -35,8 +35,6 @@ void tegra20_sleep_core_init(void);
35void tegra30_lp1_iram_hook(void); 35void tegra30_lp1_iram_hook(void);
36void tegra30_sleep_core_init(void); 36void tegra30_sleep_core_init(void);
37 37
38extern unsigned long l2x0_saved_regs_addr;
39
40void tegra_clear_cpu_in_lp2(void); 38void tegra_clear_cpu_in_lp2(void);
41bool tegra_set_cpu_in_lp2(void); 39bool tegra_set_cpu_in_lp2(void);
42 40
diff --git a/arch/arm/mach-tegra/pmc.c b/arch/arm/mach-tegra/pmc.c
index fb7920201ab4..7c7123e7557b 100644
--- a/arch/arm/mach-tegra/pmc.c
+++ b/arch/arm/mach-tegra/pmc.c
@@ -41,6 +41,14 @@
41#define PMC_REMOVE_CLAMPING 0x34 41#define PMC_REMOVE_CLAMPING 0x34
42#define PMC_PWRGATE_STATUS 0x38 42#define PMC_PWRGATE_STATUS 0x38
43 43
44#define PMC_SCRATCH0 0x50
45#define PMC_SCRATCH0_MODE_RECOVERY (1 << 31)
46#define PMC_SCRATCH0_MODE_BOOTLOADER (1 << 30)
47#define PMC_SCRATCH0_MODE_RCM (1 << 1)
48#define PMC_SCRATCH0_MODE_MASK (PMC_SCRATCH0_MODE_RECOVERY | \
49 PMC_SCRATCH0_MODE_BOOTLOADER | \
50 PMC_SCRATCH0_MODE_RCM)
51
44#define PMC_CPUPWRGOOD_TIMER 0xc8 52#define PMC_CPUPWRGOOD_TIMER 0xc8
45#define PMC_CPUPWROFF_TIMER 0xcc 53#define PMC_CPUPWROFF_TIMER 0xcc
46 54
@@ -165,6 +173,22 @@ void tegra_pmc_restart(enum reboot_mode mode, const char *cmd)
165{ 173{
166 u32 val; 174 u32 val;
167 175
176 val = tegra_pmc_readl(PMC_SCRATCH0);
177 val &= ~PMC_SCRATCH0_MODE_MASK;
178
179 if (cmd) {
180 if (strcmp(cmd, "recovery") == 0)
181 val |= PMC_SCRATCH0_MODE_RECOVERY;
182
183 if (strcmp(cmd, "bootloader") == 0)
184 val |= PMC_SCRATCH0_MODE_BOOTLOADER;
185
186 if (strcmp(cmd, "forced-recovery") == 0)
187 val |= PMC_SCRATCH0_MODE_RCM;
188 }
189
190 tegra_pmc_writel(val, PMC_SCRATCH0);
191
168 val = tegra_pmc_readl(0); 192 val = tegra_pmc_readl(0);
169 val |= 0x10; 193 val |= 0x10;
170 tegra_pmc_writel(val, 0); 194 tegra_pmc_writel(val, 0);
diff --git a/arch/arm/mach-tegra/reset-handler.S b/arch/arm/mach-tegra/reset-handler.S
index 8c1ba4fea384..578d4d1ad648 100644
--- a/arch/arm/mach-tegra/reset-handler.S
+++ b/arch/arm/mach-tegra/reset-handler.S
@@ -19,7 +19,6 @@
19 19
20#include <asm/cache.h> 20#include <asm/cache.h>
21#include <asm/asm-offsets.h> 21#include <asm/asm-offsets.h>
22#include <asm/hardware/cache-l2x0.h>
23 22
24#include "flowctrl.h" 23#include "flowctrl.h"
25#include "fuse.h" 24#include "fuse.h"
@@ -78,8 +77,10 @@ ENTRY(tegra_resume)
78 str r1, [r0] 77 str r1, [r0]
79#endif 78#endif
80 79
80#ifdef CONFIG_CACHE_L2X0
81 /* L2 cache resume & re-enable */ 81 /* L2 cache resume & re-enable */
82 l2_cache_resume r0, r1, r2, l2x0_saved_regs_addr 82 bl l2c310_early_resume
83#endif
83end_ca9_scu_l2_resume: 84end_ca9_scu_l2_resume:
84 mov32 r9, 0xc0f 85 mov32 r9, 0xc0f
85 cmp r8, r9 86 cmp r8, r9
@@ -89,12 +90,6 @@ end_ca9_scu_l2_resume:
89ENDPROC(tegra_resume) 90ENDPROC(tegra_resume)
90#endif 91#endif
91 92
92#ifdef CONFIG_CACHE_L2X0
93 .globl l2x0_saved_regs_addr
94l2x0_saved_regs_addr:
95 .long 0
96#endif
97
98 .align L1_CACHE_SHIFT 93 .align L1_CACHE_SHIFT
99ENTRY(__tegra_cpu_reset_handler_start) 94ENTRY(__tegra_cpu_reset_handler_start)
100 95
diff --git a/arch/arm/mach-tegra/sleep.h b/arch/arm/mach-tegra/sleep.h
index a4edbb3abd3d..339fe42cd6fb 100644
--- a/arch/arm/mach-tegra/sleep.h
+++ b/arch/arm/mach-tegra/sleep.h
@@ -120,37 +120,6 @@
120 mov \tmp1, \tmp1, lsr #8 120 mov \tmp1, \tmp1, lsr #8
121.endm 121.endm
122 122
123/* Macro to resume & re-enable L2 cache */
124#ifndef L2X0_CTRL_EN
125#define L2X0_CTRL_EN 1
126#endif
127
128#ifdef CONFIG_CACHE_L2X0
129.macro l2_cache_resume, tmp1, tmp2, tmp3, phys_l2x0_saved_regs
130 W(adr) \tmp1, \phys_l2x0_saved_regs
131 ldr \tmp1, [\tmp1]
132 ldr \tmp2, [\tmp1, #L2X0_R_PHY_BASE]
133 ldr \tmp3, [\tmp2, #L2X0_CTRL]
134 tst \tmp3, #L2X0_CTRL_EN
135 bne exit_l2_resume
136 ldr \tmp3, [\tmp1, #L2X0_R_TAG_LATENCY]
137 str \tmp3, [\tmp2, #L2X0_TAG_LATENCY_CTRL]
138 ldr \tmp3, [\tmp1, #L2X0_R_DATA_LATENCY]
139 str \tmp3, [\tmp2, #L2X0_DATA_LATENCY_CTRL]
140 ldr \tmp3, [\tmp1, #L2X0_R_PREFETCH_CTRL]
141 str \tmp3, [\tmp2, #L2X0_PREFETCH_CTRL]
142 ldr \tmp3, [\tmp1, #L2X0_R_PWR_CTRL]
143 str \tmp3, [\tmp2, #L2X0_POWER_CTRL]
144 ldr \tmp3, [\tmp1, #L2X0_R_AUX_CTRL]
145 str \tmp3, [\tmp2, #L2X0_AUX_CTRL]
146 mov \tmp3, #L2X0_CTRL_EN
147 str \tmp3, [\tmp2, #L2X0_CTRL]
148exit_l2_resume:
149.endm
150#else /* CONFIG_CACHE_L2X0 */
151.macro l2_cache_resume, tmp1, tmp2, tmp3, phys_l2x0_saved_regs
152.endm
153#endif /* CONFIG_CACHE_L2X0 */
154#else 123#else
155void tegra_pen_lock(void); 124void tegra_pen_lock(void);
156void tegra_pen_unlock(void); 125void tegra_pen_unlock(void);
diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c
index 6191603379e1..15ac9fcc96b1 100644
--- a/arch/arm/mach-tegra/tegra.c
+++ b/arch/arm/mach-tegra/tegra.c
@@ -70,40 +70,12 @@ u32 tegra_uart_config[3] = {
70 0, 70 0,
71}; 71};
72 72
73static void __init tegra_init_cache(void)
74{
75#ifdef CONFIG_CACHE_L2X0
76 static const struct of_device_id pl310_ids[] __initconst = {
77 { .compatible = "arm,pl310-cache", },
78 {}
79 };
80
81 struct device_node *np;
82 int ret;
83 void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000;
84 u32 aux_ctrl, cache_type;
85
86 np = of_find_matching_node(NULL, pl310_ids);
87 if (!np)
88 return;
89
90 cache_type = readl(p + L2X0_CACHE_TYPE);
91 aux_ctrl = (cache_type & 0x700) << (17-8);
92 aux_ctrl |= 0x7C400001;
93
94 ret = l2x0_of_init(aux_ctrl, 0x8200c3fe);
95 if (!ret)
96 l2x0_saved_regs_addr = virt_to_phys(&l2x0_saved_regs);
97#endif
98}
99
100static void __init tegra_init_early(void) 73static void __init tegra_init_early(void)
101{ 74{
102 of_register_trusted_foundations(); 75 of_register_trusted_foundations();
103 tegra_apb_io_init(); 76 tegra_apb_io_init();
104 tegra_init_fuse(); 77 tegra_init_fuse();
105 tegra_cpu_reset_handler_init(); 78 tegra_cpu_reset_handler_init();
106 tegra_init_cache();
107 tegra_powergate_init(); 79 tegra_powergate_init();
108 tegra_hotplug_init(); 80 tegra_hotplug_init();
109} 81}
@@ -191,8 +163,10 @@ static const char * const tegra_dt_board_compat[] = {
191}; 163};
192 164
193DT_MACHINE_START(TEGRA_DT, "NVIDIA Tegra SoC (Flattened Device Tree)") 165DT_MACHINE_START(TEGRA_DT, "NVIDIA Tegra SoC (Flattened Device Tree)")
194 .map_io = tegra_map_common_io, 166 .l2c_aux_val = 0x3c400001,
167 .l2c_aux_mask = 0xc20fc3fe,
195 .smp = smp_ops(tegra_smp_ops), 168 .smp = smp_ops(tegra_smp_ops),
169 .map_io = tegra_map_common_io,
196 .init_early = tegra_init_early, 170 .init_early = tegra_init_early,
197 .init_irq = tegra_dt_init_irq, 171 .init_irq = tegra_dt_init_irq,
198 .init_machine = tegra_dt_init, 172 .init_machine = tegra_dt_init,
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile
index de544aabf292..9741de956b3e 100644
--- a/arch/arm/mach-ux500/Makefile
+++ b/arch/arm/mach-ux500/Makefile
@@ -5,8 +5,7 @@
5obj-y := cpu.o id.o timer.o pm.o 5obj-y := cpu.o id.o timer.o pm.o
6obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o 6obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
7obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o 7obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o
8obj-$(CONFIG_MACH_MOP500) += board-mop500-sdi.o \ 8obj-$(CONFIG_MACH_MOP500) += board-mop500-regulators.o \
9 board-mop500-regulators.o \
10 board-mop500-audio.o 9 board-mop500-audio.o
11obj-$(CONFIG_SMP) += platsmp.o headsmp.o 10obj-$(CONFIG_SMP) += platsmp.o headsmp.o
12obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o 11obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c
deleted file mode 100644
index fcbf3a13a539..000000000000
--- a/arch/arm/mach-ux500/board-mop500-sdi.c
+++ /dev/null
@@ -1,166 +0,0 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * Author: Hanumath Prasad <hanumath.prasad@stericsson.com>
5 * License terms: GNU General Public License (GPL) version 2
6 */
7
8#include <linux/kernel.h>
9#include <linux/gpio.h>
10#include <linux/amba/bus.h>
11#include <linux/amba/mmci.h>
12#include <linux/mmc/host.h>
13#include <linux/platform_device.h>
14#include <linux/platform_data/dma-ste-dma40.h>
15
16#include <asm/mach-types.h>
17
18#include "db8500-regs.h"
19#include "board-mop500.h"
20#include "ste-dma40-db8500.h"
21
22/*
23 * v2 has a new version of this block that need to be forced, the number found
24 * in hardware is incorrect
25 */
26#define U8500_SDI_V2_PERIPHID 0x10480180
27
28/*
29 * SDI 0 (MicroSD slot)
30 */
31
32#ifdef CONFIG_STE_DMA40
33struct stedma40_chan_cfg mop500_sdi0_dma_cfg_rx = {
34 .mode = STEDMA40_MODE_LOGICAL,
35 .dir = DMA_DEV_TO_MEM,
36 .dev_type = DB8500_DMA_DEV29_SD_MM0,
37};
38
39static struct stedma40_chan_cfg mop500_sdi0_dma_cfg_tx = {
40 .mode = STEDMA40_MODE_LOGICAL,
41 .dir = DMA_MEM_TO_DEV,
42 .dev_type = DB8500_DMA_DEV29_SD_MM0,
43};
44#endif
45
46struct mmci_platform_data mop500_sdi0_data = {
47 .f_max = 100000000,
48 .capabilities = MMC_CAP_4_BIT_DATA |
49 MMC_CAP_SD_HIGHSPEED |
50 MMC_CAP_MMC_HIGHSPEED |
51 MMC_CAP_ERASE |
52 MMC_CAP_UHS_SDR12 |
53 MMC_CAP_UHS_SDR25,
54 .gpio_wp = -1,
55 .sigdir = MCI_ST_FBCLKEN |
56 MCI_ST_CMDDIREN |
57 MCI_ST_DATA0DIREN |
58 MCI_ST_DATA2DIREN,
59#ifdef CONFIG_STE_DMA40
60 .dma_filter = stedma40_filter,
61 .dma_rx_param = &mop500_sdi0_dma_cfg_rx,
62 .dma_tx_param = &mop500_sdi0_dma_cfg_tx,
63#endif
64};
65
66/*
67 * SDI1 (SDIO WLAN)
68 */
69#ifdef CONFIG_STE_DMA40
70static struct stedma40_chan_cfg sdi1_dma_cfg_rx = {
71 .mode = STEDMA40_MODE_LOGICAL,
72 .dir = DMA_DEV_TO_MEM,
73 .dev_type = DB8500_DMA_DEV32_SD_MM1,
74};
75
76static struct stedma40_chan_cfg sdi1_dma_cfg_tx = {
77 .mode = STEDMA40_MODE_LOGICAL,
78 .dir = DMA_MEM_TO_DEV,
79 .dev_type = DB8500_DMA_DEV32_SD_MM1,
80};
81#endif
82
83struct mmci_platform_data mop500_sdi1_data = {
84 .ocr_mask = MMC_VDD_29_30,
85 .f_max = 100000000,
86 .capabilities = MMC_CAP_4_BIT_DATA |
87 MMC_CAP_NONREMOVABLE,
88 .gpio_cd = -1,
89 .gpio_wp = -1,
90#ifdef CONFIG_STE_DMA40
91 .dma_filter = stedma40_filter,
92 .dma_rx_param = &sdi1_dma_cfg_rx,
93 .dma_tx_param = &sdi1_dma_cfg_tx,
94#endif
95};
96
97/*
98 * SDI 2 (POP eMMC, not on DB8500ed)
99 */
100
101#ifdef CONFIG_STE_DMA40
102struct stedma40_chan_cfg mop500_sdi2_dma_cfg_rx = {
103 .mode = STEDMA40_MODE_LOGICAL,
104 .dir = DMA_DEV_TO_MEM,
105 .dev_type = DB8500_DMA_DEV28_SD_MM2,
106};
107
108static struct stedma40_chan_cfg mop500_sdi2_dma_cfg_tx = {
109 .mode = STEDMA40_MODE_LOGICAL,
110 .dir = DMA_MEM_TO_DEV,
111 .dev_type = DB8500_DMA_DEV28_SD_MM2,
112};
113#endif
114
115struct mmci_platform_data mop500_sdi2_data = {
116 .ocr_mask = MMC_VDD_165_195,
117 .f_max = 100000000,
118 .capabilities = MMC_CAP_4_BIT_DATA |
119 MMC_CAP_8_BIT_DATA |
120 MMC_CAP_NONREMOVABLE |
121 MMC_CAP_MMC_HIGHSPEED |
122 MMC_CAP_ERASE |
123 MMC_CAP_CMD23,
124 .gpio_cd = -1,
125 .gpio_wp = -1,
126#ifdef CONFIG_STE_DMA40
127 .dma_filter = stedma40_filter,
128 .dma_rx_param = &mop500_sdi2_dma_cfg_rx,
129 .dma_tx_param = &mop500_sdi2_dma_cfg_tx,
130#endif
131};
132
133/*
134 * SDI 4 (on-board eMMC)
135 */
136
137#ifdef CONFIG_STE_DMA40
138struct stedma40_chan_cfg mop500_sdi4_dma_cfg_rx = {
139 .mode = STEDMA40_MODE_LOGICAL,
140 .dir = DMA_DEV_TO_MEM,
141 .dev_type = DB8500_DMA_DEV42_SD_MM4,
142};
143
144static struct stedma40_chan_cfg mop500_sdi4_dma_cfg_tx = {
145 .mode = STEDMA40_MODE_LOGICAL,
146 .dir = DMA_MEM_TO_DEV,
147 .dev_type = DB8500_DMA_DEV42_SD_MM4,
148};
149#endif
150
151struct mmci_platform_data mop500_sdi4_data = {
152 .f_max = 100000000,
153 .capabilities = MMC_CAP_4_BIT_DATA |
154 MMC_CAP_8_BIT_DATA |
155 MMC_CAP_NONREMOVABLE |
156 MMC_CAP_MMC_HIGHSPEED |
157 MMC_CAP_ERASE |
158 MMC_CAP_CMD23,
159 .gpio_cd = -1,
160 .gpio_wp = -1,
161#ifdef CONFIG_STE_DMA40
162 .dma_filter = stedma40_filter,
163 .dma_rx_param = &mop500_sdi4_dma_cfg_rx,
164 .dma_tx_param = &mop500_sdi4_dma_cfg_tx,
165#endif
166};
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h
index 32cc0d8d8a0e..7c7b0adca582 100644
--- a/arch/arm/mach-ux500/board-mop500.h
+++ b/arch/arm/mach-ux500/board-mop500.h
@@ -8,12 +8,7 @@
8#define __BOARD_MOP500_H 8#define __BOARD_MOP500_H
9 9
10#include <linux/platform_data/asoc-ux500-msp.h> 10#include <linux/platform_data/asoc-ux500-msp.h>
11#include <linux/amba/mmci.h>
12 11
13extern struct mmci_platform_data mop500_sdi0_data;
14extern struct mmci_platform_data mop500_sdi1_data;
15extern struct mmci_platform_data mop500_sdi2_data;
16extern struct mmci_platform_data mop500_sdi4_data;
17extern struct msp_i2s_platform_data msp0_platform_data; 12extern struct msp_i2s_platform_data msp0_platform_data;
18extern struct msp_i2s_platform_data msp1_platform_data; 13extern struct msp_i2s_platform_data msp1_platform_data;
19extern struct msp_i2s_platform_data msp2_platform_data; 14extern struct msp_i2s_platform_data msp2_platform_data;
diff --git a/arch/arm/mach-ux500/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c
index 264f894c0e3d..842ebedbdd1c 100644
--- a/arch/arm/mach-ux500/cache-l2x0.c
+++ b/arch/arm/mach-ux500/cache-l2x0.c
@@ -35,10 +35,16 @@ static int __init ux500_l2x0_unlock(void)
35 return 0; 35 return 0;
36} 36}
37 37
38static int __init ux500_l2x0_init(void) 38static void ux500_l2c310_write_sec(unsigned long val, unsigned reg)
39{ 39{
40 u32 aux_val = 0x3e000000; 40 /*
41 * We can't write to secure registers as we are in non-secure
42 * mode, until we have some SMI service available.
43 */
44}
41 45
46static int __init ux500_l2x0_init(void)
47{
42 if (cpu_is_u8500_family() || cpu_is_ux540_family()) 48 if (cpu_is_u8500_family() || cpu_is_ux540_family())
43 l2x0_base = __io_address(U8500_L2CC_BASE); 49 l2x0_base = __io_address(U8500_L2CC_BASE);
44 else 50 else
@@ -48,28 +54,12 @@ static int __init ux500_l2x0_init(void)
48 /* Unlock before init */ 54 /* Unlock before init */
49 ux500_l2x0_unlock(); 55 ux500_l2x0_unlock();
50 56
51 /* DBx540's L2 has 128KB way size */ 57 outer_cache.write_sec = ux500_l2c310_write_sec;
52 if (cpu_is_ux540_family())
53 /* 128KB way size */
54 aux_val |= (0x4 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT);
55 else
56 /* 64KB way size */
57 aux_val |= (0x3 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT);
58 58
59 /* 64KB way size, 8 way associativity, force WA */
60 if (of_have_populated_dt()) 59 if (of_have_populated_dt())
61 l2x0_of_init(aux_val, 0xc0000fff); 60 l2x0_of_init(0, ~0);
62 else 61 else
63 l2x0_init(l2x0_base, aux_val, 0xc0000fff); 62 l2x0_init(l2x0_base, 0, ~0);
64
65 /*
66 * We can't disable l2 as we are in non secure mode, currently
67 * this seems be called only during kexec path. So let's
68 * override outer.disable with nasty assignment until we have
69 * some SMI service available.
70 */
71 outer_cache.disable = NULL;
72 outer_cache.set_debug = NULL;
73 63
74 return 0; 64 return 0;
75} 65}
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index 8820f602fcd2..fa308f07fae5 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -146,10 +146,6 @@ static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
146 /* Requires call-back bindings. */ 146 /* Requires call-back bindings. */
147 OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata), 147 OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata),
148 /* Requires DMA bindings. */ 148 /* Requires DMA bindings. */
149 OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0", &mop500_sdi0_data),
150 OF_DEV_AUXDATA("arm,pl18x", 0x80118000, "sdi1", &mop500_sdi1_data),
151 OF_DEV_AUXDATA("arm,pl18x", 0x80005000, "sdi2", &mop500_sdi2_data),
152 OF_DEV_AUXDATA("arm,pl18x", 0x80114000, "sdi4", &mop500_sdi4_data),
153 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000, 149 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000,
154 "ux500-msp-i2s.0", &msp0_platform_data), 150 "ux500-msp-i2s.0", &msp0_platform_data),
155 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80124000, 151 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80124000,
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index f2c89fb8fca9..be83ba25f81b 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -310,6 +310,21 @@ static struct platform_device char_lcd_device = {
310 .resource = char_lcd_resources, 310 .resource = char_lcd_resources,
311}; 311};
312 312
313static struct resource leds_resources[] = {
314 {
315 .start = VERSATILE_SYS_BASE + VERSATILE_SYS_LED_OFFSET,
316 .end = VERSATILE_SYS_BASE + VERSATILE_SYS_LED_OFFSET + 4,
317 .flags = IORESOURCE_MEM,
318 },
319};
320
321static struct platform_device leds_device = {
322 .name = "versatile-leds",
323 .id = -1,
324 .num_resources = ARRAY_SIZE(leds_resources),
325 .resource = leds_resources,
326};
327
313/* 328/*
314 * Clock handling 329 * Clock handling
315 */ 330 */
@@ -795,6 +810,7 @@ void __init versatile_init(void)
795 platform_device_register(&versatile_i2c_device); 810 platform_device_register(&versatile_i2c_device);
796 platform_device_register(&smc91x_device); 811 platform_device_register(&smc91x_device);
797 platform_device_register(&char_lcd_device); 812 platform_device_register(&char_lcd_device);
813 platform_device_register(&leds_device);
798 814
799 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { 815 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
800 struct amba_device *d = amba_devs[i]; 816 struct amba_device *d = amba_devs[i];
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
index 657d52d0391f..90249cfc37b3 100644
--- a/arch/arm/mach-vexpress/Kconfig
+++ b/arch/arm/mach-vexpress/Kconfig
@@ -4,6 +4,7 @@ config ARCH_VEXPRESS
4 select ARCH_SUPPORTS_BIG_ENDIAN 4 select ARCH_SUPPORTS_BIG_ENDIAN
5 select ARM_AMBA 5 select ARM_AMBA
6 select ARM_GIC 6 select ARM_GIC
7 select ARM_GLOBAL_TIMER
7 select ARM_TIMER_SP804 8 select ARM_TIMER_SP804
8 select COMMON_CLK_VERSATILE 9 select COMMON_CLK_VERSATILE
9 select HAVE_ARM_SCU if SMP 10 select HAVE_ARM_SCU if SMP
@@ -18,6 +19,8 @@ config ARCH_VEXPRESS
18 select POWER_SUPPLY 19 select POWER_SUPPLY
19 select REGULATOR_FIXED_VOLTAGE if REGULATOR 20 select REGULATOR_FIXED_VOLTAGE if REGULATOR
20 select VEXPRESS_CONFIG 21 select VEXPRESS_CONFIG
22 select VEXPRESS_SYSCFG
23 select MFD_VEXPRESS_SYSREG
21 help 24 help
22 This option enables support for systems using Cortex processor based 25 This option enables support for systems using Cortex processor based
23 ARM core and logic (FPGA) tiles on the Versatile Express motherboard, 26 ARM core and logic (FPGA) tiles on the Versatile Express motherboard,
diff --git a/arch/arm/mach-vexpress/core.h b/arch/arm/mach-vexpress/core.h
index bde4374ab6d5..152fad91b3ae 100644
--- a/arch/arm/mach-vexpress/core.h
+++ b/arch/arm/mach-vexpress/core.h
@@ -4,10 +4,9 @@
4/* Tile's peripherals static mappings should start here */ 4/* Tile's peripherals static mappings should start here */
5#define V2T_PERIPH 0xf8200000 5#define V2T_PERIPH 0xf8200000
6 6
7void vexpress_dt_smp_map_io(void);
8
9bool vexpress_smp_init_ops(void); 7bool vexpress_smp_init_ops(void);
10 8
11extern struct smp_operations vexpress_smp_ops; 9extern struct smp_operations vexpress_smp_ops;
10extern struct smp_operations vexpress_smp_dt_ops;
12 11
13extern void vexpress_cpu_die(unsigned int cpu); 12extern void vexpress_cpu_die(unsigned int cpu);
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c
index 6f34497a4245..86150d7a2e7d 100644
--- a/arch/arm/mach-vexpress/ct-ca9x4.c
+++ b/arch/arm/mach-vexpress/ct-ca9x4.c
@@ -45,6 +45,23 @@ static void __init ct_ca9x4_map_io(void)
45 iotable_init(ct_ca9x4_io_desc, ARRAY_SIZE(ct_ca9x4_io_desc)); 45 iotable_init(ct_ca9x4_io_desc, ARRAY_SIZE(ct_ca9x4_io_desc));
46} 46}
47 47
48static void __init ca9x4_l2_init(void)
49{
50#ifdef CONFIG_CACHE_L2X0
51 void __iomem *l2x0_base = ioremap(CT_CA9X4_L2CC, SZ_4K);
52
53 if (l2x0_base) {
54 /* set RAM latencies to 1 cycle for this core tile. */
55 writel(0, l2x0_base + L310_TAG_LATENCY_CTRL);
56 writel(0, l2x0_base + L310_DATA_LATENCY_CTRL);
57
58 l2x0_init(l2x0_base, 0x00400000, 0xfe0fffff);
59 } else {
60 pr_err("L2C: unable to map L2 cache controller\n");
61 }
62#endif
63}
64
48#ifdef CONFIG_HAVE_ARM_TWD 65#ifdef CONFIG_HAVE_ARM_TWD
49static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, A9_MPCORE_TWD, IRQ_LOCALTIMER); 66static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, A9_MPCORE_TWD, IRQ_LOCALTIMER);
50 67
@@ -63,6 +80,7 @@ static void __init ct_ca9x4_init_irq(void)
63 gic_init(0, 29, ioremap(A9_MPCORE_GIC_DIST, SZ_4K), 80 gic_init(0, 29, ioremap(A9_MPCORE_GIC_DIST, SZ_4K),
64 ioremap(A9_MPCORE_GIC_CPU, SZ_256)); 81 ioremap(A9_MPCORE_GIC_CPU, SZ_256));
65 ca9x4_twd_init(); 82 ca9x4_twd_init();
83 ca9x4_l2_init();
66} 84}
67 85
68static int ct_ca9x4_clcd_setup(struct clcd_fb *fb) 86static int ct_ca9x4_clcd_setup(struct clcd_fb *fb)
@@ -128,6 +146,10 @@ static struct platform_device pmu_device = {
128 .resource = pmu_resources, 146 .resource = pmu_resources,
129}; 147};
130 148
149static struct clk_lookup osc1_lookup = {
150 .dev_id = "ct:clcd",
151};
152
131static struct platform_device osc1_device = { 153static struct platform_device osc1_device = {
132 .name = "vexpress-osc", 154 .name = "vexpress-osc",
133 .id = 1, 155 .id = 1,
@@ -135,30 +157,18 @@ static struct platform_device osc1_device = {
135 .resource = (struct resource []) { 157 .resource = (struct resource []) {
136 VEXPRESS_RES_FUNC(0xf, 1), 158 VEXPRESS_RES_FUNC(0xf, 1),
137 }, 159 },
160 .dev.platform_data = &osc1_lookup,
138}; 161};
139 162
140static void __init ct_ca9x4_init(void) 163static void __init ct_ca9x4_init(void)
141{ 164{
142 int i; 165 int i;
143 166
144#ifdef CONFIG_CACHE_L2X0
145 void __iomem *l2x0_base = ioremap(CT_CA9X4_L2CC, SZ_4K);
146
147 /* set RAM latencies to 1 cycle for this core tile. */
148 writel(0, l2x0_base + L2X0_TAG_LATENCY_CTRL);
149 writel(0, l2x0_base + L2X0_DATA_LATENCY_CTRL);
150
151 l2x0_init(l2x0_base, 0x00400000, 0xfe0fffff);
152#endif
153
154 for (i = 0; i < ARRAY_SIZE(ct_ca9x4_amba_devs); i++) 167 for (i = 0; i < ARRAY_SIZE(ct_ca9x4_amba_devs); i++)
155 amba_device_register(ct_ca9x4_amba_devs[i], &iomem_resource); 168 amba_device_register(ct_ca9x4_amba_devs[i], &iomem_resource);
156 169
157 platform_device_register(&pmu_device); 170 platform_device_register(&pmu_device);
158 platform_device_register(&osc1_device); 171 vexpress_syscfg_device_register(&osc1_device);
159
160 WARN_ON(clk_register_clkdev(vexpress_osc_setup(&osc1_device.dev),
161 NULL, "ct:clcd"));
162} 172}
163 173
164#ifdef CONFIG_SMP 174#ifdef CONFIG_SMP
diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-vexpress/platsmp.c
index 993c9ae5dc5e..a1f3804fd5a5 100644
--- a/arch/arm/mach-vexpress/platsmp.c
+++ b/arch/arm/mach-vexpress/platsmp.c
@@ -12,8 +12,7 @@
12#include <linux/errno.h> 12#include <linux/errno.h>
13#include <linux/smp.h> 13#include <linux/smp.h>
14#include <linux/io.h> 14#include <linux/io.h>
15#include <linux/of.h> 15#include <linux/of_address.h>
16#include <linux/of_fdt.h>
17#include <linux/vexpress.h> 16#include <linux/vexpress.h>
18 17
19#include <asm/mcpm.h> 18#include <asm/mcpm.h>
@@ -26,154 +25,13 @@
26 25
27#include "core.h" 26#include "core.h"
28 27
29#if defined(CONFIG_OF)
30
31static enum {
32 GENERIC_SCU,
33 CORTEX_A9_SCU,
34} vexpress_dt_scu __initdata = GENERIC_SCU;
35
36static struct map_desc vexpress_dt_cortex_a9_scu_map __initdata = {
37 .virtual = V2T_PERIPH,
38 /* .pfn set in vexpress_dt_init_cortex_a9_scu() */
39 .length = SZ_128,
40 .type = MT_DEVICE,
41};
42
43static void *vexpress_dt_cortex_a9_scu_base __initdata;
44
45const static char *vexpress_dt_cortex_a9_match[] __initconst = {
46 "arm,cortex-a5-scu",
47 "arm,cortex-a9-scu",
48 NULL
49};
50
51static int __init vexpress_dt_find_scu(unsigned long node,
52 const char *uname, int depth, void *data)
53{
54 if (of_flat_dt_match(node, vexpress_dt_cortex_a9_match)) {
55 phys_addr_t phys_addr;
56 __be32 *reg = of_get_flat_dt_prop(node, "reg", NULL);
57
58 if (WARN_ON(!reg))
59 return -EINVAL;
60
61 phys_addr = be32_to_cpup(reg);
62 vexpress_dt_scu = CORTEX_A9_SCU;
63
64 vexpress_dt_cortex_a9_scu_map.pfn = __phys_to_pfn(phys_addr);
65 iotable_init(&vexpress_dt_cortex_a9_scu_map, 1);
66 vexpress_dt_cortex_a9_scu_base = ioremap(phys_addr, SZ_256);
67 if (WARN_ON(!vexpress_dt_cortex_a9_scu_base))
68 return -EFAULT;
69 }
70
71 return 0;
72}
73
74void __init vexpress_dt_smp_map_io(void)
75{
76 if (initial_boot_params)
77 WARN_ON(of_scan_flat_dt(vexpress_dt_find_scu, NULL));
78}
79
80static int __init vexpress_dt_cpus_num(unsigned long node, const char *uname,
81 int depth, void *data)
82{
83 static int prev_depth = -1;
84 static int nr_cpus = -1;
85
86 if (prev_depth > depth && nr_cpus > 0)
87 return nr_cpus;
88
89 if (nr_cpus < 0 && strcmp(uname, "cpus") == 0)
90 nr_cpus = 0;
91
92 if (nr_cpus >= 0) {
93 const char *device_type = of_get_flat_dt_prop(node,
94 "device_type", NULL);
95
96 if (device_type && strcmp(device_type, "cpu") == 0)
97 nr_cpus++;
98 }
99
100 prev_depth = depth;
101
102 return 0;
103}
104
105static void __init vexpress_dt_smp_init_cpus(void)
106{
107 int ncores = 0, i;
108
109 switch (vexpress_dt_scu) {
110 case GENERIC_SCU:
111 ncores = of_scan_flat_dt(vexpress_dt_cpus_num, NULL);
112 break;
113 case CORTEX_A9_SCU:
114 ncores = scu_get_core_count(vexpress_dt_cortex_a9_scu_base);
115 break;
116 default:
117 WARN_ON(1);
118 break;
119 }
120
121 if (ncores < 2)
122 return;
123
124 if (ncores > nr_cpu_ids) {
125 pr_warn("SMP: %u cores greater than maximum (%u), clipping\n",
126 ncores, nr_cpu_ids);
127 ncores = nr_cpu_ids;
128 }
129
130 for (i = 0; i < ncores; ++i)
131 set_cpu_possible(i, true);
132}
133
134static void __init vexpress_dt_smp_prepare_cpus(unsigned int max_cpus)
135{
136 int i;
137
138 switch (vexpress_dt_scu) {
139 case GENERIC_SCU:
140 for (i = 0; i < max_cpus; i++)
141 set_cpu_present(i, true);
142 break;
143 case CORTEX_A9_SCU:
144 scu_enable(vexpress_dt_cortex_a9_scu_base);
145 break;
146 default:
147 WARN_ON(1);
148 break;
149 }
150}
151
152#else
153
154static void __init vexpress_dt_smp_init_cpus(void)
155{
156 WARN_ON(1);
157}
158
159void __init vexpress_dt_smp_prepare_cpus(unsigned int max_cpus)
160{
161 WARN_ON(1);
162}
163
164#endif
165
166/* 28/*
167 * Initialise the CPU possible map early - this describes the CPUs 29 * Initialise the CPU possible map early - this describes the CPUs
168 * which may be present or become present in the system. 30 * which may be present or become present in the system.
169 */ 31 */
170static void __init vexpress_smp_init_cpus(void) 32static void __init vexpress_smp_init_cpus(void)
171{ 33{
172 if (ct_desc) 34 ct_desc->init_cpu_map();
173 ct_desc->init_cpu_map();
174 else
175 vexpress_dt_smp_init_cpus();
176
177} 35}
178 36
179static void __init vexpress_smp_prepare_cpus(unsigned int max_cpus) 37static void __init vexpress_smp_prepare_cpus(unsigned int max_cpus)
@@ -182,10 +40,7 @@ static void __init vexpress_smp_prepare_cpus(unsigned int max_cpus)
182 * Initialise the present map, which describes the set of CPUs 40 * Initialise the present map, which describes the set of CPUs
183 * actually populated at the present time. 41 * actually populated at the present time.
184 */ 42 */
185 if (ct_desc) 43 ct_desc->smp_enable(max_cpus);
186 ct_desc->smp_enable(max_cpus);
187 else
188 vexpress_dt_smp_prepare_cpus(max_cpus);
189 44
190 /* 45 /*
191 * Write the address of secondary startup into the 46 * Write the address of secondary startup into the
@@ -223,3 +78,39 @@ bool __init vexpress_smp_init_ops(void)
223#endif 78#endif
224 return false; 79 return false;
225} 80}
81
82#if defined(CONFIG_OF)
83
84static const struct of_device_id vexpress_smp_dt_scu_match[] __initconst = {
85 { .compatible = "arm,cortex-a5-scu", },
86 { .compatible = "arm,cortex-a9-scu", },
87 {}
88};
89
90static void __init vexpress_smp_dt_prepare_cpus(unsigned int max_cpus)
91{
92 struct device_node *scu = of_find_matching_node(NULL,
93 vexpress_smp_dt_scu_match);
94
95 if (scu)
96 scu_enable(of_iomap(scu, 0));
97
98 /*
99 * Write the address of secondary startup into the
100 * system-wide flags register. The boot monitor waits
101 * until it receives a soft interrupt, and then the
102 * secondary CPU branches to this address.
103 */
104 vexpress_flags_set(virt_to_phys(versatile_secondary_startup));
105}
106
107struct smp_operations __initdata vexpress_smp_dt_ops = {
108 .smp_prepare_cpus = vexpress_smp_dt_prepare_cpus,
109 .smp_secondary_init = versatile_secondary_init,
110 .smp_boot_secondary = versatile_boot_secondary,
111#ifdef CONFIG_HOTPLUG_CPU
112 .cpu_die = vexpress_cpu_die,
113#endif
114};
115
116#endif
diff --git a/arch/arm/mach-vexpress/tc2_pm.c b/arch/arm/mach-vexpress/tc2_pm.c
index 29e7785a54bc..b743a0ae02ce 100644
--- a/arch/arm/mach-vexpress/tc2_pm.c
+++ b/arch/arm/mach-vexpress/tc2_pm.c
@@ -209,7 +209,7 @@ static int tc2_core_in_reset(unsigned int cpu, unsigned int cluster)
209#define POLL_MSEC 10 209#define POLL_MSEC 10
210#define TIMEOUT_MSEC 1000 210#define TIMEOUT_MSEC 1000
211 211
212static int tc2_pm_power_down_finish(unsigned int cpu, unsigned int cluster) 212static int tc2_pm_wait_for_powerdown(unsigned int cpu, unsigned int cluster)
213{ 213{
214 unsigned tries; 214 unsigned tries;
215 215
@@ -290,7 +290,7 @@ static void tc2_pm_powered_up(void)
290static const struct mcpm_platform_ops tc2_pm_power_ops = { 290static const struct mcpm_platform_ops tc2_pm_power_ops = {
291 .power_up = tc2_pm_power_up, 291 .power_up = tc2_pm_power_up,
292 .power_down = tc2_pm_power_down, 292 .power_down = tc2_pm_power_down,
293 .power_down_finish = tc2_pm_power_down_finish, 293 .wait_for_powerdown = tc2_pm_wait_for_powerdown,
294 .suspend = tc2_pm_suspend, 294 .suspend = tc2_pm_suspend,
295 .powered_up = tc2_pm_powered_up, 295 .powered_up = tc2_pm_powered_up,
296}; 296};
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index 4f8b8cb17ff5..6ff681a24ba7 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -201,8 +201,9 @@ static struct platform_device v2m_cf_device = {
201 201
202static struct mmci_platform_data v2m_mmci_data = { 202static struct mmci_platform_data v2m_mmci_data = {
203 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 203 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
204 .gpio_wp = VEXPRESS_GPIO_MMC_WPROT, 204 .status = vexpress_get_mci_cardin,
205 .gpio_cd = VEXPRESS_GPIO_MMC_CARDIN, 205 .gpio_cd = -1,
206 .gpio_wp = -1,
206}; 207};
207 208
208static struct resource v2m_sysreg_resources[] = { 209static struct resource v2m_sysreg_resources[] = {
@@ -340,11 +341,6 @@ static void __init v2m_init(void)
340 regulator_register_fixed(0, v2m_eth_supplies, 341 regulator_register_fixed(0, v2m_eth_supplies,
341 ARRAY_SIZE(v2m_eth_supplies)); 342 ARRAY_SIZE(v2m_eth_supplies));
342 343
343 platform_device_register(&v2m_muxfpga_device);
344 platform_device_register(&v2m_shutdown_device);
345 platform_device_register(&v2m_reboot_device);
346 platform_device_register(&v2m_dvimode_device);
347
348 platform_device_register(&v2m_sysreg_device); 344 platform_device_register(&v2m_sysreg_device);
349 platform_device_register(&v2m_pcie_i2c_device); 345 platform_device_register(&v2m_pcie_i2c_device);
350 platform_device_register(&v2m_ddc_i2c_device); 346 platform_device_register(&v2m_ddc_i2c_device);
@@ -356,6 +352,11 @@ static void __init v2m_init(void)
356 for (i = 0; i < ARRAY_SIZE(v2m_amba_devs); i++) 352 for (i = 0; i < ARRAY_SIZE(v2m_amba_devs); i++)
357 amba_device_register(v2m_amba_devs[i], &iomem_resource); 353 amba_device_register(v2m_amba_devs[i], &iomem_resource);
358 354
355 vexpress_syscfg_device_register(&v2m_muxfpga_device);
356 vexpress_syscfg_device_register(&v2m_shutdown_device);
357 vexpress_syscfg_device_register(&v2m_reboot_device);
358 vexpress_syscfg_device_register(&v2m_dvimode_device);
359
359 ct_desc->init_tile(); 360 ct_desc->init_tile();
360} 361}
361 362
@@ -369,71 +370,9 @@ MACHINE_START(VEXPRESS, "ARM-Versatile Express")
369 .init_machine = v2m_init, 370 .init_machine = v2m_init,
370MACHINE_END 371MACHINE_END
371 372
372static struct map_desc v2m_rs1_io_desc __initdata = {
373 .virtual = V2M_PERIPH,
374 .pfn = __phys_to_pfn(0x1c000000),
375 .length = SZ_2M,
376 .type = MT_DEVICE,
377};
378
379static int __init v2m_dt_scan_memory_map(unsigned long node, const char *uname,
380 int depth, void *data)
381{
382 const char **map = data;
383
384 if (strcmp(uname, "motherboard") != 0)
385 return 0;
386
387 *map = of_get_flat_dt_prop(node, "arm,v2m-memory-map", NULL);
388
389 return 1;
390}
391
392void __init v2m_dt_map_io(void)
393{
394 const char *map = NULL;
395
396 of_scan_flat_dt(v2m_dt_scan_memory_map, &map);
397
398 if (map && strcmp(map, "rs1") == 0)
399 iotable_init(&v2m_rs1_io_desc, 1);
400 else
401 iotable_init(v2m_io_desc, ARRAY_SIZE(v2m_io_desc));
402
403#if defined(CONFIG_SMP)
404 vexpress_dt_smp_map_io();
405#endif
406}
407
408void __init v2m_dt_init_early(void)
409{
410 u32 dt_hbi;
411
412 vexpress_sysreg_of_early_init();
413
414 /* Confirm board type against DT property, if available */
415 if (of_property_read_u32(of_allnodes, "arm,hbi", &dt_hbi) == 0) {
416 u32 hbi = vexpress_get_hbi(VEXPRESS_SITE_MASTER);
417
418 if (WARN_ON(dt_hbi != hbi))
419 pr_warning("vexpress: DT HBI (%x) is not matching "
420 "hardware (%x)!\n", dt_hbi, hbi);
421 }
422
423 versatile_sched_clock_init(vexpress_get_24mhz_clock_base(), 24000000);
424}
425
426static const struct of_device_id v2m_dt_bus_match[] __initconst = {
427 { .compatible = "simple-bus", },
428 { .compatible = "arm,amba-bus", },
429 { .compatible = "arm,vexpress,config-bus", },
430 {}
431};
432
433static void __init v2m_dt_init(void) 373static void __init v2m_dt_init(void)
434{ 374{
435 l2x0_of_init(0x00400000, 0xfe0fffff); 375 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
436 of_platform_populate(NULL, v2m_dt_bus_match, NULL, NULL);
437} 376}
438 377
439static const char * const v2m_dt_match[] __initconst = { 378static const char * const v2m_dt_match[] __initconst = {
@@ -443,9 +382,9 @@ static const char * const v2m_dt_match[] __initconst = {
443 382
444DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express") 383DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express")
445 .dt_compat = v2m_dt_match, 384 .dt_compat = v2m_dt_match,
446 .smp = smp_ops(vexpress_smp_ops), 385 .l2c_aux_val = 0x00400000,
386 .l2c_aux_mask = 0xfe0fffff,
387 .smp = smp_ops(vexpress_smp_dt_ops),
447 .smp_init = smp_init_ops(vexpress_smp_init_ops), 388 .smp_init = smp_init_ops(vexpress_smp_init_ops),
448 .map_io = v2m_dt_map_io,
449 .init_early = v2m_dt_init_early,
450 .init_machine = v2m_dt_init, 389 .init_machine = v2m_dt_init,
451MACHINE_END 390MACHINE_END
diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig
index 58c2b844e0a3..573e0db1d0f0 100644
--- a/arch/arm/mach-zynq/Kconfig
+++ b/arch/arm/mach-zynq/Kconfig
@@ -1,14 +1,16 @@
1config ARCH_ZYNQ 1config ARCH_ZYNQ
2 bool "Xilinx Zynq ARM Cortex A9 Platform" if ARCH_MULTI_V7 2 bool "Xilinx Zynq ARM Cortex A9 Platform" if ARCH_MULTI_V7
3 select ARM_AMBA
4 select ARM_GIC
5 select ARCH_HAS_CPUFREQ 3 select ARCH_HAS_CPUFREQ
6 select ARCH_HAS_OPP 4 select ARCH_HAS_OPP
5 select ARCH_SUPPORTS_BIG_ENDIAN
6 select ARM_AMBA
7 select ARM_GIC
8 select ARM_GLOBAL_TIMER if !CPU_FREQ
9 select CADENCE_TTC_TIMER
7 select HAVE_ARM_SCU if SMP 10 select HAVE_ARM_SCU if SMP
8 select HAVE_ARM_TWD if SMP 11 select HAVE_ARM_TWD if SMP
9 select ICST 12 select ICST
10 select CADENCE_TTC_TIMER
11 select ARM_GLOBAL_TIMER if !CPU_FREQ
12 select MFD_SYSCON 13 select MFD_SYSCON
14 select SOC_BUS
13 help 15 help
14 Support for Xilinx Zynq ARM Cortex A9 Platform 16 Support for Xilinx Zynq ARM Cortex A9 Platform
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
index 6fcc584c1a11..31a6fa40ba37 100644
--- a/arch/arm/mach-zynq/common.c
+++ b/arch/arm/mach-zynq/common.c
@@ -29,6 +29,8 @@
29#include <linux/memblock.h> 29#include <linux/memblock.h>
30#include <linux/irqchip.h> 30#include <linux/irqchip.h>
31#include <linux/irqchip/arm-gic.h> 31#include <linux/irqchip/arm-gic.h>
32#include <linux/slab.h>
33#include <linux/sys_soc.h>
32 34
33#include <asm/mach/arch.h> 35#include <asm/mach/arch.h>
34#include <asm/mach/map.h> 36#include <asm/mach/map.h>
@@ -37,10 +39,15 @@
37#include <asm/page.h> 39#include <asm/page.h>
38#include <asm/pgtable.h> 40#include <asm/pgtable.h>
39#include <asm/smp_scu.h> 41#include <asm/smp_scu.h>
42#include <asm/system_info.h>
40#include <asm/hardware/cache-l2x0.h> 43#include <asm/hardware/cache-l2x0.h>
41 44
42#include "common.h" 45#include "common.h"
43 46
47#define ZYNQ_DEVCFG_MCTRL 0x80
48#define ZYNQ_DEVCFG_PS_VERSION_SHIFT 28
49#define ZYNQ_DEVCFG_PS_VERSION_MASK 0xF
50
44void __iomem *zynq_scu_base; 51void __iomem *zynq_scu_base;
45 52
46/** 53/**
@@ -60,19 +67,76 @@ static struct platform_device zynq_cpuidle_device = {
60}; 67};
61 68
62/** 69/**
70 * zynq_get_revision - Get Zynq silicon revision
71 *
72 * Return: Silicon version or -1 otherwise
73 */
74static int __init zynq_get_revision(void)
75{
76 struct device_node *np;
77 void __iomem *zynq_devcfg_base;
78 u32 revision;
79
80 np = of_find_compatible_node(NULL, NULL, "xlnx,zynq-devcfg-1.0");
81 if (!np) {
82 pr_err("%s: no devcfg node found\n", __func__);
83 return -1;
84 }
85
86 zynq_devcfg_base = of_iomap(np, 0);
87 if (!zynq_devcfg_base) {
88 pr_err("%s: Unable to map I/O memory\n", __func__);
89 return -1;
90 }
91
92 revision = readl(zynq_devcfg_base + ZYNQ_DEVCFG_MCTRL);
93 revision >>= ZYNQ_DEVCFG_PS_VERSION_SHIFT;
94 revision &= ZYNQ_DEVCFG_PS_VERSION_MASK;
95
96 iounmap(zynq_devcfg_base);
97
98 return revision;
99}
100
101/**
63 * zynq_init_machine - System specific initialization, intended to be 102 * zynq_init_machine - System specific initialization, intended to be
64 * called from board specific initialization. 103 * called from board specific initialization.
65 */ 104 */
66static void __init zynq_init_machine(void) 105static void __init zynq_init_machine(void)
67{ 106{
68 struct platform_device_info devinfo = { .name = "cpufreq-cpu0", }; 107 struct platform_device_info devinfo = { .name = "cpufreq-cpu0", };
108 struct soc_device_attribute *soc_dev_attr;
109 struct soc_device *soc_dev;
110 struct device *parent = NULL;
111
112 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
113 if (!soc_dev_attr)
114 goto out;
115
116 system_rev = zynq_get_revision();
69 117
118 soc_dev_attr->family = kasprintf(GFP_KERNEL, "Xilinx Zynq");
119 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "0x%x", system_rev);
120 soc_dev_attr->soc_id = kasprintf(GFP_KERNEL, "0x%x",
121 zynq_slcr_get_device_id());
122
123 soc_dev = soc_device_register(soc_dev_attr);
124 if (IS_ERR(soc_dev)) {
125 kfree(soc_dev_attr->family);
126 kfree(soc_dev_attr->revision);
127 kfree(soc_dev_attr->soc_id);
128 kfree(soc_dev_attr);
129 goto out;
130 }
131
132 parent = soc_device_to_device(soc_dev);
133
134out:
70 /* 135 /*
71 * 64KB way size, 8-way associativity, parity disabled 136 * Finished with the static registrations now; fill in the missing
137 * devices
72 */ 138 */
73 l2x0_of_init(0x02060000, 0xF0F0FFFF); 139 of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);
74
75 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
76 140
77 platform_device_register(&zynq_cpuidle_device); 141 platform_device_register(&zynq_cpuidle_device);
78 platform_device_register_full(&devinfo); 142 platform_device_register_full(&devinfo);
@@ -133,6 +197,9 @@ static const char * const zynq_dt_match[] = {
133}; 197};
134 198
135DT_MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") 199DT_MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform")
200 /* 64KB way size, 8-way associativity, parity disabled */
201 .l2c_aux_val = 0x02000000,
202 .l2c_aux_mask = 0xf0ffffff,
136 .smp = smp_ops(zynq_smp_ops), 203 .smp = smp_ops(zynq_smp_ops),
137 .map_io = zynq_map_io, 204 .map_io = zynq_map_io,
138 .init_irq = zynq_irq_init, 205 .init_irq = zynq_irq_init,
diff --git a/arch/arm/mach-zynq/common.h b/arch/arm/mach-zynq/common.h
index b097844d3175..f652f0a884a6 100644
--- a/arch/arm/mach-zynq/common.h
+++ b/arch/arm/mach-zynq/common.h
@@ -24,6 +24,7 @@ extern int zynq_early_slcr_init(void);
24extern void zynq_slcr_system_reset(void); 24extern void zynq_slcr_system_reset(void);
25extern void zynq_slcr_cpu_stop(int cpu); 25extern void zynq_slcr_cpu_stop(int cpu);
26extern void zynq_slcr_cpu_start(int cpu); 26extern void zynq_slcr_cpu_start(int cpu);
27extern u32 zynq_slcr_get_device_id(void);
27 28
28#ifdef CONFIG_SMP 29#ifdef CONFIG_SMP
29extern void secondary_startup(void); 30extern void secondary_startup(void);
diff --git a/arch/arm/mach-zynq/headsmp.S b/arch/arm/mach-zynq/headsmp.S
index 57a32869f0aa..dd8c071941e7 100644
--- a/arch/arm/mach-zynq/headsmp.S
+++ b/arch/arm/mach-zynq/headsmp.S
@@ -8,9 +8,12 @@
8 */ 8 */
9#include <linux/linkage.h> 9#include <linux/linkage.h>
10#include <linux/init.h> 10#include <linux/init.h>
11#include <asm/assembler.h>
11 12
12ENTRY(zynq_secondary_trampoline) 13ENTRY(zynq_secondary_trampoline)
13 ldr r0, [pc] 14ARM_BE8(setend be) @ ensure we are in BE8 mode
15 ldr r0, zynq_secondary_trampoline_jump
16ARM_BE8(rev r0, r0)
14 bx r0 17 bx r0
15.globl zynq_secondary_trampoline_jump 18.globl zynq_secondary_trampoline_jump
16zynq_secondary_trampoline_jump: 19zynq_secondary_trampoline_jump:
diff --git a/arch/arm/mach-zynq/slcr.c b/arch/arm/mach-zynq/slcr.c
index a37d49a6e657..c43a2d16e223 100644
--- a/arch/arm/mach-zynq/slcr.c
+++ b/arch/arm/mach-zynq/slcr.c
@@ -26,10 +26,13 @@
26#define SLCR_PS_RST_CTRL_OFFSET 0x200 /* PS Software Reset Control */ 26#define SLCR_PS_RST_CTRL_OFFSET 0x200 /* PS Software Reset Control */
27#define SLCR_A9_CPU_RST_CTRL_OFFSET 0x244 /* CPU Software Reset Control */ 27#define SLCR_A9_CPU_RST_CTRL_OFFSET 0x244 /* CPU Software Reset Control */
28#define SLCR_REBOOT_STATUS_OFFSET 0x258 /* PS Reboot Status */ 28#define SLCR_REBOOT_STATUS_OFFSET 0x258 /* PS Reboot Status */
29#define SLCR_PSS_IDCODE 0x530 /* PS IDCODE */
29 30
30#define SLCR_UNLOCK_MAGIC 0xDF0D 31#define SLCR_UNLOCK_MAGIC 0xDF0D
31#define SLCR_A9_CPU_CLKSTOP 0x10 32#define SLCR_A9_CPU_CLKSTOP 0x10
32#define SLCR_A9_CPU_RST 0x1 33#define SLCR_A9_CPU_RST 0x1
34#define SLCR_PSS_IDCODE_DEVICE_SHIFT 12
35#define SLCR_PSS_IDCODE_DEVICE_MASK 0x1F
33 36
34static void __iomem *zynq_slcr_base; 37static void __iomem *zynq_slcr_base;
35static struct regmap *zynq_slcr_regmap; 38static struct regmap *zynq_slcr_regmap;
@@ -83,6 +86,22 @@ static inline int zynq_slcr_unlock(void)
83} 86}
84 87
85/** 88/**
89 * zynq_slcr_get_device_id - Read device code id
90 *
91 * Return: Device code id
92 */
93u32 zynq_slcr_get_device_id(void)
94{
95 u32 val;
96
97 zynq_slcr_read(&val, SLCR_PSS_IDCODE);
98 val >>= SLCR_PSS_IDCODE_DEVICE_SHIFT;
99 val &= SLCR_PSS_IDCODE_DEVICE_MASK;
100
101 return val;
102}
103
104/**
86 * zynq_slcr_system_reset - Reset the entire system. 105 * zynq_slcr_system_reset - Reset the entire system.
87 */ 106 */
88void zynq_slcr_system_reset(void) 107void zynq_slcr_system_reset(void)
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 5bf7c3c3b301..eda0dd0ab97b 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -897,6 +897,57 @@ config CACHE_PL310
897 This option enables optimisations for the PL310 cache 897 This option enables optimisations for the PL310 cache
898 controller. 898 controller.
899 899
900config PL310_ERRATA_588369
901 bool "PL310 errata: Clean & Invalidate maintenance operations do not invalidate clean lines"
902 depends on CACHE_L2X0
903 help
904 The PL310 L2 cache controller implements three types of Clean &
905 Invalidate maintenance operations: by Physical Address
906 (offset 0x7F0), by Index/Way (0x7F8) and by Way (0x7FC).
907 They are architecturally defined to behave as the execution of a
908 clean operation followed immediately by an invalidate operation,
909 both performing to the same memory location. This functionality
910 is not correctly implemented in PL310 as clean lines are not
911 invalidated as a result of these operations.
912
913config PL310_ERRATA_727915
914 bool "PL310 errata: Background Clean & Invalidate by Way operation can cause data corruption"
915 depends on CACHE_L2X0
916 help
917 PL310 implements the Clean & Invalidate by Way L2 cache maintenance
918 operation (offset 0x7FC). This operation runs in background so that
919 PL310 can handle normal accesses while it is in progress. Under very
920 rare circumstances, due to this erratum, write data can be lost when
921 PL310 treats a cacheable write transaction during a Clean &
922 Invalidate by Way operation.
923
924config PL310_ERRATA_753970
925 bool "PL310 errata: cache sync operation may be faulty"
926 depends on CACHE_PL310
927 help
928 This option enables the workaround for the 753970 PL310 (r3p0) erratum.
929
930 Under some condition the effect of cache sync operation on
931 the store buffer still remains when the operation completes.
932 This means that the store buffer is always asked to drain and
933 this prevents it from merging any further writes. The workaround
934 is to replace the normal offset of cache sync operation (0x730)
935 by another offset targeting an unmapped PL310 register 0x740.
936 This has the same effect as the cache sync operation: store buffer
937 drain and waiting for all buffers empty.
938
939config PL310_ERRATA_769419
940 bool "PL310 errata: no automatic Store Buffer drain"
941 depends on CACHE_L2X0
942 help
943 On revisions of the PL310 prior to r3p2, the Store Buffer does
944 not automatically drain. This can cause normal, non-cacheable
945 writes to be retained when the memory system is idle, leading
946 to suboptimal I/O performance for drivers using coherent DMA.
947 This option adds a write barrier to the cpu_idle loop so that,
948 on systems with an outer cache, the store buffer is drained
949 explicitly.
950
900config CACHE_TAUROS2 951config CACHE_TAUROS2
901 bool "Enable the Tauros2 L2 cache controller" 952 bool "Enable the Tauros2 L2 cache controller"
902 depends on (ARCH_DOVE || ARCH_MMP || CPU_PJ4) 953 depends on (ARCH_DOVE || ARCH_MMP || CPU_PJ4)
diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile
index 7f39ce2f841f..91da64de440f 100644
--- a/arch/arm/mm/Makefile
+++ b/arch/arm/mm/Makefile
@@ -95,7 +95,8 @@ obj-$(CONFIG_CPU_V7M) += proc-v7m.o
95AFLAGS_proc-v6.o :=-Wa,-march=armv6 95AFLAGS_proc-v6.o :=-Wa,-march=armv6
96AFLAGS_proc-v7.o :=-Wa,-march=armv7-a 96AFLAGS_proc-v7.o :=-Wa,-march=armv7-a
97 97
98obj-$(CONFIG_OUTER_CACHE) += l2c-common.o
98obj-$(CONFIG_CACHE_FEROCEON_L2) += cache-feroceon-l2.o 99obj-$(CONFIG_CACHE_FEROCEON_L2) += cache-feroceon-l2.o
99obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o 100obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o l2c-l2x0-resume.o
100obj-$(CONFIG_CACHE_XSC3L2) += cache-xsc3l2.o 101obj-$(CONFIG_CACHE_XSC3L2) += cache-xsc3l2.o
101obj-$(CONFIG_CACHE_TAUROS2) += cache-tauros2.o 102obj-$(CONFIG_CACHE_TAUROS2) += cache-tauros2.o
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
index 924036473b16..b8cb1a2688a0 100644
--- a/arch/arm/mm/alignment.c
+++ b/arch/arm/mm/alignment.c
@@ -28,6 +28,7 @@
28#include <asm/opcodes.h> 28#include <asm/opcodes.h>
29 29
30#include "fault.h" 30#include "fault.h"
31#include "mm.h"
31 32
32/* 33/*
33 * 32-bit misaligned trap handler (c) 1998 San Mehat (CCC) -July 1998 34 * 32-bit misaligned trap handler (c) 1998 San Mehat (CCC) -July 1998
@@ -81,6 +82,7 @@ static unsigned long ai_word;
81static unsigned long ai_dword; 82static unsigned long ai_dword;
82static unsigned long ai_multi; 83static unsigned long ai_multi;
83static int ai_usermode; 84static int ai_usermode;
85static unsigned long cr_no_alignment;
84 86
85core_param(alignment, ai_usermode, int, 0600); 87core_param(alignment, ai_usermode, int, 0600);
86 88
@@ -91,7 +93,7 @@ core_param(alignment, ai_usermode, int, 0600);
91/* Return true if and only if the ARMv6 unaligned access model is in use. */ 93/* Return true if and only if the ARMv6 unaligned access model is in use. */
92static bool cpu_is_v6_unaligned(void) 94static bool cpu_is_v6_unaligned(void)
93{ 95{
94 return cpu_architecture() >= CPU_ARCH_ARMv6 && (cr_alignment & CR_U); 96 return cpu_architecture() >= CPU_ARCH_ARMv6 && get_cr() & CR_U;
95} 97}
96 98
97static int safe_usermode(int new_usermode, bool warn) 99static int safe_usermode(int new_usermode, bool warn)
@@ -949,6 +951,13 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
949 return 0; 951 return 0;
950} 952}
951 953
954static int __init noalign_setup(char *__unused)
955{
956 set_cr(__clear_cr(CR_A));
957 return 1;
958}
959__setup("noalign", noalign_setup);
960
952/* 961/*
953 * This needs to be done after sysctl_init, otherwise sys/ will be 962 * This needs to be done after sysctl_init, otherwise sys/ will be
954 * overwritten. Actually, this shouldn't be in sys/ at all since 963 * overwritten. Actually, this shouldn't be in sys/ at all since
@@ -966,14 +975,12 @@ static int __init alignment_init(void)
966 return -ENOMEM; 975 return -ENOMEM;
967#endif 976#endif
968 977
969#ifdef CONFIG_CPU_CP15
970 if (cpu_is_v6_unaligned()) { 978 if (cpu_is_v6_unaligned()) {
971 cr_alignment &= ~CR_A; 979 set_cr(__clear_cr(CR_A));
972 cr_no_alignment &= ~CR_A;
973 set_cr(cr_alignment);
974 ai_usermode = safe_usermode(ai_usermode, false); 980 ai_usermode = safe_usermode(ai_usermode, false);
975 } 981 }
976#endif 982
983 cr_no_alignment = get_cr() & ~CR_A;
977 984
978 hook_fault_code(FAULT_CODE_ALIGNMENT, do_alignment, SIGBUS, BUS_ADRALN, 985 hook_fault_code(FAULT_CODE_ALIGNMENT, do_alignment, SIGBUS, BUS_ADRALN,
979 "alignment exception"); 986 "alignment exception");
diff --git a/arch/arm/mm/cache-feroceon-l2.c b/arch/arm/mm/cache-feroceon-l2.c
index dc814a548056..e028a7f2ebcc 100644
--- a/arch/arm/mm/cache-feroceon-l2.c
+++ b/arch/arm/mm/cache-feroceon-l2.c
@@ -350,7 +350,6 @@ void __init feroceon_l2_init(int __l2_wt_override)
350 outer_cache.inv_range = feroceon_l2_inv_range; 350 outer_cache.inv_range = feroceon_l2_inv_range;
351 outer_cache.clean_range = feroceon_l2_clean_range; 351 outer_cache.clean_range = feroceon_l2_clean_range;
352 outer_cache.flush_range = feroceon_l2_flush_range; 352 outer_cache.flush_range = feroceon_l2_flush_range;
353 outer_cache.inv_all = l2_inv_all;
354 353
355 enable_l2(); 354 enable_l2();
356 355
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 7abde2ce8973..efc5cabf70e0 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -16,18 +16,33 @@
16 * along with this program; if not, write to the Free Software 16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19#include <linux/cpu.h>
19#include <linux/err.h> 20#include <linux/err.h>
20#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/smp.h>
21#include <linux/spinlock.h> 23#include <linux/spinlock.h>
22#include <linux/io.h> 24#include <linux/io.h>
23#include <linux/of.h> 25#include <linux/of.h>
24#include <linux/of_address.h> 26#include <linux/of_address.h>
25 27
26#include <asm/cacheflush.h> 28#include <asm/cacheflush.h>
29#include <asm/cp15.h>
30#include <asm/cputype.h>
27#include <asm/hardware/cache-l2x0.h> 31#include <asm/hardware/cache-l2x0.h>
28#include "cache-tauros3.h" 32#include "cache-tauros3.h"
29#include "cache-aurora-l2.h" 33#include "cache-aurora-l2.h"
30 34
35struct l2c_init_data {
36 const char *type;
37 unsigned way_size_0;
38 unsigned num_lock;
39 void (*of_parse)(const struct device_node *, u32 *, u32 *);
40 void (*enable)(void __iomem *, u32, unsigned);
41 void (*fixup)(void __iomem *, u32, struct outer_cache_fns *);
42 void (*save)(void __iomem *);
43 struct outer_cache_fns outer_cache;
44};
45
31#define CACHE_LINE_SIZE 32 46#define CACHE_LINE_SIZE 32
32 47
33static void __iomem *l2x0_base; 48static void __iomem *l2x0_base;
@@ -36,96 +51,116 @@ static u32 l2x0_way_mask; /* Bitmask of active ways */
36static u32 l2x0_size; 51static u32 l2x0_size;
37static unsigned long sync_reg_offset = L2X0_CACHE_SYNC; 52static unsigned long sync_reg_offset = L2X0_CACHE_SYNC;
38 53
39/* Aurora don't have the cache ID register available, so we have to
40 * pass it though the device tree */
41static u32 cache_id_part_number_from_dt;
42
43struct l2x0_regs l2x0_saved_regs; 54struct l2x0_regs l2x0_saved_regs;
44 55
45struct l2x0_of_data { 56/*
46 void (*setup)(const struct device_node *, u32 *, u32 *); 57 * Common code for all cache controllers.
47 void (*save)(void); 58 */
48 struct outer_cache_fns outer_cache; 59static inline void l2c_wait_mask(void __iomem *reg, unsigned long mask)
49};
50
51static bool of_init = false;
52
53static inline void cache_wait_way(void __iomem *reg, unsigned long mask)
54{ 60{
55 /* wait for cache operation by line or way to complete */ 61 /* wait for cache operation by line or way to complete */
56 while (readl_relaxed(reg) & mask) 62 while (readl_relaxed(reg) & mask)
57 cpu_relax(); 63 cpu_relax();
58} 64}
59 65
60#ifdef CONFIG_CACHE_PL310 66/*
61static inline void cache_wait(void __iomem *reg, unsigned long mask) 67 * By default, we write directly to secure registers. Platforms must
68 * override this if they are running non-secure.
69 */
70static void l2c_write_sec(unsigned long val, void __iomem *base, unsigned reg)
62{ 71{
63 /* cache operations by line are atomic on PL310 */ 72 if (val == readl_relaxed(base + reg))
73 return;
74 if (outer_cache.write_sec)
75 outer_cache.write_sec(val, reg);
76 else
77 writel_relaxed(val, base + reg);
64} 78}
65#else
66#define cache_wait cache_wait_way
67#endif
68 79
69static inline void cache_sync(void) 80/*
81 * This should only be called when we have a requirement that the
82 * register be written due to a work-around, as platforms running
83 * in non-secure mode may not be able to access this register.
84 */
85static inline void l2c_set_debug(void __iomem *base, unsigned long val)
70{ 86{
71 void __iomem *base = l2x0_base; 87 l2c_write_sec(val, base, L2X0_DEBUG_CTRL);
72
73 writel_relaxed(0, base + sync_reg_offset);
74 cache_wait(base + L2X0_CACHE_SYNC, 1);
75} 88}
76 89
77static inline void l2x0_clean_line(unsigned long addr) 90static void __l2c_op_way(void __iomem *reg)
78{ 91{
79 void __iomem *base = l2x0_base; 92 writel_relaxed(l2x0_way_mask, reg);
80 cache_wait(base + L2X0_CLEAN_LINE_PA, 1); 93 l2c_wait_mask(reg, l2x0_way_mask);
81 writel_relaxed(addr, base + L2X0_CLEAN_LINE_PA);
82} 94}
83 95
84static inline void l2x0_inv_line(unsigned long addr) 96static inline void l2c_unlock(void __iomem *base, unsigned num)
85{ 97{
86 void __iomem *base = l2x0_base; 98 unsigned i;
87 cache_wait(base + L2X0_INV_LINE_PA, 1); 99
88 writel_relaxed(addr, base + L2X0_INV_LINE_PA); 100 for (i = 0; i < num; i++) {
101 writel_relaxed(0, base + L2X0_LOCKDOWN_WAY_D_BASE +
102 i * L2X0_LOCKDOWN_STRIDE);
103 writel_relaxed(0, base + L2X0_LOCKDOWN_WAY_I_BASE +
104 i * L2X0_LOCKDOWN_STRIDE);
105 }
89} 106}
90 107
91#if defined(CONFIG_PL310_ERRATA_588369) || defined(CONFIG_PL310_ERRATA_727915) 108/*
92static inline void debug_writel(unsigned long val) 109 * Enable the L2 cache controller. This function must only be
110 * called when the cache controller is known to be disabled.
111 */
112static void l2c_enable(void __iomem *base, u32 aux, unsigned num_lock)
93{ 113{
94 if (outer_cache.set_debug) 114 unsigned long flags;
95 outer_cache.set_debug(val); 115
116 l2c_write_sec(aux, base, L2X0_AUX_CTRL);
117
118 l2c_unlock(base, num_lock);
119
120 local_irq_save(flags);
121 __l2c_op_way(base + L2X0_INV_WAY);
122 writel_relaxed(0, base + sync_reg_offset);
123 l2c_wait_mask(base + sync_reg_offset, 1);
124 local_irq_restore(flags);
125
126 l2c_write_sec(L2X0_CTRL_EN, base, L2X0_CTRL);
96} 127}
97 128
98static void pl310_set_debug(unsigned long val) 129static void l2c_disable(void)
99{ 130{
100 writel_relaxed(val, l2x0_base + L2X0_DEBUG_CTRL); 131 void __iomem *base = l2x0_base;
132
133 outer_cache.flush_all();
134 l2c_write_sec(0, base, L2X0_CTRL);
135 dsb(st);
101} 136}
102#else 137
103/* Optimised out for non-errata case */ 138#ifdef CONFIG_CACHE_PL310
104static inline void debug_writel(unsigned long val) 139static inline void cache_wait(void __iomem *reg, unsigned long mask)
105{ 140{
141 /* cache operations by line are atomic on PL310 */
106} 142}
107 143#else
108#define pl310_set_debug NULL 144#define cache_wait l2c_wait_mask
109#endif 145#endif
110 146
111#ifdef CONFIG_PL310_ERRATA_588369 147static inline void cache_sync(void)
112static inline void l2x0_flush_line(unsigned long addr)
113{ 148{
114 void __iomem *base = l2x0_base; 149 void __iomem *base = l2x0_base;
115 150
116 /* Clean by PA followed by Invalidate by PA */ 151 writel_relaxed(0, base + sync_reg_offset);
117 cache_wait(base + L2X0_CLEAN_LINE_PA, 1); 152 cache_wait(base + L2X0_CACHE_SYNC, 1);
118 writel_relaxed(addr, base + L2X0_CLEAN_LINE_PA);
119 cache_wait(base + L2X0_INV_LINE_PA, 1);
120 writel_relaxed(addr, base + L2X0_INV_LINE_PA);
121} 153}
122#else
123 154
124static inline void l2x0_flush_line(unsigned long addr) 155#if defined(CONFIG_PL310_ERRATA_588369) || defined(CONFIG_PL310_ERRATA_727915)
156static inline void debug_writel(unsigned long val)
157{
158 l2c_set_debug(l2x0_base, val);
159}
160#else
161/* Optimised out for non-errata case */
162static inline void debug_writel(unsigned long val)
125{ 163{
126 void __iomem *base = l2x0_base;
127 cache_wait(base + L2X0_CLEAN_INV_LINE_PA, 1);
128 writel_relaxed(addr, base + L2X0_CLEAN_INV_LINE_PA);
129} 164}
130#endif 165#endif
131 166
@@ -141,8 +176,7 @@ static void l2x0_cache_sync(void)
141static void __l2x0_flush_all(void) 176static void __l2x0_flush_all(void)
142{ 177{
143 debug_writel(0x03); 178 debug_writel(0x03);
144 writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_CLEAN_INV_WAY); 179 __l2c_op_way(l2x0_base + L2X0_CLEAN_INV_WAY);
145 cache_wait_way(l2x0_base + L2X0_CLEAN_INV_WAY, l2x0_way_mask);
146 cache_sync(); 180 cache_sync();
147 debug_writel(0x00); 181 debug_writel(0x00);
148} 182}
@@ -157,275 +191,883 @@ static void l2x0_flush_all(void)
157 raw_spin_unlock_irqrestore(&l2x0_lock, flags); 191 raw_spin_unlock_irqrestore(&l2x0_lock, flags);
158} 192}
159 193
160static void l2x0_clean_all(void) 194static void l2x0_disable(void)
161{ 195{
162 unsigned long flags; 196 unsigned long flags;
163 197
164 /* clean all ways */
165 raw_spin_lock_irqsave(&l2x0_lock, flags); 198 raw_spin_lock_irqsave(&l2x0_lock, flags);
166 writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_CLEAN_WAY); 199 __l2x0_flush_all();
167 cache_wait_way(l2x0_base + L2X0_CLEAN_WAY, l2x0_way_mask); 200 l2c_write_sec(0, l2x0_base, L2X0_CTRL);
168 cache_sync(); 201 dsb(st);
169 raw_spin_unlock_irqrestore(&l2x0_lock, flags); 202 raw_spin_unlock_irqrestore(&l2x0_lock, flags);
170} 203}
171 204
172static void l2x0_inv_all(void) 205static void l2c_save(void __iomem *base)
173{ 206{
174 unsigned long flags; 207 l2x0_saved_regs.aux_ctrl = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
208}
175 209
176 /* invalidate all ways */ 210/*
177 raw_spin_lock_irqsave(&l2x0_lock, flags); 211 * L2C-210 specific code.
178 /* Invalidating when L2 is enabled is a nono */ 212 *
179 BUG_ON(readl(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN); 213 * The L2C-2x0 PA, set/way and sync operations are atomic, but we must
180 writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_INV_WAY); 214 * ensure that no background operation is running. The way operations
181 cache_wait_way(l2x0_base + L2X0_INV_WAY, l2x0_way_mask); 215 * are all background tasks.
182 cache_sync(); 216 *
183 raw_spin_unlock_irqrestore(&l2x0_lock, flags); 217 * While a background operation is in progress, any new operation is
218 * ignored (unspecified whether this causes an error.) Thankfully, not
219 * used on SMP.
220 *
221 * Never has a different sync register other than L2X0_CACHE_SYNC, but
222 * we use sync_reg_offset here so we can share some of this with L2C-310.
223 */
224static void __l2c210_cache_sync(void __iomem *base)
225{
226 writel_relaxed(0, base + sync_reg_offset);
184} 227}
185 228
186static void l2x0_inv_range(unsigned long start, unsigned long end) 229static void __l2c210_op_pa_range(void __iomem *reg, unsigned long start,
230 unsigned long end)
231{
232 while (start < end) {
233 writel_relaxed(start, reg);
234 start += CACHE_LINE_SIZE;
235 }
236}
237
238static void l2c210_inv_range(unsigned long start, unsigned long end)
187{ 239{
188 void __iomem *base = l2x0_base; 240 void __iomem *base = l2x0_base;
189 unsigned long flags;
190 241
191 raw_spin_lock_irqsave(&l2x0_lock, flags);
192 if (start & (CACHE_LINE_SIZE - 1)) { 242 if (start & (CACHE_LINE_SIZE - 1)) {
193 start &= ~(CACHE_LINE_SIZE - 1); 243 start &= ~(CACHE_LINE_SIZE - 1);
194 debug_writel(0x03); 244 writel_relaxed(start, base + L2X0_CLEAN_INV_LINE_PA);
195 l2x0_flush_line(start);
196 debug_writel(0x00);
197 start += CACHE_LINE_SIZE; 245 start += CACHE_LINE_SIZE;
198 } 246 }
199 247
200 if (end & (CACHE_LINE_SIZE - 1)) { 248 if (end & (CACHE_LINE_SIZE - 1)) {
201 end &= ~(CACHE_LINE_SIZE - 1); 249 end &= ~(CACHE_LINE_SIZE - 1);
202 debug_writel(0x03); 250 writel_relaxed(end, base + L2X0_CLEAN_INV_LINE_PA);
203 l2x0_flush_line(end);
204 debug_writel(0x00);
205 } 251 }
206 252
253 __l2c210_op_pa_range(base + L2X0_INV_LINE_PA, start, end);
254 __l2c210_cache_sync(base);
255}
256
257static void l2c210_clean_range(unsigned long start, unsigned long end)
258{
259 void __iomem *base = l2x0_base;
260
261 start &= ~(CACHE_LINE_SIZE - 1);
262 __l2c210_op_pa_range(base + L2X0_CLEAN_LINE_PA, start, end);
263 __l2c210_cache_sync(base);
264}
265
266static void l2c210_flush_range(unsigned long start, unsigned long end)
267{
268 void __iomem *base = l2x0_base;
269
270 start &= ~(CACHE_LINE_SIZE - 1);
271 __l2c210_op_pa_range(base + L2X0_CLEAN_INV_LINE_PA, start, end);
272 __l2c210_cache_sync(base);
273}
274
275static void l2c210_flush_all(void)
276{
277 void __iomem *base = l2x0_base;
278
279 BUG_ON(!irqs_disabled());
280
281 __l2c_op_way(base + L2X0_CLEAN_INV_WAY);
282 __l2c210_cache_sync(base);
283}
284
285static void l2c210_sync(void)
286{
287 __l2c210_cache_sync(l2x0_base);
288}
289
290static void l2c210_resume(void)
291{
292 void __iomem *base = l2x0_base;
293
294 if (!(readl_relaxed(base + L2X0_CTRL) & L2X0_CTRL_EN))
295 l2c_enable(base, l2x0_saved_regs.aux_ctrl, 1);
296}
297
298static const struct l2c_init_data l2c210_data __initconst = {
299 .type = "L2C-210",
300 .way_size_0 = SZ_8K,
301 .num_lock = 1,
302 .enable = l2c_enable,
303 .save = l2c_save,
304 .outer_cache = {
305 .inv_range = l2c210_inv_range,
306 .clean_range = l2c210_clean_range,
307 .flush_range = l2c210_flush_range,
308 .flush_all = l2c210_flush_all,
309 .disable = l2c_disable,
310 .sync = l2c210_sync,
311 .resume = l2c210_resume,
312 },
313};
314
315/*
316 * L2C-220 specific code.
317 *
318 * All operations are background operations: they have to be waited for.
319 * Conflicting requests generate a slave error (which will cause an
320 * imprecise abort.) Never uses sync_reg_offset, so we hard-code the
321 * sync register here.
322 *
323 * However, we can re-use the l2c210_resume call.
324 */
325static inline void __l2c220_cache_sync(void __iomem *base)
326{
327 writel_relaxed(0, base + L2X0_CACHE_SYNC);
328 l2c_wait_mask(base + L2X0_CACHE_SYNC, 1);
329}
330
331static void l2c220_op_way(void __iomem *base, unsigned reg)
332{
333 unsigned long flags;
334
335 raw_spin_lock_irqsave(&l2x0_lock, flags);
336 __l2c_op_way(base + reg);
337 __l2c220_cache_sync(base);
338 raw_spin_unlock_irqrestore(&l2x0_lock, flags);
339}
340
341static unsigned long l2c220_op_pa_range(void __iomem *reg, unsigned long start,
342 unsigned long end, unsigned long flags)
343{
344 raw_spinlock_t *lock = &l2x0_lock;
345
207 while (start < end) { 346 while (start < end) {
208 unsigned long blk_end = start + min(end - start, 4096UL); 347 unsigned long blk_end = start + min(end - start, 4096UL);
209 348
210 while (start < blk_end) { 349 while (start < blk_end) {
211 l2x0_inv_line(start); 350 l2c_wait_mask(reg, 1);
351 writel_relaxed(start, reg);
212 start += CACHE_LINE_SIZE; 352 start += CACHE_LINE_SIZE;
213 } 353 }
214 354
215 if (blk_end < end) { 355 if (blk_end < end) {
216 raw_spin_unlock_irqrestore(&l2x0_lock, flags); 356 raw_spin_unlock_irqrestore(lock, flags);
217 raw_spin_lock_irqsave(&l2x0_lock, flags); 357 raw_spin_lock_irqsave(lock, flags);
218 } 358 }
219 } 359 }
220 cache_wait(base + L2X0_INV_LINE_PA, 1); 360
221 cache_sync(); 361 return flags;
222 raw_spin_unlock_irqrestore(&l2x0_lock, flags);
223} 362}
224 363
225static void l2x0_clean_range(unsigned long start, unsigned long end) 364static void l2c220_inv_range(unsigned long start, unsigned long end)
226{ 365{
227 void __iomem *base = l2x0_base; 366 void __iomem *base = l2x0_base;
228 unsigned long flags; 367 unsigned long flags;
229 368
230 if ((end - start) >= l2x0_size) {
231 l2x0_clean_all();
232 return;
233 }
234
235 raw_spin_lock_irqsave(&l2x0_lock, flags); 369 raw_spin_lock_irqsave(&l2x0_lock, flags);
236 start &= ~(CACHE_LINE_SIZE - 1); 370 if ((start | end) & (CACHE_LINE_SIZE - 1)) {
237 while (start < end) { 371 if (start & (CACHE_LINE_SIZE - 1)) {
238 unsigned long blk_end = start + min(end - start, 4096UL); 372 start &= ~(CACHE_LINE_SIZE - 1);
239 373 writel_relaxed(start, base + L2X0_CLEAN_INV_LINE_PA);
240 while (start < blk_end) {
241 l2x0_clean_line(start);
242 start += CACHE_LINE_SIZE; 374 start += CACHE_LINE_SIZE;
243 } 375 }
244 376
245 if (blk_end < end) { 377 if (end & (CACHE_LINE_SIZE - 1)) {
246 raw_spin_unlock_irqrestore(&l2x0_lock, flags); 378 end &= ~(CACHE_LINE_SIZE - 1);
247 raw_spin_lock_irqsave(&l2x0_lock, flags); 379 l2c_wait_mask(base + L2X0_CLEAN_INV_LINE_PA, 1);
380 writel_relaxed(end, base + L2X0_CLEAN_INV_LINE_PA);
248 } 381 }
249 } 382 }
250 cache_wait(base + L2X0_CLEAN_LINE_PA, 1); 383
251 cache_sync(); 384 flags = l2c220_op_pa_range(base + L2X0_INV_LINE_PA,
385 start, end, flags);
386 l2c_wait_mask(base + L2X0_INV_LINE_PA, 1);
387 __l2c220_cache_sync(base);
252 raw_spin_unlock_irqrestore(&l2x0_lock, flags); 388 raw_spin_unlock_irqrestore(&l2x0_lock, flags);
253} 389}
254 390
255static void l2x0_flush_range(unsigned long start, unsigned long end) 391static void l2c220_clean_range(unsigned long start, unsigned long end)
256{ 392{
257 void __iomem *base = l2x0_base; 393 void __iomem *base = l2x0_base;
258 unsigned long flags; 394 unsigned long flags;
259 395
396 start &= ~(CACHE_LINE_SIZE - 1);
260 if ((end - start) >= l2x0_size) { 397 if ((end - start) >= l2x0_size) {
261 l2x0_flush_all(); 398 l2c220_op_way(base, L2X0_CLEAN_WAY);
262 return; 399 return;
263 } 400 }
264 401
265 raw_spin_lock_irqsave(&l2x0_lock, flags); 402 raw_spin_lock_irqsave(&l2x0_lock, flags);
403 flags = l2c220_op_pa_range(base + L2X0_CLEAN_LINE_PA,
404 start, end, flags);
405 l2c_wait_mask(base + L2X0_CLEAN_INV_LINE_PA, 1);
406 __l2c220_cache_sync(base);
407 raw_spin_unlock_irqrestore(&l2x0_lock, flags);
408}
409
410static void l2c220_flush_range(unsigned long start, unsigned long end)
411{
412 void __iomem *base = l2x0_base;
413 unsigned long flags;
414
266 start &= ~(CACHE_LINE_SIZE - 1); 415 start &= ~(CACHE_LINE_SIZE - 1);
416 if ((end - start) >= l2x0_size) {
417 l2c220_op_way(base, L2X0_CLEAN_INV_WAY);
418 return;
419 }
420
421 raw_spin_lock_irqsave(&l2x0_lock, flags);
422 flags = l2c220_op_pa_range(base + L2X0_CLEAN_INV_LINE_PA,
423 start, end, flags);
424 l2c_wait_mask(base + L2X0_CLEAN_INV_LINE_PA, 1);
425 __l2c220_cache_sync(base);
426 raw_spin_unlock_irqrestore(&l2x0_lock, flags);
427}
428
429static void l2c220_flush_all(void)
430{
431 l2c220_op_way(l2x0_base, L2X0_CLEAN_INV_WAY);
432}
433
434static void l2c220_sync(void)
435{
436 unsigned long flags;
437
438 raw_spin_lock_irqsave(&l2x0_lock, flags);
439 __l2c220_cache_sync(l2x0_base);
440 raw_spin_unlock_irqrestore(&l2x0_lock, flags);
441}
442
443static void l2c220_enable(void __iomem *base, u32 aux, unsigned num_lock)
444{
445 /*
446 * Always enable non-secure access to the lockdown registers -
447 * we write to them as part of the L2C enable sequence so they
448 * need to be accessible.
449 */
450 aux |= L220_AUX_CTRL_NS_LOCKDOWN;
451
452 l2c_enable(base, aux, num_lock);
453}
454
455static const struct l2c_init_data l2c220_data = {
456 .type = "L2C-220",
457 .way_size_0 = SZ_8K,
458 .num_lock = 1,
459 .enable = l2c220_enable,
460 .save = l2c_save,
461 .outer_cache = {
462 .inv_range = l2c220_inv_range,
463 .clean_range = l2c220_clean_range,
464 .flush_range = l2c220_flush_range,
465 .flush_all = l2c220_flush_all,
466 .disable = l2c_disable,
467 .sync = l2c220_sync,
468 .resume = l2c210_resume,
469 },
470};
471
472/*
473 * L2C-310 specific code.
474 *
475 * Very similar to L2C-210, the PA, set/way and sync operations are atomic,
476 * and the way operations are all background tasks. However, issuing an
477 * operation while a background operation is in progress results in a
478 * SLVERR response. We can reuse:
479 *
480 * __l2c210_cache_sync (using sync_reg_offset)
481 * l2c210_sync
482 * l2c210_inv_range (if 588369 is not applicable)
483 * l2c210_clean_range
484 * l2c210_flush_range (if 588369 is not applicable)
485 * l2c210_flush_all (if 727915 is not applicable)
486 *
487 * Errata:
488 * 588369: PL310 R0P0->R1P0, fixed R2P0.
489 * Affects: all clean+invalidate operations
490 * clean and invalidate skips the invalidate step, so we need to issue
491 * separate operations. We also require the above debug workaround
492 * enclosing this code fragment on affected parts. On unaffected parts,
493 * we must not use this workaround without the debug register writes
494 * to avoid exposing a problem similar to 727915.
495 *
496 * 727915: PL310 R2P0->R3P0, fixed R3P1.
497 * Affects: clean+invalidate by way
498 * clean and invalidate by way runs in the background, and a store can
499 * hit the line between the clean operation and invalidate operation,
500 * resulting in the store being lost.
501 *
502 * 752271: PL310 R3P0->R3P1-50REL0, fixed R3P2.
503 * Affects: 8x64-bit (double fill) line fetches
504 * double fill line fetches can fail to cause dirty data to be evicted
505 * from the cache before the new data overwrites the second line.
506 *
507 * 753970: PL310 R3P0, fixed R3P1.
508 * Affects: sync
509 * prevents merging writes after the sync operation, until another L2C
510 * operation is performed (or a number of other conditions.)
511 *
512 * 769419: PL310 R0P0->R3P1, fixed R3P2.
513 * Affects: store buffer
514 * store buffer is not automatically drained.
515 */
516static void l2c310_inv_range_erratum(unsigned long start, unsigned long end)
517{
518 void __iomem *base = l2x0_base;
519
520 if ((start | end) & (CACHE_LINE_SIZE - 1)) {
521 unsigned long flags;
522
523 /* Erratum 588369 for both clean+invalidate operations */
524 raw_spin_lock_irqsave(&l2x0_lock, flags);
525 l2c_set_debug(base, 0x03);
526
527 if (start & (CACHE_LINE_SIZE - 1)) {
528 start &= ~(CACHE_LINE_SIZE - 1);
529 writel_relaxed(start, base + L2X0_CLEAN_LINE_PA);
530 writel_relaxed(start, base + L2X0_INV_LINE_PA);
531 start += CACHE_LINE_SIZE;
532 }
533
534 if (end & (CACHE_LINE_SIZE - 1)) {
535 end &= ~(CACHE_LINE_SIZE - 1);
536 writel_relaxed(end, base + L2X0_CLEAN_LINE_PA);
537 writel_relaxed(end, base + L2X0_INV_LINE_PA);
538 }
539
540 l2c_set_debug(base, 0x00);
541 raw_spin_unlock_irqrestore(&l2x0_lock, flags);
542 }
543
544 __l2c210_op_pa_range(base + L2X0_INV_LINE_PA, start, end);
545 __l2c210_cache_sync(base);
546}
547
548static void l2c310_flush_range_erratum(unsigned long start, unsigned long end)
549{
550 raw_spinlock_t *lock = &l2x0_lock;
551 unsigned long flags;
552 void __iomem *base = l2x0_base;
553
554 raw_spin_lock_irqsave(lock, flags);
267 while (start < end) { 555 while (start < end) {
268 unsigned long blk_end = start + min(end - start, 4096UL); 556 unsigned long blk_end = start + min(end - start, 4096UL);
269 557
270 debug_writel(0x03); 558 l2c_set_debug(base, 0x03);
271 while (start < blk_end) { 559 while (start < blk_end) {
272 l2x0_flush_line(start); 560 writel_relaxed(start, base + L2X0_CLEAN_LINE_PA);
561 writel_relaxed(start, base + L2X0_INV_LINE_PA);
273 start += CACHE_LINE_SIZE; 562 start += CACHE_LINE_SIZE;
274 } 563 }
275 debug_writel(0x00); 564 l2c_set_debug(base, 0x00);
276 565
277 if (blk_end < end) { 566 if (blk_end < end) {
278 raw_spin_unlock_irqrestore(&l2x0_lock, flags); 567 raw_spin_unlock_irqrestore(lock, flags);
279 raw_spin_lock_irqsave(&l2x0_lock, flags); 568 raw_spin_lock_irqsave(lock, flags);
280 } 569 }
281 } 570 }
282 cache_wait(base + L2X0_CLEAN_INV_LINE_PA, 1); 571 raw_spin_unlock_irqrestore(lock, flags);
283 cache_sync(); 572 __l2c210_cache_sync(base);
284 raw_spin_unlock_irqrestore(&l2x0_lock, flags);
285} 573}
286 574
287static void l2x0_disable(void) 575static void l2c310_flush_all_erratum(void)
288{ 576{
577 void __iomem *base = l2x0_base;
289 unsigned long flags; 578 unsigned long flags;
290 579
291 raw_spin_lock_irqsave(&l2x0_lock, flags); 580 raw_spin_lock_irqsave(&l2x0_lock, flags);
292 __l2x0_flush_all(); 581 l2c_set_debug(base, 0x03);
293 writel_relaxed(0, l2x0_base + L2X0_CTRL); 582 __l2c_op_way(base + L2X0_CLEAN_INV_WAY);
294 dsb(st); 583 l2c_set_debug(base, 0x00);
584 __l2c210_cache_sync(base);
295 raw_spin_unlock_irqrestore(&l2x0_lock, flags); 585 raw_spin_unlock_irqrestore(&l2x0_lock, flags);
296} 586}
297 587
298static void l2x0_unlock(u32 cache_id) 588static void __init l2c310_save(void __iomem *base)
299{ 589{
300 int lockregs; 590 unsigned revision;
301 int i;
302 591
303 switch (cache_id & L2X0_CACHE_ID_PART_MASK) { 592 l2c_save(base);
304 case L2X0_CACHE_ID_PART_L310: 593
305 lockregs = 8; 594 l2x0_saved_regs.tag_latency = readl_relaxed(base +
306 break; 595 L310_TAG_LATENCY_CTRL);
307 case AURORA_CACHE_ID: 596 l2x0_saved_regs.data_latency = readl_relaxed(base +
308 lockregs = 4; 597 L310_DATA_LATENCY_CTRL);
598 l2x0_saved_regs.filter_end = readl_relaxed(base +
599 L310_ADDR_FILTER_END);
600 l2x0_saved_regs.filter_start = readl_relaxed(base +
601 L310_ADDR_FILTER_START);
602
603 revision = readl_relaxed(base + L2X0_CACHE_ID) &
604 L2X0_CACHE_ID_RTL_MASK;
605
606 /* From r2p0, there is Prefetch offset/control register */
607 if (revision >= L310_CACHE_ID_RTL_R2P0)
608 l2x0_saved_regs.prefetch_ctrl = readl_relaxed(base +
609 L310_PREFETCH_CTRL);
610
611 /* From r3p0, there is Power control register */
612 if (revision >= L310_CACHE_ID_RTL_R3P0)
613 l2x0_saved_regs.pwr_ctrl = readl_relaxed(base +
614 L310_POWER_CTRL);
615}
616
617static void l2c310_resume(void)
618{
619 void __iomem *base = l2x0_base;
620
621 if (!(readl_relaxed(base + L2X0_CTRL) & L2X0_CTRL_EN)) {
622 unsigned revision;
623
624 /* restore pl310 setup */
625 writel_relaxed(l2x0_saved_regs.tag_latency,
626 base + L310_TAG_LATENCY_CTRL);
627 writel_relaxed(l2x0_saved_regs.data_latency,
628 base + L310_DATA_LATENCY_CTRL);
629 writel_relaxed(l2x0_saved_regs.filter_end,
630 base + L310_ADDR_FILTER_END);
631 writel_relaxed(l2x0_saved_regs.filter_start,
632 base + L310_ADDR_FILTER_START);
633
634 revision = readl_relaxed(base + L2X0_CACHE_ID) &
635 L2X0_CACHE_ID_RTL_MASK;
636
637 if (revision >= L310_CACHE_ID_RTL_R2P0)
638 l2c_write_sec(l2x0_saved_regs.prefetch_ctrl, base,
639 L310_PREFETCH_CTRL);
640 if (revision >= L310_CACHE_ID_RTL_R3P0)
641 l2c_write_sec(l2x0_saved_regs.pwr_ctrl, base,
642 L310_POWER_CTRL);
643
644 l2c_enable(base, l2x0_saved_regs.aux_ctrl, 8);
645
646 /* Re-enable full-line-of-zeros for Cortex-A9 */
647 if (l2x0_saved_regs.aux_ctrl & L310_AUX_CTRL_FULL_LINE_ZERO)
648 set_auxcr(get_auxcr() | BIT(3) | BIT(2) | BIT(1));
649 }
650}
651
652static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, void *data)
653{
654 switch (act & ~CPU_TASKS_FROZEN) {
655 case CPU_STARTING:
656 set_auxcr(get_auxcr() | BIT(3) | BIT(2) | BIT(1));
309 break; 657 break;
310 default: 658 case CPU_DYING:
311 /* L210 and unknown types */ 659 set_auxcr(get_auxcr() & ~(BIT(3) | BIT(2) | BIT(1)));
312 lockregs = 1;
313 break; 660 break;
314 } 661 }
662 return NOTIFY_OK;
663}
315 664
316 for (i = 0; i < lockregs; i++) { 665static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
317 writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_D_BASE + 666{
318 i * L2X0_LOCKDOWN_STRIDE); 667 unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK;
319 writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_I_BASE + 668 bool cortex_a9 = read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9;
320 i * L2X0_LOCKDOWN_STRIDE); 669
670 if (rev >= L310_CACHE_ID_RTL_R2P0) {
671 if (cortex_a9) {
672 aux |= L310_AUX_CTRL_EARLY_BRESP;
673 pr_info("L2C-310 enabling early BRESP for Cortex-A9\n");
674 } else if (aux & L310_AUX_CTRL_EARLY_BRESP) {
675 pr_warn("L2C-310 early BRESP only supported with Cortex-A9\n");
676 aux &= ~L310_AUX_CTRL_EARLY_BRESP;
677 }
678 }
679
680 if (cortex_a9) {
681 u32 aux_cur = readl_relaxed(base + L2X0_AUX_CTRL);
682 u32 acr = get_auxcr();
683
684 pr_debug("Cortex-A9 ACR=0x%08x\n", acr);
685
686 if (acr & BIT(3) && !(aux_cur & L310_AUX_CTRL_FULL_LINE_ZERO))
687 pr_err("L2C-310: full line of zeros enabled in Cortex-A9 but not L2C-310 - invalid\n");
688
689 if (aux & L310_AUX_CTRL_FULL_LINE_ZERO && !(acr & BIT(3)))
690 pr_err("L2C-310: enabling full line of zeros but not enabled in Cortex-A9\n");
691
692 if (!(aux & L310_AUX_CTRL_FULL_LINE_ZERO) && !outer_cache.write_sec) {
693 aux |= L310_AUX_CTRL_FULL_LINE_ZERO;
694 pr_info("L2C-310 full line of zeros enabled for Cortex-A9\n");
695 }
696 } else if (aux & (L310_AUX_CTRL_FULL_LINE_ZERO | L310_AUX_CTRL_EARLY_BRESP)) {
697 pr_err("L2C-310: disabling Cortex-A9 specific feature bits\n");
698 aux &= ~(L310_AUX_CTRL_FULL_LINE_ZERO | L310_AUX_CTRL_EARLY_BRESP);
699 }
700
701 if (aux & (L310_AUX_CTRL_DATA_PREFETCH | L310_AUX_CTRL_INSTR_PREFETCH)) {
702 u32 prefetch = readl_relaxed(base + L310_PREFETCH_CTRL);
703
704 pr_info("L2C-310 %s%s prefetch enabled, offset %u lines\n",
705 aux & L310_AUX_CTRL_INSTR_PREFETCH ? "I" : "",
706 aux & L310_AUX_CTRL_DATA_PREFETCH ? "D" : "",
707 1 + (prefetch & L310_PREFETCH_CTRL_OFFSET_MASK));
708 }
709
710 /* r3p0 or later has power control register */
711 if (rev >= L310_CACHE_ID_RTL_R3P0) {
712 u32 power_ctrl;
713
714 l2c_write_sec(L310_DYNAMIC_CLK_GATING_EN | L310_STNDBY_MODE_EN,
715 base, L310_POWER_CTRL);
716 power_ctrl = readl_relaxed(base + L310_POWER_CTRL);
717 pr_info("L2C-310 dynamic clock gating %sabled, standby mode %sabled\n",
718 power_ctrl & L310_DYNAMIC_CLK_GATING_EN ? "en" : "dis",
719 power_ctrl & L310_STNDBY_MODE_EN ? "en" : "dis");
720 }
721
722 /*
723 * Always enable non-secure access to the lockdown registers -
724 * we write to them as part of the L2C enable sequence so they
725 * need to be accessible.
726 */
727 aux |= L310_AUX_CTRL_NS_LOCKDOWN;
728
729 l2c_enable(base, aux, num_lock);
730
731 if (aux & L310_AUX_CTRL_FULL_LINE_ZERO) {
732 set_auxcr(get_auxcr() | BIT(3) | BIT(2) | BIT(1));
733 cpu_notifier(l2c310_cpu_enable_flz, 0);
321 } 734 }
322} 735}
323 736
324void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask) 737static void __init l2c310_fixup(void __iomem *base, u32 cache_id,
738 struct outer_cache_fns *fns)
325{ 739{
326 u32 aux; 740 unsigned revision = cache_id & L2X0_CACHE_ID_RTL_MASK;
327 u32 cache_id; 741 const char *errata[8];
328 u32 way_size = 0; 742 unsigned n = 0;
329 int ways; 743
330 int way_size_shift = L2X0_WAY_SIZE_SHIFT; 744 if (IS_ENABLED(CONFIG_PL310_ERRATA_588369) &&
331 const char *type; 745 revision < L310_CACHE_ID_RTL_R2P0 &&
746 /* For bcm compatibility */
747 fns->inv_range == l2c210_inv_range) {
748 fns->inv_range = l2c310_inv_range_erratum;
749 fns->flush_range = l2c310_flush_range_erratum;
750 errata[n++] = "588369";
751 }
332 752
333 l2x0_base = base; 753 if (IS_ENABLED(CONFIG_PL310_ERRATA_727915) &&
334 if (cache_id_part_number_from_dt) 754 revision >= L310_CACHE_ID_RTL_R2P0 &&
335 cache_id = cache_id_part_number_from_dt; 755 revision < L310_CACHE_ID_RTL_R3P1) {
336 else 756 fns->flush_all = l2c310_flush_all_erratum;
337 cache_id = readl_relaxed(l2x0_base + L2X0_CACHE_ID); 757 errata[n++] = "727915";
338 aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL); 758 }
759
760 if (revision >= L310_CACHE_ID_RTL_R3P0 &&
761 revision < L310_CACHE_ID_RTL_R3P2) {
762 u32 val = readl_relaxed(base + L310_PREFETCH_CTRL);
763 /* I don't think bit23 is required here... but iMX6 does so */
764 if (val & (BIT(30) | BIT(23))) {
765 val &= ~(BIT(30) | BIT(23));
766 l2c_write_sec(val, base, L310_PREFETCH_CTRL);
767 errata[n++] = "752271";
768 }
769 }
770
771 if (IS_ENABLED(CONFIG_PL310_ERRATA_753970) &&
772 revision == L310_CACHE_ID_RTL_R3P0) {
773 sync_reg_offset = L2X0_DUMMY_REG;
774 errata[n++] = "753970";
775 }
776
777 if (IS_ENABLED(CONFIG_PL310_ERRATA_769419))
778 errata[n++] = "769419";
779
780 if (n) {
781 unsigned i;
339 782
783 pr_info("L2C-310 errat%s", n > 1 ? "a" : "um");
784 for (i = 0; i < n; i++)
785 pr_cont(" %s", errata[i]);
786 pr_cont(" enabled\n");
787 }
788}
789
790static void l2c310_disable(void)
791{
792 /*
793 * If full-line-of-zeros is enabled, we must first disable it in the
794 * Cortex-A9 auxiliary control register before disabling the L2 cache.
795 */
796 if (l2x0_saved_regs.aux_ctrl & L310_AUX_CTRL_FULL_LINE_ZERO)
797 set_auxcr(get_auxcr() & ~(BIT(3) | BIT(2) | BIT(1)));
798
799 l2c_disable();
800}
801
802static const struct l2c_init_data l2c310_init_fns __initconst = {
803 .type = "L2C-310",
804 .way_size_0 = SZ_8K,
805 .num_lock = 8,
806 .enable = l2c310_enable,
807 .fixup = l2c310_fixup,
808 .save = l2c310_save,
809 .outer_cache = {
810 .inv_range = l2c210_inv_range,
811 .clean_range = l2c210_clean_range,
812 .flush_range = l2c210_flush_range,
813 .flush_all = l2c210_flush_all,
814 .disable = l2c310_disable,
815 .sync = l2c210_sync,
816 .resume = l2c310_resume,
817 },
818};
819
820static void __init __l2c_init(const struct l2c_init_data *data,
821 u32 aux_val, u32 aux_mask, u32 cache_id)
822{
823 struct outer_cache_fns fns;
824 unsigned way_size_bits, ways;
825 u32 aux, old_aux;
826
827 /*
828 * Sanity check the aux values. aux_mask is the bits we preserve
829 * from reading the hardware register, and aux_val is the bits we
830 * set.
831 */
832 if (aux_val & aux_mask)
833 pr_alert("L2C: platform provided aux values permit register corruption.\n");
834
835 old_aux = aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
340 aux &= aux_mask; 836 aux &= aux_mask;
341 aux |= aux_val; 837 aux |= aux_val;
342 838
839 if (old_aux != aux)
840 pr_warn("L2C: DT/platform modifies aux control register: 0x%08x -> 0x%08x\n",
841 old_aux, aux);
842
343 /* Determine the number of ways */ 843 /* Determine the number of ways */
344 switch (cache_id & L2X0_CACHE_ID_PART_MASK) { 844 switch (cache_id & L2X0_CACHE_ID_PART_MASK) {
345 case L2X0_CACHE_ID_PART_L310: 845 case L2X0_CACHE_ID_PART_L310:
846 if ((aux_val | ~aux_mask) & (L2C_AUX_CTRL_WAY_SIZE_MASK | L310_AUX_CTRL_ASSOCIATIVITY_16))
847 pr_warn("L2C: DT/platform tries to modify or specify cache size\n");
346 if (aux & (1 << 16)) 848 if (aux & (1 << 16))
347 ways = 16; 849 ways = 16;
348 else 850 else
349 ways = 8; 851 ways = 8;
350 type = "L310";
351#ifdef CONFIG_PL310_ERRATA_753970
352 /* Unmapped register. */
353 sync_reg_offset = L2X0_DUMMY_REG;
354#endif
355 if ((cache_id & L2X0_CACHE_ID_RTL_MASK) <= L2X0_CACHE_ID_RTL_R3P0)
356 outer_cache.set_debug = pl310_set_debug;
357 break; 852 break;
853
358 case L2X0_CACHE_ID_PART_L210: 854 case L2X0_CACHE_ID_PART_L210:
855 case L2X0_CACHE_ID_PART_L220:
359 ways = (aux >> 13) & 0xf; 856 ways = (aux >> 13) & 0xf;
360 type = "L210";
361 break; 857 break;
362 858
363 case AURORA_CACHE_ID: 859 case AURORA_CACHE_ID:
364 sync_reg_offset = AURORA_SYNC_REG;
365 ways = (aux >> 13) & 0xf; 860 ways = (aux >> 13) & 0xf;
366 ways = 2 << ((ways + 1) >> 2); 861 ways = 2 << ((ways + 1) >> 2);
367 way_size_shift = AURORA_WAY_SIZE_SHIFT;
368 type = "Aurora";
369 break; 862 break;
863
370 default: 864 default:
371 /* Assume unknown chips have 8 ways */ 865 /* Assume unknown chips have 8 ways */
372 ways = 8; 866 ways = 8;
373 type = "L2x0 series";
374 break; 867 break;
375 } 868 }
376 869
377 l2x0_way_mask = (1 << ways) - 1; 870 l2x0_way_mask = (1 << ways) - 1;
378 871
379 /* 872 /*
380 * L2 cache Size = Way size * Number of ways 873 * way_size_0 is the size that a way_size value of zero would be
874 * given the calculation: way_size = way_size_0 << way_size_bits.
875 * So, if way_size_bits=0 is reserved, but way_size_bits=1 is 16k,
876 * then way_size_0 would be 8k.
877 *
878 * L2 cache size = number of ways * way size.
381 */ 879 */
382 way_size = (aux & L2X0_AUX_CTRL_WAY_SIZE_MASK) >> 17; 880 way_size_bits = (aux & L2C_AUX_CTRL_WAY_SIZE_MASK) >>
383 way_size = 1 << (way_size + way_size_shift); 881 L2C_AUX_CTRL_WAY_SIZE_SHIFT;
882 l2x0_size = ways * (data->way_size_0 << way_size_bits);
384 883
385 l2x0_size = ways * way_size * SZ_1K; 884 fns = data->outer_cache;
885 fns.write_sec = outer_cache.write_sec;
886 if (data->fixup)
887 data->fixup(l2x0_base, cache_id, &fns);
386 888
387 /* 889 /*
388 * Check if l2x0 controller is already enabled. 890 * Check if l2x0 controller is already enabled. If we are booting
389 * If you are booting from non-secure mode 891 * in non-secure mode accessing the below registers will fault.
390 * accessing the below registers will fault.
391 */ 892 */
392 if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { 893 if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN))
393 /* Make sure that I&D is not locked down when starting */ 894 data->enable(l2x0_base, aux, data->num_lock);
394 l2x0_unlock(cache_id);
395 895
396 /* l2x0 controller is disabled */ 896 outer_cache = fns;
397 writel_relaxed(aux, l2x0_base + L2X0_AUX_CTRL);
398 897
399 l2x0_inv_all(); 898 /*
400 899 * It is strange to save the register state before initialisation,
401 /* enable L2X0 */ 900 * but hey, this is what the DT implementations decided to do.
402 writel_relaxed(L2X0_CTRL_EN, l2x0_base + L2X0_CTRL); 901 */
403 } 902 if (data->save)
903 data->save(l2x0_base);
404 904
405 /* Re-read it in case some bits are reserved. */ 905 /* Re-read it in case some bits are reserved. */
406 aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL); 906 aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
407 907
408 /* Save the value for resuming. */ 908 pr_info("%s cache controller enabled, %d ways, %d kB\n",
409 l2x0_saved_regs.aux_ctrl = aux; 909 data->type, ways, l2x0_size >> 10);
910 pr_info("%s: CACHE_ID 0x%08x, AUX_CTRL 0x%08x\n",
911 data->type, cache_id, aux);
912}
913
914void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask)
915{
916 const struct l2c_init_data *data;
917 u32 cache_id;
918
919 l2x0_base = base;
920
921 cache_id = readl_relaxed(base + L2X0_CACHE_ID);
922
923 switch (cache_id & L2X0_CACHE_ID_PART_MASK) {
924 default:
925 case L2X0_CACHE_ID_PART_L210:
926 data = &l2c210_data;
927 break;
410 928
411 if (!of_init) { 929 case L2X0_CACHE_ID_PART_L220:
412 outer_cache.inv_range = l2x0_inv_range; 930 data = &l2c220_data;
413 outer_cache.clean_range = l2x0_clean_range; 931 break;
414 outer_cache.flush_range = l2x0_flush_range; 932
415 outer_cache.sync = l2x0_cache_sync; 933 case L2X0_CACHE_ID_PART_L310:
416 outer_cache.flush_all = l2x0_flush_all; 934 data = &l2c310_init_fns;
417 outer_cache.inv_all = l2x0_inv_all; 935 break;
418 outer_cache.disable = l2x0_disable;
419 } 936 }
420 937
421 pr_info("%s cache controller enabled\n", type); 938 __l2c_init(data, aux_val, aux_mask, cache_id);
422 pr_info("l2x0: %d ways, CACHE_ID 0x%08x, AUX_CTRL 0x%08x, Cache size: %d kB\n",
423 ways, cache_id, aux, l2x0_size >> 10);
424} 939}
425 940
426#ifdef CONFIG_OF 941#ifdef CONFIG_OF
427static int l2_wt_override; 942static int l2_wt_override;
428 943
944/* Aurora don't have the cache ID register available, so we have to
945 * pass it though the device tree */
946static u32 cache_id_part_number_from_dt;
947
948static void __init l2x0_of_parse(const struct device_node *np,
949 u32 *aux_val, u32 *aux_mask)
950{
951 u32 data[2] = { 0, 0 };
952 u32 tag = 0;
953 u32 dirty = 0;
954 u32 val = 0, mask = 0;
955
956 of_property_read_u32(np, "arm,tag-latency", &tag);
957 if (tag) {
958 mask |= L2X0_AUX_CTRL_TAG_LATENCY_MASK;
959 val |= (tag - 1) << L2X0_AUX_CTRL_TAG_LATENCY_SHIFT;
960 }
961
962 of_property_read_u32_array(np, "arm,data-latency",
963 data, ARRAY_SIZE(data));
964 if (data[0] && data[1]) {
965 mask |= L2X0_AUX_CTRL_DATA_RD_LATENCY_MASK |
966 L2X0_AUX_CTRL_DATA_WR_LATENCY_MASK;
967 val |= ((data[0] - 1) << L2X0_AUX_CTRL_DATA_RD_LATENCY_SHIFT) |
968 ((data[1] - 1) << L2X0_AUX_CTRL_DATA_WR_LATENCY_SHIFT);
969 }
970
971 of_property_read_u32(np, "arm,dirty-latency", &dirty);
972 if (dirty) {
973 mask |= L2X0_AUX_CTRL_DIRTY_LATENCY_MASK;
974 val |= (dirty - 1) << L2X0_AUX_CTRL_DIRTY_LATENCY_SHIFT;
975 }
976
977 *aux_val &= ~mask;
978 *aux_val |= val;
979 *aux_mask &= ~mask;
980}
981
982static const struct l2c_init_data of_l2c210_data __initconst = {
983 .type = "L2C-210",
984 .way_size_0 = SZ_8K,
985 .num_lock = 1,
986 .of_parse = l2x0_of_parse,
987 .enable = l2c_enable,
988 .save = l2c_save,
989 .outer_cache = {
990 .inv_range = l2c210_inv_range,
991 .clean_range = l2c210_clean_range,
992 .flush_range = l2c210_flush_range,
993 .flush_all = l2c210_flush_all,
994 .disable = l2c_disable,
995 .sync = l2c210_sync,
996 .resume = l2c210_resume,
997 },
998};
999
1000static const struct l2c_init_data of_l2c220_data __initconst = {
1001 .type = "L2C-220",
1002 .way_size_0 = SZ_8K,
1003 .num_lock = 1,
1004 .of_parse = l2x0_of_parse,
1005 .enable = l2c220_enable,
1006 .save = l2c_save,
1007 .outer_cache = {
1008 .inv_range = l2c220_inv_range,
1009 .clean_range = l2c220_clean_range,
1010 .flush_range = l2c220_flush_range,
1011 .flush_all = l2c220_flush_all,
1012 .disable = l2c_disable,
1013 .sync = l2c220_sync,
1014 .resume = l2c210_resume,
1015 },
1016};
1017
1018static void __init l2c310_of_parse(const struct device_node *np,
1019 u32 *aux_val, u32 *aux_mask)
1020{
1021 u32 data[3] = { 0, 0, 0 };
1022 u32 tag[3] = { 0, 0, 0 };
1023 u32 filter[2] = { 0, 0 };
1024
1025 of_property_read_u32_array(np, "arm,tag-latency", tag, ARRAY_SIZE(tag));
1026 if (tag[0] && tag[1] && tag[2])
1027 writel_relaxed(
1028 L310_LATENCY_CTRL_RD(tag[0] - 1) |
1029 L310_LATENCY_CTRL_WR(tag[1] - 1) |
1030 L310_LATENCY_CTRL_SETUP(tag[2] - 1),
1031 l2x0_base + L310_TAG_LATENCY_CTRL);
1032
1033 of_property_read_u32_array(np, "arm,data-latency",
1034 data, ARRAY_SIZE(data));
1035 if (data[0] && data[1] && data[2])
1036 writel_relaxed(
1037 L310_LATENCY_CTRL_RD(data[0] - 1) |
1038 L310_LATENCY_CTRL_WR(data[1] - 1) |
1039 L310_LATENCY_CTRL_SETUP(data[2] - 1),
1040 l2x0_base + L310_DATA_LATENCY_CTRL);
1041
1042 of_property_read_u32_array(np, "arm,filter-ranges",
1043 filter, ARRAY_SIZE(filter));
1044 if (filter[1]) {
1045 writel_relaxed(ALIGN(filter[0] + filter[1], SZ_1M),
1046 l2x0_base + L310_ADDR_FILTER_END);
1047 writel_relaxed((filter[0] & ~(SZ_1M - 1)) | L310_ADDR_FILTER_EN,
1048 l2x0_base + L310_ADDR_FILTER_START);
1049 }
1050}
1051
1052static const struct l2c_init_data of_l2c310_data __initconst = {
1053 .type = "L2C-310",
1054 .way_size_0 = SZ_8K,
1055 .num_lock = 8,
1056 .of_parse = l2c310_of_parse,
1057 .enable = l2c310_enable,
1058 .fixup = l2c310_fixup,
1059 .save = l2c310_save,
1060 .outer_cache = {
1061 .inv_range = l2c210_inv_range,
1062 .clean_range = l2c210_clean_range,
1063 .flush_range = l2c210_flush_range,
1064 .flush_all = l2c210_flush_all,
1065 .disable = l2c310_disable,
1066 .sync = l2c210_sync,
1067 .resume = l2c310_resume,
1068 },
1069};
1070
429/* 1071/*
430 * Note that the end addresses passed to Linux primitives are 1072 * Note that the end addresses passed to Linux primitives are
431 * noninclusive, while the hardware cache range operations use 1073 * noninclusive, while the hardware cache range operations use
@@ -524,6 +1166,100 @@ static void aurora_flush_range(unsigned long start, unsigned long end)
524 } 1166 }
525} 1167}
526 1168
1169static void aurora_save(void __iomem *base)
1170{
1171 l2x0_saved_regs.ctrl = readl_relaxed(base + L2X0_CTRL);
1172 l2x0_saved_regs.aux_ctrl = readl_relaxed(base + L2X0_AUX_CTRL);
1173}
1174
1175static void aurora_resume(void)
1176{
1177 void __iomem *base = l2x0_base;
1178
1179 if (!(readl(base + L2X0_CTRL) & L2X0_CTRL_EN)) {
1180 writel_relaxed(l2x0_saved_regs.aux_ctrl, base + L2X0_AUX_CTRL);
1181 writel_relaxed(l2x0_saved_regs.ctrl, base + L2X0_CTRL);
1182 }
1183}
1184
1185/*
1186 * For Aurora cache in no outer mode, enable via the CP15 coprocessor
1187 * broadcasting of cache commands to L2.
1188 */
1189static void __init aurora_enable_no_outer(void __iomem *base, u32 aux,
1190 unsigned num_lock)
1191{
1192 u32 u;
1193
1194 asm volatile("mrc p15, 1, %0, c15, c2, 0" : "=r" (u));
1195 u |= AURORA_CTRL_FW; /* Set the FW bit */
1196 asm volatile("mcr p15, 1, %0, c15, c2, 0" : : "r" (u));
1197
1198 isb();
1199
1200 l2c_enable(base, aux, num_lock);
1201}
1202
1203static void __init aurora_fixup(void __iomem *base, u32 cache_id,
1204 struct outer_cache_fns *fns)
1205{
1206 sync_reg_offset = AURORA_SYNC_REG;
1207}
1208
1209static void __init aurora_of_parse(const struct device_node *np,
1210 u32 *aux_val, u32 *aux_mask)
1211{
1212 u32 val = AURORA_ACR_REPLACEMENT_TYPE_SEMIPLRU;
1213 u32 mask = AURORA_ACR_REPLACEMENT_MASK;
1214
1215 of_property_read_u32(np, "cache-id-part",
1216 &cache_id_part_number_from_dt);
1217
1218 /* Determine and save the write policy */
1219 l2_wt_override = of_property_read_bool(np, "wt-override");
1220
1221 if (l2_wt_override) {
1222 val |= AURORA_ACR_FORCE_WRITE_THRO_POLICY;
1223 mask |= AURORA_ACR_FORCE_WRITE_POLICY_MASK;
1224 }
1225
1226 *aux_val &= ~mask;
1227 *aux_val |= val;
1228 *aux_mask &= ~mask;
1229}
1230
1231static const struct l2c_init_data of_aurora_with_outer_data __initconst = {
1232 .type = "Aurora",
1233 .way_size_0 = SZ_4K,
1234 .num_lock = 4,
1235 .of_parse = aurora_of_parse,
1236 .enable = l2c_enable,
1237 .fixup = aurora_fixup,
1238 .save = aurora_save,
1239 .outer_cache = {
1240 .inv_range = aurora_inv_range,
1241 .clean_range = aurora_clean_range,
1242 .flush_range = aurora_flush_range,
1243 .flush_all = l2x0_flush_all,
1244 .disable = l2x0_disable,
1245 .sync = l2x0_cache_sync,
1246 .resume = aurora_resume,
1247 },
1248};
1249
1250static const struct l2c_init_data of_aurora_no_outer_data __initconst = {
1251 .type = "Aurora",
1252 .way_size_0 = SZ_4K,
1253 .num_lock = 4,
1254 .of_parse = aurora_of_parse,
1255 .enable = aurora_enable_no_outer,
1256 .fixup = aurora_fixup,
1257 .save = aurora_save,
1258 .outer_cache = {
1259 .resume = aurora_resume,
1260 },
1261};
1262
527/* 1263/*
528 * For certain Broadcom SoCs, depending on the address range, different offsets 1264 * For certain Broadcom SoCs, depending on the address range, different offsets
529 * need to be added to the address before passing it to L2 for 1265 * need to be added to the address before passing it to L2 for
@@ -588,16 +1324,16 @@ static void bcm_inv_range(unsigned long start, unsigned long end)
588 1324
589 /* normal case, no cross section between start and end */ 1325 /* normal case, no cross section between start and end */
590 if (likely(bcm_addr_is_sys_emi(end) || !bcm_addr_is_sys_emi(start))) { 1326 if (likely(bcm_addr_is_sys_emi(end) || !bcm_addr_is_sys_emi(start))) {
591 l2x0_inv_range(new_start, new_end); 1327 l2c210_inv_range(new_start, new_end);
592 return; 1328 return;
593 } 1329 }
594 1330
595 /* They cross sections, so it can only be a cross from section 1331 /* They cross sections, so it can only be a cross from section
596 * 2 to section 3 1332 * 2 to section 3
597 */ 1333 */
598 l2x0_inv_range(new_start, 1334 l2c210_inv_range(new_start,
599 bcm_l2_phys_addr(BCM_VC_EMI_SEC3_START_ADDR-1)); 1335 bcm_l2_phys_addr(BCM_VC_EMI_SEC3_START_ADDR-1));
600 l2x0_inv_range(bcm_l2_phys_addr(BCM_VC_EMI_SEC3_START_ADDR), 1336 l2c210_inv_range(bcm_l2_phys_addr(BCM_VC_EMI_SEC3_START_ADDR),
601 new_end); 1337 new_end);
602} 1338}
603 1339
@@ -610,26 +1346,21 @@ static void bcm_clean_range(unsigned long start, unsigned long end)
610 if (unlikely(end <= start)) 1346 if (unlikely(end <= start))
611 return; 1347 return;
612 1348
613 if ((end - start) >= l2x0_size) {
614 l2x0_clean_all();
615 return;
616 }
617
618 new_start = bcm_l2_phys_addr(start); 1349 new_start = bcm_l2_phys_addr(start);
619 new_end = bcm_l2_phys_addr(end); 1350 new_end = bcm_l2_phys_addr(end);
620 1351
621 /* normal case, no cross section between start and end */ 1352 /* normal case, no cross section between start and end */
622 if (likely(bcm_addr_is_sys_emi(end) || !bcm_addr_is_sys_emi(start))) { 1353 if (likely(bcm_addr_is_sys_emi(end) || !bcm_addr_is_sys_emi(start))) {
623 l2x0_clean_range(new_start, new_end); 1354 l2c210_clean_range(new_start, new_end);
624 return; 1355 return;
625 } 1356 }
626 1357
627 /* They cross sections, so it can only be a cross from section 1358 /* They cross sections, so it can only be a cross from section
628 * 2 to section 3 1359 * 2 to section 3
629 */ 1360 */
630 l2x0_clean_range(new_start, 1361 l2c210_clean_range(new_start,
631 bcm_l2_phys_addr(BCM_VC_EMI_SEC3_START_ADDR-1)); 1362 bcm_l2_phys_addr(BCM_VC_EMI_SEC3_START_ADDR-1));
632 l2x0_clean_range(bcm_l2_phys_addr(BCM_VC_EMI_SEC3_START_ADDR), 1363 l2c210_clean_range(bcm_l2_phys_addr(BCM_VC_EMI_SEC3_START_ADDR),
633 new_end); 1364 new_end);
634} 1365}
635 1366
@@ -643,7 +1374,7 @@ static void bcm_flush_range(unsigned long start, unsigned long end)
643 return; 1374 return;
644 1375
645 if ((end - start) >= l2x0_size) { 1376 if ((end - start) >= l2x0_size) {
646 l2x0_flush_all(); 1377 outer_cache.flush_all();
647 return; 1378 return;
648 } 1379 }
649 1380
@@ -652,283 +1383,67 @@ static void bcm_flush_range(unsigned long start, unsigned long end)
652 1383
653 /* normal case, no cross section between start and end */ 1384 /* normal case, no cross section between start and end */
654 if (likely(bcm_addr_is_sys_emi(end) || !bcm_addr_is_sys_emi(start))) { 1385 if (likely(bcm_addr_is_sys_emi(end) || !bcm_addr_is_sys_emi(start))) {
655 l2x0_flush_range(new_start, new_end); 1386 l2c210_flush_range(new_start, new_end);
656 return; 1387 return;
657 } 1388 }
658 1389
659 /* They cross sections, so it can only be a cross from section 1390 /* They cross sections, so it can only be a cross from section
660 * 2 to section 3 1391 * 2 to section 3
661 */ 1392 */
662 l2x0_flush_range(new_start, 1393 l2c210_flush_range(new_start,
663 bcm_l2_phys_addr(BCM_VC_EMI_SEC3_START_ADDR-1)); 1394 bcm_l2_phys_addr(BCM_VC_EMI_SEC3_START_ADDR-1));
664 l2x0_flush_range(bcm_l2_phys_addr(BCM_VC_EMI_SEC3_START_ADDR), 1395 l2c210_flush_range(bcm_l2_phys_addr(BCM_VC_EMI_SEC3_START_ADDR),
665 new_end); 1396 new_end);
666} 1397}
667 1398
668static void __init l2x0_of_setup(const struct device_node *np, 1399/* Broadcom L2C-310 start from ARMs R3P2 or later, and require no fixups */
669 u32 *aux_val, u32 *aux_mask) 1400static const struct l2c_init_data of_bcm_l2x0_data __initconst = {
670{ 1401 .type = "BCM-L2C-310",
671 u32 data[2] = { 0, 0 }; 1402 .way_size_0 = SZ_8K,
672 u32 tag = 0; 1403 .num_lock = 8,
673 u32 dirty = 0; 1404 .of_parse = l2c310_of_parse,
674 u32 val = 0, mask = 0; 1405 .enable = l2c310_enable,
675 1406 .save = l2c310_save,
676 of_property_read_u32(np, "arm,tag-latency", &tag); 1407 .outer_cache = {
677 if (tag) { 1408 .inv_range = bcm_inv_range,
678 mask |= L2X0_AUX_CTRL_TAG_LATENCY_MASK; 1409 .clean_range = bcm_clean_range,
679 val |= (tag - 1) << L2X0_AUX_CTRL_TAG_LATENCY_SHIFT; 1410 .flush_range = bcm_flush_range,
680 } 1411 .flush_all = l2c210_flush_all,
681 1412 .disable = l2c310_disable,
682 of_property_read_u32_array(np, "arm,data-latency", 1413 .sync = l2c210_sync,
683 data, ARRAY_SIZE(data)); 1414 .resume = l2c310_resume,
684 if (data[0] && data[1]) { 1415 },
685 mask |= L2X0_AUX_CTRL_DATA_RD_LATENCY_MASK | 1416};
686 L2X0_AUX_CTRL_DATA_WR_LATENCY_MASK;
687 val |= ((data[0] - 1) << L2X0_AUX_CTRL_DATA_RD_LATENCY_SHIFT) |
688 ((data[1] - 1) << L2X0_AUX_CTRL_DATA_WR_LATENCY_SHIFT);
689 }
690
691 of_property_read_u32(np, "arm,dirty-latency", &dirty);
692 if (dirty) {
693 mask |= L2X0_AUX_CTRL_DIRTY_LATENCY_MASK;
694 val |= (dirty - 1) << L2X0_AUX_CTRL_DIRTY_LATENCY_SHIFT;
695 }
696
697 *aux_val &= ~mask;
698 *aux_val |= val;
699 *aux_mask &= ~mask;
700}
701
702static void __init pl310_of_setup(const struct device_node *np,
703 u32 *aux_val, u32 *aux_mask)
704{
705 u32 data[3] = { 0, 0, 0 };
706 u32 tag[3] = { 0, 0, 0 };
707 u32 filter[2] = { 0, 0 };
708
709 of_property_read_u32_array(np, "arm,tag-latency", tag, ARRAY_SIZE(tag));
710 if (tag[0] && tag[1] && tag[2])
711 writel_relaxed(
712 ((tag[0] - 1) << L2X0_LATENCY_CTRL_RD_SHIFT) |
713 ((tag[1] - 1) << L2X0_LATENCY_CTRL_WR_SHIFT) |
714 ((tag[2] - 1) << L2X0_LATENCY_CTRL_SETUP_SHIFT),
715 l2x0_base + L2X0_TAG_LATENCY_CTRL);
716
717 of_property_read_u32_array(np, "arm,data-latency",
718 data, ARRAY_SIZE(data));
719 if (data[0] && data[1] && data[2])
720 writel_relaxed(
721 ((data[0] - 1) << L2X0_LATENCY_CTRL_RD_SHIFT) |
722 ((data[1] - 1) << L2X0_LATENCY_CTRL_WR_SHIFT) |
723 ((data[2] - 1) << L2X0_LATENCY_CTRL_SETUP_SHIFT),
724 l2x0_base + L2X0_DATA_LATENCY_CTRL);
725
726 of_property_read_u32_array(np, "arm,filter-ranges",
727 filter, ARRAY_SIZE(filter));
728 if (filter[1]) {
729 writel_relaxed(ALIGN(filter[0] + filter[1], SZ_1M),
730 l2x0_base + L2X0_ADDR_FILTER_END);
731 writel_relaxed((filter[0] & ~(SZ_1M - 1)) | L2X0_ADDR_FILTER_EN,
732 l2x0_base + L2X0_ADDR_FILTER_START);
733 }
734}
735
736static void __init pl310_save(void)
737{
738 u32 l2x0_revision = readl_relaxed(l2x0_base + L2X0_CACHE_ID) &
739 L2X0_CACHE_ID_RTL_MASK;
740
741 l2x0_saved_regs.tag_latency = readl_relaxed(l2x0_base +
742 L2X0_TAG_LATENCY_CTRL);
743 l2x0_saved_regs.data_latency = readl_relaxed(l2x0_base +
744 L2X0_DATA_LATENCY_CTRL);
745 l2x0_saved_regs.filter_end = readl_relaxed(l2x0_base +
746 L2X0_ADDR_FILTER_END);
747 l2x0_saved_regs.filter_start = readl_relaxed(l2x0_base +
748 L2X0_ADDR_FILTER_START);
749
750 if (l2x0_revision >= L2X0_CACHE_ID_RTL_R2P0) {
751 /*
752 * From r2p0, there is Prefetch offset/control register
753 */
754 l2x0_saved_regs.prefetch_ctrl = readl_relaxed(l2x0_base +
755 L2X0_PREFETCH_CTRL);
756 /*
757 * From r3p0, there is Power control register
758 */
759 if (l2x0_revision >= L2X0_CACHE_ID_RTL_R3P0)
760 l2x0_saved_regs.pwr_ctrl = readl_relaxed(l2x0_base +
761 L2X0_POWER_CTRL);
762 }
763}
764 1417
765static void aurora_save(void) 1418static void __init tauros3_save(void __iomem *base)
766{ 1419{
767 l2x0_saved_regs.ctrl = readl_relaxed(l2x0_base + L2X0_CTRL); 1420 l2c_save(base);
768 l2x0_saved_regs.aux_ctrl = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
769}
770 1421
771static void __init tauros3_save(void)
772{
773 l2x0_saved_regs.aux2_ctrl = 1422 l2x0_saved_regs.aux2_ctrl =
774 readl_relaxed(l2x0_base + TAUROS3_AUX2_CTRL); 1423 readl_relaxed(base + TAUROS3_AUX2_CTRL);
775 l2x0_saved_regs.prefetch_ctrl = 1424 l2x0_saved_regs.prefetch_ctrl =
776 readl_relaxed(l2x0_base + L2X0_PREFETCH_CTRL); 1425 readl_relaxed(base + L310_PREFETCH_CTRL);
777}
778
779static void l2x0_resume(void)
780{
781 if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
782 /* restore aux ctrl and enable l2 */
783 l2x0_unlock(readl_relaxed(l2x0_base + L2X0_CACHE_ID));
784
785 writel_relaxed(l2x0_saved_regs.aux_ctrl, l2x0_base +
786 L2X0_AUX_CTRL);
787
788 l2x0_inv_all();
789
790 writel_relaxed(L2X0_CTRL_EN, l2x0_base + L2X0_CTRL);
791 }
792}
793
794static void pl310_resume(void)
795{
796 u32 l2x0_revision;
797
798 if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
799 /* restore pl310 setup */
800 writel_relaxed(l2x0_saved_regs.tag_latency,
801 l2x0_base + L2X0_TAG_LATENCY_CTRL);
802 writel_relaxed(l2x0_saved_regs.data_latency,
803 l2x0_base + L2X0_DATA_LATENCY_CTRL);
804 writel_relaxed(l2x0_saved_regs.filter_end,
805 l2x0_base + L2X0_ADDR_FILTER_END);
806 writel_relaxed(l2x0_saved_regs.filter_start,
807 l2x0_base + L2X0_ADDR_FILTER_START);
808
809 l2x0_revision = readl_relaxed(l2x0_base + L2X0_CACHE_ID) &
810 L2X0_CACHE_ID_RTL_MASK;
811
812 if (l2x0_revision >= L2X0_CACHE_ID_RTL_R2P0) {
813 writel_relaxed(l2x0_saved_regs.prefetch_ctrl,
814 l2x0_base + L2X0_PREFETCH_CTRL);
815 if (l2x0_revision >= L2X0_CACHE_ID_RTL_R3P0)
816 writel_relaxed(l2x0_saved_regs.pwr_ctrl,
817 l2x0_base + L2X0_POWER_CTRL);
818 }
819 }
820
821 l2x0_resume();
822}
823
824static void aurora_resume(void)
825{
826 if (!(readl(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
827 writel_relaxed(l2x0_saved_regs.aux_ctrl,
828 l2x0_base + L2X0_AUX_CTRL);
829 writel_relaxed(l2x0_saved_regs.ctrl, l2x0_base + L2X0_CTRL);
830 }
831} 1426}
832 1427
833static void tauros3_resume(void) 1428static void tauros3_resume(void)
834{ 1429{
835 if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { 1430 void __iomem *base = l2x0_base;
1431
1432 if (!(readl_relaxed(base + L2X0_CTRL) & L2X0_CTRL_EN)) {
836 writel_relaxed(l2x0_saved_regs.aux2_ctrl, 1433 writel_relaxed(l2x0_saved_regs.aux2_ctrl,
837 l2x0_base + TAUROS3_AUX2_CTRL); 1434 base + TAUROS3_AUX2_CTRL);
838 writel_relaxed(l2x0_saved_regs.prefetch_ctrl, 1435 writel_relaxed(l2x0_saved_regs.prefetch_ctrl,
839 l2x0_base + L2X0_PREFETCH_CTRL); 1436 base + L310_PREFETCH_CTRL);
840 }
841 1437
842 l2x0_resume(); 1438 l2c_enable(base, l2x0_saved_regs.aux_ctrl, 8);
843}
844
845static void __init aurora_broadcast_l2_commands(void)
846{
847 __u32 u;
848 /* Enable Broadcasting of cache commands to L2*/
849 __asm__ __volatile__("mrc p15, 1, %0, c15, c2, 0" : "=r"(u));
850 u |= AURORA_CTRL_FW; /* Set the FW bit */
851 __asm__ __volatile__("mcr p15, 1, %0, c15, c2, 0\n" : : "r"(u));
852 isb();
853}
854
855static void __init aurora_of_setup(const struct device_node *np,
856 u32 *aux_val, u32 *aux_mask)
857{
858 u32 val = AURORA_ACR_REPLACEMENT_TYPE_SEMIPLRU;
859 u32 mask = AURORA_ACR_REPLACEMENT_MASK;
860
861 of_property_read_u32(np, "cache-id-part",
862 &cache_id_part_number_from_dt);
863
864 /* Determine and save the write policy */
865 l2_wt_override = of_property_read_bool(np, "wt-override");
866
867 if (l2_wt_override) {
868 val |= AURORA_ACR_FORCE_WRITE_THRO_POLICY;
869 mask |= AURORA_ACR_FORCE_WRITE_POLICY_MASK;
870 } 1439 }
871
872 *aux_val &= ~mask;
873 *aux_val |= val;
874 *aux_mask &= ~mask;
875} 1440}
876 1441
877static const struct l2x0_of_data pl310_data = { 1442static const struct l2c_init_data of_tauros3_data __initconst = {
878 .setup = pl310_of_setup, 1443 .type = "Tauros3",
879 .save = pl310_save, 1444 .way_size_0 = SZ_8K,
880 .outer_cache = { 1445 .num_lock = 8,
881 .resume = pl310_resume, 1446 .enable = l2c_enable,
882 .inv_range = l2x0_inv_range,
883 .clean_range = l2x0_clean_range,
884 .flush_range = l2x0_flush_range,
885 .sync = l2x0_cache_sync,
886 .flush_all = l2x0_flush_all,
887 .inv_all = l2x0_inv_all,
888 .disable = l2x0_disable,
889 },
890};
891
892static const struct l2x0_of_data l2x0_data = {
893 .setup = l2x0_of_setup,
894 .save = NULL,
895 .outer_cache = {
896 .resume = l2x0_resume,
897 .inv_range = l2x0_inv_range,
898 .clean_range = l2x0_clean_range,
899 .flush_range = l2x0_flush_range,
900 .sync = l2x0_cache_sync,
901 .flush_all = l2x0_flush_all,
902 .inv_all = l2x0_inv_all,
903 .disable = l2x0_disable,
904 },
905};
906
907static const struct l2x0_of_data aurora_with_outer_data = {
908 .setup = aurora_of_setup,
909 .save = aurora_save,
910 .outer_cache = {
911 .resume = aurora_resume,
912 .inv_range = aurora_inv_range,
913 .clean_range = aurora_clean_range,
914 .flush_range = aurora_flush_range,
915 .sync = l2x0_cache_sync,
916 .flush_all = l2x0_flush_all,
917 .inv_all = l2x0_inv_all,
918 .disable = l2x0_disable,
919 },
920};
921
922static const struct l2x0_of_data aurora_no_outer_data = {
923 .setup = aurora_of_setup,
924 .save = aurora_save,
925 .outer_cache = {
926 .resume = aurora_resume,
927 },
928};
929
930static const struct l2x0_of_data tauros3_data = {
931 .setup = NULL,
932 .save = tauros3_save, 1447 .save = tauros3_save,
933 /* Tauros3 broadcasts L1 cache operations to L2 */ 1448 /* Tauros3 broadcasts L1 cache operations to L2 */
934 .outer_cache = { 1449 .outer_cache = {
@@ -936,43 +1451,26 @@ static const struct l2x0_of_data tauros3_data = {
936 }, 1451 },
937}; 1452};
938 1453
939static const struct l2x0_of_data bcm_l2x0_data = { 1454#define L2C_ID(name, fns) { .compatible = name, .data = (void *)&fns }
940 .setup = pl310_of_setup,
941 .save = pl310_save,
942 .outer_cache = {
943 .resume = pl310_resume,
944 .inv_range = bcm_inv_range,
945 .clean_range = bcm_clean_range,
946 .flush_range = bcm_flush_range,
947 .sync = l2x0_cache_sync,
948 .flush_all = l2x0_flush_all,
949 .inv_all = l2x0_inv_all,
950 .disable = l2x0_disable,
951 },
952};
953
954static const struct of_device_id l2x0_ids[] __initconst = { 1455static const struct of_device_id l2x0_ids[] __initconst = {
955 { .compatible = "arm,l210-cache", .data = (void *)&l2x0_data }, 1456 L2C_ID("arm,l210-cache", of_l2c210_data),
956 { .compatible = "arm,l220-cache", .data = (void *)&l2x0_data }, 1457 L2C_ID("arm,l220-cache", of_l2c220_data),
957 { .compatible = "arm,pl310-cache", .data = (void *)&pl310_data }, 1458 L2C_ID("arm,pl310-cache", of_l2c310_data),
958 { .compatible = "bcm,bcm11351-a2-pl310-cache", /* deprecated name */ 1459 L2C_ID("brcm,bcm11351-a2-pl310-cache", of_bcm_l2x0_data),
959 .data = (void *)&bcm_l2x0_data}, 1460 L2C_ID("marvell,aurora-outer-cache", of_aurora_with_outer_data),
960 { .compatible = "brcm,bcm11351-a2-pl310-cache", 1461 L2C_ID("marvell,aurora-system-cache", of_aurora_no_outer_data),
961 .data = (void *)&bcm_l2x0_data}, 1462 L2C_ID("marvell,tauros3-cache", of_tauros3_data),
962 { .compatible = "marvell,aurora-outer-cache", 1463 /* Deprecated IDs */
963 .data = (void *)&aurora_with_outer_data}, 1464 L2C_ID("bcm,bcm11351-a2-pl310-cache", of_bcm_l2x0_data),
964 { .compatible = "marvell,aurora-system-cache",
965 .data = (void *)&aurora_no_outer_data},
966 { .compatible = "marvell,tauros3-cache",
967 .data = (void *)&tauros3_data },
968 {} 1465 {}
969}; 1466};
970 1467
971int __init l2x0_of_init(u32 aux_val, u32 aux_mask) 1468int __init l2x0_of_init(u32 aux_val, u32 aux_mask)
972{ 1469{
1470 const struct l2c_init_data *data;
973 struct device_node *np; 1471 struct device_node *np;
974 const struct l2x0_of_data *data;
975 struct resource res; 1472 struct resource res;
1473 u32 cache_id, old_aux;
976 1474
977 np = of_find_matching_node(NULL, l2x0_ids); 1475 np = of_find_matching_node(NULL, l2x0_ids);
978 if (!np) 1476 if (!np)
@@ -989,23 +1487,29 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask)
989 1487
990 data = of_match_node(l2x0_ids, np)->data; 1488 data = of_match_node(l2x0_ids, np)->data;
991 1489
992 /* L2 configuration can only be changed if the cache is disabled */ 1490 old_aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
993 if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { 1491 if (old_aux != ((old_aux & aux_mask) | aux_val)) {
994 if (data->setup) 1492 pr_warn("L2C: platform modifies aux control register: 0x%08x -> 0x%08x\n",
995 data->setup(np, &aux_val, &aux_mask); 1493 old_aux, (old_aux & aux_mask) | aux_val);
996 1494 } else if (aux_mask != ~0U && aux_val != 0) {
997 /* For aurora cache in no outer mode select the 1495 pr_alert("L2C: platform provided aux values match the hardware, so have no effect. Please remove them.\n");
998 * correct mode using the coprocessor*/
999 if (data == &aurora_no_outer_data)
1000 aurora_broadcast_l2_commands();
1001 } 1496 }
1002 1497
1003 if (data->save) 1498 /* All L2 caches are unified, so this property should be specified */
1004 data->save(); 1499 if (!of_property_read_bool(np, "cache-unified"))
1500 pr_err("L2C: device tree omits to specify unified cache\n");
1501
1502 /* L2 configuration can only be changed if the cache is disabled */
1503 if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN))
1504 if (data->of_parse)
1505 data->of_parse(np, &aux_val, &aux_mask);
1506
1507 if (cache_id_part_number_from_dt)
1508 cache_id = cache_id_part_number_from_dt;
1509 else
1510 cache_id = readl_relaxed(l2x0_base + L2X0_CACHE_ID);
1005 1511
1006 of_init = true; 1512 __l2c_init(data, aux_val, aux_mask, cache_id);
1007 memcpy(&outer_cache, &data->outer_cache, sizeof(outer_cache));
1008 l2x0_init(l2x0_base, aux_val, aux_mask);
1009 1513
1010 return 0; 1514 return 0;
1011} 1515}
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S
index 778bcf88ee79..615c99e38ba1 100644
--- a/arch/arm/mm/cache-v7.S
+++ b/arch/arm/mm/cache-v7.S
@@ -59,7 +59,7 @@ ENTRY(v7_invalidate_l1)
59 bgt 2b 59 bgt 2b
60 cmp r2, #0 60 cmp r2, #0
61 bgt 1b 61 bgt 1b
62 dsb 62 dsb st
63 isb 63 isb
64 mov pc, lr 64 mov pc, lr
65ENDPROC(v7_invalidate_l1) 65ENDPROC(v7_invalidate_l1)
@@ -166,7 +166,7 @@ skip:
166finished: 166finished:
167 mov r10, #0 @ swith back to cache level 0 167 mov r10, #0 @ swith back to cache level 0
168 mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr 168 mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr
169 dsb 169 dsb st
170 isb 170 isb
171 mov pc, lr 171 mov pc, lr
172ENDPROC(v7_flush_dcache_all) 172ENDPROC(v7_flush_dcache_all)
@@ -335,7 +335,7 @@ ENTRY(v7_flush_kern_dcache_area)
335 add r0, r0, r2 335 add r0, r0, r2
336 cmp r0, r1 336 cmp r0, r1
337 blo 1b 337 blo 1b
338 dsb 338 dsb st
339 mov pc, lr 339 mov pc, lr
340ENDPROC(v7_flush_kern_dcache_area) 340ENDPROC(v7_flush_kern_dcache_area)
341 341
@@ -368,7 +368,7 @@ v7_dma_inv_range:
368 add r0, r0, r2 368 add r0, r0, r2
369 cmp r0, r1 369 cmp r0, r1
370 blo 1b 370 blo 1b
371 dsb 371 dsb st
372 mov pc, lr 372 mov pc, lr
373ENDPROC(v7_dma_inv_range) 373ENDPROC(v7_dma_inv_range)
374 374
@@ -390,7 +390,7 @@ v7_dma_clean_range:
390 add r0, r0, r2 390 add r0, r0, r2
391 cmp r0, r1 391 cmp r0, r1
392 blo 1b 392 blo 1b
393 dsb 393 dsb st
394 mov pc, lr 394 mov pc, lr
395ENDPROC(v7_dma_clean_range) 395ENDPROC(v7_dma_clean_range)
396 396
@@ -412,7 +412,7 @@ ENTRY(v7_dma_flush_range)
412 add r0, r0, r2 412 add r0, r0, r2
413 cmp r0, r1 413 cmp r0, r1
414 blo 1b 414 blo 1b
415 dsb 415 dsb st
416 mov pc, lr 416 mov pc, lr
417ENDPROC(v7_dma_flush_range) 417ENDPROC(v7_dma_flush_range)
418 418
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 6b00be1f971e..4c88935654ca 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -390,7 +390,7 @@ static int __init atomic_pool_init(void)
390 if (!pages) 390 if (!pages)
391 goto no_pages; 391 goto no_pages;
392 392
393 if (IS_ENABLED(CONFIG_DMA_CMA)) 393 if (dev_get_cma_area(NULL))
394 ptr = __alloc_from_contiguous(NULL, pool->size, prot, &page, 394 ptr = __alloc_from_contiguous(NULL, pool->size, prot, &page,
395 atomic_pool_init); 395 atomic_pool_init);
396 else 396 else
@@ -701,7 +701,7 @@ static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle,
701 addr = __alloc_simple_buffer(dev, size, gfp, &page); 701 addr = __alloc_simple_buffer(dev, size, gfp, &page);
702 else if (!(gfp & __GFP_WAIT)) 702 else if (!(gfp & __GFP_WAIT))
703 addr = __alloc_from_pool(size, &page); 703 addr = __alloc_from_pool(size, &page);
704 else if (!IS_ENABLED(CONFIG_DMA_CMA)) 704 else if (!dev_get_cma_area(dev))
705 addr = __alloc_remap_buffer(dev, size, gfp, prot, &page, caller); 705 addr = __alloc_remap_buffer(dev, size, gfp, prot, &page, caller);
706 else 706 else
707 addr = __alloc_from_contiguous(dev, size, prot, &page, caller); 707 addr = __alloc_from_contiguous(dev, size, prot, &page, caller);
@@ -790,7 +790,7 @@ static void __arm_dma_free(struct device *dev, size_t size, void *cpu_addr,
790 __dma_free_buffer(page, size); 790 __dma_free_buffer(page, size);
791 } else if (__free_from_pool(cpu_addr, size)) { 791 } else if (__free_from_pool(cpu_addr, size)) {
792 return; 792 return;
793 } else if (!IS_ENABLED(CONFIG_DMA_CMA)) { 793 } else if (!dev_get_cma_area(dev)) {
794 __dma_free_remap(cpu_addr, size); 794 __dma_free_remap(cpu_addr, size);
795 __dma_free_buffer(page, size); 795 __dma_free_buffer(page, size);
796 } else { 796 } else {
@@ -885,7 +885,7 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset,
885static void __dma_page_cpu_to_dev(struct page *page, unsigned long off, 885static void __dma_page_cpu_to_dev(struct page *page, unsigned long off,
886 size_t size, enum dma_data_direction dir) 886 size_t size, enum dma_data_direction dir)
887{ 887{
888 unsigned long paddr; 888 phys_addr_t paddr;
889 889
890 dma_cache_maint_page(page, off, size, dir, dmac_map_area); 890 dma_cache_maint_page(page, off, size, dir, dmac_map_area);
891 891
@@ -901,14 +901,15 @@ static void __dma_page_cpu_to_dev(struct page *page, unsigned long off,
901static void __dma_page_dev_to_cpu(struct page *page, unsigned long off, 901static void __dma_page_dev_to_cpu(struct page *page, unsigned long off,
902 size_t size, enum dma_data_direction dir) 902 size_t size, enum dma_data_direction dir)
903{ 903{
904 unsigned long paddr = page_to_phys(page) + off; 904 phys_addr_t paddr = page_to_phys(page) + off;
905 905
906 /* FIXME: non-speculating: not required */ 906 /* FIXME: non-speculating: not required */
907 /* don't bother invalidating if DMA to device */ 907 /* in any case, don't bother invalidating if DMA to device */
908 if (dir != DMA_TO_DEVICE) 908 if (dir != DMA_TO_DEVICE) {
909 outer_inv_range(paddr, paddr + size); 909 outer_inv_range(paddr, paddr + size);
910 910
911 dma_cache_maint_page(page, off, size, dir, dmac_unmap_area); 911 dma_cache_maint_page(page, off, size, dir, dmac_unmap_area);
912 }
912 913
913 /* 914 /*
914 * Mark the D-cache clean for these pages to avoid extra flushing. 915 * Mark the D-cache clean for these pages to avoid extra flushing.
@@ -1074,6 +1075,7 @@ static inline dma_addr_t __alloc_iova(struct dma_iommu_mapping *mapping,
1074 unsigned int order = get_order(size); 1075 unsigned int order = get_order(size);
1075 unsigned int align = 0; 1076 unsigned int align = 0;
1076 unsigned int count, start; 1077 unsigned int count, start;
1078 size_t mapping_size = mapping->bits << PAGE_SHIFT;
1077 unsigned long flags; 1079 unsigned long flags;
1078 dma_addr_t iova; 1080 dma_addr_t iova;
1079 int i; 1081 int i;
@@ -1119,7 +1121,7 @@ static inline dma_addr_t __alloc_iova(struct dma_iommu_mapping *mapping,
1119 } 1121 }
1120 spin_unlock_irqrestore(&mapping->lock, flags); 1122 spin_unlock_irqrestore(&mapping->lock, flags);
1121 1123
1122 iova = mapping->base + (mapping->size * i); 1124 iova = mapping->base + (mapping_size * i);
1123 iova += start << PAGE_SHIFT; 1125 iova += start << PAGE_SHIFT;
1124 1126
1125 return iova; 1127 return iova;
@@ -1129,6 +1131,7 @@ static inline void __free_iova(struct dma_iommu_mapping *mapping,
1129 dma_addr_t addr, size_t size) 1131 dma_addr_t addr, size_t size)
1130{ 1132{
1131 unsigned int start, count; 1133 unsigned int start, count;
1134 size_t mapping_size = mapping->bits << PAGE_SHIFT;
1132 unsigned long flags; 1135 unsigned long flags;
1133 dma_addr_t bitmap_base; 1136 dma_addr_t bitmap_base;
1134 u32 bitmap_index; 1137 u32 bitmap_index;
@@ -1136,14 +1139,14 @@ static inline void __free_iova(struct dma_iommu_mapping *mapping,
1136 if (!size) 1139 if (!size)
1137 return; 1140 return;
1138 1141
1139 bitmap_index = (u32) (addr - mapping->base) / (u32) mapping->size; 1142 bitmap_index = (u32) (addr - mapping->base) / (u32) mapping_size;
1140 BUG_ON(addr < mapping->base || bitmap_index > mapping->extensions); 1143 BUG_ON(addr < mapping->base || bitmap_index > mapping->extensions);
1141 1144
1142 bitmap_base = mapping->base + mapping->size * bitmap_index; 1145 bitmap_base = mapping->base + mapping_size * bitmap_index;
1143 1146
1144 start = (addr - bitmap_base) >> PAGE_SHIFT; 1147 start = (addr - bitmap_base) >> PAGE_SHIFT;
1145 1148
1146 if (addr + size > bitmap_base + mapping->size) { 1149 if (addr + size > bitmap_base + mapping_size) {
1147 /* 1150 /*
1148 * The address range to be freed reaches into the iova 1151 * The address range to be freed reaches into the iova
1149 * range of the next bitmap. This should not happen as 1152 * range of the next bitmap. This should not happen as
@@ -1964,7 +1967,6 @@ arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, size_t size)
1964 mapping->extensions = extensions; 1967 mapping->extensions = extensions;
1965 mapping->base = base; 1968 mapping->base = base;
1966 mapping->bits = BITS_PER_BYTE * bitmap_size; 1969 mapping->bits = BITS_PER_BYTE * bitmap_size;
1967 mapping->size = mapping->bits << PAGE_SHIFT;
1968 1970
1969 spin_lock_init(&mapping->lock); 1971 spin_lock_init(&mapping->lock);
1970 1972
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c
index 3387e60e4ea3..43d54f5b26b9 100644
--- a/arch/arm/mm/flush.c
+++ b/arch/arm/mm/flush.c
@@ -104,17 +104,20 @@ void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsig
104#define flush_icache_alias(pfn,vaddr,len) do { } while (0) 104#define flush_icache_alias(pfn,vaddr,len) do { } while (0)
105#endif 105#endif
106 106
107#define FLAG_PA_IS_EXEC 1
108#define FLAG_PA_CORE_IN_MM 2
109
107static void flush_ptrace_access_other(void *args) 110static void flush_ptrace_access_other(void *args)
108{ 111{
109 __flush_icache_all(); 112 __flush_icache_all();
110} 113}
111 114
112static 115static inline
113void flush_ptrace_access(struct vm_area_struct *vma, struct page *page, 116void __flush_ptrace_access(struct page *page, unsigned long uaddr, void *kaddr,
114 unsigned long uaddr, void *kaddr, unsigned long len) 117 unsigned long len, unsigned int flags)
115{ 118{
116 if (cache_is_vivt()) { 119 if (cache_is_vivt()) {
117 if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) { 120 if (flags & FLAG_PA_CORE_IN_MM) {
118 unsigned long addr = (unsigned long)kaddr; 121 unsigned long addr = (unsigned long)kaddr;
119 __cpuc_coherent_kern_range(addr, addr + len); 122 __cpuc_coherent_kern_range(addr, addr + len);
120 } 123 }
@@ -128,7 +131,7 @@ void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
128 } 131 }
129 132
130 /* VIPT non-aliasing D-cache */ 133 /* VIPT non-aliasing D-cache */
131 if (vma->vm_flags & VM_EXEC) { 134 if (flags & FLAG_PA_IS_EXEC) {
132 unsigned long addr = (unsigned long)kaddr; 135 unsigned long addr = (unsigned long)kaddr;
133 if (icache_is_vipt_aliasing()) 136 if (icache_is_vipt_aliasing())
134 flush_icache_alias(page_to_pfn(page), uaddr, len); 137 flush_icache_alias(page_to_pfn(page), uaddr, len);
@@ -140,6 +143,26 @@ void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
140 } 143 }
141} 144}
142 145
146static
147void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
148 unsigned long uaddr, void *kaddr, unsigned long len)
149{
150 unsigned int flags = 0;
151 if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm)))
152 flags |= FLAG_PA_CORE_IN_MM;
153 if (vma->vm_flags & VM_EXEC)
154 flags |= FLAG_PA_IS_EXEC;
155 __flush_ptrace_access(page, uaddr, kaddr, len, flags);
156}
157
158void flush_uprobe_xol_access(struct page *page, unsigned long uaddr,
159 void *kaddr, unsigned long len)
160{
161 unsigned int flags = FLAG_PA_CORE_IN_MM|FLAG_PA_IS_EXEC;
162
163 __flush_ptrace_access(page, uaddr, kaddr, len, flags);
164}
165
143/* 166/*
144 * Copy user data from/to a page which is mapped into a different 167 * Copy user data from/to a page which is mapped into a different
145 * processes address space. Really, we want to allow our "user 168 * processes address space. Really, we want to allow our "user
diff --git a/arch/arm/mm/highmem.c b/arch/arm/mm/highmem.c
index 21b9e1bf9b77..45aeaaca9052 100644
--- a/arch/arm/mm/highmem.c
+++ b/arch/arm/mm/highmem.c
@@ -18,6 +18,21 @@
18#include <asm/tlbflush.h> 18#include <asm/tlbflush.h>
19#include "mm.h" 19#include "mm.h"
20 20
21pte_t *fixmap_page_table;
22
23static inline void set_fixmap_pte(int idx, pte_t pte)
24{
25 unsigned long vaddr = __fix_to_virt(idx);
26 set_pte_ext(fixmap_page_table + idx, pte, 0);
27 local_flush_tlb_kernel_page(vaddr);
28}
29
30static inline pte_t get_fixmap_pte(unsigned long vaddr)
31{
32 unsigned long idx = __virt_to_fix(vaddr);
33 return *(fixmap_page_table + idx);
34}
35
21void *kmap(struct page *page) 36void *kmap(struct page *page)
22{ 37{
23 might_sleep(); 38 might_sleep();
@@ -63,20 +78,20 @@ void *kmap_atomic(struct page *page)
63 type = kmap_atomic_idx_push(); 78 type = kmap_atomic_idx_push();
64 79
65 idx = type + KM_TYPE_NR * smp_processor_id(); 80 idx = type + KM_TYPE_NR * smp_processor_id();
66 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); 81 vaddr = __fix_to_virt(idx);
67#ifdef CONFIG_DEBUG_HIGHMEM 82#ifdef CONFIG_DEBUG_HIGHMEM
68 /* 83 /*
69 * With debugging enabled, kunmap_atomic forces that entry to 0. 84 * With debugging enabled, kunmap_atomic forces that entry to 0.
70 * Make sure it was indeed properly unmapped. 85 * Make sure it was indeed properly unmapped.
71 */ 86 */
72 BUG_ON(!pte_none(get_top_pte(vaddr))); 87 BUG_ON(!pte_none(*(fixmap_page_table + idx)));
73#endif 88#endif
74 /* 89 /*
75 * When debugging is off, kunmap_atomic leaves the previous mapping 90 * When debugging is off, kunmap_atomic leaves the previous mapping
76 * in place, so the contained TLB flush ensures the TLB is updated 91 * in place, so the contained TLB flush ensures the TLB is updated
77 * with the new mapping. 92 * with the new mapping.
78 */ 93 */
79 set_top_pte(vaddr, mk_pte(page, kmap_prot)); 94 set_fixmap_pte(idx, mk_pte(page, kmap_prot));
80 95
81 return (void *)vaddr; 96 return (void *)vaddr;
82} 97}
@@ -94,8 +109,8 @@ void __kunmap_atomic(void *kvaddr)
94 if (cache_is_vivt()) 109 if (cache_is_vivt())
95 __cpuc_flush_dcache_area((void *)vaddr, PAGE_SIZE); 110 __cpuc_flush_dcache_area((void *)vaddr, PAGE_SIZE);
96#ifdef CONFIG_DEBUG_HIGHMEM 111#ifdef CONFIG_DEBUG_HIGHMEM
97 BUG_ON(vaddr != __fix_to_virt(FIX_KMAP_BEGIN + idx)); 112 BUG_ON(vaddr != __fix_to_virt(idx));
98 set_top_pte(vaddr, __pte(0)); 113 set_fixmap_pte(idx, __pte(0));
99#else 114#else
100 (void) idx; /* to kill a warning */ 115 (void) idx; /* to kill a warning */
101#endif 116#endif
@@ -117,11 +132,11 @@ void *kmap_atomic_pfn(unsigned long pfn)
117 132
118 type = kmap_atomic_idx_push(); 133 type = kmap_atomic_idx_push();
119 idx = type + KM_TYPE_NR * smp_processor_id(); 134 idx = type + KM_TYPE_NR * smp_processor_id();
120 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); 135 vaddr = __fix_to_virt(idx);
121#ifdef CONFIG_DEBUG_HIGHMEM 136#ifdef CONFIG_DEBUG_HIGHMEM
122 BUG_ON(!pte_none(get_top_pte(vaddr))); 137 BUG_ON(!pte_none(*(fixmap_page_table + idx)));
123#endif 138#endif
124 set_top_pte(vaddr, pfn_pte(pfn, kmap_prot)); 139 set_fixmap_pte(idx, pfn_pte(pfn, kmap_prot));
125 140
126 return (void *)vaddr; 141 return (void *)vaddr;
127} 142}
@@ -133,5 +148,5 @@ struct page *kmap_atomic_to_page(const void *ptr)
133 if (vaddr < FIXADDR_START) 148 if (vaddr < FIXADDR_START)
134 return virt_to_page(ptr); 149 return virt_to_page(ptr);
135 150
136 return pte_page(get_top_pte(vaddr)); 151 return pte_page(get_fixmap_pte(vaddr));
137} 152}
diff --git a/arch/arm/mm/hugetlbpage.c b/arch/arm/mm/hugetlbpage.c
index 54ee6163c181..66781bf34077 100644
--- a/arch/arm/mm/hugetlbpage.c
+++ b/arch/arm/mm/hugetlbpage.c
@@ -56,8 +56,3 @@ int pmd_huge(pmd_t pmd)
56{ 56{
57 return pmd_val(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT); 57 return pmd_val(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT);
58} 58}
59
60int pmd_huge_support(void)
61{
62 return 1;
63}
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 2a77ba8796ae..659c75d808dc 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -23,6 +23,7 @@
23#include <linux/dma-contiguous.h> 23#include <linux/dma-contiguous.h>
24#include <linux/sizes.h> 24#include <linux/sizes.h>
25 25
26#include <asm/cp15.h>
26#include <asm/mach-types.h> 27#include <asm/mach-types.h>
27#include <asm/memblock.h> 28#include <asm/memblock.h>
28#include <asm/prom.h> 29#include <asm/prom.h>
@@ -36,6 +37,14 @@
36 37
37#include "mm.h" 38#include "mm.h"
38 39
40#ifdef CONFIG_CPU_CP15_MMU
41unsigned long __init __clear_cr(unsigned long mask)
42{
43 cr_alignment = cr_alignment & ~mask;
44 return cr_alignment;
45}
46#endif
47
39static phys_addr_t phys_initrd_start __initdata = 0; 48static phys_addr_t phys_initrd_start __initdata = 0;
40static unsigned long phys_initrd_size __initdata = 0; 49static unsigned long phys_initrd_size __initdata = 0;
41 50
@@ -81,24 +90,21 @@ __tagtable(ATAG_INITRD2, parse_tag_initrd2);
81 * initialization functions, as well as show_mem() for the skipping 90 * initialization functions, as well as show_mem() for the skipping
82 * of holes in the memory map. It is populated by arm_add_memory(). 91 * of holes in the memory map. It is populated by arm_add_memory().
83 */ 92 */
84struct meminfo meminfo;
85
86void show_mem(unsigned int filter) 93void show_mem(unsigned int filter)
87{ 94{
88 int free = 0, total = 0, reserved = 0; 95 int free = 0, total = 0, reserved = 0;
89 int shared = 0, cached = 0, slab = 0, i; 96 int shared = 0, cached = 0, slab = 0;
90 struct meminfo * mi = &meminfo; 97 struct memblock_region *reg;
91 98
92 printk("Mem-info:\n"); 99 printk("Mem-info:\n");
93 show_free_areas(filter); 100 show_free_areas(filter);
94 101
95 for_each_bank (i, mi) { 102 for_each_memblock (memory, reg) {
96 struct membank *bank = &mi->bank[i];
97 unsigned int pfn1, pfn2; 103 unsigned int pfn1, pfn2;
98 struct page *page, *end; 104 struct page *page, *end;
99 105
100 pfn1 = bank_pfn_start(bank); 106 pfn1 = memblock_region_memory_base_pfn(reg);
101 pfn2 = bank_pfn_end(bank); 107 pfn2 = memblock_region_memory_end_pfn(reg);
102 108
103 page = pfn_to_page(pfn1); 109 page = pfn_to_page(pfn1);
104 end = pfn_to_page(pfn2 - 1) + 1; 110 end = pfn_to_page(pfn2 - 1) + 1;
@@ -115,8 +121,9 @@ void show_mem(unsigned int filter)
115 free++; 121 free++;
116 else 122 else
117 shared += page_count(page) - 1; 123 shared += page_count(page) - 1;
118 page++; 124 pfn1++;
119 } while (page < end); 125 page = pfn_to_page(pfn1);
126 } while (pfn1 < pfn2);
120 } 127 }
121 128
122 printk("%d pages of RAM\n", total); 129 printk("%d pages of RAM\n", total);
@@ -130,16 +137,9 @@ void show_mem(unsigned int filter)
130static void __init find_limits(unsigned long *min, unsigned long *max_low, 137static void __init find_limits(unsigned long *min, unsigned long *max_low,
131 unsigned long *max_high) 138 unsigned long *max_high)
132{ 139{
133 struct meminfo *mi = &meminfo; 140 *max_low = PFN_DOWN(memblock_get_current_limit());
134 int i; 141 *min = PFN_UP(memblock_start_of_DRAM());
135 142 *max_high = PFN_DOWN(memblock_end_of_DRAM());
136 /* This assumes the meminfo array is properly sorted */
137 *min = bank_pfn_start(&mi->bank[0]);
138 for_each_bank (i, mi)
139 if (mi->bank[i].highmem)
140 break;
141 *max_low = bank_pfn_end(&mi->bank[i - 1]);
142 *max_high = bank_pfn_end(&mi->bank[mi->nr_banks - 1]);
143} 143}
144 144
145#ifdef CONFIG_ZONE_DMA 145#ifdef CONFIG_ZONE_DMA
@@ -274,14 +274,8 @@ phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align)
274 return phys; 274 return phys;
275} 275}
276 276
277void __init arm_memblock_init(struct meminfo *mi, 277void __init arm_memblock_init(const struct machine_desc *mdesc)
278 const struct machine_desc *mdesc)
279{ 278{
280 int i;
281
282 for (i = 0; i < mi->nr_banks; i++)
283 memblock_add(mi->bank[i].start, mi->bank[i].size);
284
285 /* Register the kernel text, kernel data and initrd with memblock. */ 279 /* Register the kernel text, kernel data and initrd with memblock. */
286#ifdef CONFIG_XIP_KERNEL 280#ifdef CONFIG_XIP_KERNEL
287 memblock_reserve(__pa(_sdata), _end - _sdata); 281 memblock_reserve(__pa(_sdata), _end - _sdata);
@@ -317,7 +311,6 @@ void __init arm_memblock_init(struct meminfo *mi,
317#endif 311#endif
318 312
319 arm_mm_memblock_reserve(); 313 arm_mm_memblock_reserve();
320 arm_dt_memblock_reserve();
321 314
322 /* reserve any platform specific memblock areas */ 315 /* reserve any platform specific memblock areas */
323 if (mdesc->reserve) 316 if (mdesc->reserve)
@@ -413,54 +406,53 @@ free_memmap(unsigned long start_pfn, unsigned long end_pfn)
413/* 406/*
414 * The mem_map array can get very big. Free the unused area of the memory map. 407 * The mem_map array can get very big. Free the unused area of the memory map.
415 */ 408 */
416static void __init free_unused_memmap(struct meminfo *mi) 409static void __init free_unused_memmap(void)
417{ 410{
418 unsigned long bank_start, prev_bank_end = 0; 411 unsigned long start, prev_end = 0;
419 unsigned int i; 412 struct memblock_region *reg;
420 413
421 /* 414 /*
422 * This relies on each bank being in address order. 415 * This relies on each bank being in address order.
423 * The banks are sorted previously in bootmem_init(). 416 * The banks are sorted previously in bootmem_init().
424 */ 417 */
425 for_each_bank(i, mi) { 418 for_each_memblock(memory, reg) {
426 struct membank *bank = &mi->bank[i]; 419 start = memblock_region_memory_base_pfn(reg);
427
428 bank_start = bank_pfn_start(bank);
429 420
430#ifdef CONFIG_SPARSEMEM 421#ifdef CONFIG_SPARSEMEM
431 /* 422 /*
432 * Take care not to free memmap entries that don't exist 423 * Take care not to free memmap entries that don't exist
433 * due to SPARSEMEM sections which aren't present. 424 * due to SPARSEMEM sections which aren't present.
434 */ 425 */
435 bank_start = min(bank_start, 426 start = min(start,
436 ALIGN(prev_bank_end, PAGES_PER_SECTION)); 427 ALIGN(prev_end, PAGES_PER_SECTION));
437#else 428#else
438 /* 429 /*
439 * Align down here since the VM subsystem insists that the 430 * Align down here since the VM subsystem insists that the
440 * memmap entries are valid from the bank start aligned to 431 * memmap entries are valid from the bank start aligned to
441 * MAX_ORDER_NR_PAGES. 432 * MAX_ORDER_NR_PAGES.
442 */ 433 */
443 bank_start = round_down(bank_start, MAX_ORDER_NR_PAGES); 434 start = round_down(start, MAX_ORDER_NR_PAGES);
444#endif 435#endif
445 /* 436 /*
446 * If we had a previous bank, and there is a space 437 * If we had a previous bank, and there is a space
447 * between the current bank and the previous, free it. 438 * between the current bank and the previous, free it.
448 */ 439 */
449 if (prev_bank_end && prev_bank_end < bank_start) 440 if (prev_end && prev_end < start)
450 free_memmap(prev_bank_end, bank_start); 441 free_memmap(prev_end, start);
451 442
452 /* 443 /*
453 * Align up here since the VM subsystem insists that the 444 * Align up here since the VM subsystem insists that the
454 * memmap entries are valid from the bank end aligned to 445 * memmap entries are valid from the bank end aligned to
455 * MAX_ORDER_NR_PAGES. 446 * MAX_ORDER_NR_PAGES.
456 */ 447 */
457 prev_bank_end = ALIGN(bank_pfn_end(bank), MAX_ORDER_NR_PAGES); 448 prev_end = ALIGN(memblock_region_memory_end_pfn(reg),
449 MAX_ORDER_NR_PAGES);
458 } 450 }
459 451
460#ifdef CONFIG_SPARSEMEM 452#ifdef CONFIG_SPARSEMEM
461 if (!IS_ALIGNED(prev_bank_end, PAGES_PER_SECTION)) 453 if (!IS_ALIGNED(prev_end, PAGES_PER_SECTION))
462 free_memmap(prev_bank_end, 454 free_memmap(prev_end,
463 ALIGN(prev_bank_end, PAGES_PER_SECTION)); 455 ALIGN(prev_end, PAGES_PER_SECTION));
464#endif 456#endif
465} 457}
466 458
@@ -536,7 +528,7 @@ void __init mem_init(void)
536 set_max_mapnr(pfn_to_page(max_pfn) - mem_map); 528 set_max_mapnr(pfn_to_page(max_pfn) - mem_map);
537 529
538 /* this will put all unused low memory onto the freelists */ 530 /* this will put all unused low memory onto the freelists */
539 free_unused_memmap(&meminfo); 531 free_unused_memmap();
540 free_all_bootmem(); 532 free_all_bootmem();
541 533
542#ifdef CONFIG_SA1111 534#ifdef CONFIG_SA1111
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index f9c32ba73544..d1e5ad7ab3bc 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -438,6 +438,13 @@ void __arm_iounmap(volatile void __iomem *io_addr)
438EXPORT_SYMBOL(__arm_iounmap); 438EXPORT_SYMBOL(__arm_iounmap);
439 439
440#ifdef CONFIG_PCI 440#ifdef CONFIG_PCI
441static int pci_ioremap_mem_type = MT_DEVICE;
442
443void pci_ioremap_set_mem_type(int mem_type)
444{
445 pci_ioremap_mem_type = mem_type;
446}
447
441int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr) 448int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr)
442{ 449{
443 BUG_ON(offset + SZ_64K > IO_SPACE_LIMIT); 450 BUG_ON(offset + SZ_64K > IO_SPACE_LIMIT);
@@ -445,7 +452,7 @@ int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr)
445 return ioremap_page_range(PCI_IO_VIRT_BASE + offset, 452 return ioremap_page_range(PCI_IO_VIRT_BASE + offset,
446 PCI_IO_VIRT_BASE + offset + SZ_64K, 453 PCI_IO_VIRT_BASE + offset + SZ_64K,
447 phys_addr, 454 phys_addr,
448 __pgprot(get_mem_type(MT_DEVICE)->prot_pte)); 455 __pgprot(get_mem_type(pci_ioremap_mem_type)->prot_pte));
449} 456}
450EXPORT_SYMBOL_GPL(pci_ioremap_io); 457EXPORT_SYMBOL_GPL(pci_ioremap_io);
451#endif 458#endif
diff --git a/arch/arm/mm/l2c-common.c b/arch/arm/mm/l2c-common.c
new file mode 100644
index 000000000000..10a3cf28c362
--- /dev/null
+++ b/arch/arm/mm/l2c-common.c
@@ -0,0 +1,20 @@
1/*
2 * Copyright (C) 2010 ARM Ltd.
3 * Written by Catalin Marinas <catalin.marinas@arm.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#include <linux/bug.h>
10#include <linux/smp.h>
11#include <asm/outercache.h>
12
13void outer_disable(void)
14{
15 WARN_ON(!irqs_disabled());
16 WARN_ON(num_online_cpus() > 1);
17
18 if (outer_cache.disable)
19 outer_cache.disable();
20}
diff --git a/arch/arm/mm/l2c-l2x0-resume.S b/arch/arm/mm/l2c-l2x0-resume.S
new file mode 100644
index 000000000000..99b05f21a59a
--- /dev/null
+++ b/arch/arm/mm/l2c-l2x0-resume.S
@@ -0,0 +1,58 @@
1/*
2 * L2C-310 early resume code. This can be used by platforms to restore
3 * the settings of their L2 cache controller before restoring the
4 * processor state.
5 *
6 * This code can only be used to if you are running in the secure world.
7 */
8#include <linux/linkage.h>
9#include <asm/hardware/cache-l2x0.h>
10
11 .text
12
13ENTRY(l2c310_early_resume)
14 adr r0, 1f
15 ldr r2, [r0]
16 add r0, r2, r0
17
18 ldmia r0, {r1, r2, r3, r4, r5, r6, r7, r8}
19 @ r1 = phys address of L2C-310 controller
20 @ r2 = aux_ctrl
21 @ r3 = tag_latency
22 @ r4 = data_latency
23 @ r5 = filter_start
24 @ r6 = filter_end
25 @ r7 = prefetch_ctrl
26 @ r8 = pwr_ctrl
27
28 @ Check that the address has been initialised
29 teq r1, #0
30 moveq pc, lr
31
32 @ The prefetch and power control registers are revision dependent
33 @ and can be written whether or not the L2 cache is enabled
34 ldr r0, [r1, #L2X0_CACHE_ID]
35 and r0, r0, #L2X0_CACHE_ID_RTL_MASK
36 cmp r0, #L310_CACHE_ID_RTL_R2P0
37 strcs r7, [r1, #L310_PREFETCH_CTRL]
38 cmp r0, #L310_CACHE_ID_RTL_R3P0
39 strcs r8, [r1, #L310_POWER_CTRL]
40
41 @ Don't setup the L2 cache if it is already enabled
42 ldr r0, [r1, #L2X0_CTRL]
43 tst r0, #L2X0_CTRL_EN
44 movne pc, lr
45
46 str r3, [r1, #L310_TAG_LATENCY_CTRL]
47 str r4, [r1, #L310_DATA_LATENCY_CTRL]
48 str r6, [r1, #L310_ADDR_FILTER_END]
49 str r5, [r1, #L310_ADDR_FILTER_START]
50
51 str r2, [r1, #L2X0_AUX_CTRL]
52 mov r9, #L2X0_CTRL_EN
53 str r9, [r1, #L2X0_CTRL]
54 mov pc, lr
55ENDPROC(l2c310_early_resume)
56
57 .align
581: .long l2x0_saved_regs - .
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h
index 7ea641b7aa7d..ce727d47275c 100644
--- a/arch/arm/mm/mm.h
+++ b/arch/arm/mm/mm.h
@@ -2,6 +2,8 @@
2#include <linux/list.h> 2#include <linux/list.h>
3#include <linux/vmalloc.h> 3#include <linux/vmalloc.h>
4 4
5#include <asm/pgtable.h>
6
5/* the upper-most page table pointer */ 7/* the upper-most page table pointer */
6extern pmd_t *top_pmd; 8extern pmd_t *top_pmd;
7 9
@@ -93,3 +95,5 @@ extern phys_addr_t arm_lowmem_limit;
93void __init bootmem_init(void); 95void __init bootmem_init(void);
94void arm_mm_memblock_reserve(void); 96void arm_mm_memblock_reserve(void);
95void dma_contiguous_remap(void); 97void dma_contiguous_remap(void);
98
99unsigned long __clear_cr(unsigned long mask);
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index b68c6b22e1c8..ab14b79b03f0 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -35,6 +35,7 @@
35#include <asm/mach/arch.h> 35#include <asm/mach/arch.h>
36#include <asm/mach/map.h> 36#include <asm/mach/map.h>
37#include <asm/mach/pci.h> 37#include <asm/mach/pci.h>
38#include <asm/fixmap.h>
38 39
39#include "mm.h" 40#include "mm.h"
40#include "tcm.h" 41#include "tcm.h"
@@ -117,28 +118,54 @@ static struct cachepolicy cache_policies[] __initdata = {
117}; 118};
118 119
119#ifdef CONFIG_CPU_CP15 120#ifdef CONFIG_CPU_CP15
121static unsigned long initial_pmd_value __initdata = 0;
122
120/* 123/*
121 * These are useful for identifying cache coherency 124 * Initialise the cache_policy variable with the initial state specified
122 * problems by allowing the cache or the cache and 125 * via the "pmd" value. This is used to ensure that on ARMv6 and later,
123 * writebuffer to be turned off. (Note: the write 126 * the C code sets the page tables up with the same policy as the head
124 * buffer should not be on and the cache off). 127 * assembly code, which avoids an illegal state where the TLBs can get
128 * confused. See comments in early_cachepolicy() for more information.
125 */ 129 */
126static int __init early_cachepolicy(char *p) 130void __init init_default_cache_policy(unsigned long pmd)
127{ 131{
128 int i; 132 int i;
129 133
134 initial_pmd_value = pmd;
135
136 pmd &= PMD_SECT_TEX(1) | PMD_SECT_BUFFERABLE | PMD_SECT_CACHEABLE;
137
138 for (i = 0; i < ARRAY_SIZE(cache_policies); i++)
139 if (cache_policies[i].pmd == pmd) {
140 cachepolicy = i;
141 break;
142 }
143
144 if (i == ARRAY_SIZE(cache_policies))
145 pr_err("ERROR: could not find cache policy\n");
146}
147
148/*
149 * These are useful for identifying cache coherency problems by allowing
150 * the cache or the cache and writebuffer to be turned off. (Note: the
151 * write buffer should not be on and the cache off).
152 */
153static int __init early_cachepolicy(char *p)
154{
155 int i, selected = -1;
156
130 for (i = 0; i < ARRAY_SIZE(cache_policies); i++) { 157 for (i = 0; i < ARRAY_SIZE(cache_policies); i++) {
131 int len = strlen(cache_policies[i].policy); 158 int len = strlen(cache_policies[i].policy);
132 159
133 if (memcmp(p, cache_policies[i].policy, len) == 0) { 160 if (memcmp(p, cache_policies[i].policy, len) == 0) {
134 cachepolicy = i; 161 selected = i;
135 cr_alignment &= ~cache_policies[i].cr_mask;
136 cr_no_alignment &= ~cache_policies[i].cr_mask;
137 break; 162 break;
138 } 163 }
139 } 164 }
140 if (i == ARRAY_SIZE(cache_policies)) 165
141 printk(KERN_ERR "ERROR: unknown or unsupported cache policy\n"); 166 if (selected == -1)
167 pr_err("ERROR: unknown or unsupported cache policy\n");
168
142 /* 169 /*
143 * This restriction is partly to do with the way we boot; it is 170 * This restriction is partly to do with the way we boot; it is
144 * unpredictable to have memory mapped using two different sets of 171 * unpredictable to have memory mapped using two different sets of
@@ -146,12 +173,18 @@ static int __init early_cachepolicy(char *p)
146 * change these attributes once the initial assembly has setup the 173 * change these attributes once the initial assembly has setup the
147 * page tables. 174 * page tables.
148 */ 175 */
149 if (cpu_architecture() >= CPU_ARCH_ARMv6) { 176 if (cpu_architecture() >= CPU_ARCH_ARMv6 && selected != cachepolicy) {
150 printk(KERN_WARNING "Only cachepolicy=writeback supported on ARMv6 and later\n"); 177 pr_warn("Only cachepolicy=%s supported on ARMv6 and later\n",
151 cachepolicy = CPOLICY_WRITEBACK; 178 cache_policies[cachepolicy].policy);
179 return 0;
180 }
181
182 if (selected != cachepolicy) {
183 unsigned long cr = __clear_cr(cache_policies[selected].cr_mask);
184 cachepolicy = selected;
185 flush_cache_all();
186 set_cr(cr);
152 } 187 }
153 flush_cache_all();
154 set_cr(cr_alignment);
155 return 0; 188 return 0;
156} 189}
157early_param("cachepolicy", early_cachepolicy); 190early_param("cachepolicy", early_cachepolicy);
@@ -186,35 +219,6 @@ static int __init early_ecc(char *p)
186early_param("ecc", early_ecc); 219early_param("ecc", early_ecc);
187#endif 220#endif
188 221
189static int __init noalign_setup(char *__unused)
190{
191 cr_alignment &= ~CR_A;
192 cr_no_alignment &= ~CR_A;
193 set_cr(cr_alignment);
194 return 1;
195}
196__setup("noalign", noalign_setup);
197
198#ifndef CONFIG_SMP
199void adjust_cr(unsigned long mask, unsigned long set)
200{
201 unsigned long flags;
202
203 mask &= ~CR_A;
204
205 set &= mask;
206
207 local_irq_save(flags);
208
209 cr_no_alignment = (cr_no_alignment & ~mask) | set;
210 cr_alignment = (cr_alignment & ~mask) | set;
211
212 set_cr((get_cr() & ~mask) | set);
213
214 local_irq_restore(flags);
215}
216#endif
217
218#else /* ifdef CONFIG_CPU_CP15 */ 222#else /* ifdef CONFIG_CPU_CP15 */
219 223
220static int __init early_cachepolicy(char *p) 224static int __init early_cachepolicy(char *p)
@@ -414,8 +418,17 @@ static void __init build_mem_type_table(void)
414 cachepolicy = CPOLICY_WRITEBACK; 418 cachepolicy = CPOLICY_WRITEBACK;
415 ecc_mask = 0; 419 ecc_mask = 0;
416 } 420 }
417 if (is_smp()) 421
418 cachepolicy = CPOLICY_WRITEALLOC; 422 if (is_smp()) {
423 if (cachepolicy != CPOLICY_WRITEALLOC) {
424 pr_warn("Forcing write-allocate cache policy for SMP\n");
425 cachepolicy = CPOLICY_WRITEALLOC;
426 }
427 if (!(initial_pmd_value & PMD_SECT_S)) {
428 pr_warn("Forcing shared mappings for SMP\n");
429 initial_pmd_value |= PMD_SECT_S;
430 }
431 }
419 432
420 /* 433 /*
421 * Strip out features not present on earlier architectures. 434 * Strip out features not present on earlier architectures.
@@ -539,11 +552,12 @@ static void __init build_mem_type_table(void)
539 mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; 552 mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE;
540#endif 553#endif
541 554
542 if (is_smp()) { 555 /*
543 /* 556 * If the initial page tables were created with the S bit
544 * Mark memory with the "shared" attribute 557 * set, then we need to do the same here for the same
545 * for SMP systems 558 * reasons given in early_cachepolicy().
546 */ 559 */
560 if (initial_pmd_value & PMD_SECT_S) {
547 user_pgprot |= L_PTE_SHARED; 561 user_pgprot |= L_PTE_SHARED;
548 kern_pgprot |= L_PTE_SHARED; 562 kern_pgprot |= L_PTE_SHARED;
549 vecs_pgprot |= L_PTE_SHARED; 563 vecs_pgprot |= L_PTE_SHARED;
@@ -1061,74 +1075,47 @@ phys_addr_t arm_lowmem_limit __initdata = 0;
1061void __init sanity_check_meminfo(void) 1075void __init sanity_check_meminfo(void)
1062{ 1076{
1063 phys_addr_t memblock_limit = 0; 1077 phys_addr_t memblock_limit = 0;
1064 int i, j, highmem = 0; 1078 int highmem = 0;
1065 phys_addr_t vmalloc_limit = __pa(vmalloc_min - 1) + 1; 1079 phys_addr_t vmalloc_limit = __pa(vmalloc_min - 1) + 1;
1080 struct memblock_region *reg;
1066 1081
1067 for (i = 0, j = 0; i < meminfo.nr_banks; i++) { 1082 for_each_memblock(memory, reg) {
1068 struct membank *bank = &meminfo.bank[j]; 1083 phys_addr_t block_start = reg->base;
1069 phys_addr_t size_limit; 1084 phys_addr_t block_end = reg->base + reg->size;
1070 1085 phys_addr_t size_limit = reg->size;
1071 *bank = meminfo.bank[i];
1072 size_limit = bank->size;
1073 1086
1074 if (bank->start >= vmalloc_limit) 1087 if (reg->base >= vmalloc_limit)
1075 highmem = 1; 1088 highmem = 1;
1076 else 1089 else
1077 size_limit = vmalloc_limit - bank->start; 1090 size_limit = vmalloc_limit - reg->base;
1078 1091
1079 bank->highmem = highmem;
1080 1092
1081#ifdef CONFIG_HIGHMEM 1093 if (!IS_ENABLED(CONFIG_HIGHMEM) || cache_is_vipt_aliasing()) {
1082 /* 1094
1083 * Split those memory banks which are partially overlapping 1095 if (highmem) {
1084 * the vmalloc area greatly simplifying things later. 1096 pr_notice("Ignoring RAM at %pa-%pa (!CONFIG_HIGHMEM)\n",
1085 */ 1097 &block_start, &block_end);
1086 if (!highmem && bank->size > size_limit) { 1098 memblock_remove(reg->base, reg->size);
1087 if (meminfo.nr_banks >= NR_BANKS) { 1099 continue;
1088 printk(KERN_CRIT "NR_BANKS too low, "
1089 "ignoring high memory\n");
1090 } else {
1091 memmove(bank + 1, bank,
1092 (meminfo.nr_banks - i) * sizeof(*bank));
1093 meminfo.nr_banks++;
1094 i++;
1095 bank[1].size -= size_limit;
1096 bank[1].start = vmalloc_limit;
1097 bank[1].highmem = highmem = 1;
1098 j++;
1099 } 1100 }
1100 bank->size = size_limit;
1101 }
1102#else
1103 /*
1104 * Highmem banks not allowed with !CONFIG_HIGHMEM.
1105 */
1106 if (highmem) {
1107 printk(KERN_NOTICE "Ignoring RAM at %.8llx-%.8llx "
1108 "(!CONFIG_HIGHMEM).\n",
1109 (unsigned long long)bank->start,
1110 (unsigned long long)bank->start + bank->size - 1);
1111 continue;
1112 }
1113 1101
1114 /* 1102 if (reg->size > size_limit) {
1115 * Check whether this memory bank would partially overlap 1103 phys_addr_t overlap_size = reg->size - size_limit;
1116 * the vmalloc area. 1104
1117 */ 1105 pr_notice("Truncating RAM at %pa-%pa to -%pa",
1118 if (bank->size > size_limit) { 1106 &block_start, &block_end, &vmalloc_limit);
1119 printk(KERN_NOTICE "Truncating RAM at %.8llx-%.8llx " 1107 memblock_remove(vmalloc_limit, overlap_size);
1120 "to -%.8llx (vmalloc region overlap).\n", 1108 block_end = vmalloc_limit;
1121 (unsigned long long)bank->start, 1109 }
1122 (unsigned long long)bank->start + bank->size - 1,
1123 (unsigned long long)bank->start + size_limit - 1);
1124 bank->size = size_limit;
1125 } 1110 }
1126#endif
1127 if (!bank->highmem) {
1128 phys_addr_t bank_end = bank->start + bank->size;
1129 1111
1130 if (bank_end > arm_lowmem_limit) 1112 if (!highmem) {
1131 arm_lowmem_limit = bank_end; 1113 if (block_end > arm_lowmem_limit) {
1114 if (reg->size > size_limit)
1115 arm_lowmem_limit = vmalloc_limit;
1116 else
1117 arm_lowmem_limit = block_end;
1118 }
1132 1119
1133 /* 1120 /*
1134 * Find the first non-section-aligned page, and point 1121 * Find the first non-section-aligned page, and point
@@ -1144,35 +1131,15 @@ void __init sanity_check_meminfo(void)
1144 * occurs before any free memory is mapped. 1131 * occurs before any free memory is mapped.
1145 */ 1132 */
1146 if (!memblock_limit) { 1133 if (!memblock_limit) {
1147 if (!IS_ALIGNED(bank->start, SECTION_SIZE)) 1134 if (!IS_ALIGNED(block_start, SECTION_SIZE))
1148 memblock_limit = bank->start; 1135 memblock_limit = block_start;
1149 else if (!IS_ALIGNED(bank_end, SECTION_SIZE)) 1136 else if (!IS_ALIGNED(block_end, SECTION_SIZE))
1150 memblock_limit = bank_end; 1137 memblock_limit = arm_lowmem_limit;
1151 } 1138 }
1152 }
1153 j++;
1154 }
1155#ifdef CONFIG_HIGHMEM
1156 if (highmem) {
1157 const char *reason = NULL;
1158 1139
1159 if (cache_is_vipt_aliasing()) {
1160 /*
1161 * Interactions between kmap and other mappings
1162 * make highmem support with aliasing VIPT caches
1163 * rather difficult.
1164 */
1165 reason = "with VIPT aliasing cache";
1166 }
1167 if (reason) {
1168 printk(KERN_CRIT "HIGHMEM is not supported %s, ignoring high memory\n",
1169 reason);
1170 while (j > 0 && meminfo.bank[j - 1].highmem)
1171 j--;
1172 } 1140 }
1173 } 1141 }
1174#endif 1142
1175 meminfo.nr_banks = j;
1176 high_memory = __va(arm_lowmem_limit - 1) + 1; 1143 high_memory = __va(arm_lowmem_limit - 1) + 1;
1177 1144
1178 /* 1145 /*
@@ -1359,6 +1326,9 @@ static void __init kmap_init(void)
1359#ifdef CONFIG_HIGHMEM 1326#ifdef CONFIG_HIGHMEM
1360 pkmap_page_table = early_pte_alloc(pmd_off_k(PKMAP_BASE), 1327 pkmap_page_table = early_pte_alloc(pmd_off_k(PKMAP_BASE),
1361 PKMAP_BASE, _PAGE_KERNEL_TABLE); 1328 PKMAP_BASE, _PAGE_KERNEL_TABLE);
1329
1330 fixmap_page_table = early_pte_alloc(pmd_off_k(FIXADDR_START),
1331 FIXADDR_START, _PAGE_KERNEL_TABLE);
1362#endif 1332#endif
1363} 1333}
1364 1334
@@ -1461,7 +1431,7 @@ void __init early_paging_init(const struct machine_desc *mdesc,
1461 * just complicate the code. 1431 * just complicate the code.
1462 */ 1432 */
1463 flush_cache_louis(); 1433 flush_cache_louis();
1464 dsb(); 1434 dsb(ishst);
1465 isb(); 1435 isb();
1466 1436
1467 /* remap level 1 table */ 1437 /* remap level 1 table */
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c
index 55764a7ef1f0..da1874f9f8cf 100644
--- a/arch/arm/mm/nommu.c
+++ b/arch/arm/mm/nommu.c
@@ -88,30 +88,35 @@ static unsigned long irbar_read(void)
88void __init sanity_check_meminfo_mpu(void) 88void __init sanity_check_meminfo_mpu(void)
89{ 89{
90 int i; 90 int i;
91 struct membank *bank = meminfo.bank;
92 phys_addr_t phys_offset = PHYS_OFFSET; 91 phys_addr_t phys_offset = PHYS_OFFSET;
93 phys_addr_t aligned_region_size, specified_mem_size, rounded_mem_size; 92 phys_addr_t aligned_region_size, specified_mem_size, rounded_mem_size;
94 93 struct memblock_region *reg;
95 /* Initially only use memory continuous from PHYS_OFFSET */ 94 bool first = true;
96 if (bank_phys_start(&bank[0]) != phys_offset) 95 phys_addr_t mem_start;
97 panic("First memory bank must be contiguous from PHYS_OFFSET"); 96 phys_addr_t mem_end;
98 97
99 /* Banks have already been sorted by start address */ 98 for_each_memblock(memory, reg) {
100 for (i = 1; i < meminfo.nr_banks; i++) { 99 if (first) {
101 if (bank[i].start <= bank_phys_end(&bank[0]) && 100 /*
102 bank_phys_end(&bank[i]) > bank_phys_end(&bank[0])) { 101 * Initially only use memory continuous from
103 bank[0].size = bank_phys_end(&bank[i]) - bank[0].start; 102 * PHYS_OFFSET */
103 if (reg->base != phys_offset)
104 panic("First memory bank must be contiguous from PHYS_OFFSET");
105
106 mem_start = reg->base;
107 mem_end = reg->base + reg->size;
108 specified_mem_size = reg->size;
109 first = false;
104 } else { 110 } else {
105 pr_notice("Ignoring RAM after 0x%.8lx. " 111 /*
106 "First non-contiguous (ignored) bank start: 0x%.8lx\n", 112 * memblock auto merges contiguous blocks, remove
107 (unsigned long)bank_phys_end(&bank[0]), 113 * all blocks afterwards
108 (unsigned long)bank_phys_start(&bank[i])); 114 */
109 break; 115 pr_notice("Ignoring RAM after %pa, memory at %pa ignored\n",
116 &mem_start, &reg->base);
117 memblock_remove(reg->base, reg->size);
110 } 118 }
111 } 119 }
112 /* All contiguous banks are now merged in to the first bank */
113 meminfo.nr_banks = 1;
114 specified_mem_size = bank[0].size;
115 120
116 /* 121 /*
117 * MPU has curious alignment requirements: Size must be power of 2, and 122 * MPU has curious alignment requirements: Size must be power of 2, and
@@ -128,23 +133,24 @@ void __init sanity_check_meminfo_mpu(void)
128 */ 133 */
129 aligned_region_size = (phys_offset - 1) ^ (phys_offset); 134 aligned_region_size = (phys_offset - 1) ^ (phys_offset);
130 /* Find the max power-of-two sized region that fits inside our bank */ 135 /* Find the max power-of-two sized region that fits inside our bank */
131 rounded_mem_size = (1 << __fls(bank[0].size)) - 1; 136 rounded_mem_size = (1 << __fls(specified_mem_size)) - 1;
132 137
133 /* The actual region size is the smaller of the two */ 138 /* The actual region size is the smaller of the two */
134 aligned_region_size = aligned_region_size < rounded_mem_size 139 aligned_region_size = aligned_region_size < rounded_mem_size
135 ? aligned_region_size + 1 140 ? aligned_region_size + 1
136 : rounded_mem_size + 1; 141 : rounded_mem_size + 1;
137 142
138 if (aligned_region_size != specified_mem_size) 143 if (aligned_region_size != specified_mem_size) {
139 pr_warn("Truncating memory from 0x%.8lx to 0x%.8lx (MPU region constraints)", 144 pr_warn("Truncating memory from %pa to %pa (MPU region constraints)",
140 (unsigned long)specified_mem_size, 145 &specified_mem_size, &aligned_region_size);
141 (unsigned long)aligned_region_size); 146 memblock_remove(mem_start + aligned_region_size,
147 specified_mem_size - aligned_round_size);
148
149 mem_end = mem_start + aligned_region_size;
150 }
142 151
143 meminfo.bank[0].size = aligned_region_size; 152 pr_debug("MPU Region from %pa size %pa (end %pa))\n",
144 pr_debug("MPU Region from 0x%.8lx size 0x%.8lx (end 0x%.8lx))\n", 153 &phys_offset, &aligned_region_size, &mem_end);
145 (unsigned long)phys_offset,
146 (unsigned long)aligned_region_size,
147 (unsigned long)bank_phys_end(&bank[0]));
148 154
149} 155}
150 156
@@ -292,7 +298,7 @@ void __init sanity_check_meminfo(void)
292{ 298{
293 phys_addr_t end; 299 phys_addr_t end;
294 sanity_check_meminfo_mpu(); 300 sanity_check_meminfo_mpu();
295 end = bank_phys_end(&meminfo.bank[meminfo.nr_banks - 1]); 301 end = memblock_end_of_DRAM();
296 high_memory = __va(end - 1) + 1; 302 high_memory = __va(end - 1) + 1;
297} 303}
298 304
diff --git a/arch/arm/mm/proc-v7-3level.S b/arch/arm/mm/proc-v7-3level.S
index 01a719e18bb0..22e3ad63500c 100644
--- a/arch/arm/mm/proc-v7-3level.S
+++ b/arch/arm/mm/proc-v7-3level.S
@@ -64,6 +64,14 @@ ENTRY(cpu_v7_switch_mm)
64 mov pc, lr 64 mov pc, lr
65ENDPROC(cpu_v7_switch_mm) 65ENDPROC(cpu_v7_switch_mm)
66 66
67#ifdef __ARMEB__
68#define rl r3
69#define rh r2
70#else
71#define rl r2
72#define rh r3
73#endif
74
67/* 75/*
68 * cpu_v7_set_pte_ext(ptep, pte) 76 * cpu_v7_set_pte_ext(ptep, pte)
69 * 77 *
@@ -73,13 +81,13 @@ ENDPROC(cpu_v7_switch_mm)
73 */ 81 */
74ENTRY(cpu_v7_set_pte_ext) 82ENTRY(cpu_v7_set_pte_ext)
75#ifdef CONFIG_MMU 83#ifdef CONFIG_MMU
76 tst r2, #L_PTE_VALID 84 tst rl, #L_PTE_VALID
77 beq 1f 85 beq 1f
78 tst r3, #1 << (57 - 32) @ L_PTE_NONE 86 tst rh, #1 << (57 - 32) @ L_PTE_NONE
79 bicne r2, #L_PTE_VALID 87 bicne rl, #L_PTE_VALID
80 bne 1f 88 bne 1f
81 tst r3, #1 << (55 - 32) @ L_PTE_DIRTY 89 tst rh, #1 << (55 - 32) @ L_PTE_DIRTY
82 orreq r2, #L_PTE_RDONLY 90 orreq rl, #L_PTE_RDONLY
831: strd r2, r3, [r0] 911: strd r2, r3, [r0]
84 ALT_SMP(W(nop)) 92 ALT_SMP(W(nop))
85 ALT_UP (mcr p15, 0, r0, c7, c10, 1) @ flush_pte 93 ALT_UP (mcr p15, 0, r0, c7, c10, 1) @ flush_pte
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index 195731d3813b..3db2c2f04a30 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -169,9 +169,31 @@ ENDPROC(cpu_pj4b_do_idle)
169 globl_equ cpu_pj4b_do_idle, cpu_v7_do_idle 169 globl_equ cpu_pj4b_do_idle, cpu_v7_do_idle
170#endif 170#endif
171 globl_equ cpu_pj4b_dcache_clean_area, cpu_v7_dcache_clean_area 171 globl_equ cpu_pj4b_dcache_clean_area, cpu_v7_dcache_clean_area
172 globl_equ cpu_pj4b_do_suspend, cpu_v7_do_suspend 172#ifdef CONFIG_ARM_CPU_SUSPEND
173 globl_equ cpu_pj4b_do_resume, cpu_v7_do_resume 173ENTRY(cpu_pj4b_do_suspend)
174 globl_equ cpu_pj4b_suspend_size, cpu_v7_suspend_size 174 stmfd sp!, {r6 - r10}
175 mrc p15, 1, r6, c15, c1, 0 @ save CP15 - extra features
176 mrc p15, 1, r7, c15, c2, 0 @ save CP15 - Aux Func Modes Ctrl 0
177 mrc p15, 1, r8, c15, c1, 2 @ save CP15 - Aux Debug Modes Ctrl 2
178 mrc p15, 1, r9, c15, c1, 1 @ save CP15 - Aux Debug Modes Ctrl 1
179 mrc p15, 0, r10, c9, c14, 0 @ save CP15 - PMC
180 stmia r0!, {r6 - r10}
181 ldmfd sp!, {r6 - r10}
182 b cpu_v7_do_suspend
183ENDPROC(cpu_pj4b_do_suspend)
184
185ENTRY(cpu_pj4b_do_resume)
186 ldmia r0!, {r6 - r10}
187 mcr p15, 1, r6, c15, c1, 0 @ save CP15 - extra features
188 mcr p15, 1, r7, c15, c2, 0 @ save CP15 - Aux Func Modes Ctrl 0
189 mcr p15, 1, r8, c15, c1, 2 @ save CP15 - Aux Debug Modes Ctrl 2
190 mcr p15, 1, r9, c15, c1, 1 @ save CP15 - Aux Debug Modes Ctrl 1
191 mcr p15, 0, r10, c9, c14, 0 @ save CP15 - PMC
192 b cpu_v7_do_resume
193ENDPROC(cpu_pj4b_do_resume)
194#endif
195.globl cpu_pj4b_suspend_size
196.equ cpu_pj4b_suspend_size, 4 * 14
175 197
176#endif 198#endif
177 199
@@ -194,6 +216,7 @@ __v7_cr7mp_setup:
194__v7_ca7mp_setup: 216__v7_ca7mp_setup:
195__v7_ca12mp_setup: 217__v7_ca12mp_setup:
196__v7_ca15mp_setup: 218__v7_ca15mp_setup:
219__v7_ca17mp_setup:
197 mov r10, #0 220 mov r10, #0
1981: 2211:
199#ifdef CONFIG_SMP 222#ifdef CONFIG_SMP
@@ -505,6 +528,16 @@ __v7_ca15mp_proc_info:
505 .size __v7_ca15mp_proc_info, . - __v7_ca15mp_proc_info 528 .size __v7_ca15mp_proc_info, . - __v7_ca15mp_proc_info
506 529
507 /* 530 /*
531 * ARM Ltd. Cortex A17 processor.
532 */
533 .type __v7_ca17mp_proc_info, #object
534__v7_ca17mp_proc_info:
535 .long 0x410fc0e0
536 .long 0xff0ffff0
537 __v7_proc __v7_ca17mp_setup
538 .size __v7_ca17mp_proc_info, . - __v7_ca17mp_proc_info
539
540 /*
508 * Qualcomm Inc. Krait processors. 541 * Qualcomm Inc. Krait processors.
509 */ 542 */
510 .type __krait_proc_info, #object 543 .type __krait_proc_info, #object
diff --git a/arch/arm/mm/proc-v7m.S b/arch/arm/mm/proc-v7m.S
index 0c93588fcb91..1ca37c72f12f 100644
--- a/arch/arm/mm/proc-v7m.S
+++ b/arch/arm/mm/proc-v7m.S
@@ -123,6 +123,11 @@ __v7m_setup:
123 mov pc, lr 123 mov pc, lr
124ENDPROC(__v7m_setup) 124ENDPROC(__v7m_setup)
125 125
126 .align 2
127__v7m_setup_stack:
128 .space 4 * 8 @ 8 registers
129__v7m_setup_stack_top:
130
126 define_processor_functions v7m, dabort=nommu_early_abort, pabort=legacy_pabort, nommu=1 131 define_processor_functions v7m, dabort=nommu_early_abort, pabort=legacy_pabort, nommu=1
127 132
128 .section ".rodata" 133 .section ".rodata"
@@ -152,6 +157,3 @@ __v7m_proc_info:
152 .long nop_cache_fns @ proc_info_list.cache 157 .long nop_cache_fns @ proc_info_list.cache
153 .size __v7m_proc_info, . - __v7m_proc_info 158 .size __v7m_proc_info, . - __v7m_proc_info
154 159
155__v7m_setup_stack:
156 .space 4 * 8 @ 8 registers
157__v7m_setup_stack_top:
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c
index 384a776d8eb2..61b4d705c267 100644
--- a/arch/arm/plat-omap/counter_32k.c
+++ b/arch/arm/plat-omap/counter_32k.c
@@ -40,7 +40,7 @@ static void __iomem *sync32k_cnt_reg;
40 40
41static u64 notrace omap_32k_read_sched_clock(void) 41static u64 notrace omap_32k_read_sched_clock(void)
42{ 42{
43 return sync32k_cnt_reg ? __raw_readl(sync32k_cnt_reg) : 0; 43 return sync32k_cnt_reg ? readl_relaxed(sync32k_cnt_reg) : 0;
44} 44}
45 45
46/** 46/**
@@ -64,7 +64,7 @@ static void omap_read_persistent_clock(struct timespec *ts)
64 spin_lock_irqsave(&read_persistent_clock_lock, flags); 64 spin_lock_irqsave(&read_persistent_clock_lock, flags);
65 65
66 last_cycles = cycles; 66 last_cycles = cycles;
67 cycles = sync32k_cnt_reg ? __raw_readl(sync32k_cnt_reg) : 0; 67 cycles = sync32k_cnt_reg ? readl_relaxed(sync32k_cnt_reg) : 0;
68 68
69 nsecs = clocksource_cyc2ns(cycles - last_cycles, 69 nsecs = clocksource_cyc2ns(cycles - last_cycles,
70 persistent_mult, persistent_shift); 70 persistent_mult, persistent_shift);
@@ -95,7 +95,7 @@ int __init omap_init_clocksource_32k(void __iomem *vbase)
95 * The 'SCHEME' bits(30-31) of the revision register is used 95 * The 'SCHEME' bits(30-31) of the revision register is used
96 * to identify the version. 96 * to identify the version.
97 */ 97 */
98 if (__raw_readl(vbase + OMAP2_32KSYNCNT_REV_OFF) & 98 if (readl_relaxed(vbase + OMAP2_32KSYNCNT_REV_OFF) &
99 OMAP2_32KSYNCNT_REV_SCHEME) 99 OMAP2_32KSYNCNT_REV_SCHEME)
100 sync32k_cnt_reg = vbase + OMAP2_32KSYNCNT_CR_OFF_HIGH; 100 sync32k_cnt_reg = vbase + OMAP2_32KSYNCNT_CR_OFF_HIGH;
101 else 101 else
diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c
index aa7ebc6bcd65..48b69de89a5d 100644
--- a/arch/arm/plat-omap/debug-leds.c
+++ b/arch/arm/plat-omap/debug-leds.c
@@ -85,12 +85,12 @@ static void dbg_led_set(struct led_classdev *cdev,
85 struct dbg_led *led = container_of(cdev, struct dbg_led, cdev); 85 struct dbg_led *led = container_of(cdev, struct dbg_led, cdev);
86 u16 reg; 86 u16 reg;
87 87
88 reg = __raw_readw(&fpga->leds); 88 reg = readw_relaxed(&fpga->leds);
89 if (b != LED_OFF) 89 if (b != LED_OFF)
90 reg |= led->mask; 90 reg |= led->mask;
91 else 91 else
92 reg &= ~led->mask; 92 reg &= ~led->mask;
93 __raw_writew(reg, &fpga->leds); 93 writew_relaxed(reg, &fpga->leds);
94} 94}
95 95
96static enum led_brightness dbg_led_get(struct led_classdev *cdev) 96static enum led_brightness dbg_led_get(struct led_classdev *cdev)
@@ -98,7 +98,7 @@ static enum led_brightness dbg_led_get(struct led_classdev *cdev)
98 struct dbg_led *led = container_of(cdev, struct dbg_led, cdev); 98 struct dbg_led *led = container_of(cdev, struct dbg_led, cdev);
99 u16 reg; 99 u16 reg;
100 100
101 reg = __raw_readw(&fpga->leds); 101 reg = readw_relaxed(&fpga->leds);
102 return (reg & led->mask) ? LED_FULL : LED_OFF; 102 return (reg & led->mask) ? LED_FULL : LED_OFF;
103} 103}
104 104
@@ -112,7 +112,7 @@ static int fpga_probe(struct platform_device *pdev)
112 return -ENODEV; 112 return -ENODEV;
113 113
114 fpga = ioremap(iomem->start, resource_size(iomem)); 114 fpga = ioremap(iomem->start, resource_size(iomem));
115 __raw_writew(0xff, &fpga->leds); 115 writew_relaxed(0xff, &fpga->leds);
116 116
117 for (i = 0; i < ARRAY_SIZE(dbg_leds); i++) { 117 for (i = 0; i < ARRAY_SIZE(dbg_leds); i++) {
118 struct dbg_led *led; 118 struct dbg_led *led;
@@ -138,15 +138,15 @@ static int fpga_probe(struct platform_device *pdev)
138 138
139static int fpga_suspend_noirq(struct device *dev) 139static int fpga_suspend_noirq(struct device *dev)
140{ 140{
141 fpga_led_state = __raw_readw(&fpga->leds); 141 fpga_led_state = readw_relaxed(&fpga->leds);
142 __raw_writew(0xff, &fpga->leds); 142 writew_relaxed(0xff, &fpga->leds);
143 143
144 return 0; 144 return 0;
145} 145}
146 146
147static int fpga_resume_noirq(struct device *dev) 147static int fpga_resume_noirq(struct device *dev)
148{ 148{
149 __raw_writew(~fpga_led_state, &fpga->leds); 149 writew_relaxed(~fpga_led_state, &fpga->leds);
150 return 0; 150 return 0;
151} 151}
152 152
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 5f5b975887fc..b5608b1f9fbd 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -70,6 +70,7 @@ static u32 errata;
70 70
71static struct omap_dma_global_context_registers { 71static struct omap_dma_global_context_registers {
72 u32 dma_irqenable_l0; 72 u32 dma_irqenable_l0;
73 u32 dma_irqenable_l1;
73 u32 dma_ocp_sysconfig; 74 u32 dma_ocp_sysconfig;
74 u32 dma_gcr; 75 u32 dma_gcr;
75} omap_dma_global_context; 76} omap_dma_global_context;
@@ -1973,10 +1974,17 @@ static struct irqaction omap24xx_dma_irq;
1973 1974
1974/*----------------------------------------------------------------------------*/ 1975/*----------------------------------------------------------------------------*/
1975 1976
1977/*
1978 * Note that we are currently using only IRQENABLE_L0 and L1.
1979 * As the DSP may be using IRQENABLE_L2 and L3, let's not
1980 * touch those for now.
1981 */
1976void omap_dma_global_context_save(void) 1982void omap_dma_global_context_save(void)
1977{ 1983{
1978 omap_dma_global_context.dma_irqenable_l0 = 1984 omap_dma_global_context.dma_irqenable_l0 =
1979 p->dma_read(IRQENABLE_L0, 0); 1985 p->dma_read(IRQENABLE_L0, 0);
1986 omap_dma_global_context.dma_irqenable_l1 =
1987 p->dma_read(IRQENABLE_L1, 0);
1980 omap_dma_global_context.dma_ocp_sysconfig = 1988 omap_dma_global_context.dma_ocp_sysconfig =
1981 p->dma_read(OCP_SYSCONFIG, 0); 1989 p->dma_read(OCP_SYSCONFIG, 0);
1982 omap_dma_global_context.dma_gcr = p->dma_read(GCR, 0); 1990 omap_dma_global_context.dma_gcr = p->dma_read(GCR, 0);
@@ -1991,6 +1999,8 @@ void omap_dma_global_context_restore(void)
1991 OCP_SYSCONFIG, 0); 1999 OCP_SYSCONFIG, 0);
1992 p->dma_write(omap_dma_global_context.dma_irqenable_l0, 2000 p->dma_write(omap_dma_global_context.dma_irqenable_l0,
1993 IRQENABLE_L0, 0); 2001 IRQENABLE_L0, 0);
2002 p->dma_write(omap_dma_global_context.dma_irqenable_l1,
2003 IRQENABLE_L1, 0);
1994 2004
1995 if (IS_DMA_ERRATA(DMA_ROMCODE_BUG)) 2005 if (IS_DMA_ERRATA(DMA_ROMCODE_BUG))
1996 p->dma_write(0x3 , IRQSTATUS_L0, 0); 2006 p->dma_write(0x3 , IRQSTATUS_L0, 0);
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 869254cebf84..db10169a08de 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -103,7 +103,7 @@ static void omap_timer_restore_context(struct omap_dm_timer *timer)
103 timer->context.tmar); 103 timer->context.tmar);
104 omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, 104 omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG,
105 timer->context.tsicr); 105 timer->context.tsicr);
106 __raw_writel(timer->context.tier, timer->irq_ena); 106 writel_relaxed(timer->context.tier, timer->irq_ena);
107 omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, 107 omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG,
108 timer->context.tclr); 108 timer->context.tclr);
109} 109}
@@ -699,9 +699,9 @@ int omap_dm_timer_set_int_disable(struct omap_dm_timer *timer, u32 mask)
699 omap_dm_timer_enable(timer); 699 omap_dm_timer_enable(timer);
700 700
701 if (timer->revision == 1) 701 if (timer->revision == 1)
702 l = __raw_readl(timer->irq_ena) & ~mask; 702 l = readl_relaxed(timer->irq_ena) & ~mask;
703 703
704 __raw_writel(l, timer->irq_dis); 704 writel_relaxed(l, timer->irq_dis);
705 l = omap_dm_timer_read_reg(timer, OMAP_TIMER_WAKEUP_EN_REG) & ~mask; 705 l = omap_dm_timer_read_reg(timer, OMAP_TIMER_WAKEUP_EN_REG) & ~mask;
706 omap_dm_timer_write_reg(timer, OMAP_TIMER_WAKEUP_EN_REG, l); 706 omap_dm_timer_write_reg(timer, OMAP_TIMER_WAKEUP_EN_REG, l);
707 707
@@ -722,7 +722,7 @@ unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer)
722 return 0; 722 return 0;
723 } 723 }
724 724
725 l = __raw_readl(timer->irq_stat); 725 l = readl_relaxed(timer->irq_stat);
726 726
727 return l; 727 return l;
728} 728}
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
index 2861b155485a..dd79f3005cdf 100644
--- a/arch/arm/plat-omap/include/plat/dmtimer.h
+++ b/arch/arm/plat-omap/include/plat/dmtimer.h
@@ -280,20 +280,20 @@ static inline u32 __omap_dm_timer_read(struct omap_dm_timer *timer, u32 reg,
280 int posted) 280 int posted)
281{ 281{
282 if (posted) 282 if (posted)
283 while (__raw_readl(timer->pend) & (reg >> WPSHIFT)) 283 while (readl_relaxed(timer->pend) & (reg >> WPSHIFT))
284 cpu_relax(); 284 cpu_relax();
285 285
286 return __raw_readl(timer->func_base + (reg & 0xff)); 286 return readl_relaxed(timer->func_base + (reg & 0xff));
287} 287}
288 288
289static inline void __omap_dm_timer_write(struct omap_dm_timer *timer, 289static inline void __omap_dm_timer_write(struct omap_dm_timer *timer,
290 u32 reg, u32 val, int posted) 290 u32 reg, u32 val, int posted)
291{ 291{
292 if (posted) 292 if (posted)
293 while (__raw_readl(timer->pend) & (reg >> WPSHIFT)) 293 while (readl_relaxed(timer->pend) & (reg >> WPSHIFT))
294 cpu_relax(); 294 cpu_relax();
295 295
296 __raw_writel(val, timer->func_base + (reg & 0xff)); 296 writel_relaxed(val, timer->func_base + (reg & 0xff));
297} 297}
298 298
299static inline void __omap_dm_timer_init_regs(struct omap_dm_timer *timer) 299static inline void __omap_dm_timer_init_regs(struct omap_dm_timer *timer)
@@ -301,7 +301,7 @@ static inline void __omap_dm_timer_init_regs(struct omap_dm_timer *timer)
301 u32 tidr; 301 u32 tidr;
302 302
303 /* Assume v1 ip if bits [31:16] are zero */ 303 /* Assume v1 ip if bits [31:16] are zero */
304 tidr = __raw_readl(timer->io_base); 304 tidr = readl_relaxed(timer->io_base);
305 if (!(tidr >> 16)) { 305 if (!(tidr >> 16)) {
306 timer->revision = 1; 306 timer->revision = 1;
307 timer->irq_stat = timer->io_base + OMAP_TIMER_V1_STAT_OFFSET; 307 timer->irq_stat = timer->io_base + OMAP_TIMER_V1_STAT_OFFSET;
@@ -385,7 +385,7 @@ static inline void __omap_dm_timer_stop(struct omap_dm_timer *timer,
385 } 385 }
386 386
387 /* Ack possibly pending interrupt */ 387 /* Ack possibly pending interrupt */
388 __raw_writel(OMAP_TIMER_INT_OVERFLOW, timer->irq_stat); 388 writel_relaxed(OMAP_TIMER_INT_OVERFLOW, timer->irq_stat);
389} 389}
390 390
391static inline void __omap_dm_timer_load_start(struct omap_dm_timer *timer, 391static inline void __omap_dm_timer_load_start(struct omap_dm_timer *timer,
@@ -399,7 +399,7 @@ static inline void __omap_dm_timer_load_start(struct omap_dm_timer *timer,
399static inline void __omap_dm_timer_int_enable(struct omap_dm_timer *timer, 399static inline void __omap_dm_timer_int_enable(struct omap_dm_timer *timer,
400 unsigned int value) 400 unsigned int value)
401{ 401{
402 __raw_writel(value, timer->irq_ena); 402 writel_relaxed(value, timer->irq_ena);
403 __omap_dm_timer_write(timer, OMAP_TIMER_WAKEUP_EN_REG, value, 0); 403 __omap_dm_timer_write(timer, OMAP_TIMER_WAKEUP_EN_REG, value, 0);
404} 404}
405 405
@@ -412,7 +412,7 @@ __omap_dm_timer_read_counter(struct omap_dm_timer *timer, int posted)
412static inline void __omap_dm_timer_write_status(struct omap_dm_timer *timer, 412static inline void __omap_dm_timer_write_status(struct omap_dm_timer *timer,
413 unsigned int value) 413 unsigned int value)
414{ 414{
415 __raw_writel(value, timer->irq_stat); 415 writel_relaxed(value, timer->irq_stat);
416} 416}
417 417
418#endif /* __ASM_ARCH_DMTIMER_H */ 418#endif /* __ASM_ARCH_DMTIMER_H */
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c
index 6816192a7561..b61a3bcc2fa8 100644
--- a/arch/arm/plat-orion/gpio.c
+++ b/arch/arm/plat-orion/gpio.c
@@ -597,51 +597,3 @@ void __init orion_gpio_init(struct device_node *np,
597 597
598 orion_gpio_chip_count++; 598 orion_gpio_chip_count++;
599} 599}
600
601#ifdef CONFIG_OF
602static void __init orion_gpio_of_init_one(struct device_node *np,
603 int irq_gpio_base)
604{
605 int ngpio, gpio_base, mask_offset;
606 void __iomem *base;
607 int ret, i;
608 int irqs[4];
609 int secondary_irq_base;
610
611 ret = of_property_read_u32(np, "ngpio", &ngpio);
612 if (ret)
613 goto out;
614 ret = of_property_read_u32(np, "mask-offset", &mask_offset);
615 if (ret == -EINVAL)
616 mask_offset = 0;
617 else
618 goto out;
619 base = of_iomap(np, 0);
620 if (!base)
621 goto out;
622
623 secondary_irq_base = irq_gpio_base + (32 * orion_gpio_chip_count);
624 gpio_base = 32 * orion_gpio_chip_count;
625
626 /* Get the interrupt numbers. Each chip can have up to 4
627 * interrupt handlers, with each handler dealing with 8 GPIO
628 * pins. */
629
630 for (i = 0; i < 4; i++)
631 irqs[i] = irq_of_parse_and_map(np, i);
632
633 orion_gpio_init(np, gpio_base, ngpio, base, mask_offset,
634 secondary_irq_base, irqs);
635 return;
636out:
637 pr_err("%s: %s: missing mandatory property\n", __func__, np->name);
638}
639
640void __init orion_gpio_of_init(int irq_gpio_base)
641{
642 struct device_node *np;
643
644 for_each_compatible_node(np, NULL, "marvell,orion-gpio")
645 orion_gpio_of_init_one(np, irq_gpio_base);
646}
647#endif
diff --git a/arch/arm/plat-orion/include/plat/irq.h b/arch/arm/plat-orion/include/plat/irq.h
index 50547e417936..96be19e9bd93 100644
--- a/arch/arm/plat-orion/include/plat/irq.h
+++ b/arch/arm/plat-orion/include/plat/irq.h
@@ -12,5 +12,4 @@
12#define __PLAT_IRQ_H 12#define __PLAT_IRQ_H
13 13
14void orion_irq_init(unsigned int irq_start, void __iomem *maskaddr); 14void orion_irq_init(unsigned int irq_start, void __iomem *maskaddr);
15void __init orion_dt_init_irq(void);
16#endif 15#endif
diff --git a/arch/arm/plat-orion/include/plat/orion-gpio.h b/arch/arm/plat-orion/include/plat/orion-gpio.h
index 614dcac9dc52..e763988b04b9 100644
--- a/arch/arm/plat-orion/include/plat/orion-gpio.h
+++ b/arch/arm/plat-orion/include/plat/orion-gpio.h
@@ -33,5 +33,4 @@ void __init orion_gpio_init(struct device_node *np,
33 int secondary_irq_base, 33 int secondary_irq_base,
34 int irq[4]); 34 int irq[4]);
35 35
36void __init orion_gpio_of_init(int irq_gpio_base);
37#endif 36#endif
diff --git a/arch/arm/plat-orion/irq.c b/arch/arm/plat-orion/irq.c
index 807df142444b..8c1fc06007c0 100644
--- a/arch/arm/plat-orion/irq.c
+++ b/arch/arm/plat-orion/irq.c
@@ -20,47 +20,6 @@
20#include <plat/orion-gpio.h> 20#include <plat/orion-gpio.h>
21#include <mach/bridge-regs.h> 21#include <mach/bridge-regs.h>
22 22
23#ifdef CONFIG_MULTI_IRQ_HANDLER
24/*
25 * Compiling with both non-DT and DT support enabled, will
26 * break asm irq handler used by non-DT boards. Therefore,
27 * we provide a C-style irq handler even for non-DT boards,
28 * if MULTI_IRQ_HANDLER is set.
29 *
30 * Notes:
31 * - this is prepared for Kirkwood and Dove only, update
32 * accordingly if you add Orion5x or MV78x00.
33 * - Orion5x uses different macro names and has only one
34 * set of CAUSE/MASK registers.
35 * - MV78x00 uses the same macro names but has a third
36 * set of CAUSE/MASK registers.
37 *
38 */
39
40static void __iomem *orion_irq_base = IRQ_VIRT_BASE;
41
42asmlinkage void
43__exception_irq_entry orion_legacy_handle_irq(struct pt_regs *regs)
44{
45 u32 stat;
46
47 stat = readl_relaxed(orion_irq_base + IRQ_CAUSE_LOW_OFF);
48 stat &= readl_relaxed(orion_irq_base + IRQ_MASK_LOW_OFF);
49 if (stat) {
50 unsigned int hwirq = __fls(stat);
51 handle_IRQ(hwirq, regs);
52 return;
53 }
54 stat = readl_relaxed(orion_irq_base + IRQ_CAUSE_HIGH_OFF);
55 stat &= readl_relaxed(orion_irq_base + IRQ_MASK_HIGH_OFF);
56 if (stat) {
57 unsigned int hwirq = 32 + __fls(stat);
58 handle_IRQ(hwirq, regs);
59 return;
60 }
61}
62#endif
63
64void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr) 23void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr)
65{ 24{
66 struct irq_chip_generic *gc; 25 struct irq_chip_generic *gc;
@@ -78,40 +37,4 @@ void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr)
78 ct->chip.irq_unmask = irq_gc_mask_set_bit; 37 ct->chip.irq_unmask = irq_gc_mask_set_bit;
79 irq_setup_generic_chip(gc, IRQ_MSK(32), IRQ_GC_INIT_MASK_CACHE, 38 irq_setup_generic_chip(gc, IRQ_MSK(32), IRQ_GC_INIT_MASK_CACHE,
80 IRQ_NOREQUEST, IRQ_LEVEL | IRQ_NOPROBE); 39 IRQ_NOREQUEST, IRQ_LEVEL | IRQ_NOPROBE);
81
82#ifdef CONFIG_MULTI_IRQ_HANDLER
83 set_handle_irq(orion_legacy_handle_irq);
84#endif
85}
86
87#ifdef CONFIG_OF
88static int __init orion_add_irq_domain(struct device_node *np,
89 struct device_node *interrupt_parent)
90{
91 int i = 0;
92 void __iomem *base;
93
94 do {
95 base = of_iomap(np, i);
96 if (base) {
97 orion_irq_init(i * 32, base + 0x04);
98 i++;
99 }
100 } while (base);
101
102 irq_domain_add_legacy(np, i * 32, 0, 0,
103 &irq_domain_simple_ops, NULL);
104 return 0;
105}
106
107static const struct of_device_id orion_irq_match[] = {
108 { .compatible = "marvell,orion-intc",
109 .data = orion_add_irq_domain, },
110 {},
111};
112
113void __init orion_dt_init_irq(void)
114{
115 of_irq_init(orion_irq_match);
116} 40}
117#endif
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index 25c826ed3b65..5e5beaa9ae15 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -4,6 +4,9 @@
4# 4#
5# Licensed under GPLv2 5# Licensed under GPLv2
6 6
7ccflags-$(CONFIG_ARCH_MULTI_V7) += -I$(srctree)/$(src)/include
8ccflags-$(CONFIG_ARCH_EXYNOS) += -I$(srctree)/arch/arm/mach-exynos/include
9
7obj-y := 10obj-y :=
8obj-m := 11obj-m :=
9obj-n := dummy.o 12obj-n := dummy.o
diff --git a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h b/arch/arm/plat-samsung/include/plat/cpu-freq-core.h
index 7231c8e4975e..72d4178ad23b 100644
--- a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h
+++ b/arch/arm/plat-samsung/include/plat/cpu-freq-core.h
@@ -119,6 +119,7 @@ struct s3c_plltab {
119struct s3c_cpufreq_config { 119struct s3c_cpufreq_config {
120 struct s3c_freq freq; 120 struct s3c_freq freq;
121 struct s3c_freq max; 121 struct s3c_freq max;
122 struct clk *mpll;
122 struct cpufreq_frequency_table pll; 123 struct cpufreq_frequency_table pll;
123 struct s3c_clkdivs divs; 124 struct s3c_clkdivs divs;
124 struct s3c_cpufreq_info *info; /* for core, not drivers */ 125 struct s3c_cpufreq_info *info; /* for core, not drivers */
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
index 5992b8dd9b89..5a237db9f9eb 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -43,16 +43,6 @@ extern unsigned long samsung_cpu_id;
43#define S5PV210_CPU_ID 0x43110000 43#define S5PV210_CPU_ID 0x43110000
44#define S5PV210_CPU_MASK 0xFFFFF000 44#define S5PV210_CPU_MASK 0xFFFFF000
45 45
46#define EXYNOS4210_CPU_ID 0x43210000
47#define EXYNOS4212_CPU_ID 0x43220000
48#define EXYNOS4412_CPU_ID 0xE4412200
49#define EXYNOS4_CPU_MASK 0xFFFE0000
50
51#define EXYNOS5250_SOC_ID 0x43520000
52#define EXYNOS5420_SOC_ID 0xE5420000
53#define EXYNOS5440_SOC_ID 0xE5440000
54#define EXYNOS5_SOC_MASK 0xFFFFF000
55
56#define IS_SAMSUNG_CPU(name, id, mask) \ 46#define IS_SAMSUNG_CPU(name, id, mask) \
57static inline int is_samsung_##name(void) \ 47static inline int is_samsung_##name(void) \
58{ \ 48{ \
@@ -68,12 +58,6 @@ IS_SAMSUNG_CPU(s5p6440, S5P6440_CPU_ID, S5P64XX_CPU_MASK)
68IS_SAMSUNG_CPU(s5p6450, S5P6450_CPU_ID, S5P64XX_CPU_MASK) 58IS_SAMSUNG_CPU(s5p6450, S5P6450_CPU_ID, S5P64XX_CPU_MASK)
69IS_SAMSUNG_CPU(s5pc100, S5PC100_CPU_ID, S5PC100_CPU_MASK) 59IS_SAMSUNG_CPU(s5pc100, S5PC100_CPU_ID, S5PC100_CPU_MASK)
70IS_SAMSUNG_CPU(s5pv210, S5PV210_CPU_ID, S5PV210_CPU_MASK) 60IS_SAMSUNG_CPU(s5pv210, S5PV210_CPU_ID, S5PV210_CPU_MASK)
71IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK)
72IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK)
73IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK)
74IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK)
75IS_SAMSUNG_CPU(exynos5420, EXYNOS5420_SOC_ID, EXYNOS5_SOC_MASK)
76IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK)
77 61
78#if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \ 62#if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \
79 defined(CONFIG_CPU_S3C2416) || defined(CONFIG_CPU_S3C2440) || \ 63 defined(CONFIG_CPU_S3C2416) || defined(CONFIG_CPU_S3C2440) || \
@@ -126,50 +110,6 @@ IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK)
126# define soc_is_s5pv210() 0 110# define soc_is_s5pv210() 0
127#endif 111#endif
128 112
129#if defined(CONFIG_CPU_EXYNOS4210)
130# define soc_is_exynos4210() is_samsung_exynos4210()
131#else
132# define soc_is_exynos4210() 0
133#endif
134
135#if defined(CONFIG_SOC_EXYNOS4212)
136# define soc_is_exynos4212() is_samsung_exynos4212()
137#else
138# define soc_is_exynos4212() 0
139#endif
140
141#if defined(CONFIG_SOC_EXYNOS4412)
142# define soc_is_exynos4412() is_samsung_exynos4412()
143#else
144# define soc_is_exynos4412() 0
145#endif
146
147#define EXYNOS4210_REV_0 (0x0)
148#define EXYNOS4210_REV_1_0 (0x10)
149#define EXYNOS4210_REV_1_1 (0x11)
150
151#if defined(CONFIG_SOC_EXYNOS5250)
152# define soc_is_exynos5250() is_samsung_exynos5250()
153#else
154# define soc_is_exynos5250() 0
155#endif
156
157#if defined(CONFIG_SOC_EXYNOS5420)
158# define soc_is_exynos5420() is_samsung_exynos5420()
159#else
160# define soc_is_exynos5420() 0
161#endif
162
163#if defined(CONFIG_SOC_EXYNOS5440)
164# define soc_is_exynos5440() is_samsung_exynos5440()
165#else
166# define soc_is_exynos5440() 0
167#endif
168
169#define soc_is_exynos4() (soc_is_exynos4210() || soc_is_exynos4212() || \
170 soc_is_exynos4412())
171#define soc_is_exynos5() (soc_is_exynos5250() || soc_is_exynos5420())
172
173#define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } 113#define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE }
174 114
175#ifndef KHZ 115#ifndef KHZ
@@ -239,7 +179,6 @@ extern struct bus_type s3c2443_subsys;
239extern struct bus_type s3c6410_subsys; 179extern struct bus_type s3c6410_subsys;
240extern struct bus_type s5p64x0_subsys; 180extern struct bus_type s5p64x0_subsys;
241extern struct bus_type s5pv210_subsys; 181extern struct bus_type s5pv210_subsys;
242extern struct bus_type exynos_subsys;
243 182
244extern void (*s5pc1xx_idle)(void); 183extern void (*s5pc1xx_idle)(void);
245 184
diff --git a/arch/arm/plat-samsung/s5p-dev-mfc.c b/arch/arm/plat-samsung/s5p-dev-mfc.c
index 98087b655df0..469b86260fe3 100644
--- a/arch/arm/plat-samsung/s5p-dev-mfc.c
+++ b/arch/arm/plat-samsung/s5p-dev-mfc.c
@@ -125,8 +125,8 @@ device_initcall(s5p_mfc_memory_init);
125int __init s5p_fdt_alloc_mfc_mem(unsigned long node, const char *uname, 125int __init s5p_fdt_alloc_mfc_mem(unsigned long node, const char *uname,
126 int depth, void *data) 126 int depth, void *data)
127{ 127{
128 __be32 *prop; 128 const __be32 *prop;
129 unsigned long len; 129 int len;
130 struct s5p_mfc_dt_meminfo mfc_mem; 130 struct s5p_mfc_dt_meminfo mfc_mem;
131 131
132 if (!data) 132 if (!data)
diff --git a/arch/arm/plat-samsung/s5p-sleep.S b/arch/arm/plat-samsung/s5p-sleep.S
index c5001659bdf8..25c68ceb9e2b 100644
--- a/arch/arm/plat-samsung/s5p-sleep.S
+++ b/arch/arm/plat-samsung/s5p-sleep.S
@@ -22,7 +22,6 @@
22*/ 22*/
23 23
24#include <linux/linkage.h> 24#include <linux/linkage.h>
25#include <asm/asm-offsets.h>
26 25
27 .data 26 .data
28 .align 27 .align
diff --git a/arch/arm/plat-versatile/Kconfig b/arch/arm/plat-versatile/Kconfig
index 2c4332b9f948..fce41e93b6a4 100644
--- a/arch/arm/plat-versatile/Kconfig
+++ b/arch/arm/plat-versatile/Kconfig
@@ -6,12 +6,6 @@ config PLAT_VERSATILE_CLOCK
6config PLAT_VERSATILE_CLCD 6config PLAT_VERSATILE_CLCD
7 bool 7 bool
8 8
9config PLAT_VERSATILE_LEDS
10 def_bool y if NEW_LEDS
11 depends on ARCH_REALVIEW || ARCH_VERSATILE
12 select LEDS_CLASS
13 select LEDS_TRIGGERS
14
15config PLAT_VERSATILE_SCHED_CLOCK 9config PLAT_VERSATILE_SCHED_CLOCK
16 def_bool y 10 def_bool y
17 11
diff --git a/arch/arm/plat-versatile/Makefile b/arch/arm/plat-versatile/Makefile
index f88d448b629c..2e0c472958ae 100644
--- a/arch/arm/plat-versatile/Makefile
+++ b/arch/arm/plat-versatile/Makefile
@@ -2,6 +2,5 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
2 2
3obj-$(CONFIG_PLAT_VERSATILE_CLOCK) += clock.o 3obj-$(CONFIG_PLAT_VERSATILE_CLOCK) += clock.o
4obj-$(CONFIG_PLAT_VERSATILE_CLCD) += clcd.o 4obj-$(CONFIG_PLAT_VERSATILE_CLCD) += clcd.o
5obj-$(CONFIG_PLAT_VERSATILE_LEDS) += leds.o
6obj-$(CONFIG_PLAT_VERSATILE_SCHED_CLOCK) += sched-clock.o 5obj-$(CONFIG_PLAT_VERSATILE_SCHED_CLOCK) += sched-clock.o
7obj-$(CONFIG_SMP) += headsmp.o platsmp.o 6obj-$(CONFIG_SMP) += headsmp.o platsmp.o
diff --git a/arch/arm/plat-versatile/leds.c b/arch/arm/plat-versatile/leds.c
deleted file mode 100644
index d2490d00b46c..000000000000
--- a/arch/arm/plat-versatile/leds.c
+++ /dev/null
@@ -1,103 +0,0 @@
1/*
2 * Driver for the 8 user LEDs found on the RealViews and Versatiles
3 * Based on DaVinci's DM365 board code
4 *
5 * License terms: GNU General Public License (GPL) version 2
6 * Author: Linus Walleij <triad@df.lth.se>
7 */
8#include <linux/kernel.h>
9#include <linux/init.h>
10#include <linux/io.h>
11#include <linux/slab.h>
12#include <linux/leds.h>
13
14#include <mach/hardware.h>
15#include <mach/platform.h>
16
17#ifdef VERSATILE_SYS_BASE
18#define LEDREG (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_LED_OFFSET)
19#endif
20
21#ifdef REALVIEW_SYS_BASE
22#define LEDREG (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_LED_OFFSET)
23#endif
24
25struct versatile_led {
26 struct led_classdev cdev;
27 u8 mask;
28};
29
30/*
31 * The triggers lines up below will only be used if the
32 * LED triggers are compiled in.
33 */
34static const struct {
35 const char *name;
36 const char *trigger;
37} versatile_leds[] = {
38 { "versatile:0", "heartbeat", },
39 { "versatile:1", "mmc0", },
40 { "versatile:2", "cpu0" },
41 { "versatile:3", "cpu1" },
42 { "versatile:4", "cpu2" },
43 { "versatile:5", "cpu3" },
44 { "versatile:6", },
45 { "versatile:7", },
46};
47
48static void versatile_led_set(struct led_classdev *cdev,
49 enum led_brightness b)
50{
51 struct versatile_led *led = container_of(cdev,
52 struct versatile_led, cdev);
53 u32 reg = readl(LEDREG);
54
55 if (b != LED_OFF)
56 reg |= led->mask;
57 else
58 reg &= ~led->mask;
59 writel(reg, LEDREG);
60}
61
62static enum led_brightness versatile_led_get(struct led_classdev *cdev)
63{
64 struct versatile_led *led = container_of(cdev,
65 struct versatile_led, cdev);
66 u32 reg = readl(LEDREG);
67
68 return (reg & led->mask) ? LED_FULL : LED_OFF;
69}
70
71static int __init versatile_leds_init(void)
72{
73 int i;
74
75 /* All ON */
76 writel(0xff, LEDREG);
77 for (i = 0; i < ARRAY_SIZE(versatile_leds); i++) {
78 struct versatile_led *led;
79
80 led = kzalloc(sizeof(*led), GFP_KERNEL);
81 if (!led)
82 break;
83
84 led->cdev.name = versatile_leds[i].name;
85 led->cdev.brightness_set = versatile_led_set;
86 led->cdev.brightness_get = versatile_led_get;
87 led->cdev.default_trigger = versatile_leds[i].trigger;
88 led->mask = BIT(i);
89
90 if (led_classdev_register(NULL, &led->cdev) < 0) {
91 kfree(led);
92 break;
93 }
94 }
95
96 return 0;
97}
98
99/*
100 * Since we may have triggers on any subsystem, defer registration
101 * until after subsystem_init.
102 */
103fs_initcall(versatile_leds_init);
diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S
index f0759e70fb86..fe6ca574d093 100644
--- a/arch/arm/vfp/entry.S
+++ b/arch/arm/vfp/entry.S
@@ -22,11 +22,10 @@
22@ r9 = normal "successful" return address 22@ r9 = normal "successful" return address
23@ r10 = this threads thread_info structure 23@ r10 = this threads thread_info structure
24@ lr = unrecognised instruction return address 24@ lr = unrecognised instruction return address
25@ IRQs disabled. 25@ IRQs enabled.
26@ 26@
27ENTRY(do_vfp) 27ENTRY(do_vfp)
28 inc_preempt_count r10, r4 28 inc_preempt_count r10, r4
29 enable_irq
30 ldr r4, .LCvfp 29 ldr r4, .LCvfp
31 ldr r11, [r10, #TI_CPU] @ CPU number 30 ldr r11, [r10, #TI_CPU] @ CPU number
32 add r10, r10, #TI_VFPSTATE @ r10 = workspace 31 add r10, r10, #TI_VFPSTATE @ r10 = workspace
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index b96723e258a0..1e632430570b 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -339,6 +339,14 @@ static int __init xen_pm_init(void)
339} 339}
340late_initcall(xen_pm_init); 340late_initcall(xen_pm_init);
341 341
342
343/* empty stubs */
344void xen_arch_pre_suspend(void) { }
345void xen_arch_post_suspend(int suspend_cancelled) { }
346void xen_timer_resume(void) { }
347void xen_arch_resume(void) { }
348
349
342/* In the hypervisor.S file. */ 350/* In the hypervisor.S file. */
343EXPORT_SYMBOL_GPL(HYPERVISOR_event_channel_op); 351EXPORT_SYMBOL_GPL(HYPERVISOR_event_channel_op);
344EXPORT_SYMBOL_GPL(HYPERVISOR_grant_table_op); 352EXPORT_SYMBOL_GPL(HYPERVISOR_grant_table_op);
@@ -350,4 +358,5 @@ EXPORT_SYMBOL_GPL(HYPERVISOR_memory_op);
350EXPORT_SYMBOL_GPL(HYPERVISOR_physdev_op); 358EXPORT_SYMBOL_GPL(HYPERVISOR_physdev_op);
351EXPORT_SYMBOL_GPL(HYPERVISOR_vcpu_op); 359EXPORT_SYMBOL_GPL(HYPERVISOR_vcpu_op);
352EXPORT_SYMBOL_GPL(HYPERVISOR_tmem_op); 360EXPORT_SYMBOL_GPL(HYPERVISOR_tmem_op);
361EXPORT_SYMBOL_GPL(HYPERVISOR_multicall);
353EXPORT_SYMBOL_GPL(privcmd_call); 362EXPORT_SYMBOL_GPL(privcmd_call);
diff --git a/arch/arm/xen/hypercall.S b/arch/arm/xen/hypercall.S
index d1cf7b7c2200..44e3a5f10c4c 100644
--- a/arch/arm/xen/hypercall.S
+++ b/arch/arm/xen/hypercall.S
@@ -89,6 +89,7 @@ HYPERCALL2(memory_op);
89HYPERCALL2(physdev_op); 89HYPERCALL2(physdev_op);
90HYPERCALL3(vcpu_op); 90HYPERCALL3(vcpu_op);
91HYPERCALL1(tmem_op); 91HYPERCALL1(tmem_op);
92HYPERCALL2(multicall);
92 93
93ENTRY(privcmd_call) 94ENTRY(privcmd_call)
94 stmdb sp!, {r4} 95 stmdb sp!, {r4}