Merge branch 'master' of git://git.denx.de/u-boot

Signed-off-by: Stefano Babic <sbabic@denx.de>
This commit is contained in:
Stefano Babic 2017-05-09 18:03:44 +02:00
commit 4f66e09bb9
1339 changed files with 14185 additions and 8407 deletions

View file

@ -22,8 +22,6 @@ addons:
- swig - swig
- libpython-dev - libpython-dev
- gcc-powerpc-linux-gnu - gcc-powerpc-linux-gnu
- gcc-arm-linux-gnueabihf
- gcc-aarch64-linux-gnu
- iasl - iasl
- grub-efi-ia32-bin - grub-efi-ia32-bin
- rpm2cpio - rpm2cpio
@ -40,6 +38,9 @@ install:
- ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname` - ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname`
# prepare buildman environment # prepare buildman environment
- echo -e "[toolchain]\nroot = /usr" > ~/.buildman - echo -e "[toolchain]\nroot = /usr" > ~/.buildman
- echo -e "aarch64 = /tmp/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu" >> ~/.buildman
- echo -e "arm = /tmp/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf" >> ~/.buildman
- echo -e "arc = /tmp/arc_gnu_2016.09_prebuilt_uclibc_le_archs_linux_install" >> ~/.buildman
- echo -e "\n[toolchain-alias]\nsh = sh4\nopenrisc = or32" >> ~/.buildman - echo -e "\n[toolchain-alias]\nsh = sh4\nopenrisc = or32" >> ~/.buildman
- cat ~/.buildman - cat ~/.buildman
- virtualenv /tmp/venv - virtualenv /tmp/venv
@ -69,7 +70,18 @@ before_script:
./tools/buildman/buildman --fetch-arch x86_64; ./tools/buildman/buildman --fetch-arch x86_64;
echo -e "\n[toolchain-prefix]\nx86 = ${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman; echo -e "\n[toolchain-prefix]\nx86 = ${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman;
fi fi
- if [[ "${TOOLCHAIN}" == arc ]]; then
wget https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2016.09-release/arc_gnu_2016.09_prebuilt_uclibc_le_archs_linux_install.tar.gz &&
tar -C /tmp -xf arc_gnu_2016.09_prebuilt_uclibc_le_archs_linux_install.tar.gz;
fi
- if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi
# If TOOLCHAIN is unset, we're on some flavour of ARM.
- if [[ "${TOOLCHAIN}" == "" ]]; then
wget http://releases.linaro.org/components/toolchain/binaries/6.3-2017.02/aarch64-linux-gnu/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz &&
wget http://releases.linaro.org/components/toolchain/binaries/6.3-2017.02/arm-linux-gnueabihf/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf.tar.xz &&
tar -C /tmp -xf gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz &&
tar -C /tmp -xf gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf.tar.xz;
fi
- if [[ "${QEMU_TARGET}" != "" ]]; then - if [[ "${QEMU_TARGET}" != "" ]]; then
git clone git://git.qemu.org/qemu.git /tmp/qemu; git clone git://git.qemu.org/qemu.git /tmp/qemu;
pushd /tmp/qemu; pushd /tmp/qemu;
@ -111,6 +123,9 @@ matrix:
include: include:
# we need to build by vendor due to 50min time limit for builds # we need to build by vendor due to 50min time limit for builds
# each env setting here is a dedicated build # each env setting here is a dedicated build
- env:
- BUILDMAN="arc"
TOOLCHAIN="arc"
- env: - env:
- BUILDMAN="arm11" - BUILDMAN="arm11"
- env: - env:
@ -152,7 +167,7 @@ matrix:
- env: - env:
- BUILDMAN="sun7i" - BUILDMAN="sun7i"
- env: - env:
- BUILDMAN="sun8i -x orangepi_pc2" - BUILDMAN="sun8i"
- env: - env:
- BUILDMAN="sun9i" - BUILDMAN="sun9i"
- env: - env:
@ -221,7 +236,6 @@ matrix:
- BUILDMAN="uniphier" - BUILDMAN="uniphier"
- env: - env:
- BUILDMAN="aarch64 -x tegra,freescale,mvebu,uniphier,sunxi,samsung,rockchip" - BUILDMAN="aarch64 -x tegra,freescale,mvebu,uniphier,sunxi,samsung,rockchip"
TOOLCHAIN="aarch64"
- env: - env:
- BUILDMAN="rockchip" - BUILDMAN="rockchip"
- env: - env:

View file

@ -436,6 +436,9 @@ F: configs/am335x_hs_evm_defconfig
F: configs/am43xx_hs_evm_defconfig F: configs/am43xx_hs_evm_defconfig
F: configs/am57xx_hs_evm_defconfig F: configs/am57xx_hs_evm_defconfig
F: configs/dra7xx_hs_evm_defconfig F: configs/dra7xx_hs_evm_defconfig
F: configs/k2hk_hs_evm_defconfig
F: configs/k2e_hs_evm_defconfig
F: configs/k2g_hs_evm_defconfig
TQ GROUP TQ GROUP
#M: Martin Krause <martin.krause@tq-systems.de> #M: Martin Krause <martin.krause@tq-systems.de>

View file

@ -5,7 +5,7 @@
VERSION = 2017 VERSION = 2017
PATCHLEVEL = 05 PATCHLEVEL = 05
SUBLEVEL = SUBLEVEL =
EXTRAVERSION = -rc1 EXTRAVERSION =
NAME = NAME =
# *DOCUMENTATION* # *DOCUMENTATION*

26
README
View file

@ -823,16 +823,11 @@ The following options need to be configured:
CONFIG_CMD_AES AES 128 CBC encrypt/decrypt CONFIG_CMD_AES AES 128 CBC encrypt/decrypt
CONFIG_CMD_ASKENV * ask for env variable CONFIG_CMD_ASKENV * ask for env variable
CONFIG_CMD_BDI bdinfo CONFIG_CMD_BDI bdinfo
CONFIG_CMD_BEDBUG * Include BedBug Debugger
CONFIG_CMD_BMP * BMP support
CONFIG_CMD_BSP * Board specific commands
CONFIG_CMD_BOOTD bootd CONFIG_CMD_BOOTD bootd
CONFIG_CMD_BOOTI * ARM64 Linux kernel Image support CONFIG_CMD_BOOTI * ARM64 Linux kernel Image support
CONFIG_CMD_CACHE * icache, dcache CONFIG_CMD_CACHE * icache, dcache
CONFIG_CMD_CLK * clock command support
CONFIG_CMD_CONSOLE coninfo CONFIG_CMD_CONSOLE coninfo
CONFIG_CMD_CRC32 * crc32 CONFIG_CMD_CRC32 * crc32
CONFIG_CMD_DATE * support for RTC, date/time...
CONFIG_CMD_DHCP * DHCP support CONFIG_CMD_DHCP * DHCP support
CONFIG_CMD_DIAG * Diagnostics CONFIG_CMD_DIAG * Diagnostics
CONFIG_CMD_DS4510 * ds4510 I2C gpio commands CONFIG_CMD_DS4510 * ds4510 I2C gpio commands
@ -1549,13 +1544,6 @@ The following options need to be configured:
This will also enable the command "fatwrite" enabling the This will also enable the command "fatwrite" enabling the
user to write files to FAT. user to write files to FAT.
- CBFS (Coreboot Filesystem) support:
CONFIG_CMD_CBFS
Define this to enable support for reading from a Coreboot
filesystem. Available commands are cbfsinit, cbfsinfo, cbfsls
and cbfsload.
- FAT(File Allocation Table) filesystem cluster size: - FAT(File Allocation Table) filesystem cluster size:
CONFIG_FS_FAT_MAX_CLUSTSIZE CONFIG_FS_FAT_MAX_CLUSTSIZE
@ -1581,7 +1569,6 @@ The following options need to be configured:
CONFIG_SYS_DIU_ADDR CONFIG_SYS_DIU_ADDR
CONFIG_VIDEO CONFIG_VIDEO
CONFIG_CMD_BMP
CONFIG_CFB_CONSOLE CONFIG_CFB_CONSOLE
CONFIG_VIDEO_SW_CURSOR CONFIG_VIDEO_SW_CURSOR
CONFIG_VGA_AS_SINGLE_DEVICE CONFIG_VGA_AS_SINGLE_DEVICE
@ -1642,9 +1629,6 @@ The following options need to be configured:
320x240. Black & white. 320x240. Black & white.
Normally display is black on white background; define
CONFIG_SYS_WHITE_ON_BLACK to get it inverted.
CONFIG_LCD_ALIGNMENT CONFIG_LCD_ALIGNMENT
Normally the LCD is page-aligned (typically 4KB). If this is Normally the LCD is page-aligned (typically 4KB). If this is
@ -2849,16 +2833,6 @@ The following options need to be configured:
This enables 'hdmidet' command which returns true if an This enables 'hdmidet' command which returns true if an
HDMI monitor is detected. This command is i.MX 6 specific. HDMI monitor is detected. This command is i.MX 6 specific.
CONFIG_CMD_BMODE
This enables the 'bmode' (bootmode) command for forcing
a boot from specific media.
This is useful for forcing the ROM's usb downloader to
activate upon a watchdog reset which is nice when iterating
on U-Boot. Using the reset button or running bmode normal
will set it back to normal. This command currently
supports i.MX53 and i.MX6.
- bootcount support: - bootcount support:
CONFIG_BOOTCOUNT_LIMIT CONFIG_BOOTCOUNT_LIMIT

View file

@ -88,6 +88,12 @@ config ARM_ERRATA_833069
config ARM_ERRATA_833471 config ARM_ERRATA_833471
bool bool
config ARM_ERRATA_852421
bool
config ARM_ERRATA_852423
bool
config CPU_ARM720T config CPU_ARM720T
bool bool
select SYS_CACHE_SHIFT_5 select SYS_CACHE_SHIFT_5
@ -174,6 +180,15 @@ config SYS_CACHELINE_SIZE
default 64 if SYS_CACHE_SHIFT_6 default 64 if SYS_CACHE_SHIFT_6
default 32 if SYS_CACHE_SHIFT_5 default 32 if SYS_CACHE_SHIFT_5
config ARM_SMCCC
bool "Support for ARM SMC Calling Convention (SMCCC)"
depends on CPU_V7 || ARM64
select ARM_PSCI_FW
help
Say Y here if you want to enable ARM SMC Calling Convention.
This should be enabled if U-Boot needs to communicate with system
firmware (for example, PSCI) according to SMCCC.
config SEMIHOSTING config SEMIHOSTING
bool "support boot from semihosting" bool "support boot from semihosting"
help help
@ -254,11 +269,6 @@ config SPL_USE_ARCH_MEMSET
Such implementation may be faster under some conditions Such implementation may be faster under some conditions
but may increase the binary size. but may increase the binary size.
config ARCH_OMAP2
bool
select CPU_V7
select SUPPORT_SPL
config ARM64_SUPPORT_AARCH32 config ARM64_SUPPORT_AARCH32
bool "ARM64 system support AArch32 execution state" bool "ARM64 system support AArch32 execution state"
default y if ARM64 && !TARGET_THUNDERX_88XX default y if ARM64 && !TARGET_THUNDERX_88XX
@ -481,72 +491,6 @@ config TARGET_VEXPRESS_CA9X4
bool "Support vexpress_ca9x4" bool "Support vexpress_ca9x4"
select CPU_V7 select CPU_V7
config TARGET_BRXRE1
bool "Support BRXRE1"
select ARCH_OMAP2
select BOARD_LATE_INIT
config TARGET_BRPPT1
bool "Support BRPPT1"
select ARCH_OMAP2
select BOARD_LATE_INIT
config TARGET_DRACO
bool "Support draco"
select ARCH_OMAP2
select BOARD_LATE_INIT
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_THUBAN
bool "Support thuban"
select ARCH_OMAP2
select BOARD_LATE_INIT
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_RASTABAN
bool "Support rastaban"
select ARCH_OMAP2
select BOARD_LATE_INIT
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_ETAMIN
bool "Support etamin"
select ARCH_OMAP2
select BOARD_LATE_INIT
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_PXM2
bool "Support pxm2"
select ARCH_OMAP2
select BOARD_LATE_INIT
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_RUT
bool "Support rut"
select ARCH_OMAP2
select BOARD_LATE_INIT
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_TI814X_EVM
bool "Support ti814x_evm"
select ARCH_OMAP2
config TARGET_TI816X_EVM
bool "Support ti816x_evm"
select ARCH_OMAP2
config TARGET_BCM23550_W1D config TARGET_BCM23550_W1D
bool "Support bcm23550_w1d" bool "Support bcm23550_w1d"
select CPU_V7 select CPU_V7
@ -604,6 +548,13 @@ config ARCH_KEYSTONE
select SUPPORT_SPL select SUPPORT_SPL
select SYS_THUMB_BUILD select SYS_THUMB_BUILD
select CMD_POWEROFF select CMD_POWEROFF
imply FIT
config ARCH_OMAP2PLUS
bool "TI OMAP2+"
select CPU_V7
select SUPPORT_SPL
imply FIT
config ARCH_MESON config ARCH_MESON
bool "Amlogic Meson" bool "Amlogic Meson"
@ -639,126 +590,6 @@ config ARCH_MX5
select CPU_V7 select CPU_V7
select BOARD_EARLY_INIT_F select BOARD_EARLY_INIT_F
config TARGET_M53EVK
bool "Support m53evk"
select CPU_V7
select SUPPORT_SPL
select BOARD_EARLY_INIT_F
config TARGET_MX51EVK
bool "Support mx51evk"
select BOARD_LATE_INIT
select CPU_V7
select BOARD_EARLY_INIT_F
config TARGET_MX53ARD
bool "Support mx53ard"
select CPU_V7
select BOARD_EARLY_INIT_F
config TARGET_MX53EVK
bool "Support mx53evk"
select BOARD_LATE_INIT
select CPU_V7
select BOARD_EARLY_INIT_F
config TARGET_MX53LOCO
bool "Support mx53loco"
select BOARD_LATE_INIT
select CPU_V7
select BOARD_EARLY_INIT_F
config TARGET_MX53SMD
bool "Support mx53smd"
select CPU_V7
select BOARD_EARLY_INIT_F
config OMAP34XX
bool "OMAP34XX SoC"
select ARCH_OMAP2
select ARM_ERRATA_430973
select ARM_ERRATA_454179
select ARM_ERRATA_621766
select ARM_ERRATA_725233
select USE_TINY_PRINTF
imply SPL_EXT_SUPPORT
imply SPL_FAT_SUPPORT
imply SPL_GPIO_SUPPORT
imply SPL_I2C_SUPPORT
imply SPL_LIBCOMMON_SUPPORT
imply SPL_LIBDISK_SUPPORT
imply SPL_LIBGENERIC_SUPPORT
imply SPL_MMC_SUPPORT
imply SPL_NAND_SUPPORT
imply SPL_POWER_SUPPORT
imply SPL_SERIAL_SUPPORT
imply SYS_THUMB_BUILD
config OMAP44XX
bool "OMAP44XX SoC"
select ARCH_OMAP2
select USE_TINY_PRINTF
imply SPL_DISPLAY_PRINT
imply SPL_EXT_SUPPORT
imply SPL_FAT_SUPPORT
imply SPL_GPIO_SUPPORT
imply SPL_I2C_SUPPORT
imply SPL_LIBCOMMON_SUPPORT
imply SPL_LIBDISK_SUPPORT
imply SPL_LIBGENERIC_SUPPORT
imply SPL_MMC_SUPPORT
imply SPL_NAND_SUPPORT
imply SPL_POWER_SUPPORT
imply SPL_SERIAL_SUPPORT
imply SYS_THUMB_BUILD
config OMAP54XX
bool "OMAP54XX SoC"
select ARCH_OMAP2
select ARM_ERRATA_798870
select SYS_THUMB_BUILD
imply SPL_DISPLAY_PRINT
imply SPL_ENV_SUPPORT
imply SPL_EXT_SUPPORT
imply SPL_FAT_SUPPORT
imply SPL_GPIO_SUPPORT
imply SPL_I2C_SUPPORT
imply SPL_LIBCOMMON_SUPPORT
imply SPL_LIBDISK_SUPPORT
imply SPL_LIBGENERIC_SUPPORT
imply SPL_MMC_SUPPORT
imply SPL_NAND_SUPPORT
imply SPL_POWER_SUPPORT
imply SPL_SERIAL_SUPPORT
config AM43XX
bool "AM43XX SoC"
select ARCH_OMAP2
imply SPL_DM
imply SPL_DM_SEQ_ALIAS
imply SPL_OF_CONTROL
imply SPL_OF_TRANSLATE
imply SPL_SEPARATE_BSS
imply SPL_SYS_MALLOC_SIMPLE
imply SYS_THUMB_BUILD
help
Support for AM43xx SOC from Texas Instruments.
The AM43xx high performance SOC features a Cortex-A9
ARM core, a quad core PRU-ICSS for industrial Ethernet
protocols, dual camera support, optional 3D graphics
and an optional customer programmable secure boot.
config AM33XX
bool "AM33XX SoC"
select ARCH_OMAP2
imply SYS_THUMB_BUILD
help
Support for AM335x SOC from Texas Instruments.
The AM335x high performance SOC features a Cortex-A8
ARM core, a dual core PRU-ICSS for industrial Ethernet
protocols, optional 3D graphics and an optional customer
programmable secure boot.
config ARCH_RMOBILE config ARCH_RMOBILE
bool "Renesas ARM SoCs" bool "Renesas ARM SoCs"
select DM select DM
@ -796,10 +627,6 @@ config ARCH_SOCFPGA
select SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION select SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
select SYS_THUMB_BUILD select SYS_THUMB_BUILD
config TARGET_CM_T43
bool "Support cm_t43"
select ARCH_OMAP2
config ARCH_SUNXI config ARCH_SUNXI
bool "Support sunxi (Allwinner) SoCs" bool "Support sunxi (Allwinner) SoCs"
select CMD_GPIO select CMD_GPIO
@ -822,17 +649,20 @@ config ARCH_SUNXI
select USB_STORAGE if DISTRO_DEFAULTS select USB_STORAGE if DISTRO_DEFAULTS
select USB_KEYBOARD if DISTRO_DEFAULTS select USB_KEYBOARD if DISTRO_DEFAULTS
select USE_TINY_PRINTF select USE_TINY_PRINTF
imply PRE_CONSOLE_BUFFER
imply SPL_GPIO_SUPPORT
imply SPL_LIBCOMMON_SUPPORT
imply SPL_LIBDISK_SUPPORT
imply SPL_LIBGENERIC_SUPPORT
imply SPL_MMC_SUPPORT if GENERIC_MMC
imply SPL_POWER_SUPPORT
imply SPL_SERIAL_SUPPORT
config TARGET_TS4600 config TARGET_TS4600
bool "Support TS4600" bool "Support TS4600"
select CPU_ARM926EJS select CPU_ARM926EJS
select SUPPORT_SPL select SUPPORT_SPL
config TARGET_TS4800
bool "Support TS4800"
select CPU_V7
select SYS_FSL_ERRATUM_ESDHC_A001
config ARCH_VF610 config ARCH_VF610
bool "Freescale Vybrid" bool "Freescale Vybrid"
select CPU_V7 select CPU_V7
@ -860,6 +690,7 @@ config ARCH_ZYNQ
select CLK select CLK
select SPL_CLK select SPL_CLK
select CLK_ZYNQ select CLK_ZYNQ
imply CMD_CLK
config ARCH_ZYNQMP config ARCH_ZYNQMP
bool "Support Xilinx ZynqMP Platform" bool "Support Xilinx ZynqMP Platform"
@ -1226,6 +1057,8 @@ source "arch/arm/mach-sti/Kconfig"
source "arch/arm/mach-stm32/Kconfig" source "arch/arm/mach-stm32/Kconfig"
source "arch/arm/mach-sunxi/Kconfig"
source "arch/arm/mach-tegra/Kconfig" source "arch/arm/mach-tegra/Kconfig"
source "arch/arm/mach-uniphier/Kconfig" source "arch/arm/mach-uniphier/Kconfig"
@ -1243,10 +1076,7 @@ source "arch/arm/cpu/armv8/Kconfig"
source "arch/arm/imx-common/Kconfig" source "arch/arm/imx-common/Kconfig"
source "board/aries/m28evk/Kconfig" source "board/aries/m28evk/Kconfig"
source "board/aries/m53evk/Kconfig"
source "board/bosch/shc/Kconfig" source "board/bosch/shc/Kconfig"
source "board/BuR/brxre1/Kconfig"
source "board/BuR/brppt1/Kconfig"
source "board/CarMediaLab/flea3/Kconfig" source "board/CarMediaLab/flea3/Kconfig"
source "board/Marvell/aspenite/Kconfig" source "board/Marvell/aspenite/Kconfig"
source "board/Marvell/gplugd/Kconfig" source "board/Marvell/gplugd/Kconfig"
@ -1261,8 +1091,6 @@ source "board/broadcom/bcmnsp/Kconfig"
source "board/broadcom/bcmns2/Kconfig" source "board/broadcom/bcmns2/Kconfig"
source "board/cavium/thunderx/Kconfig" source "board/cavium/thunderx/Kconfig"
source "board/cirrus/edb93xx/Kconfig" source "board/cirrus/edb93xx/Kconfig"
source "board/compulab/cm_t335/Kconfig"
source "board/compulab/cm_t43/Kconfig"
source "board/creative/xfi3/Kconfig" source "board/creative/xfi3/Kconfig"
source "board/freescale/ls2080a/Kconfig" source "board/freescale/ls2080a/Kconfig"
source "board/freescale/ls2080aqds/Kconfig" source "board/freescale/ls2080aqds/Kconfig"
@ -1283,11 +1111,6 @@ source "board/freescale/mx28evk/Kconfig"
source "board/freescale/mx31ads/Kconfig" source "board/freescale/mx31ads/Kconfig"
source "board/freescale/mx31pdk/Kconfig" source "board/freescale/mx31pdk/Kconfig"
source "board/freescale/mx35pdk/Kconfig" source "board/freescale/mx35pdk/Kconfig"
source "board/freescale/mx51evk/Kconfig"
source "board/freescale/mx53ard/Kconfig"
source "board/freescale/mx53evk/Kconfig"
source "board/freescale/mx53loco/Kconfig"
source "board/freescale/mx53smd/Kconfig"
source "board/freescale/s32v234evb/Kconfig" source "board/freescale/s32v234evb/Kconfig"
source "board/gdsys/a38x/Kconfig" source "board/gdsys/a38x/Kconfig"
source "board/grinn/chiliboard/Kconfig" source "board/grinn/chiliboard/Kconfig"
@ -1295,15 +1118,12 @@ source "board/gumstix/pepper/Kconfig"
source "board/h2200/Kconfig" source "board/h2200/Kconfig"
source "board/hisilicon/hikey/Kconfig" source "board/hisilicon/hikey/Kconfig"
source "board/imx31_phycore/Kconfig" source "board/imx31_phycore/Kconfig"
source "board/isee/igep0033/Kconfig" source "board/isee/igep003x/Kconfig"
source "board/olimex/mx23_olinuxino/Kconfig" source "board/olimex/mx23_olinuxino/Kconfig"
source "board/phytec/pcm051/Kconfig" source "board/phytec/pcm051/Kconfig"
source "board/ppcag/bg0900/Kconfig" source "board/ppcag/bg0900/Kconfig"
source "board/sandisk/sansa_fuze_plus/Kconfig" source "board/sandisk/sansa_fuze_plus/Kconfig"
source "board/schulercontrol/sc_sps_1/Kconfig" source "board/schulercontrol/sc_sps_1/Kconfig"
source "board/siemens/draco/Kconfig"
source "board/siemens/pxm2/Kconfig"
source "board/siemens/rut/Kconfig"
source "board/silica/pengwyn/Kconfig" source "board/silica/pengwyn/Kconfig"
source "board/spear/spear300/Kconfig" source "board/spear/spear300/Kconfig"
source "board/spear/spear310/Kconfig" source "board/spear/spear310/Kconfig"
@ -1311,18 +1131,12 @@ source "board/spear/spear320/Kconfig"
source "board/spear/spear600/Kconfig" source "board/spear/spear600/Kconfig"
source "board/spear/x600/Kconfig" source "board/spear/x600/Kconfig"
source "board/st/stv0991/Kconfig" source "board/st/stv0991/Kconfig"
source "board/sunxi/Kconfig"
source "board/syteco/zmx25/Kconfig" source "board/syteco/zmx25/Kconfig"
source "board/tcl/sl50/Kconfig" source "board/tcl/sl50/Kconfig"
source "board/ti/am335x/Kconfig"
source "board/ti/am43xx/Kconfig"
source "board/birdland/bav335x/Kconfig" source "board/birdland/bav335x/Kconfig"
source "board/ti/ti814x/Kconfig"
source "board/ti/ti816x/Kconfig"
source "board/timll/devkit3250/Kconfig" source "board/timll/devkit3250/Kconfig"
source "board/toradex/colibri_pxa270/Kconfig" source "board/toradex/colibri_pxa270/Kconfig"
source "board/technologic/ts4600/Kconfig" source "board/technologic/ts4600/Kconfig"
source "board/technologic/ts4800/Kconfig"
source "board/vscom/baltos/Kconfig" source "board/vscom/baltos/Kconfig"
source "board/woodburn/Kconfig" source "board/woodburn/Kconfig"
source "board/work-microwave/work_92105/Kconfig" source "board/work-microwave/work_92105/Kconfig"

View file

@ -64,7 +64,7 @@ machine-$(CONFIG_ARCH_MVEBU) += mvebu
# TODO: rename CONFIG_TEGRA -> CONFIG_ARCH_TEGRA # TODO: rename CONFIG_TEGRA -> CONFIG_ARCH_TEGRA
# TODO: rename CONFIG_ORION5X -> CONFIG_ARCH_ORION5X # TODO: rename CONFIG_ORION5X -> CONFIG_ARCH_ORION5X
machine-$(CONFIG_ORION5X) += orion5x machine-$(CONFIG_ORION5X) += orion5x
machine-$(CONFIG_ARCH_OMAP2) += omap2 machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2
machine-$(CONFIG_ARCH_S5PC1XX) += s5pc1xx machine-$(CONFIG_ARCH_S5PC1XX) += s5pc1xx
machine-$(CONFIG_ARCH_SUNXI) += sunxi machine-$(CONFIG_ARCH_SUNXI) += sunxi
machine-$(CONFIG_ARCH_SNAPDRAGON) += snapdragon machine-$(CONFIG_ARCH_SNAPDRAGON) += snapdragon

View file

@ -6,7 +6,7 @@
# #
ifndef CONFIG_STANDALONE_LOAD_ADDR ifndef CONFIG_STANDALONE_LOAD_ADDR
ifneq ($(CONFIG_ARCH_OMAP2),) ifneq ($(CONFIG_ARCH_OMAP2PLUS),)
CONFIG_STANDALONE_LOAD_ADDR = 0x80300000 CONFIG_STANDALONE_LOAD_ADDR = 0x80300000
else else
CONFIG_STANDALONE_LOAD_ADDR = 0xc100000 CONFIG_STANDALONE_LOAD_ADDR = 0xc100000
@ -45,7 +45,7 @@ endif
# Only test once # Only test once
ifeq ($(CONFIG_$(SPL_)SYS_THUMB_BUILD),y) ifeq ($(CONFIG_$(SPL_)SYS_THUMB_BUILD),y)
archprepare: checkthumb archprepare: checkthumb checkgcc6
checkthumb: checkthumb:
@if test "$(call cc-name)" = "gcc" -a \ @if test "$(call cc-name)" = "gcc" -a \
@ -55,8 +55,18 @@ checkthumb:
echo '*** Your board is configured for THUMB mode.'; \ echo '*** Your board is configured for THUMB mode.'; \
false; \ false; \
fi fi
else
archprepare: checkgcc6
endif endif
checkgcc6:
@if test "$(call cc-name)" = "gcc" -a \
"$(call cc-version)" -lt "0600"; then \
echo -n '*** Your GCC is older than 6.0 and will not be '; \
echo 'supported starting in v2018.01.'; \
fi
# Try if EABI is supported, else fall back to old API, # Try if EABI is supported, else fall back to old API,
# i. e. for example: # i. e. for example:
# - with ELDK 4.2 (EABI supported), use: # - with ELDK 4.2 (EABI supported), use:

View file

@ -12,12 +12,13 @@ obj-y += cache_v7.o cache_v7_asm.o
obj-y += cpu.o cp15.o obj-y += cpu.o cp15.o
obj-y += syslib.o obj-y += syslib.o
ifneq ($(CONFIG_AM43XX)$(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA)$(CONFIG_MX6)$(CONFIG_MX7)$(CONFIG_TI81XX)$(CONFIG_AT91FAMILY)$(CONFIG_ARCH_SUNXI)$(CONFIG_ARCH_SOCFPGA)$(CONFIG_ARCH_MX7ULP)$(CONFIG_LS102XA),) ifneq ($(CONFIG_AM43XX)$(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA)$(CONFIG_MX6)$(CONFIG_MX7)$(CONFIG_TI81XX)$(CONFIG_AT91FAMILY)$(CONFIG_ARCH_SUNXI)$(CONFIG_ARCH_SOCFPGA)$(CONFIG_ARCH_MX7ULP)$(CONFIG_ARCH_LS1021A),)
ifneq ($(CONFIG_SKIP_LOWLEVEL_INIT),y) ifneq ($(CONFIG_SKIP_LOWLEVEL_INIT),y)
obj-y += lowlevel_init.o obj-y += lowlevel_init.o
endif endif
endif endif
obj-$(CONFIG_ARM_SMCCC) += smccc-call.o
obj-$(CONFIG_ARMV7_NONSEC) += nonsec_virt.o virt-v7.o virt-dt.o obj-$(CONFIG_ARMV7_NONSEC) += nonsec_virt.o virt-v7.o virt-dt.o
obj-$(CONFIG_ARMV7_PSCI) += psci.o psci-common.o obj-$(CONFIG_ARMV7_PSCI) += psci.o psci-common.o

View file

@ -94,8 +94,6 @@ void ft_cpu_setup(void *blob, bd_t *bd)
} }
#endif #endif
fdt_fixup_ethernet(blob);
off = fdt_node_offset_by_prop_value(blob, -1, "device_type", "cpu", 4); off = fdt_node_offset_by_prop_value(blob, -1, "device_type", "cpu", 4);
while (off != -FDT_ERR_NOTFOUND) { while (off != -FDT_ERR_NOTFOUND) {
val = gd->cpu_clk; val = gd->cpu_clk;

View file

@ -14,24 +14,63 @@ choice
prompt "MX5 board select" prompt "MX5 board select"
optional optional
config TARGET_USBARMORY config TARGET_M53EVK
bool "Support USB armory" bool "Support m53evk"
select CPU_V7 select MX53
select SUPPORT_SPL
config TARGET_MX51EVK
bool "Support mx51evk"
select BOARD_LATE_INIT
select MX51
config TARGET_MX53ARD
bool "Support mx53ard"
select MX53
config TARGET_MX53CX9020 config TARGET_MX53CX9020
bool "Support CX9020" bool "Support CX9020"
select BOARD_LATE_INIT select BOARD_LATE_INIT
select CPU_V7
select MX53 select MX53
select DM select DM
select DM_SERIAL select DM_SERIAL
config TARGET_MX53EVK
bool "Support mx53evk"
select BOARD_LATE_INIT
select MX53
config TARGET_MX53LOCO
bool "Support mx53loco"
select BOARD_LATE_INIT
select MX53
config TARGET_MX53SMD
bool "Support mx53smd"
select MX53
config TARGET_TS4800
bool "Support TS4800"
select MX51
select SYS_FSL_ERRATUM_ESDHC_A001
config TARGET_USBARMORY
bool "Support USB armory"
select MX53
endchoice endchoice
config SYS_SOC config SYS_SOC
default "mx5" default "mx5"
source "board/aries/m53evk/Kconfig"
source "board/beckhoff/mx53cx9020/Kconfig" source "board/beckhoff/mx53cx9020/Kconfig"
source "board/freescale/mx51evk/Kconfig"
source "board/freescale/mx53ard/Kconfig"
source "board/freescale/mx53evk/Kconfig"
source "board/freescale/mx53loco/Kconfig"
source "board/freescale/mx53smd/Kconfig"
source "board/inversepath/usbarmory/Kconfig" source "board/inversepath/usbarmory/Kconfig"
source "board/technologic/ts4800/Kconfig"
endif endif

View file

@ -0,0 +1,56 @@
/*
* Copyright (c) 2015, Linaro Limited
*
* SPDX-License-Identifier: GPL-2.0
*/
#include <linux/linkage.h>
#include <asm/opcodes-sec.h>
#include <asm/opcodes-virt.h>
#define UNWIND(x...)
/*
* Wrap c macros in asm macros to delay expansion until after the
* SMCCC asm macro is expanded.
*/
.macro SMCCC_SMC
__SMC(0)
.endm
.macro SMCCC_HVC
__HVC(0)
.endm
.macro SMCCC instr
UNWIND( .fnstart)
mov r12, sp
push {r4-r7}
UNWIND( .save {r4-r7})
ldm r12, {r4-r7}
\instr
pop {r4-r7}
ldr r12, [sp, #(4 * 4)]
stm r12, {r0-r3}
bx lr
UNWIND( .fnend)
.endm
/*
* void smccc_smc(unsigned long a0, unsigned long a1, unsigned long a2,
* unsigned long a3, unsigned long a4, unsigned long a5,
* unsigned long a6, unsigned long a7, struct arm_smccc_res *res,
* struct arm_smccc_quirk *quirk)
*/
ENTRY(__arm_smccc_smc)
SMCCC SMCCC_SMC
ENDPROC(__arm_smccc_smc)
/*
* void smccc_hvc(unsigned long a0, unsigned long a1, unsigned long a2,
* unsigned long a3, unsigned long a4, unsigned long a5,
* unsigned long a6, unsigned long a7, struct arm_smccc_res *res,
* struct arm_smccc_quirk *quirk)
*/
ENTRY(__arm_smccc_hvc)
SMCCC SMCCC_HVC
ENDPROC(__arm_smccc_hvc)

View file

@ -283,6 +283,18 @@ skip_errata_621766:
skip_errata_725233: skip_errata_725233:
#endif #endif
#ifdef CONFIG_ARM_ERRATA_852421
mrc p15, 0, r0, c15, c0, 1 @ read diagnostic register
orr r0, r0, #1 << 24 @ set bit #24
mcr p15, 0, r0, c15, c0, 1 @ write diagnostic register
#endif
#ifdef CONFIG_ARM_ERRATA_852423
mrc p15, 0, r0, c15, c0, 1 @ read diagnostic register
orr r0, r0, #1 << 12 @ set bit #12
mcr p15, 0, r0, c15, c0, 1 @ write diagnostic register
#endif
mov pc, r5 @ back to my caller mov pc, r5 @ back to my caller
ENDPROC(cpu_init_cp15) ENDPROC(cpu_init_cp15)

View file

@ -27,6 +27,17 @@
#define GICD_BASE (SUNXI_GIC400_BASE + GIC_DIST_OFFSET) #define GICD_BASE (SUNXI_GIC400_BASE + GIC_DIST_OFFSET)
#define GICC_BASE (SUNXI_GIC400_BASE + GIC_CPU_OFFSET_A15) #define GICC_BASE (SUNXI_GIC400_BASE + GIC_CPU_OFFSET_A15)
/*
* R40 is different from other single cluster SoCs.
*
* The power clamps are located in the unused space after the per-core
* reset controls for core 3. The secondary core entry address register
* is in the SRAM controller address range.
*/
#define SUN8I_R40_PWROFF (0x110)
#define SUN8I_R40_PWR_CLAMP(cpu) (0x120 + (cpu) * 0x4)
#define SUN8I_R40_SRAMC_SOFT_ENTRY_REG0 (0xbc)
static void __secure cp15_write_cntp_tval(u32 tval) static void __secure cp15_write_cntp_tval(u32 tval)
{ {
asm volatile ("mcr p15, 0, %0, c14, c2, 0" : : "r" (tval)); asm volatile ("mcr p15, 0, %0, c14, c2, 0" : : "r" (tval));
@ -68,7 +79,8 @@ static void __secure __mdelay(u32 ms)
static void __secure clamp_release(u32 __maybe_unused *clamp) static void __secure clamp_release(u32 __maybe_unused *clamp)
{ {
#if defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN7I) || \ #if defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN7I) || \
defined(CONFIG_MACH_SUN8I_H3) defined(CONFIG_MACH_SUN8I_H3) || \
defined(CONFIG_MACH_SUN8I_R40)
u32 tmp = 0x1ff; u32 tmp = 0x1ff;
do { do {
tmp >>= 1; tmp >>= 1;
@ -82,7 +94,8 @@ static void __secure clamp_release(u32 __maybe_unused *clamp)
static void __secure clamp_set(u32 __maybe_unused *clamp) static void __secure clamp_set(u32 __maybe_unused *clamp)
{ {
#if defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN7I) || \ #if defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN7I) || \
defined(CONFIG_MACH_SUN8I_H3) defined(CONFIG_MACH_SUN8I_H3) || \
defined(CONFIG_MACH_SUN8I_R40)
writel(0xff, clamp); writel(0xff, clamp);
#endif #endif
} }
@ -115,7 +128,17 @@ static void __secure sunxi_cpu_set_power(int __always_unused cpu, bool on)
sunxi_power_switch(&cpucfg->cpu1_pwr_clamp, &cpucfg->cpu1_pwroff, sunxi_power_switch(&cpucfg->cpu1_pwr_clamp, &cpucfg->cpu1_pwroff,
on, 0); on, 0);
} }
#else /* ! CONFIG_MACH_SUN7I */ #elif defined CONFIG_MACH_SUN8I_R40
static void __secure sunxi_cpu_set_power(int cpu, bool on)
{
struct sunxi_cpucfg_reg *cpucfg =
(struct sunxi_cpucfg_reg *)SUNXI_CPUCFG_BASE;
sunxi_power_switch((void *)cpucfg + SUN8I_R40_PWR_CLAMP(cpu),
(void *)cpucfg + SUN8I_R40_PWROFF,
on, 0);
}
#else /* ! CONFIG_MACH_SUN7I && ! CONFIG_MACH_SUN8I_R40 */
static void __secure sunxi_cpu_set_power(int cpu, bool on) static void __secure sunxi_cpu_set_power(int cpu, bool on)
{ {
struct sunxi_prcm_reg *prcm = struct sunxi_prcm_reg *prcm =
@ -213,7 +236,13 @@ int __secure psci_cpu_on(u32 __always_unused unused, u32 mpidr, u32 pc)
psci_save_target_pc(cpu, pc); psci_save_target_pc(cpu, pc);
/* Set secondary core power on PC */ /* Set secondary core power on PC */
#ifdef CONFIG_MACH_SUN8I_R40
/* secondary core entry address is programmed differently */
writel((u32)&psci_cpu_entry,
SUNXI_SRAMC_BASE + SUN8I_R40_SRAMC_SOFT_ENTRY_REG0);
#else
writel((u32)&psci_cpu_entry, &cpucfg->priv0); writel((u32)&psci_cpu_entry, &cpucfg->priv0);
#endif
/* Assert reset on target CPU */ /* Assert reset on target CPU */
writel(0, &cpucfg->cpu[cpu].rst); writel(0, &cpucfg->cpu[cpu].rst);

View file

@ -16,6 +16,8 @@ obj-y += tlb.o
obj-y += transition.o obj-y += transition.o
obj-y += fwcall.o obj-y += fwcall.o
obj-y += cpu-dt.o obj-y += cpu-dt.o
obj-$(CONFIG_ARM_SMCCC) += smccc-call.o
ifndef CONFIG_SPL_BUILD ifndef CONFIG_SPL_BUILD
obj-$(CONFIG_ARMV8_SPIN_TABLE) += spin_table.o spin_table_v8.o obj-$(CONFIG_ARMV8_SPIN_TABLE) += spin_table.o spin_table_v8.o
endif endif

View file

@ -7,25 +7,19 @@
#include <common.h> #include <common.h>
#include <asm/psci.h> #include <asm/psci.h>
#include <asm/system.h> #include <asm/system.h>
#ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
#include <asm/armv8/sec_firmware.h> #include <asm/armv8/sec_firmware.h>
#endif
#ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
int psci_update_dt(void *fdt) int psci_update_dt(void *fdt)
{ {
#ifdef CONFIG_MP
#if defined(CONFIG_ARMV8_PSCI) || defined(CONFIG_SEC_FIRMWARE_ARMV8_PSCI)
#ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
/* /*
* If the PSCI in SEC Firmware didn't work, avoid to update the * If the PSCI in SEC Firmware didn't work, avoid to update the
* device node of PSCI. But still return 0 instead of an error * device node of PSCI. But still return 0 instead of an error
* number to support detecting PSCI dynamically and then switching * number to support detecting PSCI dynamically and then switching
* the SMP boot method between PSCI and spin-table. * the SMP boot method between PSCI and spin-table.
*/ */
if (sec_firmware_support_psci_version() == 0xffffffff) if (sec_firmware_support_psci_version() == PSCI_INVALID_VER)
return 0; return 0;
#endif
fdt_psci(fdt); fdt_psci(fdt);
#if defined(CONFIG_ARMV8_PSCI) && !defined(CONFIG_ARMV8_SECURE_BASE) #if defined(CONFIG_ARMV8_PSCI) && !defined(CONFIG_ARMV8_SECURE_BASE)
@ -34,7 +28,6 @@ int psci_update_dt(void *fdt)
__secure_end - __secure_start); __secure_end - __secure_start);
#endif #endif
#endif
#endif
return 0; return 0;
} }
#endif

View file

@ -36,6 +36,7 @@ config ARCH_LS1046A
select SYS_FSL_DDR_VER_50 select SYS_FSL_DDR_VER_50
select SYS_FSL_ERRATUM_A008336 select SYS_FSL_ERRATUM_A008336
select SYS_FSL_ERRATUM_A008511 select SYS_FSL_ERRATUM_A008511
select SYS_FSL_ERRATUM_A008850
select SYS_FSL_ERRATUM_A009801 select SYS_FSL_ERRATUM_A009801
select SYS_FSL_ERRATUM_A009803 select SYS_FSL_ERRATUM_A009803
select SYS_FSL_ERRATUM_A009942 select SYS_FSL_ERRATUM_A009942
@ -63,6 +64,8 @@ config ARCH_LS2080A
select SYS_FSL_SEC_COMPAT_5 select SYS_FSL_SEC_COMPAT_5
select SYS_FSL_SEC_LE select SYS_FSL_SEC_LE
select SYS_FSL_SRDS_2 select SYS_FSL_SRDS_2
select FSL_TZASC_1
select FSL_TZASC_2
select SYS_FSL_ERRATUM_A008336 select SYS_FSL_ERRATUM_A008336
select SYS_FSL_ERRATUM_A008511 select SYS_FSL_ERRATUM_A008511
select SYS_FSL_ERRATUM_A008514 select SYS_FSL_ERRATUM_A008514
@ -171,6 +174,30 @@ config SYS_LS_PPA_FW_ADDR
QSPI flash, this address is a directly memory-mapped. QSPI flash, this address is a directly memory-mapped.
If it is in a serial accessed flash, such as NAND and SD If it is in a serial accessed flash, such as NAND and SD
card, it is a byte offset. card, it is a byte offset.
config SYS_LS_PPA_ESBC_ADDR
hex "hdr address of PPA firmware loading from"
depends on FSL_LS_PPA && CHAIN_OF_TRUST
default 0x600c0000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1043A
default 0x40740000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1046A
default 0x40480000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1012A
default 0x580c40000 if SYS_LS_PPA_FW_IN_XIP && FSL_LSCH3
default 0x700000 if SYS_LS_PPA_FW_IN_MMC
default 0x700000 if SYS_LS_PPA_FW_IN_NAND
help
If the PPA header firmware locate at XIP flash, such as NOR or
QSPI flash, this address is a directly memory-mapped.
If it is in a serial accessed flash, such as NAND and SD
card, it is a byte offset.
config LS_PPA_ESBC_HDR_SIZE
hex "Length of PPA ESBC header"
depends on FSL_LS_PPA && CHAIN_OF_TRUST && !SYS_LS_PPA_FW_IN_XIP
default 0x2000
help
Length (in bytes) of PPA ESBC header to be copied from MMC/SD or
NAND to memory to validate PPA image.
endmenu endmenu
config SYS_FSL_ERRATUM_A010315 config SYS_FSL_ERRATUM_A010315
@ -223,6 +250,12 @@ config SYS_FSL_SRDS_2
config SYS_HAS_SERDES config SYS_HAS_SERDES
bool bool
config FSL_TZASC_1
bool
config FSL_TZASC_2
bool
endmenu endmenu
menu "Layerscape clock tree configuration" menu "Layerscape clock tree configuration"

View file

@ -22,11 +22,11 @@ obj-$(CONFIG_SYS_HAS_SERDES) += fsl_lsch2_serdes.o
endif endif
endif endif
ifneq ($(CONFIG_LS2080A),) ifneq ($(CONFIG_ARCH_LS2080A),)
obj-$(CONFIG_SYS_HAS_SERDES) += ls2080a_serdes.o obj-$(CONFIG_SYS_HAS_SERDES) += ls2080a_serdes.o
endif endif
ifneq ($(CONFIG_LS1043A),) ifneq ($(CONFIG_ARCH_LS1043A),)
obj-$(CONFIG_SYS_HAS_SERDES) += ls1043a_serdes.o obj-$(CONFIG_SYS_HAS_SERDES) += ls1043a_serdes.o
obj-$(CONFIG_ARMV8_PSCI) += ls1043a_psci.o obj-$(CONFIG_ARMV8_PSCI) += ls1043a_psci.o
endif endif

View file

@ -15,18 +15,14 @@
#include <asm/arch/soc.h> #include <asm/arch/soc.h>
#include <asm/arch/cpu.h> #include <asm/arch/cpu.h>
#include <asm/arch/speed.h> #include <asm/arch/speed.h>
#ifdef CONFIG_MP
#include <asm/arch/mp.h> #include <asm/arch/mp.h>
#endif
#include <efi_loader.h> #include <efi_loader.h>
#include <fm_eth.h> #include <fm_eth.h>
#include <fsl-mc/fsl_mc.h> #include <fsl-mc/fsl_mc.h>
#ifdef CONFIG_FSL_ESDHC #ifdef CONFIG_FSL_ESDHC
#include <fsl_esdhc.h> #include <fsl_esdhc.h>
#endif #endif
#ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
#include <asm/armv8/sec_firmware.h> #include <asm/armv8/sec_firmware.h>
#endif
#ifdef CONFIG_SYS_FSL_DDR #ifdef CONFIG_SYS_FSL_DDR
#include <fsl_ddr.h> #include <fsl_ddr.h>
#endif #endif
@ -92,7 +88,7 @@ static inline void early_mmu_setup(void)
static void fix_pcie_mmu_map(void) static void fix_pcie_mmu_map(void)
{ {
#ifdef CONFIG_LS2080A #ifdef CONFIG_ARCH_LS2080A
unsigned int i; unsigned int i;
u32 svr, ver; u32 svr, ver;
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR); struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
@ -475,13 +471,19 @@ int cpu_eth_init(bd_t *bis)
return error; return error;
} }
static inline int check_psci(void)
{
unsigned int psci_ver;
psci_ver = sec_firmware_support_psci_version();
if (psci_ver == PSCI_INVALID_VER)
return 1;
return 0;
}
int arch_early_init_r(void) int arch_early_init_r(void)
{ {
#ifdef CONFIG_MP
int rv = 1;
u32 psci_ver = 0xffffffff;
#endif
#ifdef CONFIG_SYS_FSL_ERRATUM_A009635 #ifdef CONFIG_SYS_FSL_ERRATUM_A009635
u32 svr_dev_id; u32 svr_dev_id;
/* /*
@ -495,18 +497,13 @@ int arch_early_init_r(void)
#if defined(CONFIG_SYS_FSL_ERRATUM_A009942) && defined(CONFIG_SYS_FSL_DDR) #if defined(CONFIG_SYS_FSL_ERRATUM_A009942) && defined(CONFIG_SYS_FSL_DDR)
erratum_a009942_check_cpo(); erratum_a009942_check_cpo();
#endif #endif
#ifdef CONFIG_MP if (check_psci()) {
#if defined(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) && \ debug("PSCI: PSCI does not exist.\n");
defined(CONFIG_SEC_FIRMWARE_ARMV8_PSCI)
/* Check the psci version to determine if the psci is supported */ /* if PSCI does not exist, boot secondary cores here */
psci_ver = sec_firmware_support_psci_version(); if (fsl_layerscape_wake_seconday_cores())
#endif
if (psci_ver == 0xffffffff) {
rv = fsl_layerscape_wake_seconday_cores();
if (rv)
printf("Did not wake secondary cores\n"); printf("Did not wake secondary cores\n");
} }
#endif
#ifdef CONFIG_SYS_HAS_SERDES #ifdef CONFIG_SYS_HAS_SERDES
fsl_serdes_init(); fsl_serdes_init();
@ -523,7 +520,7 @@ int timer_init(void)
#ifdef CONFIG_FSL_LSCH3 #ifdef CONFIG_FSL_LSCH3
u32 __iomem *cltbenr = (u32 *)CONFIG_SYS_FSL_PMU_CLTBENR; u32 __iomem *cltbenr = (u32 *)CONFIG_SYS_FSL_PMU_CLTBENR;
#endif #endif
#ifdef CONFIG_LS2080A #ifdef CONFIG_ARCH_LS2080A
u32 __iomem *pctbenr = (u32 *)FSL_PMU_PCTBENR_OFFSET; u32 __iomem *pctbenr = (u32 *)FSL_PMU_PCTBENR_OFFSET;
u32 svr_dev_id; u32 svr_dev_id;
#endif #endif
@ -541,7 +538,7 @@ int timer_init(void)
out_le32(cltbenr, 0xf); out_le32(cltbenr, 0xf);
#endif #endif
#ifdef CONFIG_LS2080A #ifdef CONFIG_ARCH_LS2080A
/* /*
* In certain Layerscape SoCs, the clock for each core's * In certain Layerscape SoCs, the clock for each core's
* has an enable bit in the PMU Physical Core Time Base Enable * has an enable bit in the PMU Physical Core Time Base Enable

View file

@ -373,8 +373,8 @@ void ft_cpu_setup(void *blob, bd_t *bd)
"clock-frequency", CONFIG_SYS_NS16550_CLK, 1); "clock-frequency", CONFIG_SYS_NS16550_CLK, 1);
#endif #endif
do_fixup_by_compat_u32(blob, "fixed-clock", do_fixup_by_path_u32(blob, "/sysclk", "clock-frequency",
"clock-frequency", CONFIG_SYS_CLK_FREQ, 1); CONFIG_SYS_CLK_FREQ, 1);
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
ft_pci_setup(blob, bd); ft_pci_setup(blob, bd);

View file

@ -76,7 +76,7 @@ ENTRY(lowlevel_init)
#ifdef CONFIG_FSL_LSCH3 #ifdef CONFIG_FSL_LSCH3
/* Set Wuo bit for RN-I 20 */ /* Set Wuo bit for RN-I 20 */
#ifdef CONFIG_LS2080A #ifdef CONFIG_ARCH_LS2080A
ldr x0, =CCI_AUX_CONTROL_BASE(20) ldr x0, =CCI_AUX_CONTROL_BASE(20)
ldr x1, =0x00000010 ldr x1, =0x00000010
bl ccn504_set_aux bl ccn504_set_aux
@ -229,38 +229,40 @@ ENTRY(lowlevel_init)
* NOTE: As per the CCSR map doc, TZASC 3 and TZASC 4 are just * NOTE: As per the CCSR map doc, TZASC 3 and TZASC 4 are just
* placeholders. * placeholders.
*/ */
#ifdef CONFIG_FSL_TZASC_1
ldr x1, =TZASC_GATE_KEEPER(0) ldr x1, =TZASC_GATE_KEEPER(0)
ldr w0, [x1] /* Filter 0 Gate Keeper Register */ ldr w0, [x1] /* Filter 0 Gate Keeper Register */
orr w0, w0, #1 << 0 /* Set open_request for Filter 0 */ orr w0, w0, #1 << 0 /* Set open_request for Filter 0 */
str w0, [x1] str w0, [x1]
ldr x1, =TZASC_GATE_KEEPER(1)
ldr w0, [x1] /* Filter 0 Gate Keeper Register */
orr w0, w0, #1 << 0 /* Set open_request for Filter 0 */
str w0, [x1]
ldr x1, =TZASC_REGION_ATTRIBUTES_0(0) ldr x1, =TZASC_REGION_ATTRIBUTES_0(0)
ldr w0, [x1] /* Region-0 Attributes Register */ ldr w0, [x1] /* Region-0 Attributes Register */
orr w0, w0, #1 << 31 /* Set Sec global write en, Bit[31] */ orr w0, w0, #1 << 31 /* Set Sec global write en, Bit[31] */
orr w0, w0, #1 << 30 /* Set Sec global read en, Bit[30] */ orr w0, w0, #1 << 30 /* Set Sec global read en, Bit[30] */
str w0, [x1] str w0, [x1]
ldr x1, =TZASC_REGION_ID_ACCESS_0(0)
ldr w0, [x1] /* Region-0 Access Register */
mov w0, #0xFFFFFFFF /* Set nsaid_wr_en and nsaid_rd_en */
str w0, [x1]
#endif
#ifdef CONFIG_FSL_TZASC_2
ldr x1, =TZASC_GATE_KEEPER(1)
ldr w0, [x1] /* Filter 0 Gate Keeper Register */
orr w0, w0, #1 << 0 /* Set open_request for Filter 0 */
str w0, [x1]
ldr x1, =TZASC_REGION_ATTRIBUTES_0(1) ldr x1, =TZASC_REGION_ATTRIBUTES_0(1)
ldr w0, [x1] /* Region-1 Attributes Register */ ldr w0, [x1] /* Region-1 Attributes Register */
orr w0, w0, #1 << 31 /* Set Sec global write en, Bit[31] */ orr w0, w0, #1 << 31 /* Set Sec global write en, Bit[31] */
orr w0, w0, #1 << 30 /* Set Sec global read en, Bit[30] */ orr w0, w0, #1 << 30 /* Set Sec global read en, Bit[30] */
str w0, [x1] str w0, [x1]
ldr x1, =TZASC_REGION_ID_ACCESS_0(0)
ldr w0, [x1] /* Region-0 Access Register */
mov w0, #0xFFFFFFFF /* Set nsaid_wr_en and nsaid_rd_en */
str w0, [x1]
ldr x1, =TZASC_REGION_ID_ACCESS_0(1) ldr x1, =TZASC_REGION_ID_ACCESS_0(1)
ldr w0, [x1] /* Region-1 Attributes Register */ ldr w0, [x1] /* Region-1 Attributes Register */
mov w0, #0xFFFFFFFF /* Set nsaid_wr_en and nsaid_rd_en */ mov w0, #0xFFFFFFFF /* Set nsaid_wr_en and nsaid_rd_en */
str w0, [x1] str w0, [x1]
#endif
isb isb
dsb sy dsb sy
#endif #endif

View file

@ -70,6 +70,7 @@ static struct serdes_config serdes2_cfg_tbl[] = {
SATA2 } }, SATA2 } },
{0x4A, {SGMII9, SGMII10, SGMII11, SGMII12, PCIE4, PCIE4, SATA1, {0x4A, {SGMII9, SGMII10, SGMII11, SGMII12, PCIE4, PCIE4, SATA1,
SATA2 } }, SATA2 } },
{0x51, {PCIE3, PCIE3, PCIE3, PCIE3, PCIE4, PCIE4, PCIE4, PCIE4 } },
{0x57, {PCIE3, PCIE3, PCIE3, PCIE3, PCIE4, PCIE4, SGMII15, SGMII16 } }, {0x57, {PCIE3, PCIE3, PCIE3, PCIE3, PCIE4, PCIE4, SGMII15, SGMII16 } },
{} {}
}; };

View file

@ -37,13 +37,20 @@ int ppa_init(void)
int ret; int ret;
#ifdef CONFIG_CHAIN_OF_TRUST #ifdef CONFIG_CHAIN_OF_TRUST
uintptr_t ppa_esbc_hdr = CONFIG_SYS_LS_PPA_ESBC_ADDR; uintptr_t ppa_esbc_hdr = 0;
uintptr_t ppa_img_addr = 0; uintptr_t ppa_img_addr = 0;
#if defined(CONFIG_SYS_LS_PPA_FW_IN_MMC) || \
defined(CONFIG_SYS_LS_PPA_FW_IN_NAND)
void *ppa_hdr_ddr;
#endif
#endif #endif
#ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP #ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP
ppa_fit_addr = (void *)CONFIG_SYS_LS_PPA_FW_ADDR; ppa_fit_addr = (void *)CONFIG_SYS_LS_PPA_FW_ADDR;
debug("%s: PPA image load from XIP\n", __func__); debug("%s: PPA image load from XIP\n", __func__);
#ifdef CONFIG_CHAIN_OF_TRUST
ppa_esbc_hdr = CONFIG_SYS_LS_PPA_ESBC_ADDR;
#endif
#else /* !CONFIG_SYS_LS_PPA_FW_IN_XIP */ #else /* !CONFIG_SYS_LS_PPA_FW_IN_XIP */
size_t fw_length, fdt_header_len = sizeof(struct fdt_header); size_t fw_length, fdt_header_len = sizeof(struct fdt_header);
@ -53,7 +60,7 @@ int ppa_init(void)
int dev = CONFIG_SYS_MMC_ENV_DEV; int dev = CONFIG_SYS_MMC_ENV_DEV;
struct fdt_header *fitp; struct fdt_header *fitp;
u32 cnt; u32 cnt;
u32 blk = CONFIG_SYS_LS_PPA_FW_ADDR / 512; u32 blk;
debug("%s: PPA image load from eMMC/SD\n", __func__); debug("%s: PPA image load from eMMC/SD\n", __func__);
@ -81,6 +88,7 @@ int ppa_init(void)
return -ENOMEM; return -ENOMEM;
} }
blk = CONFIG_SYS_LS_PPA_FW_ADDR / 512;
cnt = DIV_ROUND_UP(fdt_header_len, 512); cnt = DIV_ROUND_UP(fdt_header_len, 512);
debug("%s: MMC read PPA FIT header: dev # %u, block # %u, count %u\n", debug("%s: MMC read PPA FIT header: dev # %u, block # %u, count %u\n",
__func__, dev, blk, cnt); __func__, dev, blk, cnt);
@ -102,6 +110,29 @@ int ppa_init(void)
return ret; return ret;
} }
#ifdef CONFIG_CHAIN_OF_TRUST
ppa_hdr_ddr = malloc(CONFIG_LS_PPA_ESBC_HDR_SIZE);
if (!ppa_hdr_ddr) {
printf("PPA: malloc failed for PPA header\n");
return -ENOMEM;
}
blk = CONFIG_SYS_LS_PPA_ESBC_ADDR >> 9;
cnt = DIV_ROUND_UP(CONFIG_LS_PPA_ESBC_HDR_SIZE, 512);
ret = mmc->block_dev.block_read(&mmc->block_dev, blk, cnt, ppa_hdr_ddr);
if (ret != cnt) {
free(ppa_hdr_ddr);
printf("MMC/SD read of PPA header failed\n");
return -EIO;
}
debug("Read PPA header to 0x%p\n", ppa_hdr_ddr);
/* flush cache after read */
flush_cache((ulong)ppa_hdr_ddr, cnt * 512);
ppa_esbc_hdr = (uintptr_t)ppa_hdr_ddr;
#endif
fw_length = fdt_totalsize(fitp); fw_length = fdt_totalsize(fitp);
free(fitp); free(fitp);
@ -113,6 +144,7 @@ int ppa_init(void)
return -ENOMEM; return -ENOMEM;
} }
blk = CONFIG_SYS_LS_PPA_FW_ADDR / 512;
cnt = DIV_ROUND_UP(fw_length, 512); cnt = DIV_ROUND_UP(fw_length, 512);
debug("%s: MMC read PPA FIT image: dev # %u, block # %u, count %u\n", debug("%s: MMC read PPA FIT image: dev # %u, block # %u, count %u\n",
__func__, dev, blk, cnt); __func__, dev, blk, cnt);
@ -148,6 +180,31 @@ int ppa_init(void)
return ret; return ret;
} }
#ifdef CONFIG_CHAIN_OF_TRUST
ppa_hdr_ddr = malloc(CONFIG_LS_PPA_ESBC_HDR_SIZE);
if (!ppa_hdr_ddr) {
printf("PPA: malloc failed for PPA header\n");
return -ENOMEM;
}
fw_length = CONFIG_LS_PPA_ESBC_HDR_SIZE;
ret = nand_read(nand_info[0], (loff_t)CONFIG_SYS_LS_PPA_ESBC_ADDR,
&fw_length, (u_char *)ppa_hdr_ddr);
if (ret == -EUCLEAN) {
free(ppa_hdr_ddr);
printf("NAND read of PPA firmware at offset 0x%x failed\n",
CONFIG_SYS_LS_PPA_FW_ADDR);
return -EIO;
}
debug("Read PPA header to 0x%p\n", ppa_hdr_ddr);
/* flush cache after read */
flush_cache((ulong)ppa_hdr_ddr, fw_length);
ppa_esbc_hdr = (uintptr_t)ppa_hdr_ddr;
#endif
fw_length = fdt_totalsize(&fit); fw_length = fdt_totalsize(&fit);
ppa_fit_addr = malloc(fw_length); ppa_fit_addr = malloc(fw_length);
@ -177,14 +234,25 @@ int ppa_init(void)
#ifdef CONFIG_CHAIN_OF_TRUST #ifdef CONFIG_CHAIN_OF_TRUST
ppa_img_addr = (uintptr_t)ppa_fit_addr; ppa_img_addr = (uintptr_t)ppa_fit_addr;
if (fsl_check_boot_mode_secure() != 0) { if (fsl_check_boot_mode_secure() != 0) {
/*
* In case of failure in validation, fsl_secboot_validate
* would not return back in case of Production environment
* with ITS=1. In Development environment (ITS=0 and
* SB_EN=1), the function may return back in case of
* non-fatal failures.
*/
ret = fsl_secboot_validate(ppa_esbc_hdr, ret = fsl_secboot_validate(ppa_esbc_hdr,
CONFIG_PPA_KEY_HASH, PPA_KEY_HASH,
&ppa_img_addr); &ppa_img_addr);
if (ret != 0) if (ret != 0)
printf("PPA validation failed\n"); printf("PPA validation failed\n");
else else
printf("PPA validation Successful\n"); printf("PPA validation Successful\n");
} }
#if defined(CONFIG_SYS_LS_PPA_FW_IN_MMC) || \
defined(CONFIG_SYS_LS_PPA_FW_IN_NAND)
free(ppa_hdr_ddr);
#endif
#endif #endif
#ifdef CONFIG_FSL_LSCH3 #ifdef CONFIG_FSL_LSCH3

View file

@ -41,13 +41,31 @@ u32 spl_boot_mode(const u32 boot_device)
} }
#ifdef CONFIG_SPL_BUILD #ifdef CONFIG_SPL_BUILD
void spl_board_init(void)
{
#if defined(CONFIG_SECURE_BOOT) && defined(CONFIG_FSL_LSCH2)
/*
* In case of Secure Boot, the IBR configures the SMMU
* to allow only Secure transactions.
* SMMU must be reset in bypass mode.
* Set the ClientPD bit and Clear the USFCFG Bit
*/
u32 val;
val = (in_le32(SMMU_SCR0) | SCR0_CLIENTPD_MASK) & ~(SCR0_USFCFG_MASK);
out_le32(SMMU_SCR0, val);
val = (in_le32(SMMU_NSCR0) | SCR0_CLIENTPD_MASK) & ~(SCR0_USFCFG_MASK);
out_le32(SMMU_NSCR0, val);
#endif
}
void board_init_f(ulong dummy) void board_init_f(ulong dummy)
{ {
/* Clear global data */ /* Clear global data */
memset((void *)gd, 0, sizeof(gd_t)); memset((void *)gd, 0, sizeof(gd_t));
board_early_init_f(); board_early_init_f();
timer_init(); timer_init();
#ifdef CONFIG_LS2080A #ifdef CONFIG_ARCH_LS2080A
env_init(); env_init();
#endif #endif
get_clocks(); get_clocks();

View file

@ -227,7 +227,7 @@ unsigned int sec_firmware_support_psci_version(void)
if (sec_firmware_addr & SEC_FIRMWARE_RUNNING) if (sec_firmware_addr & SEC_FIRMWARE_RUNNING)
return _sec_firmware_support_psci_version(); return _sec_firmware_support_psci_version();
return 0xffffffff; return PSCI_INVALID_VER;
} }
#endif #endif

View file

@ -0,0 +1,44 @@
/*
* Copyright (c) 2015, Linaro Limited
*
* SPDX-License-Identifier: GPL-2.0
*/
#include <linux/linkage.h>
#include <linux/arm-smccc.h>
#include <generated/asm-offsets.h>
.macro SMCCC instr
.cfi_startproc
\instr #0
ldr x4, [sp]
stp x0, x1, [x4, #ARM_SMCCC_RES_X0_OFFS]
stp x2, x3, [x4, #ARM_SMCCC_RES_X2_OFFS]
ldr x4, [sp, #8]
cbz x4, 1f /* no quirk structure */
ldr x9, [x4, #ARM_SMCCC_QUIRK_ID_OFFS]
cmp x9, #ARM_SMCCC_QUIRK_QCOM_A6
b.ne 1f
str x6, [x4, ARM_SMCCC_QUIRK_STATE_OFFS]
1: ret
.cfi_endproc
.endm
/*
* void arm_smccc_smc(unsigned long a0, unsigned long a1, unsigned long a2,
* unsigned long a3, unsigned long a4, unsigned long a5,
* unsigned long a6, unsigned long a7, struct arm_smccc_res *res,
* struct arm_smccc_quirk *quirk)
*/
ENTRY(__arm_smccc_smc)
SMCCC smc
ENDPROC(__arm_smccc_smc)
/*
* void arm_smccc_hvc(unsigned long a0, unsigned long a1, unsigned long a2,
* unsigned long a3, unsigned long a4, unsigned long a5,
* unsigned long a6, unsigned long a7, struct arm_smccc_res *res,
* struct arm_smccc_quirk *quirk)
*/
ENTRY(__arm_smccc_hvc)
SMCCC hvc
ENDPROC(__arm_smccc_hvc)

View file

@ -29,12 +29,12 @@ dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \
dtb-$(CONFIG_EXYNOS7420) += exynos7420-espresso7420.dtb dtb-$(CONFIG_EXYNOS7420) += exynos7420-espresso7420.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += \ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
rk3036-sdk.dtb \ rk3036-sdk.dtb \
rk3188-radxarock.dtb \
rk3288-evb.dtb \ rk3288-evb.dtb \
rk3288-fennec.dtb \ rk3288-fennec.dtb \
rk3288-firefly.dtb \ rk3288-firefly.dtb \
rk3288-miqi.dtb \ rk3288-miqi.dtb \
rk3288-popmetal.dtb \ rk3288-popmetal.dtb \
rk3188-radxarock.dtb \
rk3288-rock2-square.dtb \ rk3288-rock2-square.dtb \
rk3288-tinker.dtb \ rk3288-tinker.dtb \
rk3288-veyron-jerry.dtb \ rk3288-veyron-jerry.dtb \
@ -153,6 +153,7 @@ dtb-$(CONFIG_ARCH_SOCFPGA) += \
socfpga_cyclone5_socdk.dtb \ socfpga_cyclone5_socdk.dtb \
socfpga_cyclone5_de0_nano_soc.dtb \ socfpga_cyclone5_de0_nano_soc.dtb \
socfpga_cyclone5_de1_soc.dtb \ socfpga_cyclone5_de1_soc.dtb \
socfpga_cyclone5_de10_nano.dtb \
socfpga_cyclone5_sockit.dtb \ socfpga_cyclone5_sockit.dtb \
socfpga_cyclone5_socrates.dtb \ socfpga_cyclone5_socrates.dtb \
socfpga_cyclone5_sr1500.dtb \ socfpga_cyclone5_sr1500.dtb \
@ -166,7 +167,7 @@ dtb-$(CONFIG_TARGET_AM57XX_EVM) += am57xx-beagle-x15.dtb \
am571x-idk.dtb am571x-idk.dtb
dtb-$(CONFIG_TARGET_STV0991) += stv0991.dtb dtb-$(CONFIG_TARGET_STV0991) += stv0991.dtb
dtb-$(CONFIG_LS102XA) += ls1021a-qds-duart.dtb \ dtb-$(CONFIG_ARCH_LS1021A) += ls1021a-qds-duart.dtb \
ls1021a-qds-lpuart.dtb \ ls1021a-qds-lpuart.dtb \
ls1021a-twr-duart.dtb ls1021a-twr-lpuart.dtb \ ls1021a-twr-duart.dtb ls1021a-twr-lpuart.dtb \
ls1021a-iot-duart.dtb ls1021a-iot-duart.dtb
@ -184,7 +185,8 @@ dtb-$(CONFIG_FSL_LSCH2) += fsl-ls1043a-qds-duart.dtb \
dtb-$(CONFIG_ARCH_SNAPDRAGON) += dragonboard410c.dtb dtb-$(CONFIG_ARCH_SNAPDRAGON) += dragonboard410c.dtb
dtb-$(CONFIG_STM32F7) += stm32f746-disco.dtb dtb-$(CONFIG_STM32F7) += stm32f746-disco.dtb \
stm32f769-disco.dtb
dtb-$(CONFIG_MACH_SUN4I) += \ dtb-$(CONFIG_MACH_SUN4I) += \
sun4i-a10-a1000.dtb \ sun4i-a10-a1000.dtb \
@ -304,6 +306,10 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \
sun8i-h3-orangepi-plus2e.dtb \ sun8i-h3-orangepi-plus2e.dtb \
sun8i-h3-nanopi-neo.dtb \ sun8i-h3-nanopi-neo.dtb \
sun8i-h3-nanopi-neo-air.dtb sun8i-h3-nanopi-neo-air.dtb
dtb-$(CONFIG_MACH_SUN8I_R40) += \
sun8i-r40-bananapi-m2-ultra.dtb
dtb-$(CONFIG_MACH_SUN8I_V3S) += \
sun8i-v3s-licheepi-zero.dtb
dtb-$(CONFIG_MACH_SUN50I_H5) += \ dtb-$(CONFIG_MACH_SUN50I_H5) += \
sun50i-h5-orangepi-pc2.dtb sun50i-h5-orangepi-pc2.dtb
dtb-$(CONFIG_MACH_SUN50I) += \ dtb-$(CONFIG_MACH_SUN50I) += \

View file

@ -21,3 +21,18 @@
&sdrammc { &sdrammc {
clock-frequency = <400000000>; clock-frequency = <400000000>;
}; };
&wdt1 {
u-boot,dm-pre-reloc;
status = "okay";
};
&wdt2 {
u-boot,dm-pre-reloc;
status = "okay";
};
&wdt3 {
u-boot,dm-pre-reloc;
status = "okay";
};

View file

@ -1,4 +1,5 @@
#include <dt-bindings/clock/ast2500-scu.h> #include <dt-bindings/clock/ast2500-scu.h>
#include <dt-bindings/reset/ast2500-reset.h>
#include "ast2500.dtsi" #include "ast2500.dtsi"
@ -11,12 +12,21 @@
#reset-cells = <1>; #reset-cells = <1>;
}; };
rst: reset-controller {
u-boot,dm-pre-reloc;
compatible = "aspeed,ast2500-reset";
aspeed,wdt = <&wdt1>;
#reset-cells = <1>;
};
sdrammc: sdrammc@1e6e0000 { sdrammc: sdrammc@1e6e0000 {
u-boot,dm-pre-reloc; u-boot,dm-pre-reloc;
compatible = "aspeed,ast2500-sdrammc"; compatible = "aspeed,ast2500-sdrammc";
reg = <0x1e6e0000 0x174 reg = <0x1e6e0000 0x174
0x1e6e0200 0x1d4 >; 0x1e6e0200 0x1d4 >;
#reset-cells = <1>;
clocks = <&scu PLL_MPLL>; clocks = <&scu PLL_MPLL>;
resets = <&rst AST_RESET_SDRAM>;
}; };
ahb { ahb {
@ -24,30 +34,39 @@
apb { apb {
u-boot,dm-pre-reloc; u-boot,dm-pre-reloc;
timer: timer@1e782000 {
u-boot,dm-pre-reloc;
};
uart1: serial@1e783000 {
clocks = <&scu PCLK_UART1>;
};
uart2: serial@1e78d000 {
clocks = <&scu PCLK_UART2>;
};
uart3: serial@1e78e000 {
clocks = <&scu PCLK_UART3>;
};
uart4: serial@1e78f000 {
clocks = <&scu PCLK_UART4>;
};
uart5: serial@1e784000 {
clocks = <&scu PCLK_UART5>;
};
}; };
}; };
}; };
&uart1 {
clocks = <&scu PCLK_UART1>;
};
&uart2 {
clocks = <&scu PCLK_UART2>;
};
&uart3 {
clocks = <&scu PCLK_UART3>;
};
&uart4 {
clocks = <&scu PCLK_UART4>;
};
&uart5 {
clocks = <&scu PCLK_UART5>;
};
&timer {
u-boot,dm-pre-reloc;
};
&mac0 {
clocks = <&scu PCLK_MAC1>, <&scu PLL_D2PLL>;
};
&mac1 {
clocks = <&scu PCLK_MAC2>, <&scu PLL_D2PLL>;
};

View file

@ -1,6 +1,6 @@
/* /*
* This device tree is copied from * This device tree is copied from
* https://raw.githubusercontent.com/torvalds/linux/02440622/arch/arm/boot/dts/ * https://raw.githubusercontent.com/torvalds/linux/34ea5c9d/arch/arm/boot/dts/aspeed-g5.dtsi
*/ */
#include "skeleton.dtsi" #include "skeleton.dtsi"
@ -36,6 +36,22 @@
reg = <0x1e6c0080 0x80>; reg = <0x1e6c0080 0x80>;
}; };
mac0: ethernet@1e660000 {
compatible = "faraday,ftgmac100";
reg = <0x1e660000 0x180>;
interrupts = <2>;
no-hw-checksum;
status = "disabled";
};
mac1: ethernet@1e680000 {
compatible = "faraday,ftgmac100";
reg = <0x1e680000 0x180>;
interrupts = <3>;
no-hw-checksum;
status = "disabled";
};
apb { apb {
compatible = "simple-bus"; compatible = "simple-bus";
#address-cells = <1>; #address-cells = <1>;
@ -48,6 +64,822 @@
reg = <0x1e6e2070 0x04>; reg = <0x1e6e2070 0x04>;
}; };
syscon: syscon@1e6e2000 {
compatible = "aspeed,g5-scu", "syscon", "simple-mfd";
reg = <0x1e6e2000 0x1a8>;
pinctrl: pinctrl {
compatible = "aspeed,g5-pinctrl";
aspeed,external-nodes = <&gfx &lhc>;
pinctrl_acpi_default: acpi_default {
function = "ACPI";
groups = "ACPI";
};
pinctrl_adc0_default: adc0_default {
function = "ADC0";
groups = "ADC0";
};
pinctrl_adc1_default: adc1_default {
function = "ADC1";
groups = "ADC1";
};
pinctrl_adc10_default: adc10_default {
function = "ADC10";
groups = "ADC10";
};
pinctrl_adc11_default: adc11_default {
function = "ADC11";
groups = "ADC11";
};
pinctrl_adc12_default: adc12_default {
function = "ADC12";
groups = "ADC12";
};
pinctrl_adc13_default: adc13_default {
function = "ADC13";
groups = "ADC13";
};
pinctrl_adc14_default: adc14_default {
function = "ADC14";
groups = "ADC14";
};
pinctrl_adc15_default: adc15_default {
function = "ADC15";
groups = "ADC15";
};
pinctrl_adc2_default: adc2_default {
function = "ADC2";
groups = "ADC2";
};
pinctrl_adc3_default: adc3_default {
function = "ADC3";
groups = "ADC3";
};
pinctrl_adc4_default: adc4_default {
function = "ADC4";
groups = "ADC4";
};
pinctrl_adc5_default: adc5_default {
function = "ADC5";
groups = "ADC5";
};
pinctrl_adc6_default: adc6_default {
function = "ADC6";
groups = "ADC6";
};
pinctrl_adc7_default: adc7_default {
function = "ADC7";
groups = "ADC7";
};
pinctrl_adc8_default: adc8_default {
function = "ADC8";
groups = "ADC8";
};
pinctrl_adc9_default: adc9_default {
function = "ADC9";
groups = "ADC9";
};
pinctrl_bmcint_default: bmcint_default {
function = "BMCINT";
groups = "BMCINT";
};
pinctrl_ddcclk_default: ddcclk_default {
function = "DDCCLK";
groups = "DDCCLK";
};
pinctrl_ddcdat_default: ddcdat_default {
function = "DDCDAT";
groups = "DDCDAT";
};
pinctrl_espi_default: espi_default {
function = "ESPI";
groups = "ESPI";
};
pinctrl_fwspics1_default: fwspics1_default {
function = "FWSPICS1";
groups = "FWSPICS1";
};
pinctrl_fwspics2_default: fwspics2_default {
function = "FWSPICS2";
groups = "FWSPICS2";
};
pinctrl_gpid0_default: gpid0_default {
function = "GPID0";
groups = "GPID0";
};
pinctrl_gpid2_default: gpid2_default {
function = "GPID2";
groups = "GPID2";
};
pinctrl_gpid4_default: gpid4_default {
function = "GPID4";
groups = "GPID4";
};
pinctrl_gpid6_default: gpid6_default {
function = "GPID6";
groups = "GPID6";
};
pinctrl_gpie0_default: gpie0_default {
function = "GPIE0";
groups = "GPIE0";
};
pinctrl_gpie2_default: gpie2_default {
function = "GPIE2";
groups = "GPIE2";
};
pinctrl_gpie4_default: gpie4_default {
function = "GPIE4";
groups = "GPIE4";
};
pinctrl_gpie6_default: gpie6_default {
function = "GPIE6";
groups = "GPIE6";
};
pinctrl_i2c10_default: i2c10_default {
function = "I2C10";
groups = "I2C10";
};
pinctrl_i2c11_default: i2c11_default {
function = "I2C11";
groups = "I2C11";
};
pinctrl_i2c12_default: i2c12_default {
function = "I2C12";
groups = "I2C12";
};
pinctrl_i2c13_default: i2c13_default {
function = "I2C13";
groups = "I2C13";
};
pinctrl_i2c14_default: i2c14_default {
function = "I2C14";
groups = "I2C14";
};
pinctrl_i2c3_default: i2c3_default {
function = "I2C3";
groups = "I2C3";
};
pinctrl_i2c4_default: i2c4_default {
function = "I2C4";
groups = "I2C4";
};
pinctrl_i2c5_default: i2c5_default {
function = "I2C5";
groups = "I2C5";
};
pinctrl_i2c6_default: i2c6_default {
function = "I2C6";
groups = "I2C6";
};
pinctrl_i2c7_default: i2c7_default {
function = "I2C7";
groups = "I2C7";
};
pinctrl_i2c8_default: i2c8_default {
function = "I2C8";
groups = "I2C8";
};
pinctrl_i2c9_default: i2c9_default {
function = "I2C9";
groups = "I2C9";
};
pinctrl_lad0_default: lad0_default {
function = "LAD0";
groups = "LAD0";
};
pinctrl_lad1_default: lad1_default {
function = "LAD1";
groups = "LAD1";
};
pinctrl_lad2_default: lad2_default {
function = "LAD2";
groups = "LAD2";
};
pinctrl_lad3_default: lad3_default {
function = "LAD3";
groups = "LAD3";
};
pinctrl_lclk_default: lclk_default {
function = "LCLK";
groups = "LCLK";
};
pinctrl_lframe_default: lframe_default {
function = "LFRAME";
groups = "LFRAME";
};
pinctrl_lpchc_default: lpchc_default {
function = "LPCHC";
groups = "LPCHC";
};
pinctrl_lpcpd_default: lpcpd_default {
function = "LPCPD";
groups = "LPCPD";
};
pinctrl_lpcplus_default: lpcplus_default {
function = "LPCPLUS";
groups = "LPCPLUS";
};
pinctrl_lpcpme_default: lpcpme_default {
function = "LPCPME";
groups = "LPCPME";
};
pinctrl_lpcrst_default: lpcrst_default {
function = "LPCRST";
groups = "LPCRST";
};
pinctrl_lpcsmi_default: lpcsmi_default {
function = "LPCSMI";
groups = "LPCSMI";
};
pinctrl_lsirq_default: lsirq_default {
function = "LSIRQ";
groups = "LSIRQ";
};
pinctrl_mac1link_default: mac1link_default {
function = "MAC1LINK";
groups = "MAC1LINK";
};
pinctrl_mac2link_default: mac2link_default {
function = "MAC2LINK";
groups = "MAC2LINK";
};
pinctrl_mdio1_default: mdio1_default {
function = "MDIO1";
groups = "MDIO1";
};
pinctrl_mdio2_default: mdio2_default {
function = "MDIO2";
groups = "MDIO2";
};
pinctrl_ncts1_default: ncts1_default {
function = "NCTS1";
groups = "NCTS1";
};
pinctrl_ncts2_default: ncts2_default {
function = "NCTS2";
groups = "NCTS2";
};
pinctrl_ncts3_default: ncts3_default {
function = "NCTS3";
groups = "NCTS3";
};
pinctrl_ncts4_default: ncts4_default {
function = "NCTS4";
groups = "NCTS4";
};
pinctrl_ndcd1_default: ndcd1_default {
function = "NDCD1";
groups = "NDCD1";
};
pinctrl_ndcd2_default: ndcd2_default {
function = "NDCD2";
groups = "NDCD2";
};
pinctrl_ndcd3_default: ndcd3_default {
function = "NDCD3";
groups = "NDCD3";
};
pinctrl_ndcd4_default: ndcd4_default {
function = "NDCD4";
groups = "NDCD4";
};
pinctrl_ndsr1_default: ndsr1_default {
function = "NDSR1";
groups = "NDSR1";
};
pinctrl_ndsr2_default: ndsr2_default {
function = "NDSR2";
groups = "NDSR2";
};
pinctrl_ndsr3_default: ndsr3_default {
function = "NDSR3";
groups = "NDSR3";
};
pinctrl_ndsr4_default: ndsr4_default {
function = "NDSR4";
groups = "NDSR4";
};
pinctrl_ndtr1_default: ndtr1_default {
function = "NDTR1";
groups = "NDTR1";
};
pinctrl_ndtr2_default: ndtr2_default {
function = "NDTR2";
groups = "NDTR2";
};
pinctrl_ndtr3_default: ndtr3_default {
function = "NDTR3";
groups = "NDTR3";
};
pinctrl_ndtr4_default: ndtr4_default {
function = "NDTR4";
groups = "NDTR4";
};
pinctrl_nri1_default: nri1_default {
function = "NRI1";
groups = "NRI1";
};
pinctrl_nri2_default: nri2_default {
function = "NRI2";
groups = "NRI2";
};
pinctrl_nri3_default: nri3_default {
function = "NRI3";
groups = "NRI3";
};
pinctrl_nri4_default: nri4_default {
function = "NRI4";
groups = "NRI4";
};
pinctrl_nrts1_default: nrts1_default {
function = "NRTS1";
groups = "NRTS1";
};
pinctrl_nrts2_default: nrts2_default {
function = "NRTS2";
groups = "NRTS2";
};
pinctrl_nrts3_default: nrts3_default {
function = "NRTS3";
groups = "NRTS3";
};
pinctrl_nrts4_default: nrts4_default {
function = "NRTS4";
groups = "NRTS4";
};
pinctrl_oscclk_default: oscclk_default {
function = "OSCCLK";
groups = "OSCCLK";
};
pinctrl_pewake_default: pewake_default {
function = "PEWAKE";
groups = "PEWAKE";
};
pinctrl_pnor_default: pnor_default {
function = "PNOR";
groups = "PNOR";
};
pinctrl_pwm0_default: pwm0_default {
function = "PWM0";
groups = "PWM0";
};
pinctrl_pwm1_default: pwm1_default {
function = "PWM1";
groups = "PWM1";
};
pinctrl_pwm2_default: pwm2_default {
function = "PWM2";
groups = "PWM2";
};
pinctrl_pwm3_default: pwm3_default {
function = "PWM3";
groups = "PWM3";
};
pinctrl_pwm4_default: pwm4_default {
function = "PWM4";
groups = "PWM4";
};
pinctrl_pwm5_default: pwm5_default {
function = "PWM5";
groups = "PWM5";
};
pinctrl_pwm6_default: pwm6_default {
function = "PWM6";
groups = "PWM6";
};
pinctrl_pwm7_default: pwm7_default {
function = "PWM7";
groups = "PWM7";
};
pinctrl_rgmii1_default: rgmii1_default {
function = "RGMII1";
groups = "RGMII1";
};
pinctrl_rgmii2_default: rgmii2_default {
function = "RGMII2";
groups = "RGMII2";
};
pinctrl_rmii1_default: rmii1_default {
function = "RMII1";
groups = "RMII1";
};
pinctrl_rmii2_default: rmii2_default {
function = "RMII2";
groups = "RMII2";
};
pinctrl_rxd1_default: rxd1_default {
function = "RXD1";
groups = "RXD1";
};
pinctrl_rxd2_default: rxd2_default {
function = "RXD2";
groups = "RXD2";
};
pinctrl_rxd3_default: rxd3_default {
function = "RXD3";
groups = "RXD3";
};
pinctrl_rxd4_default: rxd4_default {
function = "RXD4";
groups = "RXD4";
};
pinctrl_salt1_default: salt1_default {
function = "SALT1";
groups = "SALT1";
};
pinctrl_salt10_default: salt10_default {
function = "SALT10";
groups = "SALT10";
};
pinctrl_salt11_default: salt11_default {
function = "SALT11";
groups = "SALT11";
};
pinctrl_salt12_default: salt12_default {
function = "SALT12";
groups = "SALT12";
};
pinctrl_salt13_default: salt13_default {
function = "SALT13";
groups = "SALT13";
};
pinctrl_salt14_default: salt14_default {
function = "SALT14";
groups = "SALT14";
};
pinctrl_salt2_default: salt2_default {
function = "SALT2";
groups = "SALT2";
};
pinctrl_salt3_default: salt3_default {
function = "SALT3";
groups = "SALT3";
};
pinctrl_salt4_default: salt4_default {
function = "SALT4";
groups = "SALT4";
};
pinctrl_salt5_default: salt5_default {
function = "SALT5";
groups = "SALT5";
};
pinctrl_salt6_default: salt6_default {
function = "SALT6";
groups = "SALT6";
};
pinctrl_salt7_default: salt7_default {
function = "SALT7";
groups = "SALT7";
};
pinctrl_salt8_default: salt8_default {
function = "SALT8";
groups = "SALT8";
};
pinctrl_salt9_default: salt9_default {
function = "SALT9";
groups = "SALT9";
};
pinctrl_scl1_default: scl1_default {
function = "SCL1";
groups = "SCL1";
};
pinctrl_scl2_default: scl2_default {
function = "SCL2";
groups = "SCL2";
};
pinctrl_sd1_default: sd1_default {
function = "SD1";
groups = "SD1";
};
pinctrl_sd2_default: sd2_default {
function = "SD2";
groups = "SD2";
};
pinctrl_sda1_default: sda1_default {
function = "SDA1";
groups = "SDA1";
};
pinctrl_sda2_default: sda2_default {
function = "SDA2";
groups = "SDA2";
};
pinctrl_sgps1_default: sgps1_default {
function = "SGPS1";
groups = "SGPS1";
};
pinctrl_sgps2_default: sgps2_default {
function = "SGPS2";
groups = "SGPS2";
};
pinctrl_sioonctrl_default: sioonctrl_default {
function = "SIOONCTRL";
groups = "SIOONCTRL";
};
pinctrl_siopbi_default: siopbi_default {
function = "SIOPBI";
groups = "SIOPBI";
};
pinctrl_siopbo_default: siopbo_default {
function = "SIOPBO";
groups = "SIOPBO";
};
pinctrl_siopwreq_default: siopwreq_default {
function = "SIOPWREQ";
groups = "SIOPWREQ";
};
pinctrl_siopwrgd_default: siopwrgd_default {
function = "SIOPWRGD";
groups = "SIOPWRGD";
};
pinctrl_sios3_default: sios3_default {
function = "SIOS3";
groups = "SIOS3";
};
pinctrl_sios5_default: sios5_default {
function = "SIOS5";
groups = "SIOS5";
};
pinctrl_siosci_default: siosci_default {
function = "SIOSCI";
groups = "SIOSCI";
};
pinctrl_spi1_default: spi1_default {
function = "SPI1";
groups = "SPI1";
};
pinctrl_spi1cs1_default: spi1cs1_default {
function = "SPI1CS1";
groups = "SPI1CS1";
};
pinctrl_spi1debug_default: spi1debug_default {
function = "SPI1DEBUG";
groups = "SPI1DEBUG";
};
pinctrl_spi1passthru_default: spi1passthru_default {
function = "SPI1PASSTHRU";
groups = "SPI1PASSTHRU";
};
pinctrl_spi2ck_default: spi2ck_default {
function = "SPI2CK";
groups = "SPI2CK";
};
pinctrl_spi2cs0_default: spi2cs0_default {
function = "SPI2CS0";
groups = "SPI2CS0";
};
pinctrl_spi2cs1_default: spi2cs1_default {
function = "SPI2CS1";
groups = "SPI2CS1";
};
pinctrl_spi2miso_default: spi2miso_default {
function = "SPI2MISO";
groups = "SPI2MISO";
};
pinctrl_spi2mosi_default: spi2mosi_default {
function = "SPI2MOSI";
groups = "SPI2MOSI";
};
pinctrl_timer3_default: timer3_default {
function = "TIMER3";
groups = "TIMER3";
};
pinctrl_timer4_default: timer4_default {
function = "TIMER4";
groups = "TIMER4";
};
pinctrl_timer5_default: timer5_default {
function = "TIMER5";
groups = "TIMER5";
};
pinctrl_timer6_default: timer6_default {
function = "TIMER6";
groups = "TIMER6";
};
pinctrl_timer7_default: timer7_default {
function = "TIMER7";
groups = "TIMER7";
};
pinctrl_timer8_default: timer8_default {
function = "TIMER8";
groups = "TIMER8";
};
pinctrl_txd1_default: txd1_default {
function = "TXD1";
groups = "TXD1";
};
pinctrl_txd2_default: txd2_default {
function = "TXD2";
groups = "TXD2";
};
pinctrl_txd3_default: txd3_default {
function = "TXD3";
groups = "TXD3";
};
pinctrl_txd4_default: txd4_default {
function = "TXD4";
groups = "TXD4";
};
pinctrl_uart6_default: uart6_default {
function = "UART6";
groups = "UART6";
};
pinctrl_usbcki_default: usbcki_default {
function = "USBCKI";
groups = "USBCKI";
};
pinctrl_vgabiosrom_default: vgabiosrom_default {
function = "VGABIOSROM";
groups = "VGABIOSROM";
};
pinctrl_vgahs_default: vgahs_default {
function = "VGAHS";
groups = "VGAHS";
};
pinctrl_vgavs_default: vgavs_default {
function = "VGAVS";
groups = "VGAVS";
};
pinctrl_vpi24_default: vpi24_default {
function = "VPI24";
groups = "VPI24";
};
pinctrl_vpo_default: vpo_default {
function = "VPO";
groups = "VPO";
};
pinctrl_wdtrst1_default: wdtrst1_default {
function = "WDTRST1";
groups = "WDTRST1";
};
pinctrl_wdtrst2_default: wdtrst2_default {
function = "WDTRST2";
groups = "WDTRST2";
};
};
};
clk_hpll: clk_hpll@1e6e2024 { clk_hpll: clk_hpll@1e6e2024 {
#clock-cells = <0>; #clock-cells = <0>;
compatible = "aspeed,g5-hpll-clock"; compatible = "aspeed,g5-hpll-clock";
@ -75,11 +907,27 @@
reg = <0x1e6e202c 0x4>; reg = <0x1e6e202c 0x4>;
}; };
gfx: display@1e6e6000 {
compatible = "aspeed,ast2500-gfx", "syscon";
reg = <0x1e6e6000 0x1000>;
reg-io-width = <4>;
};
sram@1e720000 { sram@1e720000 {
compatible = "mmio-sram"; compatible = "mmio-sram";
reg = <0x1e720000 0x9000>; // 36K reg = <0x1e720000 0x9000>; // 36K
}; };
gpio: gpio@1e780000 {
#gpio-cells = <2>;
gpio-controller;
compatible = "aspeed,ast2500-gpio";
reg = <0x1e780000 0x1000>;
interrupts = <20>;
gpio-ranges = <&pinctrl 0 0 220>;
interrupt-controller;
};
timer: timer@1e782000 { timer: timer@1e782000 {
compatible = "aspeed,ast2400-timer"; compatible = "aspeed,ast2400-timer";
reg = <0x1e782000 0x90>; reg = <0x1e782000 0x90>;
@ -90,6 +938,7 @@
clocks = <&clk_apb>; clocks = <&clk_apb>;
}; };
wdt1: wdt@1e785000 { wdt1: wdt@1e785000 {
compatible = "aspeed,wdt"; compatible = "aspeed,wdt";
reg = <0x1e785000 0x1c>; reg = <0x1e785000 0x1c>;
@ -119,6 +968,36 @@
status = "disabled"; status = "disabled";
}; };
lpc: lpc@1e789000 {
compatible = "aspeed,ast2500-lpc", "simple-mfd";
reg = <0x1e789000 0x1000>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x1e789000 0x1000>;
lpc_bmc: lpc-bmc@0 {
compatible = "aspeed,ast2500-lpc-bmc";
reg = <0x0 0x80>;
};
lpc_host: lpc-host@80 {
compatible = "aspeed,ast2500-lpc-host", "simple-mfd", "syscon";
reg = <0x80 0x1e0>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x80 0x1e0>;
reg-io-width = <4>;
lhc: lhc@20 {
compatible = "aspeed,ast2500-lhc";
reg = <0x20 0x24 0x48 0x8>;
};
};
};
uart2: serial@1e78d000 { uart2: serial@1e78d000 {
compatible = "ns16550a"; compatible = "ns16550a";
reg = <0x1e78d000 0x1000>; reg = <0x1e78d000 0x1000>;

View file

@ -30,6 +30,13 @@
status = "okay"; status = "okay";
}; };
vccsys: vccsys {
compatible = "regulator-fixed";
regulator-name = "vccsys";
regulator-boot-on;
regulator-always-on;
};
vcc3v3_sys: vcc3v3-sys { vcc3v3_sys: vcc3v3-sys {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
regulator-name = "vcc3v3_sys"; regulator-name = "vcc3v3_sys";
@ -51,6 +58,7 @@
regulator-name = "vcc5v0_host"; regulator-name = "vcc5v0_host";
gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>; gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>;
}; };
}; };
&emmc_phy { &emmc_phy {
@ -112,6 +120,37 @@
status = "okay"; status = "okay";
}; };
&i2c0 {
status = "okay";
clock-frequency = <400000>;
i2c-scl-falling-time-ns = <50>;
i2c-scl-rising-time-ns = <100>;
u-boot,dm-pre-reloc;
rk808: pmic@1b {
compatible = "rockchip,rk808";
clock-output-names = "xin32k", "wifibt_32kin";
interrupt-parent = <&gpio0>;
interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&pmic_int_l>;
reg = <0x1b>;
rockchip,system-power-controller;
#clock-cells = <1>;
u-boot,dm-pre-reloc;
status = "okay";
vcc12-supply = <&vcc3v3_sys>;
regulators {
vcc33_lcd: SWITCH_REG2 {
regulator-always-on;
regulator-boot-on;
regulator-name = "vcc33_lcd";
};
};
};
};
&pinctrl { &pinctrl {
pmic { pmic {
pmic_int_l: pmic-int-l { pmic_int_l: pmic-int-l {

View file

@ -1,7 +1,7 @@
/* /*
* (C) Copyright 2017 Theobroma Systems Design und Consulting GmbH * (C) Copyright 2017 Theobroma Systems Design und Consulting GmbH
* *
* SPDX-License-Identifier: GPL-2.0+ * SPDX-License-Identifier: GPL-2.0+ X11
*/ */
/dts-v1/; /dts-v1/;
@ -91,7 +91,6 @@
&sdmmc { &sdmmc {
u-boot,dm-pre-reloc; u-boot,dm-pre-reloc;
bus-width = <4>; bus-width = <4>;
fifo-mode; /* until we fix DMA in SPL */
status = "okay"; status = "okay";
}; };

View file

@ -26,6 +26,7 @@
serial4 = &uart4; serial4 = &uart4;
mmc0 = &sdhci; mmc0 = &sdhci;
mmc1 = &sdmmc; mmc1 = &sdmmc;
i2c0 = &i2c0;
}; };
cpus { cpus {
@ -668,6 +669,21 @@
status = "disabled"; status = "disabled";
}; };
i2c0: i2c@ff3c0000 {
compatible = "rockchip,rk3399-i2c";
reg = <0x0 0xff3c0000 0x0 0x1000>;
assigned-clocks = <&pmucru SCLK_I2C0_PMU>;
assigned-clock-rates = <200000000>;
clocks = <&pmucru SCLK_I2C0_PMU>, <&pmucru PCLK_I2C0_PMU>;
clock-names = "i2c", "pclk";
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH 0>;
pinctrl-names = "default";
pinctrl-0 = <&i2c0_xfer>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
pinctrl: pinctrl { pinctrl: pinctrl {
u-boot,dm-pre-reloc; u-boot,dm-pre-reloc;
compatible = "rockchip,rk3399-pinctrl"; compatible = "rockchip,rk3399-pinctrl";

View file

@ -0,0 +1,68 @@
/*
* Copyright (C) 2017, Intel Corporation
*
* based on socfpga_cyclone5_de0_nano_soc.dts
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include "socfpga_cyclone5.dtsi"
/ {
model = "Terasic DE10-Nano";
compatible = "altr,socfpga-cyclone5", "altr,socfpga";
chosen {
bootargs = "console=ttyS0,115200";
};
aliases {
ethernet0 = &gmac1;
udc0 = &usb1;
};
memory {
name = "memory";
device_type = "memory";
reg = <0x0 0x40000000>; /* 1GB */
};
soc {
u-boot,dm-pre-reloc;
};
};
&gmac1 {
status = "okay";
phy-mode = "rgmii";
rxd0-skew-ps = <420>;
rxd1-skew-ps = <420>;
rxd2-skew-ps = <420>;
rxd3-skew-ps = <420>;
txen-skew-ps = <0>;
txc-skew-ps = <1860>;
rxdv-skew-ps = <420>;
rxc-skew-ps = <1680>;
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&mmc0 {
status = "okay";
u-boot,dm-pre-reloc;
};
&usb1 {
status = "okay";
};

View file

@ -0,0 +1,24 @@
&pinctrl {
usart1_pins_a: usart1@0 {
u-boot,dm-pre-reloc;
pins1 {
u-boot,dm-pre-reloc;
};
pins2 {
u-boot,dm-pre-reloc;
};
};
fmc_pins: fmc@0 {
u-boot,dm-pre-reloc;
pins
{
u-boot,dm-pre-reloc;
};
};
};
&fmc {
bank1: bank@0 {
u-boot,dm-pre-reloc;
};
};

View file

@ -1,5 +1,6 @@
/* /*
* Copyright 2016 - Michael Kurz <michi.kurz@gmail.com> * Copyright 2016 - Michael Kurz <michi.kurz@gmail.com>
* Copyright 2016 - Vikas MANOCHA <vikas.manocha@st.com>
* *
* Based on: * Based on:
* stm32f469-disco.dts from Linux * stm32f469-disco.dts from Linux
@ -46,6 +47,7 @@
/dts-v1/; /dts-v1/;
#include "stm32f746.dtsi" #include "stm32f746.dtsi"
#include <dt-bindings/memory/stm32-sdram.h>
/ { / {
model = "STMicroelectronics STM32F746-DISCO board"; model = "STMicroelectronics STM32F746-DISCO board";
@ -63,6 +65,28 @@
aliases { aliases {
serial0 = &usart1; serial0 = &usart1;
spi0 = &qspi; spi0 = &qspi;
/* Aliases for gpios so as to use sequence */
gpio0 = &gpioa;
gpio1 = &gpiob;
gpio2 = &gpioc;
gpio3 = &gpiod;
gpio4 = &gpioe;
gpio5 = &gpiof;
gpio6 = &gpiog;
gpio7 = &gpioh;
gpio8 = &gpioi;
gpio9 = &gpioj;
gpio10 = &gpiok;
};
led1 {
compatible = "st,led1";
led-gpio = <&gpioi 1 0>;
};
button1 {
compatible = "st,button1";
button-gpio = <&gpioi 11 0>;
}; };
}; };
@ -70,12 +94,120 @@
clock-frequency = <25000000>; clock-frequency = <25000000>;
}; };
&pinctrl {
usart1_pins_a: usart1@0 {
pins1 {
pinmux = <STM32F746_PA9_FUNC_USART1_TX>;
bias-disable;
drive-push-pull;
slew-rate = <2>;
};
pins2 {
pinmux = <STM32F746_PB7_FUNC_USART1_RX>;
bias-disable;
};
};
ethernet_mii: mii@0 {
pins {
pinmux = <STM32F746_PG13_FUNC_ETH_MII_TXD0_ETH_RMII_TXD0>,
<STM32F746_PG14_FUNC_ETH_MII_TXD1_ETH_RMII_TXD1>,
<STM32F746_PG11_FUNC_ETH_MII_TX_EN_ETH_RMII_TX_EN>,
<STM32F746_PA2_FUNC_ETH_MDIO>,
<STM32F746_PC1_FUNC_ETH_MDC>,
<STM32F746_PA1_FUNC_ETH_MII_RX_CLK_ETH_RMII_REF_CLK>,
<STM32F746_PA7_FUNC_ETH_MII_RX_DV_ETH_RMII_CRS_DV>,
<STM32F746_PC4_FUNC_ETH_MII_RXD0_ETH_RMII_RXD0>,
<STM32F746_PC5_FUNC_ETH_MII_RXD1_ETH_RMII_RXD1>;
slew-rate = <2>;
};
};
qspi_pins: qspi@0 {
pins {
pinmux = <STM32F746_PB2_FUNC_QUADSPI_CLK>,
<STM32F746_PB6_FUNC_QUADSPI_BK1_NCS>,
<STM32F746_PD11_FUNC_QUADSPI_BK1_IO0>,
<STM32F746_PD12_FUNC_QUADSPI_BK1_IO1>,
<STM32F746_PD13_FUNC_QUADSPI_BK1_IO3>,
<STM32F746_PE2_FUNC_QUADSPI_BK1_IO2>;
slew-rate = <2>;
};
};
fmc_pins: fmc@0 {
pins {
pinmux = <STM32F746_PD10_FUNC_FMC_D15>,
<STM32F746_PD9_FUNC_FMC_D14>,
<STM32F746_PD8_FUNC_FMC_D13>,
<STM32F746_PE15_FUNC_FMC_D12>,
<STM32F746_PE14_FUNC_FMC_D11>,
<STM32F746_PE13_FUNC_FMC_D10>,
<STM32F746_PE12_FUNC_FMC_D9>,
<STM32F746_PE11_FUNC_FMC_D8>,
<STM32F746_PE10_FUNC_FMC_D7>,
<STM32F746_PE9_FUNC_FMC_D6>,
<STM32F746_PE8_FUNC_FMC_D5>,
<STM32F746_PE7_FUNC_FMC_D4>,
<STM32F746_PD1_FUNC_FMC_D3>,
<STM32F746_PD0_FUNC_FMC_D2>,
<STM32F746_PD15_FUNC_FMC_D1>,
<STM32F746_PD14_FUNC_FMC_D0>,
<STM32F746_PE1_FUNC_FMC_NBL1>,
<STM32F746_PE0_FUNC_FMC_NBL0>,
<STM32F746_PG5_FUNC_FMC_A15_FMC_BA1>,
<STM32F746_PG4_FUNC_FMC_A14_FMC_BA0>,
<STM32F746_PG1_FUNC_FMC_A11>,
<STM32F746_PG0_FUNC_FMC_A10>,
<STM32F746_PF15_FUNC_FMC_A9>,
<STM32F746_PF14_FUNC_FMC_A8>,
<STM32F746_PF13_FUNC_FMC_A7>,
<STM32F746_PF12_FUNC_FMC_A6>,
<STM32F746_PF5_FUNC_FMC_A5>,
<STM32F746_PF4_FUNC_FMC_A4>,
<STM32F746_PF3_FUNC_FMC_A3>,
<STM32F746_PF2_FUNC_FMC_A2>,
<STM32F746_PF1_FUNC_FMC_A1>,
<STM32F746_PF0_FUNC_FMC_A0>,
<STM32F746_PH3_FUNC_FMC_SDNE0>,
<STM32F746_PH5_FUNC_FMC_SDNWE>,
<STM32F746_PF11_FUNC_FMC_SDNRAS>,
<STM32F746_PG15_FUNC_FMC_SDNCAS>,
<STM32F746_PC3_FUNC_FMC_SDCKE0>,
<STM32F746_PG8_FUNC_FMC_SDCLK>;
slew-rate = <2>;
};
};
};
&usart1 { &usart1 {
pinctrl-0 = <&usart1_pins_a>; pinctrl-0 = <&usart1_pins_a>;
pinctrl-names = "default"; pinctrl-names = "default";
status = "okay"; status = "okay";
}; };
&fmc {
pinctrl-0 = <&fmc_pins>;
pinctrl-names = "default";
status = "okay";
mr-nbanks = <1>;
/* Memory configuration from sdram datasheet MT48LC_4M32_B2B5-6A */
bank1: bank@0 {
st,sdram-control = /bits/ 8 <NO_COL_8 NO_ROW_12 MWIDTH_16 BANKS_4
CAS_3 SDCLK_2 RD_BURST_EN
RD_PIPE_DL_0>;
st,sdram-timing = /bits/ 8 <TMRD_2 TXSR_6 TRAS_4 TRC_6 TWR_2
TRP_2 TRCD_2>;
/* refcount = (64msec/total_row_sdram)*freq - 20 */
st,sdram-refcount = < 1542 >;
};
};
&mac { &mac {
status = "okay"; status = "okay";
pinctrl-0 = <&ethernet_mii>; pinctrl-0 = <&ethernet_mii>;

View file

@ -1,5 +1,6 @@
/* /*
* Copyright 2016 - Michael Kurz <michi.kurz@gmail.com> * Copyright 2016 - Michael Kurz <michi.kurz@gmail.com>
* Copyright 2016 - Vikas MANOCHA <vikas.manocha@st.com>
* *
* Based on: * Based on:
* stm32f429.dtsi from Linux * stm32f429.dtsi from Linux
@ -70,6 +71,13 @@
status = "disabled"; status = "disabled";
}; };
fmc: fmc@A0000000 {
compatible = "st,stm32-fmc";
reg = <0xA0000000 0x1000>;
clocks = <&rcc 0 64>;
u-boot,dm-pre-reloc;
};
qspi: quadspi@A0001000 { qspi: quadspi@A0001000 {
compatible = "st,stm32-qspi"; compatible = "st,stm32-qspi";
#address-cells = <1>; #address-cells = <1>;
@ -78,6 +86,7 @@
reg-names = "QuadSPI", "QuadSPI-memory"; reg-names = "QuadSPI", "QuadSPI-memory";
interrupts = <92>; interrupts = <92>;
spi-max-frequency = <108000000>; spi-max-frequency = <108000000>;
clocks = <&rcc 0 65>;
status = "disabled"; status = "disabled";
}; };
usart1: serial@40011000 { usart1: serial@40011000 {
@ -105,43 +114,117 @@
u-boot,dm-pre-reloc; u-boot,dm-pre-reloc;
pins-are-numbered; pins-are-numbered;
usart1_pins_a: usart1@0 { gpioa: gpio@40020000 {
pins1 { gpio-controller;
pinmux = <STM32F746_PA9_FUNC_USART1_TX>; #gpio-cells = <2>;
bias-disable; compatible = "st,stm32-gpio";
drive-push-pull; reg = <0x0 0x400>;
slew-rate = <2>; clocks = <&rcc 0 0>;
}; st,bank-name = "GPIOA";
pins2 { u-boot,dm-pre-reloc;
pinmux = <STM32F746_PB7_FUNC_USART1_RX>;
bias-disable;
};
}; };
ethernet_mii: mii@0 {
pins { gpiob: gpio@40020400 {
pinmux = <STM32F746_PG13_FUNC_ETH_MII_TXD0_ETH_RMII_TXD0>, gpio-controller;
<STM32F746_PG14_FUNC_ETH_MII_TXD1_ETH_RMII_TXD1>, #gpio-cells = <2>;
<STM32F746_PG11_FUNC_ETH_MII_TX_EN_ETH_RMII_TX_EN>, compatible = "st,stm32-gpio";
<STM32F746_PA2_FUNC_ETH_MDIO>, reg = <0x400 0x400>;
<STM32F746_PC1_FUNC_ETH_MDC>, clocks = <&rcc 0 1>;
<STM32F746_PA1_FUNC_ETH_MII_RX_CLK_ETH_RMII_REF_CLK>, st,bank-name = "GPIOB";
<STM32F746_PA7_FUNC_ETH_MII_RX_DV_ETH_RMII_CRS_DV>, u-boot,dm-pre-reloc;
<STM32F746_PC4_FUNC_ETH_MII_RXD0_ETH_RMII_RXD0>,
<STM32F746_PC5_FUNC_ETH_MII_RXD1_ETH_RMII_RXD1>;
slew-rate = <2>;
};
}; };
qspi_pins: qspi@0{
pins {
pinmux = <STM32F746_PB2_FUNC_QUADSPI_CLK>, gpioc: gpio@40020800 {
<STM32F746_PB6_FUNC_QUADSPI_BK1_NCS>, gpio-controller;
<STM32F746_PD11_FUNC_QUADSPI_BK1_IO0>, #gpio-cells = <2>;
<STM32F746_PD12_FUNC_QUADSPI_BK1_IO1>, compatible = "st,stm32-gpio";
<STM32F746_PD13_FUNC_QUADSPI_BK1_IO3>, reg = <0x800 0x400>;
<STM32F746_PE2_FUNC_QUADSPI_BK1_IO2>; clocks = <&rcc 0 2>;
slew-rate = <2>; st,bank-name = "GPIOC";
}; u-boot,dm-pre-reloc;
}; };
gpiod: gpio@40020c00 {
gpio-controller;
#gpio-cells = <2>;
compatible = "st,stm32-gpio";
reg = <0xc00 0x400>;
clocks = <&rcc 0 3>;
st,bank-name = "GPIOD";
u-boot,dm-pre-reloc;
};
gpioe: gpio@40021000 {
gpio-controller;
#gpio-cells = <2>;
compatible = "st,stm32-gpio";
reg = <0x1000 0x400>;
clocks = <&rcc 0 4>;
st,bank-name = "GPIOE";
u-boot,dm-pre-reloc;
};
gpiof: gpio@40021400 {
gpio-controller;
#gpio-cells = <2>;
compatible = "st,stm32-gpio";
reg = <0x1400 0x400>;
clocks = <&rcc 0 5>;
st,bank-name = "GPIOF";
u-boot,dm-pre-reloc;
};
gpiog: gpio@40021800 {
gpio-controller;
#gpio-cells = <2>;
compatible = "st,stm32-gpio";
reg = <0x1800 0x400>;
clocks = <&rcc 0 6>;
st,bank-name = "GPIOG";
u-boot,dm-pre-reloc;
};
gpioh: gpio@40021c00 {
gpio-controller;
#gpio-cells = <2>;
compatible = "st,stm32-gpio";
reg = <0x1c00 0x400>;
clocks = <&rcc 0 7>;
st,bank-name = "GPIOH";
u-boot,dm-pre-reloc;
};
gpioi: gpio@40022000 {
gpio-controller;
#gpio-cells = <2>;
compatible = "st,stm32-gpio";
reg = <0x2000 0x400>;
clocks = <&rcc 0 8>;
st,bank-name = "GPIOI";
u-boot,dm-pre-reloc;
};
gpioj: gpio@40022400 {
gpio-controller;
#gpio-cells = <2>;
compatible = "st,stm32-gpio";
reg = <0x2400 0x400>;
clocks = <&rcc 0 9>;
st,bank-name = "GPIOJ";
u-boot,dm-pre-reloc;
};
gpiok: gpio@40022800 {
gpio-controller;
#gpio-cells = <2>;
compatible = "st,stm32-gpio";
reg = <0x2800 0x400>;
clocks = <&rcc 0 10>;
st,bank-name = "GPIOK";
u-boot,dm-pre-reloc;
};
}; };
}; };
}; };

View file

@ -0,0 +1,255 @@
/*
* Copyright 2016 - Vikas Manocha <vikas.manocha@st.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 "stm32f746.dtsi"
#include <dt-bindings/memory/stm32-sdram.h>
/ {
model = "STMicroelectronics STM32F769-DISCO board";
compatible = "st,stm32f769-disco", "st,stm32f7";
chosen {
bootargs = "root=/dev/ram rdinit=/linuxrc";
stdout-path = "serial0:115200n8";
};
memory {
reg = <0xC0000000 0x1000000>;
};
aliases {
serial0 = &usart1;
spi0 = &qspi;
/* Aliases for gpios so as to use sequence */
gpio0 = &gpioa;
gpio1 = &gpiob;
gpio2 = &gpioc;
gpio3 = &gpiod;
gpio4 = &gpioe;
gpio5 = &gpiof;
gpio6 = &gpiog;
gpio7 = &gpioh;
gpio8 = &gpioi;
gpio9 = &gpioj;
gpio10 = &gpiok;
};
led1 {
compatible = "st,led1";
led-gpio = <&gpioj 5 0>;
};
button1 {
compatible = "st,button1";
button-gpio = <&gpioa 0 0>;
};
};
&clk_hse {
clock-frequency = <25000000>;
};
&pinctrl {
usart1_pins_a: usart1@0 {
pins1 {
pinmux = <STM32F746_PA9_FUNC_USART1_TX>;
bias-disable;
drive-push-pull;
slew-rate = <2>;
};
pins2 {
pinmux = <STM32F746_PA10_FUNC_USART1_RX>;
bias-disable;
};
};
ethernet_mii: mii@0 {
pins {
pinmux = <STM32F746_PG13_FUNC_ETH_MII_TXD0_ETH_RMII_TXD0>,
<STM32F746_PG14_FUNC_ETH_MII_TXD1_ETH_RMII_TXD1>,
<STM32F746_PG11_FUNC_ETH_MII_TX_EN_ETH_RMII_TX_EN>,
<STM32F746_PA2_FUNC_ETH_MDIO>,
<STM32F746_PC1_FUNC_ETH_MDC>,
<STM32F746_PA1_FUNC_ETH_MII_RX_CLK_ETH_RMII_REF_CLK>,
<STM32F746_PA7_FUNC_ETH_MII_RX_DV_ETH_RMII_CRS_DV>,
<STM32F746_PC4_FUNC_ETH_MII_RXD0_ETH_RMII_RXD0>,
<STM32F746_PC5_FUNC_ETH_MII_RXD1_ETH_RMII_RXD1>;
slew-rate = <2>;
};
};
qspi_pins: qspi@0 {
pins {
pinmux = <STM32F746_PB2_FUNC_QUADSPI_CLK>,
<STM32F746_PB6_FUNC_QUADSPI_BK1_NCS>,
<STM32F746_PC9_FUNC_QUADSPI_BK1_IO0>,
<STM32F746_PC10_FUNC_QUADSPI_BK1_IO1>,
<STM32F746_PD13_FUNC_QUADSPI_BK1_IO3>,
<STM32F746_PE2_FUNC_QUADSPI_BK1_IO2>;
slew-rate = <2>;
};
};
fmc_pins: fmc@0 {
pins {
pinmux = <STM32F746_PI10_FUNC_FMC_D31>,
<STM32F746_PI9_FUNC_FMC_D30>,
<STM32F746_PI7_FUNC_FMC_D29>,
<STM32F746_PI6_FUNC_FMC_D28>,
<STM32F746_PI3_FUNC_FMC_D27>,
<STM32F746_PI2_FUNC_FMC_D26>,
<STM32F746_PI1_FUNC_FMC_D25>,
<STM32F746_PI0_FUNC_FMC_D24>,
<STM32F746_PH15_FUNC_FMC_D23>,
<STM32F746_PH14_FUNC_FMC_D22>,
<STM32F746_PH13_FUNC_FMC_D21>,
<STM32F746_PH12_FUNC_FMC_D20>,
<STM32F746_PH11_FUNC_FMC_D19>,
<STM32F746_PH10_FUNC_FMC_D18>,
<STM32F746_PH9_FUNC_FMC_D17>,
<STM32F746_PH8_FUNC_FMC_D16>,
<STM32F746_PD10_FUNC_FMC_D15>,
<STM32F746_PD9_FUNC_FMC_D14>,
<STM32F746_PD8_FUNC_FMC_D13>,
<STM32F746_PE15_FUNC_FMC_D12>,
<STM32F746_PE14_FUNC_FMC_D11>,
<STM32F746_PE13_FUNC_FMC_D10>,
<STM32F746_PE12_FUNC_FMC_D9>,
<STM32F746_PE11_FUNC_FMC_D8>,
<STM32F746_PE10_FUNC_FMC_D7>,
<STM32F746_PE9_FUNC_FMC_D6>,
<STM32F746_PE8_FUNC_FMC_D5>,
<STM32F746_PE7_FUNC_FMC_D4>,
<STM32F746_PD1_FUNC_FMC_D3>,
<STM32F746_PD0_FUNC_FMC_D2>,
<STM32F746_PD15_FUNC_FMC_D1>,
<STM32F746_PD14_FUNC_FMC_D0>,
<STM32F746_PI5_FUNC_FMC_NBL3>,
<STM32F746_PI4_FUNC_FMC_NBL2>,
<STM32F746_PE1_FUNC_FMC_NBL1>,
<STM32F746_PE0_FUNC_FMC_NBL0>,
<STM32F746_PG5_FUNC_FMC_A15_FMC_BA1>,
<STM32F746_PG4_FUNC_FMC_A14_FMC_BA0>,
<STM32F746_PG1_FUNC_FMC_A11>,
<STM32F746_PG0_FUNC_FMC_A10>,
<STM32F746_PF15_FUNC_FMC_A9>,
<STM32F746_PF14_FUNC_FMC_A8>,
<STM32F746_PF13_FUNC_FMC_A7>,
<STM32F746_PF12_FUNC_FMC_A6>,
<STM32F746_PF5_FUNC_FMC_A5>,
<STM32F746_PF4_FUNC_FMC_A4>,
<STM32F746_PF3_FUNC_FMC_A3>,
<STM32F746_PF2_FUNC_FMC_A2>,
<STM32F746_PF1_FUNC_FMC_A1>,
<STM32F746_PF0_FUNC_FMC_A0>,
<STM32F746_PH3_FUNC_FMC_SDNE0>,
<STM32F746_PH5_FUNC_FMC_SDNWE>,
<STM32F746_PF11_FUNC_FMC_SDNRAS>,
<STM32F746_PG15_FUNC_FMC_SDNCAS>,
<STM32F746_PH2_FUNC_FMC_SDCKE0>,
<STM32F746_PG8_FUNC_FMC_SDCLK>;
slew-rate = <2>;
};
};
};
&usart1 {
pinctrl-0 = <&usart1_pins_a>;
pinctrl-names = "default";
status = "okay";
};
&fmc {
pinctrl-0 = <&fmc_pins>;
pinctrl-names = "default";
status = "okay";
mr-nbanks = <1>;
/* Memory configuration from sdram datasheet MT48LC_4M32_B2B5-6A */
bank1: bank@0 {
st,sdram-control = /bits/ 8 <NO_COL_8 NO_ROW_12 MWIDTH_32 BANKS_4
CAS_3 SDCLK_2 RD_BURST_EN
RD_PIPE_DL_0>;
st,sdram-timing = /bits/ 8 <TMRD_2 TXSR_6 TRAS_4 TRC_6 TWR_2
TRP_2 TRCD_2>;
/* refcount = (64msec/total_row_sdram)*freq - 20 */
st,sdram-refcount = < 1542 >;
};
};
&mac {
status = "okay";
pinctrl-0 = <&ethernet_mii>;
phy-mode = "rmii";
phy-handle = <&phy0>;
mdio0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "snps,dwmac-mdio";
phy0: ethernet-phy@0 {
reg = <0>;
};
};
};
&qspi {
pinctrl-0 = <&qspi_pins>;
status = "okay";
qflash0: n25q128a {
#address-cells = <1>;
#size-cells = <1>;
compatible = "micron,n25q128a13", "spi-flash";
spi-max-frequency = <108000000>;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <1>;
memory-map = <0x90000000 0x1000000>;
reg = <0>;
};
};

View file

@ -0,0 +1,69 @@
/*
* Copyright (C) 2016 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-r40.dtsi"
/ {
model = "Banana Pi BPI-M2-Ultra";
compatible = "sinovoip,bpi-m2-ultra", "allwinner,sun8i-r40";
aliases {
serial0 = &uart0;
};
chosen {
stdout-path = "serial0:115200n8";
};
};
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
status = "okay";
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pb_pins>;
status = "okay";
};

183
arch/arm/dts/sun8i-r40.dtsi Normal file
View file

@ -0,0 +1,183 @@
/*
* Copyright 2016 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.
*/
#include <dt-bindings/interrupt-controller/arm-gic.h>
/ {
#address-cells = <1>;
#size-cells = <1>;
interrupt-parent = <&gic>;
aliases {
};
chosen {
};
clocks {
#address-cells = <1>;
#size-cells = <1>;
ranges;
osc24M: osc24M_clk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <24000000>;
};
osc32k: osc32k_clk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <32768>;
clock-output-names = "osc32k";
};
};
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu0: cpu@0 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <0>;
};
cpu@1 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <1>;
};
cpu@2 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <2>;
};
cpu@3 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <3>;
};
};
memory@40000000 {
device_type = "memory";
reg = <0x40000000 0x80000000>;
};
soc {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges;
pio: pinctrl@1c20800 {
compatible = "allwinner,sun8i-r40-pinctrl";
reg = <0x01c20800 0x400>;
interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
/* apb should be replaced once CCU is implemented */
clocks = <&osc24M>, <&osc24M>, <&osc32k>;
clock-names = "apb", "hosc", "losc";
gpio-controller;
interrupt-controller;
#interrupt-cells = <3>;
#gpio-cells = <3>;
i2c0_pins: i2c0_pins {
pins = "PB0", "PB1";
function = "i2c0";
bias-pull-up;
};
uart0_pb_pins: uart0_pb_pins {
pins = "PB22", "PB23";
function = "uart0";
bias-pull-up;
};
};
uart0: serial@1c28000 {
compatible = "snps,dw-apb-uart";
reg = <0x01c28000 0x400>;
interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
clocks = <&osc24M>;
status = "disabled";
};
i2c0: i2c@1c2ac00 {
compatible = "allwinner,sun6i-a31-i2c";
reg = <0x01c2ac00 0x400>;
interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&osc24M>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
gic: interrupt-controller@1c81000 {
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)>;
};
};
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;
};
};

View file

@ -0,0 +1,83 @@
/*
* Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz>
*
* 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-v3s.dtsi"
#include "sunxi-common-regulators.dtsi"
/ {
model = "Lichee Pi Zero";
compatible = "licheepi,licheepi-zero", "allwinner,sun8i-v3s";
aliases {
serial0 = &uart0;
};
chosen {
stdout-path = "serial0:115200n8";
};
};
&mmc0 {
pinctrl-0 = <&mmc0_pins_a>;
pinctrl-names = "default";
broken-cd;
bus-width = <4>;
vmmc-supply = <&reg_vcc3v3>;
status = "okay";
};
&uart0 {
pinctrl-0 = <&uart0_pins_a>;
pinctrl-names = "default";
status = "okay";
};
&usb_otg {
dr_mode = "otg";
status = "okay";
};
&usbphy {
usb0_id_det-gpio = <&pio 5 6 GPIO_ACTIVE_HIGH>;
status = "okay";
};

284
arch/arm/dts/sun8i-v3s.dtsi Normal file
View file

@ -0,0 +1,284 @@
/*
* Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include <dt-bindings/clock/sun8i-v3s-ccu.h>
#include <dt-bindings/reset/sun8i-v3s-ccu.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ {
#address-cells = <1>;
#size-cells = <1>;
interrupt-parent = <&gic>;
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu@0 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <0>;
clocks = <&ccu CLK_CPU>;
};
};
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)>;
};
clocks {
#address-cells = <1>;
#size-cells = <1>;
ranges;
osc24M: osc24M_clk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <24000000>;
clock-output-names = "osc24M";
};
osc32k: osc32k_clk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <32768>;
clock-output-names = "osc32k";
};
};
soc {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges;
mmc0: mmc@01c0f000 {
compatible = "allwinner,sun7i-a20-mmc";
reg = <0x01c0f000 0x1000>;
clocks = <&ccu CLK_BUS_MMC0>,
<&ccu CLK_MMC0>,
<&ccu CLK_MMC0_OUTPUT>,
<&ccu CLK_MMC0_SAMPLE>;
clock-names = "ahb",
"mmc",
"output",
"sample";
resets = <&ccu RST_BUS_MMC0>;
reset-names = "ahb";
interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
mmc1: mmc@01c10000 {
compatible = "allwinner,sun7i-a20-mmc";
reg = <0x01c10000 0x1000>;
clocks = <&ccu CLK_BUS_MMC1>,
<&ccu CLK_MMC1>,
<&ccu CLK_MMC1_OUTPUT>,
<&ccu CLK_MMC1_SAMPLE>;
clock-names = "ahb",
"mmc",
"output",
"sample";
resets = <&ccu RST_BUS_MMC1>;
reset-names = "ahb";
interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
mmc2: mmc@01c11000 {
compatible = "allwinner,sun7i-a20-mmc";
reg = <0x01c11000 0x1000>;
clocks = <&ccu CLK_BUS_MMC2>,
<&ccu CLK_MMC2>,
<&ccu CLK_MMC2_OUTPUT>,
<&ccu CLK_MMC2_SAMPLE>;
clock-names = "ahb",
"mmc",
"output",
"sample";
resets = <&ccu RST_BUS_MMC2>;
reset-names = "ahb";
interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
usb_otg: usb@01c19000 {
compatible = "allwinner,sun8i-h3-musb";
reg = <0x01c19000 0x0400>;
clocks = <&ccu CLK_BUS_OTG>;
resets = <&ccu RST_BUS_OTG>;
interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "mc";
phys = <&usbphy 0>;
phy-names = "usb";
extcon = <&usbphy 0>;
status = "disabled";
};
usbphy: phy@01c19400 {
compatible = "allwinner,sun8i-v3s-usb-phy";
reg = <0x01c19400 0x2c>,
<0x01c1a800 0x4>;
reg-names = "phy_ctrl",
"pmu0";
clocks = <&ccu CLK_USB_PHY0>;
clock-names = "usb0_phy";
resets = <&ccu RST_USB_PHY0>;
reset-names = "usb0_reset";
status = "disabled";
#phy-cells = <1>;
};
ccu: clock@01c20000 {
compatible = "allwinner,sun8i-v3s-ccu";
reg = <0x01c20000 0x400>;
clocks = <&osc24M>, <&osc32k>;
clock-names = "hosc", "losc";
#clock-cells = <1>;
#reset-cells = <1>;
};
rtc: rtc@01c20400 {
compatible = "allwinner,sun6i-a31-rtc";
reg = <0x01c20400 0x54>;
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
};
pio: pinctrl@01c20800 {
compatible = "allwinner,sun8i-v3s-pinctrl";
reg = <0x01c20800 0x400>;
interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&osc32k>;
clock-names = "apb", "hosc", "losc";
gpio-controller;
#gpio-cells = <3>;
interrupt-controller;
#interrupt-cells = <3>;
uart0_pins_a: uart0@0 {
pins = "PB8", "PB9";
function = "uart0";
bias-pull-up;
};
mmc0_pins_a: mmc0@0 {
pins = "PF0", "PF1", "PF2", "PF3",
"PF4", "PF5";
function = "mmc0";
drive-strength = <30>;
bias-pull-up;
};
};
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>;
};
wdt0: watchdog@01c20ca0 {
compatible = "allwinner,sun6i-a31-wdt";
reg = <0x01c20ca0 0x20>;
interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
};
uart0: serial@01c28000 {
compatible = "snps,dw-apb-uart";
reg = <0x01c28000 0x400>;
interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
clocks = <&ccu CLK_BUS_UART0>;
resets = <&ccu RST_BUS_UART0>;
status = "disabled";
};
uart1: serial@01c28400 {
compatible = "snps,dw-apb-uart";
reg = <0x01c28400 0x400>;
interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
clocks = <&ccu CLK_BUS_UART1>;
resets = <&ccu RST_BUS_UART1>;
status = "disabled";
};
uart2: serial@01c28800 {
compatible = "snps,dw-apb-uart";
reg = <0x01c28800 0x400>;
interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
clocks = <&ccu CLK_BUS_UART2>;
resets = <&ccu RST_BUS_UART2>;
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(4) | IRQ_TYPE_LEVEL_HIGH)>;
};
};
};

View file

@ -4,7 +4,43 @@
* Copyright (C) 2016 Socionext Inc. * Copyright (C) 2016 Socionext Inc.
* Author: Masahiro Yamada <yamada.masahiro@socionext.com> * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
* *
* SPDX-License-Identifier: GPL-2.0+ X11 * This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/ */
/memreserve/ 0x80000000 0x00080000; /memreserve/ 0x80000000 0x00080000;
@ -53,31 +89,31 @@
compatible = "operating-points-v2"; compatible = "operating-points-v2";
opp-shared; opp-shared;
opp@245000000 { opp-245000000 {
opp-hz = /bits/ 64 <245000000>; opp-hz = /bits/ 64 <245000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@250000000 { opp-250000000 {
opp-hz = /bits/ 64 <250000000>; opp-hz = /bits/ 64 <250000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@490000000 { opp-490000000 {
opp-hz = /bits/ 64 <490000000>; opp-hz = /bits/ 64 <490000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@500000000 { opp-500000000 {
opp-hz = /bits/ 64 <500000000>; opp-hz = /bits/ 64 <500000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@653334000 { opp-653334000 {
opp-hz = /bits/ 64 <653334000>; opp-hz = /bits/ 64 <653334000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@666667000 { opp-666667000 {
opp-hz = /bits/ 64 <666667000>; opp-hz = /bits/ 64 <666667000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@980000000 { opp-980000000 {
opp-hz = /bits/ 64 <980000000>; opp-hz = /bits/ 64 <980000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
@ -279,6 +315,11 @@
bus-width = <8>; bus-width = <8>;
mmc-ddr-1_8v; mmc-ddr-1_8v;
mmc-hs200-1_8v; mmc-hs200-1_8v;
cdns,phy-input-delay-legacy = <4>;
cdns,phy-input-delay-mmc-highspeed = <2>;
cdns,phy-input-delay-mmc-ddr = <3>;
cdns,phy-dll-delay-sdclk = <21>;
cdns,phy-dll-delay-sdclk-hsmmc = <21>;
}; };
usb0: usb@5a800100 { usb0: usb@5a800100 {
@ -377,7 +418,7 @@
}; };
nand: nand@68000000 { nand: nand@68000000 {
compatible = "socionext,denali-nand-v5b"; compatible = "socionext,uniphier-denali-nand-v5b";
status = "disabled"; status = "disabled";
reg-names = "nand_data", "denali_reg"; reg-names = "nand_data", "denali_reg";
reg = <0x68000000 0x20>, <0x68100000 0x1000>; reg = <0x68000000 0x20>, <0x68100000 0x1000>;

View file

@ -4,7 +4,43 @@
* Copyright (C) 2015-2016 Socionext Inc. * Copyright (C) 2015-2016 Socionext Inc.
* Author: Masahiro Yamada <yamada.masahiro@socionext.com> * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
* *
* SPDX-License-Identifier: GPL-2.0+ X11 * This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/ */
/memreserve/ 0x80000000 0x00080000; /memreserve/ 0x80000000 0x00080000;
@ -80,35 +116,35 @@
compatible = "operating-points-v2"; compatible = "operating-points-v2";
opp-shared; opp-shared;
opp@250000000 { opp-250000000 {
opp-hz = /bits/ 64 <250000000>; opp-hz = /bits/ 64 <250000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@275000000 { opp-275000000 {
opp-hz = /bits/ 64 <275000000>; opp-hz = /bits/ 64 <275000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@500000000 { opp-500000000 {
opp-hz = /bits/ 64 <500000000>; opp-hz = /bits/ 64 <500000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@550000000 { opp-550000000 {
opp-hz = /bits/ 64 <550000000>; opp-hz = /bits/ 64 <550000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@666667000 { opp-666667000 {
opp-hz = /bits/ 64 <666667000>; opp-hz = /bits/ 64 <666667000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@733334000 { opp-733334000 {
opp-hz = /bits/ 64 <733334000>; opp-hz = /bits/ 64 <733334000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@1000000000 { opp-1000000000 {
opp-hz = /bits/ 64 <1000000000>; opp-hz = /bits/ 64 <1000000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@1100000000 { opp-1100000000 {
opp-hz = /bits/ 64 <1100000000>; opp-hz = /bits/ 64 <1100000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
@ -118,35 +154,35 @@
compatible = "operating-points-v2"; compatible = "operating-points-v2";
opp-shared; opp-shared;
opp@250000000 { opp-250000000 {
opp-hz = /bits/ 64 <250000000>; opp-hz = /bits/ 64 <250000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@275000000 { opp-275000000 {
opp-hz = /bits/ 64 <275000000>; opp-hz = /bits/ 64 <275000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@500000000 { opp-500000000 {
opp-hz = /bits/ 64 <500000000>; opp-hz = /bits/ 64 <500000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@550000000 { opp-550000000 {
opp-hz = /bits/ 64 <550000000>; opp-hz = /bits/ 64 <550000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@666667000 { opp-666667000 {
opp-hz = /bits/ 64 <666667000>; opp-hz = /bits/ 64 <666667000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@733334000 { opp-733334000 {
opp-hz = /bits/ 64 <733334000>; opp-hz = /bits/ 64 <733334000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@1000000000 { opp-1000000000 {
opp-hz = /bits/ 64 <1000000000>; opp-hz = /bits/ 64 <1000000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@1100000000 { opp-1100000000 {
opp-hz = /bits/ 64 <1100000000>; opp-hz = /bits/ 64 <1100000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
@ -353,6 +389,11 @@
bus-width = <8>; bus-width = <8>;
mmc-ddr-1_8v; mmc-ddr-1_8v;
mmc-hs200-1_8v; mmc-hs200-1_8v;
cdns,phy-input-delay-legacy = <4>;
cdns,phy-input-delay-mmc-highspeed = <2>;
cdns,phy-input-delay-mmc-ddr = <3>;
cdns,phy-dll-delay-sdclk = <21>;
cdns,phy-dll-delay-sdclk-hsmmc = <21>;
}; };
sd: sdhc@5a400000 { sd: sdhc@5a400000 {
@ -429,7 +470,7 @@
}; };
nand: nand@68000000 { nand: nand@68000000 {
compatible = "socionext,denali-nand-v5b"; compatible = "socionext,uniphier-denali-nand-v5b";
status = "disabled"; status = "disabled";
reg-names = "nand_data", "denali_reg"; reg-names = "nand_data", "denali_reg";
reg = <0x68000000 0x20>, <0x68100000 0x1000>; reg = <0x68000000 0x20>, <0x68100000 0x1000>;

View file

@ -4,7 +4,43 @@
* Copyright (C) 2015-2016 Socionext Inc. * Copyright (C) 2015-2016 Socionext Inc.
* Author: Masahiro Yamada <yamada.masahiro@socionext.com> * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
* *
* SPDX-License-Identifier: GPL-2.0+ X11 * This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/ */
/ { / {
@ -41,67 +77,67 @@
compatible = "operating-points-v2"; compatible = "operating-points-v2";
opp-shared; opp-shared;
opp@100000000 { opp-100000000 {
opp-hz = /bits/ 64 <100000000>; opp-hz = /bits/ 64 <100000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@116667000 { opp-116667000 {
opp-hz = /bits/ 64 <116667000>; opp-hz = /bits/ 64 <116667000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@150000000 { opp-150000000 {
opp-hz = /bits/ 64 <150000000>; opp-hz = /bits/ 64 <150000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@175000000 { opp-175000000 {
opp-hz = /bits/ 64 <175000000>; opp-hz = /bits/ 64 <175000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@200000000 { opp-200000000 {
opp-hz = /bits/ 64 <200000000>; opp-hz = /bits/ 64 <200000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@233334000 { opp-233334000 {
opp-hz = /bits/ 64 <233334000>; opp-hz = /bits/ 64 <233334000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@300000000 { opp-300000000 {
opp-hz = /bits/ 64 <300000000>; opp-hz = /bits/ 64 <300000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@350000000 { opp-350000000 {
opp-hz = /bits/ 64 <350000000>; opp-hz = /bits/ 64 <350000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@400000000 { opp-400000000 {
opp-hz = /bits/ 64 <400000000>; opp-hz = /bits/ 64 <400000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@466667000 { opp-466667000 {
opp-hz = /bits/ 64 <466667000>; opp-hz = /bits/ 64 <466667000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@600000000 { opp-600000000 {
opp-hz = /bits/ 64 <600000000>; opp-hz = /bits/ 64 <600000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@700000000 { opp-700000000 {
opp-hz = /bits/ 64 <700000000>; opp-hz = /bits/ 64 <700000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@800000000 { opp-800000000 {
opp-hz = /bits/ 64 <800000000>; opp-hz = /bits/ 64 <800000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@933334000 { opp-933334000 {
opp-hz = /bits/ 64 <933334000>; opp-hz = /bits/ 64 <933334000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@1200000000 { opp-1200000000 {
opp-hz = /bits/ 64 <1200000000>; opp-hz = /bits/ 64 <1200000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@1400000000 { opp-1400000000 {
opp-hz = /bits/ 64 <1400000000>; opp-hz = /bits/ 64 <1400000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
@ -620,7 +656,7 @@
}; };
nand: nand@68000000 { nand: nand@68000000 {
compatible = "socionext,denali-nand-v5b"; compatible = "socionext,uniphier-denali-nand-v5b";
status = "disabled"; status = "disabled";
reg-names = "nand_data", "denali_reg"; reg-names = "nand_data", "denali_reg";
reg = <0x68000000 0x20>, <0x68100000 0x1000>; reg = <0x68000000 0x20>, <0x68100000 0x1000>;

View file

@ -4,7 +4,43 @@
* Copyright (C) 2015-2016 Socionext Inc. * Copyright (C) 2015-2016 Socionext Inc.
* Author: Masahiro Yamada <yamada.masahiro@socionext.com> * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
* *
* SPDX-License-Identifier: GPL-2.0+ X11 * This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/ */
/ { / {
@ -61,35 +97,35 @@
compatible = "operating-points-v2"; compatible = "operating-points-v2";
opp-shared; opp-shared;
opp@100000000 { opp-100000000 {
opp-hz = /bits/ 64 <100000000>; opp-hz = /bits/ 64 <100000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@150000000 { opp-150000000 {
opp-hz = /bits/ 64 <150000000>; opp-hz = /bits/ 64 <150000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@200000000 { opp-200000000 {
opp-hz = /bits/ 64 <200000000>; opp-hz = /bits/ 64 <200000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@300000000 { opp-300000000 {
opp-hz = /bits/ 64 <300000000>; opp-hz = /bits/ 64 <300000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@400000000 { opp-400000000 {
opp-hz = /bits/ 64 <400000000>; opp-hz = /bits/ 64 <400000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@600000000 { opp-600000000 {
opp-hz = /bits/ 64 <600000000>; opp-hz = /bits/ 64 <600000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@800000000 { opp-800000000 {
opp-hz = /bits/ 64 <800000000>; opp-hz = /bits/ 64 <800000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
opp@1200000000 { opp-1200000000 {
opp-hz = /bits/ 64 <1200000000>; opp-hz = /bits/ 64 <1200000000>;
clock-latency-ns = <300>; clock-latency-ns = <300>;
}; };
@ -632,7 +668,7 @@
}; };
nand: nand@68000000 { nand: nand@68000000 {
compatible = "socionext,denali-nand-v5b"; compatible = "socionext,uniphier-denali-nand-v5b";
status = "disabled"; status = "disabled";
reg-names = "nand_data", "denali_reg"; reg-names = "nand_data", "denali_reg";
reg = <0x68000000 0x20>, <0x68100000 0x1000>; reg = <0x68000000 0x20>, <0x68100000 0x1000>;

View file

@ -19,6 +19,7 @@
i2c0 = &i2c0; i2c0 = &i2c0;
i2c1 = &i2c1; i2c1 = &i2c1;
mmc0 = &sdhci0; mmc0 = &sdhci0;
usbotg0 = &usb0;
}; };
memory@0 { memory@0 {

View file

@ -29,6 +29,29 @@ config SECURE_BOOT
bool "Support i.MX HAB features" bool "Support i.MX HAB features"
depends on ARCH_MX7 || ARCH_MX6 || ARCH_MX5 depends on ARCH_MX7 || ARCH_MX6 || ARCH_MX5
select FSL_CAAM select FSL_CAAM
imply CMD_DEKBLOB
help help
This option enables the support for secure boot (HAB). This option enables the support for secure boot (HAB).
See doc/README.mxc_hab for more details. See doc/README.mxc_hab for more details.
config CMD_BMODE
bool "Support the 'bmode' command"
default y
depends on ARCH_MX7 || ARCH_MX6 || ARCH_MX5
help
This enables the 'bmode' (bootmode) command for forcing
a boot from specific media.
This is useful for forcing the ROM's usb downloader to
activate upon a watchdog reset which is nice when iterating
on U-Boot. Using the reset button or running bmode normal
will set it back to normal. This command currently
supports i.MX53 and i.MX6.
config CMD_DEKBLOB
bool "Support the 'dek_blob' command"
help
This enables the 'dek_blob' command which is used with the
Freescale secure boot mechanism. This command encapsulates and
creates a blob of data. See also CMD_BLOB and doc/README.mxc_hab for
more information.

View file

@ -28,7 +28,7 @@
#define BOOT_DEVICE_XIP 0x01 #define BOOT_DEVICE_XIP 0x01
#define BOOT_DEVICE_XIPWAIT 0x02 #define BOOT_DEVICE_XIPWAIT 0x02
#define BOOT_DEVICE_NAND 0x03 #define BOOT_DEVICE_NAND 0x03
#define BOOT_DEVICE_ONENAD 0x04 #define BOOT_DEVICE_ONENAND 0x04
#define BOOT_DEVICE_MMC2 0x05 /* ROM only supports 2nd instance. */ #define BOOT_DEVICE_MMC2 0x05 /* ROM only supports 2nd instance. */
#define BOOT_DEVICE_MMC1 0x06 #define BOOT_DEVICE_MMC1 0x06
#define BOOT_DEVICE_UART 0x43 #define BOOT_DEVICE_UART 0x43
@ -47,6 +47,7 @@
#define BOOT_DEVICE_UART 0x41 #define BOOT_DEVICE_UART 0x41
#define BOOT_DEVICE_USBETH 0x44 #define BOOT_DEVICE_USBETH 0x44
#define BOOT_DEVICE_CPGMAC 0x46 #define BOOT_DEVICE_CPGMAC 0x46
#define BOOT_DEVICE_ONENAND 0xFF /* ROM does not support OneNAND. */
#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1 #define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1
#define MMC_BOOT_DEVICES_END BOOT_DEVICE_MMC2 #define MMC_BOOT_DEVICES_END BOOT_DEVICE_MMC2

View file

@ -0,0 +1,52 @@
/*
* Copyright (c) 2017 Google, Inc
*
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef _ASM_ARCH_PERIPH_H
#define _ASM_ARCH_PERIPH_H
/*
* Peripherals supported by the hardware.
* These are used to specify pinctrl settings.
*/
enum periph_id {
PERIPH_ID_UART1,
PERIPH_ID_UART2,
PERIPH_ID_UART3,
PERIPH_ID_UART4,
PERIPH_ID_LPC,
PERIPH_ID_PWM0,
PERIPH_ID_PWM1,
PERIPH_ID_PWM2,
PERIPH_ID_PWM3,
PERIPH_ID_PWM4,
PERIPH_ID_PWM5,
PERIPH_ID_PWM6,
PERIPH_ID_PWM7,
PERIPH_ID_PWM8,
PERIPH_ID_MAC1,
PERIPH_ID_MAC2,
PERIPH_ID_VIDEO,
PERIPH_ID_SPI1,
PERIPH_ID_SPI2,
PERIPH_ID_I2C1,
PERIPH_ID_I2C2,
PERIPH_ID_I2C3,
PERIPH_ID_I2C4,
PERIPH_ID_I2C5,
PERIPH_ID_I2C6,
PERIPH_ID_I2C7,
PERIPH_ID_I2C8,
PERIPH_ID_I2C9,
PERIPH_ID_I2C10,
PERIPH_ID_I2C11,
PERIPH_ID_I2C12,
PERIPH_ID_I2C13,
PERIPH_ID_I2C14,
PERIPH_ID_SD1,
PERIPH_ID_SD2,
};
#endif /* _ASM_ARCH_SCU_AST2500_H */

View file

@ -8,28 +8,134 @@
#define SCU_UNLOCK_VALUE 0x1688a8a8 #define SCU_UNLOCK_VALUE 0x1688a8a8
#define SCU_HWSTRAP_VGAMEM_MASK 3
#define SCU_HWSTRAP_VGAMEM_SHIFT 2 #define SCU_HWSTRAP_VGAMEM_SHIFT 2
#define SCU_HWSTRAP_VGAMEM_MASK (3 << SCU_HWSTRAP_VGAMEM_SHIFT)
#define SCU_HWSTRAP_MAC1_RGMII (1 << 6)
#define SCU_HWSTRAP_MAC2_RGMII (1 << 7)
#define SCU_HWSTRAP_DDR4 (1 << 24) #define SCU_HWSTRAP_DDR4 (1 << 24)
#define SCU_HWSTRAP_CLKIN_25MHZ (1 << 23) #define SCU_HWSTRAP_CLKIN_25MHZ (1 << 23)
#define SCU_MPLL_DENUM_SHIFT 0 #define SCU_MPLL_DENUM_SHIFT 0
#define SCU_MPLL_DENUM_MASK 0x1f #define SCU_MPLL_DENUM_MASK 0x1f
#define SCU_MPLL_NUM_SHIFT 5 #define SCU_MPLL_NUM_SHIFT 5
#define SCU_MPLL_NUM_MASK 0xff #define SCU_MPLL_NUM_MASK (0xff << SCU_MPLL_NUM_SHIFT)
#define SCU_MPLL_POST_SHIFT 13 #define SCU_MPLL_POST_SHIFT 13
#define SCU_MPLL_POST_MASK 0x3f #define SCU_MPLL_POST_MASK (0x3f << SCU_MPLL_POST_SHIFT)
#define SCU_PCLK_DIV_SHIFT 23
#define SCU_PCLK_DIV_MASK (7 << SCU_PCLK_DIV_SHIFT)
#define SCU_HPLL_DENUM_SHIFT 0 #define SCU_HPLL_DENUM_SHIFT 0
#define SCU_HPLL_DENUM_MASK 0x1f #define SCU_HPLL_DENUM_MASK 0x1f
#define SCU_HPLL_NUM_SHIFT 5 #define SCU_HPLL_NUM_SHIFT 5
#define SCU_HPLL_NUM_MASK 0xff #define SCU_HPLL_NUM_MASK (0xff << SCU_HPLL_NUM_SHIFT)
#define SCU_HPLL_POST_SHIFT 13 #define SCU_HPLL_POST_SHIFT 13
#define SCU_HPLL_POST_MASK 0x3f #define SCU_HPLL_POST_MASK (0x3f << SCU_HPLL_POST_SHIFT)
#define SCU_MACCLK_SHIFT 16
#define SCU_MACCLK_MASK (7 << SCU_MACCLK_SHIFT)
#define SCU_MISC2_RGMII_HPLL (1 << 23)
#define SCU_MISC2_RGMII_CLKDIV_SHIFT 20
#define SCU_MISC2_RGMII_CLKDIV_MASK (3 << SCU_MISC2_RGMII_CLKDIV_SHIFT)
#define SCU_MISC2_RMII_MPLL (1 << 19)
#define SCU_MISC2_RMII_CLKDIV_SHIFT 16
#define SCU_MISC2_RMII_CLKDIV_MASK (3 << SCU_MISC2_RMII_CLKDIV_SHIFT)
#define SCU_MISC2_UARTCLK_SHIFT 24 #define SCU_MISC2_UARTCLK_SHIFT 24
#define SCU_MISC_D2PLL_OFF (1 << 4)
#define SCU_MISC_UARTCLK_DIV13 (1 << 12) #define SCU_MISC_UARTCLK_DIV13 (1 << 12)
#define SCU_MISC_GCRT_USB20CLK (1 << 21)
#define SCU_MICDS_MAC1RGMII_TXDLY_SHIFT 0
#define SCU_MICDS_MAC1RGMII_TXDLY_MASK (0x3f\
<< SCU_MICDS_MAC1RGMII_TXDLY_SHIFT)
#define SCU_MICDS_MAC2RGMII_TXDLY_SHIFT 6
#define SCU_MICDS_MAC2RGMII_TXDLY_MASK (0x3f\
<< SCU_MICDS_MAC2RGMII_TXDLY_SHIFT)
#define SCU_MICDS_MAC1RMII_RDLY_SHIFT 12
#define SCU_MICDS_MAC1RMII_RDLY_MASK (0x3f << SCU_MICDS_MAC1RMII_RDLY_SHIFT)
#define SCU_MICDS_MAC2RMII_RDLY_SHIFT 18
#define SCU_MICDS_MAC2RMII_RDLY_MASK (0x3f << SCU_MICDS_MAC2RMII_RDLY_SHIFT)
#define SCU_MICDS_MAC1RMII_TXFALL (1 << 24)
#define SCU_MICDS_MAC2RMII_TXFALL (1 << 25)
#define SCU_MICDS_RMII1_RCLKEN (1 << 29)
#define SCU_MICDS_RMII2_RCLKEN (1 << 30)
#define SCU_MICDS_RGMIIPLL (1 << 31)
/*
* SYSRESET is actually more like a Power register,
* except that corresponding bit set to 1 means that
* the peripheral is off.
*/
#define SCU_SYSRESET_XDMA (1 << 25)
#define SCU_SYSRESET_MCTP (1 << 24)
#define SCU_SYSRESET_ADC (1 << 23)
#define SCU_SYSRESET_JTAG (1 << 22)
#define SCU_SYSRESET_MIC (1 << 18)
#define SCU_SYSRESET_SDIO (1 << 16)
#define SCU_SYSRESET_USB11HOST (1 << 15)
#define SCU_SYSRESET_USBHUB (1 << 14)
#define SCU_SYSRESET_CRT (1 << 13)
#define SCU_SYSRESET_MAC2 (1 << 12)
#define SCU_SYSRESET_MAC1 (1 << 11)
#define SCU_SYSRESET_PECI (1 << 10)
#define SCU_SYSRESET_PWM (1 << 9)
#define SCU_SYSRESET_PCI_VGA (1 << 8)
#define SCU_SYSRESET_2D (1 << 7)
#define SCU_SYSRESET_VIDEO (1 << 6)
#define SCU_SYSRESET_LPC (1 << 5)
#define SCU_SYSRESET_HAC (1 << 4)
#define SCU_SYSRESET_USBHID (1 << 3)
#define SCU_SYSRESET_I2C (1 << 2)
#define SCU_SYSRESET_AHB (1 << 1)
#define SCU_SYSRESET_SDRAM_WDT (1 << 0)
/* Bits 16-27 in the register control pin functions for I2C devices 3-14 */
#define SCU_PINMUX_CTRL5_I2C (1 << 16)
/*
* The values are grouped by function, not by register.
* They are actually scattered across multiple loosely related registers.
*/
#define SCU_PIN_FUN_MAC1_MDC (1 << 30)
#define SCU_PIN_FUN_MAC1_MDIO (1 << 31)
#define SCU_PIN_FUN_MAC1_PHY_LINK (1 << 0)
#define SCU_PIN_FUN_MAC2_MDIO (1 << 2)
#define SCU_PIN_FUN_MAC2_PHY_LINK (1 << 1)
#define SCU_PIN_FUN_SCL1 (1 << 12)
#define SCU_PIN_FUN_SCL2 (1 << 14)
#define SCU_PIN_FUN_SDA1 (1 << 13)
#define SCU_PIN_FUN_SDA2 (1 << 15)
#define SCU_CLKSTOP_MAC1 (1 << 20)
#define SCU_CLKSTOP_MAC2 (1 << 21)
#define SCU_D2PLL_EXT1_OFF (1 << 0)
#define SCU_D2PLL_EXT1_BYPASS (1 << 1)
#define SCU_D2PLL_EXT1_RESET (1 << 2)
#define SCU_D2PLL_EXT1_MODE_SHIFT 3
#define SCU_D2PLL_EXT1_MODE_MASK (3 << SCU_D2PLL_EXT1_MODE_SHIFT)
#define SCU_D2PLL_EXT1_PARAM_SHIFT 5
#define SCU_D2PLL_EXT1_PARAM_MASK (0x1ff << SCU_D2PLL_EXT1_PARAM_SHIFT)
#define SCU_D2PLL_NUM_SHIFT 0
#define SCU_D2PLL_NUM_MASK (0xff << SCU_D2PLL_NUM_SHIFT)
#define SCU_D2PLL_DENUM_SHIFT 8
#define SCU_D2PLL_DENUM_MASK (0x1f << SCU_D2PLL_DENUM_SHIFT)
#define SCU_D2PLL_POST_SHIFT 13
#define SCU_D2PLL_POST_MASK (0x3f << SCU_D2PLL_POST_SHIFT)
#define SCU_D2PLL_ODIV_SHIFT 19
#define SCU_D2PLL_ODIV_MASK (7 << SCU_D2PLL_ODIV_SHIFT)
#define SCU_D2PLL_SIC_SHIFT 22
#define SCU_D2PLL_SIC_MASK (0x1f << SCU_D2PLL_SIC_SHIFT)
#define SCU_D2PLL_SIP_SHIFT 27
#define SCU_D2PLL_SIP_MASK (0x1f << SCU_D2PLL_SIP_SHIFT)
#define SCU_CLKDUTY_DCLK_SHIFT 0
#define SCU_CLKDUTY_DCLK_MASK (0x3f << SCU_CLKDUTY_DCLK_SHIFT)
#define SCU_CLKDUTY_RGMII1TXCK_SHIFT 8
#define SCU_CLKDUTY_RGMII1TXCK_MASK (0x7f << SCU_CLKDUTY_RGMII1TXCK_SHIFT)
#define SCU_CLKDUTY_RGMII2TXCK_SHIFT 16
#define SCU_CLKDUTY_RGMII2TXCK_MASK (0x7f << SCU_CLKDUTY_RGMII2TXCK_SHIFT)
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
@ -120,6 +226,20 @@ int ast_get_clk(struct udevice **devp);
*/ */
void *ast_get_scu(void); void *ast_get_scu(void);
/**
* ast_scu_unlock() - unlock protected registers
*
* @scu, pointer to ast2500_scu
*/
void ast_scu_unlock(struct ast2500_scu *scu);
/**
* ast_scu_lock() - lock protected registers
*
* @scu, pointer to ast2500_scu
*/
void ast_scu_lock(struct ast2500_scu *scu);
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* _ASM_ARCH_SCU_AST2500_H */ #endif /* _ASM_ARCH_SCU_AST2500_H */

View file

@ -67,33 +67,39 @@ struct ast_wdt {
u32 timeout_status; u32 timeout_status;
u32 clr_timeout_status; u32 clr_timeout_status;
u32 reset_width; u32 reset_width;
#ifdef CONFIG_ASPEED_AST2500 /* On pre-ast2500 SoCs this register is reserved. */
u32 reset_mask; u32 reset_mask;
#else
u32 reserved0;
#endif
}; };
void wdt_stop(struct ast_wdt *wdt); /**
void wdt_start(struct ast_wdt *wdt, u32 timeout); * Given flags parameter passed to wdt_reset or wdt_start uclass functions,
* gets Reset Mode value from it.
*
* @flags: flags parameter passed into wdt_reset or wdt_start
* @return Reset Mode value
*/
u32 ast_reset_mode_from_flags(ulong flags);
/** /**
* Reset peripherals specified by mask * Given flags parameter passed to wdt_reset or wdt_start uclass functions,
* gets Reset Mask value from it. Reset Mask is only supported on ast2500
* *
* Note, that this is only supported by ast2500 SoC * @flags: flags parameter passed into wdt_reset or wdt_start
* * @return Reset Mask value
* @wdt: watchdog to use for this reset
* @mask: reset mask.
*/ */
int ast_wdt_reset_masked(struct ast_wdt *wdt, u32 mask); u32 ast_reset_mask_from_flags(ulong flags);
/** /**
* ast_get_wdt() - get a pointer to watchdog registers * Given Reset Mask and Reset Mode values, converts them to flags,
* suitable for passing into wdt_start or wdt_reset uclass functions.
* *
* @wdt_number: 0-based WDT peripheral number * On ast2500 Reset Mask is 25 bits wide and Reset Mode is 2 bits wide, so they
* @return pointer to registers or -ve error on error * can both be packed into single 32 bits wide value.
*
* @reset_mode: Reset Mode
* @reset_mask: Reset Mask
*/ */
struct ast_wdt *ast_get_wdt(u8 wdt_number); ulong ast_flags_from_reset_mode_mask(u32 reset_mode, u32 reset_mask);
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* _ASM_ARCH_WDT_H */ #endif /* _ASM_ARCH_WDT_H */

View file

@ -18,7 +18,7 @@
*/ */
#define CONFIG_SYS_MEM_RESERVE_SECURE (2048 * 1024) /* 2MB */ #define CONFIG_SYS_MEM_RESERVE_SECURE (2048 * 1024) /* 2MB */
#ifdef CONFIG_LS2080A #ifdef CONFIG_ARCH_LS2080A
#define CONFIG_SYS_FSL_CLUSTER_CLOCKS { 1, 1, 4, 4 } #define CONFIG_SYS_FSL_CLUSTER_CLOCKS { 1, 1, 4, 4 }
#define SRDS_MAX_LANES 8 #define SRDS_MAX_LANES 8
#define CONFIG_SYS_PAGE_SIZE 0x10000 #define CONFIG_SYS_PAGE_SIZE 0x10000
@ -132,7 +132,7 @@
#define CONFIG_SYS_FSL_PEX_LUT_BE #define CONFIG_SYS_FSL_PEX_LUT_BE
/* SoC related */ /* SoC related */
#ifdef CONFIG_LS1043A #ifdef CONFIG_ARCH_LS1043A
#define CONFIG_SYS_FMAN_V3 #define CONFIG_SYS_FMAN_V3
#define CONFIG_SYS_NUM_FMAN 1 #define CONFIG_SYS_NUM_FMAN 1
#define CONFIG_SYS_NUM_FM1_DTSEC 7 #define CONFIG_SYS_NUM_FM1_DTSEC 7
@ -185,7 +185,12 @@
#elif defined(CONFIG_ARCH_LS1012A) #elif defined(CONFIG_ARCH_LS1012A)
#define GICD_BASE 0x01401000 #define GICD_BASE 0x01401000
#define GICC_BASE 0x01402000 #define GICC_BASE 0x01402000
#define CONFIG_SYS_FSL_SFP_VER_3_2
#define CONFIG_SYS_FSL_SEC_MON_BE
#define CONFIG_SYS_FSL_SFP_BE
#define CONFIG_SYS_FSL_SRK_LE
#define CONFIG_KEY_REVOCATION
#define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
#define CONFIG_SYS_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30) #define CONFIG_SYS_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
#define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_DDR_BLOCK1_SIZE #define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_DDR_BLOCK1_SIZE
@ -199,7 +204,7 @@
#define CONFIG_SYS_FSL_IFC_BE #define CONFIG_SYS_FSL_IFC_BE
#define CONFIG_SYS_FSL_SFP_VER_3_2 #define CONFIG_SYS_FSL_SFP_VER_3_2
#define CONFIG_SYS_FSL_SNVS_LE #define CONFIG_SYS_FSL_SEC_MON_BE
#define CONFIG_SYS_FSL_SFP_BE #define CONFIG_SYS_FSL_SFP_BE
#define CONFIG_SYS_FSL_SRK_LE #define CONFIG_SYS_FSL_SRK_LE
#define CONFIG_KEY_REVOCATION #define CONFIG_KEY_REVOCATION

View file

@ -249,7 +249,7 @@ static struct mm_region final_map[] = {
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
}, },
#ifdef CONFIG_LS2080A #ifdef CONFIG_ARCH_LS2080A
{ CONFIG_SYS_PCIE4_PHYS_ADDR, CONFIG_SYS_PCIE4_PHYS_ADDR, { CONFIG_SYS_PCIE4_PHYS_ADDR, CONFIG_SYS_PCIE4_PHYS_ADDR,
CONFIG_SYS_PCIE4_PHYS_SIZE, CONFIG_SYS_PCIE4_PHYS_SIZE,
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |

View file

@ -9,7 +9,7 @@
#include <config.h> #include <config.h>
#ifdef CONFIG_LS2080A #ifdef CONFIG_ARCH_LS2080A
enum srds_prtcl { enum srds_prtcl {
/* /*
* Nobody will check whether the device 'NONE' has been configured, * Nobody will check whether the device 'NONE' has been configured,

View file

@ -31,7 +31,11 @@ extern u64 __spin_table[];
extern u64 __real_cntfrq; extern u64 __real_cntfrq;
extern u64 *secondary_boot_code; extern u64 *secondary_boot_code;
extern size_t __secondary_boot_code_size; extern size_t __secondary_boot_code_size;
#ifdef CONFIG_MP
int fsl_layerscape_wake_seconday_cores(void); int fsl_layerscape_wake_seconday_cores(void);
#else
static inline int fsl_layerscape_wake_seconday_cores(void) { return 0; }
#endif
void *get_spin_tbl_addr(void); void *get_spin_tbl_addr(void);
phys_addr_t determine_mp_bootpg(void); phys_addr_t determine_mp_bootpg(void);
void secondary_boot_func(void); void secondary_boot_func(void);

View file

@ -108,7 +108,7 @@
#define DCU_LAYER_MAX_NUM 16 #define DCU_LAYER_MAX_NUM 16
#ifdef CONFIG_LS102XA #ifdef CONFIG_ARCH_LS1021A
#define CONFIG_USB_MAX_CONTROLLER_COUNT 1 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
#define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1 #define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
#else #else

View file

@ -17,7 +17,7 @@ struct i2c {
unsigned short res2; unsigned short res2;
unsigned short stat; /* 0x08 */ unsigned short stat; /* 0x08 */
unsigned short res3; unsigned short res3;
unsigned short iv; /* 0x0C */ unsigned short we; /* 0x0C */
unsigned short res4; unsigned short res4;
unsigned short syss; /* 0x10 */ unsigned short syss; /* 0x10 */
unsigned short res4a; unsigned short res4a;
@ -43,6 +43,18 @@ struct i2c {
unsigned short res14; unsigned short res14;
unsigned short systest; /* 0x3c */ unsigned short systest; /* 0x3c */
unsigned short res15; unsigned short res15;
unsigned short bufstat; /* 0x40 */
unsigned short res16;
unsigned short oa1; /* 0x44 */
unsigned short res17;
unsigned short oa2; /* 0x48 */
unsigned short res18;
unsigned short oa3; /* 0x4c */
unsigned short res19;
unsigned short actoa; /* 0x50 */
unsigned short res20;
unsigned short sblock; /* 0x54 */
unsigned short res21;
}; };
#endif /* _OMAP3_I2C_H_ */ #endif /* _OMAP3_I2C_H_ */

View file

@ -13,10 +13,15 @@
*/ */
extern u32 SAVE_SP_ADDR; extern u32 SAVE_SP_ADDR;
/* /**
* Hand control back to the bootrom to load another * Hand control back to the bootrom to load another
* boot stage. * boot stage.
*/ */
extern void back_to_bootrom(void); void back_to_bootrom(void);
/**
* Assembler component for the above (do not call this directly)
*/
void _back_to_bootrom_s(void);
#endif #endif

View file

@ -337,6 +337,14 @@ enum {
GRF_GPIO2B4_SEL_MASK = 3 << GRF_GPIO2B4_SEL_SHIFT, GRF_GPIO2B4_SEL_MASK = 3 << GRF_GPIO2B4_SEL_SHIFT,
GRF_SPI2TPM_CSN0 = 1, GRF_SPI2TPM_CSN0 = 1,
/* GRF_GPIO2C_IOMUX */
GRF_GPIO2C0_SEL_SHIFT = 0,
GRF_GPIO2C0_SEL_MASK = 3 << GRF_GPIO2C0_SEL_SHIFT,
GRF_UART0BT_SIN = 1,
GRF_GPIO2C1_SEL_SHIFT = 2,
GRF_GPIO2C1_SEL_MASK = 3 << GRF_GPIO2C1_SEL_SHIFT,
GRF_UART0BT_SOUT = 1,
/* GRF_GPIO3A_IOMUX */ /* GRF_GPIO3A_IOMUX */
GRF_GPIO3A0_SEL_SHIFT = 0, GRF_GPIO3A0_SEL_SHIFT = 0,
GRF_GPIO3A0_SEL_MASK = 3 << GRF_GPIO3A0_SEL_SHIFT, GRF_GPIO3A0_SEL_MASK = 3 << GRF_GPIO3A0_SEL_SHIFT,

View file

@ -7,6 +7,7 @@
#ifndef _STM32_GPIO_H_ #ifndef _STM32_GPIO_H_
#define _STM32_GPIO_H_ #define _STM32_GPIO_H_
#include <asm/gpio.h>
enum stm32_gpio_port { enum stm32_gpio_port {
STM32_GPIO_PORT_A = 0, STM32_GPIO_PORT_A = 0,
@ -96,6 +97,22 @@ struct stm32_gpio_ctl {
enum stm32_gpio_af af; enum stm32_gpio_af af;
}; };
struct stm32_gpio_regs {
u32 moder; /* GPIO port mode */
u32 otyper; /* GPIO port output type */
u32 ospeedr; /* GPIO port output speed */
u32 pupdr; /* GPIO port pull-up/pull-down */
u32 idr; /* GPIO port input data */
u32 odr; /* GPIO port output data */
u32 bsrr; /* GPIO port bit set/reset */
u32 lckr; /* GPIO port configuration lock */
u32 afr[2]; /* GPIO alternate function */
};
struct stm32_gpio_priv {
struct stm32_gpio_regs *regs;
};
static inline unsigned stm32_gpio_to_port(unsigned gpio) static inline unsigned stm32_gpio_to_port(unsigned gpio)
{ {
return gpio / 16; return gpio / 16;
@ -106,8 +123,4 @@ static inline unsigned stm32_gpio_to_pin(unsigned gpio)
return gpio % 16; return gpio % 16;
} }
int stm32_gpio_config(const struct stm32_gpio_dsc *gpio_dsc,
const struct stm32_gpio_ctl *gpio_ctl);
int stm32_gpout_set(const struct stm32_gpio_dsc *gpio_dsc, int state);
#endif /* _STM32_GPIO_H_ */ #endif /* _STM32_GPIO_H_ */

View file

@ -25,7 +25,7 @@ struct sunxi_ccm_reg {
u32 pll6_cfg; /* 0x28 pll6 control */ u32 pll6_cfg; /* 0x28 pll6 control */
u32 reserved5; u32 reserved5;
u32 pll7_cfg; /* 0x30 pll7 control */ u32 pll7_cfg; /* 0x30 pll7 control */
u32 reserved6; u32 sata_pll_cfg; /* 0x34 SATA pll control (R40 only) */
u32 pll8_cfg; /* 0x38 pll8 control */ u32 pll8_cfg; /* 0x38 pll8 control */
u32 reserved7; u32 reserved7;
u32 mipi_pll_cfg; /* 0x40 MIPI pll control */ u32 mipi_pll_cfg; /* 0x40 MIPI pll control */
@ -58,7 +58,8 @@ struct sunxi_ccm_reg {
u32 i2s1_clk_cfg; /* 0xb4 I2S1 clock control */ u32 i2s1_clk_cfg; /* 0xb4 I2S1 clock control */
u32 reserved10[2]; u32 reserved10[2];
u32 spdif_clk_cfg; /* 0xc0 SPDIF clock control */ u32 spdif_clk_cfg; /* 0xc0 SPDIF clock control */
u32 reserved11[2]; u32 reserved11;
u32 sata_clk_cfg; /* 0xc8 SATA clock control (R40 only) */
u32 usb_clk_cfg; /* 0xcc USB clock control */ u32 usb_clk_cfg; /* 0xcc USB clock control */
u32 gmac_clk_cfg; /* 0xd0 GMAC clock control */ u32 gmac_clk_cfg; /* 0xd0 GMAC clock control */
u32 reserved12[7]; u32 reserved12[7];
@ -67,13 +68,22 @@ struct sunxi_ccm_reg {
u32 dram_pll_cfg; /* 0xf8 PLL_DDR cfg register, A33 only */ u32 dram_pll_cfg; /* 0xf8 PLL_DDR cfg register, A33 only */
u32 mbus_reset; /* 0xfc MBUS reset control, A33 only */ u32 mbus_reset; /* 0xfc MBUS reset control, A33 only */
u32 dram_clk_gate; /* 0x100 DRAM module gating */ u32 dram_clk_gate; /* 0x100 DRAM module gating */
#ifdef CONFIG_SUNXI_DE2
u32 de_clk_cfg; /* 0x104 DE module clock */
#else
u32 be0_clk_cfg; /* 0x104 BE0 module clock */ u32 be0_clk_cfg; /* 0x104 BE0 module clock */
#endif
u32 be1_clk_cfg; /* 0x108 BE1 module clock */ u32 be1_clk_cfg; /* 0x108 BE1 module clock */
u32 fe0_clk_cfg; /* 0x10c FE0 module clock */ u32 fe0_clk_cfg; /* 0x10c FE0 module clock */
u32 fe1_clk_cfg; /* 0x110 FE1 module clock */ u32 fe1_clk_cfg; /* 0x110 FE1 module clock */
u32 mp_clk_cfg; /* 0x114 MP module clock */ u32 mp_clk_cfg; /* 0x114 MP module clock */
#ifdef CONFIG_SUNXI_DE2
u32 lcd0_clk_cfg; /* 0x118 LCD0 module clock */
u32 lcd1_clk_cfg; /* 0x11c LCD1 module clock */
#else
u32 lcd0_ch0_clk_cfg; /* 0x118 LCD0 CH0 module clock */ u32 lcd0_ch0_clk_cfg; /* 0x118 LCD0 CH0 module clock */
u32 lcd1_ch0_clk_cfg; /* 0x11c LCD1 CH0 module clock */ u32 lcd1_ch0_clk_cfg; /* 0x11c LCD1 CH0 module clock */
#endif
u32 reserved14[3]; u32 reserved14[3];
u32 lcd0_ch1_clk_cfg; /* 0x12c LCD0 CH1 module clock */ u32 lcd0_ch1_clk_cfg; /* 0x12c LCD0 CH1 module clock */
u32 lcd1_ch1_clk_cfg; /* 0x130 LCD1 CH1 module clock */ u32 lcd1_ch1_clk_cfg; /* 0x130 LCD1 CH1 module clock */
@ -85,7 +95,11 @@ struct sunxi_ccm_reg {
u32 dmic_clk_cfg; /* 0x148 Digital Mic module clock*/ u32 dmic_clk_cfg; /* 0x148 Digital Mic module clock*/
u32 reserved15; u32 reserved15;
u32 hdmi_clk_cfg; /* 0x150 HDMI module clock */ u32 hdmi_clk_cfg; /* 0x150 HDMI module clock */
#ifdef CONFIG_SUNXI_DE2
u32 hdmi_slow_clk_cfg; /* 0x154 HDMI slow module clock */
#else
u32 ps_clk_cfg; /* 0x154 PS module clock */ u32 ps_clk_cfg; /* 0x154 PS module clock */
#endif
u32 mtc_clk_cfg; /* 0x158 MTC module clock */ u32 mtc_clk_cfg; /* 0x158 MTC module clock */
u32 mbus0_clk_cfg; /* 0x15c MBUS0 module clock */ u32 mbus0_clk_cfg; /* 0x15c MBUS0 module clock */
u32 mbus1_clk_cfg; /* 0x160 MBUS1 module clock */ u32 mbus1_clk_cfg; /* 0x160 MBUS1 module clock */
@ -142,6 +156,8 @@ struct sunxi_ccm_reg {
u32 apb2_reset_cfg; /* 0x2d8 APB2 Reset config */ u32 apb2_reset_cfg; /* 0x2d8 APB2 Reset config */
u32 reserved25[5]; u32 reserved25[5];
u32 ccu_sec_switch; /* 0x2f0 CCU Security Switch, H3 only */ u32 ccu_sec_switch; /* 0x2f0 CCU Security Switch, H3 only */
u32 reserved26[11];
u32 pll_lock_ctrl; /* 0x320 PLL lock control, R40 only */
}; };
/* apb2 bit field */ /* apb2 bit field */
@ -191,6 +207,7 @@ struct sunxi_ccm_reg {
#define CCM_PLL3_CTRL_N_MASK (0x7f << CCM_PLL3_CTRL_N_SHIFT) #define CCM_PLL3_CTRL_N_MASK (0x7f << CCM_PLL3_CTRL_N_SHIFT)
#define CCM_PLL3_CTRL_N(n) ((((n) - 1) & 0x7f) << 8) #define CCM_PLL3_CTRL_N(n) ((((n) - 1) & 0x7f) << 8)
#define CCM_PLL3_CTRL_INTEGER_MODE (0x1 << 24) #define CCM_PLL3_CTRL_INTEGER_MODE (0x1 << 24)
#define CCM_PLL3_CTRL_LOCK (0x1 << 28)
#define CCM_PLL3_CTRL_EN (0x1 << 31) #define CCM_PLL3_CTRL_EN (0x1 << 31)
#define CCM_PLL5_CTRL_M(n) ((((n) - 1) & 0x3) << 0) #define CCM_PLL5_CTRL_M(n) ((((n) - 1) & 0x3) << 0)
@ -208,6 +225,8 @@ struct sunxi_ccm_reg {
#define CCM_PLL6_CTRL_K_MASK (0x3 << CCM_PLL6_CTRL_K_SHIFT) #define CCM_PLL6_CTRL_K_MASK (0x3 << CCM_PLL6_CTRL_K_SHIFT)
#define CCM_PLL6_CTRL_LOCK (1 << 28) #define CCM_PLL6_CTRL_LOCK (1 << 28)
#define CCM_SATA_PLL_DEFAULT 0x90005811 /* 100 MHz */
#define CCM_MIPI_PLL_CTRL_M_SHIFT 0 #define CCM_MIPI_PLL_CTRL_M_SHIFT 0
#define CCM_MIPI_PLL_CTRL_M_MASK (0xf << CCM_MIPI_PLL_CTRL_M_SHIFT) #define CCM_MIPI_PLL_CTRL_M_MASK (0xf << CCM_MIPI_PLL_CTRL_M_SHIFT)
#define CCM_MIPI_PLL_CTRL_M(n) ((((n) - 1) & 0xf) << 0) #define CCM_MIPI_PLL_CTRL_M(n) ((((n) - 1) & 0xf) << 0)
@ -220,6 +239,16 @@ struct sunxi_ccm_reg {
#define CCM_MIPI_PLL_CTRL_LDO_EN (0x3 << 22) #define CCM_MIPI_PLL_CTRL_LDO_EN (0x3 << 22)
#define CCM_MIPI_PLL_CTRL_EN (0x1 << 31) #define CCM_MIPI_PLL_CTRL_EN (0x1 << 31)
#define CCM_PLL10_CTRL_M_SHIFT 0
#define CCM_PLL10_CTRL_M_MASK (0xf << CCM_PLL10_CTRL_M_SHIFT)
#define CCM_PLL10_CTRL_M(n) ((((n) - 1) & 0xf) << 0)
#define CCM_PLL10_CTRL_N_SHIFT 8
#define CCM_PLL10_CTRL_N_MASK (0x7f << CCM_PLL10_CTRL_N_SHIFT)
#define CCM_PLL10_CTRL_N(n) ((((n) - 1) & 0x7f) << 8)
#define CCM_PLL10_CTRL_INTEGER_MODE (0x1 << 24)
#define CCM_PLL10_CTRL_LOCK (0x1 << 28)
#define CCM_PLL10_CTRL_EN (0x1 << 31)
#define CCM_PLL11_CTRL_N(n) ((((n) - 1) & 0x3f) << 8) #define CCM_PLL11_CTRL_N(n) ((((n) - 1) & 0x3f) << 8)
#define CCM_PLL11_CTRL_SIGMA_DELTA_EN (0x1 << 24) #define CCM_PLL11_CTRL_SIGMA_DELTA_EN (0x1 << 24)
#define CCM_PLL11_CTRL_UPD (0x1 << 30) #define CCM_PLL11_CTRL_UPD (0x1 << 30)
@ -254,7 +283,12 @@ struct sunxi_ccm_reg {
#define AHB_GATE_OFFSET_USB_EHCI1 27 #define AHB_GATE_OFFSET_USB_EHCI1 27
#define AHB_GATE_OFFSET_USB_EHCI0 26 #define AHB_GATE_OFFSET_USB_EHCI0 26
#endif #endif
#ifndef CONFIG_MACH_SUN8I_R40
#define AHB_GATE_OFFSET_USB0 24 #define AHB_GATE_OFFSET_USB0 24
#else
#define AHB_GATE_OFFSET_USB0 25
#define AHB_GATE_OFFSET_SATA 24
#endif
#define AHB_GATE_OFFSET_MCTL 14 #define AHB_GATE_OFFSET_MCTL 14
#define AHB_GATE_OFFSET_GMAC 17 #define AHB_GATE_OFFSET_GMAC 17
#define AHB_GATE_OFFSET_NAND0 13 #define AHB_GATE_OFFSET_NAND0 13
@ -271,9 +305,15 @@ struct sunxi_ccm_reg {
#define AHB_GATE_OFFSET_DRC0 25 #define AHB_GATE_OFFSET_DRC0 25
#define AHB_GATE_OFFSET_DE_FE0 14 #define AHB_GATE_OFFSET_DE_FE0 14
#define AHB_GATE_OFFSET_DE_BE0 12 #define AHB_GATE_OFFSET_DE_BE0 12
#define AHB_GATE_OFFSET_DE 12
#define AHB_GATE_OFFSET_HDMI 11 #define AHB_GATE_OFFSET_HDMI 11
#ifndef CONFIG_SUNXI_DE2
#define AHB_GATE_OFFSET_LCD1 5 #define AHB_GATE_OFFSET_LCD1 5
#define AHB_GATE_OFFSET_LCD0 4 #define AHB_GATE_OFFSET_LCD0 4
#else
#define AHB_GATE_OFFSET_LCD1 4
#define AHB_GATE_OFFSET_LCD0 3
#endif
#define CCM_MMC_CTRL_M(x) ((x) - 1) #define CCM_MMC_CTRL_M(x) ((x) - 1)
#define CCM_MMC_CTRL_OCLK_DLY(x) ((x) << 8) #define CCM_MMC_CTRL_OCLK_DLY(x) ((x) << 8)
@ -283,6 +323,9 @@ struct sunxi_ccm_reg {
#define CCM_MMC_CTRL_PLL6 (0x1 << 24) #define CCM_MMC_CTRL_PLL6 (0x1 << 24)
#define CCM_MMC_CTRL_ENABLE (0x1 << 31) #define CCM_MMC_CTRL_ENABLE (0x1 << 31)
#define CCM_SATA_CTRL_ENABLE (0x1 << 31)
#define CCM_SATA_CTRL_USE_EXTCLK (0x1 << 24)
#define CCM_USB_CTRL_PHY0_RST (0x1 << 0) #define CCM_USB_CTRL_PHY0_RST (0x1 << 0)
#define CCM_USB_CTRL_PHY1_RST (0x1 << 1) #define CCM_USB_CTRL_PHY1_RST (0x1 << 1)
#define CCM_USB_CTRL_PHY2_RST (0x1 << 2) #define CCM_USB_CTRL_PHY2_RST (0x1 << 2)
@ -355,6 +398,12 @@ struct sunxi_ccm_reg {
#define CCM_LCD_CH1_CTRL_PLL7_2X (3 << 24) #define CCM_LCD_CH1_CTRL_PLL7_2X (3 << 24)
#define CCM_LCD_CH1_CTRL_GATE (0x1 << 31) #define CCM_LCD_CH1_CTRL_GATE (0x1 << 31)
#define CCM_LCD0_CTRL_GATE (0x1 << 31)
#define CCM_LCD0_CTRL_M(n) ((((n) - 1) & 0xf) << 0)
#define CCM_LCD1_CTRL_GATE (0x1 << 31)
#define CCM_LCD1_CTRL_M(n) ((((n) - 1) & 0xf) << 0)
#define CCM_HDMI_CTRL_M(n) ((((n) - 1) & 0xf) << 0) #define CCM_HDMI_CTRL_M(n) ((((n) - 1) & 0xf) << 0)
#define CCM_HDMI_CTRL_PLL_MASK (3 << 24) #define CCM_HDMI_CTRL_PLL_MASK (3 << 24)
#define CCM_HDMI_CTRL_PLL3 (0 << 24) #define CCM_HDMI_CTRL_PLL3 (0 << 24)
@ -364,6 +413,8 @@ struct sunxi_ccm_reg {
#define CCM_HDMI_CTRL_DDC_GATE (0x1 << 30) #define CCM_HDMI_CTRL_DDC_GATE (0x1 << 30)
#define CCM_HDMI_CTRL_GATE (0x1 << 31) #define CCM_HDMI_CTRL_GATE (0x1 << 31)
#define CCM_HDMI_SLOW_CTRL_DDC_GATE (1 << 31)
#if defined(CONFIG_MACH_SUN50I) #if defined(CONFIG_MACH_SUN50I)
#define MBUS_CLK_DEFAULT 0x81000002 /* PLL6x2 / 3 */ #define MBUS_CLK_DEFAULT 0x81000002 /* PLL6x2 / 3 */
#elif defined(CONFIG_MACH_SUN8I) #elif defined(CONFIG_MACH_SUN8I)
@ -377,6 +428,9 @@ struct sunxi_ccm_reg {
#define CCM_PLL11_PATTERN 0xf5860000 #define CCM_PLL11_PATTERN 0xf5860000
/* ahb_reset0 offsets */ /* ahb_reset0 offsets */
#ifdef CONFIG_MACH_SUN8I_R40
#define AHB_RESET_OFFSET_SATA 24
#endif
#define AHB_RESET_OFFSET_GMAC 17 #define AHB_RESET_OFFSET_GMAC 17
#define AHB_RESET_OFFSET_MCTL 14 #define AHB_RESET_OFFSET_MCTL 14
#define AHB_RESET_OFFSET_MMC3 11 #define AHB_RESET_OFFSET_MMC3 11
@ -391,9 +445,16 @@ struct sunxi_ccm_reg {
#define AHB_RESET_OFFSET_DRC0 25 #define AHB_RESET_OFFSET_DRC0 25
#define AHB_RESET_OFFSET_DE_FE0 14 #define AHB_RESET_OFFSET_DE_FE0 14
#define AHB_RESET_OFFSET_DE_BE0 12 #define AHB_RESET_OFFSET_DE_BE0 12
#define AHB_RESET_OFFSET_DE 12
#define AHB_RESET_OFFSET_HDMI 11 #define AHB_RESET_OFFSET_HDMI 11
#define AHB_RESET_OFFSET_HDMI2 10
#ifndef CONFIG_SUNXI_DE2
#define AHB_RESET_OFFSET_LCD1 5 #define AHB_RESET_OFFSET_LCD1 5
#define AHB_RESET_OFFSET_LCD0 4 #define AHB_RESET_OFFSET_LCD0 4
#else
#define AHB_RESET_OFFSET_LCD1 4
#define AHB_RESET_OFFSET_LCD0 3
#endif
/* ahb_reset2 offsets */ /* ahb_reset2 offsets */
#define AHB_RESET_OFFSET_EPHY 2 #define AHB_RESET_OFFSET_EPHY 2
@ -416,6 +477,13 @@ struct sunxi_ccm_reg {
#define CCM_DE_CTRL_PLL10 (5 << 24) #define CCM_DE_CTRL_PLL10 (5 << 24)
#define CCM_DE_CTRL_GATE (1 << 31) #define CCM_DE_CTRL_GATE (1 << 31)
/* CCM bits common to all Display Engine 2.0 clock ctrl regs */
#define CCM_DE2_CTRL_M(n) ((((n) - 1) & 0xf) << 0)
#define CCM_DE2_CTRL_PLL_MASK (3 << 24)
#define CCM_DE2_CTRL_PLL6_2X (0 << 24)
#define CCM_DE2_CTRL_PLL10 (1 << 24)
#define CCM_DE2_CTRL_GATE (0x1 << 31)
/* CCU security switch, H3 only */ /* CCU security switch, H3 only */
#define CCM_SEC_SWITCH_MBUS_NONSEC (1 << 2) #define CCM_SEC_SWITCH_MBUS_NONSEC (1 << 2)
#define CCM_SEC_SWITCH_BUS_NONSEC (1 << 1) #define CCM_SEC_SWITCH_BUS_NONSEC (1 << 1)
@ -424,7 +492,9 @@ struct sunxi_ccm_reg {
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
void clock_set_pll1(unsigned int hz); void clock_set_pll1(unsigned int hz);
void clock_set_pll3(unsigned int hz); void clock_set_pll3(unsigned int hz);
void clock_set_pll3_factors(int m, int n);
void clock_set_pll5(unsigned int clk, bool sigma_delta_enable); void clock_set_pll5(unsigned int clk, bool sigma_delta_enable);
void clock_set_pll10(unsigned int hz);
void clock_set_pll11(unsigned int clk, bool sigma_delta_enable); void clock_set_pll11(unsigned int clk, bool sigma_delta_enable);
void clock_set_mipi_pll(unsigned int hz); void clock_set_mipi_pll(unsigned int hz);
unsigned int clock_get_pll3(void); unsigned int clock_get_pll3(void);

View file

@ -16,5 +16,6 @@
#define SOCID_A64 0x1689 #define SOCID_A64 0x1689
#define SOCID_H3 0x1680 #define SOCID_H3 0x1680
#define SOCID_H5 0x1718 #define SOCID_H5 0x1718
#define SOCID_R40 0x1701
#endif /* _SUNXI_CPU_H */ #endif /* _SUNXI_CPU_H */

View file

@ -18,6 +18,8 @@
#define SUNXI_SRAM_D_BASE 0x00010000 /* 4 kiB */ #define SUNXI_SRAM_D_BASE 0x00010000 /* 4 kiB */
#define SUNXI_SRAM_B_BASE 0x00020000 /* 64 kiB (secure) */ #define SUNXI_SRAM_B_BASE 0x00020000 /* 64 kiB (secure) */
#define SUNXI_DE2_BASE 0x01000000
#ifdef CONFIG_MACH_SUN8I_A83T #ifdef CONFIG_MACH_SUN8I_A83T
#define SUNXI_CPUCFG_BASE 0x01700000 #define SUNXI_CPUCFG_BASE 0x01700000
#endif #endif
@ -46,7 +48,9 @@
#define SUNXI_USB1_BASE 0x01c14000 #define SUNXI_USB1_BASE 0x01c14000
#endif #endif
#define SUNXI_SS_BASE 0x01c15000 #define SUNXI_SS_BASE 0x01c15000
#if !defined(CONFIG_MACH_SUNXI_H3_H5) && !defined(CONFIG_MACH_SUN50I)
#define SUNXI_HDMI_BASE 0x01c16000 #define SUNXI_HDMI_BASE 0x01c16000
#endif
#define SUNXI_SPI2_BASE 0x01c17000 #define SUNXI_SPI2_BASE 0x01c17000
#define SUNXI_SATA_BASE 0x01c18000 #define SUNXI_SATA_BASE 0x01c18000
#ifdef CONFIG_SUNXI_GEN_SUN4I #ifdef CONFIG_SUNXI_GEN_SUN4I
@ -108,7 +112,7 @@ defined(CONFIG_MACH_SUN50I)
#define SUNXI_TP_BASE 0x01c25000 #define SUNXI_TP_BASE 0x01c25000
#define SUNXI_PMU_BASE 0x01c25400 #define SUNXI_PMU_BASE 0x01c25400
#ifdef CONFIG_MACH_SUN7I #if defined CONFIG_MACH_SUN7I || defined CONFIG_MACH_SUN8I_R40
#define SUNXI_CPUCFG_BASE 0x01c25c00 #define SUNXI_CPUCFG_BASE 0x01c25c00
#endif #endif
@ -164,10 +168,16 @@ defined(CONFIG_MACH_SUN50I)
#define SUNXI_MP_BASE 0x01e80000 #define SUNXI_MP_BASE 0x01e80000
#define SUNXI_AVG_BASE 0x01ea0000 #define SUNXI_AVG_BASE 0x01ea0000
#if defined(CONFIG_MACH_SUNXI_H3_H5) || defined(CONFIG_MACH_SUN50I)
#define SUNXI_HDMI_BASE 0x01ee0000
#endif
#define SUNXI_RTC_BASE 0x01f00000 #define SUNXI_RTC_BASE 0x01f00000
#define SUNXI_PRCM_BASE 0x01f01400 #define SUNXI_PRCM_BASE 0x01f01400
#if defined CONFIG_SUNXI_GEN_SUN6I && !defined CONFIG_MACH_SUN8I_A83T #if defined CONFIG_SUNXI_GEN_SUN6I && \
!defined CONFIG_MACH_SUN8I_A83T && \
!defined CONFIG_MACH_SUN8I_R40
#define SUNXI_CPUCFG_BASE 0x01f01c00 #define SUNXI_CPUCFG_BASE 0x01f01c00
#endif #endif

View file

@ -157,52 +157,6 @@ struct sunxi_de_be_reg {
u32 output_color_coef[12]; /* 0x9d0 */ u32 output_color_coef[12]; /* 0x9d0 */
}; };
struct sunxi_lcdc_reg {
u32 ctrl; /* 0x00 */
u32 int0; /* 0x04 */
u32 int1; /* 0x08 */
u8 res0[0x04]; /* 0x0c */
u32 tcon0_frm_ctrl; /* 0x10 */
u32 tcon0_frm_seed[6]; /* 0x14 */
u32 tcon0_frm_table[4]; /* 0x2c */
u8 res1[4]; /* 0x3c */
u32 tcon0_ctrl; /* 0x40 */
u32 tcon0_dclk; /* 0x44 */
u32 tcon0_timing_active; /* 0x48 */
u32 tcon0_timing_h; /* 0x4c */
u32 tcon0_timing_v; /* 0x50 */
u32 tcon0_timing_sync; /* 0x54 */
u32 tcon0_hv_intf; /* 0x58 */
u8 res2[0x04]; /* 0x5c */
u32 tcon0_cpu_intf; /* 0x60 */
u32 tcon0_cpu_wr_dat; /* 0x64 */
u32 tcon0_cpu_rd_dat0; /* 0x68 */
u32 tcon0_cpu_rd_dat1; /* 0x6c */
u32 tcon0_ttl_timing0; /* 0x70 */
u32 tcon0_ttl_timing1; /* 0x74 */
u32 tcon0_ttl_timing2; /* 0x78 */
u32 tcon0_ttl_timing3; /* 0x7c */
u32 tcon0_ttl_timing4; /* 0x80 */
u32 tcon0_lvds_intf; /* 0x84 */
u32 tcon0_io_polarity; /* 0x88 */
u32 tcon0_io_tristate; /* 0x8c */
u32 tcon1_ctrl; /* 0x90 */
u32 tcon1_timing_source; /* 0x94 */
u32 tcon1_timing_scale; /* 0x98 */
u32 tcon1_timing_out; /* 0x9c */
u32 tcon1_timing_h; /* 0xa0 */
u32 tcon1_timing_v; /* 0xa4 */
u32 tcon1_timing_sync; /* 0xa8 */
u8 res3[0x44]; /* 0xac */
u32 tcon1_io_polarity; /* 0xf0 */
u32 tcon1_io_tristate; /* 0xf4 */
u8 res4[0x108]; /* 0xf8 */
u32 mux_ctrl; /* 0x200 */
u8 res5[0x1c]; /* 0x204 */
u32 lvds_ana0; /* 0x220 */
u32 lvds_ana1; /* 0x224 */
};
struct sunxi_hdmi_reg { struct sunxi_hdmi_reg {
u32 version_id; /* 0x000 */ u32 version_id; /* 0x000 */
u32 ctrl; /* 0x004 */ u32 ctrl; /* 0x004 */
@ -346,63 +300,6 @@ struct sunxi_tve_reg {
#define SUNXI_DE_BE_LAYER_ATTR1_FMT_XRGB8888 (0x09 << 8) #define SUNXI_DE_BE_LAYER_ATTR1_FMT_XRGB8888 (0x09 << 8)
#define SUNXI_DE_BE_OUTPUT_COLOR_CTRL_ENABLE 1 #define SUNXI_DE_BE_OUTPUT_COLOR_CTRL_ENABLE 1
/*
* LCDC register constants.
*/
#define SUNXI_LCDC_X(x) (((x) - 1) << 16)
#define SUNXI_LCDC_Y(y) (((y) - 1) << 0)
#define SUNXI_LCDC_TCON_VSYNC_MASK (1 << 24)
#define SUNXI_LCDC_TCON_HSYNC_MASK (1 << 25)
#define SUNXI_LCDC_CTRL_IO_MAP_MASK (1 << 0)
#define SUNXI_LCDC_CTRL_IO_MAP_TCON0 (0 << 0)
#define SUNXI_LCDC_CTRL_IO_MAP_TCON1 (1 << 0)
#define SUNXI_LCDC_CTRL_TCON_ENABLE (1 << 31)
#define SUNXI_LCDC_TCON0_FRM_CTRL_RGB666 ((1 << 31) | (0 << 4))
#define SUNXI_LCDC_TCON0_FRM_CTRL_RGB565 ((1 << 31) | (5 << 4))
#define SUNXI_LCDC_TCON0_FRM_SEED 0x11111111
#define SUNXI_LCDC_TCON0_FRM_TAB0 0x01010000
#define SUNXI_LCDC_TCON0_FRM_TAB1 0x15151111
#define SUNXI_LCDC_TCON0_FRM_TAB2 0x57575555
#define SUNXI_LCDC_TCON0_FRM_TAB3 0x7f7f7777
#define SUNXI_LCDC_TCON0_CTRL_CLK_DELAY(n) (((n) & 0x1f) << 4)
#define SUNXI_LCDC_TCON0_CTRL_ENABLE (1 << 31)
#define SUNXI_LCDC_TCON0_DCLK_DIV(n) ((n) << 0)
#define SUNXI_LCDC_TCON0_DCLK_ENABLE (0xf << 28)
#define SUNXI_LCDC_TCON0_TIMING_H_BP(n) (((n) - 1) << 0)
#define SUNXI_LCDC_TCON0_TIMING_H_TOTAL(n) (((n) - 1) << 16)
#define SUNXI_LCDC_TCON0_TIMING_V_BP(n) (((n) - 1) << 0)
#define SUNXI_LCDC_TCON0_TIMING_V_TOTAL(n) (((n) * 2) << 16)
#ifdef CONFIG_SUNXI_GEN_SUN6I
#define SUNXI_LCDC_TCON0_LVDS_CLK_SEL_TCON0 (1 << 20)
#else
#define SUNXI_LCDC_TCON0_LVDS_CLK_SEL_TCON0 0 /* NA */
#endif
#define SUNXI_LCDC_TCON0_LVDS_INTF_BITWIDTH(n) ((n) << 26)
#define SUNXI_LCDC_TCON0_LVDS_INTF_ENABLE (1 << 31)
#define SUNXI_LCDC_TCON0_IO_POL_DCLK_PHASE(x) ((x) << 28)
#define SUNXI_LCDC_TCON1_CTRL_CLK_DELAY(n) (((n) & 0x1f) << 4)
#define SUNXI_LCDC_TCON1_CTRL_INTERLACE_ENABLE (1 << 20)
#define SUNXI_LCDC_TCON1_CTRL_ENABLE (1 << 31)
#define SUNXI_LCDC_TCON1_TIMING_H_BP(n) (((n) - 1) << 0)
#define SUNXI_LCDC_TCON1_TIMING_H_TOTAL(n) (((n) - 1) << 16)
#define SUNXI_LCDC_TCON1_TIMING_V_BP(n) (((n) - 1) << 0)
#define SUNXI_LCDC_TCON1_TIMING_V_TOTAL(n) ((n) << 16)
#define SUNXI_LCDC_MUX_CTRL_SRC0_MASK (0xf << 0)
#define SUNXI_LCDC_MUX_CTRL_SRC0(x) ((x) << 0)
#define SUNXI_LCDC_MUX_CTRL_SRC1_MASK (0xf << 4)
#define SUNXI_LCDC_MUX_CTRL_SRC1(x) ((x) << 4)
#ifdef CONFIG_SUNXI_GEN_SUN6I
#define SUNXI_LCDC_LVDS_ANA0 0x40040320
#define SUNXI_LCDC_LVDS_ANA0_EN_MB (1 << 31)
#define SUNXI_LCDC_LVDS_ANA0_DRVC (1 << 24)
#define SUNXI_LCDC_LVDS_ANA0_DRVD(x) ((x) << 20)
#else
#define SUNXI_LCDC_LVDS_ANA0 0x3f310000
#define SUNXI_LCDC_LVDS_ANA0_UPDATE (1 << 22)
#endif
#define SUNXI_LCDC_LVDS_ANA1_INIT1 (0x1f << 26 | 0x1f << 10)
#define SUNXI_LCDC_LVDS_ANA1_INIT2 (0x1f << 16 | 0x1f << 00)
/* /*
* HDMI register constants. * HDMI register constants.
*/ */

View file

@ -0,0 +1,124 @@
/*
* Sunxi platform display controller register and constant defines
*
* (C) Copyright 2017 Jernej Skrabec <jernej.skrabec@siol.net>
*
* Based on out of tree Linux DRM driver defines:
* Copyright (C) 2016 Jean-Francois Moine <moinejf@free.fr>
* Copyright (c) 2016 Allwinnertech Co., Ltd.
*
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef _SUNXI_DISPLAY2_H
#define _SUNXI_DISPLAY2_H
/* internal clock settings */
struct de_clk {
u32 gate_cfg;
u32 bus_cfg;
u32 rst_cfg;
u32 div_cfg;
u32 sel_cfg;
};
/* global control */
struct de_glb {
u32 ctl;
u32 status;
u32 dbuff;
u32 size;
};
/* alpha blending */
struct de_bld {
u32 fcolor_ctl;
struct {
u32 fcolor;
u32 insize;
u32 offset;
u32 dum;
} attr[4];
u32 dum0[15];
u32 route;
u32 premultiply;
u32 bkcolor;
u32 output_size;
u32 bld_mode[4];
u32 dum1[4];
u32 ck_ctl;
u32 ck_cfg;
u32 dum2[2];
u32 ck_max[4];
u32 dum3[4];
u32 ck_min[4];
u32 dum4[3];
u32 out_ctl;
};
/* VI channel */
struct de_vi {
struct {
u32 attr;
u32 size;
u32 coord;
u32 pitch[3];
u32 top_laddr[3];
u32 bot_laddr[3];
} cfg[4];
u32 fcolor[4];
u32 top_haddr[3];
u32 bot_haddr[3];
u32 ovl_size[2];
u32 hori[2];
u32 vert[2];
};
struct de_ui {
struct {
u32 attr;
u32 size;
u32 coord;
u32 pitch;
u32 top_laddr;
u32 bot_laddr;
u32 fcolor;
u32 dum;
} cfg[4];
u32 top_haddr;
u32 bot_haddr;
u32 ovl_size;
};
/*
* DE register constants.
*/
#define SUNXI_DE2_MUX0_BASE (SUNXI_DE2_BASE + 0x100000)
#define SUNXI_DE2_MUX1_BASE (SUNXI_DE2_BASE + 0x200000)
#define SUNXI_DE2_MUX_GLB_REGS 0x00000
#define SUNXI_DE2_MUX_BLD_REGS 0x01000
#define SUNXI_DE2_MUX_CHAN_REGS 0x02000
#define SUNXI_DE2_MUX_CHAN_SZ 0x1000
#define SUNXI_DE2_MUX_VSU_REGS 0x20000
#define SUNXI_DE2_MUX_GSU1_REGS 0x30000
#define SUNXI_DE2_MUX_GSU2_REGS 0x40000
#define SUNXI_DE2_MUX_GSU3_REGS 0x50000
#define SUNXI_DE2_MUX_FCE_REGS 0xa0000
#define SUNXI_DE2_MUX_BWS_REGS 0xa2000
#define SUNXI_DE2_MUX_LTI_REGS 0xa4000
#define SUNXI_DE2_MUX_PEAK_REGS 0xa6000
#define SUNXI_DE2_MUX_ASE_REGS 0xa8000
#define SUNXI_DE2_MUX_FCC_REGS 0xaa000
#define SUNXI_DE2_MUX_DCSC_REGS 0xb0000
#define SUNXI_DE2_FORMAT_XRGB_8888 4
#define SUNXI_DE2_FORMAT_RGB_565 10
#define SUNXI_DE2_MUX_GLB_CTL_EN (1 << 0)
#define SUNXI_DE2_UI_CFG_ATTR_EN (1 << 0)
#define SUNXI_DE2_UI_CFG_ATTR_FMT(f) ((f & 0xf) << 8)
#define SUNXI_DE2_WH(w, h) (((h - 1) << 16) | (w - 1))
#endif /* _SUNXI_DISPLAY2_H */

View file

@ -24,7 +24,9 @@
#include <asm/arch/dram_sun8i_a33.h> #include <asm/arch/dram_sun8i_a33.h>
#elif defined(CONFIG_MACH_SUN8I_A83T) #elif defined(CONFIG_MACH_SUN8I_A83T)
#include <asm/arch/dram_sun8i_a83t.h> #include <asm/arch/dram_sun8i_a83t.h>
#elif defined(CONFIG_MACH_SUNXI_H3_H5) || defined(CONFIG_MACH_SUN50I) #elif defined(CONFIG_MACH_SUNXI_H3_H5) || \
defined(CONFIG_MACH_SUN8I_R40) || \
defined(CONFIG_MACH_SUN50I)
#include <asm/arch/dram_sun8i_h3.h> #include <asm/arch/dram_sun8i_h3.h>
#elif defined(CONFIG_MACH_SUN9I) #elif defined(CONFIG_MACH_SUN9I)
#include <asm/arch/dram_sun9i.h> #include <asm/arch/dram_sun9i.h>

View file

@ -15,7 +15,8 @@
struct sunxi_mctl_com_reg { struct sunxi_mctl_com_reg {
u32 cr; /* 0x00 control register */ u32 cr; /* 0x00 control register */
u8 res0[0x8]; /* 0x04 */ u32 cr_r1; /* 0x04 rank 1 control register (R40 only) */
u8 res0[0x4]; /* 0x08 */
u32 tmr; /* 0x0c (unused on H3) */ u32 tmr; /* 0x0c (unused on H3) */
u32 mcr[16][2]; /* 0x10 */ u32 mcr[16][2]; /* 0x10 */
u32 bwcr; /* 0x90 bandwidth control register */ u32 bwcr; /* 0x90 bandwidth control register */
@ -63,6 +64,17 @@ struct sunxi_mctl_com_reg {
#define MCTL_CR_DUAL_RANK (0x1 << 0) #define MCTL_CR_DUAL_RANK (0x1 << 0)
#define MCTL_CR_SINGLE_RANK (0x0 << 0) #define MCTL_CR_SINGLE_RANK (0x0 << 0)
/*
* CR_R1 is a register found in the R40's DRAM controller. It sets various
* parameters for rank 1. Bits [11:0] have the same meaning as the bits in
* MCTL_CR, but they apply to rank 1 only. This implies we can have
* different chips for rank 1 than rank 0.
*
* As address line A15 and CS1 chip select for rank 1 are muxed on the same
* pin, if single rank is used, A15 must be muxed in.
*/
#define MCTL_CR_R1_MUX_A15 (0x1 << 21)
#define PROTECT_MAGIC (0x94be6fa3) #define PROTECT_MAGIC (0x94be6fa3)
struct sunxi_mctl_ctl_reg { struct sunxi_mctl_ctl_reg {
@ -72,7 +84,8 @@ struct sunxi_mctl_ctl_reg {
u32 clken; /* 0x0c */ u32 clken; /* 0x0c */
u32 pgsr[2]; /* 0x10 PHY general status registers */ u32 pgsr[2]; /* 0x10 PHY general status registers */
u32 statr; /* 0x18 */ u32 statr; /* 0x18 */
u8 res1[0x14]; /* 0x1c */ u8 res1[0x10]; /* 0x1c */
u32 lp3mr11; /* 0x2c */
u32 mr[4]; /* 0x30 mode registers */ u32 mr[4]; /* 0x30 mode registers */
u32 pllgcr; /* 0x40 */ u32 pllgcr; /* 0x40 */
u32 ptr[5]; /* 0x44 PHY timing registers */ u32 ptr[5]; /* 0x44 PHY timing registers */
@ -120,7 +133,8 @@ struct sunxi_mctl_ctl_reg {
struct { /* 0x300 DATX8 modules*/ struct { /* 0x300 DATX8 modules*/
u32 mdlr; /* 0x00 master delay line register */ u32 mdlr; /* 0x00 master delay line register */
u32 lcdlr[3]; /* 0x04 local calibrated delay line registers */ u32 lcdlr[3]; /* 0x04 local calibrated delay line registers */
u32 bdlr[12]; /* 0x10 bit delay line registers */ u32 bdlr[11]; /* 0x10 bit delay line registers */
u32 sdlr; /* 0x3c output enable bit delay registers */
u32 gtr; /* 0x40 general timing register */ u32 gtr; /* 0x40 general timing register */
u32 gcr; /* 0x44 general configuration register */ u32 gcr; /* 0x44 general configuration register */
u32 gsr[3]; /* 0x48 general status registers */ u32 gsr[3]; /* 0x48 general status registers */

View file

@ -161,6 +161,7 @@ enum sunxi_gpio_number {
#define SUN8I_GPB_UART2 2 #define SUN8I_GPB_UART2 2
#define SUN8I_A33_GPB_UART0 3 #define SUN8I_A33_GPB_UART0 3
#define SUN8I_A83T_GPB_UART0 2 #define SUN8I_A83T_GPB_UART0 2
#define SUN8I_V3S_GPB_UART0 3
#define SUN50I_GPB_UART0 4 #define SUN50I_GPB_UART0 4
#define SUNXI_GPC_NAND 2 #define SUNXI_GPC_NAND 2

View file

@ -0,0 +1,128 @@
/*
* Sunxi platform timing controller register and constant defines
*
* (C) Copyright 2014 Hans de Goede <hdegoede@redhat.com>
* (C) Copyright 2017 Jernej Skrabec <jernej.skrabec@siol.net>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef _LCDC_H
#define _LCDC_H
#include <fdtdec.h>
struct sunxi_lcdc_reg {
u32 ctrl; /* 0x00 */
u32 int0; /* 0x04 */
u32 int1; /* 0x08 */
u8 res0[0x04]; /* 0x0c */
u32 tcon0_frm_ctrl; /* 0x10 */
u32 tcon0_frm_seed[6]; /* 0x14 */
u32 tcon0_frm_table[4]; /* 0x2c */
u8 res1[4]; /* 0x3c */
u32 tcon0_ctrl; /* 0x40 */
u32 tcon0_dclk; /* 0x44 */
u32 tcon0_timing_active; /* 0x48 */
u32 tcon0_timing_h; /* 0x4c */
u32 tcon0_timing_v; /* 0x50 */
u32 tcon0_timing_sync; /* 0x54 */
u32 tcon0_hv_intf; /* 0x58 */
u8 res2[0x04]; /* 0x5c */
u32 tcon0_cpu_intf; /* 0x60 */
u32 tcon0_cpu_wr_dat; /* 0x64 */
u32 tcon0_cpu_rd_dat0; /* 0x68 */
u32 tcon0_cpu_rd_dat1; /* 0x6c */
u32 tcon0_ttl_timing0; /* 0x70 */
u32 tcon0_ttl_timing1; /* 0x74 */
u32 tcon0_ttl_timing2; /* 0x78 */
u32 tcon0_ttl_timing3; /* 0x7c */
u32 tcon0_ttl_timing4; /* 0x80 */
u32 tcon0_lvds_intf; /* 0x84 */
u32 tcon0_io_polarity; /* 0x88 */
u32 tcon0_io_tristate; /* 0x8c */
u32 tcon1_ctrl; /* 0x90 */
u32 tcon1_timing_source; /* 0x94 */
u32 tcon1_timing_scale; /* 0x98 */
u32 tcon1_timing_out; /* 0x9c */
u32 tcon1_timing_h; /* 0xa0 */
u32 tcon1_timing_v; /* 0xa4 */
u32 tcon1_timing_sync; /* 0xa8 */
u8 res3[0x44]; /* 0xac */
u32 tcon1_io_polarity; /* 0xf0 */
u32 tcon1_io_tristate; /* 0xf4 */
u8 res4[0x108]; /* 0xf8 */
u32 mux_ctrl; /* 0x200 */
u8 res5[0x1c]; /* 0x204 */
u32 lvds_ana0; /* 0x220 */
u32 lvds_ana1; /* 0x224 */
};
/*
* LCDC register constants.
*/
#define SUNXI_LCDC_X(x) (((x) - 1) << 16)
#define SUNXI_LCDC_Y(y) (((y) - 1) << 0)
#define SUNXI_LCDC_TCON_VSYNC_MASK (1 << 24)
#define SUNXI_LCDC_TCON_HSYNC_MASK (1 << 25)
#define SUNXI_LCDC_CTRL_IO_MAP_MASK (1 << 0)
#define SUNXI_LCDC_CTRL_IO_MAP_TCON0 (0 << 0)
#define SUNXI_LCDC_CTRL_IO_MAP_TCON1 (1 << 0)
#define SUNXI_LCDC_CTRL_TCON_ENABLE (1 << 31)
#define SUNXI_LCDC_TCON0_FRM_CTRL_RGB666 ((1 << 31) | (0 << 4))
#define SUNXI_LCDC_TCON0_FRM_CTRL_RGB565 ((1 << 31) | (5 << 4))
#define SUNXI_LCDC_TCON0_FRM_SEED 0x11111111
#define SUNXI_LCDC_TCON0_FRM_TAB0 0x01010000
#define SUNXI_LCDC_TCON0_FRM_TAB1 0x15151111
#define SUNXI_LCDC_TCON0_FRM_TAB2 0x57575555
#define SUNXI_LCDC_TCON0_FRM_TAB3 0x7f7f7777
#define SUNXI_LCDC_TCON0_CTRL_CLK_DELAY(n) (((n) & 0x1f) << 4)
#define SUNXI_LCDC_TCON0_CTRL_ENABLE (1 << 31)
#define SUNXI_LCDC_TCON0_DCLK_DIV(n) ((n) << 0)
#define SUNXI_LCDC_TCON0_DCLK_ENABLE (0xf << 28)
#define SUNXI_LCDC_TCON0_TIMING_H_BP(n) (((n) - 1) << 0)
#define SUNXI_LCDC_TCON0_TIMING_H_TOTAL(n) (((n) - 1) << 16)
#define SUNXI_LCDC_TCON0_TIMING_V_BP(n) (((n) - 1) << 0)
#define SUNXI_LCDC_TCON0_TIMING_V_TOTAL(n) (((n) * 2) << 16)
#ifdef CONFIG_SUNXI_GEN_SUN6I
#define SUNXI_LCDC_TCON0_LVDS_CLK_SEL_TCON0 (1 << 20)
#else
#define SUNXI_LCDC_TCON0_LVDS_CLK_SEL_TCON0 0 /* NA */
#endif
#define SUNXI_LCDC_TCON0_LVDS_INTF_BITWIDTH(n) ((n) << 26)
#define SUNXI_LCDC_TCON0_LVDS_INTF_ENABLE (1 << 31)
#define SUNXI_LCDC_TCON0_IO_POL_DCLK_PHASE(x) ((x) << 28)
#define SUNXI_LCDC_TCON1_CTRL_CLK_DELAY(n) (((n) & 0x1f) << 4)
#define SUNXI_LCDC_TCON1_CTRL_INTERLACE_ENABLE (1 << 20)
#define SUNXI_LCDC_TCON1_CTRL_ENABLE (1 << 31)
#define SUNXI_LCDC_TCON1_TIMING_H_BP(n) (((n) - 1) << 0)
#define SUNXI_LCDC_TCON1_TIMING_H_TOTAL(n) (((n) - 1) << 16)
#define SUNXI_LCDC_TCON1_TIMING_V_BP(n) (((n) - 1) << 0)
#define SUNXI_LCDC_TCON1_TIMING_V_TOTAL(n) ((n) << 16)
#define SUNXI_LCDC_MUX_CTRL_SRC0_MASK (0xf << 0)
#define SUNXI_LCDC_MUX_CTRL_SRC0(x) ((x) << 0)
#define SUNXI_LCDC_MUX_CTRL_SRC1_MASK (0xf << 4)
#define SUNXI_LCDC_MUX_CTRL_SRC1(x) ((x) << 4)
#ifdef CONFIG_SUNXI_GEN_SUN6I
#define SUNXI_LCDC_LVDS_ANA0 0x40040320
#define SUNXI_LCDC_LVDS_ANA0_EN_MB (1 << 31)
#define SUNXI_LCDC_LVDS_ANA0_DRVC (1 << 24)
#define SUNXI_LCDC_LVDS_ANA0_DRVD(x) ((x) << 20)
#else
#define SUNXI_LCDC_LVDS_ANA0 0x3f310000
#define SUNXI_LCDC_LVDS_ANA0_UPDATE (1 << 22)
#endif
#define SUNXI_LCDC_LVDS_ANA1_INIT1 (0x1f << 26 | 0x1f << 10)
#define SUNXI_LCDC_LVDS_ANA1_INIT2 (0x1f << 16 | 0x1f << 00)
void lcdc_init(struct sunxi_lcdc_reg * const lcdc);
void lcdc_enable(struct sunxi_lcdc_reg * const lcdc, int depth);
void lcdc_tcon0_mode_set(struct sunxi_lcdc_reg * const lcdc,
const struct display_timing *mode,
int clk_div, bool for_ext_vga_dac,
int depth, int dclk_phase);
void lcdc_tcon1_mode_set(struct sunxi_lcdc_reg * const lcdc,
const struct display_timing *mode,
bool ext_hvsync, bool is_composite);
#endif /* _LCDC_H */

View file

@ -67,7 +67,7 @@ struct sunxi_timer_reg {
struct sunxi_timer timer[6]; /* We have 6 timers */ struct sunxi_timer timer[6]; /* We have 6 timers */
u8 res2[16]; u8 res2[16];
struct sunxi_avs avs; struct sunxi_avs avs;
#ifdef CONFIG_SUNXI_GEN_SUN4I #if defined(CONFIG_SUNXI_GEN_SUN4I) || defined(CONFIG_MACH_SUN8I_R40)
struct sunxi_wdog wdog; /* 0x90 */ struct sunxi_wdog wdog; /* 0x90 */
/* XXX the following is not accurate for sun5i/sun7i */ /* XXX the following is not accurate for sun5i/sun7i */
struct sunxi_64cnt cnt64; /* 0xa0 */ struct sunxi_64cnt cnt64; /* 0xa0 */
@ -77,8 +77,7 @@ struct sunxi_timer_reg {
struct sunxi_tgp tgp[4]; struct sunxi_tgp tgp[4];
u8 res5[8]; u8 res5[8];
u32 cpu_cfg; u32 cpu_cfg;
#endif #elif defined(CONFIG_SUNXI_GEN_SUN6I)
#ifdef CONFIG_SUNXI_GEN_SUN6I
u8 res3[16]; u8 res3[16];
struct sunxi_wdog wdog[5]; /* We have 5 watchdogs */ struct sunxi_wdog wdog[5]; /* We have 5 watchdogs */
#endif #endif

View file

@ -13,7 +13,10 @@
#define WDT_CTRL_RESTART (0x1 << 0) #define WDT_CTRL_RESTART (0x1 << 0)
#define WDT_CTRL_KEY (0x0a57 << 1) #define WDT_CTRL_KEY (0x0a57 << 1)
#if defined(CONFIG_MACH_SUN4I) || defined(CONFIG_MACH_SUN5I) || defined(CONFIG_MACH_SUN7I) #if defined(CONFIG_MACH_SUN4I) || \
defined(CONFIG_MACH_SUN5I) || \
defined(CONFIG_MACH_SUN7I) || \
defined(CONFIG_MACH_SUN8I_R40)
#define WDT_MODE_EN (0x1 << 0) #define WDT_MODE_EN (0x1 << 0)
#define WDT_MODE_RESET_EN (0x1 << 1) #define WDT_MODE_RESET_EN (0x1 << 1)

View file

@ -7,12 +7,19 @@
#ifndef __SEC_FIRMWARE_H_ #ifndef __SEC_FIRMWARE_H_
#define __SEC_FIRMWARE_H_ #define __SEC_FIRMWARE_H_
#define PSCI_INVALID_VER 0xffffffff
int sec_firmware_init(const void *, u32 *, u32 *); int sec_firmware_init(const void *, u32 *, u32 *);
int _sec_firmware_entry(const void *, u32 *, u32 *); int _sec_firmware_entry(const void *, u32 *, u32 *);
bool sec_firmware_is_valid(const void *); bool sec_firmware_is_valid(const void *);
#ifdef CONFIG_SEC_FIRMWARE_ARMV8_PSCI #ifdef CONFIG_SEC_FIRMWARE_ARMV8_PSCI
unsigned int sec_firmware_support_psci_version(void); unsigned int sec_firmware_support_psci_version(void);
unsigned int _sec_firmware_support_psci_version(void); unsigned int _sec_firmware_support_psci_version(void);
#else
static inline unsigned int sec_firmware_support_psci_version(void)
{
return PSCI_INVALID_VER;
}
#endif #endif
#endif /* __SEC_FIRMWARE_H_ */ #endif /* __SEC_FIRMWARE_H_ */

View file

@ -14,7 +14,7 @@
#define CONFIG_STATIC_RELA #define CONFIG_STATIC_RELA
#endif #endif
#if defined(CONFIG_LS102XA) || \ #if defined(CONFIG_ARCH_LS1021A) || \
defined(CONFIG_CPU_PXA27X) || \ defined(CONFIG_CPU_PXA27X) || \
defined(CONFIG_CPU_MONAHANS) || \ defined(CONFIG_CPU_MONAHANS) || \
defined(CONFIG_CPU_PXA25X) || \ defined(CONFIG_CPU_PXA25X) || \

View file

@ -27,10 +27,10 @@
#define CONFIG_SPL_UBOOT_KEY_HASH NULL #define CONFIG_SPL_UBOOT_KEY_HASH NULL
#endif /* ifdef CONFIG_SPL_BUILD */ #endif /* ifdef CONFIG_SPL_BUILD */
#ifndef CONFIG_SPL_BUILD
#define CONFIG_CMD_BLOB
#define CONFIG_CMD_HASH
#define CONFIG_KEY_REVOCATION #define CONFIG_KEY_REVOCATION
#ifndef CONFIG_SPL_BUILD
#define CONFIG_CMD_HASH
#ifndef CONFIG_SYS_RAMBOOT #ifndef CONFIG_SYS_RAMBOOT
/* The key used for verification of next level images /* The key used for verification of next level images
* is picked up from an Extension Table which has * is picked up from an Extension Table which has
@ -46,14 +46,15 @@
#endif #endif
#if defined(CONFIG_LS1043A) || defined(CONFIG_LS2080A) #if defined(CONFIG_FSL_LAYERSCAPE)
/* For LS1043 (ARMv8), ESBC image Address in Header is 64 bit /*
* Similiarly for LS2080 * For fsl layerscape based platforms, ESBC image Address in Header
* is 64 bit.
*/ */
#define CONFIG_ESBC_ADDR_64BIT #define CONFIG_ESBC_ADDR_64BIT
#endif #endif
#ifdef CONFIG_LS2080A #ifdef CONFIG_ARCH_LS2080A
#define CONFIG_EXTRA_ENV \ #define CONFIG_EXTRA_ENV \
"setenv fdt_high 0xa0000000;" \ "setenv fdt_high 0xa0000000;" \
"setenv initrd_high 0xcfffffff;" \ "setenv initrd_high 0xcfffffff;" \
@ -68,7 +69,7 @@
/* Copying Bootscript and Header to DDR from NOR for LS2 and for rest, from /* Copying Bootscript and Header to DDR from NOR for LS2 and for rest, from
* Non-XIP Memory (Nand/SD)*/ * Non-XIP Memory (Nand/SD)*/
#if defined(CONFIG_SYS_RAMBOOT) || defined(CONFIG_FSL_LSCH3) || \ #if defined(CONFIG_SYS_RAMBOOT) || defined(CONFIG_FSL_LSCH3) || \
defined(CONFIG_SD_BOOT) defined(CONFIG_SD_BOOT) || defined(CONFIG_NAND_BOOT)
#define CONFIG_BOOTSCRIPT_COPY_RAM #define CONFIG_BOOTSCRIPT_COPY_RAM
#endif #endif
/* The address needs to be modified according to NOR, NAND, SD and /* The address needs to be modified according to NOR, NAND, SD and
@ -86,16 +87,37 @@
/* For SD boot address and size are assigned in terms of sector /* For SD boot address and size are assigned in terms of sector
* offset and no. of sectors respectively. * offset and no. of sectors respectively.
*/ */
#define CONFIG_BS_HDR_ADDR_DEVICE 0x00000900 #if defined(CONFIG_ARCH_LS1043A) || defined(CONFIG_ARCH_LS1046A)
#define CONFIG_BS_HDR_ADDR_DEVICE 0x00000920
#else
#define CONFIG_BS_HDR_ADDR_DEVICE 0x00000900
#endif
#define CONFIG_BS_ADDR_DEVICE 0x00000940 #define CONFIG_BS_ADDR_DEVICE 0x00000940
#define CONFIG_BS_HDR_SIZE 0x00000010 #define CONFIG_BS_HDR_SIZE 0x00000010
#define CONFIG_BS_SIZE 0x00000008 #define CONFIG_BS_SIZE 0x00000008
#elif defined(CONFIG_NAND_BOOT)
#define CONFIG_BS_HDR_ADDR_DEVICE 0x00800000
#define CONFIG_BS_ADDR_DEVICE 0x00802000
#define CONFIG_BS_HDR_SIZE 0x00002000
#define CONFIG_BS_SIZE 0x00001000
#elif defined(CONFIG_QSPI_BOOT)
#ifdef CONFIG_ARCH_LS1046A
#define CONFIG_BS_HDR_ADDR_DEVICE 0x40780000
#define CONFIG_BS_ADDR_DEVICE 0x40800000
#elif defined(CONFIG_ARCH_LS1012A)
#define CONFIG_BS_HDR_ADDR_DEVICE 0x400c0000
#define CONFIG_BS_ADDR_DEVICE 0x40060000
#else #else
#error "Platform not supported"
#endif
#define CONFIG_BS_HDR_SIZE 0x00002000
#define CONFIG_BS_SIZE 0x00001000
#else /* Default NOR Boot */
#define CONFIG_BS_HDR_ADDR_DEVICE 0x600a0000 #define CONFIG_BS_HDR_ADDR_DEVICE 0x600a0000
#define CONFIG_BS_ADDR_DEVICE 0x60060000 #define CONFIG_BS_ADDR_DEVICE 0x60060000
#define CONFIG_BS_HDR_SIZE 0x00002000 #define CONFIG_BS_HDR_SIZE 0x00002000
#define CONFIG_BS_SIZE 0x00001000 #define CONFIG_BS_SIZE 0x00001000
#endif /* #ifdef CONFIG_SD_BOOT */ #endif
#define CONFIG_BS_HDR_ADDR_RAM 0x81000000 #define CONFIG_BS_HDR_ADDR_RAM 0x81000000
#define CONFIG_BS_ADDR_RAM 0x81020000 #define CONFIG_BS_ADDR_RAM 0x81020000
#endif #endif
@ -109,23 +131,13 @@
#endif #endif
#ifdef CONFIG_FSL_LS_PPA #ifdef CONFIG_FSL_LS_PPA
#ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP
#ifdef CONFIG_LS1043A
#define CONFIG_SYS_LS_PPA_ESBC_ADDR 0x600c0000
#elif defined(CONFIG_FSL_LSCH3)
#define CONFIG_SYS_LS_PPA_ESBC_ADDR 0x580c40000
#endif
#else
#error "No CONFIG_SYS_LS_PPA_FW_IN_xxx defined"
#endif /* ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP */
/* Define the key hash here if SRK used for signing PPA image is /* Define the key hash here if SRK used for signing PPA image is
* different from SRK hash put in SFP used for U-Boot. * different from SRK hash put in SFP used for U-Boot.
* Example * Example
* #define CONFIG_PPA_KEY_HASH \ * #define PPA_KEY_HASH \
* "41066b564c6ffcef40ccbc1e0a5d0d519604000c785d97bbefd25e4d288d1c8b" * "41066b564c6ffcef40ccbc1e0a5d0d519604000c785d97bbefd25e4d288d1c8b"
*/ */
#define CONFIG_PPA_KEY_HASH NULL #define PPA_KEY_HASH NULL
#endif /* ifdef CONFIG_FSL_LS_PPA */ #endif /* ifdef CONFIG_FSL_LS_PPA */
#include <config_fsl_chain_trust.h> #include <config_fsl_chain_trust.h>

View file

@ -67,7 +67,7 @@ struct arch_global_data {
phys_addr_t resv_ram; phys_addr_t resv_ram;
#endif #endif
#ifdef CONFIG_ARCH_OMAP2 #ifdef CONFIG_ARCH_OMAP2PLUS
u32 omap_boot_device; u32 omap_boot_device;
u32 omap_boot_mode; u32 omap_boot_mode;
u8 omap_ch_flags; u8 omap_ch_flags;

View file

@ -0,0 +1,17 @@
/*
* Copyright (C) 2012 ARM Limited
*
* SPDX-License-Identifier: GPL-2.0
*/
#ifndef __ASM_ARM_OPCODES_SEC_H
#define __ASM_ARM_OPCODES_SEC_H
#include <asm/opcodes.h>
#define __SMC(imm4) __inst_arm_thumb32( \
0xE1600070 | (((imm4) & 0xF) << 0), \
0xF7F08000 | (((imm4) & 0xF) << 16) \
)
#endif /* __ASM_ARM_OPCODES_SEC_H */

View file

@ -0,0 +1,27 @@
/*
* opcodes-virt.h: Opcode definitions for the ARM virtualization extensions
* Copyright (C) 2012 Linaro Limited
*
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __ASM_ARM_OPCODES_VIRT_H
#define __ASM_ARM_OPCODES_VIRT_H
#include <asm/opcodes.h>
#define __HVC(imm16) __inst_arm_thumb32( \
0xE1400070 | (((imm16) & 0xFFF0) << 4) | ((imm16) & 0x000F), \
0xF7E08000 | (((imm16) & 0xF000) << 4) | ((imm16) & 0x0FFF) \
)
#define __ERET __inst_arm_thumb32( \
0xE160006E, \
0xF3DE8F00 \
)
#define __MSR_ELR_HYP(regnum) __inst_arm_thumb32( \
0xE12EF300 | regnum, \
0xF3808E30 | (regnum << 16) \
)
#endif /* ! __ASM_ARM_OPCODES_VIRT_H */

View file

@ -0,0 +1,229 @@
/*
* arch/arm/include/asm/opcodes.h
*
* SPDX-License-Identifier: GPL-2.0
*/
#ifndef __ASM_ARM_OPCODES_H
#define __ASM_ARM_OPCODES_H
#ifndef __ASSEMBLY__
#include <linux/linkage.h>
extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr);
#endif
#define ARM_OPCODE_CONDTEST_FAIL 0
#define ARM_OPCODE_CONDTEST_PASS 1
#define ARM_OPCODE_CONDTEST_UNCOND 2
/*
* Assembler opcode byteswap helpers.
* These are only intended for use by this header: don't use them directly,
* because they will be suboptimal in most cases.
*/
#define ___asm_opcode_swab32(x) ( \
(((x) << 24) & 0xFF000000) \
| (((x) << 8) & 0x00FF0000) \
| (((x) >> 8) & 0x0000FF00) \
| (((x) >> 24) & 0x000000FF) \
)
#define ___asm_opcode_swab16(x) ( \
(((x) << 8) & 0xFF00) \
| (((x) >> 8) & 0x00FF) \
)
#define ___asm_opcode_swahb32(x) ( \
(((x) << 8) & 0xFF00FF00) \
| (((x) >> 8) & 0x00FF00FF) \
)
#define ___asm_opcode_swahw32(x) ( \
(((x) << 16) & 0xFFFF0000) \
| (((x) >> 16) & 0x0000FFFF) \
)
#define ___asm_opcode_identity32(x) ((x) & 0xFFFFFFFF)
#define ___asm_opcode_identity16(x) ((x) & 0xFFFF)
/*
* Opcode byteswap helpers
*
* These macros help with converting instructions between a canonical integer
* format and in-memory representation, in an endianness-agnostic manner.
*
* __mem_to_opcode_*() convert from in-memory representation to canonical form.
* __opcode_to_mem_*() convert from canonical form to in-memory representation.
*
*
* Canonical instruction representation:
*
* ARM: 0xKKLLMMNN
* Thumb 16-bit: 0x0000KKLL, where KK < 0xE8
* Thumb 32-bit: 0xKKLLMMNN, where KK >= 0xE8
*
* There is no way to distinguish an ARM instruction in canonical representation
* from a Thumb instruction (just as these cannot be distinguished in memory).
* Where this distinction is important, it needs to be tracked separately.
*
* Note that values in the range 0x0000E800..0xE7FFFFFF intentionally do not
* represent any valid Thumb-2 instruction. For this range,
* __opcode_is_thumb32() and __opcode_is_thumb16() will both be false.
*
* The ___asm variants are intended only for use by this header, in situations
* involving inline assembler. For .S files, the normal __opcode_*() macros
* should do the right thing.
*/
#ifdef __ASSEMBLY__
#define ___opcode_swab32(x) ___asm_opcode_swab32(x)
#define ___opcode_swab16(x) ___asm_opcode_swab16(x)
#define ___opcode_swahb32(x) ___asm_opcode_swahb32(x)
#define ___opcode_swahw32(x) ___asm_opcode_swahw32(x)
#define ___opcode_identity32(x) ___asm_opcode_identity32(x)
#define ___opcode_identity16(x) ___asm_opcode_identity16(x)
#else /* ! __ASSEMBLY__ */
#include <linux/types.h>
#include <linux/swab.h>
#define ___opcode_swab32(x) swab32(x)
#define ___opcode_swab16(x) swab16(x)
#define ___opcode_swahb32(x) swahb32(x)
#define ___opcode_swahw32(x) swahw32(x)
#define ___opcode_identity32(x) ((u32)(x))
#define ___opcode_identity16(x) ((u16)(x))
#endif /* ! __ASSEMBLY__ */
#ifdef CONFIG_CPU_ENDIAN_BE8
#define __opcode_to_mem_arm(x) ___opcode_swab32(x)
#define __opcode_to_mem_thumb16(x) ___opcode_swab16(x)
#define __opcode_to_mem_thumb32(x) ___opcode_swahb32(x)
#define ___asm_opcode_to_mem_arm(x) ___asm_opcode_swab32(x)
#define ___asm_opcode_to_mem_thumb16(x) ___asm_opcode_swab16(x)
#define ___asm_opcode_to_mem_thumb32(x) ___asm_opcode_swahb32(x)
#else /* ! CONFIG_CPU_ENDIAN_BE8 */
#define __opcode_to_mem_arm(x) ___opcode_identity32(x)
#define __opcode_to_mem_thumb16(x) ___opcode_identity16(x)
#define ___asm_opcode_to_mem_arm(x) ___asm_opcode_identity32(x)
#define ___asm_opcode_to_mem_thumb16(x) ___asm_opcode_identity16(x)
#ifndef CONFIG_CPU_ENDIAN_BE32
/*
* On BE32 systems, using 32-bit accesses to store Thumb instructions will not
* work in all cases, due to alignment constraints. For now, a correct
* version is not provided for BE32.
*/
#define __opcode_to_mem_thumb32(x) ___opcode_swahw32(x)
#define ___asm_opcode_to_mem_thumb32(x) ___asm_opcode_swahw32(x)
#endif
#endif /* ! CONFIG_CPU_ENDIAN_BE8 */
#define __mem_to_opcode_arm(x) __opcode_to_mem_arm(x)
#define __mem_to_opcode_thumb16(x) __opcode_to_mem_thumb16(x)
#ifndef CONFIG_CPU_ENDIAN_BE32
#define __mem_to_opcode_thumb32(x) __opcode_to_mem_thumb32(x)
#endif
/* Operations specific to Thumb opcodes */
/* Instruction size checks: */
#define __opcode_is_thumb32(x) ( \
((x) & 0xF8000000) == 0xE8000000 \
|| ((x) & 0xF0000000) == 0xF0000000 \
)
#define __opcode_is_thumb16(x) ( \
((x) & 0xFFFF0000) == 0 \
&& !(((x) & 0xF800) == 0xE800 || ((x) & 0xF000) == 0xF000) \
)
/* Operations to construct or split 32-bit Thumb instructions: */
#define __opcode_thumb32_first(x) (___opcode_identity16((x) >> 16))
#define __opcode_thumb32_second(x) (___opcode_identity16(x))
#define __opcode_thumb32_compose(first, second) ( \
(___opcode_identity32(___opcode_identity16(first)) << 16) \
| ___opcode_identity32(___opcode_identity16(second)) \
)
#define ___asm_opcode_thumb32_first(x) (___asm_opcode_identity16((x) >> 16))
#define ___asm_opcode_thumb32_second(x) (___asm_opcode_identity16(x))
#define ___asm_opcode_thumb32_compose(first, second) ( \
(___asm_opcode_identity32(___asm_opcode_identity16(first)) << 16) \
| ___asm_opcode_identity32(___asm_opcode_identity16(second)) \
)
/*
* Opcode injection helpers
*
* In rare cases it is necessary to assemble an opcode which the
* assembler does not support directly, or which would normally be
* rejected because of the CFLAGS or AFLAGS used to build the affected
* file.
*
* Before using these macros, consider carefully whether it is feasible
* instead to change the build flags for your file, or whether it really
* makes sense to support old assembler versions when building that
* particular kernel feature.
*
* The macros defined here should only be used where there is no viable
* alternative.
*
*
* __inst_arm(x): emit the specified ARM opcode
* __inst_thumb16(x): emit the specified 16-bit Thumb opcode
* __inst_thumb32(x): emit the specified 32-bit Thumb opcode
*
* __inst_arm_thumb16(arm, thumb): emit either the specified arm or
* 16-bit Thumb opcode, depending on whether an ARM or Thumb-2
* kernel is being built
*
* __inst_arm_thumb32(arm, thumb): emit either the specified arm or
* 32-bit Thumb opcode, depending on whether an ARM or Thumb-2
* kernel is being built
*
*
* Note that using these macros directly is poor practice. Instead, you
* should use them to define human-readable wrapper macros to encode the
* instructions that you care about. In code which might run on ARMv7 or
* above, you can usually use the __inst_arm_thumb{16,32} macros to
* specify the ARM and Thumb alternatives at the same time. This ensures
* that the correct opcode gets emitted depending on the instruction set
* used for the kernel build.
*
* Look at opcodes-virt.h for an example of how to use these macros.
*/
#include <linux/stringify.h>
#define __inst_arm(x) ___inst_arm(___asm_opcode_to_mem_arm(x))
#define __inst_thumb32(x) ___inst_thumb32( \
___asm_opcode_to_mem_thumb16(___asm_opcode_thumb32_first(x)), \
___asm_opcode_to_mem_thumb16(___asm_opcode_thumb32_second(x)) \
)
#define __inst_thumb16(x) ___inst_thumb16(___asm_opcode_to_mem_thumb16(x))
#ifdef CONFIG_THUMB2_KERNEL
#define __inst_arm_thumb16(arm_opcode, thumb_opcode) \
__inst_thumb16(thumb_opcode)
#define __inst_arm_thumb32(arm_opcode, thumb_opcode) \
__inst_thumb32(thumb_opcode)
#else
#define __inst_arm_thumb16(arm_opcode, thumb_opcode) __inst_arm(arm_opcode)
#define __inst_arm_thumb32(arm_opcode, thumb_opcode) __inst_arm(arm_opcode)
#endif
/* Helpers for the helpers. Don't use these directly. */
#ifdef __ASSEMBLY__
#define ___inst_arm(x) .long x
#define ___inst_thumb16(x) .short x
#define ___inst_thumb32(first, second) .short first, second
#else
#define ___inst_arm(x) ".long " __stringify(x) "\n\t"
#define ___inst_thumb16(x) ".short " __stringify(x) "\n\t"
#define ___inst_thumb32(first, second) \
".short " __stringify(first) ", " __stringify(second) "\n\t"
#endif
#endif /* __ASM_ARM_OPCODES_H */

View file

@ -9,7 +9,7 @@
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_ARCH_OMAP2 #ifdef CONFIG_ARCH_OMAP2PLUS
#define TI_ARMV7_DRAM_ADDR_SPACE_START 0x80000000 #define TI_ARMV7_DRAM_ADDR_SPACE_START 0x80000000
#define TI_ARMV7_DRAM_ADDR_SPACE_END 0xFFFFFFFF #define TI_ARMV7_DRAM_ADDR_SPACE_END 0xFFFFFFFF

View file

@ -14,6 +14,7 @@
#include <common.h> #include <common.h>
#include <linux/kbuild.h> #include <linux/kbuild.h>
#include <linux/arm-smccc.h>
#if defined(CONFIG_MX25) || defined(CONFIG_MX27) || defined(CONFIG_MX35) \ #if defined(CONFIG_MX25) || defined(CONFIG_MX27) || defined(CONFIG_MX35) \
|| defined(CONFIG_MX51) || defined(CONFIG_MX53) || defined(CONFIG_MX51) || defined(CONFIG_MX53)
@ -198,5 +199,12 @@ int main(void)
DEFINE(PLL_DP_HFS_MFN, offsetof(struct dpll, dp_hfs_mfn)); DEFINE(PLL_DP_HFS_MFN, offsetof(struct dpll, dp_hfs_mfn));
#endif #endif
#ifdef CONFIG_ARM_SMCCC
DEFINE(ARM_SMCCC_RES_X0_OFFS, offsetof(struct arm_smccc_res, a0));
DEFINE(ARM_SMCCC_RES_X2_OFFS, offsetof(struct arm_smccc_res, a2));
DEFINE(ARM_SMCCC_QUIRK_ID_OFFS, offsetof(struct arm_smccc_quirk, id));
DEFINE(ARM_SMCCC_QUIRK_STATE_OFFS, offsetof(struct arm_smccc_quirk, state));
#endif
return 0; return 0;
} }

View file

@ -356,7 +356,10 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
int fake = (flag & BOOTM_STATE_OS_FAKE_GO); int fake = (flag & BOOTM_STATE_OS_FAKE_GO);
kernel_entry = (void (*)(int, int, uint))images->ep; kernel_entry = (void (*)(int, int, uint))images->ep;
#ifdef CONFIG_CPU_V7M
ulong addr = (ulong)kernel_entry | 1;
kernel_entry = (void *)addr;
#endif
s = getenv("machid"); s = getenv("machid");
if (s) { if (s) {
if (strict_strtoul(s, 16, &machid) < 0) { if (strict_strtoul(s, 16, &machid) < 0) {

View file

@ -44,22 +44,21 @@ void __weak board_init_f(ulong dummy)
/* /*
* This function jumps to an image with argument. Normally an FDT or ATAGS * This function jumps to an image with argument. Normally an FDT or ATAGS
* image. * image.
* arg: Pointer to paramter image in RAM
*/ */
#ifdef CONFIG_SPL_OS_BOOT #ifdef CONFIG_SPL_OS_BOOT
void __noreturn jump_to_image_linux(struct spl_image_info *spl_image, void *arg) void __noreturn jump_to_image_linux(struct spl_image_info *spl_image)
{ {
unsigned long machid = 0xffffffff; unsigned long machid = 0xffffffff;
#ifdef CONFIG_MACH_TYPE #ifdef CONFIG_MACH_TYPE
machid = CONFIG_MACH_TYPE; machid = CONFIG_MACH_TYPE;
#endif #endif
debug("Entering kernel arg pointer: 0x%p\n", arg); debug("Entering kernel arg pointer: 0x%p\n", spl_image->arg);
typedef void (*image_entry_arg_t)(int, int, void *) typedef void (*image_entry_arg_t)(int, int, void *)
__attribute__ ((noreturn)); __attribute__ ((noreturn));
image_entry_arg_t image_entry = image_entry_arg_t image_entry =
(image_entry_arg_t)(uintptr_t) spl_image->entry_point; (image_entry_arg_t)(uintptr_t) spl_image->entry_point;
cleanup_before_linux(); cleanup_before_linux();
image_entry(0, machid, arg); image_entry(0, machid, spl_image->arg);
} }
#endif #endif

View file

@ -11,19 +11,13 @@ config SYS_TEXT_BASE
config ASPEED_AST2500 config ASPEED_AST2500
bool "Support Aspeed AST2500 SoC" bool "Support Aspeed AST2500 SoC"
depends on DM_RESET
select CPU_ARM1176 select CPU_ARM1176
help help
The Aspeed AST2500 is a ARM-based SoC with arm1176 CPU. The Aspeed AST2500 is a ARM-based SoC with arm1176 CPU.
It is used as Board Management Controller on many server boards, It is used as Board Management Controller on many server boards,
which is enabled by support of LPC and eSPI peripherals. which is enabled by support of LPC and eSPI peripherals.
config WDT_NUM
int "Number of Watchdog Timers"
default 3 if ASPEED_AST2500
help
The number of Watchdot Timers on a SoC.
AST2500 has three WDTsk earlier versions have two or fewer.
source "arch/arm/mach-aspeed/ast2500/Kconfig" source "arch/arm/mach-aspeed/ast2500/Kconfig"
endif endif

View file

@ -6,6 +6,7 @@
#include <common.h> #include <common.h>
#include <dm.h> #include <dm.h>
#include <asm/io.h>
#include <asm/arch/scu_ast2500.h> #include <asm/arch/scu_ast2500.h>
int ast_get_clk(struct udevice **devp) int ast_get_clk(struct udevice **devp)
@ -28,3 +29,17 @@ void *ast_get_scu(void)
return priv->scu; return priv->scu;
} }
void ast_scu_unlock(struct ast2500_scu *scu)
{
writel(SCU_UNLOCK_VALUE, &scu->protection_key);
while (!readl(&scu->protection_key))
;
}
void ast_scu_lock(struct ast2500_scu *scu)
{
writel(~SCU_UNLOCK_VALUE, &scu->protection_key);
while (readl(&scu->protection_key))
;
}

View file

@ -12,6 +12,7 @@
#include <errno.h> #include <errno.h>
#include <ram.h> #include <ram.h>
#include <regmap.h> #include <regmap.h>
#include <reset.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/arch/scu_ast2500.h> #include <asm/arch/scu_ast2500.h>
#include <asm/arch/sdram_ast2500.h> #include <asm/arch/sdram_ast2500.h>
@ -182,9 +183,8 @@ static int ast2500_sdrammc_ddr4_calibrate_vref(struct dram_info *info)
static size_t ast2500_sdrammc_get_vga_mem_size(struct dram_info *info) static size_t ast2500_sdrammc_get_vga_mem_size(struct dram_info *info)
{ {
size_t vga_mem_size_base = 8 * 1024 * 1024; size_t vga_mem_size_base = 8 * 1024 * 1024;
u32 vga_hwconf = (readl(&info->scu->hwstrap) u32 vga_hwconf = (readl(&info->scu->hwstrap) & SCU_HWSTRAP_VGAMEM_MASK)
>> SCU_HWSTRAP_VGAMEM_SHIFT) >> SCU_HWSTRAP_VGAMEM_SHIFT;
& SCU_HWSTRAP_VGAMEM_MASK;
return vga_mem_size_base << vga_hwconf; return vga_mem_size_base << vga_hwconf;
} }
@ -328,6 +328,7 @@ static void ast2500_sdrammc_lock(struct dram_info *info)
static int ast2500_sdrammc_probe(struct udevice *dev) static int ast2500_sdrammc_probe(struct udevice *dev)
{ {
struct reset_ctl reset_ctl;
struct dram_info *priv = (struct dram_info *)dev_get_priv(dev); struct dram_info *priv = (struct dram_info *)dev_get_priv(dev);
struct ast2500_sdrammc_regs *regs = priv->regs; struct ast2500_sdrammc_regs *regs = priv->regs;
int i; int i;
@ -345,9 +346,15 @@ static int ast2500_sdrammc_probe(struct udevice *dev)
} }
clk_set_rate(&priv->ddr_clk, priv->clock_rate); clk_set_rate(&priv->ddr_clk, priv->clock_rate);
ret = ast_wdt_reset_masked(ast_get_wdt(0), WDT_RESET_SDRAM); ret = reset_get_by_index(dev, 0, &reset_ctl);
if (ret) { if (ret) {
debug("%s(): SDRAM reset failed\n", __func__); debug("%s(): Failed to get reset signal\n", __func__);
return ret;
}
ret = reset_assert(&reset_ctl);
if (ret) {
debug("%s(): SDRAM reset failed: %u\n", __func__, ret);
return ret; return ret;
} }

View file

@ -9,51 +9,22 @@
#include <asm/arch/wdt.h> #include <asm/arch/wdt.h>
#include <linux/err.h> #include <linux/err.h>
void wdt_stop(struct ast_wdt *wdt) u32 ast_reset_mode_from_flags(ulong flags)
{ {
clrbits_le32(&wdt->ctrl, WDT_CTRL_EN); return flags & WDT_CTRL_RESET_MASK;
} }
void wdt_start(struct ast_wdt *wdt, u32 timeout) u32 ast_reset_mask_from_flags(ulong flags)
{ {
writel(timeout, &wdt->counter_reload_val); return flags >> 2;
writel(WDT_COUNTER_RESTART_VAL, &wdt->counter_restart);
/*
* Setting CLK1MHZ bit is just for compatibility with ast2400 part.
* On ast2500 watchdog timer clock is fixed at 1MHz and the bit is
* read-only
*/
setbits_le32(&wdt->ctrl,
WDT_CTRL_EN | WDT_CTRL_RESET | WDT_CTRL_CLK1MHZ);
} }
struct ast_wdt *ast_get_wdt(u8 wdt_number) ulong ast_flags_from_reset_mode_mask(u32 reset_mode, u32 reset_mask)
{ {
if (wdt_number > CONFIG_WDT_NUM - 1) ulong ret = reset_mode & WDT_CTRL_RESET_MASK;
return ERR_PTR(-EINVAL);
return (struct ast_wdt *)(WDT_BASE + if (ret == WDT_CTRL_RESET_SOC)
sizeof(struct ast_wdt) * wdt_number); ret |= (reset_mask << 2);
}
return ret;
int ast_wdt_reset_masked(struct ast_wdt *wdt, u32 mask)
{
#ifdef CONFIG_ASPEED_AST2500
if (!mask)
return -EINVAL;
writel(mask, &wdt->reset_mask);
clrbits_le32(&wdt->ctrl,
WDT_CTRL_RESET_MASK << WDT_CTRL_RESET_MODE_SHIFT);
wdt_start(wdt, 1);
/* Wait for WDT to reset */
while (readl(&wdt->ctrl) & WDT_CTRL_EN)
;
wdt_stop(wdt);
return 0;
#else
return -EINVAL;
#endif
} }

View file

@ -284,7 +284,7 @@ static unsigned long pll_freq_get(int pll)
u32 tmp, reg; u32 tmp, reg;
if (pll == MAIN_PLL) { if (pll == MAIN_PLL) {
ret = external_clk[sys_clk]; ret = get_external_clk(sys_clk);
if (pllctl_reg_read(pll, ctl) & PLLCTL_PLLEN_MASK) { if (pllctl_reg_read(pll, ctl) & PLLCTL_PLLEN_MASK) {
/* PLL mode */ /* PLL mode */
tmp = __raw_readl(KS2_MAINPLLCTL0); tmp = __raw_readl(KS2_MAINPLLCTL0);
@ -302,23 +302,23 @@ static unsigned long pll_freq_get(int pll)
} else { } else {
switch (pll) { switch (pll) {
case PASS_PLL: case PASS_PLL:
ret = external_clk[pa_clk]; ret = get_external_clk(pa_clk);
reg = KS2_PASSPLLCTL0; reg = KS2_PASSPLLCTL0;
break; break;
case TETRIS_PLL: case TETRIS_PLL:
ret = external_clk[tetris_clk]; ret = get_external_clk(tetris_clk);
reg = KS2_ARMPLLCTL0; reg = KS2_ARMPLLCTL0;
break; break;
case DDR3A_PLL: case DDR3A_PLL:
ret = external_clk[ddr3a_clk]; ret = get_external_clk(ddr3a_clk);
reg = KS2_DDR3APLLCTL0; reg = KS2_DDR3APLLCTL0;
break; break;
case DDR3B_PLL: case DDR3B_PLL:
ret = external_clk[ddr3b_clk]; ret = get_external_clk(ddr3b_clk);
reg = KS2_DDR3BPLLCTL0; reg = KS2_DDR3BPLLCTL0;
break; break;
case UART_PLL: case UART_PLL:
ret = external_clk[uart_clk]; ret = get_external_clk(uart_clk);
reg = KS2_UARTPLLCTL0; reg = KS2_UARTPLLCTL0;
break; break;
default: default:

View file

@ -12,8 +12,8 @@
#define PLLSET_CMD_LIST "<pa|arm|ddr3>" #define PLLSET_CMD_LIST "<pa|arm|ddr3>"
#define DEV_SUPPORTED_SPEEDS 0x1ff #define DEV_SUPPORTED_SPEEDS 0xff
#define ARM_SUPPORTED_SPEEDS 0xff #define ARM_SUPPORTED_SPEEDS 0x3ff
#define KS2_CLK1_6 sys_clk0_6_clk #define KS2_CLK1_6 sys_clk0_6_clk

View file

@ -117,7 +117,6 @@ struct pll_init_data {
int pll_od; /* PLL output divider */ int pll_od; /* PLL output divider */
}; };
extern unsigned int external_clk[ext_clk_count];
extern const struct keystone_pll_regs keystone_pll_regs[]; extern const struct keystone_pll_regs keystone_pll_regs[];
extern s16 divn_val[]; extern s16 divn_val[];
extern int speeds[]; extern int speeds[];
@ -129,6 +128,7 @@ unsigned long ks_clk_get_rate(unsigned int clk);
int get_max_dev_speed(int *spds); int get_max_dev_speed(int *spds);
int get_max_arm_speed(int *spds); int get_max_arm_speed(int *spds);
void pll_pa_clk_sel(void); void pll_pa_clk_sel(void);
unsigned int get_external_clk(u32 clk);
#endif #endif
#endif #endif

View file

@ -86,4 +86,25 @@
#define RSTMUX_OMODE8_INT 0x3 #define RSTMUX_OMODE8_INT 0x3
#define RSTMUX_OMODE8_INT_AND_DEV_RESET 0x4 #define RSTMUX_OMODE8_INT_AND_DEV_RESET 0x4
/* DEVSTAT register definition */
#define KS2_DEVSTAT_REFCLK_SHIFT 7
#define KS2_DEVSTAT_REFCLK_MASK (0x7 << 7)
/* GPMC */
#define KS2_GPMC_BASE 0x21818000
/* SYSCLK indexes */
#define SYSCLK_19MHz 0
#define SYSCLK_24MHz 1
#define SYSCLK_25MHz 2
#define SYSCLK_26MHz 3
#define MAX_SYSCLK 4
#ifndef __ASSEMBLY__
static inline u8 get_sysclk_index(void)
{
u32 dev_stat = __raw_readl(KS2_DEVSTAT);
return (dev_stat & KS2_DEVSTAT_REFCLK_MASK) >> KS2_DEVSTAT_REFCLK_SHIFT;
}
#endif
#endif /* __ASM_ARCH_HARDWARE_K2G_H */ #endif /* __ASM_ARCH_HARDWARE_K2G_H */

View file

@ -34,6 +34,9 @@ config TARGET_ICONNECT
config TARGET_KM_KIRKWOOD config TARGET_KM_KIRKWOOD
bool "KM_KIRKWOOD Board" bool "KM_KIRKWOOD Board"
select BOARD_LATE_INIT select BOARD_LATE_INIT
imply CMD_CRAMFS
imply CMD_DIAG
imply FS_CRAMFS
config TARGET_NET2BIG_V2 config TARGET_NET2BIG_V2
bool "LaCie 2Big Network v2 NAS Board" bool "LaCie 2Big Network v2 NAS Board"

View file

@ -94,7 +94,7 @@ int dram_init_banksize(void)
ac = fdt_address_cells(fdt, 0); ac = fdt_address_cells(fdt, 0);
sc = fdt_size_cells(fdt, 0); sc = fdt_size_cells(fdt, 0);
if (ac < 1 || sc > 2 || sc < 1 || sc > 2) { if (ac < 1 || ac > 2 || sc < 1 || sc > 2) {
printf("invalid address/size cells\n"); printf("invalid address/size cells\n");
return -ENXIO; return -ENXIO;
} }

View file

@ -1,3 +1,152 @@
if ARCH_OMAP2PLUS
choice
prompt "OMAP2+ platform select"
default TARGET_BRXRE1
config TARGET_BRXRE1
bool "Support BRXRE1"
select BOARD_LATE_INIT
config TARGET_BRPPT1
bool "Support BRPPT1"
select BOARD_LATE_INIT
config TARGET_DRACO
bool "Support draco"
select BOARD_LATE_INIT
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_THUBAN
bool "Support thuban"
select BOARD_LATE_INIT
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_RASTABAN
bool "Support rastaban"
select BOARD_LATE_INIT
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_ETAMIN
bool "Support etamin"
select BOARD_LATE_INIT
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_PXM2
bool "Support pxm2"
select BOARD_LATE_INIT
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_RUT
bool "Support rut"
select BOARD_LATE_INIT
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_TI814X_EVM
bool "Support ti814x_evm"
config TARGET_TI816X_EVM
bool "Support ti816x_evm"
config OMAP34XX
bool "OMAP34XX SoC"
select ARM_ERRATA_430973
select ARM_ERRATA_454179
select ARM_ERRATA_621766
select ARM_ERRATA_725233
select USE_TINY_PRINTF
imply SPL_EXT_SUPPORT
imply SPL_FAT_SUPPORT
imply SPL_GPIO_SUPPORT
imply SPL_I2C_SUPPORT
imply SPL_LIBCOMMON_SUPPORT
imply SPL_LIBDISK_SUPPORT
imply SPL_LIBGENERIC_SUPPORT
imply SPL_MMC_SUPPORT
imply SPL_NAND_SUPPORT
imply SPL_POWER_SUPPORT
imply SPL_SERIAL_SUPPORT
imply SYS_THUMB_BUILD
config OMAP44XX
bool "OMAP44XX SoC"
select USE_TINY_PRINTF
imply SPL_DISPLAY_PRINT
imply SPL_EXT_SUPPORT
imply SPL_FAT_SUPPORT
imply SPL_GPIO_SUPPORT
imply SPL_I2C_SUPPORT
imply SPL_LIBCOMMON_SUPPORT
imply SPL_LIBDISK_SUPPORT
imply SPL_LIBGENERIC_SUPPORT
imply SPL_MMC_SUPPORT
imply SPL_NAND_SUPPORT
imply SPL_POWER_SUPPORT
imply SPL_SERIAL_SUPPORT
imply SYS_THUMB_BUILD
config OMAP54XX
bool "OMAP54XX SoC"
select ARM_ERRATA_798870
select SYS_THUMB_BUILD
imply SPL_DISPLAY_PRINT
imply SPL_ENV_SUPPORT
imply SPL_EXT_SUPPORT
imply SPL_FAT_SUPPORT
imply SPL_GPIO_SUPPORT
imply SPL_I2C_SUPPORT
imply SPL_LIBCOMMON_SUPPORT
imply SPL_LIBDISK_SUPPORT
imply SPL_LIBGENERIC_SUPPORT
imply SPL_MMC_SUPPORT
imply SPL_NAND_SUPPORT
imply SPL_POWER_SUPPORT
imply SPL_SERIAL_SUPPORT
config AM43XX
bool "AM43XX SoC"
imply SPL_DM
imply SPL_DM_SEQ_ALIAS
imply SPL_OF_CONTROL
imply SPL_OF_TRANSLATE
imply SPL_SEPARATE_BSS
imply SPL_SYS_MALLOC_SIMPLE
imply SYS_THUMB_BUILD
help
Support for AM43xx SOC from Texas Instruments.
The AM43xx high performance SOC features a Cortex-A9
ARM core, a quad core PRU-ICSS for industrial Ethernet
protocols, dual camera support, optional 3D graphics
and an optional customer programmable secure boot.
config AM33XX
bool "AM33XX SoC"
imply SYS_THUMB_BUILD
help
Support for AM335x SOC from Texas Instruments.
The AM335x high performance SOC features a Cortex-A8
ARM core, a dual core PRU-ICSS for industrial Ethernet
protocols, optional 3D graphics and an optional customer
programmable secure boot.
config TARGET_CM_T43
bool "Support cm_t43"
endchoice
config TI_SECURE_DEVICE config TI_SECURE_DEVICE
bool "HS Device Type Support" bool "HS Device Type Support"
depends on OMAP54XX || AM43XX || AM33XX || ARCH_KEYSTONE depends on OMAP54XX || AM43XX || AM33XX || ARCH_KEYSTONE
@ -15,3 +164,17 @@ source "arch/arm/mach-omap2/omap4/Kconfig"
source "arch/arm/mach-omap2/omap5/Kconfig" source "arch/arm/mach-omap2/omap5/Kconfig"
source "arch/arm/mach-omap2/am33xx/Kconfig" source "arch/arm/mach-omap2/am33xx/Kconfig"
source "board/BuR/brxre1/Kconfig"
source "board/BuR/brppt1/Kconfig"
source "board/siemens/draco/Kconfig"
source "board/siemens/pxm2/Kconfig"
source "board/siemens/rut/Kconfig"
source "board/ti/ti814x/Kconfig"
source "board/ti/ti816x/Kconfig"
source "board/ti/am43xx/Kconfig"
source "board/ti/am335x/Kconfig"
source "board/compulab/cm_t335/Kconfig"
source "board/compulab/cm_t43/Kconfig"
endif

View file

@ -29,9 +29,11 @@ obj-y += abb.o
endif endif
ifneq ($(CONFIG_OMAP54XX),) ifneq ($(CONFIG_OMAP54XX),)
ifeq ($(CONFIG_DM_SCSI),)
obj-y += pipe3-phy.o obj-y += pipe3-phy.o
obj-$(CONFIG_SCSI_AHCI_PLAT) += sata.o obj-$(CONFIG_SCSI_AHCI_PLAT) += sata.o
endif endif
endif
ifeq ($(CONFIG_SYS_DCACHE_OFF),) ifeq ($(CONFIG_SYS_DCACHE_OFF),)
obj-y += omap-cache.o obj-y += omap-cache.o

View file

@ -44,8 +44,9 @@ config TARGET_AM335X_BALTOS
select DM_SERIAL select DM_SERIAL
select DM_GPIO select DM_GPIO
config TARGET_AM335X_IGEP0033 config TARGET_AM335X_IGEP003X
bool "Support am335x_igep0033" bool "Support am335x_igep003x"
select BOARD_LATE_INIT
select DM select DM
select DM_SERIAL select DM_SERIAL
select DM_GPIO select DM_GPIO

View file

@ -46,7 +46,7 @@ static const struct omap_gpio_platdata omap34xx_gpio[] = {
{ 5, OMAP34XX_GPIO6_BASE }, { 5, OMAP34XX_GPIO6_BASE },
}; };
U_BOOT_DEVICES(am33xx_gpios) = { U_BOOT_DEVICES(omap34xx_gpios) = {
{ "gpio_omap", &omap34xx_gpio[0] }, { "gpio_omap", &omap34xx_gpio[0] },
{ "gpio_omap", &omap34xx_gpio[1] }, { "gpio_omap", &omap34xx_gpio[1] },
{ "gpio_omap", &omap34xx_gpio[2] }, { "gpio_omap", &omap34xx_gpio[2] },

View file

@ -1,11 +1,17 @@
if OMAP54XX if OMAP54XX
config DRA7XX
bool
help
DRA7xx is an OMAP based SOC with Dual Core A-15s.
choice choice
prompt "OMAP5 board select" prompt "OMAP5 board select"
optional optional
config TARGET_CL_SOM_AM57X config TARGET_CL_SOM_AM57X
bool "CompuLab CL-SOM-AM57x" bool "CompuLab CL-SOM-AM57x"
select DRA7XX
config TARGET_CM_T54 config TARGET_CM_T54
bool "CompuLab CM-T54" bool "CompuLab CM-T54"
@ -16,12 +22,14 @@ config TARGET_OMAP5_UEVM
config TARGET_DRA7XX_EVM config TARGET_DRA7XX_EVM
bool "TI DRA7XX" bool "TI DRA7XX"
select BOARD_LATE_INIT select BOARD_LATE_INIT
select DRA7XX
select TI_I2C_BOARD_DETECT select TI_I2C_BOARD_DETECT
select PHYS_64BIT select PHYS_64BIT
config TARGET_AM57XX_EVM config TARGET_AM57XX_EVM
bool "AM57XX" bool "AM57XX"
select BOARD_LATE_INIT select BOARD_LATE_INIT
select DRA7XX
select TI_I2C_BOARD_DETECT select TI_I2C_BOARD_DETECT
endchoice endchoice

View file

@ -361,6 +361,9 @@ void enable_basic_clocks(void)
(*prcm)->cm_l4per_gpio6_clkctrl, (*prcm)->cm_l4per_gpio6_clkctrl,
(*prcm)->cm_l4per_gpio7_clkctrl, (*prcm)->cm_l4per_gpio7_clkctrl,
(*prcm)->cm_l4per_gpio8_clkctrl, (*prcm)->cm_l4per_gpio8_clkctrl,
#ifdef CONFIG_SCSI_AHCI_PLAT
(*prcm)->cm_l3init_ocp2scp3_clkctrl,
#endif
0 0
}; };
@ -378,6 +381,9 @@ void enable_basic_clocks(void)
#ifdef CONFIG_TI_QSPI #ifdef CONFIG_TI_QSPI
(*prcm)->cm_l4per_qspi_clkctrl, (*prcm)->cm_l4per_qspi_clkctrl,
#endif
#ifdef CONFIG_SCSI_AHCI_PLAT
(*prcm)->cm_l3init_sata_clkctrl,
#endif #endif
0 0
}; };
@ -411,6 +417,12 @@ void enable_basic_clocks(void)
setbits_le32((*prcm)->cm_l4per_qspi_clkctrl, (1<<24)); setbits_le32((*prcm)->cm_l4per_qspi_clkctrl, (1<<24));
#endif #endif
#ifdef CONFIG_SCSI_AHCI_PLAT
/* Enable optional functional clock for SATA */
setbits_le32((*prcm)->cm_l3init_sata_clkctrl,
SATA_CLKCTRL_OPTFCLKEN_MASK);
#endif
/* Enable SCRM OPT clocks for PER and CORE dpll */ /* Enable SCRM OPT clocks for PER and CORE dpll */
setbits_le32((*prcm)->cm_wkupaon_scrm_clkctrl, setbits_le32((*prcm)->cm_wkupaon_scrm_clkctrl,
OPTFCLKEN_SCRM_PER_MASK); OPTFCLKEN_SCRM_PER_MASK);

View file

@ -37,29 +37,6 @@ int init_sata(int dev)
int ret; int ret;
u32 val; u32 val;
u32 const clk_domains_sata[] = {
0
};
u32 const clk_modules_hw_auto_sata[] = {
(*prcm)->cm_l3init_ocp2scp3_clkctrl,
0
};
u32 const clk_modules_explicit_en_sata[] = {
(*prcm)->cm_l3init_sata_clkctrl,
0
};
do_enable_clocks(clk_domains_sata,
clk_modules_hw_auto_sata,
clk_modules_explicit_en_sata,
0);
/* Enable optional functional clock for SATA */
setbits_le32((*prcm)->cm_l3init_sata_clkctrl,
SATA_CLKCTRL_OPTFCLKEN_MASK);
sata_phy.power_reg = (void __iomem *)(*ctrl)->control_phy_power_sata; sata_phy.power_reg = (void __iomem *)(*ctrl)->control_phy_power_sata;
/* Power up the PHY */ /* Power up the PHY */

View file

@ -39,8 +39,10 @@ u32 secure_rom_call(u32 service, u32 proc_id, u32 flag, ...)
num_args = va_arg(ap, u32); num_args = va_arg(ap, u32);
if (num_args > 4) if (num_args > 4) {
va_end(ap);
return 1; return 1;
}
/* Copy args to aligned args structure */ /* Copy args to aligned args structure */
for (i = 0; i < num_args; i++) for (i = 0; i < num_args; i++)

Some files were not shown because too many files have changed in this diff Show more