]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq
authorTom Rini <trini@konsulko.com>
Tue, 29 Mar 2016 16:58:45 +0000 (12:58 -0400)
committerTom Rini <trini@konsulko.com>
Tue, 29 Mar 2016 16:58:45 +0000 (12:58 -0400)
538 files changed:
arch/arm/Kconfig
arch/arm/cpu/armv7/Kconfig
arch/arm/cpu/armv7/omap5/dra7xx_iodelay.c
arch/arm/cpu/armv7/omap5/hw_data.c
arch/arm/cpu/armv7/omap5/hwinit.c
arch/arm/cpu/armv7/omap5/sdram.c
arch/arm/cpu/armv7/sunxi/board.c
arch/arm/cpu/armv7/sunxi/clock.c
arch/arm/cpu/armv7/sunxi/clock_sun6i.c
arch/arm/cpu/armv7/sunxi/clock_sun9i.c
arch/arm/cpu/armv7/sunxi/dram_sun8i_a83t.c
arch/arm/cpu/armv7/sunxi/usb_phy.c
arch/arm/cpu/pxa/Makefile
arch/arm/cpu/pxa/cache.c [new file with mode: 0644]
arch/arm/cpu/pxa/pxa2xx.c
arch/arm/cpu/pxa/start.S
arch/arm/dts/Makefile
arch/arm/dts/armada-xp-theadorable.dts
arch/arm/dts/axp22x.dtsi [new file with mode: 0644]
arch/arm/dts/pcm052.dts
arch/arm/dts/sun4i-a10-a1000.dts
arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts
arch/arm/dts/sun4i-a10-cubieboard.dts
arch/arm/dts/sun4i-a10-dserve-dsrv9703c.dts [new file with mode: 0644]
arch/arm/dts/sun4i-a10-gemei-g9.dts
arch/arm/dts/sun4i-a10-inet1.dts
arch/arm/dts/sun4i-a10-inet97fv2.dts
arch/arm/dts/sun4i-a10-inet9f-rev03.dts
arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts
arch/arm/dts/sun4i-a10-jesurun-q5.dts
arch/arm/dts/sun4i-a10-marsboard.dts
arch/arm/dts/sun4i-a10-mk802.dts
arch/arm/dts/sun4i-a10-olinuxino-lime.dts
arch/arm/dts/sun4i-a10-pcduino.dts
arch/arm/dts/sun4i-a10-pcduino2.dts [new file with mode: 0644]
arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts
arch/arm/dts/sun4i-a10.dtsi
arch/arm/dts/sun5i-a10s-auxtek-t004.dts
arch/arm/dts/sun5i-a10s-olinuxino-micro.dts
arch/arm/dts/sun5i-a13-difrnce-dit4350.dts [new file with mode: 0644]
arch/arm/dts/sun5i-a13-empire-electronix-d709.dts
arch/arm/dts/sun5i-a13-inet-98v-rev2.dts
arch/arm/dts/sun5i-a13-utoo-p66.dts
arch/arm/dts/sun5i-q8-common.dtsi
arch/arm/dts/sun5i-r8-chip.dts
arch/arm/dts/sun5i.dtsi
arch/arm/dts/sun6i-a31-colombus.dts
arch/arm/dts/sun6i-a31-hummingbird.dts
arch/arm/dts/sun6i-a31.dtsi
arch/arm/dts/sun6i-a31s-colorfly-e708-q1.dts [new file with mode: 0644]
arch/arm/dts/sun6i-a31s-primo81.dts
arch/arm/dts/sun6i-a31s-sina31s-core.dtsi [new file with mode: 0644]
arch/arm/dts/sun6i-a31s-sina31s.dts [new file with mode: 0644]
arch/arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts [new file with mode: 0644]
arch/arm/dts/sun7i-a20-bananapi.dts
arch/arm/dts/sun7i-a20-cubieboard2.dts
arch/arm/dts/sun7i-a20-cubietruck.dts
arch/arm/dts/sun7i-a20-icnova-swac.dts [new file with mode: 0644]
arch/arm/dts/sun7i-a20-itead-ibox.dts [new file with mode: 0644]
arch/arm/dts/sun7i-a20-lamobo-r1.dts
arch/arm/dts/sun7i-a20-mk808c.dts
arch/arm/dts/sun7i-a20-olimex-som-evb.dts
arch/arm/dts/sun7i-a20-olinuxino-lime.dts
arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
arch/arm/dts/sun7i-a20-olinuxino-micro.dts
arch/arm/dts/sun7i-a20-orangepi-mini.dts
arch/arm/dts/sun7i-a20-orangepi.dts
arch/arm/dts/sun7i-a20-pcduino3-nano.dts
arch/arm/dts/sun7i-a20-pcduino3.dts
arch/arm/dts/sun7i-a20-wexler-tab7200.dts
arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts
arch/arm/dts/sun7i-a20.dtsi
arch/arm/dts/sun8i-a23-a33.dtsi
arch/arm/dts/sun8i-a23-gt90h-v4.dts
arch/arm/dts/sun8i-a23-polaroid-mid2809pxe04.dts [new file with mode: 0644]
arch/arm/dts/sun8i-a23.dtsi
arch/arm/dts/sun8i-a33-sinlinx-sina33.dts
arch/arm/dts/sun8i-a33.dtsi
arch/arm/dts/sun8i-a83t-cubietruck-plus.dts [new file with mode: 0644]
arch/arm/dts/sun8i-a83t.dtsi
arch/arm/dts/sun8i-h3-orangepi-2.dts [new file with mode: 0644]
arch/arm/dts/sun8i-h3-orangepi-pc.dts
arch/arm/dts/sun8i-h3-orangepi-plus.dts
arch/arm/dts/sun8i-h3.dtsi
arch/arm/dts/sun8i-q8-common.dtsi
arch/arm/dts/sun9i-a80-cubieboard4.dts
arch/arm/dts/sun9i-a80-optimus.dts
arch/arm/dts/sun9i-a80.dtsi
arch/arm/dts/sunxi-itead-core-common.dtsi [new file with mode: 0644]
arch/arm/dts/sunxi-q8-common.dtsi
arch/arm/dts/uniphier-ph1-ld11-ref.dts [new file with mode: 0644]
arch/arm/dts/uniphier-ph1-ld11.dtsi [new file with mode: 0644]
arch/arm/dts/uniphier-ph1-ld20-ref.dts [new file with mode: 0644]
arch/arm/dts/uniphier-ph1-ld20.dtsi [new file with mode: 0644]
arch/arm/dts/uniphier-ph1-ld4-ref.dts
arch/arm/dts/uniphier-ph1-ld6b-ref.dts
arch/arm/dts/uniphier-ph1-pro4-ref.dts
arch/arm/dts/uniphier-ph1-sld3-ref.dts
arch/arm/dts/uniphier-ph1-sld8-ref.dts
arch/arm/dts/uniphier-pinctrl.dtsi
arch/arm/dts/uniphier-support-card.dtsi [new file with mode: 0644]
arch/arm/dts/vf610-twr.dts
arch/arm/include/asm/arch-mvebu/spi.h
arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h
arch/arm/include/asm/arch-omap5/omap.h
arch/arm/include/asm/arch-stm32f4/stm32.h
arch/arm/include/asm/arch-stm32f7/stm32.h
arch/arm/include/asm/arch-sunxi/cpu_sun4i.h
arch/arm/include/asm/arch-sunxi/sys_proto.h
arch/arm/include/asm/imx-common/mxc_i2c.h
arch/arm/include/asm/omap_common.h
arch/arm/include/asm/system.h
arch/arm/include/asm/types.h
arch/arm/lib/cache-cp15.c
arch/arm/mach-bcm283x/Kconfig
arch/arm/mach-bcm283x/include/mach/gpio.h
arch/arm/mach-bcm283x/include/mach/mbox.h
arch/arm/mach-bcm283x/include/mach/sdhci.h
arch/arm/mach-bcm283x/include/mach/timer.h
arch/arm/mach-bcm283x/include/mach/wdog.h
arch/arm/mach-bcm283x/init.c
arch/arm/mach-bcm283x/mbox.c
arch/arm/mach-bcm283x/phys2bus.c
arch/arm/mach-keystone/include/mach/psc_defs.h
arch/arm/mach-mvebu/include/mach/cpu.h
arch/arm/mach-stm32/stm32f4/Makefile
arch/arm/mach-stm32/stm32f4/clock.c
arch/arm/mach-uniphier/Kconfig
arch/arm/mach-uniphier/Makefile
arch/arm/mach-uniphier/arm32/debug_ll.S
arch/arm/mach-uniphier/bcu/Makefile
arch/arm/mach-uniphier/bcu/bcu-ld4.c [moved from arch/arm/mach-uniphier/bcu/bcu-ph1-ld4.c with 100% similarity]
arch/arm/mach-uniphier/bcu/bcu-sld3.c [moved from arch/arm/mach-uniphier/bcu/bcu-ph1-sld3.c with 100% similarity]
arch/arm/mach-uniphier/board_early_init_f.c
arch/arm/mach-uniphier/boards.c
arch/arm/mach-uniphier/boot-mode/Makefile
arch/arm/mach-uniphier/boot-mode/boot-mode-ld4.c [moved from arch/arm/mach-uniphier/boot-mode/boot-mode-ph1-ld4.c with 98% similarity]
arch/arm/mach-uniphier/boot-mode/boot-mode-pro5.c [moved from arch/arm/mach-uniphier/boot-mode/boot-mode-ph1-pro5.c with 100% similarity]
arch/arm/mach-uniphier/boot-mode/boot-mode-pxs2.c [moved from arch/arm/mach-uniphier/boot-mode/boot-mode-proxstream2.c with 100% similarity]
arch/arm/mach-uniphier/boot-mode/boot-mode-sld3.c [moved from arch/arm/mach-uniphier/boot-mode/boot-mode-ph1-sld3.c with 99% similarity]
arch/arm/mach-uniphier/boot-mode/boot-mode.c
arch/arm/mach-uniphier/boot-mode/cmd_pinmon.c
arch/arm/mach-uniphier/clk/Makefile
arch/arm/mach-uniphier/clk/clk-ld4.c [moved from arch/arm/mach-uniphier/clk/clk-ph1-ld4.c with 100% similarity]
arch/arm/mach-uniphier/clk/clk-pro4.c [moved from arch/arm/mach-uniphier/clk/clk-ph1-pro4.c with 100% similarity]
arch/arm/mach-uniphier/clk/clk-pro5.c [moved from arch/arm/mach-uniphier/clk/clk-ph1-pro5.c with 100% similarity]
arch/arm/mach-uniphier/clk/clk-pxs2.c [moved from arch/arm/mach-uniphier/clk/clk-proxstream2.c with 100% similarity]
arch/arm/mach-uniphier/debug-uart/Makefile [new file with mode: 0644]
arch/arm/mach-uniphier/debug-uart/debug-uart-ld20.c [new file with mode: 0644]
arch/arm/mach-uniphier/debug-uart/debug-uart-ld4.c [new file with mode: 0644]
arch/arm/mach-uniphier/debug-uart/debug-uart-ld6b.c [new file with mode: 0644]
arch/arm/mach-uniphier/debug-uart/debug-uart-pro4.c [new file with mode: 0644]
arch/arm/mach-uniphier/debug-uart/debug-uart-pro5.c [new file with mode: 0644]
arch/arm/mach-uniphier/debug-uart/debug-uart-pxs2.c [new file with mode: 0644]
arch/arm/mach-uniphier/debug-uart/debug-uart-sld3.c [new file with mode: 0644]
arch/arm/mach-uniphier/debug-uart/debug-uart-sld8.c [new file with mode: 0644]
arch/arm/mach-uniphier/debug-uart/debug-uart.c [new file with mode: 0644]
arch/arm/mach-uniphier/debug-uart/debug-uart.h [new file with mode: 0644]
arch/arm/mach-uniphier/dram/Makefile
arch/arm/mach-uniphier/dram/cmd_ddrphy.c
arch/arm/mach-uniphier/dram/ddrphy-ld4.c [moved from arch/arm/mach-uniphier/dram/ddrphy-ph1-ld4.c with 100% similarity]
arch/arm/mach-uniphier/dram/ddrphy-regs.h
arch/arm/mach-uniphier/dram/umc-ld4.c [moved from arch/arm/mach-uniphier/dram/umc-ph1-ld4.c with 100% similarity]
arch/arm/mach-uniphier/dram/umc-pro4.c [moved from arch/arm/mach-uniphier/dram/umc-ph1-pro4.c with 100% similarity]
arch/arm/mach-uniphier/dram/umc-pxs2.c [moved from arch/arm/mach-uniphier/dram/umc-proxstream2.c with 100% similarity]
arch/arm/mach-uniphier/dram/umc-sld8.c [moved from arch/arm/mach-uniphier/dram/umc-ph1-sld8.c with 100% similarity]
arch/arm/mach-uniphier/early-clk/Makefile
arch/arm/mach-uniphier/early-clk/early-clk-ld4.c [moved from arch/arm/mach-uniphier/early-clk/early-clk-ph1-ld4.c with 100% similarity]
arch/arm/mach-uniphier/early-clk/early-clk-pro5.c [moved from arch/arm/mach-uniphier/early-clk/early-clk-ph1-pro5.c with 100% similarity]
arch/arm/mach-uniphier/early-clk/early-clk-pxs2.c [moved from arch/arm/mach-uniphier/early-clk/early-clk-proxstream2.c with 100% similarity]
arch/arm/mach-uniphier/early-pinctrl/Makefile
arch/arm/mach-uniphier/early-pinctrl/early-pinctrl-sld3.c [moved from arch/arm/mach-uniphier/early-pinctrl/early-pinctrl-ph1-sld3.c with 100% similarity]
arch/arm/mach-uniphier/init.h
arch/arm/mach-uniphier/init/Makefile
arch/arm/mach-uniphier/init/init-ld4.c [moved from arch/arm/mach-uniphier/init/init-ph1-ld4.c with 93% similarity]
arch/arm/mach-uniphier/init/init-pro4.c [moved from arch/arm/mach-uniphier/init/init-ph1-pro4.c with 96% similarity]
arch/arm/mach-uniphier/init/init-pro5.c [moved from arch/arm/mach-uniphier/init/init-ph1-pro5.c with 95% similarity]
arch/arm/mach-uniphier/init/init-pxs2.c [moved from arch/arm/mach-uniphier/init/init-proxstream2.c with 92% similarity]
arch/arm/mach-uniphier/init/init-sld3.c [moved from arch/arm/mach-uniphier/init/init-ph1-sld3.c with 93% similarity]
arch/arm/mach-uniphier/init/init-sld8.c [moved from arch/arm/mach-uniphier/init/init-ph1-sld8.c with 93% similarity]
arch/arm/mach-uniphier/init/init.c
arch/arm/mach-uniphier/memconf/Makefile
arch/arm/mach-uniphier/memconf/memconf-pxs2.c [moved from arch/arm/mach-uniphier/memconf/memconf-proxstream2.c with 100% similarity]
arch/arm/mach-uniphier/memconf/memconf-sld3.c [moved from arch/arm/mach-uniphier/memconf/memconf-ph1-sld3.c with 100% similarity]
arch/arm/mach-uniphier/micro-support-card.c
arch/arm/mach-uniphier/pinctrl/Makefile
arch/arm/mach-uniphier/pinctrl/pinctrl-ld4.c [moved from arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-ld4.c with 100% similarity]
arch/arm/mach-uniphier/pinctrl/pinctrl-ld6b.c [moved from arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-ld6b.c with 100% similarity]
arch/arm/mach-uniphier/pinctrl/pinctrl-pro4.c [moved from arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-pro4.c with 100% similarity]
arch/arm/mach-uniphier/pinctrl/pinctrl-pro5.c [moved from arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-pro5.c with 100% similarity]
arch/arm/mach-uniphier/pinctrl/pinctrl-pxs2.c [moved from arch/arm/mach-uniphier/pinctrl/pinctrl-proxstream2.c with 100% similarity]
arch/arm/mach-uniphier/pinctrl/pinctrl-sld3.c [moved from arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-sld3.c with 100% similarity]
arch/arm/mach-uniphier/pinctrl/pinctrl-sld8.c [moved from arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-sld8.c with 100% similarity]
arch/arm/mach-uniphier/pll/Makefile
arch/arm/mach-uniphier/pll/pll-init-ld4.c [moved from arch/arm/mach-uniphier/pll/pll-init-ph1-ld4.c with 100% similarity]
arch/arm/mach-uniphier/pll/pll-init-pro4.c [moved from arch/arm/mach-uniphier/pll/pll-init-ph1-pro4.c with 100% similarity]
arch/arm/mach-uniphier/pll/pll-init-sld3.c [moved from arch/arm/mach-uniphier/pll/pll-init-ph1-sld3.c with 100% similarity]
arch/arm/mach-uniphier/pll/pll-init-sld8.c [moved from arch/arm/mach-uniphier/pll/pll-init-ph1-sld8.c with 100% similarity]
arch/arm/mach-uniphier/pll/pll-spectrum-ld4.c [moved from arch/arm/mach-uniphier/pll/pll-spectrum-ph1-ld4.c with 100% similarity]
arch/arm/mach-uniphier/pll/pll-spectrum-sld3.c [moved from arch/arm/mach-uniphier/pll/pll-spectrum-ph1-sld3.c with 100% similarity]
arch/arm/mach-uniphier/sbc/Makefile
arch/arm/mach-uniphier/sbc/sbc-admulti.c [moved from arch/arm/mach-uniphier/sbc/sbc-ph1-sld3.c with 75% similarity]
arch/arm/mach-uniphier/sbc/sbc-ld4.c [new file with mode: 0644]
arch/arm/mach-uniphier/sbc/sbc-ph1-pro4.c [deleted file]
arch/arm/mach-uniphier/sbc/sbc-proxstream2.c [deleted file]
arch/arm/mach-uniphier/sbc/sbc-pxs2.c [new file with mode: 0644]
arch/arm/mach-uniphier/sbc/sbc-regs.h
arch/arm/mach-uniphier/sbc/sbc-savepin.c [moved from arch/arm/mach-uniphier/sbc/sbc-ph1-ld4.c with 62% similarity]
arch/arm/mach-uniphier/sbc/sbc-sld3.c [new file with mode: 0644]
arch/arm/mach-uniphier/sc-regs.h
arch/arm/mach-uniphier/sc64-regs.h [new file with mode: 0644]
arch/arm/mach-uniphier/sg-regs.h
arch/arm/mach-uniphier/soc-info.h
arch/arm/mach-uniphier/soc_info.c
board/Marvell/db-88f6820-gp/binary.0 [deleted file]
board/raspberrypi/rpi/rpi.c
board/sunxi/Kconfig
board/sunxi/MAINTAINERS
board/sunxi/ahci.c
board/sunxi/board.c
board/sunxi/gmac.c
board/theadorable/Makefile
board/theadorable/fpga.c [new file with mode: 0644]
board/theadorable/theadorable.c
board/theadorable/theadorable.h [new file with mode: 0644]
board/ti/am57xx/board.c
board/ti/dra7xx/evm.c
board/ti/dra7xx/mux_data.h
board/zipitz2/Kconfig [new file with mode: 0644]
board/zipitz2/MAINTAINERS [new file with mode: 0644]
board/zipitz2/Makefile [new file with mode: 0644]
board/zipitz2/zipitz2.c [new file with mode: 0644]
cmd/bootefi.c
cmd/spi.c
common/console.c
common/lcd.c
common/menu.c
common/spl/spl.c
common/spl/spl_mmc.c
configs/A10-OLinuXino-Lime_defconfig
configs/A10s-OLinuXino-M_defconfig
configs/A13-OLinuXinoM_defconfig
configs/A13-OLinuXino_defconfig
configs/A20-OLinuXino-Lime2_defconfig
configs/A20-OLinuXino-Lime_defconfig
configs/A20-OLinuXino_MICRO_defconfig
configs/A20-Olimex-SOM-EVB_defconfig
configs/Ainol_AW1_defconfig
configs/Ampe_A76_defconfig
configs/Auxtek-T003_defconfig
configs/Auxtek-T004_defconfig
configs/Bananapi_defconfig
configs/Bananapro_defconfig
configs/CHIP_defconfig
configs/CSQ_CS908_defconfig
configs/Chuwi_V7_CW0825_defconfig
configs/Colombus_defconfig
configs/Cubieboard2_defconfig
configs/Cubieboard_defconfig
configs/Cubietruck_defconfig
configs/Cubietruck_plus_defconfig [new file with mode: 0644]
configs/Empire_electronix_d709_defconfig
configs/Hummingbird_A31_defconfig
configs/Hyundai_A7HD_defconfig
configs/Itead_Ibox_A20_defconfig [new file with mode: 0644]
configs/Lamobo_R1_defconfig
configs/Linksprite_pcDuino3_Nano_defconfig
configs/Linksprite_pcDuino3_defconfig
configs/Linksprite_pcDuino_defconfig
configs/MK808C_defconfig
configs/MSI_Primo73_defconfig
configs/MSI_Primo81_defconfig
configs/Marsboard_A10_defconfig
configs/Mele_A1000G_quad_defconfig
configs/Mele_A1000_defconfig
configs/Mele_I7_defconfig
configs/Mele_M3_defconfig
configs/Mele_M5_defconfig
configs/Mele_M9_defconfig
configs/Mini-X_defconfig
configs/Orangepi_defconfig
configs/Orangepi_mini_defconfig
configs/Sinlinx_SinA31s_defconfig [new file with mode: 0644]
configs/Sinlinx_SinA33_defconfig
configs/Sinovoip_BPI_M2_defconfig
configs/Sinovoip_BPI_M3_defconfig
configs/UTOO_P66_defconfig
configs/Wexler_TAB7200_defconfig
configs/Wits_Pro_A20_DKT_defconfig
configs/Wobo_i5_defconfig
configs/Yones_Toptech_BD1078_defconfig
configs/Yones_Toptech_BS1078_V2_defconfig [new file with mode: 0644]
configs/am335x_baltos_defconfig
configs/am335x_boneblack_defconfig
configs/am335x_boneblack_vboot_defconfig
configs/am335x_evm_defconfig
configs/am335x_evm_nor_defconfig
configs/am335x_evm_norboot_defconfig
configs/am335x_evm_spiboot_defconfig
configs/am335x_evm_usbspl_defconfig
configs/am335x_gp_evm_defconfig
configs/am437x_gp_evm_defconfig
configs/am437x_sk_evm_defconfig
configs/am43xx_evm_defconfig
configs/am43xx_evm_ethboot_defconfig
configs/am43xx_evm_qspiboot_defconfig
configs/am43xx_evm_usbhost_boot_defconfig
configs/apalis_t30_defconfig
configs/ba10_tv_box_defconfig
configs/bcm11130_defconfig
configs/bcm11130_nand_defconfig
configs/bcm28155_ap_defconfig
configs/bcm28155_w1d_defconfig
configs/beaver_defconfig
configs/birdland_bav335a_defconfig
configs/birdland_bav335b_defconfig
configs/cgtqmx6eval_defconfig
configs/colibri_t20_defconfig
configs/colibri_t30_defconfig
configs/colibri_vf_defconfig
configs/colorfly_e708_q1_defconfig [new file with mode: 0644]
configs/corvus_defconfig
configs/dalmore_defconfig
configs/difrnce_dit4350_defconfig [new file with mode: 0644]
configs/dra72_evm_defconfig
configs/dra74_evm_defconfig
configs/dra7xx_evm_defconfig
configs/dra7xx_evm_qspiboot_defconfig
configs/dra7xx_evm_uart3_defconfig
configs/draco_defconfig
configs/dserve_dsrv9703c_defconfig [new file with mode: 0644]
configs/e2220-1170_defconfig
configs/ga10h_v1_1_defconfig
configs/gt90h_v4_defconfig
configs/gwventana_defconfig
configs/i12-tvbox_defconfig
configs/iNet_3F_defconfig
configs/iNet_3W_defconfig
configs/iNet_86VS_defconfig
configs/icnova-a20-swac_defconfig [new file with mode: 0644]
configs/inet1_defconfig
configs/inet97fv2_defconfig
configs/inet98v_rev2_defconfig
configs/inet9f_rev03_defconfig
configs/jesurun_q5_defconfig
configs/jetson-tk1_defconfig
configs/kc1_defconfig
configs/ma5d4evk_defconfig
configs/mixtile_loftq_defconfig
configs/mk802_a10s_defconfig
configs/mk802_defconfig
configs/mk802ii_defconfig
configs/mx6dlsabreauto_defconfig
configs/mx6dlsabresd_defconfig
configs/mx6qpsabreauto_defconfig
configs/mx6qsabreauto_defconfig
configs/mx6qsabrelite_defconfig
configs/mx6qsabresd_defconfig
configs/mx6sabresd_spl_defconfig
configs/mx7dsabresd_defconfig
configs/nitrogen6dl2g_defconfig
configs/nitrogen6dl_defconfig
configs/nitrogen6q2g_defconfig
configs/nitrogen6q_defconfig
configs/nitrogen6s1g_defconfig
configs/nitrogen6s_defconfig
configs/nyan-big_defconfig
configs/odroid-xu3_defconfig
configs/odroid_defconfig
configs/omap3_beagle_defconfig
configs/omap3_logic_defconfig
configs/omap5_uevm_defconfig
configs/orangepi_2_defconfig [new file with mode: 0644]
configs/orangepi_pc_defconfig
configs/orangepi_plus_defconfig
configs/origen_defconfig
configs/p2371-0000_defconfig
configs/p2371-2180_defconfig
configs/p2571_defconfig
configs/pengwyn_defconfig
configs/polaroid_mid2809pxe04_defconfig [new file with mode: 0644]
configs/pov_protab2_ips9_defconfig
configs/pxm2_defconfig
configs/q8_a13_tablet_defconfig
configs/q8_a23_tablet_800x480_defconfig
configs/q8_a33_tablet_1024x600_defconfig
configs/q8_a33_tablet_800x480_defconfig
configs/r7-tv-dongle_defconfig
configs/rastaban_defconfig
configs/rut_defconfig
configs/s5p_goni_defconfig
configs/s5pc210_universal_defconfig
configs/sama5d2_xplained_mmc_defconfig
configs/sama5d2_xplained_spiflash_defconfig
configs/sama5d3xek_mmc_defconfig
configs/sama5d3xek_nandflash_defconfig
configs/sama5d3xek_spiflash_defconfig
configs/sama5d4_xplained_mmc_defconfig
configs/sama5d4_xplained_nandflash_defconfig
configs/sama5d4_xplained_spiflash_defconfig
configs/sama5d4ek_mmc_defconfig
configs/sama5d4ek_nandflash_defconfig
configs/sama5d4ek_spiflash_defconfig
configs/smartweb_defconfig
configs/sniper_defconfig
configs/socfpga_arria5_defconfig
configs/socfpga_cyclone5_defconfig
configs/socfpga_de0_nano_soc_defconfig
configs/socfpga_mcvevk_defconfig
configs/socfpga_sockit_defconfig
configs/socfpga_socrates_defconfig
configs/socfpga_sr1500_defconfig
configs/sunxi_Gemei_G9_defconfig
configs/taurus_defconfig
configs/tbs2910_defconfig
configs/theadorable_debug_defconfig
configs/theadorable_defconfig
configs/thuban_defconfig
configs/trats2_defconfig
configs/trats_defconfig
configs/uniphier_sld3_defconfig
configs/venice2_defconfig
configs/vinco_defconfig
configs/warp_defconfig
configs/xilinx_zynqmp_ep_defconfig
configs/zipitz2_defconfig [new file with mode: 0644]
configs/zynq_picozed_defconfig
configs/zynq_zc702_defconfig
configs/zynq_zc706_defconfig
configs/zynq_zed_defconfig
configs/zynq_zybo_defconfig
doc/README.clang
doc/README.uniphier
drivers/ddr/fsl/lc_common_dimm_params.c
drivers/ddr/marvell/a38x/ddr3_init.c
drivers/fpga/Makefile
drivers/fpga/altera.c
drivers/fpga/stratixv.c [new file with mode: 0644]
drivers/gpio/Kconfig
drivers/gpio/Makefile
drivers/gpio/mvebu_gpio.c [new file with mode: 0644]
drivers/gpio/sunxi_gpio.c
drivers/i2c/mxc_i2c.c
drivers/i2c/omap24xx_i2c.c
drivers/mmc/bcm2835_sdhci.c
drivers/mmc/mmc.c
drivers/mtd/Makefile
drivers/mtd/cfi_flash.c
drivers/mtd/nand/denali.c
drivers/mtd/stm32_flash.c [moved from arch/arm/mach-stm32/stm32f4/flash.c with 82% similarity]
drivers/mtd/stm32_flash.h [new file with mode: 0644]
drivers/net/rtl8169.c
drivers/pinctrl/uniphier/Kconfig
drivers/pinctrl/uniphier/Makefile
drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c [moved from drivers/pinctrl/uniphier/pinctrl-ph1-ld4.c with 100% similarity]
drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c [moved from drivers/pinctrl/uniphier/pinctrl-ph1-ld6b.c with 100% similarity]
drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c [moved from drivers/pinctrl/uniphier/pinctrl-ph1-pro4.c with 100% similarity]
drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c [moved from drivers/pinctrl/uniphier/pinctrl-ph1-pro5.c with 100% similarity]
drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c [moved from drivers/pinctrl/uniphier/pinctrl-proxstream2.c with 100% similarity]
drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c [moved from drivers/pinctrl/uniphier/pinctrl-ph1-sld8.c with 100% similarity]
drivers/serial/Kconfig
drivers/serial/Makefile
drivers/serial/serial_bcm283x_mu.c [new file with mode: 0644]
drivers/usb/Kconfig
drivers/usb/gadget/Kconfig [new file with mode: 0644]
drivers/usb/host/ehci-sunxi.c
drivers/usb/host/ohci-sunxi.c
drivers/video/bcm2835.c
drivers/video/pxa_lcd.c
drivers/video/sunxi_display.c
include/altera.h
include/configs/am335x_evm.h
include/configs/am43xx_evm.h
include/configs/baltos.h
include/configs/bav335x.h
include/configs/bcm28155_ap.h
include/configs/cgtqmx6eval.h
include/configs/colibri_vf.h
include/configs/corvus.h
include/configs/dra7xx_evm.h
include/configs/exynos4-common.h
include/configs/gw_ventana.h
include/configs/kc1.h
include/configs/ma5d4evk.h
include/configs/mx6sabre_common.h
include/configs/mx7dsabresd.h
include/configs/nitrogen6x.h
include/configs/odroid_xu3.h
include/configs/omap3_beagle.h
include/configs/omap3_logic.h
include/configs/omap5_uevm.h
include/configs/pengwyn.h
include/configs/pxa-common.h
include/configs/rpi-common.h
include/configs/rpi.h
include/configs/rpi_2.h
include/configs/s5p_goni.h
include/configs/s5pc210_universal.h
include/configs/sama5d2_xplained.h
include/configs/sama5d3xek.h
include/configs/sama5d4_xplained.h
include/configs/sama5d4ek.h
include/configs/sheevaplug.h
include/configs/siemens-am33x-common.h
include/configs/smartweb.h
include/configs/smdkv310.h
include/configs/sniper.h
include/configs/socfpga_common.h
include/configs/stm32f429-discovery.h
include/configs/stm32f746-disco.h
include/configs/sunxi-common.h
include/configs/taurus.h
include/configs/tbs2910.h
include/configs/tegra-common-usb-gadget.h
include/configs/theadorable.h
include/configs/uniphier.h
include/configs/vinco.h
include/configs/warp.h
include/configs/xilinx_zynqmp.h
include/configs/zipitz2.h [new file with mode: 0644]
include/configs/zynq-common.h
include/dm/platform_data/serial_bcm283x_mu.h [new file with mode: 0644]
include/dt-bindings/clock/sun4i-a10-pll2.h [new file with mode: 0644]
include/dt-bindings/input/input.h
include/dt-bindings/input/linux-event-codes.h [new file with mode: 0644]
include/efi_api.h
include/efi_loader.h
include/flash.h
include/net.h
lib/efi/efi_stub.c
lib/efi_loader/Makefile
lib/efi_loader/efi_boottime.c
lib/efi_loader/efi_gop.c [new file with mode: 0644]
lib/efi_loader/efi_image_loader.c
net/bootp.c
tools/env/fw_env.c
tools/env/fw_env_main.c
tools/kwboot.c

index e5f57efa492c07a26fe01bcfee693a7f1a87aa36..985106557450bc7594f9d1ed00a1aaeaadcfac4b 100644 (file)
@@ -7,6 +7,10 @@ config SYS_ARCH
 config ARM64
        bool
 
+config DMA_ADDR_T_64BIT
+       bool
+       default y if ARM64
+
 config HAS_VBAR
         bool
 
@@ -531,6 +535,7 @@ config ARCH_SUNXI
        select DM_KEYBOARD
        select DM_SERIAL
        select DM_USB
+       select OF_BOARD_SETUP
        select OF_CONTROL
        select OF_SEPARATE
        select SPL_STACK_R if !MACH_SUN9I
@@ -686,6 +691,10 @@ config TARGET_H2200
        bool "Support h2200"
        select CPU_PXA
 
+config TARGET_ZIPITZ2
+       bool "Support zipitz2"
+       select CPU_PXA
+
 config TARGET_COLIBRI_PXA270
        bool "Support colibri_pxa270"
        select CPU_PXA
@@ -859,6 +868,7 @@ source "board/technologic/ts4800/Kconfig"
 source "board/vscom/baltos/Kconfig"
 source "board/woodburn/Kconfig"
 source "board/work-microwave/work_92105/Kconfig"
+source "board/zipitz2/Kconfig"
 
 source "arch/arm/Kconfig.debug"
 
index 6c5d5dd8e01143e5d218429d31095b48739f7350..afeaac84dec1016b090bb6f41bca613daee8547c 100644 (file)
@@ -31,4 +31,12 @@ config ARMV7_VIRT
        ---help---
        Say Y here to boot in hypervisor (HYP) mode when booting non-secure.
 
+config ARMV7_LPAE
+       boolean "Use LPAE page table format" if EXPERT
+       depends on CPU_V7
+       default n
+       ---help---
+       Say Y here to use the long descriptor page table format. This is
+       required if U-Boot runs in HYP mode.
+
 endif
index 9fa6e6991f0ef7d168ed53f3903e9a16e8448568..87987308aced133b88504e3bf27266c90b903753 100644 (file)
@@ -138,8 +138,8 @@ static u32 get_cfg_reg(u16 a_delay, u16 g_delay, u32 cpde, u32 fpde)
        return reg;
 }
 
-static int do_set_iodelay(u32 base, struct iodelay_cfg_entry const *array,
-                          int niodelays)
+int do_set_iodelay(u32 base, struct iodelay_cfg_entry const *array,
+                  int niodelays)
 {
        struct iodelay_cfg_entry *iodelay = (struct iodelay_cfg_entry *)array;
        u32 reg, cpde, fpde, i;
@@ -166,16 +166,14 @@ static int do_set_iodelay(u32 base, struct iodelay_cfg_entry const *array,
        return 0;
 }
 
-void __recalibrate_iodelay(struct pad_conf_entry const *pad, int npads,
-                          struct iodelay_cfg_entry const *iodelay,
-                          int niodelays)
+int __recalibrate_iodelay_start(void)
 {
        int ret = 0;
 
        /* IO recalibration should be done only from SRAM */
        if (OMAP_INIT_CONTEXT_SPL != omap_hw_init_context()) {
                puts("IODELAY recalibration called from invalid context - use only from SPL in SRAM\n");
-               return;
+               return -1;
        }
 
        /* unlock IODELAY CONFIG registers */
@@ -191,23 +189,27 @@ void __recalibrate_iodelay(struct pad_conf_entry const *pad, int npads,
                goto err;
 
        ret = update_delay_mechanism((*ctrl)->iodelay_config_base);
-       if (ret)
-               goto err;
 
-       /* Configure Mux settings */
-       do_set_mux32((*ctrl)->control_padconf_core_base, pad, npads);
+err:
+       return ret;
+}
 
-       /* Configure Manual IO timing modes */
-       ret = do_set_iodelay((*ctrl)->iodelay_config_base, iodelay, niodelays);
-       if (ret)
-               goto err;
+void __recalibrate_iodelay_end(int ret)
+{
 
-       ret = isolate_io(DEISOLATE_IO);
+       /* IO recalibration should be done only from SRAM */
+       if (OMAP_INIT_CONTEXT_SPL != omap_hw_init_context()) {
+               puts("IODELAY recalibration called from invalid context - use only from SPL in SRAM\n");
+               return;
+       }
+
+       if (!ret)
+               ret = isolate_io(DEISOLATE_IO);
 
-err:
        /* lock IODELAY CONFIG registers */
        writel(CFG_IODELAY_LOCK_KEY, (*ctrl)->iodelay_config_base +
               CFG_REG_8_OFFSET);
+
        /*
         * UART cannot be used during IO recalibration sequence as IOs are in
         * isolation. So error handling and debug prints are done after
@@ -232,7 +234,41 @@ err:
        case ERR_FPDE:
                puts("IODELAY: FPDE calculation failed\n");
                break;
+       case -1:
+               puts("IODELAY: Wrong Context call?\n");
+               break;
        default:
                debug("IODELAY: IO delay recalibration successfully completed\n");
        }
+
+       return;
+}
+
+void __recalibrate_iodelay(struct pad_conf_entry const *pad, int npads,
+                          struct iodelay_cfg_entry const *iodelay,
+                          int niodelays)
+{
+       int ret = 0;
+
+       /* IO recalibration should be done only from SRAM */
+       if (OMAP_INIT_CONTEXT_SPL != omap_hw_init_context()) {
+               puts("IODELAY recalibration called from invalid context - use only from SPL in SRAM\n");
+               return;
+       }
+
+       ret = __recalibrate_iodelay_start();
+       if (ret)
+               goto err;
+
+       /* Configure Mux settings */
+       do_set_mux32((*ctrl)->control_padconf_core_base, pad, npads);
+
+       /* Configure Manual IO timing modes */
+       ret = do_set_iodelay((*ctrl)->iodelay_config_base, iodelay, niodelays);
+       if (ret)
+               goto err;
+
+err:
+       __recalibrate_iodelay_end(ret);
+
 }
index 7f8c0a423bad59305ecaa2ce4e4ae8d5ee9c65de..b69c0d13715a45353d70f7352f03a72fb6b94d1b 100644 (file)
@@ -743,6 +743,18 @@ const struct ctrl_ioregs ioregs_dra72x_es1 = {
        .ctrl_ddr_ctrl_ext_0 = 0xA2000000,
 };
 
+const struct ctrl_ioregs ioregs_dra72x_es2 = {
+       .ctrl_ddrch = 0x40404040,
+       .ctrl_lpddr2ch = 0x40404040,
+       .ctrl_ddr3ch = 0x60606060,
+       .ctrl_ddrio_0 = 0x00094A40,
+       .ctrl_ddrio_1 = 0x00000000,
+       .ctrl_ddrio_2 = 0x00000000,
+       .ctrl_emif_sdram_config_ext = 0x0001C1A7,
+       .ctrl_emif_sdram_config_ext_final = 0x0001C1A7,
+       .ctrl_ddr_ctrl_ext_0 = 0xA2000000,
+};
+
 void __weak hw_data_init(void)
 {
        u32 omap_rev = omap_revision();
@@ -775,6 +787,7 @@ void __weak hw_data_init(void)
        break;
 
        case DRA722_ES1_0:
+       case DRA722_ES2_0:
        *prcm = &dra7xx_prcm;
        *dplls_data = &dra72x_dplls;
        *omap_vcores = &dra722_volts;
@@ -809,6 +822,9 @@ void get_ioregs(const struct ctrl_ioregs **regs)
        case DRA722_ES1_0:
                *regs = &ioregs_dra72x_es1;
                break;
+       case DRA722_ES2_0:
+               *regs = &ioregs_dra72x_es2;
+               break;
 
        default:
                printf("\n INVALID OMAP REVISION ");
index 8f184df2abb74a5bbb0d7d7c33a56f0d9cbc0e43..e3ac8bbe9524744860c69c966364fd9392cb1f86 100644 (file)
@@ -373,6 +373,9 @@ void init_omap_revision(void)
        case DRA722_CONTROL_ID_CODE_ES1_0:
                *omap_si_rev = DRA722_ES1_0;
                break;
+       case DRA722_CONTROL_ID_CODE_ES2_0:
+               *omap_si_rev = DRA722_ES2_0;
+               break;
        default:
                *omap_si_rev = OMAP5430_SILICON_ID_INVALID;
        }
index 7dc5bb7e4a4b4ee5819b090ae57306092c749e70..7712923d8572072a11566f44067fd2374531010c 100644 (file)
@@ -398,6 +398,45 @@ dra_ddr3_ext_phy_ctrl_const_base_666MHz[] = {
        0x0
 };
 
+const u32 dra_ddr3_ext_phy_ctrl_const_base_666MHz_es2[] = {
+       0x04040100,
+       0x006B009F,
+       0x006B00A2,
+       0x006B00A8,
+       0x006B00A8,
+       0x006B00B2,
+       0x002F002F,
+       0x002F002F,
+       0x002F002F,
+       0x002F002F,
+       0x002F002F,
+       0x00600073,
+       0x00600071,
+       0x0060007C,
+       0x0060007E,
+       0x00600084,
+       0x00400053,
+       0x00400051,
+       0x0040005C,
+       0x0040005E,
+       0x00400064,
+       0x00800080,
+       0x00800080,
+       0x40010080,
+       0x08102040,
+       0x005B008F,
+       0x005B0092,
+       0x005B0098,
+       0x005B0098,
+       0x005B00A2,
+       0x00300043,
+       0x00300041,
+       0x0030004C,
+       0x0030004E,
+       0x00300054,
+       0x00000077
+};
+
 const struct lpddr2_mr_regs mr_regs = {
        .mr1    = MR1_BL_8_BT_SEQ_WRAP_EN_NWR_8,
        .mr2    = 0x6,
@@ -441,6 +480,10 @@ void __weak emif_get_ext_phy_ctrl_const_regs(u32 emif_nr,
                *regs = dra_ddr3_ext_phy_ctrl_const_base_666MHz;
                *size = ARRAY_SIZE(dra_ddr3_ext_phy_ctrl_const_base_666MHz);
                break;
+       case DRA722_ES2_0:
+               *regs = dra_ddr3_ext_phy_ctrl_const_base_666MHz_es2;
+               *size = ARRAY_SIZE(dra_ddr3_ext_phy_ctrl_const_base_666MHz_es2);
+               break;
        default:
                *regs = ddr3_ext_phy_ctrl_const_base_es2;
                *size = ARRAY_SIZE(ddr3_ext_phy_ctrl_const_base_es2);
@@ -670,6 +713,7 @@ const struct read_write_regs *get_bug_regs(u32 *iterations)
        case DRA752_ES1_1:
        case DRA752_ES2_0:
        case DRA722_ES1_0:
+       case DRA722_ES2_0:
                bug_00339_regs_ptr = dra_bug_00339_regs;
                *iterations = sizeof(dra_bug_00339_regs)/
                             sizeof(dra_bug_00339_regs[0]);
index eb5f4b686ea7416f02cb9377d2e4d78413ad350e..7653148c67e5517116947818b44b124cdac74ee3 100644 (file)
@@ -113,11 +113,27 @@ int spl_board_load_image(void)
 
 void s_init(void)
 {
-#if defined CONFIG_MACH_SUN6I || defined CONFIG_MACH_SUN8I_A23
-       /* Magic (undocmented) value taken from boot0, without this DRAM
-        * access gets messed up (seems cache related) */
+       /*
+        * Undocumented magic taken from boot0, without this DRAM
+        * access gets messed up (seems cache related).
+        * The boot0 sources describe this as: "config ema for cache sram"
+        */
+#if defined CONFIG_MACH_SUN6I
        setbits_le32(SUNXI_SRAMC_BASE + 0x44, 0x1800);
+#elif defined CONFIG_MACH_SUN8I_A23
+       uint version;
+
+       /* Unlock sram version info reg, read it, relock */
+       setbits_le32(SUNXI_SRAMC_BASE + 0x24, (1 << 15));
+       version = readl(SUNXI_SRAMC_BASE + 0x24);
+       clrbits_le32(SUNXI_SRAMC_BASE + 0x24, (1 << 15));
+
+       if ((version & 0xffff0000) == 0x16500000)
+               setbits_le32(SUNXI_SRAMC_BASE + 0x44, 0x1800);
+       else /* 0x1661 ? */
+               setbits_le32(SUNXI_SRAMC_BASE + 0x44, 0xc0);
 #endif
+
 #if defined CONFIG_MACH_SUN6I || \
     defined CONFIG_MACH_SUN7I || \
     defined CONFIG_MACH_SUN8I
@@ -136,6 +152,7 @@ void s_init(void)
        timer_init();
        gpio_init();
        i2c_init_board();
+       eth_init_board();
 }
 
 #ifdef CONFIG_SPL_BUILD
@@ -243,30 +260,3 @@ void enable_caches(void)
        dcache_enable();
 }
 #endif
-
-#ifdef CONFIG_CMD_NET
-/*
- * Initializes on-chip ethernet controllers.
- * to override, implement board_eth_init()
- */
-int cpu_eth_init(bd_t *bis)
-{
-       __maybe_unused int rc;
-
-#ifdef CONFIG_MACPWR
-       gpio_request(CONFIG_MACPWR, "macpwr");
-       gpio_direction_output(CONFIG_MACPWR, 1);
-       mdelay(200);
-#endif
-
-#ifdef CONFIG_SUNXI_GMAC
-       rc = sunxi_gmac_initialize(bis);
-       if (rc < 0) {
-               printf("sunxi: failed to initialize gmac\n");
-               return rc;
-       }
-#endif
-
-       return 0;
-}
-#endif
index 5cc5d25d2bd3ee4dc3e8a12cfa17be6fd4a343fe..0b8fc94711c8cc5788073422f89d592e34251609 100644 (file)
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/gpio.h>
+#include <asm/arch/prcm.h>
 #include <asm/arch/sys_proto.h>
 
 __weak void clock_init_sec(void)
@@ -28,3 +29,37 @@ int clock_init(void)
 
        return 0;
 }
+
+/* These functions are shared between various SoCs so put them here. */
+#if defined CONFIG_SUNXI_GEN_SUN6I && !defined CONFIG_MACH_SUN9I
+int clock_twi_onoff(int port, int state)
+{
+       struct sunxi_ccm_reg *const ccm =
+               (struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
+
+       if (port == 5) {
+               if (state)
+                       prcm_apb0_enable(
+                               PRCM_APB0_GATE_PIO | PRCM_APB0_GATE_I2C);
+               else
+                       prcm_apb0_disable(
+                               PRCM_APB0_GATE_PIO | PRCM_APB0_GATE_I2C);
+               return 0;
+       }
+
+       /* set the apb clock gate and reset for twi */
+       if (state) {
+               setbits_le32(&ccm->apb2_gate,
+                            CLK_GATE_OPEN << (APB2_GATE_TWI_SHIFT + port));
+               setbits_le32(&ccm->apb2_reset_cfg,
+                            1 << (APB2_RESET_TWI_SHIFT + port));
+       } else {
+               clrbits_le32(&ccm->apb2_reset_cfg,
+                            1 << (APB2_RESET_TWI_SHIFT + port));
+               clrbits_le32(&ccm->apb2_gate,
+                            CLK_GATE_OPEN << (APB2_GATE_TWI_SHIFT + port));
+       }
+
+       return 0;
+}
+#endif
index 700b605ab3a93936a8c638bab273aa22c9095fe2..15272c9e7176c753ed5f5c897eda75f63983c114 100644 (file)
@@ -85,32 +85,6 @@ void clock_init_uart(void)
 #endif
 }
 
-int clock_twi_onoff(int port, int state)
-{
-       struct sunxi_ccm_reg *const ccm =
-               (struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
-
-       if (port == 5) {
-               if (state)
-                       prcm_apb0_enable(
-                               PRCM_APB0_GATE_PIO | PRCM_APB0_GATE_I2C);
-               else
-                       prcm_apb0_disable(
-                               PRCM_APB0_GATE_PIO | PRCM_APB0_GATE_I2C);
-               return 0;
-       }
-
-       /* set the apb clock gate for twi */
-       if (state)
-               setbits_le32(&ccm->apb2_gate,
-                            CLK_GATE_OPEN << (APB2_GATE_TWI_SHIFT+port));
-       else
-               clrbits_le32(&ccm->apb2_gate,
-                            CLK_GATE_OPEN << (APB2_GATE_TWI_SHIFT+port));
-
-       return 0;
-}
-
 #ifdef CONFIG_SPL_BUILD
 void clock_set_pll1(unsigned int clk)
 {
index 27179ba19c601b4ed99ec2bf5b47778e1b278a68..180634c838932de6f596c8098d002e8e0fee60c6 100644 (file)
@@ -43,10 +43,10 @@ int clock_twi_onoff(int port, int state)
                setbits_le32(&ccm->apb1_gate,
                             CLK_GATE_OPEN << (APB1_GATE_TWI_SHIFT + port));
                setbits_le32(&ccm->apb1_reset_cfg,
-                            1 << (APB1_RESET_UART_SHIFT + port));
+                            1 << (APB1_RESET_TWI_SHIFT + port));
        } else {
                clrbits_le32(&ccm->apb1_reset_cfg,
-                            1 << (APB1_RESET_UART_SHIFT + port));
+                            1 << (APB1_RESET_TWI_SHIFT + port));
                clrbits_le32(&ccm->apb1_gate,
                             CLK_GATE_OPEN << (APB1_GATE_TWI_SHIFT + port));
        }
index 7c46acdbf2ecf844a4a1036ba0aae0cd0e33fa56..55df1b9d54971b756c4aab4af7777ecaa464acb7 100644 (file)
@@ -280,7 +280,7 @@ static int mctl_channel_init(struct dram_para *para)
 
        writel(0x94be6fa3, MCTL_PROTECT);
        udelay(100);
-       clrsetbits_le32(MX_UPD2, 0xfff << 16, 0x50 << 26);
+       clrsetbits_le32(MX_UPD2, 0xfff << 16, 0x50 << 16);
        writel(0x0, MCTL_PROTECT);
        udelay(100);
 
index 6ac96ccf86269283d16138748336a5b4dd2b8ad8..0749fbdadc30febd0d8695ce6cf00c1aba594e50 100644 (file)
@@ -76,6 +76,7 @@ static int get_vbus_gpio(int index)
        case 0: return sunxi_name_to_gpio(CONFIG_USB0_VBUS_PIN);
        case 1: return sunxi_name_to_gpio(CONFIG_USB1_VBUS_PIN);
        case 2: return sunxi_name_to_gpio(CONFIG_USB2_VBUS_PIN);
+       case 3: return sunxi_name_to_gpio(CONFIG_USB3_VBUS_PIN);
        }
        return -EINVAL;
 }
index 3ee08cd188756807947910f12928366b77c7cab0..79fcb7398b3f58edb4367b8d82310287e8bada42 100644 (file)
@@ -14,3 +14,4 @@ obj-y += cpuinfo.o
 obj-y  += timer.o
 obj-y  += usb.o
 obj-y  += relocate.o
+obj-y  += cache.o
diff --git a/arch/arm/cpu/pxa/cache.c b/arch/arm/cpu/pxa/cache.c
new file mode 100644 (file)
index 0000000..7aba112
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * (C) Copyright 2016 Vasily Khoruzhick <anarsoul@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <linux/types.h>
+#include <common.h>
+
+#ifndef CONFIG_SYS_DCACHE_OFF
+
+#ifndef CONFIG_SYS_CACHELINE_SIZE
+#define CONFIG_SYS_CACHELINE_SIZE      32
+#endif
+
+void invalidate_dcache_all(void)
+{
+       /* Flush/Invalidate I cache */
+       asm volatile("mcr p15, 0, %0, c7, c5, 0\n" : : "r"(0));
+       /* Flush/Invalidate D cache */
+       asm volatile("mcr p15, 0, %0, c7, c6, 0\n" : : "r"(0));
+}
+
+void flush_dcache_all(void)
+{
+       return invalidate_dcache_all();
+}
+
+void invalidate_dcache_range(unsigned long start, unsigned long stop)
+{
+       start &= ~(CONFIG_SYS_CACHELINE_SIZE - 1);
+       stop &= ~(CONFIG_SYS_CACHELINE_SIZE - 1);
+
+       while (start <= stop) {
+               asm volatile("mcr p15, 0, %0, c7, c6, 1\n" : : "r"(start));
+               start += CONFIG_SYS_CACHELINE_SIZE;
+       }
+}
+
+void flush_dcache_range(unsigned long start, unsigned long stop)
+{
+       return invalidate_dcache_range(start, stop);
+}
+#else /* #ifndef CONFIG_SYS_DCACHE_OFF */
+void invalidate_dcache_all(void)
+{
+}
+
+void flush_dcache_all(void)
+{
+}
+#endif /* #ifndef CONFIG_SYS_DCACHE_OFF */
+
+/*
+ * Stub implementations for l2 cache operations
+ */
+
+__weak void l2_cache_disable(void) {}
+
+#if defined CONFIG_SYS_THUMB_BUILD
+__weak void invalidate_l2_cache(void) {}
+#endif
index 2f12fb9c82553c74263e0b41e6116540cd5a3bfe..77f0ef2de4ae8e9297ae8d77a2d31eb4cf9a5798 100644 (file)
@@ -284,3 +284,13 @@ void reset_cpu(ulong ignored)
        for (;;)
                ;
 }
+
+void enable_caches(void)
+{
+#ifndef CONFIG_SYS_ICACHE_OFF
+       icache_enable();
+#endif
+#ifndef CONFIG_SYS_DCACHE_OFF
+       dcache_enable();
+#endif
+}
index 24b6ad187ae75aa377a5a7c1b75472dd51113579..ce1181a6c55707eed8f648098019b92b45e89402 100644 (file)
@@ -53,7 +53,15 @@ reset:
 #ifdef CONFIG_CPU_PXA25X
        bl      lock_cache_for_stack
 #endif
-
+#ifdef CONFIG_CPU_PXA27X
+       /*
+        * enable clock for SRAM
+        */
+       ldr     r0,=CKEN
+       ldr     r1,[r0]
+       orr     r1,r1,#(1 << 20)
+       str     r1,[r0]
+#endif
        bl      _main
 
 /*------------------------------------------------------------------------------*/
index 578038be21f99a8bc67923b8c01902be2922f317..50bcc0b5b9850c44353838102883d520b6c0a3bb 100644 (file)
@@ -57,6 +57,8 @@ dtb-$(CONFIG_ARCH_MVEBU) +=                   \
        armada-xp-theadorable.dtb
 
 dtb-$(CONFIG_ARCH_UNIPHIER) += \
+       uniphier-ph1-ld11-ref.dtb \
+       uniphier-ph1-ld20-ref.dtb \
        uniphier-ph1-ld4-ref.dtb \
        uniphier-ph1-ld6b-ref.dtb \
        uniphier-ph1-pro4-ace.dtb \
@@ -110,6 +112,7 @@ dtb-$(CONFIG_MACH_SUN4I) += \
        sun4i-a10-ba10-tvbox.dtb \
        sun4i-a10-chuwi-v7-cw0825.dtb \
        sun4i-a10-cubieboard.dtb \
+       sun4i-a10-dserve-dsrv9703c.dtb \
        sun4i-a10-gemei-g9.dtb \
        sun4i-a10-hackberry.dtb \
        sun4i-a10-hyundai-a7hd.dtb \
@@ -126,6 +129,7 @@ dtb-$(CONFIG_MACH_SUN4I) += \
        sun4i-a10-mk802ii.dtb \
        sun4i-a10-olinuxino-lime.dtb \
        sun4i-a10-pcduino.dtb \
+       sun4i-a10-pcduino2.dtb \
        sun4i-a10-pov-protab2-ips9.dtb
 dtb-$(CONFIG_MACH_SUN5I) += \
        sun5i-a10s-auxtek-t003.dtb \
@@ -135,6 +139,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \
        sun5i-a10s-r7-tv-dongle.dtb \
        sun5i-a10s-wobo-i5.dtb \
        sun5i-a13-ampe-a76.dtb \
+       sun5i-a13-difrnce-dit4350.dtb \
        sun5i-a13-empire-electronix-d709.dtb \
        sun5i-a13-hsg-h702.dtb \
        sun5i-a13-inet-86vs.dtb \
@@ -152,9 +157,12 @@ dtb-$(CONFIG_MACH_SUN6I) += \
        sun6i-a31-m9.dtb \
        sun6i-a31-mele-a1000g-quad.dtb \
        sun6i-a31-mixtile-loftq.dtb \
+       sun6i-a31s-colorfly-e708-q1.dtb \
        sun6i-a31s-cs908.dtb \
        sun6i-a31s-primo81.dtb \
-       sun6i-a31s-sinovoip-bpi-m2.dtb
+       sun6i-a31s-sina31s.dtb \
+       sun6i-a31s-sinovoip-bpi-m2.dtb \
+       sun6i-a31s-yones-toptech-bs1078-v2.dtb
 dtb-$(CONFIG_MACH_SUN7I) += \
        sun7i-a20-ainol-aw1.dtb \
        sun7i-a20-bananapi.dtb \
@@ -163,6 +171,8 @@ dtb-$(CONFIG_MACH_SUN7I) += \
        sun7i-a20-cubietruck.dtb \
        sun7i-a20-hummingbird.dtb \
        sun7i-a20-i12-tvbox.dtb \
+       sun7i-a20-icnova-swac.dtb \
+       sun7i-a20-itead-ibox.dtb \
        sun7i-a20-lamobo-r1.dtb \
        sun7i-a20-m3.dtb \
        sun7i-a20-m5.dtb \
@@ -182,6 +192,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
 dtb-$(CONFIG_MACH_SUN8I_A23) += \
        sun8i-a23-evb.dtb \
        sun8i-a23-gt90h-v4.dtb \
+       sun8i-a23-polaroid-mid2809pxe04.dtb \
        sun8i-a23-q8-tablet.dtb
 dtb-$(CONFIG_MACH_SUN8I_A33) += \
        sun8i-a33-ga10h-v1.1.dtb \
@@ -189,8 +200,10 @@ dtb-$(CONFIG_MACH_SUN8I_A33) += \
        sun8i-a33-sinlinx-sina33.dtb
 dtb-$(CONFIG_MACH_SUN8I_A83T) += \
        sun8i-a83t-allwinner-h8homlet-v2.dtb \
+       sun8i-a83t-cubietruck-plus.dtb \
        sun8i-a83t-sinovoip-bpi-m3.dtb
 dtb-$(CONFIG_MACH_SUN8I_H3) += \
+       sun8i-h3-orangepi-2.dtb \
        sun8i-h3-orangepi-pc.dtb \
        sun8i-h3-orangepi-plus.dtb
 dtb-$(CONFIG_MACH_SUN9I) += \
index cf1be2a3d4eb94fa035c1343d876a561a0c85fc0..7087ccfc2f0f60565b7824233dbb055e2fb1942b 100644 (file)
@@ -69,6 +69,7 @@
 
        aliases {
                spi0 = &spi0;
+               spi1 = &spi1;
                ethernet0 = &eth0;
        };
 
                                        reg = <0>; /* Chip select 0 */
                                        spi-max-frequency = <27777777>;
                                };
+
+                               fpga@1 {
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+                                       compatible = "spi-generic-device";
+                                       reg = <1>; /* Chip select 1 */
+                                       spi-max-frequency = <27777777>;
+                               };
+                       };
+
+                       spi1: spi@10680 {
+                               status = "okay";
+
+                               fpga@2 {
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+                                       compatible = "spi-generic-device";
+                                       reg = <2>; /* Chip select 2 */
+                                       spi-max-frequency = <27777777>;
+                               };
                        };
                };
        };
diff --git a/arch/arm/dts/axp22x.dtsi b/arch/arm/dts/axp22x.dtsi
new file mode 100644 (file)
index 0000000..0cfec50
--- /dev/null
@@ -0,0 +1,145 @@
+/*
+ * Copyright 2015 Chen-Yu Tsai
+ *
+ * Chen-Yu Tsai <wens@csie.org>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * 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.
+ */
+
+/*
+ * AXP221/221s/223 Integrated Power Management Chip
+ * http://www.x-powers.com/product/AXP22X.php
+ * http://dl.linux-sunxi.org/AXP/AXP221%20Datasheet%20V1.2%2020130326%20.pdf
+ */
+
+&axp22x {
+       interrupt-controller;
+       #interrupt-cells = <1>;
+
+       regulators {
+               /* Default work frequency for buck regulators */
+               x-powers,dcdc-freq = <3000>;
+
+               reg_dcdc1: dcdc1 {
+                       regulator-name = "dcdc1";
+               };
+
+               reg_dcdc2: dcdc2 {
+                       regulator-name = "dcdc2";
+               };
+
+               reg_dcdc3: dcdc3 {
+                       regulator-name = "dcdc3";
+               };
+
+               reg_dcdc4: dcdc4 {
+                       regulator-name = "dcdc4";
+               };
+
+               reg_dcdc5: dcdc5 {
+                       regulator-name = "dcdc5";
+               };
+
+               reg_dc1sw: dc1sw {
+                       regulator-name = "dc1sw";
+               };
+
+               reg_dc5ldo: dc5ldo {
+                       regulator-name = "dc5ldo";
+               };
+
+               reg_aldo1: aldo1 {
+                       regulator-name = "aldo1";
+               };
+
+               reg_aldo2: aldo2 {
+                       regulator-name = "aldo2";
+               };
+
+               reg_aldo3: aldo3 {
+                       regulator-name = "aldo3";
+               };
+
+               reg_dldo1: dldo1 {
+                       regulator-name = "dldo1";
+               };
+
+               reg_dldo2: dldo2 {
+                       regulator-name = "dldo2";
+               };
+
+               reg_dldo3: dldo3 {
+                       regulator-name = "dldo3";
+               };
+
+               reg_dldo4: dldo4 {
+                       regulator-name = "dldo4";
+               };
+
+               reg_eldo1: eldo1 {
+                       regulator-name = "eldo1";
+               };
+
+               reg_eldo2: eldo2 {
+                       regulator-name = "eldo2";
+               };
+
+               reg_eldo3: eldo3 {
+                       regulator-name = "eldo3";
+               };
+
+               reg_ldo_io0: ldo_io0 {
+                       regulator-name = "ldo_io0";
+                       status = "disabled";
+               };
+
+               reg_ldo_io1: ldo_io1 {
+                       regulator-name = "ldo_io1";
+                       status = "disabled";
+               };
+
+               reg_rtc_ldo: rtc_ldo {
+                       /* RTC_LDO is a fixed, always-on regulator */
+                       regulator-always-on;
+                       regulator-min-microvolt = <3000000>;
+                       regulator-max-microvolt = <3000000>;
+                       regulator-name = "rtc_ldo";
+               };
+       };
+};
index 0475f1f5eeba7fbd5c04a191a2810944febf6436..0985587fc7bf10920bc182ca9df34a8f55eab6b4 100644 (file)
@@ -11,7 +11,7 @@
        model = "Phytec phyCORE-Vybrid";
        compatible = "phytec,pcm052", "fsl,vf610";
 
-       choosen {
+       chosen {
                stdout-path = &uart1;
        };
 
index 2630d78d9e0456b58039723151ca26128c6065d4..97570cb7f2fcdb37cac323d3da1529a246314d2c 100644 (file)
        status = "okay";
 };
 
+&codec {
+       status = "okay";
+};
+
 &ehci0 {
        status = "okay";
 };
index 1430568726501e6283cca376d8619a548952f27c..023b03efa5fff7cd978b5820b9b8b5e3f2015052 100644 (file)
@@ -45,6 +45,7 @@
 #include "sunxi-common-regulators.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 
 / {
        model = "Chuwi V7 CW0825";
        };
 };
 
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       status = "okay";
+};
+
+&i2c2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c2_pins_a>;
+       status = "okay";
+
+       ft5306de4: touchscreen@38 {
+               compatible = "edt,edt-ft5406";
+               reg = <0x38>;
+               interrupt-parent = <&pio>;
+               interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
+               touchscreen-size-x = <1024>;
+               touchscreen-size-y = <768>;
+       };
+};
+
 &lradc {
        vref-supply = <&reg_vcc3v0>;
        status = "okay";
index 046a84d9719d6cffb34e76398b359567a6134668..710e2ef516a8da080e77664d3d523ab5e9209edb 100644 (file)
        status = "okay";
 };
 
+&codec {
+       status = "okay";
+};
+
 &cpu0 {
        cpu-supply = <&reg_dcdc2>;
 };
diff --git a/arch/arm/dts/sun4i-a10-dserve-dsrv9703c.dts b/arch/arm/dts/sun4i-a10-dserve-dsrv9703c.dts
new file mode 100644 (file)
index 0000000..893497e
--- /dev/null
@@ -0,0 +1,281 @@
+/*
+ * Copyright 2016 Hans de Goede <hdegoede@redhat.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun4i-a10.dtsi"
+#include "sunxi-common-regulators.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+#include <dt-bindings/pwm/pwm.h>
+
+/ {
+       model = "Dserve DSRV9703C";
+       compatible = "dserve,dsrv9703c", "allwinner,sun4i-a10";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pinctrl-names = "default";
+               pinctrl-0 = <&bl_en_pin_dsrv9703c>;
+               pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+               brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+               default-brightness-level = <8>;
+               enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       haptics {
+               compatible = "regulator-haptic";
+               haptic-supply = <&reg_motor>;
+               min-microvolt = <3000000>;
+               max-microvolt = <3000000>;
+       };
+
+       reg_motor: reg_motor {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&motor_pins>;
+               regulator-name = "vcc-motor";
+               regulator-min-microvolt = <3000000>;
+               regulator-max-microvolt = <3000000>;
+               enable-active-high;
+               gpio = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
+       };
+};
+
+&codec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&codec_pa_pin>;
+       allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
+       status = "okay";
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins_a>;
+       status = "okay";
+
+       axp209: pmic@34 {
+               reg = <0x34>;
+               interrupts = <0>;
+       };
+};
+
+#include "axp209.dtsi"
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       /* pull-ups and devices require AXP209 LDO3 */
+       status = "failed";
+};
+
+&i2c2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c2_pins_a>;
+       status = "okay";
+
+       ft5406ee8: touchscreen@38 {
+               compatible = "edt,edt-ft5406";
+               reg = <0x38>;
+               interrupt-parent = <&pio>;
+               interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&touchscreen_pins>;
+               reset-gpios = <&pio 1 13 GPIO_ACTIVE_LOW>;
+               touchscreen-size-x = <1024>;
+               touchscreen-size-y = <768>;
+       };
+};
+
+&lradc {
+       vref-supply = <&reg_ldo2>;
+       status = "okay";
+
+       button@400 {
+               label = "Volume Down";
+               linux,code = <KEY_VOLUMEDOWN>;
+               channel = <0>;
+               voltage = <400000>;
+       };
+
+       button@800 {
+               label = "Volume Up";
+               linux,code = <KEY_VOLUMEUP>;
+               channel = <0>;
+               voltage = <800000>;
+       };
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
+       cd-inverted;
+       status = "okay";
+};
+
+&otg_sram {
+       status = "okay";
+};
+
+&pio {
+       bl_en_pin_dsrv9703c: bl_en_pin@0 {
+               allwinner,pins = "PH7";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       codec_pa_pin: codec_pa_pin@0 {
+               allwinner,pins = "PH15";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       motor_pins: motor_pins@0 {
+               allwinner,pins = "PB3";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       touchscreen_pins: touchscreen_pins@0 {
+               allwinner,pins = "PB13";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+
+       usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+               allwinner,pins = "PH5";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+       };
+};
+
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_pins_a>;
+       status = "okay";
+};
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <1250000>;
+       regulator-max-microvolt = <1250000>;
+       regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
+};
+
+&reg_usb0_vbus {
+       status = "okay";
+};
+
+&reg_usb2_vbus {
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
+};
+
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+       usb0_vbus-supply = <&reg_usb0_vbus>;
+       usb2_vbus-supply = <&reg_usb2_vbus>;
+       status = "okay";
+};
index 570754d8df67750a77325aa01d5c21397e486841..ac64781a0a9cc0f5bf0472157f7120224359254e 100644 (file)
@@ -47,6 +47,7 @@
 #include "sunxi-common-regulators.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 
 / {
        model = "Gemei G9 Tablet";
 /*
  * TODO:
  *   2x cameras via CSI
- *   bma250 IRQs
  *   AXP battery management
  *   NAND
  *   OTG
  *   Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48
  */
+&codec {
+       /* PH15 controls power to external amplifier (ft2012q) */
+       pinctrl-names = "default";
+       pinctrl-0 = <&codec_pa_pin>;
+       allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
+};
 
 &ehci0 {
        status = "okay";
        status = "okay";
 
        axp209: pmic@34 {
-               compatible = "x-powers,axp209";
                reg = <0x34>;
                interrupts = <0>;
-
-               interrupt-controller;
-               #interrupt-cells = <1>;
        };
 };
 
+#include "axp209.dtsi"
+
 &i2c1 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c1_pins_a>;
        bma250@18 {
                compatible = "bosch,bma250";
                reg = <0x18>;
-
-               /*
-                * TODO: interrupt pins:
-                * int1 - PH00
-                * int2 - PI10
-                */
+               interrupt-parent = <&pio>;
+               interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH00 / EINT0 */
        };
 };
 
 &lradc {
-       vref-supply = <&reg_vcc3v0>;
+       vref-supply = <&reg_ldo2>;
 
        status = "okay";
 
        status = "okay";
 };
 
+&pio {
+       codec_pa_pin: codec_pa_pin@0 {
+               allwinner,pins = "PH15";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <1250000>;
+       regulator-max-microvolt = <1250000>;
+       regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
+};
+
 &reg_usb1_vbus {
        status = "okay";
 };
index 487ce63519dcf9f0a79cc0df11a13a121cf715ee..e09053bf5e1ffe0887d7b6dbe1fe08b5788f51c3 100644 (file)
@@ -47,6 +47,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
+#include <dt-bindings/pwm/pwm.h>
 
 / {
        model = "iNet-1";
                serial0 = &uart0;
        };
 
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pinctrl-names = "default";
+               pinctrl-0 = <&bl_en_pin_inet>;
+               pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+               brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+               default-brightness-level = <8>;
+               enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
+       };
+
        chosen {
                stdout-path = "serial0:115200n8";
        };
 };
 
+&codec {
+       status = "okay";
+};
+
 &cpu0 {
        cpu-supply = <&reg_dcdc2>;
 };
        pinctrl-names = "default";
        pinctrl-0 = <&i2c2_pins_a>;
        status = "okay";
+
+       ft5x: touchscreen@38 {
+               compatible = "edt,edt-ft5406";
+               reg = <0x38>;
+               interrupt-parent = <&pio>;
+               interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&touchscreen_wake_pin>;
+               wake-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* PB13 */
+               touchscreen-size-x = <600>;
+               touchscreen-size-y = <1024>;
+               touchscreen-swapped-x-y;
+       };
 };
 
 &lradc {
 };
 
 &pio {
+       bl_en_pin_inet: bl_en_pin@0 {
+               allwinner,pins = "PH7";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       touchscreen_wake_pin: touchscreen_wake_pin@0 {
+               allwinner,pins = "PB13";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
        usb0_id_detect_pin: usb0_id_detect_pin@0 {
                allwinner,pins = "PH4";
                allwinner,function = "gpio_in";
        };
 };
 
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_pins_a>;
+       status = "okay";
+};
+
 &reg_dcdc2 {
        regulator-always-on;
        regulator-min-microvolt = <1000000>;
index 6c927a824ba20f4ac9f9c89b484fe978618a6cdc..04b0d2d1ae6c1e2890f28abe0043f3ebcdbd9e95 100644 (file)
@@ -47,6 +47,8 @@
 #include "sunxi-common-regulators.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 
 / {
        model = "INet-97F Rev 02";
@@ -61,8 +63,8 @@
        };
 };
 
-&ehci0 {
-       status = "okay";
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
 };
 
 &ehci1 {
        status = "okay";
 
        axp209: pmic@34 {
-               compatible = "x-powers,axp209";
                reg = <0x34>;
                interrupts = <0>;
+       };
+};
+
+#include "axp209.dtsi"
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       status = "okay";
+};
+
+&i2c2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c2_pins_a>;
+       status = "okay";
+
+       ft5406ee8: touchscreen@38 {
+               compatible = "edt,edt-ft5406";
+               reg = <0x38>;
+               interrupt-parent = <&pio>;
+               interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
+               touchscreen-size-x = <800>;
+               touchscreen-size-y = <480>;
+       };
+};
+
+&lradc {
+       vref-supply = <&reg_ldo2>;
+       status = "okay";
+
+       button@200 {
+               label = "Menu";
+               linux,code = <KEY_MENU>;
+               channel = <0>;
+               voltage = <200000>;
+       };
+
+       button@600 {
+               label = "Volume Up";
+               linux,code = <KEY_VOLUMEUP>;
+               channel = <0>;
+               voltage = <600000>;
+       };
 
-               interrupt-controller;
-               #interrupt-cells = <1>;
+       button@800 {
+               label = "Volume Down";
+               linux,code = <KEY_VOLUMEDOWN>;
+               channel = <0>;
+               voltage = <800000>;
+       };
+
+       button@1000 {
+               label = "Home";
+               linux,code = <KEY_HOMEPAGE>;
+               channel = <0>;
+               voltage = <1000000>;
+       };
+
+       button@1200 {
+               label = "Esc";
+               linux,code = <KEY_ESC>;
+               channel = <0>;
+               voltage = <1200000>;
        };
 };
 
        status = "okay";
 };
 
-&ohci0 {
+&otg_sram {
        status = "okay";
 };
 
-&ohci1 {
-       status = "okay";
+&pio {
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+
+       usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+               allwinner,pins = "PH5";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+       };
+};
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
 };
 
-&reg_usb1_vbus {
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <1250000>;
+       regulator-max-microvolt = <1250000>;
+       regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
+};
+
+&reg_usb0_vbus {
        status = "okay";
 };
 
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
 &usbphy {
-       usb1_vbus-supply = <&reg_usb1_vbus>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+       usb0_vbus-supply = <&reg_usb0_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
 };
index 8446465ed6256530306d261e7f5ce8e2cd3ec79a..bba4f9cf9bf5d6c2f51faa05ea0ac90deb48bacc 100644 (file)
        chosen {
                stdout-path = "serial0:115200n8";
        };
+
+       gpio_keys {
+               compatible = "gpio-keys-polled";
+               pinctrl-names = "default";
+               pinctrl-0 = <&key_pins_inet9f>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               poll-interval = <20>;
+
+               button@0 {
+                       label = "Left Joystick Left";
+                       linux,code = <ABS_X>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <0xffffffff>; /* -1 */
+                       gpios = <&pio 0 6 GPIO_ACTIVE_LOW>; /* PA6 */
+               };
+
+               button@1 {
+                       label = "Left Joystick Right";
+                       linux,code = <ABS_X>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <1>;
+                       gpios = <&pio 0 5 GPIO_ACTIVE_LOW>; /* PA5 */
+               };
+
+               button@2 {
+                       label = "Left Joystick Up";
+                       linux,code = <ABS_Y>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <0xffffffff>; /* -1 */
+                       gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
+               };
+
+               button@3 {
+                       label = "Left Joystick Down";
+                       linux,code = <ABS_Y>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <1>;
+                       gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
+               };
+
+               button@4 {
+                       label = "Right Joystick Left";
+                       linux,code = <ABS_Z>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <0xffffffff>; /* -1 */
+                       gpios = <&pio 0 1 GPIO_ACTIVE_LOW>; /* PA1 */
+               };
+
+               button@5 {
+                       label = "Right Joystick Right";
+                       linux,code = <ABS_Z>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <1>;
+                       gpios = <&pio 0 0 GPIO_ACTIVE_LOW>; /* PA0 */
+               };
+
+               button@6 {
+                       label = "Right Joystick Up";
+                       linux,code = <ABS_RZ>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <0xffffffff>; /* -1 */
+                       gpios = <&pio 0 3 GPIO_ACTIVE_LOW>; /* PA3 */
+               };
+
+               button@7 {
+                       label = "Right Joystick Down";
+                       linux,code = <ABS_RZ>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <1>;
+                       gpios = <&pio 0 4 GPIO_ACTIVE_LOW>; /* PA4 */
+               };
+
+               button@8 {
+                       label = "DPad Left";
+                       linux,code = <ABS_HAT0X>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <0xffffffff>; /* -1 */
+                       gpios = <&pio 7 23 GPIO_ACTIVE_LOW>; /* PH23 */
+               };
+
+               button@9 {
+                       label = "DPad Right";
+                       linux,code = <ABS_HAT0X>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <1>;
+                       gpios = <&pio 7 24 GPIO_ACTIVE_LOW>; /* PH24 */
+               };
+
+               button@10 {
+                       label = "DPad Up";
+                       linux,code = <ABS_HAT0Y>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <0xffffffff>; /* -1 */
+                       gpios = <&pio 7 25 GPIO_ACTIVE_LOW>; /* PH25 */
+               };
+
+               button@11 {
+                       label = "DPad Down";
+                       linux,code = <ABS_HAT0Y>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <1>;
+                       gpios = <&pio 7 26 GPIO_ACTIVE_LOW>; /* PH26 */
+               };
+
+               button@12 {
+                       label = "Button X";
+                       linux,code = <BTN_X>;
+                       gpios = <&pio 0 16 GPIO_ACTIVE_LOW>; /* PA16 */
+               };
+
+               button@13 {
+                       label = "Button Y";
+                       linux,code = <BTN_Y>;
+                       gpios = <&pio 0 14 GPIO_ACTIVE_LOW>; /* PA14 */
+               };
+
+               button@14 {
+                       label = "Button A";
+                       linux,code = <BTN_A>;
+                       gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */
+               };
+
+               button@15 {
+                       label = "Button B";
+                       linux,code = <BTN_B>;
+                       gpios = <&pio 0 15 GPIO_ACTIVE_LOW>; /* PA15 */
+               };
+
+               button@16 {
+                       label = "Select Button";
+                       linux,code = <BTN_SELECT>;
+                       gpios = <&pio 0 11 GPIO_ACTIVE_LOW>; /* PA11 */
+               };
+
+               button@17 {
+                       label = "Start Button";
+                       linux,code = <BTN_START>;
+                       gpios = <&pio 0 12 GPIO_ACTIVE_LOW>; /* PA12 */
+               };
+
+               button@18 {
+                       label = "Top Left Button";
+                       linux,code = <BTN_TL>;
+                       gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 */
+               };
+
+               button@19 {
+                       label = "Top Right Button";
+                       linux,code = <BTN_TR>;
+                       gpios = <&pio 0 13 GPIO_ACTIVE_LOW>; /* PA13 */
+               };
+       };
 };
 
 &cpu0 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c1_pins_a>;
        status = "okay";
+
+       /* Accelerometer */
+       bma250@18 {
+               compatible = "bosch,bma250";
+               reg = <0x18>;
+               interrupt-parent = <&pio>;
+               interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */
+       };
 };
 
 &i2c2 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c2_pins_a>;
        status = "okay";
+
+       ft5406ee8: touchscreen@38 {
+               compatible = "edt,edt-ft5406";
+               reg = <0x38>;
+               interrupt-parent = <&pio>;
+               interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
+               touchscreen-size-x = <800>;
+               touchscreen-size-y = <480>;
+       };
 };
 
 &lradc {
 };
 
 &pio {
+       key_pins_inet9f: key_pins@0 {
+               allwinner,pins = "PA0", "PA1", "PA3", "PA4",
+                                "PA5", "PA6", "PA8", "PA9",
+                                "PA11", "PA12", "PA13",
+                                "PA14", "PA15", "PA16", "PA17",
+                                "PH22", "PH23", "PH24", "PH25", "PH26";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+
        usb0_id_detect_pin: usb0_id_detect_pin@0 {
                allwinner,pins = "PH4";
                allwinner,function = "gpio_in";
index 985e15503378f818299eed0110f1678fa2c016cc..4e798f014c992c949fdf186facae567c1c8b1de2 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright 2015 Josef Gajdusek <atx@atx.name>
+ * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
  *
  * This file is dual-licensed: you can use it either under the terms
  * of the GPL or the X11 license, at your option. Note that this dual
 
 /dts-v1/;
 #include "sun4i-a10.dtsi"
-#include "sunxi-common-regulators.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/pinctrl/sun4i-a10.h>
+#include "sunxi-itead-core-common.dtsi"
 
 / {
        model = "Iteaduino Plus A10";
        compatible = "itead,iteaduino-plus-a10", "allwinner,sun4i-a10";
-
-       aliases {
-               serial0 = &uart0;
-       };
-
-       chosen {
-               stdout-path = "serial0:115200n8";
-       };
 };
 
 &ahci {
        status = "okay";
 };
 
-&cpu0 {
-       cpu-supply = <&reg_dcdc2>;
-};
-
-&ehci0 {
-       status = "okay";
-};
-
-&ehci1 {
-       status = "okay";
-};
-
 &emac {
        pinctrl-names = "default";
        pinctrl-0 = <&emac_pins_a>;
 };
 
 &i2c0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&i2c0_pins_a>;
-       status = "okay";
-
        axp209: pmic@34 {
-               reg = <0x34>;
                interrupts = <0>;
        };
 };
        status = "okay";
 };
 
-&ohci0 {
-       status = "okay";
-};
-
-&ohci1 {
-       status = "okay";
-};
-
 &reg_ahci_5v {
        status = "okay";
 };
 
-#include "axp209.dtsi"
-
-&reg_dcdc2 {
-       regulator-always-on;
-       regulator-min-microvolt = <1000000>;
-       regulator-max-microvolt = <1450000>;
-       regulator-name = "vdd-cpu";
-};
-
-&reg_dcdc3 {
-       regulator-always-on;
-       regulator-min-microvolt = <1000000>;
-       regulator-max-microvolt = <1400000>;
-       regulator-name = "vdd-int-dll";
-};
-
-&reg_ldo1 {
-       regulator-name = "vdd-rtc";
-};
-
-&reg_ldo2 {
-       regulator-always-on;
-       regulator-min-microvolt = <3000000>;
-       regulator-max-microvolt = <3000000>;
-       regulator-name = "avcc";
-};
-
-&reg_usb1_vbus {
-       status = "okay";
-};
-
-&reg_usb2_vbus {
-       status = "okay";
-};
-
 &spi0 {
        pinctrl-names = "default";
        pinctrl-0 = <&spi0_pins_a>,
                    <&spi0_cs0_pins_a>;
        status = "okay";
 };
-
-&uart0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pins_a>;
-       status = "okay";
-};
-
-&usbphy {
-       usb1_vbus-supply = <&reg_usb1_vbus>;
-       usb2_vbus-supply = <&reg_usb2_vbus>;
-       status = "okay";
-};
index dc2f2aeaff07895c999d354bcd294e376d785058..7afc7a64eef1df3e0af47f01b2a26f9f34cefd37 100644 (file)
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
        emac_power_pin_q5: emac_power_pin@0 {
                allwinner,pins = "PH19";
        };
 };
 
+&reg_usb0_vbus {
+       regulator-boot-on;
+       status = "okay";
+};
+
 &reg_usb1_vbus {
        status = "okay";
 };
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "host";
+       status = "okay";
+};
+
 &usbphy {
+       usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
index 02158bcd64ee50c19cd45d845f666c52c496484d..8e50723dbe02bae14fed5785547dc229dc061d9e 100644 (file)
        status = "okay";
 };
 
+&codec {
+       status = "okay";
+};
+
 &ehci0 {
        status = "okay";
 };
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
        led_pins_marsboard: led_pins@0 {
                allwinner,pins = "PB5", "PB6", "PB7", "PB8";
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
 };
 
 &reg_usb1_vbus {
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
 &usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>;
+       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
index 3c7eebe170882d67623ed7ca1aa005bb662dddb3..ee46ea8548326394b45dd09aa0fc488973b2b54a 100644 (file)
@@ -44,6 +44,7 @@
 #include "sun4i-a10.dtsi"
 #include "sunxi-common-regulators.dtsi"
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
 
 / {
        model = "MK802";
        };
 };
 
+&codec {
+       status = "okay";
+};
+
 &ehci0 {
        status = "okay";
 };
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+               allwinner,pins = "PH5";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
        usb2_vbus_pin_mk802: usb2_vbus_pin@0 {
                allwinner,pins = "PH12";
                allwinner,function = "gpio_out";
        };
 };
 
+&reg_usb0_vbus {
+       status = "okay";
+};
+
 &reg_usb1_vbus {
        status = "okay";
 };
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
 &usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+       usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+       usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
index 28e32ad705cd25848e087f1ee4a9ad08c986740d..b350448c7217c0f959e2efb0ec08f95c615276cb 100644 (file)
        };
 };
 
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       status = "okay";
+
+       eeprom: eeprom@50 {
+               compatible = "atmel,24c16";
+               reg = <0x50>;
+               pagesize = <16>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index 4e3e1b9d8217e356c9c11953ff84eb2eee4f48ad..39034aa8e1ae8c65fd3a051e5a328fbb7e5abaeb 100644 (file)
        };
 };
 
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
+};
+
 &ehci0 {
        status = "okay";
 };
        status = "okay";
 
        axp209: pmic@34 {
-               compatible = "x-powers,axp209";
                reg = <0x34>;
                interrupts = <0>;
-
-               interrupt-controller;
-               #interrupt-cells = <1>;
        };
 };
 
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
        led_pins_pcduino: led_pins@0 {
                allwinner,pins = "PH15", "PH16";
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
 };
 
-&reg_usb1_vbus {
-       status = "okay";
+#include "axp209.dtsi"
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
 };
 
-&reg_usb2_vbus {
-       status = "okay";
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
 };
 
 &uart0 {
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
 &usbphy {
-       usb1_vbus-supply = <&reg_usb1_vbus>;
-       usb2_vbus-supply = <&reg_usb2_vbus>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>;
+       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb1_vbus-supply = <&reg_vcc5v0>; /* USB1 VBUS is always on */
+       usb2_vbus-supply = <&reg_vcc5v0>; /* USB2 VBUS is always on */
        status = "okay";
 };
diff --git a/arch/arm/dts/sun4i-a10-pcduino2.dts b/arch/arm/dts/sun4i-a10-pcduino2.dts
new file mode 100644 (file)
index 0000000..de483a1
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2015 Siarhei Siamashka <siarhei.siamashka@gmail.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The LinkSprite pcDuino2 board is almost identical to the older
+ * LinkSprite pcDuino1 board. The only software visible difference
+ * is that the pcDuino2 board got a USB VBUS voltage regulator, which
+ * is controlled by the PD2 pin (pulled-up by default). Also one of
+ * the USB host ports has been replaced with a USB WIFI chip.
+ */
+
+#include "sun4i-a10-pcduino.dts"
+
+/ {
+       model = "LinkSprite pcDuino2";
+       compatible = "linksprite,a10-pcduino2", "allwinner,sun4i-a10";
+};
+
+&pio {
+       usb2_vbus_pin_pcduino2: usb2_vbus_pin@0 {
+               allwinner,pins = "PD2";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
+&reg_usb2_vbus {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb2_vbus_pin_pcduino2>;
+       gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&usbphy {
+       usb1_vbus-supply = <&reg_vcc3v3>; /* USB WIFI is always on */
+       usb2_vbus-supply = <&reg_usb2_vbus>;
+       status = "okay";
+};
index 223515efed77afc6a679f426e90fe66307842b44..ea90634e48250a02f69801c2ea958fd9e90b922a 100644 (file)
@@ -47,6 +47,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
+#include <dt-bindings/pwm/pwm.h>
 
 / {
        model = "Point of View Protab2-IPS9";
                serial0 = &uart0;
        };
 
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pinctrl-names = "default";
+               pinctrl-0 = <&bl_en_pin_protab>;
+               pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+               brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+               default-brightness-level = <8>;
+               enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
+       };
+
        chosen {
                stdout-path = "serial0:115200n8";
        };
 };
 
+&codec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&codec_pa_pin>;
+       allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
+       status = "okay";
+};
+
 &cpu0 {
        cpu-supply = <&reg_dcdc2>;
 };
        pinctrl-names = "default";
        pinctrl-0 = <&i2c1_pins_a>;
        status = "okay";
+
+       /* Accelerometer */
+       bma250@18 {
+               compatible = "bosch,bma250";
+               reg = <0x18>;
+               interrupt-parent = <&pio>;
+               interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */
+       };
 };
 
 &i2c2 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c2_pins_a>;
        status = "okay";
+
+       pixcir_ts@5c {
+               pinctrl-names = "default";
+               pinctrl-0 = <&touchscreen_pins>;
+               compatible = "pixcir,pixcir_tangoc";
+               reg = <0x5c>;
+               interrupt-parent = <&pio>;
+               interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
+               attb-gpio = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* PH21 */
+               enable-gpios = <&pio 0 5 GPIO_ACTIVE_LOW>;
+               wake-gpios = <&pio 1 13 GPIO_ACTIVE_LOW>;
+               touchscreen-size-x = <1024>;
+               touchscreen-size-y = <768>;
+               touchscreen-inverted-x;
+               touchscreen-inverted-y;
+       };
 };
 
 &lradc {
 };
 
 &pio {
+       bl_en_pin_protab: bl_en_pin@0 {
+               allwinner,pins = "PH7";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       codec_pa_pin: codec_pa_pin@0 {
+               allwinner,pins = "PH15";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       touchscreen_pins: touchscreen_pins@0 {
+               allwinner,pins = "PA5", "PB13";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
        usb0_id_detect_pin: usb0_id_detect_pin@0 {
                allwinner,pins = "PH4";
                allwinner,function = "gpio_in";
        };
 };
 
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_pins_a>;
+       status = "okay";
+};
+
 &reg_dcdc2 {
        regulator-always-on;
        regulator-min-microvolt = <1000000>;
index 463bacd6a74d7024892587abadf9a2a701f4da16..2c8f5e6ad90587eefe09593334dd01df426f7012 100644 (file)
@@ -45,6 +45,7 @@
 
 #include <dt-bindings/thermal/thermal.h>
 
+#include <dt-bindings/clock/sun4i-a10-pll2.h>
 #include <dt-bindings/dma/sun4i-a10.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
@@ -65,7 +66,7 @@
                                     "simple-framebuffer";
                        allwinner,pipeline = "de_be0-lcd0-hdmi";
                        clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
-                                <&ahb_gates 44>;
+                                <&ahb_gates 44>, <&dram_gates 26>;
                        status = "disabled";
                };
 
@@ -74,7 +75,8 @@
                                     "simple-framebuffer";
                        allwinner,pipeline = "de_fe0-de_be0-lcd0-hdmi";
                        clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
-                                <&ahb_gates 44>, <&ahb_gates 46>;
+                                <&ahb_gates 44>, <&ahb_gates 46>,
+                                <&dram_gates 25>, <&dram_gates 26>;
                        status = "disabled";
                };
 
@@ -83,7 +85,8 @@
                                     "simple-framebuffer";
                        allwinner,pipeline = "de_fe0-de_be0-lcd0";
                        clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>,
-                                <&ahb_gates 46>;
+                                <&ahb_gates 46>, <&dram_gates 25>,
+                                <&dram_gates 26>;
                        status = "disabled";
                };
 
@@ -92,7 +95,8 @@
                                     "simple-framebuffer";
                        allwinner,pipeline = "de_fe0-de_be0-lcd0-tve0";
                        clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
-                                <&ahb_gates 44>, <&ahb_gates 46>;
+                                <&ahb_gates 44>, <&ahb_gates 46>,
+                                <&dram_gates 25>, <&dram_gates 26>;
                        status = "disabled";
                };
        };
                        clock-output-names = "pll1";
                };
 
+               pll2: clk@01c20008 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun4i-a10-pll2-clk";
+                       reg = <0x01c20008 0x8>;
+                       clocks = <&osc24M>;
+                       clock-output-names = "pll2-1x", "pll2-2x",
+                                            "pll2-4x", "pll2-8x";
+               };
+
                pll4: clk@01c20018 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-a10-pll1-clk";
                        compatible = "allwinner,sun4i-a10-axi-gates-clk";
                        reg = <0x01c2005c 0x4>;
                        clocks = <&axi>;
+                       clock-indices = <0>;
                        clock-output-names = "axi_dram";
                };
 
                        compatible = "allwinner,sun4i-a10-ahb-gates-clk";
                        reg = <0x01c20060 0x8>;
                        clocks = <&ahb>;
+                       clock-indices = <0>, <1>,
+                                       <2>, <3>,
+                                       <4>, <5>, <6>,
+                                       <7>, <8>, <9>,
+                                       <10>, <11>, <12>,
+                                       <13>, <14>, <16>,
+                                       <17>, <18>, <20>,
+                                       <21>, <22>, <23>,
+                                       <24>, <25>, <26>,
+                                       <32>, <33>, <34>,
+                                       <35>, <36>, <37>,
+                                       <40>, <41>, <43>,
+                                       <44>, <45>,
+                                       <46>, <47>,
+                                       <50>, <52>;
                        clock-output-names = "ahb_usb0", "ahb_ehci0",
-                               "ahb_ohci0", "ahb_ehci1", "ahb_ohci1", "ahb_ss",
-                               "ahb_dma", "ahb_bist", "ahb_mmc0", "ahb_mmc1",
-                               "ahb_mmc2", "ahb_mmc3", "ahb_ms", "ahb_nand",
-                               "ahb_sdram", "ahb_ace", "ahb_emac", "ahb_ts",
-                               "ahb_spi0", "ahb_spi1", "ahb_spi2", "ahb_spi3",
-                               "ahb_pata", "ahb_sata", "ahb_gps", "ahb_ve",
-                               "ahb_tvd", "ahb_tve0", "ahb_tve1", "ahb_lcd0",
-                               "ahb_lcd1", "ahb_csi0", "ahb_csi1", "ahb_hdmi",
-                               "ahb_de_be0", "ahb_de_be1", "ahb_de_fe0",
-                               "ahb_de_fe1", "ahb_mp", "ahb_mali400";
+                                            "ahb_ohci0", "ahb_ehci1",
+                                            "ahb_ohci1", "ahb_ss", "ahb_dma",
+                                            "ahb_bist", "ahb_mmc0", "ahb_mmc1",
+                                            "ahb_mmc2", "ahb_mmc3", "ahb_ms",
+                                            "ahb_nand", "ahb_sdram", "ahb_ace",
+                                            "ahb_emac", "ahb_ts", "ahb_spi0",
+                                            "ahb_spi1", "ahb_spi2", "ahb_spi3",
+                                            "ahb_pata", "ahb_sata", "ahb_gps",
+                                            "ahb_ve", "ahb_tvd", "ahb_tve0",
+                                            "ahb_tve1", "ahb_lcd0", "ahb_lcd1",
+                                            "ahb_csi0", "ahb_csi1", "ahb_hdmi",
+                                            "ahb_de_be0", "ahb_de_be1",
+                                            "ahb_de_fe0", "ahb_de_fe1",
+                                            "ahb_mp", "ahb_mali400";
                };
 
                apb0: apb0@01c20054 {
                        compatible = "allwinner,sun4i-a10-apb0-gates-clk";
                        reg = <0x01c20068 0x4>;
                        clocks = <&apb0>;
+                       clock-indices = <0>, <1>,
+                                       <2>, <3>,
+                                       <5>, <6>,
+                                       <7>, <10>;
                        clock-output-names = "apb0_codec", "apb0_spdif",
-                               "apb0_ac97", "apb0_iis", "apb0_pio", "apb0_ir0",
-                               "apb0_ir1", "apb0_keypad";
+                                            "apb0_ac97", "apb0_iis",
+                                            "apb0_pio", "apb0_ir0",
+                                            "apb0_ir1", "apb0_keypad";
                };
 
                apb1: clk@01c20058 {
                        compatible = "allwinner,sun4i-a10-apb1-gates-clk";
                        reg = <0x01c2006c 0x4>;
                        clocks = <&apb1>;
+                       clock-indices = <0>, <1>,
+                                       <2>, <4>,
+                                       <5>, <6>,
+                                       <7>, <16>,
+                                       <17>, <18>,
+                                       <19>, <20>,
+                                       <21>, <22>,
+                                       <23>;
                        clock-output-names = "apb1_i2c0", "apb1_i2c1",
-                               "apb1_i2c2", "apb1_can", "apb1_scr",
-                               "apb1_ps20", "apb1_ps21", "apb1_uart0",
-                               "apb1_uart1", "apb1_uart2", "apb1_uart3",
-                               "apb1_uart4", "apb1_uart5", "apb1_uart6",
-                               "apb1_uart7";
+                                            "apb1_i2c2", "apb1_can",
+                                            "apb1_scr", "apb1_ps20",
+                                            "apb1_ps21", "apb1_uart0",
+                                            "apb1_uart1", "apb1_uart2",
+                                            "apb1_uart3", "apb1_uart4",
+                                            "apb1_uart5", "apb1_uart6",
+                                            "apb1_uart7";
                };
 
                nand_clk: clk@01c20080 {
                        clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
                        clock-output-names = "spi3";
                };
+
+               dram_gates: clk@01c20100 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun4i-a10-dram-gates-clk";
+                       reg = <0x01c20100 0x4>;
+                       clocks = <&pll5 0>;
+                       clock-indices = <0>,
+                                       <1>, <2>,
+                                       <3>,
+                                       <4>,
+                                       <5>, <6>,
+                                       <15>,
+                                       <24>, <25>,
+                                       <26>, <27>,
+                                       <28>, <29>;
+                       clock-output-names = "dram_ve",
+                                            "dram_csi0", "dram_csi1",
+                                            "dram_ts",
+                                            "dram_tvd",
+                                            "dram_tve0", "dram_tve1",
+                                            "dram_output",
+                                            "dram_de_fe1", "dram_de_fe0",
+                                            "dram_de_be0", "dram_de_be1",
+                                            "dram_de_mp", "dram_ace";
+               };
+
+               ve_clk: clk@01c2013c {
+                       #clock-cells = <0>;
+                       #reset-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-ve-clk";
+                       reg = <0x01c2013c 0x4>;
+                       clocks = <&pll4>;
+                       clock-output-names = "ve";
+               };
+
+               codec_clk: clk@01c20140 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-codec-clk";
+                       reg = <0x01c20140 0x4>;
+                       clocks = <&pll2 SUN4I_A10_PLL2_1X>;
+                       clock-output-names = "codec";
+               };
        };
 
        soc@01c00000 {
                        status = "disabled";
                };
 
+               crypto: crypto-engine@01c15000 {
+                       compatible = "allwinner,sun4i-a10-crypto";
+                       reg = <0x01c15000 0x1000>;
+                       interrupts = <86>;
+                       clocks = <&ahb_gates 5>, <&ss_clk>;
+                       clock-names = "ahb", "mod";
+               };
+
                spi2: spi@01c17000 {
                        compatible = "allwinner,sun4i-a10-spi";
                        reg = <0x01c17000 0x1000>;
                        status = "disabled";
                };
 
+               codec: codec@01c22c00 {
+                       #sound-dai-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-codec";
+                       reg = <0x01c22c00 0x40>;
+                       interrupts = <30>;
+                       clocks = <&apb0_gates 0>, <&codec_clk>;
+                       clock-names = "apb", "codec";
+                       dmas = <&dma SUN4I_DMA_NORMAL 19>,
+                              <&dma SUN4I_DMA_NORMAL 19>;
+                       dma-names = "rx", "tx";
+                       status = "disabled";
+               };
+
                sid: eeprom@01c23800 {
                        compatible = "allwinner,sun4i-a10-sid";
                        reg = <0x01c23800 0x10>;
index 2b3511ea2e5dff80ad4d935fb66420a52f205557..a790ec8adb75263c1a20e70d6737c184a51a6736 100644 (file)
        status = "okay";
 };
 
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins_a>;
+       status = "okay";
+
+       axp152: pmic@30 {
+               compatible = "x-powers,axp152";
+               reg = <0x30>;
+               interrupts = <0>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+       };
+};
+
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_t004>;
index 5a422c1ff725d875ceca0f2b61eeea696b117323..86d046a502e6f89a95ab985d7d2b61050c18d210 100644 (file)
        status = "okay";
 
        at24@50 {
-               compatible = "at,24c16";
+               compatible = "atmel,24c16";
                pagesize = <16>;
                reg = <0x50>;
                read-only;
diff --git a/arch/arm/dts/sun5i-a13-difrnce-dit4350.dts b/arch/arm/dts/sun5i-a13-difrnce-dit4350.dts
new file mode 100644 (file)
index 0000000..6546fa0
--- /dev/null
@@ -0,0 +1,226 @@
+/*
+ * Copyright 2016 Hans de Goede <hdegoede@redhat.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun5i-a13.dtsi"
+#include "sunxi-common-regulators.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+#include <dt-bindings/pwm/pwm.h>
+
+/ {
+       model = "Difrnce DIT4350";
+       compatible = "difrnce,dit4350", "allwinner,sun5i-a13";
+
+       aliases {
+               serial0 = &uart1;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+               brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+               default-brightness-level = <8>;
+               /* TODO: backlight uses axp gpio1 as enable pin */
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins_a>;
+       status = "okay";
+
+       axp209: pmic@34 {
+               reg = <0x34>;
+               interrupts = <0>;
+       };
+};
+
+#include "axp209.dtsi"
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       status = "okay";
+
+       pcf8563: rtc@51 {
+               compatible = "nxp,pcf8563";
+               reg = <0x51>;
+       };
+};
+
+&lradc {
+       vref-supply = <&reg_ldo2>;
+       status = "okay";
+
+       button@200 {
+               label = "Volume Up";
+               linux,code = <KEY_VOLUMEUP>;
+               channel = <0>;
+               voltage = <200000>;
+       };
+
+       button@400 {
+               label = "Volume Down";
+               linux,code = <KEY_VOLUMEDOWN>;
+               channel = <0>;
+               voltage = <400000>;
+       };
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_d709>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
+       cd-inverted;
+       status = "okay";
+};
+
+&otg_sram {
+       status = "okay";
+};
+
+&pio {
+       mmc0_cd_pin_d709: mmc0_cd_pin@0 {
+               allwinner,pins = "PG0";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+
+       usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+               allwinner,pins = "PG1";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+       };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PG2";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+};
+
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_pins>;
+       status = "okay";
+};
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <1250000>;
+       regulator-max-microvolt = <1250000>;
+       regulator-name = "vdd-int-pll";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
+};
+
+&reg_ldo3 {
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-wifi";
+};
+
+&reg_usb0_vbus {
+       gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins_b>;
+       status = "okay";
+};
+
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usb0_vbus_pin_a {
+       allwinner,pins = "PG12";
+};
+
+&usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+       usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
+       usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
+       usb0_vbus-supply = <&reg_usb0_vbus>;
+       usb1_vbus-supply = <&reg_ldo3>;
+       status = "okay";
+};
index 7fbb0b0558a9aab6ae1caaf23f390efb9bc12618..6efbba6d40a9101144e6f091bdf4d967c6f16bcd 100644 (file)
 
 &mmc0 {
        pinctrl-names = "default";
-       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_inet98fv2>;
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_d709>;
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
        cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
        status = "okay";
 };
 
-&mmc2 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&mmc2_pins_a>;
-       vmmc-supply = <&reg_vcc3v3>;
-       bus-width = <8>;
-       non-removable;
-       status = "okay";
-
-       mmccard: mmccard@0 {
-               reg = <0>;
-               compatible = "mmc-card";
-               broken-hpi;
-       };
-};
-
 &otg_sram {
        status = "okay";
 };
 
 &pio {
-       mmc0_cd_pin_inet98fv2: mmc0_cd_pin@0 {
+       mmc0_cd_pin_d709: mmc0_cd_pin@0 {
                allwinner,pins = "PG0";
                allwinner,function = "gpio_in";
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
index 6d466a28ecd4e57b25b06975266dc8ac699fbba9..1b11ec95ae5312546bfd92ba5d1fc09080e5a9fe 100644 (file)
        status = "okay";
 };
 
-&mmc2 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&mmc2_pins_a>;
-       vmmc-supply = <&reg_vcc3v3>;
-       bus-width = <8>;
-       non-removable;
-       status = "okay";
-
-       mmccard: mmccard@0 {
-               reg = <0>;
-               compatible = "mmc-card";
-               broken-hpi;
-       };
-};
-
 &otg_sram {
        status = "okay";
 };
        status = "okay";
 };
 
-&reg_usb1_vbus {
-       gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
-       status = "okay";
-};
-
 &uart1 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart1_pins_b>;
        allwinner,pins = "PG12";
 };
 
-&usb1_vbus_pin_a {
-       allwinner,pins = "PG11";
-};
-
 &usbphy {
        pinctrl-names = "default";
        pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
        usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
        usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
        usb0_vbus-supply = <&reg_usb0_vbus>;
-       usb1_vbus-supply = <&reg_usb1_vbus>;
+       usb1_vbus-supply = <&reg_ldo3>;
        status = "okay";
 };
index eb793d5a2bd6748cec5696c2bdbfbbb4999b530f..fa9ddfdcfe9688ab932c8c0ff30b38879fd0d604 100644 (file)
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
+#include <dt-bindings/pwm/pwm.h>
 
 / {
        model = "Utoo P66";
        compatible = "utoo,p66", "allwinner,sun5i-a13";
 
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+               /* Note levels of 10 / 20% result in backlight off */
+               brightness-levels = <0 30 40 50 60 70 80 90 100>;
+               default-brightness-level = <6>;
+               /* TODO: backlight uses axp gpio1 as enable pin */
+       };
+
        i2c_lcd: i2c@0 {
                /* The lcd panel i2c interface is hooked up via gpios */
                compatible = "i2c-gpio";
        };
 };
 
+&codec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&codec_pa_pin>;
+       allwinner,pa-gpios = <&pio 6 3 GPIO_ACTIVE_HIGH>; /* PG3 */
+       status = "okay";
+};
+
 &cpu0 {
        cpu-supply = <&reg_dcdc2>;
 };
 };
 
 &pio {
+       codec_pa_pin: codec_pa_pin@0 {
+               allwinner,pins = "PG3";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
        mmc0_cd_pin_p66: mmc0_cd_pin@0 {
                allwinner,pins = "PG0";
                allwinner,function = "gpio_in";
        };
 };
 
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_pins>;
+       status = "okay";
+};
+
 &reg_dcdc2 {
        regulator-always-on;
        regulator-min-microvolt = <1000000>;
index 0641d68a6d827cbfa0ed30d9567799ae550639a9..a78e189f6653a84697ef0dc7aec68a3804c87671 100644 (file)
  */
 #include "sunxi-q8-common.dtsi"
 
+#include <dt-bindings/pwm/pwm.h>
+
 / {
        aliases {
                serial0 = &uart1;
        };
 
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+               brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+               default-brightness-level = <8>;
+               /* TODO: backlight uses axp gpio1 as enable pin */
+       };
+
        chosen {
                stdout-path = "serial0:115200n8";
        };
index abf3ccb1a82cf93bb29c73df07ad940de7df19bc..6ad19e272f4bc94904d6ed4fefab8cca835f6e13 100644 (file)
        chosen {
                stdout-path = "serial0:115200n8";
        };
+
+       wifi_reg_on: wifi_reg_on {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&chip_wifi_reg_on_pin>;
+
+               regulator-name = "wifi-reg-on";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&pio 2 19 GPIO_ACTIVE_HIGH>; /* PC19 */
+               enable-active-high;
+       };
+};
+
+&codec {
+       status = "okay";
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
 };
 
 &ehci0 {
        };
 };
 
+&mmc0_pins_a {
+       allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
+
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>;
-       vmmc-supply = <&reg_vcc3v3>;
+       vmmc-supply = <&wifi_reg_on>;
        bus-width = <4>;
        non-removable;
        status = "okay";
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
 
+       chip_wifi_reg_on_pin: chip_wifi_reg_on_pin@0 {
+               allwinner,pins = "PC19";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
        chip_id_det_pin: chip_id_det_pin@0 {
                allwinner,pins = "PG2";
                allwinner,function = "gpio_in";
        regulator-always-on;
 };
 
+&reg_ldo3 {
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vdd-wifi1";
+       regulator-always-on;
+};
+
+&reg_ldo4 {
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vdd-wifi2";
+       regulator-always-on;
+};
+
 &reg_ldo5 {
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
index 9ffee9bb70a743eaf70c8751a150350941880059..59a9426e3bd4ed68aefa8b3aca7469dd3e27f5dc 100644 (file)
@@ -44,6 +44,7 @@
 
 #include "skeleton.dtsi"
 
+#include <dt-bindings/clock/sun4i-a10-pll2.h>
 #include <dt-bindings/dma/sun4i-a10.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
                        clock-output-names = "pll1";
                };
 
+               pll2: clk@01c20008 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun5i-a13-pll2-clk";
+                       reg = <0x01c20008 0x8>;
+                       clocks = <&osc24M>;
+                       clock-output-names = "pll2-1x", "pll2-2x",
+                                            "pll2-4x", "pll2-8x";
+               };
+
                pll4: clk@01c20018 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-a10-pll1-clk";
                        clock-output-names = "usb_ohci0", "usb_phy";
                };
 
+               codec_clk: clk@01c20140 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-codec-clk";
+                       reg = <0x01c20140 0x4>;
+                       clocks = <&pll2 SUN4I_A10_PLL2_1X>;
+                       clock-output-names = "codec";
+               };
+
                mbus_clk: clk@01c2015c {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun5i-a13-mbus-clk";
                        status = "disabled";
                };
 
+               codec: codec@01c22c00 {
+                       #sound-dai-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-codec";
+                       reg = <0x01c22c00 0x40>;
+                       interrupts = <30>;
+                       clocks = <&apb0_gates 0>, <&codec_clk>;
+                       clock-names = "apb", "codec";
+                       dmas = <&dma SUN4I_DMA_NORMAL 19>,
+                              <&dma SUN4I_DMA_NORMAL 19>;
+                       dma-names = "rx", "tx";
+                       status = "disabled";
+               };
+
                sid: eeprom@01c23800 {
                        compatible = "allwinner,sun4i-a10-sid";
                        reg = <0x01c23800 0x10>;
index 0d0b6f268c3eda1df223b66ae5e188c020a6176b..f9cf36888d93a6f3673d563dbc6f8cb25ad882df 100644 (file)
        chosen {
                stdout-path = "serial0:115200n8";
        };
+
+       i2c_lcd: i2c@0 {
+               /* The lcd panel i2c interface is hooked up via gpios */
+               compatible = "i2c-gpio";
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c_lcd_pins>;
+               gpios = <&pio 0 23 GPIO_ACTIVE_HIGH>, /* PA23, sda */
+                       <&pio 0 24 GPIO_ACTIVE_HIGH>; /* PA24, scl */
+               i2c-gpio,delay-us = <5>;
+       };
 };
 
 &ehci1 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c2_pins_a>;
        status = "okay";
+
+       mma8452: mma8452@1d {
+               compatible = "fsl,mma8452";
+               reg = <0x1d>;
+               interrupt-parent = <&pio>;
+               interrupts = <0 9 IRQ_TYPE_LEVEL_LOW>; /* PA9 */
+       };
 };
 
 &mmc0 {
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
+
+       i2c_lcd_pins: i2c_lcd_pin@0 {
+               allwinner,pins = "PA23", "PA24";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
 };
 
 &reg_usb2_vbus {
index d0cfadac0691ddfe179f879eab18c54544db45bd..9a74637f677f3481c0ec615a2266b37ec08186d4 100644 (file)
@@ -54,6 +54,8 @@
        compatible = "merrii,a31-hummingbird", "allwinner,sun6i-a31";
 
        aliases {
+               rtc0 = &pcf8563;
+               rtc1 = &rtc;
                serial0 = &uart0;
        };
 
        };
 };
 
+&cpu0 {
+       cpu-supply = <&reg_dcdc3>;
+};
+
 &ehci0 {
        status = "okay";
 };
 
 &gmac {
        pinctrl-names = "default";
-       pinctrl-0 = <&gmac_pins_rgmii_a>;
+       pinctrl-0 = <&gmac_pins_rgmii_a>, <&gmac_phy_reset_pin_hummingbird>;
        phy = <&phy1>;
        phy-mode = "rgmii";
        snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>;
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>;
-       vmmc-supply = <&vcc_3v0>;
+       vmmc-supply = <&reg_dcdc1>;
        bus-width = <4>;
        cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
        cd-inverted;
 &mmc1 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc1_pins_a>, <&wifi_reset_pin_hummingbird>;
-       vmmc-supply = <&vcc_wifi>;
+       vmmc-supply = <&reg_aldo1>;
        mmc-pwrseq = <&wifi_pwrseq>;
        bus-width = <4>;
        non-removable;
 };
 
 &pio {
+       gmac_phy_reset_pin_hummingbird: gmac_phy_reset_pin@0 {
+               allwinner,pins = "PA21";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
        mmc0_cd_pin_hummingbird: mmc0_cd_pin@0 {
                allwinner,pins = "PA8";
                allwinner,function = "gpio_in";
 &p2wi {
        status = "okay";
 
-       axp221: pmic@68 {
+       axp22x: pmic@68 {
                compatible = "x-powers,axp221";
                reg = <0x68>;
                interrupt-parent = <&nmi_intc>;
                interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-               interrupt-controller;
-               #interrupt-cells = <1>;
-               dcdc1-supply = <&vcc_3v0>;
-               dcdc5-supply = <&vcc_dram>;
-
-               regulators {
-                       x-powers,dcdc-freq = <3000>;
-
-                       vcc_3v0: dcdc1 {
-                               regulator-always-on;
-                               regulator-min-microvolt = <3000000>;
-                               regulator-max-microvolt = <3000000>;
-                               regulator-name = "vcc-3v0";
-                       };
-
-                       vdd_cpu: dcdc2 {
-                               regulator-always-on;
-                               regulator-min-microvolt = <700000>;
-                               regulator-max-microvolt = <1320000>;
-                               regulator-name = "vdd-cpu";
-                       };
-
-                       vdd_gpu: dcdc3 {
-                               regulator-always-on;
-                               regulator-min-microvolt = <700000>;
-                               regulator-max-microvolt = <1320000>;
-                               regulator-name = "vdd-gpu";
-                       };
-
-                       vdd_sys_dll: dcdc4 {
-                               regulator-always-on;
-                               regulator-min-microvolt = <1100000>;
-                               regulator-max-microvolt = <1100000>;
-                               regulator-name = "vdd-sys-dll";
-                       };
-
-                       vcc_dram: dcdc5 {
-                               regulator-always-on;
-                               regulator-min-microvolt = <1500000>;
-                               regulator-max-microvolt = <1500000>;
-                               regulator-name = "vcc-dram";
-                       };
-
-                       vcc_wifi: aldo1 {
-                               regulator-min-microvolt = <3300000>;
-                               regulator-max-microvolt = <3300000>;
-                               regulator-name = "vcc_wifi";
-                       };
-
-                       avcc: aldo3 {
-                               regulator-always-on;
-                               regulator-min-microvolt = <3000000>;
-                               regulator-max-microvolt = <3000000>;
-                               regulator-name = "avcc";
-                       };
-               };
        };
 };
 
+#include "axp22x.dtsi"
+
+&reg_aldo1 {
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-wifi";
+};
+
+&reg_aldo3 {
+       regulator-always-on;
+       regulator-min-microvolt = <2700000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "avcc";
+};
+
+&reg_dc5ldo {
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-cpus";
+};
+
+&reg_dcdc1 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "vcc-3v0";
+};
+
+&reg_dcdc2 {
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-gpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc4 {
+       regulator-always-on;
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-sys-dll";
+};
+
+&reg_dcdc5 {
+       regulator-always-on;
+       regulator-min-microvolt = <1500000>;
+       regulator-max-microvolt = <1500000>;
+       regulator-name = "vcc-dram";
+};
+
 &reg_usb1_vbus {
        gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
        status = "okay";
index 44f889fcc90d97bc1e907dd7c5164e84c1d921eb..1867af24ff529c2b6590e0db0dcc2f807fd72a65 100644 (file)
@@ -61,7 +61,7 @@
                #size-cells = <1>;
                ranges;
 
-               framebuffer@0 {
+               simplefb_hdmi: framebuffer@0 {
                        compatible = "allwinner,simple-framebuffer",
                                     "simple-framebuffer";
                        allwinner,pipeline = "de_be0-lcd0-hdmi";
@@ -69,7 +69,7 @@
                        status = "disabled";
                };
 
-               framebuffer@1 {
+               simplefb_lcd: framebuffer@1 {
                        compatible = "allwinner,simple-framebuffer",
                                     "simple-framebuffer";
                        allwinner,pipeline = "de_be0-lcd0";
                        compatible = "allwinner,sun6i-a31-ahb1-gates-clk";
                        reg = <0x01c20060 0x8>;
                        clocks = <&ahb1>;
+                       clock-indices = <1>, <5>,
+                                       <6>, <8>, <9>,
+                                       <10>, <11>, <12>,
+                                       <13>, <14>,
+                                       <17>, <18>, <19>,
+                                       <20>, <21>, <22>,
+                                       <23>, <24>, <26>,
+                                       <27>, <29>,
+                                       <30>, <31>, <32>,
+                                       <36>, <37>, <40>,
+                                       <43>, <44>, <45>,
+                                       <46>, <47>, <50>,
+                                       <52>, <55>, <56>,
+                                       <57>, <58>;
                        clock-output-names = "ahb1_mipidsi", "ahb1_ss",
                                        "ahb1_dma", "ahb1_mmc0", "ahb1_mmc1",
                                        "ahb1_mmc2", "ahb1_mmc3", "ahb1_nand1",
                        compatible = "allwinner,sun6i-a31-apb1-gates-clk";
                        reg = <0x01c20068 0x4>;
                        clocks = <&apb1>;
+                       clock-indices = <0>, <4>,
+                                       <5>, <12>,
+                                       <13>;
                        clock-output-names = "apb1_codec", "apb1_digital_mic",
                                        "apb1_pio", "apb1_daudio0",
                                        "apb1_daudio1";
                        compatible = "allwinner,sun6i-a31-apb2-gates-clk";
                        reg = <0x01c2006c 0x4>;
                        clocks = <&apb2>;
+                       clock-indices = <0>, <1>,
+                                       <2>, <3>, <16>,
+                                       <17>, <18>, <19>,
+                                       <20>, <21>;
                        clock-output-names = "apb2_i2c0", "apb2_i2c1",
                                             "apb2_i2c2", "apb2_i2c3",
                                             "apb2_uart0", "apb2_uart1",
                                             "mmc3_sample";
                };
 
+               ss_clk: clk@01c2009c {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-mod0-clk";
+                       reg = <0x01c2009c 0x4>;
+                       clocks = <&osc24M>, <&pll6 0>;
+                       clock-output-names = "ss";
+               };
+
                spi0_clk: clk@01c200a0 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-a10-mod0-clk";
                        compatible = "allwinner,sun6i-a31-usb-clk";
                        reg = <0x01c200cc 0x4>;
                        clocks = <&osc24M>;
+                       clock-indices = <8>, <9>, <10>,
+                                       <16>, <17>,
+                                       <18>;
                        clock-output-names = "usb_phy0", "usb_phy1", "usb_phy2",
                                             "usb_ohci0", "usb_ohci1",
                                             "usb_ohci2";
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
 
+                       mmc3_8bit_emmc_pins: mmc3@1 {
+                               allwinner,pins = "PC6", "PC7", "PC8", "PC9",
+                                                "PC10", "PC11", "PC12",
+                                                "PC13", "PC14", "PC15",
+                                                "PC24";
+                               allwinner,function = "mmc3";
+                               allwinner,drive = <SUN4I_PINCTRL_40_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
                        gmac_pins_mii_a: gmac_mii@0 {
                                allwinner,pins = "PA0", "PA1", "PA2", "PA3",
                                                "PA8", "PA9", "PA11",
                        reg = <0x01c20ca0 0x20>;
                };
 
+               lradc: lradc@01c22800 {
+                       compatible = "allwinner,sun4i-a10-lradc-keys";
+                       reg = <0x01c22800 0x100>;
+                       interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+                       status = "disabled";
+               };
+
                rtp: rtp@01c25000 {
                        compatible = "allwinner,sun6i-a31-ts";
                        reg = <0x01c25000 0x100>;
                        #size-cells = <0>;
                };
 
+               crypto: crypto-engine@01c15000 {
+                       compatible = "allwinner,sun4i-a10-crypto";
+                       reg = <0x01c15000 0x1000>;
+                       interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ahb1_gates 5>, <&ss_clk>;
+                       clock-names = "ahb", "mod";
+                       resets = <&ahb1_rst 5>;
+                       reset-names = "ahb";
+               };
+
                timer@01c60000 {
                        compatible = "allwinner,sun6i-a31-hstimer",
                                     "allwinner,sun7i-a20-hstimer";
                        resets = <&apb0_rst 0>;
                        gpio-controller;
                        interrupt-controller;
-                       #interrupt-cells = <2>;
+                       #interrupt-cells = <3>;
                        #size-cells = <0>;
                        #gpio-cells = <3>;
 
diff --git a/arch/arm/dts/sun6i-a31s-colorfly-e708-q1.dts b/arch/arm/dts/sun6i-a31s-colorfly-e708-q1.dts
new file mode 100644 (file)
index 0000000..e182eec
--- /dev/null
@@ -0,0 +1,208 @@
+/*
+ * Copyright 2016 Hans de Goede <hdegoede@redhat.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun6i-a31s.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+
+/ {
+       model = "Colorfly E708 Q1 tablet";
+       compatible = "colorfly,e708-q1", "allwinner,sun6i-a31s";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc3>;
+};
+
+&ehci0 {
+       /* rtl8188etv wifi is connected here */
+       status = "okay";
+};
+
+&lradc {
+       vref-supply = <&reg_aldo3>;
+       status = "okay";
+
+       button@1000 {
+               label = "Home";
+               linux,code = <KEY_HOMEPAGE>;
+               channel = <0>;
+               voltage = <1000000>;
+       };
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_e708_q1>;
+       vmmc-supply = <&reg_dcdc1>;
+       bus-width = <4>;
+       cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
+       cd-inverted;
+       status = "okay";
+};
+
+&pio {
+       mma8452_int_e708_q1: mma8452_int_pin@0 {
+               allwinner,pins = "PA9";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+
+       mmc0_cd_pin_e708_q1: mmc0_cd_pin@0 {
+               allwinner,pins = "PA8";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+};
+
+&p2wi {
+       status = "okay";
+
+       axp22x: pmic@68 {
+               compatible = "x-powers,axp221";
+               reg = <0x68>;
+               interrupt-parent = <&nmi_intc>;
+               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+       };
+};
+
+#include "axp22x.dtsi"
+
+&reg_aldo3 {
+       regulator-always-on;
+       regulator-min-microvolt = <2700000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "avcc";
+};
+
+&reg_dc1sw {
+       regulator-name = "vcc-lcd";
+};
+
+&reg_dc5ldo {
+       regulator-always-on;
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-cpus"; /* This is an educated guess */
+};
+
+&reg_dcdc1 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "vcc-3v0";
+};
+
+&reg_dcdc2 {
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-gpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc4 {
+       regulator-always-on;
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-sys-dll";
+};
+
+&reg_dcdc5 {
+       regulator-always-on;
+       regulator-min-microvolt = <1500000>;
+       regulator-max-microvolt = <1500000>;
+       regulator-name = "vcc-dram";
+};
+
+&reg_dldo1 {
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-wifi";
+};
+
+&reg_dldo2 {
+       regulator-min-microvolt = <1800000>;
+       regulator-max-microvolt = <1800000>;
+       regulator-name = "vcc-pg";
+};
+
+&simplefb_lcd {
+       vcc-lcd-supply = <&reg_dc1sw>;
+       vcc-pg-supply = <&reg_dldo2>;
+};
+
+/*
+ * FIXME for now we only support host mode and rely on u-boot to have
+ * turned on Vbus which is controlled by the axp221 pmic on the board.
+ *
+ * Once we have axp221 power-supply and vbus-usb support we should switch
+ * to fully supporting otg.
+ */
+&usb_otg {
+       dr_mode = "host";
+       status = "okay";
+};
+
+&usbphy {
+       usb1_vbus-supply = <&reg_dldo1>;
+       status = "okay";
+};
index cfdc03e44827c802e2882a1beb4f04a884df3110..379746a3973220d0c9aa868e914139ba27d3ac95 100644 (file)
@@ -1,16 +1,57 @@
 /*
- * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
+ * Copyright 2014 Siarhei Siamashka <siarhei.siamashka@gmail.com>
+ * Copyright 2015 Karsten Merker <merker@debian.org>
+ * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
  *
- * Minimal dts file for the MSI Primo81 for u-boot only
+ * 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.
  *
- * SPDX-License-Identifier:     GPL-2.0+ or X11
+ *  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 "sun6i-a31s.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
 
 / {
-       model = "MSI Primo81";
+       model = "MSI Primo81 tablet";
        compatible = "msi,primo81", "allwinner,sun6i-a31s";
 
        aliases {
        };
 };
 
-&uart0 {
+&cpu0 {
+       cpu-supply = <&reg_dcdc3>;
+};
+
+&ehci0 {
+       /* rtl8188etv wifi is connected here */
+       status = "okay";
+};
+
+&i2c0 {
+       /* pull-ups and device VDDIO use AXP221 DLDO3 */
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins_a>;
+       status = "failed";
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       status = "okay";
+
+       ctp@5d {
+               pinctrl-names = "default";
+               pinctrl-0 = <&gt911_int_primo81>;
+               compatible = "goodix,gt911";
+               reg = <0x5d>;
+               interrupt-parent = <&pio>;
+               interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */
+               touchscreen-swapped-x-y;
+       };
+};
+
+&i2c2 {
        pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pins_a>;
+       pinctrl-0 = <&i2c2_pins_a>;
+       status = "okay";
+
+       accelerometer@1c {
+               pinctrl-names = "default";
+               pinctrl-0 = <&mma8452_int_primo81>;
+               compatible = "fsl,mma8452";
+               reg = <0x1c>;
+               interrupt-parent = <&pio>;
+               interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>; /* PA9 */
+               #io-channel-cells = <1>;
+       };
+};
+
+&lradc {
+       vref-supply = <&reg_aldo3>;
+       status = "okay";
+
+       button@158 {
+               label = "Volume Up";
+               linux,code = <KEY_VOLUMEUP>;
+               channel = <0>;
+               voltage = <158730>;
+       };
+
+       button@349 {
+               label = "Volume Down";
+               linux,code = <KEY_VOLUMEDOWN>;
+               channel = <0>;
+               voltage = <349206>;
+       };
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
+       vmmc-supply = <&reg_dcdc1>;
+       bus-width = <4>;
+       cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
+       cd-inverted;
+       status = "okay";
+};
+
+&pio {
+       gt911_int_primo81: gt911_int_pin@0 {
+               allwinner,pins = "PA3";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       mma8452_int_primo81: mma8452_int_pin@0 {
+               allwinner,pins = "PA9";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+
+       mmc0_cd_pin_primo81: mmc0_cd_pin@0 {
+               allwinner,pins = "PA8";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+};
+
+&p2wi {
+       status = "okay";
+
+       axp22x: pmic@68 {
+               compatible = "x-powers,axp221";
+               reg = <0x68>;
+               interrupt-parent = <&nmi_intc>;
+               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+       };
+};
+
+#include "axp22x.dtsi"
+
+&reg_aldo3 {
+       regulator-always-on;
+       regulator-min-microvolt = <2700000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "avcc";
+};
+
+&reg_dc1sw {
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "vcc-lcd";
+};
+
+&reg_dc5ldo {
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-cpus"; /* This is an educated guess */
+};
+
+&reg_dcdc1 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "vcc-3v0";
+};
+
+&reg_dcdc2 {
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-gpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc4 {
+       regulator-always-on;
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-sys-dll";
+};
+
+&reg_dcdc5 {
+       regulator-always-on;
+       regulator-min-microvolt = <1500000>;
+       regulator-max-microvolt = <1500000>;
+       regulator-name = "vcc-dram";
+};
+
+&reg_dldo1 {
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-wifi";
+};
+
+&reg_dldo3 {
+       regulator-min-microvolt = <2800000>;
+       regulator-max-microvolt = <2800000>;
+       regulator-name = "vddio-csi";
+};
+
+&reg_eldo3 {
+       regulator-min-microvolt = <1080000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-mipi-bridge";
+};
+
+&simplefb_lcd {
+       vcc-lcd-supply = <&reg_dc1sw>;
+       vdd-mipi-bridge-supply = <&reg_eldo3>;
+};
+
+&usb_otg {
+       /* otg support requires support for AXP221 usb-power-supply and GPIO */
+       dr_mode = "host";
+       status = "okay";
+};
+
+&usbphy {
+       usb1_vbus-supply = <&reg_dldo1>;
        status = "okay";
 };
diff --git a/arch/arm/dts/sun6i-a31s-sina31s-core.dtsi b/arch/arm/dts/sun6i-a31s-sina31s-core.dtsi
new file mode 100644 (file)
index 0000000..4ec0c86
--- /dev/null
@@ -0,0 +1,142 @@
+/*
+ * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * 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 "sun6i-a31s.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+
+/ {
+       model = "Sinlinx SinA31s Core Board";
+       compatible = "sinlinx,sina31s", "allwinner,sun6i-a31s";
+
+       aliases {
+               serial0 = &uart0;
+       };
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc3>;
+};
+
+/* eMMC on core board */
+&mmc3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc3_8bit_emmc_pins>;
+       vmmc-supply = <&reg_dcdc1>;
+       vqmmc-supply = <&reg_dcdc1>;
+       bus-width = <8>;
+       non-removable;
+       cap-mmc-hw-reset;
+       status = "okay";
+};
+
+/* AXP221s PMIC on core board */
+&p2wi {
+       status = "okay";
+
+       axp22x: pmic@68 {
+               compatible = "x-powers,axp221";
+               reg = <0x68>;
+               interrupt-parent = <&nmi_intc>;
+               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+       };
+};
+
+#include "axp22x.dtsi"
+
+&reg_aldo3 {
+       regulator-always-on;
+       regulator-min-microvolt = <2700000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "avcc";
+};
+
+&reg_dc5ldo {
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-cpus";
+};
+
+&reg_dcdc1 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "vcc-3v0";
+};
+
+&reg_dcdc2 {
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-gpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc4 {
+       regulator-always-on;
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-sys-dll";
+};
+
+&reg_dcdc5 {
+       regulator-always-on;
+       regulator-min-microvolt = <1500000>;
+       regulator-max-microvolt = <1500000>;
+       regulator-name = "vcc-dram";
+};
+
+/* UART0 pads available on core board */
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
+};
+
diff --git a/arch/arm/dts/sun6i-a31s-sina31s.dts b/arch/arm/dts/sun6i-a31s-sina31s.dts
new file mode 100644 (file)
index 0000000..6ead2f5
--- /dev/null
@@ -0,0 +1,153 @@
+/*
+ * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * 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.
+ */
+
+/* The SinA31s development board has the SinA31s core board soldered on */
+#include "sun6i-a31s-sina31s-core.dtsi"
+
+#include <dt-bindings/input/input.h>
+
+/ {
+       model = "Sinlinx SinA31s Development Board";
+       compatible = "sinlinx,sina31s-sdk", "allwinner,sun6i-a31s";
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&led_pin_sina31s>;
+
+               status {
+                       label = "sina31s:status:usr";
+                       gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */
+               };
+       };
+};
+
+&ehci0 {
+       /* USB 2.0 4 port hub IC */
+       status = "okay";
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&gmac {
+       pinctrl-names = "default";
+       pinctrl-0 = <&gmac_pins_mii_a>;
+       phy = <&phy1>;
+       phy-mode = "mii";
+       phy-supply = <&reg_dldo1>;
+       status = "okay";
+
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
+&ir {
+       pinctrl-names = "default";
+       pinctrl-0 = <&ir_pins_a>;
+       status = "okay";
+};
+
+&lradc {
+       vref-supply = <&reg_aldo3>;
+       status = "okay";
+
+       button@158 {
+               label = "Volume Up";
+               linux,code = <KEY_VOLUMEUP>;
+               channel = <0>;
+               voltage = <158730>;
+       };
+
+       button@349 {
+               label = "Volume Down";
+               linux,code = <KEY_VOLUMEDOWN>;
+               channel = <0>;
+               voltage = <349206>;
+       };
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina31s>;
+       vmmc-supply = <&reg_dcdc1>;
+       bus-width = <4>;
+       cd-gpios = <&pio 0 4 GPIO_ACTIVE_HIGH>; /* PA4 */
+       cd-inverted;
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+&pio {
+       led_pin_sina31s: led_pin@0 {
+               allwinner,pins = "PH13";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       mmc0_cd_pin_sina31s: mmc0_cd_pin@0 {
+               allwinner,pins = "PA4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+};
+
+&reg_dldo1 {
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-gmac-phy";
+};
+
+&usbphy {
+       status = "okay";
+};
diff --git a/arch/arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts b/arch/arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts
new file mode 100644 (file)
index 0000000..360adfb
--- /dev/null
@@ -0,0 +1,205 @@
+/*
+ * Copyright 2015 Lawrence Yu <lyu@micile.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 "sun6i-a31s.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+
+/ {
+       model = "Yones TopTech BS1078 v2 Tablet";
+       compatible = "yones-toptech,bs1078-v2", "allwinner,sun6i-a31s";
+
+       aliases {
+               serial0 = &uart0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       status = "okay";
+};
+
+&i2c2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c2_pins_a>;
+       status = "okay";
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&ohci0 {
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+&pio {
+       mmc0_cd_pin_bs1078v2: mmc0_cd_pin@0 {
+               allwinner,pins = "PA8";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bs1078v2>;
+       vmmc-supply = <&reg_vcc3v0>;
+       bus-width = <4>;
+       cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
+       cd-inverted;
+       status = "okay";
+};
+
+&mmc0_pins_a {
+       allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
+
+&p2wi {
+       status = "okay";
+
+       axp22x: pmic@68 {
+               compatible = "x-powers,axp221";
+               reg = <0x68>;
+               interrupt-parent = <&nmi_intc>;
+               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+       };
+};
+
+#include "axp22x.dtsi"
+
+&reg_aldo3 {
+       regulator-always-on;
+       regulator-min-microvolt = <2700000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "avcc";
+};
+
+&reg_dc1sw {
+       regulator-name = "vcc-lcd-usb2";
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+};
+
+&reg_dc5ldo {
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-cpus";
+};
+
+&reg_dcdc1 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "vcc-3v0";
+};
+
+&reg_dcdc2 {
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-gpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc4 {
+       regulator-always-on;
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-sys-dll";
+};
+
+&reg_dcdc5 {
+       regulator-always-on;
+       regulator-min-microvolt = <1500000>;
+       regulator-max-microvolt = <1500000>;
+       regulator-name = "vcc-dram";
+};
+
+&reg_dldo1 {
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-wifi";
+};
+
+/* Voltage source for I2C pullup resistors for I2C Bus 0 */
+&reg_dldo3 {
+       regulator-min-microvolt = <2800000>;
+       regulator-max-microvolt = <2800000>;
+       regulator-name = "vddio-csi";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
+};
+
+&usbphy {
+       usb1_vbus-supply = <&reg_dldo1>;
+       usb2_vbus-supply = <&reg_dc1sw>;
+       status = "okay";
+};
index 9f7b472e6725606cfd850cf1fc69b961ea6d6e20..67c8a7644b99623838b08e142bf2c236f0db5c9e 100644 (file)
        status = "okay";
 };
 
+&codec {
+       status = "okay";
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
+       operating-points = <
+               /* kHz    uV */
+               960000  1400000
+               912000  1400000
+               864000  1350000
+               720000  1250000
+               528000  1150000
+               312000  1100000
+               144000  1050000
+               >;
+};
+
 &ehci0 {
        status = "okay";
 };
        status = "okay";
 
        axp209: pmic@34 {
-               compatible = "x-powers,axp209";
                reg = <0x34>;
                interrupt-parent = <&nmi_intc>;
                interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-
-               interrupt-controller;
-               #interrupt-cells = <1>;
        };
 };
 
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+
        mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
                allwinner,pins = "PH10";
                allwinner,function = "gpio_in";
        };
 };
 
+#include "axp209.dtsi"
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
+};
+
+&reg_usb0_vbus {
+       status = "okay";
+};
+
 &reg_usb1_vbus {
        status = "okay";
 };
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usb_power_supply {
+       status = "okay";
+};
+
 &usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>;
+       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_vbus_power-supply = <&usb_power_supply>;
+       usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
index 39a51d5143f73b075d8dc4d4e7781d3ea919a2c5..1fa832d7b469829636c18ca22c60a06a56ddfd06 100644 (file)
        status = "okay";
 };
 
+&codec {
+       status = "okay";
+};
+
 &cpu0 {
        cpu-supply = <&reg_dcdc2>;
 };
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
        led_pins_cubieboard2: led_pins@0 {
                allwinner,pins = "PH20", "PH21";
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
 };
 
 &reg_ahci_5v {
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
 #include "axp209.dtsi"
 
 &reg_dcdc2 {
 };
 
 &usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>;
+       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
index e6b019232a9e880ea48a9b7f9dd975f6846be84e..8da939ab835001ab79b0be8409324210a0bc4fa7 100644 (file)
        status = "okay";
 };
 
+&codec {
+       status = "okay";
+};
+
 &cpu0 {
        cpu-supply = <&reg_dcdc2>;
 };
diff --git a/arch/arm/dts/sun7i-a20-icnova-swac.dts b/arch/arm/dts/sun7i-a20-icnova-swac.dts
new file mode 100644 (file)
index 0000000..f5b5325
--- /dev/null
@@ -0,0 +1,169 @@
+/*
+ * Copyright 2015 Stefan Roese <sr@denx.de>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun7i-a20.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+
+/ {
+       model = "ICnova-A20 SWAC";
+       compatible = "swac,icnova-a20-swac", "incircuit,icnova-a20", "allwinner,sun7i-a20";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&gmac {
+       pinctrl-names = "default";
+       pinctrl-0 = <&gmac_pins_mii_a>;
+       phy = <&phy1>;
+       phy-mode = "mii";
+       status = "okay";
+
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins_a>;
+       status = "okay";
+
+       axp209: pmic@34 {
+               reg = <0x34>;
+               interrupt-parent = <&nmi_intc>;
+               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+       };
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       status = "okay";
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 8 5 GPIO_ACTIVE_HIGH>; /* PI5 */
+       cd-inverted;
+       status = "okay";
+};
+
+&ohci0 {
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+#include "axp209.dtsi"
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
+};
+
+&reg_usb1_vbus {
+       status = "okay";
+};
+
+&reg_usb2_vbus {
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
+};
+
+&usbphy {
+       usb1_vbus-supply = <&reg_usb1_vbus>;
+       usb2_vbus-supply = <&reg_usb2_vbus>;
+       status = "okay";
+};
diff --git a/arch/arm/dts/sun7i-a20-itead-ibox.dts b/arch/arm/dts/sun7i-a20-itead-ibox.dts
new file mode 100644 (file)
index 0000000..661c21d
--- /dev/null
@@ -0,0 +1,125 @@
+/*
+ * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun7i-a20.dtsi"
+#include "sunxi-itead-core-common.dtsi"
+
+/ {
+       model = "Itead Ibox A20";
+       compatible = "itead,itead-ibox-a20", "allwinner,sun7i-a20";
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&led_pins_itead_core>;
+
+               green {
+                       label = "itead_core:green:usr";
+                       gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+
+               blue {
+                       label = "itead_core:blue:usr";
+                       gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+       };
+};
+
+&ahci {
+       target-supply = <&reg_ahci_5v>;
+       status = "okay";
+};
+
+&codec {
+       status = "okay";
+};
+
+&gmac {
+       pinctrl-names = "default";
+       pinctrl-0 = <&gmac_pins_mii_a>;
+       phy = <&phy1>;
+       phy-mode = "mii";
+       status = "okay";
+
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
+&i2c0 {
+       axp209: pmic@34 {
+               interrupt-parent = <&nmi_intc>;
+               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+       };
+};
+
+&ir0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&ir0_rx_pins_a>;
+       status = "okay";
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
+       cd-inverted;
+       status = "okay";
+};
+
+&pio {
+       led_pins_itead_core: led_pins@0 {
+               allwinner,pins = "PH20","PH21";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_20_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
+&reg_ahci_5v {
+       status = "okay";
+};
index 975b0b278bea1dbbb800e8e020446c540cf5da3c..5ee43d8bf17484f386df9b62e6e878c6eb2a94cd 100644 (file)
 
 &cpu0 {
        cpu-supply = <&reg_dcdc2>;
-       operating-points = <
-               /* kHz    uV */
-               960000  1400000
-               912000  1400000
-               864000  1350000
-               720000  1250000
-               528000  1150000
-               312000  1100000
-               144000  1050000
-               >;
 };
 
 &ehci0 {
index 4f432f8ade77aa66b388177ab33d9c3b9755d1d1..90ff4a2670259fb8ec18b2980c913a36b2ed67ac 100644 (file)
@@ -53,6 +53,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
 
 / {
        model = "mk808c";
        };
 };
 
+&codec {
+       status = "okay";
+};
+
 &ehci0 {
        status = "okay";
 };
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
+&pio {
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+               allwinner,pins = "PH5";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
+&reg_usb0_vbus {
+       status = "okay";
+};
+
 &reg_usb1_vbus {
        status = "okay";
 };
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
 &usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+       usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+       usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
index 6904dbd73257f2e26bd04387ddaba5a85acd6afa..23aacce4d6c7ab8e408d6591d1ab5cc58e7ae5dc 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
+ * Copyright 2015 - Karsten Merker <merker@debian.org>
  *
  * This file is dual-licensed: you can use it either under the terms
  * of the GPL or the X11 license, at your option. Note that this dual
@@ -45,6 +46,7 @@
 #include "sunxi-common-regulators.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
                        default-state = "on";
                };
        };
-
-       reg_axp_ipsout: axp_ipsout {
-               compatible = "regulator-fixed";
-               regulator-name = "axp-ipsout";
-               regulator-min-microvolt = <5000000>;
-               regulator-max-microvolt = <5000000>;
-               regulator-always-on;
-       };
 };
 
 &ahci {
        status = "okay";
 };
 
+&codec {
+       status = "okay";
+};
+
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_pins_rgmii_a>;
        };
 };
 
-&i2c1 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&i2c1_pins_a>;
+&lradc {
+       vref-supply = <&reg_vcc3v0>;
        status = "okay";
+
+       button@190 {
+               label = "Volume Up";
+               linux,code = <KEY_VOLUMEUP>;
+               channel = <0>;
+               voltage = <190000>;
+       };
+
+       button@390 {
+               label = "Volume Down";
+               linux,code = <KEY_VOLUMEDOWN>;
+               channel = <0>;
+               voltage = <390000>;
+       };
+
+       button@600 {
+               label = "Menu";
+               linux,code = <KEY_MENU>;
+               channel = <0>;
+               voltage = <600000>;
+       };
+
+       button@800 {
+               label = "Search";
+               linux,code = <KEY_SEARCH>;
+               channel = <0>;
+               voltage = <800000>;
+       };
+
+       button@980 {
+               label = "Home";
+               linux,code = <KEY_HOMEPAGE>;
+               channel = <0>;
+               voltage = <980000>;
+       };
+
+       button@1180 {
+               label = "Esc";
+               linux,code = <KEY_ESC>;
+               channel = <0>;
+               voltage = <1180000>;
+       };
+
+       button@1400 {
+               label = "Enter";
+               linux,code = <KEY_ENTER>;
+               channel = <0>;
+               voltage = <1400000>;
+       };
 };
 
 &mmc0 {
        status = "okay";
 };
 
+&mmc3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olimex_som_evb>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */
+       cd-inverted;
+       status = "okay";
+};
+
 &ohci0 {
        status = "okay";
 };
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
 
+       mmc3_cd_pin_olimex_som_evb: mmc3_cd_pin@0 {
+               allwinner,pins = "PH0";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+
        usb0_id_detect_pin: usb0_id_detect_pin@0 {
-               allwinner,pins = "PH04";
+               allwinner,pins = "PH4";
                allwinner,function = "gpio_in";
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
 
        usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
-               allwinner,pins = "PH05";
+               allwinner,pins = "PH5";
                allwinner,function = "gpio_in";
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 &reg_dcdc2 {
        regulator-always-on;
        regulator-min-microvolt = <1000000>;
-       regulator-max-microvolt = <1425000>;
+       regulator-max-microvolt = <1400000>;
        regulator-name = "vdd-cpu";
 };
 
 &usbphy {
        pinctrl-names = "default";
        pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-       usb0_id_det-gpios = <&pio 7 04 GPIO_ACTIVE_HIGH>; /* PH04 */
-       usb0_vbus_det-gpios = <&pio 7 05 GPIO_ACTIVE_HIGH>; /* PH05 */
+       usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH04 */
+       usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH05 */
        usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
index 04237085dc394423add52ff8d23486a183c5d55d..35ad7006c53ce7ea88d514977ce891aa2be5a92c 100644 (file)
        };
 };
 
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       status = "okay";
+
+       eeprom: eeprom@50 {
+               compatible = "atmel,24c16";
+               reg = <0x50>;
+               pagesize = <16>;
+       };
+};
+
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
index 8acff78272b7fe571f38758ef4d335a9ff32c28e..d5c796c8d16f272ac6925438f95b6ec9616a50ee 100644 (file)
        pinctrl-names = "default";
        pinctrl-0 = <&i2c1_pins_a>;
        status = "okay";
+
+       eeprom: eeprom@50 {
+               compatible = "atmel,24c16";
+               reg = <0x50>;
+               pagesize = <16>;
+       };
 };
 
 &mmc0 {
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
        ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
                allwinner,pins = "PC3";
                allwinner,drive = <SUN4I_PINCTRL_20_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+
+       usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+               allwinner,pins = "PH5";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+       };
+
+       usb0_vbus_pin_lime2: usb0_vbus_pin@0 {
+               allwinner,pins = "PC17";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
 };
 
 &reg_ahci_5v {
        status = "okay";
 };
 
+&reg_usb0_vbus {
+       pinctrl-0 = <&usb0_vbus_pin_lime2>;
+       gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
 &reg_usb1_vbus {
        status = "okay";
 };
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
 &usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+       usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
index c5d70caade8238179f136f5326adb25fa8454c41..7e3006f6a775acbad79841fd74084c3aac0ce01a 100644 (file)
        pinctrl-names = "default";
        pinctrl-0 = <&i2c1_pins_a>;
        status = "okay";
+
+       eeprom: eeprom@50 {
+               compatible = "atmel,24c16";
+               reg = <0x50>;
+               pagesize = <16>;
+       };
 };
 
 &i2c2 {
index 73cd81ee02e3d526bf571cb0d41e09f689a96ca5..2be04c438b1e144a4616376fa41901b1baf4de33 100644 (file)
        status = "okay";
 };
 
+&codec {
+       status = "okay";
+};
+
 &ehci0 {
        status = "okay";
 };
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+
        mmc0_cd_pin_orangepi: mmc0_cd_pin@0 {
                allwinner,pins = "PH10";
                allwinner,function = "gpio_in";
        regulator-name = "avcc";
 };
 
+&reg_usb0_vbus {
+       status = "okay";
+};
+
 &reg_usb1_vbus {
        pinctrl-0 = <&usb1_vbus_pin_bananapro>;
        gpio = <&pio 7 26 GPIO_ACTIVE_HIGH>; /* PH26 */
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usb_power_supply {
+       status = "okay";
+};
+
 &usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>;
+       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_vbus_power-supply = <&usb_power_supply>;
+       usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
index 55a06ceb80ec2176f4c686e48ba2efc791dd4d0f..71125bf6457513db6b2b606cc856572035d3f091 100644 (file)
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+
        mmc0_cd_pin_orangepi: mmc0_cd_pin@0 {
                allwinner,pins = "PH10";
                allwinner,function = "gpio_in";
        regulator-name = "avcc";
 };
 
+&reg_usb0_vbus {
+       status = "okay";
+};
+
 &reg_usb1_vbus {
        pinctrl-0 = <&usb1_vbus_pin_bananapro>;
        gpio = <&pio 7 26 GPIO_ACTIVE_HIGH>; /* PH26 */
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usb_power_supply {
+       status = "okay";
+};
+
 &usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>;
+       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_vbus_power-supply = <&usb_power_supply>;
+       usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
index 5361fce26b45ce53a527f141feb1507ffd54abc3..ddac7328b852c1593fd269eca8c74ba8505a17fb 100644 (file)
        status = "okay";
 };
 
+&codec {
+       status = "okay";
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
+};
+
 &ehci0 {
        status = "okay";
 };
        status = "okay";
 
        axp209: pmic@34 {
-               compatible = "x-powers,axp209";
                reg = <0x34>;
                interrupt-parent = <&nmi_intc>;
                interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-
-               interrupt-controller;
-               #interrupt-cells = <1>;
        };
 };
 
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
        ahci_pwr_pin_pcduino3_nano: ahci_pwr_pin@0 {
                allwinner,pins = "PH2";
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
 
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+
        usb1_vbus_pin_pcduino3_nano: usb1_vbus_pin@0 {
-               allwinner,pins = "PH11";
+               allwinner,pins = "PD2";
                allwinner,function = "gpio_out";
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        status = "okay";
 };
 
-&reg_usb1_vbus {
-       pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>;
-       gpio = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
-       status = "okay";
+#include "axp209.dtsi"
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-int-pll";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
 };
 
-&reg_usb2_vbus {
+/* A single regulator (U24) powers both USB host ports. */
+&reg_usb1_vbus {
+       pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>;
+       gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
        status = "okay";
 };
 
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
 &usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>;
+       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
        usb1_vbus-supply = <&reg_usb1_vbus>;
-       usb2_vbus-supply = <&reg_usb2_vbus>;
+       usb2_vbus-supply = <&reg_usb1_vbus>;
        status = "okay";
 };
index afc9ecebed21a6c4c89b9981d1d71a1eb1b0641f..1a8b39be1d61d83e0666623bb5ba839cfd1c798c 100644 (file)
        allwinner,pins = "PH2";
 };
 
+&codec {
+       status = "okay";
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
+};
+
 &ehci0 {
        status = "okay";
 };
        status = "okay";
 
        axp209: pmic@34 {
-               compatible = "x-powers,axp209";
                reg = <0x34>;
                interrupt-parent = <&nmi_intc>;
                interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-
-               interrupt-controller;
-               #interrupt-cells = <1>;
        };
 };
 
+#include "axp209.dtsi"
+
 &ir0 {
        pinctrl-names = "default";
        pinctrl-0 = <&ir0_rx_pins_a>;
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
        led_pins_pcduino3: led_pins@0 {
                allwinner,pins = "PH15", "PH16";
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
 };
 
 &reg_ahci_5v {
        status = "okay";
 };
 
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-int-pll";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
+};
+
 &reg_usb1_vbus {
        status = "okay";
 };
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
 &usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>;
+       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
index 83c6d3f872ffa2a5cdb512c3c8c4e5d3019d5519..2f6b21adddd9b963f6b2ec84f2ae1dc289009830 100644 (file)
@@ -48,6 +48,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pwm/pwm.h>
 
 / {
        model = "Wexler TAB7200";
                serial0 = &uart0;
        };
 
+       backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+               brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+               default-brightness-level = <8>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&bl_enable_pin>;
+               enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
+       };
+
        chosen {
                stdout-path = "serial0:115200n8";
        };
 };
 
+&codec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&codec_pa_pin>;
+       allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
+       status = "okay";
+};
+
 &cpu0 {
        cpu-supply = <&reg_dcdc2>;
 };
        };
 };
 
+#include "axp209.dtsi"
+
 &i2c1 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c1_pins_a>;
        pinctrl-names = "default";
        pinctrl-0 = <&i2c2_pins_a>;
        status = "okay";
+
+       gt911: touchscreen@5d {
+               compatible = "goodix,gt911";
+               reg = <0x5d>;
+               interrupt-parent = <&pio>;
+               interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
+               pinctrl-names = "default";
+               pinctrl-0 = <&ts_reset_pin>;
+               irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */
+               reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */
+               touchscreen-swapped-x-y;
+       };
 };
 
 &lradc {
        status = "okay";
 };
 
-#include "axp209.dtsi"
+&otg_sram {
+       status = "okay";
+};
+
+&pio {
+       bl_enable_pin: bl_enable_pin@0 {
+               allwinner,pins = "PH7";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       codec_pa_pin: codec_pa_pin@0 {
+               allwinner,pins = "PH15";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       ts_reset_pin: ts_reset_pin@0 {
+               allwinner,pins = "PB13";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+};
+
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_pins_a>;
+       status = "okay";
+};
 
 &reg_dcdc2 {
        regulator-always-on;
        regulator-name = "avcc";
 };
 
+&reg_usb0_vbus {
+       status = "okay";
+};
+
 &reg_usb1_vbus {
        status = "okay";
 };
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usb_power_supply {
+       status = "okay";
+};
+
 &usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>;
+       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_vbus_power-supply = <&usb_power_supply>;
+       usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
index e7d84fefc87a8cf6cb2db6ae81f7dced8a4642d3..dc31d476ef813985b306242bad50a9daad413506 100644 (file)
@@ -1,13 +1,52 @@
 /*
- * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
+ * Copyright 2015 Jelle de Jong <jelledejong@powercraft.nl>
  *
- * Minimal dts file for the Wits Pro A20 DKT for u-boot only
+ * 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.
  *
- * SPDX-License-Identifier:     GPL-2.0+ or X11
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 /dts-v1/;
 #include "sun7i-a20.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 
 / {
        model = "Wits Pro A20 DKT";
        chosen {
                stdout-path = "serial0:115200n8";
        };
+
+       mmc3_pwrseq: mmc3_pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               pinctrl-names = "default";
+               pinctrl-0 = <&vmmc3_pin_ap6xxx_wl_regon>;
+               reset-gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH9 WIFI_EN */
+       };
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
 };
 
 &ehci0 {
        };
 };
 
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins_a>;
+       status = "okay";
+
+       axp209: pmic@34 {
+               reg = <0x34>;
+               interrupt-parent = <&nmi_intc>;
+               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+       };
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       status = "okay";
+};
+
+&i2c2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c2_pins_a>;
+       status = "okay";
+};
+
+#include "axp209.dtsi"
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
+       cd-inverted;
+       status = "okay";
+};
+
+&mmc3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc3_pins_a>;
+       vmmc-supply = <&reg_vcc3v3>;
+       mmc-pwrseq = <&mmc3_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+
+       brcmf: bcrmf@1 {
+               reg = <1>;
+               compatible = "brcm,bcm4329-fmac";
+               interrupt-parent = <&pio>;
+               interrupts = <7 10 IRQ_TYPE_LEVEL_LOW>; /* PH10 / EINT10 */
+               interrupt-names = "host-wake";
+       };
+};
+
 &ohci0 {
        status = "okay";
 };
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
+&pio {
+       vmmc3_pin_ap6xxx_wl_regon: vmmc3_pin@0 {
+               allwinner,pins = "PH9";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+};
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1450000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
+};
+
+&reg_usb0_vbus {
+       status = "okay";
+};
+
+&reg_usb1_vbus {
+       status = "okay";
+};
+
+&reg_usb2_vbus {
+       status = "okay";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pins_a>;
        status = "okay";
 };
+
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usb_power_supply {
+       status = "okay";
+};
+
+&usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>;
+       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_vbus_power-supply = <&usb_power_supply>;
+       usb0_vbus-supply = <&reg_usb0_vbus>;
+       usb1_vbus-supply = <&reg_usb1_vbus>;
+       usb2_vbus-supply = <&reg_usb2_vbus>;
+       status = "okay";
+};
index 71ab6b85f240a2478a698df9a5590096b4c5bbc5..0940a788f824396d318214d8ab3d148227cc8fc5 100644 (file)
@@ -47,6 +47,7 @@
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/thermal/thermal.h>
 
+#include <dt-bindings/clock/sun4i-a10-pll2.h>
 #include <dt-bindings/dma/sun4i-a10.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
@@ -67,7 +68,7 @@
                                     "simple-framebuffer";
                        allwinner,pipeline = "de_be0-lcd0-hdmi";
                        clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
-                                <&ahb_gates 44>;
+                                <&ahb_gates 44>, <&dram_gates 26>;
                        status = "disabled";
                };
 
@@ -75,7 +76,8 @@
                        compatible = "allwinner,simple-framebuffer",
                                     "simple-framebuffer";
                        allwinner,pipeline = "de_be0-lcd0";
-                       clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>;
+                       clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>,
+                                <&dram_gates 26>;
                        status = "disabled";
                };
 
@@ -84,7 +86,7 @@
                                     "simple-framebuffer";
                        allwinner,pipeline = "de_be0-lcd0-tve0";
                        clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
-                                <&ahb_gates 44>;
+                                <&ahb_gates 44>, <&dram_gates 26>;
                        status = "disabled";
                };
        };
                                720000  1200000
                                528000  1100000
                                312000  1000000
-                               144000  900000
+                               144000  1000000
                                >;
                        #cooling-cells = <2>;
                        cooling-min-level = <0>;
                        clock-output-names = "pll1";
                };
 
+               pll2: clk@01c20008 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun4i-a10-pll2-clk";
+                       reg = <0x01c20008 0x8>;
+                       clocks = <&osc24M>;
+                       clock-output-names = "pll2-1x", "pll2-2x",
+                                            "pll2-4x", "pll2-8x";
+               };
+
                pll4: clk@01c20018 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun7i-a20-pll4-clk";
                        compatible = "allwinner,sun7i-a20-ahb-gates-clk";
                        reg = <0x01c20060 0x8>;
                        clocks = <&ahb>;
+                       clock-indices = <0>, <1>,
+                                       <2>, <3>, <4>,
+                                       <5>, <6>, <7>, <8>,
+                                       <9>, <10>, <11>, <12>,
+                                       <13>, <14>, <16>,
+                                       <17>, <18>, <20>, <21>,
+                                       <22>, <23>, <25>,
+                                       <28>, <32>, <33>, <34>,
+                                       <35>, <36>, <37>, <40>,
+                                       <41>, <42>, <43>,
+                                       <44>, <45>, <46>,
+                                       <47>, <49>, <50>,
+                                       <52>;
                        clock-output-names = "ahb_usb0", "ahb_ehci0",
                                "ahb_ohci0", "ahb_ehci1", "ahb_ohci1",
                                "ahb_ss", "ahb_dma", "ahb_bist", "ahb_mmc0",
                        compatible = "allwinner,sun7i-a20-apb0-gates-clk";
                        reg = <0x01c20068 0x4>;
                        clocks = <&apb0>;
+                       clock-indices = <0>, <1>,
+                                       <2>, <3>, <4>,
+                                       <5>, <6>, <7>,
+                                       <8>, <10>;
                        clock-output-names = "apb0_codec", "apb0_spdif",
                                "apb0_ac97", "apb0_iis0", "apb0_iis1",
                                "apb0_pio", "apb0_ir0", "apb0_ir1",
                        compatible = "allwinner,sun7i-a20-apb1-gates-clk";
                        reg = <0x01c2006c 0x4>;
                        clocks = <&apb1>;
+                       clock-indices = <0>, <1>,
+                                       <2>, <3>, <4>,
+                                       <5>, <6>, <7>,
+                                       <15>, <16>, <17>,
+                                       <18>, <19>, <20>,
+                                       <21>, <22>, <23>;
                        clock-output-names = "apb1_i2c0", "apb1_i2c1",
                                "apb1_i2c2", "apb1_i2c3", "apb1_can",
                                "apb1_scr", "apb1_ps20", "apb1_ps21",
                        clock-output-names = "ir1";
                };
 
+               keypad_clk: clk@01c200c4 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-mod0-clk";
+                       reg = <0x01c200c4 0x4>;
+                       clocks = <&osc24M>;
+                       clock-output-names = "keypad";
+               };
+
                usb_clk: clk@01c200cc {
                        #clock-cells = <1>;
                        #reset-cells = <1>;
                        clock-output-names = "spi3";
                };
 
+               dram_gates: clk@01c20100 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun4i-a10-dram-gates-clk";
+                       reg = <0x01c20100 0x4>;
+                       clocks = <&pll5 0>;
+                       clock-indices = <0>,
+                                       <1>, <2>,
+                                       <3>,
+                                       <4>,
+                                       <5>, <6>,
+                                       <15>,
+                                       <24>, <25>,
+                                       <26>, <27>,
+                                       <28>, <29>;
+                       clock-output-names = "dram_ve",
+                                            "dram_csi0", "dram_csi1",
+                                            "dram_ts",
+                                            "dram_tvd",
+                                            "dram_tve0", "dram_tve1",
+                                            "dram_output",
+                                            "dram_de_fe1", "dram_de_fe0",
+                                            "dram_de_be0", "dram_de_be1",
+                                            "dram_de_mp", "dram_ace";
+               };
+
+               ve_clk: clk@01c2013c {
+                       #clock-cells = <0>;
+                       #reset-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-ve-clk";
+                       reg = <0x01c2013c 0x4>;
+                       clocks = <&pll4>;
+                       clock-output-names = "ve";
+               };
+
+               codec_clk: clk@01c20140 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-codec-clk";
+                       reg = <0x01c20140 0x4>;
+                       clocks = <&pll2 SUN4I_A10_PLL2_1X>;
+                       clock-output-names = "codec";
+               };
+
                mbus_clk: clk@01c2015c {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun5i-a13-mbus-clk";
                        status = "disabled";
                };
 
+               crypto: crypto-engine@01c15000 {
+                       compatible = "allwinner,sun4i-a10-crypto";
+                       reg = <0x01c15000 0x1000>;
+                       interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ahb_gates 5>, <&ss_clk>;
+                       clock-names = "ahb", "mod";
+               };
+
                spi2: spi@01c17000 {
                        compatible = "allwinner,sun4i-a10-spi";
                        reg = <0x01c17000 0x1000>;
                        status = "disabled";
                };
 
+               codec: codec@01c22c00 {
+                       #sound-dai-cells = <0>;
+                       compatible = "allwinner,sun7i-a20-codec";
+                       reg = <0x01c22c00 0x40>;
+                       interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&apb0_gates 0>, <&codec_clk>;
+                       clock-names = "apb", "codec";
+                       dmas = <&dma SUN4I_DMA_NORMAL 19>,
+                              <&dma SUN4I_DMA_NORMAL 19>;
+                       dma-names = "rx", "tx";
+                       status = "disabled";
+               };
+
                sid: eeprom@01c23800 {
                        compatible = "allwinner,sun7i-a20-sid";
                        reg = <0x01c23800 0x200>;
index 9c4a55c5510e51b1bf8a7fc9ef7a1ff0787cf7d8..7e05e09e61c7e49fa78a287220047e70f0b2fa99 100644 (file)
@@ -56,7 +56,7 @@
                #size-cells = <1>;
                ranges;
 
-               framebuffer@0 {
+               simplefb_lcd: framebuffer@0 {
                        compatible = "allwinner,simple-framebuffer",
                                     "simple-framebuffer";
                        allwinner,pipeline = "de_be0-lcd0";
                        clock-output-names = "apb1";
                };
 
-               ahb1_gates: clk@01c20060 {
-                       #clock-cells = <1>;
-                       compatible = "allwinner,sun8i-a23-ahb1-gates-clk";
-                       reg = <0x01c20060 0x8>;
-                       clocks = <&ahb1>;
-                       clock-output-names = "ahb1_mipidsi", "ahb1_dma",
-                                       "ahb1_mmc0", "ahb1_mmc1", "ahb1_mmc2",
-                                       "ahb1_nand", "ahb1_sdram",
-                                       "ahb1_hstimer", "ahb1_spi0",
-                                       "ahb1_spi1", "ahb1_otg", "ahb1_ehci",
-                                       "ahb1_ohci", "ahb1_ve", "ahb1_lcd",
-                                       "ahb1_csi", "ahb1_be",  "ahb1_fe",
-                                       "ahb1_gpu", "ahb1_spinlock",
-                                       "ahb1_drc";
-               };
-
                apb1_gates: clk@01c20068 {
                        #clock-cells = <1>;
                        compatible = "allwinner,sun8i-a23-apb1-gates-clk";
                        reg = <0x01c20068 0x4>;
                        clocks = <&apb1>;
+                       clock-indices = <0>, <5>,
+                                       <12>, <13>;
                        clock-output-names = "apb1_codec", "apb1_pio",
                                        "apb1_daudio0", "apb1_daudio1";
                };
                        compatible = "allwinner,sun8i-a23-apb2-gates-clk";
                        reg = <0x01c2006c 0x4>;
                        clocks = <&apb2>;
+                       clock-indices = <0>, <1>,
+                                       <2>, <16>,
+                                       <17>, <18>,
+                                       <19>, <20>;
                        clock-output-names = "apb2_i2c0", "apb2_i2c1",
                                        "apb2_i2c2", "apb2_uart0",
                                        "apb2_uart1", "apb2_uart2",
                                allwinner,pins = "PC5", "PC6", "PC8",
                                                 "PC9", "PC10", "PC11",
                                                 "PC12", "PC13", "PC14",
-                                                "PC15";
+                                                "PC15", "PC16";
                                allwinner,function = "mmc2";
                                allwinner,drive = <SUN4I_PINCTRL_30_MA>;
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
 
+                       pwm0_pins: pwm0 {
+                               allwinner,pins = "PH0";
+                               allwinner,function = "pwm0";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
                        i2c0_pins_a: i2c0@0 {
                                allwinner,pins = "PH2", "PH3";
                                allwinner,function = "i2c0";
                        interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
                };
 
+               pwm: pwm@01c21400 {
+                       compatible = "allwinner,sun7i-a20-pwm";
+                       reg = <0x01c21400 0xc>;
+                       clocks = <&osc24M>;
+                       #pwm-cells = <3>;
+                       status = "disabled";
+               };
+
                lradc: lradc@01c22800 {
                        compatible = "allwinner,sun4i-a10-lradc-keys";
                        reg = <0x01c22800 0x100>;
                                     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
                };
 
+               nmi_intc: interrupt-controller@01f00c0c {
+                       compatible = "allwinner,sun6i-a31-sc-nmi";
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       reg = <0x01f00c0c 0x38>;
+                       interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+               };
+
                prcm@01f01400 {
                        compatible = "allwinner,sun8i-a23-prcm";
                        reg = <0x01f01400 0x200>;
                        resets = <&apb0_rst 0>;
                        gpio-controller;
                        interrupt-controller;
+                       #interrupt-cells = <3>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        #gpio-cells = <3>;
 
+                       r_rsb_pins: r_rsb {
+                               allwinner,pins = "PL0", "PL1";
+                               allwinner,function = "s_rsb";
+                               allwinner,drive = <SUN4I_PINCTRL_20_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+                       };
+
                        r_uart_pins_a: r_uart@0 {
                                allwinner,pins = "PL2", "PL3";
                                allwinner,function = "s_uart";
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
                };
+
+               r_rsb: rsb@01f03400 {
+                       compatible = "allwinner,sun8i-a23-rsb";
+                       reg = <0x01f03400 0x400>;
+                       interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&apb0_gates 3>;
+                       clock-frequency = <3000000>;
+                       resets = <&apb0_rst 3>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&r_rsb_pins>;
+                       status = "disabled";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
        };
 };
index 1aeb06c649b9ce15a14e96dd32ecf810ce8d2fbd..b2ce284a65a23f3d3859dbd1a08993d6ab387c3d 100644 (file)
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
+#include <dt-bindings/pwm/pwm.h>
 
 / {
-       model = "Allwinner GT90H Quad Core Tablet (v4)";
-       compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a33";
+       model = "Allwinner GT90H Dual Core Tablet (v4)";
+       compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a23";
 
        aliases {
                serial0 = &r_uart;
        };
 
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pinctrl-names = "default";
+               pinctrl-0 = <&bl_en_pin_gt90h>;
+               pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+               brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+               default-brightness-level = <8>;
+               enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
+       };
+
        chosen {
                stdout-path = "serial0:115200n8";
        };
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_gt90h>;
-       /* FIXME this really is aldo1, correct once we've pmic support */
-       vmmc-supply = <&reg_vcc3v0>;
+       vmmc-supply = <&reg_aldo1>;
        bus-width = <4>;
        cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
        cd-inverted;
 };
 
 &pio {
+       bl_en_pin_gt90h: bl_en_pin@0 {
+               allwinner,pins = "PH6";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
        mmc0_cd_pin_gt90h: mmc0_cd_pin@0 {
                allwinner,pins = "PB4";
                allwinner,function = "gpio_in";
        };
 };
 
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_pins>;
+       status = "okay";
+};
+
+&r_rsb {
+       status = "okay";
+
+       axp22x: pmic@3a3 {
+               compatible = "x-powers,axp223";
+               reg = <0x3a3>;
+               interrupt-parent = <&nmi_intc>;
+               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+               eldoin-supply = <&reg_dcdc1>;
+       };
+};
+
 &r_uart {
        pinctrl-names = "default";
        pinctrl-0 = <&r_uart_pins_a>;
        status = "okay";
 };
 
+#include "axp22x.dtsi"
+
+&reg_aldo1 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "vcc-io";
+};
+
+&reg_aldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <2350000>;
+       regulator-max-microvolt = <2650000>;
+       regulator-name = "vdd-dll";
+};
+
+&reg_aldo3 {
+       regulator-always-on;
+       regulator-min-microvolt = <2700000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-pll-avcc";
+};
+
+&reg_dc1sw {
+       regulator-name = "vcc-lcd";
+};
+
+&reg_dc5ldo {
+       regulator-always-on;
+       regulator-min-microvolt = <900000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpus";
+};
+
+&reg_dcdc1 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "vcc-3v0";
+};
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <900000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-sys";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <900000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc5 {
+       regulator-always-on;
+       regulator-min-microvolt = <1500000>;
+       regulator-max-microvolt = <1500000>;
+       regulator-name = "vcc-dram";
+};
+
+&reg_dldo1 {
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-wifi";
+};
+
+&reg_rtc_ldo {
+       regulator-name = "vcc-rtc";
+};
+
+&simplefb_lcd {
+       vcc-lcd-supply = <&reg_dc1sw>;
+};
+
 /*
  * FIXME for now we only support host mode and rely on u-boot to have
  * turned on Vbus which is controlled by the axp223 pmic on the board.
 };
 
 &usbphy {
+       usb1_vbus-supply = <&reg_dldo1>;
        status = "okay";
 };
diff --git a/arch/arm/dts/sun8i-a23-polaroid-mid2809pxe04.dts b/arch/arm/dts/sun8i-a23-polaroid-mid2809pxe04.dts
new file mode 100644 (file)
index 0000000..cb5daaf
--- /dev/null
@@ -0,0 +1,243 @@
+/*
+ * Copyright 2016 Hans de Goede <hdegoede@redhat.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun8i-a23.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+#include <dt-bindings/pwm/pwm.h>
+
+/ {
+       model = "Polaroid MID2809PXE04 tablet";
+       compatible = "polaroid,mid2809pxe04", "allwinner,sun8i-a23";
+
+       aliases {
+               serial0 = &r_uart;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pinctrl-names = "default";
+               pinctrl-0 = <&bl_en_pin_mid2809>;
+               pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+               brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+               default-brightness-level = <8>;
+               enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins_a>;
+       status = "okay";
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       status = "okay";
+};
+
+&lradc {
+       vref-supply = <&reg_vcc3v0>;
+       status = "okay";
+
+       button@200 {
+               label = "Volume Up";
+               linux,code = <KEY_VOLUMEUP>;
+               channel = <0>;
+               voltage = <200000>;
+       };
+
+       button@400 {
+               label = "Volume Down";
+               linux,code = <KEY_VOLUMEDOWN>;
+               channel = <0>;
+               voltage = <400000>;
+       };
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_mid2809>;
+       vmmc-supply = <&reg_dcdc1>;
+       bus-width = <4>;
+       cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
+       cd-inverted;
+       status = "okay";
+};
+
+&pio {
+       bl_en_pin_mid2809: bl_en_pin@0 {
+               allwinner,pins = "PH6";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       mmc0_cd_pin_mid2809: mmc0_cd_pin@0 {
+               allwinner,pins = "PB4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+};
+
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_pins>;
+       status = "okay";
+};
+
+&r_rsb {
+       status = "okay";
+
+       axp22x: pmic@3a3 {
+               compatible = "x-powers,axp223";
+               reg = <0x3a3>;
+               interrupt-parent = <&nmi_intc>;
+               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+               eldoin-supply = <&reg_dcdc1>;
+       };
+};
+
+&r_uart {
+       pinctrl-names = "default";
+       pinctrl-0 = <&r_uart_pins_a>;
+       status = "okay";
+};
+
+#include "axp22x.dtsi"
+
+&reg_aldo1 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "vcc-io";
+};
+
+&reg_aldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <2350000>;
+       regulator-max-microvolt = <2650000>;
+       regulator-name = "vdd-dll";
+};
+
+&reg_aldo3 {
+       regulator-always-on;
+       regulator-min-microvolt = <2700000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-pll-avcc";
+};
+
+&reg_dc1sw {
+       regulator-name = "vcc-lcd";
+};
+
+&reg_dc5ldo {
+       regulator-always-on;
+       regulator-min-microvolt = <900000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpus";
+};
+
+&reg_dcdc1 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "vcc-3v0";
+};
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <900000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-sys";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <900000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc5 {
+       regulator-always-on;
+       regulator-min-microvolt = <1500000>;
+       regulator-max-microvolt = <1500000>;
+       regulator-name = "vcc-dram";
+};
+
+&reg_rtc_ldo {
+       regulator-name = "vcc-rtc";
+};
+
+&simplefb_lcd {
+       vcc-lcd-supply = <&reg_dc1sw>;
+};
+
+/*
+ * FIXME for now we only support host mode and rely on u-boot to have
+ * turned on Vbus which is controlled by the axp223 pmic on the board.
+ *
+ * Once we have axp223 support we should switch to fully supporting otg.
+ */
+&usb_otg {
+       dr_mode = "host";
+       status = "okay";
+};
+
+&usbphy {
+       status = "okay";
+};
index 2cc27c7a59dc389b7cf835fcaa9d7c23fd073291..92e6616979ea42868b3a6bcb77f76ed7ea8083bd 100644 (file)
        };
 
        clocks {
+               ahb1_gates: clk@01c20060 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun8i-a23-ahb1-gates-clk";
+                       reg = <0x01c20060 0x8>;
+                       clocks = <&ahb1>;
+                       clock-indices = <1>, <6>,
+                                       <8>, <9>, <10>,
+                                       <13>, <14>,
+                                       <19>, <20>,
+                                       <21>, <24>, <26>,
+                                       <29>, <32>, <36>,
+                                       <40>, <44>, <46>,
+                                       <52>, <53>,
+                                       <54>, <57>;
+                       clock-output-names = "ahb1_mipidsi", "ahb1_dma",
+                                       "ahb1_mmc0", "ahb1_mmc1", "ahb1_mmc2",
+                                       "ahb1_nand", "ahb1_sdram",
+                                       "ahb1_hstimer", "ahb1_spi0",
+                                       "ahb1_spi1", "ahb1_otg", "ahb1_ehci",
+                                       "ahb1_ohci", "ahb1_ve", "ahb1_lcd",
+                                       "ahb1_csi", "ahb1_be",  "ahb1_fe",
+                                       "ahb1_gpu", "ahb1_msgbox",
+                                       "ahb1_spinlock", "ahb1_drc";
+               };
+
                mbus_clk: clk@01c2015c {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun8i-a23-mbus-clk";
index 1d5390d4e03aadd44965918d43c0672c070de9f9..fef6abc0a7038001180f8f5bfa3d5afcfdbd3c10 100644 (file)
@@ -68,7 +68,7 @@
 };
 
 &lradc {
-       vref-supply = <&reg_vcc3v0>;
+       vref-supply = <&reg_dcdc1>;
        status = "okay";
 
        button@200 {
@@ -96,7 +96,7 @@
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina33>;
-       vmmc-supply = <&reg_vcc3v0>;
+       vmmc-supply = <&reg_dcdc1>;
        bus-width = <4>;
        cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
        cd-inverted;
 &mmc2 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc2_8bit_pins>;
-       vmmc-supply = <&reg_vcc3v0>;
+       vmmc-supply = <&reg_dcdc1>;
        bus-width = <8>;
        non-removable;
+       cap-mmc-hw-reset;
        status = "okay";
 };
 
 &mmc2_8bit_pins {
+       /* Increase drive strength for DDR modes */
+       allwinner,drive = <SUN4I_PINCTRL_40_MA>;
        /* eMMC is missing pull-ups */
        allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
 };
        };
 };
 
+&r_rsb {
+       status = "okay";
+
+       axp22x: pmic@3a3 {
+               compatible = "x-powers,axp223";
+               reg = <0x3a3>;
+               interrupt-parent = <&nmi_intc>;
+               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+               eldoin-supply = <&reg_dcdc1>;
+       };
+};
+
+#include "axp22x.dtsi"
+
+&reg_aldo1 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "vcc-io";
+};
+
+&reg_aldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <2350000>;
+       regulator-max-microvolt = <2650000>;
+       regulator-name = "vdd-dll";
+};
+
+&reg_aldo3 {
+       regulator-always-on;
+       regulator-min-microvolt = <2700000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-pll-avcc";
+};
+
+&reg_dc5ldo {
+       regulator-always-on;
+       regulator-min-microvolt = <900000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpus";
+};
+
+&reg_dcdc1 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "vcc-3v0";
+};
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <900000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-sys";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <900000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc5 {
+       regulator-always-on;
+       regulator-min-microvolt = <1500000>;
+       regulator-max-microvolt = <1500000>;
+       regulator-name = "vcc-dram";
+};
+
+&reg_rtc_ldo {
+       regulator-name = "vcc-rtc";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pins_b>;
index faa7d3c1fceacdc9eb80d396e23807bccb4d7aa1..001d8402ca1845bca126adab131d69d439ceab6a 100644 (file)
                        clock-output-names = "pll11";
                };
 
+               ahb1_gates: clk@01c20060 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun8i-a33-ahb1-gates-clk";
+                       reg = <0x01c20060 0x8>;
+                       clocks = <&ahb1>;
+                       clock-indices = <1>, <5>,
+                                       <6>, <8>, <9>,
+                                       <10>, <13>, <14>,
+                                       <19>, <20>,
+                                       <21>, <24>, <26>,
+                                       <29>, <32>, <36>,
+                                       <40>, <44>, <46>,
+                                       <52>, <53>,
+                                       <54>, <57>,
+                                       <58>;
+                       clock-output-names = "ahb1_mipidsi", "ahb1_ss",
+                                       "ahb1_dma","ahb1_mmc0", "ahb1_mmc1",
+                                       "ahb1_mmc2", "ahb1_nand", "ahb1_sdram",
+                                       "ahb1_hstimer", "ahb1_spi0",
+                                       "ahb1_spi1", "ahb1_otg", "ahb1_ehci",
+                                       "ahb1_ohci", "ahb1_ve", "ahb1_lcd",
+                                       "ahb1_csi", "ahb1_be",  "ahb1_fe",
+                                       "ahb1_gpu", "ahb1_msgbox",
+                                       "ahb1_spinlock", "ahb1_drc",
+                                       "ahb1_sat";
+               };
+
+               ss_clk: clk@01c2009c {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-mod0-clk";
+                       reg = <0x01c2009c 0x4>;
+                       clocks = <&osc24M>, <&pll6 0>;
+                       clock-output-names = "ss";
+               };
+
                mbus_clk: clk@01c2015c {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun8i-a23-mbus-clk";
        };
 
        soc@01c00000 {
+               crypto: crypto-engine@01c15000 {
+                       compatible = "allwinner,sun4i-a10-crypto";
+                       reg = <0x01c15000 0x1000>;
+                       interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ahb1_gates 5>, <&ss_clk>;
+                       clock-names = "ahb", "mod";
+                       resets = <&ahb1_rst 5>;
+                       reset-names = "ahb";
+               };
+
                usb_otg: usb@01c19000 {
                        compatible = "allwinner,sun8i-a33-musb";
                        reg = <0x01c19000 0x0400>;
diff --git a/arch/arm/dts/sun8i-a83t-cubietruck-plus.dts b/arch/arm/dts/sun8i-a83t-cubietruck-plus.dts
new file mode 100644 (file)
index 0000000..88b1e09
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2015 Chen-Yu Tsai
+ *
+ * Chen-Yu Tsai <wens@csie.org>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun8i-a83t.dtsi"
+
+/ {
+       model = "Cubietech Cubietruck Plus";
+       compatible = "cubietech,cubietruck-plus", "allwinner,sun8i-a83t";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_b>;
+       status = "okay";
+};
index 245b819d1025894de5df1de6bad005c2d4ae6515..d3473f81b12f7182c953fc02abd29b26f800cc5b 100644 (file)
 / {
        interrupt-parent = <&gic>;
 
-       chosen {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-       };
-
        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
@@ -85,6 +79,7 @@
                        device_type = "cpu";
                        reg = <3>;
                };
+
                cpu@100 {
                        compatible = "arm,cortex-a7";
                        device_type = "cpu";
@@ -96,6 +91,7 @@
                        device_type = "cpu";
                        reg = <0x101>;
                };
+
                cpu@102 {
                        compatible = "arm,cortex-a7";
                        device_type = "cpu";
                };
        };
 
-       memory {
-               reg = <0x40000000 0x80000000>;
-       };
-
        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)>;
-               clock-frequency = <24000000>;
-               arm,cpu-registers-not-fw-configured;
+               interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>;
        };
 
        clocks {
                #size-cells = <1>;
                ranges;
 
+               /* TODO: PRCM block has a mux for this. */
                osc24M: osc24M_clk {
                        #clock-cells = <0>;
                        compatible = "fixed-clock";
                        clock-output-names = "osc24M";
                };
 
-               osc32k: osc32k_clk {
+               /*
+                * This is called "internal OSC" in some places.
+                * It is an internal RC-based oscillator.
+                * TODO: Its controls are in the PRCM block.
+                */
+               osc16M: osc16M_clk {
                        #clock-cells = <0>;
                        compatible = "fixed-clock";
-                       clock-frequency = <32768>;
-                       clock-output-names = "osc32k";
+                       clock-frequency = <16000000>;
+                       clock-output-names = "osc16M";
+               };
+
+               osc16Md512: osc16Md512_clk {
+                       #clock-cells = <0>;
+                       compatible = "fixed-factor-clock";
+                       clock-div = <512>;
+                       clock-mult = <1>;
+                       clocks = <&osc16M>;
+                       clock-output-names = "osc16M-d512";
                };
        };
 
-       soc@01c00000 {
+       soc {
                compatible = "simple-bus";
                #address-cells = <1>;
                #size-cells = <1>;
                ranges;
 
-               gic: interrupt-controller@01c81000 {
-                       compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
-                       reg = <0x01c81000 0x1000>,
-                             <0x01c82000 0x1000>,
-                             <0x01c84000 0x2000>,
-                             <0x01c86000 0x2000>;
-                       interrupt-controller;
-                       #interrupt-cells = <3>;
-                       interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
-               };
-
                pio: pinctrl@01c20800 {
                        compatible = "allwinner,sun8i-a83t-pinctrl";
                        interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
-                       <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
-                       <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+                                    <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
                        reg = <0x01c20800 0x400>;
                        clocks = <&osc24M>;
                        gpio-controller;
                        #interrupt-cells = <3>;
                        #gpio-cells = <3>;
 
-                       i2c0_pins_a: i2c0@0 {
-                               allwinner,pins = "PH0", "PH1";
-                               allwinner,function = "i2c0";
-                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-                       };
-
-                       i2c1_pins_a: i2c1@0 {
-                               allwinner,pins = "PH2", "PH3";
-                               allwinner,function = "i2c1";
-                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-                       };
-
-                       i2c2_pins_a: i2c2@0 {
-                               allwinner,pins = "PH4", "PH5";
-                               allwinner,function = "i2c2";
-                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-                       };
-
                        mmc0_pins_a: mmc0@0 {
                                allwinner,pins = "PF0", "PF1", "PF2",
                                                 "PF3", "PF4", "PF5";
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
 
-                       mmc1_pins_a: mmc1@0 {
-                               allwinner,pins = "PG0", "PG1", "PG2",
-                                                "PG3", "PG4", "PG5";
-                               allwinner,function = "mmc1";
-                               allwinner,drive = <SUN4I_PINCTRL_30_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-                       };
-
-                       mmc2_8bit_pins: mmc2_8bit {
-                               allwinner,pins = "PC5", "PC6", "PC8",
-                                                "PC9", "PC10", "PC11",
-                                                "PC12", "PC13", "PC14",
-                                                "PC15";
-                               allwinner,function = "mmc2";
-                               allwinner,drive = <SUN4I_PINCTRL_30_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-                       };
-
                        uart0_pins_a: uart0@0 {
                                allwinner,pins = "PF2", "PF4";
                                allwinner,function = "uart0";
                        };
                };
 
+               timer@01c20c00 {
+                       compatible = "allwinner,sun4i-a10-timer";
+                       reg = <0x01c20c00 0xa0>;
+                       interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&osc24M>;
+               };
+
+               watchdog@01c20ca0 {
+                       compatible = "allwinner,sun6i-a31-wdt";
+                       reg = <0x01c20ca0 0x20>;
+                       interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&osc24M>;
+               };
+
                uart0: serial@01c28000 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c28000 0x400>;
                        clocks = <&osc24M>;
                        status = "disabled";
                };
+
+               gic: interrupt-controller@01c81000 {
+                       compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
+                       reg = <0x01c81000 0x1000>,
+                             <0x01c82000 0x1000>,
+                             <0x01c84000 0x2000>,
+                             <0x01c86000 0x2000>;
+                       interrupt-controller;
+                       #interrupt-cells = <3>;
+                       interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
+               };
        };
 };
diff --git a/arch/arm/dts/sun8i-h3-orangepi-2.dts b/arch/arm/dts/sun8i-h3-orangepi-2.dts
new file mode 100644 (file)
index 0000000..f93f5d1
--- /dev/null
@@ -0,0 +1,186 @@
+/*
+ * Copyright (C) 2016 Hans de Goede <hdegoede@redhat.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun8i-h3.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+
+/ {
+       model = "Xunlong Orange Pi 2";
+       compatible = "xunlong,orangepi-2", "allwinner,sun8i-h3";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&leds_opc>, <&leds_r_opc>;
+
+               status_led {
+                       label = "orangepi:red:status";
+                       gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
+               };
+
+               pwr_led {
+                       label = "orangepi:green:pwr";
+                       gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+       };
+
+       r_gpio_keys {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+               pinctrl-0 = <&sw_r_opc>;
+
+               sw2 {
+                       label = "sw2";
+                       linux,code = <BTN_1>;
+                       gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>;
+               };
+
+               sw4 {
+                       label = "sw4";
+                       linux,code = <BTN_0>;
+                       gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       wifi_pwrseq: wifi_pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_pwrseq_pin_orangepi>;
+               reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 WIFI_EN */
+       };
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&ir {
+       pinctrl-names = "default";
+       pinctrl-0 = <&ir_pins_a>;
+       status = "okay";
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
+       cd-inverted;
+       status = "okay";
+};
+
+&mmc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins_a>;
+       vmmc-supply = <&reg_vcc3v3>;
+       mmc-pwrseq = <&wifi_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+};
+
+&pio {
+       leds_opc: led_pins@0 {
+               allwinner,pins = "PA15";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
+&r_pio {
+       leds_r_opc: led_pins@0 {
+               allwinner,pins = "PL10";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       sw_r_opc: key_pins@0 {
+               allwinner,pins = "PL3", "PL4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       wifi_pwrseq_pin_orangepi: wifi_pwrseq_pin@0 {
+               allwinner,pins = "PL7";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
+&reg_usb1_vbus {
+       gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
+};
+
+&usb1_vbus_pin_a {
+       allwinner,pins = "PG13";
+};
+
+&usbphy {
+       usb1_vbus-supply = <&reg_usb1_vbus>;
+       status = "okay";
+};
index 4b25dcc3fdd2078b358b8232fddb462bdca8265d..30ccca019dd23747256b2c90b305b7d667a27287 100644 (file)
@@ -45,6 +45,7 @@
 #include "sunxi-common-regulators.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
 / {
        chosen {
                stdout-path = "serial0:115200n8";
        };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&leds_opc>;
+
+               status_led {
+                       label = "status:red:user";
+                       gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
+               };
+       };
+
+       r_leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&leds_r_opc>;
+
+               tx {
+                       label = "pwr:green:user";
+                       gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+       };
+
+       r_gpio_keys {
+               compatible = "gpio-keys";
+               input-name = "sw4";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&sw_r_opc>;
+
+               sw4@0 {
+                       label = "sw4";
+                       linux,code = <BTN_0>;
+                       gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+               };
+       };
 };
 
 &ehci1 {
        status = "okay";
 };
 
+&ir {
+       pinctrl-names = "default";
+       pinctrl-0 = <&ir_pins_a>;
+       status = "okay";
+};
+
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
        status = "okay";
 };
 
+&pio {
+       leds_opc: led_pins@0 {
+               allwinner,pins = "PA15";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
+&r_pio {
+       leds_r_opc: led_pins@0 {
+               allwinner,pins = "PL10";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       sw_r_opc: key_pins@0 {
+               allwinner,pins = "PL03";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pins_a>;
index 1cb6c6653d83b05c5145ed6f041a4cf58f8ad627..900ec4fc8c818a660435a048e699007eb9529068 100644 (file)
@@ -45,6 +45,7 @@
 #include "sunxi-common-regulators.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
 / {
                enable-active-high;
                gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
        };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&leds_opc>;
+
+               status_led {
+                       label = "status:red:user";
+                       gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
+               };
+       };
+
+       r_leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&leds_r_opc>;
+
+               tx {
+                       label = "pwr:green:user";
+                       gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+       };
+
+       r_gpio_keys {
+               compatible = "gpio-keys";
+               input-name = "sw4";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&sw_r_opc>;
+
+               sw4@0 {
+                       label = "sw4";
+                       linux,code = <BTN_0>;
+                       gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+               };
+       };
+};
+
+&pio {
+       leds_opc: led_pins@0 {
+               allwinner,pins = "PA15";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
+&r_pio {
+       leds_r_opc: led_pins@0 {
+               allwinner,pins = "PL10";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       sw_r_opc: key_pins@0 {
+               allwinner,pins = "PL03";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
 };
 
 &ehci1 {
index 0faa38a8431ab400127be7b68df1ad89da0d232b..c2f63c50501cd0196b8ef14ae8a4e133f8ca877d 100644 (file)
                             <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)>;
-               clock-frequency = <24000000>;
-               arm,cpu-registers-not-fw-configured;
-       };
-
-       memory {
-               reg = <0x40000000 0x80000000>;
        };
 
        clocks {
                        compatible = "allwinner,sun6i-a31-pll6-clk";
                        reg = <0x01c20028 0x4>;
                        clocks = <&osc24M>;
-                       clock-output-names = "pll6", "pll6x2", "pll6d2";
+                       clock-output-names = "pll6", "pll6x2";
                };
 
-               pll8: clk@01c20044 {
-                       #clock-cells = <1>;
-                       compatible = "allwinner,sun6i-a31-pll6-clk";
-                       reg = <0x01c20044 0x4>;
-                       clocks = <&osc24M>;
-                       clock-output-names = "pll8", "pll8x2";
+               pll6d2: pll6d2_clk {
+                       #clock-cells = <0>;
+                       compatible = "fixed-factor-clock";
+                       clock-div = <2>;
+                       clock-mult = <1>;
+                       clocks = <&pll6 0>;
+                       clock-output-names = "pll6d2";
+               };
+
+               /* dummy clock until pll6 can be reused */
+               pll8: pll8_clk {
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-frequency = <1>;
+                       clock-output-names = "pll8";
                };
 
                cpu: cpu_clk@01c20050 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun8i-h3-ahb2-clk";
                        reg = <0x01c2005c 0x4>;
-                       clocks = <&ahb1>, <&pll6 2>;
+                       clocks = <&ahb1>, <&pll6d2>;
                        clock-output-names = "ahb2";
                };
 
                                        <76>, <77>, <78>,
                                        <96>, <97>, <98>,
                                        <112>, <113>,
-                                       <114>, <115>, <116>,
-                                       <128>, <135>;
-                       clock-output-names = "ahb1_ce", "ahb1_dma", "ahb1_mmc0",
-                                       "ahb1_mmc1", "ahb1_mmc2", "ahb1_nand",
-                                       "ahb1_sdram", "ahb2_gmac", "ahb1_ts",
-                                       "ahb1_hstimer", "ahb1_spi0",
-                                       "ahb1_spi1", "ahb1_otg",
-                                       "ahb1_otg_ehci0", "ahb1_ehic1",
-                                       "ahb1_ehic2", "ahb1_ehic3",
-                                       "ahb1_otg_ohci0", "ahb2_ohic1",
-                                       "ahb2_ohic2", "ahb2_ohic3", "ahb1_ve",
-                                       "ahb1_lcd0", "ahb1_lcd1", "ahb1_deint",
-                                       "ahb1_csi", "ahb1_tve", "ahb1_hdmi",
-                                       "ahb1_de", "ahb1_gpu", "ahb1_msgbox",
-                                       "ahb1_spinlock", "apb1_codec",
-                                       "apb1_spdif", "apb1_pio", "apb1_ths",
-                                       "apb1_i2s0", "apb1_i2s1", "apb1_i2s2",
-                                       "apb2_i2c0", "apb2_i2c1", "apb2_i2c2",
-                                       "apb2_uart0", "apb2_uart1",
-                                       "apb2_uart2", "apb2_uart3", "apb2_scr",
-                                       "ahb1_ephy", "ahb1_dbg";
+                                       <114>, <115>,
+                                       <116>, <128>, <135>;
+                       clock-output-names = "bus_ce", "bus_dma", "bus_mmc0",
+                                            "bus_mmc1", "bus_mmc2", "bus_nand",
+                                            "bus_sdram", "bus_gmac", "bus_ts",
+                                            "bus_hstimer", "bus_spi0",
+                                            "bus_spi1", "bus_otg",
+                                            "bus_otg_ehci0", "bus_ehci1",
+                                            "bus_ehci2", "bus_ehci3",
+                                            "bus_otg_ohci0", "bus_ohci1",
+                                            "bus_ohci2", "bus_ohci3", "bus_ve",
+                                            "bus_lcd0", "bus_lcd1", "bus_deint",
+                                            "bus_csi", "bus_tve", "bus_hdmi",
+                                            "bus_de", "bus_gpu", "bus_msgbox",
+                                            "bus_spinlock", "bus_codec",
+                                            "bus_spdif", "bus_pio", "bus_ths",
+                                            "bus_i2s0", "bus_i2s1", "bus_i2s2",
+                                            "bus_i2c0", "bus_i2c1", "bus_i2c2",
+                                            "bus_uart0", "bus_uart1",
+                                            "bus_uart2", "bus_uart3",
+                                            "bus_scr", "bus_ephy", "bus_dbg";
                };
 
                mmc0_clk: clk@01c20088 {
                        #clock-cells = <1>;
                        compatible = "allwinner,sun4i-a10-mmc-clk";
                        reg = <0x01c20088 0x4>;
-                       clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
+                       clocks = <&osc24M>, <&pll6 0>, <&pll8>;
                        clock-output-names = "mmc0",
                                             "mmc0_output",
                                             "mmc0_sample";
                        #clock-cells = <1>;
                        compatible = "allwinner,sun4i-a10-mmc-clk";
                        reg = <0x01c2008c 0x4>;
-                       clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
+                       clocks = <&osc24M>, <&pll6 0>, <&pll8>;
                        clock-output-names = "mmc1",
                                             "mmc1_output",
                                             "mmc1_sample";
                        #clock-cells = <1>;
                        compatible = "allwinner,sun4i-a10-mmc-clk";
                        reg = <0x01c20090 0x4>;
-                       clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
+                       clocks = <&osc24M>, <&pll6 0>, <&pll8>;
                        clock-output-names = "mmc2",
                                             "mmc2_output",
                                             "mmc2_sample";
                        clocks = <&osc24M>, <&pll6 1>, <&pll5>;
                        clock-output-names = "mbus";
                };
+
+               apb0: apb0_clk {
+                       compatible = "fixed-factor-clock";
+                       #clock-cells = <0>;
+                       clock-div = <1>;
+                       clock-mult = <1>;
+                       clocks = <&osc24M>;
+                       clock-output-names = "apb0";
+               };
+
+               apb0_gates: clk@01f01428 {
+                       compatible = "allwinner,sun8i-h3-apb0-gates-clk",
+                                    "allwinner,sun4i-a10-gates-clk";
+                       reg = <0x01f01428 0x4>;
+                       #clock-cells = <1>;
+                       clocks = <&apb0>;
+                       clock-indices = <0>, <1>;
+                       clock-output-names = "apb0_pio", "apb0_ir";
+               };
+
+               ir_clk: ir_clk@01f01454 {
+                       compatible = "allwinner,sun4i-a10-mod0-clk";
+                       reg = <0x01f01454 0x4>;
+                       #clock-cells = <0>;
+                       clocks = <&osc32k>, <&osc24M>;
+                       clock-output-names = "ir";
+               };
        };
 
        soc {
                        reg = <0x01c02000 0x1000>;
                        interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&bus_gates 6>;
-                       resets = <&bus_rst 6>;
+                       resets = <&ahb_rst 6>;
                        #dma-cells = <1>;
                };
 
                                      "mmc",
                                      "output",
                                      "sample";
-                       resets = <&bus_rst 8>;
+                       resets = <&ahb_rst 8>;
                        reset-names = "ahb";
                        interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                                      "mmc",
                                      "output",
                                      "sample";
-                       resets = <&bus_rst 9>;
+                       resets = <&ahb_rst 9>;
                        reset-names = "ahb";
                        interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                                      "mmc",
                                      "output",
                                      "sample";
-                       resets = <&bus_rst 10>;
+                       resets = <&ahb_rst 10>;
                        reset-names = "ahb";
                        interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                        reg = <0x01c1b000 0x100>;
                        interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&bus_gates 25>, <&bus_gates 29>;
-                       resets = <&bus_rst 25>, <&bus_rst 29>;
+                       resets = <&ahb_rst 25>, <&ahb_rst 29>;
                        phys = <&usbphy 1>;
                        phy-names = "usb";
                        status = "disabled";
                        interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&bus_gates 29>, <&bus_gates 25>,
                                 <&usb_clk 17>;
-                       resets = <&bus_rst 29>, <&bus_rst 25>;
+                       resets = <&ahb_rst 29>, <&ahb_rst 25>;
                        phys = <&usbphy 1>;
                        phy-names = "usb";
                        status = "disabled";
                        reg = <0x01c1c000 0x100>;
                        interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&bus_gates 26>, <&bus_gates 30>;
-                       resets = <&bus_rst 26>, <&bus_rst 30>;
+                       resets = <&ahb_rst 26>, <&ahb_rst 30>;
                        phys = <&usbphy 2>;
                        phy-names = "usb";
                        status = "disabled";
                        interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&bus_gates 30>, <&bus_gates 26>,
                                 <&usb_clk 18>;
-                       resets = <&bus_rst 30>, <&bus_rst 26>;
+                       resets = <&ahb_rst 30>, <&ahb_rst 26>;
                        phys = <&usbphy 2>;
                        phy-names = "usb";
                        status = "disabled";
                        reg = <0x01c1d000 0x100>;
                        interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&bus_gates 27>, <&bus_gates 31>;
-                       resets = <&bus_rst 27>, <&bus_rst 31>;
+                       resets = <&ahb_rst 27>, <&ahb_rst 31>;
                        phys = <&usbphy 3>;
                        phy-names = "usb";
                        status = "disabled";
                        interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&bus_gates 31>, <&bus_gates 27>,
                                 <&usb_clk 19>;
-                       resets = <&bus_rst 31>, <&bus_rst 27>;
+                       resets = <&ahb_rst 31>, <&ahb_rst 27>;
                        phys = <&usbphy 3>;
                        phy-names = "usb";
                        status = "disabled";
                        gpio-controller;
                        #gpio-cells = <3>;
                        interrupt-controller;
-                       #interrupt-cells = <2>;
+                       #interrupt-cells = <3>;
 
                        uart0_pins_a: uart0@0 {
                                allwinner,pins = "PA4", "PA5";
                        };
                };
 
-               bus_rst: reset@01c202c0 {
+               ahb_rst: reset@01c202c0 {
                        #reset-cells = <1>;
-                       compatible = "allwinner,sun8i-h3-bus-reset";
-                       reg = <0x01c202c0 0x1c>;
+                       compatible = "allwinner,sun6i-a31-ahb1-reset";
+                       reg = <0x01c202c0 0xc>;
+               };
+
+               apb1_rst: reset@01c202d0 {
+                       #reset-cells = <1>;
+                       compatible = "allwinner,sun6i-a31-clock-reset";
+                       reg = <0x01c202d0 0x4>;
+               };
+
+               apb2_rst: reset@01c202d8 {
+                       #reset-cells = <1>;
+                       compatible = "allwinner,sun6i-a31-clock-reset";
+                       reg = <0x01c202d8 0x4>;
                };
 
                timer@01c20c00 {
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&bus_gates 112>;
-                       resets = <&bus_rst 144>;
+                       resets = <&apb2_rst 16>;
                        dmas = <&dma 6>, <&dma 6>;
                        dma-names = "rx", "tx";
                        status = "disabled";
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&bus_gates 113>;
-                       resets = <&bus_rst 145>;
+                       resets = <&apb2_rst 17>;
                        dmas = <&dma 7>, <&dma 7>;
                        dma-names = "rx", "tx";
                        status = "disabled";
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&bus_gates 114>;
-                       resets = <&bus_rst 146>;
+                       resets = <&apb2_rst 18>;
                        dmas = <&dma 8>, <&dma 8>;
                        dma-names = "rx", "tx";
                        status = "disabled";
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&bus_gates 115>;
-                       resets = <&bus_rst 147>;
+                       resets = <&apb2_rst 19>;
                        dmas = <&dma 9>, <&dma 9>;
                        dma-names = "rx", "tx";
                        status = "disabled";
                        interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
                };
+
+               apb0_reset: reset@01f014b0 {
+                       reg = <0x01f014b0 0x4>;
+                       compatible = "allwinner,sun6i-a31-clock-reset";
+                       #reset-cells = <1>;
+               };
+
+               ir: ir@01f02000 {
+                       compatible = "allwinner,sun5i-a13-ir";
+                       clocks = <&apb0_gates 1>, <&ir_clk>;
+                       clock-names = "apb", "ir";
+                       resets = <&apb0_reset 1>;
+                       interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+                       reg = <0x01f02000 0x40>;
+                       status = "disabled";
+               };
+
+               r_pio: pinctrl@01f02c00 {
+                       compatible = "allwinner,sun8i-h3-r-pinctrl";
+                       reg = <0x01f02c00 0x400>;
+                       interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&apb0_gates 0>;
+                       resets = <&apb0_reset 0>;
+                       gpio-controller;
+                       #gpio-cells = <3>;
+                       interrupt-controller;
+                       #interrupt-cells = <3>;
+
+                       ir_pins_a: ir@0 {
+                               allwinner,pins = "PL11";
+                               allwinner,function = "s_cir_rx";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+               };
        };
 };
index 07cd268a4bf9a837f448f85f9cd426ac2c272097..346a49d805a7becd411cda921c7508edb35a3aa8 100644 (file)
  */
 #include "sunxi-q8-common.dtsi"
 
+#include <dt-bindings/pwm/pwm.h>
+
 / {
        aliases {
                serial0 = &r_uart;
        };
 
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pinctrl-names = "default";
+               pinctrl-0 = <&bl_en_pin_q8>;
+               pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+               brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+               default-brightness-level = <8>;
+               enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
+       };
+
        chosen {
                stdout-path = "serial0:115200n8";
        };
@@ -54,7 +66,7 @@
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>;
-       vmmc-supply = <&reg_vcc3v0>;
+       vmmc-supply = <&reg_dcdc1>;
        bus-width = <4>;
        cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
        cd-inverted;
        };
 };
 
+&r_rsb {
+       status = "okay";
+
+       axp22x: pmic@3a3 {
+               compatible = "x-powers,axp223";
+               reg = <0x3a3>;
+               interrupt-parent = <&nmi_intc>;
+               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+               eldoin-supply = <&reg_dcdc1>;
+       };
+};
+
+#include "axp22x.dtsi"
+
+&reg_aldo1 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "vcc-io";
+};
+
+&reg_aldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <2350000>;
+       regulator-max-microvolt = <2650000>;
+       regulator-name = "vdd-dll";
+};
+
+&reg_aldo3 {
+       regulator-always-on;
+       regulator-min-microvolt = <2700000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-pll-avcc";
+};
+
+&reg_dc1sw {
+       regulator-name = "vcc-lcd";
+};
+
+&reg_dc5ldo {
+       regulator-always-on;
+       regulator-min-microvolt = <900000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpus";
+};
+
+&reg_dcdc1 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "vcc-3v0";
+};
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <900000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-sys";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <900000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc5 {
+       regulator-always-on;
+       regulator-min-microvolt = <1500000>;
+       regulator-max-microvolt = <1500000>;
+       regulator-name = "vcc-dram";
+};
+
+&reg_rtc_ldo {
+       regulator-name = "vcc-rtc";
+};
+
 &r_uart {
        pinctrl-names = "default";
        pinctrl-0 = <&r_uart_pins_a>;
        status = "okay";
 };
+
+&simplefb_lcd {
+       vcc-lcd-supply = <&reg_dc1sw>;
+};
index 6484dcf6987300d3857cd642de8447d2aa4807d4..eb2ccd0a3bd5d4217f7a2a91a7383d87594ef074 100644 (file)
                stdout-path = "serial0:115200n8";
        };
 
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&led_pins_cubieboard4>;
+
+               green {
+                       label = "cubieboard4:green:usr";
+                       gpios = <&pio 7 17 GPIO_ACTIVE_HIGH>; /* PH17 */
+               };
+
+               red {
+                       label = "cubieboard4:red:usr";
+                       gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
+               };
+       };
 };
 
 &pio {
+       led_pins_cubieboard4: led-pins@0 {
+               allwinner,pins = "PH6", "PH17";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
        mmc0_cd_pin_cubieboard4: mmc0_cd_pin@0 {
                allwinner,pins = "PH18";
                allwinner,function = "gpio_in";
        vmmc-supply = <&reg_vcc3v0>;
        bus-width = <8>;
        non-removable;
+       cap-mmc-hw-reset;
+       status = "okay";
+};
+
+&mmc2_8bit_pins {
+       /* Increase drive strength for DDR modes */
+       allwinner,drive = <SUN4I_PINCTRL_40_MA>;
+};
+
+&r_ir {
+       status = "okay";
+};
+
+&r_rsb {
        status = "okay";
 };
 
index 6ce4b5e8b615a64eb1ade806b4db1a899a095b17..d7a20d92b1143b1a7713d998cec753a2dfada507 100644 (file)
@@ -65,7 +65,7 @@
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
-               pinctrl-0 = <&led_pins_optimus>;
+               pinctrl-0 = <&led_pins_optimus>, <&led_r_pins_optimus>;
 
                /* The LED names match those found on the board */
 
                        gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>;
                };
 
-               /* led3 is on PM15, in R_PIO */
+               led3 {
+                       label = "optimus:led3:usr";
+                       gpios = <&r_pio 1 15 GPIO_ACTIVE_HIGH>; /* PM15 */
+               };
 
                led4 {
                        label = "optimus:led4:usr";
        status = "okay";
 };
 
-&i2c3 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&i2c3_pins_a>;
-       status = "okay";
-};
-
-&i2c3_pins_a {
-       /* Enable internal pull-up */
-       allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-};
-
 &ohci0 {
        status = "okay";
 };
        vmmc-supply = <&reg_vcc3v0>;
        bus-width = <8>;
        non-removable;
+       cap-mmc-hw-reset;
        status = "okay";
 };
 
+&mmc2_8bit_pins {
+       /* Increase drive strength for DDR modes */
+       allwinner,drive = <SUN4I_PINCTRL_40_MA>;
+};
+
 &reg_usb1_vbus {
        pinctrl-0 = <&usb1_vbus_pin_optimus>;
        gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
        status = "okay";
 };
 
-&uart0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pins_a>;
+&r_ir {
        status = "okay";
 };
 
-&uart4 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&uart4_pins_a>;
+&r_pio {
+       led_r_pins_optimus: led-pins@1 {
+               allwinner,pins = "PM15";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
+&r_rsb {
        status = "okay";
 };
 
-&uart4_pins_a {
-       /* Enable internal pull-up */
-       allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
 };
 
 &usbphy1 {
index a43ad779ee2f68546a26da570f19ba601c2dc15b..f68b3242b33a09b0ff0c197c817b75525c9d9bb9 100644 (file)
                 */
                ranges = <0 0 0 0x20000000>;
 
+               /*
+                * This clock is actually configurable from the PRCM address
+                * space. The external 24M oscillator can be turned off, and
+                * the clock switched to an internal 16M RC oscillator. Under
+                * normal operation there's no reason to do this, and the
+                * default is to use the external good one, so just model this
+                * as a fixed clock. Also it is not entirely clear if the
+                * osc24M mux in the PRCM affects the entire clock tree, which
+                * would also throw all the PLL clock rates off, or just the
+                * downstream clocks in the PRCM.
+                */
                osc24M: osc24M_clk {
                        #clock-cells = <0>;
                        compatible = "fixed-clock";
                        clock-output-names = "osc24M";
                };
 
+               /*
+                * The 32k clock is from an external source, normally the
+                * AC100 codec/RTC chip. This clock is by default enabled
+                * and clocked at 32768 Hz, from the oscillator connected
+                * to the AC100. It is configurable, but no such driver or
+                * bindings exist yet.
+                */
                osc32k: osc32k_clk {
                        #clock-cells = <0>;
                        compatible = "fixed-clock";
                                             "usb_phy2", "usb_hsic_12M";
                };
 
+               pll3: clk@06000008 {
+                       /* placeholder until implemented */
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-rate = <0>;
+                       clock-output-names = "pll3";
+               };
+
                pll4: clk@0600000c {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun9i-a80-pll4-clk";
                        compatible = "allwinner,sun9i-a80-ahb0-gates-clk";
                        reg = <0x06000580 0x4>;
                        clocks = <&ahb0>;
-                       clock-indices = <0>, <1>, <3>, <5>, <8>, <12>, <13>,
-                                       <14>, <15>, <16>, <18>, <20>, <21>,
-                                       <22>, <23>;
+                       clock-indices = <0>, <1>, <3>,
+                                       <5>, <8>, <12>,
+                                       <13>, <14>,
+                                       <15>, <16>, <18>,
+                                       <20>, <21>, <22>,
+                                       <23>;
                        clock-output-names = "ahb0_fd", "ahb0_ve", "ahb0_gpu",
                                        "ahb0_ss", "ahb0_sd", "ahb0_nand1",
                                        "ahb0_nand0", "ahb0_sdram",
                        compatible = "allwinner,sun9i-a80-ahb1-gates-clk";
                        reg = <0x06000584 0x4>;
                        clocks = <&ahb1>;
-                       clock-indices = <0>, <1>, <17>, <21>, <22>, <23>, <24>;
+                       clock-indices = <0>, <1>,
+                                       <17>, <21>,
+                                       <22>, <23>,
+                                       <24>;
                        clock-output-names = "ahb1_usbotg", "ahb1_usbhci",
                                        "ahb1_gmac", "ahb1_msgbox",
                                        "ahb1_spinlock", "ahb1_hstimer",
                        compatible = "allwinner,sun9i-a80-ahb2-gates-clk";
                        reg = <0x06000588 0x4>;
                        clocks = <&ahb2>;
-                       clock-indices = <0>, <1>, <2>, <4>, <5>, <7>, <8>,
-                                       <11>;
+                       clock-indices = <0>, <1>,
+                                       <2>, <4>, <5>,
+                                       <7>, <8>, <11>;
                        clock-output-names = "ahb2_lcd0", "ahb2_lcd1",
                                        "ahb2_edp", "ahb2_csi", "ahb2_hdmi",
                                        "ahb2_de", "ahb2_mp", "ahb2_mipi_dsi";
                        compatible = "allwinner,sun9i-a80-apb0-gates-clk";
                        reg = <0x06000590 0x4>;
                        clocks = <&apb0>;
-                       clock-indices = <1>, <5>, <11>, <12>, <13>, <15>,
-                                       <17>, <18>, <19>;
+                       clock-indices = <1>, <5>,
+                                       <11>, <12>, <13>,
+                                       <15>, <17>, <18>,
+                                       <19>;
                        clock-output-names = "apb0_spdif", "apb0_pio",
                                        "apb0_ac97", "apb0_i2s0", "apb0_i2s1",
                                        "apb0_lradc", "apb0_gpadc", "apb0_twd",
                        compatible = "allwinner,sun9i-a80-apb1-gates-clk";
                        reg = <0x06000594 0x4>;
                        clocks = <&apb1>;
-                       clock-indices = <0>, <1>, <2>, <3>, <4>,
-                                       <16>, <17>, <18>, <19>, <20>, <21>;
+                       clock-indices = <0>, <1>,
+                                       <2>, <3>, <4>,
+                                       <16>, <17>,
+                                       <18>, <19>,
+                                       <20>, <21>;
                        clock-output-names = "apb1_i2c0", "apb1_i2c1",
                                        "apb1_i2c2", "apb1_i2c3", "apb1_i2c4",
                                        "apb1_uart0", "apb1_uart1",
                                        "apb1_uart2", "apb1_uart3",
                                        "apb1_uart4", "apb1_uart5";
                };
+
+               cpus_clk: clk@08001410 {
+                       compatible = "allwinner,sun9i-a80-cpus-clk";
+                       reg = <0x08001410 0x4>;
+                       #clock-cells = <0>;
+                       clocks = <&osc32k>, <&osc24M>, <&pll4>, <&pll3>;
+                       clock-output-names = "cpus";
+               };
+
+               ahbs: ahbs_clk {
+                       compatible = "fixed-factor-clock";
+                       #clock-cells = <0>;
+                       clock-div = <1>;
+                       clock-mult = <1>;
+                       clocks = <&cpus_clk>;
+                       clock-output-names = "ahbs";
+               };
+
+               apbs: clk@0800141c {
+                       compatible = "allwinner,sun8i-a23-apb0-clk";
+                       reg = <0x0800141c 0x4>;
+                       #clock-cells = <0>;
+                       clocks = <&ahbs>;
+                       clock-output-names = "apbs";
+               };
+
+               apbs_gates: clk@08001428 {
+                       compatible = "allwinner,sun9i-a80-apbs-gates-clk";
+                       reg = <0x08001428 0x4>;
+                       #clock-cells = <1>;
+                       clocks = <&apbs>;
+                       clock-indices = <0>, <1>,
+                                       <2>, <3>,
+                                       <4>, <5>,
+                                       <6>, <7>,
+                                       <12>, <13>,
+                                       <16>, <17>,
+                                       <18>, <20>;
+                       clock-output-names = "apbs_pio", "apbs_ir",
+                                       "apbs_timer", "apbs_rsb",
+                                       "apbs_uart", "apbs_1wire",
+                                       "apbs_i2c0", "apbs_i2c1",
+                                       "apbs_ps2_0", "apbs_ps2_1",
+                                       "apbs_dma", "apbs_i2s0",
+                                       "apbs_i2s1", "apbs_twd";
+               };
+
+               r_1wire_clk: clk@08001450 {
+                       reg = <0x08001450 0x4>;
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-mod0-clk";
+                       clocks = <&osc32k>, <&osc24M>;
+                       clock-output-names = "r_1wire";
+               };
+
+               r_ir_clk: clk@08001454 {
+                       reg = <0x08001454 0x4>;
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-mod0-clk";
+                       clocks = <&osc32k>, <&osc24M>;
+                       clock-output-names = "r_ir";
+               };
        };
 
        soc {
                };
 
                mmc0: mmc@01c0f000 {
-                       compatible = "allwinner,sun5i-a13-mmc";
+                       compatible = "allwinner,sun9i-a80-mmc";
                        reg = <0x01c0f000 0x1000>;
                        clocks = <&mmc_config_clk 0>, <&mmc0_clk 0>,
                                 <&mmc0_clk 1>, <&mmc0_clk 2>;
                };
 
                mmc1: mmc@01c10000 {
-                       compatible = "allwinner,sun5i-a13-mmc";
+                       compatible = "allwinner,sun9i-a80-mmc";
                        reg = <0x01c10000 0x1000>;
                        clocks = <&mmc_config_clk 1>, <&mmc1_clk 0>,
                                 <&mmc1_clk 1>, <&mmc1_clk 2>;
                };
 
                mmc2: mmc@01c11000 {
-                       compatible = "allwinner,sun5i-a13-mmc";
+                       compatible = "allwinner,sun9i-a80-mmc";
                        reg = <0x01c11000 0x1000>;
                        clocks = <&mmc_config_clk 2>, <&mmc2_clk 0>,
                                 <&mmc2_clk 1>, <&mmc2_clk 2>;
                };
 
                mmc3: mmc@01c12000 {
-                       compatible = "allwinner,sun5i-a13-mmc";
+                       compatible = "allwinner,sun9i-a80-mmc";
                        reg = <0x01c12000 0x1000>;
                        clocks = <&mmc_config_clk 3>, <&mmc3_clk 0>,
                                 <&mmc3_clk 1>, <&mmc3_clk 2>;
                        clocks = <&apb0_gates 5>;
                        gpio-controller;
                        interrupt-controller;
-                       #interrupt-cells = <2>;
+                       #interrupt-cells = <3>;
                        #size-cells = <0>;
                        #gpio-cells = <3>;
 
                        mmc2_8bit_pins: mmc2_8bit {
                                allwinner,pins = "PC6", "PC7", "PC8", "PC9",
                                                 "PC10", "PC11", "PC12",
-                                                "PC13", "PC14", "PC15";
+                                                "PC13", "PC14", "PC15",
+                                                "PC16";
                                allwinner,function = "mmc2";
                                allwinner,drive = <SUN4I_PINCTRL_30_MA>;
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
                };
 
+               apbs_rst: reset@080014b0 {
+                       reg = <0x080014b0 0x4>;
+                       compatible = "allwinner,sun6i-a31-clock-reset";
+                       #reset-cells = <1>;
+               };
+
+               nmi_intc: interrupt-controller@080015a0 {
+                       compatible = "allwinner,sun9i-a80-nmi";
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       reg = <0x080015a0 0xc>;
+                       interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+               };
+
+               r_ir: ir@08002000 {
+                       compatible = "allwinner,sun5i-a13-ir";
+                       interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&r_ir_pins>;
+                       clocks = <&apbs_gates 1>, <&r_ir_clk>;
+                       clock-names = "apb", "ir";
+                       resets = <&apbs_rst 1>;
+                       reg = <0x08002000 0x40>;
+                       status = "disabled";
+               };
+
                r_uart: serial@08002800 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x08002800 0x400>;
                        interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
-                       clocks = <&osc24M>;
+                       clocks = <&apbs_gates 4>;
+                       resets = <&apbs_rst 4>;
                        status = "disabled";
                };
+
+               r_pio: pinctrl@08002c00 {
+                       compatible = "allwinner,sun9i-a80-r-pinctrl";
+                       reg = <0x08002c00 0x400>;
+                       interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&apbs_gates 0>;
+                       resets = <&apbs_rst 0>;
+                       gpio-controller;
+                       interrupt-controller;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       #gpio-cells = <3>;
+
+                       r_ir_pins: r_ir {
+                               allwinner,pins = "PL6";
+                               allwinner,function = "s_cir_rx";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
+                       r_rsb_pins: r_rsb {
+                               allwinner,pins = "PN0", "PN1";
+                               allwinner,function = "s_rsb";
+                               allwinner,drive = <SUN4I_PINCTRL_20_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+                       };
+               };
+
+               r_rsb: i2c@08003400 {
+                       compatible = "allwinner,sun8i-a23-rsb";
+                       reg = <0x08003400 0x400>;
+                       interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&apbs_gates 3>;
+                       clock-frequency = <3000000>;
+                       resets = <&apbs_rst 3>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&r_rsb_pins>;
+                       status = "disabled";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
        };
 };
diff --git a/arch/arm/dts/sunxi-itead-core-common.dtsi b/arch/arm/dts/sunxi-itead-core-common.dtsi
new file mode 100644 (file)
index 0000000..2565d51
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "sunxi-common-regulators.dtsi"
+
+/ {
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins_a>;
+       status = "okay";
+
+       axp209: pmic@34 {
+               reg = <0x34>;
+       };
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       status = "okay";
+};
+
+&ohci0 {
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+#include "axp209.dtsi"
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
+};
+
+&reg_usb1_vbus {
+       status = "okay";
+};
+
+&reg_usb2_vbus {
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
+};
+
+&usbphy {
+       usb1_vbus-supply = <&reg_usb1_vbus>;
+       usb2_vbus-supply = <&reg_usb2_vbus>;
+       status = "okay";
+};
index 17b26ffd03aa9bb17da1a031b6aa7cbb9c965c6b..b8241462fcea56bc5b16955cc4418442b0d70a08 100644 (file)
@@ -75,3 +75,9 @@
                voltage = <400000>;
        };
 };
+
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_pins>;
+       status = "okay";
+};
diff --git a/arch/arm/dts/uniphier-ph1-ld11-ref.dts b/arch/arm/dts/uniphier-ph1-ld11-ref.dts
new file mode 100644 (file)
index 0000000..a624a49
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Device Tree Source for UniPhier PH1-LD11 Reference Board
+ *
+ * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+        X11
+ */
+
+/dts-v1/;
+/include/ "uniphier-ph1-ld11.dtsi"
+/include/ "uniphier-support-card.dtsi"
+
+/ {
+       model = "UniPhier PH1-LD11 Reference Board";
+       compatible = "socionext,ph1-ld11-ref", "socionext,ph1-ld11";
+
+       memory {
+               device_type = "memory";
+               reg = <0 0x80000000 0 0x40000000>;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       aliases {
+               serial0 = &serial0;
+               serial1 = &serial1;
+               serial2 = &serial2;
+               serial3 = &serial3;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c4;
+               i2c5 = &i2c5;
+       };
+};
+
+&ethsc {
+       interrupts = <0 48 4>;
+};
+
+&serial0 {
+       status = "okay";
+};
+
+&i2c0 {
+       status = "okay";
+};
+
+/* for U-Boot only */
+/ {
+       soc {
+               u-boot,dm-pre-reloc;
+       };
+};
+
+&serial0 {
+       u-boot,dm-pre-reloc;
+};
+
+&pinctrl {
+       u-boot,dm-pre-reloc;
+};
+
+&pinctrl_uart0 {
+       u-boot,dm-pre-reloc;
+};
diff --git a/arch/arm/dts/uniphier-ph1-ld11.dtsi b/arch/arm/dts/uniphier-ph1-ld11.dtsi
new file mode 100644 (file)
index 0000000..069cdf2
--- /dev/null
@@ -0,0 +1,205 @@
+/*
+ * Device Tree Source for UniPhier PH1-LD11 SoC
+ *
+ * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+        X11
+ */
+
+/ {
+       compatible = "socionext,ph1-ld11";
+       #address-cells = <2>;
+       #size-cells = <2>;
+       interrupt-parent = <&gic>;
+
+       cpus {
+               #address-cells = <2>;
+               #size-cells = <0>;
+
+               cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       reg = <0 0x000>;
+                       enable-method = "spin-table";
+                       cpu-release-addr = <0 0x80000100>;
+               };
+
+               cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       reg = <0 0x001>;
+                       enable-method = "spin-table";
+                       cpu-release-addr = <0 0x80000100>;
+               };
+       };
+
+       clocks {
+               uart_clk: uart_clk {
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-frequency = <58820000>;
+               };
+
+               i2c_clk: i2c_clk {
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-frequency = <50000000>;
+               };
+       };
+
+       timer {
+               compatible = "arm,armv8-timer";
+               interrupts = <1 13 0xf01>,
+                            <1 14 0xf01>,
+                            <1 11 0xf01>,
+                            <1 10 0xf01>;
+       };
+
+       soc {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0 0 0 0xffffffff>;
+
+               serial0: serial@54006800 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006800 0x40>;
+                       interrupts = <0 33 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart0>;
+                       clocks = <&uart_clk>;
+               };
+
+               serial1: serial@54006900 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006900 0x40>;
+                       interrupts = <0 35 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart1>;
+                       clocks = <&uart_clk>;
+               };
+
+               serial2: serial@54006a00 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006a00 0x40>;
+                       interrupts = <0 37 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart2>;
+                       clocks = <&uart_clk>;
+               };
+
+               serial3: serial@54006b00 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006b00 0x40>;
+                       interrupts = <0 177 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart3>;
+                       clocks = <&uart_clk>;
+               };
+
+               i2c0: i2c@58780000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58780000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 41 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c0>;
+                       clocks = <&i2c_clk>;
+                       clock-frequency = <100000>;
+               };
+
+               i2c1: i2c@58781000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58781000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 42 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c1>;
+                       clocks = <&i2c_clk>;
+                       clock-frequency = <100000>;
+               };
+
+               i2c2: i2c@58782000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       reg = <0x58782000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 43 4>;
+                       clocks = <&i2c_clk>;
+                       clock-frequency = <400000>;
+               };
+
+               i2c3: i2c@58783000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58783000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 44 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c3>;
+                       clocks = <&i2c_clk>;
+                       clock-frequency = <100000>;
+               };
+
+               i2c4: i2c@58784000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58784000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 45 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c4>;
+                       clocks = <&i2c_clk>;
+                       clock-frequency = <100000>;
+               };
+
+               i2c5: i2c@58785000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       reg = <0x58785000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 25 4>;
+                       clocks = <&i2c_clk>;
+                       clock-frequency = <400000>;
+               };
+
+               system_bus: system-bus@58c00000 {
+                       compatible = "socionext,uniphier-system-bus";
+                       status = "disabled";
+                       reg = <0x58c00000 0x400>;
+                       #address-cells = <2>;
+                       #size-cells = <1>;
+               };
+
+               smpctrl@59800000 {
+                       compatible = "socionext,uniphier-smpctrl";
+                       reg = <0x59801000 0x400>;
+               };
+
+               pinctrl: pinctrl@5f801000 {
+                       compatible = "socionext,ph1-ld11-pinctrl", "syscon";
+                       reg = <0x5f801000 0xe00>;
+               };
+
+               gic: interrupt-controller@5fe00000 {
+                       compatible = "arm,gic-v3";
+                       reg = <0x5fe00000 0x10000>,     /* GICD */
+                             <0x5fe40000 0x80000>;     /* GICR */
+                       interrupt-controller;
+                       #interrupt-cells = <3>;
+                       interrupts = <1 9 4>;
+               };
+       };
+};
+
+/include/ "uniphier-pinctrl.dtsi"
diff --git a/arch/arm/dts/uniphier-ph1-ld20-ref.dts b/arch/arm/dts/uniphier-ph1-ld20-ref.dts
new file mode 100644 (file)
index 0000000..108adeb
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Device Tree Source for UniPhier PH1-LD20 Reference Board
+ *
+ * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+        X11
+ */
+
+/dts-v1/;
+/include/ "uniphier-ph1-ld20.dtsi"
+/include/ "uniphier-support-card.dtsi"
+
+/ {
+       model = "UniPhier PH1-LD20 Reference Board";
+       compatible = "socionext,ph1-ld20-ref", "socionext,ph1-ld20";
+
+       memory {
+               device_type = "memory";
+               reg = <0 0x80000000 0 0xc0000000>;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       aliases {
+               serial0 = &serial0;
+               serial1 = &serial1;
+               serial2 = &serial2;
+               serial3 = &serial3;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c4;
+               i2c5 = &i2c5;
+       };
+};
+
+&ethsc {
+       interrupts = <0 48 4>;
+};
+
+&serial0 {
+       status = "okay";
+};
+
+&i2c0 {
+       status = "okay";
+};
+
+/* for U-Boot only */
+/ {
+       soc {
+               u-boot,dm-pre-reloc;
+       };
+};
+
+&serial0 {
+       u-boot,dm-pre-reloc;
+};
+
+&pinctrl {
+       u-boot,dm-pre-reloc;
+};
+
+&pinctrl_uart0 {
+       u-boot,dm-pre-reloc;
+};
diff --git a/arch/arm/dts/uniphier-ph1-ld20.dtsi b/arch/arm/dts/uniphier-ph1-ld20.dtsi
new file mode 100644 (file)
index 0000000..1bb45be
--- /dev/null
@@ -0,0 +1,241 @@
+/*
+ * Device Tree Source for UniPhier PH1-LD20 SoC
+ *
+ * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+        X11
+ */
+
+/ {
+       compatible = "socionext,ph1-ld20";
+       #address-cells = <2>;
+       #size-cells = <2>;
+       interrupt-parent = <&gic>;
+
+       cpus {
+               #address-cells = <2>;
+               #size-cells = <0>;
+
+               cpu-map {
+                       cluster0 {
+                               core0 {
+                                       cpu = <&cpu0>;
+                               };
+                               core1 {
+                                       cpu = <&cpu1>;
+                               };
+                       };
+
+                       cluster1 {
+                               core0 {
+                                       cpu = <&cpu2>;
+                               };
+                               core1 {
+                                       cpu = <&cpu3>;
+                               };
+                       };
+               };
+
+               cpu0: cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a72", "arm,armv8";
+                       reg = <0 0x000>;
+                       enable-method = "spin-table";
+                       cpu-release-addr = <0 0x80000100>;
+               };
+
+               cpu1: cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a72", "arm,armv8";
+                       reg = <0 0x001>;
+                       enable-method = "spin-table";
+                       cpu-release-addr = <0 0x80000100>;
+               };
+
+               cpu2: cpu@100 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       reg = <0 0x100>;
+                       enable-method = "spin-table";
+                       cpu-release-addr = <0 0x80000100>;
+               };
+
+               cpu3: cpu@101 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       reg = <0 0x101>;
+                       enable-method = "spin-table";
+                       cpu-release-addr = <0 0x80000100>;
+               };
+       };
+
+       clocks {
+               uart_clk: uart_clk {
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-frequency = <58820000>;
+               };
+
+               i2c_clk: i2c_clk {
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-frequency = <50000000>;
+               };
+       };
+
+       timer {
+               compatible = "arm,armv8-timer";
+               interrupts = <1 13 0xf01>,
+                            <1 14 0xf01>,
+                            <1 11 0xf01>,
+                            <1 10 0xf01>;
+       };
+
+       soc {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0 0 0 0xffffffff>;
+
+               serial0: serial@54006800 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006800 0x40>;
+                       interrupts = <0 33 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart0>;
+                       clocks = <&uart_clk>;
+               };
+
+               serial1: serial@54006900 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006900 0x40>;
+                       interrupts = <0 35 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart1>;
+                       clocks = <&uart_clk>;
+               };
+
+               serial2: serial@54006a00 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006a00 0x40>;
+                       interrupts = <0 37 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart2>;
+                       clocks = <&uart_clk>;
+               };
+
+               serial3: serial@54006b00 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006b00 0x40>;
+                       interrupts = <0 177 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart3>;
+                       clocks = <&uart_clk>;
+               };
+
+               i2c0: i2c@58780000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58780000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 41 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c0>;
+                       clocks = <&i2c_clk>;
+                       clock-frequency = <100000>;
+               };
+
+               i2c1: i2c@58781000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58781000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 42 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c1>;
+                       clocks = <&i2c_clk>;
+                       clock-frequency = <100000>;
+               };
+
+               i2c2: i2c@58782000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       reg = <0x58782000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 43 4>;
+                       clocks = <&i2c_clk>;
+                       clock-frequency = <400000>;
+               };
+
+               i2c3: i2c@58783000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58783000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 44 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c3>;
+                       clocks = <&i2c_clk>;
+                       clock-frequency = <100000>;
+               };
+
+               i2c4: i2c@58784000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       status = "disabled";
+                       reg = <0x58784000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 45 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_i2c4>;
+                       clocks = <&i2c_clk>;
+                       clock-frequency = <100000>;
+               };
+
+               i2c5: i2c@58785000 {
+                       compatible = "socionext,uniphier-fi2c";
+                       reg = <0x58785000 0x80>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <0 25 4>;
+                       clocks = <&i2c_clk>;
+                       clock-frequency = <400000>;
+               };
+
+               system_bus: system-bus@58c00000 {
+                       compatible = "socionext,uniphier-system-bus";
+                       status = "disabled";
+                       reg = <0x58c00000 0x400>;
+                       #address-cells = <2>;
+                       #size-cells = <1>;
+               };
+
+               smpctrl@59800000 {
+                       compatible = "socionext,uniphier-smpctrl";
+                       reg = <0x59801000 0x400>;
+               };
+
+               pinctrl: pinctrl@5f801000 {
+                       compatible = "socionext,ph1-ld20-pinctrl", "syscon";
+                       reg = <0x5f801000 0xe00>;
+               };
+
+               gic: interrupt-controller@5fe00000 {
+                       compatible = "arm,gic-v3";
+                       reg = <0x5fe00000 0x10000>,     /* GICD */
+                             <0x5fe80000 0x80000>;     /* GICR */
+                       interrupt-controller;
+                       #interrupt-cells = <3>;
+                       interrupts = <1 9 4>;
+               };
+       };
+};
+
+/include/ "uniphier-pinctrl.dtsi"
index d7b000796e1e6d7c5d8d0ffbb1f9b4a70be9806b..6cae452d7da010d443bf36c1e83e1c94014b960a 100644 (file)
@@ -9,6 +9,7 @@
 /dts-v1/;
 /include/ "uniphier-ph1-ld4.dtsi"
 /include/ "uniphier-ref-daughter.dtsi"
+/include/ "uniphier-support-card.dtsi"
 
 / {
        model = "UniPhier PH1-LD4 Reference Board";
        };
 };
 
+&ethsc {
+       interrupts = <0 49 4>;
+};
+
 &serial0 {
        status = "okay";
 };
index 13a29fdfaa1a1531f1024296cdc8df7ab3c12a51..e2a2a8c5ce18785c8d7e08ccccac44c8c69f8377 100644 (file)
@@ -9,6 +9,7 @@
 /dts-v1/;
 /include/ "uniphier-ph1-ld6b.dtsi"
 /include/ "uniphier-ref-daughter.dtsi"
+/include/ "uniphier-support-card.dtsi"
 
 / {
        model = "UniPhier PH1-LD6b Reference Board";
        };
 };
 
+&ethsc {
+       interrupts = <0 52 4>;
+};
+
 &serial0 {
        status = "okay";
 };
index 07a9783357f5649dcca43502354e1a4d61d9487d..5be76e2d66e84025548736aa4fce314b6ae17d0a 100644 (file)
@@ -9,6 +9,7 @@
 /dts-v1/;
 /include/ "uniphier-ph1-pro4.dtsi"
 /include/ "uniphier-ref-daughter.dtsi"
+/include/ "uniphier-support-card.dtsi"
 
 / {
        model = "UniPhier PH1-Pro4 Reference Board";
        };
 };
 
+&ethsc {
+       interrupts = <0 50 4>;
+};
+
 &serial0 {
        status = "okay";
 };
index c7213c9ff4c49e48ede85602ca7599f4ef694151..c4601cf7bea56b190a44dfecee38df2bd2b6375c 100644 (file)
@@ -9,6 +9,7 @@
 /dts-v1/;
 /include/ "uniphier-ph1-sld3.dtsi"
 /include/ "uniphier-ref-daughter.dtsi"
+/include/ "uniphier-support-card.dtsi"
 
 / {
        model = "UniPhier PH1-sLD3 Reference Board";
        };
 };
 
+&ethsc {
+       interrupts = <0 49 4>;
+};
+
 &serial0 {
        status = "okay";
 };
index ec5c5bdadca47dcef890790b7cc556040fda297a..8ceb93e9f5d4867f4fa917e27bedf53b023d7f5b 100644 (file)
@@ -9,6 +9,7 @@
 /dts-v1/;
 /include/ "uniphier-ph1-sld8.dtsi"
 /include/ "uniphier-ref-daughter.dtsi"
+/include/ "uniphier-support-card.dtsi"
 
 / {
        model = "UniPhier PH1-sLD8 Reference Board";
        };
 };
 
+&ethsc {
+       interrupts = <0 48 4>;
+};
+
 &serial0 {
        status = "okay";
 };
index 494139a05d7718a9d6078d45a5c3f2711cfc389e..988e60a98cf71a525ba37dcf91cc10006bd4cd93 100644 (file)
                function = "i2c3";
        };
 
+       pinctrl_i2c4: i2c4_grp {
+               groups = "i2c4";
+               function = "i2c4";
+       };
+
        pinctrl_sd: sd_grp {
                groups = "sd";
                function = "sd";
diff --git a/arch/arm/dts/uniphier-support-card.dtsi b/arch/arm/dts/uniphier-support-card.dtsi
new file mode 100644 (file)
index 0000000..be0f1d6
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Device Tree Source for UniPhier Support Card (Expansion Board)
+ *
+ * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+        X11
+ */
+
+&system_bus {
+       status = "okay";
+       ranges = <1 0x00000000 0x42000000 0x02000000>;
+
+       support_card: support_card {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0x00000000 1 0x01f00000 0x00100000>;
+
+               ethsc: ethernet@00000000 {
+                       compatible = "smsc,lan9118", "smsc,lan9115";
+                       reg = <0x00000000 0x1000>;
+                       phy-mode = "mii";
+                       reg-io-width = <4>;
+               };
+
+               serialsc: uart@000b0000 {
+                       compatible = "ns16550a";
+                       reg = <0x000b0000 0x20>;
+                       clock-frequency = <12288000>;
+                       reg-shift = <1>;
+               };
+       };
+};
index a4ccbcbde142f089c9043e73bdab2013ccc8d8fd..237aa8d7fa543f70839d6bde26e47f6134d71b5c 100644 (file)
@@ -11,7 +11,7 @@
        model = "VF610 Tower Board";
        compatible = "fsl,vf610-twr", "fsl,vf610";
 
-       choosen {
+       chosen {
                stdout-path = &uart1;
        };
 
index e512dcec1621c8e5a3f336cc56521f2123f83097..526fea68e6a363f8272e0fb1bd37e40220d33961 100644 (file)
@@ -19,6 +19,9 @@ struct kwspi_registers {
        u32 din;        /* 0x1060c */
        u32 irq_cause;  /* 0x10610 */
        u32 irq_mask;   /* 0x10614 */
+       u32 timing1;    /* 0x10618 */
+       u32 timing2;    /* 0x1061c */
+       u32 dw_cfg;     /* 0x10620 - Direct Write Configuration */
 };
 
 /* They are used to define CONFIG_SYS_KW_SPI_MPP
index 4cd0a3cc80d04467d22c2260d2d18b7a9f4368fa..c99700403914f1edaff63051c5fee653fbd790dc 100644 (file)
@@ -83,5 +83,9 @@
 void __recalibrate_iodelay(struct pad_conf_entry const *pad, int npads,
                           struct iodelay_cfg_entry const *iodelay,
                           int niodelays);
+int __recalibrate_iodelay_start(void);
+void __recalibrate_iodelay_end(int ret);
 
+int do_set_iodelay(u32 base, struct iodelay_cfg_entry const *array,
+                  int niodelays);
 #endif
index b5b3838f45003f6cbb37ffcd2bf7ad6cb9d8edce..1eeb8d5f626fdcae627872a87183101d76febe2b 100644 (file)
@@ -60,6 +60,7 @@
 #define DRA752_CONTROL_ID_CODE_ES1_1           0x1B99002F
 #define DRA752_CONTROL_ID_CODE_ES2_0           0x2B99002F
 #define DRA722_CONTROL_ID_CODE_ES1_0           0x0B9BC02F
+#define DRA722_CONTROL_ID_CODE_ES2_0           0x1B9BC02F
 
 /* UART */
 #define UART1_BASE             (OMAP54XX_L4_PER_BASE + 0x6a000)
index 7d6331b6b235e78285c08c77a1842ac281cdfbb4..6cc19664dd3677c897350ad8e03f17e5c17a355d 100644 (file)
@@ -82,16 +82,6 @@ struct stm32_pwr_regs {
        u32 csr;
 };
 
-struct stm32_flash_regs {
-       u32 acr;
-       u32 key;
-       u32 optkeyr;
-       u32 sr;
-       u32 cr;
-       u32 optcr;
-       u32 optcr1;
-};
-
 /*
  * Registers access macros
  */
@@ -104,18 +94,6 @@ struct stm32_flash_regs {
 #define STM32_PWR_BASE         (STM32_APB1PERIPH_BASE + 0x7000)
 #define STM32_PWR              ((struct stm32_pwr_regs *)STM32_PWR_BASE)
 
-#define STM32_FLASH_BASE       (STM32_AHB1PERIPH_BASE + 0x3C00)
-#define STM32_FLASH            ((struct stm32_flash_regs *)STM32_FLASH_BASE)
-
-#define STM32_FLASH_SR_BSY             (1 << 16)
-
-#define STM32_FLASH_CR_PG              (1 << 0)
-#define STM32_FLASH_CR_SER             (1 << 1)
-#define STM32_FLASH_CR_STRT            (1 << 16)
-#define STM32_FLASH_CR_LOCK            (1 << 31)
-#define STM32_FLASH_CR_SNB_OFFSET      3
-#define STM32_FLASH_CR_SNB_MASK                (15 << STM32_FLASH_CR_SNB_OFFSET)
-
 /*
  * Peripheral base addresses
  */
@@ -124,6 +102,14 @@ struct stm32_flash_regs {
 #define STM32_USART3_BASE      (STM32_APB1PERIPH_BASE + 0x4800)
 #define STM32_USART6_BASE      (STM32_APB2PERIPH_BASE + 0x1400)
 
+#define FLASH_CNTL_BASE                (STM32_AHB1PERIPH_BASE + 0x3C00)
+
+static const u32 sect_sz_kb[CONFIG_SYS_MAX_FLASH_SECT] = {
+       [0 ... 3] =     16 * 1024,
+       [4] =           64 * 1024,
+       [5 ... 11] =    128 * 1024
+};
+
 enum clock {
        CLOCK_CORE,
        CLOCK_AHB,
@@ -133,5 +119,6 @@ enum clock {
 
 int configure_clocks(void);
 unsigned long clock_get(enum clock clck);
+void stm32_flash_latency_cfg(int latency);
 
 #endif /* _MACH_STM32_H_ */
index 713eb2e8cf7b64c0165313573bc01759577caff1..68bdab069d480752a7c99e6bbde255a0442dd319 100644 (file)
 
 #define SDRAM_FMC_BASE         (AHB3_PERIPH_BASE + 0x4A0000140)
 
+static const u32 sect_sz_kb[CONFIG_SYS_MAX_FLASH_SECT] = {
+       [0 ... 3] =     32 * 1024,
+       [4] =           128 * 1024,
+       [5 ... 7] =     256 * 1024
+};
+
 enum clock {
        CLOCK_CORE,
        CLOCK_AHB,
index b6e11eb8ea6c9948620723646196fb119c139932..65c0441fe8a2c9e98aee844c6f50a98801690a3c 100644 (file)
 #define SUNXI_AD_DA_BASE               0x01c22c00
 #define SUNXI_KEYPAD_BASE              0x01c23000
 #define SUNXI_TZPC_BASE                        0x01c23400
+
+#if defined(CONFIG_MACH_SUN8I_A83T) || defined(CONFIG_MACH_SUN8I_H3)
+/* SID address space starts at 0x01c1400, but e-fuse is at offset 0x200 */
+#define SUNXI_SID_BASE                 0x01c14200
+#else
 #define SUNXI_SID_BASE                 0x01c23800
+#endif
+
 #define SUNXI_SJTAG_BASE               0x01c23c00
 
 #define SUNXI_TP_BASE                  0x01c25000
index 9df37445210aebc1d7304f822fa74ad61e9b5a23..a373319a2b4a14b503b1c5f0b6f5a56e83ff7b37 100644 (file)
@@ -24,6 +24,10 @@ void sdelay(unsigned long);
 void return_to_fel(uint32_t lr, uint32_t sp);
 
 /* Board / SoC level designware gmac init */
-int sunxi_gmac_initialize(bd_t *bis);
+#if !defined CONFIG_SPL_BUILD && defined CONFIG_SUNXI_GMAC
+void eth_init_board(void);
+#else
+static inline void eth_init_board(void) {}
+#endif
 
 #endif
index 355b25e8855dbc443ad02411c7fc2afa1d9a9541..b0b6d613301ca3a062b02183b62c98f8c9626c37 100644 (file)
@@ -5,6 +5,7 @@
  */
 #ifndef __ASM_ARCH_MXC_MXC_I2C_H__
 #define __ASM_ARCH_MXC_MXC_I2C_H__
+#include <asm-generic/gpio.h>
 #include <asm/imx-common/iomux-v3.h>
 
 struct i2c_pin_ctrl {
@@ -30,6 +31,10 @@ struct i2c_pads_info {
  * The following two is only to be compatible with non-DM part.
  * @idle_bus_fn: function to force bus idle
  * @idle_bus_data: parameter for idle_bus_fun
+ * For DM:
+ * bus: The device structure for i2c bus controller
+ * scl-gpio: specify the gpio related to SCL pin
+ * sda-gpio: specify the gpio related to SDA pin
  */
 struct mxc_i2c_bus {
        /*
@@ -46,6 +51,11 @@ struct mxc_i2c_bus {
 #ifndef CONFIG_DM_I2C
        int (*idle_bus_fn)(void *p);
        void *idle_bus_data;
+#else
+       struct udevice *bus;
+       /* Use gpio to force bus idle when bus state is abnormal */
+       struct gpio_desc scl_gpio;
+       struct gpio_desc sda_gpio;
 #endif
 };
 
index aef31266ce9e9c386d7d84302beb3b022e7466b7..8c85f46db6ef66b3093ced39ae45efdaa2303a5d 100644 (file)
@@ -700,6 +700,7 @@ static inline u8 is_dra72x(void)
 #define DRA752_ES1_1   0x07520110
 #define DRA752_ES2_0   0x07520200
 #define DRA722_ES1_0   0x07220100
+#define DRA722_ES2_0   0x07220200
 
 /*
  * SRAM scratch space entries
index ac1173d18909ce8cee3da5d03c760300aa1c675b..9ae890a830387b8690e6fe01e677e0d2d45e5bf1 100644 (file)
@@ -26,8 +26,12 @@ u64 get_page_table_size(void);
 #define MMU_SECTION_SHIFT      21
 #define MMU_SECTION_SIZE       (1 << MMU_SECTION_SHIFT)
 
+/* These constants need to be synced to the MT_ types in asm/armv8/mmu.h */
 enum dcache_option {
-       DCACHE_OFF = 0x3,
+       DCACHE_OFF = 0 << 2,
+       DCACHE_WRITETHROUGH = 3 << 2,
+       DCACHE_WRITEBACK = 4 << 2,
+       DCACHE_WRITEALLOC = 4 << 2,
 };
 
 #define isb()                          \
@@ -172,7 +176,9 @@ void smc_call(struct pt_regs *args);
 #define CR_AFE (1 << 29)       /* Access flag enable                   */
 #define CR_TE  (1 << 30)       /* Thumb exception enable               */
 
-#ifndef PGTABLE_SIZE
+#if defined(CONFIG_ARMV7_LPAE) && !defined(PGTABLE_SIZE)
+#define PGTABLE_SIZE           (4096 * 5)
+#elif !defined(PGTABLE_SIZE)
 #define PGTABLE_SIZE           (4096 * 4)
 #endif
 
@@ -229,17 +235,50 @@ void save_boot_params_ret(void);
 #define wfi()
 #endif
 
+static inline unsigned long get_cpsr(void)
+{
+       unsigned long cpsr;
+
+       asm volatile("mrs %0, cpsr" : "=r"(cpsr): );
+       return cpsr;
+}
+
+static inline int is_hyp(void)
+{
+#ifdef CONFIG_ARMV7_LPAE
+       /* HYP mode requires LPAE ... */
+       return ((get_cpsr() & 0x1f) == 0x1a);
+#else
+       /* ... so without LPAE support we can optimize all hyp code away */
+       return 0;
+#endif
+}
+
 static inline unsigned int get_cr(void)
 {
        unsigned int val;
-       asm volatile("mrc p15, 0, %0, c1, c0, 0 @ get CR" : "=r" (val) : : "cc");
+
+       if (is_hyp())
+               asm volatile("mrc p15, 4, %0, c1, c0, 0 @ get CR" : "=r" (val)
+                                                                 :
+                                                                 : "cc");
+       else
+               asm volatile("mrc p15, 0, %0, c1, c0, 0 @ get CR" : "=r" (val)
+                                                                 :
+                                                                 : "cc");
        return val;
 }
 
 static inline void set_cr(unsigned int val)
 {
-       asm volatile("mcr p15, 0, %0, c1, c0, 0 @ set CR"
-         : : "r" (val) : "cc");
+       if (is_hyp())
+               asm volatile("mcr p15, 4, %0, c1, c0, 0 @ set CR" :
+                                                                 : "r" (val)
+                                                                 : "cc");
+       else
+               asm volatile("mcr p15, 0, %0, c1, c0, 0 @ set CR" :
+                                                                 : "r" (val)
+                                                                 : "cc");
        isb();
 }
 
@@ -257,12 +296,59 @@ static inline void set_dacr(unsigned int val)
        isb();
 }
 
-#ifdef CONFIG_CPU_V7
+#ifdef CONFIG_ARMV7_LPAE
+/* Long-Descriptor Translation Table Level 1/2 Bits */
+#define TTB_SECT_XN_MASK       (1ULL << 54)
+#define TTB_SECT_NG_MASK       (1 << 11)
+#define TTB_SECT_AF            (1 << 10)
+#define TTB_SECT_SH_MASK       (3 << 8)
+#define TTB_SECT_NS_MASK       (1 << 5)
+#define TTB_SECT_AP            (1 << 6)
+/* Note: TTB AP bits are set elsewhere */
+#define TTB_SECT_MAIR(x)       ((x & 0x7) << 2) /* Index into MAIR */
+#define TTB_SECT               (1 << 0)
+#define TTB_PAGETABLE          (3 << 0)
+
+/* TTBCR flags */
+#define TTBCR_EAE              (1 << 31)
+#define TTBCR_T0SZ(x)          ((x) << 0)
+#define TTBCR_T1SZ(x)          ((x) << 16)
+#define TTBCR_USING_TTBR0      (TTBCR_T0SZ(0) | TTBCR_T1SZ(0))
+#define TTBCR_IRGN0_NC         (0 << 8)
+#define TTBCR_IRGN0_WBWA       (1 << 8)
+#define TTBCR_IRGN0_WT         (2 << 8)
+#define TTBCR_IRGN0_WBNWA      (3 << 8)
+#define TTBCR_IRGN0_MASK       (3 << 8)
+#define TTBCR_ORGN0_NC         (0 << 10)
+#define TTBCR_ORGN0_WBWA       (1 << 10)
+#define TTBCR_ORGN0_WT         (2 << 10)
+#define TTBCR_ORGN0_WBNWA      (3 << 10)
+#define TTBCR_ORGN0_MASK       (3 << 10)
+#define TTBCR_SHARED_NON       (0 << 12)
+#define TTBCR_SHARED_OUTER     (2 << 12)
+#define TTBCR_SHARED_INNER     (3 << 12)
+#define TTBCR_EPD0             (0 << 7)
+
+/*
+ * Memory types
+ */
+#define MEMORY_ATTRIBUTES      ((0x00 << (0 * 8)) | (0x88 << (1 * 8)) | \
+                                (0xcc << (2 * 8)) | (0xff << (3 * 8)))
+
+/* options available for data cache on each page */
+enum dcache_option {
+       DCACHE_OFF = TTB_SECT | TTB_SECT_MAIR(0),
+       DCACHE_WRITETHROUGH = TTB_SECT | TTB_SECT_MAIR(1),
+       DCACHE_WRITEBACK = TTB_SECT | TTB_SECT_MAIR(2),
+       DCACHE_WRITEALLOC = TTB_SECT | TTB_SECT_MAIR(3),
+};
+#elif defined(CONFIG_CPU_V7)
 /* Short-Descriptor Translation Table Level 1 Bits */
 #define TTB_SECT_NS_MASK       (1 << 19)
 #define TTB_SECT_NG_MASK       (1 << 17)
 #define TTB_SECT_S_MASK                (1 << 16)
 /* Note: TTB AP bits are set elsewhere */
+#define TTB_SECT_AP            (3 << 10)
 #define TTB_SECT_TEX(x)                ((x & 0x7) << 12)
 #define TTB_SECT_DOMAIN(x)     ((x & 0xf) << 5)
 #define TTB_SECT_XN_MASK       (1 << 4)
@@ -278,6 +364,7 @@ enum dcache_option {
        DCACHE_WRITEALLOC = DCACHE_WRITEBACK | TTB_SECT_TEX(1),
 };
 #else
+#define TTB_SECT_AP            (3 << 10)
 /* options available for data cache on each page */
 enum dcache_option {
        DCACHE_OFF = 0x12,
@@ -289,7 +376,11 @@ enum dcache_option {
 
 /* Size of an MMU section */
 enum {
-       MMU_SECTION_SHIFT       = 20,
+#ifdef CONFIG_ARMV7_LPAE
+       MMU_SECTION_SHIFT       = 21, /* 2MB */
+#else
+       MMU_SECTION_SHIFT       = 20, /* 1MB */
+#endif
        MMU_SECTION_SIZE        = 1 << MMU_SECTION_SHIFT,
 };
 
index 388058e04c5b88a3aa62a22dc54dc3634a4cc65f..d108915ff5c1e1accc0f4d80be10921707dea667 100644 (file)
@@ -46,16 +46,29 @@ typedef unsigned long long u64;
 #endif /* CONFIG_ARM64 */
 
 #ifdef CONFIG_PHYS_64BIT
-typedef unsigned long long dma_addr_t;
 typedef unsigned long long phys_addr_t;
 typedef unsigned long long phys_size_t;
 #else
 /* DMA addresses are 32-bits wide */
-typedef u32 dma_addr_t;
 typedef unsigned long phys_addr_t;
 typedef unsigned long phys_size_t;
 #endif
 
+/*
+ * A dma_addr_t can hold any valid DMA address, i.e., any address returned
+ * by the DMA API.
+ *
+ * If the DMA API only uses 32-bit addresses, dma_addr_t need only be 32
+ * bits wide.  Bus addresses, e.g., PCI BARs, may be wider than 32 bits,
+ * but drivers do memory-mapped I/O to ioremapped kernel virtual addresses,
+ * so they don't care about the size of the actual bus addresses.
+ */
+#ifdef CONFIG_DMA_ADDR_T_64BIT
+typedef unsigned long long dma_addr_t;
+#else
+typedef u32 dma_addr_t;
+#endif
+
 #endif /* __KERNEL__ */
 
 typedef unsigned long resource_size_t;
index 8e185383a5bc3fb522ec8c885ac9effd32a3a7ef..1121dc3a936c8ce5f1ee10314240136516d30b94 100644 (file)
@@ -34,11 +34,22 @@ static void cp_delay (void)
 
 void set_section_dcache(int section, enum dcache_option option)
 {
+#ifdef CONFIG_ARMV7_LPAE
+       u64 *page_table = (u64 *)gd->arch.tlb_addr;
+       /* Need to set the access flag to not fault */
+       u64 value = TTB_SECT_AP | TTB_SECT_AF;
+#else
        u32 *page_table = (u32 *)gd->arch.tlb_addr;
-       u32 value;
+       u32 value = TTB_SECT_AP;
+#endif
+
+       /* Add the page offset */
+       value |= ((u32)section << MMU_SECTION_SHIFT);
 
-       value = (section << MMU_SECTION_SHIFT) | (3 << 10);
+       /* Add caching bits */
        value |= option;
+
+       /* Set PTE */
        page_table[section] = value;
 }
 
@@ -68,8 +79,9 @@ __weak void dram_bank_mmu_setup(int bank)
        int     i;
 
        debug("%s: bank: %d\n", __func__, bank);
-       for (i = bd->bi_dram[bank].start >> 20;
-            i < (bd->bi_dram[bank].start >> 20) + (bd->bi_dram[bank].size >> 20);
+       for (i = bd->bi_dram[bank].start >> MMU_SECTION_SHIFT;
+            i < (bd->bi_dram[bank].start >> MMU_SECTION_SHIFT) +
+                (bd->bi_dram[bank].size >> MMU_SECTION_SHIFT);
             i++) {
 #if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH)
                set_section_dcache(i, DCACHE_WRITETHROUGH);
@@ -89,14 +101,56 @@ static inline void mmu_setup(void)
 
        arm_init_before_mmu();
        /* Set up an identity-mapping for all 4GB, rw for everyone */
-       for (i = 0; i < 4096; i++)
+       for (i = 0; i < ((4096ULL * 1024 * 1024) >> MMU_SECTION_SHIFT); i++)
                set_section_dcache(i, DCACHE_OFF);
 
        for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
                dram_bank_mmu_setup(i);
        }
 
-#ifdef CONFIG_CPU_V7
+#ifdef CONFIG_ARMV7_LPAE
+       /* Set up 4 PTE entries pointing to our 4 1GB page tables */
+       for (i = 0; i < 4; i++) {
+               u64 *page_table = (u64 *)(gd->arch.tlb_addr + (4096 * 4));
+               u64 tpt = gd->arch.tlb_addr + (4096 * i);
+               page_table[i] = tpt | TTB_PAGETABLE;
+       }
+
+       reg = TTBCR_EAE;
+#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH)
+       reg |= TTBCR_ORGN0_WT | TTBCR_IRGN0_WT;
+#elif defined(CONFIG_SYS_ARM_CACHE_WRITEALLOC)
+       reg |= TTBCR_ORGN0_WBWA | TTBCR_IRGN0_WBWA;
+#else
+       reg |= TTBCR_ORGN0_WBNWA | TTBCR_IRGN0_WBNWA;
+#endif
+
+       if (is_hyp()) {
+               /* Set HCTR to enable LPAE */
+               asm volatile("mcr p15, 4, %0, c2, c0, 2"
+                       : : "r" (reg) : "memory");
+               /* Set HTTBR0 */
+               asm volatile("mcrr p15, 4, %0, %1, c2"
+                       :
+                       : "r"(gd->arch.tlb_addr + (4096 * 4)), "r"(0)
+                       : "memory");
+               /* Set HMAIR */
+               asm volatile("mcr p15, 4, %0, c10, c2, 0"
+                       : : "r" (MEMORY_ATTRIBUTES) : "memory");
+       } else {
+               /* Set TTBCR to enable LPAE */
+               asm volatile("mcr p15, 0, %0, c2, c0, 2"
+                       : : "r" (reg) : "memory");
+               /* Set 64-bit TTBR0 */
+               asm volatile("mcrr p15, 0, %0, %1, c2"
+                       :
+                       : "r"(gd->arch.tlb_addr + (4096 * 4)), "r"(0)
+                       : "memory");
+               /* Set MAIR */
+               asm volatile("mcr p15, 0, %0, c10, c2, 0"
+                       : : "r" (MEMORY_ATTRIBUTES) : "memory");
+       }
+#elif defined(CONFIG_CPU_V7)
        /* Set TTBR0 */
        reg = gd->arch.tlb_addr & TTBR0_BASE_ADDR_MASK;
 #if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH)
index 2315a134382dfd48e09d813e90d9ea1bf8a631dc..1a7baf69e59047c71f0f8c584ea45b7c06930b8e 100644 (file)
@@ -12,6 +12,7 @@ config TARGET_RPI
 config TARGET_RPI_2
        bool "Raspberry Pi 2"
        select CPU_V7
+       select ARMV7_LPAE
 
 endchoice
 
index c8ef8f528a21f1a23f4211f0d806fb22baf68a0c..e6e5d1605d0a317168342e2364e72374cda522ad 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef _BCM2835_GPIO_H_
 #define _BCM2835_GPIO_H_
 
-#ifdef CONFIG_BCM2836
+#ifndef CONFIG_BCM2835
 #define BCM2835_GPIO_BASE              0x3f200000
 #else
 #define BCM2835_GPIO_BASE              0x20200000
index 4a143917f0f8ed4a7b53345dfe4b040ad635abb5..627acb85dc8c6fe47eae25a8b3e6498dab1ab7a2 100644 (file)
@@ -38,7 +38,7 @@
 
 /* Raw mailbox HW */
 
-#ifdef CONFIG_BCM2836
+#ifndef CONFIG_BCM2835
 #define BCM2835_MBOX_PHYSADDR  0x3f00b880
 #else
 #define BCM2835_MBOX_PHYSADDR  0x2000b880
index 2a21ccbf66baea64fb58b5be9d8ba9c46c0d9029..64e582c114f5401d59b7b2f3efdcecbc008f4466 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef _BCM2835_SDHCI_H_
 #define _BCM2835_SDHCI_H_
 
-#ifdef CONFIG_BCM2836
+#ifndef CONFIG_BCM2835
 #define BCM2835_SDHCI_BASE 0x3f300000
 #else
 #define BCM2835_SDHCI_BASE 0x20300000
index 004c24be365a4721c8952e0cf542c013191b6bbf..2a85f230e86d53f96315f7665d8042bbce57f572 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef _BCM2835_TIMER_H
 #define _BCM2835_TIMER_H
 
-#ifdef CONFIG_BCM2836
+#ifndef CONFIG_BCM2835
 #define BCM2835_TIMER_PHYSADDR 0x3f003000
 #else
 #define BCM2835_TIMER_PHYSADDR 0x20003000
index cbc350e84b902ff1a80e7441692bef13f67acbbc..7741d7ba15584197baa22750e18e1afbb2a87c29 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef _BCM2835_WDOG_H
 #define _BCM2835_WDOG_H
 
-#ifdef CONFIG_BCM2836
+#ifndef CONFIG_BCM2835
 #define BCM2835_WDOG_PHYSADDR                  0x3f100000
 #else
 #define BCM2835_WDOG_PHYSADDR                  0x20100000
index d2d366ba4f1ed24f405bf1ff5b14590b26591c89..4fa94dbeeb1d4f9d8340c8e6faabcbfc833ad948 100644 (file)
@@ -15,3 +15,10 @@ int arch_cpu_init(void)
 
        return 0;
 }
+
+#ifdef CONFIG_ARMV7_LPAE
+void enable_caches(void)
+{
+       dcache_enable();
+}
+#endif
index 311bd8feaab071fdb7ffdb23477ef8c68cdbcd23..ec3f417f40f4356669570245d1c4ecaefcaffb5d 100644 (file)
@@ -115,7 +115,9 @@ int bcm2835_mbox_call_prop(u32 chan, struct bcm2835_mbox_hdr *buffer)
                           (unsigned long)((void *)buffer +
                           roundup(buffer->buf_size, ARCH_DMA_MINALIGN)));
 
-       ret = bcm2835_mbox_call_raw(chan, phys_to_bus((u32)buffer), &rbuffer);
+       ret = bcm2835_mbox_call_raw(chan,
+                                   phys_to_bus((unsigned long)buffer),
+                                   &rbuffer);
        if (ret)
                return ret;
 
@@ -123,7 +125,7 @@ int bcm2835_mbox_call_prop(u32 chan, struct bcm2835_mbox_hdr *buffer)
                                (unsigned long)((void *)buffer +
                                roundup(buffer->buf_size, ARCH_DMA_MINALIGN)));
 
-       if (rbuffer != phys_to_bus((u32)buffer)) {
+       if (rbuffer != phys_to_bus((unsigned long)buffer)) {
                printf("mbox: Response buffer mismatch\n");
                return -1;
        }
index fc1c29905de39db7aa34d3b81258c460ac49e188..8e9f49240ff7eab5a7527819841ddfa5fbc03840 100644 (file)
@@ -9,7 +9,7 @@
 
 unsigned long phys_to_bus(unsigned long phys)
 {
-#ifdef CONFIG_BCM2836
+#ifndef CONFIG_BCM2835
        return 0xc0000000 | phys;
 #else
        return 0x40000000 | phys;
index 6e6e7fd433a12bc4e6135891feca6e1cd151be46..18499386a3219046eec2e55b008e80023c4fd47c 100644 (file)
 #define PSC_REG_MDSTAT(x)       (0x800 + (4 * (x)))
 #define PSC_REG_MDCTL(x)        (0xa00 + (4 * (x)))
 
-#define BOOTBITMASK(x, y)     ((((((u32)1 << (((u32)x) - ((u32)y) + (u32)1)) - \
-                                 (u32)1)) << ((u32)y)))
 
-#define BOOT_READ_BITFIELD(z, x, y)    ((((u32)z) & BOOTBITMASK(x, y)) >> (y))
-#define BOOT_SET_BITFIELD(z, f, x, y)  ((((u32)z) & ~BOOTBITMASK(x, y)) | \
-                                       ((((u32)f) << (y)) & BOOTBITMASK(x, y)))
+static inline u32 _boot_bit_mask(u32 x, u32 y)
+{
+       u32 val = (1 << (x - y + 1)) - 1;
+       return val << y;
+}
+
+static inline u32 boot_read_bitfield(u32 z, u32 x, u32 y)
+{
+       u32 val = z & _boot_bit_mask(x, y);
+       return val >> y;
+}
+
+static inline u32 boot_set_bitfield(u32 z, u32 f, u32 x, u32 y)
+{
+       u32 mask = _boot_bit_mask(x, y);
+
+       return (z & ~mask) | ((f << y) & mask);
+}
 
 /* PDCTL */
-#define PSC_REG_PDCTL_SET_NEXT(x, y)        BOOT_SET_BITFIELD((x), (y), 0, 0)
-#define PSC_REG_PDCTL_SET_PDMODE(x, y)      BOOT_SET_BITFIELD((x), (y), 15, 12)
+#define PSC_REG_PDCTL_SET_NEXT(x, y)        boot_set_bitfield((x), (y), 0, 0)
+#define PSC_REG_PDCTL_SET_PDMODE(x, y)      boot_set_bitfield((x), (y), 15, 12)
 
 /* PDSTAT */
-#define PSC_REG_PDSTAT_GET_STATE(x)         BOOT_READ_BITFIELD((x), 4, 0)
+#define PSC_REG_PDSTAT_GET_STATE(x)         boot_read_bitfield((x), 4, 0)
 
 /* MDCFG */
-#define PSC_REG_MDCFG_GET_PD(x)             BOOT_READ_BITFIELD((x), 20, 16)
-#define PSC_REG_MDCFG_GET_RESET_ISO(x)      BOOT_READ_BITFIELD((x), 14, 14)
+#define PSC_REG_MDCFG_GET_PD(x)             boot_read_bitfield((x), 20, 16)
+#define PSC_REG_MDCFG_GET_RESET_ISO(x)      boot_read_bitfield((x), 14, 14)
 
 /* MDCTL */
-#define PSC_REG_MDCTL_SET_NEXT(x, y)        BOOT_SET_BITFIELD((x), (y), 4, 0)
-#define PSC_REG_MDCTL_SET_LRSTZ(x, y)       BOOT_SET_BITFIELD((x), (y), 8, 8)
-#define PSC_REG_MDCTL_GET_LRSTZ(x)          BOOT_READ_BITFIELD((x), 8, 8)
-#define PSC_REG_MDCTL_SET_RESET_ISO(x, y)   BOOT_SET_BITFIELD((x), (y), \
+#define PSC_REG_MDCTL_SET_NEXT(x, y)        boot_set_bitfield((x), (y), 4, 0)
+#define PSC_REG_MDCTL_SET_LRSTZ(x, y)       boot_set_bitfield((x), (y), 8, 8)
+#define PSC_REG_MDCTL_GET_LRSTZ(x)          boot_read_bitfield((x), 8, 8)
+#define PSC_REG_MDCTL_SET_RESET_ISO(x, y)   boot_set_bitfield((x), (y), \
                                                                  12, 12)
 
 /* MDSTAT */
-#define PSC_REG_MDSTAT_GET_STATUS(x)        BOOT_READ_BITFIELD((x), 5, 0)
-#define PSC_REG_MDSTAT_GET_LRSTZ(x)         BOOT_READ_BITFIELD((x), 8, 8)
-#define PSC_REG_MDSTAT_GET_LRSTDONE(x)      BOOT_READ_BITFIELD((x), 9, 9)
-#define PSC_REG_MDSTAT_GET_MRSTZ(x)         BOOT_READ_BITFIELD((x), 10, 10)
-#define PSC_REG_MDSTAT_GET_MRSTDONE(x)      BOOT_READ_BITFIELD((x), 11, 11)
+#define PSC_REG_MDSTAT_GET_STATUS(x)        boot_read_bitfield((x), 5, 0)
+#define PSC_REG_MDSTAT_GET_LRSTZ(x)         boot_read_bitfield((x), 8, 8)
+#define PSC_REG_MDSTAT_GET_LRSTDONE(x)      boot_read_bitfield((x), 9, 9)
+#define PSC_REG_MDSTAT_GET_MRSTZ(x)         boot_read_bitfield((x), 10, 10)
+#define PSC_REG_MDSTAT_GET_MRSTDONE(x)      boot_read_bitfield((x), 11, 11)
 
 /* PDCTL states */
 #define PSC_REG_VAL_PDCTL_NEXT_ON           1
index 017d55f412ed01b9e871f7300c85a083cb5686dd..dd58b4adc45f4d13409d9ef0d14cb23833343732 100644 (file)
@@ -47,6 +47,9 @@ enum cpu_attrib {
        CPU_ATTR_DRAM_CS3 = 0x07,
        CPU_ATTR_NANDFLASH = 0x2f,
        CPU_ATTR_SPIFLASH = 0x1e,
+       CPU_ATTR_SPI0_CS0 = 0x1e,
+       CPU_ATTR_SPI0_CS1 = 0x5e,
+       CPU_ATTR_SPI1_CS2 = 0x9a,
        CPU_ATTR_BOOTROM = 0x1d,
        CPU_ATTR_PCIE_IO = 0xe0,
        CPU_ATTR_PCIE_MEM = 0xe8,
index 42d01db14d685dd15ea98e26297a916e43605957..020e78370c84715d643a0e5dce31ce29c3505347 100644 (file)
@@ -8,4 +8,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-y += soc.o clock.o timer.o flash.o
+obj-y += soc.o clock.o timer.o
index 631f36a5a164420371eb931f6963e823f897423c..15fcadbbe6fa162b728c19e7e7ae32415ff9fdcf 100644 (file)
 #define PWR_CR_VOS_SCALE_MODE_2        (PWR_CR_VOS1)
 #define PWR_CR_VOS_SCALE_MODE_3        (PWR_CR_VOS0)
 
-#define FLASH_ACR_WS(n)                n
-#define FLASH_ACR_PRFTEN       (1 << 8)
-#define FLASH_ACR_ICEN         (1 << 9)
-#define FLASH_ACR_DCEN         (1 << 10)
-
 /*
  * RCC GPIO specific definitions
  */
@@ -181,10 +176,7 @@ int configure_clocks(void)
        while (!(readl(&STM32_RCC->cr) & RCC_CR_PLLRDY))
                ;
 
-       /* 5 wait states, Prefetch enabled, D-Cache enabled, I-Cache enabled */
-       writel(FLASH_ACR_WS(5) | FLASH_ACR_PRFTEN | FLASH_ACR_ICEN
-               | FLASH_ACR_DCEN, &STM32_FLASH->acr);
-
+       stm32_flash_latency_cfg(5);
        clrbits_le32(&STM32_RCC->cfgr, (RCC_CFGR_SW0 | RCC_CFGR_SW1));
        setbits_le32(&STM32_RCC->cfgr, RCC_CFGR_SW_PLL);
 
index 660f83c8557c7dfc1f35b19272c056658a8b1a2a..4724af58a141b87fc765e981260e6b739c792861 100644 (file)
@@ -5,9 +5,9 @@ config SYS_CONFIG_NAME
 
 choice
         prompt "UniPhier SoC select"
-        default ARCH_UNIPHIER_PH1_PRO4
+        default ARCH_UNIPHIER_PRO4
 
-config ARCH_UNIPHIER_PH1_SLD3
+config ARCH_UNIPHIER_SLD3
        bool "UniPhier PH1-sLD3 SoC"
        select CPU_V7
 
@@ -15,7 +15,7 @@ config ARCH_UNIPHIER_LD4_SLD8
        bool "UniPhier PH1-LD4/PH1-sLD8 SoC"
        select CPU_V7
 
-config ARCH_UNIPHIER_PH1_PRO4
+config ARCH_UNIPHIER_PRO4
        bool "UniPhier PH1-Pro4 SoC"
        select CPU_V7
 
@@ -25,27 +25,27 @@ config ARCH_UNIPHIER_PRO5_PXS2_LD6B
 
 endchoice
 
-config ARCH_UNIPHIER_PH1_LD4
+config ARCH_UNIPHIER_LD4
        bool "Enable UniPhier PH1-LD4 SoC support"
        depends on ARCH_UNIPHIER_LD4_SLD8
        default y
 
-config ARCH_UNIPHIER_PH1_SLD8
+config ARCH_UNIPHIER_SLD8
        bool "Enable UniPhier PH1-sLD8 SoC support"
        depends on ARCH_UNIPHIER_LD4_SLD8
        default y
 
-config ARCH_UNIPHIER_PH1_PRO5
+config ARCH_UNIPHIER_PRO5
        bool "Enable UniPhier PH1-Pro5 SoC support"
        depends on ARCH_UNIPHIER_PRO5_PXS2_LD6B
        default y
 
-config ARCH_UNIPHIER_PROXSTREAM2
+config ARCH_UNIPHIER_PXS2
        bool "Enable UniPhier ProXstream2 SoC support"
        depends on ARCH_UNIPHIER_PRO5_PXS2_LD6B
        default y
 
-config ARCH_UNIPHIER_PH1_LD6B
+config ARCH_UNIPHIER_LD6B
        bool "Enable UniPhier PH1-LD6b SoC support"
        depends on ARCH_UNIPHIER_PRO5_PXS2_LD6B
        default y
@@ -68,15 +68,16 @@ config CMD_PINMON
 
 config CMD_DDRPHY_DUMP
        bool "Enable dump command of DDR PHY parameters"
-       depends on ARCH_UNIPHIER_PH1_LD4 || ARCH_UNIPHIER_PH1_PRO4 || \
-                  ARCH_UNIPHIER_PH1_SLD8
+       depends on ARCH_UNIPHIER_LD4 || ARCH_UNIPHIER_PRO4 || ARCH_UNIPHIER_SLD8
+       default y
        help
          The command "ddrphy" shows the resulting parameters of DDR PHY
          training; it is useful for the evaluation of DDR PHY training.
 
 config CMD_DDRMPHY_DUMP
        bool "Enable dump command of DDR Multi PHY parameters"
-       depends on ARCH_UNIPHIER_PROXSTREAM2 || ARCH_UNIPHIER_PH1_LD6B
+       depends on ARCH_UNIPHIER_PXS2 || ARCH_UNIPHIER_LD6B
+       default y
        help
          The command "ddrmphy" shows the resulting parameters of DDR Multi PHY
          training; it is useful for the evaluation of DDR Multi PHY training.
index 1a8c64996456236dc2162d5bd09cc4e49a0a1edc..35edca101500d2b68751a4a1f82f157c1bb2f62b 100644 (file)
@@ -28,5 +28,6 @@ obj-y += boot-mode/
 obj-y += dram/
 
 obj-$(CONFIG_MICRO_SUPPORT_CARD) += micro-support-card.o
+obj-$(CONFIG_DEBUG_UART_UNIPHIER) += debug-uart/
 
 obj-$(CONFIG_CPU_V7) += arm32/
index 8e4943cff97fe809bee116a9834c4355993a44e1..5db7427dd67247cab52cbe6b31ba05ca5997d422 100644 (file)
@@ -26,8 +26,8 @@ ENTRY(debug_ll_init)
        and             r1, r1, #SG_REVISION_TYPE_MASK
        mov             r1, r1, lsr #SG_REVISION_TYPE_SHIFT
 
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3)
-#define PH1_SLD3_UART_CLK              36864000
+#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
+#define UNIPHIER_SLD3_UART_CLK         36864000
        cmp             r1, #0x25
        bne             ph1_sld3_end
 
@@ -42,13 +42,13 @@ ENTRY(debug_ll_init)
        orr             r1, r1, #SC_CLKCTRL_CEN_PERI
        str             r1, [r0]
 
-       ldr             r3, =DIV_ROUND(PH1_SLD3_UART_CLK, 16 * BAUDRATE)
+       ldr             r3, =DIV_ROUND(UNIPHIER_SLD3_UART_CLK, 16 * BAUDRATE)
 
        b               init_uart
 ph1_sld3_end:
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD4)
-#define PH1_LD4_UART_CLK               36864000
+#if defined(CONFIG_ARCH_UNIPHIER_LD4)
+#define UNIPHIER_LD4_UART_CLK          36864000
        cmp             r1, #0x26
        bne             ph1_ld4_end
 
@@ -59,13 +59,13 @@ ph1_sld3_end:
 
        sg_set_pinsel   88, 1, 8, 4, r0, r1     @ HSDOUT6 -> TXD0
 
-       ldr             r3, =DIV_ROUND(PH1_LD4_UART_CLK, 16 * BAUDRATE)
+       ldr             r3, =DIV_ROUND(UNIPHIER_LD4_UART_CLK, 16 * BAUDRATE)
 
        b               init_uart
 ph1_ld4_end:
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO4)
-#define PH1_PRO4_UART_CLK              73728000
+#if defined(CONFIG_ARCH_UNIPHIER_PRO4)
+#define UNIPHIER_PRO4_UART_CLK         73728000
        cmp             r1, #0x28
        bne             ph1_pro4_end
 
@@ -80,13 +80,13 @@ ph1_ld4_end:
        orr             r1, r1, #SC_CLKCTRL_CEN_PERI
        str             r1, [r0]
 
-       ldr             r3, =DIV_ROUND(PH1_PRO4_UART_CLK, 16 * BAUDRATE)
+       ldr             r3, =DIV_ROUND(UNIPHIER_PRO4_UART_CLK, 16 * BAUDRATE)
 
        b               init_uart
 ph1_pro4_end:
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8)
-#define PH1_SLD8_UART_CLK              80000000
+#if defined(CONFIG_ARCH_UNIPHIER_SLD8)
+#define UNIPHIER_SLD8_UART_CLK         80000000
        cmp             r1, #0x29
        bne             ph1_sld8_end
 
@@ -97,13 +97,13 @@ ph1_pro4_end:
 
        sg_set_pinsel   70, 3, 8, 4, r0, r1     @ HSDOUT0 -> TXD0
 
-       ldr             r3, =DIV_ROUND(PH1_SLD8_UART_CLK, 16 * BAUDRATE)
+       ldr             r3, =DIV_ROUND(UNIPHIER_SLD8_UART_CLK, 16 * BAUDRATE)
 
        b               init_uart
 ph1_sld8_end:
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5)
-#define PH1_PRO5_UART_CLK              73728000
+#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
+#define UNIPHIER_PRO5_UART_CLK         73728000
        cmp             r1, #0x2A
        bne             ph1_pro5_end
 
@@ -121,13 +121,13 @@ ph1_sld8_end:
        orr             r1, r1, #SC_CLKCTRL_CEN_PERI
        str             r1, [r0]
 
-       ldr             r3, =DIV_ROUND(PH1_PRO5_UART_CLK, 16 * BAUDRATE)
+       ldr             r3, =DIV_ROUND(UNIPHIER_PRO5_UART_CLK, 16 * BAUDRATE)
 
        b               init_uart
 ph1_pro5_end:
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PROXSTREAM2)
-#define PROXSTREAM2_UART_CLK           88900000
+#if defined(CONFIG_ARCH_UNIPHIER_PXS2)
+#define UNIPHIER_PXS2_UART_CLK         88900000
        cmp             r1, #0x2E
        bne             proxstream2_end
 
@@ -146,13 +146,13 @@ ph1_pro5_end:
        orr             r1, r1, #SC_CLKCTRL_CEN_PERI
        str             r1, [r0]
 
-       ldr             r3, =DIV_ROUND(PROXSTREAM2_UART_CLK, 16 * BAUDRATE)
+       ldr             r3, =DIV_ROUND(UNIPHIER_PXS2_UART_CLK, 16 * BAUDRATE)
 
        b               init_uart
 proxstream2_end:
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
-#define PH1_LD6B_UART_CLK              88900000
+#if defined(CONFIG_ARCH_UNIPHIER_LD6B)
+#define UNIPHIER_LD6B_UART_CLK         88900000
        cmp             r1, #0x2F
        bne             ph1_ld6b_end
 
@@ -170,7 +170,7 @@ proxstream2_end:
        orr             r1, r1, #SC_CLKCTRL_CEN_PERI
        str             r1, [r0]
 
-       ldr             r3, =DIV_ROUND(PH1_LD6B_UART_CLK, 16 * BAUDRATE)
+       ldr             r3, =DIV_ROUND(UNIPHIER_LD6B_UART_CLK, 16 * BAUDRATE)
 
        b               init_uart
 ph1_ld6b_end:
index b8b0323cd283d26a23dd76be6308091ea9e9b95d..02107b376ac81f17415d9f2ca3f8bb6840dee4ad 100644 (file)
@@ -2,6 +2,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD3)   += bcu-ph1-sld3.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD4)    += bcu-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD8)   += bcu-ph1-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD3)       += bcu-sld3.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD4)                += bcu-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD8)       += bcu-ld4.o
index 824da25ac77ebd05256697ac5f34a93f869eb583..8e568ee3cdd423bf0568368dd6bc55a79d2e4873 100644 (file)
@@ -13,50 +13,50 @@ int board_early_init_f(void)
        led_puts("U0");
 
        switch (uniphier_get_soc_type()) {
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3)
-       case SOC_UNIPHIER_PH1_SLD3:
+#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
+       case SOC_UNIPHIER_SLD3:
                ph1_sld3_pin_init();
                led_puts("U1");
                ph1_ld4_clk_init();
                break;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD4)
-       case SOC_UNIPHIER_PH1_LD4:
+#if defined(CONFIG_ARCH_UNIPHIER_LD4)
+       case SOC_UNIPHIER_LD4:
                ph1_ld4_pin_init();
                led_puts("U1");
                ph1_ld4_clk_init();
                break;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO4)
-       case SOC_UNIPHIER_PH1_PRO4:
+#if defined(CONFIG_ARCH_UNIPHIER_PRO4)
+       case SOC_UNIPHIER_PRO4:
                ph1_pro4_pin_init();
                led_puts("U1");
                ph1_pro4_clk_init();
                break;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8)
-       case SOC_UNIPHIER_PH1_SLD8:
+#if defined(CONFIG_ARCH_UNIPHIER_SLD8)
+       case SOC_UNIPHIER_SLD8:
                ph1_sld8_pin_init();
                led_puts("U1");
                ph1_ld4_clk_init();
                break;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5)
-       case SOC_UNIPHIER_PH1_PRO5:
+#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
+       case SOC_UNIPHIER_PRO5:
                ph1_pro5_pin_init();
                led_puts("U1");
                ph1_pro5_clk_init();
                break;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PROXSTREAM2)
-       case SOC_UNIPHIER_PROXSTREAM2:
+#if defined(CONFIG_ARCH_UNIPHIER_PXS2)
+       case SOC_UNIPHIER_PXS2:
                proxstream2_pin_init();
                led_puts("U1");
                proxstream2_clk_init();
                break;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
-       case SOC_UNIPHIER_PH1_LD6B:
+#if defined(CONFIG_ARCH_UNIPHIER_LD6B)
+       case SOC_UNIPHIER_LD6B:
                ph1_ld6b_pin_init();
                led_puts("U1");
                proxstream2_clk_init();
index 408aff0cd0bbb268877274b6c82a89509f90b3d1..5e98c3f33b770926c40766216c87e07629ae0888 100644 (file)
@@ -12,7 +12,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3)
+#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
 static const struct uniphier_board_data ph1_sld3_data = {
        .dram_freq = 1600,
        .dram_nr_ch = 3,
@@ -34,7 +34,7 @@ static const struct uniphier_board_data ph1_sld3_data = {
 };
 #endif
 
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD4)
+#if defined(CONFIG_ARCH_UNIPHIER_LD4)
 static const struct uniphier_board_data ph1_ld4_data = {
        .dram_freq = 1600,
        .dram_nr_ch = 2,
@@ -52,7 +52,7 @@ static const struct uniphier_board_data ph1_ld4_data = {
 };
 #endif
 
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO4)
+#if defined(CONFIG_ARCH_UNIPHIER_PRO4)
 /* 1GB RAM board */
 static const struct uniphier_board_data ph1_pro4_data = {
        .dram_freq = 1600,
@@ -86,7 +86,7 @@ static const struct uniphier_board_data ph1_pro4_2g_data = {
 };
 #endif
 
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8)
+#if defined(CONFIG_ARCH_UNIPHIER_SLD8)
 static const struct uniphier_board_data ph1_sld8_data = {
        .dram_freq = 1333,
        .dram_nr_ch = 2,
@@ -104,7 +104,7 @@ static const struct uniphier_board_data ph1_sld8_data = {
 };
 #endif
 
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5)
+#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
 static const struct uniphier_board_data ph1_pro5_data = {
        .dram_freq = 1866,
        .dram_nr_ch = 2,
@@ -121,7 +121,7 @@ static const struct uniphier_board_data ph1_pro5_data = {
 };
 #endif
 
-#if defined(CONFIG_ARCH_UNIPHIER_PROXSTREAM2)
+#if defined(CONFIG_ARCH_UNIPHIER_PXS2)
 static const struct uniphier_board_data proxstream2_data = {
        .dram_freq = 2133,
        .dram_nr_ch = 3,
@@ -143,7 +143,7 @@ static const struct uniphier_board_data proxstream2_data = {
 };
 #endif
 
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
+#if defined(CONFIG_ARCH_UNIPHIER_LD6B)
 static const struct uniphier_board_data ph1_ld6b_data = {
        .dram_freq = 1866,
        .dram_nr_ch = 3,
@@ -171,27 +171,27 @@ struct uniphier_board_id {
 };
 
 static const struct uniphier_board_id uniphier_boards[] = {
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3)
+#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
        { "socionext,ph1-sld3", &ph1_sld3_data, },
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD4)
+#if defined(CONFIG_ARCH_UNIPHIER_LD4)
        { "socionext,ph1-ld4", &ph1_ld4_data, },
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO4)
+#if defined(CONFIG_ARCH_UNIPHIER_PRO4)
        { "socionext,ph1-pro4-ace", &ph1_pro4_2g_data, },
        { "socionext,ph1-pro4-sanji", &ph1_pro4_2g_data, },
        { "socionext,ph1-pro4", &ph1_pro4_data, },
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8)
+#if defined(CONFIG_ARCH_UNIPHIER_SLD8)
        { "socionext,ph1-sld8", &ph1_sld8_data, },
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5)
+#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
        { "socionext,ph1-pro5", &ph1_pro5_data, },
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PROXSTREAM2)
+#if defined(CONFIG_ARCH_UNIPHIER_PXS2)
        { "socionext,proxstream2", &proxstream2_data, },
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
+#if defined(CONFIG_ARCH_UNIPHIER_LD6B)
        { "socionext,ph1-ld6b", &ph1_ld6b_data, },
 #endif
 };
index be0de8f9a98943cac460cad776bbe67c9ab33b2d..278df64ad5b00278d9b62e3ab7d9aa1db6f2ec4e 100644 (file)
@@ -4,12 +4,12 @@
 
 obj-y                                  += boot-mode.o
 
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD3)   += boot-mode-ph1-sld3.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD4)    += boot-mode-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_PRO4)   += boot-mode-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD8)   += boot-mode-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_PRO5)   += boot-mode-ph1-pro5.o
-obj-$(CONFIG_ARCH_UNIPHIER_PROXSTREAM2)        += boot-mode-proxstream2.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD6B)   += boot-mode-proxstream2.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD3)       += boot-mode-sld3.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD4)                += boot-mode-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_PRO4)       += boot-mode-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD8)       += boot-mode-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_PRO5)       += boot-mode-pro5.o
+obj-$(CONFIG_ARCH_UNIPHIER_PXS2)       += boot-mode-pxs2.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD6B)       += boot-mode-pxs2.o
 
 obj-$(CONFIG_CMD_PINMON) += cmd_pinmon.o
similarity index 98%
rename from arch/arm/mach-uniphier/boot-mode/boot-mode-ph1-ld4.c
rename to arch/arm/mach-uniphier/boot-mode/boot-mode-ld4.c
index 8334373f08ce0a996cc65442045d193a9084ec8f..ef52d69584fe6ed12818cc9920efec9c3800b71a 100644 (file)
@@ -43,7 +43,7 @@ struct boot_device_info boot_device_table[] = {
        {BOOT_DEVICE_NONE, "Reserved"},
        {BOOT_DEVICE_NONE, "Reserved"},
        {BOOT_DEVICE_NONE, "Reserved"},
-       {BOOT_DEVICE_NONE, "Reserved"},
+       {BOOT_DEVICE_NOR,  "NOR Boot"},
 };
 
 static int get_boot_mode_sel(void)
similarity index 99%
rename from arch/arm/mach-uniphier/boot-mode/boot-mode-ph1-sld3.c
rename to arch/arm/mach-uniphier/boot-mode/boot-mode-sld3.c
index b0f3f9a805daecf22e08536b33c8a66b72c4378d..0258fae47af35287baf9570c04db1b3c7d622560 100644 (file)
@@ -12,7 +12,7 @@
 #include "boot-device.h"
 
 static struct boot_device_info boot_device_table[] = {
-       {BOOT_DEVICE_NONE, "Reserved"},
+       {BOOT_DEVICE_NOR,  "NOR boot"},
        {BOOT_DEVICE_NONE, "External Master"},
        {BOOT_DEVICE_NONE, "Reserved"},
        {BOOT_DEVICE_NONE, "Reserved"},
index cf39bf57e9201b01af56dc5ff2f97bc0e7e4b148..317a4f126c61df468d1a7535702abd737e3dcb25 100644 (file)
@@ -19,26 +19,24 @@ u32 spl_boot_device_raw(void)
                return BOOT_DEVICE_NOR;
 
        switch (uniphier_get_soc_type()) {
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3)
-       case SOC_UNIPHIER_PH1_SLD3:
+#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
+       case SOC_UNIPHIER_SLD3:
                return ph1_sld3_boot_device();
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD4) || \
-       defined(CONFIG_ARCH_UNIPHIER_PH1_PRO4) || \
-       defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8)
-       case SOC_UNIPHIER_PH1_LD4:
-       case SOC_UNIPHIER_PH1_PRO4:
-       case SOC_UNIPHIER_PH1_SLD8:
+#if defined(CONFIG_ARCH_UNIPHIER_LD4) || defined(CONFIG_ARCH_UNIPHIER_PRO4) || \
+       defined(CONFIG_ARCH_UNIPHIER_SLD8)
+       case SOC_UNIPHIER_LD4:
+       case SOC_UNIPHIER_PRO4:
+       case SOC_UNIPHIER_SLD8:
                return ph1_ld4_boot_device();
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5)
-       case SOC_UNIPHIER_PH1_PRO5:
+#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
+       case SOC_UNIPHIER_PRO5:
                return ph1_pro5_boot_device();
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PROXSTREAM2) || \
-       defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
-       case SOC_UNIPHIER_PROXSTREAM2:
-       case SOC_UNIPHIER_PH1_LD6B:
+#if defined(CONFIG_ARCH_UNIPHIER_PXS2) || defined(CONFIG_ARCH_UNIPHIER_LD6B)
+       case SOC_UNIPHIER_PXS2:
+       case SOC_UNIPHIER_LD6B:
                return proxstream2_boot_device();
 #endif
        default:
index 3ff756b7ddab2f03f0e81c4b508ba5be316cb46e..3a66e2b40180645ec392fad9e70f1883743c39c3 100644 (file)
@@ -15,29 +15,27 @@ static int do_pinmon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        printf("Boot Swap: %s\n\n", boot_is_swapped() ? "ON" : "OFF");
 
        switch (uniphier_get_soc_type()) {
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3)
-       case SOC_UNIPHIER_PH1_SLD3:
+#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
+       case SOC_UNIPHIER_SLD3:
                ph1_sld3_boot_mode_show();
                break;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD4) || \
-       defined(CONFIG_ARCH_UNIPHIER_PH1_PRO4) || \
-       defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8)
-       case SOC_UNIPHIER_PH1_LD4:
-       case SOC_UNIPHIER_PH1_PRO4:
-       case SOC_UNIPHIER_PH1_SLD8:
+#if defined(CONFIG_ARCH_UNIPHIER_LD4) || defined(CONFIG_ARCH_UNIPHIER_PRO4) || \
+       defined(CONFIG_ARCH_UNIPHIER_SLD8)
+       case SOC_UNIPHIER_LD4:
+       case SOC_UNIPHIER_PRO4:
+       case SOC_UNIPHIER_SLD8:
                ph1_ld4_boot_mode_show();
                break;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5)
-       case SOC_UNIPHIER_PH1_PRO5:
+#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
+       case SOC_UNIPHIER_PRO5:
                ph1_pro5_boot_mode_show();
                break;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PROXSTREAM2) || \
-       defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
-       case SOC_UNIPHIER_PROXSTREAM2:
-       case SOC_UNIPHIER_PH1_LD6B:
+#if defined(CONFIG_ARCH_UNIPHIER_PXS2) || defined(CONFIG_ARCH_UNIPHIER_LD6B)
+       case SOC_UNIPHIER_PXS2:
+       case SOC_UNIPHIER_LD6B:
                proxstream2_boot_mode_show();
                break;
 #endif
index bc0f27c3983a2a71fe1a0884cbb8629df4e6dadf..1d736a5c0fa28229fff8fd6fafd8fe053d889f88 100644 (file)
@@ -2,10 +2,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD3)   += clk-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD4)    += clk-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_PRO4)   += clk-ph1-pro4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD8)   += clk-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_PRO5)   += clk-ph1-pro5.o
-obj-$(CONFIG_ARCH_UNIPHIER_PROXSTREAM2)        += clk-proxstream2.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD6B)   += clk-proxstream2.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD3)       += clk-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD4)                += clk-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_PRO4)       += clk-pro4.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD8)       += clk-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_PRO5)       += clk-pro5.o
+obj-$(CONFIG_ARCH_UNIPHIER_PXS2)       += clk-pxs2.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD6B)       += clk-pxs2.o
diff --git a/arch/arm/mach-uniphier/debug-uart/Makefile b/arch/arm/mach-uniphier/debug-uart/Makefile
new file mode 100644 (file)
index 0000000..0bad718
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+ifdef CONFIG_SPL_BUILD
+obj-$(CONFIG_ARCH_UNIPHIER_SLD3)       += debug-uart-sld3.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD4)                += debug-uart-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_PRO4)       += debug-uart-pro4.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD8)       += debug-uart-sld8.o
+obj-$(CONFIG_ARCH_UNIPHIER_PRO5)       += debug-uart-pro5.o
+obj-$(CONFIG_ARCH_UNIPHIER_PXS2)       += debug-uart-pxs2.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD6B)       += debug-uart-ld6b.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD11)       += debug-uart-ld20.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD20)       += debug-uart-ld20.o
+endif
+
+obj-y                                  += debug-uart.o
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart-ld20.c b/arch/arm/mach-uniphier/debug-uart/debug-uart-ld20.c
new file mode 100644 (file)
index 0000000..2dc2bf8
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <config.h>
+#include <linux/kernel.h>
+#include <linux/io.h>
+
+#include "../sc64-regs.h"
+#include "../sg-regs.h"
+#include "debug-uart.h"
+
+#define UNIPHIER_LD20_UART_CLK         58820000
+
+unsigned int uniphier_ld20_debug_uart_init(void)
+{
+       u32 tmp;
+
+       sg_set_iectrl(54);              /* TXD0 */
+       sg_set_iectrl(58);              /* TXD1 */
+       sg_set_iectrl(90);              /* TXD2 */
+       sg_set_iectrl(94);              /* TXD3 */
+       sg_set_pinsel(54, 0, 8, 4);     /* TXD0 -> TXD0 */
+       sg_set_pinsel(58, 1, 8, 4);     /* SPITXD1 -> TXD1 */
+       sg_set_pinsel(90, 1, 8, 4);     /* PC0WE -> TXD2 */
+       sg_set_pinsel(94, 1, 8, 4);     /* PCD00 -> TXD3 */
+
+       tmp = readl(SC_CLKCTRL4);
+       tmp |= SC_CLKCTRL4_PERI;
+       writel(tmp, SC_CLKCTRL4);
+
+       return DIV_ROUND_CLOSEST(UNIPHIER_LD20_UART_CLK, 16 * CONFIG_BAUDRATE);
+}
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart-ld4.c b/arch/arm/mach-uniphier/debug-uart/debug-uart-ld4.c
new file mode 100644 (file)
index 0000000..d5f1234
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <config.h>
+#include <linux/kernel.h>
+
+#include "../sg-regs.h"
+#include "debug-uart.h"
+
+#define UNIPHIER_LD4_UART_CLK          36864000
+
+unsigned int uniphier_ld4_debug_uart_init(void)
+{
+       sg_set_iectrl(0);
+       sg_set_pinsel(88, 1, 8, 4);     /* HSDOUT6 -> TXD0 */
+
+       return DIV_ROUND_CLOSEST(UNIPHIER_LD4_UART_CLK, 16 * CONFIG_BAUDRATE);
+}
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart-ld6b.c b/arch/arm/mach-uniphier/debug-uart/debug-uart-ld6b.c
new file mode 100644 (file)
index 0000000..50879f5
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <config.h>
+#include <linux/kernel.h>
+#include <linux/io.h>
+
+#include "../sc-regs.h"
+#include "../sg-regs.h"
+#include "debug-uart.h"
+
+#define UNIPHIER_LD6B_UART_CLK         88888888
+
+unsigned int uniphier_ld6b_debug_uart_init(void)
+{
+       u32 tmp;
+
+       sg_set_iectrl(0);
+       sg_set_pinsel(135, 3, 8, 4);    /* PORT10 -> TXD0 */
+       sg_set_pinsel(115, 0, 8, 4);    /* TXD1 -> TXD1 */
+       sg_set_pinsel(113, 2, 8, 4);    /* SBO0 -> TXD2 */
+
+       tmp = readl(SC_CLKCTRL);
+       tmp |= SC_CLKCTRL_CEN_PERI;
+       writel(tmp, SC_CLKCTRL);
+
+       return DIV_ROUND_CLOSEST(UNIPHIER_LD6B_UART_CLK, 16 * CONFIG_BAUDRATE);
+}
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart-pro4.c b/arch/arm/mach-uniphier/debug-uart/debug-uart-pro4.c
new file mode 100644 (file)
index 0000000..91998ec
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <config.h>
+#include <linux/kernel.h>
+#include <linux/io.h>
+
+#include "../sc-regs.h"
+#include "../sg-regs.h"
+#include "debug-uart.h"
+
+#define UNIPHIER_PRO4_UART_CLK         73728000
+
+unsigned int uniphier_pro4_debug_uart_init(void)
+{
+       u32 tmp;
+
+       sg_set_iectrl(0);
+       sg_set_pinsel(128, 0, 4, 8);    /* TXD0 -> TXD0 */
+
+       writel(1, SG_LOADPINCTRL);
+
+       tmp = readl(SC_CLKCTRL);
+       tmp |= SC_CLKCTRL_CEN_PERI;
+       writel(tmp, SC_CLKCTRL);
+
+       return DIV_ROUND_CLOSEST(UNIPHIER_PRO4_UART_CLK, 16 * CONFIG_BAUDRATE);
+}
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart-pro5.c b/arch/arm/mach-uniphier/debug-uart/debug-uart-pro5.c
new file mode 100644 (file)
index 0000000..5390396
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <config.h>
+#include <linux/kernel.h>
+#include <linux/io.h>
+
+#include "../sc-regs.h"
+#include "../sg-regs.h"
+#include "debug-uart.h"
+
+#define UNIPHIER_PRO5_UART_CLK         73728000
+
+unsigned int uniphier_pro5_debug_uart_init(void)
+{
+       u32 tmp;
+
+       sg_set_iectrl(0);
+       sg_set_pinsel(47, 0, 4, 8);     /* TXD0 -> TXD0 */
+       sg_set_pinsel(49, 0, 4, 8);     /* TXD1 -> TXD1 */
+       sg_set_pinsel(51, 0, 4, 8);     /* TXD2 -> TXD2 */
+       sg_set_pinsel(53, 0, 4, 8);     /* TXD3 -> TXD3 */
+
+       writel(1, SG_LOADPINCTRL);
+
+       tmp = readl(SC_CLKCTRL);
+       tmp |= SC_CLKCTRL_CEN_PERI;
+       writel(tmp, SC_CLKCTRL);
+
+       return DIV_ROUND_CLOSEST(UNIPHIER_PRO5_UART_CLK, 16 * CONFIG_BAUDRATE);
+}
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart-pxs2.c b/arch/arm/mach-uniphier/debug-uart/debug-uart-pxs2.c
new file mode 100644 (file)
index 0000000..22a200a
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <config.h>
+#include <linux/kernel.h>
+#include <linux/io.h>
+
+#include "../sc-regs.h"
+#include "../sg-regs.h"
+#include "debug-uart.h"
+
+#define UNIPHIER_PXS2_UART_CLK         88888888
+
+unsigned int uniphier_pxs2_debug_uart_init(void)
+{
+       u32 tmp;
+
+       sg_set_iectrl(0);
+       sg_set_pinsel(217, 8, 8, 4);    /* TXD0 -> TXD0 */
+       sg_set_pinsel(115, 8, 8, 4);    /* TXD1 -> TXD1 */
+       sg_set_pinsel(113, 8, 8, 4);    /* TXD2 -> TXD2 */
+       sg_set_pinsel(219, 8, 8, 4);    /* TXD3 -> TXD3 */
+
+       tmp = readl(SC_CLKCTRL);
+       tmp |= SC_CLKCTRL_CEN_PERI;
+       writel(tmp, SC_CLKCTRL);
+
+       return DIV_ROUND_CLOSEST(UNIPHIER_PXS2_UART_CLK, 16 * CONFIG_BAUDRATE);
+}
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart-sld3.c b/arch/arm/mach-uniphier/debug-uart/debug-uart-sld3.c
new file mode 100644 (file)
index 0000000..508318a
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <config.h>
+#include <linux/kernel.h>
+#include <linux/io.h>
+
+#include "../bcu/bcu-regs.h"
+#include "../sc-regs.h"
+#include "../sg-regs.h"
+#include "debug-uart.h"
+
+#define UNIPHIER_SLD3_UART_CLK         36864000
+
+unsigned int uniphier_sld3_debug_uart_init(void)
+{
+       u32 tmp;
+
+       sg_set_pinsel(64, 1, 4, 4);     /* TXD0 -> TXD0 */
+
+       writel(0x24440000, BCSCR5);
+
+       tmp = readl(SC_CLKCTRL);
+       tmp |= SC_CLKCTRL_CEN_PERI;
+       writel(tmp, SC_CLKCTRL);
+
+       return DIV_ROUND_CLOSEST(UNIPHIER_SLD3_UART_CLK, 16 * CONFIG_BAUDRATE);
+}
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart-sld8.c b/arch/arm/mach-uniphier/debug-uart/debug-uart-sld8.c
new file mode 100644 (file)
index 0000000..68d390c
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <config.h>
+#include <linux/kernel.h>
+
+#include "../sg-regs.h"
+#include "debug-uart.h"
+
+#define UNIPHIER_SLD8_UART_CLK         80000000
+
+unsigned int uniphier_sld8_debug_uart_init(void)
+{
+       sg_set_iectrl(0);
+       sg_set_pinsel(70, 3, 8, 4);     /* HSDOUT6 -> TXD0 */
+
+       return DIV_ROUND_CLOSEST(UNIPHIER_SLD8_UART_CLK, 16 * CONFIG_BAUDRATE);
+}
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart.c b/arch/arm/mach-uniphier/debug-uart/debug-uart.c
new file mode 100644 (file)
index 0000000..d884785
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <debug_uart.h>
+#include <linux/io.h>
+#include <linux/serial_reg.h>
+
+#include "../soc-info.h"
+#include "debug-uart.h"
+
+#define UNIPHIER_UART_TX               0x00
+#define UNIPHIER_UART_LCR_MCR          0x10
+#define UNIPHIER_UART_LSR              0x14
+#define UNIPHIER_UART_LDR              0x24
+
+static void _debug_uart_putc(int c)
+{
+       void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE;
+
+       while (!(readl(base + UNIPHIER_UART_LSR) & UART_LSR_THRE))
+               ;
+
+       writel(c, base + UNIPHIER_UART_TX);
+}
+
+void _debug_uart_init(void)
+{
+       void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE;
+       unsigned int divisor;
+
+       switch (uniphier_get_soc_type()) {
+#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
+       case SOC_UNIPHIER_SLD3:
+               divisor = uniphier_sld3_debug_uart_init();
+               break;
+#endif
+#if defined(CONFIG_ARCH_UNIPHIER_LD4)
+       case SOC_UNIPHIER_LD4:
+               divisor = uniphier_ld4_debug_uart_init();
+               break;
+#endif
+#if defined(CONFIG_ARCH_UNIPHIER_PRO4)
+       case SOC_UNIPHIER_PRO4:
+               divisor = uniphier_pro4_debug_uart_init();
+               break;
+#endif
+#if defined(CONFIG_ARCH_UNIPHIER_SLD8)
+       case SOC_UNIPHIER_SLD8:
+               divisor = uniphier_sld8_debug_uart_init();
+               break;
+#endif
+#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
+       case SOC_UNIPHIER_PRO5:
+               divisor = uniphier_pro5_debug_uart_init();
+               break;
+#endif
+#if defined(CONFIG_ARCH_UNIPHIER_PXS2)
+       case SOC_UNIPHIER_PXS2:
+               divisor = uniphier_pxs2_debug_uart_init();
+               break;
+#endif
+#if defined(CONFIG_ARCH_UNIPHIER_LD6B)
+       case SOC_UNIPHIER_LD6B:
+               divisor = uniphier_ld6b_debug_uart_init();
+               break;
+#endif
+#if defined(CONFIG_ARCH_UNIPHIER_LD11) || defined(CONFIG_ARCH_UNIPHIER_LD20)
+       case SOC_UNIPHIER_LD11:
+       case SOC_UNIPHIER_LD20:
+               divisor = uniphier_ld20_debug_uart_init();
+               break;
+#endif
+       default:
+               return;
+       }
+
+       writel(UART_LCR_WLEN8 << 8, base + UNIPHIER_UART_LCR_MCR);
+
+       writel(divisor, base + UNIPHIER_UART_LDR);
+}
+DEBUG_UART_FUNCS
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart.h b/arch/arm/mach-uniphier/debug-uart/debug-uart.h
new file mode 100644 (file)
index 0000000..8de9124
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef _MACH_DEBUG_UART_H
+#define _MACH_DEBUG_UART_H
+
+unsigned int uniphier_sld3_debug_uart_init(void);
+unsigned int uniphier_ld4_debug_uart_init(void);
+unsigned int uniphier_pro4_debug_uart_init(void);
+unsigned int uniphier_sld8_debug_uart_init(void);
+unsigned int uniphier_pro5_debug_uart_init(void);
+unsigned int uniphier_pxs2_debug_uart_init(void);
+unsigned int uniphier_ld6b_debug_uart_init(void);
+unsigned int uniphier_ld11_debug_uart_init(void);
+unsigned int uniphier_ld20_debug_uart_init(void);
+
+#endif /* _MACH_DEBUG_UART_H */
index 3d1553cbe14f5d2bd13ca6df5f1ea79b27195eae..615ba2cce9e17a454c61b6fadfc02de8df29bb35 100644 (file)
@@ -4,14 +4,14 @@
 
 ifdef CONFIG_SPL_BUILD
 
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD4)    += umc-ph1-ld4.o \
-                                          ddrphy-training.o ddrphy-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_PRO4)   += umc-ph1-pro4.o \
-                                          ddrphy-training.o ddrphy-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD8)   += umc-ph1-sld8.o \
-                                          ddrphy-training.o ddrphy-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PROXSTREAM2)        += umc-proxstream2.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD6B)   += umc-proxstream2.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD4)                += umc-ld4.o \
+                                          ddrphy-training.o ddrphy-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_PRO4)       += umc-pro4.o \
+                                          ddrphy-training.o ddrphy-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD8)       += umc-sld8.o \
+                                          ddrphy-training.o ddrphy-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_PXS2)       += umc-pxs2.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD6B)       += umc-pxs2.o
 
 else
 
index 078eb6f71b4d31c152da0c858bb1f378952466c2..7a9f76caeb7e7e3e78ef2896d0024d363729437d 100644 (file)
@@ -5,8 +5,11 @@
  */
 
 #include <common.h>
+#include <mapmem.h>
 #include <linux/io.h>
+#include <linux/sizes.h>
 
+#include "../soc-info.h"
 #include "ddrphy-regs.h"
 
 /* Select either decimal or hexadecimal */
 /* field separator */
 #define FS "   "
 
+static unsigned long uniphier_ld4_base[] = {
+       0x5bc01000,
+       0x5be01000,
+       0 /* sentinel */
+};
+
+static unsigned long uniphier_pro4_base[] = {
+       0x5bc01000,
+       0x5be01000,
+       0 /* sentinel */
+};
+
+static unsigned long uniphier_sld8_base[] = {
+       0x5bc01000,
+       0x5be01000,
+       0 /* sentinel */
+};
+
 static u32 read_bdl(struct ddrphy_datx8 __iomem *dx, int index)
 {
        return (readl(&dx->bdlr[index / 5]) >> (index % 5 * 6)) & 0x3f;
 }
 
-static void dump_loop(void (*callback)(struct ddrphy_datx8 __iomem *))
+static void dump_loop(unsigned long *base,
+                     void (*callback)(struct ddrphy_datx8 __iomem *))
 {
-       int ch, p, dx;
        struct ddrphy __iomem *phy;
+       int p, dx;
 
-       for (ch = 0; ch < NR_DDRCH; ch++) {
-               for (p = 0; p < NR_DDRPHY_PER_CH; p++) {
-                       phy = (struct ddrphy __iomem *)DDRPHY_BASE(ch, p);
+       for (p = 0; *base; base++, p++) {
+               phy = map_sysmem(*base, SZ_4K);
 
-                       for (dx = 0; dx < NR_DATX8_PER_DDRPHY; dx++) {
-                               printf("CH%dP%dDX%d:", ch, p, dx);
-                               (*callback)(&phy->dx[dx]);
-                               printf("\n");
-                       }
+               for (dx = 0; dx < NR_DATX8_PER_DDRPHY; dx++) {
+                       printf("PHY%dDX%d:", p, dx);
+                       (*callback)(&phy->dx[dx]);
+                       printf("\n");
                }
+
+               unmap_sysmem(phy);
        }
 }
 
@@ -51,12 +73,12 @@ static void __wbdl_dump(struct ddrphy_datx8 __iomem *dx)
        printf(FS "(+" PRINTF_FORMAT ")", readl(&dx->lcdlr[1]) & 0xff);
 }
 
-static void wbdl_dump(void)
+static void wbdl_dump(unsigned long *base)
 {
        printf("\n--- Write Bit Delay Line ---\n");
        printf("           DQ0  DQ1  DQ2  DQ3  DQ4  DQ5  DQ6  DQ7   DM  DQS  (WDQD)\n");
 
-       dump_loop(&__wbdl_dump);
+       dump_loop(base, &__wbdl_dump);
 }
 
 static void __rbdl_dump(struct ddrphy_datx8 __iomem *dx)
@@ -69,12 +91,12 @@ static void __rbdl_dump(struct ddrphy_datx8 __iomem *dx)
        printf(FS "(+" PRINTF_FORMAT ")", (readl(&dx->lcdlr[1]) >> 8) & 0xff);
 }
 
-static void rbdl_dump(void)
+static void rbdl_dump(unsigned long *base)
 {
        printf("\n--- Read Bit Delay Line ---\n");
        printf("           DQ0  DQ1  DQ2  DQ3  DQ4  DQ5  DQ6  DQ7   DM  (RDQSD)\n");
 
-       dump_loop(&__rbdl_dump);
+       dump_loop(base, &__rbdl_dump);
 }
 
 static void __wld_dump(struct ddrphy_datx8 __iomem *dx)
@@ -92,12 +114,12 @@ static void __wld_dump(struct ddrphy_datx8 __iomem *dx)
        }
 }
 
-static void wld_dump(void)
+static void wld_dump(unsigned long *base)
 {
        printf("\n--- Write Leveling Delay ---\n");
        printf("            Rank0   Rank1   Rank2   Rank3\n");
 
-       dump_loop(&__wld_dump);
+       dump_loop(base, &__wld_dump);
 }
 
 static void __dqsgd_dump(struct ddrphy_datx8 __iomem *dx)
@@ -114,12 +136,12 @@ static void __dqsgd_dump(struct ddrphy_datx8 __iomem *dx)
        }
 }
 
-static void dqsgd_dump(void)
+static void dqsgd_dump(unsigned long *base)
 {
        printf("\n--- DQS Gating Delay ---\n");
        printf("            Rank0   Rank1   Rank2   Rank3\n");
 
-       dump_loop(&__dqsgd_dump);
+       dump_loop(base, &__dqsgd_dump);
 }
 
 static void __mdl_dump(struct ddrphy_datx8 __iomem *dx)
@@ -130,90 +152,106 @@ static void __mdl_dump(struct ddrphy_datx8 __iomem *dx)
                printf(FS PRINTF_FORMAT, (mdl >> (8 * i)) & 0xff);
 }
 
-static void mdl_dump(void)
+static void mdl_dump(unsigned long *base)
 {
        printf("\n--- Master Delay Line ---\n");
        printf("          IPRD TPRD MDLD\n");
 
-       dump_loop(&__mdl_dump);
+       dump_loop(base, &__mdl_dump);
 }
 
 #define REG_DUMP(x) \
        { u32 __iomem *p = &phy->x; printf("%3d: %-10s: %p : %08x\n", \
                                        p - (u32 *)phy, #x, p, readl(p)); }
 
-static void reg_dump(void)
+static void reg_dump(unsigned long *base)
 {
-       int ch, p;
        struct ddrphy __iomem *phy;
+       int p;
 
        printf("\n--- DDR PHY registers ---\n");
 
-       for (ch = 0; ch < NR_DDRCH; ch++) {
-               for (p = 0; p < NR_DDRPHY_PER_CH; p++) {
-                       printf("== Ch%d, PHY%d ==\n", ch, p);
-                       printf(" No: Name      : Address  : Data\n");
-
-                       phy = (struct ddrphy __iomem *)DDRPHY_BASE(ch, p);
-
-                       REG_DUMP(ridr);
-                       REG_DUMP(pir);
-                       REG_DUMP(pgcr[0]);
-                       REG_DUMP(pgcr[1]);
-                       REG_DUMP(pgsr[0]);
-                       REG_DUMP(pgsr[1]);
-                       REG_DUMP(pllcr);
-                       REG_DUMP(ptr[0]);
-                       REG_DUMP(ptr[1]);
-                       REG_DUMP(ptr[2]);
-                       REG_DUMP(ptr[3]);
-                       REG_DUMP(ptr[4]);
-                       REG_DUMP(acmdlr);
-                       REG_DUMP(acbdlr);
-                       REG_DUMP(dxccr);
-                       REG_DUMP(dsgcr);
-                       REG_DUMP(dcr);
-                       REG_DUMP(dtpr[0]);
-                       REG_DUMP(dtpr[1]);
-                       REG_DUMP(dtpr[2]);
-                       REG_DUMP(mr0);
-                       REG_DUMP(mr1);
-                       REG_DUMP(mr2);
-                       REG_DUMP(mr3);
-                       REG_DUMP(dx[0].gcr);
-                       REG_DUMP(dx[0].gtr);
-                       REG_DUMP(dx[1].gcr);
-                       REG_DUMP(dx[1].gtr);
-               }
+       for (p = 0; *base; base++, p++) {
+               phy = map_sysmem(*base, SZ_4K);
+
+               printf("== PHY%d (base: %p) ==\n", p, phy);
+               printf(" No: Name      : Address  : Data\n");
+
+               REG_DUMP(ridr);
+               REG_DUMP(pir);
+               REG_DUMP(pgcr[0]);
+               REG_DUMP(pgcr[1]);
+               REG_DUMP(pgsr[0]);
+               REG_DUMP(pgsr[1]);
+               REG_DUMP(pllcr);
+               REG_DUMP(ptr[0]);
+               REG_DUMP(ptr[1]);
+               REG_DUMP(ptr[2]);
+               REG_DUMP(ptr[3]);
+               REG_DUMP(ptr[4]);
+               REG_DUMP(acmdlr);
+               REG_DUMP(acbdlr);
+               REG_DUMP(dxccr);
+               REG_DUMP(dsgcr);
+               REG_DUMP(dcr);
+               REG_DUMP(dtpr[0]);
+               REG_DUMP(dtpr[1]);
+               REG_DUMP(dtpr[2]);
+               REG_DUMP(mr0);
+               REG_DUMP(mr1);
+               REG_DUMP(mr2);
+               REG_DUMP(mr3);
+               REG_DUMP(dx[0].gcr);
+               REG_DUMP(dx[0].gtr);
+               REG_DUMP(dx[1].gcr);
+               REG_DUMP(dx[1].gtr);
+
+               unmap_sysmem(phy);
        }
 }
 
 static int do_ddr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        char *cmd = argv[1];
+       unsigned long *base;
+
+       switch (uniphier_get_soc_type()) {
+       case SOC_UNIPHIER_LD4:
+               base = uniphier_ld4_base;
+               break;
+       case SOC_UNIPHIER_PRO4:
+               base = uniphier_pro4_base;
+               break;
+       case SOC_UNIPHIER_SLD8:
+               base = uniphier_sld8_base;
+               break;
+       default:
+               printf("unsupported SoC\n");
+               return CMD_RET_FAILURE;
+       }
 
        if (argc == 1)
                cmd = "all";
 
        if (!strcmp(cmd, "wbdl") || !strcmp(cmd, "all"))
-               wbdl_dump();
+               wbdl_dump(base);
 
        if (!strcmp(cmd, "rbdl") || !strcmp(cmd, "all"))
-               rbdl_dump();
+               rbdl_dump(base);
 
        if (!strcmp(cmd, "wld") || !strcmp(cmd, "all"))
-               wld_dump();
+               wld_dump(base);
 
        if (!strcmp(cmd, "dqsgd") || !strcmp(cmd, "all"))
-               dqsgd_dump();
+               dqsgd_dump(base);
 
        if (!strcmp(cmd, "mdl") || !strcmp(cmd, "all"))
-               mdl_dump();
+               mdl_dump(base);
 
        if (!strcmp(cmd, "reg") || !strcmp(cmd, "all"))
-               reg_dump();
+               reg_dump(base);
 
-       return 0;
+       return CMD_RET_SUCCESS;
 }
 
 U_BOOT_CMD(
index 87f6d0d3a25fb5a4a6c64c4a44777b8ef47b7ac2..a1d51cedf3bef1fb15bf3d5d88d3edff7254a514 100644 (file)
@@ -158,17 +158,6 @@ struct ddrphy {
 /* SoC-specific parameters */
 #define NR_DATX8_PER_DDRPHY    2
 
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD4) || \
-       defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8)
-#define NR_DDRPHY_PER_CH               1
-#else
-#define NR_DDRPHY_PER_CH               2
-#endif
-
-#define NR_DDRCH               2
-
-#define DDRPHY_BASE(ch, phy)   (0x5bc01000 + 0x200000 * (ch) + 0x1000 * (phy))
-
 #ifndef __ASSEMBLY__
 int ph1_ld4_ddrphy_init(struct ddrphy __iomem *phy, int freq, bool ddr3plus);
 void ddrphy_prepare_training(struct ddrphy __iomem *phy, int rank);
index 3e1e1b2bc8eb55f1aeebee2f99badc3159be1383..59058cdb1ffb7f3848bfc6b962a9b7ed2d58ab3d 100644 (file)
@@ -2,10 +2,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD3)   += early-clk-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD4)    += early-clk-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_PRO4)   += early-clk-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD8)   += early-clk-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_PRO5)   += early-clk-ph1-pro5.o
-obj-$(CONFIG_ARCH_UNIPHIER_PROXSTREAM2)        += early-clk-proxstream2.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD6B)   += early-clk-proxstream2.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD3)       += early-clk-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD4)                += early-clk-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_PRO4)       += early-clk-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD8)       += early-clk-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_PRO5)       += early-clk-pro5.o
+obj-$(CONFIG_ARCH_UNIPHIER_PXS2)       += early-clk-pxs2.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD6B)       += early-clk-pxs2.o
index 3be71fbf07c4391a700c09ead754d6b5abeebab0..dc4064c05bcb07e4f6538c8e669d97f8add3ef6d 100644 (file)
@@ -2,4 +2,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD3)   += early-pinctrl-ph1-sld3.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD3)       += early-pinctrl-sld3.o
index e969fd0c4ed638a5437af97aa5a80c56d3a77090..cef9d621c9d5dbe6f087863cecd39420f0508ccd 100644 (file)
@@ -34,27 +34,33 @@ int ph1_pro5_init(const struct uniphier_board_data *bd);
 int proxstream2_init(const struct uniphier_board_data *bd);
 
 #if defined(CONFIG_MICRO_SUPPORT_CARD)
-int ph1_sld3_sbc_init(const struct uniphier_board_data *bd);
-int ph1_ld4_sbc_init(const struct uniphier_board_data *bd);
-int ph1_pro4_sbc_init(const struct uniphier_board_data *bd);
-int proxstream2_sbc_init(const struct uniphier_board_data *bd);
+int sbc_admulti_init(const struct uniphier_board_data *bd);
+int sbc_savepin_init(const struct uniphier_board_data *bd);
+int uniphier_sld3_sbc_init(const struct uniphier_board_data *bd);
+int uniphier_ld4_sbc_init(const struct uniphier_board_data *bd);
+int uniphier_pxs2_sbc_init(const struct uniphier_board_data *bd);
 #else
-static inline int ph1_sld3_sbc_init(const struct uniphier_board_data *bd)
+static inline int sbc_admulti_init(const struct uniphier_board_data *bd)
 {
        return 0;
 }
 
-static inline int ph1_ld4_sbc_init(const struct uniphier_board_data *bd)
+static inline int sbc_savepin_init(const struct uniphier_board_data *bd)
 {
        return 0;
 }
 
-static inline int ph1_pro4_sbc_init(const struct uniphier_board_data *bd)
+static inline int uniphier_sld3_sbc_init(const struct uniphier_board_data *bd)
 {
        return 0;
 }
 
-static inline int proxstream2_sbc_init(const struct uniphier_board_data *bd)
+static inline int uniphier_ld4_sbc_init(const struct uniphier_board_data *bd)
+{
+       return 0;
+}
+
+static inline int uniphier_pxs2_sbc_init(const struct uniphier_board_data *bd)
 {
        return 0;
 }
index ef8095362366244a075b563803977fb4dca545c7..34b15e342722794fbc4e8d823838f9b507ed575e 100644 (file)
@@ -4,10 +4,10 @@
 
 obj-y                                  += init.o
 
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD3)   += init-ph1-sld3.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD4)    += init-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_PRO4)   += init-ph1-pro4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD8)   += init-ph1-sld8.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_PRO5)   += init-ph1-pro5.o
-obj-$(CONFIG_ARCH_UNIPHIER_PROXSTREAM2)        += init-proxstream2.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD6B)   += init-proxstream2.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD3)       += init-sld3.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD4)                += init-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_PRO4)       += init-pro4.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD8)       += init-sld8.o
+obj-$(CONFIG_ARCH_UNIPHIER_PRO5)       += init-pro5.o
+obj-$(CONFIG_ARCH_UNIPHIER_PXS2)       += init-pxs2.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD6B)       += init-pxs2.o
similarity index 93%
rename from arch/arm/mach-uniphier/init/init-ph1-ld4.c
rename to arch/arm/mach-uniphier/init/init-ld4.c
index a9c6d72e0b63c4f2994d77392285254088d2766f..5295cd03163eaf163dbd440e224f1da6e7dfcc0f 100644 (file)
@@ -14,7 +14,8 @@ int ph1_ld4_init(const struct uniphier_board_data *bd)
 {
        ph1_ld4_bcu_init(bd);
 
-       ph1_ld4_sbc_init(bd);
+       sbc_savepin_init(bd);
+       uniphier_ld4_sbc_init(bd);
 
        support_card_reset();
 
similarity index 96%
rename from arch/arm/mach-uniphier/init/init-ph1-pro4.c
rename to arch/arm/mach-uniphier/init/init-pro4.c
index 6fcd8b6c857963cc1366ec7a857d2288808eeb2d..456fb48bd7136c60353a83500dc64c854f046cb6 100644 (file)
@@ -12,7 +12,7 @@
 
 int ph1_pro4_init(const struct uniphier_board_data *bd)
 {
-       ph1_pro4_sbc_init(bd);
+       sbc_savepin_init(bd);
 
        support_card_reset();
 
similarity index 95%
rename from arch/arm/mach-uniphier/init/init-ph1-pro5.c
rename to arch/arm/mach-uniphier/init/init-pro5.c
index 45c65cf49a7495da0e745d0ed238a619459484bf..c2c68031b4075550d349f55ee76e2038c79d4080 100644 (file)
@@ -12,7 +12,7 @@
 
 int ph1_pro5_init(const struct uniphier_board_data *bd)
 {
-       ph1_pro4_sbc_init(bd);
+       sbc_savepin_init(bd);
 
        support_card_reset();
 
similarity index 92%
rename from arch/arm/mach-uniphier/init/init-proxstream2.c
rename to arch/arm/mach-uniphier/init/init-pxs2.c
index 029c54499791c04e2fb9d0eeb9ee42277ad20ca1..2d4b6fbb9bf5feaacb6ad2f11da167979dcfc71e 100644 (file)
@@ -14,7 +14,8 @@ int proxstream2_init(const struct uniphier_board_data *bd)
 {
        int ret;
 
-       proxstream2_sbc_init(bd);
+       sbc_savepin_init(bd);
+       uniphier_pxs2_sbc_init(bd);
 
        support_card_reset();
 
similarity index 93%
rename from arch/arm/mach-uniphier/init/init-ph1-sld3.c
rename to arch/arm/mach-uniphier/init/init-sld3.c
index 7827ec0bdc4b4140d02cbbb99068da6360dbc780..c48126fd1cae78644403c67615c9d1d10a970f81 100644 (file)
@@ -14,7 +14,8 @@ int ph1_sld3_init(const struct uniphier_board_data *bd)
 {
        ph1_sld3_bcu_init(bd);
 
-       ph1_sld3_sbc_init(bd);
+       sbc_admulti_init(bd);
+       uniphier_sld3_sbc_init(bd);
 
        support_card_reset();
 
similarity index 93%
rename from arch/arm/mach-uniphier/init/init-ph1-sld8.c
rename to arch/arm/mach-uniphier/init/init-sld8.c
index 6c96aede2ae4c6b85dd94ac8b761ead228d1ca86..1f31ca697bbbba254bfea14eacff3225b861ffdc 100644 (file)
@@ -14,7 +14,8 @@ int ph1_sld8_init(const struct uniphier_board_data *bd)
 {
        ph1_ld4_bcu_init(bd);
 
-       ph1_ld4_sbc_init(bd);
+       sbc_savepin_init(bd);
+       uniphier_ld4_sbc_init(bd);
 
        support_card_reset();
 
index b30f3bd9d62619d4aef10b4900161cda70fd40af..7316d51df51f336c2ab95ec6edf4153dc059c17d 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <debug_uart.h>
 #include <spl.h>
 
 #include "../init.h"
@@ -14,40 +15,43 @@ void spl_board_init(void)
 {
        const struct uniphier_board_data *param;
 
+#ifdef CONFIG_DEBUG_UART
+       debug_uart_init();
+#endif
+
        param = uniphier_get_board_param();
        if (!param)
                hang();
 
        switch (uniphier_get_soc_type()) {
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3)
-       case SOC_UNIPHIER_PH1_SLD3:
+#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
+       case SOC_UNIPHIER_SLD3:
                ph1_sld3_init(param);
                break;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD4)
-       case SOC_UNIPHIER_PH1_LD4:
+#if defined(CONFIG_ARCH_UNIPHIER_LD4)
+       case SOC_UNIPHIER_LD4:
                ph1_ld4_init(param);
                break;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO4)
-       case SOC_UNIPHIER_PH1_PRO4:
+#if defined(CONFIG_ARCH_UNIPHIER_PRO4)
+       case SOC_UNIPHIER_PRO4:
                ph1_pro4_init(param);
                break;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8)
-       case SOC_UNIPHIER_PH1_SLD8:
+#if defined(CONFIG_ARCH_UNIPHIER_SLD8)
+       case SOC_UNIPHIER_SLD8:
                ph1_sld8_init(param);
                break;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5)
-       case SOC_UNIPHIER_PH1_PRO5:
+#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
+       case SOC_UNIPHIER_PRO5:
                ph1_pro5_init(param);
                break;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PROXSTREAM2) || \
-       defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
-       case SOC_UNIPHIER_PROXSTREAM2:
-       case SOC_UNIPHIER_PH1_LD6B:
+#if defined(CONFIG_ARCH_UNIPHIER_PXS2) || defined(CONFIG_ARCH_UNIPHIER_LD6B)
+       case SOC_UNIPHIER_PXS2:
+       case SOC_UNIPHIER_LD6B:
                proxstream2_init(param);
                break;
 #endif
index a152f612660e1ebcdc6d5af026a0c96159eecd42..78bb677dd48840ad17f0386aafb860a92f10e22e 100644 (file)
@@ -3,6 +3,6 @@
 #
 
 obj-y                                  += memconf.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD3)   += memconf-ph1-sld3.o
-obj-$(CONFIG_ARCH_UNIPHIER_PROXSTREAM2)        += memconf-proxstream2.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD6B)   += memconf-proxstream2.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD3)       += memconf-sld3.o
+obj-$(CONFIG_ARCH_UNIPHIER_PXS2)       += memconf-pxs2.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD6B)       += memconf-pxs2.o
index f7a37e3e4c649a64c87c3b32f33c0c49c3e29102..eeb515aa006f34aaf073b14f2d9f29dbe892c666 100644 (file)
  */
 void support_card_reset_deassert(void)
 {
-       writel(0, MICRO_SUPPORT_CARD_RESET);
+       writel(0x00010000, MICRO_SUPPORT_CARD_RESET);
 }
 
 void support_card_reset(void)
 {
-       writel(3, MICRO_SUPPORT_CARD_RESET);
+       writel(0x00020003, MICRO_SUPPORT_CARD_RESET);
 }
 
 static int support_card_show_revision(void)
index 80a9cdaa80242921498afbc37899b24b5b00f1a0..5504c24c3d4996327212456f99a068f32c7f44fb 100644 (file)
@@ -2,10 +2,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD3)   += pinctrl-ph1-sld3.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD4)    += pinctrl-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_PRO4)   += pinctrl-ph1-pro4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD8)   += pinctrl-ph1-sld8.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_PRO5)   += pinctrl-ph1-pro5.o
-obj-$(CONFIG_ARCH_UNIPHIER_PROXSTREAM2)        += pinctrl-proxstream2.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD6B)   += pinctrl-ph1-ld6b.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD3)       += pinctrl-sld3.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD4)                += pinctrl-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_PRO4)       += pinctrl-pro4.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD8)       += pinctrl-sld8.o
+obj-$(CONFIG_ARCH_UNIPHIER_PRO5)       += pinctrl-pro5.o
+obj-$(CONFIG_ARCH_UNIPHIER_PXS2)       += pinctrl-pxs2.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD6B)       += pinctrl-ld6b.o
index ca88521a1d22a973b980cc3606306a28b35b9f70..63f169ccc342ebbe1842f397f7c70200f3dcd7b9 100644 (file)
@@ -2,11 +2,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD3)   += pll-init-ph1-sld3.o \
-                                          pll-spectrum-ph1-sld3.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD4)    += pll-init-ph1-ld4.o \
-                                          pll-spectrum-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_PRO4)   += pll-init-ph1-pro4.o \
-                                          pll-spectrum-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD8)   += pll-init-ph1-sld8.o \
-                                          pll-spectrum-ph1-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD3)       += pll-init-sld3.o pll-spectrum-sld3.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD4)                += pll-init-ld4.o pll-spectrum-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_PRO4)       += pll-init-pro4.o pll-spectrum-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD8)       += pll-init-sld8.o pll-spectrum-ld4.o
index 57eb44b646e7e9465f312f6776f3fb34d2501a97..e515af9439ec908c0966ef2f1d67f173c2555c9b 100644 (file)
@@ -2,10 +2,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD3)   += sbc-ph1-sld3.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD4)    += sbc-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_PRO4)   += sbc-ph1-pro4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD8)   += sbc-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_PRO5)   += sbc-ph1-pro4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PROXSTREAM2)        += sbc-proxstream2.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD6B)   += sbc-proxstream2.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD3)       += sbc-admulti.o sbc-sld3.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD4)                += sbc-savepin.o sbc-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_PRO4)       += sbc-savepin.o
+obj-$(CONFIG_ARCH_UNIPHIER_SLD8)       += sbc-savepin.o sbc-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_PRO5)       += sbc-savepin.o
+obj-$(CONFIG_ARCH_UNIPHIER_PXS2)       += sbc-savepin.o sbc-pxs2.o
+obj-$(CONFIG_ARCH_UNIPHIER_LD6B)       += sbc-savepin.o sbc-pxs2.o
similarity index 75%
rename from arch/arm/mach-uniphier/sbc/sbc-ph1-sld3.c
rename to arch/arm/mach-uniphier/sbc/sbc-admulti.c
index c03c2843a65a273e6b3468abd80bc6d617702f74..8e9f8ebbf458e1a0e95fb5ce0310e7fe32dbf6c7 100644 (file)
 #include "../sg-regs.h"
 #include "sbc-regs.h"
 
-int ph1_sld3_sbc_init(const struct uniphier_board_data *bd)
-{
-       /* only address/data multiplex mode is supported */
+#define SBCTRL0_ADMULTIPLX_PERI_VALUE  0x33120000
+#define SBCTRL1_ADMULTIPLX_PERI_VALUE  0x03005500
+#define SBCTRL2_ADMULTIPLX_PERI_VALUE  0x14000020
+
+#define SBCTRL0_ADMULTIPLX_MEM_VALUE   0x33120000
+#define SBCTRL1_ADMULTIPLX_MEM_VALUE   0x03005500
+#define SBCTRL2_ADMULTIPLX_MEM_VALUE   0x14000010
 
+int sbc_admulti_init(const struct uniphier_board_data *bd)
+{
        /*
         * Only CS1 is connected to support card.
         * BKSZ[1:0] should be set to "01".
@@ -43,7 +49,5 @@ int ph1_sld3_sbc_init(const struct uniphier_board_data *bd)
                writel(0x0200be01, SBBASE1);
        }
 
-       sg_set_pinsel(99, 1, 4, 4);     /* GPIO26 -> EA24 */
-
        return 0;
 }
diff --git a/arch/arm/mach-uniphier/sbc/sbc-ld4.c b/arch/arm/mach-uniphier/sbc/sbc-ld4.c
new file mode 100644 (file)
index 0000000..12bee79
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2011-2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <linux/io.h>
+
+#include "../init.h"
+#include "sbc-regs.h"
+
+int uniphier_ld4_sbc_init(const struct uniphier_board_data *bd)
+{
+       u32 tmp;
+
+       /* system bus output enable */
+       tmp = readl(PC0CTRL);
+       tmp &= 0xfffffcff;
+       writel(tmp, PC0CTRL);
+
+       return 0;
+}
diff --git a/arch/arm/mach-uniphier/sbc/sbc-ph1-pro4.c b/arch/arm/mach-uniphier/sbc/sbc-ph1-pro4.c
deleted file mode 100644 (file)
index 8313c5a..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2011-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <linux/io.h>
-
-#include "../init.h"
-#include "../sg-regs.h"
-#include "sbc-regs.h"
-
-int ph1_pro4_sbc_init(const struct uniphier_board_data *bd)
-{
-       /*
-        * Only CS1 is connected to support card.
-        * BKSZ[1:0] should be set to "01".
-        */
-       writel(SBCTRL0_SAVEPIN_PERI_VALUE, SBCTRL10);
-       writel(SBCTRL1_SAVEPIN_PERI_VALUE, SBCTRL11);
-       writel(SBCTRL2_SAVEPIN_PERI_VALUE, SBCTRL12);
-       writel(SBCTRL4_SAVEPIN_PERI_VALUE, SBCTRL14);
-
-       if (boot_is_swapped()) {
-               /*
-                * Boot Swap On: boot from external NOR/SRAM
-                * 0x42000000-0x43ffffff is a mirror of 0x40000000-0x41ffffff.
-                *
-                * 0x40000000-0x41efffff, 0x42000000-0x43efffff: memory bank
-                * 0x41f00000-0x41ffffff, 0x43f00000-0x43ffffff: peripherals
-                */
-               writel(0x0000bc01, SBBASE0);
-       } else {
-               /*
-                * Boot Swap Off: boot from mask ROM
-                * 0x40000000-0x41ffffff: mask ROM
-                * 0x42000000-0x43efffff: memory bank (31MB)
-                * 0x43f00000-0x43ffffff: peripherals (1MB)
-                */
-               writel(0x0000be01, SBBASE0); /* dummy */
-               writel(0x0200be01, SBBASE1);
-       }
-
-       return 0;
-}
diff --git a/arch/arm/mach-uniphier/sbc/sbc-proxstream2.c b/arch/arm/mach-uniphier/sbc/sbc-proxstream2.c
deleted file mode 100644 (file)
index 0d9ffe1..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <linux/io.h>
-
-#include "../init.h"
-#include "../sg-regs.h"
-#include "sbc-regs.h"
-
-int proxstream2_sbc_init(const struct uniphier_board_data *bd)
-{
-       /* necessary for ROM boot ?? */
-       /* system bus output enable */
-       writel(0x17, PC0CTRL);
-
-       /*
-        * Only CS1 is connected to support card.
-        * BKSZ[1:0] should be set to "01".
-        */
-       writel(SBCTRL0_SAVEPIN_PERI_VALUE, SBCTRL10);
-       writel(SBCTRL1_SAVEPIN_PERI_VALUE, SBCTRL11);
-       writel(SBCTRL2_SAVEPIN_PERI_VALUE, SBCTRL12);
-       writel(SBCTRL4_SAVEPIN_PERI_VALUE, SBCTRL14);
-
-       if (boot_is_swapped()) {
-               /*
-                * Boot Swap On: boot from external NOR/SRAM
-                * 0x42000000-0x43ffffff is a mirror of 0x40000000-0x41ffffff.
-                *
-                * 0x40000000-0x41efffff, 0x42000000-0x43efffff: memory bank
-                * 0x41f00000-0x41ffffff, 0x43f00000-0x43ffffff: peripherals
-                */
-               writel(0x0000bc01, SBBASE0);
-       } else {
-               /*
-                * Boot Swap Off: boot from mask ROM
-                * 0x40000000-0x41ffffff: mask ROM
-                * 0x42000000-0x43efffff: memory bank (31MB)
-                * 0x43f00000-0x43ffffff: peripherals (1MB)
-                */
-               writel(0x0000be01, SBBASE0); /* dummy */
-               writel(0x0200be01, SBBASE1);
-       }
-
-       return 0;
-}
diff --git a/arch/arm/mach-uniphier/sbc/sbc-pxs2.c b/arch/arm/mach-uniphier/sbc/sbc-pxs2.c
new file mode 100644 (file)
index 0000000..acbf4c5
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2015-2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <linux/io.h>
+
+#include "../init.h"
+#include "sbc-regs.h"
+
+int uniphier_pxs2_sbc_init(const struct uniphier_board_data *bd)
+{
+       /* necessary for ROM boot ?? */
+       /* system bus output enable */
+       writel(0x17, PC0CTRL);
+
+       return 0;
+}
index 493363bb6427be87ee9cdbb5edf76a5c741b636b..a5dca74a55b929b4c64aa807f5a6ec76c1db7dde 100644 (file)
 #define        SBCTRL73                SBCTRL(7, 3)
 #define        SBCTRL74                (SBCTRL_BASE + 0x170)
 
-/* slower but LED works */
-#define SBCTRL0_SAVEPIN_PERI_VALUE     0x55450000
-#define SBCTRL1_SAVEPIN_PERI_VALUE     0x07168d00
-#define SBCTRL2_SAVEPIN_PERI_VALUE     0x34000009
-#define SBCTRL4_SAVEPIN_PERI_VALUE     0x02110110
-
-/* faster but LED does not work */
-#define SBCTRL0_SAVEPIN_MEM_VALUE      0x55450000
-#define SBCTRL1_SAVEPIN_MEM_VALUE      0x06057700
-/* NOR flash needs more wait counts than SRAM */
-#define SBCTRL2_SAVEPIN_MEM_VALUE      0x34000009
-#define SBCTRL4_SAVEPIN_MEM_VALUE      0x02110210
-
-#define SBCTRL0_ADMULTIPLX_PERI_VALUE  0x33120000
-#define SBCTRL1_ADMULTIPLX_PERI_VALUE  0x03005500
-#define SBCTRL2_ADMULTIPLX_PERI_VALUE  0x14000020
-
-#define SBCTRL0_ADMULTIPLX_MEM_VALUE   0x33120000
-#define SBCTRL1_ADMULTIPLX_MEM_VALUE   0x03005500
-#define SBCTRL2_ADMULTIPLX_MEM_VALUE   0x14000010
-
 #define PC0CTRL                                0x598000c0
 #define ROM_BOOT_ROMRSV2               0x59801208
 
similarity index 62%
rename from arch/arm/mach-uniphier/sbc/sbc-ph1-ld4.c
rename to arch/arm/mach-uniphier/sbc/sbc-savepin.c
index fcce43cb99594b3feb9b7e798ea07c6a09cfb077..e3e3daa68811fac7de16750e31510dca69c60135 100644 (file)
@@ -1,25 +1,29 @@
 /*
- * Copyright (C) 2011-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2011-2016 Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
-#include <common.h>
 #include <linux/io.h>
 
 #include "../init.h"
-#include "../sg-regs.h"
 #include "sbc-regs.h"
 
-int ph1_ld4_sbc_init(const struct uniphier_board_data *bd)
-{
-       u32 tmp;
+/* slower but LED works */
+#define SBCTRL0_SAVEPIN_PERI_VALUE     0x55450000
+#define SBCTRL1_SAVEPIN_PERI_VALUE     0x07168d00
+#define SBCTRL2_SAVEPIN_PERI_VALUE     0x34000009
+#define SBCTRL4_SAVEPIN_PERI_VALUE     0x02110110
 
-       /* system bus output enable */
-       tmp = readl(PC0CTRL);
-       tmp &= 0xfffffcff;
-       writel(tmp, PC0CTRL);
+/* faster but LED does not work */
+#define SBCTRL0_SAVEPIN_MEM_VALUE      0x55450000
+#define SBCTRL1_SAVEPIN_MEM_VALUE      0x06057700
+/* NOR flash needs more wait counts than SRAM */
+#define SBCTRL2_SAVEPIN_MEM_VALUE      0x34000009
+#define SBCTRL4_SAVEPIN_MEM_VALUE      0x02110210
 
+int sbc_savepin_init(const struct uniphier_board_data *bd)
+{
        /*
         * Only CS1 is connected to support card.
         * BKSZ[1:0] should be set to "01".
diff --git a/arch/arm/mach-uniphier/sbc/sbc-sld3.c b/arch/arm/mach-uniphier/sbc/sbc-sld3.c
new file mode 100644 (file)
index 0000000..ac9d030
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2011-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <linux/io.h>
+
+#include "../init.h"
+#include "../sg-regs.h"
+
+int uniphier_sld3_sbc_init(const struct uniphier_board_data *bd)
+{
+       sg_set_pinsel(99, 1, 4, 4);     /* GPIO26 -> EA24 */
+
+       return 0;
+}
index 474b82d24309143fe41c83cdcd4e782b9fb914dd..a0955893ef774cc215eff2c92b45862776091f7f 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef ARCH_SC_REGS_H
 #define ARCH_SC_REGS_H
 
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3)
+#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
 #define SC_BASE_ADDR                   0xf1840000
 #else
 #define SC_BASE_ADDR                   0x61840000
diff --git a/arch/arm/mach-uniphier/sc64-regs.h b/arch/arm/mach-uniphier/sc64-regs.h
new file mode 100644 (file)
index 0000000..ef02830
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * UniPhier SC (System Control) block registers for ARMv8 SoCs
+ *
+ * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef SC64_REGS_H
+#define SC64_REGS_H
+
+#define SC_BASE_ADDR           0x61840000
+
+#define SC_RSTCTRL             (SC_BASE_ADDR | 0x2000)
+#define SC_RSTCTRL3            (SC_BASE_ADDR | 0x2008)
+#define SC_RSTCTRL4            (SC_BASE_ADDR | 0x200c)
+#define   SC_RSTCTRL4_ETHER            (1 << 6)
+#define   SC_RSTCTRL4_NAND             (1 << 0)
+#define SC_RSTCTRL5            (SC_BASE_ADDR | 0x2010)
+#define SC_RSTCTRL6            (SC_BASE_ADDR | 0x2014)
+#define SC_RSTCTRL7            (SC_BASE_ADDR | 0x2018)
+#define   SC_RSTCTRL7_UMCSB            (1 << 16)
+#define   SC_RSTCTRL7_UMCA2            (1 << 10)
+#define   SC_RSTCTRL7_UMCA1            (1 << 9)
+#define   SC_RSTCTRL7_UMCA0            (1 << 8)
+#define   SC_RSTCTRL7_UMC32            (1 << 2)
+#define   SC_RSTCTRL7_UMC31            (1 << 1)
+#define   SC_RSTCTRL7_UMC30            (1 << 0)
+
+#define SC_CLKCTRL             (SC_BASE_ADDR | 0x2100)
+#define SC_CLKCTRL3            (SC_BASE_ADDR | 0x2108)
+#define SC_CLKCTRL4            (SC_BASE_ADDR | 0x210c)
+#define   SC_CLKCTRL4_PERI             (1 << 7)
+#define   SC_CLKCTRL4_ETHER            (1 << 6)
+#define   SC_CLKCTRL4_NAND             (1 << 0)
+#define SC_CLKCTRL5            (SC_BASE_ADDR | 0x2110)
+#define SC_CLKCTRL6            (SC_BASE_ADDR | 0x2114)
+#define SC_CLKCTRL7            (SC_BASE_ADDR | 0x2118)
+#define   SC_CLKCTRL7_UMCSB            (1 << 16)
+#define   SC_CLKCTRL7_UMC32            (1 << 2)
+#define   SC_CLKCTRL7_UMC31            (1 << 1)
+#define   SC_CLKCTRL7_UMC30            (1 << 0)
+
+#endif /* SC64_REGS_H */
index 3a535c70b2d9534f2e2cfbe4a64e81951dcb1071..2cdc2db26efb2fa919a544d857cee3f3b507cdd2 100644 (file)
@@ -115,6 +115,17 @@ static inline void sg_set_pinsel(unsigned pin, unsigned muxval,
        writel(tmp, reg);
 }
 
+static inline void sg_set_iectrl(unsigned pin)
+{
+       unsigned bit = pin % 32;
+       unsigned long reg = SG_IECTRL + pin / 32 * 4;
+       u32 tmp;
+
+       tmp = readl(reg);
+       tmp |= 1 << bit;
+       writel(tmp, reg);
+}
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* ARCH_SG_REGS_H */
index 606094c80f463e224ad4aaec16aad0ed5e1d43a9..d9b38b3d2dc138324fd05c1510b56dd5d145534b 100644 (file)
@@ -8,28 +8,28 @@
 #define __MACH_SOC_INFO_H__
 
 enum uniphier_soc_id {
-       SOC_UNIPHIER_PH1_SLD3,
-       SOC_UNIPHIER_PH1_LD4,
-       SOC_UNIPHIER_PH1_PRO4,
-       SOC_UNIPHIER_PH1_SLD8,
-       SOC_UNIPHIER_PH1_PRO5,
-       SOC_UNIPHIER_PROXSTREAM2,
-       SOC_UNIPHIER_PH1_LD6B,
-       SOC_UNIPHIER_PH1_LD11,
-       SOC_UNIPHIER_PH1_LD20,
+       SOC_UNIPHIER_SLD3,
+       SOC_UNIPHIER_LD4,
+       SOC_UNIPHIER_PRO4,
+       SOC_UNIPHIER_SLD8,
+       SOC_UNIPHIER_PRO5,
+       SOC_UNIPHIER_PXS2,
+       SOC_UNIPHIER_LD6B,
+       SOC_UNIPHIER_LD11,
+       SOC_UNIPHIER_LD20,
        SOC_UNIPHIER_UNKNOWN,
 };
 
 #define UNIPHIER_NR_ENABLED_SOCS               \
-       IS_ENABLED(CONFIG_ARCH_UNIPHIER_PH1_SLD3) +     \
-       IS_ENABLED(CONFIG_ARCH_UNIPHIER_PH1_LD4) +      \
-       IS_ENABLED(CONFIG_ARCH_UNIPHIER_PH1_PRO4) +     \
-       IS_ENABLED(CONFIG_ARCH_UNIPHIER_PH1_SLD8) +     \
-       IS_ENABLED(CONFIG_ARCH_UNIPHIER_PH1_PRO5) +     \
-       IS_ENABLED(CONFIG_ARCH_UNIPHIER_PROXSTREAM2) +  \
-       IS_ENABLED(CONFIG_ARCH_UNIPHIER_PH1_LD6B) + \
-       IS_ENABLED(CONFIG_ARCH_UNIPHIER_PH1_LD11) + \
-       IS_ENABLED(CONFIG_ARCH_UNIPHIER_PH1_LD20)
+       IS_ENABLED(CONFIG_ARCH_UNIPHIER_SLD3) + \
+       IS_ENABLED(CONFIG_ARCH_UNIPHIER_LD4) +  \
+       IS_ENABLED(CONFIG_ARCH_UNIPHIER_PRO4) + \
+       IS_ENABLED(CONFIG_ARCH_UNIPHIER_SLD8) + \
+       IS_ENABLED(CONFIG_ARCH_UNIPHIER_PRO5) + \
+       IS_ENABLED(CONFIG_ARCH_UNIPHIER_PXS2) + \
+       IS_ENABLED(CONFIG_ARCH_UNIPHIER_LD6B) + \
+       IS_ENABLED(CONFIG_ARCH_UNIPHIER_LD11) + \
+       IS_ENABLED(CONFIG_ARCH_UNIPHIER_LD20)
 
 #define UNIPHIER_MULTI_SOC     ((UNIPHIER_NR_ENABLED_SOCS) > 1)
 
@@ -38,32 +38,32 @@ enum uniphier_soc_id uniphier_get_soc_type(void);
 #else
 static inline enum uniphier_soc_id uniphier_get_soc_type(void)
 {
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3)
-       return SOC_UNIPHIER_PH1_SLD3;
+#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
+       return SOC_UNIPHIER_SLD3;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD4)
-       return SOC_UNIPHIER_PH1_LD4;
+#if defined(CONFIG_ARCH_UNIPHIER_LD4)
+       return SOC_UNIPHIER_LD4;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO4)
-       return SOC_UNIPHIER_PH1_PRO4;
+#if defined(CONFIG_ARCH_UNIPHIER_PRO4)
+       return SOC_UNIPHIER_PRO4;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8)
-       return SOC_UNIPHIER_PH1_SLD8;
+#if defined(CONFIG_ARCH_UNIPHIER_SLD8)
+       return SOC_UNIPHIER_SLD8;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5)
-       return SOC_UNIPHIER_PH1_PRO5;
+#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
+       return SOC_UNIPHIER_PRO5;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PROXSTREAM2)
-       return SOC_UNIPHIER_PROXSTREAM2;
+#if defined(CONFIG_ARCH_UNIPHIER_PXS2)
+       return SOC_UNIPHIER_PXS2;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
-       return SOC_UNIPHIER_PH1_LD6B;
+#if defined(CONFIG_ARCH_UNIPHIER_LD6B)
+       return SOC_UNIPHIER_LD6B;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD11)
-       return SOC_UNIPHIER_PH1_LD11;
+#if defined(CONFIG_ARCH_UNIPHIER_LD11)
+       return SOC_UNIPHIER_LD11;
 #endif
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD20)
-       return SOC_UNIPHIER_PH1_LD20;
+#if defined(CONFIG_ARCH_UNIPHIER_LD20)
+       return SOC_UNIPHIER_LD20;
 #endif
 
        return SOC_UNIPHIER_UNKNOWN;
index 3cfc183723b041e9ec9fb55267ca7468492833b8..046104bd78d66a6426cdb279984dbe15b6c0fd32 100644 (file)
@@ -17,49 +17,49 @@ enum uniphier_soc_id uniphier_get_soc_type(void)
        enum uniphier_soc_id ret;
 
        switch ((revision & SG_REVISION_TYPE_MASK) >> SG_REVISION_TYPE_SHIFT) {
-#ifdef CONFIG_ARCH_UNIPHIER_PH1_SLD3
+#ifdef CONFIG_ARCH_UNIPHIER_SLD3
        case 0x25:
-               ret = SOC_UNIPHIER_PH1_SLD3;
+               ret = SOC_UNIPHIER_SLD3;
                break;
 #endif
-#ifdef CONFIG_ARCH_UNIPHIER_PH1_LD4
+#ifdef CONFIG_ARCH_UNIPHIER_LD4
        case 0x26:
-               ret = SOC_UNIPHIER_PH1_LD4;
+               ret = SOC_UNIPHIER_LD4;
                break;
 #endif
-#ifdef CONFIG_ARCH_UNIPHIER_PH1_PRO4
+#ifdef CONFIG_ARCH_UNIPHIER_PRO4
        case 0x28:
-               ret = SOC_UNIPHIER_PH1_PRO4;
+               ret = SOC_UNIPHIER_PRO4;
                break;
 #endif
-#ifdef CONFIG_ARCH_UNIPHIER_PH1_SLD8
+#ifdef CONFIG_ARCH_UNIPHIER_SLD8
        case 0x29:
-               ret = SOC_UNIPHIER_PH1_SLD8;
+               ret = SOC_UNIPHIER_SLD8;
                break;
 #endif
-#ifdef CONFIG_ARCH_UNIPHIER_PH1_PRO5
+#ifdef CONFIG_ARCH_UNIPHIER_PRO5
        case 0x2A:
-               ret = SOC_UNIPHIER_PH1_PRO5;
+               ret = SOC_UNIPHIER_PRO5;
                break;
 #endif
-#ifdef CONFIG_ARCH_UNIPHIER_PROXSTREAM2
+#ifdef CONFIG_ARCH_UNIPHIER_PXS2
        case 0x2E:
-               ret = SOC_UNIPHIER_PROXSTREAM2;
+               ret = SOC_UNIPHIER_PXS2;
                break;
 #endif
-#ifdef CONFIG_ARCH_UNIPHIER_PH1_LD6B
+#ifdef CONFIG_ARCH_UNIPHIER_LD6B
        case 0x2F:
-               ret = SOC_UNIPHIER_PH1_LD6B;
+               ret = SOC_UNIPHIER_LD6B;
                break;
 #endif
-#ifdef CONFIG_ARCH_UNIPHIER_PH1_LD11
+#ifdef CONFIG_ARCH_UNIPHIER_LD11
        case 0x31:
-               ret = SOC_UNIPHIER_PH1_LD11;
+               ret = SOC_UNIPHIER_LD11;
                break;
 #endif
-#ifdef CONFIG_ARCH_UNIPHIER_PH1_LD20
+#ifdef CONFIG_ARCH_UNIPHIER_LD20
        case 0x32:
-               ret = SOC_UNIPHIER_PH1_LD20;
+               ret = SOC_UNIPHIER_LD20;
                break;
 #endif
        default:
diff --git a/board/Marvell/db-88f6820-gp/binary.0 b/board/Marvell/db-88f6820-gp/binary.0
deleted file mode 100644 (file)
index 57a4cbf..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
---------
-WARNING:
---------
-This file should contain the bin_hdr generated by the original Marvell
-U-Boot implementation. As this is currently not included in this
-U-Boot version, we have added this placeholder, so that the U-Boot
-image can be generated without errors.
-
-If you have a known to be working bin_hdr for your board, then you
-just need to replace this text file here with the binary header
-and recompile U-Boot.
-
-In a few weeks, mainline U-Boot will get support to generate the
-bin_hdr with the DDR training code itself. By implementing this code
-as SPL U-Boot. Then this file will not be needed any more and will
-get removed.
index da4b6ff234d6ce2199a24d737d8687cd28b817ba..1fd7591f3325d9192923aff972dec85812c32ec1 100644 (file)
@@ -31,7 +31,7 @@ U_BOOT_DEVICE(bcm2835_gpios) = {
 };
 
 static const struct pl01x_serial_platdata serial_platdata = {
-#ifdef CONFIG_BCM2836
+#ifndef CONFIG_BCM2835
        .base = 0x3f201000,
 #else
        .base = 0x20201000,
index 5e9d3af336e1b7fea403cd30642d3748a30dc7e9..5e72fac7f97bf63fcedaff9309cb8f8421fe9eb2 100644 (file)
@@ -342,6 +342,12 @@ config USB2_VBUS_PIN
        ---help---
        See USB1_VBUS_PIN help text.
 
+config USB3_VBUS_PIN
+       string "Vbus enable pin for usb3 (ehci2)"
+       default ""
+       ---help---
+       See USB1_VBUS_PIN help text.
+
 config I2C0_ENABLE
        bool "Enable I2C/TWI controller 0"
        default y if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
index 739b6fdc88f0e651e8b88911e1654070f5efe2b4..5f2f4fed8a211d0e23a8153db131256e58d8677f 100644 (file)
@@ -7,6 +7,7 @@ F:      configs/A10-OLinuXino-Lime_defconfig
 F:     configs/ba10_tv_box_defconfig
 F:     configs/Chuwi_V7_CW0825_defconfig
 F:     configs/Cubieboard_defconfig
+F:     configs/dserve_dsrv9703c_defconfig
 F:     configs/Hyundai_A7HD_defconfig
 F:     configs/inet1_defconfig
 F:     configs/inet97fv2_defconfig
@@ -25,6 +26,7 @@ F:    configs/A13-OLinuXinoM_defconfig
 F:     configs/Auxtek-T003_defconfig
 F:     configs/Auxtek-T004_defconfig
 F:     configs/CHIP_defconfig
+F:     configs/difrnce_dit4350_defconfig
 F:     configs/Empire_electronix_d709_defconfig
 F:     configs/inet98v_rev2_defconfig
 F:     configs/mk802_a10s_defconfig
@@ -33,6 +35,7 @@ F:    configs/r7-tv-dongle_defconfig
 F:     configs/UTOO_P66_defconfig
 F:     configs/Wobo_i5_defconfig
 F:     include/configs/sun6i.h
+F:     configs/colorfly_e708_q1_defconfig
 F:     configs/CSQ_CS908_defconfig
 F:     configs/Mele_A1000G_quad_defconfig
 F:     configs/Mele_M9_defconfig
@@ -51,8 +54,10 @@ F:   configs/Wits_Pro_A20_DKT_defconfig
 F:     include/configs/sun8i.h
 F:     configs/ga10h_v1_1_defconfig
 F:     configs/gt90h_v4_defconfig
+F:     configs/orangepi_2_defconfig
 F:     configs/orangepi_pc_defconfig
 F:     configs/orangepi_plus_defconfig
+F:     configs/polaroid_mid2809pxe04_defconfig
 F:     configs/q8_a23_tablet_800x480_defconfig
 F:     configs/q8_a33_tablet_800x480_defconfig
 F:     configs/q8_a33_tablet_1024x600_defconfig
@@ -97,6 +102,11 @@ F:  include/configs/sun7i.h
 F:     configs/Cubieboard2_defconfig
 F:     configs/Cubietruck_defconfig
 
+CUBIETRUCK-PLUS BOARD
+M:     Chen-Yu Tsai <wens@csie.org>
+S:     Maintained
+F:     configs/Cubietruck_plus_defconfig
+
 GEMEI-G9 TABLET
 M:     Priit Laes <plaes@plaes.org>
 S:     Maintained
@@ -112,6 +122,16 @@ M: Chen-Yu Tsai <wens@csie.org>
 S:     Maintained
 F:     configs/Hummingbird_A31_defconfig
 
+ICnova-A20-SWAC BOARD
+M:     Stefan Roese <sr@denx.de>
+S:     Maintained
+F:     configs/icnova-a20-swac_defconfig
+
+ITEAD IBOX BOARD
+M:     Marcus Cooper <codekipper@gmail.com>
+S:     Maintained
+F:     configs/Itead_Ibox_A20_defconfig
+
 INET 3F BOARD
 M:     Paul Kocialkowski <contact@paulk.fr>
 S:     Maintained
@@ -177,6 +197,12 @@ M: Siarhei Siamashka <siarhei.siamashka@gmail.com>
 S:     Maintained
 F:     configs/MSI_Primo81_defconfig
 
+SINLINX SINA31s BOARD
+M:     Chen-Yu Tsai <wens@csie.org>
+S:     Maintained
+F:     configs/Sinlinx_SinA31s_defconfig
+W:     http://linux-sunxi.org/Sinlinx_SinA31s
+
 SINLINX SINA33 BOARD
 M:     Chen-Yu Tsai <wens@csie.org>
 S:     Maintained
@@ -197,3 +223,8 @@ YONES TOPTECH BD1078 BOARD
 M:     Paul Kocialkowski <contact@paulk.fr>
 S:     Maintained
 F:     configs/Yones_Toptech_BD1078_defconfig
+
+YONES TOPTECH BS1078 V2 BOARD
+M:     Peter Korsgaard <peter@korsgaard.com>
+S:     Maintained
+F:     configs/Yones_Toptech_BS1078_V2_defconfig
index 6d51b9b8e95b81ce6b84e1a982ce699b816a16de..522e54ab160e1c576c3beecf5beb773636b775d8 100644 (file)
@@ -72,14 +72,6 @@ static int sunxi_ahci_phy_init(u32 base)
 
 void scsi_init(void)
 {
-       printf("SUNXI SCSI INIT\n");
-#ifdef CONFIG_SATAPWR
-       gpio_request(CONFIG_SATAPWR, "satapwr");
-       gpio_direction_output(CONFIG_SATAPWR, 1);
-       /* Give attached sata device time to power-up to avoid link timeouts */
-       mdelay(500);
-#endif
-
        if (sunxi_ahci_phy_init(SUNXI_SATA_BASE) < 0)
                return;
 
index 80eae9cd48a635495089698924c9c0f5721b9bbf..2d5335f9531c27da59b8b4f9311ccf2a0199859a 100644 (file)
@@ -90,6 +90,15 @@ int board_init(void)
        if (ret)
                return ret;
 
+#ifdef CONFIG_SATAPWR
+       gpio_request(CONFIG_SATAPWR, "satapwr");
+       gpio_direction_output(CONFIG_SATAPWR, 1);
+#endif
+#ifdef CONFIG_MACPWR
+       gpio_request(CONFIG_MACPWR, "macpwr");
+       gpio_direction_output(CONFIG_MACPWR, 1);
+#endif
+
        /* Uses dm gpio code so do this here and not in i2c_init_board() */
        return soft_i2c_board_init();
 }
@@ -598,11 +607,14 @@ int misc_init_r(void)
 }
 #endif
 
-#ifdef CONFIG_OF_BOARD_SETUP
 int ft_board_setup(void *blob, bd_t *bd)
 {
+       int __maybe_unused r;
+
 #ifdef CONFIG_VIDEO_DT_SIMPLEFB
-       return sunxi_simplefb_setup(blob);
+       r = sunxi_simplefb_setup(blob);
+       if (r)
+               return r;
 #endif
+       return 0;
 }
-#endif /* CONFIG_OF_BOARD_SETUP */
index 4e222d88c0d3a9d543ace1f1c17665394f8f25cb..69eb8ff2d921170817b0e3d12c9ad9472c75045e 100644 (file)
@@ -6,7 +6,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/gpio.h>
 
-int sunxi_gmac_initialize(bd_t *bis)
+void eth_init_board(void)
 {
        int pin;
        struct sunxi_ccm_reg *const ccm =
@@ -79,16 +79,4 @@ int sunxi_gmac_initialize(bd_t *bis)
        for (pin = SUNXI_GPA(26); pin <= SUNXI_GPA(27); pin++)
                sunxi_gpio_set_cfgpin(pin, SUN6I_GPA_GMAC);
 #endif
-
-#ifdef CONFIG_DM_ETH
-       return 0;
-#else
-# ifdef CONFIG_RGMII
-       return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_RGMII);
-# elif defined CONFIG_GMII
-       return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_GMII);
-# else
-       return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_MII);
-# endif
-#endif
 }
index 9d5b39e696439bef79bf4801ce6df2f6548bb55c..ef5a519ada9c190c5abad7ff814ce3881cfc7657 100644 (file)
@@ -5,3 +5,4 @@
 #
 
 obj-y  := theadorable.o
+obj-y  += fpga.o
diff --git a/board/theadorable/fpga.c b/board/theadorable/fpga.c
new file mode 100644 (file)
index 0000000..6f068c3
--- /dev/null
@@ -0,0 +1,179 @@
+/*
+ * Copyright (C) 2016 Stefan Roese <sr@denx.de>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <altera.h>
+#include <errno.h>
+#include <asm/gpio.h>
+#include <asm/io.h>
+#include <asm/arch/cpu.h>
+#include <asm/arch/soc.h>
+#include <asm/arch-mvebu/spi.h>
+#include "theadorable.h"
+
+/*
+ * FPGA programming support
+ */
+static int fpga_pre_fn(int cookie)
+{
+       int gpio_config = COOKIE2CONFIG(cookie);
+       int gpio_done = COOKIE2DONE(cookie);
+       int ret;
+
+       debug("%s (%d): cookie=%08x gpio_config=%d gpio_done=%d\n",
+             __func__, __LINE__, cookie, gpio_config, gpio_done);
+
+       /* Configure config pin */
+       /* Set to output */
+       ret = gpio_request(gpio_config, "CONFIG");
+       if (ret < 0)
+               return ret;
+       gpio_direction_output(gpio_config, 1);
+
+       /* Configure done pin */
+       /* Set to input */
+       ret = gpio_request(gpio_done, "DONE");
+       if (ret < 0)
+               return ret;
+
+       gpio_direction_input(gpio_done);
+
+       return 0;
+}
+
+static int fpga_config_fn(int assert, int flush, int cookie)
+{
+       int gpio_config = COOKIE2CONFIG(cookie);
+
+       debug("%s (%d): cookie=%08x gpio_config=%d\n",
+             __func__, __LINE__, cookie, gpio_config);
+
+       if (assert)
+               gpio_set_value(gpio_config, 1);
+       else
+               gpio_set_value(gpio_config, 0);
+
+       return 0;
+}
+
+static int fpga_write_fn(const void *buf, size_t len, int flush, int cookie)
+{
+       int spi_bus = COOKIE2SPI_BUS(cookie);
+       int spi_dev = COOKIE2SPI_DEV(cookie);
+       struct kwspi_registers *reg;
+       u32 control_reg;
+       u32 config_reg;
+       void *dst;
+
+       /*
+        * Write data to FPGA attached to SPI bus via SPI direct write.
+        * This results in the fastest and easiest way to program the
+        * bitstream into the FPGA.
+        */
+       debug("%s (%d): cookie=%08x spi_bus=%d spi_dev=%d\n",
+             __func__, __LINE__, cookie, spi_bus, spi_dev);
+
+       if (spi_bus == 0) {
+               reg = (struct kwspi_registers *)MVEBU_REGISTER(0x10600);
+               dst = (void *)SPI_BUS0_DEV1_BASE;
+       } else {
+               reg = (struct kwspi_registers *)MVEBU_REGISTER(0x10680);
+               dst = (void *)SPI_BUS1_DEV2_BASE;
+       }
+
+       /* Configure SPI controller for direct access mode */
+       control_reg = readl(&reg->ctrl);
+       config_reg = readl(&reg->cfg);
+       writel(0x00000214, &reg->cfg);          /* 27MHz clock */
+       writel(0x00000000, &reg->dw_cfg);       /* don't de-asset CS */
+       writel(KWSPI_CSN_ACT, &reg->ctrl);      /* activate CS */
+
+       /* Copy data to the SPI direct mapped window */
+       memcpy(dst, buf, len);
+
+       /* Restore original register values */
+       writel(control_reg, &reg->ctrl);
+       writel(config_reg, &reg->cfg);
+
+       return 0;
+}
+
+/* Returns the state of CONF_DONE Pin */
+static int fpga_done_fn(int cookie)
+{
+       int gpio_done = COOKIE2DONE(cookie);
+       unsigned long ts;
+
+       debug("%s (%d): cookie=%08x gpio_done=%d\n",
+             __func__, __LINE__, cookie, gpio_done);
+
+       ts = get_timer(0);
+       do {
+               if (gpio_get_value(gpio_done))
+                       return 0;
+       } while (get_timer(ts) < 1000);
+
+       /* timeout so return error */
+       return -ENODEV;
+}
+
+static altera_board_specific_func stratixv_fns = {
+       .pre = fpga_pre_fn,
+       .config = fpga_config_fn,
+       .write = fpga_write_fn,
+       .done = fpga_done_fn,
+};
+
+static Altera_desc altera_fpga[] = {
+       {
+               /* Family */
+               Altera_StratixV,
+               /* Interface type */
+               passive_serial,
+               /* No limitation as additional data will be ignored */
+               -1,
+               /* Device function table */
+               (void *)&stratixv_fns,
+               /* Base interface address specified in driver */
+               NULL,
+               /* Cookie implementation */
+               /*
+                * In this 32bit word the following information is coded:
+                * Bit 31 ... Bit 0
+                * SPI-Bus | SPI-Dev | Config-Pin | Done-Pin
+                */
+               FPGA_COOKIE(0, 1, 26, 7)
+       },
+       {
+               /* Family */
+               Altera_StratixV,
+               /* Interface type */
+               passive_serial,
+               /* No limitation as additional data will be ignored */
+               -1,
+               /* Device function table */
+               (void *)&stratixv_fns,
+               /* Base interface address specified in driver */
+               NULL,
+               /* Cookie implementation */
+               /*
+                * In this 32bit word the following information is coded:
+                * Bit 31 ... Bit 0
+                * SPI-Bus | SPI-Dev | Config-Pin | Done-Pin
+                */
+               FPGA_COOKIE(1, 2, 29, 9)
+       },
+};
+
+/* Add device descriptor to FPGA device table */
+void board_fpga_add(void)
+{
+       int i;
+
+       fpga_init();
+       for (i = 0; i < ARRAY_SIZE(altera_fpga); i++)
+               fpga_add(fpga_altera, &altera_fpga[i]);
+}
index 0e232656fc906f05d95b84fd61797f39aa5dbda7..ee88a98a24169c0de3a0fef2592d1e89385aaf08 100644 (file)
@@ -8,9 +8,11 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/mbus.h>
 #ifdef CONFIG_NET
 #include <netdev.h>
 #endif
+#include "theadorable.h"
 
 #include "../drivers/ddr/marvell/axp/ddr3_hw_training.h"
 #include "../arch/arm/mach-mvebu/serdes/axp/high_speed_env_spec.h"
@@ -136,6 +138,15 @@ int board_init(void)
        /* adress of boot parameters */
        gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;
 
+       /*
+        * Map SPI devices via MBUS so that they can be accessed via
+        * the SPI direct access mode
+        */
+       mbus_dt_setup_win(&mbus_state, SPI_BUS0_DEV1_BASE, SPI_BUS0_DEV1_SIZE,
+                         CPU_TARGET_DEVICEBUS_BOOTROM_SPI, CPU_ATTR_SPI0_CS1);
+       mbus_dt_setup_win(&mbus_state, SPI_BUS1_DEV2_BASE, SPI_BUS0_DEV1_SIZE,
+                         CPU_TARGET_DEVICEBUS_BOOTROM_SPI, CPU_ATTR_SPI1_CS2);
+
        return 0;
 }
 
@@ -143,6 +154,8 @@ int checkboard(void)
 {
        puts("Board: theadorable\n");
 
+       board_fpga_add();
+
        return 0;
 }
 
diff --git a/board/theadorable/theadorable.h b/board/theadorable/theadorable.h
new file mode 100644 (file)
index 0000000..89fe117
--- /dev/null
@@ -0,0 +1,12 @@
+/*
+ * Copyright (C) 2016 Stefan Roese <sr@denx.de>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+/* Base addresses for the SPI direct access mode */
+#define SPI_BUS0_DEV1_BASE     0xe0000000
+#define SPI_BUS0_DEV1_SIZE     (1 << 20)
+#define SPI_BUS1_DEV2_BASE     (SPI_BUS0_DEV1_BASE + SPI_BUS0_DEV1_SIZE)
+
+void board_fpga_add(void);
index 67191af405b802159e786f26e8d3632aea5f83b8..18416ef64ad9f901c4970fce044830f69e7c74e8 100644 (file)
@@ -537,12 +537,39 @@ static struct cpsw_platform_data cpsw_data = {
        .version                = CPSW_CTRL_VERSION_2,
 };
 
+static u64 mac_to_u64(u8 mac[6])
+{
+       int i;
+       u64 addr = 0;
+
+       for (i = 0; i < 6; i++) {
+               addr <<= 8;
+               addr |= mac[i];
+       }
+
+       return addr;
+}
+
+static void u64_to_mac(u64 addr, u8 mac[6])
+{
+       mac[5] = addr;
+       mac[4] = addr >> 8;
+       mac[3] = addr >> 16;
+       mac[2] = addr >> 24;
+       mac[1] = addr >> 32;
+       mac[0] = addr >> 40;
+}
+
 int board_eth_init(bd_t *bis)
 {
        int ret;
        uint8_t mac_addr[6];
        uint32_t mac_hi, mac_lo;
        uint32_t ctrl_val;
+       int i;
+       u64 mac1, mac2;
+       u8 mac_addr1[6], mac_addr2[6];
+       int num_macs;
 
        /* try reading mac address from efuse */
        mac_lo = readl((*ctrl)->control_core_mac_id_0_lo);
@@ -583,6 +610,32 @@ int board_eth_init(bd_t *bis)
        if (ret < 0)
                printf("Error %d registering CPSW switch\n", ret);
 
+       /*
+        * Export any Ethernet MAC addresses from EEPROM.
+        * On AM57xx the 2 MAC addresses define the address range
+        */
+       board_ti_get_eth_mac_addr(0, mac_addr1);
+       board_ti_get_eth_mac_addr(1, mac_addr2);
+
+       if (is_valid_ethaddr(mac_addr1) && is_valid_ethaddr(mac_addr2)) {
+               mac1 = mac_to_u64(mac_addr1);
+               mac2 = mac_to_u64(mac_addr2);
+
+               /* must contain an address range */
+               num_macs = mac2 - mac1 + 1;
+               /* <= 50 to protect against user programming error */
+               if (num_macs > 0 && num_macs <= 50) {
+                       for (i = 0; i < num_macs; i++) {
+                               u64_to_mac(mac1 + i, mac_addr);
+                               if (is_valid_ethaddr(mac_addr)) {
+                                       eth_setenv_enetaddr_by_index("eth",
+                                                                    i + 2,
+                                                                    mac_addr);
+                               }
+                       }
+               }
+       }
+
        return ret;
 }
 #endif
index 4e45abfff789994e9a170a01b91b7e6d90678dc1..25f203124fd456ebca870f65d08ba6bc07ab06b1 100644 (file)
 #include "../common/board_detect.h"
 
 #define board_is_dra74x_evm()          board_ti_is("5777xCPU")
+#define board_is_dra72x_evm()          board_ti_is("DRA72x-T")
 #define board_is_dra74x_revh_or_later() board_is_dra74x_evm() &&       \
                                (strncmp("H", board_ti_get_rev(), 1) <= 0)
+#define board_is_dra72x_revc_or_later() board_is_dra72x_evm() &&       \
+                               (strncmp("C", board_ti_get_rev(), 1) <= 0)
 #define board_ti_get_emif_size()       board_ti_get_emif1_size() +     \
                                        board_ti_get_emif2_size()
 
@@ -127,6 +130,31 @@ static const struct emif_regs emif_1_regs_ddr3_666_mhz_1cs_dra_es1 = {
        .emif_rd_wr_exec_thresh         = 0x00000305
 };
 
+const struct emif_regs emif_1_regs_ddr3_666_mhz_1cs_dra_es2 = {
+       .sdram_config_init              = 0x61862BB2,
+       .sdram_config                   = 0x61862BB2,
+       .sdram_config2                  = 0x00000000,
+       .ref_ctrl                       = 0x0000514D,
+       .ref_ctrl_final                 = 0x0000144A,
+       .sdram_tim1                     = 0xD1137824,
+       .sdram_tim2                     = 0x30B37FE3,
+       .sdram_tim3                     = 0x409F8AD8,
+       .read_idle_ctrl                 = 0x00050000,
+       .zq_config                      = 0x5007190B,
+       .temp_alert_config              = 0x00000000,
+       .emif_ddr_phy_ctlr_1_init       = 0x0824400E,
+       .emif_ddr_phy_ctlr_1            = 0x0E24400E,
+       .emif_ddr_ext_phy_ctrl_1        = 0x04040100,
+       .emif_ddr_ext_phy_ctrl_2        = 0x006B009F,
+       .emif_ddr_ext_phy_ctrl_3        = 0x006B00A2,
+       .emif_ddr_ext_phy_ctrl_4        = 0x006B00A8,
+       .emif_ddr_ext_phy_ctrl_5        = 0x006B00A8,
+       .emif_rd_wr_lvl_rmp_win         = 0x00000000,
+       .emif_rd_wr_lvl_rmp_ctl         = 0x80000000,
+       .emif_rd_wr_lvl_ctl             = 0x00000000,
+       .emif_rd_wr_exec_thresh         = 0x00000305
+};
+
 const struct emif_regs emif1_ddr3_532_mhz_1cs_2G = {
        .sdram_config_init              = 0x61851ab2,
        .sdram_config                   = 0x61851ab2,
@@ -203,7 +231,11 @@ void emif_get_reg_dump(u32 emif_nr, const struct emif_regs **regs)
                }
                break;
        case DRA722_ES1_0:
-               *regs = &emif_1_regs_ddr3_666_mhz_1cs_dra_es1;
+       case DRA722_ES2_0:
+               if (ram_size < CONFIG_MAX_MEM_MAPPED)
+                       *regs = &emif_1_regs_ddr3_666_mhz_1cs_dra_es1;
+               else
+                       *regs = &emif_1_regs_ddr3_666_mhz_1cs_dra_es2;
                break;
        default:
                *regs = &emif1_ddr3_532_mhz_1cs;
@@ -234,6 +266,18 @@ const struct dmm_lisa_map_regs lisa_map_dra7_2GB = {
        .is_ma_present  = 0x1
 };
 
+/*
+ * DRA722 EVM EMIF1 2GB CONFIGURATION
+ * EMIF1 4 devices of 512Mb x 8 Micron
+ */
+const struct dmm_lisa_map_regs lisa_map_2G_x_4 = {
+       .dmm_lisa_map_0 = 0x0,
+       .dmm_lisa_map_1 = 0x0,
+       .dmm_lisa_map_2 = 0x80700100,
+       .dmm_lisa_map_3 = 0xFF020100,
+       .is_ma_present  = 0x1
+};
+
 void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs)
 {
        u64 ram_size;
@@ -250,8 +294,13 @@ void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs)
                        *dmm_lisa_regs = &lisa_map_dra7_1536MB;
                break;
        case DRA722_ES1_0:
+       case DRA722_ES2_0:
        default:
-               *dmm_lisa_regs = &lisa_map_2G_x_2;
+               if (ram_size < CONFIG_MAX_MEM_MAPPED)
+                       *dmm_lisa_regs = &lisa_map_2G_x_2;
+               else
+                       *dmm_lisa_regs = &lisa_map_2G_x_4;
+               break;
        }
 }
 
@@ -324,8 +373,10 @@ void do_board_detect(void)
 
        if (board_is_dra74x_evm()) {
                bname = "DRA74x EVM";
-       /* If EEPROM is not populated */
+       } else if (board_is_dra72x_evm()) {
+               bname = "DRA72x EVM";
        } else {
+               /* If EEPROM is not populated */
                if (is_dra72x())
                        bname = "DRA72x EVM";
                else
@@ -347,16 +398,29 @@ void set_muxconf_regs(void)
 #ifdef CONFIG_IODELAY_RECALIBRATION
 void recalibrate_iodelay(void)
 {
-       struct pad_conf_entry const *pads;
+       struct pad_conf_entry const *pads, *delta_pads = NULL;
        struct iodelay_cfg_entry const *iodelay;
-       int npads, niodelays;
+       int npads, niodelays, delta_npads = 0;
+       int ret;
 
        switch (omap_revision()) {
        case DRA722_ES1_0:
-               pads = dra72x_core_padconf_array;
-               npads = ARRAY_SIZE(dra72x_core_padconf_array);
-               iodelay = dra72_iodelay_cfg_array;
-               niodelays = ARRAY_SIZE(dra72_iodelay_cfg_array);
+       case DRA722_ES2_0:
+               pads = dra72x_core_padconf_array_common;
+               npads = ARRAY_SIZE(dra72x_core_padconf_array_common);
+               if (board_is_dra72x_revc_or_later()) {
+                       delta_pads = dra72x_rgmii_padconf_array_revc;
+                       delta_npads =
+                               ARRAY_SIZE(dra72x_rgmii_padconf_array_revc);
+                       iodelay = dra72_iodelay_cfg_array_revc;
+                       niodelays = ARRAY_SIZE(dra72_iodelay_cfg_array_revc);
+               } else {
+                       delta_pads = dra72x_rgmii_padconf_array_revb;
+                       delta_npads =
+                               ARRAY_SIZE(dra72x_rgmii_padconf_array_revb);
+                       iodelay = dra72_iodelay_cfg_array_revb;
+                       niodelays = ARRAY_SIZE(dra72_iodelay_cfg_array_revb);
+               }
                break;
        case DRA752_ES1_0:
        case DRA752_ES1_1:
@@ -376,7 +440,24 @@ void recalibrate_iodelay(void)
                                      RGMII1_ID_MODE_N_MASK);
                break;
        }
-       __recalibrate_iodelay(pads, npads, iodelay, niodelays);
+       /* Setup I/O isolation */
+       ret = __recalibrate_iodelay_start();
+       if (ret)
+               goto err;
+
+       /* Do the muxing here */
+       do_set_mux32((*ctrl)->control_padconf_core_base, pads, npads);
+
+       /* Now do the weird minor deltas that should be safe */
+       if (delta_npads)
+               do_set_mux32((*ctrl)->control_padconf_core_base,
+                            delta_pads, delta_npads);
+
+       /* Setup IOdelay configuration */
+       ret = do_set_iodelay((*ctrl)->iodelay_config_base, iodelay, niodelays);
+err:
+       /* Closeup.. remove isolation */
+       __recalibrate_iodelay_end(ret);
 }
 #endif
 
@@ -614,7 +695,7 @@ static inline void vtt_regulator_enable(void)
                return;
 
        /* Do not enable VTT for DRA722 */
-       if (omap_revision() == DRA722_ES1_0)
+       if (is_dra72x())
                return;
 
        /*
index 6db11a2bbb8864dd83b2bed77610910f20850931..34a05dd6bd86098f2cf15f77804de6a61245f84c 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <asm/arch/mux_dra7xx.h>
 
-const struct pad_conf_entry dra72x_core_padconf_array[] = {
+const struct pad_conf_entry dra72x_core_padconf_array_common[] = {
        {GPMC_AD0, (M3 | PIN_INPUT)},   /* gpmc_ad0.vout3_d0 */
        {GPMC_AD1, (M3 | PIN_INPUT)},   /* gpmc_ad1.vout3_d1 */
        {GPMC_AD2, (M3 | PIN_INPUT)},   /* gpmc_ad2.vout3_d2 */
@@ -104,37 +104,11 @@ const struct pad_conf_entry dra72x_core_padconf_array[] = {
        {VOUT1_D23, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d23.vout1_d23 */
        {MDIO_MCLK, (M0 | PIN_INPUT_PULLUP | SLEWCONTROL)},     /* mdio_mclk.mdio_mclk */
        {MDIO_D, (M0 | PIN_INPUT_PULLUP | SLEWCONTROL)},        /* mdio_d.mdio_d */
-       {RGMII0_TXC, (M0 | PIN_OUTPUT | MANUAL_MODE)},  /* rgmii0_txc.rgmii0_txc */
-       {RGMII0_TXCTL, (M0 | PIN_OUTPUT | MANUAL_MODE)},        /* rgmii0_txctl.rgmii0_txctl */
-       {RGMII0_TXD3, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd3.rgmii0_txd3 */
-       {RGMII0_TXD2, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd2.rgmii0_txd2 */
-       {RGMII0_TXD1, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd1.rgmii0_txd1 */
-       {RGMII0_TXD0, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd0.rgmii0_txd0 */
-       {RGMII0_RXC, (M0 | PIN_INPUT | MANUAL_MODE)},   /* rgmii0_rxc.rgmii0_rxc */
-       {RGMII0_RXCTL, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxctl.rgmii0_rxctl */
-       {RGMII0_RXD3, (M0 | PIN_INPUT | MANUAL_MODE)},  /* rgmii0_rxd3.rgmii0_rxd3 */
-       {RGMII0_RXD2, (M0 | PIN_INPUT | MANUAL_MODE)},  /* rgmii0_rxd2.rgmii0_rxd2 */
-       {RGMII0_RXD1, (M0 | PIN_INPUT | MANUAL_MODE)},  /* rgmii0_rxd1.rgmii0_rxd1 */
-       {RGMII0_RXD0, (M0 | PIN_INPUT | MANUAL_MODE)},  /* rgmii0_rxd0.rgmii0_rxd0 */
-       {VIN2A_D12, (M3 | PIN_OUTPUT | MANUAL_MODE)},   /* vin2a_d0.rgmii1_txc */
-       {VIN2A_D13, (M3 | PIN_OUTPUT | MANUAL_MODE)},   /* vin2a_d1.rgmii1_txctl */
-       {VIN2A_D14, (M3 | PIN_OUTPUT | MANUAL_MODE)},   /* vin2a_d2.rgmii1_txd3 */
-       {VIN2A_D15, (M3 | PIN_OUTPUT | MANUAL_MODE)},   /* vin2a_d3.rgmii1_txd2 */
-       {VIN2A_D16, (M3 | PIN_OUTPUT | MANUAL_MODE)},   /* vin2a_d4.rgmii1_txd1 */
-       {VIN2A_D17, (M3 | PIN_OUTPUT | MANUAL_MODE)},   /* vin2a_d5.rgmii1_txd0 */
-       {VIN2A_D18, (M3 | PIN_INPUT | MANUAL_MODE)},    /* vin2a_d6.rgmii1_rxc */
-       {VIN2A_D19, (M3 | PIN_INPUT | MANUAL_MODE)},    /* vin2a_d7.rgmii1_rxctl */
-       {VIN2A_D20, (M3 | PIN_INPUT | MANUAL_MODE)},    /* vin2a_d8.rgmii1_rxd3 */
-       {VIN2A_D21, (M3 | PIN_INPUT | MANUAL_MODE)},    /* vin2a_d9.rgmii1_rxd2 */
-       {VIN2A_D22, (M3 | PIN_INPUT | MANUAL_MODE)},    /* vin2a_d10.rgmii1_rxd1 */
-       {VIN2A_D23, (M3 | PIN_INPUT | MANUAL_MODE)},    /* vin2a_d11.rgmii1_rxd0 */
        {USB1_DRVVBUS, (M0 | PIN_INPUT_SLEW)},  /* usb1_drvvbus.usb1_drvvbus */
        {USB2_DRVVBUS, (M0 | PIN_INPUT_SLEW)},  /* usb2_drvvbus.usb2_drvvbus */
        {GPIO6_14, (M9 | PIN_INPUT_PULLUP)},    /* gpio6_14.i2c3_sda */
        {GPIO6_15, (M9 | PIN_INPUT_PULLUP)},    /* gpio6_15.i2c3_scl */
        {GPIO6_16, (M14 | PIN_INPUT_PULLUP)},   /* gpio6_16.gpio6_16 */
-       {XREF_CLK1, (M5 | PIN_OUTPUT)}, /* xref_clk1.atl_clk1 */
-       {XREF_CLK2, (M5 | PIN_OUTPUT)}, /* xref_clk2.atl_clk2 */
        {MCASP1_AXR0, (M10 | PIN_INPUT_SLEW)},  /* mcasp1_axr0.i2c5_sda */
        {MCASP1_AXR1, (M10 | PIN_INPUT_SLEW)},  /* mcasp1_axr1.i2c5_scl */
        {MCASP1_AXR2, (M14 | PIN_INPUT_PULLDOWN)},      /* mcasp1_axr2.gpio5_4 */
@@ -160,7 +134,6 @@ const struct pad_conf_entry dra72x_core_padconf_array[] = {
        {MMC1_DAT3, (M0 | PIN_INPUT_PULLUP)},   /* mmc1_dat3.mmc1_dat3 */
        {MMC1_SDCD, (M14 | PIN_INPUT_PULLUP)},  /* mmc1_sdcd.gpio6_27 */
        {MMC1_SDWP, (M14 | PIN_INPUT_SLEW)},    /* mmc1_sdwp.gpio6_28 */
-       {GPIO6_11, (M14 | PIN_INPUT_PULLUP)},   /* gpio6_11.gpio6_11 */
        {SPI1_SCLK, (M0 | PIN_INPUT_PULLDOWN)}, /* spi1_sclk.spi1_sclk */
        {SPI1_D1, (M0 | PIN_INPUT_PULLDOWN)},   /* spi1_d1.spi1_d1 */
        {SPI1_D0, (M0 | PIN_INPUT_PULLDOWN)},   /* spi1_d0.spi1_d0 */
@@ -188,6 +161,65 @@ const struct pad_conf_entry dra72x_core_padconf_array[] = {
        {WAKEUP3, (M1 | PULL_ENA | PULL_UP)},   /* Wakeup3.sys_nirq1 */
 };
 
+const struct pad_conf_entry dra72x_rgmii_padconf_array_revb[] = {
+       {GPIO6_11, (M14 | PIN_INPUT_PULLUP)},   /* gpio6_11.gpio6_11 */
+       {RGMII0_TXC, (M0 | PIN_OUTPUT | MANUAL_MODE)},  /* rgmii0_txc.rgmii0_txc */
+       {RGMII0_TXCTL, (M0 | PIN_OUTPUT | MANUAL_MODE)},        /* rgmii0_txctl.rgmii0_txctl */
+       {RGMII0_TXD3, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd3.rgmii0_txd3 */
+       {RGMII0_TXD2, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd2.rgmii0_txd2 */
+       {RGMII0_TXD1, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd1.rgmii0_txd1 */
+       {RGMII0_TXD0, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd0.rgmii0_txd0 */
+       {RGMII0_RXC, (M0 | PIN_INPUT | MANUAL_MODE)},   /* rgmii0_rxc.rgmii0_rxc */
+       {RGMII0_RXCTL, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxctl.rgmii0_rxctl */
+       {RGMII0_RXD3, (M0 | PIN_INPUT | MANUAL_MODE)},  /* rgmii0_rxd3.rgmii0_rxd3 */
+       {RGMII0_RXD2, (M0 | PIN_INPUT | MANUAL_MODE)},  /* rgmii0_rxd2.rgmii0_rxd2 */
+       {RGMII0_RXD1, (M0 | PIN_INPUT | MANUAL_MODE)},  /* rgmii0_rxd1.rgmii0_rxd1 */
+       {RGMII0_RXD0, (M0 | PIN_INPUT | MANUAL_MODE)},  /* rgmii0_rxd0.rgmii0_rxd0 */
+       {VIN2A_D12, (M3 | PIN_OUTPUT | MANUAL_MODE)},   /* vin2a_d0.rgmii1_txc */
+       {VIN2A_D13, (M3 | PIN_OUTPUT | MANUAL_MODE)},   /* vin2a_d1.rgmii1_txctl */
+       {VIN2A_D14, (M3 | PIN_OUTPUT | MANUAL_MODE)},   /* vin2a_d2.rgmii1_txd3 */
+       {VIN2A_D15, (M3 | PIN_OUTPUT | MANUAL_MODE)},   /* vin2a_d3.rgmii1_txd2 */
+       {VIN2A_D16, (M3 | PIN_OUTPUT | MANUAL_MODE)},   /* vin2a_d4.rgmii1_txd1 */
+       {VIN2A_D17, (M3 | PIN_OUTPUT | MANUAL_MODE)},   /* vin2a_d5.rgmii1_txd0 */
+       {VIN2A_D18, (M3 | PIN_INPUT | MANUAL_MODE)},    /* vin2a_d6.rgmii1_rxc */
+       {VIN2A_D19, (M3 | PIN_INPUT | MANUAL_MODE)},    /* vin2a_d7.rgmii1_rxctl */
+       {VIN2A_D20, (M3 | PIN_INPUT | MANUAL_MODE)},    /* vin2a_d8.rgmii1_rxd3 */
+       {VIN2A_D21, (M3 | PIN_INPUT | MANUAL_MODE)},    /* vin2a_d9.rgmii1_rxd2 */
+       {VIN2A_D22, (M3 | PIN_INPUT | MANUAL_MODE)},    /* vin2a_d10.rgmii1_rxd1 */
+       {VIN2A_D23, (M3 | PIN_INPUT | MANUAL_MODE)},    /* vin2a_d11.rgmii1_rxd0 */
+       {XREF_CLK1, (M5 | PIN_OUTPUT)}, /* xref_clk1.atl_clk1 */
+       {XREF_CLK2, (M5 | PIN_OUTPUT)}, /* xref_clk2.atl_clk2 */
+};
+
+const struct pad_conf_entry dra72x_rgmii_padconf_array_revc[] = {
+       {VIN2A_FLD0, (M14 | PIN_INPUT)},        /* vin2a_fld0.gpio3_30 */
+       {RGMII0_TXC, (M0 | PIN_OUTPUT)},        /* rgmii0_txc.rgmii0_txc */
+       {RGMII0_TXCTL, (M0 | PIN_OUTPUT)},      /* rgmii0_txctl.rgmii0_txctl */
+       {RGMII0_TXD3, (M0 | PIN_OUTPUT)},       /* rgmii0_txd3.rgmii0_txd3 */
+       {RGMII0_TXD2, (M0 | PIN_OUTPUT)},       /* rgmii0_txd2.rgmii0_txd2 */
+       {RGMII0_TXD1, (M0 | PIN_OUTPUT)},       /* rgmii0_txd1.rgmii0_txd1 */
+       {RGMII0_TXD0, (M0 | PIN_OUTPUT)},       /* rgmii0_txd0.rgmii0_txd0 */
+       {RGMII0_RXC, (M0 | PIN_INPUT_PULLDOWN)},        /* rgmii0_rxc.rgmii0_rxc */
+       {RGMII0_RXCTL, (M0 | PIN_INPUT_PULLDOWN)},      /* rgmii0_rxctl.rgmii0_rxctl */
+       {RGMII0_RXD3, (M0 | PIN_INPUT_PULLDOWN)},       /* rgmii0_rxd3.rgmii0_rxd3 */
+       {RGMII0_RXD2, (M0 | PIN_INPUT_PULLDOWN)},       /* rgmii0_rxd2.rgmii0_rxd2 */
+       {RGMII0_RXD1, (M0 | PIN_INPUT_PULLDOWN)},       /* rgmii0_rxd1.rgmii0_rxd1 */
+       {RGMII0_RXD0, (M0 | PIN_INPUT_PULLDOWN)},       /* rgmii0_rxd0.rgmii0_rxd0 */
+       {VIN2A_D12, (M3 | PIN_OUTPUT)}, /* vin2a_d12.rgmii1_txc */
+       {VIN2A_D13, (M3 | PIN_OUTPUT)}, /* vin2a_d13.rgmii1_txctl */
+       {VIN2A_D14, (M3 | PIN_OUTPUT)}, /* vin2a_d14.rgmii1_txd3 */
+       {VIN2A_D15, (M3 | PIN_OUTPUT)}, /* vin2a_d15.rgmii1_txd2 */
+       {VIN2A_D16, (M3 | PIN_OUTPUT)}, /* vin2a_d16.rgmii1_txd1 */
+       {VIN2A_D17, (M3 | PIN_OUTPUT)}, /* vin2a_d17.rgmii1_txd0 */
+       {VIN2A_D18, (M3 | PIN_INPUT_PULLDOWN)}, /* vin2a_d18.rgmii1_rxc */
+       {VIN2A_D19, (M3 | PIN_INPUT_PULLDOWN)}, /* vin2a_d19.rgmii1_rxctl */
+       {VIN2A_D20, (M3 | PIN_INPUT_PULLDOWN)}, /* vin2a_d20.rgmii1_rxd3 */
+       {VIN2A_D21, (M3 | PIN_INPUT_PULLDOWN)}, /* vin2a_d21.rgmii1_rxd2 */
+       {VIN2A_D22, (M3 | PIN_INPUT_PULLDOWN)}, /* vin2a_d22.rgmii1_rxd1 */
+       {VIN2A_D23, (M3 | PIN_INPUT_PULLDOWN)}, /* vin2a_d23.rgmii1_rxd0 */
+       {XREF_CLK2, (M5 | PIN_INPUT_PULLDOWN)}, /* xref_clk2.atl_clk2 */
+};
+
 const struct pad_conf_entry early_padconf[] = {
 #if (CONFIG_CONS_INDEX == 1)
        {UART1_RXD, (PIN_INPUT_SLEW | M0)}, /* UART1_RXD */
@@ -201,7 +233,7 @@ const struct pad_conf_entry early_padconf[] = {
 };
 
 #ifdef CONFIG_IODELAY_RECALIBRATION
-const struct iodelay_cfg_entry dra72_iodelay_cfg_array[] = {
+const struct iodelay_cfg_entry dra72_iodelay_cfg_array_revb[] = {
        {0x6F0, 359, 0}, /* RGMMI0_RXC_IN */
        {0x6FC, 129, 1896}, /* RGMMI0_RXCTL_IN */
        {0x708, 80, 1391}, /* RGMMI0_RXD0_IN */
@@ -236,6 +268,18 @@ const struct iodelay_cfg_entry dra72_iodelay_cfg_array[] = {
        {0x188, 0, 0}, /* CFG_GPMC_A18_OUT */
        {0x374, 121, 0}, /* CFG_GPMC_CS2_OUT */
 };
+
+const struct iodelay_cfg_entry dra72_iodelay_cfg_array_revc[] = {
+       {0x0144, 0, 0}, /* CFG_GPMC_A13_IN */
+       {0x0150, 2247, 1186},   /* CFG_GPMC_A14_IN */
+       {0x015C, 2176, 1197},   /* CFG_GPMC_A15_IN */
+       {0x0168, 2229, 1268},   /* CFG_GPMC_A16_IN */
+       {0x0170, 0, 0}, /* CFG_GPMC_A16_OUT */
+       {0x0174, 2251, 1217},   /* CFG_GPMC_A17_IN */
+       {0x0188, 0, 0}, /* CFG_GPMC_A18_OUT */
+       {0x0374, 0, 0}, /* CFG_GPMC_CS2_OUT */
+};
+
 #endif
 
 const struct pad_conf_entry dra74x_core_padconf_array[] = {
diff --git a/board/zipitz2/Kconfig b/board/zipitz2/Kconfig
new file mode 100644 (file)
index 0000000..c663504
--- /dev/null
@@ -0,0 +1,9 @@
+if TARGET_ZIPITZ2
+
+config SYS_BOARD
+       default "zipitz2"
+
+config SYS_CONFIG_NAME
+       default "zipitz2"
+
+endif
diff --git a/board/zipitz2/MAINTAINERS b/board/zipitz2/MAINTAINERS
new file mode 100644 (file)
index 0000000..e027cd3
--- /dev/null
@@ -0,0 +1,6 @@
+ZIPITZ2 BOARD
+M:     Vasily Khoruzhick <anarsoul@gmail.com>
+S:     Maintained
+F:     board/zipitz2/
+F:     include/configs/zipitz2.h
+F:     configs/zipitz2_defconfig
diff --git a/board/zipitz2/Makefile b/board/zipitz2/Makefile
new file mode 100644 (file)
index 0000000..855f6bc
--- /dev/null
@@ -0,0 +1,10 @@
+#
+# Copyright (C) 2009
+# Marek Vasut <marek.vasut@gmail.com>
+#
+# Heavily based on pxa255_idp platform
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+obj-y  := zipitz2.o
diff --git a/board/zipitz2/zipitz2.c b/board/zipitz2/zipitz2.c
new file mode 100644 (file)
index 0000000..d3ca939
--- /dev/null
@@ -0,0 +1,217 @@
+/*
+ * Copyright (C) 2009
+ * Marek Vasut <marek.vasut@gmail.com>
+ *
+ * Heavily based on pxa255_idp platform
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <command.h>
+#include <serial.h>
+#include <asm/arch/hardware.h>
+#include <asm/arch/pxa.h>
+#include <asm/arch/regs-mmc.h>
+#include <spi.h>
+#include <asm/io.h>
+#include <usb.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#ifdef CONFIG_CMD_SPI
+void lcd_start(void);
+#else
+inline void lcd_start(void) {};
+#endif
+
+/*
+ * Miscelaneous platform dependent initialisations
+ */
+int board_init(void)
+{
+       /* arch number of Z2 */
+       gd->bd->bi_arch_number = MACH_TYPE_ZIPIT2;
+
+       /* adress of boot parameters */
+       gd->bd->bi_boot_params = 0xa0000100;
+
+       /* Enable LCD */
+       lcd_start();
+
+       return 0;
+}
+
+int dram_init(void)
+{
+       pxa2xx_dram_init();
+       gd->ram_size = PHYS_SDRAM_1_SIZE;
+       return 0;
+}
+
+#ifdef CONFIG_CMD_USB
+int board_usb_init(int index, enum usb_init_type init)
+{
+       /* enable port 2 */
+       writel(readl(UP2OCR) | UP2OCR_HXOE | UP2OCR_HXS |
+               UP2OCR_DMPDE | UP2OCR_DPPDE, UP2OCR);
+
+       return 0;
+}
+
+int board_usb_cleanup(int index, enum usb_init_type init)
+{
+       return 0;
+}
+
+void usb_board_stop(void)
+{
+}
+#endif
+
+void dram_init_banksize(void)
+{
+       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+       gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+}
+
+#ifdef CONFIG_CMD_MMC
+int board_mmc_init(bd_t *bis)
+{
+       pxa_mmc_register(0);
+       return 0;
+}
+#endif
+
+#ifdef CONFIG_CMD_SPI
+
+struct {
+       unsigned char   reg;
+       unsigned short  data;
+       unsigned char   mdelay;
+} lcd_data[] = {
+       { 0x07, 0x0000, 0 },
+       { 0x13, 0x0000, 10 },
+       { 0x11, 0x3004, 0 },
+       { 0x14, 0x200F, 0 },
+       { 0x10, 0x1a20, 0 },
+       { 0x13, 0x0040, 50 },
+       { 0x13, 0x0060, 0 },
+       { 0x13, 0x0070, 200 },
+       { 0x01, 0x0127, 0 },
+       { 0x02, 0x0700, 0 },
+       { 0x03, 0x1030, 0 },
+       { 0x08, 0x0208, 0 },
+       { 0x0B, 0x0620, 0 },
+       { 0x0C, 0x0110, 0 },
+       { 0x30, 0x0120, 0 },
+       { 0x31, 0x0127, 0 },
+       { 0x32, 0x0000, 0 },
+       { 0x33, 0x0503, 0 },
+       { 0x34, 0x0727, 0 },
+       { 0x35, 0x0124, 0 },
+       { 0x36, 0x0706, 0 },
+       { 0x37, 0x0701, 0 },
+       { 0x38, 0x0F00, 0 },
+       { 0x39, 0x0F00, 0 },
+       { 0x40, 0x0000, 0 },
+       { 0x41, 0x0000, 0 },
+       { 0x42, 0x013f, 0 },
+       { 0x43, 0x0000, 0 },
+       { 0x44, 0x013f, 0 },
+       { 0x45, 0x0000, 0 },
+       { 0x46, 0xef00, 0 },
+       { 0x47, 0x013f, 0 },
+       { 0x48, 0x0000, 0 },
+       { 0x07, 0x0015, 30 },
+       { 0x07, 0x0017, 0 },
+       { 0x20, 0x0000, 0 },
+       { 0x21, 0x0000, 0 },
+       { 0x22, 0x0000, 0 },
+};
+
+void zipitz2_spi_sda(int set)
+{
+       /* GPIO 13 */
+       if (set)
+               writel((1 << 13), GPSR0);
+       else
+               writel((1 << 13), GPCR0);
+}
+
+void zipitz2_spi_scl(int set)
+{
+       /* GPIO 22 */
+       if (set)
+               writel((1 << 22), GPCR0);
+       else
+               writel((1 << 22), GPSR0);
+}
+
+unsigned char zipitz2_spi_read(void)
+{
+       /* GPIO 40 */
+       return !!(readl(GPLR1) & (1 << 8));
+}
+
+int spi_cs_is_valid(unsigned int bus, unsigned int cs)
+{
+       /* Always valid */
+       return 1;
+}
+
+void spi_cs_activate(struct spi_slave *slave)
+{
+       /* GPIO 88 low */
+       writel((1 << 24), GPCR2);
+}
+
+void spi_cs_deactivate(struct spi_slave *slave)
+{
+       /* GPIO 88 high */
+       writel((1 << 24), GPSR2);
+}
+
+void lcd_start(void)
+{
+       int i;
+       unsigned char reg[3] = { 0x74, 0x00, 0 };
+       unsigned char data[3] = { 0x76, 0, 0 };
+       unsigned char dummy[3] = { 0, 0, 0 };
+
+       /* PWM2 AF */
+       writel(readl(GAFR0_L) | 0x00800000, GAFR0_L);
+       /* Enable clock to all PWM */
+       writel(readl(CKEN) | 0x3, CKEN);
+       /* Configure PWM2 */
+       writel(0x4f, PWM_CTRL2);
+       writel(0x2ff, PWM_PWDUTY2);
+       writel(792, PWM_PERVAL2);
+
+       /* Toggle the reset pin to reset the LCD */
+       writel((1 << 19), GPSR0);
+       udelay(100000);
+       writel((1 << 19), GPCR0);
+       udelay(20000);
+       writel((1 << 19), GPSR0);
+       udelay(20000);
+
+       /* Program the LCD init sequence */
+       for (i = 0; i < sizeof(lcd_data) / sizeof(lcd_data[0]); i++) {
+               reg[0] = 0x74;
+               reg[1] = 0x0;
+               reg[2] = lcd_data[i].reg;
+               spi_xfer(NULL, 24, reg, dummy, SPI_XFER_BEGIN | SPI_XFER_END);
+
+               data[0] = 0x76;
+               data[1] = lcd_data[i].data >> 8;
+               data[2] = lcd_data[i].data & 0xff;
+               spi_xfer(NULL, 24, data, dummy, SPI_XFER_BEGIN | SPI_XFER_END);
+
+               if (lcd_data[i].mdelay)
+                       udelay(lcd_data[i].mdelay * 1000);
+       }
+
+       writel((1 << 11), GPSR0);
+}
+#endif
index 2f0b90a9da83393f374a6932ef138df2f5136a75..3add632bc4b945de810a2f3f4b01d59c3b1fe124 100644 (file)
@@ -141,6 +141,9 @@ static unsigned long do_bootefi_exec(void *efi)
 #ifdef CONFIG_PARTITIONS
        efi_disk_register();
 #endif
+#ifdef CONFIG_LCD
+       efi_gop_register();
+#endif
 
        /* Call our payload! */
 #ifdef DEBUG_EFI
index 64c3ffcf423b35fc1b0a65daccb99d490a053c5f..f16ef9a5db554077179a3ef5cbac00ce7e773b09 100644 (file)
--- a/cmd/spi.c
+++ b/cmd/spi.c
@@ -51,6 +51,8 @@ static int do_spi_xfer(int bus, int cs)
 
        snprintf(name, sizeof(name), "generic_%d:%d", bus, cs);
        str = strdup(name);
+       if (!str)
+               return -ENOMEM;
        ret = spi_get_bus_and_cs(bus, cs, 1000000, mode, "spi_generic_drv",
                                 str, &dev, &slave);
        if (ret)
index 6a0d11bb04c5337778f249500d506d53ce3c2f3a..12293f383624947cc716319a862df4340c44b1c2 100644 (file)
@@ -515,8 +515,6 @@ void puts(const char *s)
                        int ch = *s++;
 
                        printch(ch);
-                       if (ch == '\n')
-                               printch('\r');
                }
                return;
        }
index 51705adeaf79918bce59a374a3319c6cb98a3cce..783626e3d54caf4fbdd4940892023a9171ded5df 100644 (file)
@@ -66,8 +66,8 @@ void lcd_sync(void)
        int line_length;
 
        if (lcd_flush_dcache)
-               flush_dcache_range((u32)lcd_base,
-                       (u32)(lcd_base + lcd_get_size(&line_length)));
+               flush_dcache_range((ulong)lcd_base,
+                       (ulong)(lcd_base + lcd_get_size(&line_length)));
 #endif
 }
 
index eda96d68bc564e5cc45e1478fdd4b4aaad41a66f..c53030f3653d9605062926cb4454b92705757ed6 100644 (file)
@@ -350,7 +350,7 @@ int menu_item_add(struct menu *m, char *item_key, void *item_data)
  * make it obvious what the key for each entry is.
  *
  * item_choice - If not NULL, will be called when asking the user to choose an
- * item. Returns a key string corresponding to the choosen item or NULL if
+ * item. Returns a key string corresponding to the chosen item or NULL if
  * no item has been selected.
  *
  * item_choice_data - Will be passed as the argument to the item_choice function
index e5167bf73e4c3181ef7c74b7736431e0df121668..82e7f58e80f028f7517ec52bd0d73566dae82d28 100644 (file)
@@ -210,9 +210,9 @@ struct boot_device_name boot_name_table[] = {
        { BOOT_DEVICE_RAM, "RAM" },
 #endif
 #ifdef CONFIG_SPL_MMC_SUPPORT
-       { BOOT_DEVICE_MMC1, "MMC" },
-       { BOOT_DEVICE_MMC2, "MMC" },
-       { BOOT_DEVICE_MMC2_2, "MMC" },
+       { BOOT_DEVICE_MMC1, "MMC1" },
+       { BOOT_DEVICE_MMC2, "MMC2" },
+       { BOOT_DEVICE_MMC2_2, "MMC2_2" },
 #endif
 #ifdef CONFIG_SPL_NAND_SUPPORT
        { BOOT_DEVICE_NAND, "NAND" },
index c0e76be09abb48d67579e589f1befe704eae7a97..7d3bfc60bae0030bb7aac5b01d2f73c94e2b8ff9 100644 (file)
@@ -41,7 +41,6 @@ static int mmc_load_legacy(struct mmc *mmc, ulong sector,
        return 0;
 }
 
-#ifdef CONFIG_SPL_LOAD_FIT
 static ulong h_spl_load_read(struct spl_load_info *load, ulong sector,
                             ulong count, void *buf)
 {
@@ -49,7 +48,6 @@ static ulong h_spl_load_read(struct spl_load_info *load, ulong sector,
 
        return mmc->block_dev.block_read(&mmc->block_dev, sector, count, buf);
 }
-#endif
 
 static int mmc_load_image_raw_sector(struct mmc *mmc, unsigned long sector)
 {
@@ -68,12 +66,8 @@ static int mmc_load_image_raw_sector(struct mmc *mmc, unsigned long sector)
                goto end;
        }
 
-       switch (image_get_magic(header)) {
-       case IH_MAGIC:
-               ret = mmc_load_legacy(mmc, sector, header);
-               break;
-#ifdef CONFIG_SPL_LOAD_FIT
-       case FDT_MAGIC: {
+       if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) &&
+           image_get_magic(header) == FDT_MAGIC) {
                struct spl_load_info load;
 
                debug("Found FIT\n");
@@ -82,12 +76,8 @@ static int mmc_load_image_raw_sector(struct mmc *mmc, unsigned long sector)
                load.bl_len = mmc->read_bl_len;
                load.read = h_spl_load_read;
                ret = spl_load_simple_fit(&load, sector, header);
-               break;
-       }
-#endif
-       default:
-               puts("bad magic\n");
-               return -1;
+       } else {
+               ret = mmc_load_legacy(mmc, sector, header);
        }
 
 end:
index 6235d1f09c136312d69b0af5528e3a7da381d3b0..af96f5bd121554f101055e7e11c2aa3d4d919eaf 100644 (file)
@@ -8,7 +8,6 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-olinuxino-lime"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPC(3)"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 3cddc1244039153a6bc71b0298ea4a5b81cafe22..cba2cfdf3cdf62bb116f5b570406f48786cba972 100644 (file)
@@ -9,7 +9,6 @@ CONFIG_USB1_VBUS_PIN="PB10"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-olinuxino-micro"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 6000d9bca8e1a24ffd6aa7c60af04a8878d0b6df..45cc5ab6db1e4c3e48d35fad4f9c6f3b25d2fa9d 100644 (file)
@@ -13,7 +13,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino-micro"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 6342f6bc21de988a459a7166c752c00fc7dd5696..45ec575c133b9018959ac35e62ae87aaa4d1ef2b 100644 (file)
@@ -15,7 +15,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
@@ -23,3 +22,4 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 CONFIG_CMD_GPIO=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
+CONFIG_USB_GADGET=y
index 95c67d6dbbf85070f3e6fd914f21f3f067c54923..b5181c6880ac6c911e58baf4ee7a8402e65efacf 100644 (file)
@@ -8,7 +8,6 @@ CONFIG_USB0_VBUS_DET="PH5"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPC(3)"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index dc6413b549824d244b82cce14bb6560a4a839638..e27698d0dd7df055b4c1439b218550d726f16ef8 100644 (file)
@@ -6,7 +6,6 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPC(3)"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 13a39992f9340afeb2032d90198fc43dca6215ef..03481f62889307e069173b471c9df236698368a8 100644 (file)
@@ -9,7 +9,6 @@ CONFIG_VIDEO_VGA=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-micro"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8)"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 66d8f9829626bddea63bfaaf173d0014e026e826..001d31bad56df5de9b4573bcba19e9be69b06df4 100644 (file)
@@ -11,7 +11,6 @@ CONFIG_USB0_VBUS_DET="PH5"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olimex-som-evb"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPC(3)"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index cf9f161614d641cd9b5622fe2a36e64b28d39731..67bea5ad465b647f155fffd42733a095768179ec 100644 (file)
@@ -14,7 +14,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-ainol-aw1"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index 949f1e0ebba74bd54b2cc287dc12181ad57a8ffe..82e01babc1e712b53ec7c2eae53ad73d8bfee8da 100644 (file)
@@ -15,7 +15,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-ampe-a76"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index f149b67c6a90586318d82d23df837f6ca180d0c0..8f1be3e5719d37a3c83e9f7accb0d0b87d9038ac 100644 (file)
@@ -8,7 +8,6 @@ CONFIG_VIDEO_COMPOSITE=y
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-auxtek-t003"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index c176059a6735af4051028cd917f10477cf6e1abf..434b0076778b18cf17192000b1f31ae938420547 100644 (file)
@@ -6,7 +6,6 @@ CONFIG_USB1_VBUS_PIN="PG13"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-auxtek-t004"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index f7e0bb7ed29e7b9def0b692bd8eecd9aba8eebb2..6cbb76c5f75b15daffda6c1b01f0507673cc37ee 100644 (file)
@@ -7,7 +7,6 @@ CONFIG_GMAC_TX_DELAY=3
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-bananapi"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 9197b00c39876e394fce2424dd42f5c431a318a8..646cb2aba78de87b433430962384f57b0e797bb2 100644 (file)
@@ -9,7 +9,6 @@ CONFIG_GMAC_TX_DELAY=3
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-bananapro"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 950c803385c3b9300cfe63b9dc7cfbf04fd1b8e7..f6346de41a819952ce75db4c9e7350954289eb63 100644 (file)
@@ -4,13 +4,13 @@ CONFIG_MACH_SUN5I=y
 CONFIG_DRAM_TIMINGS_DDR3_800E_1066G_1333J=y
 # CONFIG_MMC is not set
 CONFIG_USB0_VBUS_PIN="PB10"
+CONFIG_VIDEO_COMPOSITE=y
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-r8-chip"
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_GPIO=y
-CONFIG_AXP_DCDC2_VOLT=1300
 CONFIG_AXP_ALDO3_VOLT=3300
 CONFIG_AXP_ALDO4_VOLT=3300
 CONFIG_USB_MUSB_GADGET=y
+CONFIG_USB_GADGET=y
index 4a395cddd16c7baa830815e1ab4f58e8a58066ba..e027a47d5030595ca9388462c353208c6705becd 100644 (file)
@@ -7,7 +7,6 @@ CONFIG_USB2_VBUS_PIN=""
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-cs908"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index db1b8b1c527590d752affbf6949c35ebc1dcfbc0..dedf772fc647980806b80a914f746bf3380b48b2 100644 (file)
@@ -14,7 +14,6 @@ CONFIG_VIDEO_LCD_PANEL_HITACHI_TX18D42VM=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-chuwi-v7-cw0825"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index c21733d1abfbc076f2bfccf7562b8a02723a958a..feaeb9855ee1eca597ebe9fa83780be32cfc3e74 100644 (file)
@@ -17,7 +17,6 @@ CONFIG_VIDEO_LCD_PANEL_EDP_4_LANE_1620M_VIA_ANX9804=y
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-colombus"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 3f3e15a773895a3b69ad8d78d712661e27491460..2f5e75d760ec03204007e9969156ff322f6a4c7d 100644 (file)
@@ -6,7 +6,6 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-cubieboard2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8)"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index eadd791b03719a62f37c88f26a353724bacfdffb..a45fbb0a1214f5a68180d5c03b0f6e20c458ee2a 100644 (file)
@@ -6,7 +6,6 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-cubieboard"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPB(8)"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 00253084e2ece3db05ff293c7940b59f93ca3115..0599472d4aafd15b171187b83cc3d6bd635ddc2b 100644 (file)
@@ -11,7 +11,6 @@ CONFIG_GMAC_TX_DELAY=1
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-cubietruck"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPH(12)"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
@@ -20,3 +19,4 @@ CONFIG_CMD_GPIO=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
+CONFIG_USB_GADGET=y
diff --git a/configs/Cubietruck_plus_defconfig b/configs/Cubietruck_plus_defconfig
new file mode 100644 (file)
index 0000000..bb0b336
--- /dev/null
@@ -0,0 +1,18 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN8I_A83T=y
+CONFIG_DRAM_CLK=672
+CONFIG_DRAM_ZQ=15355
+CONFIG_DRAM_ODT_EN=y
+CONFIG_MMC0_CD_PIN="PF6"
+CONFIG_I2C0_ENABLE=y
+CONFIG_AXP_GPIO=y
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-a83t-cubietruck-plus"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="RGMII,MACPWR=SUNXI_GPD(20)"
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+CONFIG_AXP_DLDO3_VOLT=2500
+CONFIG_AXP_DLDO4_VOLT=3300
index 5de438135addeff2dcf3e9d2a3277d0b2b5cd678..5973fbf519a0f44d21a3aeac67d7af622a435c13 100644 (file)
@@ -16,7 +16,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-empire-electronix-d709"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 92986ca923c717115c4e5c1c49b21a47931fbda7..83f20049073829f16ef3412f312e64bbc2a6fa2f 100644 (file)
@@ -9,7 +9,6 @@ CONFIG_VIDEO_VGA_EXTERNAL_DAC_EN="PH25"
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-hummingbird"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPA(21)"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 8ffdd928f0f495630f8001a4053756ef7cbb0ec0..45739cd81f53bd7ebe940e5ea167308a6f141fcf 100644 (file)
@@ -15,7 +15,6 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-hyundai-a7hd"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
diff --git a/configs/Itead_Ibox_A20_defconfig b/configs/Itead_Ibox_A20_defconfig
new file mode 100644 (file)
index 0000000..fab5f34
--- /dev/null
@@ -0,0 +1,16 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN7I=y
+CONFIG_DRAM_CLK=480
+CONFIG_MMC0_CD_PIN="PH1"
+CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-itead-ibox"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8)"
+#CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPB(8)"
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
+CONFIG_ETH_DESIGNWARE=y
+CONFIG_USB_EHCI_HCD=y
index f0433b9f689b09ca5a1afd0ec2eab0b820cd873f..d460c3270b6433ac55528005d23fcdfd65e71362 100644 (file)
@@ -7,7 +7,6 @@ CONFIG_GMAC_TX_DELAY=4
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-lamobo-r1"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI,SATAPWR=SUNXI_GPB(3)"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index e5c400d6458766e771b71ccf15136b898d0dd70c..ca3b1dd6adb17073d3e8c395c1b00a8dbc8488a4 100644 (file)
@@ -8,7 +8,6 @@ CONFIG_GMAC_TX_DELAY=3
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-pcduino3-nano"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPH(2)"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index d1f93eace4fdef1ea1702f55dc1ba777ce54076e..1f245e72f5dc719d12abf1c8d9fd2bbd73a408c1 100644 (file)
@@ -6,7 +6,6 @@ CONFIG_DRAM_ZQ=122
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-pcduino3"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPH(2)"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 2b71e90128895956648f55f042e26f43e279d044..7e2f942a31c6b8525384bf9e57cb9a94f2f7856d 100644 (file)
@@ -6,7 +6,6 @@ CONFIG_USB2_VBUS_PIN=""
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-pcduino"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index aba8d01e696f99e8a8ce00fd345a55ebb8483d28..32c65fba977861262ae58c19d405c2e36a086eec 100644 (file)
@@ -5,7 +5,6 @@ CONFIG_DRAM_CLK=384
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-mk808c"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index 79035103299c96fc3ab4bca9f5b4b152620ab405..73fd4e8cb15ad3c5597f896f2c5bb4370b7cb8c0 100644 (file)
@@ -10,7 +10,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-primo73"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index b77f9e00980ba8d4028591256088e560f091a133..11f32037c4d02f181b5e72d822529a85a6efc93d 100644 (file)
@@ -13,7 +13,6 @@ CONFIG_VIDEO_LCD_PANEL_MIPI_4_LANE_513_MBPS_VIA_SSD2828=y
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-primo81"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index ef711943c4c0173b6cc1586d90b378cb8a2a0366..806fb6476b79c63306c5c2ff678e8323f8801b6a 100644 (file)
@@ -4,7 +4,6 @@ CONFIG_MACH_SUN4I=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-marsboard"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,AHCI"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index e04bc752ef9d1b2284f390d1234524ca93e4f7c8..61270987f2d6414ab0b2a58b77ec95449f8ace71 100644 (file)
@@ -7,7 +7,6 @@ CONFIG_USB2_VBUS_PIN=""
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-mele-a1000g-quad"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 95068c838d1b71b6c3c6a46f42714c99b8563e3c..93707e441b75fc01d611fdb5300b4634cd6d0078 100644 (file)
@@ -6,7 +6,6 @@ CONFIG_VIDEO_COMPOSITE=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-a1000"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,MACPWR=SUNXI_GPH(15),AHCI"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 0b834314fca9b85c4ddaf4c9c445dc2120bf83f9..bfe2a29feaa7eec879e7e175271560f54e0b91c2 100644 (file)
@@ -7,7 +7,6 @@ CONFIG_USB2_VBUS_PIN=""
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-i7"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 5dd61c08362ba4d0d38e443045a84c2026b9b727..0ed5da1ba4e52175d9136191406872e4c1b7144e 100644 (file)
@@ -9,7 +9,6 @@ CONFIG_VIDEO_COMPOSITE=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-m3"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 3cdd67fd34cc83b5618a08f50c86135f4a407b71..fdb5ba4e498d76111bf7b2a6122269ee359973d9 100644 (file)
@@ -8,7 +8,6 @@ CONFIG_VIDEO_COMPOSITE=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-m5"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,AHCI,STATUSLED=234"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 6ae2e0bbf9d38f33c300a81fe0b3c6ececa12281..da762266525ca47618d3a8bdf731996200476ce9 100644 (file)
@@ -7,7 +7,6 @@ CONFIG_USB2_VBUS_PIN=""
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-m9"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 8425d1f441d854204fdf4ce31b887388bf173cf1..8013359947023a8590e6628ce3f34e5bf7e2cea3 100644 (file)
@@ -6,7 +6,6 @@ CONFIG_VIDEO_COMPOSITE=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-mini-xplus"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index bd43df344afdbc68c2ceb98b6050291848a235ea..330ee47db20adb57e4377e5c7857251933404ad3 100644 (file)
@@ -10,7 +10,6 @@ CONFIG_GMAC_TX_DELAY=3
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-orangepi"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 1e790e84a3bae74e523dce3f0c11eaa99fbbee5a..4156c35bc5cb7326989471c1ea4fe9a9fcf9b7f1 100644 (file)
@@ -12,7 +12,6 @@ CONFIG_GMAC_TX_DELAY=3
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-orangepi-mini"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Sinlinx_SinA31s_defconfig b/configs/Sinlinx_SinA31s_defconfig
new file mode 100644 (file)
index 0000000..ae1f1e8
--- /dev/null
@@ -0,0 +1,20 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN6I=y
+CONFIG_DRAM_CLK=432
+CONFIG_DRAM_ZQ=251
+CONFIG_MMC0_CD_PIN="PA4"
+CONFIG_MMC3_PINS="PC"
+CONFIG_MMC_SUNXI_SLOT_EXTRA=3
+CONFIG_USB1_VBUS_PIN=""
+CONFIG_USB2_VBUS_PIN=""
+CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-sina31s"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC"
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+CONFIG_ETH_DESIGNWARE=y
+CONFIG_AXP_DLDO1_VOLT=3300
+CONFIG_USB_EHCI_HCD=y
index 2dd8d7e7b8cc227c093e0c158925eea588464897..20d3f93e85d259c08df257aaa22b466650e53de4 100644 (file)
@@ -6,7 +6,6 @@ CONFIG_DRAM_ZQ=15291
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-sinlinx-sina33"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index c61ed7bfc8d04bf6e9501c90b0eeb1717e872bd3..a5f8e6aec8705a61018886399ff67e85018d2eca 100644 (file)
@@ -7,7 +7,6 @@ CONFIG_USB2_VBUS_PIN=""
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-sinovoip-bpi-m2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 2ff0058b7d7300119c00fd9ae31eef54c96b52da..ffb9b7a525bc88d83af9999b53f29d338753029b 100644 (file)
@@ -14,5 +14,3 @@ CONFIG_SPL=y
 # CONFIG_CMD_FPGA is not set
 CONFIG_AXP_DCDC1_VOLT=3000
 CONFIG_AXP_DCDC5_VOLT=1200
-CONFIG_AXP_ALDO2_VOLT=0
-CONFIG_AXP_ALDO3_VOLT=0
index 46e697ab1c0f071b8e2fec0ac02926f9aba0496b..dc71ddea9011d98fa36a0db9dc1b59e254fc16c1 100644 (file)
@@ -20,7 +20,6 @@ CONFIG_VIDEO_LCD_TL059WV5C0=y
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-utoo-p66"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index ce1e1fd82f290d83bf75a5ef1a7e80cf647770c2..a01b4c12f41f43b427b2f23dd53f70e015ab4b23 100644 (file)
@@ -13,7 +13,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-wexler-tab7200"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index 31d09d431eeca4e9fea549bc0a2cd10bf8bdc5d8..c3ceedb947921c0851f1f3fa6e9b1e18c5b6508c 100644 (file)
@@ -11,7 +11,6 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-wits-pro-a20-dkt"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 7cc905174a91172949a50e41690a7b989373986b..eb1b53151ecf08b3c2bb0b88cbb12b96e903e771 100644 (file)
@@ -7,7 +7,6 @@ CONFIG_USB1_VBUS_PIN="PG12"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-wobo-i5"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index 2e11f7c439b143b49d67ed9cdf478d728a64ab9b..cdde2bc71f18a84e9aa6037e34ebb8b56ee82920 100644 (file)
@@ -19,7 +19,6 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-yones-toptech-bd1078"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
diff --git a/configs/Yones_Toptech_BS1078_V2_defconfig b/configs/Yones_Toptech_BS1078_V2_defconfig
new file mode 100644 (file)
index 0000000..26f5923
--- /dev/null
@@ -0,0 +1,24 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN6I=y
+CONFIG_DRAM_CLK=420
+CONFIG_DRAM_ZQ=251
+CONFIG_MMC0_CD_PIN="PA8"
+CONFIG_USB0_VBUS_PIN="AXP0-VBUS-ENABLE"
+CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT"
+CONFIG_USB0_ID_DET="PA15"
+CONFIG_AXP_GPIO=y
+CONFIG_VIDEO_LCD_MODE="x:1024,y:600,depth:24,pclk_khz:70000,le:120,ri:180,up:17,lo:15,hs:20,vs:3,sync:3,vmode:0"
+CONFIG_VIDEO_LCD_DCLK_PHASE=0
+CONFIG_VIDEO_LCD_BL_EN="PA25"
+CONFIG_VIDEO_LCD_BL_PWM="PH13"
+CONFIG_VIDEO_LCD_PANEL_LVDS=y
+CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-yones-toptech-bs1078-v2"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
+CONFIG_AXP_DLDO1_VOLT=3300
+CONFIG_USB_MUSB_HOST=y
index 276a6507fcc550274287195b4a0357d112b2b2c6..bda87272c6c3ff48e0614da1fe6375ffa0b05ce6 100644 (file)
@@ -12,4 +12,6 @@ CONFIG_SYS_EXTRA_OPTIONS="NAND"
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 4ba2579d9467ca09b31c72990f115c870d086330..8b6fa20be674e984930cf0e7ba911856f0012dc6 100644 (file)
@@ -17,4 +17,6 @@ CONFIG_DFU_TFTP=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 060aa1cd98eccb2ddf37c0c7aaa32e34cc873ff0..70fc5d70bf7b99b806e25a3b76e23025205467f7 100644 (file)
@@ -24,3 +24,5 @@ CONFIG_DM_ETH=y
 CONFIG_SYS_NS16550=y
 CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
index 836950c77d472c63bc23d406a27e79512c0603b9..8eaa1239864d46ea0ab3b3a7e6dbb976510d6469 100644 (file)
@@ -16,4 +16,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index f336dfd2394725c225159920a9497aa368e4e99a..85a0ba9e57058ce1aa4d1dd6dbfc86e8436f43e8 100644 (file)
@@ -12,4 +12,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 707014b77520e10cb97cd08d386f17066043e5cb..f3a26c3c9e4b3db5f5503d9b6711db385935da89 100644 (file)
@@ -9,4 +9,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 665dad3391253e5905ad384d378fe017a808cb5a..92eb46cd8b8b63891ab3dd152d98d9ea4c4ae30c 100644 (file)
@@ -12,4 +12,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 17370bb6ca17ef22cfe4210ddf4235a3d1b8b221..453714bc28920b5c4142922e38d2b2a672082041 100644 (file)
@@ -12,4 +12,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 7f129726082da5d02f0915f7c6818f5b016e1ecd..0c7eda7c06307062e47a10ac3a5965aa1f91c272 100644 (file)
@@ -18,4 +18,6 @@ CONFIG_DM_ETH=y
 CONFIG_SYS_NS16550=y
 CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_RSA=y
index 1d79ba19ebd7e6874b0442b52a646db53a387282..356f6fd9d882ca78a9c0552b1e6f838b4dceb823 100644 (file)
@@ -20,3 +20,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
index fa54ebd72183c6c4fca047e6848c8a6fffc852b8..2e2827fe2245eb49a9755d0ed179abd003fc23d9 100644 (file)
@@ -24,3 +24,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
index 8ef28f38be9243e6e0d0c3a45bdd369683d6d3e1..cc830061dfd2ea4c2e79d90b0b65299721ff42c7 100644 (file)
@@ -11,4 +11,6 @@ CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 71435971397ecd7bd9ca7b835a527a733eac47c4..a720c14a450d47398288fb17d1bbdb58cefe3c84 100644 (file)
@@ -10,4 +10,6 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index a9a862b7aef274f248370738b07646cf2c15ee4b..6db389b74fcaff40fd2a80af160625ec7f4be634 100644 (file)
@@ -9,4 +9,6 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 2c73dbe376b90ebd9efc748a06438b8500617f51..cbaf5a588f80e5f9e4cfeb4e3553e68e52b24ae5 100644 (file)
@@ -10,4 +10,6 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index b370d6c0eda4957fb515160ec38a0e036d61a96e..152d06f069f9bca17cd82870095273ef0bd906ac 100644 (file)
@@ -17,4 +17,5 @@ CONFIG_PCI_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_USE_PRIVATE_LIBGCC=y
index 944547c68d1ae22ca1c1b55284467552246fc896..ce4a58469b8235f106f1d9ab56779543188d5e17 100644 (file)
@@ -9,7 +9,6 @@ CONFIG_VIDEO_COMPOSITE=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-ba10-tvbox"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 4b1bc496cf29378903b9b35fce7bae395dc04810..222c3192984854092f6382f1ed768c14ffa1aa46 100644 (file)
@@ -8,3 +8,5 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
index 2e7aff9966d221ddf1d5c2f9009506408b481649..7e1e6822157d4d11bd976e40b634af691754b775 100644 (file)
@@ -8,3 +8,5 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
index 7ec0d30767f6a3cfc86fdcfee9d991c332fd7336..ba57944b20452b49b15ce9f1d68515c7ee0b179d 100644 (file)
@@ -7,3 +7,5 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
index 47eb31dd6ddcdc6cbb348ee616edce389ae794f5..36849d545b0dc4b6e2e1c71e17a504babf2781fb 100644 (file)
@@ -8,3 +8,5 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
index 9e6a5c32ed7f857e3d4e9d8cd53df2d1862afbc9..9e01f31819f343688500a7691d30d039c875b364 100644 (file)
@@ -21,4 +21,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA20_SLINK=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_USE_PRIVATE_LIBGCC=y
index 6d7c20d013744b52d6fe7999d1e71ab64b543802..2a81ded17e939e3753b9ef16ccaeb2add00b5c36 100644 (file)
@@ -11,4 +11,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 910ddc7810c9137a847b15db509ab58f43d10798..d2b35cd95112e0eeb5ed83cb956fda0399117769 100644 (file)
@@ -11,4 +11,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 8fc8e64b5ddb5651280e968841a84ea9795de43f..20b149231a39047d1ec39a24cae47038c1940378 100644 (file)
@@ -8,4 +8,6 @@ CONFIG_SYS_PROMPT="CGT-QMX6-Quad U-Boot > "
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index b69da2fb62ebcd0d154594b0157dc2244311beda..c36967dea1dee2acc9fd8f758ae72310541ee25e 100644 (file)
@@ -18,6 +18,7 @@ CONFIG_PWM_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_VIDEO=y
 CONFIG_VIDEO_TEGRA20=y
 CONFIG_USE_PRIVATE_LIBGCC=y
index 35b29f9615fd40e13e1cfb8e23f054453a72bcda..6fd877b73b41a42456b2d1cc31ac775b9be69104 100644 (file)
@@ -15,4 +15,5 @@ CONFIG_CMD_GPIO=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_USE_PRIVATE_LIBGCC=y
index 27a41e759ab28c2923657fe537dd7d2fafb2add7..267a4536b37701a495eebe8c859e052f05ad17ef 100644 (file)
@@ -17,3 +17,5 @@ CONFIG_NAND_VF610_NFC=y
 CONFIG_SYS_NAND_VF610_NFC_60_ECC_BYTES=y
 CONFIG_FSL_LPUART=y
 CONFIG_FSL_DSPI=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
diff --git a/configs/colorfly_e708_q1_defconfig b/configs/colorfly_e708_q1_defconfig
new file mode 100644 (file)
index 0000000..5958d33
--- /dev/null
@@ -0,0 +1,25 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN6I=y
+CONFIG_DRAM_CLK=432
+CONFIG_DRAM_ZQ=251
+CONFIG_MMC0_CD_PIN="PA8"
+CONFIG_USB0_VBUS_PIN="AXP0-VBUS-ENABLE"
+CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT"
+CONFIG_USB0_ID_DET="PA15"
+CONFIG_AXP_GPIO=y
+CONFIG_VIDEO_LCD_MODE="x:800,y:1280,depth:24,pclk_khz:64000,le:20,ri:34,up:1,lo:16,hs:10,vs:1,sync:3,vmode:0"
+CONFIG_VIDEO_LCD_DCLK_PHASE=0
+CONFIG_VIDEO_LCD_BL_EN="PA25"
+CONFIG_VIDEO_LCD_BL_PWM="PH13"
+CONFIG_VIDEO_LCD_PANEL_LVDS=y
+CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-colorfly-e708-q1"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
+CONFIG_AXP_DLDO1_VOLT=3300
+CONFIG_AXP_DLDO2_VOLT=1800
+CONFIG_USB_MUSB_HOST=y
index 1aabf266a055cfa01314c849ae3a9eb12c5ae309..3a9e4d705abe1ae3fb20f1d452233c23f1d8b69d 100644 (file)
@@ -10,4 +10,6 @@ CONFIG_SYS_PROMPT="U-Boot> "
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 15bd9f1df680eb4ce0327f2cd5aa00fef30941f0..5e696a1499eb5e58655fe7290975898a0c63c6a7 100644 (file)
@@ -19,4 +19,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_USE_PRIVATE_LIBGCC=y
diff --git a/configs/difrnce_dit4350_defconfig b/configs/difrnce_dit4350_defconfig
new file mode 100644 (file)
index 0000000..8fc6532
--- /dev/null
@@ -0,0 +1,23 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN5I=y
+CONFIG_DRAM_CLK=408
+CONFIG_MMC0_CD_PIN="PG0"
+CONFIG_USB0_VBUS_PIN="PG12"
+CONFIG_USB0_VBUS_DET="PG1"
+CONFIG_USB0_ID_DET="PG2"
+CONFIG_AXP_GPIO=y
+# CONFIG_VIDEO_HDMI is not set
+CONFIG_VIDEO_LCD_MODE="x:480,y:272,depth:18,pclk_khz:12000,le:1,ri:43,up:1,lo:12,hs:1,vs:1,sync:3,vmode:0"
+CONFIG_VIDEO_LCD_POWER="AXP0-0"
+CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
+CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-difrnce-dit4350"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
+CONFIG_USB_MUSB_HOST=y
index 0a5f70bcce60a102f4f416c492d724ddfd7d5cf7..da249926d9105c01400783e559fa906cdbf2980a 100644 (file)
@@ -23,3 +23,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
index 916016da48d6f1bae1b06649ed3de3595b9ac138..9039b15df37a640a961f0cd42f206e32c445b3c8 100644 (file)
@@ -22,3 +22,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
index 7aaef1b24206da4b08b04470ac91fe1b00273654..9be4c2da703dfae2fed7acb22965284295ad5bce 100644 (file)
@@ -13,4 +13,6 @@ CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 0789cff7ae85de0119b8237de89394511acf4088..b77c7c31f7a171becaadc448c1f9cc01f46306c3 100644 (file)
@@ -13,4 +13,6 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 768920b64aedb225391baab553ce6065ea3662a9..1a1fb6de73babc91cfb2991a74b966d0c48f1f47 100644 (file)
@@ -14,4 +14,6 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 967f2ff36470d43835666a9a7bf7d1c50adc68d5..ec339853e5c8393e9cd8eb1e8b69c4e4c1721612 100644 (file)
@@ -12,4 +12,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dserve_dsrv9703c_defconfig b/configs/dserve_dsrv9703c_defconfig
new file mode 100644 (file)
index 0000000..029ca89
--- /dev/null
@@ -0,0 +1,22 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN4I=y
+CONFIG_DRAM_CLK=360
+CONFIG_MMC0_CD_PIN="PH1"
+CONFIG_USB0_VBUS_PIN="PB9"
+CONFIG_USB0_VBUS_DET="PH5"
+CONFIG_USB0_ID_DET="PH4"
+CONFIG_VIDEO_LCD_MODE="x:1024,y:768,depth:18,pclk_khz:80000,le:479,ri:544,up:5,lo:26,hs:1,vs:1,sync:3,vmode:0"
+CONFIG_VIDEO_LCD_DCLK_PHASE=0
+CONFIG_VIDEO_LCD_POWER="PH8"
+CONFIG_VIDEO_LCD_BL_EN="PH7"
+CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_VIDEO_LCD_PANEL_LVDS=y
+CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-dserve-dsrv9703c"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
+CONFIG_USB_MUSB_HOST=y
index 1a7b07d3a0b18fbd3fad15c7fffdcf33d7b2c10f..196950da86370faf5fef478a0e3f83973fa8e38a 100644 (file)
@@ -17,3 +17,4 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
index d700760ceabf1265595a56a79e151663e45b14c8..09ad33080a1058c7d91aef404ca9317c8ed8d684 100644 (file)
@@ -17,7 +17,6 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-ga10h-v1.1"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index a78d3b6e3ec8f9ac2dd14865084240657c23548e..a8d339ced412021b4e0579cfd17b8b706990871c 100644 (file)
@@ -16,7 +16,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PH0"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a23-gt90h-v4"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 686bed6cd4fc29420789e3503a5fd42e99be7467..788ba9dd2a4c5a23a236b16211830bd38ea1848d 100644 (file)
@@ -16,4 +16,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_DM=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index daa4e9d2b821eecca94c5c902a1c99b73263b783..a15a15ad4ba32adef4cb3299b02b785317047198 100644 (file)
@@ -6,7 +6,6 @@ CONFIG_VIDEO_COMPOSITE=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-i12-tvbox"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,MACPWR=SUNXI_GPH(21)"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 1fbf66af0b7a7a1a437e6f941715c8742dc209ac..3f1624c62159285d8e6ec85cd22ec7d72c4c5f6f 100644 (file)
@@ -14,7 +14,6 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-inet-3f"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index 7d91aec1697aeb0728e193f31a04021a23ae6245..6c4cd56ec6ecab017572efd2d857efdaca066cc7 100644 (file)
@@ -14,7 +14,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-inet-3w"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index ba04b60b1ce2cf095019369c6e40ae3ad256be28..00e1458fccbceb879bf561844449f8184db827bd 100644 (file)
@@ -13,7 +13,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-inet-86vs"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
diff --git a/configs/icnova-a20-swac_defconfig b/configs/icnova-a20-swac_defconfig
new file mode 100644 (file)
index 0000000..548a07e
--- /dev/null
@@ -0,0 +1,21 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN7I=y
+CONFIG_DRAM_CLK=384
+CONFIG_OLD_SUNXI_KERNEL_COMPAT=y
+CONFIG_MMC0_CD_PIN="PI5"
+CONFIG_USB0_VBUS_PIN="PG11"
+CONFIG_USB0_VBUS_DET="PH7"
+CONFIG_USB1_VBUS_PIN="PG10"
+CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:24,pclk_khz:33000,le:45,ri:209,up:22,lo:22,hs:1,vs:1,sync:3,vmode:0"
+CONFIG_VIDEO_LCD_POWER="PH22"
+CONFIG_VIDEO_LCD_PANEL_LVDS=y
+CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-icnova-swac"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,CMD_BMP,CMD_UNZIP"
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+CONFIG_ETH_DESIGNWARE=y
+CONFIG_USB_EHCI_HCD=y
index 0b9c604ca27fa3d27bf2ddb13c534b9477d0a2d8..1c682938df1b526a5f8414ac4384e971a48ee963 100644 (file)
@@ -14,7 +14,6 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-inet1"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index 744051a9dc43ea8b0cfd110f419f14027ca1ed0b..a7b3a9fdca11d4838fa68a891f1a41ed783e1798 100644 (file)
@@ -13,7 +13,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-inet97fv2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index 1897daa8087695b1a59d69e26e361085131ef059..c0c6cb2f402939621b119ecacca5f95ae5ddd128 100644 (file)
@@ -15,7 +15,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-inet-98v-rev2"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 662f2e2e369214ad8bbccef4c39557f54e559f17..0a17cf770c763ff458436cc354d735e23ab9ad5b 100644 (file)
@@ -13,7 +13,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-inet9f-rev03"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index 1a165f03226abcf1cacabbd5e131fe1b4580a788..443a1c72aee53167fa9a0f950c55330b76ec68a2 100644 (file)
@@ -7,7 +7,6 @@ CONFIG_VIDEO_COMPOSITE=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-jesurun-q5"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,MACPWR=SUNXI_GPH(19)"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index d964f1ca501c6879f7da4223283595db61700c80..5e876242a13e8dcb399646771d534df8f4475b18 100644 (file)
@@ -21,4 +21,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_USE_PRIVATE_LIBGCC=y
index 1e5c9185c14bb05aa2c285cda5edb947ad0fb469..4cbe375ea4712b621c4cd150536eea009611fc14 100644 (file)
@@ -12,3 +12,4 @@ CONFIG_CMD_GPIO=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_MUSB_GADGET=y
+CONFIG_USB_GADGET=y
index 378dc3026bba253ce14927d06fcd67a01fef7ff9..39ce550ff44f01e38c46521969149f1cc0dba6f5 100644 (file)
@@ -10,3 +10,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4"
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
 CONFIG_SPI_FLASH=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
index a5722e7ea0cebc48962225f26a6974efdc7dbb35..07865d896b2d531e0e9876200d15a65291f4f37e 100644 (file)
@@ -8,7 +8,6 @@ CONFIG_USB2_VBUS_PIN=""
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-mixtile-loftq"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPA(21)"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 316b7e8765a8f1a1c787e0ccb5a7f8607b66f019..03e58cddda549985d713cb0c3296224adf53e745 100644 (file)
@@ -7,7 +7,6 @@ CONFIG_USB1_VBUS_PIN="PB10"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-mk802"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index bc24b4c88808258274eb609a35edd758cdd34601..922f8c3b503a796383681e588792762126194a75 100644 (file)
@@ -5,7 +5,6 @@ CONFIG_USB2_VBUS_PIN="PH12"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-mk802"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="USB_EHCI"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 6636e7fdf178d3fe2dcd41c1fe3dda3507d79e81..2a359beed8de42f830120fb53255a921f7ea8d1b 100644 (file)
@@ -4,7 +4,6 @@ CONFIG_MACH_SUN4I=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-mk802ii"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index 46b8a9f8b5283be97b758b5cfb5897b1efc47f8a..ba5301778768cf050bce83eb8165f6c11653d213 100644 (file)
@@ -7,4 +7,6 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/mx6dl.cfg,MX6
 CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 45a7ec3be8669dac13dde6b10017b87a6705ff1a..7a67bf5fa32401a93055ed07c6b703ed5ec4c07f 100644 (file)
@@ -7,4 +7,6 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sabresd/mx6dlsabresd.cfg
 CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 0877c41cf72235eb388b1a8f865d999f00012bf1..c27aa3875c6f3d4bb1a3bcd069312da8ef2b985a 100644 (file)
@@ -5,4 +5,6 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/mx6qp.cfg,MX6
 CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 36ebc8991ddd3963015c69601e1d33aa30a48fb2..7699cbb33c2c3f4979c93240015b67716a7ff46f 100644 (file)
@@ -7,4 +7,6 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg,
 CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index fc8323c66ba3ac08dbbcbd0bd25cc4133b4252d0..324f46f1e0d0a63139d6cb3ed0c0afb78823cdfb 100644 (file)
@@ -9,4 +9,6 @@ CONFIG_DM=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_DM_THERMAL=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 224e6ed5bdfbaa637cba0c247e9347cc08c732ea..6c9e27e927837344661697637160df811543abc4 100644 (file)
@@ -7,4 +7,6 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sabresd/mx6q_4x_mt41j128
 CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 406777ca45686ee49da835395562c31f4c766e4c..131bd2191931fa63491162e45fab45cd792cddb9 100644 (file)
@@ -8,4 +8,6 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,SPL,MX6Q"
 CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 40b0e7e7e99f549e6821fe4752dd2b0f726ce3ca..08d19f9b4b507bd79c4920aef7946b92179e6961 100644 (file)
@@ -12,4 +12,6 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 40da15c77702461d6fb984251396ba21ac81a663..54f11e905147e5834b08e4910c18488e1736fd29 100644 (file)
@@ -7,4 +7,6 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl2g.cfg
 CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 5f7c17a942a83ce860ace48b087c83ef9dc83b02..f2ea84186c3611ac141c03874e67869d7a803d15 100644 (file)
@@ -7,4 +7,6 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl.cfg,M
 CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 8707d7e55e9c0a7457537700f7a6c127e5e7db0e..cf654d703bd7de313f177495d35ed9c87cfbd476 100644 (file)
@@ -7,4 +7,6 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q2g.cfg,
 CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index fbe9b6f32e37b3fedec411fb9cd986980e874f8a..de8bb2266faaad407c06af8f053b1b9e72acff0d 100644 (file)
@@ -7,4 +7,6 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX
 CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 078fc20ce8815a23f426c36e1ca9d7ae10bc7155..6030afca99c2d13c6e6eb7064357385b7cf62fd5 100644 (file)
@@ -7,4 +7,6 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6s1g.cfg,
 CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 707fb58b34e18508bbbaf8ce654e08a763f521f2..fef827ed32d569467b9c4d44b26158350f07d49c 100644 (file)
@@ -7,4 +7,6 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6s.cfg,MX
 CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index fa3c70090769678faa03e15104460c6b8c9dd8a4..de7e9eb6a74ddab2b8f910d67b1cd2c632291e29 100644 (file)
@@ -34,6 +34,7 @@ CONFIG_TEGRA114_SPI=y
 CONFIG_TPM_TIS_INFINEON=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_VIDEO=y
 CONFIG_DISPLAY=y
 CONFIG_VIDEO_TEGRA124=y
index 3b543e8744612a2d932017e565a0d9eb0b154c87..a5f25cd6f9d00bd1d59923c63c8187de49df00a5 100644 (file)
@@ -19,5 +19,6 @@ CONFIG_PMIC_S2MPS11=y
 CONFIG_DM_REGULATOR=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_VIDEO_BRIDGE=y
 CONFIG_ERRNO_STR=y
index 1f4016b8a74a2de4552ee7f67208e2a1fe9bb4d9..1634ed662200603508c6a9bedcc19464ee8b82ef 100644 (file)
@@ -23,4 +23,5 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_MAX77686=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_ERRNO_STR=y
index 1fb1f71f7f0a9d054de06ecf91c5dec23f7477b4..798a7e55e5debd538d32bebf402054f3792d80cd 100644 (file)
@@ -7,4 +7,6 @@ CONFIG_SYS_EXTRA_OPTIONS="NAND"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index d1221bf65656bca0a182a2150367af5fc1ac39ca..02202d5edb00607c01e5c4082f3a658f0e2e1cc7 100644 (file)
@@ -11,4 +11,6 @@ CONFIG_SYS_PROMPT="OMAP Logic # "
 # CONFIG_CMD_FPGA is not set
 CONFIG_CMD_GPIO=y
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index cdd80cc21d53633c2fa04c46e93b5386cb5d4975..50d83726c4ee961bf43ad3706779f46d176cb19e 100644 (file)
@@ -7,4 +7,6 @@ CONFIG_SPL=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/orangepi_2_defconfig b/configs/orangepi_2_defconfig
new file mode 100644 (file)
index 0000000..ff9ac09
--- /dev/null
@@ -0,0 +1,18 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN8I_H3=y
+CONFIG_DRAM_CLK=672
+CONFIG_DRAM_ZQ=3881979
+CONFIG_DRAM_ODT_EN=y
+CONFIG_MMC0_CD_PIN="PF6"
+# CONFIG_VIDEO is not set
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-2"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
+CONFIG_SY8106A_POWER=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB1_VBUS_PIN="PG13"
index aaf0f68c354fa93cab015b0bbf3558848ce29f4e..4e9051db204f97962bde732e0ed9d3e574911459 100644 (file)
@@ -14,3 +14,6 @@ CONFIG_SPL=y
 CONFIG_CMD_GPIO=y
 CONFIG_SY8106A_POWER=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_USB1_VBUS_PIN=""
+CONFIG_USB2_VBUS_PIN=""
+CONFIG_USB3_VBUS_PIN=""
index e52dcfc718d5b5cb6ce4a8f4f92b6a153767e400..ff124bdf7ca1dd375102ff12db79b5d814fbe0b6 100644 (file)
@@ -4,6 +4,8 @@ CONFIG_MACH_SUN8I_H3=y
 CONFIG_DRAM_CLK=672
 CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
+CONFIG_MMC0_CD_PIN="PF6"
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 # CONFIG_VIDEO is not set
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-plus"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
@@ -14,3 +16,5 @@ CONFIG_SPL=y
 CONFIG_CMD_GPIO=y
 CONFIG_SY8106A_POWER=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_USB1_VBUS_PIN="PG13"
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPG(11)"
index 95c8ebcbd6b7dfc495e5b9cd2330ed8cb540494b..eda222522ca305201b2e35a393c01a986ea8b985 100644 (file)
@@ -13,3 +13,4 @@ CONFIG_SYS_PROMPT="ORIGEN # "
 CONFIG_OF_CONTROL=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
index 6282acf3ba7927f22dcf5e8e11fa7192c477ca1e..b6f2954603b5439e18fd9047fd2d7441ffc3cf6e 100644 (file)
@@ -18,3 +18,4 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
index a8b1247b3a2201763ca67fc63e483fc00ab0f78a..f7cc8e033b7ff979a3d273bfcd5434f9fd8fe67a 100644 (file)
@@ -20,3 +20,4 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
index 04df7e95b937e3641a66d59b9751aa2d7a04711d..4d0986f22148e64e31de13b003e36ce8ee342591 100644 (file)
@@ -18,3 +18,4 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
index 97ee71d44c9972f47fd62d5ef36a55ec71db1b93..237b4c7edcddb3c44f490689d99e862246379bc7 100644 (file)
@@ -6,4 +6,6 @@ CONFIG_SPL=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/polaroid_mid2809pxe04_defconfig b/configs/polaroid_mid2809pxe04_defconfig
new file mode 100644 (file)
index 0000000..019f6da
--- /dev/null
@@ -0,0 +1,25 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN8I_A23=y
+CONFIG_DRAM_CLK=432
+CONFIG_DRAM_ZQ=63351
+CONFIG_MMC0_CD_PIN="PB4"
+CONFIG_USB0_VBUS_PIN="AXP0-VBUS-ENABLE"
+CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT"
+CONFIG_USB0_ID_DET="PH8"
+CONFIG_AXP_GPIO=y
+CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:36,ri:210,up:18,lo:22,hs:10,vs:5,sync:3,vmode:0"
+CONFIG_VIDEO_LCD_DCLK_PHASE=0
+CONFIG_VIDEO_LCD_POWER="PH7"
+CONFIG_VIDEO_LCD_BL_EN="PH6"
+CONFIG_VIDEO_LCD_BL_PWM="PH0"
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-a23-polaroid-mid2809pxe04"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5"
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
+CONFIG_AXP_DLDO1_VOLT=3300
+CONFIG_USB_MUSB_HOST=y
index 99884ed35c36a0e7f4f55ff90b0a875ac022da2d..d9b3b45adf969f6a49dea1ee9f7b017f76719039 100644 (file)
@@ -14,7 +14,6 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-pov-protab2-ips9"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index 5b32bb167f9a705034bdbe864d7e8f51912a97ce..88d75b5fc22883b4487ad4a0dbf479447954b3f9 100644 (file)
@@ -13,4 +13,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index b6ff5285181d3b457a42baba28720bd8f8b561d9..205359efb5d207007dcf3aed322998fe24181eaf 100644 (file)
@@ -15,7 +15,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-q8-tablet"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 398546a35e68dff9f874f0da47edb33934228067..927ab2af3694b096fd4dd4745bad65053c87ff49 100644 (file)
@@ -16,7 +16,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PH0"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a23-q8-tablet"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 3c3238745e00c8c6bc7dd731735e37525f753fd8..755f4ee08c2ffe906860e83a392100ee430ab93b 100644 (file)
@@ -16,7 +16,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PH0"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-q8-tablet"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index aed4fbad0c88c8fa222d70b22ed56492a8528435..a8dfa0d0239318b25063ca017b7ca07ae76cce82 100644 (file)
@@ -16,7 +16,6 @@ CONFIG_VIDEO_LCD_BL_PWM="PH0"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-q8-tablet"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index edbf2eae3fdffad0081ee67e65417e7bfb3ca082..d6387fc7a0fa5cb0ab1516de09dd5d775fed1ff0 100644 (file)
@@ -6,7 +6,6 @@ CONFIG_USB1_VBUS_PIN="PG13"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-r7-tv-dongle"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index 6e7d0d265fef26dafaba9cc19637f2b6743a0017..8c3c735fab162df347e3aa228e589aa772b69f10 100644 (file)
@@ -12,4 +12,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 7a4011ecb744f76463993bd31d221f6c37d26ac4..2fb5c4c7f03cfd0b905a4b86e71ae2e47d38a94c 100644 (file)
@@ -13,4 +13,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index fc0a45e32723fd09c0cbff8fdd756b10c02fcffe..eb0604e80519040b85154e0e4c8212f94f6585f7 100644 (file)
@@ -11,3 +11,5 @@ CONFIG_SYS_PROMPT="Goni # "
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 # CONFIG_CMD_MISC is not set
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
index 61f6d1fb0127cd77177d9b742855c3ad8c87dd5d..7f27b4ceec5b4e6865f4a26b1c7b698df3ea97e8 100644 (file)
@@ -12,3 +12,4 @@ CONFIG_SYS_PROMPT="Universal # "
 CONFIG_OF_CONTROL=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
index d6bc70e2282c509864bb068db46485db47ffe264..7f89698fba20900ffbdbdfcbab04df86c07c9ac9 100644 (file)
@@ -10,4 +10,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_MMC"
 CONFIG_CMD_SF=y
 # CONFIG_CMD_FPGA is not set
 CONFIG_SPI_FLASH=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index eb2f1f0f0876f6e25dfd4b2f4bb4eaa51fb82054..28318faff44488e0f6c70807d8895f8160c04806 100644 (file)
@@ -10,4 +10,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_SERIALFLASH"
 CONFIG_CMD_SF=y
 # CONFIG_CMD_FPGA is not set
 CONFIG_SPI_FLASH=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 4a97da184832aacb4f0d338e1eedc7686604382c..f8cb30951d8859e33a0cf91d65085b8f6a16c301 100644 (file)
@@ -8,4 +8,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_MMC"
 # CONFIG_CMD_FPGA is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 968cd6602b9a49a25fc43772e6a7d937b14cbaec..3a7cc7da721a7e1abbc9245fa952eb16e0b295dc 100644 (file)
@@ -8,4 +8,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_NANDFLASH"
 # CONFIG_CMD_FPGA is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index bc98e6b169ed07fb351b59fe9fa96da2cf0682dd..e562f5a23a541d4c57b34215076db324fb63612b 100644 (file)
@@ -8,4 +8,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_SERIALFLASH"
 # CONFIG_CMD_FPGA is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index f1261abe4255ffde4d50028e0e7f32cea49efe9b..c0c04168b73f27dc4f83229b6035e19159e4dc59 100644 (file)
@@ -10,4 +10,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC"
 # CONFIG_CMD_FPGA is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 0e53b320e480dbc34ae7c5e959856e1ccbc24f6f..96aefc712ad1f4df51d886fe44eafb89101d736d 100644 (file)
@@ -10,4 +10,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH"
 # CONFIG_CMD_FPGA is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index a1b2c53bbba85171bbde200b1e016bb6d794b9c8..b9d1c3ccb72015169f055ec4266c53080267b690 100644 (file)
@@ -10,4 +10,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH"
 # CONFIG_CMD_FPGA is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index bf81f9b38debbbd5dfdfaf2bc99fe48a1ffe0c64..2a17e208f7125927c39473a87be53fbce39b996e 100644 (file)
@@ -10,4 +10,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC"
 # CONFIG_CMD_FPGA is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index c78266ec80371b3dd6f5532b2226317a0ec3e5d9..f92fe5063073231306ce71fb901656a404f1a3c9 100644 (file)
@@ -10,4 +10,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH"
 # CONFIG_CMD_FPGA is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 7c10aab143fb9bab179f27e4545e768bf3b3bce8..c5a34314d35e010063e8a2566aa99491e461e808 100644 (file)
@@ -10,4 +10,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH"
 # CONFIG_CMD_FPGA is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 2cb9c711eec7f3ef9acfe10ee72d6641aca48424..84ba329d0250074aa1663276eb94807d7a8b09bc 100644 (file)
@@ -8,4 +8,6 @@ CONFIG_SYS_PROMPT="U-Boot# "
 CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_PROMPT="Autobooting in %d seconds, press \"<Esc><Esc>\" to stop\n"
 CONFIG_AUTOBOOT_STOP_STR="\x1b\x1b"
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 370c5fd3aef10d47497afdb8aadacc1b6bf5748d..313c48901bb88d13c912c978faeb5a2cb7ddbcdd 100644 (file)
@@ -12,4 +12,5 @@ CONFIG_CMD_GPIO=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_MUSB_GADGET=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 7b60d954795c2027f168d834caf0c20ce5fc7bde..d93600bc49e20866105b767d096b3724ffd80d53 100644 (file)
@@ -26,3 +26,4 @@ CONFIG_CADENCE_QSPI=y
 CONFIG_DESIGNWARE_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
index 6a487f430370acc5e418c22d8524aeba76d6d3f1..f77e124ed9b9896f5ed0ac2f0042b69129eb2700 100644 (file)
@@ -26,3 +26,4 @@ CONFIG_CADENCE_QSPI=y
 CONFIG_DESIGNWARE_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
index cfcae5d0f075eb48ce09ef775a46feb6a1988e5f..9c341b6afaca34033c9fd2fcd35a4516cd88651a 100644 (file)
@@ -21,3 +21,4 @@ CONFIG_CADENCE_QSPI=y
 CONFIG_DESIGNWARE_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
index b6f6a6538d9321c07c7f4bb4f6cb6e4983e66d65..48c7012c752a7385d4e2e515c36db6a21c3cfabf 100644 (file)
@@ -21,3 +21,4 @@ CONFIG_CADENCE_QSPI=y
 CONFIG_DESIGNWARE_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
index f45c3ed408107b61f1e33d43e5ea4a99213ac14c..6a135041fd84f95b4ffda1bb322c7ad25d4999f0 100644 (file)
@@ -26,3 +26,4 @@ CONFIG_CADENCE_QSPI=y
 CONFIG_DESIGNWARE_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
index e25d09b9783bafe39275e01ed047f622814cc568..086070766ac2192e0aa30edec89fa569570ee063 100644 (file)
@@ -25,3 +25,4 @@ CONFIG_CADENCE_QSPI=y
 CONFIG_DESIGNWARE_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
index d499a14bac704ab7f0814e12a18edb3712a4dcb8..2842fba2fd20a7f0d2a17a0273818873f5d7766b 100644 (file)
@@ -21,3 +21,5 @@ CONFIG_DM_ETH=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_SYS_NS16550=y
 CONFIG_CADENCE_QSPI=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
index 7f737f234b68219e19648e6ad8c488ed8f18fda8..d3de194ea0e46fe14e5d302db73cf78a6a5c1e10 100644 (file)
@@ -11,7 +11,6 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-gemei-g9"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index 0af7f2d95faa0afe7a32671306c8c8371a34e5c0..8a6b33772655a948faed03e42b0cb5f11815b3e4 100644 (file)
@@ -13,5 +13,7 @@ CONFIG_SYS_PROMPT="U-Boot> "
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_OF_LIBFDT=y
index 3cfa09a294fd283909281e116534003a52ce571c..d0fda48d0bded209edfe3fa926accb79943c1ebd 100644 (file)
@@ -8,4 +8,6 @@ CONFIG_SYS_PROMPT="Matrix U-Boot> "
 CONFIG_CMD_GPIO=y
 CONFIG_DM=y
 CONFIG_DM_THERMAL=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 62a6ee6663bd4f9e76e64731c4fb41b4682aa028..054038a03bed673571ebcbd6152203595e9dbddf 100644 (file)
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_THEADORABLE=y
+CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="armada-xp-theadorable"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
@@ -10,7 +11,7 @@ CONFIG_FIT=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_SF=y
 CONFIG_CMD_USB=y
-# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_OF_TRANSLATE=y
index 4d5f3b0a0aaa608a5b4653674773d791ff2202bd..9a6abf2f7e33c1cf4cbe63211cc4373af91adcd4 100644 (file)
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_THEADORABLE=y
+CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="armada-xp-theadorable"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
@@ -9,7 +10,6 @@ CONFIG_FIT=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_SF=y
-# CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
index 666cf5eb9345293de064a256498fef26910d07d4..39c85953b5e53eb20fbbe1051d230140ca7478f3 100644 (file)
@@ -12,4 +12,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 9c281f8a0f341bf9f344c5a44f84df43cc22403b..24656ef5b4fa841209a05b31a0603ad165952a0f 100644 (file)
@@ -15,3 +15,4 @@ CONFIG_SYS_PROMPT="Trats2 # "
 CONFIG_OF_CONTROL=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
index eef22a63b3f25becec43cb356a9ad4281cb873c4..e48fae8c6dc85013c48d2a1e0c729124dd517754 100644 (file)
@@ -14,3 +14,4 @@ CONFIG_SYS_PROMPT="Trats # "
 CONFIG_OF_CONTROL=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
index 5f0d678c666101d9961643fad759769884645787..f779ded7d6761a54eef8ecf35fd0cd411d2020c7 100644 (file)
@@ -1,6 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_UNIPHIER=y
-CONFIG_ARCH_UNIPHIER_PH1_SLD3=y
+CONFIG_ARCH_UNIPHIER_SLD3=y
 CONFIG_MICRO_SUPPORT_CARD=y
 CONFIG_SYS_TEXT_BASE=0x84000000
 CONFIG_DEFAULT_DEVICE_TREE="uniphier-ph1-sld3-ref"
index 954c1de389a6f0469693682c4afc212543df4ae9..a7515ab5bd069acc7333b513e4c42a2d08716681 100644 (file)
@@ -19,4 +19,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_USE_PRIVATE_LIBGCC=y
index 7cae79b3141788efe6f756470efa31db5074ad23..a16f376255fcee87fdf8fd54f40914f59f914b59 100644 (file)
@@ -11,3 +11,5 @@ CONFIG_SYS_PROMPT="vinco => "
 CONFIG_SPI_FLASH=y
 CONFIG_NETDEVICES=y
 CONFIG_ETH_DESIGNWARE=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
index 959e29c35a0501453d223f47c289e44c39a0d354..e37158c0a565bbb0eb67c0b083cfa582a6454bf7 100644 (file)
@@ -8,4 +8,6 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_OF_LIBFDT=y
index 8f3d38c9e3c7486403e21c79aab15dfb462bac5a..33f29afab88c1a14ac36fbda55e9cfc7178439a8 100644 (file)
@@ -27,4 +27,6 @@ CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_ZYNQ_SDHCI=y
 CONFIG_NAND_ARASAN=y
 CONFIG_ZYNQ_GEM=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
 # CONFIG_REGEX is not set
diff --git a/configs/zipitz2_defconfig b/configs/zipitz2_defconfig
new file mode 100644 (file)
index 0000000..2977ccc
--- /dev/null
@@ -0,0 +1,7 @@
+CONFIG_ARM=y
+CONFIG_TARGET_ZIPITZ2=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_SETEXPR is not set
+# CONFIG_CMD_NET is not set
+# CONFIG_CMD_NFS is not set
+CONFIG_SYS_PROMPT="$ "
index f34e2e3e265ad0112293b365f18a2943223cac37..67e38e5c5d161781ddf6d2c95ccfacc3b4a80b89 100644 (file)
@@ -12,3 +12,5 @@ CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ZYNQ_SDHCI=y
 CONFIG_ZYNQ_GEM=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
index f01874f23f941137788952a8084063315032387c..d1740a751be8315473db558d56dd23ab545e648f 100644 (file)
@@ -24,3 +24,5 @@ CONFIG_DEBUG_UART_ZYNQ=y
 CONFIG_DEBUG_UART_BASE=0xe0001000
 CONFIG_DEBUG_UART_CLOCK=50000000
 CONFIG_ZYNQ_QSPI=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
index 215f00dae9f9589eeba31239bb6b4403854ef694..d3ae438e1ce87299dadbdddf89a1760195fe9730 100644 (file)
@@ -21,3 +21,5 @@ CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_ZYNQ_GEM=y
 CONFIG_ZYNQ_QSPI=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
index 4a2a2fc3ce45ed4e715d04d46a6cf10ceb12d265..9ad33ff5c9347d59e9e8ac65496e05b2554e8ee2 100644 (file)
@@ -21,3 +21,5 @@ CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_ZYNQ_GEM=y
 CONFIG_ZYNQ_QSPI=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
index 7c23feca4239ed1e58f880765aeed4bb940edc23..470c9cbb125258196bbb8cf5344c14bd0ea86cc8 100644 (file)
@@ -22,3 +22,5 @@ CONFIG_DEBUG_UART_ZYNQ=y
 CONFIG_DEBUG_UART_BASE=0xe0001000
 CONFIG_DEBUG_UART_CLOCK=50000000
 CONFIG_ZYNQ_QSPI=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
index 7ce5ae48677a678862fca0707e3f020b843ac2a0..d41f85b3edad116bf9d48f3dd19e845624c9d076 100644 (file)
@@ -31,6 +31,10 @@ export TRIPLET=arm-linux-gnueabi && export CROSS_COMPILE="$TRIPLET-"
 make HOSTCC=clang CC="clang -target $TRIPLET -mllvm -arm-use-movt=0 -no-integrated-as" rpi_defconfig
 make HOSTCC=clang CC="clang -target $TRIPLET -mllvm -arm-use-movt=0 -no-integrated-as" all V=1 -j8
 
+It can also be used to compile sandbox:
+make HOSTCC=clang sandbox_defconfig
+make HOSTCC=clang CC=clang -j8
+
 FreeBSD 11 (Current):
 --------------------
 Since llvm 3.4 is currently in the base system, the integrated as is
index 8d043be2723d7e6a1695046a3a2e6e492da695b9..49045a02188aa214bf1bcd555747e5bc28f92733 100644 (file)
@@ -75,13 +75,18 @@ to use your favorite compiler.
 Burn U-Boot images to NAND
 --------------------------
 
-Write two files to the NAND device as follows:
+Write the following to the NAND device:
+
  - spl/u-boot-spl.bin at the offset address 0x00000000
- - u-boot.img         at the offset address 0x00010000
+ - u-boot.bin         at the offset address 0x00010000
+
+or
+
+ - u-boot-with-spl.bin at the offset address 0x00000000
 
 If a TFTP server is available, the images can be easily updated.
-Just copy the u-boot-spl-dtb.bin and u-boot-dtb.img to the TFTP public
-directory, and then run the following command at the U-Boot command line:
+Just copy the u-boot-spl.bin and u-boot.bin to the TFTP public directory,
+and then run the following command at the U-Boot command line:
 
   => run nandupdate
 
@@ -89,13 +94,18 @@ directory, and then run the following command at the U-Boot command line:
 Burn U-Boot images to eMMC
 --------------------------
 
-Write two files to the Boot partition 1 of the eMMC device as follows:
+Write the following to the Boot partition 1 of the eMMC device:
+
  - spl/u-boot-spl.bin at the offset address 0x00000000
- - u-boot.img         at the offset address 0x00010000
+ - u-boot.bin         at the offset address 0x00010000
+
+or
+
+ - u-boot-with-spl.bin at the offset address 0x00000000
 
 If a TFTP server is available, the images can be easily updated.
-Just copy the u-boot-spl-dtb.bin and u-boot-dtb.img to the TFTP public
-directory, and then run the following command at the U-Boot command line:
+Just copy the u-boot-spl.bin and u-boot.bin to the TFTP public directory,
+and then run the following command at the U-Boot command line:
 
   => run emmcupdate
 
index 47ad4e542db9d005518bcc4ba5650ebb6075891c..850c8f6c43b69aab22dc13288e00e41daf1cacff 100644 (file)
@@ -60,8 +60,8 @@ compute_cas_latency(const unsigned int ctrl_num,
         * 18ns for all DDR4 speed grades.
         */
        if (caslat_actual * mclk_ps > taamax) {
-               printf("The choosen cas latency %d is too large\n",
-                       caslat_actual);
+               printf("The chosen cas latency %d is too large\n",
+                      caslat_actual);
        }
        outpdimm->lowest_common_spd_caslat = caslat_actual;
        debug("lowest_common_spd_caslat is 0x%x\n", caslat_actual);
index 556f877039aa0bb488d0a279d41d54d90c378b71..ee05f57f43670409297cca0df0f14c9ac1de5a00 100644 (file)
@@ -305,8 +305,6 @@ int ddr3_init(void)
                SAR1_CPU_CORE_OFFSET;
        switch (soc_num) {
        case 0x3:
-               reg_bit_set(CPU_CONFIGURATION_REG(3), CPU_MRVL_ID_OFFSET);
-               reg_bit_set(CPU_CONFIGURATION_REG(2), CPU_MRVL_ID_OFFSET);
        case 0x1:
                reg_bit_set(CPU_CONFIGURATION_REG(1), CPU_MRVL_ID_OFFSET);
        case 0x0:
index 6aa24d43590b68e24851cdc9919dab887e2a16de..fec3fecbdfbf0e8b06a37bf332f1237458f84240 100644 (file)
@@ -17,5 +17,6 @@ obj-y += altera.o
 obj-$(CONFIG_FPGA_ACEX1K) += ACEX1K.o
 obj-$(CONFIG_FPGA_CYCLON2) += cyclon2.o
 obj-$(CONFIG_FPGA_STRATIX_II) += stratixII.o
+obj-$(CONFIG_FPGA_STRATIX_V) += stratixv.o
 obj-$(CONFIG_FPGA_SOCFPGA) += socfpga.o
 endif
index a5bfe5dce19a3dce36d35053031bfe4bf24c775e..135a3572a83c9e9f8b9bbbc7b9faeac965aec770 100644 (file)
@@ -37,6 +37,9 @@ static const struct altera_fpga {
        { Altera_StratixII, "StratixII", StratixII_load,
          StratixII_dump, StratixII_info },
 #endif
+#if defined(CONFIG_FPGA_STRATIX_V)
+       { Altera_StratixV, "StratixV", stratixv_load, NULL, NULL },
+#endif
 #if defined(CONFIG_FPGA_SOCFPGA)
        { Altera_SoCFPGA, "SoC FPGA", socfpga_load, NULL, NULL },
 #endif
diff --git a/drivers/fpga/stratixv.c b/drivers/fpga/stratixv.c
new file mode 100644 (file)
index 0000000..cc035eb
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2016 Stefan Roese <sr@denx.de>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <altera.h>
+#include <spi.h>
+#include <asm/io.h>
+#include <asm/errno.h>
+
+/* Write the RBF data to FPGA via SPI */
+static int program_write(int spi_bus, int spi_dev, const void *rbf_data,
+                        unsigned long rbf_size)
+{
+       struct spi_slave *slave;
+       int ret;
+
+       debug("%s (%d): data=%p size=%ld\n",
+             __func__, __LINE__, rbf_data, rbf_size);
+
+       /* FIXME: How to get the max. SPI clock and SPI mode? */
+       slave = spi_setup_slave(spi_bus, spi_dev, 27777777, SPI_MODE_3);
+       if (!slave)
+               return -1;
+
+       if (spi_claim_bus(slave))
+               return -1;
+
+       ret = spi_xfer(slave, rbf_size * 8, rbf_data, (void *)rbf_data,
+                      SPI_XFER_BEGIN | SPI_XFER_END);
+
+       spi_release_bus(slave);
+
+       return ret;
+}
+
+/*
+ * This is the interface used by FPGA driver.
+ * Return 0 for sucess, non-zero for error.
+ */
+int stratixv_load(Altera_desc *desc, const void *rbf_data, size_t rbf_size)
+{
+       altera_board_specific_func *pfns = desc->iface_fns;
+       int cookie = desc->cookie;
+       int spi_bus;
+       int spi_dev;
+       int ret = 0;
+
+       if ((u32)rbf_data & 0x3) {
+               puts("FPGA: Unaligned data, realign to 32bit boundary.\n");
+               return -EINVAL;
+       }
+
+       /* Run the pre configuration function if there is one */
+       if (pfns->pre)
+               (pfns->pre)(cookie);
+
+       /* Establish the initial state */
+       if (pfns->config) {
+               /* De-assert nCONFIG */
+               (pfns->config)(false, true, cookie);
+
+               /* nConfig minimum low pulse width is 2us */
+               udelay(200);
+
+               /* Assert nCONFIG */
+               (pfns->config)(true, true, cookie);
+
+               /* nCONFIG high to first rising clock on DCLK min 1506 us */
+               udelay(1600);
+       }
+
+       /* Write the RBF data to FPGA */
+       if (pfns->write) {
+               /*
+                * Use board specific data function to write bitstream
+                * into the FPGA
+                */
+               ret = (pfns->write)(rbf_data, rbf_size, true, cookie);
+       } else {
+               /*
+                * Use common SPI functions to write bitstream into the
+                * FPGA
+                */
+               spi_bus = COOKIE2SPI_BUS(cookie);
+               spi_dev = COOKIE2SPI_DEV(cookie);
+               ret = program_write(spi_bus, spi_dev, rbf_data, rbf_size);
+       }
+       if (ret)
+               return ret;
+
+       /* Check done pin */
+       if (pfns->done) {
+               ret = (pfns->done)(cookie);
+
+               if (ret)
+                       printf("Error: DONE not set (ret=%d)!\n", ret);
+       }
+
+       return ret;
+}
index a5da5e7e8825f4bf3ed8f1e00f934ac997ad4608..23113090b3982208fd09f8410b6b43c94d31edbd 100644 (file)
@@ -105,4 +105,11 @@ config PIC32_GPIO
        help
          Say yes here to support Microchip PIC32 GPIOs.
 
+config MVEBU_GPIO
+       bool "Marvell MVEBU GPIO driver"
+       depends on DM_GPIO && ARCH_MVEBU
+       default y
+       help
+         Say yes here to support Marvell MVEBU (Armada XP/38x) GPIOs.
+
 endmenu
index e7b7ec45b7a02b107e0de54cce9466fda26f97e0..ea6e2ede0d8f7179b2a74d97f98a1057b603df0e 100644 (file)
@@ -49,3 +49,4 @@ obj-$(CONFIG_ZYNQ_GPIO)               += zynq_gpio.o
 obj-$(CONFIG_VYBRID_GPIO)      += vybrid_gpio.o
 obj-$(CONFIG_HIKEY_GPIO)       += hi6220_gpio.o
 obj-$(CONFIG_PIC32_GPIO)       += pic32_gpio.o
+obj-$(CONFIG_MVEBU_GPIO)       += mvebu_gpio.o
diff --git a/drivers/gpio/mvebu_gpio.c b/drivers/gpio/mvebu_gpio.c
new file mode 100644 (file)
index 0000000..9564ce2
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * Copyright (C) 2016 Stefan Roese <sr@denx.de>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <asm/gpio.h>
+#include <asm/io.h>
+#include <errno.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define MVEBU_GPIOS_PER_BANK   32
+
+struct mvebu_gpio_regs {
+       u32 data_out;
+       u32 io_conf;
+       u32 blink_en;
+       u32 in_pol;
+       u32 data_in;
+};
+
+struct mvebu_gpio_priv {
+       struct mvebu_gpio_regs *regs;
+       char name[2];
+};
+
+static int mvebu_gpio_direction_input(struct udevice *dev, unsigned int gpio)
+{
+       struct mvebu_gpio_priv *priv = dev_get_priv(dev);
+       struct mvebu_gpio_regs *regs = priv->regs;
+
+       setbits_le32(&regs->io_conf, BIT(gpio));
+
+       return 0;
+}
+
+static int mvebu_gpio_direction_output(struct udevice *dev, unsigned gpio,
+                                      int value)
+{
+       struct mvebu_gpio_priv *priv = dev_get_priv(dev);
+       struct mvebu_gpio_regs *regs = priv->regs;
+
+       clrbits_le32(&regs->io_conf, BIT(gpio));
+
+       return 0;
+}
+
+static int mvebu_gpio_get_function(struct udevice *dev, unsigned gpio)
+{
+       struct mvebu_gpio_priv *priv = dev_get_priv(dev);
+       struct mvebu_gpio_regs *regs = priv->regs;
+       u32 val;
+
+       val = readl(&regs->io_conf) & BIT(gpio);
+       if (val)
+               return GPIOF_INPUT;
+       else
+               return GPIOF_OUTPUT;
+}
+
+static int mvebu_gpio_set_value(struct udevice *dev, unsigned gpio,
+                               int value)
+{
+       struct mvebu_gpio_priv *priv = dev_get_priv(dev);
+       struct mvebu_gpio_regs *regs = priv->regs;
+
+       if (value)
+               setbits_le32(&regs->data_out, BIT(gpio));
+       else
+               clrbits_le32(&regs->data_out, BIT(gpio));
+
+       return 0;
+}
+
+static int mvebu_gpio_get_value(struct udevice *dev, unsigned gpio)
+{
+       struct mvebu_gpio_priv *priv = dev_get_priv(dev);
+       struct mvebu_gpio_regs *regs = priv->regs;
+
+       return !!(readl(&regs->data_in) & BIT(gpio));
+}
+
+static int mvebu_gpio_probe(struct udevice *dev)
+{
+       struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
+       struct mvebu_gpio_priv *priv = dev_get_priv(dev);
+
+       priv->regs = (struct mvebu_gpio_regs *)dev_get_addr(dev);
+       uc_priv->gpio_count = MVEBU_GPIOS_PER_BANK;
+       priv->name[0] = 'A' + dev->req_seq;
+       uc_priv->bank_name = priv->name;
+
+       return 0;
+}
+
+static const struct dm_gpio_ops mvebu_gpio_ops = {
+       .direction_input        = mvebu_gpio_direction_input,
+       .direction_output       = mvebu_gpio_direction_output,
+       .get_function           = mvebu_gpio_get_function,
+       .get_value              = mvebu_gpio_get_value,
+       .set_value              = mvebu_gpio_set_value,
+};
+
+static const struct udevice_id mvebu_gpio_ids[] = {
+       { .compatible = "marvell,orion-gpio" },
+       { }
+};
+
+U_BOOT_DRIVER(gpio_mvebu) = {
+       .name                   = "gpio_mvebu",
+       .id                     = UCLASS_GPIO,
+       .of_match               = mvebu_gpio_ids,
+       .ops                    = &mvebu_gpio_ops,
+       .probe                  = mvebu_gpio_probe,
+       .priv_auto_alloc_size   = sizeof(struct mvebu_gpio_priv),
+};
index 9d8f11ef302ac960d0a8ad1e36181508d05db83f..a7cec18d57fb363e9852b77e6fb7c87ccb88c615 100644 (file)
@@ -277,9 +277,17 @@ static int gpio_sunxi_bind(struct udevice *parent)
                start = 'L' - 'A';
                no_banks = 2; /* L & M */
        } else if (fdt_node_check_compatible(gd->fdt_blob, parent->of_offset,
-                               "allwinner,sun8i-a23-r-pinctrl") == 0) {
+                               "allwinner,sun8i-a23-r-pinctrl") == 0 ||
+                  fdt_node_check_compatible(gd->fdt_blob, parent->of_offset,
+                               "allwinner,sun8i-a83t-r-pinctrl") == 0 ||
+                  fdt_node_check_compatible(gd->fdt_blob, parent->of_offset,
+                               "allwinner,sun8i-h3-r-pinctrl") == 0) {
                start = 'L' - 'A';
                no_banks = 1; /* L only */
+       } else if (fdt_node_check_compatible(gd->fdt_blob, parent->of_offset,
+                               "allwinner,sun9i-a80-r-pinctrl") == 0) {
+               start = 'L' - 'A';
+               no_banks = 3; /* L, M & N */
        } else {
                start = 0;
                no_banks = SUNXI_GPIO_BANKS;
@@ -316,9 +324,14 @@ static const struct udevice_id sunxi_gpio_ids[] = {
        { .compatible = "allwinner,sun7i-a20-pinctrl" },
        { .compatible = "allwinner,sun8i-a23-pinctrl" },
        { .compatible = "allwinner,sun8i-a33-pinctrl" },
+       { .compatible = "allwinner,sun8i-a83t-pinctrl", },
+       { .compatible = "allwinner,sun8i-h3-pinctrl" },
        { .compatible = "allwinner,sun9i-a80-pinctrl" },
        { .compatible = "allwinner,sun6i-a31-r-pinctrl" },
        { .compatible = "allwinner,sun8i-a23-r-pinctrl" },
+       { .compatible = "allwinner,sun8i-a83t-r-pinctrl" },
+       { .compatible = "allwinner,sun8i-h3-r-pinctrl", },
+       { .compatible = "allwinner,sun9i-a80-r-pinctrl", },
        { }
 };
 
index b2d15c9b6a82e201d48ef501657919aae9643047..445fa2108248e0ea32f64e0ee34c9ef2fdf15104 100644 (file)
@@ -23,6 +23,7 @@
 #include <i2c.h>
 #include <watchdog.h>
 #include <dm.h>
+#include <dm/pinctrl.h>
 #include <fdtdec.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -334,17 +335,74 @@ int i2c_idle_bus(struct mxc_i2c_bus *i2c_bus)
 }
 #else
 /*
- * Since pinmux is not supported, implement a weak function here.
- * You can implement your i2c_bus_idle in board file. When pinctrl
- * is supported, this can be removed.
+ * See Linux Documentation/devicetree/bindings/i2c/i2c-imx.txt
+ * "
+ *  scl-gpios: specify the gpio related to SCL pin
+ *  sda-gpios: specify the gpio related to SDA pin
+ *  add pinctrl to configure i2c pins to gpio function for i2c
+ *  bus recovery, call it "gpio" state
+ * "
+ *
+ * The i2c_idle_bus is an implementation following Linux Kernel.
  */
-int __i2c_idle_bus(struct mxc_i2c_bus *i2c_bus)
+int i2c_idle_bus(struct mxc_i2c_bus *i2c_bus)
 {
-       return 0;
-}
+       struct udevice *bus = i2c_bus->bus;
+       struct gpio_desc *scl_gpio = &i2c_bus->scl_gpio;
+       struct gpio_desc *sda_gpio = &i2c_bus->sda_gpio;
+       int sda, scl;
+       int i, ret = 0;
+       ulong elapsed, start_time;
 
-int i2c_idle_bus(struct mxc_i2c_bus *i2c_bus)
-       __attribute__((weak, alias("__i2c_idle_bus")));
+       if (pinctrl_select_state(bus, "gpio")) {
+               dev_dbg(bus, "Can not to switch to use gpio pinmux\n");
+               /*
+                * GPIO pinctrl for i2c force idle is not a must,
+                * but it is strongly recommended to be used.
+                * Because it can help you to recover from bad
+                * i2c bus state. Do not return failure, because
+                * it is not a must.
+                */
+               return 0;
+       }
+
+       dm_gpio_set_dir_flags(scl_gpio, GPIOD_IS_IN);
+       dm_gpio_set_dir_flags(sda_gpio, GPIOD_IS_IN);
+       scl = dm_gpio_get_value(scl_gpio);
+       sda = dm_gpio_get_value(sda_gpio);
+
+       if ((sda & scl) == 1)
+               goto exit;              /* Bus is idle already */
+
+       /* Send high and low on the SCL line */
+       for (i = 0; i < 9; i++) {
+               dm_gpio_set_dir_flags(scl_gpio, GPIOD_IS_OUT);
+               dm_gpio_set_value(scl_gpio, 0);
+               udelay(50);
+               dm_gpio_set_dir_flags(scl_gpio, GPIOD_IS_IN);
+               udelay(50);
+       }
+       start_time = get_timer(0);
+       for (;;) {
+               dm_gpio_set_dir_flags(scl_gpio, GPIOD_IS_IN);
+               dm_gpio_set_dir_flags(sda_gpio, GPIOD_IS_IN);
+               scl = dm_gpio_get_value(scl_gpio);
+               sda = dm_gpio_get_value(sda_gpio);
+               if ((sda & scl) == 1)
+                       break;
+               WATCHDOG_RESET();
+               elapsed = get_timer(start_time);
+               if (elapsed > (CONFIG_SYS_HZ / 5)) {    /* .2 seconds */
+                       ret = -EBUSY;
+                       printf("%s: failed to clear bus, sda=%d scl=%d\n", __func__, sda, scl);
+                       break;
+               }
+       }
+
+exit:
+       pinctrl_select_state(bus, "default");
+       return ret;
+}
 #endif
 
 static int i2c_init_transfer(struct mxc_i2c_bus *i2c_bus, u8 chip,
@@ -664,8 +722,10 @@ static int mxc_i2c_set_bus_speed(struct udevice *bus, unsigned int speed)
 static int mxc_i2c_probe(struct udevice *bus)
 {
        struct mxc_i2c_bus *i2c_bus = dev_get_priv(bus);
+       const void *fdt = gd->fdt_blob;
+       int node = bus->of_offset;
        fdt_addr_t addr;
-       int ret;
+       int ret, ret2;
 
        i2c_bus->driver_data = dev_get_driver_data(bus);
 
@@ -675,12 +735,35 @@ static int mxc_i2c_probe(struct udevice *bus)
 
        i2c_bus->base = addr;
        i2c_bus->index = bus->seq;
+       i2c_bus->bus = bus;
 
        /* Enable clk */
        ret = enable_i2c_clk(1, bus->seq);
        if (ret < 0)
                return ret;
 
+       /*
+        * See Documentation/devicetree/bindings/i2c/i2c-imx.txt
+        * Use gpio to force bus idle when necessary.
+        */
+       ret = fdt_find_string(fdt, node, "pinctrl-names", "gpio");
+       if (ret < 0) {
+               dev_info(dev, "i2c bus %d at %lu, no gpio pinctrl state.\n", bus->seq, i2c_bus->base);
+       } else {
+               ret = gpio_request_by_name_nodev(fdt, node, "scl-gpios",
+                                                0, &i2c_bus->scl_gpio,
+                                                GPIOD_IS_OUT);
+               ret2 = gpio_request_by_name_nodev(fdt, node, "sda-gpios",
+                                                0, &i2c_bus->sda_gpio,
+                                                GPIOD_IS_OUT);
+               if (!dm_gpio_is_valid(&i2c_bus->sda_gpio) |
+                   !dm_gpio_is_valid(&i2c_bus->scl_gpio) |
+                   ret | ret2) {
+                       dev_err(dev, "i2c bus %d at %lu, fail to request scl/sda gpio\n", bus->seq, i2c_bus->base);
+                       return -ENODEV;
+               }
+       }
+
        ret = i2c_idle_bus(i2c_bus);
        if (ret < 0) {
                /* Disable clk */
index 79a5c94f1cd045094557fca6b564464b64084c96..a7f3fb4a7996d5f6188494ca7f09b23662673d18 100644 (file)
@@ -371,6 +371,23 @@ static int omap24_i2c_read(struct i2c_adapter *adap, uchar chip, uint addr,
                return 1;
        }
 
+#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.
+        */
+       if (alen > 0)
+               chip |= ((addr >> (alen * 8)) &
+                        CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW);
+#endif
+
        /* Wait until bus not busy */
        if (wait_for_bb(adap))
                return 1;
@@ -501,6 +518,23 @@ static int omap24_i2c_write(struct i2c_adapter *adap, uchar chip, uint addr,
                return 1;
        }
 
+#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.
+        */
+       if (alen > 0)
+               chip |= ((addr >> (alen * 8)) &
+                        CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW);
+#endif
+
        /* Wait until bus not busy */
        if (wait_for_bb(adap))
                return 1;
index 227d2dfa2efddebbab3d89779efb6c4322e556e4..680b754af63e30b5bc6fef4038da6c9c3b0ef349 100644 (file)
@@ -178,7 +178,7 @@ int bcm2835_sdhci_init(u32 regbase, u32 emmc_freq)
 
        host = &bcm_host->host;
        host->name = "bcm2835_sdhci";
-       host->ioaddr = (void *)regbase;
+       host->ioaddr = (void *)(unsigned long)regbase;
        host->quirks = SDHCI_QUIRK_BROKEN_VOLTAGE | SDHCI_QUIRK_BROKEN_R1B |
                SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_NO_HISPD_BIT;
        host->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
index 8b2e6069ea012b6a6e419e1e42a807e647697089..d3c22abfd5a8c198499308cb4b8e24f161f9be3d 100644 (file)
@@ -61,7 +61,10 @@ int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
        printf("CMD_SEND:%d\n", cmd->cmdidx);
        printf("\t\tARG\t\t\t 0x%08X\n", cmd->cmdarg);
        ret = mmc->cfg->ops->send_cmd(mmc, cmd, data);
-       switch (cmd->resp_type) {
+       if (ret) {
+               printf("\t\tRET\t\t\t %d\n", ret);
+       } else {
+               switch (cmd->resp_type) {
                case MMC_RSP_NONE:
                        printf("\t\tMMC_RSP_NONE\n");
                        break;
@@ -101,6 +104,7 @@ int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
                default:
                        printf("\t\tERROR MMC rsp not supported\n");
                        break;
+               }
        }
 #else
        ret = mmc->cfg->ops->send_cmd(mmc, cmd, data);
@@ -906,20 +910,20 @@ retry_scr:
        mmc->scr[1] = __be32_to_cpu(scr[1]);
 
        switch ((mmc->scr[0] >> 24) & 0xf) {
-               case 0:
-                       mmc->version = SD_VERSION_1_0;
-                       break;
-               case 1:
-                       mmc->version = SD_VERSION_1_10;
-                       break;
-               case 2:
-                       mmc->version = SD_VERSION_2;
-                       if ((mmc->scr[0] >> 15) & 0x1)
-                               mmc->version = SD_VERSION_3;
-                       break;
-               default:
-                       mmc->version = SD_VERSION_1_0;
-                       break;
+       case 0:
+               mmc->version = SD_VERSION_1_0;
+               break;
+       case 1:
+               mmc->version = SD_VERSION_1_10;
+               break;
+       case 2:
+               mmc->version = SD_VERSION_2;
+               if ((mmc->scr[0] >> 15) & 0x1)
+                       mmc->version = SD_VERSION_3;
+               break;
+       default:
+               mmc->version = SD_VERSION_1_0;
+               break;
        }
 
        if (mmc->scr[0] & SD_DATA_4BIT)
@@ -1102,24 +1106,24 @@ static int mmc_startup(struct mmc *mmc)
                int version = (cmd.response[0] >> 26) & 0xf;
 
                switch (version) {
-                       case 0:
-                               mmc->version = MMC_VERSION_1_2;
-                               break;
-                       case 1:
-                               mmc->version = MMC_VERSION_1_4;
-                               break;
-                       case 2:
-                               mmc->version = MMC_VERSION_2_2;
-                               break;
-                       case 3:
-                               mmc->version = MMC_VERSION_3;
-                               break;
-                       case 4:
-                               mmc->version = MMC_VERSION_4;
-                               break;
-                       default:
-                               mmc->version = MMC_VERSION_1_2;
-                               break;
+               case 0:
+                       mmc->version = MMC_VERSION_1_2;
+                       break;
+               case 1:
+                       mmc->version = MMC_VERSION_1_4;
+                       break;
+               case 2:
+                       mmc->version = MMC_VERSION_2_2;
+                       break;
+               case 3:
+                       mmc->version = MMC_VERSION_3;
+                       break;
+               case 4:
+                       mmc->version = MMC_VERSION_4;
+                       break;
+               default:
+                       mmc->version = MMC_VERSION_1_2;
+                       break;
                }
        }
 
index 7f018a4ecad4fd657182533db9835d103c9b2808..703700aae0b4ff391f67254e74558309d57e8fd9 100644 (file)
@@ -20,3 +20,4 @@ obj-$(CONFIG_FTSMC020) += ftsmc020.o
 obj-$(CONFIG_FLASH_CFI_LEGACY) += jedec_flash.o
 obj-$(CONFIG_MW_EEPROM) += mw_eeprom.o
 obj-$(CONFIG_ST_SMI) += st_smi.o
+obj-$(CONFIG_STM32_FLASH) += stm32_flash.o
index 39932f46478eff7253720538443cc1279884a3af..18831c62e75527ac6f19a2bb12d1d81698ae3d62 100644 (file)
@@ -2203,6 +2203,8 @@ ulong flash_get_size (phys_addr_t base, int banknum)
                                                flash_isset (info, sect_cnt,
                                                             FLASH_OFFSET_PROTECT,
                                                             FLASH_STATUS_PROTECT);
+                                       flash_write_cmd(info, sect_cnt, 0,
+                                                       FLASH_CMD_RESET);
                                        break;
                                case CFI_CMDSET_AMD_EXTENDED:
                                case CFI_CMDSET_AMD_STANDARD:
index 192be7dfa1d1e81c939db1499178fa5777a12357..018d14fc8130486f6c366a1788d79d1a690d2c0b 100644 (file)
@@ -741,7 +741,7 @@ static void denali_setup_dma(struct denali_nand_info *denali, int op)
 {
        uint32_t mode;
        const int page_count = 1;
-       uint32_t addr = (uint32_t)denali->buf.dma_buf;
+       uint64_t addr = (unsigned long)denali->buf.dma_buf;
 
        flush_dcache_range(addr, addr + sizeof(denali->buf.dma_buf));
 
@@ -759,7 +759,7 @@ static void denali_setup_dma(struct denali_nand_info *denali, int op)
        index_addr(denali, mode, addr);
 
        /* 3. set memory high address bits 64:32 */
-       index_addr(denali, mode, 0);
+       index_addr(denali, mode, addr >> 32);
 #else
        mode = MODE_10 | BANK(denali->flash_bank);
 
@@ -769,7 +769,7 @@ static void denali_setup_dma(struct denali_nand_info *denali, int op)
        index_addr(denali, mode | denali->page, 0x2000 | op | page_count);
 
        /* 2. set memory high address bits 23:8 */
-       index_addr(denali, mode | ((addr >> 16) << 8), 0x2200);
+       index_addr(denali, mode | (((addr >> 16) & 0xffff) << 8), 0x2200);
 
        /* 3. set memory low address bits 23:8 */
        index_addr(denali, mode | ((addr & 0xffff) << 8), 0x2300);
similarity index 82%
rename from arch/arm/mach-stm32/stm32f4/flash.c
rename to drivers/mtd/stm32_flash.c
index a379f477df5011add009d414c9bfeec173da4337..71f48543a3959dd49e5a36c3bf872210169bf8a9 100644 (file)
@@ -8,19 +8,20 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
-
-#define STM32_FLASH_KEY1       0x45670123
-#define STM32_FLASH_KEY2       0xCDEF89AB
+#include "stm32_flash.h"
 
 flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];
 
-const u32 sect_sz_kb[CONFIG_SYS_MAX_FLASH_SECT] = {
-       [0 ... 3] =     16 * 1024,
-       [4] =           64 * 1024,
-       [5 ... 11] =    128 * 1024
-};
+#define STM32_FLASH            ((struct stm32_flash_regs *)FLASH_CNTL_BASE)
+
+void stm32_flash_latency_cfg(int latency)
+{
+       /* 5 wait states, Prefetch enabled, D-Cache enabled, I-Cache enabled */
+       writel(FLASH_ACR_WS(5) | FLASH_ACR_PRFTEN | FLASH_ACR_ICEN
+               | FLASH_ACR_DCEN, &STM32_FLASH->acr);
+}
 
-static void stm32f4_flash_lock(u8 lock)
+static void stm32_flash_lock(u8 lock)
 {
        if (lock) {
                setbits_le32(&STM32_FLASH->cr, STM32_FLASH_CR_LOCK);
@@ -36,7 +37,7 @@ unsigned long flash_init(void)
        u8 i, j;
 
        for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++) {
-               flash_info[i].flash_id = FLASH_STM32F4;
+               flash_info[i].flash_id = FLASH_STM32;
                flash_info[i].sector_count = CONFIG_SYS_MAX_FLASH_SECT;
                flash_info[i].start[0] = CONFIG_SYS_FLASH_BASE + (i << 20);
                flash_info[i].size = sect_sz_kb[0];
@@ -58,8 +59,8 @@ void flash_print_info(flash_info_t *info)
        if (info->flash_id == FLASH_UNKNOWN) {
                printf("missing or unknown FLASH type\n");
                return;
-       } else if (info->flash_id == FLASH_STM32F4) {
-               printf("STM32F4 Embedded Flash\n");
+       } else if (info->flash_id == FLASH_STM32) {
+               printf("stm32 Embedded Flash\n");
        }
 
        printf("  Size: %ld MB in %d Sectors\n",
@@ -91,7 +92,7 @@ int flash_erase(flash_info_t *info, int first, int last)
        if (bank == 0xFF)
                return -1;
 
-       stm32f4_flash_lock(0);
+       stm32_flash_lock(0);
 
        for (i = first; i <= last; i++) {
                while (readl(&STM32_FLASH->sr) & STM32_FLASH_SR_BSY)
@@ -107,7 +108,7 @@ int flash_erase(flash_info_t *info, int first, int last)
                        setbits_le32(&STM32_FLASH->cr,
                                     ((0x10 | i) << STM32_FLASH_CR_SNB_OFFSET));
                } else {
-                       stm32f4_flash_lock(1);
+                       stm32_flash_lock(1);
                        return -1;
                }
                setbits_le32(&STM32_FLASH->cr, STM32_FLASH_CR_SER);
@@ -119,7 +120,7 @@ int flash_erase(flash_info_t *info, int first, int last)
                clrbits_le32(&STM32_FLASH->cr, STM32_FLASH_CR_SER);
        }
 
-       stm32f4_flash_lock(1);
+       stm32_flash_lock(1);
        return 0;
 }
 
@@ -130,7 +131,7 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
        while (readl(&STM32_FLASH->sr) & STM32_FLASH_SR_BSY)
                ;
 
-       stm32f4_flash_lock(0);
+       stm32_flash_lock(0);
 
        setbits_le32(&STM32_FLASH->cr, STM32_FLASH_CR_PG);
        /* To make things simple use byte writes only */
@@ -140,7 +141,7 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
                        ;
        }
        clrbits_le32(&STM32_FLASH->cr, STM32_FLASH_CR_PG);
-       stm32f4_flash_lock(1);
+       stm32_flash_lock(1);
 
        return 0;
 }
diff --git a/drivers/mtd/stm32_flash.h b/drivers/mtd/stm32_flash.h
new file mode 100644 (file)
index 0000000..8cb81ef
--- /dev/null
@@ -0,0 +1,27 @@
+struct stm32_flash_regs {
+       u32 acr;
+       u32 key;
+       u32 optkeyr;
+       u32 sr;
+       u32 cr;
+       u32 optcr;
+       u32 optcr1;
+};
+
+#define STM32_FLASH_KEY1       0x45670123
+#define STM32_FLASH_KEY2       0xCDEF89AB
+
+#define STM32_FLASH_SR_BSY             (1 << 16)
+
+#define STM32_FLASH_CR_PG              (1 << 0)
+#define STM32_FLASH_CR_SER             (1 << 1)
+#define STM32_FLASH_CR_STRT            (1 << 16)
+#define STM32_FLASH_CR_LOCK            (1 << 31)
+#define STM32_FLASH_CR_SNB_OFFSET      3
+#define STM32_FLASH_CR_SNB_MASK                (15 << STM32_FLASH_CR_SNB_OFFSET)
+
+/* Flash ACR: Access control register */
+#define FLASH_ACR_WS(n)                n
+#define FLASH_ACR_PRFTEN       (1 << 8)
+#define FLASH_ACR_ICEN         (1 << 9)
+#define FLASH_ACR_DCEN         (1 << 10)
index 9e60adf61a537eed07d4d96fb7b817ff08f114f3..163b9df55c9b164b75170826bf28d31030a4e085 100644 (file)
@@ -995,7 +995,7 @@ static int rtl_init(unsigned long dev_ioaddr, const char *name,
                /* Force RTL8169 in 10/100/1000 Full/Half mode. */
                if (option > 0) {
 #ifdef DEBUG_RTL8169
-                       printf("%s: Force-mode Enabled.\n", dev->name);
+                       printf("%s: Force-mode Enabled.\n", name);
 #endif
                        Cap10_100 = 0, Cap1000 = 0;
                        switch (option) {
@@ -1027,7 +1027,7 @@ static int rtl_init(unsigned long dev_ioaddr, const char *name,
                } else {
 #ifdef DEBUG_RTL8169
                        printf("%s: Auto-negotiation Enabled.\n",
-                              dev->name);
+                              name);
 #endif
                        /* enable 10/100 Full/Half Mode, leave PHY_AUTO_NEGO_REG bit4:0 unchanged */
                        mdio_write(PHY_AUTO_NEGO_REG,
@@ -1054,12 +1054,12 @@ static int rtl_init(unsigned long dev_ioaddr, const char *name,
                                if (option & _1000bpsF) {
 #ifdef DEBUG_RTL8169
                                        printf("%s: 1000Mbps Full-duplex operation.\n",
-                                            dev->name);
+                                              name);
 #endif
                                } else {
 #ifdef DEBUG_RTL8169
                                        printf("%s: %sMbps %s-duplex operation.\n",
-                                              dev->name,
+                                              name,
                                               (option & _100bps) ? "100" :
                                               "10",
                                               (option & FullDup) ? "Full" :
@@ -1077,7 +1077,7 @@ static int rtl_init(unsigned long dev_ioaddr, const char *name,
 #ifdef DEBUG_RTL8169
                printf
                    ("%s: 1000Mbps Full-duplex operation, TBI Link %s!\n",
-                    dev->name,
+                    name,
                     (RTL_R32(TBICSR) & TBILinkOK) ? "OK" : "Failed");
 #endif
        }
index 33d676390db7f81ea887c01472aa4a8b96db052e..d22d485a3c16595c084540425718d22587a8f8d5 100644 (file)
@@ -3,39 +3,39 @@ if ARCH_UNIPHIER
 config PINCTRL_UNIPHIER
        bool
 
-config PINCTRL_UNIPHIER_PH1_LD4
+config PINCTRL_UNIPHIER_LD4
        bool "UniPhier PH1-LD4 SoC pinctrl driver"
-       depends on ARCH_UNIPHIER_PH1_LD4
+       depends on ARCH_UNIPHIER_LD4
        default y
        select PINCTRL_UNIPHIER
 
-config PINCTRL_UNIPHIER_PH1_PRO4
+config PINCTRL_UNIPHIER_PRO4
        bool "UniPhier PH1-Pro4 SoC pinctrl driver"
-       depends on ARCH_UNIPHIER_PH1_PRO4
+       depends on ARCH_UNIPHIER_PRO4
        default y
        select PINCTRL_UNIPHIER
 
-config PINCTRL_UNIPHIER_PH1_SLD8
+config PINCTRL_UNIPHIER_SLD8
        bool "UniPhier PH1-sLD8 SoC pinctrl driver"
-       depends on ARCH_UNIPHIER_PH1_SLD8
+       depends on ARCH_UNIPHIER_SLD8
        default y
        select PINCTRL_UNIPHIER
 
-config PINCTRL_UNIPHIER_PH1_PRO5
+config PINCTRL_UNIPHIER_PRO5
        bool "UniPhier PH1-Pro5 SoC pinctrl driver"
-       depends on ARCH_UNIPHIER_PH1_PRO5
+       depends on ARCH_UNIPHIER_PRO5
        default y
        select PINCTRL_UNIPHIER
 
-config PINCTRL_UNIPHIER_PROXSTREAM2
+config PINCTRL_UNIPHIER_PXS2
        bool "UniPhier ProXstream2 SoC pinctrl driver"
-       depends on ARCH_UNIPHIER_PROXSTREAM2
+       depends on ARCH_UNIPHIER_PXS2
        default y
        select PINCTRL_UNIPHIER
 
-config PINCTRL_UNIPHIER_PH1_LD6B
+config PINCTRL_UNIPHIER_LD6B
        bool "UniPhier PH1-LD6b SoC pinctrl driver"
-       depends on ARCH_UNIPHIER_PH1_LD6B
+       depends on ARCH_UNIPHIER_LD6B
        default y
        select PINCTRL_UNIPHIER
 
index 3667bd35f0c9a77c868d53bb1aa699a40b1df10d..c6cc13da579a04ca1d659ed3702743b43a03cfc7 100644 (file)
@@ -2,11 +2,11 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-y                                          += pinctrl-uniphier-core.o
+obj-y                                  += pinctrl-uniphier-core.o
 
-obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_LD4)         += pinctrl-ph1-ld4.o
-obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_PRO4)                += pinctrl-ph1-pro4.o
-obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_SLD8)                += pinctrl-ph1-sld8.o
-obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_PRO5)                += pinctrl-ph1-pro5.o
-obj-$(CONFIG_PINCTRL_UNIPHIER_PROXSTREAM2)     += pinctrl-proxstream2.o
-obj-$(CONFIG_PINCTRL_UNIPHIER_PH1_LD6B)                += pinctrl-ph1-ld6b.o
+obj-$(CONFIG_PINCTRL_UNIPHIER_LD4)     += pinctrl-uniphier-ld4.o
+obj-$(CONFIG_PINCTRL_UNIPHIER_PRO4)    += pinctrl-uniphier-pro4.o
+obj-$(CONFIG_PINCTRL_UNIPHIER_SLD8)    += pinctrl-uniphier-sld8.o
+obj-$(CONFIG_PINCTRL_UNIPHIER_PRO5)    += pinctrl-uniphier-pro5.o
+obj-$(CONFIG_PINCTRL_UNIPHIER_PXS2)    += pinctrl-uniphier-pxs2.o
+obj-$(CONFIG_PINCTRL_UNIPHIER_LD6B)    += pinctrl-uniphier-ld6b.o
index 92d4212123d23a8eefa8fb2f4ea8662125584acc..2a770a12ca1bd448deed410ad4c397cacdcdb785 100644 (file)
@@ -169,6 +169,15 @@ config DEBUG_UART_PIC32
          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_UNIPHIER
+       bool "UniPhier on-chip UART"
+       depends on ARCH_UNIPHIER
+       help
+         Select this to enable a debug UART using the UniPhier on-chip UART.
+         You will need to provide DEBUG_UART_BASE to make this work.  The
+         driver will be available until the real driver-model serial is
+         running.
+
 endchoice
 
 config DEBUG_UART_BASE
index 05bdf56c6fe99bfa2ebdb1c98d3fc6c78a550c4c..ee7147a77abc8e6f7140037ecb37886bdb28c1b3 100644 (file)
@@ -38,6 +38,7 @@ obj-$(CONFIG_UNIPHIER_SERIAL) += serial_uniphier.o
 obj-$(CONFIG_STM32_SERIAL) += serial_stm32.o
 obj-$(CONFIG_PIC32_SERIAL) += serial_pic32.o
 obj-$(CONFIG_STM32X7_SERIAL) += serial_stm32x7.o
+obj-$(CONFIG_BCM283X_MU_SERIAL) += serial_bcm283x_mu.o
 
 ifndef CONFIG_SPL_BUILD
 obj-$(CONFIG_USB_TTY) += usbtty.o
diff --git a/drivers/serial/serial_bcm283x_mu.c b/drivers/serial/serial_bcm283x_mu.c
new file mode 100644 (file)
index 0000000..fc36bc0
--- /dev/null
@@ -0,0 +1,140 @@
+/*
+ * (C) Copyright 2016 Stephen Warren <swarren@wwwdotorg.org>
+ *
+ * Derived from pl01x code:
+ *
+ * (C) Copyright 2000
+ * Rob Taylor, Flying Pig Systems. robt@flyingpig.com.
+ *
+ * (C) Copyright 2004
+ * ARM Ltd.
+ * Philippe Robin, <philippe.robin@arm.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+/* Simple U-Boot driver for the BCM283x mini UART */
+
+#include <common.h>
+#include <dm.h>
+#include <errno.h>
+#include <watchdog.h>
+#include <asm/io.h>
+#include <serial.h>
+#include <dm/platform_data/serial_bcm283x_mu.h>
+#include <linux/compiler.h>
+#include <fdtdec.h>
+
+struct bcm283x_mu_regs {
+       u32 io;
+       u32 iir;
+       u32 ier;
+       u32 lcr;
+       u32 mcr;
+       u32 lsr;
+       u32 msr;
+       u32 scratch;
+       u32 cntl;
+       u32 stat;
+       u32 baud;
+};
+
+#define BCM283X_MU_LCR_DATA_SIZE_8     3
+
+#define BCM283X_MU_LSR_TX_IDLE         BIT(6)
+/* This actually means not full, but is named not empty in the docs */
+#define BCM283X_MU_LSR_TX_EMPTY                BIT(5)
+#define BCM283X_MU_LSR_RX_READY                BIT(0)
+
+struct bcm283x_mu_priv {
+       struct bcm283x_mu_regs *regs;
+};
+
+static int bcm283x_mu_serial_setbrg(struct udevice *dev, int baudrate)
+{
+       struct bcm283x_mu_serial_platdata *plat = dev_get_platdata(dev);
+       struct bcm283x_mu_priv *priv = dev_get_priv(dev);
+       struct bcm283x_mu_regs *regs = priv->regs;
+       u32 divider;
+
+       if (plat->skip_init)
+               return 0;
+
+       divider = plat->clock / (baudrate * 8);
+
+       writel(BCM283X_MU_LCR_DATA_SIZE_8, &regs->lcr);
+       writel(divider - 1, &regs->baud);
+
+       return 0;
+}
+
+static int bcm283x_mu_serial_probe(struct udevice *dev)
+{
+       struct bcm283x_mu_serial_platdata *plat = dev_get_platdata(dev);
+       struct bcm283x_mu_priv *priv = dev_get_priv(dev);
+
+       priv->regs = (struct bcm283x_mu_regs *)plat->base;
+
+       return 0;
+}
+
+static int bcm283x_mu_serial_getc(struct udevice *dev)
+{
+       struct bcm283x_mu_priv *priv = dev_get_priv(dev);
+       struct bcm283x_mu_regs *regs = priv->regs;
+       u32 data;
+
+       /* Wait until there is data in the FIFO */
+       if (!(readl(&regs->lsr) & BCM283X_MU_LSR_RX_READY))
+               return -EAGAIN;
+
+       data = readl(&regs->io);
+
+       return (int)data;
+}
+
+static int bcm283x_mu_serial_putc(struct udevice *dev, const char data)
+{
+       struct bcm283x_mu_priv *priv = dev_get_priv(dev);
+       struct bcm283x_mu_regs *regs = priv->regs;
+
+       /* Wait until there is space in the FIFO */
+       if (!(readl(&regs->lsr) & BCM283X_MU_LSR_TX_EMPTY))
+               return -EAGAIN;
+
+       /* Send the character */
+       writel(data, &regs->io);
+
+       return 0;
+}
+
+static int bcm283x_mu_serial_pending(struct udevice *dev, bool input)
+{
+       struct bcm283x_mu_priv *priv = dev_get_priv(dev);
+       struct bcm283x_mu_regs *regs = priv->regs;
+       unsigned int lsr = readl(&regs->lsr);
+
+       if (input) {
+               WATCHDOG_RESET();
+               return lsr & BCM283X_MU_LSR_RX_READY;
+       } else {
+               return !(lsr & BCM283X_MU_LSR_TX_IDLE);
+       }
+}
+
+static const struct dm_serial_ops bcm283x_mu_serial_ops = {
+       .putc = bcm283x_mu_serial_putc,
+       .pending = bcm283x_mu_serial_pending,
+       .getc = bcm283x_mu_serial_getc,
+       .setbrg = bcm283x_mu_serial_setbrg,
+};
+
+U_BOOT_DRIVER(serial_bcm283x_mu) = {
+       .name = "serial_bcm283x_mu",
+       .id = UCLASS_SERIAL,
+       .platdata_auto_alloc_size = sizeof(struct bcm283x_mu_serial_platdata),
+       .probe = bcm283x_mu_serial_probe,
+       .ops = &bcm283x_mu_serial_ops,
+       .flags = DM_FLAG_PRE_RELOC,
+       .priv_auto_alloc_size = sizeof(struct bcm283x_mu_priv),
+};
index abb06fcfe5b37b656e5daf74dc7d2185ec75cfe0..7fa99c6891f488105e87f9f90ea5a2a8a3baf464 100644 (file)
@@ -88,4 +88,6 @@ endchoice
 
 endif
 
+source "drivers/usb/gadget/Kconfig"
+
 endif
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
new file mode 100644 (file)
index 0000000..f4698f4
--- /dev/null
@@ -0,0 +1,35 @@
+#
+# USB Gadget support on a system involves
+#    (a) a peripheral controller, and
+#    (b) the gadget driver using it.
+#
+# NOTE:  Gadget support ** DOES NOT ** depend on host-side CONFIG_USB !!
+#
+#  - Host systems (like PCs) need CONFIG_USB (with "A" jacks).
+#  - Peripherals (like PDAs) need CONFIG_USB_GADGET (with "B" jacks).
+#  - Some systems have both kinds of controllers.
+#
+# With help from a special transceiver and a "Mini-AB" jack, systems with
+# both kinds of controller can also support "USB On-the-Go" (CONFIG_USB_OTG).
+#
+
+menuconfig USB_GADGET
+       bool "USB Gadget Support"
+       help
+          USB is a master/slave protocol, organized with one master
+          host (such as a PC) controlling up to 127 peripheral devices.
+          The USB hardware is asymmetric, which makes it easier to set up:
+          you can't connect a "to-the-host" connector to a peripheral.
+
+          U-Boot can run in the host, or in the peripheral.  In both cases
+          you need a low level bus controller driver, and some software
+          talking to it.  Peripheral controllers are often discrete silicon,
+          or are integrated with the CPU in a microcontroller.  The more
+          familiar host side controllers have names like "EHCI", "OHCI",
+          or "UHCI", and are usually integrated into southbridges on PC
+          motherboards.
+
+          Enable this configuration option if you want to run U-Boot inside
+          a USB peripheral device.  Configure one hardware driver for your
+          peripheral/device side bus controller, and a "gadget driver" for
+          your peripheral protocol.
index cf3dcc43274fb26957712c092ac12e635d7aed5d..677a5d3b07f258491e312b23a2fb92bced42334a 100644 (file)
 #include <dm.h>
 #include "ehci.h"
 
+#ifdef CONFIG_SUNXI_GEN_SUN4I
+#define BASE_DIST              0x8000
+#define AHB_CLK_DIST           2
+#else
+#define BASE_DIST              0x1000
+#define AHB_CLK_DIST           1
+#endif
+
 struct ehci_sunxi_priv {
        struct ehci_ctrl ehci;
        int ahb_gate_mask; /* Mask of ahb_gate0 clk gate bits for this hcd */
@@ -39,8 +47,9 @@ static int ehci_usb_probe(struct udevice *dev)
 #ifdef CONFIG_MACH_SUN8I_H3
        priv->ahb_gate_mask |= 1 << AHB_GATE_OFFSET_USB_OHCI0;
 #endif
-       priv->phy_index = ((u32)hccr - SUNXI_USB1_BASE) / 0x1000 + 1;
-       priv->ahb_gate_mask <<= priv->phy_index - 1;
+       priv->phy_index = ((u32)hccr - SUNXI_USB1_BASE) / BASE_DIST;
+       priv->ahb_gate_mask <<= priv->phy_index * AHB_CLK_DIST;
+       priv->phy_index++; /* Non otg phys start at 1 */
 
        setbits_le32(&ccm->ahb_gate0, priv->ahb_gate_mask);
 #ifdef CONFIG_SUNXI_GEN_SUN6I
index 1b1f651697836c7f0a693c20144e8338b51f783c..d4fb95abe1e3b8ffd2e68ecb7819647aa98b9658 100644 (file)
 #include <usb.h>
 #include "ohci.h"
 
+#ifdef CONFIG_SUNXI_GEN_SUN4I
+#define BASE_DIST              0x8000
+#define AHB_CLK_DIST           2
+#else
+#define BASE_DIST              0x1000
+#define AHB_CLK_DIST           1
+#endif
+
 struct ohci_sunxi_priv {
        ohci_t ohci;
        int ahb_gate_mask; /* Mask of ahb_gate0 clk gate bits for this hcd */
@@ -42,9 +50,10 @@ static int ohci_usb_probe(struct udevice *dev)
        priv->ahb_gate_mask |= 1 << AHB_GATE_OFFSET_USB_EHCI0;
 #endif
        priv->usb_gate_mask = CCM_USB_CTRL_OHCI0_CLK;
-       priv->phy_index = ((u32)regs - (SUNXI_USB1_BASE + 0x400)) / 0x1000 + 1;
-       priv->ahb_gate_mask <<= priv->phy_index - 1;
-       priv->usb_gate_mask <<= priv->phy_index - 1;
+       priv->phy_index = ((u32)regs - (SUNXI_USB1_BASE + 0x400)) / BASE_DIST;
+       priv->ahb_gate_mask <<= priv->phy_index * AHB_CLK_DIST;
+       priv->usb_gate_mask <<= priv->phy_index;
+       priv->phy_index++; /* Non otg phys start at 1 */
 
        setbits_le32(&ccm->ahb_gate0, priv->ahb_gate_mask);
        setbits_le32(&ccm->usb_clk_cfg, priv->usb_gate_mask);
index bff1fcb9eaf7eb9ed293b0a752051b9740dbf95e..cd605e632cb606c84754c24b6ca1590db9a22ab7 100644 (file)
@@ -44,6 +44,7 @@ void lcd_ctrl_init(void *lcdbase)
        ALLOC_CACHE_ALIGN_BUFFER(struct msg_setup, msg_setup, 1);
        int ret;
        u32 w, h;
+       u32 fb_start, fb_end;
 
        debug("bcm2835: Query resolution...\n");
 
@@ -106,6 +107,14 @@ void lcd_ctrl_init(void *lcdbase)
 
        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_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);
 }
 
 void lcd_enable(void)
index 2799425a633181981bd3717e203f80be2f118762..1809fc6f1e2f09039c8e296f5b315c8eaf6ecf05 100644 (file)
@@ -175,6 +175,7 @@ vidinfo_t panel_info = {
 vidinfo_t panel_info = {
        .vl_col         = 240,
        .vl_row         = 320,
+       .vl_rot         = 3,
        .vl_width       = 240,
        .vl_height      = 320,
        .vl_clkp        = CONFIG_SYS_HIGH,
index 9fee66a2a450b84645e855e0a0c9fc7f4593112a..56f6c8e3497377653a076852875750e112813bb0 100644 (file)
@@ -767,7 +767,11 @@ static void sunxi_lcdc_tcon0_mode_set(const struct ctfb_res_modes *mode,
                (struct sunxi_lcdc_reg *)SUNXI_LCD0_BASE;
        int bp, clk_delay, clk_div, clk_double, pin, total, val;
 
+#if defined CONFIG_MACH_SUN8I && defined CONFIG_VIDEO_LCD_IF_LVDS
+       for (pin = SUNXI_GPD(18); pin <= SUNXI_GPD(27); pin++) {
+#else
        for (pin = SUNXI_GPD(0); pin <= SUNXI_GPD(27); pin++) {
+#endif
 #ifdef CONFIG_VIDEO_LCD_IF_PARALLEL
                sunxi_gpio_set_cfgpin(pin, SUNXI_GPD_LCD0);
 #endif
index c2991ad800073b0de56c844456eade3d8e823023..48d3eb73c9899f67a44464c4b26dbf92f85cb816 100644 (file)
 #ifndef _ALTERA_H_
 #define _ALTERA_H_
 
+/*
+ * For the StratixV FPGA programming via SPI, the following
+ * information is coded in the 32bit cookie:
+ * Bit 31 ... Bit 0
+ * SPI-Bus | SPI-Dev | Config-Pin | Done-Pin
+ */
+#define FPGA_COOKIE(bus, dev, config, done)                    \
+       (((bus) << 24) | ((dev) << 16) | ((config) << 8) | (done))
+#define COOKIE2SPI_BUS(c)      (((c) >> 24) & 0xff)
+#define COOKIE2SPI_DEV(c)      (((c) >> 16) & 0xff)
+#define COOKIE2CONFIG(c)       (((c) >> 8) & 0xff)
+#define COOKIE2DONE(c)         ((c) & 0xff)
+
 enum altera_iface {
        /* insert all new types after this */
        min_altera_iface_type,
@@ -40,6 +53,8 @@ enum altera_family {
        Altera_CYC2,
        /* StratixII Family */
        Altera_StratixII,
+       /* StratixV Family */
+       Altera_StratixV,
        /* SoCFPGA Family */
        Altera_SoCFPGA,
 
@@ -89,6 +104,7 @@ typedef struct {
        Altera_done_fn done;
        Altera_clk_fn clk;
        Altera_data_fn data;
+       Altera_write_fn write;
        Altera_abort_fn abort;
        Altera_post_fn post;
 } altera_board_specific_func;
@@ -97,4 +113,8 @@ typedef struct {
 int socfpga_load(Altera_desc *desc, const void *rbf_data, size_t rbf_size);
 #endif
 
+#ifdef CONFIG_FPGA_STRATIX_V
+int stratixv_load(Altera_desc *desc, const void *rbf_data, size_t rbf_size);
+#endif
+
 #endif /* _ALTERA_H_ */
index 150c5235d230f597641bd8a8fbd8e4afa0fd16cd..29b693a40b561c5142e80774b9d809b80deea60e 100644 (file)
 #define CONFIG_USB_MUSB_GADGET
 #define CONFIG_USB_MUSB_PIO_ONLY
 #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DOWNLOAD
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW    2
index b982ed69faea17d1439ca6642d0440bdd8a1dc26..fd3f6a718d2242693d90b9381b92263533f87e4b 100644 (file)
 #define CONFIG_USB_DWC3
 #define CONFIG_USB_DWC3_GADGET
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DOWNLOAD
 #define CONFIG_USB_GADGET_VBUS_DRAW 2
 #define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
index b8c915c7205861c293d13421acde82652108f98d..bfe3fa37f4dda16577ac61a0d508b9eb6c8f0be7 100644 (file)
 #define CONFIG_USB_MUSB_GADGET
 #define CONFIG_USB_MUSB_PIO_ONLY
 #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
-#define CONFIG_USB_GADGET
 #define CONFIG_USBDOWNLOAD_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW    2
index a9df0b33c4e059cadddb8cbcd9532ec81dc46db9..6c860a646234ceaef9f6de528d1ac54caeb36837 100644 (file)
@@ -439,7 +439,6 @@ DEFAULT_LINUX_BOOT_ENV \
 #define CONFIG_USB_MUSB_GADGET
 #define CONFIG_USB_MUSB_PIO_ONLY
 #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DOWNLOAD
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW    2
index c9515a8cb8fdfa5e3ab74f92d6fabd414245d222..cf25bdebe879642ccec3b69d8288c9bcc18c1d6a 100644 (file)
 #define CONFIG_SYS_CACHELINE_SIZE      64
 #define CONFIG_FASTBOOT_BUF_SIZE       (CONFIG_SYS_SDRAM_SIZE - SZ_1M)
 #define CONFIG_FASTBOOT_BUF_ADDR       CONFIG_SYS_SDRAM_BASE
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW    0
 #define CONFIG_USB_GADGET_DWC2_OTG
index 487c011cc2de09a1f82046198d489a9e75f49a90..63e3b94bb55975d5094aef196b7f75e0eea20b17 100644 (file)
@@ -90,7 +90,6 @@
 #define CONFIG_USBD_HS
 #define CONFIG_USB_GADGET_DUALSPEED
 
-#define CONFIG_USB_GADGET
 #define CONFIG_CMD_USB_MASS_STORAGE
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #define CONFIG_USB_GADGET_DOWNLOAD
index 9c73cff6cefb08c31da74f94174e2348e5ede7fd..7f57a54061619f85f12a7b6e5e6eaa9a3d7a120a 100644 (file)
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 
 /* USB Client Support */
-#define CONFIG_USB_GADGET
 #define CONFIG_CI_UDC
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW      2
index a1fd93f21226936b7e22f0f5b219e93d5d039a19..fcf2bd6d57115ae8034822db2a2346d56094461c 100644 (file)
 #define CONFIG_MTD_DEVICE
 #define CONFIG_MTD_PARTITIONS
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_ATMEL_USBA
 
index 45bda4f654f49def87e6ae22ea5df26c0dda0734..c0795ab47f9c4f09cfcf4b33690f98a39aee3381 100644 (file)
 #define CONFIG_USB_DWC3
 #define CONFIG_USB_DWC3_GADGET
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DOWNLOAD
 #define CONFIG_USB_GADGET_VBUS_DRAW 2
 #define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
index d101a77473956c3a689ce9824a2d7d2f98c6eef6..008d24c417399d20ed18d83256ad1eea194fa322 100644 (file)
@@ -50,7 +50,6 @@
 
 #define CONFIG_SYS_MONITOR_LEN         (256 << 10)     /* Reserve 2 sectors */
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DWC2_OTG
 #define CONFIG_USB_GADGET_DWC2_OTG_PHY
 #define CONFIG_USB_GADGET_DUALSPEED
index 38c921a193393dcaea8449c139f0c292faf552be..793b3fb88e9a70e5e6c377183b3e1b981b895fbb 100644 (file)
 #define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
 
 /* USB Mass Storage Gadget */
-#define CONFIG_USB_GADGET
 #define CONFIG_CMD_USB_MASS_STORAGE
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #define CONFIG_USB_GADGET_DOWNLOAD
index c2ac148f03d6e16dfe65b73b2474e073ad4446b7..7f828f7efac70f31d71110d8e075094b8eca5ff7 100644 (file)
 #define CONFIG_USB_MUSB_PIO_ONLY
 #define CONFIG_USB_MUSB_OMAP2PLUS
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW    0
 
index 7f8a59fb59cd6c8632a7098662a35fa1586ede64..e061a101aee6299fc371e334e61f5bd4958b16a3 100644 (file)
 #define CONFIG_USB_STORAGE
 
 /* USB device */
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_ATMEL_USBA
 #define CONFIG_USB_ETHER
index a6d821bb4dcafd6c9f6ce18808ede31d784a0d12..ceea74ed73bfb989a181fcb1f83d9a0b6972cd79 100644 (file)
 #define CONFIG_USBD_HS
 #define CONFIG_USB_GADGET_DUALSPEED
 
-#define CONFIG_USB_GADGET
 #define CONFIG_CMD_USB_MASS_STORAGE
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #define CONFIG_USB_GADGET_DOWNLOAD
index 2c981e0939fd6753555c5c7db109a860c1cc5dd3..5d897c253f8f8845eb53b5daf1e5343ef3d7e5b5 100644 (file)
 #define CONFIG_USBD_HS
 #define CONFIG_USB_GADGET_DUALSPEED
 
-#define CONFIG_USB_GADGET
 #define CONFIG_CMD_USB_MASS_STORAGE
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #define CONFIG_USB_GADGET_DOWNLOAD
index 3416ce3321b574ec4c0c02f0779eb09cccc8a2fd..3604e44c0db63fe5391db3e36ad470b35225b35e 100644 (file)
 #endif
 
 
-#define CONFIG_USB_GADGET
 #define CONFIG_CMD_USB_MASS_STORAGE
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #define CONFIG_USB_GADGET_DOWNLOAD
index 500f0f9d4f98bbd2b0bdde736b6f84901b60de17..01d08dc582a985b49f2abecb8f6aac1515baa4fb 100644 (file)
@@ -53,7 +53,6 @@
 #define CONFIG_USB_DWC3_PHY_SAMSUNG
 
 /* USB gadget */
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW    2
 
index 65f08a1c57b2a7a057a7502d5116d7873fda4c3a..2112d9fe94660f001d7f3039ce8892ced208465c 100644 (file)
@@ -66,7 +66,6 @@
 #define CONFIG_TWL4030_USB             1
 #define CONFIG_USB_ETHER
 #define CONFIG_USB_ETHER_RNDIS
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_VBUS_DRAW    0
 #define CONFIG_USB_GADGET_DOWNLOAD
 #define CONFIG_G_DNL_VENDOR_NUM                0x0451
index 0fc9d1c4e136ab9ffb53b78e996371d3d2f1264f..304e1ce31c6e5235bf3dc2e0f02989e3ba8c3efe 100644 (file)
@@ -85,7 +85,6 @@
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_ETHER
 #define CONFIG_USB_ETHER_RNDIS
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_VBUS_DRAW    0
 #define CONFIG_USB_GADGET_DOWNLOAD
 #define CONFIG_G_DNL_VENDOR_NUM                0x0451
index 18a2924fd479091da05f641b74e19d59e13f10da..a5cfa0c5ca824aff84db0580c3f2b60a8a00dcfb 100644 (file)
 #define CONFIG_USB_DWC3
 #define CONFIG_USB_DWC3_GADGET
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DOWNLOAD
 #define CONFIG_USB_GADGET_VBUS_DRAW 2
 #define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
index bfc1c1e5707c0b6c831ce7c654d229a53b7e57c5..1a670cbd63d25c7103d5939832be0dc071d1d787 100644 (file)
 #define CONFIG_USB_MUSB_GADGET
 #define CONFIG_USB_MUSB_PIO_ONLY
 #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW    2
 #define CONFIG_USB_MUSB_HOST
index f0ecc3458700b5431a5778d5558e2e774114e847..729568755bced03dae42e8f84dcd66200bc5bb0d 100644 (file)
@@ -10,6 +10,7 @@
 #define        __CONFIG_PXA_COMMON_H__
 
 #define        CONFIG_DISPLAY_CPUINFO
+#define        CONFIG_SYS_ARM_CACHE_WRITETHROUGH
 
 /*
  * KGDB
 #define        CONFIG_USB_OHCI_NEW
 #define        CONFIG_SYS_USB_OHCI_CPU_INIT
 #define        CONFIG_SYS_USB_OHCI_BOARD_INIT
+#ifdef CONFIG_CPU_PXA27X
+#define        CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS      3
+#else
 #define        CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS      2
+#endif
 #define        CONFIG_SYS_USB_OHCI_REGS_BASE           0x4c000000
 #define        CONFIG_SYS_USB_OHCI_SLOT_NAME           "pxa-ohci"
 #define        CONFIG_USB_STORAGE
index 7250e37a351724618112d36f3c1674b92563e4a4..89aee0a85b406b1c9dc6a42df06f07573736aa4b 100644 (file)
@@ -11,7 +11,6 @@
 #include <asm/arch/timer.h>
 
 /* Architecture, CPU, etc.*/
-#define CONFIG_BCM2835
 #define CONFIG_ARCH_CPU_INIT
 
 #define CONFIG_SYS_TIMER_RATE          1000000
@@ -26,7 +25,7 @@
  * chose to use someone else's previously registered machine ID (3139, MX51_GGC)
  * rather than obtaining a valid ID:-/
  */
-#ifndef CONFIG_BCM2836
+#ifdef CONFIG_BCM2835
 #define CONFIG_MACH_TYPE               MACH_TYPE_BCM2708
 #endif
 
@@ -80,7 +79,7 @@
 #define CONFIG_CMD_USB
 #ifdef CONFIG_CMD_USB
 #define CONFIG_USB_DWC2
-#ifdef CONFIG_BCM2836
+#ifndef CONFIG_BCM2835
 #define CONFIG_USB_DWC2_REG_ADDR 0x3f980000
 #else
 #define CONFIG_USB_DWC2_REG_ADDR 0x20980000
index 86422e390da2d966a15cf4b993c56f7e7966aa72..a788ce42e44c386b4eed71b0ac6a84e4a138bb44 100644 (file)
@@ -7,6 +7,7 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_BCM2835
 #define CONFIG_SYS_CACHELINE_SIZE              32
 
 #include "rpi-common.h"
index bea4ebda7facf13a625104946f5ad99482a06b41..13dc8de14315147d798f8074a9e021cf40938125 100644 (file)
@@ -10,7 +10,6 @@
 #define CONFIG_SKIP_LOWLEVEL_INIT
 #define CONFIG_BCM2836
 #define CONFIG_SYS_CACHELINE_SIZE              64
-#define CONFIG_SYS_DCACHE_OFF
 
 #include "rpi-common.h"
 
index 40fb5ed35dd69160178fc2a85b52035425c2d432..07a513499954ae71b3017f9299f6f882fc4e2441 100644 (file)
 #define CONFIG_SYS_I2C_INIT_BOARD
 
 #define CONFIG_SYS_MAX_I2C_BUS 7
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DWC2_OTG
 #define CONFIG_USB_GADGET_DWC2_OTG_PHY
 #define CONFIG_USB_GADGET_DUALSPEED
index 7bb62ca6c17889ef5785dd79e726c044deb9a37d..ed5365ac76a456d8c6c7616d173d2bcd645da438 100644 (file)
 #define CONFIG_POWER_I2C
 #define CONFIG_POWER_MAX8998
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DWC2_OTG
 #define CONFIG_USB_GADGET_DWC2_OTG_PHY
 #define CONFIG_USB_GADGET_DUALSPEED
index 272257ea0edd4f770fdcac7d6578c1eebcab0e54..1225aa846b5cf138dd1543cb2852a8b370f7db71 100644 (file)
@@ -74,7 +74,6 @@
 #endif
 
 /* USB device */
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_ATMEL_USBA
 #define CONFIG_USB_ETHER
index bd5f4eef084318fe358413bf3a7a1bce54d28594..ed6bafb4860db3aaf5aec75c81755666584f0bfc 100644 (file)
 #endif
 
 /* USB device */
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_ATMEL_USBA
 #define CONFIG_USB_ETHER
index 52b4584aa691ec395601bb4464764b500285e25a..d89609b830951d18fbd473ba6d52b12f5bd50b08 100644 (file)
@@ -83,7 +83,6 @@
 #endif
 
 /* USB device */
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_ATMEL_USBA
 #define CONFIG_USB_ETHER
index ce96a7c7e77fc90b908eb2689cf06e75415ada6b..3981c2363bc6d79fc2d1eba7b3a6d1a0ed564231 100644 (file)
@@ -83,7 +83,6 @@
 #endif
 
 /* USB device */
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_ATMEL_USBA
 #define CONFIG_USB_ETHER
index c529636a66def1c894330942a8fc657bc8d8f033..f9fb9bc9afb55797c86ff5dac01923bc14e997ba 100644 (file)
 
 #define CONFIG_MTDPARTS                \
        "orion_nand:512K(uboot),"                               \
-       "512K(env),1M(script),6M(kernel),"                              \
-       "12M(ramdisk),4M(spare),-(rootfs)\0"
+       "512K(env),4M(kernel),"                                 \
+       "-(rootfs)\0"
 
 #define CONFIG_EXTRA_ENV_SETTINGS      "x_bootargs=console"    \
        "=ttyS0,115200 mtdparts="CONFIG_MTDPARTS        \
-       "x_bootcmd_kernel=nand read 0x6400000 0x100000 0x300000\0" \
+       "x_bootcmd_kernel=nand read 0x6400000 0x100000 0x400000\0" \
        "x_bootcmd_usb=usb start\0" \
        "x_bootargs_root=root=/dev/mtdblock3 rw rootfstype=jffs2\0"
 
index 3a8b90e2de22970a7c79350231c2f6274c08e941..df2a514b5174ddac46df7e34145d21d35e01e532 100644 (file)
 #define CONFIG_USBNET_HOST_ADDR        "de:ad:be:af:00:00"
 #endif /* CONFIG_USB_MUSB_GADGET */
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DOWNLOAD
 
 /* USB DRACO ID as default */
index d06e6486401a995cfeadb31035a25a9c9223d9ec..db820ba7fed62d058cfd738c48e8cd68e5ccb8c9 100644 (file)
 #define CONFIG_MTD_DEVICE
 #define CONFIG_MTD_PARTITIONS
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_AT91
 
 /* DFU class support */
index b7ac402f988aef149199d118476b616edb0735f5..856bf7d67be1f78601a1861579dac4a0b01bd8f5 100644 (file)
@@ -12,7 +12,6 @@
 #include "exynos4-common.h"
 
 #undef CONFIG_BOARD_COMMON
-#undef CONFIG_USB_GADGET
 #undef CONFIG_USB_GADGET_DWC2_OTG
 #undef CONFIG_USB_GADGET_DWC2_OTG_PHY
 #undef CONFIG_CMD_USB_MASS_STORAGE
index 171a8c4ced73a2c0bec1b80a29169c334d223f7c..45ab21ff35df43e46487e0bf543a6aad8cc0eaf6 100644 (file)
 #define CONFIG_USB_MUSB_OMAP2PLUS
 #define CONFIG_TWL4030_USB
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW    0
 
index 56d32e6b53255c7fcf34057fb5a374df4c2436b2..07519c1e6c3be35f87a1a3f399c41a10d2f5e2b8 100644 (file)
@@ -252,7 +252,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
  * USB Gadget (DFU, UMS)
  */
 #if defined(CONFIG_CMD_DFU) || defined(CONFIG_CMD_USB_MASS_STORAGE)
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DWC2_OTG
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW    2
index 41f1b6938df5f890e611b81545e049908ea32143..05e2363c5dd13ff7dc11cfb34ab22e3f17e05fb5 100644 (file)
@@ -47,6 +47,7 @@
 #define CONFIG_GREEN_LED               109
 
 #define CONFIG_STM32_GPIO
+#define CONFIG_STM32_FLASH
 #define CONFIG_STM32_SERIAL
 
 #define CONFIG_STM32_HSE_HZ            8000000
index e1b8bcb084db91fbc56b834ffc4ed9c12afa7cc0..807ab6574eb5144b38ee10e79833caa5ae5f7f56 100644 (file)
@@ -9,7 +9,7 @@
 #define __CONFIG_H
 
 #define CONFIG_SYS_THUMB_BUILD
-#define CONFIG_SYS_NO_FLASH
+/*#define CONFIG_SYS_NO_FLASH*/
 
 #define CONFIG_OF_LIBFDT
 #define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_SYS_LOAD_ADDR           0x20000000
 #define CONFIG_LOADADDR                        0x20000000
 
-#define CONFIG_SYS_MAX_FLASH_SECT      12
-#define CONFIG_SYS_MAX_FLASH_BANKS     2
+#define CONFIG_SYS_MAX_FLASH_SECT      8
+#define CONFIG_SYS_MAX_FLASH_BANKS     1
 
-#ifndef CONFIG_SYS_NO_FLASH
-#define CONFIG_ENV_IS_IN_FLASH
-#else
 #define CONFIG_ENV_IS_NOWHERE
-#endif
 #define CONFIG_ENV_SIZE                        (8 << 10)
 
 #define CONFIG_STM32_GPIO
+#define CONFIG_STM32_FLASH
 #define CONFIG_STM32X7_SERIAL
 
 #define CONFIG_SYS_CLK_FREQ            16*1000*1000 /* 180 MHz */
index b26363d69b9a0786de8c555940f8a9a7fca519ea..a3994e1a6ad479292fe23cdf4c6d0dbcfabd3ef8 100644 (file)
@@ -310,6 +310,7 @@ extern int soft_i2c_gpio_scl;
 #define CONFIG_PHY_GIGE                        /* GMAC can use gigabit PHY     */
 #define CONFIG_PHY_ADDR                1
 #define CONFIG_MII                     /* MII PHY management           */
+#define CONFIG_PHY_REALTEK
 #endif
 
 #ifdef CONFIG_USB_EHCI_HCD
@@ -324,7 +325,6 @@ extern int soft_i2c_gpio_scl;
 #endif
 
 #ifdef CONFIG_USB_MUSB_GADGET
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW    0
 
index c1581d87ce716bdae448e26226cbbdc372e1b452..5b190f622548b736d9b31be23ff8a0fb6ee63240 100644 (file)
 #define CONFIG_MTD_DEVICE
 #define CONFIG_MTD_PARTITIONS
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_AT91
 
 /* DFU class support */
index 33ac955e336e890ab3342e8ee0a425f764e6d0f4..1b5046af2f02b4e78408e28d43a67c5f97cab1cf 100644 (file)
 #ifdef CONFIG_CMD_USB_MASS_STORAGE
 #define CONFIG_CI_UDC
 #define CONFIG_USBD_HS
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW    0
index f6e1d5c4db2dc9b7ccd6f87e90b6c8fe30ab9b04..c3a01514cab5a95bbda9dcf74edc99d86e7f11bc 100644 (file)
@@ -10,7 +10,6 @@
 
 #ifndef CONFIG_SPL_BUILD
 /* USB gadget mode support*/
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_VBUS_DRAW    2
 #define CONFIG_CI_UDC
 #define CONFIG_CI_UDC_HAS_HOSTPC
index 9f186add71f427af7430b1a7235c9222d3ebe56b..a4bcf212108ed7b4d0d111bc07ffe850717b5576 100644 (file)
 #define CONFIG_VGA_AS_SINGLE_DEVICE
 #define CONFIG_CMD_BMP
 
+/* FPGA programming support */
+#define CONFIG_FPGA
+#define CONFIG_FPGA_ALTERA
+#define CONFIG_FPGA_STRATIX_V
+
 /*
  * mv-common.h should be defined after CMD configs since it used them
  * to enable certain macros
index 1a744895020cab5129ef2224c56c3e944d60140d..5f3d6b8d4b7f96dc36e17f13ad52b5537eec7592 100644 (file)
 #define CONFIG_SYS_NS16550_REG_SIZE    -2
 #endif
 
-/* TODO: move to Kconfig and device tree */
-#if 0
-#define CONFIG_SYS_NS16550_SERIAL
-#endif
-
 #define CONFIG_SMC911X
 
 /* dummy: referenced by examples/standalone/smc911x_eeprom.c */
@@ -39,7 +34,7 @@
 
 #define CONFIG_SYS_CACHELINE_SIZE      32
 
-/* Comment out the following to enable L2 cache */
+/* Comment out the following to disable L2 cache */
 #define CONFIG_UNIPHIER_L2CACHE_ON
 
 #define CONFIG_DISPLAY_CPUINFO
@@ -66,6 +61,7 @@
 
 #define CONFIG_SYS_MAX_FLASH_SECT      256
 #define CONFIG_SYS_MONITOR_BASE                0
+#define CONFIG_SYS_MONITOR_LEN         0x00080000      /* 512KB */
 #define CONFIG_SYS_FLASH_BASE          0
 
 /*
 
 #define CONFIG_NAND_DENALI_ECC_SIZE                    1024
 
-#ifdef CONFIG_ARCH_UNIPHIER_PH1_SLD3
+#ifdef CONFIG_ARCH_UNIPHIER_SLD3
 #define CONFIG_SYS_NAND_REGS_BASE                      0xf8100000
 #define CONFIG_SYS_NAND_DATA_BASE                      0xf8000000
 #else
                "mmc erase 0 800 &&"                            \
                "tftpboot u-boot-spl.bin &&"                    \
                "mmc write $loadaddr 0 80 &&"                   \
-               "tftpboot u-boot.img &&"                        \
+               "tftpboot u-boot.bin &&"                        \
                "mmc write $loadaddr 80 780\0"                  \
        "nandupdate=nand erase 0 0x00100000 &&"                 \
                "tftpboot u-boot-spl.bin &&"                    \
                "nand write $loadaddr 0 0x00010000 &&"          \
-               "tftpboot u-boot.img &&"                        \
+               "tftpboot u-boot.bin &&"                        \
                "nand write $loadaddr 0x00010000 0x000f0000\0"  \
        LINUXBOOT_ENV_SETTINGS
 
 #define CONFIG_SYS_SDRAM_BASE          0x80000000
 #define CONFIG_NR_DRAM_BANKS           2
 
-#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3) || \
-       defined(CONFIG_ARCH_UNIPHIER_PH1_LD4) || \
-       defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8)
+#if defined(CONFIG_ARCH_UNIPHIER_SLD3) || defined(CONFIG_ARCH_UNIPHIER_LD4) || \
+       defined(CONFIG_ARCH_UNIPHIER_SLD8)
 #define CONFIG_SPL_TEXT_BASE           0x00040000
 #else
 #define CONFIG_SPL_TEXT_BASE           0x00100000
 
 #define CONFIG_SPL_FRAMEWORK
 #define CONFIG_SPL_SERIAL_SUPPORT
+#define CONFIG_SPL_NOR_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
 #define CONFIG_SPL_MMC_SUPPORT
 
 #define CONFIG_SPL_BOARD_INIT
 
 #define CONFIG_SYS_NAND_U_BOOT_OFFS            0x10000
+
+/* subtract sizeof(struct image_header) */
+#define CONFIG_SYS_UBOOT_BASE                  (0x60000 - 0x40)
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR        0x80
 
+#define CONFIG_SPL_TARGET                      "u-boot-with-spl.bin"
 #define CONFIG_SPL_MAX_FOOTPRINT               0x10000
 
 #endif /* __CONFIG_UNIPHIER_COMMON_H__ */
index 92b1b4bca7b0005330224da84ff45c0674cb2984..5073b9cb5635894fb28f00991d56e5c096ed3733 100644 (file)
@@ -86,7 +86,6 @@
 #endif
 
 /* USB device */
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_ATMEL_USBA
 #define CONFIG_USB_ETHER
index 3e9a5a3ef3767cd387bb3f5343aa6dcd3e2219d8..cb93629589a8ade22dfafed247d2c2698b7d7f02 100644 (file)
@@ -78,7 +78,6 @@
 #define CONFIG_USBD_HS
 #define CONFIG_USB_GADGET_DUALSPEED
 
-#define CONFIG_USB_GADGET
 #define CONFIG_CMD_USB_MASS_STORAGE
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #define CONFIG_USB_GADGET_DOWNLOAD
index 9d9ffd00c18c307eb10d427bcf2b563d27c1e64a..4e066cdfd23368a3ec69ceadf7c858ac7fc82a36 100644 (file)
 #define CONFIG_USB_DWC3
 #define CONFIG_USB_DWC3_GADGET
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DOWNLOAD
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW    2
diff --git a/include/configs/zipitz2.h b/include/configs/zipitz2.h
new file mode 100644 (file)
index 0000000..5200e02
--- /dev/null
@@ -0,0 +1,226 @@
+/*
+ * Aeronix Zipit Z2 configuration file
+ *
+ * Copyright (C) 2009-2010 Marek Vasut <marek.vasut@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/*
+ * High Level Board Configuration Options
+ */
+#define        CONFIG_CPU_PXA27X               1       /* Marvell PXA270 CPU */
+#define        CONFIG_SYS_TEXT_BASE            0x0
+
+#undef CONFIG_BOARD_LATE_INIT
+#undef CONFIG_SKIP_LOWLEVEL_INIT
+#define        CONFIG_PREBOOT
+
+/*
+ * Environment settings
+ */
+#define        CONFIG_ENV_OVERWRITE
+#define CONFIG_ENV_IS_IN_FLASH         1
+#define CONFIG_ENV_ADDR                        0x40000
+#define CONFIG_ENV_SIZE                        0x10000
+
+#define        CONFIG_SYS_MALLOC_LEN           (128*1024)
+#define        CONFIG_ARCH_CPU_INIT
+
+#define        CONFIG_BOOTCOMMAND                                              \
+       "if mmc rescan && ext2load mmc 0 0xa0000000 boot/uboot.script ;"\
+       "then "                                                         \
+               "source 0xa0000000; "                                   \
+       "else "                                                         \
+               "bootm 0x50000; "                                       \
+       "fi; "
+#define        CONFIG_BOOTARGS                                                 \
+       "console=tty0 console=ttyS2,115200 fbcon=rotate:3"
+#define        CONFIG_TIMESTAMP
+#define        CONFIG_BOOTDELAY                2       /* Autoboot delay */
+#define        CONFIG_CMDLINE_TAG
+#define        CONFIG_SETUP_MEMORY_TAGS
+#define        CONFIG_SYS_TEXT_BASE            0x0
+#define        CONFIG_LZMA                     /* LZMA compression support */
+#define        CONFIG_OF_LIBFDT
+
+/*
+ * Serial Console Configuration
+ * STUART - the lower serial port on Colibri board
+ */
+#define        CONFIG_PXA_SERIAL
+#define        CONFIG_STUART                   1
+#define CONFIG_CONS_INDEX              2
+#define        CONFIG_BAUDRATE                 115200
+
+/*
+ * Bootloader Components Configuration
+ */
+#define        CONFIG_CMD_ENV
+#define        CONFIG_CMD_MMC
+#define        CONFIG_CMD_SPI
+#define        CONFIG_CMD_USB
+#define        CONFIG_CMD_CACHE
+
+/*
+ * MMC Card Configuration
+ */
+#ifdef CONFIG_CMD_MMC
+#define        CONFIG_MMC
+#define        CONFIG_GENERIC_MMC
+#define        CONFIG_PXA_MMC_GENERIC
+#define        CONFIG_SYS_MMC_BASE             0xF0000000
+#define        CONFIG_CMD_FAT
+#define CONFIG_CMD_EXT2
+#define        CONFIG_DOS_PARTITION
+#endif
+
+/*
+ * SPI and LCD
+ */
+#ifdef CONFIG_CMD_SPI
+#define        CONFIG_SOFT_SPI
+#define        CONFIG_LCD
+#define        CONFIG_LCD_ROTATION
+#define        CONFIG_PXA_LCD
+#define        CONFIG_LMS283GF05
+
+#define        SPI_DELAY       udelay(10)
+#define        SPI_SDA(val)    zipitz2_spi_sda(val)
+#define        SPI_SCL(val)    zipitz2_spi_scl(val)
+#define        SPI_READ        zipitz2_spi_read()
+#ifndef        __ASSEMBLY__
+void zipitz2_spi_sda(int);
+void zipitz2_spi_scl(int);
+unsigned char zipitz2_spi_read(void);
+#endif
+#endif
+
+/*
+ * HUSH Shell Configuration
+ */
+#define        CONFIG_SYS_HUSH_PARSER          1
+
+#define        CONFIG_SYS_LONGHELP                             /* undef to save memory */
+#define        CONFIG_SYS_CBSIZE               256             /* Console I/O Buffer Size */
+#define        CONFIG_SYS_PBSIZE               (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)        /* Print Buffer Size */
+#define        CONFIG_SYS_MAXARGS              16              /* max number of command args */
+#define        CONFIG_SYS_BARGSIZE             CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size */
+#define        CONFIG_SYS_DEVICE_NULLDEV       1
+
+/*
+ * Clock Configuration
+ */
+#define CONFIG_SYS_CPUSPEED            0x190           /* standard setting for 312MHz; L=16, N=1.5, A=0, SDCLK!=SystemBus */
+
+/*
+ * SRAM Map
+ */
+#define        PHYS_SRAM                       0x5c000000      /* SRAM Bank #1 */
+#define        PHYS_SRAM_SIZE                  0x00040000      /* 256k */
+
+/*
+ * DRAM Map
+ */
+#define        CONFIG_NR_DRAM_BANKS            1               /* We have 1 bank of DRAM */
+#define        PHYS_SDRAM_1                    0xa0000000      /* SDRAM Bank #1 */
+#define        PHYS_SDRAM_1_SIZE               0x02000000      /* 32 MB */
+
+#define        CONFIG_SYS_DRAM_BASE            0xa0000000      /* CS0 */
+#define        CONFIG_SYS_DRAM_SIZE            0x02000000      /* 32 MB DRAM */
+
+#define CONFIG_SYS_MEMTEST_START       0xa0400000      /* memtest works on */
+#define CONFIG_SYS_MEMTEST_END         0xa0800000      /* 4 ... 8 MB in DRAM */
+
+#define        CONFIG_SYS_LOAD_ADDR            CONFIG_SYS_DRAM_BASE
+
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
+#define        CONFIG_SYS_INIT_SP_ADDR         (GENERATED_GBL_DATA_SIZE + PHYS_SRAM + 2048)
+
+/*
+ * NOR FLASH
+ */
+#define PHYS_FLASH_1                   0x00000000      /* Flash Bank #1 */
+#define PHYS_FLASH_SIZE                        0x00800000      /* 8 MB */
+#define PHYS_FLASH_SECT_SIZE           0x00010000      /* 64 KB sectors */
+#define CONFIG_SYS_FLASH_BASE          PHYS_FLASH_1
+
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_FLASH_CFI_DRIVER                1
+#define CONFIG_SYS_FLASH_CFI_WIDTH      FLASH_CFI_16BIT
+
+#define CONFIG_SYS_MONITOR_BASE                PHYS_FLASH_1
+#define CONFIG_SYS_MONITOR_LEN         PHYS_FLASH_SECT_SIZE
+
+#define CONFIG_SYS_MAX_FLASH_BANKS     1
+#define CONFIG_SYS_MAX_FLASH_SECT      256
+
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE      1
+
+#define CONFIG_SYS_FLASH_ERASE_TOUT    240000
+#define CONFIG_SYS_FLASH_WRITE_TOUT    240000
+#define CONFIG_SYS_FLASH_LOCK_TOUT     240000
+#define CONFIG_SYS_FLASH_UNLOCK_TOUT   240000
+#define CONFIG_SYS_FLASH_PROTECTION
+
+/*
+ * GPIO settings
+ */
+#define CONFIG_SYS_GAFR0_L_VAL 0x02000140
+#define CONFIG_SYS_GAFR0_U_VAL 0x59188000
+#define CONFIG_SYS_GAFR1_L_VAL 0x63900002
+#define CONFIG_SYS_GAFR1_U_VAL 0xaaa03950
+#define CONFIG_SYS_GAFR2_L_VAL 0x0aaaaaaa
+#define CONFIG_SYS_GAFR2_U_VAL 0x29000308
+#define CONFIG_SYS_GAFR3_L_VAL 0x54000000
+#define CONFIG_SYS_GAFR3_U_VAL 0x000000d5
+#define CONFIG_SYS_GPCR0_VAL   0x00000000
+#define CONFIG_SYS_GPCR1_VAL   0x00000020
+#define CONFIG_SYS_GPCR2_VAL   0x00000000
+#define CONFIG_SYS_GPCR3_VAL   0x00000000
+#define CONFIG_SYS_GPDR0_VAL   0xdafcee00
+#define CONFIG_SYS_GPDR1_VAL   0xffa3aaab
+#define CONFIG_SYS_GPDR2_VAL   0x8fe9ffff
+#define CONFIG_SYS_GPDR3_VAL   0x001b1f8a
+#define CONFIG_SYS_GPSR0_VAL   0x06080400
+#define CONFIG_SYS_GPSR1_VAL   0x007f0000
+#define CONFIG_SYS_GPSR2_VAL   0x032a0000
+#define CONFIG_SYS_GPSR3_VAL   0x00000180
+
+#define CONFIG_SYS_PSSR_VAL    0x30
+
+/*
+ * Clock settings
+ */
+#define CONFIG_SYS_CKEN                0x00511220
+#define CONFIG_SYS_CCCR                0x00000190
+
+/*
+ * Memory settings
+ */
+#define CONFIG_SYS_MSC0_VAL    0x2ffc38f8
+#define CONFIG_SYS_MSC1_VAL    0x0000ccd1
+#define CONFIG_SYS_MSC2_VAL    0x0000b884
+#define CONFIG_SYS_MDCNFG_VAL  0x08000ba9
+#define CONFIG_SYS_MDREFR_VAL  0x2011a01e
+#define CONFIG_SYS_MDMRS_VAL   0x00000000
+#define CONFIG_SYS_FLYCNFG_VAL 0x00010001
+#define CONFIG_SYS_SXCNFG_VAL  0x40044004
+
+/*
+ * PCMCIA and CF Interfaces
+ */
+#define CONFIG_SYS_MECR_VAL    0x00000001
+#define CONFIG_SYS_MCMEM0_VAL  0x00014307
+#define CONFIG_SYS_MCMEM1_VAL  0x00014307
+#define CONFIG_SYS_MCATT0_VAL  0x0001c787
+#define CONFIG_SYS_MCATT1_VAL  0x0001c787
+#define CONFIG_SYS_MCIO0_VAL   0x0001430f
+#define CONFIG_SYS_MCIO1_VAL   0x0001430f
+
+#include "pxa-common.h"
+
+#endif /* __CONFIG_H */
index 77edbb8f952814439770041403759cdf72d51f29..9ff3df25f00b2d246cf8ba31ec1e59666a0cf62a 100644 (file)
 # define CONFIG_USB_MAX_CONTROLLER_COUNT       2
 
 # define CONFIG_CI_UDC           /* ChipIdea CI13xxx UDC */
-# define CONFIG_USB_GADGET
 # define CONFIG_USB_GADGET_DUALSPEED
 # define CONFIG_USB_GADGET_DOWNLOAD
 # define CONFIG_SYS_DFU_DATA_BUF_SIZE  0x600000
 # define CONFIG_G_DNL_VENDOR_NUM       0x03FD
 # define CONFIG_G_DNL_PRODUCT_NUM      0x0300
 # define CONFIG_G_DNL_MANUFACTURER     "Xilinx"
-# define CONFIG_USB_GADGET
 # define CONFIG_USB_CABLE_CHECK
 # define CONFIG_CMD_DFU
 # define CONFIG_CMD_THOR_DOWNLOAD
diff --git a/include/dm/platform_data/serial_bcm283x_mu.h b/include/dm/platform_data/serial_bcm283x_mu.h
new file mode 100644 (file)
index 0000000..57ae6ad
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * (C) Copyright 2016 Stephen Warren <swarren@wwwdotorg.org>
+ *
+ * Derived from pl01x code:
+ * Copyright (c) 2014 Google, Inc
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __serial_bcm283x_mu_h
+#define __serial_bcm283x_mu_h
+
+/*
+ *Information about a serial port
+ *
+ * @base: Register base address
+ */
+struct bcm283x_mu_serial_platdata {
+       unsigned long base;
+       unsigned int clock;
+       bool skip_init;
+};
+
+#endif
diff --git a/include/dt-bindings/clock/sun4i-a10-pll2.h b/include/dt-bindings/clock/sun4i-a10-pll2.h
new file mode 100644 (file)
index 0000000..071c811
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2015 Maxime Ripard
+ *
+ * Maxime Ripard <maxime.ripard@free-electrons.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __DT_BINDINGS_CLOCK_SUN4I_A10_PLL2_H_
+#define __DT_BINDINGS_CLOCK_SUN4I_A10_PLL2_H_
+
+#define SUN4I_A10_PLL2_1X      0
+#define SUN4I_A10_PLL2_2X      1
+#define SUN4I_A10_PLL2_4X      2
+#define SUN4I_A10_PLL2_8X      3
+
+#endif /* __DT_BINDINGS_CLOCK_SUN4I_A10_PLL2_H_ */
index 042e7b3b629637d468029cadac9e9419f7ae295e..a21413324a3f7bbb55a0f2e002d10f7b2211a7e5 100644 (file)
@@ -9,515 +9,7 @@
 #ifndef _DT_BINDINGS_INPUT_INPUT_H
 #define _DT_BINDINGS_INPUT_INPUT_H
 
-#define KEY_RESERVED           0
-#define KEY_ESC                        1
-#define KEY_1                  2
-#define KEY_2                  3
-#define KEY_3                  4
-#define KEY_4                  5
-#define KEY_5                  6
-#define KEY_6                  7
-#define KEY_7                  8
-#define KEY_8                  9
-#define KEY_9                  10
-#define KEY_0                  11
-#define KEY_MINUS              12
-#define KEY_EQUAL              13
-#define KEY_BACKSPACE          14
-#define KEY_TAB                        15
-#define KEY_Q                  16
-#define KEY_W                  17
-#define KEY_E                  18
-#define KEY_R                  19
-#define KEY_T                  20
-#define KEY_Y                  21
-#define KEY_U                  22
-#define KEY_I                  23
-#define KEY_O                  24
-#define KEY_P                  25
-#define KEY_LEFTBRACE          26
-#define KEY_RIGHTBRACE         27
-#define KEY_ENTER              28
-#define KEY_LEFTCTRL           29
-#define KEY_A                  30
-#define KEY_S                  31
-#define KEY_D                  32
-#define KEY_F                  33
-#define KEY_G                  34
-#define KEY_H                  35
-#define KEY_J                  36
-#define KEY_K                  37
-#define KEY_L                  38
-#define KEY_SEMICOLON          39
-#define KEY_APOSTROPHE         40
-#define KEY_GRAVE              41
-#define KEY_LEFTSHIFT          42
-#define KEY_BACKSLASH          43
-#define KEY_Z                  44
-#define KEY_X                  45
-#define KEY_C                  46
-#define KEY_V                  47
-#define KEY_B                  48
-#define KEY_N                  49
-#define KEY_M                  50
-#define KEY_COMMA              51
-#define KEY_DOT                        52
-#define KEY_SLASH              53
-#define KEY_RIGHTSHIFT         54
-#define KEY_KPASTERISK         55
-#define KEY_LEFTALT            56
-#define KEY_SPACE              57
-#define KEY_CAPSLOCK           58
-#define KEY_F1                 59
-#define KEY_F2                 60
-#define KEY_F3                 61
-#define KEY_F4                 62
-#define KEY_F5                 63
-#define KEY_F6                 64
-#define KEY_F7                 65
-#define KEY_F8                 66
-#define KEY_F9                 67
-#define KEY_F10                        68
-#define KEY_NUMLOCK            69
-#define KEY_SCROLLLOCK         70
-#define KEY_KP7                        71
-#define KEY_KP8                        72
-#define KEY_KP9                        73
-#define KEY_KPMINUS            74
-#define KEY_KP4                        75
-#define KEY_KP5                        76
-#define KEY_KP6                        77
-#define KEY_KPPLUS             78
-#define KEY_KP1                        79
-#define KEY_KP2                        80
-#define KEY_KP3                        81
-#define KEY_KP0                        82
-#define KEY_KPDOT              83
-
-#define KEY_ZENKAKUHANKAKU     85
-#define KEY_102ND              86
-#define KEY_F11                        87
-#define KEY_F12                        88
-#define KEY_RO                 89
-#define KEY_KATAKANA           90
-#define KEY_HIRAGANA           91
-#define KEY_HENKAN             92
-#define KEY_KATAKANAHIRAGANA   93
-#define KEY_MUHENKAN           94
-#define KEY_KPJPCOMMA          95
-#define KEY_KPENTER            96
-#define KEY_RIGHTCTRL          97
-#define KEY_KPSLASH            98
-#define KEY_SYSRQ              99
-#define KEY_RIGHTALT           100
-#define KEY_LINEFEED           101
-#define KEY_HOME               102
-#define KEY_UP                 103
-#define KEY_PAGEUP             104
-#define KEY_LEFT               105
-#define KEY_RIGHT              106
-#define KEY_END                        107
-#define KEY_DOWN               108
-#define KEY_PAGEDOWN           109
-#define KEY_INSERT             110
-#define KEY_DELETE             111
-#define KEY_MACRO              112
-#define KEY_MUTE               113
-#define KEY_VOLUMEDOWN         114
-#define KEY_VOLUMEUP           115
-#define KEY_POWER              116     /* SC System Power Down */
-#define KEY_KPEQUAL            117
-#define KEY_KPPLUSMINUS                118
-#define KEY_PAUSE              119
-#define KEY_SCALE              120     /* AL Compiz Scale (Expose) */
-
-#define KEY_KPCOMMA            121
-#define KEY_HANGEUL            122
-#define KEY_HANGUEL            KEY_HANGEUL
-#define KEY_HANJA              123
-#define KEY_YEN                        124
-#define KEY_LEFTMETA           125
-#define KEY_RIGHTMETA          126
-#define KEY_COMPOSE            127
-
-#define KEY_STOP               128     /* AC Stop */
-#define KEY_AGAIN              129
-#define KEY_PROPS              130     /* AC Properties */
-#define KEY_UNDO               131     /* AC Undo */
-#define KEY_FRONT              132
-#define KEY_COPY               133     /* AC Copy */
-#define KEY_OPEN               134     /* AC Open */
-#define KEY_PASTE              135     /* AC Paste */
-#define KEY_FIND               136     /* AC Search */
-#define KEY_CUT                        137     /* AC Cut */
-#define KEY_HELP               138     /* AL Integrated Help Center */
-#define KEY_MENU               139     /* Menu (show menu) */
-#define KEY_CALC               140     /* AL Calculator */
-#define KEY_SETUP              141
-#define KEY_SLEEP              142     /* SC System Sleep */
-#define KEY_WAKEUP             143     /* System Wake Up */
-#define KEY_FILE               144     /* AL Local Machine Browser */
-#define KEY_SENDFILE           145
-#define KEY_DELETEFILE         146
-#define KEY_XFER               147
-#define KEY_PROG1              148
-#define KEY_PROG2              149
-#define KEY_WWW                        150     /* AL Internet Browser */
-#define KEY_MSDOS              151
-#define KEY_COFFEE             152     /* AL Terminal Lock/Screensaver */
-#define KEY_SCREENLOCK         KEY_COFFEE
-#define KEY_DIRECTION          153
-#define KEY_CYCLEWINDOWS       154
-#define KEY_MAIL               155
-#define KEY_BOOKMARKS          156     /* AC Bookmarks */
-#define KEY_COMPUTER           157
-#define KEY_BACK               158     /* AC Back */
-#define KEY_FORWARD            159     /* AC Forward */
-#define KEY_CLOSECD            160
-#define KEY_EJECTCD            161
-#define KEY_EJECTCLOSECD       162
-#define KEY_NEXTSONG           163
-#define KEY_PLAYPAUSE          164
-#define KEY_PREVIOUSSONG       165
-#define KEY_STOPCD             166
-#define KEY_RECORD             167
-#define KEY_REWIND             168
-#define KEY_PHONE              169     /* Media Select Telephone */
-#define KEY_ISO                        170
-#define KEY_CONFIG             171     /* AL Consumer Control Configuration */
-#define KEY_HOMEPAGE           172     /* AC Home */
-#define KEY_REFRESH            173     /* AC Refresh */
-#define KEY_EXIT               174     /* AC Exit */
-#define KEY_MOVE               175
-#define KEY_EDIT               176
-#define KEY_SCROLLUP           177
-#define KEY_SCROLLDOWN         178
-#define KEY_KPLEFTPAREN                179
-#define KEY_KPRIGHTPAREN       180
-#define KEY_NEW                        181     /* AC New */
-#define KEY_REDO               182     /* AC Redo/Repeat */
-
-#define KEY_F13                        183
-#define KEY_F14                        184
-#define KEY_F15                        185
-#define KEY_F16                        186
-#define KEY_F17                        187
-#define KEY_F18                        188
-#define KEY_F19                        189
-#define KEY_F20                        190
-#define KEY_F21                        191
-#define KEY_F22                        192
-#define KEY_F23                        193
-#define KEY_F24                        194
-
-#define KEY_PLAYCD             200
-#define KEY_PAUSECD            201
-#define KEY_PROG3              202
-#define KEY_PROG4              203
-#define KEY_DASHBOARD          204     /* AL Dashboard */
-#define KEY_SUSPEND            205
-#define KEY_CLOSE              206     /* AC Close */
-#define KEY_PLAY               207
-#define KEY_FASTFORWARD                208
-#define KEY_BASSBOOST          209
-#define KEY_PRINT              210     /* AC Print */
-#define KEY_HP                 211
-#define KEY_CAMERA             212
-#define KEY_SOUND              213
-#define KEY_QUESTION           214
-#define KEY_EMAIL              215
-#define KEY_CHAT               216
-#define KEY_SEARCH             217
-#define KEY_CONNECT            218
-#define KEY_FINANCE            219     /* AL Checkbook/Finance */
-#define KEY_SPORT              220
-#define KEY_SHOP               221
-#define KEY_ALTERASE           222
-#define KEY_CANCEL             223     /* AC Cancel */
-#define KEY_BRIGHTNESSDOWN     224
-#define KEY_BRIGHTNESSUP       225
-#define KEY_MEDIA              226
-
-#define KEY_SWITCHVIDEOMODE    227     /* Cycle between available video
-                                          outputs (Monitor/LCD/TV-out/etc) */
-#define KEY_KBDILLUMTOGGLE     228
-#define KEY_KBDILLUMDOWN       229
-#define KEY_KBDILLUMUP         230
-
-#define KEY_SEND               231     /* AC Send */
-#define KEY_REPLY              232     /* AC Reply */
-#define KEY_FORWARDMAIL                233     /* AC Forward Msg */
-#define KEY_SAVE               234     /* AC Save */
-#define KEY_DOCUMENTS          235
-
-#define KEY_BATTERY            236
-
-#define KEY_BLUETOOTH          237
-#define KEY_WLAN               238
-#define KEY_UWB                        239
-
-#define KEY_UNKNOWN            240
-
-#define KEY_VIDEO_NEXT         241     /* drive next video source */
-#define KEY_VIDEO_PREV         242     /* drive previous video source */
-#define KEY_BRIGHTNESS_CYCLE   243     /* brightness up, after max is min */
-#define KEY_BRIGHTNESS_ZERO    244     /* brightness off, use ambient */
-#define KEY_DISPLAY_OFF                245     /* display device to off state */
-
-#define KEY_WIMAX              246
-#define KEY_RFKILL             247     /* Key that controls all radios */
-
-#define KEY_MICMUTE            248     /* Mute / unmute the microphone */
-
-/* Code 255 is reserved for special needs of AT keyboard driver */
-
-#define BTN_MISC               0x100
-#define BTN_0                  0x100
-#define BTN_1                  0x101
-#define BTN_2                  0x102
-#define BTN_3                  0x103
-#define BTN_4                  0x104
-#define BTN_5                  0x105
-#define BTN_6                  0x106
-#define BTN_7                  0x107
-#define BTN_8                  0x108
-#define BTN_9                  0x109
-
-#define BTN_MOUSE              0x110
-#define BTN_LEFT               0x110
-#define BTN_RIGHT              0x111
-#define BTN_MIDDLE             0x112
-#define BTN_SIDE               0x113
-#define BTN_EXTRA              0x114
-#define BTN_FORWARD            0x115
-#define BTN_BACK               0x116
-#define BTN_TASK               0x117
-
-#define BTN_JOYSTICK           0x120
-#define BTN_TRIGGER            0x120
-#define BTN_THUMB              0x121
-#define BTN_THUMB2             0x122
-#define BTN_TOP                        0x123
-#define BTN_TOP2               0x124
-#define BTN_PINKIE             0x125
-#define BTN_BASE               0x126
-#define BTN_BASE2              0x127
-#define BTN_BASE3              0x128
-#define BTN_BASE4              0x129
-#define BTN_BASE5              0x12a
-#define BTN_BASE6              0x12b
-#define BTN_DEAD               0x12f
-
-#define BTN_GAMEPAD            0x130
-#define BTN_SOUTH              0x130
-#define BTN_A                  BTN_SOUTH
-#define BTN_EAST               0x131
-#define BTN_B                  BTN_EAST
-#define BTN_C                  0x132
-#define BTN_NORTH              0x133
-#define BTN_X                  BTN_NORTH
-#define BTN_WEST               0x134
-#define BTN_Y                  BTN_WEST
-#define BTN_Z                  0x135
-#define BTN_TL                 0x136
-#define BTN_TR                 0x137
-#define BTN_TL2                        0x138
-#define BTN_TR2                        0x139
-#define BTN_SELECT             0x13a
-#define BTN_START              0x13b
-#define BTN_MODE               0x13c
-#define BTN_THUMBL             0x13d
-#define BTN_THUMBR             0x13e
-
-#define BTN_DIGI               0x140
-#define BTN_TOOL_PEN           0x140
-#define BTN_TOOL_RUBBER                0x141
-#define BTN_TOOL_BRUSH         0x142
-#define BTN_TOOL_PENCIL                0x143
-#define BTN_TOOL_AIRBRUSH      0x144
-#define BTN_TOOL_FINGER                0x145
-#define BTN_TOOL_MOUSE         0x146
-#define BTN_TOOL_LENS          0x147
-#define BTN_TOOL_QUINTTAP      0x148   /* Five fingers on trackpad */
-#define BTN_TOUCH              0x14a
-#define BTN_STYLUS             0x14b
-#define BTN_STYLUS2            0x14c
-#define BTN_TOOL_DOUBLETAP     0x14d
-#define BTN_TOOL_TRIPLETAP     0x14e
-#define BTN_TOOL_QUADTAP       0x14f   /* Four fingers on trackpad */
-
-#define BTN_WHEEL              0x150
-#define BTN_GEAR_DOWN          0x150
-#define BTN_GEAR_UP            0x151
-
-#define KEY_OK                 0x160
-#define KEY_SELECT             0x161
-#define KEY_GOTO               0x162
-#define KEY_CLEAR              0x163
-#define KEY_POWER2             0x164
-#define KEY_OPTION             0x165
-#define KEY_INFO               0x166   /* AL OEM Features/Tips/Tutorial */
-#define KEY_TIME               0x167
-#define KEY_VENDOR             0x168
-#define KEY_ARCHIVE            0x169
-#define KEY_PROGRAM            0x16a   /* Media Select Program Guide */
-#define KEY_CHANNEL            0x16b
-#define KEY_FAVORITES          0x16c
-#define KEY_EPG                        0x16d
-#define KEY_PVR                        0x16e   /* Media Select Home */
-#define KEY_MHP                        0x16f
-#define KEY_LANGUAGE           0x170
-#define KEY_TITLE              0x171
-#define KEY_SUBTITLE           0x172
-#define KEY_ANGLE              0x173
-#define KEY_ZOOM               0x174
-#define KEY_MODE               0x175
-#define KEY_KEYBOARD           0x176
-#define KEY_SCREEN             0x177
-#define KEY_PC                 0x178   /* Media Select Computer */
-#define KEY_TV                 0x179   /* Media Select TV */
-#define KEY_TV2                        0x17a   /* Media Select Cable */
-#define KEY_VCR                        0x17b   /* Media Select VCR */
-#define KEY_VCR2               0x17c   /* VCR Plus */
-#define KEY_SAT                        0x17d   /* Media Select Satellite */
-#define KEY_SAT2               0x17e
-#define KEY_CD                 0x17f   /* Media Select CD */
-#define KEY_TAPE               0x180   /* Media Select Tape */
-#define KEY_RADIO              0x181
-#define KEY_TUNER              0x182   /* Media Select Tuner */
-#define KEY_PLAYER             0x183
-#define KEY_TEXT               0x184
-#define KEY_DVD                        0x185   /* Media Select DVD */
-#define KEY_AUX                        0x186
-#define KEY_MP3                        0x187
-#define KEY_AUDIO              0x188   /* AL Audio Browser */
-#define KEY_VIDEO              0x189   /* AL Movie Browser */
-#define KEY_DIRECTORY          0x18a
-#define KEY_LIST               0x18b
-#define KEY_MEMO               0x18c   /* Media Select Messages */
-#define KEY_CALENDAR           0x18d
-#define KEY_RED                        0x18e
-#define KEY_GREEN              0x18f
-#define KEY_YELLOW             0x190
-#define KEY_BLUE               0x191
-#define KEY_CHANNELUP          0x192   /* Channel Increment */
-#define KEY_CHANNELDOWN                0x193   /* Channel Decrement */
-#define KEY_FIRST              0x194
-#define KEY_LAST               0x195   /* Recall Last */
-#define KEY_AB                 0x196
-#define KEY_NEXT               0x197
-#define KEY_RESTART            0x198
-#define KEY_SLOW               0x199
-#define KEY_SHUFFLE            0x19a
-#define KEY_BREAK              0x19b
-#define KEY_PREVIOUS           0x19c
-#define KEY_DIGITS             0x19d
-#define KEY_TEEN               0x19e
-#define KEY_TWEN               0x19f
-#define KEY_VIDEOPHONE         0x1a0   /* Media Select Video Phone */
-#define KEY_GAMES              0x1a1   /* Media Select Games */
-#define KEY_ZOOMIN             0x1a2   /* AC Zoom In */
-#define KEY_ZOOMOUT            0x1a3   /* AC Zoom Out */
-#define KEY_ZOOMRESET          0x1a4   /* AC Zoom */
-#define KEY_WORDPROCESSOR      0x1a5   /* AL Word Processor */
-#define KEY_EDITOR             0x1a6   /* AL Text Editor */
-#define KEY_SPREADSHEET                0x1a7   /* AL Spreadsheet */
-#define KEY_GRAPHICSEDITOR     0x1a8   /* AL Graphics Editor */
-#define KEY_PRESENTATION       0x1a9   /* AL Presentation App */
-#define KEY_DATABASE           0x1aa   /* AL Database App */
-#define KEY_NEWS               0x1ab   /* AL Newsreader */
-#define KEY_VOICEMAIL          0x1ac   /* AL Voicemail */
-#define KEY_ADDRESSBOOK                0x1ad   /* AL Contacts/Address Book */
-#define KEY_MESSENGER          0x1ae   /* AL Instant Messaging */
-#define KEY_DISPLAYTOGGLE      0x1af   /* Turn display (LCD) on and off */
-#define KEY_SPELLCHECK         0x1b0   /* AL Spell Check */
-#define KEY_LOGOFF             0x1b1   /* AL Logoff */
-
-#define KEY_DOLLAR             0x1b2
-#define KEY_EURO               0x1b3
-
-#define KEY_FRAMEBACK          0x1b4   /* Consumer - transport controls */
-#define KEY_FRAMEFORWARD       0x1b5
-#define KEY_CONTEXT_MENU       0x1b6   /* GenDesc - system context menu */
-#define KEY_MEDIA_REPEAT       0x1b7   /* Consumer - transport control */
-#define KEY_10CHANNELSUP       0x1b8   /* 10 channels up (10+) */
-#define KEY_10CHANNELSDOWN     0x1b9   /* 10 channels down (10-) */
-#define KEY_IMAGES             0x1ba   /* AL Image Browser */
-
-#define KEY_DEL_EOL            0x1c0
-#define KEY_DEL_EOS            0x1c1
-#define KEY_INS_LINE           0x1c2
-#define KEY_DEL_LINE           0x1c3
-
-#define KEY_FN                 0x1d0
-#define KEY_FN_ESC             0x1d1
-#define KEY_FN_F1              0x1d2
-#define KEY_FN_F2              0x1d3
-#define KEY_FN_F3              0x1d4
-#define KEY_FN_F4              0x1d5
-#define KEY_FN_F5              0x1d6
-#define KEY_FN_F6              0x1d7
-#define KEY_FN_F7              0x1d8
-#define KEY_FN_F8              0x1d9
-#define KEY_FN_F9              0x1da
-#define KEY_FN_F10             0x1db
-#define KEY_FN_F11             0x1dc
-#define KEY_FN_F12             0x1dd
-#define KEY_FN_1               0x1de
-#define KEY_FN_2               0x1df
-#define KEY_FN_D               0x1e0
-#define KEY_FN_E               0x1e1
-#define KEY_FN_F               0x1e2
-#define KEY_FN_S               0x1e3
-#define KEY_FN_B               0x1e4
-
-#define KEY_BRL_DOT1           0x1f1
-#define KEY_BRL_DOT2           0x1f2
-#define KEY_BRL_DOT3           0x1f3
-#define KEY_BRL_DOT4           0x1f4
-#define KEY_BRL_DOT5           0x1f5
-#define KEY_BRL_DOT6           0x1f6
-#define KEY_BRL_DOT7           0x1f7
-#define KEY_BRL_DOT8           0x1f8
-#define KEY_BRL_DOT9           0x1f9
-#define KEY_BRL_DOT10          0x1fa
-
-#define KEY_NUMERIC_0          0x200   /* used by phones, remote controls, */
-#define KEY_NUMERIC_1          0x201   /* and other keypads */
-#define KEY_NUMERIC_2          0x202
-#define KEY_NUMERIC_3          0x203
-#define KEY_NUMERIC_4          0x204
-#define KEY_NUMERIC_5          0x205
-#define KEY_NUMERIC_6          0x206
-#define KEY_NUMERIC_7          0x207
-#define KEY_NUMERIC_8          0x208
-#define KEY_NUMERIC_9          0x209
-#define KEY_NUMERIC_STAR       0x20a
-#define KEY_NUMERIC_POUND      0x20b
-
-#define KEY_CAMERA_FOCUS       0x210
-#define KEY_WPS_BUTTON         0x211   /* WiFi Protected Setup key */
-
-#define KEY_TOUCHPAD_TOGGLE    0x212   /* Request switch touchpad on or off */
-#define KEY_TOUCHPAD_ON                0x213
-#define KEY_TOUCHPAD_OFF       0x214
-
-#define KEY_CAMERA_ZOOMIN      0x215
-#define KEY_CAMERA_ZOOMOUT     0x216
-#define KEY_CAMERA_UP          0x217
-#define KEY_CAMERA_DOWN                0x218
-#define KEY_CAMERA_LEFT                0x219
-#define KEY_CAMERA_RIGHT       0x21a
-
-#define KEY_ATTENDANT_ON       0x21b
-#define KEY_ATTENDANT_OFF      0x21c
-#define KEY_ATTENDANT_TOGGLE   0x21d   /* Attendant call on or off */
-#define KEY_LIGHTS_TOGGLE      0x21e   /* Reading light on or off */
-
-#define BTN_DPAD_UP            0x220
-#define BTN_DPAD_DOWN          0x221
-#define BTN_DPAD_LEFT          0x222
-#define BTN_DPAD_RIGHT         0x223
+#include "linux-event-codes.h"
 
 #define MATRIX_KEY(row, col, code)     \
        ((((row) & 0xFF) << 24) | (((col) & 0xFF) << 16) | ((code) & 0xFFFF))
diff --git a/include/dt-bindings/input/linux-event-codes.h b/include/dt-bindings/input/linux-event-codes.h
new file mode 100644 (file)
index 0000000..87cf351
--- /dev/null
@@ -0,0 +1,805 @@
+/*
+ * Input event codes
+ *
+ *    *** IMPORTANT ***
+ * This file is not only included from C-code but also from devicetree source
+ * files. As such this file MUST only contain comments and defines.
+ *
+ * Copyright (c) 1999-2002 Vojtech Pavlik
+ * Copyright (c) 2015 Hans de Goede <hdegoede@redhat.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.
+ */
+#ifndef _UAPI_INPUT_EVENT_CODES_H
+#define _UAPI_INPUT_EVENT_CODES_H
+
+/*
+ * Device properties and quirks
+ */
+
+#define INPUT_PROP_POINTER             0x00    /* needs a pointer */
+#define INPUT_PROP_DIRECT              0x01    /* direct input devices */
+#define INPUT_PROP_BUTTONPAD           0x02    /* has button(s) under pad */
+#define INPUT_PROP_SEMI_MT             0x03    /* touch rectangle only */
+#define INPUT_PROP_TOPBUTTONPAD                0x04    /* softbuttons at top of pad */
+#define INPUT_PROP_POINTING_STICK      0x05    /* is a pointing stick */
+#define INPUT_PROP_ACCELEROMETER       0x06    /* has accelerometer */
+
+#define INPUT_PROP_MAX                 0x1f
+#define INPUT_PROP_CNT                 (INPUT_PROP_MAX + 1)
+
+/*
+ * Event types
+ */
+
+#define EV_SYN                 0x00
+#define EV_KEY                 0x01
+#define EV_REL                 0x02
+#define EV_ABS                 0x03
+#define EV_MSC                 0x04
+#define EV_SW                  0x05
+#define EV_LED                 0x11
+#define EV_SND                 0x12
+#define EV_REP                 0x14
+#define EV_FF                  0x15
+#define EV_PWR                 0x16
+#define EV_FF_STATUS           0x17
+#define EV_MAX                 0x1f
+#define EV_CNT                 (EV_MAX+1)
+
+/*
+ * Synchronization events.
+ */
+
+#define SYN_REPORT             0
+#define SYN_CONFIG             1
+#define SYN_MT_REPORT          2
+#define SYN_DROPPED            3
+#define SYN_MAX                        0xf
+#define SYN_CNT                        (SYN_MAX+1)
+
+/*
+ * Keys and buttons
+ *
+ * Most of the keys/buttons are modeled after USB HUT 1.12
+ * (see http://www.usb.org/developers/hidpage).
+ * Abbreviations in the comments:
+ * AC - Application Control
+ * AL - Application Launch Button
+ * SC - System Control
+ */
+
+#define KEY_RESERVED           0
+#define KEY_ESC                        1
+#define KEY_1                  2
+#define KEY_2                  3
+#define KEY_3                  4
+#define KEY_4                  5
+#define KEY_5                  6
+#define KEY_6                  7
+#define KEY_7                  8
+#define KEY_8                  9
+#define KEY_9                  10
+#define KEY_0                  11
+#define KEY_MINUS              12
+#define KEY_EQUAL              13
+#define KEY_BACKSPACE          14
+#define KEY_TAB                        15
+#define KEY_Q                  16
+#define KEY_W                  17
+#define KEY_E                  18
+#define KEY_R                  19
+#define KEY_T                  20
+#define KEY_Y                  21
+#define KEY_U                  22
+#define KEY_I                  23
+#define KEY_O                  24
+#define KEY_P                  25
+#define KEY_LEFTBRACE          26
+#define KEY_RIGHTBRACE         27
+#define KEY_ENTER              28
+#define KEY_LEFTCTRL           29
+#define KEY_A                  30
+#define KEY_S                  31
+#define KEY_D                  32
+#define KEY_F                  33
+#define KEY_G                  34
+#define KEY_H                  35
+#define KEY_J                  36
+#define KEY_K                  37
+#define KEY_L                  38
+#define KEY_SEMICOLON          39
+#define KEY_APOSTROPHE         40
+#define KEY_GRAVE              41
+#define KEY_LEFTSHIFT          42
+#define KEY_BACKSLASH          43
+#define KEY_Z                  44
+#define KEY_X                  45
+#define KEY_C                  46
+#define KEY_V                  47
+#define KEY_B                  48
+#define KEY_N                  49
+#define KEY_M                  50
+#define KEY_COMMA              51
+#define KEY_DOT                        52
+#define KEY_SLASH              53
+#define KEY_RIGHTSHIFT         54
+#define KEY_KPASTERISK         55
+#define KEY_LEFTALT            56
+#define KEY_SPACE              57
+#define KEY_CAPSLOCK           58
+#define KEY_F1                 59
+#define KEY_F2                 60
+#define KEY_F3                 61
+#define KEY_F4                 62
+#define KEY_F5                 63
+#define KEY_F6                 64
+#define KEY_F7                 65
+#define KEY_F8                 66
+#define KEY_F9                 67
+#define KEY_F10                        68
+#define KEY_NUMLOCK            69
+#define KEY_SCROLLLOCK         70
+#define KEY_KP7                        71
+#define KEY_KP8                        72
+#define KEY_KP9                        73
+#define KEY_KPMINUS            74
+#define KEY_KP4                        75
+#define KEY_KP5                        76
+#define KEY_KP6                        77
+#define KEY_KPPLUS             78
+#define KEY_KP1                        79
+#define KEY_KP2                        80
+#define KEY_KP3                        81
+#define KEY_KP0                        82
+#define KEY_KPDOT              83
+
+#define KEY_ZENKAKUHANKAKU     85
+#define KEY_102ND              86
+#define KEY_F11                        87
+#define KEY_F12                        88
+#define KEY_RO                 89
+#define KEY_KATAKANA           90
+#define KEY_HIRAGANA           91
+#define KEY_HENKAN             92
+#define KEY_KATAKANAHIRAGANA   93
+#define KEY_MUHENKAN           94
+#define KEY_KPJPCOMMA          95
+#define KEY_KPENTER            96
+#define KEY_RIGHTCTRL          97
+#define KEY_KPSLASH            98
+#define KEY_SYSRQ              99
+#define KEY_RIGHTALT           100
+#define KEY_LINEFEED           101
+#define KEY_HOME               102
+#define KEY_UP                 103
+#define KEY_PAGEUP             104
+#define KEY_LEFT               105
+#define KEY_RIGHT              106
+#define KEY_END                        107
+#define KEY_DOWN               108
+#define KEY_PAGEDOWN           109
+#define KEY_INSERT             110
+#define KEY_DELETE             111
+#define KEY_MACRO              112
+#define KEY_MUTE               113
+#define KEY_VOLUMEDOWN         114
+#define KEY_VOLUMEUP           115
+#define KEY_POWER              116     /* SC System Power Down */
+#define KEY_KPEQUAL            117
+#define KEY_KPPLUSMINUS                118
+#define KEY_PAUSE              119
+#define KEY_SCALE              120     /* AL Compiz Scale (Expose) */
+
+#define KEY_KPCOMMA            121
+#define KEY_HANGEUL            122
+#define KEY_HANGUEL            KEY_HANGEUL
+#define KEY_HANJA              123
+#define KEY_YEN                        124
+#define KEY_LEFTMETA           125
+#define KEY_RIGHTMETA          126
+#define KEY_COMPOSE            127
+
+#define KEY_STOP               128     /* AC Stop */
+#define KEY_AGAIN              129
+#define KEY_PROPS              130     /* AC Properties */
+#define KEY_UNDO               131     /* AC Undo */
+#define KEY_FRONT              132
+#define KEY_COPY               133     /* AC Copy */
+#define KEY_OPEN               134     /* AC Open */
+#define KEY_PASTE              135     /* AC Paste */
+#define KEY_FIND               136     /* AC Search */
+#define KEY_CUT                        137     /* AC Cut */
+#define KEY_HELP               138     /* AL Integrated Help Center */
+#define KEY_MENU               139     /* Menu (show menu) */
+#define KEY_CALC               140     /* AL Calculator */
+#define KEY_SETUP              141
+#define KEY_SLEEP              142     /* SC System Sleep */
+#define KEY_WAKEUP             143     /* System Wake Up */
+#define KEY_FILE               144     /* AL Local Machine Browser */
+#define KEY_SENDFILE           145
+#define KEY_DELETEFILE         146
+#define KEY_XFER               147
+#define KEY_PROG1              148
+#define KEY_PROG2              149
+#define KEY_WWW                        150     /* AL Internet Browser */
+#define KEY_MSDOS              151
+#define KEY_COFFEE             152     /* AL Terminal Lock/Screensaver */
+#define KEY_SCREENLOCK         KEY_COFFEE
+#define KEY_ROTATE_DISPLAY     153     /* Display orientation for e.g. tablets */
+#define KEY_DIRECTION          KEY_ROTATE_DISPLAY
+#define KEY_CYCLEWINDOWS       154
+#define KEY_MAIL               155
+#define KEY_BOOKMARKS          156     /* AC Bookmarks */
+#define KEY_COMPUTER           157
+#define KEY_BACK               158     /* AC Back */
+#define KEY_FORWARD            159     /* AC Forward */
+#define KEY_CLOSECD            160
+#define KEY_EJECTCD            161
+#define KEY_EJECTCLOSECD       162
+#define KEY_NEXTSONG           163
+#define KEY_PLAYPAUSE          164
+#define KEY_PREVIOUSSONG       165
+#define KEY_STOPCD             166
+#define KEY_RECORD             167
+#define KEY_REWIND             168
+#define KEY_PHONE              169     /* Media Select Telephone */
+#define KEY_ISO                        170
+#define KEY_CONFIG             171     /* AL Consumer Control Configuration */
+#define KEY_HOMEPAGE           172     /* AC Home */
+#define KEY_REFRESH            173     /* AC Refresh */
+#define KEY_EXIT               174     /* AC Exit */
+#define KEY_MOVE               175
+#define KEY_EDIT               176
+#define KEY_SCROLLUP           177
+#define KEY_SCROLLDOWN         178
+#define KEY_KPLEFTPAREN                179
+#define KEY_KPRIGHTPAREN       180
+#define KEY_NEW                        181     /* AC New */
+#define KEY_REDO               182     /* AC Redo/Repeat */
+
+#define KEY_F13                        183
+#define KEY_F14                        184
+#define KEY_F15                        185
+#define KEY_F16                        186
+#define KEY_F17                        187
+#define KEY_F18                        188
+#define KEY_F19                        189
+#define KEY_F20                        190
+#define KEY_F21                        191
+#define KEY_F22                        192
+#define KEY_F23                        193
+#define KEY_F24                        194
+
+#define KEY_PLAYCD             200
+#define KEY_PAUSECD            201
+#define KEY_PROG3              202
+#define KEY_PROG4              203
+#define KEY_DASHBOARD          204     /* AL Dashboard */
+#define KEY_SUSPEND            205
+#define KEY_CLOSE              206     /* AC Close */
+#define KEY_PLAY               207
+#define KEY_FASTFORWARD                208
+#define KEY_BASSBOOST          209
+#define KEY_PRINT              210     /* AC Print */
+#define KEY_HP                 211
+#define KEY_CAMERA             212
+#define KEY_SOUND              213
+#define KEY_QUESTION           214
+#define KEY_EMAIL              215
+#define KEY_CHAT               216
+#define KEY_SEARCH             217
+#define KEY_CONNECT            218
+#define KEY_FINANCE            219     /* AL Checkbook/Finance */
+#define KEY_SPORT              220
+#define KEY_SHOP               221
+#define KEY_ALTERASE           222
+#define KEY_CANCEL             223     /* AC Cancel */
+#define KEY_BRIGHTNESSDOWN     224
+#define KEY_BRIGHTNESSUP       225
+#define KEY_MEDIA              226
+
+#define KEY_SWITCHVIDEOMODE    227     /* Cycle between available video
+                                          outputs (Monitor/LCD/TV-out/etc) */
+#define KEY_KBDILLUMTOGGLE     228
+#define KEY_KBDILLUMDOWN       229
+#define KEY_KBDILLUMUP         230
+
+#define KEY_SEND               231     /* AC Send */
+#define KEY_REPLY              232     /* AC Reply */
+#define KEY_FORWARDMAIL                233     /* AC Forward Msg */
+#define KEY_SAVE               234     /* AC Save */
+#define KEY_DOCUMENTS          235
+
+#define KEY_BATTERY            236
+
+#define KEY_BLUETOOTH          237
+#define KEY_WLAN               238
+#define KEY_UWB                        239
+
+#define KEY_UNKNOWN            240
+
+#define KEY_VIDEO_NEXT         241     /* drive next video source */
+#define KEY_VIDEO_PREV         242     /* drive previous video source */
+#define KEY_BRIGHTNESS_CYCLE   243     /* brightness up, after max is min */
+#define KEY_BRIGHTNESS_AUTO    244     /* Set Auto Brightness: manual
+                                         brightness control is off,
+                                         rely on ambient */
+#define KEY_BRIGHTNESS_ZERO    KEY_BRIGHTNESS_AUTO
+#define KEY_DISPLAY_OFF                245     /* display device to off state */
+
+#define KEY_WWAN               246     /* Wireless WAN (LTE, UMTS, GSM, etc.) */
+#define KEY_WIMAX              KEY_WWAN
+#define KEY_RFKILL             247     /* Key that controls all radios */
+
+#define KEY_MICMUTE            248     /* Mute / unmute the microphone */
+
+/* Code 255 is reserved for special needs of AT keyboard driver */
+
+#define BTN_MISC               0x100
+#define BTN_0                  0x100
+#define BTN_1                  0x101
+#define BTN_2                  0x102
+#define BTN_3                  0x103
+#define BTN_4                  0x104
+#define BTN_5                  0x105
+#define BTN_6                  0x106
+#define BTN_7                  0x107
+#define BTN_8                  0x108
+#define BTN_9                  0x109
+
+#define BTN_MOUSE              0x110
+#define BTN_LEFT               0x110
+#define BTN_RIGHT              0x111
+#define BTN_MIDDLE             0x112
+#define BTN_SIDE               0x113
+#define BTN_EXTRA              0x114
+#define BTN_FORWARD            0x115
+#define BTN_BACK               0x116
+#define BTN_TASK               0x117
+
+#define BTN_JOYSTICK           0x120
+#define BTN_TRIGGER            0x120
+#define BTN_THUMB              0x121
+#define BTN_THUMB2             0x122
+#define BTN_TOP                        0x123
+#define BTN_TOP2               0x124
+#define BTN_PINKIE             0x125
+#define BTN_BASE               0x126
+#define BTN_BASE2              0x127
+#define BTN_BASE3              0x128
+#define BTN_BASE4              0x129
+#define BTN_BASE5              0x12a
+#define BTN_BASE6              0x12b
+#define BTN_DEAD               0x12f
+
+#define BTN_GAMEPAD            0x130
+#define BTN_SOUTH              0x130
+#define BTN_A                  BTN_SOUTH
+#define BTN_EAST               0x131
+#define BTN_B                  BTN_EAST
+#define BTN_C                  0x132
+#define BTN_NORTH              0x133
+#define BTN_X                  BTN_NORTH
+#define BTN_WEST               0x134
+#define BTN_Y                  BTN_WEST
+#define BTN_Z                  0x135
+#define BTN_TL                 0x136
+#define BTN_TR                 0x137
+#define BTN_TL2                        0x138
+#define BTN_TR2                        0x139
+#define BTN_SELECT             0x13a
+#define BTN_START              0x13b
+#define BTN_MODE               0x13c
+#define BTN_THUMBL             0x13d
+#define BTN_THUMBR             0x13e
+
+#define BTN_DIGI               0x140
+#define BTN_TOOL_PEN           0x140
+#define BTN_TOOL_RUBBER                0x141
+#define BTN_TOOL_BRUSH         0x142
+#define BTN_TOOL_PENCIL                0x143
+#define BTN_TOOL_AIRBRUSH      0x144
+#define BTN_TOOL_FINGER                0x145
+#define BTN_TOOL_MOUSE         0x146
+#define BTN_TOOL_LENS          0x147
+#define BTN_TOOL_QUINTTAP      0x148   /* Five fingers on trackpad */
+#define BTN_TOUCH              0x14a
+#define BTN_STYLUS             0x14b
+#define BTN_STYLUS2            0x14c
+#define BTN_TOOL_DOUBLETAP     0x14d
+#define BTN_TOOL_TRIPLETAP     0x14e
+#define BTN_TOOL_QUADTAP       0x14f   /* Four fingers on trackpad */
+
+#define BTN_WHEEL              0x150
+#define BTN_GEAR_DOWN          0x150
+#define BTN_GEAR_UP            0x151
+
+#define KEY_OK                 0x160
+#define KEY_SELECT             0x161
+#define KEY_GOTO               0x162
+#define KEY_CLEAR              0x163
+#define KEY_POWER2             0x164
+#define KEY_OPTION             0x165
+#define KEY_INFO               0x166   /* AL OEM Features/Tips/Tutorial */
+#define KEY_TIME               0x167
+#define KEY_VENDOR             0x168
+#define KEY_ARCHIVE            0x169
+#define KEY_PROGRAM            0x16a   /* Media Select Program Guide */
+#define KEY_CHANNEL            0x16b
+#define KEY_FAVORITES          0x16c
+#define KEY_EPG                        0x16d
+#define KEY_PVR                        0x16e   /* Media Select Home */
+#define KEY_MHP                        0x16f
+#define KEY_LANGUAGE           0x170
+#define KEY_TITLE              0x171
+#define KEY_SUBTITLE           0x172
+#define KEY_ANGLE              0x173
+#define KEY_ZOOM               0x174
+#define KEY_MODE               0x175
+#define KEY_KEYBOARD           0x176
+#define KEY_SCREEN             0x177
+#define KEY_PC                 0x178   /* Media Select Computer */
+#define KEY_TV                 0x179   /* Media Select TV */
+#define KEY_TV2                        0x17a   /* Media Select Cable */
+#define KEY_VCR                        0x17b   /* Media Select VCR */
+#define KEY_VCR2               0x17c   /* VCR Plus */
+#define KEY_SAT                        0x17d   /* Media Select Satellite */
+#define KEY_SAT2               0x17e
+#define KEY_CD                 0x17f   /* Media Select CD */
+#define KEY_TAPE               0x180   /* Media Select Tape */
+#define KEY_RADIO              0x181
+#define KEY_TUNER              0x182   /* Media Select Tuner */
+#define KEY_PLAYER             0x183
+#define KEY_TEXT               0x184
+#define KEY_DVD                        0x185   /* Media Select DVD */
+#define KEY_AUX                        0x186
+#define KEY_MP3                        0x187
+#define KEY_AUDIO              0x188   /* AL Audio Browser */
+#define KEY_VIDEO              0x189   /* AL Movie Browser */
+#define KEY_DIRECTORY          0x18a
+#define KEY_LIST               0x18b
+#define KEY_MEMO               0x18c   /* Media Select Messages */
+#define KEY_CALENDAR           0x18d
+#define KEY_RED                        0x18e
+#define KEY_GREEN              0x18f
+#define KEY_YELLOW             0x190
+#define KEY_BLUE               0x191
+#define KEY_CHANNELUP          0x192   /* Channel Increment */
+#define KEY_CHANNELDOWN                0x193   /* Channel Decrement */
+#define KEY_FIRST              0x194
+#define KEY_LAST               0x195   /* Recall Last */
+#define KEY_AB                 0x196
+#define KEY_NEXT               0x197
+#define KEY_RESTART            0x198
+#define KEY_SLOW               0x199
+#define KEY_SHUFFLE            0x19a
+#define KEY_BREAK              0x19b
+#define KEY_PREVIOUS           0x19c
+#define KEY_DIGITS             0x19d
+#define KEY_TEEN               0x19e
+#define KEY_TWEN               0x19f
+#define KEY_VIDEOPHONE         0x1a0   /* Media Select Video Phone */
+#define KEY_GAMES              0x1a1   /* Media Select Games */
+#define KEY_ZOOMIN             0x1a2   /* AC Zoom In */
+#define KEY_ZOOMOUT            0x1a3   /* AC Zoom Out */
+#define KEY_ZOOMRESET          0x1a4   /* AC Zoom */
+#define KEY_WORDPROCESSOR      0x1a5   /* AL Word Processor */
+#define KEY_EDITOR             0x1a6   /* AL Text Editor */
+#define KEY_SPREADSHEET                0x1a7   /* AL Spreadsheet */
+#define KEY_GRAPHICSEDITOR     0x1a8   /* AL Graphics Editor */
+#define KEY_PRESENTATION       0x1a9   /* AL Presentation App */
+#define KEY_DATABASE           0x1aa   /* AL Database App */
+#define KEY_NEWS               0x1ab   /* AL Newsreader */
+#define KEY_VOICEMAIL          0x1ac   /* AL Voicemail */
+#define KEY_ADDRESSBOOK                0x1ad   /* AL Contacts/Address Book */
+#define KEY_MESSENGER          0x1ae   /* AL Instant Messaging */
+#define KEY_DISPLAYTOGGLE      0x1af   /* Turn display (LCD) on and off */
+#define KEY_BRIGHTNESS_TOGGLE  KEY_DISPLAYTOGGLE
+#define KEY_SPELLCHECK         0x1b0   /* AL Spell Check */
+#define KEY_LOGOFF             0x1b1   /* AL Logoff */
+
+#define KEY_DOLLAR             0x1b2
+#define KEY_EURO               0x1b3
+
+#define KEY_FRAMEBACK          0x1b4   /* Consumer - transport controls */
+#define KEY_FRAMEFORWARD       0x1b5
+#define KEY_CONTEXT_MENU       0x1b6   /* GenDesc - system context menu */
+#define KEY_MEDIA_REPEAT       0x1b7   /* Consumer - transport control */
+#define KEY_10CHANNELSUP       0x1b8   /* 10 channels up (10+) */
+#define KEY_10CHANNELSDOWN     0x1b9   /* 10 channels down (10-) */
+#define KEY_IMAGES             0x1ba   /* AL Image Browser */
+
+#define KEY_DEL_EOL            0x1c0
+#define KEY_DEL_EOS            0x1c1
+#define KEY_INS_LINE           0x1c2
+#define KEY_DEL_LINE           0x1c3
+
+#define KEY_FN                 0x1d0
+#define KEY_FN_ESC             0x1d1
+#define KEY_FN_F1              0x1d2
+#define KEY_FN_F2              0x1d3
+#define KEY_FN_F3              0x1d4
+#define KEY_FN_F4              0x1d5
+#define KEY_FN_F5              0x1d6
+#define KEY_FN_F6              0x1d7
+#define KEY_FN_F7              0x1d8
+#define KEY_FN_F8              0x1d9
+#define KEY_FN_F9              0x1da
+#define KEY_FN_F10             0x1db
+#define KEY_FN_F11             0x1dc
+#define KEY_FN_F12             0x1dd
+#define KEY_FN_1               0x1de
+#define KEY_FN_2               0x1df
+#define KEY_FN_D               0x1e0
+#define KEY_FN_E               0x1e1
+#define KEY_FN_F               0x1e2
+#define KEY_FN_S               0x1e3
+#define KEY_FN_B               0x1e4
+
+#define KEY_BRL_DOT1           0x1f1
+#define KEY_BRL_DOT2           0x1f2
+#define KEY_BRL_DOT3           0x1f3
+#define KEY_BRL_DOT4           0x1f4
+#define KEY_BRL_DOT5           0x1f5
+#define KEY_BRL_DOT6           0x1f6
+#define KEY_BRL_DOT7           0x1f7
+#define KEY_BRL_DOT8           0x1f8
+#define KEY_BRL_DOT9           0x1f9
+#define KEY_BRL_DOT10          0x1fa
+
+#define KEY_NUMERIC_0          0x200   /* used by phones, remote controls, */
+#define KEY_NUMERIC_1          0x201   /* and other keypads */
+#define KEY_NUMERIC_2          0x202
+#define KEY_NUMERIC_3          0x203
+#define KEY_NUMERIC_4          0x204
+#define KEY_NUMERIC_5          0x205
+#define KEY_NUMERIC_6          0x206
+#define KEY_NUMERIC_7          0x207
+#define KEY_NUMERIC_8          0x208
+#define KEY_NUMERIC_9          0x209
+#define KEY_NUMERIC_STAR       0x20a
+#define KEY_NUMERIC_POUND      0x20b
+#define KEY_NUMERIC_A          0x20c   /* Phone key A - HUT Telephony 0xb9 */
+#define KEY_NUMERIC_B          0x20d
+#define KEY_NUMERIC_C          0x20e
+#define KEY_NUMERIC_D          0x20f
+
+#define KEY_CAMERA_FOCUS       0x210
+#define KEY_WPS_BUTTON         0x211   /* WiFi Protected Setup key */
+
+#define KEY_TOUCHPAD_TOGGLE    0x212   /* Request switch touchpad on or off */
+#define KEY_TOUCHPAD_ON                0x213
+#define KEY_TOUCHPAD_OFF       0x214
+
+#define KEY_CAMERA_ZOOMIN      0x215
+#define KEY_CAMERA_ZOOMOUT     0x216
+#define KEY_CAMERA_UP          0x217
+#define KEY_CAMERA_DOWN                0x218
+#define KEY_CAMERA_LEFT                0x219
+#define KEY_CAMERA_RIGHT       0x21a
+
+#define KEY_ATTENDANT_ON       0x21b
+#define KEY_ATTENDANT_OFF      0x21c
+#define KEY_ATTENDANT_TOGGLE   0x21d   /* Attendant call on or off */
+#define KEY_LIGHTS_TOGGLE      0x21e   /* Reading light on or off */
+
+#define BTN_DPAD_UP            0x220
+#define BTN_DPAD_DOWN          0x221
+#define BTN_DPAD_LEFT          0x222
+#define BTN_DPAD_RIGHT         0x223
+
+#define KEY_ALS_TOGGLE         0x230   /* Ambient light sensor */
+
+#define KEY_BUTTONCONFIG               0x240   /* AL Button Configuration */
+#define KEY_TASKMANAGER                0x241   /* AL Task/Project Manager */
+#define KEY_JOURNAL            0x242   /* AL Log/Journal/Timecard */
+#define KEY_CONTROLPANEL               0x243   /* AL Control Panel */
+#define KEY_APPSELECT          0x244   /* AL Select Task/Application */
+#define KEY_SCREENSAVER                0x245   /* AL Screen Saver */
+#define KEY_VOICECOMMAND               0x246   /* Listening Voice Command */
+
+#define KEY_BRIGHTNESS_MIN             0x250   /* Set Brightness to Minimum */
+#define KEY_BRIGHTNESS_MAX             0x251   /* Set Brightness to Maximum */
+
+#define KEY_KBDINPUTASSIST_PREV                0x260
+#define KEY_KBDINPUTASSIST_NEXT                0x261
+#define KEY_KBDINPUTASSIST_PREVGROUP           0x262
+#define KEY_KBDINPUTASSIST_NEXTGROUP           0x263
+#define KEY_KBDINPUTASSIST_ACCEPT              0x264
+#define KEY_KBDINPUTASSIST_CANCEL              0x265
+
+#define BTN_TRIGGER_HAPPY              0x2c0
+#define BTN_TRIGGER_HAPPY1             0x2c0
+#define BTN_TRIGGER_HAPPY2             0x2c1
+#define BTN_TRIGGER_HAPPY3             0x2c2
+#define BTN_TRIGGER_HAPPY4             0x2c3
+#define BTN_TRIGGER_HAPPY5             0x2c4
+#define BTN_TRIGGER_HAPPY6             0x2c5
+#define BTN_TRIGGER_HAPPY7             0x2c6
+#define BTN_TRIGGER_HAPPY8             0x2c7
+#define BTN_TRIGGER_HAPPY9             0x2c8
+#define BTN_TRIGGER_HAPPY10            0x2c9
+#define BTN_TRIGGER_HAPPY11            0x2ca
+#define BTN_TRIGGER_HAPPY12            0x2cb
+#define BTN_TRIGGER_HAPPY13            0x2cc
+#define BTN_TRIGGER_HAPPY14            0x2cd
+#define BTN_TRIGGER_HAPPY15            0x2ce
+#define BTN_TRIGGER_HAPPY16            0x2cf
+#define BTN_TRIGGER_HAPPY17            0x2d0
+#define BTN_TRIGGER_HAPPY18            0x2d1
+#define BTN_TRIGGER_HAPPY19            0x2d2
+#define BTN_TRIGGER_HAPPY20            0x2d3
+#define BTN_TRIGGER_HAPPY21            0x2d4
+#define BTN_TRIGGER_HAPPY22            0x2d5
+#define BTN_TRIGGER_HAPPY23            0x2d6
+#define BTN_TRIGGER_HAPPY24            0x2d7
+#define BTN_TRIGGER_HAPPY25            0x2d8
+#define BTN_TRIGGER_HAPPY26            0x2d9
+#define BTN_TRIGGER_HAPPY27            0x2da
+#define BTN_TRIGGER_HAPPY28            0x2db
+#define BTN_TRIGGER_HAPPY29            0x2dc
+#define BTN_TRIGGER_HAPPY30            0x2dd
+#define BTN_TRIGGER_HAPPY31            0x2de
+#define BTN_TRIGGER_HAPPY32            0x2df
+#define BTN_TRIGGER_HAPPY33            0x2e0
+#define BTN_TRIGGER_HAPPY34            0x2e1
+#define BTN_TRIGGER_HAPPY35            0x2e2
+#define BTN_TRIGGER_HAPPY36            0x2e3
+#define BTN_TRIGGER_HAPPY37            0x2e4
+#define BTN_TRIGGER_HAPPY38            0x2e5
+#define BTN_TRIGGER_HAPPY39            0x2e6
+#define BTN_TRIGGER_HAPPY40            0x2e7
+
+/* We avoid low common keys in module aliases so they don't get huge. */
+#define KEY_MIN_INTERESTING    KEY_MUTE
+#define KEY_MAX                        0x2ff
+#define KEY_CNT                        (KEY_MAX+1)
+
+/*
+ * Relative axes
+ */
+
+#define REL_X                  0x00
+#define REL_Y                  0x01
+#define REL_Z                  0x02
+#define REL_RX                 0x03
+#define REL_RY                 0x04
+#define REL_RZ                 0x05
+#define REL_HWHEEL             0x06
+#define REL_DIAL               0x07
+#define REL_WHEEL              0x08
+#define REL_MISC               0x09
+#define REL_MAX                        0x0f
+#define REL_CNT                        (REL_MAX+1)
+
+/*
+ * Absolute axes
+ */
+
+#define ABS_X                  0x00
+#define ABS_Y                  0x01
+#define ABS_Z                  0x02
+#define ABS_RX                 0x03
+#define ABS_RY                 0x04
+#define ABS_RZ                 0x05
+#define ABS_THROTTLE           0x06
+#define ABS_RUDDER             0x07
+#define ABS_WHEEL              0x08
+#define ABS_GAS                        0x09
+#define ABS_BRAKE              0x0a
+#define ABS_HAT0X              0x10
+#define ABS_HAT0Y              0x11
+#define ABS_HAT1X              0x12
+#define ABS_HAT1Y              0x13
+#define ABS_HAT2X              0x14
+#define ABS_HAT2Y              0x15
+#define ABS_HAT3X              0x16
+#define ABS_HAT3Y              0x17
+#define ABS_PRESSURE           0x18
+#define ABS_DISTANCE           0x19
+#define ABS_TILT_X             0x1a
+#define ABS_TILT_Y             0x1b
+#define ABS_TOOL_WIDTH         0x1c
+
+#define ABS_VOLUME             0x20
+
+#define ABS_MISC               0x28
+
+#define ABS_MT_SLOT            0x2f    /* MT slot being modified */
+#define ABS_MT_TOUCH_MAJOR     0x30    /* Major axis of touching ellipse */
+#define ABS_MT_TOUCH_MINOR     0x31    /* Minor axis (omit if circular) */
+#define ABS_MT_WIDTH_MAJOR     0x32    /* Major axis of approaching ellipse */
+#define ABS_MT_WIDTH_MINOR     0x33    /* Minor axis (omit if circular) */
+#define ABS_MT_ORIENTATION     0x34    /* Ellipse orientation */
+#define ABS_MT_POSITION_X      0x35    /* Center X touch position */
+#define ABS_MT_POSITION_Y      0x36    /* Center Y touch position */
+#define ABS_MT_TOOL_TYPE       0x37    /* Type of touching device */
+#define ABS_MT_BLOB_ID         0x38    /* Group a set of packets as a blob */
+#define ABS_MT_TRACKING_ID     0x39    /* Unique ID of initiated contact */
+#define ABS_MT_PRESSURE                0x3a    /* Pressure on contact area */
+#define ABS_MT_DISTANCE                0x3b    /* Contact hover distance */
+#define ABS_MT_TOOL_X          0x3c    /* Center X tool position */
+#define ABS_MT_TOOL_Y          0x3d    /* Center Y tool position */
+
+
+#define ABS_MAX                        0x3f
+#define ABS_CNT                        (ABS_MAX+1)
+
+/*
+ * Switch events
+ */
+
+#define SW_LID                 0x00  /* set = lid shut */
+#define SW_TABLET_MODE         0x01  /* set = tablet mode */
+#define SW_HEADPHONE_INSERT    0x02  /* set = inserted */
+#define SW_RFKILL_ALL          0x03  /* rfkill master switch, type "any"
+                                        set = radio enabled */
+#define SW_RADIO               SW_RFKILL_ALL   /* deprecated */
+#define SW_MICROPHONE_INSERT   0x04  /* set = inserted */
+#define SW_DOCK                        0x05  /* set = plugged into dock */
+#define SW_LINEOUT_INSERT      0x06  /* set = inserted */
+#define SW_JACK_PHYSICAL_INSERT 0x07  /* set = mechanical switch set */
+#define SW_VIDEOOUT_INSERT     0x08  /* set = inserted */
+#define SW_CAMERA_LENS_COVER   0x09  /* set = lens covered */
+#define SW_KEYPAD_SLIDE                0x0a  /* set = keypad slide out */
+#define SW_FRONT_PROXIMITY     0x0b  /* set = front proximity sensor active */
+#define SW_ROTATE_LOCK         0x0c  /* set = rotate locked/disabled */
+#define SW_LINEIN_INSERT       0x0d  /* set = inserted */
+#define SW_MUTE_DEVICE         0x0e  /* set = device disabled */
+#define SW_MAX                 0x0f
+#define SW_CNT                 (SW_MAX+1)
+
+/*
+ * Misc events
+ */
+
+#define MSC_SERIAL             0x00
+#define MSC_PULSELED           0x01
+#define MSC_GESTURE            0x02
+#define MSC_RAW                        0x03
+#define MSC_SCAN               0x04
+#define MSC_TIMESTAMP          0x05
+#define MSC_MAX                        0x07
+#define MSC_CNT                        (MSC_MAX+1)
+
+/*
+ * LEDs
+ */
+
+#define LED_NUML               0x00
+#define LED_CAPSL              0x01
+#define LED_SCROLLL            0x02
+#define LED_COMPOSE            0x03
+#define LED_KANA               0x04
+#define LED_SLEEP              0x05
+#define LED_SUSPEND            0x06
+#define LED_MUTE               0x07
+#define LED_MISC               0x08
+#define LED_MAIL               0x09
+#define LED_CHARGING           0x0a
+#define LED_MAX                        0x0f
+#define LED_CNT                        (LED_MAX+1)
+
+/*
+ * Autorepeat values
+ */
+
+#define REP_DELAY              0x00
+#define REP_PERIOD             0x01
+#define REP_MAX                        0x01
+#define REP_CNT                        (REP_MAX+1)
+
+/*
+ * Sounds
+ */
+
+#define SND_CLICK              0x00
+#define SND_BELL               0x01
+#define SND_TONE               0x02
+#define SND_MAX                        0x07
+#define SND_CNT                        (SND_MAX+1)
+
+#endif
index 03f6687aaee3e6bc4f6a3dbcc54e1a034d8ecd75..696044850b85d760acc163c87199a3abaeea3c84 100644 (file)
@@ -365,4 +365,51 @@ struct efi_console_control_protocol
                        uint16_t *password);
 };
 
+#define EFI_GOP_GUID \
+       EFI_GUID(0x9042a9de, 0x23dc, 0x4a38, \
+                0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a)
+
+#define EFI_GOT_RGBA8          0
+#define EFI_GOT_BGRA8          1
+#define EFI_GOT_BITMASK                2
+
+struct efi_gop_mode_info
+{
+       u32 version;
+       u32 width;
+       u32 height;
+       u32 pixel_format;
+       u32 pixel_bitmask[4];
+       u32 pixels_per_scanline;
+};
+
+struct efi_gop_mode
+{
+       u32 max_mode;
+       u32 mode;
+       struct efi_gop_mode_info *info;
+       unsigned long info_size;
+       efi_physical_addr_t fb_base;
+       unsigned long fb_size;
+};
+
+#define EFI_BLT_VIDEO_FILL             0
+#define EFI_BLT_VIDEO_TO_BLT_BUFFER    1
+#define EFI_BLT_BUFFER_TO_VIDEO                2
+#define EFI_BLT_VIDEO_TO_VIDEO         3
+
+struct efi_gop
+{
+       efi_status_t (EFIAPI *query_mode)(struct efi_gop *this, u32 mode_number,
+                                         unsigned long *size_of_info,
+                                         struct efi_gop_mode_info **info);
+       efi_status_t (EFIAPI *set_mode)(struct efi_gop *this, u32 mode_number);
+       efi_status_t (EFIAPI *blt)(struct efi_gop *this, void *buffer,
+                                  unsigned long operation, unsigned long sx,
+                                  unsigned long sy, unsigned long dx,
+                                  unsigned long dy, unsigned long width,
+                                  unsigned long height, unsigned long delta);
+       struct efi_gop_mode *mode;
+};
+
 #endif
index 74bed26662d07ba9a96cf68b4a0044c4a6c60879..9f61fc4b122b830cd161cbc0a097ee7135a5c1c5 100644 (file)
@@ -89,6 +89,8 @@ extern struct list_head efi_obj_list;
 
 /* Called by bootefi to make all disk storage accessible as EFI objects */
 int efi_disk_register(void);
+/* Called by bootefi to make GOP (graphical) interface available */
+int efi_gop_register(void);
 /*
  * Stub implementation for a protocol opener that just returns the handle as
  * interface
index f53ace7889c04436117b60d052ff56a84519e4ee..c6321a02ef8e5d4f89f5288f1910bad888e37d60 100644 (file)
@@ -465,7 +465,7 @@ extern flash_info_t *flash_get_info(ulong base);
 #define FLASH_S29GL064M 0x00F0         /* Spansion S29GL064M-R6                */
 #define FLASH_S29GL128N 0x00F1         /* Spansion S29GL128N                   */
 
-#define FLASH_STM32F4  0x00F2          /* STM32F4 Embedded Flash */
+#define FLASH_STM32    0x00F2          /* STM32 Embedded Flash */
 #define FLASH_STM32F1  0x00F3          /* STM32F1 Embedded Flash */
 
 #define FLASH_UNKNOWN  0xFFFF          /* unknown flash type                   */
index a739f45bbbcea264bbf7ca070a45929c6fd41caf..03ae232f5c47f58a60be063e09348d95a6915297 100644 (file)
@@ -237,6 +237,23 @@ void eth_parse_enetaddr(const char *addr, uchar *enetaddr);
 int eth_getenv_enetaddr(const char *name, uchar *enetaddr);
 int eth_setenv_enetaddr(const char *name, const uchar *enetaddr);
 
+/**
+ * eth_setenv_enetaddr_by_index() - set the MAC address envrionment variable
+ *
+ * This sets up an environment variable with the given MAC address (@enetaddr).
+ * The environment variable to be set is defined by <@base_name><@index>addr.
+ * If @index is 0 it is omitted. For common Ethernet this means ethaddr,
+ * eth1addr, etc.
+ *
+ * @base_name:  Base name for variable, typically "eth"
+ * @index:      Index of interface being updated (>=0)
+ * @enetaddr:   Pointer to MAC address to put into the variable
+ * @return 0 if OK, other value on error
+ */
+int eth_setenv_enetaddr_by_index(const char *base_name, int index,
+                                uchar *enetaddr);
+
+
 /*
  * Get the hardware address for an ethernet interface .
  * Args:
index e13870931e9be33421e2af62fa1917ee7aeded11..8b4bb4e78fecb76c8099de66468a39ff3bdb0874 100644 (file)
@@ -65,6 +65,9 @@ void _debug_uart_init(void)
 
 void putc(const char ch)
 {
+       if (ch == '\n')
+               putc('\r');
+
        if (use_uart) {
                NS16550_t com_port = (NS16550_t)0x3f8;
 
@@ -74,8 +77,6 @@ void putc(const char ch)
        } else {
                efi_putc(global_priv, ch);
        }
-       if (ch == '\n')
-               putc('\r');
 }
 
 void puts(const char *str)
index 28725a27c7889ef9e2982673a26dcdf08a02d5f3..83e31f6d1f66c8bf2f81ab6de23c41636f1ee719 100644 (file)
@@ -9,4 +9,5 @@
 
 obj-y += efi_image_loader.o efi_boottime.o efi_runtime.o efi_console.o
 obj-y += efi_memory.o
+obj-$(CONFIG_LCD) += efi_gop.o
 obj-$(CONFIG_PARTITIONS) += efi_disk.o
index 87400dee1ad2a36b3957289142bbe2f42fed8a4b..9daca50a72fc1b7c92212c30bcbb7aed5d34e6b0 100644 (file)
@@ -137,12 +137,20 @@ efi_status_t EFIAPI efi_get_memory_map_ext(unsigned long *memory_map_size,
 static efi_status_t EFIAPI efi_allocate_pool(int pool_type, unsigned long size,
                                             void **buffer)
 {
-       return efi_allocate_pages(0, pool_type, (size + 0xfff) >> 12, (void*)buffer);
+       efi_status_t r;
+
+       EFI_ENTRY("%d, %ld, %p", pool_type, size, buffer);
+       r = efi_allocate_pages(0, pool_type, (size + 0xfff) >> 12, (void*)buffer);
+       return EFI_EXIT(r);
 }
 
 static efi_status_t EFIAPI efi_free_pool(void *buffer)
 {
-       return efi_free_pages((ulong)buffer, 0);
+       efi_status_t r;
+
+       EFI_ENTRY("%p", buffer);
+       r = efi_free_pages((ulong)buffer, 0);
+       return EFI_EXIT(r);
 }
 
 /*
@@ -706,7 +714,6 @@ static efi_status_t EFIAPI efi_handle_protocol(void *handle,
                                               efi_guid_t *protocol,
                                               void **protocol_interface)
 {
-       EFI_ENTRY("%p, %p, %p", handle, protocol, protocol_interface);
        return efi_open_protocol(handle, protocol, protocol_interface,
                                 NULL, NULL, 0);
 }
diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c
new file mode 100644 (file)
index 0000000..bdd62bc
--- /dev/null
@@ -0,0 +1,152 @@
+/*
+ *  EFI application disk support
+ *
+ *  Copyright (c) 2016 Alexander Graf
+ *
+ *  SPDX-License-Identifier:     GPL-2.0+
+ */
+
+#include <common.h>
+#include <efi_loader.h>
+#include <inttypes.h>
+#include <lcd.h>
+#include <malloc.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static const efi_guid_t efi_gop_guid = EFI_GOP_GUID;
+
+struct efi_gop_obj {
+       /* Generic EFI object parent class data */
+       struct efi_object parent;
+       /* EFI Interface callback struct for gop */
+       struct efi_gop ops;
+       /* The only mode we support */
+       struct efi_gop_mode_info info;
+       struct efi_gop_mode mode;
+};
+
+static efi_status_t EFIAPI gop_query_mode(struct efi_gop *this, u32 mode_number,
+                                         unsigned long *size_of_info,
+                                         struct efi_gop_mode_info **info)
+{
+       struct efi_gop_obj *gopobj;
+
+       EFI_ENTRY("%p, %x, %p, %p", this, mode_number, size_of_info, info);
+
+       gopobj = container_of(this, struct efi_gop_obj, ops);
+       *size_of_info = sizeof(gopobj->info);
+       *info = &gopobj->info;
+
+       return EFI_EXIT(EFI_SUCCESS);
+}
+
+static efi_status_t EFIAPI gop_set_mode(struct efi_gop *this, u32 mode_number)
+{
+       EFI_ENTRY("%p, %x", this, mode_number);
+
+       if (mode_number != 0)
+               return EFI_EXIT(EFI_INVALID_PARAMETER);
+
+       return EFI_EXIT(EFI_SUCCESS);
+}
+
+static efi_status_t EFIAPI gop_blt(struct efi_gop *this, void *buffer,
+                                  unsigned long operation, unsigned long sx,
+                                  unsigned long sy, unsigned long dx,
+                                  unsigned long dy, unsigned long width,
+                                  unsigned long height, unsigned long delta)
+{
+       int i, j, line_len16, line_len32;
+       void *fb;
+
+       EFI_ENTRY("%p, %p, %lx, %lx, %lx, %lx, %lx, %lx, %lx, %lx", this,
+                 buffer, operation, sx, sy, dx, dy, width, height, delta);
+
+       if (operation != EFI_BLT_BUFFER_TO_VIDEO)
+               return EFI_EXIT(EFI_INVALID_PARAMETER);
+
+       fb = (void*)gd->fb_base;
+       line_len16 = panel_info.vl_col * sizeof(u16);
+       line_len32 = panel_info.vl_col * sizeof(u32);
+
+       /* Copy the contents line by line */
+
+       switch (panel_info.vl_bpix) {
+       case LCD_COLOR32:
+               for (i = 0; i < height; i++) {
+                       u32 *dest = fb + ((i + dy)  * line_len32) +
+                                        (dx * sizeof(u32));
+                       u32 *src = buffer + ((i + sy)  * line_len32) +
+                                        (sx * sizeof(u32));
+
+                       /* Same color format, just memcpy */
+                       memcpy(dest, src, width * sizeof(u32));
+               }
+               break;
+       case LCD_COLOR16:
+               for (i = 0; i < height; i++) {
+                       u16 *dest = fb + ((i + dy)  * line_len16) +
+                                        (dx * sizeof(u16));
+                       u32 *src = buffer + ((i + sy)  * line_len32) +
+                                        (sx * sizeof(u32));
+
+                       /* Convert from rgb888 to rgb565 */
+                       for (j = 0; j < width; j++) {
+                               u32 rgb888 = src[j];
+                               dest[j] = ((((rgb888 >> (16 + 3)) & 0x1f) << 11) |
+                                          (((rgb888 >> (8 + 2)) & 0x3f) << 5) |
+                                          (((rgb888 >> (0 + 3)) & 0x1f) << 0));
+                       }
+               }
+               break;
+       }
+
+       lcd_sync();
+
+       return EFI_EXIT(EFI_SUCCESS);
+}
+
+/* This gets called from do_bootefi_exec(). */
+int efi_gop_register(void)
+{
+       struct efi_gop_obj *gopobj;
+       int line_len;
+
+       switch (panel_info.vl_bpix) {
+       case LCD_COLOR32:
+       case LCD_COLOR16:
+               break;
+       default:
+               /* So far, we only work in 16 or 32 bit mode */
+               return -1;
+       }
+
+       gopobj = calloc(1, sizeof(*gopobj));
+
+       /* Fill in object data */
+       gopobj->parent.protocols[0].guid = &efi_gop_guid;
+       gopobj->parent.protocols[0].open = efi_return_handle;
+       gopobj->parent.handle = &gopobj->ops;
+       gopobj->ops.query_mode = gop_query_mode;
+       gopobj->ops.set_mode = gop_set_mode;
+       gopobj->ops.blt = gop_blt;
+       gopobj->ops.mode = &gopobj->mode;
+
+       gopobj->mode.max_mode = 1;
+       gopobj->mode.info = &gopobj->info;
+       gopobj->mode.info_size = sizeof(gopobj->info);
+       gopobj->mode.fb_base = gd->fb_base;
+       gopobj->mode.fb_size = lcd_get_size(&line_len);
+
+       gopobj->info.version = 0;
+       gopobj->info.width = panel_info.vl_col;
+       gopobj->info.height = panel_info.vl_row;
+       gopobj->info.pixel_format = EFI_GOT_RGBA8;
+       gopobj->info.pixels_per_scanline = panel_info.vl_col;
+
+       /* Hook up to the device list */
+       list_add_tail(&gopobj->parent.link, &efi_obj_list);
+
+       return 0;
+}
index d558f5a8a9fd7c4394966f523d41e6de842ad599..574b204f23d40dd332e242907010131dff40aebb 100644 (file)
@@ -22,11 +22,8 @@ efi_status_t EFIAPI efi_return_handle(void *handle, efi_guid_t *protocol,
                        void **protocol_interface, void *agent_handle,
                        void *controller_handle, uint32_t attributes)
 {
-       EFI_ENTRY("%p, %p, %p, %p, %p, 0x%x", handle, protocol,
-                 protocol_interface, agent_handle, controller_handle,
-                 attributes);
        *protocol_interface = handle;
-       return EFI_EXIT(EFI_SUCCESS);
+       return EFI_SUCCESS;
 }
 
 static void efi_loader_relocate(const IMAGE_BASE_RELOCATION *rel,
index aefc808391ac35eebafedef81686f047dfa98037..d7852dbb447a123b5e45af89e6483b5d5c3a9a53 100644 (file)
@@ -132,6 +132,8 @@ static int check_reply_packet(uchar *pkt, unsigned dest, unsigned src,
                retval = -5;
        else if (!bootp_match_id(net_read_u32(&bp->bp_id)))
                retval = -6;
+       else if (memcmp(bp->bp_chaddr, net_ethaddr, HWL_ETHER) != 0)
+               retval = -7;
 
        debug("Filtering pkt = %d\n", retval);
 
index ee17a6901609f5759d936bb858767286880b766f..1420ac58a35fe8ebfbd726b6bc22e26675ba9a7c 100644 (file)
@@ -15,6 +15,7 @@
 #include <env_flags.h>
 #include <fcntl.h>
 #include <linux/stringify.h>
+#include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
 
 #include "fw_env.h"
 
-#define DIV_ROUND_UP(n, d)     (((n) + (d) - 1) / (d))
+struct common_args common_args;
+struct printenv_args printenv_args;
+struct setenv_args setenv_args;
 
-#define WHITESPACE(c) ((c == '\t') || (c == ' '))
+#define DIV_ROUND_UP(n, d)     (((n) + (d) - 1) / (d))
 
 #define min(x, y) ({                           \
        typeof(x) _min1 = (x);                  \
@@ -134,20 +137,22 @@ static inline ulong getenvsize (void)
        return rc;
 }
 
-static char *fw_string_blank(char *s, int noblank)
+static char *skip_chars(char *s)
 {
-       int i;
-       int len = strlen(s);
-
-       for (i = 0; i < len; i++, s++) {
-               if ((noblank && !WHITESPACE(*s)) ||
-                       (!noblank && WHITESPACE(*s)))
-                       break;
+       for (; *s != '\0'; s++) {
+               if (isblank(*s))
+                       return s;
        }
-       if (i == len)
-               return NULL;
+       return NULL;
+}
 
-       return s;
+static char *skip_blanks(char *s)
+{
+       for (; *s != '\0'; s++) {
+               if (!isblank(*s))
+                       return s;
+       }
+       return NULL;
 }
 
 /*
@@ -565,31 +570,29 @@ int fw_parse_script(char *fname)
                }
 
                /* Drop ending line feed / carriage return */
-               while (len > 0 && (dump[len - 1] == '\n' ||
-                               dump[len - 1] == '\r')) {
-                       dump[len - 1] = '\0';
-                       len--;
-               }
+               dump[--len] = '\0';
+               if (len && dump[len - 1] == '\r')
+                       dump[--len] = '\0';
 
                /* Skip comment or empty lines */
-               if ((len == 0) || dump[0] == '#')
+               if (len == 0 || dump[0] == '#')
                        continue;
 
                /*
                 * Search for variable's name,
                 * remove leading whitespaces
                 */
-               name = fw_string_blank(dump, 1);
+               name = skip_blanks(dump);
                if (!name)
                        continue;
 
                /* The first white space is the end of variable name */
-               val = fw_string_blank(name, 0);
+               val = skip_chars(name);
                len = strlen(name);
                if (val) {
                        *val++ = '\0';
                        if ((val - name) < len)
-                               val = fw_string_blank(val, 1);
+                               val = skip_blanks(val);
                        else
                                val = NULL;
                }
index 3bec5b970e7826eae232023488b2c62dec9af15f..3706d8f1a619cfba20b1c83e5ecb8f1d40d8265c 100644 (file)
@@ -49,10 +49,6 @@ static struct option long_options[] = {
        {NULL, 0, NULL, 0}
 };
 
-struct common_args common_args;
-struct printenv_args printenv_args;
-struct setenv_args setenv_args;
-
 void usage_printenv(void)
 {
 
index 905ade3b01236d11e4727e32a354c9d866ca618a..e00958a4ce593cb9060e84b03dc365311b7acc20 100644 (file)
@@ -76,6 +76,7 @@ static int kwboot_verbose;
 
 static int msg_req_delay = KWBOOT_MSG_REQ_DELAY;
 static int msg_rsp_timeo = KWBOOT_MSG_RSP_TIMEO;
+static int blk_rsp_timeo = KWBOOT_BLK_RSP_TIMEO;
 
 static void
 kwboot_printv(const char *fmt, ...)
@@ -380,7 +381,7 @@ kwboot_xm_sendblock(int fd, struct kwboot_block *block)
                        break;
 
                do {
-                       rc = kwboot_tty_recv(fd, &c, 1, KWBOOT_BLK_RSP_TIMEO);
+                       rc = kwboot_tty_recv(fd, &c, 1, blk_rsp_timeo);
                        if (rc)
                                break;
 
@@ -684,7 +685,7 @@ static void
 kwboot_usage(FILE *stream, char *progname)
 {
        fprintf(stream,
-               "Usage: %s [-d | -a | -q <req-delay> | -s <resp-timeo> | -b <image> | -D <image> ] [ -t ] [-B <baud> ] <TTY>\n",
+               "Usage: %s [OPTIONS] [-b <image> | -D <image> ] [-B <baud> ] <TTY>\n",
                progname);
        fprintf(stream, "\n");
        fprintf(stream,
@@ -696,6 +697,8 @@ kwboot_usage(FILE *stream, char *progname)
        fprintf(stream, "  -a: use timings for Armada XP\n");
        fprintf(stream, "  -q <req-delay>:  use specific request-delay\n");
        fprintf(stream, "  -s <resp-timeo>: use specific response-timeout\n");
+       fprintf(stream,
+               "  -o <block-timeo>: use specific xmodem block timeout\n");
        fprintf(stream, "\n");
        fprintf(stream, "  -t: mini terminal\n");
        fprintf(stream, "\n");
@@ -728,7 +731,7 @@ main(int argc, char **argv)
        kwboot_verbose = isatty(STDOUT_FILENO);
 
        do {
-               int c = getopt(argc, argv, "hb:ptaB:dD:q:s:");
+               int c = getopt(argc, argv, "hb:ptaB:dD:q:s:o:");
                if (c < 0)
                        break;
 
@@ -768,6 +771,10 @@ main(int argc, char **argv)
                        msg_rsp_timeo = atoi(optarg);
                        break;
 
+               case 'o':
+                       blk_rsp_timeo = atoi(optarg);
+                       break;
+
                case 'B':
                        speed = kwboot_tty_speed(atoi(optarg));
                        if (speed == -1)