Merge branch 'master' of git://git.denx.de/u-boot-imx
authorStefano Babic <sbabic@denx.de>
Thu, 18 May 2017 09:53:27 +0000 (11:53 +0200)
committerStefano Babic <sbabic@denx.de>
Thu, 18 May 2017 09:53:55 +0000 (11:53 +0200)
Signed-off-by: Stefano Babic <sbabic@denx.de>
1046 files changed:
Makefile
README
arch/Kconfig
arch/arm/Kconfig
arch/arm/config.mk
arch/arm/cpu/arm926ejs/omap/Makefile [deleted file]
arch/arm/cpu/arm926ejs/omap/cpuinfo.c [deleted file]
arch/arm/cpu/arm926ejs/omap/reset.S [deleted file]
arch/arm/cpu/arm926ejs/omap/timer.c [deleted file]
arch/arm/cpu/armv7m/Makefile
arch/arm/cpu/armv7m/cache.c
arch/arm/cpu/armv7m/cpu.c
arch/arm/cpu/armv7m/mpu.c [new file with mode: 0644]
arch/arm/cpu/armv8/cache.S
arch/arm/cpu/armv8/cache_v8.c
arch/arm/cpu/armv8/generic_timer.c
arch/arm/cpu/armv8/start.S
arch/arm/dts/Makefile
arch/arm/dts/armada-385-amc.dts
arch/arm/dts/armada-7040-db-nand.dts [new file with mode: 0644]
arch/arm/dts/armada-7040-db.dts
arch/arm/dts/armada-8040-db.dts
arch/arm/dts/armada-8040-mcbin.dts
arch/arm/dts/armada-cp110-master.dtsi
arch/arm/dts/armada-cp110-slave.dtsi
arch/arm/dts/at91-sama5d2_xplained.dts
arch/arm/dts/at91sam9260.dtsi
arch/arm/dts/at91sam9260ek.dts [new file with mode: 0644]
arch/arm/dts/at91sam9263.dtsi
arch/arm/dts/at91sam9263ek.dts [new file with mode: 0644]
arch/arm/dts/at91sam9g15.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9g15ek.dts [new file with mode: 0644]
arch/arm/dts/at91sam9g20.dtsi
arch/arm/dts/at91sam9g20ek.dts [new file with mode: 0644]
arch/arm/dts/at91sam9g20ek_2mmc.dts [new file with mode: 0644]
arch/arm/dts/at91sam9g20ek_common.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9g25.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9g25ek.dts [new file with mode: 0644]
arch/arm/dts/at91sam9g35.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9g35ek.dts [new file with mode: 0644]
arch/arm/dts/at91sam9g45.dtsi
arch/arm/dts/at91sam9m10g45ek.dts [new file with mode: 0644]
arch/arm/dts/at91sam9n12.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9n12ek.dts [new file with mode: 0644]
arch/arm/dts/at91sam9rl.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9rlek.dts [new file with mode: 0644]
arch/arm/dts/at91sam9x25.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9x25ek.dts [new file with mode: 0644]
arch/arm/dts/at91sam9x35.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9x35ek.dts [new file with mode: 0644]
arch/arm/dts/at91sam9x5.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9x5_can.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9x5_isi.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9x5_lcd.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9x5_macb0.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9x5_macb1.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9x5_usart3.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9x5cm.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9x5dm.dtsi [new file with mode: 0644]
arch/arm/dts/at91sam9x5ek.dtsi [new file with mode: 0644]
arch/arm/dts/imx7-colibri.dts
arch/arm/dts/imx7.dtsi [deleted file]
arch/arm/dts/imx7d-pinfunc.h
arch/arm/dts/imx7d-sdb.dts [new file with mode: 0644]
arch/arm/dts/imx7d.dtsi [new file with mode: 0644]
arch/arm/dts/imx7s.dtsi [new file with mode: 0644]
arch/arm/dts/keystone-k2g-evm.dts
arch/arm/dts/keystone-k2g.dtsi
arch/arm/dts/keystone.dtsi
arch/arm/dts/logicpd-som-lv-37xx-devkit.dts [new file with mode: 0644]
arch/arm/dts/logicpd-som-lv.dtsi [new file with mode: 0644]
arch/arm/dts/logicpd-torpedo-37xx-devkit.dts [new file with mode: 0644]
arch/arm/dts/logicpd-torpedo-som.dtsi [new file with mode: 0644]
arch/arm/dts/omap-gpmc-smsc9221.dtsi [new file with mode: 0644]
arch/arm/dts/omap3.dtsi [new file with mode: 0644]
arch/arm/dts/omap34xx-omap36xx-clocks.dtsi [new file with mode: 0644]
arch/arm/dts/omap36xx-am35xx-omap3430es2plus-clocks.dtsi [new file with mode: 0644]
arch/arm/dts/omap36xx-clocks.dtsi [new file with mode: 0644]
arch/arm/dts/omap36xx-omap3430es2plus-clocks.dtsi [new file with mode: 0644]
arch/arm/dts/omap36xx.dtsi [new file with mode: 0644]
arch/arm/dts/omap3xxx-clocks.dtsi [new file with mode: 0644]
arch/arm/dts/omap5-u-boot.dtsi
arch/arm/dts/rk3288-evb.dtsi
arch/arm/dts/rk3288-tinker.dts
arch/arm/dts/rk3288.dtsi
arch/arm/dts/rk3399-evb.dts
arch/arm/dts/rk3399-firefly.dts [new file with mode: 0644]
arch/arm/dts/rk3399-puma.dts
arch/arm/dts/rk3399-sdram-ddr3-1333.dtsi
arch/arm/dts/rk3399-sdram-ddr3-1600.dtsi [new file with mode: 0644]
arch/arm/dts/rk3399.dtsi
arch/arm/dts/sama5d2.dtsi
arch/arm/dts/twl4030.dtsi [new file with mode: 0644]
arch/arm/dts/twl4030_omap3.dtsi [new file with mode: 0644]
arch/arm/dts/uniphier-ld11.dtsi
arch/arm/dts/uniphier-ld20.dtsi
arch/arm/dts/uniphier-ld4.dtsi
arch/arm/dts/uniphier-pro4.dtsi
arch/arm/dts/uniphier-pro5.dtsi
arch/arm/dts/uniphier-pxs2.dtsi
arch/arm/dts/uniphier-pxs3.dtsi
arch/arm/dts/uniphier-sld3.dtsi
arch/arm/dts/uniphier-sld8.dtsi
arch/arm/dts/uniphier-support-card.dtsi
arch/arm/include/asm/arch-am33xx/clock.h
arch/arm/include/asm/arch-am33xx/clocks_am33xx.h
arch/arm/include/asm/arch-am33xx/cpu.h
arch/arm/include/asm/arch-am33xx/hardware.h
arch/arm/include/asm/arch-am33xx/hardware_am43xx.h
arch/arm/include/asm/arch-am33xx/sys_proto.h
arch/arm/include/asm/arch-armada100/config.h
arch/arm/include/asm/arch-mx7ulp/clock.h
arch/arm/include/asm/arch-omap5/clock.h
arch/arm/include/asm/arch-rockchip/boot0.h
arch/arm/include/asm/arch-rockchip/grf_rk3288.h
arch/arm/include/asm/arch-rockchip/grf_rk3399.h
arch/arm/include/asm/arch-rockchip/periph.h
arch/arm/include/asm/arch-rockchip/rockchip_mipi_dsi.h [new file with mode: 0644]
arch/arm/include/asm/arch-rockchip/vop_rk3288.h
arch/arm/include/asm/arch-sunxi/clock_sun6i.h
arch/arm/include/asm/arch-sunxi/display.h
arch/arm/include/asm/arch-sunxi/tve.h [new file with mode: 0644]
arch/arm/include/asm/armv7m.h
arch/arm/include/asm/armv7m_mpu.h [new file with mode: 0644]
arch/arm/include/asm/global_data.h
arch/arm/include/asm/omap_mmc.h
arch/arm/include/asm/spl.h
arch/arm/include/asm/system.h
arch/arm/lib/Makefile
arch/arm/lib/bootm-fdt.c
arch/arm/mach-at91/arm926ejs/at91sam9x5_devices.c
arch/arm/mach-at91/include/mach/atmel_mpddrc.h
arch/arm/mach-bcm283x/Makefile
arch/arm/mach-bcm283x/include/mach/gpio.h
arch/arm/mach-bcm283x/include/mach/msg.h [new file with mode: 0644]
arch/arm/mach-bcm283x/msg.c [new file with mode: 0644]
arch/arm/mach-bcm283x/reset.c
arch/arm/mach-keystone/Kconfig
arch/arm/mach-kirkwood/include/mach/config.h
arch/arm/mach-mvebu/arm64-common.c
arch/arm/mach-mvebu/armada8k/cpu.c
arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec-38x.c
arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c
arch/arm/mach-mvebu/serdes/axp/high_speed_env_spec.c
arch/arm/mach-omap2/Kconfig
arch/arm/mach-omap2/am33xx/Kconfig
arch/arm/mach-omap2/am33xx/board.c
arch/arm/mach-omap2/am33xx/clock_am33xx.c
arch/arm/mach-omap2/am33xx/sys_info.c
arch/arm/mach-omap2/am33xx/u-boot-spl.lds [deleted file]
arch/arm/mach-omap2/hwinit-common.c
arch/arm/mach-omap2/omap3/Kconfig
arch/arm/mach-omap2/omap5/Kconfig
arch/arm/mach-omap2/omap5/hwinit.c
arch/arm/mach-omap2/vc.c
arch/arm/mach-rockchip/Kconfig
arch/arm/mach-rockchip/rk3036-board-spl.c
arch/arm/mach-rockchip/rk3288-board-spl.c
arch/arm/mach-rockchip/rk3288/sdram_rk3288.c
arch/arm/mach-rockchip/rk3399/rk3399.c
arch/arm/mach-rockchip/rk3399/sdram_rk3399.c
arch/arm/mach-stm32/stm32f4/soc.c
arch/arm/mach-stm32/stm32f7/soc.c
arch/arm/mach-uniphier/arm64/Makefile
arch/arm/mach-uniphier/arm64/lowlevel_init.S [new file with mode: 0644]
arch/arm/mach-uniphier/board_init.c
arch/arm/mach-uniphier/boot-device/Makefile
arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c [new file with mode: 0644]
arch/arm/mach-uniphier/boot-device/boot-device.c
arch/arm/mach-uniphier/boot-device/boot-device.h
arch/arm/mach-uniphier/clk/Makefile
arch/arm/mach-uniphier/clk/clk-ld11.c
arch/arm/mach-uniphier/clk/clk-ld4.c
arch/arm/mach-uniphier/clk/clk-pro4.c
arch/arm/mach-uniphier/clk/clk-pxs3.c [new file with mode: 0644]
arch/arm/mach-uniphier/init.h
arch/arm/mach-uniphier/sg-regs.h
arch/arm/mach-uniphier/soc-info.c
arch/mips/Kconfig
arch/mips/Makefile
arch/mips/config.mk
arch/mips/cpu/cpu.c
arch/mips/cpu/start.S
arch/mips/dts/Makefile
arch/mips/dts/brcm,bcm63268.dtsi [new file with mode: 0644]
arch/mips/dts/brcm,bcm6328.dtsi [new file with mode: 0644]
arch/mips/dts/brcm,bcm6358.dtsi [new file with mode: 0644]
arch/mips/dts/comtrend,ar-5387un.dts [new file with mode: 0644]
arch/mips/dts/comtrend,vr-3032u.dts [new file with mode: 0644]
arch/mips/dts/huawei,hg556a.dts [new file with mode: 0644]
arch/mips/dts/sfr,nb4-ser.dts [new file with mode: 0644]
arch/mips/lib/cache.c
arch/mips/mach-bmips/Kconfig [new file with mode: 0644]
arch/mips/mach-bmips/Makefile [new file with mode: 0644]
arch/mips/mach-bmips/dram.c [new file with mode: 0644]
arch/mips/mach-bmips/include/ioremap.h [new file with mode: 0644]
arch/powerpc/Kconfig
arch/powerpc/cpu/mpc512x/Makefile
arch/powerpc/cpu/mpc512x/i2c.c [deleted file]
arch/powerpc/cpu/mpc5xxx/Makefile
arch/powerpc/cpu/mpc5xxx/i2c.c [deleted file]
arch/powerpc/cpu/mpc8260/Makefile
arch/powerpc/cpu/mpc8260/commproc.c
arch/powerpc/cpu/mpc8260/i2c.c [deleted file]
arch/powerpc/cpu/mpc85xx/t1024_serdes.c
arch/powerpc/cpu/mpc8xx/Makefile
arch/powerpc/cpu/mpc8xx/i2c.c [deleted file]
arch/powerpc/include/asm/immap_85xx.h
arch/sandbox/dts/test.dts
arch/x86/Kconfig
arch/x86/cpu/Makefile
arch/x86/cpu/baytrail/acpi.c
arch/x86/cpu/baytrail/valleyview.c
arch/x86/cpu/cpu.c
arch/x86/cpu/quark/quark.c
arch/x86/cpu/queensbay/Makefile
arch/x86/cpu/queensbay/topcliff.c [deleted file]
arch/x86/cpu/wakeup.S [new file with mode: 0644]
arch/x86/dts/bayleybay.dts
arch/x86/dts/baytrail_som-db5800-som-6867.dts
arch/x86/dts/conga-qeval20-qa3-e3845.dts
arch/x86/dts/dfi-bt700.dtsi
arch/x86/dts/minnowmax.dts
arch/x86/include/asm/acpi_s3.h [new file with mode: 0644]
arch/x86/include/asm/acpi_table.h
arch/x86/include/asm/arch-baytrail/acpi/sleepstates.asl
arch/x86/include/asm/arch-baytrail/iomap.h
arch/x86/include/asm/cmos_layout.h [new file with mode: 0644]
arch/x86/include/asm/early_cmos.h [new file with mode: 0644]
arch/x86/include/asm/global_data.h
arch/x86/include/asm/post.h
arch/x86/include/asm/tables.h
arch/x86/include/asm/u-boot-x86.h
arch/x86/lib/Makefile
arch/x86/lib/acpi_s3.c [new file with mode: 0644]
arch/x86/lib/acpi_table.c
arch/x86/lib/bootm.c
arch/x86/lib/coreboot_table.c
arch/x86/lib/early_cmos.c [new file with mode: 0644]
arch/x86/lib/fsp/fsp_common.c
arch/x86/lib/fsp/fsp_dram.c
board/BuR/common/common.c
board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c
board/atmel/at91sam9260ek/Makefile
board/atmel/at91sam9260ek/at91sam9260ek.c
board/atmel/at91sam9263ek/Makefile
board/atmel/at91sam9263ek/at91sam9263ek.c
board/atmel/at91sam9m10g45ek/Makefile
board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
board/atmel/at91sam9n12ek/at91sam9n12ek.c
board/atmel/at91sam9rlek/Makefile
board/atmel/at91sam9rlek/at91sam9rlek.c
board/atmel/at91sam9x5ek/at91sam9x5ek.c
board/atmel/sama5d2_xplained/sama5d2_xplained.c
board/atmel/sama5d4ek/sama5d4ek.c
board/bachmann/ot1200/ot1200.c
board/bosch/shc/board.c
board/cm5200/cm5200.c
board/cm5200/cmd_cm5200.c
board/compulab/cl-som-am57x/cl-som-am57x.c
board/compulab/cm_t35/cm_t35.c
board/compulab/cm_t3517/cm_t3517.c
board/compulab/cm_t54/cm_t54.c
board/comtrend/ar5387un/Kconfig [new file with mode: 0644]
board/comtrend/ar5387un/MAINTAINERS [new file with mode: 0644]
board/comtrend/ar5387un/Makefile [new file with mode: 0644]
board/comtrend/ar5387un/ar-5387un.c [new file with mode: 0644]
board/comtrend/vr3032u/Kconfig [new file with mode: 0644]
board/comtrend/vr3032u/MAINTAINERS [new file with mode: 0644]
board/comtrend/vr3032u/Makefile [new file with mode: 0644]
board/comtrend/vr3032u/vr-3032u.c [new file with mode: 0644]
board/congatec/cgtqmx6eval/cgtqmx6eval.c
board/corscience/tricorder/tricorder.c
board/davedenx/aria/aria.c
board/davinci/da8xxevm/Kconfig
board/esd/mecp5123/mecp5123.c
board/freescale/m52277evb/README
board/freescale/m5253demo/flash.c
board/freescale/m53017evb/README
board/freescale/m5373evb/README
board/freescale/m54455evb/README
board/freescale/m547xevb/README
board/freescale/mpc5121ads/mpc5121ads.c
board/freescale/mx6sabresd/mx6dlsabresd.cfg [deleted file]
board/freescale/mx6sabresd/mx6q_4x_mt41j128.cfg [deleted file]
board/freescale/mx6sabresd/mx6sabresd.c
board/freescale/mx6slevk/mx6slevk.c
board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
board/freescale/mx7dsabresd/mx7dsabresd.c
board/gateworks/gw_ventana/common.c
board/gateworks/gw_ventana/gw_ventana.c
board/gdsys/p1022/controlcenterd-id.c
board/gumstix/duovero/duovero.c
board/hisilicon/hikey/hikey.c
board/htkw/mcx/mcx.c
board/huawei/hg556a/Kconfig [new file with mode: 0644]
board/huawei/hg556a/MAINTAINERS [new file with mode: 0644]
board/huawei/hg556a/Makefile [new file with mode: 0644]
board/huawei/hg556a/hg556a.c [new file with mode: 0644]
board/ifm/ac14xx/ac14xx.c
board/imgtec/boston/Makefile
board/imgtec/boston/dt.c [new file with mode: 0644]
board/isee/igep00x0/igep00x0.c
board/keymile/km82xx/km82xx.c
board/keymile/km_arm/km_arm.c
board/logicpd/am3517evm/am3517evm.c
board/logicpd/omap3som/Kconfig
board/logicpd/omap3som/README [new file with mode: 0644]
board/logicpd/omap3som/omap3logic.c
board/logicpd/zoom1/zoom1.c
board/overo/overo.c
board/pandora/pandora.c
board/pdm360ng/pdm360ng.c
board/phytec/pcm058/pcm058.c
board/qca/ap121/ap121.c
board/qca/ap143/ap143.c
board/quipos/cairo/cairo.c
board/raspberrypi/rpi/rpi.c
board/renesas/r0p7734/r0p7734.c
board/rockchip/evb_rk3399/evb-rk3399.c
board/rockchip/tinker_rk3288/tinker-rk3288.c
board/samsung/arndale/arndale.c
board/samsung/common/board.c
board/samsung/common/misc.c
board/samsung/goni/goni.c
board/samsung/smdkv310/smdkv310.c
board/sfr/nb4_ser/Kconfig [new file with mode: 0644]
board/sfr/nb4_ser/MAINTAINERS [new file with mode: 0644]
board/sfr/nb4_ser/Makefile [new file with mode: 0644]
board/sfr/nb4_ser/nb4-ser.c [new file with mode: 0644]
board/socrates/socrates.c
board/sunxi/board.c
board/technexion/tao3530/tao3530.c
board/technexion/twister/twister.c
board/teejet/mt_ventoux/mt_ventoux.c
board/theobroma-systems/puma_rk3399/puma-rk3399.c
board/ti/am335x/board.c
board/ti/am3517crane/am3517crane.c
board/ti/am43xx/board.c
board/ti/am57xx/board.c
board/ti/beagle/beagle.c
board/ti/common/board_detect.c
board/ti/dra7xx/evm.c
board/ti/evm/evm.c
board/ti/ks2_evm/board_k2g.c
board/ti/omap5_uevm/evm.c
board/ti/panda/panda.c
board/ti/sdp4430/sdp.c
board/ti/ti814x/evm.c
board/timll/devkit8000/devkit8000.c
board/toradex/apalis_imx6/apalis_imx6.c
board/toradex/colibri_imx7/colibri_imx7.c
board/tplink/wdr4300/wdr4300.c
board/tqc/tqm5200/tqm5200.c
cmd/bdinfo.c
cmd/cpu.c
cmd/eeprom.c
cmd/io.c
cmd/led.c
cmd/mvebu/bubt.c
cmd/nvedit.c
common/Makefile
common/board_f.c
common/board_r.c
common/dfu.c
common/edid.c
common/env_attr.c
common/fb_mmc.c
common/image-android.c
common/lcd.c
common/lcd_simplefb.c
common/scsi.c
common/spl/Kconfig
common/spl/Makefile
common/spl/spl.c
common/spl/spl_atf.c [new file with mode: 0644]
common/spl/spl_spi.c
common/stdio.c
common/usb_storage.c
configs/MPC8315ERDB_defconfig
configs/MPC8349ITX_LOWBOOT_defconfig
configs/MPC8349ITX_defconfig
configs/MPC837XEMDS_HOST_defconfig
configs/MPC837XERDB_defconfig
configs/MiniFAP_defconfig
configs/O2D300_defconfig
configs/O2DNT2_RAMBOOT_defconfig
configs/O2DNT2_defconfig
configs/O2D_defconfig
configs/O2I_defconfig
configs/O2MNT_O2M110_defconfig
configs/O2MNT_O2M112_defconfig
configs/O2MNT_O2M113_defconfig
configs/O2MNT_defconfig
configs/O3DNT_defconfig
configs/TQM5200S_HIGHBOOT_defconfig
configs/TQM5200S_defconfig
configs/TQM5200_B_HIGHBOOT_defconfig
configs/TQM5200_B_defconfig
configs/TQM5200_STK100_defconfig
configs/TQM5200_defconfig
configs/a4m072_defconfig
configs/ac14xx_defconfig
configs/alt_defconfig
configs/ap_sh4a_4a_defconfig
configs/apalis-tk1_defconfig
configs/apalis_imx6_defconfig
configs/apalis_imx6_nospl_com_defconfig
configs/apalis_imx6_nospl_it_defconfig
configs/apalis_t30_defconfig
configs/apx4devkit_defconfig
configs/aria_defconfig
configs/arndale_defconfig
configs/aspenite_defconfig
configs/at91sam9260ek_dataflash_cs0_defconfig
configs/at91sam9260ek_dataflash_cs1_defconfig
configs/at91sam9260ek_nandflash_defconfig
configs/at91sam9263ek_dataflash_cs0_defconfig
configs/at91sam9263ek_dataflash_defconfig
configs/at91sam9263ek_nandflash_defconfig
configs/at91sam9263ek_norflash_boot_defconfig
configs/at91sam9263ek_norflash_defconfig
configs/at91sam9g20ek_2mmc_defconfig
configs/at91sam9g20ek_2mmc_nandflash_defconfig
configs/at91sam9g20ek_dataflash_cs0_defconfig
configs/at91sam9g20ek_dataflash_cs1_defconfig
configs/at91sam9g20ek_nandflash_defconfig
configs/at91sam9m10g45ek_mmc_defconfig
configs/at91sam9m10g45ek_nandflash_defconfig
configs/at91sam9n12ek_mmc_defconfig
configs/at91sam9n12ek_nandflash_defconfig
configs/at91sam9n12ek_spiflash_defconfig
configs/at91sam9rlek_dataflash_defconfig
configs/at91sam9rlek_mmc_defconfig
configs/at91sam9rlek_nandflash_defconfig
configs/at91sam9x5ek_dataflash_defconfig
configs/at91sam9x5ek_mmc_defconfig
configs/at91sam9x5ek_nandflash_defconfig
configs/at91sam9x5ek_spiflash_defconfig
configs/at91sam9xeek_dataflash_cs0_defconfig
configs/at91sam9xeek_dataflash_cs1_defconfig
configs/at91sam9xeek_nandflash_defconfig
configs/beaver_defconfig
configs/blanche_defconfig
configs/boston32r2_defconfig
configs/boston32r2el_defconfig
configs/boston64r2_defconfig
configs/boston64r2el_defconfig
configs/brppt1_mmc_defconfig
configs/brppt1_nand_defconfig
configs/brppt1_spi_defconfig
configs/cam5200_defconfig
configs/cam5200_niosflash_defconfig
configs/cardhu_defconfig
configs/cei-tk1-som_defconfig
configs/charon_defconfig
configs/chromebit_mickey_defconfig
configs/chromebook_jerry_defconfig
configs/chromebook_minnie_defconfig
configs/cm5200_defconfig
configs/cm_fx6_defconfig
configs/cm_t35_defconfig
configs/cm_t54_defconfig
configs/colibri_imx6_defconfig
configs/colibri_imx6_nospl_defconfig
configs/colibri_t20_defconfig
configs/colibri_t30_defconfig
configs/colibri_vf_defconfig
configs/comtrend_ar5387un_ram_defconfig [new file with mode: 0644]
configs/comtrend_vr3032u_ram_defconfig [new file with mode: 0644]
configs/corvus_defconfig
configs/d2net_v2_defconfig
configs/dalmore_defconfig
configs/db-88f6820-amc_defconfig
configs/digsy_mtc_RAMBOOT_defconfig
configs/digsy_mtc_defconfig
configs/digsy_mtc_rev5_RAMBOOT_defconfig
configs/digsy_mtc_rev5_defconfig
configs/dns325_defconfig
configs/dockstar_defconfig
configs/dra7xx_evm_defconfig
configs/dra7xx_hs_evm_defconfig
configs/draco_defconfig
configs/dreamplug_defconfig
configs/ds109_defconfig
configs/ds414_defconfig
configs/duovero_defconfig
configs/e2220-1170_defconfig
configs/eco5pk_defconfig
configs/edminiv2_defconfig
configs/etamin_defconfig
configs/evb-rk3399_defconfig
configs/fennec-rk3288_defconfig
configs/firefly-rk3288_defconfig
configs/firefly-rk3399_defconfig [new file with mode: 0644]
configs/fo300_defconfig
configs/goflexhome_defconfig
configs/gose_defconfig
configs/gplugd_defconfig
configs/gurnard_defconfig
configs/guruplug_defconfig
configs/harmony_defconfig
configs/huawei_hg556a_ram_defconfig [new file with mode: 0644]
configs/ib62x0_defconfig
configs/iconnect_defconfig
configs/inetspace_v2_defconfig
configs/ipek01_defconfig
configs/jetson-tk1_defconfig
configs/koelsch_defconfig
configs/lager_defconfig
configs/liteboard_defconfig
configs/lschlv2_defconfig
configs/lsxhl_defconfig
configs/lwmon5_defconfig
configs/m28evk_defconfig
configs/ma5d4evk_defconfig
configs/mccmon6_nor_defconfig
configs/mccmon6_sd_defconfig
configs/mcx_defconfig
configs/mecp5123_defconfig
configs/medcom-wide_defconfig
configs/minnowmax_defconfig
configs/miqi-rk3288_defconfig
configs/motionpro_defconfig
configs/mpc5121ads_defconfig
configs/mpc5121ads_rev2_defconfig
configs/mt_ventoux_defconfig
configs/mvebu_db-88f7040-nand_defconfig [new file with mode: 0644]
configs/mx23_olinuxino_defconfig
configs/mx23evk_defconfig
configs/mx28evk_auart_console_defconfig
configs/mx28evk_defconfig
configs/mx28evk_nand_defconfig
configs/mx28evk_spi_defconfig
configs/mx35pdk_defconfig
configs/mx6dlsabresd_defconfig [deleted file]
configs/mx6qsabresd_defconfig [deleted file]
configs/mx6sabresd_spl_defconfig
configs/mx6sllevk_defconfig
configs/mx6sllevk_plugin_defconfig
configs/mx7dsabresd_defconfig
configs/mx7dsabresd_secure_defconfig
configs/nas220_defconfig
configs/net2big_v2_defconfig
configs/netspace_lite_v2_defconfig
configs/netspace_max_v2_defconfig
configs/netspace_v2_defconfig
configs/nsa310s_defconfig
configs/nyan-big_defconfig
configs/odroid-xu3_defconfig
configs/odroid_defconfig
configs/omap3_beagle_defconfig
configs/omap3_ha_defconfig
configs/omap3_logic_defconfig
configs/omap3_overo_defconfig
configs/omap4_panda_defconfig
configs/omap5_uevm_defconfig
configs/omapl138_lcdk_defconfig
configs/openrd_base_defconfig
configs/openrd_client_defconfig
configs/openrd_ultimate_defconfig
configs/opos6uldev_defconfig
configs/p2371-0000_defconfig
configs/p2371-2180_defconfig
configs/p2571_defconfig
configs/paz00_defconfig
configs/pcm030_LOWBOOT_defconfig
configs/pcm030_defconfig
configs/pdm360ng_defconfig
configs/picosam9g45_defconfig
configs/plutux_defconfig
configs/pogo_e02_defconfig
configs/popmetal-rk3288_defconfig
configs/porter_defconfig
configs/pxm2_defconfig
configs/r0p7734_defconfig
configs/rastaban_defconfig
configs/rock2_defconfig
configs/rpi_2_defconfig
configs/rpi_3_32b_defconfig
configs/rpi_3_defconfig
configs/rpi_defconfig
configs/rut_defconfig
configs/sama5d2_ptc_nandflash_defconfig
configs/sama5d2_ptc_spiflash_defconfig
configs/sama5d2_xplained_mmc_defconfig
configs/sama5d2_xplained_spiflash_defconfig
configs/sama5d36ek_cmp_mmc_defconfig [new file with mode: 0644]
configs/sama5d36ek_cmp_nandflash_defconfig [new file with mode: 0644]
configs/sama5d36ek_cmp_spiflash_defconfig [new file with mode: 0644]
configs/sandbox_defconfig
configs/sandbox_noblk_defconfig
configs/sandbox_spl_defconfig
configs/sansa_fuze_plus_defconfig
configs/sc_sps_1_defconfig
configs/seaboard_defconfig
configs/sfr_nb4-ser_ram_defconfig [new file with mode: 0644]
configs/sheevaplug_defconfig
configs/silk_defconfig
configs/smdk5250_defconfig
configs/snow_defconfig
configs/socrates_defconfig
configs/spring_defconfig
configs/stout_defconfig
configs/tao3530_defconfig
configs/tec-ng_defconfig
configs/tec_defconfig
configs/thuban_defconfig
configs/tinker-rk3288_defconfig
configs/trimslice_defconfig
configs/twister_defconfig
configs/v38b_defconfig
configs/vct_platinum_defconfig
configs/vct_platinum_onenand_defconfig
configs/vct_premium_defconfig
configs/vct_premium_onenand_defconfig
configs/venice2_defconfig
configs/ventana_defconfig
configs/vinco_defconfig
configs/whistler_defconfig
configs/x600_defconfig
configs/xfi3_defconfig
configs/zmx25_defconfig
disk/part.c
doc/README.fdt-control
doc/README.omap-reset-time [deleted file]
doc/README.x86
doc/device-tree-bindings/config.txt
doc/device-tree-bindings/leds/leds-bcm6328.txt [new file with mode: 0644]
doc/device-tree-bindings/leds/leds-bcm6358.txt [new file with mode: 0644]
doc/device-tree-bindings/pwm/pwm.txt [new file with mode: 0644]
drivers/Kconfig
drivers/Makefile
drivers/block/Kconfig
drivers/block/Makefile
drivers/block/dwc_ahci.c [new file with mode: 0644]
drivers/clk/Kconfig
drivers/clk/Makefile
drivers/clk/at91/clk-master.c
drivers/clk/at91/clk-peripheral.c
drivers/clk/at91/pmc.c
drivers/clk/clk_bcm6345.c [new file with mode: 0644]
drivers/clk/rockchip/clk_rk3036.c
drivers/clk/rockchip/clk_rk3188.c
drivers/clk/rockchip/clk_rk3288.c
drivers/clk/rockchip/clk_rk3328.c
drivers/clk/rockchip/clk_rk3399.c
drivers/core/device-remove.c
drivers/cpu/Makefile
drivers/cpu/bmips_cpu.c [new file with mode: 0644]
drivers/dfu/dfu.c
drivers/gpio/74x164_gpio.c
drivers/gpio/Kconfig
drivers/gpio/Makefile
drivers/gpio/bcm6345_gpio.c [new file with mode: 0644]
drivers/gpio/gpio-uclass.c
drivers/gpio/intel_ich6_gpio.c
drivers/i2c/davinci_i2c.c
drivers/i2c/fsl_i2c.c
drivers/i2c/fti2c010.c
drivers/i2c/mxc_i2c.c
drivers/i2c/omap24xx_i2c.c
drivers/led/Kconfig
drivers/led/Makefile
drivers/led/led_bcm6328.c [new file with mode: 0644]
drivers/led/led_bcm6358.c [new file with mode: 0644]
drivers/misc/i2c_eeprom.c
drivers/mmc/Kconfig
drivers/mmc/Makefile
drivers/mmc/atmel_sdhci.c
drivers/mmc/bcm2835_sdhci.c
drivers/mmc/davinci_mmc.c
drivers/mmc/omap_hsmmc.c
drivers/mmc/pci_mmc.c
drivers/mmc/rockchip_dw_mmc.c
drivers/mmc/sdhci-cadence.c
drivers/mmc/sdhci.c
drivers/mtd/nand/pxa3xx_nand.c
drivers/net/eepro100.c
drivers/net/macb.c
drivers/net/mvpp2.c
drivers/net/phy/mv88e61xx.c
drivers/net/uli526x.c
drivers/pci/pci-uclass.c
drivers/pci/pci_rom.c
drivers/pci/pcie_dw_mvebu.c
drivers/phy/Kconfig [new file with mode: 0644]
drivers/phy/Makefile [new file with mode: 0644]
drivers/phy/marvell/comphy.h
drivers/phy/marvell/comphy_core.c
drivers/phy/marvell/comphy_cp110.c
drivers/phy/marvell/comphy_hpipe.h
drivers/phy/marvell/comphy_mux.c
drivers/phy/phy-uclass.c [new file with mode: 0644]
drivers/phy/sandbox-phy.c [new file with mode: 0644]
drivers/phy/ti-pipe3-phy.c [new file with mode: 0644]
drivers/pinctrl/nxp/pinctrl-imx.c
drivers/pinctrl/pinctrl-single.c
drivers/pinctrl/rockchip/pinctrl_rk3399.c
drivers/power/Kconfig
drivers/power/domain/Kconfig
drivers/power/domain/Makefile
drivers/power/domain/bcm6328-power-domain.c [new file with mode: 0644]
drivers/power/pmic/Kconfig
drivers/power/pmic/Makefile
drivers/power/pmic/rk808.c [deleted file]
drivers/power/pmic/rk8xx.c [new file with mode: 0644]
drivers/power/regulator/Kconfig
drivers/power/regulator/Makefile
drivers/power/regulator/pwm_regulator.c
drivers/power/regulator/rk808.c [deleted file]
drivers/power/regulator/rk8xx.c [new file with mode: 0644]
drivers/power/twl4030.c
drivers/pwm/pwm-uclass.c
drivers/pwm/rk_pwm.c
drivers/pwm/sandbox_pwm.c
drivers/ram/Makefile
drivers/ram/bmips_ram.c [new file with mode: 0644]
drivers/reset/Kconfig
drivers/reset/Makefile
drivers/reset/reset-bcm6345.c [new file with mode: 0644]
drivers/serial/Kconfig
drivers/serial/Makefile
drivers/serial/atmel_usart.c
drivers/serial/ns16550.c
drivers/serial/serial-uclass.c
drivers/serial/serial_bcm6345.c [new file with mode: 0644]
drivers/spi/Kconfig
drivers/spi/ich.c
drivers/spi/ich.h
drivers/spi/omap3_spi.c
drivers/spi/rk_spi.c
drivers/spi/rk_spi.h
drivers/sysreset/Kconfig
drivers/sysreset/Makefile
drivers/sysreset/sysreset_syscon.c [new file with mode: 0644]
drivers/usb/eth/smsc95xx.c
drivers/usb/gadget/f_fastboot.c
drivers/usb/host/Kconfig
drivers/usb/host/Makefile
drivers/usb/musb-new/linux-compat.h
drivers/usb/musb-new/omap2430.c
drivers/usb/musb/omap3.c
drivers/usb/musb/omap3.h
drivers/video/Kconfig
drivers/video/Makefile
drivers/video/bcm2835.c
drivers/video/dw_hdmi.c
drivers/video/ld9040.c
drivers/video/rockchip/Kconfig [new file with mode: 0644]
drivers/video/rockchip/Makefile
drivers/video/rockchip/rk_mipi.c [new file with mode: 0644]
drivers/video/rockchip/rk_vop.c
drivers/video/sunxi/Makefile
drivers/video/sunxi/sunxi_display.c
drivers/video/sunxi/tve.c [new file with mode: 0644]
drivers/video/video_bmp.c
drivers/watchdog/Kconfig
drivers/watchdog/Makefile
drivers/watchdog/bcm2835_wdt.c [new file with mode: 0644]
dts/Kconfig
include/android_image.h
include/asm-generic/global_data.h
include/atf_common.h [new file with mode: 0644]
include/common.h
include/configs/B4860QDS.h
include/configs/BSC9131RDB.h
include/configs/BSC9132QDS.h
include/configs/M52277EVB.h
include/configs/M54418TWR.h
include/configs/MPC8315ERDB.h
include/configs/MPC8349ITX.h
include/configs/MPC837XEMDS.h
include/configs/MPC837XERDB.h
include/configs/MPC8536DS.h
include/configs/MPC8544DS.h
include/configs/MPC8572DS.h
include/configs/P1010RDB.h
include/configs/P1022DS.h
include/configs/P1023RDB.h
include/configs/P2041RDB.h
include/configs/T102xQDS.h
include/configs/T102xRDB.h
include/configs/T1040QDS.h
include/configs/T104xRDB.h
include/configs/T208xQDS.h
include/configs/T208xRDB.h
include/configs/T4240QDS.h
include/configs/T4240RDB.h
include/configs/TQM5200.h
include/configs/UCP1020.h
include/configs/a4m072.h
include/configs/ac14xx.h
include/configs/advantech_dms-ba16.h
include/configs/alt.h
include/configs/am335x_evm.h
include/configs/am335x_igep003x.h
include/configs/am335x_shc.h
include/configs/am335x_sl50.h
include/configs/am3517_crane.h
include/configs/am3517_evm.h
include/configs/ap_sh4a_4a.h
include/configs/apalis-tk1.h
include/configs/apalis_t30.h
include/configs/apx4devkit.h
include/configs/aria.h
include/configs/aristainetos-common.h
include/configs/at91sam9260ek.h
include/configs/at91sam9263ek.h
include/configs/at91sam9m10g45ek.h
include/configs/at91sam9n12ek.h
include/configs/at91sam9rlek.h
include/configs/at91sam9x5ek.h
include/configs/axs10x.h
include/configs/baltos.h
include/configs/bav335x.h
include/configs/beaver.h
include/configs/bmips_bcm63268.h [new file with mode: 0644]
include/configs/bmips_bcm6328.h [new file with mode: 0644]
include/configs/bmips_bcm6358.h [new file with mode: 0644]
include/configs/bmips_common.h [new file with mode: 0644]
include/configs/boston.h
include/configs/brppt1.h
include/configs/brxre1.h
include/configs/bur_am335x_common.h
include/configs/calimain.h
include/configs/cardhu.h
include/configs/cei-tk1-som.h
include/configs/cgtqmx6eval.h
include/configs/chiliboard.h
include/configs/cm5200.h
include/configs/cm_t335.h
include/configs/cm_t35.h
include/configs/cm_t3517.h
include/configs/cm_t54.h
include/configs/colibri_t20.h
include/configs/colibri_t30.h
include/configs/colibri_vf.h
include/configs/comtrend_ar5387un.h [new file with mode: 0644]
include/configs/comtrend_vr3032u.h [new file with mode: 0644]
include/configs/controlcenterd.h
include/configs/corenet_ds.h
include/configs/corvus.h
include/configs/cyrus.h
include/configs/dalmore.h
include/configs/db-88f6820-amc.h
include/configs/devkit8000.h
include/configs/digsy_mtc.h
include/configs/draco.h
include/configs/ds414.h
include/configs/duovero.h
include/configs/e2220-1170.h
include/configs/ea20.h
include/configs/eco5pk.h
include/configs/edminiv2.h
include/configs/embestmx6boards.h
include/configs/etamin.h
include/configs/exynos5250-common.h
include/configs/ge_bx50v3.h
include/configs/gose.h
include/configs/gplugd.h
include/configs/gw_ventana.h
include/configs/harmony.h
include/configs/huawei_hg556a.h [new file with mode: 0644]
include/configs/ids8313.h
include/configs/ipek01.h
include/configs/jetson-tk1.h
include/configs/jupiter.h
include/configs/kc1.h
include/configs/koelsch.h
include/configs/lager.h
include/configs/liteboard.h
include/configs/ls1012aqds.h
include/configs/ls1021aqds.h
include/configs/ls1021atwr.h
include/configs/lwmon5.h
include/configs/m28evk.h
include/configs/m53evk.h
include/configs/ma5d4evk.h
include/configs/manroland/mpc5200-common.h [new file with mode: 0644]
include/configs/mccmon6.h
include/configs/mcx.h
include/configs/mecp5123.h
include/configs/medcom-wide.h
include/configs/motionpro.h
include/configs/mpc5121ads.h
include/configs/mt_ventoux.h
include/configs/mv-common.h
include/configs/mvebu_armada-8k.h
include/configs/mx35pdk.h
include/configs/mx51evk.h
include/configs/mx53cx9020.h
include/configs/mx53loco.h
include/configs/mx6cuboxi.h
include/configs/mx6qarm2.h
include/configs/mx6qsabreauto.h
include/configs/mx6sabresd.h
include/configs/mx6slevk.h
include/configs/mx6sxsabreauto.h
include/configs/mx6sxsabresd.h
include/configs/mx6ul_14x14_evk.h
include/configs/mx7dsabresd.h
include/configs/mxs.h
include/configs/nas220.h
include/configs/nitrogen6x.h
include/configs/nokia_rx51.h
include/configs/novena.h
include/configs/nyan-big.h
include/configs/o2dnt-common.h
include/configs/odroid.h
include/configs/odroid_xu3.h
include/configs/omap3_beagle.h
include/configs/omap3_evm.h
include/configs/omap3_igep00x0.h
include/configs/omap3_logic.h
include/configs/omap3_overo.h
include/configs/omap3_pandora.h
include/configs/omap3_zoom1.h
include/configs/omap4_panda.h
include/configs/omap5_uevm.h
include/configs/omapl138_lcdk.h
include/configs/ot1200.h
include/configs/p1_p2_rdb_pc.h
include/configs/p1_twr.h
include/configs/p2371-0000.h
include/configs/p2371-2180.h
include/configs/p2571.h
include/configs/paz00.h
include/configs/pcm030.h
include/configs/pcm051.h
include/configs/pdm360ng.h
include/configs/pengwyn.h
include/configs/pepper.h
include/configs/pico-imx6ul.h
include/configs/picosam9g45.h
include/configs/platinum.h
include/configs/plutux.h
include/configs/porter.h
include/configs/pxm2.h
include/configs/r0p7734.h
include/configs/rastaban.h
include/configs/rk3399_common.h
include/configs/rpi.h
include/configs/rut.h
include/configs/s32v234evb.h
include/configs/sama5d2_ptc.h
include/configs/sama5d2_xplained.h
include/configs/seaboard.h
include/configs/sequoia.h
include/configs/sfr_nb4_ser.h [new file with mode: 0644]
include/configs/siemens-am33x-common.h
include/configs/silk.h
include/configs/snapper9g45.h
include/configs/sniper.h
include/configs/stout.h
include/configs/sun4i.h
include/configs/sun50i.h
include/configs/sun5i.h
include/configs/sun6i.h
include/configs/sun7i.h
include/configs/sun8i.h
include/configs/tam3517-common.h
include/configs/tao3530.h
include/configs/tbs2910.h
include/configs/tec-ng.h
include/configs/tec.h
include/configs/tegra-common-post.h
include/configs/thuban.h
include/configs/ti814x_evm.h
include/configs/ti816x_evm.h
include/configs/ti_am335x_common.h
include/configs/ti_armv7_omap.h
include/configs/ti_omap3_common.h
include/configs/ti_omap4_common.h
include/configs/titanium.h
include/configs/tqma6.h
include/configs/tricorder.h
include/configs/trimslice.h
include/configs/twister.h
include/configs/uniphier.h
include/configs/usbarmory.h
include/configs/v38b.h
include/configs/vct.h
include/configs/venice2.h
include/configs/ventana.h
include/configs/vinco.h
include/configs/vining_2000.h
include/configs/wandboard.h
include/configs/warp.h
include/configs/whistler.h
include/configs/x600.h
include/configs/x86-common.h
include/configs/xpedite550x.h
include/configs/xpress.h
include/configs/zmx25.h
include/debug_uart.h
include/dm/device.h
include/dm/uclass-id.h
include/dt-bindings/clock/bcm63268-clock.h [new file with mode: 0644]
include/dt-bindings/clock/bcm6328-clock.h [new file with mode: 0644]
include/dt-bindings/clock/bcm6358-clock.h [new file with mode: 0644]
include/dt-bindings/clock/imx7d-clock.h [new file with mode: 0644]
include/dt-bindings/comphy/comphy_data.h
include/dt-bindings/media/omap3-isp.h [new file with mode: 0644]
include/dt-bindings/pinctrl/rockchip.h
include/dt-bindings/power-domain/bcm63268-power-domain.h [new file with mode: 0644]
include/dt-bindings/power-domain/bcm6328-power-domain.h [new file with mode: 0644]
include/dt-bindings/power/rk3399-power.h [new file with mode: 0644]
include/dt-bindings/reset/bcm63268-reset.h [new file with mode: 0644]
include/dt-bindings/reset/bcm6328-reset.h [new file with mode: 0644]
include/dt-bindings/reset/bcm6358-reset.h [new file with mode: 0644]
include/edid.h
include/fdtdec.h
include/generic-phy.h [new file with mode: 0644]
include/i2c.h
include/i2c_eeprom.h
include/mmc.h
include/part.h
include/power/rk808_pmic.h [deleted file]
include/power/rk8xx_pmic.h [new file with mode: 0644]
include/power/tps65910.h
include/pwm.h
include/spl.h
include/usb.h
lib/fdtdec.c
lib/rsa/rsa-sign.c
lib/slre.c
lib/string.c
lib/tpm.c
net/Makefile
net/arp.c
scripts/Makefile.extrawarn
scripts/Makefile.spl
scripts/config_whitelist.txt
test/dm/Makefile
test/dm/phy.c [new file with mode: 0644]
test/dm/pwm.c
tools/dtoc/dtoc.py
tools/genboardscfg.py
tools/kwbimage.c
tools/rkcommon.c
tools/rkcommon.h
tools/rkimage.c
tools/rksd.c
tools/rkspi.c

index 600a4d623a993f96fcfb44dd0823db9b4980dca4..bcab72697f83fe86126af0eb6f43e5a0b765ef6d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -653,7 +653,6 @@ libs-y += drivers/
 libs-y += drivers/dma/
 libs-y += drivers/gpio/
 libs-y += drivers/i2c/
-libs-y += drivers/mmc/
 libs-y += drivers/mtd/
 libs-$(CONFIG_CMD_NAND) += drivers/mtd/nand/
 libs-y += drivers/mtd/onenand/
@@ -747,6 +746,9 @@ BOARD_SIZE_CHECK =
 endif
 
 # Statically apply RELA-style relocations (currently arm64 only)
+# This is useful for arm64 where static relocation needs to be performed on
+# the raw binary, but certain simulators only accept an ELF file (but don't
+# do the relocation).
 ifneq ($(CONFIG_STATIC_RELA),)
 # $(1) is u-boot ELF, $(2) is u-boot bin, $(3) is text base
 DO_STATIC_RELA = \
@@ -1180,17 +1182,17 @@ OBJCOPYFLAGS_u-boot-img-spl-at-end.bin := -I binary -O binary \
 u-boot-img-spl-at-end.bin: u-boot.img spl/u-boot-spl.bin FORCE
        $(call if_changed,pad_cat)
 
-# Create a new ELF from a raw binary file.  This is useful for arm64
-# where static relocation needs to be performed on the raw binary,
-# but certain simulators only accept an ELF file (but don't do the
-# relocation).
-# FIXME refactor dts/Makefile to share target/arch detection
+# Create a new ELF from a raw binary file.
+ifndef PLATFORM_ELFENTRY
+  PLATFORM_ELFENTRY = "_start"
+endif
+quiet_cmd_u-boot-elf ?= LD      $@
+       cmd_u-boot-elf ?= $(LD) u-boot-elf.o -o $@ \
+       --defsym=$(PLATFORM_ELFENTRY)=$(CONFIG_SYS_TEXT_BASE) \
+       -Ttext=$(CONFIG_SYS_TEXT_BASE)
 u-boot.elf: u-boot.bin
-       @$(OBJCOPY)  -B aarch64 -I binary -O elf64-littleaarch64 \
-               $< u-boot-elf.o
-       @$(LD) u-boot-elf.o -o $@ \
-               --defsym=_start=$(CONFIG_SYS_TEXT_BASE) \
-               -Ttext=$(CONFIG_SYS_TEXT_BASE)
+       $(Q)$(OBJCOPY) -I binary $(PLATFORM_ELFFLAGS) $< u-boot-elf.o
+       $(call if_changed,u-boot-elf)
 
 # Rule to link u-boot
 # May be overridden by arch/$(ARCH)/config.mk
diff --git a/README b/README
index 78173e2d867054bfeb02438550da166d000912fb..864bf8bc2224977b08dd73ec234113d3e8c1743b 100644 (file)
--- a/README
+++ b/README
@@ -968,7 +968,7 @@ The following options need to be configured:
                tree is available in the global data as gd->fdt_blob.
 
                U-Boot needs to get its device tree from somewhere. This can
-               be done using one of the two options below:
+               be done using one of the three options below:
 
                CONFIG_OF_EMBED
                If this variable is defined, U-Boot will embed a device tree
@@ -989,6 +989,12 @@ The following options need to be configured:
                still use the individual files if you need something more
                exotic.
 
+               CONFIG_OF_BOARD
+               If this variable is defined, U-Boot will use the device tree
+               provided by the board at runtime instead of embedding one with
+               the image. Only boards defining board_fdt_blob_setup() support
+               this option (see include/fdtdec.h file).
+
 - Watchdog:
                CONFIG_WATCHDOG
                If this variable is defined, it enables watchdog
@@ -2198,52 +2204,7 @@ The following options need to be configured:
 
                If you do not have i2c muxes on your board, omit this define.
 
-- Legacy I2C Support:  CONFIG_HARD_I2C
-
-               NOTE: It is intended to move drivers to CONFIG_SYS_I2C which
-               provides the following compelling advantages:
-
-               - more than one i2c adapter is usable
-               - approved multibus support
-               - better i2c mux support
-
-               ** Please consider updating your I2C driver now. **
-
-               These enable legacy I2C serial bus commands. Defining
-               CONFIG_HARD_I2C will include the appropriate I2C driver
-               for the selected CPU.
-
-               This will allow you to use i2c commands at the u-boot
-               command line (as long as you set CONFIG_CMD_I2C in
-               CONFIG_COMMANDS) and communicate with i2c based realtime
-               clock chips. See common/cmd_i2c.c for a description of the
-               command line interface.
-
-               CONFIG_HARD_I2C selects a hardware I2C controller.
-
-               There are several other quantities that must also be
-               defined when you define CONFIG_HARD_I2C.
-
-               In both cases you will need to define CONFIG_SYS_I2C_SPEED
-               to be the frequency (in Hz) at which you wish your i2c bus
-               to run and CONFIG_SYS_I2C_SLAVE to be the address of this node (ie
-               the CPU's i2c node address).
-
-               Now, the u-boot i2c code for the mpc8xx
-               (arch/powerpc/cpu/mpc8xx/i2c.c) sets the CPU up as a master node
-               and so its address should therefore be cleared to 0 (See,
-               eg, MPC823e User's Manual p.16-473). So, set
-               CONFIG_SYS_I2C_SLAVE to 0.
-
-               CONFIG_SYS_I2C_INIT_MPC5XXX
-
-               When a board is reset during an i2c bus transfer
-               chips might think that the current transfer is still
-               in progress.  Reset the slave devices by sending start
-               commands until the slave device responds.
-
-               That's all that's required for CONFIG_HARD_I2C.
-
+- Legacy I2C Support:
                If you use the software i2c interface (CONFIG_SYS_I2C_SOFT)
                then the following macros need to be defined (examples are
                from include/configs/lwmon.h):
@@ -2332,23 +2293,6 @@ The following options need to be configured:
                custom i2c_init_board() routine in boards/xxx/board.c
                is run early in the boot sequence.
 
-               CONFIG_SYS_I2C_BOARD_LATE_INIT
-
-               An alternative to CONFIG_SYS_I2C_INIT_BOARD. If this option is
-               defined a custom i2c_board_late_init() routine in
-               boards/xxx/board.c is run AFTER the operations in i2c_init()
-               is completed. This callpoint can be used to unreset i2c bus
-               using CPU i2c controller register accesses for CPUs whose i2c
-               controller provide such a method. It is called at the end of
-               i2c_init() to allow i2c_init operations to setup the i2c bus
-               controller on the CPU (e.g. setting bus speed & slave address).
-
-               CONFIG_I2CFAST (PPC405GP|PPC405EP only)
-
-               This option enables configuration of bi_iic_fast[] flags
-               in u-boot bd_info structure based on u-boot environment
-               variable "i2cfast". (see also i2cfast)
-
                CONFIG_I2C_MULTI_BUS
 
                This option allows the use of multiple I2C buses, each of which
@@ -3702,11 +3646,6 @@ Configuration Settings:
        If defined, don't allow the -f switch to env set override variable
        access flags.
 
-- CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC (OMAP only)
-       This is set by OMAP boards for the max time that reset should
-       be asserted. See doc/README.omap-reset-time for details on how
-       the value can be calculated on a given board.
-
 - CONFIG_USE_STDINT
        If stdint.h is available with your toolchain you can define this
        option to enable it. You can provide option 'USE_STDINT=1' when
@@ -4506,11 +4445,6 @@ Low Level (hardware related) configuration options:
                If defined, the x86 reset vector code is included. This is not
                needed when U-Boot is running from Coreboot.
 
-- CONFIG_SYS_MPUCLK
-               Defines the MPU clock speed (in MHz).
-
-               NOTE : currently only supported on AM335x platforms.
-
 - CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC:
                Enables the RTC32K OSC on AM33xx based plattforms
 
index 160accdbcb0f89ba1251c9c774285f2672b23be7..2528f50efa73e8e59546a6e00ca7be999fef382f 100644 (file)
@@ -84,6 +84,8 @@ config X86
        select DM_GPIO
        select DM_SPI
        select DM_SPI_FLASH
+       select USB_EHCI_HCD
+       select DM_MMC if MMC
 
 config XTENSA
        bool "Xtensa architecture"
index b2d6e80716ddd60aa0f9d26a19f9a3d53308261a..a17ba2c60a54c55af61367ffe3409f70bf5e0712 100644 (file)
@@ -654,7 +654,7 @@ config ARCH_SUNXI
        imply SPL_LIBCOMMON_SUPPORT
        imply SPL_LIBDISK_SUPPORT
        imply SPL_LIBGENERIC_SUPPORT
-       imply SPL_MMC_SUPPORT if GENERIC_MMC
+       imply SPL_MMC_SUPPORT if MMC
        imply SPL_POWER_SUPPORT
        imply SPL_SERIAL_SUPPORT
 
index 2143633fe440985c5c732d436ee97a5b94598bc1..a5eebb95e5c6d58188c21da27cf56f8c61f1da8e 100644 (file)
@@ -30,6 +30,12 @@ PLATFORM_RELFLAGS    += $(LLVM_RELFLAGS)
 
 PLATFORM_CPPFLAGS += -D__ARM__
 
+ifdef CONFIG_ARM64
+PLATFORM_ELFFLAGS += -B aarch64 -O elf64-littleaarch64
+else
+PLATFORM_ELFFLAGS += -B arm -O elf32-littlearm
+endif
+
 # Choose between ARM/Thumb instruction sets
 ifeq ($(CONFIG_$(SPL_)SYS_THUMB_BUILD),y)
 AFLAGS_IMPLICIT_IT     := $(call as-option,-Wa$(comma)-mimplicit-it=always)
diff --git a/arch/arm/cpu/arm926ejs/omap/Makefile b/arch/arm/cpu/arm926ejs/omap/Makefile
deleted file mode 100644 (file)
index add9232..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-obj-y  = timer.o
-obj-$(CONFIG_DISPLAY_CPUINFO) += cpuinfo.o
-obj-y  += reset.o
diff --git a/arch/arm/cpu/arm926ejs/omap/cpuinfo.c b/arch/arm/cpu/arm926ejs/omap/cpuinfo.c
deleted file mode 100644 (file)
index 587d99a..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * OMAP1 CPU identification code
- *
- * Copyright (C) 2004 Nokia Corporation
- * Written by Tony Lindgren <tony@atomide.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <common.h>
-#include <command.h>
-#include <linux/compiler.h>
-
-#if defined(CONFIG_OMAP)
-
-#define omap_readw(x)          *(volatile unsigned short *)(x)
-#define omap_readl(x)          *(volatile unsigned long *)(x)
-
-#define OMAP_DIE_ID_0          0xfffe1800
-#define OMAP_DIE_ID_1          0xfffe1804
-#define OMAP_PRODUCTION_ID_0   0xfffe2000
-#define OMAP_PRODUCTION_ID_1   0xfffe2004
-#define OMAP32_ID_0            0xfffed400
-#define OMAP32_ID_1            0xfffed404
-
-struct omap_id {
-       u16     jtag_id;        /* Used to determine OMAP type */
-       u8      die_rev;        /* Processor revision */
-       u32     omap_id;        /* OMAP revision */
-       u32     type;           /* Cpu id bits [31:08], cpu class bits [07:00] */
-};
-
-/* Register values to detect the OMAP version */
-static struct omap_id omap_ids[] = {
-       { .jtag_id = 0xb574, .die_rev = 0x2, .omap_id = 0x03310315, .type = 0x03100000},
-       { .jtag_id = 0x355f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300100},
-       { .jtag_id = 0xb55f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300300},
-       { .jtag_id = 0xb470, .die_rev = 0x0, .omap_id = 0x03310100, .type = 0x15100000},
-       { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x16100000},
-       { .jtag_id = 0xb576, .die_rev = 0x2, .omap_id = 0x03320100, .type = 0x16110000},
-       { .jtag_id = 0xb576, .die_rev = 0x3, .omap_id = 0x03320100, .type = 0x16100c00},
-       { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320200, .type = 0x16100d00},
-       { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type = 0x1610ef00},
-       { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type = 0x1610ef00},
-       { .jtag_id = 0xb576, .die_rev = 0x1, .omap_id = 0x03320100, .type = 0x16110000},
-       { .jtag_id = 0xb58c, .die_rev = 0x2, .omap_id = 0x03320200, .type = 0x16110b00},
-       { .jtag_id = 0xb58c, .die_rev = 0x3, .omap_id = 0x03320200, .type = 0x16110c00},
-       { .jtag_id = 0xb65f, .die_rev = 0x0, .omap_id = 0x03320400, .type = 0x16212300},
-       { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320400, .type = 0x16212300},
-       { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320500, .type = 0x16212300},
-       { .jtag_id = 0xb5f7, .die_rev = 0x0, .omap_id = 0x03330000, .type = 0x17100000},
-       { .jtag_id = 0xb5f7, .die_rev = 0x1, .omap_id = 0x03330100, .type = 0x17100000},
-       { .jtag_id = 0xb5f7, .die_rev = 0x2, .omap_id = 0x03330100, .type = 0x17100000},
-};
-
-/*
- * Get OMAP type from PROD_ID.
- * 1710 has the PROD_ID in bits 15:00, not in 16:01 as documented in TRM.
- * 1510 PROD_ID is empty, and 1610 PROD_ID does not make sense.
- * Undocumented register in TEST BLOCK is used as fallback; This seems to
- * work on 1510, 1610 & 1710. The official way hopefully will work in future
- * processors.
- */
-static u16 omap_get_jtag_id(void)
-{
-       u32 prod_id, omap_id;
-
-       prod_id = omap_readl(OMAP_PRODUCTION_ID_1);
-       omap_id = omap_readl(OMAP32_ID_1);
-
-       /* Check for unusable OMAP_PRODUCTION_ID_1 on 1611B/5912 and 730 */
-       if (((prod_id >> 20) == 0) || (prod_id == omap_id))
-               prod_id = 0;
-       else
-               prod_id &= 0xffff;
-
-       if (prod_id)
-               return prod_id;
-
-       /* Use OMAP32_ID_1 as fallback */
-       prod_id = ((omap_id >> 12) & 0xffff);
-
-       return prod_id;
-}
-
-/*
- * Get OMAP revision from DIE_REV.
- * Early 1710 processors may have broken OMAP_DIE_ID, it contains PROD_ID.
- * Undocumented register in the TEST BLOCK is used as fallback.
- * REVISIT: This does not seem to work on 1510
- */
-static u8 omap_get_die_rev(void)
-{
-       u32 die_rev;
-
-       die_rev = omap_readl(OMAP_DIE_ID_1);
-
-       /* Check for broken OMAP_DIE_ID on early 1710 */
-       if (((die_rev >> 12) & 0xffff) == omap_get_jtag_id())
-               die_rev = 0;
-
-       die_rev = (die_rev >> 17) & 0xf;
-       if (die_rev)
-               return die_rev;
-
-       die_rev = (omap_readl(OMAP32_ID_1) >> 28) & 0xf;
-
-       return die_rev;
-}
-
-static unsigned long dpll1(void)
-{
-       unsigned short pll_ctl_val = omap_readw(DPLL_CTL_REG);
-       unsigned long rate;
-
-       rate = CONFIG_SYS_CLK_FREQ; /* Base xtal rate */
-       if (pll_ctl_val & 0x10) {
-               /* PLL enabled, apply multiplier and divisor */
-               if (pll_ctl_val & 0xf80)
-                       rate *= (pll_ctl_val & 0xf80) >> 7;
-               rate /= ((pll_ctl_val & 0x60) >> 5) + 1;
-       } else {
-               /* PLL disabled, apply bypass divisor */
-               switch (pll_ctl_val & 0xc) {
-               case 0:
-                       break;
-               case 0x4:
-                       rate /= 2;
-                       break;
-               default:
-                       rate /= 4;
-                       break;
-               }
-       }
-
-       return rate;
-}
-
-static unsigned long armcore(void)
-{
-       unsigned short arm_ckctl = omap_readw(ARM_CKCTL);
-
-       return (dpll1() >> ((arm_ckctl & 0x0030) >> 4));
-}
-
-int print_cpuinfo (void)
-{
-       int i;
-       u16 jtag_id;
-       u8 die_rev;
-       u32 omap_id;
-       u8 cpu_type;
-       __maybe_unused u32 system_serial_high;
-       __maybe_unused u32 system_serial_low;
-       u32 system_rev = 0;
-
-       jtag_id = omap_get_jtag_id();
-       die_rev = omap_get_die_rev();
-       omap_id = omap_readl(OMAP32_ID_0);
-
-#ifdef DEBUG
-       printf("OMAP_DIE_ID_0: 0x%08x\n", omap_readl(OMAP_DIE_ID_0));
-       printf("OMAP_DIE_ID_1: 0x%08x DIE_REV: %i\n",
-              omap_readl(OMAP_DIE_ID_1),
-              (omap_readl(OMAP_DIE_ID_1) >> 17) & 0xf);
-       printf("OMAP_PRODUCTION_ID_0: 0x%08x\n", omap_readl(OMAP_PRODUCTION_ID_0));
-       printf("OMAP_PRODUCTION_ID_1: 0x%08x JTAG_ID: 0x%04x\n",
-              omap_readl(OMAP_PRODUCTION_ID_1),
-              omap_readl(OMAP_PRODUCTION_ID_1) & 0xffff);
-       printf("OMAP32_ID_0: 0x%08x\n", omap_readl(OMAP32_ID_0));
-       printf("OMAP32_ID_1: 0x%08x\n", omap_readl(OMAP32_ID_1));
-       printf("JTAG_ID: 0x%04x DIE_REV: %i\n", jtag_id, die_rev);
-#endif
-
-       system_serial_high = omap_readl(OMAP_DIE_ID_0);
-       system_serial_low = omap_readl(OMAP_DIE_ID_1);
-
-       /* First check only the major version in a safe way */
-       for (i = 0; i < ARRAY_SIZE(omap_ids); i++) {
-               if (jtag_id == (omap_ids[i].jtag_id)) {
-                       system_rev = omap_ids[i].type;
-                       break;
-               }
-       }
-
-       /* Check if we can find the die revision */
-       for (i = 0; i < ARRAY_SIZE(omap_ids); i++) {
-               if (jtag_id == omap_ids[i].jtag_id && die_rev == omap_ids[i].die_rev) {
-                       system_rev = omap_ids[i].type;
-                       break;
-               }
-       }
-
-       /* Finally check also the omap_id */
-       for (i = 0; i < ARRAY_SIZE(omap_ids); i++) {
-               if (jtag_id == omap_ids[i].jtag_id
-                   && die_rev == omap_ids[i].die_rev
-                   && omap_id == omap_ids[i].omap_id) {
-                       system_rev = omap_ids[i].type;
-                       break;
-               }
-       }
-
-       /* Add the cpu class info (7xx, 15xx, 16xx, 24xx) */
-       cpu_type = system_rev >> 24;
-
-       switch (cpu_type) {
-       case 0x07:
-               system_rev |= 0x07;
-               break;
-       case 0x03:
-       case 0x15:
-               system_rev |= 0x15;
-               break;
-       case 0x16:
-       case 0x17:
-               system_rev |= 0x16;
-               break;
-       case 0x24:
-               system_rev |= 0x24;
-               break;
-       default:
-               printf("Unknown OMAP cpu type: 0x%02x\n", cpu_type);
-       }
-
-       printf("CPU:   OMAP%04x", system_rev >> 16);
-       if ((system_rev >> 8) & 0xff)
-               printf("%x", (system_rev >> 8) & 0xff);
-#ifdef DEBUG
-       printf(" revision %i handled as %02xxx id: %08x%08x",
-              die_rev, system_rev & 0xff, system_serial_low, system_serial_high);
-#endif
-       printf(" at %ld.%01ld MHz (DPLL1=%ld.%01ld MHz)\n",
-              armcore() / 1000000, (armcore() / 100000) % 10,
-              dpll1() / 1000000, (dpll1() / 100000) % 10);
-
-       return 0;
-}
-
-#endif /* #if defined(CONFIG_OMAP) */
diff --git a/arch/arm/cpu/arm926ejs/omap/reset.S b/arch/arm/cpu/arm926ejs/omap/reset.S
deleted file mode 100644 (file)
index 1c557b0..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *  armboot - Startup Code for ARM926EJS CPU-core
- *
- *  Copyright (c) 2003  Texas Instruments
- *
- *  ----- Adapted for OMAP1610 OMAP730 from ARM925t code ------
- *
- *  Copyright (c) 2001 Marius Gröger <mag@sysgo.de>
- *  Copyright (c) 2002 Alex Züpke <azu@sysgo.de>
- *  Copyright (c) 2002 Gary Jennejohn <garyj@denx.de>
- *  Copyright (c) 2003 Richard Woodruff <r-woodruff2@ti.com>
- *  Copyright (c) 2003 Kshitij <kshitij@ti.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-       .align  5
-.globl reset_cpu
-reset_cpu:
-       ldr     r1, rstctl1     /* get clkm1 reset ctl */
-       mov     r3, #0x0
-       strh    r3, [r1]        /* clear it */
-       mov     r3, #0x8
-       strh    r3, [r1]        /* force dsp+arm reset */
-_loop_forever:
-       b       _loop_forever
-
-rstctl1:
-       .word   0xfffece10
diff --git a/arch/arm/cpu/arm926ejs/omap/timer.c b/arch/arm/cpu/arm926ejs/omap/timer.c
deleted file mode 100644 (file)
index b971565..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * (C) Copyright 2003
- * Texas Instruments <www.ti.com>
- *
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Marius Groeger <mgroeger@sysgo.de>
- *
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Alex Zuepke <azu@sysgo.de>
- *
- * (C) Copyright 2002-2004
- * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
- *
- * (C) Copyright 2004
- * Philippe Robin, ARM Ltd. <philippe.robin@arm.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <asm/io.h>
-
-#define TIMER_CLOCK    (CONFIG_SYS_CLK_FREQ / (2 << CONFIG_SYS_PTV))
-#define TIMER_LOAD_VAL 0xffffffff
-
-/* macro to read the 32 bit timer */
-#define READ_TIMER     readl(CONFIG_SYS_TIMERBASE+8) \
-                       / (TIMER_CLOCK / CONFIG_SYS_HZ)
-
-DECLARE_GLOBAL_DATA_PTR;
-
-#define timestamp gd->arch.tbl
-#define lastdec gd->arch.lastinc
-
-int timer_init (void)
-{
-       int32_t val;
-
-       /* Start the decrementer ticking down from 0xffffffff */
-       *((int32_t *) (CONFIG_SYS_TIMERBASE + LOAD_TIM)) = TIMER_LOAD_VAL;
-       val = MPUTIM_ST | MPUTIM_AR | MPUTIM_CLOCK_ENABLE | (CONFIG_SYS_PTV << MPUTIM_PTV_BIT);
-       *((int32_t *) (CONFIG_SYS_TIMERBASE + CNTL_TIMER)) = val;
-
-       /* init the timestamp and lastdec value */
-       reset_timer_masked();
-
-       return 0;
-}
-
-/*
- * timer without interrupts
- */
-ulong get_timer (ulong base)
-{
-       return get_timer_masked () - base;
-}
-
-/* delay x useconds AND preserve advance timestamp value */
-void __udelay (unsigned long usec)
-{
-       ulong tmo, tmp;
-
-       if(usec >= 1000){               /* if "big" number, spread normalization to seconds */
-               tmo = usec / 1000;      /* start to normalize for usec to ticks per sec */
-               tmo *= CONFIG_SYS_HZ;   /* find number of "ticks" to wait to achieve target */
-               tmo /= 1000;            /* finish normalize. */
-       }else{                          /* else small number, don't kill it prior to HZ multiply */
-               tmo = usec * CONFIG_SYS_HZ;
-               tmo /= (1000*1000);
-       }
-
-       tmp = get_timer (0);            /* get current timestamp */
-       if( (tmo + tmp + 1) < tmp )     /* if setting this fordward will roll time stamp */
-               reset_timer_masked ();  /* reset "advancing" timestamp to 0, set lastdec value */
-       else
-               tmo += tmp;             /* else, set advancing stamp wake up time */
-
-       while (get_timer_masked () < tmo)/* loop till event */
-               /*NOP*/;
-}
-
-void reset_timer_masked (void)
-{
-       /* reset time */
-       lastdec = READ_TIMER;  /* capure current decrementer value time */
-       timestamp = 0;         /* start "advancing" time stamp from 0 */
-}
-
-ulong get_timer_masked (void)
-{
-       ulong now = READ_TIMER;         /* current tick value */
-
-       if (lastdec >= now) {           /* normal mode (non roll) */
-               /* normal mode */
-               timestamp += lastdec - now; /* move stamp fordward with absoulte diff ticks */
-       } else {                        /* we have overflow of the count down timer */
-               /* nts = ts + ld + (TLV - now)
-                * ts=old stamp, ld=time that passed before passing through -1
-                * (TLV-now) amount of time after passing though -1
-                * nts = new "advancing time stamp"...it could also roll and cause problems.
-                */
-               timestamp += lastdec + (TIMER_LOAD_VAL / (TIMER_CLOCK /
-                                       CONFIG_SYS_HZ)) - now;
-       }
-       lastdec = now;
-
-       return timestamp;
-}
-
-/* waits specified delay value and resets timestamp */
-void udelay_masked (unsigned long usec)
-{
-       ulong tmo;
-       ulong endtime;
-       signed long diff;
-
-       if (usec >= 1000) {             /* if "big" number, spread normalization to seconds */
-               tmo = usec / 1000;      /* start to normalize for usec to ticks per sec */
-               tmo *= CONFIG_SYS_HZ;           /* find number of "ticks" to wait to achieve target */
-               tmo /= 1000;            /* finish normalize. */
-       } else {                        /* else small number, don't kill it prior to HZ multiply */
-               tmo = usec * CONFIG_SYS_HZ;
-               tmo /= (1000*1000);
-       }
-
-       endtime = get_timer_masked () + tmo;
-
-       do {
-               ulong now = get_timer_masked ();
-               diff = endtime - now;
-       } while (diff >= 0);
-}
-
-/*
- * This function is derived from PowerPC code (read timebase as long long).
- * On ARM it just returns the timer value.
- */
-unsigned long long get_ticks(void)
-{
-       return get_timer(0);
-}
-
-/*
- * This function is derived from PowerPC code (timebase clock frequency).
- * On ARM it returns the number of timer ticks per second.
- */
-ulong get_tbclk (void)
-{
-       return CONFIG_SYS_HZ;
-}
index 93c9085219306ebc1bf37d4338845fc01b98865e..257fc7faf3ec4e07f11e7dca2aab8761e8c1404e 100644 (file)
@@ -6,5 +6,5 @@
 #
 
 extra-y := start.o
-obj-y += cpu.o cache.o
+obj-y += cpu.o cache.o mpu.o
 obj-$(CONFIG_SYS_ARCH_TIMER) += systick-timer.o
index 162cfe3928fa067a160ccd9ef726c415a2ea2677..e8f86420cf85454346994a3581af4c4f52f95e74 100644 (file)
@@ -253,6 +253,21 @@ void flush_dcache_range(unsigned long start, unsigned long stop)
                return;
        }
 }
+void flush_dcache_all(void)
+{
+       if (action_dcache_all(FLUSH_SET_WAY)) {
+               printf("ERR: D-cache not flushed\n");
+               return;
+       }
+}
+
+void invalidate_dcache_all(void)
+{
+       if (action_dcache_all(INVALIDATE_SET_WAY)) {
+               printf("ERR: D-cache not invalidated\n");
+               return;
+       }
+}
 #else
 void dcache_enable(void)
 {
@@ -268,6 +283,14 @@ int dcache_status(void)
 {
        return 0;
 }
+
+void flush_dcache_all(void)
+{
+}
+
+void invalidate_dcache_all(void)
+{
+}
 #endif
 
 #ifndef CONFIG_SYS_ICACHE_OFF
index 58cde9391f2f5a83c19bad8bb2abbee5f8152e2d..a424babde547042bbb97958cd8ca2ff50cef4e13 100644 (file)
  */
 int cleanup_before_linux(void)
 {
+       /*
+        * this function is called just before we call linux
+        * it prepares the processor for linux
+        *
+        * disable interrupt and turn off caches etc ...
+        */
+       disable_interrupts();
+       /*
+        * turn off D-cache
+        * dcache_disable() in turn flushes the d-cache
+        * MPU is still enabled & can't be disabled as the u-boot
+        * code might be running in sdram which by default is not
+        * executable area.
+        */
+       dcache_disable();
+       /* invalidate to make sure no cache line gets dirty between
+        * dcache flushing and disabling dcache */
+       invalidate_dcache_all();
+
        return 0;
 }
 
diff --git a/arch/arm/cpu/armv7m/mpu.c b/arch/arm/cpu/armv7m/mpu.c
new file mode 100644 (file)
index 0000000..31a243b
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * (C) Copyright 2017
+ * Vikas Manocha, ST Micoelectronics, vikas.manocha@st.com.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <linux/bitops.h>
+#include <asm/armv7m.h>
+#include <asm/armv7m_mpu.h>
+#include <asm/io.h>
+
+#define V7M_MPU_CTRL_ENABLE            (1 << 0)
+#define V7M_MPU_CTRL_DISABLE           (0 << 0)
+#define V7M_MPU_CTRL_HFNMIENA          (1 << 1)
+#define VALID_REGION                   (1 << 4)
+
+#define ENABLE_REGION                  (1 << 0)
+
+#define AP_SHIFT                       24
+#define XN_SHIFT                       28
+#define TEX_SHIFT                      19
+#define S_SHIFT                                18
+#define C_SHIFT                                17
+#define B_SHIFT                                16
+#define REGION_SIZE_SHIFT              1
+
+#define CACHEABLE                      (1 << C_SHIFT)
+#define BUFFERABLE                     (1 << B_SHIFT)
+#define SHAREABLE                      (1 << S_SHIFT)
+
+void disable_mpu(void)
+{
+       writel(0, &V7M_MPU->ctrl);
+}
+
+void enable_mpu(void)
+{
+       writel(V7M_MPU_CTRL_ENABLE | V7M_MPU_CTRL_HFNMIENA, &V7M_MPU->ctrl);
+
+       /* Make sure new mpu config is effective for next memory access */
+       dsb();
+       isb();  /* Make sure instruction stream sees it */
+}
+
+void mpu_config(struct mpu_region_config *reg_config)
+{
+       uint32_t attr;
+
+       switch (reg_config->mr_attr) {
+       case STRONG_ORDER:
+               attr = SHAREABLE;
+               break;
+       case SHARED_WRITE_BUFFERED:
+               attr = BUFFERABLE;
+               break;
+       case O_I_WT_NO_WR_ALLOC:
+               attr = CACHEABLE;
+               break;
+       case O_I_WB_NO_WR_ALLOC:
+               attr = CACHEABLE | BUFFERABLE;
+               break;
+       case O_I_NON_CACHEABLE:
+               attr = 1 << TEX_SHIFT;
+               break;
+       case O_I_WB_RD_WR_ALLOC:
+               attr = (1 << TEX_SHIFT) | CACHEABLE | BUFFERABLE;
+               break;
+       case DEVICE_NON_SHARED:
+               attr = (2 << TEX_SHIFT) | BUFFERABLE;
+       default:
+               attr = 0; /* strongly ordered */
+               break;
+       };
+
+       writel(reg_config->start_addr | VALID_REGION | reg_config->region_no,
+              &V7M_MPU->rbar);
+
+       writel(reg_config->xn << XN_SHIFT | reg_config->ap << AP_SHIFT | attr
+               | reg_config->reg_size << REGION_SIZE_SHIFT | ENABLE_REGION
+              , &V7M_MPU->rasr);
+}
index f1deaa723024e629c8a89aaee9c21bad0dff4a60..7cba308ee7a2806cfe2fa3a88a3cafa12ba7e405 100644 (file)
@@ -138,6 +138,30 @@ ENTRY(__asm_flush_dcache_range)
        dsb     sy
        ret
 ENDPROC(__asm_flush_dcache_range)
+/*
+ * void __asm_invalidate_dcache_range(start, end)
+ *
+ * invalidate data cache in the range
+ *
+ * x0: start address
+ * x1: end address
+ */
+ENTRY(__asm_invalidate_dcache_range)
+       mrs     x3, ctr_el0
+       ubfm    x3, x3, #16, #19
+       mov     x2, #4
+       lsl     x2, x2, x3              /* cache line size */
+
+       /* x2 <- minimal cache line size in cache system */
+       sub     x3, x2, #1
+       bic     x0, x0, x3
+1:     dc      ivac, x0        /* invalidate data or unified cache */
+       add     x0, x0, x2
+       cmp     x0, x1
+       b.lo    1b
+       dsb     sy
+       ret
+ENDPROC(__asm_invalidate_dcache_range)
 
 /*
  * void __asm_invalidate_icache_all(void)
index bd1c3e0335d4630f8367581fb88a864a0964b621..adc7e1746f5ca01bea6487da069167a92f762182 100644 (file)
@@ -446,7 +446,7 @@ inline void flush_dcache_all(void)
  */
 void invalidate_dcache_range(unsigned long start, unsigned long stop)
 {
-       __asm_flush_dcache_range(start, stop);
+       __asm_invalidate_dcache_range(start, stop);
 }
 
 /*
index cd92b2c7617dcc1f4fb7531a08b9eb19d63ca008..a2dda333fe5f63979f5b4d4fbf4d40b18ff9934d 100644 (file)
@@ -43,7 +43,7 @@ unsigned long timer_read_counter(void)
        return cntpct;
 }
 
-unsigned long long get_ticks(void)
+uint64_t get_ticks(void)
 {
        unsigned long ticks = timer_read_counter();
 
index 62d97f7e882225a027390e8d2b6f13c4a6a606de..354468b9053d5e03d7ca8d513ce33623abd47c32 100644 (file)
@@ -86,12 +86,12 @@ save_boot_params_ret:
 0:
 
        /*
-        * Enalbe SMPEN bit for coherency.
+        * Enable SMPEN bit for coherency.
         * This register is not architectural but at the moment
         * this bit should be set for A53/A57/A72.
         */
 #ifdef CONFIG_ARMV8_SET_SMPEN
-       mrs     x0, S3_1_c15_c2_1               /* cpuactlr_el1 */
+       mrs     x0, S3_1_c15_c2_1               /* cpuectlr_el1 */
        orr     x0, x0, #0x40
        msr     S3_1_c15_c2_1, x0
 #endif
index 4d656ce4cc3db87cbb57176a2ddb4d5955106607..e1a2b07474e09e593db63648add9d23c8ea5a2b1 100644 (file)
@@ -42,6 +42,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
        rk3288-veyron-minnie.dtb \
        rk3328-evb.dtb \
        rk3399-evb.dtb \
+       rk3399-firefly.dtb \
        rk3399-puma.dtb
 dtb-$(CONFIG_ARCH_MESON) += \
        meson-gxbb-odroidc2.dtb
@@ -81,6 +82,7 @@ dtb-$(CONFIG_ARCH_MVEBU) +=                   \
        armada-388-gp.dtb                       \
        armada-385-amc.dtb                      \
        armada-7040-db.dtb                      \
+       armada-7040-db-nand.dtb                 \
        armada-8040-db.dtb                      \
        armada-8040-mcbin.dtb                   \
        armada-xp-gp.dtb                        \
@@ -343,7 +345,8 @@ dtb-$(CONFIG_MX6) += imx6ull-14x14-evk.dtb \
        imx6ul-isiot-nand.dtb \
        imx6ul-opos6uldev.dtb
 
-dtb-$(CONFIG_MX7) += imx7-colibri.dtb
+dtb-$(CONFIG_MX7) += imx7-colibri.dtb \
+       imx7d-sdb.dtb
 
 dtb-$(CONFIG_ARCH_MX7ULP) += imx7ulp-evk.dtb
 
@@ -352,6 +355,30 @@ dtb-$(CONFIG_SOC_KEYSTONE) += keystone-k2hk-evm.dtb \
        keystone-k2e-evm.dtb \
        keystone-k2g-evm.dtb
 
+dtb-$(CONFIG_TARGET_AT91SAM9263EK) += at91sam9263ek.dtb
+
+dtb-$(CONFIG_TARGET_AT91SAM9RLEK) += at91sam9rlek.dtb
+
+dtb-$(CONFIG_TARGET_AT91SAM9260EK) += \
+       at91sam9260ek.dtb       \
+       at91sam9g20ek.dtb       \
+       at91sam9g20ek_2mmc.dtb
+
+dtb-$(CONFIG_TARGET_AT91SAM9M10G45EK) += at91sam9m10g45ek.dtb
+
+dtb-$(CONFIG_TARGET_AT91SAM9X5EK) += \
+       at91sam9g15ek.dtb       \
+       at91sam9g25ek.dtb       \
+       at91sam9g35ek.dtb       \
+       at91sam9x25ek.dtb       \
+       at91sam9x35ek.dtb
+
+dtb-$(CONFIG_TARGET_AT91SAM9N12EK) += at91sam9n12ek.dtb
+
+dtb-$(CONFIG_TARGET_OMAP3_LOGIC) += \
+       logicpd-torpedo-37xx-devkit.dtb \
+       logicpd-som-lv-37xx-devkit.dts
+
 dtb-$(CONFIG_TARGET_SAMA5D2_XPLAINED) += \
        at91-sama5d2_xplained.dtb
 
index a5a8a7f186db5d1918eda3c9ff2568ebcde0150b..4649c910c7b0c55859b0c24d3275fcb15becadad 100644 (file)
@@ -54,6 +54,7 @@
        aliases {
                ethernet0 = &eth0;
                ethernet1 = &eth1;
+               i2c0 = &i2c0;
                spi1 = &spi1;
        };
 
@@ -68,6 +69,8 @@
 
                internal-regs {
                        i2c@11000 {
+                               clock-frequency = <100000>;
+                               u-boot,i2c-slave-addr = <0x0>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&i2c0_pins>;
                                status = "okay";
diff --git a/arch/arm/dts/armada-7040-db-nand.dts b/arch/arm/dts/armada-7040-db-nand.dts
new file mode 100644 (file)
index 0000000..3a9df21
--- /dev/null
@@ -0,0 +1,223 @@
+/*
+ * Copyright (C) 2017 Marvell Technology Group Ltd.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPLv2 or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This library is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Device Tree file for Marvell Armada 7040 Development board platform
+ * Boot device: NAND, 0xE (SW3)
+ */
+
+#include "armada-7040.dtsi"
+
+/ {
+       model = "Marvell Armada 7040 DB board with NAND";
+       compatible = "marvell,armada7040-db-nand", "marvell,armada7040-db",
+                    "marvell,armada7040", "marvell,armada-ap806-quad",
+                    "marvell,armada-ap806";
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       aliases {
+               i2c0 = &cpm_i2c0;
+               spi0 = &cpm_spi1;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               reg = <0x0 0x0 0x0 0x80000000>;
+       };
+};
+
+&ap_pinctl {
+          /* MPP Bus:
+           * SDIO  [0-5]
+           * UART0 [11,19]
+           */
+                 /* 0   1   2   3   4   5   6   7   8   9 */
+       pin-func = < 0x1 0x1 0x1 0x1 0x1 0x1 0x0 0x0 0x0 0x0
+                    0x0 0x3 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x3 >;
+};
+
+&uart0 {
+       status = "okay";
+};
+
+
+&cpm_pcie2 {
+       status = "okay";
+};
+
+&cpm_i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&cpm_i2c0_pins>;
+       status = "okay";
+       clock-frequency = <100000>;
+};
+
+&cpm_pinctl {
+               /* MPP Bus:
+                * AUDIO   [0-5]
+                 * GBE     [6-11]
+                * SS_PWDN [12]
+                * NF_RBn  [13]
+                 * GPIO    [14]
+                * DEV_BUS [15-27]
+                * SATA1   [28]
+                * UART0   [29-30]
+                * MSS_VTT_EN [31]
+                * SMI     [32,34]
+                * XSMI    [35-36]
+                * I2C     [37-38]
+                * RGMII1  [44-55]
+                * SD      [56-61]
+                * GPIO    [62]
+                */
+                /*   0   1   2   3   4   5   6   7   8   9 */
+        pin-func = < 0x2 0x2 0x2 0x2 0x2 0x2 0x3 0x3 0x3 0x3
+                     0x3 0x3 0x0 0x2 0x0 0x1 0x1 0x1 0x1 0x1
+                     0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x9 0xa
+                     0xa 0x0 0x7 0x0 0x7 0x7 0x7 0x2 0x2 0x0
+                     0x0 0x0 0x0 0x0 0x1 0x1 0x1 0x1 0x1 0x1
+                     0x1 0x1 0x1 0x1 0x1 0x1 0xe 0xe 0xe 0xe
+                     0xe 0xe 0x0>;
+};
+
+&cpm_spi1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&cpm_spi0_pins>;
+       status = "disabled";
+
+       spi-flash@0 {
+               #address-cells = <0x1>;
+               #size-cells = <0x1>;
+               compatible = "jedec,spi-nor";
+               reg = <0x0>;
+               spi-max-frequency = <20000000>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "U-Boot";
+                               reg = <0x0 0x200000>;
+                       };
+
+                       partition@400000 {
+                               label = "Filesystem";
+                               reg = <0x200000 0xe00000>;
+                       };
+               };
+       };
+};
+
+&cpm_sata0 {
+       status = "okay";
+};
+
+&cpm_usb3_0 {
+       status = "okay";
+};
+
+&cpm_usb3_1 {
+       status = "okay";
+};
+
+&cpm_comphy {
+       phy0 {
+               phy-type = <PHY_TYPE_SGMII2>;
+               phy-speed = <PHY_SPEED_3_125G>;
+       };
+
+       phy1 {
+               phy-type = <PHY_TYPE_USB3_HOST0>;
+               phy-speed = <PHY_SPEED_5G>;
+       };
+
+       phy2 {
+               phy-type = <PHY_TYPE_SGMII0>;
+               phy-speed = <PHY_SPEED_1_25G>;
+       };
+
+       phy3 {
+               phy-type = <PHY_TYPE_SATA1>;
+               phy-speed = <PHY_SPEED_5G>;
+       };
+
+       phy4 {
+               phy-type = <PHY_TYPE_USB3_HOST1>;
+               phy-speed = <PHY_SPEED_5G>;
+       };
+
+       phy5 {
+               phy-type = <PHY_TYPE_PEX2>;
+               phy-speed = <PHY_SPEED_5G>;
+       };
+};
+
+&cpm_nand {
+       status = "okay";
+};
+
+&cpm_utmi0 {
+       status = "okay";
+};
+
+&cpm_utmi1 {
+       status = "okay";
+};
+
+&ap_sdhci0 {
+       status = "okay";
+       bus-width = <4>;
+       no-1-8-v;
+       non-removable;
+};
+
+&cpm_sdhci0 {
+       status = "okay";
+       bus-width = <4>;
+       no-1-8-v;
+       non-removable;
+};
index 84e0dbdc3d703079ba53568b8c03daa7d3008d15..b140b3476e751c94bbe7019549b2d100ef9605fc 100644 (file)
@@ -42,6 +42,7 @@
 
 /*
  * Device Tree file for Marvell Armada 7040 Development board platform
+ * Boot device: SPI NOR, 0x32 (SW3)
  */
 
 #include "armada-7040.dtsi"
 
 &cpm_comphy {
        phy0 {
-               phy-type = <PHY_TYPE_SGMII2>;
+               phy-type = <PHY_TYPE_SGMII1>;
                phy-speed = <PHY_SPEED_1_25G>;
        };
 
index f1f196f563a110d77a8ce97be1ed8629726f4211..fa589956ad76b5a354e4bf934f92985053aa6a1c 100644 (file)
 
 &cpm_pinctl {
        /* MPP Bus:
-        * [0-31] = 0xff: Keep default CP0_shared_pins:
-        * [11] CLKOUT_MPP_11 (out)
-        * [23] LINK_RD_IN_CP2CP (in)
-        * [25] CLKOUT_MPP_25 (out)
-        * [29] AVS_FB_IN_CP2CP (in)
-        * [32,34] SMI
-        * [31]    GPIO: push button/Wake
-        * [35-36] GPIO
-        * [37-38] I2C
-        * [40-41] SATA[0/1]_PRESENT_ACTIVEn
-        * [42-43] XSMI
-        * [44-55] RGMII1
-        * [56-62] SD
+        *      [0-31]  = 0xff: Keep default CP0_shared_pins
+        *      [11]    CLKOUT_MPP_11 (out)
+        *      [23]    LINK_RD_IN_CP2CP (in)
+        *      [25]    CLKOUT_MPP_25 (out)
+        *      [29]    AVS_FB_IN_CP2CP (in)
+        *      [32,34] GE_MDIO/MDC
+        *      [33]    GPIO: GE_INT#/push button/Wake
+        *      [35]    MSS_GPIO[3]: MSS_PWDN
+        *      [36]    MSS_GPIO[5]: MSS_VTT_EN
+        *      [37-38] I2C0
+        *      [39]    PTP_CLK
+        *      [40-41] SATA[0/1]_PRESENT_ACTIVEn
+        *      [42-43] XG_MDC/XG_MDIO (XSMI)
+        *      [44-55] RGMII1
+        *      [56-62] SD
         */
-               /*   0    1    2    3    4    5    6    7    8    9 */
+       /*   0    1    2    3    4    5    6    7    8    9 */
        pin-func = < 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
                     0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
                     0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
-                    0xff 0    7    0    7    0    0    2    2    0
-                    0    0    8    8    1    1    1    1    1    1
-                    1    1    1    1    1    1    0xe  0xe  0xe  0xe
-                    0xe  0xe  0xe >;
+                    0xff 0xff 0x7  0x0  0x7  0xa  0xa  0x2  0x2  0x5
+                    0x9  0x9  0x8  0x8  0x1  0x1  0x1  0x1  0x1  0x1
+                    0x1  0x1  0x1  0x1  0x1  0x1  0xe  0xe  0xe  0xe
+                    0xe  0xe  0xe>;
+};
+
+&cpm_comphy {
+       /* Serdes Configuration:
+        *      Lane 0: PCIe0 (x1)
+        *      Lane 1: SATA0
+        *      Lane 2: SFI (10G)
+        *      Lane 3: SATA1
+        *      Lane 4: USB3_HOST1
+        *      Lane 5: PCIe2 (x1)
+        */
+       phy0 {
+               phy-type = <PHY_TYPE_PEX0>;
+       };
+       phy1 {
+               phy-type = <PHY_TYPE_SATA0>;
+       };
+       phy2 {
+               phy-type = <PHY_TYPE_SFI>;
+       };
+       phy3 {
+               phy-type = <PHY_TYPE_SATA1>;
+       };
+       phy4 {
+               phy-type = <PHY_TYPE_USB3_HOST1>;
+       };
+       phy5 {
+               phy-type = <PHY_TYPE_PEX2>;
+       };
+};
+
+/* CON6 on CP0 expansion */
+&cpm_pcie0 {
+       status = "okay";
+};
+
+&cpm_pcie1 {
+       status = "disabled";
 };
 
 /* CON5 on CP0 expansion */
        status = "okay";
 };
 
+&cpm_utmi0 {
+       status = "okay";
+};
+
+&cpm_utmi1 {
+       status = "okay";
+};
+
 &cps_pinctl {
        /* MPP Bus:
-        * [0-11]  RGMII0
-        * [13-16] SPI1
-        * [27,31] GE_MDIO/MDC
-        * [32-62] = 0xff: Keep default CP1_shared_pins:
+        *      [0-11]  RGMII0
+        *      [13-16] SPI1
+        *      [27,31] GE_MDIO/MDC
+        *      [28]    SATA1_PRESENT_ACTIVEn
+        *      [29-30] UART0
+        *      [32-62] = 0xff: Keep default CP1_shared_pins
         */
-               /*   0    1    2    3    4    5    6    7    8    9 */
+       /*   0    1    2    3    4    5    6    7    8    9 */
        pin-func = < 0x3  0x3  0x3  0x3  0x3  0x3  0x3  0x3  0x3  0x3
-                    0x3  0x3  0xff 0x3  0x3  0x3  0x3  0xff 0xff 0xff
-                    0xff 0xff 0xff 0xff 0xff 0xff 0xff 0x8  0xff 0xff
-                    0xff 0x8  0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
+                    0x3  0x3  0x 0x3  0x3  0x3  0x3  0xff 0xff 0xff
+                    0xff 0xff 0xff 0xff 0xff 0xff 0xff 0x8  0x9  0xa
+                    0x 0x8  0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
                     0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
                     0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
-                    0xff 0xff 0xff >;
+                    0xff 0xff 0xff>;
+};
+
+&cps_comphy {
+       /* Serdes Configuration:
+        *      Lane 0: PCIe0 (x1)
+        *      Lane 1: SATA0
+        *      Lane 2: SFI (10G)
+        *      Lane 3: SATA1
+        *      Lane 4: PCIe1 (x1)
+        *      Lane 5: PCIe2 (x1)
+        */
+       phy0 {
+               phy-type = <PHY_TYPE_PEX0>;
+       };
+       phy1 {
+               phy-type = <PHY_TYPE_SATA0>;
+       };
+       phy2 {
+               phy-type = <PHY_TYPE_SFI>;
+       };
+       phy3 {
+               phy-type = <PHY_TYPE_SATA1>;
+       };
+       phy4 {
+               phy-type = <PHY_TYPE_PEX1>;
+       };
+       phy5 {
+               phy-type = <PHY_TYPE_PEX2>;
+       };
+};
+
+/* CON6 on CP1 expansion */
+&cps_pcie0 {
+       status = "okay";
+};
+
+&cps_pcie1 {
+       status = "okay";
 };
 
 /* CON5 on CP1 expansion */
        status = "okay";
 };
 
-&cpm_comphy {
-       /*
-        * Serdes Configuration:
-        * Lane 0: SGMII2
-        * Lane 1: USB3_HOST0
-        * Lane 2: KR (10G)
-        * Lane 3: SATA1
-        * Lane 4: USB3_HOST1
-        * Lane 5: PEX2x1
-        */
-       phy0 {
-               phy-type = <PHY_TYPE_SGMII2>;
-               phy-speed = <PHY_SPEED_3_125G>;
-       };
-
-       phy1 {
-               phy-type = <PHY_TYPE_USB3_HOST0>;
-       };
-
-       phy2 {
-               phy-type = <PHY_TYPE_KR>;
-       };
-
-       phy3 {
-               phy-type = <PHY_TYPE_SATA1>;
-       };
-
-       phy4 {
-               phy-type = <PHY_TYPE_USB3_HOST1>;
-       };
-
-       phy5 {
-               phy-type = <PHY_TYPE_PEX2>;
-       };
-};
-
-&cps_comphy {
-       /*
-        * Serdes Configuration:
-        * Lane 0: SGMII2
-        * Lane 1: USB3_HOST0
-        * Lane 2: KR (10G)
-        * Lane 3: SATA1
-        * Lane 4: Unconnected
-        * Lane 5: PEX2x1
-        */
-       phy0 {
-               phy-type = <PHY_TYPE_SGMII2>;
-               phy-speed = <PHY_SPEED_3_125G>;
-       };
-
-       phy1 {
-               phy-type = <PHY_TYPE_USB3_HOST0>;
-       };
-
-       phy2 {
-               phy-type = <PHY_TYPE_KR>;
-       };
-
-       phy3 {
-               phy-type = <PHY_TYPE_SATA1>;
-       };
-
-       phy4 {
-               phy-type = <PHY_TYPE_UNCONNECTED>;
-       };
-
-       phy5 {
-               phy-type = <PHY_TYPE_PEX2>;
-       };
-};
-
-&cpm_utmi0 {
-       status = "okay";
-};
-
-&cpm_utmi1 {
-       status = "okay";
-};
-
 &cps_utmi0 {
        status = "okay";
 };
index e42b092b25085af87975c9227d571fb11161b827..991ddc0c43b83ba3f8e8ca386ff0fc3b4d32ede5 100644 (file)
@@ -99,7 +99,7 @@
         * [54] 2.5G SFP LOS
         * [55] Micro SD card detect
         * [56-61] Micro SD
-        * [62] CP1 KR SFP FAULT
+        * [62] CP1 SFI SFP FAULT
         */
                /*   0    1    2    3    4    5    6    7    8    9 */
        pin-func = < 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
         * Lane 1: PCIe0 (x4)
         * Lane 2: PCIe0 (x4)
         * Lane 3: PCIe0 (x4)
-        * Lane 4: KR (10G)
+        * Lane 4: SFI (10G)
         * Lane 5: SATA1
         */
        phy0 {
                phy-type = <PHY_TYPE_PEX0>;
        };
        phy4 {
-               phy-type = <PHY_TYPE_KR>;
+               phy-type = <PHY_TYPE_SFI>;
        };
        phy5 {
                phy-type = <PHY_TYPE_SATA1>;
 &cps_comphy {
        /*
         * CP1 Serdes Configuration:
-        * Lane 0: SGMII2
+        * Lane 0: SGMII1
         * Lane 1: SATA 0
         * Lane 2: USB HOST 0
         * Lane 3: SATA1
-        * Lane 4: KR (10G)
+        * Lane 4: SFI (10G)
         * Lane 5: SGMII3
         */
        phy0 {
-               phy-type = <PHY_TYPE_SGMII2>;
+               phy-type = <PHY_TYPE_SGMII1>;
                phy-speed = <PHY_SPEED_1_25G>;
        };
        phy1 {
                phy-type = <PHY_TYPE_SATA1>;
        };
        phy4 {
-               phy-type = <PHY_TYPE_KR>;
+               phy-type = <PHY_TYPE_SFI>;
        };
        phy5 {
                phy-type = <PHY_TYPE_SGMII3>;
index 229046fba77425486b8ba214ee4689e519e2d620..8c336f2c38fd0ba0277c4a9e4b3f38c35af3de92 100644 (file)
                                reg = <0x580000 0x1000>,        /* utmi-unit */
                                      <0x440420 0x4>,           /* usb-cfg */
                                      <0x440440 0x4>;           /* utmi-cfg */
-                               utmi-port = <UTMI_PHY_TO_USB_HOST0>;
+                               utmi-port = <UTMI_PHY_TO_USB3_HOST0>;
                                status = "disabled";
                        };
 
                                reg = <0x581000 0x1000>,        /* utmi-unit */
                                      <0x440420 0x4>,           /* usb-cfg */
                                      <0x440444 0x4>;           /* utmi-cfg */
-                               utmi-port = <UTMI_PHY_TO_USB_HOST1>;
+                               utmi-port = <UTMI_PHY_TO_USB3_HOST1>;
                                status = "disabled";
                        };
 
                                dma-coherent;
                                status = "disabled";
                        };
+
+                       cpm_nand: nand@720000 {
+                               compatible = "marvell,mvebu-pxa3xx-nand";
+                               reg = <0x720000 0x100>;
+                               #address-cells = <1>;
+
+                               clocks = <&cpm_syscon0 1 2>;
+                               nand-enable-arbiter;
+                               num-cs = <1>;
+                               nand-ecc-strength = <4>;
+                               nand-ecc-step-size = <512>;
+                               status = "disabled";
+                       };
+
                };
 
                cpm_pcie0: pcie@f2600000 {
index 58763914496f8832cd13388648be10642080af5d..0cdb3d3ae3d67ef0bef154448a5ab981e67c4009 100644 (file)
                                reg = <0x580000 0x1000>,        /* utmi-unit */
                                      <0x440420 0x4>,           /* usb-cfg */
                                      <0x440440 0x4>;           /* utmi-cfg */
-                               utmi-port = <UTMI_PHY_TO_USB_HOST0>;
+                               utmi-port = <UTMI_PHY_TO_USB3_HOST0>;
                                status = "disabled";
                        };
                };
index 37094376b9b6c9d5f17018ef606c8743692788ee..3e624f142c6542f14b0b50e4dc0b46f1d13c9498 100644 (file)
@@ -7,6 +7,7 @@
        compatible = "atmel,sama5d2-xplained", "atmel,sama5d2", "atmel,sama5";
 
        chosen {
+               u-boot,dm-pre-reloc;
                stdout-path = &uart1;
        };
 
@@ -28,6 +29,7 @@
                        pinctrl-names = "default";
                        pinctrl-0 = <&pinctrl_sdmmc0_cmd_dat_default &pinctrl_sdmmc0_ck_cd_default>;
                        status = "okay";
+                       u-boot,dm-pre-reloc;
                };
 
                sdmmc1: sdio-host@b0000000 {
@@ -35,6 +37,7 @@
                        pinctrl-names = "default";
                        pinctrl-0 = <&pinctrl_sdmmc1_cmd_dat_default &pinctrl_sdmmc1_ck_cd_default>;
                        status = "okay"; /* conflict with qspi0 */
+                       u-boot,dm-pre-reloc;
                };
 
                apb {
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_spi0_default>;
                                status = "okay";
+                               u-boot,dm-pre-reloc;
 
                                spi_flash@0 {
                                        compatible = "spi-flash";
                                        reg = <0>;
                                        spi-max-frequency = <50000000>;
+                                       u-boot,dm-pre-reloc;
                                };
                        };
 
@@ -90,6 +95,7 @@
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_uart1_default>;
                                status = "okay";
+                               u-boot,dm-pre-reloc;
                        };
 
                        i2c1: i2c@fc028000 {
                                                         <PIN_PA8__SDMMC0_DAT6>,
                                                         <PIN_PA9__SDMMC0_DAT7>;
                                                bias-pull-up;
+                                               u-boot,dm-pre-reloc;
                                        };
 
                                        pinctrl_sdmmc0_ck_cd_default: sdmmc0_ck_cd_default {
                                                         <PIN_PA11__SDMMC0_VDDSEL>,
                                                         <PIN_PA13__SDMMC0_CD>;
                                                bias-disable;
+                                               u-boot,dm-pre-reloc;
                                        };
 
                                        pinctrl_sdmmc1_cmd_dat_default: sdmmc1_cmd_dat_default {
                                                         <PIN_PA20__SDMMC1_DAT2>,
                                                         <PIN_PA21__SDMMC1_DAT3>;
                                                bias-pull-up;
+                                               u-boot,dm-pre-reloc;
                                        };
 
                                        pinctrl_sdmmc1_ck_cd_default: sdmmc1_ck_cd_default {
                                                pinmux = <PIN_PA22__SDMMC1_CK>,
                                                         <PIN_PA30__SDMMC1_CD>;
                                                bias-disable;
+                                               u-boot,dm-pre-reloc;
                                        };
 
                                        pinctrl_spi0_default: spi0_default {
                                                         <PIN_PA15__SPI0_MOSI>,
                                                         <PIN_PA16__SPI0_MISO>;
                                                bias-disable;
+                                               u-boot,dm-pre-reloc;
                                        };
 
                                        pinctrl_uart1_default: uart1_default {
                                                pinmux = <PIN_PD2__URXD1>,
                                                         <PIN_PD3__UTXD1>;
                                                bias-disable;
+                                               u-boot,dm-pre-reloc;
                                        };
 
                                        pinctrl_usb_default: usb_default {
index d4884dd1c24394c6e5ac630164f8940742758a6e..0f25e336dab527fdcf7d0e8688b94b758c092cf3 100644 (file)
                #address-cells = <1>;
                #size-cells = <1>;
                ranges;
+               u-boot,dm-pre-reloc;
 
                apb {
                        compatible = "simple-bus";
                        #address-cells = <1>;
                        #size-cells = <1>;
                        ranges;
+                       u-boot,dm-pre-reloc;
 
                        aic: interrupt-controller@fffff000 {
                                #interrupt-cells = <3>;
                                #address-cells = <1>;
                                #size-cells = <0>;
                                #interrupt-cells = <1>;
+                               u-boot,dm-pre-reloc;
 
                                main_osc: main_osc {
                                        compatible = "atmel,at91rm9200-clk-main-osc";
                                        clocks = <&slow_rc_osc>, <&slow_xtal>;
                                };
 
-                               plla: pllack {
+                               plla: pllack@0 {
                                        compatible = "atmel,at91rm9200-clk-pll";
                                        #clock-cells = <0>;
                                        interrupts-extended = <&pmc AT91_PMC_LOCKA>;
                                                                <150000000 240000000 2 1>;
                                };
 
-                               pllb: pllbck {
+                               pllb: pllbck@1 {
                                        compatible = "atmel,at91rm9200-clk-pll";
                                        #clock-cells = <0>;
                                        interrupts-extended = <&pmc AT91_PMC_LOCKB>;
                                        clocks = <&clk32k>, <&main>, <&plla>, <&pllb>;
                                        atmel,clk-output-range = <0 105000000>;
                                        atmel,clk-divisors = <1 2 4 0>;
+                                       u-boot,dm-pre-reloc;
                                };
 
                                usb: usbck {
                                        interrupt-parent = <&pmc>;
                                        clocks = <&clk32k>, <&main>, <&plla>, <&pllb>;
 
-                                       prog0: prog0 {
+                                       prog0: prog@0 {
                                                #clock-cells = <0>;
                                                reg = <0>;
                                                interrupts = <AT91_PMC_PCKRDY(0)>;
                                        };
 
-                                       prog1: prog1 {
+                                       prog1: prog@1 {
                                                #clock-cells = <0>;
                                                reg = <1>;
                                                interrupts = <AT91_PMC_PCKRDY(1)>;
                                        #address-cells = <1>;
                                        #size-cells = <0>;
 
-                                       uhpck: uhpck {
+                                       uhpck: uhpck@6 {
                                                #clock-cells = <0>;
                                                reg = <6>;
                                                clocks = <&usb>;
                                        };
 
-                                       udpck: udpck {
+                                       udpck: udpck@7 {
                                                #clock-cells = <0>;
                                                reg = <7>;
                                                clocks = <&usb>;
                                        };
 
-                                       pck0: pck0 {
+                                       pck0: pck0@8 {
                                                #clock-cells = <0>;
                                                reg = <8>;
                                                clocks = <&prog0>;
                                        };
 
-                                       pck1: pck1 {
+                                       pck1: pck1@9 {
                                                #clock-cells = <0>;
                                                reg = <9>;
                                                clocks = <&prog1>;
                                        #address-cells = <1>;
                                        #size-cells = <0>;
                                        clocks = <&mck>;
+                                       u-boot,dm-pre-reloc;
 
-                                       pioA_clk: pioA_clk {
+                                       pioA_clk: pioA_clk@2 {
                                                #clock-cells = <0>;
                                                reg = <2>;
+                                               u-boot,dm-pre-reloc;
                                        };
 
-                                       pioB_clk: pioB_clk {
+                                       pioB_clk: pioB_clk@3 {
                                                #clock-cells = <0>;
                                                reg = <3>;
+                                               u-boot,dm-pre-reloc;
                                        };
 
-                                       pioC_clk: pioC_clk {
+                                       pioC_clk: pioC_clk@4 {
                                                #clock-cells = <0>;
                                                reg = <4>;
+                                               u-boot,dm-pre-reloc;
                                        };
 
-                                       adc_clk: adc_clk {
+                                       adc_clk: adc_clk@5 {
                                                #clock-cells = <0>;
                                                reg = <5>;
                                        };
 
-                                       usart0_clk: usart0_clk {
+                                       usart0_clk: usart0_clk@6 {
                                                #clock-cells = <0>;
                                                reg = <6>;
                                        };
 
-                                       usart1_clk: usart1_clk {
+                                       usart1_clk: usart1_clk@7 {
                                                #clock-cells = <0>;
                                                reg = <7>;
                                        };
 
-                                       usart2_clk: usart2_clk {
+                                       usart2_clk: usart2_clk@8 {
                                                #clock-cells = <0>;
                                                reg = <8>;
                                        };
 
-                                       mci0_clk: mci0_clk {
+                                       mci0_clk: mci0_clk@9 {
                                                #clock-cells = <0>;
                                                reg = <9>;
                                        };
 
-                                       udc_clk: udc_clk {
+                                       udc_clk: udc_clk@10 {
                                                #clock-cells = <0>;
                                                reg = <10>;
                                        };
 
-                                       twi0_clk: twi0_clk {
+                                       twi0_clk: twi0_clk@11 {
                                                reg = <11>;
                                                #clock-cells = <0>;
                                        };
 
-                                       spi0_clk: spi0_clk {
+                                       spi0_clk: spi0_clk@12 {
                                                #clock-cells = <0>;
                                                reg = <12>;
                                        };
 
-                                       spi1_clk: spi1_clk {
+                                       spi1_clk: spi1_clk@13 {
                                                #clock-cells = <0>;
                                                reg = <13>;
                                        };
 
-                                       ssc0_clk: ssc0_clk {
+                                       ssc0_clk: ssc0_clk@14 {
                                                #clock-cells = <0>;
                                                reg = <14>;
                                        };
 
-                                       tc0_clk: tc0_clk {
+                                       tc0_clk: tc0_clk@17 {
                                                #clock-cells = <0>;
                                                reg = <17>;
                                        };
 
-                                       tc1_clk: tc1_clk {
+                                       tc1_clk: tc1_clk@18 {
                                                #clock-cells = <0>;
                                                reg = <18>;
                                        };
 
-                                       tc2_clk: tc2_clk {
+                                       tc2_clk: tc2_clk@19 {
                                                #clock-cells = <0>;
                                                reg = <19>;
                                        };
 
-                                       ohci_clk: ohci_clk {
+                                       ohci_clk: ohci_clk@20 {
                                                #clock-cells = <0>;
                                                reg = <20>;
                                        };
 
-                                       macb0_clk: macb0_clk {
+                                       macb0_clk: macb0_clk@21 {
                                                #clock-cells = <0>;
                                                reg = <21>;
                                        };
 
-                                       isi_clk: isi_clk {
+                                       isi_clk: isi_clk@22 {
                                                #clock-cells = <0>;
                                                reg = <22>;
                                        };
 
-                                       usart3_clk: usart3_clk {
+                                       usart3_clk: usart3_clk@23 {
                                                #clock-cells = <0>;
                                                reg = <23>;
                                        };
 
-                                       uart0_clk: uart0_clk {
+                                       uart0_clk: uart0_clk@24 {
                                                #clock-cells = <0>;
                                                reg = <24>;
                                        };
 
-                                       uart1_clk: uart1_clk {
+                                       uart1_clk: uart1_clk@25 {
                                                #clock-cells = <0>;
                                                reg = <25>;
                                        };
 
-                                       tc3_clk: tc3_clk {
+                                       tc3_clk: tc3_clk@26 {
                                                #clock-cells = <0>;
                                                reg = <26>;
                                        };
 
-                                       tc4_clk: tc4_clk {
+                                       tc4_clk: tc4_clk@27 {
                                                #clock-cells = <0>;
                                                reg = <27>;
                                        };
 
-                                       tc5_clk: tc5_clk {
+                                       tc5_clk: tc5_clk@28 {
                                                #clock-cells = <0>;
                                                reg = <28>;
                                        };
                                clock-names = "t0_clk", "t1_clk", "t2_clk", "slow_clk";
                        };
 
+                       pioA: gpio@fffff400 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff400 0x200>;
+                               interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioA_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       pioB: gpio@fffff600 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff600 0x200>;
+                               interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioB_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       pioC: gpio@fffff800 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff800 0x200>;
+                               interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioC_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
+
                        pinctrl@fffff400 {
                                #address-cells = <1>;
                                #size-cells = <1>;
                                compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
                                ranges = <0xfffff400 0xfffff400 0x600>;
+                               reg = <0xfffff400 0x200         /* pioA */
+                                      0xfffff600 0x200         /* pioB */
+                                      0xfffff800 0x200         /* pioC */
+                                     >;
 
                                atmel,mux-mask = <
                                      /*    A         B     */
                                       0xffffffff 0x7fff3ccf  /* pioB */
                                       0xffffffff 0x007fffff  /* pioC */
                                      >;
+                               u-boot,dm-pre-reloc;
 
                                /* shared pinctrl settings */
                                dbgu {
+                                       u-boot,dm-pre-reloc;
                                        pinctrl_dbgu: dbgu-0 {
                                                atmel,pins =
                                                        <AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB14 periph A */
                                                atmel,pins = <AT91_PIOB 19 AT91_PERIPH_B AT91_PINCTRL_NONE>;
                                        };
                                };
-
-                               pioA: gpio@fffff400 {
-                                       compatible = "atmel,at91rm9200-gpio";
-                                       reg = <0xfffff400 0x200>;
-                                       interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
-                                       #gpio-cells = <2>;
-                                       gpio-controller;
-                                       interrupt-controller;
-                                       #interrupt-cells = <2>;
-                                       clocks = <&pioA_clk>;
-                               };
-
-                               pioB: gpio@fffff600 {
-                                       compatible = "atmel,at91rm9200-gpio";
-                                       reg = <0xfffff600 0x200>;
-                                       interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
-                                       #gpio-cells = <2>;
-                                       gpio-controller;
-                                       interrupt-controller;
-                                       #interrupt-cells = <2>;
-                                       clocks = <&pioB_clk>;
-                               };
-
-                               pioC: gpio@fffff800 {
-                                       compatible = "atmel,at91rm9200-gpio";
-                                       reg = <0xfffff800 0x200>;
-                                       interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
-                                       #gpio-cells = <2>;
-                                       gpio-controller;
-                                       interrupt-controller;
-                                       #interrupt-cells = <2>;
-                                       clocks = <&pioC_clk>;
-                               };
                        };
 
                        dbgu: serial@fffff200 {
diff --git a/arch/arm/dts/at91sam9260ek.dts b/arch/arm/dts/at91sam9260ek.dts
new file mode 100644 (file)
index 0000000..086c8ea
--- /dev/null
@@ -0,0 +1,215 @@
+/*
+ * Device Tree file for Atmel at91sam9260 Evaluation Kit
+ *
+ *  Copyright (C) 2016 Atmel,
+ *               2016 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+/dts-v1/;
+#include "at91sam9260.dtsi"
+
+/ {
+       model = "Atmel at91sam9260ek";
+       compatible = "atmel,at91sam9260ek", "atmel,at91sam9260", "atmel,at91sam9";
+
+       chosen {
+               u-boot,dm-pre-reloc;
+               stdout-path = &dbgu;
+       };
+
+       memory {
+               reg = <0x20000000 0x4000000>;
+       };
+
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <18432000>;
+               };
+       };
+
+       ahb {
+               apb {
+                       usb1: gadget@fffa4000 {
+                               atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
+                               status = "okay";
+                       };
+
+                       mmc0: mmc@fffa8000 {
+                               pinctrl-0 = <
+                                       &pinctrl_board_mmc0_slot1
+                                       &pinctrl_mmc0_clk
+                                       &pinctrl_mmc0_slot1_cmd_dat0
+                                       &pinctrl_mmc0_slot1_dat1_3>;
+                               status = "okay";
+                               slot@1 {
+                                       reg = <1>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioC 9 GPIO_ACTIVE_HIGH>;
+                               };
+                       };
+
+                       usart0: serial@fffb0000 {
+                               pinctrl-0 =
+                                       <&pinctrl_usart0
+                                        &pinctrl_usart0_rts
+                                        &pinctrl_usart0_cts
+                                        &pinctrl_usart0_dtr_dsr
+                                        &pinctrl_usart0_dcd
+                                        &pinctrl_usart0_ri>;
+                               status = "okay";
+                       };
+
+                       usart1: serial@fffb4000 {
+                               status = "okay";
+                       };
+
+                       ssc0: ssc@fffbc000 {
+                               status = "okay";
+                               pinctrl-0 = <&pinctrl_ssc0_tx>;
+                       };
+
+                       macb0: ethernet@fffc4000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+                       };
+
+                       spi0: spi@fffc8000 {
+                               cs-gpios = <0>, <&pioC 11 0>, <0>, <0>;
+                               mtd_dataflash@0 {
+                                       compatible = "atmel,at45", "atmel,dataflash";
+                                       spi-max-frequency = <50000000>;
+                                       reg = <1>;
+                               };
+                       };
+
+                       dbgu: serial@fffff200 {
+                               u-boot,dm-pre-reloc;
+                               status = "okay";
+                       };
+
+                       pinctrl@fffff400 {
+                               board {
+                                       pinctrl_board_mmc0_slot1: mmc0_slot1-board {
+                                               atmel,pins =
+                                                       <AT91_PIOC 9 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+                                       };
+                               };
+                       };
+
+                       shdwc@fffffd10 {
+                               atmel,wakeup-counter = <10>;
+                               atmel,wakeup-rtt-timer;
+                       };
+
+                       rtc@fffffd20 {
+                               atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
+                               status = "okay";
+                       };
+
+                       watchdog@fffffd40 {
+                               status = "okay";
+                       };
+
+                       gpbr: syscon@fffffd50 {
+                               status = "okay";
+                       };
+               };
+
+               usb0: ohci@00500000 {
+                       num-ports = <2>;
+                       status = "okay";
+               };
+
+               nand0: nand@40000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "soft";
+                       nand-on-flash-bbt;
+                       status = "okay";
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+
+               btn3 {
+                       label = "Button 3";
+                       gpios = <&pioA 30 GPIO_ACTIVE_LOW>;
+                       linux,code = <0x103>;
+                       wakeup-source;
+               };
+
+               btn4 {
+                       label = "Button 4";
+                       gpios = <&pioA 31 GPIO_ACTIVE_LOW>;
+                       linux,code = <0x104>;
+                       wakeup-source;
+               };
+       };
+
+       i2c-gpio-0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "okay";
+
+               24c512@50 {
+                       compatible = "24c512";
+                       reg = <0x50>;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               ds1 {
+                       label = "ds1";
+                       gpios = <&pioA 9 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+               };
+
+               ds5 {
+                       label = "ds5";
+                       gpios = <&pioA 6 GPIO_ACTIVE_LOW>;
+               };
+       };
+};
index 93446420af258d795b874efde5b522aac1ab3e1a..e899fd3f6a76f063c465b92c6f30e11867d08bb0 100644 (file)
                #address-cells = <1>;
                #size-cells = <1>;
                ranges;
+               u-boot,dm-pre-reloc;
 
                apb {
                        compatible = "simple-bus";
                        #address-cells = <1>;
                        #size-cells = <1>;
                        ranges;
+                       u-boot,dm-pre-reloc;
 
                        aic: interrupt-controller@fffff000 {
                                #interrupt-cells = <3>;
                                #address-cells = <1>;
                                #size-cells = <0>;
                                #interrupt-cells = <1>;
+                               u-boot,dm-pre-reloc;
 
                                main_osc: main_osc {
                                        compatible = "atmel,at91rm9200-clk-main-osc";
                                        clocks = <&main_osc>;
                                };
 
-                               plla: pllack {
+                               plla: pllack@0 {
                                        compatible = "atmel,at91rm9200-clk-pll";
                                        #clock-cells = <0>;
                                        interrupts-extended = <&pmc AT91_PMC_LOCKA>;
                                                                <190000000 240000000 2 1>;
                                };
 
-                               pllb: pllbck {
+                               pllb: pllbck@1 {
                                        compatible = "atmel,at91rm9200-clk-pll";
                                        #clock-cells = <0>;
                                        interrupts-extended = <&pmc AT91_PMC_LOCKB>;
                                        clocks = <&slow_xtal>, <&main>, <&plla>, <&pllb>;
                                        atmel,clk-output-range = <0 120000000>;
                                        atmel,clk-divisors = <1 2 4 0>;
+                                       u-boot,dm-pre-reloc;
                                };
 
                                usb: usbck {
                                        interrupt-parent = <&pmc>;
                                        clocks = <&slow_xtal>, <&main>, <&plla>, <&pllb>;
 
-                                       prog0: prog0 {
+                                       prog0: prog@0 {
                                                #clock-cells = <0>;
                                                reg = <0>;
                                                interrupts = <AT91_PMC_PCKRDY(0)>;
                                        };
 
-                                       prog1: prog1 {
+                                       prog1: prog@1 {
                                                #clock-cells = <0>;
                                                reg = <1>;
                                                interrupts = <AT91_PMC_PCKRDY(1)>;
                                        };
 
-                                       prog2: prog2 {
+                                       prog2: prog@2 {
                                                #clock-cells = <0>;
                                                reg = <2>;
                                                interrupts = <AT91_PMC_PCKRDY(2)>;
                                        };
 
-                                       prog3: prog3 {
+                                       prog3: prog@3 {
                                                #clock-cells = <0>;
                                                reg = <3>;
                                                interrupts = <AT91_PMC_PCKRDY(3)>;
                                        #address-cells = <1>;
                                        #size-cells = <0>;
 
-                                       uhpck: uhpck {
+                                       uhpck: uhpck@6 {
                                                #clock-cells = <0>;
                                                reg = <6>;
                                                clocks = <&usb>;
                                        };
 
-                                       udpck: udpck {
+                                       udpck: udpck@7 {
                                                #clock-cells = <0>;
                                                reg = <7>;
                                                clocks = <&usb>;
                                        };
 
-                                       pck0: pck0 {
+                                       pck0: pck0@8 {
                                                #clock-cells = <0>;
                                                reg = <8>;
                                                clocks = <&prog0>;
                                        };
 
-                                       pck1: pck1 {
+                                       pck1: pck1@9 {
                                                #clock-cells = <0>;
                                                reg = <9>;
                                                clocks = <&prog1>;
                                        };
 
-                                       pck2: pck2 {
+                                       pck2: pck2@10 {
                                                #clock-cells = <0>;
                                                reg = <10>;
                                                clocks = <&prog2>;
                                        };
 
-                                       pck3: pck3 {
+                                       pck3: pck3@11 {
                                                #clock-cells = <0>;
                                                reg = <11>;
                                                clocks = <&prog3>;
                                        #address-cells = <1>;
                                        #size-cells = <0>;
                                        clocks = <&mck>;
+                                       u-boot,dm-pre-reloc;
 
-                                       pioA_clk: pioA_clk {
+                                       pioA_clk: pioA_clk@2 {
                                                #clock-cells = <0>;
                                                reg = <2>;
+                                               u-boot,dm-pre-reloc;
                                        };
 
-                                       pioB_clk: pioB_clk {
+                                       pioB_clk: pioB_clk@3 {
                                                #clock-cells = <0>;
                                                reg = <3>;
+                                               u-boot,dm-pre-reloc;
                                        };
 
-                                       pioCDE_clk: pioCDE_clk {
+                                       pioCDE_clk: pioCDE_clk@4 {
                                                #clock-cells = <0>;
                                                reg = <4>;
+                                               u-boot,dm-pre-reloc;
                                        };
 
-                                       usart0_clk: usart0_clk {
+                                       usart0_clk: usart0_clk@7 {
                                                #clock-cells = <0>;
                                                reg = <7>;
                                        };
 
-                                       usart1_clk: usart1_clk {
+                                       usart1_clk: usart1_clk@8 {
                                                #clock-cells = <0>;
                                                reg = <8>;
                                        };
 
-                                       usart2_clk: usart2_clk {
+                                       usart2_clk: usart2_clk@9 {
                                                #clock-cells = <0>;
                                                reg = <9>;
                                        };
 
-                                       mci0_clk: mci0_clk {
+                                       mci0_clk: mci0_clk@10 {
                                                #clock-cells = <0>;
                                                reg = <10>;
                                        };
 
-                                       mci1_clk: mci1_clk {
+                                       mci1_clk: mci1_clk@11 {
                                                #clock-cells = <0>;
                                                reg = <11>;
                                        };
 
-                                       can_clk: can_clk {
+                                       can_clk: can_clk@12 {
                                                #clock-cells = <0>;
                                                reg = <12>;
                                        };
 
-                                       twi0_clk: twi0_clk {
+                                       twi0_clk: twi0_clk@13 {
                                                #clock-cells = <0>;
                                                reg = <13>;
                                        };
 
-                                       spi0_clk: spi0_clk {
+                                       spi0_clk: spi0_clk@14 {
                                                #clock-cells = <0>;
                                                reg = <14>;
                                        };
 
-                                       spi1_clk: spi1_clk {
+                                       spi1_clk: spi1_clk@15 {
                                                #clock-cells = <0>;
                                                reg = <15>;
                                        };
 
-                                       ssc0_clk: ssc0_clk {
+                                       ssc0_clk: ssc0_clk@16 {
                                                #clock-cells = <0>;
                                                reg = <16>;
                                        };
 
-                                       ssc1_clk: ssc1_clk {
+                                       ssc1_clk: ssc1_clk@17 {
                                                #clock-cells = <0>;
                                                reg = <17>;
                                        };
 
-                                       ac97_clk: ac97_clk {
+                                       ac97_clk: ac97_clk@18 {
                                                #clock-cells = <0>;
                                                reg = <18>;
                                        };
 
-                                       tcb_clk: tcb_clk {
+                                       tcb_clk: tcb_clk@19 {
                                                #clock-cells = <0>;
                                                reg = <19>;
                                        };
 
-                                       pwm_clk: pwm_clk {
+                                       pwm_clk: pwm_clk@20 {
                                                #clock-cells = <0>;
                                                reg = <20>;
                                        };
 
-                                       macb0_clk: macb0_clk {
+                                       macb0_clk: macb0_clk@21 {
                                                #clock-cells = <0>;
                                                reg = <21>;
                                        };
 
-                                       g2de_clk: g2de_clk {
+                                       g2de_clk: g2de_clk@23 {
                                                #clock-cells = <0>;
                                                reg = <23>;
                                        };
 
-                                       udc_clk: udc_clk {
+                                       udc_clk: udc_clk@24 {
                                                #clock-cells = <0>;
                                                reg = <24>;
                                        };
 
-                                       isi_clk: isi_clk {
+                                       isi_clk: isi_clk@25 {
                                                #clock-cells = <0>;
                                                reg = <25>;
                                        };
 
-                                       lcd_clk: lcd_clk {
+                                       lcd_clk: lcd_clk@26 {
                                                #clock-cells = <0>;
                                                reg = <26>;
                                        };
 
-                                       dma_clk: dma_clk {
+                                       dma_clk: dma_clk@27 {
                                                #clock-cells = <0>;
                                                reg = <27>;
                                        };
 
-                                       ohci_clk: ohci_clk {
+                                       ohci_clk: ohci_clk@29 {
                                                #clock-cells = <0>;
                                                reg = <29>;
                                        };
                                #size-cells = <1>;
                                compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
                                ranges = <0xfffff200 0xfffff200 0xa00>;
+                               reg = <0xfffff200 0x200
+                                      0xfffff400 0x200
+                                      0xfffff600 0x200
+                                      0xfffff800 0x200
+                                      0xfffffa00 0x200
+                                     >;
 
                                atmel,mux-mask = <
                                      /*    A         B     */
                                dbgu {
                                        pinctrl_dbgu: dbgu-0 {
                                                atmel,pins =
-                                                       <AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC30 periph A */
-                                                        AT91_PIOC 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PC31 periph with pullup */
+                                                       <AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
+                                                        AT91_PIOC 31 AT91_PERIPH_A AT91_PINCTRL_NONE>;
                                        };
                                };
 
                                        };
                                };
 
-                               pioA: gpio@fffff200 {
-                                       compatible = "atmel,at91rm9200-gpio";
-                                       reg = <0xfffff200 0x200>;
-                                       interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
-                                       #gpio-cells = <2>;
-                                       gpio-controller;
-                                       interrupt-controller;
-                                       #interrupt-cells = <2>;
-                                       clocks = <&pioA_clk>;
-                               };
+                       };
 
-                               pioB: gpio@fffff400 {
-                                       compatible = "atmel,at91rm9200-gpio";
-                                       reg = <0xfffff400 0x200>;
-                                       interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
-                                       #gpio-cells = <2>;
-                                       gpio-controller;
-                                       interrupt-controller;
-                                       #interrupt-cells = <2>;
-                                       clocks = <&pioB_clk>;
-                               };
+                       pioA: gpio@fffff200 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff200 0x200>;
+                               interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioA_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
 
-                               pioC: gpio@fffff600 {
-                                       compatible = "atmel,at91rm9200-gpio";
-                                       reg = <0xfffff600 0x200>;
-                                       interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
-                                       #gpio-cells = <2>;
-                                       gpio-controller;
-                                       interrupt-controller;
-                                       #interrupt-cells = <2>;
-                                       clocks = <&pioCDE_clk>;
-                               };
+                       pioB: gpio@fffff400 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff400 0x200>;
+                               interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioB_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
 
-                               pioD: gpio@fffff800 {
-                                       compatible = "atmel,at91rm9200-gpio";
-                                       reg = <0xfffff800 0x200>;
-                                       interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
-                                       #gpio-cells = <2>;
-                                       gpio-controller;
-                                       interrupt-controller;
-                                       #interrupt-cells = <2>;
-                                       clocks = <&pioCDE_clk>;
-                               };
+                       pioC: gpio@fffff600 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff600 0x200>;
+                               interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioCDE_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
 
-                               pioE: gpio@fffffa00 {
-                                       compatible = "atmel,at91rm9200-gpio";
-                                       reg = <0xfffffa00 0x200>;
-                                       interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
-                                       #gpio-cells = <2>;
-                                       gpio-controller;
-                                       interrupt-controller;
-                                       #interrupt-cells = <2>;
-                                       clocks = <&pioCDE_clk>;
-                               };
+                       pioD: gpio@fffff800 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff800 0x200>;
+                               interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioCDE_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       pioE: gpio@fffffa00 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffffa00 0x200>;
+                               interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioCDE_clk>;
+                               u-boot,dm-pre-reloc;
                        };
 
                        dbgu: serial@ffffee00 {
                };
        };
 
-       i2c@0 {
+       i2c-gpio-0 {
                compatible = "i2c-gpio";
                gpios = <&pioB 4 GPIO_ACTIVE_HIGH /* sda */
                         &pioB 5 GPIO_ACTIVE_HIGH /* scl */
diff --git a/arch/arm/dts/at91sam9263ek.dts b/arch/arm/dts/at91sam9263ek.dts
new file mode 100644 (file)
index 0000000..8cd7fad
--- /dev/null
@@ -0,0 +1,229 @@
+/*
+ * at91sam9263ek.dts - Device Tree file for Atmel at91sam9263 reference board
+ *
+ *  Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2 only
+ */
+/dts-v1/;
+#include "at91sam9263.dtsi"
+
+/ {
+       model = "Atmel at91sam9263ek";
+       compatible = "atmel,at91sam9263ek", "atmel,at91sam9263", "atmel,at91sam9";
+
+       chosen {
+               bootargs = "mem=64M root=/dev/mtdblock5 rw rootfstype=ubifs";
+               stdout-path = "serial0:115200n8";
+               u-boot,dm-pre-reloc;
+       };
+
+       memory {
+               reg = <0x20000000 0x4000000>;
+       };
+
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <16367660>;
+               };
+       };
+
+       ahb {
+               apb {
+                       dbgu: serial@ffffee00 {
+                               u-boot,dm-pre-reloc;
+                               status = "okay";
+                       };
+
+                       usart0: serial@fff8c000 {
+                               pinctrl-0 = <
+                                       &pinctrl_usart0
+                                       &pinctrl_usart0_rts
+                                       &pinctrl_usart0_cts>;
+                               status = "okay";
+                       };
+
+                       macb0: ethernet@fffbc000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+                       };
+
+                       usb1: gadget@fff78000 {
+                               atmel,vbus-gpio = <&pioA 25 GPIO_ACTIVE_HIGH>;
+                               status = "okay";
+                       };
+
+                       mmc0: mmc@fff80000 {
+                               pinctrl-0 = <
+                                       &pinctrl_board_mmc0
+                                       &pinctrl_mmc0_clk
+                                       &pinctrl_mmc0_slot0_cmd_dat0
+                                       &pinctrl_mmc0_slot0_dat1_3>;
+                               status = "okay";
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioE 18 GPIO_ACTIVE_HIGH>;
+                                       wp-gpios = <&pioE 19 GPIO_ACTIVE_HIGH>;
+                               };
+                       };
+
+                       pinctrl@fffff200 {
+                               mmc0 {
+                                       pinctrl_board_mmc0: mmc0-board {
+                                               atmel,pins =
+                                                       <AT91_PIOE 18 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH    /* PE18 gpio CD pin pull up and deglitch */
+                                                        AT91_PIOE 19 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;   /* PE19 gpio WP pin pull up */
+                                       };
+                               };
+                       };
+
+                       spi0: spi@fffa4000 {
+                               status = "okay";
+                               cs-gpios = <&pioA 5 0>, <0>, <0>, <0>;
+                               mtd_dataflash@0 {
+                                       compatible = "atmel,at45", "atmel,dataflash";
+                                       spi-max-frequency = <50000000>;
+                                       reg = <0>;
+                               };
+                       };
+
+                       watchdog@fffffd40 {
+                               status = "okay";
+                       };
+               };
+
+               fb0: fb@0x00700000 {
+                       display = <&display0>;
+                       status = "okay";
+
+                       display0: display {
+                               bits-per-pixel = <16>;
+                               atmel,lcdcon-backlight;
+                               atmel,dmacon = <0x1>;
+                               atmel,lcdcon2 = <0x80008002>;
+                               atmel,guard-time = <1>;
+
+                               display-timings {
+                                       native-mode = <&timing0>;
+                                       timing0: timing0 {
+                                               clock-frequency = <4965000>;
+                                               hactive = <240>;
+                                               vactive = <320>;
+                                               hback-porch = <1>;
+                                               hfront-porch = <33>;
+                                               vback-porch = <1>;
+                                               vfront-porch = <0>;
+                                               hsync-len = <5>;
+                                               vsync-len = <1>;
+                                               hsync-active = <1>;
+                                               vsync-active = <1>;
+                                       };
+                               };
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "soft";
+                       nand-on-flash-bbt = <1>;
+                       status = "okay";
+
+                       at91bootstrap@0 {
+                               label = "at91bootstrap";
+                               reg = <0x0 0x20000>;
+                       };
+
+                       barebox@20000 {
+                               label = "barebox";
+                               reg = <0x20000 0x40000>;
+                       };
+
+                       bareboxenv@60000 {
+                               label = "bareboxenv";
+                               reg = <0x60000 0x20000>;
+                       };
+
+                       bareboxenv2@80000 {
+                               label = "bareboxenv2";
+                               reg = <0x80000 0x20000>;
+                       };
+
+                       oftree@80000 {
+                               label = "oftree";
+                               reg = <0xa0000 0x20000>;
+                       };
+
+                       kernel@a0000 {
+                               label = "kernel";
+                               reg = <0xc0000 0x400000>;
+                       };
+
+                       rootfs@4a0000 {
+                               label = "rootfs";
+                               reg = <0x4c0000 0x7800000>;
+                       };
+
+                       data@7ca0000 {
+                               label = "data";
+                               reg = <0x7cc0000 0x8340000>;
+                       };
+               };
+
+               usb0: ohci@00a00000 {
+                       num-ports = <2>;
+                       status = "okay";
+                       atmel,vbus-gpio = <&pioA 24 GPIO_ACTIVE_HIGH
+                                          &pioA 21 GPIO_ACTIVE_HIGH
+                                         >;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               d3 {
+                       label = "d3";
+                       gpios = <&pioB 7 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+               };
+
+               d2 {
+                       label = "d2";
+                       gpios = <&pioC 29 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "nand-disk";
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+
+               left_click {
+                       label = "left_click";
+                       gpios = <&pioC 5 GPIO_ACTIVE_LOW>;
+                       linux,code = <272>;
+                       wakeup-source;
+               };
+
+               right_click {
+                       label = "right_click";
+                       gpios = <&pioC 4 GPIO_ACTIVE_LOW>;
+                       linux,code = <273>;
+                       wakeup-source;
+               };
+       };
+
+       i2c-gpio-0 {
+               status = "okay";
+
+               24c512@50 {
+                       compatible = "24c512";
+                       reg = <0x50>;
+                       pagesize = <128>;
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9g15.dtsi b/arch/arm/dts/at91sam9g15.dtsi
new file mode 100644 (file)
index 0000000..27de7dc
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * at91sam9g15.dtsi - Device Tree Include file for AT91SAM9G15 SoC
+ *
+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include "at91sam9x5.dtsi"
+#include "at91sam9x5_lcd.dtsi"
+
+/ {
+       model = "Atmel AT91SAM9G15 SoC";
+       compatible = "atmel,at91sam9g15", "atmel,at91sam9x5";
+
+       ahb {
+               apb {
+                       pinctrl@fffff400 {
+                               atmel,mux-mask = <
+                                     /*    A         B          C     */
+                                      0xffffffff 0xffe0399f 0x00000000  /* pioA */
+                                      0x00040000 0x00047e3f 0x00000000  /* pioB */
+                                      0xfdffffff 0x00000000 0xb83fffff  /* pioC */
+                                      0x003fffff 0x003f8000 0x00000000  /* pioD */
+                                     >;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9g15ek.dts b/arch/arm/dts/at91sam9g15ek.dts
new file mode 100644 (file)
index 0000000..9fae925
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * at91sam9g15ek.dts - Device Tree file for AT91SAM9G15-EK board
+ *
+ *  Copyright (C) 2012 Atmel,
+ *                2012 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+#include "at91sam9g15.dtsi"
+#include "at91sam9x5dm.dtsi"
+#include "at91sam9x5ek.dtsi"
+
+/ {
+       model = "Atmel AT91SAM9G15-EK";
+       compatible = "atmel,at91sam9g15ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9";
+
+       ahb {
+               apb {
+                       hlcdc: hlcdc@f8038000 {
+                               u-boot,dm-pre-reloc;
+                               status = "okay";
+                       };
+               };
+       };
+};
index f5930161816371128530533b70ff298fa64cfb0a..e88d73ca8bf920faca29f931c7d4456444045c05 100644 (file)
@@ -40,7 +40,7 @@
                        };
 
                        pmc: pmc@fffffc00 {
-                               plla: pllack {
+                               plla: pllack@0 {
                                        atmel,clk-input-range = <2000000 32000000>;
                                        atmel,pll-clk-output-ranges = <745000000 800000000 0 0>,
                                                                <695000000 750000000 1 0>,
@@ -52,7 +52,7 @@
                                                                <400000000 450000000 3 1>;
                                };
 
-                               pllb: pllbck {
+                               pllb: pllbck@1 {
                                        compatible = "atmel,at91sam9g20-clk-pllb";
                                        atmel,clk-input-range = <2000000 32000000>;
                                        atmel,pll-clk-output-ranges = <30000000 100000000 0 0>;
diff --git a/arch/arm/dts/at91sam9g20ek.dts b/arch/arm/dts/at91sam9g20ek.dts
new file mode 100644 (file)
index 0000000..bbfd753
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * at91sam9g20ek.dts - Device Tree file for Atmel at91sam9g20ek board
+ *
+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2.
+ */
+/dts-v1/;
+#include "at91sam9g20ek_common.dtsi"
+
+/ {
+       model = "Atmel at91sam9g20ek";
+       compatible = "atmel,at91sam9g20ek", "atmel,at91sam9g20", "atmel,at91sam9";
+
+       leds {
+               compatible = "gpio-leds";
+
+               ds1 {
+                       label = "ds1";
+                       gpios = <&pioA 9 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+               };
+
+               ds5 {
+                       label = "ds5";
+                       gpios = <&pioA 6 GPIO_ACTIVE_LOW>;
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9g20ek_2mmc.dts b/arch/arm/dts/at91sam9g20ek_2mmc.dts
new file mode 100644 (file)
index 0000000..7ea83b6
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * at91sam9g20ek_2mmc.dts - Device Tree file for Atmel at91sam9g20ek 2 MMC board
+ *
+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2.
+ */
+/dts-v1/;
+#include "at91sam9g20ek_common.dtsi"
+
+/ {
+       model = "Atmel at91sam9g20ek 2 mmc";
+       compatible = "atmel,at91sam9g20ek_2mmc", "atmel,at91sam9g20", "atmel,at91sam9";
+
+       ahb {
+               apb{
+                       mmc0: mmc@fffa8000 {
+                               /* clk already mux wuth slot0 */
+                               pinctrl-0 = <
+                                       &pinctrl_board_mmc0_slot0
+                                       &pinctrl_mmc0_clk
+                                       &pinctrl_mmc0_slot0_cmd_dat0
+                                       &pinctrl_mmc0_slot0_dat1_3>;
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioC 2 GPIO_ACTIVE_HIGH>;
+                               };
+                       };
+
+                       pinctrl@fffff400 {
+                               mmc0_slot0 {
+                                       pinctrl_board_mmc0_slot0: mmc0_slot0-board {
+                                               atmel,pins =
+                                                       <AT91_PIOC 2 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;   /* PC2 gpio CD pin pull up and deglitch */
+                                       };
+                               };
+                       };
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               ds1 {
+                       label = "ds1";
+                       gpios = <&pioB 9 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+               };
+
+               ds5 {
+                       label = "ds5";
+                       gpios = <&pioB 8 GPIO_ACTIVE_LOW>;
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9g20ek_common.dtsi b/arch/arm/dts/at91sam9g20ek_common.dtsi
new file mode 100644 (file)
index 0000000..65ae099
--- /dev/null
@@ -0,0 +1,227 @@
+/*
+ * at91sam9g20ek_common.dtsi - Device Tree file for Atmel at91sam9g20ek board
+ *
+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2.
+ */
+#include "at91sam9g20.dtsi"
+
+/ {
+       chosen {
+               u-boot,dm-pre-reloc;
+               stdout-path = &dbgu;
+       };
+
+       memory {
+               reg = <0x20000000 0x4000000>;
+       };
+
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <18432000>;
+               };
+       };
+
+       ahb {
+               apb {
+                       pinctrl@fffff400 {
+                               board {
+                                       pinctrl_pck0_as_mck: pck0_as_mck {
+                                               atmel,pins =
+                                                       <AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* PC1 periph B */
+                                       };
+
+                               };
+
+                               mmc0_slot1 {
+                                       pinctrl_board_mmc0_slot1: mmc0_slot1-board {
+                                               atmel,pins =
+                                                       <AT91_PIOC 9 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;   /* PC9 gpio CD pin pull up and deglitch */
+                                       };
+                               };
+                       };
+
+                       dbgu: serial@fffff200 {
+                               u-boot,dm-pre-reloc;
+                               status = "okay";
+                       };
+
+                       usart0: serial@fffb0000 {
+                               pinctrl-0 =
+                                       <&pinctrl_usart0
+                                        &pinctrl_usart0_rts
+                                        &pinctrl_usart0_cts
+                                        &pinctrl_usart0_dtr_dsr
+                                        &pinctrl_usart0_dcd
+                                        &pinctrl_usart0_ri>;
+                               status = "okay";
+                       };
+
+                       usart1: serial@fffb4000 {
+                               status = "okay";
+                       };
+
+                       macb0: ethernet@fffc4000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+                       };
+
+                       usb1: gadget@fffa4000 {
+                               atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
+                               status = "okay";
+                       };
+
+                       mmc0: mmc@fffa8000 {
+                               pinctrl-0 = <
+                                       &pinctrl_board_mmc0_slot1
+                                       &pinctrl_mmc0_clk
+                                       &pinctrl_mmc0_slot1_cmd_dat0
+                                       &pinctrl_mmc0_slot1_dat1_3>;
+                               status = "okay";
+                               slot@1 {
+                                       reg = <1>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioC 9 GPIO_ACTIVE_HIGH>;
+                               };
+                       };
+
+                       ssc0: ssc@fffbc000 {
+                               status = "okay";
+                               pinctrl-0 = <&pinctrl_ssc0_tx>;
+                       };
+
+                       spi0: spi@fffc8000 {
+                               cs-gpios = <0>, <&pioC 11 0>, <0>, <0>;
+                               mtd_dataflash@0 {
+                                       compatible = "atmel,at45", "atmel,dataflash";
+                                       spi-max-frequency = <50000000>;
+                                       reg = <1>;
+                               };
+                       };
+
+                       shdwc@fffffd10 {
+                               atmel,wakeup-counter = <10>;
+                               atmel,wakeup-rtt-timer;
+                       };
+
+                       rtc@fffffd20 {
+                               atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
+                               status = "okay";
+                       };
+
+                       watchdog@fffffd40 {
+                               status = "okay";
+                       };
+
+                       gpbr: syscon@fffffd50 {
+                               status = "okay";
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "soft";
+                       nand-on-flash-bbt;
+                       status = "okay";
+
+                       at91bootstrap@0 {
+                               label = "at91bootstrap";
+                               reg = <0x0 0x20000>;
+                       };
+
+                       barebox@20000 {
+                               label = "barebox";
+                               reg = <0x20000 0x40000>;
+                       };
+
+                       bareboxenv@60000 {
+                               label = "bareboxenv";
+                               reg = <0x60000 0x20000>;
+                       };
+
+                       bareboxenv2@80000 {
+                               label = "bareboxenv2";
+                               reg = <0x80000 0x20000>;
+                       };
+
+                       oftree@80000 {
+                               label = "oftree";
+                               reg = <0xa0000 0x20000>;
+                       };
+
+                       kernel@a0000 {
+                               label = "kernel";
+                               reg = <0xc0000 0x400000>;
+                       };
+
+                       rootfs@4a0000 {
+                               label = "rootfs";
+                               reg = <0x4c0000 0x7800000>;
+                       };
+
+                       data@7ca0000 {
+                               label = "data";
+                               reg = <0x7cc0000 0x8340000>;
+                       };
+               };
+
+               usb0: ohci@00500000 {
+                       num-ports = <2>;
+                       status = "okay";
+               };
+       };
+
+       i2c-gpio-0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "okay";
+
+               24c512@50 {
+                       compatible = "24c512";
+                       reg = <0x50>;
+               };
+
+               wm8731: wm8731@1b {
+                       compatible = "wm8731";
+                       reg = <0x1b>;
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+
+               btn3 {
+                       label = "Button 3";
+                       gpios = <&pioA 30 GPIO_ACTIVE_LOW>;
+                       linux,code = <0x103>;
+                       wakeup-source;
+               };
+
+               btn4 {
+                       label = "Button 4";
+                       gpios = <&pioA 31 GPIO_ACTIVE_LOW>;
+                       linux,code = <0x104>;
+                       wakeup-source;
+               };
+       };
+
+       sound {
+               compatible = "atmel,at91sam9g20ek-wm8731-audio";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_pck0_as_mck>;
+
+               atmel,model = "wm8731 @ AT91SAMG20EK";
+
+               atmel,audio-routing =
+                       "Ext Spk", "LHPOUT",
+                       "Int Mic", "MICIN";
+
+               atmel,ssc-controller = <&ssc0>;
+               atmel,audio-codec = <&wm8731>;
+       };
+};
diff --git a/arch/arm/dts/at91sam9g25.dtsi b/arch/arm/dts/at91sam9g25.dtsi
new file mode 100644 (file)
index 0000000..a7da0dd
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * at91sam9g25.dtsi - Device Tree Include file for AT91SAM9G25 SoC
+ *
+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include "at91sam9x5.dtsi"
+#include "at91sam9x5_isi.dtsi"
+#include "at91sam9x5_usart3.dtsi"
+#include "at91sam9x5_macb0.dtsi"
+
+/ {
+       model = "Atmel AT91SAM9G25 SoC";
+       compatible = "atmel,at91sam9g25", "atmel,at91sam9x5";
+
+       ahb {
+               apb {
+                       pinctrl@fffff400 {
+                               atmel,mux-mask = <
+                                     /*    A         B          C     */
+                                      0xffffffff 0xffe0399f 0xc000001c  /* pioA */
+                                      0x0007ffff 0x8000fe3f 0x00000000  /* pioB */
+                                      0x80000000 0x07c0ffff 0xb83fffff  /* pioC */
+                                      0x003fffff 0x003f8000 0x00000000  /* pioD */
+                                     >;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9g25ek.dts b/arch/arm/dts/at91sam9g25ek.dts
new file mode 100644 (file)
index 0000000..91a7177
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * at91sam9g25ek.dts - Device Tree file for AT91SAM9G25-EK board
+ *
+ *  Copyright (C) 2012 Atmel,
+ *                2012 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+#include "at91sam9g25.dtsi"
+#include "at91sam9x5ek.dtsi"
+
+/ {
+       model = "Atmel AT91SAM9G25-EK";
+       compatible = "atmel,at91sam9g25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9";
+
+       ahb {
+               apb {
+                       spi0: spi@f0000000 {
+                               status = "disabled";
+                       };
+
+                       mmc1: mmc@f000c000 {
+                               status = "disabled";
+                       };
+
+                       i2c0: i2c@f8010000 {
+                               ov2640: camera@0x30 {
+                                       compatible = "ovti,ov2640";
+                                       reg = <0x30>;
+                                       pinctrl-names = "default";
+                                       pinctrl-0 = <&pinctrl_pck0_as_isi_mck &pinctrl_sensor_power &pinctrl_sensor_reset>;
+                                       resetb-gpios = <&pioA 7 GPIO_ACTIVE_LOW>;
+                                       pwdn-gpios = <&pioA 13 GPIO_ACTIVE_HIGH>;
+                                       clocks = <&pck0>;
+                                       clock-names = "xvclk";
+                                       assigned-clocks = <&pck0>;
+                                       assigned-clock-rates = <25000000>;
+                                       status = "okay";
+
+                                       port {
+                                               ov2640_0: endpoint {
+                                                       remote-endpoint = <&isi_0>;
+                                                       bus-width = <8>;
+                                               };
+                                       };
+                               };
+                       };
+
+                       macb0: ethernet@f802c000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+                       };
+
+                       isi: isi@f8048000 {
+                               status = "okay";
+                               port {
+                                       isi_0: endpoint@0 {
+                                               reg = <0>;
+                                               remote-endpoint = <&ov2640_0>;
+                                               bus-width = <8>;
+                                               vsync-active = <1>;
+                                               hsync-active = <1>;
+                                       };
+                               };
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9g35.dtsi b/arch/arm/dts/at91sam9g35.dtsi
new file mode 100644 (file)
index 0000000..ff41158
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * at91sam9g35.dtsi - Device Tree Include file for AT91SAM9G35 SoC
+ *
+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include "at91sam9x5.dtsi"
+#include "at91sam9x5_lcd.dtsi"
+#include "at91sam9x5_macb0.dtsi"
+
+/ {
+       model = "Atmel AT91SAM9G35 SoC";
+       compatible = "atmel,at91sam9g35", "atmel,at91sam9x5";
+
+       ahb {
+               apb {
+                       pinctrl@fffff400 {
+                               atmel,mux-mask = <
+                                     /*    A         B          C     */
+                                      0xffffffff 0xffe0399f 0xc000000c  /* pioA */
+                                      0x000406ff 0x00047e3f 0x00000000  /* pioB */
+                                      0xfdffffff 0x00000000 0xb83fffff  /* pioC */
+                                      0x003fffff 0x003f8000 0x00000000  /* pioD */
+                                     >;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9g35ek.dts b/arch/arm/dts/at91sam9g35ek.dts
new file mode 100644 (file)
index 0000000..0cc084e
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * at91sam9g35ek.dts - Device Tree file for AT91SAM9G35-EK board
+ *
+ *  Copyright (C) 2012 Atmel,
+ *                2012 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+#include "at91sam9g35.dtsi"
+#include "at91sam9x5dm.dtsi"
+#include "at91sam9x5ek.dtsi"
+
+/ {
+       model = "Atmel AT91SAM9G35-EK";
+       compatible = "atmel,at91sam9g35ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9";
+
+       ahb {
+               apb {
+                       macb0: ethernet@f802c000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+                       };
+
+                       hlcdc: hlcdc@f8038000 {
+                               u-boot,dm-pre-reloc;
+                               status = "okay";
+                       };
+               };
+       };
+};
index af8b708ac312ad4dfd4b0f1a1f633d053721a9da..1be1270c574de6fd97bad4e2146597afac08547b 100644 (file)
                #address-cells = <1>;
                #size-cells = <1>;
                ranges;
+               u-boot,dm-pre-reloc;
 
                apb {
                        compatible = "simple-bus";
                        #address-cells = <1>;
                        #size-cells = <1>;
                        ranges;
+                       u-boot,dm-pre-reloc;
 
                        aic: interrupt-controller@fffff000 {
                                #interrupt-cells = <3>;
                                #address-cells = <1>;
                                #size-cells = <0>;
                                #interrupt-cells = <1>;
+                               u-boot,dm-pre-reloc;
 
                                main_osc: main_osc {
                                        compatible = "atmel,at91rm9200-clk-main-osc";
                                        clocks = <&main_osc>;
                                };
 
-                               plla: pllack {
+                               plla: pllack@0 {
                                        compatible = "atmel,at91rm9200-clk-pll";
                                        #clock-cells = <0>;
                                        interrupts-extended = <&pmc AT91_PMC_LOCKA>;
                                        clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>;
                                        atmel,clk-output-range = <0 133333333>;
                                        atmel,clk-divisors = <1 2 4 3>;
+                                       u-boot,dm-pre-reloc;
                                };
 
                                usb: usbck {
                                        interrupt-parent = <&pmc>;
                                        clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>, <&mck>;
 
-                                       prog0: prog0 {
+                                       prog0: prog@0 {
                                                #clock-cells = <0>;
                                                reg = <0>;
                                                interrupts = <AT91_PMC_PCKRDY(0)>;
                                        };
 
-                                       prog1: prog1 {
+                                       prog1: prog@1 {
                                                #clock-cells = <0>;
                                                reg = <1>;
                                                interrupts = <AT91_PMC_PCKRDY(1)>;
                                        #address-cells = <1>;
                                        #size-cells = <0>;
 
-                                       ddrck: ddrck {
+                                       ddrck: ddrck@2 {
                                                #clock-cells = <0>;
                                                reg = <2>;
                                                clocks = <&mck>;
                                        };
 
-                                       uhpck: uhpck {
+                                       uhpck: uhpck@6 {
                                                #clock-cells = <0>;
                                                reg = <6>;
                                                clocks = <&usb>;
                                        };
 
-                                       pck0: pck0 {
+                                       pck0: pck0@8 {
                                                #clock-cells = <0>;
                                                reg = <8>;
                                                clocks = <&prog0>;
                                        };
 
-                                       pck1: pck1 {
+                                       pck1: pck1@9 {
                                                #clock-cells = <0>;
                                                reg = <9>;
                                                clocks = <&prog1>;
                                        #size-cells = <0>;
                                        clocks = <&mck>;
 
-                                       pioA_clk: pioA_clk {
+                                       pioA_clk: pioA_clk@2 {
                                                #clock-cells = <0>;
                                                reg = <2>;
                                        };
 
-                                       pioB_clk: pioB_clk {
+                                       pioB_clk: pioB_clk@3 {
                                                #clock-cells = <0>;
                                                reg = <3>;
                                        };
 
-                                       pioC_clk: pioC_clk {
+                                       pioC_clk: pioC_clk@4 {
                                                #clock-cells = <0>;
                                                reg = <4>;
                                        };
 
-                                       pioDE_clk: pioDE_clk {
+                                       pioDE_clk: pioDE_clk@5 {
                                                #clock-cells = <0>;
                                                reg = <5>;
                                        };
 
-                                       trng_clk: trng_clk {
+                                       trng_clk: trng_clk@6 {
                                                #clock-cells = <0>;
                                                reg = <6>;
                                        };
 
-                                       usart0_clk: usart0_clk {
+                                       usart0_clk: usart0_clk@7 {
                                                #clock-cells = <0>;
                                                reg = <7>;
                                        };
 
-                                       usart1_clk: usart1_clk {
+                                       usart1_clk: usart1_clk@8 {
                                                #clock-cells = <0>;
                                                reg = <8>;
                                        };
 
-                                       usart2_clk: usart2_clk {
+                                       usart2_clk: usart2_clk@9 {
                                                #clock-cells = <0>;
                                                reg = <9>;
                                        };
 
-                                       usart3_clk: usart3_clk {
+                                       usart3_clk: usart3_clk@10 {
                                                #clock-cells = <0>;
                                                reg = <10>;
                                        };
 
-                                       mci0_clk: mci0_clk {
+                                       mci0_clk: mci0_clk@11 {
                                                #clock-cells = <0>;
                                                reg = <11>;
                                        };
 
-                                       twi0_clk: twi0_clk {
+                                       twi0_clk: twi0_clk@12 {
                                                #clock-cells = <0>;
                                                reg = <12>;
                                        };
 
-                                       twi1_clk: twi1_clk {
+                                       twi1_clk: twi1_clk@13 {
                                                #clock-cells = <0>;
                                                reg = <13>;
                                        };
 
-                                       spi0_clk: spi0_clk {
+                                       spi0_clk: spi0_clk@14 {
                                                #clock-cells = <0>;
                                                reg = <14>;
                                        };
 
-                                       spi1_clk: spi1_clk {
+                                       spi1_clk: spi1_clk@15 {
                                                #clock-cells = <0>;
                                                reg = <15>;
                                        };
 
-                                       ssc0_clk: ssc0_clk {
+                                       ssc0_clk: ssc0_clk@16 {
                                                #clock-cells = <0>;
                                                reg = <16>;
                                        };
 
-                                       ssc1_clk: ssc1_clk {
+                                       ssc1_clk: ssc1_clk@17 {
                                                #clock-cells = <0>;
                                                reg = <17>;
                                        };
 
-                                       tcb0_clk: tcb0_clk {
+                                       tcb0_clk: tcb0_clk@18 {
                                                #clock-cells = <0>;
                                                reg = <18>;
                                        };
 
-                                       pwm_clk: pwm_clk {
+                                       pwm_clk: pwm_clk@19 {
                                                #clock-cells = <0>;
                                                reg = <19>;
                                        };
 
-                                       adc_clk: adc_clk {
+                                       adc_clk: adc_clk@20 {
                                                #clock-cells = <0>;
                                                reg = <20>;
                                        };
 
-                                       dma0_clk: dma0_clk {
+                                       dma0_clk: dma0_clk@21 {
                                                #clock-cells = <0>;
                                                reg = <21>;
                                        };
 
-                                       uhphs_clk: uhphs_clk {
+                                       uhphs_clk: uhphs_clk@22 {
                                                #clock-cells = <0>;
                                                reg = <22>;
                                        };
 
-                                       lcd_clk: lcd_clk {
+                                       lcd_clk: lcd_clk@23 {
                                                #clock-cells = <0>;
                                                reg = <23>;
                                        };
 
-                                       ac97_clk: ac97_clk {
+                                       ac97_clk: ac97_clk@24 {
                                                #clock-cells = <0>;
                                                reg = <24>;
                                        };
 
-                                       macb0_clk: macb0_clk {
+                                       macb0_clk: macb0_clk@25 {
                                                #clock-cells = <0>;
                                                reg = <25>;
                                        };
 
-                                       isi_clk: isi_clk {
+                                       isi_clk: isi_clk@26 {
                                                #clock-cells = <0>;
                                                reg = <26>;
                                        };
 
-                                       udphs_clk: udphs_clk {
+                                       udphs_clk: udphs_clk@27 {
                                                #clock-cells = <0>;
                                                reg = <27>;
                                        };
 
-                                       aestdessha_clk: aestdessha_clk {
+                                       aestdessha_clk: aestdessha_clk@28 {
                                                #clock-cells = <0>;
                                                reg = <28>;
                                        };
 
-                                       mci1_clk: mci1_clk {
+                                       mci1_clk: mci1_clk@29 {
                                                #clock-cells = <0>;
                                                reg = <29>;
                                        };
 
-                                       vdec_clk: vdec_clk {
+                                       vdec_clk: vdec_clk@30 {
                                                #clock-cells = <0>;
                                                reg = <30>;
                                        };
                                #size-cells = <1>;
                                compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
                                ranges = <0xfffff200 0xfffff200 0xa00>;
+                               reg = <0xfffff200 0x200
+                                      0xfffff400 0x200
+                                      0xfffff600 0x200
+                                      0xfffff800 0x200
+                                      0xfffffa00 0x200
+                                     >;
+                               u-boot,dm-pre-reloc;
 
                                atmel,mux-mask = <
                                      /*    A         B     */
                                };
 
                                dbgu {
+                                       u-boot,dm-pre-reloc;
                                        pinctrl_dbgu: dbgu-0 {
                                                atmel,pins =
-                                                       <AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB12 periph A */
-                                                        AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB13 periph A */
+                                                       <AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
+                                                        AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE>;
                                        };
                                };
 
                                                         AT91_PIOE 30 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PE30 periph A */
                                        };
                                };
+                       };
 
-                               pioA: gpio@fffff200 {
-                                       compatible = "atmel,at91rm9200-gpio";
-                                       reg = <0xfffff200 0x200>;
-                                       interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
-                                       #gpio-cells = <2>;
-                                       gpio-controller;
-                                       interrupt-controller;
-                                       #interrupt-cells = <2>;
-                                       clocks = <&pioA_clk>;
-                               };
+                       pioA: gpio@fffff200 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff200 0x200>;
+                               interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioA_clk>;
+                       };
 
-                               pioB: gpio@fffff400 {
-                                       compatible = "atmel,at91rm9200-gpio";
-                                       reg = <0xfffff400 0x200>;
-                                       interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
-                                       #gpio-cells = <2>;
-                                       gpio-controller;
-                                       interrupt-controller;
-                                       #interrupt-cells = <2>;
-                                       clocks = <&pioB_clk>;
-                               };
+                       pioB: gpio@fffff400 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff400 0x200>;
+                               interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioB_clk>;
+                       };
 
-                               pioC: gpio@fffff600 {
-                                       compatible = "atmel,at91rm9200-gpio";
-                                       reg = <0xfffff600 0x200>;
-                                       interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
-                                       #gpio-cells = <2>;
-                                       gpio-controller;
-                                       interrupt-controller;
-                                       #interrupt-cells = <2>;
-                                       clocks = <&pioC_clk>;
-                               };
+                       pioC: gpio@fffff600 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff600 0x200>;
+                               interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioC_clk>;
+                       };
 
-                               pioD: gpio@fffff800 {
-                                       compatible = "atmel,at91rm9200-gpio";
-                                       reg = <0xfffff800 0x200>;
-                                       interrupts = <5 IRQ_TYPE_LEVEL_HIGH 1>;
-                                       #gpio-cells = <2>;
-                                       gpio-controller;
-                                       interrupt-controller;
-                                       #interrupt-cells = <2>;
-                                       clocks = <&pioDE_clk>;
-                               };
+                       pioD: gpio@fffff800 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff800 0x200>;
+                               interrupts = <5 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioDE_clk>;
+                       };
 
-                               pioE: gpio@fffffa00 {
-                                       compatible = "atmel,at91rm9200-gpio";
-                                       reg = <0xfffffa00 0x200>;
-                                       interrupts = <5 IRQ_TYPE_LEVEL_HIGH 1>;
-                                       #gpio-cells = <2>;
-                                       gpio-controller;
-                                       interrupt-controller;
-                                       #interrupt-cells = <2>;
-                                       clocks = <&pioDE_clk>;
-                               };
+                       pioE: gpio@fffffa00 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffffa00 0x200>;
+                               interrupts = <5 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioDE_clk>;
                        };
 
                        dbgu: serial@ffffee00 {
 
                        trng@fffcc000 {
                                compatible = "atmel,at91sam9g45-trng";
-                               reg = <0xfffcc000 0x4000>;
+                               reg = <0xfffcc000 0x100>;
                                interrupts = <6 IRQ_TYPE_LEVEL_HIGH 0>;
                                clocks = <&trng_clk>;
                        };
                                atmel,adc-res-names = "lowres", "highres";
                                atmel,adc-use-res = "highres";
 
-                               trigger@0 {
-                                       reg = <0>;
+                               trigger0 {
                                        trigger-name = "external-rising";
                                        trigger-value = <0x1>;
                                        trigger-external;
                                };
-                               trigger@1 {
-                                       reg = <1>;
+                               trigger1 {
                                        trigger-name = "external-falling";
                                        trigger-value = <0x2>;
                                        trigger-external;
                                };
 
-                               trigger@2 {
-                                       reg = <2>;
+                               trigger2 {
                                        trigger-name = "external-any";
                                        trigger-value = <0x3>;
                                        trigger-external;
                                };
 
-                               trigger@3 {
-                                       reg = <3>;
+                               trigger3 {
                                        trigger-name = "continuous";
                                        trigger-value = <0x6>;
                                };
                                clock-names = "pclk", "hclk";
                                status = "disabled";
 
-                               ep0 {
+                               ep@0 {
                                        reg = <0>;
                                        atmel,fifo-size = <64>;
                                        atmel,nb-banks = <1>;
                                };
 
-                               ep1 {
+                               ep@1 {
                                        reg = <1>;
                                        atmel,fifo-size = <1024>;
                                        atmel,nb-banks = <2>;
                                        atmel,can-isoc;
                                };
 
-                               ep2 {
+                               ep@2 {
                                        reg = <2>;
                                        atmel,fifo-size = <1024>;
                                        atmel,nb-banks = <2>;
                                        atmel,can-isoc;
                                };
 
-                               ep3 {
+                               ep@3 {
                                        reg = <3>;
                                        atmel,fifo-size = <1024>;
                                        atmel,nb-banks = <3>;
                                        atmel,can-dma;
                                };
 
-                               ep4 {
+                               ep@4 {
                                        reg = <4>;
                                        atmel,fifo-size = <1024>;
                                        atmel,nb-banks = <3>;
                                        atmel,can-dma;
                                };
 
-                               ep5 {
+                               ep@5 {
                                        reg = <5>;
                                        atmel,fifo-size = <1024>;
                                        atmel,nb-banks = <3>;
                                        atmel,can-isoc;
                                };
 
-                               ep6 {
+                               ep@6 {
                                        reg = <6>;
                                        atmel,fifo-size = <1024>;
                                        atmel,nb-banks = <3>;
                };
        };
 
-       i2c@0 {
+       i2c-gpio-0 {
                compatible = "i2c-gpio";
                gpios = <&pioA 20 GPIO_ACTIVE_HIGH /* sda */
                         &pioA 21 GPIO_ACTIVE_HIGH /* scl */
diff --git a/arch/arm/dts/at91sam9m10g45ek.dts b/arch/arm/dts/at91sam9m10g45ek.dts
new file mode 100644 (file)
index 0000000..52a76fe
--- /dev/null
@@ -0,0 +1,359 @@
+/*
+ * at91sam9m10g45ek.dts - Device Tree file for AT91SAM9M10G45-EK board
+ *
+ *  Copyright (C) 2011 Atmel,
+ *                2011 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+#include "at91sam9g45.dtsi"
+#include <dt-bindings/pwm/pwm.h>
+
+/ {
+       model = "Atmel AT91SAM9M10G45-EK";
+       compatible = "atmel,at91sam9m10g45ek", "atmel,at91sam9g45", "atmel,at91sam9";
+
+       chosen {
+               bootargs = "mem=64M root=/dev/mtdblock1 rw rootfstype=jffs2";
+               stdout-path = "serial0:115200n8";
+               u-boot,dm-pre-reloc;
+       };
+
+       memory {
+               reg = <0x70000000 0x4000000>;
+       };
+
+       clocks {
+               slow_xtal {
+                     clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                     clock-frequency = <12000000>;
+               };
+       };
+
+       ahb {
+               apb {
+                       dbgu: serial@ffffee00 {
+                               status = "okay";
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       usart1: serial@fff90000 {
+                               pinctrl-0 =
+                                       <&pinctrl_usart1
+                                        &pinctrl_usart1_rts
+                                        &pinctrl_usart1_cts>;
+                               status = "okay";
+                       };
+
+                       macb0: ethernet@fffbc000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+                       };
+
+                       i2c0: i2c@fff84000 {
+                               status = "okay";
+                               ov2640: camera@30 {
+                                       compatible = "ovti,ov2640";
+                                       reg = <0x30>;
+                                       pinctrl-names = "default";
+                                       pinctrl-0 = <&pinctrl_pck1_as_isi_mck &pinctrl_sensor_power &pinctrl_sensor_reset>;
+                                       resetb-gpios = <&pioD 12 GPIO_ACTIVE_LOW>;
+                                       pwdn-gpios = <&pioD 13 GPIO_ACTIVE_HIGH>;
+                                       clocks = <&pck1>;
+                                       clock-names = "xvclk";
+                                       assigned-clocks = <&pck1>;
+                                       assigned-clock-rates = <25000000>;
+
+                                       port {
+                                               ov2640_0: endpoint {
+                                                       remote-endpoint = <&isi_0>;
+                                                       bus-width = <8>;
+                                               };
+                                       };
+                               };
+                       };
+
+                       i2c1: i2c@fff88000 {
+                               status = "okay";
+                       };
+
+                       watchdog@fffffd40 {
+                               status = "okay";
+                       };
+
+                       mmc0: mmc@fff80000 {
+                               pinctrl-0 = <
+                                       &pinctrl_board_mmc0
+                                       &pinctrl_mmc0_slot0_clk_cmd_dat0
+                                       &pinctrl_mmc0_slot0_dat1_3>;
+                               status = "okay";
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioD 10 GPIO_ACTIVE_HIGH>;
+                               };
+                       };
+
+                       mmc1: mmc@fffd0000 {
+                               pinctrl-0 = <
+                                       &pinctrl_board_mmc1
+                                       &pinctrl_mmc1_slot0_clk_cmd_dat0
+                                       &pinctrl_mmc1_slot0_dat1_3>;
+                               status = "okay";
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioD 11 GPIO_ACTIVE_HIGH>;
+                                       wp-gpios = <&pioD 29 GPIO_ACTIVE_HIGH>;
+                               };
+                       };
+
+                       pinctrl@fffff200 {
+                               camera_sensor {
+                                       pinctrl_pck1_as_isi_mck: pck1_as_isi_mck-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 31 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_sensor_reset: sensor_reset-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 12 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_sensor_power: sensor_power-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 13 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+                                       };
+                               };
+                               mmc0 {
+                                       pinctrl_board_mmc0: mmc0-board {
+                                               atmel,pins =
+                                                       <AT91_PIOD 10 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;  /* PD10 gpio CD pin pull up and deglitch */
+                                       };
+                               };
+
+                               mmc1 {
+                                       pinctrl_board_mmc1: mmc1-board {
+                                               atmel,pins =
+                                                       <AT91_PIOD 11 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH    /* PD11 gpio CD pin pull up and deglitch */
+                                                        AT91_PIOD 29 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;   /* PD29 gpio WP pin pull up */
+                                       };
+                               };
+
+                               pwm0 {
+                                       pinctrl_pwm_leds: pwm-led {
+                                               atmel,pins =
+                                                       <AT91_PIOD 0  AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* PD0 periph B */
+                                                        AT91_PIOD 31 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;      /* PD31 periph B */
+                                       };
+                               };
+                       };
+
+                       spi0: spi@fffa4000{
+                               status = "okay";
+                               cs-gpios = <&pioB 3 0>, <0>, <0>, <0>;
+                               mtd_dataflash@0 {
+                                       compatible = "atmel,at45", "atmel,dataflash";
+                                       spi-max-frequency = <13000000>;
+                                       reg = <0>;
+                               };
+                       };
+
+                       usb2: gadget@fff78000 {
+                               atmel,vbus-gpio = <&pioB 19 GPIO_ACTIVE_HIGH>;
+                               status = "okay";
+                       };
+
+                       adc0: adc@fffb0000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <
+                                       &pinctrl_adc0_ad0
+                                       &pinctrl_adc0_ad1
+                                       &pinctrl_adc0_ad2
+                                       &pinctrl_adc0_ad3
+                                       &pinctrl_adc0_ad4
+                                       &pinctrl_adc0_ad5
+                                       &pinctrl_adc0_ad6
+                                       &pinctrl_adc0_ad7>;
+                               atmel,adc-ts-wires = <4>;
+                               status = "okay";
+                       };
+
+                       isi@fffb4000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_isi_data_0_7>;
+                               status = "okay";
+                               port {
+                                       isi_0: endpoint {
+                                               remote-endpoint = <&ov2640_0>;
+                                               bus-width = <8>;
+                                               vsync-active = <1>;
+                                               hsync-active = <1>;
+                                       };
+                               };
+                       };
+
+                       pwm0: pwm@fffb8000 {
+                               status = "okay";
+
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_pwm_leds>;
+                       };
+
+                       rtc@fffffd20 {
+                               atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
+                               status = "okay";
+                       };
+
+                       gpbr: syscon@fffffd60 {
+                               status = "okay";
+                       };
+
+                       rtc@fffffdb0 {
+                               status = "okay";
+                       };
+               };
+
+               fb0: fb@0x00500000 {
+                       display = <&display0>;
+                       status = "okay";
+
+                       display0: display {
+                               bits-per-pixel = <32>;
+                               atmel,lcdcon-backlight;
+                               atmel,dmacon = <0x1>;
+                               atmel,lcdcon2 = <0x80008002>;
+                               atmel,guard-time = <9>;
+                               atmel,lcd-wiring-mode = "RGB";
+
+                               display-timings {
+                                       native-mode = <&timing0>;
+                                       timing0: timing0 {
+                                               clock-frequency = <9000000>;
+                                               hactive = <480>;
+                                               vactive = <272>;
+                                               hback-porch = <1>;
+                                               hfront-porch = <1>;
+                                               vback-porch = <40>;
+                                               vfront-porch = <1>;
+                                               hsync-len = <45>;
+                                               vsync-len = <1>;
+                                       };
+                               };
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "soft";
+                       nand-on-flash-bbt;
+                       status = "okay";
+
+                       boot@0 {
+                               label = "bootstrap/uboot/kernel";
+                               reg = <0x0 0x400000>;
+                       };
+
+                       rootfs@400000 {
+                               label = "rootfs";
+                               reg = <0x400000 0x3C00000>;
+                       };
+
+                       data@4000000 {
+                               label = "data";
+                               reg = <0x4000000 0xC000000>;
+                       };
+               };
+
+               usb0: ohci@00700000 {
+                       status = "okay";
+                       num-ports = <2>;
+                       atmel,vbus-gpio = <&pioD 1 GPIO_ACTIVE_LOW
+                                          &pioD 3 GPIO_ACTIVE_LOW>;
+               };
+
+               usb1: ehci@00800000 {
+                       status = "okay";
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               d8 {
+                       label = "d8";
+                       gpios = <&pioD 30 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+
+       pwmleds {
+               compatible = "pwm-leds";
+
+               d6 {
+                       label = "d6";
+                       pwms = <&pwm0 3 5000 PWM_POLARITY_INVERTED>;
+                       max-brightness = <255>;
+                       linux,default-trigger = "nand-disk";
+               };
+
+               d7 {
+                       label = "d7";
+                       pwms = <&pwm0 1 5000 PWM_POLARITY_INVERTED>;
+                       max-brightness = <255>;
+                       linux,default-trigger = "mmc0";
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+
+               left_click {
+                       label = "left_click";
+                       gpios = <&pioB 6 GPIO_ACTIVE_LOW>;
+                       linux,code = <272>;
+                       wakeup-source;
+               };
+
+               right_click {
+                       label = "right_click";
+                       gpios = <&pioB 7 GPIO_ACTIVE_LOW>;
+                       linux,code = <273>;
+                       wakeup-source;
+               };
+
+               left {
+                       label = "Joystick Left";
+                       gpios = <&pioB 14 GPIO_ACTIVE_LOW>;
+                       linux,code = <105>;
+               };
+
+               right {
+                       label = "Joystick Right";
+                       gpios = <&pioB 15 GPIO_ACTIVE_LOW>;
+                       linux,code = <106>;
+               };
+
+               up {
+                       label = "Joystick Up";
+                       gpios = <&pioB 16 GPIO_ACTIVE_LOW>;
+                       linux,code = <103>;
+               };
+
+               down {
+                       label = "Joystick Down";
+                       gpios = <&pioB 17 GPIO_ACTIVE_LOW>;
+                       linux,code = <108>;
+               };
+
+               enter {
+                       label = "Joystick Press";
+                       gpios = <&pioB 18 GPIO_ACTIVE_LOW>;
+                       linux,code = <28>;
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9n12.dtsi b/arch/arm/dts/at91sam9n12.dtsi
new file mode 100644 (file)
index 0000000..7ba7116
--- /dev/null
@@ -0,0 +1,1064 @@
+/*
+ * at91sam9n12.dtsi - Device Tree include file for AT91SAM9N12 SoC
+ *
+ *  Copyright (C) 2012 Atmel,
+ *                2012 Hong Xu <hong.xu@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+#include "skeleton.dtsi"
+#include <dt-bindings/dma/at91.h>
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/clock/at91.h>
+
+/ {
+       model = "Atmel AT91SAM9N12 SoC";
+       compatible = "atmel,at91sam9n12";
+       interrupt-parent = <&aic>;
+
+       aliases {
+               serial0 = &dbgu;
+               serial1 = &usart0;
+               serial2 = &usart1;
+               serial3 = &usart2;
+               serial4 = &usart3;
+               gpio0 = &pioA;
+               gpio1 = &pioB;
+               gpio2 = &pioC;
+               gpio3 = &pioD;
+               tcb0 = &tcb0;
+               tcb1 = &tcb1;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               ssc0 = &ssc0;
+               pwm0 = &pwm0;
+               spi0 = &spi0;
+       };
+       cpus {
+               #address-cells = <0>;
+               #size-cells = <0>;
+
+               cpu {
+                       compatible = "arm,arm926ej-s";
+                       device_type = "cpu";
+               };
+       };
+
+       memory {
+               reg = <0x20000000 0x10000000>;
+       };
+
+       clocks {
+               slow_xtal: slow_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+
+               main_xtal: main_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+       };
+
+       sram: sram@00300000 {
+               compatible = "mmio-sram";
+               reg = <0x00300000 0x8000>;
+       };
+
+       ahb {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               u-boot,dm-pre-reloc;
+
+               apb {
+                       compatible = "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+                       u-boot,dm-pre-reloc;
+
+                       aic: interrupt-controller@fffff000 {
+                               #interrupt-cells = <3>;
+                               compatible = "atmel,at91rm9200-aic";
+                               interrupt-controller;
+                               reg = <0xfffff000 0x200>;
+                               atmel,external-irqs = <31>;
+                       };
+
+                       ramc0: ramc@ffffe800 {
+                               compatible = "atmel,at91sam9g45-ddramc";
+                               reg = <0xffffe800 0x200>;
+                               clocks = <&ddrck>;
+                               clock-names = "ddrck";
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               compatible = "atmel,at91sam9n12-pmc", "syscon";
+                               reg = <0xfffffc00 0x200>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               interrupt-controller;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               #interrupt-cells = <1>;
+                               u-boot,dm-pre-reloc;
+
+                               main_rc_osc: main_rc_osc {
+                                       compatible = "atmel,at91sam9x5-clk-main-rc-osc";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MOSCRCS>;
+                                       clock-frequency = <12000000>;
+                                       clock-accuracy = <50000000>;
+                               };
+
+                               main_osc: main_osc {
+                                       compatible = "atmel,at91rm9200-clk-main-osc";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MOSCS>;
+                                       clocks = <&main_xtal>;
+                               };
+
+                               main: mainck {
+                                       compatible = "atmel,at91sam9x5-clk-main";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MOSCSELS>;
+                                       clocks = <&main_rc_osc>, <&main_osc>;
+                               };
+
+                               plla: pllack@0 {
+                                       compatible = "atmel,at91rm9200-clk-pll";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_LOCKA>;
+                                       clocks = <&main>;
+                                       reg = <0>;
+                                       atmel,clk-input-range = <2000000 32000000>;
+                                       #atmel,pll-clk-output-range-cells = <4>;
+                                       atmel,pll-clk-output-ranges = <745000000 800000000 0 0>,
+                                                                     <695000000 750000000 1 0>,
+                                                                     <645000000 700000000 2 0>,
+                                                                     <595000000 650000000 3 0>,
+                                                                     <545000000 600000000 0 1>,
+                                                                     <495000000 555000000 1 1>,
+                                                                     <445000000 500000000 2 1>,
+                                                                     <400000000 450000000 3 1>;
+                               };
+
+                               plladiv: plladivck {
+                                       compatible = "atmel,at91sam9x5-clk-plldiv";
+                                       #clock-cells = <0>;
+                                       clocks = <&plla>;
+                               };
+
+                               pllb: pllbck@1 {
+                                       compatible = "atmel,at91rm9200-clk-pll";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_LOCKB>;
+                                       clocks = <&main>;
+                                       reg = <1>;
+                                       atmel,clk-input-range = <2000000 32000000>;
+                                       #atmel,pll-clk-output-range-cells = <3>;
+                                       atmel,pll-clk-output-ranges = <30000000 100000000 0>;
+                               };
+
+                               mck: masterck {
+                                       compatible = "atmel,at91sam9x5-clk-master";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MCKRDY>;
+                                       clocks = <&clk32k>, <&main>, <&plladiv>, <&pllb>;
+                                       atmel,clk-output-range = <0 133333333>;
+                                       atmel,clk-divisors = <1 2 4 3>;
+                                       atmel,master-clk-have-div3-pres;
+                                       u-boot,dm-pre-reloc;
+                               };
+
+                               usb: usbck {
+                                       compatible = "atmel,at91sam9n12-clk-usb";
+                                       #clock-cells = <0>;
+                                       clocks = <&pllb>;
+                               };
+
+                               prog: progck {
+                                       compatible = "atmel,at91sam9x5-clk-programmable";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       clocks = <&clk32k>, <&main>, <&plladiv>, <&pllb>, <&mck>;
+
+                                       prog0: prog@0 {
+                                               #clock-cells = <0>;
+                                               reg = <0>;
+                                               interrupts = <AT91_PMC_PCKRDY(0)>;
+                                       };
+
+                                       prog1: prog@1 {
+                                               #clock-cells = <0>;
+                                               reg = <1>;
+                                               interrupts = <AT91_PMC_PCKRDY(1)>;
+                                       };
+                               };
+
+                               systemck {
+                                       compatible = "atmel,at91rm9200-clk-system";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       ddrck: ddrck@2 {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                               clocks = <&mck>;
+                                       };
+
+                                       lcdck: lcdck@3 {
+                                               #clock-cells = <0>;
+                                               reg = <3>;
+                                               clocks = <&mck>;
+                                       };
+
+                                       uhpck: uhpck@6 {
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       udpck: udpck@7 {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       pck0: pck0@8 {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                               clocks = <&prog0>;
+                                       };
+
+                                       pck1: pck1@9 {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                               clocks = <&prog1>;
+                                       };
+                               };
+
+                               periphck {
+                                       compatible = "atmel,at91sam9x5-clk-peripheral";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       clocks = <&mck>;
+                                       u-boot,dm-pre-reloc;
+
+                                       pioAB_clk: pioAB_clk@2 {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                               u-boot,dm-pre-reloc;
+                                       };
+
+                                       pioCD_clk: pioCD_clk@3 {
+                                               #clock-cells = <0>;
+                                               reg = <3>;
+                                               u-boot,dm-pre-reloc;
+                                       };
+
+                                       fuse_clk: fuse_clk@4 {
+                                               #clock-cells = <0>;
+                                               reg = <4>;
+                                       };
+
+                                       usart0_clk: usart0_clk@5 {
+                                               #clock-cells = <0>;
+                                               reg = <5>;
+                                       };
+
+                                       usart1_clk: usart1_clk@6 {
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                       };
+
+                                       usart2_clk: usart2_clk@7 {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                       };
+
+                                       usart3_clk: usart3_clk@8 {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                       };
+
+                                       twi0_clk: twi0_clk@9 {
+                                               reg = <9>;
+                                               #clock-cells = <0>;
+                                       };
+
+                                       twi1_clk: twi1_clk@10 {
+                                               #clock-cells = <0>;
+                                               reg = <10>;
+                                       };
+
+                                       mci0_clk: mci0_clk@12 {
+                                               #clock-cells = <0>;
+                                               reg = <12>;
+                                       };
+
+                                       spi0_clk: spi0_clk@13 {
+                                               #clock-cells = <0>;
+                                               reg = <13>;
+                                       };
+
+                                       spi1_clk: spi1_clk@14 {
+                                               #clock-cells = <0>;
+                                               reg = <14>;
+                                       };
+
+                                       uart0_clk: uart0_clk@15 {
+                                               #clock-cells = <0>;
+                                               reg = <15>;
+                                       };
+
+                                       uart1_clk: uart1_clk@16 {
+                                               #clock-cells = <0>;
+                                               reg = <16>;
+                                       };
+
+                                       tcb_clk: tcb_clk@17 {
+                                               #clock-cells = <0>;
+                                               reg = <17>;
+                                       };
+
+                                       pwm_clk: pwm_clk@18 {
+                                               #clock-cells = <0>;
+                                               reg = <18>;
+                                       };
+
+                                       adc_clk: adc_clk@19 {
+                                               #clock-cells = <0>;
+                                               reg = <19>;
+                                       };
+
+                                       dma0_clk: dma0_clk@20 {
+                                               #clock-cells = <0>;
+                                               reg = <20>;
+                                       };
+
+                                       uhphs_clk: uhphs_clk@22 {
+                                               #clock-cells = <0>;
+                                               reg = <22>;
+                                       };
+
+                                       udphs_clk: udphs_clk@23 {
+                                               #clock-cells = <0>;
+                                               reg = <23>;
+                                       };
+
+                                       lcdc_clk: lcdc_clk@25 {
+                                               #clock-cells = <0>;
+                                               reg = <25>;
+                                       };
+
+                                       sha_clk: sha_clk@27 {
+                                               #clock-cells = <0>;
+                                               reg = <27>;
+                                       };
+
+                                       ssc0_clk: ssc0_clk@28 {
+                                               #clock-cells = <0>;
+                                               reg = <28>;
+                                       };
+
+                                       aes_clk: aes_clk@29 {
+                                               #clock-cells = <0>;
+                                               reg = <29>;
+                                       };
+
+                                       trng_clk: trng_clk@30 {
+                                               #clock-cells = <0>;
+                                               reg = <30>;
+                                       };
+                               };
+                       };
+
+                       rstc@fffffe00 {
+                               compatible = "atmel,at91sam9g45-rstc";
+                               reg = <0xfffffe00 0x10>;
+                               clocks = <&clk32k>;
+                       };
+
+                       pit: timer@fffffe30 {
+                               compatible = "atmel,at91sam9260-pit";
+                               reg = <0xfffffe30 0xf>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&mck>;
+                       };
+
+                       shdwc@fffffe10 {
+                               compatible = "atmel,at91sam9x5-shdwc";
+                               reg = <0xfffffe10 0x10>;
+                               clocks = <&clk32k>;
+                       };
+
+                       sckc@fffffe50 {
+                               compatible = "atmel,at91sam9x5-sckc";
+                               reg = <0xfffffe50 0x4>;
+
+                               slow_osc: slow_osc {
+                                       compatible = "atmel,at91sam9x5-clk-slow-osc";
+                                       #clock-cells = <0>;
+                                       clocks = <&slow_xtal>;
+                               };
+
+                               slow_rc_osc: slow_rc_osc {
+                                       compatible = "atmel,at91sam9x5-clk-slow-rc-osc";
+                                       #clock-cells = <0>;
+                                       clock-frequency = <32768>;
+                                       clock-accuracy = <50000000>;
+                               };
+
+                               clk32k: slck {
+                                       compatible = "atmel,at91sam9x5-clk-slow";
+                                       #clock-cells = <0>;
+                                       clocks = <&slow_rc_osc>, <&slow_osc>;
+                               };
+                       };
+
+                       mmc0: mmc@f0008000 {
+                               compatible = "atmel,hsmci";
+                               reg = <0xf0008000 0x600>;
+                               interrupts = <12 IRQ_TYPE_LEVEL_HIGH 0>;
+                               dmas = <&dma 1 AT91_DMA_CFG_PER_ID(0)>;
+                               dma-names = "rxtx";
+                               clocks = <&mci0_clk>;
+                               clock-names = "mci_clk";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               status = "disabled";
+                       };
+
+                       tcb0: timer@f8008000 {
+                               compatible = "atmel,at91sam9x5-tcb";
+                               reg = <0xf8008000 0x100>;
+                               interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tcb_clk>, <&clk32k>;
+                               clock-names = "t0_clk", "slow_clk";
+                       };
+
+                       tcb1: timer@f800c000 {
+                               compatible = "atmel,at91sam9x5-tcb";
+                               reg = <0xf800c000 0x100>;
+                               interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tcb_clk>, <&clk32k>;
+                               clock-names = "t0_clk", "slow_clk";
+                       };
+
+                       hlcdc: hlcdc@f8038000 {
+                               compatible = "atmel,at91sam9n12-hlcdc";
+                               reg = <0xf8038000 0x2000>;
+                               interrupts = <25 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>;
+                               clock-names = "periph_clk", "sys_clk", "slow_clk";
+                               status = "disabled";
+
+                               hlcdc-display-controller {
+                                       compatible = "atmel,hlcdc-display-controller";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       port@0 {
+                                               #address-cells = <1>;
+                                               #size-cells = <0>;
+                                               reg = <0>;
+                                       };
+                               };
+
+                               hlcdc_pwm: hlcdc-pwm {
+                                       compatible = "atmel,hlcdc-pwm";
+                                       pinctrl-names = "default";
+                                       pinctrl-0 = <&pinctrl_lcd_pwm>;
+                                       #pwm-cells = <3>;
+                               };
+                       };
+
+                       dma: dma-controller@ffffec00 {
+                               compatible = "atmel,at91sam9g45-dma";
+                               reg = <0xffffec00 0x200>;
+                               interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
+                               #dma-cells = <2>;
+                               clocks = <&dma0_clk>;
+                               clock-names = "dma_clk";
+                       };
+
+                       pinctrl@fffff400 {
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               compatible = "atmel,at91sam9x5-pinctrl", "atmel,at91rm9200-pinctrl", "simple-bus";
+                               ranges = <0xfffff400 0xfffff400 0x800>;
+                               reg = <0xfffff400 0x200
+                                      0xfffff600 0x200
+                                      0xfffff800 0x200
+                                      0xfffffa00 0x200
+                                     >;
+
+                               atmel,mux-mask = <
+                                     /*    A         B          C     */
+                                      0xffffffff 0xffe07983 0x00000000  /* pioA */
+                                      0x00040000 0x00047e0f 0x00000000  /* pioB */
+                                      0xfdffffff 0x07c00000 0xb83fffff  /* pioC */
+                                      0x003fffff 0x003f8000 0x00000000  /* pioD */
+                                     >;
+                               u-boot,dm-pre-reloc;
+
+                               /* shared pinctrl settings */
+                               dbgu {
+                                       u-boot,dm-pre-reloc;
+                                       pinctrl_dbgu: dbgu-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
+                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               lcd {
+                                       pinctrl_lcd_base: lcd-base-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 27 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDVSYNC */
+                                                        AT91_PIOC 28 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDHSYNC */
+                                                        AT91_PIOC 24 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDDISP */
+                                                        AT91_PIOC 29 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDDEN */
+                                                        AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDPCK */
+                                       };
+
+                                       pinctrl_lcd_pwm: lcd-pwm-0 {
+                                               atmel,pins = <AT91_PIOC 26 AT91_PERIPH_A AT91_PINCTRL_NONE>;    /* LCDPWM */
+                                       };
+
+                                       pinctrl_lcd_rgb888: lcd-rgb-3 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD0 pin */
+                                                        AT91_PIOC 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD1 pin */
+                                                        AT91_PIOC 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD2 pin */
+                                                        AT91_PIOC 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD3 pin */
+                                                        AT91_PIOC 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD4 pin */
+                                                        AT91_PIOC 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD5 pin */
+                                                        AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD6 pin */
+                                                        AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD7 pin */
+                                                        AT91_PIOC 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD8 pin */
+                                                        AT91_PIOC 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD9 pin */
+                                                        AT91_PIOC 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD10 pin */
+                                                        AT91_PIOC 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD11 pin */
+                                                        AT91_PIOC 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD12 pin */
+                                                        AT91_PIOC 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD13 pin */
+                                                        AT91_PIOC 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD14 pin */
+                                                        AT91_PIOC 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD15 pin */
+                                                        AT91_PIOC 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD16 pin */
+                                                        AT91_PIOC 17 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD17 pin */
+                                                        AT91_PIOC 18 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD18 pin */
+                                                        AT91_PIOC 19 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD19 pin */
+                                                        AT91_PIOC 20 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD20 pin */
+                                                        AT91_PIOC 21 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD21 pin */
+                                                        AT91_PIOC 22 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD22 pin */
+                                                        AT91_PIOC 23 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD23 pin */
+                                       };
+                               };
+
+                               usart0 {
+                                       pinctrl_usart0: usart0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA1 periph A with pullup */
+                                                        AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PA0 periph A */
+                                       };
+
+                                       pinctrl_usart0_rts: usart0_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PA2 periph A */
+                                       };
+
+                                       pinctrl_usart0_cts: usart0_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PA3 periph A */
+                                       };
+                               };
+
+                               usart1 {
+                                       pinctrl_usart1: usart1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA6 periph A with pullup */
+                                                        AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PA5 periph A */
+                                       };
+                               };
+
+                               usart2 {
+                                       pinctrl_usart2: usart2-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA8 periph A with pullup */
+                                                        AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PA7 periph A */
+                                       };
+
+                                       pinctrl_usart2_rts: usart2_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 0 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* PB0 periph B */
+                                       };
+
+                                       pinctrl_usart2_cts: usart2_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 1 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* PB1 periph B */
+                                       };
+                               };
+
+                               usart3 {
+                                       pinctrl_usart3: usart3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* PC23 periph B with pullup */
+                                                        AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC22 periph B */
+                                       };
+
+                                       pinctrl_usart3_rts: usart3_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC24 periph B */
+                                       };
+
+                                       pinctrl_usart3_cts: usart3_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 25 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC25 periph B */
+                                       };
+                               };
+
+                               uart0 {
+                                       pinctrl_uart0: uart0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 9 AT91_PERIPH_C AT91_PINCTRL_PULL_UP /* PC9 periph C with pullup */
+                                                        AT91_PIOC 8 AT91_PERIPH_C AT91_PINCTRL_NONE>;  /* PC8 periph C */
+                                       };
+                               };
+
+                               uart1 {
+                                       pinctrl_uart1: uart1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 16 AT91_PERIPH_C AT91_PINCTRL_PULL_UP        /* PC17 periph C with pullup */
+                                                        AT91_PIOC 17 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PC16 periph C */
+                                       };
+                               };
+
+                               nand {
+                                       pinctrl_nand: nand-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 5 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP      /* PD5 gpio RDY pin pull_up*/
+                                                        AT91_PIOD 4 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;    /* PD4 gpio enable pin pull_up */
+                                       };
+                               };
+
+                               mmc0 {
+                                       pinctrl_mmc0_slot0_clk_cmd_dat0: mmc0_slot0_clk_cmd_dat0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA17 periph A */
+                                                        AT91_PIOA 16 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PA16 periph A with pullup */
+                                                        AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PA15 periph A with pullup */
+                                       };
+
+                                       pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PA18 periph A with pullup */
+                                                        AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PA19 periph A with pullup */
+                                                        AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PA20 periph A with pullup */
+                                       };
+
+                                       pinctrl_mmc0_slot0_dat4_7: mmc0_slot0_dat4_7-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 11 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* PA11 periph B with pullup */
+                                                        AT91_PIOA 12 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* PA12 periph B with pullup */
+                                                        AT91_PIOA 13 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* PA13 periph B with pullup */
+                                                        AT91_PIOA 14 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;      /* PA14 periph B with pullup */
+                                       };
+                               };
+
+                               ssc0 {
+                                       pinctrl_ssc0_tx: ssc0_tx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 24 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA24 periph B */
+                                                        AT91_PIOA 25 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA25 periph B */
+                                                        AT91_PIOA 26 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA26 periph B */
+                                       };
+
+                                       pinctrl_ssc0_rx: ssc0_rx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 27 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA27 periph B */
+                                                        AT91_PIOA 28 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA28 periph B */
+                                                        AT91_PIOA 29 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA29 periph B */
+                                       };
+                               };
+
+                               spi0 {
+                                       pinctrl_spi0: spi0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA11 periph A SPI0_MISO pin */
+                                                        AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA12 periph A SPI0_MOSI pin */
+                                                        AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA13 periph A SPI0_SPCK pin */
+                                       };
+                               };
+
+                               spi1 {
+                                       pinctrl_spi1: spi1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 21 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA21 periph B SPI1_MISO pin */
+                                                        AT91_PIOA 22 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA22 periph B SPI1_MOSI pin */
+                                                        AT91_PIOA 23 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA23 periph B SPI1_SPCK pin */
+                                       };
+                               };
+
+                               i2c0 {
+                                       pinctrl_i2c0: i2c0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_NONE
+                                                        AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               i2c1 {
+                                       pinctrl_i2c1: i2c1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 0 AT91_PERIPH_C AT91_PINCTRL_NONE
+                                                        AT91_PIOC 1 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               tcb0 {
+                                       pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
+                                               atmel,pins = <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tclk1: tcb0_tclk1-0 {
+                                               atmel,pins = <AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tclk2: tcb0_tclk2-0 {
+                                               atmel,pins = <AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tioa0: tcb0_tioa0-0 {
+                                               atmel,pins = <AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tioa1: tcb0_tioa1-0 {
+                                               atmel,pins = <AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tioa2: tcb0_tioa2-0 {
+                                               atmel,pins = <AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tiob0: tcb0_tiob0-0 {
+                                               atmel,pins = <AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tiob1: tcb0_tiob1-0 {
+                                               atmel,pins = <AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tiob2: tcb0_tiob2-0 {
+                                               atmel,pins = <AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               tcb1 {
+                                       pinctrl_tcb1_tclk0: tcb1_tclk0-0 {
+                                               atmel,pins = <AT91_PIOC 4 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tclk1: tcb1_tclk1-0 {
+                                               atmel,pins = <AT91_PIOC 7 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tclk2: tcb1_tclk2-0 {
+                                               atmel,pins = <AT91_PIOC 14 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tioa0: tcb1_tioa0-0 {
+                                               atmel,pins = <AT91_PIOC 2 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tioa1: tcb1_tioa1-0 {
+                                               atmel,pins = <AT91_PIOC 5 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tioa2: tcb1_tioa2-0 {
+                                               atmel,pins = <AT91_PIOC 12 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tiob0: tcb1_tiob0-0 {
+                                               atmel,pins = <AT91_PIOC 3 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tiob1: tcb1_tiob1-0 {
+                                               atmel,pins = <AT91_PIOC 6 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tiob2: tcb1_tiob2-0 {
+                                               atmel,pins = <AT91_PIOC 13 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+                               };
+                       };
+
+                       pioA: gpio@fffff400 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfffff400 0x200>;
+                               interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioAB_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       pioB: gpio@fffff600 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfffff600 0x200>;
+                               interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioAB_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       pioC: gpio@fffff800 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfffff800 0x200>;
+                               interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioCD_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       pioD: gpio@fffffa00 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfffffa00 0x200>;
+                               interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioCD_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       dbgu: serial@fffff200 {
+                               compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
+                               reg = <0xfffff200 0x200>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_dbgu>;
+                               clocks = <&mck>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       ssc0: ssc@f0010000 {
+                               compatible = "atmel,at91sam9g45-ssc";
+                               reg = <0xf0010000 0x4000>;
+                               interrupts = <28 IRQ_TYPE_LEVEL_HIGH 5>;
+                               dmas = <&dma 0 AT91_DMA_CFG_PER_ID(21)>,
+                                      <&dma 0 AT91_DMA_CFG_PER_ID(22)>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
+                               clocks = <&ssc0_clk>;
+                               clock-names = "pclk";
+                               status = "disabled";
+                       };
+
+                       usart0: serial@f801c000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf801c000 0x4000>;
+                               interrupts = <5 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart0>;
+                               clocks = <&usart0_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart1: serial@f8020000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf8020000 0x4000>;
+                               interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart1>;
+                               clocks = <&usart1_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart2: serial@f8024000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf8024000 0x4000>;
+                               interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart2>;
+                               clocks = <&usart2_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart3: serial@f8028000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf8028000 0x4000>;
+                               interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart3>;
+                               clocks = <&usart3_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       i2c0: i2c@f8010000 {
+                               compatible = "atmel,at91sam9x5-i2c";
+                               reg = <0xf8010000 0x100>;
+                               interrupts = <9 IRQ_TYPE_LEVEL_HIGH 6>;
+                               dmas = <&dma 1 AT91_DMA_CFG_PER_ID(13)>,
+                                      <&dma 1 AT91_DMA_CFG_PER_ID(14)>;
+                               dma-names = "tx", "rx";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_i2c0>;
+                               clocks = <&twi0_clk>;
+                               status = "disabled";
+                       };
+
+                       i2c1: i2c@f8014000 {
+                               compatible = "atmel,at91sam9x5-i2c";
+                               reg = <0xf8014000 0x100>;
+                               interrupts = <10 IRQ_TYPE_LEVEL_HIGH 6>;
+                               dmas = <&dma 1 AT91_DMA_CFG_PER_ID(15)>,
+                                      <&dma 1 AT91_DMA_CFG_PER_ID(16)>;
+                               dma-names = "tx", "rx";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_i2c1>;
+                               clocks = <&twi1_clk>;
+                               status = "disabled";
+                       };
+
+                       spi0: spi@f0000000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91rm9200-spi";
+                               reg = <0xf0000000 0x100>;
+                               interrupts = <13 IRQ_TYPE_LEVEL_HIGH 3>;
+                               dmas = <&dma 1 AT91_DMA_CFG_PER_ID(1)>,
+                                      <&dma 1 AT91_DMA_CFG_PER_ID(2)>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_spi0>;
+                               clocks = <&spi0_clk>;
+                               clock-names = "spi_clk";
+                               status = "disabled";
+                       };
+
+                       spi1: spi@f0004000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91rm9200-spi";
+                               reg = <0xf0004000 0x100>;
+                               interrupts = <14 IRQ_TYPE_LEVEL_HIGH 3>;
+                               dmas = <&dma 1 AT91_DMA_CFG_PER_ID(3)>,
+                                      <&dma 1 AT91_DMA_CFG_PER_ID(4)>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_spi1>;
+                               clocks = <&spi1_clk>;
+                               clock-names = "spi_clk";
+                               status = "disabled";
+                       };
+
+                       watchdog@fffffe40 {
+                               compatible = "atmel,at91sam9260-wdt";
+                               reg = <0xfffffe40 0x10>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&clk32k>;
+                               atmel,watchdog-type = "hardware";
+                               atmel,reset-type = "all";
+                               atmel,dbg-halt;
+                               status = "disabled";
+                       };
+
+                       rtc@fffffeb0 {
+                               compatible = "atmel,at91rm9200-rtc";
+                               reg = <0xfffffeb0 0x40>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&clk32k>;
+                               status = "disabled";
+                       };
+
+                       pwm0: pwm@f8034000 {
+                               compatible = "atmel,at91sam9rl-pwm";
+                               reg = <0xf8034000 0x300>;
+                               interrupts = <18 IRQ_TYPE_LEVEL_HIGH 4>;
+                               #pwm-cells = <3>;
+                               clocks = <&pwm_clk>;
+                               status = "disabled";
+                       };
+
+                       usb1: gadget@f803c000 {
+                               compatible = "atmel,at91sam9260-udc";
+                               reg = <0xf803c000 0x4000>;
+                               interrupts = <23 IRQ_TYPE_LEVEL_HIGH 2>;
+                               clocks = <&udphs_clk>, <&udpck>;
+                               clock-names = "pclk", "hclk";
+                               status = "disabled";
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       compatible = "atmel,at91rm9200-nand";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = < 0x40000000 0x10000000
+                               0xffffe000 0x00000600
+                               0xffffe600 0x00000200
+                               0x00108000 0x00018000
+                              >;
+                       atmel,pmecc-lookup-table-offset = <0x0 0x8000>;
+                       atmel,nand-addr-offset = <21>;
+                       atmel,nand-cmd-offset = <22>;
+                       atmel,nand-has-dma;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_nand>;
+                       gpios = <&pioD 5 GPIO_ACTIVE_HIGH
+                                &pioD 4 GPIO_ACTIVE_HIGH
+                                0
+                               >;
+                       status = "disabled";
+               };
+
+               usb0: ohci@00500000 {
+                       compatible = "atmel,at91rm9200-ohci", "usb-ohci";
+                       reg = <0x00500000 0x00100000>;
+                       interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
+                       clocks = <&uhphs_clk>, <&uhphs_clk>, <&uhpck>;
+                       clock-names = "ohci_clk", "hclk", "uhpck";
+                       status = "disabled";
+               };
+       };
+
+       i2c-gpio-0 {
+               compatible = "i2c-gpio";
+               gpios = <&pioA 30 GPIO_ACTIVE_HIGH /* sda */
+                        &pioA 31 GPIO_ACTIVE_HIGH /* scl */
+                       >;
+               i2c-gpio,sda-open-drain;
+               i2c-gpio,scl-open-drain;
+               i2c-gpio,delay-us = <2>;        /* ~100 kHz */
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+};
diff --git a/arch/arm/dts/at91sam9n12ek.dts b/arch/arm/dts/at91sam9n12ek.dts
new file mode 100644 (file)
index 0000000..888bda1
--- /dev/null
@@ -0,0 +1,265 @@
+/*
+ * at91sam9n12ek.dts - Device Tree file for AT91SAM9N12-EK board
+ *
+ *  Copyright (C) 2012 Atmel,
+ *                2012 Hong Xu <hong.xu@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+#include "at91sam9n12.dtsi"
+
+/ {
+       model = "Atmel AT91SAM9N12-EK";
+       compatible = "atmel,at91sam9n12ek", "atmel,at91sam9n12", "atmel,at91sam9";
+
+       chosen {
+               bootargs = "root=/dev/mtdblock1 rw rootfstype=jffs2";
+               stdout-path = "serial0:115200n8";
+               u-boot,dm-pre-reloc;
+       };
+
+       memory {
+               reg = <0x20000000 0x8000000>;
+       };
+
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <16000000>;
+               };
+       };
+
+       ahb {
+               apb {
+                       dbgu: serial@fffff200 {
+                               u-boot,dm-pre-reloc;
+                               status = "okay";
+                       };
+
+                       ssc0: ssc@f0010000 {
+                               status = "okay";
+                       };
+
+                       i2c0: i2c@f8010000 {
+                               status = "okay";
+
+                               wm8904: codec@1a {
+                                       compatible = "wlf,wm8904";
+                                       reg = <0x1a>;
+                                       clocks = <&pck0>;
+                                       clock-names = "mclk";
+                               };
+
+                               qt1070: keyboard@1b {
+                                       compatible = "qt1070";
+                                       reg = <0x1b>;
+                                       interrupt-parent = <&pioA>;
+                                       interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
+                                       pinctrl-names = "default";
+                                       pinctrl-0 = <&pinctrl_qt1070_irq>;
+                               };
+                       };
+
+                       mmc0: mmc@f0008000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <
+                                       &pinctrl_board_mmc0
+                                       &pinctrl_mmc0_slot0_clk_cmd_dat0
+                                       &pinctrl_mmc0_slot0_dat1_3>;
+                               status = "okay";
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioA 7 GPIO_ACTIVE_HIGH>;
+                               };
+                       };
+
+                       pinctrl@fffff400 {
+                               mmc0 {
+                                       pinctrl_board_mmc0: mmc0-board {
+                                               atmel,pins =
+                                                       <AT91_PIOA 7 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;   /* PA7 gpio CD pin pull up and deglitch */
+                                       };
+                               };
+
+                               qt1070 {
+                                       pinctrl_qt1070_irq: qt1070_irq {
+                                               atmel,pins =
+                                                       <AT91_PIOA 2 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+                                       };
+                               };
+
+                               sound {
+                                       pinctrl_pck0_as_audio_mck: pck0_as_audio_mck {
+                                               atmel,pins =
+                                                       <AT91_PIOB 10 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               usb1 {
+                                       pinctrl_usb1_vbus_sense: usb1_vbus_sense {
+                                               atmel,pins =
+                                                       <AT91_PIOB 16 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;  /* PB16 gpio usb vbus sense, no pull up and deglitch */
+                                       };
+                               };
+                       };
+
+                       spi0: spi@f0000000 {
+                               status = "okay";
+                               cs-gpios = <&pioA 14 0>, <0>, <0>, <0>;
+                               spi_flash@0 {
+                                       compatible = "spi-flash";
+                                       spi-max-frequency = <50000000>;
+                                       reg = <0>;
+                               };
+                       };
+
+                       hlcdc: hlcdc@f8038000 {
+                               status = "okay";
+
+                               hlcdc-display-controller {
+                                       pinctrl-names = "default";
+                                       pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>;
+
+                                       port@0 {
+                                               hlcdc_panel_output: endpoint@0 {
+                                                       reg = <0>;
+                                                       remote-endpoint = <&panel_input>;
+                                               };
+                                       };
+                               };
+                       };
+
+                       usb1: gadget@f803c000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usb1_vbus_sense>;
+                               atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>;
+                               status = "okay";
+                       };
+
+                       watchdog@fffffe40 {
+                               status = "okay";
+                       };
+
+                       rtc@fffffeb0 {
+                               status = "okay";
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "hw";
+                       atmel,has-pmecc;
+                       atmel,pmecc-cap = <2>;
+                       atmel,pmecc-sector-size = <512>;
+                       nand-on-flash-bbt;
+                       status = "okay";
+               };
+
+               usb0: ohci@00500000 {
+                       num-ports = <1>;
+                       atmel,vbus-gpio = <&pioB 7 GPIO_ACTIVE_LOW>;
+                       status = "okay";
+               };
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&hlcdc_pwm 0 50000 0>;
+               brightness-levels = <0 4 8 16 32 64 128 255>;
+               default-brightness-level = <6>;
+               power-supply = <&bl_reg>;
+               status = "okay";
+       };
+
+       bl_reg: backlight_regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "backlight-power-supply";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               status = "okay";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               d8 {
+                       label = "d8";
+                       gpios = <&pioB 4 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "mmc0";
+               };
+
+               d9 {
+                       label = "d9";
+                       gpios = <&pioB 5 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "nand-disk";
+               };
+
+               d10 {
+                       label = "d10";
+                       gpios = <&pioB 6 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+
+               enter {
+                       label = "Enter";
+                       gpios = <&pioB 3 GPIO_ACTIVE_LOW>;
+                       linux,code = <28>;
+                       wakeup-source;
+               };
+       };
+
+       panel: panel {
+               compatible = "qiaodian,qd43003c0-40", "simple-panel";
+               backlight = <&backlight>;
+               power-supply = <&panel_reg>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "okay";
+
+               port@0 {
+                       reg = <0>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       panel_input: endpoint@0 {
+                               reg = <0>;
+                               remote-endpoint = <&hlcdc_panel_output>;
+                       };
+               };
+       };
+
+       panel_reg: panel_regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "panel-power-supply";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               status = "okay";
+       };
+
+       sound {
+               compatible = "atmel,asoc-wm8904";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_pck0_as_audio_mck>;
+
+               atmel,model = "wm8904 @ AT91SAM9N12";
+               atmel,audio-routing =
+                       "Headphone Jack", "HPOUTL",
+                       "Headphone Jack", "HPOUTR",
+                       "IN2L", "Line In Jack",
+                       "IN2R", "Line In Jack",
+                       "Mic", "MICBIAS",
+                       "IN1L", "Mic";
+
+               atmel,ssc-controller = <&ssc0>;
+               atmel,audio-codec = <&wm8904>;
+       };
+};
diff --git a/arch/arm/dts/at91sam9rl.dtsi b/arch/arm/dts/at91sam9rl.dtsi
new file mode 100644 (file)
index 0000000..8249994
--- /dev/null
@@ -0,0 +1,1139 @@
+/*
+ * at91sam9rl.dtsi - Device Tree Include file for AT91SAM9RL family SoC
+ *
+ *  Copyright (C) 2014 Alexandre Belloni <alexandre.belloni@free-electrons.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+#include "skeleton.dtsi"
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/clock/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pwm/pwm.h>
+
+/ {
+       model = "Atmel AT91SAM9RL family SoC";
+       compatible = "atmel,at91sam9rl", "atmel,at91sam9";
+       interrupt-parent = <&aic>;
+
+       aliases {
+               serial0 = &dbgu;
+               serial1 = &usart0;
+               serial2 = &usart1;
+               serial3 = &usart2;
+               serial4 = &usart3;
+               gpio0 = &pioA;
+               gpio1 = &pioB;
+               gpio2 = &pioC;
+               gpio3 = &pioD;
+               tcb0 = &tcb0;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               ssc0 = &ssc0;
+               ssc1 = &ssc1;
+               pwm0 = &pwm0;
+       };
+
+       cpus {
+               #address-cells = <0>;
+               #size-cells = <0>;
+
+               cpu {
+                       compatible = "arm,arm926ej-s";
+                       device_type = "cpu";
+               };
+       };
+
+       memory {
+               reg = <0x20000000 0x04000000>;
+       };
+
+       clocks {
+               slow_xtal: slow_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+
+               main_xtal: main_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+
+               adc_op_clk: adc_op_clk{
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <1000000>;
+               };
+       };
+
+       sram: sram@00300000 {
+               compatible = "mmio-sram";
+               reg = <0x00300000 0x10000>;
+       };
+
+       ahb {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               u-boot,dm-pre-reloc;
+
+               fb0: fb@00500000 {
+                       compatible = "atmel,at91sam9rl-lcdc";
+                       reg = <0x00500000 0x1000>;
+                       interrupts = <23 IRQ_TYPE_LEVEL_HIGH 3>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_fb>;
+                       clocks = <&lcd_clk>, <&lcd_clk>;
+                       clock-names = "hclk", "lcdc_clk";
+                       status = "disabled";
+               };
+
+               nand0: nand@40000000 {
+                       compatible = "atmel,at91rm9200-nand";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = <0x40000000 0x10000000>,
+                             <0xffffe800 0x200>;
+                       atmel,nand-addr-offset = <21>;
+                       atmel,nand-cmd-offset = <22>;
+                       atmel,nand-has-dma;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_nand>;
+                       gpios = <&pioD 17 GPIO_ACTIVE_HIGH>,
+                               <&pioB 6 GPIO_ACTIVE_HIGH>,
+                               <0>;
+                       status = "disabled";
+               };
+
+               apb {
+                       compatible = "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+                       u-boot,dm-pre-reloc;
+
+                       tcb0: timer@fffa0000 {
+                               compatible = "atmel,at91rm9200-tcb";
+                               reg = <0xfffa0000 0x100>;
+                               interrupts = <16 IRQ_TYPE_LEVEL_HIGH 0>,
+                                            <17 IRQ_TYPE_LEVEL_HIGH 0>,
+                                            <18 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tc0_clk>, <&tc1_clk>, <&tc2_clk>, <&clk32k>;
+                               clock-names = "t0_clk", "t1_clk", "t2_clk", "slow_clk";
+                       };
+
+                       mmc0: mmc@fffa4000 {
+                               compatible = "atmel,hsmci";
+                               reg = <0xfffa4000 0x600>;
+                               interrupts = <10 IRQ_TYPE_LEVEL_HIGH 0>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               pinctrl-names = "default";
+                               clocks = <&mci0_clk>;
+                               clock-names = "mci_clk";
+                               status = "disabled";
+                       };
+
+                       i2c0: i2c@fffa8000 {
+                               compatible = "atmel,at91sam9260-i2c";
+                               reg = <0xfffa8000 0x100>;
+                               interrupts = <11 IRQ_TYPE_LEVEL_HIGH 6>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&twi0_clk>;
+                               status = "disabled";
+                       };
+
+                       i2c1: i2c@fffac000 {
+                               compatible = "atmel,at91sam9260-i2c";
+                               reg = <0xfffac000 0x100>;
+                               interrupts = <12 IRQ_TYPE_LEVEL_HIGH 6>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               status = "disabled";
+                       };
+
+                       usart0: serial@fffb0000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffb0000 0x200>;
+                               interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart0>;
+                               clocks = <&usart0_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart1: serial@fffb4000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffb4000 0x200>;
+                               interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart1>;
+                               clocks = <&usart1_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart2: serial@fffb8000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffb8000 0x200>;
+                               interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart2>;
+                               clocks = <&usart2_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart3: serial@fffbc000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffbc000 0x200>;
+                               interrupts = <9 IRQ_TYPE_LEVEL_HIGH 5>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart3>;
+                               clocks = <&usart3_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       ssc0: ssc@fffc0000 {
+                               compatible = "atmel,at91sam9rl-ssc";
+                               reg = <0xfffc0000 0x4000>;
+                               interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
+                               status = "disabled";
+                       };
+
+                       ssc1: ssc@fffc4000 {
+                               compatible = "atmel,at91sam9rl-ssc";
+                               reg = <0xfffc4000 0x4000>;
+                               interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
+                               status = "disabled";
+                       };
+
+                       pwm0: pwm@fffc8000 {
+                               compatible = "atmel,at91sam9rl-pwm";
+                               reg = <0xfffc8000 0x300>;
+                               interrupts = <19 IRQ_TYPE_LEVEL_HIGH 4>;
+                               #pwm-cells = <3>;
+                               clocks = <&pwm_clk>;
+                               clock-names = "pwm_clk";
+                               status = "disabled";
+                       };
+
+                       spi0: spi@fffcc000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91rm9200-spi";
+                               reg = <0xfffcc000 0x200>;
+                               interrupts = <13 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_spi0>;
+                               clocks = <&spi0_clk>;
+                               clock-names = "spi_clk";
+                               status = "disabled";
+                       };
+
+                       adc0: adc@fffd0000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91sam9rl-adc";
+                               reg = <0xfffd0000 0x100>;
+                               interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&adc_clk>, <&adc_op_clk>;
+                               clock-names = "adc_clk", "adc_op_clk";
+                               atmel,adc-use-external-triggers;
+                               atmel,adc-channels-used = <0x3f>;
+                               atmel,adc-vref = <3300>;
+                               atmel,adc-startup-time = <40>;
+                               atmel,adc-res = <8 10>;
+                               atmel,adc-res-names = "lowres", "highres";
+                               atmel,adc-use-res = "highres";
+
+                               trigger0 {
+                                       trigger-name = "timer-counter-0";
+                                       trigger-value = <0x1>;
+                               };
+                               trigger1 {
+                                       trigger-name = "timer-counter-1";
+                                       trigger-value = <0x3>;
+                               };
+
+                               trigger2 {
+                                       trigger-name = "timer-counter-2";
+                                       trigger-value = <0x5>;
+                               };
+
+                               trigger3 {
+                                       trigger-name = "external";
+                                       trigger-value = <0x13>;
+                                       trigger-external;
+                               };
+                       };
+
+                       usb0: gadget@fffd4000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91sam9rl-udc";
+                               reg = <0x00600000 0x100000>,
+                                     <0xfffd4000 0x4000>;
+                               interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
+                               clocks = <&udphs_clk>, <&utmi>;
+                               clock-names = "pclk", "hclk";
+                               status = "disabled";
+
+                               ep@0 {
+                                       reg = <0>;
+                                       atmel,fifo-size = <64>;
+                                       atmel,nb-banks = <1>;
+                               };
+
+                               ep@1 {
+                                       reg = <1>;
+                                       atmel,fifo-size = <1024>;
+                                       atmel,nb-banks = <2>;
+                                       atmel,can-dma;
+                                       atmel,can-isoc;
+                               };
+
+                               ep@2 {
+                                       reg = <2>;
+                                       atmel,fifo-size = <1024>;
+                                       atmel,nb-banks = <2>;
+                                       atmel,can-dma;
+                                       atmel,can-isoc;
+                               };
+
+                               ep@3 {
+                                       reg = <3>;
+                                       atmel,fifo-size = <1024>;
+                                       atmel,nb-banks = <3>;
+                                       atmel,can-dma;
+                               };
+
+                               ep@4 {
+                                       reg = <4>;
+                                       atmel,fifo-size = <1024>;
+                                       atmel,nb-banks = <3>;
+                                       atmel,can-dma;
+                               };
+
+                               ep@5 {
+                                       reg = <5>;
+                                       atmel,fifo-size = <1024>;
+                                       atmel,nb-banks = <3>;
+                                       atmel,can-dma;
+                                       atmel,can-isoc;
+                               };
+
+                               ep@6 {
+                                       reg = <6>;
+                                       atmel,fifo-size = <1024>;
+                                       atmel,nb-banks = <3>;
+                                       atmel,can-dma;
+                                       atmel,can-isoc;
+                               };
+                       };
+
+                       dma0: dma-controller@ffffe600 {
+                               compatible = "atmel,at91sam9rl-dma";
+                               reg = <0xffffe600 0x200>;
+                               interrupts = <21 IRQ_TYPE_LEVEL_HIGH 0>;
+                               #dma-cells = <2>;
+                               clocks = <&dma0_clk>;
+                               clock-names = "dma_clk";
+                       };
+
+                       ramc0: ramc@ffffea00 {
+                               compatible = "atmel,at91sam9260-sdramc";
+                               reg = <0xffffea00 0x200>;
+                       };
+
+                       aic: interrupt-controller@fffff000 {
+                               #interrupt-cells = <3>;
+                               compatible = "atmel,at91rm9200-aic";
+                               interrupt-controller;
+                               reg = <0xfffff000 0x200>;
+                               atmel,external-irqs = <31>;
+                       };
+
+                       dbgu: serial@fffff200 {
+                               compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
+                               reg = <0xfffff200 0x200>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_dbgu>;
+                               clocks = <&mck>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       pinctrl@fffff400 {
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
+                               ranges = <0xfffff400 0xfffff400 0x800>;
+                               reg = <0xfffff400 0x200
+                                      0xfffff600 0x200
+                                      0xfffff800 0x200
+                                      0xfffffa00 0x200
+                                     >;
+
+                               atmel,mux-mask =
+                                       /*    A         B     */
+                                       <0xffffffff 0xe05c6738>,  /* pioA */
+                                       <0xffffffff 0x0000c780>,  /* pioB */
+                                       <0xffffffff 0xe3ffff0e>,  /* pioC */
+                                       <0x003fffff 0x0001ff3c>;  /* pioD */
+                               u-boot,dm-pre-reloc;
+
+                               /* shared pinctrl settings */
+                               adc0 {
+                                       pinctrl_adc0_ts: adc0_ts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_adc0_ad0: adc0_ad0-0 {
+                                               atmel,pins = <AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_adc0_ad1: adc0_ad1-0 {
+                                               atmel,pins = <AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_adc0_ad2: adc0_ad2-0 {
+                                               atmel,pins = <AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_adc0_ad3: adc0_ad3-0 {
+                                               atmel,pins = <AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_adc0_ad4: adc0_ad4-0 {
+                                               atmel,pins = <AT91_PIOD 6 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_adc0_ad5: adc0_ad5-0 {
+                                               atmel,pins = <AT91_PIOD 7 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_adc0_adtrg: adc0_adtrg-0 {
+                                               atmel,pins = <AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               dbgu {
+                                       u-boot,dm-pre-reloc;
+                                       pinctrl_dbgu: dbgu-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
+                                                       <AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               fb {
+                                       pinctrl_fb: fb-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 3 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 5 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 9 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 10 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 11 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 12 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 13 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 15 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 16 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 17 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 18 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 19 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 20 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 21 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 25 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               i2c_gpio0 {
+                                       pinctrl_i2c_gpio0: i2c_gpio0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 23 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>,
+                                                       <AT91_PIOA 24 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;
+                                       };
+                               };
+
+                               i2c_gpio1 {
+                                       pinctrl_i2c_gpio1: i2c_gpio1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 10 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>,
+                                                       <AT91_PIOD 11 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;
+                                       };
+                               };
+
+                               mmc0 {
+                                       pinctrl_mmc0_clk: mmc0_clk-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_mmc0_slot0_cmd_dat0: mmc0_slot0_cmd_dat0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
+                                                       <AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
+                                       };
+
+                                       pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
+                                                       <AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
+                                                       <AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
+                                       };
+                               };
+
+                               nand {
+                                       pinctrl_nand: nand-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 17 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>,
+                                                       <AT91_PIOB 6 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
+                                       };
+
+                                       pinctrl_nand0_ale_cle: nand_ale_cle-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_nand0_oe_we: nand_oe_we-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_nand0_cs: nand_cs-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               pwm0 {
+                                       pinctrl_pwm0_pwm0_0: pwm0_pwm0-0 {
+                                               atmel,pins = <AT91_PIOB 8 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_pwm0_pwm0_1: pwm0_pwm0-1 {
+                                               atmel,pins = <AT91_PIOC 2 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_pwm0_pwm0_2: pwm0_pwm0-2 {
+                                               atmel,pins = <AT91_PIOD 14 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_pwm0_pwm1_0: pwm0_pwm1-0 {
+                                               atmel,pins = <AT91_PIOB 9 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_pwm0_pwm1_1: pwm0_pwm1-1 {
+                                               atmel,pins = <AT91_PIOC 3 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_pwm0_pwm1_2: pwm0_pwm1-2 {
+                                               atmel,pins = <AT91_PIOD 15 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_pwm0_pwm2_0: pwm0_pwm2-0 {
+                                               atmel,pins = <AT91_PIOD 5 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_pwm0_pwm2_1: pwm0_pwm2-1 {
+                                               atmel,pins = <AT91_PIOD 12 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_pwm0_pwm2_2: pwm0_pwm2-2 {
+                                               atmel,pins = <AT91_PIOD 16 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_pwm0_pwm3_0: pwm0_pwm3-0 {
+                                               atmel,pins = <AT91_PIOD 8 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_pwm0_pwm3_1: pwm0_pwm3-1 {
+                                               atmel,pins = <AT91_PIOD 18 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               spi0 {
+                                       pinctrl_spi0: spi0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               ssc0 {
+                                       pinctrl_ssc0_tx: ssc0_tx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 0 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOC 1 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_ssc0_rx: ssc0_rx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 10 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 16 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 22 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               ssc1 {
+                                       pinctrl_ssc1_tx: ssc1_tx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 13 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 29 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 30 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_ssc1_rx: ssc1_rx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 8 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 9 AT91_PERIPH_B AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 14 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               tcb0 {
+                                       pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
+                                               atmel,pins = <AT91_PIOA 3 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tclk1: tcb0_tclk1-0 {
+                                               atmel,pins = <AT91_PIOC 31 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tclk2: tcb0_tclk2-0 {
+                                               atmel,pins = <AT91_PIOD 21 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tioa0: tcb0_tioa0-0 {
+                                               atmel,pins = <AT91_PIOA 4 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tioa1: tcb0_tioa1-0 {
+                                               atmel,pins = <AT91_PIOC 29 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tioa2: tcb0_tioa2-0 {
+                                               atmel,pins = <AT91_PIOD 10 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tiob0: tcb0_tiob0-0 {
+                                               atmel,pins = <AT91_PIOA 5 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tiob1: tcb0_tiob1-0 {
+                                               atmel,pins = <AT91_PIOC 30 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tiob2: tcb0_tiob2-0 {
+                                               atmel,pins = <AT91_PIOD 11 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               usart0 {
+                                       pinctrl_usart0: usart0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
+                                       };
+
+                                       pinctrl_usart0_rts: usart0_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart0_cts: usart0_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart0_dtr_dsr: usart0_dtr_dsr-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 14 AT91_PERIPH_A AT91_PINCTRL_NONE>,
+                                                       <AT91_PIOD 15 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart0_dcd: usart0_dcd-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 16 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart0_ri: usart0_ri-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 17 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart0_sck: usart0_sck-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               usart1 {
+                                       pinctrl_usart1: usart1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
+                                                       <AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart1_rts: usart1_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 18 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart1_cts: usart1_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 19 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart1_sck: usart1_sck-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 2 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               usart2 {
+                                       pinctrl_usart2: usart2-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
+                                                       <AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart2_rts: usart2_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart2_cts: usart2_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart2_sck: usart2_sck-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 9 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               usart3 {
+                                       pinctrl_usart3: usart3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
+                                                       <AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart3_rts: usart3_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 4 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart3_cts: usart3_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 3 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_usart3_sck: usart3_sck-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 20 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                               };
+                       };
+
+                       pioA: gpio@fffff400 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff400 0x200>;
+                               interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioA_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       pioB: gpio@fffff600 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff600 0x200>;
+                               interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioB_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       pioC: gpio@fffff800 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff800 0x200>;
+                               interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioC_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       pioD: gpio@fffffa00 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffffa00 0x200>;
+                               interrupts = <5 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioD_clk>;
+                               u-boot,dm-pre-reloc;
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               compatible = "atmel,at91sam9g45-pmc", "syscon";
+                               reg = <0xfffffc00 0x100>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               interrupt-controller;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               #interrupt-cells = <1>;
+                               u-boot,dm-pre-reloc;
+
+                               main: mainck {
+                                       compatible = "atmel,at91rm9200-clk-main";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MOSCS>;
+                                       clocks = <&main_xtal>;
+                               };
+
+                               plla: pllack@0 {
+                                       compatible = "atmel,at91rm9200-clk-pll";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_LOCKA>;
+                                       clocks = <&main>;
+                                       reg = <0>;
+                                       atmel,clk-input-range = <1000000 32000000>;
+                                       #atmel,pll-clk-output-range-cells = <3>;
+                                       atmel,pll-clk-output-ranges = <80000000 200000000 0>,
+                                                               <190000000 240000000 2>;
+                               };
+
+                               utmi: utmick {
+                                       compatible = "atmel,at91sam9x5-clk-utmi";
+                                       #clock-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       interrupts = <AT91_PMC_LOCKU>;
+                                       clocks = <&main>;
+                               };
+
+                               mck: masterck {
+                                       compatible = "atmel,at91rm9200-clk-master";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MCKRDY>;
+                                       clocks = <&clk32k>, <&main>, <&plla>, <&utmi>;
+                                       atmel,clk-output-range = <0 94000000>;
+                                       atmel,clk-divisors = <1 2 4 0>;
+                                       u-boot,dm-pre-reloc;
+                               };
+
+                               prog: progck {
+                                       compatible = "atmel,at91rm9200-clk-programmable";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       clocks = <&clk32k>, <&main>, <&plla>, <&utmi>, <&mck>;
+
+                                       prog0: prog@0 {
+                                               #clock-cells = <0>;
+                                               reg = <0>;
+                                               interrupts = <AT91_PMC_PCKRDY(0)>;
+                                       };
+
+                                       prog1: prog@1 {
+                                               #clock-cells = <0>;
+                                               reg = <1>;
+                                               interrupts = <AT91_PMC_PCKRDY(1)>;
+                                       };
+                               };
+
+                               systemck {
+                                       compatible = "atmel,at91rm9200-clk-system";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       pck0: pck0@8 {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                               clocks = <&prog0>;
+                                       };
+
+                                       pck1: pck1@9 {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                               clocks = <&prog1>;
+                                       };
+
+                               };
+
+                               periphck {
+                                       compatible = "atmel,at91rm9200-clk-peripheral";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       clocks = <&mck>;
+                                       u-boot,dm-pre-reloc;
+
+                                       pioA_clk: pioA_clk@2 {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                               u-boot,dm-pre-reloc;
+                                       };
+
+                                       pioB_clk: pioB_clk@3 {
+                                               #clock-cells = <0>;
+                                               reg = <3>;
+                                               u-boot,dm-pre-reloc;
+                                       };
+
+                                       pioC_clk: pioC_clk@4 {
+                                               #clock-cells = <0>;
+                                               reg = <4>;
+                                               u-boot,dm-pre-reloc;
+                                       };
+
+                                       pioD_clk: pioD_clk@5 {
+                                               #clock-cells = <0>;
+                                               reg = <5>;
+                                               u-boot,dm-pre-reloc;
+                                       };
+
+                                       usart0_clk: usart0_clk@6 {
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                       };
+
+                                       usart1_clk: usart1_clk@7 {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                       };
+
+                                       usart2_clk: usart2_clk@8 {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                       };
+
+                                       usart3_clk: usart3_clk@9 {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                       };
+
+                                       mci0_clk: mci0_clk@10 {
+                                               #clock-cells = <0>;
+                                               reg = <10>;
+                                       };
+
+                                       twi0_clk: twi0_clk@11 {
+                                               #clock-cells = <0>;
+                                               reg = <11>;
+                                       };
+
+                                       twi1_clk: twi1_clk@12 {
+                                               #clock-cells = <0>;
+                                               reg = <12>;
+                                       };
+
+                                       spi0_clk: spi0_clk@13 {
+                                               #clock-cells = <0>;
+                                               reg = <13>;
+                                       };
+
+                                       ssc0_clk: ssc0_clk@14 {
+                                               #clock-cells = <0>;
+                                               reg = <14>;
+                                       };
+
+                                       ssc1_clk: ssc1_clk@15 {
+                                               #clock-cells = <0>;
+                                               reg = <15>;
+                                       };
+
+                                       tc0_clk: tc0_clk@16 {
+                                               #clock-cells = <0>;
+                                               reg = <16>;
+                                       };
+
+                                       tc1_clk: tc1_clk@17 {
+                                               #clock-cells = <0>;
+                                               reg = <17>;
+                                       };
+
+                                       tc2_clk: tc2_clk@18 {
+                                               #clock-cells = <0>;
+                                               reg = <18>;
+                                       };
+
+                                       pwm_clk: pwm_clk@19 {
+                                               #clock-cells = <0>;
+                                               reg = <19>;
+                                       };
+
+                                       adc_clk: adc_clk@20 {
+                                               #clock-cells = <0>;
+                                               reg = <20>;
+                                       };
+
+                                       dma0_clk: dma0_clk@21 {
+                                               #clock-cells = <0>;
+                                               reg = <21>;
+                                       };
+
+                                       udphs_clk: udphs_clk@22 {
+                                               #clock-cells = <0>;
+                                               reg = <22>;
+                                       };
+
+                                       lcd_clk: lcd_clk@23 {
+                                               #clock-cells = <0>;
+                                               reg = <23>;
+                                       };
+                               };
+                       };
+
+                       rstc@fffffd00 {
+                               compatible = "atmel,at91sam9260-rstc";
+                               reg = <0xfffffd00 0x10>;
+                               clocks = <&clk32k>;
+                       };
+
+                       shdwc@fffffd10 {
+                               compatible = "atmel,at91sam9260-shdwc";
+                               reg = <0xfffffd10 0x10>;
+                               clocks = <&clk32k>;
+                       };
+
+                       pit: timer@fffffd30 {
+                               compatible = "atmel,at91sam9260-pit";
+                               reg = <0xfffffd30 0xf>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&mck>;
+                       };
+
+                       watchdog@fffffd40 {
+                               compatible = "atmel,at91sam9260-wdt";
+                               reg = <0xfffffd40 0x10>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&clk32k>;
+                               status = "disabled";
+                       };
+
+                       sckc@fffffd50 {
+                               compatible = "atmel,at91sam9x5-sckc";
+                               reg = <0xfffffd50 0x4>;
+
+                               slow_osc: slow_osc {
+                                       compatible = "atmel,at91sam9x5-clk-slow-osc";
+                                       #clock-cells = <0>;
+                                       atmel,startup-time-usec = <1200000>;
+                                       clocks = <&slow_xtal>;
+                               };
+
+                               slow_rc_osc: slow_rc_osc {
+                                       compatible = "atmel,at91sam9x5-clk-slow-rc-osc";
+                                       #clock-cells = <0>;
+                                       atmel,startup-time-usec = <75>;
+                                       clock-frequency = <32768>;
+                                       clock-accuracy = <50000000>;
+                               };
+
+                               clk32k: slck {
+                                       compatible = "atmel,at91sam9x5-clk-slow";
+                                       #clock-cells = <0>;
+                                       clocks = <&slow_rc_osc &slow_osc>;
+                               };
+                       };
+
+                       rtc@fffffd20 {
+                               compatible = "atmel,at91sam9260-rtt";
+                               reg = <0xfffffd20 0x10>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&clk32k>;
+                               status = "disabled";
+                       };
+
+                       gpbr: syscon@fffffd60 {
+                               compatible = "atmel,at91sam9260-gpbr", "syscon";
+                               reg = <0xfffffd60 0x10>;
+                               status = "disabled";
+                       };
+
+                       rtc@fffffe00 {
+                               compatible = "atmel,at91rm9200-rtc";
+                               reg = <0xfffffe00 0x40>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&clk32k>;
+                               status = "disabled";
+                       };
+
+               };
+       };
+
+       i2c-gpio-0 {
+               compatible = "i2c-gpio";
+               gpios = <&pioA 23 GPIO_ACTIVE_HIGH>, /* sda */
+                       <&pioA 24 GPIO_ACTIVE_HIGH>; /* scl */
+               i2c-gpio,sda-open-drain;
+               i2c-gpio,scl-open-drain;
+               i2c-gpio,delay-us = <2>;        /* ~100 kHz */
+               #address-cells = <1>;
+               #size-cells = <0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c_gpio0>;
+               status = "disabled";
+       };
+
+       i2c-gpio-1 {
+               compatible = "i2c-gpio";
+               gpios = <&pioD 10 GPIO_ACTIVE_HIGH>, /* sda */
+                       <&pioD 11 GPIO_ACTIVE_HIGH>; /* scl */
+               i2c-gpio,sda-open-drain;
+               i2c-gpio,scl-open-drain;
+               i2c-gpio,delay-us = <2>;        /* ~100 kHz */
+               #address-cells = <1>;
+               #size-cells = <0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c_gpio1>;
+               status = "disabled";
+       };
+};
diff --git a/arch/arm/dts/at91sam9rlek.dts b/arch/arm/dts/at91sam9rlek.dts
new file mode 100644 (file)
index 0000000..ae42697
--- /dev/null
@@ -0,0 +1,239 @@
+/*
+ * at91sam9rlek.dts - Device Tree file for Atmel at91sam9rl reference board
+ *
+ *  Copyright (C) 2014  Alexandre Belloni <alexandre.belloni@free-electrons.com>
+ *
+ * Licensed under GPLv2 only
+ */
+/dts-v1/;
+#include "at91sam9rl.dtsi"
+
+/ {
+       model = "Atmel at91sam9rlek";
+       compatible = "atmel,at91sam9rlek", "atmel,at91sam9rl", "atmel,at91sam9";
+
+       chosen {
+               bootargs = "rootfstype=ubifs root=ubi0:rootfs ubi.mtd=5 rw";
+               stdout-path = "serial0:115200n8";
+               u-boot,dm-pre-reloc;
+       };
+
+       memory {
+               reg = <0x20000000 0x4000000>;
+       };
+
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <12000000>;
+               };
+       };
+
+       ahb {
+               fb0: fb@00500000 {
+                       display = <&display0>;
+                       status = "okay";
+
+                       display0: display {
+                               bits-per-pixel = <16>;
+                               atmel,lcdcon-backlight;
+                               atmel,dmacon = <0x1>;
+                               atmel,lcdcon2 = <0x80008002>;
+                               atmel,guard-time = <1>;
+                               atmel,lcd-wiring-mode = "RGB";
+
+                               display-timings {
+                                       native-mode = <&timing0>;
+                                       timing0: timing0 {
+                                               clock-frequency = <4965000>;
+                                               hactive = <240>;
+                                               vactive = <320>;
+                                               hback-porch = <1>;
+                                               hfront-porch = <33>;
+                                               vback-porch = <1>;
+                                               vfront-porch = <0>;
+                                               hsync-len = <5>;
+                                               vsync-len = <1>;
+                                               hsync-active = <1>;
+                                               vsync-active = <1>;
+                                       };
+                               };
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "soft";
+                       nand-on-flash-bbt = <1>;
+                       status = "okay";
+
+                       at91bootstrap@0 {
+                               label = "at91bootstrap";
+                               reg = <0x0 0x40000>;
+                       };
+
+                       bootloader@40000 {
+                               label = "bootloader";
+                               reg = <0x40000 0x80000>;
+                       };
+
+                       bootloaderenv@c0000 {
+                               label = "bootloader env";
+                               reg = <0xc0000 0xc0000>;
+                       };
+
+                       dtb@180000 {
+                               label = "device tree";
+                               reg = <0x180000 0x80000>;
+                       };
+
+                       kernel@200000 {
+                               label = "kernel";
+                               reg = <0x200000 0x600000>;
+                       };
+
+                       rootfs@800000 {
+                               label = "rootfs";
+                               reg = <0x800000 0x0f800000>;
+                       };
+               };
+
+               apb {
+                       mmc0: mmc@fffa4000 {
+                               pinctrl-0 = <
+                                       &pinctrl_board_mmc0
+                                       &pinctrl_mmc0_clk
+                                       &pinctrl_mmc0_slot0_cmd_dat0
+                                       &pinctrl_mmc0_slot0_dat1_3>;
+                               status = "okay";
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioA 15 GPIO_ACTIVE_HIGH>;
+                               };
+                       };
+
+                       usart0: serial@fffb0000 {
+                               pinctrl-0 = <
+                                       &pinctrl_usart0
+                                       &pinctrl_usart0_rts
+                                       &pinctrl_usart0_cts>;
+                               status = "okay";
+                       };
+
+                       adc0: adc@fffd0000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <
+                                       &pinctrl_adc0_ad0
+                                       &pinctrl_adc0_ad1
+                                       &pinctrl_adc0_ad2
+                                       &pinctrl_adc0_ad3
+                                       &pinctrl_adc0_ad4
+                                       &pinctrl_adc0_ad5
+                                       &pinctrl_adc0_adtrg>;
+                               atmel,adc-ts-wires = <4>;
+                               status = "okay";
+                       };
+
+                       usb0: gadget@fffd4000 {
+                               atmel,vbus-gpio = <&pioA 8 GPIO_ACTIVE_HIGH>;
+                               status = "okay";
+                       };
+
+                       spi0: spi@fffcc000 {
+                               status = "okay";
+                               cs-gpios = <&pioA 28 0>, <0>, <0>, <0>;
+                               mtd_dataflash@0 {
+                                       compatible = "atmel,at45", "atmel,dataflash";
+                                       spi-max-frequency = <15000000>;
+                                       reg = <0>;
+                               };
+                       };
+
+                       pwm0: pwm@fffc8000 {
+                               status = "okay";
+
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_pwm0_pwm1_2>,
+                                       <&pinctrl_pwm0_pwm2_2>;
+                       };
+
+                       dbgu: serial@fffff200 {
+                               u-boot,dm-pre-reloc;
+                               status = "okay";
+                       };
+
+                       pinctrl@fffff400 {
+                               mmc0 {
+                                       pinctrl_board_mmc0: mmc0-board {
+                                               atmel,pins =
+                                                       <AT91_PIOA 15 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+                                       };
+                               };
+                       };
+
+                       watchdog@fffffd40 {
+                               status = "okay";
+                       };
+
+                       rtc@fffffe00 {
+                               status = "okay";
+                       };
+               };
+       };
+
+       pwmleds {
+               compatible = "pwm-leds";
+
+               ds1 {
+                       label = "ds1";
+                       pwms = <&pwm0 1 5000 PWM_POLARITY_INVERTED>;
+                       max-brightness = <255>;
+               };
+
+               ds2 {
+                       label = "ds2";
+                       pwms = <&pwm0 2 5000 PWM_POLARITY_INVERTED>;
+                       max-brightness = <255>;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               ds3 {
+                       label = "ds3";
+                       gpios = <&pioD 14 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+
+               right_click {
+                       label = "right_click";
+                       gpios = <&pioB 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <273>;
+                       wakeup-source;
+               };
+
+               left_click {
+                       label = "left_click";
+                       gpios = <&pioB 1 GPIO_ACTIVE_LOW>;
+                       linux,code = <272>;
+                       wakeup-source;
+               };
+       };
+
+       i2c-gpio-0 {
+               status = "okay";
+       };
+
+       i2c-gpio-1 {
+               status = "okay";
+       };
+};
diff --git a/arch/arm/dts/at91sam9x25.dtsi b/arch/arm/dts/at91sam9x25.dtsi
new file mode 100644 (file)
index 0000000..3c5fa33
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * at91sam9x25.dtsi - Device Tree Include file for AT91SAM9X25 SoC
+ *
+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include "at91sam9x5.dtsi"
+#include "at91sam9x5_usart3.dtsi"
+#include "at91sam9x5_macb0.dtsi"
+#include "at91sam9x5_macb1.dtsi"
+#include "at91sam9x5_can.dtsi"
+
+/ {
+       model = "Atmel AT91SAM9X25 SoC";
+       compatible = "atmel,at91sam9x25", "atmel,at91sam9x5";
+
+       ahb {
+               apb {
+                       pinctrl@fffff400 {
+                               atmel,mux-mask = <
+                                     /*    A         B          C     */
+                                      0xffffffff 0xffe03fff 0xc000001c  /* pioA */
+                                      0x0007ffff 0x00047e3f 0x00000000  /* pioB */
+                                      0x80000000 0xfffd0000 0xb83fffff  /* pioC */
+                                      0x003fffff 0x003f8000 0x00000000  /* pioD */
+                                     >;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9x25ek.dts b/arch/arm/dts/at91sam9x25ek.dts
new file mode 100644 (file)
index 0000000..4948648
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * at91sam9x25ek.dts - Device Tree file for AT91SAM9X25-EK board
+ *
+ *  Copyright (C) 2012 Atmel,
+ *                2012 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+#include "at91sam9x25.dtsi"
+#include "at91sam9x5ek.dtsi"
+
+/ {
+       model = "Atmel AT91SAM9X25-EK";
+       compatible = "atmel,at91sam9x25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9";
+
+       ahb {
+               apb {
+                       macb0: ethernet@f802c000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+                       };
+
+                       macb1: ethernet@f8030000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9x35.dtsi b/arch/arm/dts/at91sam9x35.dtsi
new file mode 100644 (file)
index 0000000..d9054e8
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * at91sam9x35.dtsi - Device Tree Include file for AT91SAM9X35 SoC
+ *
+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include "at91sam9x5.dtsi"
+#include "at91sam9x5_lcd.dtsi"
+#include "at91sam9x5_macb0.dtsi"
+#include "at91sam9x5_can.dtsi"
+
+/ {
+       model = "Atmel AT91SAM9X35 SoC";
+       compatible = "atmel,at91sam9x35", "atmel,at91sam9x5";
+
+       ahb {
+               apb {
+                       pinctrl@fffff400 {
+                               atmel,mux-mask = <
+                                     /*    A         B          C     */
+                                      0xffffffff 0xffe03fff 0xc000000c  /* pioA */
+                                      0x000406ff 0x00047e3f 0x00000000  /* pioB */
+                                      0xfdffffff 0x00000000 0xb83fffff  /* pioC */
+                                      0x003fffff 0x003f8000 0x00000000  /* pioD */
+                                     >;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9x35ek.dts b/arch/arm/dts/at91sam9x35ek.dts
new file mode 100644 (file)
index 0000000..3ca70c0
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * at91sam9x35ek.dts - Device Tree file for AT91SAM9X35-EK board
+ *
+ *  Copyright (C) 2012 Atmel,
+ *                2012 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+#include "at91sam9x35.dtsi"
+#include "at91sam9x5dm.dtsi"
+#include "at91sam9x5ek.dtsi"
+
+/ {
+       model = "Atmel AT91SAM9X35-EK";
+       compatible = "atmel,at91sam9x35ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9";
+
+       ahb {
+               apb {
+                       macb0: ethernet@f802c000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+                       };
+                       hlcdc: hlcdc@f8038000 {
+                               u-boot,dm-pre-reloc;
+                               status = "okay";
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9x5.dtsi b/arch/arm/dts/at91sam9x5.dtsi
new file mode 100644 (file)
index 0000000..a422c98
--- /dev/null
@@ -0,0 +1,1302 @@
+/*
+ * at91sam9x5.dtsi - Device Tree Include file for AT91SAM9x5 family SoC
+ *                   applies to AT91SAM9G15, AT91SAM9G25, AT91SAM9G35,
+ *                   AT91SAM9X25, AT91SAM9X35 SoC
+ *
+ *  Copyright (C) 2012 Atmel,
+ *                2012 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+#include "skeleton.dtsi"
+#include <dt-bindings/dma/at91.h>
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/clock/at91.h>
+
+/ {
+       model = "Atmel AT91SAM9x5 family SoC";
+       compatible = "atmel,at91sam9x5";
+       interrupt-parent = <&aic>;
+
+       aliases {
+               serial0 = &dbgu;
+               serial1 = &usart0;
+               serial2 = &usart1;
+               serial3 = &usart2;
+               gpio0 = &pioA;
+               gpio1 = &pioB;
+               gpio2 = &pioC;
+               gpio3 = &pioD;
+               tcb0 = &tcb0;
+               tcb1 = &tcb1;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               ssc0 = &ssc0;
+               pwm0 = &pwm0;
+               spi0 = &spi0;
+       };
+
+       cpus {
+               #address-cells = <0>;
+               #size-cells = <0>;
+
+               cpu {
+                       compatible = "arm,arm926ej-s";
+                       device_type = "cpu";
+               };
+       };
+
+       memory {
+               reg = <0x20000000 0x10000000>;
+       };
+
+       clocks {
+               slow_xtal: slow_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+
+               main_xtal: main_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+
+               adc_op_clk: adc_op_clk{
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <1000000>;
+               };
+       };
+
+       sram: sram@00300000 {
+               compatible = "mmio-sram";
+               reg = <0x00300000 0x8000>;
+       };
+
+       ahb {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               u-boot,dm-pre-reloc;
+
+               apb {
+                       compatible = "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+                       u-boot,dm-pre-reloc;
+
+                       aic: interrupt-controller@fffff000 {
+                               #interrupt-cells = <3>;
+                               compatible = "atmel,at91rm9200-aic";
+                               interrupt-controller;
+                               reg = <0xfffff000 0x200>;
+                               atmel,external-irqs = <31>;
+                       };
+
+                       ramc0: ramc@ffffe800 {
+                               compatible = "atmel,at91sam9g45-ddramc";
+                               reg = <0xffffe800 0x200>;
+                               clocks = <&ddrck>;
+                               clock-names = "ddrck";
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               compatible = "atmel,at91sam9x5-pmc", "syscon";
+                               reg = <0xfffffc00 0x200>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               interrupt-controller;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               #interrupt-cells = <1>;
+                               u-boot,dm-pre-reloc;
+
+                               main_rc_osc: main_rc_osc {
+                                       compatible = "atmel,at91sam9x5-clk-main-rc-osc";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MOSCRCS>;
+                                       clock-frequency = <12000000>;
+                                       clock-accuracy = <50000000>;
+                               };
+
+                               main_osc: main_osc {
+                                       compatible = "atmel,at91rm9200-clk-main-osc";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MOSCS>;
+                                       clocks = <&main_xtal>;
+                               };
+
+                               main: mainck {
+                                       compatible = "atmel,at91sam9x5-clk-main";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MOSCSELS>;
+                                       clocks = <&main_rc_osc>, <&main_osc>;
+                               };
+
+                               plla: pllack@0 {
+                                       compatible = "atmel,at91rm9200-clk-pll";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_LOCKA>;
+                                       clocks = <&main>;
+                                       reg = <0>;
+                                       atmel,clk-input-range = <2000000 32000000>;
+                                       #atmel,pll-clk-output-range-cells = <4>;
+                                       atmel,pll-clk-output-ranges = <745000000 800000000 0 0
+                                                                      695000000 750000000 1 0
+                                                                      645000000 700000000 2 0
+                                                                      595000000 650000000 3 0
+                                                                      545000000 600000000 0 1
+                                                                      495000000 555000000 1 1
+                                                                      445000000 500000000 2 1
+                                                                      400000000 450000000 3 1>;
+                               };
+
+                               plladiv: plladivck {
+                                       compatible = "atmel,at91sam9x5-clk-plldiv";
+                                       #clock-cells = <0>;
+                                       clocks = <&plla>;
+                               };
+
+                               utmi: utmick {
+                                       compatible = "atmel,at91sam9x5-clk-utmi";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_LOCKU>;
+                                       clocks = <&main>;
+                               };
+
+                               mck: masterck {
+                                       compatible = "atmel,at91sam9x5-clk-master";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MCKRDY>;
+                                       clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>;
+                                       atmel,clk-output-range = <0 133333333>;
+                                       atmel,clk-divisors = <1 2 4 3>;
+                                       atmel,master-clk-have-div3-pres;
+                                       u-boot,dm-pre-reloc;
+
+                               };
+
+                               usb: usbck {
+                                       compatible = "atmel,at91sam9x5-clk-usb";
+                                       #clock-cells = <0>;
+                                       clocks = <&plladiv>, <&utmi>;
+                               };
+
+                               prog: progck {
+                                       compatible = "atmel,at91sam9x5-clk-programmable";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>, <&mck>;
+
+                                       prog0: prog@0 {
+                                               #clock-cells = <0>;
+                                               reg = <0>;
+                                               interrupts = <AT91_PMC_PCKRDY(0)>;
+                                       };
+
+                                       prog1: prog@1 {
+                                               #clock-cells = <0>;
+                                               reg = <1>;
+                                               interrupts = <AT91_PMC_PCKRDY(1)>;
+                                       };
+                               };
+
+                               smd: smdclk {
+                                       compatible = "atmel,at91sam9x5-clk-smd";
+                                       #clock-cells = <0>;
+                                       clocks = <&plladiv>, <&utmi>;
+                               };
+
+                               systemck {
+                                       compatible = "atmel,at91rm9200-clk-system";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       ddrck: ddrck@2 {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                               clocks = <&mck>;
+                                       };
+
+                                       smdck: smdck@4 {
+                                               #clock-cells = <0>;
+                                               reg = <4>;
+                                               clocks = <&smd>;
+                                       };
+
+                                       uhpck: uhpck@6 {
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       udpck: udpck@7 {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       pck0: pck0@8 {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                               clocks = <&prog0>;
+                                       };
+
+                                       pck1: pck1@9 {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                               clocks = <&prog1>;
+                                       };
+                               };
+
+                               periphck {
+                                       compatible = "atmel,at91sam9x5-clk-peripheral";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       clocks = <&mck>;
+                                       u-boot,dm-pre-reloc;
+
+
+                                       pioAB_clk: pioAB_clk@2 {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                       };
+
+                                       pioCD_clk: pioCD_clk@3 {
+                                               #clock-cells = <0>;
+                                               reg = <3>;
+                                       };
+
+                                       smd_clk: smd_clk@4 {
+                                               #clock-cells = <0>;
+                                               reg = <4>;
+                                       };
+
+                                       usart0_clk: usart0_clk@5 {
+                                               #clock-cells = <0>;
+                                               reg = <5>;
+                                       };
+
+                                       usart1_clk: usart1_clk@6 {
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                       };
+
+                                       usart2_clk: usart2_clk@7 {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                       };
+
+                                       twi0_clk: twi0_clk@9 {
+                                               reg = <9>;
+                                               #clock-cells = <0>;
+                                       };
+
+                                       twi1_clk: twi1_clk@10 {
+                                               #clock-cells = <0>;
+                                               reg = <10>;
+                                       };
+
+                                       twi2_clk: twi2_clk@11 {
+                                               #clock-cells = <0>;
+                                               reg = <11>;
+                                       };
+
+                                       mci0_clk: mci0_clk@12 {
+                                               #clock-cells = <0>;
+                                               reg = <12>;
+                                       };
+
+                                       spi0_clk: spi0_clk@13 {
+                                               #clock-cells = <0>;
+                                               reg = <13>;
+                                       };
+
+                                       spi1_clk: spi1_clk@14 {
+                                               #clock-cells = <0>;
+                                               reg = <14>;
+                                       };
+
+                                       uart0_clk: uart0_clk@15 {
+                                               #clock-cells = <0>;
+                                               reg = <15>;
+                                       };
+
+                                       uart1_clk: uart1_clk@16 {
+                                               #clock-cells = <0>;
+                                               reg = <16>;
+                                       };
+
+                                       tcb0_clk: tcb0_clk@17 {
+                                               #clock-cells = <0>;
+                                               reg = <17>;
+                                       };
+
+                                       pwm_clk: pwm_clk@18 {
+                                               #clock-cells = <0>;
+                                               reg = <18>;
+                                       };
+
+                                       adc_clk: adc_clk@19 {
+                                               #clock-cells = <0>;
+                                               reg = <19>;
+                                       };
+
+                                       dma0_clk: dma0_clk@20 {
+                                               #clock-cells = <0>;
+                                               reg = <20>;
+                                       };
+
+                                       dma1_clk: dma1_clk@21 {
+                                               #clock-cells = <0>;
+                                               reg = <21>;
+                                       };
+
+                                       uhphs_clk: uhphs_clk@22 {
+                                               #clock-cells = <0>;
+                                               reg = <22>;
+                                       };
+
+                                       udphs_clk: udphs_clk@23 {
+                                               #clock-cells = <0>;
+                                               reg = <23>;
+                                       };
+
+                                       mci1_clk: mci1_clk@26 {
+                                               #clock-cells = <0>;
+                                               reg = <26>;
+                                       };
+
+                                       ssc0_clk: ssc0_clk@28 {
+                                               #clock-cells = <0>;
+                                               reg = <28>;
+                                       };
+                               };
+                       };
+
+                       rstc@fffffe00 {
+                               compatible = "atmel,at91sam9g45-rstc";
+                               reg = <0xfffffe00 0x10>;
+                               clocks = <&clk32k>;
+                       };
+
+                       shdwc@fffffe10 {
+                               compatible = "atmel,at91sam9x5-shdwc";
+                               reg = <0xfffffe10 0x10>;
+                               clocks = <&clk32k>;
+                       };
+
+                       pit: timer@fffffe30 {
+                               compatible = "atmel,at91sam9260-pit";
+                               reg = <0xfffffe30 0xf>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&mck>;
+                       };
+
+                       sckc@fffffe50 {
+                               compatible = "atmel,at91sam9x5-sckc";
+                               reg = <0xfffffe50 0x4>;
+
+                               slow_osc: slow_osc {
+                                       compatible = "atmel,at91sam9x5-clk-slow-osc";
+                                       #clock-cells = <0>;
+                                       clocks = <&slow_xtal>;
+                               };
+
+                               slow_rc_osc: slow_rc_osc {
+                                       compatible = "atmel,at91sam9x5-clk-slow-rc-osc";
+                                       #clock-cells = <0>;
+                                       clock-frequency = <32768>;
+                                       clock-accuracy = <50000000>;
+                               };
+
+                               clk32k: slck {
+                                       compatible = "atmel,at91sam9x5-clk-slow";
+                                       #clock-cells = <0>;
+                                       clocks = <&slow_rc_osc>, <&slow_osc>;
+                               };
+                       };
+
+                       tcb0: timer@f8008000 {
+                               compatible = "atmel,at91sam9x5-tcb";
+                               reg = <0xf8008000 0x100>;
+                               interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tcb0_clk>, <&clk32k>;
+                               clock-names = "t0_clk", "slow_clk";
+                       };
+
+                       tcb1: timer@f800c000 {
+                               compatible = "atmel,at91sam9x5-tcb";
+                               reg = <0xf800c000 0x100>;
+                               interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tcb0_clk>, <&clk32k>;
+                               clock-names = "t0_clk", "slow_clk";
+                       };
+
+                       dma0: dma-controller@ffffec00 {
+                               compatible = "atmel,at91sam9g45-dma";
+                               reg = <0xffffec00 0x200>;
+                               interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
+                               #dma-cells = <2>;
+                               clocks = <&dma0_clk>;
+                               clock-names = "dma_clk";
+                       };
+
+                       dma1: dma-controller@ffffee00 {
+                               compatible = "atmel,at91sam9g45-dma";
+                               reg = <0xffffee00 0x200>;
+                               interrupts = <21 IRQ_TYPE_LEVEL_HIGH 0>;
+                               #dma-cells = <2>;
+                               clocks = <&dma1_clk>;
+                               clock-names = "dma_clk";
+                       };
+
+                       pinctrl@fffff400 {
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               compatible = "atmel,at91sam9x5-pinctrl", "atmel,at91rm9200-pinctrl", "simple-bus";
+                               ranges = <0xfffff400 0xfffff400 0x800>;
+                               reg = <0xfffff400 0x200         /* pioA */
+                                      0xfffff600 0x200         /* pioB */
+                                      0xfffff800 0x200         /* pioC */
+                                      0xfffffa00 0x200         /* pioD */
+                                      >;
+                               u-boot,dm-pre-reloc;
+
+
+                               /* shared pinctrl settings */
+                               dbgu {
+                                       u-boot,dm-pre-reloc;
+                                       pinctrl_dbgu: dbgu-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
+                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               usart0 {
+                                       pinctrl_usart0: usart0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA0 periph A with pullup */
+                                                        AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PA1 periph A */
+                                       };
+
+                                       pinctrl_usart0_rts: usart0_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PA2 periph A */
+                                       };
+
+                                       pinctrl_usart0_cts: usart0_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PA3 periph A */
+                                       };
+
+                                       pinctrl_usart0_sck: usart0_sck-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PA4 periph A */
+                                       };
+                               };
+
+                               usart1 {
+                                       pinctrl_usart1: usart1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA5 periph A with pullup */
+                                                        AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PA6 periph A */
+                                       };
+
+                                       pinctrl_usart1_rts: usart1_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 27 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PC27 periph C */
+                                       };
+
+                                       pinctrl_usart1_cts: usart1_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 28 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PC28 periph C */
+                                       };
+
+                                       pinctrl_usart1_sck: usart1_sck-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 29 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PC29 periph C */
+                                       };
+                               };
+
+                               usart2 {
+                                       pinctrl_usart2: usart2-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA7 periph A with pullup */
+                                                        AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PA8 periph A */
+                                       };
+
+                                       pinctrl_usart2_rts: usart2_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 0 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* PB0 periph B */
+                                       };
+
+                                       pinctrl_usart2_cts: usart2_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 1 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* PB1 periph B */
+                                       };
+
+                                       pinctrl_usart2_sck: usart2_sck-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 2 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* PB2 periph B */
+                                       };
+                               };
+
+                               uart0 {
+                                       pinctrl_uart0: uart0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 8 AT91_PERIPH_C AT91_PINCTRL_NONE    /* PC8 periph C */
+                                                        AT91_PIOC 9 AT91_PERIPH_C AT91_PINCTRL_PULL_UP>;       /* PC9 periph C with pullup */
+                                       };
+                               };
+
+                               uart1 {
+                                       pinctrl_uart1: uart1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 16 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PC16 periph C */
+                                                        AT91_PIOC 17 AT91_PERIPH_C AT91_PINCTRL_PULL_UP>;      /* PC17 periph C with pullup */
+                                       };
+                               };
+
+                               nand {
+                                       pinctrl_nand: nand-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PD0 periph A Read Enable */
+                                                        AT91_PIOD 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PD1 periph A Write Enable */
+                                                        AT91_PIOD 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PD2 periph A Address Latch Enable */
+                                                        AT91_PIOD 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PD3 periph A Command Latch Enable */
+                                                        AT91_PIOD 4 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP      /* PD4 gpio Chip Enable pin pull_up */
+                                                        AT91_PIOD 5 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP      /* PD5 gpio RDY/BUSY pin pull_up */
+                                                        AT91_PIOD 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PD6 periph A Data bit 0 */
+                                                        AT91_PIOD 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PD7 periph A Data bit 1 */
+                                                        AT91_PIOD 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PD8 periph A Data bit 2 */
+                                                        AT91_PIOD 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PD9 periph A Data bit 3 */
+                                                        AT91_PIOD 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PD10 periph A Data bit 4 */
+                                                        AT91_PIOD 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PD11 periph A Data bit 5 */
+                                                        AT91_PIOD 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PD12 periph A Data bit 6 */
+                                                        AT91_PIOD 13 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD13 periph A Data bit 7 */
+                                       };
+
+                                       pinctrl_nand_16bits: nand_16bits-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOD 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PD14 periph A Data bit 8 */
+                                                        AT91_PIOD 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PD15 periph A Data bit 9 */
+                                                        AT91_PIOD 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PD16 periph A Data bit 10 */
+                                                        AT91_PIOD 17 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PD17 periph A Data bit 11 */
+                                                        AT91_PIOD 18 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PD18 periph A Data bit 12 */
+                                                        AT91_PIOD 19 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PD19 periph A Data bit 13 */
+                                                        AT91_PIOD 20 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PD20 periph A Data bit 14 */
+                                                        AT91_PIOD 21 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD21 periph A Data bit 15 */
+                                       };
+                               };
+
+                               mmc0 {
+                                       pinctrl_mmc0_slot0_clk_cmd_dat0: mmc0_slot0_clk_cmd_dat0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA17 periph A */
+                                                        AT91_PIOA 16 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PA16 periph A with pullup */
+                                                        AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PA15 periph A with pullup */
+                                       };
+
+                                       pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PA18 periph A with pullup */
+                                                        AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PA19 periph A with pullup */
+                                                        AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PA20 periph A with pullup */
+                                       };
+                               };
+
+                               mmc1 {
+                                       pinctrl_mmc1_slot0_clk_cmd_dat0: mmc1_slot0_clk_cmd_dat0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 13 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA13 periph B */
+                                                        AT91_PIOA 12 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* PA12 periph B with pullup */
+                                                        AT91_PIOA 11 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;      /* PA11 periph B with pullup */
+                                       };
+
+                                       pinctrl_mmc1_slot0_dat1_3: mmc1_slot0_dat1_3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 2 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA2 periph B with pullup */
+                                                        AT91_PIOA 3 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA3 periph B with pullup */
+                                                        AT91_PIOA 4 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;       /* PA4 periph B with pullup */
+                                       };
+                               };
+
+                               ssc0 {
+                                       pinctrl_ssc0_tx: ssc0_tx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 24 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA24 periph B */
+                                                        AT91_PIOA 25 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA25 periph B */
+                                                        AT91_PIOA 26 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA26 periph B */
+                                       };
+
+                                       pinctrl_ssc0_rx: ssc0_rx-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 27 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA27 periph B */
+                                                        AT91_PIOA 28 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA28 periph B */
+                                                        AT91_PIOA 29 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA29 periph B */
+                                       };
+                               };
+
+                               spi0 {
+                                       pinctrl_spi0: spi0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA11 periph A SPI0_MISO pin */
+                                                        AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA12 periph A SPI0_MOSI pin */
+                                                        AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA13 periph A SPI0_SPCK pin */
+                                       };
+                               };
+
+                               spi1 {
+                                       pinctrl_spi1: spi1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 21 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA21 periph B SPI1_MISO pin */
+                                                        AT91_PIOA 22 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA22 periph B SPI1_MOSI pin */
+                                                        AT91_PIOA 23 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA23 periph B SPI1_SPCK pin */
+                                       };
+                               };
+
+                               i2c0 {
+                                       pinctrl_i2c0: i2c0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA30 periph A I2C0 data */
+                                                        AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA31 periph A I2C0 clock */
+                                       };
+                               };
+
+                               i2c1 {
+                                       pinctrl_i2c1: i2c1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 0 AT91_PERIPH_C AT91_PINCTRL_NONE    /* PC0 periph C I2C1 data */
+                                                        AT91_PIOC 1 AT91_PERIPH_C AT91_PINCTRL_NONE>;  /* PC1 periph C I2C1 clock */
+                                       };
+                               };
+
+                               i2c2 {
+                                       pinctrl_i2c2: i2c2-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 4 AT91_PERIPH_B AT91_PINCTRL_NONE    /* PB4 periph B I2C2 data */
+                                                        AT91_PIOB 5 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* PB5 periph B I2C2 clock */
+                                       };
+                               };
+
+                               i2c_gpio0 {
+                                       pinctrl_i2c_gpio0: i2c_gpio0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 30 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE /* PA30 gpio multidrive I2C0 data */
+                                                        AT91_PIOA 31 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;       /* PA31 gpio multidrive I2C0 clock */
+                                       };
+                               };
+
+                               i2c_gpio1 {
+                                       pinctrl_i2c_gpio1: i2c_gpio1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 0 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE  /* PC0 gpio multidrive I2C1 data */
+                                                        AT91_PIOC 1 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;        /* PC1 gpio multidrive I2C1 clock */
+                                       };
+                               };
+
+                               i2c_gpio2 {
+                                       pinctrl_i2c_gpio2: i2c_gpio2-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 4 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE  /* PB4 gpio multidrive I2C2 data */
+                                                        AT91_PIOB 5 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;        /* PB5 gpio multidrive I2C2 clock */
+                                       };
+                               };
+
+                               pwm0 {
+                                       pinctrl_pwm0_pwm0_0: pwm0_pwm0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 11 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                                       pinctrl_pwm0_pwm0_1: pwm0_pwm0-1 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 10 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+                                       pinctrl_pwm0_pwm0_2: pwm0_pwm0-2 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 18 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_pwm0_pwm1_0: pwm0_pwm1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 12 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                                       pinctrl_pwm0_pwm1_1: pwm0_pwm1-1 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 11 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+                                       pinctrl_pwm0_pwm1_2: pwm0_pwm1-2 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 19 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_pwm0_pwm2_0: pwm0_pwm2-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 13 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                                       pinctrl_pwm0_pwm2_1: pwm0_pwm2-1 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 20 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_pwm0_pwm3_0: pwm0_pwm3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 14 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                                       pinctrl_pwm0_pwm3_1: pwm0_pwm3-1 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 21 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               tcb0 {
+                                       pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
+                                               atmel,pins = <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tclk1: tcb0_tclk1-0 {
+                                               atmel,pins = <AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tclk2: tcb0_tclk2-0 {
+                                               atmel,pins = <AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tioa0: tcb0_tioa0-0 {
+                                               atmel,pins = <AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tioa1: tcb0_tioa1-0 {
+                                               atmel,pins = <AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tioa2: tcb0_tioa2-0 {
+                                               atmel,pins = <AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tiob0: tcb0_tiob0-0 {
+                                               atmel,pins = <AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tiob1: tcb0_tiob1-0 {
+                                               atmel,pins = <AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb0_tiob2: tcb0_tiob2-0 {
+                                               atmel,pins = <AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               tcb1 {
+                                       pinctrl_tcb1_tclk0: tcb1_tclk0-0 {
+                                               atmel,pins = <AT91_PIOC 4 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tclk1: tcb1_tclk1-0 {
+                                               atmel,pins = <AT91_PIOC 7 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tclk2: tcb1_tclk2-0 {
+                                               atmel,pins = <AT91_PIOC 14 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tioa0: tcb1_tioa0-0 {
+                                               atmel,pins = <AT91_PIOC 2 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tioa1: tcb1_tioa1-0 {
+                                               atmel,pins = <AT91_PIOC 5 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tioa2: tcb1_tioa2-0 {
+                                               atmel,pins = <AT91_PIOC 12 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tiob0: tcb1_tiob0-0 {
+                                               atmel,pins = <AT91_PIOC 3 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tiob1: tcb1_tiob1-0 {
+                                               atmel,pins = <AT91_PIOC 6 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_tcb1_tiob2: tcb1_tiob2-0 {
+                                               atmel,pins = <AT91_PIOC 13 AT91_PERIPH_C AT91_PINCTRL_NONE>;
+                                       };
+                               };
+                       };
+
+                       pioA: gpio@fffff400 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfffff400 0x200>;
+                               interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioAB_clk>;
+                       };
+
+                       pioB: gpio@fffff600 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfffff600 0x200>;
+                               interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               #gpio-lines = <19>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioAB_clk>;
+                       };
+
+                       pioC: gpio@fffff800 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfffff800 0x200>;
+                               interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioCD_clk>;
+                       };
+
+                       pioD: gpio@fffffa00 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfffffa00 0x200>;
+                               interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               #gpio-lines = <22>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               clocks = <&pioCD_clk>;
+                       };
+
+                       ssc0: ssc@f0010000 {
+                               compatible = "atmel,at91sam9g45-ssc";
+                               reg = <0xf0010000 0x4000>;
+                               interrupts = <28 IRQ_TYPE_LEVEL_HIGH 5>;
+                               dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(13)>,
+                                      <&dma0 1 AT91_DMA_CFG_PER_ID(14)>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
+                               clocks = <&ssc0_clk>;
+                               clock-names = "pclk";
+                               status = "disabled";
+                       };
+
+                       mmc0: mmc@f0008000 {
+                               compatible = "atmel,hsmci";
+                               reg = <0xf0008000 0x600>;
+                               interrupts = <12 IRQ_TYPE_LEVEL_HIGH 0>;
+                               dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(0)>;
+                               dma-names = "rxtx";
+                               pinctrl-names = "default";
+                               clocks = <&mci0_clk>;
+                               clock-names = "mci_clk";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               status = "disabled";
+                       };
+
+                       mmc1: mmc@f000c000 {
+                               compatible = "atmel,hsmci";
+                               reg = <0xf000c000 0x600>;
+                               interrupts = <26 IRQ_TYPE_LEVEL_HIGH 0>;
+                               dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(0)>;
+                               dma-names = "rxtx";
+                               pinctrl-names = "default";
+                               clocks = <&mci1_clk>;
+                               clock-names = "mci_clk";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               status = "disabled";
+                       };
+
+                       dbgu: serial@fffff200 {
+                               compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
+                               reg = <0xfffff200 0x200>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_dbgu>;
+                               dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(8)>,
+                                      <&dma1 1 (AT91_DMA_CFG_PER_ID(9) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+                               dma-names = "tx", "rx";
+                               clocks = <&mck>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart0: serial@f801c000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf801c000 0x200>;
+                               interrupts = <5 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart0>;
+                               dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(3)>,
+                                      <&dma0 1 (AT91_DMA_CFG_PER_ID(4) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+                               dma-names = "tx", "rx";
+                               clocks = <&usart0_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart1: serial@f8020000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf8020000 0x200>;
+                               interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart1>;
+                               dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(5)>,
+                                      <&dma0 1 (AT91_DMA_CFG_PER_ID(6) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+                               dma-names = "tx", "rx";
+                               clocks = <&usart1_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       usart2: serial@f8024000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf8024000 0x200>;
+                               interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart2>;
+                               dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(12)>,
+                                      <&dma1 1 (AT91_DMA_CFG_PER_ID(13) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+                               dma-names = "tx", "rx";
+                               clocks = <&usart2_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       i2c0: i2c@f8010000 {
+                               compatible = "atmel,at91sam9x5-i2c";
+                               reg = <0xf8010000 0x100>;
+                               interrupts = <9 IRQ_TYPE_LEVEL_HIGH 6>;
+                               dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(7)>,
+                                      <&dma0 1 AT91_DMA_CFG_PER_ID(8)>;
+                               dma-names = "tx", "rx";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_i2c0>;
+                               clocks = <&twi0_clk>;
+                               status = "disabled";
+                       };
+
+                       i2c1: i2c@f8014000 {
+                               compatible = "atmel,at91sam9x5-i2c";
+                               reg = <0xf8014000 0x100>;
+                               interrupts = <10 IRQ_TYPE_LEVEL_HIGH 6>;
+                               dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(5)>,
+                                      <&dma1 1 AT91_DMA_CFG_PER_ID(6)>;
+                               dma-names = "tx", "rx";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_i2c1>;
+                               clocks = <&twi1_clk>;
+                               status = "disabled";
+                       };
+
+                       i2c2: i2c@f8018000 {
+                               compatible = "atmel,at91sam9x5-i2c";
+                               reg = <0xf8018000 0x100>;
+                               interrupts = <11 IRQ_TYPE_LEVEL_HIGH 6>;
+                               dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(9)>,
+                                      <&dma0 1 AT91_DMA_CFG_PER_ID(10)>;
+                               dma-names = "tx", "rx";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_i2c2>;
+                               clocks = <&twi2_clk>;
+                               status = "disabled";
+                       };
+
+                       uart0: serial@f8040000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf8040000 0x200>;
+                               interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_uart0>;
+                               clocks = <&uart0_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       uart1: serial@f8044000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf8044000 0x200>;
+                               interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_uart1>;
+                               clocks = <&uart1_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+
+                       adc0: adc@f804c000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91sam9x5-adc";
+                               reg = <0xf804c000 0x100>;
+                               interrupts = <19 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&adc_clk>,
+                                        <&adc_op_clk>;
+                               clock-names = "adc_clk", "adc_op_clk";
+                               atmel,adc-use-external-triggers;
+                               atmel,adc-channels-used = <0xffff>;
+                               atmel,adc-vref = <3300>;
+                               atmel,adc-startup-time = <40>;
+                               atmel,adc-sample-hold-time = <11>;
+                               atmel,adc-res = <8 10>;
+                               atmel,adc-res-names = "lowres", "highres";
+                               atmel,adc-use-res = "highres";
+
+                               trigger0 {
+                                       trigger-name = "external-rising";
+                                       trigger-value = <0x1>;
+                                       trigger-external;
+                               };
+
+                               trigger1 {
+                                       trigger-name = "external-falling";
+                                       trigger-value = <0x2>;
+                                       trigger-external;
+                               };
+
+                               trigger2 {
+                                       trigger-name = "external-any";
+                                       trigger-value = <0x3>;
+                                       trigger-external;
+                               };
+
+                               trigger3 {
+                                       trigger-name = "continuous";
+                                       trigger-value = <0x6>;
+                               };
+                       };
+
+                       spi0: spi@f0000000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91rm9200-spi";
+                               reg = <0xf0000000 0x100>;
+                               interrupts = <13 IRQ_TYPE_LEVEL_HIGH 3>;
+                               dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(1)>,
+                                      <&dma0 1 AT91_DMA_CFG_PER_ID(2)>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_spi0>;
+                               clocks = <&spi0_clk>;
+                               clock-names = "spi_clk";
+                               status = "disabled";
+                       };
+
+                       spi1: spi@f0004000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91rm9200-spi";
+                               reg = <0xf0004000 0x100>;
+                               interrupts = <14 IRQ_TYPE_LEVEL_HIGH 3>;
+                               dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(1)>,
+                                      <&dma1 1 AT91_DMA_CFG_PER_ID(2)>;
+                               dma-names = "tx", "rx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_spi1>;
+                               clocks = <&spi1_clk>;
+                               clock-names = "spi_clk";
+                               status = "disabled";
+                       };
+
+                       usb2: gadget@f803c000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "atmel,at91sam9g45-udc";
+                               reg = <0x00500000 0x80000
+                                      0xf803c000 0x400>;
+                               interrupts = <23 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&utmi>, <&udphs_clk>;
+                               clock-names = "hclk", "pclk";
+                               status = "disabled";
+
+                               ep@0 {
+                                       reg = <0>;
+                                       atmel,fifo-size = <64>;
+                                       atmel,nb-banks = <1>;
+                               };
+
+                               ep@1 {
+                                       reg = <1>;
+                                       atmel,fifo-size = <1024>;
+                                       atmel,nb-banks = <2>;
+                                       atmel,can-dma;
+                                       atmel,can-isoc;
+                               };
+
+                               ep@2 {
+                                       reg = <2>;
+                                       atmel,fifo-size = <1024>;
+                                       atmel,nb-banks = <2>;
+                                       atmel,can-dma;
+                                       atmel,can-isoc;
+                               };
+
+                               ep@3 {
+                                       reg = <3>;
+                                       atmel,fifo-size = <1024>;
+                                       atmel,nb-banks = <3>;
+                                       atmel,can-dma;
+                               };
+
+                               ep@4 {
+                                       reg = <4>;
+                                       atmel,fifo-size = <1024>;
+                                       atmel,nb-banks = <3>;
+                                       atmel,can-dma;
+                               };
+
+                               ep@5 {
+                                       reg = <5>;
+                                       atmel,fifo-size = <1024>;
+                                       atmel,nb-banks = <3>;
+                                       atmel,can-dma;
+                                       atmel,can-isoc;
+                               };
+
+                               ep@6 {
+                                       reg = <6>;
+                                       atmel,fifo-size = <1024>;
+                                       atmel,nb-banks = <3>;
+                                       atmel,can-dma;
+                                       atmel,can-isoc;
+                               };
+                       };
+
+                       watchdog@fffffe40 {
+                               compatible = "atmel,at91sam9260-wdt";
+                               reg = <0xfffffe40 0x10>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&clk32k>;
+                               atmel,watchdog-type = "hardware";
+                               atmel,reset-type = "all";
+                               atmel,dbg-halt;
+                               status = "disabled";
+                       };
+
+                       rtc@fffffeb0 {
+                               compatible = "atmel,at91sam9x5-rtc";
+                               reg = <0xfffffeb0 0x40>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&clk32k>;
+                               status = "disabled";
+                       };
+
+                       pwm0: pwm@f8034000 {
+                               compatible = "atmel,at91sam9rl-pwm";
+                               reg = <0xf8034000 0x300>;
+                               interrupts = <18 IRQ_TYPE_LEVEL_HIGH 4>;
+                               clocks = <&pwm_clk>;
+                               #pwm-cells = <3>;
+                               status = "disabled";
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       compatible = "atmel,at91rm9200-nand";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = <0x40000000 0x10000000
+                              0xffffe000 0x600         /* PMECC Registers */
+                              0xffffe600 0x200         /* PMECC Error Location Registers */
+                              0x00108000 0x18000       /* PMECC looup table in ROM code  */
+                             >;
+                       atmel,pmecc-lookup-table-offset = <0x0 0x8000>;
+                       atmel,nand-addr-offset = <21>;
+                       atmel,nand-cmd-offset = <22>;
+                       atmel,nand-has-dma;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_nand>;
+                       gpios = <&pioD 5 GPIO_ACTIVE_HIGH
+                                &pioD 4 GPIO_ACTIVE_HIGH
+                                0
+                               >;
+                       status = "disabled";
+               };
+
+               usb0: ohci@00600000 {
+                       compatible = "atmel,at91rm9200-ohci", "usb-ohci";
+                       reg = <0x00600000 0x100000>;
+                       interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
+                       clocks = <&uhphs_clk>, <&uhphs_clk>, <&uhpck>;
+                       clock-names = "ohci_clk", "hclk", "uhpck";
+                       status = "disabled";
+               };
+
+               usb1: ehci@00700000 {
+                       compatible = "atmel,at91sam9g45-ehci", "usb-ehci";
+                       reg = <0x00700000 0x100000>;
+                       interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
+                       clocks = <&utmi>, <&uhphs_clk>;
+                       clock-names = "usb_clk", "ehci_clk";
+                       status = "disabled";
+               };
+       };
+
+       i2c-gpio-0 {
+               compatible = "i2c-gpio";
+               gpios = <&pioA 30 GPIO_ACTIVE_HIGH /* sda */
+                        &pioA 31 GPIO_ACTIVE_HIGH /* scl */
+                       >;
+               i2c-gpio,sda-open-drain;
+               i2c-gpio,scl-open-drain;
+               i2c-gpio,delay-us = <2>;        /* ~100 kHz */
+               #address-cells = <1>;
+               #size-cells = <0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c_gpio0>;
+               status = "disabled";
+       };
+
+       i2c-gpio-1 {
+               compatible = "i2c-gpio";
+               gpios = <&pioC 0 GPIO_ACTIVE_HIGH /* sda */
+                        &pioC 1 GPIO_ACTIVE_HIGH /* scl */
+                       >;
+               i2c-gpio,sda-open-drain;
+               i2c-gpio,scl-open-drain;
+               i2c-gpio,delay-us = <2>;        /* ~100 kHz */
+               #address-cells = <1>;
+               #size-cells = <0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c_gpio1>;
+               status = "disabled";
+       };
+
+       i2c-gpio-2 {
+               compatible = "i2c-gpio";
+               gpios = <&pioB 4 GPIO_ACTIVE_HIGH /* sda */
+                        &pioB 5 GPIO_ACTIVE_HIGH /* scl */
+                       >;
+               i2c-gpio,sda-open-drain;
+               i2c-gpio,scl-open-drain;
+               i2c-gpio,delay-us = <2>;        /* ~100 kHz */
+               #address-cells = <1>;
+               #size-cells = <0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c_gpio2>;
+               status = "disabled";
+       };
+};
diff --git a/arch/arm/dts/at91sam9x5_can.dtsi b/arch/arm/dts/at91sam9x5_can.dtsi
new file mode 100644 (file)
index 0000000..9727b77
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * at91sam9x5_can.dtsi - Device Tree Include file for AT91SAM9x5 SoC with 1
+ * Ethernet interface.
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       ahb {
+               apb {
+                       pmc: pmc@fffffc00 {
+                               periphck {
+                                       can0_clk: can0_clk@29 {
+                                               #clock-cells = <0>;
+                                               reg = <29>;
+                                       };
+
+                                       can1_clk: can1_clk@30 {
+                                               #clock-cells = <0>;
+                                               reg = <30>;
+                                       };
+                               };
+                       };
+
+                       can0: can@f8000000 {
+                               compatible = "atmel,at91sam9x5-can";
+                               reg = <0xf8000000 0x300>;
+                               interrupts = <29 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_can0_rx_tx>;
+                               clocks = <&can0_clk>;
+                               clock-names = "can_clk";
+                               status = "disabled";
+                       };
+
+                       can1: can@f8004000 {
+                               compatible = "atmel,at91sam9x5-can";
+                               reg = <0xf8004000 0x300>;
+                               interrupts = <30 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_can1_rx_tx>;
+                               clocks = <&can1_clk>;
+                               clock-names = "can_clk";
+                               status = "disabled";
+                       };
+
+                       pinctrl@fffff400 {
+                               can0 {
+                                       pinctrl_can0_rx_tx: can0_rx_tx {
+                                               atmel,pins =
+                                                       <AT91_PIOA 9 AT91_PERIPH_B AT91_PINCTRL_NONE    /* CANRX0, conflicts with DRXD */
+                                                       AT91_PIOA 10 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* CANTX0, conflicts with DTXD */
+                                       };
+                               };
+
+                               can1 {
+                                       pinctrl_can1_rx_tx: can1_rx_tx {
+                                               atmel,pins =
+                                                       <AT91_PIOA 6 AT91_PERIPH_B AT91_PINCTRL_NONE    /* CANRX1, conflicts with RXD1 */
+                                                       AT91_PIOA 5 AT91_PERIPH_B AT91_PINCTRL_NONE>;   /* CANTX1, conflicts with TXD1 */
+                                       };
+                               };
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9x5_isi.dtsi b/arch/arm/dts/at91sam9x5_isi.dtsi
new file mode 100644 (file)
index 0000000..2c5075f
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * at91sam9x5_isi.dtsi - Device Tree Include file for AT91SAM9x5 SoC with an
+ * Image Sensor Interface.
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       ahb {
+               apb {
+                       pinctrl@fffff400 {
+                               isi {
+                                       pinctrl_isi_data_0_7: isi-0-data-0-7 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 0 AT91_PERIPH_B AT91_PINCTRL_NONE    /* ISI_D0, conflicts with LCDDAT0 */
+                                                       AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE     /* ISI_D1, conflicts with LCDDAT1 */
+                                                       AT91_PIOC 2 AT91_PERIPH_B AT91_PINCTRL_NONE     /* ISI_D2, conflicts with LCDDAT2 */
+                                                       AT91_PIOC 3 AT91_PERIPH_B AT91_PINCTRL_NONE     /* ISI_D3, conflicts with LCDDAT3 */
+                                                       AT91_PIOC 4 AT91_PERIPH_B AT91_PINCTRL_NONE     /* ISI_D4, conflicts with LCDDAT4 */
+                                                       AT91_PIOC 5 AT91_PERIPH_B AT91_PINCTRL_NONE     /* ISI_D5, conflicts with LCDDAT5 */
+                                                       AT91_PIOC 6 AT91_PERIPH_B AT91_PINCTRL_NONE     /* ISI_D6, conflicts with LCDDAT6 */
+                                                       AT91_PIOC 7 AT91_PERIPH_B AT91_PINCTRL_NONE     /* ISI_D7, conflicts with LCDDAT7 */
+                                                       AT91_PIOC 12 AT91_PERIPH_B AT91_PINCTRL_NONE    /* ISI_PCK, conflicts with LCDDAT12 */
+                                                       AT91_PIOC 14 AT91_PERIPH_B AT91_PINCTRL_NONE    /* ISI_HSYNC, conflicts with LCDDAT14 */
+                                                       AT91_PIOC 13 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* ISI_VSYNC, conflicts with LCDDAT13 */
+                                       };
+
+                                       pinctrl_isi_data_8_9: isi-0-data-8-9 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 8 AT91_PERIPH_B AT91_PINCTRL_NONE    /* ISI_D8, conflicts with LCDDAT8 */
+                                                       AT91_PIOC 9 AT91_PERIPH_B AT91_PINCTRL_NONE>;   /* ISI_D9, conflicts with LCDDAT9 */
+                                       };
+
+                                       pinctrl_isi_data_10_11: isi-0-data-10-11 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 10 AT91_PERIPH_B AT91_PINCTRL_NONE   /* ISI_D10, conflicts with LCDDAT10 */
+                                                       AT91_PIOC 11 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* ISI_D11, conflicts with LCDDAT11 */
+                                       };
+                               };
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               periphck {
+                                       isi_clk: isi_clk@25 {
+                                               #clock-cells = <0>;
+                                               reg = <25>;
+                                       };
+                               };
+                       };
+
+                       isi: isi@f8048000 {
+                               compatible = "atmel,at91sam9g45-isi";
+                               reg = <0xf8048000 0x4000>;
+                               interrupts = <25 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_isi_data_0_7>;
+                               clocks = <&isi_clk>;
+                               clock-names = "isi_clk";
+                               status = "disabled";
+                               port {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                               };
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9x5_lcd.dtsi b/arch/arm/dts/at91sam9x5_lcd.dtsi
new file mode 100644 (file)
index 0000000..96b7095
--- /dev/null
@@ -0,0 +1,146 @@
+/*
+ * at91sam9x5_lcd.dtsi - Device Tree Include file for AT91SAM9x5 SoC with an
+ * LCD controller.
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       ahb {
+               apb {
+                       hlcdc: hlcdc@f8038000 {
+                               compatible = "atmel,at91sam9x5-hlcdc";
+                               reg = <0xf8038000 0x4000>;
+                               interrupts = <25 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>;
+                               clock-names = "periph_clk","sys_clk", "slow_clk";
+                               status = "disabled";
+                       };
+
+                       pinctrl@fffff400 {
+                               lcd {
+                                       pinctrl_lcd_base: lcd-base-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 27 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDVSYNC */
+                                                        AT91_PIOC 28 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDHSYNC */
+                                                        AT91_PIOC 24 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDDISP */
+                                                        AT91_PIOC 29 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDDEN */
+                                                        AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDPCK */
+                                       };
+
+                                       pinctrl_lcd_pwm: lcd-pwm-0 {
+                                               atmel,pins = <AT91_PIOC 26 AT91_PERIPH_A AT91_PINCTRL_NONE>;    /* LCDPWM */
+                                       };
+
+                                       pinctrl_lcd_rgb444: lcd-rgb-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD0 pin */
+                                                        AT91_PIOC 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD1 pin */
+                                                        AT91_PIOC 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD2 pin */
+                                                        AT91_PIOC 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD3 pin */
+                                                        AT91_PIOC 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD4 pin */
+                                                        AT91_PIOC 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD5 pin */
+                                                        AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD6 pin */
+                                                        AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD7 pin */
+                                                        AT91_PIOC 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD8 pin */
+                                                        AT91_PIOC 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD9 pin */
+                                                        AT91_PIOC 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD10 pin */
+                                                        AT91_PIOC 11 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD11 pin */
+                                       };
+
+                                       pinctrl_lcd_rgb565: lcd-rgb-1 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD0 pin */
+                                                        AT91_PIOC 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD1 pin */
+                                                        AT91_PIOC 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD2 pin */
+                                                        AT91_PIOC 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD3 pin */
+                                                        AT91_PIOC 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD4 pin */
+                                                        AT91_PIOC 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD5 pin */
+                                                        AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD6 pin */
+                                                        AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD7 pin */
+                                                        AT91_PIOC 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD8 pin */
+                                                        AT91_PIOC 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD9 pin */
+                                                        AT91_PIOC 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD10 pin */
+                                                        AT91_PIOC 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD11 pin */
+                                                        AT91_PIOC 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD12 pin */
+                                                        AT91_PIOC 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD13 pin */
+                                                        AT91_PIOC 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD14 pin */
+                                                        AT91_PIOC 15 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD15 pin */
+                                       };
+
+                                       pinctrl_lcd_rgb666: lcd-rgb-2 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD0 pin */
+                                                        AT91_PIOC 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD1 pin */
+                                                        AT91_PIOC 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD2 pin */
+                                                        AT91_PIOC 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD3 pin */
+                                                        AT91_PIOC 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD4 pin */
+                                                        AT91_PIOC 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD5 pin */
+                                                        AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD6 pin */
+                                                        AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD7 pin */
+                                                        AT91_PIOC 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD8 pin */
+                                                        AT91_PIOC 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD9 pin */
+                                                        AT91_PIOC 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD10 pin */
+                                                        AT91_PIOC 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD11 pin */
+                                                        AT91_PIOC 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD12 pin */
+                                                        AT91_PIOC 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD13 pin */
+                                                        AT91_PIOC 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD14 pin */
+                                                        AT91_PIOC 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD15 pin */
+                                                        AT91_PIOC 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD16 pin */
+                                                        AT91_PIOC 17 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD17 pin */
+                                       };
+
+                                       pinctrl_lcd_rgb888: lcd-rgb-3 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD0 pin */
+                                                        AT91_PIOC 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD1 pin */
+                                                        AT91_PIOC 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD2 pin */
+                                                        AT91_PIOC 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD3 pin */
+                                                        AT91_PIOC 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD4 pin */
+                                                        AT91_PIOC 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD5 pin */
+                                                        AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD6 pin */
+                                                        AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD7 pin */
+                                                        AT91_PIOC 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD8 pin */
+                                                        AT91_PIOC 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* LCDD9 pin */
+                                                        AT91_PIOC 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD10 pin */
+                                                        AT91_PIOC 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD11 pin */
+                                                        AT91_PIOC 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD12 pin */
+                                                        AT91_PIOC 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD13 pin */
+                                                        AT91_PIOC 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD14 pin */
+                                                        AT91_PIOC 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD15 pin */
+                                                        AT91_PIOC 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD16 pin */
+                                                        AT91_PIOC 17 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD17 pin */
+                                                        AT91_PIOC 18 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD18 pin */
+                                                        AT91_PIOC 19 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD19 pin */
+                                                        AT91_PIOC 20 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD20 pin */
+                                                        AT91_PIOC 21 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD21 pin */
+                                                        AT91_PIOC 22 AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD22 pin */
+                                                        AT91_PIOC 23 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD23 pin */
+                                       };
+                               };
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               periphck {
+                                       lcdc_clk: lcdc_clk@25 {
+                                               #clock-cells = <0>;
+                                               reg = <25>;
+                                       };
+                               };
+
+                               systemck {
+                                       lcdck: lcdck@3 {
+                                               #clock-cells = <0>;
+                                               reg = <3>;
+                                               clocks = <&mck>;
+                                       };
+                               };
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9x5_macb0.dtsi b/arch/arm/dts/at91sam9x5_macb0.dtsi
new file mode 100644 (file)
index 0000000..1540e60
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * at91sam9x5_macb0.dtsi - Device Tree Include file for AT91SAM9x5 SoC with 1
+ * Ethernet interface.
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       ahb {
+               apb {
+                       pinctrl@fffff400 {
+                               macb0 {
+                                       pinctrl_macb0_rmii: macb0_rmii-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB0 periph A */
+                                                        AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB1 periph A */
+                                                        AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB2 periph A */
+                                                        AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB3 periph A */
+                                                        AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB4 periph A */
+                                                        AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB5 periph A */
+                                                        AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB6 periph A */
+                                                        AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB7 periph A */
+                                                        AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB9 periph A */
+                                                        AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB10 periph A */
+                                       };
+
+                                       pinctrl_macb0_rmii_mii: macb0_rmii_mii-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB8 periph A */
+                                                        AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB11 periph A */
+                                                        AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB12 periph A */
+                                                        AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB13 periph A */
+                                                        AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB14 periph A */
+                                                        AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB15 periph A */
+                                                        AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB16 periph A */
+                                                        AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB17 periph A */
+                                       };
+                               };
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               periphck {
+                                       macb0_clk: macb0_clk@24 {
+                                               #clock-cells = <0>;
+                                               reg = <24>;
+                                       };
+                               };
+                       };
+
+                       macb0: ethernet@f802c000 {
+                               compatible = "cdns,at91sam9260-macb", "cdns,macb";
+                               reg = <0xf802c000 0x100>;
+                               interrupts = <24 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_macb0_rmii>;
+                               clocks = <&macb0_clk>, <&macb0_clk>;
+                               clock-names = "hclk", "pclk";
+                               status = "disabled";
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9x5_macb1.dtsi b/arch/arm/dts/at91sam9x5_macb1.dtsi
new file mode 100644 (file)
index 0000000..be2eab4
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * at91sam9x5_macb1.dtsi - Device Tree Include file for AT91SAM9x5 SoC with 2
+ * Ethernet interfaces.
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       ahb {
+               apb {
+                       pinctrl@fffff400 {
+                               macb1 {
+                                       pinctrl_macb1_rmii: macb1_rmii-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 16 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC16 periph B */
+                                                        AT91_PIOC 18 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC18 periph B */
+                                                        AT91_PIOC 19 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC19 periph B */
+                                                        AT91_PIOC 20 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC20 periph B */
+                                                        AT91_PIOC 21 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC21 periph B */
+                                                        AT91_PIOC 27 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC27 periph B */
+                                                        AT91_PIOC 28 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC28 periph B */
+                                                        AT91_PIOC 29 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC29 periph B */
+                                                        AT91_PIOC 30 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC30 periph B */
+                                                        AT91_PIOC 31 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC31 periph B */
+                                       };
+                               };
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               periphck {
+                                       macb1_clk: macb1_clk@27 {
+                                               #clock-cells = <0>;
+                                               reg = <27>;
+                                       };
+                               };
+                       };
+
+                       macb1: ethernet@f8030000 {
+                               compatible = "cdns,at91sam9260-macb", "cdns,macb";
+                               reg = <0xf8030000 0x100>;
+                               interrupts = <27 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_macb1_rmii>;
+                               clocks = <&macb1_clk>, <&macb1_clk>;
+                               clock-names = "hclk", "pclk";
+                               status = "disabled";
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9x5_usart3.dtsi b/arch/arm/dts/at91sam9x5_usart3.dtsi
new file mode 100644 (file)
index 0000000..5259219
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * at91sam9x5_usart3.dtsi - Device Tree Include file for AT91SAM9x5 SoC with
+ * 4 USART.
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       aliases {
+               serial4 = &usart3;
+       };
+
+       ahb {
+               apb {
+                       pinctrl@fffff400 {
+                               usart3 {
+                                       pinctrl_usart3: usart3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* PC22 periph B with pullup */
+                                                        AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_NONE>;         /* PC23 periph B */
+                                       };
+
+                                       pinctrl_usart3_rts: usart3_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE>;         /* PC24 periph B */
+                                       };
+
+                                       pinctrl_usart3_cts: usart3_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 25 AT91_PERIPH_B AT91_PINCTRL_NONE>;         /* PC25 periph B */
+                                       };
+
+                                       pinctrl_usart3_sck: usart3_sck-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 26 AT91_PERIPH_B AT91_PINCTRL_NONE>;         /* PC26 periph B */
+                                       };
+                               };
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               periphck {
+                                       usart3_clk: usart3_clk@8 {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                       };
+                               };
+                       };
+
+                       usart3: serial@f8028000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf8028000 0x200>;
+                               interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart3>;
+                               dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(14)>,
+                                      <&dma1 1 (AT91_DMA_CFG_PER_ID(15) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+                               dma-names = "tx", "rx";
+                               clocks = <&usart3_clk>;
+                               clock-names = "usart";
+                               status = "disabled";
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9x5cm.dtsi b/arch/arm/dts/at91sam9x5cm.dtsi
new file mode 100644 (file)
index 0000000..b098ad8
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * at91sam9x5cm.dtsi - Device Tree Include file for AT91SAM9x5 CPU Module
+ *
+ *  Copyright (C) 2012 Atmel,
+ *                2012 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+/ {
+       memory {
+               reg = <0x20000000 0x8000000>;
+       };
+
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <12000000>;
+               };
+       };
+
+       ahb {
+               apb {
+                       pinctrl@fffff400 {
+                               1wire_cm {
+                                       pinctrl_1wire_cm: 1wire_cm-0 {
+                                               atmel,pins = <AT91_PIOB 18 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>; /* PB18 multidrive, conflicts with led */
+                                       };
+                               };
+                       };
+
+                       rtc@fffffeb0 {
+                               status = "okay";
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "hw";
+                       atmel,has-pmecc;        /* Enable PMECC */
+                       atmel,pmecc-cap = <2>;
+                       atmel,pmecc-sector-size = <512>;
+                       nand-on-flash-bbt;
+                       status = "okay";
+
+                       at91bootstrap@0 {
+                               label = "at91bootstrap";
+                               reg = <0x0 0x40000>;
+                       };
+
+                       uboot@40000 {
+                               label = "u-boot";
+                               reg = <0x40000 0x80000>;
+                       };
+
+                       ubootenv@c0000 {
+                               label = "U-Boot Env";
+                               reg = <0xc0000 0x140000>;
+                       };
+
+                       kernel@200000 {
+                               label = "kernel";
+                               reg = <0x200000 0x600000>;
+                       };
+
+                       rootfs@800000 {
+                               label = "rootfs";
+                               reg = <0x800000 0x1f800000>;
+                       };
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               pb18 {
+                       label = "pb18";
+                       gpios = <&pioB 18 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "heartbeat";
+               };
+
+               pd21 {
+                       label = "pd21";
+                       gpios = <&pioD 21 GPIO_ACTIVE_HIGH>;
+               };
+       };
+
+       1wire_cm {
+               compatible = "w1-gpio";
+               gpios = <&pioB 18 GPIO_ACTIVE_HIGH>;
+               linux,open-drain;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_1wire_cm>;
+               status = "okay";
+       };
+
+};
diff --git a/arch/arm/dts/at91sam9x5dm.dtsi b/arch/arm/dts/at91sam9x5dm.dtsi
new file mode 100644 (file)
index 0000000..a620366
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * at91sam9x5dm.dtsi - Device Tree file for SAM9x5 display module
+ *
+ *  Copyright (C) 2014 Atmel,
+ *                2014 Free Electrons
+ *
+ *  Author: Boris Brezillon <boris.brezillon@free-electrons.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+/ {
+       ahb {
+               apb {
+                       i2c0: i2c@f8010000 {
+                               qt1070: keyboard@1b {
+                                       compatible = "qt1070";
+                                       reg = <0x1b>;
+                                       interrupt-parent = <&pioA>;
+                                       interrupts = <7 0x0>;
+                                       pinctrl-names = "default";
+                                       pinctrl-0 = <&pinctrl_qt1070_irq>;
+                                       wakeup-source;
+                               };
+                       };
+
+                       hlcdc: hlcdc@f8038000 {
+                               atmel,vl-bpix = <4>;
+                               atmel,guard-time = <1>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_pwm &pinctrl_lcd_rgb888>;
+
+                               display-timings {
+                                       u-boot,dm-pre-reloc;
+                                       800x480 {
+                                               clock-frequency = <24000000>;
+                                               hactive = <800>;
+                                               vactive = <480>;
+                                               hsync-len = <128>;
+                                               hfront-porch = <64>;
+                                               hback-porch = <64>;
+                                               vfront-porch = <22>;
+                                               vback-porch = <21>;
+                                               vsync-len = <2>;
+                                               u-boot,dm-pre-reloc;
+                                       };
+                               };
+                       };
+
+                       adc0: adc@f804c000 {
+                               atmel,adc-ts-wires = <4>;
+                               atmel,adc-ts-pressure-threshold = <10000>;
+                               status = "okay";
+                       };
+
+                       pinctrl@fffff400 {
+                               board {
+                                       pinctrl_qt1070_irq: qt1070_irq {
+                                               atmel,pins =
+                                                       <AT91_PIOA 7 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+                                       };
+                               };
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/at91sam9x5ek.dtsi b/arch/arm/dts/at91sam9x5ek.dtsi
new file mode 100644 (file)
index 0000000..f2a532d
--- /dev/null
@@ -0,0 +1,167 @@
+/*
+ * at91sam9x5ek.dtsi - Device Tree file for AT91SAM9x5CM Base board
+ *
+ *  Copyright (C) 2012 Atmel,
+ *                2012 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+#include "at91sam9x5cm.dtsi"
+
+/ {
+       model = "Atmel AT91SAM9X5-EK";
+       compatible = "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9";
+
+       chosen {
+               bootargs = "root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs";
+               stdout-path = "serial0:115200n8";
+               u-boot,dm-pre-reloc;
+       };
+
+       ahb {
+               apb {
+                       mmc0: mmc@f0008000 {
+                               pinctrl-0 = <
+                                       &pinctrl_board_mmc0
+                                       &pinctrl_mmc0_slot0_clk_cmd_dat0
+                                       &pinctrl_mmc0_slot0_dat1_3>;
+                               status = "okay";
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioD 15 GPIO_ACTIVE_HIGH>;
+                               };
+                       };
+
+                       mmc1: mmc@f000c000 {
+                               pinctrl-0 = <
+                                       &pinctrl_board_mmc1
+                                       &pinctrl_mmc1_slot0_clk_cmd_dat0
+                                       &pinctrl_mmc1_slot0_dat1_3>;
+                               status = "okay";
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioD 14 GPIO_ACTIVE_HIGH>;
+                               };
+                       };
+
+                       dbgu: serial@fffff200 {
+                               u-boot,dm-pre-reloc;
+                               status = "okay";
+                       };
+
+                       usart0: serial@f801c000 {
+                               status = "okay";
+                       };
+
+                       usb2: gadget@f803c000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_board_usb2>;
+                               atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>;
+                               status = "okay";
+                       };
+
+                       i2c0: i2c@f8010000 {
+                               status = "okay";
+
+                               wm8731: wm8731@1a {
+                                       compatible = "wm8731";
+                                       reg = <0x1a>;
+                               };
+                       };
+
+                       adc0: adc@f804c000 {
+                               atmel,adc-ts-wires = <4>;
+                               atmel,adc-ts-pressure-threshold = <10000>;
+                               status = "okay";
+                       };
+
+                       pinctrl@fffff400 {
+                               camera_sensor {
+                                       pinctrl_pck0_as_isi_mck: pck0_as_isi_mck-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 15 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* ISI_MCK */
+                                       };
+
+                                       pinctrl_sensor_power: sensor_power-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 13 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+                                       };
+
+                                       pinctrl_sensor_reset: sensor_reset-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 7 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+                                       };
+                               };
+
+                               mmc0 {
+                                       pinctrl_board_mmc0: mmc0-board {
+                                               atmel,pins =
+                                                       <AT91_PIOD 15 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;  /* PD15 gpio CD pin pull up and deglitch */
+                                       };
+                               };
+
+                               mmc1 {
+                                       pinctrl_board_mmc1: mmc1-board {
+                                               atmel,pins =
+                                                       <AT91_PIOD 14 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;  /* PD14 gpio CD pin pull up and deglitch */
+                                       };
+                               };
+
+                               usb2 {
+                                       pinctrl_board_usb2: usb2-board {
+                                               atmel,pins =
+                                                       <AT91_PIOB 16 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;          /* PB16 gpio vbus sense, deglitch */
+                                       };
+                               };
+                       };
+
+                       spi0: spi@f0000000 {
+                               status = "okay";
+                               cs-gpios = <&pioA 14 0>, <0>, <0>, <0>;
+                               spi_flash@0 {
+                                       compatible = "spi-flash";
+                                       spi-max-frequency = <50000000>;
+                                       reg = <0>;
+                               };
+                       };
+
+                       watchdog@fffffe40 {
+                               status = "okay";
+                       };
+
+                       ssc0: ssc@f0010000 {
+                               status = "okay";
+                       };
+               };
+
+               usb0: ohci@00600000 {
+                       status = "okay";
+                       num-ports = <3>;
+                       atmel,vbus-gpio = <0 /* &pioD 18 GPIO_ACTIVE_LOW *//* Activate to have access to port A */
+                                          &pioD 19 GPIO_ACTIVE_LOW
+                                          &pioD 20 GPIO_ACTIVE_LOW
+                                         >;
+               };
+
+               usb1: ehci@00700000 {
+                       status = "okay";
+               };
+       };
+
+       sound {
+               compatible = "atmel,sam9x5-wm8731-audio";
+
+               atmel,model = "wm8731 @ AT91SAM9X5EK";
+
+               atmel,audio-routing =
+                       "Headphone Jack", "RHPOUT",
+                       "Headphone Jack", "LHPOUT",
+                       "LLINEIN", "Line In Jack",
+                       "RLINEIN", "Line In Jack";
+
+               atmel,ssc-controller = <&ssc0>;
+               atmel,audio-codec = <&wm8731>;
+       };
+};
index cbef5d5c3b42c996e2fe118ea8a1561323ca5b50..f6c21052ae84123a1de7c68a8b94892e6aadba7d 100644 (file)
@@ -6,7 +6,7 @@
 
 /dts-v1/;
 #include <dt-bindings/gpio/gpio.h>
-#include "imx7.dtsi"
+#include "imx7d.dtsi"
 
 / {
        model = "Toradex Colibri iMX7S/D";
 &iomuxc_lpsr {
        pinctrl_i2c1: i2c1-grp {
                fsl,pins = <
-                       MX7D_PAD_GPIO1_IO05__I2C1_SDA   0x4000007f
-                       MX7D_PAD_GPIO1_IO04__I2C1_SCL   0x4000007f
+                       MX7D_PAD_LPSR_GPIO1_IO05__I2C1_SDA      0x4000007f
+                       MX7D_PAD_LPSR_GPIO1_IO04__I2C1_SCL      0x4000007f
                >;
        };
 
        pinctrl_i2c1_gpio: i2c1-gpio-grp {
                fsl,pins = <
-                       MX7D_PAD_GPIO1_IO05__GPIO1_IO5  0x4000007f
-                       MX7D_PAD_GPIO1_IO04__GPIO1_IO4  0x4000007f
+                       MX7D_PAD_LPSR_GPIO1_IO05__GPIO1_IO5     0x4000007f
+                       MX7D_PAD_LPSR_GPIO1_IO04__GPIO1_IO4     0x4000007f
                >;
        };
 };
diff --git a/arch/arm/dts/imx7.dtsi b/arch/arm/dts/imx7.dtsi
deleted file mode 100644 (file)
index 755cc46..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright 2016 Toradex AG
- *
- * SPDX-License-Identifier:     GPL-2.0+ or X11
- */
-#include "imx7d-pinfunc.h"
-#include "skeleton.dtsi"
-
-/ {
-       aliases {
-               gpio0 = &gpio1;
-               gpio1 = &gpio2;
-               gpio2 = &gpio3;
-               gpio3 = &gpio4;
-               gpio4 = &gpio5;
-               gpio5 = &gpio6;
-               gpio6 = &gpio7;
-               i2c0 = &i2c1;
-               i2c1 = &i2c2;
-               i2c2 = &i2c3;
-               i2c3 = &i2c4;
-               serial0 = &uart1;
-               serial1 = &uart2;
-               serial2 = &uart3;
-               serial3 = &uart4;
-               serial4 = &uart5;
-               serial5 = &uart6;
-               serial6 = &uart7;
-       };
-
-       soc {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               compatible = "simple-bus";
-               ranges;
-
-               aips1: aips-bus@30000000 {
-                       compatible = "fsl,aips-bus", "simple-bus";
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-                       reg = <0x30000000 0x400000>;
-                       ranges;
-
-                       gpio1: gpio@30200000 {
-                               compatible = "fsl,imx7d-gpio", "fsl,imx35-gpio";
-                               reg = <0x30200000 0x10000>;
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                       };
-
-                       gpio2: gpio@30210000 {
-                               compatible = "fsl,imx7d-gpio", "fsl,imx35-gpio";
-                               reg = <0x30210000 0x10000>;
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                       };
-
-                       gpio3: gpio@30220000 {
-                               compatible = "fsl,imx7d-gpio", "fsl,imx35-gpio";
-                               reg = <0x30220000 0x10000>;
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                       };
-
-                       gpio4: gpio@30230000 {
-                               compatible = "fsl,imx7d-gpio", "fsl,imx35-gpio";
-                               reg = <0x30230000 0x10000>;
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                       };
-
-                       gpio5: gpio@30240000 {
-                               compatible = "fsl,imx7d-gpio", "fsl,imx35-gpio";
-                               reg = <0x30240000 0x10000>;
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                       };
-
-                       gpio6: gpio@30250000 {
-                               compatible = "fsl,imx7d-gpio", "fsl,imx35-gpio";
-                               reg = <0x30250000 0x10000>;
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                       };
-
-                       gpio7: gpio@30260000 {
-                               compatible = "fsl,imx7d-gpio", "fsl,imx35-gpio";
-                               reg = <0x30260000 0x10000>;
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                       };
-
-                       iomuxc_lpsr: iomuxc-lpsr@302c0000 {
-                               compatible = "fsl,imx7d-iomuxc-lpsr";
-                               reg = <0x302c0000 0x10000>;
-                               fsl,input-sel = <&iomuxc>;
-                       };
-
-                       iomuxc: iomuxc@30330000 {
-                               compatible = "fsl,imx7d-iomuxc";
-                               reg = <0x30330000 0x10000>;
-                       };
-               };
-
-               aips3: aips-bus@30800000 {
-                       compatible = "fsl,aips-bus", "simple-bus";
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-                       reg = <0x30800000 0x400000>;
-                       ranges;
-
-                       uart1: serial@30860000 {
-                               compatible = "fsl,imx7d-uart",
-                                            "fsl,imx6q-uart";
-                               reg = <0x30860000 0x10000>;
-                               status = "disabled";
-                       };
-
-                       uart2: serial@30890000 {
-                               compatible = "fsl,imx7d-uart",
-                                            "fsl,imx6q-uart";
-                               reg = <0x30890000 0x10000>;
-                               status = "disabled";
-                       };
-
-                       uart3: serial@30880000 {
-                               compatible = "fsl,imx7d-uart",
-                                            "fsl,imx6q-uart";
-                               reg = <0x30880000 0x10000>;
-                               status = "disabled";
-                       };
-
-                       i2c1: i2c@30a20000 {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               compatible = "fsl,imx7d-i2c", "fsl,imx21-i2c";
-                               reg = <0x30a20000 0x10000>;
-                               status = "disabled";
-                       };
-
-                       i2c2: i2c@30a30000 {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               compatible = "fsl,imx7d-i2c", "fsl,imx21-i2c";
-                               reg = <0x30a30000 0x10000>;
-                               status = "disabled";
-                       };
-
-                       i2c3: i2c@30a40000 {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               compatible = "fsl,imx7d-i2c", "fsl,imx21-i2c";
-                               reg = <0x30a40000 0x10000>;
-                               status = "disabled";
-                       };
-
-                       i2c4: i2c@30a50000 {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               compatible = "fsl,imx7d-i2c", "fsl,imx21-i2c";
-                               reg = <0x30a50000 0x10000>;
-                               status = "disabled";
-                       };
-
-                       uart4: serial@30a60000 {
-                               compatible = "fsl,imx7d-uart",
-                                            "fsl,imx6q-uart";
-                               reg = <0x30a60000 0x10000>;
-                               status = "disabled";
-                       };
-
-                       uart5: serial@30a70000 {
-                               compatible = "fsl,imx7d-uart",
-                                            "fsl,imx6q-uart";
-                               reg = <0x30a70000 0x10000>;
-                               status = "disabled";
-                       };
-
-                       uart6: serial@30a80000 {
-                               compatible = "fsl,imx7d-uart",
-                                            "fsl,imx6q-uart";
-                               reg = <0x30a80000 0x10000>;
-                               status = "disabled";
-                       };
-
-                       uart7: serial@30a90000 {
-                               compatible = "fsl,imx7d-uart",
-                                            "fsl,imx6q-uart";
-                               reg = <0x30a90000 0x10000>;
-                               status = "disabled";
-                       };
-               };
-       };
-};
index 32d2464b417d19c11846c04a9022c5101dce8169..f6f7e78f8820e15d40913d244e20ba5eae458331 100644 (file)
@@ -1,7 +1,10 @@
 /*
  * Copyright (C) 2014-2015 Freescale Semiconductor, Inc.
  *
- * SPDX-License-Identifier:     GPL-2.0+
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
  */
 
 #ifndef __DTS_IMX7D_PINFUNC_H
  * <mux_reg conf_reg input_reg mux_mode input_val>
  */
 
-#define MX7D_PAD_GPIO1_IO00__GPIO1_IO0                            0x0000 0x0030 0x0000 0x0 0x0
-#define MX7D_PAD_GPIO1_IO00__PWM4_OUT                             0x0000 0x0030 0x0000 0x1 0x0
-#define MX7D_PAD_GPIO1_IO00__WDOD1_WDOG_ANY                       0x0000 0x0030 0x0000 0x2 0x0
-#define MX7D_PAD_GPIO1_IO00__WDOD1_WDOG_B                         0x0000 0x0030 0x0000 0x3 0x0
-#define MX7D_PAD_GPIO1_IO00__WDOD1_WDOG__RST_B_DEB                0x0000 0x0030 0x0000 0x4 0x0
-#define MX7D_PAD_GPIO1_IO01__GPIO1_IO1                            0x0004 0x0034 0x0000 0x0 0x0
-#define MX7D_PAD_GPIO1_IO01__PWM1_OUT                             0x0004 0x0034 0x0000 0x1 0x0
-#define MX7D_PAD_GPIO1_IO01__CCM_ENET_REF_CLK3                    0x0004 0x0034 0x0000 0x2 0x0
-#define MX7D_PAD_GPIO1_IO01__SAI1_MCLK                            0x0004 0x0034 0x0000 0x3 0x0
-#define MX7D_PAD_GPIO1_IO01__ANATOP_24M_OUT                       0x0004 0x0034 0x0000 0x4 0x0
-#define MX7D_PAD_GPIO1_IO01__OBSERVE0_OUT                         0x0004 0x0034 0x0000 0x6 0x0
-#define MX7D_PAD_GPIO1_IO02__GPIO1_IO2                            0x0008 0x0038 0x0000 0x0 0x0
-#define MX7D_PAD_GPIO1_IO02__PWM2_OUT                             0x0008 0x0038 0x0000 0x1 0x0
-#define MX7D_PAD_GPIO1_IO02__CCM_ENET_REF_CLK1                    0x0008 0x0038 0x0564 0x2 0x3
-#define MX7D_PAD_GPIO1_IO02__SAI2_MCLK                            0x0008 0x0038 0x0000 0x3 0x0
-#define MX7D_PAD_GPIO1_IO02__CCM_CLKO1                            0x0008 0x0038 0x0000 0x5 0x0
-#define MX7D_PAD_GPIO1_IO02__OBSERVE1_OUT                         0x0008 0x0038 0x0000 0x6 0x0
-#define MX7D_PAD_GPIO1_IO02__USB_OTG1_ID                          0x0008 0x0038 0x0734 0x7 0x3
-#define MX7D_PAD_GPIO1_IO03__GPIO1_IO3                            0x000C 0x003C 0x0000 0x0 0x0
-#define MX7D_PAD_GPIO1_IO03__PWM3_OUT                             0x000C 0x003C 0x0000 0x1 0x0
-#define MX7D_PAD_GPIO1_IO03__CCM_ENET_REF_CLK2                    0x000C 0x003C 0x0570 0x2 0x3
-#define MX7D_PAD_GPIO1_IO03__SAI3_MCLK                            0x000C 0x003C 0x0000 0x3 0x0
-#define MX7D_PAD_GPIO1_IO03__CCM_CLKO2                            0x000C 0x003C 0x0000 0x5 0x0
-#define MX7D_PAD_GPIO1_IO03__OBSERVE2_OUT                         0x000C 0x003C 0x0000 0x6 0x0
-#define MX7D_PAD_GPIO1_IO03__USB_OTG2_ID                          0x000C 0x003C 0x0730 0x7 0x3
-#define MX7D_PAD_GPIO1_IO04__GPIO1_IO4                            0x0010 0x0040 0x0000 0x0 0x0
-#define MX7D_PAD_GPIO1_IO04__USB_OTG1_OC                          0x0010 0x0040 0x072C 0x1 0x1
-#define MX7D_PAD_GPIO1_IO04__FLEXTIMER1_CH4                       0x0010 0x0040 0x0594 0x2 0x1
-#define MX7D_PAD_GPIO1_IO04__UART5_CTS_B                          0x0010 0x0040 0x0710 0x3 0x4
-#define MX7D_PAD_GPIO1_IO04__I2C1_SCL                             0x0010 0x0040 0x05D4 0x4 0x2
-#define MX7D_PAD_GPIO1_IO04__OBSERVE3_OUT                         0x0010 0x0040 0x0000 0x6 0x0
-#define MX7D_PAD_GPIO1_IO05__GPIO1_IO5                            0x0014 0x0044 0x0000 0x0 0x0
-#define MX7D_PAD_GPIO1_IO05__USB_OTG1_PWR                         0x0014 0x0044 0x0000 0x1 0x0
-#define MX7D_PAD_GPIO1_IO05__FLEXTIMER1_CH5                       0x0014 0x0044 0x0598 0x2 0x1
-#define MX7D_PAD_GPIO1_IO05__UART5_RTS_B                          0x0014 0x0044 0x0710 0x3 0x5
-#define MX7D_PAD_GPIO1_IO05__I2C1_SDA                             0x0014 0x0044 0x05D8 0x4 0x2
-#define MX7D_PAD_GPIO1_IO05__OBSERVE4_OUT                         0x0014 0x0044 0x0000 0x6 0x0
-#define MX7D_PAD_GPIO1_IO06__GPIO1_IO6                            0x0018 0x0048 0x0000 0x0 0x0
-#define MX7D_PAD_GPIO1_IO06__USB_OTG2_OC                          0x0018 0x0048 0x0728 0x1 0x1
-#define MX7D_PAD_GPIO1_IO06__FLEXTIMER1_CH6                       0x0018 0x0048 0x059C 0x2 0x1
-#define MX7D_PAD_GPIO1_IO06__UART5_RX_DATA                        0x0018 0x0048 0x0714 0x3 0x4
-#define MX7D_PAD_GPIO1_IO06__I2C2_SCL                             0x0018 0x0048 0x05DC 0x4 0x2
-#define MX7D_PAD_GPIO1_IO06__CCM_WAIT                             0x0018 0x0048 0x0000 0x5 0x0
-#define MX7D_PAD_GPIO1_IO06__KPP_ROW4                             0x0018 0x0048 0x0624 0x6 0x1
-#define MX7D_PAD_GPIO1_IO07__GPIO1_IO7                            0x001C 0x004C 0x0000 0x0 0x0
-#define MX7D_PAD_GPIO1_IO07__USB_OTG2_PWR                         0x001C 0x004C 0x0000 0x1 0x0
-#define MX7D_PAD_GPIO1_IO07__FLEXTIMER1_CH7                       0x001C 0x004C 0x05A0 0x2 0x1
-#define MX7D_PAD_GPIO1_IO07__UART5_TX_DATA                        0x001C 0x004C 0x0714 0x3 0x5
-#define MX7D_PAD_GPIO1_IO07__I2C2_SDA                             0x001C 0x004C 0x05E0 0x4 0x2
-#define MX7D_PAD_GPIO1_IO07__CCM_STOP                             0x001C 0x004C 0x0000 0x5 0x0
-#define MX7D_PAD_GPIO1_IO07__KPP_COL4                             0x001C 0x004C 0x0604 0x6 0x1
+#define MX7D_PAD_LPSR_GPIO1_IO00__GPIO1_IO0                       0x0000 0x0030 0x0000 0x0 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO00__PWM4_OUT                        0x0000 0x0030 0x0000 0x1 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO00__WDOD1_WDOG_ANY                  0x0000 0x0030 0x0000 0x2 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO00__WDOD1_WDOG_B                    0x0000 0x0030 0x0000 0x3 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO00__WDOD1_WDOG__RST_B_DEB           0x0000 0x0030 0x0000 0x4 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO01__GPIO1_IO1                       0x0004 0x0034 0x0000 0x0 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO01__PWM1_OUT                        0x0004 0x0034 0x0000 0x1 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO01__CCM_ENET_REF_CLK3               0x0004 0x0034 0x0000 0x2 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO01__SAI1_MCLK                       0x0004 0x0034 0x0000 0x3 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO01__ANATOP_24M_OUT                  0x0004 0x0034 0x0000 0x4 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO01__OBSERVE0_OUT                    0x0004 0x0034 0x0000 0x6 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO02__GPIO1_IO2                       0x0008 0x0038 0x0000 0x0 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO02__PWM2_OUT                        0x0008 0x0038 0x0000 0x1 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO02__CCM_ENET_REF_CLK1               0x0008 0x0038 0x0564 0x2 0x3
+#define MX7D_PAD_LPSR_GPIO1_IO02__SAI2_MCLK                       0x0008 0x0038 0x0000 0x3 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO02__CCM_CLKO1                       0x0008 0x0038 0x0000 0x5 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO02__OBSERVE1_OUT                    0x0008 0x0038 0x0000 0x6 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO02__USB_OTG1_ID                     0x0008 0x0038 0x0734 0x7 0x3
+#define MX7D_PAD_LPSR_GPIO1_IO03__GPIO1_IO3                       0x000C 0x003C 0x0000 0x0 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO03__PWM3_OUT                        0x000C 0x003C 0x0000 0x1 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO03__CCM_ENET_REF_CLK2               0x000C 0x003C 0x0570 0x2 0x3
+#define MX7D_PAD_LPSR_GPIO1_IO03__SAI3_MCLK                       0x000C 0x003C 0x0000 0x3 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO03__CCM_CLKO2                       0x000C 0x003C 0x0000 0x5 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO03__OBSERVE2_OUT                    0x000C 0x003C 0x0000 0x6 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO03__USB_OTG2_ID                     0x000C 0x003C 0x0730 0x7 0x3
+#define MX7D_PAD_LPSR_GPIO1_IO04__GPIO1_IO4                       0x0010 0x0040 0x0000 0x0 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO04__USB_OTG1_OC                     0x0010 0x0040 0x072C 0x1 0x1
+#define MX7D_PAD_LPSR_GPIO1_IO04__FLEXTIMER1_CH4                  0x0010 0x0040 0x0594 0x2 0x1
+#define MX7D_PAD_LPSR_GPIO1_IO04__UART5_DCE_CTS                   0x0010 0x0040 0x0000 0x3 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO04__UART5_DTE_RTS                   0x0010 0x0040 0x0710 0x3 0x4
+#define MX7D_PAD_LPSR_GPIO1_IO04__I2C1_SCL                        0x0010 0x0040 0x05D4 0x4 0x2
+#define MX7D_PAD_LPSR_GPIO1_IO04__OBSERVE3_OUT                    0x0010 0x0040 0x0000 0x6 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO05__GPIO1_IO5                       0x0014 0x0044 0x0000 0x0 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO05__USB_OTG1_PWR                    0x0014 0x0044 0x0000 0x1 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO05__FLEXTIMER1_CH5                  0x0014 0x0044 0x0598 0x2 0x1
+#define MX7D_PAD_LPSR_GPIO1_IO05__UART5_DCE_RTS                   0x0014 0x0044 0x0710 0x3 0x5
+#define MX7D_PAD_LPSR_GPIO1_IO05__UART5_DTE_CTS                   0x0014 0x0044 0x0000 0x3 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO05__I2C1_SDA                        0x0014 0x0044 0x05D8 0x4 0x2
+#define MX7D_PAD_LPSR_GPIO1_IO05__OBSERVE4_OUT                    0x0014 0x0044 0x0000 0x6 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO06__GPIO1_IO6                       0x0018 0x0048 0x0000 0x0 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO06__USB_OTG2_OC                     0x0018 0x0048 0x0728 0x1 0x1
+#define MX7D_PAD_LPSR_GPIO1_IO06__FLEXTIMER1_CH6                  0x0018 0x0048 0x059C 0x2 0x1
+#define MX7D_PAD_LPSR_GPIO1_IO06__UART5_DCE_RX                    0x0018 0x0048 0x0714 0x3 0x4
+#define MX7D_PAD_LPSR_GPIO1_IO06__UART5_DTE_TX                    0x0018 0x0048 0x0000 0x3 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO06__I2C2_SCL                        0x0018 0x0048 0x05DC 0x4 0x2
+#define MX7D_PAD_LPSR_GPIO1_IO06__CCM_WAIT                        0x0018 0x0048 0x0000 0x5 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO06__KPP_ROW4                        0x0018 0x0048 0x0624 0x6 0x1
+#define MX7D_PAD_LPSR_GPIO1_IO07__GPIO1_IO7                       0x001C 0x004C 0x0000 0x0 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO07__USB_OTG2_PWR                    0x001C 0x004C 0x0000 0x1 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO07__FLEXTIMER1_CH7                  0x001C 0x004C 0x05A0 0x2 0x1
+#define MX7D_PAD_LPSR_GPIO1_IO07__UART5_DCE_TX                    0x001C 0x004C 0x0000 0x3 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO07__UART5_DTE_RX                    0x001C 0x004C 0x0714 0x3 0x5
+#define MX7D_PAD_LPSR_GPIO1_IO07__I2C2_SDA                        0x001C 0x004C 0x05E0 0x4 0x2
+#define MX7D_PAD_LPSR_GPIO1_IO07__CCM_STOP                        0x001C 0x004C 0x0000 0x5 0x0
+#define MX7D_PAD_LPSR_GPIO1_IO07__KPP_COL4                        0x001C 0x004C 0x0604 0x6 0x1
 #define MX7D_PAD_GPIO1_IO08__GPIO1_IO8                            0x0014 0x026C 0x0000 0x0 0x0
 #define MX7D_PAD_GPIO1_IO08__SD1_VSELECT                          0x0014 0x026C 0x0000 0x1 0x0
 #define MX7D_PAD_GPIO1_IO08__WDOG1_WDOG_B                         0x0014 0x026C 0x0000 0x2 0x0
diff --git a/arch/arm/dts/imx7d-sdb.dts b/arch/arm/dts/imx7d-sdb.dts
new file mode 100644 (file)
index 0000000..85b83c3
--- /dev/null
@@ -0,0 +1,309 @@
+/*
+ * Copyright 2017 NXP
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+/dts-v1/;
+
+#include "imx7d.dtsi"
+
+/ {
+       model = "Freescale i.MX7 SabreSD Board";
+       compatible = "fsl,imx7d-sdb", "fsl,imx7d";
+
+       memory {
+               reg = <0x80000000 0x80000000>;
+       };
+
+       spi4 {
+               compatible = "spi-gpio";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_spi1>;
+               status = "okay";
+               gpio-sck = <&gpio1 13 0>;
+               gpio-mosi = <&gpio1 9 0>;
+               cs-gpios = <&gpio1 12 0>;
+               num-chipselects = <1>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               gpio_spi: gpio_spi@0 {
+                       compatible = "fairchild,74hc595";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       reg = <0>;
+                       registers-number = <1>;
+                       registers-default = /bits/ 8 <0x74>; /* Enable PERI_3V3, SENSOR_RST_B and HDMI_RST*/
+                       spi-max-frequency = <100000>;
+               };
+       };
+
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               reg_usb_otg1_vbus: regulator@0 {
+                       compatible = "regulator-fixed";
+                       reg = <0>;
+                       regulator-name = "usb_otg1_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+               };
+
+               reg_usb_otg2_vbus: regulator@1 {
+                       compatible = "regulator-fixed";
+                       reg = <1>;
+                       regulator-name = "usb_otg2_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+               };
+
+               reg_sd1_vmmc: regulator@3 {
+                       compatible = "regulator-fixed";
+                       regulator-name = "VDD_SD1";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>;
+                       startup-delay-us = <200000>;
+                       enable-active-high;
+               };
+       };
+};
+
+&iomuxc {
+       imx7d-sdb {
+               pinctrl_spi1: spi1grp {
+                       fsl,pins = <
+                               MX7D_PAD_GPIO1_IO09__GPIO1_IO9  0x59
+                               MX7D_PAD_GPIO1_IO12__GPIO1_IO12 0x59
+                               MX7D_PAD_GPIO1_IO13__GPIO1_IO13 0x59
+                       >;
+               };
+
+               pinctrl_i2c1: i2c1grp {
+                       fsl,pins = <
+                               MX7D_PAD_I2C1_SDA__I2C1_SDA     0x4000007f
+                               MX7D_PAD_I2C1_SCL__I2C1_SCL     0x4000007f
+                       >;
+               };
+
+               pinctrl_i2c2: i2c2grp {
+                       fsl,pins = <
+                               MX7D_PAD_I2C2_SDA__I2C2_SDA     0x4000007f
+                               MX7D_PAD_I2C2_SCL__I2C2_SCL     0x4000007f
+                       >;
+               };
+
+               pinctrl_i2c3: i2c3grp {
+                       fsl,pins = <
+                               MX7D_PAD_I2C3_SDA__I2C3_SDA     0x4000007f
+                               MX7D_PAD_I2C3_SCL__I2C3_SCL     0x4000007f
+                       >;
+               };
+
+               pinctrl_i2c4: i2c4grp {
+                       fsl,pins = <
+                               MX7D_PAD_SAI1_RX_BCLK__I2C4_SDA 0x4000007f
+                               MX7D_PAD_SAI1_RX_SYNC__I2C4_SCL 0x4000007f
+                       >;
+               };
+
+               pinctrl_usdhc1_gpio: usdhc1_gpiogrp {
+                       fsl,pins = <
+                               MX7D_PAD_SD1_CD_B__GPIO5_IO0            0x59 /* CD */
+                               MX7D_PAD_SD1_WP__GPIO5_IO1              0x59 /* WP */
+                               MX7D_PAD_SD1_RESET_B__GPIO5_IO2         0x59 /* vmmc */
+                               MX7D_PAD_GPIO1_IO08__SD1_VSELECT        0x59 /* VSELECT */
+                       >;
+               };
+
+               pinctrl_usdhc1: usdhc1grp {
+                       fsl,pins = <
+                               MX7D_PAD_SD1_CMD__SD1_CMD               0x59
+                               MX7D_PAD_SD1_CLK__SD1_CLK               0x19
+                               MX7D_PAD_SD1_DATA0__SD1_DATA0           0x59
+                               MX7D_PAD_SD1_DATA1__SD1_DATA1           0x59
+                               MX7D_PAD_SD1_DATA2__SD1_DATA2           0x59
+                               MX7D_PAD_SD1_DATA3__SD1_DATA3           0x59
+                       >;
+               };
+
+               pinctrl_usdhc2: usdhc2grp {
+                       fsl,pins = <
+                               MX7D_PAD_SD2_CMD__SD2_CMD       0x59
+                               MX7D_PAD_SD2_CLK__SD2_CLK       0x19
+                               MX7D_PAD_SD2_DATA0__SD2_DATA0   0x59
+                               MX7D_PAD_SD2_DATA1__SD2_DATA1   0x59
+                               MX7D_PAD_SD2_DATA2__SD2_DATA2   0x59
+                               MX7D_PAD_SD2_DATA3__SD2_DATA3   0x59
+                               MX7D_PAD_ECSPI2_MOSI__GPIO4_IO21        0x19 /* WL_REG_ON */
+                               MX7D_PAD_ECSPI2_SCLK__GPIO4_IO20        0x19 /* WL_HOST_WAKE */
+                       >;
+               };
+
+               pinctrl_usdhc3: usdhc3grp {
+                       fsl,pins = <
+                               MX7D_PAD_SD3_CMD__SD3_CMD               0x59
+                               MX7D_PAD_SD3_CLK__SD3_CLK               0x19
+                               MX7D_PAD_SD3_DATA0__SD3_DATA0           0x59
+                               MX7D_PAD_SD3_DATA1__SD3_DATA1           0x59
+                               MX7D_PAD_SD3_DATA2__SD3_DATA2           0x59
+                               MX7D_PAD_SD3_DATA3__SD3_DATA3           0x59
+                               MX7D_PAD_SD3_DATA4__SD3_DATA4           0x59
+                               MX7D_PAD_SD3_DATA5__SD3_DATA5           0x59
+                               MX7D_PAD_SD3_DATA6__SD3_DATA6           0x59
+                               MX7D_PAD_SD3_DATA7__SD3_DATA7           0x59
+                               MX7D_PAD_SD3_STROBE__SD3_STROBE         0x19
+                       >;
+               };
+       };
+};
+
+&i2c1 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c1>;
+       status = "okay";
+
+       pmic: pfuze3000@08 {
+               compatible = "fsl,pfuze3000";
+               reg = <0x08>;
+
+               regulators {
+                       sw1a_reg: sw1a {
+                               regulator-min-microvolt = <700000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <6250>;
+                       };
+
+                       /* use sw1c_reg to align with pfuze100/pfuze200 */
+                       sw1c_reg: sw1b {
+                               regulator-min-microvolt = <700000>;
+                               regulator-max-microvolt = <1475000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <6250>;
+                       };
+
+                       sw2_reg: sw2 {
+                               regulator-min-microvolt = <1500000>;
+                               regulator-max-microvolt = <1850000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       sw3a_reg: sw3 {
+                               regulator-min-microvolt = <900000>;
+                               regulator-max-microvolt = <1650000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       swbst_reg: swbst {
+                               regulator-min-microvolt = <5000000>;
+                               regulator-max-microvolt = <5150000>;
+                       };
+
+                       snvs_reg: vsnvs {
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <3000000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       vref_reg: vrefddr {
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       vgen1_reg: vldo1 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vgen2_reg: vldo2 {
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <1550000>;
+                               regulator-always-on;
+                       };
+
+                       vgen3_reg: vccsd {
+                               regulator-min-microvolt = <2850000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vgen4_reg: v33 {
+                               regulator-min-microvolt = <2850000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vgen5_reg: vldo3 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vgen6_reg: vldo4 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+               };
+       };
+};
+
+&i2c2 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c2>;
+       status = "okay";
+};
+
+&i2c3 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c3>;
+       status = "okay";
+};
+
+&i2c4 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c4>;
+       status = "okay";
+};
+
+&usdhc1 {
+       pinctrl-names = "default", "state_100mhz", "state_200mhz";
+       pinctrl-0 = <&pinctrl_usdhc1>, <&pinctrl_usdhc1_gpio>;
+       cd-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
+       wp-gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
+       vmmc-supply = <&reg_sd1_vmmc>;
+       status = "okay";
+};
+
+&usdhc2 {
+       pinctrl-names = "default", "state_100mhz", "state_200mhz";
+       pinctrl-0 = <&pinctrl_usdhc2>;
+       non-removable;
+       status = "okay";
+};
+
+&usdhc3 {
+       pinctrl-names = "default", "state_100mhz", "state_200mhz";
+       pinctrl-0 = <&pinctrl_usdhc3>;
+       bus-width = <8>;
+       non-removable;
+       status = "okay";
+};
diff --git a/arch/arm/dts/imx7d.dtsi b/arch/arm/dts/imx7d.dtsi
new file mode 100644 (file)
index 0000000..f6dee41
--- /dev/null
@@ -0,0 +1,140 @@
+/*
+ * Copyright 2015 Freescale Semiconductor, Inc.
+ * Copyright 2016 Toradex AG
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "imx7s.dtsi"
+
+/ {
+       cpus {
+               cpu0: cpu@0 {
+                       operating-points = <
+                               /* KHz  uV */
+                               996000  1075000
+                               792000  975000
+                       >;
+                       clock-frequency = <996000000>;
+               };
+
+               cpu1: cpu@1 {
+                       compatible = "arm,cortex-a7";
+                       device_type = "cpu";
+                       reg = <1>;
+                       clock-frequency = <996000000>;
+               };
+       };
+
+       soc {
+               etm@3007d000 {
+                       compatible = "arm,coresight-etm3x", "arm,primecell";
+                       reg = <0x3007d000 0x1000>;
+
+                       /*
+                        * System will hang if added nosmp in kernel command line
+                        * without arm,primecell-periphid because amba bus try to
+                        * read id and core1 power off at this time.
+                        */
+                       arm,primecell-periphid = <0xbb956>;
+                       cpu = <&cpu1>;
+                       clocks = <&clks IMX7D_MAIN_AXI_ROOT_CLK>;
+                       clock-names = "apb_pclk";
+
+                       port {
+                               etm1_out_port: endpoint {
+                                       remote-endpoint = <&ca_funnel_in_port1>;
+                               };
+                       };
+               };
+       };
+};
+
+&aips3 {
+       usbotg2: usb@30b20000 {
+               compatible = "fsl,imx7d-usb", "fsl,imx27-usb";
+               reg = <0x30b20000 0x200>;
+               interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&clks IMX7D_USB_CTRL_CLK>;
+               fsl,usbphy = <&usbphynop2>;
+               fsl,usbmisc = <&usbmisc2 0>;
+               phy-clkgate-delay-us = <400>;
+               status = "disabled";
+       };
+
+       usbmisc2: usbmisc@30b20200 {
+               #index-cells = <1>;
+               compatible = "fsl,imx7d-usbmisc", "fsl,imx6q-usbmisc";
+               reg = <0x30b20200 0x200>;
+       };
+
+       usbphynop2: usbphynop2 {
+               compatible = "usb-nop-xceiv";
+               clocks = <&clks IMX7D_USB_PHY2_CLK>;
+               clock-names = "main_clk";
+       };
+
+       fec2: ethernet@30bf0000 {
+               compatible = "fsl,imx7d-fec", "fsl,imx6sx-fec";
+               reg = <0x30bf0000 0x10000>;
+               interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+                       <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+                       <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&clks IMX7D_ENET_AXI_ROOT_CLK>,
+                       <&clks IMX7D_ENET_AXI_ROOT_CLK>,
+                       <&clks IMX7D_ENET2_TIME_ROOT_CLK>,
+                       <&clks IMX7D_PLL_ENET_MAIN_125M_CLK>,
+                       <&clks IMX7D_ENET_PHY_REF_ROOT_CLK>;
+               clock-names = "ipg", "ahb", "ptp",
+                       "enet_clk_ref", "enet_out";
+               fsl,num-tx-queues=<3>;
+               fsl,num-rx-queues=<3>;
+               status = "disabled";
+       };
+};
+
+&ca_funnel_ports {
+       port@1 {
+               reg = <1>;
+               ca_funnel_in_port1: endpoint {
+                       slave-mode;
+                       remote-endpoint = <&etm1_out_port>;
+               };
+       };
+};
diff --git a/arch/arm/dts/imx7s.dtsi b/arch/arm/dts/imx7s.dtsi
new file mode 100644 (file)
index 0000000..a7d48e7
--- /dev/null
@@ -0,0 +1,999 @@
+/*
+ * Copyright 2015 Freescale Semiconductor, Inc.
+ * Copyright 2016 Toradex AG
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <dt-bindings/clock/imx7d-clock.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include "imx7d-pinfunc.h"
+
+/ {
+       #address-cells = <1>;
+       #size-cells = <1>;
+       /*
+        * The decompressor and also some bootloaders rely on a
+        * pre-existing /chosen node to be available to insert the
+        * command line and merge other ATAGS info.
+        * Also for U-Boot there must be a pre-existing /memory node.
+        */
+       chosen {};
+       memory { device_type = "memory"; reg = <0 0>; };
+
+       aliases {
+               gpio0 = &gpio1;
+               gpio1 = &gpio2;
+               gpio2 = &gpio3;
+               gpio3 = &gpio4;
+               gpio4 = &gpio5;
+               gpio5 = &gpio6;
+               gpio6 = &gpio7;
+               i2c0 = &i2c1;
+               i2c1 = &i2c2;
+               i2c2 = &i2c3;
+               i2c3 = &i2c4;
+               mmc0 = &usdhc1;
+               mmc1 = &usdhc2;
+               mmc2 = &usdhc3;
+               serial0 = &uart1;
+               serial1 = &uart2;
+               serial2 = &uart3;
+               serial3 = &uart4;
+               serial4 = &uart5;
+               serial5 = &uart6;
+               serial6 = &uart7;
+               spi0 = &ecspi1;
+               spi1 = &ecspi2;
+               spi2 = &ecspi3;
+               spi3 = &ecspi4;
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu0: cpu@0 {
+                       compatible = "arm,cortex-a7";
+                       device_type = "cpu";
+                       reg = <0>;
+                       clock-frequency = <792000000>;
+                       clock-latency = <61036>; /* two CLK32 periods */
+                       clocks = <&clks IMX7D_CLK_ARM>;
+               };
+       };
+
+       ckil: clock-cki {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <32768>;
+               clock-output-names = "ckil";
+       };
+
+       osc: clock-osc {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <24000000>;
+               clock-output-names = "osc";
+       };
+
+       soc {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "simple-bus";
+               interrupt-parent = <&intc>;
+               ranges;
+
+               funnel@30041000 {
+                       compatible = "arm,coresight-funnel", "arm,primecell";
+                       reg = <0x30041000 0x1000>;
+                       clocks = <&clks IMX7D_MAIN_AXI_ROOT_CLK>;
+                       clock-names = "apb_pclk";
+
+                       ca_funnel_ports: ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               /* funnel input ports */
+                               port@0 {
+                                       reg = <0>;
+                                       ca_funnel_in_port0: endpoint {
+                                               slave-mode;
+                                               remote-endpoint = <&etm0_out_port>;
+                                       };
+                               };
+
+                               /* funnel output port */
+                               port@2 {
+                                       reg = <0>;
+                                       ca_funnel_out_port0: endpoint {
+                                               remote-endpoint = <&hugo_funnel_in_port0>;
+                                       };
+                               };
+
+                               /* the other input ports are not connect to anything */
+                       };
+               };
+
+               etm@3007c000 {
+                       compatible = "arm,coresight-etm3x", "arm,primecell";
+                       reg = <0x3007c000 0x1000>;
+                       cpu = <&cpu0>;
+                       clocks = <&clks IMX7D_MAIN_AXI_ROOT_CLK>;
+                       clock-names = "apb_pclk";
+
+                       port {
+                               etm0_out_port: endpoint {
+                                       remote-endpoint = <&ca_funnel_in_port0>;
+                               };
+                       };
+               };
+
+               funnel@30083000 {
+                       compatible = "arm,coresight-funnel", "arm,primecell";
+                       reg = <0x30083000 0x1000>;
+                       clocks = <&clks IMX7D_MAIN_AXI_ROOT_CLK>;
+                       clock-names = "apb_pclk";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               /* funnel input ports */
+                               port@0 {
+                                       reg = <0>;
+                                       hugo_funnel_in_port0: endpoint {
+                                               slave-mode;
+                                               remote-endpoint = <&ca_funnel_out_port0>;
+                                       };
+                               };
+
+                               port@1 {
+                                       reg = <1>;
+                                       hugo_funnel_in_port1: endpoint {
+                                               slave-mode; /* M4 input */
+                                       };
+                               };
+
+                               port@2 {
+                                       reg = <0>;
+                                       hugo_funnel_out_port0: endpoint {
+                                               remote-endpoint = <&etf_in_port>;
+                                       };
+                               };
+
+                               /* the other input ports are not connect to anything */
+                       };
+               };
+
+               etf@30084000 {
+                       compatible = "arm,coresight-tmc", "arm,primecell";
+                       reg = <0x30084000 0x1000>;
+                       clocks = <&clks IMX7D_MAIN_AXI_ROOT_CLK>;
+                       clock-names = "apb_pclk";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+                                       etf_in_port: endpoint {
+                                               slave-mode;
+                                               remote-endpoint = <&hugo_funnel_out_port0>;
+                                       };
+                               };
+
+                               port@1 {
+                                       reg = <0>;
+                                       etf_out_port: endpoint {
+                                               remote-endpoint = <&replicator_in_port0>;
+                                       };
+                               };
+                       };
+               };
+
+               etr@30086000 {
+                       compatible = "arm,coresight-tmc", "arm,primecell";
+                       reg = <0x30086000 0x1000>;
+                       clocks = <&clks IMX7D_MAIN_AXI_ROOT_CLK>;
+                       clock-names = "apb_pclk";
+
+                       port {
+                               etr_in_port: endpoint {
+                                       slave-mode;
+                                       remote-endpoint = <&replicator_out_port1>;
+                               };
+                       };
+               };
+
+               tpiu@30087000 {
+                       compatible = "arm,coresight-tpiu", "arm,primecell";
+                       reg = <0x30087000 0x1000>;
+                       clocks = <&clks IMX7D_MAIN_AXI_ROOT_CLK>;
+                       clock-names = "apb_pclk";
+
+                       port {
+                               tpiu_in_port: endpoint {
+                                       slave-mode;
+                                       remote-endpoint = <&replicator_out_port1>;
+                               };
+                       };
+               };
+
+               replicator {
+                       /*
+                        * non-configurable replicators don't show up on the
+                        * AMBA bus.  As such no need to add "arm,primecell"
+                        */
+                       compatible = "arm,coresight-replicator";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               /* replicator output ports */
+                               port@0 {
+                                       reg = <0>;
+                                       replicator_out_port0: endpoint {
+                                               remote-endpoint = <&tpiu_in_port>;
+                                       };
+                               };
+
+                               port@1 {
+                                       reg = <1>;
+                                       replicator_out_port1: endpoint {
+                                               remote-endpoint = <&etr_in_port>;
+                                       };
+                               };
+
+                               /* replicator input port */
+                               port@2 {
+                                       reg = <0>;
+                                       replicator_in_port0: endpoint {
+                                               slave-mode;
+                                               remote-endpoint = <&etf_out_port>;
+                                       };
+                               };
+                       };
+               };
+
+               intc: interrupt-controller@31001000 {
+                       compatible = "arm,cortex-a7-gic";
+                       interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+                       #interrupt-cells = <3>;
+                       interrupt-controller;
+                       reg = <0x31001000 0x1000>,
+                             <0x31002000 0x2000>,
+                             <0x31004000 0x2000>,
+                             <0x31006000 0x2000>;
+               };
+
+               timer {
+                       compatible = "arm,armv7-timer";
+                       interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+                                    <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+                                    <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+                                    <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
+               };
+
+               aips1: aips-bus@30000000 {
+                       compatible = "fsl,aips-bus", "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = <0x30000000 0x400000>;
+                       ranges;
+
+                       gpio1: gpio@30200000 {
+                               compatible = "fsl,imx7d-gpio", "fsl,imx35-gpio";
+                               reg = <0x30200000 0x10000>;
+                               interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>, /* GPIO1_INT15_0 */
+                                            <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; /* GPIO1_INT31_16 */
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               gpio-ranges = <&iomuxc_lpsr 0 0 8>, <&iomuxc 8 5 8>;
+                       };
+
+                       gpio2: gpio@30210000 {
+                               compatible = "fsl,imx7d-gpio", "fsl,imx35-gpio";
+                               reg = <0x30210000 0x10000>;
+                               interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               gpio-ranges = <&iomuxc 0 13 32>;
+                       };
+
+                       gpio3: gpio@30220000 {
+                               compatible = "fsl,imx7d-gpio", "fsl,imx35-gpio";
+                               reg = <0x30220000 0x10000>;
+                               interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               gpio-ranges = <&iomuxc 0 45 29>;
+                       };
+
+                       gpio4: gpio@30230000 {
+                               compatible = "fsl,imx7d-gpio", "fsl,imx35-gpio";
+                               reg = <0x30230000 0x10000>;
+                               interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               gpio-ranges = <&iomuxc 0 74 24>;
+                       };
+
+                       gpio5: gpio@30240000 {
+                               compatible = "fsl,imx7d-gpio", "fsl,imx35-gpio";
+                               reg = <0x30240000 0x10000>;
+                               interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               gpio-ranges = <&iomuxc 0 98 18>;
+                       };
+
+                       gpio6: gpio@30250000 {
+                               compatible = "fsl,imx7d-gpio", "fsl,imx35-gpio";
+                               reg = <0x30250000 0x10000>;
+                               interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               gpio-ranges = <&iomuxc 0 116 23>;
+                       };
+
+                       gpio7: gpio@30260000 {
+                               compatible = "fsl,imx7d-gpio", "fsl,imx35-gpio";
+                               reg = <0x30260000 0x10000>;
+                               interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               gpio-ranges = <&iomuxc 0 139 16>;
+                       };
+
+                       wdog1: wdog@30280000 {
+                               compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
+                               reg = <0x30280000 0x10000>;
+                               interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_WDOG1_ROOT_CLK>;
+                       };
+
+                       wdog2: wdog@30290000 {
+                               compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
+                               reg = <0x30290000 0x10000>;
+                               interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_WDOG2_ROOT_CLK>;
+                               status = "disabled";
+                       };
+
+                       wdog3: wdog@302a0000 {
+                               compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
+                               reg = <0x302a0000 0x10000>;
+                               interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_WDOG3_ROOT_CLK>;
+                               status = "disabled";
+                       };
+
+                       wdog4: wdog@302b0000 {
+                               compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
+                               reg = <0x302b0000 0x10000>;
+                               interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_WDOG4_ROOT_CLK>;
+                               status = "disabled";
+                       };
+
+                       iomuxc_lpsr: iomuxc-lpsr@302c0000 {
+                               compatible = "fsl,imx7d-iomuxc-lpsr";
+                               reg = <0x302c0000 0x10000>;
+                               fsl,input-sel = <&iomuxc>;
+                       };
+
+                       gpt1: gpt@302d0000 {
+                               compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
+                               reg = <0x302d0000 0x10000>;
+                               interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_CLK_DUMMY>,
+                                        <&clks IMX7D_GPT1_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                       };
+
+                       gpt2: gpt@302e0000 {
+                               compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
+                               reg = <0x302e0000 0x10000>;
+                               interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_CLK_DUMMY>,
+                                        <&clks IMX7D_GPT2_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       gpt3: gpt@302f0000 {
+                               compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
+                               reg = <0x302f0000 0x10000>;
+                               interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_CLK_DUMMY>,
+                                        <&clks IMX7D_GPT3_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       gpt4: gpt@30300000 {
+                               compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
+                               reg = <0x30300000 0x10000>;
+                               interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_CLK_DUMMY>,
+                                        <&clks IMX7D_GPT4_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       iomuxc: iomuxc@30330000 {
+                               compatible = "fsl,imx7d-iomuxc";
+                               reg = <0x30330000 0x10000>;
+                       };
+
+                       gpr: iomuxc-gpr@30340000 {
+                               compatible = "fsl,imx7d-iomuxc-gpr", "syscon";
+                               reg = <0x30340000 0x10000>;
+                       };
+
+                       ocotp: ocotp-ctrl@30350000 {
+                               compatible = "fsl,imx7d-ocotp", "syscon";
+                               reg = <0x30350000 0x10000>;
+                               clocks = <&clks IMX7D_OCOTP_CLK>;
+                       };
+
+                       anatop: anatop@30360000 {
+                               compatible = "fsl,imx7d-anatop", "fsl,imx6q-anatop",
+                                       "syscon", "simple-bus";
+                               reg = <0x30360000 0x10000>;
+                               interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
+                                       <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
+
+                               reg_1p0d: regulator-vdd1p0d {
+                                       compatible = "fsl,anatop-regulator";
+                                       regulator-name = "vdd1p0d";
+                                       regulator-min-microvolt = <800000>;
+                                       regulator-max-microvolt = <1200000>;
+                                       anatop-reg-offset = <0x210>;
+                                       anatop-vol-bit-shift = <8>;
+                                       anatop-vol-bit-width = <5>;
+                                       anatop-min-bit-val = <8>;
+                                       anatop-min-voltage = <800000>;
+                                       anatop-max-voltage = <1200000>;
+                               };
+                       };
+
+                       snvs: snvs@30370000 {
+                               compatible = "fsl,sec-v4.0-mon", "syscon", "simple-mfd";
+                               reg = <0x30370000 0x10000>;
+
+                               snvs_rtc: snvs-rtc-lp {
+                                       compatible = "fsl,sec-v4.0-mon-rtc-lp";
+                                       regmap = <&snvs>;
+                                       offset = <0x34>;
+                                       interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
+                                                    <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+                               };
+
+                               snvs_poweroff: snvs-poweroff {
+                                       compatible = "syscon-poweroff";
+                                       regmap = <&snvs>;
+                                       offset = <0x38>;
+                                       mask = <0x60>;
+                               };
+
+                               snvs_pwrkey: snvs-powerkey {
+                                       compatible = "fsl,sec-v4.0-pwrkey";
+                                       regmap = <&snvs>;
+                                       interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+                                       linux,keycode = <KEY_POWER>;
+                                       wakeup-source;
+                               };
+                       };
+
+                       clks: ccm@30380000 {
+                               compatible = "fsl,imx7d-ccm";
+                               reg = <0x30380000 0x10000>;
+                               interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+                               #clock-cells = <1>;
+                               clocks = <&ckil>, <&osc>;
+                               clock-names = "ckil", "osc";
+                       };
+
+                       src: src@30390000 {
+                               compatible = "fsl,imx7d-src", "fsl,imx51-src", "syscon";
+                               reg = <0x30390000 0x10000>;
+                               interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
+                               #reset-cells = <1>;
+                       };
+               };
+
+               aips2: aips-bus@30400000 {
+                       compatible = "fsl,aips-bus", "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = <0x30400000 0x400000>;
+                       ranges;
+
+                       adc1: adc@30610000 {
+                               compatible = "fsl,imx7d-adc";
+                               reg = <0x30610000 0x10000>;
+                               interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_ADC_ROOT_CLK>;
+                               clock-names = "adc";
+                               status = "disabled";
+                       };
+
+                       adc2: adc@30620000 {
+                               compatible = "fsl,imx7d-adc";
+                               reg = <0x30620000 0x10000>;
+                               interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_ADC_ROOT_CLK>;
+                               clock-names = "adc";
+                               status = "disabled";
+                       };
+
+                       ecspi4: ecspi@30630000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx7d-ecspi", "fsl,imx51-ecspi";
+                               reg = <0x30630000 0x10000>;
+                               interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_ECSPI4_ROOT_CLK>,
+                                       <&clks IMX7D_ECSPI4_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       pwm1: pwm@30660000 {
+                               compatible = "fsl,imx7d-pwm", "fsl,imx27-pwm";
+                               reg = <0x30660000 0x10000>;
+                               interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_PWM1_ROOT_CLK>,
+                                        <&clks IMX7D_PWM1_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               #pwm-cells = <2>;
+                               status = "disabled";
+                       };
+
+                       pwm2: pwm@30670000 {
+                               compatible = "fsl,imx7d-pwm", "fsl,imx27-pwm";
+                               reg = <0x30670000 0x10000>;
+                               interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_PWM2_ROOT_CLK>,
+                                        <&clks IMX7D_PWM2_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               #pwm-cells = <2>;
+                               status = "disabled";
+                       };
+
+                       pwm3: pwm@30680000 {
+                               compatible = "fsl,imx7d-pwm", "fsl,imx27-pwm";
+                               reg = <0x30680000 0x10000>;
+                               interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_PWM3_ROOT_CLK>,
+                                        <&clks IMX7D_PWM3_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               #pwm-cells = <2>;
+                               status = "disabled";
+                       };
+
+                       pwm4: pwm@30690000 {
+                               compatible = "fsl,imx7d-pwm", "fsl,imx27-pwm";
+                               reg = <0x30690000 0x10000>;
+                               interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_PWM4_ROOT_CLK>,
+                                        <&clks IMX7D_PWM4_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               #pwm-cells = <2>;
+                               status = "disabled";
+                       };
+
+                       lcdif: lcdif@30730000 {
+                               compatible = "fsl,imx7d-lcdif", "fsl,imx28-lcdif";
+                               reg = <0x30730000 0x10000>;
+                               interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_LCDIF_PIXEL_ROOT_CLK>,
+                                       <&clks IMX7D_LCDIF_PIXEL_ROOT_CLK>;
+                               clock-names = "pix", "axi";
+                               status = "disabled";
+                       };
+               };
+
+               aips3: aips-bus@30800000 {
+                       compatible = "fsl,aips-bus", "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = <0x30800000 0x400000>;
+                       ranges;
+
+                       ecspi1: ecspi@30820000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx7d-ecspi", "fsl,imx51-ecspi";
+                               reg = <0x30820000 0x10000>;
+                               interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_ECSPI1_ROOT_CLK>,
+                                       <&clks IMX7D_ECSPI1_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       ecspi2: ecspi@30830000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx7d-ecspi", "fsl,imx51-ecspi";
+                               reg = <0x30830000 0x10000>;
+                               interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_ECSPI2_ROOT_CLK>,
+                                       <&clks IMX7D_ECSPI2_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       ecspi3: ecspi@30840000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx7d-ecspi", "fsl,imx51-ecspi";
+                               reg = <0x30840000 0x10000>;
+                               interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_ECSPI3_ROOT_CLK>,
+                                       <&clks IMX7D_ECSPI3_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       uart1: serial@30860000 {
+                               compatible = "fsl,imx7d-uart",
+                                            "fsl,imx6q-uart";
+                               reg = <0x30860000 0x10000>;
+                               interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_UART1_ROOT_CLK>,
+                                       <&clks IMX7D_UART1_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       uart2: serial@30890000 {
+                               compatible = "fsl,imx7d-uart",
+                                            "fsl,imx6q-uart";
+                               reg = <0x30890000 0x10000>;
+                               interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_UART2_ROOT_CLK>,
+                                       <&clks IMX7D_UART2_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       uart3: serial@30880000 {
+                               compatible = "fsl,imx7d-uart",
+                                            "fsl,imx6q-uart";
+                               reg = <0x30880000 0x10000>;
+                               interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_UART3_ROOT_CLK>,
+                                       <&clks IMX7D_UART3_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       sai1: sai@308a0000 {
+                               #sound-dai-cells = <0>;
+                               compatible = "fsl,imx7d-sai", "fsl,imx6sx-sai";
+                               reg = <0x308a0000 0x10000>;
+                               interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_SAI1_IPG_CLK>,
+                                        <&clks IMX7D_SAI1_ROOT_CLK>,
+                                        <&clks IMX7D_CLK_DUMMY>,
+                                        <&clks IMX7D_CLK_DUMMY>;
+                               clock-names = "bus", "mclk1", "mclk2", "mclk3";
+                               dma-names = "rx", "tx";
+                               dmas = <&sdma 8 24 0>, <&sdma 9 24 0>;
+                               status = "disabled";
+                       };
+
+                       sai2: sai@308b0000 {
+                               #sound-dai-cells = <0>;
+                               compatible = "fsl,imx7d-sai", "fsl,imx6sx-sai";
+                               reg = <0x308b0000 0x10000>;
+                               interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_SAI2_IPG_CLK>,
+                                        <&clks IMX7D_SAI2_ROOT_CLK>,
+                                        <&clks IMX7D_CLK_DUMMY>,
+                                        <&clks IMX7D_CLK_DUMMY>;
+                               clock-names = "bus", "mclk1", "mclk2", "mclk3";
+                               dma-names = "rx", "tx";
+                               dmas = <&sdma 10 24 0>, <&sdma 11 24 0>;
+                               status = "disabled";
+                       };
+
+                       sai3: sai@308c0000 {
+                               #sound-dai-cells = <0>;
+                               compatible = "fsl,imx7d-sai", "fsl,imx6sx-sai";
+                               reg = <0x308c0000 0x10000>;
+                               interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_SAI3_IPG_CLK>,
+                                        <&clks IMX7D_SAI3_ROOT_CLK>,
+                                        <&clks IMX7D_CLK_DUMMY>,
+                                        <&clks IMX7D_CLK_DUMMY>;
+                               clock-names = "bus", "mclk1", "mclk2", "mclk3";
+                               dma-names = "rx", "tx";
+                               dmas = <&sdma 12 24 0>, <&sdma 13 24 0>;
+                               status = "disabled";
+                       };
+
+                       flexcan1: can@30a00000 {
+                               compatible = "fsl,imx7d-flexcan", "fsl,imx6q-flexcan";
+                               reg = <0x30a00000 0x10000>;
+                               interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_CLK_DUMMY>,
+                                       <&clks IMX7D_CAN1_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       flexcan2: can@30a10000 {
+                               compatible = "fsl,imx7d-flexcan", "fsl,imx6q-flexcan";
+                               reg = <0x30a10000 0x10000>;
+                               interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_CLK_DUMMY>,
+                                       <&clks IMX7D_CAN2_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       i2c1: i2c@30a20000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx7d-i2c", "fsl,imx21-i2c";
+                               reg = <0x30a20000 0x10000>;
+                               interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_I2C1_ROOT_CLK>;
+                               status = "disabled";
+                       };
+
+                       i2c2: i2c@30a30000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx7d-i2c", "fsl,imx21-i2c";
+                               reg = <0x30a30000 0x10000>;
+                               interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_I2C2_ROOT_CLK>;
+                               status = "disabled";
+                       };
+
+                       i2c3: i2c@30a40000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx7d-i2c", "fsl,imx21-i2c";
+                               reg = <0x30a40000 0x10000>;
+                               interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_I2C3_ROOT_CLK>;
+                               status = "disabled";
+                       };
+
+                       i2c4: i2c@30a50000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx7d-i2c", "fsl,imx21-i2c";
+                               reg = <0x30a50000 0x10000>;
+                               interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_I2C4_ROOT_CLK>;
+                               status = "disabled";
+                       };
+
+                       uart4: serial@30a60000 {
+                               compatible = "fsl,imx7d-uart",
+                                            "fsl,imx6q-uart";
+                               reg = <0x30a60000 0x10000>;
+                               interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_UART4_ROOT_CLK>,
+                                       <&clks IMX7D_UART4_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       uart5: serial@30a70000 {
+                               compatible = "fsl,imx7d-uart",
+                                            "fsl,imx6q-uart";
+                               reg = <0x30a70000 0x10000>;
+                               interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_UART5_ROOT_CLK>,
+                                       <&clks IMX7D_UART5_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       uart6: serial@30a80000 {
+                               compatible = "fsl,imx7d-uart",
+                                            "fsl,imx6q-uart";
+                               reg = <0x30a80000 0x10000>;
+                               interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_UART6_ROOT_CLK>,
+                                       <&clks IMX7D_UART6_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       uart7: serial@30a90000 {
+                               compatible = "fsl,imx7d-uart",
+                                            "fsl,imx6q-uart";
+                               reg = <0x30a90000 0x10000>;
+                               interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_UART7_ROOT_CLK>,
+                                       <&clks IMX7D_UART7_ROOT_CLK>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       usbotg1: usb@30b10000 {
+                               compatible = "fsl,imx7d-usb", "fsl,imx27-usb";
+                               reg = <0x30b10000 0x200>;
+                               interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_USB_CTRL_CLK>;
+                               fsl,usbphy = <&usbphynop1>;
+                               fsl,usbmisc = <&usbmisc1 0>;
+                               phy-clkgate-delay-us = <400>;
+                               status = "disabled";
+                       };
+
+                       usbh: usb@30b30000 {
+                               compatible = "fsl,imx7d-usb", "fsl,imx27-usb";
+                               reg = <0x30b30000 0x200>;
+                               interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_USB_CTRL_CLK>;
+                               fsl,usbphy = <&usbphynop3>;
+                               fsl,usbmisc = <&usbmisc3 0>;
+                               phy_type = "hsic";
+                               dr_mode = "host";
+                               phy-clkgate-delay-us = <400>;
+                               status = "disabled";
+                       };
+
+                       usbmisc1: usbmisc@30b10200 {
+                               #index-cells = <1>;
+                               compatible = "fsl,imx7d-usbmisc", "fsl,imx6q-usbmisc";
+                               reg = <0x30b10200 0x200>;
+                       };
+
+                       usbmisc3: usbmisc@30b30200 {
+                               #index-cells = <1>;
+                               compatible = "fsl,imx7d-usbmisc", "fsl,imx6q-usbmisc";
+                               reg = <0x30b30200 0x200>;
+                       };
+
+                       usbphynop1: usbphynop1 {
+                               compatible = "usb-nop-xceiv";
+                               clocks = <&clks IMX7D_USB_PHY1_CLK>;
+                               clock-names = "main_clk";
+                       };
+
+                       usbphynop3: usbphynop3 {
+                               compatible = "usb-nop-xceiv";
+                               clocks = <&clks IMX7D_USB_HSIC_ROOT_CLK>;
+                               clock-names = "main_clk";
+                       };
+
+                       usdhc1: usdhc@30b40000 {
+                               compatible = "fsl,imx7d-usdhc", "fsl,imx6sl-usdhc";
+                               reg = <0x30b40000 0x10000>;
+                               interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_CLK_DUMMY>,
+                                       <&clks IMX7D_CLK_DUMMY>,
+                                       <&clks IMX7D_USDHC1_ROOT_CLK>;
+                               clock-names = "ipg", "ahb", "per";
+                               bus-width = <4>;
+                               status = "disabled";
+                       };
+
+                       usdhc2: usdhc@30b50000 {
+                               compatible = "fsl,imx7d-usdhc", "fsl,imx6sl-usdhc";
+                               reg = <0x30b50000 0x10000>;
+                               interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_CLK_DUMMY>,
+                                       <&clks IMX7D_CLK_DUMMY>,
+                                       <&clks IMX7D_USDHC2_ROOT_CLK>;
+                               clock-names = "ipg", "ahb", "per";
+                               bus-width = <4>;
+                               status = "disabled";
+                       };
+
+                       usdhc3: usdhc@30b60000 {
+                               compatible = "fsl,imx7d-usdhc", "fsl,imx6sl-usdhc";
+                               reg = <0x30b60000 0x10000>;
+                               interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_CLK_DUMMY>,
+                                       <&clks IMX7D_CLK_DUMMY>,
+                                       <&clks IMX7D_USDHC3_ROOT_CLK>;
+                               clock-names = "ipg", "ahb", "per";
+                               bus-width = <4>;
+                               status = "disabled";
+                       };
+
+                       sdma: sdma@30bd0000 {
+                               compatible = "fsl,imx7d-sdma", "fsl,imx35-sdma";
+                               reg = <0x30bd0000 0x10000>;
+                               interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_SDMA_CORE_CLK>,
+                                        <&clks IMX7D_AHB_CHANNEL_ROOT_CLK>;
+                               clock-names = "ipg", "ahb";
+                               #dma-cells = <3>;
+                               fsl,sdma-ram-script-name = "imx/sdma/sdma-imx7d.bin";
+                       };
+
+                       fec1: ethernet@30be0000 {
+                               compatible = "fsl,imx7d-fec", "fsl,imx6sx-fec";
+                               reg = <0x30be0000 0x10000>;
+                               interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+                                       <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>,
+                                       <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_ENET_AXI_ROOT_CLK>,
+                                       <&clks IMX7D_ENET_AXI_ROOT_CLK>,
+                                       <&clks IMX7D_ENET1_TIME_ROOT_CLK>,
+                                       <&clks IMX7D_PLL_ENET_MAIN_125M_CLK>,
+                                       <&clks IMX7D_ENET_PHY_REF_ROOT_CLK>;
+                               clock-names = "ipg", "ahb", "ptp",
+                                       "enet_clk_ref", "enet_out";
+                               fsl,num-tx-queues=<3>;
+                               fsl,num-rx-queues=<3>;
+                               status = "disabled";
+                       };
+               };
+       };
+};
index 696a0d745921a1d872b28fedfd3cdc2ea6064b77..2c99df44600e684b9d072c0cf44c82cd9fb14398 100644 (file)
 &mmc1 {
        status = "okay";
 };
+
+&i2c0 {
+       status = "okay";
+};
+
+&i2c1 {
+       status = "okay";
+};
index 2193f9fa21bf4cb50e3d5eb87334e74d0617ea1b..191e3f167a609c61e23a02d35430c8fcd0d5b42c 100644 (file)
@@ -24,6 +24,9 @@
                spi2 = &spi2;
                spi3 = &spi3;
                spi4 = &qspi;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
        };
 
        memory {
                        #size-cells = <0>;
                        status = "disabled";
                };
+               i2c0: i2c@2530000 {
+                       compatible = "ti,keystone-i2c";
+                       reg = <0x02530000 0x400>;
+                       clock-frequency = <100000>;
+                       interrupts = <GIC_SPI 88 IRQ_TYPE_EDGE_RISING>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               i2c1: i2c@2530400 {
+                       compatible = "ti,keystone-i2c";
+                       reg = <0x02530400 0x400>;
+                       clock-frequency = <100000>;
+                       interrupts = <GIC_SPI 89 IRQ_TYPE_EDGE_RISING>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               i2c2: i2c@2530800 {
+                       compatible = "ti,keystone-i2c";
+                       reg = <0x02530800 0x400>;
+                       clock-frequency = <100000>;
+                       interrupts = <GIC_SPI 90 IRQ_TYPE_EDGE_RISING>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
 
                mmc0: mmc@23000000 {
                        compatible = "ti,omap4-hsmmc";
index be97f3f21f926e95b799dd24d2943ca1a7223652..9a2e1f69bba6d725f17f0488c4b902cc405cfbe0 100644 (file)
@@ -22,6 +22,9 @@
                spi0 = &spi0;
                spi1 = &spi1;
                spi2 = &spi2;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
        };
 
        chosen {
diff --git a/arch/arm/dts/logicpd-som-lv-37xx-devkit.dts b/arch/arm/dts/logicpd-som-lv-37xx-devkit.dts
new file mode 100644 (file)
index 0000000..1702b9e
--- /dev/null
@@ -0,0 +1,269 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/dts-v1/;
+
+#include "omap36xx.dtsi"
+#include "logicpd-som-lv.dtsi"
+#include "omap-gpmc-smsc9221.dtsi"
+
+/ {
+       model = "LogicPD Zoom DM3730 SOM-LV Development Kit";
+       compatible = "logicpd,dm3730-som-lv-devkit", "ti,omap3630", "ti,omap3";
+
+       chosen {
+               stdout-path = &uart1;
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+               pinctrl-0 = <&gpio_key_pins>;
+
+               sysboot2 {
+                       label = "gpio3";
+                       gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;    /* gpio_111 / uP_GPIO_3 */
+                       linux,code = <BTN_0>;
+                       wakeup-source;
+               };
+       };
+
+       sound {
+               compatible = "ti,omap-twl4030";
+               ti,model = "omap3logic";
+               ti,mcbsp = <&mcbsp2>;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&led_pins &led_pins_wkup>;
+
+               led1 {
+                       label = "led1";
+                       gpios = <&gpio5 5 GPIO_ACTIVE_LOW>;     /* gpio133 */
+                       linux,default-trigger = "cpu0";
+               };
+
+               led2 {
+                       label = "led2";
+                       gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;    /* gpio11 */
+                       linux,default-trigger = "none";
+               };
+       };
+};
+
+&vaux1 {
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+};
+
+&vaux4 {
+       regulator-min-microvolt = <1800000>;
+       regulator-max-microvolt = <1800000>;
+};
+
+&mcbsp2 {
+       status = "okay";
+};
+
+&charger {
+       ti,bb-uvolt = <3200000>;
+       ti,bb-uamp = <150>;
+};
+
+&gpmc {
+       ranges = <1 0 0x08000000 0x1000000>;    /* CS1: 16MB for LAN9221 */
+
+       ethernet@gpmc {
+               pinctrl-names = "default";
+               pinctrl-0 = <&lan9221_pins>;
+               interrupt-parent = <&gpio5>;
+               interrupts = <24 IRQ_TYPE_LEVEL_LOW>;           /* gpio_152 */
+               reg = <1 0 0xff>;
+       };
+};
+
+&vpll2 {
+       regulator-always-on;
+};
+
+&dss {
+       status = "ok";
+       vdds_dsi-supply = <&vpll2>;
+       vdda_video-supply = <&video_reg>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&dss_dpi_pins1>;
+       port {
+               dpi_out: endpoint {
+                       remote-endpoint = <&lcd_in>;
+                       data-lines = <16>;
+               };
+       };
+};
+
+/ {
+       aliases {
+               display0 = &lcd0;
+       };
+
+       video_reg: video_reg {
+               compatible = "regulator-fixed";
+               regulator-name = "fixed-supply";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       lcd0: display@0 {
+               compatible = "panel-dpi";
+               label = "28";
+               status = "okay";
+               /* default-on; */
+               pinctrl-names = "default";
+               pinctrl-0 = <&lcd_enable_pin>;
+               enable-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>;    /* gpio155, lcd INI */
+               port {
+                       lcd_in: endpoint {
+                               remote-endpoint = <&dpi_out>;
+                       };
+               };
+
+               panel-timing {
+                       clock-frequency = <9000000>;
+                       hactive = <480>;
+                       vactive = <272>;
+                       hfront-porch = <3>;
+                       hback-porch = <2>;
+                       hsync-len = <42>;
+                       vback-porch = <3>;
+                       vfront-porch = <2>;
+                       vsync-len = <11>;
+                       hsync-active = <1>;
+                       vsync-active = <1>;
+                       de-active = <1>;
+                       pixelclk-active = <0>;
+               };
+       };
+
+       bl: backlight {
+               compatible = "pwm-backlight";
+               pinctrl-names = "default";
+               pinctrl-0 = <&backlight_pins>;
+               pwms = <&twl_pwm 0 5000000>;
+               brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+               default-brightness-level = <7>;
+               enable-gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; /* gpio_8 */
+       };
+};
+
+&mmc1 {
+       interrupts-extended = <&intc 83 &omap3_pmx_core 0x11a>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins>;
+       vmmc-supply = <&vmmc1>;
+       bus-width = <4>;
+       cap-power-off-card;
+};
+
+&mmc2 {
+       status = "disabled";
+};
+
+&omap3_pmx_core {
+       gpio_key_pins: pinmux_gpio_key_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x212e, PIN_INPUT_PULLUP | MUX_MODE4) /* cam_xclkb.gpio_111 / uP_GPIO_3*/
+               >;
+       };
+
+       led_pins: pinmux_led_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x215e, PIN_OUTPUT_PULLUP | MUX_MODE4)        /* sdmmc2_dat1.gpio_133 / uP_GPIO_0 */
+               >;
+       };
+
+       lan9221_pins: pinmux_lan9221_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x2184, PIN_INPUT_PULLUP | MUX_MODE4) /* mcbsp4_clkx.gpio_152 */
+               >;
+       };
+
+       mmc1_pins: pinmux_mmc1_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x2144, PIN_OUTPUT | MUX_MODE0)       /* sdmmc1_clk.sdmmc1_clk */
+                       OMAP3_CORE1_IOPAD(0x2146, PIN_INPUT | MUX_MODE0)        /* sdmmc1_cmd.sdmmc1_cmd */
+                       OMAP3_CORE1_IOPAD(0x2148, PIN_INPUT | MUX_MODE0)        /* sdmmc1_dat0.sdmmc1_dat0 */
+                       OMAP3_CORE1_IOPAD(0x214a, PIN_INPUT | MUX_MODE0)        /* sdmmc1_dat1.sdmmc1_dat1 */
+                       OMAP3_CORE1_IOPAD(0x214c, PIN_INPUT | MUX_MODE0)        /* sdmmc1_dat2.sdmmc1_dat2 */
+                       OMAP3_CORE1_IOPAD(0x214e, PIN_INPUT | MUX_MODE0)        /* sdmmc1_dat3.sdmmc1_dat3 */
+                       OMAP3_CORE1_IOPAD(0x2132, PIN_INPUT_PULLUP | MUX_MODE4) /* cam_strobe.gpio_126 */
+                       OMAP3_CORE1_IOPAD(0x212c, PIN_INPUT_PULLUP | MUX_MODE4) /* cam_d11.gpio_110 */
+               >;
+       };
+
+       lcd_enable_pin: pinmux_lcd_enable_pin {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x218a, PIN_OUTPUT | PIN_OFF_OUTPUT_LOW | MUX_MODE4)       /* mcbsp4_fs.gpio_155 */
+               >;
+       };
+
+       dss_dpi_pins1: pinmux_dss_dpi_pins1 {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_pclk.dss_pclk */
+                       OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_hsync.dss_hsync */
+                       OMAP3_CORE1_IOPAD(0x20d8, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_vsync.dss_vsync */
+                       OMAP3_CORE1_IOPAD(0x20da, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_acbias.dss_acbias */
+
+                       OMAP3_CORE1_IOPAD(0x20dc, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data0.dss_data0 */
+                       OMAP3_CORE1_IOPAD(0x20de, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data1.dss_data1 */
+                       OMAP3_CORE1_IOPAD(0x20e0, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data2.dss_data2 */
+                       OMAP3_CORE1_IOPAD(0x20e2, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data3.dss_data3 */
+                       OMAP3_CORE1_IOPAD(0x20e4, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data4.dss_data4 */
+                       OMAP3_CORE1_IOPAD(0x20e6, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data5.dss_data5 */
+                       OMAP3_CORE1_IOPAD(0x20e8, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data6.dss_data6 */
+                       OMAP3_CORE1_IOPAD(0x20ea, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data7.dss_data7 */
+                       OMAP3_CORE1_IOPAD(0x20ec, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data8.dss_data8 */
+                       OMAP3_CORE1_IOPAD(0x20ee, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data9.dss_data9 */
+                       OMAP3_CORE1_IOPAD(0x20f0, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data10.dss_data10 */
+                       OMAP3_CORE1_IOPAD(0x20f2, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data11.dss_data11 */
+                       OMAP3_CORE1_IOPAD(0x20f4, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data12.dss_data12 */
+                       OMAP3_CORE1_IOPAD(0x20f6, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data13.dss_data13 */
+                       OMAP3_CORE1_IOPAD(0x20f8, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data14.dss_data14 */
+                       OMAP3_CORE1_IOPAD(0x20fa, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data15.dss_data15 */
+               >;
+       };
+};
+
+&omap3_pmx_wkup {
+       led_pins_wkup: pinmux_led_pins_wkup {
+               pinctrl-single,pins = <
+                       OMAP3_WKUP_IOPAD(0x2a24, PIN_OUTPUT_PULLUP | MUX_MODE4) /* jtag_emu0.gpio_11 / uP_GPIO_1 */
+               >;
+       };
+
+       backlight_pins: pinmux_backlight_pins {
+               pinctrl-single,pins = <
+                       OMAP3_WKUP_IOPAD(0x2a16, PIN_OUTPUT | PIN_OFF_OUTPUT_LOW | MUX_MODE4)       /* sys_boot6.gpio_8 */
+               >;
+       };
+};
+
+
+&uart1 {
+       interrupts-extended = <&intc 72 &omap3_pmx_core OMAP3_UART1_RX>;
+};
+
+/* Wired to the tps65950 on the SOM, only the USB connector is on the devkit */
+&usb_otg_hs {
+       pinctrl-names = "default";
+       pinctrl-0 = <&hsusb_otg_pins>;
+       interface-type = <0>;
+       usb-phy = <&usb2_phy>;
+       phys = <&usb2_phy>;
+       phy-names = "usb2-phy";
+       mode = <3>;
+       power = <50>;
+};
diff --git a/arch/arm/dts/logicpd-som-lv.dtsi b/arch/arm/dts/logicpd-som-lv.dtsi
new file mode 100644 (file)
index 0000000..46dae55
--- /dev/null
@@ -0,0 +1,271 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <dt-bindings/input/input.h>
+
+/ {
+       cpus {
+               cpu@0 {
+                       cpu0-supply = <&vcc>;
+               };
+       };
+
+       memory@80000000 {
+               device_type = "memory";
+               reg = <0x80000000 0>;
+       };
+
+       wl12xx_vmmc: wl12xx_vmmc {
+               compatible = "regulator-fixed";
+               regulator-name = "vwl1271";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               gpio = <&gpio1 3 0>;   /* gpio_3 */
+               startup-delay-us = <70000>;
+               enable-active-high;
+               vin-supply = <&vmmc2>;
+       };
+
+       /* HS USB Host PHY on PORT 1 */
+       hsusb2_phy: hsusb2_phy {
+               compatible = "usb-nop-xceiv";
+               reset-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; /* gpio_4 */
+       };
+};
+
+&gpmc {
+       ranges = <0 0 0x00000000 0x1000000>;    /* CS0: 16MB for NAND */
+
+       nand@0,0 {
+               compatible = "ti,omap2-nand";
+               reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
+               interrupt-parent = <&gpmc>;
+               interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
+                            <1 IRQ_TYPE_NONE>; /* termcount */
+               linux,mtd-name = "micron,mt29f4g16abbda3w";
+               nand-bus-width = <16>;
+               ti,nand-ecc-opt = "bch8";
+               rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
+               gpmc,sync-clk-ps = <0>;
+               gpmc,cs-on-ns = <0>;
+               gpmc,cs-rd-off-ns = <44>;
+               gpmc,cs-wr-off-ns = <44>;
+               gpmc,adv-on-ns = <6>;
+               gpmc,adv-rd-off-ns = <34>;
+               gpmc,adv-wr-off-ns = <44>;
+               gpmc,we-off-ns = <40>;
+               gpmc,oe-off-ns = <54>;
+               gpmc,access-ns = <64>;
+               gpmc,rd-cycle-ns = <82>;
+               gpmc,wr-cycle-ns = <82>;
+               gpmc,wr-access-ns = <40>;
+               gpmc,wr-data-mux-bus-ns = <0>;
+               gpmc,device-width = <2>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               /* u-boot uses mtdparts=omap2-nand.0:512k(x-loader),1920k(u-boot),128k(u-boot-env),4m(kernel),-(fs) */
+
+               x-loader@0 {
+                       label = "x-loader";
+                       reg = <0 0x80000>;
+               };
+
+               bootloaders@80000 {
+                       label = "u-boot";
+                       reg = <0x80000 0x1e0000>;
+               };
+
+               bootloaders_env@260000 {
+                       label = "u-boot-env";
+                       reg = <0x260000 0x20000>;
+               };
+
+               kernel@280000 {
+                       label = "kernel";
+                       reg = <0x280000 0x400000>;
+               };
+
+               filesystem@680000 {
+                       label = "fs";
+                       reg = <0x680000 0>;     /* 0 = MTDPART_SIZ_FULL */
+               };
+       };
+};
+
+&i2c1 {
+       clock-frequency = <400000>;
+
+       twl: twl@48 {
+               reg = <0x48>;
+               interrupts = <7>; /* SYS_NIRQ cascaded to intc */
+               interrupt-parent = <&intc>;
+               twl_audio: audio {
+                       compatible = "ti,twl4030-audio";
+                       codec {
+                       };
+               };
+       };
+};
+
+&i2c2 {
+       clock-frequency = <400000>;
+};
+
+&i2c3 {
+       clock-frequency = <400000>;
+};
+
+&mmc3 {
+       interrupts-extended = <&intc 94 &omap3_pmx_core2 0x46>;
+       pinctrl-0 = <&mmc3_pins>;
+       pinctrl-names = "default";
+       vmmc-supply = <&wl12xx_vmmc>;
+       non-removable;
+       bus-width = <4>;
+       cap-power-off-card;
+       #address-cells = <1>;
+       #size-cells = <0>;
+       wlcore: wlcore@2 {
+               compatible = "ti,wl1273";
+               reg = <2>;
+               interrupt-parent = <&gpio5>;
+               interrupts = <24 IRQ_TYPE_LEVEL_HIGH>; /* gpio 152 */
+               ref-clock-frequency = <26000000>;
+       };
+};
+
+&usbhshost {
+       port2-mode = "ehci-phy";
+};
+
+&usbhsehci {
+       phys = <0 &hsusb2_phy>;
+};
+
+
+&omap3_pmx_core {
+       pinctrl-names = "default";
+       pinctrl-0 = <&hsusb2_pins>;
+
+       mmc3_pins: pinmux_mm3_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x2164, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat4.sdmmc3_dat0 */
+                       OMAP3_CORE1_IOPAD(0x2166, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat5.sdmmc3_dat1 */
+                       OMAP3_CORE1_IOPAD(0x2168, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat6.sdmmc3_dat2 */
+                       OMAP3_CORE1_IOPAD(0x216a, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat6.sdmmc3_dat3 */
+                       OMAP3_CORE1_IOPAD(0x2184, PIN_INPUT_PULLUP | MUX_MODE4) /* mcbsp4_clkx.gpio_152 */
+                       OMAP3_CORE1_IOPAD(0x2a0c, PIN_OUTPUT | MUX_MODE4)       /* sys_boot1.gpio_3 */
+                       OMAP3_CORE1_IOPAD(0x21d0, PIN_INPUT_PULLUP | MUX_MODE3) /* mcspi1_cs1.sdmmc3_cmd */
+                       OMAP3_CORE1_IOPAD(0x21d2, PIN_INPUT_PULLUP | MUX_MODE3) /* mcspi1_cs2.sdmmc_clk */
+               >;
+       };
+       mcbsp2_pins: pinmux_mcbsp2_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x213c, PIN_INPUT | MUX_MODE0)        /* mcbsp2_fsx */
+                       OMAP3_CORE1_IOPAD(0x213e, PIN_INPUT | MUX_MODE0)        /* mcbsp2_clkx */
+                       OMAP3_CORE1_IOPAD(0x2140, PIN_INPUT | MUX_MODE0)        /* mcbsp2_dr */
+                       OMAP3_CORE1_IOPAD(0x2142, PIN_OUTPUT | MUX_MODE0)       /* mcbsp2_dx */
+               >;
+       };
+       uart2_pins: pinmux_uart2_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x2174, PIN_INPUT | MUX_MODE0)        /* uart2_cts.uart2_cts */
+                       OMAP3_CORE1_IOPAD(0x2176, PIN_OUTPUT | MUX_MODE0)       /* uart2_rts .uart2_rts*/
+                       OMAP3_CORE1_IOPAD(0x2178, PIN_OUTPUT | MUX_MODE0)       /* uart2_tx.uart2_tx */
+                       OMAP3_CORE1_IOPAD(0x217a, PIN_INPUT | MUX_MODE0)        /* uart2_rx.uart2_rx */
+                       OMAP3_CORE1_IOPAD(0x2198, PIN_OUTPUT | MUX_MODE4)       /* GPIO_162,BT_EN */
+               >;
+       };
+       mcspi1_pins: pinmux_mcspi1_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x21c8, PIN_INPUT | MUX_MODE0)        /* mcspi1_clk.mcspi1_clk */
+                       OMAP3_CORE1_IOPAD(0x21ca, PIN_OUTPUT | MUX_MODE0)       /* mcspi1_simo.mcspi1_simo */
+                       OMAP3_CORE1_IOPAD(0x21cc, PIN_INPUT_PULLUP | MUX_MODE0) /* mcspi1_somi.mcspi1_somi */
+                       OMAP3_CORE1_IOPAD(0x21ce, PIN_OUTPUT | MUX_MODE0)       /* mcspi1_cs0.mcspi1_cs0 */
+               >;
+       };
+
+       hsusb2_pins: pinmux_hsusb2_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x21d4, PIN_INPUT_PULLDOWN | MUX_MODE3)       /* mcspi1_cs3.hsusb2_data2 */
+                       OMAP3_CORE1_IOPAD(0x21d6, PIN_INPUT_PULLDOWN | MUX_MODE3)       /* mcspi2_clk.hsusb2_data7 */
+                       OMAP3_CORE1_IOPAD(0x21d8, PIN_INPUT_PULLDOWN | MUX_MODE3)       /* mcspi2_simo.hsusb2_data4 */
+                       OMAP3_CORE1_IOPAD(0x21da, PIN_INPUT_PULLDOWN | MUX_MODE3)       /* mcspi2_somi.hsusb2_data5 */
+                       OMAP3_CORE1_IOPAD(0x21dc, PIN_INPUT_PULLDOWN | MUX_MODE3)       /* mcspi2_cs0.hsusb2_data6 */
+                       OMAP3_CORE1_IOPAD(0x21de, PIN_INPUT_PULLDOWN | MUX_MODE3)       /* mcspi2_cs1.hsusb2_data3 */
+               >;
+       };
+
+       hsusb_otg_pins: pinmux_hsusb_otg_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x21a2, PIN_INPUT | MUX_MODE0)        /* hsusb0_clk.hsusb0_clk */
+                       OMAP3_CORE1_IOPAD(0x21a4, PIN_OUTPUT | MUX_MODE0)       /* hsusb0_stp.hsusb0_stp */
+                       OMAP3_CORE1_IOPAD(0x21a6, PIN_INPUT | MUX_MODE0)        /* hsusb0_dir.hsusb0_dir */
+                       OMAP3_CORE1_IOPAD(0x21a8, PIN_INPUT | MUX_MODE0)        /* hsusb0_nxt.hsusb0_nxt */
+                       OMAP3_CORE1_IOPAD(0x21aa, PIN_INPUT | MUX_MODE0)        /* hsusb0_data0.hsusb0_data0 */
+                       OMAP3_CORE1_IOPAD(0x21ac, PIN_INPUT | MUX_MODE0)        /* hsusb0_data1.hsusb0_data1 */
+                       OMAP3_CORE1_IOPAD(0x21ae, PIN_INPUT | MUX_MODE0)        /* hsusb0_data2.hsusb0_data2 */
+                       OMAP3_CORE1_IOPAD(0x21b0, PIN_INPUT | MUX_MODE0)        /* hsusb0_data3.hsusb0_data3 */
+                       OMAP3_CORE1_IOPAD(0x21b2, PIN_INPUT | MUX_MODE0)        /* hsusb0_data4.hsusb0_data4 */
+                       OMAP3_CORE1_IOPAD(0x21b4, PIN_INPUT | MUX_MODE0)        /* hsusb0_data5.hsusb0_data5 */
+                       OMAP3_CORE1_IOPAD(0x21b6, PIN_INPUT | MUX_MODE0)        /* hsusb0_data6.hsusb0_data6 */
+                       OMAP3_CORE1_IOPAD(0x21b8, PIN_INPUT | MUX_MODE0)        /* hsusb0_data7.hsusb0_data7 */
+               >;
+       };
+
+
+};
+
+&omap3_pmx_wkup {
+       pinctrl-names = "default";
+       pinctrl-0 = <&hsusb2_reset_pin>;
+       hsusb2_reset_pin: pinmux_hsusb1_reset_pin {
+               pinctrl-single,pins = <
+                       OMAP3_WKUP_IOPAD(0x2a0e, PIN_OUTPUT | MUX_MODE4)        /* sys_boot2.gpio_4 */
+               >;
+       };
+};
+
+&omap3_pmx_core2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&hsusb2_2_pins>;
+       hsusb2_2_pins: pinmux_hsusb2_2_pins {
+               pinctrl-single,pins = <
+                       OMAP3630_CORE2_IOPAD(0x25f0, PIN_OUTPUT | MUX_MODE3)            /* etk_d10.hsusb2_clk */
+                       OMAP3630_CORE2_IOPAD(0x25f2, PIN_OUTPUT | MUX_MODE3)            /* etk_d11.hsusb2_stp */
+                       OMAP3630_CORE2_IOPAD(0x25f4, PIN_INPUT_PULLDOWN | MUX_MODE3)    /* etk_d12.hsusb2_dir */
+                       OMAP3630_CORE2_IOPAD(0x25f6, PIN_INPUT_PULLDOWN | MUX_MODE3)    /* etk_d13.hsusb2_nxt */
+                       OMAP3630_CORE2_IOPAD(0x25f8, PIN_INPUT_PULLDOWN | MUX_MODE3)    /* etk_d14.hsusb2_data0 */
+                       OMAP3630_CORE2_IOPAD(0x25fa, PIN_INPUT_PULLDOWN | MUX_MODE3)    /* etk_d15.hsusb2_data1 */
+               >;
+       };
+};
+
+&uart2 {
+       interrupts-extended = <&intc 73 &omap3_pmx_core OMAP3_UART2_RX>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart2_pins>;
+};
+
+&mcspi1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mcspi1_pins>;
+};
+
+#include "twl4030.dtsi"
+#include "twl4030_omap3.dtsi"
+
+&twl {
+       twl_power: power {
+               compatible = "ti,twl4030-power-idle-osc-off", "ti,twl4030-power-idle";
+               ti,use_poweroff;
+       };
+};
+
+&twl_gpio {
+       ti,use-leds;
+};
diff --git a/arch/arm/dts/logicpd-torpedo-37xx-devkit.dts b/arch/arm/dts/logicpd-torpedo-37xx-devkit.dts
new file mode 100644 (file)
index 0000000..de603a4
--- /dev/null
@@ -0,0 +1,411 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/dts-v1/;
+
+#include "omap36xx.dtsi"
+#include "logicpd-torpedo-som.dtsi"
+#include "omap-gpmc-smsc9221.dtsi"
+
+/ {
+       model = "LogicPD Zoom DM3730 Torpedo + Wireless Development Kit";
+       compatible = "logicpd,dm3730-torpedo-devkit", "ti,omap3630", "ti,omap3";
+
+       chosen {
+               stdout-path = &uart1;
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+               pinctrl-0 = <&gpio_key_pins &gpio_key_pins_wkup>;
+
+               sysboot2 {
+                       label = "sysboot2";
+                       gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;     /* gpio2 */
+                       linux,code = <BTN_0>;
+                       wakeup-source;
+               };
+
+               sysboot5 {
+                       label = "sysboot5";
+                       gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;     /* gpio7 */
+                       linux,code = <BTN_1>;
+                       wakeup-source;
+               };
+
+               gpio1 {
+                       label = "gpio1";
+                       gpios = <&gpio6 21 GPIO_ACTIVE_LOW>;    /* gpio181 */
+                       linux,code = <BTN_2>;
+                       wakeup-source;
+               };
+
+               gpio2 {
+                       label = "gpio2";
+                       gpios = <&gpio6 18 GPIO_ACTIVE_LOW>;    /* gpio178 */
+                       linux,code = <BTN_3>;
+                       wakeup-source;
+               };
+       };
+
+       sound {
+               compatible = "ti,omap-twl4030";
+               ti,model = "omap3logic";
+               ti,mcbsp = <&mcbsp2>;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&led_pins>;
+
+               led1 {
+                       label = "led1";
+                       gpios = <&gpio6 20 GPIO_ACTIVE_HIGH>;   /* gpio180 */
+                       linux,default-trigger = "cpu0";
+               };
+
+               led2 {
+                       label = "led2";
+                       gpios = <&gpio6 19 GPIO_ACTIVE_HIGH>;   /* gpio179 */
+                       linux,default-trigger = "none";
+               };
+       };
+
+       pwm10: dmtimer-pwm {
+               compatible = "ti,omap-dmtimer-pwm";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_pins>;
+               ti,timers = <&timer10>;
+               #pwm-cells = <3>;
+       };
+
+};
+
+&vaux1 {
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+};
+
+&vaux4 {
+       regulator-min-microvolt = <1800000>;
+       regulator-max-microvolt = <1800000>;
+};
+
+&mcbsp2 {
+       status = "okay";
+};
+
+&charger {
+       ti,bb-uvolt = <3200000>;
+       ti,bb-uamp = <150>;
+};
+
+&gpmc {
+       ranges = <0 0 0x30000000 0x1000000      /* CS0: 16MB for NAND */
+                 1 0 0x2c000000 0x1000000>;    /* CS1: 16MB for LAN9221 */
+
+       ethernet@gpmc {
+               pinctrl-names = "default";
+               pinctrl-0 = <&lan9221_pins>;
+               interrupt-parent = <&gpio5>;
+               interrupts = <1 IRQ_TYPE_LEVEL_LOW>;            /* gpio129 */
+               reg = <1 0 0xff>;
+       };
+};
+
+&vpll2 {
+       regulator-always-on;
+};
+
+&dss {
+       status = "ok";
+       vdds_dsi-supply = <&vpll2>;
+       vdda_video-supply = <&video_reg>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&dss_dpi_pins1>;
+       port {
+               dpi_out: endpoint {
+                       remote-endpoint = <&lcd_in>;
+                       data-lines = <16>;
+               };
+       };
+};
+
+/ {
+       aliases {
+               display0 = &lcd0;
+       };
+
+       video_reg: video_reg {
+               pinctrl-names = "default";
+               pinctrl-0 = <&panel_pwr_pins>;
+               compatible = "regulator-fixed";
+               regulator-name = "fixed-supply";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&gpio5 27 GPIO_ACTIVE_HIGH>;    /* gpio155, lcd INI */
+       };
+
+       lcd0: display {
+               compatible = "panel-dpi";
+               label = "15";
+               status = "okay";
+               /* default-on; */
+               pinctrl-names = "default";
+
+               port {
+                       lcd_in: endpoint {
+                               remote-endpoint = <&dpi_out>;
+                       };
+               };
+
+               panel-timing {
+                       clock-frequency = <9000000>;
+                       hactive = <480>;
+                       vactive = <272>;
+                       hfront-porch = <3>;
+                       hback-porch = <2>;
+                       hsync-len = <42>;
+                       vback-porch = <3>;
+                       vfront-porch = <4>;
+                       vsync-len = <11>;
+                       hsync-active = <0>;
+                       vsync-active = <0>;
+                       de-active = <1>;
+                       pixelclk-active = <1>;
+               };
+       };
+
+       bl: backlight {
+               compatible = "pwm-backlight";
+               pinctrl-names = "default";
+               pinctrl-0 = <&backlight_pins>;
+               pwms = <&pwm10 0 5000000 0>;
+               brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+               default-brightness-level = <7>;
+               enable-gpios = <&gpio5 26 GPIO_ACTIVE_HIGH>; /* gpio_154 */
+       };
+};
+
+&mmc1 {
+       interrupts-extended = <&intc 83 &omap3_pmx_core 0x11a>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins &mmc1_cd>;
+       vmmc-supply = <&vmmc1>;
+       bus-width = <4>;
+       cap-power-off-card;
+};
+
+&mmc2 {
+       status = "disabled";
+};
+
+&omap3_pmx_core {
+       gpio_key_pins: pinmux_gpio_key_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x21d6, PIN_INPUT_PULLUP | MUX_MODE4) /* mcspi2_clk.gpio_178 */
+                       OMAP3_CORE1_IOPAD(0x21dc, PIN_INPUT_PULLUP | MUX_MODE4) /* mcspi2_cs0.gpio_181 */
+               >;
+       };
+
+       pwm_pins: pinmux_pwm_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x20B8, PIN_OUTPUT | PIN_OFF_OUTPUT_LOW | MUX_MODE3)       /* gpmc_ncs5.gpt_10_pwm_evt */
+               >;
+       };
+
+       led_pins: pinmux_led_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x21d8, PIN_OUTPUT | MUX_MODE4)       /* gpio_179 */
+                       OMAP3_CORE1_IOPAD(0x21da, PIN_OUTPUT | MUX_MODE4)       /* gpio_180 */
+               >;
+       };
+
+       mmc1_pins: pinmux_mmc1_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x2144, PIN_OUTPUT | MUX_MODE0)       /* sdmmc1_clk.sdmmc1_clk */
+                       OMAP3_CORE1_IOPAD(0x2146, PIN_INPUT | MUX_MODE0)        /* sdmmc1_cmd.sdmmc1_cmd */
+                       OMAP3_CORE1_IOPAD(0x2148, PIN_INPUT | MUX_MODE0)        /* sdmmc1_dat0.sdmmc1_dat0 */
+                       OMAP3_CORE1_IOPAD(0x214a, PIN_INPUT | MUX_MODE0)        /* sdmmc1_dat1.sdmmc1_dat1 */
+                       OMAP3_CORE1_IOPAD(0x214c, PIN_INPUT | MUX_MODE0)        /* sdmmc1_dat2.sdmmc1_dat2 */
+                       OMAP3_CORE1_IOPAD(0x214e, PIN_INPUT | MUX_MODE0)        /* sdmmc1_dat3.sdmmc1_dat3 */
+               >;
+       };
+
+       tsc2004_pins: pinmux_tsc2004_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x2186, PIN_INPUT | MUX_MODE4)        /* mcbsp4_dr.gpio_153 */
+               >;
+       };
+
+       backlight_pins: pinmux_backlight_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x2188, PIN_OUTPUT | PIN_OFF_OUTPUT_LOW | MUX_MODE4)       /* mcbsp4_dx.gpio_154 */
+               >;
+       };
+
+       isp_pins: pinmux_isp_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x210c, PIN_INPUT | MUX_MODE0)   /* cam_hs.cam_hs */
+                       OMAP3_CORE1_IOPAD(0x210e, PIN_INPUT | MUX_MODE0)   /* cam_vs.cam_vs */
+                       OMAP3_CORE1_IOPAD(0x2110, PIN_INPUT | MUX_MODE0)   /* cam_xclka.cam_xclka */
+                       OMAP3_CORE1_IOPAD(0x2112, PIN_INPUT | MUX_MODE0)   /* cam_pclk.cam_pclk */
+
+                       OMAP3_CORE1_IOPAD(0x2114, PIN_INPUT | MUX_MODE0)   /* cam_d0.cam_d0 */
+                       OMAP3_CORE1_IOPAD(0x2116, PIN_INPUT | MUX_MODE0)   /* cam_d1.cam_d1 */
+                       OMAP3_CORE1_IOPAD(0x2118, PIN_INPUT | MUX_MODE0)   /* cam_d2.cam_d2 */
+                       OMAP3_CORE1_IOPAD(0x211c, PIN_INPUT | MUX_MODE0)   /* cam_d3.cam_d3 */
+                       OMAP3_CORE1_IOPAD(0x211e, PIN_INPUT | MUX_MODE0)   /* cam_d4.cam_d4 */
+                       OMAP3_CORE1_IOPAD(0x2120, PIN_INPUT | MUX_MODE0)   /* cam_d5.cam_d5 */
+                       OMAP3_CORE1_IOPAD(0x2122, PIN_INPUT | MUX_MODE0)   /* cam_d6.cam_d6 */
+                       OMAP3_CORE1_IOPAD(0x2124, PIN_INPUT | MUX_MODE0)   /* cam_d7.cam_d7 */
+               >;
+       };
+
+       panel_pwr_pins: pinmux_panel_pwr_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x218a, PIN_OUTPUT | PIN_OFF_OUTPUT_LOW | MUX_MODE4)       /* mcbsp4_fs.gpio_155 */
+               >;
+       };
+
+       dss_dpi_pins1: pinmux_dss_dpi_pins1 {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_pclk.dss_pclk */
+                       OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_hsync.dss_hsync */
+                       OMAP3_CORE1_IOPAD(0x20d8, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_vsync.dss_vsync */
+                       OMAP3_CORE1_IOPAD(0x20da, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_acbias.dss_acbias */
+
+                       OMAP3_CORE1_IOPAD(0x20e8, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data6.dss_data6 */
+                       OMAP3_CORE1_IOPAD(0x20ea, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data7.dss_data7 */
+                       OMAP3_CORE1_IOPAD(0x20ec, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data8.dss_data8 */
+                       OMAP3_CORE1_IOPAD(0x20ee, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data9.dss_data9 */
+                       OMAP3_CORE1_IOPAD(0x20f0, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data10.dss_data10 */
+                       OMAP3_CORE1_IOPAD(0x20f2, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data11.dss_data11 */
+                       OMAP3_CORE1_IOPAD(0x20f4, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data12.dss_data12 */
+                       OMAP3_CORE1_IOPAD(0x20f6, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data13.dss_data13 */
+                       OMAP3_CORE1_IOPAD(0x20f8, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data14.dss_data14 */
+                       OMAP3_CORE1_IOPAD(0x20fa, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data15.dss_data15 */
+                       OMAP3_CORE1_IOPAD(0x20fc, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data16.dss_data16 */
+                       OMAP3_CORE1_IOPAD(0x20fe, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data17.dss_data17 */
+
+                       OMAP3_CORE1_IOPAD(0x2100, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE3)   /* dss_data18.dss_data0 */
+                       OMAP3_CORE1_IOPAD(0x2102, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE3)   /* dss_data19.dss_data1 */
+                       OMAP3_CORE1_IOPAD(0x2104, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE3)   /* dss_data20.dss_data2 */
+                       OMAP3_CORE1_IOPAD(0x2106, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE3)   /* dss_data21.dss_data3 */
+                       OMAP3_CORE1_IOPAD(0x2108, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE3)   /* dss_data22.dss_data4 */
+                       OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE3)   /* dss_data23.dss_data5 */
+               >;
+       };
+};
+
+&omap3_pmx_wkup {
+       gpio_key_pins_wkup: pinmux_gpio_key_pins_wkup {
+               pinctrl-single,pins = <
+                       OMAP3_WKUP_IOPAD(0x2a0a, PIN_INPUT_PULLUP | MUX_MODE4)  /* sys_boot0.gpio_2 */
+                       OMAP3_WKUP_IOPAD(0x2a14, PIN_INPUT_PULLUP | MUX_MODE4)  /* sys_boot5.gpio_7 */
+               >;
+       };
+
+       lan9221_pins: pinmux_lan9221_pins {
+               pinctrl-single,pins = <
+                       OMAP3_WKUP_IOPAD(0x2a5a, PIN_INPUT | MUX_MODE4)         /* reserved.gpio_129 */
+               >;
+       };
+
+       mmc1_cd: pinmux_mmc1_cd {
+               pinctrl-single,pins = <
+                       OMAP3_WKUP_IOPAD(0x2a54, PIN_INPUT_PULLUP | MUX_MODE4)  /* reserved.gpio_127 */
+               >;
+       };
+};
+
+&i2c2 {
+       mt9p031@48 {
+               compatible = "aptina,mt9p031";
+               reg = <0x48>;
+               clocks = <&isp 0>;
+               vaa-supply = <&vaux4>;
+               vdd-supply = <&vaux4>;
+               vdd_io-supply = <&vaux4>;
+               port {
+                       mt9p031_out: endpoint {
+                               input-clock-frequency = <24000000>;
+                               pixel-clock-frequency = <72000000>;
+                               remote-endpoint = <&ccdc_ep>;
+                       };
+               };
+       };
+};
+
+&i2c3 {
+       touchscreen: tsc2004@48 {
+               compatible = "ti,tsc2004";
+               reg = <0x48>;
+               vio-supply = <&vaux1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&tsc2004_pins>;
+               interrupts-extended = <&gpio5 25 IRQ_TYPE_EDGE_RISING>; /* gpio 153 */
+
+               touchscreen-fuzz-x = <4>;
+               touchscreen-fuzz-y = <7>;
+               touchscreen-fuzz-pressure = <2>;
+               touchscreen-size-x = <4096>;
+               touchscreen-size-y = <4096>;
+               touchscreen-max-pressure = <2048>;
+
+               ti,x-plate-ohms = <280>;
+               ti,esd-recovery-timeout-ms = <8000>;
+       };
+};
+
+&mcspi1 {
+       at25@0 {
+               compatible = "atmel,at25";
+               reg = <0>;
+               spi-max-frequency = <5000000>;
+               spi-cpha;
+               spi-cpol;
+
+               pagesize = <64>;
+               size = <32768>;
+               address-width = <16>;
+       };
+};
+
+&isp {
+       pinctrl-names = "default";
+       pinctrl-0 = <&isp_pins>;
+       ports {
+               port@0 {
+                       reg = <0>;
+                       ccdc_ep: endpoint {
+                               remote-endpoint = <&mt9p031_out>;
+                               bus-width = <8>;
+                               hsync-active = <1>;
+                               vsync-active = <1>;
+                               pclk-sample = <0>;
+                       };
+               };
+       };
+};
+
+&uart1 {
+       interrupts-extended = <&intc 72 &omap3_pmx_core OMAP3_UART1_RX>;
+};
+
+/* Wired to the tps65950 on the SOM, only the USB connector is on the devkit */
+&usb_otg_hs {
+       pinctrl-names = "default";
+       pinctrl-0 = <&hsusb_otg_pins>;
+       interface-type = <0>;
+       usb-phy = <&usb2_phy>;
+       phys = <&usb2_phy>;
+       phy-names = "usb2-phy";
+       mode = <3>;
+       power = <50>;
+};
diff --git a/arch/arm/dts/logicpd-torpedo-som.dtsi b/arch/arm/dts/logicpd-torpedo-som.dtsi
new file mode 100644 (file)
index 0000000..23c9228
--- /dev/null
@@ -0,0 +1,217 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <dt-bindings/input/input.h>
+
+/ {
+       cpus {
+               cpu@0 {
+                       cpu0-supply = <&vcc>;
+               };
+       };
+
+       memory@80000000 {
+               device_type = "memory";
+               reg = <0x80000000 0>;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               user0 {
+                       label = "user0";
+                       gpios = <&twl_gpio 18 GPIO_ACTIVE_LOW>; /* LEDA */
+                       linux,default-trigger = "none";
+               };
+       };
+
+       wl12xx_vmmc: wl12xx_vmmc {
+               compatible = "regulator-fixed";
+               regulator-name = "vwl1271";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               gpio = <&gpio5 29 0>;   /* gpio157 */
+               startup-delay-us = <70000>;
+               enable-active-high;
+               vin-supply = <&vmmc2>;
+       };
+};
+
+&gpmc {
+       ranges = <0 0 0x30000000 0x1000000>;    /* CS0: 16MB for NAND */
+
+       nand@0,0 {
+               compatible = "ti,omap2-nand";
+               reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
+               interrupt-parent = <&gpmc>;
+               interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
+                            <1 IRQ_TYPE_NONE>; /* termcount */
+               linux,mtd-name = "micron,mt29f4g16abbda3w";
+               nand-bus-width = <16>;
+               ti,nand-ecc-opt = "bch8";
+               rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
+               gpmc,sync-clk-ps = <0>;
+               gpmc,cs-on-ns = <0>;
+               gpmc,cs-rd-off-ns = <44>;
+               gpmc,cs-wr-off-ns = <44>;
+               gpmc,adv-on-ns = <6>;
+               gpmc,adv-rd-off-ns = <34>;
+               gpmc,adv-wr-off-ns = <44>;
+               gpmc,we-off-ns = <40>;
+               gpmc,oe-off-ns = <54>;
+               gpmc,access-ns = <64>;
+               gpmc,rd-cycle-ns = <82>;
+               gpmc,wr-cycle-ns = <82>;
+               gpmc,wr-access-ns = <40>;
+               gpmc,wr-data-mux-bus-ns = <0>;
+               gpmc,device-width = <2>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+       };
+};
+
+&i2c1 {
+       clock-frequency = <400000>;
+
+       twl: twl@48 {
+               reg = <0x48>;
+               interrupts = <7>; /* SYS_NIRQ cascaded to intc */
+               interrupt-parent = <&intc>;
+               twl_audio: audio {
+                       compatible = "ti,twl4030-audio";
+                       codec {
+                       };
+               };
+       };
+};
+
+&i2c2 {
+       clock-frequency = <400000>;
+};
+
+&i2c3 {
+       clock-frequency = <400000>;
+       at24@50 {
+               compatible = "at24,24c02";
+               readonly;
+               reg = <0x50>;
+       };
+};
+
+/*
+ * Only found on the wireless SOM. For the SOM without wireless, the pins for
+ * MMC3 can be routed with jumpers to the second MMC slot on the devkit and
+ * gpio157 is not connected. So this should be OK to keep common for now,
+ * probably device tree overlays is the way to go with the various SOM and
+ * jumpering combinations for the long run.
+ */
+&mmc3 {
+       interrupts-extended = <&intc 94 &omap3_pmx_core2 0x46>;
+       pinctrl-0 = <&mmc3_pins &mmc3_core2_pins>;
+       pinctrl-names = "default";
+       vmmc-supply = <&wl12xx_vmmc>;
+       non-removable;
+       bus-width = <4>;
+       cap-power-off-card;
+       #address-cells = <1>;
+       #size-cells = <0>;
+       wlcore: wlcore@2 {
+               compatible = "ti,wl1283";
+               reg = <2>;
+               interrupt-parent = <&gpio5>;
+               interrupts = <24 IRQ_TYPE_LEVEL_HIGH>; /* gpio 152 */
+               ref-clock-frequency = <26000000>;
+               tcxo-clock-frequency = <26000000>;
+       };
+};
+
+&omap3_pmx_core {
+       mmc3_pins: pinmux_mm3_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x2164, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat4.sdmmc3_dat0 */
+                       OMAP3_CORE1_IOPAD(0x2166, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat5.sdmmc3_dat1 */
+                       OMAP3_CORE1_IOPAD(0x2168, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat6.sdmmc3_dat2 */
+                       OMAP3_CORE1_IOPAD(0x216a, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat6.sdmmc3_dat3 */
+                       OMAP3_CORE1_IOPAD(0x2184, PIN_INPUT_PULLUP | MUX_MODE4) /* mcbsp4_clkx.gpio_152 */
+                       OMAP3_CORE1_IOPAD(0x218e, PIN_OUTPUT | MUX_MODE4)       /* mcbsp1_fsr.gpio_157 */
+               >;
+       };
+       mcbsp2_pins: pinmux_mcbsp2_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x213c, PIN_INPUT | MUX_MODE0)        /* mcbsp2_fsx */
+                       OMAP3_CORE1_IOPAD(0x213e, PIN_INPUT | MUX_MODE0)        /* mcbsp2_clkx */
+                       OMAP3_CORE1_IOPAD(0x2140, PIN_INPUT | MUX_MODE0)        /* mcbsp2_dr */
+                       OMAP3_CORE1_IOPAD(0x2142, PIN_OUTPUT | MUX_MODE0)       /* mcbsp2_dx */
+               >;
+       };
+       uart2_pins: pinmux_uart2_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x2174, PIN_INPUT | MUX_MODE0)        /* uart2_cts.uart2_cts */
+                       OMAP3_CORE1_IOPAD(0x2176, PIN_OUTPUT | MUX_MODE0)       /* uart2_rts .uart2_rts*/
+                       OMAP3_CORE1_IOPAD(0x2178, PIN_OUTPUT | MUX_MODE0)       /* uart2_tx.uart2_tx */
+                       OMAP3_CORE1_IOPAD(0x217a, PIN_INPUT | MUX_MODE0)        /* uart2_rx.uart2_rx */
+                       OMAP3_CORE1_IOPAD(0x2198, PIN_OUTPUT | MUX_MODE4)       /* GPIO_162,BT_EN */
+               >;
+       };
+       mcspi1_pins: pinmux_mcspi1_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x21c8, PIN_INPUT | MUX_MODE0)        /* mcspi1_clk.mcspi1_clk */
+                       OMAP3_CORE1_IOPAD(0x21ca, PIN_OUTPUT | MUX_MODE0)       /* mcspi1_simo.mcspi1_simo */
+                       OMAP3_CORE1_IOPAD(0x21cc, PIN_INPUT_PULLUP | MUX_MODE0) /* mcspi1_somi.mcspi1_somi */
+                       OMAP3_CORE1_IOPAD(0x21ce, PIN_OUTPUT | MUX_MODE0)       /* mcspi1_cs0.mcspi1_cs0 */
+               >;
+       };
+       hsusb_otg_pins: pinmux_hsusb_otg_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x21a2, PIN_INPUT | MUX_MODE0)        /* hsusb0_clk.hsusb0_clk */
+                       OMAP3_CORE1_IOPAD(0x21a4, PIN_OUTPUT | MUX_MODE0)       /* hsusb0_stp.hsusb0_stp */
+                       OMAP3_CORE1_IOPAD(0x21a6, PIN_INPUT | MUX_MODE0)        /* hsusb0_dir.hsusb0_dir */
+                       OMAP3_CORE1_IOPAD(0x21a8, PIN_INPUT | MUX_MODE0)        /* hsusb0_nxt.hsusb0_nxt */
+
+                       OMAP3_CORE1_IOPAD(0x21aa, PIN_INPUT | MUX_MODE0)        /* hsusb0_data0.hsusb0_data0 */
+                       OMAP3_CORE1_IOPAD(0x21ac, PIN_INPUT | MUX_MODE0)        /* hsusb0_data1.hsusb0_data1 */
+                       OMAP3_CORE1_IOPAD(0x21ae, PIN_INPUT | MUX_MODE0)        /* hsusb0_data2.hsusb0_data2 */
+                       OMAP3_CORE1_IOPAD(0x21b0, PIN_INPUT | MUX_MODE0)        /* hsusb0_data3.hsusb0_data3 */
+                       OMAP3_CORE1_IOPAD(0x21b2, PIN_INPUT | MUX_MODE0)        /* hsusb0_data4.hsusb0_data4 */
+                       OMAP3_CORE1_IOPAD(0x21b4, PIN_INPUT | MUX_MODE0)        /* hsusb0_data5.hsusb0_data5 */
+                       OMAP3_CORE1_IOPAD(0x21b6, PIN_INPUT | MUX_MODE0)        /* hsusb0_data6.hsusb0_data6 */
+                       OMAP3_CORE1_IOPAD(0x21b8, PIN_INPUT | MUX_MODE0)        /* hsusb0_data7.hsusb0_data7 */
+               >;
+       };
+};
+
+&uart2 {
+       interrupts-extended = <&intc 73 &omap3_pmx_core OMAP3_UART2_RX>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart2_pins>;
+};
+
+&mcspi1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mcspi1_pins>;
+};
+
+&omap3_pmx_core2 {
+       mmc3_core2_pins: pinmux_mmc3_core2_pins {
+               pinctrl-single,pins = <
+                       OMAP3630_CORE2_IOPAD(0x25d8, PIN_INPUT_PULLUP | MUX_MODE2)   /* etk_clk.sdmmc3_clk */
+                       OMAP3630_CORE2_IOPAD(0x25da, PIN_INPUT_PULLUP | MUX_MODE2)   /* etk_ctl.sdmmc3_cmd */
+               >;
+       };
+};
+
+#include "twl4030.dtsi"
+#include "twl4030_omap3.dtsi"
+
+&twl {
+       twl_power: power {
+               compatible = "ti,twl4030-power-idle-osc-off", "ti,twl4030-power-idle";
+               ti,use_poweroff;
+       };
+};
+
+&twl_gpio {
+       ti,use-leds;
+};
diff --git a/arch/arm/dts/omap-gpmc-smsc9221.dtsi b/arch/arm/dts/omap-gpmc-smsc9221.dtsi
new file mode 100644 (file)
index 0000000..73e272f
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Common file for GPMC connected smsc9221 on omaps
+ *
+ * Compared to smsc911x, smsc9221 (and others like smsc9217
+ * or smsc 9218) has faster timings, leading to higher
+ * bandwidth.
+ *
+ * Note that the board specifc DTS file needs to specify
+ * ranges, pinctrl, reg, interrupt parent and interrupts.
+ */
+
+/ {
+       vddvario: regulator-vddvario {
+                 compatible = "regulator-fixed";
+                 regulator-name = "vddvario";
+                 regulator-always-on;
+       };
+
+       vdd33a: regulator-vdd33a {
+               compatible = "regulator-fixed";
+               regulator-name = "vdd33a";
+               regulator-always-on;
+       };
+};
+
+&gpmc {
+       ethernet@gpmc {
+               compatible = "smsc,lan9221","smsc,lan9115";
+               bank-width = <2>;
+
+               gpmc,mux-add-data;
+               gpmc,cs-on-ns = <0>;
+               gpmc,cs-rd-off-ns = <42>;
+               gpmc,cs-wr-off-ns = <36>;
+               gpmc,adv-on-ns = <6>;
+               gpmc,adv-rd-off-ns = <12>;
+               gpmc,adv-wr-off-ns = <12>;
+               gpmc,oe-on-ns = <0>;
+               gpmc,oe-off-ns = <42>;
+               gpmc,we-on-ns = <0>;
+               gpmc,we-off-ns = <36>;
+               gpmc,rd-cycle-ns = <60>;
+               gpmc,wr-cycle-ns = <54>;
+               gpmc,access-ns = <36>;
+               gpmc,page-burst-access-ns = <0>;
+               gpmc,bus-turnaround-ns = <0>;
+               gpmc,cycle2cycle-delay-ns = <0>;
+               gpmc,wr-data-mux-bus-ns = <18>;
+               gpmc,wr-access-ns = <42>;
+               gpmc,cycle2cycle-samecsen;
+               gpmc,cycle2cycle-diffcsen;
+
+               vddvario-supply = <&vddvario>;
+               vdd33a-supply = <&vdd33a>;
+               reg-io-width = <4>;
+               smsc,save-mac-address;
+       };
+};
diff --git a/arch/arm/dts/omap3.dtsi b/arch/arm/dts/omap3.dtsi
new file mode 100644 (file)
index 0000000..a0f2412
--- /dev/null
@@ -0,0 +1,854 @@
+/*
+ * Device Tree Source for OMAP3 SoC
+ *
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pinctrl/omap.h>
+
+/ {
+       compatible = "ti,omap3430", "ti,omap3";
+       interrupt-parent = <&intc>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+       chosen { };
+
+       aliases {
+               i2c0 = &i2c1;
+               i2c1 = &i2c2;
+               i2c2 = &i2c3;
+               serial0 = &uart1;
+               serial1 = &uart2;
+               serial2 = &uart3;
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu@0 {
+                       compatible = "arm,cortex-a8";
+                       device_type = "cpu";
+                       reg = <0x0>;
+
+                       clocks = <&dpll1_ck>;
+                       clock-names = "cpu";
+
+                       clock-latency = <300000>; /* From omap-cpufreq driver */
+               };
+       };
+
+       pmu@54000000 {
+               compatible = "arm,cortex-a8-pmu";
+               reg = <0x54000000 0x800000>;
+               interrupts = <3>;
+               ti,hwmods = "debugss";
+       };
+
+       /*
+        * The soc node represents the soc top level view. It is used for IPs
+        * that are not memory mapped in the MPU view or for the MPU itself.
+        */
+       soc {
+               compatible = "ti,omap-infra";
+               mpu {
+                       compatible = "ti,omap3-mpu";
+                       ti,hwmods = "mpu";
+               };
+
+               iva: iva {
+                       compatible = "ti,iva2.2";
+                       ti,hwmods = "iva";
+
+                       dsp {
+                               compatible = "ti,omap3-c64";
+                       };
+               };
+       };
+
+       /*
+        * XXX: Use a flat representation of the OMAP3 interconnect.
+        * The real OMAP interconnect network is quite complex.
+        * Since it will not bring real advantage to represent that in DT for
+        * the moment, just use a fake OCP bus entry to represent the whole bus
+        * hierarchy.
+        */
+       ocp@68000000 {
+               compatible = "ti,omap3-l3-smx", "simple-bus";
+               reg = <0x68000000 0x10000>;
+               interrupts = <9 10>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               ti,hwmods = "l3_main";
+
+               l4_core: l4@48000000 {
+                       compatible = "ti,omap3-l4-core", "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0x48000000 0x1000000>;
+
+                       scm: scm@2000 {
+                               compatible = "ti,omap3-scm", "simple-bus";
+                               reg = <0x2000 0x2000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               ranges = <0 0x2000 0x2000>;
+
+                               omap3_pmx_core: pinmux@30 {
+                                       compatible = "ti,omap3-padconf",
+                                                    "pinctrl-single";
+                                       reg = <0x30 0x238>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       #interrupt-cells = <1>;
+                                       interrupt-controller;
+                                       pinctrl-single,register-width = <16>;
+                                       pinctrl-single,function-mask = <0xff1f>;
+                               };
+
+                               scm_conf: scm_conf@270 {
+                                       compatible = "syscon", "simple-bus";
+                                       reg = <0x270 0x330>;
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+                                       ranges = <0 0x270 0x330>;
+
+                                       pbias_regulator: pbias_regulator@2b0 {
+                                               compatible = "ti,pbias-omap3", "ti,pbias-omap";
+                                               reg = <0x2b0 0x4>;
+                                               syscon = <&scm_conf>;
+                                               pbias_mmc_reg: pbias_mmc_omap2430 {
+                                                       regulator-name = "pbias_mmc_omap2430";
+                                                       regulator-min-microvolt = <1800000>;
+                                                       regulator-max-microvolt = <3000000>;
+                                               };
+                                       };
+
+                                       scm_clocks: clocks {
+                                               #address-cells = <1>;
+                                               #size-cells = <0>;
+                                       };
+                               };
+
+                               scm_clockdomains: clockdomains {
+                               };
+
+                               omap3_pmx_wkup: pinmux@a00 {
+                                       compatible = "ti,omap3-padconf",
+                                                    "pinctrl-single";
+                                       reg = <0xa00 0x5c>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       #interrupt-cells = <1>;
+                                       interrupt-controller;
+                                       pinctrl-single,register-width = <16>;
+                                       pinctrl-single,function-mask = <0xff1f>;
+                               };
+                       };
+               };
+
+               aes: aes@480c5000 {
+                       compatible = "ti,omap3-aes";
+                       ti,hwmods = "aes";
+                       reg = <0x480c5000 0x50>;
+                       interrupts = <0>;
+                       dmas = <&sdma 65 &sdma 66>;
+                       dma-names = "tx", "rx";
+               };
+
+               prm: prm@48306000 {
+                       compatible = "ti,omap3-prm";
+                       reg = <0x48306000 0x4000>;
+                       interrupts = <11>;
+
+                       prm_clocks: clocks {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                       };
+
+                       prm_clockdomains: clockdomains {
+                       };
+               };
+
+               cm: cm@48004000 {
+                       compatible = "ti,omap3-cm";
+                       reg = <0x48004000 0x4000>;
+
+                       cm_clocks: clocks {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                       };
+
+                       cm_clockdomains: clockdomains {
+                       };
+               };
+
+               counter32k: counter@48320000 {
+                       compatible = "ti,omap-counter32k";
+                       reg = <0x48320000 0x20>;
+                       ti,hwmods = "counter_32k";
+               };
+
+               intc: interrupt-controller@48200000 {
+                       compatible = "ti,omap3-intc";
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+                       reg = <0x48200000 0x1000>;
+               };
+
+               sdma: dma-controller@48056000 {
+                       compatible = "ti,omap3630-sdma", "ti,omap3430-sdma";
+                       reg = <0x48056000 0x1000>;
+                       interrupts = <12>,
+                                    <13>,
+                                    <14>,
+                                    <15>;
+                       #dma-cells = <1>;
+                       dma-channels = <32>;
+                       dma-requests = <96>;
+               };
+
+               gpio1: gpio@48310000 {
+                       compatible = "ti,omap3-gpio";
+                       reg = <0x48310000 0x200>;
+                       interrupts = <29>;
+                       ti,hwmods = "gpio1";
+                       ti,gpio-always-on;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio2: gpio@49050000 {
+                       compatible = "ti,omap3-gpio";
+                       reg = <0x49050000 0x200>;
+                       interrupts = <30>;
+                       ti,hwmods = "gpio2";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio3: gpio@49052000 {
+                       compatible = "ti,omap3-gpio";
+                       reg = <0x49052000 0x200>;
+                       interrupts = <31>;
+                       ti,hwmods = "gpio3";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio4: gpio@49054000 {
+                       compatible = "ti,omap3-gpio";
+                       reg = <0x49054000 0x200>;
+                       interrupts = <32>;
+                       ti,hwmods = "gpio4";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio5: gpio@49056000 {
+                       compatible = "ti,omap3-gpio";
+                       reg = <0x49056000 0x200>;
+                       interrupts = <33>;
+                       ti,hwmods = "gpio5";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio6: gpio@49058000 {
+                       compatible = "ti,omap3-gpio";
+                       reg = <0x49058000 0x200>;
+                       interrupts = <34>;
+                       ti,hwmods = "gpio6";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               uart1: serial@4806a000 {
+                       compatible = "ti,omap3-uart";
+                       reg = <0x4806a000 0x2000>;
+                       reg-shift = <2>;
+                       interrupts-extended = <&intc 72>;
+                       dmas = <&sdma 49 &sdma 50>;
+                       dma-names = "tx", "rx";
+                       ti,hwmods = "uart1";
+                       clock-frequency = <48000000>;
+               };
+
+               uart2: serial@4806c000 {
+                       compatible = "ti,omap3-uart";
+                       reg = <0x4806c000 0x400>;
+                       interrupts-extended = <&intc 73>;
+                       dmas = <&sdma 51 &sdma 52>;
+                       dma-names = "tx", "rx";
+                       ti,hwmods = "uart2";
+                       clock-frequency = <48000000>;
+               };
+
+               uart3: serial@49020000 {
+                       compatible = "ti,omap3-uart";
+                       reg = <0x49020000 0x400>;
+                       interrupts-extended = <&intc 74>;
+                       dmas = <&sdma 53 &sdma 54>;
+                       dma-names = "tx", "rx";
+                       ti,hwmods = "uart3";
+                       clock-frequency = <48000000>;
+               };
+
+               i2c1: i2c@48070000 {
+                       compatible = "ti,omap3-i2c";
+                       reg = <0x48070000 0x80>;
+                       interrupts = <56>;
+                       dmas = <&sdma 27 &sdma 28>;
+                       dma-names = "tx", "rx";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       ti,hwmods = "i2c1";
+               };
+
+               i2c2: i2c@48072000 {
+                       compatible = "ti,omap3-i2c";
+                       reg = <0x48072000 0x80>;
+                       interrupts = <57>;
+                       dmas = <&sdma 29 &sdma 30>;
+                       dma-names = "tx", "rx";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       ti,hwmods = "i2c2";
+               };
+
+               i2c3: i2c@48060000 {
+                       compatible = "ti,omap3-i2c";
+                       reg = <0x48060000 0x80>;
+                       interrupts = <61>;
+                       dmas = <&sdma 25 &sdma 26>;
+                       dma-names = "tx", "rx";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       ti,hwmods = "i2c3";
+               };
+
+               mailbox: mailbox@48094000 {
+                       compatible = "ti,omap3-mailbox";
+                       ti,hwmods = "mailbox";
+                       reg = <0x48094000 0x200>;
+                       interrupts = <26>;
+                       #mbox-cells = <1>;
+                       ti,mbox-num-users = <2>;
+                       ti,mbox-num-fifos = <2>;
+                       mbox_dsp: dsp {
+                               ti,mbox-tx = <0 0 0>;
+                               ti,mbox-rx = <1 0 0>;
+                       };
+               };
+
+               mcspi1: spi@48098000 {
+                       compatible = "ti,omap2-mcspi";
+                       reg = <0x48098000 0x100>;
+                       interrupts = <65>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       ti,hwmods = "mcspi1";
+                       ti,spi-num-cs = <4>;
+                       dmas = <&sdma 35>,
+                              <&sdma 36>,
+                              <&sdma 37>,
+                              <&sdma 38>,
+                              <&sdma 39>,
+                              <&sdma 40>,
+                              <&sdma 41>,
+                              <&sdma 42>;
+                       dma-names = "tx0", "rx0", "tx1", "rx1",
+                                   "tx2", "rx2", "tx3", "rx3";
+               };
+
+               mcspi2: spi@4809a000 {
+                       compatible = "ti,omap2-mcspi";
+                       reg = <0x4809a000 0x100>;
+                       interrupts = <66>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       ti,hwmods = "mcspi2";
+                       ti,spi-num-cs = <2>;
+                       dmas = <&sdma 43>,
+                              <&sdma 44>,
+                              <&sdma 45>,
+                              <&sdma 46>;
+                       dma-names = "tx0", "rx0", "tx1", "rx1";
+               };
+
+               mcspi3: spi@480b8000 {
+                       compatible = "ti,omap2-mcspi";
+                       reg = <0x480b8000 0x100>;
+                       interrupts = <91>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       ti,hwmods = "mcspi3";
+                       ti,spi-num-cs = <2>;
+                       dmas = <&sdma 15>,
+                              <&sdma 16>,
+                              <&sdma 23>,
+                              <&sdma 24>;
+                       dma-names = "tx0", "rx0", "tx1", "rx1";
+               };
+
+               mcspi4: spi@480ba000 {
+                       compatible = "ti,omap2-mcspi";
+                       reg = <0x480ba000 0x100>;
+                       interrupts = <48>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       ti,hwmods = "mcspi4";
+                       ti,spi-num-cs = <1>;
+                       dmas = <&sdma 70>, <&sdma 71>;
+                       dma-names = "tx0", "rx0";
+               };
+
+               hdqw1w: 1w@480b2000 {
+                       compatible = "ti,omap3-1w";
+                       reg = <0x480b2000 0x1000>;
+                       interrupts = <58>;
+                       ti,hwmods = "hdq1w";
+               };
+
+               mmc1: mmc@4809c000 {
+                       compatible = "ti,omap3-hsmmc";
+                       reg = <0x4809c000 0x200>;
+                       interrupts = <83>;
+                       ti,hwmods = "mmc1";
+                       ti,dual-volt;
+                       dmas = <&sdma 61>, <&sdma 62>;
+                       dma-names = "tx", "rx";
+                       pbias-supply = <&pbias_mmc_reg>;
+               };
+
+               mmc2: mmc@480b4000 {
+                       compatible = "ti,omap3-hsmmc";
+                       reg = <0x480b4000 0x200>;
+                       interrupts = <86>;
+                       ti,hwmods = "mmc2";
+                       dmas = <&sdma 47>, <&sdma 48>;
+                       dma-names = "tx", "rx";
+               };
+
+               mmc3: mmc@480ad000 {
+                       compatible = "ti,omap3-hsmmc";
+                       reg = <0x480ad000 0x200>;
+                       interrupts = <94>;
+                       ti,hwmods = "mmc3";
+                       dmas = <&sdma 77>, <&sdma 78>;
+                       dma-names = "tx", "rx";
+               };
+
+               mmu_isp: mmu@480bd400 {
+                       #iommu-cells = <0>;
+                       compatible = "ti,omap2-iommu";
+                       reg = <0x480bd400 0x80>;
+                       interrupts = <24>;
+                       ti,hwmods = "mmu_isp";
+                       ti,#tlb-entries = <8>;
+               };
+
+               mmu_iva: mmu@5d000000 {
+                       #iommu-cells = <0>;
+                       compatible = "ti,omap2-iommu";
+                       reg = <0x5d000000 0x80>;
+                       interrupts = <28>;
+                       ti,hwmods = "mmu_iva";
+                       status = "disabled";
+               };
+
+               wdt2: wdt@48314000 {
+                       compatible = "ti,omap3-wdt";
+                       reg = <0x48314000 0x80>;
+                       ti,hwmods = "wd_timer2";
+               };
+
+               mcbsp1: mcbsp@48074000 {
+                       compatible = "ti,omap3-mcbsp";
+                       reg = <0x48074000 0xff>;
+                       reg-names = "mpu";
+                       interrupts = <16>, /* OCP compliant interrupt */
+                                    <59>, /* TX interrupt */
+                                    <60>; /* RX interrupt */
+                       interrupt-names = "common", "tx", "rx";
+                       ti,buffer-size = <128>;
+                       ti,hwmods = "mcbsp1";
+                       dmas = <&sdma 31>,
+                              <&sdma 32>;
+                       dma-names = "tx", "rx";
+                       clocks = <&mcbsp1_fck>;
+                       clock-names = "fck";
+                       status = "disabled";
+               };
+
+               mcbsp2: mcbsp@49022000 {
+                       compatible = "ti,omap3-mcbsp";
+                       reg = <0x49022000 0xff>,
+                             <0x49028000 0xff>;
+                       reg-names = "mpu", "sidetone";
+                       interrupts = <17>, /* OCP compliant interrupt */
+                                    <62>, /* TX interrupt */
+                                    <63>, /* RX interrupt */
+                                    <4>;  /* Sidetone */
+                       interrupt-names = "common", "tx", "rx", "sidetone";
+                       ti,buffer-size = <1280>;
+                       ti,hwmods = "mcbsp2", "mcbsp2_sidetone";
+                       dmas = <&sdma 33>,
+                              <&sdma 34>;
+                       dma-names = "tx", "rx";
+                       clocks = <&mcbsp2_fck>, <&mcbsp2_ick>;
+                       clock-names = "fck", "ick";
+                       status = "disabled";
+               };
+
+               mcbsp3: mcbsp@49024000 {
+                       compatible = "ti,omap3-mcbsp";
+                       reg = <0x49024000 0xff>,
+                             <0x4902a000 0xff>;
+                       reg-names = "mpu", "sidetone";
+                       interrupts = <22>, /* OCP compliant interrupt */
+                                    <89>, /* TX interrupt */
+                                    <90>, /* RX interrupt */
+                                    <5>;  /* Sidetone */
+                       interrupt-names = "common", "tx", "rx", "sidetone";
+                       ti,buffer-size = <128>;
+                       ti,hwmods = "mcbsp3", "mcbsp3_sidetone";
+                       dmas = <&sdma 17>,
+                              <&sdma 18>;
+                       dma-names = "tx", "rx";
+                       clocks = <&mcbsp3_fck>, <&mcbsp3_ick>;
+                       clock-names = "fck", "ick";
+                       status = "disabled";
+               };
+
+               mcbsp4: mcbsp@49026000 {
+                       compatible = "ti,omap3-mcbsp";
+                       reg = <0x49026000 0xff>;
+                       reg-names = "mpu";
+                       interrupts = <23>, /* OCP compliant interrupt */
+                                    <54>, /* TX interrupt */
+                                    <55>; /* RX interrupt */
+                       interrupt-names = "common", "tx", "rx";
+                       ti,buffer-size = <128>;
+                       ti,hwmods = "mcbsp4";
+                       dmas = <&sdma 19>,
+                              <&sdma 20>;
+                       dma-names = "tx", "rx";
+                       clocks = <&mcbsp4_fck>;
+                       clock-names = "fck";
+                       status = "disabled";
+               };
+
+               mcbsp5: mcbsp@48096000 {
+                       compatible = "ti,omap3-mcbsp";
+                       reg = <0x48096000 0xff>;
+                       reg-names = "mpu";
+                       interrupts = <27>, /* OCP compliant interrupt */
+                                    <81>, /* TX interrupt */
+                                    <82>; /* RX interrupt */
+                       interrupt-names = "common", "tx", "rx";
+                       ti,buffer-size = <128>;
+                       ti,hwmods = "mcbsp5";
+                       dmas = <&sdma 21>,
+                              <&sdma 22>;
+                       dma-names = "tx", "rx";
+                       clocks = <&mcbsp5_fck>;
+                       clock-names = "fck";
+                       status = "disabled";
+               };
+
+               sham: sham@480c3000 {
+                       compatible = "ti,omap3-sham";
+                       ti,hwmods = "sham";
+                       reg = <0x480c3000 0x64>;
+                       interrupts = <49>;
+                       dmas = <&sdma 69>;
+                       dma-names = "rx";
+               };
+
+               smartreflex_core: smartreflex@480cb000 {
+                       compatible = "ti,omap3-smartreflex-core";
+                       ti,hwmods = "smartreflex_core";
+                       reg = <0x480cb000 0x400>;
+                       interrupts = <19>;
+               };
+
+               smartreflex_mpu_iva: smartreflex@480c9000 {
+                       compatible = "ti,omap3-smartreflex-iva";
+                       ti,hwmods = "smartreflex_mpu_iva";
+                       reg = <0x480c9000 0x400>;
+                       interrupts = <18>;
+               };
+
+               timer1: timer@48318000 {
+                       compatible = "ti,omap3430-timer";
+                       reg = <0x48318000 0x400>;
+                       interrupts = <37>;
+                       ti,hwmods = "timer1";
+                       ti,timer-alwon;
+               };
+
+               timer2: timer@49032000 {
+                       compatible = "ti,omap3430-timer";
+                       reg = <0x49032000 0x400>;
+                       interrupts = <38>;
+                       ti,hwmods = "timer2";
+               };
+
+               timer3: timer@49034000 {
+                       compatible = "ti,omap3430-timer";
+                       reg = <0x49034000 0x400>;
+                       interrupts = <39>;
+                       ti,hwmods = "timer3";
+               };
+
+               timer4: timer@49036000 {
+                       compatible = "ti,omap3430-timer";
+                       reg = <0x49036000 0x400>;
+                       interrupts = <40>;
+                       ti,hwmods = "timer4";
+               };
+
+               timer5: timer@49038000 {
+                       compatible = "ti,omap3430-timer";
+                       reg = <0x49038000 0x400>;
+                       interrupts = <41>;
+                       ti,hwmods = "timer5";
+                       ti,timer-dsp;
+               };
+
+               timer6: timer@4903a000 {
+                       compatible = "ti,omap3430-timer";
+                       reg = <0x4903a000 0x400>;
+                       interrupts = <42>;
+                       ti,hwmods = "timer6";
+                       ti,timer-dsp;
+               };
+
+               timer7: timer@4903c000 {
+                       compatible = "ti,omap3430-timer";
+                       reg = <0x4903c000 0x400>;
+                       interrupts = <43>;
+                       ti,hwmods = "timer7";
+                       ti,timer-dsp;
+               };
+
+               timer8: timer@4903e000 {
+                       compatible = "ti,omap3430-timer";
+                       reg = <0x4903e000 0x400>;
+                       interrupts = <44>;
+                       ti,hwmods = "timer8";
+                       ti,timer-pwm;
+                       ti,timer-dsp;
+               };
+
+               timer9: timer@49040000 {
+                       compatible = "ti,omap3430-timer";
+                       reg = <0x49040000 0x400>;
+                       interrupts = <45>;
+                       ti,hwmods = "timer9";
+                       ti,timer-pwm;
+               };
+
+               timer10: timer@48086000 {
+                       compatible = "ti,omap3430-timer";
+                       reg = <0x48086000 0x400>;
+                       interrupts = <46>;
+                       ti,hwmods = "timer10";
+                       ti,timer-pwm;
+               };
+
+               timer11: timer@48088000 {
+                       compatible = "ti,omap3430-timer";
+                       reg = <0x48088000 0x400>;
+                       interrupts = <47>;
+                       ti,hwmods = "timer11";
+                       ti,timer-pwm;
+               };
+
+               timer12: timer@48304000 {
+                       compatible = "ti,omap3430-timer";
+                       reg = <0x48304000 0x400>;
+                       interrupts = <95>;
+                       ti,hwmods = "timer12";
+                       ti,timer-alwon;
+                       ti,timer-secure;
+               };
+
+               usbhstll: usbhstll@48062000 {
+                       compatible = "ti,usbhs-tll";
+                       reg = <0x48062000 0x1000>;
+                       interrupts = <78>;
+                       ti,hwmods = "usb_tll_hs";
+               };
+
+               usbhshost: usbhshost@48064000 {
+                       compatible = "ti,usbhs-host";
+                       reg = <0x48064000 0x400>;
+                       ti,hwmods = "usb_host_hs";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       usbhsohci: ohci@48064400 {
+                               compatible = "ti,ohci-omap3";
+                               reg = <0x48064400 0x400>;
+                               interrupt-parent = <&intc>;
+                               interrupts = <76>;
+                       };
+
+                       usbhsehci: ehci@48064800 {
+                               compatible = "ti,ehci-omap";
+                               reg = <0x48064800 0x400>;
+                               interrupt-parent = <&intc>;
+                               interrupts = <77>;
+                       };
+               };
+
+               gpmc: gpmc@6e000000 {
+                       compatible = "ti,omap3430-gpmc";
+                       ti,hwmods = "gpmc";
+                       reg = <0x6e000000 0x02d0>;
+                       interrupts = <20>;
+                       dmas = <&sdma 4>;
+                       dma-names = "rxtx";
+                       gpmc,num-cs = <8>;
+                       gpmc,num-waitpins = <4>;
+                       #address-cells = <2>;
+                       #size-cells = <1>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+               };
+
+               usb_otg_hs: usb_otg_hs@480ab000 {
+                       compatible = "ti,omap3-musb";
+                       reg = <0x480ab000 0x1000>;
+                       interrupts = <92>, <93>;
+                       interrupt-names = "mc", "dma";
+                       ti,hwmods = "usb_otg_hs";
+                       multipoint = <1>;
+                       num-eps = <16>;
+                       ram-bits = <12>;
+               };
+
+               dss: dss@48050000 {
+                       compatible = "ti,omap3-dss";
+                       reg = <0x48050000 0x200>;
+                       status = "disabled";
+                       ti,hwmods = "dss_core";
+                       clocks = <&dss1_alwon_fck>;
+                       clock-names = "fck";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       dispc@48050400 {
+                               compatible = "ti,omap3-dispc";
+                               reg = <0x48050400 0x400>;
+                               interrupts = <25>;
+                               ti,hwmods = "dss_dispc";
+                               clocks = <&dss1_alwon_fck>;
+                               clock-names = "fck";
+                       };
+
+                       dsi: encoder@4804fc00 {
+                               compatible = "ti,omap3-dsi";
+                               reg = <0x4804fc00 0x200>,
+                                     <0x4804fe00 0x40>,
+                                     <0x4804ff00 0x20>;
+                               reg-names = "proto", "phy", "pll";
+                               interrupts = <25>;
+                               status = "disabled";
+                               ti,hwmods = "dss_dsi1";
+                               clocks = <&dss1_alwon_fck>, <&dss2_alwon_fck>;
+                               clock-names = "fck", "sys_clk";
+                       };
+
+                       rfbi: encoder@48050800 {
+                               compatible = "ti,omap3-rfbi";
+                               reg = <0x48050800 0x100>;
+                               status = "disabled";
+                               ti,hwmods = "dss_rfbi";
+                               clocks = <&dss1_alwon_fck>, <&dss_ick>;
+                               clock-names = "fck", "ick";
+                       };
+
+                       venc: encoder@48050c00 {
+                               compatible = "ti,omap3-venc";
+                               reg = <0x48050c00 0x100>;
+                               status = "disabled";
+                               ti,hwmods = "dss_venc";
+                               clocks = <&dss_tv_fck>;
+                               clock-names = "fck";
+                       };
+               };
+
+               ssi: ssi-controller@48058000 {
+                       compatible = "ti,omap3-ssi";
+                       ti,hwmods = "ssi";
+
+                       status = "disabled";
+
+                       reg = <0x48058000 0x1000>,
+                             <0x48059000 0x1000>;
+                       reg-names = "sys",
+                                   "gdd";
+
+                       interrupts = <71>;
+                       interrupt-names = "gdd_mpu";
+
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       ssi_port1: ssi-port@4805a000 {
+                               compatible = "ti,omap3-ssi-port";
+
+                               reg = <0x4805a000 0x800>,
+                                     <0x4805a800 0x800>;
+                               reg-names = "tx",
+                                           "rx";
+
+                               interrupt-parent = <&intc>;
+                               interrupts = <67>,
+                                            <68>;
+                       };
+
+                       ssi_port2: ssi-port@4805b000 {
+                               compatible = "ti,omap3-ssi-port";
+
+                               reg = <0x4805b000 0x800>,
+                                     <0x4805b800 0x800>;
+                               reg-names = "tx",
+                                           "rx";
+
+                               interrupt-parent = <&intc>;
+                               interrupts = <69>,
+                                            <70>;
+                       };
+               };
+       };
+};
+
+/include/ "omap3xxx-clocks.dtsi"
diff --git a/arch/arm/dts/omap34xx-omap36xx-clocks.dtsi b/arch/arm/dts/omap34xx-omap36xx-clocks.dtsi
new file mode 100644 (file)
index 0000000..db47f12
--- /dev/null
@@ -0,0 +1,268 @@
+/*
+ * Device Tree Source for OMAP34XX/OMAP36XX clock data
+ *
+ * Copyright (C) 2013 Texas Instruments, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+&cm_clocks {
+       security_l4_ick2: security_l4_ick2 {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&l4_ick>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       aes1_ick: aes1_ick@a14 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&security_l4_ick2>;
+               ti,bit-shift = <3>;
+               reg = <0x0a14>;
+       };
+
+       rng_ick: rng_ick@a14 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&security_l4_ick2>;
+               reg = <0x0a14>;
+               ti,bit-shift = <2>;
+       };
+
+       sha11_ick: sha11_ick@a14 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&security_l4_ick2>;
+               reg = <0x0a14>;
+               ti,bit-shift = <1>;
+       };
+
+       des1_ick: des1_ick@a14 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&security_l4_ick2>;
+               reg = <0x0a14>;
+               ti,bit-shift = <0>;
+       };
+
+       cam_mclk: cam_mclk@f00 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&dpll4_m5x2_ck>;
+               ti,bit-shift = <0>;
+               reg = <0x0f00>;
+               ti,set-rate-parent;
+       };
+
+       cam_ick: cam_ick@f10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-no-wait-interface-clock";
+               clocks = <&l4_ick>;
+               reg = <0x0f10>;
+               ti,bit-shift = <0>;
+       };
+
+       csi2_96m_fck: csi2_96m_fck@f00 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&core_96m_fck>;
+               reg = <0x0f00>;
+               ti,bit-shift = <1>;
+       };
+
+       security_l3_ick: security_l3_ick {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&l3_ick>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       pka_ick: pka_ick@a14 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&security_l3_ick>;
+               reg = <0x0a14>;
+               ti,bit-shift = <4>;
+       };
+
+       icr_ick: icr_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <29>;
+       };
+
+       des2_ick: des2_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <26>;
+       };
+
+       mspro_ick: mspro_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <23>;
+       };
+
+       mailboxes_ick: mailboxes_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <7>;
+       };
+
+       ssi_l4_ick: ssi_l4_ick {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&l4_ick>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       sr1_fck: sr1_fck@c00 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&sys_ck>;
+               reg = <0x0c00>;
+               ti,bit-shift = <6>;
+       };
+
+       sr2_fck: sr2_fck@c00 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&sys_ck>;
+               reg = <0x0c00>;
+               ti,bit-shift = <7>;
+       };
+
+       sr_l4_ick: sr_l4_ick {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&l4_ick>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       dpll2_fck: dpll2_fck@40 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&core_ck>;
+               ti,bit-shift = <19>;
+               ti,max-div = <7>;
+               reg = <0x0040>;
+               ti,index-starts-at-one;
+       };
+
+       dpll2_ck: dpll2_ck@4 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-dpll-clock";
+               clocks = <&sys_ck>, <&dpll2_fck>;
+               reg = <0x0004>, <0x0024>, <0x0040>, <0x0034>;
+               ti,low-power-stop;
+               ti,lock;
+               ti,low-power-bypass;
+       };
+
+       dpll2_m2_ck: dpll2_m2_ck@44 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&dpll2_ck>;
+               ti,max-div = <31>;
+               reg = <0x0044>;
+               ti,index-starts-at-one;
+       };
+
+       iva2_ck: iva2_ck@0 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&dpll2_m2_ck>;
+               reg = <0x0000>;
+               ti,bit-shift = <0>;
+       };
+
+       modem_fck: modem_fck@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&sys_ck>;
+               reg = <0x0a00>;
+               ti,bit-shift = <31>;
+       };
+
+       sad2d_ick: sad2d_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&l3_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <3>;
+       };
+
+       mad2d_ick: mad2d_ick@a18 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&l3_ick>;
+               reg = <0x0a18>;
+               ti,bit-shift = <3>;
+       };
+
+       mspro_fck: mspro_fck@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&core_96m_fck>;
+               reg = <0x0a00>;
+               ti,bit-shift = <23>;
+       };
+};
+
+&cm_clockdomains {
+       cam_clkdm: cam_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&cam_ick>, <&csi2_96m_fck>;
+       };
+
+       iva2_clkdm: iva2_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&iva2_ck>;
+       };
+
+       dpll2_clkdm: dpll2_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&dpll2_ck>;
+       };
+
+       wkup_clkdm: wkup_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&gpio1_dbck>, <&wdt2_fck>, <&wdt2_ick>, <&wdt1_ick>,
+                        <&gpio1_ick>, <&omap_32ksync_ick>, <&gpt12_ick>,
+                        <&gpt1_ick>, <&sr1_fck>, <&sr2_fck>;
+       };
+
+       d2d_clkdm: d2d_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&modem_fck>, <&sad2d_ick>, <&mad2d_ick>;
+       };
+
+       core_l4_clkdm: core_l4_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&mmchs2_fck>, <&mmchs1_fck>, <&i2c3_fck>, <&i2c2_fck>,
+                        <&i2c1_fck>, <&mcspi4_fck>, <&mcspi3_fck>,
+                        <&mcspi2_fck>, <&mcspi1_fck>, <&uart2_fck>,
+                        <&uart1_fck>, <&hdq_fck>, <&mmchs2_ick>, <&mmchs1_ick>,
+                        <&hdq_ick>, <&mcspi4_ick>, <&mcspi3_ick>,
+                        <&mcspi2_ick>, <&mcspi1_ick>, <&i2c3_ick>, <&i2c2_ick>,
+                        <&i2c1_ick>, <&uart2_ick>, <&uart1_ick>, <&gpt11_ick>,
+                        <&gpt10_ick>, <&mcbsp5_ick>, <&mcbsp1_ick>,
+                        <&omapctrl_ick>, <&aes2_ick>, <&sha12_ick>, <&icr_ick>,
+                        <&des2_ick>, <&mspro_ick>, <&mailboxes_ick>,
+                        <&mspro_fck>;
+       };
+};
diff --git a/arch/arm/dts/omap36xx-am35xx-omap3430es2plus-clocks.dtsi b/arch/arm/dts/omap36xx-am35xx-omap3430es2plus-clocks.dtsi
new file mode 100644 (file)
index 0000000..572cb53
--- /dev/null
@@ -0,0 +1,242 @@
+/*
+ * Device Tree Source for OMAP36xx/AM35xx/OMAP34xx clock data
+ *
+ * Copyright (C) 2013 Texas Instruments, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+&prm_clocks {
+       corex2_d3_fck: corex2_d3_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&corex2_fck>;
+               clock-mult = <1>;
+               clock-div = <3>;
+       };
+
+       corex2_d5_fck: corex2_d5_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&corex2_fck>;
+               clock-mult = <1>;
+               clock-div = <5>;
+       };
+};
+&cm_clocks {
+       dpll5_ck: dpll5_ck@d04 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-dpll-clock";
+               clocks = <&sys_ck>, <&sys_ck>;
+               reg = <0x0d04>, <0x0d24>, <0x0d4c>, <0x0d34>;
+               ti,low-power-stop;
+               ti,lock;
+       };
+
+       dpll5_m2_ck: dpll5_m2_ck@d50 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&dpll5_ck>;
+               ti,max-div = <31>;
+               reg = <0x0d50>;
+               ti,index-starts-at-one;
+       };
+
+       sgx_gate_fck: sgx_gate_fck@b00 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-gate-clock";
+               clocks = <&core_ck>;
+               ti,bit-shift = <1>;
+               reg = <0x0b00>;
+       };
+
+       core_d3_ck: core_d3_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&core_ck>;
+               clock-mult = <1>;
+               clock-div = <3>;
+       };
+
+       core_d4_ck: core_d4_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&core_ck>;
+               clock-mult = <1>;
+               clock-div = <4>;
+       };
+
+       core_d6_ck: core_d6_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&core_ck>;
+               clock-mult = <1>;
+               clock-div = <6>;
+       };
+
+       omap_192m_alwon_fck: omap_192m_alwon_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&dpll4_m2x2_ck>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       core_d2_ck: core_d2_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&core_ck>;
+               clock-mult = <1>;
+               clock-div = <2>;
+       };
+
+       sgx_mux_fck: sgx_mux_fck@b40 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-mux-clock";
+               clocks = <&core_d3_ck>, <&core_d4_ck>, <&core_d6_ck>, <&cm_96m_fck>, <&omap_192m_alwon_fck>, <&core_d2_ck>, <&corex2_d3_fck>, <&corex2_d5_fck>;
+               reg = <0x0b40>;
+       };
+
+       sgx_fck: sgx_fck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&sgx_gate_fck>, <&sgx_mux_fck>;
+       };
+
+       sgx_ick: sgx_ick@b10 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&l3_ick>;
+               reg = <0x0b10>;
+               ti,bit-shift = <0>;
+       };
+
+       cpefuse_fck: cpefuse_fck@a08 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&sys_ck>;
+               reg = <0x0a08>;
+               ti,bit-shift = <0>;
+       };
+
+       ts_fck: ts_fck@a08 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&omap_32k_fck>;
+               reg = <0x0a08>;
+               ti,bit-shift = <1>;
+       };
+
+       usbtll_fck: usbtll_fck@a08 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&dpll5_m2_ck>;
+               reg = <0x0a08>;
+               ti,bit-shift = <2>;
+       };
+
+       usbtll_ick: usbtll_ick@a18 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a18>;
+               ti,bit-shift = <2>;
+       };
+
+       mmchs3_ick: mmchs3_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <30>;
+       };
+
+       mmchs3_fck: mmchs3_fck@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&core_96m_fck>;
+               reg = <0x0a00>;
+               ti,bit-shift = <30>;
+       };
+
+       dss1_alwon_fck: dss1_alwon_fck_3430es2@e00 {
+               #clock-cells = <0>;
+               compatible = "ti,dss-gate-clock";
+               clocks = <&dpll4_m4x2_ck>;
+               ti,bit-shift = <0>;
+               reg = <0x0e00>;
+               ti,set-rate-parent;
+       };
+
+       dss_ick: dss_ick_3430es2@e10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-dss-interface-clock";
+               clocks = <&l4_ick>;
+               reg = <0x0e10>;
+               ti,bit-shift = <0>;
+       };
+
+       usbhost_120m_fck: usbhost_120m_fck@1400 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&dpll5_m2_ck>;
+               reg = <0x1400>;
+               ti,bit-shift = <1>;
+       };
+
+       usbhost_48m_fck: usbhost_48m_fck@1400 {
+               #clock-cells = <0>;
+               compatible = "ti,dss-gate-clock";
+               clocks = <&omap_48m_fck>;
+               reg = <0x1400>;
+               ti,bit-shift = <0>;
+       };
+
+       usbhost_ick: usbhost_ick@1410 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-dss-interface-clock";
+               clocks = <&l4_ick>;
+               reg = <0x1410>;
+               ti,bit-shift = <0>;
+       };
+};
+
+&cm_clockdomains {
+       dpll5_clkdm: dpll5_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&dpll5_ck>;
+       };
+
+       sgx_clkdm: sgx_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&sgx_ick>;
+       };
+
+       dss_clkdm: dss_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&dss_tv_fck>, <&dss_96m_fck>, <&dss2_alwon_fck>,
+                        <&dss1_alwon_fck>, <&dss_ick>;
+       };
+
+       core_l4_clkdm: core_l4_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&mmchs2_fck>, <&mmchs1_fck>, <&i2c3_fck>, <&i2c2_fck>,
+                        <&i2c1_fck>, <&mcspi4_fck>, <&mcspi3_fck>,
+                        <&mcspi2_fck>, <&mcspi1_fck>, <&uart2_fck>,
+                        <&uart1_fck>, <&hdq_fck>, <&mmchs2_ick>, <&mmchs1_ick>,
+                        <&hdq_ick>, <&mcspi4_ick>, <&mcspi3_ick>,
+                        <&mcspi2_ick>, <&mcspi1_ick>, <&i2c3_ick>, <&i2c2_ick>,
+                        <&i2c1_ick>, <&uart2_ick>, <&uart1_ick>, <&gpt11_ick>,
+                        <&gpt10_ick>, <&mcbsp5_ick>, <&mcbsp1_ick>,
+                        <&omapctrl_ick>, <&aes2_ick>, <&sha12_ick>,
+                        <&cpefuse_fck>, <&ts_fck>, <&usbtll_fck>,
+                        <&usbtll_ick>, <&mmchs3_ick>, <&mmchs3_fck>;
+       };
+
+       usbhost_clkdm: usbhost_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&usbhost_120m_fck>, <&usbhost_48m_fck>,
+                        <&usbhost_ick>;
+       };
+};
diff --git a/arch/arm/dts/omap36xx-clocks.dtsi b/arch/arm/dts/omap36xx-clocks.dtsi
new file mode 100644 (file)
index 0000000..9c7ed03
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ * Device Tree Source for OMAP36xx clock data
+ *
+ * Copyright (C) 2013 Texas Instruments, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+&cm_clocks {
+       dpll4_ck: dpll4_ck@d00 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-dpll-per-j-type-clock";
+               clocks = <&sys_ck>, <&sys_ck>;
+               reg = <0x0d00>, <0x0d20>, <0x0d44>, <0x0d30>;
+       };
+
+       dpll4_m5x2_ck: dpll4_m5x2_ck@d00 {
+               #clock-cells = <0>;
+               compatible = "ti,hsdiv-gate-clock";
+               clocks = <&dpll4_m5x2_mul_ck>;
+               ti,bit-shift = <0x1e>;
+               reg = <0x0d00>;
+               ti,set-rate-parent;
+               ti,set-bit-to-disable;
+       };
+
+       dpll4_m2x2_ck: dpll4_m2x2_ck@d00 {
+               #clock-cells = <0>;
+               compatible = "ti,hsdiv-gate-clock";
+               clocks = <&dpll4_m2x2_mul_ck>;
+               ti,bit-shift = <0x1b>;
+               reg = <0x0d00>;
+               ti,set-bit-to-disable;
+       };
+
+       dpll3_m3x2_ck: dpll3_m3x2_ck@d00 {
+               #clock-cells = <0>;
+               compatible = "ti,hsdiv-gate-clock";
+               clocks = <&dpll3_m3x2_mul_ck>;
+               ti,bit-shift = <0xc>;
+               reg = <0x0d00>;
+               ti,set-bit-to-disable;
+       };
+
+       dpll4_m3x2_ck: dpll4_m3x2_ck@d00 {
+               #clock-cells = <0>;
+               compatible = "ti,hsdiv-gate-clock";
+               clocks = <&dpll4_m3x2_mul_ck>;
+               ti,bit-shift = <0x1c>;
+               reg = <0x0d00>;
+               ti,set-bit-to-disable;
+       };
+
+       dpll4_m6x2_ck: dpll4_m6x2_ck@d00 {
+               #clock-cells = <0>;
+               compatible = "ti,hsdiv-gate-clock";
+               clocks = <&dpll4_m6x2_mul_ck>;
+               ti,bit-shift = <0x1f>;
+               reg = <0x0d00>;
+               ti,set-bit-to-disable;
+       };
+
+       uart4_fck: uart4_fck@1000 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&per_48m_fck>;
+               reg = <0x1000>;
+               ti,bit-shift = <18>;
+       };
+};
+
+&dpll4_m2x2_mul_ck {
+       clock-mult = <1>;
+};
+
+&dpll4_m3x2_mul_ck {
+       clock-mult = <1>;
+};
+
+&dpll4_m4x2_mul_ck {
+       ti,clock-mult = <1>;
+};
+
+&dpll4_m5x2_mul_ck {
+       ti,clock-mult = <1>;
+};
+
+&dpll4_m6x2_mul_ck {
+       clock-mult = <1>;
+};
+
+&cm_clockdomains {
+       dpll4_clkdm: dpll4_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&dpll4_ck>;
+       };
+
+       per_clkdm: per_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&uart3_fck>, <&gpio6_dbck>, <&gpio5_dbck>,
+                        <&gpio4_dbck>, <&gpio3_dbck>, <&gpio2_dbck>,
+                        <&wdt3_fck>, <&gpio6_ick>, <&gpio5_ick>, <&gpio4_ick>,
+                        <&gpio3_ick>, <&gpio2_ick>, <&wdt3_ick>, <&uart3_ick>,
+                        <&uart4_ick>, <&gpt9_ick>, <&gpt8_ick>, <&gpt7_ick>,
+                        <&gpt6_ick>, <&gpt5_ick>, <&gpt4_ick>, <&gpt3_ick>,
+                        <&gpt2_ick>, <&mcbsp2_ick>, <&mcbsp3_ick>,
+                        <&mcbsp4_ick>, <&uart4_fck>;
+       };
+};
diff --git a/arch/arm/dts/omap36xx-omap3430es2plus-clocks.dtsi b/arch/arm/dts/omap36xx-omap3430es2plus-clocks.dtsi
new file mode 100644 (file)
index 0000000..a9eec1b
--- /dev/null
@@ -0,0 +1,198 @@
+/*
+ * Device Tree Source for OMAP34xx/OMAP36xx clock data
+ *
+ * Copyright (C) 2013 Texas Instruments, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+&cm_clocks {
+       ssi_ssr_gate_fck_3430es2: ssi_ssr_gate_fck_3430es2@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-no-wait-gate-clock";
+               clocks = <&corex2_fck>;
+               ti,bit-shift = <0>;
+               reg = <0x0a00>;
+       };
+
+       ssi_ssr_div_fck_3430es2: ssi_ssr_div_fck_3430es2@a40 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-divider-clock";
+               clocks = <&corex2_fck>;
+               ti,bit-shift = <8>;
+               reg = <0x0a40>;
+               ti,dividers = <0>, <1>, <2>, <3>, <4>, <0>, <6>, <0>, <8>;
+       };
+
+       ssi_ssr_fck: ssi_ssr_fck_3430es2 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&ssi_ssr_gate_fck_3430es2>, <&ssi_ssr_div_fck_3430es2>;
+       };
+
+       ssi_sst_fck: ssi_sst_fck_3430es2 {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&ssi_ssr_fck>;
+               clock-mult = <1>;
+               clock-div = <2>;
+       };
+
+       hsotgusb_ick_3430es2: hsotgusb_ick_3430es2@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-hsotgusb-interface-clock";
+               clocks = <&core_l3_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <4>;
+       };
+
+       ssi_l4_ick: ssi_l4_ick {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&l4_ick>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       ssi_ick: ssi_ick_3430es2@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-ssi-interface-clock";
+               clocks = <&ssi_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <0>;
+       };
+
+       usim_gate_fck: usim_gate_fck@c00 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-gate-clock";
+               clocks = <&omap_96m_fck>;
+               ti,bit-shift = <9>;
+               reg = <0x0c00>;
+       };
+
+       sys_d2_ck: sys_d2_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&sys_ck>;
+               clock-mult = <1>;
+               clock-div = <2>;
+       };
+
+       omap_96m_d2_fck: omap_96m_d2_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&omap_96m_fck>;
+               clock-mult = <1>;
+               clock-div = <2>;
+       };
+
+       omap_96m_d4_fck: omap_96m_d4_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&omap_96m_fck>;
+               clock-mult = <1>;
+               clock-div = <4>;
+       };
+
+       omap_96m_d8_fck: omap_96m_d8_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&omap_96m_fck>;
+               clock-mult = <1>;
+               clock-div = <8>;
+       };
+
+       omap_96m_d10_fck: omap_96m_d10_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&omap_96m_fck>;
+               clock-mult = <1>;
+               clock-div = <10>;
+       };
+
+       dpll5_m2_d4_ck: dpll5_m2_d4_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&dpll5_m2_ck>;
+               clock-mult = <1>;
+               clock-div = <4>;
+       };
+
+       dpll5_m2_d8_ck: dpll5_m2_d8_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&dpll5_m2_ck>;
+               clock-mult = <1>;
+               clock-div = <8>;
+       };
+
+       dpll5_m2_d16_ck: dpll5_m2_d16_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&dpll5_m2_ck>;
+               clock-mult = <1>;
+               clock-div = <16>;
+       };
+
+       dpll5_m2_d20_ck: dpll5_m2_d20_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&dpll5_m2_ck>;
+               clock-mult = <1>;
+               clock-div = <20>;
+       };
+
+       usim_mux_fck: usim_mux_fck@c40 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-mux-clock";
+               clocks = <&sys_ck>, <&sys_d2_ck>, <&omap_96m_d2_fck>, <&omap_96m_d4_fck>, <&omap_96m_d8_fck>, <&omap_96m_d10_fck>, <&dpll5_m2_d4_ck>, <&dpll5_m2_d8_ck>, <&dpll5_m2_d16_ck>, <&dpll5_m2_d20_ck>;
+               ti,bit-shift = <3>;
+               reg = <0x0c40>;
+               ti,index-starts-at-one;
+       };
+
+       usim_fck: usim_fck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&usim_gate_fck>, <&usim_mux_fck>;
+       };
+
+       usim_ick: usim_ick@c10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&wkup_l4_ick>;
+               reg = <0x0c10>;
+               ti,bit-shift = <9>;
+       };
+};
+
+&cm_clockdomains {
+       core_l3_clkdm: core_l3_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&sdrc_ick>, <&hsotgusb_ick_3430es2>;
+       };
+
+       wkup_clkdm: wkup_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&gpio1_dbck>, <&wdt2_fck>, <&wdt2_ick>, <&wdt1_ick>,
+                        <&gpio1_ick>, <&omap_32ksync_ick>, <&gpt12_ick>,
+                        <&gpt1_ick>, <&usim_ick>;
+       };
+
+       core_l4_clkdm: core_l4_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&cpefuse_fck>, <&ts_fck>, <&usbtll_fck>,
+                        <&usbtll_ick>, <&mmchs3_ick>, <&mmchs3_fck>,
+                        <&mmchs2_fck>, <&mmchs1_fck>, <&i2c3_fck>, <&i2c2_fck>,
+                        <&i2c1_fck>, <&mcspi4_fck>, <&mcspi3_fck>,
+                        <&mcspi2_fck>, <&mcspi1_fck>, <&uart2_fck>,
+                        <&uart1_fck>, <&hdq_fck>, <&mmchs2_ick>, <&mmchs1_ick>,
+                        <&hdq_ick>, <&mcspi4_ick>, <&mcspi3_ick>,
+                        <&mcspi2_ick>, <&mcspi1_ick>, <&i2c3_ick>, <&i2c2_ick>,
+                        <&i2c1_ick>, <&uart2_ick>, <&uart1_ick>, <&gpt11_ick>,
+                        <&gpt10_ick>, <&mcbsp5_ick>, <&mcbsp1_ick>,
+                        <&omapctrl_ick>, <&aes2_ick>, <&sha12_ick>,
+                        <&ssi_ick>;
+       };
+};
diff --git a/arch/arm/dts/omap36xx.dtsi b/arch/arm/dts/omap36xx.dtsi
new file mode 100644 (file)
index 0000000..fc22f0d
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+ * Device Tree Source for OMAP3 SoC
+ *
+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#include <dt-bindings/media/omap3-isp.h>
+
+#include "omap3.dtsi"
+
+/ {
+       aliases {
+               serial3 = &uart4;
+       };
+
+       cpus {
+               /* OMAP3630/OMAP37xx 'standard device' variants OPP50 to OPP130 */
+               cpu@0 {
+                       operating-points = <
+                               /* kHz    uV */
+                               300000  1012500
+                               600000  1200000
+                               800000  1325000
+                       >;
+                       clock-latency = <300000>; /* From legacy driver */
+               };
+       };
+
+       ocp@68000000 {
+               uart4: serial@49042000 {
+                       compatible = "ti,omap3-uart";
+                       reg = <0x49042000 0x400>;
+                       interrupts = <80>;
+                       dmas = <&sdma 81 &sdma 82>;
+                       dma-names = "tx", "rx";
+                       ti,hwmods = "uart4";
+                       clock-frequency = <48000000>;
+               };
+
+               abb_mpu_iva: regulator-abb-mpu {
+                       compatible = "ti,abb-v1";
+                       regulator-name = "abb_mpu_iva";
+                       #address-cells = <0>;
+                       #size-cells = <0>;
+                       reg = <0x483072f0 0x8>, <0x48306818 0x4>;
+                       reg-names = "base-address", "int-address";
+                       ti,tranxdone-status-mask = <0x4000000>;
+                       clocks = <&sys_ck>;
+                       ti,settling-time = <30>;
+                       ti,clock-cycles = <8>;
+                       ti,abb_info = <
+                       /*uV            ABB     efuse   rbb_m   fbb_m   vset_m*/
+                       1012500         0       0       0       0       0
+                       1200000         0       0       0       0       0
+                       1325000         0       0       0       0       0
+                       1375000         1       0       0       0       0
+                       >;
+               };
+
+               omap3_pmx_core2: pinmux@480025a0 {
+                       compatible = "ti,omap3-padconf", "pinctrl-single";
+                       reg = <0x480025a0 0x5c>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       #interrupt-cells = <1>;
+                       interrupt-controller;
+                       pinctrl-single,register-width = <16>;
+                       pinctrl-single,function-mask = <0xff1f>;
+               };
+
+               isp: isp@480bc000 {
+                       compatible = "ti,omap3-isp";
+                       reg = <0x480bc000 0x12fc
+                              0x480bd800 0x0600>;
+                       interrupts = <24>;
+                       iommus = <&mmu_isp>;
+                       syscon = <&scm_conf 0x2f0>;
+                       ti,phy-type = <OMAP3ISP_PHY_TYPE_CSIPHY>;
+                       #clock-cells = <1>;
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                       };
+               };
+
+               bandgap@48002524 {
+                       reg = <0x48002524 0x4>;
+                       compatible = "ti,omap36xx-bandgap";
+                       #thermal-sensor-cells = <0>;
+               };
+       };
+};
+
+/* OMAP3630 needs dss_96m_fck for VENC */
+&venc {
+       clocks = <&dss_tv_fck>, <&dss_96m_fck>;
+       clock-names = "fck", "tv_dac_clk";
+};
+
+&ssi {
+       status = "ok";
+
+       clocks = <&ssi_ssr_fck>,
+                <&ssi_sst_fck>,
+                <&ssi_ick>;
+       clock-names = "ssi_ssr_fck",
+                     "ssi_sst_fck",
+                     "ssi_ick";
+};
+
+/include/ "omap34xx-omap36xx-clocks.dtsi"
+/include/ "omap36xx-omap3430es2plus-clocks.dtsi"
+/include/ "omap36xx-am35xx-omap3430es2plus-clocks.dtsi"
+/include/ "omap36xx-clocks.dtsi"
diff --git a/arch/arm/dts/omap3xxx-clocks.dtsi b/arch/arm/dts/omap3xxx-clocks.dtsi
new file mode 100644 (file)
index 0000000..7455ab5
--- /dev/null
@@ -0,0 +1,1665 @@
+/*
+ * Device Tree Source for OMAP3 clock data
+ *
+ * Copyright (C) 2013 Texas Instruments, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+&prm_clocks {
+       virt_16_8m_ck: virt_16_8m_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <16800000>;
+       };
+
+       osc_sys_ck: osc_sys_ck@d40 {
+               #clock-cells = <0>;
+               compatible = "ti,mux-clock";
+               clocks = <&virt_12m_ck>, <&virt_13m_ck>, <&virt_19200000_ck>, <&virt_26000000_ck>, <&virt_38_4m_ck>, <&virt_16_8m_ck>;
+               reg = <0x0d40>;
+       };
+
+       sys_ck: sys_ck@1270 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&osc_sys_ck>;
+               ti,bit-shift = <6>;
+               ti,max-div = <3>;
+               reg = <0x1270>;
+               ti,index-starts-at-one;
+       };
+
+       sys_clkout1: sys_clkout1@d70 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&osc_sys_ck>;
+               reg = <0x0d70>;
+               ti,bit-shift = <7>;
+       };
+
+       dpll3_x2_ck: dpll3_x2_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&dpll3_ck>;
+               clock-mult = <2>;
+               clock-div = <1>;
+       };
+
+       dpll3_m2x2_ck: dpll3_m2x2_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&dpll3_m2_ck>;
+               clock-mult = <2>;
+               clock-div = <1>;
+       };
+
+       dpll4_x2_ck: dpll4_x2_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&dpll4_ck>;
+               clock-mult = <2>;
+               clock-div = <1>;
+       };
+
+       corex2_fck: corex2_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&dpll3_m2x2_ck>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       wkup_l4_ick: wkup_l4_ick {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&sys_ck>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+};
+
+&scm_clocks {
+       mcbsp5_mux_fck: mcbsp5_mux_fck@68 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-mux-clock";
+               clocks = <&core_96m_fck>, <&mcbsp_clks>;
+               ti,bit-shift = <4>;
+               reg = <0x68>;
+       };
+
+       mcbsp5_fck: mcbsp5_fck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&mcbsp5_gate_fck>, <&mcbsp5_mux_fck>;
+       };
+
+       mcbsp1_mux_fck: mcbsp1_mux_fck@4 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-mux-clock";
+               clocks = <&core_96m_fck>, <&mcbsp_clks>;
+               ti,bit-shift = <2>;
+               reg = <0x04>;
+       };
+
+       mcbsp1_fck: mcbsp1_fck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&mcbsp1_gate_fck>, <&mcbsp1_mux_fck>;
+       };
+
+       mcbsp2_mux_fck: mcbsp2_mux_fck@4 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-mux-clock";
+               clocks = <&per_96m_fck>, <&mcbsp_clks>;
+               ti,bit-shift = <6>;
+               reg = <0x04>;
+       };
+
+       mcbsp2_fck: mcbsp2_fck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&mcbsp2_gate_fck>, <&mcbsp2_mux_fck>;
+       };
+
+       mcbsp3_mux_fck: mcbsp3_mux_fck@68 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-mux-clock";
+               clocks = <&per_96m_fck>, <&mcbsp_clks>;
+               reg = <0x68>;
+       };
+
+       mcbsp3_fck: mcbsp3_fck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&mcbsp3_gate_fck>, <&mcbsp3_mux_fck>;
+       };
+
+       mcbsp4_mux_fck: mcbsp4_mux_fck@68 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-mux-clock";
+               clocks = <&per_96m_fck>, <&mcbsp_clks>;
+               ti,bit-shift = <2>;
+               reg = <0x68>;
+       };
+
+       mcbsp4_fck: mcbsp4_fck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&mcbsp4_gate_fck>, <&mcbsp4_mux_fck>;
+       };
+};
+&cm_clocks {
+       dummy_apb_pclk: dummy_apb_pclk {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <0x0>;
+       };
+
+       omap_32k_fck: omap_32k_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <32768>;
+       };
+
+       virt_12m_ck: virt_12m_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <12000000>;
+       };
+
+       virt_13m_ck: virt_13m_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <13000000>;
+       };
+
+       virt_19200000_ck: virt_19200000_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <19200000>;
+       };
+
+       virt_26000000_ck: virt_26000000_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <26000000>;
+       };
+
+       virt_38_4m_ck: virt_38_4m_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <38400000>;
+       };
+
+       dpll4_ck: dpll4_ck@d00 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-dpll-per-clock";
+               clocks = <&sys_ck>, <&sys_ck>;
+               reg = <0x0d00>, <0x0d20>, <0x0d44>, <0x0d30>;
+       };
+
+       dpll4_m2_ck: dpll4_m2_ck@d48 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&dpll4_ck>;
+               ti,max-div = <63>;
+               reg = <0x0d48>;
+               ti,index-starts-at-one;
+       };
+
+       dpll4_m2x2_mul_ck: dpll4_m2x2_mul_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&dpll4_m2_ck>;
+               clock-mult = <2>;
+               clock-div = <1>;
+       };
+
+       dpll4_m2x2_ck: dpll4_m2x2_ck@d00 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&dpll4_m2x2_mul_ck>;
+               ti,bit-shift = <0x1b>;
+               reg = <0x0d00>;
+               ti,set-bit-to-disable;
+       };
+
+       omap_96m_alwon_fck: omap_96m_alwon_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&dpll4_m2x2_ck>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       dpll3_ck: dpll3_ck@d00 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-dpll-core-clock";
+               clocks = <&sys_ck>, <&sys_ck>;
+               reg = <0x0d00>, <0x0d20>, <0x0d40>, <0x0d30>;
+       };
+
+       dpll3_m3_ck: dpll3_m3_ck@1140 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&dpll3_ck>;
+               ti,bit-shift = <16>;
+               ti,max-div = <31>;
+               reg = <0x1140>;
+               ti,index-starts-at-one;
+       };
+
+       dpll3_m3x2_mul_ck: dpll3_m3x2_mul_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&dpll3_m3_ck>;
+               clock-mult = <2>;
+               clock-div = <1>;
+       };
+
+       dpll3_m3x2_ck: dpll3_m3x2_ck@d00 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&dpll3_m3x2_mul_ck>;
+               ti,bit-shift = <0xc>;
+               reg = <0x0d00>;
+               ti,set-bit-to-disable;
+       };
+
+       emu_core_alwon_ck: emu_core_alwon_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&dpll3_m3x2_ck>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       sys_altclk: sys_altclk {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <0x0>;
+       };
+
+       mcbsp_clks: mcbsp_clks {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <0x0>;
+       };
+
+       dpll3_m2_ck: dpll3_m2_ck@d40 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&dpll3_ck>;
+               ti,bit-shift = <27>;
+               ti,max-div = <31>;
+               reg = <0x0d40>;
+               ti,index-starts-at-one;
+       };
+
+       core_ck: core_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&dpll3_m2_ck>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       dpll1_fck: dpll1_fck@940 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&core_ck>;
+               ti,bit-shift = <19>;
+               ti,max-div = <7>;
+               reg = <0x0940>;
+               ti,index-starts-at-one;
+       };
+
+       dpll1_ck: dpll1_ck@904 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-dpll-clock";
+               clocks = <&sys_ck>, <&dpll1_fck>;
+               reg = <0x0904>, <0x0924>, <0x0940>, <0x0934>;
+       };
+
+       dpll1_x2_ck: dpll1_x2_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&dpll1_ck>;
+               clock-mult = <2>;
+               clock-div = <1>;
+       };
+
+       dpll1_x2m2_ck: dpll1_x2m2_ck@944 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&dpll1_x2_ck>;
+               ti,max-div = <31>;
+               reg = <0x0944>;
+               ti,index-starts-at-one;
+       };
+
+       cm_96m_fck: cm_96m_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&omap_96m_alwon_fck>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       omap_96m_fck: omap_96m_fck@d40 {
+               #clock-cells = <0>;
+               compatible = "ti,mux-clock";
+               clocks = <&cm_96m_fck>, <&sys_ck>;
+               ti,bit-shift = <6>;
+               reg = <0x0d40>;
+       };
+
+       dpll4_m3_ck: dpll4_m3_ck@e40 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&dpll4_ck>;
+               ti,bit-shift = <8>;
+               ti,max-div = <32>;
+               reg = <0x0e40>;
+               ti,index-starts-at-one;
+       };
+
+       dpll4_m3x2_mul_ck: dpll4_m3x2_mul_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&dpll4_m3_ck>;
+               clock-mult = <2>;
+               clock-div = <1>;
+       };
+
+       dpll4_m3x2_ck: dpll4_m3x2_ck@d00 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&dpll4_m3x2_mul_ck>;
+               ti,bit-shift = <0x1c>;
+               reg = <0x0d00>;
+               ti,set-bit-to-disable;
+       };
+
+       omap_54m_fck: omap_54m_fck@d40 {
+               #clock-cells = <0>;
+               compatible = "ti,mux-clock";
+               clocks = <&dpll4_m3x2_ck>, <&sys_altclk>;
+               ti,bit-shift = <5>;
+               reg = <0x0d40>;
+       };
+
+       cm_96m_d2_fck: cm_96m_d2_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&cm_96m_fck>;
+               clock-mult = <1>;
+               clock-div = <2>;
+       };
+
+       omap_48m_fck: omap_48m_fck@d40 {
+               #clock-cells = <0>;
+               compatible = "ti,mux-clock";
+               clocks = <&cm_96m_d2_fck>, <&sys_altclk>;
+               ti,bit-shift = <3>;
+               reg = <0x0d40>;
+       };
+
+       omap_12m_fck: omap_12m_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&omap_48m_fck>;
+               clock-mult = <1>;
+               clock-div = <4>;
+       };
+
+       dpll4_m4_ck: dpll4_m4_ck@e40 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&dpll4_ck>;
+               ti,max-div = <32>;
+               reg = <0x0e40>;
+               ti,index-starts-at-one;
+       };
+
+       dpll4_m4x2_mul_ck: dpll4_m4x2_mul_ck {
+               #clock-cells = <0>;
+               compatible = "ti,fixed-factor-clock";
+               clocks = <&dpll4_m4_ck>;
+               ti,clock-mult = <2>;
+               ti,clock-div = <1>;
+               ti,set-rate-parent;
+       };
+
+       dpll4_m4x2_ck: dpll4_m4x2_ck@d00 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&dpll4_m4x2_mul_ck>;
+               ti,bit-shift = <0x1d>;
+               reg = <0x0d00>;
+               ti,set-bit-to-disable;
+               ti,set-rate-parent;
+       };
+
+       dpll4_m5_ck: dpll4_m5_ck@f40 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&dpll4_ck>;
+               ti,max-div = <63>;
+               reg = <0x0f40>;
+               ti,index-starts-at-one;
+       };
+
+       dpll4_m5x2_mul_ck: dpll4_m5x2_mul_ck {
+               #clock-cells = <0>;
+               compatible = "ti,fixed-factor-clock";
+               clocks = <&dpll4_m5_ck>;
+               ti,clock-mult = <2>;
+               ti,clock-div = <1>;
+               ti,set-rate-parent;
+       };
+
+       dpll4_m5x2_ck: dpll4_m5x2_ck@d00 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&dpll4_m5x2_mul_ck>;
+               ti,bit-shift = <0x1e>;
+               reg = <0x0d00>;
+               ti,set-bit-to-disable;
+               ti,set-rate-parent;
+       };
+
+       dpll4_m6_ck: dpll4_m6_ck@1140 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&dpll4_ck>;
+               ti,bit-shift = <24>;
+               ti,max-div = <63>;
+               reg = <0x1140>;
+               ti,index-starts-at-one;
+       };
+
+       dpll4_m6x2_mul_ck: dpll4_m6x2_mul_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&dpll4_m6_ck>;
+               clock-mult = <2>;
+               clock-div = <1>;
+       };
+
+       dpll4_m6x2_ck: dpll4_m6x2_ck@d00 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&dpll4_m6x2_mul_ck>;
+               ti,bit-shift = <0x1f>;
+               reg = <0x0d00>;
+               ti,set-bit-to-disable;
+       };
+
+       emu_per_alwon_ck: emu_per_alwon_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&dpll4_m6x2_ck>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       clkout2_src_gate_ck: clkout2_src_gate_ck@d70 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-no-wait-gate-clock";
+               clocks = <&core_ck>;
+               ti,bit-shift = <7>;
+               reg = <0x0d70>;
+       };
+
+       clkout2_src_mux_ck: clkout2_src_mux_ck@d70 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-mux-clock";
+               clocks = <&core_ck>, <&sys_ck>, <&cm_96m_fck>, <&omap_54m_fck>;
+               reg = <0x0d70>;
+       };
+
+       clkout2_src_ck: clkout2_src_ck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&clkout2_src_gate_ck>, <&clkout2_src_mux_ck>;
+       };
+
+       sys_clkout2: sys_clkout2@d70 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&clkout2_src_ck>;
+               ti,bit-shift = <3>;
+               ti,max-div = <64>;
+               reg = <0x0d70>;
+               ti,index-power-of-two;
+       };
+
+       mpu_ck: mpu_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&dpll1_x2m2_ck>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       arm_fck: arm_fck@924 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&mpu_ck>;
+               reg = <0x0924>;
+               ti,max-div = <2>;
+       };
+
+       emu_mpu_alwon_ck: emu_mpu_alwon_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&mpu_ck>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       l3_ick: l3_ick@a40 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&core_ck>;
+               ti,max-div = <3>;
+               reg = <0x0a40>;
+               ti,index-starts-at-one;
+       };
+
+       l4_ick: l4_ick@a40 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&l3_ick>;
+               ti,bit-shift = <2>;
+               ti,max-div = <3>;
+               reg = <0x0a40>;
+               ti,index-starts-at-one;
+       };
+
+       rm_ick: rm_ick@c40 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&l4_ick>;
+               ti,bit-shift = <1>;
+               ti,max-div = <3>;
+               reg = <0x0c40>;
+               ti,index-starts-at-one;
+       };
+
+       gpt10_gate_fck: gpt10_gate_fck@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-gate-clock";
+               clocks = <&sys_ck>;
+               ti,bit-shift = <11>;
+               reg = <0x0a00>;
+       };
+
+       gpt10_mux_fck: gpt10_mux_fck@a40 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-mux-clock";
+               clocks = <&omap_32k_fck>, <&sys_ck>;
+               ti,bit-shift = <6>;
+               reg = <0x0a40>;
+       };
+
+       gpt10_fck: gpt10_fck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&gpt10_gate_fck>, <&gpt10_mux_fck>;
+       };
+
+       gpt11_gate_fck: gpt11_gate_fck@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-gate-clock";
+               clocks = <&sys_ck>;
+               ti,bit-shift = <12>;
+               reg = <0x0a00>;
+       };
+
+       gpt11_mux_fck: gpt11_mux_fck@a40 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-mux-clock";
+               clocks = <&omap_32k_fck>, <&sys_ck>;
+               ti,bit-shift = <7>;
+               reg = <0x0a40>;
+       };
+
+       gpt11_fck: gpt11_fck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&gpt11_gate_fck>, <&gpt11_mux_fck>;
+       };
+
+       core_96m_fck: core_96m_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&omap_96m_fck>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       mmchs2_fck: mmchs2_fck@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&core_96m_fck>;
+               reg = <0x0a00>;
+               ti,bit-shift = <25>;
+       };
+
+       mmchs1_fck: mmchs1_fck@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&core_96m_fck>;
+               reg = <0x0a00>;
+               ti,bit-shift = <24>;
+       };
+
+       i2c3_fck: i2c3_fck@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&core_96m_fck>;
+               reg = <0x0a00>;
+               ti,bit-shift = <17>;
+       };
+
+       i2c2_fck: i2c2_fck@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&core_96m_fck>;
+               reg = <0x0a00>;
+               ti,bit-shift = <16>;
+       };
+
+       i2c1_fck: i2c1_fck@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&core_96m_fck>;
+               reg = <0x0a00>;
+               ti,bit-shift = <15>;
+       };
+
+       mcbsp5_gate_fck: mcbsp5_gate_fck@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-gate-clock";
+               clocks = <&mcbsp_clks>;
+               ti,bit-shift = <10>;
+               reg = <0x0a00>;
+       };
+
+       mcbsp1_gate_fck: mcbsp1_gate_fck@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-gate-clock";
+               clocks = <&mcbsp_clks>;
+               ti,bit-shift = <9>;
+               reg = <0x0a00>;
+       };
+
+       core_48m_fck: core_48m_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&omap_48m_fck>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       mcspi4_fck: mcspi4_fck@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&core_48m_fck>;
+               reg = <0x0a00>;
+               ti,bit-shift = <21>;
+       };
+
+       mcspi3_fck: mcspi3_fck@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&core_48m_fck>;
+               reg = <0x0a00>;
+               ti,bit-shift = <20>;
+       };
+
+       mcspi2_fck: mcspi2_fck@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&core_48m_fck>;
+               reg = <0x0a00>;
+               ti,bit-shift = <19>;
+       };
+
+       mcspi1_fck: mcspi1_fck@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&core_48m_fck>;
+               reg = <0x0a00>;
+               ti,bit-shift = <18>;
+       };
+
+       uart2_fck: uart2_fck@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&core_48m_fck>;
+               reg = <0x0a00>;
+               ti,bit-shift = <14>;
+       };
+
+       uart1_fck: uart1_fck@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&core_48m_fck>;
+               reg = <0x0a00>;
+               ti,bit-shift = <13>;
+       };
+
+       core_12m_fck: core_12m_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&omap_12m_fck>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       hdq_fck: hdq_fck@a00 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&core_12m_fck>;
+               reg = <0x0a00>;
+               ti,bit-shift = <22>;
+       };
+
+       core_l3_ick: core_l3_ick {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&l3_ick>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       sdrc_ick: sdrc_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&core_l3_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <1>;
+       };
+
+       gpmc_fck: gpmc_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&core_l3_ick>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       core_l4_ick: core_l4_ick {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&l4_ick>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       mmchs2_ick: mmchs2_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <25>;
+       };
+
+       mmchs1_ick: mmchs1_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <24>;
+       };
+
+       hdq_ick: hdq_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <22>;
+       };
+
+       mcspi4_ick: mcspi4_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <21>;
+       };
+
+       mcspi3_ick: mcspi3_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <20>;
+       };
+
+       mcspi2_ick: mcspi2_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <19>;
+       };
+
+       mcspi1_ick: mcspi1_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <18>;
+       };
+
+       i2c3_ick: i2c3_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <17>;
+       };
+
+       i2c2_ick: i2c2_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <16>;
+       };
+
+       i2c1_ick: i2c1_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <15>;
+       };
+
+       uart2_ick: uart2_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <14>;
+       };
+
+       uart1_ick: uart1_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <13>;
+       };
+
+       gpt11_ick: gpt11_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <12>;
+       };
+
+       gpt10_ick: gpt10_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <11>;
+       };
+
+       mcbsp5_ick: mcbsp5_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <10>;
+       };
+
+       mcbsp1_ick: mcbsp1_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <9>;
+       };
+
+       omapctrl_ick: omapctrl_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <6>;
+       };
+
+       dss_tv_fck: dss_tv_fck@e00 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&omap_54m_fck>;
+               reg = <0x0e00>;
+               ti,bit-shift = <2>;
+       };
+
+       dss_96m_fck: dss_96m_fck@e00 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&omap_96m_fck>;
+               reg = <0x0e00>;
+               ti,bit-shift = <2>;
+       };
+
+       dss2_alwon_fck: dss2_alwon_fck@e00 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&sys_ck>;
+               reg = <0x0e00>;
+               ti,bit-shift = <1>;
+       };
+
+       dummy_ck: dummy_ck {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <0>;
+       };
+
+       gpt1_gate_fck: gpt1_gate_fck@c00 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-gate-clock";
+               clocks = <&sys_ck>;
+               ti,bit-shift = <0>;
+               reg = <0x0c00>;
+       };
+
+       gpt1_mux_fck: gpt1_mux_fck@c40 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-mux-clock";
+               clocks = <&omap_32k_fck>, <&sys_ck>;
+               reg = <0x0c40>;
+       };
+
+       gpt1_fck: gpt1_fck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&gpt1_gate_fck>, <&gpt1_mux_fck>;
+       };
+
+       aes2_ick: aes2_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               ti,bit-shift = <28>;
+               reg = <0x0a10>;
+       };
+
+       wkup_32k_fck: wkup_32k_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&omap_32k_fck>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       gpio1_dbck: gpio1_dbck@c00 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&wkup_32k_fck>;
+               reg = <0x0c00>;
+               ti,bit-shift = <3>;
+       };
+
+       sha12_ick: sha12_ick@a10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&core_l4_ick>;
+               reg = <0x0a10>;
+               ti,bit-shift = <27>;
+       };
+
+       wdt2_fck: wdt2_fck@c00 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&wkup_32k_fck>;
+               reg = <0x0c00>;
+               ti,bit-shift = <5>;
+       };
+
+       wdt2_ick: wdt2_ick@c10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&wkup_l4_ick>;
+               reg = <0x0c10>;
+               ti,bit-shift = <5>;
+       };
+
+       wdt1_ick: wdt1_ick@c10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&wkup_l4_ick>;
+               reg = <0x0c10>;
+               ti,bit-shift = <4>;
+       };
+
+       gpio1_ick: gpio1_ick@c10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&wkup_l4_ick>;
+               reg = <0x0c10>;
+               ti,bit-shift = <3>;
+       };
+
+       omap_32ksync_ick: omap_32ksync_ick@c10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&wkup_l4_ick>;
+               reg = <0x0c10>;
+               ti,bit-shift = <2>;
+       };
+
+       gpt12_ick: gpt12_ick@c10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&wkup_l4_ick>;
+               reg = <0x0c10>;
+               ti,bit-shift = <1>;
+       };
+
+       gpt1_ick: gpt1_ick@c10 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&wkup_l4_ick>;
+               reg = <0x0c10>;
+               ti,bit-shift = <0>;
+       };
+
+       per_96m_fck: per_96m_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&omap_96m_alwon_fck>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       per_48m_fck: per_48m_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&omap_48m_fck>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       uart3_fck: uart3_fck@1000 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&per_48m_fck>;
+               reg = <0x1000>;
+               ti,bit-shift = <11>;
+       };
+
+       gpt2_gate_fck: gpt2_gate_fck@1000 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-gate-clock";
+               clocks = <&sys_ck>;
+               ti,bit-shift = <3>;
+               reg = <0x1000>;
+       };
+
+       gpt2_mux_fck: gpt2_mux_fck@1040 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-mux-clock";
+               clocks = <&omap_32k_fck>, <&sys_ck>;
+               reg = <0x1040>;
+       };
+
+       gpt2_fck: gpt2_fck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&gpt2_gate_fck>, <&gpt2_mux_fck>;
+       };
+
+       gpt3_gate_fck: gpt3_gate_fck@1000 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-gate-clock";
+               clocks = <&sys_ck>;
+               ti,bit-shift = <4>;
+               reg = <0x1000>;
+       };
+
+       gpt3_mux_fck: gpt3_mux_fck@1040 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-mux-clock";
+               clocks = <&omap_32k_fck>, <&sys_ck>;
+               ti,bit-shift = <1>;
+               reg = <0x1040>;
+       };
+
+       gpt3_fck: gpt3_fck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&gpt3_gate_fck>, <&gpt3_mux_fck>;
+       };
+
+       gpt4_gate_fck: gpt4_gate_fck@1000 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-gate-clock";
+               clocks = <&sys_ck>;
+               ti,bit-shift = <5>;
+               reg = <0x1000>;
+       };
+
+       gpt4_mux_fck: gpt4_mux_fck@1040 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-mux-clock";
+               clocks = <&omap_32k_fck>, <&sys_ck>;
+               ti,bit-shift = <2>;
+               reg = <0x1040>;
+       };
+
+       gpt4_fck: gpt4_fck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&gpt4_gate_fck>, <&gpt4_mux_fck>;
+       };
+
+       gpt5_gate_fck: gpt5_gate_fck@1000 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-gate-clock";
+               clocks = <&sys_ck>;
+               ti,bit-shift = <6>;
+               reg = <0x1000>;
+       };
+
+       gpt5_mux_fck: gpt5_mux_fck@1040 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-mux-clock";
+               clocks = <&omap_32k_fck>, <&sys_ck>;
+               ti,bit-shift = <3>;
+               reg = <0x1040>;
+       };
+
+       gpt5_fck: gpt5_fck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&gpt5_gate_fck>, <&gpt5_mux_fck>;
+       };
+
+       gpt6_gate_fck: gpt6_gate_fck@1000 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-gate-clock";
+               clocks = <&sys_ck>;
+               ti,bit-shift = <7>;
+               reg = <0x1000>;
+       };
+
+       gpt6_mux_fck: gpt6_mux_fck@1040 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-mux-clock";
+               clocks = <&omap_32k_fck>, <&sys_ck>;
+               ti,bit-shift = <4>;
+               reg = <0x1040>;
+       };
+
+       gpt6_fck: gpt6_fck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&gpt6_gate_fck>, <&gpt6_mux_fck>;
+       };
+
+       gpt7_gate_fck: gpt7_gate_fck@1000 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-gate-clock";
+               clocks = <&sys_ck>;
+               ti,bit-shift = <8>;
+               reg = <0x1000>;
+       };
+
+       gpt7_mux_fck: gpt7_mux_fck@1040 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-mux-clock";
+               clocks = <&omap_32k_fck>, <&sys_ck>;
+               ti,bit-shift = <5>;
+               reg = <0x1040>;
+       };
+
+       gpt7_fck: gpt7_fck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&gpt7_gate_fck>, <&gpt7_mux_fck>;
+       };
+
+       gpt8_gate_fck: gpt8_gate_fck@1000 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-gate-clock";
+               clocks = <&sys_ck>;
+               ti,bit-shift = <9>;
+               reg = <0x1000>;
+       };
+
+       gpt8_mux_fck: gpt8_mux_fck@1040 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-mux-clock";
+               clocks = <&omap_32k_fck>, <&sys_ck>;
+               ti,bit-shift = <6>;
+               reg = <0x1040>;
+       };
+
+       gpt8_fck: gpt8_fck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&gpt8_gate_fck>, <&gpt8_mux_fck>;
+       };
+
+       gpt9_gate_fck: gpt9_gate_fck@1000 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-gate-clock";
+               clocks = <&sys_ck>;
+               ti,bit-shift = <10>;
+               reg = <0x1000>;
+       };
+
+       gpt9_mux_fck: gpt9_mux_fck@1040 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-mux-clock";
+               clocks = <&omap_32k_fck>, <&sys_ck>;
+               ti,bit-shift = <7>;
+               reg = <0x1040>;
+       };
+
+       gpt9_fck: gpt9_fck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-clock";
+               clocks = <&gpt9_gate_fck>, <&gpt9_mux_fck>;
+       };
+
+       per_32k_alwon_fck: per_32k_alwon_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&omap_32k_fck>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       gpio6_dbck: gpio6_dbck@1000 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&per_32k_alwon_fck>;
+               reg = <0x1000>;
+               ti,bit-shift = <17>;
+       };
+
+       gpio5_dbck: gpio5_dbck@1000 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&per_32k_alwon_fck>;
+               reg = <0x1000>;
+               ti,bit-shift = <16>;
+       };
+
+       gpio4_dbck: gpio4_dbck@1000 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&per_32k_alwon_fck>;
+               reg = <0x1000>;
+               ti,bit-shift = <15>;
+       };
+
+       gpio3_dbck: gpio3_dbck@1000 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&per_32k_alwon_fck>;
+               reg = <0x1000>;
+               ti,bit-shift = <14>;
+       };
+
+       gpio2_dbck: gpio2_dbck@1000 {
+               #clock-cells = <0>;
+               compatible = "ti,gate-clock";
+               clocks = <&per_32k_alwon_fck>;
+               reg = <0x1000>;
+               ti,bit-shift = <13>;
+       };
+
+       wdt3_fck: wdt3_fck@1000 {
+               #clock-cells = <0>;
+               compatible = "ti,wait-gate-clock";
+               clocks = <&per_32k_alwon_fck>;
+               reg = <0x1000>;
+               ti,bit-shift = <12>;
+       };
+
+       per_l4_ick: per_l4_ick {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&l4_ick>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       gpio6_ick: gpio6_ick@1010 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&per_l4_ick>;
+               reg = <0x1010>;
+               ti,bit-shift = <17>;
+       };
+
+       gpio5_ick: gpio5_ick@1010 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&per_l4_ick>;
+               reg = <0x1010>;
+               ti,bit-shift = <16>;
+       };
+
+       gpio4_ick: gpio4_ick@1010 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&per_l4_ick>;
+               reg = <0x1010>;
+               ti,bit-shift = <15>;
+       };
+
+       gpio3_ick: gpio3_ick@1010 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&per_l4_ick>;
+               reg = <0x1010>;
+               ti,bit-shift = <14>;
+       };
+
+       gpio2_ick: gpio2_ick@1010 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&per_l4_ick>;
+               reg = <0x1010>;
+               ti,bit-shift = <13>;
+       };
+
+       wdt3_ick: wdt3_ick@1010 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&per_l4_ick>;
+               reg = <0x1010>;
+               ti,bit-shift = <12>;
+       };
+
+       uart3_ick: uart3_ick@1010 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&per_l4_ick>;
+               reg = <0x1010>;
+               ti,bit-shift = <11>;
+       };
+
+       uart4_ick: uart4_ick@1010 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&per_l4_ick>;
+               reg = <0x1010>;
+               ti,bit-shift = <18>;
+       };
+
+       gpt9_ick: gpt9_ick@1010 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&per_l4_ick>;
+               reg = <0x1010>;
+               ti,bit-shift = <10>;
+       };
+
+       gpt8_ick: gpt8_ick@1010 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&per_l4_ick>;
+               reg = <0x1010>;
+               ti,bit-shift = <9>;
+       };
+
+       gpt7_ick: gpt7_ick@1010 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&per_l4_ick>;
+               reg = <0x1010>;
+               ti,bit-shift = <8>;
+       };
+
+       gpt6_ick: gpt6_ick@1010 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&per_l4_ick>;
+               reg = <0x1010>;
+               ti,bit-shift = <7>;
+       };
+
+       gpt5_ick: gpt5_ick@1010 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&per_l4_ick>;
+               reg = <0x1010>;
+               ti,bit-shift = <6>;
+       };
+
+       gpt4_ick: gpt4_ick@1010 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&per_l4_ick>;
+               reg = <0x1010>;
+               ti,bit-shift = <5>;
+       };
+
+       gpt3_ick: gpt3_ick@1010 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&per_l4_ick>;
+               reg = <0x1010>;
+               ti,bit-shift = <4>;
+       };
+
+       gpt2_ick: gpt2_ick@1010 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&per_l4_ick>;
+               reg = <0x1010>;
+               ti,bit-shift = <3>;
+       };
+
+       mcbsp2_ick: mcbsp2_ick@1010 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&per_l4_ick>;
+               reg = <0x1010>;
+               ti,bit-shift = <0>;
+       };
+
+       mcbsp3_ick: mcbsp3_ick@1010 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&per_l4_ick>;
+               reg = <0x1010>;
+               ti,bit-shift = <1>;
+       };
+
+       mcbsp4_ick: mcbsp4_ick@1010 {
+               #clock-cells = <0>;
+               compatible = "ti,omap3-interface-clock";
+               clocks = <&per_l4_ick>;
+               reg = <0x1010>;
+               ti,bit-shift = <2>;
+       };
+
+       mcbsp2_gate_fck: mcbsp2_gate_fck@1000 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-gate-clock";
+               clocks = <&mcbsp_clks>;
+               ti,bit-shift = <0>;
+               reg = <0x1000>;
+       };
+
+       mcbsp3_gate_fck: mcbsp3_gate_fck@1000 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-gate-clock";
+               clocks = <&mcbsp_clks>;
+               ti,bit-shift = <1>;
+               reg = <0x1000>;
+       };
+
+       mcbsp4_gate_fck: mcbsp4_gate_fck@1000 {
+               #clock-cells = <0>;
+               compatible = "ti,composite-gate-clock";
+               clocks = <&mcbsp_clks>;
+               ti,bit-shift = <2>;
+               reg = <0x1000>;
+       };
+
+       emu_src_mux_ck: emu_src_mux_ck@1140 {
+               #clock-cells = <0>;
+               compatible = "ti,mux-clock";
+               clocks = <&sys_ck>, <&emu_core_alwon_ck>, <&emu_per_alwon_ck>, <&emu_mpu_alwon_ck>;
+               reg = <0x1140>;
+       };
+
+       emu_src_ck: emu_src_ck {
+               #clock-cells = <0>;
+               compatible = "ti,clkdm-gate-clock";
+               clocks = <&emu_src_mux_ck>;
+       };
+
+       pclk_fck: pclk_fck@1140 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&emu_src_ck>;
+               ti,bit-shift = <8>;
+               ti,max-div = <7>;
+               reg = <0x1140>;
+               ti,index-starts-at-one;
+       };
+
+       pclkx2_fck: pclkx2_fck@1140 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&emu_src_ck>;
+               ti,bit-shift = <6>;
+               ti,max-div = <3>;
+               reg = <0x1140>;
+               ti,index-starts-at-one;
+       };
+
+       atclk_fck: atclk_fck@1140 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&emu_src_ck>;
+               ti,bit-shift = <4>;
+               ti,max-div = <3>;
+               reg = <0x1140>;
+               ti,index-starts-at-one;
+       };
+
+       traceclk_src_fck: traceclk_src_fck@1140 {
+               #clock-cells = <0>;
+               compatible = "ti,mux-clock";
+               clocks = <&sys_ck>, <&emu_core_alwon_ck>, <&emu_per_alwon_ck>, <&emu_mpu_alwon_ck>;
+               ti,bit-shift = <2>;
+               reg = <0x1140>;
+       };
+
+       traceclk_fck: traceclk_fck@1140 {
+               #clock-cells = <0>;
+               compatible = "ti,divider-clock";
+               clocks = <&traceclk_src_fck>;
+               ti,bit-shift = <11>;
+               ti,max-div = <7>;
+               reg = <0x1140>;
+               ti,index-starts-at-one;
+       };
+
+       secure_32k_fck: secure_32k_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <32768>;
+       };
+
+       gpt12_fck: gpt12_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&secure_32k_fck>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+
+       wdt1_fck: wdt1_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&secure_32k_fck>;
+               clock-mult = <1>;
+               clock-div = <1>;
+       };
+};
+
+&cm_clockdomains {
+       core_l3_clkdm: core_l3_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&sdrc_ick>;
+       };
+
+       dpll3_clkdm: dpll3_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&dpll3_ck>;
+       };
+
+       dpll1_clkdm: dpll1_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&dpll1_ck>;
+       };
+
+       per_clkdm: per_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&uart3_fck>, <&gpio6_dbck>, <&gpio5_dbck>,
+                        <&gpio4_dbck>, <&gpio3_dbck>, <&gpio2_dbck>,
+                        <&wdt3_fck>, <&gpio6_ick>, <&gpio5_ick>, <&gpio4_ick>,
+                        <&gpio3_ick>, <&gpio2_ick>, <&wdt3_ick>, <&uart3_ick>,
+                        <&uart4_ick>, <&gpt9_ick>, <&gpt8_ick>, <&gpt7_ick>,
+                        <&gpt6_ick>, <&gpt5_ick>, <&gpt4_ick>, <&gpt3_ick>,
+                        <&gpt2_ick>, <&mcbsp2_ick>, <&mcbsp3_ick>,
+                        <&mcbsp4_ick>;
+       };
+
+       emu_clkdm: emu_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&emu_src_ck>;
+       };
+
+       dpll4_clkdm: dpll4_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&dpll4_ck>;
+       };
+
+       wkup_clkdm: wkup_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&gpio1_dbck>, <&wdt2_fck>, <&wdt2_ick>, <&wdt1_ick>,
+                        <&gpio1_ick>, <&omap_32ksync_ick>, <&gpt12_ick>,
+                        <&gpt1_ick>;
+       };
+
+       dss_clkdm: dss_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&dss_tv_fck>, <&dss_96m_fck>, <&dss2_alwon_fck>;
+       };
+
+       core_l4_clkdm: core_l4_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&mmchs2_fck>, <&mmchs1_fck>, <&i2c3_fck>, <&i2c2_fck>,
+                        <&i2c1_fck>, <&mcspi4_fck>, <&mcspi3_fck>,
+                        <&mcspi2_fck>, <&mcspi1_fck>, <&uart2_fck>,
+                        <&uart1_fck>, <&hdq_fck>, <&mmchs2_ick>, <&mmchs1_ick>,
+                        <&hdq_ick>, <&mcspi4_ick>, <&mcspi3_ick>,
+                        <&mcspi2_ick>, <&mcspi1_ick>, <&i2c3_ick>, <&i2c2_ick>,
+                        <&i2c1_ick>, <&uart2_ick>, <&uart1_ick>, <&gpt11_ick>,
+                        <&gpt10_ick>, <&mcbsp5_ick>, <&mcbsp1_ick>,
+                        <&omapctrl_ick>, <&aes2_ick>, <&sha12_ick>;
+       };
+};
index 6305f570c500db5860efbf7fbf33489e51e6d1e0..92473143b956dab2d548d8b527456af3396fd779 100644 (file)
 /{
        ocp {
                u-boot,dm-pre-reloc;
+
+               ocp2scp@4a090000 {
+                       compatible = "ti,omap-ocp2scp", "simple-bus";
+               };
        };
 };
 
index 4960f3367c26828f2c3ca8d9f55e7d33c8bfeb1c..a84156fe1468ff5d1f6737432929f59c6c168cac 100644 (file)
                regulator-always-on;
                vin-supply = <&vcc_5v>;
        };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               power-supply = <&vcc_sys>;
+               enable-gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;
+               brightness-levels = <
+                         0   1   2   3   4   5   6   7
+                         8   9  10  11  12  13  14  15
+                        16  17  18  19  20  21  22  23
+                        24  25  26  27  28  29  30  31
+                        32  33  34  35  36  37  38  39
+                        40  41  42  43  44  45  46  47
+                        48  49  50  51  52  53  54  55
+                        56  57  58  59  60  61  62  63
+                        64  65  66  67  68  69  70  71
+                        72  73  74  75  76  77  78  79
+                        80  81  82  83  84  85  86  87
+                        88  89  90  91  92  93  94  95
+                        96  97  98  99 100 101 102 103
+                       104 105 106 107 108 109 110 111
+                       112 113 114 115 116 117 118 119
+                       120 121 122 123 124 125 126 127
+                       128 129 130 131 132 133 134 135
+                       136 137 138 139 140 141 142 143
+                       144 145 146 147 148 149 150 151
+                       152 153 154 155 156 157 158 159
+                       160 161 162 163 164 165 166 167
+                       168 169 170 171 172 173 174 175
+                       176 177 178 179 180 181 182 183
+                       184 185 186 187 188 189 190 191
+                       192 193 194 195 196 197 198 199
+                       200 201 202 203 204 205 206 207
+                       208 209 210 211 212 213 214 215
+                       216 217 218 219 220 221 222 223
+                       224 225 226 227 228 229 230 231
+                       232 233 234 235 236 237 238 239
+                       240 241 242 243 244 245 246 247
+                       248 249 250 251 252 253 254 255>;
+               default-brightness-level = <50>;
+               pwms = <&pwm0 0 25000 0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm0_pin>;
+               pwm-delay-us = <10000>;
+               status = "disabled";
+       };
+
+       panel: panel {
+               compatible = "simple-panel";
+               power-supply = <&vcc_io>;
+               backlight = <&backlight>;
+               enable-gpios = <&gpio7 3 GPIO_ACTIVE_HIGH>;
+               status = "disabled";
+       };
 };
 
 &cpu0 {
        };
 };
 
+&pwm0 {
+       status = "okay";
+};
+
 &saradc {
        vref-supply = <&vcc_18>;
        status = "okay";
        status = "okay";
 };
 
+&mipi_dsi0 {
+       status = "disabled";
+       rockchip,panel = <&panel>;
+       display-timings {
+               timing0 {
+               bits-per-pixel = <24>;
+               clock-frequency = <160000000>;
+               hfront-porch = <120>;
+               hsync-len = <20>;
+               hback-porch = <21>;
+               hactive = <1200>;
+               vfront-porch = <21>;
+               vsync-len = <3>;
+               vback-porch = <18>;
+               vactive = <1920>;
+               hsync-active = <0>;
+               vsync-active = <0>;
+               de-active = <1>;
+               pixelclk-active = <0>;
+               };
+       };
+};
+
 &wdt {
        status = "okay";
 };
index 22881cb7857618842119d96f170304962afe4522..ea2f7159220c134b344ae98e6658a3b000b3e641 100644 (file)
 &gpio8 {
        u-boot,dm-pre-reloc;
 };
+
+&i2c2 {
+    m24c08@50 {
+        compatible = "at,24c08", "i2c-eeprom";
+        reg = <0x50>;
+    };
+};
index bcf051a9d9b374b31aed4ec7894c6d466851c551..64aa07de36971189183c5c9cf64442109efe13b1 100644 (file)
        };
 
        vopb: vop@ff930000 {
+               u-boot,dm-pre-reloc;
                compatible = "rockchip,rk3288-vop";
                reg = <0xff930000 0x19c>;
                interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
                                reg = <2>;
                                remote-endpoint = <&lvds_in_vopb>;
                        };
+                       vopb_out_mipi: endpoint@3 {
+                               reg = <3>;
+                               remote-endpoint = <&mipi_in_vopb>;
+                       };
+
                };
        };
 
                                reg = <2>;
                                remote-endpoint = <&lvds_in_vopl>;
                        };
+                       vopl_out_mipi: endpoint@3 {
+                               reg = <3>;
+                               remote-endpoint = <&mipi_in_vopl>;
+                       };
+
                };
        };
 
                };
        };
 
+       mipi_dsi0: mipi@ff960000 {
+               compatible = "rockchip,rk3288_mipi_dsi";
+               reg = <0xff960000 0x4000>;
+               clocks = <&cru PCLK_MIPI_DSI0>;
+               clock-names = "pclk_mipi";
+               /*pinctrl-names = "default";
+               pinctrl-0 = <&lcdc0_ctl>;*/
+               rockchip,grf = <&grf>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <1>;
+                       mipi_in: port {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               mipi_in_vopb: endpoint@0 {
+                                       reg = <0>;
+                                       remote-endpoint = <&vopb_out_mipi>;
+                               };
+                               mipi_in_vopl: endpoint@1 {
+                                       reg = <1>;
+                                       remote-endpoint = <&vopl_out_mipi>;
+                               };
+                       };
+               };
+       };
+
        hdmi_audio: hdmi_audio {
                compatible = "rockchip,rk3288-hdmi-audio";
                i2s-controller = <&i2s>;
index e1f867b600e3e12400c1d6b80254b2f370ffab19..f5af75bff448addbd7e8891254314ec3825eebf3 100644 (file)
@@ -6,6 +6,7 @@
 
 /dts-v1/;
 #include <dt-bindings/pwm/pwm.h>
+#include <dt-bindings/pinctrl/rockchip.h>
 #include "rk3399.dtsi"
 #include "rk3399-sdram-lpddr3-4GB-1600.dtsi"
 
@@ -20,7 +21,7 @@
 
        vdd_center: vdd-center {
                compatible = "pwm-regulator";
-               pwms = <&pwm3 0 25000 0>;
+               pwms = <&pwm3 0 25000 1>;
                regulator-name = "vdd_center";
                regulator-min-microvolt = <800000>;
                regulator-max-microvolt = <1400000>;
                gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>;
        };
 
+       clkin_gmac: external-gmac-clock {
+               compatible = "fixed-clock";
+               clock-frequency = <125000000>;
+               clock-output-names = "clkin_gmac";
+               #clock-cells = <0>;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               power-supply = <&vccsys>;
+               enable-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
+               brightness-levels = <
+                         0   1   2   3   4   5   6   7
+                         8   9  10  11  12  13  14  15
+                        16  17  18  19  20  21  22  23
+                        24  25  26  27  28  29  30  31
+                        32  33  34  35  36  37  38  39
+                        40  41  42  43  44  45  46  47
+                        48  49  50  51  52  53  54  55
+                        56  57  58  59  60  61  62  63
+                        64  65  66  67  68  69  70  71
+                        72  73  74  75  76  77  78  79
+                        80  81  82  83  84  85  86  87
+                        88  89  90  91  92  93  94  95
+                        96  97  98  99 100 101 102 103
+                       104 105 106 107 108 109 110 111
+                       112 113 114 115 116 117 118 119
+                       120 121 122 123 124 125 126 127
+                       128 129 130 131 132 133 134 135
+                       136 137 138 139 140 141 142 143
+                       144 145 146 147 148 149 150 151
+                       152 153 154 155 156 157 158 159
+                       160 161 162 163 164 165 166 167
+                       168 169 170 171 172 173 174 175
+                       176 177 178 179 180 181 182 183
+                       184 185 186 187 188 189 190 191
+                       192 193 194 195 196 197 198 199
+                       200 201 202 203 204 205 206 207
+                       208 209 210 211 212 213 214 215
+                       216 217 218 219 220 221 222 223
+                       224 225 226 227 228 229 230 231
+                       232 233 234 235 236 237 238 239
+                       240 241 242 243 244 245 246 247
+                       248 249 250 251 252 253 254 255>;
+               default-brightness-level = <200>;
+               pwms = <&pwm0 0 25000 0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm0_pin>;
+               pwm-delay-us = <10000>;
+               status = "disabled";
+       };
+
+       panel:panel {
+               compatible = "simple-panel";
+               power-supply = <&vcc33_lcd>;
+               backlight = <&backlight>;
+               /*enable-gpios = <&gpio4 18 GPIO_ACTIVE_HIGH>;*/
+               status = "disabled";
+       };
 };
 
 &emmc_phy {
                status = "okay";
 
                vcc12-supply = <&vcc3v3_sys>;
+
                regulators {
                        vcc33_lcd: SWITCH_REG2 {
                                regulator-always-on;
        };
 };
 
+&mipi_dsi {
+       status = "disabled";
+       rockchip,panel = <&panel>;
+       display-timings {
+               timing0 {
+               bits-per-pixel = <24>;
+               clock-frequency = <160000000>;
+               hfront-porch = <120>;
+               hsync-len = <20>;
+               hback-porch = <21>;
+               hactive = <1200>;
+               vfront-porch = <21>;
+               vsync-len = <3>;
+               vback-porch = <18>;
+               vactive = <1920>;
+               hsync-active = <0>;
+               vsync-active = <0>;
+               de-active = <1>;
+               pixelclk-active = <0>;
+               };
+       };
+};
+
 &pinctrl {
        pmic {
                pmic_int_l: pmic-int-l {
                };
        };
 };
+
+&gmac {
+        phy-supply = <&vcc_phy>;
+       phy-mode = "rgmii";
+       clock_in_out = "input";
+       snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
+       snps,reset-active-low;
+       snps,reset-delays-us = <0 10000 50000>;
+       assigned-clocks = <&cru SCLK_RMII_SRC>;
+       assigned-clock-parents = <&clkin_gmac>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&rgmii_pins>;
+       tx_delay = <0x10>;
+       rx_delay = <0x10>;
+       status = "okay";
+};
+
+&gmac {
+        phy-supply = <&vcc_phy>;
+       phy-mode = "rgmii";
+       clock_in_out = "input";
+       snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
+       snps,reset-active-low;
+       snps,reset-delays-us = <0 10000 50000>;
+       assigned-clocks = <&cru SCLK_RMII_SRC>;
+       assigned-clock-parents = <&clkin_gmac>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&rgmii_pins>;
+       tx_delay = <0x10>;
+       rx_delay = <0x10>;
+       status = "okay";
+};
diff --git a/arch/arm/dts/rk3399-firefly.dts b/arch/arm/dts/rk3399-firefly.dts
new file mode 100644 (file)
index 0000000..edf48fb
--- /dev/null
@@ -0,0 +1,660 @@
+/*
+ * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+
+/dts-v1/;
+#include <dt-bindings/pwm/pwm.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include "rk3399.dtsi"
+#include "rk3399-sdram-ddr3-1333.dtsi"
+
+/ {
+       model = "Firefly-RK3399 Board";
+       compatible = "firefly,firefly-rk3399", "rockchip,rk3399";
+
+       chosen {
+               stdout-path = &uart2;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               enable-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
+               pwms = <&pwm0 0 25000 0>;
+               brightness-levels = <
+                         0   1   2   3   4   5   6   7
+                         8   9  10  11  12  13  14  15
+                        16  17  18  19  20  21  22  23
+                        24  25  26  27  28  29  30  31
+                        32  33  34  35  36  37  38  39
+                        40  41  42  43  44  45  46  47
+                        48  49  50  51  52  53  54  55
+                        56  57  58  59  60  61  62  63
+                        64  65  66  67  68  69  70  71
+                        72  73  74  75  76  77  78  79
+                        80  81  82  83  84  85  86  87
+                        88  89  90  91  92  93  94  95
+                        96  97  98  99 100 101 102 103
+                       104 105 106 107 108 109 110 111
+                       112 113 114 115 116 117 118 119
+                       120 121 122 123 124 125 126 127
+                       128 129 130 131 132 133 134 135
+                       136 137 138 139 140 141 142 143
+                       144 145 146 147 148 149 150 151
+                       152 153 154 155 156 157 158 159
+                       160 161 162 163 164 165 166 167
+                       168 169 170 171 172 173 174 175
+                       176 177 178 179 180 181 182 183
+                       184 185 186 187 188 189 190 191
+                       192 193 194 195 196 197 198 199
+                       200 201 202 203 204 205 206 207
+                       208 209 210 211 212 213 214 215
+                       216 217 218 219 220 221 222 223
+                       224 225 226 227 228 229 230 231
+                       232 233 234 235 236 237 238 239
+                       240 241 242 243 244 245 246 247
+                       248 249 250 251 252 253 254 255>;
+               default-brightness-level = <200>;
+       };
+
+       clkin_gmac: external-gmac-clock {
+               compatible = "fixed-clock";
+               clock-frequency = <125000000>;
+               clock-output-names = "clkin_gmac";
+               #clock-cells = <0>;
+       };
+
+       rt5640-sound {
+               compatible = "simple-audio-card";
+               simple-audio-card,name = "rockchip,rt5640-codec";
+               simple-audio-card,format = "i2s";
+               simple-audio-card,mclk-fs = <256>;
+               simple-audio-card,widgets =
+                       "Microphone", "Mic Jack",
+                       "Headphone", "Headphone Jack";
+               simple-audio-card,routing =
+                       "Mic Jack", "MICBIAS1",
+                       "IN1P", "Mic Jack",
+                       "Headphone Jack", "HPOL",
+                       "Headphone Jack", "HPOR";
+
+               simple-audio-card,cpu {
+                       sound-dai = <&i2s1>;
+               };
+
+               simple-audio-card,codec {
+                       sound-dai = <&rt5640>;
+               };
+       };
+
+       sdio_pwrseq: sdio-pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               clocks = <&rk808 1>;
+               clock-names = "ext_clock";
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_enable_h>;
+
+               /*
+                * On the module itself this is one of these (depending
+                * on the actual card populated):
+                * - SDIO_RESET_L_WL_REG_ON
+                * - PDN (power down when low)
+                */
+               reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
+       };
+
+       vcc3v3_pcie: vcc3v3-pcie-regulator {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pcie_drv>;
+               regulator-name = "vcc3v3_pcie";
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       vcc3v3_sys: vcc3v3-sys {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc3v3_sys";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       vcc5v0_host: vcc5v0-host-regulator {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&host_vbus_drv>;
+               regulator-name = "vcc5v0_host";
+               regulator-always-on;
+       };
+
+       vcc5v0_sys: vcc5v0-sys {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc5v0_sys";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+       };
+
+       vcc_phy: vcc-phy-regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc_phy";
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       vdd_log: vdd-log {
+               compatible = "pwm-regulator";
+               pwms = <&pwm2 0 25000 1>;
+               regulator-name = "vdd_log";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <800000>;
+               regulator-max-microvolt = <1400000>;
+       };
+
+       vccadc_ref: vccadc-ref {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc1v8_sys";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+       };
+};
+
+&cpu_l0 {
+       cpu-supply = <&vdd_cpu_l>;
+};
+
+&cpu_l1 {
+       cpu-supply = <&vdd_cpu_l>;
+};
+
+&cpu_l2 {
+       cpu-supply = <&vdd_cpu_l>;
+};
+
+&cpu_l3 {
+       cpu-supply = <&vdd_cpu_l>;
+};
+
+&cpu_b0 {
+       cpu-supply = <&vdd_cpu_b>;
+};
+
+&cpu_b1 {
+       cpu-supply = <&vdd_cpu_b>;
+};
+
+&emmc_phy {
+       status = "okay";
+};
+
+&gmac {
+       assigned-clocks = <&cru SCLK_RMII_SRC>;
+       assigned-clock-parents = <&clkin_gmac>;
+       clock_in_out = "input";
+       phy-supply = <&vcc_phy>;
+       phy-mode = "rgmii";
+       pinctrl-names = "default";
+       pinctrl-0 = <&rgmii_pins>;
+       snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
+       snps,reset-active-low;
+       snps,reset-delays-us = <0 10000 50000>;
+       tx_delay = <0x28>;
+       rx_delay = <0x11>;
+       status = "okay";
+};
+
+&i2c0 {
+       clock-frequency = <400000>;
+       i2c-scl-rising-time-ns = <168>;
+       i2c-scl-falling-time-ns = <4>;
+       status = "okay";
+
+       rk808: pmic@1b {
+               compatible = "rockchip,rk808";
+               reg = <0x1b>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
+               #clock-cells = <1>;
+               clock-output-names = "xin32k", "rk808-clkout2";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pmic_int_l>;
+               rockchip,system-power-controller;
+               wakeup-source;
+
+               vcc1-supply = <&vcc3v3_sys>;
+               vcc2-supply = <&vcc3v3_sys>;
+               vcc3-supply = <&vcc3v3_sys>;
+               vcc4-supply = <&vcc3v3_sys>;
+               vcc6-supply = <&vcc3v3_sys>;
+               vcc7-supply = <&vcc3v3_sys>;
+               vcc8-supply = <&vcc3v3_sys>;
+               vcc9-supply = <&vcc3v3_sys>;
+               vcc10-supply = <&vcc3v3_sys>;
+               vcc11-supply = <&vcc3v3_sys>;
+               vcc12-supply = <&vcc3v3_sys>;
+               vddio-supply = <&vcc1v8_pmu>;
+
+               regulators {
+                       vdd_center: DCDC_REG1 {
+                               regulator-name = "vdd_center";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <750000>;
+                               regulator-max-microvolt = <1350000>;
+                               regulator-ramp-delay = <6001>;
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+
+                       vdd_cpu_l: DCDC_REG2 {
+                               regulator-name = "vdd_cpu_l";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <750000>;
+                               regulator-max-microvolt = <1350000>;
+                               regulator-ramp-delay = <6001>;
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+
+                       vcc_ddr: DCDC_REG3 {
+                               regulator-name = "vcc_ddr";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                               };
+                       };
+
+                       vcc_1v8: DCDC_REG4 {
+                               regulator-name = "vcc_1v8";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1800000>;
+                               };
+                       };
+
+                       vcc1v8_dvp: LDO_REG1 {
+                               regulator-name = "vcc1v8_dvp";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+
+                       vcc3v0_tp: LDO_REG2 {
+                               regulator-name = "vcc3v0_tp";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <3000000>;
+                               regulator-max-microvolt = <3000000>;
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+
+                       vcc1v8_pmu: LDO_REG3 {
+                               regulator-name = "vcc1v8_pmu";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1800000>;
+                               };
+                       };
+
+                       vcc_sd: LDO_REG4 {
+                               regulator-name = "vcc_sd";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3300000>;
+                               };
+                       };
+
+                       vcca3v0_codec: LDO_REG5 {
+                               regulator-name = "vcca3v0_codec";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <3000000>;
+                               regulator-max-microvolt = <3000000>;
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+
+                       vcc_1v5: LDO_REG6 {
+                               regulator-name = "vcc_1v5";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1500000>;
+                               regulator-max-microvolt = <1500000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1500000>;
+                               };
+                       };
+
+                       vcca1v8_codec: LDO_REG7 {
+                               regulator-name = "vcca1v8_codec";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+
+                       vcc_3v0: LDO_REG8 {
+                               regulator-name = "vcc_3v0";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <3000000>;
+                               regulator-max-microvolt = <3000000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3000000>;
+                               };
+                       };
+
+                       vcc3v3_s3: SWITCH_REG1 {
+                               regulator-name = "vcc3v3_s3";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+
+                       vcc3v3_s0: SWITCH_REG2 {
+                               regulator-name = "vcc3v3_s0";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+               };
+       };
+
+       vdd_cpu_b: regulator@40 {
+               compatible = "silergy,syr827";
+               reg = <0x40>;
+               fcs,suspend-voltage-selector = <0>;
+               regulator-name = "vdd_cpu_b";
+               regulator-min-microvolt = <712500>;
+               regulator-max-microvolt = <1500000>;
+               regulator-ramp-delay = <1000>;
+               regulator-always-on;
+               regulator-boot-on;
+               vin-supply = <&vcc5v0_sys>;
+
+               regulator-state-mem {
+                       regulator-off-in-suspend;
+               };
+       };
+
+       vdd_gpu: regulator@41 {
+               compatible = "silergy,syr828";
+               reg = <0x41>;
+               fcs,suspend-voltage-selector = <1>;
+               regulator-name = "vdd_gpu";
+               regulator-min-microvolt = <712500>;
+               regulator-max-microvolt = <1500000>;
+               regulator-ramp-delay = <1000>;
+               regulator-always-on;
+               regulator-boot-on;
+               vin-supply = <&vcc5v0_sys>;
+
+               regulator-state-mem {
+                       regulator-off-in-suspend;
+               };
+       };
+};
+
+&i2c1 {
+       i2c-scl-rising-time-ns = <300>;
+       i2c-scl-falling-time-ns = <15>;
+       status = "okay";
+
+       rt5640: rt5640@1c {
+               compatible = "realtek,rt5640";
+               reg = <0x1c>;
+               clocks = <&cru SCLK_I2S_8CH_OUT>;
+               clock-names = "mclk";
+               realtek,in1-differential;
+               #sound-dai-cells = <0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&rt5640_hpcon>;
+       };
+};
+
+&i2c3 {
+       i2c-scl-rising-time-ns = <450>;
+       i2c-scl-falling-time-ns = <15>;
+       status = "okay";
+};
+
+&i2c4 {
+       i2c-scl-rising-time-ns = <600>;
+       i2c-scl-falling-time-ns = <20>;
+       status = "okay";
+
+       accelerometer@68 {
+               compatible = "invensense,mpu6500";
+               reg = <0x68>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <RK_PC6 IRQ_TYPE_EDGE_RISING>;
+       };
+};
+
+&i2s0 {
+       rockchip,playback-channels = <8>;
+       rockchip,capture-channels = <8>;
+       #sound-dai-cells = <0>;
+       status = "okay";
+};
+
+&i2s1 {
+       rockchip,playback-channels = <2>;
+       rockchip,capture-channels = <2>;
+       #sound-dai-cells = <0>;
+       status = "okay";
+};
+
+&i2s2 {
+       #sound-dai-cells = <0>;
+       status = "okay";
+};
+
+&io_domains {
+       status = "okay";
+
+       bt656-supply = <&vcc1v8_dvp>;
+       audio-supply = <&vcca1v8_codec>;
+       sdmmc-supply = <&vcc_sd>;
+       gpio1830-supply = <&vcc_3v0>;
+};
+
+&pcie_phy {
+       status = "okay";
+};
+
+&pcie0 {
+       ep-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
+       num-lanes = <4>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pcie_clkreqn>;
+       status = "okay";
+};
+
+&pmu_io_domains {
+       pmu1830-supply = <&vcc_3v0>;
+       status = "okay";
+};
+
+&pinctrl {
+       buttons {
+               pwrbtn: pwrbtn {
+                       rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+       };
+
+       lcd-panel {
+               lcd_panel_reset: lcd-panel-reset {
+                       rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+       };
+
+       pcie {
+               pcie_drv: pcie-drv {
+                       rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+
+               pcie_3g_drv: pcie-3g-drv {
+                       rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+       };
+
+       pmic {
+               vsel1_gpio: vsel1-gpio {
+                       rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
+               };
+
+               vsel2_gpio: vsel2-gpio {
+                       rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
+               };
+       };
+
+       sdio-pwrseq {
+               wifi_enable_h: wifi-enable-h {
+                       rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
+       rt5640 {
+               rt5640_hpcon: rt5640-hpcon {
+                       rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
+       pmic {
+               pmic_int_l: pmic-int-l {
+                       rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+       };
+
+       usb2 {
+               host_vbus_drv: host-vbus-drv {
+                       rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+};
+
+&pwm0 {
+       status = "okay";
+};
+
+&pwm2 {
+       status = "okay";
+};
+
+&saradc {
+       vref-supply = <&vccadc_ref>;
+       status = "okay";
+};
+
+&sdhci {
+       bus-width = <8>;
+       keep-power-in-suspend;
+       mmc-hs400-1_8v;
+       mmc-hs400-enhanced-strobe;
+       non-removable;
+       status = "okay";
+};
+
+&tsadc {
+       /* tshut mode 0:CRU 1:GPIO */
+       rockchip,hw-tshut-mode = <1>;
+       /* tshut polarity 0:LOW 1:HIGH */
+       rockchip,hw-tshut-polarity = <1>;
+       status = "okay";
+};
+
+&u2phy0 {
+       status = "okay";
+
+       u2phy0_otg: otg-port {
+               status = "okay";
+       };
+
+       u2phy0_host: host-port {
+               phy-supply = <&vcc5v0_host>;
+               status = "okay";
+       };
+};
+
+&u2phy1 {
+       status = "okay";
+
+       u2phy1_otg: otg-port {
+               status = "okay";
+       };
+
+       u2phy1_host: host-port {
+               phy-supply = <&vcc5v0_host>;
+               status = "okay";
+       };
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_xfer &uart0_cts>;
+       status = "okay";
+};
+
+&uart2 {
+       status = "okay";
+};
+
+&usb_host0_ehci {
+       status = "okay";
+};
+
+&usb_host0_ohci {
+       status = "okay";
+};
+
+&usb_host1_ehci {
+       status = "okay";
+};
+
+&usb_host1_ohci {
+       status = "okay";
+};
index 50e43c7740e0df3b3c8ac95882a44345133cefdc..a234db813484833fa2829e13b9ab5566addd6986 100644 (file)
@@ -7,12 +7,16 @@
 /dts-v1/;
 #include <dt-bindings/pwm/pwm.h>
 #include "rk3399.dtsi"
-#include "rk3399-sdram-ddr3-1333.dtsi"
+#include "rk3399-sdram-ddr3-1600.dtsi"
 
 / {
        model = "Theobroma Systems RK3399-Q7 SoM";
        compatible = "tsd,puma", "rockchip,rk3399";
 
+       config {
+               u-boot,spl-payload-offset = <204800>;
+       };
+
        chosen {
                stdout-path = "serial0:115200n8";
                u-boot,spl-boot-order = &spiflash, &sdhci, &sdmmc;
index bed236da2511d4d3362a201ca157c0b07b96c9da..f032eece23e283a8cea8a3bf19b12b89c59a11f0 100644 (file)
                666
                3
                2
-/*             13 */ 9
+               9
                1
                0x00000600
                0x00000000
                0x00000000
                0x00000000
                0x00000000
-/*             0xaae60 */ 7
+               0x00000007
                0x00000000
                0x00000000
                0x00000000
-/*             0xaae60 */ 7
+               0x00000007
                0x00000000
                0x00000000
                0x00000000
-/*             0xaae60 */ 7
+               0x00000007
                0x00000000
                0x00000000
                0x01000000
diff --git a/arch/arm/dts/rk3399-sdram-ddr3-1600.dtsi b/arch/arm/dts/rk3399-sdram-ddr3-1600.dtsi
new file mode 100644 (file)
index 0000000..d54ea82
--- /dev/null
@@ -0,0 +1,1536 @@
+/*
+ * (C) 2017 Theobroma Systems Design und Consulting GmbH
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+
+&dmc {
+        rockchip,sdram-params = <
+               0x1
+               0xa
+               0x3
+               0x2
+               0x1
+               0x0
+               0xf
+               0xf
+               1
+               0x80151015
+               0x14040902
+               0x00000002
+               0x00006346
+               0x0000004c
+               0x00000000
+               0x1
+               0xa
+               0x3
+               0x2
+               0x1
+               0x0
+               0xf
+               0xf
+               1
+               0x80151015
+               0x14040902
+               0x00000002
+               0x00006346
+               0x0000004c
+               0x00000000
+               800
+               3
+               2
+               9
+               1
+               0x00000600
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000008
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000008
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000008
+               0x00000000
+               0x00000000
+               0x01000000
+               0x00000000
+               0x00000101
+               0x00020100
+               0x00027100
+               0x00061a80
+               0x02000200
+               0x08160200
+               0x00081600
+               0x04000816
+               0x26050004
+               0x1c0b061c
+               0x1c260500
+               0x001c0b06
+               0x061c2605
+               0x06001c0b
+               0x00000c04
+               0x0400db60
+               0x0c040605
+               0x0400db60
+               0x0c040605
+               0x0400db60
+               0x02030005
+               0x0b0c0b00
+               0x000c0b0c
+               0x14000a0a
+               0x00000a0a
+               0x00010000
+               0x03171717
+               0x000b0b0b
+               0x00000000
+               0x03010000
+               0x18580118
+               0x18580118
+               0x18580118
+               0x00000000
+               0x00050005
+               0x00140005
+               0x00140014
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x02000000
+               0x02000120
+               0x02000120
+               0x00000120
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000301
+               0x00000001
+               0x00000000
+               0x00000000
+               0x01000000
+               0x80104002
+               0x00040003
+               0x00040005
+               0x00030000
+               0x00050004
+               0x00000004
+               0x00040003
+               0x00040005
+               0x61600000
+               0x000030b0
+               0x30b06160
+               0x61600000
+               0x000030b0
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x08080800
+               0x00080808
+               0x00030200
+               0x00040700
+               0x00000302
+               0x02000407
+               0x00000003
+               0x00030f04
+               0x00070004
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00010000
+               0x00010000
+               0x20040020
+               0x00200400
+               0x01000400
+               0x00000b80
+               0x00000000
+               0x00000001
+               0x00000002
+               0x0000000e
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00a00000
+               0x00c80050
+               0x00c80000
+               0x005000a0
+               0x000000c8
+               0x00a000c8
+               0x00c80050
+               0x00c80000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00420c70
+               0x0c700018
+               0x00180042
+               0x00420c70
+               0x00000018
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00420c70
+               0x0c700018
+               0x00180042
+               0x00420c70
+               0x00000018
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x01000000
+               0x00000000
+               0x00000000
+               0x18151100
+               0x0000000c
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00020003
+               0x00400100
+               0x00000000
+               0x01000200
+               0x00000040
+               0x00020000
+               0x00400100
+               0x00000000
+               0x00000000
+               0x00000000
+               0x01010100
+               0x00000202
+               0x0a000001
+               0x01000f0f
+               0x00000000
+               0x00000000
+               0x00010003
+               0x00000c03
+               0x00000000
+               0x00000000
+               0x01000000
+               0x00010000
+               0x00000001
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00010000
+               0x07070702
+               0x01010606
+               0x00000001
+               0x03030300
+               0x03080808
+               0x03050303
+               0x03050303
+               0x00050303
+               0x00020202
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x0d000001
+               0x00010028
+               0x00010000
+               0x00000003
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00010100
+               0x01000000
+               0x00000001
+               0x00000303
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x000556aa
+               0x000aaaaa
+               0x000aa955
+               0x00055555
+               0x000b3133
+               0x0004cd33
+               0x0004cecc
+               0x000b32cc
+               0x00010300
+               0x03000100
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00ffff00
+               0x15150000
+               0x08000015
+               0x000030b0
+               0x00000200
+               0x00000200
+               0x00000200
+               0x00000200
+               0x000030b0
+               0x0001e6e0
+               0x30b00709
+               0x00000200
+               0x00000200
+               0x00000200
+               0x00000200
+               0x000030b0
+               0x0001e6e0
+               0x30b00709
+               0x00000200
+               0x00000200
+               0x00000200
+               0x00000200
+               0x000030b0
+               0x0001e6e0
+               0x02020709
+               0x03030202
+               0x00000014
+               0x00000000
+               0x00000000
+               0x00001403
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00030000
+               0x00060018
+               0x00060018
+               0x00060018
+               0x00000000
+               0x00000000
+               0x01000000
+               0x02060206
+               0x00050206
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x01000100
+               0x01010101
+               0x01000101
+               0x01000100
+               0x00010001
+               0x00010002
+               0x00020100
+               0x00000002
+               0x00000600
+               0x00000000
+               0x00006160
+               0x000030b0
+               0x00006160
+               0x000030b0
+               0x00006160
+               0x30b030b0
+               0x00000200
+               0x00000200
+               0x00000200
+               0x00000200
+               0x000030b0
+               0x00000200
+               0x00000200
+               0x00000200
+               0x00000200
+               0x000030b0
+               0x00000200
+               0x00000200
+               0x00000200
+               0x00000200
+               0x00010000
+               0x00000007
+               0x110f0001
+               0x3c020000
+               0x3fffffff
+               0x3c030000
+               0x1dc0ffff
+               0x3c010000
+               0x1dc0ffff
+               0x3c000000
+               0x1dc0ffff
+               0x3c300400
+               0x1dc7ffff
+               0x3c000000
+               0x00000000
+               0x3c000000
+               0x00000000
+               0x3c000000
+               0x00000000
+               0x03000101
+               0x00242424
+               0x08160008
+               0x00081600
+               0x00000016
+               0x18580118
+               0x18580118
+               0x18580118
+               0x00000500
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x04040000
+               0x0d000004
+               0x00000128
+               0x00000000
+               0x00030003
+               0x00000014
+               0x00000000
+               0x00000000
+               0x07060002
+               0x07010701
+               0x00060601
+               0x00020001
+               0x00080004
+               0x00000000
+               0x00000000
+               0x03030300
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00030300
+               0x00000014
+               0x00000000
+               0x01010300
+               0x00000000
+               0x00000000
+               0x01000000
+               0x00000101
+               0x55555a5a
+               0x55555a5a
+               0x55555a5a
+               0x55555a5a
+               0x09090001
+               0x07070009
+               0x02020007
+               0x00000102
+               0x00030000
+               0x17030000
+               0x00060018
+               0x00060018
+               0x00060018
+               0x00000000
+               0x00000000
+               0x00000000
+               0x140a0000
+               0x000a000a
+               0x00000a00
+               0x010a000a
+               0x00000100
+               0x01000000
+               0x00000000
+               0x00000100
+               0x1e1a0000
+               0x10010204
+               0x07070705
+               0x20000202
+               0x00201000
+               0x00201000
+               0x04041000
+               0x10100100
+               0x00010110
+               0x004b004a
+               0x1a030000
+               0x0102041e
+               0x34000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00004200
+               0x00000018
+               0x004d4d00
+               0x00180042
+               0x4d000000
+               0x0000424d
+               0x00000018
+               0x004d4d00
+               0x00180042
+               0x4d000000
+               0x0000424d
+               0x00000018
+               0x004d4d00
+               0x00180042
+               0x4d000000
+               0x0042004d
+               0x00000018
+               0x004d4d00
+               0x00180042
+               0x4d000000
+               0x0000424d
+               0x00000018
+               0x004d4d00
+               0x00180042
+               0x4d000000
+               0x0000424d
+               0x00000018
+               0x004d4d00
+               0x00180042
+               0x4d000000
+               0x0000004d
+               0x00c800c8
+               0x060400c8
+               0x0c060b0b
+               0x1c00d92e
+               0x08042000
+               0x0b0b060c
+               0x00000c06
+               0x1c00d92e
+               0x08042000
+               0x0b0b060c
+               0x00000c06
+               0x1c00d92e
+               0x08042000
+               0x0200020c
+               0x02000200
+               0x02000200
+               0x02000200
+               0x02000200
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x01000300
+               0x0030b000
+               0x0001e6e0
+               0x000030b0
+               0x0001e6e0
+               0x000030b0
+               0x0001e6e0
+               0x08000000
+               0x00000100
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000001
+               0x76543210
+               0x0004c008
+               0x00000099
+               0x00000000
+               0x00000000
+               0x00010000
+               0x01665555
+               0x00665555
+               0x00010f00
+               0x05010200
+               0x00000001
+               0x001700c0
+               0x00cc0001
+               0x00000066
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x04080000
+               0x04080400
+               0x08000000
+               0x0c00c007
+               0x00000100
+               0x00000100
+               0x55555555
+               0xaaaaaaaa
+               0x55555555
+               0xaaaaaaaa
+               0x00005555
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00200000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x02800280
+               0x02800280
+               0x02800280
+               0x02800280
+               0x00000280
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00800000
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00990080
+               0x00000001
+               0x00000000
+               0x00000000
+               0x00000200
+               0x00000000
+               0x51313152
+               0x80013130
+               0x02000080
+               0x00100001
+               0x07054208
+               0x000f0c0f
+               0x01000140
+               0x00000c20
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x76543210
+               0x0004c008
+               0x00000099
+               0x00000000
+               0x00000000
+               0x00010000
+               0x01665555
+               0x00665555
+               0x00010f00
+               0x05010200
+               0x00000001
+               0x001700c0
+               0x00cc0001
+               0x00000066
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x04080000
+               0x04080400
+               0x08000000
+               0x0c00c007
+               0x00000100
+               0x00000100
+               0x55555555
+               0xaaaaaaaa
+               0x55555555
+               0xaaaaaaaa
+               0x00005555
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00200000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x02800280
+               0x02800280
+               0x02800280
+               0x02800280
+               0x00000280
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00800000
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00990080
+               0x00000001
+               0x00000000
+               0x00000000
+               0x00000200
+               0x00000000
+               0x51313152
+               0x80013130
+               0x02000080
+               0x00100001
+               0x07054208
+               0x000f0c0f
+               0x01000140
+               0x00000c20
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x76543210
+               0x0004c008
+               0x00000099
+               0x00000000
+               0x00000000
+               0x00010000
+               0x01665555
+               0x00665555
+               0x00010f00
+               0x05010200
+               0x00000001
+               0x001700c0
+               0x00cc0001
+               0x00000066
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x04080000
+               0x04080400
+               0x08000000
+               0x0c00c007
+               0x00000100
+               0x00000100
+               0x55555555
+               0xaaaaaaaa
+               0x55555555
+               0xaaaaaaaa
+               0x00005555
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00200000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x02800280
+               0x02800280
+               0x02800280
+               0x02800280
+               0x00000280
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00800000
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00990080
+               0x00000001
+               0x00000000
+               0x00000000
+               0x00000200
+               0x00000000
+               0x51313152
+               0x80013130
+               0x02000080
+               0x00100001
+               0x07054208
+               0x000f0c0f
+               0x01000140
+               0x00000c20
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x76543210
+               0x0004c008
+               0x00000099
+               0x00000000
+               0x00000000
+               0x00010000
+               0x01665555
+               0x00665555
+               0x00010f00
+               0x05010200
+               0x00000001
+               0x001700c0
+               0x00cc0001
+               0x00000066
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x04080000
+               0x04080400
+               0x08000000
+               0x0c00c007
+               0x00000100
+               0x00000100
+               0x55555555
+               0xaaaaaaaa
+               0x55555555
+               0xaaaaaaaa
+               0x00005555
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00200000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x02800280
+               0x02800280
+               0x02800280
+               0x02800280
+               0x00000280
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00800000
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00800080
+               0x00990080
+               0x00000001
+               0x00000000
+               0x00000000
+               0x00000200
+               0x00000000
+               0x51313152
+               0x80013130
+               0x02000080
+               0x00100001
+               0x07054208
+               0x000f0c0f
+               0x01000140
+               0x00000c20
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00800000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00400320
+               0x00000040
+               0x00dcba98
+               0x00000000
+               0x00dcba98
+               0x01000000
+               0x00020003
+               0x00000000
+               0x00000000
+               0x00000000
+               0x0000002a
+               0x00000015
+               0x00000015
+               0x0000002a
+               0x00000033
+               0x0000000c
+               0x0000000c
+               0x00000033
+               0x0a418820
+               0x103f0000
+               0x0000003f
+               0x00030055
+               0x03000300
+               0x03000300
+               0x00000300
+               0x42080010
+               0x00000003
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00800000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00400320
+               0x00000040
+               0x00000000
+               0x00000000
+               0x00000000
+               0x01000000
+               0x00020003
+               0x00000000
+               0x00000000
+               0x00000000
+               0x0000002a
+               0x00000015
+               0x00000015
+               0x0000002a
+               0x00000033
+               0x0000000c
+               0x0000000c
+               0x00000033
+               0x16a4a0e6
+               0x103f0000
+               0x0000003f
+               0x00030055
+               0x03000300
+               0x03000300
+               0x00000300
+               0x42080010
+               0x00000003
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00800000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00400320
+               0x00000040
+               0x00000000
+               0x00000000
+               0x00000000
+               0x01000000
+               0x00020003
+               0x00000000
+               0x00000000
+               0x00000000
+               0x0000002a
+               0x00000015
+               0x00000015
+               0x0000002a
+               0x00000033
+               0x0000000c
+               0x0000000c
+               0x00000033
+               0x1ee6b16a
+               0x103f0000
+               0x0000003f
+               0x00030055
+               0x03000300
+               0x03000300
+               0x00000300
+               0x42080010
+               0x00000003
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000001
+               0x00000000
+               0x01000005
+               0x04000f00
+               0x00020040
+               0x00020055
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00010100
+               0x00000601
+               0x00000000
+               0x00006400
+               0x01221102
+               0x00000000
+               0x00031f00
+               0x031f031f
+               0x031f031f
+               0x00030003
+               0x03000300
+               0x00000300
+               0x01221102
+               0x00000000
+               0x00000000
+               0x03020000
+               0x00000001
+               0x00008011
+               0x00000011
+               0x00000440
+               0x00000040
+               0x00004011
+               0x00004011
+               0x00004410
+               0x00004410
+               0x00004410
+               0x00004410
+               0x00004410
+               0x00004011
+               0x00004410
+               0x00004011
+               0x00004410
+               0x00004011
+               0x00004410
+               0x00000000
+               0x00000000
+               0x00000000
+               0x04000000
+               0x00000000
+               0x00000000
+               0x00000508
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0x00000000
+               0xe4000000
+               0x00000000
+               0x00000000
+               0x01010000
+               0x00000000
+       >;
+};
index d94d7802cb420b8ffc70603294c9b4293510c97e..f3d3f53f7ae08db25163139e88762e2567779968 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2016 Rockchip Electronics Co., Ltd
+ * Copyright (c) 2016-2017 Fuzhou Rockchip Electronics Co., Ltd.
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
@@ -9,6 +9,8 @@
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/power/rk3399-power.h>
+#include <dt-bindings/thermal/thermal.h>
 #define USB_CLASS_HUB                  9
 
 / {
        #size-cells = <2>;
 
        aliases {
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c4;
+               i2c5 = &i2c5;
+               i2c6 = &i2c6;
+               i2c7 = &i2c7;
+               i2c8 = &i2c8;
                serial0 = &uart0;
                serial1 = &uart1;
                serial2 = &uart2;
@@ -26,7 +37,6 @@
                serial4 = &uart4;
                mmc0 = &sdhci;
                mmc1 = &sdmmc;
-               i2c0 = &i2c0;
        };
 
        cpus {
                };
        };
 
+       pmu_a53 {
+               compatible = "arm,cortex-a53-pmu";
+               interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_LOW &ppi_cluster0>;
+       };
+
+       pmu_a72 {
+               compatible = "arm,cortex-a72-pmu";
+               interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_LOW &ppi_cluster1>;
+       };
+
        psci {
                compatible = "arm,psci-1.0";
                method = "smc";
 
        timer {
                compatible = "arm,armv8-timer";
-               interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
-                            <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
-                            <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
-                            <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
+               interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW 0>,
+                            <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW 0>,
+                            <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW 0>,
+                            <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW 0>;
+               arm,no-tick-in-suspend;
        };
 
        xin24m: xin24m {
                dmac_bus: dma-controller@ff6d0000 {
                        compatible = "arm,pl330", "arm,primecell";
                        reg = <0x0 0xff6d0000 0x0 0x4000>;
-                       interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH 0>,
+                                    <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH 0>;
                        #dma-cells = <1>;
                        clocks = <&cru ACLK_DMAC0_PERILP>;
                        clock-names = "apb_pclk";
                dmac_peri: dma-controller@ff6e0000 {
                        compatible = "arm,pl330", "arm,primecell";
                        reg = <0x0 0xff6e0000 0x0 0x4000>;
-                       interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH 0>,
+                                    <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH 0>;
                        #dma-cells = <1>;
                        clocks = <&cru ACLK_DMAC1_PERILP>;
                        clock-names = "apb_pclk";
                };
        };
 
+       pcie0: pcie@f8000000 {
+               compatible = "rockchip,rk3399-pcie";
+               reg = <0x0 0xf8000000 0x0 0x2000000>,
+                     <0x0 0xfd000000 0x0 0x1000000>;
+               reg-names = "axi-base", "apb-base";
+               #address-cells = <3>;
+               #size-cells = <2>;
+               #interrupt-cells = <1>;
+               aspm-no-l0s;
+               bus-range = <0x0 0x1>;
+               clocks = <&cru ACLK_PCIE>, <&cru ACLK_PERF_PCIE>,
+                        <&cru PCLK_PCIE>, <&cru SCLK_PCIE_PM>;
+               clock-names = "aclk", "aclk-perf",
+                             "hclk", "pm";
+               interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH 0>,
+                            <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH 0>,
+                            <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH 0>;
+               interrupt-names = "sys", "legacy", "client";
+               interrupt-map-mask = <0 0 0 7>;
+               interrupt-map = <0 0 0 1 &pcie0_intc 0>,
+                               <0 0 0 2 &pcie0_intc 1>,
+                               <0 0 0 3 &pcie0_intc 2>,
+                               <0 0 0 4 &pcie0_intc 3>;
+               linux,pci-domain = <0>;
+               max-link-speed = <1>;
+               msi-map = <0x0 &its 0x0 0x1000>;
+               phys = <&pcie_phy>;
+               phy-names = "pcie-phy";
+               ranges = <0x83000000 0x0 0xfa000000 0x0 0xfa000000 0x0 0x600000
+                         0x81000000 0x0 0xfa600000 0x0 0xfa600000 0x0 0x100000>;
+               resets = <&cru SRST_PCIE_CORE>, <&cru SRST_PCIE_MGMT>,
+                        <&cru SRST_PCIE_MGMT_STICKY>, <&cru SRST_PCIE_PIPE>,
+                        <&cru SRST_PCIE_PM>, <&cru SRST_P_PCIE>,
+                        <&cru SRST_A_PCIE>;
+               reset-names = "core", "mgmt", "mgmt-sticky", "pipe",
+                             "pm", "pclk", "aclk";
+               status = "disabled";
+
+               pcie0_intc: interrupt-controller {
+                       interrupt-controller;
+                       #address-cells = <0>;
+                       #interrupt-cells = <1>;
+               };
+       };
+
+       gmac: ethernet@fe300000 {
+               compatible = "rockchip,rk3399-gmac";
+               reg = <0x0 0xfe300000 0x0 0x10000>;
+               interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH 0>;
+               interrupt-names = "macirq";
+               clocks = <&cru SCLK_MAC>, <&cru SCLK_MAC_RX>,
+                        <&cru SCLK_MAC_TX>, <&cru SCLK_MACREF>,
+                        <&cru SCLK_MACREF_OUT>, <&cru ACLK_GMAC>,
+                        <&cru PCLK_GMAC>;
+               clock-names = "stmmaceth", "mac_clk_rx",
+                             "mac_clk_tx", "clk_mac_ref",
+                             "clk_mac_refout", "aclk_mac",
+                             "pclk_mac";
+               power-domains = <&power RK3399_PD_GMAC>;
+               resets = <&cru SRST_A_GMAC>;
+               reset-names = "stmmaceth";
+               rockchip,grf = <&grf>;
+               status = "disabled";
+       };
+
        sdio0: dwmmc@fe310000 {
                compatible = "rockchip,rk3399-dw-mshc",
                             "rockchip,rk3288-dw-mshc";
                reg = <0x0 0xfe310000 0x0 0x4000>;
-               interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
-               clock-freq-min-max = <400000 150000000>;
+               interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH 0>;
+               max-frequency = <150000000>;
                clocks = <&cru HCLK_SDIO>, <&cru SCLK_SDIO>,
                         <&cru SCLK_SDIO_DRV>, <&cru SCLK_SDIO_SAMPLE>;
                clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
                fifo-depth = <0x100>;
+               power-domains = <&power RK3399_PD_SDIOAUDIO>;
+               resets = <&cru SRST_SDIO0>;
+               reset-names = "reset";
                status = "disabled";
        };
 
                compatible = "rockchip,rk3399-dw-mshc",
                             "rockchip,rk3288-dw-mshc";
                reg = <0x0 0xfe320000 0x0 0x4000>;
-               interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
-               clock-freq-min-max = <400000 150000000>;
-               clocks = <&cru SCLK_SDMMC>, <&cru HCLK_SDMMC>,
+               interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH 0>;
+               max-frequency = <150000000>;
+               clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
                         <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
-               clock-names = "ciu", "biu", "ciu-drive", "ciu-sample";
-               pinctrl-names = "default";
-               pinctrl-0 = <&sdmmc_clk>;
+               clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
                fifo-depth = <0x100>;
+               power-domains = <&power RK3399_PD_SD>;
+               resets = <&cru SRST_SDMMC>;
+               reset-names = "reset";
                status = "disabled";
        };
 
                u-boot,dm-pre-reloc;
                compatible = "rockchip,rk3399-sdhci-5.1", "arasan,sdhci-5.1";
                reg = <0x0 0xfe330000 0x0 0x10000>;
-               interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH 0>;
+               arasan,soc-ctl-syscon = <&grf>;
                assigned-clocks = <&cru SCLK_EMMC>;
                assigned-clock-rates = <200000000>;
                max-frequency = <200000000>;
                clocks = <&cru SCLK_EMMC>, <&cru ACLK_EMMC>;
                clock-names = "clk_xin", "clk_ahb";
+               clock-output-names = "emmc_cardclock";
+               #clock-cells = <0>;
                phys = <&emmc_phy>;
                phy-names = "phy_arasan";
+               power-domains = <&power RK3399_PD_EMMC>;
                status = "disabled";
        };
 
        usb_host0_ehci: usb@fe380000 {
                compatible = "generic-ehci";
                reg = <0x0 0xfe380000 0x0 0x20000>;
-               interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
-               clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST0_ARB>;
-               clock-names = "hclk_host0", "hclk_host0_arb";
+               interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH 0>;
+               clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST0_ARB>,
+                        <&u2phy0>;
+               clock-names = "usbhost", "arbiter",
+                             "utmi";
+               phys = <&u2phy0_host>;
+               phy-names = "usb";
+               power-domains = <&power RK3399_PD_PERIHP>;
                status = "disabled";
        };
 
        usb_host0_ohci: usb@fe3a0000 {
                compatible = "generic-ohci";
                reg = <0x0 0xfe3a0000 0x0 0x20000>;
-               interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
-               clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST0_ARB>;
-               clock-names = "hclk_host0", "hclk_host0_arb";
+               interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH 0>;
+               clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST0_ARB>,
+                        <&u2phy0>;
+               clock-names = "usbhost", "arbiter",
+                             "utmi";
+               phys = <&u2phy0_host>;
+               phy-names = "usb";
+               power-domains = <&power RK3399_PD_PERIHP>;
                status = "disabled";
        };
 
        usb_host1_ehci: usb@fe3c0000 {
                compatible = "generic-ehci";
                reg = <0x0 0xfe3c0000 0x0 0x20000>;
-               interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
-               clocks = <&cru HCLK_HOST1>, <&cru HCLK_HOST1_ARB>;
-               clock-names = "hclk_host1", "hclk_host1_arb";
+               interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH 0>;
+               clocks = <&cru HCLK_HOST1>, <&cru HCLK_HOST1_ARB>,
+                        <&u2phy1>;
+               clock-names = "usbhost", "arbiter",
+                             "utmi";
+               phys = <&u2phy1_host>;
+               phy-names = "usb";
+               power-domains = <&power RK3399_PD_PERIHP>;
                status = "disabled";
        };
 
        usb_host1_ohci: usb@fe3e0000 {
                compatible = "generic-ohci";
                reg = <0x0 0xfe3e0000 0x0 0x20000>;
-               interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
-               clocks = <&cru HCLK_HOST1>, <&cru HCLK_HOST1_ARB>;
-               clock-names = "hclk_host1", "hclk_host1_arb";
+               interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH 0>;
+               clocks = <&cru HCLK_HOST1>, <&cru HCLK_HOST1_ARB>,
+                        <&u2phy1>;
+               clock-names = "usbhost", "arbiter",
+                             "utmi";
+               phys = <&u2phy1_host>;
+               phy-names = "usb";
+               power-domains = <&power RK3399_PD_PERIHP>;
                status = "disabled";
        };
 
 
        gic: interrupt-controller@fee00000 {
                compatible = "arm,gic-v3";
-               #interrupt-cells = <3>;
+               #interrupt-cells = <4>;
                #address-cells = <2>;
                #size-cells = <2>;
                ranges;
                      <0x0 0xfff00000 0 0x10000>, /* GICC */
                      <0x0 0xfff10000 0 0x10000>, /* GICH */
                      <0x0 0xfff20000 0 0x10000>; /* GICV */
-               interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH 0>;
                its: interrupt-controller@fee20000 {
                        compatible = "arm,gic-v3-its";
                        msi-controller;
                        reg = <0x0 0xfee20000 0x0 0x20000>;
                };
+
+               ppi-partitions {
+                       ppi_cluster0: interrupt-partition-0 {
+                               affinity = <&cpu_l0 &cpu_l1 &cpu_l2 &cpu_l3>;
+                       };
+
+                       ppi_cluster1: interrupt-partition-1 {
+                               affinity = <&cpu_b0 &cpu_b1>;
+                       };
+               };
+       };
+
+       saradc: saradc@ff100000 {
+               compatible = "rockchip,rk3399-saradc";
+               reg = <0x0 0xff100000 0x0 0x100>;
+               interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH 0>;
+               #io-channel-cells = <1>;
+               clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
+               clock-names = "saradc", "apb_pclk";
+               resets = <&cru SRST_P_SARADC>;
+               reset-names = "saradc-apb";
+               status = "disabled";
+       };
+
+       i2c1: i2c@ff110000 {
+               compatible = "rockchip,rk3399-i2c";
+               reg = <0x0 0xff110000 0x0 0x1000>;
+               assigned-clocks = <&cru SCLK_I2C1>;
+               assigned-clock-rates = <200000000>;
+               clocks = <&cru SCLK_I2C1>, <&cru PCLK_I2C1>;
+               clock-names = "i2c", "pclk";
+               interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH 0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c1_xfer>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       i2c2: i2c@ff120000 {
+               compatible = "rockchip,rk3399-i2c";
+               reg = <0x0 0xff120000 0x0 0x1000>;
+               assigned-clocks = <&cru SCLK_I2C2>;
+               assigned-clock-rates = <200000000>;
+               clocks = <&cru SCLK_I2C2>, <&cru PCLK_I2C2>;
+               clock-names = "i2c", "pclk";
+               interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH 0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c2_xfer>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       i2c3: i2c@ff130000 {
+               compatible = "rockchip,rk3399-i2c";
+               reg = <0x0 0xff130000 0x0 0x1000>;
+               assigned-clocks = <&cru SCLK_I2C3>;
+               assigned-clock-rates = <200000000>;
+               clocks = <&cru SCLK_I2C3>, <&cru PCLK_I2C3>;
+               clock-names = "i2c", "pclk";
+               interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH 0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c3_xfer>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       i2c5: i2c@ff140000 {
+               compatible = "rockchip,rk3399-i2c";
+               reg = <0x0 0xff140000 0x0 0x1000>;
+               assigned-clocks = <&cru SCLK_I2C5>;
+               assigned-clock-rates = <200000000>;
+               clocks = <&cru SCLK_I2C5>, <&cru PCLK_I2C5>;
+               clock-names = "i2c", "pclk";
+               interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH 0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c5_xfer>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       i2c6: i2c@ff150000 {
+               compatible = "rockchip,rk3399-i2c";
+               reg = <0x0 0xff150000 0x0 0x1000>;
+               assigned-clocks = <&cru SCLK_I2C6>;
+               assigned-clock-rates = <200000000>;
+               clocks = <&cru SCLK_I2C6>, <&cru PCLK_I2C6>;
+               clock-names = "i2c", "pclk";
+               interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH 0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c6_xfer>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       i2c7: i2c@ff160000 {
+               compatible = "rockchip,rk3399-i2c";
+               reg = <0x0 0xff160000 0x0 0x1000>;
+               assigned-clocks = <&cru SCLK_I2C7>;
+               assigned-clock-rates = <200000000>;
+               clocks = <&cru SCLK_I2C7>, <&cru PCLK_I2C7>;
+               clock-names = "i2c", "pclk";
+               interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH 0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c7_xfer>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
        };
 
        uart0: serial@ff180000 {
                reg = <0x0 0xff180000 0x0 0x100>;
                clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
                clock-names = "baudclk", "apb_pclk";
-               interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH 0>;
                reg-shift = <2>;
                reg-io-width = <4>;
                pinctrl-names = "default";
                reg = <0x0 0xff190000 0x0 0x100>;
                clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>;
                clock-names = "baudclk", "apb_pclk";
-               interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH 0>;
                reg-shift = <2>;
                reg-io-width = <4>;
                pinctrl-names = "default";
                reg = <0x0 0xff1a0000 0x0 0x100>;
                clocks = <&cru SCLK_UART2>, <&cru PCLK_UART2>;
                clock-names = "baudclk", "apb_pclk";
-               interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH 0>;
                clock-frequency = <24000000>;
                reg-shift = <2>;
                reg-io-width = <4>;
                reg = <0x0 0xff1b0000 0x0 0x100>;
                clocks = <&cru SCLK_UART3>, <&cru PCLK_UART3>;
                clock-names = "baudclk", "apb_pclk";
-               interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH 0>;
                reg-shift = <2>;
                reg-io-width = <4>;
                pinctrl-names = "default";
                reg = <0x0 0xff1c0000 0x0 0x1000>;
                clocks = <&cru SCLK_SPI0>, <&cru PCLK_SPI0>;
                clock-names = "spiclk", "apb_pclk";
-               interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH 0>;
                pinctrl-names = "default";
                pinctrl-0 = <&spi0_clk &spi0_tx &spi0_rx &spi0_cs0>;
                #address-cells = <1>;
                reg = <0x0 0xff1d0000 0x0 0x1000>;
                clocks = <&cru SCLK_SPI1>, <&cru PCLK_SPI1>;
                clock-names = "spiclk", "apb_pclk";
-               interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH 0>;
                pinctrl-names = "default";
                pinctrl-0 = <&spi1_clk &spi1_tx &spi1_rx &spi1_cs0>;
                #address-cells = <1>;
                reg = <0x0 0xff1e0000 0x0 0x1000>;
                clocks = <&cru SCLK_SPI2>, <&cru PCLK_SPI2>;
                clock-names = "spiclk", "apb_pclk";
-               interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH 0>;
                pinctrl-names = "default";
                pinctrl-0 = <&spi2_clk &spi2_tx &spi2_rx &spi2_cs0>;
                #address-cells = <1>;
                reg = <0x0 0xff1f0000 0x0 0x1000>;
                clocks = <&cru SCLK_SPI4>, <&cru PCLK_SPI4>;
                clock-names = "spiclk", "apb_pclk";
-               interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH 0>;
                pinctrl-names = "default";
                pinctrl-0 = <&spi4_clk &spi4_tx &spi4_rx &spi4_cs0>;
                #address-cells = <1>;
                reg = <0x0 0xff200000 0x0 0x1000>;
                clocks = <&cru SCLK_SPI5>, <&cru PCLK_SPI5>;
                clock-names = "spiclk", "apb_pclk";
-               interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH 0>;
                pinctrl-names = "default";
                pinctrl-0 = <&spi5_clk &spi5_tx &spi5_rx &spi5_cs0>;
                #address-cells = <1>;
                status = "disabled";
        };
 
+       thermal_zones: thermal-zones {
+               cpu_thermal: cpu {
+                       polling-delay-passive = <100>;
+                       polling-delay = <1000>;
+
+                       thermal-sensors = <&tsadc 0>;
+
+                       trips {
+                               cpu_alert0: cpu_alert0 {
+                                       temperature = <70000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+                               cpu_alert1: cpu_alert1 {
+                                       temperature = <75000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+                               cpu_crit: cpu_crit {
+                                       temperature = <95000>;
+                                       hysteresis = <2000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&cpu_alert0>;
+                                       cooling-device =
+                                               <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                               };
+                               map1 {
+                                       trip = <&cpu_alert1>;
+                                       cooling-device =
+                                               <&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                               <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                               };
+                       };
+               };
+
+               gpu_thermal: gpu {
+                       polling-delay-passive = <100>;
+                       polling-delay = <1000>;
+
+                       thermal-sensors = <&tsadc 1>;
+
+                       trips {
+                               gpu_alert0: gpu_alert0 {
+                                       temperature = <75000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+                               gpu_crit: gpu_crit {
+                                       temperature = <95000>;
+                                       hysteresis = <2000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&gpu_alert0>;
+                                       cooling-device =
+                                               <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                               };
+                       };
+               };
+       };
+
+       tsadc: tsadc@ff260000 {
+               compatible = "rockchip,rk3399-tsadc";
+               reg = <0x0 0xff260000 0x0 0x100>;
+               interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH 0>;
+               assigned-clocks = <&cru SCLK_TSADC>;
+               assigned-clock-rates = <750000>;
+               clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>;
+               clock-names = "tsadc", "apb_pclk";
+               resets = <&cru SRST_TSADC>;
+               reset-names = "tsadc-apb";
+               rockchip,grf = <&grf>;
+               rockchip,hw-tshut-temp = <95000>;
+               pinctrl-names = "init", "default", "sleep";
+               pinctrl-0 = <&otp_gpio>;
+               pinctrl-1 = <&otp_out>;
+               pinctrl-2 = <&otp_gpio>;
+               #thermal-sensor-cells = <1>;
+               status = "disabled";
+       };
+
+       qos_emmc: qos@ffa58000 {
+               compatible = "syscon";
+               reg = <0x0 0xffa58000 0x0 0x20>;
+       };
+
+       qos_gmac: qos@ffa5c000 {
+               compatible = "syscon";
+               reg = <0x0 0xffa5c000 0x0 0x20>;
+       };
+
+       qos_pcie: qos@ffa60080 {
+               compatible = "syscon";
+               reg = <0x0 0xffa60080 0x0 0x20>;
+       };
+
+       qos_usb_host0: qos@ffa60100 {
+               compatible = "syscon";
+               reg = <0x0 0xffa60100 0x0 0x20>;
+       };
+
+       qos_usb_host1: qos@ffa60180 {
+               compatible = "syscon";
+               reg = <0x0 0xffa60180 0x0 0x20>;
+       };
+
+       qos_usb_otg0: qos@ffa70000 {
+               compatible = "syscon";
+               reg = <0x0 0xffa70000 0x0 0x20>;
+       };
+
+       qos_usb_otg1: qos@ffa70080 {
+               compatible = "syscon";
+               reg = <0x0 0xffa70080 0x0 0x20>;
+       };
+
+       qos_sd: qos@ffa74000 {
+               compatible = "syscon";
+               reg = <0x0 0xffa74000 0x0 0x20>;
+       };
+
+       qos_sdioaudio: qos@ffa76000 {
+               compatible = "syscon";
+               reg = <0x0 0xffa76000 0x0 0x20>;
+       };
+
+       qos_hdcp: qos@ffa90000 {
+               compatible = "syscon";
+               reg = <0x0 0xffa90000 0x0 0x20>;
+       };
+
+       qos_iep: qos@ffa98000 {
+               compatible = "syscon";
+               reg = <0x0 0xffa98000 0x0 0x20>;
+       };
+
+       qos_isp0_m0: qos@ffaa0000 {
+               compatible = "syscon";
+               reg = <0x0 0xffaa0000 0x0 0x20>;
+       };
+
+       qos_isp0_m1: qos@ffaa0080 {
+               compatible = "syscon";
+               reg = <0x0 0xffaa0080 0x0 0x20>;
+       };
+
+       qos_isp1_m0: qos@ffaa8000 {
+               compatible = "syscon";
+               reg = <0x0 0xffaa8000 0x0 0x20>;
+       };
+
+       qos_isp1_m1: qos@ffaa8080 {
+               compatible = "syscon";
+               reg = <0x0 0xffaa8080 0x0 0x20>;
+       };
+
+       qos_rga_r: qos@ffab0000 {
+               compatible = "syscon";
+               reg = <0x0 0xffab0000 0x0 0x20>;
+       };
+
+       qos_rga_w: qos@ffab0080 {
+               compatible = "syscon";
+               reg = <0x0 0xffab0080 0x0 0x20>;
+       };
+
+       qos_video_m0: qos@ffab8000 {
+               compatible = "syscon";
+               reg = <0x0 0xffab8000 0x0 0x20>;
+       };
+
+       qos_video_m1_r: qos@ffac0000 {
+               compatible = "syscon";
+               reg = <0x0 0xffac0000 0x0 0x20>;
+       };
+
+       qos_video_m1_w: qos@ffac0080 {
+               compatible = "syscon";
+               reg = <0x0 0xffac0080 0x0 0x20>;
+       };
+
+       qos_vop_big_r: qos@ffac8000 {
+               compatible = "syscon";
+               reg = <0x0 0xffac8000 0x0 0x20>;
+       };
+
+       qos_vop_big_w: qos@ffac8080 {
+               compatible = "syscon";
+               reg = <0x0 0xffac8080 0x0 0x20>;
+       };
+
+       qos_vop_little: qos@ffad0000 {
+               compatible = "syscon";
+               reg = <0x0 0xffad0000 0x0 0x20>;
+       };
+
+       qos_perihp: qos@ffad8080 {
+               compatible = "syscon";
+               reg = <0x0 0xffad8080 0x0 0x20>;
+       };
+
+       qos_gpu: qos@ffae0000 {
+               compatible = "syscon";
+               reg = <0x0 0xffae0000 0x0 0x20>;
+       };
+
+       pmu: power-management@ff310000 {
+               compatible = "rockchip,rk3399-pmu", "syscon", "simple-mfd";
+               reg = <0x0 0xff310000 0x0 0x1000>;
+
+               /*
+                * Note: RK3399 supports 6 voltage domains including VD_CORE_L,
+                * VD_CORE_B, VD_CENTER, VD_GPU, VD_LOGIC and VD_PMU.
+                * Some of the power domains are grouped together for every
+                * voltage domain.
+                * The detail contents as below.
+                */
+               power: power-controller {
+                       compatible = "rockchip,rk3399-power-controller";
+                       #power-domain-cells = <1>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       /* These power domains are grouped by VD_CENTER */
+                       pd_iep@RK3399_PD_IEP {
+                               reg = <RK3399_PD_IEP>;
+                               clocks = <&cru ACLK_IEP>,
+                                        <&cru HCLK_IEP>;
+                               pm_qos = <&qos_iep>;
+                       };
+                       pd_rga@RK3399_PD_RGA {
+                               reg = <RK3399_PD_RGA>;
+                               clocks = <&cru ACLK_RGA>,
+                                        <&cru HCLK_RGA>;
+                               pm_qos = <&qos_rga_r>,
+                                        <&qos_rga_w>;
+                       };
+                       pd_vcodec@RK3399_PD_VCODEC {
+                               reg = <RK3399_PD_VCODEC>;
+                               clocks = <&cru ACLK_VCODEC>,
+                                        <&cru HCLK_VCODEC>;
+                               pm_qos = <&qos_video_m0>;
+                       };
+                       pd_vdu@RK3399_PD_VDU {
+                               reg = <RK3399_PD_VDU>;
+                               clocks = <&cru ACLK_VDU>,
+                                        <&cru HCLK_VDU>;
+                               pm_qos = <&qos_video_m1_r>,
+                                        <&qos_video_m1_w>;
+                       };
+
+                       /* These power domains are grouped by VD_GPU */
+                       pd_gpu@RK3399_PD_GPU {
+                               reg = <RK3399_PD_GPU>;
+                               clocks = <&cru ACLK_GPU>;
+                               pm_qos = <&qos_gpu>;
+                       };
+
+                       /* These power domains are grouped by VD_LOGIC */
+                       pd_edp@RK3399_PD_EDP {
+                               reg = <RK3399_PD_EDP>;
+                               clocks = <&cru PCLK_EDP_CTRL>;
+                       };
+                       pd_emmc@RK3399_PD_EMMC {
+                               reg = <RK3399_PD_EMMC>;
+                               clocks = <&cru ACLK_EMMC>;
+                               pm_qos = <&qos_emmc>;
+                       };
+                       pd_gmac@RK3399_PD_GMAC {
+                               reg = <RK3399_PD_GMAC>;
+                               clocks = <&cru ACLK_GMAC>,
+                                        <&cru PCLK_GMAC>;
+                               pm_qos = <&qos_gmac>;
+                       };
+                       pd_perihp@RK3399_PD_PERIHP {
+                               reg = <RK3399_PD_PERIHP>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&cru ACLK_PERIHP>;
+                               pm_qos = <&qos_perihp>,
+                                        <&qos_pcie>,
+                                        <&qos_usb_host0>,
+                                        <&qos_usb_host1>;
+
+                               pd_sd@RK3399_PD_SD {
+                                       reg = <RK3399_PD_SD>;
+                                       clocks = <&cru HCLK_SDMMC>,
+                                                <&cru SCLK_SDMMC>;
+                                       pm_qos = <&qos_sd>;
+                               };
+                       };
+                       pd_sdioaudio@RK3399_PD_SDIOAUDIO {
+                               reg = <RK3399_PD_SDIOAUDIO>;
+                               clocks = <&cru HCLK_SDIO>;
+                               pm_qos = <&qos_sdioaudio>;
+                       };
+                       pd_usb3@RK3399_PD_USB3 {
+                               reg = <RK3399_PD_USB3>;
+                               clocks = <&cru ACLK_USB3>;
+                               pm_qos = <&qos_usb_otg0>,
+                                        <&qos_usb_otg1>;
+                       };
+                       pd_vio@RK3399_PD_VIO {
+                               reg = <RK3399_PD_VIO>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               pd_hdcp@RK3399_PD_HDCP {
+                                       reg = <RK3399_PD_HDCP>;
+                                       clocks = <&cru ACLK_HDCP>,
+                                                <&cru HCLK_HDCP>,
+                                                <&cru PCLK_HDCP>;
+                                       pm_qos = <&qos_hdcp>;
+                               };
+                               pd_isp0@RK3399_PD_ISP0 {
+                                       reg = <RK3399_PD_ISP0>;
+                                       clocks = <&cru ACLK_ISP0>,
+                                                <&cru HCLK_ISP0>;
+                                       pm_qos = <&qos_isp0_m0>,
+                                                <&qos_isp0_m1>;
+                               };
+                               pd_isp1@RK3399_PD_ISP1 {
+                                       reg = <RK3399_PD_ISP1>;
+                                       clocks = <&cru ACLK_ISP1>,
+                                                <&cru HCLK_ISP1>;
+                                       pm_qos = <&qos_isp1_m0>,
+                                                <&qos_isp1_m1>;
+                               };
+                               pd_tcpc0@RK3399_PD_TCPC0 {
+                                       reg = <RK3399_PD_TCPD0>;
+                                       clocks = <&cru SCLK_UPHY0_TCPDCORE>,
+                                                <&cru SCLK_UPHY0_TCPDPHY_REF>;
+                               };
+                               pd_tcpc1@RK3399_PD_TCPC1 {
+                                       reg = <RK3399_PD_TCPD1>;
+                                       clocks = <&cru SCLK_UPHY1_TCPDCORE>,
+                                                <&cru SCLK_UPHY1_TCPDPHY_REF>;
+                               };
+                               pd_vo@RK3399_PD_VO {
+                                       reg = <RK3399_PD_VO>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       pd_vopb@RK3399_PD_VOPB {
+                                               reg = <RK3399_PD_VOPB>;
+                                               clocks = <&cru ACLK_VOP0>,
+                                                        <&cru HCLK_VOP0>;
+                                               pm_qos = <&qos_vop_big_r>,
+                                                        <&qos_vop_big_w>;
+                                       };
+                                       pd_vopl@RK3399_PD_VOPL {
+                                               reg = <RK3399_PD_VOPL>;
+                                               clocks = <&cru ACLK_VOP1>,
+                                                        <&cru HCLK_VOP1>;
+                                               pm_qos = <&qos_vop_little>;
+                                       };
+                               };
+                       };
+               };
+       };
+
        pmugrf: syscon@ff320000 {
                u-boot,dm-pre-reloc;
                compatible = "rockchip,rk3399-pmugrf", "syscon", "simple-mfd";
                reg = <0x0 0xff350000 0x0 0x1000>;
                clocks = <&pmucru SCLK_SPI3_PMU>, <&pmucru PCLK_SPI3_PMU>;
                clock-names = "spiclk", "apb_pclk";
-               interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH 0>;
                pinctrl-names = "default";
                pinctrl-0 = <&spi3_clk &spi3_tx &spi3_rx &spi3_cs0>;
                #address-cells = <1>;
                reg = <0x0 0xff370000 0x0 0x100>;
                clocks = <&pmucru SCLK_UART4_PMU>, <&pmucru PCLK_UART4_PMU>;
                clock-names = "baudclk", "apb_pclk";
-               interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH 0>;
                reg-shift = <2>;
                reg-io-width = <4>;
                pinctrl-names = "default";
                status = "disabled";
        };
 
+       i2c4: i2c@ff3d0000 {
+               compatible = "rockchip,rk3399-i2c";
+               reg = <0x0 0xff3d0000 0x0 0x1000>;
+               assigned-clocks = <&pmucru SCLK_I2C4_PMU>;
+               assigned-clock-rates = <200000000>;
+               clocks = <&pmucru SCLK_I2C4_PMU>, <&pmucru PCLK_I2C4_PMU>;
+               clock-names = "i2c", "pclk";
+               interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH 0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c4_xfer>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       i2c8: i2c@ff3e0000 {
+               compatible = "rockchip,rk3399-i2c";
+               reg = <0x0 0xff3e0000 0x0 0x1000>;
+               assigned-clocks = <&pmucru SCLK_I2C8_PMU>;
+               assigned-clock-rates = <200000000>;
+               clocks = <&pmucru SCLK_I2C8_PMU>, <&pmucru PCLK_I2C8_PMU>;
+               clock-names = "i2c", "pclk";
+               interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH 0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c8_xfer>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
        pwm0: pwm@ff420000 {
                compatible = "rockchip,rk3399-pwm", "rockchip,rk3288-pwm";
                reg = <0x0 0xff420000 0x0 0x10>;
                       0x0 0xffa8c000 0x0 0x1000>;
        };
 
+       efuse0: efuse@ff690000 {
+               compatible = "rockchip,rk3399-efuse";
+               reg = <0x0 0xff690000 0x0 0x80>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               clocks = <&cru PCLK_EFUSE1024NS>;
+               clock-names = "pclk_efuse";
+
+               /* Data cells */
+               cpu_id: cpu-id@7 {
+                       reg = <0x07 0x10>;
+               };
+               cpub_leakage: cpu-leakage@17 {
+                       reg = <0x17 0x1>;
+               };
+               gpu_leakage: gpu-leakage@18 {
+                       reg = <0x18 0x1>;
+               };
+               center_leakage: center-leakage@19 {
+                       reg = <0x19 0x1>;
+               };
+               cpul_leakage: cpu-leakage@1a {
+                       reg = <0x1a 0x1>;
+               };
+               logic_leakage: logic-leakage@1b {
+                       reg = <0x1b 0x1>;
+               };
+               wafer_info: wafer-info@1c {
+                       reg = <0x1c 0x1>;
+               };
+       };
+
        pmucru: pmu-clock-controller@ff750000 {
                u-boot,dm-pre-reloc;
                compatible = "rockchip,rk3399-pmucru";
                reg = <0x0 0xff750000 0x0 0x1000>;
+               rockchip,grf = <&pmugrf>;
                #clock-cells = <1>;
                #reset-cells = <1>;
                assigned-clocks = <&pmucru PLL_PPLL>;
                u-boot,dm-pre-reloc;
                compatible = "rockchip,rk3399-cru";
                reg = <0x0 0xff760000 0x0 0x1000>;
+               rockchip,grf = <&grf>;
                #clock-cells = <1>;
                #reset-cells = <1>;
                assigned-clocks =
                        <&cru ACLK_PERIHP>, <&cru HCLK_PERIHP>,
                        <&cru PCLK_PERIHP>,
                        <&cru ACLK_PERILP0>, <&cru HCLK_PERILP0>,
-                       <&cru PCLK_PERILP0>,
+                       <&cru PCLK_PERILP0>, <&cru ACLK_CCI>,
                        <&cru HCLK_PERILP1>, <&cru PCLK_PERILP1>;
                assigned-clock-rates =
                         <594000000>,  <800000000>,
                         <150000000>,   <75000000>,
                          <37500000>,
                         <100000000>,  <100000000>,
-                         <50000000>,
+                         <50000000>, <600000000>,
                         <100000000>,   <50000000>;
        };
 
                        status = "disabled";
                };
 
+               u2phy0: usb2-phy@e450 {
+                       compatible = "rockchip,rk3399-usb2phy";
+                       reg = <0xe450 0x10>;
+                       clocks = <&cru SCLK_USB2PHY0_REF>;
+                       clock-names = "phyclk";
+                       #clock-cells = <0>;
+                       clock-output-names = "clk_usbphy0_480m";
+                       status = "disabled";
+
+                       u2phy0_host: host-port {
+                               #phy-cells = <0>;
+                               interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH 0>;
+                               interrupt-names = "linestate";
+                               status = "disabled";
+                       };
+
+                       u2phy0_otg: otg-port {
+                               #phy-cells = <0>;
+                               interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH 0>,
+                                            <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH 0>,
+                                            <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH 0>;
+                               interrupt-names = "otg-bvalid", "otg-id",
+                                                 "linestate";
+                               status = "disabled";
+                       };
+               };
+
+               u2phy1: usb2-phy@e460 {
+                       compatible = "rockchip,rk3399-usb2phy";
+                       reg = <0xe460 0x10>;
+                       clocks = <&cru SCLK_USB2PHY1_REF>;
+                       clock-names = "phyclk";
+                       #clock-cells = <0>;
+                       clock-output-names = "clk_usbphy1_480m";
+                       status = "disabled";
+
+                       u2phy1_host: host-port {
+                               #phy-cells = <0>;
+                               interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH 0>;
+                               interrupt-names = "linestate";
+                               status = "disabled";
+                       };
+
+                       u2phy1_otg: otg-port {
+                               #phy-cells = <0>;
+                               interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH 0>,
+                                            <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH 0>,
+                                            <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH 0>;
+                               interrupt-names = "otg-bvalid", "otg-id",
+                                                 "linestate";
+                               status = "disabled";
+                       };
+               };
+
                emmc_phy: phy@f780 {
                        compatible = "rockchip,rk3399-emmc-phy";
                        reg = <0xf780 0x24>;
+                       clocks = <&sdhci>;
+                       clock-names = "emmcclk";
+                       #phy-cells = <0>;
+                       status = "disabled";
+               };
+
+               pcie_phy: pcie-phy {
+                       compatible = "rockchip,rk3399-pcie-phy";
+                       clocks = <&cru SCLK_PCIEPHY_REF>;
+                       clock-names = "refclk";
                        #phy-cells = <0>;
+                       resets = <&cru SRST_PCIEPHY>;
+                       reset-names = "phy";
                        status = "disabled";
                };
        };
 
-       watchdog@ff840000 {
+       watchdog@ff848000 {
                compatible = "snps,dw-wdt";
-               reg = <0x0 0xff840000 0x0 0x100>;
+               reg = <0x0 0xff848000 0x0 0x100>;
                clocks = <&cru PCLK_WDT>;
-               interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
-       };
-
-        gmac: eth@fe300000 {
-                compatible = "rockchip,rk3399-gmac";
-                reg = <0x0 0xfe300000 0x0 0x10000>;
-                rockchip,grf = <&grf>;
-                interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH 0>;
-                interrupt-names = "macirq";
-                clocks = <&cru SCLK_MAC>, <&cru SCLK_MAC_RX>,
-                         <&cru SCLK_MAC_TX>, <&cru SCLK_MACREF>,
-                         <&cru SCLK_MACREF_OUT>, <&cru ACLK_GMAC>,
-                         <&cru PCLK_GMAC>;
-                clock-names = "stmmaceth", "mac_clk_rx",
-                              "mac_clk_tx", "clk_mac_ref",
-                              "clk_mac_refout", "aclk_mac",
-                              "pclk_mac";
-                resets = <&cru SRST_A_GMAC>;
-                reset-names = "stmmaceth";
-                status = "disabled";
-        };
+               interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH 0>;
+       };
+
+       rktimer: rktimer@ff850000 {
+               compatible = "rockchip,rk3399-timer";
+               reg = <0x0 0xff850000 0x0 0x1000>;
+               interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH 0>;
+               clocks = <&cru PCLK_TIMER0>, <&cru SCLK_TIMER00>;
+               clock-names = "pclk", "timer";
+       };
 
        spdif: spdif@ff870000 {
                compatible = "rockchip,rk3399-spdif";
                reg = <0x0 0xff870000 0x0 0x1000>;
-               interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH 0>;
                dmas = <&dmac_bus 7>;
                dma-names = "tx";
                clock-names = "mclk", "hclk";
                clocks = <&cru SCLK_SPDIF_8CH>, <&cru HCLK_SPDIF>;
                pinctrl-names = "default";
                pinctrl-0 = <&spdif_bus>;
+               power-domains = <&power RK3399_PD_SDIOAUDIO>;
                status = "disabled";
        };
 
                compatible = "rockchip,rk3399-i2s", "rockchip,rk3066-i2s";
                reg = <0x0 0xff880000 0x0 0x1000>;
                rockchip,grf = <&grf>;
-               interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH 0>;
                dmas = <&dmac_bus 0>, <&dmac_bus 1>;
                dma-names = "tx", "rx";
                clock-names = "i2s_clk", "i2s_hclk";
                clocks = <&cru SCLK_I2S0_8CH>, <&cru HCLK_I2S0_8CH>;
                pinctrl-names = "default";
                pinctrl-0 = <&i2s0_8ch_bus>;
+               power-domains = <&power RK3399_PD_SDIOAUDIO>;
                status = "disabled";
        };
 
        i2s1: i2s@ff890000 {
                compatible = "rockchip,rk3399-i2s", "rockchip,rk3066-i2s";
                reg = <0x0 0xff890000 0x0 0x1000>;
-               interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH 0>;
                dmas = <&dmac_bus 2>, <&dmac_bus 3>;
                dma-names = "tx", "rx";
                clock-names = "i2s_clk", "i2s_hclk";
                clocks = <&cru SCLK_I2S1_8CH>, <&cru HCLK_I2S1_8CH>;
                pinctrl-names = "default";
                pinctrl-0 = <&i2s1_2ch_bus>;
+               power-domains = <&power RK3399_PD_SDIOAUDIO>;
                status = "disabled";
        };
 
        i2s2: i2s@ff8a0000 {
                compatible = "rockchip,rk3399-i2s", "rockchip,rk3066-i2s";
                reg = <0x0 0xff8a0000 0x0 0x1000>;
-               interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH 0>;
                dmas = <&dmac_bus 4>, <&dmac_bus 5>;
                dma-names = "tx", "rx";
                clock-names = "i2s_clk", "i2s_hclk";
                clocks = <&cru SCLK_I2S2_8CH>, <&cru HCLK_I2S2_8CH>;
+               power-domains = <&power RK3399_PD_SDIOAUDIO>;
                status = "disabled";
        };
 
                status = "disabled";
        };
 
+       vopl: vop@ff8f0000 {
+               u-boot,dm-pre-reloc;
+               compatible = "rockchip,rk3399-vop-lit";
+               reg = <0x0 0xff8f0000 0x0 0x3efc>;
+               interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH 0>;
+               clocks = <&cru ACLK_VOP1>, <&cru DCLK_VOP1>, <&cru HCLK_VOP1>;
+               clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
+               resets = <&cru SRST_A_VOP1>, <&cru SRST_H_VOP1>, <&cru SRST_D_VOP1>;
+               reset-names = "axi", "ahb", "dclk";
+               status = "disabled";
+               vopl_out: port {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       vopl_out_mipi: endpoint@0 {
+                               reg = <3>;
+                               remote-endpoint = <&mipi_in_vopl>;
+                       };
+               };
+       };
+
+       vopb: vop@ff900000 {
+               u-boot,dm-pre-reloc;
+               compatible = "rockchip,rk3399-vop-big";
+               reg = <0x0 0xff900000 0x0 0x3efc>;
+               interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH 0>;
+               clocks = <&cru ACLK_VOP0>, <&cru DCLK_VOP0>, <&cru HCLK_VOP0>;
+               #clock-cells = <0>;
+               clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
+               resets = <&cru SRST_A_VOP0>, <&cru SRST_H_VOP0>, <&cru SRST_D_VOP0>;
+               reset-names = "axi", "ahb", "dclk";
+               status = "disabled";
+               vopb_out: port {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       vopb_out_mipi: endpoint@0 {
+                               reg = <3>;
+                               remote-endpoint = <&mipi_in_vopb>;
+                       };
+               };
+       };
+
+       mipi_dsi: mipi@ff960000 {
+               compatible = "rockchip,rk3399_mipi_dsi";
+               reg = <0x0 0xff960000 0x0 0x8000>;
+               interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH 0>;
+               clocks = <&cru SCLK_MIPIDPHY_REF>, <&cru PCLK_MIPI_DSI0>,
+                        <&cru SCLK_DPHY_TX0_CFG>;
+               clock-names = "ref", "pclk", "phy_cfg";
+               rockchip,grf = <&grf>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <1>;
+                       mipi_in: port {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               mipi_in_vopb: endpoint@0 {
+                                       reg = <0>;
+                                       remote-endpoint = <&vopb_out_mipi>;
+                               };
+                               mipi_in_vopl: endpoint@1 {
+                                       reg = <1>;
+                                       remote-endpoint = <&vopl_out_mipi>;
+                               };
+                       };
+               };
+       };
+
        pinctrl: pinctrl {
                u-boot,dm-pre-reloc;
                compatible = "rockchip,rk3399-pinctrl";
                        compatible = "rockchip,gpio-bank";
                        reg = <0x0 0xff720000 0x0 0x100>;
                        clocks = <&pmucru PCLK_GPIO0_PMU>;
-                       interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH 0>;
 
                        gpio-controller;
                        #gpio-cells = <0x2>;
                        compatible = "rockchip,gpio-bank";
                        reg = <0x0 0xff730000 0x0 0x100>;
                        clocks = <&pmucru PCLK_GPIO1_PMU>;
-                       interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH 0>;
 
                        gpio-controller;
                        #gpio-cells = <0x2>;
                        compatible = "rockchip,gpio-bank";
                        reg = <0x0 0xff780000 0x0 0x100>;
                        clocks = <&cru PCLK_GPIO2>;
-                       interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH 0>;
 
                        gpio-controller;
                        #gpio-cells = <0x2>;
                        compatible = "rockchip,gpio-bank";
                        reg = <0x0 0xff788000 0x0 0x100>;
                        clocks = <&cru PCLK_GPIO3>;
-                       interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH 0>;
 
                        gpio-controller;
                        #gpio-cells = <0x2>;
                        compatible = "rockchip,gpio-bank";
                        reg = <0x0 0xff790000 0x0 0x100>;
                        clocks = <&cru PCLK_GPIO4>;
-                       interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH 0>;
 
                        gpio-controller;
                        #gpio-cells = <0x2>;
                        drive-strength = <13>;
                };
 
+               clock {
+                       clk_32k: clk-32k {
+                               rockchip,pins = <0 RK_PA0 RK_FUNC_2 &pcfg_pull_none>;
+                       };
+               };
+
+               edp {
+                       edp_hpd: edp-hpd {
+                               rockchip,pins =
+                                       <4 RK_PC7 RK_FUNC_2 &pcfg_pull_none>;
+                       };
+               };
+
+               gmac {
+                       rgmii_pins: rgmii-pins {
+                               rockchip,pins =
+                                       /* mac_txclk */
+                                       <3 RK_PC1 RK_FUNC_1 &pcfg_pull_none_13ma>,
+                                       /* mac_rxclk */
+                                       <3 RK_PB6 RK_FUNC_1 &pcfg_pull_none>,
+                                       /* mac_mdio */
+                                       <3 RK_PB5 RK_FUNC_1 &pcfg_pull_none>,
+                                       /* mac_txen */
+                                       <3 RK_PB4 RK_FUNC_1 &pcfg_pull_none_13ma>,
+                                       /* mac_clk */
+                                       <3 RK_PB3 RK_FUNC_1 &pcfg_pull_none>,
+                                       /* mac_rxdv */
+                                       <3 RK_PB1 RK_FUNC_1 &pcfg_pull_none>,
+                                       /* mac_mdc */
+                                       <3 RK_PB0 RK_FUNC_1 &pcfg_pull_none>,
+                                       /* mac_rxd1 */
+                                       <3 RK_PA7 RK_FUNC_1 &pcfg_pull_none>,
+                                       /* mac_rxd0 */
+                                       <3 RK_PA6 RK_FUNC_1 &pcfg_pull_none>,
+                                       /* mac_txd1 */
+                                       <3 RK_PA5 RK_FUNC_1 &pcfg_pull_none_13ma>,
+                                       /* mac_txd0 */
+                                       <3 RK_PA4 RK_FUNC_1 &pcfg_pull_none_13ma>,
+                                       /* mac_rxd3 */
+                                       <3 RK_PA3 RK_FUNC_1 &pcfg_pull_none>,
+                                       /* mac_rxd2 */
+                                       <3 RK_PA2 RK_FUNC_1 &pcfg_pull_none>,
+                                       /* mac_txd3 */
+                                       <3 RK_PA1 RK_FUNC_1 &pcfg_pull_none_13ma>,
+                                       /* mac_txd2 */
+                                       <3 RK_PA0 RK_FUNC_1 &pcfg_pull_none_13ma>;
+                       };
+
+                       rmii_pins: rmii-pins {
+                               rockchip,pins =
+                                       /* mac_mdio */
+                                       <3 RK_PB5 RK_FUNC_1 &pcfg_pull_none>,
+                                       /* mac_txen */
+                                       <3 RK_PB4 RK_FUNC_1 &pcfg_pull_none_13ma>,
+                                       /* mac_clk */
+                                       <3 RK_PB3 RK_FUNC_1 &pcfg_pull_none>,
+                                       /* mac_rxer */
+                                       <3 RK_PB2 RK_FUNC_1 &pcfg_pull_none>,
+                                       /* mac_rxdv */
+                                       <3 RK_PB1 RK_FUNC_1 &pcfg_pull_none>,
+                                       /* mac_mdc */
+                                       <3 RK_PB0 RK_FUNC_1 &pcfg_pull_none>,
+                                       /* mac_rxd1 */
+                                       <3 RK_PA7 RK_FUNC_1 &pcfg_pull_none>,
+                                       /* mac_rxd0 */
+                                       <3 RK_PA6 RK_FUNC_1 &pcfg_pull_none>,
+                                       /* mac_txd1 */
+                                       <3 RK_PA5 RK_FUNC_1 &pcfg_pull_none_13ma>,
+                                       /* mac_txd0 */
+                                       <3 RK_PA4 RK_FUNC_1 &pcfg_pull_none_13ma>;
+                       };
+               };
+
                i2c0 {
                        i2c0_xfer: i2c0-xfer {
                                rockchip,pins =
-                                       <1 15 RK_FUNC_2 &pcfg_pull_none>,
-                                       <1 16 RK_FUNC_2 &pcfg_pull_none>;
+                                       <1 RK_PB7 RK_FUNC_2 &pcfg_pull_none>,
+                                       <1 RK_PC0 RK_FUNC_2 &pcfg_pull_none>;
                        };
                };
 
                i2c1 {
                        i2c1_xfer: i2c1-xfer {
                                rockchip,pins =
-                                       <4 2 RK_FUNC_1 &pcfg_pull_none>,
-                                       <4 1 RK_FUNC_1 &pcfg_pull_none>;
+                                       <4 RK_PA2 RK_FUNC_1 &pcfg_pull_none>,
+                                       <4 RK_PA1 RK_FUNC_1 &pcfg_pull_none>;
                        };
                };
 
                i2c2 {
                        i2c2_xfer: i2c2-xfer {
                                rockchip,pins =
-                                       <2 1 RK_FUNC_2 &pcfg_pull_none_12ma>,
-                                       <2 0 RK_FUNC_2 &pcfg_pull_none_12ma>;
+                                       <2 RK_PA1 RK_FUNC_2 &pcfg_pull_none_12ma>,
+                                       <2 RK_PA0 RK_FUNC_2 &pcfg_pull_none_12ma>;
                        };
                };
 
                i2c3 {
                        i2c3_xfer: i2c3-xfer {
                                rockchip,pins =
-                                       <4 17 RK_FUNC_1 &pcfg_pull_none>,
-                                       <4 16 RK_FUNC_1 &pcfg_pull_none>;
+                                       <4 RK_PC1 RK_FUNC_1 &pcfg_pull_none>,
+                                       <4 RK_PC0 RK_FUNC_1 &pcfg_pull_none>;
                        };
                };
 
                i2c4 {
                        i2c4_xfer: i2c4-xfer {
                                rockchip,pins =
-                                       <1 12 RK_FUNC_1 &pcfg_pull_none>,
-                                       <1 11 RK_FUNC_1 &pcfg_pull_none>;
+                                       <1 RK_PB4 RK_FUNC_1 &pcfg_pull_none>,
+                                       <1 RK_PB3 RK_FUNC_1 &pcfg_pull_none>;
                        };
                };
 
                i2c5 {
                        i2c5_xfer: i2c5-xfer {
                                rockchip,pins =
-                                       <3 11 RK_FUNC_2 &pcfg_pull_none>,
-                                       <3 10 RK_FUNC_2 &pcfg_pull_none>;
+                                       <3 RK_PB3 RK_FUNC_2 &pcfg_pull_none>,
+                                       <3 RK_PB2 RK_FUNC_2 &pcfg_pull_none>;
                        };
                };
 
                i2c6 {
                        i2c6_xfer: i2c6-xfer {
                                rockchip,pins =
-                                       <2 10 RK_FUNC_2 &pcfg_pull_none>,
-                                       <2 9 RK_FUNC_2 &pcfg_pull_none>;
+                                       <2 RK_PB2 RK_FUNC_2 &pcfg_pull_none>,
+                                       <2 RK_PB1 RK_FUNC_2 &pcfg_pull_none>;
                        };
                };
 
                i2c7 {
                        i2c7_xfer: i2c7-xfer {
                                rockchip,pins =
-                                       <2 8 RK_FUNC_2 &pcfg_pull_none>,
-                                       <2 7 RK_FUNC_2 &pcfg_pull_none>;
+                                       <2 RK_PB0 RK_FUNC_2 &pcfg_pull_none>,
+                                       <2 RK_PA7 RK_FUNC_2 &pcfg_pull_none>;
                        };
                };
 
                i2c8 {
                        i2c8_xfer: i2c8-xfer {
                                rockchip,pins =
-                                       <1 21 RK_FUNC_1 &pcfg_pull_none>,
-                                       <1 20 RK_FUNC_1 &pcfg_pull_none>;
+                                       <1 RK_PC5 RK_FUNC_1 &pcfg_pull_none>,
+                                       <1 RK_PC4 RK_FUNC_1 &pcfg_pull_none>;
                        };
                };
 
                i2s0 {
                        i2s0_8ch_bus: i2s0-8ch-bus {
                                rockchip,pins =
-                                       <3 24 RK_FUNC_1 &pcfg_pull_none>,
-                                       <3 25 RK_FUNC_1 &pcfg_pull_none>,
-                                       <3 26 RK_FUNC_1 &pcfg_pull_none>,
-                                       <3 27 RK_FUNC_1 &pcfg_pull_none>,
-                                       <3 28 RK_FUNC_1 &pcfg_pull_none>,
-                                       <3 29 RK_FUNC_1 &pcfg_pull_none>,
-                                       <3 30 RK_FUNC_1 &pcfg_pull_none>,
-                                       <3 31 RK_FUNC_1 &pcfg_pull_none>,
-                                       <4 0 RK_FUNC_1 &pcfg_pull_none>;
+                                       <3 RK_PD0 RK_FUNC_1 &pcfg_pull_none>,
+                                       <3 RK_PD1 RK_FUNC_1 &pcfg_pull_none>,
+                                       <3 RK_PD2 RK_FUNC_1 &pcfg_pull_none>,
+                                       <3 RK_PD3 RK_FUNC_1 &pcfg_pull_none>,
+                                       <3 RK_PD4 RK_FUNC_1 &pcfg_pull_none>,
+                                       <3 RK_PD5 RK_FUNC_1 &pcfg_pull_none>,
+                                       <3 RK_PD6 RK_FUNC_1 &pcfg_pull_none>,
+                                       <3 RK_PD7 RK_FUNC_1 &pcfg_pull_none>,
+                                       <4 RK_PA0 RK_FUNC_1 &pcfg_pull_none>;
                        };
                };
 
                i2s1 {
                        i2s1_2ch_bus: i2s1-2ch-bus {
                                rockchip,pins =
-                                       <4 3 RK_FUNC_1 &pcfg_pull_none>,
-                                       <4 4 RK_FUNC_1 &pcfg_pull_none>,
-                                       <4 5 RK_FUNC_1 &pcfg_pull_none>,
-                                       <4 6 RK_FUNC_1 &pcfg_pull_none>,
-                                       <4 7 RK_FUNC_1 &pcfg_pull_none>;
+                                       <4 RK_PA3 RK_FUNC_1 &pcfg_pull_none>,
+                                       <4 RK_PA4 RK_FUNC_1 &pcfg_pull_none>,
+                                       <4 RK_PA5 RK_FUNC_1 &pcfg_pull_none>,
+                                       <4 RK_PA6 RK_FUNC_1 &pcfg_pull_none>,
+                                       <4 RK_PA7 RK_FUNC_1 &pcfg_pull_none>;
                        };
                };
 
-               gmac {
-                       rgmii_pins: rgmii-pins {
+               sdio0 {
+                       sdio0_bus1: sdio0-bus1 {
                                rockchip,pins =
-                                       /* mac_txclk */
-                                       <3 17 RK_FUNC_1 &pcfg_pull_none_13ma>,
-                                       /* mac_rxclk */
-                                       <3 14 RK_FUNC_1 &pcfg_pull_none>,
-                                       /* mac_mdio */
-                                       <3 13 RK_FUNC_1 &pcfg_pull_none>,
-                                       /* mac_txen */
-                                       <3 12 RK_FUNC_1 &pcfg_pull_none_13ma>,
-                                       /* mac_clk */
-                                       <3 11 RK_FUNC_1 &pcfg_pull_none>,
-                                       /* mac_rxdv */
-                                       <3 9 RK_FUNC_1 &pcfg_pull_none>,
-                                       /* mac_mdc */
-                                       <3 8 RK_FUNC_1 &pcfg_pull_none>,
-                                       /* mac_rxd1 */
-                                       <3 7 RK_FUNC_1 &pcfg_pull_none>,
-                                       /* mac_rxd0 */
-                                       <3 6 RK_FUNC_1 &pcfg_pull_none>,
-                                       /* mac_txd1 */
-                                       <3 5 RK_FUNC_1 &pcfg_pull_none_13ma>,
-                                       /* mac_txd0 */
-                                       <3 4 RK_FUNC_1 &pcfg_pull_none_13ma>,
-                                       /* mac_rxd3 */
-                                       <3 3 RK_FUNC_1 &pcfg_pull_none>,
-                                       /* mac_rxd2 */
-                                       <3 2 RK_FUNC_1 &pcfg_pull_none>,
-                                       /* mac_txd3 */
-                                       <3 1 RK_FUNC_1 &pcfg_pull_none_13ma>,
-                                       /* mac_txd2 */
-                                       <3 0 RK_FUNC_1 &pcfg_pull_none_13ma>;
+                                       <2 RK_PC4 RK_FUNC_1 &pcfg_pull_up>;
+                       };
+
+                       sdio0_bus4: sdio0-bus4 {
+                               rockchip,pins =
+                                       <2 RK_PC4 RK_FUNC_1 &pcfg_pull_up>,
+                                       <2 RK_PC5 RK_FUNC_1 &pcfg_pull_up>,
+                                       <2 RK_PC6 RK_FUNC_1 &pcfg_pull_up>,
+                                       <2 RK_PC7 RK_FUNC_1 &pcfg_pull_up>;
+                       };
+
+                       sdio0_cmd: sdio0-cmd {
+                               rockchip,pins =
+                                       <2 RK_PD0 RK_FUNC_1 &pcfg_pull_up>;
+                       };
+
+                       sdio0_clk: sdio0-clk {
+                               rockchip,pins =
+                                       <2 RK_PD1 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+
+                       sdio0_cd: sdio0-cd {
+                               rockchip,pins =
+                                       <2 RK_PD2 RK_FUNC_1 &pcfg_pull_up>;
+                       };
+
+                       sdio0_pwr: sdio0-pwr {
+                               rockchip,pins =
+                                       <2 RK_PD3 RK_FUNC_1 &pcfg_pull_up>;
+                       };
+
+                       sdio0_bkpwr: sdio0-bkpwr {
+                               rockchip,pins =
+                                       <2 RK_PD4 RK_FUNC_1 &pcfg_pull_up>;
+                       };
+
+                       sdio0_wp: sdio0-wp {
+                               rockchip,pins =
+                                       <0 RK_PA3 RK_FUNC_1 &pcfg_pull_up>;
+                       };
+
+                       sdio0_int: sdio0-int {
+                               rockchip,pins =
+                                       <0 RK_PA4 RK_FUNC_1 &pcfg_pull_up>;
                        };
                };
 
                sdmmc {
                        sdmmc_bus1: sdmmc-bus1 {
                                rockchip,pins =
-                                       <4 8 RK_FUNC_1 &pcfg_pull_up>;
+                                       <4 RK_PB0 RK_FUNC_1 &pcfg_pull_up>;
                        };
 
                        sdmmc_bus4: sdmmc-bus4 {
                                rockchip,pins =
-                                       <4 8 RK_FUNC_1 &pcfg_pull_up>,
-                                       <4 9 RK_FUNC_1 &pcfg_pull_up>,
-                                       <4 10 RK_FUNC_1 &pcfg_pull_up>,
-                                       <4 11 RK_FUNC_1 &pcfg_pull_up>;
+                                       <4 RK_PB0 RK_FUNC_1 &pcfg_pull_up>,
+                                       <4 RK_PB1 RK_FUNC_1 &pcfg_pull_up>,
+                                       <4 RK_PB2 RK_FUNC_1 &pcfg_pull_up>,
+                                       <4 RK_PB3 RK_FUNC_1 &pcfg_pull_up>;
                        };
 
                        sdmmc_clk: sdmmc-clk {
                                rockchip,pins =
-                                       <4 12 RK_FUNC_1 &pcfg_pull_none>;
+                                       <4 RK_PB4 RK_FUNC_1 &pcfg_pull_none>;
                        };
 
                        sdmmc_cmd: sdmmc-cmd {
                                rockchip,pins =
-                                       <4 13 RK_FUNC_1 &pcfg_pull_up>;
+                                       <4 RK_PB5 RK_FUNC_1 &pcfg_pull_up>;
                        };
 
                        sdmmc_cd: sdmcc-cd {
                                rockchip,pins =
-                                       <0 7 RK_FUNC_1 &pcfg_pull_up>;
+                                       <0 RK_PA7 RK_FUNC_1 &pcfg_pull_up>;
                        };
 
                        sdmmc_wp: sdmmc-wp {
                                rockchip,pins =
-                                       <0 8 RK_FUNC_1 &pcfg_pull_up>;
+                                       <0 RK_PB0 RK_FUNC_1 &pcfg_pull_up>;
+                       };
+               };
+
+               sleep {
+                       ap_pwroff: ap-pwroff {
+                               rockchip,pins = <1 RK_PA5 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+
+                       ddrio_pwroff: ddrio-pwroff {
+                               rockchip,pins = <0 RK_PA1 RK_FUNC_1 &pcfg_pull_none>;
                        };
                };
 
                spdif {
                        spdif_bus: spdif-bus {
                                rockchip,pins =
-                                       <4 21 RK_FUNC_1 &pcfg_pull_none>;
+                                       <4 RK_PC5 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+
+                       spdif_bus_1: spdif-bus-1 {
+                               rockchip,pins =
+                                       <3 RK_PC0 RK_FUNC_3 &pcfg_pull_none>;
                        };
                };
 
                spi0 {
                        spi0_clk: spi0-clk {
                                rockchip,pins =
-                                       <3 6 RK_FUNC_2 &pcfg_pull_up>;
+                                       <3 RK_PA6 RK_FUNC_2 &pcfg_pull_up>;
                        };
                        spi0_cs0: spi0-cs0 {
                                rockchip,pins =
-                                       <3 7 RK_FUNC_2 &pcfg_pull_up>;
+                                       <3 RK_PA7 RK_FUNC_2 &pcfg_pull_up>;
                        };
                        spi0_cs1: spi0-cs1 {
                                rockchip,pins =
-                                       <3 8 RK_FUNC_2 &pcfg_pull_up>;
+                                       <3 RK_PB0 RK_FUNC_2 &pcfg_pull_up>;
                        };
                        spi0_tx: spi0-tx {
                                rockchip,pins =
-                                       <3 5 RK_FUNC_2 &pcfg_pull_up>;
+                                       <3 RK_PA5 RK_FUNC_2 &pcfg_pull_up>;
                        };
                        spi0_rx: spi0-rx {
                                rockchip,pins =
-                                       <3 4 RK_FUNC_2 &pcfg_pull_up>;
+                                       <3 RK_PA4 RK_FUNC_2 &pcfg_pull_up>;
                        };
                };
 
                spi1 {
                        spi1_clk: spi1-clk {
                                rockchip,pins =
-                                       <1 9 RK_FUNC_2 &pcfg_pull_up>;
+                                       <1 RK_PB1 RK_FUNC_2 &pcfg_pull_up>;
                        };
                        spi1_cs0: spi1-cs0 {
                                rockchip,pins =
-                                       <1 10 RK_FUNC_2 &pcfg_pull_up>;
+                                       <1 RK_PB2 RK_FUNC_2 &pcfg_pull_up>;
                        };
                        spi1_rx: spi1-rx {
                                rockchip,pins =
-                                       <1 7 RK_FUNC_2 &pcfg_pull_up>;
+                                       <1 RK_PA7 RK_FUNC_2 &pcfg_pull_up>;
                        };
                        spi1_tx: spi1-tx {
                                rockchip,pins =
-                                       <1 8 RK_FUNC_2 &pcfg_pull_up>;
+                                       <1 RK_PB0 RK_FUNC_2 &pcfg_pull_up>;
                        };
                };
 
                spi2 {
                        spi2_clk: spi2-clk {
                                rockchip,pins =
-                                       <2 11 RK_FUNC_1 &pcfg_pull_up>;
+                                       <2 RK_PB3 RK_FUNC_1 &pcfg_pull_up>;
                        };
                        spi2_cs0: spi2-cs0 {
                                rockchip,pins =
-                                       <2 12 RK_FUNC_1 &pcfg_pull_up>;
+                                       <2 RK_PB4 RK_FUNC_1 &pcfg_pull_up>;
                        };
                        spi2_rx: spi2-rx {
                                rockchip,pins =
-                                       <2 9 RK_FUNC_1 &pcfg_pull_up>;
+                                       <2 RK_PB1 RK_FUNC_1 &pcfg_pull_up>;
                        };
                        spi2_tx: spi2-tx {
                                rockchip,pins =
-                                       <2 10 RK_FUNC_1 &pcfg_pull_up>;
+                                       <2 RK_PB2 RK_FUNC_1 &pcfg_pull_up>;
                        };
                };
 
                spi3 {
                        spi3_clk: spi3-clk {
                                rockchip,pins =
-                                       <1 17 RK_FUNC_1 &pcfg_pull_up>;
+                                       <1 RK_PC1 RK_FUNC_1 &pcfg_pull_up>;
                        };
                        spi3_cs0: spi3-cs0 {
                                rockchip,pins =
-                                       <1 18 RK_FUNC_1 &pcfg_pull_up>;
+                                       <1 RK_PC2 RK_FUNC_1 &pcfg_pull_up>;
                        };
                        spi3_rx: spi3-rx {
                                rockchip,pins =
-                                       <1 15 RK_FUNC_1 &pcfg_pull_up>;
+                                       <1 RK_PB7 RK_FUNC_1 &pcfg_pull_up>;
                        };
                        spi3_tx: spi3-tx {
                                rockchip,pins =
-                                       <1 16 RK_FUNC_1 &pcfg_pull_up>;
+                                       <1 RK_PC0 RK_FUNC_1 &pcfg_pull_up>;
                        };
                };
 
                spi4 {
                        spi4_clk: spi4-clk {
                                rockchip,pins =
-                                       <3 2 RK_FUNC_2 &pcfg_pull_up>;
+                                       <3 RK_PA2 RK_FUNC_2 &pcfg_pull_up>;
                        };
                        spi4_cs0: spi4-cs0 {
                                rockchip,pins =
-                                       <3 3 RK_FUNC_2 &pcfg_pull_up>;
+                                       <3 RK_PA3 RK_FUNC_2 &pcfg_pull_up>;
                        };
                        spi4_rx: spi4-rx {
                                rockchip,pins =
-                                       <3 0 RK_FUNC_2 &pcfg_pull_up>;
+                                       <3 RK_PA0 RK_FUNC_2 &pcfg_pull_up>;
                        };
                        spi4_tx: spi4-tx {
                                rockchip,pins =
-                                       <3 1 RK_FUNC_2 &pcfg_pull_up>;
+                                       <3 RK_PA1 RK_FUNC_2 &pcfg_pull_up>;
                        };
                };
 
                spi5 {
                        spi5_clk: spi5-clk {
                                rockchip,pins =
-                                       <2 22 RK_FUNC_2 &pcfg_pull_up>;
+                                       <2 RK_PC6 RK_FUNC_2 &pcfg_pull_up>;
                        };
                        spi5_cs0: spi5-cs0 {
                                rockchip,pins =
-                                       <2 23 RK_FUNC_2 &pcfg_pull_up>;
+                                       <2 RK_PC7 RK_FUNC_2 &pcfg_pull_up>;
                        };
                        spi5_rx: spi5-rx {
                                rockchip,pins =
-                                       <2 20 RK_FUNC_2 &pcfg_pull_up>;
+                                       <2 RK_PC4 RK_FUNC_2 &pcfg_pull_up>;
                        };
                        spi5_tx: spi5-tx {
                                rockchip,pins =
-                                       <2 21 RK_FUNC_2 &pcfg_pull_up>;
+                                       <2 RK_PC5 RK_FUNC_2 &pcfg_pull_up>;
+                       };
+               };
+
+               tsadc {
+                       otp_gpio: otp-gpio {
+                               rockchip,pins = <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+                       };
+
+                       otp_out: otp-out {
+                               rockchip,pins = <1 RK_PA6 RK_FUNC_1 &pcfg_pull_none>;
                        };
                };
 
                uart0 {
                        uart0_xfer: uart0-xfer {
                                rockchip,pins =
-                                       <2 16 RK_FUNC_1 &pcfg_pull_up>,
-                                       <2 17 RK_FUNC_1 &pcfg_pull_none>;
+                                       <2 RK_PC0 RK_FUNC_1 &pcfg_pull_up>,
+                                       <2 RK_PC1 RK_FUNC_1 &pcfg_pull_none>;
                        };
 
                        uart0_cts: uart0-cts {
                                rockchip,pins =
-                                       <2 18 RK_FUNC_1 &pcfg_pull_none>;
+                                       <2 RK_PC2 RK_FUNC_1 &pcfg_pull_none>;
                        };
 
                        uart0_rts: uart0-rts {
                                rockchip,pins =
-                                       <2 19 RK_FUNC_1 &pcfg_pull_none>;
+                                       <2 RK_PC3 RK_FUNC_1 &pcfg_pull_none>;
                        };
                };
 
                uart1 {
                        uart1_xfer: uart1-xfer {
                                rockchip,pins =
-                                       <3 12 RK_FUNC_2 &pcfg_pull_up>,
-                                       <3 13 RK_FUNC_2 &pcfg_pull_none>;
+                                       <3 RK_PB4 RK_FUNC_2 &pcfg_pull_up>,
+                                       <3 RK_PB5 RK_FUNC_2 &pcfg_pull_none>;
                        };
                };
 
                uart2a {
                        uart2a_xfer: uart2a-xfer {
                                rockchip,pins =
-                                       <4 8 RK_FUNC_2 &pcfg_pull_up>,
-                                       <4 9 RK_FUNC_2 &pcfg_pull_none>;
+                                       <4 RK_PB0 RK_FUNC_2 &pcfg_pull_up>,
+                                       <4 RK_PB1 RK_FUNC_2 &pcfg_pull_none>;
                        };
                };
 
                uart2b {
                        uart2b_xfer: uart2b-xfer {
                                rockchip,pins =
-                                       <4 16 RK_FUNC_2 &pcfg_pull_up>,
-                                       <4 17 RK_FUNC_2 &pcfg_pull_none>;
+                                       <4 RK_PC0 RK_FUNC_2 &pcfg_pull_up>,
+                                       <4 RK_PC1 RK_FUNC_2 &pcfg_pull_none>;
                        };
                };
 
                uart2c {
                        uart2c_xfer: uart2c-xfer {
                                rockchip,pins =
-                                       <4 19 RK_FUNC_1 &pcfg_pull_up>,
-                                       <4 20 RK_FUNC_1 &pcfg_pull_none>;
+                                       <4 RK_PC3 RK_FUNC_1 &pcfg_pull_up>,
+                                       <4 RK_PC4 RK_FUNC_1 &pcfg_pull_none>;
                        };
                };
 
                uart3 {
                        uart3_xfer: uart3-xfer {
                                rockchip,pins =
-                                       <3 14 RK_FUNC_2 &pcfg_pull_up>,
-                                       <3 15 RK_FUNC_2 &pcfg_pull_none>;
+                                       <3 RK_PB6 RK_FUNC_2 &pcfg_pull_up>,
+                                       <3 RK_PB7 RK_FUNC_2 &pcfg_pull_none>;
                        };
 
                        uart3_cts: uart3-cts {
                                rockchip,pins =
-                                       <3 18 RK_FUNC_2 &pcfg_pull_none>;
+                                       <3 RK_PC2 RK_FUNC_2 &pcfg_pull_none>;
                        };
 
                        uart3_rts: uart3-rts {
                                rockchip,pins =
-                                       <3 19 RK_FUNC_2 &pcfg_pull_none>;
+                                       <3 RK_PC3 RK_FUNC_2 &pcfg_pull_none>;
                        };
                };
 
                uart4 {
                        uart4_xfer: uart4-xfer {
                                rockchip,pins =
-                                       <1 7 RK_FUNC_1 &pcfg_pull_up>,
-                                       <1 8 RK_FUNC_1 &pcfg_pull_none>;
+                                       <1 RK_PA7 RK_FUNC_1 &pcfg_pull_up>,
+                                       <1 RK_PB0 RK_FUNC_1 &pcfg_pull_none>;
                        };
                };
 
                uarthdcp {
                        uarthdcp_xfer: uarthdcp-xfer {
                                rockchip,pins =
-                                       <4 21 RK_FUNC_2 &pcfg_pull_up>,
-                                       <4 22 RK_FUNC_2 &pcfg_pull_none>;
+                                       <4 RK_PC5 RK_FUNC_2 &pcfg_pull_up>,
+                                       <4 RK_PC6 RK_FUNC_2 &pcfg_pull_none>;
                        };
                };
 
                pwm0 {
                        pwm0_pin: pwm0-pin {
                                rockchip,pins =
-                                       <4 18 RK_FUNC_1 &pcfg_pull_none>;
+                                       <4 RK_PC2 RK_FUNC_1 &pcfg_pull_none>;
                        };
 
                        vop0_pwm_pin: vop0-pwm-pin {
                                rockchip,pins =
-                                       <4 18 RK_FUNC_2 &pcfg_pull_none>;
+                                       <4 RK_PC2 RK_FUNC_2 &pcfg_pull_none>;
                        };
                };
 
                pwm1 {
                        pwm1_pin: pwm1-pin {
                                rockchip,pins =
-                                       <4 22 RK_FUNC_1 &pcfg_pull_none>;
+                                       <4 RK_PC6 RK_FUNC_1 &pcfg_pull_none>;
                        };
 
                        vop1_pwm_pin: vop1-pwm-pin {
                                rockchip,pins =
-                                       <4 18 RK_FUNC_3 &pcfg_pull_none>;
+                                       <4 RK_PC2 RK_FUNC_3 &pcfg_pull_none>;
                        };
                };
 
                pwm2 {
                        pwm2_pin: pwm2-pin {
                                rockchip,pins =
-                                       <1 19 RK_FUNC_1 &pcfg_pull_none>;
+                                       <1 RK_PC3 RK_FUNC_1 &pcfg_pull_none>;
                        };
                };
 
                pwm3a {
                        pwm3a_pin: pwm3a-pin {
                                rockchip,pins =
-                                       <0 6 RK_FUNC_1 &pcfg_pull_none>;
+                                       <0 RK_PA6 RK_FUNC_1 &pcfg_pull_none>;
                        };
                };
 
                pwm3b {
                        pwm3b_pin: pwm3b-pin {
                                rockchip,pins =
-                                       <1 14 RK_FUNC_1 &pcfg_pull_none>;
+                                       <1 RK_PB6 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               hdmi {
+                       hdmi_i2c_xfer: hdmi-i2c-xfer {
+                               rockchip,pins =
+                                       <4 RK_PC1 RK_FUNC_3 &pcfg_pull_none>,
+                                       <4 RK_PC0 RK_FUNC_3 &pcfg_pull_none>;
+                       };
+
+                       hdmi_cec: hdmi-cec {
+                               rockchip,pins =
+                                       <4 RK_PC7 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               pcie {
+                       pcie_clkreqn: pci-clkreqn {
+                               rockchip,pins =
+                                       <2 RK_PD2 RK_FUNC_2 &pcfg_pull_none>;
+                       };
+
+                       pcie_clkreqnb: pci-clkreqnb {
+                               rockchip,pins =
+                                       <4 RK_PD0 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+
+                       pcie_clkreqn_cpm: pci-clkreqn-cpm {
+                               rockchip,pins =
+                                       <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
+                       };
+
+                       pcie_clkreqnb_cpm: pci-clkreqnb-cpm {
+                               rockchip,pins =
+                                       <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
                        };
                };
+
        };
 };
index a881d9e05c071772b6b00c54f87e0f728fc73c8e..8d89b83b530d69d686c21a8f3070e3eef5f8832a 100644 (file)
@@ -29,6 +29,7 @@
                compatible = "simple-bus";
                #address-cells = <1>;
                #size-cells = <1>;
+               u-boot,dm-pre-reloc;
 
                usb1: ohci@00400000 {
                        compatible = "atmel,at91rm9200-ohci", "usb-ohci";
@@ -66,6 +67,7 @@
                        compatible = "simple-bus";
                        #address-cells = <1>;
                        #size-cells = <1>;
+                       u-boot,dm-pre-reloc;
 
                        pmc: pmc@f0014000 {
                                compatible = "atmel,sama5d2-pmc", "syscon";
                                #address-cells = <1>;
                                #size-cells = <0>;
                                #interrupt-cells = <1>;
+                               u-boot,dm-pre-reloc;
 
                                main: mainck {
                                        compatible = "atmel,at91sam9x5-clk-main";
                                        #clock-cells = <0>;
+                                       u-boot,dm-pre-reloc;
                                };
 
                                plla: pllack@0 {
@@ -87,6 +91,7 @@
                                        atmel,clk-input-range = <12000000 12000000>;
                                        #atmel,pll-clk-output-range-cells = <4>;
                                        atmel,pll-clk-output-ranges = <600000000 1200000000 0 0>;
+                                       u-boot,dm-pre-reloc;
                                };
 
                                plladiv: plladivck {
                                        compatible = "atmel,at91sam9x5-clk-utmi";
                                        #clock-cells = <0>;
                                        clocks = <&main>;
+                                       u-boot,dm-pre-reloc;
                                };
 
                                mck: masterck {
                                        clocks = <&main>, <&plladiv>, <&utmi>;
                                        atmel,clk-output-range = <124000000 166000000>;
                                        atmel,clk-divisors = <1 2 4 3>;
+                                       u-boot,dm-pre-reloc;
                                };
 
                                h32ck: h32mxck {
                                        #clock-cells = <0>;
                                        compatible = "atmel,sama5d4-clk-h32mx";
                                        clocks = <&mck>;
+                                       u-boot,dm-pre-reloc;
                                };
 
                                usb: usbck {
                                        #address-cells = <1>;
                                        #size-cells = <0>;
                                        clocks = <&h32ck>;
+                                       u-boot,dm-pre-reloc;
 
                                        macb0_clk: macb0_clk@5 {
                                                #clock-cells = <0>;
                                                #clock-cells = <0>;
                                                reg = <18>;
                                                atmel,clk-output-range = <0 83000000>;
+                                               u-boot,dm-pre-reloc;
                                        };
 
                                        flx0_clk: flx0_clk@19 {
                                                #clock-cells = <0>;
                                                reg = <25>;
                                                atmel,clk-output-range = <0 83000000>;
+                                               u-boot,dm-pre-reloc;
                                        };
 
                                        uart2_clk: uart2_clk@26 {
                                                #clock-cells = <0>;
                                                reg = <33>;
                                                atmel,clk-output-range = <0 83000000>;
+                                               u-boot,dm-pre-reloc;
                                        };
 
                                        spi1_clk: spi1_clk@34 {
                                        #address-cells = <1>;
                                        #size-cells = <0>;
                                        clocks = <&mck>;
+                                       u-boot,dm-pre-reloc;
 
                                        dma0_clk: dma0_clk@6 {
                                                #clock-cells = <0>;
                                        sdmmc0_hclk: sdmmc0_hclk@31 {
                                                #clock-cells = <0>;
                                                reg = <31>;
+                                               u-boot,dm-pre-reloc;
                                        };
 
                                        sdmmc1_hclk: sdmmc1_hclk@32 {
                                                #clock-cells = <0>;
                                                reg = <32>;
+                                               u-boot,dm-pre-reloc;
                                        };
 
                                        lcdc_clk: lcdc_clk@45 {
                                        #size-cells = <0>;
                                        interrupt-parent = <&pmc>;
                                        clocks = <&main>, <&plla>, <&utmi>, <&mck>;
+                                       u-boot,dm-pre-reloc;
 
                                        sdmmc0_gclk: sdmmc0_gclk@31 {
                                                #clock-cells = <0>;
                                                reg = <31>;
+                                               u-boot,dm-pre-reloc;
                                        };
 
                                        sdmmc1_gclk: sdmmc1_gclk@32 {
                                                #clock-cells = <0>;
                                                reg = <32>;
+                                               u-boot,dm-pre-reloc;
                                        };
 
                                        tcb0_gclk: tcb0_gclk@35 {
                        uart1: serial@f8020000 {
                                compatible = "atmel,at91sam9260-usart";
                                reg = <0xf8020000 0x100>;
+                               clocks = <&uart1_clk>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                clocks = <&pioA_clk>;
                                gpio-controller;
                                #gpio-cells = <2>;
+                               u-boot,dm-pre-reloc;
 
                                pinctrl {
                                        compatible = "atmel,sama5d2-pinctrl";
+                                       u-boot,dm-pre-reloc;
                                };
                        };
                };
diff --git a/arch/arm/dts/twl4030.dtsi b/arch/arm/dts/twl4030.dtsi
new file mode 100644 (file)
index 0000000..6cb0a01
--- /dev/null
@@ -0,0 +1,161 @@
+/*
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/*
+ * Integrated Power Management Chip
+ */
+&twl {
+       compatible = "ti,twl4030";
+       interrupt-controller;
+       #interrupt-cells = <1>;
+
+       rtc {
+               compatible = "ti,twl4030-rtc";
+               interrupts = <11>;
+       };
+
+       charger: bci {
+               compatible = "ti,twl4030-bci";
+               interrupts = <9>, <2>;
+               bci3v1-supply = <&vusb3v1>;
+       };
+
+       watchdog {
+               compatible = "ti,twl4030-wdt";
+       };
+
+       vaux1: regulator-vaux1 {
+               compatible = "ti,twl4030-vaux1";
+       };
+
+       vaux2: regulator-vaux2 {
+               compatible = "ti,twl4030-vaux2";
+       };
+
+       vaux3: regulator-vaux3 {
+               compatible = "ti,twl4030-vaux3";
+       };
+
+       vaux4: regulator-vaux4 {
+               compatible = "ti,twl4030-vaux4";
+       };
+
+       vcc: regulator-vdd1 {
+               compatible = "ti,twl4030-vdd1";
+               regulator-min-microvolt = <600000>;
+               regulator-max-microvolt = <1450000>;
+       };
+
+       vdac: regulator-vdac {
+               compatible = "ti,twl4030-vdac";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+       };
+
+       vio: regulator-vio {
+               compatible = "ti,twl4030-vio";
+       };
+
+       vintana1: regulator-vintana1 {
+               compatible = "ti,twl4030-vintana1";
+       };
+
+       vintana2: regulator-vintana2 {
+               compatible = "ti,twl4030-vintana2";
+       };
+
+       vintdig: regulator-vintdig {
+               compatible = "ti,twl4030-vintdig";
+       };
+
+       vmmc1: regulator-vmmc1 {
+               compatible = "ti,twl4030-vmmc1";
+               regulator-min-microvolt = <1850000>;
+               regulator-max-microvolt = <3150000>;
+       };
+
+       vmmc2: regulator-vmmc2 {
+               compatible = "ti,twl4030-vmmc2";
+               regulator-min-microvolt = <1850000>;
+               regulator-max-microvolt = <3150000>;
+       };
+
+       vusb1v5: regulator-vusb1v5 {
+               compatible = "ti,twl4030-vusb1v5";
+       };
+
+       vusb1v8: regulator-vusb1v8 {
+               compatible = "ti,twl4030-vusb1v8";
+       };
+
+       vusb3v1: regulator-vusb3v1 {
+               compatible = "ti,twl4030-vusb3v1";
+       };
+
+       vpll1: regulator-vpll1 {
+               compatible = "ti,twl4030-vpll1";
+       };
+
+       vpll2: regulator-vpll2 {
+               compatible = "ti,twl4030-vpll2";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+       };
+
+       vsim: regulator-vsim {
+               compatible = "ti,twl4030-vsim";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <3000000>;
+       };
+
+       twl_gpio: gpio {
+               compatible = "ti,twl4030-gpio";
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+       };
+
+       usb2_phy: twl4030-usb {
+               compatible = "ti,twl4030-usb";
+               interrupts = <10>, <4>;
+               usb1v5-supply = <&vusb1v5>;
+               usb1v8-supply = <&vusb1v8>;
+               usb3v1-supply = <&vusb3v1>;
+               usb_mode = <1>;
+               #phy-cells = <0>;
+       };
+
+       twl_pwm: pwm {
+               compatible = "ti,twl4030-pwm";
+               #pwm-cells = <2>;
+       };
+
+       twl_pwmled: pwmled {
+               compatible = "ti,twl4030-pwmled";
+               #pwm-cells = <2>;
+       };
+
+       twl_pwrbutton: pwrbutton {
+               compatible = "ti,twl4030-pwrbutton";
+               interrupts = <8>;
+       };
+
+       twl_keypad: keypad {
+               compatible = "ti,twl4030-keypad";
+               interrupts = <1>;
+               keypad,num-rows = <8>;
+               keypad,num-columns = <8>;
+       };
+
+       twl_madc: madc {
+               compatible = "ti,twl4030-madc";
+               interrupts = <3>;
+               #io-channel-cells = <1>;
+       };
+};
diff --git a/arch/arm/dts/twl4030_omap3.dtsi b/arch/arm/dts/twl4030_omap3.dtsi
new file mode 100644 (file)
index 0000000..f9aaa53
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2013 Linaro, Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+&twl {
+       pinctrl-names = "default";
+       pinctrl-0 = <&twl4030_pins &twl4030_vpins>;
+};
+
+&omap3_pmx_core {
+       /*
+        * On most OMAP3 platforms, the twl4030 IRQ line is connected
+        * to the SYS_NIRQ line on OMAP.  Therefore, configure the
+        * defaults for the SYS_NIRQ pin here.
+        */
+       twl4030_pins: pinmux_twl4030_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x21e0, PIN_INPUT_PULLUP | PIN_OFF_WAKEUPENABLE | MUX_MODE0) /* sys_nirq.sys_nirq */
+               >;
+       };
+};
+
+/*
+ * If your board is not using the I2C4 pins with twl4030, then don't include
+ * this file. For proper idle mode signaling with sys_clkreq and sys_off_mode
+ * pins we need to configure I2C4, or else use the legacy sys_nvmode1 and
+ * sys_nvmode2 signaling.
+ */
+&omap3_pmx_wkup {
+       twl4030_vpins: pinmux_twl4030_vpins {
+               pinctrl-single,pins = <
+                       OMAP3_WKUP_IOPAD(0x2a00, PIN_INPUT | MUX_MODE0)         /* i2c4_scl.i2c4_scl */
+                       OMAP3_WKUP_IOPAD(0x2a02, PIN_INPUT | MUX_MODE0)         /* i2c4_sda.i2c4_sda */
+                       OMAP3_WKUP_IOPAD(0x2a06, PIN_OUTPUT | MUX_MODE0)        /* sys_clkreq.sys_clkreq */
+                       OMAP3_WKUP_IOPAD(0x2a18, PIN_OUTPUT | MUX_MODE0)        /* sys_off_mode.sys_off_mode */
+               >;
+       };
+};
index 5294a90ccfda1afc725149269babccb5c8aba07b..af7a22f22c217c4dcdb2748fc3ac1012f37e4d75 100644 (file)
                        pinctrl-0 = <&pinctrl_system_bus>;
                };
 
-               smpctrl@59800000 {
+               smpctrl@59801000 {
                        compatible = "socionext,uniphier-smpctrl";
                        reg = <0x59801000 0x400>;
                };
index 290647148de85c4abd467e903cec674d3944b8b2..dccb56938ea04625a74fb7b9757570eab3f8fdca 100644 (file)
                        pinctrl-0 = <&pinctrl_system_bus>;
                };
 
-               smpctrl@59800000 {
+               smpctrl@59801000 {
                        compatible = "socionext,uniphier-smpctrl";
                        reg = <0x59801000 0x400>;
                };
index 0d3d963ffb7dcb2e5bea4408eacc50a75fb6faef..0fd4cbf19ddaf0892eacb38acd3b9e44d77d35f6 100644 (file)
@@ -4,7 +4,43 @@
  * Copyright (C) 2015-2016 Socionext Inc.
  *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
- * SPDX-License-Identifier:    GPL-2.0+        X11
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 / {
                        pinctrl-0 = <&pinctrl_system_bus>;
                };
 
-               smpctrl@59800000 {
+               smpctrl@59801000 {
                        compatible = "socionext,uniphier-smpctrl";
                        reg = <0x59801000 0x400>;
                };
                };
 
                nand: nand@68000000 {
-                       compatible = "socionext,denali-nand-v5a";
+                       compatible = "socionext,uniphier-denali-nand-v5a";
                        status = "disabled";
                        reg-names = "nand_data", "denali_reg";
                        reg = <0x68000000 0x20>, <0x68100000 0x1000>;
index 210ac27093dc038d86f0e1708a2ce7d7059901f4..c21b1596745f401e2460d341b8eaeeecea6aec9c 100644 (file)
@@ -4,7 +4,43 @@
  * Copyright (C) 2015-2016 Socionext Inc.
  *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
- * SPDX-License-Identifier:    GPL-2.0+        X11
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 / {
                        pinctrl-0 = <&pinctrl_system_bus>;
                };
 
-               smpctrl@59800000 {
+               smpctrl@59801000 {
                        compatible = "socionext,uniphier-smpctrl";
                        reg = <0x59801000 0x400>;
                };
                };
 
                nand: nand@68000000 {
-                       compatible = "socionext,denali-nand-v5a";
+                       compatible = "socionext,uniphier-denali-nand-v5a";
                        status = "disabled";
                        reg-names = "nand_data", "denali_reg";
                        reg = <0x68000000 0x20>, <0x68100000 0x1000>;
index 2c8558cb4d87027fac3b1face7e6e48d0ff1951f..4180d8ec1fcde4c0c3efbdc94543f19269a185ca 100644 (file)
                        pinctrl-0 = <&pinctrl_system_bus>;
                };
 
-               smpctrl@59800000 {
+               smpctrl@59801000 {
                        compatible = "socionext,uniphier-smpctrl";
                        reg = <0x59801000 0x400>;
                };
index 6cd3a93b5814973206aa5ba760d1c454a02f4901..fb9d26a5e62ee9540f4010eb363eba84f887c194 100644 (file)
                        pinctrl-0 = <&pinctrl_system_bus>;
                };
 
-               smpctrl@59800000 {
+               smpctrl@59801000 {
                        compatible = "socionext,uniphier-smpctrl";
                        reg = <0x59801000 0x400>;
                };
index 76b656652cba2431353e0dbdf0dc1e2d8c6254c4..cdf7f9005f73fa2ee50ac40e0549300cd7749555 100644 (file)
@@ -4,7 +4,43 @@
  * Copyright (C) 2017 Socionext Inc.
  *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
- * SPDX-License-Identifier:    GPL-2.0+        X11
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 /memreserve/ 0x80000000 0x00080000;
                        pinctrl-0 = <&pinctrl_system_bus>;
                };
 
-               smpctrl@59800000 {
+               smpctrl@59801000 {
                        compatible = "socionext,uniphier-smpctrl";
                        reg = <0x59801000 0x400>;
                };
index 9e458d3fcec759edd96cea70e64a890b4b7ed5e7..b54e7a9bae1775e85e3227885eddc5a0ee54655d 100644 (file)
@@ -4,7 +4,43 @@
  * Copyright (C) 2015-2016 Socionext Inc.
  *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
- * SPDX-License-Identifier:    GPL-2.0+        X11
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 / {
                        #size-cells = <1>;
                };
 
-               smpctrl@59800000 {
+               smpctrl@59801000 {
                        compatible = "socionext,uniphier-smpctrl";
                        reg = <0x59801000 0x400>;
                };
                };
 
                nand: nand@f8000000 {
-                       compatible = "socionext,denali-nand-v5a";
+                       compatible = "socionext,uniphier-denali-nand-v5a";
                        status = "disabled";
                        reg-names = "nand_data", "denali_reg";
                        reg = <0xf8000000 0x20>, <0xf8100000 0x1000>;
index 4117132d01714d1eab6b9e0bea2325d2e5d13a8f..b6934afbdbff6a5872b3e2cdf77965e73010a6cd 100644 (file)
@@ -4,7 +4,43 @@
  * Copyright (C) 2015-2016 Socionext Inc.
  *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
- * SPDX-License-Identifier:    GPL-2.0+        X11
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 / {
                        pinctrl-0 = <&pinctrl_system_bus>;
                };
 
-               smpctrl@59800000 {
+               smpctrl@59801000 {
                        compatible = "socionext,uniphier-smpctrl";
                        reg = <0x59801000 0x400>;
                };
                };
 
                nand: nand@68000000 {
-                       compatible = "socionext,denali-nand-v5a";
+                       compatible = "socionext,uniphier-denali-nand-v5a";
                        status = "disabled";
                        reg-names = "nand_data", "denali_reg";
                        reg = <0x68000000 0x20>, <0x68100000 0x1000>;
index 924f2296e6e8d1895a4664207dd656b0e554b904..fdbf0f6e99aecde72085126baf2f136aa7006c25 100644 (file)
@@ -4,7 +4,43 @@
  * Copyright (C) 2015-2017 Socionext Inc.
  *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
- * SPDX-License-Identifier:    GPL-2.0+        X11
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 &system_bus {
                #size-cells = <1>;
                ranges = <0x00000000 1 0x01f00000 0x00100000>;
 
-               ethsc: ethernet@00000000 {
+               ethsc: ethernet@0 {
                        compatible = "smsc,lan9118", "smsc,lan9115";
                        reg = <0x00000000 0x1000>;
                        phy-mode = "mii";
                        reg-io-width = <4>;
                };
 
-               serialsc: uart@000b0000 {
+               serialsc: uart@b0000 {
                        compatible = "ns16550a";
                        reg = <0x000b0000 0x20>;
                        clock-frequency = <12288000>;
index acf3fd55a881cf7dcf7699f1a00370340bf6f2d6..19ccf5c8dbb18f98900d93365bec4efb6baac602 100644 (file)
@@ -12,6 +12,7 @@
 #define _CLOCKS_H_
 
 #include <asm/arch/clocks_am33xx.h>
+#include <asm/arch/hardware.h>
 
 #ifdef CONFIG_TI81XX
 #include <asm/arch/clock_ti81xx.h>
@@ -103,6 +104,12 @@ extern const struct dpll_regs dpll_mpu_regs;
 extern const struct dpll_regs dpll_core_regs;
 extern const struct dpll_regs dpll_per_regs;
 extern const struct dpll_regs dpll_ddr_regs;
+extern const struct dpll_params dpll_mpu_opp[NUM_CRYSTAL_FREQ][NUM_OPPS];
+extern const struct dpll_params dpll_core_1000MHz[NUM_CRYSTAL_FREQ];
+extern const struct dpll_params dpll_per_192MHz[NUM_CRYSTAL_FREQ];
+extern const struct dpll_params dpll_ddr2_266MHz[NUM_CRYSTAL_FREQ];
+extern const struct dpll_params dpll_ddr3_303MHz[NUM_CRYSTAL_FREQ];
+extern const struct dpll_params dpll_ddr3_400MHz[NUM_CRYSTAL_FREQ];
 
 extern struct cm_wkuppll *const cmwkup;
 
index 4c9352a2ed768f29bcec1ff5678807ccbb396464..653ec1b2394f9d7f483f30cd48d7ecad3cfc945d 100644 (file)
 #define MPUPLL_M_800   800
 #define MPUPLL_M_720   720
 #define MPUPLL_M_600   600
-#define MPUPLL_M_550   550
+#define MPUPLL_M_500   500
 #define MPUPLL_M_300   300
 
-/* MAIN PLL Fdll = 550 MHz, by default */
-#ifndef CONFIG_SYS_MPUCLK
-#define CONFIG_SYS_MPUCLK      MPUPLL_M_550
-#endif
-
 #define UART_RESET             (0x1 << 1)
 #define UART_CLK_RUNNING_MASK  0x1
 #define UART_SMART_IDLE_EN     (0x1 << 0x3)
@@ -31,6 +26,8 @@
 #define CM_DLL_CTRL_NO_OVERRIDE        0x0
 #define CM_DLL_READYST         0x4
 
+#define NUM_OPPS       6
+
 extern void enable_dmm_clocks(void);
 extern const struct dpll_params dpll_core_opp100;
 extern struct dpll_params dpll_mpu_opp100;
index 54f449f6e6960d2484b9f7d448b40d6e9d6038ed..8cae291ea02ff2e7acc1c7695cf3d67a07ce4c50 100644 (file)
 #define TI81XX                         0xB81E
 #define DEVICE_ID                      (CTRL_BASE + 0x0600)
 #define DEVICE_ID_MASK                 0x1FFF
+#define PACKAGE_TYPE_SHIFT             16
+#define PACKAGE_TYPE_MASK              (3 << 16)
+
+/* Package Type */
+#define PACKAGE_TYPE_UNDEFINED         0x0
+#define PACKAGE_TYPE_ZCZ               0x1
+#define PACKAGE_TYPE_ZCE               0x2
+#define PACKAGE_TYPE_RESERVED          0x3
 
 /* MPU max frequencies */
 #define AM335X_ZCZ_300                 0x1FEF
index dd950e5ac4d99bfffe6dd96139ab114e47ccba5a..3437e6116da5ff74a74e45bc1de1f65a648cca8e 100644 (file)
 /* CPSW Config space */
 #define CPSW_BASE                      0x4A100000
 
+/* Control status register */
+#define CTRL_CRYSTAL_FREQ_SRC_MASK             (1 << 31)
+#define CTRL_CRYSTAL_FREQ_SRC_SHIFT            31
+#define CTRL_CRYSTAL_FREQ_SELECTION_MASK       (0x3 << 29)
+#define CTRL_CRYSTAL_FREQ_SELECTION_SHIFT      29
+#define CTRL_SYSBOOT_15_14_MASK                        (0x3 << 22)
+#define CTRL_SYSBOOT_15_14_SHIFT               22
+
+#define CTRL_CRYSTAL_FREQ_SRC_SYSBOOT          0x0
+#define CTRL_CRYSTAL_FREQ_SRC_EFUSE            0x1
+
+#define NUM_CRYSTAL_FREQ                       0x4
+
 int clk_get(int clk);
 #endif /* __AM33XX_HARDWARE_H */
index a7da6b5cfde64e23f59b9e3e348bf375716bf5c2..af69ac6f2c6b1cf581ac362007574e8080e6fa56 100644 (file)
 #define        USBOTGSSX_CLKCTRL_OPTFCLKEN_REFCLK960   (1 << 8)
 #define        USBPHY0_CLKCTRL_OPTFCLKEN_CLK32K        (1 << 8)
 
-/* Control status register */
-#define CTRL_CRYSTAL_FREQ_SRC_MASK             (1 << 31)
-#define CTRL_CRYSTAL_FREQ_SRC_SHIFT            31
-#define CTRL_CRYSTAL_FREQ_SELECTION_MASK       (0x3 << 29)
-#define CTRL_CRYSTAL_FREQ_SELECTION_SHIFT      29
-#define CTRL_SYSBOOT_15_14_MASK                        (0x3 << 22)
-#define CTRL_SYSBOOT_15_14_SHIFT               22
-
-#define CTRL_CRYSTAL_FREQ_SRC_SYSBOOT          0x0
-#define CTRL_CRYSTAL_FREQ_SRC_EFUSE            0x1
-
-#define NUM_CRYSTAL_FREQ                       0x4
-
 /* EDMA3 Base Address */
 #define EDMA3_BASE                             0x49000000
 
index 903398fe8f17079317bb99a10bde5b2d65ee8240..4e78aafb0b96a3b239fda435d7b7f136afcd4bc9 100644 (file)
@@ -46,3 +46,4 @@ int am335x_get_tps65910_mpu_vdd(int sil_rev, int frequency);
 void enable_usb_clocks(int index);
 void disable_usb_clocks(int index);
 void do_board_detect(void);
+u32 get_sys_clk_index(void);
index 6ebc759f4b9675c80c68d385e2698b03998dede5..113e1c73f3fd8f90e3ef9561ef1b4d60c720ba20 100644 (file)
 #define MV_UART_CONSOLE_BASE   ARMD1_UART1_BASE
 #define CONFIG_SYS_NS16550_IER (1 << 6)        /* Bit 6 in UART_IER register
                                                represents UART Unit Enable */
-/*
- * I2C definition
- */
-#ifdef CONFIG_CMD_I2C
-#define CONFIG_I2C_MV          1
-#define CONFIG_MV_I2C_NUM      2
-#define CONFIG_I2C_MULTI_BUS   1
-#define CONFIG_MV_I2C_REG      {0xd4011000, 0xd4025000}
-#define CONFIG_HARD_I2C                1
-#define CONFIG_SYS_I2C_SPEED   0
-#define CONFIG_SYS_I2C_SLAVE   0xfe
-#endif
 
 #endif /* _ARMD1_CONFIG_H */
index 170a9b3a7c8dde7514112521e95f3a26611d34b2..6424fafe146eaf2abefb62014435ea3daca7789f 100644 (file)
@@ -34,7 +34,7 @@ u32 imx_get_i2cclk(unsigned i2c_num);
 #ifdef CONFIG_MXC_OCOTP
 void enable_ocotp_clk(unsigned char enable);
 #endif
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 void enable_usboh3_clk(unsigned char enable);
 #endif
 void init_clk_usdhc(u32 index);
index 7ea7199f2b74e2dc67b4bf948e50cf312a84764d..0c99bbdc9320326e843099d0d399f305ca903ced 100644 (file)
 #define DPLL_NO_LOCK   0
 #define DPLL_LOCK      1
 
-/*
- * MAX value for PRM_RSTTIME[9:0]RSTTIME1 stored is 0x3ff.
- * 0x3ff is in the no of FUNC_32K_CLK cycles. Converting cycles
- * into microsec and passing the value.
- */
-#define CONFIG_DEFAULT_OMAP_RESET_TIME_MAX_USEC        31219
-
 #if defined(CONFIG_DRA7XX)
 #define V_OSCK                 20000000        /* Clock output from T2 */
 #else
index 8d7bc9a909369a8b30d003d33cb02eed1d9e33e3..7346876dc21a486b4ea2e07fbb603c1e5b57c115 100644 (file)
@@ -16,3 +16,7 @@
        .space 0x4         /* space for the 'RK33' */
 #endif
        b reset
+
+#if defined(CONFIG_ROCKCHIP_RK3399) && defined(CONFIG_SPL_BUILD)
+       .space CONFIG_ROCKCHIP_SPL_RESERVE_IRAM /* space for the ATF data */
+#endif
index 1a7c8199c3810ee9a8b5d86b689303afdbd36664..7d56b8ced0a916c21d1a95667ef2ca83ed1632bc 100644 (file)
@@ -824,4 +824,66 @@ enum {
                (0x7f << RK3288_CLK_TX_DL_CFG_GMAC_SHIFT),
 };
 
+/* GRF_SOC_CON6 */
+enum GRF_SOC_CON6 {
+       RK3288_HDMI_EDP_SEL_SHIFT = 0xf,
+       RK3288_HDMI_EDP_SEL_MASK =
+               1 << RK3288_HDMI_EDP_SEL_SHIFT,
+       RK3288_HDMI_EDP_SEL_EDP = 0,
+       RK3288_HDMI_EDP_SEL_HDMI,
+
+       RK3288_DSI0_DPICOLORM_SHIFT = 0x8,
+       RK3288_DSI0_DPICOLORM_MASK =
+               1 << RK3288_DSI0_DPICOLORM_SHIFT,
+
+       RK3288_DSI0_DPISHUTDN_SHIFT = 0x7,
+       RK3288_DSI0_DPISHUTDN_MASK =
+               1 << RK3288_DSI0_DPISHUTDN_SHIFT,
+
+       RK3288_DSI0_LCDC_SEL_SHIFT = 0x6,
+       RK3288_DSI0_LCDC_SEL_MASK =
+               1 << RK3288_DSI0_LCDC_SEL_SHIFT,
+       RK3288_DSI0_LCDC_SEL_BIG = 0,
+       RK3288_DSI0_LCDC_SEL_LIT = 1,
+
+       RK3288_EDP_LCDC_SEL_SHIFT = 0x5,
+       RK3288_EDP_LCDC_SEL_MASK =
+               1 << RK3288_EDP_LCDC_SEL_SHIFT,
+       RK3288_EDP_LCDC_SEL_BIG = 0,
+       RK3288_EDP_LCDC_SEL_LIT = 1,
+
+       RK3288_HDMI_LCDC_SEL_SHIFT = 0x4,
+       RK3288_HDMI_LCDC_SEL_MASK =
+               1 << RK3288_HDMI_LCDC_SEL_SHIFT,
+       RK3288_HDMI_LCDC_SEL_BIG = 0,
+       RK3288_HDMI_LCDC_SEL_LIT = 1,
+
+       RK3288_LVDS_LCDC_SEL_SHIFT = 0x3,
+       RK3288_LVDS_LCDC_SEL_MASK =
+               1 << RK3288_LVDS_LCDC_SEL_SHIFT,
+       RK3288_LVDS_LCDC_SEL_BIG = 0,
+       RK3288_LVDS_LCDC_SEL_LIT = 1,
+};
+
+/* RK3288_SOC_CON8 */
+enum GRF_SOC_CON8 {
+       RK3288_DPHY_TX0_RXMODE_SHIFT = 4,
+       RK3288_DPHY_TX0_RXMODE_MASK =
+          0xf << RK3288_DPHY_TX0_RXMODE_SHIFT,
+       RK3288_DPHY_TX0_RXMODE_EN = 0xf,
+       RK3288_DPHY_TX0_RXMODE_DIS = 0,
+
+       RK3288_DPHY_TX0_TXSTOPMODE_SHIFT = 0x8,
+       RK3288_DPHY_TX0_TXSTOPMODE_MASK =
+          0xf << RK3288_DPHY_TX0_TXSTOPMODE_SHIFT,
+       RK3288_DPHY_TX0_TXSTOPMODE_EN = 0xf,
+       RK3288_DPHY_TX0_TXSTOPMODE_DIS = 0,
+
+       RK3288_DPHY_TX0_TURNREQUEST_SHIFT = 0,
+       RK3288_DPHY_TX0_TURNREQUEST_MASK =
+          0xf << RK3288_DPHY_TX0_TURNREQUEST_SHIFT,
+       RK3288_DPHY_TX0_TURNREQUEST_EN = 0xf,
+       RK3288_DPHY_TX0_TURNREQUEST_DIS = 0,
+};
+
 #endif
index c42475388b49057872591e005f88cdff6f664c4f..eda99560ed3039c8769e9f68ab6ef0b1c56b6931 100644 (file)
@@ -151,10 +151,11 @@ struct rk3399_grf_regs {
        u32 gpio2_sr[3][4];
        u32 reserved23[4];
        u32 gpio2_smt[3][4];
-       u32 reserved24[(0xe130 - 0xe0ec)/4 - 1];
-       u32 gpio4b_e01;
-       u32 gpio4b_e2;
-       u32 reserved24a[(0xe200 - 0xe134)/4 - 1];
+       u32 reserved24[(0xe100 - 0xe0ec)/4 - 1];
+       u32 gpio2_e[4];
+       u32 gpio3_e[7];
+       u32 gpio4_e[5];
+       u32 reserved24a[(0xe200 - 0xe13c)/4 - 1];
        u32 soc_con0;
        u32 soc_con1;
        u32 soc_con2;
@@ -344,6 +345,18 @@ enum {
        GRF_GPIO2C1_SEL_SHIFT   = 2,
        GRF_GPIO2C1_SEL_MASK    = 3 << GRF_GPIO2C1_SEL_SHIFT,
        GRF_UART0BT_SOUT        = 1,
+       GRF_GPIO2C4_SEL_SHIFT   = 8,
+       GRF_GPIO2C4_SEL_MASK    = 3 << GRF_GPIO2C4_SEL_SHIFT,
+       GRF_SPI5EXPPLUS_RXD     = 2,
+       GRF_GPIO2C5_SEL_SHIFT   = 10,
+       GRF_GPIO2C5_SEL_MASK    = 3 << GRF_GPIO2C5_SEL_SHIFT,
+       GRF_SPI5EXPPLUS_TXD     = 2,
+       GRF_GPIO2C6_SEL_SHIFT   = 12,
+       GRF_GPIO2C6_SEL_MASK    = 3 << GRF_GPIO2C6_SEL_SHIFT,
+       GRF_SPI5EXPPLUS_CLK     = 2,
+       GRF_GPIO2C7_SEL_SHIFT   = 14,
+       GRF_GPIO2C7_SEL_MASK    = 3 << GRF_GPIO2C7_SEL_SHIFT,
+       GRF_SPI5EXPPLUS_CSN0    = 2,
 
        /* GRF_GPIO3A_IOMUX */
        GRF_GPIO3A0_SEL_SHIFT   = 0,
@@ -427,9 +440,11 @@ enum {
        GRF_GPIO4C0_SEL_SHIFT   = 0,
        GRF_GPIO4C0_SEL_MASK    = 3 << GRF_GPIO4C0_SEL_SHIFT,
        GRF_UART2DGBB_SIN       = 2,
+       GRF_HDMII2C_SCL         = 3,
        GRF_GPIO4C1_SEL_SHIFT   = 2,
        GRF_GPIO4C1_SEL_MASK    = 3 << GRF_GPIO4C1_SEL_SHIFT,
        GRF_UART2DGBB_SOUT      = 2,
+       GRF_HDMII2C_SDA         = 3,
        GRF_GPIO4C2_SEL_SHIFT   = 4,
        GRF_GPIO4C2_SEL_MASK    = 3 << GRF_GPIO4C2_SEL_SHIFT,
        GRF_PWM_0               = 1,
@@ -443,10 +458,99 @@ enum {
        GRF_GPIO4C6_SEL_MASK    = 3 << GRF_GPIO4C6_SEL_SHIFT,
        GRF_PWM_1               = 1,
 
+       /* GRF_GPIO3A_E01 */
+       GRF_GPIO3A0_E_SHIFT = 0,
+       GRF_GPIO3A0_E_MASK = 7 << GRF_GPIO3A0_E_SHIFT,
+       GRF_GPIO3A1_E_SHIFT = 3,
+       GRF_GPIO3A1_E_MASK = 7 << GRF_GPIO3A1_E_SHIFT,
+       GRF_GPIO3A2_E_SHIFT = 6,
+       GRF_GPIO3A2_E_MASK = 7 << GRF_GPIO3A2_E_SHIFT,
+       GRF_GPIO3A3_E_SHIFT = 9,
+       GRF_GPIO3A3_E_MASK = 7 << GRF_GPIO3A3_E_SHIFT,
+       GRF_GPIO3A4_E_SHIFT = 12,
+       GRF_GPIO3A4_E_MASK = 7 << GRF_GPIO3A4_E_SHIFT,
+       GRF_GPIO3A5_E0_SHIFT = 15,
+       GRF_GPIO3A5_E0_MASK = 1 << GRF_GPIO3A5_E0_SHIFT,
+
+       /*  GRF_GPIO3A_E2 */
+       GRF_GPIO3A5_E12_SHIFT = 0,
+       GRF_GPIO3A5_E12_MASK = 3 << GRF_GPIO3A5_E12_SHIFT,
+       GRF_GPIO3A6_E_SHIFT = 2,
+       GRF_GPIO3A6_E_MASK = 7 << GRF_GPIO3A6_E_SHIFT,
+       GRF_GPIO3A7_E_SHIFT = 5,
+       GRF_GPIO3A7_E_MASK = 7 << GRF_GPIO3A7_E_SHIFT,
+
+       /* GRF_GPIO3B_E01 */
+       GRF_GPIO3B0_E_SHIFT = 0,
+       GRF_GPIO3B0_E_MASK = 7 << GRF_GPIO3B0_E_SHIFT,
+       GRF_GPIO3B1_E_SHIFT = 3,
+       GRF_GPIO3B1_E_MASK = 7 << GRF_GPIO3B1_E_SHIFT,
+       GRF_GPIO3B2_E_SHIFT = 6,
+       GRF_GPIO3B2_E_MASK = 7 << GRF_GPIO3B2_E_SHIFT,
+       GRF_GPIO3B3_E_SHIFT = 9,
+       GRF_GPIO3B3_E_MASK = 7 << GRF_GPIO3B3_E_SHIFT,
+       GRF_GPIO3B4_E_SHIFT = 12,
+       GRF_GPIO3B4_E_MASK = 7 << GRF_GPIO3B4_E_SHIFT,
+       GRF_GPIO3B5_E0_SHIFT = 15,
+       GRF_GPIO3B5_E0_MASK = 1 << GRF_GPIO3B5_E0_SHIFT,
+
+       /*  GRF_GPIO3A_E2 */
+       GRF_GPIO3B5_E12_SHIFT = 0,
+       GRF_GPIO3B5_E12_MASK = 3 << GRF_GPIO3B5_E12_SHIFT,
+       GRF_GPIO3B6_E_SHIFT = 2,
+       GRF_GPIO3B6_E_MASK = 7 << GRF_GPIO3B6_E_SHIFT,
+       GRF_GPIO3B7_E_SHIFT = 5,
+       GRF_GPIO3B7_E_MASK = 7 << GRF_GPIO3B7_E_SHIFT,
+
+       /* GRF_GPIO3C_E01 */
+       GRF_GPIO3C0_E_SHIFT = 0,
+       GRF_GPIO3C0_E_MASK = 7 << GRF_GPIO3C0_E_SHIFT,
+       GRF_GPIO3C1_E_SHIFT = 3,
+       GRF_GPIO3C1_E_MASK = 7 << GRF_GPIO3C1_E_SHIFT,
+       GRF_GPIO3C2_E_SHIFT = 6,
+       GRF_GPIO3C2_E_MASK = 7 << GRF_GPIO3C2_E_SHIFT,
+       GRF_GPIO3C3_E_SHIFT = 9,
+       GRF_GPIO3C3_E_MASK = 7 << GRF_GPIO3C3_E_SHIFT,
+       GRF_GPIO3C4_E_SHIFT = 12,
+       GRF_GPIO3C4_E_MASK = 7 << GRF_GPIO3C4_E_SHIFT,
+       GRF_GPIO3C5_E0_SHIFT = 15,
+       GRF_GPIO3C5_E0_MASK = 1 << GRF_GPIO3C5_E0_SHIFT,
+
+       /*  GRF_GPIO3C_E2 */
+       GRF_GPIO3C5_E12_SHIFT = 0,
+       GRF_GPIO3C5_E12_MASK = 3 << GRF_GPIO3C5_E12_SHIFT,
+       GRF_GPIO3C6_E_SHIFT = 2,
+       GRF_GPIO3C6_E_MASK = 7 << GRF_GPIO3C6_E_SHIFT,
+       GRF_GPIO3C7_E_SHIFT = 5,
+       GRF_GPIO3C7_E_MASK = 7 << GRF_GPIO3C7_E_SHIFT,
+
        /* GRF_SOC_CON7 */
-       GRF_UART_DBG_SEL_SHIFT  = 10,
-       GRF_UART_DBG_SEL_MASK   = 3 << GRF_UART_DBG_SEL_SHIFT,
-       GRF_UART_DBG_SEL_C      = 2,
+       GRF_UART_DBG_SEL_SHIFT  = 10,
+       GRF_UART_DBG_SEL_MASK   = 3 << GRF_UART_DBG_SEL_SHIFT,
+       GRF_UART_DBG_SEL_C      = 2,
+
+       /* GRF_SOC_CON20 */
+       GRF_DSI0_VOP_SEL_SHIFT  = 0,
+       GRF_DSI0_VOP_SEL_MASK   = 1 << GRF_DSI0_VOP_SEL_SHIFT,
+       GRF_DSI0_VOP_SEL_B      = 0,
+       GRF_DSI0_VOP_SEL_L      = 1,
+
+       /* GRF_SOC_CON22 */
+       GRF_DPHY_TX0_RXMODE_SHIFT = 0,
+       GRF_DPHY_TX0_RXMODE_MASK  = 0xf << GRF_DPHY_TX0_RXMODE_SHIFT,
+       GRF_DPHY_TX0_RXMODE_EN    = 0xb,
+       GRF_DPHY_TX0_RXMODE_DIS   = 0,
+
+       GRF_DPHY_TX0_TXSTOPMODE_SHIFT = 4,
+       GRF_DPHY_TX0_TXSTOPMODE_MASK  = 0xf0 << GRF_DPHY_TX0_TXSTOPMODE_SHIFT,
+       GRF_DPHY_TX0_TXSTOPMODE_EN    = 0xc,
+       GRF_DPHY_TX0_TXSTOPMODE_DIS   = 0,
+
+       GRF_DPHY_TX0_TURNREQUEST_SHIFT = 12,
+       GRF_DPHY_TX0_TURNREQUEST_MASK  =
+               0xf000 << GRF_DPHY_TX0_TURNREQUEST_SHIFT,
+       GRF_DPHY_TX0_TURNREQUEST_EN    = 0x1,
+       GRF_DPHY_TX0_TURNREQUEST_DIS   = 0,
 
        /*  PMUGRF_GPIO0A_IOMUX */
        PMUGRF_GPIO0A6_SEL_SHIFT        = 12,
index 239a27443aa47a33e1b1e33bf273ea81d15bc66d..8018d4734847c9361378bd83ce8d9c8241c03e51 100644 (file)
@@ -27,6 +27,9 @@ enum periph_id {
        PERIPH_ID_SPI0,
        PERIPH_ID_SPI1,
        PERIPH_ID_SPI2,
+       PERIPH_ID_SPI3,
+       PERIPH_ID_SPI4,
+       PERIPH_ID_SPI5,
        PERIPH_ID_UART0,
        PERIPH_ID_UART1,
        PERIPH_ID_UART2,
diff --git a/arch/arm/include/asm/arch-rockchip/rockchip_mipi_dsi.h b/arch/arm/include/asm/arch-rockchip/rockchip_mipi_dsi.h
new file mode 100644 (file)
index 0000000..d7f79c5
--- /dev/null
@@ -0,0 +1,195 @@
+/*
+ * Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
+ * author: Eric Gao <eric.gao@rock-chips.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef ROCKCHIP_MIPI_DSI_H
+#define ROCKCHIP_MIPI_DSI_H
+
+/*
+ * All these mipi controller register declaration provide reg address offset,
+ * bits width, bit offset for a specified register bits. With these message, we
+ * can set or clear every bits individually for a 32bit widthregister. We use
+ * DSI_HOST_BITS macro definition to combinat these message using the following
+ * format: val(32bit) = addr(16bit) | width(8bit) | offest(8bit)
+ * For example:
+ *    #define SHUTDOWNZ           DSI_HOST_BITS(0x004, 1, 0)
+ * means SHUTDOWNZ is a signal reg bit with bit offset qual 0,and it's reg addr
+ * offset is 0x004.The conbinat result  = (0x004 << 16) | (1 << 8) | 0
+ */
+#define ADDR_SHIFT 16
+#define BITS_SHIFT 8
+#define OFFSET_SHIFT 0
+#define DSI_HOST_BITS(addr, bits, bit_offset) \
+((addr << ADDR_SHIFT) | (bits << BITS_SHIFT) | (bit_offset << OFFSET_SHIFT))
+
+/* DWC_DSI_VERSION_0x3133302A */
+#define VERSION                                DSI_HOST_BITS(0x000, 32, 0)
+#define SHUTDOWNZ                      DSI_HOST_BITS(0x004, 1, 0)
+#define TO_CLK_DIVISION                DSI_HOST_BITS(0x008, 8, 8)
+#define TX_ESC_CLK_DIVISION    DSI_HOST_BITS(0x008, 8, 0)
+#define DPI_VCID                       DSI_HOST_BITS(0x00c, 2, 0)
+#define EN18_LOOSELY           DSI_HOST_BITS(0x010, 1, 8)
+#define DPI_COLOR_CODING       DSI_HOST_BITS(0x010, 4, 0)
+#define COLORM_ACTIVE_LOW      DSI_HOST_BITS(0x014, 1, 4)
+#define SHUTD_ACTIVE_LOW       DSI_HOST_BITS(0x014, 1, 3)
+#define HSYNC_ACTIVE_LOW       DSI_HOST_BITS(0x014, 1, 2)
+#define VSYNC_ACTIVE_LOW       DSI_HOST_BITS(0x014, 1, 1)
+#define DATAEN_ACTIVE_LOW      DSI_HOST_BITS(0x014, 1, 0)
+#define OUTVACT_LPCMD_TIME     DSI_HOST_BITS(0x018, 8, 16)
+#define INVACT_LPCMD_TIME      DSI_HOST_BITS(0x018, 8, 0)
+#define CRC_RX_EN                      DSI_HOST_BITS(0x02c, 1, 4)
+#define ECC_RX_EN                      DSI_HOST_BITS(0x02c, 1, 3)
+#define BTA_EN                         DSI_HOST_BITS(0x02c, 1, 2)
+#define EOTP_RX_EN                     DSI_HOST_BITS(0x02c, 1, 1)
+#define EOTP_TX_EN                     DSI_HOST_BITS(0x02c, 1, 0)
+#define GEN_VID_RX                     DSI_HOST_BITS(0x030, 2, 0)
+#define CMD_VIDEO_MODE         DSI_HOST_BITS(0x034, 1, 0)
+#define VPG_ORIENTATION                DSI_HOST_BITS(0x038, 1, 24)
+#define VPG_MODE                       DSI_HOST_BITS(0x038, 1, 20)
+#define VPG_EN                         DSI_HOST_BITS(0x038, 1, 16)
+#define LP_CMD_EN                      DSI_HOST_BITS(0x038, 1, 15)
+#define FRAME_BTA_ACK_EN       DSI_HOST_BITS(0x038, 1, 14)
+#define LP_HFP_EN                      DSI_HOST_BITS(0x038, 1, 13)
+#define LP_HBP_EN                      DSI_HOST_BITS(0x038, 1, 12)
+#define LP_VACT_EN                     DSI_HOST_BITS(0x038, 1, 11)
+#define LP_VFP_EN                      DSI_HOST_BITS(0x038, 1, 10)
+#define LP_VBP_EN                      DSI_HOST_BITS(0x038, 1, 9)
+#define LP_VSA_EN                      DSI_HOST_BITS(0x038, 1, 8)
+#define VID_MODE_TYPE          DSI_HOST_BITS(0x038, 2, 0)
+#define VID_PKT_SIZE           DSI_HOST_BITS(0x03c, 14, 0)
+#define NUM_CHUNKS                     DSI_HOST_BITS(0x040, 13, 0)
+#define NULL_PKT_SIZE          DSI_HOST_BITS(0x044, 13, 0)
+#define VID_HSA_TIME           DSI_HOST_BITS(0x048, 12, 0)
+#define VID_HBP_TIME           DSI_HOST_BITS(0x04c, 12, 0)
+#define VID_HLINE_TIME         DSI_HOST_BITS(0x050, 15, 0)
+#define VID_VSA_LINES          DSI_HOST_BITS(0x054, 10, 0)
+#define VID_VBP_LINES          DSI_HOST_BITS(0x058, 10, 0)
+#define VID_VFP_LINES          DSI_HOST_BITS(0x05c, 10, 0)
+#define VID_ACTIVE_LINES       DSI_HOST_BITS(0x060, 14, 0)
+#define EDPI_CMD_SIZE          DSI_HOST_BITS(0x064, 16, 0)
+#define MAX_RD_PKT_SIZE                DSI_HOST_BITS(0x068, 1, 24)
+#define DCS_LW_TX                      DSI_HOST_BITS(0x068, 1, 19)
+#define DCS_SR_0P_TX           DSI_HOST_BITS(0x068, 1, 18)
+#define DCS_SW_1P_TX           DSI_HOST_BITS(0x068, 1, 17)
+#define DCS_SW_0P_TX           DSI_HOST_BITS(0x068, 1, 16)
+#define GEN_LW_TX                      DSI_HOST_BITS(0x068, 1, 14)
+#define GEN_SR_2P_TX           DSI_HOST_BITS(0x068, 1, 13)
+#define GEN_SR_1P_TX           DSI_HOST_BITS(0x068, 1, 12)
+#define GEN_SR_0P_TX           DSI_HOST_BITS(0x068, 1, 11)
+#define GEN_SW_2P_TX           DSI_HOST_BITS(0x068, 1, 10)
+#define GEN_SW_1P_TX           DSI_HOST_BITS(0x068, 1, 9)
+#define GEN_SW_0P_TX           DSI_HOST_BITS(0x068, 1, 8)
+#define ACK_RQST_EN                    DSI_HOST_BITS(0x068, 1, 1)
+#define TEAR_FX_EN                     DSI_HOST_BITS(0x068, 1, 0)
+#define GEN_WC_MSBYTE          DSI_HOST_BITS(0x06c, 14, 16)
+#define GEN_WC_LSBYTE          DSI_HOST_BITS(0x06c, 8, 8)
+#define GEN_VC                         DSI_HOST_BITS(0x06c, 2, 6)
+#define GEN_DT                         DSI_HOST_BITS(0x06c, 6, 0)
+#define GEN_PLD_DATA           DSI_HOST_BITS(0x070, 32, 0)
+#define GEN_RD_CMD_BUSY                DSI_HOST_BITS(0x074, 1, 6)
+#define GEN_PLD_R_FULL         DSI_HOST_BITS(0x074, 1, 5)
+#define GEN_PLD_R_EMPTY                DSI_HOST_BITS(0x074, 1, 4)
+#define GEN_PLD_W_FULL         DSI_HOST_BITS(0x074, 1, 3)
+#define GEN_PLD_W_EMPTY                DSI_HOST_BITS(0x074, 1, 2)
+#define GEN_CMD_FULL           DSI_HOST_BITS(0x074, 1, 1)
+#define GEN_CMD_EMPTY          DSI_HOST_BITS(0x074, 1, 0)
+#define HSTX_TO_CNT                    DSI_HOST_BITS(0x078, 16, 16)
+#define LPRX_TO_CNT                    DSI_HOST_BITS(0x078, 16, 0)
+#define HS_RD_TO_CNT           DSI_HOST_BITS(0x07c, 16, 0)
+#define LP_RD_TO_CNT           DSI_HOST_BITS(0x080, 16, 0)
+#define PRESP_TO_MODE          DSI_HOST_BITS(0x084, 1, 24)
+#define HS_WR_TO_CNT           DSI_HOST_BITS(0x084, 16, 0)
+#define LP_WR_TO_CNT           DSI_HOST_BITS(0x088, 16, 0)
+#define BTA_TO_CNT                     DSI_HOST_BITS(0x08c, 16, 0)
+#define AUTO_CLKLANE_CTRL      DSI_HOST_BITS(0x094, 1, 1)
+#define PHY_TXREQUESTCLKHS     DSI_HOST_BITS(0x094, 1, 0)
+#define PHY_HS2LP_TIME_CLK_LANE        DSI_HOST_BITS(0x098, 10, 16)
+#define PHY_HS2HS_TIME_CLK_LANE        DSI_HOST_BITS(0x098, 10, 0)
+#define PHY_HS2LP_TIME         DSI_HOST_BITS(0x09c, 8, 24)
+#define PHY_LP2HS_TIME         DSI_HOST_BITS(0x09c, 8, 16)
+#define MAX_RD_TIME                    DSI_HOST_BITS(0x09c, 15, 0)
+#define PHY_FORCEPLL           DSI_HOST_BITS(0x0a0, 1, 3)
+#define PHY_ENABLECLK          DSI_HOST_BITS(0x0a0, 1, 2)
+#define PHY_RSTZ                       DSI_HOST_BITS(0x0a0, 1, 1)
+#define PHY_SHUTDOWNZ          DSI_HOST_BITS(0x0a0, 1, 0)
+#define PHY_STOP_WAIT_TIME     DSI_HOST_BITS(0x0a4, 8, 8)
+#define N_LANES                                DSI_HOST_BITS(0x0a4, 2, 0)
+#define PHY_TXEXITULPSLAN      DSI_HOST_BITS(0x0a8, 1, 3)
+#define PHY_TXREQULPSLAN       DSI_HOST_BITS(0x0a8, 1, 2)
+#define PHY_TXEXITULPSCLK      DSI_HOST_BITS(0x0a8, 1, 1)
+#define PHY_TXREQULPSCLK       DSI_HOST_BITS(0x0a8, 1, 0)
+#define PHY_TX_TRIGGERS                DSI_HOST_BITS(0x0ac, 4, 0)
+#define PHYSTOPSTATECLKLANE    DSI_HOST_BITS(0x0b0, 1, 2)
+#define PHYLOCK                                DSI_HOST_BITS(0x0b0, 1, 0)
+#define PHY_TESTCLK                    DSI_HOST_BITS(0x0b4, 1, 1)
+#define PHY_TESTCLR                    DSI_HOST_BITS(0x0b4, 1, 0)
+#define PHY_TESTEN                     DSI_HOST_BITS(0x0b8, 1, 16)
+#define PHY_TESTDOUT           DSI_HOST_BITS(0x0b8, 8, 8)
+#define PHY_TESTDIN                    DSI_HOST_BITS(0x0b8, 8, 0)
+#define PHY_TEST_CTRL1         DSI_HOST_BITS(0x0b8, 17, 0)
+#define PHY_TEST_CTRL0         DSI_HOST_BITS(0x0b4, 2, 0)
+#define INT_ST0                                DSI_HOST_BITS(0x0bc, 21, 0)
+#define INT_ST1                                DSI_HOST_BITS(0x0c0, 18, 0)
+#define INT_MKS0                       DSI_HOST_BITS(0x0c4, 21, 0)
+#define INT_MKS1                       DSI_HOST_BITS(0x0c8, 18, 0)
+#define INT_FORCE0                     DSI_HOST_BITS(0x0d8, 21, 0)
+#define INT_FORCE1                     DSI_HOST_BITS(0x0dc, 18, 0)
+
+#define CODE_HS_RX_CLOCK       0x34
+#define CODE_HS_RX_LANE0       0x44
+#define CODE_HS_RX_LANE1       0x54
+#define CODE_HS_RX_LANE2       0x84
+#define CODE_HS_RX_LANE3       0x94
+
+#define CODE_PLL_VCORANGE_VCOCAP       0x10
+#define CODE_PLL_CPCTRL        0x11
+#define CODE_PLL_LPF_CP 0x12
+#define CODE_PLL_INPUT_DIV_RAT 0x17
+#define CODE_PLL_LOOP_DIV_RAT  0x18
+#define CODE_PLL_INPUT_LOOP_DIV_RAT    0x19
+#define CODE_BANDGAP_BIAS_CTRL 0x20
+#define CODE_TERMINATION_CTRL  0x21
+#define CODE_AFE_BIAS_BANDGAP_ANOLOG 0x22
+
+#define CODE_HSTXDATALANEREQUSETSTATETIME      0x70
+#define CODE_HSTXDATALANEPREPARESTATETIME      0x71
+#define CODE_HSTXDATALANEHSZEROSTATETIME       0x72
+
+/* Transmission mode between vop and MIPI controller */
+enum vid_mode_type_t {
+       NON_BURST_SYNC_PLUSE = 0,
+       NON_BURST_SYNC_EVENT,
+       BURST_MODE,
+};
+
+enum cmd_video_mode {
+       VIDEO_MODE = 0,
+       CMD_MODE,
+};
+
+/* Indicate MIPI DSI color mode */
+enum dpi_color_coding {
+       DPI_16BIT_CFG_1 = 0,
+       DPI_16BIT_CFG_2,
+       DPI_16BIT_CFG_3,
+       DPI_18BIT_CFG_1,
+       DPI_18BIT_CFG_2,
+       DPI_24BIT,
+       DPI_20BIT_YCBCR_422_LP,
+       DPI_24BIT_YCBCR_422,
+       DPI_16BIT_YCBCR_422,
+       DPI_30BIT,
+       DPI_36BIT,
+       DPI_12BIT_YCBCR_420,
+};
+
+/* Indicate which VOP the MIPI DSI use, bit or little one */
+enum  vop_id {
+       VOP_B = 0,
+       VOP_L,
+};
+
+#endif /* end of ROCKCHIP_MIPI_DSI_H */
index 0ce3d6746f32aafd92b78bca14ef2a0390ee6a2d..d5599ec335bda813d09ae0cae9efa45f7ea3c3ac 100644 (file)
@@ -90,6 +90,7 @@ enum vop_modes {
        VOP_MODE_EDP = 0,
        VOP_MODE_HDMI,
        VOP_MODE_LVDS,
+       VOP_MODE_MIPI,
        VOP_MODE_NONE,
        VOP_MODE_AUTO_DETECT,
        VOP_MODE_UNKNOWN,
index faa14791f99823116a3785c7270be7c873707d8d..d328df9597d08aae080a95e7cdc18dfbe2df97c2 100644 (file)
@@ -84,7 +84,8 @@ struct sunxi_ccm_reg {
        u32 lcd0_ch0_clk_cfg;   /* 0x118 LCD0 CH0 module clock */
        u32 lcd1_ch0_clk_cfg;   /* 0x11c LCD1 CH0 module clock */
 #endif
-       u32 reserved14[3];
+       u32 tve_clk_cfg;        /* 0x120 H3/H5 TVE module clock */
+       u32 reserved14[2];
        u32 lcd0_ch1_clk_cfg;   /* 0x12c LCD0 CH1 module clock */
        u32 lcd1_ch1_clk_cfg;   /* 0x130 LCD1 CH1 module clock */
        u32 csi0_clk_cfg;       /* 0x134 CSI0 module clock */
@@ -307,6 +308,7 @@ struct sunxi_ccm_reg {
 #define AHB_GATE_OFFSET_DE_BE0         12
 #define AHB_GATE_OFFSET_DE             12
 #define AHB_GATE_OFFSET_HDMI           11
+#define AHB_GATE_OFFSET_TVE            9
 #ifndef CONFIG_SUNXI_DE2
 #define AHB_GATE_OFFSET_LCD1           5
 #define AHB_GATE_OFFSET_LCD0           4
@@ -415,6 +417,9 @@ struct sunxi_ccm_reg {
 
 #define CCM_HDMI_SLOW_CTRL_DDC_GATE    (1 << 31)
 
+#define CCM_TVE_CTRL_GATE              (0x1 << 31)
+#define CCM_TVE_CTRL_M(n)              ((((n) - 1) & 0xf) << 0)
+
 #if defined(CONFIG_MACH_SUN50I)
 #define MBUS_CLK_DEFAULT               0x81000002 /* PLL6x2 / 3 */
 #elif defined(CONFIG_MACH_SUN8I)
@@ -448,6 +453,7 @@ struct sunxi_ccm_reg {
 #define AHB_RESET_OFFSET_DE            12
 #define AHB_RESET_OFFSET_HDMI          11
 #define AHB_RESET_OFFSET_HDMI2         10
+#define AHB_RESET_OFFSET_TVE           9
 #ifndef CONFIG_SUNXI_DE2
 #define AHB_RESET_OFFSET_LCD1          5
 #define AHB_RESET_OFFSET_LCD0          4
index 93803addfbe04c9469cefd9cd3d97818124f6bf2..e10197784e9dfb978306ff3ce0abe4b48ee98da3 100644 (file)
@@ -224,52 +224,6 @@ struct sunxi_hdmi_reg {
 #endif
 };
 
-/*
- * This is based on the A10s User Manual, and the A10s only supports
- * composite video and not vga like the A10 / A20 does, still other
- * than the removed vga out capability the tvencoder seems to be the same.
- * "unknown#" registers are registers which are used in the A10 kernel code,
- * but not documented in the A10s User Manual.
- */
-struct sunxi_tve_reg {
-       u32 gctrl;                      /* 0x000 */
-       u32 cfg0;                       /* 0x004 */
-       u32 dac_cfg0;                   /* 0x008 */
-       u32 filter;                     /* 0x00c */
-       u32 chroma_freq;                /* 0x010 */
-       u32 porch_num;                  /* 0x014 */
-       u32 unknown0;                   /* 0x018 */
-       u32 line_num;                   /* 0x01c */
-       u32 blank_black_level;          /* 0x020 */
-       u32 unknown1;                   /* 0x024, seems to be 1 byte per dac */
-       u8 res0[0x08];                  /* 0x028 */
-       u32 auto_detect_en;             /* 0x030 */
-       u32 auto_detect_int_status;     /* 0x034 */
-       u32 auto_detect_status;         /* 0x038 */
-       u32 auto_detect_debounce;       /* 0x03c */
-       u32 csc_reg0;                   /* 0x040 */
-       u32 csc_reg1;                   /* 0x044 */
-       u32 csc_reg2;                   /* 0x048 */
-       u32 csc_reg3;                   /* 0x04c */
-       u8 res1[0xb0];                  /* 0x050 */
-       u32 color_burst;                /* 0x100 */
-       u32 vsync_num;                  /* 0x104 */
-       u32 notch_freq;                 /* 0x108 */
-       u32 cbr_level;                  /* 0x10c */
-       u32 burst_phase;                /* 0x110 */
-       u32 burst_width;                /* 0x114 */
-       u32 unknown2;                   /* 0x118 */
-       u32 sync_vbi_level;             /* 0x11c */
-       u32 white_level;                /* 0x120 */
-       u32 active_num;                 /* 0x124 */
-       u32 chroma_bw_gain;             /* 0x128 */
-       u32 notch_width;                /* 0x12c */
-       u32 resync_num;                 /* 0x130 */
-       u32 slave_para;                 /* 0x134 */
-       u32 cfg1;                       /* 0x138 */
-       u32 cfg2;                       /* 0x13c */
-};
-
 /*
  * DE-FE register constants.
  */
@@ -394,67 +348,6 @@ struct sunxi_tve_reg {
 #define SUNXI_HMDI_DDC_LINE_CTRL_SCL_ENABLE    (1 << 8)
 #define SUNXI_HMDI_DDC_LINE_CTRL_SDA_ENABLE    (1 << 9)
 
-/*
- * TVE register constants.
- */
-#define SUNXI_TVE_GCTRL_ENABLE                 (1 << 0)
-/*
- * Select input 0 to disable dac, 1 - 4 to feed dac from tve0, 5 - 8 to feed
- * dac from tve1. When using tve1 the mux value must be written to both tve0's
- * and tve1's gctrl reg.
- */
-#define SUNXI_TVE_GCTRL_DAC_INPUT_MASK(dac)    (0xf << (((dac) + 1) * 4))
-#define SUNXI_TVE_GCTRL_DAC_INPUT(dac, sel)    ((sel) << (((dac) + 1) * 4))
-#define SUNXI_TVE_CFG0_VGA                     0x20000000
-#define SUNXI_TVE_CFG0_PAL                     0x07030001
-#define SUNXI_TVE_CFG0_NTSC                    0x07030000
-#define SUNXI_TVE_DAC_CFG0_VGA                 0x403e1ac7
-#ifdef CONFIG_MACH_SUN5I
-#define SUNXI_TVE_DAC_CFG0_COMPOSITE           0x433f0009
-#else
-#define SUNXI_TVE_DAC_CFG0_COMPOSITE           0x403f0008
-#endif
-#define SUNXI_TVE_FILTER_COMPOSITE             0x00000120
-#define SUNXI_TVE_CHROMA_FREQ_PAL_M            0x21e6efe3
-#define SUNXI_TVE_CHROMA_FREQ_PAL_NC           0x21f69446
-#define SUNXI_TVE_PORCH_NUM_PAL                        0x008a0018
-#define SUNXI_TVE_PORCH_NUM_NTSC               0x00760020
-#define SUNXI_TVE_LINE_NUM_PAL                 0x00160271
-#define SUNXI_TVE_LINE_NUM_NTSC                        0x0016020d
-#define SUNXI_TVE_BLANK_BLACK_LEVEL_PAL                0x00fc00fc
-#define SUNXI_TVE_BLANK_BLACK_LEVEL_NTSC       0x00f0011a
-#define SUNXI_TVE_UNKNOWN1_VGA                 0x00000000
-#define SUNXI_TVE_UNKNOWN1_COMPOSITE           0x18181818
-#define SUNXI_TVE_AUTO_DETECT_EN_DET_EN(dac)   (1 << ((dac) + 0))
-#define SUNXI_TVE_AUTO_DETECT_EN_INT_EN(dac)   (1 << ((dac) + 16))
-#define SUNXI_TVE_AUTO_DETECT_INT_STATUS(dac)  (1 << ((dac) + 0))
-#define SUNXI_TVE_AUTO_DETECT_STATUS_SHIFT(dac)        ((dac) * 8)
-#define SUNXI_TVE_AUTO_DETECT_STATUS_MASK(dac) (3 << ((dac) * 8))
-#define SUNXI_TVE_AUTO_DETECT_STATUS_NONE      0
-#define SUNXI_TVE_AUTO_DETECT_STATUS_CONNECTED 1
-#define SUNXI_TVE_AUTO_DETECT_STATUS_SHORT_GND 3
-#define SUNXI_TVE_AUTO_DETECT_DEBOUNCE_SHIFT(d)        ((d) * 8)
-#define SUNXI_TVE_AUTO_DETECT_DEBOUNCE_MASK(d) (0xf << ((d) * 8))
-#define SUNXI_TVE_CSC_REG0_ENABLE              (1 << 31)
-#define SUNXI_TVE_CSC_REG0                     0x08440832
-#define SUNXI_TVE_CSC_REG1                     0x3b6dace1
-#define SUNXI_TVE_CSC_REG2                     0x0e1d13dc
-#define SUNXI_TVE_CSC_REG3                     0x00108080
-#define SUNXI_TVE_COLOR_BURST_PAL_M            0x00000000
-#define SUNXI_TVE_CBR_LEVEL_PAL                        0x00002828
-#define SUNXI_TVE_CBR_LEVEL_NTSC               0x0000004f
-#define SUNXI_TVE_BURST_PHASE_NTSC             0x00000000
-#define SUNXI_TVE_BURST_WIDTH_COMPOSITE                0x0016447e
-#define SUNXI_TVE_UNKNOWN2_PAL                 0x0000e0e0
-#define SUNXI_TVE_UNKNOWN2_NTSC                        0x0000a0a0
-#define SUNXI_TVE_SYNC_VBI_LEVEL_NTSC          0x001000f0
-#define SUNXI_TVE_ACTIVE_NUM_COMPOSITE         0x000005a0
-#define SUNXI_TVE_CHROMA_BW_GAIN_COMP          0x00000002
-#define SUNXI_TVE_NOTCH_WIDTH_COMPOSITE                0x00000101
-#define SUNXI_TVE_RESYNC_NUM_PAL               0x800d000c
-#define SUNXI_TVE_RESYNC_NUM_NTSC              0x000e000c
-#define SUNXI_TVE_SLAVE_PARA_COMPOSITE         0x00000000
-
 int sunxi_simplefb_setup(void *blob);
 
 #endif /* _SUNXI_DISPLAY_H */
diff --git a/arch/arm/include/asm/arch-sunxi/tve.h b/arch/arm/include/asm/arch-sunxi/tve.h
new file mode 100644 (file)
index 0000000..41a14a6
--- /dev/null
@@ -0,0 +1,131 @@
+/*
+ * Sunxi TV encoder register and constant defines
+ *
+ * (C) Copyright 2014 Hans de Goede <hdegoede@redhat.com>
+ * (C) Copyright 2017 Jernej Skrabec <jernej.skrabec@siol.net>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef _TVE_H
+#define _TVE_H
+
+enum tve_mode {
+       tve_mode_vga,
+       tve_mode_composite_pal,
+       tve_mode_composite_ntsc,
+       tve_mode_composite_pal_m,
+       tve_mode_composite_pal_nc,
+};
+
+/*
+ * This is based on the A10s User Manual, and the A10s only supports
+ * composite video and not vga like the A10 / A20 does, still other
+ * than the removed vga out capability the tvencoder seems to be the same.
+ * "unknown#" registers are registers which are used in the A10 kernel code,
+ * but not documented in the A10s User Manual.
+ */
+struct sunxi_tve_reg {
+       u32 gctrl;                      /* 0x000 */
+       u32 cfg0;                       /* 0x004 */
+       u32 dac_cfg0;                   /* 0x008 */
+       u32 filter;                     /* 0x00c */
+       u32 chroma_freq;                /* 0x010 */
+       u32 porch_num;                  /* 0x014 */
+       u32 unknown0;                   /* 0x018 */
+       u32 line_num;                   /* 0x01c */
+       u32 blank_black_level;          /* 0x020 */
+       u32 unknown1;                   /* 0x024, seems to be 1 byte per dac */
+       u8 res0[0x08];                  /* 0x028 */
+       u32 auto_detect_en;             /* 0x030 */
+       u32 auto_detect_int_status;     /* 0x034 */
+       u32 auto_detect_status;         /* 0x038 */
+       u32 auto_detect_debounce;       /* 0x03c */
+       u32 csc_reg0;                   /* 0x040 */
+       u32 csc_reg1;                   /* 0x044 */
+       u32 csc_reg2;                   /* 0x048 */
+       u32 csc_reg3;                   /* 0x04c */
+       u8 res1[0xb0];                  /* 0x050 */
+       u32 color_burst;                /* 0x100 */
+       u32 vsync_num;                  /* 0x104 */
+       u32 notch_freq;                 /* 0x108 */
+       u32 cbr_level;                  /* 0x10c */
+       u32 burst_phase;                /* 0x110 */
+       u32 burst_width;                /* 0x114 */
+       u32 unknown2;                   /* 0x118 */
+       u32 sync_vbi_level;             /* 0x11c */
+       u32 white_level;                /* 0x120 */
+       u32 active_num;                 /* 0x124 */
+       u32 chroma_bw_gain;             /* 0x128 */
+       u32 notch_width;                /* 0x12c */
+       u32 resync_num;                 /* 0x130 */
+       u32 slave_para;                 /* 0x134 */
+       u32 cfg1;                       /* 0x138 */
+       u32 cfg2;                       /* 0x13c */
+};
+
+/*
+ * TVE register constants.
+ */
+#define SUNXI_TVE_GCTRL_ENABLE                 (1 << 0)
+/*
+ * Select input 0 to disable dac, 1 - 4 to feed dac from tve0, 5 - 8 to feed
+ * dac from tve1. When using tve1 the mux value must be written to both tve0's
+ * and tve1's gctrl reg.
+ */
+#define SUNXI_TVE_GCTRL_DAC_INPUT_MASK(dac)    (0xf << (((dac) + 1) * 4))
+#define SUNXI_TVE_GCTRL_DAC_INPUT(dac, sel)    ((sel) << (((dac) + 1) * 4))
+#define SUNXI_TVE_CFG0_VGA                     0x20000000
+#define SUNXI_TVE_CFG0_PAL                     0x07030001
+#define SUNXI_TVE_CFG0_NTSC                    0x07030000
+#define SUNXI_TVE_DAC_CFG0_VGA                 0x403e1ac7
+#ifdef CONFIG_MACH_SUN5I
+#define SUNXI_TVE_DAC_CFG0_COMPOSITE           0x433f0009
+#else
+#define SUNXI_TVE_DAC_CFG0_COMPOSITE           0x403f0008
+#endif
+#define SUNXI_TVE_FILTER_COMPOSITE             0x00000120
+#define SUNXI_TVE_CHROMA_FREQ_PAL_M            0x21e6efe3
+#define SUNXI_TVE_CHROMA_FREQ_PAL_NC           0x21f69446
+#define SUNXI_TVE_PORCH_NUM_PAL                        0x008a0018
+#define SUNXI_TVE_PORCH_NUM_NTSC               0x00760020
+#define SUNXI_TVE_LINE_NUM_PAL                 0x00160271
+#define SUNXI_TVE_LINE_NUM_NTSC                        0x0016020d
+#define SUNXI_TVE_BLANK_BLACK_LEVEL_PAL                0x00fc00fc
+#define SUNXI_TVE_BLANK_BLACK_LEVEL_NTSC       0x00f0011a
+#define SUNXI_TVE_UNKNOWN1_VGA                 0x00000000
+#define SUNXI_TVE_UNKNOWN1_COMPOSITE           0x18181818
+#define SUNXI_TVE_AUTO_DETECT_EN_DET_EN(dac)   (1 << ((dac) + 0))
+#define SUNXI_TVE_AUTO_DETECT_EN_INT_EN(dac)   (1 << ((dac) + 16))
+#define SUNXI_TVE_AUTO_DETECT_INT_STATUS(dac)  (1 << ((dac) + 0))
+#define SUNXI_TVE_AUTO_DETECT_STATUS_SHIFT(dac)        ((dac) * 8)
+#define SUNXI_TVE_AUTO_DETECT_STATUS_MASK(dac) (3 << ((dac) * 8))
+#define SUNXI_TVE_AUTO_DETECT_STATUS_NONE      0
+#define SUNXI_TVE_AUTO_DETECT_STATUS_CONNECTED 1
+#define SUNXI_TVE_AUTO_DETECT_STATUS_SHORT_GND 3
+#define SUNXI_TVE_AUTO_DETECT_DEBOUNCE_SHIFT(d)        ((d) * 8)
+#define SUNXI_TVE_AUTO_DETECT_DEBOUNCE_MASK(d) (0xf << ((d) * 8))
+#define SUNXI_TVE_CSC_REG0_ENABLE              (1 << 31)
+#define SUNXI_TVE_CSC_REG0                     0x08440832
+#define SUNXI_TVE_CSC_REG1                     0x3b6dace1
+#define SUNXI_TVE_CSC_REG2                     0x0e1d13dc
+#define SUNXI_TVE_CSC_REG3                     0x00108080
+#define SUNXI_TVE_COLOR_BURST_PAL_M            0x00000000
+#define SUNXI_TVE_CBR_LEVEL_PAL                        0x00002828
+#define SUNXI_TVE_CBR_LEVEL_NTSC               0x0000004f
+#define SUNXI_TVE_BURST_PHASE_NTSC             0x00000000
+#define SUNXI_TVE_BURST_WIDTH_COMPOSITE                0x0016447e
+#define SUNXI_TVE_UNKNOWN2_PAL                 0x0000e0e0
+#define SUNXI_TVE_UNKNOWN2_NTSC                        0x0000a0a0
+#define SUNXI_TVE_SYNC_VBI_LEVEL_NTSC          0x001000f0
+#define SUNXI_TVE_ACTIVE_NUM_COMPOSITE         0x000005a0
+#define SUNXI_TVE_CHROMA_BW_GAIN_COMP          0x00000002
+#define SUNXI_TVE_NOTCH_WIDTH_COMPOSITE                0x00000101
+#define SUNXI_TVE_RESYNC_NUM_PAL               0x800d000c
+#define SUNXI_TVE_RESYNC_NUM_NTSC              0x000e000c
+#define SUNXI_TVE_SLAVE_PARA_COMPOSITE         0x00000000
+
+void tvencoder_mode_set(struct sunxi_tve_reg * const tve, enum tve_mode mode);
+void tvencoder_enable(struct sunxi_tve_reg * const tve);
+
+#endif /* _TVE_H */
index ebf0f1704281e3903017e4c0c0f7ba9dded76a9c..af8a97e988972dcc13c2800a111b75f25560363d 100644 (file)
@@ -70,24 +70,5 @@ struct v7m_mpu {
 };
 #define V7M_MPU                                ((struct v7m_mpu *)V7M_MPU_BASE)
 
-#define V7M_MPU_CTRL_ENABLE            (1 << 0)
-#define V7M_MPU_CTRL_HFNMIENA          (1 << 1)
-
-#define V7M_MPU_CTRL_ENABLE            (1 << 0)
-#define V7M_MPU_CTRL_DISABLE           (0 << 0)
-#define V7M_MPU_CTRL_HFNMIENA          (1 << 1)
-
-#define V7M_MPU_RASR_EN                        (1 << 0)
-#define V7M_MPU_RASR_SIZE_BITS         1
-#define V7M_MPU_RASR_SIZE_4GB          (31 << V7M_MPU_RASR_SIZE_BITS)
-#define V7M_MPU_RASR_SIZE_8MB          (24 << V7M_MPU_RASR_SIZE_BITS)
-#define V7M_MPU_RASR_TEX_SHIFT 19
-#define V7M_MPU_RASR_S_SHIFT           18
-#define V7M_MPU_RASR_C_SHIFT           17
-#define V7M_MPU_RASR_B_SHIFT           16
-#define V7M_MPU_RASR_AP_RW_RW          (3 << 24)
-#define V7M_MPU_RASR_XN_ENABLE (0 << 28)
-#define V7M_MPU_RASR_XN_DISABLE (1 << 28)
-
 #endif /* !defined(__ASSEMBLY__) */
 #endif /* ARMV7M_H */
diff --git a/arch/arm/include/asm/armv7m_mpu.h b/arch/arm/include/asm/armv7m_mpu.h
new file mode 100644 (file)
index 0000000..d7e99b4
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * (C) Copyright 2017
+ * Vikas Manocha, ST Micoelectronics, vikas.manocha@st.com.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+enum region_number {
+       REGION_0 = 0,
+       REGION_1,
+       REGION_2,
+       REGION_3,
+       REGION_4,
+       REGION_5,
+       REGION_6,
+       REGION_7,
+};
+
+enum ap {
+       NO_ACCESS = 0,
+       PRIV_RW_USR_NO,
+       PRIV_RW_USR_RO,
+       PRIV_RW_USR_RW,
+       UNPREDICTABLE,
+       PRIV_RO_USR_NO,
+       PRIV_RO_USR_RO,
+};
+
+enum mr_attr {
+       STRONG_ORDER = 0,
+       SHARED_WRITE_BUFFERED,
+       O_I_WT_NO_WR_ALLOC,
+       O_I_WB_NO_WR_ALLOC,
+       O_I_NON_CACHEABLE,
+       O_I_WB_RD_WR_ALLOC,
+       DEVICE_NON_SHARED,
+};
+enum size {
+       REGION_8MB = 22,
+       REGION_16MB,
+       REGION_32MB,
+       REGION_64MB,
+       REGION_128MB,
+       REGION_256MB,
+       REGION_512MB,
+       REGION_1GB,
+       REGION_2GB,
+       REGION_4GB,
+};
+
+enum xn {
+       XN_DIS = 0,
+       XN_EN,
+};
+
+struct mpu_region_config {
+       uint32_t start_addr;
+       enum region_number region_no;
+       enum xn xn;
+       enum ap ap;
+       enum mr_attr mr_attr;
+       enum size reg_size;
+};
+
+void disable_mpu(void);
+void enable_mpu(void);
+void mpu_config(struct mpu_region_config *reg_config);
index 1aab6295d6066c2037fb1865ff7ebd36cfde57e5..3cc0e5fa34a5a762f29e01abf6e04db4dab685e0 100644 (file)
@@ -32,8 +32,8 @@ struct arch_global_data {
 #endif
        /* "static data" needed by most of timer.c on ARM platforms */
        unsigned long timer_rate_hz;
-       unsigned long tbu;
-       unsigned long tbl;
+       unsigned int tbu;
+       unsigned int tbl;
        unsigned long lastinc;
        unsigned long long timer_reset_value;
 #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
index f2bf645b33b1d438c6aaf10d27e388e8ac8b6bec..f6eb51ee3c61cca7b39aa60daa61e22c79a70fbf 100644 (file)
 #ifndef OMAP_MMC_H_
 #define OMAP_MMC_H_
 
+#include <mmc.h>
+
 struct hsmmc {
-#ifdef CONFIG_DM_MMC
-       unsigned char res0[0x100];
-#endif
        unsigned char res1[0x10];
        unsigned int sysconfig;         /* 0x10 */
        unsigned int sysstatus;         /* 0x14 */
@@ -52,6 +51,13 @@ struct hsmmc {
        unsigned int capa;              /* 0x140 */
 };
 
+struct omap_hsmmc_plat {
+       struct mmc_config cfg;
+       struct hsmmc *base_addr;
+       struct mmc mmc;
+       bool cd_inverted;
+};
+
 /*
  * OMAP HS MMC Bit definitions
  */
index a0bda28104a95b021a9a8a345164201d9f2dedcc..5d7f7e6ec562de02ed13440f54874269cd531e1b 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef        _ASM_SPL_H_
 #define        _ASM_SPL_H_
 
-#if defined(CONFIG_OMAP) \
+#if defined(CONFIG_ARCH_OMAP2PLUS) \
        || defined(CONFIG_EXYNOS4) || defined(CONFIG_EXYNOS5) \
        || defined(CONFIG_EXYNOS4210)
 /* Platform-specific defines */
index 9c3261c8847e9ef0c01a2e48c63f372ae86c2cc1..79bd19af7dab38c8791d3f31f5f42091d4ad6592 100644 (file)
@@ -180,6 +180,21 @@ static inline unsigned long read_mpidr(void)
 void __asm_flush_dcache_all(void);
 void __asm_invalidate_dcache_all(void);
 void __asm_flush_dcache_range(u64 start, u64 end);
+
+/**
+ * __asm_invalidate_dcache_range() - Invalidate a range of virtual addresses
+ *
+ * This performance an invalidate from @start to @end - 1. Both addresses
+ * should be cache-aligned, otherwise this function will align the start
+ * address and may continue past the end address.
+ *
+ * Data in the address range is evicted from the cache and is not written back
+ * to memory.
+ *
+ * @start: Start address to invalidate
+ * @end: End address to invalidate up to (exclusive)
+ */
+void __asm_invalidate_dcache_range(u64 start, u64 end);
 void __asm_invalidate_tlb_all(void);
 void __asm_invalidate_icache_all(void);
 int __asm_invalidate_l3_dcache(void);
index 6e96cfb0c5dd41a8bd87b26084b8f91a9543997c..53d4ed2bc628c91867c37790d9c23373f1ae9f33 100644 (file)
@@ -33,6 +33,7 @@ obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
 else
 obj-$(CONFIG_SPL_FRAMEWORK) += spl.o
 obj-$(CONFIG_SPL_FRAMEWORK) += zimage.o
+obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
 endif
 obj-$(CONFIG_$(SPL_)USE_ARCH_MEMSET) += memset.o
 obj-$(CONFIG_$(SPL_)USE_ARCH_MEMCPY) += memcpy.o
index d84789c7a8a458af5903ae694db597d458a3f2cb..eaa817b9ac8ef08877cc1652a5fc1ee1e4aefecf 100644 (file)
@@ -27,8 +27,10 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int arch_fixup_fdt(void *blob)
 {
+       int ret = 0;
+#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_OF_LIBFDT)
        bd_t *bd = gd->bd;
-       int bank, ret;
+       int bank;
        u64 start[CONFIG_NR_DRAM_BANKS];
        u64 size[CONFIG_NR_DRAM_BANKS];
 
@@ -42,9 +44,11 @@ int arch_fixup_fdt(void *blob)
 #endif
        }
 
+#ifdef CONFIG_OF_LIBFDT
        ret = fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS);
        if (ret)
                return ret;
+#endif
 
 #ifdef CONFIG_ARMV8_SPIN_TABLE
        ret = spin_table_update_dt(blob);
@@ -57,6 +61,7 @@ int arch_fixup_fdt(void *blob)
        ret = psci_update_dt(blob);
        if (ret)
                return ret;
+#endif
 #endif
 
        return 0;
index 8de086efd6b56178f6f3d980b8d3c9a675148ffc..a939b1fb8d125255e50e2d7b2c3fffb154ee84b5 100644 (file)
@@ -161,7 +161,7 @@ void at91_spi1_hw_init(unsigned long cs_mask)
 }
 #endif
 
-#if defined(CONFIG_USB_OHCI_NEW) || defined(CONFIG_USB_EHCI)
+#if defined(CONFIG_USB_OHCI_NEW) || defined(CONFIG_USB_EHCI_HCD)
 void at91_uhp_hw_init(void)
 {
        /* Enable VBus on UHP ports */
index f6bcecda383832a630cf117923cfa6d96661bbff..803501f5cf98c057412d8aa93f6f8fd5082f73bb 100644 (file)
@@ -186,9 +186,14 @@ int ddr3_init(const unsigned int base,
 #define ATMEL_MPDDRC_IO_CALIBR_DDR3_RZQ_73     0x6
 #define ATMEL_MPDDRC_IO_CALIBR_DDR3_RZQ_110    0x7
 
-#define ATMEL_MPDDRC_IO_CALIBR_TZQIO           0x7f
+#define ATMEL_MPDDRC_IO_CALIBR_TZQIO           (0x7f << 8)
 #define ATMEL_MPDDRC_IO_CALIBR_TZQIO_(x)       (((x) & 0x7f) << 8)
 
+#define ATMEL_MPDDRC_IO_CALIBR_CALCODEP                (0xf << 16)
+#define ATMEL_MPDDRC_IO_CALIBR_CALCODEP_(x)    (((x) & 0xf) << 16)
+#define ATMEL_MPDDRC_IO_CALIBR_CALCODEN                (0xf << 20)
+#define ATMEL_MPDDRC_IO_CALIBR_CALCODEN_(x)    (((x) & 0xf) << 20)
+
 #define ATMEL_MPDDRC_IO_CALIBR_EN_CALIB                (0x1 << 4)
 
 /* Bit field in Read Data Path Register */
index 5cb1b2fe94b1dc7f09bc6de6c0d64514fd14f689..b5f606ef0bfb9a5df6febff1052d17678c9db294 100644 (file)
@@ -5,4 +5,4 @@
 #
 
 obj-$(CONFIG_BCM2835) += lowlevel_init.o
-obj-y  += init.o reset.o mbox.o phys2bus.o
+obj-y  += init.o reset.o mbox.o msg.o phys2bus.o
index b2df75ad3f257c26b7c6b11626404f8ff9e5f3db..daaee52f81054c8bf8f49d1fad4bc5a1cdce0ef0 100644 (file)
@@ -9,11 +9,6 @@
 #ifndef _BCM2835_GPIO_H_
 #define _BCM2835_GPIO_H_
 
-#ifndef CONFIG_BCM2835
-#define BCM2835_GPIO_BASE              0x3f200000
-#else
-#define BCM2835_GPIO_BASE              0x20200000
-#endif
 #define BCM2835_GPIO_COUNT             54
 
 #define BCM2835_GPIO_FSEL_MASK         0x7
diff --git a/arch/arm/mach-bcm283x/include/mach/msg.h b/arch/arm/mach-bcm283x/include/mach/msg.h
new file mode 100644 (file)
index 0000000..478b1f1
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * (C) Copyright 2012,2015 Stephen Warren
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef _BCM2835_MSG_H
+#define _BCM2835_MSG_H
+
+/**
+ * bcm2835_power_on_module() - power on an SoC module
+ *
+ * @module: ID of module to power on (BCM2835_MBOX_POWER_DEVID_...)
+ * @return 0 if OK, -EIO on error
+ */
+int bcm2835_power_on_module(u32 module);
+
+/**
+ * bcm2835_get_mmc_clock() - get the frequency of the MMC clock
+ *
+ * @return clock frequency, or -ve on error
+ */
+int bcm2835_get_mmc_clock(void);
+
+/**
+ * bcm2835_get_video_size() - get the current display size
+ *
+ * @widthp: Returns the width in pixels
+ * @heightp: Returns the height in pixels
+ * @return 0 if OK, -ve on error
+ */
+int bcm2835_get_video_size(int *widthp, int *heightp);
+
+/**
+ * bcm2835_set_video_params() - set the video parameters
+ *
+ * @widthp: Video width to request (returns the actual width selected)
+ * @heightp: Video height to request (returns the actual height selected)
+ * @depth_bpp: Requested bit depth
+ * @pixel_order: Pixel order to use (BCM2835_MBOX_PIXEL_ORDER_...)
+ * @alpha_mode: Alpha transparency mode to use (BCM2835_MBOX_ALPHA_MODE_...)
+ * @fb_basep: Returns base address of frame buffer
+ * @fb_sizep: Returns size of frame buffer
+ * @pitchp: Returns number of bytes in each frame buffer line
+ * @return 0 if OK, -ve on error
+ */
+int bcm2835_set_video_params(int *widthp, int *heightp, int depth_bpp,
+                            int pixel_order, int alpha_mode, ulong *fb_basep,
+                            ulong *fb_sizep, int *pitchp);
+
+#endif
diff --git a/arch/arm/mach-bcm283x/msg.c b/arch/arm/mach-bcm283x/msg.c
new file mode 100644 (file)
index 0000000..92e93ad
--- /dev/null
@@ -0,0 +1,154 @@
+/*
+ * (C) Copyright 2012 Stephen Warren
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <memalign.h>
+#include <phys2bus.h>
+#include <asm/arch/mbox.h>
+
+struct msg_set_power_state {
+       struct bcm2835_mbox_hdr hdr;
+       struct bcm2835_mbox_tag_set_power_state set_power_state;
+       u32 end_tag;
+};
+
+struct msg_get_clock_rate {
+       struct bcm2835_mbox_hdr hdr;
+       struct bcm2835_mbox_tag_get_clock_rate get_clock_rate;
+       u32 end_tag;
+};
+
+struct msg_query {
+       struct bcm2835_mbox_hdr hdr;
+       struct bcm2835_mbox_tag_physical_w_h physical_w_h;
+       u32 end_tag;
+};
+
+struct msg_setup {
+       struct bcm2835_mbox_hdr hdr;
+       struct bcm2835_mbox_tag_physical_w_h physical_w_h;
+       struct bcm2835_mbox_tag_virtual_w_h virtual_w_h;
+       struct bcm2835_mbox_tag_depth depth;
+       struct bcm2835_mbox_tag_pixel_order pixel_order;
+       struct bcm2835_mbox_tag_alpha_mode alpha_mode;
+       struct bcm2835_mbox_tag_virtual_offset virtual_offset;
+       struct bcm2835_mbox_tag_overscan overscan;
+       struct bcm2835_mbox_tag_allocate_buffer allocate_buffer;
+       struct bcm2835_mbox_tag_pitch pitch;
+       u32 end_tag;
+};
+
+int bcm2835_power_on_module(u32 module)
+{
+       ALLOC_CACHE_ALIGN_BUFFER(struct msg_set_power_state, msg_pwr, 1);
+       int ret;
+
+       BCM2835_MBOX_INIT_HDR(msg_pwr);
+       BCM2835_MBOX_INIT_TAG(&msg_pwr->set_power_state,
+                             SET_POWER_STATE);
+       msg_pwr->set_power_state.body.req.device_id = module;
+       msg_pwr->set_power_state.body.req.state =
+               BCM2835_MBOX_SET_POWER_STATE_REQ_ON |
+               BCM2835_MBOX_SET_POWER_STATE_REQ_WAIT;
+
+       ret = bcm2835_mbox_call_prop(BCM2835_MBOX_PROP_CHAN,
+                                    &msg_pwr->hdr);
+       if (ret) {
+               printf("bcm2835: Could not set module %u power state\n",
+                      module);
+               return -EIO;
+       }
+
+       return 0;
+}
+
+int bcm2835_get_mmc_clock(void)
+{
+       ALLOC_CACHE_ALIGN_BUFFER(struct msg_get_clock_rate, msg_clk, 1);
+       int ret;
+
+       ret = bcm2835_power_on_module(BCM2835_MBOX_POWER_DEVID_SDHCI);
+       if (ret)
+               return ret;
+
+       BCM2835_MBOX_INIT_HDR(msg_clk);
+       BCM2835_MBOX_INIT_TAG(&msg_clk->get_clock_rate, GET_CLOCK_RATE);
+       msg_clk->get_clock_rate.body.req.clock_id = BCM2835_MBOX_CLOCK_ID_EMMC;
+
+       ret = bcm2835_mbox_call_prop(BCM2835_MBOX_PROP_CHAN, &msg_clk->hdr);
+       if (ret) {
+               printf("bcm2835: Could not query eMMC clock rate\n");
+               return -EIO;
+       }
+
+       return msg_clk->get_clock_rate.body.resp.rate_hz;
+}
+
+int bcm2835_get_video_size(int *widthp, int *heightp)
+{
+       ALLOC_CACHE_ALIGN_BUFFER(struct msg_query, msg_query, 1);
+       int ret;
+
+       BCM2835_MBOX_INIT_HDR(msg_query);
+       BCM2835_MBOX_INIT_TAG_NO_REQ(&msg_query->physical_w_h,
+                                    GET_PHYSICAL_W_H);
+       ret = bcm2835_mbox_call_prop(BCM2835_MBOX_PROP_CHAN, &msg_query->hdr);
+       if (ret) {
+               printf("bcm2835: Could not query display resolution\n");
+               return ret;
+       }
+       *widthp = msg_query->physical_w_h.body.resp.width;
+       *heightp = msg_query->physical_w_h.body.resp.height;
+
+       return 0;
+}
+
+int bcm2835_set_video_params(int *widthp, int *heightp, int depth_bpp,
+                            int pixel_order, int alpha_mode, ulong *fb_basep,
+                            ulong *fb_sizep, int *pitchp)
+{
+       ALLOC_CACHE_ALIGN_BUFFER(struct msg_setup, msg_setup, 1);
+       int ret;
+
+       BCM2835_MBOX_INIT_HDR(msg_setup);
+       BCM2835_MBOX_INIT_TAG(&msg_setup->physical_w_h, SET_PHYSICAL_W_H);
+       msg_setup->physical_w_h.body.req.width = *widthp;
+       msg_setup->physical_w_h.body.req.height = *heightp;
+       BCM2835_MBOX_INIT_TAG(&msg_setup->virtual_w_h, SET_VIRTUAL_W_H);
+       msg_setup->virtual_w_h.body.req.width = *widthp;
+       msg_setup->virtual_w_h.body.req.height = *heightp;
+       BCM2835_MBOX_INIT_TAG(&msg_setup->depth, SET_DEPTH);
+       msg_setup->depth.body.req.bpp = 32;
+       BCM2835_MBOX_INIT_TAG(&msg_setup->pixel_order, SET_PIXEL_ORDER);
+       msg_setup->pixel_order.body.req.order = pixel_order;
+       BCM2835_MBOX_INIT_TAG(&msg_setup->alpha_mode, SET_ALPHA_MODE);
+       msg_setup->alpha_mode.body.req.alpha = alpha_mode;
+       BCM2835_MBOX_INIT_TAG(&msg_setup->virtual_offset, SET_VIRTUAL_OFFSET);
+       msg_setup->virtual_offset.body.req.x = 0;
+       msg_setup->virtual_offset.body.req.y = 0;
+       BCM2835_MBOX_INIT_TAG(&msg_setup->overscan, SET_OVERSCAN);
+       msg_setup->overscan.body.req.top = 0;
+       msg_setup->overscan.body.req.bottom = 0;
+       msg_setup->overscan.body.req.left = 0;
+       msg_setup->overscan.body.req.right = 0;
+       BCM2835_MBOX_INIT_TAG(&msg_setup->allocate_buffer, ALLOCATE_BUFFER);
+       msg_setup->allocate_buffer.body.req.alignment = 0x100;
+       BCM2835_MBOX_INIT_TAG_NO_REQ(&msg_setup->pitch, GET_PITCH);
+
+       ret = bcm2835_mbox_call_prop(BCM2835_MBOX_PROP_CHAN, &msg_setup->hdr);
+       if (ret) {
+               printf("bcm2835: Could not configure display\n");
+               return ret;
+       }
+       *widthp = msg_setup->physical_w_h.body.resp.width;
+       *heightp = msg_setup->physical_w_h.body.resp.height;
+       *pitchp = msg_setup->pitch.body.resp.pitch;
+       *fb_basep = bus_to_phys(
+                       msg_setup->allocate_buffer.body.resp.fb_address);
+       *fb_sizep = msg_setup->allocate_buffer.body.resp.fb_size;
+
+       return 0;
+}
index 685815c46ca195d9b9780c5a223318276f3d7a46..b62cb8a51ee0f27e8f9f44ec5a249354eaa6be2f 100644 (file)
  */
 #define BCM2835_WDOG_RSTS_RASPBERRYPI_HALT     0x555
 
+/* max ticks timeout */
+#define BCM2835_WDOG_MAX_TIMEOUT       0x000fffff
+
+#ifdef CONFIG_BCM2835_WDT
+extern void hw_watchdog_disable(void);
+#else
+void hw_watchdog_disable(void) {}
+#endif
+
 __efi_runtime_data struct bcm2835_wdog_regs *wdog_regs =
        (struct bcm2835_wdog_regs *)BCM2835_WDOG_PHYSADDR;
 
-void __efi_runtime reset_cpu(ulong addr)
+void __efi_runtime reset_cpu(ulong ticks)
 {
-       uint32_t rstc;
+       uint32_t rstc, timeout;
+
+       if (ticks == 0) {
+               hw_watchdog_disable();
+               timeout = RESET_TIMEOUT;
+       } else
+               timeout = ticks & BCM2835_WDOG_MAX_TIMEOUT;
 
        rstc = readl(&wdog_regs->rstc);
        rstc &= ~BCM2835_WDOG_RSTC_WRCFG_MASK;
        rstc |= BCM2835_WDOG_RSTC_WRCFG_FULL_RESET;
 
-       writel(BCM2835_WDOG_PASSWORD | RESET_TIMEOUT, &wdog_regs->wdog);
+       writel(BCM2835_WDOG_PASSWORD | timeout, &wdog_regs->wdog);
        writel(BCM2835_WDOG_PASSWORD | rstc, &wdog_regs->rstc);
 }
 
index 67f5fa0265fc1a3925af3074c8e4c1ecc638d5b2..3ea8dc33efd142e80b290804ceb6c994139ebc7d 100644 (file)
@@ -6,17 +6,21 @@ choice
 
 config TARGET_K2HK_EVM
        bool "TI Keystone 2 Kepler/Hawking EVM"
+       imply DM_I2C
 
 config TARGET_K2E_EVM
        bool "TI Keystone 2 Edison EVM"
+       imply DM_I2C
 
 config TARGET_K2L_EVM
        bool "TI Keystone 2 Lamar EVM"
+       imply DM_I2C
 
 config TARGET_K2G_EVM
        bool "TI Keystone 2 Galileo EVM"
         select BOARD_LATE_INIT
         select TI_I2C_BOARD_DETECT
+       imply DM_I2C
 
 endchoice
 
index b786df0aaf616633810cb9dad1f428ff5492a4d8..c7beb58e800049abb735b91d24a1385afce649c3 100644 (file)
@@ -89,7 +89,6 @@
  * USB/EHCI
  */
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI_MARVELL
 #define CONFIG_EHCI_IS_TDI
 #endif /* CONFIG_CMD_USB */
 
index 2ef5726905dedfa240e087eeb9c1006b178a8dea..c2c176e3d44f5274dc81c31c87ee7bdf01895d30 100644 (file)
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <libfdt.h>
+#include <pci.h>
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/arch/cpu.h>
@@ -147,5 +148,10 @@ int arch_early_init_r(void)
        /* Cause the SATA device to do its early init */
        uclass_first_device(UCLASS_AHCI, &dev);
 
+#ifdef CONFIG_DM_PCI
+       /* Trigger PCIe devices detection */
+       pci_init();
+#endif
+
        return 0;
 }
index 2325e9a180ba8d7159729630b614878b45ce58b0..38e7d33cb3e8f08e15e9ccf40c8337e073053816 100644 (file)
@@ -110,3 +110,21 @@ void reset_cpu(ulong ignored)
        reg &= ~(1 << RFU_SW_RESET_OFFSET);
        writel(reg, RFU_GLOBAL_SW_RST);
 }
+
+/*
+ * TODO - implement this functionality using platform
+ *        clock driver once it gets available
+ * Return NAND clock in Hz
+ */
+u32 mvebu_get_nand_clock(void)
+{
+       unsigned long NAND_FLASH_CLK_CTRL = 0xF2440700UL;
+       unsigned long NF_CLOCK_SEL_MASK = 0x1;
+       u32 reg;
+
+       reg = readl(NAND_FLASH_CLK_CTRL);
+       if (reg & NF_CLOCK_SEL_MASK)
+               return 400 * 1000000;
+       else
+               return 250 * 1000000;
+}
index 104e7e88d7428c9d65b0993fd9eef336b2754bc7..0dfb9452e6a7e78f9a2598ea984f26cc67ff7351 100644 (file)
@@ -13,8 +13,6 @@
 #include "high_speed_env_spec.h"
 #include "sys_env_lib.h"
 
-#define SERDES_VERION  "2.0"
-
 u8 selectors_serdes_rev1_map[LAST_SERDES_TYPE][MAX_SERDES_LANES] = {
        /* 0  1    2    3    4    5 */
        {0x1, 0x1, NA,  NA,  NA,  NA},          /* PEX0 */
index 820219e68e7869be5af0dba67b333ce47eb8d5b6..883b90776a0db6dca91a885dc7cd93dbc13e7abf 100644 (file)
@@ -27,7 +27,7 @@
  */
 struct cfg_seq serdes_seq_db[SERDES_LAST_SEQ];
 
-#define        SERDES_VERION           "2.0"
+#define        SERDES_VERSION          "2.0"
 #define ENDED_OK               "High speed PHY - Ended Successfully\n"
 
 #define LINK_WAIT_CNTR         100
@@ -1416,7 +1416,7 @@ int serdes_phy_config(void)
        DEBUG_INIT_FULL_S("\n### ctrl_high_speed_serdes_phy_config ###\n");
 
        DEBUG_INIT_S("High speed PHY - Version: ");
-       DEBUG_INIT_S(SERDES_VERION);
+       DEBUG_INIT_S(SERDES_VERSION);
        DEBUG_INIT_S("\n");
 
        /* Init serdes sequences DB */
index 5925bae69f18257c72b80240a2cabe25d26f2278..b0e193b78c0d08a3af43a806cf5ee5dd877eca53 100644 (file)
@@ -14,7 +14,7 @@
 #include "high_speed_env_spec.h"
 #include "board_env_spec.h"
 
-#define        SERDES_VERION   "2.1.5"
+#define        SERDES_VERSION  "2.1.5"
 #define ENDED_OK       "High speed PHY - Ended Successfully\n"
 
 static const u8 serdes_cfg[][SERDES_LAST_UNIT] = BIN_SERDES_CFG;
@@ -285,12 +285,12 @@ int serdes_phy_config(void)
        if (reg_read(REG_BOOTROM_ROUTINE_ADDR) &
            (1 << REG_BOOTROM_ROUTINE_DRAM_INIT_OFFS)) {
                DEBUG_INIT_S("High speed PHY - Version: ");
-               DEBUG_INIT_S(SERDES_VERION);
+               DEBUG_INIT_S(SERDES_VERSION);
                DEBUG_INIT_S(" - 2nd boot - Skip\n");
                return MV_OK;
        }
        DEBUG_INIT_S("High speed PHY - Version: ");
-       DEBUG_INIT_S(SERDES_VERION);
+       DEBUG_INIT_S(SERDES_VERSION);
        DEBUG_INIT_S(" (COM-PHY-V20)\n");
 
        /*
index 115ec2cd600e6af169c290f1cd6885f569c02efb..704a59fa15f1cd2a4a725d55caf5e47a4661c282 100644 (file)
@@ -5,7 +5,6 @@
  */
 
 #include <common.h>
-#include <i2c.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
index 93fb3208a138480cefb26f4a8fa284db963f8b4b..408b62c663af83e29cac4c96100c13eb5db5f9c4 100644 (file)
@@ -79,6 +79,7 @@ config OMAP34XX
        imply SPL_POWER_SUPPORT
        imply SPL_SERIAL_SUPPORT
        imply SYS_THUMB_BUILD
+       imply TWL4030_POWER
 
 config OMAP44XX
        bool "OMAP44XX SoC"
@@ -134,6 +135,7 @@ config AM43XX
 config AM33XX
        bool "AM33XX SoC"
        imply SYS_THUMB_BUILD
+       imply USE_TINY_PRINTF
        help
          Support for AM335x SOC from Texas Instruments.
          The AM335x high performance SOC features a Cortex-A8
@@ -146,6 +148,11 @@ config TARGET_CM_T43
 
 endchoice
 
+config SYS_MPUCLK
+       int "MPU CLK speed"
+       default 500
+       help
+         Defines the MPU clock speed (in MHz).
 
 config TI_SECURE_DEVICE
        bool "HS Device Type Support"
index db3c70fe21d44252709e0202e4e47df097993ada..5c4168fefc08cfcd8cfa9591346187010c211dc7 100644 (file)
@@ -29,6 +29,11 @@ config TARGET_AM335X_EVM
        imply SPL_SERIAL_SUPPORT
        imply SPL_WATCHDOG_SUPPORT
        imply SPL_YMODEM_SUPPORT
+       imply SPL_SYS_MALLOC_SIMPLE
+       imply SPL_SEPARATE_BSS
+       imply SPL_DM
+       imply SPL_DM_SEQ_ALIAS
+       imply SPL_OF_LIBFDT
        help
          This option specifies support for the AM335x
          GP and HS EVM development platforms. The AM335x
index 2bfc8649d5de97d37659ee4617460a5afe232cfb..a8b5d13238a220a0ec012afe30f6bbd4d90c9b90 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <debug_uart.h>
 #include <errno.h>
 #include <ns16550.h>
 #include <spl.h>
@@ -242,8 +243,6 @@ int board_early_init_f(void)
  */
 __weak void am33xx_spl_board_init(void)
 {
-       do_setup_dpll(&dpll_core_regs, &dpll_core_opp100);
-       do_setup_dpll(&dpll_mpu_regs, &dpll_mpu_opp100);
 }
 
 #if defined(CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC)
@@ -312,6 +311,9 @@ void early_system_init(void)
        set_uart_mux_conf();
        setup_early_clocks();
        uart_soft_reset();
+#ifdef CONFIG_DEBUG_UART_OMAP
+       debug_uart_init();
+#endif
 #ifdef CONFIG_TI_I2C_BOARD_DETECT
        do_board_detect();
 #endif
@@ -327,6 +329,10 @@ void board_init_f(ulong dummy)
        early_system_init();
        board_early_init_f();
        sdram_init();
+       /* dram_init must store complete ramsize in gd->ram_size */
+       gd->ram_size = get_ram_size(
+                       (void *)CONFIG_SYS_SDRAM_BASE,
+                       CONFIG_MAX_RAM_BANK_SIZE);
 }
 #endif
 
index 7b841b2d556da3492cfc1ce58e19149cbb237f1c..1780bbdb6fb6fa16fb9ec0fef17a447f141f6e99 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <asm/arch/cpu.h>
+#include <asm/arch/sys_proto.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/hardware.h>
 #include <asm/io.h>
@@ -55,26 +56,94 @@ struct dpll_params dpll_mpu_opp100 = {
                CONFIG_SYS_MPUCLK, OSC-1, 1, -1, -1, -1, -1};
 const struct dpll_params dpll_core_opp100 = {
                1000, OSC-1, -1, -1, 10, 8, 4};
-const struct dpll_params dpll_mpu = {
-               MPUPLL_M_300, OSC-1, 1, -1, -1, -1, -1};
-const struct dpll_params dpll_core = {
-               50, OSC-1, -1, -1, 1, 1, 1};
-const struct dpll_params dpll_per = {
-               960, OSC-1, 5, -1, -1, -1, -1};
-
-const struct dpll_params *get_dpll_mpu_params(void)
+
+const struct dpll_params dpll_mpu_opp[NUM_CRYSTAL_FREQ][NUM_OPPS] = {
+       {       /* 19.2 MHz */
+               {125, 3, 2, -1, -1, -1, -1},    /* OPP 50 */
+               {-1, -1, -1, -1, -1, -1, -1},   /* OPP RESERVED */
+               {125, 3, 1, -1, -1, -1, -1},    /* OPP 100 */
+               {150, 3, 1, -1, -1, -1, -1},    /* OPP 120 */
+               {125, 2, 1, -1, -1, -1, -1},    /* OPP TB */
+               {625, 11, 1, -1, -1, -1, -1}    /* OPP NT */
+       },
+       {       /* 24 MHz */
+               {25, 0, 2, -1, -1, -1, -1},     /* OPP 50 */
+               {-1, -1, -1, -1, -1, -1, -1},   /* OPP RESERVED */
+               {25, 0, 1, -1, -1, -1, -1},     /* OPP 100 */
+               {30, 0, 1, -1, -1, -1, -1},     /* OPP 120 */
+               {100, 3, 1, -1, -1, -1, -1},    /* OPP TB */
+               {125, 2, 1, -1, -1, -1, -1}     /* OPP NT */
+       },
+       {       /* 25 MHz */
+               {24, 0, 2, -1, -1, -1, -1},     /* OPP 50 */
+               {-1, -1, -1, -1, -1, -1, -1},   /* OPP RESERVED */
+               {24, 0, 1, -1, -1, -1, -1},     /* OPP 100 */
+               {144, 4, 1, -1, -1, -1, -1},    /* OPP 120 */
+               {32, 0, 1, -1, -1, -1, -1},     /* OPP TB */
+               {40, 0, 1, -1, -1, -1, -1}      /* OPP NT */
+       },
+       {       /* 26 MHz */
+               {300, 12, 2, -1, -1, -1, -1},   /* OPP 50 */
+               {-1, -1, -1, -1, -1, -1, -1},   /* OPP RESERVED */
+               {300, 12, 1, -1, -1, -1, -1},   /* OPP 100 */
+               {360, 12, 1, -1, -1, -1, -1},   /* OPP 120 */
+               {400, 12, 1, -1, -1, -1, -1},   /* OPP TB */
+               {500, 12, 1, -1, -1, -1, -1}    /* OPP NT */
+       },
+};
+
+const struct dpll_params dpll_core_1000MHz[NUM_CRYSTAL_FREQ] = {
+               {625, 11, -1, -1, 10, 8, 4},    /* 19.2 MHz */
+               {125, 2, -1, -1, 10, 8, 4},     /* 24 MHz */
+               {40, 0, -1, -1, 10, 8, 4},      /* 25 MHz */
+               {500, 12, -1, -1, 10, 8, 4}     /* 26 MHz */
+};
+
+const struct dpll_params dpll_per_192MHz[NUM_CRYSTAL_FREQ] = {
+               {400, 7, 5, -1, -1, -1, -1},    /* 19.2 MHz */
+               {400, 9, 5, -1, -1, -1, -1},    /* 24 MHz */
+               {384, 9, 5, -1, -1, -1, -1},    /* 25 MHz */
+               {480, 12, 5, -1, -1, -1, -1}    /* 26 MHz */
+};
+
+const struct dpll_params dpll_ddr3_303MHz[NUM_CRYSTAL_FREQ] = {
+               {505, 15, 2, -1, -1, -1, -1}, /*19.2*/
+               {101, 3, 2, -1, -1, -1, -1}, /* 24 MHz */
+               {303, 24, 1, -1, 4, -1, -1}, /* 25 MHz */
+               {303, 12, 2, -1, 4, -1, -1}  /* 26 MHz */
+};
+
+const struct dpll_params dpll_ddr3_400MHz[NUM_CRYSTAL_FREQ] = {
+               {125, 5, 1, -1, -1, -1, -1}, /*19.2*/
+               {50, 2, 1, -1, -1, -1, -1}, /* 24 MHz */
+               {16, 0, 1, -1, 4, -1, -1}, /* 25 MHz */
+               {200, 12, 1, -1, 4, -1, -1}  /* 26 MHz */
+};
+
+const struct dpll_params dpll_ddr2_266MHz[NUM_CRYSTAL_FREQ] = {
+               {665, 47, 1, -1, -1, -1, -1}, /*19.2*/
+               {133, 11, 1, -1, -1, -1, -1}, /* 24 MHz */
+               {266, 24, 1, -1, 4, -1, -1}, /* 25 MHz */
+               {133, 12, 1, -1, 4, -1, -1}  /* 26 MHz */
+};
+
+__weak const struct dpll_params *get_dpll_mpu_params(void)
 {
-       return &dpll_mpu;
+       return &dpll_mpu_opp100;
 }
 
 const struct dpll_params *get_dpll_core_params(void)
 {
-       return &dpll_core;
+       int ind = get_sys_clk_index();
+
+       return &dpll_core_1000MHz[ind];
 }
 
 const struct dpll_params *get_dpll_per_params(void)
 {
-       return &dpll_per;
+       int ind = get_sys_clk_index();
+
+       return &dpll_per_192MHz[ind];
 }
 
 void setup_clocks_for_console(void)
index e4fc461bd81835a0b6518c3c82648533cf3722dc..564bae679362d0d7ba282fe68e39bc65fe1afe54 100644 (file)
@@ -68,6 +68,24 @@ u32 get_sysboot_value(void)
        return readl(&cstat->statusreg) & SYSBOOT_MASK;
 }
 
+u32 get_sys_clk_index(void)
+{
+       struct ctrl_stat *ctrl = (struct ctrl_stat *)CTRL_BASE;
+       u32 ind = readl(&ctrl->statusreg);
+
+#ifdef CONFIG_AM43XX
+       u32 src;
+       src = (ind & CTRL_CRYSTAL_FREQ_SRC_MASK) >> CTRL_CRYSTAL_FREQ_SRC_SHIFT;
+       if (src == CTRL_CRYSTAL_FREQ_SRC_EFUSE) /* Value read from EFUSE */
+               return ((ind & CTRL_CRYSTAL_FREQ_SELECTION_MASK) >>
+                       CTRL_CRYSTAL_FREQ_SELECTION_SHIFT);
+       else /* Value read from SYS BOOT pins */
+#endif
+               return ((ind & CTRL_SYSBOOT_15_14_MASK) >>
+                       CTRL_SYSBOOT_15_14_SHIFT);
+}
+
+
 #ifdef CONFIG_DISPLAY_CPUINFO
 static char *cpu_revs[] = {
                "1.0",
@@ -132,13 +150,21 @@ int am335x_get_efuse_mpu_max_freq(struct ctrl_dev *cdev)
 
        sil_rev = readl(&cdev->deviceid) >> 28;
 
-       if (sil_rev == 1)
-               /* PG 2.0, efuse may not be set. */
-               return MPUPLL_M_800;
-       else if (sil_rev >= 2) {
+       if (sil_rev == 0) {
+               /* No efuse in PG 1.0. Use max speed */
+               return MPUPLL_M_720;
+       } else if (sil_rev >= 1) {
                /* Check what the efuse says our max speed is. */
-               int efuse_arm_mpu_max_freq;
+               int efuse_arm_mpu_max_freq, package_type;
                efuse_arm_mpu_max_freq = readl(&cdev->efuse_sma);
+               package_type = (efuse_arm_mpu_max_freq & PACKAGE_TYPE_MASK) >>
+                               PACKAGE_TYPE_SHIFT;
+
+               /* PG 2.0, efuse may not be set. */
+               if (package_type == PACKAGE_TYPE_UNDEFINED || package_type ==
+                   PACKAGE_TYPE_RESERVED)
+                       return MPUPLL_M_800;
+
                switch ((efuse_arm_mpu_max_freq & DEVICE_ID_MASK)) {
                case AM335X_ZCZ_1000:
                        return MPUPLL_M_1000;
@@ -155,14 +181,14 @@ int am335x_get_efuse_mpu_max_freq(struct ctrl_dev *cdev)
                }
        }
 
-       /* PG 1.0 or otherwise unknown, use the PG1.0 max */
+       /* unknown, use the PG1.0 max */
        return MPUPLL_M_720;
 }
 
 int am335x_get_tps65910_mpu_vdd(int sil_rev, int frequency)
 {
-       /* For PG2.1 and later, we have one set of values. */
-       if (sil_rev >= 2) {
+       /* For PG2.0 and later, we have one set of values. */
+       if (sil_rev >= 1) {
                switch (frequency) {
                case MPUPLL_M_1000:
                        return TPS65910_OP_REG_SEL_1_3_2_5;
@@ -171,12 +197,13 @@ int am335x_get_tps65910_mpu_vdd(int sil_rev, int frequency)
                case MPUPLL_M_720:
                        return TPS65910_OP_REG_SEL_1_2_0;
                case MPUPLL_M_600:
+               case MPUPLL_M_500:
                case MPUPLL_M_300:
-                       return TPS65910_OP_REG_SEL_1_1_3;
+                       return TPS65910_OP_REG_SEL_1_1_0;
                }
        }
 
-       /* Default to PG1.0/PG2.0 values. */
-       return TPS65910_OP_REG_SEL_1_1_3;
+       /* Default to PG1.0 values. */
+       return TPS65910_OP_REG_SEL_1_2_6;
 }
 #endif
diff --git a/arch/arm/mach-omap2/am33xx/u-boot-spl.lds b/arch/arm/mach-omap2/am33xx/u-boot-spl.lds
deleted file mode 100644 (file)
index 07cf267..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * (C) Copyright 2002
- * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
- *
- * (C) Copyright 2010
- * Texas Instruments, <www.ti.com>
- *     Aneesh V <aneesh@ti.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE,\
-               LENGTH = CONFIG_SPL_MAX_SIZE }
-MEMORY { .sdram : ORIGIN = CONFIG_SPL_BSS_START_ADDR, \
-               LENGTH = CONFIG_SPL_BSS_MAX_SIZE }
-
-OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
-OUTPUT_ARCH(arm)
-ENTRY(_start)
-SECTIONS
-{
-       .text      :
-       {
-               __start = .;
-               *(.vectors)
-               arch/arm/cpu/armv7/start.o      (.text)
-               *(.text*)
-       } >.sram
-
-       . = ALIGN(4);
-       .rodata : { *(SORT_BY_ALIGNMENT(.rodata*)) } >.sram
-
-       . = ALIGN(4);
-       .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
-
-       .u_boot_list : {
-               KEEP(*(SORT(.u_boot_list*)));
-       } >.sram
-
-       . = ALIGN(4);
-       __image_copy_end = .;
-
-       .end :
-       {
-               *(.__end)
-       } >.sram
-
-       .bss :
-       {
-               . = ALIGN(4);
-               __bss_start = .;
-               *(.bss*)
-               . = ALIGN(4);
-               __bss_end = .;
-       } >.sdram
-}
index f3172939889296dec5c5ec797058505c60372ed1..c090442598e5b873c5980417247150101915aac6 100644 (file)
@@ -12,6 +12,7 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 #include <common.h>
+#include <debug_uart.h>
 #include <spl.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/sizes.h>
@@ -159,6 +160,9 @@ void early_system_init(void)
        setup_early_clocks();
        do_board_detect();
        vcores_init();
+#ifdef CONFIG_DEBUG_UART_OMAP
+       debug_uart_init();
+#endif
        prcm_init();
 }
 
@@ -171,6 +175,7 @@ void board_init_f(ulong dummy)
 #endif
        /* For regular u-boot sdram_init() is called from dram_init() */
        sdram_init();
+       gd->ram_size = omap_sdram_size();
 }
 #endif
 
index 933fcba37cf59b18bf08e5923697d57d51bdd850..7b298d671dd5e12129f6d5abafc503f83f59069e 100644 (file)
@@ -1,5 +1,21 @@
 if OMAP34XX
 
+# We only enable the clocks for the GPIO banks that a given board requies.
+config OMAP3_GPIO_2
+       bool
+
+config OMAP3_GPIO_3
+       bool
+
+config OMAP3_GPIO_4
+       bool
+
+config OMAP3_GPIO_5
+       bool
+
+config OMAP3_GPIO_6
+       bool
+
 choice
        prompt "OMAP3 board select"
        optional
@@ -9,18 +25,28 @@ config TARGET_AM3517_EVM
 
 config TARGET_MT_VENTOUX
        bool "TeeJet Mt.Ventoux"
+       select OMAP3_GPIO_4
+       select OMAP3_GPIO_5 if USB_EHCI_HCD
 
 config TARGET_OMAP3_BEAGLE
        bool "TI OMAP3 BeagleBoard"
        select DM
        select DM_SERIAL
        select DM_GPIO
+       select OMAP3_GPIO_5
+       select OMAP3_GPIO_6
 
 config TARGET_CM_T35
        bool "CompuLab CM-T3530 and CM-T3730 boards"
+       select OMAP3_GPIO_2
+       select OMAP3_GPIO_5
+       select OMAP3_GPIO_6 if LED_STATUS
 
 config TARGET_CM_T3517
        bool "CompuLab CM-T3517 boards"
+       select OMAP3_GPIO_2
+       select OMAP3_GPIO_5
+       select OMAP3_GPIO_6 if LED_STATUS
 
 config TARGET_DEVKIT8000
        bool "TimLL OMAP3 Devkit8000"
@@ -36,12 +62,20 @@ config TARGET_OMAP3_IGEP00X0
        select DM
        select DM_SERIAL
        select DM_GPIO
+       select OMAP3_GPIO_3
+       select OMAP3_GPIO_5
+       select OMAP3_GPIO_6
 
 config TARGET_OMAP3_OVERO
        bool "OMAP35xx Gumstix Overo"
        select DM
        select DM_SERIAL
        select DM_GPIO
+       select OMAP3_GPIO_2
+       select OMAP3_GPIO_3
+       select OMAP3_GPIO_4
+       select OMAP3_GPIO_5
+       select OMAP3_GPIO_6
 
 config TARGET_OMAP3_ZOOM1
        bool "TI Zoom1"
@@ -54,16 +88,22 @@ config TARGET_AM3517_CRANE
 
 config TARGET_OMAP3_PANDORA
        bool "OMAP3 Pandora"
+       select OMAP3_GPIO_4
+       select OMAP3_GPIO_6
 
 config TARGET_ECO5PK
        bool "ECO5PK"
+       select OMAP3_GPIO_5 if USB_EHCI_HCD
 
 config TARGET_TRICORDER
        bool "Tricorder"
+       select OMAP3_GPIO_2
 
 config TARGET_MCX
        bool "MCX"
        select BOARD_LATE_INIT
+       select OMAP3_GPIO_2 if USB_EHCI_HCD
+       select OMAP3_GPIO_5 if USB_EHCI_HCD
 
 config TARGET_OMAP3_LOGIC
        bool "OMAP3 Logic"
@@ -71,15 +111,24 @@ config TARGET_OMAP3_LOGIC
        select DM
        select DM_SERIAL
        select DM_GPIO
+       select OMAP3_GPIO_4
+       select OMAP3_GPIO_6
 
 config TARGET_NOKIA_RX51
        bool "Nokia RX51"
 
 config TARGET_TAO3530
        bool "TAO3530"
+       select OMAP3_GPIO_2
+       select OMAP3_GPIO_3
+       select OMAP3_GPIO_4
+       select OMAP3_GPIO_5
+       select OMAP3_GPIO_6
 
 config TARGET_TWISTER
        bool "Twister"
+       select OMAP3_GPIO_2
+       select OMAP3_GPIO_5 if USB_EHCI_HCD
 
 config TARGET_OMAP3_CAIRO
        bool "QUIPOS CAIRO"
@@ -92,6 +141,11 @@ config TARGET_SNIPER
        select DM
        select DM_SERIAL
        select DM_GPIO
+       select OMAP3_GPIO_2
+       select OMAP3_GPIO_3
+       select OMAP3_GPIO_4
+       select OMAP3_GPIO_5
+       select OMAP3_GPIO_6
 
 endchoice
 
index c89c43830587b31963e28fd48d570123a951e763..1a66abdeb297a2e8ac9ee3e2da1d14b8ed152729 100644 (file)
@@ -63,6 +63,23 @@ config TI_SECURE_EMIF_PROTECTED_REGION_SIZE
          using hardware memory firewalls. This value must be smaller than the
          TI_SECURE_EMIF_TOTAL_REGION_SIZE value.
 
+config OMAP_PLATFORM_RESET_TIME_MAX_USEC
+       int "Something"
+       range 0  31219
+       default 31219
+       help
+         Most OMAPs' provide a way to specify the time for which the reset
+         should be held low while the voltages and Oscillator outputs
+         stabilize.
+         This time is mostly board and PMIC dependent. Hence the boards are
+         expected to specify a pre-computed time using the above option.
+         This value can be computed using a summation of the below 3
+         parameters
+         1: Time taken by the Osciallator to stop and restart
+         2: PMIC OTP time
+         3: Voltage ramp time, which can be derived using the PMIC slew rate
+            and value of voltage ramp needed.
+
 if TARGET_DRA7XX_EVM || TARGET_AM57XX_EVM
 menu "Voltage Domain OPP selections"
 
index 839d79d10204a97f8e3c6a91191dd6be1ddcb034..afe59e0b58260180191dd91d036fc17f6fd30098 100644 (file)
@@ -414,12 +414,13 @@ void setup_warmreset_time(void)
 {
        u32 rst_time, rst_val;
 
-#ifndef CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC
-       rst_time = CONFIG_DEFAULT_OMAP_RESET_TIME_MAX_USEC;
-#else
-       rst_time = CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC;
-#endif
-       rst_time = usec_to_32k(rst_time) << RSTTIME1_SHIFT;
+       /*
+        * MAX value for PRM_RSTTIME[9:0]RSTTIME1 stored is 0x3ff.
+        * 0x3ff is in the no of FUNC_32K_CLK cycles. Converting cycles
+        * into microsec and passing the value.
+        */
+       rst_time = usec_to_32k(CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC)
+               << RSTTIME1_SHIFT;
 
        if (rst_time > RSTTIME1_MASK)
                rst_time = RSTTIME1_MASK;
index a68f1d145dcb480a50ed1d38dd8a2fb533a4c116..b7f79800de57673951b4e010647dc1fad329a7d4 100644 (file)
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/clock.h>
 
-/*
- * Define Master code if there are multiple masters on the I2C_SR bus.
- * Normally not required
- */
-#ifndef CONFIG_OMAP_VC_I2C_HS_MCODE
-#define CONFIG_OMAP_VC_I2C_HS_MCODE 0x0
-#endif
-
 /* Register defines and masks for VC IP Block */
 /* PRM_VC_CFG_I2C_MODE */
 #define PRM_VC_CFG_I2C_MODE_DFILTEREN_BIT      (0x1 << 6)
@@ -84,8 +76,10 @@ static void omap_vc_init(u16 speed_khz)
               (cycles_low << PRM_VC_CFG_I2C_CLK_SCLL_SHIFT);
        writel(val, (*prcm)->prm_vc_cfg_i2c_clk);
 
-       val = CONFIG_OMAP_VC_I2C_HS_MCODE <<
-               PRM_VC_CFG_I2C_MODE_HSMCODE_SHIFT;
+       /*
+        * Master code if there are multiple masters on the I2C_SR bus.
+        */
+       val = 0x0 << PRM_VC_CFG_I2C_MODE_HSMCODE_SHIFT;
        /* No HS mode for now */
        val &= ~PRM_VC_CFG_I2C_MODE_HSMODEEN_BIT;
        writel(val, (*prcm)->prm_vc_cfg_i2c_mode);
index 2b752ad5cadd6430281dfad4f88383483f5f3bdf..740dbdf70e3ae4aa57202866aac1728b76a84cbe 100644 (file)
@@ -74,6 +74,14 @@ config ROCKCHIP_SPL_BACK_TO_BROM
           SPL will return to the boot rom, which will then load the U-Boot
           binary to keep going on.
 
+config ROCKCHIP_SPL_RESERVE_IRAM
+       hex "Size of IRAM reserved in SPL"
+       default 0x4000
+       help
+         SPL may need reserve memory for firmware loaded by SPL, whose load
+         address is in IRAM and may overlay with SPL text area if not
+         reserved.
+
 config ROCKCHIP_BROM_HELPER
        bool
 
index 0522d6546742b24056823050d907ffcd9b932849..7b8d0ee653f8290f685f262e694ef8babb42bcc1 100644 (file)
 DECLARE_GLOBAL_DATA_PTR;
 
 #define GRF_BASE       0x20008000
-static struct rk3036_grf * const grf = (void *)GRF_BASE;
 
 #define DEBUG_UART_BASE        0x20068000
 
 void board_init_f(ulong dummy)
 {
 #ifdef EARLY_DEBUG
+       struct rk3036_grf * const grf = (void *)GRF_BASE;
        /*
         * NOTE: sd card and debug uart use same iomux in rk3036,
         * so if you enable uart,
index 74f337919457637453fe90d474b83a358976a32b..8ca6b1e43925ab2999ce31a09a374cc18564c32f 100644 (file)
@@ -164,7 +164,6 @@ void board_init_f(ulong dummy)
        int ret;
 
        /* Example code showing how to enable the debug UART on RK3288 */
-#ifdef EARLY_UART
 #include <asm/arch/grf_rk3288.h>
        /* Enable early UART on the RK3288 */
 #define GRF_BASE       0xff770000
@@ -183,8 +182,7 @@ void board_init_f(ulong dummy)
         * printascii("string");
         */
        debug_uart_init();
-#endif
-
+       debug("\nspl:debug uart enabled in %s\n", __func__);
        ret = spl_early_init();
        if (ret) {
                debug("spl_early_init() failed: %d\n", ret);
@@ -205,7 +203,7 @@ void board_init_f(ulong dummy)
                debug("Pinctrl init failed: %d\n", ret);
                return;
        }
-
+       debug("\nspl:init dram\n");
        ret = uclass_get_device(UCLASS_RAM, 0, &dev);
        if (ret) {
                debug("DRAM init failed: %d\n", ret);
index 8549b28243a9952c20afecc2d61852e3745d1772..2feda612054b9cc4582f5bce41c098e5f2e3738f 100644 (file)
@@ -24,7 +24,7 @@
 #include <asm/arch/sdram.h>
 #include <linux/err.h>
 #include <power/regulator.h>
-#include <power/rk808_pmic.h>
+#include <power/rk8xx_pmic.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -981,11 +981,11 @@ static int veyron_init(struct dram_info *priv)
                return ret;
 
        /* Slowly raise to max CPU voltage to prevent overshoot */
-       ret = rk808_spl_configure_buck(pmic, 1, 1200000);
+       ret = rk8xx_spl_configure_buck(pmic, 1, 1200000);
        if (ret)
                return ret;
        udelay(175);/* Must wait for voltage to stabilize, 2mV/us */
-       ret = rk808_spl_configure_buck(pmic, 1, 1400000);
+       ret = rk8xx_spl_configure_buck(pmic, 1, 1400000);
        if (ret)
                return ret;
        udelay(100);/* Must wait for voltage to stabilize, 2mV/us */
index 8bb950ebd1145c8da3a63f3303b8db662c19e180..a621a6ff2ab78ad3a62b65979ead23c3f809eed8 100644 (file)
@@ -15,13 +15,13 @@ static struct mm_region rk3399_mem_map[] = {
        {
                .virt = 0x0UL,
                .phys = 0x0UL,
-               .size = 0x80000000UL,
+               .size = 0xf8000000UL,
                .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
                         PTE_BLOCK_INNER_SHARE
        }, {
-               .virt = 0xf0000000UL,
-               .phys = 0xf0000000UL,
-               .size = 0x10000000UL,
+               .virt = 0xf8000000UL,
+               .phys = 0xf8000000UL,
+               .size = 0x08000000UL,
                .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
                         PTE_BLOCK_NON_SHARE |
                         PTE_BLOCK_PXN | PTE_BLOCK_UXN
index 749b52c8e71cf2aaea1e35e08864b2e37384f63c..536879d65b5395ebd0070fece069e02e20f72061 100644 (file)
@@ -1280,6 +1280,8 @@ static int rk3399_dmc_probe(struct udevice *dev)
 
        priv->pmugrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF);
        debug("%s: pmugrf=%p\n", __func__, priv->pmugrf);
+       priv->info.base = 0;
+       priv->info.size = sdram_size_mb(priv) << 20;
 #endif
        return 0;
 }
@@ -1288,9 +1290,7 @@ static int rk3399_dmc_get_info(struct udevice *dev, struct ram_info *info)
 {
        struct dram_info *priv = dev_get_priv(dev);
 
-       info = &priv->info;
-       priv->info.base = 0;
-       priv->info.size = sdram_size_mb(priv) << 20;
+       *info = priv->info;
 
        return 0;
 }
@@ -1314,8 +1314,8 @@ U_BOOT_DRIVER(dmc_rk3399) = {
        .ofdata_to_platdata = rk3399_dmc_ofdata_to_platdata,
 #endif
        .probe = rk3399_dmc_probe,
-#ifdef CONFIG_SPL_BUILD
        .priv_auto_alloc_size = sizeof(struct dram_info),
+#ifdef CONFIG_SPL_BUILD
        .platdata_auto_alloc_size = sizeof(struct rockchip_dmc_plat),
 #endif
 };
index b5d06dbe8333cfca804ea845b338bb9d1e3161a3..3f45a25cea48f80bfadc40d94a3aebfc1162edbd 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <common.h>
 #include <asm/io.h>
-#include <asm/armv7m.h>
+#include <asm/armv7m_mpu.h>
 #include <asm/arch/stm32.h>
 
 u32 get_cpu_rev(void)
@@ -17,17 +17,19 @@ u32 get_cpu_rev(void)
 
 int arch_cpu_init(void)
 {
+       struct mpu_region_config stm32_region_config[] = {
+               { 0x00000000, REGION_0, XN_DIS, PRIV_RW_USR_RW,
+               STRONG_ORDER, REGION_4GB },
+       };
        configure_clocks();
-
        /*
         * Configure the memory protection unit (MPU) to allow full access to
         * the whole 4GB address space.
         */
-       writel(0, &V7M_MPU->rnr);
-       writel(0, &V7M_MPU->rbar);
-       writel((V7M_MPU_RASR_AP_RW_RW | V7M_MPU_RASR_SIZE_4GB
-               | V7M_MPU_RASR_EN), &V7M_MPU->rasr);
-       writel(V7M_MPU_CTRL_ENABLE | V7M_MPU_CTRL_HFNMIENA, &V7M_MPU->ctrl);
+       disable_mpu();
+       for (int i = 0; i < ARRAY_SIZE(stm32_region_config); i++)
+               mpu_config(&stm32_region_config[i]);
+       enable_mpu();
 
        return 0;
 }
index 6f9704ab78853cdab55ee4a65bcc2adf18abf466..74a9350a31f0d38fa0c8457d36198ae8b10cd6a0 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <common.h>
 #include <asm/io.h>
-#include <asm/armv7m.h>
+#include <asm/armv7m_mpu.h>
 #include <asm/arch/stm32.h>
 
 u32 get_cpu_rev(void)
@@ -17,56 +17,27 @@ u32 get_cpu_rev(void)
 
 int arch_cpu_init(void)
 {
-       /*
-               * Configure the memory protection unit (MPU)
-               * 0x00000000 - 0xffffffff: Strong-order, Shareable
-               * 0xC0000000 - 0xC0800000: Normal, Outer and inner Non-cacheable
-        */
+       struct mpu_region_config stm32_region_config[] = {
+               { 0x00000000, REGION_0, XN_DIS, PRIV_RW_USR_RW,
+               O_I_WB_RD_WR_ALLOC, REGION_4GB },
 
-        /* Disable MPU */
-        writel(0, &V7M_MPU->ctrl);
+               { 0x00000000, REGION_1, XN_DIS, PRIV_RW_USR_RW,
+               STRONG_ORDER, REGION_512MB },
 
-        writel(
-                0x00000000 /* address */
-                | 1 << 4       /* VALID */
-                | 0 << 0       /* REGION */
-                , &V7M_MPU->rbar
-        );
+               { 0x40000000, REGION_2, XN_EN, PRIV_RW_USR_RW,
+               DEVICE_NON_SHARED, REGION_512MB },
 
-        /* Strong-order, Shareable */
-        /* TEX=000, S=1, C=0, B=0*/
-        writel(
-                (V7M_MPU_RASR_XN_ENABLE
-                        | V7M_MPU_RASR_AP_RW_RW
-                        | 0x01 << V7M_MPU_RASR_S_SHIFT
-                        | 0x00 << V7M_MPU_RASR_TEX_SHIFT
-                        | V7M_MPU_RASR_SIZE_4GB
-                        | V7M_MPU_RASR_EN)
-                , &V7M_MPU->rasr
-        );
+               { 0xA0000000, REGION_3, XN_EN, PRIV_RW_USR_RW,
+               DEVICE_NON_SHARED, REGION_512MB },
 
-        writel(
-                0xC0000000 /* address */
-                | 1 << 4       /* VALID */
-                | 1 << 0       /* REGION */
-                , &V7M_MPU->rbar
-        );
+               { 0xE0000000, REGION_4, XN_EN, PRIV_RW_USR_RW,
+               STRONG_ORDER, REGION_512MB },
+       };
 
-        /* Normal, Outer and inner Non-cacheable */
-        /* TEX=001, S=0, C=0, B=0*/
-        writel(
-                (V7M_MPU_RASR_XN_ENABLE
-                        | V7M_MPU_RASR_AP_RW_RW
-                        | 0x01 << V7M_MPU_RASR_TEX_SHIFT
-                        | 0x01 << V7M_MPU_RASR_B_SHIFT
-                        | 0x01 << V7M_MPU_RASR_C_SHIFT
-                        | V7M_MPU_RASR_SIZE_8MB
-                        | V7M_MPU_RASR_EN)
-                        , &V7M_MPU->rasr
-        );
-
-        /* Enable MPU */
-        writel(V7M_MPU_CTRL_ENABLE | V7M_MPU_CTRL_HFNMIENA, &V7M_MPU->ctrl);
+       disable_mpu();
+       for (int i = 0; i < ARRAY_SIZE(stm32_region_config); i++)
+               mpu_config(&stm32_region_config[i]);
+       enable_mpu();
 
        return 0;
 }
index eb34c207ce0b653f00f75308d5a7cf492db55691..06072f23bd8c478e49ef6dfc613775e29b7f57fe 100644 (file)
@@ -9,5 +9,7 @@ obj-y += mem_map.o
 ifdef CONFIG_ARMV8_MULTIENTRY
 obj-y += smp.o smp_kick_cpus.o
 obj-$(CONFIG_ARCH_UNIPHIER_LD20) += arm-cci500.o
+else
+obj-$(CONFIG_ARCH_UNIPHIER_LD20) += lowlevel_init.o
 endif
 endif
diff --git a/arch/arm/mach-uniphier/arm64/lowlevel_init.S b/arch/arm/mach-uniphier/arm64/lowlevel_init.S
new file mode 100644 (file)
index 0000000..e52db1d
--- /dev/null
@@ -0,0 +1,14 @@
+/*
+ * Copyright (C) 2017 Socionext Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <linux/linkage.h>
+
+ENTRY(lowlevel_init)
+       /* LD20 needs the following code to boot.  I do not know why. */
+       mrs     x0, sctlr_el1
+       msr     sctlr_el1, x0
+       ret
+ENDPROC(lowlevel_init)
index 2564a02a62305cc2fb8e75cf4507b9e62e6cfcf8..e05d6bffd5ce3f5fd55873e6cdfaf61db95146d0 100644 (file)
@@ -175,6 +175,7 @@ static const struct uniphier_initdata uniphier_initdata[] = {
                .nand_2cs = false,
                .sbc_init = uniphier_pxs2_sbc_init,
                .pll_init = uniphier_pxs3_pll_init,
+               .clk_init = uniphier_pxs3_clk_init,
        },
 #endif
 };
index a54d2acb109e7dc9295dff2f1d0b32846176927e..abb58a729aa31eda3ff193860426baa2f663c5b1 100644 (file)
@@ -13,6 +13,7 @@ obj-$(CONFIG_ARCH_UNIPHIER_PXS2)      += boot-device-pxs2.o
 obj-$(CONFIG_ARCH_UNIPHIER_LD6B)       += boot-device-pxs2.o
 obj-$(CONFIG_ARCH_UNIPHIER_LD11)       += boot-device-ld11.o
 obj-$(CONFIG_ARCH_UNIPHIER_LD20)       += boot-device-ld11.o
+obj-$(CONFIG_ARCH_UNIPHIER_PXS3)       += boot-device-pxs3.o
 
 ifdef CONFIG_SPL_BUILD
 obj-$(CONFIG_SPL_BOARD_LOAD_IMAGE)     += spl_board.o
diff --git a/arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c b/arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c
new file mode 100644 (file)
index 0000000..fe45a01
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2017 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <spl.h>
+#include <linux/io.h>
+#include <linux/kernel.h>
+
+#include "../sg-regs.h"
+#include "boot-device.h"
+
+const struct uniphier_boot_device uniphier_pxs3_boot_device_table[] = {
+       {BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC  8, EraseSize 128KB, Addr 5)"},
+       {BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC 16, EraseSize 128KB, Addr 5)"},
+       {BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC  8, EraseSize 256KB, Addr 5)"},
+       {BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC 16, EraseSize 256KB, Addr 5)"},
+       {BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC  8, EraseSize 512KB, Addr 5)"},
+       {BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC 16, EraseSize 512KB, Addr 5)"},
+       {BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC  8, ONFI,            Addr 5)"},
+       {BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC 16, ONFI,            Addr 5)"},
+       {BOOT_DEVICE_MMC1, "eMMC (Legacy,         4bit, 1.8V, Training Off)"},
+       {BOOT_DEVICE_MMC1, "eMMC (Legacy,         4bit, 1.8V, Training On)"},
+       {BOOT_DEVICE_MMC1, "eMMC (Legacy,         8bit, 1.8V, Training Off)"},
+       {BOOT_DEVICE_MMC1, "eMMC (Legacy,         8bit, 1.8V, Training On)"},
+       {BOOT_DEVICE_MMC1, "eMMC (High Speed SDR, 8bit, 1.8V, Training Off)"},
+       {BOOT_DEVICE_MMC1, "eMMC (High Speed SDR, 8bit, 1.8V, Training On)"},
+       {BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC  8, ONFI,            Addr 5, BBM Last Page)"},
+       {BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC 16, ONFI,            Addr 5, BBM Last Page)"},
+};
+
+const unsigned uniphier_pxs3_boot_device_count =
+                               ARRAY_SIZE(uniphier_pxs3_boot_device_table);
+
+int uniphier_pxs3_boot_device_is_usb(u32 pinmon)
+{
+       return !!(readl(SG_PINMON2) & BIT(31));
+}
index 00809777b24ae1ec73b03029b39d5cee8bf60423..094f77b4d10e465462c968ca32a0df706b30a13c 100644 (file)
@@ -115,6 +115,16 @@ static const struct uniphier_boot_device_info uniphier_boot_device_info[] = {
                .have_internal_stm = 1,
        },
 #endif
+#if defined(CONFIG_ARCH_UNIPHIER_PXS3)
+       {
+               .soc_id = UNIPHIER_PXS3_ID,
+               .boot_device_sel_shift = 1,
+               .boot_device_table = uniphier_pxs3_boot_device_table,
+               .boot_device_count = &uniphier_pxs3_boot_device_count,
+               .boot_device_is_usb = uniphier_pxs3_boot_device_is_usb,
+               .have_internal_stm = 0,
+       },
+#endif
 };
 UNIPHIER_DEFINE_SOCDATA_FUNC(uniphier_get_boot_device_info,
                             uniphier_boot_device_info)
index f3fb2f32a881b19a9b5c2a85448bcce6d5a8274a..c4ce3e50a378c4593b840c46762a5116c5ee52b2 100644 (file)
@@ -18,16 +18,19 @@ extern const struct uniphier_boot_device uniphier_ld4_boot_device_table[];
 extern const struct uniphier_boot_device uniphier_pro5_boot_device_table[];
 extern const struct uniphier_boot_device uniphier_pxs2_boot_device_table[];
 extern const struct uniphier_boot_device uniphier_ld11_boot_device_table[];
+extern const struct uniphier_boot_device uniphier_pxs3_boot_device_table[];
 
 extern const unsigned int uniphier_sld3_boot_device_count;
 extern const unsigned int uniphier_ld4_boot_device_count;
 extern const unsigned int uniphier_pro5_boot_device_count;
 extern const unsigned int uniphier_pxs2_boot_device_count;
 extern const unsigned int uniphier_ld11_boot_device_count;
+extern const unsigned int uniphier_pxs3_boot_device_count;
 
 int uniphier_pxs2_boot_device_is_usb(u32 pinmon);
 int uniphier_ld11_boot_device_is_usb(u32 pinmon);
 int uniphier_ld20_boot_device_is_usb(u32 pinmon);
+int uniphier_pxs3_boot_device_is_usb(u32 pinmon);
 
 unsigned int uniphier_pxs2_boot_device_fixup(unsigned int mode);
 unsigned int uniphier_ld11_boot_device_fixup(unsigned int mode);
index 41341970ec057dd1d91b632f162b1510a74ab324..dad035d03a88841586cb09bc41362101cefe37c7 100644 (file)
@@ -25,7 +25,7 @@ obj-$(CONFIG_ARCH_UNIPHIER_PXS2)      += clk-pxs2.o
 obj-$(CONFIG_ARCH_UNIPHIER_LD6B)       += clk-pxs2.o
 obj-$(CONFIG_ARCH_UNIPHIER_LD11)       += clk-ld11.o pll-ld11.o
 obj-$(CONFIG_ARCH_UNIPHIER_LD20)       += clk-ld20.o pll-ld20.o
-obj-$(CONFIG_ARCH_UNIPHIER_PXS3)       += pll-pxs3.o
+obj-$(CONFIG_ARCH_UNIPHIER_PXS3)       += clk-pxs3.o pll-pxs3.o
 
 endif
 
index 36aa7879846ef0c0b08bf6268f71ec6cb8cab69e..0266e7e66b79d849d29d1fdca11d59a004795e3f 100644 (file)
@@ -33,7 +33,7 @@ void uniphier_ld11_clk_init(void)
        /* TODO: use "mmc-pwrseq-emmc" */
        writel(1, SDCTRL_EMMC_HW_RESET);
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
        {
                /* FIXME: the current clk driver can not handle parents */
                u32 tmp;
index 62b6927732a630402360cd4daae5ade7a87ebaa3..def87c1aac2cdfffee340a435de0952e76bb1a5d 100644 (file)
@@ -31,7 +31,7 @@ void uniphier_ld4_clk_init(void)
 #ifdef CONFIG_UNIPHIER_ETH
        tmp |= SC_CLKCTRL_CEN_ETHER;
 #endif
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
        tmp |= SC_CLKCTRL_CEN_MIO | SC_CLKCTRL_CEN_STDMAC;
 #endif
 #ifdef CONFIG_NAND_DENALI
index 92b73384abd29eda35c85b158eea5927b39a0620..19be4f3145c8b66a8cba5217f4753bd3a650f746 100644 (file)
@@ -46,7 +46,7 @@ void uniphier_pro4_clk_init(void)
 #ifdef CONFIG_UNIPHIER_ETH
        tmp |= SC_CLKCTRL_CEN_ETHER;
 #endif
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
        tmp |= SC_CLKCTRL_CEN_MIO | SC_CLKCTRL_CEN_STDMAC;
 #endif
 #ifdef CONFIG_NAND_DENALI
diff --git a/arch/arm/mach-uniphier/clk/clk-pxs3.c b/arch/arm/mach-uniphier/clk/clk-pxs3.c
new file mode 100644 (file)
index 0000000..2dee857
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2017 Socionext Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <linux/io.h>
+
+#include "../init.h"
+
+#define SDCTRL_EMMC_HW_RESET   0x59810280
+
+void uniphier_pxs3_clk_init(void)
+{
+       /* TODO: use "mmc-pwrseq-emmc" */
+       writel(1, SDCTRL_EMMC_HW_RESET);
+}
index 4803d08038c8124de2469a276408e30e50897ec2..d413d00f951b403235ff4326d041a39321fec121 100644 (file)
@@ -119,6 +119,7 @@ void uniphier_pro5_clk_init(void);
 void uniphier_pxs2_clk_init(void);
 void uniphier_ld11_clk_init(void);
 void uniphier_ld20_clk_init(void);
+void uniphier_pxs3_clk_init(void);
 
 unsigned int uniphier_boot_device_raw(void);
 int uniphier_have_internal_stm(void);
index dc94084c899593d493398c7e7c09c9ffd048b143..029da91f8f8bab05428c9732879f823767a24e3f 100644 (file)
@@ -70,6 +70,7 @@
 
 /* Pin Monitor */
 #define SG_PINMON0                     (SG_DBG_BASE | 0x0100)
+#define SG_PINMON2                     (SG_DBG_BASE | 0x0108)
 
 #define SG_PINMON0_CLK_MODE_UPLLSRC_MASK       (0x3 << 19)
 #define SG_PINMON0_CLK_MODE_UPLLSRC_DEFAULT    (0x0 << 19)
index baf1be6a01bfaf978fe7d912588d0de9baeaf7a0..f9de3a9dda9e4c3c9cfa44db8425955462874cee 100644 (file)
@@ -26,7 +26,7 @@ unsigned int uniphier_get_soc_id(void)
 
 unsigned int uniphier_get_soc_model(void)
 {
-       return __uniphier_get_revision_field(0x3, 8);
+       return __uniphier_get_revision_field(0x7, 8);
 }
 
 unsigned int uniphier_get_soc_revision(void)
index d97930e577bb057a45ce62249871244440c9bdcf..d07b92d1b442b86be928b28ee08b0cb1fbfe23c4 100644 (file)
@@ -75,6 +75,15 @@ config ARCH_ATH79
        select OF_CONTROL
        select DM
 
+config ARCH_BMIPS
+       bool "Support BMIPS SoCs"
+       select OF_CONTROL
+       select DM
+       select CLK
+       select CPU
+       select RAM
+       select SYSRESET
+
 config MACH_PIC32
        bool "Support Microchip PIC32"
        select OF_CONTROL
@@ -88,6 +97,7 @@ config TARGET_BOSTON
        select MIPS_CM
        select MIPS_L1_CACHE_SHIFT_6
        select MIPS_L2_CACHE
+       select OF_BOARD_SETUP
        select SUPPORTS_BIG_ENDIAN
        select SUPPORTS_LITTLE_ENDIAN
        select SUPPORTS_CPU_MIPS32_R1
@@ -123,6 +133,7 @@ source "board/micronas/vct/Kconfig"
 source "board/pb1x00/Kconfig"
 source "board/qemu-mips/Kconfig"
 source "arch/mips/mach-ath79/Kconfig"
+source "arch/mips/mach-bmips/Kconfig"
 source "arch/mips/mach-pic32/Kconfig"
 
 if MIPS
@@ -211,6 +222,17 @@ config ROM_EXCEPTION_VECTORS
          Disable this, if the U-Boot image is booted from DRAM (e.g. by SPL).
          In that case the image size will be reduced by 0x500 bytes.
 
+config MIPS_CM_BASE
+       hex "MIPS CM GCR Base Address"
+       depends on MIPS_CM
+       default 0x16100000 if TARGET_BOSTON
+       default 0x1fbf8000
+       help
+         The physical base address at which to map the MIPS Coherence Manager
+         Global Configuration Registers (GCRs). This should be set such that
+         the GCRs occupy a region of the physical address space which is
+         otherwise unused, or at minimum that software doesn't need to access.
+
 endmenu
 
 menu "OS boot interface"
@@ -383,15 +405,6 @@ config MIPS_CM
          wish U-Boot to configure it or make use of it to retrieve system
          information such as cache configuration.
 
-config MIPS_CM_BASE
-       hex
-       default 0x1fbf8000
-       help
-         The physical base address at which to map the MIPS Coherence Manager
-         Global Configuration Registers (GCRs). This should be set such that
-         the GCRs occupy a region of the physical address space which is
-         otherwise unused, or at minimum that software doesn't need to access.
-
 endif
 
 endmenu
index efe7e44236b9bd0b5f34129b64db09fdd1b09af0..c30d4ef39db0b79840fcdf9ff64e789cf4085067 100644 (file)
@@ -15,6 +15,7 @@ libs-y += arch/mips/lib/
 
 machine-$(CONFIG_SOC_AU1X00) += au1x00
 machine-$(CONFIG_ARCH_ATH79) += ath79
+machine-$(CONFIG_ARCH_BMIPS) += bmips
 machine-$(CONFIG_MACH_PIC32) += pic32
 
 machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y))
index dcd346002cab9ce63dff390260190015480ba96c..2c72c1553d64826af0c2216d34550546946804b8 100644 (file)
@@ -36,6 +36,8 @@ OBJCOPYFLAGS          += -O $(64bit-bfd)
 endif
 
 PLATFORM_CPPFLAGS += -D__MIPS__
+PLATFORM_ELFENTRY = "__start"
+PLATFORM_ELFFLAGS += -B mips $(OBJCOPYFLAGS)
 
 #
 # From Linux arch/mips/Makefile
index 1b919ed82289d1d4d30e4daccf057c8c4e89e9ed..55e6498b6557c75b265328b3eb3958ded4d5d758 100644 (file)
@@ -12,6 +12,7 @@
 #include <asm/mipsregs.h>
 #include <asm/reboot.h>
 
+#ifndef CONFIG_SYSRESET
 void __weak _machine_restart(void)
 {
        fprintf(stderr, "*** reset failed ***\n");
@@ -26,6 +27,7 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
        return 0;
 }
+#endif
 
 void write_one_tlb(int index, u32 pagemask, u32 hi, u32 low0, u32 low1)
 {
index 6740fdf9ed272eda6bc7213ad02db57fc68f7d7b..d01ee9f9bddd3095ffcf754dcc9e6176aacf33ef 100644 (file)
@@ -151,8 +151,13 @@ reset:
         mfc0   t0, CP0_GLOBALNUMBER
 #endif
 
+#ifdef CONFIG_ARCH_BMIPS
+1:     mfc0    t0, CP0_DIAGNOSTIC, 3
+       and     t0, t0, (1 << 31)
+#else
 1:     mfc0    t0, CP0_EBASE
        and     t0, t0, EBASE_CPUNUM
+#endif
 
        /* Hang if this isn't the first CPU in the system */
 2:     beqz    t0, 4f
@@ -237,6 +242,13 @@ wr_done:
 #ifdef CONFIG_MIPS_INIT_STACK_IN_SRAM
        /* Set up initial stack and global data */
        setup_stack_gd
+
+# ifdef CONFIG_DEBUG_UART
+       /* Earliest point to set up debug uart */
+       PTR_LA  t9, debug_uart_init
+       jalr    t9
+        nop
+# endif
 #endif
 
 #ifndef CONFIG_SKIP_LOWLEVEL_INIT
@@ -263,6 +275,13 @@ wr_done:
 #ifndef CONFIG_MIPS_INIT_STACK_IN_SRAM
        /* Set up initial stack and global data */
        setup_stack_gd
+
+# ifdef CONFIG_DEBUG_UART
+       /* Earliest point to set up debug uart */
+       PTR_LA  t9, debug_uart_init
+       jalr    t9
+        nop
+# endif
 #endif
 
        move    a0, zero                # a0 <-- boot_flags = 0
index 30fcc2b91e6a9113fbbc76e62782a68ca3b909fd..4c02c48c11168ca5288433d9f0abd51ea6d21ac7 100644 (file)
@@ -8,6 +8,9 @@ dtb-$(CONFIG_TARGET_BOSTON) += img,boston.dtb
 dtb-$(CONFIG_TARGET_MALTA) += mti,malta.dtb
 dtb-$(CONFIG_TARGET_PIC32MZDASK) += pic32mzda_sk.dtb
 dtb-$(CONFIG_TARGET_XILFPGA) += nexys4ddr.dtb
+dtb-$(CONFIG_BOARD_COMTREND_AR5387UN) += comtrend,ar-5387un.dtb
+dtb-$(CONFIG_BOARD_COMTREND_VR3032U) += comtrend,vr-3032u.dtb
+dtb-$(CONFIG_BOARD_HUAWEI_HG556A) += huawei,hg556a.dtb
 dtb-$(CONFIG_BOARD_TPLINK_WDR4300) += tplink_wdr4300.dtb
 
 targets += $(dtb-y)
diff --git a/arch/mips/dts/brcm,bcm63268.dtsi b/arch/mips/dts/brcm,bcm63268.dtsi
new file mode 100644 (file)
index 0000000..b03763f
--- /dev/null
@@ -0,0 +1,143 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <dt-bindings/clock/bcm63268-clock.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/power-domain/bcm63268-power-domain.h>
+#include <dt-bindings/reset/bcm63268-reset.h>
+#include "skeleton.dtsi"
+
+/ {
+       compatible = "brcm,bcm63268";
+
+       cpus {
+               reg = <0x10000000 0x4>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               u-boot,dm-pre-reloc;
+
+               cpu@0 {
+                       compatible = "brcm,bcm63268-cpu", "mips,mips4Kc";
+                       device_type = "cpu";
+                       reg = <0>;
+                       u-boot,dm-pre-reloc;
+               };
+
+               cpu@1 {
+                       compatible = "brcm,bcm63268-cpu", "mips,mips4Kc";
+                       device_type = "cpu";
+                       reg = <1>;
+                       u-boot,dm-pre-reloc;
+               };
+       };
+
+       clocks {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               u-boot,dm-pre-reloc;
+
+               periph_osc: periph-osc {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <50000000>;
+                       u-boot,dm-pre-reloc;
+               };
+
+               periph_clk: periph-clk {
+                       compatible = "brcm,bcm6345-clk";
+                       reg = <0x10000004 0x4>;
+                       #clock-cells = <1>;
+               };
+
+               timer_clk: timer-clk {
+                       compatible = "brcm,bcm6345-clk";
+                       reg = <0x100000ac 0x4>;
+                       #clock-cells = <1>;
+               };
+       };
+
+       ubus {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               u-boot,dm-pre-reloc;
+
+               pll_cntl: syscon@10000008 {
+                       compatible = "syscon";
+                       reg = <0x10000008 0x4>;
+               };
+
+               syscon-reboot {
+                       compatible = "syscon-reboot";
+                       regmap = <&pll_cntl>;
+                       offset = <0x0>;
+                       mask = <0x1>;
+               };
+
+               periph_rst: reset-controller@10000010 {
+                       compatible = "brcm,bcm6345-reset";
+                       reg = <0x10000010 0x4>;
+                       #reset-cells = <1>;
+               };
+
+               gpio1: gpio-controller@100000c0 {
+                       compatible = "brcm,bcm6345-gpio";
+                       reg = <0x100000c0 0x4>, <0x100000c8 0x4>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       ngpios = <20>;
+
+                       status = "disabled";
+               };
+
+               gpio0: gpio-controller@100000c4 {
+                       compatible = "brcm,bcm6345-gpio";
+                       reg = <0x100000c4 0x4>, <0x100000cc 0x4>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       status = "disabled";
+               };
+
+               uart0: serial@10000180 {
+                       compatible = "brcm,bcm6345-uart";
+                       reg = <0x10000180 0x18>;
+                       clocks = <&periph_osc>;
+
+                       status = "disabled";
+               };
+
+               uart1: serial@100001a0 {
+                       compatible = "brcm,bcm6345-uart";
+                       reg = <0x100001a0 0x18>;
+                       clocks = <&periph_osc>;
+
+                       status = "disabled";
+               };
+
+               periph_pwr: power-controller@1000184c {
+                       compatible = "brcm,bcm6328-power-domain";
+                       reg = <0x1000184c 0x4>;
+                       #power-domain-cells = <1>;
+               };
+
+               leds: led-controller@10001900 {
+                       compatible = "brcm,bcm6328-leds";
+                       reg = <0x10001900 0x24>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       status = "disabled";
+               };
+
+               memory-controller@10003000 {
+                       compatible = "brcm,bcm6328-mc";
+                       reg = <0x10003000 0x894>;
+                       u-boot,dm-pre-reloc;
+               };
+       };
+};
diff --git a/arch/mips/dts/brcm,bcm6328.dtsi b/arch/mips/dts/brcm,bcm6328.dtsi
new file mode 100644 (file)
index 0000000..3926885
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <dt-bindings/clock/bcm6328-clock.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/power-domain/bcm6328-power-domain.h>
+#include <dt-bindings/reset/bcm6328-reset.h>
+#include "skeleton.dtsi"
+
+/ {
+       compatible = "brcm,bcm6328";
+
+       cpus {
+               reg = <0x10000000 0x4>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               u-boot,dm-pre-reloc;
+
+               cpu@0 {
+                       compatible = "brcm,bcm6328-cpu", "mips,mips4Kc";
+                       device_type = "cpu";
+                       reg = <0>;
+                       u-boot,dm-pre-reloc;
+               };
+
+               cpu@1 {
+                       compatible = "brcm,bcm6328-cpu", "mips,mips4Kc";
+                       device_type = "cpu";
+                       reg = <1>;
+                       u-boot,dm-pre-reloc;
+               };
+       };
+
+       clocks {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               u-boot,dm-pre-reloc;
+
+               periph_osc: periph-osc {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <50000000>;
+                       u-boot,dm-pre-reloc;
+               };
+
+               periph_clk: periph-clk {
+                       compatible = "brcm,bcm6345-clk";
+                       reg = <0x10000004 0x4>;
+                       #clock-cells = <1>;
+               };
+       };
+
+       ubus {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               u-boot,dm-pre-reloc;
+
+               periph_rst: reset-controller@10000010 {
+                       compatible = "brcm,bcm6345-reset";
+                       reg = <0x10000010 0x4>;
+                       #reset-cells = <1>;
+               };
+
+               pll_cntl: syscon@10000068 {
+                       compatible = "syscon";
+                       reg = <0x10000068 0x4>;
+               };
+
+               syscon-reboot {
+                       compatible = "syscon-reboot";
+                       regmap = <&pll_cntl>;
+                       offset = <0x0>;
+                       mask = <0x1>;
+               };
+
+               gpio: gpio-controller@10000084 {
+                       compatible = "brcm,bcm6345-gpio";
+                       reg = <0x10000084 0x4>, <0x1000008c 0x4>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       status = "disabled";
+               };
+
+               uart0: serial@10000100 {
+                       compatible = "brcm,bcm6345-uart";
+                       reg = <0x10000100 0x18>;
+                       clocks = <&periph_osc>;
+
+                       status = "disabled";
+               };
+
+               uart1: serial@10000120 {
+                       compatible = "brcm,bcm6345-uart";
+                       reg = <0x10000120 0x18>;
+                       clocks = <&periph_osc>;
+
+                       status = "disabled";
+               };
+
+               leds: led-controller@10000800 {
+                       compatible = "brcm,bcm6328-leds";
+                       reg = <0x10000800 0x24>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       status = "disabled";
+               };
+
+               periph_pwr: power-controller@10001848 {
+                       compatible = "brcm,bcm6328-power-domain";
+                       reg = <0x10001848 0x4>;
+                       #power-domain-cells = <1>;
+               };
+
+               memory-controller@10003000 {
+                       compatible = "brcm,bcm6328-mc";
+                       reg = <0x10003000 0x864>;
+                       u-boot,dm-pre-reloc;
+               };
+       };
+};
diff --git a/arch/mips/dts/brcm,bcm6358.dtsi b/arch/mips/dts/brcm,bcm6358.dtsi
new file mode 100644 (file)
index 0000000..0dad998
--- /dev/null
@@ -0,0 +1,140 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <dt-bindings/clock/bcm6358-clock.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/reset/bcm6358-reset.h>
+#include "skeleton.dtsi"
+
+/ {
+       compatible = "brcm,bcm6358";
+
+       cpus {
+               reg = <0xfffe0000 0x4>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               u-boot,dm-pre-reloc;
+
+               cpu@0 {
+                       compatible = "brcm,bcm6358-cpu", "mips,mips4Kc";
+                       device_type = "cpu";
+                       reg = <0>;
+                       u-boot,dm-pre-reloc;
+               };
+
+               cpu@1 {
+                       compatible = "brcm,bcm6358-cpu", "mips,mips4Kc";
+                       device_type = "cpu";
+                       reg = <1>;
+                       u-boot,dm-pre-reloc;
+               };
+       };
+
+       clocks {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               u-boot,dm-pre-reloc;
+
+               periph_osc: periph-osc {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <50000000>;
+                       u-boot,dm-pre-reloc;
+               };
+
+               periph_clk: periph-clk {
+                       compatible = "brcm,bcm6345-clk";
+                       reg = <0xfffe0004 0x4>;
+                       #clock-cells = <1>;
+               };
+       };
+
+       pflash: nor@1e000000 {
+               compatible = "cfi-flash";
+               reg = <0x1e000000 0x2000000>;
+               bank-width = <2>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               status = "disabled";
+       };
+
+       ubus {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               u-boot,dm-pre-reloc;
+
+               pll_cntl: syscon@fffe0008 {
+                       compatible = "syscon";
+                       reg = <0xfffe0008 0x4>;
+               };
+
+               syscon-reboot {
+                       compatible = "syscon-reboot";
+                       regmap = <&pll_cntl>;
+                       offset = <0x0>;
+                       mask = <0x1>;
+               };
+
+               periph_rst: reset-controller@fffe0034 {
+                       compatible = "brcm,bcm6345-reset";
+                       reg = <0xfffe0034 0x4>;
+                       #reset-cells = <1>;
+               };
+
+               gpio1: gpio-controller@fffe0080 {
+                       compatible = "brcm,bcm6345-gpio";
+                       reg = <0xfffe0080 0x4>, <0xfffe0088 0x4>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       ngpios = <8>;
+
+                       status = "disabled";
+               };
+
+               gpio0: gpio-controller@fffe0084 {
+                       compatible = "brcm,bcm6345-gpio";
+                       reg = <0xfffe0084 0x4>, <0xfffe008c 0x4>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       status = "disabled";
+               };
+
+               leds: led-controller@fffe00d0 {
+                       compatible = "brcm,bcm6358-leds";
+                       reg = <0xfffe00d0 0x8>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       status = "disabled";
+               };
+
+               uart0: serial@fffe0100 {
+                       compatible = "brcm,bcm6345-uart";
+                       reg = <0xfffe0100 0x18>;
+                       clocks = <&periph_osc>;
+
+                       status = "disabled";
+               };
+
+               uart1: serial@fffe0120 {
+                       compatible = "brcm,bcm6345-uart";
+                       reg = <0xfffe0120 0x18>;
+                       clocks = <&periph_osc>;
+
+                       status = "disabled";
+               };
+
+               memory-controller@fffe1200 {
+                       compatible = "brcm,bcm6358-mc";
+                       reg = <0xfffe1200 0x4c>;
+                       u-boot,dm-pre-reloc;
+               };
+       };
+};
diff --git a/arch/mips/dts/comtrend,ar-5387un.dts b/arch/mips/dts/comtrend,ar-5387un.dts
new file mode 100644 (file)
index 0000000..73f2b49
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+/dts-v1/;
+
+#include "brcm,bcm6328.dtsi"
+
+/ {
+       model = "Comtrend AR-5387un";
+       compatible = "comtrend,ar5387-un", "brcm,bcm6328";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&leds {
+       status = "okay";
+
+       led@1 {
+               reg = <1>;
+               label = "AR-5387un:red:inet";
+       };
+
+       led@4 {
+               reg = <4>;
+               label = "AR-5387un:red:power";
+       };
+
+       led@7 {
+               reg = <7>;
+               label = "AR-5387un:green:inet";
+       };
+
+       led@8 {
+               reg = <8>;
+               label = "AR-5387un:green:power";
+       };
+
+       led@11 {
+               reg = <11>;
+               active-low;
+               label = "AR-5387un:green:dsl";
+       };
+};
+
+&uart0 {
+       u-boot,dm-pre-reloc;
+       status = "okay";
+};
diff --git a/arch/mips/dts/comtrend,vr-3032u.dts b/arch/mips/dts/comtrend,vr-3032u.dts
new file mode 100644 (file)
index 0000000..54e738c
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+/dts-v1/;
+
+#include "brcm,bcm63268.dtsi"
+
+/ {
+       model = "Comtrend VR-3032u";
+       compatible = "comtrend,vr-3032u", "brcm,bcm63268";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&leds {
+       status = "okay";
+       brcm,serial-leds;
+       brcm,serial-dat-low;
+       brcm,serial-shift-inv;
+
+       led@2 {
+               reg = <2>;
+               active-low;
+               label = "VR-3032u:red:inet";
+       };
+
+       led@3 {
+               reg = <3>;
+               active-low;
+               label = "VR-3032u:green:dsl";
+       };
+
+       led@4 {
+               reg = <4>;
+               active-low;
+               label = "VR-3032u:green:usb";
+       };
+
+       led@7 {
+               reg = <7>;
+               active-low;
+               label = "VR-3032u:green:wps";
+       };
+
+       led@8 {
+               reg = <8>;
+               active-low;
+               label = "VR-3032u:green:inet";
+       };
+
+       led@20 {
+               reg = <20>;
+               active-low;
+               label = "VR-3032u:green:power";
+       };
+};
+
+&uart0 {
+       u-boot,dm-pre-reloc;
+       status = "okay";
+};
diff --git a/arch/mips/dts/huawei,hg556a.dts b/arch/mips/dts/huawei,hg556a.dts
new file mode 100644 (file)
index 0000000..31c7d7e
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+/dts-v1/;
+
+#include "brcm,bcm6358.dtsi"
+
+/ {
+       model = "Huawei EchoLife HG556a";
+       compatible = "huawei,hg556a", "brcm,bcm6358";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               message_red {
+                       label = "HG556a:red:message";
+                       gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+               };
+
+               hspa_red {
+                       label = "HG556a:red:hspa";
+                       gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+               };
+
+               dsl_red {
+                       label = "HG556a:red:dsl";
+                       gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+               };
+
+               power_red {
+                       label = "HG556a:red:power";
+                       gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
+               };
+
+               all_red {
+                       label = "HG556a:red:all";
+                       gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+               };
+
+               lan1_green {
+                       label = "HG556a:green:lan1";
+                       gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+               };
+
+               lan1_red {
+                       label = "HG556a:red:lan1";
+                       gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+               };
+
+               lan2_green {
+                       label = "HG556a:green:lan2";
+                       gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
+               };
+
+               lan2_red {
+                       label = "HG556a:red:lan2";
+                       gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
+               };
+
+               lan3_green {
+                       label = "HG556a:green:lan3";
+                       gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
+               };
+
+               lan3_red {
+                       label = "HG556a:red:lan3";
+                       gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
+               };
+
+               lan4_green {
+                       label = "HG556a:green:lan4";
+                       gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
+               };
+
+               lan4_red {
+                       label = "HG556a:red:lan4";
+                       gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
+               };
+       };
+};
+
+&gpio0 {
+       status = "okay";
+};
+
+&pflash {
+       status = "okay";
+};
+
+&uart0 {
+       u-boot,dm-pre-reloc;
+       status = "okay";
+};
diff --git a/arch/mips/dts/sfr,nb4-ser.dts b/arch/mips/dts/sfr,nb4-ser.dts
new file mode 100644 (file)
index 0000000..f2092e9
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+/dts-v1/;
+
+#include "brcm,bcm6358.dtsi"
+
+/ {
+       model = "SFR NeufBox 4 (Sercomm) Board";
+       compatible = "sfr,nb4-ser", "brcm,bcm6358";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               traffic_white {
+                       label = "NB4-SER:white:traffic";
+                       gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+               };
+
+               service_blue {
+                       label = "NB4-SER:blue:service";
+                       gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
+               };
+
+               wifi_white {
+                       label = "NB4-SER:white:wifi";
+                       gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
+               };
+
+               service_red {
+                       label = "NB4-SER:red:service";
+                       gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
+               };
+
+               service_green {
+                       label = "NB4-SER:green:service";
+                       gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
+               };
+       };
+};
+
+&gpio0 {
+       status = "okay";
+};
+
+&leds {
+       status = "okay";
+       brcm,clk-div = <1>;
+
+       led@0 {
+               reg = <0>;
+               active-low;
+               label = "NB4-SER:white:alarm";
+       };
+
+       led@2 {
+               reg = <2>;
+               active-low;
+               label = "NB4-SER:white:tv";
+       };
+
+       led@3 {
+               reg = <3>;
+               active-low;
+               label = "NB4-SER:white:tel";
+       };
+
+       led@4 {
+               reg = <4>;
+               active-low;
+               label = "NB4-SER:white:adsl";
+       };
+};
+
+&pflash {
+       status = "okay";
+};
+
+&uart0 {
+       u-boot,dm-pre-reloc;
+       status = "okay";
+};
index bd14ba6ea7c5fdc82f31ede48d6ea3c569565fc4..91b037f87d7240c3a17bce4540564d9d6e29bc19 100644 (file)
@@ -7,7 +7,9 @@
 
 #include <common.h>
 #include <asm/cacheops.h>
+#ifdef CONFIG_MIPS_L2_CACHE
 #include <asm/cm.h>
+#endif
 #include <asm/mipsregs.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/mips/mach-bmips/Kconfig b/arch/mips/mach-bmips/Kconfig
new file mode 100644 (file)
index 0000000..4a0c383
--- /dev/null
@@ -0,0 +1,94 @@
+menu "Broadcom MIPS platforms"
+       depends on ARCH_BMIPS
+
+config SYS_SOC
+       default "bcm6328" if SOC_BMIPS_BCM6328
+       default "bcm6358" if SOC_BMIPS_BCM6358
+       default "bcm63268" if SOC_BMIPS_BCM63268
+
+choice
+       prompt "Broadcom MIPS SoC select"
+
+config SOC_BMIPS_BCM6328
+       bool "BMIPS BCM6328 family"
+       select SUPPORTS_BIG_ENDIAN
+       select SUPPORTS_CPU_MIPS32_R1
+       select MIPS_TUNE_4KC
+       select MIPS_L1_CACHE_SHIFT_4
+       select SWAP_IO_SPACE
+       select SYSRESET_SYSCON
+       help
+         This supports BMIPS BCM6328 family including BCM63281 and BCM63283.
+
+config SOC_BMIPS_BCM6358
+       bool "BMIPS BCM6358 family"
+       select SUPPORTS_BIG_ENDIAN
+       select SUPPORTS_CPU_MIPS32_R1
+       select MIPS_TUNE_4KC
+       select MIPS_L1_CACHE_SHIFT_4
+       select SWAP_IO_SPACE
+       select SYSRESET_SYSCON
+       help
+         This supports BMIPS BCM6358 family including BCM6358 and BCM6359.
+
+config SOC_BMIPS_BCM63268
+       bool "BMIPS BCM63268 family"
+       select SUPPORTS_BIG_ENDIAN
+       select SUPPORTS_CPU_MIPS32_R1
+       select MIPS_TUNE_4KC
+       select MIPS_L1_CACHE_SHIFT_4
+       select SWAP_IO_SPACE
+       select SYSRESET_SYSCON
+       help
+         This supports BMIPS BCM63268 family including BCM63168, BCM63169,
+         BCM63268 and BCM63269.
+
+endchoice
+
+choice
+       prompt "Board select"
+
+config BOARD_COMTREND_AR5387UN
+       bool "Comtrend AR-5387un"
+       depends on SOC_BMIPS_BCM6328
+       select BMIPS_SUPPORTS_BOOT_RAM
+
+config BOARD_COMTREND_VR3032U
+       bool "Comtrend VR-3032u board"
+       depends on SOC_BMIPS_BCM63268
+       select BMIPS_SUPPORTS_BOOT_RAM
+
+config BOARD_HUAWEI_HG556A
+       bool "Huawei EchoLife HG556a"
+       depends on SOC_BMIPS_BCM6358
+       select BMIPS_SUPPORTS_BOOT_RAM
+
+config BOARD_SFR_NB4_SER
+       bool "SFR NeufBox 4 (Sercomm)"
+       depends on SOC_BMIPS_BCM6358
+       select BMIPS_SUPPORTS_BOOT_RAM
+
+endchoice
+
+choice
+       prompt "Boot mode"
+
+config BMIPS_BOOT_RAM
+       bool "RAM boot"
+       depends on BMIPS_SUPPORTS_BOOT_RAM
+       help
+         This builds an image that is linked to a RAM address. It can be used
+         for booting from CFE via TFTP using an ELF image, but it can also be
+         booted from RAM by other bootloaders using a BIN image.
+
+endchoice
+
+config BMIPS_SUPPORTS_BOOT_RAM
+       bool
+
+source "board/comtrend/ar5387un/Kconfig"
+source "board/comtrend/vr3032u/Kconfig"
+source "board/huawei/hg556a/Kconfig"
+source "board/sfr/nb4_ser/Kconfig"
+
+endmenu
diff --git a/arch/mips/mach-bmips/Makefile b/arch/mips/mach-bmips/Makefile
new file mode 100644 (file)
index 0000000..f432acc
--- /dev/null
@@ -0,0 +1,5 @@
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+obj-y += dram.o
diff --git a/arch/mips/mach-bmips/dram.c b/arch/mips/mach-bmips/dram.c
new file mode 100644 (file)
index 0000000..b19b28a
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2016 Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <ram.h>
+#include <dm.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int dram_init(void)
+{
+       struct ram_info ram;
+       struct udevice *dev;
+       int err;
+
+       err = uclass_get_device(UCLASS_RAM, 0, &dev);
+       if (err) {
+               debug("DRAM init failed: %d\n", err);
+               return 0;
+       }
+
+       err = ram_get_info(dev, &ram);
+       if (err) {
+               debug("Cannot get DRAM size: %d\n", err);
+               return 0;
+       }
+
+       debug("SDRAM base=%zx, size=%x\n", ram.base, ram.size);
+
+       gd->ram_size = ram.size;
+
+       return 0;
+}
diff --git a/arch/mips/mach-bmips/include/ioremap.h b/arch/mips/mach-bmips/include/ioremap.h
new file mode 100644 (file)
index 0000000..404690e
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * SPDX-License-Identifier:    GPL-2.0
+ */
+#ifndef __ASM_MACH_BMIPS_IOREMAP_H
+#define __ASM_MACH_BMIPS_IOREMAP_H
+
+#include <linux/types.h>
+
+/*
+ * Allow physical addresses to be fixed up to help peripherals located
+ * outside the low 32-bit range -- generic pass-through version.
+ */
+static inline phys_addr_t fixup_bigphys_addr(phys_addr_t phys_addr,
+                                               phys_addr_t size)
+{
+       return phys_addr;
+}
+
+static inline int is_bmips_internal_registers(phys_addr_t offset)
+{
+#if defined(CONFIG_SOC_BMIPS_BCM6358)
+       if (offset >= 0xfffe0000)
+               return 1;
+#endif
+
+       return 0;
+}
+
+static inline void __iomem *plat_ioremap(phys_addr_t offset, unsigned long size,
+                                               unsigned long flags)
+{
+       if (is_bmips_internal_registers(offset))
+               return (void __iomem *)offset;
+
+       return NULL;
+}
+
+static inline int plat_iounmap(const volatile void __iomem *addr)
+{
+       return is_bmips_internal_registers((unsigned long)addr);
+}
+
+#define _page_cachable_default _CACHE_CACHABLE_NONCOHERENT
+
+#endif /* __ASM_MACH_BMIPS_IOREMAP_H */
index 0033c3526175244e5476083d9feea39ac7f875c2..01e9008d0a895c4661fb217b976d03830b22954a 100644 (file)
@@ -32,6 +32,7 @@ config MPC85xx
        select CREATE_ARCH_SYMLINK
        select SYS_FSL_DDR
        select SYS_FSL_DDR_BE
+       imply USB_EHCI_HCD if USB
 
 config MPC86xx
        bool "MPC86xx"
index 98991c688befb7fa7912dcd59769cae701f23374..933deebdaeab8182ccd239c515f105e6412def05 100644 (file)
@@ -9,7 +9,6 @@ obj-y   := cpu.o
 obj-y  += traps.o
 obj-y += cpu_init.o
 obj-y += fixed_sdram.o
-obj-y += i2c.o
 obj-y += interrupts.o
 obj-y += iopin.o
 obj-y += serial.o
diff --git a/arch/powerpc/cpu/mpc512x/i2c.c b/arch/powerpc/cpu/mpc512x/i2c.c
deleted file mode 100644 (file)
index 15d519a..0000000
+++ /dev/null
@@ -1,386 +0,0 @@
-/*
- * (C) Copyright 2003 - 2009
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- *
- * Based on the MPC5xxx code.
- */
-
-#include <common.h>
-#include <asm/io.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-#ifdef CONFIG_HARD_I2C
-
-#include <i2c.h>
-
-/* by default set I2C bus 0 active */
-static unsigned int bus_num __attribute__ ((section (".data"))) = 0;
-
-#define I2C_TIMEOUT    100
-#define I2C_RETRIES    3
-
-struct mpc512x_i2c_tap {
-       int scl2tap;
-       int tap2tap;
-};
-
-static int  mpc_reg_in(volatile u32 *reg);
-static void mpc_reg_out(volatile u32 *reg, int val, int mask);
-static int  wait_for_bb(void);
-static int  wait_for_pin(int *status);
-static int  do_address(uchar chip, char rdwr_flag);
-static int  send_bytes(uchar chip, char *buf, int len);
-static int  receive_bytes(uchar chip, char *buf, int len);
-static int  mpc_get_fdr(int);
-
-static int mpc_reg_in (volatile u32 *reg)
-{
-       int ret = in_be32(reg) >> 24;
-
-       return ret;
-}
-
-static void mpc_reg_out (volatile u32 *reg, int val, int mask)
-{
-       if (!mask) {
-               out_be32(reg, val << 24);
-       } else {
-               clrsetbits_be32(reg, mask << 24, (val & mask) << 24);
-       }
-}
-
-static int wait_for_bb (void)
-{
-       volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
-       volatile i2c512x_dev_t *regs = &im->i2c.dev[bus_num];
-       int timeout = I2C_TIMEOUT;
-       int status;
-
-       status = mpc_reg_in (&regs->msr);
-
-       while (timeout-- && (status & I2C_BB)) {
-               mpc_reg_out (&regs->mcr, I2C_STA, I2C_STA);
-               (void)mpc_reg_in(&regs->mdr);
-               mpc_reg_out (&regs->mcr, 0, I2C_STA);
-               mpc_reg_out (&regs->mcr, 0, 0);
-               mpc_reg_out (&regs->mcr, I2C_EN, 0);
-
-               udelay (1000);
-               status = mpc_reg_in (&regs->msr);
-       }
-
-       return (status & I2C_BB);
-}
-
-static int wait_for_pin (int *status)
-{
-       volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
-       volatile i2c512x_dev_t *regs = &im->i2c.dev[bus_num];
-       int timeout = I2C_TIMEOUT;
-
-       *status = mpc_reg_in (&regs->msr);
-
-       while (timeout-- && !(*status & I2C_IF)) {
-               udelay (1000);
-               *status = mpc_reg_in (&regs->msr);
-       }
-
-       if (!(*status & I2C_IF)) {
-               return -1;
-       }
-
-       mpc_reg_out (&regs->msr, 0, I2C_IF);
-
-       return 0;
-}
-
-static int do_address (uchar chip, char rdwr_flag)
-{
-       volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
-       volatile i2c512x_dev_t *regs = &im->i2c.dev[bus_num];
-       int status;
-
-       chip <<= 1;
-
-       if (rdwr_flag) {
-               chip |= 1;
-       }
-
-       mpc_reg_out (&regs->mcr, I2C_TX, I2C_TX);
-       mpc_reg_out (&regs->mdr, chip, 0);
-
-       if (wait_for_pin (&status)) {
-               return -2;
-       }
-
-       if (status & I2C_RXAK) {
-               return -3;
-       }
-
-       return 0;
-}
-
-static int send_bytes (uchar chip, char *buf, int len)
-{
-       volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
-       volatile i2c512x_dev_t *regs = &im->i2c.dev[bus_num];
-       int wrcount;
-       int status;
-
-       for (wrcount = 0; wrcount < len; ++wrcount) {
-
-               mpc_reg_out (&regs->mdr, buf[wrcount], 0);
-
-               if (wait_for_pin (&status)) {
-                       break;
-               }
-
-               if (status & I2C_RXAK) {
-                       break;
-               }
-
-       }
-
-       return !(wrcount == len);
-}
-
-static int receive_bytes (uchar chip, char *buf, int len)
-{
-       volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
-       volatile i2c512x_dev_t *regs = &im->i2c.dev[bus_num];
-       int dummy   = 1;
-       int rdcount = 0;
-       int status;
-       int i;
-
-       mpc_reg_out (&regs->mcr, 0, I2C_TX);
-
-       for (i = 0; i < len; ++i) {
-               buf[rdcount] = mpc_reg_in (&regs->mdr);
-
-               if (dummy) {
-                       dummy = 0;
-               } else {
-                       rdcount++;
-               }
-
-               if (wait_for_pin (&status)) {
-                       return -4;
-               }
-       }
-
-       mpc_reg_out (&regs->mcr, I2C_TXAK, I2C_TXAK);
-       buf[rdcount++] = mpc_reg_in (&regs->mdr);
-
-       if (wait_for_pin (&status)) {
-               return -5;
-       }
-
-       mpc_reg_out (&regs->mcr, 0, I2C_TXAK);
-
-       return 0;
-}
-
-/**************** I2C API ****************/
-
-void i2c_init (int speed, int saddr)
-{
-       volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
-       int i;
-
-       for (i = 0; i < I2C_BUS_CNT; i++){
-               volatile i2c512x_dev_t *regs = &im->i2c.dev[i];
-
-               mpc_reg_out (&regs->mcr, 0, 0);
-
-               /* Set clock */
-               mpc_reg_out (&regs->mfdr, mpc_get_fdr (speed), 0);
-               mpc_reg_out (&regs->madr, saddr << 1, 0);
-
-               /* Enable module */
-               mpc_reg_out (&regs->mcr, I2C_EN, I2C_INIT_MASK);
-               mpc_reg_out (&regs->msr, 0, I2C_IF);
-       }
-
-       /* Disable interrupts */
-       out_be32(&im->i2c.icr, 0);
-
-       /* Turn off filters */
-       out_be32(&im->i2c.mifr, 0);
-}
-
-static int mpc_get_fdr (int speed)
-{
-       static int fdr = -1;
-
-       if (fdr == -1) {
-               ulong best_speed = 0;
-               ulong divider;
-               ulong ips, scl;
-               ulong bestmatch = 0xffffffffUL;
-               int best_i = 0, best_j = 0, i, j;
-               int SCL_Tap[] = { 9, 10, 12, 15, 5, 6, 7, 8};
-               struct mpc512x_i2c_tap scltap[] = {
-                       {4, 1},
-                       {4, 2},
-                       {6, 4},
-                       {6, 8},
-                       {14, 16},
-                       {30, 32},
-                       {62, 64},
-                       {126, 128}
-               };
-
-               ips = gd->arch.ips_clk;
-               for (i = 7; i >= 0; i--) {
-                       for (j = 7; j >= 0; j--) {
-                               scl = 2 * (scltap[j].scl2tap +
-                                          (SCL_Tap[i] - 1) * scltap[j].tap2tap
-                                          + 2);
-                               if (ips <= speed*scl) {
-                                       if ((speed*scl - ips) < bestmatch) {
-                                               bestmatch = speed*scl - ips;
-                                               best_i = i;
-                                               best_j = j;
-                                               best_speed = ips/scl;
-                                       }
-                               }
-                       }
-               }
-               divider = (best_i & 3) | ((best_i & 4) << 3) | (best_j << 2);
-               if (gd->flags & GD_FLG_RELOC) {
-                       fdr = divider;
-               } else {
-                       debug("%ld kHz, \n", best_speed / 1000);
-                       return divider;
-               }
-       }
-
-       return fdr;
-}
-
-int i2c_probe (uchar chip)
-{
-       volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
-       volatile i2c512x_dev_t *regs = &im->i2c.dev[bus_num];
-       int i;
-
-       for (i = 0; i < I2C_RETRIES; i++) {
-               mpc_reg_out (&regs->mcr, I2C_STA, I2C_STA);
-
-               if (! do_address (chip, 0)) {
-                       mpc_reg_out (&regs->mcr, 0, I2C_STA);
-                       udelay (500);
-                       break;
-               }
-
-               mpc_reg_out (&regs->mcr, 0, I2C_STA);
-               udelay (500);
-       }
-
-       return (i == I2C_RETRIES);
-}
-
-int i2c_read (uchar chip, uint addr, int alen, uchar *buf, int len)
-{
-       volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
-       volatile i2c512x_dev_t *regs = &im->i2c.dev[bus_num];
-       char xaddr[4];
-       int ret = -1;
-
-       xaddr[0] = (addr >> 24) & 0xFF;
-       xaddr[1] = (addr >> 16) & 0xFF;
-       xaddr[2] = (addr >>  8) & 0xFF;
-       xaddr[3] =  addr        & 0xFF;
-
-       if (wait_for_bb ()) {
-               printf ("i2c_read: bus is busy\n");
-               goto Done;
-       }
-
-       mpc_reg_out (&regs->mcr, I2C_STA, I2C_STA);
-       if (do_address (chip, 0)) {
-               printf ("i2c_read: failed to address chip\n");
-               goto Done;
-       }
-
-       if (send_bytes (chip, &xaddr[4-alen], alen)) {
-               printf ("i2c_read: send_bytes failed\n");
-               goto Done;
-       }
-
-       mpc_reg_out (&regs->mcr, I2C_RSTA, I2C_RSTA);
-       if (do_address (chip, 1)) {
-               printf ("i2c_read: failed to address chip\n");
-               goto Done;
-       }
-
-       if (receive_bytes (chip, (char *)buf, len)) {
-               printf ("i2c_read: receive_bytes failed\n");
-               goto Done;
-       }
-
-       ret = 0;
-Done:
-       mpc_reg_out (&regs->mcr, 0, I2C_STA);
-       return ret;
-}
-
-int i2c_write (uchar chip, uint addr, int alen, uchar *buf, int len)
-{
-       volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
-       volatile i2c512x_dev_t *regs = &im->i2c.dev[bus_num];
-       char xaddr[4];
-       int ret = -1;
-
-       xaddr[0] = (addr >> 24) & 0xFF;
-       xaddr[1] = (addr >> 16) & 0xFF;
-       xaddr[2] = (addr >>  8) & 0xFF;
-       xaddr[3] =  addr        & 0xFF;
-
-       if (wait_for_bb ()) {
-               printf ("i2c_write: bus is busy\n");
-               goto Done;
-       }
-
-       mpc_reg_out (&regs->mcr, I2C_STA, I2C_STA);
-       if (do_address (chip, 0)) {
-               printf ("i2c_write: failed to address chip\n");
-               goto Done;
-       }
-
-       if (send_bytes (chip, &xaddr[4-alen], alen)) {
-               printf ("i2c_write: send_bytes failed\n");
-               goto Done;
-       }
-
-       if (send_bytes (chip, (char *)buf, len)) {
-               printf ("i2c_write: send_bytes failed\n");
-               goto Done;
-       }
-
-       ret = 0;
-Done:
-       mpc_reg_out (&regs->mcr, 0, I2C_STA);
-       return ret;
-}
-
-int i2c_set_bus_num (unsigned int bus)
-{
-       if (bus >= I2C_BUS_CNT) {
-               return -1;
-       }
-       bus_num = bus;
-
-       return 0;
-}
-
-unsigned int i2c_get_bus_num (void)
-{
-       return bus_num;
-}
-
-#endif /* CONFIG_HARD_I2C */
index 5c67e1d37d8ca858a1ac963e9ca0ca9dc1d72cd0..88e3b2e3aefe29c199ac5f8acd38415f171b425e 100644 (file)
@@ -9,7 +9,6 @@ extra-y = start.o
 extra-y += traps.o
 obj-y  += io.o
 obj-y  += firmware_sc_task_bestcomm.impl.o
-obj-y += i2c.o
 obj-y += cpu.o
 obj-y += cpu_init.o
 obj-y += ide.o
diff --git a/arch/powerpc/cpu/mpc5xxx/i2c.c b/arch/powerpc/cpu/mpc5xxx/i2c.c
deleted file mode 100644 (file)
index 73601ae..0000000
+++ /dev/null
@@ -1,456 +0,0 @@
-/*
- * (C) Copyright 2003
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-#ifdef CONFIG_HARD_I2C
-
-#include <mpc5xxx.h>
-#include <i2c.h>
-
-#if !defined(CONFIG_I2C_MULTI_BUS)
-#if (CONFIG_SYS_I2C_MODULE == 2)
-#define I2C_BASE       MPC5XXX_I2C2
-#elif (CONFIG_SYS_I2C_MODULE == 1)
-#define I2C_BASE       MPC5XXX_I2C1
-#else
-#error CONFIG_SYS_I2C_MODULE is not properly configured
-#endif
-#else
-static unsigned int i2c_bus_num __attribute__ ((section (".data"))) =
-                                               CONFIG_SYS_SPD_BUS_NUM;
-static unsigned int i2c_bus_speed[2] = {CONFIG_SYS_I2C_SPEED,
-                                       CONFIG_SYS_I2C_SPEED};
-
-static const  unsigned long i2c_dev[2] = {
-       MPC5XXX_I2C1,
-       MPC5XXX_I2C2,
-};
-
-#define I2C_BASE       ((struct mpc5xxx_i2c *)i2c_dev[i2c_bus_num])
-#endif
-
-#define I2C_TIMEOUT    6667
-#define I2C_RETRIES    3
-
-struct mpc5xxx_i2c_tap {
-       int scl2tap;
-       int tap2tap;
-};
-
-static int  mpc_reg_in    (volatile u32 *reg);
-static void mpc_reg_out   (volatile u32 *reg, int val, int mask);
-static int  wait_for_bb   (void);
-static int  wait_for_pin  (int *status);
-static int  do_address    (uchar chip, char rdwr_flag);
-static int  send_bytes    (uchar chip, char *buf, int len);
-static int  receive_bytes (uchar chip, char *buf, int len);
-static int  mpc_get_fdr   (int);
-
-static int mpc_reg_in(volatile u32 *reg)
-{
-       int ret = *reg >> 24;
-       __asm__ __volatile__ ("eieio");
-       return ret;
-}
-
-static void mpc_reg_out(volatile u32 *reg, int val, int mask)
-{
-       int tmp;
-
-       if (!mask) {
-               *reg = val << 24;
-       } else {
-               tmp = mpc_reg_in(reg);
-               *reg = ((tmp & ~mask) | (val & mask)) << 24;
-       }
-       __asm__ __volatile__ ("eieio");
-
-       return;
-}
-
-static int wait_for_bb(void)
-{
-       struct mpc5xxx_i2c *regs    = (struct mpc5xxx_i2c *)I2C_BASE;
-       int                 timeout = I2C_TIMEOUT;
-       int                 status;
-
-       status = mpc_reg_in(&regs->msr);
-
-       while (timeout-- && (status & I2C_BB)) {
-               mpc_reg_out(&regs->mcr, I2C_STA, I2C_STA);
-               (void)mpc_reg_in(&regs->mdr);
-               mpc_reg_out(&regs->mcr, 0, I2C_STA);
-               mpc_reg_out(&regs->mcr, 0, 0);
-               mpc_reg_out(&regs->mcr, I2C_EN, 0);
-               udelay(15);
-               status = mpc_reg_in(&regs->msr);
-       }
-
-       return (status & I2C_BB);
-}
-
-static int wait_for_pin(int *status)
-{
-       struct mpc5xxx_i2c *regs    = (struct mpc5xxx_i2c *)I2C_BASE;
-       int                 timeout = I2C_TIMEOUT;
-
-       *status = mpc_reg_in(&regs->msr);
-
-       while (timeout-- && !(*status & I2C_IF)) {
-               udelay(15);
-               *status = mpc_reg_in(&regs->msr);
-       }
-
-       if (!(*status & I2C_IF)) {
-               return -1;
-       }
-
-       mpc_reg_out(&regs->msr, 0, I2C_IF);
-
-       return 0;
-}
-
-static int do_address(uchar chip, char rdwr_flag)
-{
-       struct mpc5xxx_i2c *regs = (struct mpc5xxx_i2c *)I2C_BASE;
-       int                 status;
-
-       chip <<= 1;
-
-       if (rdwr_flag) {
-               chip |= 1;
-       }
-
-       mpc_reg_out(&regs->mcr, I2C_TX, I2C_TX);
-       mpc_reg_out(&regs->mdr, chip, 0);
-
-       if (wait_for_pin(&status)) {
-               return -2;
-       }
-
-       if (status & I2C_RXAK) {
-               return -3;
-       }
-
-       return 0;
-}
-
-static int send_bytes(uchar chip, char *buf, int len)
-{
-       struct mpc5xxx_i2c *regs = (struct mpc5xxx_i2c *)I2C_BASE;
-       int                 wrcount;
-       int                 status;
-
-       for (wrcount = 0; wrcount < len; ++wrcount) {
-
-               mpc_reg_out(&regs->mdr, buf[wrcount], 0);
-
-               if (wait_for_pin(&status)) {
-                       break;
-               }
-
-               if (status & I2C_RXAK) {
-                       break;
-               }
-
-       }
-
-       return !(wrcount == len);
-}
-
-static int receive_bytes(uchar chip, char *buf, int len)
-{
-       struct mpc5xxx_i2c *regs    = (struct mpc5xxx_i2c *)I2C_BASE;
-       int                 dummy   = 1;
-       int                 rdcount = 0;
-       int                 status;
-       int                 i;
-
-       mpc_reg_out(&regs->mcr, 0, I2C_TX);
-
-       for (i = 0; i < len; ++i) {
-               buf[rdcount] = mpc_reg_in(&regs->mdr);
-
-               if (dummy) {
-                       dummy = 0;
-               } else {
-                       rdcount++;
-               }
-
-
-               if (wait_for_pin(&status)) {
-                       return -4;
-               }
-       }
-
-       mpc_reg_out(&regs->mcr, I2C_TXAK, I2C_TXAK);
-       buf[rdcount++] = mpc_reg_in(&regs->mdr);
-
-       if (wait_for_pin(&status)) {
-               return -5;
-       }
-
-       mpc_reg_out(&regs->mcr, 0, I2C_TXAK);
-
-       return 0;
-}
-
-#if defined(CONFIG_SYS_I2C_INIT_MPC5XXX)
-
-#define FDR510(x) (u8) (((x & 0x20) >> 3) | (x & 0x3))
-#define FDR432(x) (u8) ((x & 0x1C) >> 2)
-/*
- * Reset any i2c devices that may have been interrupted during a system reset.
- * Normally this would be accomplished by clocking the line until SCL and SDA
- * are released and then sending a start condtiion (From an Atmel datasheet).
- * There is no direct access to the i2c pins so instead create start commands
- * through the i2c interface.  Send a start command then delay for the SDA Hold
- * time, repeat this by disabling/enabling the bus a total of 9 times.
- */
-static void send_reset(void)
-{
-       struct mpc5xxx_i2c *regs = (struct mpc5xxx_i2c *)I2C_BASE;
-       int i;
-       u32 delay;
-       u8 fdr;
-       int SDA_Tap[] = { 3, 3, 4, 4, 1, 1, 2, 2};
-       struct mpc5xxx_i2c_tap scltap[] = {
-               {4, 1},
-               {4, 2},
-               {6, 4},
-               {6, 8},
-               {14, 16},
-               {30, 32},
-               {62, 64},
-               {126, 128}
-       };
-
-       fdr = (u8)mpc_reg_in(&regs->mfdr);
-
-       delay = scltap[FDR432(fdr)].scl2tap + ((SDA_Tap[FDR510(fdr)] - 1) * \
-               scltap[FDR432(fdr)].tap2tap) + 3;
-
-       for (i = 0; i < 9; i++) {
-               mpc_reg_out(&regs->mcr, I2C_EN|I2C_STA|I2C_TX, I2C_INIT_MASK);
-               udelay(delay);
-               mpc_reg_out(&regs->mcr, 0, I2C_INIT_MASK);
-               udelay(delay);
-       }
-
-       mpc_reg_out(&regs->mcr, I2C_EN, I2C_INIT_MASK);
-}
-#endif /* CONFIG_SYS_I2c_INIT_MPC5XXX */
-
-/**************** I2C API ****************/
-
-void i2c_init(int speed, int saddr)
-{
-       struct mpc5xxx_i2c *regs = (struct mpc5xxx_i2c *)I2C_BASE;
-
-       mpc_reg_out(&regs->mcr, 0, 0);
-       mpc_reg_out(&regs->madr, saddr << 1, 0);
-
-       /* Set clock
-        */
-       mpc_reg_out(&regs->mfdr, mpc_get_fdr(speed), 0);
-
-       /* Enable module
-        */
-       mpc_reg_out(&regs->mcr, I2C_EN, I2C_INIT_MASK);
-       mpc_reg_out(&regs->msr, 0, I2C_IF);
-
-#if defined(CONFIG_SYS_I2C_INIT_MPC5XXX)
-       send_reset();
-#endif
-       return;
-}
-
-static int mpc_get_fdr(int speed)
-{
-       static int fdr = -1;
-
-       if (fdr == -1) {
-               ulong best_speed = 0;
-               ulong divider;
-               ulong ipb, scl;
-               ulong bestmatch = 0xffffffffUL;
-               int best_i = 0, best_j = 0, i, j;
-               int SCL_Tap[] = { 9, 10, 12, 15, 5, 6, 7, 8};
-               struct mpc5xxx_i2c_tap scltap[] = {
-                       {4, 1},
-                       {4, 2},
-                       {6, 4},
-                       {6, 8},
-                       {14, 16},
-                       {30, 32},
-                       {62, 64},
-                       {126, 128}
-               };
-
-               ipb = gd->arch.ipb_clk;
-               for (i = 7; i >= 0; i--) {
-                       for (j = 7; j >= 0; j--) {
-                               scl = 2 * (scltap[j].scl2tap +
-                                       (SCL_Tap[i] - 1) * scltap[j].tap2tap + 2);
-                               if (ipb <= speed*scl) {
-                                       if ((speed*scl - ipb) < bestmatch) {
-                                               bestmatch = speed*scl - ipb;
-                                               best_i = i;
-                                               best_j = j;
-                                               best_speed = ipb/scl;
-                                       }
-                               }
-                       }
-               }
-               divider = (best_i & 3) | ((best_i & 4) << 3) | (best_j << 2);
-               if (gd->flags & GD_FLG_RELOC) {
-                       fdr = divider;
-               } else {
-                       printf("%ld kHz, ", best_speed / 1000);
-                       return divider;
-               }
-       }
-
-       return fdr;
-}
-
-int i2c_probe(uchar chip)
-{
-       struct mpc5xxx_i2c *regs = (struct mpc5xxx_i2c *)I2C_BASE;
-       int                 i;
-
-       for (i = 0; i < I2C_RETRIES; i++) {
-               mpc_reg_out(&regs->mcr, I2C_STA, I2C_STA);
-
-               if (! do_address(chip, 0)) {
-                       mpc_reg_out(&regs->mcr, 0, I2C_STA);
-                       udelay(500);
-                       break;
-               }
-
-               mpc_reg_out(&regs->mcr, 0, I2C_STA);
-               udelay(500);
-       }
-
-       return (i == I2C_RETRIES);
-}
-
-int i2c_read(uchar chip, uint addr, int alen, uchar *buf, int len)
-{
-       char                xaddr[4];
-       struct mpc5xxx_i2c * regs        = (struct mpc5xxx_i2c *)I2C_BASE;
-       int                  ret         = -1;
-
-       xaddr[0] = (addr >> 24) & 0xFF;
-       xaddr[1] = (addr >> 16) & 0xFF;
-       xaddr[2] = (addr >>  8) & 0xFF;
-       xaddr[3] =  addr        & 0xFF;
-
-       if (wait_for_bb()) {
-               printf("i2c_read: bus is busy\n");
-               goto Done;
-       }
-
-       mpc_reg_out(&regs->mcr, I2C_STA, I2C_STA);
-       if (do_address(chip, 0)) {
-               printf("i2c_read: failed to address chip\n");
-               goto Done;
-       }
-
-       if (send_bytes(chip, &xaddr[4-alen], alen)) {
-               printf("i2c_read: send_bytes failed\n");
-               goto Done;
-       }
-
-       mpc_reg_out(&regs->mcr, I2C_RSTA, I2C_RSTA);
-       if (do_address(chip, 1)) {
-               printf("i2c_read: failed to address chip\n");
-               goto Done;
-       }
-
-       if (receive_bytes(chip, (char *)buf, len)) {
-               printf("i2c_read: receive_bytes failed\n");
-               goto Done;
-       }
-
-       ret = 0;
-Done:
-       mpc_reg_out(&regs->mcr, 0, I2C_STA);
-       return ret;
-}
-
-int i2c_write(uchar chip, uint addr, int alen, uchar *buf, int len)
-{
-       char               xaddr[4];
-       struct mpc5xxx_i2c *regs        = (struct mpc5xxx_i2c *)I2C_BASE;
-       int                 ret         = -1;
-
-       xaddr[0] = (addr >> 24) & 0xFF;
-       xaddr[1] = (addr >> 16) & 0xFF;
-       xaddr[2] = (addr >>  8) & 0xFF;
-       xaddr[3] =  addr        & 0xFF;
-
-       if (wait_for_bb()) {
-               printf("i2c_write: bus is busy\n");
-               goto Done;
-       }
-
-       mpc_reg_out(&regs->mcr, I2C_STA, I2C_STA);
-       if (do_address(chip, 0)) {
-               printf("i2c_write: failed to address chip\n");
-               goto Done;
-       }
-
-       if (send_bytes(chip, &xaddr[4-alen], alen)) {
-               printf("i2c_write: send_bytes failed\n");
-               goto Done;
-       }
-
-       if (send_bytes(chip, (char *)buf, len)) {
-               printf("i2c_write: send_bytes failed\n");
-               goto Done;
-       }
-
-       ret = 0;
-Done:
-       mpc_reg_out(&regs->mcr, 0, I2C_STA);
-       return ret;
-}
-
-#if defined(CONFIG_I2C_MULTI_BUS)
-int i2c_set_bus_num(unsigned int bus)
-{
-       if (bus > 1)
-               return -1;
-
-       i2c_bus_num = bus;
-       i2c_init(i2c_bus_speed[bus], CONFIG_SYS_I2C_SLAVE);
-       return 0;
-}
-
-int i2c_set_bus_speed(unsigned int speed)
-{
-       i2c_init(speed, CONFIG_SYS_I2C_SLAVE);
-       return 0;
-}
-
-unsigned int i2c_get_bus_num(void)
-{
-       return i2c_bus_num;
-}
-
-unsigned int i2c_get_bus_speed(void)
-{
-       return i2c_bus_speed[i2c_bus_num];
-}
-#endif
-
-
-#endif /* CONFIG_HARD_I2C */
index 83adc4c4360ff742b3b180be75ed81c9ed2128e3..72dd8aba25afce0bccda278075e918c1c39b3076 100644 (file)
@@ -7,7 +7,7 @@
 
 extra-y        = start.o
 obj-y  = traps.o serial_smc.o serial_scc.o cpu.o cpu_init.o speed.o \
-         interrupts.o ether_fcc.o i2c.o commproc.o \
+         interrupts.o ether_fcc.o commproc.o \
          bedbug_603e.o pci.o spi.o kgdb.o
 
 obj-$(CONFIG_ETHER_ON_SCC) += ether_scc.o
index 484bd177451c3a36b1ba5c7c30152fe3c8275b0f..ff6988108990bf03aba4e4e02d38416acdac2296 100644 (file)
@@ -41,10 +41,6 @@ m8260_cpm_reset(void)
        do {                    /* Spin until command processed         */
                __asm__ __volatile__ ("eieio");
        } while ((immr->im_cpm.cp_cpcr & CPM_CR_FLG) && ++count < 1000000);
-
-#ifdef CONFIG_HARD_I2C
-       immr->im_dprambase16[PROFF_I2C_BASE / sizeof(u16)] = 0;
-#endif
 }
 
 /* Allocate some memory from the dual ported ram.
diff --git a/arch/powerpc/cpu/mpc8260/i2c.c b/arch/powerpc/cpu/mpc8260/i2c.c
deleted file mode 100644 (file)
index a0de101..0000000
+++ /dev/null
@@ -1,741 +0,0 @@
-/*
- * (C) Copyright 2000
- * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it
- *
- * (C) Copyright 2000 Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Marius Groeger <mgroeger@sysgo.de>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <console.h>
-
-#if defined(CONFIG_HARD_I2C)
-
-#include <asm/cpm_8260.h>
-#include <i2c.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-#if defined(CONFIG_I2C_MULTI_BUS)
-static unsigned int i2c_bus_num __attribute__ ((section(".data"))) = 0;
-#endif /* CONFIG_I2C_MULTI_BUS */
-
-/* uSec to wait between polls of the i2c */
-#define DELAY_US       100
-/* uSec to wait for the CPM to start processing the buffer */
-#define START_DELAY_US 1000
-
-/*
- * tx/rx per-byte timeout: we delay DELAY_US uSec between polls so the
- * timeout will be (tx_length + rx_length) * DELAY_US * TOUT_LOOP
- */
-#define TOUT_LOOP 5
-
-/*
- * Set default values
- */
-#ifndef        CONFIG_SYS_I2C_SPEED
-#define        CONFIG_SYS_I2C_SPEED    50000
-#endif
-
-
-typedef void (*i2c_ecb_t) (int, int, void *);  /* error callback function */
-
-/* This structure keeps track of the bd and buffer space usage. */
-typedef struct i2c_state {
-       int rx_idx;             /* index   to next free Rx BD */
-       int tx_idx;             /* index   to next free Tx BD */
-       void *rxbd;             /* pointer to next free Rx BD */
-       void *txbd;             /* pointer to next free Tx BD */
-       int tx_space;           /* number  of Tx bytes left   */
-       unsigned char *tx_buf;  /* pointer to free Tx area    */
-       i2c_ecb_t err_cb;       /* error callback function    */
-       void *cb_data;          /* private data to be passed  */
-} i2c_state_t;
-
-/* flags for i2c_send() and i2c_receive() */
-#define        I2CF_ENABLE_SECONDARY   0x01    /* secondary_address is valid   */
-#define        I2CF_START_COND         0x02    /* tx: generate start condition */
-#define I2CF_STOP_COND         0x04    /* tx: generate stop  condition */
-
-/* return codes */
-#define I2CERR_NO_BUFFERS      1       /* no more BDs or buffer space  */
-#define I2CERR_MSG_TOO_LONG    2       /* tried to send/receive to much data */
-#define I2CERR_TIMEOUT         3       /* timeout in i2c_doio()        */
-#define I2CERR_QUEUE_EMPTY     4       /* i2c_doio called without send/rcv */
-#define I2CERR_IO_ERROR                5       /* had an error during comms    */
-
-/* error callback flags */
-#define I2CECB_RX_ERR          0x10    /* this is a receive error      */
-#define     I2CECB_RX_OV       0x02    /* receive overrun error        */
-#define     I2CECB_RX_MASK     0x0f    /* mask for error bits          */
-#define I2CECB_TX_ERR          0x20    /* this is a transmit error     */
-#define     I2CECB_TX_CL       0x01    /* transmit collision error     */
-#define     I2CECB_TX_UN       0x02    /* transmit underflow error     */
-#define     I2CECB_TX_NAK      0x04    /* transmit no ack error        */
-#define     I2CECB_TX_MASK     0x0f    /* mask for error bits          */
-#define I2CECB_TIMEOUT         0x40    /* this is a timeout error      */
-
-#define ERROR_I2C_NONE         0
-#define ERROR_I2C_LENGTH       1
-
-#define I2C_WRITE_BIT          0x00
-#define I2C_READ_BIT           0x01
-
-#define I2C_RXTX_LEN   128     /* maximum tx/rx buffer length */
-
-
-#define NUM_RX_BDS 4
-#define NUM_TX_BDS 4
-#define MAX_TX_SPACE 256
-
-typedef struct I2C_BD {
-       unsigned short status;
-       unsigned short length;
-       unsigned char *addr;
-} I2C_BD;
-
-#define BD_I2C_TX_START 0x0400 /* special status for i2c: Start condition */
-
-#define BD_I2C_TX_CL   0x0001  /* collision error */
-#define BD_I2C_TX_UN   0x0002  /* underflow error */
-#define BD_I2C_TX_NAK  0x0004  /* no acknowledge error */
-#define BD_I2C_TX_ERR  (BD_I2C_TX_NAK|BD_I2C_TX_UN|BD_I2C_TX_CL)
-
-#define BD_I2C_RX_ERR  BD_SC_OV
-
-/*
- * Returns the best value of I2BRG to meet desired clock speed of I2C with
- * input parameters (clock speed, filter, and predivider value).
- * It returns computer speed value and the difference between it and desired
- * speed.
- */
-static inline int
-i2c_roundrate(int hz, int speed, int filter, int modval,
-             int *brgval, int *totspeed)
-{
-       int moddiv = 1 << (5 - (modval & 3)), brgdiv, div;
-
-       debug("\t[I2C] trying hz=%d, speed=%d, filter=%d, modval=%d\n",
-               hz, speed, filter, modval);
-
-       div = moddiv * speed;
-       brgdiv = (hz + div - 1) / div;
-
-       debug("\t\tmoddiv=%d, brgdiv=%d\n", moddiv, brgdiv);
-
-       *brgval = ((brgdiv + 1) / 2) - 3 - (2 * filter);
-
-       if ((*brgval < 0) || (*brgval > 255)) {
-               debug("\t\trejected brgval=%d\n", *brgval);
-               return -1;
-       }
-
-       brgdiv = 2 * (*brgval + 3 + (2 * filter));
-       div = moddiv * brgdiv;
-       *totspeed = hz / div;
-
-       debug("\t\taccepted brgval=%d, totspeed=%d\n", *brgval, *totspeed);
-
-       return 0;
-}
-
-/*
- * Sets the I2C clock predivider and divider to meet required clock speed.
- */
-static int i2c_setrate(int hz, int speed)
-{
-       immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
-       volatile i2c8260_t *i2c = (i2c8260_t *)&immap->im_i2c;
-       int     brgval,
-               modval, /* 0-3 */
-               bestspeed_diff = speed,
-               bestspeed_brgval = 0,
-               bestspeed_modval = 0,
-               bestspeed_filter = 0,
-               totspeed,
-               filter = 0;     /* Use this fixed value */
-
-       for (modval = 0; modval < 4; modval++) {
-               if (i2c_roundrate(hz, speed, filter, modval, &brgval, &totspeed)
-                   == 0) {
-                       int diff = speed - totspeed;
-
-                       if ((diff >= 0) && (diff < bestspeed_diff)) {
-                               bestspeed_diff = diff;
-                               bestspeed_modval = modval;
-                               bestspeed_brgval = brgval;
-                               bestspeed_filter = filter;
-                       }
-               }
-       }
-
-       debug("[I2C] Best is:\n");
-       debug("[I2C] CPU=%dhz RATE=%d F=%d I2MOD=%08x I2BRG=%08x DIFF=%dhz\n",
-               hz, speed, bestspeed_filter, bestspeed_modval, bestspeed_brgval,
-               bestspeed_diff);
-
-       i2c->i2c_i2mod |= ((bestspeed_modval & 3) << 1) |
-               (bestspeed_filter << 3);
-       i2c->i2c_i2brg = bestspeed_brgval & 0xff;
-
-       debug("[I2C] i2mod=%08x i2brg=%08x\n", i2c->i2c_i2mod,
-               i2c->i2c_i2brg);
-
-       return 1;
-}
-
-void i2c_init(int speed, int slaveadd)
-{
-       volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
-       volatile cpm8260_t *cp = (cpm8260_t *)&immap->im_cpm;
-       volatile i2c8260_t *i2c = (i2c8260_t *)&immap->im_i2c;
-       volatile iic_t *iip;
-       ulong rbase, tbase;
-       volatile I2C_BD *rxbd, *txbd;
-       uint dpaddr;
-
-#ifdef CONFIG_SYS_I2C_INIT_BOARD
-       /*
-        * call board specific i2c bus reset routine before accessing the
-        * environment, which might be in a chip on that bus. For details
-        * about this problem see doc/I2C_Edge_Conditions.
-        */
-       i2c_init_board();
-#endif
-
-       dpaddr = immap->im_dprambase16[PROFF_I2C_BASE / sizeof(u16)];
-       if (dpaddr == 0) {
-               /* need to allocate dual port ram */
-               dpaddr = m8260_cpm_dpalloc(64 +
-                                       (NUM_RX_BDS * sizeof(I2C_BD)) +
-                                       (NUM_TX_BDS * sizeof(I2C_BD)) +
-                                       MAX_TX_SPACE, 64);
-               immap->im_dprambase16[PROFF_I2C_BASE / sizeof(u16)] =
-                       dpaddr;
-       }
-
-       /*
-        * initialise data in dual port ram:
-        *
-        *        dpaddr -> parameter ram (64 bytes)
-        *         rbase -> rx BD         (NUM_RX_BDS * sizeof(I2C_BD) bytes)
-        *         tbase -> tx BD         (NUM_TX_BDS * sizeof(I2C_BD) bytes)
-        *                  tx buffer     (MAX_TX_SPACE bytes)
-        */
-
-       iip = (iic_t *)&immap->im_dprambase[dpaddr];
-       memset((void *)iip, 0, sizeof(iic_t));
-
-       rbase = dpaddr + 64;
-       tbase = rbase + NUM_RX_BDS * sizeof(I2C_BD);
-
-       /* Disable interrupts */
-       i2c->i2c_i2mod = 0x00;
-       i2c->i2c_i2cmr = 0x00;
-       i2c->i2c_i2cer = 0xff;
-       i2c->i2c_i2add = slaveadd;
-
-       /*
-        * Set the I2C BRG Clock division factor from desired i2c rate
-        * and current CPU rate (we assume sccr dfbgr field is 0;
-        * divide BRGCLK by 1)
-        */
-       debug("[I2C] Setting rate...\n");
-       i2c_setrate(gd->arch.brg_clk, CONFIG_SYS_I2C_SPEED);
-
-       /* Set I2C controller in master mode */
-       i2c->i2c_i2com = 0x01;
-
-       /* Initialize Tx/Rx parameters */
-       iip->iic_rbase = rbase;
-       iip->iic_tbase = tbase;
-       rxbd = (I2C_BD *)((unsigned char *) &immap->
-                       im_dprambase[iip->iic_rbase]);
-       txbd = (I2C_BD *)((unsigned char *) &immap->
-                       im_dprambase[iip->iic_tbase]);
-
-       debug("[I2C] rbase = %04x\n", iip->iic_rbase);
-       debug("[I2C] tbase = %04x\n", iip->iic_tbase);
-       debug("[I2C] rxbd = %08x\n", (int) rxbd);
-       debug("[I2C] txbd = %08x\n", (int) txbd);
-
-       /* Set big endian byte order */
-       iip->iic_tfcr = 0x10;
-       iip->iic_rfcr = 0x10;
-
-       /* Set maximum receive size. */
-       iip->iic_mrblr = I2C_RXTX_LEN;
-
-       cp->cp_cpcr = mk_cr_cmd(CPM_CR_I2C_PAGE,
-                               CPM_CR_I2C_SBLOCK,
-                               0x00, CPM_CR_INIT_TRX) | CPM_CR_FLG;
-       do {
-               __asm__ __volatile__("eieio");
-       } while (cp->cp_cpcr & CPM_CR_FLG);
-
-       /* Clear events and interrupts */
-       i2c->i2c_i2cer = 0xff;
-       i2c->i2c_i2cmr = 0x00;
-}
-
-static
-void i2c_newio(i2c_state_t *state)
-{
-       volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
-       volatile iic_t *iip;
-       uint dpaddr;
-
-       debug("[I2C] i2c_newio\n");
-
-       dpaddr = immap->im_dprambase16[PROFF_I2C_BASE / sizeof(u16)];
-       iip = (iic_t *)&immap->im_dprambase[dpaddr];
-       state->rx_idx = 0;
-       state->tx_idx = 0;
-       state->rxbd = (void *)&immap->im_dprambase[iip->iic_rbase];
-       state->txbd = (void *)&immap->im_dprambase[iip->iic_tbase];
-       state->tx_space = MAX_TX_SPACE;
-       state->tx_buf = (uchar *)state->txbd + NUM_TX_BDS * sizeof(I2C_BD);
-       state->err_cb = NULL;
-       state->cb_data = NULL;
-
-       debug("[I2C] rxbd = %08x\n", (int)state->rxbd);
-       debug("[I2C] txbd = %08x\n", (int)state->txbd);
-       debug("[I2C] tx_buf = %08x\n", (int)state->tx_buf);
-
-       /* clear the buffer memory */
-       memset((char *) state->tx_buf, 0, MAX_TX_SPACE);
-}
-
-static
-int i2c_send(i2c_state_t *state,
-            unsigned char address,
-            unsigned char secondary_address,
-            unsigned int flags, unsigned short size, unsigned char *dataout)
-{
-       volatile I2C_BD *txbd;
-       int i, j;
-
-       debug("[I2C] i2c_send add=%02d sec=%02d flag=%02d size=%d\n",
-               address, secondary_address, flags, size);
-
-       /* trying to send message larger than BD */
-       if (size > I2C_RXTX_LEN)
-               return I2CERR_MSG_TOO_LONG;
-
-       /* no more free bds */
-       if (state->tx_idx >= NUM_TX_BDS || state->tx_space < (2 + size))
-               return I2CERR_NO_BUFFERS;
-
-       txbd = (I2C_BD *)state->txbd;
-       txbd->addr = state->tx_buf;
-
-       debug("[I2C] txbd = %08x\n", (int) txbd);
-
-       if (flags & I2CF_START_COND) {
-               debug("[I2C] Formatting addresses...\n");
-               if (flags & I2CF_ENABLE_SECONDARY) {
-                       /* Length of message plus dest addresses */
-                       txbd->length = size + 2;
-                       txbd->addr[0] = address << 1;
-                       txbd->addr[1] = secondary_address;
-                       i = 2;
-               } else {
-                       /* Length of message plus dest address */
-                       txbd->length = size + 1;
-                       /* Write destination address to BD */
-                       txbd->addr[0] = address << 1;
-                       i = 1;
-               }
-       } else {
-               txbd->length = size;    /* Length of message */
-               i = 0;
-       }
-
-       /* set up txbd */
-       txbd->status = BD_SC_READY;
-       if (flags & I2CF_START_COND)
-               txbd->status |= BD_I2C_TX_START;
-       if (flags & I2CF_STOP_COND)
-               txbd->status |= BD_SC_LAST | BD_SC_WRAP;
-
-       /* Copy data to send into buffer */
-       debug("[I2C] copy data...\n");
-       for (j = 0; j < size; i++, j++)
-               txbd->addr[i] = dataout[j];
-
-       debug("[I2C] txbd: length=0x%04x status=0x%04x addr[0]=0x%02x addr[1]=0x%02x\n",
-               txbd->length, txbd->status, txbd->addr[0], txbd->addr[1]);
-
-       /* advance state */
-       state->tx_buf += txbd->length;
-       state->tx_space -= txbd->length;
-       state->tx_idx++;
-       state->txbd = (void *) (txbd + 1);
-
-       return 0;
-}
-
-static
-int i2c_receive(i2c_state_t *state,
-               unsigned char address,
-               unsigned char secondary_address,
-               unsigned int flags,
-               unsigned short size_to_expect, unsigned char *datain)
-{
-       volatile I2C_BD *rxbd, *txbd;
-
-       debug("[I2C] i2c_receive %02d %02d %02d\n", address,
-               secondary_address, flags);
-
-       /* Expected to receive too much */
-       if (size_to_expect > I2C_RXTX_LEN)
-               return I2CERR_MSG_TOO_LONG;
-
-       /* no more free bds */
-       if (state->tx_idx >= NUM_TX_BDS || state->rx_idx >= NUM_RX_BDS
-           || state->tx_space < 2)
-               return I2CERR_NO_BUFFERS;
-
-       rxbd = (I2C_BD *) state->rxbd;
-       txbd = (I2C_BD *) state->txbd;
-
-       debug("[I2C] rxbd = %08x\n", (int) rxbd);
-       debug("[I2C] txbd = %08x\n", (int) txbd);
-
-       txbd->addr = state->tx_buf;
-
-       /* set up TXBD for destination address */
-       if (flags & I2CF_ENABLE_SECONDARY) {
-               txbd->length = 2;
-               txbd->addr[0] = address << 1;   /* Write data */
-               txbd->addr[1] = secondary_address;      /* Internal address */
-               txbd->status = BD_SC_READY;
-       } else {
-               txbd->length = 1 + size_to_expect;
-               txbd->addr[0] = (address << 1) | 0x01;
-               txbd->status = BD_SC_READY;
-               memset(&txbd->addr[1], 0, txbd->length);
-       }
-
-       /* set up rxbd for reception */
-       rxbd->status = BD_SC_EMPTY;
-       rxbd->length = size_to_expect;
-       rxbd->addr = datain;
-
-       txbd->status |= BD_I2C_TX_START;
-       if (flags & I2CF_STOP_COND) {
-               txbd->status |= BD_SC_LAST | BD_SC_WRAP;
-               rxbd->status |= BD_SC_WRAP;
-       }
-
-       debug("[I2C] txbd: length=0x%04x status=0x%04x addr[0]=0x%02x addr[1]=0x%02x\n",
-               txbd->length, txbd->status, txbd->addr[0], txbd->addr[1]);
-       debug("[I2C] rxbd: length=0x%04x status=0x%04x addr[0]=0x%02x addr[1]=0x%02x\n",
-               rxbd->length, rxbd->status, rxbd->addr[0], rxbd->addr[1]);
-
-       /* advance state */
-       state->tx_buf += txbd->length;
-       state->tx_space -= txbd->length;
-       state->tx_idx++;
-       state->txbd = (void *) (txbd + 1);
-       state->rx_idx++;
-       state->rxbd = (void *) (rxbd + 1);
-
-       return 0;
-}
-
-
-static
-int i2c_doio(i2c_state_t *state)
-{
-       volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
-       volatile iic_t *iip;
-       volatile i2c8260_t *i2c = (i2c8260_t *)&immap->im_i2c;
-       volatile I2C_BD *txbd, *rxbd;
-       int n, i, b, rxcnt = 0, rxtimeo = 0, txcnt = 0, txtimeo = 0, rc = 0;
-       uint dpaddr;
-
-       debug("[I2C] i2c_doio\n");
-
-       if (state->tx_idx <= 0 && state->rx_idx <= 0) {
-               debug("[I2C] No I/O is queued\n");
-               return I2CERR_QUEUE_EMPTY;
-       }
-
-       dpaddr = immap->im_dprambase16[PROFF_I2C_BASE / sizeof(u16)];
-       iip = (iic_t *)&immap->im_dprambase[dpaddr];
-       iip->iic_rbptr = iip->iic_rbase;
-       iip->iic_tbptr = iip->iic_tbase;
-
-       /* Enable I2C */
-       debug("[I2C] Enabling I2C...\n");
-       i2c->i2c_i2mod |= 0x01;
-
-       /* Begin transmission */
-       i2c->i2c_i2com |= 0x80;
-
-       /* Loop until transmit & receive completed */
-
-       n = state->tx_idx;
-
-       if (n > 0) {
-
-               txbd = ((I2C_BD *) state->txbd) - n;
-               for (i = 0; i < n; i++) {
-                       txtimeo += TOUT_LOOP * txbd->length;
-                       txbd++;
-               }
-
-               txbd--;         /* wait until last in list is done */
-
-               debug("[I2C] Transmitting...(txbd=0x%08lx)\n",
-                       (ulong) txbd);
-
-               udelay(START_DELAY_US); /* give it time to start */
-               while ((txbd->status & BD_SC_READY) && (++txcnt < txtimeo)) {
-                       udelay(DELAY_US);
-                       if (ctrlc())
-                               return -1;
-                       __asm__ __volatile__("eieio");
-               }
-       }
-
-       n = state->rx_idx;
-
-       if (txcnt < txtimeo && n > 0) {
-
-               rxbd = ((I2C_BD *) state->rxbd) - n;
-               for (i = 0; i < n; i++) {
-                       rxtimeo += TOUT_LOOP * rxbd->length;
-                       rxbd++;
-               }
-
-               rxbd--;         /* wait until last in list is done */
-
-               debug("[I2C] Receiving...(rxbd=0x%08lx)\n", (ulong) rxbd);
-
-               udelay(START_DELAY_US); /* give it time to start */
-               while ((rxbd->status & BD_SC_EMPTY) && (++rxcnt < rxtimeo)) {
-                       udelay(DELAY_US);
-                       if (ctrlc())
-                               return -1;
-                       __asm__ __volatile__("eieio");
-               }
-       }
-
-       /* Turn off I2C */
-       i2c->i2c_i2mod &= ~0x01;
-
-       n = state->tx_idx;
-
-       if (n > 0) {
-               for (i = 0; i < n; i++) {
-                       txbd = ((I2C_BD *) state->txbd) - (n - i);
-                       b = txbd->status & BD_I2C_TX_ERR;
-                       if (b != 0) {
-                               if (state->err_cb != NULL)
-                                       (*state->err_cb) (I2CECB_TX_ERR | b,
-                                                         i, state->cb_data);
-                               if (rc == 0)
-                                       rc = I2CERR_IO_ERROR;
-                       }
-               }
-       }
-
-       n = state->rx_idx;
-
-       if (n > 0) {
-               for (i = 0; i < n; i++) {
-                       rxbd = ((I2C_BD *) state->rxbd) - (n - i);
-                       b = rxbd->status & BD_I2C_RX_ERR;
-                       if (b != 0) {
-                               if (state->err_cb != NULL)
-                                       (*state->err_cb) (I2CECB_RX_ERR | b,
-                                                         i, state->cb_data);
-                               if (rc == 0)
-                                       rc = I2CERR_IO_ERROR;
-                       }
-               }
-       }
-
-       if ((txtimeo > 0 && txcnt >= txtimeo) ||
-           (rxtimeo > 0 && rxcnt >= rxtimeo)) {
-               if (state->err_cb != NULL)
-                       (*state->err_cb) (I2CECB_TIMEOUT, -1, state->cb_data);
-               if (rc == 0)
-                       rc = I2CERR_TIMEOUT;
-       }
-
-       return rc;
-}
-
-static void i2c_probe_callback(int flags, int xnum, void *data)
-{
-       /*
-        * the only acceptable errors are a transmit NAK or a receive
-        * overrun - tx NAK means the device does not exist, rx OV
-        * means the device must have responded to the slave address
-        * even though the transfer failed
-        */
-       if (flags == (I2CECB_TX_ERR | I2CECB_TX_NAK))
-               *(int *) data |= 1;
-       if (flags == (I2CECB_RX_ERR | I2CECB_RX_OV))
-               *(int *) data |= 2;
-}
-
-int i2c_probe(uchar chip)
-{
-       i2c_state_t state;
-       int rc, err_flag;
-       uchar buf[1];
-
-       i2c_newio(&state);
-
-       state.err_cb = i2c_probe_callback;
-       state.cb_data = (void *) &err_flag;
-       err_flag = 0;
-
-       rc = i2c_receive(&state, chip, 0, I2CF_START_COND | I2CF_STOP_COND, 1,
-                        buf);
-
-       if (rc != 0)
-               return rc;      /* probe failed */
-
-       rc = i2c_doio(&state);
-
-       if (rc == 0)
-               return 0;       /* device exists - read succeeded */
-
-       if (rc == I2CERR_TIMEOUT)
-               return -1;      /* device does not exist - timeout */
-
-       if (rc != I2CERR_IO_ERROR || err_flag == 0)
-               return rc;      /* probe failed */
-
-       if (err_flag & 1)
-               return -1;      /* device does not exist - had transmit NAK */
-
-       return 0;               /* device exists - had receive overrun */
-}
-
-
-int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
-{
-       i2c_state_t state;
-       uchar xaddr[4];
-       int rc;
-
-       xaddr[0] = (addr >> 24) & 0xFF;
-       xaddr[1] = (addr >> 16) & 0xFF;
-       xaddr[2] = (addr >> 8) & 0xFF;
-       xaddr[3] = addr & 0xFF;
-
-#ifdef CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW
-       /*
-        * EEPROM chips that implement "address overflow" are ones
-        * like Catalyst 24WC04/08/16 which has 9/10/11 bits of address
-        * and the extra bits end up in the "chip address" bit slots.
-        * This makes a 24WC08 (1Kbyte) chip look like four 256 byte
-        * chips.
-        *
-        * Note that we consider the length of the address field to still
-        * be one byte because the extra address bits are hidden in the
-        * chip address.
-        */
-       chip |= ((addr >> (alen * 8)) & CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW);
-#endif
-
-       i2c_newio(&state);
-
-       rc = i2c_send(&state, chip, 0, I2CF_START_COND, alen,
-                     &xaddr[4 - alen]);
-       if (rc != 0) {
-               printf("i2c_read: i2c_send failed (%d)\n", rc);
-               return 1;
-       }
-
-       rc = i2c_receive(&state, chip, 0, I2CF_STOP_COND, len, buffer);
-       if (rc != 0) {
-               printf("i2c_read: i2c_receive failed (%d)\n", rc);
-               return 1;
-       }
-
-       rc = i2c_doio(&state);
-       if (rc != 0) {
-               printf("i2c_read: i2c_doio failed (%d)\n", rc);
-               return 1;
-       }
-       return 0;
-}
-
-int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
-{
-       i2c_state_t state;
-       uchar xaddr[4];
-       int rc;
-
-       xaddr[0] = (addr >> 24) & 0xFF;
-       xaddr[1] = (addr >> 16) & 0xFF;
-       xaddr[2] = (addr >> 8) & 0xFF;
-       xaddr[3] = addr & 0xFF;
-
-#ifdef CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW
-       /*
-        * EEPROM chips that implement "address overflow" are ones
-        * like Catalyst 24WC04/08/16 which has 9/10/11 bits of address
-        * and the extra bits end up in the "chip address" bit slots.
-        * This makes a 24WC08 (1Kbyte) chip look like four 256 byte
-        * chips.
-        *
-        * Note that we consider the length of the address field to still
-        * be one byte because the extra address bits are hidden in the
-        * chip address.
-        */
-       chip |= ((addr >> (alen * 8)) & CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW);
-#endif
-
-       i2c_newio(&state);
-
-       rc = i2c_send(&state, chip, 0, I2CF_START_COND, alen,
-                     &xaddr[4 - alen]);
-       if (rc != 0) {
-               printf("i2c_write: first i2c_send failed (%d)\n", rc);
-               return 1;
-       }
-
-       rc = i2c_send(&state, 0, 0, I2CF_STOP_COND, len, buffer);
-       if (rc != 0) {
-               printf("i2c_write: second i2c_send failed (%d)\n", rc);
-               return 1;
-       }
-
-       rc = i2c_doio(&state);
-       if (rc != 0) {
-               printf("i2c_write: i2c_doio failed (%d)\n", rc);
-               return 1;
-       }
-       return 0;
-}
-
-#if defined(CONFIG_I2C_MULTI_BUS)
-/*
- * Functions for multiple I2C bus handling
- */
-unsigned int i2c_get_bus_num(void)
-{
-       return i2c_bus_num;
-}
-
-int i2c_set_bus_num(unsigned int bus)
-{
-       if (bus >= CONFIG_SYS_MAX_I2C_BUS)
-               return -1;
-       i2c_bus_num = bus;
-       return 0;
-}
-
-#endif /* CONFIG_I2C_MULTI_BUS */
-#endif /* CONFIG_HARD_I2C */
index 2ba314a7f67043c5774c6e269efff25cb66a7f05..7c4519e4a4ca6b06c4de55b5297db0299abeb50d 100644 (file)
@@ -10,7 +10,7 @@
 #include <asm/io.h>
 
 
-static u8 serdes_cfg_tbl[][4] = {
+static u8 serdes_cfg_tbl[][SRDS_MAX_LANES] = {
        [0x40] = {PCIE1, PCIE1, PCIE1, PCIE1},
        [0xD5] = {QSGMII_FM1_A, PCIE3, PCIE2, PCIE1},
        [0xD6] = {QSGMII_FM1_A, PCIE3, PCIE2, SATA1},
@@ -45,7 +45,7 @@ int is_serdes_prtcl_valid(int serdes, u32 prtcl)
        if (prtcl >= ARRAY_SIZE(serdes_cfg_tbl))
                return 0;
 
-       for (i = 0; i < 4; i++) {
+       for (i = 0; i < SRDS_MAX_LANES; i++) {
                if (serdes_cfg_tbl[prtcl][i] != NONE)
                        return 1;
        }
index 6f81fee571b55c9110aa09c81d804551f5dbc610..fc91a054f0e029123db3896623f04a1080f52a1d 100644 (file)
@@ -14,7 +14,6 @@ obj-y += cpu.o
 obj-y  += cpu_init.o
 obj-y  += fec.o
 obj-$(CONFIG_OF_LIBFDT) += fdt.o
-obj-y  += i2c.o
 obj-y  += interrupts.o
 obj-y  += scc.o
 obj-y  += serial.o
diff --git a/arch/powerpc/cpu/mpc8xx/i2c.c b/arch/powerpc/cpu/mpc8xx/i2c.c
deleted file mode 100644 (file)
index 54d5cb5..0000000
+++ /dev/null
@@ -1,672 +0,0 @@
-/*
- * (C) Copyright 2000
- * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it
- *
- * (C) Copyright 2000 Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Marius Groeger <mgroeger@sysgo.de>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- *
- * Back ported to the 8xx platform (from the 8260 platform) by
- * Murray.Jensen@cmst.csiro.au, 27-Jan-01.
- */
-
-#include <common.h>
-#include <console.h>
-
-#ifdef CONFIG_HARD_I2C
-
-#include <commproc.h>
-#include <i2c.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-/* tx/rx timeout (we need the i2c early, so we don't use get_timer()) */
-#define TOUT_LOOP 1000000
-
-#define NUM_RX_BDS 4
-#define NUM_TX_BDS 4
-#define MAX_TX_SPACE 256
-#define I2C_RXTX_LEN 128       /* maximum tx/rx buffer length */
-
-typedef struct I2C_BD {
-       unsigned short status;
-       unsigned short length;
-       unsigned char *addr;
-} I2C_BD;
-
-#define BD_I2C_TX_START 0x0400 /* special status for i2c: Start condition */
-
-#define BD_I2C_TX_CL   0x0001  /* collision error */
-#define BD_I2C_TX_UN   0x0002  /* underflow error */
-#define BD_I2C_TX_NAK  0x0004  /* no acknowledge error */
-#define BD_I2C_TX_ERR  (BD_I2C_TX_NAK|BD_I2C_TX_UN|BD_I2C_TX_CL)
-
-#define BD_I2C_RX_ERR  BD_SC_OV
-
-typedef void (*i2c_ecb_t) (int, int);  /* error callback function */
-
-/* This structure keeps track of the bd and buffer space usage. */
-typedef struct i2c_state {
-       int rx_idx;             /* index   to next free Rx BD */
-       int tx_idx;             /* index   to next free Tx BD */
-       void *rxbd;             /* pointer to next free Rx BD */
-       void *txbd;             /* pointer to next free Tx BD */
-       int tx_space;           /* number  of Tx bytes left   */
-       unsigned char *tx_buf;  /* pointer to free Tx area    */
-       i2c_ecb_t err_cb;       /* error callback function    */
-} i2c_state_t;
-
-
-/* flags for i2c_send() and i2c_receive() */
-#define I2CF_ENABLE_SECONDARY  0x01  /* secondary_address is valid           */
-#define I2CF_START_COND                0x02  /* tx: generate start condition         */
-#define I2CF_STOP_COND         0x04  /* tx: generate stop  condition         */
-
-/* return codes */
-#define I2CERR_NO_BUFFERS      0x01  /* no more BDs or buffer space          */
-#define I2CERR_MSG_TOO_LONG    0x02  /* tried to send/receive to much data   */
-#define I2CERR_TIMEOUT         0x03  /* timeout in i2c_doio()                */
-#define I2CERR_QUEUE_EMPTY     0x04  /* i2c_doio called without send/receive */
-
-/* error callback flags */
-#define I2CECB_RX_ERR          0x10  /* this is a receive error              */
-#define     I2CECB_RX_ERR_OV   0x02  /* receive overrun error                */
-#define     I2CECB_RX_MASK     0x0f  /* mask for error bits                  */
-#define I2CECB_TX_ERR          0x20  /* this is a transmit error             */
-#define     I2CECB_TX_CL       0x01  /* transmit collision error             */
-#define     I2CECB_TX_UN       0x02  /* transmit underflow error             */
-#define     I2CECB_TX_NAK      0x04  /* transmit no ack error                */
-#define     I2CECB_TX_MASK     0x0f  /* mask for error bits                  */
-#define I2CECB_TIMEOUT         0x40  /* this is a timeout error              */
-
-/*
- * Returns the best value of I2BRG to meet desired clock speed of I2C with
- * input parameters (clock speed, filter, and predivider value).
- * It returns computer speed value and the difference between it and desired
- * speed.
- */
-static inline int
-i2c_roundrate(int hz, int speed, int filter, int modval,
-             int *brgval, int *totspeed)
-{
-       int moddiv = 1 << (5 - (modval & 3)), brgdiv, div;
-
-       debug("\t[I2C] trying hz=%d, speed=%d, filter=%d, modval=%d\n",
-               hz, speed, filter, modval);
-
-       div = moddiv * speed;
-       brgdiv = (hz + div - 1) / div;
-
-       debug("\t\tmoddiv=%d, brgdiv=%d\n", moddiv, brgdiv);
-
-       *brgval = ((brgdiv + 1) / 2) - 3 - (2 * filter);
-
-       if ((*brgval < 0) || (*brgval > 255)) {
-               debug("\t\trejected brgval=%d\n", *brgval);
-               return -1;
-       }
-
-       brgdiv = 2 * (*brgval + 3 + (2 * filter));
-       div = moddiv * brgdiv;
-       *totspeed = hz / div;
-
-       debug("\t\taccepted brgval=%d, totspeed=%d\n", *brgval, *totspeed);
-
-       return 0;
-}
-
-/*
- * Sets the I2C clock predivider and divider to meet required clock speed.
- */
-static int i2c_setrate(int hz, int speed)
-{
-       immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile i2c8xx_t *i2c = (i2c8xx_t *) & immap->im_i2c;
-       int     brgval,
-               modval, /* 0-3 */
-               bestspeed_diff = speed,
-               bestspeed_brgval = 0,
-               bestspeed_modval = 0,
-               bestspeed_filter = 0,
-               totspeed,
-               filter = 0;     /* Use this fixed value */
-
-       for (modval = 0; modval < 4; modval++) {
-               if (i2c_roundrate
-                   (hz, speed, filter, modval, &brgval, &totspeed) == 0) {
-                       int diff = speed - totspeed;
-
-                       if ((diff >= 0) && (diff < bestspeed_diff)) {
-                               bestspeed_diff = diff;
-                               bestspeed_modval = modval;
-                               bestspeed_brgval = brgval;
-                               bestspeed_filter = filter;
-                       }
-               }
-       }
-
-       debug("[I2C] Best is:\n");
-       debug("[I2C] CPU=%dhz RATE=%d F=%d I2MOD=%08x I2BRG=%08x DIFF=%dhz\n",
-               hz,
-               speed,
-               bestspeed_filter,
-               bestspeed_modval,
-               bestspeed_brgval,
-               bestspeed_diff);
-
-       i2c->i2c_i2mod |=
-               ((bestspeed_modval & 3) << 1) | (bestspeed_filter << 3);
-       i2c->i2c_i2brg = bestspeed_brgval & 0xff;
-
-       debug("[I2C] i2mod=%08x i2brg=%08x\n",
-               i2c->i2c_i2mod,
-               i2c->i2c_i2brg);
-
-       return 1;
-}
-
-void i2c_init(int speed, int slaveaddr)
-{
-       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-       volatile cpm8xx_t *cp = (cpm8xx_t *)&immap->im_cpm;
-       volatile i2c8xx_t *i2c = (i2c8xx_t *)&immap->im_i2c;
-       volatile iic_t *iip = (iic_t *)&cp->cp_dparam[PROFF_IIC];
-       ulong rbase, tbase;
-       volatile I2C_BD *rxbd, *txbd;
-       uint dpaddr;
-
-#ifdef CONFIG_SYS_I2C_INIT_BOARD
-       /* call board specific i2c bus reset routine before accessing the   */
-       /* environment, which might be in a chip on that bus. For details   */
-       /* about this problem see doc/I2C_Edge_Conditions.                  */
-       i2c_init_board();
-#endif
-
-#ifdef CONFIG_SYS_I2C_UCODE_PATCH
-       iip = (iic_t *)&cp->cp_dpmem[iip->iic_rpbase];
-#else
-       /* Disable relocation */
-       iip->iic_rpbase = 0;
-#endif
-
-       dpaddr = CPM_I2C_BASE;
-
-       /*
-        * initialise data in dual port ram:
-        *
-        * dpaddr->rbase -> rx BD         (NUM_RX_BDS * sizeof(I2C_BD) bytes)
-        *         tbase -> tx BD         (NUM_TX_BDS * sizeof(I2C_BD) bytes)
-        *                  tx buffer     (MAX_TX_SPACE bytes)
-        */
-
-       rbase = dpaddr;
-       tbase = rbase + NUM_RX_BDS * sizeof(I2C_BD);
-
-       /* Initialize Port B I2C pins. */
-       cp->cp_pbpar |= 0x00000030;
-       cp->cp_pbdir |= 0x00000030;
-       cp->cp_pbodr |= 0x00000030;
-
-       /* Disable interrupts */
-       i2c->i2c_i2mod = 0x00;
-       i2c->i2c_i2cmr = 0x00;
-       i2c->i2c_i2cer = 0xff;
-       i2c->i2c_i2add = slaveaddr;
-
-       /*
-        * Set the I2C BRG Clock division factor from desired i2c rate
-        * and current CPU rate (we assume sccr dfbgr field is 0;
-        * divide BRGCLK by 1)
-        */
-       debug("[I2C] Setting rate...\n");
-       i2c_setrate(gd->cpu_clk, CONFIG_SYS_I2C_SPEED);
-
-       /* Set I2C controller in master mode */
-       i2c->i2c_i2com = 0x01;
-
-       /* Set SDMA bus arbitration level to 5 (SDCR) */
-       immap->im_siu_conf.sc_sdcr = 0x0001;
-
-       /* Initialize Tx/Rx parameters */
-       iip->iic_rbase = rbase;
-       iip->iic_tbase = tbase;
-       rxbd = (I2C_BD *) ((unsigned char *) &cp->cp_dpmem[iip->iic_rbase]);
-       txbd = (I2C_BD *) ((unsigned char *) &cp->cp_dpmem[iip->iic_tbase]);
-
-       debug("[I2C] rbase = %04x\n", iip->iic_rbase);
-       debug("[I2C] tbase = %04x\n", iip->iic_tbase);
-       debug("[I2C] rxbd = %08x\n", (int)rxbd);
-       debug("[I2C] txbd = %08x\n", (int)txbd);
-
-       /* Set big endian byte order */
-       iip->iic_tfcr = 0x10;
-       iip->iic_rfcr = 0x10;
-
-       /* Set maximum receive size. */
-       iip->iic_mrblr = I2C_RXTX_LEN;
-
-#ifdef CONFIG_SYS_I2C_UCODE_PATCH
-       /*
-        *  Initialize required parameters if using microcode patch.
-        */
-       iip->iic_rbptr = iip->iic_rbase;
-       iip->iic_tbptr = iip->iic_tbase;
-       iip->iic_rstate = 0;
-       iip->iic_tstate = 0;
-#else
-       cp->cp_cpcr = mk_cr_cmd(CPM_CR_CH_I2C, CPM_CR_INIT_TRX) | CPM_CR_FLG;
-       do {
-               __asm__ __volatile__("eieio");
-       } while (cp->cp_cpcr & CPM_CR_FLG);
-#endif
-
-       /* Clear events and interrupts */
-       i2c->i2c_i2cer = 0xff;
-       i2c->i2c_i2cmr = 0x00;
-}
-
-static void i2c_newio(i2c_state_t *state)
-{
-       volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
-       volatile cpm8xx_t *cp = (cpm8xx_t *)&immap->im_cpm;
-       volatile iic_t *iip = (iic_t *)&cp->cp_dparam[PROFF_IIC];
-
-       debug("[I2C] i2c_newio\n");
-
-#ifdef CONFIG_SYS_I2C_UCODE_PATCH
-       iip = (iic_t *)&cp->cp_dpmem[iip->iic_rpbase];
-#endif
-       state->rx_idx = 0;
-       state->tx_idx = 0;
-       state->rxbd = (void *)&cp->cp_dpmem[iip->iic_rbase];
-       state->txbd = (void *)&cp->cp_dpmem[iip->iic_tbase];
-       state->tx_space = MAX_TX_SPACE;
-       state->tx_buf = (uchar *)state->txbd + NUM_TX_BDS * sizeof(I2C_BD);
-       state->err_cb = NULL;
-
-       debug("[I2C] rxbd = %08x\n", (int)state->rxbd);
-       debug("[I2C] txbd = %08x\n", (int)state->txbd);
-       debug("[I2C] tx_buf = %08x\n", (int)state->tx_buf);
-
-       /* clear the buffer memory */
-       memset((char *)state->tx_buf, 0, MAX_TX_SPACE);
-}
-
-static int
-i2c_send(i2c_state_t *state,
-        unsigned char address,
-        unsigned char secondary_address,
-        unsigned int flags, unsigned short size, unsigned char *dataout)
-{
-       volatile I2C_BD *txbd;
-       int i, j;
-
-       debug("[I2C] i2c_send add=%02d sec=%02d flag=%02d size=%d\n",
-               address, secondary_address, flags, size);
-
-       /* trying to send message larger than BD */
-       if (size > I2C_RXTX_LEN)
-               return I2CERR_MSG_TOO_LONG;
-
-       /* no more free bds */
-       if (state->tx_idx >= NUM_TX_BDS || state->tx_space < (2 + size))
-               return I2CERR_NO_BUFFERS;
-
-       txbd = (I2C_BD *) state->txbd;
-       txbd->addr = state->tx_buf;
-
-       debug("[I2C] txbd = %08x\n", (int)txbd);
-
-       if (flags & I2CF_START_COND) {
-               debug("[I2C] Formatting addresses...\n");
-               if (flags & I2CF_ENABLE_SECONDARY) {
-                       /* Length of msg + dest addr */
-                       txbd->length = size + 2;
-
-                       txbd->addr[0] = address << 1;
-                       txbd->addr[1] = secondary_address;
-                       i = 2;
-               } else {
-                       /* Length of msg + dest addr */
-                       txbd->length = size + 1;
-                       /* Write dest addr to BD */
-                       txbd->addr[0] = address << 1;
-                       i = 1;
-               }
-       } else {
-               txbd->length = size;    /* Length of message */
-               i = 0;
-       }
-
-       /* set up txbd */
-       txbd->status = BD_SC_READY;
-       if (flags & I2CF_START_COND)
-               txbd->status |= BD_I2C_TX_START;
-       if (flags & I2CF_STOP_COND)
-               txbd->status |= BD_SC_LAST | BD_SC_WRAP;
-
-       /* Copy data to send into buffer */
-       debug("[I2C] copy data...\n");
-       for(j = 0; j < size; i++, j++)
-               txbd->addr[i] = dataout[j];
-
-       debug("[I2C] txbd: length=0x%04x status=0x%04x addr[0]=0x%02x addr[1]=0x%02x\n",
-               txbd->length,
-               txbd->status,
-               txbd->addr[0],
-               txbd->addr[1]);
-
-       /* advance state */
-       state->tx_buf += txbd->length;
-       state->tx_space -= txbd->length;
-       state->tx_idx++;
-       state->txbd = (void *) (txbd + 1);
-
-       return 0;
-}
-
-static int
-i2c_receive(i2c_state_t *state,
-           unsigned char address,
-           unsigned char secondary_address,
-           unsigned int flags,
-           unsigned short size_to_expect, unsigned char *datain)
-{
-       volatile I2C_BD *rxbd, *txbd;
-
-       debug("[I2C] i2c_receive %02d %02d %02d\n",
-               address, secondary_address, flags);
-
-       /* Expected to receive too much */
-       if (size_to_expect > I2C_RXTX_LEN)
-               return I2CERR_MSG_TOO_LONG;
-
-       /* no more free bds */
-       if (state->tx_idx >= NUM_TX_BDS || state->rx_idx >= NUM_RX_BDS
-           || state->tx_space < 2)
-               return I2CERR_NO_BUFFERS;
-
-       rxbd = (I2C_BD *) state->rxbd;
-       txbd = (I2C_BD *) state->txbd;
-
-       debug("[I2C] rxbd = %08x\n", (int)rxbd);
-       debug("[I2C] txbd = %08x\n", (int)txbd);
-
-       txbd->addr = state->tx_buf;
-
-       /* set up TXBD for destination address */
-       if (flags & I2CF_ENABLE_SECONDARY) {
-               txbd->length = 2;
-               txbd->addr[0] = address << 1;   /* Write data */
-               txbd->addr[1] = secondary_address;      /* Internal address */
-               txbd->status = BD_SC_READY;
-       } else {
-               txbd->length = 1 + size_to_expect;
-               txbd->addr[0] = (address << 1) | 0x01;
-               txbd->status = BD_SC_READY;
-               memset(&txbd->addr[1], 0, txbd->length);
-       }
-
-       /* set up rxbd for reception */
-       rxbd->status = BD_SC_EMPTY;
-       rxbd->length = size_to_expect;
-       rxbd->addr = datain;
-
-       txbd->status |= BD_I2C_TX_START;
-       if (flags & I2CF_STOP_COND) {
-               txbd->status |= BD_SC_LAST | BD_SC_WRAP;
-               rxbd->status |= BD_SC_WRAP;
-       }
-
-       debug("[I2C] txbd: length=0x%04x status=0x%04x addr[0]=0x%02x addr[1]=0x%02x\n",
-               txbd->length,
-               txbd->status,
-               txbd->addr[0],
-               txbd->addr[1]);
-       debug("[I2C] rxbd: length=0x%04x status=0x%04x addr[0]=0x%02x addr[1]=0x%02x\n",
-               rxbd->length,
-               rxbd->status,
-               rxbd->addr[0],
-               rxbd->addr[1]);
-
-       /* advance state */
-       state->tx_buf += txbd->length;
-       state->tx_space -= txbd->length;
-       state->tx_idx++;
-       state->txbd = (void *) (txbd + 1);
-       state->rx_idx++;
-       state->rxbd = (void *) (rxbd + 1);
-
-       return 0;
-}
-
-
-static int i2c_doio(i2c_state_t *state)
-{
-       volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
-       volatile cpm8xx_t *cp = (cpm8xx_t *)&immap->im_cpm;
-       volatile i2c8xx_t *i2c = (i2c8xx_t *)&immap->im_i2c;
-       volatile iic_t *iip = (iic_t *)&cp->cp_dparam[PROFF_IIC];
-       volatile I2C_BD *txbd, *rxbd;
-       volatile int j = 0;
-
-       debug("[I2C] i2c_doio\n");
-
-#ifdef CONFIG_SYS_I2C_UCODE_PATCH
-       iip = (iic_t *)&cp->cp_dpmem[iip->iic_rpbase];
-#endif
-
-       if (state->tx_idx <= 0 && state->rx_idx <= 0) {
-               debug("[I2C] No I/O is queued\n");
-               return I2CERR_QUEUE_EMPTY;
-       }
-
-       iip->iic_rbptr = iip->iic_rbase;
-       iip->iic_tbptr = iip->iic_tbase;
-
-       /* Enable I2C */
-       debug("[I2C] Enabling I2C...\n");
-       i2c->i2c_i2mod |= 0x01;
-
-       /* Begin transmission */
-       i2c->i2c_i2com |= 0x80;
-
-       /* Loop until transmit & receive completed */
-
-       if (state->tx_idx > 0) {
-               txbd = ((I2C_BD*)state->txbd) - 1;
-
-               debug("[I2C] Transmitting...(txbd=0x%08lx)\n",
-                       (ulong)txbd);
-
-               while ((txbd->status & BD_SC_READY) && (j++ < TOUT_LOOP)) {
-                       if (ctrlc())
-                               return (-1);
-
-                       __asm__ __volatile__("eieio");
-               }
-       }
-
-       if ((state->rx_idx > 0) && (j < TOUT_LOOP)) {
-               rxbd = ((I2C_BD*)state->rxbd) - 1;
-
-               debug("[I2C] Receiving...(rxbd=0x%08lx)\n",
-                       (ulong)rxbd);
-
-               while ((rxbd->status & BD_SC_EMPTY) && (j++ < TOUT_LOOP)) {
-                       if (ctrlc())
-                               return (-1);
-
-                       __asm__ __volatile__("eieio");
-               }
-       }
-
-       /* Turn off I2C */
-       i2c->i2c_i2mod &= ~0x01;
-
-       if (state->err_cb != NULL) {
-               int n, i, b;
-
-               /*
-                * if we have an error callback function, look at the
-                * error bits in the bd status and pass them back
-                */
-
-               if ((n = state->tx_idx) > 0) {
-                       for (i = 0; i < n; i++) {
-                               txbd = ((I2C_BD *) state->txbd) - (n - i);
-                               if ((b = txbd->status & BD_I2C_TX_ERR) != 0)
-                                       (*state->err_cb) (I2CECB_TX_ERR | b,
-                                                         i);
-                       }
-               }
-
-               if ((n = state->rx_idx) > 0) {
-                       for (i = 0; i < n; i++) {
-                               rxbd = ((I2C_BD *) state->rxbd) - (n - i);
-                               if ((b = rxbd->status & BD_I2C_RX_ERR) != 0)
-                                       (*state->err_cb) (I2CECB_RX_ERR | b,
-                                                         i);
-                       }
-               }
-
-               if (j >= TOUT_LOOP)
-                       (*state->err_cb) (I2CECB_TIMEOUT, 0);
-       }
-
-       return (j >= TOUT_LOOP) ? I2CERR_TIMEOUT : 0;
-}
-
-static int had_tx_nak;
-
-static void i2c_test_callback(int flags, int xnum)
-{
-       if ((flags & I2CECB_TX_ERR) && (flags & I2CECB_TX_NAK))
-               had_tx_nak = 1;
-}
-
-int i2c_probe(uchar chip)
-{
-       i2c_state_t state;
-       int rc;
-       uchar buf[1];
-
-       i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-
-       i2c_newio(&state);
-
-       state.err_cb = i2c_test_callback;
-       had_tx_nak = 0;
-
-       rc = i2c_receive(&state, chip, 0, I2CF_START_COND | I2CF_STOP_COND, 1,
-                        buf);
-
-       if (rc != 0)
-               return (rc);
-
-       rc = i2c_doio(&state);
-
-       if ((rc != 0) && (rc != I2CERR_TIMEOUT))
-               return (rc);
-
-       return (had_tx_nak);
-}
-
-int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
-{
-       i2c_state_t state;
-       uchar xaddr[4];
-       int rc;
-
-       xaddr[0] = (addr >> 24) & 0xFF;
-       xaddr[1] = (addr >> 16) & 0xFF;
-       xaddr[2] = (addr >> 8) & 0xFF;
-       xaddr[3] = addr & 0xFF;
-
-#ifdef CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW
-       /*
-        * EEPROM chips that implement "address overflow" are ones like
-        * Catalyst 24WC04/08/16 which has 9/10/11 bits of address and the
-        * extra bits end up in the "chip address" bit slots.  This makes
-        * a 24WC08 (1Kbyte) chip look like four 256 byte chips.
-        *
-        * Note that we consider the length of the address field to still
-        * be one byte because the extra address bits are hidden in the
-        * chip address.
-        */
-       chip |= ((addr >> (alen * 8)) & CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW);
-#endif
-
-       i2c_newio(&state);
-
-       rc = i2c_send(&state, chip, 0, I2CF_START_COND, alen,
-                     &xaddr[4 - alen]);
-       if (rc != 0) {
-               printf("i2c_read: i2c_send failed (%d)\n", rc);
-               return 1;
-       }
-
-       rc = i2c_receive(&state, chip, 0, I2CF_STOP_COND, len, buffer);
-       if (rc != 0) {
-               printf("i2c_read: i2c_receive failed (%d)\n", rc);
-               return 1;
-       }
-
-       rc = i2c_doio(&state);
-       if (rc != 0) {
-               printf("i2c_read: i2c_doio failed (%d)\n", rc);
-               return 1;
-       }
-       return 0;
-}
-
-int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
-{
-       i2c_state_t state;
-       uchar xaddr[4];
-       int rc;
-
-       xaddr[0] = (addr >> 24) & 0xFF;
-       xaddr[1] = (addr >> 16) & 0xFF;
-       xaddr[2] = (addr >> 8) & 0xFF;
-       xaddr[3] = addr & 0xFF;
-
-#ifdef CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW
-       /*
-        * EEPROM chips that implement "address overflow" are ones like
-        * Catalyst 24WC04/08/16 which has 9/10/11 bits of address and the
-        * extra bits end up in the "chip address" bit slots.  This makes
-        * a 24WC08 (1Kbyte) chip look like four 256 byte chips.
-        *
-        * Note that we consider the length of the address field to still
-        * be one byte because the extra address bits are hidden in the
-        * chip address.
-        */
-       chip |= ((addr >> (alen * 8)) & CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW);
-#endif
-
-       i2c_newio(&state);
-
-       rc = i2c_send(&state, chip, 0, I2CF_START_COND, alen,
-                     &xaddr[4 - alen]);
-       if (rc != 0) {
-               printf("i2c_write: first i2c_send failed (%d)\n", rc);
-               return 1;
-       }
-
-       rc = i2c_send(&state, 0, 0, I2CF_STOP_COND, len, buffer);
-       if (rc != 0) {
-               printf("i2c_write: second i2c_send failed (%d)\n", rc);
-               return 1;
-       }
-
-       rc = i2c_doio(&state);
-       if (rc != 0) {
-               printf("i2c_write: i2c_doio failed (%d)\n", rc);
-               return 1;
-       }
-       return 0;
-}
-
-#endif /* CONFIG_HARD_I2C */
index 762b174b2d64213602f3e2e3d214dce0fbc93928..ee537f4ac9cb4c84a241f4c78d9e1d23211624f4 100644 (file)
@@ -2523,7 +2523,11 @@ typedef struct ccsr_gur {
 
 #ifdef CONFIG_SYS_FSL_QORIQ_CHASSIS2
 #define MAX_SERDES 4
+#if defined(CONFIG_ARCH_T1024) || defined(CONFIG_ARCH_T1023)
+#define SRDS_MAX_LANES 4
+#else
 #define SRDS_MAX_LANES 8
+#endif
 #define SRDS_MAX_BANK 2
 typedef struct serdes_corenet {
        struct {
index 094c5aaf61a12e2930bcaacb87237dbac9368e4b..9077a82876f277f3dccfa3f7f8e41af2975a90cf 100644 (file)
                ping-add = <3>;
        };
 
+       phy_provider0: gen_phy@0 {
+               compatible = "sandbox,phy";
+               #phy-cells = <1>;
+       };
+
+       phy_provider1: gen_phy@1 {
+               compatible = "sandbox,phy";
+               #phy-cells = <0>;
+               broken;
+       };
+
+       gen_phy_user: gen_phy_user {
+               compatible = "simple-bus";
+               phys = <&phy_provider0 0>, <&phy_provider0 1>, <&phy_provider1>;
+               phy-names = "phy1", "phy2", "phy3";
+       };
+
        some-bus {
                #address-cells = <1>;
                #size-cells = <0>;
index 9ead3ebccf89d1c8737058000528e7e99c78e0c0..0cd981e73e43f7293a83f71ea2056ac185c0f1ff 100644 (file)
@@ -589,6 +589,38 @@ config GENERATE_ACPI_TABLE
 
 endmenu
 
+config HAVE_ACPI_RESUME
+       bool "Enable ACPI S3 resume"
+       help
+         Select this to enable ACPI S3 resume. S3 is an ACPI-defined sleeping
+         state where all system context is lost except system memory. U-Boot
+         is responsible for restoring the machine state as it was before sleep.
+         It needs restore the memory controller, without overwriting memory
+         which is not marked as reserved. For the peripherals which lose their
+         registers, U-Boot needs to write the original value. When everything
+         is done, U-Boot needs to find out the wakeup vector provided by OSes
+         and jump there.
+
+config S3_VGA_ROM_RUN
+       bool "Re-run VGA option ROMs on S3 resume"
+       depends on HAVE_ACPI_RESUME
+       default y if HAVE_ACPI_RESUME
+       help
+         Execute VGA option ROMs in U-Boot when resuming from S3. Normally
+         this is needed when graphics console is being used in the kernel.
+
+         Turning it off can reduce some resume time, but be aware that your
+         graphics console won't work without VGA options ROMs. Set it to N
+         if your kernel is only on a serial console.
+
+config STACK_SIZE
+       hex
+       depends on HAVE_ACPI_RESUME
+       default 0x1000
+       help
+         Estimated U-Boot's runtime stack size that needs to be reserved
+         during an ACPI S3 resume.
+
 config MAX_PIRQ_LINKS
        int
        default 8
index 92a9023b0b2f1369a82c817b5a83c2104eef54fb..e1c84ce097addc330228cd3284b56333653e5193 100644 (file)
@@ -45,6 +45,7 @@ ifndef CONFIG_$(SPL_)X86_64
 obj-$(CONFIG_SMP) += sipi_vector.o
 endif
 obj-y += turbo.o
+obj-$(CONFIG_HAVE_ACPI_RESUME) += wakeup.o
 
 ifeq ($(CONFIG_$(SPL_)X86_64),y)
 obj-y += x86_64/
index fa92d8852eadba38a7a584c6d824153399c451e8..55ed7de781fd4cfcbc1b1d3f03bf13f944165b45 100644 (file)
@@ -8,7 +8,9 @@
 #include <cpu.h>
 #include <dm.h>
 #include <dm/uclass-internal.h>
+#include <asm/acpi_s3.h>
 #include <asm/acpi_table.h>
+#include <asm/io.h>
 #include <asm/ioapic.h>
 #include <asm/mpspec.h>
 #include <asm/tables.h>
@@ -187,3 +189,48 @@ void acpi_create_gnvs(struct acpi_global_nvs *gnvs)
        else
                gnvs->iuart_en = 0;
 }
+
+#ifdef CONFIG_HAVE_ACPI_RESUME
+/*
+ * The following two routines are called at a very early stage, even before
+ * FSP 2nd phase API fsp_init() is called. Registers off ACPI_BASE_ADDRESS
+ * and PMC_BASE_ADDRESS are accessed, so we need make sure the base addresses
+ * of these two blocks are programmed by either U-Boot or FSP.
+ *
+ * It has been verified that 1st phase API (see arch/x86/lib/fsp/fsp_car.S)
+ * on Intel BayTrail SoC already initializes these two base addresses so
+ * we are safe to access these registers here.
+ */
+
+enum acpi_sleep_state chipset_prev_sleep_state(void)
+{
+       u32 pm1_sts;
+       u32 pm1_cnt;
+       u32 gen_pmcon1;
+       enum acpi_sleep_state prev_sleep_state = ACPI_S0;
+
+       /* Read Power State */
+       pm1_sts = inw(ACPI_BASE_ADDRESS + PM1_STS);
+       pm1_cnt = inl(ACPI_BASE_ADDRESS + PM1_CNT);
+       gen_pmcon1 = readl(PMC_BASE_ADDRESS + GEN_PMCON1);
+
+       debug("PM1_STS = 0x%x PM1_CNT = 0x%x GEN_PMCON1 = 0x%x\n",
+             pm1_sts, pm1_cnt, gen_pmcon1);
+
+       if (pm1_sts & WAK_STS)
+               prev_sleep_state = acpi_sleep_from_pm1(pm1_cnt);
+
+       if (gen_pmcon1 & (PWR_FLR | SUS_PWR_FLR))
+               prev_sleep_state = ACPI_S5;
+
+       return prev_sleep_state;
+}
+
+void chipset_clear_sleep_state(void)
+{
+       u32 pm1_cnt;
+
+       pm1_cnt = inl(ACPI_BASE_ADDRESS + PM1_CNT);
+       outl(pm1_cnt & ~(SLP_TYP), ACPI_BASE_ADDRESS + PM1_CNT);
+}
+#endif
index 87ba849c1c4e58efa515cc947742eeb8970b180a..c58f6a86a8fd6b3542f7c8ba0d37df19b4a01da5 100644 (file)
 #include <asm/mrccache.h>
 #include <asm/post.h>
 
-static struct pci_device_id mmc_supported[] = {
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BYT_SDIO },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BYT_SD },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BYT_EMMC2 },
-       {},
-};
-
-int cpu_mmc_init(bd_t *bis)
-{
-       return pci_mmc_init("ValleyView SDHCI", mmc_supported);
-}
-
 #ifndef CONFIG_EFI_APP
 int arch_cpu_init(void)
 {
index 8fa6953588b51537c90dc81aa662b1694f2d208e..e13786efa590018e2a8b9357d12caad66095a4d6 100644 (file)
@@ -25,6 +25,8 @@
 #include <errno.h>
 #include <malloc.h>
 #include <syscon.h>
+#include <asm/acpi_s3.h>
+#include <asm/acpi_table.h>
 #include <asm/control_regs.h>
 #include <asm/coreboot_tables.h>
 #include <asm/cpu.h>
@@ -179,6 +181,11 @@ int default_print_cpuinfo(void)
               cpu_has_64bit() ? "x86_64" : "x86",
               cpu_vendor_name(gd->arch.x86_vendor), gd->arch.x86_device);
 
+#ifdef CONFIG_HAVE_ACPI_RESUME
+       debug("ACPI previous sleep state: %s\n",
+             acpi_ss_string(gd->arch.prev_sleep_state));
+#endif
+
        return 0;
 }
 
@@ -198,10 +205,17 @@ __weak void board_final_cleanup(void)
 
 int last_stage_init(void)
 {
-       write_tables();
-
        board_final_cleanup();
 
+#if CONFIG_HAVE_ACPI_RESUME
+       struct acpi_fadt *fadt = acpi_find_fadt();
+
+       if (fadt != NULL && gd->arch.prev_sleep_state == ACPI_S3)
+               acpi_resume(fadt);
+#endif
+
+       write_tables();
+
        return 0;
 }
 #endif
@@ -264,6 +278,18 @@ int reserve_arch(void)
        high_table_reserve();
 #endif
 
+#ifdef CONFIG_HAVE_ACPI_RESUME
+       acpi_s3_reserve();
+
+#ifdef CONFIG_HAVE_FSP
+       /*
+        * Save stack address to CMOS so that at next S3 boot,
+        * we can use it as the stack address for fsp_contiue()
+        */
+       fsp_save_s3_stack();
+#endif /* CONFIG_HAVE_FSP */
+#endif /* CONFIG_HAVE_ACPI_RESUME */
+
        return 0;
 }
 #endif
index 0c2cea4ee9dd1bf479ac04bb43374094ed8a7acf..c36a5892d5fcfabc6e4761ba3da27e4ef5a3f608 100644 (file)
 #include <asm/arch/msg_port.h>
 #include <asm/arch/quark.h>
 
-static struct pci_device_id mmc_supported[] = {
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QRK_SDIO },
-       {},
-};
-
 static void quark_setup_mtrr(void)
 {
        u32 base, mask;
@@ -328,11 +323,6 @@ int arch_early_init_r(void)
        return 0;
 }
 
-int cpu_mmc_init(bd_t *bis)
-{
-       return pci_mmc_init("Quark SDHCI", mmc_supported);
-}
-
 int arch_misc_init(void)
 {
 #ifdef CONFIG_ENABLE_MRC_CACHE
index af3ffad385222ffb8ecafaca28d71d3b13eaba0e..c0681995bdf026748ad016fc53787d2e00f265a1 100644 (file)
@@ -5,4 +5,4 @@
 #
 
 obj-y += fsp_configs.o irq.o
-obj-y += tnc.o topcliff.o
+obj-y += tnc.o
diff --git a/arch/x86/cpu/queensbay/topcliff.c b/arch/x86/cpu/queensbay/topcliff.c
deleted file mode 100644 (file)
index b76dd7d..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <mmc.h>
-#include <pci_ids.h>
-
-static struct pci_device_id mmc_supported[] = {
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TCF_SDIO_0 },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TCF_SDIO_1 },
-       {},
-};
-
-int cpu_mmc_init(bd_t *bis)
-{
-       return pci_mmc_init("Topcliff SDHCI", mmc_supported);
-}
diff --git a/arch/x86/cpu/wakeup.S b/arch/x86/cpu/wakeup.S
new file mode 100644 (file)
index 0000000..066c9b1
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2017, Bin Meng <bmeng.cn@gmail.com>
+ *
+ * From coreboot src/arch/x86/wakeup.S
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <asm/acpi_s3.h>
+#include <asm/processor.h>
+#include <asm/processor-flags.h>
+
+#define RELOCATED(x)   ((x) - __wakeup + WAKEUP_BASE)
+
+#define CODE_SEG       (X86_GDT_ENTRY_16BIT_CS * X86_GDT_ENTRY_SIZE)
+#define DATA_SEG       (X86_GDT_ENTRY_16BIT_DS * X86_GDT_ENTRY_SIZE)
+
+       .code32
+       .globl __wakeup
+__wakeup:
+       /* First prepare the jmp to the resume vector */
+       mov     0x4(%esp), %eax /* vector */
+       /* last 4 bits of linear addr are taken as offset */
+       andw    $0x0f, %ax
+       movw    %ax, (__wakeup_offset)
+       mov     0x4(%esp), %eax
+       /* the rest is taken as segment */
+       shr     $4, %eax
+       movw    %ax, (__wakeup_segment)
+
+       /* Activate the right segment descriptor real mode */
+       ljmp    $CODE_SEG, $RELOCATED(1f)
+1:
+       /* 16 bit code from here on... */
+       .code16
+
+       /*
+        * Load the segment registers w/ properly configured segment
+        * descriptors. They will retain these configurations (limits,
+        * writability, etc.) once protected mode is turned off.
+        */
+       mov     $DATA_SEG, %ax
+       mov     %ax, %ds
+       mov     %ax, %es
+       mov     %ax, %fs
+       mov     %ax, %gs
+       mov     %ax, %ss
+
+       /* Turn off protection */
+       movl    %cr0, %eax
+       andl    $~X86_CR0_PE, %eax
+       movl    %eax, %cr0
+
+       /* Now really going into real mode */
+       ljmp    $0, $RELOCATED(1f)
+1:
+       movw    $0x0, %ax
+       movw    %ax, %ds
+       movw    %ax, %es
+       movw    %ax, %ss
+       movw    %ax, %fs
+       movw    %ax, %gs
+
+       /*
+        * This is a FAR JMP to the OS waking vector.
+        * The C code changes the address to be correct.
+        */
+       .byte 0xea
+
+__wakeup_offset = RELOCATED(.)
+       .word 0x0000
+
+__wakeup_segment = RELOCATED(.)
+       .word 0x0000
+
+       .globl __wakeup_size
+__wakeup_size:
+       .long . - __wakeup
index 18b310d39e884224fa0d37eea61ca06e0d0f86d9..1ae058d7a94f5b609f2f2920460accea3a736185 100644 (file)
                                u-boot,dm-pre-reloc;
                                reg = <0 0x20>;
                                bank-name = "A";
+                               use-lvl-write-cache;
                        };
 
                        gpiob {
                                u-boot,dm-pre-reloc;
                                reg = <0x20 0x20>;
                                bank-name = "B";
+                               use-lvl-write-cache;
                        };
 
                        gpioc {
                                u-boot,dm-pre-reloc;
                                reg = <0x40 0x20>;
                                bank-name = "C";
+                               use-lvl-write-cache;
                        };
 
                        gpiod {
                                u-boot,dm-pre-reloc;
                                reg = <0x60 0x20>;
                                bank-name = "D";
+                               use-lvl-write-cache;
                        };
 
                        gpioe {
                                u-boot,dm-pre-reloc;
                                reg = <0x80 0x20>;
                                bank-name = "E";
+                               use-lvl-write-cache;
                        };
 
                        gpiof {
                                u-boot,dm-pre-reloc;
                                reg = <0xA0 0x20>;
                                bank-name = "F";
+                               use-lvl-write-cache;
                        };
                };
        };
index e1d81a7283a5717e49857b12125c8a1aa75c687f..aa8bfb86513c4fa9571a548058616e911b445c45 100644 (file)
                                u-boot,dm-pre-reloc;
                                reg = <0 0x20>;
                                bank-name = "A";
+                               use-lvl-write-cache;
                        };
 
                        gpiob {
                                u-boot,dm-pre-reloc;
                                reg = <0x20 0x20>;
                                bank-name = "B";
+                               use-lvl-write-cache;
                        };
 
                        gpioc {
                                u-boot,dm-pre-reloc;
                                reg = <0x40 0x20>;
                                bank-name = "C";
+                               use-lvl-write-cache;
                        };
 
                        gpiod {
                                u-boot,dm-pre-reloc;
                                reg = <0x60 0x20>;
                                bank-name = "D";
+                               use-lvl-write-cache;
                        };
 
                        gpioe {
                                u-boot,dm-pre-reloc;
                                reg = <0x80 0x20>;
                                bank-name = "E";
+                               use-lvl-write-cache;
                        };
 
                        gpiof {
                                u-boot,dm-pre-reloc;
                                reg = <0xA0 0x20>;
                                bank-name = "F";
+                               use-lvl-write-cache;
                        };
                };
        };
index f0efe908e2c5b8d938e93319b7cc8937e3d21042..898e9c9b5f7537dae2e7fe8822f3307b9430e6c5 100644 (file)
                                u-boot,dm-pre-reloc;
                                reg = <0 0x20>;
                                bank-name = "A";
+                               use-lvl-write-cache;
                        };
 
                        gpiob {
                                u-boot,dm-pre-reloc;
                                reg = <0x20 0x20>;
                                bank-name = "B";
+                               use-lvl-write-cache;
                        };
 
                        gpioc {
                                u-boot,dm-pre-reloc;
                                reg = <0x40 0x20>;
                                bank-name = "C";
+                               use-lvl-write-cache;
                        };
 
                        gpiod {
                                u-boot,dm-pre-reloc;
                                reg = <0x60 0x20>;
                                bank-name = "D";
+                               use-lvl-write-cache;
                        };
 
                        gpioe {
                                u-boot,dm-pre-reloc;
                                reg = <0x80 0x20>;
                                bank-name = "E";
+                               use-lvl-write-cache;
                        };
 
                        gpiof {
                                u-boot,dm-pre-reloc;
                                reg = <0xA0 0x20>;
                                bank-name = "F";
+                               use-lvl-write-cache;
                        };
                };
        };
index 75ee6ade7c16e6e18a515600bb8b93b294e41217..546981a9ac1c38bd96756889a3a2ec314f096bba 100644 (file)
                                u-boot,dm-pre-reloc;
                                reg = <0 0x20>;
                                bank-name = "A";
+                               use-lvl-write-cache;
                        };
 
                        gpiob {
                                u-boot,dm-pre-reloc;
                                reg = <0x20 0x20>;
                                bank-name = "B";
+                               use-lvl-write-cache;
                        };
 
                        gpioc {
                                u-boot,dm-pre-reloc;
                                reg = <0x40 0x20>;
                                bank-name = "C";
+                               use-lvl-write-cache;
                        };
 
                        gpiod {
                                u-boot,dm-pre-reloc;
                                reg = <0x60 0x20>;
                                bank-name = "D";
+                               use-lvl-write-cache;
                        };
 
                        gpioe {
                                u-boot,dm-pre-reloc;
                                reg = <0x80 0x20>;
                                bank-name = "E";
+                               use-lvl-write-cache;
                        };
 
                        gpiof {
                                u-boot,dm-pre-reloc;
                                reg = <0xA0 0x20>;
                                bank-name = "F";
+                               use-lvl-write-cache;
                        };
                };
        };
index d51318bdf60757cf6ff4ad3026de4211fff2a1b4..af64c6859ce77ccfcce20daf42745da00e577173 100644 (file)
@@ -35,7 +35,6 @@
                /* GPIO E0 */
                soc_gpio_s5_0@0 {
                        gpio-offset = <0x80 0>;
-                       pad-offset = <0x1d0>;
                        mode-gpio;
                        output-value = <0>;
                        direction = <PIN_OUTPUT>;
@@ -44,7 +43,6 @@
                /* GPIO E1 */
                soc_gpio_s5_1@0 {
                        gpio-offset = <0x80 1>;
-                       pad-offset = <0x210>;
                        mode-gpio;
                        output-value = <0>;
                        direction = <PIN_OUTPUT>;
@@ -53,7 +51,6 @@
                /* GPIO E2 */
                soc_gpio_s5_2@0 {
                        gpio-offset = <0x80 2>;
-                       pad-offset = <0x1e0>;
                        mode-gpio;
                        output-value = <0>;
                        direction = <PIN_OUTPUT>;
@@ -61,7 +58,6 @@
 
                pin_usb_host_en0@0 {
                        gpio-offset = <0x80 8>;
-                       pad-offset = <0x260>;
                        mode-gpio;
                        output-value = <1>;
                        direction = <PIN_OUTPUT>;
@@ -69,7 +65,6 @@
 
                pin_usb_host_en1@0 {
                        gpio-offset = <0x80 9>;
-                       pad-offset = <0x250>;
                        mode-gpio;
                        output-value = <1>;
                        direction = <PIN_OUTPUT>;
                                u-boot,dm-pre-reloc;
                                reg = <0 0x20>;
                                bank-name = "A";
+                               use-lvl-write-cache;
                        };
 
                        gpiob {
                                u-boot,dm-pre-reloc;
                                reg = <0x20 0x20>;
                                bank-name = "B";
+                               use-lvl-write-cache;
                        };
 
                        gpioc {
                                u-boot,dm-pre-reloc;
                                reg = <0x40 0x20>;
                                bank-name = "C";
+                               use-lvl-write-cache;
                        };
 
                        gpiod {
                                u-boot,dm-pre-reloc;
                                reg = <0x60 0x20>;
                                bank-name = "D";
+                               use-lvl-write-cache;
                        };
 
                        gpioe {
                                u-boot,dm-pre-reloc;
                                reg = <0x80 0x20>;
                                bank-name = "E";
+                               use-lvl-write-cache;
                        };
 
                        gpiof {
                                u-boot,dm-pre-reloc;
                                reg = <0xA0 0x20>;
                                bank-name = "F";
+                               use-lvl-write-cache;
                        };
                };
        };
diff --git a/arch/x86/include/asm/acpi_s3.h b/arch/x86/include/asm/acpi_s3.h
new file mode 100644 (file)
index 0000000..86aec0a
--- /dev/null
@@ -0,0 +1,131 @@
+/*
+ * Copyright (C) 2017, Bin Meng <bmeng.cn@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __ASM_ACPI_S3_H__
+#define __ASM_ACPI_S3_H__
+
+#define WAKEUP_BASE    0x600
+
+/* PM1_STATUS register */
+#define WAK_STS                (1 << 15)
+#define PCIEXPWAK_STS  (1 << 14)
+#define RTC_STS                (1 << 10)
+#define SLPBTN_STS     (1 << 9)
+#define PWRBTN_STS     (1 << 8)
+#define GBL_STS                (1 << 5)
+#define BM_STS         (1 << 4)
+#define TMR_STS                (1 << 0)
+
+/* PM1_CNT register */
+#define SLP_EN         (1 << 13)
+#define SLP_TYP_SHIFT  10
+#define SLP_TYP                (7 << SLP_TYP_SHIFT)
+#define SLP_TYP_S0     0
+#define SLP_TYP_S1     1
+#define SLP_TYP_S3     5
+#define SLP_TYP_S4     6
+#define SLP_TYP_S5     7
+
+/* Memory size reserved for S3 resume */
+#define S3_RESERVE_SIZE        0x1000
+
+#ifndef __ASSEMBLY__
+
+extern char __wakeup[];
+extern int __wakeup_size;
+
+enum acpi_sleep_state {
+       ACPI_S0,
+       ACPI_S1,
+       ACPI_S2,
+       ACPI_S3,
+       ACPI_S4,
+       ACPI_S5,
+};
+
+/**
+ * acpi_ss_string() - get ACPI-defined sleep state string
+ *
+ * @pm1_cnt:   ACPI-defined sleep state
+ * @return:    a pointer to the sleep state string.
+ */
+static inline char *acpi_ss_string(enum acpi_sleep_state state)
+{
+       char *ss_string[] = { "S0", "S1", "S2", "S3", "S4", "S5"};
+
+       return ss_string[state];
+}
+
+/**
+ * acpi_sleep_from_pm1() - get ACPI-defined sleep state from PM1_CNT register
+ *
+ * @pm1_cnt:   PM1_CNT register value
+ * @return:    ACPI-defined sleep state if given valid PM1_CNT register value,
+ *             -EINVAL otherwise.
+ */
+static inline enum acpi_sleep_state acpi_sleep_from_pm1(u32 pm1_cnt)
+{
+       switch ((pm1_cnt & SLP_TYP) >> SLP_TYP_SHIFT) {
+       case SLP_TYP_S0:
+               return ACPI_S0;
+       case SLP_TYP_S1:
+               return ACPI_S1;
+       case SLP_TYP_S3:
+               return ACPI_S3;
+       case SLP_TYP_S4:
+               return ACPI_S4;
+       case SLP_TYP_S5:
+               return ACPI_S5;
+       }
+
+       return -EINVAL;
+}
+
+/**
+ * chipset_prev_sleep_state() - Get chipset previous sleep state
+ *
+ * This returns chipset previous sleep state from ACPI registers.
+ * Platform codes must supply this routine in order to support ACPI S3.
+ *
+ * @return ACPI_S0/S1/S2/S3/S4/S5.
+ */
+enum acpi_sleep_state chipset_prev_sleep_state(void);
+
+/**
+ * chipset_clear_sleep_state() - Clear chipset sleep state
+ *
+ * This clears chipset sleep state in ACPI registers.
+ * Platform codes must supply this routine in order to support ACPI S3.
+ */
+void chipset_clear_sleep_state(void);
+
+struct acpi_fadt;
+/**
+ * acpi_resume() - Do ACPI S3 resume
+ *
+ * This calls U-Boot wake up assembly stub and jumps to OS's wake up vector.
+ *
+ * @fadt:      FADT table pointer in the ACPI table
+ * @return:    Never returns
+ */
+void acpi_resume(struct acpi_fadt *fadt);
+
+/**
+ * acpi_s3_reserve() - Reserve memory for ACPI S3 resume
+ *
+ * This copies memory where real mode interrupt handler stubs reside to the
+ * reserved place on the stack.
+ *
+ * This routine should be called by reserve_arch() before U-Boot is relocated
+ * when ACPI S3 resume is enabled.
+ *
+ * @return:    0 always
+ */
+int acpi_s3_reserve(void);
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* __ASM_ACPI_S3_H__ */
index bbd80a1dd9aa9707a643a5ffef6017ee0a63db43..dd7a946b6c44c6b09fb66ae8133cffd210b50afd 100644 (file)
@@ -316,4 +316,32 @@ int acpi_create_madt_lapic_nmi(struct acpi_madt_lapic_nmi *lapic_nmi,
                               u8 cpu, u16 flags, u8 lint);
 u32 acpi_fill_madt(u32 current);
 void acpi_create_gnvs(struct acpi_global_nvs *gnvs);
+/**
+ * enter_acpi_mode() - enter into ACPI mode
+ *
+ * This programs the ACPI-defined PM1_CNT register to enable SCI interrupt
+ * so that the whole system swiches to ACPI mode.
+ *
+ * @pm1_cnt:   PM1_CNT register I/O address
+ */
+void enter_acpi_mode(int pm1_cnt);
 ulong write_acpi_tables(ulong start);
+
+/**
+ * acpi_find_fadt() - find ACPI FADT table in the sytem memory
+ *
+ * This routine parses the ACPI table to locate the ACPI FADT table.
+ *
+ * @return:    a pointer to the ACPI FADT table in the system memory
+ */
+struct acpi_fadt *acpi_find_fadt(void);
+
+/**
+ * acpi_find_wakeup_vector() - find OS installed wake up vector address
+ *
+ * This routine parses the ACPI table to locate the wake up vector installed
+ * by the OS previously.
+ *
+ * @return:    wake up vector address installed by the OS
+ */
+void *acpi_find_wakeup_vector(struct acpi_fadt *);
index eb5ae76186f1d61286fb6cdee185e6e298510930..56007230843a496907b143157b64c54ef4efde0e 100644 (file)
@@ -8,6 +8,8 @@
  */
 
 Name(\_S0, Package() {0x0, 0x0, 0x0, 0x0})
+#ifdef CONFIG_HAVE_ACPI_RESUME
 Name(\_S3, Package() {0x5, 0x0, 0x0, 0x0})
+#endif
 Name(\_S4, Package() {0x6, 0x0, 0x0, 0x0})
 Name(\_S5, Package() {0x7, 0x0, 0x0, 0x0})
index 62a91051e47897eb813fae04df03a523e9a5eaad..ec4e9d5212a351d63897781be80cf4e25c7b17f3 100644 (file)
 #define PMC_BASE_ADDRESS               0xfed03000
 #define PMC_BASE_SIZE                  0x400
 
+#define GEN_PMCON1                     0x20
+#define  UART_EN                       (1 << 24)
+#define  DISB                          (1 << 23)
+#define  MEM_SR                                (1 << 21)
+#define  SRS                           (1 << 20)
+#define  CTS                           (1 << 19)
+#define  MS4V                          (1 << 18)
+#define  PWR_FLR                       (1 << 16)
+#define  PME_B0_S5_DIS                 (1 << 15)
+#define  SUS_PWR_FLR                   (1 << 14)
+#define  WOL_EN_OVRD                   (1 << 13)
+#define  DIS_SLP_X_STRCH_SUS_UP                (1 << 12)
+#define  GEN_RST_STS                   (1 <<  9)
+#define  RPS                           (1 <<  2)
+#define  AFTERG3_EN                    (1 <<  0)
+#define GEN_PMCON2                     0x24
+#define  SLPSX_STR_POL_LOCK            (1 << 18)
+#define  BIOS_PCI_EXP_EN               (1 << 10)
+#define  PWRBTN_LVL                    (1 <<  9)
+#define  SMI_LOCK                      (1 <<  4)
+
 /* Power Management Unit */
 #define PUNIT_BASE_ADDRESS             0xfed05000
 #define PUNIT_BASE_SIZE                        0x800
@@ -62,6 +83,9 @@
 #define ACPI_BASE_ADDRESS              0x0400
 #define ACPI_BASE_SIZE                 0x80
 
+#define PM1_STS                                0x00
+#define PM1_CNT                                0x04
+
 #define GPIO_BASE_ADDRESS              0x0500
 #define GPIO_BASE_SIZE                 0x100
 
diff --git a/arch/x86/include/asm/cmos_layout.h b/arch/x86/include/asm/cmos_layout.h
new file mode 100644 (file)
index 0000000..0a0a51e
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2017, Bin Meng <bmeng.cn@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __CMOS_LAYOUT_H
+#define __CMOS_LAYOUT_H
+
+/*
+ * The RTC internal registers and RAM is organized as two banks of 128 bytes
+ * each, called the standard and extended banks. The first 14 bytes of the
+ * standard bank contain the RTC time and date information along with four
+ * registers, A - D, that are used for configuration of the RTC. The extended
+ * bank contains a full 128 bytes of battery backed SRAM.
+ *
+ * For simplicity in U-Boot we only support CMOS in the standard bank, and
+ * its base address starts from offset 0x10, which leaves us 112 bytes space.
+ */
+#define CMOS_BASE              0x10
+
+/*
+ * The file records all offsets off CMOS_BASE that is currently used by
+ * U-Boot for various reasons. It is put in such a unified place in order
+ * to be consistent across platforms.
+ */
+
+/* stack address for S3 boot in a FSP configuration, 4 bytes */
+#define CMOS_FSP_STACK_ADDR    CMOS_BASE
+
+#endif /* __CMOS_LAYOUT_H */
diff --git a/arch/x86/include/asm/early_cmos.h b/arch/x86/include/asm/early_cmos.h
new file mode 100644 (file)
index 0000000..cd2634d
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2017, Bin Meng <bmeng.cn@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __EARLY_CMOS_H
+#define __EARLY_CMOS_H
+
+/* CMOS actually resides in the RTC SRAM */
+#define CMOS_IO_PORT   0x70
+
+/**
+ * cmos_read8() - Get 8-bit data stored at the given address
+ *
+ * This reads from CMOS for the 8-bit data stored at the given address.
+ *
+ * @addr:      RTC SRAM address
+ * @return:    8-bit data stored at the given address
+ */
+u8 cmos_read8(u8 addr);
+
+/**
+ * cmos_read16() - Get 16-bit data stored at the given address
+ *
+ * This reads from CMOS for the 16-bit data stored at the given address.
+ *
+ * @addr:      RTC SRAM address
+ * @return:    16-bit data stored at the given address
+ */
+u16 cmos_read16(u8 addr);
+
+/**
+ * cmos_read32() - Get 32-bit data stored at the given address
+ *
+ * This reads from CMOS for the 32-bit data stored at the given address.
+ *
+ * @addr:      RTC SRAM address
+ * @return:    32-bit data stored at the given address
+ */
+u32 cmos_read32(u8 addr);
+
+#endif /* __EARLY_CMOS_H */
index 4570bc7a4ad6a94b8b8b3981bca3fb83c5ec8306..93a80fe2b6c325d31e65caa37c2222bd0c3b8e68 100644 (file)
@@ -99,6 +99,10 @@ struct arch_global_data {
        u32 high_table_ptr;
        u32 high_table_limit;
 #endif
+#ifdef CONFIG_HAVE_ACPI_RESUME
+       int prev_sleep_state;           /* Previous sleep state ACPI_S0/1../5 */
+       ulong backup_mem;               /* Backup memory address for S3 */
+#endif
 };
 
 #endif
index 6b774bdbe8a43efcc640b2d3301def49b5b0f03a..f627663f319b452357c4cf7c2523ccd3b10c2511 100644 (file)
 #define POST_MRC               0x2f
 #define POST_DRAM              0x30
 #define POST_LAPIC             0x31
+#define POST_OS_RESUME         0x40
 
 #define POST_RAM_FAILURE       0xea
 #define POST_BIST_FAILURE      0xeb
 #define POST_CAR_FAILURE       0xec
+#define POST_RESUME_FAILURE    0xed
 
 /* Output a post code using al - value must be 0 to 0xff */
 #ifdef __ASSEMBLY__
index d1b23880219ebc6f28be102c86834d7e72de3be4..9e8208ba2b7f2620b6270e53f56fb7386cce3b39 100644 (file)
@@ -15,6 +15,7 @@
  * PIRQ routing table, Multi-Processor table and ACPI table.
  */
 #define ROM_TABLE_ADDR 0xf0000
+#define ROM_TABLE_END  0xfffff
 
 #define ROM_TABLE_ALIGN        1024
 
index d2d603967ef24f7932e504d7ca96528855d972f0..d55455f2d09a022c0cd000fd22ab30eeb3acb5d4 100644 (file)
@@ -54,6 +54,19 @@ u32 isa_map_rom(u32 bus_addr, int size);
 /* arch/x86/lib/... */
 int video_bios_init(void);
 
+/* arch/x86/lib/fsp/... */
+
+/**
+ * fsp_save_s3_stack() - save stack address to CMOS for next S3 boot
+ *
+ * At the end of pre-relocation phase, save the new stack address
+ * to CMOS and use it as the stack on next S3 boot for fsp_init()
+ * continuation function.
+ *
+ * @return:    0 if OK, -ve on error
+ */
+int fsp_save_s3_stack(void);
+
 void   board_init_f_r_trampoline(ulong) __attribute__ ((noreturn));
 void   board_init_f_r(void) __attribute__ ((noreturn));
 
index d1ad37af64861779132bd561bcd01137fd251116..fe00d7573f5147c5efa09dd45194e34e23c487ff 100644 (file)
@@ -15,6 +15,7 @@ obj-$(CONFIG_CMD_BOOTM) += bootm.o
 endif
 obj-y  += cmd_boot.o
 obj-$(CONFIG_SEABIOS) += coreboot_table.o
+obj-y  += early_cmos.o
 obj-$(CONFIG_EFI) += efi/
 obj-y  += e820.o
 obj-y  += gcc.o
@@ -37,6 +38,7 @@ obj-$(CONFIG_INTEL_MID) += scu.o
 obj-y  += sections.o
 obj-y += sfi.o
 obj-y  += string.o
+obj-$(CONFIG_HAVE_ACPI_RESUME) += acpi_s3.o
 ifndef CONFIG_QEMU
 obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi_table.o
 endif
diff --git a/arch/x86/lib/acpi_s3.c b/arch/x86/lib/acpi_s3.c
new file mode 100644 (file)
index 0000000..3175da8
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2017, Bin Meng <bmeng.cn@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/acpi_s3.h>
+#include <asm/acpi_table.h>
+#include <asm/post.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static void asmlinkage (*acpi_do_wakeup)(void *vector) = (void *)WAKEUP_BASE;
+
+static void acpi_jump_to_wakeup(void *vector)
+{
+       /* Copy wakeup trampoline in place */
+       memcpy((void *)WAKEUP_BASE, __wakeup, __wakeup_size);
+
+       printf("Jumping to OS waking vector %p\n", vector);
+       acpi_do_wakeup(vector);
+}
+
+void acpi_resume(struct acpi_fadt *fadt)
+{
+       void *wake_vec;
+
+       /* Turn on ACPI mode for S3 */
+       enter_acpi_mode(fadt->pm1a_cnt_blk);
+
+       wake_vec = acpi_find_wakeup_vector(fadt);
+
+       /*
+        * Restore the memory content starting from address 0x1000 which is
+        * used for the real mode interrupt handler stubs.
+        */
+       memcpy((void *)0x1000, (const void *)gd->arch.backup_mem,
+              S3_RESERVE_SIZE);
+
+       post_code(POST_OS_RESUME);
+       acpi_jump_to_wakeup(wake_vec);
+}
+
+int acpi_s3_reserve(void)
+{
+       /* adjust stack pointer for ACPI S3 resume backup memory */
+       gd->start_addr_sp -= S3_RESERVE_SIZE;
+       gd->arch.backup_mem = gd->start_addr_sp;
+
+       gd->start_addr_sp &= ~0xf;
+
+       /*
+        * U-Boot sets up the real mode interrupt handler stubs starting from
+        * address 0x1000. In most cases, the first 640K (0x00000 - 0x9ffff)
+        * system memory is reported as system RAM in E820 table to the OS.
+        * (see install_e820_map() implementation for each platform). So OS
+        * can use these memories whatever it wants.
+        *
+        * If U-Boot is in an S3 resume path, care must be taken not to corrupt
+        * these memorie otherwise OS data gets lost. Testing shows that, on
+        * Microsoft Windows 10 on Intel Baytrail its wake up vector happens to
+        * be installed at the same address 0x1000. While on Linux its wake up
+        * vector does not overlap this memory range, but after resume kernel
+        * checks low memory range per config option CONFIG_X86_RESERVE_LOW
+        * which is 64K by default to see whether a memory corruption occurs
+        * during the suspend/resume (it's harmless, but warnings are shown
+        * in the kernel dmesg logs).
+        *
+        * We cannot simply mark the these memory as reserved in E820 table
+        * because such configuration makes GRUB complain: unable to allocate
+        * real mode page. Hence we choose to back up these memories to the
+        * place where we reserved on our stack for our S3 resume work.
+        * Before jumping to OS wake up vector, we need restore the original
+        * content there (see acpi_resume() above).
+        */
+       if (gd->arch.prev_sleep_state == ACPI_S3)
+               memcpy((void *)gd->arch.backup_mem, (const void *)0x1000,
+                      S3_RESERVE_SIZE);
+
+       return 0;
+}
index 355456dc19e50366534137a6e977a883c013436a..01d5b6fff09329bf6a741d50a1e4fcde1d7f7a20 100644 (file)
@@ -304,8 +304,10 @@ static void acpi_create_mcfg(struct acpi_mcfg *mcfg)
        header->checksum = table_compute_checksum((void *)mcfg, header->length);
 }
 
-static void enter_acpi_mode(int pm1_cnt)
+void enter_acpi_mode(int pm1_cnt)
 {
+       u16 val = inw(pm1_cnt);
+
        /*
         * PM1_CNT register bit0 selects the power management event to be
         * either an SCI or SMI interrupt. When this bit is set, then power
@@ -320,7 +322,7 @@ static void enter_acpi_mode(int pm1_cnt)
         * system, and expose ourselves to OSPM as working under ACPI mode
         * already, turn this bit on.
         */
-       outw(PM1_CNT_SCI_EN, pm1_cnt);
+       outw(val | PM1_CNT_SCI_EN, pm1_cnt);
 }
 
 /*
@@ -438,3 +440,81 @@ ulong write_acpi_tables(ulong start)
 
        return current;
 }
+
+static struct acpi_rsdp *acpi_valid_rsdp(struct acpi_rsdp *rsdp)
+{
+       if (strncmp((char *)rsdp, RSDP_SIG, sizeof(RSDP_SIG) - 1) != 0)
+               return NULL;
+
+       debug("Looking on %p for valid checksum\n", rsdp);
+
+       if (table_compute_checksum((void *)rsdp, 20) != 0)
+               return NULL;
+       debug("acpi rsdp checksum 1 passed\n");
+
+       if ((rsdp->revision > 1) &&
+           (table_compute_checksum((void *)rsdp, rsdp->length) != 0))
+               return NULL;
+       debug("acpi rsdp checksum 2 passed\n");
+
+       return rsdp;
+}
+
+struct acpi_fadt *acpi_find_fadt(void)
+{
+       char *p, *end;
+       struct acpi_rsdp *rsdp = NULL;
+       struct acpi_rsdt *rsdt;
+       struct acpi_fadt *fadt = NULL;
+       int i;
+
+       /* Find RSDP */
+       for (p = (char *)ROM_TABLE_ADDR; p < (char *)ROM_TABLE_END; p += 16) {
+               rsdp = acpi_valid_rsdp((struct acpi_rsdp *)p);
+               if (rsdp)
+                       break;
+       }
+
+       if (rsdp == NULL)
+               return NULL;
+
+       debug("RSDP found at %p\n", rsdp);
+       rsdt = (struct acpi_rsdt *)rsdp->rsdt_address;
+
+       end = (char *)rsdt + rsdt->header.length;
+       debug("RSDT found at %p ends at %p\n", rsdt, end);
+
+       for (i = 0; ((char *)&rsdt->entry[i]) < end; i++) {
+               fadt = (struct acpi_fadt *)rsdt->entry[i];
+               if (strncmp((char *)fadt, "FACP", 4) == 0)
+                       break;
+               fadt = NULL;
+       }
+
+       if (fadt == NULL)
+               return NULL;
+
+       debug("FADT found at %p\n", fadt);
+       return fadt;
+}
+
+void *acpi_find_wakeup_vector(struct acpi_fadt *fadt)
+{
+       struct acpi_facs *facs;
+       void *wake_vec;
+
+       debug("Trying to find the wakeup vector...\n");
+
+       facs = (struct acpi_facs *)fadt->firmware_ctrl;
+
+       if (facs == NULL) {
+               debug("No FACS found, wake up from S3 not possible.\n");
+               return NULL;
+       }
+
+       debug("FACS found at %p\n", facs);
+       wake_vec = (void *)facs->firmware_waking_vector;
+       debug("OS waking vector is %p\n", wake_vec);
+
+       return wake_vec;
+}
index 75bab902251d90d68585a1d0d742c4d0eee8bf98..ecd4f4e6c61fdc9a028598400670435a975ebffd 100644 (file)
@@ -10,6 +10,8 @@
 
 #include <common.h>
 #include <command.h>
+#include <dm/device.h>
+#include <dm/root.h>
 #include <errno.h>
 #include <fdt_support.h>
 #include <image.h>
@@ -46,6 +48,13 @@ void bootm_announce_and_cleanup(void)
 #ifdef CONFIG_BOOTSTAGE_REPORT
        bootstage_report();
 #endif
+
+       /*
+        * Call remove function of all devices with a removal flag set.
+        * This may be useful for last-stage operations, like cancelling
+        * of DMA operation or releasing device internal buffers.
+        */
+       dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL);
 }
 
 #if defined(CONFIG_OF_LIBFDT) && !defined(CONFIG_OF_NO_KERNEL)
index ceab3cf5e4f1bab37022c4bf520f13eb27d9ac6d..b1b4cd961312df8972f7cec528cae70283458b51 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <vbe.h>
+#include <asm/acpi_s3.h>
 #include <asm/coreboot_tables.h>
 #include <asm/e820.h>
 
@@ -19,7 +20,11 @@ int high_table_reserve(void)
        gd->arch.high_table_ptr = gd->start_addr_sp;
 
        /* clear the memory */
-       memset((void *)gd->arch.high_table_ptr, 0, CONFIG_HIGH_TABLE_SIZE);
+#ifdef CONFIG_HAVE_ACPI_RESUME
+       if (gd->arch.prev_sleep_state != ACPI_S3)
+#endif
+               memset((void *)gd->arch.high_table_ptr, 0,
+                      CONFIG_HIGH_TABLE_SIZE);
 
        gd->start_addr_sp &= ~0xf;
 
diff --git a/arch/x86/lib/early_cmos.c b/arch/x86/lib/early_cmos.c
new file mode 100644 (file)
index 0000000..fa0b327
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2017, Bin Meng <bmeng.cn@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+/*
+ * This library provides CMOS (inside RTC SRAM) access routines at a very
+ * early stage when driver model is not available yet. Only read access is
+ * provided. The 16-bit/32-bit read are compatible with driver model RTC
+ * uclass write ops, that data is stored in little-endian mode.
+ */
+
+#include <common.h>
+#include <asm/early_cmos.h>
+#include <asm/io.h>
+
+u8 cmos_read8(u8 addr)
+{
+       outb(addr, CMOS_IO_PORT);
+
+       return inb(CMOS_IO_PORT + 1);
+}
+
+u16 cmos_read16(u8 addr)
+{
+       u16 value = 0;
+       u16 data;
+       int i;
+
+       for (i = 0; i < sizeof(value); i++) {
+               data = cmos_read8(addr + i);
+               value |= data << (i << 3);
+       }
+
+       return value;
+}
+
+u32 cmos_read32(u8 addr)
+{
+       u32 value = 0;
+       u32 data;
+       int i;
+
+       for (i = 0; i < sizeof(value); i++) {
+               data = cmos_read8(addr + i);
+               value |= data << (i << 3);
+       }
+
+       return value;
+}
index 66a388d601f5fa046940c564d135fb1c64c3d64c..3397bb83eaf1191bc7a5cffdab3bf216fb10e174 100644 (file)
@@ -5,7 +5,12 @@
  */
 
 #include <common.h>
+#include <dm.h>
 #include <errno.h>
+#include <rtc.h>
+#include <asm/acpi_s3.h>
+#include <asm/cmos_layout.h>
+#include <asm/early_cmos.h>
 #include <asm/io.h>
 #include <asm/mrccache.h>
 #include <asm/post.h>
@@ -75,9 +80,41 @@ static __maybe_unused void *fsp_prepare_mrc_cache(void)
        return cache->data;
 }
 
+#ifdef CONFIG_HAVE_ACPI_RESUME
+int fsp_save_s3_stack(void)
+{
+       struct udevice *dev;
+       int ret;
+
+       if (gd->arch.prev_sleep_state == ACPI_S3)
+               return 0;
+
+       ret = uclass_get_device(UCLASS_RTC, 0, &dev);
+       if (ret) {
+               debug("Cannot find RTC: err=%d\n", ret);
+               return -ENODEV;
+       }
+
+       /* Save the stack address to CMOS */
+       ret = rtc_write32(dev, CMOS_FSP_STACK_ADDR, gd->start_addr_sp);
+       if (ret) {
+               debug("Save stack address to CMOS: err=%d\n", ret);
+               return -EIO;
+       }
+
+       return 0;
+}
+#endif
+
 int arch_fsp_init(void)
 {
        void *nvs;
+       int stack = CONFIG_FSP_TEMP_RAM_ADDR;
+       int boot_mode = BOOT_FULL_CONFIG;
+#ifdef CONFIG_HAVE_ACPI_RESUME
+       int prev_sleep_state = chipset_prev_sleep_state();
+       gd->arch.prev_sleep_state = prev_sleep_state;
+#endif
 
        if (!gd->arch.hob_list) {
 #ifdef CONFIG_ENABLE_MRC_CACHE
@@ -85,12 +122,36 @@ int arch_fsp_init(void)
 #else
                nvs = NULL;
 #endif
+
+#ifdef CONFIG_HAVE_ACPI_RESUME
+               if (prev_sleep_state == ACPI_S3) {
+                       if (nvs == NULL) {
+                               /* If waking from S3 and no cache then */
+                               debug("No MRC cache found in S3 resume path\n");
+                               post_code(POST_RESUME_FAILURE);
+                               /* Clear Sleep Type */
+                               chipset_clear_sleep_state();
+                               /* Reboot */
+                               debug("Rebooting..\n");
+                               reset_cpu(0);
+                               /* Should not reach here.. */
+                               panic("Reboot System");
+                       }
+
+                       /*
+                        * DM is not avaiable yet at this point, hence call
+                        * CMOS access library which does not depend on DM.
+                        */
+                       stack = cmos_read32(CMOS_FSP_STACK_ADDR);
+                       boot_mode = BOOT_ON_S3_RESUME;
+               }
+#endif
                /*
                 * The first time we enter here, call fsp_init().
                 * Note the execution does not return to this function,
                 * instead it jumps to fsp_continue().
                 */
-               fsp_init(CONFIG_FSP_TEMP_RAM_ADDR, BOOT_FULL_CONFIG, nvs);
+               fsp_init(stack, boot_mode, nvs);
        } else {
                /*
                 * The second time we enter here, adjust the size of malloc()
index 8b880cd59455a5d1a710fe5fab63c8f6478e1f33..1a7af576d549c55c06b930bad34eb60c3b383a44 100644 (file)
@@ -92,5 +92,17 @@ unsigned install_e820_map(unsigned max_entries, struct e820entry *entries)
        entries[num_entries].type = E820_RESERVED;
        num_entries++;
 
+#ifdef CONFIG_HAVE_ACPI_RESUME
+       /*
+        * Everything between U-Boot's stack and ram top needs to be
+        * reserved in order for ACPI S3 resume to work.
+        */
+       entries[num_entries].addr = gd->start_addr_sp - CONFIG_STACK_SIZE;
+       entries[num_entries].size = gd->ram_top - gd->start_addr_sp + \
+               CONFIG_STACK_SIZE;
+       entries[num_entries].type = E820_RESERVED;
+       num_entries++;
+#endif
+
        return num_entries;
 }
index 5cc82c9473a1a70328299f530ce0c9aecf4b596e..b1ae079df43bf7e6b963dd9834c517573707247b 100644 (file)
@@ -684,7 +684,7 @@ int board_eth_init(bd_t *bis)
        return rv;
 }
 #endif /* defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD) */
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(1, 0, 0, -1, -1);
index 31418a1f961e3c6a6dc5c9fae00118cb9e83fa18..9205c22e0b5955d164a59dea820d8d58462d69f4 100644 (file)
@@ -156,17 +156,7 @@ int board_init(void)
 
 int board_late_init(void)
 {
-       u8 mac[6];
-
-       /* Read Mac Address and set*/
-       i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-       i2c_set_bus_num(CONFIG_SYS_I2C_MODULE);
-
-       /* Read MAC address */
-       i2c_read(0x50, 0x0, 0, mac, 6);
-
-       if (is_valid_ethaddr(mac))
-               eth_setenv_enetaddr("ethaddr", mac);
+       printf("Cannot use I2C to get MAC address\n");
 
        return 0;
 }
index c6edbeee243823a06520e50edc0e5592093d8a22..07c6184352245af0be70d7ee521045c5b3ff23a5 100644 (file)
@@ -10,5 +10,5 @@
 #
 
 obj-y  += at91sam9260ek.o
-obj- += led.o
+obj-$(CONFIG_AT91_LED) += led.o
 obj-$(CONFIG_HAS_DATAFLASH) += partition.o
index 98193bfdc6aa89596ea67651c46ff3695f59c702..b087fce9b8767c24ff239efc5f0fc5487b9de499 100644 (file)
@@ -7,18 +7,13 @@
  */
 
 #include <common.h>
+#include <debug_uart.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9260_matrix.h>
 #include <asm/arch/at91sam9_smc.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/gpio.h>
-#include <atmel_mci.h>
-
-#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
-# include <net.h>
-#endif
-#include <netdev.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -67,81 +62,34 @@ static void at91sam9260ek_nand_hw_init(void)
 }
 #endif
 
-#ifdef CONFIG_MACB
-static void at91sam9260ek_macb_hw_init(void)
+#ifdef CONFIG_DEBUG_UART_BOARD_INIT
+void board_debug_uart_init(void)
 {
-       struct at91_port *pioa = (struct at91_port *)ATMEL_BASE_PIOA;
-
-       at91_periph_clk_enable(ATMEL_ID_EMAC0);
-
-       /*
-        * Disable pull-up on:
-        *      RXDV (PA17) => PHY normal mode (not Test mode)
-        *      ERX0 (PA14) => PHY ADDR0
-        *      ERX1 (PA15) => PHY ADDR1
-        *      ERX2 (PA25) => PHY ADDR2
-        *      ERX3 (PA26) => PHY ADDR3
-        *      ECRS (PA28) => PHY ADDR4  => PHYADDR = 0x0
-        *
-        * PHY has internal pull-down
-        */
-       writel(pin_to_mask(AT91_PIN_PA14) |
-               pin_to_mask(AT91_PIN_PA15) |
-               pin_to_mask(AT91_PIN_PA17) |
-               pin_to_mask(AT91_PIN_PA25) |
-               pin_to_mask(AT91_PIN_PA26) |
-               pin_to_mask(AT91_PIN_PA28),
-               &pioa->pudr);
-
-       at91_phy_reset();
-
-       /* Re-enable pull-up */
-       writel(pin_to_mask(AT91_PIN_PA14) |
-               pin_to_mask(AT91_PIN_PA15) |
-               pin_to_mask(AT91_PIN_PA17) |
-               pin_to_mask(AT91_PIN_PA25) |
-               pin_to_mask(AT91_PIN_PA26) |
-               pin_to_mask(AT91_PIN_PA28),
-               &pioa->puer);
-
-       /* Initialize EMAC=MACB hardware */
-       at91_macb_hw_init();
-}
-#endif
-
-#ifdef CONFIG_GENERIC_ATMEL_MCI
-int board_mmc_init(bd_t *bd)
-{
-       at91_mci_hw_init();
-
-       return atmel_mci_init((void *)ATMEL_BASE_MCI);
+       at91_seriald_hw_init();
 }
 #endif
 
+#ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-       at91_periph_clk_enable(ATMEL_ID_PIOA);
-       at91_periph_clk_enable(ATMEL_ID_PIOB);
-       at91_periph_clk_enable(ATMEL_ID_PIOC);
-
+#ifdef CONFIG_DEBUG_UART
+       debug_uart_init();
+#endif
        return 0;
 }
+#endif
 
 int board_init(void)
 {
        /* adress of boot parameters */
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
-       at91_seriald_hw_init();
 #ifdef CONFIG_CMD_NAND
        at91sam9260ek_nand_hw_init();
 #endif
 #ifdef CONFIG_HAS_DATAFLASH
        at91_spi0_hw_init((1 << 0) | (1 << 1));
 #endif
-#ifdef CONFIG_MACB
-       at91sam9260ek_macb_hw_init();
-#endif
 
        return 0;
 }
@@ -159,12 +107,3 @@ void reset_phy(void)
 {
 }
 #endif
-
-int board_eth_init(bd_t *bis)
-{
-       int rc = 0;
-#ifdef CONFIG_MACB
-       rc = macb_eth_initialize(0, (void *)ATMEL_BASE_EMAC0, 0x00);
-#endif
-       return rc;
-}
index 7b31f18e4f05ac2ba24db36d64693a5bfc4a9e88..f3cd9d556e3922abb178284c7da8c855fc345a0e 100644 (file)
@@ -10,5 +10,5 @@
 #
 
 obj-y += at91sam9263ek.o
-obj-y += led.o
+obj-$(CONFIG_AT91_LED) += led.o
 obj-$(CONFIG_HAS_DATAFLASH) += partition.o
index e4e32f60aef89e2a990af408b470835c8d5ceefe..3de978311de4502e4e599dcad882f0bc552d5d9d 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <debug_uart.h>
 #include <linux/sizes.h>
 #include <asm/arch/at91sam9263.h>
 #include <asm/arch/at91sam9_smc.h>
 #include <asm/arch/hardware.h>
 #include <lcd.h>
 #include <atmel_lcdc.h>
-#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
-#include <net.h>
-#endif
-#include <netdev.h>
-#include <atmel_mci.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -77,34 +73,6 @@ static void at91sam9263ek_nand_hw_init(void)
 }
 #endif
 
-#ifdef CONFIG_MACB
-static void at91sam9263ek_macb_hw_init(void)
-{
-       at91_pio_t      *pio    = (at91_pio_t *) ATMEL_BASE_PIO;
-
-       at91_periph_clk_enable(ATMEL_ID_EMAC);
-
-       /*
-        * Disable pull-up on:
-        *      RXDV (PC25) => PHY normal mode (not Test mode)
-        *      ERX0 (PE25) => PHY ADDR0
-        *      ERX1 (PE26) => PHY ADDR1 => PHYADDR = 0x0
-        *
-        * PHY has internal pull-down
-        */
-       writel(1 << 25, &pio->pioc.pudr);
-       writel((1 << 25) | (1 <<26), &pio->pioe.pudr);
-
-       at91_phy_reset();
-
-       /* Re-enable pull-up */
-       writel(1 << 25, &pio->pioc.puer);
-       writel((1 << 25) | (1 <<26), &pio->pioe.puer);
-
-       at91_macb_hw_init();
-}
-#endif
-
 #ifdef CONFIG_LCD
 vidinfo_t panel_info = {
        .vl_col =               240,
@@ -209,24 +177,22 @@ void lcd_show_board_info(void)
 #endif /* CONFIG_LCD_INFO */
 #endif
 
-#ifdef CONFIG_GENERIC_ATMEL_MCI
-int board_mmc_init(bd_t *bd)
+#ifdef CONFIG_DEBUG_UART_BOARD_INIT
+void board_debug_uart_init(void)
 {
-       at91_mci_hw_init();
-
-       return atmel_mci_init((void *)ATMEL_BASE_MCI1);
+       at91_seriald_hw_init();
 }
 #endif
 
+#ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-       at91_periph_clk_enable(ATMEL_ID_PIOA);
-       at91_periph_clk_enable(ATMEL_ID_PIOB);
-       at91_periph_clk_enable(ATMEL_ID_PIOCDE);
-
-       at91_seriald_hw_init();
+#ifdef CONFIG_DEBUG_UART
+       debug_uart_init();
+#endif
        return 0;
 }
+#endif
 
 int board_init(void)
 {
@@ -242,9 +208,6 @@ int board_init(void)
        at91_set_pio_output(AT91_PIO_PORTE, 20, 1);     /* select spi0 clock */
        at91_spi0_hw_init(1 << 0);
 #endif
-#ifdef CONFIG_MACB
-       at91sam9263ek_macb_hw_init();
-#endif
 #ifdef CONFIG_USB_OHCI_NEW
        at91_uhp_hw_init();
 #endif
@@ -267,12 +230,3 @@ void reset_phy(void)
 {
 }
 #endif
-
-int board_eth_init(bd_t *bis)
-{
-       int rc = 0;
-#ifdef CONFIG_MACB
-       rc = macb_eth_initialize(0, (void *) ATMEL_BASE_EMAC, 0x00);
-#endif
-       return rc;
-}
index e5448ecc675f5f048e4f3bbcf4833961f7817cf8..55cd9468a43aef9beee1cb7c40e93213a7767d20 100644 (file)
@@ -10,4 +10,4 @@
 #
 
 obj-y += at91sam9m10g45ek.o
-obj-y += led.o
+obj-(CONFIG_AT91_LED) += led.o
index 687191686598fd8168514b8e723a9efbe4d85bfe..d3bc5c69d4f2d369f8450ec67adc6f6384f7714c 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <debug_uart.h>
 #include <asm/io.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/at91sam9g45_matrix.h>
 #include <lcd.h>
 #include <linux/mtd/nand.h>
 #include <atmel_lcdc.h>
-#include <atmel_mci.h>
-#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
-#include <net.h>
-#endif
-#include <netdev.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -149,39 +145,6 @@ static void at91sam9m10g45ek_usb_hw_init(void)
 }
 #endif
 
-#ifdef CONFIG_MACB
-static void at91sam9m10g45ek_macb_hw_init(void)
-{
-       struct at91_port *pioa = (struct at91_port *)ATMEL_BASE_PIOA;
-
-       at91_periph_clk_enable(ATMEL_ID_EMAC);
-
-       /*
-        * Disable pull-up on:
-        *      RXDV (PA15) => PHY normal mode (not Test mode)
-        *      ERX0 (PA12) => PHY ADDR0
-        *      ERX1 (PA13) => PHY ADDR1 => PHYADDR = 0x0
-        *
-        * PHY has internal pull-down
-        */
-       writel(pin_to_mask(AT91_PIN_PA15) |
-              pin_to_mask(AT91_PIN_PA12) |
-              pin_to_mask(AT91_PIN_PA13),
-              &pioa->pudr);
-
-       at91_phy_reset();
-
-       /* Re-enable pull-up */
-       writel(pin_to_mask(AT91_PIN_PA15) |
-              pin_to_mask(AT91_PIN_PA12) |
-              pin_to_mask(AT91_PIN_PA13),
-              &pioa->puer);
-
-       /* And the pins. */
-       at91_macb_hw_init();
-}
-#endif
-
 #ifdef CONFIG_LCD
 
 vidinfo_t panel_info = {
@@ -280,20 +243,22 @@ void lcd_show_board_info(void)
 #endif /* CONFIG_LCD_INFO */
 #endif
 
-#ifdef CONFIG_GENERIC_ATMEL_MCI
-int board_mmc_init(bd_t *bis)
+#ifdef CONFIG_DEBUG_UART_BOARD_INIT
+void board_debug_uart_init(void)
 {
-       at91_mci_hw_init();
-
-       return atmel_mci_init((void *)ATMEL_BASE_MCI0);
+       at91_seriald_hw_init();
 }
 #endif
 
+#ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-       at91_seriald_hw_init();
+#ifdef CONFIG_DEBUG_UART
+       debug_uart_init();
+#endif
        return 0;
 }
+#endif
 
 int board_init(void)
 {
@@ -313,15 +278,6 @@ int board_init(void)
 #ifdef CONFIG_CMD_USB
        at91sam9m10g45ek_usb_hw_init();
 #endif
-#ifdef CONFIG_HAS_DATAFLASH
-       at91_spi0_hw_init(1 << 0);
-#endif
-#ifdef CONFIG_ATMEL_SPI
-       at91_spi0_hw_init(1 << 4);
-#endif
-#ifdef CONFIG_MACB
-       at91sam9m10g45ek_macb_hw_init();
-#endif
 #ifdef CONFIG_LCD
        at91sam9m10g45ek_lcd_hw_init();
 #endif
@@ -340,48 +296,3 @@ void reset_phy(void)
 {
 }
 #endif
-
-int board_eth_init(bd_t *bis)
-{
-       int rc = 0;
-#ifdef CONFIG_MACB
-       rc = macb_eth_initialize(0, (void *)ATMEL_BASE_EMAC, 0x00);
-#endif
-       return rc;
-}
-
-/* SPI chip select control */
-#ifdef CONFIG_ATMEL_SPI
-#include <spi.h>
-
-int spi_cs_is_valid(unsigned int bus, unsigned int cs)
-{
-       return bus == 0 && cs < 2;
-}
-
-void spi_cs_activate(struct spi_slave *slave)
-{
-       switch(slave->cs) {
-               case 1:
-                       at91_set_gpio_output(AT91_PIN_PB18, 0);
-                       break;
-               case 0:
-               default:
-                       at91_set_gpio_output(AT91_PIN_PB3, 0);
-                       break;
-       }
-}
-
-void spi_cs_deactivate(struct spi_slave *slave)
-{
-       switch(slave->cs) {
-               case 1:
-                       at91_set_gpio_output(AT91_PIN_PB18, 1);
-                       break;
-               case 0:
-               default:
-                       at91_set_gpio_output(AT91_PIN_PB3, 1);
-               break;
-       }
-}
-#endif /* CONFIG_ATMEL_SPI */
index 58da2d27f8cf74f1e2b7fab18342a5d1b3bd66f8..11054289869570b633afb0bb2183140c2c84401f 100644 (file)
@@ -13,9 +13,9 @@
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/at91_pio.h>
 #include <asm/arch/clk.h>
+#include <debug_uart.h>
 #include <lcd.h>
 #include <atmel_hlcdc.h>
-#include <atmel_mci.h>
 #include <netdev.h>
 
 #ifdef CONFIG_LCD_INFO
@@ -132,48 +132,6 @@ void lcd_show_board_info(void)
 #endif /* CONFIG_LCD_INFO */
 #endif /* CONFIG_LCD */
 
-/* SPI chip select control */
-#ifdef CONFIG_ATMEL_SPI
-#include <spi.h>
-int spi_cs_is_valid(unsigned int bus, unsigned int cs)
-{
-       return bus == 0 && cs < 2;
-}
-
-void spi_cs_activate(struct spi_slave *slave)
-{
-       switch (slave->cs) {
-       case 0:
-               at91_set_pio_output(AT91_PIO_PORTA, 14, 0);
-               break;
-       case 1:
-               at91_set_pio_output(AT91_PIO_PORTA, 7, 0);
-               break;
-       }
-}
-
-void spi_cs_deactivate(struct spi_slave *slave)
-{
-       switch (slave->cs) {
-       case 0:
-               at91_set_pio_output(AT91_PIO_PORTA, 14, 1);
-               break;
-       case 1:
-               at91_set_pio_output(AT91_PIO_PORTA, 7, 1);
-               break;
-       }
-}
-#endif /* CONFIG_ATMEL_SPI */
-
-#ifdef CONFIG_GENERIC_ATMEL_MCI
-int board_mmc_init(bd_t *bd)
-{
-       at91_mci_hw_init();
-
-       return atmel_mci_init((void *)ATMEL_BASE_HSMCI0);
-}
-#endif
-
 #ifdef CONFIG_KS8851_MLL
 void at91sam9n12ek_ks8851_hw_init(void)
 {
@@ -205,14 +163,22 @@ void at91sam9n12ek_usb_hw_init(void)
 }
 #endif
 
-int board_early_init_f(void)
+#ifdef CONFIG_DEBUG_UART_BOARD_INIT
+void board_debug_uart_init(void)
 {
-       at91_periph_clk_enable(ATMEL_ID_PIOAB);
-       at91_periph_clk_enable(ATMEL_ID_PIOCD);
-
        at91_seriald_hw_init();
+}
+#endif
+
+#ifdef CONFIG_BOARD_EARLY_INIT_F
+int board_early_init_f(void)
+{
+#ifdef CONFIG_DEBUG_UART
+       debug_uart_init();
+#endif
        return 0;
 }
+#endif
 
 int board_init(void)
 {
@@ -223,10 +189,6 @@ int board_init(void)
        at91sam9n12ek_nand_hw_init();
 #endif
 
-#ifdef CONFIG_ATMEL_SPI
-       at91_spi0_hw_init(1 << 0);
-#endif
-
 #ifdef CONFIG_LCD
        at91_lcd_hw_init();
 #endif
index 51daf8d30c33384332abc1ba95d707f9a52ed379..7acfee53503c46e0c710f5b2990a5c78d7e7a4e8 100644 (file)
@@ -10,5 +10,5 @@
 #
 
 obj-y += at91sam9rlek.o
-obj-y += led.o
+obj-$(CONFIG_AT91_LED) += led.o
 obj-$(CONFIG_HAS_DATAFLASH) += partition.o
index 994f2460788bfc77e984d2683efcc4b077e1b07d..0b603ed13a7f140d97ec97d8776a330f551acaa1 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <debug_uart.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9rl.h>
 #include <asm/arch/at91sam9rl_matrix.h>
 
 #include <lcd.h>
 #include <atmel_lcdc.h>
-#include <atmel_mci.h>
-#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
-#include <net.h>
-#endif
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -159,24 +156,22 @@ void lcd_show_board_info(void)
 #endif /* CONFIG_LCD_INFO */
 #endif
 
-#ifdef CONFIG_GENERIC_ATMEL_MCI
-int board_mmc_init(bd_t *bis)
+#ifdef CONFIG_DEBUG_UART_BOARD_INIT
+void board_debug_uart_init(void)
 {
-       at91_mci_hw_init();
-
-       return atmel_mci_init((void *)ATMEL_BASE_MCI);
+       at91_seriald_hw_init();
 }
 #endif
 
+#ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-       at91_periph_clk_enable(ATMEL_ID_PIOA);
-       at91_periph_clk_enable(ATMEL_ID_PIOB);
-       at91_periph_clk_enable(ATMEL_ID_PIOC);
-       at91_periph_clk_enable(ATMEL_ID_PIOD);
-
+#ifdef CONFIG_DEBUG_UART
+       debug_uart_init();
+#endif
        return 0;
 }
+#endif
 
 int board_init(void)
 {
@@ -185,7 +180,6 @@ int board_init(void)
        /* adress of boot parameters */
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
-       at91_seriald_hw_init();
 #ifdef CONFIG_CMD_NAND
        at91sam9rlek_nand_hw_init();
 #endif
index cc81776f9be9e81ac4a5e432a1606e2fad367df8..81c2aad1a52df0aa68c422618a9dfa5dff0569e7 100644 (file)
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/gpio.h>
+#include <debug_uart.h>
 #include <lcd.h>
 #include <atmel_hlcdc.h>
-#include <atmel_mci.h>
-#ifdef CONFIG_MACB
-#include <net.h>
-#endif
-#include <netdev.h>
 #ifdef CONFIG_LCD_INFO
 #include <nand.h>
 #include <version.h>
 #endif
-#ifdef CONFIG_ATMEL_SPI
-#include <spi.h>
-#endif
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -92,21 +85,6 @@ static void at91sam9x5ek_nand_hw_init(void)
 }
 #endif
 
-int board_eth_init(bd_t *bis)
-{
-       int rc = 0;
-
-#ifdef CONFIG_MACB
-       if (has_emac0())
-               rc = macb_eth_initialize(0,
-                       (void *)ATMEL_BASE_EMAC0, 0x00);
-       if (has_emac1())
-               rc = macb_eth_initialize(1,
-                       (void *)ATMEL_BASE_EMAC1, 0x00);
-#endif
-       return rc;
-}
-
 #ifdef CONFIG_LCD
 vidinfo_t panel_info = {
        .vl_col = 800,
@@ -205,54 +183,22 @@ void lcd_show_board_info(void)
 #endif /* CONFIG_LCD_INFO */
 #endif /* CONFIG_LCD */
 
-/* SPI chip select control */
-#ifdef CONFIG_ATMEL_SPI
-int spi_cs_is_valid(unsigned int bus, unsigned int cs)
-{
-       return bus == 0 && cs < 2;
-}
-
-void spi_cs_activate(struct spi_slave *slave)
+#ifdef CONFIG_DEBUG_UART_BOARD_INIT
+void board_debug_uart_init(void)
 {
-       switch (slave->cs) {
-       case 1:
-               at91_set_pio_output(AT91_PIO_PORTA, 7, 0);
-               break;
-       case 0:
-       default:
-               at91_set_pio_output(AT91_PIO_PORTA, 14, 0);
-               break;
-       }
-}
-
-void spi_cs_deactivate(struct spi_slave *slave)
-{
-       switch (slave->cs) {
-       case 1:
-               at91_set_pio_output(AT91_PIO_PORTA, 7, 1);
-               break;
-       case 0:
-       default:
-               at91_set_pio_output(AT91_PIO_PORTA, 14, 1);
-               break;
-       }
-}
-#endif /* CONFIG_ATMEL_SPI */
-
-#ifdef CONFIG_GENERIC_ATMEL_MCI
-int board_mmc_init(bd_t *bd)
-{
-       at91_mci_hw_init();
-
-       return atmel_mci_init((void *)ATMEL_BASE_HSMCI0);
+       at91_seriald_hw_init();
 }
 #endif
 
+#ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-       at91_seriald_hw_init();
+#ifdef CONFIG_DEBUG_UART
+       debug_uart_init();
+#endif
        return 0;
 }
+#endif
 
 int board_init(void)
 {
@@ -266,15 +212,7 @@ int board_init(void)
        at91sam9x5ek_nand_hw_init();
 #endif
 
-#ifdef CONFIG_ATMEL_SPI
-       at91_spi0_hw_init(1 << 4);
-#endif
-
-#ifdef CONFIG_MACB
-       at91_macb_hw_init();
-#endif
-
-#if defined(CONFIG_USB_OHCI_NEW) || defined(CONFIG_USB_EHCI)
+#if defined(CONFIG_USB_OHCI_NEW) || defined(CONFIG_USB_EHCI_HCD)
        at91_uhp_hw_init();
 #endif
 #ifdef CONFIG_LCD
@@ -300,8 +238,6 @@ void at91_spl_board_init(void)
        at91_mci_hw_init();
 #elif CONFIG_SYS_USE_NANDFLASH
        at91sam9x5ek_nand_hw_init();
-#elif CONFIG_SYS_USE_SPIFLASH
-       at91_spi0_hw_init(1 << 4);
 #endif
 }
 
index c5337af4de6fa16e6e22d0aa48f19f3be8b69891..48f45b35ce5705c677288fe264113f87d15b0613 100644 (file)
 #include <dm.h>
 #include <i2c.h>
 #include <lcd.h>
-#include <mmc.h>
-#include <net.h>
-#include <netdev.h>
-#include <spi.h>
 #include <version.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/atmel_pio4.h>
 #include <asm/arch/atmel_mpddrc.h>
-#include <asm/arch/atmel_usba_udc.h>
 #include <asm/arch/atmel_sdhci.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/gpio.h>
@@ -118,22 +113,7 @@ void lcd_show_board_info(void)
 #endif /* CONFIG_LCD_INFO */
 #endif /* CONFIG_LCD */
 
-static void board_gmac_hw_init(void)
-{
-       atmel_pio4_set_f_periph(AT91_PIO_PORTB, 14, 0); /* GTXCK */
-       atmel_pio4_set_f_periph(AT91_PIO_PORTB, 15, 0); /* GTXEN */
-       atmel_pio4_set_f_periph(AT91_PIO_PORTB, 16, 0); /* GRXDV */
-       atmel_pio4_set_f_periph(AT91_PIO_PORTB, 17, 0); /* GRXER */
-       atmel_pio4_set_f_periph(AT91_PIO_PORTB, 18, 0); /* GRX0 */
-       atmel_pio4_set_f_periph(AT91_PIO_PORTB, 19, 0); /* GRX1 */
-       atmel_pio4_set_f_periph(AT91_PIO_PORTB, 20, 0); /* GTX0 */
-       atmel_pio4_set_f_periph(AT91_PIO_PORTB, 21, 0); /* GTX1 */
-       atmel_pio4_set_f_periph(AT91_PIO_PORTB, 22, 0); /* GMDC */
-       atmel_pio4_set_f_periph(AT91_PIO_PORTB, 23, 0); /* GMDIO */
-
-       at91_periph_clk_enable(ATMEL_ID_GMAC);
-}
-
+#ifdef CONFIG_DEBUG_UART_BOARD_INIT
 static void board_uart1_hw_init(void)
 {
        atmel_pio4_set_a_periph(AT91_PIO_PORTD, 2, 1);  /* URXD1 */
@@ -142,7 +122,6 @@ static void board_uart1_hw_init(void)
        at91_periph_clk_enable(ATMEL_ID_UART1);
 }
 
-#ifdef CONFIG_DEBUG_UART_BOARD_INIT
 void board_debug_uart_init(void)
 {
        board_uart1_hw_init();
@@ -154,8 +133,6 @@ int board_early_init_f(void)
 {
 #ifdef CONFIG_DEBUG_UART
        debug_uart_init();
-#else
-       board_uart1_hw_init();
 #endif
 
        return 0;
@@ -167,18 +144,12 @@ int board_init(void)
        /* address of boot parameters */
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
-#ifdef CONFIG_MACB
-       board_gmac_hw_init();
-#endif
 #ifdef CONFIG_LCD
        board_lcd_hw_init();
 #endif
 #ifdef CONFIG_CMD_USB
        board_usb_hw_init();
 #endif
-#ifdef CONFIG_USB_GADGET_ATMEL_USBA
-       at91_udp_hw_init();
-#endif
 
        return 0;
 }
@@ -190,24 +161,6 @@ int dram_init(void)
        return 0;
 }
 
-int board_eth_init(bd_t *bis)
-{
-       int rc = 0;
-
-#ifdef CONFIG_MACB
-       rc = macb_eth_initialize(0, (void *)ATMEL_BASE_GMAC, 0x00);
-#endif
-
-#ifdef CONFIG_USB_GADGET_ATMEL_USBA
-       usba_udc_probe(&pdata);
-#ifdef CONFIG_USB_ETH_RNDIS
-       usb_eth_initialize(bis);
-#endif
-#endif
-
-       return rc;
-}
-
 #ifdef CONFIG_CMD_I2C
 static int set_ethaddr_from_eeprom(void)
 {
index ffb4a50a72fe7c2ddac217105ffe57257afd8145..b2e79795f7f500087e02bce9d3f75771ae9bcd96 100644 (file)
@@ -230,7 +230,6 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2)
                    ATMEL_MPDDRC_CR_NR_ROW_14 |
                    ATMEL_MPDDRC_CR_CAS_DDR_CAS3 |
                    ATMEL_MPDDRC_CR_NB_8BANKS |
-                   ATMEL_MPDDRC_CR_NDQS_DISABLED |
                    ATMEL_MPDDRC_CR_DECOD_INTERLEAVED |
                    ATMEL_MPDDRC_CR_UNAL_SUPPORTED);
 
@@ -260,6 +259,8 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2)
 void mem_init(void)
 {
        struct atmel_mpddrc_config ddr2;
+       const struct atmel_mpddr *mpddr = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC;
+       u32 tmp;
 
        ddr2_conf(&ddr2);
 
@@ -267,6 +268,19 @@ void mem_init(void)
        at91_periph_clk_enable(ATMEL_ID_MPDDRC);
        at91_system_clk_enable(AT91_PMC_DDR);
 
+       tmp = ATMEL_MPDDRC_RD_DATA_PATH_SHIFT_ONE_CYCLE;
+       writel(tmp, &mpddr->rd_data_path);
+
+       tmp = readl(&mpddr->io_calibr);
+       tmp = (tmp & ~(ATMEL_MPDDRC_IO_CALIBR_RDIV |
+              ATMEL_MPDDRC_IO_CALIBR_TZQIO |
+              ATMEL_MPDDRC_IO_CALIBR_CALCODEP |
+              ATMEL_MPDDRC_IO_CALIBR_CALCODEN)) |
+              ATMEL_MPDDRC_IO_CALIBR_DDR2_RZQ_52 |
+              ATMEL_MPDDRC_IO_CALIBR_TZQIO_(8) |
+              ATMEL_MPDDRC_IO_CALIBR_EN_CALIB;
+       writel(tmp, &mpddr->io_calibr);
+
        /* DDRAM2 Controller initialize */
        ddr2_init(ATMEL_BASE_MPDDRC, ATMEL_BASE_DDRCS, &ddr2);
 }
index eeced7943ed4ffada3b1a2e429e56f80799bfef4..c0a8b6423ee1882ae044333515b3b0d757455aa9 100644 (file)
@@ -273,10 +273,6 @@ int board_mmc_init(bd_t *bis)
        return 0;
 }
 
-static iomux_v3_cfg_t const pwm_pad[] = {
-       MX6_PAD_SD1_CMD__PWM4_OUT | MUX_PAD_CTRL(OUTPUT_40OHM),
-};
-
 static void leds_on(void)
 {
        /* turn on all possible leds connected via GPIO expander */
index e90693feeaa4165cdf25884d4512ad011e960d7d..38577f30f15ab91a9dd68f59343cca8f711e4958 100644 (file)
@@ -632,7 +632,7 @@ void arch_preboot_os(void)
        leds_set_finish();
 }
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        int ret;
index 7b862355c8d2a469cf3be71c8d964f685215ab5f..0c647bbd3d45f93693cdcfeee765041689c0509b 100644 (file)
@@ -161,14 +161,7 @@ int dram_init(void)
  */
 static void read_hw_id(hw_id_t hw_id)
 {
-       int i;
-       for (i = 0; i < HW_ID_ELEM_COUNT; ++i)
-               if (i2c_read(CONFIG_SYS_I2C_EEPROM,
-                               hw_id_format[i].offset,
-                               2,
-                               (uchar *)&hw_id[i][0],
-                               hw_id_format[i].length) != 0)
-                       printf("ERROR: can't read HW ID from EEPROM\n");
+       printf("ERROR: can't read HW ID from EEPROM\n");
 }
 
 
@@ -221,7 +214,7 @@ static void compose_module_name(hw_id_t hw_id, char *buf)
        strcat(buf, tmp);
 }
 
-
+#if defined(CONFIG_SYS_I2C_SOFT)
 /*
  * Compose string with hostname.
  * buf is assumed to have enough space, and be null-terminated.
@@ -237,7 +230,7 @@ static void compose_hostname(hw_id_t hw_id, char *buf)
                *p = tolower(*p);
 
 }
-
+#endif
 
 #ifdef CONFIG_OF_BOARD_SETUP
 /*
@@ -270,15 +263,6 @@ int checkboard(void)
        hw_id_t hw_id_tmp;
        char module_name_tmp[MODULE_NAME_MAXLEN] = "";
 
-       /*
-        * We need I2C to access HW ID data from EEPROM, so we call i2c_init()
-        * here despite the fact that it will be called again later on. We
-        * also use a little trick to silence I2C-related output.
-        */
-       gd->flags |= GD_FLG_SILENT;
-       i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-       gd->flags &= ~GD_FLG_SILENT;
-
        read_hw_id(hw_id_tmp);
        identify_module(hw_id_tmp);     /* this sets gd->board_type */
        compose_module_name(hw_id_tmp, module_name_tmp);
@@ -311,7 +295,7 @@ int board_early_init_r(void)
 #ifdef CONFIG_MISC_INIT_R
 int misc_init_r(void)
 {
-#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C_SOFT)
+#if defined(CONFIG_SYS_I2C_SOFT)
        uchar buf[6];
        char str[18];
        char hostname[MODULE_NAME_MAXLEN];
@@ -334,16 +318,16 @@ int misc_init_r(void)
                        " device at address %02X:%04X\n", CONFIG_SYS_I2C_EEPROM,
                        CONFIG_MAC_OFFSET);
        }
-#endif /* defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C_SOFT) */
-       if (!getenv("ethaddr"))
-               printf(LOG_PREFIX "MAC address not set, networking is not "
-                                       "operational\n");
-
-       /* set the hostname appropriate to the module we're running on */
        hostname[0] = 0x00;
+       /* set the hostname appropriate to the module we're running on */
        compose_hostname(hw_id, hostname);
        setenv("hostname", hostname);
 
+#endif /* defined(CONFIG_SYS_I2C_SOFT) */
+       if (!getenv("ethaddr"))
+               printf(LOG_PREFIX "MAC address not set, networking is not "
+                                       "operational\n");
+
        return 0;
 }
 #endif /* CONFIG_MISC_INIT_R */
index 9c40ad7b2a2c9fe885916529ab4e0e39090a9142..60097dc8c7d21a9c41f2cfbe07f793e2bc54b11d 100644 (file)
 
 #ifdef CONFIG_CMD_BSP
 
-static int do_i2c_test(char * const argv[])
-{
-       unsigned char temp, temp1;
-
-       printf("Starting I2C Test\n"
-               "Please set Jumper:\nI2C SDA 2-3\nI2C SCL 2-3\n\n"
-               "Please press any key to start\n\n");
-       getc();
-
-       temp = 0xf0; /* set io 0-4 as output */
-       i2c_write(CONFIG_SYS_I2C_IO, 3, 1, (uchar *)&temp, 1);
-
-       printf("Press I2C4-7. LED I2C0-3 should have the same state\n\n"
-               "Press any key to stop\n\n");
-
-       while (!tstc()) {
-               i2c_read(CONFIG_SYS_I2C_IO, 0, 1, (uchar *)&temp, 1);
-               temp1 = (temp >> 4) & 0x03;
-               temp1 |= (temp >> 3) & 0x08; /* S302 -> LED303 */
-               temp1 |= (temp >> 5) & 0x04; /* S303 -> LED302 */
-               temp = temp1;
-               i2c_write(CONFIG_SYS_I2C_IO, 1, 1, (uchar *)&temp, 1);
-       }
-       getc();
-
-       return 0;
-}
-
 static int do_usb_test(char * const argv[])
 {
        int i;
@@ -387,9 +359,7 @@ static int cmd_fkt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
        switch (argc) {
        case 2:
-               if (strncmp(argv[1], "i2c", 3) == 0)
-                       rcode = do_i2c_test(argv);
-               else if (strncmp(argv[1], "led", 3) == 0)
+               if (strncmp(argv[1], "led", 3) == 0)
                        rcode = do_led_test(argv);
                else if (strncmp(argv[1], "usb", 3) == 0)
                        rcode = do_usb_test(argv);
index 4701b71102579b1f82de9275fc87cdaeb90650ba..389eebb58917986212d4a429410eadbb8fda0d2b 100644 (file)
@@ -33,7 +33,7 @@ int board_init(void)
        return 0;
 }
 
-#ifdef CONFIG_GENERIC_MMC
+#ifdef CONFIG_MMC
 #define SB_SOM_CD_GPIO 187
 #define SB_SOM_WP_GPIO 188
 
@@ -51,7 +51,7 @@ int board_mmc_init(bd_t *bis)
 
        return ret0 && ret1;
 }
-#endif /* CONFIG_GENERIC_MMC */
+#endif /* CONFIG_MMC */
 
 int misc_init_r(void)
 {
index 2d9dd9d808b01758042d4bebc949fbe0d126806b..f1691257e77fdaaee03c0f6542bd60d6b2365226 100644 (file)
@@ -372,7 +372,7 @@ void set_muxconf_regs(void)
                cm_t3730_set_muxconf();
 }
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 #define SB_T35_WP_GPIO 59
 
 int board_mmc_getcd(struct mmc *mmc)
@@ -391,7 +391,7 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 void board_mmc_power_init(void)
 {
        twl4030_power_mmc_init(0);
index b55ded054af79a2a025d6217c8060db796a1c469..38eb641bc42464d4e82ac1f9c5f09b833c1a565c 100644 (file)
@@ -115,7 +115,7 @@ int misc_init_r(void)
        return 0;
 }
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 #define SB_T35_CD_GPIO 144
 #define SB_T35_WP_GPIO 59
 
index 7b58fcd21f4ab1197245c167a4f45d163e92095b..6437718415362a3ae0ad6c9531160f5d52fb5300 100644 (file)
@@ -96,7 +96,7 @@ uint mmc_get_env_part(struct mmc *mmc)
 }
 #endif
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 #define SB_T54_CD_GPIO 228
 #define SB_T54_WP_GPIO 229
 
@@ -181,7 +181,7 @@ int board_eth_init(bd_t *bis)
 }
 #endif
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 static struct omap_usbhs_board_data usbhs_bdata = {
        .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_HSIC,
diff --git a/board/comtrend/ar5387un/Kconfig b/board/comtrend/ar5387un/Kconfig
new file mode 100644 (file)
index 0000000..45ab7e2
--- /dev/null
@@ -0,0 +1,12 @@
+if BOARD_COMTREND_AR5387UN
+
+config SYS_BOARD
+       default "ar5387un"
+
+config SYS_VENDOR
+       default "comtrend"
+
+config SYS_CONFIG_NAME
+       default "comtrend_ar5387un"
+
+endif
diff --git a/board/comtrend/ar5387un/MAINTAINERS b/board/comtrend/ar5387un/MAINTAINERS
new file mode 100644 (file)
index 0000000..bcaac64
--- /dev/null
@@ -0,0 +1,6 @@
+COMTREND AR-5387UN BOARD
+M:     Álvaro Fernández Rojas <noltari@gmail.com>
+S:     Maintained
+F:     board/comtrend/ar-5387un/
+F:     include/configs/comtrend_ar5387un.h
+F:     configs/comtrend_ar5387un_ram_defconfig
diff --git a/board/comtrend/ar5387un/Makefile b/board/comtrend/ar5387un/Makefile
new file mode 100644 (file)
index 0000000..9de1cd2
--- /dev/null
@@ -0,0 +1,5 @@
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+obj-y += ar-5387un.o
diff --git a/board/comtrend/ar5387un/ar-5387un.c b/board/comtrend/ar5387un/ar-5387un.c
new file mode 100644 (file)
index 0000000..d181ca6
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
diff --git a/board/comtrend/vr3032u/Kconfig b/board/comtrend/vr3032u/Kconfig
new file mode 100644 (file)
index 0000000..6f552cf
--- /dev/null
@@ -0,0 +1,12 @@
+if BOARD_COMTREND_VR3032U
+
+config SYS_BOARD
+       default "vr3032u"
+
+config SYS_VENDOR
+       default "comtrend"
+
+config SYS_CONFIG_NAME
+       default "comtrend_vr3032u"
+
+endif
diff --git a/board/comtrend/vr3032u/MAINTAINERS b/board/comtrend/vr3032u/MAINTAINERS
new file mode 100644 (file)
index 0000000..833d7da
--- /dev/null
@@ -0,0 +1,6 @@
+COMTREND VR-3032U BOARD
+M:     Álvaro Fernández Rojas <noltari@gmail.com>
+S:     Maintained
+F:     board/comtrend/vr-3032u/
+F:     include/configs/comtrend_vr-3032u.h
+F:     configs/comtrend_vr3032u_ram_defconfig
diff --git a/board/comtrend/vr3032u/Makefile b/board/comtrend/vr3032u/Makefile
new file mode 100644 (file)
index 0000000..9e62031
--- /dev/null
@@ -0,0 +1,5 @@
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+obj-y += vr-3032u.o
diff --git a/board/comtrend/vr3032u/vr-3032u.c b/board/comtrend/vr3032u/vr-3032u.c
new file mode 100644 (file)
index 0000000..d181ca6
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
index a4a602943ed26f1b5fdec2e77ace05ea2c0312b9..24956a8a94e515e43c261e5aa8f9902e7bd87536 100644 (file)
@@ -71,6 +71,7 @@ static iomux_v3_cfg_t const uart2_pads[] = {
        IOMUX_PADS(PAD_EIM_D27__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL)),
 };
 
+#ifndef CONFIG_SPL_BUILD
 static iomux_v3_cfg_t const usdhc2_pads[] = {
        IOMUX_PADS(PAD_SD2_CLK__SD2_CLK   | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
        IOMUX_PADS(PAD_SD2_CMD__SD2_CMD   | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
@@ -94,6 +95,7 @@ static iomux_v3_cfg_t const usdhc3_pads[] = {
        IOMUX_PADS(PAD_SD3_DAT7__SD3_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
        IOMUX_PADS(PAD_SD3_RST__SD3_RESET | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
 };
+#endif
 
 static iomux_v3_cfg_t const usdhc4_pads[] = {
        IOMUX_PADS(PAD_SD4_CLK__SD4_CLK   | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
index 48d65e8b4fb8b44e2c6e98fbe5d46aaf31dc2181..730b8cac7319dd4a2160c4c19fd823aa822dd166 100644 (file)
@@ -140,14 +140,14 @@ void set_muxconf_regs(void)
        MUX_TRICORDER();
 }
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 void board_mmc_power_init(void)
 {
        twl4030_power_mmc_init(0);
index e3441cad4eda99e928c82eff26cd4e02c5e35486..e389819e9d642e243c0f79fef23ca77e203e37c9 100644 (file)
@@ -29,9 +29,6 @@ int misc_init_r(void)
 {
        u32 tmp;
 
-       /* we use I2C-2 for on-board eeprom */
-       i2c_set_bus_num(2);
-
        tmp = in_be32((u32*)CONFIG_SYS_ARIA_FPGA_BASE);
        printf("FPGA:  %u-%u.%u.%u\n",
                (tmp & 0xFF000000) >> 24,
index 7d0de1d0fa51719fc590215b8062299f2e790413..0935abfd42abe27117087b190a5fb72251dc9dc6 100644 (file)
@@ -22,4 +22,6 @@ config SYS_VENDOR
 config SYS_CONFIG_NAME
        default "omapl138_lcdk"
 
+source "board/ti/common/Kconfig"
+
 endif
index 66dc407baeb616f6965d18094cf471935dd1af8e..78a6b66110144b348ac3204e287b664625a4cf5b 100644 (file)
@@ -18,17 +18,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int eeprom_write_enable(unsigned dev_addr, int state)
 {
-       volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
-
-       if (dev_addr != CONFIG_SYS_I2C_EEPROM_ADDR)
-               return -1;
-
-       if (state == 0)
-               setbits_be32(&im->gpio.gpdat, 0x00100000);
-       else
-               clrbits_be32(&im->gpio.gpdat, 0x00100000);
-
-       return 0;
+       return -ENOSYS;
 }
 
 int board_early_init_f(void)
index 92a83849ac1632550b2ed2b64dfbf503c90121d3..89e033e1c592a0421cb5dc4d109b706192ca64cd 100644 (file)
@@ -83,7 +83,6 @@ CONFIG_MCFTMR         -- define to use DMA timer
 CONFIG_MCFPIT          -- define to use PIT timer
 
 CONFIG_SYS_I2C_FSL     -- define to use FSL common I2C driver
-CONFIG_HARD_I2C                -- define for I2C hardware support
 CONFIG_SYS_I2C_SOFT    -- define for I2C bit-banged
 CONFIG_SYS_I2C_SPEED           -- define for I2C speed
 CONFIG_SYS_I2C_SLAVE           -- define for I2C slave address
index 071701d23436caeeb5f1ef68bbae4be724c7f3a6..099decabb89292a1a823596d3fd71d957ee214cb 100644 (file)
@@ -31,7 +31,7 @@ typedef volatile unsigned short FLASH_PORT_WIDTHV;
 ulong flash_get_size(FPWV * addr, flash_info_t * info);
 int flash_get_offsets(ulong base, flash_info_t * info);
 int write_word(flash_info_t * info, FPWV * dest, u16 data);
-void inline spin_wheel(void);
+static inline void spin_wheel(void);
 
 flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];
 
@@ -439,7 +439,7 @@ int write_word(flash_info_t * info, FPWV * dest, u16 data)
        return (res);
 }
 
-void inline spin_wheel(void)
+static inline void spin_wheel(void)
 {
        static int p = 0;
        static char w[] = "\\/-";
index 224e79c46aa3ca94e2310b44f41250c2516a1d28..2fca12c4170613f9f64d185534145e7f7b1badf2 100644 (file)
@@ -91,7 +91,6 @@ CONFIG_MCFTMR                 -- define to use DMA timer
 CONFIG_MCFPIT                  -- define to use PIT timer
 
 CONFIG_SYS_I2C_FSL             -- define to use FSL common I2C driver
-CONFIG_HARD_I2C                        -- define for I2C hardware support
 CONFIG_SYS_I2C_SOFT            -- define for I2C bit-banged
 CONFIG_SYS_I2C_SPEED           -- define for I2C speed
 CONFIG_SYS_I2C_SLAVE           -- define for I2C slave address
index 582e0c3d9e7fb1df86347aec297c1767bb97869f..757f0abdd74481a94498343297f31d48bc731984 100644 (file)
@@ -90,7 +90,6 @@ CONFIG_MCFTMR         -- define to use DMA timer
 CONFIG_MCFPIT          -- define to use PIT timer
 
 CONFIG_SYS_I2C_FSL     -- define to use FSL common I2C driver
-CONFIG_HARD_I2C                -- define for I2C hardware support
 CONFIG_SYS_I2C_SOFT    -- define for I2C bit-banged
 CONFIG_SYS_I2C_SPEED           -- define for I2C speed
 CONFIG_SYS_I2C_SLAVE           -- define for I2C slave address
index c563ad99a7cc93183b269b9e56ac0b8598628959..4a8719333ac5f8de9f3ff583e8ac111af97bc30e 100644 (file)
@@ -113,7 +113,6 @@ CONFIG_MCFTMR               -- define to use DMA timer
 CONFIG_MCFPIT          -- define to use PIT timer
 
 CONFIG_SYS_FSL_I2C     -- define to use FSL common I2C driver
-CONFIG_HARD_I2C                -- define for I2C hardware support
 CONFIG_SYS_I2C_SOFT    -- define for I2C bit-banged
 CONFIG_SYS_I2C_SPEED           -- define for I2C speed
 CONFIG_SYS_I2C_SLAVE           -- define for I2C slave address
index 30c5dedafe69728069be142ea8cff69658f9f2f5..ce7b27b8b2d399eff6875afd00cd771df39b3384 100644 (file)
@@ -98,7 +98,6 @@ CONFIG_DOS_PARTITION  -- enable DOS read/write
 CONFIG_SLTTMR          -- define to use SLT timer
 
 CONFIG_SYS_I2C_FSL     -- define to use FSL common I2C driver
-CONFIG_HARD_I2C                -- define for I2C hardware support
 CONFIG_SYS_I2C_SOFT    -- define for I2C bit-banged
 CONFIG_SYS_I2C_SPEED           -- define for I2C speed
 CONFIG_SYS_I2C_SLAVE           -- define for I2C slave address
index f87579f19372fa946d27438301397d86b64d6d11..d729056fd0fa145d8fe8133fa5fabe560502951d 100644 (file)
@@ -174,27 +174,6 @@ int dram_init(void)
 
 int misc_init_r(void)
 {
-       u8 tmp_val;
-
-       /* Using this for DIU init before the driver in linux takes over
-        *  Enable the TFP410 Encoder (I2C address 0x38)
-        */
-
-       i2c_set_bus_num(2);
-       tmp_val = 0xBF;
-       i2c_write(0x38, 0x08, 1, &tmp_val, sizeof(tmp_val));
-       /* Verify if enabled */
-       tmp_val = 0;
-       i2c_read(0x38, 0x08, 1, &tmp_val, sizeof(tmp_val));
-       debug("DVI Encoder Read: 0x%02x\n", tmp_val);
-
-       tmp_val = 0x10;
-       i2c_write(0x38, 0x0A, 1, &tmp_val, sizeof(tmp_val));
-       /* Verify if enabled */
-       tmp_val = 0;
-       i2c_read(0x38, 0x0A, 1, &tmp_val, sizeof(tmp_val));
-       debug("DVI Encoder Read: 0x%02x\n", tmp_val);
-
        return 0;
 }
 
diff --git a/board/freescale/mx6sabresd/mx6dlsabresd.cfg b/board/freescale/mx6sabresd/mx6dlsabresd.cfg
deleted file mode 100644 (file)
index be9f87f..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (C) 2014 Freescale Semiconductor, Inc.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- *
- * Refer doc/README.imximage for more details about how-to configure
- * and create imximage boot image
- *
- * The syntax is taken as close as possible with the kwbimage
- */
-
-/* image version */
-
-IMAGE_VERSION 2
-
-/*
- * Boot Device : one of
- * spi, sd (the board has no nand neither onenand)
- */
-
-BOOT_FROM      sd
-
-/*
- * Device Configuration Data (DCD)
- *
- * Each entry must have the format:
- * Addr-type           Address        Value
- *
- * where:
- *     Addr-type register length (1,2 or 4 bytes)
- *     Address   absolute address of the register
- *     value     value to be stored in the register
- */
-DATA 4 0x020e0774 0x000C0000
-DATA 4 0x020e0754 0x00000000
-DATA 4 0x020e04ac 0x00000030
-DATA 4 0x020e04b0 0x00000030
-DATA 4 0x020e0464 0x00000030
-DATA 4 0x020e0490 0x00000030
-DATA 4 0x020e074c 0x00000030
-DATA 4 0x020e0494 0x00000030
-DATA 4 0x020e04a0 0x00000000
-DATA 4 0x020e04b4 0x00000030
-DATA 4 0x020e04b8 0x00000030
-DATA 4 0x020e076c 0x00000030
-DATA 4 0x020e0750 0x00020000
-DATA 4 0x020e04bc 0x00000030
-DATA 4 0x020e04c0 0x00000030
-DATA 4 0x020e04c4 0x00000030
-DATA 4 0x020e04c8 0x00000030
-DATA 4 0x020e04cc 0x00000030
-DATA 4 0x020e04d0 0x00000030
-DATA 4 0x020e04d4 0x00000030
-DATA 4 0x020e04d8 0x00000030
-DATA 4 0x020e0760 0x00020000
-DATA 4 0x020e0764 0x00000030
-DATA 4 0x020e0770 0x00000030
-DATA 4 0x020e0778 0x00000030
-DATA 4 0x020e077c 0x00000030
-DATA 4 0x020e0780 0x00000030
-DATA 4 0x020e0784 0x00000030
-DATA 4 0x020e078c 0x00000030
-DATA 4 0x020e0748 0x00000030
-DATA 4 0x020e0470 0x00000030
-DATA 4 0x020e0474 0x00000030
-DATA 4 0x020e0478 0x00000030
-DATA 4 0x020e047c 0x00000030
-DATA 4 0x020e0480 0x00000030
-DATA 4 0x020e0484 0x00000030
-DATA 4 0x020e0488 0x00000030
-DATA 4 0x020e048c 0x00000030
-DATA 4 0x021b0800 0xa1390003
-DATA 4 0x021b080c 0x001F001F
-DATA 4 0x021b0810 0x001F001F
-DATA 4 0x021b480c 0x001F001F
-DATA 4 0x021b4810 0x001F001F
-DATA 4 0x021b083c 0x4220021F
-DATA 4 0x021b0840 0x0207017E
-DATA 4 0x021b483c 0x4201020C
-DATA 4 0x021b4840 0x01660172
-DATA 4 0x021b0848 0x4A4D4E4D
-DATA 4 0x021b4848 0x4A4F5049
-DATA 4 0x021b0850 0x3F3C3D31
-DATA 4 0x021b4850 0x3238372B
-DATA 4 0x021b081c 0x33333333
-DATA 4 0x021b0820 0x33333333
-DATA 4 0x021b0824 0x33333333
-DATA 4 0x021b0828 0x33333333
-DATA 4 0x021b481c 0x33333333
-DATA 4 0x021b4820 0x33333333
-DATA 4 0x021b4824 0x33333333
-DATA 4 0x021b4828 0x33333333
-DATA 4 0x021b08b8 0x00000800
-DATA 4 0x021b48b8 0x00000800
-DATA 4 0x021b0004 0x0002002D
-DATA 4 0x021b0008 0x00333030
-DATA 4 0x021b000c 0x3F435313
-DATA 4 0x021b0010 0xB66E8B63
-DATA 4 0x021b0014 0x01FF00DB
-DATA 4 0x021b0018 0x00001740
-DATA 4 0x021b001c 0x00008000
-DATA 4 0x021b002c 0x000026d2
-DATA 4 0x021b0030 0x00431023
-DATA 4 0x021b0040 0x00000027
-DATA 4 0x021b0000 0x831A0000
-DATA 4 0x021b001c 0x04008032
-DATA 4 0x021b001c 0x00008033
-DATA 4 0x021b001c 0x00048031
-DATA 4 0x021b001c 0x05208030
-DATA 4 0x021b001c 0x04008040
-DATA 4 0x021b0020 0x00005800
-DATA 4 0x021b0818 0x00011117
-DATA 4 0x021b4818 0x00011117
-DATA 4 0x021b0004 0x0002556D
-DATA 4 0x021b0404 0x00011006
-DATA 4 0x021b001c 0x00000000
-
-/* set the default clock gate to save power */
-DATA 4 0x020c4068 0x00C03F3F
-DATA 4 0x020c406c 0x0030FC03
-DATA 4 0x020c4070 0x0FFFC000
-DATA 4 0x020c4074 0x3FF00000
-DATA 4 0x020c4078 0x00FFF300
-DATA 4 0x020c407c 0x0F0000C3
-DATA 4 0x020c4080 0x000003FF
-
-/* enable AXI cache for VDOA/VPU/IPU */
-DATA 4 0x020e0010 0xF00000CF
-/* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */
-DATA 4 0x020e0018 0x007F007F
-DATA 4 0x020e001c 0x007F007F
diff --git a/board/freescale/mx6sabresd/mx6q_4x_mt41j128.cfg b/board/freescale/mx6sabresd/mx6q_4x_mt41j128.cfg
deleted file mode 100644 (file)
index bb6c60b..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (C) 2011 Freescale Semiconductor, Inc.
- * Jason Liu <r64343@freescale.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- *
- * Refer doc/README.imximage for more details about how-to configure
- * and create imximage boot image
- *
- * The syntax is taken as close as possible with the kwbimage
- */
-
-/* image version */
-IMAGE_VERSION 2
-
-/*
- * Boot Device : one of
- * spi, sd (the board has no nand neither onenand)
- */
-BOOT_FROM      sd
-
-/*
- * Device Configuration Data (DCD)
- *
- * Each entry must have the format:
- * Addr-type           Address        Value
- *
- * where:
- *      Addr-type register length (1,2 or 4 bytes)
- *      Address   absolute address of the register
- *      value     value to be stored in the register
- */
-DATA 4 0x020e05a8 0x00000030
-DATA 4 0x020e05b0 0x00000030
-DATA 4 0x020e0524 0x00000030
-DATA 4 0x020e051c 0x00000030
-
-DATA 4 0x020e0518 0x00000030
-DATA 4 0x020e050c 0x00000030
-DATA 4 0x020e05b8 0x00000030
-DATA 4 0x020e05c0 0x00000030
-
-DATA 4 0x020e05ac 0x00020030
-DATA 4 0x020e05b4 0x00020030
-DATA 4 0x020e0528 0x00020030
-DATA 4 0x020e0520 0x00020030
-
-DATA 4 0x020e0514 0x00020030
-DATA 4 0x020e0510 0x00020030
-DATA 4 0x020e05bc 0x00020030
-DATA 4 0x020e05c4 0x00020030
-
-DATA 4 0x020e056c 0x00020030
-DATA 4 0x020e0578 0x00020030
-DATA 4 0x020e0588 0x00020030
-DATA 4 0x020e0594 0x00020030
-
-DATA 4 0x020e057c 0x00020030
-DATA 4 0x020e0590 0x00003000
-DATA 4 0x020e0598 0x00003000
-DATA 4 0x020e058c 0x00000000
-
-DATA 4 0x020e059c 0x00003030
-DATA 4 0x020e05a0 0x00003030
-DATA 4 0x020e0784 0x00000030
-DATA 4 0x020e0788 0x00000030
-
-DATA 4 0x020e0794 0x00000030
-DATA 4 0x020e079c 0x00000030
-DATA 4 0x020e07a0 0x00000030
-DATA 4 0x020e07a4 0x00000030
-
-DATA 4 0x020e07a8 0x00000030
-DATA 4 0x020e0748 0x00000030
-DATA 4 0x020e074c 0x00000030
-DATA 4 0x020e0750 0x00020000
-
-DATA 4 0x020e0758 0x00000000
-DATA 4 0x020e0774 0x00020000
-DATA 4 0x020e078c 0x00000030
-DATA 4 0x020e0798 0x000C0000
-
-DATA 4 0x021b081c 0x33333333
-DATA 4 0x021b0820 0x33333333
-DATA 4 0x021b0824 0x33333333
-DATA 4 0x021b0828 0x33333333
-
-DATA 4 0x021b481c 0x33333333
-DATA 4 0x021b4820 0x33333333
-DATA 4 0x021b4824 0x33333333
-DATA 4 0x021b4828 0x33333333
-
-DATA 4 0x021b0018 0x00081740
-
-DATA 4 0x021b001c 0x00008000
-DATA 4 0x021b000c 0x555A7974
-DATA 4 0x021b0010 0xDB538F64
-DATA 4 0x021b0014 0x01FF00DB
-DATA 4 0x021b002c 0x000026D2
-
-DATA 4 0x021b0030 0x005A1023
-DATA 4 0x021b0008 0x09444040
-DATA 4 0x021b0004 0x00025576
-DATA 4 0x021b0040 0x00000027
-DATA 4 0x021b0000 0x831A0000
-
-DATA 4 0x021b001c 0x04088032
-DATA 4 0x021b001c 0x0408803A
-DATA 4 0x021b001c 0x00008033
-DATA 4 0x021b001c 0x0000803B
-DATA 4 0x021b001c 0x00428031
-DATA 4 0x021b001c 0x00428039
-DATA 4 0x021b001c 0x19308030
-DATA 4 0x021b001c 0x19308038
-
-DATA 4 0x021b001c 0x04008040
-DATA 4 0x021b001c 0x04008048
-DATA 4 0x021b0800 0xA1380003
-DATA 4 0x021b4800 0xA1380003
-DATA 4 0x021b0020 0x00005800
-DATA 4 0x021b0818 0x00022227
-DATA 4 0x021b4818 0x00022227
-
-DATA 4 0x021b083c 0x434B0350
-DATA 4 0x021b0840 0x034C0359
-DATA 4 0x021b483c 0x434B0350
-DATA 4 0x021b4840 0x03650348
-DATA 4 0x021b0848 0x4436383B
-DATA 4 0x021b4848 0x39393341
-DATA 4 0x021b0850 0x35373933
-DATA 4 0x021b4850 0x48254A36
-
-DATA 4 0x021b080c 0x001F001F
-DATA 4 0x021b0810 0x001F001F
-
-DATA 4 0x021b480c 0x00440044
-DATA 4 0x021b4810 0x00440044
-
-DATA 4 0x021b08b8 0x00000800
-DATA 4 0x021b48b8 0x00000800
-
-DATA 4 0x021b001c 0x00000000
-DATA 4 0x021b0404 0x00011006
-
-/* set the default clock gate to save power */
-DATA 4 0x020c4068 0x00C03F3F
-DATA 4 0x020c406c 0x0030FC03
-DATA 4 0x020c4070 0x0FFFC000
-DATA 4 0x020c4074 0x3FF00000
-DATA 4 0x020c4078 0x00FFF300
-DATA 4 0x020c407c 0x0F0000C3
-DATA 4 0x020c4080 0x000003FF
-
-/* enable AXI cache for VDOA/VPU/IPU */
-DATA 4 0x020e0010 0xF00000CF
-/* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */
-DATA 4 0x020e0018 0x007F007F
-DATA 4 0x020e001c 0x007F007F
-
-/*
- * Setup CCM_CCOSR register as follows:
- *
- * cko1_en  = 1           --> CKO1 enabled
- * cko1_div = 111  --> divide by 8
- * cko1_sel = 1011 --> ahb_clk_root
- *
- * This sets CKO1 at ahb_clk_root/8 = 132/8 = 16.5 MHz
- */
-DATA 4 0x020c4060 0x000000fb
index 80a77892c9a1b3e1736f41abe81f9bf4c5e11e37..f4a5d9cff95e1473068b93dc94e942db57947fed 100644 (file)
@@ -28,7 +28,6 @@
 #include <power/pmic.h>
 #include <power/pfuze100_pmic.h>
 #include "../common/pfuze.h"
-#include <asm/arch/mx6-ddr.h>
 #include <usb.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -66,33 +65,33 @@ int dram_init(void)
 }
 
 static iomux_v3_cfg_t const uart1_pads[] = {
-       MX6_PAD_CSI0_DAT10__UART1_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
-       MX6_PAD_CSI0_DAT11__UART1_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
+       IOMUX_PADS(PAD_CSI0_DAT10__UART1_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL)),
+       IOMUX_PADS(PAD_CSI0_DAT11__UART1_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL)),
 };
 
 static iomux_v3_cfg_t const enet_pads[] = {
-       MX6_PAD_ENET_MDIO__ENET_MDIO            | MUX_PAD_CTRL(ENET_PAD_CTRL),
-       MX6_PAD_ENET_MDC__ENET_MDC              | MUX_PAD_CTRL(ENET_PAD_CTRL),
-       MX6_PAD_RGMII_TXC__RGMII_TXC    | MUX_PAD_CTRL(ENET_PAD_CTRL),
-       MX6_PAD_RGMII_TD0__RGMII_TD0    | MUX_PAD_CTRL(ENET_PAD_CTRL),
-       MX6_PAD_RGMII_TD1__RGMII_TD1    | MUX_PAD_CTRL(ENET_PAD_CTRL),
-       MX6_PAD_RGMII_TD2__RGMII_TD2    | MUX_PAD_CTRL(ENET_PAD_CTRL),
-       MX6_PAD_RGMII_TD3__RGMII_TD3    | MUX_PAD_CTRL(ENET_PAD_CTRL),
-       MX6_PAD_RGMII_TX_CTL__RGMII_TX_CTL      | MUX_PAD_CTRL(ENET_PAD_CTRL),
-       MX6_PAD_ENET_REF_CLK__ENET_TX_CLK       | MUX_PAD_CTRL(ENET_PAD_CTRL),
-       MX6_PAD_RGMII_RXC__RGMII_RXC    | MUX_PAD_CTRL(ENET_PAD_CTRL),
-       MX6_PAD_RGMII_RD0__RGMII_RD0    | MUX_PAD_CTRL(ENET_PAD_CTRL),
-       MX6_PAD_RGMII_RD1__RGMII_RD1    | MUX_PAD_CTRL(ENET_PAD_CTRL),
-       MX6_PAD_RGMII_RD2__RGMII_RD2    | MUX_PAD_CTRL(ENET_PAD_CTRL),
-       MX6_PAD_RGMII_RD3__RGMII_RD3    | MUX_PAD_CTRL(ENET_PAD_CTRL),
-       MX6_PAD_RGMII_RX_CTL__RGMII_RX_CTL      | MUX_PAD_CTRL(ENET_PAD_CTRL),
+       IOMUX_PADS(PAD_ENET_MDIO__ENET_MDIO     | MUX_PAD_CTRL(ENET_PAD_CTRL)),
+       IOMUX_PADS(PAD_ENET_MDC__ENET_MDC       | MUX_PAD_CTRL(ENET_PAD_CTRL)),
+       IOMUX_PADS(PAD_RGMII_TXC__RGMII_TXC     | MUX_PAD_CTRL(ENET_PAD_CTRL)),
+       IOMUX_PADS(PAD_RGMII_TD0__RGMII_TD0     | MUX_PAD_CTRL(ENET_PAD_CTRL)),
+       IOMUX_PADS(PAD_RGMII_TD1__RGMII_TD1     | MUX_PAD_CTRL(ENET_PAD_CTRL)),
+       IOMUX_PADS(PAD_RGMII_TD2__RGMII_TD2     | MUX_PAD_CTRL(ENET_PAD_CTRL)),
+       IOMUX_PADS(PAD_RGMII_TD3__RGMII_TD3     | MUX_PAD_CTRL(ENET_PAD_CTRL)),
+       IOMUX_PADS(PAD_RGMII_TX_CTL__RGMII_TX_CTL       | MUX_PAD_CTRL(ENET_PAD_CTRL)),
+       IOMUX_PADS(PAD_ENET_REF_CLK__ENET_TX_CLK        | MUX_PAD_CTRL(ENET_PAD_CTRL)),
+       IOMUX_PADS(PAD_RGMII_RXC__RGMII_RXC     | MUX_PAD_CTRL(ENET_PAD_CTRL)),
+       IOMUX_PADS(PAD_RGMII_RD0__RGMII_RD0     | MUX_PAD_CTRL(ENET_PAD_CTRL)),
+       IOMUX_PADS(PAD_RGMII_RD1__RGMII_RD1     | MUX_PAD_CTRL(ENET_PAD_CTRL)),
+       IOMUX_PADS(PAD_RGMII_RD2__RGMII_RD2     | MUX_PAD_CTRL(ENET_PAD_CTRL)),
+       IOMUX_PADS(PAD_RGMII_RD3__RGMII_RD3     | MUX_PAD_CTRL(ENET_PAD_CTRL)),
+       IOMUX_PADS(PAD_RGMII_RX_CTL__RGMII_RX_CTL       | MUX_PAD_CTRL(ENET_PAD_CTRL)),
        /* AR8031 PHY Reset */
-       MX6_PAD_ENET_CRS_DV__GPIO1_IO25         | MUX_PAD_CTRL(NO_PAD_CTRL),
+       IOMUX_PADS(PAD_ENET_CRS_DV__GPIO1_IO25  | MUX_PAD_CTRL(NO_PAD_CTRL)),
 };
 
 static void setup_iomux_enet(void)
 {
-       imx_iomux_v3_setup_multiple_pads(enet_pads, ARRAY_SIZE(enet_pads));
+       SETUP_IOMUX_PADS(enet_pads);
 
        /* Reset AR8031 PHY */
        gpio_direction_output(IMX_GPIO_NR(1, 25) , 0);
@@ -102,98 +101,98 @@ static void setup_iomux_enet(void)
 }
 
 static iomux_v3_cfg_t const usdhc2_pads[] = {
-       MX6_PAD_SD2_CLK__SD2_CLK        | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD2_CMD__SD2_CMD        | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD2_DAT0__SD2_DATA0     | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD2_DAT1__SD2_DATA1     | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD2_DAT2__SD2_DATA2     | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD2_DAT3__SD2_DATA3     | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_NANDF_D4__SD2_DATA4     | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_NANDF_D5__SD2_DATA5     | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_NANDF_D6__SD2_DATA6     | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_NANDF_D7__SD2_DATA7     | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_NANDF_D2__GPIO2_IO02    | MUX_PAD_CTRL(NO_PAD_CTRL), /* CD */
+       IOMUX_PADS(PAD_SD2_CLK__SD2_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD2_CMD__SD2_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD2_DAT0__SD2_DATA0      | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD2_DAT1__SD2_DATA1      | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD2_DAT2__SD2_DATA2      | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD2_DAT3__SD2_DATA3      | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_NANDF_D4__SD2_DATA4      | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_NANDF_D5__SD2_DATA5      | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_NANDF_D6__SD2_DATA6      | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_NANDF_D7__SD2_DATA7      | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_NANDF_D2__GPIO2_IO02     | MUX_PAD_CTRL(NO_PAD_CTRL)), /* CD */
 };
 
 static iomux_v3_cfg_t const usdhc3_pads[] = {
-       MX6_PAD_SD3_CLK__SD3_CLK   | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD3_CMD__SD3_CMD   | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD3_DAT0__SD3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD3_DAT1__SD3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD3_DAT2__SD3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD3_DAT3__SD3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD3_DAT4__SD3_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD3_DAT5__SD3_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD3_DAT6__SD3_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD3_DAT7__SD3_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_NANDF_D0__GPIO2_IO00    | MUX_PAD_CTRL(NO_PAD_CTRL), /* CD */
+       IOMUX_PADS(PAD_SD3_CLK__SD3_CLK   | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD3_CMD__SD3_CMD   | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD3_DAT0__SD3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD3_DAT1__SD3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD3_DAT2__SD3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD3_DAT3__SD3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD3_DAT4__SD3_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD3_DAT5__SD3_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD3_DAT6__SD3_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD3_DAT7__SD3_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_NANDF_D0__GPIO2_IO00    | MUX_PAD_CTRL(NO_PAD_CTRL)), /* CD */
 };
 
 static iomux_v3_cfg_t const usdhc4_pads[] = {
-       MX6_PAD_SD4_CLK__SD4_CLK   | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD4_CMD__SD4_CMD   | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD4_DAT0__SD4_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD4_DAT1__SD4_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD4_DAT2__SD4_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD4_DAT3__SD4_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD4_DAT4__SD4_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD4_DAT5__SD4_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD4_DAT6__SD4_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX6_PAD_SD4_DAT7__SD4_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+       IOMUX_PADS(PAD_SD4_CLK__SD4_CLK   | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD4_CMD__SD4_CMD   | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD4_DAT0__SD4_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD4_DAT1__SD4_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD4_DAT2__SD4_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD4_DAT3__SD4_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD4_DAT4__SD4_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD4_DAT5__SD4_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD4_DAT6__SD4_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+       IOMUX_PADS(PAD_SD4_DAT7__SD4_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
 };
 
 static iomux_v3_cfg_t const ecspi1_pads[] = {
-       MX6_PAD_KEY_COL0__ECSPI1_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL),
-       MX6_PAD_KEY_COL1__ECSPI1_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL),
-       MX6_PAD_KEY_ROW0__ECSPI1_MOSI | MUX_PAD_CTRL(SPI_PAD_CTRL),
-       MX6_PAD_KEY_ROW1__GPIO4_IO09 | MUX_PAD_CTRL(NO_PAD_CTRL),
+       IOMUX_PADS(PAD_KEY_COL0__ECSPI1_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL)),
+       IOMUX_PADS(PAD_KEY_COL1__ECSPI1_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL)),
+       IOMUX_PADS(PAD_KEY_ROW0__ECSPI1_MOSI | MUX_PAD_CTRL(SPI_PAD_CTRL)),
+       IOMUX_PADS(PAD_KEY_ROW1__GPIO4_IO09 | MUX_PAD_CTRL(NO_PAD_CTRL)),
 };
 
 static iomux_v3_cfg_t const rgb_pads[] = {
-       MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DI0_PIN15__IPU1_DI0_PIN15 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DI0_PIN2__IPU1_DI0_PIN02 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DI0_PIN3__IPU1_DI0_PIN03 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DI0_PIN4__IPU1_DI0_PIN04 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT0__IPU1_DISP0_DATA00 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT1__IPU1_DISP0_DATA01 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT2__IPU1_DISP0_DATA02 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT3__IPU1_DISP0_DATA03 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT4__IPU1_DISP0_DATA04 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT5__IPU1_DISP0_DATA05 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT6__IPU1_DISP0_DATA06 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT7__IPU1_DISP0_DATA07 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT8__IPU1_DISP0_DATA08 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT9__IPU1_DISP0_DATA09 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT10__IPU1_DISP0_DATA10 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT11__IPU1_DISP0_DATA11 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT12__IPU1_DISP0_DATA12 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT13__IPU1_DISP0_DATA13 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT14__IPU1_DISP0_DATA14 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT15__IPU1_DISP0_DATA15 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT16__IPU1_DISP0_DATA16 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT17__IPU1_DISP0_DATA17 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT18__IPU1_DISP0_DATA18 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT19__IPU1_DISP0_DATA19 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT20__IPU1_DISP0_DATA20 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT21__IPU1_DISP0_DATA21 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT22__IPU1_DISP0_DATA22 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_DISP0_DAT23__IPU1_DISP0_DATA23 | MUX_PAD_CTRL(NO_PAD_CTRL),
+       IOMUX_PADS(PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DI0_PIN15__IPU1_DI0_PIN15 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DI0_PIN2__IPU1_DI0_PIN02 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DI0_PIN3__IPU1_DI0_PIN03 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DI0_PIN4__IPU1_DI0_PIN04 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT0__IPU1_DISP0_DATA00 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT1__IPU1_DISP0_DATA01 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT2__IPU1_DISP0_DATA02 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT3__IPU1_DISP0_DATA03 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT4__IPU1_DISP0_DATA04 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT5__IPU1_DISP0_DATA05 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT6__IPU1_DISP0_DATA06 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT7__IPU1_DISP0_DATA07 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT8__IPU1_DISP0_DATA08 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT9__IPU1_DISP0_DATA09 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT10__IPU1_DISP0_DATA10 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT11__IPU1_DISP0_DATA11 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT12__IPU1_DISP0_DATA12 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT13__IPU1_DISP0_DATA13 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT14__IPU1_DISP0_DATA14 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT15__IPU1_DISP0_DATA15 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT16__IPU1_DISP0_DATA16 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT17__IPU1_DISP0_DATA17 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT18__IPU1_DISP0_DATA18 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT19__IPU1_DISP0_DATA19 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT20__IPU1_DISP0_DATA20 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT21__IPU1_DISP0_DATA21 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT22__IPU1_DISP0_DATA22 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_DISP0_DAT23__IPU1_DISP0_DATA23 | MUX_PAD_CTRL(NO_PAD_CTRL)),
 };
 
 static iomux_v3_cfg_t const bl_pads[] = {
-       MX6_PAD_SD1_DAT3__GPIO1_IO21 | MUX_PAD_CTRL(NO_PAD_CTRL),
+       IOMUX_PADS(PAD_SD1_DAT3__GPIO1_IO21 | MUX_PAD_CTRL(NO_PAD_CTRL)),
 };
 
 static void enable_backlight(void)
 {
-       imx_iomux_v3_setup_multiple_pads(bl_pads, ARRAY_SIZE(bl_pads));
+       SETUP_IOMUX_PADS(bl_pads);
        gpio_direction_output(DISP0_PWR_EN, 1);
 }
 
 static void enable_rgb(struct display_info_t const *dev)
 {
-       imx_iomux_v3_setup_multiple_pads(rgb_pads, ARRAY_SIZE(rgb_pads));
+       SETUP_IOMUX_PADS(rgb_pads);
        enable_backlight();
 }
 
@@ -202,43 +201,56 @@ static void enable_lvds(struct display_info_t const *dev)
        enable_backlight();
 }
 
-static struct i2c_pads_info i2c_pad_info1 = {
+static struct i2c_pads_info mx6q_i2c_pad_info1 = {
+       .scl = {
+               .i2c_mode = MX6Q_PAD_KEY_COL3__I2C2_SCL | I2C_PAD,
+               .gpio_mode = MX6Q_PAD_KEY_COL3__GPIO4_IO12 | I2C_PAD,
+               .gp = IMX_GPIO_NR(4, 12)
+       },
+       .sda = {
+               .i2c_mode = MX6Q_PAD_KEY_ROW3__I2C2_SDA | I2C_PAD,
+               .gpio_mode = MX6Q_PAD_KEY_ROW3__GPIO4_IO13 | I2C_PAD,
+               .gp = IMX_GPIO_NR(4, 13)
+       }
+};
+
+static struct i2c_pads_info mx6dl_i2c_pad_info1 = {
        .scl = {
-               .i2c_mode = MX6_PAD_KEY_COL3__I2C2_SCL | I2C_PAD,
-               .gpio_mode = MX6_PAD_KEY_COL3__GPIO4_IO12 | I2C_PAD,
+               .i2c_mode = MX6DL_PAD_KEY_COL3__I2C2_SCL | I2C_PAD,
+               .gpio_mode = MX6DL_PAD_KEY_COL3__GPIO4_IO12 | I2C_PAD,
                .gp = IMX_GPIO_NR(4, 12)
        },
        .sda = {
-               .i2c_mode = MX6_PAD_KEY_ROW3__I2C2_SDA | I2C_PAD,
-               .gpio_mode = MX6_PAD_KEY_ROW3__GPIO4_IO13 | I2C_PAD,
+               .i2c_mode = MX6DL_PAD_KEY_ROW3__I2C2_SDA | I2C_PAD,
+               .gpio_mode = MX6DL_PAD_KEY_ROW3__GPIO4_IO13 | I2C_PAD,
                .gp = IMX_GPIO_NR(4, 13)
        }
 };
 
 static void setup_spi(void)
 {
-       imx_iomux_v3_setup_multiple_pads(ecspi1_pads, ARRAY_SIZE(ecspi1_pads));
+       SETUP_IOMUX_PADS(ecspi1_pads);
 }
 
 iomux_v3_cfg_t const pcie_pads[] = {
-       MX6_PAD_EIM_D19__GPIO3_IO19 | MUX_PAD_CTRL(NO_PAD_CTRL),        /* POWER */
-       MX6_PAD_GPIO_17__GPIO7_IO12 | MUX_PAD_CTRL(NO_PAD_CTRL),        /* RESET */
+       IOMUX_PADS(PAD_EIM_D19__GPIO3_IO19 | MUX_PAD_CTRL(NO_PAD_CTRL)),        /* POWER */
+       IOMUX_PADS(PAD_GPIO_17__GPIO7_IO12 | MUX_PAD_CTRL(NO_PAD_CTRL)),        /* RESET */
 };
 
 static void setup_pcie(void)
 {
-       imx_iomux_v3_setup_multiple_pads(pcie_pads, ARRAY_SIZE(pcie_pads));
+       SETUP_IOMUX_PADS(pcie_pads);
 }
 
 iomux_v3_cfg_t const di0_pads[] = {
-       MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK,        /* DISP0_CLK */
-       MX6_PAD_DI0_PIN2__IPU1_DI0_PIN02,               /* DISP0_HSYNC */
-       MX6_PAD_DI0_PIN3__IPU1_DI0_PIN03,               /* DISP0_VSYNC */
+       IOMUX_PADS(PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK),        /* DISP0_CLK */
+       IOMUX_PADS(PAD_DI0_PIN2__IPU1_DI0_PIN02),               /* DISP0_HSYNC */
+       IOMUX_PADS(PAD_DI0_PIN3__IPU1_DI0_PIN03),               /* DISP0_VSYNC */
 };
 
 static void setup_iomux_uart(void)
 {
-       imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
+       SETUP_IOMUX_PADS(uart1_pads);
 }
 
 #ifdef CONFIG_FSL_ESDHC
@@ -292,20 +304,17 @@ int board_mmc_init(bd_t *bis)
        for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) {
                switch (i) {
                case 0:
-                       imx_iomux_v3_setup_multiple_pads(
-                               usdhc2_pads, ARRAY_SIZE(usdhc2_pads));
+                       SETUP_IOMUX_PADS(usdhc2_pads);
                        gpio_direction_input(USDHC2_CD_GPIO);
                        usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
                        break;
                case 1:
-                       imx_iomux_v3_setup_multiple_pads(
-                               usdhc3_pads, ARRAY_SIZE(usdhc3_pads));
+                       SETUP_IOMUX_PADS(usdhc3_pads);
                        gpio_direction_input(USDHC3_CD_GPIO);
                        usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
                        break;
                case 2:
-                       imx_iomux_v3_setup_multiple_pads(
-                               usdhc4_pads, ARRAY_SIZE(usdhc4_pads));
+                       SETUP_IOMUX_PADS(usdhc4_pads);
                        usdhc_cfg[2].sdhc_clk = mxc_get_clock(MXC_ESDHC4_CLK);
                        break;
                default:
@@ -335,22 +344,19 @@ int board_mmc_init(bd_t *bis)
 
        switch (reg & 0x3) {
        case 0x1:
-               imx_iomux_v3_setup_multiple_pads(
-                       usdhc2_pads, ARRAY_SIZE(usdhc2_pads));
+               SETUP_IOMUX_PADS(usdhc2_pads);
                usdhc_cfg[0].esdhc_base = USDHC2_BASE_ADDR;
                usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
                gd->arch.sdhc_clk = usdhc_cfg[0].sdhc_clk;
                break;
        case 0x2:
-               imx_iomux_v3_setup_multiple_pads(
-                       usdhc3_pads, ARRAY_SIZE(usdhc3_pads));
+               SETUP_IOMUX_PADS(usdhc3_pads);
                usdhc_cfg[0].esdhc_base = USDHC3_BASE_ADDR;
                usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
                gd->arch.sdhc_clk = usdhc_cfg[0].sdhc_clk;
                break;
        case 0x3:
-               imx_iomux_v3_setup_multiple_pads(
-                       usdhc4_pads, ARRAY_SIZE(usdhc4_pads));
+               SETUP_IOMUX_PADS(usdhc4_pads);
                usdhc_cfg[0].esdhc_base = USDHC4_BASE_ADDR;
                usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC4_CLK);
                gd->arch.sdhc_clk = usdhc_cfg[0].sdhc_clk;
@@ -484,7 +490,7 @@ static void setup_display(void)
        int reg;
 
        /* Setup HSYNC, VSYNC, DISP_CLK for debugging purposes */
-       imx_iomux_v3_setup_multiple_pads(di0_pads, ARRAY_SIZE(di0_pads));
+       SETUP_IOMUX_PADS(di0_pads);
 
        enable_ipu_clock();
        imx_setup_hdmi();
@@ -555,18 +561,17 @@ int board_eth_init(bd_t *bis)
 #define UCTRL_PWR_POL          (1 << 9)
 
 static iomux_v3_cfg_t const usb_otg_pads[] = {
-       MX6_PAD_EIM_D22__USB_OTG_PWR | MUX_PAD_CTRL(NO_PAD_CTRL),
-       MX6_PAD_ENET_RX_ER__USB_OTG_ID | MUX_PAD_CTRL(NO_PAD_CTRL),
+       IOMUX_PADS(PAD_EIM_D22__USB_OTG_PWR | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_ENET_RX_ER__USB_OTG_ID | MUX_PAD_CTRL(NO_PAD_CTRL)),
 };
 
 static iomux_v3_cfg_t const usb_hc1_pads[] = {
-       MX6_PAD_ENET_TXD1__GPIO1_IO29 | MUX_PAD_CTRL(NO_PAD_CTRL),
+       IOMUX_PADS(PAD_ENET_TXD1__GPIO1_IO29 | MUX_PAD_CTRL(NO_PAD_CTRL)),
 };
 
 static void setup_usb(void)
 {
-       imx_iomux_v3_setup_multiple_pads(usb_otg_pads,
-                                        ARRAY_SIZE(usb_otg_pads));
+       SETUP_IOMUX_PADS(usb_otg_pads);
 
        /*
         * set daisy chain for otg_pin_id on 6q.
@@ -574,8 +579,7 @@ static void setup_usb(void)
         */
        imx_iomux_set_gpr_register(1, 13, 1, 0);
 
-       imx_iomux_v3_setup_multiple_pads(usb_hc1_pads,
-                                        ARRAY_SIZE(usb_hc1_pads));
+       SETUP_IOMUX_PADS(usb_hc1_pads);
 }
 
 int board_ehci_hcd_init(int port)
@@ -631,8 +635,10 @@ int board_init(void)
 #ifdef CONFIG_MXC_SPI
        setup_spi();
 #endif
-       setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
-
+       if (is_mx6dq() || is_mx6dqp())
+               setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c_pad_info1);
+       else
+               setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info1);
 #ifdef CONFIG_USB_EHCI_MX6
        setup_usb();
 #endif
@@ -714,6 +720,7 @@ int checkboard(void)
 }
 
 #ifdef CONFIG_SPL_BUILD
+#include <asm/arch/mx6-ddr.h>
 #include <spl.h>
 #include <libfdt.h>
 
@@ -939,6 +946,92 @@ static int mx6qp_dcd_table[] = {
        0x021b001c, 0x00000000,
 };
 
+static int mx6dl_dcd_table[] = {
+       0x020e0774, 0x000C0000,
+       0x020e0754, 0x00000000,
+       0x020e04ac, 0x00000030,
+       0x020e04b0, 0x00000030,
+       0x020e0464, 0x00000030,
+       0x020e0490, 0x00000030,
+       0x020e074c, 0x00000030,
+       0x020e0494, 0x00000030,
+       0x020e04a0, 0x00000000,
+       0x020e04b4, 0x00000030,
+       0x020e04b8, 0x00000030,
+       0x020e076c, 0x00000030,
+       0x020e0750, 0x00020000,
+       0x020e04bc, 0x00000030,
+       0x020e04c0, 0x00000030,
+       0x020e04c4, 0x00000030,
+       0x020e04c8, 0x00000030,
+       0x020e04cc, 0x00000030,
+       0x020e04d0, 0x00000030,
+       0x020e04d4, 0x00000030,
+       0x020e04d8, 0x00000030,
+       0x020e0760, 0x00020000,
+       0x020e0764, 0x00000030,
+       0x020e0770, 0x00000030,
+       0x020e0778, 0x00000030,
+       0x020e077c, 0x00000030,
+       0x020e0780, 0x00000030,
+       0x020e0784, 0x00000030,
+       0x020e078c, 0x00000030,
+       0x020e0748, 0x00000030,
+       0x020e0470, 0x00000030,
+       0x020e0474, 0x00000030,
+       0x020e0478, 0x00000030,
+       0x020e047c, 0x00000030,
+       0x020e0480, 0x00000030,
+       0x020e0484, 0x00000030,
+       0x020e0488, 0x00000030,
+       0x020e048c, 0x00000030,
+       0x021b0800, 0xa1390003,
+       0x021b080c, 0x001F001F,
+       0x021b0810, 0x001F001F,
+       0x021b480c, 0x001F001F,
+       0x021b4810, 0x001F001F,
+       0x021b083c, 0x4220021F,
+       0x021b0840, 0x0207017E,
+       0x021b483c, 0x4201020C,
+       0x021b4840, 0x01660172,
+       0x021b0848, 0x4A4D4E4D,
+       0x021b4848, 0x4A4F5049,
+       0x021b0850, 0x3F3C3D31,
+       0x021b4850, 0x3238372B,
+       0x021b081c, 0x33333333,
+       0x021b0820, 0x33333333,
+       0x021b0824, 0x33333333,
+       0x021b0828, 0x33333333,
+       0x021b481c, 0x33333333,
+       0x021b4820, 0x33333333,
+       0x021b4824, 0x33333333,
+       0x021b4828, 0x33333333,
+       0x021b08b8, 0x00000800,
+       0x021b48b8, 0x00000800,
+       0x021b0004, 0x0002002D,
+       0x021b0008, 0x00333030,
+       0x021b000c, 0x3F435313,
+       0x021b0010, 0xB66E8B63,
+       0x021b0014, 0x01FF00DB,
+       0x021b0018, 0x00001740,
+       0x021b001c, 0x00008000,
+       0x021b002c, 0x000026d2,
+       0x021b0030, 0x00431023,
+       0x021b0040, 0x00000027,
+       0x021b0000, 0x831A0000,
+       0x021b001c, 0x04008032,
+       0x021b001c, 0x00008033,
+       0x021b001c, 0x00048031,
+       0x021b001c, 0x05208030,
+       0x021b001c, 0x04008040,
+       0x021b0020, 0x00005800,
+       0x021b0818, 0x00011117,
+       0x021b4818, 0x00011117,
+       0x021b0004, 0x0002556D,
+       0x021b0404, 0x00011006,
+       0x021b001c, 0x00000000,
+};
+
 static void ddr_init(int *table, int size)
 {
        int i;
@@ -953,6 +1046,8 @@ static void spl_dram_init(void)
                ddr_init(mx6q_dcd_table, ARRAY_SIZE(mx6q_dcd_table));
        else if (is_mx6dqp())
                ddr_init(mx6qp_dcd_table, ARRAY_SIZE(mx6qp_dcd_table));
+       else if (is_mx6sdl())
+               ddr_init(mx6dl_dcd_table, ARRAY_SIZE(mx6dl_dcd_table));
 }
 
 void board_init_f(ulong dummy)
index d49543315b92a7e44933952714211bcc25c0c7de..228514b106a8dacba1d6f88b0c9aed7c03df7399 100644 (file)
@@ -66,6 +66,7 @@ static iomux_v3_cfg_t const uart1_pads[] = {
        MX6_PAD_UART1_RXD__UART1_RXD | MUX_PAD_CTRL(UART_PAD_CTRL),
 };
 
+#ifdef CONFIG_SPL_BUILD
 static iomux_v3_cfg_t const usdhc1_pads[] = {
        /* 8 bit SD */
        MX6_PAD_SD1_CLK__USDHC1_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL),
@@ -106,6 +107,7 @@ static iomux_v3_cfg_t const usdhc3_pads[] = {
        /*CD pin*/
        MX6_PAD_REF_CLK_32K__GPIO_3_22 | MUX_PAD_CTRL(NO_PAD_CTRL),
 };
+#endif
 
 static iomux_v3_cfg_t const fec_pads[] = {
        MX6_PAD_FEC_MDC__FEC_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL),
index b28ce104958945c2be1a1d65771d5a2d4a151936..a5746fe08688d5752bf1d69cff465a355404d6da 100644 (file)
@@ -225,6 +225,7 @@ static iomux_v3_cfg_t const uart1_pads[] = {
        MX6_PAD_UART1_RX_DATA__UART1_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
 };
 
+#ifndef CONFIG_SPL_BUILD
 static iomux_v3_cfg_t const usdhc1_pads[] = {
        MX6_PAD_SD1_CLK__USDHC1_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL),
        MX6_PAD_SD1_CMD__USDHC1_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL),
@@ -240,6 +241,7 @@ static iomux_v3_cfg_t const usdhc1_pads[] = {
        /* RST_B */
        MX6_PAD_GPIO1_IO09__GPIO1_IO09 | MUX_PAD_CTRL(NO_PAD_CTRL),
 };
+#endif
 
 /*
  * mx6ul_14x14_evk board default supports sd card. If want to use
index 6ccdd4b33b223e44bcd693572bdeb2e39205b8bd..ecea5a529aa8f560ac70f5a53f54a92ee55af8ad 100644 (file)
 #include <i2c.h>
 #include <asm/imx-common/mxc_i2c.h>
 #include <asm/arch/crm_regs.h>
-#include <usb.h>
-#include <usb/ehci-ci.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
 #define UART_PAD_CTRL  (PAD_CTL_DSE_3P3V_49OHM | \
        PAD_CTL_PUS_PU100KOHM | PAD_CTL_HYS)
 
-#define USDHC_PAD_CTRL (PAD_CTL_DSE_3P3V_32OHM | PAD_CTL_SRE_SLOW | \
-       PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PUS_PU47KOHM)
-
 #define ENET_PAD_CTRL  (PAD_CTL_PUS_PU100KOHM | PAD_CTL_DSE_3P3V_49OHM)
 #define ENET_PAD_CTRL_MII  (PAD_CTL_DSE_3P3V_32OHM)
 
 #define ENET_RX_PAD_CTRL  (PAD_CTL_PUS_PU100KOHM | PAD_CTL_DSE_3P3V_49OHM)
 
-#define I2C_PAD_CTRL    (PAD_CTL_DSE_3P3V_32OHM | PAD_CTL_SRE_SLOW | \
-       PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PUS_PU100KOHM)
-
 #define LCD_PAD_CTRL    (PAD_CTL_HYS | PAD_CTL_PUS_PU100KOHM | \
        PAD_CTL_DSE_3P3V_49OHM)
 
@@ -54,23 +46,8 @@ DECLARE_GLOBAL_DATA_PTR;
   (PAD_CTL_HYS | PAD_CTL_DSE_3P3V_49OHM | PAD_CTL_SRE_FAST)
 
 #define NAND_PAD_READY0_CTRL (PAD_CTL_DSE_3P3V_49OHM | PAD_CTL_PUS_PU5KOHM)
-#ifdef CONFIG_SYS_I2C_MXC
-#define PC MUX_PAD_CTRL(I2C_PAD_CTRL)
-/* I2C1 for PMIC */
-static struct i2c_pads_info i2c_pad_info1 = {
-       .scl = {
-               .i2c_mode = MX7D_PAD_I2C1_SCL__I2C1_SCL | PC,
-               .gpio_mode = MX7D_PAD_I2C1_SCL__GPIO4_IO8 | PC,
-               .gp = IMX_GPIO_NR(4, 8),
-       },
-       .sda = {
-               .i2c_mode = MX7D_PAD_I2C1_SDA__I2C1_SDA | PC,
-               .gpio_mode = MX7D_PAD_I2C1_SDA__GPIO4_IO9 | PC,
-               .gp = IMX_GPIO_NR(4, 9),
-       },
-};
-#endif
 
+#ifdef CONFIG_MXC_SPI
 static iomux_v3_cfg_t const ecspi3_pads[] = {
     MX7D_PAD_SAI2_RX_DATA__ECSPI3_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL),
     MX7D_PAD_SAI2_TX_SYNC__ECSPI3_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL),
@@ -87,6 +64,7 @@ static void setup_spi(void)
 {
          imx_iomux_v3_setup_multiple_pads(ecspi3_pads, ARRAY_SIZE(ecspi3_pads));
 }
+#endif
 
 int dram_init(void)
 {
@@ -104,130 +82,6 @@ static iomux_v3_cfg_t const uart1_pads[] = {
        MX7D_PAD_UART1_RX_DATA__UART1_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
 };
 
-static iomux_v3_cfg_t const usdhc1_pads[] = {
-       MX7D_PAD_SD1_CLK__SD1_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD1_CMD__SD1_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD1_DATA0__SD1_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD1_DATA1__SD1_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD1_DATA2__SD1_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD1_DATA3__SD1_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-
-       MX7D_PAD_SD1_CD_B__GPIO5_IO0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD1_RESET_B__GPIO5_IO2 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-};
-
-static iomux_v3_cfg_t const usdhc3_emmc_pads[] = {
-       MX7D_PAD_SD3_CLK__SD3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_CMD__SD3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_DATA0__SD3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_DATA1__SD3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_DATA2__SD3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_DATA3__SD3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_DATA4__SD3_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_DATA5__SD3_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_DATA6__SD3_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_DATA7__SD3_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_STROBE__SD3_STROBE  | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-
-       MX7D_PAD_SD3_RESET_B__GPIO6_IO11 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-};
-
-static iomux_v3_cfg_t const usb_otg1_pads[] = {
-       MX7D_PAD_GPIO1_IO05__USB_OTG1_PWR | MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-
-static iomux_v3_cfg_t const usb_otg2_pads[] = {
-       MX7D_PAD_UART3_CTS_B__USB_OTG2_PWR | MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-
-#define IOX_SDI IMX_GPIO_NR(1, 9)
-#define IOX_STCP IMX_GPIO_NR(1, 12)
-#define IOX_SHCP IMX_GPIO_NR(1, 13)
-
-static iomux_v3_cfg_t const iox_pads[] = {
-       /* IOX_SDI */
-       MX7D_PAD_GPIO1_IO09__GPIO1_IO9  | MUX_PAD_CTRL(NO_PAD_CTRL),
-       /* IOX_STCP */
-       MX7D_PAD_GPIO1_IO12__GPIO1_IO12 | MUX_PAD_CTRL(NO_PAD_CTRL),
-       /* IOX_SHCP */
-       MX7D_PAD_GPIO1_IO13__GPIO1_IO13 | MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-
-/*
- * PCIE_DIS_B --> Q0
- * PCIE_RST_B --> Q1
- * HDMI_RST_B --> Q2
- * PERI_RST_B --> Q3
- * SENSOR_RST_B --> Q4
- * ENET_RST_B --> Q5
- * PERI_3V3_EN --> Q6
- * LCD_PWR_EN --> Q7
- */
-enum qn {
-       PCIE_DIS_B,
-       PCIE_RST_B,
-       HDMI_RST_B,
-       PERI_RST_B,
-       SENSOR_RST_B,
-       ENET_RST_B,
-       PERI_3V3_EN,
-       LCD_PWR_EN,
-};
-
-enum qn_func {
-       qn_reset,
-       qn_enable,
-       qn_disable,
-};
-
-enum qn_level {
-       qn_low = 0,
-       qn_high = 1,
-};
-
-static enum qn_level seq[3][2] = {
-       {0, 1}, {1, 1}, {0, 0}
-};
-
-static enum qn_func qn_output[8] = {
-       qn_disable, qn_reset, qn_reset, qn_reset, qn_reset, qn_reset, qn_enable,
-       qn_disable
-};
-
-static void iox74lv_init(void)
-{
-       int i;
-
-       for (i = 7; i >= 0; i--) {
-               gpio_direction_output(IOX_SHCP, 0);
-               gpio_direction_output(IOX_SDI, seq[qn_output[i]][0]);
-               udelay(500);
-               gpio_direction_output(IOX_SHCP, 1);
-               udelay(500);
-       }
-
-       gpio_direction_output(IOX_STCP, 0);
-       udelay(500);
-       /*
-         * shift register will be output to pins
-         */
-       gpio_direction_output(IOX_STCP, 1);
-
-       for (i = 7; i >= 0; i--) {
-               gpio_direction_output(IOX_SHCP, 0);
-               gpio_direction_output(IOX_SDI, seq[qn_output[i]][1]);
-               udelay(500);
-               gpio_direction_output(IOX_SHCP, 1);
-               udelay(500);
-       }
-       gpio_direction_output(IOX_STCP, 0);
-       udelay(500);
-       /*
-         * shift register will be output to pins
-         */
-       gpio_direction_output(IOX_STCP, 1);
-};
-
 #ifdef CONFIG_NAND_MXS
 static iomux_v3_cfg_t const gpmi_pads[] = {
        MX7D_PAD_SD3_DATA0__NAND_DATA00 | MUX_PAD_CTRL(NAND_PAD_CTRL),
@@ -306,11 +160,13 @@ static int setup_lcd(void)
        imx_iomux_v3_setup_multiple_pads(pwm_pads, ARRAY_SIZE(pwm_pads));
 
        /* Reset LCD */
+       gpio_request(IMX_GPIO_NR(3, 4), "lcd reset");
        gpio_direction_output(IMX_GPIO_NR(3, 4) , 0);
        udelay(500);
        gpio_direction_output(IMX_GPIO_NR(3, 4) , 1);
 
        /* Set Brightness to high */
+       gpio_request(IMX_GPIO_NR(1, 1), "lcd backlight");
        gpio_direction_output(IMX_GPIO_NR(1, 1) , 1);
 
        return 0;
@@ -346,17 +202,6 @@ static void setup_iomux_uart(void)
        imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
 }
 
-#ifdef CONFIG_FSL_ESDHC
-
-#define USDHC1_CD_GPIO IMX_GPIO_NR(5, 0)
-#define USDHC1_PWR_GPIO        IMX_GPIO_NR(5, 2)
-#define USDHC3_PWR_GPIO IMX_GPIO_NR(6, 11)
-
-static struct fsl_esdhc_cfg usdhc_cfg[3] = {
-       {USDHC1_BASE_ADDR, 0, 4},
-       {USDHC3_BASE_ADDR},
-};
-
 int board_mmc_get_env_dev(int devno)
 {
        if (devno == 2)
@@ -365,7 +210,7 @@ int board_mmc_get_env_dev(int devno)
        return devno;
 }
 
-static int mmc_map_to_kernel_blk(int dev_no)
+int mmc_map_to_kernel_blk(int dev_no)
 {
        if (dev_no == 1)
                dev_no++;
@@ -373,106 +218,27 @@ static int mmc_map_to_kernel_blk(int dev_no)
        return dev_no;
 }
 
-int board_mmc_getcd(struct mmc *mmc)
+#ifdef CONFIG_FEC_MXC
+int board_eth_init(bd_t *bis)
 {
-       struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
-       int ret = 0;
-
-       switch (cfg->esdhc_base) {
-       case USDHC1_BASE_ADDR:
-               ret = !gpio_get_value(USDHC1_CD_GPIO);
-               break;
-       case USDHC3_BASE_ADDR:
-               ret = 1; /* Assume uSDHC3 emmc is always present */
-               break;
-       }
-
-       return ret;
-}
+       int ret;
+       unsigned int gpio;
 
-int board_mmc_init(bd_t *bis)
-{
-       int i, ret;
-       /*
-        * According to the board_mmc_init() the following map is done:
-        * (U-Boot device node)    (Physical Port)
-        * mmc0                    USDHC1
-        * mmc2                    USDHC3 (eMMC)
-        */
-       for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) {
-               switch (i) {
-               case 0:
-                       imx_iomux_v3_setup_multiple_pads(
-                               usdhc1_pads, ARRAY_SIZE(usdhc1_pads));
-                       gpio_request(USDHC1_CD_GPIO, "usdhc1_cd");
-                       gpio_direction_input(USDHC1_CD_GPIO);
-                       gpio_request(USDHC1_PWR_GPIO, "usdhc1_pwr");
-                       gpio_direction_output(USDHC1_PWR_GPIO, 0);
-                       udelay(500);
-                       gpio_direction_output(USDHC1_PWR_GPIO, 1);
-                       usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
-                       break;
-               case 1:
-                       imx_iomux_v3_setup_multiple_pads(
-                               usdhc3_emmc_pads, ARRAY_SIZE(usdhc3_emmc_pads));
-                       gpio_request(USDHC3_PWR_GPIO, "usdhc3_pwr");
-                       gpio_direction_output(USDHC3_PWR_GPIO, 0);
-                       udelay(500);
-                       gpio_direction_output(USDHC3_PWR_GPIO, 1);
-                       usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
-                       break;
-               default:
-                       printf("Warning: you configured more USDHC controllers"
-                               "(%d) than supported by the board\n", i + 1);
-                       return -EINVAL;
-                       }
-
-                       ret = fsl_esdhc_initialize(bis, &usdhc_cfg[i]);
-                       if (ret)
-                               return ret;
+       ret = gpio_lookup_name("gpio_spi@0_5", NULL, NULL, &gpio);
+       if (ret) {
+               printf("GPIO: 'gpio_spi@0_5' not found\n");
+               return -ENODEV;
        }
 
-       return 0;
-}
-
-static int check_mmc_autodetect(void)
-{
-       char *autodetect_str = getenv("mmcautodetect");
-
-       if ((autodetect_str != NULL) &&
-               (strcmp(autodetect_str, "yes") == 0)) {
-               return 1;
+       ret = gpio_request(gpio, "fec_rst");
+       if (ret && ret != -EBUSY) {
+               printf("gpio: requesting pin %u failed\n", gpio);
+               return ret;
        }
 
-       return 0;
-}
-
-static void mmc_late_init(void)
-{
-       char cmd[32];
-       char mmcblk[32];
-       u32 dev_no = mmc_get_env_dev();
-
-       if (!check_mmc_autodetect())
-               return;
-
-       setenv_ulong("mmcdev", dev_no);
-
-       /* Set mmcblk env */
-       sprintf(mmcblk, "/dev/mmcblk%dp2 rootwait rw",
-               mmc_map_to_kernel_blk(dev_no));
-       setenv("mmcroot", mmcblk);
-
-       sprintf(cmd, "mmc dev %d", dev_no);
-       run_command(cmd, 0);
-}
-
-#endif
-
-#ifdef CONFIG_FEC_MXC
-int board_eth_init(bd_t *bis)
-{
-       int ret;
+       gpio_direction_output(gpio, 0);
+       udelay(500);
+       gpio_direction_output(gpio, 1);
 
        setup_iomux_fec();
 
@@ -539,12 +305,6 @@ int board_early_init_f(void)
 {
        setup_iomux_uart();
 
-       setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
-       imx_iomux_v3_setup_multiple_pads(usb_otg1_pads,
-                                        ARRAY_SIZE(usb_otg1_pads));
-       imx_iomux_v3_setup_multiple_pads(usb_otg2_pads,
-                                        ARRAY_SIZE(usb_otg2_pads));
-
        return 0;
 }
 
@@ -553,10 +313,6 @@ int board_init(void)
        /* address of boot parameters */
        gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
-       imx_iomux_v3_setup_multiple_pads(iox_pads, ARRAY_SIZE(iox_pads));
-
-       iox74lv_init();
-
 #ifdef CONFIG_FEC_MXC
        setup_fec();
 #endif
@@ -580,29 +336,23 @@ int board_init(void)
        return 0;
 }
 
-#ifdef CONFIG_POWER
-#define I2C_PMIC       0
+#ifdef CONFIG_DM_PMIC
 int power_init_board(void)
 {
-       struct pmic *p;
-       int ret;
-       unsigned int reg, rev_id;
+       struct udevice *dev;
+       int ret, dev_id, rev_id;
 
-       ret = power_pfuze3000_init(I2C_PMIC);
-       if (ret)
-               return ret;
-
-       p = pmic_get("PFUZE3000");
-       ret = pmic_probe(p);
-       if (ret)
+       ret = pmic_get("pfuze3000", &dev);
+       if (ret == -ENODEV)
+               return 0;
+       if (ret != 0)
                return ret;
 
-       pmic_reg_read(p, PFUZE3000_DEVICEID, &reg);
-       pmic_reg_read(p, PFUZE3000_REVID, &rev_id);
-       printf("PMIC: PFUZE3000 DEV_ID=0x%x REV_ID=0x%x\n", reg, rev_id);
+       dev_id = pmic_reg_read(dev, PFUZE3000_DEVICEID);
+       rev_id = pmic_reg_read(dev, PFUZE3000_REVID);
+       printf("PMIC: PFUZE3000 DEV_ID=0x%x REV_ID=0x%x\n", dev_id, rev_id);
 
-       /* disable Low Power Mode during standby mode */
-       pmic_reg_write(p, PFUZE3000_LDOGCTL, 0x1);
+       pmic_clrsetbits(dev, PFUZE3000_LDOGCTL, 0, 1);
 
        return 0;
 }
@@ -612,10 +362,6 @@ int board_late_init(void)
 {
        struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
 
-#ifdef CONFIG_ENV_IS_IN_MMC
-       mmc_late_init();
-#endif
-
        imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
 
        set_wdog_reset(wdog);
@@ -642,13 +388,3 @@ int checkboard(void)
 
        return 0;
 }
-
-#ifdef CONFIG_USB_EHCI_MX7
-int board_usb_phy_mode(int port)
-{
-       if (port == 0)
-               return USB_INIT_DEVICE;
-       else
-               return USB_INIT_HOST;
-}
-#endif
index d27bd57648ca7bcd6d2a897067971be7332fcf59..186eb18048139694db23270db0d2e85d9667a46e 100644 (file)
@@ -180,33 +180,6 @@ void setup_ventana_i2c(void)
 /*
  * Baseboard specific GPIO
  */
-
-/* prototype */
-static iomux_v3_cfg_t const gwproto_gpio_pads[] = {
-       /* RS232_EN# */
-       IOMUX_PADS(PAD_SD4_DAT3__GPIO2_IO11 | DIO_PAD_CFG),
-       /* PANLEDG# */
-       IOMUX_PADS(PAD_KEY_COL0__GPIO4_IO06 | DIO_PAD_CFG),
-       /* PANLEDR# */
-       IOMUX_PADS(PAD_KEY_ROW0__GPIO4_IO07 | DIO_PAD_CFG),
-       /* LOCLED# */
-       IOMUX_PADS(PAD_KEY_ROW4__GPIO4_IO15 | DIO_PAD_CFG),
-       /* RS485_EN */
-       IOMUX_PADS(PAD_SD3_DAT4__GPIO7_IO01 | DIO_PAD_CFG),
-       /* IOEXP_PWREN# */
-       IOMUX_PADS(PAD_EIM_A19__GPIO2_IO19 | DIO_PAD_CFG),
-       /* IOEXP_IRQ# */
-       IOMUX_PADS(PAD_EIM_A20__GPIO2_IO18 | MUX_PAD_CTRL(IRQ_PAD_CTRL)),
-       /* VID_EN */
-       IOMUX_PADS(PAD_EIM_D31__GPIO3_IO31 | DIO_PAD_CFG),
-       /* DIOI2C_DIS# */
-       IOMUX_PADS(PAD_GPIO_19__GPIO4_IO05 | DIO_PAD_CFG),
-       /* PCICK_SSON */
-       IOMUX_PADS(PAD_SD1_CLK__GPIO1_IO20 | DIO_PAD_CFG),
-       /* PCI_RST# */
-       IOMUX_PADS(PAD_ENET_TXD1__GPIO1_IO29 | DIO_PAD_CFG),
-};
-
 static iomux_v3_cfg_t const gw51xx_gpio_pads[] = {
        /* PANLEDG# */
        IOMUX_PADS(PAD_KEY_COL0__GPIO4_IO06 | DIO_PAD_CFG),
index dc8cd883e904f278b977daf0bb2fa62c702e256e..a68ec69f1886d05e2739cfe65c373d7fa1bc9a71 100644 (file)
@@ -76,7 +76,7 @@ static iomux_v3_cfg_t const enet_pads[] = {
        IOMUX_PADS(PAD_ENET_TXD0__GPIO1_IO30 | DIO_PAD_CFG),
 };
 
-/* NAND */
+#ifdef CONFIG_CMD_NAND
 static iomux_v3_cfg_t const nfc_pads[] = {
        IOMUX_PADS(PAD_NANDF_CLE__NAND_CLE     | MUX_PAD_CTRL(NO_PAD_CTRL)),
        IOMUX_PADS(PAD_NANDF_ALE__NAND_ALE     | MUX_PAD_CTRL(NO_PAD_CTRL)),
@@ -95,7 +95,6 @@ static iomux_v3_cfg_t const nfc_pads[] = {
        IOMUX_PADS(PAD_NANDF_D7__NAND_DATA07   | MUX_PAD_CTRL(NO_PAD_CTRL)),
 };
 
-#ifdef CONFIG_CMD_NAND
 static void setup_gpmi_nand(void)
 {
        struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
@@ -1091,6 +1090,12 @@ void ft_board_pci_fixup(void *blob, bd_t *bd)
 }
 #endif /* if defined(CONFIG_CMD_PCI) */
 
+void ft_board_wdog_fixup(void *blob, const char *path)
+{
+       ft_delprop_path(blob, path, "ext-reset-output");
+       ft_delprop_path(blob, path, "fsl,ext-reset-output");
+}
+
 /*
  * called prior to booting kernel or by 'fdt boardsetup' command
  *
@@ -1173,8 +1178,7 @@ int ft_board_setup(void *blob, bd_t *bd)
 
                /* GW51xx-E adds WDOG1_B external reset */
                if (rev < 'E')
-                       ft_delprop_path(blob, WDOG1_PATH,
-                                       "fsl,ext-reset-output");
+                       ft_board_wdog_fixup(blob, WDOG1_PATH);
                break;
 
        case GW52xx:
@@ -1204,23 +1208,19 @@ int ft_board_setup(void *blob, bd_t *bd)
                            strstr((const char *)info->model, "SP331-B"))
                                gpio_cfg[board_type].usd_vsel = 0;
 
-                       /* GW520x-E adds WDOG1_B external reset */
-                       if (info->model[4] == '0' && rev < 'E')
-                               ft_delprop_path(blob, WDOG1_PATH,
-                                               "fsl,ext-reset-output");
-
                        /* GW522x-B adds WDOG1_B external reset */
-                       if (info->model[4] == '2' && rev < 'B')
-                               ft_delprop_path(blob, WDOG1_PATH,
-                                               "fsl,ext-reset-output");
+                       ft_board_wdog_fixup(blob, WDOG1_PATH);
                }
+
+               /* GW520x-E adds WDOG1_B external reset */
+               else if (info->model[4] == '0' && rev < 'E')
+                       ft_board_wdog_fixup(blob, WDOG1_PATH);
                break;
 
        case GW53xx:
                /* GW53xx-E adds WDOG1_B external reset */
                if (rev < 'E')
-                       ft_delprop_path(blob, WDOG1_PATH,
-                                       "fsl,ext-reset-output");
+                       ft_board_wdog_fixup(blob, WDOG1_PATH);
                break;
 
        case GW54xx:
@@ -1234,8 +1234,7 @@ int ft_board_setup(void *blob, bd_t *bd)
 
                /* GW54xx-E adds WDOG2_B external reset */
                if (rev < 'E')
-                       ft_delprop_path(blob, WDOG2_PATH,
-                                       "fsl,ext-reset-output");
+                       ft_board_wdog_fixup(blob, WDOG2_PATH);
                break;
 
        case GW551x:
@@ -1284,8 +1283,7 @@ int ft_board_setup(void *blob, bd_t *bd)
 
                /* GW551x-C adds WDOG1_B external reset */
                if (rev < 'C')
-                       ft_delprop_path(blob, WDOG1_PATH,
-                                       "fsl,ext-reset-output");
+                       ft_board_wdog_fixup(blob, WDOG1_PATH);
                break;
        }
 
index 1648f1334054f5ecc330822e1ec22786c33d6040..db8a917563736ec2aa60d2bd250d7b620cc307cd 100644 (file)
@@ -156,33 +156,8 @@ static const uint8_t prg_stage1_prepare[] = {
        0x81, 0x2e, 0x30, 0x00, /* opcode: LOAD PCR3, f3 */
 };
 
-static const uint8_t prg_stage2_prepare[] = {
-       0x00, 0x80, 0x00, 0x00, /* opcode: SYNC PCR0 */
-       0x00, 0x84, 0x00, 0x00, /* opcode: SYNC PCR1 */
-       0x00, 0x88, 0x00, 0x00, /* opcode: SYNC PCR2 */
-       0x00, 0x8c, 0x00, 0x00, /* opcode: SYNC PCR3 */
-       0x00, 0x90, 0x00, 0x00, /* opcode: SYNC PCR4 */
-};
-
-static const uint8_t prg_stage2_success[] = {
-       0x81, 0x02, 0x40, 0x14, /* opcode: LOAD PCR4, #<20B data> */
-       0x48, 0xfd, 0x95, 0x17, 0xe7, 0x54, 0x6b, 0x68, /* data */
-       0x92, 0x31, 0x18, 0x05, 0xf8, 0x58, 0x58, 0x3c, /* data */
-       0xe4, 0xd2, 0x81, 0xe0, /* data */
-};
-
-static const uint8_t prg_stage_fail[] = {
-       0x81, 0x01, 0x00, 0x14, /* opcode: LOAD v0, #<20B data> */
-       0xc0, 0x32, 0xad, 0xc1, 0xff, 0x62, 0x9c, 0x9b, /* data */
-       0x66, 0xf2, 0x27, 0x49, 0xad, 0x66, 0x7e, 0x6b, /* data */
-       0xea, 0xdf, 0x14, 0x4b, /* data */
-       0x81, 0x42, 0x30, 0x00, /* opcode: LOAD PCR3, v0 */
-       0x81, 0x42, 0x40, 0x00, /* opcode: LOAD PCR4, v0 */
-};
-
 static const uint8_t vendor[] = "Guntermann & Drunck";
 
-
 /**
  * @brief read a bunch of data from MMC into memory.
  *
@@ -1013,6 +988,30 @@ static int first_stage_init(void)
 #endif
 
 #ifdef CCDM_SECOND_STAGE
+static const uint8_t prg_stage2_prepare[] = {
+       0x00, 0x80, 0x00, 0x00, /* opcode: SYNC PCR0 */
+       0x00, 0x84, 0x00, 0x00, /* opcode: SYNC PCR1 */
+       0x00, 0x88, 0x00, 0x00, /* opcode: SYNC PCR2 */
+       0x00, 0x8c, 0x00, 0x00, /* opcode: SYNC PCR3 */
+       0x00, 0x90, 0x00, 0x00, /* opcode: SYNC PCR4 */
+};
+
+static const uint8_t prg_stage2_success[] = {
+       0x81, 0x02, 0x40, 0x14, /* opcode: LOAD PCR4, #<20B data> */
+       0x48, 0xfd, 0x95, 0x17, 0xe7, 0x54, 0x6b, 0x68, /* data */
+       0x92, 0x31, 0x18, 0x05, 0xf8, 0x58, 0x58, 0x3c, /* data */
+       0xe4, 0xd2, 0x81, 0xe0, /* data */
+};
+
+static const uint8_t prg_stage_fail[] = {
+       0x81, 0x01, 0x00, 0x14, /* opcode: LOAD v0, #<20B data> */
+       0xc0, 0x32, 0xad, 0xc1, 0xff, 0x62, 0x9c, 0x9b, /* data */
+       0x66, 0xf2, 0x27, 0x49, 0xad, 0x66, 0x7e, 0x6b, /* data */
+       0xea, 0xdf, 0x14, 0x4b, /* data */
+       0x81, 0x42, 0x30, 0x00, /* opcode: LOAD PCR3, v0 */
+       0x81, 0x42, 0x40, 0x00, /* opcode: LOAD PCR4, v0 */
+};
+
 static int second_stage_init(void)
 {
        static const char mac_suffix[] = ".mac";
index 11d2d7f45f1e080c9da7cfae0b70828e90a24189..fefcde87aec1569c82b78280e3801d9123eadc8f 100644 (file)
@@ -24,7 +24,7 @@
 static void setup_net_chip(void);
 #endif
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #include <usb.h>
 #include <asm/arch/ehci.h>
 #include <asm/ehci-omap.h>
@@ -110,7 +110,7 @@ void set_muxconf_regs(void)
                   sizeof(struct pad_conf_entry));
 }
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);
@@ -206,7 +206,7 @@ int board_eth_init(bd_t *bis)
        return rc;
 }
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 
 static struct omap_usbhs_board_data usbhs_bdata = {
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
index 0f0eb3acb8bd4eb9fde7b328e57aea37432e3e0d..47bce4daa63652382343e05ff94770271e1d7caf 100644 (file)
@@ -341,7 +341,7 @@ int board_init(void)
        return 0;
 }
 
-#ifdef CONFIG_GENERIC_MMC
+#ifdef CONFIG_MMC
 
 static int init_dwmmc(void)
 {
index 12358f1b619886d503865d83d7ab292fedee9a15..1deb2bdd8b7b8e26439a1ecc606362dbd35fe0b7 100644 (file)
@@ -19,7 +19,7 @@
 #include <asm/arch/clock.h>
 #include <errno.h>
 #include <i2c.h>
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #include <usb.h>
 #include <asm/ehci-omap.h>
 #endif
@@ -33,7 +33,7 @@ DECLARE_GLOBAL_DATA_PTR;
 /* Address of the framebuffer in RAM. */
 #define FB_START_ADDRESS 0x88000000
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 static struct omap_usbhs_board_data usbhs_bdata = {
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
        .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
diff --git a/board/huawei/hg556a/Kconfig b/board/huawei/hg556a/Kconfig
new file mode 100644 (file)
index 0000000..88622d0
--- /dev/null
@@ -0,0 +1,12 @@
+if BOARD_HUAWEI_HG556A
+
+config SYS_BOARD
+       default "hg556a"
+
+config SYS_VENDOR
+       default "huawei"
+
+config SYS_CONFIG_NAME
+       default "huawei_hg556a"
+
+endif
diff --git a/board/huawei/hg556a/MAINTAINERS b/board/huawei/hg556a/MAINTAINERS
new file mode 100644 (file)
index 0000000..3ead7e4
--- /dev/null
@@ -0,0 +1,6 @@
+HUAWEI HG556A BOARD
+M:     Álvaro Fernández Rojas <noltari@gmail.com>
+S:     Maintained
+F:     board/huawei/hg556a/
+F:     include/configs/huawei_hg556a.h
+F:     configs/huawei_hg556a_ram_defconfig
diff --git a/board/huawei/hg556a/Makefile b/board/huawei/hg556a/Makefile
new file mode 100644 (file)
index 0000000..ace0ed3
--- /dev/null
@@ -0,0 +1,5 @@
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+obj-y += hg556a.o
diff --git a/board/huawei/hg556a/hg556a.c b/board/huawei/hg556a/hg556a.c
new file mode 100644 (file)
index 0000000..d181ca6
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
index 348613736d3c068b0a794c249ae0367e87ca2d65..cd79e804a081390aecb4d2abe331bdb421027c37 100644 (file)
@@ -17,7 +17,6 @@
 #include <i2c.h>
 #endif
 
-static int eeprom_diag;
 static int mac_diag;
 static int gpio_diag;
 
@@ -136,7 +135,6 @@ struct __attribute__ ((__packed__)) eeprom_layout {
 #define HW_COMP_MAINCPU 2
 
 static struct eeprom_layout eeprom_content;
-static int eeprom_was_read;    /* has_been_read */
 static int eeprom_is_valid;
 static int eeprom_version;
 
@@ -153,53 +151,7 @@ static int eeprom_version;
 
 static int read_eeprom(void)
 {
-       int eeprom_datalen;
-       int ret;
-
-       if (eeprom_was_read)
-               return 0;
-
-       eeprom_is_valid = 0;
-       ret = i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0,
-                       CONFIG_SYS_I2C_EEPROM_ADDR_LEN,
-                       (uchar *)&eeprom_content, sizeof(eeprom_content));
-       if (eeprom_diag) {
-               printf("DIAG: %s() read rc[%d], size[%d]\n",
-                       __func__, ret, sizeof(eeprom_content));
-       }
-
-       if (ret != 0)
-               return -1;
-
-       eeprom_was_read = 1;
-
-       /*
-        * check validity of EEPROM content
-        * (check version, length, optionally checksum)
-        */
-       eeprom_is_valid = 1;
-       eeprom_datalen = get_eeprom_field_int(eeprom_content.len);
-       eeprom_version = get_eeprom_field_int(eeprom_content.version);
-
-       if (eeprom_diag) {
-               printf("DIAG: %s() magic[%c%c%c] len[%d] ver[%d] type[%d]\n",
-                       __func__, eeprom_content.magic[0],
-                       eeprom_content.magic[1], eeprom_content.magic[2],
-                       eeprom_datalen, eeprom_version, eeprom_content.type);
-       }
-       if (strncmp(eeprom_content.magic, "ifm", strlen("ifm")) != 0)
-               eeprom_is_valid = 0;
-       if (eeprom_datalen < sizeof(struct eeprom_layout) - 5)
-               eeprom_is_valid = 0;
-       if ((eeprom_version != 1) && (eeprom_version != 2))
-               eeprom_is_valid = 0;
-       if (eeprom_content.type != HW_COMP_MAINCPU)
-               eeprom_is_valid = 0;
-
-       if (eeprom_diag)
-               printf("DIAG: %s() valid[%d]\n", __func__, eeprom_is_valid);
-
-       return ret;
+       return -ENOSYS;
 }
 
 int mac_read_from_eeprom(void)
@@ -324,9 +276,6 @@ int misc_init_r(void)
        char *s;
        int want_recovery;
 
-       /* we use bus I2C-0 for the on-board eeprom */
-       i2c_set_bus_num(0);
-
        /* setup GPIO directions and initial values */
        gpio_configure();
 
index deda457f3cdb6103d2731a4f7127214e43f77a45..d3fd49d285ecdb27c9784f9671fadeb41adc39d8 100644 (file)
@@ -6,4 +6,5 @@
 
 obj-y += checkboard.o
 obj-y += ddr.o
+obj-y += dt.o
 obj-y += lowlevel_init.o
diff --git a/board/imgtec/boston/dt.c b/board/imgtec/boston/dt.c
new file mode 100644 (file)
index 0000000..b34f9bc
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2016 Imagination Technologies
+ *
+ * SPDX-License-Identifier:    GPL-2.0
+ */
+
+#include <common.h>
+#include <fdt_support.h>
+
+int ft_board_setup(void *blob, bd_t *bd)
+{
+       DECLARE_GLOBAL_DATA_PTR;
+       u64 mem_start[2], mem_size[2];
+       int mem_regions;
+
+       mem_start[0] = 0;
+       mem_size[0] = min_t(u64, 256llu << 20, gd->ram_size);
+       mem_regions = 1;
+
+       if (gd->ram_size > mem_size[0]) {
+               mem_start[1] = 0x80000000 + mem_size[0];
+               mem_size[1] = gd->ram_size - mem_size[0];
+               mem_regions++;
+       }
+
+       return fdt_fixup_memory_banks(blob, mem_start, mem_size, mem_regions);
+}
index d3914a1884711b06c88d2fe1868ea1c91231c7d8..843d35eb2d0ff18c9394e6f297f8ee42b5c923fa 100644 (file)
@@ -199,14 +199,14 @@ int board_eth_init(bd_t *bis)
 static inline void setup_net_chip(void) {}
 #endif
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 void board_mmc_power_init(void)
 {
        twl4030_power_mmc_init(0);
index 51b4571d40aa1adea9c7d14944db4e8e98f792c3..f5a98b33e7a90490d8c7449167c98bbc40eb98e9 100644 (file)
@@ -153,13 +153,8 @@ const iop_conf_t iop_conf_tab[4][32] = {
                { 0,             0,   0,   0,   0,   0 }, /* PD18            */
                { 0,             0,   0,   0,   0,   0 }, /* PD17            */
                { 0,             0,   0,   0,   0,   0 }, /* PD16            */
-#if defined(CONFIG_HARD_I2C)
-               { 1,             1,   1,   0,   1,   0 }, /* PD15 I2C SDA    */
-               { 1,             1,   1,   0,   1,   0 }, /* PD14 I2C SCL    */
-#else
                { 1,             0,   0,   0,   1,   1 }, /* PD15            */
                { 1,             0,   0,   1,   1,   1 }, /* PD14            */
-#endif
                { 0,             0,   0,   0,   0,   0 }, /* PD13            */
                { 0,             0,   0,   0,   0,   0 }, /* PD12            */
                { 0,             0,   0,   0,   0,   0 }, /* PD11            */
index 079509c979d01e3e2996cd2c90336c8e180785dd..85785ffc02b1d5d8fdab31972fe03e4bf5097393 100644 (file)
@@ -75,10 +75,6 @@ static const u32 kwmpp_config[] = {
 #if defined(CONFIG_SYS_I2C_SOFT)
        MPP8_GPIO,              /* SDA */
        MPP9_GPIO,              /* SCL */
-#endif
-#if defined(CONFIG_HARD_I2C)
-       MPP8_TW_SDA,
-       MPP9_TW_SCK,
 #endif
        MPP10_UART0_TXD,
        MPP11_UART0_RXD,
index 1aaeb8d75f3399cf640329b4f8fcf2bae46c169e..5d2d997e424661d2e4f205e319ea5bbdc60ffe26 100644 (file)
@@ -152,7 +152,7 @@ void set_muxconf_regs(void)
        MUX_AM3517EVM();
 }
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);
index 03d272a8062913e468d21fe5950f6b27aa088a4c..68d40dcd62d3bcb1618790b6833d36b88b60f7cd 100644 (file)
@@ -9,4 +9,6 @@ config SYS_VENDOR
 config SYS_CONFIG_NAME
        default "omap3_logic"
 
+source "board/ti/common/Kconfig"
+
 endif
diff --git a/board/logicpd/omap3som/README b/board/logicpd/omap3som/README
new file mode 100644 (file)
index 0000000..06b3998
--- /dev/null
@@ -0,0 +1,19 @@
+Summary
+=======
+
+The source for omap3som encompases the DM3730 SOM-LV and DM3730 Torpedo platforms.
+
+By default, the Torpedo Device Tree is integrated into U-Boot,but the MMC controller, GPIO and I2C controllers are the same, so for the purposes of loading U-Boot, it should be sufficient.  However this will display the Model as "LogicPD Zoom DM3730 Torpedo + Wireless Development Kit" upon boot.
+
+The actual board remains autodetected and the Board will read "DM37xx SOM LV" when used on the DM37 SOM-LV.  The device tree loaded with Linux is also correct.
+
+Integrating the SOM-LV Device Tree into U-Boot
+==============================================
+
+This step is optional, but should you want to change the default to the SOM-LV, locate the configs/omap3_logic_defconfig file and make the following change.
+
+  CONFIG_DEFAULT_DEVICE_TREE="logicpd-som-lv-37xx-devkit"
+
+  make distclean
+  make omap3_logic_defconfig
+
index 4ad496e5e2b8beb9ad29518a9f9c513cdef000de..7990dd25130c159ac3d28096049c832697185ed4 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define CONTROL_WKUP_CTRL      0x48002a5c
-#define GPIO_IO_PWRDNZ (1 << 6)
-#define PBIASLITEVMODE1        (1 << 8)
-
-/*
- * two dimensional array of strucures containining board name and Linux
- * machine IDs; row it selected based on CPU column is slected based
- * on hsusb0_data5 pin having a pulldown resistor
- */
-
+/* This is only needed until SPL gets OF support */
+#ifdef CONFIG_SPL_BUILD
 static const struct ns16550_platdata omap3logic_serial = {
        .base = OMAP34XX_UART1,
        .reg_shift = 2,
@@ -57,7 +49,13 @@ U_BOOT_DEVICE(omap3logic_uart) = {
        "ns16550_serial",
        &omap3logic_serial
 };
+#endif
 
+/*
+ * two dimensional array of strucures containining board name and Linux
+ * machine IDs; row it selected based on CPU column is slected based
+ * on hsusb0_data5 pin having a pulldown resistor
+ */
 static struct board_id {
        char *name;
        int machine_id;
@@ -231,14 +229,14 @@ int board_late_init(void)
 }
 #endif
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 void board_mmc_power_init(void)
 {
        twl4030_power_mmc_init(0);
index 0fad23af62f69c626de0a523a68ca915a84999f0..e91f874a2b909c87f74b38f79385925e08c358a0 100644 (file)
@@ -106,7 +106,7 @@ void set_muxconf_regs(void)
        MUX_ZOOM1_MDK();
 }
 
-#ifdef CONFIG_GENERIC_MMC
+#ifdef CONFIG_MMC
 int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);
index 5e447262bcfd3bd8f8465f6eb2a3e7a150ff349c..adf33cfd37e328558f122306592b5bbd24598ef5 100644 (file)
@@ -27,7 +27,7 @@
 #include <asm/mach-types.h>
 #include "overo.h"
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #include <usb.h>
 #include <asm/ehci-omap.h>
 #endif
@@ -379,21 +379,21 @@ int board_eth_init(bd_t *bis)
 }
 #endif
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 void board_mmc_power_init(void)
 {
        twl4030_power_mmc_init(0);
 }
 #endif
 
-#if defined(CONFIG_USB_EHCI)
+#if defined(CONFIG_USB_EHCI_HCD)
 static struct omap_usbhs_board_data usbhs_bdata = {
        .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
@@ -420,4 +420,4 @@ int ehci_hcd_stop(void)
        return omap_ehci_hcd_stop();
 }
 
-#endif /* CONFIG_USB_EHCI */
+#endif /* CONFIG_USB_EHCI_HCD */
index b371a40d32b0529a4c9c228eb1b9508b911319c0..3502bbf5a9dc5c6d303726219257549bd0a72446 100644 (file)
@@ -121,7 +121,7 @@ void set_muxconf_regs(void)
        }
 }
 
-#ifdef CONFIG_GENERIC_MMC
+#ifdef CONFIG_MMC
 int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);
index 9db31d33124f51c5bec68ff4c6714f9e54010e55..371bcd9e6b4eae4b8aeb4a3a213d6f9b7c01e969 100644 (file)
@@ -169,36 +169,6 @@ int misc_init_r(void)
        clrsetbits_be32(&im->gpio.gpdat, 0x01000000, 0x00040000);
 #endif
 
-#if defined(CONFIG_HARD_I2C)
-       if (!getenv("ethaddr")) {
-               uchar buf[6];
-               uchar ifm_oui[3] = { 0, 2, 1, };
-               int ret;
-
-               /* I2C-0 for on-board eeprom */
-               i2c_set_bus_num(CONFIG_SYS_I2C_EEPROM_BUS_NUM);
-
-               /* Read ethaddr from EEPROM */
-               ret = i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR,
-                              CONFIG_SYS_I2C_EEPROM_MAC_OFFSET, 1, buf, 6);
-               if (ret != 0) {
-                       printf("Error: Unable to read MAC from I2C"
-                               " EEPROM at address %02X:%02X\n",
-                               CONFIG_SYS_I2C_EEPROM_ADDR,
-                               CONFIG_SYS_I2C_EEPROM_MAC_OFFSET);
-                       return 1;
-               }
-
-               /* Owned by IFM ? */
-               if (memcmp(buf, ifm_oui, sizeof(ifm_oui))) {
-                       printf("Illegal MAC address in EEPROM: %pM\n", buf);
-                       return 1;
-               }
-
-               eth_setenv_enetaddr("ethaddr", buf);
-       }
-#endif /* defined(CONFIG_HARD_I2C) */
-
        return 0;
 }
 
index c3607daf46052226686caf215dcda576ed84dd58..3dc8cbd6a50b6f5fd5dbc1ceb7104c1b0b57ddf7 100644 (file)
@@ -108,6 +108,7 @@ static iomux_v3_cfg_t const ecspi1_pads[] = {
        MX6_PAD_EIM_D19__GPIO3_IO19 | MUX_PAD_CTRL(NO_PAD_CTRL),
 };
 
+#ifdef CONFIG_CMD_NAND
 /* NAND */
 static iomux_v3_cfg_t const nfc_pads[] = {
        MX6_PAD_NANDF_CLE__NAND_CLE     | MUX_PAD_CTRL(NAND_PAD_CTRL),
@@ -130,11 +131,7 @@ static iomux_v3_cfg_t const nfc_pads[] = {
        MX6_PAD_NANDF_D7__NAND_DATA07   | MUX_PAD_CTRL(NAND_PAD_CTRL),
        MX6_PAD_SD4_DAT0__NAND_DQS      | MUX_PAD_CTRL(NAND_PAD_CTRL),
 };
-
-
-/* GPIOS */
-static iomux_v3_cfg_t const gpios_pads[] = {
-};
+#endif
 
 static struct i2c_pads_info i2c_pad_info2 = {
        .scl = {
@@ -167,7 +164,7 @@ static iomux_v3_cfg_t const usdhc1_pads[] = {
        MX6_PAD_EIM_BCLK__GPIO6_IO31    | MUX_PAD_CTRL(NO_PAD_CTRL), /* CD */
 };
 
-#ifndef CONFIG_CMD_NAND
+#if !defined(CONFIG_CMD_NAND) && !defined(CONFIG_SPL_BUILD)
 static iomux_v3_cfg_t const usdhc4_pads[] = {
        MX6_PAD_SD4_CLK__SD4_CLK        | MUX_PAD_CTRL(USDHC_PAD_CTRL),
        MX6_PAD_SD4_CMD__SD4_CMD        | MUX_PAD_CTRL(USDHC_PAD_CTRL),
index e245faa5cf86039c0843be9411c52e55bc310920..ac9be35dd9b9ba4926a1379d0d8bba2a03c45a6f 100644 (file)
@@ -43,9 +43,6 @@ void board_debug_uart_init(void)
 
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-       debug_uart_init();
-#endif
        ddr_init();
        ath79_eth_reset();
        return 0;
index e921ea53f340c73d61c9795b58e5946b7bbbfa9b..19b55acbf2d0b90b5bcaee91de11dab35b53df29 100644 (file)
@@ -59,9 +59,6 @@ void board_debug_uart_init(void)
 
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-       debug_uart_init();
-#endif
        ddr_init();
        ath79_eth_reset();
        return 0;
index 7a1a61e3869745da5f3c9026b5265ca7d1b4b8dd..6cf54095f541f28cd6e5a0bcab9ee99b6fbdad65 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
-/*
- * MUSB port on OMAP3EVM Rev >= E requires extvbus programming.
- */
-u8 omap3_evm_need_extvbus(void)
-{
-       u8 retval = 0;
-
-       /* TODO: verify if cairo handheld platform needs extvbus programming */
-
-       return retval;
-}
-
 /*
  * Routine: board_init
  * Description: Early hardware init.
@@ -62,7 +50,7 @@ void set_muxconf_regs(void)
        MUX_CAIRO();
 }
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);
index 2146534b3653ca9b41b2f48cfb17aaa1ebaf3331..d3c6ba580f5cadf7e1b387a2d580424c5dcde138 100644 (file)
 #include <mmc.h>
 #include <asm/gpio.h>
 #include <asm/arch/mbox.h>
+#include <asm/arch/msg.h>
 #include <asm/arch/sdhci.h>
 #include <asm/global_data.h>
 #include <dm/platform_data/serial_bcm283x_mu.h>
 #ifdef CONFIG_ARM64
 #include <asm/armv8/mmu.h>
 #endif
+#include <watchdog.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
 /* From lowlevel_init.S */
 extern unsigned long fw_dtb_pointer;
 
-
+/* TODO(sjg@chromium.org): Move these to the msg.c file */
 struct msg_get_arm_mem {
        struct bcm2835_mbox_hdr hdr;
        struct bcm2835_mbox_tag_get_arm_mem get_arm_mem;
@@ -53,12 +55,6 @@ struct msg_get_mac_address {
        u32 end_tag;
 };
 
-struct msg_set_power_state {
-       struct bcm2835_mbox_hdr hdr;
-       struct bcm2835_mbox_tag_set_power_state set_power_state;
-       u32 end_tag;
-};
-
 struct msg_get_clock_rate {
        struct bcm2835_mbox_hdr hdr;
        struct bcm2835_mbox_tag_get_clock_rate get_clock_rate;
@@ -365,30 +361,6 @@ int misc_init_r(void)
        return 0;
 }
 
-static int power_on_module(u32 module)
-{
-       ALLOC_CACHE_ALIGN_BUFFER(struct msg_set_power_state, msg_pwr, 1);
-       int ret;
-
-       BCM2835_MBOX_INIT_HDR(msg_pwr);
-       BCM2835_MBOX_INIT_TAG(&msg_pwr->set_power_state,
-                             SET_POWER_STATE);
-       msg_pwr->set_power_state.body.req.device_id = module;
-       msg_pwr->set_power_state.body.req.state =
-               BCM2835_MBOX_SET_POWER_STATE_REQ_ON |
-               BCM2835_MBOX_SET_POWER_STATE_REQ_WAIT;
-
-       ret = bcm2835_mbox_call_prop(BCM2835_MBOX_PROP_CHAN,
-                                    &msg_pwr->hdr);
-       if (ret) {
-               printf("bcm2835: Could not set module %u power state\n",
-                      module);
-               return -1;
-       }
-
-       return 0;
-}
-
 static void get_board_rev(void)
 {
        ALLOC_CACHE_ALIGN_BUFFER(struct msg_get_board_rev, msg, 1);
@@ -484,6 +456,9 @@ static void rpi_disable_inactive_uart(void)
 
 int board_init(void)
 {
+#ifdef CONFIG_HW_WATCHDOG
+       hw_watchdog_init();
+#endif
 #ifndef CONFIG_PL01X_SERIAL
        rpi_disable_inactive_uart();
 #endif
@@ -492,28 +467,17 @@ int board_init(void)
 
        gd->bd->bi_boot_params = 0x100;
 
-       return power_on_module(BCM2835_MBOX_POWER_DEVID_USB_HCD);
+       return bcm2835_power_on_module(BCM2835_MBOX_POWER_DEVID_USB_HCD);
 }
 
-int board_mmc_init(bd_t *bis)
+/*
+ * If the firmware passed a device tree use it for U-Boot.
+ */
+void *board_fdt_blob_setup(void)
 {
-       ALLOC_CACHE_ALIGN_BUFFER(struct msg_get_clock_rate, msg_clk, 1);
-       int ret;
-
-       power_on_module(BCM2835_MBOX_POWER_DEVID_SDHCI);
-
-       BCM2835_MBOX_INIT_HDR(msg_clk);
-       BCM2835_MBOX_INIT_TAG(&msg_clk->get_clock_rate, GET_CLOCK_RATE);
-       msg_clk->get_clock_rate.body.req.clock_id = BCM2835_MBOX_CLOCK_ID_EMMC;
-
-       ret = bcm2835_mbox_call_prop(BCM2835_MBOX_PROP_CHAN, &msg_clk->hdr);
-       if (ret) {
-               printf("bcm2835: Could not query eMMC clock rate\n");
-               return -1;
-       }
-
-       return bcm2835_sdhci_init(BCM2835_SDHCI_BASE,
-                                 msg_clk->get_clock_rate.body.resp.rate_hz);
+       if (fdt_magic(fw_dtb_pointer) != FDT_MAGIC)
+               return NULL;
+       return (void *)fw_dtb_pointer;
 }
 
 int ft_board_setup(void *blob, bd_t *bd)
index 360e0a1a6fd051443a47e66667ad30b564d24699..d0b453751333c314ddbc178cced1f16ed32752a6 100644 (file)
@@ -44,17 +44,7 @@ int board_init(void)
 
 int board_late_init(void)
 {
-       u8 mac[6];
-
-       /* Read Mac Address and set*/
-       i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-       i2c_set_bus_num(CONFIG_SYS_I2C_MODULE);
-
-       /* Read MAC address */
-       i2c_read(0x50, 0x10, 0, mac, 6);
-
-       if (is_valid_ethaddr(mac))
-               eth_setenv_enetaddr("ethaddr", mac);
+       printf("Cannot get MAC address from I2C\n");
 
        return 0;
 }
index 362fa0bc6e27c097524254c7baee084f4b38f170..f63f003209a0ec381eedcf401e244434dfe7c745 100644 (file)
@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <ram.h>
 #include <dm/pinctrl.h>
 #include <dm/uclass-internal.h>
 #include <asm/arch/periph.h>
@@ -28,6 +29,13 @@ int board_init(void)
                goto out;
        }
 
+       /* Enable pwm0 for panel backlight */
+       ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_PWM0);
+       if (ret) {
+               debug("%s PWM0 pinctrl init fail! (ret=%d)\n", __func__, ret);
+               goto out;
+       }
+
        ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_PWM2);
        if (ret) {
                debug("%s PWM2 pinctrl init fail!\n", __func__);
@@ -40,10 +48,9 @@ int board_init(void)
                goto out;
        }
 
-       /* rk3399 need init vdd_center to get correct output voltage */
-       ret = regulator_get_by_platname("vdd_center", &regulator);
+       ret = regulators_enable_boot_on(false);
        if (ret)
-               debug("%s: Cannot get vdd_center regulator\n", __func__);
+               debug("%s: Cannot enable boot on regulator\n", __func__);
 
        ret = regulator_get_by_platname("vcc5v0_host", &regulator);
        if (ret) {
@@ -63,7 +70,23 @@ out:
 
 int dram_init(void)
 {
-       gd->ram_size = 0x80000000;
+       struct ram_info ram;
+       struct udevice *dev;
+       int ret;
+
+       ret = uclass_get_device(UCLASS_RAM, 0, &dev);
+       if (ret) {
+               debug("DRAM init failed: %d\n", ret);
+               return ret;
+       }
+       ret = ram_get_info(dev, &ram);
+       if (ret) {
+               debug("Cannot get DRAM size: %d\n", ret);
+               return ret;
+       }
+       debug("SDRAM base=%llx, size=%x\n", ram.base, (unsigned int)ram.size);
+       gd->ram_size = ram.size;
+
        return 0;
 }
 
index 79541a393945957497cebeb6526b5f02096c50d8..c2872e7330a42d48ac624de8accdc95985c07b44 100644 (file)
@@ -5,3 +5,31 @@
  */
 
 #include <common.h>
+#include <dm.h>
+#include <i2c_eeprom.h>
+#include <netdev.h>
+
+static int get_ethaddr_from_eeprom(u8 *addr)
+{
+       int ret;
+       struct udevice *dev;
+
+       ret = uclass_first_device_err(UCLASS_I2C_EEPROM, &dev);
+       if (ret)
+               return ret;
+
+       return i2c_eeprom_read(dev, 0, addr, 6);
+}
+
+int rk_board_late_init(void)
+{
+       u8 ethaddr[6];
+
+       if (get_ethaddr_from_eeprom(ethaddr))
+               return 0;
+
+       if (is_valid_ethaddr(ethaddr))
+               eth_setenv_enetaddr("ethaddr", ethaddr);
+
+       return 0;
+}
index 405ed3b9231da9381c9ab3611c0d6d41cfb32383..49ed3248add17f6c65c4e4963209a37a6c2e05b2 100644 (file)
@@ -71,7 +71,7 @@ int dram_init_banksize(void)
        return 0;
 }
 
-#ifdef CONFIG_GENERIC_MMC
+#ifdef CONFIG_MMC
 int board_mmc_init(bd_t *bis)
 {
        int ret;
index 49e4db2de95080779619e2782c7ce6c0b9df9a5f..17626966aa05796e2790d8dc232a5012f618097c 100644 (file)
@@ -250,7 +250,7 @@ int board_eth_init(bd_t *bis)
        return 0;
 }
 
-#ifdef CONFIG_GENERIC_MMC
+#ifdef CONFIG_MMC
 static int init_mmc(void)
 {
 #ifdef CONFIG_MMC_SDHCI
index 203136fb970de3fb7c93b6276a7076e4c8161d06..dc4dead20bc7f2529ffc633881c4d1e11524111c 100644 (file)
@@ -208,7 +208,7 @@ mode_cmd[BOOT_MODE_EXIT + 1] = {
 
 static void display_board_info(void)
 {
-#ifdef CONFIG_GENERIC_MMC
+#ifdef CONFIG_MMC
        struct mmc *mmc = find_mmc_device(0);
 #endif
        vidinfo_t *vid = &panel_info;
@@ -226,7 +226,7 @@ static void display_board_info(void)
        lcd_printf("\tDRAM banks: %u\n", CONFIG_NR_DRAM_BANKS);
        lcd_printf("\tDRAM size: %u MB\n", gd->ram_size / SZ_1M);
 
-#ifdef CONFIG_GENERIC_MMC
+#ifdef CONFIG_MMC
        if (mmc) {
                if (!mmc->capacity)
                        mmc_init(mmc);
index 35ed398df698476be923abebf367cfbd08bd7c07..12593830e99ebea95bc3f12df5efcc9940a7e991 100644 (file)
@@ -72,7 +72,7 @@ int checkboard(void)
 }
 #endif
 
-#ifdef CONFIG_GENERIC_MMC
+#ifdef CONFIG_MMC
 int board_mmc_init(bd_t *bis)
 {
        int i, ret, ret_sd = 0;
index c730ac082bf4ae06c0ce8ddf4e18417af7098425..027755de8487fa6a6e3a07431ffbb1c11670a04b 100644 (file)
@@ -87,7 +87,7 @@ int checkboard(void)
 }
 #endif
 
-#ifdef CONFIG_GENERIC_MMC
+#ifdef CONFIG_MMC
 int board_mmc_init(bd_t *bis)
 {
        int i, err;
diff --git a/board/sfr/nb4_ser/Kconfig b/board/sfr/nb4_ser/Kconfig
new file mode 100644 (file)
index 0000000..78aefb5
--- /dev/null
@@ -0,0 +1,12 @@
+if BOARD_SFR_NB4_SER
+
+config SYS_BOARD
+       default "nb4_ser"
+
+config SYS_VENDOR
+       default "sfr"
+
+config SYS_CONFIG_NAME
+       default "sfr_nb4_ser"
+
+endif
diff --git a/board/sfr/nb4_ser/MAINTAINERS b/board/sfr/nb4_ser/MAINTAINERS
new file mode 100644 (file)
index 0000000..bf80267
--- /dev/null
@@ -0,0 +1,6 @@
+SFR NEUFBOX 4 SERCOMM BOARD
+M:     Álvaro Fernández Rojas <noltari@gmail.com>
+S:     Maintained
+F:     board/sfr/nb4_ser/
+F:     include/configs/sfr_nb4_ser.h
+F:     configs/sfr_nb4-ser_ram_defconfig
diff --git a/board/sfr/nb4_ser/Makefile b/board/sfr/nb4_ser/Makefile
new file mode 100644 (file)
index 0000000..f3b1404
--- /dev/null
@@ -0,0 +1,5 @@
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+obj-y += nb4-ser.o
diff --git a/board/sfr/nb4_ser/nb4-ser.c b/board/sfr/nb4_ser/nb4-ser.c
new file mode 100644 (file)
index 0000000..d181ca6
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
index 8b34a80e8f72d0e44bf9d6682a1aa49d4e01c687..fb691c22d961862001f7a895793d10d74101d947 100644 (file)
@@ -378,7 +378,7 @@ static void board_backlight_brightness(int br)
 
                /* LEDs on */
                reg = in_be32((void *)(CONFIG_SYS_FPGA_BASE + 0x0c));
-               if (!(reg & BACKLIGHT_ENABLE));
+               if (!(reg & BACKLIGHT_ENABLE))
                        out_be32((void *)(CONFIG_SYS_FPGA_BASE + 0x0c),
                                 reg | BACKLIGHT_ENABLE);
        } else {
index 01de42d0318628645653331839715a7449a8ca58..4404edb59e0e1423ad0947ce95cab9d3b7d47b16 100644 (file)
@@ -284,7 +284,7 @@ void board_nand_init(void)
 }
 #endif
 
-#ifdef CONFIG_GENERIC_MMC
+#ifdef CONFIG_MMC
 static void mmc_pinmux_setup(int sdc)
 {
        unsigned int pin;
index cba48d48fcfcf279cfae15bc3d55b4bf11e4a68a..c5966e3571685ea75965ecea84b53e3156dd1879 100644 (file)
@@ -179,7 +179,7 @@ void set_muxconf_regs(void)
 #endif
 }
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        omap_mmc_init(0, 0, 0, -1, -1);
@@ -188,14 +188,14 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 void board_mmc_power_init(void)
 {
        twl4030_power_mmc_init(0);
 }
 #endif
 
-#if defined(CONFIG_USB_EHCI) && !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_USB_EHCI_HCD) && !defined(CONFIG_SPL_BUILD)
 /* Call usb_stop() before starting the kernel */
 void show_boot_progress(int val)
 {
@@ -219,4 +219,4 @@ int ehci_hcd_stop(int index)
 {
        return omap_ehci_hcd_stop();
 }
-#endif /* CONFIG_USB_EHCI */
+#endif /* CONFIG_USB_EHCI_HCD */
index ad4b02a753c5678f19670a97d43db636b42c829d..25aeebc8d0e9543bf08c6443c83fdc58b6cb1064 100644 (file)
@@ -19,7 +19,7 @@
 #include <spl.h>
 #include <mmc.h>
 #include <asm/gpio.h>
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #include <usb.h>
 #include <asm/ehci-omap.h>
 #endif
@@ -46,7 +46,7 @@ static const u32 gpmc_XR16L2751[] = {
        XR16L2751_GPMC_CONFIG6,
 };
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 static struct omap_usbhs_board_data usbhs_bdata = {
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
index 6b05541964ccf5d2a4fb226221823199f056c048..6e73ae114a65903a5c8772537d356399bb245598 100644 (file)
@@ -23,7 +23,7 @@
 #include <i2c.h>
 #include <spartan3.h>
 #include <asm/gpio.h>
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #include <usb.h>
 #include <asm/ehci-omap.h>
 #endif
@@ -95,7 +95,7 @@ static const u32 gpmc_fpga[] = {
        FPGA_GPMC_CONFIG6,
 };
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 static struct omap_usbhs_board_data usbhs_bdata = {
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
index fb4d31e01d546501a35f5aac9f8fe1b96609f431..0a8861a3b3e8db049ba5b77afd27eec59824befd 100644 (file)
@@ -5,10 +5,18 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <misc.h>
+#include <ram.h>
 #include <dm/pinctrl.h>
 #include <dm/uclass-internal.h>
 #include <asm/arch/periph.h>
 #include <power/regulator.h>
+#include <u-boot/sha256.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define RK3399_CPUID_OFF  0x7
+#define RK3399_CPUID_LEN  0x10
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -57,7 +65,23 @@ out:
 
 int dram_init(void)
 {
-       gd->ram_size = 0x80000000;
+       struct ram_info ram;
+       struct udevice *dev;
+       int ret;
+
+       ret = uclass_get_device(UCLASS_RAM, 0, &dev);
+       if (ret) {
+               debug("DRAM init failed: %d\n", ret);
+               return ret;
+       }
+       ret = ram_get_info(dev, &ram);
+       if (ret) {
+               debug("Cannot get DRAM size: %d\n", ret);
+               return ret;
+       }
+       debug("SDRAM base=%llx, size=%x\n", ram.base, (unsigned int)ram.size);
+       gd->ram_size = ram.size;
+
        return 0;
 }
 
index 3e842d318738d8cadc0bd07d628e6b88cd78a441..517965c0f03cf522846fe7c823a1ca41f8f2aee9 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <dm.h>
 #include <errno.h>
 #include <spl.h>
 #include <serial.h>
@@ -26,6 +27,7 @@
 #include <asm/emif.h>
 #include <asm/gpio.h>
 #include <asm/omap_sec_common.h>
+#include <asm/omap_mmc.h>
 #include <i2c.h>
 #include <miiphy.h>
 #include <cpsw.h>
@@ -70,7 +72,8 @@ void do_board_detect(void)
        enable_i2c0_pin_mux();
        i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
 
-       if (ti_i2c_eeprom_am_get(-1, CONFIG_SYS_I2C_EEPROM_ADDR))
+       if (ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
+                                CONFIG_EEPROM_CHIP_ADDRESS))
                printf("ti_i2c_eeprom_init failed\n");
 }
 #endif
@@ -254,163 +257,222 @@ int spl_start_uboot(void)
 }
 #endif
 
-#define OSC    (V_OSCK/1000000)
-const struct dpll_params dpll_ddr = {
-               266, OSC-1, 1, -1, -1, -1, -1};
-const struct dpll_params dpll_ddr_evm_sk = {
-               303, OSC-1, 1, -1, -1, -1, -1};
-const struct dpll_params dpll_ddr_bone_black = {
-               400, OSC-1, 1, -1, -1, -1, -1};
+const struct dpll_params *get_dpll_ddr_params(void)
+{
+       int ind = get_sys_clk_index();
+
+       if (board_is_evm_sk())
+               return &dpll_ddr3_303MHz[ind];
+       else if (board_is_bone_lt() || board_is_icev2())
+               return &dpll_ddr3_400MHz[ind];
+       else if (board_is_evm_15_or_later())
+               return &dpll_ddr3_303MHz[ind];
+       else
+               return &dpll_ddr2_266MHz[ind];
+}
 
-void am33xx_spl_board_init(void)
+static u8 bone_not_connected_to_ac_power(void)
 {
-       int mpu_vdd;
+       if (board_is_bone()) {
+               uchar pmic_status_reg;
+               if (tps65217_reg_read(TPS65217_STATUS,
+                                     &pmic_status_reg))
+                       return 1;
+               if (!(pmic_status_reg & TPS65217_PWR_SRC_AC_BITMASK)) {
+                       puts("No AC power, switching to default OPP\n");
+                       return 1;
+               }
+       }
+       return 0;
+}
 
-       /* Get the frequency */
-       dpll_mpu_opp100.m = am335x_get_efuse_mpu_max_freq(cdev);
+const struct dpll_params *get_dpll_mpu_params(void)
+{
+       int ind = get_sys_clk_index();
+       int freq = am335x_get_efuse_mpu_max_freq(cdev);
+
+       if (bone_not_connected_to_ac_power())
+               freq = MPUPLL_M_600;
+
+       if (board_is_bone_lt())
+               freq = MPUPLL_M_1000;
+
+       switch (freq) {
+       case MPUPLL_M_1000:
+               return &dpll_mpu_opp[ind][5];
+       case MPUPLL_M_800:
+               return &dpll_mpu_opp[ind][4];
+       case MPUPLL_M_720:
+               return &dpll_mpu_opp[ind][3];
+       case MPUPLL_M_600:
+               return &dpll_mpu_opp[ind][2];
+       case MPUPLL_M_500:
+               return &dpll_mpu_opp100;
+       case MPUPLL_M_300:
+               return &dpll_mpu_opp[ind][0];
+       }
 
-       if (board_is_bone() || board_is_bone_lt()) {
-               /* BeagleBone PMIC Code */
-               int usb_cur_lim;
+       return &dpll_mpu_opp[ind][0];
+}
 
-               /*
-                * Only perform PMIC configurations if board rev > A1
-                * on Beaglebone White
-                */
-               if (board_is_bone() && !strncmp(board_ti_get_rev(), "00A1", 4))
-                       return;
+static void scale_vcores_bone(int freq)
+{
+       int usb_cur_lim, mpu_vdd;
 
-               if (i2c_probe(TPS65217_CHIP_PM))
-                       return;
+       /*
+        * Only perform PMIC configurations if board rev > A1
+        * on Beaglebone White
+        */
+       if (board_is_bone() && !strncmp(board_ti_get_rev(), "00A1", 4))
+               return;
 
-               /*
-                * On Beaglebone White we need to ensure we have AC power
-                * before increasing the frequency.
-                */
-               if (board_is_bone()) {
-                       uchar pmic_status_reg;
-                       if (tps65217_reg_read(TPS65217_STATUS,
-                                             &pmic_status_reg))
-                               return;
-                       if (!(pmic_status_reg & TPS65217_PWR_SRC_AC_BITMASK)) {
-                               puts("No AC power, disabling frequency switch\n");
-                               return;
-                       }
-               }
+       if (i2c_probe(TPS65217_CHIP_PM))
+               return;
 
-               /*
-                * Override what we have detected since we know if we have
-                * a Beaglebone Black it supports 1GHz.
-                */
-               if (board_is_bone_lt())
-                       dpll_mpu_opp100.m = MPUPLL_M_1000;
+       /*
+        * On Beaglebone White we need to ensure we have AC power
+        * before increasing the frequency.
+        */
+       if (bone_not_connected_to_ac_power())
+               freq = MPUPLL_M_600;
 
-               /*
-                * Increase USB current limit to 1300mA or 1800mA and set
-                * the MPU voltage controller as needed.
-                */
-               if (dpll_mpu_opp100.m == MPUPLL_M_1000) {
-                       usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1800MA;
-                       mpu_vdd = TPS65217_DCDC_VOLT_SEL_1325MV;
-               } else {
-                       usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
-                       mpu_vdd = TPS65217_DCDC_VOLT_SEL_1275MV;
-               }
+       /*
+        * Override what we have detected since we know if we have
+        * a Beaglebone Black it supports 1GHz.
+        */
+       if (board_is_bone_lt())
+               freq = MPUPLL_M_1000;
 
-               if (tps65217_reg_write(TPS65217_PROT_LEVEL_NONE,
-                                      TPS65217_POWER_PATH,
-                                      usb_cur_lim,
-                                      TPS65217_USB_INPUT_CUR_LIMIT_MASK))
-                       puts("tps65217_reg_write failure\n");
+       if (freq == MPUPLL_M_1000) {
+               usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1800MA;
+               mpu_vdd = TPS65217_DCDC_VOLT_SEL_1325MV;
+       } else {
+               usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
+               mpu_vdd = TPS65217_DCDC_VOLT_SEL_1275MV;
+       }
 
-               /* Set DCDC3 (CORE) voltage to 1.125V */
-               if (tps65217_voltage_update(TPS65217_DEFDCDC3,
-                                           TPS65217_DCDC_VOLT_SEL_1125MV)) {
-                       puts("tps65217_voltage_update failure\n");
-                       return;
-               }
+       switch (freq) {
+       case MPUPLL_M_1000:
+               mpu_vdd = TPS65217_DCDC_VOLT_SEL_1325MV;
+               usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1800MA;
+               break;
+       case MPUPLL_M_800:
+               mpu_vdd = TPS65217_DCDC_VOLT_SEL_1275MV;
+               usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1800MA;
+               break;
+       case MPUPLL_M_720:
+               mpu_vdd = TPS65217_DCDC_VOLT_SEL_1200MV;
+               usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1800MA;
+               break;
+       case MPUPLL_M_600:
+       case MPUPLL_M_500:
+       case MPUPLL_M_300:
+               mpu_vdd = TPS65217_DCDC_VOLT_SEL_1100MV;
+               usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
+               break;
+       }
 
-               /* Set CORE Frequencies to OPP100 */
-               do_setup_dpll(&dpll_core_regs, &dpll_core_opp100);
+       if (tps65217_reg_write(TPS65217_PROT_LEVEL_NONE,
+                              TPS65217_POWER_PATH,
+                              usb_cur_lim,
+                              TPS65217_USB_INPUT_CUR_LIMIT_MASK))
+               puts("tps65217_reg_write failure\n");
 
-               /* Set DCDC2 (MPU) voltage */
-               if (tps65217_voltage_update(TPS65217_DEFDCDC2, mpu_vdd)) {
-                       puts("tps65217_voltage_update failure\n");
-                       return;
-               }
+       /* Set DCDC3 (CORE) voltage to 1.10V */
+       if (tps65217_voltage_update(TPS65217_DEFDCDC3,
+                                   TPS65217_DCDC_VOLT_SEL_1100MV)) {
+               puts("tps65217_voltage_update failure\n");
+               return;
+       }
 
-               /*
-                * Set LDO3, LDO4 output voltage to 3.3V for Beaglebone.
-                * Set LDO3 to 1.8V and LDO4 to 3.3V for Beaglebone Black.
-                */
-               if (board_is_bone()) {
-                       if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
-                                              TPS65217_DEFLS1,
-                                              TPS65217_LDO_VOLTAGE_OUT_3_3,
-                                              TPS65217_LDO_MASK))
-                               puts("tps65217_reg_write failure\n");
-               } else {
-                       if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
-                                              TPS65217_DEFLS1,
-                                              TPS65217_LDO_VOLTAGE_OUT_1_8,
-                                              TPS65217_LDO_MASK))
-                               puts("tps65217_reg_write failure\n");
-               }
+       /* Set DCDC2 (MPU) voltage */
+       if (tps65217_voltage_update(TPS65217_DEFDCDC2, mpu_vdd)) {
+               puts("tps65217_voltage_update failure\n");
+               return;
+       }
 
+       /*
+        * Set LDO3, LDO4 output voltage to 3.3V for Beaglebone.
+        * Set LDO3 to 1.8V and LDO4 to 3.3V for Beaglebone Black.
+        */
+       if (board_is_bone()) {
                if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
-                                      TPS65217_DEFLS2,
+                                      TPS65217_DEFLS1,
                                       TPS65217_LDO_VOLTAGE_OUT_3_3,
                                       TPS65217_LDO_MASK))
                        puts("tps65217_reg_write failure\n");
        } else {
-               int sil_rev;
+               if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
+                                      TPS65217_DEFLS1,
+                                      TPS65217_LDO_VOLTAGE_OUT_1_8,
+                                      TPS65217_LDO_MASK))
+                       puts("tps65217_reg_write failure\n");
+       }
 
-               /*
-                * The GP EVM, IDK and EVM SK use a TPS65910 PMIC.  For all
-                * MPU frequencies we support we use a CORE voltage of
-                * 1.1375V.  For MPU voltage we need to switch based on
-                * the frequency we are running at.
-                */
-               if (i2c_probe(TPS65910_CTRL_I2C_ADDR))
-                       return;
+       if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
+                              TPS65217_DEFLS2,
+                              TPS65217_LDO_VOLTAGE_OUT_3_3,
+                              TPS65217_LDO_MASK))
+               puts("tps65217_reg_write failure\n");
+}
 
-               /*
-                * Depending on MPU clock and PG we will need a different
-                * VDD to drive at that speed.
-                */
-               sil_rev = readl(&cdev->deviceid) >> 28;
-               mpu_vdd = am335x_get_tps65910_mpu_vdd(sil_rev,
-                                                     dpll_mpu_opp100.m);
+void scale_vcores_generic(int freq)
+{
+       int sil_rev, mpu_vdd;
 
-               /* Tell the TPS65910 to use i2c */
-               tps65910_set_i2c_control();
+       /*
+        * The GP EVM, IDK and EVM SK use a TPS65910 PMIC.  For all
+        * MPU frequencies we support we use a CORE voltage of
+        * 1.10V.  For MPU voltage we need to switch based on
+        * the frequency we are running at.
+        */
+       if (i2c_probe(TPS65910_CTRL_I2C_ADDR))
+               return;
 
-               /* First update MPU voltage. */
-               if (tps65910_voltage_update(MPU, mpu_vdd))
-                       return;
+       /*
+        * Depending on MPU clock and PG we will need a different
+        * VDD to drive at that speed.
+        */
+       sil_rev = readl(&cdev->deviceid) >> 28;
+       mpu_vdd = am335x_get_tps65910_mpu_vdd(sil_rev, freq);
 
-               /* Second, update the CORE voltage. */
-               if (tps65910_voltage_update(CORE, TPS65910_OP_REG_SEL_1_1_3))
-                       return;
+       /* Tell the TPS65910 to use i2c */
+       tps65910_set_i2c_control();
 
-               /* Set CORE Frequencies to OPP100 */
-               do_setup_dpll(&dpll_core_regs, &dpll_core_opp100);
-       }
+       /* First update MPU voltage. */
+       if (tps65910_voltage_update(MPU, mpu_vdd))
+               return;
+
+       /* Second, update the CORE voltage. */
+       if (tps65910_voltage_update(CORE, TPS65910_OP_REG_SEL_1_1_0))
+               return;
 
-       /* Set MPU Frequency to what we detected now that voltages are set */
-       do_setup_dpll(&dpll_mpu_regs, &dpll_mpu_opp100);
 }
 
-const struct dpll_params *get_dpll_ddr_params(void)
+void gpi2c_init(void)
 {
-       if (board_is_evm_sk())
-               return &dpll_ddr_evm_sk;
-       else if (board_is_bone_lt() || board_is_icev2())
-               return &dpll_ddr_bone_black;
-       else if (board_is_evm_15_or_later())
-               return &dpll_ddr_evm_sk;
+       /* When needed to be invoked prior to BSS initialization */
+       static bool first_time = true;
+
+       if (first_time) {
+               enable_i2c0_pin_mux();
+               i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED,
+                        CONFIG_SYS_OMAP24_I2C_SLAVE);
+               first_time = false;
+       }
+}
+
+void scale_vcores(void)
+{
+       int freq;
+
+       gpi2c_init();
+       freq = am335x_get_efuse_mpu_max_freq(cdev);
+
+       if (board_is_bone())
+               scale_vcores_bone(freq);
        else
-               return &dpll_ddr;
+               scale_vcores_generic(freq);
 }
 
 void set_uart_mux_conf(void)
@@ -892,3 +954,33 @@ void board_fit_image_post_process(void **p_image, size_t *p_size)
        secure_boot_verify_image(p_image, p_size);
 }
 #endif
+
+#if !CONFIG_IS_ENABLED(OF_CONTROL)
+static const struct omap_hsmmc_plat am335x_mmc0_platdata = {
+       .base_addr = (struct hsmmc *)OMAP_HSMMC1_BASE,
+       .cfg.host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_4BIT,
+       .cfg.f_min = 400000,
+       .cfg.f_max = 52000000,
+       .cfg.voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195,
+       .cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT,
+};
+
+U_BOOT_DEVICE(am335x_mmc0) = {
+       .name = "omap_hsmmc",
+       .platdata = &am335x_mmc0_platdata,
+};
+
+static const struct omap_hsmmc_plat am335x_mmc1_platdata = {
+       .base_addr = (struct hsmmc *)OMAP_HSMMC2_BASE,
+       .cfg.host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_8BIT,
+       .cfg.f_min = 400000,
+       .cfg.f_max = 52000000,
+       .cfg.voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195,
+       .cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT,
+};
+
+U_BOOT_DEVICE(am335x_mmc1) = {
+       .name = "omap_hsmmc",
+       .platdata = &am335x_mmc1_platdata,
+};
+#endif
index faa95d7da84de87bef6b3386b8e6772f85ea6d8a..5fa319d6152b64f5b9ec8f3b25108d3746d68704 100644 (file)
@@ -63,7 +63,7 @@ void set_muxconf_regs(void)
        MUX_AM3517CRANE();
 }
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);
index 2572029a256deeafd2b1e655ea18afe69b74b5e6..f44103d4d6fe250083aa833bb6d5e17449fb7022 100644 (file)
@@ -42,15 +42,14 @@ static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
 #ifdef CONFIG_TI_I2C_BOARD_DETECT
 void do_board_detect(void)
 {
-       if (ti_i2c_eeprom_am_get(-1, CONFIG_SYS_I2C_EEPROM_ADDR))
+       if (ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
+                                CONFIG_EEPROM_CHIP_ADDRESS))
                printf("ti_i2c_eeprom_init failed\n");
 }
 #endif
 
 #ifndef CONFIG_SKIP_LOWLEVEL_INIT
 
-#define NUM_OPPS       6
-
 const struct dpll_params dpll_mpu[NUM_CRYSTAL_FREQ][NUM_OPPS] = {
        {       /* 19.2 MHz */
                {125, 3, 2, -1, -1, -1, -1},    /* OPP 50 */
@@ -317,25 +316,6 @@ void emif_get_ext_phy_ctrl_const_regs(const u32 **regs, u32 *size)
        return;
 }
 
-/*
- * get_sys_clk_index : returns the index of the sys_clk read from
- *                     ctrl status register. This value is either
- *                     read from efuse or sysboot pins.
- */
-static u32 get_sys_clk_index(void)
-{
-       struct ctrl_stat *ctrl = (struct ctrl_stat *)CTRL_BASE;
-       u32 ind = readl(&ctrl->statusreg), src;
-
-       src = (ind & CTRL_CRYSTAL_FREQ_SRC_MASK) >> CTRL_CRYSTAL_FREQ_SRC_SHIFT;
-       if (src == CTRL_CRYSTAL_FREQ_SRC_EFUSE) /* Value read from EFUSE */
-               return ((ind & CTRL_CRYSTAL_FREQ_SELECTION_MASK) >>
-                       CTRL_CRYSTAL_FREQ_SELECTION_SHIFT);
-       else /* Value read from SYS BOOT pins */
-               return ((ind & CTRL_SYSBOOT_15_14_MASK) >>
-                       CTRL_SYSBOOT_15_14_SHIFT);
-}
-
 const struct dpll_params *get_dpll_ddr_params(void)
 {
        int ind = get_sys_clk_index();
index 6d444e09faf656277fcc3501cbc009702079c03b..3be697a6eaadd4c8dd85f4ac90ad2df5586d41c3 100644 (file)
@@ -661,7 +661,7 @@ err:
 }
 #endif
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        omap_mmc_init(0, 0, 0, -1, -1);
index e90fe1aba81e0c89e1c9a1ef661b23e3c24ddece..00d127e21b3a08f239d5c5def62c68e1019334e2 100644 (file)
@@ -36,7 +36,7 @@
 #include "beagle.h"
 #include <command.h>
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #include <usb.h>
 #include <asm/ehci-omap.h>
 #endif
@@ -524,21 +524,21 @@ void set_muxconf_regs(void)
        MUX_BEAGLE();
 }
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 void board_mmc_power_init(void)
 {
        twl4030_power_mmc_init(0);
 }
 #endif
 
-#if defined(CONFIG_USB_EHCI) && !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_USB_EHCI_HCD) && !defined(CONFIG_SPL_BUILD)
 /* Call usb_stop() before starting the kernel */
 void show_boot_progress(int val)
 {
@@ -563,7 +563,7 @@ int ehci_hcd_stop(int index)
        return omap_ehci_hcd_stop();
 }
 
-#endif /* CONFIG_USB_EHCI */
+#endif /* CONFIG_USB_EHCI_HCD */
 
 #if defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET)
 int board_eth_init(bd_t *bis)
index c55e24e321512cda5837e26299ce143f5970f19c..6fdcb6172c0dea5ff2ce01cbdfd570fa45a1e1be 100644 (file)
 
 #include <common.h>
 #include <asm/omap_common.h>
+#include <dm/uclass.h>
 #include <i2c.h>
 
 #include "board_detect.h"
 
+#if defined(CONFIG_DM_I2C_COMPAT)
+/**
+ * ti_i2c_set_alen - Set chip's i2c address length
+ * @bus_addr - I2C bus number
+ * @dev_addr - I2C eeprom id
+ * @alen     - I2C address length in bytes
+ *
+ * DM_I2C by default sets the address length to be used to 1. This
+ * function allows this address length to be changed to match the
+ * eeprom used for board detection.
+ */
+int __maybe_unused ti_i2c_set_alen(int bus_addr, int dev_addr, int alen)
+{
+       struct udevice *dev;
+       struct udevice *bus;
+       int rc;
+
+       rc = uclass_get_device_by_seq(UCLASS_I2C, bus_addr, &bus);
+       if (rc)
+               return rc;
+       rc = i2c_get_chip(bus, dev_addr, 1, &dev);
+       if (rc)
+               return rc;
+       rc = i2c_set_chip_offset_len(dev, alen);
+       if (rc)
+               return rc;
+
+       return 0;
+}
+#else
+int __maybe_unused ti_i2c_set_alen(int bus_addr, int dev_addr, int alen)
+{
+       return 0;
+}
+#endif
+
 /**
  * ti_i2c_eeprom_init - Initialize an i2c bus and probe for a device
  * @i2c_bus: i2c bus number to initialize
@@ -46,7 +83,17 @@ static int __maybe_unused ti_i2c_eeprom_init(int i2c_bus, int dev_addr)
 static int __maybe_unused ti_i2c_eeprom_read(int dev_addr, int offset,
                                             uchar *ep, int epsize)
 {
-       return i2c_read(dev_addr, offset, 2, ep, epsize);
+       int bus_num, rc, alen;
+
+       bus_num = i2c_get_bus_num();
+
+       alen = 2;
+
+       rc = ti_i2c_set_alen(bus_num, dev_addr, alen);
+       if (rc)
+               return rc;
+
+       return i2c_read(dev_addr, offset, alen, ep, epsize);
 }
 
 /**
@@ -88,6 +135,11 @@ static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr,
         * Read the header first then only read the other contents.
         */
        byte = 2;
+
+       rc = ti_i2c_set_alen(bus_addr, dev_addr, byte);
+       if (rc)
+               return rc;
+
        rc = i2c_read(dev_addr, 0x0, byte, (uint8_t *)&hdr_read, 4);
        if (rc)
                return rc;
@@ -100,9 +152,14 @@ static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr,
                 * 1 byte address (some legacy boards need this..)
                 */
                byte = 1;
-               if (rc)
+               if (rc) {
+                       rc = ti_i2c_set_alen(bus_addr, dev_addr, byte);
+                       if (rc)
+                               return rc;
+
                        rc = i2c_read(dev_addr, 0x0, byte, (uint8_t *)&hdr_read,
                                      4);
+               }
                if (rc)
                        return rc;
        }
index d8e48dd3f8283ba9d0d29c8501b4e2f7bf785736..8c02addd081eac15242f7ea98372f4f80b3e8c80 100644 (file)
@@ -702,7 +702,7 @@ err:
 }
 #endif
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        omap_mmc_init(0, 0, 0, -1, -1);
index 4f132e5107e332d1392241cc05db389a69d63164..fe8e79312f8b9ed2b7e745915534850f519ea0c6 100644 (file)
@@ -259,14 +259,14 @@ int board_eth_init(bd_t *bis)
 }
 #endif /* CONFIG_CMD_NET */
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 void board_mmc_power_init(void)
 {
        twl4030_power_mmc_init(0);
index 6e03f6bcd027296d6fcbb02c54df1df18c644555..21aec8f065627dd91a0b3b82a0e790cb233905b2 100644 (file)
@@ -196,7 +196,7 @@ s16 divn_val[16] = {
        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
 };
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        if (psc_enable_module(KS2_LPSC_MMC)) {
index 64d772ca6e74d1593c6a41d67fa6c5ec2003e740..b6cc417333854981d495c8f6204993c48bca92f0 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "mux_data.h"
 
-#if defined(CONFIG_USB_EHCI) || defined(CONFIG_USB_XHCI_OMAP)
+#if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_XHCI_OMAP)
 #include <sata.h>
 #include <usb.h>
 #include <asm/gpio.h>
@@ -151,7 +151,7 @@ int board_eth_init(bd_t *bis)
        return 0;
 }
 
-#if defined(CONFIG_USB_EHCI) || defined(CONFIG_USB_XHCI_OMAP)
+#if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_XHCI_OMAP)
 static void enable_host_clocks(void)
 {
        int auxclk;
@@ -211,7 +211,7 @@ void set_muxconf_regs(void)
                   sizeof(struct pad_conf_entry));
 }
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        omap_mmc_init(0, 0, 0, -1, -1);
@@ -220,7 +220,7 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 static struct omap_usbhs_board_data usbhs_bdata = {
        .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_HSIC,
index 187ff3cff4c4e4af4e64a9b2e12a99d478c11d71..72aabb242c8117c44f3f7106060a753319c6f3f7 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "panda_mux_data.h"
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #include <usb.h>
 #include <asm/arch/ehci.h>
 #include <asm/ehci-omap.h>
@@ -287,7 +287,7 @@ void set_muxconf_regs(void)
                           sizeof(struct pad_conf_entry));
 }
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);
@@ -301,7 +301,7 @@ void board_mmc_power_init(void)
 #endif
 #endif
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 
 static struct omap_usbhs_board_data usbhs_bdata = {
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
index 0eb60e4271eee5f10a78364e1c977e5083e877df..bc8d32f16125611a3098533d69c3fe990d1a72e3 100644 (file)
@@ -73,7 +73,7 @@ void set_muxconf_regs(void)
                                 sizeof(struct pad_conf_entry));
 }
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        omap_mmc_init(0, 0, 0, -1, -1);
index e85794c60e964e0682806c4cf605a2f129b92562..055a29d9c649ac23dd0e33b8d250ac765fb460b4 100644 (file)
@@ -111,7 +111,7 @@ int board_init(void)
        return 0;
 }
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        omap_mmc_init(1, 0, 0, -1, -1);
index 5f57956ca3d634b360f069c8cb70723e321d0e72..d31eeb878a8fc0d9f8b3e28d6e5a444095c0eb34 100644 (file)
@@ -131,14 +131,14 @@ void set_muxconf_regs(void)
        MUX_DEVKIT8000();
 }
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 void board_mmc_power_init(void)
 {
        twl4030_power_mmc_init(0);
index 09bebeb71b0146f094fb0d95ed4daef7305d21c8..45f1d5de390605e198f0b85db9fc13a82fce2f1b 100644 (file)
@@ -564,53 +564,6 @@ static iomux_v3_cfg_t const rgb_pads[] = {
        MX6_PAD_EIM_D31__IPU1_DISP1_DATA20 | MUX_PAD_CTRL(OUTPUT_RGB),
 };
 
-static iomux_v3_cfg_t const vga_pads[] = {
-#ifdef FOR_DL_SOLO
-       /* DualLite/Solo doesn't have IPU2 */
-       MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK,
-       MX6_PAD_DI0_PIN15__IPU1_DI0_PIN15,
-       MX6_PAD_DI0_PIN2__IPU1_DI0_PIN02,
-       MX6_PAD_DI0_PIN3__IPU1_DI0_PIN03,
-       MX6_PAD_DISP0_DAT0__IPU1_DISP0_DATA00,
-       MX6_PAD_DISP0_DAT1__IPU1_DISP0_DATA01,
-       MX6_PAD_DISP0_DAT2__IPU1_DISP0_DATA02,
-       MX6_PAD_DISP0_DAT3__IPU1_DISP0_DATA03,
-       MX6_PAD_DISP0_DAT4__IPU1_DISP0_DATA04,
-       MX6_PAD_DISP0_DAT5__IPU1_DISP0_DATA05,
-       MX6_PAD_DISP0_DAT6__IPU1_DISP0_DATA06,
-       MX6_PAD_DISP0_DAT7__IPU1_DISP0_DATA07,
-       MX6_PAD_DISP0_DAT8__IPU1_DISP0_DATA08,
-       MX6_PAD_DISP0_DAT9__IPU1_DISP0_DATA09,
-       MX6_PAD_DISP0_DAT10__IPU1_DISP0_DATA10,
-       MX6_PAD_DISP0_DAT11__IPU1_DISP0_DATA11,
-       MX6_PAD_DISP0_DAT12__IPU1_DISP0_DATA12,
-       MX6_PAD_DISP0_DAT13__IPU1_DISP0_DATA13,
-       MX6_PAD_DISP0_DAT14__IPU1_DISP0_DATA14,
-       MX6_PAD_DISP0_DAT15__IPU1_DISP0_DATA15,
-#else
-       MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK,
-       MX6_PAD_DI0_PIN15__IPU2_DI0_PIN15,
-       MX6_PAD_DI0_PIN2__IPU2_DI0_PIN02,
-       MX6_PAD_DI0_PIN3__IPU2_DI0_PIN03,
-       MX6_PAD_DISP0_DAT0__IPU2_DISP0_DATA00,
-       MX6_PAD_DISP0_DAT1__IPU2_DISP0_DATA01,
-       MX6_PAD_DISP0_DAT2__IPU2_DISP0_DATA02,
-       MX6_PAD_DISP0_DAT3__IPU2_DISP0_DATA03,
-       MX6_PAD_DISP0_DAT4__IPU2_DISP0_DATA04,
-       MX6_PAD_DISP0_DAT5__IPU2_DISP0_DATA05,
-       MX6_PAD_DISP0_DAT6__IPU2_DISP0_DATA06,
-       MX6_PAD_DISP0_DAT7__IPU2_DISP0_DATA07,
-       MX6_PAD_DISP0_DAT8__IPU2_DISP0_DATA08,
-       MX6_PAD_DISP0_DAT9__IPU2_DISP0_DATA09,
-       MX6_PAD_DISP0_DAT10__IPU2_DISP0_DATA10,
-       MX6_PAD_DISP0_DAT11__IPU2_DISP0_DATA11,
-       MX6_PAD_DISP0_DAT12__IPU2_DISP0_DATA12,
-       MX6_PAD_DISP0_DAT13__IPU2_DISP0_DATA13,
-       MX6_PAD_DISP0_DAT14__IPU2_DISP0_DATA14,
-       MX6_PAD_DISP0_DAT15__IPU2_DISP0_DATA15,
-#endif
-};
-
 static void do_enable_hdmi(struct display_info_t const *dev)
 {
        imx_enable_hdmi_phy();
index b2b12e451999615d2107e5fd8d9480d2897b60d2..e54afa1952606706be2390da4eba560feecc6f66 100644 (file)
@@ -111,22 +111,6 @@ static void setup_gpmi_nand(void)
 }
 #endif
 
-static iomux_v3_cfg_t const usdhc3_emmc_pads[] = {
-       MX7D_PAD_SD3_CLK__SD3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_CMD__SD3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_DATA0__SD3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_DATA1__SD3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_DATA2__SD3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_DATA3__SD3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_DATA4__SD3_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_DATA5__SD3_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_DATA6__SD3_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_DATA7__SD3_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-       MX7D_PAD_SD3_STROBE__SD3_STROBE  | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-
-       MX7D_PAD_SD3_RESET_B__GPIO6_IO11 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-};
-
 #ifdef CONFIG_VIDEO_MXS
 static iomux_v3_cfg_t const lcd_pads[] = {
        MX7D_PAD_LCD_CLK__LCD_CLK | MUX_PAD_CTRL(LCD_PAD_CTRL),
index 6e070fd55803bea739c006f9e50d3949d789cab6..0f59648b1fed192a2b1f70ead69df663f58d6556 100644 (file)
@@ -34,8 +34,7 @@ static void wdr4300_usb_start(void)
 static inline void wdr4300_usb_start(void) {}
 #endif
 
-#ifdef CONFIG_BOARD_EARLY_INIT_F
-int board_early_init_f(void)
+void wdr4300_pinmux_config(void)
 {
        void __iomem *regs;
 
@@ -56,9 +55,20 @@ int board_early_init_f(void)
        writel(0x00000000, regs + AR934X_GPIO_REG_OUT_FUNC3);
        writel(0x0000004d, regs + AR934X_GPIO_REG_OUT_FUNC4);
        writel(0x00000000, regs + AR934X_GPIO_REG_OUT_FUNC5);
+}
+
+#ifdef CONFIG_DEBUG_UART_BOARD_INIT
+void board_debug_uart_init(void)
+{
+       wdr4300_pinmux_config();
+}
+#endif
 
-#ifdef CONFIG_DEBUG_UART
-       debug_uart_init();
+#ifdef CONFIG_BOARD_EARLY_INIT_F
+int board_early_init_f(void)
+{
+#ifndef CONFIG_DEBUG_UART_BOARD_INIT
+       wdr4300_pinmux_config();
 #endif
 
 #ifndef CONFIG_SKIP_LOWLEVEL_INIT
index 92db093dbf85b3ff7b80870a400d18cc73405ba2..c48ab11fc41922c19d481756295793ef6c52056f 100644 (file)
@@ -486,20 +486,14 @@ int board_early_init_f (void)
 
 static int tfp410_read_reg(int reg, uchar *buf)
 {
-       if (i2c_read(CONFIG_SYS_TFP410_ADDR, reg, 1, buf, 1) != 0) {
-               puts ("Error reading the chip.\n");
-               return 1;
-       }
-       return 0;
+       puts("Error reading the chip.\n");
+       return -ENOSYS;
 }
 
 static int tfp410_write_reg(int reg, uchar buf)
 {
-       if (i2c_write(CONFIG_SYS_TFP410_ADDR, reg, 1, &buf, 1) != 0) {
-               puts ("Error writing the chip.\n");
-               return 1;
-       }
-       return 0;
+       puts("Error writing the chip.\n");
+       return -ENOSYS;
 }
 
 typedef struct _tfp410_config {
@@ -525,12 +519,9 @@ static int charon_last_stage_init(void)
 {
        volatile struct mpc5xxx_lpb *lpb =
                (struct mpc5xxx_lpb *) MPC5XXX_LPB;
-       int     oldbus = i2c_get_bus_num();
        uchar   buf;
        int     i = 0;
 
-       i2c_set_bus_num(CONFIG_SYS_TFP410_BUS);
-
        /* check version */
        if (tfp410_read_reg(TFP410_REG_DEV_ID_H, &buf) != 0)
                return -1;
@@ -551,7 +542,6 @@ static int charon_last_stage_init(void)
                i++;
        }
        printf("TFP410 initialized.\n");
-       i2c_set_bus_num(oldbus);
 
        /* set deadcycle for cs3 to 0 */
        setbits_be32(&lpb->cs_deadcycle, 0xffffcfff);
index ff3cce05f98922883f3c0fae91cdc649803b92c9..41ab8e8089fa2f2170961b3bfcea27f68d931a45 100644 (file)
@@ -157,7 +157,7 @@ static inline void print_baudrate(void)
 #endif
 }
 
-static inline void print_std_bdinfo(const bd_t *bd)
+static inline void __maybe_unused print_std_bdinfo(const bd_t *bd)
 {
        print_bi_boot_params(bd);
        print_bi_mem(bd);
index bc4dc5c529b87565c36c7d289e47a7e9533edfd4..6213c720cbf472371fd722f5e56673291f84693d 100644 (file)
--- a/cmd/cpu.c
+++ b/cmd/cpu.c
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2015 Google, Inc
  * Written by Simon Glass <sjg@chromium.org>
+ * Copyright (c) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
@@ -15,25 +16,21 @@ static const char *cpu_feature_name[CPU_FEAT_COUNT] = {
        "L1 cache",
        "MMU",
        "Microcode",
+       "Device ID",
 };
 
 static int print_cpu_list(bool detail)
 {
        struct udevice *dev;
-       struct uclass *uc;
        char buf[100];
-       int ret;
 
-       ret = uclass_get(UCLASS_CPU, &uc);
-       if (ret) {
-               printf("Cannot find CPU uclass\n");
-               return ret;
-       }
-       uclass_foreach_dev(dev, uc) {
+       for (uclass_first_device(UCLASS_CPU, &dev);
+                    dev;
+                    uclass_next_device(&dev)) {
                struct cpu_platdata *plat = dev_get_parent_platdata(dev);
                struct cpu_info info;
-               bool first;
-               int i;
+               bool first = true;
+               int ret, i;
 
                ret = cpu_get_desc(dev, buf, sizeof(buf));
                printf("%3d: %-10s %s\n", dev->seq, dev->name,
@@ -44,13 +41,12 @@ static int print_cpu_list(bool detail)
                if (ret) {
                        printf("\t(no detail available");
                        if (ret != -ENOSYS)
-                               printf(": err=%d\n", ret);
+                               printf(": err=%d", ret);
                        printf(")\n");
                        continue;
                }
                printf("\tID = %d, freq = ", plat->cpu_id);
                print_freq(info.cpu_freq, "");
-               first = true;
                for (i = 0; i < CPU_FEAT_COUNT; i++) {
                        if (info.features & (1 << i)) {
                                printf("%s%s", first ? ": " : ", ",
@@ -59,10 +55,9 @@ static int print_cpu_list(bool detail)
                        }
                }
                printf("\n");
-               if (info.features & (1 << CPU_FEAT_UCODE)) {
+               if (info.features & (1 << CPU_FEAT_UCODE))
                        printf("\tMicrocode version %#x\n",
                               plat->ucode_version);
-               }
                if (info.features & (1 << CPU_FEAT_DEVICE_ID))
                        printf("\tDevice ID %#lx\n", plat->device_id);
        }
@@ -70,7 +65,8 @@ static int print_cpu_list(bool detail)
        return 0;
 }
 
-static int do_cpu_list(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_cpu_list(cmd_tbl_t *cmdtp, int flag, int argc,
+                      char *const argv[])
 {
        if (print_cpu_list(false))
                return CMD_RET_FAILURE;
@@ -96,7 +92,7 @@ static cmd_tbl_t cmd_cpu_sub[] = {
  * Process a cpu sub-command
  */
 static int do_cpu(cmd_tbl_t *cmdtp, int flag, int argc,
-                      char * const argv[])
+                 char * const argv[])
 {
        cmd_tbl_t *c = NULL;
 
@@ -105,7 +101,8 @@ static int do_cpu(cmd_tbl_t *cmdtp, int flag, int argc,
        argv++;
 
        if (argc)
-               c = find_cmd_tbl(argv[0], cmd_cpu_sub, ARRAY_SIZE(cmd_cpu_sub));
+               c = find_cmd_tbl(argv[0], cmd_cpu_sub,
+                                ARRAY_SIZE(cmd_cpu_sub));
 
        if (c)
                return c->cmd(cmdtp, flag, argc, argv);
index 0a0e4a2c1cc8f365c5f4d9539dd91eeec24d0e9e..e43566bc56db6baaec5c3324319a5d6d4919a083 100644 (file)
@@ -73,11 +73,9 @@ void eeprom_init(int bus)
 #endif
 
        /* I2C EEPROM */
-#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
 #if defined(CONFIG_SYS_I2C)
        if (bus >= 0)
                i2c_set_bus_num(bus);
-#endif
        i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
 #endif
 }
index c59148f413cf2ef3873d1f4016ae08e3d16d3850..ad05f7ca5a32a62f115748c1b0972e89f678e15d 100644 (file)
--- a/cmd/io.c
+++ b/cmd/io.c
@@ -46,7 +46,8 @@ int do_io_iod(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 
 int do_io_iow(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {
-       ulong addr, size, val;
+       ulong addr, val;
+       int size;
 
        if (argc != 3)
                return CMD_RET_USAGE;
index 84173f86f2287d605bda095ddbb244b384db9795..bdfb16c0e098820f9f1c0a0cbe9853d5fafa782c 100644 (file)
--- a/cmd/led.c
+++ b/cmd/led.c
@@ -90,8 +90,6 @@ int do_led(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                return list_leds();
 
        cmd = argc > 2 ? get_led_cmd(argv[2]) : LEDST_COUNT;
-       if (cmd < 0)
-               return CMD_RET_USAGE;
 #ifdef CONFIG_LED_BLINK
        if (cmd == LEDST_BLINK) {
                if (argc < 4)
index b752927e8c690eb18f0ff328c1e5af85cb3ac8d4..1e1f0af35cc0b86c7f55836bcb3368c15d1a46e2 100644 (file)
@@ -309,16 +309,17 @@ static int is_spi_active(void)
 #ifdef CONFIG_CMD_NAND
 static int nand_burn_image(size_t image_size)
 {
-       int ret, block_size;
-       nand_info_t *nand;
+       int ret;
+       uint32_t block_size;
+       struct mtd_info *nand;
        int dev = nand_curr_device;
 
        if ((dev < 0) || (dev >= CONFIG_SYS_MAX_NAND_DEVICE) ||
-           (!nand_info[dev].name)) {
+           (!nand_info[dev]->name)) {
                puts("\nno devices available\n");
                return -ENOMEDIUM;
        }
-       nand = &nand_info[dev];
+       nand = nand_info[dev];
        block_size = nand->erasesize;
 
        /* Align U-Boot size to currently used blocksize */
@@ -334,8 +335,8 @@ static int nand_burn_image(size_t image_size)
        printf("Done!\n");
 
        /* Write the image to flash */
-       printf("Writing image:...");
-       printf("&image_size = 0x%p\n", (void *)&image_size);
+       printf("Writing %d bytes from 0x%lx to offset 0 ... ",
+              (int)image_size, get_load_addr());
        ret = nand_write(nand, 0, &image_size, (void *)get_load_addr());
        if (ret)
                printf("Error!\n");
index 9ca5cb58a702a1c476b2ef5b6165c81c8df6bef0..8f4e6bbe62714f0d78bef1c6c6dc922e9a2cbd43 100644 (file)
@@ -234,7 +234,6 @@ static int _do_env_set(int flag, int argc, char * const argv[], int env_flag)
        }
        debug("Final value for argc=%d\n", argc);
        name = argv[1];
-       value = argv[2];
 
        if (strchr(name, '=')) {
                printf("## Error: illegal character '='"
index 86225f1564bf2a30ef17c41d6464f5fb825859a6..14d01844adb16217fe86ace331a923476f39d86c 100644 (file)
@@ -85,6 +85,7 @@ obj-$(CONFIG_SCSI) += scsi.o
 obj-$(CONFIG_UPDATE_TFTP) += update.o
 obj-$(CONFIG_DFU_TFTP) += update.o
 obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
+obj-$(CONFIG_CMDLINE) += cli_readline.o cli_simple.o
 
 endif # !CONFIG_SPL_BUILD
 
@@ -95,7 +96,7 @@ obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o
 obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
 obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o
 obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o
-obj-$(CONFIG_SPL_OF_TRANSLATE) += fdt_support.o
+obj-$(CONFIG_SPL_OF_LIBFDT) += fdt_support.o
 ifdef CONFIG_SPL_USB_HOST_SUPPORT
 obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o
 obj-$(CONFIG_USB_STORAGE) += usb_storage.o
@@ -168,11 +169,9 @@ endif
 ifdef CONFIG_CMD_EEPROM_LAYOUT
 obj-y += eeprom/eeprom_field.o eeprom/eeprom_layout.o
 endif
-# We always have this since drivers/ddr/fs/interactive.c needs it
-obj-$(CONFIG_CMDLINE) += cli_simple.o
 
 obj-y += cli.o
-obj-$(CONFIG_CMDLINE) += cli_readline.o
+obj-$(CONFIG_FSL_DDR_INTERACTIVE) += cli_simple.o cli_readline.o
 obj-$(CONFIG_CMD_DFU) += dfu.o
 obj-y += command.o
 obj-y += s_record.o
index d9431ee79a86bbcb8d4a3fceabbc8f0d3ae0dc69..a212f2b53921356f730c4bd28d8515b2182385b2 100644 (file)
@@ -184,7 +184,7 @@ __weak int dram_init_banksize(void)
        return 0;
 }
 
-#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
+#if defined(CONFIG_SYS_I2C)
 static int init_func_i2c(void)
 {
        puts("I2C:   ");
@@ -740,7 +740,9 @@ static const init_fnc_t init_sequence_f[] = {
        /* get CPU and bus clocks according to the environment variable */
        get_clocks,             /* get CPU and bus clocks (etc.) */
 #endif
+#if !defined(CONFIG_M68K)
        timer_init,             /* initialize timer */
+#endif
 #if defined(CONFIG_BOARD_POSTCLK_INIT)
        board_postclk_init,
 #endif
@@ -765,7 +767,7 @@ static const init_fnc_t init_sequence_f[] = {
        misc_init_f,
 #endif
        INIT_FUNC_WATCHDOG_RESET
-#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
+#if defined(CONFIG_SYS_I2C)
        init_func_i2c,
 #endif
 #if defined(CONFIG_HARD_SPI)
index d69a33c4a3fdf5daac5d99537a508f31e2e0b9f3..28f32c38853ab3a05fb3c796df1299dc01bb9af6 100644 (file)
@@ -432,7 +432,7 @@ static int initr_onenand(void)
 }
 #endif
 
-#ifdef CONFIG_GENERIC_MMC
+#ifdef CONFIG_MMC
 static int initr_mmc(void)
 {
        puts("MMC:   ");
@@ -485,24 +485,7 @@ static int initr_env(void)
 
        /* Initialize from environment */
        load_addr = getenv_ulong("loadaddr", 16, load_addr);
-#if defined(CONFIG_SYS_EXTBDINFO)
-#if defined(CONFIG_405GP) || defined(CONFIG_405EP)
-#if defined(CONFIG_I2CFAST)
-       /*
-        * set bi_iic_fast for linux taking environment variable
-        * "i2cfast" into account
-        */
-       {
-               char *s = getenv("i2cfast");
 
-               if (s && ((*s == 'y') || (*s == 'Y'))) {
-                       gd->bd->bi_iic_fast[0] = 1;
-                       gd->bd->bi_iic_fast[1] = 1;
-               }
-       }
-#endif /* CONFIG_I2CFAST */
-#endif /* CONFIG_405GP, CONFIG_405EP */
-#endif /* CONFIG_SYS_EXTBDINFO */
        return 0;
 }
 
@@ -815,7 +798,7 @@ static init_fnc_t init_sequence_r[] = {
 #ifdef CONFIG_CMD_ONENAND
        initr_onenand,
 #endif
-#ifdef CONFIG_GENERIC_MMC
+#ifdef CONFIG_MMC
        initr_mmc,
 #endif
 #ifdef CONFIG_HAS_DATAFLASH
index 0e9f5f59c80a6a597eefada2c66d80c85d1bc6fa..546a1ab9b4c0db72963ab7f14a24d86c6b6f47c6 100644 (file)
@@ -88,7 +88,7 @@ exit:
        board_usb_cleanup(usbctrl_index, USB_INIT_DEVICE);
 
        if (dfu_reset)
-               run_command("reset", 0);
+               do_reset(NULL, 0, 0, NULL);
 
        g_dnl_clear_detach();
 
index e08e4209202e0ffa852ea75c2848ba0fc5a28238..19410aa4fcc52c3ff993dfe8d64a5b470d419c1b 100644 (file)
@@ -85,6 +85,7 @@ static void decode_timing(u8 *buf, struct display_timing *timing)
        uint x_mm, y_mm;
        unsigned int ha, hbl, hso, hspw, hborder;
        unsigned int va, vbl, vso, vspw, vborder;
+       struct edid_detailed_timing *t = (struct edid_detailed_timing *)buf;
 
        /* Edid contains pixel clock in terms of 10KHz */
        set_entry(&timing->pixelclock, (buf[0] + (buf[1] << 8)) * 10000);
@@ -111,6 +112,19 @@ static void decode_timing(u8 *buf, struct display_timing *timing)
        set_entry(&timing->vback_porch, vbl - vso - vspw);
        set_entry(&timing->vsync_len, vspw);
 
+       timing->flags = 0;
+       if (EDID_DETAILED_TIMING_FLAG_HSYNC_POLARITY(*t))
+               timing->flags |= DISPLAY_FLAGS_HSYNC_HIGH;
+       else
+               timing->flags |= DISPLAY_FLAGS_HSYNC_LOW;
+       if (EDID_DETAILED_TIMING_FLAG_VSYNC_POLARITY(*t))
+               timing->flags |= DISPLAY_FLAGS_VSYNC_HIGH;
+       else
+               timing->flags |= DISPLAY_FLAGS_VSYNC_LOW;
+
+       if (EDID_DETAILED_TIMING_FLAG_INTERLACED(*t))
+               timing->flags = DISPLAY_FLAGS_INTERLACED;
+
        debug("Detailed mode clock %u Hz, %d mm x %d mm\n"
              "               %04x %04x %04x %04x hborder %x\n"
              "               %04x %04x %04x %04x vborder %x\n",
@@ -122,6 +136,39 @@ static void decode_timing(u8 *buf, struct display_timing *timing)
              va + vbl, vborder);
 }
 
+/**
+ * Check if HDMI vendor specific data block is present in CEA block
+ * @param info CEA extension block
+ * @return true if block is found
+ */
+static bool cea_is_hdmi_vsdb_present(struct edid_cea861_info *info)
+{
+       u8 end, i = 0;
+
+       /* check for end of data block */
+       end = info->dtd_offset;
+       if (end == 0)
+               end = 127;
+       if (end < 4 || end > 127)
+               return false;
+       end -= 4;
+
+       while (i < end) {
+               /* Look for vendor specific data block of appropriate size */
+               if ((EDID_CEA861_DB_TYPE(*info, i) == EDID_CEA861_DB_VENDOR) &&
+                   (EDID_CEA861_DB_LEN(*info, i) >= 5)) {
+                       u8 *db = &info->data[i + 1];
+                       u32 oui = db[0] | (db[1] << 8) | (db[2] << 16);
+
+                       if (oui == HDMI_IEEE_OUI)
+                               return true;
+               }
+               i += EDID_CEA861_DB_LEN(*info, i) + 1;
+       }
+
+       return false;
+}
+
 int edid_get_timing(u8 *buf, int buf_size, struct display_timing *timing,
                    int *panel_bits_per_colourp)
 {
@@ -167,6 +214,15 @@ int edid_get_timing(u8 *buf, int buf_size, struct display_timing *timing,
                        ((edid->video_input_definition & 0x70) >> 3) + 4;
        }
 
+       timing->hdmi_monitor = false;
+       if (edid->extension_flag && (buf_size >= EDID_EXT_SIZE)) {
+               struct edid_cea861_info *info =
+                       (struct edid_cea861_info *)(buf + sizeof(*edid));
+
+               if (info->extension_tag == EDID_CEA861_EXTENSION_TAG)
+                       timing->hdmi_monitor = cea_is_hdmi_vsdb_present(info);
+       }
+
        return 0;
 }
 
index 5bfe5e3a89f02f83d74bfc957f99c97cce82d498..f965b4bbb6a917fb5f27642bc88b66f73ac2da96 100644 (file)
@@ -132,6 +132,10 @@ static int regex_callback(const char *name, const char *attributes, void *priv)
                if (slre_match(&slre, cbp->searched_for,
                               strlen(cbp->searched_for), caps)) {
                        free(cbp->regex);
+                       if (!attributes) {
+                               retval = -EINVAL;
+                               goto done;
+                       }
                        cbp->regex = malloc(strlen(regex) + 1);
                        if (cbp->regex) {
                                strcpy(cbp->regex, regex);
@@ -153,7 +157,7 @@ static int regex_callback(const char *name, const char *attributes, void *priv)
                }
        } else {
                printf("Error compiling regex: %s\n", slre.err_str);
-               retval = EINVAL;
+               retval = -EINVAL;
        }
 done:
        return retval;
index 6cc113d825a4057f6126ad33083156ff3222ef43..866982e41c0880940d9e25fe0164773323ac241a 100644 (file)
@@ -37,7 +37,7 @@ static int part_get_info_by_name_or_alias(struct blk_desc *dev_desc,
        int ret;
 
        ret = part_get_info_by_name(dev_desc, name, info);
-       if (ret) {
+       if (ret < 0) {
                /* strlen("fastboot_partition_alias_") + 32(part_name) + 1 */
                char env_alias_name[25 + 32 + 1];
                char *aliased_part_name;
@@ -153,7 +153,7 @@ void fb_mmc_flash_write(const char *cmd, void *download_buffer,
        }
 #endif
 
-       if (part_get_info_by_name_or_alias(dev_desc, cmd, &info)) {
+       if (part_get_info_by_name_or_alias(dev_desc, cmd, &info) < 0) {
                error("cannot find partition: '%s'\n", cmd);
                fastboot_fail("cannot find partition");
                return;
@@ -205,7 +205,7 @@ void fb_mmc_erase(const char *cmd)
        }
 
        ret = part_get_info_by_name_or_alias(dev_desc, cmd, &info);
-       if (ret) {
+       if (ret < 0) {
                error("cannot find partition: '%s'", cmd);
                fastboot_fail("cannot find partition");
                return;
index ee03b96aaa83d55df3292ce5407850a62e82d1c5..c668407817c8701a7bcce11450f300362ab0b390 100644 (file)
@@ -161,6 +161,9 @@ int android_image_get_ramdisk(const struct andr_img_hdr *hdr,
 void android_print_contents(const struct andr_img_hdr *hdr)
 {
        const char * const p = IMAGE_INDENT_STRING;
+       /* os_version = ver << 11 | lvl */
+       u32 os_ver = hdr->os_version >> 11;
+       u32 os_lvl = hdr->os_version & ((1U << 11) - 1);
 
        printf("%skernel size:      %x\n", p, hdr->kernel_size);
        printf("%skernel address:   %x\n", p, hdr->kernel_addr);
@@ -170,6 +173,12 @@ void android_print_contents(const struct andr_img_hdr *hdr)
        printf("%ssecond address:   %x\n", p, hdr->second_addr);
        printf("%stags address:     %x\n", p, hdr->tags_addr);
        printf("%spage size:        %x\n", p, hdr->page_size);
+       /* ver = A << 14 | B << 7 | C         (7 bits for each of A, B, C)
+        * lvl = ((Y - 2000) & 127) << 4 | M  (7 bits for Y, 4 bits for M) */
+       printf("%sos_version:       %x (ver: %u.%u.%u, level: %u.%u)\n",
+              p, hdr->os_version,
+              (os_ver >> 7) & 0x7F, (os_ver >> 14) & 0x7F, os_ver & 0x7F,
+              (os_lvl >> 4) + 2000, os_lvl & 0x0F);
        printf("%sname:             %s\n", p, hdr->name);
        printf("%scmdline:          %s\n", p, hdr->cmdline);
 }
index 783626e3d54caf4fbdd4940892023a9171ded5df..2405146cf09042e58a352a7aa29bd5dbacf93090 100644 (file)
@@ -704,7 +704,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
                }
                break;
 #endif /* CONFIG_BMP_16BPP */
-#if defined(CONFIG_BMP_24BMP)
+#if defined(CONFIG_BMP_24BPP)
        case 24:
                for (i = 0; i < height; ++i) {
                        for (j = 0; j < width; j++) {
@@ -716,7 +716,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
                        fb -= lcd_line_length + width * (bpix / 8);
                }
                break;
-#endif /* CONFIG_BMP_24BMP */
+#endif /* CONFIG_BMP_24BPP */
 #if defined(CONFIG_BMP_32BPP)
        case 32:
                for (i = 0; i < height; ++i) {
index 2ba00f6d34c040d81c192636ba8df26a4b5a30d8..d7e9fc9f65cdd705c0572cd9987d580db6fd4436 100644 (file)
@@ -8,25 +8,54 @@
  */
 
 #include <common.h>
+#include <dm.h>
 #include <lcd.h>
 #include <fdt_support.h>
 #include <libfdt.h>
+#include <video.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
 static int lcd_dt_simplefb_configure_node(void *blob, int off)
 {
-       int vl_col = lcd_get_pixel_width();
-       int vl_row = lcd_get_pixel_height();
-#if LCD_BPP == LCD_COLOR16
-       return fdt_setup_simplefb_node(blob, off, gd->fb_base, vl_col, vl_row,
-                                      vl_col * 2, "r5g6b5");
-#elif LCD_BPP == LCD_COLOR32
-       return fdt_setup_simplefb_node(blob, off, gd->fb_base, vl_col, vl_row,
-                                      vl_col * 4, "a8r8g8b8");
+       int xsize, ysize;
+       int bpix; /* log2 of bits per pixel */
+       const char *name;
+       ulong fb_base;
+#ifdef CONFIG_DM_VIDEO
+       struct video_uc_platdata *plat;
+       struct video_priv *uc_priv;
+       struct udevice *dev;
+       int ret;
+
+       ret = uclass_first_device_err(UCLASS_VIDEO, &dev);
+       if (ret)
+               return ret;
+       uc_priv = dev_get_uclass_priv(dev);
+       plat = dev_get_uclass_platdata(dev);
+       xsize = uc_priv->xsize;
+       ysize = uc_priv->ysize;
+       bpix = uc_priv->bpix;
+       fb_base = plat->base;
 #else
-       return -1;
+       xsize = lcd_get_pixel_width();
+       ysize = lcd_get_pixel_height();
+       bpix = LCD_BPP;
+       fb_base = gd->fb_base;
 #endif
+       switch (bpix) {
+       case 4: /* VIDEO_BPP16 */
+               name = "r5g6b5";
+               break;
+       case 5: /* VIDEO_BPP32 */
+               name = "a8r8g8b8";
+               break;
+       default:
+               return -EINVAL;
+       }
+
+       return fdt_setup_simplefb_node(blob, off, fb_base, xsize, ysize,
+                                      xsize * (1 << bpix) / 8, name);
 }
 
 int lcd_dt_simplefb_add_node(void *blob)
index d37222cc6b802ceb119b1e60aa78138ff05e451e..c456f5a717f48cb44098319f3b1f25c92ebc9a96 100644 (file)
@@ -549,6 +549,52 @@ removable:
  * to the user if mode = 1
  */
 #if defined(CONFIG_DM_SCSI)
+static int do_scsi_scan_one(struct udevice *dev, int id, int lun, int mode)
+{
+       int ret;
+       struct udevice *bdev;
+       struct blk_desc bd;
+       struct blk_desc *bdesc;
+       char str[10];
+
+       /*
+        * detect the scsi driver to get information about its geometry (block
+        * size, number of blocks) and other parameters (ids, type, ...)
+        */
+       scsi_init_dev_desc_priv(&bd);
+       if (scsi_detect_dev(id, lun, &bd))
+               return -ENODEV;
+
+       /*
+       * Create only one block device and do detection
+       * to make sure that there won't be a lot of
+       * block devices created
+       */
+       snprintf(str, sizeof(str), "id%dlun%d", id, lun);
+       ret = blk_create_devicef(dev, "scsi_blk", str, IF_TYPE_SCSI, -1,
+                       bd.blksz, bd.blksz * bd.lba, &bdev);
+       if (ret) {
+               debug("Can't create device\n");
+               return ret;
+       }
+
+       bdesc = dev_get_uclass_platdata(bdev);
+       bdesc->target = id;
+       bdesc->lun = lun;
+       bdesc->removable = bd.removable;
+       bdesc->type = bd.type;
+       memcpy(&bdesc->vendor, &bd.vendor, sizeof(bd.vendor));
+       memcpy(&bdesc->product, &bd.product, sizeof(bd.product));
+       memcpy(&bdesc->revision, &bd.revision,  sizeof(bd.revision));
+       part_init(bdesc);
+
+       if (mode == 1) {
+               printf("  Device %d: ", 0);
+               dev_print(bdesc);
+       }
+       return 0;
+}
+
 int scsi_scan(int mode)
 {
        unsigned char i, lun;
@@ -576,59 +622,9 @@ int scsi_scan(int mode)
                /* Get controller platdata */
                plat = dev_get_platdata(dev);
 
-               for (i = 0; i < plat->max_id; i++) {
-                       for (lun = 0; lun < plat->max_lun; lun++) {
-                               struct udevice *bdev; /* block device */
-                               /* block device description */
-                               struct blk_desc _bd;
-                               struct blk_desc *bdesc;
-                               char str[10];
-
-                               scsi_init_dev_desc_priv(&_bd);
-                               ret = scsi_detect_dev(i, lun, &_bd);
-                               if (ret)
-                                       /*
-                                        * no device detected?
-                                        * check the next lun.
-                                        */
-                                       continue;
-
-                               /*
-                                * Create only one block device and do detection
-                                * to make sure that there won't be a lot of
-                                * block devices created
-                                */
-                               snprintf(str, sizeof(str), "id%dlun%d", i, lun);
-                               ret = blk_create_devicef(dev, "scsi_blk",
-                                               str, IF_TYPE_SCSI,
-                                               -1,
-                                               _bd.blksz,
-                                               _bd.blksz * _bd.lba,
-                                               &bdev);
-                               if (ret) {
-                                       debug("Can't create device\n");
-                                       return ret;
-                               }
-
-                               bdesc = dev_get_uclass_platdata(bdev);
-                               bdesc->target = i;
-                               bdesc->lun = lun;
-                               bdesc->removable = _bd.removable;
-                               bdesc->type = _bd.type;
-                               memcpy(&bdesc->vendor, &_bd.vendor,
-                                      sizeof(_bd.vendor));
-                               memcpy(&bdesc->product, &_bd.product,
-                                      sizeof(_bd.product));
-                               memcpy(&bdesc->revision, &_bd.revision,
-                                      sizeof(_bd.revision));
-                               part_init(bdesc);
-
-                               if (mode == 1) {
-                                       printf("  Device %d: ", 0);
-                                       dev_print(bdesc);
-                               } /* if mode */
-                       } /* next LUN */
-               }
+               for (i = 0; i < plat->max_id; i++)
+                       for (lun = 0; lun < plat->max_lun; lun++)
+                               do_scsi_scan_one(dev, i, lun, mode);
        }
 
        return 0;
index ea6fbb60adf792269b0a383fa72969c003c41c57..5ed3f19ac3a65bcbdd52e648e0d18ccd4ee5044f 100644 (file)
@@ -6,6 +6,9 @@ config SUPPORT_SPL
 config SUPPORT_TPL
        bool
 
+config SPL_DFU_NO_RESET
+       bool
+
 config SPL
        bool
        depends on SUPPORT_SPL
@@ -371,7 +374,7 @@ config SPL_LIBGENERIC_SUPPORT
 
 config SPL_MMC_SUPPORT
        bool "Support MMC"
-       depends on SPL && GENERIC_MMC
+       depends on SPL && MMC
        help
          Enable support for MMC (Multimedia Card) within SPL. This enables
          the MMC protocol implementation and allows any enabled drivers to
@@ -646,6 +649,8 @@ config SPL_USBETH_SUPPORT
 config SPL_DFU_SUPPORT
        bool "Support DFU (Device Firmware Upgarde)"
        select SPL_HASH_SUPPORT
+       select SPL_DFU_NO_RESET
+       depends on SPL_RAM_SUPPORT
        help
          This feature enables the DFU (Device Firmware Upgarde) in SPL with
          RAM memory device support. The ROM code will load and execute
@@ -688,6 +693,20 @@ config SPL_YMODEM_SUPPORT
          means of transmitting U-Boot over a serial line for using in SPL,
          with a checksum to ensure correctness.
 
+config SPL_ATF_SUPPORT
+       bool "Support ARM Trusted Firmware"
+       depends on SPL && ARM64
+       help
+         ATF(ARM Trusted Firmware) is a component for ARM arch64 which which
+         is loaded by SPL(which is considered as BL2 in ATF terminology).
+         More detail at: https://github.com/ARM-software/arm-trusted-firmware
+
+config SPL_ATF_TEXT_BASE
+       depends on SPL_ATF_SUPPORT
+       hex "ATF BL31 base address"
+       help
+         This is the base address in memory for ATF BL31 text and entry point.
+
 config TPL_ENV_SUPPORT
        bool "Support an environment"
        depends on TPL
@@ -724,7 +743,7 @@ config TPL_MPC8XXX_INIT_DDR_SUPPORT
 
 config TPL_MMC_SUPPORT
        bool "Support MMC"
-       depends on TPL
+       depends on TPL && MMC
        help
          Enable support for MMC within TPL. See SPL_MMC_SUPPORT for details.
 
index 1933cbdfed0c37e9e192f71a1436f5f14cf81d77..b3b34d62774266f308a4197a9dada493c57a4554 100644 (file)
@@ -20,6 +20,7 @@ endif
 obj-$(CONFIG_SPL_UBI) += spl_ubi.o
 obj-$(CONFIG_SPL_NET_SUPPORT) += spl_net.o
 obj-$(CONFIG_SPL_MMC_SUPPORT) += spl_mmc.o
+obj-$(CONFIG_SPL_ATF_SUPPORT) += spl_atf.o
 obj-$(CONFIG_SPL_USB_SUPPORT) += spl_usb.o
 obj-$(CONFIG_SPL_FAT_SUPPORT) += spl_fat.o
 obj-$(CONFIG_SPL_EXT_SUPPORT) += spl_ext.o
index 50828e6021812909c65aec01c1bc1d868ddf560d..0a49766f21422c25c2756969bbc41b70b9c9c580 100644 (file)
@@ -17,6 +17,7 @@
 #include <malloc.h>
 #include <dm/root.h>
 #include <linux/compiler.h>
+#include <fdt_support.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -56,6 +57,14 @@ __weak int spl_start_uboot(void)
        return 1;
 }
 
+/* weak default platform specific function to initialize
+ * dram banks
+ */
+__weak int dram_init_banksize(void)
+{
+       return 0;
+}
+
 /*
  * Weak default function for arch specific zImage check. Return zero
  * and fill start and end address if image is recognized.
@@ -66,6 +75,33 @@ int __weak bootz_setup(ulong image, ulong *start, ulong *end)
 }
 #endif
 
+void spl_fixup_fdt(void)
+{
+#if defined(CONFIG_SPL_OF_LIBFDT) && defined(CONFIG_SYS_SPL_ARGS_ADDR)
+       void *fdt_blob = (void *)CONFIG_SYS_SPL_ARGS_ADDR;
+       int err;
+
+       err = fdt_check_header(fdt_blob);
+       if (err < 0) {
+               printf("fdt_root: %s\n", fdt_strerror(err));
+               return;
+       }
+
+       /* fixup the memory dt node */
+       err = fdt_shrink_to_minimum(fdt_blob, 0);
+       if (err == 0) {
+               printf("spl: fdt_shrink_to_minimum err - %d\n", err);
+               return;
+       }
+
+       err = arch_fixup_fdt(fdt_blob);
+       if (err) {
+               printf("spl: arch_fixup_fdt err - %d\n", err);
+               return;
+       }
+#endif
+}
+
 /*
  * Weak default function for board specific cleanup/preparation before
  * Linux boot. Some boards/platforms might not need it, so just provide
@@ -322,6 +358,10 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
        struct spl_image_info spl_image;
 
        debug(">>spl:board_init_r()\n");
+       gd->bd = &bdata;
+#ifdef CONFIG_SPL_OS_BOOT
+       dram_init_banksize();
+#endif
 
 #if defined(CONFIG_SYS_SPL_MALLOC_START)
        mem_malloc_init(CONFIG_SYS_SPL_MALLOC_START,
@@ -363,6 +403,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
 #ifdef CONFIG_SPL_OS_BOOT
        case IH_OS_LINUX:
                debug("Jumping to Linux\n");
+               spl_fixup_fdt();
                spl_board_prepare_for_linux();
                jump_to_image_linux(&spl_image);
 #endif
@@ -374,6 +415,11 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
              gd->malloc_ptr / 1024);
 #endif
 
+       if (IS_ENABLED(CONFIG_SPL_ATF_SUPPORT)) {
+               debug("loaded - jumping to U-Boot via ATF BL31.\n");
+               bl31_entry();
+       }
+
        debug("loaded - jumping to U-Boot...\n");
        spl_board_prepare_for_boot();
        jump_to_image_no_args(&spl_image);
@@ -385,7 +431,6 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
  */
 void preloader_console_init(void)
 {
-       gd->bd = &bdata;
        gd->baudrate = CONFIG_BAUDRATE;
 
        serial_init();          /* serial communications setup */
diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c
new file mode 100644 (file)
index 0000000..6e8f928
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * Reference to the ARM TF Project,
+ * plat/arm/common/arm_bl2_setup.c
+ * Portions copyright (c) 2013-2016, ARM Limited and Contributors. All rights
+ * reserved.
+ * Copyright (C) 2016 Rockchip Electronic Co.,Ltd
+ * Written by Kever Yang <kever.yang@rock-chips.com>
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+#include <common.h>
+#include <atf_common.h>
+#include <errno.h>
+#include <spl.h>
+
+static struct bl2_to_bl31_params_mem bl31_params_mem;
+static struct bl31_params *bl2_to_bl31_params;
+
+/**
+ * bl2_plat_get_bl31_params() - prepare params for bl31.
+ *
+ * This function assigns a pointer to the memory that the platform has kept
+ * aside to pass platform specific and trusted firmware related information
+ * to BL31. This memory is allocated by allocating memory to
+ * bl2_to_bl31_params_mem structure which is a superset of all the
+ * structure whose information is passed to BL31
+ * NOTE: This function should be called only once and should be done
+ * before generating params to BL31
+ *
+ * @return bl31 params structure pointer
+ */
+struct bl31_params *bl2_plat_get_bl31_params(void)
+{
+       struct entry_point_info *bl33_ep_info;
+
+       /*
+        * Initialise the memory for all the arguments that needs to
+        * be passed to BL31
+        */
+       memset(&bl31_params_mem, 0, sizeof(struct bl2_to_bl31_params_mem));
+
+       /* Assign memory for TF related information */
+       bl2_to_bl31_params = &bl31_params_mem.bl31_params;
+       SET_PARAM_HEAD(bl2_to_bl31_params, ATF_PARAM_BL31, ATF_VERSION_1, 0);
+
+       /* Fill BL31 related information */
+       SET_PARAM_HEAD(bl2_to_bl31_params->bl31_image_info,
+                      ATF_PARAM_IMAGE_BINARY, ATF_VERSION_1, 0);
+
+       /* Fill BL32 related information if it exists */
+#ifdef BL32_BASE
+       bl2_to_bl31_params->bl32_ep_info = &bl31_params_mem.bl32_ep_info;
+       SET_PARAM_HEAD(bl2_to_bl31_params->bl32_ep_info, ATF_PARAM_EP,
+                      ATF_VERSION_1, 0);
+       bl2_to_bl31_params->bl32_image_info = &bl31_params_mem.bl32_image_info;
+       SET_PARAM_HEAD(bl2_to_bl31_params->bl32_image_info,
+                      ATF_PARAM_IMAGE_BINARY, ATF_VERSION_1, 0);
+#endif /* BL32_BASE */
+
+       /* Fill BL33 related information */
+       bl2_to_bl31_params->bl33_ep_info = &bl31_params_mem.bl33_ep_info;
+       bl33_ep_info = &bl31_params_mem.bl33_ep_info;
+       SET_PARAM_HEAD(bl33_ep_info, ATF_PARAM_EP, ATF_VERSION_1,
+                      ATF_EP_NON_SECURE);
+
+       /* BL33 expects to receive the primary CPU MPID (through x0) */
+       bl33_ep_info->args.arg0 = 0xffff & read_mpidr();
+       bl33_ep_info->pc = CONFIG_SYS_TEXT_BASE;
+       bl33_ep_info->spsr = SPSR_64(MODE_EL2, MODE_SP_ELX,
+                                    DISABLE_ALL_EXECPTIONS);
+
+       bl2_to_bl31_params->bl33_image_info = &bl31_params_mem.bl33_image_info;
+       SET_PARAM_HEAD(bl2_to_bl31_params->bl33_image_info,
+                      ATF_PARAM_IMAGE_BINARY, ATF_VERSION_1, 0);
+
+       return bl2_to_bl31_params;
+}
+
+void raw_write_daif(unsigned int daif)
+{
+       __asm__ __volatile__("msr DAIF, %0\n\t" : : "r" (daif) : "memory");
+}
+
+void bl31_entry(void)
+{
+       struct bl31_params *bl31_params;
+       void (*entry)(struct bl31_params *params, void *plat_params) = NULL;
+
+       bl31_params = bl2_plat_get_bl31_params();
+       entry = (void *)CONFIG_SPL_ATF_TEXT_BASE;
+
+       raw_write_daif(SPSR_EXCEPTION_MASK);
+       dcache_disable();
+
+       entry(bl31_params, NULL);
+}
index 925a1b149157bf337b9983c7aeddb19a5d789ce9..42880d56b91046b08dfd790c5c1275e7b81469e6 100644 (file)
@@ -15,6 +15,8 @@
 #include <errno.h>
 #include <spl.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #ifdef CONFIG_SPL_OS_BOOT
 /*
  * Load the kernel, check for a valid header we can parse, and if found load
@@ -70,6 +72,7 @@ static int spl_spi_load_image(struct spl_image_info *spl_image,
                              struct spl_boot_device *bootdev)
 {
        int err = 0;
+       unsigned payload_offs = CONFIG_SYS_SPI_U_BOOT_OFFS;
        struct spi_flash *flash;
        struct image_header *header;
 
@@ -89,12 +92,18 @@ static int spl_spi_load_image(struct spl_image_info *spl_image,
        /* use CONFIG_SYS_TEXT_BASE as temporary storage area */
        header = (struct image_header *)(CONFIG_SYS_TEXT_BASE);
 
+#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
+       payload_offs = fdtdec_get_config_int(gd->fdt_blob,
+                                            "u-boot,spl-payload-offset",
+                                            payload_offs);
+#endif
+
 #ifdef CONFIG_SPL_OS_BOOT
        if (spl_start_uboot() || spi_load_image_os(spl_image, flash, header))
 #endif
        {
                /* Load u-boot, mkimage header is 64 bytes. */
-               err = spi_flash_read(flash, CONFIG_SYS_SPI_U_BOOT_OFFS, 0x40,
+               err = spi_flash_read(flash, payload_offs, 0x40,
                                     (void *)header);
                if (err) {
                        debug("%s: Failed to read from SPI flash (err=%d)\n",
@@ -113,13 +122,13 @@ static int spl_spi_load_image(struct spl_image_info *spl_image,
                        load.bl_len = 1;
                        load.read = spl_spi_fit_read;
                        err = spl_load_simple_fit(spl_image, &load,
-                                                 CONFIG_SYS_SPI_U_BOOT_OFFS,
+                                                 payload_offs,
                                                  header);
                } else {
                        err = spl_parse_image_header(spl_image, header);
                        if (err)
                                return err;
-                       err = spi_flash_read(flash, CONFIG_SYS_SPI_U_BOOT_OFFS,
+                       err = spi_flash_read(flash, payload_offs,
                                             spl_image->size,
                                             (void *)spl_image->load_addr);
                }
index 4d300175301877c1aeeb438fc67ccb3389fedceb..ee4f0bda9ea72f69efbefcaa3849a3f5b8f422ca 100644 (file)
@@ -21,7 +21,7 @@
 #include <logbuff.h>
 #endif
 
-#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
+#if defined(CONFIG_SYS_I2C)
 #include <i2c.h>
 #endif
 
@@ -346,9 +346,6 @@ int stdio_add_devices(void)
 #ifdef CONFIG_SYS_I2C
        i2c_init_all();
 #else
-#if defined(CONFIG_HARD_I2C)
-       i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-#endif
 #endif
 #ifdef CONFIG_DM_VIDEO
        /*
index 83279c449df5b7d8e844f0942dad69b05fad9101..03171f74cb02849571eaee69561c12d1957c6161 100644 (file)
@@ -100,7 +100,7 @@ struct us_data {
        trans_cmnd      transport;              /* transport routine */
 };
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 /*
  * The U-Boot EHCI driver can handle any transfer length as long as there is
  * enough free heap space left, but the SCSI READ(10) and WRITE(10) commands are
index dbe060f0016cd40b9ebd5a61453586a0923096e9..38417e79641ac4c4865909fa993e1cb32ee9d5bc 100644 (file)
@@ -16,5 +16,6 @@ CONFIG_CMD_EXT2=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index a97ce25a280a3de6901c0e77d2802482590c8ac7..4a7ff1b9ebb8b0b482162c2ff38f67d3dfed0f39 100644 (file)
@@ -20,5 +20,6 @@ CONFIG_CMD_FAT=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index c61f260dc3b1316daeaec54be05ad03518239109..7c67d8c01ea610e4c2364f574c56e934e453240c 100644 (file)
@@ -20,5 +20,6 @@ CONFIG_CMD_FAT=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 774ecb81b53220fb72df43a05f202d8b319c3266..787ac9dbcea2e0910c0e554f074d971b24fa0cf0 100644 (file)
@@ -17,5 +17,6 @@ CONFIG_CMD_FAT=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 717fee1cfe0f696eb92db9059278f8b420a36589..2f3e7b016287015408e2da0cb87803de0caeccbc 100644 (file)
@@ -17,5 +17,6 @@ CONFIG_CMD_FAT=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 7d719f81f52713380965e407d8aeb6580fe164f9..02ca577e28c11e2359fc23c4f37b038b86d31b3b 100644 (file)
@@ -10,7 +10,6 @@ CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_ASKENV=y
 CONFIG_LOOPW=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
@@ -19,7 +18,6 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_SNTP=y
 CONFIG_CMD_BMP=y
 CONFIG_CMD_BSP=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_DIAG=y
index 38101f05df5dbad52914b7985a61676b277f74b0..c0e9541b875156d417b4f0f281151329b9b0e52a 100644 (file)
@@ -4,7 +4,6 @@ CONFIG_TARGET_O2D300=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_BOOTDELAY=5
 CONFIG_HUSH_PARSER=y
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
index 83006e5582ce950782a9b8a84e377ebf4609952f..8cff44cf36ed46c4b3582aaaf8f9fe2b87dffe82 100644 (file)
@@ -8,7 +8,6 @@ CONFIG_HUSH_PARSER=y
 CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_PROMPT="Autobooting in %d seconds, press password to stop\n"
 CONFIG_AUTOBOOT_STOP_STR="++++++++++"
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
index 4202d852032965ccd5cb5c1a5fb44c7d7e5e663e..f29abb83bc5572bce45ab190643db6f60cdf5599 100644 (file)
@@ -7,7 +7,6 @@ CONFIG_HUSH_PARSER=y
 CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_PROMPT="Autobooting in %d seconds, press password to stop\n"
 CONFIG_AUTOBOOT_STOP_STR="++++++++++"
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
index b84a1c883963495d3bc19dd380179c79c762b54b..534cfe12e26e934dd3a6264507fc05c63781e1c9 100644 (file)
@@ -4,7 +4,6 @@ CONFIG_TARGET_O2D=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_BOOTDELAY=5
 CONFIG_HUSH_PARSER=y
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
index efcc769ff473d77819cbfd98d2a7742af88024cb..acf42abe29860d063b8e0b0e4ec2bd790316d675 100644 (file)
@@ -4,7 +4,6 @@ CONFIG_TARGET_O2I=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_BOOTDELAY=5
 CONFIG_HUSH_PARSER=y
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
index abdc53df21ef46692beb51cf10fae2abd5171082..de647c76b94c3c5ef80aa888feed8a0474bb95e7 100644 (file)
@@ -5,7 +5,6 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="IFM_SENSOR_TYPE=\"O2M110\""
 CONFIG_BOOTDELAY=5
 CONFIG_HUSH_PARSER=y
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
index 06089fe3cfbdde1464128e4dff2aedf594307881..b243e9cc0ed0e53c58fb1630faba1fd0828028ef 100644 (file)
@@ -5,7 +5,6 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="IFM_SENSOR_TYPE=\"O2M112\""
 CONFIG_BOOTDELAY=5
 CONFIG_HUSH_PARSER=y
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
index 1ea3f3a09bef900605e9df0a5909ef308e9ce780..1584058289306b4328e5a0b7937b936172ed9337 100644 (file)
@@ -5,7 +5,6 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="IFM_SENSOR_TYPE=\"O2M113\""
 CONFIG_BOOTDELAY=5
 CONFIG_HUSH_PARSER=y
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
index 0209085605a8fd2949e23bf9dab11afabff73d6a..20bd31466e1104ec6eed87e9bf3fbd8729b4e29e 100644 (file)
@@ -4,7 +4,6 @@ CONFIG_TARGET_O2MNT=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_BOOTDELAY=5
 CONFIG_HUSH_PARSER=y
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
index 5ce41408593a6fafaa8abb1d915273e1b8ac204c..ea769e7edc05def4778bca8ff910eab749e54224 100644 (file)
@@ -4,7 +4,6 @@ CONFIG_TARGET_O3DNT=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_BOOTDELAY=5
 CONFIG_HUSH_PARSER=y
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
index d0cd50a63cd946ee79916f2511826ee19e5e5e94..d07596add07d0066b9652bbfb419943c39249187 100644 (file)
@@ -7,7 +7,6 @@ CONFIG_BOOTDELAY=5
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_ASKENV=y
 CONFIG_LOOPW=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
@@ -15,7 +14,6 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_SNTP=y
 CONFIG_CMD_BSP=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_DIAG=y
index 5324a9a11c006a2ca3ecb3e51a126c26aaadab56..af3225554bc44d8f807df476a1dd70aa61177450 100644 (file)
@@ -7,7 +7,6 @@ CONFIG_BOOTDELAY=5
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_ASKENV=y
 CONFIG_LOOPW=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
@@ -15,7 +14,6 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_SNTP=y
 CONFIG_CMD_BSP=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_DIAG=y
index 2f933e6cab3cd8d0dbba16d686ad7eef139a4952..37d6767f287a7e1f9c6e3ae1db27594200923faa 100644 (file)
@@ -10,7 +10,6 @@ CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_ASKENV=y
 CONFIG_LOOPW=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
@@ -19,7 +18,6 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_SNTP=y
 CONFIG_CMD_BMP=y
 CONFIG_CMD_BSP=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_DIAG=y
index f204484f598196dbdec0a0761ac35cf02e13e4b8..5e0cf9ea473d8fb63cfb60df0b2a7c43863a1b9d 100644 (file)
@@ -10,7 +10,6 @@ CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_ASKENV=y
 CONFIG_LOOPW=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
@@ -19,7 +18,6 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_SNTP=y
 CONFIG_CMD_BMP=y
 CONFIG_CMD_BSP=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_DIAG=y
index db9bb8a30dd8187c141844d0985a1ff6c68ef607..7b4b030d74246fe284c05ff0f0fd6414f717c1c4 100644 (file)
@@ -10,7 +10,6 @@ CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_ASKENV=y
 CONFIG_LOOPW=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
@@ -19,7 +18,6 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_SNTP=y
 CONFIG_CMD_BMP=y
 CONFIG_CMD_BSP=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_DIAG=y
index eec60f1be4e72bc691f2ad6c3c84cc832db2a605..4792639653a76382fabab189d7ce56e668287f6b 100644 (file)
@@ -9,7 +9,6 @@ CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_ASKENV=y
 CONFIG_LOOPW=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
@@ -18,7 +17,6 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_SNTP=y
 CONFIG_CMD_BMP=y
 CONFIG_CMD_BSP=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_DIAG=y
index ce5edcbf01b09c41b3bbe64de054d717b2e89354..0054d4cddbdd8824cc1e2208f874ebfce2c8425a 100644 (file)
@@ -7,7 +7,6 @@ CONFIG_HUSH_PARSER=y
 CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_PROMPT="autoboot in %d seconds\n"
 CONFIG_AUTOBOOT_DELAY_STR="asdfg"
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
index e3b7793e0403115073be9f88c83355ae3b3091de..930ec8acf246f024deeb3346fa03457fcd6ae03f 100644 (file)
@@ -5,7 +5,6 @@ CONFIG_FIT=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_PROMPT="ac14xx> "
 CONFIG_CMD_ASKENV=y
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
index b8e2864ff4ba7d1bff74483f5d243f9ef4829846..04dda725326007878ee7bcf22abf4c2498da125f 100644 (file)
@@ -25,4 +25,5 @@ CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_BAUDRATE=38400
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index 75cf53fe21a37ca28a835d3562fbca957b667581..41c8be91206b61f2dd25cc9d1c282e33513132a4 100644 (file)
@@ -13,7 +13,6 @@ CONFIG_VERSION_VARIABLE=y
 # CONFIG_CMD_ENV_EXISTS is not set
 # CONFIG_CMD_LOADB is not set
 # CONFIG_CMD_LOADS is not set
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_ECHO is not set
 # CONFIG_CMD_ITEST is not set
index 648be92fcbbc9c00baa0742ce71e8ef80f441468..74cea3170e1eb6e2324039cbe5e6edff3197bfcd 100644 (file)
@@ -38,6 +38,7 @@ CONFIG_PMIC_AS3722=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
index d4dc1d386569d54659683d807c8aaed02a0d7227..90829b49492749ac28599f738ef68f9ac2c245dc 100644 (file)
@@ -40,7 +40,6 @@ CONFIG_CMD_EXT4=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_USB=y
-CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
index 87affc0bdb74e3e9609706777f7511787ae442db..ef9ca60b426017d2ff9c239a019222024e4d5dd7 100644 (file)
@@ -33,7 +33,6 @@ CONFIG_CMD_EXT4=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_USB=y
-CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
index 97a4d2c1ed491a05ecc9ebb9707716078083cbbb..f48bd17c42e7e57e0259088e76c993a0497867ce 100644 (file)
@@ -33,7 +33,6 @@ CONFIG_CMD_EXT4=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_USB=y
-CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
index a31b912968ce279b317a7d03155206d541886a1b..8557df9c3fdcd656912722ebc72cd2bde5e6a515 100644 (file)
@@ -37,6 +37,7 @@ CONFIG_PCI_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
index e2061a2cce9ff24d108b71ed7f5c614572feedb0..8bc1770ec241ef4d8f13efb615253008a6731c60 100644 (file)
@@ -14,18 +14,17 @@ CONFIG_HUSH_PARSER=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_MMC=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_UBI=y
 CONFIG_MMC_MXS=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 963661ab2dba8eb935353683eddab2464aec9039..0f1432f9a8c853ba116bd08ff69a388f523e40a4 100644 (file)
@@ -5,7 +5,6 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_BOOTDELAY=5
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_ASKENV=y
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
index a2cde44386b87863e8c3d1746b89129d4df35338..0f2aa16e0e2ecb570d9655fc2b9dff24e5bb4bcb 100644 (file)
@@ -34,4 +34,5 @@ CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index 26654426ed7738fe542309baa0a7c9c6f338e5b9..0ac39eabd27b164896426f1f51ab4ad401a9c6a6 100644 (file)
@@ -6,7 +6,6 @@ CONFIG_BOOTDELAY=3
 CONFIG_BOARD_EARLY_INIT_F=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
index e00c4c4c1f4c72e79a9e5b34a0a84c3dfb4b23f4..cc3f0a8b343ca59355c3a659dcea12ca69bf1cb0 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9260EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9260ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9260,SYS_USE_DATAFLASH_CS0"
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
@@ -17,7 +19,24 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
 # CONFIG_MMC is not set
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
-CONFIG_OF_LIBFDT=y
index 7b81775255bbab654f379abf34a23703d4572110..cb621dfb9ff66faf3f8eb9ba106ef28e2220c8a6 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9260EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9260ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9260,SYS_USE_DATAFLASH_CS1"
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
@@ -17,7 +19,24 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
 # CONFIG_MMC is not set
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
-CONFIG_OF_LIBFDT=y
index ca71891f35c5d3f90cf818ee5f3e1c1c6fe26bb8..20d356537711d59a1e754ecc85069322d2837842 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9260EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9260ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9260,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
@@ -17,7 +19,24 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
 # CONFIG_MMC is not set
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
-CONFIG_OF_LIBFDT=y
index 6605a0ea586dce365092ae0747a9f55eaf5b188f..02e91148cef127d2d9e6d49cd173c65f30af8efe 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9263EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9263ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9263,SYS_USE_DATAFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
@@ -21,7 +23,27 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xffffee00
+CONFIG_DEBUG_UART_CLOCK=100000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
index 6605a0ea586dce365092ae0747a9f55eaf5b188f..02e91148cef127d2d9e6d49cd173c65f30af8efe 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9263EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9263ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9263,SYS_USE_DATAFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
@@ -21,7 +23,27 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xffffee00
+CONFIG_DEBUG_UART_CLOCK=100000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
index 9c6bab9a3770b27b48d15a5bd41256ef81b41803..2ddcf2b714274e9ec5a9b0a855c8905e00e111f6 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9263EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9263ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9263,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
@@ -21,7 +23,27 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xffffee00
+CONFIG_DEBUG_UART_CLOCK=100000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
index 5a4324f2380b6bd42da9387d1ef24f2d12398ad8..21480c5d07186361c5e73a7c77b91e5408e0f418 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9263EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9263ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9263,SYS_USE_BOOT_NORFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
@@ -21,8 +23,28 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xffffee00
+CONFIG_DEBUG_UART_CLOCK=100000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
index 78ce6bda3d3338d89bf72fe43cfba7d43c3e7282..824c366c4438508895f4321bae0fd66cb97a220d 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9263EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9263ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9263,SYS_USE_NORFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
@@ -21,8 +23,28 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xffffee00
+CONFIG_DEBUG_UART_CLOCK=100000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
index 67c82326a4c1725e2b882b2a4747cf41399c1e75..18e88a744512bbcfbcb79fe005116f2d611f3c89 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9260EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9g20ek_2mmc"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9G20,AT91SAM9G20EK_2MMC,SYS_USE_MMC"
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
@@ -18,6 +20,26 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
-CONFIG_OF_LIBFDT=y
index 6d2bfa1d6bcabc471afc5e9817ebdc14a85c4c87..fb0d87ab4b5c51195d800f64108985b88eee521f 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9260EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9g20ek_2mmc"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9G20,AT91SAM9G20EK_2MMC,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
@@ -18,6 +20,26 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
-CONFIG_OF_LIBFDT=y
index 5bb0cb210e814e81397ad2fe9fe197cdc4fabe01..27c1c10df18d22a3a3b202bea46a9fa9c02e794c 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9260EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9g20ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9G20,SYS_USE_DATAFLASH_CS0"
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
@@ -17,7 +19,24 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
 # CONFIG_MMC is not set
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
-CONFIG_OF_LIBFDT=y
index fb6a0ac829613d9882a1845b32815a5122302796..1826e6ca98cd11fb45fa0fa8e680ddb69b2dc9c6 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9260EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9g20ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9G20,SYS_USE_DATAFLASH_CS1"
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
@@ -17,7 +19,24 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
 # CONFIG_MMC is not set
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
-CONFIG_OF_LIBFDT=y
index 79ec2e446b7b167a8a9edcc58a04c94afb82c5fd..1ac88631bcec6fa6047d6cd94451c1db20317fb4 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9260EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9g20ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9G20,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
@@ -17,7 +19,24 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
 # CONFIG_MMC is not set
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
-CONFIG_OF_LIBFDT=y
index 342fc8a46951fcead239b705fe3391ff8b2f8675..18b6ddf7cff968125485d9d394f6d9675e9f73de 100644 (file)
@@ -1,19 +1,13 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9M10G45EK=y
-CONFIG_SPL_GPIO_SUPPORT=y
-CONFIG_SPL_LIBCOMMON_SUPPORT=y
-CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SPL_MMC_SUPPORT=y
-CONFIG_SPL_SERIAL_SUPPORT=y
-CONFIG_SPL_LIBDISK_SUPPORT=y
-CONFIG_SPL_FAT_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9m10g45ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9M10G45,SYS_USE_MMC"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
-CONFIG_SPL=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot> "
 # CONFIG_CMD_BDI is not set
@@ -29,7 +23,29 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_AT91_UTMI=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xffffee00
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
index 7164d82a4573f8863bd2c96056f0db5d2614c4c4..eda54a4f391f490e57d0a4d96c891ea4598c0a4a 100644 (file)
@@ -1,17 +1,13 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9M10G45EK=y
-CONFIG_SPL_GPIO_SUPPORT=y
-CONFIG_SPL_LIBCOMMON_SUPPORT=y
-CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SPL_SERIAL_SUPPORT=y
-CONFIG_SPL_NAND_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9m10g45ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9M10G45,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
-CONFIG_SPL=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot> "
 # CONFIG_CMD_BDI is not set
@@ -27,7 +23,29 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_AT91_UTMI=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xffffee00
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
index ef9250bce92d6d7b2a01c88967bd2f3fa30feedd..e7e8a014c6e4aebd58030c2ef3776f05dd10d166 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9N12EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9n12ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9N12,SYS_USE_MMC"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
@@ -19,9 +21,30 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
index db88973d09bf40fddddb14a4cc8dee52ff675417..e6268055914ad4d15a80f7488ff214b4512c64e5 100644 (file)
@@ -1,17 +1,13 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9N12EK=y
-CONFIG_SPL_GPIO_SUPPORT=y
-CONFIG_SPL_LIBCOMMON_SUPPORT=y
-CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SPL_SERIAL_SUPPORT=y
-CONFIG_SPL_NAND_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9n12ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9N12,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
-CONFIG_SPL=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot> "
 CONFIG_CMD_BOOTZ=y
@@ -25,9 +21,30 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
index 4e5d10226e869921343c8061be22efb7639f5d9e..a5abcd1f3b3d4aebf12e08b41caffd52a7d398e5 100644 (file)
@@ -1,18 +1,13 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9N12EK=y
-CONFIG_SPL_GPIO_SUPPORT=y
-CONFIG_SPL_LIBCOMMON_SUPPORT=y
-CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SPL_SERIAL_SUPPORT=y
-CONFIG_SPL_SPI_FLASH_SUPPORT=y
-CONFIG_SPL_SPI_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9n12ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9N12,SYS_USE_SPIFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
-CONFIG_SPL=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot> "
 CONFIG_CMD_BOOTZ=y
@@ -26,9 +21,30 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
index 49e1353b7df08efae093c58fbd8bcb2eaedc8b69..d4abb2a2fd11d146cbfb6cb4fc535fc2ffd12e4b 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9RLEK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9rlek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9RL,SYS_USE_DATAFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
@@ -20,5 +22,23 @@ CONFIG_CMD_MMC=y
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_AT91_UTMI=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=100000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
index 483d9b68ec51124666ecf09ba7677224c3cdf487..9a40c41f361ab89c41525f94a8497bc73fd1a11d 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9RLEK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9rlek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9RL,SYS_USE_MMC"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
@@ -20,5 +22,23 @@ CONFIG_CMD_MMC=y
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_AT91_UTMI=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=100000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
index d7f2d7f1b379aa0a58810bd48f7fb634ad6b06c8..d68b562b0e5224ce11aaf223dcb459c2df3339d2 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9RLEK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9rlek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9RL,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
@@ -20,5 +22,23 @@ CONFIG_CMD_MMC=y
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_AT91_UTMI=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=100000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
index e07e2175e009e2bde6b6bc0e2ee34722551efd42..64707dbdaad6d69a22f559e54ee642bbcce53425 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9X5EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9g35ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9X5,SYS_USE_DATAFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
@@ -21,9 +23,34 @@ CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_UBI=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_AT91_UTMI=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
index 9a95a0496ae8b20769ee473699d90d8e8c53fba1..ddeeeefa1ea56924eb10c1284f49a9511b6a487d 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9X5EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9g35ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9X5,SYS_USE_MMC"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
@@ -21,9 +23,34 @@ CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_UBI=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_AT91_UTMI=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
index d93f6875082ed6089b6c0d4b984fbc9d51f36f7e..a26b38f330caa65cebbdee640325afe1d82b56e5 100644 (file)
@@ -1,17 +1,13 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9X5EK=y
-CONFIG_SPL_GPIO_SUPPORT=y
-CONFIG_SPL_LIBCOMMON_SUPPORT=y
-CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SPL_SERIAL_SUPPORT=y
-CONFIG_SPL_NAND_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9g35ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9X5,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
-CONFIG_SPL=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot> "
 CONFIG_CMD_BOOTZ=y
@@ -27,9 +23,34 @@ CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_UBI=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_AT91_UTMI=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
index 5fc512b998b2909d0477fdd2457290c6ddec123a..75d25d8e611b2a8612c7d3b164e6f0dc0613cab2 100644 (file)
@@ -1,18 +1,13 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9X5EK=y
-CONFIG_SPL_GPIO_SUPPORT=y
-CONFIG_SPL_LIBCOMMON_SUPPORT=y
-CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SPL_SERIAL_SUPPORT=y
-CONFIG_SPL_SPI_FLASH_SUPPORT=y
-CONFIG_SPL_SPI_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9g35ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9X5,SYS_USE_SPIFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
-CONFIG_SPL=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot> "
 CONFIG_CMD_BOOTZ=y
@@ -28,9 +23,34 @@ CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_UBI=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_AT91_UTMI=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
index e29b3cdfe51786d9e7a24fee6407961369e2f2a6..80673d2b63c8c93eca5af2d3d3b4d4fd8f9f68cd 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9260EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9260ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9XE,SYS_USE_DATAFLASH_CS0"
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
@@ -17,7 +19,24 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
 # CONFIG_MMC is not set
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
-CONFIG_OF_LIBFDT=y
index 2e32ca8e17db61fc964fbaab4cedb1a798672fc2..8922065d38e7efef85680b6bf345bef36e73f48d 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9260EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9260ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9XE,SYS_USE_DATAFLASH_CS1"
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
@@ -17,7 +19,24 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
 # CONFIG_MMC is not set
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
-CONFIG_OF_LIBFDT=y
index 2ef459bb648efd1412a11a20ae8146ac06bf4fab..9c28a59fe30345f61e6d9735f1c847ea45552bd7 100644 (file)
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9260EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9260ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9XE,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
@@ -17,7 +19,24 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
 # CONFIG_MMC is not set
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
-CONFIG_OF_LIBFDT=y
index 0365246ee590570ecaedf62a81369192e6942807..76359c9d2ff4f44bbf34a68889995397359707e7 100644 (file)
@@ -42,6 +42,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA20_SLINK=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
index 5664421c129aee2eecc56c36ab4e05f95ce65f12..a963802b569e3401d9b993439275b9bd01c91240 100644 (file)
@@ -15,8 +15,7 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
-# CONFIG_MMC is not set
-CONFIG_GENERIC_MMC=y
+CONFIG_MMC=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
index 05095bf1600f1bf3ebd1ab26e6978f81d1c7aca0..6d93edc358e59fef531fcda97b14030d2cf2d08e 100644 (file)
@@ -4,11 +4,11 @@ CONFIG_TARGET_BOSTON=y
 # CONFIG_MIPS_BOOT_ENV_LEGACY is not set
 CONFIG_MIPS_BOOT_FDT=y
 CONFIG_DEFAULT_DEVICE_TREE="img,boston"
+CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_FIT_BEST_MATCH=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="boston # "
 # CONFIG_CMD_ELF is not set
 # CONFIG_CMD_IMLS is not set
@@ -17,16 +17,11 @@ CONFIG_CMD_MEMTEST=y
 # CONFIG_CMD_LOADB is not set
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FPGA is not set
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_PING=y
 CONFIG_CMD_SNTP=y
 CONFIG_CMD_DNS=y
 CONFIG_CMD_LINK_LOCAL=y
 CONFIG_CMD_TIME=y
-CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
 # CONFIG_DOS_PARTITION is not set
 # CONFIG_ISO_PARTITION is not set
 CONFIG_OF_EMBED=y
index 244c688c5f433da4d5949926cefd97c03dcd2a4c..9e494eee106f392e66f5d0b94bbd6d49912f3077 100644 (file)
@@ -5,11 +5,11 @@ CONFIG_SYS_LITTLE_ENDIAN=y
 # CONFIG_MIPS_BOOT_ENV_LEGACY is not set
 CONFIG_MIPS_BOOT_FDT=y
 CONFIG_DEFAULT_DEVICE_TREE="img,boston"
+CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_FIT_BEST_MATCH=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="boston # "
 # CONFIG_CMD_ELF is not set
 # CONFIG_CMD_IMLS is not set
@@ -18,16 +18,11 @@ CONFIG_CMD_MEMTEST=y
 # CONFIG_CMD_LOADB is not set
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FPGA is not set
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_PING=y
 CONFIG_CMD_SNTP=y
 CONFIG_CMD_DNS=y
 CONFIG_CMD_LINK_LOCAL=y
 CONFIG_CMD_TIME=y
-CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
 # CONFIG_DOS_PARTITION is not set
 # CONFIG_ISO_PARTITION is not set
 CONFIG_OF_EMBED=y
index 8cc0bee44c7a56c69bd8c7081cc30b672e658a35..6913d2ba62e87bbf48fad6003455b2aae57adb19 100644 (file)
@@ -5,11 +5,11 @@ CONFIG_CPU_MIPS64_R2=y
 # CONFIG_MIPS_BOOT_ENV_LEGACY is not set
 CONFIG_MIPS_BOOT_FDT=y
 CONFIG_DEFAULT_DEVICE_TREE="img,boston"
+CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_FIT_BEST_MATCH=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="boston # "
 # CONFIG_CMD_ELF is not set
 # CONFIG_CMD_IMLS is not set
@@ -18,16 +18,11 @@ CONFIG_CMD_MEMTEST=y
 # CONFIG_CMD_LOADB is not set
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FPGA is not set
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_PING=y
 CONFIG_CMD_SNTP=y
 CONFIG_CMD_DNS=y
 CONFIG_CMD_LINK_LOCAL=y
 CONFIG_CMD_TIME=y
-CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
 # CONFIG_DOS_PARTITION is not set
 # CONFIG_ISO_PARTITION is not set
 CONFIG_OF_EMBED=y
index c427d43091ce285b753b2dc1ab391ad58afce845..10ccc5427c38bf6c412e18c65770c550f35cb701 100644 (file)
@@ -6,11 +6,11 @@ CONFIG_CPU_MIPS64_R2=y
 # CONFIG_MIPS_BOOT_ENV_LEGACY is not set
 CONFIG_MIPS_BOOT_FDT=y
 CONFIG_DEFAULT_DEVICE_TREE="img,boston"
+CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_FIT_BEST_MATCH=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="boston # "
 # CONFIG_CMD_ELF is not set
 # CONFIG_CMD_IMLS is not set
@@ -19,16 +19,11 @@ CONFIG_CMD_MEMTEST=y
 # CONFIG_CMD_LOADB is not set
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FPGA is not set
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_PING=y
 CONFIG_CMD_SNTP=y
 CONFIG_CMD_DNS=y
 CONFIG_CMD_LINK_LOCAL=y
 CONFIG_CMD_TIME=y
-CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
 # CONFIG_DOS_PARTITION is not set
 # CONFIG_ISO_PARTITION is not set
 CONFIG_OF_EMBED=y
index 7d92c139402a7170b284811d4d528c5ad9717b7e..1bdbf90495972bd74c4764269b936a021b9e9f5c 100644 (file)
@@ -57,4 +57,5 @@ CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_STORAGE=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_LCD=y
+CONFIG_OMAP_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
index 9abe61760e1012fbc443b630d7fa30dbc2b0166e..ed7432d7f42d330f7b067ccc74adc0c561c66301 100644 (file)
@@ -57,4 +57,5 @@ CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_STORAGE=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_LCD=y
+CONFIG_OMAP_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
index 79bb9057bfc2bc902fea8c75d05629bfcb4e18f5..02b5ff60e21de25bdd174674f43a68c3c2f05553 100644 (file)
@@ -65,4 +65,5 @@ CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_STORAGE=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_LCD=y
+CONFIG_OMAP_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
index 92985ab3d6183f9cc7c38e04f42ac2ccaaad4836..46a24f56ab1eb49daea77e436a44e6c9137225ea 100644 (file)
@@ -7,14 +7,12 @@ CONFIG_BOOTDELAY=5
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_ASKENV=y
 CONFIG_LOOPW=y
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_SNTP=y
 CONFIG_CMD_BSP=y
-CONFIG_CMD_DATE=y
 CONFIG_MAC_PARTITION=y
 CONFIG_DOS_PARTITION=y
 CONFIG_ISO_PARTITION=y
index 32bc58ee9bb56e75bee0c09722917cd1d7ff6ecd..6b9877ff217843c39daf9e992886e187bcb43336 100644 (file)
@@ -7,14 +7,12 @@ CONFIG_BOOTDELAY=5
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_ASKENV=y
 CONFIG_LOOPW=y
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_SNTP=y
 CONFIG_CMD_BSP=y
-CONFIG_CMD_DATE=y
 CONFIG_MAC_PARTITION=y
 CONFIG_DOS_PARTITION=y
 CONFIG_ISO_PARTITION=y
index 77dac784e36dc1449c5283a5983b6746929d8ae5..76e861a3a2929b55c1a6c1af9a9e05fb4a13eea0 100644 (file)
@@ -37,4 +37,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA20_SLINK=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index dd6fd498b7f0a1c6f354960a4fca52760ce56cde..c1b4486d87a1f884d15e2cd6d56b0067526b4943 100644 (file)
@@ -43,6 +43,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
index ec22a6368f27ad641129ed7847cda4488f92906b..8a1429037a00065a6bde4c65e4f2103c29b34535 100644 (file)
@@ -9,7 +9,6 @@ CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_ASKENV=y
 CONFIG_LOOPW=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
index e1f96dce12d10ea88e4a62621cc74e09ed81a85a..649ebf7568bcb3801ee6d660d8e4854abe9d290a 100644 (file)
@@ -54,10 +54,10 @@ CONFIG_SPL_PINCTRL=y
 CONFIG_PINCTRL_ROCKCHIP_RK3288=y
 CONFIG_DM_PMIC=y
 # CONFIG_SPL_PMIC_CHILDREN is not set
-CONFIG_PMIC_RK808=y
+CONFIG_PMIC_RK8XX=y
 CONFIG_SPL_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
-CONFIG_REGULATOR_RK808=y
+CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM=y
 CONFIG_SPL_RAM=y
@@ -72,6 +72,7 @@ CONFIG_SYSRESET=y
 CONFIG_DM_VIDEO=y
 CONFIG_DISPLAY=y
 CONFIG_VIDEO_ROCKCHIP=y
+CONFIG_DISPLAY_ROCKCHIP_HDMI=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_ERRNO_STR=y
index baebca970bb26e93d3955f39940fc0b87e645267..6fc0dcc023f2c389c886f9b364fdfa648ca00bc5 100644 (file)
@@ -55,9 +55,9 @@ CONFIG_SPL_PINCTRL=y
 CONFIG_PINCTRL_ROCKCHIP_RK3288=y
 CONFIG_DM_PMIC=y
 # CONFIG_SPL_PMIC_CHILDREN is not set
-CONFIG_PMIC_RK808=y
+CONFIG_PMIC_RK8XX=y
 CONFIG_DM_REGULATOR_FIXED=y
-CONFIG_REGULATOR_RK808=y
+CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM=y
 CONFIG_SPL_RAM=y
@@ -72,6 +72,8 @@ CONFIG_SYSRESET=y
 CONFIG_DM_VIDEO=y
 CONFIG_DISPLAY=y
 CONFIG_VIDEO_ROCKCHIP=y
+CONFIG_DISPLAY_ROCKCHIP_EDP=y
+CONFIG_DISPLAY_ROCKCHIP_HDMI=y
 CONFIG_CONSOLE_SCROLL_LINES=10
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
index ea57810e9568f5edd393b5d4f0abd275bb85bf86..ef333c001136ff7dae65da0e10b5e39153bd5e7a 100644 (file)
@@ -55,9 +55,9 @@ CONFIG_SPL_PINCTRL=y
 CONFIG_PINCTRL_ROCKCHIP_RK3288=y
 CONFIG_DM_PMIC=y
 # CONFIG_SPL_PMIC_CHILDREN is not set
-CONFIG_PMIC_RK808=y
+CONFIG_PMIC_RK8XX=y
 CONFIG_DM_REGULATOR_FIXED=y
-CONFIG_REGULATOR_RK808=y
+CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM=y
 CONFIG_SPL_RAM=y
@@ -72,6 +72,8 @@ CONFIG_SYSRESET=y
 CONFIG_DM_VIDEO=y
 CONFIG_DISPLAY=y
 CONFIG_VIDEO_ROCKCHIP=y
+CONFIG_DISPLAY_ROCKCHIP_HDMI=y
+CONFIG_DISPLAY_ROCKCHIP_EDP=y
 CONFIG_CONSOLE_SCROLL_LINES=10
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
index 7d8d01aaaaabdd9789a5e24ec3d09ac5ddfc1185..d3369f44552a0f1fc066f4cbba527f59a446990a 100644 (file)
@@ -6,7 +6,6 @@ CONFIG_BOOTDELAY=5
 CONFIG_SILENT_CONSOLE=y
 CONFIG_CMD_ASKENV=y
 CONFIG_LOOPW=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
index 33b53160a768394875941147549b9aa17457b277..5a371c7e815ba2d6bb55c680cd1e26488cb88d9e 100644 (file)
@@ -52,7 +52,6 @@ CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_USB=y
-CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
index b9a79408a204dd4aac5ecf84f27eb336e8fb1000..868d175d2239b75943d36d72f27af6a5ebba3f05 100644 (file)
@@ -35,6 +35,7 @@ CONFIG_LED_STATUS_BOOT=0
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
 CONFIG_OF_LIBFDT=y
index d7fd995f7a4080b3fc5cdfd1fb16b7235331a314..067945636fae39b6bf71d8df2eb42849317fd47b 100644 (file)
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_OMAP54XX=y
 CONFIG_TARGET_CM_T54=y
+CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC=16296
 # CONFIG_SPL_NAND_SUPPORT is not set
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_BOOTDELAY=3
@@ -37,5 +38,6 @@ CONFIG_EFI_PARTITION=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 6ab2b9d6ef848bd5851db6230ce48365f142df43..47e8198e77456fbfbd08af7d3b2c09a09dd6fa49 100644 (file)
@@ -40,7 +40,6 @@ CONFIG_CMD_EXT4=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_USB=y
-CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
index 93897fff9691c9666a1364377609bfc160d4fc82..52e0d504115597cc083f5ffa533a0e2eac37e973 100644 (file)
@@ -33,7 +33,6 @@ CONFIG_CMD_EXT4=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_USB=y
-CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
index 5f6114ed6dc8db6e730ed067a042f9df6c1a759c..db0224b929de6c9e9410cb7a8b77f91bf1d69712 100644 (file)
@@ -41,6 +41,7 @@ CONFIG_PWM_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_ULPI_VIEWPORT=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
index 0071a923e444b9686cd66d41974318e11176f3ac..41cc0ed340f58a22ac14ba9c6f666c2299bd162a 100644 (file)
@@ -32,6 +32,7 @@ CONFIG_DFU_RAM=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
index 78c478f4201cfa2c35191bf986c83542b891bab6..b69ce6522491653799fb8e8c1dac458b5e47c69b 100644 (file)
@@ -46,6 +46,7 @@ CONFIG_DM_SPI=y
 CONFIG_FSL_DSPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
diff --git a/configs/comtrend_ar5387un_ram_defconfig b/configs/comtrend_ar5387un_ram_defconfig
new file mode 100644 (file)
index 0000000..5b05fd2
--- /dev/null
@@ -0,0 +1,54 @@
+CONFIG_ARCH_BMIPS=y
+CONFIG_BAUDRATE=115200
+CONFIG_BCM6328_POWER_DOMAIN=y
+CONFIG_BCM6345_CLK=y
+CONFIG_BCM6345_SERIAL=y
+CONFIG_BMIPS_BOOT_RAM=y
+CONFIG_BOARD_COMTREND_AR5387UN=y
+# CONFIG_CMD_BOOTD is not set
+CONFIG_CMD_BOOTM=y
+CONFIG_CMD_CPU=y
+# CONFIG_CMD_CRC32 is not set
+# CONFIG_CMD_EDITENV is not set
+# CONFIG_CMD_ELF is not set
+# CONFIG_CMD_ENV_EXISTS is not set
+# CONFIG_CMD_EXPORTENV is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+# CONFIG_CMD_GPIO is not set
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_IMPORTENV is not set
+CONFIG_CMD_LED=y
+CONFIG_CMD_LICENSE=y
+CONFIG_CMD_LOADB=y
+# CONFIG_CMD_LOADS is not set
+CONFIG_CMD_MEMINFO=y
+# CONFIG_CMD_MISC is not set
+# CONFIG_CMD_NET is not set
+# CONFIG_CMD_NFS is not set
+# CONFIG_CMD_SAVEENV is not set
+# CONFIG_CMD_XIMG is not set
+CONFIG_DEFAULT_DEVICE_TREE="comtrend,ar-5387un"
+CONFIG_DISPLAY_CPUINFO=y
+# CONFIG_DM_DEVICE_REMOVE is not set
+CONFIG_DM_GPIO=y
+CONFIG_DM_RESET=y
+CONFIG_DM_SERIAL=y
+CONFIG_HUSH_PARSER=y
+CONFIG_LED=y
+CONFIG_LED_BCM6328=y
+CONFIG_LED_BLINK=y
+CONFIG_MIPS=y
+# CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set
+# CONFIG_MIPS_BOOT_ENV_LEGACY is not set
+CONFIG_MIPS_BOOT_FDT=y
+CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_POWER_DOMAIN=y
+CONFIG_RESET=y
+CONFIG_RESET_BCM6345=y
+CONFIG_SOC_BMIPS_BCM6328=y
+# CONFIG_SPL_SERIAL_PRESENT is not set
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SYS_NO_FLASH=y
+CONFIG_SYS_PROMPT="AR-5387un # "
+CONFIG_SYS_TEXT_BASE=0x80010000
diff --git a/configs/comtrend_vr3032u_ram_defconfig b/configs/comtrend_vr3032u_ram_defconfig
new file mode 100644 (file)
index 0000000..c056d73
--- /dev/null
@@ -0,0 +1,54 @@
+CONFIG_ARCH_BMIPS=y
+CONFIG_BAUDRATE=115200
+CONFIG_BCM6328_POWER_DOMAIN=y
+CONFIG_BCM6345_CLK=y
+CONFIG_BCM6345_SERIAL=y
+CONFIG_BMIPS_BOOT_RAM=y
+CONFIG_BOARD_COMTREND_VR3032U=y
+# CONFIG_CMD_BOOTD is not set
+CONFIG_CMD_BOOTM=y
+CONFIG_CMD_CPU=y
+# CONFIG_CMD_CRC32 is not set
+# CONFIG_CMD_EDITENV is not set
+# CONFIG_CMD_ELF is not set
+# CONFIG_CMD_ENV_EXISTS is not set
+# CONFIG_CMD_EXPORTENV is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+# CONFIG_CMD_GPIO is not set
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_IMPORTENV is not set
+CONFIG_CMD_LED=y
+CONFIG_CMD_LICENSE=y
+CONFIG_CMD_LOADB=y
+# CONFIG_CMD_LOADS is not set
+CONFIG_CMD_MEMINFO=y
+# CONFIG_CMD_MISC is not set
+# CONFIG_CMD_NET is not set
+# CONFIG_CMD_NFS is not set
+# CONFIG_CMD_SAVEENV is not set
+# CONFIG_CMD_XIMG is not set
+CONFIG_DEFAULT_DEVICE_TREE="comtrend,vr-3032u"
+CONFIG_DISPLAY_CPUINFO=y
+# CONFIG_DM_DEVICE_REMOVE is not set
+CONFIG_DM_GPIO=y
+CONFIG_DM_RESET=y
+CONFIG_DM_SERIAL=y
+CONFIG_HUSH_PARSER=y
+CONFIG_LED=y
+CONFIG_LED_BCM6328=y
+CONFIG_LED_BLINK=y
+CONFIG_MIPS=y
+# CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set
+# CONFIG_MIPS_BOOT_ENV_LEGACY is not set
+CONFIG_MIPS_BOOT_FDT=y
+CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_POWER_DOMAIN=y
+CONFIG_RESET=y
+CONFIG_RESET_BCM6345=y
+CONFIG_SOC_BMIPS_BCM63268=y
+# CONFIG_SPL_SERIAL_PRESENT is not set
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SYS_NO_FLASH=y
+CONFIG_SYS_PROMPT="VR-3032u # "
+CONFIG_SYS_TEXT_BASE=0x80010000
index ec6d1a445d49a99c04091ec2f0516347fbbf4814..36e6608c4359721ece7b3327776e64d21ebcb61a 100644 (file)
@@ -34,6 +34,7 @@ CONFIG_OF_EMBED=y
 CONFIG_DFU_NAND=y
 # CONFIG_MMC is not set
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_ATMEL_USBA=y
index 54ace36a994c9f3b0131b5be562119a1afd2ba0b..67a791d9918d13c4cddbd44f2e06ae13596c4f60 100644 (file)
@@ -27,5 +27,6 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 8aae0e15dc9f4574dac0bccfb33c8d1b12ffe580..739cfa96cfc0108f6a1d30b42861bea191d343c8 100644 (file)
@@ -37,6 +37,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
index e90526a4022681131e2eb3cafd0cb20961353618..63fc4db6c88245dd3845829a7df339fd059cde7a 100644 (file)
@@ -36,6 +36,8 @@ CONFIG_EFI_PARTITION=y
 # CONFIG_PARTITION_UUIDS is not set
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_SPL_OF_TRANSLATE=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_MVTWSI=y
 # CONFIG_MMC is not set
 CONFIG_NAND_PXA3XX=y
 CONFIG_SPI_FLASH=y
index 0d11eec75acba35096bbeb9a3ff44995943452c2..86b2b0d804ec7c78c6cbd8172caf29c2aa1b3410 100644 (file)
@@ -13,7 +13,6 @@ CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n"
 CONFIG_AUTOBOOT_DELAY_STR="d"
 CONFIG_AUTOBOOT_STOP_STR=" "
 CONFIG_LOOPW=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
@@ -21,7 +20,6 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_BMP=y
 CONFIG_CMD_CACHE=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_DIAG=y
index dc17ab4406eb39cff9ef17a27d9a21c31760edaa..85b7f850f71d2d21591c47cdaf92857d7af015cf 100644 (file)
@@ -11,7 +11,6 @@ CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_PROMPT="autoboot in %d seconds\n"
 CONFIG_AUTOBOOT_DELAY_STR=" "
 CONFIG_LOOPW=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
@@ -19,7 +18,6 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_BMP=y
 CONFIG_CMD_CACHE=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_DIAG=y
index 4ab11c755b12d7cd5f475d4fb845bc54c4134ec8..7ec8650aca2268841abbd263eb31f524fc5ad362 100644 (file)
@@ -13,7 +13,6 @@ CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n"
 CONFIG_AUTOBOOT_DELAY_STR="d"
 CONFIG_AUTOBOOT_STOP_STR=" "
 CONFIG_LOOPW=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
@@ -21,7 +20,6 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_BMP=y
 CONFIG_CMD_CACHE=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_DIAG=y
index 1f3f3c8bb6012df8145fb2ba551367d720bcd0c0..b4b85330631fdf82812c89daaca5502d69d83da2 100644 (file)
@@ -13,7 +13,6 @@ CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n"
 CONFIG_AUTOBOOT_DELAY_STR="d"
 CONFIG_AUTOBOOT_STOP_STR=" "
 CONFIG_LOOPW=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
@@ -21,7 +20,6 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_BMP=y
 CONFIG_CMD_CACHE=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_DIAG=y
index a363292350d51a538e91056abd07d5c616acb825..87ef8965914da99309244c4dad64f58914be1c47 100644 (file)
@@ -21,5 +21,6 @@ CONFIG_ISO_PARTITION=y
 # CONFIG_MMC is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index e1ce9a5089044bbda48e968c98f3d8ee075379d2..14eee484e0374d7b24fa82dcb94aa5ce52df01c0 100644 (file)
@@ -19,5 +19,6 @@ CONFIG_ISO_PARTITION=y
 # CONFIG_MMC is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index b50a762f17bb7951710ab820b85239c27da13e55..be04402572eb9cdf762a30046202a619be00b31d 100644 (file)
@@ -38,7 +38,15 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_LIST="dra7-evm dra72-evm dra72-evm-revc dra71-evm"
 CONFIG_DM=y
 CONFIG_SPL_DM=y
-# CONFIG_BLK is not set
+CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_REGMAP=y
+CONFIG_SPL_REGMAP=y
+CONFIG_SYSCON=y
+CONFIG_SPL_SYSCON=y
+CONFIG_BLK=y
+CONFIG_DM_SCSI=y
+CONFIG_DWC_AHCI=y
+CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
 CONFIG_DFU_SF=y
@@ -68,6 +76,7 @@ CONFIG_TI_QSPI=y
 CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_XHCI_DRA7XX_INDEX=1
@@ -81,3 +90,6 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0451
 CONFIG_G_DNL_PRODUCT_NUM=0xd022
+CONFIG_SPL_PHY=y
+CONFIG_PIPE3_PHY=y
+CONFIG_SPL_PIPE3_PHY=y
index 568c3f6b6d152a2321f709dfa340aa0e54259b15..84dd26beee56765f3523d96295e0d499c998bf00 100644 (file)
@@ -43,7 +43,12 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_LIST="dra7-evm dra72-evm dra72-evm-revc dra71-evm"
 CONFIG_DM=y
 CONFIG_SPL_DM=y
-# CONFIG_BLK is not set
+CONFIG_REGMAP=y
+CONFIG_SPL_REGMAP=y
+CONFIG_SYSCON=y
+CONFIG_SPL_SYSCON=y
+CONFIG_DM_SCSI=y
+CONFIG_DWC_AHCI=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
 CONFIG_DFU_SF=y
@@ -73,6 +78,7 @@ CONFIG_TI_QSPI=y
 CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_XHCI_DRA7XX_INDEX=1
@@ -86,3 +92,6 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0451
 CONFIG_G_DNL_PRODUCT_NUM=0xd022
+CONFIG_SPL_PHY=y
+CONFIG_PIPE3_PHY=y
+CONFIG_SPL_PIPE3_PHY=y
index ea678b6f48c2f62cf2765b5182fe45bfe340f4bd..0e50b3109ea25589fd6da9333e3b191979b17cc6 100644 (file)
@@ -5,6 +5,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_DRACO=y
+CONFIG_SYS_MPUCLK=300
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
@@ -64,3 +65,4 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Siemens AG"
 CONFIG_G_DNL_VENDOR_NUM=0x0908
 CONFIG_G_DNL_PRODUCT_NUM=0x02d2
+CONFIG_OMAP_WATCHDOG=y
index c8b8ce3dd0e417319ecf52a76ada0e662982f548..e30ba0dacea8f7151e6a5965467aaf4fbdfd6ffd 100644 (file)
@@ -23,5 +23,6 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 16f05856576bfc9e20dbd9b9f787c2982a3893a4..e9f67ae45507fd9d8c9593597627a5f5c3943dec 100644 (file)
@@ -18,3 +18,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
index c956ce04ef83c3d5d549f4a73594506a3b8ece4e..b637483720c6198be6c04fb66171443fc0f33205 100644 (file)
@@ -40,4 +40,5 @@ CONFIG_DEBUG_UART_CLOCK=250000000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index 840b3f20572bda5345dca668f9f659997dbe9c1e..9e0ac20985c4e2b4d571358bd8f634090b44a593 100644 (file)
@@ -26,5 +26,6 @@ CONFIG_SPL_PARTITION_UUIDS=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index c5563a446175371c4084db4d35bc72de004c577b..7c51cc485c8ac5fd989eae7ee8145786f192b053 100644 (file)
@@ -32,6 +32,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
index 2f3d81416390e23c17e9cdb45b8943be37ad0392..61ac94bbba86bdf80a2a9a3c4e7264a40efdf06a 100644 (file)
@@ -24,5 +24,7 @@ CONFIG_CMD_UBI=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+# CONFIG_USB_EHCI_OMAP is not set
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index cc83b68d04ea977e44386498e4e9d5eac8d30f5a..51c9ba5f0eb2fd98fc9185c7125065d27fa453cf 100644 (file)
@@ -21,4 +21,5 @@ CONFIG_ISO_PARTITION=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index 39d3ad1cd9f9d752d937be84061c4732e3b8daa0..b6911fd717439e9ad89e727aa78639c8530f0ba4 100644 (file)
@@ -5,6 +5,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_ETAMIN=y
+CONFIG_SYS_MPUCLK=300
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
@@ -64,3 +65,4 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Siemens AG"
 CONFIG_G_DNL_VENDOR_NUM=0x0908
 CONFIG_G_DNL_PRODUCT_NUM=0x02d2
+CONFIG_OMAP_WATCHDOG=y
index eb5e7aa9e71fc9b1dce15599799c32647c4ee6a9..c189e750ff34fd0be057fe342fe58ea22ce0f12a 100644 (file)
@@ -34,14 +34,21 @@ CONFIG_SYS_I2C_ROCKCHIP=y
 CONFIG_MMC_DW=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ROCKCHIP=y
+CONFIG_DM_PMIC=y
+CONFIG_PMIC_RK808=y
+CONFIG_REGULATOR_RK808=y
+CONFIG_DM_ETH=y
+CONFIG_ETH_DESIGNWARE=y
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_GMAC_ROCKCHIP=y
 CONFIG_PINCTRL=y
 CONFIG_SPL_PINCTRL=y
 CONFIG_PINCTRL_ROCKCHIP_RK3399=y
 CONFIG_DM_PMIC=y
-CONFIG_PMIC_RK808=y
+CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
 CONFIG_DM_REGULATOR_FIXED=y
-CONFIG_REGULATOR_RK808=y
+CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM=y
 CONFIG_SPL_RAM=y
@@ -58,5 +65,9 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_EHCI_GENERIC=y
 CONFIG_USB_STORAGE=y
+CONFIG_DM_VIDEO=y
+CONFIG_DISPLAY=y
+CONFIG_VIDEO_ROCKCHIP=y
+CONFIG_DISPLAY_ROCKCHIP_MIPI=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_ERRNO_STR=y
index befba1882f6827ab057050ffd20cfccf3499fe1f..6a32a3a727bad07a6f26ae83a1f271e6e5e9f7b0 100644 (file)
@@ -49,9 +49,9 @@ CONFIG_SPL_PINCTRL=y
 # CONFIG_SPL_PINCTRL_FULL is not set
 CONFIG_PINCTRL_ROCKCHIP_RK3288=y
 CONFIG_DM_PMIC=y
-CONFIG_PMIC_RK808=y
+CONFIG_PMIC_RK8XX=y
 CONFIG_DM_REGULATOR_FIXED=y
-CONFIG_REGULATOR_RK808=y
+CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM=y
 CONFIG_SPL_RAM=y
index f2872a606cc8528fbca225eedbc9d651ed3fe543..9cf576c481f5018e60fb30d5b466f9029dfe1cfb 100644 (file)
@@ -69,6 +69,7 @@ CONFIG_USB_STORAGE=y
 CONFIG_DM_VIDEO=y
 CONFIG_DISPLAY=y
 CONFIG_VIDEO_ROCKCHIP=y
+CONFIG_DISPLAY_ROCKCHIP_HDMI=y
 CONFIG_CONSOLE_SCROLL_LINES=10
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
diff --git a/configs/firefly-rk3399_defconfig b/configs/firefly-rk3399_defconfig
new file mode 100644 (file)
index 0000000..f30f131
--- /dev/null
@@ -0,0 +1,65 @@
+CONFIG_ARM=y
+CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x4000
+CONFIG_ROCKCHIP_RK3399=y
+CONFIG_SPL_STACK_R_ADDR=0x80000
+CONFIG_DEFAULT_DEVICE_TREE="rk3399-firefly"
+CONFIG_FIT=y
+CONFIG_SPL_LOAD_FIT=y
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_SPL_STACK_R=y
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x4000
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200
+CONFIG_CMD_BOOTZ=y
+# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_GPT=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_USB=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_TIME=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_SPL_OF_PLATDATA=y
+CONFIG_REGMAP=y
+CONFIG_SPL_REGMAP=y
+CONFIG_SYSCON=y
+CONFIG_SPL_SYSCON=y
+CONFIG_CLK=y
+CONFIG_SPL_CLK=y
+CONFIG_ROCKCHIP_GPIO=y
+CONFIG_SYS_I2C_ROCKCHIP=y
+CONFIG_MMC_DW=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_ROCKCHIP=y
+CONFIG_DM_ETH=y
+CONFIG_ETH_DESIGNWARE=y
+CONFIG_GMAC_ROCKCHIP=y
+CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_ROCKCHIP_RK3399_PINCTRL=y
+CONFIG_DM_PMIC=y
+CONFIG_PMIC_RK8XX=y
+CONFIG_REGULATOR_PWM=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_REGULATOR_RK8XX=y
+CONFIG_PWM_ROCKCHIP=y
+CONFIG_RAM=y
+CONFIG_SPL_RAM=y
+CONFIG_BAUDRATE=1500000
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_BASE=0xFF1A0000
+CONFIG_DEBUG_UART_CLOCK=24000000
+CONFIG_DEBUG_UART_SHIFT=2
+CONFIG_SYS_NS16550=y
+CONFIG_SYSRESET=y
+CONFIG_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_GENERIC=y
+CONFIG_USB_STORAGE=y
+CONFIG_USE_TINY_PRINTF=y
+CONFIG_ERRNO_STR=y
index b4f334a436150e0faec669330595e225a2f414b8..00418153befd5abae67e9d55624a24bfd1507a59 100644 (file)
@@ -12,7 +12,6 @@ CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_ASKENV=y
 CONFIG_LOOPW=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
@@ -21,7 +20,6 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_SNTP=y
 CONFIG_CMD_BMP=y
 CONFIG_CMD_BSP=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_DIAG=y
index dbd81331a849ed1fea99c1f7ca2ad59cee8ade4d..046435a9958b8ff074f95be4b83e6672afe46d5e 100644 (file)
@@ -22,5 +22,6 @@ CONFIG_ISO_PARTITION=y
 # CONFIG_MMC is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 761d75896d3b6d964511d5a56c4faa95a2bf4cde..5627a18631fd72b18e7aa3f0744ae2dbf854baf3 100644 (file)
@@ -25,4 +25,5 @@ CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_BAUDRATE=38400
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index 97bb976803a875305261470af9bda7bf485110f8..75e980979ce3681699cf68078a9113a35ae0c93f 100644 (file)
@@ -6,7 +6,6 @@ CONFIG_BOOTDELAY=3
 CONFIG_BOARD_EARLY_INIT_F=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_SETEXPR is not set
@@ -19,5 +18,6 @@ CONFIG_ISO_PARTITION=y
 # CONFIG_MMC is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 7d91fad27e249b76e0b8ddc8613f1e843f4046af..2c6f52494a08708689e3c7bde5dc161e973fcb71 100644 (file)
@@ -20,6 +20,7 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_CONTROL=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_DM_VIDEO=y
 CONFIG_CMD_DHRYSTONE=y
index c09d3a61e1ef693f489a2e8802e4a3e7542dc3ad..f2c22bfd547be43f5e1936003ca5e1aea632882c 100644 (file)
@@ -23,5 +23,6 @@ CONFIG_ISO_PARTITION=y
 # CONFIG_MMC is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 6163353621a56de06f0e0d742e07e33fa3421e2d..e9b8ac26a62b42d183d88b89019db536bdd7957e 100644 (file)
@@ -34,6 +34,7 @@ CONFIG_PWM_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_ULPI_VIEWPORT=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/huawei_hg556a_ram_defconfig b/configs/huawei_hg556a_ram_defconfig
new file mode 100644 (file)
index 0000000..c2e6472
--- /dev/null
@@ -0,0 +1,55 @@
+CONFIG_ARCH_BMIPS=y
+CONFIG_BAUDRATE=115200
+CONFIG_BCM6345_CLK=y
+CONFIG_BCM6345_GPIO=y
+CONFIG_BCM6345_SERIAL=y
+CONFIG_BMIPS_BOOT_RAM=y
+CONFIG_BOARD_HUAWEI_HG556A=y
+CONFIG_CFI_FLASH=y
+# CONFIG_CMD_BOOTD is not set
+CONFIG_CMD_BOOTM=y
+CONFIG_CMD_CPU=y
+# CONFIG_CMD_CRC32 is not set
+# CONFIG_CMD_EDITENV is not set
+# CONFIG_CMD_ELF is not set
+# CONFIG_CMD_ENV_EXISTS is not set
+# CONFIG_CMD_EXPORTENV is not set
+CONFIG_CMD_FLASH=y
+# CONFIG_CMD_FPGA is not set
+# CONFIG_CMD_GPIO is not set
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_IMPORTENV is not set
+CONFIG_CMD_LED=y
+CONFIG_CMD_LICENSE=y
+CONFIG_CMD_LOADB=y
+# CONFIG_CMD_LOADS is not set
+CONFIG_CMD_MEMINFO=y
+# CONFIG_CMD_MISC is not set
+# CONFIG_CMD_NET is not set
+# CONFIG_CMD_NFS is not set
+# CONFIG_CMD_SAVEENV is not set
+# CONFIG_CMD_XIMG is not set
+CONFIG_DEFAULT_DEVICE_TREE="huawei,hg556a"
+CONFIG_DISPLAY_CPUINFO=y
+# CONFIG_DM_DEVICE_REMOVE is not set
+CONFIG_DM_GPIO=y
+CONFIG_DM_RESET=y
+CONFIG_DM_SERIAL=y
+CONFIG_HUSH_PARSER=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_MIPS=y
+# CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set
+# CONFIG_MIPS_BOOT_ENV_LEGACY is not set
+CONFIG_MIPS_BOOT_FDT=y
+CONFIG_MTD=y
+CONFIG_MTD_DEVICE=y
+CONFIG_MTD_NOR_FLASH=y
+CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_RESET=y
+CONFIG_RESET_BCM6345=y
+CONFIG_SOC_BMIPS_BCM6358=y
+# CONFIG_SPL_SERIAL_PRESENT is not set
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SYS_PROMPT="HG556a # "
+CONFIG_SYS_TEXT_BASE=0x80010000
index 2e08690981624982b29a2537020ae1c5405f7e0e..f4542776787e6f61453caa1c0d936973116c672e 100644 (file)
@@ -22,5 +22,6 @@ CONFIG_ISO_PARTITION=y
 # CONFIG_MMC is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 409c836fd6e207886278a66733cbfc9c33500182..7e0b444b5416209cd8f14300a8fad3037a94340e 100644 (file)
@@ -18,5 +18,6 @@ CONFIG_ISO_PARTITION=y
 # CONFIG_MMC is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 0f115066db619b6f0ad3064a390fede27591bbb2..bee04903fe32686bcbf135cd1eb25f34ef384ac9 100644 (file)
@@ -27,5 +27,6 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index cac9326b6cb13572a20d68fd700e4aaf10a9551b..690bc0f461189a325e5de8293dbc8b51952ba5fa 100644 (file)
@@ -7,13 +7,11 @@ CONFIG_BOOTDELAY=5
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_LOOPW=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_BMP=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_FAT=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
index 2c3f1748d8f7822445900b7a5bfab2dded0501a6..982aec48e7af3486bf91f249370f05fcb17cfcb5 100644 (file)
@@ -43,6 +43,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
index e6b1684408a9fb7620d4e99b858a1e0171f7ffed..465a6be8e7a3318dc222b8916cc260c5156fe586 100644 (file)
@@ -25,4 +25,5 @@ CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_BAUDRATE=38400
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index a123b375464882e454b2b12333ef08eb1dd480f7..c2f216bd51ea9599411de758cba45fa6fcde123e 100644 (file)
@@ -25,4 +25,5 @@ CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_BAUDRATE=38400
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index f09647132dba7c754f84617970083dbd0101a4bd..e550cf250a3fd3f808807bb9d9792ec820a97272 100644 (file)
@@ -27,4 +27,5 @@ CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
+CONFIG_USB=y
 CONFIG_OF_LIBFDT=y
index 8804149fc386e6c6a6dc82969ffe00d2d7ba5168..124bf24c4bbaf22fd621b2ef06a2665cb2bca7c2 100644 (file)
@@ -30,5 +30,6 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 918d2e973f124cfaf3d64a28d52a1a50992b6485..398c6b59ec9af6a6a3dddc8098d76db22fbe0b79 100644 (file)
@@ -21,5 +21,6 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 429a81f6b71b444070e5a0abdd6e354fd6df1de6..5fc5916124cc397e8a092bba5ba1688452fdbafa 100644 (file)
@@ -31,6 +31,7 @@ CONFIG_MTD_NOR_FLASH=y
 # CONFIG_PCI is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_CONSOLE_EXTRA_INFO=y
 CONFIG_OF_LIBFDT=y
index 6acbd77d5f3b94e3158ef8953ad253daf326edfb..fbd106ef92bfef1ef927acdae351f31351470605 100644 (file)
@@ -22,7 +22,6 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_DHCP=y
@@ -40,5 +39,6 @@ CONFIG_MMC_MXS=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index adeab1a0e9c740283d8efbfbe6f02b33386b651a..a267c9a55f19b7a22b09035cd548b66d09638243 100644 (file)
@@ -36,6 +36,7 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_SPI_FLASH=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_ATMEL_USBA=y
index 77a4035384aa6b4d015d874ec08d22b12c8a0cb9..7744fcb535862fbdd611d80b587e1a4bb375997c 100644 (file)
@@ -32,4 +32,5 @@ CONFIG_MTD_NOR_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_DM_THERMAL=y
+CONFIG_USB=y
 CONFIG_OF_LIBFDT=y
index 332eddfa38af791def41733ab1ef077166c61cc1..1118caa0a9581a5462ba7b9b7851c87ea966c770 100644 (file)
@@ -33,4 +33,5 @@ CONFIG_MTD_NOR_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_DM_THERMAL=y
+CONFIG_USB=y
 CONFIG_OF_LIBFDT=y
index 3cc1a2ba14b50bab865c87d482f9fd5e714ae6f5..349df80f05d91e526f9424fe6fbf3ea539cdad14 100644 (file)
@@ -33,6 +33,7 @@ CONFIG_CMD_UBI=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_ULPI_VIEWPORT_OMAP=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
index ebf541546483b45d1e9c0baf9069e05e9d8e55d3..db52077e1a47331061244441d963f56c996514d8 100644 (file)
@@ -6,12 +6,10 @@ CONFIG_BOOTDELAY=5
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_ASKENV=y
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_FAT=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
index a811506f29718fbeeb7acb6979043d64b67ae52d..e30ac758dd31a3ecb34be48b22c688fe406a1cbf 100644 (file)
@@ -32,6 +32,7 @@ CONFIG_PWM_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_DM_VIDEO=y
 CONFIG_VIDEO_TEGRA20=y
index 8dac1d72fb973027e4469d4f1a1460d12cab694a..aa50e8842261ee4829c19fde23742147e03fc3da 100644 (file)
@@ -10,6 +10,7 @@ CONFIG_HAVE_VGA_BIOS=y
 CONFIG_GENERATE_PIRQ_TABLE=y
 CONFIG_GENERATE_MP_TABLE=y
 CONFIG_GENERATE_ACPI_TABLE=y
+CONFIG_HAVE_ACPI_RESUME=y
 CONFIG_SEABIOS=y
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
index d93bd97e46e5f277b7ec954aa9f87fff67ce8568..0706ff283bfd97abb17bf3398ce8fec61bde29ea 100644 (file)
@@ -66,6 +66,7 @@ CONFIG_USB_STORAGE=y
 CONFIG_DM_VIDEO=y
 CONFIG_DISPLAY=y
 CONFIG_VIDEO_ROCKCHIP=y
+CONFIG_DISPLAY_ROCKCHIP_HDMI=y
 CONFIG_CONSOLE_SCROLL_LINES=10
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
index 91384a62595f6ed2ca2a4157584246c80cb11126..5040ea574237d372de068ce450fbeedd608dcf78 100644 (file)
@@ -8,12 +8,10 @@ CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_PROMPT="Autobooting in %d seconds, press \"<Esc><Esc>\" to stop\n"
 CONFIG_AUTOBOOT_STOP_STR="\x1b\x1b"
 CONFIG_CMD_ASKENV=y
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_BEDBUG=y
 CONFIG_LED_STATUS=y
index c0af8127b5cdcd1a99d26104e0fdcc4ff823a387..a6bfc71f5e91f2d01e1aa319c25725bf600d0772 100644 (file)
@@ -6,13 +6,11 @@ CONFIG_BOOTDELAY=5
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_ASKENV=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_MAC_PARTITION=y
@@ -20,5 +18,6 @@ CONFIG_ISO_PARTITION=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index ad46e02e94bf12797ae386e85cf84ecacf3798ac..61c366a294db83bdd79296148965ce07e36d6560 100644 (file)
@@ -7,13 +7,11 @@ CONFIG_BOOTDELAY=5
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_ASKENV=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_MAC_PARTITION=y
@@ -22,5 +20,6 @@ CONFIG_ISO_PARTITION=y
 CONFIG_MTD_NOR_FLASH=y
 # CONFIG_PCI is not set
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 08e400cc4e1ec7962b5fb7819631d9b729b4054d..484086837abb31c6ff46cfc215528eec104534af 100644 (file)
@@ -29,6 +29,7 @@ CONFIG_CMD_UBI=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_ULPI_VIEWPORT_OMAP=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/mvebu_db-88f7040-nand_defconfig b/configs/mvebu_db-88f7040-nand_defconfig
new file mode 100644 (file)
index 0000000..d86c18e
--- /dev/null
@@ -0,0 +1,72 @@
+CONFIG_ARM=y
+CONFIG_ARCH_MVEBU=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_TARGET_MVEBU_ARMADA_8K=y
+CONFIG_DEFAULT_DEVICE_TREE="armada-7040-db-nand"
+CONFIG_SMBIOS_PRODUCT_NAME=""
+CONFIG_AHCI=y
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SYS_CONSOLE_INFO_QUIET=y
+CONFIG_BOARD_LATE_INIT=y
+# CONFIG_DISPLAY_CPUINFO is not set
+# CONFIG_DISPLAY_BOARDINFO is not set
+CONFIG_ARCH_EARLY_INIT_R=y
+CONFIG_BOARD_EARLY_INIT_F=y
+CONFIG_HUSH_PARSER=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_MMC=y
+CONFIG_CMD_PART=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_SPI=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_NAND=y
+# CONFIG_CMD_FPGA is not set
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_TFTPPUT=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_TIME=y
+CONFIG_CMD_MVEBU_BUBT=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_MAC_PARTITION=y
+CONFIG_ISO_PARTITION=y
+CONFIG_EFI_PARTITION=y
+CONFIG_BLOCK_CACHE=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_MVTWSI=y
+CONFIG_MISC=y
+CONFIG_DM_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_XENON=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_SPI_FLASH_SPANSION=y
+CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_MVEBU_NAND_BOOT=y
+CONFIG_NAND_PXA3XX=y
+CONFIG_PHYLIB=y
+CONFIG_PCI=y
+CONFIG_DM_PCI=y
+CONFIG_PCIE_DW_MVEBU=y
+CONFIG_MVEBU_COMPHY_SUPPORT=y
+CONFIG_PINCTRL=y
+# CONFIG_SPL_SERIAL_PRESENT is not set
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_BASE=0xf0512000
+CONFIG_DEBUG_UART_CLOCK=200000000
+CONFIG_DEBUG_UART_SHIFT=2
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_STORAGE=y
+CONFIG_SMBIOS_MANUFACTURER=""
index feaa0876ef4ddf10e85abdf54596708a3cf3bbca..795de1474024bcb53dc8012df12e8419312e4230 100644 (file)
@@ -30,5 +30,6 @@ CONFIG_LED_STATUS_BOOT=0
 CONFIG_LED_STATUS_CMD=y
 CONFIG_MMC_MXS=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 2e71dd974208b7003a5f07279a24b9f3276b80aa..7eb1791d6c6aea3e52879f9b907fa18c184d697a 100644 (file)
@@ -28,5 +28,6 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_MMC_MXS=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index d7a1d684c872eeb9f3c2de143910d9d3164bf5c1..710ae4711d1d287ca006e7b2753df742d5b82f7c 100644 (file)
@@ -37,5 +37,6 @@ CONFIG_MMC_MXS=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index c5fe5595bc055c7436d6a627f629a8cb21987125..95ac31adafb87da07510f30cc809ce206829348c 100644 (file)
@@ -38,5 +38,6 @@ CONFIG_MMC_MXS=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index f878bafa0022ecac1487689f72acb722908d0661..3b955401ca22d19d1b7b8cf914211ecd9a1168e3 100644 (file)
@@ -37,5 +37,6 @@ CONFIG_MMC_MXS=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 5203349c7a36cd6e308621313f2f22c4224a0aac..1b5de6655368b290e37548318540695f620774d0 100644 (file)
@@ -37,5 +37,6 @@ CONFIG_MMC_MXS=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 655a1a522440d368ba6280ebc487a2edbda19208..0da348adff2c3b93a629ad37e4f3bdec62ce90e6 100644 (file)
@@ -21,5 +21,6 @@ CONFIG_EFI_PARTITION=y
 # CONFIG_PARTITION_UUIDS is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mx6dlsabresd_defconfig b/configs/mx6dlsabresd_defconfig
deleted file mode 100644 (file)
index 0254a53..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-CONFIG_ARM=y
-CONFIG_ARCH_MX6=y
-CONFIG_TARGET_MX6SABRESD=y
-CONFIG_VIDEO=y
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sabresd/mx6dlsabresd.cfg,MX6DL"
-CONFIG_BOOTDELAY=3
-# CONFIG_CONSOLE_MUX is not set
-CONFIG_SYS_CONSOLE_IS_IN_ENV=y
-CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
-CONFIG_HUSH_PARSER=y
-CONFIG_CMD_BOOTZ=y
-# CONFIG_CMD_IMLS is not set
-# CONFIG_CMD_FLASH is not set
-CONFIG_CMD_MMC=y
-CONFIG_CMD_SF=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_USB=y
-CONFIG_CMD_DFU=y
-CONFIG_CMD_USB_MASS_STORAGE=y
-CONFIG_CMD_GPIO=y
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_CACHE=y
-CONFIG_CMD_EXT2=y
-CONFIG_CMD_EXT4=y
-CONFIG_CMD_EXT4_WRITE=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
-CONFIG_DFU_MMC=y
-CONFIG_DFU_SF=y
-CONFIG_SPI_FLASH=y
-CONFIG_SPI_FLASH_STMICRO=y
-CONFIG_PCI=y
-CONFIG_USB=y
-CONFIG_USB_STORAGE=y
-CONFIG_USB_GADGET=y
-CONFIG_CI_UDC=y
-CONFIG_USB_GADGET_DOWNLOAD=y
-CONFIG_G_DNL_MANUFACTURER="FSL"
-CONFIG_G_DNL_VENDOR_NUM=0x0525
-CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
-# CONFIG_VIDEO_SW_CURSOR is not set
-CONFIG_OF_LIBFDT=y
diff --git a/configs/mx6qsabresd_defconfig b/configs/mx6qsabresd_defconfig
deleted file mode 100644 (file)
index cef7f1a..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-CONFIG_ARM=y
-CONFIG_ARCH_MX6=y
-CONFIG_TARGET_MX6SABRESD=y
-CONFIG_VIDEO=y
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sabresd/mx6q_4x_mt41j128.cfg,MX6Q"
-CONFIG_BOOTDELAY=3
-# CONFIG_CONSOLE_MUX is not set
-CONFIG_SYS_CONSOLE_IS_IN_ENV=y
-CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
-CONFIG_HUSH_PARSER=y
-CONFIG_CMD_BOOTZ=y
-# CONFIG_CMD_IMLS is not set
-# CONFIG_CMD_FLASH is not set
-CONFIG_CMD_MMC=y
-CONFIG_CMD_SF=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_USB=y
-CONFIG_CMD_DFU=y
-CONFIG_CMD_USB_MASS_STORAGE=y
-CONFIG_CMD_GPIO=y
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_CACHE=y
-CONFIG_CMD_EXT2=y
-CONFIG_CMD_EXT4=y
-CONFIG_CMD_EXT4_WRITE=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
-CONFIG_DFU_MMC=y
-CONFIG_DFU_SF=y
-CONFIG_SPI_FLASH=y
-CONFIG_SPI_FLASH_STMICRO=y
-CONFIG_PCI=y
-CONFIG_USB=y
-CONFIG_USB_STORAGE=y
-CONFIG_USB_GADGET=y
-CONFIG_CI_UDC=y
-CONFIG_USB_GADGET_DOWNLOAD=y
-CONFIG_G_DNL_MANUFACTURER="FSL"
-CONFIG_G_DNL_VENDOR_NUM=0x0525
-CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
-# CONFIG_VIDEO_SW_CURSOR is not set
-CONFIG_OF_LIBFDT=y
index 7a46a448b55978c3452d67b210e5fb81a8ad46bc..0e0edefab719d6ff96f92b312d9a5d21490d8c90 100644 (file)
@@ -9,7 +9,7 @@ CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
 CONFIG_VIDEO=y
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,SPL,MX6Q"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,SPL,MX6QDL"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
index a87dec8e3a1f81fbf2940f6493b8abec6c6c5ae5..949ce91804442725abc3a7a4085ef8c48ffe0021 100644 (file)
@@ -39,5 +39,4 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
-CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index 41ecf923226dae9c117a796e1d090fc43397b4db..60a4431083f821991bf04a0c8c46be6aeb645dfe 100644 (file)
@@ -40,5 +40,4 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
-CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index 0701e1d32483e5aa21d9c78042ef793ecb2a620e..52faae43e4fc5dc92cda210e8beb32c9cab32883 100644 (file)
@@ -6,6 +6,7 @@ CONFIG_IMX_RDC=y
 CONFIG_IMX_BOOTAUX=y
 # CONFIG_CMD_BMODE is not set
 CONFIG_VIDEO=y
+CONFIG_DEFAULT_DEVICE_TREE="imx7d-sdb"
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx7dsabresd/imximage.cfg"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
@@ -30,13 +31,35 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_BMP=y
 CONFIG_CMD_CACHE=y
+CONFIG_CMD_PMIC=y
+CONFIG_CMD_REGULATOR=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+# CONFIG_BLK is not set
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
+CONFIG_DM_GPIO=y
+CONFIG_DM_74X164=y
+CONFIG_DM_I2C=y
+CONFIG_DM_MMC=y
+# CONFIG_DM_MMC_OPS is not set
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_EON=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_IMX7=y
+CONFIG_DM_PMIC=y
+CONFIG_DM_PMIC_PFUZE100=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_PFUZE100=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_DM_SPI=y
+CONFIG_SOFT_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_MXC_USB_OTG_HACTIVE=y
 CONFIG_USB_STORAGE=y
@@ -46,4 +69,4 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="FSL"
 CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
-CONFIG_OF_LIBFDT=y
+CONFIG_ERRNO_STR=y
index 2e8b5bedd3509126340b6a5184860b5ac2f90c4c..c678e7558ac1cfff9d5e37b00e336bc84c0cbbe9 100644 (file)
@@ -1,11 +1,13 @@
 CONFIG_ARM=y
 CONFIG_ARCH_MX7=y
 CONFIG_TARGET_MX7DSABRESD=y
+CONFIG_VIDEO=y
 CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
+# CONFIG_ARMV7_VIRT is not set
 CONFIG_IMX_RDC=y
 CONFIG_IMX_BOOTAUX=y
 # CONFIG_CMD_BMODE is not set
-CONFIG_VIDEO=y
+CONFIG_DEFAULT_DEVICE_TREE="imx7d-sdb"
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx7dsabresd/imximage.cfg"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
@@ -31,15 +33,35 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_BMP=y
 CONFIG_CMD_CACHE=y
+CONFIG_CMD_PMIC=y
+CONFIG_CMD_REGULATOR=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+# CONFIG_BLK is not set
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
+CONFIG_DM_GPIO=y
+CONFIG_DM_74X164=y
+CONFIG_DM_I2C=y
+CONFIG_DM_MMC=y
+# CONFIG_DM_MMC_OPS is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_EON=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_IMX7=y
+CONFIG_DM_PMIC=y
+CONFIG_DM_PMIC_PFUZE100=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_PFUZE100=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_DM_SPI=y
+CONFIG_SOFT_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_MXC_USB_OTG_HACTIVE=y
 CONFIG_USB_STORAGE=y
@@ -49,4 +71,4 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="FSL"
 CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
-CONFIG_OF_LIBFDT=y
+CONFIG_ERRNO_STR=y
index 7a025383014bd1b4f092be02a7a2f1037778fa3d..8e9c13a37c4d70dadaee82146e9b0af2ef1cbe17 100644 (file)
@@ -24,5 +24,6 @@ CONFIG_EFI_PARTITION=y
 # CONFIG_MMC is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 5e41e02a02dcfda0f68e4f98cad3cf7ce22f13cd..b43ad161f88fb506bcec5a1bc1fbf9c6988fb64a 100644 (file)
@@ -27,5 +27,6 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 2d04fb597911cfc00fd969b246f60b0385df79d7..3c3fc99e943f11351f5ceaca6883a02101038703 100644 (file)
@@ -27,5 +27,6 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 6c730fc7d8b800a82be80fca290534898d7a7184..4605be3cd262c6b020790e4814756e32228f103e 100644 (file)
@@ -27,5 +27,6 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 4b3c85184229b247ca13b5b2e080aec187a65fd2..2103a1c8dbe569ae0ddab702bb3ac304e3ac02be 100644 (file)
@@ -27,5 +27,6 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 4a0f9455cbd93ae7ee68fd6d868f632a72755f56..3269b85e88b3a743a00d0950951c0238a1660ed6 100644 (file)
@@ -21,5 +21,6 @@ CONFIG_ISO_PARTITION=y
 # CONFIG_MMC is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 42fe12078647d369feb5029b0681d685f84836e7..c01d5f5285b347db8b611b5e22e06b432f68a1e8 100644 (file)
@@ -52,6 +52,7 @@ CONFIG_TEGRA114_SPI=y
 CONFIG_TPM_TIS_INFINEON=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
index dab4cc1443363bc106477775de3cd3f81ea4270c..fed24ec90da9ef40eccdecbe3d0c4a6b44795c1b 100644 (file)
@@ -36,6 +36,7 @@ CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_PHY_SAMSUNG=y
index a28058ad6a9b8a3b72161aed554571bae20fb29c..f4e9e9af5b18e2ca3dedaef7cfbbc626710a4fc3 100644 (file)
@@ -49,6 +49,7 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_MAX77686=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DWC2_OTG=y
index 46846b2ccceea6ce25175fac03f38375f714d6d5..64971c139c53361176451479d87ae2efc889c693 100644 (file)
@@ -34,6 +34,7 @@ CONFIG_LED_STATUS_CMD=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
index 911021b7476c435273d1baeb69b2f2187c4cd884..6194a66ce75f83ce0b34ceb2dd19dd7b29c4cd56 100644 (file)
@@ -24,5 +24,6 @@ CONFIG_CMD_FAT=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 5a88d2986251ad22f31578a5557871057ffaff9c..50450c96530b4d18e8071f6dfda8d3bac4807eb9 100644 (file)
@@ -1,9 +1,11 @@
 CONFIG_ARM=y
 CONFIG_ARCH_OMAP2PLUS=y
+CONFIG_TI_COMMON_CMD_OPTIONS=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_OMAP34XX=y
 CONFIG_TARGET_OMAP3_LOGIC=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
+CONFIG_DEFAULT_DEVICE_TREE="logicpd-torpedo-37xx-devkit"
 CONFIG_SYS_EXTRA_OPTIONS="NAND"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_VERSION_VARIABLE=y
@@ -14,29 +16,19 @@ CONFIG_SPL_MTD_SUPPORT=y
 CONFIG_SPL_OS_BOOT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="OMAP Logic # "
-CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMI is not set
 # CONFIG_CMD_IMLS is not set
-CONFIG_CMD_ASKENV=y
 # CONFIG_CMD_FLASH is not set
-CONFIG_CMD_MMC=y
-CONFIG_CMD_PART=y
-CONFIG_CMD_SPI=y
-CONFIG_CMD_I2C=y
+# CONFIG_CMD_USB is not set
 # CONFIG_CMD_FPGA is not set
-CONFIG_CMD_GPIO=y
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
-CONFIG_CMD_EXT2=y
-CONFIG_CMD_EXT4=y
-CONFIG_CMD_EXT4_WRITE=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
 CONFIG_CMD_UBI=y
 CONFIG_ISO_PARTITION=y
-CONFIG_EFI_PARTITION=y
+CONFIG_OF_CONTROL=y
+# CONFIG_BLK is not set
+CONFIG_DM_I2C=y
+CONFIG_DM_MMC=y
+# CONFIG_DM_MMC_OPS is not set
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MMC_OMAP36XX_PINS=y
 CONFIG_SYS_NS16550=y
@@ -47,4 +39,3 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="TI"
 CONFIG_G_DNL_VENDOR_NUM=0x0451
 CONFIG_G_DNL_PRODUCT_NUM=0xd022
-CONFIG_OF_LIBFDT=y
index daea034ba9b714343ef0dce806fffad325a83189..3be4a1d0b3e857e8263b5b349f7c8d49cf8bc8d0 100644 (file)
@@ -42,5 +42,6 @@ CONFIG_EFI_PARTITION=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index af459fcfdebd4f4d04d245febc620faef5a3671f..8fdf76076c5b4ff0f3ebd408f82bfe693bcc5ae8 100644 (file)
@@ -25,5 +25,6 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 865845ee9ca0946902436cb237d10b5b9950b80b..bd799b7dc3974052f2a06394506d7ed40f1f0a87 100644 (file)
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_OMAP54XX=y
 CONFIG_TARGET_OMAP5_UEVM=y
+CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC=16296
 # CONFIG_SPL_NAND_SUPPORT is not set
 CONFIG_ARMV7_LPAE=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
@@ -36,6 +37,7 @@ CONFIG_DFU_RAM=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
index 7a5a78f4944b8a46f4f6a7f804b019f4efb0a99b..0629f9636fd4e05a4e79371140e908a894e17019 100644 (file)
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_DAVINCI=y
 CONFIG_TARGET_OMAPL138_LCDK=y
+CONFIG_TI_COMMON_CMD_OPTIONS=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SPL_MMC_SUPPORT=y
@@ -14,20 +15,10 @@ CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xb5
 CONFIG_HUSH_PARSER=y
-CONFIG_SYS_PROMPT="U-Boot > "
-CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
-CONFIG_CMD_ASKENV=y
 # CONFIG_CMD_FLASH is not set
-CONFIG_CMD_MMC=y
-CONFIG_CMD_PART=y
+# CONFIG_CMD_GPIO is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_EXT2=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
 CONFIG_CMD_DIAG=y
 CONFIG_CMD_UBI=y
 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
index 2abf3ab6a18ae43b1ae5f9135c6fca63bc66403f..84d3f89850f11bfb8ff41d7c079c3d11c109b1c3 100644 (file)
@@ -20,5 +20,6 @@ CONFIG_CMD_UBI=y
 CONFIG_ISO_PARTITION=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 8b3f25fd9539a982c8ea8faa9ed1ca0aae9b7207..57cbb3a0b9f808c9b23dccfc394a8af9d6beef0b 100644 (file)
@@ -20,5 +20,6 @@ CONFIG_CMD_UBI=y
 CONFIG_ISO_PARTITION=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index ba774738fc624a9f190fb60d911749a25842bb11..4bc2dcee4e3d4e391e94f44bfe4db98f94fff2c6 100644 (file)
@@ -20,5 +20,6 @@ CONFIG_CMD_UBI=y
 CONFIG_ISO_PARTITION=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 4f8f659321c773c5810a4171e45f5d01bded0f32..1a9d6cddc3f31d76e436cd4afda4842120a063a6 100644 (file)
@@ -75,7 +75,6 @@ CONFIG_MXC_UART=y
 CONFIG_IMX_THERMAL=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
-CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
index 0ff4c13aa0a1c48d65923b478d4f3f08bbbb36aa..d78f4450e8cb77823d740a2c7d04a9b99ca70be9 100644 (file)
@@ -33,6 +33,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
index 4dfb02db2011d54f8583a3d0db7d8c3058fdd3a7..e409a3909b1f368302a2d25617d497195e0a9ea9 100644 (file)
@@ -38,6 +38,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
index e49a42f45b2734d504b488a63780d10062d5a516..daf916565955fa3322e3ebd29790050e54962c76 100644 (file)
@@ -33,6 +33,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
index 0ad0974d342a47feb8c0dd28411838084d21e825..9386df83a8d07784ac104c3fca298d8e95158b34 100644 (file)
@@ -31,6 +31,7 @@ CONFIG_PWM_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_DM_VIDEO=y
 CONFIG_VIDEO_TEGRA20=y
index d19908ca8f22c0f9ed57f39e6acb72b0647a8dc2..2933326e5d0d9141674b88cd6830c9a640855b3b 100644 (file)
@@ -4,11 +4,9 @@ CONFIG_TARGET_PCM030=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SYS_TEXT_BASE=0xFF000000"
 CONFIG_BOOTDELAY=3
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
-CONFIG_CMD_DATE=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_USB=y
index ef5c85888c90e780cae0dface6f56feeb5665db5..ff9f4e9f4f00a54a02a92d044ee844fff85de9f8 100644 (file)
@@ -4,11 +4,9 @@ CONFIG_TARGET_PCM030=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_BOOTDELAY=3
 CONFIG_SYS_PROMPT="uboot> "
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
-CONFIG_CMD_DATE=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_USB=y
index f45a90caf931d9c05fe3f2aadccc3a8d68d7f472..4ef0df1aa81e3dde340b6d64d0317cd88d47e85f 100644 (file)
@@ -10,13 +10,11 @@ CONFIG_SILENT_CONSOLE=y
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_ASKENV=y
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_BMP=y
-CONFIG_CMD_DATE=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 # CONFIG_PCI is not set
index ab4415e522a751bb110d63050e60828ea79e008e..f34dfe9fdb34276cd342c70d6b78fc1221e0600a 100644 (file)
@@ -32,6 +32,7 @@ CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
 CONFIG_OF_LIBFDT=y
index 0c6c65e9d89c7ce974b340776db2c775550b6f18..f0fdde713a17a2e1505f6a38fbe4489131dcebcc 100644 (file)
@@ -27,4 +27,5 @@ CONFIG_SPL_DM=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index 029ecc8dc8915a35c1adb5f0801d0dd8f95a0bb9..7699e0c5e6753044291e354483865761ae2dfb2c 100644 (file)
@@ -19,5 +19,6 @@ CONFIG_ISO_PARTITION=y
 # CONFIG_MMC is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 748cda4f9c7ae1b1014f2cb0f5deec9bff42ac16..c9ad0c022d388e38984f0e9264f4f53c2ef0442f 100644 (file)
@@ -49,9 +49,9 @@ CONFIG_SPL_PINCTRL=y
 # CONFIG_SPL_PINCTRL_FULL is not set
 CONFIG_PINCTRL_ROCKCHIP_RK3288=y
 CONFIG_DM_PMIC=y
-CONFIG_PMIC_RK808=y
+CONFIG_PMIC_RK8XX=y
 CONFIG_DM_REGULATOR_FIXED=y
-CONFIG_REGULATOR_RK808=y
+CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM=y
 CONFIG_SPL_RAM=y
index 206ba472fa9a245194e4e24fe3e56874d19844c4..a50d9ed99b66ce795f2149e759e4985a6527c824 100644 (file)
@@ -25,4 +25,5 @@ CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_BAUDRATE=38400
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index 5b7c5ef3e993b8aca3aed29dec1d8f05b2a6060b..67bdfd63f2596667faf1c8ee24bf4051aaed5eeb 100644 (file)
@@ -5,6 +5,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_PXM2=y
+CONFIG_SYS_MPUCLK=720
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
@@ -71,3 +72,4 @@ CONFIG_G_DNL_PRODUCT_NUM=0x02d2
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_SYS_CONSOLE_BG_COL=0xff
 CONFIG_SYS_CONSOLE_FG_COL=0x00
+CONFIG_OMAP_WATCHDOG=y
index c5c3d5271862b05615f271c68af381baa505aa64..91b08dc24f2986173610cc53f4f1790c17635223 100644 (file)
@@ -13,7 +13,6 @@ CONFIG_VERSION_VARIABLE=y
 # CONFIG_CMD_ENV_EXISTS is not set
 # CONFIG_CMD_LOADB is not set
 # CONFIG_CMD_LOADS is not set
-CONFIG_CMD_I2C=y
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_ECHO is not set
 # CONFIG_CMD_ITEST is not set
index 084c03cd002f1aa4a65d8decacd0c1385925a720..f77d4d4087933d686781189f73145ed2ca81e1cf 100644 (file)
@@ -5,6 +5,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_RASTABAN=y
+CONFIG_SYS_MPUCLK=300
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
@@ -64,3 +65,4 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Siemens AG"
 CONFIG_G_DNL_VENDOR_NUM=0x0908
 CONFIG_G_DNL_PRODUCT_NUM=0x02d2
+CONFIG_OMAP_WATCHDOG=y
index ae432ad14db018e577810f400b6f85796473b075..6b868124cd5ef1c04ae5fd101c73b2c12149df48 100644 (file)
@@ -64,6 +64,7 @@ CONFIG_SYSRESET=y
 CONFIG_DM_VIDEO=y
 CONFIG_DISPLAY=y
 CONFIG_VIDEO_ROCKCHIP=y
+CONFIG_DISPLAY_ROCKCHIP_HDMI=y
 CONFIG_CONSOLE_SCROLL_LINES=10
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
index 9875f5d295008d176d12671ac40d0c228e01d1d4..f8b3ed49a990102906622ef331ef28db5064122c 100644 (file)
@@ -13,13 +13,15 @@ CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_FPGA is not set
 CONFIG_CMD_GPIO=y
-CONFIG_OF_EMBED=y
+CONFIG_DM_MMC=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_BCM2835=y
+CONFIG_DM_ETH=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_CONSOLE_SCROLL_LINES=10
-CONFIG_LCD=y
 CONFIG_PHYS_TO_BUS=y
index e4a81b882d1f65a249e1394b66bcd4acbd0d8d6f..490af818b6d870673f80c2e5273fd5fc63e65eee 100644 (file)
@@ -14,14 +14,16 @@ CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_FPGA is not set
 CONFIG_CMD_GPIO=y
-CONFIG_OF_EMBED=y
+CONFIG_DM_MMC=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_BCM2835=y
+CONFIG_DM_ETH=y
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_CONSOLE_SCROLL_LINES=10
-CONFIG_LCD=y
 CONFIG_PHYS_TO_BUS=y
index e0be6c76f8fc23a2dacbcc6b59feec18315c0f1b..4c0eb049b214fcd145741e23826f654b9f394009 100644 (file)
@@ -14,14 +14,16 @@ CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_FPGA is not set
 CONFIG_CMD_GPIO=y
-CONFIG_OF_EMBED=y
+CONFIG_DM_MMC=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_BCM2835=y
+CONFIG_DM_ETH=y
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_CONSOLE_SCROLL_LINES=10
-CONFIG_LCD=y
 CONFIG_PHYS_TO_BUS=y
index a07d69800ce0606041e351ee3f914c00ed4f9278..1b954fe2b76da2bf7c329df365c5452d21bc81f1 100644 (file)
@@ -13,13 +13,15 @@ CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_FPGA is not set
 CONFIG_CMD_GPIO=y
-CONFIG_OF_EMBED=y
+CONFIG_DM_MMC=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_BCM2835=y
+CONFIG_DM_ETH=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_CONSOLE_SCROLL_LINES=10
-CONFIG_LCD=y
 CONFIG_PHYS_TO_BUS=y
index 33289962a889222b20d551f361d0a45ec0690728..f09a67e62c73a321ce2b9299b496e4a52fbaa3c2 100644 (file)
@@ -5,6 +5,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_RUT=y
+CONFIG_SYS_MPUCLK=600
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
index 9694632d2c77248e07fa91a6ccad6cb6268c0f7f..239bfdd66b9648eeec2f67d3b05818a331919f17 100644 (file)
@@ -19,4 +19,5 @@ CONFIG_CMD_SF=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index 30e8500edf554cb60d1f8f6d7a2bc8bdea91fad6..21014b937c6b124e9e90fea12d302fa20cd84769 100644 (file)
@@ -20,4 +20,5 @@ CONFIG_CMD_SF=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index 500f497a036f36b8af041addf7faf09d03615d0e..f064a43c6bbef4a55896a2dd1231493cf6ef0c55 100644 (file)
@@ -8,12 +8,15 @@ CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained"
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_MMC"
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL=y
+CONFIG_SPL_SEPARATE_BSS=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMI is not set
@@ -30,8 +33,10 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dmas dma-names"
 CONFIG_DM=y
 CONFIG_SPL_DM=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
 CONFIG_CLK_AT91=y
@@ -48,13 +53,16 @@ CONFIG_MMC_SDHCI_ATMEL=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
 CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
 CONFIG_PINCTRL_AT91PIO4=y
 CONFIG_DM_SERIAL=y
 CONFIG_DEBUG_UART=y
 CONFIG_DEBUG_UART_ATMEL=y
 CONFIG_DEBUG_UART_BASE=0xf8020000
-CONFIG_DEBUG_UART_CLOCK=0
+CONFIG_DEBUG_UART_CLOCK=83000000
 CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
index 9fc8aa2c8d9aa6fc68fdfc95f47230b0eb01337c..70a17ed1352a5d3db8ece16e5aaecc09919cdb9a 100644 (file)
@@ -4,9 +4,11 @@ CONFIG_TARGET_SAMA5D2_XPLAINED=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained"
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_SERIALFLASH"
@@ -29,8 +31,10 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dmas dma-names"
 CONFIG_DM=y
 CONFIG_SPL_DM=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
 CONFIG_CLK_AT91=y
@@ -47,13 +51,16 @@ CONFIG_MMC_SDHCI_ATMEL=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
 CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
 CONFIG_PINCTRL_AT91PIO4=y
 CONFIG_DM_SERIAL=y
 CONFIG_DEBUG_UART=y
 CONFIG_DEBUG_UART_ATMEL=y
 CONFIG_DEBUG_UART_BASE=0xf8020000
-CONFIG_DEBUG_UART_CLOCK=0
+CONFIG_DEBUG_UART_CLOCK=83000000
 CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
diff --git a/configs/sama5d36ek_cmp_mmc_defconfig b/configs/sama5d36ek_cmp_mmc_defconfig
new file mode 100644 (file)
index 0000000..32a21f9
--- /dev/null
@@ -0,0 +1,51 @@
+CONFIG_ARM=y
+CONFIG_ARCH_AT91=y
+CONFIG_TARGET_SAMA5D3XEK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="sama5d36ek_cmp"
+CONFIG_FIT=y
+CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_MMC"
+CONFIG_BOOTDELAY=3
+# CONFIG_CONSOLE_MUX is not set
+CONFIG_SYS_CONSOLE_IS_IN_ENV=y
+# CONFIG_DISPLAY_BOARDINFO is not set
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_BOOTZ=y
+# CONFIG_CMD_IMI is not set
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_LOADS is not set
+CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_AT91_UTMI=y
+CONFIG_AT91_H32MX=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xffffee00
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
+CONFIG_LCD=y
diff --git a/configs/sama5d36ek_cmp_nandflash_defconfig b/configs/sama5d36ek_cmp_nandflash_defconfig
new file mode 100644 (file)
index 0000000..34c4de1
--- /dev/null
@@ -0,0 +1,51 @@
+CONFIG_ARM=y
+CONFIG_ARCH_AT91=y
+CONFIG_TARGET_SAMA5D3XEK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="sama5d36ek_cmp"
+CONFIG_FIT=y
+CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_NANDFLASH"
+CONFIG_BOOTDELAY=3
+# CONFIG_CONSOLE_MUX is not set
+CONFIG_SYS_CONSOLE_IS_IN_ENV=y
+# CONFIG_DISPLAY_BOARDINFO is not set
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_BOOTZ=y
+# CONFIG_CMD_IMI is not set
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_LOADS is not set
+CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_AT91_UTMI=y
+CONFIG_AT91_H32MX=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xffffee00
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
+CONFIG_LCD=y
diff --git a/configs/sama5d36ek_cmp_spiflash_defconfig b/configs/sama5d36ek_cmp_spiflash_defconfig
new file mode 100644 (file)
index 0000000..42c3111
--- /dev/null
@@ -0,0 +1,51 @@
+CONFIG_ARM=y
+CONFIG_ARCH_AT91=y
+CONFIG_TARGET_SAMA5D3XEK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="sama5d36ek_cmp"
+CONFIG_FIT=y
+CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_SERIALFLASH"
+CONFIG_BOOTDELAY=3
+# CONFIG_CONSOLE_MUX is not set
+CONFIG_SYS_CONSOLE_IS_IN_ENV=y
+# CONFIG_DISPLAY_BOARDINFO is not set
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_BOOTZ=y
+# CONFIG_CMD_IMI is not set
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_LOADS is not set
+CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_AT91_UTMI=y
+CONFIG_AT91_H32MX=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xffffee00
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
+CONFIG_LCD=y
index 64bb923c13af19dc2876b6c830b11d29b1134553..541705766487ccf6a2038957251bf04aca3716bb 100644 (file)
@@ -127,7 +127,7 @@ CONFIG_PMIC_ACT8846=y
 CONFIG_DM_PMIC_PFUZE100=y
 CONFIG_DM_PMIC_MAX77686=y
 CONFIG_PMIC_PM8916=y
-CONFIG_PMIC_RK808=y
+CONFIG_PMIC_RK8XX=y
 CONFIG_PMIC_S2MPS11=y
 CONFIG_DM_PMIC_SANDBOX=y
 CONFIG_PMIC_S5M8767=y
@@ -137,7 +137,7 @@ CONFIG_REGULATOR_ACT8846=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_MAX77686=y
 CONFIG_DM_REGULATOR_FIXED=y
-CONFIG_REGULATOR_RK808=y
+CONFIG_REGULATOR_RK8XX=y
 CONFIG_REGULATOR_S5M8767=y
 CONFIG_DM_REGULATOR_SANDBOX=y
 CONFIG_REGULATOR_TPS65090=y
@@ -172,6 +172,8 @@ CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y
 CONFIG_VIDEO_SANDBOX_SDL=y
 CONFIG_FS_CBFS=y
 CONFIG_FS_CRAMFS=y
+CONFIG_PHY=y
+CONFIG_PHY_SANDBOX=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_TPM=y
 CONFIG_LZ4=y
index fb98ab8b6eaa914f0853bfb532cbb90ef7662618..6c6e6596b3d0c6adc9a0a7c4063647c9f56ba484 100644 (file)
@@ -105,7 +105,6 @@ CONFIG_CROS_EC_SPI=y
 CONFIG_PWRSEQ=y
 CONFIG_SPL_PWRSEQ=y
 # CONFIG_MMC is not set
-CONFIG_GENERIC_MMC=y
 CONFIG_SPI_FLASH_SANDBOX=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
@@ -131,7 +130,7 @@ CONFIG_PMIC_ACT8846=y
 CONFIG_DM_PMIC_PFUZE100=y
 CONFIG_DM_PMIC_MAX77686=y
 CONFIG_PMIC_PM8916=y
-CONFIG_PMIC_RK808=y
+CONFIG_PMIC_RK8XX=y
 CONFIG_PMIC_S2MPS11=y
 CONFIG_DM_PMIC_SANDBOX=y
 CONFIG_PMIC_S5M8767=y
@@ -141,7 +140,7 @@ CONFIG_REGULATOR_ACT8846=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_MAX77686=y
 CONFIG_DM_REGULATOR_FIXED=y
-CONFIG_REGULATOR_RK808=y
+CONFIG_REGULATOR_RK8XX=y
 CONFIG_REGULATOR_S5M8767=y
 CONFIG_DM_REGULATOR_SANDBOX=y
 CONFIG_REGULATOR_TPS65090=y
@@ -174,6 +173,8 @@ CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y
 CONFIG_VIDEO_SANDBOX_SDL=y
 CONFIG_FS_CBFS=y
 CONFIG_FS_CRAMFS=y
+CONFIG_PHY=y
+CONFIG_PHY_SANDBOX=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_TPM=y
 CONFIG_LZ4=y
index 9b7b1fef52bb43ca8eb61aa02b8d85a4588c3f23..3061e5a9d9ae39c5be7678e4f3d79b8ae5d4eafb 100644 (file)
@@ -133,7 +133,7 @@ CONFIG_PMIC_ACT8846=y
 CONFIG_DM_PMIC_PFUZE100=y
 CONFIG_DM_PMIC_MAX77686=y
 CONFIG_PMIC_PM8916=y
-CONFIG_PMIC_RK808=y
+CONFIG_PMIC_RK8XX=y
 CONFIG_PMIC_S2MPS11=y
 CONFIG_DM_PMIC_SANDBOX=y
 CONFIG_PMIC_S5M8767=y
@@ -143,7 +143,7 @@ CONFIG_REGULATOR_ACT8846=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_MAX77686=y
 CONFIG_DM_REGULATOR_FIXED=y
-CONFIG_REGULATOR_RK808=y
+CONFIG_REGULATOR_RK8XX=y
 CONFIG_REGULATOR_S5M8767=y
 CONFIG_DM_REGULATOR_SANDBOX=y
 CONFIG_REGULATOR_TPS65090=y
@@ -178,6 +178,8 @@ CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y
 CONFIG_VIDEO_SANDBOX_SDL=y
 CONFIG_FS_CBFS=y
 CONFIG_FS_CRAMFS=y
+CONFIG_PHY=y
+CONFIG_PHY_SANDBOX=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_TPM=y
 CONFIG_LZ4=y
index ff5a0823d4e6e5ce6797a81cb8ad7a57156b211e..80531fe6d4d9ab09e295bdf0c958fede4ac0a03f 100644 (file)
@@ -27,6 +27,7 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_MMC_MXS=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 CONFIG_OF_LIBFDT=y
index e2a8e3c762d2eb196224cc8ab1ed3adac8670089..827f4eeccb7310a90b08a4728139da2a87396d12 100644 (file)
@@ -24,5 +24,6 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_MMC_MXS=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 9e50f702bfd5ea5dece4e98f0bf1bb980b94ddf8..00fc117f4a789eab027faa109bb16869b849d4b9 100644 (file)
@@ -31,6 +31,7 @@ CONFIG_PWM_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_ULPI_VIEWPORT=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/sfr_nb4-ser_ram_defconfig b/configs/sfr_nb4-ser_ram_defconfig
new file mode 100644 (file)
index 0000000..d7c8329
--- /dev/null
@@ -0,0 +1,56 @@
+CONFIG_ARCH_BMIPS=y
+CONFIG_BAUDRATE=115200
+CONFIG_BCM6345_CLK=y
+CONFIG_BCM6345_GPIO=y
+CONFIG_BCM6345_SERIAL=y
+CONFIG_BMIPS_BOOT_RAM=y
+CONFIG_BOARD_SFR_NB4_SER=y
+CONFIG_CFI_FLASH=y
+# CONFIG_CMD_BOOTD is not set
+CONFIG_CMD_BOOTM=y
+CONFIG_CMD_CPU=y
+# CONFIG_CMD_CRC32 is not set
+# CONFIG_CMD_EDITENV is not set
+# CONFIG_CMD_ELF is not set
+# CONFIG_CMD_ENV_EXISTS is not set
+# CONFIG_CMD_EXPORTENV is not set
+CONFIG_CMD_FLASH=y
+# CONFIG_CMD_FPGA is not set
+# CONFIG_CMD_GPIO is not set
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_IMPORTENV is not set
+CONFIG_CMD_LED=y
+CONFIG_CMD_LICENSE=y
+CONFIG_CMD_LOADB=y
+# CONFIG_CMD_LOADS is not set
+CONFIG_CMD_MEMINFO=y
+# CONFIG_CMD_MISC is not set
+# CONFIG_CMD_NET is not set
+# CONFIG_CMD_NFS is not set
+# CONFIG_CMD_SAVEENV is not set
+# CONFIG_CMD_XIMG is not set
+CONFIG_DEFAULT_DEVICE_TREE="sfr,nb4-ser"
+CONFIG_DISPLAY_CPUINFO=y
+# CONFIG_DM_DEVICE_REMOVE is not set
+CONFIG_DM_GPIO=y
+CONFIG_DM_RESET=y
+CONFIG_DM_SERIAL=y
+CONFIG_HUSH_PARSER=y
+CONFIG_LED=y
+CONFIG_LED_BCM6358=y
+CONFIG_LED_GPIO=y
+CONFIG_MIPS=y
+# CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set
+# CONFIG_MIPS_BOOT_ENV_LEGACY is not set
+CONFIG_MIPS_BOOT_FDT=y
+CONFIG_MTD=y
+CONFIG_MTD_DEVICE=y
+CONFIG_MTD_NOR_FLASH=y
+CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_RESET=y
+CONFIG_RESET_BCM6345=y
+CONFIG_SOC_BMIPS_BCM6358=y
+# CONFIG_SPL_SERIAL_PRESENT is not set
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SYS_PROMPT="NB4-SER # "
+CONFIG_SYS_TEXT_BASE=0x80010000
index b3280557caf46c92ddbd426a5bd1c3e39205805d..fa99d51505d6799dc547c7f5314fce3afe8ee68e 100644 (file)
@@ -23,5 +23,6 @@ CONFIG_CMD_UBI=y
 CONFIG_ISO_PARTITION=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index 293b08eaba30694917c7e0eb4bd1fd97f2e432ef..d161c3bb88bfa02a9d64b020cbc672c761e5af32 100644 (file)
@@ -25,4 +25,5 @@ CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_BAUDRATE=38400
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index ff52a3757ab3c5fd135aa20313a17c437851a66d..c51df50678e9ec4eda160a0ce8614cb3d68fcbe6 100644 (file)
@@ -48,6 +48,7 @@ CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_VIDEO_BRIDGE=y
 CONFIG_ERRNO_STR=y
index 0ea2393bf626cb74e3dab817951590cb3bed45a6..8050f24fbb8fa080705752fcb5c5af50fb4759f8 100644 (file)
@@ -66,6 +66,7 @@ CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_DM_VIDEO=y
 CONFIG_VIDCONSOLE_AS_LCD=y
index 9e00d650344375df0f2036d7d7760de545ae0b72..07114ecba40c94aec10429c4b38a6993511c3829 100644 (file)
@@ -24,6 +24,7 @@ CONFIG_CMD_EXT2=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+# CONFIG_USB_EHCI_HCD is not set
 CONFIG_USB_STORAGE=y
 CONFIG_CONSOLE_EXTRA_INFO=y
 CONFIG_OF_LIBFDT=y
index d9fd8ca3626c909f4afa20e5ae02dd2d1f851f96..716f8c00e6ad95cccf02b2f58bb004ac4ce4be65 100644 (file)
@@ -66,6 +66,7 @@ CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_DM_VIDEO=y
 CONFIG_VIDCONSOLE_AS_LCD=y
index aaa85022ed88aa9684bd119372b8618e4158d2ec..48989aaea6b64f63772208ed343ff4955e5b3d25 100644 (file)
@@ -25,4 +25,5 @@ CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_BAUDRATE=38400
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index 24244134c7ec29aa1eb3b035ae7fb72f75fda836..feb8fe690fae612929420492dd65b36aa9566194 100644 (file)
@@ -24,5 +24,6 @@ CONFIG_CMD_FAT=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT=y
index cd9b5078038c62aa46f8b215125958b17e7e5bdc..91fd3d5f9f42d856acfa053f387e75f3d29c251d 100644 (file)
@@ -33,4 +33,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA20_SLINK=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index 1dd8a1ec20b4784490c8f2aa91ff510d3205bbd2..5c394b73f5e801d22588bb14e3e9bda84bfbb17f 100644 (file)
@@ -32,6 +32,7 @@ CONFIG_PWM_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_DM_VIDEO=y
 CONFIG_VIDEO_TEGRA20=y
index a20c4dfb31d0dc70b376d6ac5c48769186410c3c..914f70fd6a01ae97960d32dbeaede1f3265d8c03 100644 (file)
@@ -5,6 +5,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_THUBAN=y
+CONFIG_SYS_MPUCLK=300
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
@@ -64,3 +65,4 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Siemens AG"
 CONFIG_G_DNL_VENDOR_NUM=0x0908
 CONFIG_G_DNL_PRODUCT_NUM=0x02d2
+CONFIG_OMAP_WATCHDOG=y
index ada59504aa7be496c5a054236552fe047a1011ff..bac801e755d0a98b20191562dc04b34ad2d2c3e0 100644 (file)
@@ -11,6 +11,7 @@ CONFIG_CONSOLE_MUX=y
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000
+CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
@@ -39,6 +40,8 @@ CONFIG_CLK=y
 CONFIG_SPL_CLK=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
+CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
 CONFIG_MMC_DW=y
 CONFIG_MMC_DW_ROCKCHIP=y
 CONFIG_DM_ETH=y
@@ -49,9 +52,9 @@ CONFIG_SPL_PINCTRL=y
 # CONFIG_SPL_PINCTRL_FULL is not set
 CONFIG_PINCTRL_ROCKCHIP_RK3288=y
 CONFIG_DM_PMIC=y
-CONFIG_PMIC_RK808=y
+CONFIG_PMIC_RK8XX=y
 CONFIG_DM_REGULATOR_FIXED=y
-CONFIG_REGULATOR_RK808=y
+CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM=y
 CONFIG_SPL_RAM=y
index 455f4b281958f8b7849133ffbdc46c0f0a070368..e4074a0bd7c2ec62573bff85912c2baf4d3c76d6 100644 (file)
@@ -37,4 +37,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA20_SFLASH=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index ba7b68b31714a383d1c887103bafc17ff9a4192b..62d7d17ca9c01a795b26a3dbe1129e732d913424 100644 (file)
@@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_ULPI_VIEWPORT_OMAP=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
index db4c47c3d25c5c1adb020d516d42c684c881ab28..18dc039d9355b9846ec504c82e70a43a4c892eb8 100644 (file)
@@ -3,13 +3,11 @@ CONFIG_MPC5xxx=y
 CONFIG_TARGET_V38B=y
 CONFIG_BOOTDELAY=3
 CONFIG_BOARD_EARLY_INIT_F=y
-CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
-CONFIG_CMD_DATE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_DIAG=y
 CONFIG_MAC_PARTITION=y
index 27b29fb94e296dbc002a94bc4198b0734135abd2..259b48f5aa83a9f1a6806b84074a4c39d8cc6580 100644 (file)
@@ -14,4 +14,5 @@ CONFIG_CMD_FAT=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index 4896c6b4595b7a99e50dc8d849aab97f15355a87..6d2d14f8a2a94fa615de7ad5d096c52a51f940bd 100644 (file)
@@ -17,4 +17,5 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_UBI=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index d5927b383bd4bd6e7fbf7d50d4951d285cb06b79..3996d9da50b6a032658439735eb035969ef23f55 100644 (file)
@@ -14,4 +14,5 @@ CONFIG_CMD_FAT=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index e0c8a7176eaec4ff0c9cd7e246c9d004de5de628..6bbdc3b0e630d11e5a2ef50d136a2265de36aca3 100644 (file)
@@ -17,4 +17,5 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_UBI=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index 1b0e646474c9403db0f812eb0268043885f34fa0..97960e720e78458c655c3e724cdcdf09fffd017f 100644 (file)
@@ -37,6 +37,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
index 486861b461de2cc5371a5893fbc48c8ed89eb664..8d3e54e8d765f7151301eba674b1ed3920997ad7 100644 (file)
@@ -30,6 +30,7 @@ CONFIG_PWM_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_ULPI_VIEWPORT=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
index dc7f2c6697d5e51e01c07f76b65a36cd84a10547..c8da54d9b683c36aa814617b119c9a394909d18b 100644 (file)
@@ -25,6 +25,7 @@ CONFIG_SPI_FLASH=y
 CONFIG_NETDEVICES=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_ATMEL_USBA=y
index 6c27b36235659778c9a92a8c667c17d79218ddd3..3ebfb79895fe1963909d88b94a93a6381fec3b6c 100644 (file)
@@ -27,4 +27,5 @@ CONFIG_SPL_DM=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index 01565ec33b0dea8acd02420d7e8e083bb791775a..3aaba16c2ef0ddd0fab5f474d4f7286806f45235 100644 (file)
@@ -36,6 +36,7 @@ CONFIG_MTD_NOR_FLASH=y
 CONFIG_NETDEVICES=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_OF_LIBFDT=y
index ce1ad56c0b04736de4fb03f92614933eca915a70..398d32f701a7d26a4caf1993e353f35b370c8997 100644 (file)
@@ -26,6 +26,7 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_MMC_MXS=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 CONFIG_OF_LIBFDT=y
index 54e8dde1cfca46c15e4554599733c77368c55245..7a939036d92002b61cb936ed054f249f4cdf54cf 100644 (file)
@@ -18,4 +18,5 @@ CONFIG_CMD_FAT=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
index cd447024c0d2e5a24454d8b5c6725360174a8271..491b02dc9c15ccbd8954a982ec2f802ae0f749d7 100644 (file)
@@ -635,7 +635,7 @@ int part_get_info_by_name(struct blk_desc *dev_desc, const char *name,
                        }
                        if (strcmp(name, (const char *)info->name) == 0) {
                                /* matched */
-                               return 0;
+                               return i;
                        }
                }
        }
index c9656299053b4e21a0ae0cadb71b8249e322afb3..378b06b108d9e8bb7c834d585f0e1342eb7b0f46 100644 (file)
@@ -130,6 +130,10 @@ u-boot-dtb.bin which does the above step for you also. If you are using
 CONFIG_SPL_FRAMEWORK, then u-boot.img will be built to include the device
 tree binary.
 
+If CONFIG_OF_BOARD is defined, a board-specific routine will provide the
+device tree at runtime, for example if an earlier bootloader stage creates
+it and passes it to U-Boot.
+
 If CONFIG_OF_HOSTFILE is defined, then it will be read from a file on
 startup. This is only useful for sandbox. Use the -d flag to U-Boot to
 specify the file to read.
diff --git a/doc/README.omap-reset-time b/doc/README.omap-reset-time
deleted file mode 100644 (file)
index 0c974ba..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-README on how reset time on OMAPs should be calculated
-
-CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC:
-Most OMAPs' provide a way to specify the time for
-which the reset should be held low while the voltages
-and Oscillator outputs stabilize.
-
-This time is mostly board and PMIC dependent. Hence the
-boards are expected to specify a pre-computed time
-using the above option, (the details on how to compute
-the value are given below) without which a default time
-as specified by CONFIG_DEFAULT_OMAP_RESET_TIME_MAX_USEC
-is used.
-
-The value for CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC
-can be computed using a summation of the below 3 parameters
--1- Time taken by the Osciallator to stop and restart
--2- PMIC OTP time
--3- Voltage ramp time, which can be derived using the
-PMIC slew rate and value of voltage ramp needed.
index a38cc1bc6ca9b7b7a00036961f606bc4d1e48bf9..c69dc1c511341501d3a3e5c5ae904c2ee2e10fcb 100644 (file)
@@ -1014,12 +1014,12 @@ compile ACPI DSDT table written in ASL format to AML format. You can get
 the compiler via "apt-get install iasl" if you are on Ubuntu or download
 the source from [17] to compile one by yourself.
 
-Current ACPI support in U-Boot is not complete. More features will be added
-in the future. The status as of today is:
+Current ACPI support in U-Boot is basically complete. More optional features
+can be added in the future. The status as of today is:
 
  * Support generating RSDT, XSDT, FACS, FADT, MADT, MCFG tables.
  * Support one static DSDT table only, compiled by Intel ACPI compiler.
- * Support S0/S5, reboot and shutdown from OS.
+ * Support S0/S3/S4/S5, reboot and shutdown from OS.
  * Support booting a pre-installed Ubuntu distribution via 'zboot' command.
  * Support installing and booting Ubuntu 14.04 (or above) from U-Boot with
    the help of SeaBIOS using legacy interface (non-UEFI mode).
@@ -1027,9 +1027,6 @@ in the future. The status as of today is:
    of SeaBIOS using legacy interface (non-UEFI mode).
  * Support ACPI interrupts with SCI only.
 
-Features not supported so far (to make it a complete ACPI solution):
- * S3 (Suspend to RAM), S4 (Suspend to Disk).
-
 Features that are optional:
  * Dynamic AML bytecodes insertion at run-time. We may need this to support
    SSDT table generation and DSDT fix up.
@@ -1046,6 +1043,21 @@ command from the OS.
 For other platform boards, ACPI support status can be checked by examining their
 board defconfig files to see if CONFIG_GENERATE_ACPI_TABLE is set to y.
 
+The S3 sleeping state is a low wake latency sleeping state defined by ACPI
+spec where all system context is lost except system memory. To test S3 resume
+with a Linux kernel, simply run "echo mem > /sys/power/state" and kernel will
+put the board to S3 state where the power is off. So when the power button is
+pressed again, U-Boot runs as it does in cold boot and detects the sleeping
+state via ACPI register to see if it is S3, if yes it means we are waking up.
+U-Boot is responsible for restoring the machine state as it is before sleep.
+When everything is done, U-Boot finds out the wakeup vector provided by OSes
+and jump there. To determine whether ACPI S3 resume is supported, check to
+see if CONFIG_HAVE_ACPI_RESUME is set for that specific board.
+
+Note for testing S3 resume with Windows, correct graphics driver must be
+installed for your platform, otherwise you won't find "Sleep" option in
+the "Power" submenu from the Windows start menu.
+
 EFI Support
 -----------
 U-Boot supports booting as a 32-bit or 64-bit EFI payload, e.g. with UEFI.
index 5640bae72fc71d4673208b8938035b51dec3c1eb..d4bc1df5531ead399f8017fcdc2b8c9165d308d2 100644 (file)
@@ -20,3 +20,8 @@ u-boot,efi-partition-entries-offset
        is formatted.
 
        This setting will override any values configured via Kconfig.
+
+u-boot,spl-payload-offset
+       If present (and SPL is controlled by the device-tree), this allows
+       to override the CONFIG_SYS_SPI_U_BOOT_OFFS setting using a value
+       from the device-tree.
diff --git a/doc/device-tree-bindings/leds/leds-bcm6328.txt b/doc/device-tree-bindings/leds/leds-bcm6328.txt
new file mode 100644 (file)
index 0000000..7f5597b
--- /dev/null
@@ -0,0 +1,106 @@
+LEDs connected to Broadcom BCM6328 controller
+
+This controller is present on BCM6318, BCM6328, BCM6362 and BCM63268.
+In these SoCs it's possible to control LEDs both as GPIOs or by hardware.
+However, on some devices there are Serial LEDs (LEDs connected to a 74x164
+controller), which can either be controlled by software (exporting the 74x164
+as spi-gpio. See Documentation/devicetree/bindings/gpio/gpio-74x164.txt), or
+by hardware using this driver.
+Some of these Serial LEDs are hardware controlled (e.g. ethernet LEDs) and
+exporting the 74x164 as spi-gpio prevents those LEDs to be hardware
+controlled, so the only chance to keep them working is by using this driver.
+
+Required properties:
+  - compatible : should be "brcm,bcm6328-leds".
+  - #address-cells : must be 1.
+  - #size-cells : must be 0.
+  - reg : BCM6328 LED controller address and size.
+
+Optional properties:
+  - brcm,serial-leds : Boolean, enables Serial LEDs.
+    Default : false
+  - brcm,serial-mux : Boolean, enables Serial LEDs multiplexing.
+    Default : false
+  - brcm,serial-clk-low : Boolean, makes clock signal active low.
+    Default : false
+  - brcm,serial-dat-low : Boolean, makes data signal active low.
+    Default : false
+  - brcm,serial-shift-inv : Boolean, inverts Serial LEDs shift direction.
+    Default : false
+
+Each LED is represented as a sub-node of the brcm,bcm6328-leds device.
+
+LED sub-node required properties:
+  - reg : LED pin number (only LEDs 0 to 23 are valid).
+
+LED sub-node optional properties:
+  - label : see Documentation/devicetree/bindings/leds/common.txt
+  - active-low : Boolean, makes LED active low.
+    Default : false
+
+Examples:
+Scenario 1 : BCM6328 with 4 GPIO LEDs
+       leds0: led-controller@10000800 {
+               compatible = "brcm,bcm6328-leds";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               reg = <0x10000800 0x24>;
+
+               alarm_red@2 {
+                       reg = <2>;
+                       active-low;
+                       label = "red:alarm";
+               };
+               inet_green@3 {
+                       reg = <3>;
+                       active-low;
+                       label = "green:inet";
+               };
+               power_green@4 {
+                       reg = <4>;
+                       active-low;
+                       label = "green:power";
+               };
+       };
+
+Scenario 2 : BCM63268 with Serial LEDs
+       leds0: led-controller@10001900 {
+               compatible = "brcm,bcm6328-leds";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               reg = <0x10001900 0x24>;
+               brcm,serial-leds;
+               brcm,serial-dat-low;
+               brcm,serial-shift-inv;
+
+               inet_red@2 {
+                       reg = <2>;
+                       active-low;
+                       label = "red:inet";
+               };
+               dsl_green@3 {
+                       reg = <3>;
+                       active-low;
+                       label = "green:dsl";
+               };
+               usb_green@4 {
+                       reg = <4>;
+                       active-low;
+                       label = "green:usb";
+               };
+               wps_green@7 {
+                       reg = <7>;
+                       active-low;
+                       label = "green:wps";
+               };
+               inet_green@8 {
+                       reg = <8>;
+                       active-low;
+                       label = "green:inet";
+               };
+               power_green@20 {
+                       reg = <20>;
+                       active-low;
+                       label = "green:power";
+               };
+       };
diff --git a/doc/device-tree-bindings/leds/leds-bcm6358.txt b/doc/device-tree-bindings/leds/leds-bcm6358.txt
new file mode 100644 (file)
index 0000000..e394d9e
--- /dev/null
@@ -0,0 +1,141 @@
+LEDs connected to Broadcom BCM6358 controller
+
+This controller is present on BCM6358 and BCM6368.
+In these SoCs there are Serial LEDs (LEDs connected to a 74x164 controller),
+which can either be controlled by software (exporting the 74x164 as spi-gpio.
+See Documentation/devicetree/bindings/gpio/gpio-74x164.txt), or
+by hardware using this driver.
+
+Required properties:
+  - compatible : should be "brcm,bcm6358-leds".
+  - #address-cells : must be 1.
+  - #size-cells : must be 0.
+  - reg : BCM6358 LED controller address and size.
+
+Optional properties:
+  - brcm,clk-div : SCK signal divider. Possible values are 1, 2, 4 and 8.
+    Default : 1
+  - brcm,clk-dat-low : Boolean, makes clock and data signals active low.
+    Default : false
+
+Each LED is represented as a sub-node of the brcm,bcm6358-leds device.
+
+LED sub-node required properties:
+  - reg : LED pin number (only LEDs 0 to 31 are valid).
+
+LED sub-node optional properties:
+  - label : see Documentation/devicetree/bindings/leds/common.txt
+  - active-low : Boolean, makes LED active low.
+    Default : false
+
+Examples:
+Scenario 1 : BCM6358
+       leds0: led-controller@fffe00d0 {
+               compatible = "brcm,bcm6358-leds";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               reg = <0xfffe00d0 0x8>;
+
+               alarm_white {
+                       reg = <0>;
+                       active-low;
+                       label = "white:alarm";
+               };
+               tv_white {
+                       reg = <2>;
+                       active-low;
+                       label = "white:tv";
+               };
+               tel_white {
+                       reg = <3>;
+                       active-low;
+                       label = "white:tel";
+               };
+               adsl_white {
+                       reg = <4>;
+                       active-low;
+                       label = "white:adsl";
+               };
+       };
+
+Scenario 2 : BCM6368
+       leds0: led-controller@100000d0 {
+               compatible = "brcm,bcm6358-leds";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               reg = <0x100000d0 0x8>;
+               brcm,pol-low;
+               brcm,clk-div = <4>;
+
+               power_red {
+                       reg = <0>;
+                       active-low;
+                       label = "red:power";
+               };
+               power_green {
+                       reg = <1>;
+                       active-low;
+                       label = "green:power";
+                       default-state = "on";
+               };
+               power_blue {
+                       reg = <2>;
+                       label = "blue:power";
+               };
+               broadband_red {
+                       reg = <3>;
+                       active-low;
+                       label = "red:broadband";
+               };
+               broadband_green {
+                       reg = <4>;
+                       label = "green:broadband";
+               };
+               broadband_blue {
+                       reg = <5>;
+                       active-low;
+                       label = "blue:broadband";
+               };
+               wireless_red {
+                       reg = <6>;
+                       active-low;
+                       label = "red:wireless";
+               };
+               wireless_green {
+                       reg = <7>;
+                       active-low;
+                       label = "green:wireless";
+               };
+               wireless_blue {
+                       reg = <8>;
+                       label = "blue:wireless";
+               };
+               phone_red {
+                       reg = <9>;
+                       active-low;
+                       label = "red:phone";
+               };
+               phone_green {
+                       reg = <10>;
+                       active-low;
+                       label = "green:phone";
+               };
+               phone_blue {
+                       reg = <11>;
+                       label = "blue:phone";
+               };
+               upgrading_red {
+                       reg = <12>;
+                       active-low;
+                       label = "red:upgrading";
+               };
+               upgrading_green {
+                       reg = <13>;
+                       active-low;
+                       label = "green:upgrading";
+               };
+               upgrading_blue {
+                       reg = <14>;
+                       label = "blue:upgrading";
+               };
+       };
diff --git a/doc/device-tree-bindings/pwm/pwm.txt b/doc/device-tree-bindings/pwm/pwm.txt
new file mode 100644 (file)
index 0000000..8556263
--- /dev/null
@@ -0,0 +1,69 @@
+Specifying PWM information for devices
+======================================
+
+1) PWM user nodes
+-----------------
+
+PWM users should specify a list of PWM devices that they want to use
+with a property containing a 'pwm-list':
+
+       pwm-list ::= <single-pwm> [pwm-list]
+       single-pwm ::= <pwm-phandle> <pwm-specifier>
+       pwm-phandle : phandle to PWM controller node
+       pwm-specifier : array of #pwm-cells specifying the given PWM
+                       (controller specific)
+
+PWM properties should be named "pwms". The exact meaning of each pwms
+property must be documented in the device tree binding for each device.
+An optional property "pwm-names" may contain a list of strings to label
+each of the PWM devices listed in the "pwms" property. If no "pwm-names"
+property is given, the name of the user node will be used as fallback.
+
+Drivers for devices that use more than a single PWM device can use the
+"pwm-names" property to map the name of the PWM device requested by the
+pwm_get() call to an index into the list given by the "pwms" property.
+
+The following example could be used to describe a PWM-based backlight
+device:
+
+       pwm: pwm {
+               #pwm-cells = <2>;
+       };
+
+       [...]
+
+       bl: backlight {
+               pwms = <&pwm 0 5000000>;
+               pwm-names = "backlight";
+       };
+
+Note that in the example above, specifying the "pwm-names" is redundant
+because the name "backlight" would be used as fallback anyway.
+
+pwm-specifier typically encodes the chip-relative PWM number and the PWM
+period in nanoseconds.
+
+Optionally, the pwm-specifier can encode a number of flags (defined in
+<dt-bindings/pwm/pwm.h>) in a third cell:
+- PWM_POLARITY_INVERTED: invert the PWM signal polarity
+
+Example with optional PWM specifier for inverse polarity
+
+       bl: backlight {
+               pwms = <&pwm 0 5000000 PWM_POLARITY_INVERTED>;
+               pwm-names = "backlight";
+       };
+
+2) PWM controller nodes
+-----------------------
+
+PWM controller nodes must specify the number of cells used for the
+specifier using the '#pwm-cells' property.
+
+An example PWM controller might look like this:
+
+       pwm: pwm@7000a000 {
+               compatible = "nvidia,tegra20-pwm";
+               reg = <0x7000a000 0x100>;
+               #pwm-cells = <2>;
+       };
index a096dad2b2255424fce3c50c99b73cc89885cde9..a5f24d72da7bd129bcf8bb6b153ffba558cb363c 100644 (file)
@@ -54,6 +54,8 @@ source "drivers/pci/Kconfig"
 
 source "drivers/pcmcia/Kconfig"
 
+source "drivers/phy/Kconfig"
+
 source "drivers/phy/marvell/Kconfig"
 
 source "drivers/pinctrl/Kconfig"
index 4a4b2377c58a53d80c32e27d8a2c502e2dee86d6..64c39d3a3ef9e7d73e659da18924548fc7e3f2ea 100644 (file)
@@ -5,6 +5,7 @@
 obj-$(CONFIG_$(SPL_TPL_)DM)    += core/
 obj-$(CONFIG_$(SPL_)CLK)       += clk/
 obj-$(CONFIG_$(SPL_)LED)       += led/
+obj-$(CONFIG_$(SPL_)PHY)       += phy/
 obj-$(CONFIG_$(SPL_)PINCTRL)   += pinctrl/
 obj-$(CONFIG_$(SPL_)RAM)       += ram/
 
@@ -75,6 +76,7 @@ obj-y += firmware/
 obj-$(CONFIG_FPGA) += fpga/
 obj-y += hwmon/
 obj-y += misc/
+obj-$(CONFIG_MMC) += mmc/
 obj-y += pcmcia/
 obj-y += dfu/
 obj-$(CONFIG_X86) += pch/
index 88e66e2377a9a2122672fec256b9cd797017a18c..6cbe1454b834f2c78cca60e431065d79e72f231e 100644 (file)
@@ -48,4 +48,14 @@ config SATA_CEVA
          ZynqMP. Support up to 2 external devices. Complient with SATA 3.1 and
          AHCI 1.3 specifications with hot-plug detect feature.
 
+
+config DWC_AHCI
+       bool "Enable Synopsys DWC AHCI driver support"
+       select SCSI_AHCI
+       select PHY
+       depends on DM_SCSI
+       help
+         Enable this driver to support Sata devices through
+         Synopsys DWC AHCI module.
+
 endmenu
index f415b3371bb720e829cc3e76f26aecfad70ccaef..d89c8b0574607e66c0a4bcb7527d7c7523465946 100644 (file)
@@ -11,6 +11,7 @@ ifndef CONFIG_BLK
 obj-y += blk_legacy.o
 endif
 
+obj-$(CONFIG_DWC_AHCI) += dwc_ahci.o
 obj-$(CONFIG_AHCI) += ahci-uclass.o
 obj-$(CONFIG_DM_SCSI) += scsi-uclass.o
 obj-$(CONFIG_SCSI_AHCI) += ahci.o
diff --git a/drivers/block/dwc_ahci.c b/drivers/block/dwc_ahci.c
new file mode 100644 (file)
index 0000000..d5bb0b8
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * DWC SATA platform driver
+ *
+ * (C) Copyright 2016
+ *     Texas Instruments Incorporated, <www.ti.com>
+ *
+ * Author: Mugunthan V N <mugunthanvnm@ti.com>
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <ahci.h>
+#include <scsi.h>
+#include <sata.h>
+#include <asm/arch/sata.h>
+#include <asm/io.h>
+#include <generic-phy.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+struct dwc_ahci_priv {
+       void *base;
+       void *wrapper_base;
+};
+
+static int dwc_ahci_ofdata_to_platdata(struct udevice *dev)
+{
+       struct dwc_ahci_priv *priv = dev_get_priv(dev);
+       struct scsi_platdata *plat = dev_get_platdata(dev);
+       fdt_addr_t addr;
+
+       plat->max_id = fdtdec_get_uint(gd->fdt_blob, dev->of_offset, "max-id",
+                                      CONFIG_SYS_SCSI_MAX_SCSI_ID);
+       plat->max_lun = fdtdec_get_uint(gd->fdt_blob, dev->of_offset,
+                                       "max-lun", CONFIG_SYS_SCSI_MAX_LUN);
+
+       priv->base = map_physmem(dev_get_addr(dev), sizeof(void *),
+                                MAP_NOCACHE);
+
+       addr = dev_get_addr_index(dev, 1);
+       if (addr != FDT_ADDR_T_NONE) {
+               priv->wrapper_base = map_physmem(addr, sizeof(void *),
+                                                MAP_NOCACHE);
+       } else {
+               priv->wrapper_base = NULL;
+       }
+
+       return 0;
+}
+
+static int dwc_ahci_probe(struct udevice *dev)
+{
+       struct dwc_ahci_priv *priv = dev_get_priv(dev);
+       int ret;
+       struct phy phy;
+
+       ret = generic_phy_get_by_name(dev, "sata-phy", &phy);
+       if (ret) {
+               error("can't get the phy from DT\n");
+               return ret;
+       }
+
+       ret = generic_phy_init(&phy);
+       if (ret) {
+               error("unable to initialize the sata phy\n");
+               return ret;
+       }
+
+       ret = generic_phy_power_on(&phy);
+       if (ret) {
+               error("unable to power on the sata phy\n");
+               return ret;
+       }
+
+       if (priv->wrapper_base) {
+               u32 val = TI_SATA_IDLE_NO | TI_SATA_STANDBY_NO;
+
+               /* Enable SATA module, No Idle, No Standby */
+               writel(val, priv->wrapper_base + TI_SATA_SYSCONFIG);
+       }
+
+       return ahci_init(priv->base);
+}
+
+static const struct udevice_id dwc_ahci_ids[] = {
+       { .compatible = "snps,dwc-ahci" },
+       { }
+};
+
+U_BOOT_DRIVER(dwc_ahci) = {
+       .name   = "dwc_ahci",
+       .id     = UCLASS_SCSI,
+       .of_match = dwc_ahci_ids,
+       .ofdata_to_platdata = dwc_ahci_ofdata_to_platdata,
+       .probe  = dwc_ahci_probe,
+       .priv_auto_alloc_size = sizeof(struct dwc_ahci_priv),
+       .platdata_auto_alloc_size = sizeof(struct scsi_platdata),
+       .flags = DM_FLAG_ALLOC_PRIV_DMA,
+};
index 5ca958c0075db9ca235786c0d06ca3173cfd8bf3..44da716b2679246555d1684b02590effa9d5cde5 100644 (file)
@@ -20,6 +20,14 @@ config SPL_CLK
          setting up clocks within SPL, and allows the same drivers to be
          used as U-Boot proper.
 
+config CLK_BCM6345
+       bool "Clock controller driver for BCM6345"
+       depends on CLK && ARCH_BMIPS
+       default y
+       help
+         This clock driver adds support for enabling and disabling peripheral
+         clocks on BCM6345 SoCs. HW has no rate changing capabilities.
+
 config CLK_BOSTON
        def_bool y if TARGET_BOSTON
        depends on CLK
index 01a8cd641e7f5b129917f7ca6cacf23be3b24da7..2746a8016abdde2a770b813a3ed022279f302c19 100644 (file)
@@ -17,6 +17,7 @@ obj-y += tegra/
 obj-$(CONFIG_CLK_UNIPHIER) += uniphier/
 obj-$(CONFIG_CLK_EXYNOS) += exynos/
 obj-$(CONFIG_CLK_AT91) += at91/
+obj-$(CONFIG_CLK_BCM6345) += clk_bcm6345.o
 obj-$(CONFIG_CLK_BOSTON) += clk_boston.o
 obj-$(CONFIG_ARCH_ASPEED) += aspeed/
 obj-$(CONFIG_STM32F7) += clk_stm32f7.o
index 284b2482712c07888b204a4e345161d4f20fa13d..72d0a739f118cd67039723090bea628a959a473e 100644 (file)
@@ -21,6 +21,7 @@ static struct clk_ops at91_master_clk_ops = {
 };
 
 static const struct udevice_id at91_master_clk_match[] = {
+       { .compatible = "atmel,at91rm9200-clk-master" },
        { .compatible = "atmel,at91sam9x5-clk-master" },
        {}
 };
index e1ed447133e077201c5b7f638ef23b5e6d0850b8..62fabe304dc63d93b2759da23e574d79577cb928 100644 (file)
 #define PERIPHERAL_ID_MAX      31
 #define PERIPHERAL_MASK(id)    (1 << ((id) & PERIPHERAL_ID_MAX))
 
+enum periph_clk_type {
+       CLK_PERIPH_AT91RM9200 = 0,
+       CLK_PERIPH_AT91SAM9X5,
+};
 /**
  * sam9x5_periph_clk_bind() - for the periph clock driver
  * Recursively bind its children as clk devices.
@@ -28,7 +32,14 @@ static int sam9x5_periph_clk_bind(struct udevice *dev)
 }
 
 static const struct udevice_id sam9x5_periph_clk_match[] = {
-       { .compatible = "atmel,at91sam9x5-clk-peripheral" },
+       {
+               .compatible = "atmel,at91rm9200-clk-peripheral",
+               .data = CLK_PERIPH_AT91RM9200,
+       },
+       {
+               .compatible = "atmel,at91sam9x5-clk-peripheral",
+               .data = CLK_PERIPH_AT91SAM9X5,
+       },
        {}
 };
 
@@ -45,12 +56,24 @@ static int periph_clk_enable(struct clk *clk)
 {
        struct pmc_platdata *plat = dev_get_platdata(clk->dev);
        struct at91_pmc *pmc = plat->reg_base;
+       enum periph_clk_type clk_type;
+       void *addr;
 
        if (clk->id < PERIPHERAL_ID_MIN)
                return -1;
 
-       writel(clk->id & AT91_PMC_PCR_PID_MASK, &pmc->pcr);
-       setbits_le32(&pmc->pcr, AT91_PMC_PCR_CMD_WRITE | AT91_PMC_PCR_EN);
+       clk_type = dev_get_driver_data(dev_get_parent(clk->dev));
+       if (clk_type == CLK_PERIPH_AT91RM9200) {
+               addr = &pmc->pcer;
+               if (clk->id > PERIPHERAL_ID_MAX)
+                       addr = &pmc->pcer1;
+
+               setbits_le32(addr, PERIPHERAL_MASK(clk->id));
+       } else {
+               writel(clk->id & AT91_PMC_PCR_PID_MASK, &pmc->pcr);
+               setbits_le32(&pmc->pcr,
+                            AT91_PMC_PCR_CMD_WRITE | AT91_PMC_PCR_EN);
+       }
 
        return 0;
 }
index fcd693a2f6fc6904d7ca1f6a388e60e60f9f94dd..72d52c58188e71c902e2dbe5141053ce3791fc15 100644 (file)
 DECLARE_GLOBAL_DATA_PTR;
 
 static const struct udevice_id at91_pmc_match[] = {
+       { .compatible = "atmel,at91rm9200-pmc" },
+       { .compatible = "atmel,at91sam9260-pmc" },
+       { .compatible = "atmel,at91sam9g45-pmc" },
+       { .compatible = "atmel,at91sam9n12-pmc" },
+       { .compatible = "atmel,at91sam9x5-pmc" },
+       { .compatible = "atmel,sama5d3-pmc" },
        { .compatible = "atmel,sama5d2-pmc" },
        {}
 };
diff --git a/drivers/clk/clk_bcm6345.c b/drivers/clk/clk_bcm6345.c
new file mode 100644 (file)
index 0000000..4c7a2df
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * Derived from linux/arch/mips/bcm63xx/clk.c:
+ *     Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <clk-uclass.h>
+#include <dm.h>
+#include <errno.h>
+#include <asm/io.h>
+
+#define MAX_CLKS       32
+
+struct bcm6345_clk_priv {
+       void __iomem *regs;
+};
+
+static int bcm6345_clk_enable(struct clk *clk)
+{
+       struct bcm6345_clk_priv *priv = dev_get_priv(clk->dev);
+
+       if (clk->id >= MAX_CLKS)
+               return -EINVAL;
+
+       setbits_be32(priv->regs, BIT(clk->id));
+
+       return 0;
+}
+
+static int bcm6345_clk_disable(struct clk *clk)
+{
+       struct bcm6345_clk_priv *priv = dev_get_priv(clk->dev);
+
+       if (clk->id >= MAX_CLKS)
+               return -EINVAL;
+
+       clrbits_be32(priv->regs, BIT(clk->id));
+
+       return 0;
+}
+
+static struct clk_ops bcm6345_clk_ops = {
+       .disable = bcm6345_clk_disable,
+       .enable = bcm6345_clk_enable,
+};
+
+static const struct udevice_id bcm6345_clk_ids[] = {
+       { .compatible = "brcm,bcm6345-clk" },
+       { /* sentinel */ }
+};
+
+static int bcm63xx_clk_probe(struct udevice *dev)
+{
+       struct bcm6345_clk_priv *priv = dev_get_priv(dev);
+       fdt_addr_t addr;
+       fdt_size_t size;
+
+       addr = dev_get_addr_size_index(dev, 0, &size);
+       if (addr == FDT_ADDR_T_NONE)
+               return -EINVAL;
+
+       priv->regs = ioremap(addr, size);
+
+       return 0;
+}
+
+U_BOOT_DRIVER(clk_bcm6345) = {
+       .name = "clk_bcm6345",
+       .id = UCLASS_CLK,
+       .of_match = bcm6345_clk_ids,
+       .ops = &bcm6345_clk_ops,
+       .probe = bcm63xx_clk_probe,
+       .priv_auto_alloc_size = sizeof(struct bcm6345_clk_priv),
+};
index 7e3bf9694400769aa75df9ca2c6e225bdd603208..d866d0bf7a3c5d4623bace911addf30785a0c0d2 100644 (file)
@@ -228,11 +228,13 @@ static ulong rockchip_mmc_get_clk(struct rk3036_cru *cru, uint clk_general_rate,
 
        switch (periph) {
        case HCLK_EMMC:
+       case SCLK_EMMC:
                con = readl(&cru->cru_clksel_con[12]);
                mux = (con >> EMMC_PLL_SHIFT) & EMMC_PLL_MASK;
                div = (con >> EMMC_DIV_SHIFT) & EMMC_DIV_MASK;
                break;
        case HCLK_SDIO:
+       case SCLK_SDIO:
                con = readl(&cru->cru_clksel_con[12]);
                mux = (con >> MMC0_PLL_SHIFT) & MMC0_PLL_MASK;
                div = (con >> MMC0_DIV_SHIFT) & MMC0_DIV_MASK;
@@ -265,6 +267,7 @@ static ulong rockchip_mmc_set_clk(struct rk3036_cru *cru, uint clk_general_rate,
 
        switch (periph) {
        case HCLK_EMMC:
+       case SCLK_EMMC:
                rk_clrsetreg(&cru->cru_clksel_con[12],
                             EMMC_PLL_MASK << EMMC_PLL_SHIFT |
                             EMMC_DIV_MASK << EMMC_DIV_SHIFT,
@@ -272,6 +275,7 @@ static ulong rockchip_mmc_set_clk(struct rk3036_cru *cru, uint clk_general_rate,
                             (src_clk_div - 1) << EMMC_DIV_SHIFT);
                break;
        case HCLK_SDIO:
+       case SCLK_SDIO:
                rk_clrsetreg(&cru->cru_clksel_con[11],
                             MMC0_PLL_MASK << MMC0_PLL_SHIFT |
                             MMC0_DIV_MASK << MMC0_DIV_SHIFT,
@@ -307,6 +311,7 @@ static ulong rk3036_clk_set_rate(struct clk *clk, ulong rate)
        case 0 ... 63:
                return 0;
        case HCLK_EMMC:
+       case SCLK_EMMC:
                new_rate = rockchip_mmc_set_clk(priv->cru, gclk_rate,
                                                clk->id, rate);
                break;
index d36cf8f3f27631c5b03766f1d20722f9cd48dd5e..b32491d3db3e9b21aef45609d42ec182b89875f4 100644 (file)
@@ -269,14 +269,17 @@ static ulong rockchip_mmc_get_clk(struct rk3188_cru *cru, uint gclk_rate,
 
        switch (periph) {
        case HCLK_EMMC:
+       case SCLK_EMMC:
                con = readl(&cru->cru_clksel_con[12]);
                div = (con >> EMMC_DIV_SHIFT) & EMMC_DIV_MASK;
                break;
        case HCLK_SDMMC:
+       case SCLK_SDMMC:
                con = readl(&cru->cru_clksel_con[11]);
                div = (con >> MMC0_DIV_SHIFT) & MMC0_DIV_MASK;
                break;
        case HCLK_SDIO:
+       case SCLK_SDIO:
                con = readl(&cru->cru_clksel_con[12]);
                div = (con >> SDIO_DIV_SHIFT) & SDIO_DIV_MASK;
                break;
@@ -298,16 +301,19 @@ static ulong rockchip_mmc_set_clk(struct rk3188_cru *cru, uint gclk_rate,
 
        switch (periph) {
        case HCLK_EMMC:
+       case SCLK_EMMC:
                rk_clrsetreg(&cru->cru_clksel_con[12],
                             EMMC_DIV_MASK << EMMC_DIV_SHIFT,
                             src_clk_div << EMMC_DIV_SHIFT);
                break;
        case HCLK_SDMMC:
+       case SCLK_SDMMC:
                rk_clrsetreg(&cru->cru_clksel_con[11],
                             MMC0_DIV_MASK << MMC0_DIV_SHIFT,
                             src_clk_div << MMC0_DIV_SHIFT);
                break;
        case HCLK_SDIO:
+       case SCLK_SDIO:
                rk_clrsetreg(&cru->cru_clksel_con[12],
                             SDIO_DIV_MASK << SDIO_DIV_SHIFT,
                             src_clk_div << SDIO_DIV_SHIFT);
@@ -466,6 +472,9 @@ static ulong rk3188_clk_get_rate(struct clk *clk)
        case HCLK_EMMC:
        case HCLK_SDMMC:
        case HCLK_SDIO:
+       case SCLK_EMMC:
+       case SCLK_SDMMC:
+       case SCLK_SDIO:
                new_rate = rockchip_mmc_get_clk(priv->cru, PERI_HCLK_HZ,
                                                clk->id);
                break;
@@ -505,6 +514,9 @@ static ulong rk3188_clk_set_rate(struct clk *clk, ulong rate)
        case HCLK_EMMC:
        case HCLK_SDMMC:
        case HCLK_SDIO:
+       case SCLK_EMMC:
+       case SCLK_SDMMC:
+       case SCLK_SDIO:
                new_rate = rockchip_mmc_set_clk(cru, PERI_HCLK_HZ,
                                                clk->id, rate);
                break;
index 78356766a7816a30475a12ed0ec280100fdd0e15..fc369dde085288c55909ec7ae770e8466e5f603c 100644 (file)
@@ -513,16 +513,19 @@ static ulong rockchip_mmc_get_clk(struct rk3288_cru *cru, uint gclk_rate,
 
        switch (periph) {
        case HCLK_EMMC:
+       case SCLK_EMMC:
                con = readl(&cru->cru_clksel_con[12]);
                mux = (con >> EMMC_PLL_SHIFT) & EMMC_PLL_MASK;
                div = (con >> EMMC_DIV_SHIFT) & EMMC_DIV_MASK;
                break;
        case HCLK_SDMMC:
+       case SCLK_SDMMC:
                con = readl(&cru->cru_clksel_con[11]);
                mux = (con >> MMC0_PLL_SHIFT) & MMC0_PLL_MASK;
                div = (con >> MMC0_DIV_SHIFT) & MMC0_DIV_MASK;
                break;
        case HCLK_SDIO0:
+       case SCLK_SDIO0:
                con = readl(&cru->cru_clksel_con[12]);
                mux = (con >> SDIO0_PLL_SHIFT) & SDIO0_PLL_MASK;
                div = (con >> SDIO0_DIV_SHIFT) & SDIO0_DIV_MASK;
@@ -556,6 +559,7 @@ static ulong rockchip_mmc_set_clk(struct rk3288_cru *cru, uint gclk_rate,
        }
        switch (periph) {
        case HCLK_EMMC:
+       case SCLK_EMMC:
                rk_clrsetreg(&cru->cru_clksel_con[12],
                             EMMC_PLL_MASK << EMMC_PLL_SHIFT |
                             EMMC_DIV_MASK << EMMC_DIV_SHIFT,
@@ -563,6 +567,7 @@ static ulong rockchip_mmc_set_clk(struct rk3288_cru *cru, uint gclk_rate,
                             (src_clk_div - 1) << EMMC_DIV_SHIFT);
                break;
        case HCLK_SDMMC:
+       case SCLK_SDMMC:
                rk_clrsetreg(&cru->cru_clksel_con[11],
                             MMC0_PLL_MASK << MMC0_PLL_SHIFT |
                             MMC0_DIV_MASK << MMC0_DIV_SHIFT,
@@ -570,6 +575,7 @@ static ulong rockchip_mmc_set_clk(struct rk3288_cru *cru, uint gclk_rate,
                             (src_clk_div - 1) << MMC0_DIV_SHIFT);
                break;
        case HCLK_SDIO0:
+       case SCLK_SDIO0:
                rk_clrsetreg(&cru->cru_clksel_con[12],
                             SDIO0_PLL_MASK << SDIO0_PLL_SHIFT |
                             SDIO0_DIV_MASK << SDIO0_DIV_SHIFT,
@@ -662,6 +668,9 @@ static ulong rk3288_clk_get_rate(struct clk *clk)
        case HCLK_EMMC:
        case HCLK_SDMMC:
        case HCLK_SDIO0:
+       case SCLK_EMMC:
+       case SCLK_SDMMC:
+       case SCLK_SDIO0:
                new_rate = rockchip_mmc_get_clk(priv->cru, gclk_rate, clk->id);
                break;
        case SCLK_SPI0:
@@ -706,6 +715,9 @@ static ulong rk3288_clk_set_rate(struct clk *clk, ulong rate)
        case HCLK_EMMC:
        case HCLK_SDMMC:
        case HCLK_SDIO0:
+       case SCLK_EMMC:
+       case SCLK_SDMMC:
+       case SCLK_SDIO0:
                new_rate = rockchip_mmc_set_clk(cru, gclk_rate, clk->id, rate);
                break;
        case SCLK_SPI0:
index 0ff1e30bb59f87d4726dbc1a7283e219b89b44d0..8ec157416e9487ae08f5230f1b6a202147ea2290 100644 (file)
@@ -397,9 +397,11 @@ static ulong rk3328_mmc_get_clk(struct rk3328_cru *cru, uint clk_id)
 
        switch (clk_id) {
        case HCLK_SDMMC:
+       case SCLK_SDMMC:
                con_id = 30;
                break;
        case HCLK_EMMC:
+       case SCLK_EMMC:
                con_id = 32;
                break;
        default:
@@ -423,9 +425,11 @@ static ulong rk3328_mmc_set_clk(struct rk3328_cru *cru,
 
        switch (clk_id) {
        case HCLK_SDMMC:
+       case SCLK_SDMMC:
                con_id = 30;
                break;
        case HCLK_EMMC:
+       case SCLK_EMMC:
                con_id = 32;
                break;
        default:
@@ -483,6 +487,8 @@ static ulong rk3328_clk_get_rate(struct clk *clk)
                return 0;
        case HCLK_SDMMC:
        case HCLK_EMMC:
+       case SCLK_SDMMC:
+       case SCLK_EMMC:
                rate = rk3328_mmc_get_clk(priv->cru, clk->id);
                break;
        case SCLK_I2C0:
@@ -511,6 +517,8 @@ static ulong rk3328_clk_set_rate(struct clk *clk, ulong rate)
                return 0;
        case HCLK_SDMMC:
        case HCLK_EMMC:
+       case SCLK_SDMMC:
+       case SCLK_EMMC:
                ret = rk3328_mmc_set_clk(priv->cru, clk->id, rate);
                break;
        case SCLK_I2C0:
index ff3cc37af33842f534b0f0cbeaf426ae269e4738..026ed4dde7b98abd59027f0b0e2478e6a226f6d4 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * (C) Copyright 2015 Google, Inc
+ * (C) 2017 Theobroma Systems Design und Consulting GmbH
  *
  * SPDX-License-Identifier:    GPL-2.0
  */
@@ -207,12 +208,15 @@ enum {
        DCLK_VOP_DIV_CON_SHIFT          = 0,
 
        /* CLKSEL_CON58 */
-       CLK_SPI_PLL_SEL_MASK            = 1,
-       CLK_SPI_PLL_SEL_CPLL            = 0,
-       CLK_SPI_PLL_SEL_GPLL            = 1,
-       CLK_SPI_PLL_DIV_CON_MASK        = 0x7f,
-       CLK_SPI5_PLL_DIV_CON_SHIFT      = 8,
-       CLK_SPI5_PLL_SEL_SHIFT          = 15,
+       CLK_SPI_PLL_SEL_WIDTH = 1,
+       CLK_SPI_PLL_SEL_MASK = ((1 < CLK_SPI_PLL_SEL_WIDTH) - 1),
+       CLK_SPI_PLL_SEL_CPLL = 0,
+       CLK_SPI_PLL_SEL_GPLL = 1,
+       CLK_SPI_PLL_DIV_CON_WIDTH = 7,
+       CLK_SPI_PLL_DIV_CON_MASK = ((1 << CLK_SPI_PLL_DIV_CON_WIDTH) - 1),
+
+       CLK_SPI5_PLL_DIV_CON_SHIFT      = 8,
+       CLK_SPI5_PLL_SEL_SHIFT          = 15,
 
        /* CLKSEL_CON59 */
        CLK_SPI1_PLL_SEL_SHIFT          = 15,
@@ -602,7 +606,96 @@ static ulong rk3399_i2c_set_clk(struct rk3399_cru *cru, ulong clk_id, uint hz)
                return -EINVAL;
        }
 
-       return DIV_TO_RATE(GPLL_HZ, src_clk_div);
+       return rk3399_i2c_get_clk(cru, clk_id);
+}
+
+/*
+ * RK3399 SPI clocks have a common divider-width (7 bits) and a single bit
+ * to select either CPLL or GPLL as the clock-parent. The location within
+ * the enclosing CLKSEL_CON (i.e. div_shift and sel_shift) are variable.
+ */
+
+struct spi_clkreg {
+       uint8_t reg;  /* CLKSEL_CON[reg] register in CRU */
+       uint8_t div_shift;
+       uint8_t sel_shift;
+};
+
+/*
+ * The entries are numbered relative to their offset from SCLK_SPI0.
+ *
+ * Note that SCLK_SPI3 (which is configured via PMUCRU and requires different
+ * logic is not supported).
+ */
+static const struct spi_clkreg spi_clkregs[] = {
+       [0] = { .reg = 59,
+               .div_shift = CLK_SPI0_PLL_DIV_CON_SHIFT,
+               .sel_shift = CLK_SPI0_PLL_SEL_SHIFT, },
+       [1] = { .reg = 59,
+               .div_shift = CLK_SPI1_PLL_DIV_CON_SHIFT,
+               .sel_shift = CLK_SPI1_PLL_SEL_SHIFT, },
+       [2] = { .reg = 60,
+               .div_shift = CLK_SPI2_PLL_DIV_CON_SHIFT,
+               .sel_shift = CLK_SPI2_PLL_SEL_SHIFT, },
+       [3] = { .reg = 60,
+               .div_shift = CLK_SPI4_PLL_DIV_CON_SHIFT,
+               .sel_shift = CLK_SPI4_PLL_SEL_SHIFT, },
+       [4] = { .reg = 58,
+               .div_shift = CLK_SPI5_PLL_DIV_CON_SHIFT,
+               .sel_shift = CLK_SPI5_PLL_SEL_SHIFT, },
+};
+
+static inline u32 extract_bits(u32 val, unsigned width, unsigned shift)
+{
+       return (val >> shift) & ((1 << width) - 1);
+}
+
+static ulong rk3399_spi_get_clk(struct rk3399_cru *cru, ulong clk_id)
+{
+       const struct spi_clkreg *spiclk = NULL;
+       u32 div, val;
+
+       switch (clk_id) {
+       case SCLK_SPI0 ... SCLK_SPI5:
+               spiclk = &spi_clkregs[clk_id - SCLK_SPI0];
+               break;
+
+       default:
+               error("%s: SPI clk-id %ld not supported\n", __func__, clk_id);
+               return -EINVAL;
+       }
+
+       val = readl(&cru->clksel_con[spiclk->reg]);
+       div = extract_bits(val, CLK_SPI_PLL_DIV_CON_WIDTH, spiclk->div_shift);
+
+       return DIV_TO_RATE(GPLL_HZ, div);
+}
+
+static ulong rk3399_spi_set_clk(struct rk3399_cru *cru, ulong clk_id, uint hz)
+{
+       const struct spi_clkreg *spiclk = NULL;
+       int src_clk_div;
+
+       src_clk_div = RATE_TO_DIV(GPLL_HZ, hz);
+       assert(src_clk_div < 127);
+
+       switch (clk_id) {
+       case SCLK_SPI1 ... SCLK_SPI5:
+               spiclk = &spi_clkregs[clk_id - SCLK_SPI0];
+               break;
+
+       default:
+               error("%s: SPI clk-id %ld not supported\n", __func__, clk_id);
+               return -EINVAL;
+       }
+
+       rk_clrsetreg(&cru->clksel_con[spiclk->reg],
+                    ((CLK_SPI_PLL_DIV_CON_MASK << spiclk->div_shift) |
+                      (CLK_SPI_PLL_SEL_GPLL << spiclk->sel_shift)),
+                    ((src_clk_div << spiclk->div_shift) |
+                     (CLK_SPI_PLL_SEL_GPLL << spiclk->sel_shift)));
+
+       return rk3399_spi_get_clk(cru, clk_id);
 }
 
 static ulong rk3399_vop_set_clk(struct rk3399_cru *cru, ulong clk_id, u32 hz)
@@ -654,6 +747,7 @@ static ulong rk3399_mmc_get_clk(struct rk3399_cru *cru, uint clk_id)
        u32 div, con;
 
        switch (clk_id) {
+       case HCLK_SDMMC:
        case SCLK_SDMMC:
                con = readl(&cru->clksel_con[16]);
                break;
@@ -679,6 +773,7 @@ static ulong rk3399_mmc_set_clk(struct rk3399_cru *cru,
        int aclk_emmc = 198*MHz;
 
        switch (clk_id) {
+       case HCLK_SDMMC:
        case SCLK_SDMMC:
                /* Select clk_sdmmc source from GPLL by default */
                src_clk_div = GPLL_HZ / set_rate;
@@ -768,6 +863,7 @@ static ulong rk3399_clk_get_rate(struct clk *clk)
        switch (clk->id) {
        case 0 ... 63:
                return 0;
+       case HCLK_SDMMC:
        case SCLK_SDMMC:
        case SCLK_EMMC:
                rate = rk3399_mmc_get_clk(priv->cru, clk->id);
@@ -780,9 +876,20 @@ static ulong rk3399_clk_get_rate(struct clk *clk)
        case SCLK_I2C7:
                rate = rk3399_i2c_get_clk(priv->cru, clk->id);
                break;
+       case SCLK_SPI0...SCLK_SPI5:
+               rate = rk3399_spi_get_clk(priv->cru, clk->id);
+               break;
+       case SCLK_UART0:
+       case SCLK_UART2:
+               return 24000000;
+               break;
+       case PCLK_HDMI_CTRL:
+               break;
        case DCLK_VOP0:
        case DCLK_VOP1:
                break;
+       case PCLK_EFUSE1024NS:
+               break;
        default:
                return -ENOENT;
        }
@@ -798,6 +905,7 @@ static ulong rk3399_clk_set_rate(struct clk *clk, ulong rate)
        switch (clk->id) {
        case 0 ... 63:
                return 0;
+       case HCLK_SDMMC:
        case SCLK_SDMMC:
        case SCLK_EMMC:
                ret = rk3399_mmc_set_clk(priv->cru, clk->id, rate);
@@ -814,6 +922,13 @@ static ulong rk3399_clk_set_rate(struct clk *clk, ulong rate)
        case SCLK_I2C7:
                ret = rk3399_i2c_set_clk(priv->cru, clk->id, rate);
                break;
+       case SCLK_SPI0...SCLK_SPI5:
+               ret = rk3399_spi_set_clk(priv->cru, clk->id, rate);
+               break;
+       case PCLK_HDMI_CTRL:
+       case PCLK_VIO_GRF:
+               /* the PCLK gates for video are enabled by default */
+               break;
        case DCLK_VOP0:
        case DCLK_VOP1:
                ret = rk3399_vop_set_clk(priv->cru, clk->id, rate);
@@ -821,6 +936,8 @@ static ulong rk3399_clk_set_rate(struct clk *clk, ulong rate)
        case SCLK_DDRCLK:
                ret = rk3399_ddr_set_clk(priv->cru, rate);
                break;
+       case PCLK_EFUSE1024NS:
+               break;
        default:
                return -ENOENT;
        }
index cc0043b990b77400f29374f06b48ca07e87c8ada..3c6ab42f7d620a2aac9763f07cdbdb909072030d 100644 (file)
@@ -152,6 +152,15 @@ void device_free(struct udevice *dev)
        devres_release_probe(dev);
 }
 
+static bool flags_remove(uint flags, uint drv_flags)
+{
+       if ((flags & DM_REMOVE_NORMAL) ||
+           (flags & (drv_flags & (DM_FLAG_ACTIVE_DMA | DM_FLAG_OS_PREPARE))))
+               return true;
+
+       return false;
+}
+
 int device_remove(struct udevice *dev, uint flags)
 {
        const struct driver *drv;
@@ -178,9 +187,7 @@ int device_remove(struct udevice *dev, uint flags)
         * Remove the device if called with the "normal" remove flag set,
         * or if the remove flag matches any of the drivers remove flags
         */
-       if (drv->remove &&
-           ((flags & DM_REMOVE_NORMAL) ||
-            (flags & (drv->flags & DM_FLAG_ACTIVE_DMA)))) {
+       if (drv->remove && flags_remove(flags, drv->flags)) {
                ret = drv->remove(dev);
                if (ret)
                        goto err_remove;
@@ -194,8 +201,7 @@ int device_remove(struct udevice *dev, uint flags)
                }
        }
 
-       if ((flags & DM_REMOVE_NORMAL) ||
-           (flags & (drv->flags & DM_FLAG_ACTIVE_DMA))) {
+       if (flags_remove(flags, drv->flags)) {
                device_free(dev);
 
                dev->seq = -1;
index 871016030f8826c6ca6fb35f2228fe542c049ad7..db515f6f177c886096631d48f3f29c10070a9a83 100644 (file)
@@ -5,3 +5,5 @@
 # SPDX-License-Identifier:      GPL-2.0+
 #
 obj-$(CONFIG_CPU) += cpu-uclass.o
+
+obj-$(CONFIG_ARCH_BMIPS) += bmips_cpu.o
diff --git a/drivers/cpu/bmips_cpu.c b/drivers/cpu/bmips_cpu.c
new file mode 100644 (file)
index 0000000..379acf2
--- /dev/null
@@ -0,0 +1,310 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * Derived from linux/arch/mips/bcm63xx/cpu.c:
+ *     Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
+ *     Copyright (C) 2009 Florian Fainelli <florian@openwrt.org>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <cpu.h>
+#include <dm.h>
+#include <errno.h>
+#include <asm/io.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define REV_CHIPID_SHIFT               16
+#define REV_CHIPID_MASK                        (0xffff << REV_CHIPID_SHIFT)
+#define REV_LONG_CHIPID_SHIFT          12
+#define REV_LONG_CHIPID_MASK           (0xfffff << REV_LONG_CHIPID_SHIFT)
+#define REV_REVID_SHIFT                        0
+#define REV_REVID_MASK                 (0xff << REV_REVID_SHIFT)
+
+#define REG_BCM6328_OTP                        0x62c
+#define BCM6328_TP1_DISABLED           BIT(9)
+
+#define REG_BCM6328_MISC_STRAPBUS      0x1a40
+#define STRAPBUS_6328_FCVO_SHIFT       7
+#define STRAPBUS_6328_FCVO_MASK                (0x1f << STRAPBUS_6328_FCVO_SHIFT)
+
+#define REG_BCM6358_DDR_DMIPSPLLCFG    0x12b8
+#define DMIPSPLLCFG_6358_M1_SHIFT      0
+#define DMIPSPLLCFG_6358_M1_MASK       (0xff << DMIPSPLLCFG_6358_M1_SHIFT)
+#define DMIPSPLLCFG_6358_N1_SHIFT      23
+#define DMIPSPLLCFG_6358_N1_MASK       (0x3f << DMIPSPLLCFG_6358_N1_SHIFT)
+#define DMIPSPLLCFG_6358_N2_SHIFT      29
+#define DMIPSPLLCFG_6358_N2_MASK       (0x7 << DMIPSPLLCFG_6358_N2_SHIFT)
+
+#define REG_BCM63268_MISC_STRAPBUS     0x1814
+#define STRAPBUS_63268_FCVO_SHIFT      21
+#define STRAPBUS_63268_FCVO_MASK       (0xf << STRAPBUS_63268_FCVO_SHIFT)
+
+struct bmips_cpu_priv;
+
+struct bmips_cpu_hw {
+       int (*get_cpu_desc)(struct bmips_cpu_priv *priv, char *buf, int size);
+       ulong (*get_cpu_freq)(struct bmips_cpu_priv *);
+       int (*get_cpu_count)(struct bmips_cpu_priv *);
+};
+
+struct bmips_cpu_priv {
+       void __iomem *regs;
+       const struct bmips_cpu_hw *hw;
+};
+
+/* Specific CPU Ops */
+static int bcm6358_get_cpu_desc(struct bmips_cpu_priv *priv, char *buf,
+                               int size)
+{
+       unsigned short cpu_id;
+       unsigned char cpu_rev;
+       u32 val;
+
+       val = readl_be(priv->regs);
+       cpu_id = (val & REV_CHIPID_MASK) >> REV_CHIPID_SHIFT;
+       cpu_rev = (val & REV_REVID_MASK) >> REV_REVID_SHIFT;
+
+       snprintf(buf, size, "BCM%04X%02X", cpu_id, cpu_rev);
+
+       return 0;
+}
+
+static int bcm6328_get_cpu_desc(struct bmips_cpu_priv *priv, char *buf,
+                               int size)
+{
+       unsigned int cpu_id;
+       unsigned char cpu_rev;
+       u32 val;
+
+       val = readl_be(priv->regs);
+       cpu_id = (val & REV_LONG_CHIPID_MASK) >> REV_LONG_CHIPID_SHIFT;
+       cpu_rev = (val & REV_REVID_MASK) >> REV_REVID_SHIFT;
+
+       snprintf(buf, size, "BCM%05X%02X", cpu_id, cpu_rev);
+
+       return 0;
+}
+
+static ulong bcm6328_get_cpu_freq(struct bmips_cpu_priv *priv)
+{
+       unsigned int mips_pll_fcvo;
+
+       mips_pll_fcvo = readl_be(priv->regs + REG_BCM6328_MISC_STRAPBUS);
+       mips_pll_fcvo = (mips_pll_fcvo & STRAPBUS_6328_FCVO_MASK)
+                       >> STRAPBUS_6328_FCVO_SHIFT;
+
+       switch (mips_pll_fcvo) {
+       case 0x12:
+       case 0x14:
+       case 0x19:
+               return 160000000;
+       case 0x1c:
+               return 192000000;
+       case 0x13:
+       case 0x15:
+               return 200000000;
+       case 0x1a:
+               return 384000000;
+       case 0x16:
+               return 400000000;
+       default:
+               return 320000000;
+       }
+}
+
+static ulong bcm6358_get_cpu_freq(struct bmips_cpu_priv *priv)
+{
+       unsigned int tmp, n1, n2, m1;
+
+       tmp = readl_be(priv->regs + REG_BCM6358_DDR_DMIPSPLLCFG);
+       n1 = (tmp & DMIPSPLLCFG_6358_N1_MASK) >> DMIPSPLLCFG_6358_N1_SHIFT;
+       n2 = (tmp & DMIPSPLLCFG_6358_N2_MASK) >> DMIPSPLLCFG_6358_N2_SHIFT;
+       m1 = (tmp & DMIPSPLLCFG_6358_M1_MASK) >> DMIPSPLLCFG_6358_M1_SHIFT;
+
+       return (16 * 1000000 * n1 * n2) / m1;
+}
+
+static ulong bcm63268_get_cpu_freq(struct bmips_cpu_priv *priv)
+{
+       unsigned int mips_pll_fcvo;
+
+       mips_pll_fcvo = readl_be(priv->regs + REG_BCM63268_MISC_STRAPBUS);
+       mips_pll_fcvo = (mips_pll_fcvo & STRAPBUS_63268_FCVO_MASK)
+                       >> STRAPBUS_63268_FCVO_SHIFT;
+
+       switch (mips_pll_fcvo) {
+       case 0x3:
+       case 0xe:
+               return 320000000;
+       case 0xa:
+               return 333000000;
+       case 0x2:
+       case 0xb:
+       case 0xf:
+               return 400000000;
+       default:
+               return 0;
+       }
+}
+
+static int bcm6328_get_cpu_count(struct bmips_cpu_priv *priv)
+{
+       u32 val = readl_be(priv->regs + REG_BCM6328_OTP);
+
+       if (val & BCM6328_TP1_DISABLED)
+               return 1;
+       else
+               return 2;
+}
+
+static int bcm6358_get_cpu_count(struct bmips_cpu_priv *priv)
+{
+       return 2;
+}
+
+static const struct bmips_cpu_hw bmips_cpu_bcm6328 = {
+       .get_cpu_desc = bcm6328_get_cpu_desc,
+       .get_cpu_freq = bcm6328_get_cpu_freq,
+       .get_cpu_count = bcm6328_get_cpu_count,
+};
+
+static const struct bmips_cpu_hw bmips_cpu_bcm6358 = {
+       .get_cpu_desc = bcm6358_get_cpu_desc,
+       .get_cpu_freq = bcm6358_get_cpu_freq,
+       .get_cpu_count = bcm6358_get_cpu_count,
+};
+
+static const struct bmips_cpu_hw bmips_cpu_bcm63268 = {
+       .get_cpu_desc = bcm6328_get_cpu_desc,
+       .get_cpu_freq = bcm63268_get_cpu_freq,
+       .get_cpu_count = bcm6358_get_cpu_count,
+};
+
+/* Generic CPU Ops */
+static int bmips_cpu_get_desc(struct udevice *dev, char *buf, int size)
+{
+       struct bmips_cpu_priv *priv = dev_get_priv(dev);
+       const struct bmips_cpu_hw *hw = priv->hw;
+
+       return hw->get_cpu_desc(priv, buf, size);
+}
+
+static int bmips_cpu_get_info(struct udevice *dev, struct cpu_info *info)
+{
+       struct bmips_cpu_priv *priv = dev_get_priv(dev);
+       const struct bmips_cpu_hw *hw = priv->hw;
+
+       info->cpu_freq = hw->get_cpu_freq(priv);
+       info->features = BIT(CPU_FEAT_L1_CACHE);
+       info->features |= BIT(CPU_FEAT_MMU);
+       info->features |= BIT(CPU_FEAT_DEVICE_ID);
+
+       return 0;
+}
+
+static int bmips_cpu_get_count(struct udevice *dev)
+{
+       struct bmips_cpu_priv *priv = dev_get_priv(dev);
+       const struct bmips_cpu_hw *hw = priv->hw;
+
+       return hw->get_cpu_count(priv);
+}
+
+static int bmips_cpu_get_vendor(struct udevice *dev, char *buf, int size)
+{
+       snprintf(buf, size, "Broadcom");
+
+       return 0;
+}
+
+static const struct cpu_ops bmips_cpu_ops = {
+       .get_desc = bmips_cpu_get_desc,
+       .get_info = bmips_cpu_get_info,
+       .get_count = bmips_cpu_get_count,
+       .get_vendor = bmips_cpu_get_vendor,
+};
+
+/* BMIPS CPU driver */
+int bmips_cpu_bind(struct udevice *dev)
+{
+       struct cpu_platdata *plat = dev_get_parent_platdata(dev);
+
+       plat->cpu_id = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
+               "reg", -1);
+       plat->device_id = read_c0_prid();
+
+       return 0;
+}
+
+int bmips_cpu_probe(struct udevice *dev)
+{
+       struct bmips_cpu_priv *priv = dev_get_priv(dev);
+       const struct bmips_cpu_hw *hw =
+               (const struct bmips_cpu_hw *)dev_get_driver_data(dev);
+       fdt_addr_t addr;
+       fdt_size_t size;
+
+       addr = dev_get_addr_size_index(dev_get_parent(dev), 0, &size);
+       if (addr == FDT_ADDR_T_NONE)
+               return -EINVAL;
+
+       priv->regs = ioremap(addr, size);
+       priv->hw = hw;
+
+       return 0;
+}
+
+static const struct udevice_id bmips_cpu_ids[] = {
+       {
+               .compatible = "brcm,bcm6328-cpu",
+               .data = (ulong)&bmips_cpu_bcm6328,
+       }, {
+               .compatible = "brcm,bcm6358-cpu",
+               .data = (ulong)&bmips_cpu_bcm6358,
+       }, {
+               .compatible = "brcm,bcm63268-cpu",
+               .data = (ulong)&bmips_cpu_bcm63268,
+       },
+       { /* sentinel */ }
+};
+
+U_BOOT_DRIVER(bmips_cpu_drv) = {
+       .name = "bmips_cpu",
+       .id = UCLASS_CPU,
+       .of_match = bmips_cpu_ids,
+       .bind = bmips_cpu_bind,
+       .probe = bmips_cpu_probe,
+       .priv_auto_alloc_size = sizeof(struct bmips_cpu_priv),
+       .ops = &bmips_cpu_ops,
+       .flags = DM_FLAG_PRE_RELOC,
+};
+
+#ifdef CONFIG_DISPLAY_CPUINFO
+int print_cpuinfo(void)
+{
+       struct cpu_info cpu;
+       struct udevice *dev;
+       int err;
+       char desc[100];
+
+       err = uclass_get_device(UCLASS_CPU, 0, &dev);
+       if (err)
+               return 0;
+
+       err = cpu_get_info(dev, &cpu);
+       if (err)
+               return 0;
+
+       err = cpu_get_desc(dev, desc, sizeof(desc));
+       if (err)
+               return 0;
+
+       printf("Chip ID: %s, MIPS: ", desc);
+       print_freq(cpu.cpu_freq, "\n");
+
+       return 0;
+}
+#endif
index 8dacc1a6d16c21bf371e3571e0bf527fd9854ce8..ceb33e35eed212e837a2f5571cea86f70c135806 100644 (file)
@@ -35,7 +35,11 @@ static struct hash_algo *dfu_hash_algo;
  */
 __weak bool dfu_usb_get_reset(void)
 {
+#ifdef CONFIG_SPL_DFU_NO_RESET
+       return false;
+#else
        return true;
+#endif
 }
 
 static int dfu_find_alt_num(const char *s)
index 750eedfffd0bb1cb1685dda62cd6da0992c37d86..53a639ae65b14a992f6a181aecc775d14fb45f36 100644 (file)
@@ -156,8 +156,7 @@ static int gen_74x164_probe(struct udevice *dev)
        ret = gpio_request_by_name(dev, "oe-gpios", 0, &priv->oe,
                                   GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE);
        if (ret) {
-               dev_err(dev, "No oe-pins property\n");
-               goto free_buf;
+               dev_dbg(dev, "No oe-pins property\n");
        }
 
        uc_priv->bank_name = str;
index 99516119ff1d2486c1ef902d7a060aa35a004bfc..15135e538dc6201b20a9d6c2a6eaa8c0930d59bd 100644 (file)
@@ -21,6 +21,12 @@ config ALTERA_PIO
          Select this to enable PIO for Altera devices. Please find
          details on the "Embedded Peripherals IP User Guide" of Altera.
 
+config BCM6345_GPIO
+       bool "BCM6345 GPIO driver"
+       depends on DM_GPIO && ARCH_BMIPS
+       help
+         This driver supports the GPIO banks on BCM6345 SoCs.
+
 config DWAPB_GPIO
        bool "DWAPB GPIO driver"
        depends on DM && DM_GPIO
@@ -89,6 +95,14 @@ config MSM_GPIO
          - APQ8016
          - MSM8916
 
+config OMAP_GPIO
+       bool "TI OMAP GPIO driver"
+       depends on ARCH_OMAP2PLUS
+       default y
+       help
+         Support GPIO controllers on the TI OMAP3/4/5 and related (such as
+         AM335x/AM43xx/AM57xx/DRA7xx/etc) families of SoCs.
+
 config PM8916_GPIO
        bool "Qualcomm PM8916 PMIC GPIO/keypad driver"
        depends on DM_GPIO && PMIC_PM8916
index 0ca845f54caa6bcc1111e44ad591eb7016de9429..03df558879b00963d9a6614fd0a96a06094e012f 100644 (file)
@@ -16,6 +16,7 @@ obj-$(CONFIG_DM_74X164)               += 74x164_gpio.o
 
 obj-$(CONFIG_AT91_GPIO)        += at91_gpio.o
 obj-$(CONFIG_ATMEL_PIO4)       += atmel_pio4.o
+obj-$(CONFIG_BCM6345_GPIO)     += bcm6345_gpio.o
 obj-$(CONFIG_INTEL_ICH6_GPIO)  += intel_ich6_gpio.o
 obj-$(CONFIG_INTEL_BROADWELL_GPIO)     += intel_broadwell_gpio.o
 obj-$(CONFIG_KIRKWOOD_GPIO)    += kw_gpio.o
diff --git a/drivers/gpio/bcm6345_gpio.c b/drivers/gpio/bcm6345_gpio.c
new file mode 100644 (file)
index 0000000..1c46020
--- /dev/null
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * Derived from linux/arch/mips/bcm63xx/gpio.c:
+ *     Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
+ *     Copyright (C) 2008-2011 Florian Fainelli <florian@openwrt.org>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <errno.h>
+#include <asm/gpio.h>
+#include <asm/io.h>
+#include <dm/device.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+struct bcm6345_gpio_priv {
+       void __iomem *reg_dirout;
+       void __iomem *reg_data;
+};
+
+static int bcm6345_gpio_get_value(struct udevice *dev, unsigned offset)
+{
+       struct bcm6345_gpio_priv *priv = dev_get_priv(dev);
+
+       return !!(readl_be(priv->reg_data) & BIT(offset));
+}
+
+static int bcm6345_gpio_set_value(struct udevice *dev, unsigned offset,
+                                 int value)
+{
+       struct bcm6345_gpio_priv *priv = dev_get_priv(dev);
+
+       if (value)
+               setbits_be32(priv->reg_data, BIT(offset));
+       else
+               clrbits_be32(priv->reg_data, BIT(offset));
+
+       return 0;
+}
+
+static int bcm6345_gpio_set_direction(void __iomem *dirout, unsigned offset,
+                                     bool input)
+{
+       if (input)
+               clrbits_be32(dirout, BIT(offset));
+       else
+               setbits_be32(dirout, BIT(offset));
+
+       return 0;
+}
+
+static int bcm6345_gpio_direction_input(struct udevice *dev, unsigned offset)
+{
+       struct bcm6345_gpio_priv *priv = dev_get_priv(dev);
+
+       return bcm6345_gpio_set_direction(priv->reg_dirout, offset, 1);
+}
+
+static int bcm6345_gpio_direction_output(struct udevice *dev, unsigned offset,
+                                        int value)
+{
+       struct bcm6345_gpio_priv *priv = dev_get_priv(dev);
+
+       return bcm6345_gpio_set_direction(priv->reg_dirout, offset, 0);
+}
+
+static int bcm6345_gpio_get_function(struct udevice *dev, unsigned offset)
+{
+       struct bcm6345_gpio_priv *priv = dev_get_priv(dev);
+
+       if (readl_be(priv->reg_dirout) & BIT(offset))
+               return GPIOF_OUTPUT;
+       else
+               return GPIOF_INPUT;
+}
+
+static const struct dm_gpio_ops bcm6345_gpio_ops = {
+       .direction_input = bcm6345_gpio_direction_input,
+       .direction_output = bcm6345_gpio_direction_output,
+       .get_value = bcm6345_gpio_get_value,
+       .set_value = bcm6345_gpio_set_value,
+       .get_function = bcm6345_gpio_get_function,
+};
+
+static int bcm6345_gpio_probe(struct udevice *dev)
+{
+       struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
+       struct bcm6345_gpio_priv *priv = dev_get_priv(dev);
+       fdt_addr_t data_addr, dirout_addr;
+       fdt_size_t data_size, dirout_size;
+
+       dirout_addr = dev_get_addr_size_index(dev, 0, &dirout_size);
+       if (dirout_addr == FDT_ADDR_T_NONE)
+               return -EINVAL;
+
+       data_addr = dev_get_addr_size_index(dev, 1, &data_size);
+       if (data_addr == FDT_ADDR_T_NONE)
+               return -EINVAL;
+
+       priv->reg_data = ioremap(data_addr, data_size);
+       priv->reg_dirout = ioremap(dirout_addr, dirout_size);
+
+       uc_priv->gpio_count = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),
+                                             "ngpios", 32);
+       uc_priv->bank_name = dev->name;
+
+       return 0;
+}
+
+static const struct udevice_id bcm6345_gpio_ids[] = {
+       { .compatible = "brcm,bcm6345-gpio" },
+       { /* sentinel */ }
+};
+
+U_BOOT_DRIVER(bcm6345_gpio) = {
+       .name = "bcm6345-gpio",
+       .id = UCLASS_GPIO,
+       .of_match = bcm6345_gpio_ids,
+       .ops = &bcm6345_gpio_ops,
+       .priv_auto_alloc_size = sizeof(struct bcm6345_gpio_priv),
+       .probe = bcm6345_gpio_probe,
+};
index 9ab9df4ce7a6cd5afd1a78813c13560a40265a29..ba4804083daa6c7c6619eeda9215022d26fe0623 100644 (file)
@@ -68,7 +68,7 @@ int dm_gpio_lookup_name(const char *name, struct gpio_desc *desc)
                if (numeric != -1) {
                        offset = numeric - uc_priv->gpio_base;
                        /* Allow GPIOs to be numbered from 0 */
-                       if (offset >= 0 && offset < uc_priv->gpio_count)
+                       if (offset < uc_priv->gpio_count)
                                break;
                }
 
index 8b782260bc336cd1117531820f0aedc1cc2ed31b..0a9eb03fd0500c9cfc7d3a1605dbf46ff11c1da9 100644 (file)
@@ -46,22 +46,31 @@ struct ich6_bank_priv {
        uint16_t use_sel;
        uint16_t io_sel;
        uint16_t lvl;
+       u32 lvl_write_cache;
+       bool use_lvl_write_cache;
 };
 
 #define GPIO_USESEL_OFFSET(x)  (x)
 #define GPIO_IOSEL_OFFSET(x)   (x + 4)
 #define GPIO_LVL_OFFSET(x)     (x + 8)
 
-static int _ich6_gpio_set_value(uint16_t base, unsigned offset, int value)
+static int _ich6_gpio_set_value(struct ich6_bank_priv *bank, unsigned offset,
+                               int value)
 {
        u32 val;
 
-       val = inl(base);
+       if (bank->use_lvl_write_cache)
+               val = bank->lvl_write_cache;
+       else
+               val = inl(bank->lvl);
+
        if (value)
                val |= (1UL << offset);
        else
                val &= ~(1UL << offset);
-       outl(val, base);
+       outl(val, bank->lvl);
+       if (bank->use_lvl_write_cache)
+               bank->lvl_write_cache = val;
 
        return 0;
 }
@@ -112,6 +121,7 @@ static int ich6_gpio_probe(struct udevice *dev)
        struct ich6_bank_platdata *plat = dev_get_platdata(dev);
        struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
        struct ich6_bank_priv *bank = dev_get_priv(dev);
+       const void *prop;
 
        uc_priv->gpio_count = GPIO_PER_BANK;
        uc_priv->bank_name = plat->bank_name;
@@ -119,6 +129,14 @@ static int ich6_gpio_probe(struct udevice *dev)
        bank->io_sel = plat->base_addr + 4;
        bank->lvl = plat->base_addr + 8;
 
+       prop = fdt_getprop(gd->fdt_blob, dev->of_offset,
+                          "use-lvl-write-cache", NULL);
+       if (prop)
+               bank->use_lvl_write_cache = true;
+       else
+               bank->use_lvl_write_cache = false;
+       bank->lvl_write_cache = 0;
+
        return 0;
 }
 
@@ -160,7 +178,7 @@ static int ich6_gpio_direction_output(struct udevice *dev, unsigned offset,
        if (ret)
                return ret;
 
-       return _ich6_gpio_set_value(bank->lvl, offset, value);
+       return _ich6_gpio_set_value(bank, offset, value);
 }
 
 static int ich6_gpio_get_value(struct udevice *dev, unsigned offset)
@@ -170,6 +188,8 @@ static int ich6_gpio_get_value(struct udevice *dev, unsigned offset)
        int r;
 
        tmplong = inl(bank->lvl);
+       if (bank->use_lvl_write_cache)
+               tmplong |= bank->lvl_write_cache;
        r = (tmplong & (1UL << offset)) ? 1 : 0;
        return r;
 }
@@ -178,7 +198,7 @@ static int ich6_gpio_set_value(struct udevice *dev, unsigned offset,
                               int value)
 {
        struct ich6_bank_priv *bank = dev_get_priv(dev);
-       return _ich6_gpio_set_value(bank->lvl, offset, value);
+       return _ich6_gpio_set_value(bank, offset, value);
 }
 
 static int ich6_gpio_get_function(struct udevice *dev, unsigned offset)
index c5bd38c67b88934dc7f29b3a7291ef99a21e71dd..4471193402e5261959066eaa01998117d50b0e5d 100644 (file)
 
 #include <common.h>
 #include <i2c.h>
+#include <dm.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/i2c_defs.h>
 #include <asm/io.h>
 #include "davinci_i2c.h"
 
+#ifdef CONFIG_DM_I2C
+/* Information about i2c controller */
+struct i2c_bus {
+       int                     id;
+       uint                    speed;
+       struct i2c_regs         *regs;
+};
+#endif
+
 #define CHECK_NACK() \
        do {\
                if (tmp & (I2C_TIMEOUT | I2C_STAT_NACK)) {\
                } \
        } while (0)
 
-static struct i2c_regs *davinci_get_base(struct i2c_adapter *adap);
-
-static int wait_for_bus(struct i2c_adapter *adap)
+static int _wait_for_bus(struct i2c_regs *i2c_base)
 {
-       struct i2c_regs *i2c_base = davinci_get_base(adap);
        int     stat, timeout;
 
        REG(&(i2c_base->i2c_stat)) = 0xffff;
@@ -51,10 +58,8 @@ static int wait_for_bus(struct i2c_adapter *adap)
        return 1;
 }
 
-
-static int poll_i2c_irq(struct i2c_adapter *adap, int mask)
+static int _poll_i2c_irq(struct i2c_regs *i2c_base, int mask)
 {
-       struct i2c_regs *i2c_base = davinci_get_base(adap);
        int     stat, timeout;
 
        for (timeout = 0; timeout < 10; timeout++) {
@@ -68,10 +73,8 @@ static int poll_i2c_irq(struct i2c_adapter *adap, int mask)
        return stat | I2C_TIMEOUT;
 }
 
-static void flush_rx(struct i2c_adapter *adap)
+static void _flush_rx(struct i2c_regs *i2c_base)
 {
-       struct i2c_regs *i2c_base = davinci_get_base(adap);
-
        while (1) {
                if (!(REG(&(i2c_base->i2c_stat)) & I2C_STAT_RRDY))
                        break;
@@ -82,9 +85,9 @@ static void flush_rx(struct i2c_adapter *adap)
        }
 }
 
-static uint davinci_i2c_setspeed(struct i2c_adapter *adap, uint speed)
+static uint _davinci_i2c_setspeed(struct i2c_regs *i2c_base,
+                                 uint speed)
 {
-       struct i2c_regs *i2c_base = davinci_get_base(adap);
        uint32_t        div, psc;
 
        psc = 2;
@@ -94,20 +97,18 @@ static uint davinci_i2c_setspeed(struct i2c_adapter *adap, uint speed)
        REG(&(i2c_base->i2c_scll)) = (div * 50) / 100; /* 50% Duty */
        REG(&(i2c_base->i2c_sclh)) = div - REG(&(i2c_base->i2c_scll));
 
-       adap->speed     = speed;
        return 0;
 }
 
-static void davinci_i2c_init(struct i2c_adapter *adap, int speed, int slaveadd)
+static void _davinci_i2c_init(struct i2c_regs *i2c_base,
+                             uint speed, int slaveadd)
 {
-       struct i2c_regs *i2c_base = davinci_get_base(adap);
-
        if (REG(&(i2c_base->i2c_con)) & I2C_CON_EN) {
                REG(&(i2c_base->i2c_con)) = 0;
                udelay(50000);
        }
 
-       davinci_i2c_setspeed(adap, speed);
+       _davinci_i2c_setspeed(i2c_base, speed);
 
        REG(&(i2c_base->i2c_oa)) = slaveadd;
        REG(&(i2c_base->i2c_cnt)) = 0;
@@ -122,47 +123,9 @@ static void davinci_i2c_init(struct i2c_adapter *adap, int speed, int slaveadd)
        udelay(1000);
 }
 
-static int davinci_i2c_probe(struct i2c_adapter *adap, uint8_t chip)
+static int _davinci_i2c_read(struct i2c_regs *i2c_base, uint8_t chip,
+                            uint32_t addr, int alen, uint8_t *buf, int len)
 {
-       struct i2c_regs *i2c_base = davinci_get_base(adap);
-       int     rc = 1;
-
-       if (chip == REG(&(i2c_base->i2c_oa)))
-               return rc;
-
-       REG(&(i2c_base->i2c_con)) = 0;
-       if (wait_for_bus(adap))
-               return 1;
-
-       /* try to read one byte from current (or only) address */
-       REG(&(i2c_base->i2c_cnt)) = 1;
-       REG(&(i2c_base->i2c_sa))  = chip;
-       REG(&(i2c_base->i2c_con)) = (I2C_CON_EN | I2C_CON_MST | I2C_CON_STT |
-                                    I2C_CON_STP);
-       udelay(50000);
-
-       if (!(REG(&(i2c_base->i2c_stat)) & I2C_STAT_NACK)) {
-               rc = 0;
-               flush_rx(adap);
-               REG(&(i2c_base->i2c_stat)) = 0xffff;
-       } else {
-               REG(&(i2c_base->i2c_stat)) = 0xffff;
-               REG(&(i2c_base->i2c_con)) |= I2C_CON_STP;
-               udelay(20000);
-               if (wait_for_bus(adap))
-                       return 1;
-       }
-
-       flush_rx(adap);
-       REG(&(i2c_base->i2c_stat)) = 0xffff;
-       REG(&(i2c_base->i2c_cnt)) = 0;
-       return rc;
-}
-
-static int davinci_i2c_read(struct i2c_adapter *adap, uint8_t chip,
-                               uint32_t addr, int alen, uint8_t *buf, int len)
-{
-       struct i2c_regs *i2c_base = davinci_get_base(adap);
        uint32_t        tmp;
        int             i;
 
@@ -171,7 +134,7 @@ static int davinci_i2c_read(struct i2c_adapter *adap, uint8_t chip,
                return 1;
        }
 
-       if (wait_for_bus(adap))
+       if (_wait_for_bus(i2c_base))
                return 1;
 
        if (alen != 0) {
@@ -181,7 +144,7 @@ static int davinci_i2c_read(struct i2c_adapter *adap, uint8_t chip,
                REG(&(i2c_base->i2c_sa)) = chip;
                REG(&(i2c_base->i2c_con)) = tmp;
 
-               tmp = poll_i2c_irq(adap, I2C_STAT_XRDY | I2C_STAT_NACK);
+               tmp = _poll_i2c_irq(i2c_base, I2C_STAT_XRDY | I2C_STAT_NACK);
 
                CHECK_NACK();
 
@@ -195,7 +158,8 @@ static int davinci_i2c_read(struct i2c_adapter *adap, uint8_t chip,
                                return 1;
                        }
 
-                       tmp = poll_i2c_irq(adap, I2C_STAT_XRDY | I2C_STAT_NACK);
+                       tmp = _poll_i2c_irq(i2c_base,
+                                           I2C_STAT_XRDY | I2C_STAT_NACK);
 
                        CHECK_NACK();
                        /* No break, fall through */
@@ -208,8 +172,8 @@ static int davinci_i2c_read(struct i2c_adapter *adap, uint8_t chip,
                                return 1;
                        }
 
-                       tmp = poll_i2c_irq(adap, I2C_STAT_XRDY |
-                                          I2C_STAT_NACK | I2C_STAT_ARDY);
+                       tmp = _poll_i2c_irq(i2c_base, I2C_STAT_XRDY |
+                                           I2C_STAT_NACK | I2C_STAT_ARDY);
 
                        CHECK_NACK();
 
@@ -227,7 +191,7 @@ static int davinci_i2c_read(struct i2c_adapter *adap, uint8_t chip,
        REG(&(i2c_base->i2c_con)) = tmp;
 
        for (i = 0; i < len; i++) {
-               tmp = poll_i2c_irq(adap, I2C_STAT_RRDY | I2C_STAT_NACK |
+               tmp = _poll_i2c_irq(i2c_base, I2C_STAT_RRDY | I2C_STAT_NACK |
                                   I2C_STAT_ROVR);
 
                CHECK_NACK();
@@ -240,7 +204,7 @@ static int davinci_i2c_read(struct i2c_adapter *adap, uint8_t chip,
                }
        }
 
-       tmp = poll_i2c_irq(adap, I2C_STAT_SCD | I2C_STAT_NACK);
+       tmp = _poll_i2c_irq(i2c_base, I2C_STAT_SCD | I2C_STAT_NACK);
 
        CHECK_NACK();
 
@@ -249,7 +213,7 @@ static int davinci_i2c_read(struct i2c_adapter *adap, uint8_t chip,
                return 1;
        }
 
-       flush_rx(adap);
+       _flush_rx(i2c_base);
        REG(&(i2c_base->i2c_stat)) = 0xffff;
        REG(&(i2c_base->i2c_cnt)) = 0;
        REG(&(i2c_base->i2c_con)) = 0;
@@ -257,10 +221,9 @@ static int davinci_i2c_read(struct i2c_adapter *adap, uint8_t chip,
        return 0;
 }
 
-static int davinci_i2c_write(struct i2c_adapter *adap, uint8_t chip,
-                               uint32_t addr, int alen, uint8_t *buf, int len)
+static int _davinci_i2c_write(struct i2c_regs *i2c_base, uint8_t chip,
+                             uint32_t addr, int alen, uint8_t *buf, int len)
 {
-       struct i2c_regs *i2c_base = davinci_get_base(adap);
        uint32_t        tmp;
        int             i;
 
@@ -273,7 +236,7 @@ static int davinci_i2c_write(struct i2c_adapter *adap, uint8_t chip,
                return 1;
        }
 
-       if (wait_for_bus(adap))
+       if (_wait_for_bus(i2c_base))
                return 1;
 
        /* Start address phase */
@@ -287,7 +250,7 @@ static int davinci_i2c_write(struct i2c_adapter *adap, uint8_t chip,
        switch (alen) {
        case 2:
                /* Send address MSByte */
-               tmp = poll_i2c_irq(adap, I2C_STAT_XRDY | I2C_STAT_NACK);
+               tmp = _poll_i2c_irq(i2c_base, I2C_STAT_XRDY | I2C_STAT_NACK);
 
                CHECK_NACK();
 
@@ -300,7 +263,7 @@ static int davinci_i2c_write(struct i2c_adapter *adap, uint8_t chip,
                /* No break, fall through */
        case 1:
                /* Send address LSByte */
-               tmp = poll_i2c_irq(adap, I2C_STAT_XRDY | I2C_STAT_NACK);
+               tmp = _poll_i2c_irq(i2c_base, I2C_STAT_XRDY | I2C_STAT_NACK);
 
                CHECK_NACK();
 
@@ -313,7 +276,7 @@ static int davinci_i2c_write(struct i2c_adapter *adap, uint8_t chip,
        }
 
        for (i = 0; i < len; i++) {
-               tmp = poll_i2c_irq(adap, I2C_STAT_XRDY | I2C_STAT_NACK);
+               tmp = _poll_i2c_irq(i2c_base, I2C_STAT_XRDY | I2C_STAT_NACK);
 
                CHECK_NACK();
 
@@ -323,7 +286,7 @@ static int davinci_i2c_write(struct i2c_adapter *adap, uint8_t chip,
                        return 1;
        }
 
-       tmp = poll_i2c_irq(adap, I2C_STAT_SCD | I2C_STAT_NACK);
+       tmp = _poll_i2c_irq(i2c_base, I2C_STAT_SCD | I2C_STAT_NACK);
 
        CHECK_NACK();
 
@@ -332,7 +295,7 @@ static int davinci_i2c_write(struct i2c_adapter *adap, uint8_t chip,
                return 1;
        }
 
-       flush_rx(adap);
+       _flush_rx(i2c_base);
        REG(&(i2c_base->i2c_stat)) = 0xffff;
        REG(&(i2c_base->i2c_cnt)) = 0;
        REG(&(i2c_base->i2c_con)) = 0;
@@ -340,6 +303,43 @@ static int davinci_i2c_write(struct i2c_adapter *adap, uint8_t chip,
        return 0;
 }
 
+static int _davinci_i2c_probe_chip(struct i2c_regs *i2c_base, uint8_t chip)
+{
+       int     rc = 1;
+
+       if (chip == REG(&(i2c_base->i2c_oa)))
+               return rc;
+
+       REG(&(i2c_base->i2c_con)) = 0;
+       if (_wait_for_bus(i2c_base))
+               return 1;
+
+       /* try to read one byte from current (or only) address */
+       REG(&(i2c_base->i2c_cnt)) = 1;
+       REG(&(i2c_base->i2c_sa))  = chip;
+       REG(&(i2c_base->i2c_con)) = (I2C_CON_EN | I2C_CON_MST | I2C_CON_STT |
+                                    I2C_CON_STP);
+       udelay(50000);
+
+       if (!(REG(&(i2c_base->i2c_stat)) & I2C_STAT_NACK)) {
+               rc = 0;
+               _flush_rx(i2c_base);
+               REG(&(i2c_base->i2c_stat)) = 0xffff;
+       } else {
+               REG(&(i2c_base->i2c_stat)) = 0xffff;
+               REG(&(i2c_base->i2c_con)) |= I2C_CON_STP;
+               udelay(20000);
+               if (_wait_for_bus(i2c_base))
+                       return 1;
+       }
+
+       _flush_rx(i2c_base);
+       REG(&(i2c_base->i2c_stat)) = 0xffff;
+       REG(&(i2c_base->i2c_cnt)) = 0;
+       return rc;
+}
+
+#ifndef CONFIG_DM_I2C
 static struct i2c_regs *davinci_get_base(struct i2c_adapter *adap)
 {
        switch (adap->hwadapnr) {
@@ -361,7 +361,51 @@ static struct i2c_regs *davinci_get_base(struct i2c_adapter *adap)
        return NULL;
 }
 
-U_BOOT_I2C_ADAP_COMPLETE(davinci_0, davinci_i2c_init, davinci_i2c_probe,
+static uint davinci_i2c_setspeed(struct i2c_adapter *adap, uint speed)
+{
+       struct i2c_regs *i2c_base = davinci_get_base(adap);
+       uint ret;
+
+       adap->speed = speed;
+       ret =  _davinci_i2c_setspeed(i2c_base, speed);
+
+       return ret;
+}
+
+static void davinci_i2c_init(struct i2c_adapter *adap, int speed,
+                            int slaveadd)
+{
+       struct i2c_regs *i2c_base = davinci_get_base(adap);
+
+       adap->speed = speed;
+       _davinci_i2c_init(i2c_base, speed, slaveadd);
+
+       return;
+}
+
+static int davinci_i2c_read(struct i2c_adapter *adap, uint8_t chip,
+                           uint32_t addr, int alen, uint8_t *buf, int len)
+{
+       struct i2c_regs *i2c_base = davinci_get_base(adap);
+       return _davinci_i2c_read(i2c_base, chip, addr, alen, buf, len);
+}
+
+static int davinci_i2c_write(struct i2c_adapter *adap, uint8_t chip,
+                            uint32_t addr, int alen, uint8_t *buf, int len)
+{
+       struct i2c_regs *i2c_base = davinci_get_base(adap);
+
+       return _davinci_i2c_write(i2c_base, chip, addr, alen, buf, len);
+}
+
+static int davinci_i2c_probe_chip(struct i2c_adapter *adap, uint8_t chip)
+{
+       struct i2c_regs *i2c_base = davinci_get_base(adap);
+
+       return _davinci_i2c_probe_chip(i2c_base, chip);
+}
+
+U_BOOT_I2C_ADAP_COMPLETE(davinci_0, davinci_i2c_init, davinci_i2c_probe_chip,
                         davinci_i2c_read, davinci_i2c_write,
                         davinci_i2c_setspeed,
                         CONFIG_SYS_DAVINCI_I2C_SPEED,
@@ -369,7 +413,7 @@ U_BOOT_I2C_ADAP_COMPLETE(davinci_0, davinci_i2c_init, davinci_i2c_probe,
                         0)
 
 #if I2C_BUS_MAX >= 2
-U_BOOT_I2C_ADAP_COMPLETE(davinci_1, davinci_i2c_init, davinci_i2c_probe,
+U_BOOT_I2C_ADAP_COMPLETE(davinci_1, davinci_i2c_init, davinci_i2c_probe_chip,
                         davinci_i2c_read, davinci_i2c_write,
                         davinci_i2c_setspeed,
                         CONFIG_SYS_DAVINCI_I2C_SPEED1,
@@ -378,10 +422,89 @@ U_BOOT_I2C_ADAP_COMPLETE(davinci_1, davinci_i2c_init, davinci_i2c_probe,
 #endif
 
 #if I2C_BUS_MAX >= 3
-U_BOOT_I2C_ADAP_COMPLETE(davinci_2, davinci_i2c_init, davinci_i2c_probe,
+U_BOOT_I2C_ADAP_COMPLETE(davinci_2, davinci_i2c_init, davinci_i2c_probe_chip,
                         davinci_i2c_read, davinci_i2c_write,
                         davinci_i2c_setspeed,
                         CONFIG_SYS_DAVINCI_I2C_SPEED2,
                         CONFIG_SYS_DAVINCI_I2C_SLAVE2,
                         2)
 #endif
+
+#else /* CONFIG_DM_I2C */
+
+static int davinci_i2c_xfer(struct udevice *bus, struct i2c_msg *msg,
+                         int nmsgs)
+{
+       struct i2c_bus *i2c_bus = dev_get_priv(bus);
+       int ret;
+
+       debug("i2c_xfer: %d messages\n", nmsgs);
+       for (; nmsgs > 0; nmsgs--, msg++) {
+               debug("i2c_xfer: chip=0x%x, len=0x%x\n", msg->addr, msg->len);
+               if (msg->flags & I2C_M_RD) {
+                       ret = _davinci_i2c_read(i2c_bus->regs, msg->addr,
+                               0, 0, msg->buf, msg->len);
+               } else {
+                       ret = _davinci_i2c_write(i2c_bus->regs, msg->addr,
+                               0, 0, msg->buf, msg->len);
+               }
+               if (ret) {
+                       debug("i2c_write: error sending\n");
+                       return -EREMOTEIO;
+               }
+       }
+
+       return ret;
+}
+
+static int davinci_i2c_set_speed(struct udevice *dev, uint speed)
+{
+       struct i2c_bus *i2c_bus = dev_get_priv(dev);
+
+       i2c_bus->speed = speed;
+       return _davinci_i2c_setspeed(i2c_bus->regs, speed);
+}
+
+static int davinci_i2c_probe(struct udevice *dev)
+{
+       struct i2c_bus *i2c_bus = dev_get_priv(dev);
+
+       i2c_bus->id = dev->seq;
+       i2c_bus->regs = (struct i2c_regs *)dev_get_addr(dev);
+
+       i2c_bus->speed = 100000;
+        _davinci_i2c_init(i2c_bus->regs, i2c_bus->speed, 0);
+
+       return 0;
+}
+
+static int davinci_i2c_probe_chip(struct udevice *bus, uint chip_addr,
+                                 uint chip_flags)
+{
+       struct i2c_bus *i2c_bus = dev_get_priv(bus);
+
+       return _davinci_i2c_probe_chip(i2c_bus->regs, chip_addr);
+}
+
+static const struct dm_i2c_ops davinci_i2c_ops = {
+       .xfer           = davinci_i2c_xfer,
+       .probe_chip     = davinci_i2c_probe_chip,
+       .set_bus_speed  = davinci_i2c_set_speed,
+};
+
+static const struct udevice_id davinci_i2c_ids[] = {
+       { .compatible = "ti,davinci-i2c"},
+       { .compatible = "ti,keystone-i2c"},
+       { }
+};
+
+U_BOOT_DRIVER(i2c_davinci) = {
+       .name   = "i2c_davinci",
+       .id     = UCLASS_I2C,
+       .of_match = davinci_i2c_ids,
+       .probe  = davinci_i2c_probe,
+       .priv_auto_alloc_size = sizeof(struct i2c_bus),
+       .ops    = &davinci_i2c_ops,
+};
+
+#endif /* CONFIG_DM_I2C */
index a1406baa87b28b778bdee38a9ad696b79f3dc98a..ff3dc25927a004487ef9bf97f6711d03e52cdc4e 100644 (file)
@@ -284,15 +284,6 @@ static void __i2c_init(const struct fsl_i2c_base *base, int speed, int
 
                break;
        }
-
-#ifdef CONFIG_SYS_I2C_BOARD_LATE_INIT
-       /* Call board specific i2c bus reset routine AFTER the bus has been
-        * initialized. Use either this callpoint or i2c_init_board;
-        * which is called before i2c_init operations.
-        * For details about this problem see doc/I2C_Edge_Conditions.
-       */
-       i2c_board_late_init();
-#endif
 }
 
 static int
index b35d0d2d9c53f1338527c7ea6b04ab61b675100c..4da959fa537d8b6554e36c1b4eae58465d8caf4e 100644 (file)
@@ -146,15 +146,6 @@ static void fti2c010_init(struct i2c_adapter *adap, int speed, int slaveaddr)
        set_i2c_bus_speed(chip, speed);
 
        /* slave init, don't care */
-
-#ifdef CONFIG_SYS_I2C_BOARD_LATE_INIT
-       /* Call board specific i2c bus reset routine AFTER the bus has been
-        * initialized. Use either this callpoint or i2c_init_board;
-        * which is called before fti2c010_init operations.
-        * For details about this problem see doc/I2C_Edge_Conditions.
-       */
-       i2c_board_late_init();
-#endif
 }
 
 /*
index 13ec0e63b106f1383539aa123c6d54f4c1a766b4..b68e82770b53e217aef5d939fde73b486ab75d6e 100644 (file)
@@ -69,10 +69,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #define I2SR_IIF_CLEAR (0 << 1)
 #endif
 
-#if defined(CONFIG_HARD_I2C) && !defined(CONFIG_SYS_I2C_BASE)
-#error "define CONFIG_SYS_I2C_BASE to use the mxc_i2c driver"
-#endif
-
 #ifdef I2C_QUIRK_REG
 static u16 i2c_clk_div[60][2] = {
        { 20,   0x00 }, { 22,   0x01 }, { 24,   0x02 }, { 26,   0x03 },
index 26996e9db933fd3a5679cf009186f7e71e6284bf..4b8397a890d6daa5cf169e98694818ea34daa8db 100644 (file)
@@ -122,7 +122,7 @@ static int wait_for_bb(struct i2c *i2c_base, int waitdelay)
        u16 stat;
 
        writew(0xFFFF, &i2c_base->stat);        /* clear current interrupts...*/
-#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX)
+#if defined(CONFIG_OMAP34XX)
        while ((stat = readw(&i2c_base->stat) & I2C_STAT_BB) && timeout--) {
 #else
        /* Read RAW status */
@@ -153,7 +153,7 @@ static u16 wait_for_event(struct i2c *i2c_base, int waitdelay)
 
        do {
                udelay(waitdelay);
-#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX)
+#if defined(CONFIG_OMAP34XX)
                status = readw(&i2c_base->stat);
 #else
                /* Read RAW status */
@@ -338,7 +338,7 @@ retry:
        /* own address */
        writew(slaveadd, &i2c_base->oa);
 
-#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX)
+#if defined(CONFIG_OMAP34XX)
        /*
         * Have to enable interrupts for OMAP2/3, these IPs don't have
         * an 'irqstatus_raw' register and we shall have to poll 'stat'
@@ -910,6 +910,7 @@ static const struct dm_i2c_ops omap_i2c_ops = {
 };
 
 static const struct udevice_id omap_i2c_ids[] = {
+       { .compatible = "ti,omap3-i2c" },
        { .compatible = "ti,omap4-i2c" },
        { }
 };
index 309372ab56484509694d3f5401c73a8053b53a67..5da5c4af3925804a31e0606c96a8572d87b59564 100644 (file)
@@ -9,6 +9,25 @@ config LED
          can provide access to board-specific LEDs. Use of the device tree
          for configuration is encouraged.
 
+config LED_BCM6328
+       bool "LED Support for BCM6328"
+       depends on LED && ARCH_BMIPS
+       help
+         This option enables support for LEDs connected to the BCM6328
+         LED HW controller accessed via MMIO registers.
+         HW blinking is supported and up to 24 LEDs can be controlled.
+         All LEDs can blink at the same time but the delay is shared, which
+         means that if one LED is set to blink at 100ms and then a different
+         LED is set to blink at 200ms, both will blink at 200ms.
+
+config LED_BCM6358
+       bool "LED Support for BCM6358"
+       depends on LED && ARCH_BMIPS
+       help
+         This option enables support for LEDs connected to the BCM6358
+         LED HW controller accessed via MMIO registers.
+         HW has no blinking capabilities and up to 32 LEDs can be controlled.
+
 config LED_BLINK
        bool "Support LED blinking"
        depends on LED
index 02367fdacbc10e77abbe51979b2a40bc1fa2bc56..9d079f8336e15ba67ec2ce09a32e797e84d7588b 100644 (file)
@@ -6,4 +6,6 @@
 #
 
 obj-y += led-uclass.o
+obj-$(CONFIG_LED_BCM6328) += led_bcm6328.o
+obj-$(CONFIG_LED_BCM6358) += led_bcm6358.o
 obj-$(CONFIG_$(SPL_)LED_GPIO) += led_gpio.o
diff --git a/drivers/led/led_bcm6328.c b/drivers/led/led_bcm6328.c
new file mode 100644 (file)
index 0000000..ef8c6a7
--- /dev/null
@@ -0,0 +1,262 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <errno.h>
+#include <led.h>
+#include <asm/io.h>
+#include <dm/lists.h>
+
+#define LEDS_MAX                       24
+
+/* LED Init register */
+#define LED_INIT_REG                   0x00
+#define LED_INIT_FASTINTV_MS           20
+#define LED_INIT_FASTINTV_SHIFT                6
+#define LED_INIT_FASTINTV_MASK         (0x3f << LED_INIT_FASTINTV_SHIFT)
+#define LED_INIT_SLEDEN_SHIFT          12
+#define LED_INIT_SLEDEN_MASK           (1 << LED_INIT_SLEDEN_SHIFT)
+#define LED_INIT_SLEDMUX_SHIFT         13
+#define LED_INIT_SLEDMUX_MASK          (1 << LED_INIT_SLEDMUX_SHIFT)
+#define LED_INIT_SLEDCLKNPOL_SHIFT     14
+#define LED_INIT_SLEDCLKNPOL_MASK      (1 << LED_INIT_SLEDCLKNPOL_SHIFT)
+#define LED_INIT_SLEDDATAPPOL_SHIFT    15
+#define LED_INIT_SLEDDATANPOL_MASK     (1 << LED_INIT_SLEDDATAPPOL_SHIFT)
+#define LED_INIT_SLEDSHIFTDIR_SHIFT    16
+#define LED_INIT_SLEDSHIFTDIR_MASK     (1 << LED_INIT_SLEDSHIFTDIR_SHIFT)
+
+/* LED Mode registers */
+#define LED_MODE_REG_HI                        0x04
+#define LED_MODE_REG_LO                        0x08
+#define LED_MODE_ON                    0
+#define LED_MODE_FAST                  1
+#define LED_MODE_BLINK                 2
+#define LED_MODE_OFF                   3
+#define LED_MODE_MASK                  0x3
+
+DECLARE_GLOBAL_DATA_PTR;
+
+struct bcm6328_led_priv {
+       void __iomem *regs;
+       void __iomem *mode;
+       uint8_t shift;
+       bool active_low;
+};
+
+static unsigned long bcm6328_led_get_mode(struct bcm6328_led_priv *priv)
+{
+       return ((readl_be(priv->mode) >> priv->shift) & LED_MODE_MASK);
+}
+
+static int bcm6328_led_set_mode(struct bcm6328_led_priv *priv, uint8_t mode)
+{
+       clrsetbits_be32(priv->mode, (LED_MODE_MASK << priv->shift),
+                       (mode << priv->shift));
+
+       return 0;
+}
+
+static enum led_state_t bcm6328_led_get_state(struct udevice *dev)
+{
+       struct bcm6328_led_priv *priv = dev_get_priv(dev);
+       enum led_state_t state = LEDST_OFF;
+
+       switch (bcm6328_led_get_mode(priv)) {
+#ifdef CONFIG_LED_BLINK
+       case LED_MODE_BLINK:
+       case LED_MODE_FAST:
+               state = LEDST_BLINK;
+               break;
+#endif
+       case LED_MODE_OFF:
+               state = (priv->active_low ? LEDST_ON : LEDST_OFF);
+               break;
+       case LED_MODE_ON:
+               state = (priv->active_low ? LEDST_OFF : LEDST_ON);
+               break;
+       }
+
+       return state;
+}
+
+static int bcm6328_led_set_state(struct udevice *dev, enum led_state_t state)
+{
+       struct bcm6328_led_priv *priv = dev_get_priv(dev);
+       unsigned long mode;
+
+       switch (state) {
+#ifdef CONFIG_LED_BLINK
+       case LEDST_BLINK:
+               mode = LED_MODE_BLINK;
+               break;
+#endif
+       case LEDST_OFF:
+               mode = (priv->active_low ? LED_MODE_ON : LED_MODE_OFF);
+               break;
+       case LEDST_ON:
+               mode = (priv->active_low ? LED_MODE_OFF : LED_MODE_ON);
+               break;
+       case LEDST_TOGGLE:
+               if (bcm6328_led_get_state(dev) == LEDST_OFF)
+                       return bcm6328_led_set_state(dev, LEDST_ON);
+               else
+                       return bcm6328_led_set_state(dev, LEDST_OFF);
+               break;
+       default:
+               return -ENOSYS;
+       }
+
+       return bcm6328_led_set_mode(priv, mode);
+}
+
+#ifdef CONFIG_LED_BLINK
+static unsigned long bcm6328_blink_delay(int delay)
+{
+       unsigned long bcm6328_delay = delay;
+
+       bcm6328_delay += (LED_INIT_FASTINTV_MS / 2);
+       bcm6328_delay /= LED_INIT_FASTINTV_MS;
+       bcm6328_delay <<= LED_INIT_FASTINTV_SHIFT;
+
+       if (bcm6328_delay > LED_INIT_FASTINTV_MASK)
+               return LED_INIT_FASTINTV_MASK;
+       else
+               return bcm6328_delay;
+}
+
+static int bcm6328_led_set_period(struct udevice *dev, int period_ms)
+{
+       struct bcm6328_led_priv *priv = dev_get_priv(dev);
+
+       clrsetbits_be32(priv->regs + LED_INIT_REG, LED_INIT_FASTINTV_MASK,
+                       bcm6328_blink_delay(period_ms));
+
+       return 0;
+}
+#endif
+
+static const struct led_ops bcm6328_led_ops = {
+       .get_state = bcm6328_led_get_state,
+       .set_state = bcm6328_led_set_state,
+#ifdef CONFIG_LED_BLINK
+       .set_period = bcm6328_led_set_period,
+#endif
+};
+
+static int bcm6328_led_probe(struct udevice *dev)
+{
+       struct led_uc_plat *uc_plat = dev_get_uclass_platdata(dev);
+       fdt_addr_t addr;
+       fdt_size_t size;
+
+       /* Top-level LED node */
+       if (!uc_plat->label) {
+               void __iomem *regs;
+               u32 set_bits = 0;
+
+               addr = dev_get_addr_size_index(dev, 0, &size);
+               if (addr == FDT_ADDR_T_NONE)
+                       return -EINVAL;
+
+               regs = ioremap(addr, size);
+
+               if (fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
+                                   "brcm,serial-leds"))
+                       set_bits |= LED_INIT_SLEDEN_MASK;
+               if (fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
+                                   "brcm,serial-mux"))
+                       set_bits |= LED_INIT_SLEDMUX_MASK;
+               if (fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
+                                   "brcm,serial-clk-low"))
+                       set_bits |= LED_INIT_SLEDCLKNPOL_MASK;
+               if (!fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
+                                    "brcm,serial-dat-low"))
+                       set_bits |= LED_INIT_SLEDDATANPOL_MASK;
+               if (!fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
+                                    "brcm,serial-shift-inv"))
+                       set_bits |= LED_INIT_SLEDSHIFTDIR_MASK;
+
+               clrsetbits_be32(regs + LED_INIT_REG, ~0, set_bits);
+       } else {
+               struct bcm6328_led_priv *priv = dev_get_priv(dev);
+               unsigned int pin;
+
+               addr = dev_get_addr_size_index(dev_get_parent(dev), 0, &size);
+               if (addr == FDT_ADDR_T_NONE)
+                       return -EINVAL;
+
+               pin = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev), "reg",
+                                     LEDS_MAX);
+               if (pin >= LEDS_MAX)
+                       return -EINVAL;
+
+               priv->regs = ioremap(addr, size);
+               if (pin < 8) {
+                       /* LEDs 0-7 (bits 47:32) */
+                       priv->mode = priv->regs + LED_MODE_REG_HI;
+                       priv->shift = (pin << 1);
+               } else {
+                       /* LEDs 8-23 (bits 31:0) */
+                       priv->mode = priv->regs + LED_MODE_REG_LO;
+                       priv->shift = ((pin - 8) << 1);
+               }
+
+               if (fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
+                                   "active-low"))
+                       priv->active_low = true;
+       }
+
+       return 0;
+}
+
+static int bcm6328_led_bind(struct udevice *parent)
+{
+       const void *blob = gd->fdt_blob;
+       int node;
+
+       for (node = fdt_first_subnode(blob, dev_of_offset(parent));
+            node > 0;
+            node = fdt_next_subnode(blob, node)) {
+               struct led_uc_plat *uc_plat;
+               struct udevice *dev;
+               const char *label;
+               int ret;
+
+               label = fdt_getprop(blob, node, "label", NULL);
+               if (!label) {
+                       debug("%s: node %s has no label\n", __func__,
+                             fdt_get_name(blob, node, NULL));
+                       return -EINVAL;
+               }
+
+               ret = device_bind_driver_to_node(parent, "bcm6328-led",
+                                                fdt_get_name(blob, node, NULL),
+                                                node, &dev);
+               if (ret)
+                       return ret;
+
+               uc_plat = dev_get_uclass_platdata(dev);
+               uc_plat->label = label;
+       }
+
+       return 0;
+}
+
+static const struct udevice_id bcm6328_led_ids[] = {
+       { .compatible = "brcm,bcm6328-leds" },
+       { /* sentinel */ }
+};
+
+U_BOOT_DRIVER(bcm6328_led) = {
+       .name = "bcm6328-led",
+       .id = UCLASS_LED,
+       .of_match = bcm6328_led_ids,
+       .ops = &bcm6328_led_ops,
+       .bind = bcm6328_led_bind,
+       .probe = bcm6328_led_probe,
+       .priv_auto_alloc_size = sizeof(struct bcm6328_led_priv),
+};
diff --git a/drivers/led/led_bcm6358.c b/drivers/led/led_bcm6358.c
new file mode 100644 (file)
index 0000000..11caecd
--- /dev/null
@@ -0,0 +1,227 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <errno.h>
+#include <led.h>
+#include <asm/io.h>
+#include <dm/lists.h>
+
+#define LEDS_MAX               32
+#define LEDS_WAIT              100
+
+/* LED Mode register */
+#define LED_MODE_REG           0x0
+#define LED_MODE_OFF           0
+#define LED_MODE_ON            1
+#define LED_MODE_MASK          1
+
+/* LED Control register */
+#define LED_CTRL_REG           0x4
+#define LED_CTRL_CLK_MASK      0x3
+#define LED_CTRL_CLK_1         0
+#define LED_CTRL_CLK_2         1
+#define LED_CTRL_CLK_4         2
+#define LED_CTRL_CLK_8         3
+#define LED_CTRL_POL_SHIFT     2
+#define LED_CTRL_POL_MASK      (1 << LED_CTRL_POL_SHIFT)
+#define LED_CTRL_BUSY_SHIFT    3
+#define LED_CTRL_BUSY_MASK     (1 << LED_CTRL_BUSY_SHIFT)
+
+DECLARE_GLOBAL_DATA_PTR;
+
+struct bcm6358_led_priv {
+       void __iomem *regs;
+       uint8_t pin;
+       bool active_low;
+};
+
+static void bcm6358_led_busy(void __iomem *regs)
+{
+       while (readl_be(regs + LED_CTRL_REG) & LED_CTRL_BUSY_MASK)
+               udelay(LEDS_WAIT);
+}
+
+static unsigned long bcm6358_led_get_mode(struct bcm6358_led_priv *priv)
+{
+       bcm6358_led_busy(priv->regs);
+
+       return (readl_be(priv->regs + LED_MODE_REG) >> priv->pin) &
+              LED_MODE_MASK;
+}
+
+static int bcm6358_led_set_mode(struct bcm6358_led_priv *priv, uint8_t mode)
+{
+       bcm6358_led_busy(priv->regs);
+
+       clrsetbits_be32(priv->regs + LED_MODE_REG,
+                       (LED_MODE_MASK << priv->pin),
+                       (mode << priv->pin));
+
+       return 0;
+}
+
+static enum led_state_t bcm6358_led_get_state(struct udevice *dev)
+{
+       struct bcm6358_led_priv *priv = dev_get_priv(dev);
+       enum led_state_t state = LEDST_OFF;
+
+       switch (bcm6358_led_get_mode(priv)) {
+       case LED_MODE_OFF:
+               state = (priv->active_low ? LEDST_ON : LEDST_OFF);
+               break;
+       case LED_MODE_ON:
+               state = (priv->active_low ? LEDST_OFF : LEDST_ON);
+               break;
+       }
+
+       return state;
+}
+
+static int bcm6358_led_set_state(struct udevice *dev, enum led_state_t state)
+{
+       struct bcm6358_led_priv *priv = dev_get_priv(dev);
+       unsigned long mode;
+
+       switch (state) {
+       case LEDST_OFF:
+               mode = (priv->active_low ? LED_MODE_ON : LED_MODE_OFF);
+               break;
+       case LEDST_ON:
+               mode = (priv->active_low ? LED_MODE_OFF : LED_MODE_ON);
+               break;
+       case LEDST_TOGGLE:
+               if (bcm6358_led_get_state(dev) == LEDST_OFF)
+                       return bcm6358_led_set_state(dev, LEDST_ON);
+               else
+                       return bcm6358_led_set_state(dev, LEDST_OFF);
+               break;
+       default:
+               return -ENOSYS;
+       }
+
+       return bcm6358_led_set_mode(priv, mode);
+}
+
+static const struct led_ops bcm6358_led_ops = {
+       .get_state = bcm6358_led_get_state,
+       .set_state = bcm6358_led_set_state,
+};
+
+static int bcm6358_led_probe(struct udevice *dev)
+{
+       struct led_uc_plat *uc_plat = dev_get_uclass_platdata(dev);
+       fdt_addr_t addr;
+       fdt_size_t size;
+
+       /* Top-level LED node */
+       if (!uc_plat->label) {
+               void __iomem *regs;
+               unsigned int clk_div;
+               u32 set_bits = 0;
+
+               addr = dev_get_addr_size_index(dev, 0, &size);
+               if (addr == FDT_ADDR_T_NONE)
+                       return -EINVAL;
+
+               regs = ioremap(addr, size);
+
+               if (fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
+                                   "brcm,clk-dat-low"))
+                       set_bits |= LED_CTRL_POL_MASK;
+               clk_div = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),
+                                         "brcm,clk-div", LED_CTRL_CLK_1);
+               switch (clk_div) {
+               case 8:
+                       set_bits |= LED_CTRL_CLK_8;
+                       break;
+               case 4:
+                       set_bits |= LED_CTRL_CLK_4;
+                       break;
+               case 2:
+                       set_bits |= LED_CTRL_CLK_2;
+                       break;
+               default:
+                       set_bits |= LED_CTRL_CLK_1;
+                       break;
+               }
+
+               bcm6358_led_busy(regs);
+               clrsetbits_be32(regs + LED_CTRL_REG,
+                               LED_CTRL_POL_MASK | LED_CTRL_CLK_MASK,
+                               set_bits);
+       } else {
+               struct bcm6358_led_priv *priv = dev_get_priv(dev);
+               unsigned int pin;
+
+               addr = dev_get_addr_size_index(dev_get_parent(dev), 0, &size);
+               if (addr == FDT_ADDR_T_NONE)
+                       return -EINVAL;
+
+               pin = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev), "reg",
+                                     LEDS_MAX);
+               if (pin >= LEDS_MAX)
+                       return -EINVAL;
+
+               priv->regs = ioremap(addr, size);
+               priv->pin = pin;
+
+               if (fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
+                                   "active-low"))
+                       priv->active_low = true;
+       }
+
+       return 0;
+}
+
+static int bcm6358_led_bind(struct udevice *parent)
+{
+       const void *blob = gd->fdt_blob;
+       int node;
+
+       for (node = fdt_first_subnode(blob, dev_of_offset(parent));
+            node > 0;
+            node = fdt_next_subnode(blob, node)) {
+               struct led_uc_plat *uc_plat;
+               struct udevice *dev;
+               const char *label;
+               int ret;
+
+               label = fdt_getprop(blob, node, "label", NULL);
+               if (!label) {
+                       debug("%s: node %s has no label\n", __func__,
+                             fdt_get_name(blob, node, NULL));
+                       return -EINVAL;
+               }
+
+               ret = device_bind_driver_to_node(parent, "bcm6358-led",
+                                                fdt_get_name(blob, node, NULL),
+                                                node, &dev);
+               if (ret)
+                       return ret;
+
+               uc_plat = dev_get_uclass_platdata(dev);
+               uc_plat->label = label;
+       }
+
+       return 0;
+}
+
+static const struct udevice_id bcm6358_led_ids[] = {
+       { .compatible = "brcm,bcm6358-leds" },
+       { /* sentinel */ }
+};
+
+U_BOOT_DRIVER(bcm6358_led) = {
+       .name = "bcm6358-led",
+       .id = UCLASS_LED,
+       .of_match = bcm6358_led_ids,
+       .bind = bcm6358_led_bind,
+       .probe = bcm6358_led_probe,
+       .priv_auto_alloc_size = sizeof(struct bcm6358_led_priv),
+       .ops = &bcm6358_led_ops,
+};
index c9f4174bad42f928e707e7a2570e24a827bca536..da6e2b05f730158d6622cbde37dab9a28cf692ac 100644 (file)
 #include <i2c.h>
 #include <i2c_eeprom.h>
 
-static int i2c_eeprom_read(struct udevice *dev, int offset, uint8_t *buf,
-                          int size)
+int i2c_eeprom_read(struct udevice *dev, int offset, uint8_t *buf, int size)
+{
+       const struct i2c_eeprom_ops *ops = device_get_ops(dev);
+
+       if (!ops->read)
+               return -ENOSYS;
+
+       return ops->read(dev, offset, buf, size);
+}
+
+int i2c_eeprom_write(struct udevice *dev, int offset, uint8_t *buf, int size)
+{
+       const struct i2c_eeprom_ops *ops = device_get_ops(dev);
+
+       if (!ops->write)
+               return -ENOSYS;
+
+       return ops->write(dev, offset, buf, size);
+}
+
+static int i2c_eeprom_std_read(struct udevice *dev, int offset, uint8_t *buf,
+                              int size)
 {
        return dm_i2c_read(dev, offset, buf, size);
 }
 
-static int i2c_eeprom_write(struct udevice *dev, int offset,
-                           const uint8_t *buf, int size)
+static int i2c_eeprom_std_write(struct udevice *dev, int offset,
+                               const uint8_t *buf, int size)
 {
        return -ENODEV;
 }
 
 struct i2c_eeprom_ops i2c_eeprom_std_ops = {
-       .read   = i2c_eeprom_read,
-       .write  = i2c_eeprom_write,
+       .read   = i2c_eeprom_std_read,
+       .write  = i2c_eeprom_std_write,
 };
 
 static int i2c_eeprom_std_ofdata_to_platdata(struct udevice *dev)
index 6ac26dd137c570956b9647cdb1fdaa02ddc0d249..0dd444360252db60fd0363a7b55c8300f160c95c 100644 (file)
@@ -10,10 +10,6 @@ config MMC
          If you want MMC/SD/SDIO support, you should say Y here and
          also to your specific host controller driver.
 
-config GENERIC_MMC
-       bool "Generic MMC driver framework"
-       default MMC
-
 config DM_MMC
        bool "Enable MMC controllers using Driver Model"
        depends on DM
@@ -138,6 +134,7 @@ config MMC_PCI
 
 config MMC_OMAP_HS
        bool "TI OMAP High Speed Multimedia Card Interface support"
+       select DM_MMC_OPS if DM_MMC
        help
          This selects the TI OMAP High Speed Multimedia card Interface.
          If you have an omap2plus board with a Multimedia Card slot,
index de91f1423bc7b409eb24ac2854012e754e6e71a4..a07864989944727a15b7c05c207df9243e0deb8e 100644 (file)
@@ -5,17 +5,24 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifdef CONFIG_DM_MMC
-obj-$(CONFIG_GENERIC_MMC) += mmc-uclass.o
-endif
+obj-y += mmc.o
+obj-$(CONFIG_DM_MMC) += mmc-uclass.o
 
 ifndef CONFIG_BLK
-obj-$(CONFIG_GENERIC_MMC) += mmc_legacy.o
+obj-y += mmc_legacy.o
+endif
+
+obj-$(CONFIG_SUPPORT_EMMC_BOOT) += mmc_boot.o
+
+ifdef CONFIG_SPL_BUILD
+obj-$(CONFIG_SPL_MMC_BOOT) += fsl_esdhc_spl.o
+obj-$(CONFIG_SPL_SAVEENV) += mmc_write.o
+else
+obj-y += mmc_write.o
 endif
 
 obj-$(CONFIG_ARM_PL180_MMCI) += arm_pl180_mmci.o
 obj-$(CONFIG_MMC_DAVINCI)              += davinci_mmc.o
-
 obj-$(CONFIG_MMC_DW)                   += dw_mmc.o
 obj-$(CONFIG_MMC_DW_EXYNOS)            += exynos_dw_mmc.o
 obj-$(CONFIG_MMC_DW_K3)                        += hi6220_dw_mmc.o
@@ -23,10 +30,6 @@ obj-$(CONFIG_MMC_DW_ROCKCHIP)                += rockchip_dw_mmc.o
 obj-$(CONFIG_MMC_DW_SOCFPGA)           += socfpga_dw_mmc.o
 obj-$(CONFIG_FSL_ESDHC) += fsl_esdhc.o
 obj-$(CONFIG_FTSDC010) += ftsdc010_mci.o
-obj-$(CONFIG_GENERIC_MMC) += mmc.o
-ifdef CONFIG_SUPPORT_EMMC_BOOT
-obj-$(CONFIG_GENERIC_MMC) += mmc_boot.o
-endif
 obj-$(CONFIG_GENERIC_ATMEL_MCI) += gen_atmel_mci.o
 obj-$(CONFIG_MMC_MESON_GX) += meson_gx_mmc.o
 obj-$(CONFIG_MMC_SPI) += mmc_spi.o
@@ -42,13 +45,6 @@ obj-$(CONFIG_MMC_SANDBOX)            += sandbox_mmc.o
 obj-$(CONFIG_SH_MMCIF) += sh_mmcif.o
 obj-$(CONFIG_SH_SDHI) += sh_sdhi.o
 
-ifdef CONFIG_SPL_BUILD
-obj-$(CONFIG_SPL_MMC_BOOT) += fsl_esdhc_spl.o
-obj-$(CONFIG_SPL_SAVEENV) += mmc_write.o
-else
-obj-$(CONFIG_GENERIC_MMC) += mmc_write.o
-endif
-
 # SDHCI
 obj-$(CONFIG_MMC_SDHCI)                        += sdhci.o
 obj-$(CONFIG_MMC_SDHCI_ATMEL)          += atmel_sdhci.o
index 852255782f138e752194a4ed275ae2b264b41043..86e36a9c286c952d437b76e023421d226ebb434b 100644 (file)
@@ -28,7 +28,7 @@ int atmel_sdhci_init(void *regbase, u32 id)
 
        host->name = "atmel_sdhci";
        host->ioaddr = regbase;
-       host->quirks = 0;
+       host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD;
        max_clk = at91_get_periph_generated_clk(id);
        if (!max_clk) {
                printf("%s: Failed to get the proper clock\n", __func__);
@@ -74,7 +74,7 @@ static int atmel_sdhci_probe(struct udevice *dev)
        host->name = dev->name;
        host->ioaddr = (void *)dev_get_addr(dev);
 
-       host->quirks = 0;
+       host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD;
        host->bus_width = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
                                         "bus-width", 4);
 
index 20079bce48b81819e923f51b98aa8100b0a49cad..b6e2fc689727a1499460110f0a2d83431103d8f3 100644 (file)
  */
 
 #include <common.h>
+#include <dm.h>
 #include <malloc.h>
+#include <memalign.h>
 #include <sdhci.h>
-#include <mach/timer.h>
+#include <asm/arch/msg.h>
+#include <asm/arch/mbox.h>
 #include <mach/sdhci.h>
+#include <mach/timer.h>
 
 /* 400KHz is max freq for card ID etc. Use that as min */
 #define MIN_FREQ 400000
 #define SDHCI_BUFFER 0x20
 
+struct bcm2835_sdhci_plat {
+       struct mmc_config cfg;
+       struct mmc mmc;
+};
+
 struct bcm2835_sdhci_host {
        struct sdhci_host host;
        uint twoticks_delay;
@@ -58,7 +67,7 @@ static inline struct bcm2835_sdhci_host *to_bcm(struct sdhci_host *host)
 }
 
 static inline void bcm2835_sdhci_raw_writel(struct sdhci_host *host, u32 val,
-                                               int reg)
+                                           int reg)
 {
        struct bcm2835_sdhci_host *bcm_host = to_bcm(host);
 
@@ -153,16 +162,33 @@ static const struct sdhci_ops bcm2835_ops = {
        .read_b = bcm2835_sdhci_readb,
 };
 
-int bcm2835_sdhci_init(u32 regbase, u32 emmc_freq)
+static int bcm2835_sdhci_bind(struct udevice *dev)
 {
-       struct bcm2835_sdhci_host *bcm_host;
-       struct sdhci_host *host;
+       struct bcm2835_sdhci_plat *plat = dev_get_platdata(dev);
 
-       bcm_host = calloc(1, sizeof(*bcm_host));
-       if (!bcm_host) {
-               printf("sdhci_host calloc fail!\n");
-               return -ENOMEM;
+       return sdhci_bind(dev, &plat->mmc, &plat->cfg);
+}
+
+static int bcm2835_sdhci_probe(struct udevice *dev)
+{
+       struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
+       struct bcm2835_sdhci_plat *plat = dev_get_platdata(dev);
+       struct bcm2835_sdhci_host *priv = dev_get_priv(dev);
+       struct sdhci_host *host = &priv->host;
+       fdt_addr_t base;
+       int emmc_freq;
+       int ret;
+
+       base = dev_get_addr(dev);
+       if (base == FDT_ADDR_T_NONE)
+               return -EINVAL;
+
+       ret = bcm2835_get_mmc_clock();
+       if (ret < 0) {
+               debug("%s: Failed to set MMC clock (err=%d)\n", __func__, ret);
+               return ret;
        }
+       emmc_freq = ret;
 
        /*
         * See the comments in bcm2835_sdhci_raw_writel().
@@ -177,19 +203,42 @@ int bcm2835_sdhci_init(u32 regbase, u32 emmc_freq)
         * Multiply by 1000000 to get uS per two ticks.
         * +1 for hack rounding.
         */
-       bcm_host->twoticks_delay = ((2 * 1000000) / MIN_FREQ) + 1;
-       bcm_host->last_write = 0;
+       priv->twoticks_delay = ((2 * 1000000) / MIN_FREQ) + 1;
+       priv->last_write = 0;
 
-       host = &bcm_host->host;
-       host->name = "bcm2835_sdhci";
-       host->ioaddr = (void *)(unsigned long)regbase;
+       host->name = dev->name;
+       host->ioaddr = (void *)base;
        host->quirks = SDHCI_QUIRK_BROKEN_VOLTAGE | SDHCI_QUIRK_BROKEN_R1B |
                SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_NO_HISPD_BIT;
        host->max_clk = emmc_freq;
        host->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
        host->ops = &bcm2835_ops;
 
-       add_sdhci(host, 0, MIN_FREQ);
+       ret = sdhci_setup_cfg(&plat->cfg, host, emmc_freq, MIN_FREQ);
+       if (ret) {
+               debug("%s: Failed to setup SDHCI (err=%d)\n", __func__, ret);
+               return ret;
+       }
+
+       upriv->mmc = &plat->mmc;
+       host->mmc = &plat->mmc;
+       host->mmc->priv = host;
 
-       return 0;
+       return sdhci_probe(dev);
 }
+
+static const struct udevice_id bcm2835_sdhci_match[] = {
+       { .compatible = "brcm,bcm2835-sdhci" },
+       { /* sentinel */ }
+};
+
+U_BOOT_DRIVER(sdhci_cdns) = {
+       .name = "sdhci-bcm2835",
+       .id = UCLASS_MMC,
+       .of_match = bcm2835_sdhci_match,
+       .bind = bcm2835_sdhci_bind,
+       .probe = bcm2835_sdhci_probe,
+       .priv_auto_alloc_size = sizeof(struct bcm2835_sdhci_host),
+       .platdata_auto_alloc_size = sizeof(struct bcm2835_sdhci_plat),
+       .ops = &sdhci_ops,
+};
index 9edb668e1499841dd96a425498cec8d7542cdfd0..dd784290bc6ae27fc176ca4ef075c3a3f61b1f48 100644 (file)
@@ -347,7 +347,7 @@ static int dmmc_init(struct mmc *mmc)
        return 0;
 }
 
-/* Set buswidth or clock as indicated by the GENERIC_MMC framework */
+/* Set buswidth or clock as indicated by the MMC framework */
 static int dmmc_set_ios(struct mmc *mmc)
 {
        struct davinci_mmc *host = mmc->priv;
index 83dda09c1feb8611341aebbe60f0f7e997742b0d..0b21ec6efcf3d15e92c1c238b5f1f645d3169815 100644 (file)
@@ -56,9 +56,8 @@ DECLARE_GLOBAL_DATA_PTR;
 #define SYSCTL_SRC     (1 << 25)
 #define SYSCTL_SRD     (1 << 26)
 
-struct omap_hsmmc_plat {
-       struct mmc_config cfg;
-       struct mmc mmc;
+struct omap2_mmc_platform_config {
+       u32 reg_offset;
 };
 
 struct omap_hsmmc_data {
@@ -327,11 +326,17 @@ static void mmc_reset_controller_fsm(struct hsmmc *mmc_base, u32 bit)
                }
        }
 }
-
+#ifndef CONFIG_DM_MMC
 static int omap_hsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
                        struct mmc_data *data)
 {
        struct omap_hsmmc_data *priv = omap_hsmmc_get_data(mmc);
+#else
+static int omap_hsmmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
+                       struct mmc_data *data)
+{
+       struct omap_hsmmc_data *priv = dev_get_priv(dev);
+#endif
        struct hsmmc *mmc_base;
        unsigned int flags, mmc_stat;
        ulong start;
@@ -559,9 +564,17 @@ static int mmc_write_data(struct hsmmc *mmc_base, const char *buf,
        return 0;
 }
 
+#ifndef CONFIG_DM_MMC
 static int omap_hsmmc_set_ios(struct mmc *mmc)
 {
        struct omap_hsmmc_data *priv = omap_hsmmc_get_data(mmc);
+#else
+static int omap_hsmmc_set_ios(struct udevice *dev)
+{
+       struct omap_hsmmc_data *priv = dev_get_priv(dev);
+       struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
+       struct mmc *mmc = upriv->mmc;
+#endif
        struct hsmmc *mmc_base;
        unsigned int dsor = 0;
        ulong start;
@@ -618,9 +631,9 @@ static int omap_hsmmc_set_ios(struct mmc *mmc)
 
 #ifdef OMAP_HSMMC_USE_GPIO
 #ifdef CONFIG_DM_MMC
-static int omap_hsmmc_getcd(struct mmc *mmc)
+static int omap_hsmmc_getcd(struct udevice *dev)
 {
-       struct omap_hsmmc_data *priv = omap_hsmmc_get_data(mmc);
+       struct omap_hsmmc_data *priv = dev_get_priv(dev);
        int value;
 
        value = dm_gpio_get_value(&priv->cd_gpio);
@@ -633,9 +646,9 @@ static int omap_hsmmc_getcd(struct mmc *mmc)
        return value;
 }
 
-static int omap_hsmmc_getwp(struct mmc *mmc)
+static int omap_hsmmc_getwp(struct udevice *dev)
 {
-       struct omap_hsmmc_data *priv = omap_hsmmc_get_data(mmc);
+       struct omap_hsmmc_data *priv = dev_get_priv(dev);
        int value;
 
        value = dm_gpio_get_value(&priv->wp_gpio);
@@ -675,6 +688,16 @@ static int omap_hsmmc_getwp(struct mmc *mmc)
 #endif
 #endif
 
+#ifdef CONFIG_DM_MMC
+static const struct dm_mmc_ops omap_hsmmc_ops = {
+       .send_cmd       = omap_hsmmc_send_cmd,
+       .set_ios        = omap_hsmmc_set_ios,
+#ifdef OMAP_HSMMC_USE_GPIO
+       .get_cd         = omap_hsmmc_getcd,
+       .get_wp         = omap_hsmmc_getwp,
+#endif
+};
+#else
 static const struct mmc_ops omap_hsmmc_ops = {
        .send_cmd       = omap_hsmmc_send_cmd,
        .set_ios        = omap_hsmmc_set_ios,
@@ -684,6 +707,7 @@ static const struct mmc_ops omap_hsmmc_ops = {
        .getwp          = omap_hsmmc_getwp,
 #endif
 };
+#endif
 
 #ifndef CONFIG_DM_MMC
 int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
@@ -773,17 +797,19 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
        return 0;
 }
 #else
+#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
 static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev)
 {
-       struct omap_hsmmc_data *priv = dev_get_priv(dev);
        struct omap_hsmmc_plat *plat = dev_get_platdata(dev);
        struct mmc_config *cfg = &plat->cfg;
+       struct omap2_mmc_platform_config *data =
+               (struct omap2_mmc_platform_config *)dev_get_driver_data(dev);
        const void *fdt = gd->fdt_blob;
        int node = dev_of_offset(dev);
        int val;
 
-       priv->base_addr = map_physmem(dev_get_addr(dev), sizeof(struct hsmmc *),
-                                     MAP_NOCACHE);
+       plat->base_addr = map_physmem(dev_get_addr(dev), sizeof(struct hsmmc *),
+                                     MAP_NOCACHE) + data->reg_offset;
 
        cfg->host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS;
        val = fdtdec_get_int(fdt, node, "bus-width", -1);
@@ -809,11 +835,12 @@ static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev)
        cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
 
 #ifdef OMAP_HSMMC_USE_GPIO
-       priv->cd_inverted = fdtdec_get_bool(fdt, node, "cd-inverted");
+       plat->cd_inverted = fdtdec_get_bool(fdt, node, "cd-inverted");
 #endif
 
        return 0;
 }
+#endif
 
 #ifdef CONFIG_BLK
 
@@ -833,7 +860,10 @@ static int omap_hsmmc_probe(struct udevice *dev)
        struct mmc *mmc;
 
        cfg->name = "OMAP SD/MMC";
-       cfg->ops = &omap_hsmmc_ops;
+       priv->base_addr = plat->base_addr;
+#ifdef OMAP_HSMMC_USE_GPIO
+       priv->cd_inverted = plat->cd_inverted;
+#endif
 
 #ifdef CONFIG_BLK
        mmc = &plat->mmc;
@@ -843,7 +873,7 @@ static int omap_hsmmc_probe(struct udevice *dev)
                return -1;
 #endif
 
-#ifdef OMAP_HSMMC_USE_GPIO
+#if defined(OMAP_HSMMC_USE_GPIO) && CONFIG_IS_ENABLED(OF_CONTROL)
        gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio, GPIOD_IS_IN);
        gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio, GPIOD_IS_IN);
 #endif
@@ -851,26 +881,53 @@ static int omap_hsmmc_probe(struct udevice *dev)
        mmc->dev = dev;
        upriv->mmc = mmc;
 
-       return 0;
+       return omap_hsmmc_init_setup(mmc);
 }
 
+#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
+static const struct omap2_mmc_platform_config omap3_mmc_pdata = {
+       .reg_offset = 0,
+};
+
+static const struct omap2_mmc_platform_config am33xx_mmc_pdata = {
+       .reg_offset = 0x100,
+};
+
+static const struct omap2_mmc_platform_config omap4_mmc_pdata = {
+       .reg_offset = 0x100,
+};
+
 static const struct udevice_id omap_hsmmc_ids[] = {
-       { .compatible = "ti,omap3-hsmmc" },
-       { .compatible = "ti,omap4-hsmmc" },
-       { .compatible = "ti,am33xx-hsmmc" },
+       {
+                       .compatible = "ti,omap3-hsmmc",
+                       .data = (ulong)&omap3_mmc_pdata
+       },
+       {
+                       .compatible = "ti,omap4-hsmmc",
+                       .data = (ulong)&omap4_mmc_pdata
+       },
+       {
+                       .compatible = "ti,am33xx-hsmmc",
+                       .data = (ulong)&am33xx_mmc_pdata
+       },
        { }
 };
+#endif
 
 U_BOOT_DRIVER(omap_hsmmc) = {
        .name   = "omap_hsmmc",
        .id     = UCLASS_MMC,
+#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
        .of_match = omap_hsmmc_ids,
        .ofdata_to_platdata = omap_hsmmc_ofdata_to_platdata,
+       .platdata_auto_alloc_size = sizeof(struct omap_hsmmc_plat),
+#endif
 #ifdef CONFIG_BLK
        .bind = omap_hsmmc_bind,
 #endif
+       .ops = &omap_hsmmc_ops,
        .probe  = omap_hsmmc_probe,
        .priv_auto_alloc_size = sizeof(struct omap_hsmmc_data),
-       .platdata_auto_alloc_size = sizeof(struct omap_hsmmc_plat),
+       .flags  = DM_FLAG_PRE_RELOC,
 };
 #endif
index e39b476834e650d187cfa25278ac48e7cfe87232..6db89779ba3c1fada496030f533e533bc9a24262 100644 (file)
@@ -6,37 +6,71 @@
  */
 
 #include <common.h>
+#include <dm.h>
 #include <errno.h>
 #include <malloc.h>
+#include <mapmem.h>
 #include <sdhci.h>
 #include <asm/pci.h>
 
-int pci_mmc_init(const char *name, struct pci_device_id *mmc_supported)
+struct pci_mmc_plat {
+       struct mmc_config cfg;
+       struct mmc mmc;
+};
+
+struct pci_mmc_priv {
+       struct sdhci_host host;
+       void *base;
+};
+
+static int pci_mmc_probe(struct udevice *dev)
 {
-       struct sdhci_host *mmc_host;
-       u32 iobase;
+       struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
+       struct pci_mmc_plat *plat = dev_get_platdata(dev);
+       struct pci_mmc_priv *priv = dev_get_priv(dev);
+       struct sdhci_host *host = &priv->host;
+       u32 ioaddr;
        int ret;
-       int i;
-
-       for (i = 0; ; i++) {
-               struct udevice *dev;
-
-               ret = pci_find_device_id(mmc_supported, i, &dev);
-               if (ret)
-                       return ret;
-               mmc_host = malloc(sizeof(struct sdhci_host));
-               if (!mmc_host)
-                       return -ENOMEM;
-
-               mmc_host->name = name;
-               dm_pci_read_config32(dev, PCI_BASE_ADDRESS_0, &iobase);
-               mmc_host->ioaddr = (void *)(ulong)iobase;
-               mmc_host->quirks = 0;
-               mmc_host->max_clk = 0;
-               ret = add_sdhci(mmc_host, 0, 0);
-               if (ret)
-                       return ret;
-       }
-
-       return 0;
+
+       dm_pci_read_config32(dev, PCI_BASE_ADDRESS_0, &ioaddr);
+       host->ioaddr = map_sysmem(ioaddr, 0);
+       host->name = dev->name;
+       ret = sdhci_setup_cfg(&plat->cfg, host, 0, 0);
+       if (ret)
+               return ret;
+       host->mmc = &plat->mmc;
+       host->mmc->priv = &priv->host;
+       host->mmc->dev = dev;
+       upriv->mmc = host->mmc;
+
+       return sdhci_probe(dev);
 }
+
+static int pci_mmc_bind(struct udevice *dev)
+{
+       struct pci_mmc_plat *plat = dev_get_platdata(dev);
+
+       return sdhci_bind(dev, &plat->mmc, &plat->cfg);
+}
+
+U_BOOT_DRIVER(pci_mmc) = {
+       .name   = "pci_mmc",
+       .id     = UCLASS_MMC,
+       .bind   = pci_mmc_bind,
+       .probe  = pci_mmc_probe,
+       .ops    = &sdhci_ops,
+       .priv_auto_alloc_size = sizeof(struct pci_mmc_priv),
+       .platdata_auto_alloc_size = sizeof(struct pci_mmc_plat),
+};
+
+static struct pci_device_id mmc_supported[] = {
+       { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BYT_SDIO) },
+       { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BYT_SD) },
+       { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BYT_EMMC2) },
+       { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QRK_SDIO) },
+       { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TCF_SDIO_0) },
+       { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TCF_SDIO_1) },
+       {},
+};
+
+U_BOOT_PCI_DEVICE(pci_mmc, mmc_supported);
index c36eda05d20b139b71caaca95430513f91f66212..2885ef2497041d644976efaca055def4cbdeabba 100644 (file)
@@ -44,7 +44,7 @@ static uint rockchip_dwmmc_get_mmc_clk(struct dwmci_host *host, uint freq)
 
        ret = clk_set_rate(&priv->clk, freq);
        if (ret < 0) {
-               debug("%s: err=%d\n", __func__, ret);
+               printf("%s: err=%d\n", __func__, ret);
                return ret;
        }
 
@@ -76,9 +76,25 @@ static int rockchip_dwmmc_ofdata_to_platdata(struct udevice *dev)
                return -EINVAL;
        priv->fifo_mode = fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
                                          "fifo-mode");
+
+       /*
+        * 'clock-freq-min-max' is deprecated
+        * (see https://github.com/torvalds/linux/commit/b023030f10573de738bbe8df63d43acab64c9f7b)
+        */
        if (fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(dev),
-                                "clock-freq-min-max", priv->minmax, 2))
-               return -EINVAL;
+                                "clock-freq-min-max", priv->minmax, 2)) {
+               int val = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
+                                         "max-frequency", -EINVAL);
+
+               if (val < 0)
+                       return val;
+
+               priv->minmax[0] = 400000;  /* 400 kHz */
+               priv->minmax[1] = val;
+       } else {
+               debug("%s: 'clock-freq-min-max' property was deprecated.\n",
+                     __func__);
+       }
 #endif
        return 0;
 }
@@ -109,7 +125,7 @@ static int rockchip_dwmmc_probe(struct udevice *dev)
        if (ret < 0)
                return ret;
 #else
-       ret = clk_get_by_index(dev, 0, &priv->clk);
+       ret = clk_get_by_name(dev, "ciu", &priv->clk);
        if (ret < 0)
                return ret;
 #endif
index 2253bbc51837051dbc70b43944f70078cf5497b9..dc86d108a69839bba0361cdff27b4b1e953e1eba 100644 (file)
@@ -7,8 +7,10 @@
 
 #include <common.h>
 #include <linux/io.h>
+#include <linux/iopoll.h>
 #include <linux/sizes.h>
 #include <dm/device.h>
+#include <libfdt.h>
 #include <mmc.h>
 #include <sdhci.h>
 
@@ -17,7 +19,7 @@
 #define   SDHCI_CDNS_HRS04_ACK                 BIT(26)
 #define   SDHCI_CDNS_HRS04_RD                  BIT(25)
 #define   SDHCI_CDNS_HRS04_WR                  BIT(24)
-#define   SDHCI_CDNS_HRS04_RDATA_SHIFT         12
+#define   SDHCI_CDNS_HRS04_RDATA_SHIFT         16
 #define   SDHCI_CDNS_HRS04_WDATA_SHIFT         8
 #define   SDHCI_CDNS_HRS04_ADDR_SHIFT          0
 
@@ -34,6 +36,9 @@
 #define SDHCI_CDNS_PHY_DLY_EMMC_LEGACY 0x06
 #define SDHCI_CDNS_PHY_DLY_EMMC_SDR    0x07
 #define SDHCI_CDNS_PHY_DLY_EMMC_DDR    0x08
+#define SDHCI_CDNS_PHY_DLY_SDCLK       0x0b
+#define SDHCI_CDNS_PHY_DLY_HSMMC       0x0c
+#define SDHCI_CDNS_PHY_DLY_STROBE      0x0d
 
 struct sdhci_cdns_plat {
        struct mmc_config cfg;
@@ -41,11 +46,31 @@ struct sdhci_cdns_plat {
        void __iomem *hrs_addr;
 };
 
-static void sdhci_cdns_write_phy_reg(struct sdhci_cdns_plat *plat,
-                                    u8 addr, u8 data)
+struct sdhci_cdns_phy_cfg {
+       const char *property;
+       u8 addr;
+};
+
+static const struct sdhci_cdns_phy_cfg sdhci_cdns_phy_cfgs[] = {
+       { "cdns,phy-input-delay-sd-highspeed", SDHCI_CDNS_PHY_DLY_SD_HS, },
+       { "cdns,phy-input-delay-legacy", SDHCI_CDNS_PHY_DLY_SD_DEFAULT, },
+       { "cdns,phy-input-delay-sd-uhs-sdr12", SDHCI_CDNS_PHY_DLY_UHS_SDR12, },
+       { "cdns,phy-input-delay-sd-uhs-sdr25", SDHCI_CDNS_PHY_DLY_UHS_SDR25, },
+       { "cdns,phy-input-delay-sd-uhs-sdr50", SDHCI_CDNS_PHY_DLY_UHS_SDR50, },
+       { "cdns,phy-input-delay-sd-uhs-ddr50", SDHCI_CDNS_PHY_DLY_UHS_DDR50, },
+       { "cdns,phy-input-delay-mmc-highspeed", SDHCI_CDNS_PHY_DLY_EMMC_SDR, },
+       { "cdns,phy-input-delay-mmc-ddr", SDHCI_CDNS_PHY_DLY_EMMC_DDR, },
+       { "cdns,phy-dll-delay-sdclk", SDHCI_CDNS_PHY_DLY_SDCLK, },
+       { "cdns,phy-dll-delay-sdclk-hsmmc", SDHCI_CDNS_PHY_DLY_HSMMC, },
+       { "cdns,phy-dll-delay-strobe", SDHCI_CDNS_PHY_DLY_STROBE, },
+};
+
+static int sdhci_cdns_write_phy_reg(struct sdhci_cdns_plat *plat,
+                                   u8 addr, u8 data)
 {
        void __iomem *reg = plat->hrs_addr + SDHCI_CDNS_HRS04;
        u32 tmp;
+       int ret;
 
        tmp = (data << SDHCI_CDNS_HRS04_WDATA_SHIFT) |
              (addr << SDHCI_CDNS_HRS04_ADDR_SHIFT);
@@ -54,17 +79,36 @@ static void sdhci_cdns_write_phy_reg(struct sdhci_cdns_plat *plat,
        tmp |= SDHCI_CDNS_HRS04_WR;
        writel(tmp, reg);
 
+       ret = readl_poll_timeout(reg, tmp, tmp & SDHCI_CDNS_HRS04_ACK, 10);
+       if (ret)
+               return ret;
+
        tmp &= ~SDHCI_CDNS_HRS04_WR;
        writel(tmp, reg);
+
+       return 0;
 }
 
-static void sdhci_cdns_phy_init(struct sdhci_cdns_plat *plat)
+static int sdhci_cdns_phy_init(struct sdhci_cdns_plat *plat,
+                               const void *fdt, int nodeoffset)
 {
-       sdhci_cdns_write_phy_reg(plat, SDHCI_CDNS_PHY_DLY_SD_HS, 4);
-       sdhci_cdns_write_phy_reg(plat, SDHCI_CDNS_PHY_DLY_SD_DEFAULT, 4);
-       sdhci_cdns_write_phy_reg(plat, SDHCI_CDNS_PHY_DLY_EMMC_LEGACY, 9);
-       sdhci_cdns_write_phy_reg(plat, SDHCI_CDNS_PHY_DLY_EMMC_SDR, 2);
-       sdhci_cdns_write_phy_reg(plat, SDHCI_CDNS_PHY_DLY_EMMC_DDR, 3);
+       const u32 *prop;
+       int ret, i;
+
+       for (i = 0; i < ARRAY_SIZE(sdhci_cdns_phy_cfgs); i++) {
+               prop = fdt_getprop(fdt, nodeoffset,
+                                  sdhci_cdns_phy_cfgs[i].property, NULL);
+               if (!prop)
+                       continue;
+
+               ret = sdhci_cdns_write_phy_reg(plat,
+                                              sdhci_cdns_phy_cfgs[i].addr,
+                                              fdt32_to_cpu(*prop));
+               if (ret)
+                       return ret;
+       }
+
+       return 0;
 }
 
 static int sdhci_cdns_bind(struct udevice *dev)
@@ -76,6 +120,7 @@ static int sdhci_cdns_bind(struct udevice *dev)
 
 static int sdhci_cdns_probe(struct udevice *dev)
 {
+       DECLARE_GLOBAL_DATA_PTR;
        struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
        struct sdhci_cdns_plat *plat = dev_get_platdata(dev);
        struct sdhci_host *host = dev_get_priv(dev);
@@ -94,7 +139,9 @@ static int sdhci_cdns_probe(struct udevice *dev)
        host->ioaddr = plat->hrs_addr + SDHCI_CDNS_SRS_BASE;
        host->quirks |= SDHCI_QUIRK_WAIT_SEND_CMD;
 
-       sdhci_cdns_phy_init(plat);
+       ret = sdhci_cdns_phy_init(plat, gd->fdt_blob, dev->of_offset);
+       if (ret)
+               return ret;
 
        ret = sdhci_setup_cfg(&plat->cfg, host, 0, 0);
        if (ret)
index b745977b3fba17dcd2299dfde73c47688b3835ae..161a6b1399c98456c4504042541a2d36213fe5d5 100644 (file)
@@ -332,8 +332,7 @@ static int sdhci_set_clock(struct mmc *mmc, unsigned int clock)
                 */
                if (host->clk_mul) {
                        for (div = 1; div <= 1024; div++) {
-                               if ((host->max_clk * host->clk_mul / div)
-                                       <= clock)
+                               if ((host->max_clk / div) <= clock)
                                        break;
                        }
 
@@ -547,6 +546,14 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
 #ifndef CONFIG_DM_MMC_OPS
        cfg->ops = &sdhci_ops;
 #endif
+
+       /* Check whether the clock multiplier is supported or not */
+       if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
+               caps_1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
+               host->clk_mul = (caps_1 & SDHCI_CLOCK_MUL_MASK) >>
+                               SDHCI_CLOCK_MUL_SHIFT;
+       }
+
        if (host->max_clk == 0) {
                if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300)
                        host->max_clk = (caps & SDHCI_CLOCK_V3_BASE_MASK) >>
@@ -555,6 +562,8 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
                        host->max_clk = (caps & SDHCI_CLOCK_BASE_MASK) >>
                                SDHCI_CLOCK_BASE_SHIFT;
                host->max_clk *= 1000000;
+               if (host->clk_mul)
+                       host->max_clk *= host->clk_mul;
        }
        if (host->max_clk == 0) {
                printf("%s: Hardware doesn't specify base clock frequency\n",
@@ -590,11 +599,6 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
        if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
                if (!(caps & SDHCI_CAN_DO_8BIT))
                        cfg->host_caps &= ~MMC_MODE_8BIT;
-
-               /* Find out whether clock multiplier is supported */
-               caps_1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
-               host->clk_mul = (caps_1 & SDHCI_CLOCK_MUL_MASK) >>
-                               SDHCI_CLOCK_MUL_SHIFT;
        }
 
        if (host->host_caps)
index dfe8966b56b69b7b896b5cc51ae14bf80108ff7f..0042a7ba11df12a82c18a372d7c495deaf169b8a 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <malloc.h>
+#include <fdtdec.h>
 #include <nand.h>
 #include <linux/errno.h>
 #include <asm/io.h>
@@ -19,6 +20,8 @@
 
 #include "pxa3xx_nand.h"
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #define TIMEOUT_DRAIN_FIFO     5       /* in ms */
 #define        CHIP_DELAY_TIMEOUT      200
 #define NAND_STOP_DELAY                40
@@ -1510,8 +1513,6 @@ static int alloc_nand_resource(struct pxa3xx_nand_info *info)
                chip->cmdfunc           = nand_cmdfunc;
        }
 
-       info->mmio_base = (void __iomem *)MVEBU_NAND_BASE;
-
        /* Allocate a buffer to allow flash detection */
        info->buf_size = INIT_BUFFER_SIZE;
        info->data_buff = kmalloc(info->buf_size, GFP_KERNEL);
@@ -1533,17 +1534,62 @@ fail_disable_clk:
 static int pxa3xx_nand_probe_dt(struct pxa3xx_nand_info *info)
 {
        struct pxa3xx_nand_platform_data *pdata;
+       const void *blob = gd->fdt_blob;
+       int node = -1;
 
        pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
        if (!pdata)
                return -ENOMEM;
 
-       pdata->enable_arbiter = 1;
-       pdata->num_cs = 1;
+       /* Get address decoding nodes from the FDT blob */
+       do {
+               node = fdt_node_offset_by_compatible(blob, node,
+                                                    "marvell,mvebu-pxa3xx-nand");
+               if (node < 0)
+                       break;
+
+               /* Bypass disabeld nodes */
+               if (!fdtdec_get_is_enabled(blob, node))
+                       continue;
 
-       info->pdata = pdata;
+               /* Get the first enabled NAND controler base address */
+               info->mmio_base =
+                       (void __iomem *)fdtdec_get_addr_size_auto_noparent(
+                                       blob, node, "reg", 0, NULL, true);
 
-       return 0;
+               pdata->num_cs = fdtdec_get_int(blob, node, "num-cs", 1);
+               if (pdata->num_cs != 1) {
+                       error("pxa3xx driver supports single CS only\n");
+                       break;
+               }
+
+               if (fdtdec_get_bool(blob, node, "nand-enable-arbiter"))
+                       pdata->enable_arbiter = 1;
+
+               if (fdtdec_get_bool(blob, node, "nand-keep-config"))
+                       pdata->keep_config = 1;
+
+               /*
+                * ECC parameters.
+                * If these are not set, they will be selected according
+                * to the detected flash type.
+                */
+               /* ECC strength */
+               pdata->ecc_strength = fdtdec_get_int(blob, node,
+                                                    "nand-ecc-strength", 0);
+
+               /* ECC step size */
+               pdata->ecc_step_size = fdtdec_get_int(blob, node,
+                                                     "nand-ecc-step-size", 0);
+
+               info->pdata = pdata;
+
+               /* Currently support only a single NAND controller */
+               return 0;
+
+       } while (node >= 0);
+
+       return -EINVAL;
 }
 
 static int pxa3xx_nand_probe(struct pxa3xx_nand_info *info)
@@ -1603,8 +1649,8 @@ void board_nand_init(void)
        int ret;
 
        info = kzalloc(sizeof(*info) +
-                               sizeof(*host) * CONFIG_SYS_MAX_NAND_DEVICE,
-                       GFP_KERNEL);
+                      sizeof(*host) * CONFIG_SYS_MAX_NAND_DEVICE,
+                      GFP_KERNEL);
        if (!info)
                return;
 
index 0f350cba53e6e8157770ea1f4b69f1f706efc472..33d9fd6a57fda710ff3f21c21b8f566cf3f01971 100644 (file)
@@ -207,12 +207,6 @@ static int tx_threshold;
  * There are so many options that it would be difficult to document
  * each bit. We mostly use the default or recommended settings.
  */
-static const char i82557_config_cmd[] = {
-       22, 0x08, 0, 0, 0, 0, 0x32, 0x03, 1,    /* 1=Use MII  0=Use AUI */
-       0, 0x2E, 0, 0x60, 0,
-       0xf2, 0x48, 0, 0x40, 0xf2, 0x80,        /* 0x40=Force full-duplex */
-       0x3f, 0x05,
-};
 static const char i82558_config_cmd[] = {
        22, 0x08, 0, 1, 0, 0, 0x22, 0x03, 1,    /* 1=Use MII  0=Use AUI */
        0, 0x2E, 0, 0x60, 0x08, 0x88,
index 402e8668174c1c30a504442801c191771a7c5ff9..21a620c244c928ea954d04bf732dbfb44cf46309 100644 (file)
@@ -111,6 +111,9 @@ struct macb_device {
 #endif
        unsigned short          phy_addr;
        struct mii_dev          *bus;
+#ifdef CONFIG_PHYLIB
+       struct phy_device       *phydev;
+#endif
 
 #ifdef CONFIG_DM_ETH
 #ifdef CONFIG_CLK
@@ -478,9 +481,6 @@ static int macb_phy_init(struct macb_device *macb, const char *name)
 {
 #ifdef CONFIG_DM_ETH
        struct macb_device *macb = dev_get_priv(dev);
-#endif
-#ifdef CONFIG_PHYLIB
-       struct phy_device *phydev;
 #endif
        u32 ncfgr;
        u16 phy_id, status, adv, lpa;
@@ -503,19 +503,19 @@ static int macb_phy_init(struct macb_device *macb, const char *name)
 
 #ifdef CONFIG_PHYLIB
 #ifdef CONFIG_DM_ETH
-       phydev = phy_connect(macb->bus, macb->phy_addr, dev,
+       macb->phydev = phy_connect(macb->bus, macb->phy_addr, dev,
                             macb->phy_interface);
 #else
        /* need to consider other phy interface mode */
-       phydev = phy_connect(macb->bus, macb->phy_addr, &macb->netdev,
+       macb->phydev = phy_connect(macb->bus, macb->phy_addr, &macb->netdev,
                             PHY_INTERFACE_MODE_RGMII);
 #endif
-       if (!phydev) {
+       if (!macb->phydev) {
                printf("phy_connect failed\n");
                return -ENODEV;
        }
 
-       phy_config(phydev);
+       phy_config(macb->phydev);
 #endif
 
        status = macb_mdio_read(macb, MII_BMSR);
@@ -1035,6 +1035,7 @@ static int macb_eth_probe(struct udevice *dev)
        struct eth_pdata *pdata = dev_get_platdata(dev);
        struct macb_device *macb = dev_get_priv(dev);
        const char *phy_mode;
+       __maybe_unused int ret;
 
        phy_mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "phy-mode",
                               NULL);
@@ -1048,7 +1049,7 @@ static int macb_eth_probe(struct udevice *dev)
        macb->regs = (void *)pdata->iobase;
 
 #ifdef CONFIG_CLK
-       int ret = macb_enable_clk(dev);
+       ret = macb_enable_clk(dev);
        if (ret)
                return ret;
 #endif
@@ -1056,23 +1057,35 @@ static int macb_eth_probe(struct udevice *dev)
        _macb_eth_initialize(macb);
 
 #if defined(CONFIG_CMD_MII) || defined(CONFIG_PHYLIB)
-       int retval;
-       struct mii_dev *mdiodev = mdio_alloc();
-       if (!mdiodev)
+       macb->bus = mdio_alloc();
+       if (!macb->bus)
                return -ENOMEM;
-       strncpy(mdiodev->name, dev->name, MDIO_NAME_LEN);
-       mdiodev->read = macb_miiphy_read;
-       mdiodev->write = macb_miiphy_write;
+       strncpy(macb->bus->name, dev->name, MDIO_NAME_LEN);
+       macb->bus->read = macb_miiphy_read;
+       macb->bus->write = macb_miiphy_write;
 
-       retval = mdio_register(mdiodev);
-       if (retval < 0)
-               return retval;
+       ret = mdio_register(macb->bus);
+       if (ret < 0)
+               return ret;
        macb->bus = miiphy_get_dev_by_name(dev->name);
 #endif
 
        return 0;
 }
 
+static int macb_eth_remove(struct udevice *dev)
+{
+       struct macb_device *macb = dev_get_priv(dev);
+
+#ifdef CONFIG_PHYLIB
+       free(macb->phydev);
+#endif
+       mdio_unregister(macb->bus);
+       mdio_free(macb->bus);
+
+       return 0;
+}
+
 static int macb_eth_ofdata_to_platdata(struct udevice *dev)
 {
        struct eth_pdata *pdata = dev_get_platdata(dev);
@@ -1083,6 +1096,10 @@ static int macb_eth_ofdata_to_platdata(struct udevice *dev)
 
 static const struct udevice_id macb_eth_ids[] = {
        { .compatible = "cdns,macb" },
+       { .compatible = "cdns,at91sam9260-macb" },
+       { .compatible = "atmel,sama5d2-gem" },
+       { .compatible = "atmel,sama5d3-gem" },
+       { .compatible = "atmel,sama5d4-gem" },
        { }
 };
 
@@ -1092,6 +1109,7 @@ U_BOOT_DRIVER(eth_macb) = {
        .of_match = macb_eth_ids,
        .ofdata_to_platdata = macb_eth_ofdata_to_platdata,
        .probe  = macb_eth_probe,
+       .remove = macb_eth_remove,
        .ops    = &macb_eth_ops,
        .priv_auto_alloc_size = sizeof(struct macb_device),
        .platdata_auto_alloc_size = sizeof(struct eth_pdata),
index 8ffe6c84d438d396612feec0ce4be5bb995a5544..08adb68aa5322a5a302b03d5f631100afe94054f 100644 (file)
@@ -2618,6 +2618,13 @@ static void mvpp2_bm_pool_bufsize_set(struct mvpp2 *priv,
 static void mvpp2_bm_bufs_free(struct udevice *dev, struct mvpp2 *priv,
                               struct mvpp2_bm_pool *bm_pool)
 {
+       int i;
+
+       for (i = 0; i < bm_pool->buf_num; i++) {
+               /* Allocate buffer back from the buffer manager */
+               mvpp2_read(priv, MVPP2_BM_PHY_ALLOC_REG(bm_pool->id));
+       }
+
        bm_pool->buf_num = 0;
 }
 
@@ -5501,6 +5508,21 @@ static int mvpp2_probe(struct udevice *dev)
        return 0;
 }
 
+/*
+ * Empty BM pool and stop its activity before the OS is started
+ */
+static int mvpp2_remove(struct udevice *dev)
+{
+       struct mvpp2_port *port = dev_get_priv(dev);
+       struct mvpp2 *priv = port->priv;
+       int i;
+
+       for (i = 0; i < MVPP2_BM_POOLS_NUM; i++)
+               mvpp2_bm_pool_destroy(dev, priv, &priv->bm_pools[i]);
+
+       return 0;
+}
+
 static const struct eth_ops mvpp2_ops = {
        .start          = mvpp2_start,
        .send           = mvpp2_send,
@@ -5512,9 +5534,11 @@ static struct driver mvpp2_driver = {
        .name   = "mvpp2",
        .id     = UCLASS_ETH,
        .probe  = mvpp2_probe,
+       .remove = mvpp2_remove,
        .ops    = &mvpp2_ops,
        .priv_auto_alloc_size = sizeof(struct mvpp2_port),
        .platdata_auto_alloc_size = sizeof(struct eth_pdata),
+       .flags  = DM_FLAG_ACTIVE_DMA,
 };
 
 /*
index a2fd1686fc3b8366aec9ddf7673fee4ee4b9f182..3d2f6b98ad0e3212f3a181bd15752446ba647819 100644 (file)
@@ -655,8 +655,10 @@ static int mv88e61xx_read_port_config(struct phy_device *phydev, u8 port)
                do {
                        val = mv88e61xx_port_read(phydev, port,
                                                  PORT_REG_STATUS);
-                       if (val < 0)
+                       if (val < 0) {
+                               res = -EIO;
                                goto unforce;
+                       }
                        if (val & PORT_REG_STATUS_LINK)
                                break;
                } while (--timeout);
index 47cdb858c7731211c0114cc6e5fca70cbc8dd592..d05ae9ea0cfdefd2c4346ceea137919a9b935abe 100644 (file)
@@ -166,7 +166,6 @@ static int mode = 8;
 
 /* function declaration -- */
 static int uli526x_start_xmit(struct eth_device *dev, void *packet, int length);
-static const struct ethtool_ops netdev_ethtool_ops;
 static u16 read_srom_word(long, int);
 static void uli526x_descriptor_init(struct uli526x_board_info *, unsigned long);
 static void allocate_rx_buffer(struct uli526x_board_info *);
index 40f59c0c4c439a3a97a982590b64fcfc9c57e52d..504d7e3bb134d1422e901cda320c4a1a3b2df093 100644 (file)
@@ -660,6 +660,7 @@ static int pci_find_and_bind_driver(struct udevice *parent,
        ret = device_bind_driver(parent, drv, str, devp);
        if (ret) {
                debug("%s: Failed to bind generic driver: %d\n", __func__, ret);
+               free(str);
                return ret;
        }
        debug("%s: No match found: bound generic driver instead\n", __func__);
index 57204c4f3f1ca098b19d60767320aa9542f081a1..75fb0933371583da12cf3e9f03154f3326d7d7ac 100644 (file)
 #include <video_fb.h>
 #include <linux/screen_info.h>
 
+#ifdef CONFIG_X86
+#include <asm/acpi_s3.h>
+DECLARE_GLOBAL_DATA_PTR;
+#endif
+
 __weak bool board_should_run_oprom(struct udevice *dev)
 {
+#if defined(CONFIG_X86) && defined(CONFIG_HAVE_ACPI_RESUME)
+       if (gd->arch.prev_sleep_state == ACPI_S3) {
+               if (IS_ENABLED(CONFIG_S3_VGA_ROM_RUN))
+                       return true;
+               else
+                       return false;
+       }
+#endif
+
        return true;
 }
 
index d4776a9c81e693a9eafbdef045e7ddc8aa669a5e..05a06604e68e63a0932118291d97086c886d7c66 100644 (file)
@@ -487,13 +487,13 @@ static int pcie_dw_mvebu_probe(struct udevice *dev)
        /* Don't register host if link is down */
        if (!pcie_dw_mvebu_pcie_link_up(pcie->ctrl_base, LINK_SPEED_GEN_3)) {
                printf("PCIE-%d: Link down\n", dev->seq);
-               return -ENODEV;
+       } else {
+               printf("PCIE-%d: Link up (Gen%d-x%d, Bus%d)\n", dev->seq,
+                      pcie_dw_get_link_speed(pcie->ctrl_base),
+                      pcie_dw_get_link_width(pcie->ctrl_base),
+                      hose->first_busno);
        }
 
-       printf("PCIE-%d: Link up (Gen%d-x%d, Bus%d)\n", dev->seq,
-              pcie_dw_get_link_speed(pcie->ctrl_base),
-              pcie_dw_get_link_width(pcie->ctrl_base), hose->first_busno);
-
        pcie_dw_regions_setup(pcie);
 
        /* Set the CLASS_REV of RC CFG header to PCI_CLASS_BRIDGE_PCI */
diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
new file mode 100644 (file)
index 0000000..a91a694
--- /dev/null
@@ -0,0 +1,62 @@
+
+menu "PHY Subsystem"
+
+config PHY
+       bool "PHY Core"
+       depends on DM
+       help
+         PHY support.
+
+         This framework is designed to provide a generic interface for PHY
+         devices. PHY devices are dedicated hardware that handle the physical
+         layer of the protocols in the OSI model.
+         PHYs are commonly used for high speed interfaces such as Serial-ATA
+         or PCI express.
+         The API provides functions to initialize/deinitialize the
+         PHY, power on/off the PHY, and reset the PHY. It's meant to be as
+         compatible as possible with the equivalent framework found in the
+         linux kernel.
+
+config SPL_PHY
+       bool "PHY Core in SPL"
+       depends on DM
+       help
+         PHY support in SPL.
+
+         This framework is designed to provide a generic interface for PHY
+         devices. PHY devices are dedicated hardware that handle the physical
+         layer of the protocols (https://en.wikipedia.org/wiki/OSI_model).
+         PHYs are commonly used for high speed interfaces such as Serial-ATA
+         or PCI express.
+         The API provides functions to initialize/deinitialize the
+         PHY, power on/off the PHY, and reset the PHY. It's meant to be as
+         compatible as possible with the equivalent framework found in the
+         linux kernel.
+
+config PHY_SANDBOX
+       bool "Sandbox PHY support"
+       depends on SANDBOX
+       depends on PHY
+       help
+         This select a dummy sandbox PHY driver. It used only to implement
+         the unit tests for the phy framework
+
+config PIPE3_PHY
+       bool "Support omap's PIPE3 PHY"
+       depends on PHY && ARCH_OMAP2
+       help
+         Support for the omap PIPE3 phy for sata
+
+         This PHY is found on omap devices supporting SATA such as dra7, am57x
+         and omap5
+
+config SPL_PIPE3_PHY
+       bool "Support omap's PIPE3 PHY in SPL"
+       depends on SPL_PHY && ARCH_OMAP2
+       help
+         Support for the omap PIPE3 phy for sata in SPL
+
+         This PHY is found on omap devices supporting SATA such as dra7, am57x
+         and omap5
+
+endmenu
diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile
new file mode 100644 (file)
index 0000000..6ce96d2
--- /dev/null
@@ -0,0 +1,10 @@
+#
+# Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
+# Written by Jean-Jacques Hiblot  <jjhiblot@ti.com>
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+obj-$(CONFIG_$(SPL_)PHY) += phy-uclass.o
+obj-$(CONFIG_PHY_SANDBOX) += sandbox-phy.o
+obj-$(CONFIG_$(SPL_)PIPE3_PHY) += ti-pipe3-phy.o
index 0a156925794b38039cde62955b8d9d695dd1e0ee..c9b94a4c5e3c02fcd28055962ca308302aec1dfd 100644 (file)
@@ -86,6 +86,7 @@ struct comphy_map {
        u32 speed;
        u32 invert;
        bool clk_src;
+       bool end_point;
 };
 
 struct chip_serdes_phy_config {
@@ -96,7 +97,7 @@ struct chip_serdes_phy_config {
        void __iomem *hpipe3_base_addr;
        u32 comphy_lanes_count;
        u32 comphy_mux_bitcount;
-       u32 comphy_index;
+       u32 cp_index;
 };
 
 /* Register helper functions */
index caa1928f07dccd6a5113486766cf01581f44e873..596921b6c3304415b835c472817e792d7d94fd9a 100644 (file)
@@ -37,7 +37,7 @@ static char *get_type_string(u32 type)
                                "SGMII1", "SGMII2", "SGMII3", "QSGMII",
                                "USB3_HOST0", "USB3_HOST1", "USB3_DEVICE",
                                "XAUI0", "XAUI1", "XAUI2", "XAUI3",
-                               "RXAUI0", "RXAUI1", "KR"};
+                               "RXAUI0", "RXAUI1", "SFI", "IGNORE"};
 
        if (type < 0 || type > PHY_TYPE_MAX)
                return "invalid";
@@ -90,9 +90,6 @@ void comphy_print(struct chip_serdes_phy_config *chip_cfg,
 
        for (lane = 0; lane < chip_cfg->comphy_lanes_count;
             lane++, comphy_map_data++) {
-               if (comphy_map_data->type == PHY_TYPE_UNCONNECTED)
-                       continue;
-
                if (comphy_map_data->speed == PHY_SPEED_INVALID) {
                        printf("Comphy-%d: %-13s\n", lane,
                               get_type_string(comphy_map_data->type));
@@ -113,6 +110,7 @@ static int comphy_probe(struct udevice *dev)
        int subnode;
        int lane;
        int last_idx = 0;
+       static int current_idx;
 
        /* Save base addresses for later use */
        chip_cfg->comphy_base_addr = (void *)dev_get_addr_index(dev, 0);
@@ -166,6 +164,8 @@ static int comphy_probe(struct udevice *dev)
                        blob, subnode, "phy-invert", PHY_POLARITY_NO_INVERT);
                comphy_map_data[lane].clk_src = fdtdec_get_bool(blob, subnode,
                                                                "clk-src");
+               comphy_map_data[lane].end_point = fdtdec_get_bool(blob, subnode,
+                                                                 "end_point");
                if (comphy_map_data[lane].type == PHY_TYPE_INVALID) {
                        printf("no phy type for lane %d, setting lane as unconnected\n",
                               lane + 1);
@@ -174,13 +174,13 @@ static int comphy_probe(struct udevice *dev)
                lane++;
        }
 
-       /* Save comphy index for MultiCP devices (A8K) */
-       chip_cfg->comphy_index = dev->seq;
+       /* Save CP index for MultiCP devices (A8K) */
+       chip_cfg->cp_index = current_idx++;
        /* PHY power UP sequence */
        chip_cfg->ptr_comphy_chip_init(chip_cfg, comphy_map_data);
        /* PHY print SerDes status */
        if (of_machine_is_compatible("marvell,armada8040"))
-               printf("Comphy chip #%d:\n", chip_cfg->comphy_index);
+               printf("Comphy chip #%d:\n", chip_cfg->cp_index);
        comphy_print(chip_cfg, comphy_map_data);
 
        /*
@@ -189,7 +189,7 @@ static int comphy_probe(struct udevice *dev)
        if (of_machine_is_compatible("marvell,armada8040"))
                last_idx = 1;
 
-       if (chip_cfg->comphy_index == last_idx) {
+       if (chip_cfg->cp_index == last_idx) {
                /* Initialize dedicated PHYs (not muxed SerDes lanes) */
                comphy_dedicated_phys_init();
        }
index 25c067d23fa88aefd49d64f0e300c4940bf7d650..3ac405a9be6ee44c87cb8139d255cf084ca028f1 100644 (file)
@@ -34,26 +34,23 @@ struct utmi_phy_data {
  * PIPE selector include USB and PCIe options.
  * PHY selector include the Ethernet and SATA options, every Ethernet
  * option has different options, for example: serdes lane2 had option
- * Eth_port_0 that include (SGMII0, XAUI0, RXAUI0, KR)
+ * Eth_port_0 that include (SGMII0, RXAUI0, SFI)
  */
 struct comphy_mux_data cp110_comphy_phy_mux_data[] = {
-       {4, {{PHY_TYPE_UNCONNECTED, 0x0}, {PHY_TYPE_SGMII2, 0x1}, /* Lane 0 */
-            {PHY_TYPE_XAUI2, 0x1}, {PHY_TYPE_SATA1, 0x4} } },
-       {4, {{PHY_TYPE_UNCONNECTED, 0x0}, {PHY_TYPE_SGMII3, 0x1}, /* Lane 1 */
-            {PHY_TYPE_XAUI3, 0x1}, {PHY_TYPE_SATA0, 0x4} } },
+       {4, {{PHY_TYPE_UNCONNECTED, 0x0}, {PHY_TYPE_SGMII1, 0x1}, /* Lane 0 */
+            {PHY_TYPE_SATA1, 0x4} } },
+       {4, {{PHY_TYPE_UNCONNECTED, 0x0}, {PHY_TYPE_SGMII2, 0x1}, /* Lane 1 */
+            {PHY_TYPE_SATA0, 0x4} } },
        {6, {{PHY_TYPE_UNCONNECTED, 0x0}, {PHY_TYPE_SGMII0, 0x1}, /* Lane 2 */
-            {PHY_TYPE_XAUI0, 0x1}, {PHY_TYPE_RXAUI0, 0x1},
-            {PHY_TYPE_KR, 0x1}, {PHY_TYPE_SATA0, 0x4} } },
-       {8, {{PHY_TYPE_UNCONNECTED, 0x0}, {PHY_TYPE_SGMII0, 0x1}, /* Lane 3 */
-            {PHY_TYPE_XAUI0, 0x1}, {PHY_TYPE_RXAUI0, 0x1},
-            {PHY_TYPE_KR, 0x1}, {PHY_TYPE_XAUI1, 0x1},
-            {PHY_TYPE_RXAUI1, 0x1}, {PHY_TYPE_SATA1, 0x4} } },
+            {PHY_TYPE_RXAUI0, 0x1}, {PHY_TYPE_SFI, 0x1},
+            {PHY_TYPE_SATA0, 0x4} } },
+       {8, {{PHY_TYPE_UNCONNECTED, 0x0}, {PHY_TYPE_RXAUI1, 0x1}, /* Lane 3 */
+            {PHY_TYPE_SGMII1, 0x2}, {PHY_TYPE_SATA1, 0x4} } },
        {7, {{PHY_TYPE_UNCONNECTED, 0x0}, {PHY_TYPE_SGMII0, 0x2}, /* Lane 4 */
-            {PHY_TYPE_XAUI0, 0x1}, {PHY_TYPE_RXAUI0, 0x1}, {PHY_TYPE_KR, 0x1},
-            {PHY_TYPE_SGMII2, 0x1}, {PHY_TYPE_XAUI2, 0x1} } },
-       {6, {{PHY_TYPE_UNCONNECTED, 0x0}, {PHY_TYPE_XAUI1, 0x1}, /* Lane 5 */
-            {PHY_TYPE_RXAUI1, 0x1}, {PHY_TYPE_SGMII3, 0x1},
-            {PHY_TYPE_XAUI3, 0x1}, {PHY_TYPE_SATA1, 0x4} } },
+            {PHY_TYPE_RXAUI0, 0x2}, {PHY_TYPE_SFI, 0x2},
+            {PHY_TYPE_SGMII1, 0x1} } },
+       {6, {{PHY_TYPE_UNCONNECTED, 0x0}, {PHY_TYPE_SGMII2, 0x1}, /* Lane 5 */
+            {PHY_TYPE_RXAUI1, 0x2}, {PHY_TYPE_SATA1, 0x4} } },
 };
 
 struct comphy_mux_data cp110_comphy_pipe_mux_data[] = {
@@ -87,8 +84,8 @@ static u32 polling_with_timeout(void __iomem *addr, u32 val,
        return 0;
 }
 
-static int comphy_pcie_power_up(u32 lane, u32 pcie_width,
-                               bool clk_src, void __iomem *hpipe_base,
+static int comphy_pcie_power_up(u32 lane, u32 pcie_width, bool clk_src,
+                               bool is_end_point, void __iomem *hpipe_base,
                                void __iomem *comphy_base)
 {
        u32 mask, data, ret = 1;
@@ -109,6 +106,7 @@ static int comphy_pcie_power_up(u32 lane, u32 pcie_width,
         * and SerDes Lane 0 got PCIe ref-clock #0
         */
        debug("PCIe clock = %x\n", pcie_clk);
+       debug("PCIe RC    = %d\n", !is_end_point);
        debug("PCIe width = %d\n", pcie_width);
 
        /* enable PCIe by4 and by2 */
@@ -234,6 +232,8 @@ static int comphy_pcie_power_up(u32 lane, u32 pcie_width,
                mask |= HPIPE_MISC_REFCLK_SEL_MASK;
                data |= 0x1 << HPIPE_MISC_REFCLK_SEL_OFFSET;
        }
+       mask |= HPIPE_MISC_ICP_FORCE_MASK;
+       data |= 0x1 << HPIPE_MISC_ICP_FORCE_OFFSET;
        reg_set(hpipe_addr + HPIPE_MISC_REG, data, mask);
        if (pcie_clk) { /* output */
                /* Set reference frequcency select - 0x2 for 25MHz*/
@@ -269,6 +269,9 @@ static int comphy_pcie_power_up(u32 lane, u32 pcie_width,
        /* Set Maximal PHY Generation Setting(8Gbps) */
        mask = HPIPE_INTERFACE_GEN_MAX_MASK;
        data = 0x2 << HPIPE_INTERFACE_GEN_MAX_OFFSET;
+       /* Bypass frame detection and sync detection for RX DATA */
+       mask = HPIPE_INTERFACE_DET_BYPASS_MASK;
+       data = 0x1 << HPIPE_INTERFACE_DET_BYPASS_OFFSET;
        /* Set Link Train Mode (Tx training control pins are used) */
        mask |= HPIPE_INTERFACE_LINK_TRAIN_MASK;
        data |= 0x1 << HPIPE_INTERFACE_LINK_TRAIN_OFFSET;
@@ -353,21 +356,21 @@ static int comphy_pcie_power_up(u32 lane, u32 pcie_width,
        data = 0x3 << HPIPE_G3_DFE_RES_OFFSET;
        reg_set(hpipe_addr + HPIPE_G3_SETTING_4_REG, data, mask);
 
-       /* Force DFE resolution (use GEN table value) */
+       /* Use TX/RX training result for DFE */
        mask = HPIPE_DFE_RES_FORCE_MASK;
-       data = 0x1 << HPIPE_DFE_RES_FORCE_OFFSET;
+       data = 0x0 << HPIPE_DFE_RES_FORCE_OFFSET;
        reg_set(hpipe_addr + HPIPE_DFE_REG0,  data, mask);
 
        /* Configure initial and final coefficient value for receiver */
-       mask = HPIPE_G3_RX_SELMUPI_MASK;
-       data = 0x1 << HPIPE_G3_RX_SELMUPI_OFFSET;
+       mask = HPIPE_G3_SET_1_G3_RX_SELMUPI_MASK;
+       data = 0x1 << HPIPE_G3_SET_1_G3_RX_SELMUPI_OFFSET;
 
-       mask |= HPIPE_G3_RX_SELMUPF_MASK;
-       data |= 0x1 << HPIPE_G3_RX_SELMUPF_OFFSET;
+       mask |= HPIPE_G3_SET_1_G3_RX_SELMUPF_MASK;
+       data |= 0x1 << HPIPE_G3_SET_1_G3_RX_SELMUPF_OFFSET;
 
-       mask |= HPIPE_G3_SETTING_BIT_MASK;
-       data |= 0x0 << HPIPE_G3_SETTING_BIT_OFFSET;
-       reg_set(hpipe_addr + HPIPE_G3_SETTINGS_1_REG,  data, mask);
+       mask |= HPIPE_G3_SET_1_G3_SAMPLER_INPAIRX2_EN_MASK;
+       data |= 0x0 << HPIPE_G3_SET_1_G3_SAMPLER_INPAIRX2_EN_OFFSET;
+       reg_set(hpipe_addr + HPIPE_G3_SET_1_REG,  data, mask);
 
        /* Trigger sampler enable pulse */
        mask = HPIPE_SMAPLER_MASK;
@@ -381,13 +384,70 @@ static int comphy_pcie_power_up(u32 lane, u32 pcie_width,
        data = 0x1 << HPIPE_G3_FFE_DEG_RES_LEVEL_OFFSET;
 
        mask |= HPIPE_G3_FFE_LOAD_RES_LEVEL_MASK;
-       data |= 0x1 << HPIPE_G3_FFE_LOAD_RES_LEVEL_OFFSET;
+       data |= 0x3 << HPIPE_G3_FFE_LOAD_RES_LEVEL_OFFSET;
        reg_set(hpipe_addr + HPIPE_G3_SETTING_3_REG, data, mask);
 
-       /* Set phy in root complex mode */
-       mask = HPIPE_CFG_PHY_RC_EP_MASK;
-       data = 0x1 << HPIPE_CFG_PHY_RC_EP_OFFSET;
-       reg_set(hpipe_addr + HPIPE_LANE_EQU_CONFIG_0_REG, data, mask);
+       /* Pattern lock lost timeout disable */
+       mask = HPIPE_PATTERN_LOCK_LOST_TIMEOUT_EN_MASK;
+       data = 0x0 << HPIPE_PATTERN_LOCK_LOST_TIMEOUT_EN_OFFSET;
+       reg_set(hpipe_addr + HPIPE_FRAME_DETECT_CTRL_3_REG, data, mask);
+
+       /* Configure DFE adaptations */
+       mask = HPIPE_CDR_MAX_DFE_ADAPT_1_MASK;
+       data = 0x1 << HPIPE_CDR_MAX_DFE_ADAPT_1_OFFSET;
+       mask |= HPIPE_CDR_MAX_DFE_ADAPT_0_MASK;
+       data |= 0x0 << HPIPE_CDR_MAX_DFE_ADAPT_0_OFFSET;
+       mask |= HPIPE_CDR_RX_MAX_DFE_ADAPT_1_MASK;
+       data |= 0x0 << HPIPE_CDR_RX_MAX_DFE_ADAPT_1_OFFSET;
+       reg_set(hpipe_addr + HPIPE_CDR_CONTROL_REG, data, mask);
+       mask = HPIPE_DFE_TX_MAX_DFE_ADAPT_MASK;
+       data = 0x0 << HPIPE_DFE_TX_MAX_DFE_ADAPT_OFFSET;
+       reg_set(hpipe_addr + HPIPE_DFE_CONTROL_REG, data, mask);
+
+       /* Genration 2 setting 1*/
+       mask = HPIPE_G2_SET_1_G2_RX_SELMUPI_MASK;
+       data = 0x0 << HPIPE_G2_SET_1_G2_RX_SELMUPI_OFFSET;
+       mask |= HPIPE_G2_SET_1_G2_RX_SELMUPP_MASK;
+       data |= 0x1 << HPIPE_G2_SET_1_G2_RX_SELMUPP_OFFSET;
+       mask |= HPIPE_G2_SET_1_G2_RX_SELMUFI_MASK;
+       data |= 0x0 << HPIPE_G2_SET_1_G2_RX_SELMUFI_OFFSET;
+       reg_set(hpipe_addr + HPIPE_G2_SET_1_REG, data, mask);
+
+       /* DFE enable */
+       mask = HPIPE_G2_DFE_RES_MASK;
+       data = 0x3 << HPIPE_G2_DFE_RES_OFFSET;
+       reg_set(hpipe_addr + HPIPE_G2_SETTINGS_4_REG, data, mask);
+
+       /* Configure DFE Resolution */
+       mask = HPIPE_LANE_CFG4_DFE_EN_SEL_MASK;
+       data = 0x1 << HPIPE_LANE_CFG4_DFE_EN_SEL_OFFSET;
+       reg_set(hpipe_addr + HPIPE_LANE_CFG4_REG, data, mask);
+
+       /* VDD calibration control */
+       mask = HPIPE_EXT_SELLV_RXSAMPL_MASK;
+       data = 0x16 << HPIPE_EXT_SELLV_RXSAMPL_OFFSET;
+       reg_set(hpipe_addr + HPIPE_VDD_CAL_CTRL_REG, data, mask);
+
+       /* Set PLL Charge-pump Current Control */
+       mask = HPIPE_G3_SETTING_5_G3_ICP_MASK;
+       data = 0x4 << HPIPE_G3_SETTING_5_G3_ICP_OFFSET;
+       reg_set(hpipe_addr + HPIPE_G3_SETTING_5_REG, data, mask);
+
+       /* Set lane rqualization remote setting */
+       mask = HPIPE_LANE_CFG_FOM_DIRN_OVERRIDE_MASK;
+       data = 0x1 << HPIPE_LANE_CFG_FOM_DIRN_OVERRIDE_OFFSET;
+       mask |= HPIPE_LANE_CFG_FOM_ONLY_MODE_MASK;
+       data |= 0x1 << HPIPE_LANE_CFG_FOM_ONLY_MODE_OFFFSET;
+       mask |= HPIPE_LANE_CFG_FOM_PRESET_VECTOR_MASK;
+       data |= 0x2 << HPIPE_LANE_CFG_FOM_PRESET_VECTOR_OFFSET;
+       reg_set(hpipe_addr + HPIPE_LANE_EQ_REMOTE_SETTING_REG, data, mask);
+
+       if (!is_end_point) {
+               /* Set phy in root complex mode */
+               mask = HPIPE_CFG_PHY_RC_EP_MASK;
+               data = 0x1 << HPIPE_CFG_PHY_RC_EP_OFFSET;
+               reg_set(hpipe_addr + HPIPE_LANE_EQU_CONFIG_0_REG, data, mask);
+       }
 
        debug("stage: Comphy power up\n");
 
@@ -582,7 +642,7 @@ static int comphy_usb3_power_up(u32 lane, void __iomem *hpipe_base,
 }
 
 static int comphy_sata_power_up(u32 lane, void __iomem *hpipe_base,
-                               void __iomem *comphy_base, int comphy_index)
+                               void __iomem *comphy_base, int cp_index)
 {
        u32 mask, data, i, ret = 1;
        void __iomem *hpipe_addr = HPIPE_ADDR(hpipe_base, lane);
@@ -601,7 +661,7 @@ static int comphy_sata_power_up(u32 lane, void __iomem *hpipe_base,
         * In order to parse each CPs SATA node, fdt_node_offset_by_compatible
         * must be called again (according to the CP id)
         */
-       for (i = 0; i < (comphy_index + 1); i++)
+       for (i = 0; i < (cp_index + 1); i++)
                sata_node = fdt_node_offset_by_compatible(
                        gd->fdt_blob, sata_node, "marvell,armada-8k-ahci");
 
@@ -690,10 +750,176 @@ static int comphy_sata_power_up(u32 lane, void __iomem *hpipe_base,
                0x2 << HPIPE_LOOPBACK_SEL_OFFSET, HPIPE_LOOPBACK_SEL_MASK);
 
        debug("stage: Analog paramters from ETP(HW)\n");
-       /*
-        * TODO: Set analog paramters from ETP(HW) - for now use the
-        * default datas
-        */
+       /* Set analog parameters from ETP(HW) */
+       /* G1 settings */
+       mask = HPIPE_G1_SET_1_G1_RX_SELMUPI_MASK;
+       data = 0x0 << HPIPE_G1_SET_1_G1_RX_SELMUPI_OFFSET;
+       mask |= HPIPE_G1_SET_1_G1_RX_SELMUPP_MASK;
+       data |= 0x1 << HPIPE_G1_SET_1_G1_RX_SELMUPP_OFFSET;
+       mask |= HPIPE_G1_SET_1_G1_RX_SELMUFI_MASK;
+       data |= 0x0 << HPIPE_G1_SET_1_G1_RX_SELMUFI_OFFSET;
+       mask |= HPIPE_G1_SET_1_G1_RX_SELMUFF_MASK;
+       data |= 0x3 << HPIPE_G1_SET_1_G1_RX_SELMUFF_OFFSET;
+       mask |= HPIPE_G1_SET_1_G1_RX_DIGCK_DIV_MASK;
+       data |= 0x1 << HPIPE_G1_SET_1_G1_RX_DIGCK_DIV_OFFSET;
+       reg_set(hpipe_addr + HPIPE_G1_SET_1_REG, data, mask);
+
+       mask = HPIPE_G1_SETTINGS_3_G1_FFE_CAP_SEL_MASK;
+       data = 0xf << HPIPE_G1_SETTINGS_3_G1_FFE_CAP_SEL_OFFSET;
+       mask |= HPIPE_G1_SETTINGS_3_G1_FFE_RES_SEL_MASK;
+       data |= 0x2 << HPIPE_G1_SETTINGS_3_G1_FFE_RES_SEL_OFFSET;
+       mask |= HPIPE_G1_SETTINGS_3_G1_FFE_SETTING_FORCE_MASK;
+       data |= 0x1 << HPIPE_G1_SETTINGS_3_G1_FFE_SETTING_FORCE_OFFSET;
+       mask |= HPIPE_G1_SETTINGS_3_G1_FFE_DEG_RES_LEVEL_MASK;
+       data |= 0x1 << HPIPE_G1_SETTINGS_3_G1_FFE_DEG_RES_LEVEL_OFFSET;
+       mask |= HPIPE_G1_SETTINGS_3_G1_FFE_LOAD_RES_LEVEL_MASK;
+       data |= 0x1 << HPIPE_G1_SETTINGS_3_G1_FFE_LOAD_RES_LEVEL_OFFSET;
+       reg_set(hpipe_addr + HPIPE_G1_SETTINGS_3_REG, data, mask);
+
+       /* G2 settings */
+       mask = HPIPE_G2_SET_1_G2_RX_SELMUPI_MASK;
+       data = 0x0 << HPIPE_G2_SET_1_G2_RX_SELMUPI_OFFSET;
+       mask |= HPIPE_G2_SET_1_G2_RX_SELMUPP_MASK;
+       data |= 0x1 << HPIPE_G2_SET_1_G2_RX_SELMUPP_OFFSET;
+       mask |= HPIPE_G2_SET_1_G2_RX_SELMUFI_MASK;
+       data |= 0x0 << HPIPE_G2_SET_1_G2_RX_SELMUFI_OFFSET;
+       mask |= HPIPE_G2_SET_1_G2_RX_SELMUFF_MASK;
+       data |= 0x3 << HPIPE_G2_SET_1_G2_RX_SELMUFF_OFFSET;
+       mask |= HPIPE_G2_SET_1_G2_RX_DIGCK_DIV_MASK;
+       data |= 0x1 << HPIPE_G2_SET_1_G2_RX_DIGCK_DIV_OFFSET;
+       reg_set(hpipe_addr + HPIPE_G2_SET_1_REG, data, mask);
+
+       /* G3 settings */
+       mask = HPIPE_G3_SET_1_G3_RX_SELMUPI_MASK;
+       data = 0x2 << HPIPE_G3_SET_1_G3_RX_SELMUPI_OFFSET;
+       mask |= HPIPE_G3_SET_1_G3_RX_SELMUPF_MASK;
+       data |= 0x2 << HPIPE_G3_SET_1_G3_RX_SELMUPF_OFFSET;
+       mask |= HPIPE_G3_SET_1_G3_RX_SELMUFI_MASK;
+       data |= 0x3 << HPIPE_G3_SET_1_G3_RX_SELMUFI_OFFSET;
+       mask |= HPIPE_G3_SET_1_G3_RX_SELMUFF_MASK;
+       data |= 0x3 << HPIPE_G3_SET_1_G3_RX_SELMUFF_OFFSET;
+       mask |= HPIPE_G3_SET_1_G3_RX_DFE_EN_MASK;
+       data |= 0x1 << HPIPE_G3_SET_1_G3_RX_DFE_EN_OFFSET;
+       mask |= HPIPE_G3_SET_1_G3_RX_DIGCK_DIV_MASK;
+       data |= 0x2 << HPIPE_G3_SET_1_G3_RX_DIGCK_DIV_OFFSET;
+       mask |= HPIPE_G3_SET_1_G3_SAMPLER_INPAIRX2_EN_MASK;
+       data |= 0x0 << HPIPE_G3_SET_1_G3_SAMPLER_INPAIRX2_EN_OFFSET;
+       reg_set(hpipe_addr + HPIPE_G3_SET_1_REG, data, mask);
+
+       /* DTL Control */
+       mask = HPIPE_PWR_CTR_DTL_SQ_DET_EN_MASK;
+       data = 0x1 << HPIPE_PWR_CTR_DTL_SQ_DET_EN_OFFSET;
+       mask |= HPIPE_PWR_CTR_DTL_SQ_PLOOP_EN_MASK;
+       data |= 0x1 << HPIPE_PWR_CTR_DTL_SQ_PLOOP_EN_OFFSET;
+       mask |= HPIPE_PWR_CTR_DTL_FLOOP_EN_MASK;
+       data |= 0x1 << HPIPE_PWR_CTR_DTL_FLOOP_EN_OFFSET;
+       mask |= HPIPE_PWR_CTR_DTL_CLAMPING_SEL_MASK;
+       data |= 0x1 << HPIPE_PWR_CTR_DTL_CLAMPING_SEL_OFFSET;
+       mask |= HPIPE_PWR_CTR_DTL_INTPCLK_DIV_FORCE_MASK;
+       data |= 0x1 << HPIPE_PWR_CTR_DTL_INTPCLK_DIV_FORCE_OFFSET;
+       mask |= HPIPE_PWR_CTR_DTL_CLK_MODE_MASK;
+       data |= 0x1 << HPIPE_PWR_CTR_DTL_CLK_MODE_OFFSET;
+       mask |= HPIPE_PWR_CTR_DTL_CLK_MODE_FORCE_MASK;
+       data |= 0x1 << HPIPE_PWR_CTR_DTL_CLK_MODE_FORCE_OFFSET;
+       reg_set(hpipe_addr + HPIPE_PWR_CTR_DTL_REG, data, mask);
+
+       /* Trigger sampler enable pulse (by toggleing the bit) */
+       mask = HPIPE_SMAPLER_MASK;
+       data = 0x1 << HPIPE_SMAPLER_OFFSET;
+       reg_set(hpipe_addr + HPIPE_SAMPLER_N_PROC_CALIB_CTRL_REG, data, mask);
+       mask = HPIPE_SMAPLER_MASK;
+       data = 0x0 << HPIPE_SMAPLER_OFFSET;
+       reg_set(hpipe_addr + HPIPE_SAMPLER_N_PROC_CALIB_CTRL_REG, data, mask);
+
+       /* VDD Calibration Control 3 */
+       mask = HPIPE_EXT_SELLV_RXSAMPL_MASK;
+       data = 0x10 << HPIPE_EXT_SELLV_RXSAMPL_OFFSET;
+       reg_set(hpipe_addr + HPIPE_VDD_CAL_CTRL_REG, data, mask);
+
+       /* DFE Resolution Control */
+       mask = HPIPE_DFE_RES_FORCE_MASK;
+       data = 0x1 << HPIPE_DFE_RES_FORCE_OFFSET;
+       reg_set(hpipe_addr + HPIPE_DFE_REG0, data, mask);
+
+       /* DFE F3-F5 Coefficient Control */
+       mask = HPIPE_DFE_F3_F5_DFE_EN_MASK;
+       data = 0x0 << HPIPE_DFE_F3_F5_DFE_EN_OFFSET;
+       mask |= HPIPE_DFE_F3_F5_DFE_CTRL_MASK;
+       data = 0x0 << HPIPE_DFE_F3_F5_DFE_CTRL_OFFSET;
+       reg_set(hpipe_addr + HPIPE_DFE_F3_F5_REG, data, mask);
+
+       /* G3 Setting 3 */
+       mask = HPIPE_G3_FFE_CAP_SEL_MASK;
+       data = 0xf << HPIPE_G3_FFE_CAP_SEL_OFFSET;
+       mask |= HPIPE_G3_FFE_RES_SEL_MASK;
+       data |= 0x4 << HPIPE_G3_FFE_RES_SEL_OFFSET;
+       mask |= HPIPE_G3_FFE_SETTING_FORCE_MASK;
+       data |= 0x1 << HPIPE_G3_FFE_SETTING_FORCE_OFFSET;
+       mask |= HPIPE_G3_FFE_DEG_RES_LEVEL_MASK;
+       data |= 0x1 << HPIPE_G3_FFE_DEG_RES_LEVEL_OFFSET;
+       mask |= HPIPE_G3_FFE_LOAD_RES_LEVEL_MASK;
+       data |= 0x3 << HPIPE_G3_FFE_LOAD_RES_LEVEL_OFFSET;
+       reg_set(hpipe_addr + HPIPE_G3_SETTING_3_REG, data, mask);
+
+       /* G3 Setting 4 */
+       mask = HPIPE_G3_DFE_RES_MASK;
+       data = 0x2 << HPIPE_G3_DFE_RES_OFFSET;
+       reg_set(hpipe_addr + HPIPE_G3_SETTING_4_REG, data, mask);
+
+       /* Offset Phase Control */
+       mask = HPIPE_OS_PH_OFFSET_MASK;
+       data = 0x5c << HPIPE_OS_PH_OFFSET_OFFSET;
+       mask |= HPIPE_OS_PH_OFFSET_FORCE_MASK;
+       data |= 0x1 << HPIPE_OS_PH_OFFSET_FORCE_OFFSET;
+       reg_set(hpipe_addr + HPIPE_PHASE_CONTROL_REG, data, mask);
+       mask = HPIPE_OS_PH_VALID_MASK;
+       data = 0x1 << HPIPE_OS_PH_VALID_OFFSET;
+       reg_set(hpipe_addr + HPIPE_PHASE_CONTROL_REG, data, mask);
+       mask = HPIPE_OS_PH_VALID_MASK;
+       data = 0x0 << HPIPE_OS_PH_VALID_OFFSET;
+       reg_set(hpipe_addr + HPIPE_PHASE_CONTROL_REG, data, mask);
+
+       /* Set G1 TX amplitude and TX post emphasis value */
+       mask = HPIPE_G1_SET_0_G1_TX_AMP_MASK;
+       data = 0x8 << HPIPE_G1_SET_0_G1_TX_AMP_OFFSET;
+       mask |= HPIPE_G1_SET_0_G1_TX_AMP_ADJ_MASK;
+       data |= 0x1 << HPIPE_G1_SET_0_G1_TX_AMP_ADJ_OFFSET;
+       mask |= HPIPE_G1_SET_0_G1_TX_EMPH1_MASK;
+       data |= 0x1 << HPIPE_G1_SET_0_G1_TX_EMPH1_OFFSET;
+       mask |= HPIPE_G1_SET_0_G1_TX_EMPH1_EN_MASK;
+       data |= 0x1 << HPIPE_G1_SET_0_G1_TX_EMPH1_EN_OFFSET;
+       reg_set(hpipe_addr + HPIPE_G1_SET_0_REG, data, mask);
+
+       /* Set G2 TX amplitude and TX post emphasis value */
+       mask = HPIPE_G2_SET_0_G2_TX_AMP_MASK;
+       data = 0xa << HPIPE_G2_SET_0_G2_TX_AMP_OFFSET;
+       mask |= HPIPE_G2_SET_0_G2_TX_AMP_ADJ_MASK;
+       data |= 0x1 << HPIPE_G2_SET_0_G2_TX_AMP_ADJ_OFFSET;
+       mask |= HPIPE_G2_SET_0_G2_TX_EMPH1_MASK;
+       data |= 0x2 << HPIPE_G2_SET_0_G2_TX_EMPH1_OFFSET;
+       mask |= HPIPE_G2_SET_0_G2_TX_EMPH1_EN_MASK;
+       data |= 0x1 << HPIPE_G2_SET_0_G2_TX_EMPH1_EN_OFFSET;
+       reg_set(hpipe_addr + HPIPE_G2_SET_0_REG, data, mask);
+
+       /* Set G3 TX amplitude and TX post emphasis value */
+       mask = HPIPE_G3_SET_0_G3_TX_AMP_MASK;
+       data = 0xe << HPIPE_G3_SET_0_G3_TX_AMP_OFFSET;
+       mask |= HPIPE_G3_SET_0_G3_TX_AMP_ADJ_MASK;
+       data |= 0x1 << HPIPE_G3_SET_0_G3_TX_AMP_ADJ_OFFSET;
+       mask |= HPIPE_G3_SET_0_G3_TX_EMPH1_MASK;
+       data |= 0x6 << HPIPE_G3_SET_0_G3_TX_EMPH1_OFFSET;
+       mask |= HPIPE_G3_SET_0_G3_TX_EMPH1_EN_MASK;
+       data |= 0x1 << HPIPE_G3_SET_0_G3_TX_EMPH1_EN_OFFSET;
+       mask |= HPIPE_G3_SET_0_G3_TX_SLEW_RATE_SEL_MASK;
+       data |= 0x4 << HPIPE_G3_SET_0_G3_TX_SLEW_RATE_SEL_OFFSET;
+       mask |= HPIPE_G3_SET_0_G3_TX_SLEW_CTRL_EN_MASK;
+       data |= 0x0 << HPIPE_G3_SET_0_G3_TX_SLEW_CTRL_EN_OFFSET;
+       reg_set(hpipe_addr + HPIPE_G3_SET_0_REG, data, mask);
+
+       /* SERDES External Configuration 2 register */
+       mask = SD_EXTERNAL_CONFIG2_SSC_ENABLE_MASK;
+       data = 0x1 << SD_EXTERNAL_CONFIG2_SSC_ENABLE_OFFSET;
+       reg_set(sd_ip_addr + SD_EXTERNAL_CONFIG2_REG, data, mask);
 
        /* DFE reset sequence */
        reg_set(hpipe_addr + HPIPE_PWR_CTR_REG,
@@ -907,8 +1133,8 @@ static int comphy_sgmii_power_up(u32 lane, u32 sgmii_speed,
        return ret;
 }
 
-static int comphy_kr_power_up(u32 lane, void __iomem *hpipe_base,
-                             void __iomem *comphy_base)
+static int comphy_sfi_power_up(u32 lane, void __iomem *hpipe_base,
+                              void __iomem *comphy_base, u32 speed)
 {
        u32 mask, data, ret = 1;
        void __iomem *hpipe_addr = HPIPE_ADDR(hpipe_base, lane);
@@ -963,7 +1189,9 @@ static int comphy_kr_power_up(u32 lane, void __iomem *hpipe_base,
        debug("stage: Comphy configuration\n");
        /* set reference clock */
        mask = HPIPE_MISC_ICP_FORCE_MASK;
-       data = 0x1 << HPIPE_MISC_ICP_FORCE_OFFSET;
+       data = (speed == PHY_SPEED_5_15625G) ?
+               (0x0 << HPIPE_MISC_ICP_FORCE_OFFSET) :
+               (0x1 << HPIPE_MISC_ICP_FORCE_OFFSET);
        mask |= HPIPE_MISC_REFCLK_SEL_MASK;
        data |= 0x0 << HPIPE_MISC_REFCLK_SEL_OFFSET;
        reg_set(hpipe_addr + HPIPE_MISC_REG, data, mask);
@@ -988,6 +1216,22 @@ static int comphy_kr_power_up(u32 lane, void __iomem *hpipe_base,
        data = 0x1 << HPIPE_PWR_CTR_DTL_FLOOP_EN_OFFSET;
        reg_set(hpipe_addr + HPIPE_PWR_CTR_DTL_REG, data, mask);
 
+       /* Transmitter/Receiver Speed Divider Force */
+       if (speed == PHY_SPEED_5_15625G) {
+               mask = HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_MASK;
+               data = 1 << HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_OFFSET;
+               mask |= HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_FORCE_MASK;
+               data |= 1 << HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_FORCE_OFFSET;
+               mask |= HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_MASK;
+               data |= 1 << HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_OFFSET;
+               mask |= HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_FORCE_MASK;
+               data |= 1 << HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_FORCE_OFFSET;
+       } else {
+               mask = HPIPE_TXDIGCK_DIV_FORCE_MASK;
+               data = 0x1 << HPIPE_TXDIGCK_DIV_FORCE_OFFSET;
+       }
+       reg_set(hpipe_addr + HPIPE_SPD_DIV_FORCE_REG, data, mask);
+
        /* Set analog paramters from ETP(HW) */
        debug("stage: Analog paramters from ETP(HW)\n");
        /* SERDES External Configuration 2 */
@@ -999,10 +1243,15 @@ static int comphy_kr_power_up(u32 lane, void __iomem *hpipe_base,
        data = 0x1 << HPIPE_DFE_RES_FORCE_OFFSET;
        reg_set(hpipe_addr + HPIPE_DFE_REG0, data, mask);
        /* 0xd-G1_Setting_0 */
-       mask = HPIPE_G1_SET_0_G1_TX_AMP_MASK;
-       data = 0x1c << HPIPE_G1_SET_0_G1_TX_AMP_OFFSET;
-       mask |= HPIPE_G1_SET_0_G1_TX_EMPH1_MASK;
-       data |= 0xe << HPIPE_G1_SET_0_G1_TX_EMPH1_OFFSET;
+       if (speed == PHY_SPEED_5_15625G) {
+               mask = HPIPE_G1_SET_0_G1_TX_EMPH1_MASK;
+               data = 0x6 << HPIPE_G1_SET_0_G1_TX_EMPH1_OFFSET;
+       } else {
+               mask = HPIPE_G1_SET_0_G1_TX_AMP_MASK;
+               data = 0x1c << HPIPE_G1_SET_0_G1_TX_AMP_OFFSET;
+               mask |= HPIPE_G1_SET_0_G1_TX_EMPH1_MASK;
+               data |= 0xe << HPIPE_G1_SET_0_G1_TX_EMPH1_OFFSET;
+       }
        reg_set(hpipe_addr + HPIPE_G1_SET_0_REG, data, mask);
        /* Genration 1 setting 2 (G1_Setting_2) */
        mask = HPIPE_G1_SET_2_G1_TX_EMPH0_MASK;
@@ -1027,13 +1276,27 @@ static int comphy_kr_power_up(u32 lane, void __iomem *hpipe_base,
        data = 0 << HPIPE_CAL_REG_1_EXT_TXIMP_OFFSET;
        reg_set(hpipe_addr + HPIPE_G1_SETTING_5_REG, data, mask);
        /* 0xE-G1_Setting_1 */
-       mask = HPIPE_G1_SET_1_G1_RX_SELMUPI_MASK;
-       data = 0x1 << HPIPE_G1_SET_1_G1_RX_SELMUPI_OFFSET;
-       mask |= HPIPE_G1_SET_1_G1_RX_SELMUPP_MASK;
-       data |= 0x1 << HPIPE_G1_SET_1_G1_RX_SELMUPP_OFFSET;
-       mask |= HPIPE_G1_SET_1_G1_RX_DFE_EN_MASK;
-       data |= 0x1 << HPIPE_G1_SET_1_G1_RX_DFE_EN_OFFSET;
+       mask = HPIPE_G1_SET_1_G1_RX_DFE_EN_MASK;
+       data = 0x1 << HPIPE_G1_SET_1_G1_RX_DFE_EN_OFFSET;
+       if (speed == PHY_SPEED_5_15625G) {
+               mask |= HPIPE_G1_SET_1_G1_RX_SELMUPI_MASK;
+               data |= 0x1 << HPIPE_G1_SET_1_G1_RX_SELMUPI_OFFSET;
+               mask |= HPIPE_G1_SET_1_G1_RX_SELMUPP_MASK;
+               data |= 0x1 << HPIPE_G1_SET_1_G1_RX_SELMUPP_OFFSET;
+       } else {
+               mask |= HPIPE_G1_SET_1_G1_RX_SELMUPI_MASK;
+               data |= 0x2 << HPIPE_G1_SET_1_G1_RX_SELMUPI_OFFSET;
+               mask |= HPIPE_G1_SET_1_G1_RX_SELMUPP_MASK;
+               data |= 0x2 << HPIPE_G1_SET_1_G1_RX_SELMUPP_OFFSET;
+               mask |= HPIPE_G1_SET_1_G1_RX_SELMUFI_MASK;
+               data |= 0x0 << HPIPE_G1_SET_1_G1_RX_SELMUFI_OFFSET;
+               mask |= HPIPE_G1_SET_1_G1_RX_SELMUFF_MASK;
+               data |= 0x1 << HPIPE_G1_SET_1_G1_RX_SELMUFF_OFFSET;
+               mask |= HPIPE_G1_SET_1_G1_RX_DIGCK_DIV_MASK;
+               data |= 0x3 << HPIPE_G1_SET_1_G1_RX_DIGCK_DIV_OFFSET;
+       }
        reg_set(hpipe_addr + HPIPE_G1_SET_1_REG, data, mask);
+
        /* 0xA-DFE_Reg3 */
        mask = HPIPE_DFE_F3_F5_DFE_EN_MASK;
        data = 0x0 << HPIPE_DFE_F3_F5_DFE_EN_OFFSET;
@@ -1048,8 +1311,74 @@ static int comphy_kr_power_up(u32 lane, void __iomem *hpipe_base,
        /* Genration 1 setting 3 (G1_Setting_3) */
        mask = HPIPE_G1_SETTINGS_3_G1_FBCK_SEL_MASK;
        data = 0x1 << HPIPE_G1_SETTINGS_3_G1_FBCK_SEL_OFFSET;
+       if (speed == PHY_SPEED_5_15625G) {
+               /* Force FFE (Feed Forward Equalization) to 5G */
+               mask |= HPIPE_G1_SETTINGS_3_G1_FFE_CAP_SEL_MASK;
+               data |= 0xf << HPIPE_G1_SETTINGS_3_G1_FFE_CAP_SEL_OFFSET;
+               mask |= HPIPE_G1_SETTINGS_3_G1_FFE_RES_SEL_MASK;
+               data |= 0x4 << HPIPE_G1_SETTINGS_3_G1_FFE_RES_SEL_OFFSET;
+               mask |= HPIPE_G1_SETTINGS_3_G1_FFE_SETTING_FORCE_MASK;
+               data |= 0x1 << HPIPE_G1_SETTINGS_3_G1_FFE_SETTING_FORCE_OFFSET;
+       }
        reg_set(hpipe_addr + HPIPE_G1_SETTINGS_3_REG, data, mask);
 
+       /* Connfigure RX training timer */
+       mask = HPIPE_RX_TRAIN_TIMER_MASK;
+       data = 0x13 << HPIPE_RX_TRAIN_TIMER_OFFSET;
+       reg_set(hpipe_addr + HPIPE_TX_TRAIN_CTRL_5_REG, data, mask);
+
+       /* Enable TX train peak to peak hold */
+       mask = HPIPE_TX_TRAIN_P2P_HOLD_MASK;
+       data = 0x1 << HPIPE_TX_TRAIN_P2P_HOLD_OFFSET;
+       reg_set(hpipe_addr + HPIPE_TX_TRAIN_CTRL_0_REG, data, mask);
+
+       /* Configure TX preset index */
+       mask = HPIPE_TX_PRESET_INDEX_MASK;
+       data = 0x2 << HPIPE_TX_PRESET_INDEX_OFFSET;
+       reg_set(hpipe_addr + HPIPE_TX_PRESET_INDEX_REG, data, mask);
+
+       /* Disable pattern lock lost timeout */
+       mask = HPIPE_PATTERN_LOCK_LOST_TIMEOUT_EN_MASK;
+       data = 0x0 << HPIPE_PATTERN_LOCK_LOST_TIMEOUT_EN_OFFSET;
+       reg_set(hpipe_addr + HPIPE_FRAME_DETECT_CTRL_3_REG, data, mask);
+
+       /* Configure TX training pattern and TX training 16bit auto */
+       mask = HPIPE_TX_TRAIN_16BIT_AUTO_EN_MASK;
+       data = 0x1 << HPIPE_TX_TRAIN_16BIT_AUTO_EN_OFFSET;
+       mask |= HPIPE_TX_TRAIN_PAT_SEL_MASK;
+       data |= 0x1 << HPIPE_TX_TRAIN_PAT_SEL_OFFSET;
+       reg_set(hpipe_addr + HPIPE_TX_TRAIN_REG, data, mask);
+
+       /* Configure Training patten number */
+       mask = HPIPE_TRAIN_PAT_NUM_MASK;
+       data = 0x88 << HPIPE_TRAIN_PAT_NUM_OFFSET;
+       reg_set(hpipe_addr + HPIPE_FRAME_DETECT_CTRL_0_REG, data, mask);
+
+       /* Configure differencial manchester encoter to ethernet mode */
+       mask = HPIPE_DME_ETHERNET_MODE_MASK;
+       data = 0x1 << HPIPE_DME_ETHERNET_MODE_OFFSET;
+       reg_set(hpipe_addr + HPIPE_DME_REG, data, mask);
+
+       /* Configure VDD Continuous Calibration */
+       mask = HPIPE_CAL_VDD_CONT_MODE_MASK;
+       data = 0x1 << HPIPE_CAL_VDD_CONT_MODE_OFFSET;
+       reg_set(hpipe_addr + HPIPE_VDD_CAL_0_REG, data, mask);
+
+       /* Trigger sampler enable pulse (by toggleing the bit) */
+       mask = HPIPE_RX_SAMPLER_OS_GAIN_MASK;
+       data = 0x3 << HPIPE_RX_SAMPLER_OS_GAIN_OFFSET;
+       mask |= HPIPE_SMAPLER_MASK;
+       data |= 0x1 << HPIPE_SMAPLER_OFFSET;
+       reg_set(hpipe_addr + HPIPE_SAMPLER_N_PROC_CALIB_CTRL_REG, data, mask);
+       mask = HPIPE_SMAPLER_MASK;
+       data = 0x0 << HPIPE_SMAPLER_OFFSET;
+       reg_set(hpipe_addr + HPIPE_SAMPLER_N_PROC_CALIB_CTRL_REG, data, mask);
+
+       /* Set External RX Regulator Control */
+       mask = HPIPE_EXT_SELLV_RXSAMPL_MASK;
+       data = 0x1A << HPIPE_EXT_SELLV_RXSAMPL_OFFSET;
+       reg_set(hpipe_addr + HPIPE_VDD_CAL_CTRL_REG, data, mask);
+
        debug("stage: RFU configurations- Power Up PLL,Tx,Rx\n");
        /* SERDES External Configuration */
        mask = SD_EXTERNAL_CONFIG0_SD_PU_PLL_MASK;
@@ -1301,7 +1630,7 @@ static void comphy_utmi_power_down(u32 utmi_index, void __iomem *utmi_base_addr,
         * If UTMI connected to USB Device, configure mux prior to PHY init
         * (Device can be connected to UTMI0 or to UTMI1)
         */
-       if (utmi_phy_port == UTMI_PHY_TO_USB_DEVICE0) {
+       if (utmi_phy_port == UTMI_PHY_TO_USB3_DEVICE0) {
                debug("stage:  UTMI %d - Enable Device mode and configure UTMI mux\n",
                      utmi_index);
                /* USB3 Device UTMI enable */
@@ -1493,7 +1822,8 @@ static void comphy_utmi_phy_init(u32 utmi_phy_count,
                        continue;
                }
                printf("UTMI PHY %d initialized to ", i);
-               if (cp110_utmi_data[i].utmi_phy_port == UTMI_PHY_TO_USB_DEVICE0)
+               if (cp110_utmi_data[i].utmi_phy_port ==
+                   UTMI_PHY_TO_USB3_DEVICE0)
                        printf("USB Device\n");
                else
                        printf("USB Host%d\n",
@@ -1659,6 +1989,7 @@ int comphy_cp110_init(struct chip_serdes_phy_config *ptr_chip_cfg,
                }
                switch (ptr_comphy_map->type) {
                case PHY_TYPE_UNCONNECTED:
+               case PHY_TYPE_IGNORE:
                        continue;
                        break;
                case PHY_TYPE_PEX0:
@@ -1667,6 +1998,7 @@ int comphy_cp110_init(struct chip_serdes_phy_config *ptr_chip_cfg,
                case PHY_TYPE_PEX3:
                        ret = comphy_pcie_power_up(
                                lane, pcie_width, ptr_comphy_map->clk_src,
+                               serdes_map->end_point,
                                hpipe_base_addr, comphy_base_addr);
                        break;
                case PHY_TYPE_SATA0:
@@ -1675,7 +2007,7 @@ int comphy_cp110_init(struct chip_serdes_phy_config *ptr_chip_cfg,
                case PHY_TYPE_SATA3:
                        ret = comphy_sata_power_up(
                                lane, hpipe_base_addr, comphy_base_addr,
-                               ptr_chip_cfg->comphy_index);
+                               ptr_chip_cfg->cp_index);
                        break;
                case PHY_TYPE_USB3_HOST0:
                case PHY_TYPE_USB3_HOST1:
@@ -1696,9 +2028,10 @@ int comphy_cp110_init(struct chip_serdes_phy_config *ptr_chip_cfg,
                                lane, ptr_comphy_map->speed, hpipe_base_addr,
                                comphy_base_addr);
                        break;
-               case PHY_TYPE_KR:
-                       ret = comphy_kr_power_up(lane, hpipe_base_addr,
-                                                comphy_base_addr);
+               case PHY_TYPE_SFI:
+                       ret = comphy_sfi_power_up(lane, hpipe_base_addr,
+                                                 comphy_base_addr,
+                                                 ptr_comphy_map->speed);
                        break;
                case PHY_TYPE_RXAUI0:
                case PHY_TYPE_RXAUI1:
@@ -1712,7 +2045,7 @@ int comphy_cp110_init(struct chip_serdes_phy_config *ptr_chip_cfg,
                }
                if (ret == 0) {
                        /*
-                        * If interface wans't initialiuzed, set the lane to
+                        * If interface wans't initialized, set the lane to
                         * PHY_TYPE_UNCONNECTED state.
                         */
                        ptr_comphy_map->type = PHY_TYPE_UNCONNECTED;
index 179e910a0c86b803868c60bc65ec7c22ac0afec5..fbceb2a403d70628366f0c8e1ee3c22b667a99a2 100644 (file)
@@ -49,6 +49,9 @@
 #define SD_EXTERNAL_CONFIG2_PIN_DFE_EN_OFFSET  4
 #define SD_EXTERNAL_CONFIG2_PIN_DFE_EN_MASK    \
        (0x1 << SD_EXTERNAL_CONFIG2_PIN_DFE_EN_OFFSET)
+#define SD_EXTERNAL_CONFIG2_SSC_ENABLE_OFFSET  7
+#define SD_EXTERNAL_CONFIG2_SSC_ENABLE_MASK    \
+       (0x1 << SD_EXTERNAL_CONFIG2_SSC_ENABLE_OFFSET)
 
 #define SD_EXTERNAL_STATUS0_REG                        0x18
 #define SD_EXTERNAL_STATUS0_PLL_TX_OFFSET      2
 #define HPIPE_G1_SET_0_G1_TX_AMP_OFFSET                1
 #define HPIPE_G1_SET_0_G1_TX_AMP_MASK          \
        (0x1f << HPIPE_G1_SET_0_G1_TX_AMP_OFFSET)
+#define HPIPE_G1_SET_0_G1_TX_AMP_ADJ_OFFSET    6
+#define HPIPE_G1_SET_0_G1_TX_AMP_ADJ_MASK      \
+       (0x1 << HPIPE_G1_SET_0_G1_TX_AMP_ADJ_OFFSET)
 #define HPIPE_G1_SET_0_G1_TX_EMPH1_OFFSET      7
 #define HPIPE_G1_SET_0_G1_TX_EMPH1_MASK                \
        (0xf << HPIPE_G1_SET_0_G1_TX_EMPH1_OFFSET)
+#define HPIPE_G1_SET_0_G1_TX_EMPH1_EN_OFFSET   11
+#define HPIPE_G1_SET_0_G1_TX_EMPH1_EN_MASK     \
+       (0x1 << HPIPE_G1_SET_0_G1_TX_EMPH1_EN_OFFSET)
 
 #define HPIPE_G1_SET_1_REG                     0x038
 #define HPIPE_G1_SET_1_G1_RX_SELMUPI_OFFSET    0
 #define HPIPE_G1_SET_1_G1_RX_SELMUPP_OFFSET    3
 #define HPIPE_G1_SET_1_G1_RX_SELMUPP_MASK      \
        (0x7 << HPIPE_G1_SET_1_G1_RX_SELMUPP_OFFSET)
+#define HPIPE_G1_SET_1_G1_RX_SELMUFI_OFFSET    6
+#define HPIPE_G1_SET_1_G1_RX_SELMUFI_MASK      \
+       (0x3 << HPIPE_G1_SET_1_G1_RX_SELMUFI_OFFSET)
+#define HPIPE_G1_SET_1_G1_RX_SELMUFF_OFFSET    8
+#define HPIPE_G1_SET_1_G1_RX_SELMUFF_MASK      \
+       (0x3 << HPIPE_G1_SET_1_G1_RX_SELMUFF_OFFSET)
 #define HPIPE_G1_SET_1_G1_RX_DFE_EN_OFFSET     10
 #define HPIPE_G1_SET_1_G1_RX_DFE_EN_MASK       \
        (0x1 << HPIPE_G1_SET_1_G1_RX_DFE_EN_OFFSET)
 
-#define HPIPE_G2_SETTINGS_1_REG                        0x040
-
-#define HPIPE_G3_SETTINGS_1_REG                        0x048
-#define HPIPE_G3_RX_SELMUPI_OFFSET             0
-#define HPIPE_G3_RX_SELMUPI_MASK               \
-       (0x7 << HPIPE_G3_RX_SELMUPI_OFFSET)
-#define HPIPE_G3_RX_SELMUPF_OFFSET             3
-#define HPIPE_G3_RX_SELMUPF_MASK               \
-       (0x7 << HPIPE_G3_RX_SELMUPF_OFFSET)
-#define HPIPE_G3_SETTING_BIT_OFFSET            13
-#define HPIPE_G3_SETTING_BIT_MASK              \
-       (0x1 << HPIPE_G3_SETTING_BIT_OFFSET)
+#define HPIPE_G1_SET_1_G1_RX_DIGCK_DIV_OFFSET  11
+#define HPIPE_G1_SET_1_G1_RX_DIGCK_DIV_MASK    \
+       (0x3 << HPIPE_G1_SET_1_G1_RX_DIGCK_DIV_OFFSET)
+
+#define HPIPE_G2_SET_0_REG                     0x3c
+#define HPIPE_G2_SET_0_G2_TX_AMP_OFFSET                1
+#define HPIPE_G2_SET_0_G2_TX_AMP_MASK          \
+       (0x1f << HPIPE_G2_SET_0_G2_TX_AMP_OFFSET)
+#define HPIPE_G2_SET_0_G2_TX_AMP_ADJ_OFFSET    6
+#define HPIPE_G2_SET_0_G2_TX_AMP_ADJ_MASK      \
+       (0x1 << HPIPE_G2_SET_0_G2_TX_AMP_ADJ_OFFSET)
+#define HPIPE_G2_SET_0_G2_TX_EMPH1_OFFSET      7
+#define HPIPE_G2_SET_0_G2_TX_EMPH1_MASK                \
+       (0xf << HPIPE_G2_SET_0_G2_TX_EMPH1_OFFSET)
+#define HPIPE_G2_SET_0_G2_TX_EMPH1_EN_OFFSET   11
+#define HPIPE_G2_SET_0_G2_TX_EMPH1_EN_MASK     \
+       (0x1 << HPIPE_G2_SET_0_G2_TX_EMPH1_EN_OFFSET)
+
+#define HPIPE_G2_SET_1_REG                     0x040
+#define HPIPE_G2_SET_1_G2_RX_SELMUPI_OFFSET    0
+#define HPIPE_G2_SET_1_G2_RX_SELMUPI_MASK      \
+       (0x7 << HPIPE_G2_SET_1_G2_RX_SELMUPI_OFFSET)
+#define HPIPE_G2_SET_1_G2_RX_SELMUPP_OFFSET    3
+#define HPIPE_G2_SET_1_G2_RX_SELMUPP_MASK      \
+       (0x7 << HPIPE_G2_SET_1_G2_RX_SELMUPP_OFFSET)
+#define HPIPE_G2_SET_1_G2_RX_SELMUFI_OFFSET    6
+#define HPIPE_G2_SET_1_G2_RX_SELMUFI_MASK      \
+       (0x3 << HPIPE_G2_SET_1_G2_RX_SELMUFI_OFFSET)
+#define HPIPE_G2_SET_1_G2_RX_SELMUFF_OFFSET    8
+#define HPIPE_G2_SET_1_G2_RX_SELMUFF_MASK      \
+       (0x3 << HPIPE_G2_SET_1_G2_RX_SELMUFF_OFFSET)
+#define HPIPE_G2_SET_1_G2_RX_DFE_EN_OFFSET     10
+#define HPIPE_G2_SET_1_G2_RX_DFE_EN_MASK       \
+       (0x1 << HPIPE_G2_SET_1_G2_RX_DFE_EN_OFFSET)
+#define HPIPE_G2_SET_1_G2_RX_DIGCK_DIV_OFFSET  11
+#define HPIPE_G2_SET_1_G2_RX_DIGCK_DIV_MASK    \
+       (0x3 << HPIPE_G2_SET_1_G2_RX_DIGCK_DIV_OFFSET)
+
+#define HPIPE_G3_SET_0_REG                     0x44
+#define HPIPE_G3_SET_0_G3_TX_AMP_OFFSET                1
+#define HPIPE_G3_SET_0_G3_TX_AMP_MASK          \
+       (0x1f << HPIPE_G3_SET_0_G3_TX_AMP_OFFSET)
+#define HPIPE_G3_SET_0_G3_TX_AMP_ADJ_OFFSET    6
+#define HPIPE_G3_SET_0_G3_TX_AMP_ADJ_MASK      \
+       (0x1 << HPIPE_G3_SET_0_G3_TX_AMP_ADJ_OFFSET)
+#define HPIPE_G3_SET_0_G3_TX_EMPH1_OFFSET      7
+#define HPIPE_G3_SET_0_G3_TX_EMPH1_MASK                \
+       (0xf << HPIPE_G3_SET_0_G3_TX_EMPH1_OFFSET)
+#define HPIPE_G3_SET_0_G3_TX_EMPH1_EN_OFFSET   11
+#define HPIPE_G3_SET_0_G3_TX_EMPH1_EN_MASK     \
+       (0x1 << HPIPE_G3_SET_0_G3_TX_EMPH1_EN_OFFSET)
+#define HPIPE_G3_SET_0_G3_TX_SLEW_RATE_SEL_OFFSET 12
+#define HPIPE_G3_SET_0_G3_TX_SLEW_RATE_SEL_MASK        \
+       (0x7 << HPIPE_G3_SET_0_G3_TX_SLEW_RATE_SEL_OFFSET)
+#define HPIPE_G3_SET_0_G3_TX_SLEW_CTRL_EN_OFFSET 15
+#define HPIPE_G3_SET_0_G3_TX_SLEW_CTRL_EN_MASK \
+       (0x1 << HPIPE_G3_SET_0_G3_TX_SLEW_CTRL_EN_OFFSET)
+
+#define HPIPE_G3_SET_1_REG                     0x048
+#define HPIPE_G3_SET_1_G3_RX_SELMUPI_OFFSET    0
+#define HPIPE_G3_SET_1_G3_RX_SELMUPI_MASK      \
+       (0x7 << HPIPE_G3_SET_1_G3_RX_SELMUPI_OFFSET)
+#define HPIPE_G3_SET_1_G3_RX_SELMUPF_OFFSET    3
+#define HPIPE_G3_SET_1_G3_RX_SELMUPF_MASK      \
+       (0x7 << HPIPE_G3_SET_1_G3_RX_SELMUPF_OFFSET)
+#define HPIPE_G3_SET_1_G3_RX_SELMUFI_OFFSET    6
+#define HPIPE_G3_SET_1_G3_RX_SELMUFI_MASK      \
+       (0x3 << HPIPE_G3_SET_1_G3_RX_SELMUFI_OFFSET)
+#define HPIPE_G3_SET_1_G3_RX_SELMUFF_OFFSET    8
+#define HPIPE_G3_SET_1_G3_RX_SELMUFF_MASK      \
+       (0x3 << HPIPE_G3_SET_1_G3_RX_SELMUFF_OFFSET)
+#define HPIPE_G3_SET_1_G3_RX_DFE_EN_OFFSET     10
+#define HPIPE_G3_SET_1_G3_RX_DFE_EN_MASK       \
+       (0x1 << HPIPE_G3_SET_1_G3_RX_DFE_EN_OFFSET)
+#define HPIPE_G3_SET_1_G3_RX_DIGCK_DIV_OFFSET  11
+#define HPIPE_G3_SET_1_G3_RX_DIGCK_DIV_MASK     \
+       (0x3 << HPIPE_G3_SET_1_G3_RX_DIGCK_DIV_OFFSET)
+#define HPIPE_G3_SET_1_G3_SAMPLER_INPAIRX2_EN_OFFSET   13
+#define HPIPE_G3_SET_1_G3_SAMPLER_INPAIRX2_EN_MASK     \
+       (0x1 << HPIPE_G3_SET_1_G3_SAMPLER_INPAIRX2_EN_OFFSET)
 
 #define HPIPE_LOOPBACK_REG                     0x08c
 #define HPIPE_LOOPBACK_SEL_OFFSET              1
 #define HPIPE_INTERFACE_GEN_MAX_OFFSET         10
 #define HPIPE_INTERFACE_GEN_MAX_MASK           \
        (0x3 << HPIPE_INTERFACE_GEN_MAX_OFFSET)
+#define HPIPE_INTERFACE_DET_BYPASS_OFFSET      12
+#define HPIPE_INTERFACE_DET_BYPASS_MASK                \
+       (0x1 << HPIPE_INTERFACE_DET_BYPASS_OFFSET)
 #define HPIPE_INTERFACE_LINK_TRAIN_OFFSET      14
 #define HPIPE_INTERFACE_LINK_TRAIN_MASK                \
        (0x1 << HPIPE_INTERFACE_LINK_TRAIN_OFFSET)
 
 #define HPIPE_VTHIMPCAL_CTRL_REG                0x104
 
+#define HPIPE_VDD_CAL_CTRL_REG                 0x114
+#define HPIPE_EXT_SELLV_RXSAMPL_OFFSET         5
+#define HPIPE_EXT_SELLV_RXSAMPL_MASK           \
+       (0x1f << HPIPE_EXT_SELLV_RXSAMPL_OFFSET)
+
+#define HPIPE_VDD_CAL_0_REG                    0x108
+#define HPIPE_CAL_VDD_CONT_MODE_OFFSET         15
+#define HPIPE_CAL_VDD_CONT_MODE_MASK           \
+       (0x1 << HPIPE_CAL_VDD_CONT_MODE_OFFSET)
+
 #define HPIPE_PCIE_REG0                         0x120
 #define HPIPE_PCIE_IDLE_SYNC_OFFSET            12
 #define HPIPE_PCIE_IDLE_SYNC_MASK              \
 #define HPIPE_PWR_CTR_SFT_RST_MASK             \
        (0x1 << HPIPE_PWR_CTR_SFT_RST_OFFSET)
 
+#define HPIPE_SPD_DIV_FORCE_REG                                0x154
+#define HPIPE_TXDIGCK_DIV_FORCE_OFFSET                 7
+#define HPIPE_TXDIGCK_DIV_FORCE_MASK                   \
+       (0x1 << HPIPE_TXDIGCK_DIV_FORCE_OFFSET)
+#define HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_OFFSET          8
+#define HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_MASK            \
+       (0x3 << HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_OFFSET)
+#define HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_FORCE_OFFSET    10
+#define HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_FORCE_MASK      \
+       (0x1 << HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_FORCE_OFFSET)
+#define HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_OFFSET          13
+#define HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_MASK            \
+       (0x3 << HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_OFFSET)
+#define HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_FORCE_OFFSET    15
+#define HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_FORCE_MASK      \
+       (0x1 << HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_FORCE_OFFSET)
+
 #define HPIPE_PLLINTP_REG1                     0x150
 
 #define HPIPE_SAMPLER_N_PROC_CALIB_CTRL_REG    0x16C
+#define HPIPE_RX_SAMPLER_OS_GAIN_OFFSET                6
+#define HPIPE_RX_SAMPLER_OS_GAIN_MASK          \
+       (0x3 << HPIPE_RX_SAMPLER_OS_GAIN_OFFSET)
 #define HPIPE_SMAPLER_OFFSET                   12
 #define HPIPE_SMAPLER_MASK                     \
        (0x1 << HPIPE_SMAPLER_OFFSET)
 #define HPIPE_TX_REG1_SLC_EN_MASK              \
        (0x3f << HPIPE_TX_REG1_SLC_EN_OFFSET)
 
-#define HPIPE_PWR_CTR_DTL_REG                  0x184
-#define HPIPE_PWR_CTR_DTL_FLOOP_EN_OFFSET      2
-#define HPIPE_PWR_CTR_DTL_FLOOP_EN_MASK                \
+#define HPIPE_PWR_CTR_DTL_REG                          0x184
+#define HPIPE_PWR_CTR_DTL_SQ_DET_EN_OFFSET             0
+#define HPIPE_PWR_CTR_DTL_SQ_DET_EN_MASK               \
+       (0x1 << HPIPE_PWR_CTR_DTL_SQ_DET_EN_OFFSET)
+#define HPIPE_PWR_CTR_DTL_SQ_PLOOP_EN_OFFSET           1
+#define HPIPE_PWR_CTR_DTL_SQ_PLOOP_EN_MASK             \
+       (0x1 << HPIPE_PWR_CTR_DTL_SQ_PLOOP_EN_OFFSET)
+#define HPIPE_PWR_CTR_DTL_FLOOP_EN_OFFSET              2
+#define HPIPE_PWR_CTR_DTL_FLOOP_EN_MASK                        \
        (0x1 << HPIPE_PWR_CTR_DTL_FLOOP_EN_OFFSET)
-
-#define HPIPE_RX_REG3                          0x188
+#define HPIPE_PWR_CTR_DTL_CLAMPING_SEL_OFFSET          4
+#define HPIPE_PWR_CTR_DTL_CLAMPING_SEL_MASK            \
+       (0x7 << HPIPE_PWR_CTR_DTL_CLAMPING_SEL_OFFSET)
+#define HPIPE_PWR_CTR_DTL_INTPCLK_DIV_FORCE_OFFSET     10
+#define HPIPE_PWR_CTR_DTL_INTPCLK_DIV_FORCE_MASK       \
+       (0x1 << HPIPE_PWR_CTR_DTL_INTPCLK_DIV_FORCE_OFFSET)
+#define HPIPE_PWR_CTR_DTL_CLK_MODE_OFFSET              12
+#define HPIPE_PWR_CTR_DTL_CLK_MODE_MASK                        \
+       (0x3 << HPIPE_PWR_CTR_DTL_CLK_MODE_OFFSET)
+#define HPIPE_PWR_CTR_DTL_CLK_MODE_FORCE_OFFSET                14
+#define HPIPE_PWR_CTR_DTL_CLK_MODE_FORCE_MASK          \
+       (1 << HPIPE_PWR_CTR_DTL_CLK_MODE_FORCE_OFFSET)
+
+#define HPIPE_PHASE_CONTROL_REG                        0x188
+#define HPIPE_OS_PH_OFFSET_OFFSET              0
+#define HPIPE_OS_PH_OFFSET_MASK                        \
+       (0x7f << HPIPE_OS_PH_OFFSET_OFFSET)
+#define HPIPE_OS_PH_OFFSET_FORCE_OFFSET                7
+#define HPIPE_OS_PH_OFFSET_FORCE_MASK          \
+       (0x1 << HPIPE_OS_PH_OFFSET_FORCE_OFFSET)
+#define HPIPE_OS_PH_VALID_OFFSET               8
+#define HPIPE_OS_PH_VALID_MASK                 \
+       (0x1 << HPIPE_OS_PH_VALID_OFFSET)
+
+#define HPIPE_FRAME_DETECT_CTRL_0_REG                  0x214
+#define HPIPE_TRAIN_PAT_NUM_OFFSET                     0x7
+#define HPIPE_TRAIN_PAT_NUM_MASK                       \
+       (0x1FF << HPIPE_TRAIN_PAT_NUM_OFFSET)
+
+#define HPIPE_FRAME_DETECT_CTRL_3_REG                  0x220
+#define HPIPE_PATTERN_LOCK_LOST_TIMEOUT_EN_OFFSET      12
+#define HPIPE_PATTERN_LOCK_LOST_TIMEOUT_EN_MASK                \
+       (0x1 << HPIPE_PATTERN_LOCK_LOST_TIMEOUT_EN_OFFSET)
+
+#define HPIPE_DME_REG                                  0x228
+#define HPIPE_DME_ETHERNET_MODE_OFFSET                 7
+#define HPIPE_DME_ETHERNET_MODE_MASK                   \
+       (0x1 << HPIPE_DME_ETHERNET_MODE_OFFSET)
 
 #define HPIPE_TX_TRAIN_CTRL_0_REG              0x268
 #define HPIPE_TX_TRAIN_P2P_HOLD_OFFSET         15
 #define HPIPE_PCIE_REG3                                0x290
 
 #define HPIPE_TX_TRAIN_CTRL_5_REG              0x2A4
+#define HPIPE_RX_TRAIN_TIMER_OFFSET            0
+#define HPIPE_RX_TRAIN_TIMER_MASK              \
+       (0x3ff << HPIPE_RX_TRAIN_TIMER_OFFSET)
 #define HPIPE_TX_TRAIN_START_SQ_EN_OFFSET      11
 #define HPIPE_TX_TRAIN_START_SQ_EN_MASK                \
        (0x1 << HPIPE_TX_TRAIN_START_SQ_EN_OFFSET)
 #define HPIPE_TX_TRAIN_COE_FM_PIN_PCIE3_OFFSET 7
 #define HPIPE_TX_TRAIN_COE_FM_PIN_PCIE3_MASK   \
        (0x1 << HPIPE_TX_TRAIN_COE_FM_PIN_PCIE3_OFFSET)
+#define HPIPE_TX_TRAIN_16BIT_AUTO_EN_OFFSET    8
+#define HPIPE_TX_TRAIN_16BIT_AUTO_EN_MASK      \
+       (0x1 << HPIPE_TX_TRAIN_16BIT_AUTO_EN_OFFSET)
+#define HPIPE_TX_TRAIN_PAT_SEL_OFFSET          9
+#define HPIPE_TX_TRAIN_PAT_SEL_MASK            \
+       (0x1 << HPIPE_TX_TRAIN_PAT_SEL_OFFSET)
+
+#define HPIPE_CDR_CONTROL_REG                  0x418
+#define HPIPE_CDR_RX_MAX_DFE_ADAPT_1_OFFSET    12
+#define HPIPE_CDR_RX_MAX_DFE_ADAPT_1_MASK      \
+       (0x3 << HPIPE_CDR_RX_MAX_DFE_ADAPT_1_OFFSET)
+#define HPIPE_CDR_MAX_DFE_ADAPT_0_OFFSET       9
+#define HPIPE_CDR_MAX_DFE_ADAPT_0_MASK         \
+       (0x7 << HPIPE_CDR_MAX_DFE_ADAPT_0_OFFSET)
+#define HPIPE_CDR_MAX_DFE_ADAPT_1_OFFSET       6
+#define HPIPE_CDR_MAX_DFE_ADAPT_1_MASK         \
+       (0x7 << HPIPE_CDR_MAX_DFE_ADAPT_1_OFFSET)
 
 #define HPIPE_TX_TRAIN_CTRL_11_REG             0x438
 #define HPIPE_TX_STATUS_CHECK_MODE_OFFSET      6
 #define HPIPE_TX_SWEEP_PRESET_EN_MASK          \
        (0x1 << HPIPE_TX_SWEEP_PRESET_EN_OFFSET)
 
-#define HPIPE_G1_SETTINGS_3_REG                        0x440
-#define HPIPE_G1_SETTINGS_3_G1_FBCK_SEL_OFFSET 9
-#define HPIPE_G1_SETTINGS_3_G1_FBCK_SEL_MASK   \
+#define HPIPE_G1_SETTINGS_3_REG                                0x440
+#define HPIPE_G1_SETTINGS_3_G1_FFE_CAP_SEL_OFFSET      0
+#define HPIPE_G1_SETTINGS_3_G1_FFE_CAP_SEL_MASK                \
+       (0xf << HPIPE_G1_SETTINGS_3_G1_FFE_CAP_SEL_OFFSET)
+#define HPIPE_G1_SETTINGS_3_G1_FFE_RES_SEL_OFFSET      4
+#define HPIPE_G1_SETTINGS_3_G1_FFE_RES_SEL_MASK                \
+       (0x7 << HPIPE_G1_SETTINGS_3_G1_FFE_RES_SEL_OFFSET)
+#define HPIPE_G1_SETTINGS_3_G1_FFE_SETTING_FORCE_OFFSET        7
+#define HPIPE_G1_SETTINGS_3_G1_FFE_SETTING_FORCE_MASK  \
+       (0x1 << HPIPE_G1_SETTINGS_3_G1_FFE_SETTING_FORCE_OFFSET)
+#define HPIPE_G1_SETTINGS_3_G1_FBCK_SEL_OFFSET         9
+#define HPIPE_G1_SETTINGS_3_G1_FBCK_SEL_MASK           \
        (0x1 << HPIPE_G1_SETTINGS_3_G1_FBCK_SEL_OFFSET)
+#define HPIPE_G1_SETTINGS_3_G1_FFE_DEG_RES_LEVEL_OFFSET        12
+#define HPIPE_G1_SETTINGS_3_G1_FFE_DEG_RES_LEVEL_MASK  \
+       (0x3 << HPIPE_G1_SETTINGS_3_G1_FFE_DEG_RES_LEVEL_OFFSET)
+#define HPIPE_G1_SETTINGS_3_G1_FFE_LOAD_RES_LEVEL_OFFSET       14
+#define HPIPE_G1_SETTINGS_3_G1_FFE_LOAD_RES_LEVEL_MASK \
+       (0x3 << HPIPE_G1_SETTINGS_3_G1_FFE_LOAD_RES_LEVEL_OFFSET)
 
 #define HPIPE_G1_SETTINGS_4_REG                        0x444
 #define HPIPE_G1_SETTINGS_4_G1_DFE_RES_OFFSET  8
        (0x3 << HPIPE_G1_SETTINGS_4_G1_DFE_RES_OFFSET)
 
 #define HPIPE_G2_SETTINGS_3_REG                        0x448
-#define HPIPE_G2_SETTINGS_4_REG                        0x44C
+
+#define HPIPE_G2_SETTINGS_4_REG                        0x44c
+#define HPIPE_G2_DFE_RES_OFFSET                        8
+#define HPIPE_G2_DFE_RES_MASK                  \
+       (0x3 << HPIPE_G2_DFE_RES_OFFSET)
 
 #define HPIPE_G3_SETTING_3_REG                 0x450
+#define HPIPE_G3_FFE_CAP_SEL_OFFSET            0
+#define HPIPE_G3_FFE_CAP_SEL_MASK              \
+       (0xf << HPIPE_G3_FFE_CAP_SEL_OFFSET)
+#define HPIPE_G3_FFE_RES_SEL_OFFSET            4
+#define HPIPE_G3_FFE_RES_SEL_MASK              \
+       (0x7 << HPIPE_G3_FFE_RES_SEL_OFFSET)
+#define HPIPE_G3_FFE_SETTING_FORCE_OFFSET      7
+#define HPIPE_G3_FFE_SETTING_FORCE_MASK                \
+       (0x1 << HPIPE_G3_FFE_SETTING_FORCE_OFFSET)
 #define HPIPE_G3_FFE_DEG_RES_LEVEL_OFFSET      12
 #define HPIPE_G3_FFE_DEG_RES_LEVEL_MASK                \
        (0x3 << HPIPE_G3_FFE_DEG_RES_LEVEL_OFFSET)
 #define HPIPE_G3_DFE_RES_MASK                  \
        (0x3 << HPIPE_G3_DFE_RES_OFFSET)
 
+#define HPIPE_TX_PRESET_INDEX_REG              0x468
+#define HPIPE_TX_PRESET_INDEX_OFFSET           0
+#define HPIPE_TX_PRESET_INDEX_MASK             \
+       (0xf << HPIPE_TX_PRESET_INDEX_OFFSET)
+
+#define HPIPE_DFE_CONTROL_REG                  0x470
+#define HPIPE_DFE_TX_MAX_DFE_ADAPT_OFFSET      14
+#define HPIPE_DFE_TX_MAX_DFE_ADAPT_MASK                \
+       (0x3 << HPIPE_DFE_TX_MAX_DFE_ADAPT_OFFSET)
+
 #define HPIPE_DFE_CTRL_28_REG                  0x49C
 #define HPIPE_DFE_CTRL_28_PIPE4_OFFSET         7
 #define HPIPE_DFE_CTRL_28_PIPE4_MASK           \
 #define HPIPE_G1_SETTING_5_G1_ICP_MASK         \
        (0xf << HPIPE_G1_SETTING_5_G1_ICP_OFFSET)
 
+#define HPIPE_G3_SETTING_5_REG                 0x548
+#define HPIPE_G3_SETTING_5_G3_ICP_OFFSET       0
+#define HPIPE_G3_SETTING_5_G3_ICP_MASK         \
+       (0xf << HPIPE_G3_SETTING_5_G3_ICP_OFFSET)
+
 #define HPIPE_LANE_CONFIG0_REG                 0x600
 #define HPIPE_LANE_CONFIG0_TXDEEMPH0_OFFSET    0
 #define HPIPE_LANE_CONFIG0_TXDEEMPH0_MASK      \
 #define HPIPE_LANE_CFG4_DFE_CTRL_OFFSET                0
 #define HPIPE_LANE_CFG4_DFE_CTRL_MASK          \
        (0x7 << HPIPE_LANE_CFG4_DFE_CTRL_OFFSET)
+#define HPIPE_LANE_CFG4_DFE_EN_SEL_OFFSET      3
+#define HPIPE_LANE_CFG4_DFE_EN_SEL_MASK                \
+       (0x1 << HPIPE_LANE_CFG4_DFE_EN_SEL_OFFSET)
 #define HPIPE_LANE_CFG4_DFE_OVER_OFFSET                6
 #define HPIPE_LANE_CFG4_DFE_OVER_MASK          \
        (0x1 << HPIPE_LANE_CFG4_DFE_OVER_OFFSET)
 #define HPIPE_CFG_UPDATE_POLARITY_MASK         \
        (0x1 << HPIPE_CFG_UPDATE_POLARITY_OFFSET)
 
+#define HPIPE_LANE_EQ_REMOTE_SETTING_REG       0x6f8
+#define HPIPE_LANE_CFG_FOM_DIRN_OVERRIDE_OFFSET        0
+#define HPIPE_LANE_CFG_FOM_DIRN_OVERRIDE_MASK  \
+       (0x1 << HPIPE_LANE_CFG_FOM_DIRN_OVERRIDE_OFFSET)
+#define HPIPE_LANE_CFG_FOM_ONLY_MODE_OFFFSET   1
+#define HPIPE_LANE_CFG_FOM_ONLY_MODE_MASK      \
+       (0x1 << HPIPE_LANE_CFG_FOM_ONLY_MODE_OFFFSET)
+#define HPIPE_LANE_CFG_FOM_PRESET_VECTOR_OFFSET        2
+#define HPIPE_LANE_CFG_FOM_PRESET_VECTOR_MASK  \
+       (0xf << HPIPE_LANE_CFG_FOM_PRESET_VECTOR_OFFSET)
+
 #define HPIPE_RST_CLK_CTRL_REG                 0x704
 #define HPIPE_RST_CLK_CTRL_PIPE_RST_OFFSET     0
 #define HPIPE_RST_CLK_CTRL_PIPE_RST_MASK       \
index 1dc7426b638cf5eb7c16c23a8e51a723e6fea3e7..b036fb13b9c5ec62738cacca73c608a794485ac6 100644 (file)
@@ -27,6 +27,10 @@ static void comphy_mux_check_config(struct comphy_mux_data *mux_data,
 
        for (lane = 0; lane < comphy_max_lanes;
             lane++, comphy_map_data++, mux_data++) {
+               /* Don't check ignored COMPHYs */
+               if (comphy_map_data->type == PHY_TYPE_IGNORE)
+                       continue;
+
                mux_opt = mux_data->mux_values;
                for (opt = 0, valid = 0; opt < mux_data->max_lane_values;
                     opt++, mux_opt++) {
@@ -83,6 +87,9 @@ static void comphy_mux_reg_write(struct comphy_mux_data *mux_data,
 
        for (lane = 0; lane < comphy_max_lanes;
             lane++, comphy_map_data++, mux_data++) {
+               if (comphy_map_data->type == PHY_TYPE_IGNORE)
+                       continue;
+
                offset = lane * bitcount;
                mask = (((1 << bitcount) - 1) << offset);
                value = (comphy_mux_get_mux_value(mux_data,
diff --git a/drivers/phy/phy-uclass.c b/drivers/phy/phy-uclass.c
new file mode 100644 (file)
index 0000000..0d8bef7
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
+ * Written by Jean-Jacques Hiblot  <jjhiblot@ti.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <generic-phy.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static inline struct phy_ops *phy_dev_ops(struct udevice *dev)
+{
+       return (struct phy_ops *)dev->driver->ops;
+}
+
+static int generic_phy_xlate_offs_flags(struct phy *phy,
+                                struct fdtdec_phandle_args *args)
+{
+       debug("%s(phy=%p)\n", __func__, phy);
+
+       if (args->args_count > 1) {
+               debug("Invaild args_count: %d\n", args->args_count);
+               return -EINVAL;
+       }
+
+       if (args->args_count)
+               phy->id = args->args[0];
+       else
+               phy->id = 0;
+
+
+       return 0;
+}
+
+int generic_phy_get_by_index(struct udevice *dev, int index,
+                            struct phy *phy)
+{
+       struct fdtdec_phandle_args args;
+       struct phy_ops *ops;
+       int ret;
+       struct udevice *phydev;
+
+       debug("%s(dev=%p, index=%d, phy=%p)\n", __func__, dev, index, phy);
+
+       assert(phy);
+       ret = fdtdec_parse_phandle_with_args(gd->fdt_blob, dev_of_offset(dev),
+                                            "phys", "#phy-cells", 0, index,
+                                            &args);
+       if (ret) {
+               debug("%s: fdtdec_parse_phandle_with_args failed: err=%d\n",
+                     __func__, ret);
+               return ret;
+       }
+
+       ret = uclass_get_device_by_of_offset(UCLASS_PHY, args.node, &phydev);
+       if (ret) {
+               debug("%s: uclass_get_device_by_of_offset failed: err=%d\n",
+                     __func__, ret);
+               return ret;
+       }
+
+       phy->dev = phydev;
+
+       ops = phy_dev_ops(phydev);
+
+       if (ops->of_xlate)
+               ret = ops->of_xlate(phy, &args);
+       else
+               ret = generic_phy_xlate_offs_flags(phy, &args);
+       if (ret) {
+               debug("of_xlate() failed: %d\n", ret);
+               goto err;
+       }
+
+       return 0;
+
+err:
+       return ret;
+}
+
+int generic_phy_get_by_name(struct udevice *dev, const char *phy_name,
+                           struct phy *phy)
+{
+       int index;
+
+       debug("%s(dev=%p, name=%s, phy=%p)\n", __func__, dev, phy_name, phy);
+
+       index = fdt_stringlist_search(gd->fdt_blob, dev_of_offset(dev),
+                                     "phy-names", phy_name);
+       if (index < 0) {
+               debug("fdt_stringlist_search() failed: %d\n", index);
+               return index;
+       }
+
+       return generic_phy_get_by_index(dev, index, phy);
+}
+
+int generic_phy_init(struct phy *phy)
+{
+       struct phy_ops const *ops = phy_dev_ops(phy->dev);
+
+       return ops->init ? ops->init(phy) : 0;
+}
+
+int generic_phy_reset(struct phy *phy)
+{
+       struct phy_ops const *ops = phy_dev_ops(phy->dev);
+
+       return ops->reset ? ops->reset(phy) : 0;
+}
+
+int generic_phy_exit(struct phy *phy)
+{
+       struct phy_ops const *ops = phy_dev_ops(phy->dev);
+
+       return ops->exit ? ops->exit(phy) : 0;
+}
+
+int generic_phy_power_on(struct phy *phy)
+{
+       struct phy_ops const *ops = phy_dev_ops(phy->dev);
+
+       return ops->power_on ? ops->power_on(phy) : 0;
+}
+
+int generic_phy_power_off(struct phy *phy)
+{
+       struct phy_ops const *ops = phy_dev_ops(phy->dev);
+
+       return ops->power_off ? ops->power_off(phy) : 0;
+}
+
+UCLASS_DRIVER(phy) = {
+       .id             = UCLASS_PHY,
+       .name           = "phy",
+};
diff --git a/drivers/phy/sandbox-phy.c b/drivers/phy/sandbox-phy.c
new file mode 100644 (file)
index 0000000..9ad820c
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
+ * Written by Jean-Jacques Hiblot  <jjhiblot@ti.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <generic-phy.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+struct sandbox_phy_priv {
+       bool initialized;
+       bool on;
+       bool broken;
+};
+
+static int sandbox_phy_power_on(struct phy *phy)
+{
+       struct sandbox_phy_priv *priv = dev_get_priv(phy->dev);
+
+       if (!priv->initialized)
+               return -EIO;
+
+       if (priv->broken)
+               return -EIO;
+
+       priv->on = true;
+
+       return 0;
+}
+
+static int sandbox_phy_power_off(struct phy *phy)
+{
+       struct sandbox_phy_priv *priv = dev_get_priv(phy->dev);
+
+       if (!priv->initialized)
+               return -EIO;
+
+       if (priv->broken)
+               return -EIO;
+
+       /*
+        * for validation purpose, let's says that power off
+        * works only for PHY 0
+        */
+       if (phy->id)
+               return -EIO;
+
+       priv->on = false;
+
+       return 0;
+}
+
+static int sandbox_phy_init(struct phy *phy)
+{
+       struct sandbox_phy_priv *priv = dev_get_priv(phy->dev);
+
+       priv->initialized = true;
+       priv->on = true;
+
+       return 0;
+}
+
+static int sandbox_phy_exit(struct phy *phy)
+{
+       struct sandbox_phy_priv *priv = dev_get_priv(phy->dev);
+
+       priv->initialized = false;
+       priv->on = false;
+
+       return 0;
+}
+
+static int sandbox_phy_probe(struct udevice *dev)
+{
+       struct sandbox_phy_priv *priv = dev_get_priv(dev);
+
+       priv->initialized = false;
+       priv->on = false;
+       priv->broken = fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
+                                      "broken");
+
+       return 0;
+}
+
+static struct phy_ops sandbox_phy_ops = {
+       .power_on = sandbox_phy_power_on,
+       .power_off = sandbox_phy_power_off,
+       .init = sandbox_phy_init,
+       .exit = sandbox_phy_exit,
+};
+
+static const struct udevice_id sandbox_phy_ids[] = {
+       { .compatible = "sandbox,phy" },
+       { }
+};
+
+U_BOOT_DRIVER(phy_sandbox) = {
+       .name           = "phy_sandbox",
+       .id             = UCLASS_PHY,
+       .of_match       = sandbox_phy_ids,
+       .ops            = &sandbox_phy_ops,
+       .probe          = sandbox_phy_probe,
+       .priv_auto_alloc_size = sizeof(struct sandbox_phy_priv),
+};
diff --git a/drivers/phy/ti-pipe3-phy.c b/drivers/phy/ti-pipe3-phy.c
new file mode 100644 (file)
index 0000000..ed80f0f
--- /dev/null
@@ -0,0 +1,373 @@
+/*
+ * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
+ * Written by Jean-Jacques Hiblot  <jjhiblot@ti.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <dm/device.h>
+#include <generic-phy.h>
+#include <asm/io.h>
+#include <asm/arch/sys_proto.h>
+#include <syscon.h>
+#include <regmap.h>
+
+/* PLLCTRL Registers */
+#define PLL_STATUS              0x00000004
+#define PLL_GO                  0x00000008
+#define PLL_CONFIGURATION1      0x0000000C
+#define PLL_CONFIGURATION2      0x00000010
+#define PLL_CONFIGURATION3      0x00000014
+#define PLL_CONFIGURATION4      0x00000020
+
+#define PLL_REGM_MASK           0x001FFE00
+#define PLL_REGM_SHIFT          9
+#define PLL_REGM_F_MASK         0x0003FFFF
+#define PLL_REGM_F_SHIFT        0
+#define PLL_REGN_MASK           0x000001FE
+#define PLL_REGN_SHIFT          1
+#define PLL_SELFREQDCO_MASK     0x0000000E
+#define PLL_SELFREQDCO_SHIFT    1
+#define PLL_SD_MASK             0x0003FC00
+#define PLL_SD_SHIFT            10
+#define SET_PLL_GO              0x1
+#define PLL_TICOPWDN            BIT(16)
+#define PLL_LDOPWDN             BIT(15)
+#define PLL_LOCK                0x2
+#define PLL_IDLE                0x1
+
+/* Software rest for the SATA PLL (in CTRL_CORE_SMA_SW_0 register)*/
+#define SATA_PLL_SOFT_RESET (1<<18)
+
+/* PHY POWER CONTROL Register */
+#define OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_CMD_MASK         0x003FC000
+#define OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_CMD_SHIFT        0xE
+
+#define OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_FREQ_MASK        0xFFC00000
+#define OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_FREQ_SHIFT       0x16
+
+#define OMAP_CTRL_PIPE3_PHY_TX_RX_POWERON       0x3
+#define OMAP_CTRL_PIPE3_PHY_TX_RX_POWEROFF      0x0
+
+
+#define PLL_IDLE_TIME   100     /* in milliseconds */
+#define PLL_LOCK_TIME   100     /* in milliseconds */
+
+struct omap_pipe3 {
+       void __iomem            *pll_ctrl_base;
+       void __iomem            *power_reg;
+       void __iomem            *pll_reset_reg;
+       struct pipe3_dpll_map   *dpll_map;
+};
+
+
+struct pipe3_dpll_params {
+       u16     m;
+       u8      n;
+       u8      freq:3;
+       u8      sd;
+       u32     mf;
+};
+
+struct pipe3_dpll_map {
+       unsigned long rate;
+       struct pipe3_dpll_params params;
+};
+
+static inline u32 omap_pipe3_readl(void __iomem *addr, unsigned offset)
+{
+       return readl(addr + offset);
+}
+
+static inline void omap_pipe3_writel(void __iomem *addr, unsigned offset,
+               u32 data)
+{
+       writel(data, addr + offset);
+}
+
+static struct pipe3_dpll_params *omap_pipe3_get_dpll_params(struct omap_pipe3
+                                                                       *pipe3)
+{
+       u32 rate;
+       struct pipe3_dpll_map *dpll_map = pipe3->dpll_map;
+
+       rate = get_sys_clk_freq();
+
+       for (; dpll_map->rate; dpll_map++) {
+               if (rate == dpll_map->rate)
+                       return &dpll_map->params;
+       }
+
+       printf("%s: No DPLL configuration for %u Hz SYS CLK\n",
+              __func__, rate);
+       return NULL;
+}
+
+static int omap_pipe3_wait_lock(struct omap_pipe3 *pipe3)
+{
+       u32 val;
+       int timeout = PLL_LOCK_TIME;
+
+       do {
+               mdelay(1);
+               val = omap_pipe3_readl(pipe3->pll_ctrl_base, PLL_STATUS);
+               if (val & PLL_LOCK)
+                       break;
+       } while (--timeout);
+
+       if (!(val & PLL_LOCK)) {
+               printf("%s: DPLL failed to lock\n", __func__);
+               return -EBUSY;
+       }
+
+       return 0;
+}
+
+static int omap_pipe3_dpll_program(struct omap_pipe3 *pipe3)
+{
+       u32                     val;
+       struct pipe3_dpll_params *dpll_params;
+
+       dpll_params = omap_pipe3_get_dpll_params(pipe3);
+       if (!dpll_params) {
+               printf("%s: Invalid DPLL parameters\n", __func__);
+               return -EINVAL;
+       }
+
+       val = omap_pipe3_readl(pipe3->pll_ctrl_base, PLL_CONFIGURATION1);
+       val &= ~PLL_REGN_MASK;
+       val |= dpll_params->n << PLL_REGN_SHIFT;
+       omap_pipe3_writel(pipe3->pll_ctrl_base, PLL_CONFIGURATION1, val);
+
+       val = omap_pipe3_readl(pipe3->pll_ctrl_base, PLL_CONFIGURATION2);
+       val &= ~PLL_SELFREQDCO_MASK;
+       val |= dpll_params->freq << PLL_SELFREQDCO_SHIFT;
+       omap_pipe3_writel(pipe3->pll_ctrl_base, PLL_CONFIGURATION2, val);
+
+       val = omap_pipe3_readl(pipe3->pll_ctrl_base, PLL_CONFIGURATION1);
+       val &= ~PLL_REGM_MASK;
+       val |= dpll_params->m << PLL_REGM_SHIFT;
+       omap_pipe3_writel(pipe3->pll_ctrl_base, PLL_CONFIGURATION1, val);
+
+       val = omap_pipe3_readl(pipe3->pll_ctrl_base, PLL_CONFIGURATION4);
+       val &= ~PLL_REGM_F_MASK;
+       val |= dpll_params->mf << PLL_REGM_F_SHIFT;
+       omap_pipe3_writel(pipe3->pll_ctrl_base, PLL_CONFIGURATION4, val);
+
+       val = omap_pipe3_readl(pipe3->pll_ctrl_base, PLL_CONFIGURATION3);
+       val &= ~PLL_SD_MASK;
+       val |= dpll_params->sd << PLL_SD_SHIFT;
+       omap_pipe3_writel(pipe3->pll_ctrl_base, PLL_CONFIGURATION3, val);
+
+       omap_pipe3_writel(pipe3->pll_ctrl_base, PLL_GO, SET_PLL_GO);
+
+       return omap_pipe3_wait_lock(pipe3);
+}
+
+static void omap_control_pipe3_power(struct omap_pipe3 *pipe3, int on)
+{
+       u32 val, rate;
+
+       val = readl(pipe3->power_reg);
+
+       rate = get_sys_clk_freq();
+       rate = rate/1000000;
+
+       if (on) {
+               val &= ~(OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_CMD_MASK |
+                               OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_FREQ_MASK);
+               val |= OMAP_CTRL_PIPE3_PHY_TX_RX_POWERON <<
+                       OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_CMD_SHIFT;
+               val |= rate <<
+                       OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_FREQ_SHIFT;
+       } else {
+               val &= ~OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_CMD_MASK;
+               val |= OMAP_CTRL_PIPE3_PHY_TX_RX_POWEROFF <<
+                       OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_CMD_SHIFT;
+       }
+
+       writel(val, pipe3->power_reg);
+}
+
+static int pipe3_init(struct phy *phy)
+{
+       int ret;
+       u32 val;
+       struct omap_pipe3 *pipe3 = dev_get_priv(phy->dev);
+
+       /* Program the DPLL only if not locked */
+       val = omap_pipe3_readl(pipe3->pll_ctrl_base, PLL_STATUS);
+       if (!(val & PLL_LOCK)) {
+               ret = omap_pipe3_dpll_program(pipe3);
+               if (ret)
+                       return ret;
+       } else {
+               /* else just bring it out of IDLE mode */
+               val = omap_pipe3_readl(pipe3->pll_ctrl_base,
+                                      PLL_CONFIGURATION2);
+               if (val & PLL_IDLE) {
+                       val &= ~PLL_IDLE;
+                       omap_pipe3_writel(pipe3->pll_ctrl_base,
+                                         PLL_CONFIGURATION2, val);
+                       ret = omap_pipe3_wait_lock(pipe3);
+                       if (ret)
+                               return ret;
+               }
+       }
+       return 0;
+}
+
+static int pipe3_power_on(struct phy *phy)
+{
+       struct omap_pipe3 *pipe3 = dev_get_priv(phy->dev);
+
+       /* Power up the PHY */
+       omap_control_pipe3_power(pipe3, 1);
+
+       return 0;
+}
+
+static int pipe3_power_off(struct phy *phy)
+{
+       struct omap_pipe3 *pipe3 = dev_get_priv(phy->dev);
+
+       /* Power down the PHY */
+       omap_control_pipe3_power(pipe3, 0);
+
+       return 0;
+}
+
+static int pipe3_exit(struct phy *phy)
+{
+       u32 val;
+       int timeout = PLL_IDLE_TIME;
+       struct omap_pipe3 *pipe3 = dev_get_priv(phy->dev);
+
+       pipe3_power_off(phy);
+
+       /* Put DPLL in IDLE mode */
+       val = omap_pipe3_readl(pipe3->pll_ctrl_base, PLL_CONFIGURATION2);
+       val |= PLL_IDLE;
+       omap_pipe3_writel(pipe3->pll_ctrl_base, PLL_CONFIGURATION2, val);
+
+       /* wait for LDO and Oscillator to power down */
+       do {
+               mdelay(1);
+               val = omap_pipe3_readl(pipe3->pll_ctrl_base, PLL_STATUS);
+               if ((val & PLL_TICOPWDN) && (val & PLL_LDOPWDN))
+                       break;
+       } while (--timeout);
+
+       if (!(val & PLL_TICOPWDN) || !(val & PLL_LDOPWDN)) {
+               error("%s: Failed to power down DPLL: PLL_STATUS 0x%x\n",
+                     __func__, val);
+               return -EBUSY;
+       }
+
+       val = readl(pipe3->pll_reset_reg);
+       writel(val | SATA_PLL_SOFT_RESET, pipe3->pll_reset_reg);
+       mdelay(1);
+       writel(val & ~SATA_PLL_SOFT_RESET, pipe3->pll_reset_reg);
+       return 0;
+}
+
+static void *get_reg(struct udevice *dev, const char *name)
+{
+       struct udevice *syscon;
+       struct regmap *regmap;
+       const fdt32_t *cell;
+       int len, err;
+       void *base;
+
+       err = uclass_get_device_by_phandle(UCLASS_SYSCON, dev,
+                                          name, &syscon);
+       if (err) {
+               error("unable to find syscon device for %s (%d)\n",
+                     name, err);
+               return NULL;
+       }
+
+       regmap = syscon_get_regmap(syscon);
+       if (IS_ERR(regmap)) {
+               error("unable to find regmap for %s (%ld)\n",
+                     name, PTR_ERR(regmap));
+               return NULL;
+       }
+
+       cell = fdt_getprop(gd->fdt_blob, dev->of_offset, name,
+                          &len);
+       if (len < 2*sizeof(fdt32_t)) {
+               error("offset not available for %s\n", name);
+               return NULL;
+       }
+
+       base = regmap_get_range(regmap, 0);
+       if (!base)
+               return NULL;
+
+       return fdtdec_get_number(cell + 1, 1) + base;
+}
+
+static int pipe3_phy_probe(struct udevice *dev)
+{
+       fdt_addr_t addr;
+       fdt_size_t sz;
+       struct omap_pipe3 *pipe3 = dev_get_priv(dev);
+
+       addr = dev_get_addr_size_index(dev, 2, &sz);
+       if (addr == FDT_ADDR_T_NONE) {
+               error("missing pll ctrl address\n");
+               return -EINVAL;
+       }
+
+       pipe3->pll_ctrl_base = map_physmem(addr, sz, MAP_NOCACHE);
+       if (!pipe3->pll_ctrl_base) {
+               error("unable to remap pll ctrl\n");
+               return -EINVAL;
+       }
+
+       pipe3->power_reg = get_reg(dev, "syscon-phy-power");
+       if (!pipe3->power_reg)
+               return -EINVAL;
+
+       pipe3->pll_reset_reg = get_reg(dev, "syscon-pllreset");
+       if (!pipe3->pll_reset_reg)
+               return -EINVAL;
+
+       pipe3->dpll_map = (struct pipe3_dpll_map *)dev_get_driver_data(dev);
+
+       return 0;
+}
+
+static struct pipe3_dpll_map dpll_map_sata[] = {
+       {12000000, {1000, 7, 4, 6, 0} },        /* 12 MHz */
+       {16800000, {714, 7, 4, 6, 0} },         /* 16.8 MHz */
+       {19200000, {625, 7, 4, 6, 0} },         /* 19.2 MHz */
+       {20000000, {600, 7, 4, 6, 0} },         /* 20 MHz */
+       {26000000, {461, 7, 4, 6, 0} },         /* 26 MHz */
+       {38400000, {312, 7, 4, 6, 0} },         /* 38.4 MHz */
+       { },                                    /* Terminator */
+};
+
+static const struct udevice_id pipe3_phy_ids[] = {
+       { .compatible = "ti,phy-pipe3-sata", .data = (ulong)&dpll_map_sata },
+       { }
+};
+
+static struct phy_ops pipe3_phy_ops = {
+       .init = pipe3_init,
+       .power_on = pipe3_power_on,
+       .power_off = pipe3_power_off,
+       .exit = pipe3_exit,
+};
+
+U_BOOT_DRIVER(pipe3_phy) = {
+       .name   = "pipe3_phy",
+       .id     = UCLASS_PHY,
+       .of_match = pipe3_phy_ids,
+       .ops = &pipe3_phy_ops,
+       .probe = pipe3_phy_probe,
+       .priv_auto_alloc_size = sizeof(struct omap_pipe3),
+};
index f0321c4057651cf3d2a89f5d3f80f5f2a5687ba1..ebc14a31f1ec103f8954789004de1469ae8792b4 100644 (file)
@@ -53,6 +53,7 @@ static int imx_pinctrl_set_state(struct udevice *dev, struct udevice *config)
        if (fdtdec_get_int_array(gd->fdt_blob, node, "fsl,pins",
                                 pin_data, size >> 2)) {
                dev_err(dev, "Error reading pin data.\n");
+               devm_kfree(dev, pin_data);
                return -EINVAL;
        }
 
@@ -78,6 +79,7 @@ static int imx_pinctrl_set_state(struct udevice *dev, struct udevice *config)
 
                if ((mux_reg == -1) || (conf_reg == -1)) {
                        dev_err(dev, "Error mux_reg or conf_reg\n");
+                       devm_kfree(dev, pin_data);
                        return -EINVAL;
                }
 
@@ -166,6 +168,8 @@ static int imx_pinctrl_set_state(struct udevice *dev, struct udevice *config)
                }
        }
 
+       devm_kfree(dev, pin_data);
+
        return 0;
 }
 
index d2dcec0d135e04da3b9de3c8aa8cff12363858a6..f19f7791f07b98323735602f9dc35aeb134d27a8 100644 (file)
@@ -47,27 +47,27 @@ static int single_configure_pins(struct udevice *dev,
        int n, reg;
        u32 val;
 
-       for (n = 0; n < count; n++) {
+       for (n = 0; n < count; n++, pins++) {
                reg = fdt32_to_cpu(pins->reg);
                if ((reg < 0) || (reg > pdata->offset)) {
                        dev_dbg(dev, "  invalid register offset 0x%08x\n", reg);
-                       pins++;
                        continue;
                }
                reg += pdata->base;
+               val = fdt32_to_cpu(pins->val) & pdata->mask;
                switch (pdata->width) {
+               case 16:
+                       writew((readw(reg) & ~pdata->mask) | val, reg);
+                       break;
                case 32:
-                       val = readl(reg) & ~pdata->mask;
-                       val |= fdt32_to_cpu(pins->val) & pdata->mask;
-                       writel(val, reg);
-                       dev_dbg(dev, "  reg/val 0x%08x/0x%08x\n",
-                               reg, val);
+                       writel((readl(reg) & ~pdata->mask) | val, reg);
                        break;
                default:
                        dev_warn(dev, "unsupported register width %i\n",
                                 pdata->width);
+                       continue;
                }
-               pins++;
+               dev_dbg(dev, "  reg/val 0x%08x/0x%08x\n",reg, val);
        }
        return 0;
 }
index 507bec4a969c0852149698e66084d0113342c766..d93b90310b0ab3f9aa8647b8779f6daa3ff4fa21 100644 (file)
@@ -145,7 +145,19 @@ static int pinctrl_rk3399_spi_config(struct rk3399_grf_regs *grf,
                             | GRF_SPI2TPM_CLK << GRF_GPIO2B3_SEL_SHIFT
                             | GRF_SPI2TPM_CSN0 << GRF_GPIO2B4_SEL_SHIFT);
                break;
+       case PERIPH_ID_SPI5:
+               if (cs != 0)
+                       goto err;
+               rk_clrsetreg(&grf->gpio2c_iomux,
+                            GRF_GPIO2C4_SEL_MASK | GRF_GPIO2C5_SEL_MASK
+                            | GRF_GPIO2C6_SEL_MASK | GRF_GPIO2C7_SEL_MASK,
+                            GRF_SPI5EXPPLUS_RXD << GRF_GPIO2C4_SEL_SHIFT
+                            | GRF_SPI5EXPPLUS_TXD << GRF_GPIO2C5_SEL_SHIFT
+                            | GRF_SPI5EXPPLUS_CLK << GRF_GPIO2C6_SEL_SHIFT
+                            | GRF_SPI5EXPPLUS_CSN0 << GRF_GPIO2C7_SEL_SHIFT);
+               break;
        default:
+               printf("%s: spi_id %d is not supported.\n", __func__, spi_id);
                goto err;
        }
 
@@ -232,6 +244,41 @@ static void pinctrl_rk3399_gmac_config(struct rk3399_grf_regs *grf, int mmc_id)
        rk_clrsetreg(&grf->gpio3c_iomux,
                     GRF_GPIO3C1_SEL_MASK,
                     GRF_MAC_TXCLK << GRF_GPIO3C1_SEL_SHIFT);
+
+       /* Set drive strength for GMAC tx io, value 3 means 13mA */
+       rk_clrsetreg(&grf->gpio3_e[0],
+                    GRF_GPIO3A0_E_MASK | GRF_GPIO3A1_E_MASK |
+                    GRF_GPIO3A4_E_MASK | GRF_GPIO3A5_E0_MASK,
+                    3 << GRF_GPIO3A0_E_SHIFT |
+                    3 << GRF_GPIO3A1_E_SHIFT |
+                    3 << GRF_GPIO3A4_E_SHIFT |
+                    1 << GRF_GPIO3A5_E0_SHIFT);
+       rk_clrsetreg(&grf->gpio3_e[1],
+                    GRF_GPIO3A5_E12_MASK,
+                    1 << GRF_GPIO3A5_E12_SHIFT);
+       rk_clrsetreg(&grf->gpio3_e[2],
+                    GRF_GPIO3B4_E_MASK,
+                    3 << GRF_GPIO3B4_E_SHIFT);
+       rk_clrsetreg(&grf->gpio3_e[4],
+                    GRF_GPIO3C1_E_MASK,
+                    3 << GRF_GPIO3C1_E_SHIFT);
+}
+#endif
+
+#if !defined(CONFIG_SPL_BUILD)
+static void pinctrl_rk3399_hdmi_config(struct rk3399_grf_regs *grf, int hdmi_id)
+{
+       switch (hdmi_id) {
+       case PERIPH_ID_HDMI:
+               rk_clrsetreg(&grf->gpio4c_iomux,
+                            GRF_GPIO4C0_SEL_MASK | GRF_GPIO4C1_SEL_MASK,
+                            (GRF_HDMII2C_SCL << GRF_GPIO4C0_SEL_SHIFT) |
+                            (GRF_HDMII2C_SDA << GRF_GPIO4C1_SEL_SHIFT));
+               break;
+       default:
+               debug("%s: hdmi_id = %d unsupported\n", __func__, hdmi_id);
+               break;
+       }
 }
 #endif
 
@@ -259,6 +306,9 @@ static int rk3399_pinctrl_request(struct udevice *dev, int func, int flags)
        case PERIPH_ID_SPI0:
        case PERIPH_ID_SPI1:
        case PERIPH_ID_SPI2:
+       case PERIPH_ID_SPI3:
+       case PERIPH_ID_SPI4:
+       case PERIPH_ID_SPI5:
                pinctrl_rk3399_spi_config(priv->grf, priv->pmugrf, func, flags);
                break;
        case PERIPH_ID_UART0:
@@ -280,6 +330,11 @@ static int rk3399_pinctrl_request(struct udevice *dev, int func, int flags)
        case PERIPH_ID_GMAC:
                pinctrl_rk3399_gmac_config(priv->grf, func);
                break;
+#endif
+#if !defined(CONFIG_SPL_BUILD)
+       case PERIPH_ID_HDMI:
+               pinctrl_rk3399_hdmi_config(priv->grf, func);
+               break;
 #endif
        default:
                return -EINVAL;
@@ -307,6 +362,8 @@ static int rk3399_pinctrl_get_periph_id(struct udevice *dev,
                return PERIPH_ID_SPI1;
        case 52:
                return PERIPH_ID_SPI2;
+       case 132:
+               return PERIPH_ID_SPI5;
        case 57:
                return PERIPH_ID_I2C0;
        case 59: /* Note strange order */
@@ -324,6 +381,10 @@ static int rk3399_pinctrl_get_periph_id(struct udevice *dev,
 #if CONFIG_IS_ENABLED(GMAC_ROCKCHIP)
        case 12:
                return PERIPH_ID_GMAC;
+#endif
+#if !defined(CONFIG_SPL_BUILD)
+       case 23:
+               return PERIPH_ID_HDMI;
 #endif
        }
 #endif
index 911ecb1144a6c8608d738b76cec09c8face4a3c5..d8c107e2069f1ee6c0eca33d90f9e870ded5ee3d 100644 (file)
@@ -308,4 +308,12 @@ config SY8106A_VOUT1_VOLT
        is typically used to power the VDD-CPU and should be 1200mV.
        Values can range from 680mV till 1950mV.
 
+config TWL4030_POWER
+       depends on OMAP34XX
+       bool "Enable driver for TI TWL4030 power management chip"
+       imply CMD_POWEROFF
+       ---help---
+       The TWL4030 in a combination audio CODEC/power management with
+       GPIO and it is commonly used with the OMAP3 family of processors
+
 endmenu
index 132e33250e8c2d3a8f95edf007d359f51703b0a3..7cfa76149876e72a08f0bca62006995d051dcb3e 100644 (file)
@@ -9,6 +9,13 @@ config POWER_DOMAIN
          domains). This may be used to save power. This API provides the
          means to control such power management hardware.
 
+config BCM6328_POWER_DOMAIN
+       bool "Enable the BCM6328 power domain driver"
+       depends on POWER_DOMAIN && ARCH_BMIPS
+       help
+         Enable support for manipulating BCM6345 power domains via MMIO
+         mapped registers.
+
 config SANDBOX_POWER_DOMAIN
        bool "Enable the sandbox power domain test driver"
        depends on POWER_DOMAIN && SANDBOX
index 2c3d92638fbee3002aae593b41353de1d6b76d8c..c7d764440205c9a5b9e99d959cf138a58e9efb36 100644 (file)
@@ -3,6 +3,7 @@
 # SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_POWER_DOMAIN) += power-domain-uclass.o
+obj-$(CONFIG_BCM6328_POWER_DOMAIN) += bcm6328-power-domain.o
 obj-$(CONFIG_SANDBOX_POWER_DOMAIN) += sandbox-power-domain.o
 obj-$(CONFIG_SANDBOX_POWER_DOMAIN) += sandbox-power-domain-test.o
 obj-$(CONFIG_TEGRA186_POWER_DOMAIN) += tegra186-power-domain.o
diff --git a/drivers/power/domain/bcm6328-power-domain.c b/drivers/power/domain/bcm6328-power-domain.c
new file mode 100644 (file)
index 0000000..15638bf
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <power-domain-uclass.h>
+#include <asm/io.h>
+
+#define MAX_DOMAINS    32
+
+struct bcm6328_power_domain {
+       void __iomem *regs;
+};
+
+static int bcm6328_power_domain_request(struct power_domain *power_domain)
+{
+       if (power_domain->id >= MAX_DOMAINS)
+               return -EINVAL;
+
+       return 0;
+}
+
+static int bcm6328_power_domain_free(struct power_domain *power_domain)
+{
+       return 0;
+}
+
+static int bcm6328_power_domain_on(struct power_domain *power_domain)
+{
+       struct bcm6328_power_domain *priv = dev_get_priv(power_domain->dev);
+
+       clrbits_be32(priv->regs, BIT(power_domain->id));
+
+       return 0;
+}
+
+static int bcm6328_power_domain_off(struct power_domain *power_domain)
+{
+       struct bcm6328_power_domain *priv = dev_get_priv(power_domain->dev);
+
+       setbits_be32(priv->regs, BIT(power_domain->id));
+
+       return 0;
+}
+
+static int bcm6328_power_domain_probe(struct udevice *dev)
+{
+       struct bcm6328_power_domain *priv = dev_get_priv(dev);
+       fdt_addr_t addr;
+       fdt_size_t size;
+
+       addr = dev_get_addr_size_index(dev, 0, &size);
+       if (addr == FDT_ADDR_T_NONE)
+               return -EINVAL;
+
+       priv->regs = ioremap(addr, size);
+
+       return 0;
+}
+
+static const struct udevice_id bcm6328_power_domain_ids[] = {
+       { .compatible = "brcm,bcm6328-power-domain" },
+       { /* sentinel */ }
+};
+
+struct power_domain_ops bcm6328_power_domain_ops = {
+       .free = bcm6328_power_domain_free,
+       .off = bcm6328_power_domain_off,
+       .on = bcm6328_power_domain_on,
+       .request = bcm6328_power_domain_request,
+};
+
+U_BOOT_DRIVER(bcm6328_power_domain) = {
+       .name = "bcm6328_power_domain",
+       .id = UCLASS_POWER_DOMAIN,
+       .of_match = bcm6328_power_domain_ids,
+       .ops = &bcm6328_power_domain_ops,
+       .priv_auto_alloc_size = sizeof(struct bcm6328_power_domain),
+       .probe = bcm6328_power_domain_probe,
+};
index 4891b1704e8ba45eda39981d377746e6d821fa59..3f50c121571d5077b80bf07cc382128df84744c5 100644 (file)
@@ -28,7 +28,7 @@ config SPL_PMIC_CHILDREN
        This allows PMICs to support child devices (such as regulators) in
        SPL. This adds quite a bit of code so if you are not using this
        feature you can turn it off. In this case you may need a 'back door'
-       to call your regulator code (e.g. see rk808.c for direct functions
+       to call your regulator code (e.g. see rk8xx.c for direct functions
        for use in SPL).
 
 config PMIC_ACT8846
@@ -100,8 +100,8 @@ config PMIC_PM8916
 
        Driver binding info: doc/device-tree-bindings/pmic/pm8916.txt
 
-config PMIC_RK808
-       bool "Enable support for Rockchip PMIC RK808"
+config PMIC_RK8XX
+       bool "Enable support for Rockchip PMIC RK8XX"
        depends on DM_PMIC
        ---help---
        The Rockchip RK808 PMIC provides four buck DC-DC convertors, 8 LDOs,
index 5f1bef33cddc38142349a7a61a5677517b049f60..f409e3a0b36c3c368d01db316ca4b2b1a1e3b811 100644 (file)
@@ -15,7 +15,7 @@ obj-$(CONFIG_PMIC_ACT8846) += act8846.o
 obj-$(CONFIG_PMIC_AS3722) += as3722.o
 obj-$(CONFIG_PMIC_MAX8997) += max8997.o
 obj-$(CONFIG_PMIC_PM8916) += pm8916.o
-obj-$(CONFIG_PMIC_RK808) += rk808.o
+obj-$(CONFIG_PMIC_RK8XX) += rk8xx.o
 obj-$(CONFIG_PMIC_RN5T567) += rn5t567.o
 obj-$(CONFIG_PMIC_TPS65090) += tps65090.o
 obj-$(CONFIG_PMIC_S5M8767) += s5m8767.o
diff --git a/drivers/power/pmic/rk808.c b/drivers/power/pmic/rk808.c
deleted file mode 100644 (file)
index 3f5f316..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 2015 Google, Inc
- * Written by Simon Glass <sjg@chromium.org>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <dm.h>
-#include <errno.h>
-#include <fdtdec.h>
-#include <libfdt.h>
-#include <power/rk808_pmic.h>
-#include <power/pmic.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-static const struct pmic_child_info pmic_children_info[] = {
-       { .prefix = "DCDC_REG", .driver = "rk808_buck"},
-       { .prefix = "LDO_REG", .driver = "rk808_ldo"},
-       { .prefix = "SWITCH_REG", .driver = "rk808_switch"},
-       { },
-};
-
-static int rk808_reg_count(struct udevice *dev)
-{
-       return RK808_NUM_OF_REGS;
-}
-
-static int rk808_write(struct udevice *dev, uint reg, const uint8_t *buff,
-                         int len)
-{
-       int ret;
-
-       ret = dm_i2c_write(dev, reg, buff, len);
-       if (ret) {
-               debug("write error to device: %p register: %#x!", dev, reg);
-               return ret;
-       }
-
-       return 0;
-}
-
-static int rk808_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
-{
-       int ret;
-
-       ret = dm_i2c_read(dev, reg, buff, len);
-       if (ret) {
-               debug("read error from device: %p register: %#x!", dev, reg);
-               return ret;
-       }
-
-       return 0;
-}
-
-#if CONFIG_IS_ENABLED(PMIC_CHILDREN)
-static int rk808_bind(struct udevice *dev)
-{
-       const void *blob = gd->fdt_blob;
-       int regulators_node;
-       int children;
-
-       regulators_node = fdt_subnode_offset(blob, dev_of_offset(dev),
-                                            "regulators");
-       if (regulators_node <= 0) {
-               debug("%s: %s regulators subnode not found!", __func__,
-                     dev->name);
-               return -ENXIO;
-       }
-
-       debug("%s: '%s' - found regulators subnode\n", __func__, dev->name);
-
-       children = pmic_bind_children(dev, regulators_node, pmic_children_info);
-       if (!children)
-               debug("%s: %s - no child found\n", __func__, dev->name);
-
-       /* Always return success for this device */
-       return 0;
-}
-#endif
-
-static struct dm_pmic_ops rk808_ops = {
-       .reg_count = rk808_reg_count,
-       .read = rk808_read,
-       .write = rk808_write,
-};
-
-static const struct udevice_id rk808_ids[] = {
-       { .compatible = "rockchip,rk808" },
-       { }
-};
-
-U_BOOT_DRIVER(pmic_rk808) = {
-       .name = "rk808 pmic",
-       .id = UCLASS_PMIC,
-       .of_match = rk808_ids,
-#if CONFIG_IS_ENABLED(PMIC_CHILDREN)
-       .bind = rk808_bind,
-#endif
-       .ops = &rk808_ops,
-};
diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c
new file mode 100644 (file)
index 0000000..394e2ff
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2015 Google, Inc
+ * Written by Simon Glass <sjg@chromium.org>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <errno.h>
+#include <fdtdec.h>
+#include <libfdt.h>
+#include <power/rk8xx_pmic.h>
+#include <power/pmic.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static const struct pmic_child_info pmic_children_info[] = {
+       { .prefix = "DCDC_REG", .driver = "rk8xx_buck"},
+       { .prefix = "LDO_REG", .driver = "rk8xx_ldo"},
+       { .prefix = "SWITCH_REG", .driver = "rk8xx_switch"},
+       { },
+};
+
+static int rk8xx_reg_count(struct udevice *dev)
+{
+       return RK808_NUM_OF_REGS;
+}
+
+static int rk8xx_write(struct udevice *dev, uint reg, const uint8_t *buff,
+                         int len)
+{
+       int ret;
+
+       ret = dm_i2c_write(dev, reg, buff, len);
+       if (ret) {
+               debug("write error to device: %p register: %#x!", dev, reg);
+               return ret;
+       }
+
+       return 0;
+}
+
+static int rk8xx_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
+{
+       int ret;
+
+       ret = dm_i2c_read(dev, reg, buff, len);
+       if (ret) {
+               debug("read error from device: %p register: %#x!", dev, reg);
+               return ret;
+       }
+
+       return 0;
+}
+
+#if CONFIG_IS_ENABLED(PMIC_CHILDREN)
+static int rk8xx_bind(struct udevice *dev)
+{
+       const void *blob = gd->fdt_blob;
+       int regulators_node;
+       int children;
+
+       regulators_node = fdt_subnode_offset(blob, dev_of_offset(dev),
+                                            "regulators");
+       if (regulators_node <= 0) {
+               debug("%s: %s regulators subnode not found!", __func__,
+                     dev->name);
+               return -ENXIO;
+       }
+
+       debug("%s: '%s' - found regulators subnode\n", __func__, dev->name);
+
+       children = pmic_bind_children(dev, regulators_node, pmic_children_info);
+       if (!children)
+               debug("%s: %s - no child found\n", __func__, dev->name);
+
+       /* Always return success for this device */
+       return 0;
+}
+#endif
+
+static int rk8xx_probe(struct udevice *dev)
+{
+       struct rk8xx_priv *priv = dev_get_priv(dev);
+       uint8_t msb, lsb;
+
+       /* read Chip variant */
+       rk8xx_read(dev, ID_MSB, &msb, 1);
+       rk8xx_read(dev, ID_LSB, &lsb, 1);
+
+       priv->variant = ((msb << 8) | lsb) & RK8XX_ID_MSK;
+
+       return 0;
+}
+
+static struct dm_pmic_ops rk8xx_ops = {
+       .reg_count = rk8xx_reg_count,
+       .read = rk8xx_read,
+       .write = rk8xx_write,
+};
+
+static const struct udevice_id rk8xx_ids[] = {
+       { .compatible = "rockchip,rk808" },
+       { .compatible = "rockchip,rk818" },
+       { }
+};
+
+U_BOOT_DRIVER(pmic_rk8xx) = {
+       .name = "rk8xx pmic",
+       .id = UCLASS_PMIC,
+       .of_match = rk8xx_ids,
+#if CONFIG_IS_ENABLED(PMIC_CHILDREN)
+       .bind = rk8xx_bind,
+#endif
+       .probe = rk8xx_probe,
+       .ops = &rk8xx_ops,
+};
index f870e8bcc9feae67aa0a0114d32478570da2de64..ef057e0e2fb318b619e55083c34a02d918596aef 100644 (file)
@@ -76,11 +76,11 @@ config DM_REGULATOR_GPIO
        features for gpio regulators. The driver implements get/set for
        voltage value.
 
-config REGULATOR_RK808
-       bool "Enable driver for RK808 regulators"
-       depends on DM_REGULATOR && PMIC_RK808
+config REGULATOR_RK8XX
+       bool "Enable driver for RK8XX regulators"
+       depends on DM_REGULATOR && PMIC_RK8XX
        ---help---
-       Enable support for the regulator functions of the RK808 PMIC. The
+       Enable support for the regulator functions of the RK8XX PMIC. The
        driver implements get/set api for the various BUCKS and LDOs supported
        by the PMIC device. This driver is controlled by a device tree node
        which includes voltage limits.
index 6002c88a6c17d80826fc5ce03ff26d69b4626cdf..3e01021b76abc274df623d73e1e1f72f1f4f2733 100644 (file)
@@ -12,7 +12,7 @@ obj-$(CONFIG_DM_REGULATOR_PFUZE100) += pfuze100.o
 obj-$(CONFIG_REGULATOR_PWM) += pwm_regulator.o
 obj-$(CONFIG_$(SPL_)DM_REGULATOR_FIXED) += fixed.o
 obj-$(CONFIG_$(SPL_)DM_REGULATOR_GPIO) += gpio-regulator.o
-obj-$(CONFIG_REGULATOR_RK808) += rk808.o
+obj-$(CONFIG_REGULATOR_RK8XX) += rk8xx.o
 obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o
 obj-$(CONFIG_DM_REGULATOR_SANDBOX) += sandbox.o
 obj-$(CONFIG_REGULATOR_TPS65090) += tps65090_regulator.o
index 4875238e43d7935e9a772f33acc1fc638ce348de..a6c9fccd68e7c16c4340e574f0037d098b03603e 100644 (file)
@@ -24,6 +24,12 @@ struct pwm_regulator_info {
        int pwm_id;
        /* the period of one PWM cycle */
        int period_ns;
+       /*
+        * the polarity of one PWM
+        * 0: normal polarity
+        * 1: inverted polarity
+        */
+       bool polarity;
        struct udevice *pwm;
        /* initialize voltage of regulator */
        unsigned int init_voltage;
@@ -49,7 +55,7 @@ static int pwm_voltage_to_duty_cycle_percentage(struct udevice *dev, int req_uV)
        int max_uV = priv->max_voltage;
        int diff = max_uV - min_uV;
 
-       return 100 - (((req_uV * 100) - (min_uV * 100)) / diff);
+       return ((req_uV * 100) - (min_uV * 100)) / diff;
 }
 
 static int pwm_regulator_get_voltage(struct udevice *dev)
@@ -67,6 +73,12 @@ static int pwm_regulator_set_voltage(struct udevice *dev, int uvolt)
 
        duty_cycle = pwm_voltage_to_duty_cycle_percentage(dev, uvolt);
 
+       ret = pwm_set_invert(priv->pwm, priv->pwm_id, priv->polarity);
+       if (ret) {
+               dev_err(dev, "Failed to init PWM\n");
+               return ret;
+       }
+
        ret = pwm_set_config(priv->pwm, priv->pwm_id,
                        (priv->period_ns / 100) * duty_cycle, priv->period_ns);
        if (ret) {
@@ -97,9 +109,9 @@ static int pwm_regulator_ofdata_to_platdata(struct udevice *dev)
                debug("%s: Cannot get PWM phandle: ret=%d\n", __func__, ret);
                return ret;
        }
-       /* TODO: pwm_id here from device tree if needed */
 
        priv->period_ns = args.args[1];
+       priv->polarity = args.args[2];
 
        priv->init_voltage = fdtdec_get_int(blob, node,
                        "regulator-init-microvolt", -1);
diff --git a/drivers/power/regulator/rk808.c b/drivers/power/regulator/rk808.c
deleted file mode 100644 (file)
index adef8f5..0000000
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- * Copyright (C) 2015 Google, Inc
- * Written by Simon Glass <sjg@chromium.org>
- *
- * Based on Rockchip's drivers/power/pmic/pmic_rk808.c:
- * Copyright (C) 2012 rockchips
- * zyw <zyw@rock-chips.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <dm.h>
-#include <errno.h>
-#include <power/rk808_pmic.h>
-#include <power/pmic.h>
-#include <power/regulator.h>
-
-#ifndef CONFIG_SPL_BUILD
-#define ENABLE_DRIVER
-#endif
-
-struct rk808_reg_info {
-       uint min_uv;
-       uint step_uv;
-       s8 vsel_reg;
-       u8 vsel_bits;
-};
-
-static const struct rk808_reg_info rk808_buck[] = {
-       { 712500, 12500, REG_BUCK1_ON_VSEL, 6, },
-       { 712500, 12500, REG_BUCK2_ON_VSEL, 6, },
-       { 712500, 12500, -1, 6, },
-       { 1800000, 100000, REG_BUCK4_ON_VSEL, 4, },
-};
-
-static const struct rk808_reg_info rk808_ldo[] = {
-       { 1800000, 100000, LDO1_ON_VSEL, 5, },
-       { 1800000, 100000, LDO2_ON_VSEL, 5, },
-       { 800000, 100000, LDO3_ON_VSEL, 4, },
-       { 1800000, 100000, LDO4_ON_VSEL, 5, },
-       { 1800000, 100000, LDO5_ON_VSEL, 5, },
-       { 800000, 100000, LDO6_ON_VSEL, 5, },
-       { 800000, 100000, LDO7_ON_VSEL, 5, },
-       { 1800000, 100000, LDO8_ON_VSEL, 5, },
-};
-
-
-static int _buck_set_value(struct udevice *pmic, int buck, int uvolt)
-{
-       const struct rk808_reg_info *info = &rk808_buck[buck - 1];
-       int mask = (1 << info->vsel_bits) - 1;
-       int val;
-
-       if (info->vsel_reg == -1)
-               return -ENOSYS;
-       val = (uvolt - info->min_uv) / info->step_uv;
-       debug("%s: reg=%x, mask=%x, val=%x\n", __func__, info->vsel_reg, mask,
-             val);
-
-       return pmic_clrsetbits(pmic, info->vsel_reg, mask, val);
-}
-
-static int _buck_set_enable(struct udevice *pmic, int buck, bool enable)
-{
-       uint mask;
-       int ret;
-
-       buck--;
-       mask = 1 << buck;
-       if (enable) {
-               ret = pmic_clrsetbits(pmic, DCDC_ILMAX, 0, 3 << (buck * 2));
-               if (ret)
-                       return ret;
-               ret = pmic_clrsetbits(pmic, REG_DCDC_UV_ACT, 1 << buck, 0);
-               if (ret)
-                       return ret;
-       }
-
-       return pmic_clrsetbits(pmic, REG_DCDC_EN, mask, enable ? mask : 0);
-}
-
-#ifdef ENABLE_DRIVER
-static int buck_get_value(struct udevice *dev)
-{
-       int buck = dev->driver_data - 1;
-       const struct rk808_reg_info *info = &rk808_buck[buck];
-       int mask = (1 << info->vsel_bits) - 1;
-       int ret, val;
-
-       if (info->vsel_reg == -1)
-               return -ENOSYS;
-       ret = pmic_reg_read(dev->parent, info->vsel_reg);
-       if (ret < 0)
-               return ret;
-       val = ret & mask;
-
-       return info->min_uv + val * info->step_uv;
-}
-
-static int buck_set_value(struct udevice *dev, int uvolt)
-{
-       int buck = dev->driver_data;
-
-       return _buck_set_value(dev->parent, buck, uvolt);
-}
-
-static int buck_set_enable(struct udevice *dev, bool enable)
-{
-       int buck = dev->driver_data;
-
-       return _buck_set_enable(dev->parent, buck, enable);
-}
-
-static bool buck_get_enable(struct udevice *dev)
-{
-       int buck = dev->driver_data - 1;
-       int ret;
-       uint mask;
-
-       mask = 1 << buck;
-
-       ret = pmic_reg_read(dev->parent, REG_DCDC_EN);
-       if (ret < 0)
-               return ret;
-
-       return ret & mask ? true : false;
-}
-
-static int ldo_get_value(struct udevice *dev)
-{
-       int ldo = dev->driver_data - 1;
-       const struct rk808_reg_info *info = &rk808_ldo[ldo];
-       int mask = (1 << info->vsel_bits) - 1;
-       int ret, val;
-
-       if (info->vsel_reg == -1)
-               return -ENOSYS;
-       ret = pmic_reg_read(dev->parent, info->vsel_reg);
-       if (ret < 0)
-               return ret;
-       val = ret & mask;
-
-       return info->min_uv + val * info->step_uv;
-}
-
-static int ldo_set_value(struct udevice *dev, int uvolt)
-{
-       int ldo = dev->driver_data - 1;
-       const struct rk808_reg_info *info = &rk808_ldo[ldo];
-       int mask = (1 << info->vsel_bits) - 1;
-       int val;
-
-       if (info->vsel_reg == -1)
-               return -ENOSYS;
-       val = (uvolt - info->min_uv) / info->step_uv;
-       debug("%s: reg=%x, mask=%x, val=%x\n", __func__, info->vsel_reg, mask,
-             val);
-
-       return pmic_clrsetbits(dev->parent, info->vsel_reg, mask, val);
-}
-
-static int ldo_set_enable(struct udevice *dev, bool enable)
-{
-       int ldo = dev->driver_data - 1;
-       uint mask;
-
-       mask = 1 << ldo;
-
-       return pmic_clrsetbits(dev->parent, REG_LDO_EN, mask,
-                              enable ? mask : 0);
-}
-
-static bool ldo_get_enable(struct udevice *dev)
-{
-       int ldo = dev->driver_data - 1;
-       int ret;
-       uint mask;
-
-       mask = 1 << ldo;
-
-       ret = pmic_reg_read(dev->parent, REG_LDO_EN);
-       if (ret < 0)
-               return ret;
-
-       return ret & mask ? true : false;
-}
-
-static int switch_set_enable(struct udevice *dev, bool enable)
-{
-       int sw = dev->driver_data - 1;
-       uint mask;
-
-       mask = 1 << (sw + 5);
-
-       return pmic_clrsetbits(dev->parent, REG_DCDC_EN, mask,
-                              enable ? mask : 0);
-}
-
-static bool switch_get_enable(struct udevice *dev)
-{
-       int sw = dev->driver_data - 1;
-       int ret;
-       uint mask;
-
-       mask = 1 << (sw + 5);
-
-       ret = pmic_reg_read(dev->parent, REG_DCDC_EN);
-       if (ret < 0)
-               return ret;
-
-       return ret & mask ? true : false;
-}
-
-static int rk808_buck_probe(struct udevice *dev)
-{
-       struct dm_regulator_uclass_platdata *uc_pdata;
-
-       uc_pdata = dev_get_uclass_platdata(dev);
-
-       uc_pdata->type = REGULATOR_TYPE_BUCK;
-       uc_pdata->mode_count = 0;
-
-       return 0;
-}
-
-static int rk808_ldo_probe(struct udevice *dev)
-{
-       struct dm_regulator_uclass_platdata *uc_pdata;
-
-       uc_pdata = dev_get_uclass_platdata(dev);
-
-       uc_pdata->type = REGULATOR_TYPE_LDO;
-       uc_pdata->mode_count = 0;
-
-       return 0;
-}
-
-static int rk808_switch_probe(struct udevice *dev)
-{
-       struct dm_regulator_uclass_platdata *uc_pdata;
-
-       uc_pdata = dev_get_uclass_platdata(dev);
-
-       uc_pdata->type = REGULATOR_TYPE_FIXED;
-       uc_pdata->mode_count = 0;
-
-       return 0;
-}
-
-static const struct dm_regulator_ops rk808_buck_ops = {
-       .get_value  = buck_get_value,
-       .set_value  = buck_set_value,
-       .get_enable = buck_get_enable,
-       .set_enable = buck_set_enable,
-};
-
-static const struct dm_regulator_ops rk808_ldo_ops = {
-       .get_value  = ldo_get_value,
-       .set_value  = ldo_set_value,
-       .get_enable = ldo_get_enable,
-       .set_enable = ldo_set_enable,
-};
-
-static const struct dm_regulator_ops rk808_switch_ops = {
-       .get_enable = switch_get_enable,
-       .set_enable = switch_set_enable,
-};
-
-U_BOOT_DRIVER(rk808_buck) = {
-       .name = "rk808_buck",
-       .id = UCLASS_REGULATOR,
-       .ops = &rk808_buck_ops,
-       .probe = rk808_buck_probe,
-};
-
-U_BOOT_DRIVER(rk808_ldo) = {
-       .name = "rk808_ldo",
-       .id = UCLASS_REGULATOR,
-       .ops = &rk808_ldo_ops,
-       .probe = rk808_ldo_probe,
-};
-
-U_BOOT_DRIVER(rk808_switch) = {
-       .name = "rk808_switch",
-       .id = UCLASS_REGULATOR,
-       .ops = &rk808_switch_ops,
-       .probe = rk808_switch_probe,
-};
-#endif
-
-int rk808_spl_configure_buck(struct udevice *pmic, int buck, int uvolt)
-{
-       int ret;
-
-       ret = _buck_set_value(pmic, buck, uvolt);
-       if (ret)
-               return ret;
-
-       return _buck_set_enable(pmic, buck, true);
-}
diff --git a/drivers/power/regulator/rk8xx.c b/drivers/power/regulator/rk8xx.c
new file mode 100644 (file)
index 0000000..e655c2d
--- /dev/null
@@ -0,0 +1,353 @@
+/*
+ * Copyright (C) 2015 Google, Inc
+ * Written by Simon Glass <sjg@chromium.org>
+ *
+ * Based on Rockchip's drivers/power/pmic/pmic_rk808.c:
+ * Copyright (C) 2012 rockchips
+ * zyw <zyw@rock-chips.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <errno.h>
+#include <power/rk8xx_pmic.h>
+#include <power/pmic.h>
+#include <power/regulator.h>
+
+#ifndef CONFIG_SPL_BUILD
+#define ENABLE_DRIVER
+#endif
+
+/* Field Definitions */
+#define RK808_BUCK_VSEL_MASK   0x3f
+#define RK808_BUCK4_VSEL_MASK  0xf
+#define RK808_LDO_VSEL_MASK    0x1f
+
+#define RK818_BUCK_VSEL_MASK           0x3f
+#define RK818_BUCK4_VSEL_MASK          0x1f
+#define RK818_LDO_VSEL_MASK            0x1f
+#define RK818_LDO3_ON_VSEL_MASK        0xf
+#define RK818_BOOST_ON_VSEL_MASK       0xe0
+
+struct rk8xx_reg_info {
+       uint min_uv;
+       uint step_uv;
+       s8 vsel_reg;
+       u8 vsel_mask;
+};
+
+static const struct rk8xx_reg_info rk808_buck[] = {
+       { 712500, 12500, REG_BUCK1_ON_VSEL, RK808_BUCK_VSEL_MASK, },
+       { 712500, 12500, REG_BUCK2_ON_VSEL, RK808_BUCK_VSEL_MASK, },
+       { 712500, 12500, -1, RK808_BUCK_VSEL_MASK, },
+       { 1800000, 100000, REG_BUCK4_ON_VSEL, RK808_BUCK4_VSEL_MASK, },
+};
+
+static const struct rk8xx_reg_info rk808_ldo[] = {
+       { 1800000, 100000, REG_LDO1_ON_VSEL, RK808_LDO_VSEL_MASK, },
+       { 1800000, 100000, REG_LDO2_ON_VSEL, RK808_LDO_VSEL_MASK, },
+       { 800000, 100000, REG_LDO3_ON_VSEL, RK808_BUCK4_VSEL_MASK, },
+       { 1800000, 100000, REG_LDO4_ON_VSEL, RK808_LDO_VSEL_MASK, },
+       { 1800000, 100000, REG_LDO5_ON_VSEL, RK808_LDO_VSEL_MASK, },
+       { 800000, 100000, REG_LDO6_ON_VSEL, RK808_LDO_VSEL_MASK, },
+       { 800000, 100000, REG_LDO7_ON_VSEL, RK808_LDO_VSEL_MASK, },
+       { 1800000, 100000, REG_LDO8_ON_VSEL, RK808_LDO_VSEL_MASK, },
+};
+
+static const struct rk8xx_reg_info rk818_buck[] = {
+       { 712500, 12500, REG_BUCK1_ON_VSEL, RK818_BUCK_VSEL_MASK, },
+       { 712500, 12500, REG_BUCK2_ON_VSEL, RK818_BUCK_VSEL_MASK, },
+       { 712500, 12500, -1, RK818_BUCK_VSEL_MASK, },
+       { 1800000, 100000, REG_BUCK4_ON_VSEL, RK818_BUCK4_VSEL_MASK, },
+};
+
+static const struct rk8xx_reg_info rk818_ldo[] = {
+       { 1800000, 100000, REG_LDO1_ON_VSEL, RK818_LDO_VSEL_MASK, },
+       { 1800000, 100000, REG_LDO2_ON_VSEL, RK818_LDO_VSEL_MASK, },
+       { 800000, 100000, REG_LDO3_ON_VSEL, RK818_LDO3_ON_VSEL_MASK, },
+       { 1800000, 100000, REG_LDO4_ON_VSEL, RK818_LDO_VSEL_MASK, },
+       { 1800000, 100000, REG_LDO5_ON_VSEL, RK818_LDO_VSEL_MASK, },
+       { 800000, 100000, REG_LDO6_ON_VSEL, RK818_LDO_VSEL_MASK, },
+       { 800000, 100000, REG_LDO7_ON_VSEL, RK818_LDO_VSEL_MASK, },
+       { 1800000, 100000, REG_LDO8_ON_VSEL, RK818_LDO_VSEL_MASK, },
+};
+
+static const struct rk8xx_reg_info *get_buck_reg(struct udevice *pmic,
+                                            int num)
+{
+       struct rk8xx_priv *priv = dev_get_priv(pmic);
+       switch (priv->variant) {
+       case RK818_ID:
+               return &rk818_buck[num];
+       default:
+               return &rk808_buck[num];
+       }
+}
+
+static const struct rk8xx_reg_info *get_ldo_reg(struct udevice *pmic,
+                                            int num)
+{
+       struct rk8xx_priv *priv = dev_get_priv(pmic);
+       switch (priv->variant) {
+       case RK818_ID:
+               return &rk818_ldo[num - 1];
+       default:
+               return &rk808_ldo[num - 1];
+       }
+}
+
+static int _buck_set_value(struct udevice *pmic, int buck, int uvolt)
+{
+       const struct rk8xx_reg_info *info = get_buck_reg(pmic, buck - 1);
+       int mask = info->vsel_mask;
+       int val;
+
+       if (info->vsel_reg == -1)
+               return -ENOSYS;
+       val = (uvolt - info->min_uv) / info->step_uv;
+       debug("%s: reg=%x, mask=%x, val=%x\n", __func__, info->vsel_reg, mask,
+             val);
+
+       return pmic_clrsetbits(pmic, info->vsel_reg, mask, val);
+}
+
+static int _buck_set_enable(struct udevice *pmic, int buck, bool enable)
+{
+       uint mask;
+       int ret;
+
+       buck--;
+       mask = 1 << buck;
+       if (enable) {
+               ret = pmic_clrsetbits(pmic, REG_DCDC_ILMAX, 0, 3 << (buck * 2));
+               if (ret)
+                       return ret;
+               ret = pmic_clrsetbits(pmic, REG_DCDC_UV_ACT, 1 << buck, 0);
+               if (ret)
+                       return ret;
+       }
+
+       return pmic_clrsetbits(pmic, REG_DCDC_EN, mask, enable ? mask : 0);
+}
+
+#ifdef ENABLE_DRIVER
+static int buck_get_value(struct udevice *dev)
+{
+       int buck = dev->driver_data - 1;
+       const struct rk8xx_reg_info *info = get_buck_reg(dev->parent, buck);
+       int mask = info->vsel_mask;
+       int ret, val;
+
+       if (info->vsel_reg == -1)
+               return -ENOSYS;
+       ret = pmic_reg_read(dev->parent, info->vsel_reg);
+       if (ret < 0)
+               return ret;
+       val = ret & mask;
+
+       return info->min_uv + val * info->step_uv;
+}
+
+static int buck_set_value(struct udevice *dev, int uvolt)
+{
+       int buck = dev->driver_data;
+
+       return _buck_set_value(dev->parent, buck, uvolt);
+}
+
+static int buck_set_enable(struct udevice *dev, bool enable)
+{
+       int buck = dev->driver_data;
+
+       return _buck_set_enable(dev->parent, buck, enable);
+}
+
+static bool buck_get_enable(struct udevice *dev)
+{
+       int buck = dev->driver_data - 1;
+       int ret;
+       uint mask;
+
+       mask = 1 << buck;
+
+       ret = pmic_reg_read(dev->parent, REG_DCDC_EN);
+       if (ret < 0)
+               return ret;
+
+       return ret & mask ? true : false;
+}
+
+static int ldo_get_value(struct udevice *dev)
+{
+       int ldo = dev->driver_data - 1;
+       const struct rk8xx_reg_info *info = get_ldo_reg(dev->parent, ldo);
+       int mask = info->vsel_mask;
+       int ret, val;
+
+       if (info->vsel_reg == -1)
+               return -ENOSYS;
+       ret = pmic_reg_read(dev->parent, info->vsel_reg);
+       if (ret < 0)
+               return ret;
+       val = ret & mask;
+
+       return info->min_uv + val * info->step_uv;
+}
+
+static int ldo_set_value(struct udevice *dev, int uvolt)
+{
+       int ldo = dev->driver_data - 1;
+       const struct rk8xx_reg_info *info = get_ldo_reg(dev->parent, ldo);
+       int mask = info->vsel_mask;
+       int val;
+
+       if (info->vsel_reg == -1)
+               return -ENOSYS;
+       val = (uvolt - info->min_uv) / info->step_uv;
+       debug("%s: reg=%x, mask=%x, val=%x\n", __func__, info->vsel_reg, mask,
+             val);
+
+       return pmic_clrsetbits(dev->parent, info->vsel_reg, mask, val);
+}
+
+static int ldo_set_enable(struct udevice *dev, bool enable)
+{
+       int ldo = dev->driver_data - 1;
+       uint mask;
+
+       mask = 1 << ldo;
+
+       return pmic_clrsetbits(dev->parent, REG_LDO_EN, mask,
+                              enable ? mask : 0);
+}
+
+static bool ldo_get_enable(struct udevice *dev)
+{
+       int ldo = dev->driver_data - 1;
+       int ret;
+       uint mask;
+
+       mask = 1 << ldo;
+
+       ret = pmic_reg_read(dev->parent, REG_LDO_EN);
+       if (ret < 0)
+               return ret;
+
+       return ret & mask ? true : false;
+}
+
+static int switch_set_enable(struct udevice *dev, bool enable)
+{
+       int sw = dev->driver_data - 1;
+       uint mask;
+
+       mask = 1 << (sw + 5);
+
+       return pmic_clrsetbits(dev->parent, REG_DCDC_EN, mask,
+                              enable ? mask : 0);
+}
+
+static bool switch_get_enable(struct udevice *dev)
+{
+       int sw = dev->driver_data - 1;
+       int ret;
+       uint mask;
+
+       mask = 1 << (sw + 5);
+
+       ret = pmic_reg_read(dev->parent, REG_DCDC_EN);
+       if (ret < 0)
+               return ret;
+
+       return ret & mask ? true : false;
+}
+
+static int rk8xx_buck_probe(struct udevice *dev)
+{
+       struct dm_regulator_uclass_platdata *uc_pdata;
+
+       uc_pdata = dev_get_uclass_platdata(dev);
+
+       uc_pdata->type = REGULATOR_TYPE_BUCK;
+       uc_pdata->mode_count = 0;
+
+       return 0;
+}
+
+static int rk8xx_ldo_probe(struct udevice *dev)
+{
+       struct dm_regulator_uclass_platdata *uc_pdata;
+
+       uc_pdata = dev_get_uclass_platdata(dev);
+
+       uc_pdata->type = REGULATOR_TYPE_LDO;
+       uc_pdata->mode_count = 0;
+
+       return 0;
+}
+
+static int rk8xx_switch_probe(struct udevice *dev)
+{
+       struct dm_regulator_uclass_platdata *uc_pdata;
+
+       uc_pdata = dev_get_uclass_platdata(dev);
+
+       uc_pdata->type = REGULATOR_TYPE_FIXED;
+       uc_pdata->mode_count = 0;
+
+       return 0;
+}
+
+static const struct dm_regulator_ops rk8xx_buck_ops = {
+       .get_value  = buck_get_value,
+       .set_value  = buck_set_value,
+       .get_enable = buck_get_enable,
+       .set_enable = buck_set_enable,
+};
+
+static const struct dm_regulator_ops rk8xx_ldo_ops = {
+       .get_value  = ldo_get_value,
+       .set_value  = ldo_set_value,
+       .get_enable = ldo_get_enable,
+       .set_enable = ldo_set_enable,
+};
+
+static const struct dm_regulator_ops rk8xx_switch_ops = {
+       .get_enable = switch_get_enable,
+       .set_enable = switch_set_enable,
+};
+
+U_BOOT_DRIVER(rk8xx_buck) = {
+       .name = "rk8xx_buck",
+       .id = UCLASS_REGULATOR,
+       .ops = &rk8xx_buck_ops,
+       .probe = rk8xx_buck_probe,
+};
+
+U_BOOT_DRIVER(rk8xx_ldo) = {
+       .name = "rk8xx_ldo",
+       .id = UCLASS_REGULATOR,
+       .ops = &rk8xx_ldo_ops,
+       .probe = rk8xx_ldo_probe,
+};
+
+U_BOOT_DRIVER(rk8xx_switch) = {
+       .name = "rk8xx_switch",
+       .id = UCLASS_REGULATOR,
+       .ops = &rk8xx_switch_ops,
+       .probe = rk8xx_switch_probe,
+};
+#endif
+
+int rk8xx_spl_configure_buck(struct udevice *pmic, int buck, int uvolt)
+{
+       int ret;
+
+       ret = _buck_set_value(pmic, buck, uvolt);
+       if (ret)
+               return ret;
+
+       return _buck_set_enable(pmic, buck, true);
+}
index 8866bf1b19edb4ae4731eabacf434c501435a3d2..ab98d68dfb7e92737833c4ead058991d6dc97ec5 100644 (file)
@@ -171,3 +171,12 @@ void twl4030_power_mmc_init(int dev_index)
                mdelay(100);    /* ramp-up delay from Linux code */
        }
 }
+
+#ifdef CONFIG_CMD_POWEROFF
+int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+       twl4030_power_off();
+
+       return 0;
+}
+#endif
index c2200af8a554676d9bb6b040302e15f187ee0648..69051fe1b5663f75b3ff4af71e4e85efc6a615eb 100644 (file)
@@ -9,6 +9,16 @@
 #include <dm.h>
 #include <pwm.h>
 
+int pwm_set_invert(struct udevice *dev, uint channel, bool polarity)
+{
+       struct pwm_ops *ops = pwm_get_ops(dev);
+
+       if (!ops->set_invert)
+               return -ENOSYS;
+
+       return ops->set_invert(dev, channel, polarity);
+}
+
 int pwm_set_config(struct udevice *dev, uint channel, uint period_ns,
                   uint duty_ns)
 {
index 9254f5bc3975262dfb71ae487b3572e41698403b..f3b2f7615d2cd5a847ee707f062ac3768a0747e1 100644 (file)
@@ -21,8 +21,22 @@ DECLARE_GLOBAL_DATA_PTR;
 struct rk_pwm_priv {
        struct rk3288_pwm *regs;
        ulong freq;
+       uint enable_conf;
 };
 
+static int rk_pwm_set_invert(struct udevice *dev, uint channel, bool polarity)
+{
+       struct rk_pwm_priv *priv = dev_get_priv(dev);
+
+       debug("%s: polarity=%u\n", __func__, polarity);
+       if (polarity)
+               priv->enable_conf |= PWM_DUTY_NEGATIVE | PWM_INACTIVE_POSTIVE;
+       else
+               priv->enable_conf |= PWM_DUTY_POSTIVE | PWM_INACTIVE_NEGATIVE;
+
+       return 0;
+}
+
 static int rk_pwm_set_config(struct udevice *dev, uint channel, uint period_ns,
                             uint duty_ns)
 {
@@ -32,7 +46,7 @@ static int rk_pwm_set_config(struct udevice *dev, uint channel, uint period_ns,
 
        debug("%s: period_ns=%u, duty_ns=%u\n", __func__, period_ns, duty_ns);
        writel(PWM_SEL_SRC_CLK | PWM_OUTPUT_LEFT | PWM_LP_DISABLE |
-               PWM_CONTINUOUS | PWM_DUTY_POSTIVE | PWM_INACTIVE_POSTIVE |
+               PWM_CONTINUOUS | priv->enable_conf |
                RK_PWM_DISABLE,
                &regs->ctrl);
 
@@ -83,6 +97,7 @@ static int rk_pwm_probe(struct udevice *dev)
 }
 
 static const struct pwm_ops rk_pwm_ops = {
+       .set_invert     = rk_pwm_set_invert,
        .set_config     = rk_pwm_set_config,
        .set_enable     = rk_pwm_set_enable,
 };
index c2ce974ddea4fb03eecce65db7334babebd72d5d..fcb10845515650ba51f439325393d2188e87faa2 100644 (file)
@@ -21,6 +21,7 @@ struct sandbox_pwm_chan {
        uint period_ns;
        uint duty_ns;
        bool enable;
+       bool polarity;
 };
 
 struct sandbox_pwm_priv {
@@ -56,9 +57,24 @@ static int sandbox_pwm_set_enable(struct udevice *dev, uint channel,
        return 0;
 }
 
+static int sandbox_pwm_set_invert(struct udevice *dev, uint channel,
+                                 bool polarity)
+{
+       struct sandbox_pwm_priv *priv = dev_get_priv(dev);
+       struct sandbox_pwm_chan *chan;
+
+       if (channel >= NUM_CHANNELS)
+               return -ENOSPC;
+       chan = &priv->chan[channel];
+       chan->polarity = polarity;
+
+       return 0;
+}
+
 static const struct pwm_ops sandbox_pwm_ops = {
        .set_config     = sandbox_pwm_set_config,
        .set_enable     = sandbox_pwm_set_enable,
+       .set_invert     = sandbox_pwm_set_invert,
 };
 
 static const struct udevice_id sandbox_pwm_ids[] = {
index ecb036dfbab9d858da10d77e65abeb582b9b5a6f..c409c480fc779e95b3199cf6a76e2f7c3325b57e 100644 (file)
@@ -7,3 +7,4 @@
 obj-$(CONFIG_RAM) += ram-uclass.o
 obj-$(CONFIG_SANDBOX) += sandbox_ram.o
 obj-$(CONFIG_STM32_SDRAM) += stm32_sdram.o
+obj-$(CONFIG_ARCH_BMIPS) += bmips_ram.o
diff --git a/drivers/ram/bmips_ram.c b/drivers/ram/bmips_ram.c
new file mode 100644 (file)
index 0000000..d0f7cd7
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * Derived from linux/arch/mips/bcm63xx/cpu.c:
+ *     Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
+ *     Copyright (C) 2009 Florian Fainelli <florian@openwrt.org>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <errno.h>
+#include <ram.h>
+#include <asm/io.h>
+#include <dm/device.h>
+
+#define MEMC_CFG_REG           0x4
+#define MEMC_CFG_32B_SHIFT     1
+#define MEMC_CFG_32B_MASK      (1 << MEMC_CFG_32B_SHIFT)
+#define MEMC_CFG_COL_SHIFT     3
+#define MEMC_CFG_COL_MASK      (0x3 << MEMC_CFG_COL_SHIFT)
+#define MEMC_CFG_ROW_SHIFT     6
+#define MEMC_CFG_ROW_MASK      (0x3 << MEMC_CFG_ROW_SHIFT)
+
+#define DDR_CSEND_REG          0x8
+
+struct bmips_ram_priv;
+
+struct bmips_ram_hw {
+       ulong (*get_ram_size)(struct bmips_ram_priv *);
+};
+
+struct bmips_ram_priv {
+       void __iomem *regs;
+       const struct bmips_ram_hw *hw;
+};
+
+static ulong bcm6328_get_ram_size(struct bmips_ram_priv *priv)
+{
+       return readl_be(priv->regs + DDR_CSEND_REG) << 24;
+}
+
+static ulong bcm6358_get_ram_size(struct bmips_ram_priv *priv)
+{
+       unsigned int cols = 0, rows = 0, is_32bits = 0, banks = 0;
+       u32 val;
+
+       val = readl_be(priv->regs + MEMC_CFG_REG);
+       rows = (val & MEMC_CFG_ROW_MASK) >> MEMC_CFG_ROW_SHIFT;
+       cols = (val & MEMC_CFG_COL_MASK) >> MEMC_CFG_COL_SHIFT;
+       is_32bits = (val & MEMC_CFG_32B_MASK) ? 0 : 1;
+       banks = 2;
+
+       /* 0 => 11 address bits ... 2 => 13 address bits */
+       rows += 11;
+
+       /* 0 => 8 address bits ... 2 => 10 address bits */
+       cols += 8;
+
+       return 1 << (cols + rows + (is_32bits + 1) + banks);
+}
+
+static int bmips_ram_get_info(struct udevice *dev, struct ram_info *info)
+{
+       struct bmips_ram_priv *priv = dev_get_priv(dev);
+       const struct bmips_ram_hw *hw = priv->hw;
+
+       info->base = 0x80000000;
+       info->size = hw->get_ram_size(priv);
+
+       return 0;
+}
+
+static const struct ram_ops bmips_ram_ops = {
+       .get_info = bmips_ram_get_info,
+};
+
+static const struct bmips_ram_hw bmips_ram_bcm6328 = {
+       .get_ram_size = bcm6328_get_ram_size,
+};
+
+static const struct bmips_ram_hw bmips_ram_bcm6358 = {
+       .get_ram_size = bcm6358_get_ram_size,
+};
+
+static const struct udevice_id bmips_ram_ids[] = {
+       {
+               .compatible = "brcm,bcm6328-mc",
+               .data = (ulong)&bmips_ram_bcm6328,
+       }, {
+               .compatible = "brcm,bcm6358-mc",
+               .data = (ulong)&bmips_ram_bcm6358,
+       }, { /* sentinel */ }
+};
+
+static int bmips_ram_probe(struct udevice *dev)
+{
+       struct bmips_ram_priv *priv = dev_get_priv(dev);
+       const struct bmips_ram_hw *hw =
+               (const struct bmips_ram_hw *)dev_get_driver_data(dev);
+       fdt_addr_t addr;
+       fdt_size_t size;
+
+       addr = dev_get_addr_size_index(dev, 0, &size);
+       if (addr == FDT_ADDR_T_NONE)
+               return -EINVAL;
+
+       priv->regs = ioremap(addr, size);
+       priv->hw = hw;
+
+       return 0;
+}
+
+U_BOOT_DRIVER(bmips_ram) = {
+       .name = "bmips-mc",
+       .id = UCLASS_RAM,
+       .of_match = bmips_ram_ids,
+       .probe = bmips_ram_probe,
+       .priv_auto_alloc_size = sizeof(struct bmips_ram_priv),
+       .ops = &bmips_ram_ops,
+       .flags = DM_FLAG_PRE_RELOC,
+};
index 80f4646a79c5e6bd5470b00f17fb723b67b3e1b1..e6af7da8fe59292f4238e23b3ccef29b9c72986c 100644 (file)
@@ -42,6 +42,12 @@ config TEGRA186_RESET
          Enable support for manipulating Tegra's on-SoC reset signals via IPC
          requests to the BPMP (Boot and Power Management Processor).
 
+config RESET_BCM6345
+       bool "Reset controller driver for BCM6345"
+       depends on DM_RESET && ARCH_BMIPS
+       help
+         Support reset controller on BCM6345.
+
 config RESET_UNIPHIER
        bool "Reset controller driver for UniPhier SoCs"
        depends on ARCH_UNIPHIER
index 630b4b4e541c1ef2e1ab7382454b1f401d64e470..d5e06c2241d7648ac0d812ff5e9719e03f961467 100644 (file)
@@ -8,5 +8,6 @@ obj-$(CONFIG_SANDBOX_MBOX) += sandbox-reset-test.o
 obj-$(CONFIG_STI_RESET) += sti-reset.o
 obj-$(CONFIG_TEGRA_CAR_RESET) += tegra-car-reset.o
 obj-$(CONFIG_TEGRA186_RESET) += tegra186-reset.o
+obj-$(CONFIG_RESET_BCM6345) += reset-bcm6345.o
 obj-$(CONFIG_RESET_UNIPHIER) += reset-uniphier.o
 obj-$(CONFIG_AST2500_RESET) += ast2500-reset.o
diff --git a/drivers/reset/reset-bcm6345.c b/drivers/reset/reset-bcm6345.c
new file mode 100644 (file)
index 0000000..774c2a7
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * Derived from linux/arch/mips/bcm63xx/reset.c:
+ *     Copyright (C) 2012 Jonas Gorski <jonas.gorski@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <errno.h>
+#include <reset-uclass.h>
+#include <asm/io.h>
+
+#define MAX_RESETS     32
+
+struct bcm6345_reset_priv {
+       void __iomem *regs;
+};
+
+static int bcm6345_reset_assert(struct reset_ctl *rst)
+{
+       struct bcm6345_reset_priv *priv = dev_get_priv(rst->dev);
+
+       clrbits_be32(priv->regs, BIT(rst->id));
+       mdelay(20);
+
+       return 0;
+}
+
+static int bcm6345_reset_deassert(struct reset_ctl *rst)
+{
+       struct bcm6345_reset_priv *priv = dev_get_priv(rst->dev);
+
+       setbits_be32(priv->regs, BIT(rst->id));
+       mdelay(20);
+
+       return 0;
+}
+
+static int bcm6345_reset_free(struct reset_ctl *rst)
+{
+       return 0;
+}
+
+static int bcm6345_reset_request(struct reset_ctl *rst)
+{
+       if (rst->id >= MAX_RESETS)
+               return -EINVAL;
+
+       return bcm6345_reset_assert(rst);
+}
+
+struct reset_ops bcm6345_reset_reset_ops = {
+       .free = bcm6345_reset_free,
+       .request = bcm6345_reset_request,
+       .rst_assert = bcm6345_reset_assert,
+       .rst_deassert = bcm6345_reset_deassert,
+};
+
+static const struct udevice_id bcm6345_reset_ids[] = {
+       { .compatible = "brcm,bcm6345-reset" },
+       { /* sentinel */ }
+};
+
+static int bcm6345_reset_probe(struct udevice *dev)
+{
+       struct bcm6345_reset_priv *priv = dev_get_priv(dev);
+       fdt_addr_t addr;
+       fdt_size_t size;
+
+       addr = dev_get_addr_size_index(dev, 0, &size);
+       if (addr == FDT_ADDR_T_NONE)
+               return -EINVAL;
+
+       priv->regs = ioremap(addr, size);
+
+       return 0;
+}
+
+U_BOOT_DRIVER(bcm6345_reset) = {
+       .name = "bcm6345-reset",
+       .id = UCLASS_RESET,
+       .of_match = bcm6345_reset_ids,
+       .ops = &bcm6345_reset_reset_ops,
+       .probe = bcm6345_reset_probe,
+       .priv_auto_alloc_size = sizeof(struct bcm6345_reset_priv),
+};
index 58320666b7d427710c5783c4e1d53936813e8a0e..58fc7cd2e66a75e50041f9a83c7a4273dbd17a87 100644 (file)
@@ -145,6 +145,14 @@ config DEBUG_UART_ATMEL
          will need to provide parameters to make this work. The driver will
          be available until the real driver-model serial is running.
 
+config DEBUG_UART_BCM6345
+       bool "BCM6345 UART"
+       depends on BCM6345_SERIAL
+       help
+         Select this to enable a debug UART on BCM6345 SoCs. You
+         will need to provide parameters to make this work. The driver will
+         be available until the real driver model serial is running.
+
 config DEBUG_UART_NS16550
        bool "ns16550"
        help
@@ -249,6 +257,13 @@ config DEBUG_UART_UNIPHIER
          driver will be available until the real driver-model serial is
          running.
 
+config DEBUG_UART_OMAP
+       bool "OMAP uart"
+       help
+         Select this to enable a debug UART using the omap ns16550 driver.
+         You will need to provide parameters to make this work. The driver
+         will be available until the real driver model serial is running.
+
 endchoice
 
 config DEBUG_UART_BASE
@@ -350,6 +365,12 @@ config ATMEL_USART
          configured in the device tree, and input clock frequency can
          be got from the clk node.
 
+config BCM6345_SERIAL
+       bool "Support for BCM6345 UART"
+       depends on DM_SERIAL && ARCH_BMIPS
+       help
+         Select this to enable UART on BCM6345 SoCs.
+
 config FSL_LPUART
        bool "Freescale LPUART support"
        help
index 4382cf93297b25a4ae35044bbd1dd31e813f795c..dca31b295c14acb2aa326d74daa29122dfa93428 100644 (file)
@@ -20,6 +20,7 @@ obj-$(CONFIG_ALTERA_JTAG_UART) += altera_jtag_uart.o
 obj-$(CONFIG_AR933X_UART) += serial_ar933x.o
 obj-$(CONFIG_ARM_DCC) += arm_dcc.o
 obj-$(CONFIG_ATMEL_USART) += atmel_usart.o
+obj-$(CONFIG_BCM6345_SERIAL) += serial_bcm6345.o
 obj-$(CONFIG_EFI_APP) += serial_efi.o
 obj-$(CONFIG_LPC32XX_HSUART) += lpc32xx_hsuart.o
 obj-$(CONFIG_MCFUART) += mcfuart.o
index 7674f97e8dde04dbf5bf4112874cdb91847d7e4d..453f8eb45188befe643e61fac40508126654f43b 100644 (file)
@@ -7,6 +7,7 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 #include <common.h>
+#include <clk.h>
 #include <dm.h>
 #include <errno.h>
 #include <watchdog.h>
@@ -25,6 +26,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#ifndef CONFIG_DM_SERIAL
 static void atmel_serial_setbrg_internal(atmel_usart3_t *usart, int id,
                                         int baudrate)
 {
@@ -66,7 +68,6 @@ static void atmel_serial_activate(atmel_usart3_t *usart)
        __udelay(100);
 }
 
-#ifndef CONFIG_DM_SERIAL
 static void atmel_serial_setbrg(void)
 {
        atmel_serial_setbrg_internal((atmel_usart3_t *)CONFIG_USART_BASE,
@@ -133,17 +134,47 @@ __weak struct serial_device *default_serial_console(void)
 #endif
 
 #ifdef CONFIG_DM_SERIAL
+enum serial_clk_type {
+       CLK_TYPE_NORMAL = 0,
+       CLK_TYPE_DBGU,
+};
 
 struct atmel_serial_priv {
        atmel_usart3_t *usart;
+       ulong usart_clk_rate;
 };
 
+static void _atmel_serial_set_brg(atmel_usart3_t *usart,
+                                 ulong usart_clk_rate, int baudrate)
+{
+       unsigned long divisor;
+
+       divisor = (usart_clk_rate / 16 + baudrate / 2) / baudrate;
+       writel(USART3_BF(CD, divisor), &usart->brgr);
+}
+
+void _atmel_serial_init(atmel_usart3_t *usart,
+                       ulong usart_clk_rate, int baudrate)
+{
+       writel(USART3_BIT(RXDIS) | USART3_BIT(TXDIS), &usart->cr);
+
+       writel((USART3_BF(USART_MODE, USART3_USART_MODE_NORMAL) |
+               USART3_BF(USCLKS, USART3_USCLKS_MCK) |
+               USART3_BF(CHRL, USART3_CHRL_8) |
+               USART3_BF(PAR, USART3_PAR_NONE) |
+               USART3_BF(NBSTOP, USART3_NBSTOP_1)), &usart->mr);
+
+       _atmel_serial_set_brg(usart, usart_clk_rate, baudrate);
+
+       writel(USART3_BIT(RSTRX) | USART3_BIT(RSTTX), &usart->cr);
+       writel(USART3_BIT(RXEN) | USART3_BIT(TXEN), &usart->cr);
+}
+
 int atmel_serial_setbrg(struct udevice *dev, int baudrate)
 {
        struct atmel_serial_priv *priv = dev_get_priv(dev);
 
-       atmel_serial_setbrg_internal(priv->usart, 0 /* ignored */, baudrate);
-       atmel_serial_activate(priv->usart);
+       _atmel_serial_set_brg(priv->usart, priv->usart_clk_rate, baudrate);
 
        return 0;
 }
@@ -188,10 +219,39 @@ static const struct dm_serial_ops atmel_serial_ops = {
        .setbrg = atmel_serial_setbrg,
 };
 
+static int atmel_serial_enable_clk(struct udevice *dev)
+{
+       struct atmel_serial_priv *priv = dev_get_priv(dev);
+       struct clk clk;
+       ulong clk_rate;
+       int ret;
+
+       ret = clk_get_by_index(dev, 0, &clk);
+       if (ret)
+               return -EINVAL;
+
+       if (dev_get_driver_data(dev) == CLK_TYPE_NORMAL) {
+               ret = clk_enable(&clk);
+               if (ret)
+                       return ret;
+       }
+
+       clk_rate = clk_get_rate(&clk);
+       if (!clk_rate)
+               return -EINVAL;
+
+       priv->usart_clk_rate = clk_rate;
+
+       clk_free(&clk);
+
+       return 0;
+}
+
 static int atmel_serial_probe(struct udevice *dev)
 {
        struct atmel_serial_platdata *plat = dev->platdata;
        struct atmel_serial_priv *priv = dev_get_priv(dev);
+       int ret;
 #if CONFIG_IS_ENABLED(OF_CONTROL)
        fdt_addr_t addr_base;
 
@@ -202,14 +262,26 @@ static int atmel_serial_probe(struct udevice *dev)
        plat->base_addr = (uint32_t)addr_base;
 #endif
        priv->usart = (atmel_usart3_t *)plat->base_addr;
-       atmel_serial_init_internal(priv->usart);
+
+       ret = atmel_serial_enable_clk(dev);
+       if (ret)
+               return ret;
+
+       _atmel_serial_init(priv->usart, priv->usart_clk_rate, gd->baudrate);
 
        return 0;
 }
 
 #if CONFIG_IS_ENABLED(OF_CONTROL)
 static const struct udevice_id atmel_serial_ids[] = {
-       { .compatible = "atmel,at91sam9260-usart" },
+       {
+               .compatible = "atmel,at91sam9260-dbgu",
+               .data = CLK_TYPE_DBGU,
+       },
+       {
+               .compatible = "atmel,at91sam9260-usart",
+               .data = CLK_TYPE_NORMAL,
+       },
        { }
 };
 #endif
@@ -233,7 +305,7 @@ static inline void _debug_uart_init(void)
 {
        atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_DEBUG_UART_BASE;
 
-       atmel_serial_setbrg_internal(usart, 0, CONFIG_BAUDRATE);
+       _atmel_serial_init(usart, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE);
 }
 
 static inline void _debug_uart_putc(int ch)
index 4f86780cb120b37ed78d849ac9d1f0e86f3195cd..0eb7c025618bc3d3f0f3a098017913bd133abf0f 100644 (file)
@@ -175,21 +175,17 @@ void NS16550_init(NS16550_t com_port, int baud_divisor)
                ;
 
        serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier);
-#if defined(CONFIG_OMAP) || defined(CONFIG_AM33XX) || \
-                       defined(CONFIG_TI81XX) || defined(CONFIG_AM43XX)
+#if defined(CONFIG_ARCH_OMAP2PLUS)
        serial_out(0x7, &com_port->mdr1);       /* mode select reset TL16C750*/
 #endif
        serial_out(UART_MCRVAL, &com_port->mcr);
        serial_out(ns16550_getfcr(com_port), &com_port->fcr);
        if (baud_divisor != -1)
                NS16550_setbrg(com_port, baud_divisor);
-#if defined(CONFIG_OMAP) || \
-       defined(CONFIG_AM33XX) || defined(CONFIG_SOC_DA8XX) || \
-       defined(CONFIG_TI81XX) || defined(CONFIG_AM43XX)
-
+#if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_SOC_DA8XX)
        /* /16 is proper to hit 115200 with 48MHz */
        serial_out(0, &com_port->mdr1);
-#endif /* CONFIG_OMAP */
+#endif
 #if defined(CONFIG_SOC_KEYSTONE)
        serial_out(UART_REG_VAL_PWREMU_MGMT_UART_ENABLE, &com_port->regC);
 #endif
@@ -246,17 +242,6 @@ int NS16550_tstc(NS16550_t com_port)
 
 #include <debug_uart.h>
 
-#define serial_dout(reg, value)        \
-       serial_out_shift((char *)com_port + \
-               ((char *)reg - (char *)com_port) * \
-                       (1 << CONFIG_DEBUG_UART_SHIFT), \
-               CONFIG_DEBUG_UART_SHIFT, value)
-#define serial_din(reg) \
-       serial_in_shift((char *)com_port + \
-               ((char *)reg - (char *)com_port) * \
-                       (1 << CONFIG_DEBUG_UART_SHIFT), \
-               CONFIG_DEBUG_UART_SHIFT)
-
 static inline void _debug_uart_init(void)
 {
        struct NS16550 *com_port = (struct NS16550 *)CONFIG_DEBUG_UART_BASE;
@@ -293,6 +278,42 @@ DEBUG_UART_FUNCS
 
 #endif
 
+#ifdef CONFIG_DEBUG_UART_OMAP
+
+#include <debug_uart.h>
+
+static inline void _debug_uart_init(void)
+{
+       struct NS16550 *com_port = (struct NS16550 *)CONFIG_DEBUG_UART_BASE;
+       int baud_divisor;
+
+       baud_divisor = ns16550_calc_divisor(com_port, CONFIG_DEBUG_UART_CLOCK,
+                                           CONFIG_BAUDRATE);
+       serial_dout(&com_port->ier, CONFIG_SYS_NS16550_IER);
+       serial_dout(&com_port->mdr1, 0x7);
+       serial_dout(&com_port->mcr, UART_MCRVAL);
+       serial_dout(&com_port->fcr, UART_FCR_DEFVAL);
+
+       serial_dout(&com_port->lcr, UART_LCR_BKSE | UART_LCRVAL);
+       serial_dout(&com_port->dll, baud_divisor & 0xff);
+       serial_dout(&com_port->dlm, (baud_divisor >> 8) & 0xff);
+       serial_dout(&com_port->lcr, UART_LCRVAL);
+       serial_dout(&com_port->mdr1, 0x0);
+}
+
+static inline void _debug_uart_putc(int ch)
+{
+       struct NS16550 *com_port = (struct NS16550 *)CONFIG_DEBUG_UART_BASE;
+
+       while (!(serial_din(&com_port->lsr) & UART_LSR_THRE))
+               ;
+       serial_dout(&com_port->thr, ch);
+}
+
+DEBUG_UART_FUNCS
+
+#endif
+
 #ifdef CONFIG_DM_SERIAL
 static int ns16550_serial_putc(struct udevice *dev, const char ch)
 {
index 43c028ebe63dfd22c72b5023ad79b6ec53fa59e7..c2b9c5f12f5791ee6e255d053d811be74b517bf2 100644 (file)
@@ -349,7 +349,7 @@ static int serial_pre_remove(struct udevice *dev)
 #if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER)
        struct serial_dev_priv *upriv = dev_get_uclass_priv(dev);
 
-       if (stdio_deregister_dev(upriv->sdev, 0))
+       if (stdio_deregister_dev(upriv->sdev, true))
                return -EPERM;
 #endif
 
diff --git a/drivers/serial/serial_bcm6345.c b/drivers/serial/serial_bcm6345.c
new file mode 100644 (file)
index 0000000..db270e3
--- /dev/null
@@ -0,0 +1,300 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * Derived from linux/drivers/tty/serial/bcm63xx_uart.c:
+ *     Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <clk.h>
+#include <debug_uart.h>
+#include <errno.h>
+#include <serial.h>
+#include <asm/io.h>
+#include <asm/types.h>
+#include <dm/device.h>
+
+/* UART Control register */
+#define UART_CTL_REG                   0x0
+#define UART_CTL_RXTIMEOUT_MASK                0x1f
+#define UART_CTL_RXTIMEOUT_5           0x5
+#define UART_CTL_RSTRXFIFO_SHIFT       6
+#define UART_CTL_RSTRXFIFO_MASK                (1 << UART_CTL_RSTRXFIFO_SHIFT)
+#define UART_CTL_RSTTXFIFO_SHIFT       7
+#define UART_CTL_RSTTXFIFO_MASK                (1 << UART_CTL_RSTTXFIFO_SHIFT)
+#define UART_CTL_STOPBITS_SHIFT                8
+#define UART_CTL_STOPBITS_MASK         (0xf << UART_CTL_STOPBITS_SHIFT)
+#define UART_CTL_STOPBITS_1            (0x7 << UART_CTL_STOPBITS_SHIFT)
+#define UART_CTL_BITSPERSYM_SHIFT      12
+#define UART_CTL_BITSPERSYM_MASK       (0x3 << UART_CTL_BITSPERSYM_SHIFT)
+#define UART_CTL_BITSPERSYM_8          (0x3 << UART_CTL_BITSPERSYM_SHIFT)
+#define UART_CTL_XMITBRK_SHIFT         14
+#define UART_CTL_XMITBRK_MASK          (1 << UART_CTL_XMITBRK_SHIFT)
+#define UART_CTL_RSVD_SHIFT            15
+#define UART_CTL_RSVD_MASK             (1 << UART_CTL_RSVD_SHIFT)
+#define UART_CTL_RXPAREVEN_SHIFT       16
+#define UART_CTL_RXPAREVEN_MASK                (1 << UART_CTL_RXPAREVEN_SHIFT)
+#define UART_CTL_RXPAREN_SHIFT         17
+#define UART_CTL_RXPAREN_MASK          (1 << UART_CTL_RXPAREN_SHIFT)
+#define UART_CTL_TXPAREVEN_SHIFT       18
+#define UART_CTL_TXPAREVEN_MASK                (1 << UART_CTL_TXPAREVEN_SHIFT)
+#define UART_CTL_TXPAREN_SHIFT         19
+#define UART_CTL_TXPAREN_MASK          (1 << UART_CTL_TXPAREN_SHIFT)
+#define UART_CTL_LOOPBACK_SHIFT                20
+#define UART_CTL_LOOPBACK_MASK         (1 << UART_CTL_LOOPBACK_SHIFT)
+#define UART_CTL_RXEN_SHIFT            21
+#define UART_CTL_RXEN_MASK             (1 << UART_CTL_RXEN_SHIFT)
+#define UART_CTL_TXEN_SHIFT            22
+#define UART_CTL_TXEN_MASK             (1 << UART_CTL_TXEN_SHIFT)
+#define UART_CTL_BRGEN_SHIFT           23
+#define UART_CTL_BRGEN_MASK            (1 << UART_CTL_BRGEN_SHIFT)
+
+/* UART Baudword register */
+#define UART_BAUD_REG                  0x4
+
+/* UART FIFO Config register */
+#define UART_FIFO_CFG_REG              0x8
+#define UART_FIFO_CFG_RX_SHIFT         8
+#define UART_FIFO_CFG_RX_MASK          (0xf << UART_FIFO_CFG_RX_SHIFT)
+#define UART_FIFO_CFG_RX_4             (0x4 << UART_FIFO_CFG_RX_SHIFT)
+#define UART_FIFO_CFG_TX_SHIFT         12
+#define UART_FIFO_CFG_TX_MASK          (0xf << UART_FIFO_CFG_TX_SHIFT)
+#define UART_FIFO_CFG_TX_4             (0x4 << UART_FIFO_CFG_TX_SHIFT)
+
+/* UART Interrupt register */
+#define UART_IR_REG                    0x10
+#define UART_IR_STAT(x)                        (1 << (x))
+#define UART_IR_TXEMPTY                        5
+#define UART_IR_RXOVER                 7
+#define UART_IR_RXNOTEMPTY             11
+
+/* UART FIFO register */
+#define UART_FIFO_REG                  0x14
+#define UART_FIFO_VALID_MASK           0xff
+#define UART_FIFO_FRAMEERR_SHIFT       8
+#define UART_FIFO_FRAMEERR_MASK                (1 << UART_FIFO_FRAMEERR_SHIFT)
+#define UART_FIFO_PARERR_SHIFT         9
+#define UART_FIFO_PARERR_MASK          (1 << UART_FIFO_PARERR_SHIFT)
+#define UART_FIFO_BRKDET_SHIFT         10
+#define UART_FIFO_BRKDET_MASK          (1 << UART_FIFO_BRKDET_SHIFT)
+#define UART_FIFO_ANYERR_MASK          (UART_FIFO_FRAMEERR_MASK |      \
+                                       UART_FIFO_PARERR_MASK |         \
+                                       UART_FIFO_BRKDET_MASK)
+
+struct bcm6345_serial_priv {
+       void __iomem *base;
+       ulong uartclk;
+};
+
+/* enable rx & tx operation on uart */
+static void bcm6345_serial_enable(void __iomem *base)
+{
+       setbits_be32(base + UART_CTL_REG, UART_CTL_BRGEN_MASK |
+                    UART_CTL_TXEN_MASK | UART_CTL_RXEN_MASK);
+}
+
+/* disable rx & tx operation on uart */
+static void bcm6345_serial_disable(void __iomem *base)
+{
+       clrbits_be32(base + UART_CTL_REG, UART_CTL_BRGEN_MASK |
+                    UART_CTL_TXEN_MASK | UART_CTL_RXEN_MASK);
+}
+
+/* clear all unread data in rx fifo and unsent data in tx fifo */
+static void bcm6345_serial_flush(void __iomem *base)
+{
+       /* empty rx and tx fifo */
+       setbits_be32(base + UART_CTL_REG, UART_CTL_RSTRXFIFO_MASK |
+                    UART_CTL_RSTTXFIFO_MASK);
+
+       /* read any pending char to make sure all irq status are cleared */
+       readl_be(base + UART_FIFO_REG);
+}
+
+static int bcm6345_serial_init(void __iomem *base, ulong clk, u32 baudrate)
+{
+       u32 val;
+
+       /* mask all irq and flush port */
+       bcm6345_serial_disable(base);
+       bcm6345_serial_flush(base);
+
+       /* set uart control config */
+       clrsetbits_be32(base + UART_CTL_REG,
+                       /* clear rx timeout */
+                       UART_CTL_RXTIMEOUT_MASK |
+                       /* clear stop bits */
+                       UART_CTL_STOPBITS_MASK |
+                       /* clear bits per symbol */
+                       UART_CTL_BITSPERSYM_MASK |
+                       /* clear xmit break */
+                       UART_CTL_XMITBRK_MASK |
+                       /* clear reserved bit */
+                       UART_CTL_RSVD_MASK |
+                       /* disable parity */
+                       UART_CTL_RXPAREN_MASK |
+                       UART_CTL_TXPAREN_MASK |
+                       /* disable loopback */
+                       UART_CTL_LOOPBACK_MASK,
+                       /* set timeout to 5 */
+                       UART_CTL_RXTIMEOUT_5 |
+                       /* set 8 bits/symbol */
+                       UART_CTL_BITSPERSYM_8 |
+                       /* set parity to even */
+                       UART_CTL_RXPAREVEN_MASK |
+                       UART_CTL_TXPAREVEN_MASK);
+
+       /* set uart fifo config */
+       clrsetbits_be32(base + UART_FIFO_CFG_REG,
+                       /* clear fifo config */
+                       UART_FIFO_CFG_RX_MASK |
+                       UART_FIFO_CFG_TX_MASK,
+                       /* set fifo config to 4 */
+                       UART_FIFO_CFG_RX_4 |
+                       UART_FIFO_CFG_TX_4);
+
+       /* set baud rate */
+       val = (clk / baudrate) / 16;
+       if (val & 0x1)
+               val = val;
+       else
+               val = val / 2 - 1;
+       writel_be(val, base + UART_BAUD_REG);
+
+       /* clear interrupts */
+       writel_be(0, base + UART_IR_REG);
+
+       /* enable uart */
+       bcm6345_serial_enable(base);
+
+       return 0;
+}
+
+static int bcm6345_serial_pending(struct udevice *dev, bool input)
+{
+       struct bcm6345_serial_priv *priv = dev_get_priv(dev);
+       u32 val = readl_be(priv->base + UART_IR_REG);
+
+       if (input)
+               return !!(val & UART_IR_STAT(UART_IR_RXNOTEMPTY));
+       else
+               return !(val & UART_IR_STAT(UART_IR_TXEMPTY));
+}
+
+static int bcm6345_serial_setbrg(struct udevice *dev, int baudrate)
+{
+       struct bcm6345_serial_priv *priv = dev_get_priv(dev);
+
+       return bcm6345_serial_init(priv->base, priv->uartclk, baudrate);
+}
+
+static int bcm6345_serial_putc(struct udevice *dev, const char ch)
+{
+       struct bcm6345_serial_priv *priv = dev_get_priv(dev);
+       u32 val;
+
+       val = readl_be(priv->base + UART_IR_REG);
+       if (!(val & UART_IR_STAT(UART_IR_TXEMPTY)))
+               return -EAGAIN;
+
+       writel_be(ch, priv->base + UART_FIFO_REG);
+
+       return 0;
+}
+
+static int bcm6345_serial_getc(struct udevice *dev)
+{
+       struct bcm6345_serial_priv *priv = dev_get_priv(dev);
+       u32 val;
+
+       val = readl_be(priv->base + UART_IR_REG);
+       if (val & UART_IR_STAT(UART_IR_RXOVER))
+               setbits_be32(priv->base + UART_CTL_REG,
+                            UART_CTL_RSTRXFIFO_MASK);
+       if (!(val & UART_IR_STAT(UART_IR_RXNOTEMPTY)))
+               return -EAGAIN;
+
+       val = readl_be(priv->base + UART_FIFO_REG);
+       if (val & UART_FIFO_ANYERR_MASK)
+               return -EAGAIN;
+
+       return val & UART_FIFO_VALID_MASK;
+}
+
+static int bcm6345_serial_probe(struct udevice *dev)
+{
+       struct bcm6345_serial_priv *priv = dev_get_priv(dev);
+       struct clk clk;
+       fdt_addr_t addr;
+       fdt_size_t size;
+       int ret;
+
+       /* get address */
+       addr = dev_get_addr_size_index(dev, 0, &size);
+       if (addr == FDT_ADDR_T_NONE)
+               return -EINVAL;
+
+       priv->base = ioremap(addr, size);
+
+       /* get clock rate */
+       ret = clk_get_by_index(dev, 0, &clk);
+       if (ret < 0)
+               return ret;
+       priv->uartclk = clk_get_rate(&clk) / 2;
+       clk_free(&clk);
+
+       /* initialize serial */
+       return bcm6345_serial_init(priv->base, priv->uartclk, CONFIG_BAUDRATE);
+}
+
+static const struct dm_serial_ops bcm6345_serial_ops = {
+       .putc = bcm6345_serial_putc,
+       .pending = bcm6345_serial_pending,
+       .getc = bcm6345_serial_getc,
+       .setbrg = bcm6345_serial_setbrg,
+};
+
+static const struct udevice_id bcm6345_serial_ids[] = {
+       { .compatible = "brcm,bcm6345-uart" },
+       { /* sentinel */ }
+};
+
+U_BOOT_DRIVER(bcm6345_serial) = {
+       .name = "bcm6345-uart",
+       .id = UCLASS_SERIAL,
+       .of_match = bcm6345_serial_ids,
+       .probe = bcm6345_serial_probe,
+       .priv_auto_alloc_size = sizeof(struct bcm6345_serial_priv),
+       .ops = &bcm6345_serial_ops,
+       .flags = DM_FLAG_PRE_RELOC,
+};
+
+#ifdef CONFIG_DEBUG_UART_BCM6345
+static inline void _debug_uart_init(void)
+{
+       void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE;
+
+       bcm6345_serial_init(base, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE);
+}
+
+static inline void wait_xfered(void __iomem *base)
+{
+       do {
+               u32 val = readl_be(base + UART_IR_REG);
+               if (val & UART_IR_STAT(UART_IR_TXEMPTY))
+                       break;
+       } while (1);
+}
+
+static inline void _debug_uart_putc(int ch)
+{
+       void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE;
+
+       wait_xfered(base);
+       writel_be(ch, base + UART_FIFO_REG);
+       wait_xfered(base);
+}
+
+DEBUG_UART_FUNCS
+#endif
index f3f7dbe0897b82d204ad44b23172c5b5377ae7c1..bef864f46e5ce4e7c3ad1b98445b72e108798732 100644 (file)
@@ -197,6 +197,12 @@ config OMAP3_SPI
 
 endif # if DM_SPI
 
+config SOFT_SPI
+       bool "Soft SPI driver"
+       help
+        Enable Soft SPI driver. This driver is to use GPIO simulate
+        the SPI protocol.
+
 config FSL_ESPI
        bool "Freescale eSPI driver"
        help
index 893fe33b66f77572870397d17d45a077c2075b9a..bf2e99b5ccbd6c8a18afc5d7513bbeee984f6ab6 100644 (file)
@@ -617,6 +617,22 @@ static int ich_spi_probe(struct udevice *dev)
        return 0;
 }
 
+static int ich_spi_remove(struct udevice *bus)
+{
+       struct ich_spi_priv *ctlr = dev_get_priv(bus);
+
+       /*
+        * Configure SPI controller so that the Linux MTD driver can fully
+        * access the SPI NOR chip
+        */
+       ich_writew(ctlr, SPI_OPPREFIX, ctlr->preop);
+       ich_writew(ctlr, SPI_OPTYPE, ctlr->optype);
+       ich_writel(ctlr, SPI_OPMENU_LOWER, ctlr->opmenu);
+       ich_writel(ctlr, SPI_OPMENU_UPPER, ctlr->opmenu + sizeof(u32));
+
+       return 0;
+}
+
 static int ich_spi_set_speed(struct udevice *bus, uint speed)
 {
        struct ich_spi_priv *priv = dev_get_priv(bus);
@@ -700,4 +716,6 @@ U_BOOT_DRIVER(ich_spi) = {
        .priv_auto_alloc_size = sizeof(struct ich_spi_priv),
        .child_pre_probe = ich_spi_child_pre_probe,
        .probe  = ich_spi_probe,
+       .remove = ich_spi_remove,
+       .flags  = DM_FLAG_OS_PREPARE,
 };
index bd0a82080962ae41f42b4bab36cf7ef2db787359..dcb8a9048f86960bb24eff93804e35383c9b5382 100644 (file)
@@ -101,13 +101,6 @@ enum {
        HSFC_FSMIE =            0x8000
 };
 
-enum {
-       SPI_OPCODE_TYPE_READ_NO_ADDRESS =       0,
-       SPI_OPCODE_TYPE_WRITE_NO_ADDRESS =      1,
-       SPI_OPCODE_TYPE_READ_WITH_ADDRESS =     2,
-       SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS =    3
-};
-
 enum {
        ICH_MAX_CMD_LEN         = 5,
 };
@@ -124,8 +117,55 @@ struct spi_trans {
        uint32_t offset;
 };
 
+#define SPI_OPCODE_WRSR                0x01
+#define SPI_OPCODE_PAGE_PROGRAM        0x02
+#define SPI_OPCODE_READ                0x03
+#define SPI_OPCODE_WRDIS       0x04
+#define SPI_OPCODE_RDSR                0x05
 #define SPI_OPCODE_WREN                0x06
 #define SPI_OPCODE_FAST_READ   0x0b
+#define SPI_OPCODE_ERASE_SECT  0x20
+#define SPI_OPCODE_READ_ID     0x9f
+#define SPI_OPCODE_ERASE_BLOCK 0xd8
+
+#define SPI_OPCODE_TYPE_READ_NO_ADDRESS                0
+#define SPI_OPCODE_TYPE_WRITE_NO_ADDRESS       1
+#define SPI_OPCODE_TYPE_READ_WITH_ADDRESS      2
+#define SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS     3
+
+#define SPI_OPMENU_0   SPI_OPCODE_WRSR
+#define SPI_OPTYPE_0   SPI_OPCODE_TYPE_WRITE_NO_ADDRESS
+
+#define SPI_OPMENU_1   SPI_OPCODE_PAGE_PROGRAM
+#define SPI_OPTYPE_1   SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS
+
+#define SPI_OPMENU_2   SPI_OPCODE_READ
+#define SPI_OPTYPE_2   SPI_OPCODE_TYPE_READ_WITH_ADDRESS
+
+#define SPI_OPMENU_3   SPI_OPCODE_RDSR
+#define SPI_OPTYPE_3   SPI_OPCODE_TYPE_READ_NO_ADDRESS
+
+#define SPI_OPMENU_4   SPI_OPCODE_ERASE_SECT
+#define SPI_OPTYPE_4   SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS
+
+#define SPI_OPMENU_5   SPI_OPCODE_READ_ID
+#define SPI_OPTYPE_5   SPI_OPCODE_TYPE_READ_NO_ADDRESS
+
+#define SPI_OPMENU_6   SPI_OPCODE_ERASE_BLOCK
+#define SPI_OPTYPE_6   SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS
+
+#define SPI_OPMENU_7   SPI_OPCODE_FAST_READ
+#define SPI_OPTYPE_7   SPI_OPCODE_TYPE_READ_WITH_ADDRESS
+
+#define SPI_OPPREFIX   ((SPI_OPCODE_WREN << 8) | SPI_OPCODE_WREN)
+#define SPI_OPTYPE     ((SPI_OPTYPE_7 << 14) | (SPI_OPTYPE_6 << 12) | \
+                        (SPI_OPTYPE_5 << 10) | (SPI_OPTYPE_4 <<  8) | \
+                        (SPI_OPTYPE_3 <<  6) | (SPI_OPTYPE_2 <<  4) | \
+                        (SPI_OPTYPE_1 <<  2) | (SPI_OPTYPE_0 <<  0))
+#define SPI_OPMENU_UPPER ((SPI_OPMENU_7 << 24) | (SPI_OPMENU_6 << 16) | \
+                         (SPI_OPMENU_5 <<  8) | (SPI_OPMENU_4 <<  0))
+#define SPI_OPMENU_LOWER ((SPI_OPMENU_3 << 24) | (SPI_OPMENU_2 << 16) | \
+                         (SPI_OPMENU_1 <<  8) | (SPI_OPMENU_0 <<  0))
 
 enum ich_version {
        ICHV_7,
index 76d376ac44500eebc7b201f463ba0ee55259fb61..3caea151c54869ce7ab17a499658eebbe7b099ac 100644 (file)
@@ -568,7 +568,8 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
        priv->freq = max_hz;
        priv->mode = mode;
        priv->wordlen = priv->slave.wordlen;
-#ifdef CONFIG_OMAP3_SPI_D0_D1_SWAPPED
+#if 0
+       /* Please migrate to DM_SPI support for this feature. */
        priv->pin_dir = MCSPI_PINDIR_D0_OUT_D1_IN;
 #endif
 
index 3e44f1795e3ccbcfedb606ece22b01bebd07fde5..ea209801a73322ecf80fc967b9dc76d7813960bd 100644 (file)
@@ -79,12 +79,31 @@ static void rkspi_enable_chip(struct rockchip_spi *regs, bool enable)
 
 static void rkspi_set_clk(struct rockchip_spi_priv *priv, uint speed)
 {
-       uint clk_div;
+       /*
+        * We should try not to exceed the speed requested by the caller:
+        * when selecting a divider, we need to make sure we round up.
+        */
+       uint clk_div = DIV_ROUND_UP(priv->input_rate, speed);
+
+       /* The baudrate register (BAUDR) is defined as a 32bit register where
+        * the upper 16bit are reserved and having 'Fsclk_out' in the lower
+        * 16bits with 'Fsclk_out' defined as follows:
+        *
+        *   Fsclk_out = Fspi_clk/ SCKDV
+        *   Where SCKDV is any even value between 2 and 65534.
+        */
+       if (clk_div > 0xfffe) {
+               clk_div = 0xfffe;
+               debug("%s: can't divide down to %d hz (actual will be %d hz)\n",
+                     __func__, speed, priv->input_rate / clk_div);
+       }
+
+       /* Round up to the next even 16bit number */
+       clk_div = (clk_div + 1) & 0xfffe;
 
-       clk_div = clk_get_divisor(priv->input_rate, speed);
        debug("spi speed %u, div %u\n", speed, clk_div);
 
-       writel(clk_div, &priv->regs->baudr);
+       clrsetbits_le32(&priv->regs->baudr, 0xffff, clk_div);
        priv->last_speed_hz = speed;
 }
 
@@ -190,6 +209,26 @@ static int rockchip_spi_ofdata_to_platdata(struct udevice *bus)
        return 0;
 }
 
+static int rockchip_spi_calc_modclk(ulong max_freq)
+{
+       unsigned div;
+       const unsigned long gpll_hz = 594000000UL;
+
+       /*
+        * We need to find an input clock that provides at least twice
+        * the maximum frequency and can be generated from the assumed
+        * speed of GPLL (594MHz) using an integer divider.
+        *
+        * To give us more achievable bitrates at higher speeds (these
+        * are generated by dividing by an even 16-bit integer from
+        * this frequency), we try to have an input frequency of at
+        * least 4x our max_freq.
+        */
+
+       div = DIV_ROUND_UP(gpll_hz, max_freq * 4);
+       return gpll_hz / div;
+}
+
 static int rockchip_spi_probe(struct udevice *bus)
 {
        struct rockchip_spi_platdata *plat = dev_get_platdata(bus);
@@ -207,11 +246,13 @@ static int rockchip_spi_probe(struct udevice *bus)
        priv->last_transaction_us = timer_get_us();
        priv->max_freq = plat->frequency;
 
-       /*
-        * Use 99 MHz as our clock since it divides nicely into 594 MHz which
-        * is the assumed speed for CLK_GENERAL.
-        */
-       ret = clk_set_rate(&priv->clk, 99000000);
+       /* Clamp the value from the DTS against any hardware limits */
+       if (priv->max_freq > ROCKCHIP_SPI_MAX_RATE)
+               priv->max_freq = ROCKCHIP_SPI_MAX_RATE;
+
+       /* Find a module-input clock that fits with the max_freq setting */
+       ret = clk_set_rate(&priv->clk,
+                          rockchip_spi_calc_modclk(priv->max_freq));
        if (ret < 0) {
                debug("%s: Failed to set clock: %d\n", __func__, ret);
                return ret;
@@ -371,10 +412,10 @@ static int rockchip_spi_set_speed(struct udevice *bus, uint speed)
 {
        struct rockchip_spi_priv *priv = dev_get_priv(bus);
 
-       if (speed > ROCKCHIP_SPI_MAX_RATE)
-               return -EINVAL;
+       /* Clamp to the maximum frequency specified in the DTS */
        if (speed > priv->max_freq)
                speed = priv->max_freq;
+
        priv->speed_hz = speed;
 
        return 0;
@@ -403,6 +444,7 @@ static const struct dm_spi_ops rockchip_spi_ops = {
 
 static const struct udevice_id rockchip_spi_ids[] = {
        { .compatible = "rockchip,rk3288-spi" },
+       { .compatible = "rockchip,rk3399-spi" },
        { }
 };
 
index f1ac81203fa0399fcc977c1a6e2c45bf7a5d8225..02aa9d0436892c4a35b4e9bd4c9576a5e63419dc 100644 (file)
@@ -119,6 +119,13 @@ enum {
 };
 
 #define ROCKCHIP_SPI_TIMEOUT_MS                1000
-#define ROCKCHIP_SPI_MAX_RATE          48000000
+
+/*
+ * We limit the maximum bitrate to 50MBit/s (50MHz) due to an assumed
+ * hardware limitation...  the Linux kernel source has the following
+ * comment:
+ *   "sclk_out: spi master internal logic in rk3x can support 50Mhz"
+ */
+#define ROCKCHIP_SPI_MAX_RATE          50000000
 
 #endif /* __RK_SPI_H */
index 966463036f1175cd26b0cc6aeaba32a2fb8a370a..b2f746494d29520bee1eb1fa1269ddb9639b257a 100644 (file)
@@ -23,4 +23,12 @@ config SYSRESET_PSCI
          must be running on your system.
 
 endif
+
+config SYSRESET_SYSCON
+       bool "Enable support for mfd syscon reboot driver"
+       select REGMAP
+       select SYSCON
+       help
+         Reboot support for generic SYSCON mapped register reset.
+
 endmenu
index 7bb840649ff95655183d796c62af29f6b691a6ea..bd352e754150456c3a5ab6acc352256abc8d34d9 100644 (file)
@@ -6,6 +6,7 @@
 
 obj-$(CONFIG_SYSRESET) += sysreset-uclass.o
 obj-$(CONFIG_SYSRESET_PSCI) += sysreset_psci.o
+obj-$(CONFIG_SYSRESET_SYSCON) += sysreset_syscon.o
 
 ifndef CONFIG_SPL_BUILD
 obj-$(CONFIG_ROCKCHIP_RK3036) += sysreset_rk3036.o
diff --git a/drivers/sysreset/sysreset_syscon.c b/drivers/sysreset/sysreset_syscon.c
new file mode 100644 (file)
index 0000000..3818fae
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * Derived from linux/drivers/power/reset/syscon-reboot.c:
+ *     Copyright (C) 2013, Applied Micro Circuits Corporation
+ *     Author: Feng Kan <fkan@apm.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <errno.h>
+#include <regmap.h>
+#include <sysreset.h>
+#include <syscon.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+struct syscon_reboot_priv {
+       struct regmap *regmap;
+       unsigned int offset;
+       unsigned int mask;
+};
+
+static int syscon_reboot_request(struct udevice *dev, enum sysreset_t type)
+{
+       struct syscon_reboot_priv *priv = dev_get_priv(dev);
+
+       regmap_write(priv->regmap, priv->offset, priv->mask);
+
+       return -EINPROGRESS;
+}
+
+static struct sysreset_ops syscon_reboot_ops = {
+       .request = syscon_reboot_request,
+};
+
+int syscon_reboot_probe(struct udevice *dev)
+{
+       struct udevice *syscon;
+       struct syscon_reboot_priv *priv = dev_get_priv(dev);
+       int err;
+
+       err = uclass_get_device_by_phandle(UCLASS_SYSCON, dev,
+                                          "regmap", &syscon);
+       if (err) {
+               error("unable to find syscon device\n");
+               return err;
+       }
+
+       priv->regmap = syscon_get_regmap(syscon);
+       if (!priv->regmap) {
+               error("unable to find regmap\n");
+               return -ENODEV;
+       }
+
+       priv->offset = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),
+                                      "offset", 0);
+       priv->mask = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),
+                                      "mask", 0);
+
+       return 0;
+}
+
+static const struct udevice_id syscon_reboot_ids[] = {
+       { .compatible = "syscon-reboot" },
+       { /* sentinel */ }
+};
+
+U_BOOT_DRIVER(syscon_reboot) = {
+       .name = "syscon_reboot",
+       .id = UCLASS_SYSRESET,
+       .of_match = syscon_reboot_ids,
+       .probe = syscon_reboot_probe,
+       .priv_auto_alloc_size = sizeof(struct syscon_reboot_priv),
+       .ops = &syscon_reboot_ops,
+};
index d4c8ea4a98aa5a44af0956a3418820c1625c5939..26000a5a45b32b3472a605bdda20226bad5649cc 100644 (file)
@@ -998,7 +998,7 @@ int smsc95xx_eth_recv(struct udevice *dev, int flags, uchar **packetp)
        }
 
        *packetp = ptr + sizeof(packet_len);
-       return packet_len;
+       return packet_len - 4;
 
 err:
        usb_ether_advance_rxbuf(ueth, -1);
@@ -1009,7 +1009,7 @@ static int smsc95xx_free_pkt(struct udevice *dev, uchar *packet, int packet_len)
 {
        struct smsc95xx_private *priv = dev_get_priv(dev);
 
-       packet_len = ALIGN(packet_len, 4);
+       packet_len = ALIGN(packet_len + sizeof(u32), 4);
        usb_ether_advance_rxbuf(&priv->ueth, sizeof(u32) + packet_len);
 
        return 0;
index 2160b1ccdc3d93a658e0f28161322b4292a49aaf..7cd6d24bf50ea5839d0af1fb17738c2df1ae5381 100644 (file)
@@ -432,9 +432,15 @@ static void cb_getvar(struct usb_ep *ep, struct usb_request *req)
                else
                        strcpy(response, "FAILValue not set");
        } else {
-               char envstr[32];
+               char *envstr;
 
-               snprintf(envstr, sizeof(envstr) - 1, "fastboot.%s", cmd);
+               envstr = malloc(strlen("fastboot.") + strlen(cmd) + 1);
+               if (!envstr) {
+                       fastboot_tx_write_str("FAILmalloc error");
+                       return;
+               }
+
+               sprintf(envstr, "fastboot.%s", cmd);
                s = getenv(envstr);
                if (s) {
                        strncat(response, s, chars_left);
@@ -442,6 +448,8 @@ static void cb_getvar(struct usb_ep *ep, struct usb_request *req)
                        printf("WARNING: unknown variable: %s\n", cmd);
                        strcpy(response, "FAILVariable not implemented");
                }
+
+               free(envstr);
        }
        fastboot_tx_write_str(response);
 }
index fb5aa6f889189048edb2cb53c5149eb0be9ceec2..9a67e43c2d947501dcb5fb3d8ae3c0e46c4381e0 100644 (file)
@@ -57,6 +57,7 @@ endif # USB_XHCI_HCD
 
 config USB_EHCI_HCD
        bool "EHCI HCD (USB 2.0) support"
+       default y if ARCH_MX5 || ARCH_MX6
        select USB_HOST
        ---help---
          The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0
@@ -74,12 +75,6 @@ config USB_EHCI_HCD
 
          You may want to read <file:Documentation/usb/ehci.txt>.
 
-config USB_EHCI
-       bool
-       default USB_EHCI_HCD
-       ---help---
-         TODO: rename after most boards switch to Kconfig
-
 if USB_EHCI_HCD
 
 config USB_EHCI_ATMEL
@@ -90,8 +85,8 @@ config USB_EHCI_ATMEL
          Enables support for the on-chip EHCI controller on Atmel chips.
 
 config USB_EHCI_MARVELL
-       bool "Support for MVEBU (AXP / A38x) on-chip EHCI USB controller"
-       depends on ARCH_MVEBU
+       bool "Support for Marvell on-chip EHCI USB controller"
+       depends on ARCH_MVEBU || KIRKWOOD || ORION5X
        default y
        ---help---
          Enables support for the on-chip EHCI controller on MVEBU SoCs.
@@ -110,6 +105,14 @@ config USB_EHCI_MX7
        ---help---
          Enables support for the on-chip EHCI controller on i.MX7 SoCs.
 
+config USB_EHCI_OMAP
+       bool "Support for OMAP3+ on-chip EHCI USB controller"
+       depends on ARCH_OMAP2PLUS
+       default y
+       ---help---
+         Enables support for the on-chip EHCI controller on OMAP3 and later
+         SoCs.
+
 if USB_EHCI_MX7
 
 config MXC_USB_OTG_HACTIVE
index 58c0cf54c21310ecc408ba384819f83ec1ad8ba2..bf354fe8d5216447e5210a2485a1b7fa2a43fe0b 100644 (file)
@@ -24,7 +24,7 @@ obj-$(CONFIG_USB_OHCI_LPC32XX) += ohci-lpc32xx.o
 obj-$(CONFIG_USB_OHCI_GENERIC) += ohci-generic.o
 
 # echi
-obj-$(CONFIG_USB_EHCI) += ehci-hcd.o
+obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o
 obj-$(CONFIG_USB_EHCI_ARMADA100) += ehci-armada100.o utmi-armada100.o
 obj-$(CONFIG_USB_EHCI_ATMEL) += ehci-atmel.o
 ifdef CONFIG_MPC512X
index 92449775799f2e5a2a1f3e9119a657e337011969..4dae83ed6850350470a334f2bbaf2dd5dd093f12 100644 (file)
@@ -30,7 +30,7 @@
 #define CONFIG_SOC_OMAP3430
 #endif
 
-#ifdef CONFIG_OMAP4430
+#ifdef CONFIG_OMAP44XX
 #define CONFIG_ARCH_OMAP4
 #endif
 
index 684ad9539af5ca06b03bb376ecbb7ed23a73d134..ba22dfe6cb092b832b5ce23f2f1061b69d738f55 100644 (file)
@@ -441,7 +441,7 @@ static int omap2430_musb_enable(struct musb *musb)
        twl6030_usb_device_settings();
 #endif
 
-#ifdef CONFIG_OMAP4430
+#ifdef CONFIG_OMAP44XX
        u32 *usbotghs_control = (u32 *)((*ctrl)->control_usbotghs_ctrl);
        *usbotghs_control = USBOTGHS_CONTROL_AVALID |
                USBOTGHS_CONTROL_VBUSVALID | USBOTGHS_CONTROL_IDDIG;
index 97da529b44e99d30c7267d47b3f161e50697a749..57889ef0e7d23c9ab61a800f6b5eba1730b45499 100644 (file)
@@ -55,7 +55,7 @@ static struct omap3_otg_regs *otg;
 #define OMAP3_OTG_SYSSTATUS_RESETDONE                  0x0001
 
 /* OMAP4430 has an internal PHY, use it */
-#ifdef CONFIG_OMAP4430
+#ifdef CONFIG_OMAP44XX
 #define OMAP3_OTG_INTERFSEL_OMAP                       0x0000
 #else
 #define OMAP3_OTG_INTERFSEL_OMAP                       0x0001
@@ -118,11 +118,11 @@ int musb_platform_init(void)
                stdby &= ~OMAP3_OTG_FORCESTDBY_STANDBY;
                writel(stdby, &otg->forcestdby);
 
-#ifdef CONFIG_OMAP3_EVM
+#ifdef CONFIG_TARGET_OMAP3_EVM
                musb_cfg.extvbus = omap3_evm_need_extvbus();
 #endif
 
-#ifdef CONFIG_OMAP4430
+#ifdef CONFIG_OMAP44XX
                u32 *usbotghs_control =
                        (u32 *)((*ctrl)->control_usbotghs_ctrl);
                *usbotghs_control = 0x15;
index ae645c72de7485d922a272de5125c1c45657b328..d91ad0a85b327419b86e263eb1d08b2fa6b2b0a7 100644 (file)
@@ -32,7 +32,7 @@
 
 int musb_platform_init(void);
 
-#ifdef CONFIG_OMAP3_EVM
+#ifdef CONFIG_TARGET_OMAP3_EVM
 extern u8 omap3_evm_need_extvbus(void);
 #endif
 
index e29c3fcfc6de816a061e883877d8fb14997718ed..61dfed8c06360f243bc5ff32c20e0fbc6ba1e58f 100644 (file)
@@ -425,15 +425,7 @@ config VIDEO_FSL_DCU_MAX_FB_SIZE_MB
         Set maximum framebuffer size to be used for Freescale Display
         Controller Unit (DCU4).
 
-config VIDEO_ROCKCHIP
-       bool "Enable Rockchip video support"
-       depends on DM_VIDEO
-       help
-          Rockchip SoCs provide video output capabilities for High-Definition
-          Multimedia Interface (HDMI), Low-voltage Differential Signalling
-          (LVDS), embedded DisplayPort (eDP) and Display Serial Interface
-          (DSI). This driver supports the on-chip video output device, and
-          targets the Rockchip RK3288.
+source "drivers/video/rockchip/Kconfig"
 
 config VIDEO_SANDBOX_SDL
        bool "Enable sandbox video console using SDL"
@@ -627,4 +619,13 @@ config LCD
          CONFIG option. See the README for details. Drives which have been
          converted to driver model will instead used CONFIG_DM_VIDEO.
 
+config VIDEO_DW_HDMI
+       bool
+       help
+         Enables the common driver code for the Designware HDMI TX
+         block found in SoCs from various vendors.
+         As this does not provide any functionality by itself (but
+         rather requires a SoC-specific glue driver to call it), it
+         can not be enabled from the configuration menu.
+
 endmenu
index a80af3104d1eb3297a6801031fc258c8ef4790f2..58f5de5200100a759ec77b7f5748b8a31c59ca1e 100644 (file)
@@ -57,6 +57,7 @@ obj-$(CONFIG_VIDEO_VESA) += vesa.o
 obj-$(CONFIG_FORMIKE) += formike.o
 obj-$(CONFIG_LG4573) += lg4573.o
 obj-$(CONFIG_AM335X_LCD) += am335x-fb.o
+obj-$(CONFIG_VIDEO_DW_HDMI) += dw_hdmi.o
 
 obj-${CONFIG_VIDEO_TEGRA124} += tegra124/
 obj-${CONFIG_EXYNOS_FB} += exynos/
index cc6454f10d4c5f98809d054bd9d017381cabf859..952ef5966118ce4f1ea90149120fc19bad93942b 100644 (file)
  */
 
 #include <common.h>
-#include <lcd.h>
-#include <memalign.h>
-#include <phys2bus.h>
+#include <dm.h>
+#include <video.h>
 #include <asm/arch/mbox.h>
-#include <asm/global_data.h>
+#include <asm/arch/msg.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
-/* Global variables that lcd.c expects to exist */
-vidinfo_t panel_info;
-
-static u32 bcm2835_pitch;
-
-struct msg_query {
-       struct bcm2835_mbox_hdr hdr;
-       struct bcm2835_mbox_tag_physical_w_h physical_w_h;
-       u32 end_tag;
-};
-
-struct msg_setup {
-       struct bcm2835_mbox_hdr hdr;
-       struct bcm2835_mbox_tag_physical_w_h physical_w_h;
-       struct bcm2835_mbox_tag_virtual_w_h virtual_w_h;
-       struct bcm2835_mbox_tag_depth depth;
-       struct bcm2835_mbox_tag_pixel_order pixel_order;
-       struct bcm2835_mbox_tag_alpha_mode alpha_mode;
-       struct bcm2835_mbox_tag_virtual_offset virtual_offset;
-       struct bcm2835_mbox_tag_overscan overscan;
-       struct bcm2835_mbox_tag_allocate_buffer allocate_buffer;
-       struct bcm2835_mbox_tag_pitch pitch;
-       u32 end_tag;
-};
-
-void lcd_ctrl_init(void *lcdbase)
+static int bcm2835_video_probe(struct udevice *dev)
 {
-       ALLOC_CACHE_ALIGN_BUFFER(struct msg_query, msg_query, 1);
-       ALLOC_CACHE_ALIGN_BUFFER(struct msg_setup, msg_setup, 1);
+       struct video_uc_platdata *plat = dev_get_uclass_platdata(dev);
+       struct video_priv *uc_priv = dev_get_uclass_priv(dev);
        int ret;
-       u32 w, h;
-       u32 fb_start, fb_end;
+       int w, h, pitch;
+       ulong fb_base, fb_size, fb_start, fb_end;
 
        debug("bcm2835: Query resolution...\n");
-
-       BCM2835_MBOX_INIT_HDR(msg_query);
-       BCM2835_MBOX_INIT_TAG_NO_REQ(&msg_query->physical_w_h,
-                                       GET_PHYSICAL_W_H);
-       ret = bcm2835_mbox_call_prop(BCM2835_MBOX_PROP_CHAN, &msg_query->hdr);
-       if (ret) {
-               printf("bcm2835: Could not query display resolution\n");
-               /* FIXME: How to disable the LCD to prevent errors? hang()? */
-               return;
-       }
-
-       w = msg_query->physical_w_h.body.resp.width;
-       h = msg_query->physical_w_h.body.resp.height;
+       ret = bcm2835_get_video_size(&w, &h);
+       if (ret)
+               return -EIO;
 
        debug("bcm2835: Setting up display for %d x %d\n", w, h);
-
-       BCM2835_MBOX_INIT_HDR(msg_setup);
-       BCM2835_MBOX_INIT_TAG(&msg_setup->physical_w_h, SET_PHYSICAL_W_H);
-       msg_setup->physical_w_h.body.req.width = w;
-       msg_setup->physical_w_h.body.req.height = h;
-       BCM2835_MBOX_INIT_TAG(&msg_setup->virtual_w_h, SET_VIRTUAL_W_H);
-       msg_setup->virtual_w_h.body.req.width = w;
-       msg_setup->virtual_w_h.body.req.height = h;
-       BCM2835_MBOX_INIT_TAG(&msg_setup->depth, SET_DEPTH);
-       msg_setup->depth.body.req.bpp = 32;
-       BCM2835_MBOX_INIT_TAG(&msg_setup->pixel_order, SET_PIXEL_ORDER);
-       msg_setup->pixel_order.body.req.order = BCM2835_MBOX_PIXEL_ORDER_RGB;
-       BCM2835_MBOX_INIT_TAG(&msg_setup->alpha_mode, SET_ALPHA_MODE);
-       msg_setup->alpha_mode.body.req.alpha = BCM2835_MBOX_ALPHA_MODE_IGNORED;
-       BCM2835_MBOX_INIT_TAG(&msg_setup->virtual_offset, SET_VIRTUAL_OFFSET);
-       msg_setup->virtual_offset.body.req.x = 0;
-       msg_setup->virtual_offset.body.req.y = 0;
-       BCM2835_MBOX_INIT_TAG(&msg_setup->overscan, SET_OVERSCAN);
-       msg_setup->overscan.body.req.top = 0;
-       msg_setup->overscan.body.req.bottom = 0;
-       msg_setup->overscan.body.req.left = 0;
-       msg_setup->overscan.body.req.right = 0;
-       BCM2835_MBOX_INIT_TAG(&msg_setup->allocate_buffer, ALLOCATE_BUFFER);
-       msg_setup->allocate_buffer.body.req.alignment = 0x100;
-       BCM2835_MBOX_INIT_TAG_NO_REQ(&msg_setup->pitch, GET_PITCH);
-
-       ret = bcm2835_mbox_call_prop(BCM2835_MBOX_PROP_CHAN, &msg_setup->hdr);
-       if (ret) {
-               printf("bcm2835: Could not configure display\n");
-               /* FIXME: How to disable the LCD to prevent errors? hang()? */
-               return;
-       }
-
-       w = msg_setup->physical_w_h.body.resp.width;
-       h = msg_setup->physical_w_h.body.resp.height;
-       bcm2835_pitch = msg_setup->pitch.body.resp.pitch;
+       ret = bcm2835_set_video_params(&w, &h, 32, BCM2835_MBOX_PIXEL_ORDER_RGB,
+                                      BCM2835_MBOX_ALPHA_MODE_IGNORED,
+                                      &fb_base, &fb_size, &pitch);
 
        debug("bcm2835: Final resolution is %d x %d\n", w, h);
 
-       panel_info.vl_col = w;
-       panel_info.vl_row = h;
-       panel_info.vl_bpix = LCD_COLOR32;
-
-       gd->fb_base = bus_to_phys(
-               msg_setup->allocate_buffer.body.resp.fb_address);
-
        /* Enable dcache for the frame buffer */
-       fb_start = gd->fb_base & ~(MMU_SECTION_SIZE - 1);
-       fb_end = gd->fb_base + msg_setup->allocate_buffer.body.resp.fb_size;
+       fb_start = fb_base & ~(MMU_SECTION_SIZE - 1);
+       fb_end = fb_base + fb_size;
        fb_end = ALIGN(fb_end, 1 << MMU_SECTION_SHIFT);
        mmu_set_region_dcache_behaviour(fb_start, fb_end - fb_start,
-               DCACHE_WRITEBACK);
-       lcd_set_flush_dcache(1);
-}
+                                       DCACHE_WRITEBACK);
+       video_set_flush_dcache(dev, true);
 
-void lcd_enable(void)
-{
-}
+       uc_priv->xsize = w;
+       uc_priv->ysize = h;
+       uc_priv->bpix = VIDEO_BPP32;
+       plat->base = fb_base;
+       plat->size = fb_size;
 
-int lcd_get_size(int *line_length)
-{
-       *line_length = bcm2835_pitch;
-       return *line_length * panel_info.vl_row;
+       return 0;
 }
+
+static const struct udevice_id bcm2835_video_ids[] = {
+       { .compatible = "brcm,bcm2835-hdmi" },
+       { }
+};
+
+U_BOOT_DRIVER(bcm2835_video) = {
+       .name   = "bcm2835_video",
+       .id     = UCLASS_VIDEO,
+       .of_match = bcm2835_video_ids,
+       .probe  = bcm2835_video_probe,
+};
index 8a5310982371d879ad2d9d690fdeb754abdb8734..6039d676c5b59ca81cadf6ae74c6b8ef2dda602b 100644 (file)
@@ -414,13 +414,9 @@ static void hdmi_av_composer(struct dw_hdmi *hdmi,
                   HDMI_FC_INVIDCONF_DE_IN_POLARITY_ACTIVE_HIGH :
                   HDMI_FC_INVIDCONF_DE_IN_POLARITY_ACTIVE_LOW);
 
-       /*
-        * TODO(sjg@chromium.org>: Need to check for HDMI / DVI
-        * inv_val |= (edid->hdmi_monitor_detected ?
-        *         HDMI_FC_INVIDCONF_DVI_MODEZ_HDMI_MODE :
-        *         HDMI_FC_INVIDCONF_DVI_MODEZ_DVI_MODE);
-        */
-       inv_val |= HDMI_FC_INVIDCONF_DVI_MODEZ_HDMI_MODE;
+       inv_val |= (edid->hdmi_monitor ?
+                  HDMI_FC_INVIDCONF_DVI_MODEZ_HDMI_MODE :
+                  HDMI_FC_INVIDCONF_DVI_MODEZ_DVI_MODE);
 
        inv_val |= HDMI_FC_INVIDCONF_R_V_BLANK_IN_OSC_ACTIVE_LOW;
 
@@ -459,7 +455,7 @@ static void hdmi_av_composer(struct dw_hdmi *hdmi,
 }
 
 /* hdmi initialization step b.4 */
-static void hdmi_enable_video_path(struct dw_hdmi *hdmi)
+static void hdmi_enable_video_path(struct dw_hdmi *hdmi, bool audio)
 {
        uint clkdis;
 
@@ -484,8 +480,10 @@ static void hdmi_enable_video_path(struct dw_hdmi *hdmi)
        clkdis &= ~HDMI_MC_CLKDIS_TMDSCLK_DISABLE;
        hdmi_write(hdmi, clkdis, HDMI_MC_CLKDIS);
 
-       clkdis &= ~HDMI_MC_CLKDIS_AUDCLK_DISABLE;
-       hdmi_write(hdmi, clkdis, HDMI_MC_CLKDIS);
+       if (audio) {
+               clkdis &= ~HDMI_MC_CLKDIS_AUDCLK_DISABLE;
+               hdmi_write(hdmi, clkdis, HDMI_MC_CLKDIS);
+       }
 }
 
 /* workaround to clear the overflow condition */
@@ -716,7 +714,8 @@ int dw_hdmi_enable(struct dw_hdmi *hdmi, const struct display_timing *edid)
 {
        int ret;
 
-       debug("hdmi, mode info : clock %d hdis %d vdis %d\n",
+       debug("%s, mode info : clock %d hdis %d vdis %d\n",
+             edid->hdmi_monitor ? "hdmi" : "dvi",
              edid->pixelclock.typ, edid->hactive.typ, edid->vactive.typ);
 
        hdmi_av_composer(hdmi, edid);
@@ -725,11 +724,13 @@ int dw_hdmi_enable(struct dw_hdmi *hdmi, const struct display_timing *edid)
        if (ret)
                return ret;
 
-       hdmi_enable_video_path(hdmi);
+       hdmi_enable_video_path(hdmi, edid->hdmi_monitor);
 
-       hdmi_audio_fifo_reset(hdmi);
-       hdmi_audio_set_format(hdmi);
-       hdmi_audio_set_samplerate(hdmi, edid->pixelclock.typ);
+       if (edid->hdmi_monitor) {
+               hdmi_audio_fifo_reset(hdmi);
+               hdmi_audio_set_format(hdmi);
+               hdmi_audio_set_samplerate(hdmi, edid->pixelclock.typ);
+       }
 
        hdmi_video_packetize(hdmi);
        hdmi_video_sample(hdmi);
index 23fe783c8844e7d5a994166279bf4d907293e9cb..8a90c25797e8898c9554a8aa1d53d014106fa4df 100644 (file)
 #include <common.h>
 #include <spi.h>
 
-static const unsigned char SEQ_SWRESET[] = {
-       0x01,
-};
-
 static const unsigned char SEQ_USER_SETTING[] = {
        0xF0, 0x5A, 0x5A
 };
@@ -22,10 +18,6 @@ static const unsigned char SEQ_ELVSS_ON[] = {
        0xB1, 0x0D, 0x00, 0x16,
 };
 
-static const unsigned char SEQ_TEMP_SWIRE[] = {
-       0xB2, 0x06, 0x06, 0x06, 0x06,
-};
-
 static const unsigned char SEQ_GTCON[] = {
        0xF7, 0x09, 0x00, 0x00,
 };
@@ -46,10 +38,6 @@ static const unsigned char SEQ_GAMMA_CTRL[] = {
        0xFB, 0x02, 0x5A,
 };
 
-static const unsigned char SEQ_APON[] = {
-       0xF3, 0x00, 0x00, 0x00, 0x0A, 0x02,
-};
-
 static const unsigned char SEQ_DISPCTL[] = {
        0xF2, 0x02, 0x08, 0x08, 0x10, 0x10,
 };
@@ -66,10 +54,6 @@ static const unsigned char SEQ_SLPOUT[] = {
        0x11,
 };
 
-static const unsigned char SEQ_SLPIN[] = {
-       0x10,
-};
-
 static const unsigned char SEQ_DISPON[] = {
        0x29,
 };
diff --git a/drivers/video/rockchip/Kconfig b/drivers/video/rockchip/Kconfig
new file mode 100644 (file)
index 0000000..80e399f
--- /dev/null
@@ -0,0 +1,51 @@
+#
+# Video drivers selection for rockchip soc. These configs only impact the
+# compile process. You can surely check all the options. In this case, all the
+# display driver will be compiled, but which drivers finally  will be used is
+# decided by device tree configuration. What's more, enable needed power for
+# display by configure the device tree, and the vop driver will do the rest.
+#
+# Author: Eric Gao <eric.gao@rock-chips.com>
+#
+
+menuconfig VIDEO_ROCKCHIP
+       bool "Enable Rockchip Video Support"
+       depends on DM_VIDEO
+       help
+               Rockchip SoCs provide video output capabilities for High-Definition
+               Multimedia Interface (HDMI), Low-voltage Differential Signalling
+               (LVDS), embedded DisplayPort (eDP) and Display Serial Interface
+               (DSI). This driver supports the on-chip video output device, and
+               targets the Rockchip RK3288 and RK3399.
+
+if VIDEO_ROCKCHIP
+
+config DISPLAY_ROCKCHIP_EDP
+       bool "EDP Port"
+       depends on VIDEO_ROCKCHIP
+       help
+         This enables Embedded DisplayPort(EDP) display support.
+
+config DISPLAY_ROCKCHIP_LVDS
+       bool "LVDS Port"
+       depends on VIDEO_ROCKCHIP
+       help
+         This enables Low-voltage Differential Signaling(LVDS) display
+         support.
+
+config DISPLAY_ROCKCHIP_HDMI
+       bool "HDMI port"
+       select VIDEO_DW_HDMI
+       depends on VIDEO_ROCKCHIP
+       help
+         This enables High-Definition Multimedia Interface display support.
+
+config DISPLAY_ROCKCHIP_MIPI
+       bool "MIPI Port"
+       depends on VIDEO_ROCKCHIP
+       help
+         This enables Mobile Industry Processor Interface(MIPI) display
+         support. The mipi controller and dphy on rk3288& rk3399 support
+         16,18, 24 bits per pixel with upto 2k resolution ratio.
+
+endif
index 755350b934116c6d2737e235b3ea8b90189a230b..cd54b12a4e49f7b326fa3170f185589b274aa98f 100644 (file)
@@ -5,4 +5,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-y += rk_edp.o rk_hdmi.o rk_vop.o rk_lvds.o ../dw_hdmi.o
+ifdef CONFIG_VIDEO_ROCKCHIP
+obj-y += rk_vop.o
+obj-$(CONFIG_DISPLAY_ROCKCHIP_EDP) += rk_edp.o
+obj-$(CONFIG_DISPLAY_ROCKCHIP_LVDS) += rk_lvds.o
+obj-$(CONFIG_DISPLAY_ROCKCHIP_HDMI) += rk_hdmi.o
+obj-$(CONFIG_DISPLAY_ROCKCHIP_MIPI) += rk_mipi.o
+endif
diff --git a/drivers/video/rockchip/rk_mipi.c b/drivers/video/rockchip/rk_mipi.c
new file mode 100644 (file)
index 0000000..4d9d12e
--- /dev/null
@@ -0,0 +1,491 @@
+/*
+ * Copyright (c) 2017, Fuzhou Rockchip Electronics Co., Ltd
+ * Author: Eric Gao <eric.gao@rock-chips.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <clk.h>
+#include <display.h>
+#include <dm.h>
+#include <fdtdec.h>
+#include <panel.h>
+#include <regmap.h>
+#include <syscon.h>
+#include <asm/gpio.h>
+#include <asm/hardware.h>
+#include <asm/io.h>
+#include <dm/uclass-internal.h>
+#include <linux/kernel.h>
+#include <asm/arch/clock.h>
+#include <asm/arch/cru_rk3399.h>
+#include <asm/arch/grf_rk3399.h>
+#include <asm/arch/rockchip_mipi_dsi.h>
+#include <dt-bindings/clock/rk3288-cru.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * Private information for rk mipi
+ *
+ * @regs: mipi controller address
+ * @grf: GRF register
+ * @panel: panel assined by device tree
+ * @ref_clk: reference clock for mipi dsi pll
+ * @sysclk: config clock for mipi dsi register
+ * @pix_clk: pixel clock for vop->dsi data transmission
+ * @phy_clk: mipi dphy output clock
+ * @txbyte_clk: clock for dsi->dphy high speed data transmission
+ * @txesc_clk: clock for tx esc mode
+ */
+struct rk_mipi_priv {
+       void __iomem *regs;
+       struct rk3399_grf_regs *grf;
+       struct udevice *panel;
+       struct mipi_dsi *dsi;
+       u32 ref_clk;
+       u32 sys_clk;
+       u32 pix_clk;
+       u32 phy_clk;
+       u32 txbyte_clk;
+       u32 txesc_clk;
+};
+
+static int rk_mipi_read_timing(struct udevice *dev,
+                              struct display_timing *timing)
+{
+       int ret;
+
+       ret = fdtdec_decode_display_timing(gd->fdt_blob, dev_of_offset(dev),
+                                        0, timing);
+       if (ret) {
+               debug("%s: Failed to decode display timing (ret=%d)\n",
+                     __func__, ret);
+               return -EINVAL;
+       }
+
+       return 0;
+}
+
+/*
+ * Register write function used only for mipi dsi controller.
+ * Parameter:
+ *  @regs: mipi controller address
+ *  @reg: combination of regaddr(16bit)|bitswidth(8bit)|offset(8bit) you can
+ *        use define in rk_mipi.h directly for this parameter
+ *  @val: value that will be write to specified bits of register
+ */
+static void rk_mipi_dsi_write(u32 regs, u32 reg, u32 val)
+{
+       u32 dat;
+       u32 mask;
+       u32 offset = (reg >> OFFSET_SHIFT) & 0xff;
+       u32 bits = (reg >> BITS_SHIFT) & 0xff;
+       u64 addr = (reg >> ADDR_SHIFT) + regs;
+
+       /* Mask for specifiled bits,the corresponding bits will be clear */
+       mask = ~((0xffffffff << offset) & (0xffffffff >> (32 - offset - bits)));
+
+       /* Make sure val in the available range */
+       val &= ~(0xffffffff << bits);
+
+       /* Get register's original val */
+       dat = readl(addr);
+
+       /* Clear specified bits */
+       dat &= mask;
+
+       /* Fill specified bits */
+       dat |= val << offset;
+
+       writel(dat, addr);
+}
+
+static int rk_mipi_dsi_enable(struct udevice *dev,
+                             const struct display_timing *timing)
+{
+       int node, timing_node;
+       int val;
+       struct rk_mipi_priv *priv = dev_get_priv(dev);
+       u64 regs = (u64)priv->regs;
+       struct display_plat *disp_uc_plat = dev_get_uclass_platdata(dev);
+       u32 txbyte_clk = priv->txbyte_clk;
+       u32 txesc_clk = priv->txesc_clk;
+
+       txesc_clk = txbyte_clk/(txbyte_clk/txesc_clk + 1);
+
+       /* Select the video source */
+       switch (disp_uc_plat->source_id) {
+       case VOP_B:
+               rk_clrsetreg(&priv->grf->soc_con20, GRF_DSI0_VOP_SEL_MASK,
+                            GRF_DSI0_VOP_SEL_B << GRF_DSI0_VOP_SEL_SHIFT);
+                break;
+       case VOP_L:
+               rk_clrsetreg(&priv->grf->soc_con20, GRF_DSI0_VOP_SEL_MASK,
+                            GRF_DSI0_VOP_SEL_L << GRF_DSI0_VOP_SEL_SHIFT);
+                break;
+       default:
+                debug("%s: Invalid VOP id\n", __func__);
+                return -EINVAL;
+       }
+
+       /* Set Controller as TX mode */
+       val = GRF_DPHY_TX0_RXMODE_DIS << GRF_DPHY_TX0_RXMODE_SHIFT;
+       rk_clrsetreg(&priv->grf->soc_con22, GRF_DPHY_TX0_RXMODE_MASK, val);
+
+       /* Exit tx stop mode */
+       val |= GRF_DPHY_TX0_TXSTOPMODE_DIS << GRF_DPHY_TX0_TXSTOPMODE_SHIFT;
+       rk_clrsetreg(&priv->grf->soc_con22, GRF_DPHY_TX0_TXSTOPMODE_MASK, val);
+
+       /* Disable turnequest */
+       val |= GRF_DPHY_TX0_TURNREQUEST_DIS << GRF_DPHY_TX0_TURNREQUEST_SHIFT;
+       rk_clrsetreg(&priv->grf->soc_con22, GRF_DPHY_TX0_TURNREQUEST_MASK, val);
+
+       /* Set Display timing parameter */
+       rk_mipi_dsi_write(regs, VID_HSA_TIME, timing->hsync_len.typ);
+       rk_mipi_dsi_write(regs, VID_HBP_TIME, timing->hback_porch.typ);
+       rk_mipi_dsi_write(regs, VID_HLINE_TIME, (timing->hsync_len.typ
+                         + timing->hback_porch.typ + timing->hactive.typ
+                         + timing->hfront_porch.typ));
+       rk_mipi_dsi_write(regs, VID_VSA_LINES, timing->vsync_len.typ);
+       rk_mipi_dsi_write(regs, VID_VBP_LINES, timing->vback_porch.typ);
+       rk_mipi_dsi_write(regs, VID_VFP_LINES, timing->vfront_porch.typ);
+       rk_mipi_dsi_write(regs, VID_ACTIVE_LINES, timing->vactive.typ);
+
+       /* Set Signal Polarity */
+       val = (timing->flags & DISPLAY_FLAGS_HSYNC_LOW) ? 1 : 0;
+       rk_mipi_dsi_write(regs, HSYNC_ACTIVE_LOW, val);
+
+       val = (timing->flags & DISPLAY_FLAGS_VSYNC_LOW) ? 1 : 0;
+       rk_mipi_dsi_write(regs, VSYNC_ACTIVE_LOW, val);
+
+       val = (timing->flags & DISPLAY_FLAGS_DE_LOW) ? 1 : 0;
+       rk_mipi_dsi_write(regs, DISPLAY_FLAGS_DE_LOW, val);
+
+       val = (timing->flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE) ? 1 : 0;
+       rk_mipi_dsi_write(regs, COLORM_ACTIVE_LOW, val);
+
+       /* Set video mode */
+       rk_mipi_dsi_write(regs, CMD_VIDEO_MODE, VIDEO_MODE);
+
+       /* Set video mode transmission type as burst mode */
+       rk_mipi_dsi_write(regs, VID_MODE_TYPE, BURST_MODE);
+
+       /* Set pix num in a video package */
+       rk_mipi_dsi_write(regs, VID_PKT_SIZE, 0x4b0);
+
+       /* Set dpi color coding depth 24 bit */
+       timing_node = fdt_subnode_offset(gd->fdt_blob, dev_of_offset(dev),
+                                                                        "display-timings");
+       node = fdt_first_subnode(gd->fdt_blob, timing_node);
+       val = fdtdec_get_int(gd->fdt_blob, node, "bits-per-pixel", -1);
+       switch (val) {
+       case 16:
+               rk_mipi_dsi_write(regs, DPI_COLOR_CODING, DPI_16BIT_CFG_1);
+               break;
+       case 24:
+               rk_mipi_dsi_write(regs, DPI_COLOR_CODING, DPI_24BIT);
+               break;
+       case 30:
+               rk_mipi_dsi_write(regs, DPI_COLOR_CODING, DPI_30BIT);
+               break;
+       default:
+               rk_mipi_dsi_write(regs, DPI_COLOR_CODING, DPI_24BIT);
+       }
+       /* Enable low power mode */
+       rk_mipi_dsi_write(regs, LP_CMD_EN, 1);
+       rk_mipi_dsi_write(regs, LP_HFP_EN, 1);
+       rk_mipi_dsi_write(regs, LP_VACT_EN, 1);
+       rk_mipi_dsi_write(regs, LP_VFP_EN, 1);
+       rk_mipi_dsi_write(regs, LP_VBP_EN, 1);
+       rk_mipi_dsi_write(regs, LP_VSA_EN, 1);
+
+       /* Division for timeout counter clk */
+       rk_mipi_dsi_write(regs, TO_CLK_DIVISION, 0x0a);
+
+       /* Tx esc clk division from txbyte clk */
+       rk_mipi_dsi_write(regs, TX_ESC_CLK_DIVISION, txbyte_clk/txesc_clk);
+
+       /* Timeout count for hs<->lp transation between Line period */
+       rk_mipi_dsi_write(regs, HSTX_TO_CNT, 0x3e8);
+
+       /* Phy State transfer timing */
+       rk_mipi_dsi_write(regs, PHY_STOP_WAIT_TIME, 32);
+       rk_mipi_dsi_write(regs, PHY_TXREQUESTCLKHS, 1);
+       rk_mipi_dsi_write(regs, PHY_HS2LP_TIME, 0x14);
+       rk_mipi_dsi_write(regs, PHY_LP2HS_TIME, 0x10);
+       rk_mipi_dsi_write(regs, MAX_RD_TIME, 0x2710);
+
+       /* Power on */
+       rk_mipi_dsi_write(regs, SHUTDOWNZ, 1);
+
+       return 0;
+}
+
+/* rk mipi dphy write function. It is used to write test data to dphy */
+static void rk_mipi_phy_write(u32 regs, unsigned char test_code,
+                             unsigned char *test_data, unsigned char size)
+{
+       int i = 0;
+
+       /* Write Test code */
+       rk_mipi_dsi_write(regs, PHY_TESTCLK, 1);
+       rk_mipi_dsi_write(regs, PHY_TESTDIN, test_code);
+       rk_mipi_dsi_write(regs, PHY_TESTEN, 1);
+       rk_mipi_dsi_write(regs, PHY_TESTCLK, 0);
+       rk_mipi_dsi_write(regs, PHY_TESTEN, 0);
+
+       /* Write Test data */
+       for (i = 0; i < size; i++) {
+               rk_mipi_dsi_write(regs, PHY_TESTCLK, 0);
+               rk_mipi_dsi_write(regs, PHY_TESTDIN, test_data[i]);
+               rk_mipi_dsi_write(regs, PHY_TESTCLK, 1);
+       }
+}
+
+/*
+ * Mipi dphy config function. Calculate the suitable prediv, feedback div,
+ * fsfreqrang value ,cap ,lpf and so on according to the given pix clk rate,
+ * and then enable phy.
+ */
+static int rk_mipi_phy_enable(struct udevice *dev)
+{
+       int i;
+       struct rk_mipi_priv *priv = dev_get_priv(dev);
+       u64 regs = (u64)priv->regs;
+       u64 fbdiv;
+       u64 prediv = 1;
+       u32 max_fbdiv = 512;
+       u32 max_prediv, min_prediv;
+       u64 ddr_clk = priv->phy_clk;
+       u32 refclk = priv->ref_clk;
+       u32 remain = refclk;
+       unsigned char test_data[2] = {0};
+
+       int freq_rang[][2] = {
+               {90, 0x01},   {100, 0x10},  {110, 0x20},  {130, 0x01},
+               {140, 0x11},  {150, 0x21},  {170, 0x02},  {180, 0x12},
+               {200, 0x22},  {220, 0x03},  {240, 0x13},  {250, 0x23},
+               {270, 0x04},  {300, 0x14},  {330, 0x05},  {360, 0x15},
+               {400, 0x25},  {450, 0x06},  {500, 0x16},  {550, 0x07},
+               {600, 0x17},  {650, 0x08},  {700, 0x18},  {750, 0x09},
+               {800, 0x19},  {850, 0x29},  {900, 0x39},  {950, 0x0a},
+               {1000, 0x1a}, {1050, 0x2a}, {1100, 0x3a}, {1150, 0x0b},
+               {1200, 0x1b}, {1250, 0x2b}, {1300, 0x3b}, {1350, 0x0c},
+               {1400, 0x1c}, {1450, 0x2c}, {1500, 0x3c}
+       };
+
+       /* Shutdown mode */
+       rk_mipi_dsi_write(regs, PHY_SHUTDOWNZ, 0);
+       rk_mipi_dsi_write(regs, PHY_RSTZ, 0);
+       rk_mipi_dsi_write(regs, PHY_TESTCLR, 1);
+
+       /* Pll locking */
+       rk_mipi_dsi_write(regs, PHY_TESTCLR, 0);
+
+       /* config cp and lfp */
+       test_data[0] = 0x80 | (ddr_clk / (200 * MHz)) << 3 | 0x3;
+       rk_mipi_phy_write(regs, CODE_PLL_VCORANGE_VCOCAP, test_data, 1);
+
+       test_data[0] = 0x8;
+       rk_mipi_phy_write(regs, CODE_PLL_CPCTRL, test_data, 1);
+
+       test_data[0] = 0x80 | 0x40;
+       rk_mipi_phy_write(regs, CODE_PLL_LPF_CP, test_data, 1);
+
+       /* select the suitable value for fsfreqrang reg */
+       for (i = 0; i < ARRAY_SIZE(freq_rang); i++) {
+               if (ddr_clk / (MHz) >= freq_rang[i][0])
+                       break;
+       }
+       if (i == ARRAY_SIZE(freq_rang)) {
+               debug("%s: Dphy freq out of range!\n", __func__);
+               return -EINVAL;
+       }
+       test_data[0] = freq_rang[i][1] << 1;
+       rk_mipi_phy_write(regs, CODE_HS_RX_LANE0, test_data, 1);
+
+       /*
+        * Calculate the best ddrclk and it's corresponding div value. If the
+        * given pixelclock is great than 250M, ddrclk will be fix 1500M.
+        * Otherwise,
+        * it's equal to ddr_clk= pixclk * 6. 40MHz >= refclk / prediv >= 5MHz
+        * according to spec.
+        */
+       max_prediv = (refclk / (5 * MHz));
+       min_prediv = ((refclk / (40 * MHz)) ? (refclk / (40 * MHz) + 1) : 1);
+
+       debug("%s: DEBUG: max_prediv=%u, min_prediv=%u\n", __func__, max_prediv,
+             min_prediv);
+
+       if (max_prediv < min_prediv) {
+               debug("%s: Invalid refclk value\n", __func__);
+               return -EINVAL;
+       }
+
+       /* Calculate the best refclk and feedback division value for dphy pll */
+       for (i = min_prediv; i < max_prediv; i++) {
+               if ((ddr_clk * i % refclk < remain) &&
+                   (ddr_clk * i / refclk) < max_fbdiv) {
+                       prediv = i;
+                       remain = ddr_clk * i % refclk;
+               }
+       }
+       fbdiv = ddr_clk * prediv / refclk;
+       ddr_clk = refclk * fbdiv / prediv;
+       priv->phy_clk = ddr_clk;
+
+       debug("%s: DEBUG: refclk=%u, refclk=%llu, fbdiv=%llu, phyclk=%llu\n",
+             __func__, refclk, prediv, fbdiv, ddr_clk);
+
+       /* config prediv and feedback reg */
+       test_data[0] = prediv - 1;
+       rk_mipi_phy_write(regs, CODE_PLL_INPUT_DIV_RAT, test_data, 1);
+       test_data[0] = (fbdiv - 1) & 0x1f;
+       rk_mipi_phy_write(regs, CODE_PLL_LOOP_DIV_RAT, test_data, 1);
+       test_data[0] = (fbdiv - 1) >> 5 | 0x80;
+       rk_mipi_phy_write(regs, CODE_PLL_LOOP_DIV_RAT, test_data, 1);
+       test_data[0] = 0x30;
+       rk_mipi_phy_write(regs, CODE_PLL_INPUT_LOOP_DIV_RAT, test_data, 1);
+
+       /* rest config */
+       test_data[0] = 0x4d;
+       rk_mipi_phy_write(regs, CODE_BANDGAP_BIAS_CTRL, test_data, 1);
+
+       test_data[0] = 0x3d;
+       rk_mipi_phy_write(regs, CODE_TERMINATION_CTRL, test_data, 1);
+
+       test_data[0] = 0xdf;
+       rk_mipi_phy_write(regs, CODE_TERMINATION_CTRL, test_data, 1);
+
+       test_data[0] =  0x7;
+       rk_mipi_phy_write(regs, CODE_AFE_BIAS_BANDGAP_ANOLOG, test_data, 1);
+
+       test_data[0] = 0x80 | 0x7;
+       rk_mipi_phy_write(regs, CODE_AFE_BIAS_BANDGAP_ANOLOG, test_data, 1);
+
+       test_data[0] = 0x80 | 15;
+       rk_mipi_phy_write(regs, CODE_HSTXDATALANEREQUSETSTATETIME,
+                         test_data, 1);
+       test_data[0] = 0x80 | 85;
+       rk_mipi_phy_write(regs, CODE_HSTXDATALANEPREPARESTATETIME,
+                         test_data, 1);
+       test_data[0] = 0x40 | 10;
+       rk_mipi_phy_write(regs, CODE_HSTXDATALANEHSZEROSTATETIME,
+                         test_data, 1);
+
+       /* enter into stop mode */
+       rk_mipi_dsi_write(regs, N_LANES, 0x03);
+       rk_mipi_dsi_write(regs, PHY_ENABLECLK, 1);
+       rk_mipi_dsi_write(regs, PHY_FORCEPLL, 1);
+       rk_mipi_dsi_write(regs, PHY_SHUTDOWNZ, 1);
+       rk_mipi_dsi_write(regs, PHY_RSTZ, 1);
+
+       return 0;
+}
+
+/*
+ * This function is called by rk_display_init() using rk_mipi_dsi_enable() and
+ * rk_mipi_phy_enable() to initialize mipi controller and dphy. If success,
+ * enable backlight.
+ */
+static int rk_display_enable(struct udevice *dev, int panel_bpp,
+                         const struct display_timing *timing)
+{
+       int ret;
+       struct rk_mipi_priv *priv = dev_get_priv(dev);
+
+       /* Fill the mipi controller parameter */
+       priv->ref_clk = 24 * MHz;
+       priv->sys_clk = priv->ref_clk;
+       priv->pix_clk = timing->pixelclock.typ;
+       priv->phy_clk = priv->pix_clk * 6;
+       priv->txbyte_clk = priv->phy_clk / 8;
+       priv->txesc_clk = 20 * MHz;
+
+       /* Config  and enable mipi dsi according to timing */
+       ret = rk_mipi_dsi_enable(dev, timing);
+       if (ret) {
+               debug("%s: rk_mipi_dsi_enable() failed (err=%d)\n",
+                     __func__, ret);
+               return ret;
+       }
+
+       /* Config and enable mipi phy */
+       ret = rk_mipi_phy_enable(dev);
+       if (ret) {
+               debug("%s: rk_mipi_phy_enable() failed (err=%d)\n",
+                     __func__, ret);
+               return ret;
+       }
+
+       /* Enable backlight */
+       ret = panel_enable_backlight(priv->panel);
+       if (ret) {
+               debug("%s: panel_enable_backlight() failed (err=%d)\n",
+                     __func__, ret);
+               return ret;
+       }
+
+       return 0;
+}
+
+static int rk_mipi_ofdata_to_platdata(struct udevice *dev)
+{
+       struct rk_mipi_priv *priv = dev_get_priv(dev);
+
+       priv->grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF);
+       if (priv->grf <= 0) {
+               debug("%s: Get syscon grf failed (ret=%llu)\n",
+                     __func__, (u64)priv->grf);
+               return  -ENXIO;
+       }
+       priv->regs = (void *)dev_get_addr(dev);
+       if (priv->regs <= 0) {
+               debug("%s: Get MIPI dsi address failed (ret=%llu)\n", __func__,
+                     (u64)priv->regs);
+               return  -ENXIO;
+       }
+
+       return 0;
+}
+
+/*
+ * Probe function: check panel existence and readingit's timing. Then config
+ * mipi dsi controller and enable it according to the timing parameter.
+ */
+static int rk_mipi_probe(struct udevice *dev)
+{
+       int ret;
+       struct rk_mipi_priv *priv = dev_get_priv(dev);
+
+       ret = uclass_get_device_by_phandle(UCLASS_PANEL, dev, "rockchip,panel",
+                                          &priv->panel);
+       if (ret) {
+               debug("%s: Can not find panel (err=%d)\n", __func__, ret);
+               return ret;
+       }
+
+       return 0;
+}
+
+static const struct dm_display_ops rk_mipi_dsi_ops = {
+       .read_timing = rk_mipi_read_timing,
+       .enable = rk_display_enable,
+};
+
+static const struct udevice_id rk_mipi_dsi_ids[] = {
+       { .compatible = "rockchip,rk3399_mipi_dsi" },
+       { }
+};
+
+U_BOOT_DRIVER(rk_mipi_dsi) = {
+       .name   = "rk_mipi_dsi",
+       .id     = UCLASS_DISPLAY,
+       .of_match = rk_mipi_dsi_ids,
+       .ofdata_to_platdata = rk_mipi_ofdata_to_platdata,
+       .probe  = rk_mipi_probe,
+       .ops    = &rk_mipi_dsi_ops,
+       .priv_auto_alloc_size   = sizeof(struct rk_mipi_priv),
+};
index bc02f800dc4cc080111528ef906628ec9540a258..aa6ca8c859566a97d090c4a105389db0d533def9 100644 (file)
@@ -117,6 +117,10 @@ void rkvop_mode_set(struct rk3288_vop *regs,
                clrsetbits_le32(&regs->sys_ctrl, M_ALL_OUT_EN,
                                V_RGB_OUT_EN(1));
                break;
+       case VOP_MODE_MIPI:
+               clrsetbits_le32(&regs->sys_ctrl, M_ALL_OUT_EN,
+                               V_MIPI_OUT_EN(1));
+                break;
        }
 
        if (mode == VOP_MODE_HDMI || mode == VOP_MODE_EDP)
@@ -177,13 +181,11 @@ void rkvop_mode_set(struct rk3288_vop *regs,
  *
  * @dev:       VOP device that we want to connect to the display
  * @fbbase:    Frame buffer address
- * @l2bpp      Log2 of bits-per-pixels for the display
  * @ep_node:   Device tree node to process - this is the offset of an endpoint
  *             node within the VOP's 'port' list.
  * @return 0 if OK, -ve if something went wrong
  */
-int rk_display_init(struct udevice *dev, ulong fbbase,
-                   enum video_log2_bpp l2bpp, int ep_node)
+int rk_display_init(struct udevice *dev, ulong fbbase, int ep_node)
 {
        struct video_priv *uc_priv = dev_get_uclass_priv(dev);
        const void *blob = gd->fdt_blob;
@@ -195,6 +197,7 @@ int rk_display_init(struct udevice *dev, ulong fbbase,
        int ret, remote, i, offset;
        struct display_plat *disp_uc_plat;
        struct clk clk;
+       enum video_log2_bpp l2bpp;
 
        vop_id = fdtdec_get_int(blob, ep_node, "reg", -1);
        debug("vop_id=%d\n", vop_id);
@@ -244,11 +247,24 @@ int rk_display_init(struct udevice *dev, ulong fbbase,
        ret = clk_get_by_index(dev, 1, &clk);
        if (!ret)
                ret = clk_set_rate(&clk, timing.pixelclock.typ);
-       if (ret) {
+       if (IS_ERR_VALUE(ret)) {
                debug("%s: Failed to set pixel clock: ret=%d\n", __func__, ret);
                return ret;
        }
 
+       /* Set bitwidth for vop display according to vop mode */
+       switch (vop_id) {
+       case VOP_MODE_EDP:
+       case VOP_MODE_HDMI:
+       case VOP_MODE_LVDS:
+               l2bpp = VIDEO_BPP16;
+               break;
+       case VOP_MODE_MIPI:
+               l2bpp = VIDEO_BPP32;
+               break;
+       default:
+               l2bpp = VIDEO_BPP16;
+       }
        rkvop_mode_set(regs, &timing, vop_id);
 
        rkvop_enable(regs, fbbase, 1 << l2bpp, &timing);
@@ -326,7 +342,7 @@ static int rk_vop_probe(struct udevice *dev)
        for (node = fdt_first_subnode(blob, port);
             node > 0;
             node = fdt_next_subnode(blob, node)) {
-               ret = rk_display_init(dev, plat->base, VIDEO_BPP16, node);
+               ret = rk_display_init(dev, plat->base, node);
                if (ret)
                        debug("Device failed: ret=%d\n", ret);
                if (!ret)
@@ -341,7 +357,7 @@ static int rk_vop_bind(struct udevice *dev)
 {
        struct video_uc_platdata *plat = dev_get_uclass_platdata(dev);
 
-       plat->size = 1920 * 1080 * 2;
+       plat->size = 1920 * 1200 * 4;
 
        return 0;
 }
@@ -350,6 +366,8 @@ static const struct video_ops rk_vop_ops = {
 };
 
 static const struct udevice_id rk_vop_ids[] = {
+       { .compatible = "rockchip,rk3399-vop-big" },
+       { .compatible = "rockchip,rk3399-vop-lit" },
        { .compatible = "rockchip,rk3288-vop" },
        { }
 };
index b8afd892ad7f865a81a353b27e22a3b329f33acc..dbaab61b59c09a092755c1942ddeefd2468c26d5 100644 (file)
@@ -5,5 +5,5 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_VIDEO_SUNXI) += sunxi_display.o lcdc.o ../videomodes.o
+obj-$(CONFIG_VIDEO_SUNXI) += sunxi_display.o lcdc.o tve.o ../videomodes.o
 obj-$(CONFIG_VIDEO_DE2) += sunxi_de2.o sunxi_dw_hdmi.o lcdc.o ../dw_hdmi.o
index 92c9d06054f7192f21dada0a98f08136391effa2..de768ba94a3351e08ca0a01fb5307dc7237159ff 100644 (file)
@@ -14,6 +14,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/lcdc.h>
 #include <asm/arch/pwm.h>
+#include <asm/arch/tve.h>
 #include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
@@ -929,63 +930,19 @@ static void sunxi_tvencoder_mode_set(void)
 
        switch (sunxi_display.monitor) {
        case sunxi_monitor_vga:
-               writel(SUNXI_TVE_GCTRL_DAC_INPUT(0, 1) |
-                      SUNXI_TVE_GCTRL_DAC_INPUT(1, 2) |
-                      SUNXI_TVE_GCTRL_DAC_INPUT(2, 3), &tve->gctrl);
-               writel(SUNXI_TVE_CFG0_VGA, &tve->cfg0);
-               writel(SUNXI_TVE_DAC_CFG0_VGA, &tve->dac_cfg0);
-               writel(SUNXI_TVE_UNKNOWN1_VGA, &tve->unknown1);
+               tvencoder_mode_set(tve, tve_mode_vga);
                break;
        case sunxi_monitor_composite_pal_nc:
-               writel(SUNXI_TVE_CHROMA_FREQ_PAL_NC, &tve->chroma_freq);
-               /* Fall through */
+               tvencoder_mode_set(tve, tve_mode_composite_pal_nc);
+               break;
        case sunxi_monitor_composite_pal:
-               writel(SUNXI_TVE_GCTRL_DAC_INPUT(0, 1) |
-                      SUNXI_TVE_GCTRL_DAC_INPUT(1, 2) |
-                      SUNXI_TVE_GCTRL_DAC_INPUT(2, 3) |
-                      SUNXI_TVE_GCTRL_DAC_INPUT(3, 4), &tve->gctrl);
-               writel(SUNXI_TVE_CFG0_PAL, &tve->cfg0);
-               writel(SUNXI_TVE_DAC_CFG0_COMPOSITE, &tve->dac_cfg0);
-               writel(SUNXI_TVE_FILTER_COMPOSITE, &tve->filter);
-               writel(SUNXI_TVE_PORCH_NUM_PAL, &tve->porch_num);
-               writel(SUNXI_TVE_LINE_NUM_PAL, &tve->line_num);
-               writel(SUNXI_TVE_BLANK_BLACK_LEVEL_PAL, &tve->blank_black_level);
-               writel(SUNXI_TVE_UNKNOWN1_COMPOSITE, &tve->unknown1);
-               writel(SUNXI_TVE_CBR_LEVEL_PAL, &tve->cbr_level);
-               writel(SUNXI_TVE_BURST_WIDTH_COMPOSITE, &tve->burst_width);
-               writel(SUNXI_TVE_UNKNOWN2_PAL, &tve->unknown2);
-               writel(SUNXI_TVE_ACTIVE_NUM_COMPOSITE, &tve->active_num);
-               writel(SUNXI_TVE_CHROMA_BW_GAIN_COMP, &tve->chroma_bw_gain);
-               writel(SUNXI_TVE_NOTCH_WIDTH_COMPOSITE, &tve->notch_width);
-               writel(SUNXI_TVE_RESYNC_NUM_PAL, &tve->resync_num);
-               writel(SUNXI_TVE_SLAVE_PARA_COMPOSITE, &tve->slave_para);
+               tvencoder_mode_set(tve, tve_mode_composite_pal);
                break;
        case sunxi_monitor_composite_pal_m:
-               writel(SUNXI_TVE_CHROMA_FREQ_PAL_M, &tve->chroma_freq);
-               writel(SUNXI_TVE_COLOR_BURST_PAL_M, &tve->color_burst);
-               /* Fall through */
+               tvencoder_mode_set(tve, tve_mode_composite_pal_m);
+               break;
        case sunxi_monitor_composite_ntsc:
-               writel(SUNXI_TVE_GCTRL_DAC_INPUT(0, 1) |
-                      SUNXI_TVE_GCTRL_DAC_INPUT(1, 2) |
-                      SUNXI_TVE_GCTRL_DAC_INPUT(2, 3) |
-                      SUNXI_TVE_GCTRL_DAC_INPUT(3, 4), &tve->gctrl);
-               writel(SUNXI_TVE_CFG0_NTSC, &tve->cfg0);
-               writel(SUNXI_TVE_DAC_CFG0_COMPOSITE, &tve->dac_cfg0);
-               writel(SUNXI_TVE_FILTER_COMPOSITE, &tve->filter);
-               writel(SUNXI_TVE_PORCH_NUM_NTSC, &tve->porch_num);
-               writel(SUNXI_TVE_LINE_NUM_NTSC, &tve->line_num);
-               writel(SUNXI_TVE_BLANK_BLACK_LEVEL_NTSC, &tve->blank_black_level);
-               writel(SUNXI_TVE_UNKNOWN1_COMPOSITE, &tve->unknown1);
-               writel(SUNXI_TVE_CBR_LEVEL_NTSC, &tve->cbr_level);
-               writel(SUNXI_TVE_BURST_PHASE_NTSC, &tve->burst_phase);
-               writel(SUNXI_TVE_BURST_WIDTH_COMPOSITE, &tve->burst_width);
-               writel(SUNXI_TVE_UNKNOWN2_NTSC, &tve->unknown2);
-               writel(SUNXI_TVE_SYNC_VBI_LEVEL_NTSC, &tve->sync_vbi_level);
-               writel(SUNXI_TVE_ACTIVE_NUM_COMPOSITE, &tve->active_num);
-               writel(SUNXI_TVE_CHROMA_BW_GAIN_COMP, &tve->chroma_bw_gain);
-               writel(SUNXI_TVE_NOTCH_WIDTH_COMPOSITE, &tve->notch_width);
-               writel(SUNXI_TVE_RESYNC_NUM_NTSC, &tve->resync_num);
-               writel(SUNXI_TVE_SLAVE_PARA_COMPOSITE, &tve->slave_para);
+               tvencoder_mode_set(tve, tve_mode_composite_ntsc);
                break;
        case sunxi_monitor_none:
        case sunxi_monitor_dvi:
@@ -995,14 +952,6 @@ static void sunxi_tvencoder_mode_set(void)
        }
 }
 
-static void sunxi_tvencoder_enable(void)
-{
-       struct sunxi_tve_reg * const tve =
-               (struct sunxi_tve_reg *)SUNXI_TVE0_BASE;
-
-       setbits_le32(&tve->gctrl, SUNXI_TVE_GCTRL_ENABLE);
-}
-
 #endif /* CONFIG_VIDEO_VGA || defined CONFIG_VIDEO_COMPOSITE */
 
 static void sunxi_drc_init(void)
@@ -1080,6 +1029,8 @@ static void sunxi_mode_set(const struct ctfb_res_modes *mode,
        int __maybe_unused clk_div, clk_double;
        struct sunxi_lcdc_reg * const lcdc =
                (struct sunxi_lcdc_reg *)SUNXI_LCD0_BASE;
+       struct sunxi_tve_reg * __maybe_unused const tve =
+               (struct sunxi_tve_reg *)SUNXI_TVE0_BASE;
 
        switch (sunxi_display.monitor) {
        case sunxi_monitor_none:
@@ -1134,7 +1085,7 @@ static void sunxi_mode_set(const struct ctfb_res_modes *mode,
                sunxi_tvencoder_mode_set();
                sunxi_composer_enable();
                lcdc_enable(lcdc, sunxi_display.depth);
-               sunxi_tvencoder_enable();
+               tvencoder_enable(tve);
 #elif defined CONFIG_VIDEO_VGA_VIA_LCD
                sunxi_composer_mode_set(mode, address);
                sunxi_lcdc_tcon0_mode_set(mode, true);
@@ -1153,7 +1104,7 @@ static void sunxi_mode_set(const struct ctfb_res_modes *mode,
                sunxi_tvencoder_mode_set();
                sunxi_composer_enable();
                lcdc_enable(lcdc, sunxi_display.depth);
-               sunxi_tvencoder_enable();
+               tvencoder_enable(tve);
 #endif
                break;
        }
diff --git a/drivers/video/sunxi/tve.c b/drivers/video/sunxi/tve.c
new file mode 100644 (file)
index 0000000..adea78a
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * TV encoder driver for Allwinner SoCs.
+ *
+ * (C) Copyright 2013-2014 Luc Verhaegen <libv@skynet.be>
+ * (C) Copyright 2014-2015 Hans de Goede <hdegoede@redhat.com>
+ * (C) Copyright 2017 Jernej Skrabec <jernej.skrabec@siol.net>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+
+#include <asm/arch/tve.h>
+#include <asm/io.h>
+
+void tvencoder_mode_set(struct sunxi_tve_reg * const tve, enum tve_mode mode)
+{
+       switch (mode) {
+       case tve_mode_vga:
+               writel(SUNXI_TVE_GCTRL_DAC_INPUT(0, 1) |
+                      SUNXI_TVE_GCTRL_DAC_INPUT(1, 2) |
+                      SUNXI_TVE_GCTRL_DAC_INPUT(2, 3), &tve->gctrl);
+               writel(SUNXI_TVE_CFG0_VGA, &tve->cfg0);
+               writel(SUNXI_TVE_DAC_CFG0_VGA, &tve->dac_cfg0);
+               writel(SUNXI_TVE_UNKNOWN1_VGA, &tve->unknown1);
+               break;
+       case tve_mode_composite_pal_nc:
+               writel(SUNXI_TVE_CHROMA_FREQ_PAL_NC, &tve->chroma_freq);
+               /* Fall through */
+       case tve_mode_composite_pal:
+               writel(SUNXI_TVE_GCTRL_DAC_INPUT(0, 1) |
+                      SUNXI_TVE_GCTRL_DAC_INPUT(1, 2) |
+                      SUNXI_TVE_GCTRL_DAC_INPUT(2, 3) |
+                      SUNXI_TVE_GCTRL_DAC_INPUT(3, 4), &tve->gctrl);
+               writel(SUNXI_TVE_CFG0_PAL, &tve->cfg0);
+               writel(SUNXI_TVE_DAC_CFG0_COMPOSITE, &tve->dac_cfg0);
+               writel(SUNXI_TVE_FILTER_COMPOSITE, &tve->filter);
+               writel(SUNXI_TVE_PORCH_NUM_PAL, &tve->porch_num);
+               writel(SUNXI_TVE_LINE_NUM_PAL, &tve->line_num);
+               writel(SUNXI_TVE_BLANK_BLACK_LEVEL_PAL,
+                      &tve->blank_black_level);
+               writel(SUNXI_TVE_UNKNOWN1_COMPOSITE, &tve->unknown1);
+               writel(SUNXI_TVE_CBR_LEVEL_PAL, &tve->cbr_level);
+               writel(SUNXI_TVE_BURST_WIDTH_COMPOSITE, &tve->burst_width);
+               writel(SUNXI_TVE_UNKNOWN2_PAL, &tve->unknown2);
+               writel(SUNXI_TVE_ACTIVE_NUM_COMPOSITE, &tve->active_num);
+               writel(SUNXI_TVE_CHROMA_BW_GAIN_COMP, &tve->chroma_bw_gain);
+               writel(SUNXI_TVE_NOTCH_WIDTH_COMPOSITE, &tve->notch_width);
+               writel(SUNXI_TVE_RESYNC_NUM_PAL, &tve->resync_num);
+               writel(SUNXI_TVE_SLAVE_PARA_COMPOSITE, &tve->slave_para);
+               break;
+       case tve_mode_composite_pal_m:
+               writel(SUNXI_TVE_CHROMA_FREQ_PAL_M, &tve->chroma_freq);
+               writel(SUNXI_TVE_COLOR_BURST_PAL_M, &tve->color_burst);
+               /* Fall through */
+       case tve_mode_composite_ntsc:
+               writel(SUNXI_TVE_GCTRL_DAC_INPUT(0, 1) |
+                      SUNXI_TVE_GCTRL_DAC_INPUT(1, 2) |
+                      SUNXI_TVE_GCTRL_DAC_INPUT(2, 3) |
+                      SUNXI_TVE_GCTRL_DAC_INPUT(3, 4), &tve->gctrl);
+               writel(SUNXI_TVE_CFG0_NTSC, &tve->cfg0);
+               writel(SUNXI_TVE_DAC_CFG0_COMPOSITE, &tve->dac_cfg0);
+               writel(SUNXI_TVE_FILTER_COMPOSITE, &tve->filter);
+               writel(SUNXI_TVE_PORCH_NUM_NTSC, &tve->porch_num);
+               writel(SUNXI_TVE_LINE_NUM_NTSC, &tve->line_num);
+               writel(SUNXI_TVE_BLANK_BLACK_LEVEL_NTSC,
+                      &tve->blank_black_level);
+               writel(SUNXI_TVE_UNKNOWN1_COMPOSITE, &tve->unknown1);
+               writel(SUNXI_TVE_CBR_LEVEL_NTSC, &tve->cbr_level);
+               writel(SUNXI_TVE_BURST_PHASE_NTSC, &tve->burst_phase);
+               writel(SUNXI_TVE_BURST_WIDTH_COMPOSITE, &tve->burst_width);
+               writel(SUNXI_TVE_UNKNOWN2_NTSC, &tve->unknown2);
+               writel(SUNXI_TVE_SYNC_VBI_LEVEL_NTSC, &tve->sync_vbi_level);
+               writel(SUNXI_TVE_ACTIVE_NUM_COMPOSITE, &tve->active_num);
+               writel(SUNXI_TVE_CHROMA_BW_GAIN_COMP, &tve->chroma_bw_gain);
+               writel(SUNXI_TVE_NOTCH_WIDTH_COMPOSITE, &tve->notch_width);
+               writel(SUNXI_TVE_RESYNC_NUM_NTSC, &tve->resync_num);
+               writel(SUNXI_TVE_SLAVE_PARA_COMPOSITE, &tve->slave_para);
+               break;
+       }
+}
+
+void tvencoder_enable(struct sunxi_tve_reg * const tve)
+{
+       setbits_le32(&tve->gctrl, SUNXI_TVE_GCTRL_ENABLE);
+}
index 32a4e7f8a90e6b3f670330880a1fca574bdef9b1..f803067da31b9ae54267074bbf083fe5a57e22e2 100644 (file)
@@ -316,7 +316,7 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
                }
                break;
 #endif /* CONFIG_BMP_16BPP */
-#if defined(CONFIG_BMP_24BMP)
+#if defined(CONFIG_BMP_24BPP)
        case 24:
                for (i = 0; i < height; ++i) {
                        for (j = 0; j < width; j++) {
@@ -328,7 +328,7 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
                        fb -= priv->line_length + width * (bpix / 8);
                }
                break;
-#endif /* CONFIG_BMP_24BMP */
+#endif /* CONFIG_BMP_24BPP */
 #if defined(CONFIG_BMP_32BPP)
        case 32:
                for (i = 0; i < height; ++i) {
index 2034e3c620f8d06859e5e88acfff1d32eef8af88..22a7c4f80180d804d6c69e8645de6705fef257f9 100644 (file)
@@ -1,5 +1,25 @@
 menu "Watchdog Timer Support"
 
+config HW_WATCHDOG
+       bool
+
+config BCM2835_WDT
+       bool "Enable BCM2835/2836 watchdog driver"
+       select HW_WATCHDOG
+       help
+         Say Y here to enable the BCM2835/2836 watchdog
+
+         This provides basic infrastructure to support BCM2835/2836 watchdog
+         hardware, with a max timeout of ~15secs.
+
+config OMAP_WATCHDOG
+       bool "TI OMAP watchdog driver"
+       depends on ARCH_OMAP2PLUS
+       select HW_WATCHDOG
+       default y if AM33XX
+       help
+         Say Y here to enable the OMAP3+ watchdog driver.
+       
 config ULP_WATCHDOG
        bool "i.MX7ULP watchdog"
        help
index dfc7fbda4ab5c9bff40d6f29257bcee1e05dfcad..8378601b33124cb6e5d6236be95c12ee6dbc6550 100644 (file)
@@ -18,3 +18,4 @@ obj-$(CONFIG_ULP_WATCHDOG) += ulp_wdog.o
 obj-$(CONFIG_WDT) += wdt-uclass.o
 obj-$(CONFIG_WDT_SANDBOX) += sandbox_wdt.o
 obj-$(CONFIG_WDT_ASPEED) += ast_wdt.o
+obj-$(CONFIG_BCM2835_WDT)       += bcm2835_wdt.o
diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/watchdog/bcm2835_wdt.c
new file mode 100644 (file)
index 0000000..6f753ae
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Watchdog driver for Broadcom BCM2835
+ *
+ * Copyright (C) 2017 Paolo Pisati <p.pisati@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0
+ */
+
+#include <common.h>
+#include <efi_loader.h>
+#include <asm/io.h>
+#include <asm/arch/wdog.h>
+
+#define SECS_TO_WDOG_TICKS(x) ((x) << 16)
+#define MAX_TIMEOUT   0xf /* ~15s */
+
+static __efi_runtime_data bool enabled = true;
+
+extern void reset_cpu(ulong ticks);
+
+void hw_watchdog_reset(void)
+{
+       if (enabled)
+               reset_cpu(SECS_TO_WDOG_TICKS(MAX_TIMEOUT));
+}
+
+void hw_watchdog_init(void)
+{
+       hw_watchdog_reset();
+}
+
+void __efi_runtime hw_watchdog_disable(void)
+{
+       enabled = false;
+}
index 6fe7a5bc08adf4caccbf3bccc9cb9ca4283b599f..9a0622154ad0befb28ba76509b6a310e7dfe089d 100644 (file)
@@ -51,6 +51,14 @@ config OF_EMBED
          and development only and is not recommended for production devices.
          Boards in the mainline U-Boot tree should not use it.
 
+config OF_BOARD
+       bool "Provided by the board at runtime"
+       depends on !SANDBOX
+       help
+         If this option is enabled, the device tree will be provided by
+         the board at runtime if the board supports it, instead of being
+         bundled with the image.
+
 config OF_HOSTFILE
        bool "Host filed DTB for DT control"
        depends on SANDBOX
index 094d60afe8e65e436ef4333c0fe96fd0ca19cfa6..dfd4d9d72c74e6302373e4716d64df48195a0909 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * This is from the Android Project,
- * Repository: https://android.googlesource.com/platform/bootable/bootloader/legacy
- * File: include/boot/bootimg.h
- * Commit: 4205b865141ff2e255fe1d3bd16de18e217ef06a
+ * Repository: https://android.googlesource.com/platform/system/core/
+ * File: mkbootimg/bootimg.h
+ * Commit: d162828814b08ada310846a33205befb69ef5799
  *
  * Copyright (C) 2008 The Android Open Source Project
  *
 #ifndef _ANDROID_IMAGE_H_
 #define _ANDROID_IMAGE_H_
 
+typedef struct andr_img_hdr andr_img_hdr;
+
 #define ANDR_BOOT_MAGIC "ANDROID!"
 #define ANDR_BOOT_MAGIC_SIZE 8
 #define ANDR_BOOT_NAME_SIZE 16
 #define ANDR_BOOT_ARGS_SIZE 512
+#define ANDR_BOOT_EXTRA_ARGS_SIZE 1024
 
 struct andr_img_hdr {
        char magic[ANDR_BOOT_MAGIC_SIZE];
@@ -31,14 +34,25 @@ struct andr_img_hdr {
 
        u32 tags_addr;          /* physical addr for kernel tags */
        u32 page_size;          /* flash page size we assume */
-       u32 unused[2];          /* future expansion: should be 0 */
+       u32 unused;             /* reserved for future expansion: MUST be 0 */
+
+       /* operating system version and security patch level; for
+        * version "A.B.C" and patch level "Y-M-D":
+        * ver = A << 14 | B << 7 | C         (7 bits for each of A, B, C)
+        * lvl = ((Y - 2000) & 127) << 4 | M  (7 bits for Y, 4 bits for M)
+        * os_version = ver << 11 | lvl */
+       u32 os_version;
 
        char name[ANDR_BOOT_NAME_SIZE]; /* asciiz product name */
 
        char cmdline[ANDR_BOOT_ARGS_SIZE];
 
        u32 id[8]; /* timestamp / checksum / sha1 / etc */
-};
+
+       /* Supplemental command line data; kept here to maintain
+        * binary compatibility with older versions of mkbootimg */
+       char extra_cmdline[ANDR_BOOT_EXTRA_ARGS_SIZE];
+} __attribute__((packed));
 
 /*
  * +-----------------+
index 1a77c982fa3a5ab75ac533562312780e271915f2..51838b5ead6631cc601509046eec53bc9664bbd3 100644 (file)
@@ -83,8 +83,8 @@ typedef struct global_data {
 #ifdef CONFIG_SYS_I2C_MXC
        void *srdata[10];
 #endif
-       unsigned long timebase_h;
-       unsigned long timebase_l;
+       unsigned int timebase_h;
+       unsigned int timebase_l;
 #ifdef CONFIG_SYS_MALLOC_F_LEN
        unsigned long malloc_base;      /* base address of early malloc() */
        unsigned long malloc_limit;     /* limit address */
diff --git a/include/atf_common.h b/include/atf_common.h
new file mode 100644 (file)
index 0000000..8c513e7
--- /dev/null
@@ -0,0 +1,183 @@
+/*
+ * This is from the ARM TF Project,
+ * Repository: https://github.com/ARM-software/arm-trusted-firmware.git
+ * File: include/common/bl_common.h
+ * Portions copyright (c) 2013-2016, ARM Limited and Contributors. All rights
+ * reserved.
+ * Copyright (C) 2016-2017 Rockchip Electronic Co.,Ltd
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+#ifndef __BL_COMMON_H__
+#define __BL_COMMON_H__
+
+#define ATF_PARAM_EP           0x01
+#define ATF_PARAM_IMAGE_BINARY 0x02
+#define ATF_PARAM_BL31         0x03
+
+#define ATF_VERSION_1  0x01
+
+#define ATF_EP_SECURE  0x0
+#define ATF_EP_NON_SECURE      0x1
+
+#define SET_PARAM_HEAD(_p, _type, _ver, _attr) do { \
+       (_p)->h.type = (uint8_t)(_type); \
+       (_p)->h.version = (uint8_t)(_ver); \
+       (_p)->h.size = (uint16_t)sizeof(*_p); \
+       (_p)->h.attr = (uint32_t)(_attr) ; \
+       } while (0)
+
+#define MODE_RW_SHIFT  0x4
+#define MODE_RW_MASK   0x1
+#define MODE_RW_64     0x0
+#define MODE_RW_32     0x1
+
+#define MODE_EL_SHIFT  0x2
+#define MODE_EL_MASK   0x3
+#define MODE_EL3       0x3
+#define MODE_EL2       0x2
+#define MODE_EL1       0x1
+#define MODE_EL0       0x0
+
+#define MODE_SP_SHIFT  0x0
+#define MODE_SP_MASK   0x1
+#define MODE_SP_EL0    0x0
+#define MODE_SP_ELX    0x1
+
+#define SPSR_DAIF_SHIFT        6
+#define SPSR_DAIF_MASK 0x0f
+
+#define SPSR_64(el, sp, daif)          \
+       (MODE_RW_64 << MODE_RW_SHIFT |  \
+        ((el) & MODE_EL_MASK) << MODE_EL_SHIFT |       \
+        ((sp) & MODE_SP_MASK) << MODE_SP_SHIFT |       \
+        ((daif) & SPSR_DAIF_MASK) << SPSR_DAIF_SHIFT)
+
+#define SPSR_FIQ             (1 << 6)
+#define SPSR_IRQ             (1 << 7)
+#define SPSR_SERROR          (1 << 8)
+#define SPSR_DEBUG           (1 << 9)
+#define SPSR_EXCEPTION_MASK  (SPSR_FIQ | SPSR_IRQ | SPSR_SERROR | SPSR_DEBUG)
+
+#define DAIF_FIQ_BIT (1<<0)
+#define DAIF_IRQ_BIT (1<<1)
+#define DAIF_ABT_BIT (1<<2)
+#define DAIF_DBG_BIT (1<<3)
+#define DISABLE_ALL_EXECPTIONS \
+       (DAIF_FIQ_BIT | DAIF_IRQ_BIT | DAIF_ABT_BIT | DAIF_DBG_BIT)
+
+#ifndef __ASSEMBLY__
+
+/*******************************************************************************
+ * Structure used for telling the next BL how much of a particular type of
+ * memory is available for its use and how much is already used.
+ ******************************************************************************/
+struct aapcs64_params {
+       unsigned long arg0;
+       unsigned long arg1;
+       unsigned long arg2;
+       unsigned long arg3;
+       unsigned long arg4;
+       unsigned long arg5;
+       unsigned long arg6;
+       unsigned long arg7;
+};
+
+/***************************************************************************
+ * This structure provides version information and the size of the
+ * structure, attributes for the structure it represents
+ ***************************************************************************/
+struct param_header {
+       uint8_t type;           /* type of the structure */
+       uint8_t version;    /* version of this structure */
+       uint16_t size;      /* size of this structure in bytes */
+       uint32_t attr;      /* attributes: unused bits SBZ */
+};
+
+/*****************************************************************************
+ * This structure represents the superset of information needed while
+ * switching exception levels. The only two mechanisms to do so are
+ * ERET & SMC. Security state is indicated using bit zero of header
+ * attribute
+ * NOTE: BL1 expects entrypoint followed by spsr at an offset from the start
+ * of this structure defined by the macro `ENTRY_POINT_INFO_PC_OFFSET` while
+ * processing SMC to jump to BL31.
+ *****************************************************************************/
+struct entry_point_info {
+       struct param_header h;
+       uintptr_t pc;
+       uint32_t spsr;
+       struct aapcs64_params args;
+};
+
+/*****************************************************************************
+ * Image info binary provides information from the image loader that
+ * can be used by the firmware to manage available trusted RAM.
+ * More advanced firmware image formats can provide additional
+ * information that enables optimization or greater flexibility in the
+ * common firmware code
+ *****************************************************************************/
+struct atf_image_info {
+       struct param_header h;
+       uintptr_t image_base;   /* physical address of base of image */
+       uint32_t image_size;    /* bytes read from image file */
+};
+
+/*****************************************************************************
+ * The image descriptor struct definition.
+ *****************************************************************************/
+struct image_desc {
+       /* Contains unique image id for the image. */
+       unsigned int image_id;
+       /*
+        * This member contains Image state information.
+        * Refer IMAGE_STATE_XXX defined above.
+        */
+       unsigned int state;
+       uint32_t copied_size;   /* image size copied in blocks */
+       struct atf_image_info atf_image_info;
+       struct entry_point_info ep_info;
+};
+
+/*******************************************************************************
+ * This structure represents the superset of information that can be passed to
+ * BL31 e.g. while passing control to it from BL2. The BL32 parameters will be
+ * populated only if BL2 detects its presence. A pointer to a structure of this
+ * type should be passed in X0 to BL31's cold boot entrypoint.
+ *
+ * Use of this structure and the X0 parameter is not mandatory: the BL31
+ * platform code can use other mechanisms to provide the necessary information
+ * about BL32 and BL33 to the common and SPD code.
+ *
+ * BL31 image information is mandatory if this structure is used. If either of
+ * the optional BL32 and BL33 image information is not provided, this is
+ * indicated by the respective image_info pointers being zero.
+ ******************************************************************************/
+struct bl31_params {
+       struct param_header h;
+       struct atf_image_info *bl31_image_info;
+       struct entry_point_info *bl32_ep_info;
+       struct atf_image_info *bl32_image_info;
+       struct entry_point_info *bl33_ep_info;
+       struct atf_image_info *bl33_image_info;
+};
+
+/*******************************************************************************
+ * This structure represents the superset of information that is passed to
+ * BL31, e.g. while passing control to it from BL2, bl31_params
+ * and other platform specific params
+ ******************************************************************************/
+struct bl2_to_bl31_params_mem {
+       struct bl31_params bl31_params;
+       struct atf_image_info bl31_image_info;
+       struct atf_image_info bl32_image_info;
+       struct atf_image_info bl33_image_info;
+       struct entry_point_info bl33_ep_info;
+       struct entry_point_info bl32_ep_info;
+       struct entry_point_info bl31_ep_info;
+};
+
+#endif /*__ASSEMBLY__*/
+
+#endif /* __BL_COMMON_H__ */
index 83e4037a86d6d2796d6a831061c8ee86470f7f1f..45f190a600f58b39b140f3638ce6530e2636e4eb 100644 (file)
@@ -499,9 +499,19 @@ void       reset_phy     (void);
 void   fdc_hw_init   (void);
 
 /* $(BOARD)/eeprom.c */
+#ifdef CONFIG_CMD_EEPROM
 void eeprom_init  (int bus);
 int  eeprom_read  (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt);
 int  eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt);
+#else
+/*
+ * Some EEPROM code is depecated because it used the legacy I2C interface. Add
+ * some macros here so we don't have to touch every one of those uses
+ */
+#define eeprom_init(bus)
+#define eeprom_read(dev_addr, offset, buffer, cnt) ((void)-ENOSYS)
+#define eeprom_write(dev_addr, offset, buffer, cnt) ((void)-ENOSYS)
+#endif
 
 /*
  * Set this up regardless of board
index abfdbc927677997e419627ca08e88c460057cff9..2041b7bb3e58238b65325b0772d95e3627671805 100644 (file)
@@ -723,9 +723,7 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_HAS_FSL_DR_USB
 
 #ifdef CONFIG_HAS_FSL_DR_USB
-#define CONFIG_USB_EHCI
-
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #endif
index 6f333e75ef7d76e58bf9fab7aa5321298d9c97c8..72dc8ba71041501dce0bddb7d913ff3b7a91f99d 100644 (file)
@@ -334,9 +334,7 @@ extern unsigned long get_sdram_size(void);
 #define CONFIG_SHA_HW_ACCEL
 #endif
 
-#define CONFIG_USB_EHCI
-
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_HAS_FSL_DR_USB
index 9097932581c8bfc29f246aa76863a7314890e247..1b956fc7da653164e5cb3d097c45b4c1960152e0 100644 (file)
@@ -476,8 +476,7 @@ combinations. this should be removed later
 #define CONFIG_SYS_FSL_ESDHC_ADDR      CONFIG_SYS_MPC85xx_ESDHC_ADDR
 #endif
 
-#define CONFIG_USB_EHCI  /* USB */
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_HAS_FSL_DR_USB
index 7f5eecaad52f7900ccbce107db6363f278d0038f..3f7c1c9988f01ac0656d72790c4a31514309cedd 100644 (file)
@@ -88,7 +88,6 @@
 
 /* USB */
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
 #define CONFIG_SYS_USB_EHCI_REGS_BASE  0xFC0B0000
 #define CONFIG_SYS_USB_EHCI_CPU_INIT
 #endif
index 1817571efe48e7c4393b1b2f59a9b1160dfffc39..7b162cccefebbf83b18a448768601b5d99a52cd3 100644 (file)
 
 /* I2c */
 #undef CONFIG_SYS_FSL_I2C
-#undef CONFIG_HARD_I2C         /* I2C with hardware support */
 #undef CONFIG_SYS_I2C_SOFT     /* I2C bit-banged */
 /* I2C speed and slave address  */
 #define CONFIG_SYS_I2C_SPEED           80000
index 493e3fa646d1462529e169e7a01fcdeaf8b96b93..fbe033afb13e055dde2f0dba90563fa738c863c0 100644 (file)
 #define CONFIG_HAS_FSL_DR_USB
 #define CONFIG_SYS_SCCR_USBDRCM                3
 
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_USB_PHY_TYPE    "utmi"
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
index 719c27966a3642cc1272612e8ca8e05ea408f63d..6d35d705eccfb18d5b0e89390dba68ba9113f6cf 100644 (file)
 /*
  * Support USB
  */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_FSL
 
 /* Current USB implementation supports the only USB controller,
index 85b7c48fdfae82aac86fc340449efa73db07e0d5..fcced0eb86ca5c32987fc4ebb0af59f7647c0fa4 100644 (file)
@@ -376,7 +376,6 @@ extern int board_pci_host_broken(void);
 #define CONFIG_PQ_MDS_PIB      1 /* PQ MDS Platform IO Board */
 
 #define CONFIG_HAS_FSL_DR_USB  1 /* fixup device tree for the DR USB */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 
index d39dc1b465c0fd075e5a5c4221d2d43b2a83f4d0..607b9266d2f8b523727c54eaf9f005780f9470a8 100644 (file)
 #define CONFIG_ENV_OVERWRITE
 
 #define CONFIG_HAS_FSL_DR_USB
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 
index aeb9f0bbaf0e9238222fde990973781acc7a049c..8375ead394c2402a622ee29a10ad3b52f7f0e03b 100644 (file)
  */
 #define CONFIG_HAS_FSL_MPH_USB
 #ifdef CONFIG_HAS_FSL_MPH_USB
-#define CONFIG_USB_EHCI
-
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_USB_EHCI_FSL
 #endif
index 8f7e056606e94d28b34c282d5975543e8fb94dac..b186e012d3616b565ae9a5459fb5c96fb1b01f70 100644 (file)
@@ -359,9 +359,8 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 /*
  * USB
  */
-#define CONFIG_USB_EHCI
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_EHCI_PCI
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_PCI_EHCI_DEVICE                 0
index e6aca11e5003901a722b076ea0ec8d30565c64e6..2c1be228eeb8ca99b72f2cacfdaf3697b28d72de 100644 (file)
 /*
  * USB
  */
-#define CONFIG_USB_EHCI
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_EHCI_PCI
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_PCI_EHCI_DEVICE                 0
index 95b42208e93f3b11b08591fa2b50c8b23fc08617..867004fb4899853affd3119e7ab6d7df2f0db7ed 100644 (file)
@@ -670,9 +670,7 @@ extern unsigned long get_sdram_size(void);
 #define CONFIG_HAS_FSL_DR_USB
 
 #if defined(CONFIG_HAS_FSL_DR_USB)
-#define CONFIG_USB_EHCI
-
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_USB_EHCI_FSL
 #endif
@@ -733,7 +731,7 @@ extern unsigned long get_sdram_size(void);
 
 #undef CONFIG_WATCHDOG                 /* watchdog disabled */
 
-#if defined(CONFIG_MMC) || defined(CONFIG_USB_EHCI) \
+#if defined(CONFIG_MMC) || defined(CONFIG_USB_EHCI_HCD) \
                 || defined(CONFIG_FSL_SATA)
 #endif
 
index db66c309e7f0494bd11a2c57459590c370623663..0763cf312e040d204b87b1175b99fb5e361d5289 100644 (file)
  */
 #define CONFIG_HAS_FSL_DR_USB
 #ifdef CONFIG_HAS_FSL_DR_USB
-#define CONFIG_USB_EHCI
-
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_USB_EHCI_FSL
 #endif
index 787b8d206efc0cba6e8293b4775544d3c3cdbb22..8821be3410d8445589af2a373b7d5ffd96995e51 100644 (file)
@@ -253,9 +253,7 @@ extern unsigned long get_clock_freq(void);
  */
 #define CONFIG_HAS_FSL_DR_USB
 #ifdef CONFIG_HAS_FSL_DR_USB
-#define CONFIG_USB_EHCI
-
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_USB_EHCI_FSL
 #endif
index c3e3fae44f05cc518f85752db3db71a2d5e6d1f1..7629fe8eb49610bddad585660cfcfde6b4dcca55 100644 (file)
@@ -594,7 +594,6 @@ unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_HAS_FSL_MPH_USB
 
 #if defined(CONFIG_HAS_FSL_DR_USB) || defined(CONFIG_HAS_FSL_MPH_USB)
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #endif
index 4da829d8389e8b4c361207d23a1f5e6e1e981d2d..42e692c4a02104e4a7118c1dabc7fd81eb06c501 100644 (file)
@@ -637,7 +637,6 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_HAS_FSL_DR_USB
 
 #ifdef CONFIG_HAS_FSL_DR_USB
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #endif
index 3b55404cdab08659cf5ae3df80484e63d96f7ac4..c2175bda345a91dc174d6fa4dcbd0afd32104f25 100644 (file)
@@ -641,7 +641,6 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_HAS_FSL_DR_USB
 
 #ifdef CONFIG_HAS_FSL_DR_USB
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #endif
index b2810b65f9b90f9ccecbbfc8954df610a11a84cd..25658871e47025f7f6229a862011658208ad9cb9 100644 (file)
@@ -527,9 +527,7 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_HAS_FSL_DR_USB
 
 #ifdef CONFIG_HAS_FSL_DR_USB
-#define CONFIG_USB_EHCI
-
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #endif
index 55774080152de6514f9aacf9456784fbfd8bcdd9..d2ece40d4ac34ddf9888931df4b003d83394fa3d 100644 (file)
@@ -637,9 +637,7 @@ $(SRCTREE)/board/freescale/t104xrdb/t1042d4_sd_rcw.cfg
 #define CONFIG_HAS_FSL_DR_USB
 
 #ifdef CONFIG_HAS_FSL_DR_USB
-#define CONFIG_USB_EHCI
-
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #endif
index a32ddeed1d269c55c76f456ca84d48eea4c02553..02fd37d5cb32fc6d0ba27ba381c42271c58cbd13 100644 (file)
@@ -12,7 +12,6 @@
 #define __T208xQDS_H
 
 #define CONFIG_ICS307_REFCLK_HZ 25000000  /* ICS307 ref clk freq */
-#define CONFIG_USB_EHCI
 #if defined(CONFIG_ARCH_T2080)
 #define CONFIG_FSL_SATA_V2
 #define CONFIG_SYS_SRIO                /* Enable Serial RapidIO Support */
@@ -702,7 +701,7 @@ unsigned long get_board_ddr_clk(void);
 /*
  * USB
  */
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_HAS_FSL_DR_USB
index 90ce554035d0ed5fde83c85e21408bbda7557e7d..faa1111e9f1185e2a3e3dd28b0ac9dca453f2752 100644 (file)
@@ -12,7 +12,6 @@
 #define __T2080RDB_H
 
 #define CONFIG_ICS307_REFCLK_HZ 25000000  /* ICS307 ref clk freq */
-#define CONFIG_USB_EHCI
 #define CONFIG_FSL_SATA_V2
 
 /* High Level Configuration Options */
@@ -652,7 +651,7 @@ unsigned long get_board_ddr_clk(void);
 /*
  * USB
  */
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_HAS_FSL_DR_USB
index 9d4baaa79fc1a0990a82db4ab0af76e59b92d475..5d030d1179652355e963d7097176cab42de19e77 100644 (file)
@@ -507,7 +507,6 @@ unsigned long get_board_ddr_clk(void);
 /*
 * USB
 */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_HAS_FSL_DR_USB
index cc1f79940cf36568f151da05f94e9ac1ec00aa4b..8ebfde19f936684e0d0b3afb2458badd18a84bff 100644 (file)
@@ -685,7 +685,6 @@ unsigned long get_board_ddr_clk(void);
 /*
 * USB
 */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_HAS_FSL_DR_USB
index 13f4ef67e19235a77d3775b7908e701c4083a286..19e0b1be1bdbb36badc288c1e61870f2bf811e48 100644 (file)
 #ifndef CONFIG_CAM5200
 /* POST support */
 #define CONFIG_POST            (CONFIG_SYS_POST_MEMORY   | \
-                                CONFIG_SYS_POST_CPU       | \
-                                CONFIG_SYS_POST_I2C)
+                                CONFIG_SYS_POST_CPU)
 #endif
 
 #ifdef CONFIG_POST
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_JFFS2
 #define CONFIG_CMD_REGINFO
 
 #define CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2   /* define for 66MHz speed */
 #endif
 
-/*
- * I2C configuration
- */
-#define CONFIG_HARD_I2C                1       /* I2C with hardware support */
-#ifdef CONFIG_TQM5200_REV100
-#define CONFIG_SYS_I2C_MODULE          1       /* Select I2C module #1 for rev. 100 board */
-#else
-#define CONFIG_SYS_I2C_MODULE          2       /* Select I2C module #2 for all other revs */
-#endif
-
-/*
- * I2C clock frequency
- *
- * Please notice, that the resulting clock frequency could differ from the
- * configured value. This is because the I2C clock is derived from system
- * clock over a frequency divider with only a few divider values. U-Boot
- * calculates the best approximation for CONFIG_SYS_I2C_SPEED. However the calculated
- * approximation allways lies below the configured value, never above.
- */
-#define CONFIG_SYS_I2C_SPEED           100000 /* 100 kHz */
-#define CONFIG_SYS_I2C_SLAVE           0x7F
-
-/*
- * EEPROM configuration for onboard EEPROM M24C32 (M24C64 should work
- * also). For other EEPROMs configuration should be verified. On Mini-FAP the
- * EEPROM (24C64) is on the same I2C address (but on other I2C bus), so the
- * same configuration could be used.
- */
-#define CONFIG_SYS_I2C_EEPROM_ADDR             0x50    /* 1010000x */
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         2
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      5       /* =32 Bytes per write */
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  20
-
-/*
- * HW-Monitor configuration on Mini-FAP
- */
-#if defined (CONFIG_MINIFAP)
-#define CONFIG_SYS_I2C_HWMON_ADDR              0x2C
-#endif
-
-/* List of I2C addresses to be verified by POST */
-#if defined (CONFIG_MINIFAP)
-#undef CONFIG_SYS_POST_I2C_ADDRS
-#define CONFIG_SYS_POST_I2C_ADDRS      {CONFIG_SYS_I2C_EEPROM_ADDR,    \
-                                        CONFIG_SYS_I2C_HWMON_ADDR,     \
-                                        CONFIG_SYS_I2C_SLAVE}
-#endif
-
 /*
  * Flash configuration
  */
 #endif
 #endif
 
-/*
- * RTC configuration
- */
-#if defined (CONFIG_STK52XX) && !defined (CONFIG_STK52XX_REV100)
-# define CONFIG_RTC_M41T11 1
-# define CONFIG_SYS_I2C_RTC_ADDR 0x68
-# define CONFIG_SYS_M41T11_BASE_YEAR   1900    /* because Linux uses the same base
-                                          year */
-#else
-# define CONFIG_RTC_MPC5200    1       /* use internal MPC5200 RTC */
-#endif
-
 /*
  * Miscellaneous configurable options
  */
index c60743acd08ae49fed6f119fc056595817544de8..cd46db4f6f319c48f40235c9a6fa2e5b08246a6c 100644 (file)
 #define CONFIG_HAS_FSL_DR_USB
 
 #if defined(CONFIG_HAS_FSL_DR_USB)
-#define CONFIG_USB_EHCI
-
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_USB_EHCI_FSL
 #endif
index 79099518e7bba25a2bb53ef81090c2a5ad306c13..2ea43ffce1f9979e50e7debbd042740284bd1421 100644 (file)
@@ -81,7 +81,6 @@
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_IDE
 
 #if defined(CONFIG_PCI)
  */
 #undef CONFIG_SYS_IPBCLK_EQUALS_XLBCLK         /* define for 133MHz speed */
 
-/*
- * I2C configuration
- */
-#define CONFIG_HARD_I2C                        1       /* I2C with hardware support */
-#define CONFIG_SYS_I2C_MODULE          2       /* Select I2C module #1 or #2 */
-
-#define CONFIG_SYS_I2C_SPEED           100000 /* 100 kHz */
-#define CONFIG_SYS_I2C_SLAVE           0x7F
-
-/*
- * EEPROM configuration
- */
-#define CONFIG_SYS_I2C_EEPROM_ADDR             0x52    /* 1010010x */
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         2
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      6
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  10
-#define CONFIG_SYS_EEPROM_WREN                 1
-#define CONFIG_SYS_EEPROM_WP                   GPIO_PSC2_4
-
 /*
  * Flash configuration
  */
index ee015bb83d45e2f40e55eb0ac1b9a50715f84450..2a46e9b86471c157bd35274d7f2c36d2b6366c2b 100644 (file)
 
 #define CONFIG_CMDLINE_EDITING         1       /* command line history */
 
-/* I2C */
-#define CONFIG_HARD_I2C                        /* I2C with hardware support */
-#define CONFIG_I2C_MULTI_BUS
-
-/* I2C speed and slave address */
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           0x7F
-
 /*
  * IIM - IC Identification Module
  */
 #undef CONFIG_FSL_IIM
 
-/*
- * EEPROM configuration for Atmel AT24C01:
- * 8-bit addresses, 30ms write delay, 32-Byte Page Write Mode
- */
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         1
-#define CONFIG_SYS_I2C_EEPROM_ADDR             0x52
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  30
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      5
-
 /*
  * Ethernet configuration
  */
 #define CONFIG_LOADS_ECHO              1
 #define CONFIG_SYS_LOADS_BAUD_CHANGE   1
 
-#define CONFIG_CMD_EEPROM
 #undef CONFIG_CMD_FUSE
 #undef CONFIG_CMD_IDE
 #define CONFIG_CMD_JFFS2
index 52f847566972f332cbae5404fd69c823e4e5b695..b76f376a042f55a4beefc41852c67f22c5a231f4 100644 (file)
@@ -55,8 +55,6 @@
 #define CONFIG_BOUNCE_BUFFER
 
 /* USB Configs */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_USB_STORAGE
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
index d8a66f2d7d3d135bbfe1707d20ebc92f42ba7bb8..16525087f1886996be53eb949d10dd488ae35ba7 100644 (file)
@@ -81,7 +81,6 @@
 #define CONFIG_SYS_I2C_POWERIC_ADDR 0x58 /* da9063 */
 
 /* USB */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_RMOBILE
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        2
 
index fc8a08f5b79971faa04649d55607f59020cc44aa..b6b14d38bdde0fca6f3c3f89ae855f1278447241 100644 (file)
 
 /* USB gadget RNDIS */
 
-#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/u-boot-spl.lds"
 #endif
 
 #ifdef CONFIG_NAND
  */
 #ifdef CONFIG_SPL_BUILD
 #undef CONFIG_DM_MMC
+#undef CONFIG_DM_MMC_OPS
 #undef CONFIG_TIMER
 #undef CONFIG_DM_USB
 #endif
index 55b511c408edc1895aebecb637a626c19edd8d29..b1ffcc8872e4e1bea479b58e44b91f769e90cae1 100644 (file)
 #define MTDPARTS_DEFAULT               "mtdparts=omap2-nand.0:512k(SPL),-(UBI)"
 
 /* SPL */
-#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/u-boot-spl.lds"
 
 /* UBI configuration */
 #define CONFIG_SPL_UBI                 1
index c100fbc533ed37ca42c1bccfdd3fbd41c7dc145b..247679eee37babc2e9902a98fd39fa7acc159a24 100644 (file)
 
 /* SPL */
 
-#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/u-boot-spl.lds"
 
 #ifndef CONFIG_SPL_USBETH_SUPPORT
 #define CONFIG_FASTBOOT_FLASH_MMC_DEV   1
  */
 #ifdef CONFIG_SPL_BUILD
 #undef CONFIG_DM_MMC
+#undef CONFIG_DM_MMC_OPS
 #undef CONFIG_TIMER
 #endif
 
index 710dac269c08dca7a6c993ccadea909c7cc80870..6855f628657f9b853c4aa4b6bfaadd31913771d0 100644 (file)
@@ -80,7 +80,7 @@
 #define CONFIG_BOOTCOUNT_AM33XX
 #define CONFIG_SYS_BOOTCOUNT_BE
 
-#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/u-boot-spl.lds"
 
 #ifndef CONFIG_SPL_USBETH_SUPPORT
 #define CONFIG_FASTBOOT_FLASH_MMC_DEV   1
index 8be49af9f11fde4c99c2f1b191c799c9429dd306..5de39cf740f0ced7fed929ccdd89b01e087fd3af 100644 (file)
@@ -16,9 +16,6 @@
 /*
  * High Level Configuration Options
  */
-#define CONFIG_OMAP            1       /* in a TI OMAP core */
-#define CONFIG_OMAP3_AM3517CRANE       1       /* working with CRANEBOARD */
-
 #define CONFIG_EMIF4   /* The chip has EMIF4 controller */
 
 #include <asm/arch/cpu.h>              /* get chip and board defs */
index 7490f2b5eaf8af30f762eff5560273687bdf4c7b..feb7b6eb97452ebbf1958070fd55d83bb7897a33 100644 (file)
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-/* High Level Configuration Options */
-
-#define CONFIG_OMAP
-
 #define CONFIG_NR_DRAM_BANKS   2       /* CS1 may or may not be populated */
 
 #define CONFIG_EMIF4   /* The chip has EMIF4 controller */
@@ -49,9 +45,6 @@
 
 /* Hardware drivers */
 
-/* OMAP GPIO configuration */
-#define CONFIG_OMAP_GPIO
-
 /* NS16550 Configuration */
 #define V_NS16550_CLK                  48000000        /* 48MHz (APLL96/2) */
 #define CONFIG_SYS_NS16550_SERIAL
index 5f5882dc8e7f20383066c9db7939d1ea6744f826..d3d72b634d622dff541b1f5654f9015c0f1e6dcb 100644 (file)
 #define CONFIG_BITBANGMII
 #define CONFIG_BITBANGMII_MULTI
 
-/* I2C */
-#define CONFIG_SH_SH7734_I2C   1
-#define CONFIG_HARD_I2C                        1
-#define CONFIG_I2C_MULTI_BUS   1
-#define CONFIG_SYS_MAX_I2C_BUS 2
-#define CONFIG_SYS_I2C_MODULE  0
-#define CONFIG_SYS_I2C_SPEED   400000 /* 400 kHz */
-#define CONFIG_SYS_I2C_SLAVE   0x50
-#define CONFIG_SH_I2C_DATA_HIGH        4
-#define CONFIG_SH_I2C_DATA_LOW 5
-#define CONFIG_SH_I2C_CLOCK            500000000
-#define CONFIG_SH_I2C_BASE0            0xFFC70000
-#define CONFIG_SH_I2C_BASE1            0xFFC71000
-
 /* undef to save memory        */
 #define CONFIG_SYS_LONGHELP
 /* Monitor Command Prompt */
index c6c956e1ee1a50d0495ea41f61079953b0dd9564..2c49729caab5fffd6a7c9c21e0ad923cb7256e22 100644 (file)
@@ -36,7 +36,6 @@
 #define CONFIG_SYS_MMC_ENV_PART                1
 
 /* USB host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* PCI host support */
index e2acc6e8c9c5dc1eecd3b62ab36827bd88a43258..cdb50cc28b8e94fccdcc9658228bc7d4cacc7558 100644 (file)
@@ -33,7 +33,6 @@
 #define CONFIG_SYS_MMC_ENV_PART                1
 
 /* USB host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* PCI host support */
index a4c7847dab21337ce62012f64c050b12760ab413..cce39f27c7dbfa81107ecab632a1f84a8d3bf1b9 100644 (file)
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        1
 #endif
 
-/* RTC */
-#ifdef CONFIG_CMD_DATE
-#define CONFIG_RTC_PCF8563
-#define CONFIG_SYS_I2C_RTC_ADDR                0x51
-#endif
-
 /* Boot Linux */
 #define CONFIG_BOOTFILE                        "uImage"
 #define CONFIG_BOOTCOMMAND             "run bootcmd_nand"
index 94f6605d468e030fb55e5eacaa4fec0bc0306fc2..4d946fc44a9cfe0e88666e6147735467c036ad38 100644 (file)
 
 #endif
 
-/* I2C */
-#define CONFIG_HARD_I2C                        /* I2C with hardware support */
-#define CONFIG_I2C_MULTI_BUS
-
-/* I2C speed and slave address */
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           0x7F
-#if 0
-#define CONFIG_SYS_I2C_NOPROBES        {{0,0x69}}      /* Don't probe these addrs */
-#endif
-
 /*
  * IIM - IC Identification Module
  */
 #undef CONFIG_FSL_IIM
 
-/*
- * EEPROM configuration for Atmel AT24C32A-10TQ-2.7:
- * 16-bit addresses, 10ms write delay, 32-Byte Page Write Mode
- */
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         2
-#define CONFIG_SYS_I2C_EEPROM_ADDR             0x50
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  10
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      5
-
 /*
  * Ethernet configuration
  */
 #define CONFIG_LOADS_ECHO              1
 #define CONFIG_SYS_LOADS_BAUD_CHANGE   1
 
-#define CONFIG_CMD_EEPROM
 #undef CONFIG_CMD_FUSE
 #undef CONFIG_CMD_IDE
 #define CONFIG_CMD_JFFS2
index 4d16d3358547678f8f401638de4ae38c4f1b1556..7360e11ff14dae8ec682ce6f7baceb3be4474ece 100644 (file)
 #define CONFIG_RTC_M41T11
 
 /* USB Configs */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET       /* For OTG port */
 #define CONFIG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
index 379f234463432502ced7037be8b96c8237c24879..48d7f6a5e639c3ba83b9d92d94d18f1f22ce2e59 100644 (file)
 
 /* general purpose I/O */
 #define CONFIG_ATMEL_LEGACY            /* required until (g)pio is fixed */
-#define CONFIG_AT91_GPIO
-#define CONFIG_AT91_GPIO_PULLUP        1       /* keep pullups on peripheral pins */
-
-/* serial console */
-#define CONFIG_ATMEL_USART
-#define CONFIG_USART_BASE              ATMEL_BASE_DBGU
-#define        CONFIG_USART_ID                 ATMEL_ID_SYS
-
-/* LED */
-#define CONFIG_AT91_LED
-#define        CONFIG_RED_LED          AT91_PIN_PA9    /* this is the power led */
-#define        CONFIG_GREEN_LED        AT91_PIN_PA6    /* this is the user led */
-
 
 /*
  * BOOTP options
  */
 #ifdef CONFIG_AT91SAM9XE
 # define CONFIG_SYS_INIT_SP_ADDR \
-       (ATMEL_BASE_SRAM + 0x1000 - GENERATED_GBL_DATA_SIZE)
+       (ATMEL_BASE_SRAM + 16 * 1024 - GENERATED_GBL_DATA_SIZE)
 #else
 # define CONFIG_SYS_INIT_SP_ADDR \
-       (ATMEL_BASE_SRAM1 + 0x1000 - GENERATED_GBL_DATA_SIZE)
+       (ATMEL_BASE_SRAM1 + 16 * 1024 - GENERATED_GBL_DATA_SIZE)
 #endif
 
 /*
 #define CONFIG_SYS_NAND_READY_PIN      AT91_PIN_PC13
 #endif
 
-/* MMC */
-#ifdef CONFIG_CMD_MMC
-#define CONFIG_GENERIC_ATMEL_MCI
-#endif
-
-/* Ethernet */
-#define CONFIG_MACB                    1
-#define CONFIG_RMII                    1
-#define CONFIG_NET_RETRY_COUNT         20
-#define CONFIG_RESET_PHY_R             1
-#define CONFIG_AT91_WANTS_COMMON_PHY
-
 /* USB */
 #define CONFIG_USB_ATMEL
 #define CONFIG_USB_ATMEL_CLK_SEL_PLLB
 
 /* bootstrap + u-boot + env + linux in nandflash */
 #define CONFIG_ENV_IS_IN_NAND  1
-#define CONFIG_ENV_OFFSET              0xc0000
+#define CONFIG_ENV_OFFSET              0x120000
 #define CONFIG_ENV_OFFSET_REDUND       0x100000
 #define CONFIG_ENV_SIZE                0x20000         /* 1 sector = 128 kB */
 #define CONFIG_BOOTCOMMAND     "nand read 0x22000000 0x200000 0x300000; bootm"
index 663c193a5b0514513d96842d7dc2b0705eb5adc9..e45e4dbddc7d8c6fbec8928b92e6ee72681658a7 100644 (file)
  * Hardware drivers
  */
 #define CONFIG_ATMEL_LEGACY
-#define CONFIG_AT91_GPIO               1
-#define CONFIG_AT91_GPIO_PULLUP                1
-
-/* serial console */
-#define CONFIG_ATMEL_USART
-#define CONFIG_USART_BASE              ATMEL_BASE_DBGU
-#define CONFIG_USART_ID                        ATMEL_ID_SYS
 
 /* LCD */
 #define LCD_BPP                                LCD_COLOR8
 #define CONFIG_ATMEL_LCD               1
 #define CONFIG_ATMEL_LCD_BGR555                1
 
-/* LED */
-#define CONFIG_AT91_LED
-#define        CONFIG_RED_LED          AT91_PIN_PB7    /* the power led */
-#define        CONFIG_GREEN_LED        AT91_PIN_PB8    /* the user1 led */
-#define        CONFIG_YELLOW_LED       AT91_PIN_PC29   /* the user2 led */
-
-
 /*
  * BOOTP options
  */
@@ -88,7 +74,7 @@
 #define CONFIG_SYS_SDRAM_SIZE          0x04000000
 
 #define CONFIG_SYS_INIT_SP_ADDR \
-       (ATMEL_BASE_SRAM1 + 0x1000 - GENERATED_GBL_DATA_SIZE)
+       (ATMEL_BASE_SRAM1 + 16 * 1024 - GENERATED_GBL_DATA_SIZE)
 
 /* DataFlash */
 #define CONFIG_ATMEL_DATAFLASH_SPI
 #define DATAFLASH_TCSS                 (0x1a << 16)
 #define DATAFLASH_TCHS                 (0x1 << 24)
 
-/* MMC */
-#ifdef CONFIG_CMD_MMC
-#define CONFIG_GENERIC_ATMEL_MCI
-#endif
-
 /* NOR flash, if populated */
 #ifdef CONFIG_SYS_USE_NORFLASH
 #define CONFIG_SYS_FLASH_CFI                   1
 #endif
 
 /* Ethernet */
-#define CONFIG_MACB                    1
-#define CONFIG_RMII                    1
-#define CONFIG_NET_RETRY_COUNT         20
 #define CONFIG_RESET_PHY_R             1
 #define CONFIG_AT91_WANTS_COMMON_PHY
 
 
 /* bootstrap + u-boot + env + linux in nandflash */
 #define CONFIG_ENV_IS_IN_NAND          1
-#define CONFIG_ENV_OFFSET              0xc0000
+#define CONFIG_ENV_OFFSET              0x120000
 #define CONFIG_ENV_OFFSET_REDUND       0x100000
 #define CONFIG_ENV_SIZE                0x20000         /* 1 sector = 128 kB */
 #define CONFIG_BOOTCOMMAND     "nand read 0x22000000 0x200000 0x300000; bootm"
index a62b70b4596259d00deda3e284f279ea1b14c92e..010ebdbd40f01c03c5455d6fb27d26b3cd684b06 100644 (file)
 
 /* general purpose I/O */
 #define CONFIG_ATMEL_LEGACY            /* required until (g)pio is fixed */
-#define CONFIG_AT91_GPIO
-#define CONFIG_AT91_GPIO_PULLUP        1       /* keep pullups on peripheral pins */
-
-/* serial console */
-#define CONFIG_ATMEL_USART
-#define CONFIG_USART_BASE              ATMEL_BASE_DBGU
-#define        CONFIG_USART_ID                 ATMEL_ID_SYS
 
 /* LCD */
 #define LCD_BPP                                LCD_COLOR8
 /* board specific(not enough SRAM) */
 #define CONFIG_AT91SAM9G45_LCD_BASE            0x73E00000
 
-/* LED */
-#define CONFIG_AT91_LED
-#define        CONFIG_RED_LED          AT91_PIN_PD31   /* this is the user1 led */
-#define        CONFIG_GREEN_LED        AT91_PIN_PD0    /* this is the user2 led */
-
-
 /*
  * BOOTP options
  */
@@ -75,7 +62,7 @@
 #define CONFIG_SYS_SDRAM_SIZE          0x08000000
 
 #define CONFIG_SYS_INIT_SP_ADDR \
-       (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE)
+       (CONFIG_SYS_SDRAM_BASE + 16 * 1024 - GENERATED_GBL_DATA_SIZE)
 
 /* NAND flash */
 #ifdef CONFIG_CMD_NAND
 
 #endif
 
-/* MMC */
-
-#ifdef CONFIG_CMD_MMC
-#define CONFIG_GENERIC_ATMEL_MCI
-#endif
-
 /* Ethernet */
-#define CONFIG_MACB
-#define CONFIG_RMII
-#define CONFIG_NET_RETRY_COUNT         20
 #define CONFIG_RESET_PHY_R
 #define CONFIG_AT91_WANTS_COMMON_PHY
 
-/* USB */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_ATMEL
-#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS     2
-
 #define CONFIG_SYS_LOAD_ADDR           0x22000000      /* load address */
 
 #define CONFIG_SYS_MEMTEST_START       CONFIG_SYS_SDRAM_BASE
 #ifdef CONFIG_SYS_USE_NANDFLASH
 /* bootstrap + u-boot + env in nandflash */
 #define CONFIG_ENV_IS_IN_NAND
-#define CONFIG_ENV_OFFSET              0xc0000
+#define CONFIG_ENV_OFFSET              0x120000
 #define CONFIG_ENV_OFFSET_REDUND       0x100000
 #define CONFIG_ENV_SIZE                        0x20000
 
index dd49f4ebd3a9fa20c3de7a1dcfc9596efdef8d09..e7b9ad245ca4f9251c6debd655825f79d32b6b9a 100644 (file)
 #define CONFIG_INITRD_TAG
 #define CONFIG_SKIP_LOWLEVEL_INIT
 
-/* general purpose I/O */
-#define CONFIG_AT91_GPIO
-
-/* serial console */
-#define CONFIG_ATMEL_USART
-#define CONFIG_USART_BASE              ATMEL_BASE_DBGU
-#define CONFIG_USART_ID                        ATMEL_ID_SYS
-
 /* LCD */
 #define LCD_BPP                                LCD_COLOR16
 #define LCD_OUTPUT_BPP                 24
@@ -45,7 +37,6 @@
 #define CONFIG_ATMEL_HLCD
 #define CONFIG_ATMEL_LCD_RGB565
 
-
 /*
  * BOOTP options
  */
  * that address while providing maximum stack area below.
  */
 # define CONFIG_SYS_INIT_SP_ADDR \
-       (ATMEL_BASE_SRAM + 0x1000 - GENERATED_GBL_DATA_SIZE)
+       (ATMEL_BASE_SRAM + 16 * 1024 - GENERATED_GBL_DATA_SIZE)
 
 /* DataFlash */
 #ifdef CONFIG_CMD_SF
-#define CONFIG_ATMEL_SPI
 #define CONFIG_SF_DEFAULT_SPEED                30000000
-#define CONFIG_ENV_SPI_MODE            SPI_MODE_3
-#define CONFIG_SF_DEFAULT_MODE         SPI_MODE_3
 #endif
 
 /* NAND flash */
        "bootargs_nand=rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs rw\0"\
        "bootargs_mmc=root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait\0"
 
-/* MMC */
-#ifdef CONFIG_CMD_MMC
-#define CONFIG_GENERIC_ATMEL_MCI
-#endif
-
 /* Ethernet */
 #define CONFIG_KS8851_MLL
 #define CONFIG_KS8851_MLL_BASEADDR     0x30000000 /* use NCS2 */
 
 /* bootstrap + u-boot + env + linux in nandflash */
 #define CONFIG_ENV_IS_IN_NAND
-#define CONFIG_ENV_OFFSET              0xc0000
+#define CONFIG_ENV_OFFSET              0x120000
 #define CONFIG_ENV_OFFSET_REDUND       0x100000
 #define CONFIG_ENV_SIZE                        0x20000         /* 1 sector = 128 kB */
 #define CONFIG_BOOTCOMMAND                                             \
index 31a7cb18d86df613e95423466add05cc2b5ee2e0..7dcf7913de19321f697445fc5ec55f8a0d7f68c9 100644 (file)
 #define CONFIG_INITRD_TAG              1
 
 #define CONFIG_ATMEL_LEGACY
-#define CONFIG_AT91_GPIO               1
-#define CONFIG_AT91_GPIO_PULLUP                1
 
 /*
  * Hardware drivers
  */
 
-/* serial console */
-#define CONFIG_ATMEL_USART
-#define CONFIG_USART_BASE              ATMEL_BASE_DBGU
-#define CONFIG_USART_ID                        ATMEL_ID_SYS
-
 /* LCD */
 #define LCD_BPP                                LCD_COLOR8
 #define CONFIG_LCD_LOGO                        1
 /* Let board_init_f handle the framebuffer allocation */
 #undef CONFIG_FB_ADDR
 
-/* LED */
-#define CONFIG_AT91_LED
-#define        CONFIG_RED_LED          AT91_PIN_PD14   /* this is the power led */
-#define        CONFIG_GREEN_LED        AT91_PIN_PD15   /* this is the user1 led */
-#define        CONFIG_YELLOW_LED       AT91_PIN_PD16   /* this is the user2 led */
-
-
 /*
  * Command line configuration.
  */
@@ -71,7 +57,7 @@
 #define CONFIG_SYS_SDRAM_SIZE          0x04000000
 
 #define CONFIG_SYS_INIT_SP_ADDR \
-       (ATMEL_BASE_SRAM + 0x1000 - GENERATED_GBL_DATA_SIZE)
+       (ATMEL_BASE_SRAM + 16 * 1024 - GENERATED_GBL_DATA_SIZE)
 
 /* DataFlash */
 #define CONFIG_ATMEL_DATAFLASH_SPI
 
 #endif
 
-/* MMC */
-
-#ifdef CONFIG_CMD_MMC
-#define CONFIG_GENERIC_ATMEL_MCI
-#endif
-
 /* Ethernet - not present */
 
 /* USB - not supported */
 
 /* bootstrap + u-boot + env + linux in nandflash */
 #define CONFIG_ENV_IS_IN_NAND          1
-#define CONFIG_ENV_OFFSET              0xc0000
+#define CONFIG_ENV_OFFSET              0x120000
 #define CONFIG_ENV_OFFSET_REDUND       0x100000
 #define CONFIG_ENV_SIZE                0x20000         /* 1 sector = 128 kB */
 #define CONFIG_BOOTCOMMAND     "nand read 0x22000000 0x200000 0x600000; "      \
index ff0a78ba4373ec85939058fbd3ef95769b883654..a5489cd28c931ea1ee27d96369d54428daa59083 100644 (file)
 
 /* general purpose I/O */
 #define CONFIG_ATMEL_LEGACY            /* required until (g)pio is fixed */
-#define CONFIG_AT91_GPIO
-
-/* serial console */
-#define CONFIG_ATMEL_USART
-#define CONFIG_USART_BASE      ATMEL_BASE_DBGU
-#define CONFIG_USART_ID                ATMEL_ID_SYS
 
 /* LCD */
 #define LCD_BPP                        LCD_COLOR16
@@ -57,7 +51,7 @@
 #define CONFIG_CMD_NAND
 
 /*
- * define CONFIG_USB_EHCI to enable USB Hi-Speed (aka 2.0)
+ * define CONFIG_USB_EHCI_HCD to enable USB Hi-Speed (aka 2.0)
  * NB: in this case, USB 1.1 devices won't be recognized.
  */
 
 #define CONFIG_SYS_SDRAM_SIZE          0x08000000      /* 128 megs */
 
 #define CONFIG_SYS_INIT_SP_ADDR \
-       (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE)
+       (CONFIG_SYS_SDRAM_BASE + 16 * 1024 - GENERATED_GBL_DATA_SIZE)
 
 /* DataFlash */
 #ifdef CONFIG_CMD_SF
-#define CONFIG_ATMEL_SPI
 #define CONFIG_SF_DEFAULT_SPEED                30000000
 #endif
 
 #define CONFIG_CMD_UBIFS
 #endif
 
-/* MMC */
-#ifdef CONFIG_CMD_MMC
-#define CONFIG_GENERIC_ATMEL_MCI
-#endif
-
-/* Ethernet */
-#define CONFIG_MACB
-#define CONFIG_RMII
-#define CONFIG_NET_RETRY_COUNT         20
-#define CONFIG_MACB_SEARCH_PHY
-
 /* USB */
 #ifdef CONFIG_CMD_USB
-#ifdef CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_ATMEL
-#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS     2
-#else
+#ifndef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_ATMEL
 #define CONFIG_USB_ATMEL_CLK_SEL_UPLL
 #define CONFIG_USB_OHCI_NEW
 #ifdef CONFIG_SYS_USE_NANDFLASH
 /* bootstrap + u-boot + env + linux in nandflash */
 #define CONFIG_ENV_IS_IN_NAND
-#define CONFIG_ENV_OFFSET              0xc0000
+#define CONFIG_ENV_OFFSET              0x120000
 #define CONFIG_ENV_OFFSET_REDUND       0x100000
 #define CONFIG_ENV_SIZE                0x20000         /* 1 sector = 128 kB */
 #define CONFIG_BOOTCOMMAND     "nand read " \
index 768e8fbfa4230854284c599a6f5c346edc2ea01b..66e8cd5e9a4b2b424c50359a5d2293259a446265 100644 (file)
 /*
  * Environment settings
  */
-#define CONFIG_ENV_IS_IN_EEPROM
+#define CONFIG_ENV_IS_NOWHERE
 #define CONFIG_ENV_SIZE                        SZ_512
 #define CONFIG_ENV_OFFSET              0
 
index 37c71bb43341b09f581c2b0913070a756a635a97..c65eeedb531d8840eda596f22f249cf035ab16a7 100644 (file)
 /* General network SPL, both CPSW and USB gadget RNDIS */
 #define CONFIG_SPL_NET_VCI_STRING      "AM335x U-Boot SPL"*/
 
-#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/u-boot-spl.lds"
 
 #ifdef CONFIG_NAND
 #define CONFIG_NAND_OMAP_GPMC
index d5347e626f5eaa3baefd15ab2e80d78306c96a4a..924a351c38b645cbf20ae645f9bd2316f6875563 100644 (file)
@@ -348,7 +348,7 @@ DEFAULT_LINUX_BOOT_ENV \
 
 /* USB gadget RNDIS */
 
-#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/u-boot-spl.lds"
 #endif
 
 #ifdef CONFIG_NAND
index cc328611695dcf9c90dff221421d3db4181abb8d..f3d7a2fad2f11c1006a855d7c305bd7468a638fb 100644 (file)
@@ -39,7 +39,6 @@
 #define CONFIG_SPI_FLASH_SIZE          (4 << 20)
 
 /* USB Host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
diff --git a/include/configs/bmips_bcm63268.h b/include/configs/bmips_bcm63268.h
new file mode 100644 (file)
index 0000000..ac0a670
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __CONFIG_BMIPS_BCM63268_H
+#define __CONFIG_BMIPS_BCM63268_H
+
+/* CPU */
+#define CONFIG_SYS_MIPS_TIMER_FREQ     200000000
+
+/* RAM */
+#define CONFIG_NR_DRAM_BANKS           1
+#define CONFIG_SYS_SDRAM_BASE          0x80000000
+
+/* U-Boot */
+#define CONFIG_SYS_LOAD_ADDR           CONFIG_SYS_SDRAM_BASE + 0x100000
+
+#if defined(CONFIG_BMIPS_BOOT_RAM)
+#define CONFIG_SKIP_LOWLEVEL_INIT
+#define CONFIG_SYS_INIT_SP_OFFSET      0x2000
+#endif
+
+#endif /* __CONFIG_BMIPS_BCM63268_H */
diff --git a/include/configs/bmips_bcm6328.h b/include/configs/bmips_bcm6328.h
new file mode 100644 (file)
index 0000000..41c7838
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __CONFIG_BMIPS_BCM6328_H
+#define __CONFIG_BMIPS_BCM6328_H
+
+/* CPU */
+#define CONFIG_SYS_MIPS_TIMER_FREQ     160000000
+
+/* RAM */
+#define CONFIG_NR_DRAM_BANKS           1
+#define CONFIG_SYS_SDRAM_BASE          0x80000000
+
+/* U-Boot */
+#define CONFIG_SYS_LOAD_ADDR           CONFIG_SYS_SDRAM_BASE + 0x100000
+
+#if defined(CONFIG_BMIPS_BOOT_RAM)
+#define CONFIG_SKIP_LOWLEVEL_INIT
+#define CONFIG_SYS_INIT_SP_OFFSET      0x2000
+#endif
+
+#endif /* __CONFIG_BMIPS_BCM6328_H */
diff --git a/include/configs/bmips_bcm6358.h b/include/configs/bmips_bcm6358.h
new file mode 100644 (file)
index 0000000..5d018a3
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __CONFIG_BMIPS_BCM6358_H
+#define __CONFIG_BMIPS_BCM6358_H
+
+/* CPU */
+#define CONFIG_SYS_MIPS_TIMER_FREQ     150000000
+
+/* RAM */
+#define CONFIG_NR_DRAM_BANKS           1
+#define CONFIG_SYS_SDRAM_BASE          0x80000000
+
+/* U-Boot */
+#define CONFIG_SYS_LOAD_ADDR           CONFIG_SYS_SDRAM_BASE + 0x100000
+
+#if defined(CONFIG_BMIPS_BOOT_RAM)
+#define CONFIG_SKIP_LOWLEVEL_INIT
+#define CONFIG_SYS_INIT_SP_OFFSET      0x2000
+#endif
+
+#define CONFIG_SYS_FLASH_BASE                  0xbe000000
+#define CONFIG_SYS_FLASH_EMPTY_INFO
+#define CONFIG_SYS_FLASH_PROTECTION
+#define CONFIG_SYS_MAX_FLASH_BANKS_DETECT      1
+
+#endif /* __CONFIG_BMIPS_BCM6358_H */
diff --git a/include/configs/bmips_common.h b/include/configs/bmips_common.h
new file mode 100644 (file)
index 0000000..d2b05d4
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __CONFIG_BMIPS_COMMON_H
+#define __CONFIG_BMIPS_COMMON_H
+
+/* RAM */
+#define CONFIG_SYS_MEMTEST_START       0xa0000000
+#define CONFIG_SYS_MEMTEST_END         0xa2000000
+
+/* Memory usage */
+#define CONFIG_SYS_MAXARGS             24
+#define CONFIG_SYS_MALLOC_LEN          (1024 * 1024)
+#define CONFIG_SYS_BOOTPARAMS_LEN      (128 * 1024)
+#define CONFIG_SYS_CBSIZE              512
+
+/* U-Boot */
+#define CONFIG_SYS_MONITOR_BASE                CONFIG_SYS_TEXT_BASE
+
+#endif /* __CONFIG_BMIPS_COMMON_H */
index 1915ad52494216c38e8203b229d7d453731efe7d..50aaa7be8c9f3f33b47eb174aa188ea7d0e43575 100644 (file)
@@ -7,6 +7,11 @@
 #ifndef __CONFIGS_BOSTON_H__
 #define __CONFIGS_BOSTON_H__
 
+/*
+ * General board configuration
+ */
+#define CONFIG_SYS_BOOTM_LEN           (64 * 1024 * 1024)
+
 /*
  * CPU
  */
index 0c1a54d7ba2e6ba4ab0ca33076df2ac42f68e3aa..521d097f8a9643bcbcfe7f673500117992c0ba56 100644 (file)
@@ -20,9 +20,6 @@
 #define CONFIG_LCD_DT_SIMPLEFB
 #define LCD_BPP                                LCD_COLOR32
 
-#define CONFIG_HW_WATCHDOG
-#define CONFIG_OMAP_WATCHDOG
-
 /* Bootcount using the RTC block */
 #define CONFIG_SYS_BOOTCOUNT_ADDR      0x44E3E000
 #define CONFIG_BOOTCOUNT_LIMIT
index 49f223a32aaac10775b993037f32d6980afa4ec2..99846890e0f7ed438c3998df5512ebe6bcf24fe7 100644 (file)
@@ -21,7 +21,7 @@
 
 #define CONFIG_VIDEO_BMP_GZIP
 #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (1366*767*4)
-#define CONFIG_BMP_24BMP
+#define CONFIG_BMP_24BPP
 #define CONFIG_BMP_32BPP
 
 /* memory */
index e2da016f4778b334c05af7db410c1bf945a62af8..7aad7ea51f69a170d44e06bfc7e85b81d36e7cf5 100644 (file)
@@ -13,7 +13,6 @@
 #define __BUR_AM335X_COMMON_H__
 /* ------------------------------------------------------------------------- */
 #define CONFIG_AM33XX
-#define CONFIG_OMAP
 #define CONFIG_MAX_RAM_BANK_SIZE       (1024 << 20)    /* 1GB */
 
 /* Timer information */
@@ -76,8 +75,6 @@
 #define CONFIG_SYS_OMAP24_I2C_SPEED    100000
 #define CONFIG_SYS_OMAP24_I2C_SLAVE    1
 #define CONFIG_SYS_I2C_OMAP24XX
-/* GPIO */
-#define CONFIG_OMAP_GPIO
 
 /*
  * Our platforms make use of SPL to initalize the hardware (primarily
 
 /* General parts of the framework, required. */
 #define CONFIG_SPL_BOARD_INIT
-#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/u-boot-spl.lds"
 
 #endif /* ! __BUR_AM335X_COMMON_H__ */
index 425a38f55197e2e16f20c963dea86a3deb36a072..6e2fd3356323e111f36d9bd7a191026914879f85 100644 (file)
  * Network & Ethernet Configuration
  */
 #ifdef CONFIG_DRIVER_TI_EMAC
-#define CONFIG_EMAC_MDIO_PHY_NUM       1
 #define CONFIG_MII
 #define CONFIG_BOOTP_DNS
 #define CONFIG_BOOTP_DNS2
index e338f9bdd254edddedca8f688fc01a374e2a3f73..f1b5a71edf123366a65daa4ae1f4c0784b8e1a04 100644 (file)
@@ -43,7 +43,6 @@
 #define CONFIG_SPI_FLASH_SIZE          (4 << 20)
 
 /* USB Host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index 8185926590ed3b1442676a72db76c7f2753b70ed..fd8df46776f552e71f2b7774a88663660f29aeef 100644 (file)
@@ -38,7 +38,6 @@
 #define CONFIG_SPI_FLASH_SIZE          (4 << 20)
 
 /* USB Host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index e05db3ed8a169825209081529cb430a2c1edb0fb..cad1357f5cfd659bd0489da5433cb1c6b5e23e03 100644 (file)
@@ -61,8 +61,6 @@
 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
 
 /* USB Configs */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
index c1669fa78884412df21b7faa39cf6cdd874a27f5..20168b22b637d62e1e7626cb255560f0d25ad75c 100644 (file)
 #define CONFIG_BOOTCOUNT_AM33XX
 #define CONFIG_SYS_BOOTCOUNT_BE
 
-#define CONFIG_SPL_LDSCRIPT    "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT    "arch/arm/mach-omap2/u-boot-spl.lds"
 
 /* NAND: device related configs */
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
  */
 #ifdef CONFIG_SPL_BUILD
 #undef CONFIG_DM_MMC
+#undef CONFIG_DM_MMC_OPS
 #undef CONFIG_TIMER
 #undef CONFIG_DM_USB
 #endif
index 0073cb53736990f7bba3fa2a32d8d1f71c030d51..3a7d826837ec496b7cd89d09a3773bdc5559f00d 100644 (file)
@@ -44,7 +44,7 @@
 /*
  * POST support
  */
-#define CONFIG_POST            (CONFIG_SYS_POST_MEMORY | CONFIG_SYS_POST_CPU | CONFIG_SYS_POST_I2C)
+#define CONFIG_POST            (CONFIG_SYS_POST_MEMORY | CONFIG_SYS_POST_CPU)
 #define MPC5XXX_SRAM_POST_SIZE (MPC5XXX_SRAM_SIZE - 4)
 /* List of I2C addresses to be verified by POST */
 #define CONFIG_SYS_POST_I2C_ADDRS      {CONFIG_SYS_I2C_SLAVE,  \
                                        "2m(kernel),27904k(rootfs),"    \
                                        "-(config)"
 
-/*
- * I2C configuration
- */
-#define CONFIG_HARD_I2C                1       /* I2C with hardware support */
-#define CONFIG_SYS_I2C_MODULE          2       /* Select I2C module #2 */
-#define CONFIG_SYS_I2C_SPEED           40000   /* 40 kHz */
-#define CONFIG_SYS_I2C_SLAVE           0x0
-#define CONFIG_SYS_I2C_IO              0x38    /* PCA9554AD I2C I/O port address */
-#define CONFIG_SYS_I2C_EEPROM          0x53    /* I2C EEPROM device address */
-
 /*
  * RTC configuration
  */
index 69137bc6e841be37baa7c958c33d8d510a86aab6..9a8e1302c56034881a068257d44391a0796e9457 100644 (file)
@@ -99,7 +99,7 @@
 #define CONFIG_SYS_I2C_EEPROM_BUS      0
 
 /* SPL */
-#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/u-boot-spl.lds"
 
 /* Network. */
 #define CONFIG_PHY_GIGE
index 4da8d54eda4502605bd351d0d1a487cfbae55e2f..1898e3837d52a097ccb12ac11026aba45611558a 100644 (file)
@@ -22,8 +22,6 @@
 /*
  * High Level Configuration Options
  */
-#define CONFIG_OMAP    /* in a TI OMAP core */
-#define CONFIG_OMAP_GPIO
 #define CONFIG_CM_T3X  /* working with CM-T35 and CM-T3730 */
 
 #define CONFIG_SDRC    /* The chip has SDRC controller */
@@ -77,8 +75,6 @@
 
 /* USB */
 #define CONFIG_USB_OMAP3
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_OMAP
 #define CONFIG_USB_MUSB_UDC
 #define CONFIG_TWL4030_USB
 
 /*
  * TWL4030
  */
-#define CONFIG_TWL4030_POWER
 #define CONFIG_TWL4030_LED
 
 /*
 
 #define CONFIG_SPLASHIMAGE_GUARD
 
-/* GPIO banks */
-#ifdef CONFIG_LED_STATUS
-#define CONFIG_OMAP3_GPIO_6    /* GPIO186 is in GPIO bank 6  */
-#endif
-
 /* Display Configuration */
-#define CONFIG_OMAP3_GPIO_2
-#define CONFIG_OMAP3_GPIO_5
 #define CONFIG_VIDEO_OMAP3
 #define LCD_BPP                LCD_COLOR16
 
index e12dc020ff7b6e221b95e2374ba937611e637b7f..0df7d4269cbbae91f77c3aa3ca45da843ea743da 100644 (file)
@@ -13,7 +13,6 @@
 /*
  * High Level Configuration Options
  */
-#define CONFIG_OMAP    /* in a TI OMAP core */
 #define CONFIG_CM_T3517        /* working with CM-T3517 */
 
 #define CONFIG_SYS_TEXT_BASE   0x80008000
 #define CONFIG_SYS_BAUDRATE_TABLE      {4800, 9600, 19200, 38400, 57600,\
                                        115200}
 
-#define CONFIG_OMAP_GPIO
-
 /* USB */
 #define CONFIG_USB_MUSB_AM35X
 
 #ifndef CONFIG_USB_MUSB_AM35X
 #define CONFIG_USB_OMAP3
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_OMAP
 #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 146
 #define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO 147
 #else /* !CONFIG_USB_MUSB_AM35X */
 /* Status LED */
 #define GREEN_LED_GPIO                 186 /* CM-T3517 Green LED is GPIO186 */
 
-/* GPIO banks */
-#ifdef CONFIG_LED_STATUS
-#define CONFIG_OMAP3_GPIO_6    /* GPIO186 is in GPIO bank 6  */
-#endif
-
 /* Display Configuration */
-#define CONFIG_OMAP3_GPIO_2
-#define CONFIG_OMAP3_GPIO_5
 #define CONFIG_VIDEO_OMAP3
 #define LCD_BPP                LCD_COLOR16
 
index 477aa07bd89ea30cfeef3379b26ef4b5bea52779..ccaa568009461e24188387617e3425c0d79edb36 100644 (file)
@@ -58,8 +58,6 @@
 #define CONFIG_SYS_SCSI_MAX_DEVICE     (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
                                                CONFIG_SYS_SCSI_MAX_LUN)
 /* USB UHH support options */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_OMAP
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS     3
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 
@@ -86,9 +84,6 @@
 #define CONFIG_USB_ETHER_ASIX
 #define CONFIG_USB_ETHER_MCS7830
 
-/* Max time to hold reset on this board, see doc/README.omap-reset-time */
-#define CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC       16296
-
 /*
  * Miscellaneous configurable options
  */
index 023e75cf33d1348e8f9987e5db3cf638063c1c7f..03f6863169d3d2324832e2d71cc40be5032a6d0a 100644 (file)
@@ -25,7 +25,6 @@
 #define CONFIG_SYS_I2C_TEGRA
 
 /* USB host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        3
 
index bc1904418d53ec4e100d79024ced0d48938af69a..853cd5287800eb04d5f9010bbe5902c560b41b4c 100644 (file)
@@ -33,7 +33,6 @@
 #define CONFIG_SYS_MMC_ENV_PART                1
 
 /* USB host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index c7f174839f0ff7dbcd37a5b672f1a06889c86b36..28383f49da651da61a252fc95876a6db88e23c88 100644 (file)
 #endif
 
 /* USB Host Support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_VF
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
diff --git a/include/configs/comtrend_ar5387un.h b/include/configs/comtrend_ar5387un.h
new file mode 100644 (file)
index 0000000..5d8f968
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <configs/bmips_common.h>
+#include <configs/bmips_bcm6328.h>
+
+#define CONFIG_REMAKE_ELF
+
+#define CONFIG_ENV_IS_NOWHERE
+#define CONFIG_ENV_SIZE                        (8 * 1024)
+
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_CMDLINE_EDITING
+#define CONFIG_SYS_LONGHELP
diff --git a/include/configs/comtrend_vr3032u.h b/include/configs/comtrend_vr3032u.h
new file mode 100644 (file)
index 0000000..d45f8b3
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <configs/bmips_common.h>
+#include <configs/bmips_bcm63268.h>
+
+#define CONFIG_REMAKE_ELF
+
+#define CONFIG_ENV_IS_NOWHERE
+#define CONFIG_ENV_SIZE                        (8 * 1024)
+
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_CMDLINE_EDITING
+#define CONFIG_SYS_LONGHELP
index b52f300af927ea1702e2650b9b3e47d70fd9f1db..7535ad5a62da5883681fac36fb4a0a16534706a8 100644 (file)
 /*
  * USB
  */
-#define CONFIG_USB_EHCI
 
 #define CONFIG_HAS_FSL_DR_USB
 #define CONFIG_USB_EHCI_FSL
index f42ba795eab806c77e3acae385d88739318bed62..7e606cd794ca7b0a2ec1d1abbfc45ae35b84e18d 100644 (file)
 #define CONFIG_HAS_FSL_MPH_USB
 
 #if defined(CONFIG_HAS_FSL_DR_USB) || defined(CONFIG_HAS_FSL_MPH_USB)
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #endif
index bb1d0d7715d1b5e39524ef9b240d18857fec2efd..71b428f1f745201f1afb8ddea3025613c2210ebb 100644 (file)
@@ -96,8 +96,6 @@
 #define CONFIG_AT91_WANTS_COMMON_PHY
 
 /* USB */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_ATMEL
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS     2
 
 /* USB DFU support */
index 904da1a8acc5036e85d9c66a43d131753b93c04a..435929723b372c5d96efa5dc71b899d97b412182 100644 (file)
 #define CONFIG_HAS_FSL_MPH_USB
 
 #if defined(CONFIG_HAS_FSL_DR_USB) || defined(CONFIG_HAS_FSL_MPH_USB)
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_EHCI_IS_TDI
index f3ff9e7494b0892c6693c186e0917a6fe234f5da..96a2df806a5db4cad53338546700b5725155ba7b 100644 (file)
@@ -35,7 +35,6 @@
 #define CONFIG_SPI_FLASH_SIZE          (4 << 20)
 
 /* USB Host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index ba5c0901b1af6ddb2ee605867e1bfbd1d453657a..1cdefa05496746a89e44841e6fd1be00108d14ed 100644 (file)
 #define CONFIG_CMD_ENV
 #define CONFIG_CMD_PCI
 
-/* I2C */
-#define CONFIG_SYS_I2C
-#define CONFIG_SYS_I2C_MVTWSI
-#define CONFIG_I2C_MVTWSI_BASE0                MVEBU_TWSI_BASE
-#define CONFIG_SYS_I2C_SLAVE           0x0
-#define CONFIG_SYS_I2C_SPEED           100000
-
 /* SPI NOR flash default params, used by sf commands */
 #define CONFIG_SF_DEFAULT_BUS          1
 #define CONFIG_SF_DEFAULT_SPEED                1000000
index e72cee0c000db80a75290e53bfa3501bb26faf59..5884d5c67c18747ac01d876cbc8fdf42affe2cc6 100644 (file)
@@ -16,7 +16,6 @@
 #define __CONFIG_H
 
 /* High Level Configuration Options */
-#define CONFIG_OMAP3_DEVKIT8000        1       /* working with DevKit8000 */
 #define CONFIG_MACH_TYPE       MACH_TYPE_DEVKIT8000
 
 /*
index 2b56945dd939679b5920aa1bd9cf0fa8849da766..ab546c50cdbe996ebfae188b1ec7ca717554665b 100644 (file)
@@ -85,7 +85,6 @@
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_IDE
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_PCI
 
 #define CONFIG_BOOTCOMMAND     "run mtcb_start"
 
-/*
- * I2C configuration
- */
-#define CONFIG_HARD_I2C                1
-#define CONFIG_SYS_I2C_MODULE  1
-#define CONFIG_SYS_I2C_SPEED   100000
-#define CONFIG_SYS_I2C_SLAVE   0x7F
-
-/*
- * EEPROM configuration
- */
-#define CONFIG_SYS_I2C_EEPROM_ADDR             0x50    /* 1010000x */
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         1
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      3
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  70
-
-/*
- * RTC configuration
- */
-#if defined(CONFIG_DIGSY_REV5)
-#define CONFIG_SYS_I2C_RTC_ADDR        0x56
-#define CONFIG_RTC_RV3029
-/* Enable 5k Ohm trickle charge resistor */
-#define CONFIG_SYS_RV3029_TCR  0x20
-#else
-#define CONFIG_RTC_DS1337
-#define CONFIG_SYS_I2C_RTC_ADDR        0x68
-#define CONFIG_SYS_DS1339_TCR_VAL      0xAB    /* diode + 4k resistor */
-#endif
-
 /*
  * Flash configuration
  */
index da77c451b0aa2545a0aace925ed4ab990725d780..ba6a43062a6301651f4e73c8e30c22a31902609e 100644 (file)
@@ -18,7 +18,6 @@
 
 #include "siemens-am33x-common.h"
 
-#define CONFIG_SYS_MPUCLK      300
 #define DDR_PLL_FREQ   303
 #undef CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC
 
@@ -46,9 +45,6 @@
 
 #define CONFIG_FACTORYSET
 
-/* Watchdog */
-#define CONFIG_OMAP_WATCHDOG
-
 /* Define own nand partitions */
 #define CONFIG_ENV_OFFSET_REDUND    0x2E0000
 #define CONFIG_ENV_SIZE_REDUND      0x2000
index d1d4bf01564347f9774503d0308227410e43b3f1..2c83a716a38436df02f95fb8b8b45fb64aff45f1 100644 (file)
@@ -74,8 +74,6 @@
 #endif
 
 #if !defined(CONFIG_USB_XHCI_HCD)
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MARVELL
 #define CONFIG_EHCI_IS_TDI
 #endif
 
index 4bb81e5d9cb4bf9e650c927b779b0059ab2bd223..f1422316891f74b7b80d0a893cfc2be0f94bef05 100644 (file)
@@ -25,8 +25,6 @@
 #define CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS
 
 /* USB UHH support options */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_OMAP
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3
 
 #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 1
index b6a758f0b20a555f6ffce3a89586424bf78e926b..f88045436fa66848173b9e05950a519189abfe6f 100644 (file)
@@ -33,7 +33,6 @@
 #define CONFIG_SPI_FLASH_SIZE          (4 << 20)
 
 /* USB2.0 Host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index 75100718831d9970ee9d0b2c57e4122d3493cfbc..3a5b5c7285d547ecaa1cd7daea704b4d630184d6 100644 (file)
@@ -79,7 +79,6 @@
  * Network & Ethernet Configuration
  */
 #ifdef CONFIG_DRIVER_TI_EMAC
-#define CONFIG_EMAC_MDIO_PHY_NUM       0
 #define CONFIG_MII
 #define CONFIG_BOOTP_DNS
 #define CONFIG_BOOTP_DNS2
index 03cc74c596627083d8fa13462848510ed1608704..3d7a168bc4ee9627916384798aebf60801a1c52f 100644 (file)
@@ -15,8 +15,6 @@
 
 #include "tam3517-common.h"
 
-#undef CONFIG_USB_EHCI
-#undef CONFIG_USB_EHCI_OMAP
 #undef CONFIG_USB_OMAP3
 
 /* Our console port is port3 */
index f7ac3027dd86c0f2b78424934632c549a9dbb1ce..d1c7b937e36b60d2fb61c2222850abc42159f1aa 100644 (file)
  * Common USB/EHCI configuration
  */
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI                /* Enable EHCI USB support */
-#define CONFIG_USB_EHCI_MARVELL
 #define ORION5X_USB20_HOST_PORT_BASE ORION5X_USB20_PORT0_BASE
 #define CONFIG_SUPPORT_VFAT
 #endif /* CONFIG_CMD_USB */
index 68d48b2e6ae0a0ee746bc6c23e19b4972333ede6..749a9e3bc17dea40662e54bf295bf0ecc50d44b0 100644 (file)
@@ -35,8 +35,6 @@
 #define CONFIG_SYS_I2C_SPEED           100000
 
 /* USB Configs */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
index 3383f06bf727f163ae846b2019109bc83b37be05..a0152a4a43e94b00855cd0d018e41702b7263482 100644 (file)
@@ -69,7 +69,6 @@
                                        CONFIG_SYS_NAND_BASE2}
 
 #define CONFIG_SYS_NAND_ONFI_DETECTION
-#define CONFIG_SYS_MPUCLK      300
 #define DDR_PLL_FREQ   303
 #undef CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC
 
 #define CONFIG_SYS_DCACHE_OFF
 #endif
 
-/* Watchdog */
-#define CONFIG_OMAP_WATCHDOG
-
 /* Define own nand partitions */
 #define CONFIG_ENV_OFFSET_REDUND       0xB80000
 #define CONFIG_ENV_SIZE_REDUND         CONFIG_ENV_SIZE
index aee9fea9da0eed9f36749cdca10e038f6cd4c470..8e8cdf359b449f11c5c726ede7477be0f637636d 100644 (file)
@@ -26,7 +26,6 @@
 #define CONFIG_SYS_INIT_SP_ADDR        CONFIG_IRAM_STACK
 
 /* USB */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_EXYNOS
 
 #define CONFIG_USB_XHCI_EXYNOS
index 776910c6cddcfd8d139a0498ae4c577c21329b35..198259b3c0d40041f29e7649dd85dc1027c183c3 100644 (file)
@@ -68,8 +68,6 @@
 
 /* USB Configs */
 #ifdef CONFIG_USB
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
index 8956841fbe43b31d1fd5cc9ddc4a1170ca862766..8a1d6d3407ff05f2a413eea6cd7e928c37654700 100644 (file)
@@ -78,7 +78,6 @@
 #define CONFIG_SYS_I2C_POWERIC_ADDR 0x58 /* da9063 */
 
 /* USB */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_RMOBILE
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        2
 
index 3ec7649a1d4a510024af278fa2ef00bece84ef08..f2260eae56436530930bf54a2dc59f93b60c0cb4 100644 (file)
@@ -82,7 +82,6 @@
 #define CONFIG_ENV_SIZE                        0x4000
 
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_ARMADA100
 #define CONFIG_EHCI_IS_TDI
 #endif /* CONFIG_CMD_USB */
index 92eded6cdadeebf5d71a6efc33f23b417f43ac58..1c18a380fef679bcfac427d0643d67857308d84b 100644 (file)
 #define CONFIG_ARP_TIMEOUT       200UL
 
 /* USB Configs */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
 #define CONFIG_USB_ETHER_SMSC95XX
index 1a5d4b1dd5d058a4a6b173f18766da88c874901b..c17d7fad792dbc5c4097681b4d5c2e593350bb27 100644 (file)
@@ -36,7 +36,6 @@
 #define CONFIG_ENV_OFFSET      (SZ_512M - SZ_128K) /* 128K sector size */
 
 /* USB Host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
diff --git a/include/configs/huawei_hg556a.h b/include/configs/huawei_hg556a.h
new file mode 100644 (file)
index 0000000..ab64518
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <configs/bmips_common.h>
+#include <configs/bmips_bcm6358.h>
+
+#define CONFIG_REMAKE_ELF
+
+#define CONFIG_ENV_IS_NOWHERE
+#define CONFIG_ENV_SIZE                        (8 * 1024)
+
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_CMDLINE_EDITING
+#define CONFIG_SYS_LONGHELP
+
+#define CONFIG_SYS_FLASH_CFI           1
+#define CONFIG_FLASH_CFI_DRIVER                1
index 6b6bbbd5c027a4e1e6d9f1cacb75ac6c06fa3c73..7ffc9d1dd988a1d3ff06e2803b58c0a4c8103757 100644 (file)
 #define CONFIG_TSEC2
 #define CONFIG_TSEC_ENET
 #define CONFIG_HARD_SPI
-#define CONFIG_HARD_I2C
 
 /*
  * NOR FLASH setup
index aff4adf5d0dc49c4766a0c96e16bc6d04685a0a3..ece72c6aa1d267b7789ed9a3978575030df9a82e 100644 (file)
 #define OF_SOC                 "soc5200@f0000000"
 #define OF_TBCLK               (bd->bi_busfreq / 4)
 
-/*
- * I2C configuration
- */
-#define CONFIG_HARD_I2C                1       /* I2C with hardware support */
-#define CONFIG_SYS_I2C_MODULE  2       /* Select I2C module #1 or #2 */
-
-#define CONFIG_SYS_I2C_SPEED   100000  /* 100 kHz */
-#define CONFIG_SYS_I2C_SLAVE   0x7F
-
-/*
- * EEPROM configuration
- */
-#define CONFIG_SYS_I2C_EEPROM_ADDR             0x53
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         2
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      6
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  10
-
-/*
- * RTC configuration
- */
-#define CONFIG_RTC_PCF8563
-#define CONFIG_SYS_I2C_RTC_ADDR                0x51
-
 #define CONFIG_SYS_FLASH_BASE          0xFC000000
 #define CONFIG_SYS_FLASH_SIZE          0x01000000
 #define CONFIG_ENV_ADDR                        (CONFIG_SYS_FLASH_BASE + \
index b31ba6a4ee544e8789a4d5c416c3e11c162d8c08..89f6cbc85b960ff4e2b875371382dc149b2769ad 100644 (file)
@@ -34,7 +34,6 @@
 #define CONFIG_SPI_FLASH_SIZE          (4 << 20)
 
 /* USB Host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index 0d97317c7fb9c6beb7250c05e2fd3e26062555dc..4461623118e72201dcaa89791c352ea50400ab19 100644 (file)
 #define OF_STDOUT_PATH         "/soc5200@f0000000/serial@2000"
 #endif
 
-#if 0
-/*
- * I2C configuration
- */
-#define CONFIG_HARD_I2C                1       /* I2C with hardware support */
-#define CONFIG_SYS_I2C_MODULE          2       /* Select I2C module #1 or #2 */
-
-#define CONFIG_SYS_I2C_SPEED           100000 /* 100 kHz */
-#define CONFIG_SYS_I2C_SLAVE           0x7F
-
-/*
- * EEPROM configuration
- */
-#define CONFIG_SYS_I2C_EEPROM_ADDR             0x50    /* 1010000x */
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         1
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      3
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  70
-#endif
-
 /*
  * Flash configuration
  */
index 85bc0e3fb77fc1b18602f4a342cf558ee4cdf911..343685a652de518e69d2424aa365855f954df3b8 100644 (file)
 #define CONFIG_SYS_L2_PL310            1
 #define CONFIG_SYS_PL310_BASE          0x48242000
 
-/*
- * Platform
- */
-
-#define CONFIG_OMAP
-#define CONFIG_OMAP4430
-
 /*
  * Board
  */
 
 #define CONFIG_SYS_MALLOC_LEN          (1024 * 1024 + CONFIG_ENV_SIZE)
 
-/*
- * GPIO
- */
-
-#define CONFIG_OMAP_GPIO
-
 /*
  * I2C
  */
index 1ca564f983d9199b2c0f0061bebe0440c3f57bee..2166e2c8f2375670b236b264c9c5c9003426ce5f 100644 (file)
@@ -78,7 +78,6 @@
 #define CONFIG_SYS_I2C_POWERIC_ADDR 0x58 /* da9063 */
 
 /* USB */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_RMOBILE
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        2
 
index b619d153c92c42661e033db6b72692b19bafbe88..bf1352d941e3f9420f8ec3d0e8a632e87c4236c6 100644 (file)
@@ -80,7 +80,6 @@
 #define CONFIG_SYS_TMU_CLK_DIV 4
 
 /* USB */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_RMOBILE
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        3
 
index 229410680265044c3c13cd767d2da906e84661be..016d54f138c53d56235615fcf0236f3639d15a26 100644 (file)
 
 /* USB Configs */
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_USB_STORAGE
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
index 8d7e54305d24870b7a198efbdb3ea595596a3788..2b3833d61b946ec9466a93d840a1004f9e185603 100644 (file)
 /*#define CONFIG_HAS_FSL_DR_USB*/
 
 #ifdef CONFIG_HAS_FSL_DR_USB
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #endif
index 373de40d29809fffffb0472ea410a99a8d164e02..333bb2662384931111ace10e67d32c18addeec8b 100644 (file)
@@ -402,7 +402,6 @@ unsigned long get_board_ddr_clk(void);
 /*#define CONFIG_HAS_FSL_DR_USB*/
 
 #ifdef CONFIG_HAS_FSL_DR_USB
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #endif
index 1ff3d9ee9e9077d27cc0c692129e94455a6c3b46..81f38a30a473c5447010bb4aaceb8d4c7181da9a 100644 (file)
@@ -40,7 +40,6 @@
 /*#define CONFIG_HAS_FSL_DR_USB*/
 
 #ifdef CONFIG_HAS_FSL_DR_USB
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #endif
index 911192da7a1685df04a39c18d283c48ffeb1cb56..6893bf24ff2691c5b6202694edbb9826dfe09d3e 100644 (file)
 /*
  * USB/EHCI
  */
-#define CONFIG_USB_EHCI                        /* Enable EHCI USB support      */
 #define CONFIG_USB_EHCI_PPC4XX         /* on PPC4xx platform           */
 #define CONFIG_SYS_PPC4XX_USB_ADDR     0xe0000300
 #define CONFIG_EHCI_MMIO_BIG_ENDIAN
index f6fa599e6bfd39d69f8e3d9747ab2a596658f849..c4717238bb5c90aa5993d6b01a8d2d76ec332744 100644 (file)
@@ -16,7 +16,6 @@
 /* U-Boot Commands */
 #define CONFIG_FAT_WRITE
 
-#define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_NAND_TRIMFFS
 
 #define CONFIG_FEC_MXC
 #endif
 
-/* EEPROM */
-#ifdef CONFIG_CMD_EEPROM
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
-#endif
-
 /* RTC */
 #ifdef CONFIG_CMD_DATE
 /* Use the internal RTC in the MXS chip */
index d85de5fa17fb292a9e5555233645c5ea7da2a0e2..c729e0938f155133ac83913ddb9971e3fbba16b0 100644 (file)
  * USB
  */
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_MX5
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
index db58f735bcd1a51be3184bf17559a57768db13c7..8413c5c23463bbab660ac0b83984a1a797c331d6 100644 (file)
  * USB
  */
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_ATMEL
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS     3
 
 /* USB device */
diff --git a/include/configs/manroland/mpc5200-common.h b/include/configs/manroland/mpc5200-common.h
new file mode 100644 (file)
index 0000000..68874dc
--- /dev/null
@@ -0,0 +1,176 @@
+/*
+ * (C) Copyright 2009
+ * Heiko Schocher, DENX Software Engineering, hs@denx.de.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __MANROLAND_MPC52XX__COMMON_H
+#define __MANROLAND_MPC52XX__COMMON_H
+
+/*
+ * High Level Configuration Options
+ * (easy to change)
+ */
+#define CONFIG_MPC5200         1       /* MPC5200 CPU */
+
+/* ... running at 33.000000MHz */
+#define CONFIG_SYS_MPC5XXX_CLKIN       33000000
+
+#define CONFIG_HIGH_BATS       1       /* High BATs supported          */
+
+/*
+ * Serial console configuration
+ */
+#define CONFIG_PSC_CONSOLE     1       /* console is on PSC1   */
+#define CONFIG_SYS_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200,\
+                                        230400 }
+
+#if (CONFIG_SYS_TEXT_BASE == 0xFFF00000) /* Boot low */
+#   define CONFIG_SYS_LOWBOOT          1
+#endif
+
+/*
+ * IPB Bus clocking configuration.
+ */
+#define CONFIG_SYS_IPBCLK_EQUALS_XLBCLK                /* define for 133MHz speed */
+
+/*
+ * Flash configuration
+ */
+#define CONFIG_SYS_FLASH_BASE          0xFF800000
+
+#define CONFIG_SYS_FLASH_SIZE          0x00800000 /* 8 MByte */
+
+#define CONFIG_ENV_ADDR        (CONFIG_SYS_TEXT_BASE+0x40000) /* second sector */
+#define CONFIG_SYS_MAX_FLASH_BANKS     1       /* max num of flash banks
+                                          (= chip selects) */
+#define CONFIG_SYS_FLASH_ERASE_TOUT    240000  /* Flash Erase Timeout [ms]*/
+#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Flash Write Timeout [ms]*/
+
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_EMPTY_INFO
+#define CONFIG_SYS_FLASH_CFI_AMD_RESET
+
+/*
+ * Environment settings
+ */
+#define CONFIG_ENV_IS_IN_FLASH 1
+#define CONFIG_ENV_SIZE                0x4000
+#define CONFIG_ENV_OFFSET_REDUND   (CONFIG_ENV_OFFSET+CONFIG_ENV_SECT_SIZE)
+#define CONFIG_ENV_SIZE_REDUND     (CONFIG_ENV_SIZE)
+
+/*
+ * Memory map
+ */
+#define CONFIG_SYS_MBAR                0xF0000000
+#define CONFIG_SYS_DEFAULT_MBAR        0x80000000
+
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE -\
+                                        GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
+
+#define CONFIG_SYS_SDRAM_BASE          0x00000000
+#define CONFIG_SYS_SRAM_BASE   0x80100000      /* CS 1 */
+#define CONFIG_SYS_DISPLAY_BASE        0x80600000      /* CS 3 */
+
+/* Settings for XLB = 132 MHz */
+#define SDRAM_DDR       1
+#define SDRAM_MODE      0x018D0000
+#define SDRAM_EMODE     0x40090000
+#define SDRAM_CONTROL   0x714f0f00
+#define SDRAM_CONFIG1   0x73722930
+#define SDRAM_CONFIG2   0x47770000
+#define SDRAM_TAPDELAY  0x10000000
+
+/* Use ON-Chip SRAM until RAM will be available */
+#define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
+#ifdef CONFIG_POST
+/* preserve space for the post_word at end of on-chip SRAM */
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_POST_SIZE
+#else
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE
+#endif
+
+#define CONFIG_SYS_MONITOR_BASE    CONFIG_SYS_TEXT_BASE
+#if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
+#   define CONFIG_SYS_RAMBOOT          1
+#endif
+
+#define CONFIG_SYS_MONITOR_LEN         (192 << 10)
+#define CONFIG_SYS_MALLOC_LEN          (512 << 10)
+#define CONFIG_SYS_BOOTMAPSZ           (8 << 20)
+
+/*
+ * Ethernet configuration
+ */
+#define CONFIG_MPC5xxx_FEC     1
+#define CONFIG_MPC5xxx_FEC_MII100
+#define CONFIG_PHY_ADDR                0x00
+#define CONFIG_MII             1
+
+/*use  Hardware WDT */
+#define CONFIG_HW_WATCHDOG
+
+#define CONFIG_SYS_CACHELINE_SIZE      32      /* For MPC5xxx CPUs     */
+#if defined(CONFIG_CMD_KGDB)
+#  define CONFIG_SYS_CACHELINE_SHIFT   5 /* log base 2 of the above value */
+#endif
+
+/*
+ * Various low-level settings
+ */
+#define CONFIG_SYS_HID0_INIT           HID0_ICE | HID0_ICFI
+#define CONFIG_SYS_HID0_FINAL          HID0_ICE
+
+#define CONFIG_SYS_BOOTCS_START        CONFIG_SYS_FLASH_BASE
+#define CONFIG_SYS_BOOTCS_SIZE         CONFIG_SYS_FLASH_SIZE
+#define CONFIG_SYS_CS0_START           CONFIG_SYS_FLASH_BASE
+#define CONFIG_SYS_CS0_SIZE            CONFIG_SYS_FLASH_SIZE
+
+/* 8Mbit SRAM @0x80100000 */
+#define CONFIG_SYS_CS1_START           CONFIG_SYS_SRAM_BASE
+
+#define CONFIG_SYS_CS_BURST            0x00000000
+#define CONFIG_SYS_CS_DEADCYCLE        0x33333333
+
+/*-----------------------------------------------------------------------
+ * IDE/ATA stuff Supports IDE harddisk
+ *-----------------------------------------------------------------------
+ */
+
+#undef  CONFIG_IDE_8xx_PCCARD          /* Use IDE with PC Card Adapter */
+
+#undef CONFIG_IDE_8xx_DIRECT           /* Direct IDE    not supported  */
+#undef CONFIG_IDE_LED                  /* LED   for ide not supported  */
+
+#define CONFIG_SYS_IDE_MAXBUS          1       /* max. 1 IDE bus       */
+
+#define CONFIG_IDE_PREINIT     1
+
+#define CONFIG_SYS_ATA_IDE0_OFFSET     0x0000
+
+#define CONFIG_SYS_ATA_BASE_ADDR       MPC5XXX_ATA
+
+/* Offset for data I/O                 */
+#define CONFIG_SYS_ATA_DATA_OFFSET     (0x0060)
+
+/* Offset for normal register accesses */
+#define CONFIG_SYS_ATA_REG_OFFSET      (CONFIG_SYS_ATA_DATA_OFFSET)
+
+/* Offset for alternate registers      */
+#define CONFIG_SYS_ATA_ALT_OFFSET      (0x005C)
+
+/* Interval between registers  */
+#define CONFIG_SYS_ATA_STRIDE          4
+
+#define CONFIG_ATAPI            1
+
+#define OF_CPU                 "PowerPC,5200@0"
+#define OF_SOC                 "soc5200@f0000000"
+#define OF_TBCLK               (bd->bi_busfreq / 4)
+#define OF_STDOUT_PATH         "/soc5200@f0000000/serial@2000"
+#define CONFIG_OF_IDE_FIXUP
+
+#endif /* __MANROLAND_MPC52XX__COMMON_H */
index 9e5c29f92f2cf33273f7b57a77b3cce8c1310f78..4b9b5312bf862dd301dc95ea99bb4239dfbbe612 100644 (file)
@@ -98,8 +98,6 @@
        "128k@0x19C0000(swupdate-kernel-dtb.nor)"
 
 /* USB Configs */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_USB_STORAGE
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        2
 #define CONFIG_MXC_USB_PORTSC          (PORT_PTS_UTMI | PORT_PTS_PTW)
index e4f2a02dcf2d28ecfe8208cd40122fc248a2578c..c70e68c5b0c37a431c2706de3d2916f59cdb3adc 100644 (file)
@@ -12,9 +12,6 @@
 /*
  * High Level Configuration Options
  */
-#define CONFIG_OMAP                    /* in a TI OMAP core */
-#define CONFIG_OMAP3_MCX               /* working with mcx */
-#define CONFIG_OMAP_GPIO
 
 #define CONFIG_MACH_TYPE       MACH_TYPE_MCX
 
                                        115200}
 
 /* EHCI */
-#define CONFIG_OMAP3_GPIO_2
-#define CONFIG_OMAP3_GPIO_5
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_OMAP
 #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO       57
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3
 #define        CONFIG_USB_HOST_ETHER
index 1a9cb675dfba370f5a2bff45d9a30f427b746670..fe94e663c5b3a9ef5572cb445c51177e29c1d3fd 100644 (file)
 
 #define CONFIG_CMDLINE_EDITING 1       /* add command line history     */
 
-/* I2C */
-#define CONFIG_HARD_I2C                        /* I2C with hardware support */
-#define CONFIG_I2C_MULTI_BUS
-#define CONFIG_SYS_I2C_SPEED           400000  /* I2C speed */
-#define CONFIG_SYS_I2C_SLAVE           0x7F    /* slave address */
-
 /*
  * IIM - IC Identification Module
  */
 #undef CONFIG_FSL_IIM
 
-/*
- * EEPROM configuration
- */
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2       /* 16-bit EEPROM address */
-#define CONFIG_SYS_I2C_EEPROM_ADDR     0x50    /* Atmel: AT24C32A-10TQ-2.7 */
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10       /* 10ms of delay */
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5    /* 32-Byte Page Write Mode */
-#define CONFIG_SYS_EEPROM_WREN                 /* Use EEPROM write protect */
-
 /*
  * Ethernet configuration
  */
 /*
  * Environment
  */
-#define CONFIG_ENV_IS_IN_EEPROM                /* Store env in I2C EEPROM      */
+#define CONFIG_ENV_IS_NOWHERE          /* Store env in I2C EEPROM      */
 #define CONFIG_ENV_SIZE                0x1000
 #define CONFIG_ENV_OFFSET       0x0000 /* environment starts here      */
 
 #define CONFIG_SYS_LOADS_BAUD_CHANGE   /* allow baudrate change        */
 
 #define CONFIG_CMD_REGINFO
-#define CONFIG_CMD_EEPROM
 #undef CONFIG_CMD_FUSE
 #undef CONFIG_CMD_IDE
 #define CONFIG_CMD_JFFS2
index b9b666fd3e430c79e05af5953395938cf6f9b5d7..d2165828d365d4833c98281d738cebc25e1cca6e 100644 (file)
@@ -29,7 +29,6 @@
 #define CONFIG_ENV_OFFSET              (SZ_512M - SZ_128K) /* 128K sectors */
 
 /* USB host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index 136db0dd260b5408fa8c077a0a26c136b329b269..cb5c346807bf297ea918ad5d858906511ac1cdb8 100644 (file)
@@ -34,7 +34,6 @@
  * Command line configuration.
  */
 #define CONFIG_CMD_DTT
-#define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_IDE
 #define CONFIG_CMD_IMMAP
 #define CONFIG_CMD_JFFS2
 #define CONFIG_SYS_ATA_REG_OFFSET      CONFIG_SYS_ATA_DATA_OFFSET
 #define CONFIG_SYS_ATA_STRIDE          4
 
-/*
- * I2C configuration
- */
-#define CONFIG_HARD_I2C                1       /* I2C with hardware support */
-#define CONFIG_SYS_I2C_MODULE          2       /* select I2C module #2 */
-#define CONFIG_SYS_I2C_SPEED           100000  /* 100 kHz */
-#define CONFIG_SYS_I2C_SLAVE           0x7F
-
-/*
- * EEPROM configuration
- */
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         1
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      1       /* 2 bytes per write cycle */
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  5       /* 2ms/cycle + 3ms extra */
-
 /*
  * RTC configuration
  */
 #define ENABLE_GPIO_OUT                0x00000024
 #define LED_ON                 0x00000010
 
-/*
- * Temperature sensor
- */
-#define CONFIG_DTT_LM75                1
-#define CONFIG_DTT_SENSORS     { 0x49 }
-
 /*
  * Environment settings
  */
index dafb724e3fc99abef19f25d471b4f704cc120752..7919320c88685f29e0828fb1741793c773685bcf 100644 (file)
 
 #endif
 
-/* I2C */
-#define CONFIG_HARD_I2C                        /* I2C with hardware support */
-#define CONFIG_I2C_MULTI_BUS
-#define CONFIG_SYS_I2C_SPEED           100000  /* I2C speed and slave address */
-#define CONFIG_SYS_I2C_SLAVE           0x7F
-#if 0
-#define CONFIG_SYS_I2C_NOPROBES        {{0,0x69}}      /* Don't probe these addrs */
-#endif
-
 /*
  * IIM - IC Identification Module
  */
 #undef CONFIG_FSL_IIM
 
-/*
- * EEPROM configuration
- */
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         2       /* 16-bit EEPROM address */
-#define CONFIG_SYS_I2C_EEPROM_ADDR             0x50    /* Atmel: AT24C32A-10TQ-2.7 */
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  10      /* 10ms of delay */
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      5       /* 32-Byte Page Write Mode */
-
 /*
  * Ethernet configuration
  */
  */
 
 #if defined(CONFIG_CMD_USB)
-#define CONFIG_USB_EHCI                                /* Enable EHCI Support  */
 #define CONFIG_USB_EHCI_FSL                    /* On a FSL platform    */
 #define CONFIG_EHCI_MMIO_BIG_ENDIAN            /* With big-endian regs */
 #define CONFIG_EHCI_DESC_BIG_ENDIAN
 #define CONFIG_LOADS_ECHO      1       /* echo on for serial download */
 #define CONFIG_SYS_LOADS_BAUD_CHANGE   1       /* allow baudrate change */
 
-#define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_IDE
 #define CONFIG_CMD_JFFS2
 #define CONFIG_CMD_REGINFO
index dfebde20ecd8e128ea62356c165ed0ce9f918d6c..2e373175dc8af87538178d62fa5e8d7d4990a733 100644 (file)
@@ -24,7 +24,6 @@
 #define CONFIG_BOOTFILE                "uImage"
 #define CONFIG_AUTO_COMPLETE
 
-#define CONFIG_OMAP3_GPIO_4
 #define CONFIG_HOSTNAME mt_ventoux
 
 /*
index 814f0dd7ca1b62abb9419f9f474b72e1a959ef45..d000d7617a226462092bd78311a5b692cf134ced 100644 (file)
  * Common USB/EHCI configuration
  */
 #if defined(CONFIG_CMD_USB) && !defined(CONFIG_DM)
-#define CONFIG_USB_EHCI                /* Enable EHCI USB support */
 #define CONFIG_SUPPORT_VFAT
 #endif /* CONFIG_CMD_USB */
 
index 8ee5f27a9762d3d7e24e7426872d15edeeaa30d3..9d3aeefcd0b10856c258fa5c7403b19e83080c63 100644 (file)
 #define CONFIG_ENV_SPI_MODE            CONFIG_SF_DEFAULT_MODE
 
 /* Environment in SPI NOR flash */
+#ifdef CONFIG_MVEBU_SPI_BOOT
 #define CONFIG_ENV_IS_IN_SPI_FLASH
+/* Environment in NAND flash */
+#elif defined(CONFIG_MVEBU_NAND_BOOT)
+#define CONFIG_ENV_IS_IN_NAND
+#endif
+
 #define CONFIG_ENV_OFFSET              0x180000 /* as Marvell U-Boot version */
 #define CONFIG_ENV_SIZE                        (64 << 10) /* 64KiB */
 #define CONFIG_ENV_SECT_SIZE           (64 << 10) /* 64KiB sectors */
 
+#define CONFIG_SYS_MAX_NAND_DEVICE     1
+#define CONFIG_SYS_NAND_MAX_CHIPS      1
+#define CONFIG_SYS_NAND_ONFI_DETECTION
+#define CONFIG_SYS_NAND_USE_FLASH_BBT
+
 /*
  * Ethernet Driver configuration
  */
index 79d92bb06ad38f20ced5f4688cea2c4cdd5310c6..e60b96f7dc9adbea7a5c2c85cd975435fa5c657a 100644 (file)
 #define CONFIG_SYS_NAND_LARGEPAGE
 
 /* EHCI driver */
-#define CONFIG_USB_EHCI
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS     1
 #define CONFIG_EHCI_IS_TDI
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
index dfd7ea9d4533d6994841ceeabb9b00a89797b27c..54bc5634676e4286a114aff2fb7684276e4355e5 100644 (file)
@@ -73,7 +73,6 @@
 #define CONFIG_FEC_MXC_PHYADDR 0x1F
 
 /* USB Configs */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_MX5
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
index 3094402d15a1e9635cb4642e6df54f50692cafc7..151c4b3faff70e83870b35750c9e150678ba4278 100644 (file)
@@ -45,7 +45,6 @@
 #define CONFIG_FEC_MXC_PHYADDR 0x1F
 
 /* USB Configs */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_MX5
 #define CONFIG_USB_STORAGE
 #define CONFIG_USB_HOST_ETHER
index 945be5835bf4e6e739a1a9edf9efd50b729288d8..1b6d868d044ad2fd6e112bb500a9bf12afe80c77 100644 (file)
@@ -42,7 +42,6 @@
 #define CONFIG_FEC_MXC_PHYADDR 0x1F
 
 /* USB Configs */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_MX5
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
index 84fdf656cd66f71b6e1dd25e41b9d6de7b412e45..b2cecc5d0eb46a93a7e8c64f270019ef21f255c3 100644 (file)
@@ -44,8 +44,6 @@
 #define CONFIG_IMX_VIDEO_SKIP
 
 /* USB */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_MXC_USB_PORTSC          (PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS           0
index 9f42735571953152fc6a3b3f8a9ff30ae0c3bd70..de5dc1c45175e10f138698edfe0270f8747b6882 100644 (file)
 
 /* USB Configs */
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
index ef7675c6881547a05d4c4537d612afcf9f8be259..635c04acf9ea151cad38e29b75cf6d1c7d1b6504 100644 (file)
@@ -15,8 +15,6 @@
 #define CONFIG_MMCROOT                 "/dev/mmcblk0p2"
 
 /* USB Configs */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
index 598ab9aa2eec1b60b7c52397a48a9b14ec50be89..a8c0e035829a358cef11735cbfb3e4580ab41790 100644 (file)
@@ -63,8 +63,6 @@
 
 /* USB Configs */
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
index 2fff7995eac7a1eac191331758088621aa5677ef..6ab76bb8fa1062d9f7c0ba8a55fc06699e77416b 100644 (file)
 
 /* USB Configs */
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
index 971f6c2f3175b8463873a0436bb263f7010fa859..3e73dad9a3ff5a3b6418616c20509d86dae53f29 100644 (file)
 #define CONFIG_PHY_ATHEROS
 
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
index dafa946e4786274c0304aead84280675ff927b8f..b39ab729d8a439e934ef0d91b7264845fcdcd3e7 100644 (file)
 #define CONFIG_PHY_ATHEROS
 
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
index 240d3a226c39e465ea416ed4e74c6fe3ec91da57..2c40decf499b9dea9dd800aa3b099f82ebac8106 100644 (file)
 
 /* USB Configs */
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS   0
index 9c3cec19928cf80354819a5eb1436c772858abe0..39291a2ffd631a5351823720396bdb0af024e0d4 100644 (file)
 /* MMC Config*/
 #define CONFIG_SYS_FSL_ESDHC_ADDR       0
 
-/* PMIC */
-#define CONFIG_POWER
-#define CONFIG_POWER_I2C
-#define CONFIG_POWER_PFUZE3000
-#define CONFIG_POWER_PFUZE3000_I2C_ADDR        0x08
-
 #undef CONFIG_BOOTM_NETBSD
 #undef CONFIG_BOOTM_PLAN9
 #undef CONFIG_BOOTM_RTEMS
 
 /* I2C configs */
-#define CONFIG_SYS_I2C
 #define CONFIG_SYS_I2C_MXC
-#define CONFIG_SYS_I2C_MXC_I2C1                /* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_SPEED           100000
 
 #define CONFIG_SUPPORT_EMMC_BOOT       /* eMMC specific */
 #define CONFIG_ENV_SIZE                        SZ_8K
 #define CONFIG_ENV_IS_IN_MMC
 
-/* MXC SPI driver support */
-#define CONFIG_MXC_SPI
-
 /*
  * If want to use nand, define CONFIG_NAND_MXS and rework board
  * to support nand, since emmc has pin conflicts with nand
 #define CONFIG_MMCROOT                 "/dev/mmcblk0p2"  /* USDHC1 */
 
 /* USB Configs */
-#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
 #define CONFIG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
-#define CONFIG_MXC_USB_FLAGS   0
-#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
 
 #define CONFIG_IMX_THERMAL
 
index fdf596f82f0be7abbe7887421ef37811ad11f303..041dcde38e76766bd5a02cd3106e91c2fdf8a676 100644 (file)
 #endif
 #endif
 
-/* I2C */
-#ifdef CONFIG_CMD_I2C
-#define CONFIG_SYS_I2C
-#define CONFIG_SYS_I2C_MXS
-#define CONFIG_HARD_I2C
-#ifndef CONFIG_SYS_I2C_SPEED
-#define CONFIG_SYS_I2C_SPEED           400000
-#endif
-#endif
-
 /* LCD */
 #ifdef CONFIG_VIDEO
 #define CONFIG_VIDEO_MXS
 
 /* USB */
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_MXS
 #define CONFIG_EHCI_IS_TDI
 #endif
index 861cb5df57d902f2e4393df39efc4c883330a34c..7004176c4abee088778a88977987b4e4524a8809 100644 (file)
@@ -94,7 +94,6 @@
  * USB/EHCI
  */
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI                        /* Enable EHCI USB support */
 #define CONFIG_USB_EHCI_KIRKWOOD       /* on Kirkwood platform */
 #define CONFIG_EHCI_IS_TDI
 #define CONFIG_SUPPORT_VFAT
index cacc1b81f07328f85d4152e247df8be133276890..13625286c5b7274aa873209b297c0c14ca231275 100644 (file)
@@ -74,8 +74,6 @@
 #define CONFIG_PHY_MICREL_KSZ9021
 
 /* USB Configs */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
 #define CONFIG_USB_ETHER_MCS7830
index eb2a60a57dac463047f4aec97f9cd61d443ae7bb..5e2d5991e76d9601ddd9f1fb7086a3c0e0b938ef 100644 (file)
 /*
  * High Level Configuration Options
  */
-
-#define CONFIG_OMAP                    /* in a TI OMAP core */
-#define CONFIG_OMAP3430                        /* which is in a 3430 */
-#define CONFIG_OMAP3_RX51              /* working with RX51 */
 #define CONFIG_SYS_L2CACHE_OFF         /* pretend there is no L2 CACHE */
 
 #define CONFIG_MACH_TYPE               MACH_TYPE_NOKIA_RX51
 /*
  * TWL4030
  */
-#define CONFIG_TWL4030_POWER
 #define CONFIG_TWL4030_LED
 #define CONFIG_TWL4030_KEYPAD
 
-#define CONFIG_OMAP_GPIO
 #define GPIO_SLIDE                     71
 
 /*
index df0efbca92d5624b61e4d35678685a8928b653a0..e0ed30458656262d20802a2efe6d0ffc36fb60e0 100644 (file)
 
 /* USB Configs */
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
index d9d4f2d5837cd2df2561286315cd547ebd9545e2..b5357ea15c7d10a47201288b79b05865db73e460 100644 (file)
@@ -39,7 +39,6 @@
 #define CONFIG_SPI_FLASH_SIZE          (4 << 20)
 
 /* USB Host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index e2881a7177b94fe7fe708f5d2397d63f283b8b7c..1b4200bcbffc8fcd881454442aee18fee4b7e1f0 100644 (file)
@@ -68,7 +68,6 @@
 /*
  * Supported commands
  */
-#define CONFIG_CMD_EEPROM
 #ifdef CONFIG_PCI
 #define CONFIG_CMD_PCI
 #endif
 #define CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2   /* define for 66MHz speed */
 #endif
 
-/*
- * I2C configuration
- */
-#define CONFIG_HARD_I2C                        1       /* I2C with hardware support */
-#define CONFIG_SYS_I2C_MODULE          1       /* Select I2C module #1 or #2 */
-#define CONFIG_SYS_I2C_SPEED           100000  /* 100 kHz */
-#define CONFIG_SYS_I2C_SLAVE           0x7F
-
-/*
- * EEPROM configuration:
- *
- * O2DNT board is equiped with Ramtron FRAM device FM24CL16
- * 16 Kib Ferroelectric Nonvolatile serial RAM memory
- * organized as 2048 x 8 bits and addressable as eight I2C devices
- * 0x50 ... 0x57 each 256 bytes in size
- *
- */
-#define CONFIG_SYS_I2C_FRAM
-#define CONFIG_SYS_I2C_EEPROM_ADDR             0x50    /* 1010000x */
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         1
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      3
 /*
  * There is no write delay with FRAM, write operations are performed at bus
  * speed. Thus, no status polling or write delay is needed.
index 6cc7dd16a2fa42371148d17936da888b2a202f48..afc7c5e35f25469e727382f6fc566952e3e0a4e1 100644 (file)
 #define CONFIG_LIB_HW_RAND
 
 /* USB */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_EXYNOS
 
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS     3
index 40b48f70abf76bfebe98876dcae0a8e330f81785..246fb808a965e4aa351e622c8d934a671735aae8 100644 (file)
@@ -41,7 +41,6 @@
 #define CONFIG_DEFAULT_CONSOLE         "console=ttySAC2,115200n8\0"
 
 /* USB */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_EXYNOS
 
 /* DFU */
index c69b32531cc50963eb01fa3fd1ab23262d86aaaf..0d48d4ecc1c9c56e655189ef1386af26557bcbcd 100644 (file)
@@ -55,9 +55,7 @@
 #define CONFIG_FASTBOOT_BUF_SIZE       0x07000000
 
 /* USB EHCI */
-#define CONFIG_USB_EHCI
 
-#define CONFIG_USB_EHCI_OMAP
 #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO       147
 
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3
 #define CONFIG_USB_ETHER_MCS7830
 #define CONFIG_USB_ETHER_SMSC95XX
 
-/* GPIO banks */
-#define CONFIG_OMAP3_GPIO_5            /* GPIO128..159 is in GPIO bank 5 */
-#define CONFIG_OMAP3_GPIO_6            /* GPIO160..191 is in GPIO bank 6 */
-
 /* commands to include */
 
 #define MTDIDS_DEFAULT                 "nand0=nand"
index 329dc73221395869ba2d1c451246f8f1fc362a03..d8ca6225d6e6c8d522a290c71a6cfe44e811ac25 100644 (file)
 /*
  * High level configuration options
  */
-#define CONFIG_OMAP                    /* This is TI OMAP core */
-#define CONFIG_OMAP_GPIO
 
 #define CONFIG_SDRC                    /* The chip has SDRC controller */
 
-#define CONFIG_OMAP3_EVM               /* This is a OMAP3 EVM */
-#define CONFIG_TWL4030_POWER           /* with TWL4030 PMIC */
-
 /*
  * Clock related definitions
  */
index 70d337e6f16660d0f9f009af034f494d234bed23..59da726bd6383a0c4a4d292bac46b68b28f03669 100644 (file)
 #endif
 #endif
 
-/* GPIO banks */
-#define CONFIG_OMAP3_GPIO_3            /* GPIO64 .. 95 is in GPIO bank 3 */
-#define CONFIG_OMAP3_GPIO_5            /* GPIO128..159 is in GPIO bank 5 */
-#define CONFIG_OMAP3_GPIO_6            /* GPIO160..191 is in GPIO bank 6 */
-
 /* USB */
 #define CONFIG_USB_MUSB_UDC            1
 #define CONFIG_USB_OMAP3               1
index 706175c93e82c0a6da46004de9fb9b797e37e5dd..f8978037f2ba9ba8cf7b74891958c4227bcea3a2 100644 (file)
 
 #include <configs/ti_omap3_common.h>
 
+#ifdef CONFIG_SPL_BUILD
+/*
+ * Disable MMC DM for SPL build and can be re-enabled after adding
+ * DM support in SPL
+ */
+#undef CONFIG_DM_MMC
+#undef CONFIG_DM_MMC_OPS
+#undef OMAP_HSMMC_USE_GPIO
+
+/* select serial console configuration for SPL */
+#undef CONFIG_CONS_INDEX
+#define CONFIG_CONS_INDEX              1
+#define CONFIG_SYS_NS16550_COM1                OMAP34XX_UART1
+#endif
+
+
 /*
  * We are only ever GP parts and will utilize all of the "downloaded image"
  * area in SRAM which starts at 0x40200000 and ends at 0x4020FFFF (64KB) in
  * order to allow for BCH8 to fit in.
  */
 #undef CONFIG_SPL_TEXT_BASE
+#define CONFIG_SPL_FRAMEWORK
 #define CONFIG_SPL_TEXT_BASE           0x40200000
 
 #define CONFIG_MISC_INIT_R             /* misc_init_r dumps the die id */
 
 /* Hardware drivers */
 
-/* GPIO banks */
-#define CONFIG_OMAP3_GPIO_6            /* GPIO160..191 is in GPIO bank 6 */
-
 #define CONFIG_USB_OMAP3
 
-/* select serial console configuration */
-#undef CONFIG_CONS_INDEX
-#define CONFIG_CONS_INDEX              1
-#define CONFIG_SYS_NS16550_COM1                OMAP34XX_UART1
-#define CONFIG_SERIAL1                 1       /* UART1 on OMAP Logic boards */
-
 /* commands to include */
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_MTDPARTS
@@ -52,8 +60,6 @@
 /* I2C */
 #define CONFIG_SYS_I2C_OMAP34XX
 #define CONFIG_SYS_I2C_EEPROM_ADDR     0x50    /* EEPROM AT24C64      */
-#define EXPANSION_EEPROM_I2C_BUS       2       /* I2C Bus for AT24C64 */
-#define CONFIG_OMAP3_LOGIC_USE_NEW_PRODUCT_ID
 
 /* USB */
 #define CONFIG_USB_MUSB_OMAP2PLUS
index ebf7dd0c01fbb044cfd00b57071681a6e0222b8e..111aec58d3915be3bcfb88eb7b8e9342a563e8f7 100644 (file)
 #define CONFIG_TWL4030_LED
 
 /* USB EHCI */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_OMAP
 #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO       183
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS     3
 
-/* Initialize GPIOs by default */
-#define CONFIG_OMAP3_GPIO_2    /* GPIO32..63 is in GPIO Bank 2 */
-#define CONFIG_OMAP3_GPIO_3    /* GPIO64..95 is in GPIO Bank 3 */
-#define CONFIG_OMAP3_GPIO_4    /* GPIO96..127 is in GPIO Bank 4 */
-#define CONFIG_OMAP3_GPIO_5    /* GPIO128..159 is in GPIO Bank 5 */
-#define CONFIG_OMAP3_GPIO_6    /* GPIO160..191 is in GPIO Bank 6 */
-
 /* commands to include */
 
 #ifdef CONFIG_NAND
index ba7d3cdef5df4b0c937afc1d854c90da92c7742f..efee5b0c3f1ae61c7afa4c30e8f469ccf889fa34 100644 (file)
 /* TWL4030 LED */
 #define CONFIG_TWL4030_LED
 
-/* Initialize GPIOs by default */
-#define CONFIG_OMAP3_GPIO_4    /* GPIO96..127 is in GPIO Bank 4 */
-#define CONFIG_OMAP3_GPIO_6    /* GPIO160..191 is in GPIO Bank 6 */
-
 /*
  * NS16550 Configuration
  */
index aa27a9e68a42af39e685a79e33730be42aa2fd7c..6c869c4c07b799e43a012306f6f4dee4fbeee360 100644 (file)
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-/*
- * High Level Configuration Options
- */
-#define CONFIG_OMAP3_ZOOM1     1       /* working with Zoom MDK Rev1 */
-
 #define CONFIG_NAND
 #define CONFIG_NR_DRAM_BANKS   2       /* CS1 may or may not be populated */
 #include <asm/arch/cpu.h>              /* get chip and board defs */
index a6078daca6f787332f97ccb40c59dc41e24c8d0f..e1263b68bcf25bfa6d17ab73e202e2ef7f7dbf6a 100644 (file)
@@ -17,8 +17,6 @@
  */
 
 /* USB UHH support options */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_OMAP
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3
 
 #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 1
index 533bb02c5e2261cc71f23740158eba962c916728..d8b0c023b94b23435b6199a5be3549d01a4b36cf 100644 (file)
@@ -52,8 +52,6 @@
 #define CONFIG_SYS_I2C_TCA642X_ADDR 0x22
 
 /* USB UHH support options */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_OMAP
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 
@@ -68,9 +66,6 @@
 
 #define CONSOLEDEV             "ttyO2"
 
-/* Max time to hold reset on this board, see doc/README.omap-reset-time */
-#define CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC       16296
-
 #define CONFIG_SCSI
 #define CONFIG_LIBATA
 #define CONFIG_SCSI_AHCI
index 4efddb6207460243a54f0cbcf25df97a359401af..0cc0042bca3bc7f451ab94861352f91a559f6921 100644 (file)
  * Network & Ethernet Configuration
  */
 #ifdef CONFIG_DRIVER_TI_EMAC
-#define CONFIG_EMAC_MDIO_PHY_NUM       7
 #define CONFIG_MII
 #undef CONFIG_DRIVER_TI_EMAC_USE_RMII
 #define CONFIG_BOOTP_DEFAULT
index b4d2b0a8715290b6c3037061fc4f29f6fcebcbe9..34da90f20b6a85ae45100ced9fdc39c3d9cea8db 100644 (file)
@@ -55,8 +55,6 @@
 #define CONFIG_SYS_FSL_USDHC_NUM       2
 
 /* USB Configs */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_MXC_USB_PORTSC   (PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
 
index d995d0448c5f68bb8d128170d9dd0523007f2168..638e9da0283bdd9edbd133ecafc411ae7c4a7a96 100644 (file)
 #define CONFIG_HAS_FSL_DR_USB
 
 #if defined(CONFIG_HAS_FSL_DR_USB)
-#define CONFIG_USB_EHCI
-
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_USB_EHCI_FSL
 #endif
index dad0616517db2e04d3ac374a42e24df2633516be..427629f409d03a0ce6fd2962db41ae07dee3d26c 100644 (file)
@@ -394,9 +394,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_HAS_FSL_DR_USB
 
 #if defined(CONFIG_HAS_FSL_DR_USB)
-#define CONFIG_USB_EHCI
-
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_USB_EHCI_FSL
 #endif
index 897add3dd05f52234ccf311df09416774f1bbda7..b106439071c5947a6fc0c552646d44ce04c4c731 100644 (file)
@@ -33,7 +33,6 @@
 #define CONFIG_SPI_FLASH_SIZE          (4 << 20)
 
 /* USB2.0 Host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index 3cf0c87be435cf09bc095dcd63870db00157d17d..22fc122cc30dcea4898e87fe8fa28a6aa3389db3 100644 (file)
@@ -33,7 +33,6 @@
 #define CONFIG_SPI_FLASH_SIZE          (4 << 20)
 
 /* USB2.0 Host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index 76fb7cec87aed76064546dba38f2c8e8b449b455..974fd3f59f8e695468c7ecd10aab232731dd5be5 100644 (file)
@@ -34,7 +34,6 @@
 #define CONFIG_SPI_FLASH_SIZE          (4 << 20)
 
 /* USB2.0 Host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index 2e8cbd94cf627e660fc769d6549d5228f8a81aef..87a8557ea98cbdfa4ea8f0ab8e0915543c787f6a 100644 (file)
@@ -29,7 +29,6 @@
 #define CONFIG_SYS_MMC_ENV_PART 2
 
 /* USB Host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index 6d8a2338a292fa517fea83e69ddf5c17696f23ea..406f3e547ab9f381d5bcbbe09b590e7c96a4a8ab 100644 (file)
@@ -49,7 +49,6 @@ Serial console configuration
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_JFFS2
 #define CONFIG_CMD_PCI
 
@@ -120,31 +119,6 @@ IPB Bus clocking configuration.
 #define CONFIG_PCI_IO_SIZE             0x01000000
 #define CONFIG_SYS_XLB_PIPELINING      1
 
-/*---------------------------------------------------------------------------
- I2C configuration
----------------------------------------------------------------------------*/
-#define CONFIG_HARD_I2C 1 /* I2C with hardware support */
-#define CONFIG_SYS_I2C_MODULE 2 /* Select I2C module #1 or #2 */
-#define CONFIG_SYS_I2C_SPEED 100000 /* 100 kHz */
-#define CONFIG_SYS_I2C_SLAVE 0x7F
-
-/*---------------------------------------------------------------------------
- EEPROM CAT24WC32 configuration
----------------------------------------------------------------------------*/
-#define CONFIG_SYS_I2C_EEPROM_ADDR     0x52    /* 1010100x */
-#define CONFIG_SYS_I2C_FACT_ADDR       0x52    /* EEPROM CAT24WC32 */
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2       /* Bytes of address */
-#define CONFIG_SYS_EEPROM_SIZE         2048
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 15
-
-/*---------------------------------------------------------------------------
-RTC configuration
----------------------------------------------------------------------------*/
-#define RTC
-#define CONFIG_RTC_PCF8563             1
-#define CONFIG_SYS_I2C_RTC_ADDR                0x51
-
 /*---------------------------------------------------------------------------
  Flash configuration
 ---------------------------------------------------------------------------*/
@@ -172,11 +146,10 @@ RTC configuration
  Environment settings
 ---------------------------------------------------------------------------*/
 
-/* pcm030 ships with environment is EEPROM by default */
-#define CONFIG_ENV_IS_IN_EEPROM        1
+#define CONFIG_ENV_IS_NOWHERE
 #define CONFIG_ENV_OFFSET      0x00    /* environment starts at the */
                                        /*beginning of the EEPROM */
-#define CONFIG_ENV_SIZE                CONFIG_SYS_EEPROM_SIZE
+#define CONFIG_ENV_SIZE                2048
 
 #define CONFIG_ENV_OVERWRITE   1
 
index 9ce976ce43a12dcbdd48290703ef7a022c3082fb..ea3872f5c92c4e005d02747bcadbc1effcdbb79d 100644 (file)
 /* CPU */
 #define CONFIG_ENV_IS_NOWHERE
 
-#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/u-boot-spl.lds"
 
 #ifdef CONFIG_SPI_BOOT
 #define CONFIG_SPL_SPI_LOAD
index 501611dde72fb37f405a0075f30c625b7992eb52..4bd8236b33cd57ed738638d5f30e986966456f83 100644 (file)
 #define CONFIG_SYS_PDM360NG_COPROC_READ_DELAY  5000
 #define CONFIG_SYS_PDM360NG_COPROC_BAUDRATE    38400
 
-/*
- * I2C
- */
-#define CONFIG_HARD_I2C                        /* I2C with hardware support */
-#define CONFIG_I2C_MULTI_BUS
-#define CONFIG_I2C_CMD_TREE
-/* I2C speed and slave address */
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           0x7F
-
 /*
  * IIM - IC Identification Module
  */
 #undef CONFIG_FSL_IIM
 
-/*
- * EEPROM configuration
- */
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         2       /* 16-bit EEPROM addr */
-#define CONFIG_SYS_I2C_EEPROM_ADDR             0x50    /* ST AT24C01 */
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  10      /* 10ms of delay */
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      4       /* 16-Byte Write Mode */
-
-/*
- * MAC addr in EEPROM
- */
-#define CONFIG_SYS_I2C_EEPROM_BUS_NUM          0
-#define CONFIG_SYS_I2C_EEPROM_MAC_OFFSET       0x10
 /*
  * Enabled only to delete "ethaddr" before testing
  * "ethaddr" setting from EEPROM
 #define CONFIG_FEC_AN_TIMEOUT  1
 #define CONFIG_HAS_ETH0
 
-/*
- * Configure on-board RTC
- */
-#define CONFIG_RTC_M41T62                      /* use M41T00 rtc via i2c */
-#define CONFIG_SYS_I2C_RTC_ADDR                0x68    /* at address 0x68      */
-
 /*
  * Environment
  */
 #define CONFIG_LOADS_ECHO      1       /* echo on for serial download */
 #define CONFIG_SYS_LOADS_BAUD_CHANGE   1       /* allow baudrate change */
 
-#define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_REGINFO
 
 #undef CONFIG_CMD_FUSE
index cdfaf7c912386245129d7bfe3c4421c7425003d9..2cb6f56f7d0c33331cb0531a3948ee0088c81309 100644 (file)
 
 /* CPSW support */
 
-#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/u-boot-spl.lds"
 
 #endif /* ! __CONFIG_PENGWYN_H */
index 9552dd1bcbba8488ab72324bcce5f47f711fa1a8..5abeffbade332ddfc50457bc9ea935f696884867 100644 (file)
@@ -86,6 +86,6 @@
 #define CONFIG_PHY_RESET_DELAY 1000
 
 /* SPL */
-#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/u-boot-spl.lds"
 
 #endif /* __CONFIG_PEPPER_H */
index 26b1b1147cb263691ae322980bcf1587e744782f..8d78f49c96843bd75e1478f5ef2887e446ae37db 100644 (file)
@@ -37,8 +37,6 @@
 #define CONFIG_SUPPORT_EMMC_BOOT
 
 /* USB Configs */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_MXC_USB_PORTSC          (PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS           0
index 733768aa7b2d240117d3c7c181bae1f20adc771c..998a7a344b2b9e7a05fd8afc8f49fc80708fafd9 100644 (file)
@@ -98,8 +98,6 @@
 #define CONFIG_AT91_WANTS_COMMON_PHY
 
 /* USB */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_ATMEL
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS     2
 
 #define CONFIG_SYS_LOAD_ADDR           0x22000000      /* load address */
index 6687c38c992722ba965ebf23a34953fd12c0190d..9c2182cbea304951801939b6322985ec85936543 100644 (file)
@@ -52,8 +52,6 @@
 #define CONFIG_PHYLIB
 
 /* USB config */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_MXC_USB_PORT                    1
 #define CONFIG_MXC_USB_PORTSC                  (PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS                   0
index 911cad8cdd7391a9ea5dcf0428f78c28c8bb4850..ff396eceb97bf4a1d96d8f9c14b9acb04f218f8e 100644 (file)
@@ -29,7 +29,6 @@
 #define CONFIG_ENV_OFFSET              (SZ_512M - SZ_128K) /* 128K sectors */
 
 /* USB host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index fabab73680cf6382879f74bbd0fe703576ad8b18..ac21411178e39db11ebbaccb23ca63d43d2aa15f 100644 (file)
@@ -82,7 +82,6 @@
 #define CONFIG_SYS_I2C_POWERIC_ADDR    0x58 /* da9063 */
 
 /* USB */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_RMOBILE
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        2
 
index c8bc8f35128f6341a7f21cdc605c64ef986fe915..e8e0c7edd89eb97b670c51ab2770122cb72bde8d 100644 (file)
@@ -19,7 +19,6 @@
 
 #include "siemens-am33x-common.h"
 
-#define CONFIG_SYS_MPUCLK      720
 #define DDR_IOCTRL_VAL         0x18b
 #define DDR_PLL_FREQ           266
 
@@ -43,9 +42,6 @@
 
 #define CONFIG_FACTORYSET
 
-/* Watchdog */
-#define CONFIG_OMAP_WATCHDOG
-
 #ifndef CONFIG_SPL_BUILD
 
 /* Use common default */
index 642572fc9549d3aa0a5af0eaf967cd16075754fe..b159b1ed8d9fd3ddd2729cc5f2d82eb6a09f253b 100644 (file)
 # define CONFIG_SMC911X_BASE (0x84000000)
 #endif
 
-/* I2C */
-#define CONFIG_SH_SH7734_I2C   1
-#define CONFIG_HARD_I2C                        1
-#define CONFIG_I2C_MULTI_BUS   1
-#define CONFIG_SYS_MAX_I2C_BUS 2
-#define CONFIG_SYS_I2C_MODULE  0
-#define CONFIG_SYS_I2C_SPEED   100000 /* 100 kHz */
-#define CONFIG_SYS_I2C_SLAVE   0x50
-#define CONFIG_SH_I2C_DATA_HIGH        4
-#define CONFIG_SH_I2C_DATA_LOW 5
-#define CONFIG_SH_I2C_CLOCK            500000000
-#define CONFIG_SH_I2C_BASE0            0xFFC70000
-#define CONFIG_SH_I2C_BASE1            0xFFC7100
-
 /* undef to save memory        */
 #define CONFIG_SYS_LONGHELP
 /* Monitor Command Prompt */
index 16ed1f0133c3b818aeb764250709723c98350138..0820f6fc7a3fbce01dfeb1348627ff5ac904e973 100644 (file)
@@ -15,7 +15,6 @@
 
 #include "siemens-am33x-common.h"
 
-#define CONFIG_SYS_MPUCLK      300
 #define DDR_PLL_FREQ   303
 #undef CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC
 
@@ -50,9 +49,6 @@
 
 #define CONFIG_FACTORYSET
 
-/* Watchdog */
-#define CONFIG_OMAP_WATCHDOG
-
 /* Define own nand partitions */
 #define CONFIG_ENV_OFFSET_REDUND       0x2E0000
 #define CONFIG_ENV_SIZE_REDUND         0x2000
index b7b89b08a88f31ae55803696f443783e0a4b01e8..49f56f23de5b9036f971ba165bfbe21edec88b2e 100644 (file)
@@ -18,6 +18,9 @@
 #define CONFIG_SPL_FRAMEWORK
 #define CONFIG_SPL_DRIVERS_MISC_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
+#if defined(CONFIG_SPL_SPI_SUPPORT)
+#define CONFIG_SPL_SPI_LOAD
+#endif
 
 #define COUNTER_FREQUENCY               24000000
 
index 5caf90a9ac2f3078889c2ffb51f4bdb890ce23bc..7b9017ff99f98ab375a118e7cfc165a555faff57 100644 (file)
 #define CONFIG_BCM2835_GPIO
 /* LCD */
 #define CONFIG_LCD_DT_SIMPLEFB
-#define LCD_BPP                                LCD_COLOR32
-/*
- * Prevent allocation of RAM for FB; the real FB address is queried
- * dynamically from the VideoCore co-processor, and comes from RAM
- * not owned by the ARM CPU.
- */
-#define CONFIG_FB_ADDR                 0
 #define CONFIG_VIDEO_BCM2835
 
 #ifdef CONFIG_CMD_USB
 #define CONFIG_USB_DWC2
-#ifndef CONFIG_BCM2835
-#define CONFIG_USB_DWC2_REG_ADDR 0x3f980000
-#else
-#define CONFIG_USB_DWC2_REG_ADDR 0x20980000
-#endif
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_SMSC95XX
 #define CONFIG_TFTP_TSIZE
@@ -97,7 +85,6 @@
 #else
 #define CONFIG_PL01X_SERIAL
 #endif
-#define CONFIG_CONS_INDEX              0
 
 /* Console configuration */
 #define CONFIG_SYS_CBSIZE              1024
 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
 #define ENV_DEVICE_SETTINGS \
        "stdin=serial,usbkbd\0" \
-       "stdout=serial,lcd\0" \
-       "stderr=serial,lcd\0"
+       "stdout=serial,vidconsole\0" \
+       "stderr=serial,vidconsole\0"
 
 /*
  * Memory layout for where various images get loaded by boot scripts:
index bd819f1aadd82c4222efcbf29ce843e78a70961d..e676a5acd481a81861aef343c5303c864714056e 100644 (file)
@@ -19,7 +19,6 @@
 
 #include "siemens-am33x-common.h"
 
-#define CONFIG_SYS_MPUCLK      600
 #define RUT_IOCTRL_VAL 0x18b
 #define DDR_PLL_FREQ   303
 
 
 #endif /* CONFIG_SPL_BUILD */
 
-#ifdef CONFIG_SPL_BUILD
-#undef CONFIG_HW_WATCHDOG
-#endif
-
 #if defined(CONFIG_VIDEO)
 #define CONFIG_VIDEO_DA8XX
 #define CONFIG_SPLASH_SCREEN
index 398b3aa34393bdfa71b09edd5e696c3fc549ca36..33487cd86fee38403488bee51e9aed3053ef8777 100644 (file)
 #define CONFIG_PHY_MICREL
 #endif
 
-#if 0                          /* Disable until the I2C driver will be updated */
-
-/* I2C Configs */
-#define CONFIG_CMD_I2C
-#define CONFIG_HARD_I2C
-#define CONFIG_I2C_MXC
-#define CONFIG_SYS_I2C_BASE            I2C0_BASE_ADDR
-#define CONFIG_SYS_I2C_SPEED           100000
-#endif
-
 #if 0                          /* Disable until the FLASH will be implemented */
 #define CONFIG_SYS_USE_NAND
 #endif
index 16bafc0990767bbabc37dd7707717dfd592e9646..7d20d65bf3b1a4ba5572a3ff4a36baa62b5c9408 100644 (file)
@@ -66,8 +66,6 @@
 #define CONFIG_CMD_USB
 
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_ATMEL
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS     3
 #endif
 
index ea28fce6ef8b3c209a19a3283df3caccddd34187..f044f0e6def4880151560ba2778b4785ee7bea88 100644 (file)
 #define CONFIG_SYS_SDRAM_SIZE          0x20000000
 
 #ifdef CONFIG_SPL_BUILD
-#define CONFIG_SYS_INIT_SP_ADDR                0x210000
+#define CONFIG_SYS_INIT_SP_ADDR                0x218000
 #else
 #define CONFIG_SYS_INIT_SP_ADDR \
-       (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE)
+       (CONFIG_SYS_SDRAM_BASE + 16 * 1024 - GENERATED_GBL_DATA_SIZE)
 #endif
 
 #define CONFIG_SYS_LOAD_ADDR           0x22000000 /* load address */
 /* NAND flash */
 #undef CONFIG_CMD_NAND
 
-/* USB device */
-#define CONFIG_USB_ETHER
-#define CONFIG_USB_ETH_RNDIS
-#define CONFIG_USBNET_MANUFACTURER      "Atmel SAMA5D2 XPlained"
-
 /* I2C */
 #define AT24MAC_ADDR           0x5c
 #define AT24MAC_REG            0x9a
 
-/* Ethernet Hardware */
-#define CONFIG_MACB
-#define CONFIG_RMII
-#define CONFIG_NET_RETRY_COUNT         20
-#define CONFIG_MACB_SEARCH_PHY
-
 /* LCD */
 
 #ifdef CONFIG_LCD
@@ -84,7 +73,7 @@
 /* SPL */
 #define CONFIG_SPL_FRAMEWORK
 #define CONFIG_SPL_TEXT_BASE           0x200000
-#define CONFIG_SPL_MAX_SIZE            0x10000
+#define CONFIG_SPL_MAX_SIZE            0x18000
 #define CONFIG_SPL_BSS_START_ADDR      0x20000000
 #define CONFIG_SPL_BSS_MAX_SIZE                0x80000
 #define CONFIG_SYS_SPL_MALLOC_START    0x20080000
 
 #elif CONFIG_SYS_USE_SERIALFLASH
 #define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SYS_SPI_U_BOOT_OFFS     0x8000
+#define CONFIG_SYS_SPI_U_BOOT_OFFS     0x10000
 
 #endif
 
index 207b59118d0bd65f0be7d31a3313652201055b22..afc2c7dfe962c3025abbecc4a952ceb3c1eae912 100644 (file)
@@ -37,7 +37,6 @@
 #define CONFIG_SYS_MMC_ENV_PART 2
 
 /* USB Host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index f5b03caf830b410b283fabe53b0c14e1ec5c12fe..c39bb24420e907da9a44cef46b8ef1a807b6aeb9 100644 (file)
 
 /* USB */
 #ifdef CONFIG_440EPX
-
-#undef CONFIG_USB_EHCI /* OHCI by default */
-
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_EHCI_PPC4XX
 #define CONFIG_SYS_PPC4XX_USB_ADDR     0xe0000300
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_EHCI_MMIO_BIG_ENDIAN
 #define CONFIG_EHCI_DESC_BIG_ENDIAN
-#else /* CONFIG_USB_EHCI */
+#else /* CONFIG_USB_EHCI_HCD */
 #define CONFIG_USB_OHCI_NEW
 #define CONFIG_SYS_OHCI_BE_CONTROLLER
 
diff --git a/include/configs/sfr_nb4_ser.h b/include/configs/sfr_nb4_ser.h
new file mode 100644 (file)
index 0000000..ab64518
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <configs/bmips_common.h>
+#include <configs/bmips_bcm6358.h>
+
+#define CONFIG_REMAKE_ELF
+
+#define CONFIG_ENV_IS_NOWHERE
+#define CONFIG_ENV_SIZE                        (8 * 1024)
+
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_CMDLINE_EDITING
+#define CONFIG_SYS_LONGHELP
+
+#define CONFIG_SYS_FLASH_CFI           1
+#define CONFIG_FLASH_CFI_DRIVER                1
index d69f513c65e69c16df2c424ee1861da8dd04a5aa..5bb471c8f605c4a2f929b5dc6aa6f5fe8ad2d036 100644 (file)
@@ -15,7 +15,6 @@
 #define __CONFIG_SIEMENS_AM33X_COMMON_H
 
 #define CONFIG_AM33XX
-#define CONFIG_OMAP
 
 #include <asm/arch/omap.h>
 
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x20000
 
-#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/u-boot-spl.lds"
 
 #define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_NAND_AM33XX_BCH
 #endif
 #endif
 
-#define CONFIG_OMAP_GPIO
-
-/* Gpio cmd support */
-
-/* Watchdog */
-#define CONFIG_HW_WATCHDOG
-
 /* Reboot after 60 sec if bootcmd fails */
 #define CONFIG_RESET_TO_RETRY
 #define CONFIG_BOOT_RETRY_TIME 60
index 4fc270fcc22ed2b3a8ce05b0e58f37752f0ac9a5..84108fd523541861652cec70e78ccebaed582149 100644 (file)
@@ -82,7 +82,6 @@
 #define CONFIG_SYS_I2C_POWERIC_ADDR    0x58 /* da9063 */
 
 /* USB */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_RMOBILE
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        2
 
index 952c6f546fd7e6f8e4954ec494efc0589637e935..99b5b23d2940b85d670c8ebbb932de2642b2924b 100644 (file)
@@ -61,8 +61,6 @@
 #define CONFIG_TFTP_TSIZE
 
 /* USB */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_ATMEL
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS     2
 
 /* MMC */
index 6ddb83fccda136407d9e497542dcff11c9f4dab5..c56169dcff8102ed1fa8932f81162da7d5525a3d 100644 (file)
 
 #define CONFIG_ARM_ARCH_CP15_ERRATA
 
-/*
- * Platform
- */
-
-#define CONFIG_OMAP
-
 /*
  * Board
  */
 
 #define CONFIG_SYS_MALLOC_LEN          (1024 * 1024 + CONFIG_ENV_SIZE)
 
-/*
- * GPIO
- */
-
-#define CONFIG_OMAP_GPIO
-#define CONFIG_OMAP3_GPIO_2
-#define CONFIG_OMAP3_GPIO_3
-#define CONFIG_OMAP3_GPIO_4
-#define CONFIG_OMAP3_GPIO_5
-#define CONFIG_OMAP3_GPIO_6
-
 /*
  * I2C
  */
 #define CONFIG_SYS_I2C_OMAP34XX
 #define CONFIG_I2C_MULTI_BUS
 
-/*
- * Power
- */
-
-#define CONFIG_TWL4030_POWER
-
 /*
  * Input
  */
index 90258c2f42eb7f1ce54161aa364756eef66b8187..16f3ce86474c3506a0290a7aa49bee442580cfce 100644 (file)
@@ -84,7 +84,6 @@
 #define CONFIG_SYS_TMU_CLK_DIV 4
 
 /* USB */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_RMOBILE
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        3
 
index 3dfd95ad77fa0595f092cb9f258ee5726d67de60..bd349694c6410529c3bb3afcf6adebe000329ea6 100644 (file)
@@ -12,7 +12,7 @@
  * A10 specific configuration
  */
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_EHCI_SUNXI
 #endif
 
index 1b7bfb6c22eb1fadcadd5362561f141ff82ab069..b7b67a1ddc08d95ab78b256ca8311742e7139019 100644 (file)
@@ -11,7 +11,7 @@
  * A64 specific configuration
  */
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_EHCI_SUNXI
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
 #endif
index ec8f3199ba3444a8de7f2590d90ad3fd03803e81..0535d6a7f327bcf3012baee0b973b839cffb7026 100644 (file)
@@ -12,7 +12,7 @@
  * High Level Configuration Options
  */
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_EHCI_SUNXI
 #endif
 
index 6c1eca4d2683c25925d4010993d77b6326bd3d9c..8b9adb1be66b4270b95c1a99b77e0944e4edb313 100644 (file)
@@ -15,7 +15,7 @@
  * A31 specific configuration
  */
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_EHCI_SUNXI
 #endif
 
index 5455901efe3fcc2aaaf75c2885befa09fc8871f1..12c96230c27177a80d8a7130ef72eecac52f0ff1 100644 (file)
@@ -13,7 +13,7 @@
  * A20 specific configuration
  */
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_EHCI_SUNXI
 #endif
 
index 6ac42acaeadd57eab2982a765133d25c4a12c9e7..47f28132407619003072b7aa0604f30329a68723 100644 (file)
@@ -13,7 +13,7 @@
  * A23 specific configuration
  */
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_EHCI_SUNXI
 #endif
 
index b1625b779c1001227b4c7fc5c653b4d19c71d584..34ce122489a0125fdb939ec3a6b39748a820324f 100644 (file)
@@ -13,8 +13,6 @@
 /*
  * High Level Configuration Options
  */
-#define CONFIG_OMAP            /* in a TI OMAP core */
-#define CONFIG_OMAP_GPIO
 
 #define CONFIG_SYS_TEXT_BASE 0x80008000
 
@@ -43,7 +41,6 @@
 /*
  * DDR related
  */
-#define CONFIG_OMAP3_MICRON_DDR                /* Micron DDR */
 #define CONFIG_SYS_CS0_SIZE            (256 * 1024 * 1024)
 
 /*
@@ -69,9 +66,6 @@
 #define CONFIG_SYS_BAUDRATE_TABLE      {4800, 9600, 19200, 38400, 57600,\
                                        115200}
 /* EHCI */
-#define CONFIG_OMAP3_GPIO_5
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_OMAP
 #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO       25
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3
 
 #define CONFIG_DRIVER_TI_EMAC
 #define CONFIG_DRIVER_TI_EMAC_USE_RMII
 #define CONFIG_MII
-#define CONFIG_EMAC_MDIO_PHY_NUM       0
 #define CONFIG_BOOTP_DNS
 #define CONFIG_BOOTP_DNS2
 #define CONFIG_BOOTP_SEND_HOSTNAME
index 109b8e810d24aaeacd906fbd887d1ffb4713f4d7..ae6c768c229517f34f8b9e0404c157f72a1b7a1e 100644 (file)
@@ -16,9 +16,6 @@
 /*
  * High Level Configuration Options
  */
-#define CONFIG_OMAP                    /* in a TI OMAP core */
-
-#define CONFIG_OMAP_GPIO
 
 #define CONFIG_SDRC                    /* Has an SDRC controller */
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
 
-/* GPIO banks */
-#define CONFIG_OMAP3_GPIO_2            /* GPIO32 ..63  is in GPIO bank 2 */
-#define CONFIG_OMAP3_GPIO_3            /* GPIO64 ..95  is in GPIO bank 3 */
-#define CONFIG_OMAP3_GPIO_4            /* GPIO96 ..127 is in GPIO bank 4 */
-#define CONFIG_OMAP3_GPIO_5            /* GPIO128..159 is in GPIO bank 5 */
-#define CONFIG_OMAP3_GPIO_6            /* GPIO160..191 is in GPIO bank 6 */
-
 /* commands to include */
 #define CONFIG_CMD_MTDPARTS    /* Enable MTD parts commands */
 #define CONFIG_MTD_DEVICE      /* needed for mtdparts commands */
@@ -90,7 +80,6 @@
 /*
  * TWL4030
  */
-#define CONFIG_TWL4030_POWER
 #define CONFIG_TWL4030_LED
 
 /*
  */
 
 /* USB EHCI */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_OMAP
 #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO       162
 
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3
index b4a14eae7c4bb6bb4e30a0b24c18fffec4d6a052..9720a09b32339aaef17a03306f1ce69a3abee84f 100644 (file)
@@ -93,8 +93,6 @@
 
 /* USB */
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_MXC_USB_PORTSC          (PORT_PTS_UTMI | PORT_PTS_PTW)
index 06d8720df2b6990cf28cfdc0b9f430f1c98f8afa..6406d396983d81495e41bfa7b9ef88252a247ebf 100644 (file)
@@ -33,7 +33,6 @@
 #define CONFIG_SPI_FLASH_SIZE          (4 << 20)
 
 /* USB Host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index b380a69bdf751c242ba4620f4a232e46045cde27..8ffdbec9d1e75e76be6a93df4800d9e9ee1aa434 100644 (file)
@@ -29,7 +29,6 @@
 #define CONFIG_ENV_OFFSET              (SZ_512M - SZ_128K) /* 128K sectors */
 
 /* USB host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index ab4136ab1389476428598229f024f38824b65a79..1a4a7e23205aa21c55600dc8e38d6ed090ff06fe 100644 (file)
 #endif
 
 /* remove USB */
-#ifdef CONFIG_USB_EHCI
-#undef CONFIG_USB_EHCI
-#endif
 #ifdef CONFIG_USB_EHCI_TEGRA
 #undef CONFIG_USB_EHCI_TEGRA
 #endif
index 9b73828df6d57fd59ff3557b353982f7c4fcd08d..cea84acd03c1c92f009a6f9aeb9c2e9340ba75dc 100644 (file)
@@ -15,7 +15,6 @@
 
 #include "siemens-am33x-common.h"
 
-#define CONFIG_SYS_MPUCLK      300
 #define DDR_PLL_FREQ   303
 #undef CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC
 
@@ -43,9 +42,6 @@
 
 #define CONFIG_FACTORYSET
 
-/* Watchdog */
-#define CONFIG_OMAP_WATCHDOG
-
 /* Define own nand partitions */
 #define CONFIG_ENV_OFFSET_REDUND    0x2E0000
 #define CONFIG_ENV_SIZE_REDUND      0x2000
index baf818ba1a6776db9174b8c9b4771795cf01ae6d..60322b1938afafc2f05741a4713a9a5c8ea96dca 100644 (file)
@@ -18,7 +18,6 @@
 
 #define CONFIG_TI81XX
 #define CONFIG_TI814X
-#define CONFIG_OMAP
 
 #include <asm/arch/omap.h>
 
 
 #define CONFIG_SYS_LOAD_ADDR           0x81000000      /* Default */
 
-#define CONFIG_OMAP_GPIO
-
 /**
  * Physical Memory Map
  */
index b7ec200e06846a74c1671e16987aee81697e0520..51b09d4b56160d3198e4db4a1e92399605171122 100644 (file)
@@ -12,7 +12,6 @@
 
 #define CONFIG_TI81XX
 #define CONFIG_TI816X
-#define CONFIG_OMAP
 
 #define CONFIG_ARCH_CPU_INIT
 
@@ -50,7 +49,6 @@
 #define CONFIG_SYS_LOAD_ADDR           0x81000000 /* Default load address */
 
 #define CONFIG_CMD_ASKENV
-#define CONFIG_OMAP_GPIO
 
 #define CONFIG_FS_FAT
 
index c0e4336eb07ff4fbe86b8e0cbc3a7ce9c1f6b86d..bf44121a0fe6f5331b9504dbe1af77e8c9c684ab 100644 (file)
 /* NS16550 Configuration */
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_SYS_NS16550_SERIAL
+#ifndef CONFIG_DM_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE    (-4)
 #endif
+#endif
 #define CONFIG_SYS_NS16550_CLK         48000000
 
 #ifndef CONFIG_SPL_BUILD
  */
 #define CONFIG_SYS_BOOTCOUNT_ADDR      0x44E3E000
 
-/* Enable the HW watchdog, since we can use this with bootcount */
-#define CONFIG_HW_WATCHDOG
-#define CONFIG_OMAP_WATCHDOG
-
 /*
  * SPL related defines.  The Public RAM memory map the ROM defines the
  * area between 0x402F0400 and 0x4030B800 as a download area and
index de14b8575addd01dd1d3cb67a330ecb7a409bec5..b4565daf41ced561e4594b3c91c83def969c951b 100644 (file)
@@ -12,9 +12,6 @@
 #ifndef __CONFIG_TI_ARMV7_OMAP_H__
 #define __CONFIG_TI_ARMV7_OMAP_H__
 
-/* Common defines for all OMAP architecture based SoCs */
-#define CONFIG_OMAP
-
 /* I2C IP block */
 #define CONFIG_SYS_OMAP24_I2C_SPEED    100000
 #define CONFIG_SYS_OMAP24_I2C_SLAVE    1
@@ -23,9 +20,6 @@
 /* SPI IP Block */
 #define CONFIG_OMAP3_SPI
 
-/* GPIO block */
-#define CONFIG_OMAP_GPIO
-
 /*
  * GPMC NAND block.  We support 1 device and the physical address to
  * access CS0 at is 0x8000000.
index 0147662f443dd9719d2904e7d7ef2b222d3041ac..393d867a73360870539ae78a6b9ad5a70b81ede9 100644 (file)
@@ -58,9 +58,6 @@
 
 #define CONFIG_SYS_MONITOR_LEN         (256 << 10)
 
-/* TWL4030 */
-#define CONFIG_TWL4030_POWER
-
 /* SPL */
 #define CONFIG_SPL_TEXT_BASE           0x40200800
 #define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/u-boot-spl.lds"
index b85db500b574513752d29f82613fc4de805c5e50..1a6551e24d20bde8c89a56e377d04b034df5e86e 100644 (file)
 #ifndef __CONFIG_TI_OMAP4_COMMON_H
 #define __CONFIG_TI_OMAP4_COMMON_H
 
-/*
- * High Level Configuration Options
- */
-#define CONFIG_OMAP4430                1       /* which is in a 4430 */
 #define CONFIG_MISC_INIT_R
 
 #ifndef CONFIG_SYS_L2CACHE_OFF
index 2c05f9c9308f8be06ef286f86df2268475d79636..79e37e2cefb051bcec5b620d0fff8f038ce1a8d5 100644 (file)
@@ -50,8 +50,6 @@
 #define CONFIG_PHY_MICREL_KSZ9021
 
 /* USB Configs */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_MXC_USB_PORT    1
 #define CONFIG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS   0
index e662e65204e30396dba3db188b35530748d3e449..738693c0c008565b4df4ed088d141a26ceb1fe80 100644 (file)
@@ -81,8 +81,6 @@
 #define CONFIG_SYS_FSL_ESDHC_ADDR      0
 
 /* USB Configs */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_SMSC95XX
 #define CONFIG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
index fc70be18df8adb0924148a54e5a7f4aabf0a293b..8fe4165a77f4946ca1a0aef78f38ef7dd78cd1eb 100644 (file)
@@ -16,9 +16,6 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-/* High Level Configuration Options */
-#define CONFIG_OMAP                    /* in a TI OMAP core */
-
 #define CONFIG_MACH_TYPE               MACH_TYPE_TRICORDER
 /*
  * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
 
 /* Hardware drivers */
 
-/* GPIO support */
-#define CONFIG_OMAP_GPIO
-
-/* GPIO banks */
-#define CONFIG_OMAP3_GPIO_2            /* GPIO32..63 are in GPIO bank 2 */
-
-/* LED support */
-
 /* NS16550 Configuration */
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE    (-4)
@@ -82,7 +71,6 @@
 #define CONFIG_SYS_EEPROM_BUS_NUM      1
 
 /* TWL4030 */
-#define CONFIG_TWL4030_POWER
 #define CONFIG_TWL4030_LED
 
 /* Board NAND Info */
index 2c37107a3c080279a6c8b5f936665f7fbde7f305..ab9c5c3ab8218fe9c8ea44adadbbf780f8b0106c 100644 (file)
@@ -36,7 +36,6 @@
 #define CONFIG_ENV_OFFSET              (SZ_1M - CONFIG_ENV_SIZE)
 
 /* USB Host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index 30ad241f7ffd127bfbce4c5bb54071e7230b1667..a7de75ec6ff2551bd47d04963645f67ce35d266d 100644 (file)
@@ -45,7 +45,4 @@
 #define CONFIG_SYS_SPL_ARGS_ADDR       (PHYS_SDRAM_1 + 0x100)
 #define CONFIG_SPL_BOARD_INIT
 
-/* gpio 55 is used as SPL_OS_BOOT_KEY */
-#define CONFIG_OMAP3_GPIO_2
-
 #endif /* __CONFIG_H */
index cdc5b0018a3c0dfbb4aae288cef79a1e21092f49..6271b07766c58891cd1c659a8133ed4908e83b21 100644 (file)
 #define CONFIG_BOOTFILE                        "Image.gz"
 #define LINUXBOOT_CMD                  "booti"
 #define KERNEL_ADDR_LOAD               "kernel_addr_load=0x84200000\0"
-#define KERNEL_ADDR_R                  "kernel_addr_r=0x80080000\0"
+#define KERNEL_ADDR_R                  "kernel_addr_r=0x82080000\0"
 #else
 #define CONFIG_BOOTFILE                        "zImage"
 #define LINUXBOOT_CMD                  "bootz"
                "nand write $loadaddr 0 0x00020000 && " \
                "tftpboot $third_image && " \
                "nand write $loadaddr 0x00020000 0x000e0000\0" \
+       "usbupdate=usb start &&" \
+               "tftpboot $second_image && " \
+               "usb write $loadaddr 0 100 && " \
+               "tftpboot $third_image && " \
+               "usb write $loadaddr 100 700\0" \
        BOOT_IMAGES \
        LINUXBOOT_ENV_SETTINGS
 
index 58b62d2448953bddb10bb650773a28cb7ee99d23..f725b79cd4f873cd9f1e58e9e3fafc16ecb69154 100644 (file)
@@ -41,7 +41,6 @@
 #define CONFIG_SYS_FSL_ESDHC_NUM       1
 
 /* USB */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_MX5
 #define CONFIG_MXC_USB_PORT    1
 #define CONFIG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
index cc0007827d4de7903f9b93b2435bad92e0d905a5..0bc0ae517a2dc697269c8f7c1fc150ec273be564 100644 (file)
  */
 #undef CONFIG_SYS_IPBCLK_EQUALS_XLBCLK                 /* define for 133MHz speed */
 
-/*
- * I2C configuration
- */
-#define CONFIG_HARD_I2C                1       /* I2C with hardware support */
-#define CONFIG_SYS_I2C_MODULE          2       /* Select I2C module #1 or #2 */
-#define CONFIG_SYS_I2C_SPEED           100000  /* 100 kHz */
-#define CONFIG_SYS_I2C_SLAVE           0x7F
-
-/*
- * EEPROM configuration
- */
-#define CONFIG_SYS_I2C_EEPROM_ADDR             0x50    /* 1010000x */
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         1
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      3
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  70
-
-/*
- * RTC configuration
- */
-#define CONFIG_SYS_I2C_RTC_ADDR                0x51
-
 /*
  * Flash configuration - use CFI driver
  */
index 9db6fee6e78ed36ebf42868ad8469486937c3b48..b1dccdf666f546eb59c0aaae4d991c88d78fbb42 100644 (file)
@@ -99,7 +99,6 @@
 /*
  * USB/EHCI
  */
-#define CONFIG_USB_EHCI                        /* Enable EHCI USB support      */
 #define CONFIG_USB_EHCI_VCT            /* on VCT platform              */
 #define CONFIG_EHCI_MMIO_BIG_ENDIAN
 #define CONFIG_EHCI_DESC_BIG_ENDIAN
index 9e83863c0a4c0c7abd5b37d7c9b719ec7dc0294b..850a9bd49a4f298edf0e72c5270ecc71880c193b 100644 (file)
@@ -34,7 +34,6 @@
 #define CONFIG_SPI_FLASH_SIZE          (4 << 20)
 
 /* USB Host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index 0e851a1b10863f36fe64e3dd9bcd9a3c969741b1..1ab6476f3cb673c917053a02c4cbc5d6f58a8618 100644 (file)
@@ -27,7 +27,6 @@
 #define CONFIG_SYS_MMC_ENV_PART 2
 
 /* USB Host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index c146f773dbf2e833f20276e95749176f6b469a9d..dc35b289d42a55de1f0671167173206ffade9e44 100644 (file)
@@ -66,8 +66,6 @@
 /* USB */
 
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_ATMEL
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS     3
 #endif
 
index 9a517a973893327055775aeceb8a10b96340bc6e..78e14b38c113a78108581793f5ebc10c335cae57 100644 (file)
@@ -76,8 +76,6 @@
 #define CONFIG_PHY_ATHEROS
 
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
index 47daf724ab666917fdbae2743b9d79c9e14a398e..3e0ea71e69af90b66fe5a0583a30dd111a990303 100644 (file)
@@ -50,8 +50,6 @@
 #define CONFIG_SYS_FSL_ESDHC_ADDR      0
 
 /* USB Configs */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        2
 #define CONFIG_MXC_USB_PORTSC          (PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS           0
index 5274b274a41894f149dc836732a003e2e3282474..afe3eaed46d1c5f74b2ca36a159222162a76251f 100644 (file)
@@ -58,8 +58,6 @@
 
 /* USB Configs */
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_MXC_USB_PORTSC          (PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS           0
index 429e5b6a3208d1c5cd02fda4188d5b753776b785..9f350d556a6fe2b85cf784d301c112854b0290a0 100644 (file)
@@ -36,7 +36,6 @@
 #define CONFIG_SYS_MMC_ENV_PART 2
 
 /* USB Host support */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 
 /* USB networking support */
index 6e52e56222628ba1939cc5283486582a79211e53..bf6fafce980b65f67c7ca84db19db05d9ef8ee02 100644 (file)
 #define CONFIG_FPGA_COUNT      1
 
 /* USB EHCI options */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_SPEAR
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        2
 
index 653a30d3bd069d34fd908c366469a7b464d10d00..29be55a840015ef9c7b84349d27d778921797ad1 100644 (file)
 /*-----------------------------------------------------------------------
  * USB configuration
  */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_PCI
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS     12
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        2
index 2793a9bfb962ca155261f9a243b1a8cf29deb1bb..ad4247ab48baeb9c801cbd874672aa5cc979d3f9 100644 (file)
@@ -332,7 +332,6 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 /*
  * USB
  */
-#define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 
index e3ae4e8f7455f231d35c03730d3ac1e10c5419c7..e13b792f38679eb911e8c17fc48b1c0bb1675c26 100644 (file)
@@ -64,8 +64,6 @@
 #define CONFIG_MMCROOT                 "/dev/mmcblk0p2"  /* USDHC2 */
 
 /* USB Configs */
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_MXC_USB_PORTSC          (PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS           0
index c61c353901ffd729872d7c71d4bb9e4a47b4fd5d..c1daf65621324678495cda4d19fb3d7c5cab8e87 100644 (file)
@@ -82,7 +82,6 @@
  * USB
  */
 #ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI                        /* Enable EHCI USB support */
 #define CONFIG_USB_EHCI_MXC
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_MXC_USB_PORT    1
index 2980ae6200f25949c75a32e834b0329ae3020471..6f0b0c5e1575a0fabd81cea633d6b3daad5a7e8a 100644 (file)
@@ -111,6 +111,17 @@ void printhex8(uint value);
 #define _DEBUG_UART_ANNOUNCE
 #endif
 
+#define serial_dout(reg, value)        \
+       serial_out_shift((char *)com_port + \
+               ((char *)reg - (char *)com_port) * \
+                       (1 << CONFIG_DEBUG_UART_SHIFT), \
+               CONFIG_DEBUG_UART_SHIFT, value)
+#define serial_din(reg) \
+       serial_in_shift((char *)com_port + \
+               ((char *)reg - (char *)com_port) * \
+                       (1 << CONFIG_DEBUG_UART_SHIFT), \
+               CONFIG_DEBUG_UART_SHIFT)
+
 /*
  * Now define some functions - this should be inserted into the serial driver
  */
index 079ec5700302657b16b9eb094e0ec609a95b6801..df02e41df3d3007cbdece2cb26092ce7a3c685b1 100644 (file)
@@ -54,6 +54,12 @@ struct driver_info;
  */
 #define DM_FLAG_ACTIVE_DMA             (1 << 9)
 
+/*
+ * Call driver remove function to do some final configuration, before
+ * U-Boot exits and the OS is started
+ */
+#define DM_FLAG_OS_PREPARE             (1 << 10)
+
 /*
  * One or multiple of these flags are passed to device_remove() so that
  * a selective device removal as specified by the remove-stage and the
@@ -66,10 +72,13 @@ enum {
        /* Remove devices with active DMA */
        DM_REMOVE_ACTIVE_DMA = DM_FLAG_ACTIVE_DMA,
 
+       /* Remove devices which need some final OS preparation steps */
+       DM_REMOVE_OS_PREPARE = DM_FLAG_OS_PREPARE,
+
        /* Add more use cases here */
 
        /* Remove devices with any active flag */
-       DM_REMOVE_ACTIVE_ALL = DM_REMOVE_ACTIVE_DMA,
+       DM_REMOVE_ACTIVE_ALL = DM_REMOVE_ACTIVE_DMA | DM_REMOVE_OS_PREPARE,
 };
 
 /**
index 4e7cc935bd2d2784ab319b47b404f275e129c601..1f7e32c31ff16872d42e7cdb83bed785a9996674 100644 (file)
@@ -56,6 +56,7 @@ enum uclass_id {
        UCLASS_PCH,             /* x86 platform controller hub */
        UCLASS_PCI,             /* PCI bus */
        UCLASS_PCI_GENERIC,     /* Generic PCI bus device */
+       UCLASS_PHY,             /* Physical Layer (PHY) device */
        UCLASS_PINCONFIG,       /* Pin configuration node device */
        UCLASS_PINCTRL,         /* Pinctrl (pin muxing/configuration) device */
        UCLASS_PMIC,            /* PMIC I/O device */
diff --git a/include/dt-bindings/clock/bcm63268-clock.h b/include/dt-bindings/clock/bcm63268-clock.h
new file mode 100644 (file)
index 0000000..23818da
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * Derived from linux/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __DT_BINDINGS_CLOCK_BCM63268_H
+#define __DT_BINDINGS_CLOCK_BCM63268_H
+
+#define BCM63268_CLK_GLESS     0
+#define BCM63268_CLK_VDSL_QPROC        1
+#define BCM63268_CLK_VDSL_AFE  2
+#define BCM63268_CLK_VDSL      3
+#define BCM63268_CLK_MIPS      4
+#define BCM63268_CLK_WLAN_OCP  5
+#define BCM63268_CLK_DECT      6
+#define BCM63268_CLK_FAP0      7
+#define BCM63268_CLK_FAP1      8
+#define BCM63268_CLK_SAR       9
+#define BCM63268_CLK_ROBOSW    10
+#define BCM63268_CLK_PCM       11
+#define BCM63268_CLK_USBD      12
+#define BCM63268_CLK_USBH      13
+#define BCM63268_CLK_IPSEC     14
+#define BCM63268_CLK_SPI       15
+#define BCM63268_CLK_HSSPI     16
+#define BCM63268_CLK_PCIE      17
+#define BCM63268_CLK_PHYMIPS   18
+#define BCM63268_CLK_GMAC      19
+#define BCM63268_CLK_NAND      20
+#define BCM63268_CLK_TBUS      27
+#define BCM63268_CLK_ROBOSW250 31
+
+#define BCM63268_TCLK_EPHY1    0
+#define BCM63268_TCLK_EPHY2    1
+#define BCM63268_TCLK_EPHY3    2
+#define BCM63268_TCLK_GPHY     3
+#define BCM63268_TCLK_DSL      4
+#define BCM63268_TCLK_WO_EPHY  5
+#define BCM63268_TCLK_WO_DSL   6
+#define BCM63268_TCLK_FAP1     11
+#define BCM63268_TCLK_FAP2     15
+#define BCM63268_TCLK_UTO_50   16
+#define BCM63268_TCLK_UTO_EXT  17
+#define BCM63268_TCLK_USB_REF  18
+#define BCM63268_TCLK_SW_RST   29
+#define BCM63268_TCLK_HW_RST   30
+#define BCM63268_TCLK_POR_RST  31
+
+#endif /* __DT_BINDINGS_CLOCK_BCM63268_H */
diff --git a/include/dt-bindings/clock/bcm6328-clock.h b/include/dt-bindings/clock/bcm6328-clock.h
new file mode 100644 (file)
index 0000000..5d0fc11
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * Derived from linux/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __DT_BINDINGS_CLOCK_BCM6328_H
+#define __DT_BINDINGS_CLOCK_BCM6328_H
+
+#define BCM6328_CLK_PHYMIPS    0
+#define BCM6328_CLK_ADSL_QPROC 1
+#define BCM6328_CLK_ADSL_AFE   2
+#define BCM6328_CLK_ADSL       3
+#define BCM6328_CLK_MIPS       4
+#define BCM6328_CLK_SAR                5
+#define BCM6328_CLK_PCM                6
+#define BCM6328_CLK_USBD       7
+#define BCM6328_CLK_USBH       8
+#define BCM6328_CLK_HSSPI      9
+#define BCM6328_CLK_PCIE       10
+#define BCM6328_CLK_ROBOSW     11
+
+#endif /* __DT_BINDINGS_CLOCK_BCM6328_H */
diff --git a/include/dt-bindings/clock/bcm6358-clock.h b/include/dt-bindings/clock/bcm6358-clock.h
new file mode 100644 (file)
index 0000000..ff22321
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * Derived from linux/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __DT_BINDINGS_CLOCK_BCM6358_H
+#define __DT_BINDINGS_CLOCK_BCM6358_H
+
+#define BCM6358_CLK_ENET       4
+#define BCM6358_CLK_ADSL       5
+#define BCM6358_CLK_PCM                8
+#define BCM6358_CLK_SPI                9
+#define BCM6358_CLK_USBS       10
+#define BCM6358_CLK_SAR                11
+#define BCM6358_CLK_EMUSB      17
+#define BCM6358_CLK_ENET0      18
+#define BCM6358_CLK_ENET1      19
+#define BCM6358_CLK_USBSU      20
+#define BCM6358_CLK_EPHY       21
+
+#endif /* __DT_BINDINGS_CLOCK_BCM6358_H */
diff --git a/include/dt-bindings/clock/imx7d-clock.h b/include/dt-bindings/clock/imx7d-clock.h
new file mode 100644 (file)
index 0000000..a7a1a50
--- /dev/null
@@ -0,0 +1,454 @@
+/*
+ * Copyright (C) 2014-2015 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#ifndef __DT_BINDINGS_CLOCK_IMX7D_H
+#define __DT_BINDINGS_CLOCK_IMX7D_H
+
+#define IMX7D_OSC_24M_CLK              0
+#define IMX7D_PLL_ARM_MAIN             1
+#define IMX7D_PLL_ARM_MAIN_CLK         2
+#define IMX7D_PLL_ARM_MAIN_SRC         3
+#define IMX7D_PLL_ARM_MAIN_BYPASS      4
+#define IMX7D_PLL_SYS_MAIN             5
+#define IMX7D_PLL_SYS_MAIN_CLK         6
+#define IMX7D_PLL_SYS_MAIN_SRC         7
+#define IMX7D_PLL_SYS_MAIN_BYPASS      8
+#define IMX7D_PLL_SYS_MAIN_480M                9
+#define IMX7D_PLL_SYS_MAIN_240M                10
+#define IMX7D_PLL_SYS_MAIN_120M                11
+#define IMX7D_PLL_SYS_MAIN_480M_CLK    12
+#define IMX7D_PLL_SYS_MAIN_240M_CLK    13
+#define IMX7D_PLL_SYS_MAIN_120M_CLK    14
+#define IMX7D_PLL_SYS_PFD0_392M_CLK    15
+#define IMX7D_PLL_SYS_PFD0_196M                16
+#define IMX7D_PLL_SYS_PFD0_196M_CLK    17
+#define IMX7D_PLL_SYS_PFD1_332M_CLK    18
+#define IMX7D_PLL_SYS_PFD1_166M                19
+#define IMX7D_PLL_SYS_PFD1_166M_CLK    20
+#define IMX7D_PLL_SYS_PFD2_270M_CLK    21
+#define IMX7D_PLL_SYS_PFD2_135M                22
+#define IMX7D_PLL_SYS_PFD2_135M_CLK    23
+#define IMX7D_PLL_SYS_PFD3_CLK         24
+#define IMX7D_PLL_SYS_PFD4_CLK         25
+#define IMX7D_PLL_SYS_PFD5_CLK         26
+#define IMX7D_PLL_SYS_PFD6_CLK         27
+#define IMX7D_PLL_SYS_PFD7_CLK         28
+#define IMX7D_PLL_ENET_MAIN            29
+#define IMX7D_PLL_ENET_MAIN_CLK                30
+#define IMX7D_PLL_ENET_MAIN_SRC                31
+#define IMX7D_PLL_ENET_MAIN_BYPASS     32
+#define IMX7D_PLL_ENET_MAIN_500M       33
+#define IMX7D_PLL_ENET_MAIN_250M       34
+#define IMX7D_PLL_ENET_MAIN_125M       35
+#define IMX7D_PLL_ENET_MAIN_100M       36
+#define IMX7D_PLL_ENET_MAIN_50M                37
+#define IMX7D_PLL_ENET_MAIN_40M                38
+#define IMX7D_PLL_ENET_MAIN_25M                39
+#define IMX7D_PLL_ENET_MAIN_500M_CLK   40
+#define IMX7D_PLL_ENET_MAIN_250M_CLK   41
+#define IMX7D_PLL_ENET_MAIN_125M_CLK   42
+#define IMX7D_PLL_ENET_MAIN_100M_CLK   43
+#define IMX7D_PLL_ENET_MAIN_50M_CLK    44
+#define IMX7D_PLL_ENET_MAIN_40M_CLK    45
+#define IMX7D_PLL_ENET_MAIN_25M_CLK    46
+#define IMX7D_PLL_DRAM_MAIN            47
+#define IMX7D_PLL_DRAM_MAIN_CLK                48
+#define IMX7D_PLL_DRAM_MAIN_SRC                49
+#define IMX7D_PLL_DRAM_MAIN_BYPASS     50
+#define IMX7D_PLL_DRAM_MAIN_533M       51
+#define IMX7D_PLL_DRAM_MAIN_533M_CLK   52
+#define IMX7D_PLL_AUDIO_MAIN           53
+#define IMX7D_PLL_AUDIO_MAIN_CLK       54
+#define IMX7D_PLL_AUDIO_MAIN_SRC       55
+#define IMX7D_PLL_AUDIO_MAIN_BYPASS    56
+#define IMX7D_PLL_VIDEO_MAIN_CLK       57
+#define IMX7D_PLL_VIDEO_MAIN           58
+#define IMX7D_PLL_VIDEO_MAIN_SRC       59
+#define IMX7D_PLL_VIDEO_MAIN_BYPASS    60
+#define IMX7D_USB_MAIN_480M_CLK                61
+#define IMX7D_ARM_A7_ROOT_CLK          62
+#define IMX7D_ARM_A7_ROOT_SRC          63
+#define IMX7D_ARM_A7_ROOT_CG           64
+#define IMX7D_ARM_A7_ROOT_DIV          65
+#define IMX7D_ARM_M4_ROOT_CLK          66
+#define IMX7D_ARM_M4_ROOT_SRC          67
+#define IMX7D_ARM_M4_ROOT_CG           68
+#define IMX7D_ARM_M4_ROOT_DIV          69
+#define IMX7D_ARM_M0_ROOT_CLK          70
+#define IMX7D_ARM_M0_ROOT_SRC          71
+#define IMX7D_ARM_M0_ROOT_CG           72
+#define IMX7D_ARM_M0_ROOT_DIV          73
+#define IMX7D_MAIN_AXI_ROOT_CLK                74
+#define IMX7D_MAIN_AXI_ROOT_SRC                75
+#define IMX7D_MAIN_AXI_ROOT_CG         76
+#define IMX7D_MAIN_AXI_ROOT_DIV                77
+#define IMX7D_DISP_AXI_ROOT_CLK                78
+#define IMX7D_DISP_AXI_ROOT_SRC                79
+#define IMX7D_DISP_AXI_ROOT_CG         80
+#define IMX7D_DISP_AXI_ROOT_DIV                81
+#define IMX7D_ENET_AXI_ROOT_CLK                82
+#define IMX7D_ENET_AXI_ROOT_SRC                83
+#define IMX7D_ENET_AXI_ROOT_CG         84
+#define IMX7D_ENET_AXI_ROOT_DIV                85
+#define IMX7D_NAND_USDHC_BUS_ROOT_CLK  86
+#define IMX7D_NAND_USDHC_BUS_ROOT_SRC  87
+#define IMX7D_NAND_USDHC_BUS_ROOT_CG   88
+#define IMX7D_NAND_USDHC_BUS_ROOT_DIV  89
+#define IMX7D_AHB_CHANNEL_ROOT_CLK     90
+#define IMX7D_AHB_CHANNEL_ROOT_SRC     91
+#define IMX7D_AHB_CHANNEL_ROOT_CG      92
+#define IMX7D_AHB_CHANNEL_ROOT_DIV     93
+#define IMX7D_DRAM_PHYM_ROOT_CLK       94
+#define IMX7D_DRAM_PHYM_ROOT_SRC       95
+#define IMX7D_DRAM_PHYM_ROOT_CG                96
+#define IMX7D_DRAM_PHYM_ROOT_DIV       97
+#define IMX7D_DRAM_ROOT_CLK            98
+#define IMX7D_DRAM_ROOT_SRC            99
+#define IMX7D_DRAM_ROOT_CG             100
+#define IMX7D_DRAM_ROOT_DIV            101
+#define IMX7D_DRAM_PHYM_ALT_ROOT_CLK   102
+#define IMX7D_DRAM_PHYM_ALT_ROOT_SRC   103
+#define IMX7D_DRAM_PHYM_ALT_ROOT_CG    104
+#define IMX7D_DRAM_PHYM_ALT_ROOT_DIV   105
+#define IMX7D_DRAM_ALT_ROOT_CLK                106
+#define IMX7D_DRAM_ALT_ROOT_SRC                107
+#define IMX7D_DRAM_ALT_ROOT_CG         108
+#define IMX7D_DRAM_ALT_ROOT_DIV                109
+#define IMX7D_USB_HSIC_ROOT_CLK                110
+#define IMX7D_USB_HSIC_ROOT_SRC                111
+#define IMX7D_USB_HSIC_ROOT_CG         112
+#define IMX7D_USB_HSIC_ROOT_DIV                113
+#define IMX7D_PCIE_CTRL_ROOT_CLK       114
+#define IMX7D_PCIE_CTRL_ROOT_SRC       115
+#define IMX7D_PCIE_CTRL_ROOT_CG                116
+#define IMX7D_PCIE_CTRL_ROOT_DIV       117
+#define IMX7D_PCIE_PHY_ROOT_CLK                118
+#define IMX7D_PCIE_PHY_ROOT_SRC                119
+#define IMX7D_PCIE_PHY_ROOT_CG         120
+#define IMX7D_PCIE_PHY_ROOT_DIV                121
+#define IMX7D_EPDC_PIXEL_ROOT_CLK      122
+#define IMX7D_EPDC_PIXEL_ROOT_SRC      123
+#define IMX7D_EPDC_PIXEL_ROOT_CG       124
+#define IMX7D_EPDC_PIXEL_ROOT_DIV      125
+#define IMX7D_LCDIF_PIXEL_ROOT_CLK     126
+#define IMX7D_LCDIF_PIXEL_ROOT_SRC     127
+#define IMX7D_LCDIF_PIXEL_ROOT_CG      128
+#define IMX7D_LCDIF_PIXEL_ROOT_DIV     129
+#define IMX7D_MIPI_DSI_ROOT_CLK                130
+#define IMX7D_MIPI_DSI_ROOT_SRC                131
+#define IMX7D_MIPI_DSI_ROOT_CG         132
+#define IMX7D_MIPI_DSI_ROOT_DIV                133
+#define IMX7D_MIPI_CSI_ROOT_CLK                134
+#define IMX7D_MIPI_CSI_ROOT_SRC                135
+#define IMX7D_MIPI_CSI_ROOT_CG         136
+#define IMX7D_MIPI_CSI_ROOT_DIV                137
+#define IMX7D_MIPI_DPHY_ROOT_CLK       138
+#define IMX7D_MIPI_DPHY_ROOT_SRC       139
+#define IMX7D_MIPI_DPHY_ROOT_CG                140
+#define IMX7D_MIPI_DPHY_ROOT_DIV       141
+#define IMX7D_SAI1_ROOT_CLK            142
+#define IMX7D_SAI1_ROOT_SRC            143
+#define IMX7D_SAI1_ROOT_CG             144
+#define IMX7D_SAI1_ROOT_DIV            145
+#define IMX7D_SAI2_ROOT_CLK            146
+#define IMX7D_SAI2_ROOT_SRC            147
+#define IMX7D_SAI2_ROOT_CG             148
+#define IMX7D_SAI2_ROOT_DIV            149
+#define IMX7D_SAI3_ROOT_CLK            150
+#define IMX7D_SAI3_ROOT_SRC            151
+#define IMX7D_SAI3_ROOT_CG             152
+#define IMX7D_SAI3_ROOT_DIV            153
+#define IMX7D_SPDIF_ROOT_CLK           154
+#define IMX7D_SPDIF_ROOT_SRC           155
+#define IMX7D_SPDIF_ROOT_CG            156
+#define IMX7D_SPDIF_ROOT_DIV           157
+#define IMX7D_ENET1_REF_ROOT_CLK       158
+#define IMX7D_ENET1_REF_ROOT_SRC       159
+#define IMX7D_ENET1_REF_ROOT_CG                160
+#define IMX7D_ENET1_REF_ROOT_DIV       161
+#define IMX7D_ENET1_TIME_ROOT_CLK      162
+#define IMX7D_ENET1_TIME_ROOT_SRC      163
+#define IMX7D_ENET1_TIME_ROOT_CG       164
+#define IMX7D_ENET1_TIME_ROOT_DIV      165
+#define IMX7D_ENET2_REF_ROOT_CLK       166
+#define IMX7D_ENET2_REF_ROOT_SRC       167
+#define IMX7D_ENET2_REF_ROOT_CG                168
+#define IMX7D_ENET2_REF_ROOT_DIV       169
+#define IMX7D_ENET2_TIME_ROOT_CLK      170
+#define IMX7D_ENET2_TIME_ROOT_SRC      171
+#define IMX7D_ENET2_TIME_ROOT_CG       172
+#define IMX7D_ENET2_TIME_ROOT_DIV      173
+#define IMX7D_ENET_PHY_REF_ROOT_CLK    174
+#define IMX7D_ENET_PHY_REF_ROOT_SRC    175
+#define IMX7D_ENET_PHY_REF_ROOT_CG     176
+#define IMX7D_ENET_PHY_REF_ROOT_DIV    177
+#define IMX7D_EIM_ROOT_CLK             178
+#define IMX7D_EIM_ROOT_SRC             179
+#define IMX7D_EIM_ROOT_CG              180
+#define IMX7D_EIM_ROOT_DIV             181
+#define IMX7D_NAND_ROOT_CLK            182
+#define IMX7D_NAND_ROOT_SRC            183
+#define IMX7D_NAND_ROOT_CG             184
+#define IMX7D_NAND_ROOT_DIV            185
+#define IMX7D_QSPI_ROOT_CLK            186
+#define IMX7D_QSPI_ROOT_SRC            187
+#define IMX7D_QSPI_ROOT_CG             188
+#define IMX7D_QSPI_ROOT_DIV            189
+#define IMX7D_USDHC1_ROOT_CLK          190
+#define IMX7D_USDHC1_ROOT_SRC          191
+#define IMX7D_USDHC1_ROOT_CG           192
+#define IMX7D_USDHC1_ROOT_DIV          193
+#define IMX7D_USDHC2_ROOT_CLK          194
+#define IMX7D_USDHC2_ROOT_SRC          195
+#define IMX7D_USDHC2_ROOT_CG           196
+#define IMX7D_USDHC2_ROOT_DIV          197
+#define IMX7D_USDHC3_ROOT_CLK          198
+#define IMX7D_USDHC3_ROOT_SRC          199
+#define IMX7D_USDHC3_ROOT_CG           200
+#define IMX7D_USDHC3_ROOT_DIV          201
+#define IMX7D_CAN1_ROOT_CLK            202
+#define IMX7D_CAN1_ROOT_SRC            203
+#define IMX7D_CAN1_ROOT_CG             204
+#define IMX7D_CAN1_ROOT_DIV            205
+#define IMX7D_CAN2_ROOT_CLK            206
+#define IMX7D_CAN2_ROOT_SRC            207
+#define IMX7D_CAN2_ROOT_CG             208
+#define IMX7D_CAN2_ROOT_DIV            209
+#define IMX7D_I2C1_ROOT_CLK            210
+#define IMX7D_I2C1_ROOT_SRC            211
+#define IMX7D_I2C1_ROOT_CG             212
+#define IMX7D_I2C1_ROOT_DIV            213
+#define IMX7D_I2C2_ROOT_CLK            214
+#define IMX7D_I2C2_ROOT_SRC            215
+#define IMX7D_I2C2_ROOT_CG             216
+#define IMX7D_I2C2_ROOT_DIV            217
+#define IMX7D_I2C3_ROOT_CLK            218
+#define IMX7D_I2C3_ROOT_SRC            219
+#define IMX7D_I2C3_ROOT_CG             220
+#define IMX7D_I2C3_ROOT_DIV            221
+#define IMX7D_I2C4_ROOT_CLK            222
+#define IMX7D_I2C4_ROOT_SRC            223
+#define IMX7D_I2C4_ROOT_CG             224
+#define IMX7D_I2C4_ROOT_DIV            225
+#define IMX7D_UART1_ROOT_CLK           226
+#define IMX7D_UART1_ROOT_SRC           227
+#define IMX7D_UART1_ROOT_CG            228
+#define IMX7D_UART1_ROOT_DIV           229
+#define IMX7D_UART2_ROOT_CLK           230
+#define IMX7D_UART2_ROOT_SRC           231
+#define IMX7D_UART2_ROOT_CG            232
+#define IMX7D_UART2_ROOT_DIV           233
+#define IMX7D_UART3_ROOT_CLK           234
+#define IMX7D_UART3_ROOT_SRC           235
+#define IMX7D_UART3_ROOT_CG            236
+#define IMX7D_UART3_ROOT_DIV           237
+#define IMX7D_UART4_ROOT_CLK           238
+#define IMX7D_UART4_ROOT_SRC           239
+#define IMX7D_UART4_ROOT_CG            240
+#define IMX7D_UART4_ROOT_DIV           241
+#define IMX7D_UART5_ROOT_CLK           242
+#define IMX7D_UART5_ROOT_SRC           243
+#define IMX7D_UART5_ROOT_CG            244
+#define IMX7D_UART5_ROOT_DIV           245
+#define IMX7D_UART6_ROOT_CLK           246
+#define IMX7D_UART6_ROOT_SRC           247
+#define IMX7D_UART6_ROOT_CG            248
+#define IMX7D_UART6_ROOT_DIV           249
+#define IMX7D_UART7_ROOT_CLK           250
+#define IMX7D_UART7_ROOT_SRC           251
+#define IMX7D_UART7_ROOT_CG            252
+#define IMX7D_UART7_ROOT_DIV           253
+#define IMX7D_ECSPI1_ROOT_CLK          254
+#define IMX7D_ECSPI1_ROOT_SRC          255
+#define IMX7D_ECSPI1_ROOT_CG           256
+#define IMX7D_ECSPI1_ROOT_DIV          257
+#define IMX7D_ECSPI2_ROOT_CLK          258
+#define IMX7D_ECSPI2_ROOT_SRC          259
+#define IMX7D_ECSPI2_ROOT_CG           260
+#define IMX7D_ECSPI2_ROOT_DIV          261
+#define IMX7D_ECSPI3_ROOT_CLK          262
+#define IMX7D_ECSPI3_ROOT_SRC          263
+#define IMX7D_ECSPI3_ROOT_CG           264
+#define IMX7D_ECSPI3_ROOT_DIV          265
+#define IMX7D_ECSPI4_ROOT_CLK          266
+#define IMX7D_ECSPI4_ROOT_SRC          267
+#define IMX7D_ECSPI4_ROOT_CG           268
+#define IMX7D_ECSPI4_ROOT_DIV          269
+#define IMX7D_PWM1_ROOT_CLK            270
+#define IMX7D_PWM1_ROOT_SRC            271
+#define IMX7D_PWM1_ROOT_CG             272
+#define IMX7D_PWM1_ROOT_DIV            273
+#define IMX7D_PWM2_ROOT_CLK            274
+#define IMX7D_PWM2_ROOT_SRC            275
+#define IMX7D_PWM2_ROOT_CG             276
+#define IMX7D_PWM2_ROOT_DIV            277
+#define IMX7D_PWM3_ROOT_CLK            278
+#define IMX7D_PWM3_ROOT_SRC            279
+#define IMX7D_PWM3_ROOT_CG             280
+#define IMX7D_PWM3_ROOT_DIV            281
+#define IMX7D_PWM4_ROOT_CLK            282
+#define IMX7D_PWM4_ROOT_SRC            283
+#define IMX7D_PWM4_ROOT_CG             284
+#define IMX7D_PWM4_ROOT_DIV            285
+#define IMX7D_FLEXTIMER1_ROOT_CLK      286
+#define IMX7D_FLEXTIMER1_ROOT_SRC      287
+#define IMX7D_FLEXTIMER1_ROOT_CG       288
+#define IMX7D_FLEXTIMER1_ROOT_DIV      289
+#define IMX7D_FLEXTIMER2_ROOT_CLK      290
+#define IMX7D_FLEXTIMER2_ROOT_SRC      291
+#define IMX7D_FLEXTIMER2_ROOT_CG       292
+#define IMX7D_FLEXTIMER2_ROOT_DIV      293
+#define IMX7D_SIM1_ROOT_CLK            294
+#define IMX7D_SIM1_ROOT_SRC            295
+#define IMX7D_SIM1_ROOT_CG             296
+#define IMX7D_SIM1_ROOT_DIV            297
+#define IMX7D_SIM2_ROOT_CLK            298
+#define IMX7D_SIM2_ROOT_SRC            299
+#define IMX7D_SIM2_ROOT_CG             300
+#define IMX7D_SIM2_ROOT_DIV            301
+#define IMX7D_GPT1_ROOT_CLK            302
+#define IMX7D_GPT1_ROOT_SRC            303
+#define IMX7D_GPT1_ROOT_CG             304
+#define IMX7D_GPT1_ROOT_DIV            305
+#define IMX7D_GPT2_ROOT_CLK            306
+#define IMX7D_GPT2_ROOT_SRC            307
+#define IMX7D_GPT2_ROOT_CG             308
+#define IMX7D_GPT2_ROOT_DIV            309
+#define IMX7D_GPT3_ROOT_CLK            310
+#define IMX7D_GPT3_ROOT_SRC            311
+#define IMX7D_GPT3_ROOT_CG             312
+#define IMX7D_GPT3_ROOT_DIV            313
+#define IMX7D_GPT4_ROOT_CLK            314
+#define IMX7D_GPT4_ROOT_SRC            315
+#define IMX7D_GPT4_ROOT_CG             316
+#define IMX7D_GPT4_ROOT_DIV            317
+#define IMX7D_TRACE_ROOT_CLK           318
+#define IMX7D_TRACE_ROOT_SRC           319
+#define IMX7D_TRACE_ROOT_CG            320
+#define IMX7D_TRACE_ROOT_DIV           321
+#define IMX7D_WDOG1_ROOT_CLK           322
+#define IMX7D_WDOG_ROOT_SRC            323
+#define IMX7D_WDOG_ROOT_CG             324
+#define IMX7D_WDOG_ROOT_DIV            325
+#define IMX7D_CSI_MCLK_ROOT_CLK                326
+#define IMX7D_CSI_MCLK_ROOT_SRC                327
+#define IMX7D_CSI_MCLK_ROOT_CG         328
+#define IMX7D_CSI_MCLK_ROOT_DIV                329
+#define IMX7D_AUDIO_MCLK_ROOT_CLK      330
+#define IMX7D_AUDIO_MCLK_ROOT_SRC      331
+#define IMX7D_AUDIO_MCLK_ROOT_CG       332
+#define IMX7D_AUDIO_MCLK_ROOT_DIV      333
+#define IMX7D_WRCLK_ROOT_CLK           334
+#define IMX7D_WRCLK_ROOT_SRC           335
+#define IMX7D_WRCLK_ROOT_CG            336
+#define IMX7D_WRCLK_ROOT_DIV           337
+#define IMX7D_CLKO1_ROOT_SRC           338
+#define IMX7D_CLKO1_ROOT_CG            339
+#define IMX7D_CLKO1_ROOT_DIV           340
+#define IMX7D_CLKO2_ROOT_SRC           341
+#define IMX7D_CLKO2_ROOT_CG            342
+#define IMX7D_CLKO2_ROOT_DIV           343
+#define IMX7D_MAIN_AXI_ROOT_PRE_DIV    344
+#define IMX7D_DISP_AXI_ROOT_PRE_DIV    345
+#define IMX7D_ENET_AXI_ROOT_PRE_DIV    346
+#define IMX7D_NAND_USDHC_BUS_ROOT_PRE_DIV 347
+#define IMX7D_AHB_CHANNEL_ROOT_PRE_DIV 348
+#define IMX7D_USB_HSIC_ROOT_PRE_DIV    349
+#define IMX7D_PCIE_CTRL_ROOT_PRE_DIV   350
+#define IMX7D_PCIE_PHY_ROOT_PRE_DIV    351
+#define IMX7D_EPDC_PIXEL_ROOT_PRE_DIV  352
+#define IMX7D_LCDIF_PIXEL_ROOT_PRE_DIV 353
+#define IMX7D_MIPI_DSI_ROOT_PRE_DIV    354
+#define IMX7D_MIPI_CSI_ROOT_PRE_DIV    355
+#define IMX7D_MIPI_DPHY_ROOT_PRE_DIV   356
+#define IMX7D_SAI1_ROOT_PRE_DIV                357
+#define IMX7D_SAI2_ROOT_PRE_DIV                358
+#define IMX7D_SAI3_ROOT_PRE_DIV                359
+#define IMX7D_SPDIF_ROOT_PRE_DIV       360
+#define IMX7D_ENET1_REF_ROOT_PRE_DIV   361
+#define IMX7D_ENET1_TIME_ROOT_PRE_DIV  362
+#define IMX7D_ENET2_REF_ROOT_PRE_DIV   363
+#define IMX7D_ENET2_TIME_ROOT_PRE_DIV  364
+#define IMX7D_ENET_PHY_REF_ROOT_PRE_DIV 365
+#define IMX7D_EIM_ROOT_PRE_DIV         366
+#define IMX7D_NAND_ROOT_PRE_DIV                367
+#define IMX7D_QSPI_ROOT_PRE_DIV                368
+#define IMX7D_USDHC1_ROOT_PRE_DIV      369
+#define IMX7D_USDHC2_ROOT_PRE_DIV      370
+#define IMX7D_USDHC3_ROOT_PRE_DIV      371
+#define IMX7D_CAN1_ROOT_PRE_DIV                372
+#define IMX7D_CAN2_ROOT_PRE_DIV                373
+#define IMX7D_I2C1_ROOT_PRE_DIV                374
+#define IMX7D_I2C2_ROOT_PRE_DIV                375
+#define IMX7D_I2C3_ROOT_PRE_DIV                376
+#define IMX7D_I2C4_ROOT_PRE_DIV                377
+#define IMX7D_UART1_ROOT_PRE_DIV       378
+#define IMX7D_UART2_ROOT_PRE_DIV       379
+#define IMX7D_UART3_ROOT_PRE_DIV       380
+#define IMX7D_UART4_ROOT_PRE_DIV       381
+#define IMX7D_UART5_ROOT_PRE_DIV       382
+#define IMX7D_UART6_ROOT_PRE_DIV       383
+#define IMX7D_UART7_ROOT_PRE_DIV       384
+#define IMX7D_ECSPI1_ROOT_PRE_DIV      385
+#define IMX7D_ECSPI2_ROOT_PRE_DIV      386
+#define IMX7D_ECSPI3_ROOT_PRE_DIV      387
+#define IMX7D_ECSPI4_ROOT_PRE_DIV      388
+#define IMX7D_PWM1_ROOT_PRE_DIV                389
+#define IMX7D_PWM2_ROOT_PRE_DIV                390
+#define IMX7D_PWM3_ROOT_PRE_DIV                391
+#define IMX7D_PWM4_ROOT_PRE_DIV                392
+#define IMX7D_FLEXTIMER1_ROOT_PRE_DIV  393
+#define IMX7D_FLEXTIMER2_ROOT_PRE_DIV  394
+#define IMX7D_SIM1_ROOT_PRE_DIV                395
+#define IMX7D_SIM2_ROOT_PRE_DIV                396
+#define IMX7D_GPT1_ROOT_PRE_DIV                397
+#define IMX7D_GPT2_ROOT_PRE_DIV                398
+#define IMX7D_GPT3_ROOT_PRE_DIV                399
+#define IMX7D_GPT4_ROOT_PRE_DIV                400
+#define IMX7D_TRACE_ROOT_PRE_DIV       401
+#define IMX7D_WDOG_ROOT_PRE_DIV                402
+#define IMX7D_CSI_MCLK_ROOT_PRE_DIV    403
+#define IMX7D_AUDIO_MCLK_ROOT_PRE_DIV  404
+#define IMX7D_WRCLK_ROOT_PRE_DIV       405
+#define IMX7D_CLKO1_ROOT_PRE_DIV       406
+#define IMX7D_CLKO2_ROOT_PRE_DIV       407
+#define IMX7D_DRAM_PHYM_ALT_ROOT_PRE_DIV 408
+#define IMX7D_DRAM_ALT_ROOT_PRE_DIV    409
+#define IMX7D_LVDS1_IN_CLK             410
+#define IMX7D_LVDS1_OUT_SEL            411
+#define IMX7D_LVDS1_OUT_CLK            412
+#define IMX7D_CLK_DUMMY                        413
+#define IMX7D_GPT_3M_CLK               414
+#define IMX7D_OCRAM_CLK                        415
+#define IMX7D_OCRAM_S_CLK              416
+#define IMX7D_WDOG2_ROOT_CLK           417
+#define IMX7D_WDOG3_ROOT_CLK           418
+#define IMX7D_WDOG4_ROOT_CLK           419
+#define IMX7D_SDMA_CORE_CLK            420
+#define IMX7D_USB1_MAIN_480M_CLK       421
+#define IMX7D_USB_CTRL_CLK             422
+#define IMX7D_USB_PHY1_CLK             423
+#define IMX7D_USB_PHY2_CLK             424
+#define IMX7D_IPG_ROOT_CLK             425
+#define IMX7D_SAI1_IPG_CLK             426
+#define IMX7D_SAI2_IPG_CLK             427
+#define IMX7D_SAI3_IPG_CLK             428
+#define IMX7D_PLL_AUDIO_TEST_DIV       429
+#define IMX7D_PLL_AUDIO_POST_DIV       430
+#define IMX7D_PLL_VIDEO_TEST_DIV       431
+#define IMX7D_PLL_VIDEO_POST_DIV       432
+#define IMX7D_MU_ROOT_CLK              433
+#define IMX7D_SEMA4_HS_ROOT_CLK                434
+#define IMX7D_PLL_DRAM_TEST_DIV                435
+#define IMX7D_ADC_ROOT_CLK             436
+#define IMX7D_CLK_ARM                  437
+#define IMX7D_CKIL                     438
+#define IMX7D_OCOTP_CLK                        439
+#define IMX7D_CLK_END                  440
+#endif /* __DT_BINDINGS_CLOCK_IMX7D_H */
index a3a6b405eb61ab3916a5fd654de9e117e393806a..09831160386e1b1cbc752846b8e98a8ed98c62d8 100644 (file)
 #define PHY_SPEED_3G                   3
 #define PHY_SPEED_3_125G               4
 #define PHY_SPEED_5G                   5
-#define PHY_SPEED_6G                   6
-#define PHY_SPEED_6_25G                        7
-#define PHY_SPEED_10_3125G             8
-#define PHY_SPEED_MAX                  9
+#define PHY_SPEED_5_15625G             6
+#define PHY_SPEED_6G                   7
+#define PHY_SPEED_6_25G                        8
+#define PHY_SPEED_10_3125G             9
+#define PHY_SPEED_MAX                  10
 #define PHY_SPEED_INVALID              0xff
 
 #define PHY_TYPE_UNCONNECTED           0
@@ -42,8 +43,9 @@
 #define PHY_TYPE_XAUI3                 20
 #define PHY_TYPE_RXAUI0                        21
 #define PHY_TYPE_RXAUI1                        22
-#define PHY_TYPE_KR                    23
-#define PHY_TYPE_MAX                   24
+#define PHY_TYPE_SFI                   23
+#define PHY_TYPE_IGNORE                        24
+#define PHY_TYPE_MAX                   25
 #define PHY_TYPE_INVALID               0xff
 
 #define PHY_POLARITY_NO_INVERT         0
@@ -52,9 +54,9 @@
 #define PHY_POLARITY_ALL_INVERT                \
        (PHY_POLARITY_TXD_INVERT | PHY_POLARITY_RXD_INVERT)
 
-#define UTMI_PHY_TO_USB_HOST0          0
-#define UTMI_PHY_TO_USB_HOST1          1
-#define UTMI_PHY_TO_USB_DEVICE0                2
+#define UTMI_PHY_TO_USB3_HOST0         0
+#define UTMI_PHY_TO_USB3_HOST1         1
+#define UTMI_PHY_TO_USB3_DEVICE0       2
 #define UTMI_PHY_INVALID               0xff
 
 #endif /* _COMPHY_DATA_H_ */
diff --git a/include/dt-bindings/media/omap3-isp.h b/include/dt-bindings/media/omap3-isp.h
new file mode 100644 (file)
index 0000000..4e42084
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * include/dt-bindings/media/omap3-isp.h
+ *
+ * Copyright (C) 2015 Sakari Ailus
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ */
+
+#ifndef __DT_BINDINGS_OMAP3_ISP_H__
+#define __DT_BINDINGS_OMAP3_ISP_H__
+
+#define OMAP3ISP_PHY_TYPE_COMPLEX_IO   0
+#define OMAP3ISP_PHY_TYPE_CSIPHY       1
+
+#endif /* __DT_BINDINGS_OMAP3_ISP_H__ */
index ecb76c7808afc10a316ea8202e2a2b6421b643f7..0798287e6fccca6325984987aeb23429c8bc9b63 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright (c) 2013 MundoReader S.L.
  * Author: Heiko Stuebner <heiko@sntech.de>
  *
- * SPDX-License-Identifier:    GPL-2.0+
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #ifndef __DT_BINDINGS_ROCKCHIP_PINCTRL_H__
 #define RK_GPIO4       4
 #define RK_GPIO6       6
 
+#define RK_PA0         0
+#define RK_PA1         1
+#define RK_PA2         2
+#define RK_PA3         3
+#define RK_PA4         4
+#define RK_PA5         5
+#define RK_PA6         6
+#define RK_PA7         7
+#define RK_PB0         8
+#define RK_PB1         9
+#define RK_PB2         10
+#define RK_PB3         11
+#define RK_PB4         12
+#define RK_PB5         13
+#define RK_PB6         14
+#define RK_PB7         15
+#define RK_PC0         16
+#define RK_PC1         17
+#define RK_PC2         18
+#define RK_PC3         19
+#define RK_PC4         20
+#define RK_PC5         21
+#define RK_PC6         22
+#define RK_PC7         23
+#define RK_PD0         24
+#define RK_PD1         25
+#define RK_PD2         26
+#define RK_PD3         27
+#define RK_PD4         28
+#define RK_PD5         29
+#define RK_PD6         30
+#define RK_PD7         31
+
 #define RK_FUNC_GPIO   0
 #define RK_FUNC_1      1
 #define RK_FUNC_2      2
diff --git a/include/dt-bindings/power-domain/bcm63268-power-domain.h b/include/dt-bindings/power-domain/bcm63268-power-domain.h
new file mode 100644 (file)
index 0000000..d9eba44
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __DT_BINDINGS_POWER_DOMAIN_BCM63268_H
+#define __DT_BINDINGS_POWER_DOMAIN_BCM63268_H
+
+#define BCM63268_PWR_SAR       0
+#define BCM63268_PWR_IPSEC     1
+#define BCM63268_PWR_MIPS      2
+#define BCM63268_PWR_DECT      3
+#define BCM63268_PWR_USBH      4
+#define BCM63268_PWR_USBD      5
+#define BCM63268_PWR_ROBOSW    6
+#define BCM63268_PWR_PCM       7
+#define BCM63268_PWR_PERIPH    8
+#define BCM63268_PWR_VDSL_PHY  9
+#define BCM63268_PWR_VDSL_MIPS 10
+#define BCM63268_PWR_FAP       11
+#define BCM63268_PWR_PCIE      12
+#define BCM63268_PWR_WLAN_PADS 13
+
+#endif /* __DT_BINDINGS_POWER_DOMAIN_BCM63268_H */
diff --git a/include/dt-bindings/power-domain/bcm6328-power-domain.h b/include/dt-bindings/power-domain/bcm6328-power-domain.h
new file mode 100644 (file)
index 0000000..006806c
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __DT_BINDINGS_POWER_DOMAIN_BCM6328_H
+#define __DT_BINDINGS_POWER_DOMAIN_BCM6328_H
+
+#define BCM6328_PWR_ADSL2_MIPS 0
+#define BCM6328_PWR_ADSL2_PHY  1
+#define BCM6328_PWR_ADSL2_AFE  2
+#define BCM6328_PWR_SAR                3
+#define BCM6328_PWR_PCM                4
+#define BCM6328_PWR_USBD       5
+#define BCM6328_PWR_USBH       6
+#define BCM6328_PWR_PCIE       7
+#define BCM6328_PWR_ROBOSW     8
+#define BCM6328_PWR_EPHY       9
+
+#endif /* __DT_BINDINGS_POWER_DOMAIN_BCM6328_H */
diff --git a/include/dt-bindings/power/rk3399-power.h b/include/dt-bindings/power/rk3399-power.h
new file mode 100644 (file)
index 0000000..168b3bf
--- /dev/null
@@ -0,0 +1,53 @@
+#ifndef __DT_BINDINGS_POWER_RK3399_POWER_H__
+#define __DT_BINDINGS_POWER_RK3399_POWER_H__
+
+/* VD_CORE_L */
+#define RK3399_PD_A53_L0       0
+#define RK3399_PD_A53_L1       1
+#define RK3399_PD_A53_L2       2
+#define RK3399_PD_A53_L3       3
+#define RK3399_PD_SCU_L                4
+
+/* VD_CORE_B */
+#define RK3399_PD_A72_B0       5
+#define RK3399_PD_A72_B1       6
+#define RK3399_PD_SCU_B                7
+
+/* VD_LOGIC */
+#define RK3399_PD_TCPD0                8
+#define RK3399_PD_TCPD1                9
+#define RK3399_PD_CCI          10
+#define RK3399_PD_CCI0         11
+#define RK3399_PD_CCI1         12
+#define RK3399_PD_PERILP       13
+#define RK3399_PD_PERIHP       14
+#define RK3399_PD_VIO          15
+#define RK3399_PD_VO           16
+#define RK3399_PD_VOPB         17
+#define RK3399_PD_VOPL         18
+#define RK3399_PD_ISP0         19
+#define RK3399_PD_ISP1         20
+#define RK3399_PD_HDCP         21
+#define RK3399_PD_GMAC         22
+#define RK3399_PD_EMMC         23
+#define RK3399_PD_USB3         24
+#define RK3399_PD_EDP          25
+#define RK3399_PD_GIC          26
+#define RK3399_PD_SD           27
+#define RK3399_PD_SDIOAUDIO    28
+#define RK3399_PD_ALIVE                29
+
+/* VD_CENTER */
+#define RK3399_PD_CENTER       30
+#define RK3399_PD_VCODEC       31
+#define RK3399_PD_VDU          32
+#define RK3399_PD_RGA          33
+#define RK3399_PD_IEP          34
+
+/* VD_GPU */
+#define RK3399_PD_GPU          35
+
+/* VD_PMU */
+#define RK3399_PD_PMU          36
+
+#endif
diff --git a/include/dt-bindings/reset/bcm63268-reset.h b/include/dt-bindings/reset/bcm63268-reset.h
new file mode 100644 (file)
index 0000000..1373884
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * Derived from linux/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __DT_BINDINGS_RESET_BCM63268_H
+#define __DT_BINDINGS_RESET_BCM63268_H
+
+#define BCM63268_RST_SPI       0
+#define BCM63268_RST_IPSEC     1
+#define BCM63268_RST_EPHY      2
+#define BCM63268_RST_SAR       3
+#define BCM63268_RST_ENETSW    4
+#define BCM63268_RST_USBS      5
+#define BCM63268_RST_USBH      6
+#define BCM63268_RST_PCM       7
+#define BCM63268_RST_PCIE_CORE 8
+#define BCM63268_RST_PCIE      9
+#define BCM63268_RST_PCIE_EXT  10
+#define BCM63268_RST_WLAN_SHIM 11
+#define BCM63268_RST_DDR_PHY   12
+#define BCM63268_RST_FAP0      13
+#define BCM63268_RST_WLAN_UBUS 14
+#define BCM63268_RST_DECT      15
+#define BCM63268_RST_FAP1      16
+#define BCM63268_RST_PCIE_HARD 17
+#define BCM63268_RST_GPHY      18
+
+#endif /* __DT_BINDINGS_RESET_BCM63268_H */
diff --git a/include/dt-bindings/reset/bcm6328-reset.h b/include/dt-bindings/reset/bcm6328-reset.h
new file mode 100644 (file)
index 0000000..c144ad2
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * Derived from linux/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __DT_BINDINGS_RESET_BCM6328_H
+#define __DT_BINDINGS_RESET_BCM6328_H
+
+#define BCM6328_RST_SPI                0
+#define BCM6328_RST_EPHY       1
+#define BCM6328_RST_SAR                2
+#define BCM6328_RST_ENETSW     3
+#define BCM6328_RST_USBS       4
+#define BCM6328_RST_USBH       5
+#define BCM6328_RST_PCM                6
+#define BCM6328_RST_PCIE_CORE  7
+#define BCM6328_RST_PCIE       8
+#define BCM6328_RST_PCIE_EXT   9
+#define BCM6328_RST_PCIE_HARD  10
+
+#endif /* __DT_BINDINGS_RESET_BCM6328_H */
diff --git a/include/dt-bindings/reset/bcm6358-reset.h b/include/dt-bindings/reset/bcm6358-reset.h
new file mode 100644 (file)
index 0000000..4b3cff3
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * Derived from linux/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __DT_BINDINGS_RESET_BCM6358_H
+#define __DT_BINDINGS_RESET_BCM6358_H
+
+#define BCM6358_RST_SPI                0
+#define BCM6358_RST_ENET       2
+#define BCM6358_RST_MPI                3
+#define BCM6358_RST_EPHY       6
+#define BCM6358_RST_SAR                7
+#define BCM6358_RST_USBH       12
+#define BCM6358_RST_PCM                13
+#define BCM6358_RST_ADSL       14
+
+#endif /* __DT_BINDINGS_RESET_BCM6358_H */
index 8b022fa98af77c78f70c7fa60b60fed46859a520..a9f2f3d3abff930f42b6e3bcff106a11ea2f6f4f 100644 (file)
@@ -19,6 +19,9 @@
 #define EDID_SIZE      128
 #define EDID_EXT_SIZE  256
 
+/* OUI of HDMI vendor specific data block */
+#define HDMI_IEEE_OUI 0x000c03
+
 #define GET_BIT(_x, _pos) \
        (((_x) >> (_pos)) & 1)
 #define GET_BITS(_x, _pos_msb, _pos_lsb) \
@@ -234,6 +237,13 @@ struct edid1_info {
        unsigned char checksum;
 } __attribute__ ((__packed__));
 
+enum edid_cea861_db_types {
+       EDID_CEA861_DB_AUDIO = 0x01,
+       EDID_CEA861_DB_VIDEO = 0x02,
+       EDID_CEA861_DB_VENDOR = 0x03,
+       EDID_CEA861_DB_SPEAKER = 0x04,
+};
+
 struct edid_cea861_info {
        unsigned char extension_tag;
 #define EDID_CEA861_EXTENSION_TAG      0x02
@@ -251,6 +261,10 @@ struct edid_cea861_info {
 #define EDID_CEA861_DTD_COUNT(_x) \
        GET_BITS(((_x).dtd_count), 3, 0)
        unsigned char data[124];
+#define EDID_CEA861_DB_TYPE(_x, offset) \
+       GET_BITS((_x).data[offset], 7, 5)
+#define EDID_CEA861_DB_LEN(_x, offset) \
+       GET_BITS((_x).data[offset], 4, 0)
 } __attribute__ ((__packed__));
 
 /**
index 2134701c547275e16d280923a0de7733997edbcf..3000ecbb587b96359d87df98e97ed8704f3c3705 100644 (file)
@@ -967,6 +967,7 @@ struct display_timing {
        struct timing_entry vsync_len;          /* ver. sync len */
 
        enum display_flags flags;               /* display flags */
+       bool hdmi_monitor;                      /* is hdmi monitor? */
 };
 
 /**
@@ -1023,4 +1024,10 @@ int fdtdec_setup_memory_banksize(void);
  */
 int fdtdec_setup(void);
 
+/**
+ * Board-specific FDT initialization. Returns the address to a device tree blob.
+ * Called when CONFIG_OF_BOARD is defined.
+ */
+void *board_fdt_blob_setup(void);
+
 #endif
diff --git a/include/generic-phy.h b/include/generic-phy.h
new file mode 100644 (file)
index 0000000..d8cf0c9
--- /dev/null
@@ -0,0 +1,224 @@
+/*
+ * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
+ * Written by Jean-Jacques Hiblot  <jjhiblot@ti.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __GENERIC_PHY_H
+#define __GENERIC_PHY_H
+
+
+/**
+ * struct phy - A handle to (allowing control of) a single phy port.
+ *
+ * Clients provide storage for phy handles. The content of the structure is
+ * managed solely by the PHY API and PHY drivers. A phy struct is
+ * initialized by "get"ing the phy struct. The phy struct is passed to all
+ * other phy APIs to identify which PHY port to operate upon.
+ *
+ * @dev: The device which implements the PHY port.
+ * @id: The PHY ID within the provider.
+ *
+ */
+struct phy {
+       struct udevice *dev;
+       unsigned long id;
+};
+
+/*
+ * struct udevice_ops - set of function pointers for phy operations
+ * @init: operation to be performed for initializing phy (optional)
+ * @exit: operation to be performed while exiting (optional)
+ * @reset: reset the phy (optional).
+ * @power_on: powering on the phy (optional)
+ * @power_off: powering off the phy (optional)
+ */
+struct phy_ops {
+       /**
+        * of_xlate - Translate a client's device-tree (OF) phy specifier.
+        *
+        * The PHY core calls this function as the first step in implementing
+        * a client's generic_phy_get_by_*() call.
+        *
+        * If this function pointer is set to NULL, the PHY core will use a
+        * default implementation, which assumes #phy-cells = <0> or
+        * #phy-cells = <1>, and in the later case that the DT cell
+        * contains a simple integer PHY port ID.
+        *
+        * @phy:        The phy struct to hold the translation result.
+        * @args:       The phy specifier values from device tree.
+        * @return 0 if OK, or a negative error code.
+        */
+       int     (*of_xlate)(struct phy *phy,
+                       struct fdtdec_phandle_args *args);
+
+       /**
+        * init - initialize the hardware.
+        *
+        * Hardware intialization should not be done in during probe() but
+        * should be implemented in this init() function. It could be starting
+        * PLL, taking a controller out of reset, routing, etc. This function
+        * is typically called only once per PHY port.
+        * If power_on() is not implemented, it must power up the phy.
+        *
+        * @phy:        the PHY port to initialize
+        * @return 0 if OK, or a negative error code.
+        */
+       int     (*init)(struct phy *phy);
+
+       /**
+       * exit - de-initialize the PHY device
+       *
+       * Hardware de-intialization should be done here. Every step done in
+       * init() should be undone here.
+       * This could be used to suspend the phy to reduce power consumption or
+       * to put the phy in a known condition before booting the OS (though it
+       * is NOT called automatically before booting the OS)
+       * If power_off() is not implemented, it must power down the phy.
+       *
+       * @phy: PHY port to be de-initialized
+       * @return 0 if OK, or a negative error code
+       */
+       int     (*exit)(struct phy *phy);
+
+       /**
+       * reset - resets a PHY device without shutting down
+       *
+       * @phy: PHY port to be reset
+       *
+       * During runtime, the PHY may need to be reset in order to
+       * re-establish connection etc without being shut down or exit.
+       *
+       * @return 0 if OK, or a negative error code
+       */
+       int     (*reset)(struct phy *phy);
+
+       /**
+       * power_on - power on a PHY device
+       *
+       * @phy: PHY port to be powered on
+       *
+       * During runtime, the PHY may need to be powered on or off several
+       * times. This function is used to power on the PHY. It relies on the
+       * setup done in init(). If init() is not implemented, it must take care
+       * of setting up the context (PLLs, ...)
+       *
+       * @return 0 if OK, or a negative error code
+       */
+       int     (*power_on)(struct phy *phy);
+
+       /**
+       * power_off - power off a PHY device
+       *
+       * @phy: PHY port to be powered off
+       *
+       * During runtime, the PHY may need to be powered on or off several
+       * times. This function is used to power off the PHY. Except if
+       * init()/deinit() are not implemented, it must not de-initialize
+       * everything.
+       *
+       * @return 0 if OK, or a negative error code
+       */
+       int     (*power_off)(struct phy *phy);
+};
+
+
+/**
+ * generic_phy_init() - initialize the PHY port
+ *
+ * @phy:       the PHY port to initialize
+ * @return 0 if OK, or a negative error code
+ */
+int generic_phy_init(struct phy *phy);
+
+/**
+ * generic_phy_init() - de-initialize the PHY device
+ *
+ * @phy:       PHY port to be de-initialized
+ * @return 0 if OK, or a negative error code
+ */
+int generic_phy_exit(struct phy *phy);
+
+/**
+ * generic_phy_reset() - resets a PHY device without shutting down
+ *
+ * @phy:       PHY port to be reset
+ *@return 0 if OK, or a negative error code
+ */
+int generic_phy_reset(struct phy *phy);
+
+/**
+ * generic_phy_power_on() - power on a PHY device
+ *
+ * @phy:       PHY port to be powered on
+ * @return 0 if OK, or a negative error code
+ */
+int generic_phy_power_on(struct phy *phy);
+
+/**
+ * generic_phy_power_off() - power off a PHY device
+ *
+ * @phy:       PHY port to be powered off
+ * @return 0 if OK, or a negative error code
+ */
+int generic_phy_power_off(struct phy *phy);
+
+
+/**
+ * generic_phy_get_by_index() - Get a PHY device by integer index.
+ *
+ * @user:      the client device
+ * @index:     The index in the list of available PHYs
+ * @phy:       A pointer to the PHY port
+ *
+ * This looks up a PHY device for a client device based on its position in the
+ * list of the possible PHYs.
+ *
+ * example:
+ * usb1: usb_otg_ss@xxx {
+ *       compatible = "xxx";
+ *       reg = <xxx>;
+ *   .
+ *   .
+ *   phys = <&usb2_phy>, <&usb3_phy>;
+ *   .
+ *   .
+ * };
+ * the USB2 phy can be accessed by passing index '0' and the USB3 phy can
+ * be accessed by passing index '1'
+ *
+ * @return 0 if OK, or a negative error code
+ */
+int generic_phy_get_by_index(struct udevice *user, int index,
+                            struct phy *phy);
+
+/**
+ * generic_phy_get_by_name() - Get a PHY device by its name.
+ *
+ * @user:      the client device
+ * @phy_name:  The name of the PHY in the list of possible PHYs
+ * @phy:       A pointer to the PHY port
+ *
+ * This looks up a PHY device for a client device in the
+ * list of the possible PHYs based on its name.
+ *
+ * example:
+ * usb1: usb_otg_ss@xxx {
+ *       compatible = "xxx";
+ *       reg = <xxx>;
+ *   .
+ *   .
+ *   phys = <&usb2_phy>, <&usb3_phy>;
+ *   phy-names = "usb2phy", "usb3phy";
+ *   .
+ *   .
+ * };
+ * the USB3 phy can be accessed using "usb3phy", and USB2 by using "usb2phy"
+ *
+ * @return 0 if OK, or a negative error code
+ */
+int generic_phy_get_by_name(struct udevice *user, const char *phy_name,
+                           struct phy *phy);
+
+#endif /*__GENERIC_PHY_H */
index cd7f61e1c1e1d773e6aa297166ee0e86255e789e..a88cc7cddf93e693be9379fce94337687af15833 100644 (file)
@@ -706,9 +706,6 @@ void i2c_early_init_f(void);
 #endif
 void i2c_init(int speed, int slaveaddr);
 void i2c_init_board(void);
-#ifdef CONFIG_SYS_I2C_BOARD_LATE_INIT
-void i2c_board_late_init(void);
-#endif
 
 #ifdef CONFIG_SYS_I2C
 /*
index 04528928126606807f477cd3bac0dfae6c69cd84..bb5c6b118b9345cf277fd1afaf3da74c58499b59 100644 (file)
@@ -20,4 +20,28 @@ struct i2c_eeprom {
        unsigned pagewidth;
 };
 
+/*
+ * i2c_eeprom_read() - read bytes from an I2C EEPROM chip
+ *
+ * @dev:       Chip to read from
+ * @offset:    Offset within chip to start reading
+ * @buf:       Place to put data
+ * @size:      Number of bytes to read
+ *
+ * @return 0 on success, -ve on failure
+ */
+int i2c_eeprom_read(struct udevice *dev, int offset, uint8_t *buf, int size);
+
+/*
+ * i2c_eeprom_write() - write bytes to an I2C EEPROM chip
+ *
+ * @dev:       Chip to write to
+ * @offset:    Offset within chip to start writing
+ * @buf:       Buffer containing data to write
+ * @size:      Number of bytes to write
+ *
+ * @return 0 on success, -ve on failure
+ */
+int i2c_eeprom_write(struct udevice *dev, int offset, uint8_t *buf, int size);
+
 #endif
index fad12d608cef8194f8e6443de9ad97026291989d..8346b0e19e2cd6309e3dbc374d4b100f88a8be0e 100644 (file)
@@ -585,18 +585,6 @@ int cpu_mmc_init(bd_t *bis);
 int mmc_get_env_addr(struct mmc *mmc, int copy, u32 *env_addr);
 int mmc_get_env_dev(void);
 
-struct pci_device_id;
-
-/**
- * pci_mmc_init() - set up PCI MMC devices
- *
- * This finds all the matching PCI IDs and sets them up as MMC devices.
- *
- * @name:              Name to use for devices
- * @mmc_supported:     PCI IDs to search for, terminated by {0, 0}
- */
-int pci_mmc_init(const char *name, struct pci_device_id *mmc_supported);
-
 /* Set block count limit because of 16 bit register limit on some hardware*/
 #ifndef CONFIG_SYS_MMC_MAX_BLK_COUNT
 #define CONFIG_SYS_MMC_MAX_BLK_COUNT 65535
index b6d1b33167ba267244e43f04e18cca870116cfc6..83bce05a43d601dc3008e40db5ec907b761e8dfb 100644 (file)
@@ -163,7 +163,8 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
  * @param gpt_name - the specified table entry name
  * @param info - returns the disk partition info
  *
- * @return - '0' on match, '-1' on no match, otherwise error
+ * @return - the partition number on match (starting on 1), -1 on no match,
+ * otherwise error
  */
 int part_get_info_by_name(struct blk_desc *dev_desc,
                              const char *name, disk_partition_t *info);
diff --git a/include/power/rk808_pmic.h b/include/power/rk808_pmic.h
deleted file mode 100644 (file)
index fb0800b..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2015 Google, Inc
- * Written by Simon Glass <sjg@chromium.org>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#ifndef _PMIC_RK808_H_
-#define _PMIC_RK808_H_
-
-enum {
-       REG_DCDC_EN                     = 0x23,
-       REG_LDO_EN,
-       REG_SLEEP_SET_OFF1,
-       REG_SLEEP_SET_OFF2,
-       REG_DCDC_UV_STS,
-
-       REG_DCDC_UV_ACT,
-       REG_LDO_UV_STS,
-       REG_LDO_UV_ACT,
-       REG_DCDC_PG,
-       REG_LDO_PG,
-       REG_VOUT_MON_TDB,
-       REG_BUCK1_CONFIG,
-       REG_BUCK1_ON_VSEL,
-
-       REG_BUCK1_SLP_VSEL,
-       REG_BUCK1_DVS_VSEL,
-       REG_BUCK2_CONFIG,
-       REG_BUCK2_ON_VSEL,
-       REG_BUCK2_SLP_VSEL,
-       REG_BUCK2_DVS_VSEL,
-       REG_BUCK3_CONFIG,
-       REG_BUCK4_CONFIG,
-
-       REG_BUCK4_ON_VSEL,
-       REG_BUCK4_SLP_VSEL,
-       LDO1_ON_VSEL                    = 0x3b,
-       LDO1_SLP_VSEL,
-       LDO2_ON_VSEL,
-       LDO2_SLP_VSEL,
-       LDO3_ON_VSEL,
-
-       LDO3_SLP_VSEL,
-       LDO4_ON_VSEL,
-       LDO4_SLP_VSEL,
-       LDO5_ON_VSEL,
-       LDO5_SLP_VSEL,
-       LDO6_ON_VSEL,
-       LDO6_SLP_VSEL,
-       LDO7_ON_VSEL,
-
-       LDO7_SLP_VSEL,
-       LDO8_ON_VSEL,
-       LDO8_SLP_VSEL,
-       DEVCTRL,
-       INT_STS1,
-       INT_STS_MSK1,
-       INT_STS2,
-       INT_STS_MSK2,
-       IO_POL,
-
-       /* Not sure what this does */
-       DCDC_ILMAX                      = 0x90,
-
-       RK808_NUM_OF_REGS,
-};
-
-struct rk808_reg_table {
-       char *name;
-       u8 reg_ctl;
-       u8 reg_vol;
-};
-
-int rk808_spl_configure_buck(struct udevice *pmic, int buck, int uvolt);
-
-#endif
diff --git a/include/power/rk8xx_pmic.h b/include/power/rk8xx_pmic.h
new file mode 100644 (file)
index 0000000..589f8c4
--- /dev/null
@@ -0,0 +1,193 @@
+/*
+ * Copyright (C) 2015 Google, Inc
+ * Written by Simon Glass <sjg@chromium.org>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef _PMIC_RK8XX_H_
+#define _PMIC_RK8XX_H_
+
+enum {
+       REG_SECONDS                     = 0x00,
+       REG_MINUTES,
+       REG_HOURS,
+       REG_DAYS,
+       REG_MONTHS,
+       REG_YEARS,
+       REG_WEEKS,
+       REG_ALARM_SECONDS,
+       REG_ALARM_MINUTES,
+       REG_ALARM_HOURS,
+       REG_ALARM_DAYS,
+       REG_ALARM_MONTHS,
+       REG_ALARM_YEARS,
+
+       REG_RTC_CTRL                    = 0x10,
+       REG_RTC_STATUS,
+       REG_RTC_INT,
+       REG_RTC_COMP_LSB,
+       REG_RTC_COMP_MSB,
+
+       ID_MSB                          = 0x17,
+       ID_LSB,
+
+       REG_CLK32OUT                    = 0x20,
+       REG_VB_MON,
+       REG_THERMAL,
+       REG_DCDC_EN,
+       REG_LDO_EN,
+       REG_SLEEP_SET_OFF1,
+       REG_SLEEP_SET_OFF2,
+       REG_DCDC_UV_STS,
+       REG_DCDC_UV_ACT,
+       REG_LDO_UV_STS,
+       REG_LDO_UV_ACT,
+       REG_DCDC_PG,
+       REG_LDO_PG,
+       REG_VOUT_MON_TDB,
+       REG_BUCK1_CONFIG,
+       REG_BUCK1_ON_VSEL,
+       REG_BUCK1_SLP_VSEL,
+       REG_BUCK1_DVS_VSEL,
+       REG_BUCK2_CONFIG,
+       REG_BUCK2_ON_VSEL,
+       REG_BUCK2_SLP_VSEL,
+       REG_BUCK2_DVS_VSEL,
+       REG_BUCK3_CONFIG,
+       REG_BUCK4_CONFIG,
+       REG_BUCK4_ON_VSEL,
+       REG_BUCK4_SLP_VSEL,
+       REG_BOOST_CONFIG_REG,
+       REG_LDO1_ON_VSEL,
+       REG_LDO1_SLP_VSEL,
+       REG_LDO2_ON_VSEL,
+       REG_LDO2_SLP_VSEL,
+       REG_LDO3_ON_VSEL,
+       REG_LDO3_SLP_VSEL,
+       REG_LDO4_ON_VSEL,
+       REG_LDO4_SLP_VSEL,
+       REG_LDO5_ON_VSEL,
+       REG_LDO5_SLP_VSEL,
+       REG_LDO6_ON_VSEL,
+       REG_LDO6_SLP_VSEL,
+       REG_LDO7_ON_VSEL,
+       REG_LDO7_SLP_VSEL,
+       REG_LDO8_ON_VSEL,
+       REG_LDO8_SLP_VSEL,
+       REG_DEVCTRL,
+       REG_INT_STS1,
+       REG_INT_STS_MSK1,
+       REG_INT_STS2,
+       REG_INT_STS_MSK2,
+       REG_IO_POL,
+       REG_OTP_VDD_EN,
+       REG_H5V_EN,
+       REG_SLEEP_SET_OFF,
+       REG_BOOST_LDO9_ON_VSEL,
+       REG_BOOST_LDO9_SLP_VSEL,
+       REG_BOOST_CTRL,
+
+       /* Not sure what this does */
+       REG_DCDC_ILMAX                  = 0x90,
+       REG_CHRG_COMP                   = 0x9a,
+       REG_SUP_STS                     = 0xa0,
+       REG_USB_CTRL,
+       REG1_CHRG_CTRL,
+       REG2_CHRG_CTRL,
+       REG3_CHRG_CTRL,
+       REG_BAT_CTRL,
+       REG_BAT_HTS_TS1,
+       REG_BAT_LTS_TS1,
+       REG_BAT_HTS_TS2,
+       REG_BAT_LTS_TS2,
+       REG_TS_CTRL,
+       REG_ADC_CTRL,
+       REG_ON_SOURCE,
+       REG_OFF_SOURCE,
+       REG_GGCON,
+       REG_GGSTS,
+       REG_FRAME_SMP_INTERV,
+       REG_AUTO_SLP_CUR_THR,
+       REG3_GASCNT_CAL,
+       REG2_GASCNT_CAL,
+       REG1_GASCNT_CAL,
+       REG0_GASCNT_CAL,
+       REG3_GASCNT,
+       REG2_GASCNT,
+       REG1_GASCNT,
+       REG0_GASCNT,
+       REGH_BAT_CUR_AVG,
+       REGL_BAT_CUR_AVG,
+       REGH_TS1_ADC,
+       REGL_TS1_ADC,
+       REGH_TS2_ADC,
+       REGL_TS2_ADC,
+       REGH_BAT_OCV,
+       REGL_BAT_OCV,
+       REGH_BAT_VOL,
+       REGL_BAT_VOL,
+       REGH_RELAX_ENTRY_THRES,
+       REGL_RELAX_ENTRY_THRES,
+       REGH_RELAX_EXIT_THRES,
+       REGL_RELAX_EXIT_THRES,
+       REGH_RELAX_VOL1,
+       REGL_RELAX_VOL1,
+       REGH_RELAX_VOL2,
+       REGL_RELAX_VOL2,
+       REGH_BAT_CUR_R_CALC,
+       REGL_BAT_CUR_R_CALC,
+       REGH_BAT_VOL_R_CALC,
+       REGL_BAT_VOL_R_CALC,
+       REGH_CAL_OFFSET,
+       REGL_CAL_OFFSET,
+       REG_NON_ACT_TIMER_CNT,
+       REGH_VCALIB0,
+       REGL_VCALIB0,
+       REGH_VCALIB1,
+       REGL_VCALIB1,
+       REGH_IOFFSET,
+       REGL_IOFFSET,
+       REG_SOC,
+       REG3_REMAIN_CAP,
+       REG2_REMAIN_CAP,
+       REG1_REMAIN_CAP,
+       REG0_REMAIN_CAP,
+       REG_UPDAT_LEVE,
+       REG3_NEW_FCC,
+       REG2_NEW_FCC,
+       REG1_NEW_FCC,
+       REG0_NEW_FCC,
+       REG_NON_ACT_TIMER_CNT_SAVE,
+       REG_OCV_VOL_VALID,
+       REG_REBOOT_CNT,
+       REG_POFFSET,
+       REG_MISC_MARK,
+       REG_HALT_CNT,
+       REGH_CALC_REST,
+       REGL_CALC_REST,
+       SAVE_DATA19,
+       RK808_NUM_OF_REGS,
+};
+
+enum {
+       RK805_ID = 0x8050,
+       RK808_ID = 0x0000,
+       RK818_ID = 0x8180,
+};
+
+#define RK8XX_ID_MSK   0xfff0
+
+struct rk8xx_reg_table {
+       char *name;
+       u8 reg_ctl;
+       u8 reg_vol;
+};
+
+struct rk8xx_priv {
+       int variant;
+};
+
+int rk8xx_spl_configure_buck(struct udevice *pmic, int buck, int uvolt);
+
+#endif
index ca8430145be2125cde7e96d04a942b7ea4e1f1c0..976130dc3e0e56dc932664d35295aa11fba34912 100644 (file)
@@ -62,6 +62,7 @@ enum {
 
 #define TPS65910_OP_REG_SEL_MASK                       (0x7F)
 #define TPS65910_OP_REG_SEL_0_9_5                      (0x1F)  /* 0.9500 V */
+#define TPS65910_OP_REG_SEL_1_1_0                      (0x2B)  /* 1.1000 V */
 #define TPS65910_OP_REG_SEL_1_1_3                      (0x2E)  /* 1.1375 V */
 #define TPS65910_OP_REG_SEL_1_2_0                      (0x33)  /* 1.2000 V */
 #define TPS65910_OP_REG_SEL_1_2_6                      (0x38)  /* 1.2625 V */
index 851915eb87a6e253868bcbda25a2a09710a8c0a2..ebee227a670d4bb043a9a50186707760d3588702 100644 (file)
@@ -34,6 +34,15 @@ struct pwm_ops {
         * @return 0 if OK, -ve on error
         */
        int (*set_enable)(struct udevice *dev, uint channel, bool enable);
+       /**
+        * set_invert() - Set the PWM invert
+        *
+        * @dev:        PWM device to update
+        * @channel:    PWM channel to update
+        * @polarity:   true to invert, false to keep normal polarity
+        * @return 0 if OK, -ve on error
+        */
+       int (*set_invert)(struct udevice *dev, uint channel, bool polarity);
 };
 
 #define pwm_get_ops(dev)       ((struct pwm_ops *)(dev)->driver->ops)
@@ -60,6 +69,16 @@ int pwm_set_config(struct udevice *dev, uint channel, uint period_ns,
  */
 int pwm_set_enable(struct udevice *dev, uint channel, bool enable);
 
+/**
+ * pwm_set_invert() - Set pwm default polarity
+ *
+ * @dev:       PWM device to update
+ * @channel:   PWM channel to update
+ * @polarity:  true to invert, false to keep normal polarity
+ * @return 0 if OK, -ve on error
+ */
+int pwm_set_invert(struct udevice *dev, uint channel, bool polarity);
+
 /* Legacy interface */
 #ifndef CONFIG_DM_PWM
 int    pwm_init                (int pwm_id, int div, int invert);
index d1638e9d7cb55d03f2722f22e6f3b6ed327dca74..ffadce93c7be28ac6b409f28ff7eeaed3a37da71 100644 (file)
@@ -267,4 +267,5 @@ int spl_dfu_cmd(int usbctrl, char *dfu_alt_info, char *interface, char *devstr);
 int spl_mmc_load_image(struct spl_image_info *spl_image,
                       struct spl_boot_device *bootdev);
 
+void bl31_entry(void);
 #endif
index 02a0ccdd77b370b4bd62d858a2c797e926fd03f2..62f051fe535c992d9acd50dbc092f17dbd9051e5 100644 (file)
@@ -187,7 +187,8 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
 int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
                        int transfer_len, int interval);
 
-#if defined CONFIG_USB_EHCI || defined CONFIG_USB_MUSB_HOST || defined(CONFIG_DM_USB)
+#if defined CONFIG_USB_EHCI_HCD || defined CONFIG_USB_MUSB_HOST \
+       || defined(CONFIG_DM_USB)
 struct int_queue *create_int_queue(struct usb_device *dev, unsigned long pipe,
        int queuesize, int elementsize, void *buffer, int interval);
 int destroy_int_queue(struct usb_device *dev, struct int_queue *queue);
index 94372cc6cd5a08023c46a2fb21ff46e2c2420847..c072e54cffa6f9c3ac1955d806bb809f45d024f8 100644 (file)
@@ -1255,6 +1255,9 @@ int fdtdec_setup(void)
        /* FDT is at end of image */
        gd->fdt_blob = (ulong *)&_end;
 #  endif
+# elif defined(CONFIG_OF_BOARD)
+       /* Allow the board to override the fdt address. */
+       gd->fdt_blob = board_fdt_blob_setup();
 # elif defined(CONFIG_OF_HOSTFILE)
        if (sandbox_read_fdt_from_file()) {
                puts("Failed to read control FDT\n");
index 8c6637e3287e5d3fd069c3523bdd7b196c11544c..1da4ef7fffbdd04acfce068664df87267c473cec 100644 (file)
@@ -9,6 +9,7 @@
 #include <string.h>
 #include <image.h>
 #include <time.h>
+#include <openssl/bn.h>
 #include <openssl/rsa.h>
 #include <openssl/pem.h>
 #include <openssl/err.h>
 #define HAVE_ERR_REMOVE_THREAD_STATE
 #endif
 
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+static void RSA_get0_key(const RSA *r,
+                 const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
+{
+   if (n != NULL)
+       *n = r->n;
+   if (e != NULL)
+       *e = r->e;
+   if (d != NULL)
+       *d = r->d;
+}
+#endif
+
 static int rsa_err(const char *msg)
 {
        unsigned long sslErr = ERR_get_error();
@@ -286,16 +300,22 @@ static int rsa_init(void)
 {
        int ret;
 
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
        ret = SSL_library_init();
+#else
+       ret = OPENSSL_init_ssl(0, NULL);
+#endif
        if (!ret) {
                fprintf(stderr, "Failure to init SSL library\n");
                return -1;
        }
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
        SSL_load_error_strings();
 
        OpenSSL_add_all_algorithms();
        OpenSSL_add_all_digests();
        OpenSSL_add_all_ciphers();
+#endif
 
        return 0;
 }
@@ -335,12 +355,15 @@ err_set_rsa:
 err_engine_init:
        ENGINE_free(e);
 err_engine_by_id:
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
        ENGINE_cleanup();
+#endif
        return ret;
 }
 
 static void rsa_remove(void)
 {
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
        CRYPTO_cleanup_all_ex_data();
        ERR_free_strings();
 #ifdef HAVE_ERR_REMOVE_THREAD_STATE
@@ -349,6 +372,7 @@ static void rsa_remove(void)
        ERR_remove_state(0);
 #endif
        EVP_cleanup();
+#endif
 }
 
 static void rsa_engine_remove(ENGINE *e)
@@ -409,7 +433,11 @@ static int rsa_sign_with_key(RSA *rsa, struct checksum_algo *checksum_algo,
                ret = rsa_err("Could not obtain signature");
                goto err_sign;
        }
-       EVP_MD_CTX_cleanup(context);
+       #if OPENSSL_VERSION_NUMBER < 0x10100000L
+               EVP_MD_CTX_cleanup(context);
+       #else
+               EVP_MD_CTX_reset(context);
+       #endif
        EVP_MD_CTX_destroy(context);
        EVP_PKEY_free(key);
 
@@ -479,6 +507,7 @@ static int rsa_get_exponent(RSA *key, uint64_t *e)
 {
        int ret;
        BIGNUM *bn_te;
+       const BIGNUM *key_e;
        uint64_t te;
 
        ret = -EINVAL;
@@ -487,17 +516,18 @@ static int rsa_get_exponent(RSA *key, uint64_t *e)
        if (!e)
                goto cleanup;
 
-       if (BN_num_bits(key->e) > 64)
+       RSA_get0_key(key, NULL, &key_e, NULL);
+       if (BN_num_bits(key_e) > 64)
                goto cleanup;
 
-       *e = BN_get_word(key->e);
+       *e = BN_get_word(key_e);
 
-       if (BN_num_bits(key->e) < 33) {
+       if (BN_num_bits(key_e) < 33) {
                ret = 0;
                goto cleanup;
        }
 
-       bn_te = BN_dup(key->e);
+       bn_te = BN_dup(key_e);
        if (!bn_te)
                goto cleanup;
 
@@ -527,6 +557,7 @@ int rsa_get_params(RSA *key, uint64_t *exponent, uint32_t *n0_invp,
 {
        BIGNUM *big1, *big2, *big32, *big2_32;
        BIGNUM *n, *r, *r_squared, *tmp;
+       const BIGNUM *key_n;
        BN_CTX *bn_ctx = BN_CTX_new();
        int ret = 0;
 
@@ -548,7 +579,8 @@ int rsa_get_params(RSA *key, uint64_t *exponent, uint32_t *n0_invp,
        if (0 != rsa_get_exponent(key, exponent))
                ret = -1;
 
-       if (!BN_copy(n, key->n) || !BN_set_word(big1, 1L) ||
+       RSA_get0_key(key, &key_n, NULL, NULL);
+       if (!BN_copy(n, key_n) || !BN_set_word(big1, 1L) ||
            !BN_set_word(big2, 2L) || !BN_set_word(big32, 32L))
                ret = -1;
 
index f90749f8ed17f4f659c75aceb8d92833c58d1a9b..e26d344865b83f7639fb711fd4b6a2c21618f4e8 100644 (file)
@@ -441,7 +441,7 @@ loop_greedy(const struct slre *r, int pc, const char *s, int len, int *ofs)
 {
        int     saved_offset, matched_offset;
 
-       saved_offset = matched_offset = *ofs;
+       matched_offset = *ofs;
 
        while (match(r, pc + 2, s, len, ofs, NULL)) {
                saved_offset = *ofs;
index c1a28c14ced51dd58424a10d2af0e1444207a80a..e94021c4680a118aed754662eb2bf2f0b2e50d4a 100644 (file)
@@ -511,16 +511,9 @@ void * memmove(void * dest,const void *src,size_t count)
 {
        char *tmp, *s;
 
-       if (src == dest)
-               return dest;
-
        if (dest <= src) {
-               tmp = (char *) dest;
-               s = (char *) src;
-               while (count--)
-                       *tmp++ = *s++;
-               }
-       else {
+               memcpy(dest, src, count);
+       } else {
                tmp = (char *) dest + count;
                s = (char *) src + count;
                while (count--)
index cd7f88f2204e9119f0b24b6a7b98cdd1e441a193..fb520e3d733ca4bfe813efd34827adaae283a2ec 100644 (file)
--- a/lib/tpm.c
+++ b/lib/tpm.c
@@ -230,10 +230,9 @@ static uint32_t tpm_sendrecv_command(const void *command,
                void *response, size_t *size_ptr)
 {
        struct udevice *dev;
-       int ret;
+       int err, ret;
        uint8_t response_buffer[COMMAND_BUFFER_SIZE];
        size_t response_length;
-       uint32_t err;
 
        if (response) {
                response_length = *size_ptr;
index f03d6083268f2b085b9277a72f46685d98c30701..ae54eee5afe047ec6a9cd7cbe2cf448819d286ee 100644 (file)
@@ -25,3 +25,8 @@ obj-$(CONFIG_CMD_PING) += ping.o
 obj-$(CONFIG_CMD_RARP) += rarp.o
 obj-$(CONFIG_CMD_SNTP) += sntp.o
 obj-$(CONFIG_CMD_NET)  += tftp.o
+
+# Disable this warning as it is triggered by:
+# sprintf(buf, index ? "foo%d" : "foo", index)
+# and this is intentional usage.
+CFLAGS_eth_common.o += -Wno-format-extra-args
index 824d2e9393550ea250f357b2762cf2f465e5fe66..f3ceff9ed89c3886f90e5b10efd2cec624017f78 100644 (file)
--- a/net/arp.c
+++ b/net/arp.c
@@ -125,7 +125,6 @@ void arp_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len)
 {
        struct arp_hdr *arp;
        struct in_addr reply_ip_addr;
-       uchar *pkt;
        int eth_hdr_size;
 
        /*
@@ -163,9 +162,7 @@ void arp_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len)
        case ARPOP_REQUEST:
                /* reply with our IP address */
                debug_cond(DEBUG_DEV_PKT, "Got ARP REQUEST, return our IP\n");
-               pkt = (uchar *)et;
                eth_hdr_size = net_update_ether(et, et->et_src, PROT_ARP);
-               pkt += eth_hdr_size;
                arp->ar_op = htons(ARPOP_REPLY);
                memcpy(&arp->ar_tha, &arp->ar_sha, ARP_HLEN);
                net_copy_ip(&arp->ar_tpa, &arp->ar_spa);
index 7b2cffce520abe0959471f27d0995c90fb1cfdfe..90dc149df3d9a5b625595b5177c8912309666789 100644 (file)
@@ -58,9 +58,23 @@ endif
 
 KBUILD_CFLAGS += $(warning)
 
+dtc-warning-2 += $(call dtc-option,-Wnode_name_chars_strict)
+dtc-warning-2 += $(call dtc-option,-Wproperty_name_chars_strict)
+
+dtc-warning := $(dtc-warning-$(findstring 1, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)))
+dtc-warning += $(dtc-warning-$(findstring 2, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)))
+dtc-warning += $(dtc-warning-$(findstring 3, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)))
+
+DTC_FLAGS += $(dtc-warning)
+
 else
 
 # Disable noisy checks by default
 DTC_FLAGS += $(call dtc-option,-Wno-unit_address_vs_reg)
+DTC_FLAGS += $(call dtc-option,-Wno-simple_bus_reg)
+DTC_FLAGS += $(call dtc-option,-Wno-unit_address_format)
+DTC_FLAGS += $(call dtc-option,-Wno-pci_bridge)
+DTC_FLAGS += $(call dtc-option,-Wno-pci_device_bus_num)
+DTC_FLAGS += $(call dtc-option,-Wno-pci_device_reg)
 
 endif
index eb24292fec3d0d210f34db2d5eb83963bc49bba4..182b3002c124961121133a0e4a47407379ff58b4 100644 (file)
@@ -232,7 +232,7 @@ fdtgrep_props := -b u-boot,dm-pre-reloc -b u-boot,dm-spl
 endif
 quiet_cmd_fdtgrep = FDTGREP $@
       cmd_fdtgrep = $(objtree)/tools/fdtgrep $(fdtgrep_props) -RT $< \
-               -n /chosen -O dtb | \
+               -n /chosen -n /config -O dtb | \
        $(objtree)/tools/fdtgrep -r -O dtb - -o $@ \
                $(addprefix -P ,$(subst $\",,$(CONFIG_OF_SPL_REMOVE_PROPS)))
 
index 1704f9c09a460ab94f3b98d9f9e4ad5322adccd0..fa9c3fc8cbd03e66644fa8d1a2f4adb07f420aba 100644 (file)
@@ -236,7 +236,6 @@ CONFIG_BL1_SIZE
 CONFIG_BL2_OFFSET
 CONFIG_BL2_SIZE
 CONFIG_BMP_16BPP
-CONFIG_BMP_24BMP
 CONFIG_BMP_24BPP
 CONFIG_BMP_32BPP
 CONFIG_BOARDDIR
@@ -617,7 +616,6 @@ CONFIG_DEEP_SLEEP
 CONFIG_DEFAULT
 CONFIG_DEFAULT_CONSOLE
 CONFIG_DEFAULT_IMMR
-CONFIG_DEFAULT_OMAP_RESET_TIME_MAX_USEC
 CONFIG_DEFAULT_SPI_BUS
 CONFIG_DEFAULT_SPI_CS
 CONFIG_DEFAULT_SPI_MODE
@@ -776,7 +774,6 @@ CONFIG_EHCI_MMIO_BIG_ENDIAN
 CONFIG_EHCI_MXS_PORT0
 CONFIG_EHCI_MXS_PORT1
 CONFIG_ELBC_NAND_SPL_STATIC_PGSIZE
-CONFIG_EMAC_MDIO_PHY_NUM
 CONFIG_EMAC_NR_START
 CONFIG_EMAC_PHY_MODE
 CONFIG_EMIF4
@@ -1135,7 +1132,6 @@ CONFIG_G_DNL_UMS_VENDOR_NUM
 CONFIG_H264_FREQ
 CONFIG_H8300
 CONFIG_HALEAKALA
-CONFIG_HARD_I2C
 CONFIG_HARD_SPI
 CONFIG_HASH_VERIFY
 CONFIG_HAS_DATAFLASH
@@ -1321,7 +1317,6 @@ CONFIG_HW_ENV_SETTINGS
 CONFIG_HW_WATCHDOG
 CONFIG_HW_WATCHDOG_TIMEOUT_MS
 CONFIG_I2C
-CONFIG_I2CFAST
 CONFIG_I2C_CHIPADDRESS
 CONFIG_I2C_CMD_TREE
 CONFIG_I2C_ENV_EEPROM_BUS
@@ -1981,33 +1976,12 @@ CONFIG_OF_SPI
 CONFIG_OF_SPI_FLASH
 CONFIG_OF_STDOUT_PATH
 CONFIG_OF_SUPPORT_OLD_DEVICE_TREES
-CONFIG_OMAP
-CONFIG_OMAP3430
-CONFIG_OMAP3_AM3517CRANE
-CONFIG_OMAP3_DEVKIT8000
-CONFIG_OMAP3_EVM
-CONFIG_OMAP3_GPIO_2
-CONFIG_OMAP3_GPIO_3
-CONFIG_OMAP3_GPIO_4
-CONFIG_OMAP3_GPIO_5
-CONFIG_OMAP3_GPIO_6
-CONFIG_OMAP3_LOGIC_USE_NEW_PRODUCT_ID
-CONFIG_OMAP3_MCX
-CONFIG_OMAP3_MICRON_DDR
-CONFIG_OMAP3_RX51
-CONFIG_OMAP3_SPI_D0_D1_SWAPPED
-CONFIG_OMAP3_ZOOM1
-CONFIG_OMAP4430
 CONFIG_OMAP_EHCI_PHY1_RESET_GPIO
 CONFIG_OMAP_EHCI_PHY2_RESET_GPIO
 CONFIG_OMAP_EHCI_PHY3_RESET_GPIO
-CONFIG_OMAP_GPIO
-CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC
 CONFIG_OMAP_USB2PHY2_HOST
 CONFIG_OMAP_USB3PHY1_HOST
 CONFIG_OMAP_USB_PHY
-CONFIG_OMAP_VC_I2C_HS_MCODE
-CONFIG_OMAP_WATCHDOG
 CONFIG_OPTREX_BW
 CONFIG_ORIGEN
 CONFIG_OS1_ENV_ADDR
@@ -4224,7 +4198,6 @@ CONFIG_SYS_I2C_BASE2
 CONFIG_SYS_I2C_BASE3
 CONFIG_SYS_I2C_BASE4
 CONFIG_SYS_I2C_BASE5
-CONFIG_SYS_I2C_BOARD_LATE_INIT
 CONFIG_SYS_I2C_BOOT_EEPROM_ADDR
 CONFIG_SYS_I2C_BUSES
 CONFIG_SYS_I2C_BUS_MAX
@@ -4869,7 +4842,6 @@ CONFIG_SYS_MPTPR_1BK_8K
 CONFIG_SYS_MPTPR_2BK_2K
 CONFIG_SYS_MPTPR_2BK_4K
 CONFIG_SYS_MPTPR_2BK_8K
-CONFIG_SYS_MPUCLK
 CONFIG_SYS_MRAM_BASE
 CONFIG_SYS_MRAM_SIZE
 CONFIG_SYS_MRS_OFFS
@@ -6209,7 +6181,6 @@ CONFIG_TUXX1
 CONFIG_TWL4030_INPUT
 CONFIG_TWL4030_KEYPAD
 CONFIG_TWL4030_LED
-CONFIG_TWL4030_POWER
 CONFIG_TWL4030_PWM
 CONFIG_TWL4030_USB
 CONFIG_TWL6030_INPUT
@@ -6310,7 +6281,6 @@ CONFIG_USB_EHCI_KIRKWOOD
 CONFIG_USB_EHCI_MX5
 CONFIG_USB_EHCI_MXC
 CONFIG_USB_EHCI_MXS
-CONFIG_USB_EHCI_OMAP
 CONFIG_USB_EHCI_PCI
 CONFIG_USB_EHCI_PPC4XX
 CONFIG_USB_EHCI_RMOBILE
index b15f1d0535aaebdeddfe3cafa872561363911982..513c4561ad14f0550b0e0f8f54363be400be2b43 100644 (file)
@@ -24,6 +24,7 @@ obj-$(CONFIG_LED) += led.o
 obj-$(CONFIG_DM_MAILBOX) += mailbox.o
 obj-$(CONFIG_DM_MMC) += mmc.o
 obj-$(CONFIG_DM_PCI) += pci.o
+obj-$(CONFIG_PHY) += phy.o
 obj-$(CONFIG_POWER_DOMAIN) += power-domain.o
 obj-$(CONFIG_DM_PWM) += pwm.o
 obj-$(CONFIG_RAM) += ram.o
diff --git a/test/dm/phy.c b/test/dm/phy.c
new file mode 100644 (file)
index 0000000..811045f
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
+ * Written by Jean-Jacques Hiblot  <jjhiblot@ti.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <generic-phy.h>
+#include <dm/test.h>
+#include <test/ut.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/* Base test of the phy uclass */
+static int dm_test_phy_base(struct unit_test_state *uts)
+{
+       struct udevice *dev;
+       struct phy phy1_method1;
+       struct phy phy1_method2;
+       struct phy phy2;
+       struct phy phy3;
+       struct udevice *parent;
+
+       /* Get the device using the phy device*/
+       ut_assertok(uclass_get_device_by_name(UCLASS_SIMPLE_BUS,
+                                             "gen_phy_user", &parent));
+       /*
+        * Get the same phy port in 2 different ways and compare.
+        */
+       ut_assertok(generic_phy_get_by_name(parent, "phy1", &phy1_method1))
+       ut_assertok(generic_phy_get_by_index(parent, 0, &phy1_method2))
+       ut_asserteq(phy1_method1.id, phy1_method2.id);
+
+       /*
+        * Get the second phy port. Check that the same phy provider (device)
+        * provides this 2nd phy port, but that the IDs are different
+        */
+       ut_assertok(generic_phy_get_by_name(parent, "phy2", &phy2))
+       ut_asserteq_ptr(phy1_method2.dev, phy2.dev);
+       ut_assert(phy1_method1.id != phy2.id);
+
+       /*
+        * Get the third phy port. Check that the phy provider is different
+        */
+       ut_assertok(generic_phy_get_by_name(parent, "phy3", &phy3))
+       ut_assert(phy2.dev != phy3.dev);
+
+       /* Try to get a non-existing phy */
+       ut_asserteq(-ENODEV, uclass_get_device(UCLASS_PHY, 3, &dev));
+       ut_assert(generic_phy_get_by_name(parent, "phy_not_existing",
+                                         &phy1_method1) < 0)
+
+       return 0;
+}
+DM_TEST(dm_test_phy_base, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+
+/* Test of the phy uclass using the sandbox phy driver operations */
+static int dm_test_phy_ops(struct unit_test_state *uts)
+{
+       struct phy phy1;
+       struct phy phy2;
+       struct phy phy3;
+       struct udevice *parent;
+
+       ut_assertok(uclass_get_device_by_name(UCLASS_SIMPLE_BUS,
+                                             "gen_phy_user", &parent));
+
+       ut_assertok(generic_phy_get_by_name(parent, "phy1", &phy1));
+       ut_assertok(generic_phy_get_by_name(parent, "phy2", &phy2));
+       ut_assertok(generic_phy_get_by_name(parent, "phy3", &phy3));
+
+       /* test normal operations */
+       ut_assertok(generic_phy_init(&phy1));
+       ut_assertok(generic_phy_power_on(&phy1));
+       ut_assertok(generic_phy_power_off(&phy1));
+
+       /*
+        * test operations after exit().
+        * The sandbox phy driver does not allow it.
+        */
+       ut_assertok(generic_phy_exit(&phy1));
+       ut_assert(generic_phy_power_on(&phy1) != 0);
+       ut_assert(generic_phy_power_off(&phy1) != 0);
+
+       /*
+        * test normal operations again (after re-init)
+        */
+       ut_assertok(generic_phy_init(&phy1));
+       ut_assertok(generic_phy_power_on(&phy1));
+       ut_assertok(generic_phy_power_off(&phy1));
+
+       /*
+        * test calling unimplemented feature.
+        * The call is expected to succeed
+        */
+       ut_assertok(generic_phy_reset(&phy1));
+
+       /* PHY2 has a known problem with power off */
+       ut_assertok(generic_phy_init(&phy2));
+       ut_assertok(generic_phy_power_on(&phy2));
+       ut_assert(generic_phy_power_off(&phy2) == -EIO);
+
+       /* PHY3 has a known problem with power off and power on*/
+       ut_assertok(generic_phy_init(&phy3));
+       ut_assert(generic_phy_power_off(&phy3) == -EIO);
+       ut_assert(generic_phy_power_off(&phy3) == -EIO);
+
+       return 0;
+}
+DM_TEST(dm_test_phy_ops, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
index 7bdc75af099af5966bdb34f43270e9b962d816b1..f1e38c77dd680d507fcc07639fe2a7b61a719b63 100644 (file)
@@ -23,6 +23,7 @@ static int dm_test_pwm_base(struct unit_test_state *uts)
        ut_assertok(pwm_set_enable(dev, 1, true));
        ut_assertok(pwm_set_enable(dev, 2, true));
        ut_asserteq(-ENOSPC, pwm_set_enable(dev, 3, true));
+       ut_assertok(pwm_set_invert(dev, 0, true));
 
        ut_assertok(uclass_get_device(UCLASS_PWM, 1, &dev));
        ut_asserteq(-ENODEV, uclass_get_device(UCLASS_PWM, 2, &dev));
index afc5171c2a0897f3f556509f919c2ddc712b774c..2e0b9c04e209e2b9b5297886c66152445b34b676 100755 (executable)
@@ -272,6 +272,33 @@ class DtbPlatdata:
             upto += 1
         return structs
 
+    def ScanPhandles(self):
+        """Figure out what phandles each node uses
+
+        We need to be careful when outputing nodes that use phandles since
+        they must come after the declaration of the phandles in the C file.
+        Otherwise we get a compiler error since the phandle struct is not yet
+        declared.
+
+        This function adds to each node a list of phandle nodes that the node
+        depends on. This allows us to output things in the right order.
+        """
+        for node in self._valid_nodes:
+            node.phandles = set()
+            for pname, prop in node.props.items():
+                if pname in PROP_IGNORE_LIST or pname[0] == '#':
+                    continue
+                if type(prop.value) == list:
+                    if self.IsPhandle(prop):
+                        # Process the list as pairs of (phandle, id)
+                        it = iter(prop.value)
+                        for phandle_cell, id_cell in zip(it, it):
+                            phandle = fdt_util.fdt32_to_cpu(phandle_cell)
+                            id = fdt_util.fdt32_to_cpu(id_cell)
+                            target_node = self._phandle_node[phandle]
+                            node.phandles.add(target_node)
+
+
     def GenerateStructs(self, structs):
         """Generate struct defintions for the platform data
 
@@ -301,6 +328,59 @@ class DtbPlatdata:
                 self.Out(';\n')
             self.Out('};\n')
 
+    def OutputNode(self, node):
+        """Output the C code for a node
+
+        Args:
+            node: node to output
+        """
+        struct_name = self.GetCompatName(node)
+        var_name = Conv_name_to_c(node.name)
+        self.Buf('static struct %s%s %s%s = {\n' %
+            (STRUCT_PREFIX, struct_name, VAL_PREFIX, var_name))
+        for pname, prop in node.props.items():
+            if pname in PROP_IGNORE_LIST or pname[0] == '#':
+                continue
+            ptype = TYPE_NAMES[prop.type]
+            member_name = Conv_name_to_c(prop.name)
+            self.Buf('\t%s= ' % TabTo(3, '.' + member_name))
+
+            # Special handling for lists
+            if type(prop.value) == list:
+                self.Buf('{')
+                vals = []
+                # For phandles, output a reference to the platform data
+                # of the target node.
+                if self.IsPhandle(prop):
+                    # Process the list as pairs of (phandle, id)
+                    it = iter(prop.value)
+                    for phandle_cell, id_cell in zip(it, it):
+                        phandle = fdt_util.fdt32_to_cpu(phandle_cell)
+                        id = fdt_util.fdt32_to_cpu(id_cell)
+                        target_node = self._phandle_node[phandle]
+                        name = Conv_name_to_c(target_node.name)
+                        vals.append('{&%s%s, %d}' % (VAL_PREFIX, name, id))
+                else:
+                    for val in prop.value:
+                        vals.append(self.GetValue(prop.type, val))
+                self.Buf(', '.join(vals))
+                self.Buf('}')
+            else:
+                self.Buf(self.GetValue(prop.type, prop.value))
+            self.Buf(',\n')
+        self.Buf('};\n')
+
+        # Add a device declaration
+        self.Buf('U_BOOT_DEVICE(%s) = {\n' % var_name)
+        self.Buf('\t.name\t\t= "%s",\n' % struct_name)
+        self.Buf('\t.platdata\t= &%s%s,\n' % (VAL_PREFIX, var_name))
+        self.Buf('\t.platdata_size\t= sizeof(%s%s),\n' %
+                    (VAL_PREFIX, var_name))
+        self.Buf('};\n')
+        self.Buf('\n')
+
+        self.Out(''.join(self.GetBuf()))
+
     def GenerateTables(self):
         """Generate device defintions for the platform data
 
@@ -312,64 +392,18 @@ class DtbPlatdata:
         self.Out('#include <dm.h>\n')
         self.Out('#include <dt-structs.h>\n')
         self.Out('\n')
-        node_txt_list = []
-        for node in self._valid_nodes:
-            struct_name = self.GetCompatName(node)
-            var_name = Conv_name_to_c(node.name)
-            self.Buf('static struct %s%s %s%s = {\n' %
-                (STRUCT_PREFIX, struct_name, VAL_PREFIX, var_name))
-            for pname, prop in node.props.items():
-                if pname in PROP_IGNORE_LIST or pname[0] == '#':
-                    continue
-                ptype = TYPE_NAMES[prop.type]
-                member_name = Conv_name_to_c(prop.name)
-                self.Buf('\t%s= ' % TabTo(3, '.' + member_name))
-
-                # Special handling for lists
-                if type(prop.value) == list:
-                    self.Buf('{')
-                    vals = []
-                    # For phandles, output a reference to the platform data
-                    # of the target node.
-                    if self.IsPhandle(prop):
-                        # Process the list as pairs of (phandle, id)
-                        it = iter(prop.value)
-                        for phandle_cell, id_cell in zip(it, it):
-                            phandle = fdt_util.fdt32_to_cpu(phandle_cell)
-                            id = fdt_util.fdt32_to_cpu(id_cell)
-                            target_node = self._phandle_node[phandle]
-                            name = Conv_name_to_c(target_node.name)
-                            vals.append('{&%s%s, %d}' % (VAL_PREFIX, name, id))
-                    else:
-                        for val in prop.value:
-                            vals.append(self.GetValue(prop.type, val))
-                    self.Buf(', '.join(vals))
-                    self.Buf('}')
-                else:
-                    self.Buf(self.GetValue(prop.type, prop.value))
-                self.Buf(',\n')
-            self.Buf('};\n')
-
-            # Add a device declaration
-            self.Buf('U_BOOT_DEVICE(%s) = {\n' % var_name)
-            self.Buf('\t.name\t\t= "%s",\n' % struct_name)
-            self.Buf('\t.platdata\t= &%s%s,\n' % (VAL_PREFIX, var_name))
-            self.Buf('\t.platdata_size\t= sizeof(%s%s),\n' %
-                     (VAL_PREFIX, var_name))
-            self.Buf('};\n')
-            self.Buf('\n')
-
-            # Output phandle target nodes first, since they may be referenced
-            # by others
-            if 'phandle' in node.props:
-                self.Out(''.join(self.GetBuf()))
-            else:
-                node_txt_list.append(self.GetBuf())
+        nodes_to_output = list(self._valid_nodes)
 
-        # Output all the nodes which are not phandle targets themselves, but
-        # may reference them. This avoids the need for forward declarations.
-        for node_txt in node_txt_list:
-            self.Out(''.join(node_txt))
+        # Keep outputing nodes until there is none left
+        while nodes_to_output:
+            node = nodes_to_output[0]
+            # Output all the node's dependencies first
+            for req_node in node.phandles:
+                if req_node in nodes_to_output:
+                    self.OutputNode(req_node)
+                    nodes_to_output.remove(req_node)
+            self.OutputNode(node)
+            nodes_to_output.remove(node)
 
 
 if __name__ != "__main__":
@@ -392,6 +426,7 @@ plat.ScanDtb()
 plat.ScanTree()
 plat.SetupOutput(options.output)
 structs = plat.ScanStructs()
+plat.ScanPhandles()
 
 for cmd in args[0].split(','):
     if cmd == 'struct':
index c2efad55ab4609ed17c006551b2dd0ce6eee3c1e..2e871feaf4fa76948aaf80ba7f55bc40a2e10da6 100755 (executable)
@@ -294,6 +294,8 @@ class MaintainersDatabase:
         tmp = self.database[target][0]
         if tmp.startswith('Maintained'):
             return 'Active'
+        elif tmp.startswith('Supported'):
+            return 'Active'
         elif tmp.startswith('Orphan'):
             return 'Orphan'
         else:
index 2c637c74468b1aa05ac882be750b5e1d7034e373..8c0e730e7bbb6f04934417764bfb448676baf08d 100644 (file)
 #include "kwbimage.h"
 
 #ifdef CONFIG_KWB_SECURE
+#include <openssl/bn.h>
 #include <openssl/rsa.h>
 #include <openssl/pem.h>
 #include <openssl/err.h>
 #include <openssl/evp.h>
+
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+static void RSA_get0_key(const RSA *r,
+                 const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
+{
+   if (n != NULL)
+       *n = r->n;
+   if (e != NULL)
+       *e = r->e;
+   if (d != NULL)
+       *d = r->d;
+}
+
+#else
+void EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
+{
+       EVP_MD_CTX_reset(ctx);
+}
+#endif
 #endif
 
 static struct image_cfg_element *image_cfg;
@@ -470,12 +490,16 @@ static int kwb_export_pubkey(RSA *key, struct pubkey_der_v1 *dst, FILE *hashf,
                             char *keyname)
 {
        int size_exp, size_mod, size_seq;
+       const BIGNUM *key_e, *key_n;
        uint8_t *cur;
        char *errmsg = "Failed to encode %s\n";
 
-       if (!key || !key->e || !key->n || !dst) {
+       RSA_get0_key(key, NULL, &key_e, NULL);
+       RSA_get0_key(key, &key_n, NULL, NULL);
+
+       if (!key || !key_e || !key_n || !dst) {
                fprintf(stderr, "export pk failed: (%p, %p, %p, %p)",
-                       key, key->e, key->n, dst);
+                       key, key_e, key_n, dst);
                fprintf(stderr, errmsg, keyname);
                return -EINVAL;
        }
@@ -490,8 +514,8 @@ static int kwb_export_pubkey(RSA *key, struct pubkey_der_v1 *dst, FILE *hashf,
         * do the encoding manually.
         */
 
-       size_exp = BN_num_bytes(key->e);
-       size_mod = BN_num_bytes(key->n);
+       size_exp = BN_num_bytes(key_e);
+       size_mod = BN_num_bytes(key_n);
        size_seq = 4 + size_mod + 4 + size_exp;
 
        if (size_mod > 256) {
@@ -520,14 +544,14 @@ static int kwb_export_pubkey(RSA *key, struct pubkey_der_v1 *dst, FILE *hashf,
        *cur++ = 0x82;
        *cur++ = (size_mod >> 8) & 0xFF;
        *cur++ = size_mod & 0xFF;
-       BN_bn2bin(key->n, cur);
+       BN_bn2bin(key_n, cur);
        cur += size_mod;
        /* Exponent */
        *cur++ = 0x02;          /* INTEGER */
        *cur++ = 0x82;
        *cur++ = (size_exp >> 8) & 0xFF;
        *cur++ = size_exp & 0xFF;
-       BN_bn2bin(key->e, cur);
+       BN_bn2bin(key_e, cur);
 
        if (hashf) {
                struct hash_v1 pk_hash;
index b34373e8fcd95e387a1c0ed00a24150997374c85..8283a740c13d3062b34cc6e2ff20404565c16843 100644 (file)
@@ -13,6 +13,8 @@
 #include "mkimage.h"
 #include "rkcommon.h"
 
+#define DIV_ROUND_UP(n, d)     (((n) + (d) - 1) / (d))
+
 enum {
        RK_SIGNATURE            = 0x0ff0aa55,
 };
@@ -71,6 +73,7 @@ static struct spl_info spl_infos[] = {
        { "rk3036", "RK30", 0x1000, false, false },
        { "rk3188", "RK31", 0x8000 - 0x800, true, false },
        { "rk3288", "RK32", 0x8000, false, false },
+       { "rk3328", "RK32", 0x8000 - 0x1000, false, false },
        { "rk3399", "RK33", 0x20000, false, true },
 };
 
@@ -83,6 +86,9 @@ static struct spl_info *rkcommon_get_spl_info(char *imagename)
 {
        int i;
 
+       if (!imagename)
+               return NULL;
+
        for (i = 0; i < ARRAY_SIZE(spl_infos); i++)
                if (!strncmp(imagename, spl_infos[i].imagename, 6))
                        return spl_infos + i;
@@ -95,17 +101,24 @@ int rkcommon_check_params(struct image_tool_params *params)
        int i;
 
        if (rkcommon_get_spl_info(params->imagename) != NULL)
-               return 0;
+               return EXIT_SUCCESS;
+
+       /*
+        * If this is a operation (list or extract), the don't require
+        * imagename to be set.
+        */
+       if (params->lflag || params->iflag)
+               return EXIT_SUCCESS;
 
        fprintf(stderr, "ERROR: imagename (%s) is not supported!\n",
-               strlen(params->imagename) > 0 ? params->imagename : "NULL");
+               params->imagename ? params->imagename : "NULL");
 
        fprintf(stderr, "Available imagename:");
        for (i = 0; i < ARRAY_SIZE(spl_infos); i++)
                fprintf(stderr, "\t%s", spl_infos[i].imagename);
        fprintf(stderr, "\n");
 
-       return -1;
+       return EXIT_FAILURE;
 }
 
 const char *rkcommon_get_spl_hdr(struct image_tool_params *params)
@@ -159,9 +172,21 @@ static void rkcommon_set_header0(void *buf, uint file_size,
        hdr->disable_rc4 = !rkcommon_need_rc4_spl(params);
        hdr->init_offset = RK_INIT_OFFSET;
 
-       hdr->init_size = (file_size + RK_BLK_SIZE - 1) / RK_BLK_SIZE;
-       hdr->init_size = (hdr->init_size + 3) & ~3;
-       hdr->init_boot_size = hdr->init_size + RK_MAX_BOOT_SIZE / RK_BLK_SIZE;
+       hdr->init_size = DIV_ROUND_UP(file_size, RK_BLK_SIZE);
+       /*
+        * The init_size has to be a multiple of 4 blocks (i.e. of 2K)
+        * or the BootROM will not boot the image.
+        *
+        * Note: To verify that this is not a legacy constraint, we
+        *       rechecked this against the RK3399 BootROM.
+        */
+       hdr->init_size = ROUND(hdr->init_size, 4);
+       /*
+        * The images we create do not contain the stage following the SPL as
+        * part of the SPL image, so the init_boot_size (which might have been
+        * read by Rockchip's miniloder) should be the same as the init_size.
+        */
+       hdr->init_boot_size = hdr->init_size;
 
        rc4_encode(buf, RK_BLK_SIZE, rc4_key);
 }
@@ -176,7 +201,7 @@ int rkcommon_set_header(void *buf, uint file_size,
 
        rkcommon_set_header0(buf, file_size, params);
 
-       /* Set up the SPL name and add the AArch64 'nop' padding, if needed */
+       /* Set up the SPL name */
        memcpy(&hdr->magic, rkcommon_get_spl_hdr(params), RK_SPL_HDR_SIZE);
 
        if (rkcommon_need_rc4_spl(params))
@@ -199,25 +224,33 @@ void rkcommon_rc4_encode_spl(void *buf, unsigned int offset, unsigned int size)
        }
 }
 
-void rkcommon_vrec_header(struct image_tool_params *params,
-                         struct image_type_params *tparams)
+int rkcommon_vrec_header(struct image_tool_params *params,
+                        struct image_type_params *tparams,
+                        unsigned int alignment)
 {
+       unsigned int  unpadded_size;
+       unsigned int  padded_size;
+
        /*
         * The SPL image looks as follows:
         *
         * 0x0    header0 (see rkcommon.c)
         * 0x800  spl_name ('RK30', ..., 'RK33')
+        *        (start of the payload for AArch64 payloads: we expect the
+        *        first 4 bytes to be available for overwriting with our
+        *        spl_name)
         * 0x804  first instruction to be executed
-        *        (image start for AArch32, 'nop' for AArch64))
-        * 0x808  second instruction to be executed
-        *        (image start for AArch64)
+        *        (start of the image/payload for 32bit payloads)
         *
-        * For AArch64 (ARMv8) payloads, we receive an input file that
-        * needs to start on an 8-byte boundary (natural alignment), so
-        * we need to put a NOP at 0x804.
+        * For AArch64 (ARMv8) payloads, natural alignment (8-bytes) is
+        * required for its sections (so the image we receive needs to
+        * have the first 4 bytes reserved for the spl_name).  Reserving
+        * these 4 bytes is done using the BOOT0_HOOK infrastructure.
         *
-        * Depending on this, the header is either 0x804 or 0x808 bytes
-        * in length.
+        * Depending on this, the header is either 0x800 (if this is a
+        * 'boot0'-style payload, which has reserved 4 bytes at the
+        * beginning for the 'spl_name' and expects us to overwrite
+        * its first 4 bytes) or 0x804 bytes in length.
         */
        if (rkcommon_spl_is_boot0(params))
                tparams->header_size = RK_SPL_HDR_START;
@@ -227,4 +260,17 @@ void rkcommon_vrec_header(struct image_tool_params *params,
        /* Allocate, clear and install the header */
        tparams->hdr = malloc(tparams->header_size);
        memset(tparams->hdr, 0, tparams->header_size);
+       tparams->header_size = tparams->header_size;
+
+       /*
+        * If someone passed in 0 for the alignment, we'd better handle
+        * it correctly...
+        */
+       if (!alignment)
+               alignment = 1;
+
+       unpadded_size = tparams->header_size + params->file_size;
+       padded_size = ROUND(unpadded_size, alignment);
+
+       return padded_size - unpadded_size;
 }
index cc161a647ca3b46d75e3aafb8ba44d6d167ce378..a21321fe83abddaea0afd65b34f91f2f960c7fb9 100644 (file)
@@ -83,8 +83,14 @@ void rkcommon_rc4_encode_spl(void *buf, unsigned int offset, unsigned int size);
  * @params:     Pointer to the tool params structure
  * @tparams:    Pointer tot the image type structure (for setting
  *              the header and header_size)
+ * @alignment:  Alignment (a power of two) that the image should be
+ *              padded to (e.g. 512 if we want to align with SD/MMC
+ *              blocksizes or 2048 for the SPI format)
+ *
+ * @return bytes of padding required/added (does not include the header_size)
  */
-void rkcommon_vrec_header(struct image_tool_params *params,
-                         struct image_type_params *tparams);
+int rkcommon_vrec_header(struct image_tool_params *params,
+                        struct image_type_params *tparams,
+                        unsigned int alignment);
 
 #endif
index 44d098c77578f9241595254d9e6669b89ee66aa5..9880b1569f165a3709c7de9fd48d1dd5dcb1b93e 100644 (file)
 
 static uint32_t header;
 
-static int rkimage_verify_header(unsigned char *buf, int size,
-                                struct image_tool_params *params)
-{
-       return 0;
-}
-
-static void rkimage_print_header(const void *buf)
-{
-}
-
 static void rkimage_set_header(void *buf, struct stat *sbuf, int ifd,
                               struct image_tool_params *params)
 {
@@ -33,11 +23,6 @@ static void rkimage_set_header(void *buf, struct stat *sbuf, int ifd,
                rkcommon_rc4_encode_spl(buf, 4, params->file_size);
 }
 
-static int rkimage_extract_subimage(void *buf, struct image_tool_params *params)
-{
-       return 0;
-}
-
 static int rkimage_check_image_type(uint8_t type)
 {
        if (type == IH_TYPE_RKIMAGE)
@@ -55,10 +40,10 @@ U_BOOT_IMAGE_TYPE(
        4,
        &header,
        rkcommon_check_params,
-       rkimage_verify_header,
-       rkimage_print_header,
+       NULL,
+       NULL,
        rkimage_set_header,
-       rkimage_extract_subimage,
+       NULL,
        rkimage_check_image_type,
        NULL,
        NULL
index ac8a67d3bc80b1218f60400cb341b9e9ea315ef1..8627b6d31b8f6e4aa3c1f63574050118a22b2c5a 100644 (file)
@@ -29,12 +29,20 @@ static void rksd_set_header(void *buf,  struct stat *sbuf,  int ifd,
        unsigned int size;
        int ret;
 
+       printf("params->file_size %d\n", params->file_size);
+       printf("params->orig_file_size %d\n", params->orig_file_size);
+
+       /*
+        * We need to calculate this using 'RK_SPL_HDR_START' and not using
+        * 'tparams->header_size', as the additional byte inserted when
+        * 'is_boot0' is true counts towards the payload.
+        */
        size = params->file_size - RK_SPL_HDR_START;
        ret = rkcommon_set_header(buf, size, params);
        if (ret) {
                /* TODO(sjg@chromium.org): This method should return an error */
-               printf("Warning: SPL image is too large (size %#x) and will not boot\n",
-                      size);
+               printf("Warning: SPL image is too large (size %#x) and will "
+                      "not boot\n", size);
        }
 }
 
@@ -51,18 +59,14 @@ static int rksd_check_image_type(uint8_t type)
                return EXIT_FAILURE;
 }
 
-/* We pad the file out to a fixed size - this method returns that size */
 static int rksd_vrec_header(struct image_tool_params *params,
                            struct image_type_params *tparams)
 {
-       int pad_size;
-
-       rkcommon_vrec_header(params, tparams);
-
-       pad_size = RK_SPL_HDR_START + rkcommon_get_spl_size(params);
-       debug("pad_size %x\n", pad_size);
-
-       return pad_size - params->file_size - tparams->header_size;
+       /*
+        * Pad to the RK_BLK_SIZE (512 bytes) to be consistent with init_size
+        * being encoded in RK_BLK_SIZE units in header0 (see rkcommon.c).
+        */
+       return rkcommon_vrec_header(params, tparams, RK_BLK_SIZE);
 }
 
 /*
index d2d3fdda424eadc545aac09253d65ae574268ec7..87bd1a9e6eb950cab10962076bc8719dd5a8cda8 100644 (file)
@@ -39,8 +39,8 @@ static void rkspi_set_header(void *buf, struct stat *sbuf, int ifd,
        debug("size %x\n", size);
        if (ret) {
                /* TODO(sjg@chromium.org): This method should return an error */
-               printf("Warning: SPL image is too large (size %#x) and will not boot\n",
-                      size);
+               printf("Warning: SPL image is too large (size %#x) and will "
+                      "not boot\n", size);
        }
 
        /*
@@ -71,23 +71,36 @@ static int rkspi_check_image_type(uint8_t type)
                return EXIT_FAILURE;
 }
 
-/* We pad the file out to a fixed size - this method returns that size */
+/*
+ * The SPI payload needs to be padded out to make space for odd half-sector
+ * layout used in flash (i.e. only the first 2K of each 4K sector is used).
+ */
 static int rkspi_vrec_header(struct image_tool_params *params,
                             struct image_type_params *tparams)
 {
-       int pad_size;
-
-       rkcommon_vrec_header(params, tparams);
-
-       pad_size = (rkcommon_get_spl_size(params) + 0x7ff) / 0x800 * 0x800;
-       params->orig_file_size = pad_size;
+       int padding = rkcommon_vrec_header(params, tparams, 2048);
+       /*
+        * The file size has not been adjusted at this point (our caller will
+        * eventually add the header/padding to the file_size), so we need to
+        * add up the header_size, file_size and padding ourselves.
+        */
+       int padded_size = tparams->header_size + params->file_size + padding;
 
-       /* We will double the image size due to the SPI format */
-       pad_size *= 2;
-       pad_size += RK_SPL_HDR_START;
-       debug("pad_size %x\n", pad_size);
+       /*
+        * We need to store the original file-size (i.e. before padding), as
+        * imagetool does not set this during its adjustment of file_size.
+        */
+       params->orig_file_size = padded_size;
 
-       return pad_size - params->file_size - tparams->header_size;
+       /*
+        * Converting to the SPI format (i.e. splitting each 4K page into two
+        * 2K subpages and then padding these 2K pages up to take a complete
+        * 4K sector again) will will double the image size.
+        *
+        * Thus we return the padded_size as an additional padding requirement
+        * (be sure to add this to the padding returned from the common code).
+        */
+       return padded_size + padding;
 }
 
 /*