Compare commits
178 Commits
v2017.05-r
...
v2017.05
| Author | SHA1 | Date | |
|---|---|---|---|
| 64c4ffa9fa | |||
| 169b50efe2 | |||
| f59a3b21f6 | |||
| d27e35f256 | |||
| 05d887b461 | |||
| 1275a44e2f | |||
| cc93834dee | |||
| 27a198768e | |||
| 2f54205829 | |||
| ac6991fb5f | |||
| 61a77ce1d5 | |||
| a63d800196 | |||
| 7880dcf04c | |||
| d03857485e | |||
| 1f677e4266 | |||
| 2681e78a5e | |||
| 57ba664ebf | |||
| f73be5f1de | |||
| 26d61195f8 | |||
| c9032ce168 | |||
| ae189ba1ac | |||
| 00aff7bbc3 | |||
| 93d66ee566 | |||
| 3bd25cb512 | |||
| 10c01337d3 | |||
| d569c95ec0 | |||
| 279e7c491b | |||
| 80e44cfe10 | |||
| 9707274718 | |||
| d315628edb | |||
| 3d0aeb9090 | |||
| 854fcd5537 | |||
| deb9599915 | |||
| d66a10fc00 | |||
| 983b103f1c | |||
| 4893e34b00 | |||
| 0f7102588c | |||
| 218257b01a | |||
| c04b9b3440 | |||
| ac20a1b21c | |||
| ac60e46e7d | |||
| 4848d89d1f | |||
| b1a873df0a | |||
| 92572ecf80 | |||
| 0fd28b1f0e | |||
| bdf25a5e04 | |||
| 2838c07f47 | |||
| 56aceaf282 | |||
| 29ec685883 | |||
| 1e6776000e | |||
| 509b498a50 | |||
| 8a707bafe0 | |||
| dc89c6fb77 | |||
| a93fbf4a78 | |||
| efbe99ceb6 | |||
| 46f9ef1846 | |||
| 80e4bbfcd9 | |||
| 6cc96bc75a | |||
| 51c7f34809 | |||
| 17873341af | |||
| a1b343d754 | |||
| d2366dfe1d | |||
| 43b41566f7 | |||
| 29f089a605 | |||
| 44913aa52b | |||
| 71e48c26a6 | |||
| 0a5559c10a | |||
| 79ed06f2cc | |||
| 6f008a2e16 | |||
| 7f4ed7cb78 | |||
| 9fde52a8d4 | |||
| 9ad99bee9c | |||
| 83cb46c286 | |||
| 7f2e59aee5 | |||
| 2511b2ed4d | |||
| 6bd041f00d | |||
| e8f86a0261 | |||
| 12af9399e7 | |||
| 9a1d64809d | |||
| fedebf0d08 | |||
| 026f30ec3e | |||
| d14428c729 | |||
| fa642559f5 | |||
| 9fa3a54220 | |||
| 2ac2e20ef8 | |||
| b6adbec0f9 | |||
| e1b0929059 | |||
| 99fe76d023 | |||
| 5d267ec679 | |||
| 2eff3b7179 | |||
| 1967228b02 | |||
| 9828d050cf | |||
| f02abb0608 | |||
| e267d94011 | |||
| c199489f17 | |||
| 4e7f8de426 | |||
| 637548424b | |||
| fed9c76641 | |||
| 395e2142e4 | |||
| 1ae5def6be | |||
| 30ca20234e | |||
| 5e023e7eb3 | |||
| 10d8bc5a59 | |||
| 0918648d82 | |||
| acef236454 | |||
| 50ae7ae583 | |||
| 8201188cf9 | |||
| 33559ffe5b | |||
| fab03e30e6 | |||
| 328ce7fd50 | |||
| 8094a4a20b | |||
| 6c7ae2bfc9 | |||
| 409677ec17 | |||
| 379febac5a | |||
| 301791c9b0 | |||
| 7095f86418 | |||
| f5fd78860a | |||
| d7b560e665 | |||
| 751b0be0a1 | |||
| abc3e4df59 | |||
| 261f3deeb3 | |||
| 38495ebaf6 | |||
| e34dc387bd | |||
| 4d43d065db | |||
| 3c476d841d | |||
| 9481f186d0 | |||
| f83845829a | |||
| 54f302f119 | |||
| e1bc64eec2 | |||
| d1710561b0 | |||
| 7a931b958e | |||
| 0e0de24b07 | |||
| ea1e3f96c3 | |||
| 73be5b3fa7 | |||
| 6568c731c4 | |||
| ddc6a9de05 | |||
| 1ecd2a2f06 | |||
| 8399538cba | |||
| 546a6f3a9b | |||
| 573a3811ed | |||
| c54bcf6805 | |||
| c2da86f39e | |||
| 84a112a1a5 | |||
| 90d6500c0f | |||
| 4326b45474 | |||
| 60911104f3 | |||
| d39a0d2c84 | |||
| a6ea791cb9 | |||
| 511c66b1e6 | |||
| 363f67a96b | |||
| 3ff0900aaf | |||
| a6eb6769c6 | |||
| 27f31aac15 | |||
| 18f41f2fa2 | |||
| e0dfec863e | |||
| 668ec87f52 | |||
| 3d91f46ca8 | |||
| 85a9a14e4b | |||
| df1a51df3b | |||
| fb806ad61f | |||
| 6f04976ffb | |||
| 73fb583829 | |||
| c1303bfd7e | |||
| 4a3ab19322 | |||
| 511fc86d0b | |||
| 762f92a60e | |||
| 70f9661ca9 | |||
| 11d14bfb75 | |||
| d2a99502ad | |||
| f7244f2c48 | |||
| b7c19ea1ca | |||
| b3635f57d9 | |||
| 216c1e048f | |||
| d1a795ace9 | |||
| 0645c23a7c | |||
| a52ff334c5 | |||
| 4139b17037 | |||
| 97fbf26d79 |
22
.travis.yml
22
.travis.yml
@ -22,8 +22,6 @@ addons:
|
||||
- swig
|
||||
- libpython-dev
|
||||
- gcc-powerpc-linux-gnu
|
||||
- gcc-arm-linux-gnueabihf
|
||||
- gcc-aarch64-linux-gnu
|
||||
- iasl
|
||||
- grub-efi-ia32-bin
|
||||
- rpm2cpio
|
||||
@ -40,6 +38,9 @@ install:
|
||||
- ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname`
|
||||
# prepare buildman environment
|
||||
- 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
|
||||
- cat ~/.buildman
|
||||
- virtualenv /tmp/venv
|
||||
@ -69,7 +70,18 @@ before_script:
|
||||
./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;
|
||||
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 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
|
||||
git clone git://git.qemu.org/qemu.git /tmp/qemu;
|
||||
pushd /tmp/qemu;
|
||||
@ -111,6 +123,9 @@ matrix:
|
||||
include:
|
||||
# we need to build by vendor due to 50min time limit for builds
|
||||
# each env setting here is a dedicated build
|
||||
- env:
|
||||
- BUILDMAN="arc"
|
||||
TOOLCHAIN="arc"
|
||||
- env:
|
||||
- BUILDMAN="arm11"
|
||||
- env:
|
||||
@ -152,7 +167,7 @@ matrix:
|
||||
- env:
|
||||
- BUILDMAN="sun7i"
|
||||
- env:
|
||||
- BUILDMAN="sun8i -x orangepi_pc2"
|
||||
- BUILDMAN="sun8i"
|
||||
- env:
|
||||
- BUILDMAN="sun9i"
|
||||
- env:
|
||||
@ -221,7 +236,6 @@ matrix:
|
||||
- BUILDMAN="uniphier"
|
||||
- env:
|
||||
- BUILDMAN="aarch64 -x tegra,freescale,mvebu,uniphier,sunxi,samsung,rockchip"
|
||||
TOOLCHAIN="aarch64"
|
||||
- env:
|
||||
- BUILDMAN="rockchip"
|
||||
- env:
|
||||
|
||||
@ -436,6 +436,9 @@ F: configs/am335x_hs_evm_defconfig
|
||||
F: configs/am43xx_hs_evm_defconfig
|
||||
F: configs/am57xx_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
|
||||
#M: Martin Krause <martin.krause@tq-systems.de>
|
||||
|
||||
2
Makefile
2
Makefile
@ -5,7 +5,7 @@
|
||||
VERSION = 2017
|
||||
PATCHLEVEL = 05
|
||||
SUBLEVEL =
|
||||
EXTRAVERSION = -rc2
|
||||
EXTRAVERSION =
|
||||
NAME =
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
||||
25
README
25
README
@ -823,13 +823,9 @@ The following options need to be configured:
|
||||
CONFIG_CMD_AES AES 128 CBC encrypt/decrypt
|
||||
CONFIG_CMD_ASKENV * ask for env variable
|
||||
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_BOOTI * ARM64 Linux kernel Image support
|
||||
CONFIG_CMD_CACHE * icache, dcache
|
||||
CONFIG_CMD_CLK * clock command support
|
||||
CONFIG_CMD_CONSOLE coninfo
|
||||
CONFIG_CMD_CRC32 * crc32
|
||||
CONFIG_CMD_DATE * support for RTC, date/time...
|
||||
@ -1549,13 +1545,6 @@ The following options need to be configured:
|
||||
This will also enable the command "fatwrite" enabling the
|
||||
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:
|
||||
CONFIG_FS_FAT_MAX_CLUSTSIZE
|
||||
|
||||
@ -1581,7 +1570,6 @@ The following options need to be configured:
|
||||
|
||||
CONFIG_SYS_DIU_ADDR
|
||||
CONFIG_VIDEO
|
||||
CONFIG_CMD_BMP
|
||||
CONFIG_CFB_CONSOLE
|
||||
CONFIG_VIDEO_SW_CURSOR
|
||||
CONFIG_VGA_AS_SINGLE_DEVICE
|
||||
@ -1642,9 +1630,6 @@ The following options need to be configured:
|
||||
|
||||
320x240. Black & white.
|
||||
|
||||
Normally display is black on white background; define
|
||||
CONFIG_SYS_WHITE_ON_BLACK to get it inverted.
|
||||
|
||||
CONFIG_LCD_ALIGNMENT
|
||||
|
||||
Normally the LCD is page-aligned (typically 4KB). If this is
|
||||
@ -2849,16 +2834,6 @@ The following options need to be configured:
|
||||
This enables 'hdmidet' command which returns true if an
|
||||
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:
|
||||
CONFIG_BOOTCOUNT_LIMIT
|
||||
|
||||
|
||||
235
arch/arm/Kconfig
235
arch/arm/Kconfig
@ -174,6 +174,15 @@ config SYS_CACHELINE_SIZE
|
||||
default 64 if SYS_CACHE_SHIFT_6
|
||||
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
|
||||
bool "support boot from semihosting"
|
||||
help
|
||||
@ -254,11 +263,6 @@ config SPL_USE_ARCH_MEMSET
|
||||
Such implementation may be faster under some conditions
|
||||
but may increase the binary size.
|
||||
|
||||
config ARCH_OMAP2
|
||||
bool
|
||||
select CPU_V7
|
||||
select SUPPORT_SPL
|
||||
|
||||
config ARM64_SUPPORT_AARCH32
|
||||
bool "ARM64 system support AArch32 execution state"
|
||||
default y if ARM64 && !TARGET_THUNDERX_88XX
|
||||
@ -481,72 +485,6 @@ config TARGET_VEXPRESS_CA9X4
|
||||
bool "Support vexpress_ca9x4"
|
||||
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
|
||||
bool "Support bcm23550_w1d"
|
||||
select CPU_V7
|
||||
@ -604,6 +542,13 @@ config ARCH_KEYSTONE
|
||||
select SUPPORT_SPL
|
||||
select SYS_THUMB_BUILD
|
||||
select CMD_POWEROFF
|
||||
imply FIT
|
||||
|
||||
config ARCH_OMAP2PLUS
|
||||
bool "TI OMAP2+"
|
||||
select CPU_V7
|
||||
select SUPPORT_SPL
|
||||
imply FIT
|
||||
|
||||
config ARCH_MESON
|
||||
bool "Amlogic Meson"
|
||||
@ -639,126 +584,6 @@ config ARCH_MX5
|
||||
select CPU_V7
|
||||
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
|
||||
bool "Renesas ARM SoCs"
|
||||
select DM
|
||||
@ -796,10 +621,6 @@ config ARCH_SOCFPGA
|
||||
select SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
|
||||
select SYS_THUMB_BUILD
|
||||
|
||||
config TARGET_CM_T43
|
||||
bool "Support cm_t43"
|
||||
select ARCH_OMAP2
|
||||
|
||||
config ARCH_SUNXI
|
||||
bool "Support sunxi (Allwinner) SoCs"
|
||||
select CMD_GPIO
|
||||
@ -828,11 +649,6 @@ config TARGET_TS4600
|
||||
select CPU_ARM926EJS
|
||||
select SUPPORT_SPL
|
||||
|
||||
config TARGET_TS4800
|
||||
bool "Support TS4800"
|
||||
select CPU_V7
|
||||
select SYS_FSL_ERRATUM_ESDHC_A001
|
||||
|
||||
config ARCH_VF610
|
||||
bool "Freescale Vybrid"
|
||||
select CPU_V7
|
||||
@ -860,6 +676,7 @@ config ARCH_ZYNQ
|
||||
select CLK
|
||||
select SPL_CLK
|
||||
select CLK_ZYNQ
|
||||
imply CMD_CLK
|
||||
|
||||
config ARCH_ZYNQMP
|
||||
bool "Support Xilinx ZynqMP Platform"
|
||||
@ -1243,10 +1060,7 @@ source "arch/arm/cpu/armv8/Kconfig"
|
||||
source "arch/arm/imx-common/Kconfig"
|
||||
|
||||
source "board/aries/m28evk/Kconfig"
|
||||
source "board/aries/m53evk/Kconfig"
|
||||
source "board/bosch/shc/Kconfig"
|
||||
source "board/BuR/brxre1/Kconfig"
|
||||
source "board/BuR/brppt1/Kconfig"
|
||||
source "board/CarMediaLab/flea3/Kconfig"
|
||||
source "board/Marvell/aspenite/Kconfig"
|
||||
source "board/Marvell/gplugd/Kconfig"
|
||||
@ -1261,8 +1075,6 @@ source "board/broadcom/bcmnsp/Kconfig"
|
||||
source "board/broadcom/bcmns2/Kconfig"
|
||||
source "board/cavium/thunderx/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/freescale/ls2080a/Kconfig"
|
||||
source "board/freescale/ls2080aqds/Kconfig"
|
||||
@ -1283,11 +1095,6 @@ source "board/freescale/mx28evk/Kconfig"
|
||||
source "board/freescale/mx31ads/Kconfig"
|
||||
source "board/freescale/mx31pdk/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/gdsys/a38x/Kconfig"
|
||||
source "board/grinn/chiliboard/Kconfig"
|
||||
@ -1301,9 +1108,6 @@ source "board/phytec/pcm051/Kconfig"
|
||||
source "board/ppcag/bg0900/Kconfig"
|
||||
source "board/sandisk/sansa_fuze_plus/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/spear/spear300/Kconfig"
|
||||
source "board/spear/spear310/Kconfig"
|
||||
@ -1314,15 +1118,10 @@ source "board/st/stv0991/Kconfig"
|
||||
source "board/sunxi/Kconfig"
|
||||
source "board/syteco/zmx25/Kconfig"
|
||||
source "board/tcl/sl50/Kconfig"
|
||||
source "board/ti/am335x/Kconfig"
|
||||
source "board/ti/am43xx/Kconfig"
|
||||
source "board/birdland/bav335x/Kconfig"
|
||||
source "board/ti/ti814x/Kconfig"
|
||||
source "board/ti/ti816x/Kconfig"
|
||||
source "board/timll/devkit3250/Kconfig"
|
||||
source "board/toradex/colibri_pxa270/Kconfig"
|
||||
source "board/technologic/ts4600/Kconfig"
|
||||
source "board/technologic/ts4800/Kconfig"
|
||||
source "board/vscom/baltos/Kconfig"
|
||||
source "board/woodburn/Kconfig"
|
||||
source "board/work-microwave/work_92105/Kconfig"
|
||||
|
||||
@ -64,7 +64,7 @@ machine-$(CONFIG_ARCH_MVEBU) += mvebu
|
||||
# TODO: rename CONFIG_TEGRA -> CONFIG_ARCH_TEGRA
|
||||
# TODO: rename CONFIG_ORION5X -> CONFIG_ARCH_ORION5X
|
||||
machine-$(CONFIG_ORION5X) += orion5x
|
||||
machine-$(CONFIG_ARCH_OMAP2) += omap2
|
||||
machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2
|
||||
machine-$(CONFIG_ARCH_S5PC1XX) += s5pc1xx
|
||||
machine-$(CONFIG_ARCH_SUNXI) += sunxi
|
||||
machine-$(CONFIG_ARCH_SNAPDRAGON) += snapdragon
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
#
|
||||
|
||||
ifndef CONFIG_STANDALONE_LOAD_ADDR
|
||||
ifneq ($(CONFIG_ARCH_OMAP2),)
|
||||
ifneq ($(CONFIG_ARCH_OMAP2PLUS),)
|
||||
CONFIG_STANDALONE_LOAD_ADDR = 0x80300000
|
||||
else
|
||||
CONFIG_STANDALONE_LOAD_ADDR = 0xc100000
|
||||
@ -45,7 +45,7 @@ endif
|
||||
|
||||
# Only test once
|
||||
ifeq ($(CONFIG_$(SPL_)SYS_THUMB_BUILD),y)
|
||||
archprepare: checkthumb
|
||||
archprepare: checkthumb checkgcc6
|
||||
|
||||
checkthumb:
|
||||
@if test "$(call cc-name)" = "gcc" -a \
|
||||
@ -55,8 +55,18 @@ checkthumb:
|
||||
echo '*** Your board is configured for THUMB mode.'; \
|
||||
false; \
|
||||
fi
|
||||
else
|
||||
archprepare: checkgcc6
|
||||
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,
|
||||
# i. e. for example:
|
||||
# - with ELDK 4.2 (EABI supported), use:
|
||||
|
||||
@ -12,12 +12,13 @@ obj-y += cache_v7.o cache_v7_asm.o
|
||||
obj-y += cpu.o cp15.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)
|
||||
obj-y += lowlevel_init.o
|
||||
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_PSCI) += psci.o psci-common.o
|
||||
|
||||
|
||||
@ -94,8 +94,6 @@ void ft_cpu_setup(void *blob, bd_t *bd)
|
||||
}
|
||||
#endif
|
||||
|
||||
fdt_fixup_ethernet(blob);
|
||||
|
||||
off = fdt_node_offset_by_prop_value(blob, -1, "device_type", "cpu", 4);
|
||||
while (off != -FDT_ERR_NOTFOUND) {
|
||||
val = gd->cpu_clk;
|
||||
|
||||
@ -14,24 +14,63 @@ choice
|
||||
prompt "MX5 board select"
|
||||
optional
|
||||
|
||||
config TARGET_USBARMORY
|
||||
bool "Support USB armory"
|
||||
select CPU_V7
|
||||
config TARGET_M53EVK
|
||||
bool "Support m53evk"
|
||||
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
|
||||
bool "Support CX9020"
|
||||
select BOARD_LATE_INIT
|
||||
select CPU_V7
|
||||
select MX53
|
||||
select DM
|
||||
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
|
||||
|
||||
config SYS_SOC
|
||||
default "mx5"
|
||||
|
||||
source "board/aries/m53evk/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/technologic/ts4800/Kconfig"
|
||||
|
||||
endif
|
||||
|
||||
56
arch/arm/cpu/armv7/smccc-call.S
Normal file
56
arch/arm/cpu/armv7/smccc-call.S
Normal 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)
|
||||
@ -27,6 +27,17 @@
|
||||
#define GICD_BASE (SUNXI_GIC400_BASE + GIC_DIST_OFFSET)
|
||||
#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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
#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;
|
||||
do {
|
||||
tmp >>= 1;
|
||||
@ -82,7 +94,8 @@ static void __secure clamp_release(u32 __maybe_unused *clamp)
|
||||
static void __secure clamp_set(u32 __maybe_unused *clamp)
|
||||
{
|
||||
#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);
|
||||
#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,
|
||||
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)
|
||||
{
|
||||
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);
|
||||
|
||||
/* 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);
|
||||
#endif
|
||||
|
||||
/* Assert reset on target CPU */
|
||||
writel(0, &cpucfg->cpu[cpu].rst);
|
||||
|
||||
@ -16,6 +16,8 @@ obj-y += tlb.o
|
||||
obj-y += transition.o
|
||||
obj-y += fwcall.o
|
||||
obj-y += cpu-dt.o
|
||||
obj-$(CONFIG_ARM_SMCCC) += smccc-call.o
|
||||
|
||||
ifndef CONFIG_SPL_BUILD
|
||||
obj-$(CONFIG_ARMV8_SPIN_TABLE) += spin_table.o spin_table_v8.o
|
||||
endif
|
||||
|
||||
@ -7,25 +7,19 @@
|
||||
#include <common.h>
|
||||
#include <asm/psci.h>
|
||||
#include <asm/system.h>
|
||||
#ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
|
||||
#include <asm/armv8/sec_firmware.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
|
||||
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
|
||||
* device node of PSCI. But still return 0 instead of an error
|
||||
* number to support detecting PSCI dynamically and then switching
|
||||
* 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;
|
||||
#endif
|
||||
fdt_psci(fdt);
|
||||
|
||||
#if defined(CONFIG_ARMV8_PSCI) && !defined(CONFIG_ARMV8_SECURE_BASE)
|
||||
@ -34,7 +28,6 @@ int psci_update_dt(void *fdt)
|
||||
__secure_end - __secure_start);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -36,6 +36,7 @@ config ARCH_LS1046A
|
||||
select SYS_FSL_DDR_VER_50
|
||||
select SYS_FSL_ERRATUM_A008336
|
||||
select SYS_FSL_ERRATUM_A008511
|
||||
select SYS_FSL_ERRATUM_A008850
|
||||
select SYS_FSL_ERRATUM_A009801
|
||||
select SYS_FSL_ERRATUM_A009803
|
||||
select SYS_FSL_ERRATUM_A009942
|
||||
@ -63,6 +64,8 @@ config ARCH_LS2080A
|
||||
select SYS_FSL_SEC_COMPAT_5
|
||||
select SYS_FSL_SEC_LE
|
||||
select SYS_FSL_SRDS_2
|
||||
select FSL_TZASC_1
|
||||
select FSL_TZASC_2
|
||||
select SYS_FSL_ERRATUM_A008336
|
||||
select SYS_FSL_ERRATUM_A008511
|
||||
select SYS_FSL_ERRATUM_A008514
|
||||
@ -171,6 +174,30 @@ config SYS_LS_PPA_FW_ADDR
|
||||
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 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
|
||||
|
||||
config SYS_FSL_ERRATUM_A010315
|
||||
@ -223,6 +250,12 @@ config SYS_FSL_SRDS_2
|
||||
config SYS_HAS_SERDES
|
||||
bool
|
||||
|
||||
config FSL_TZASC_1
|
||||
bool
|
||||
|
||||
config FSL_TZASC_2
|
||||
bool
|
||||
|
||||
endmenu
|
||||
|
||||
menu "Layerscape clock tree configuration"
|
||||
|
||||
@ -22,11 +22,11 @@ obj-$(CONFIG_SYS_HAS_SERDES) += fsl_lsch2_serdes.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_LS2080A),)
|
||||
ifneq ($(CONFIG_ARCH_LS2080A),)
|
||||
obj-$(CONFIG_SYS_HAS_SERDES) += ls2080a_serdes.o
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_LS1043A),)
|
||||
ifneq ($(CONFIG_ARCH_LS1043A),)
|
||||
obj-$(CONFIG_SYS_HAS_SERDES) += ls1043a_serdes.o
|
||||
obj-$(CONFIG_ARMV8_PSCI) += ls1043a_psci.o
|
||||
endif
|
||||
|
||||
@ -15,18 +15,14 @@
|
||||
#include <asm/arch/soc.h>
|
||||
#include <asm/arch/cpu.h>
|
||||
#include <asm/arch/speed.h>
|
||||
#ifdef CONFIG_MP
|
||||
#include <asm/arch/mp.h>
|
||||
#endif
|
||||
#include <efi_loader.h>
|
||||
#include <fm_eth.h>
|
||||
#include <fsl-mc/fsl_mc.h>
|
||||
#ifdef CONFIG_FSL_ESDHC
|
||||
#include <fsl_esdhc.h>
|
||||
#endif
|
||||
#ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
|
||||
#include <asm/armv8/sec_firmware.h>
|
||||
#endif
|
||||
#ifdef CONFIG_SYS_FSL_DDR
|
||||
#include <fsl_ddr.h>
|
||||
#endif
|
||||
@ -92,7 +88,7 @@ static inline void early_mmu_setup(void)
|
||||
|
||||
static void fix_pcie_mmu_map(void)
|
||||
{
|
||||
#ifdef CONFIG_LS2080A
|
||||
#ifdef CONFIG_ARCH_LS2080A
|
||||
unsigned int i;
|
||||
u32 svr, ver;
|
||||
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
@ -475,13 +471,19 @@ int cpu_eth_init(bd_t *bis)
|
||||
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)
|
||||
{
|
||||
#ifdef CONFIG_MP
|
||||
int rv = 1;
|
||||
u32 psci_ver = 0xffffffff;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_FSL_ERRATUM_A009635
|
||||
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)
|
||||
erratum_a009942_check_cpo();
|
||||
#endif
|
||||
#ifdef CONFIG_MP
|
||||
#if defined(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) && \
|
||||
defined(CONFIG_SEC_FIRMWARE_ARMV8_PSCI)
|
||||
/* Check the psci version to determine if the psci is supported */
|
||||
psci_ver = sec_firmware_support_psci_version();
|
||||
#endif
|
||||
if (psci_ver == 0xffffffff) {
|
||||
rv = fsl_layerscape_wake_seconday_cores();
|
||||
if (rv)
|
||||
if (check_psci()) {
|
||||
debug("PSCI: PSCI does not exist.\n");
|
||||
|
||||
/* if PSCI does not exist, boot secondary cores here */
|
||||
if (fsl_layerscape_wake_seconday_cores())
|
||||
printf("Did not wake secondary cores\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_SERDES
|
||||
fsl_serdes_init();
|
||||
@ -523,7 +520,7 @@ int timer_init(void)
|
||||
#ifdef CONFIG_FSL_LSCH3
|
||||
u32 __iomem *cltbenr = (u32 *)CONFIG_SYS_FSL_PMU_CLTBENR;
|
||||
#endif
|
||||
#ifdef CONFIG_LS2080A
|
||||
#ifdef CONFIG_ARCH_LS2080A
|
||||
u32 __iomem *pctbenr = (u32 *)FSL_PMU_PCTBENR_OFFSET;
|
||||
u32 svr_dev_id;
|
||||
#endif
|
||||
@ -541,7 +538,7 @@ int timer_init(void)
|
||||
out_le32(cltbenr, 0xf);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LS2080A
|
||||
#ifdef CONFIG_ARCH_LS2080A
|
||||
/*
|
||||
* In certain Layerscape SoCs, the clock for each core's
|
||||
* has an enable bit in the PMU Physical Core Time Base Enable
|
||||
|
||||
@ -373,8 +373,8 @@ void ft_cpu_setup(void *blob, bd_t *bd)
|
||||
"clock-frequency", CONFIG_SYS_NS16550_CLK, 1);
|
||||
#endif
|
||||
|
||||
do_fixup_by_compat_u32(blob, "fixed-clock",
|
||||
"clock-frequency", CONFIG_SYS_CLK_FREQ, 1);
|
||||
do_fixup_by_path_u32(blob, "/sysclk", "clock-frequency",
|
||||
CONFIG_SYS_CLK_FREQ, 1);
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
ft_pci_setup(blob, bd);
|
||||
|
||||
@ -76,7 +76,7 @@ ENTRY(lowlevel_init)
|
||||
#ifdef CONFIG_FSL_LSCH3
|
||||
|
||||
/* Set Wuo bit for RN-I 20 */
|
||||
#ifdef CONFIG_LS2080A
|
||||
#ifdef CONFIG_ARCH_LS2080A
|
||||
ldr x0, =CCI_AUX_CONTROL_BASE(20)
|
||||
ldr x1, =0x00000010
|
||||
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
|
||||
* placeholders.
|
||||
*/
|
||||
#ifdef CONFIG_FSL_TZASC_1
|
||||
ldr x1, =TZASC_GATE_KEEPER(0)
|
||||
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_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 w0, [x1] /* Region-0 Attributes Register */
|
||||
orr w0, w0, #1 << 31 /* Set Sec global write en, Bit[31] */
|
||||
orr w0, w0, #1 << 30 /* Set Sec global read en, Bit[30] */
|
||||
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 w0, [x1] /* Region-1 Attributes Register */
|
||||
orr w0, w0, #1 << 31 /* Set Sec global write en, Bit[31] */
|
||||
orr w0, w0, #1 << 30 /* Set Sec global read en, Bit[30] */
|
||||
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 w0, [x1] /* Region-1 Attributes Register */
|
||||
mov w0, #0xFFFFFFFF /* Set nsaid_wr_en and nsaid_rd_en */
|
||||
str w0, [x1]
|
||||
|
||||
#endif
|
||||
isb
|
||||
dsb sy
|
||||
#endif
|
||||
|
||||
@ -70,6 +70,7 @@ static struct serdes_config serdes2_cfg_tbl[] = {
|
||||
SATA2 } },
|
||||
{0x4A, {SGMII9, SGMII10, SGMII11, SGMII12, PCIE4, PCIE4, SATA1,
|
||||
SATA2 } },
|
||||
{0x51, {PCIE3, PCIE3, PCIE3, PCIE3, PCIE4, PCIE4, PCIE4, PCIE4 } },
|
||||
{0x57, {PCIE3, PCIE3, PCIE3, PCIE3, PCIE4, PCIE4, SGMII15, SGMII16 } },
|
||||
{}
|
||||
};
|
||||
|
||||
@ -37,13 +37,20 @@ int ppa_init(void)
|
||||
int ret;
|
||||
|
||||
#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;
|
||||
#if defined(CONFIG_SYS_LS_PPA_FW_IN_MMC) || \
|
||||
defined(CONFIG_SYS_LS_PPA_FW_IN_NAND)
|
||||
void *ppa_hdr_ddr;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP
|
||||
ppa_fit_addr = (void *)CONFIG_SYS_LS_PPA_FW_ADDR;
|
||||
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 */
|
||||
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;
|
||||
struct fdt_header *fitp;
|
||||
u32 cnt;
|
||||
u32 blk = CONFIG_SYS_LS_PPA_FW_ADDR / 512;
|
||||
u32 blk;
|
||||
|
||||
debug("%s: PPA image load from eMMC/SD\n", __func__);
|
||||
|
||||
@ -81,6 +88,7 @@ int ppa_init(void)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
blk = CONFIG_SYS_LS_PPA_FW_ADDR / 512;
|
||||
cnt = DIV_ROUND_UP(fdt_header_len, 512);
|
||||
debug("%s: MMC read PPA FIT header: dev # %u, block # %u, count %u\n",
|
||||
__func__, dev, blk, cnt);
|
||||
@ -102,6 +110,29 @@ int ppa_init(void)
|
||||
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);
|
||||
free(fitp);
|
||||
|
||||
@ -113,6 +144,7 @@ int ppa_init(void)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
blk = CONFIG_SYS_LS_PPA_FW_ADDR / 512;
|
||||
cnt = DIV_ROUND_UP(fw_length, 512);
|
||||
debug("%s: MMC read PPA FIT image: dev # %u, block # %u, count %u\n",
|
||||
__func__, dev, blk, cnt);
|
||||
@ -148,6 +180,31 @@ int ppa_init(void)
|
||||
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);
|
||||
|
||||
ppa_fit_addr = malloc(fw_length);
|
||||
@ -177,14 +234,25 @@ int ppa_init(void)
|
||||
#ifdef CONFIG_CHAIN_OF_TRUST
|
||||
ppa_img_addr = (uintptr_t)ppa_fit_addr;
|
||||
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,
|
||||
CONFIG_PPA_KEY_HASH,
|
||||
PPA_KEY_HASH,
|
||||
&ppa_img_addr);
|
||||
if (ret != 0)
|
||||
printf("PPA validation failed\n");
|
||||
else
|
||||
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
|
||||
|
||||
#ifdef CONFIG_FSL_LSCH3
|
||||
|
||||
@ -41,13 +41,31 @@ u32 spl_boot_mode(const u32 boot_device)
|
||||
}
|
||||
|
||||
#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)
|
||||
{
|
||||
/* Clear global data */
|
||||
memset((void *)gd, 0, sizeof(gd_t));
|
||||
board_early_init_f();
|
||||
timer_init();
|
||||
#ifdef CONFIG_LS2080A
|
||||
#ifdef CONFIG_ARCH_LS2080A
|
||||
env_init();
|
||||
#endif
|
||||
get_clocks();
|
||||
|
||||
@ -227,7 +227,7 @@ unsigned int sec_firmware_support_psci_version(void)
|
||||
if (sec_firmware_addr & SEC_FIRMWARE_RUNNING)
|
||||
return _sec_firmware_support_psci_version();
|
||||
|
||||
return 0xffffffff;
|
||||
return PSCI_INVALID_VER;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
44
arch/arm/cpu/armv8/smccc-call.S
Normal file
44
arch/arm/cpu/armv8/smccc-call.S
Normal 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)
|
||||
@ -153,6 +153,7 @@ dtb-$(CONFIG_ARCH_SOCFPGA) += \
|
||||
socfpga_cyclone5_socdk.dtb \
|
||||
socfpga_cyclone5_de0_nano_soc.dtb \
|
||||
socfpga_cyclone5_de1_soc.dtb \
|
||||
socfpga_cyclone5_de10_nano.dtb \
|
||||
socfpga_cyclone5_sockit.dtb \
|
||||
socfpga_cyclone5_socrates.dtb \
|
||||
socfpga_cyclone5_sr1500.dtb \
|
||||
@ -166,7 +167,7 @@ dtb-$(CONFIG_TARGET_AM57XX_EVM) += am57xx-beagle-x15.dtb \
|
||||
am571x-idk.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-twr-duart.dtb ls1021a-twr-lpuart.dtb \
|
||||
ls1021a-iot-duart.dtb
|
||||
@ -304,6 +305,10 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \
|
||||
sun8i-h3-orangepi-plus2e.dtb \
|
||||
sun8i-h3-nanopi-neo.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) += \
|
||||
sun50i-h5-orangepi-pc2.dtb
|
||||
dtb-$(CONFIG_MACH_SUN50I) += \
|
||||
|
||||
68
arch/arm/dts/socfpga_cyclone5_de10_nano.dts
Normal file
68
arch/arm/dts/socfpga_cyclone5_de10_nano.dts
Normal 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";
|
||||
};
|
||||
69
arch/arm/dts/sun8i-r40-bananapi-m2-ultra.dts
Normal file
69
arch/arm/dts/sun8i-r40-bananapi-m2-ultra.dts
Normal 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
183
arch/arm/dts/sun8i-r40.dtsi
Normal 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;
|
||||
};
|
||||
};
|
||||
83
arch/arm/dts/sun8i-v3s-licheepi-zero.dts
Normal file
83
arch/arm/dts/sun8i-v3s-licheepi-zero.dts
Normal 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 = <®_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
284
arch/arm/dts/sun8i-v3s.dtsi
Normal 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)>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -4,7 +4,43 @@
|
||||
* Copyright (C) 2016 Socionext Inc.
|
||||
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+ X11
|
||||
* This file is dual-licensed: you can use it either under the terms
|
||||
* of the GPL or the X11 license, at your option. Note that this dual
|
||||
* licensing only applies to this file, and not this project as a
|
||||
* whole.
|
||||
*
|
||||
* a) This file is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* Or, alternatively,
|
||||
*
|
||||
* b) Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/memreserve/ 0x80000000 0x00080000;
|
||||
@ -53,31 +89,31 @@
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
||||
opp@245000000 {
|
||||
opp-245000000 {
|
||||
opp-hz = /bits/ 64 <245000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@250000000 {
|
||||
opp-250000000 {
|
||||
opp-hz = /bits/ 64 <250000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@490000000 {
|
||||
opp-490000000 {
|
||||
opp-hz = /bits/ 64 <490000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@500000000 {
|
||||
opp-500000000 {
|
||||
opp-hz = /bits/ 64 <500000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@653334000 {
|
||||
opp-653334000 {
|
||||
opp-hz = /bits/ 64 <653334000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@666667000 {
|
||||
opp-666667000 {
|
||||
opp-hz = /bits/ 64 <666667000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@980000000 {
|
||||
opp-980000000 {
|
||||
opp-hz = /bits/ 64 <980000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
@ -279,6 +315,11 @@
|
||||
bus-width = <8>;
|
||||
mmc-ddr-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 {
|
||||
@ -377,7 +418,7 @@
|
||||
};
|
||||
|
||||
nand: nand@68000000 {
|
||||
compatible = "socionext,denali-nand-v5b";
|
||||
compatible = "socionext,uniphier-denali-nand-v5b";
|
||||
status = "disabled";
|
||||
reg-names = "nand_data", "denali_reg";
|
||||
reg = <0x68000000 0x20>, <0x68100000 0x1000>;
|
||||
|
||||
@ -4,7 +4,43 @@
|
||||
* Copyright (C) 2015-2016 Socionext Inc.
|
||||
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+ X11
|
||||
* This file is dual-licensed: you can use it either under the terms
|
||||
* of the GPL or the X11 license, at your option. Note that this dual
|
||||
* licensing only applies to this file, and not this project as a
|
||||
* whole.
|
||||
*
|
||||
* a) This file is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* Or, alternatively,
|
||||
*
|
||||
* b) Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/memreserve/ 0x80000000 0x00080000;
|
||||
@ -80,35 +116,35 @@
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
||||
opp@250000000 {
|
||||
opp-250000000 {
|
||||
opp-hz = /bits/ 64 <250000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@275000000 {
|
||||
opp-275000000 {
|
||||
opp-hz = /bits/ 64 <275000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@500000000 {
|
||||
opp-500000000 {
|
||||
opp-hz = /bits/ 64 <500000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@550000000 {
|
||||
opp-550000000 {
|
||||
opp-hz = /bits/ 64 <550000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@666667000 {
|
||||
opp-666667000 {
|
||||
opp-hz = /bits/ 64 <666667000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@733334000 {
|
||||
opp-733334000 {
|
||||
opp-hz = /bits/ 64 <733334000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@1000000000 {
|
||||
opp-1000000000 {
|
||||
opp-hz = /bits/ 64 <1000000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@1100000000 {
|
||||
opp-1100000000 {
|
||||
opp-hz = /bits/ 64 <1100000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
@ -118,35 +154,35 @@
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
||||
opp@250000000 {
|
||||
opp-250000000 {
|
||||
opp-hz = /bits/ 64 <250000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@275000000 {
|
||||
opp-275000000 {
|
||||
opp-hz = /bits/ 64 <275000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@500000000 {
|
||||
opp-500000000 {
|
||||
opp-hz = /bits/ 64 <500000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@550000000 {
|
||||
opp-550000000 {
|
||||
opp-hz = /bits/ 64 <550000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@666667000 {
|
||||
opp-666667000 {
|
||||
opp-hz = /bits/ 64 <666667000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@733334000 {
|
||||
opp-733334000 {
|
||||
opp-hz = /bits/ 64 <733334000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@1000000000 {
|
||||
opp-1000000000 {
|
||||
opp-hz = /bits/ 64 <1000000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@1100000000 {
|
||||
opp-1100000000 {
|
||||
opp-hz = /bits/ 64 <1100000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
@ -353,6 +389,11 @@
|
||||
bus-width = <8>;
|
||||
mmc-ddr-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 {
|
||||
@ -429,7 +470,7 @@
|
||||
};
|
||||
|
||||
nand: nand@68000000 {
|
||||
compatible = "socionext,denali-nand-v5b";
|
||||
compatible = "socionext,uniphier-denali-nand-v5b";
|
||||
status = "disabled";
|
||||
reg-names = "nand_data", "denali_reg";
|
||||
reg = <0x68000000 0x20>, <0x68100000 0x1000>;
|
||||
|
||||
@ -4,7 +4,43 @@
|
||||
* Copyright (C) 2015-2016 Socionext Inc.
|
||||
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+ X11
|
||||
* This file is dual-licensed: you can use it either under the terms
|
||||
* of the GPL or the X11 license, at your option. Note that this dual
|
||||
* licensing only applies to this file, and not this project as a
|
||||
* whole.
|
||||
*
|
||||
* a) This file is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* Or, alternatively,
|
||||
*
|
||||
* b) Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/ {
|
||||
@ -41,67 +77,67 @@
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
||||
opp@100000000 {
|
||||
opp-100000000 {
|
||||
opp-hz = /bits/ 64 <100000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@116667000 {
|
||||
opp-116667000 {
|
||||
opp-hz = /bits/ 64 <116667000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@150000000 {
|
||||
opp-150000000 {
|
||||
opp-hz = /bits/ 64 <150000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@175000000 {
|
||||
opp-175000000 {
|
||||
opp-hz = /bits/ 64 <175000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@200000000 {
|
||||
opp-200000000 {
|
||||
opp-hz = /bits/ 64 <200000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@233334000 {
|
||||
opp-233334000 {
|
||||
opp-hz = /bits/ 64 <233334000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@300000000 {
|
||||
opp-300000000 {
|
||||
opp-hz = /bits/ 64 <300000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@350000000 {
|
||||
opp-350000000 {
|
||||
opp-hz = /bits/ 64 <350000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@400000000 {
|
||||
opp-400000000 {
|
||||
opp-hz = /bits/ 64 <400000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@466667000 {
|
||||
opp-466667000 {
|
||||
opp-hz = /bits/ 64 <466667000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@600000000 {
|
||||
opp-600000000 {
|
||||
opp-hz = /bits/ 64 <600000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@700000000 {
|
||||
opp-700000000 {
|
||||
opp-hz = /bits/ 64 <700000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@800000000 {
|
||||
opp-800000000 {
|
||||
opp-hz = /bits/ 64 <800000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@933334000 {
|
||||
opp-933334000 {
|
||||
opp-hz = /bits/ 64 <933334000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@1200000000 {
|
||||
opp-1200000000 {
|
||||
opp-hz = /bits/ 64 <1200000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@1400000000 {
|
||||
opp-1400000000 {
|
||||
opp-hz = /bits/ 64 <1400000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
@ -620,7 +656,7 @@
|
||||
};
|
||||
|
||||
nand: nand@68000000 {
|
||||
compatible = "socionext,denali-nand-v5b";
|
||||
compatible = "socionext,uniphier-denali-nand-v5b";
|
||||
status = "disabled";
|
||||
reg-names = "nand_data", "denali_reg";
|
||||
reg = <0x68000000 0x20>, <0x68100000 0x1000>;
|
||||
|
||||
@ -4,7 +4,43 @@
|
||||
* Copyright (C) 2015-2016 Socionext Inc.
|
||||
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+ X11
|
||||
* This file is dual-licensed: you can use it either under the terms
|
||||
* of the GPL or the X11 license, at your option. Note that this dual
|
||||
* licensing only applies to this file, and not this project as a
|
||||
* whole.
|
||||
*
|
||||
* a) This file is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* Or, alternatively,
|
||||
*
|
||||
* b) Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/ {
|
||||
@ -61,35 +97,35 @@
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
||||
opp@100000000 {
|
||||
opp-100000000 {
|
||||
opp-hz = /bits/ 64 <100000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@150000000 {
|
||||
opp-150000000 {
|
||||
opp-hz = /bits/ 64 <150000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@200000000 {
|
||||
opp-200000000 {
|
||||
opp-hz = /bits/ 64 <200000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@300000000 {
|
||||
opp-300000000 {
|
||||
opp-hz = /bits/ 64 <300000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@400000000 {
|
||||
opp-400000000 {
|
||||
opp-hz = /bits/ 64 <400000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@600000000 {
|
||||
opp-600000000 {
|
||||
opp-hz = /bits/ 64 <600000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@800000000 {
|
||||
opp-800000000 {
|
||||
opp-hz = /bits/ 64 <800000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
opp@1200000000 {
|
||||
opp-1200000000 {
|
||||
opp-hz = /bits/ 64 <1200000000>;
|
||||
clock-latency-ns = <300>;
|
||||
};
|
||||
@ -632,7 +668,7 @@
|
||||
};
|
||||
|
||||
nand: nand@68000000 {
|
||||
compatible = "socionext,denali-nand-v5b";
|
||||
compatible = "socionext,uniphier-denali-nand-v5b";
|
||||
status = "disabled";
|
||||
reg-names = "nand_data", "denali_reg";
|
||||
reg = <0x68000000 0x20>, <0x68100000 0x1000>;
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
i2c0 = &i2c0;
|
||||
i2c1 = &i2c1;
|
||||
mmc0 = &sdhci0;
|
||||
usbotg0 = &usb0;
|
||||
};
|
||||
|
||||
memory@0 {
|
||||
|
||||
@ -29,6 +29,29 @@ config SECURE_BOOT
|
||||
bool "Support i.MX HAB features"
|
||||
depends on ARCH_MX7 || ARCH_MX6 || ARCH_MX5
|
||||
select FSL_CAAM
|
||||
imply CMD_DEKBLOB
|
||||
help
|
||||
This option enables the support for secure boot (HAB).
|
||||
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.
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
*/
|
||||
#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 SRDS_MAX_LANES 8
|
||||
#define CONFIG_SYS_PAGE_SIZE 0x10000
|
||||
@ -132,7 +132,7 @@
|
||||
#define CONFIG_SYS_FSL_PEX_LUT_BE
|
||||
|
||||
/* SoC related */
|
||||
#ifdef CONFIG_LS1043A
|
||||
#ifdef CONFIG_ARCH_LS1043A
|
||||
#define CONFIG_SYS_FMAN_V3
|
||||
#define CONFIG_SYS_NUM_FMAN 1
|
||||
#define CONFIG_SYS_NUM_FM1_DTSEC 7
|
||||
@ -185,7 +185,12 @@
|
||||
#elif defined(CONFIG_ARCH_LS1012A)
|
||||
#define GICD_BASE 0x01401000
|
||||
#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_MAX_MEM_MAPPED CONFIG_SYS_DDR_BLOCK1_SIZE
|
||||
|
||||
@ -199,7 +204,7 @@
|
||||
|
||||
#define CONFIG_SYS_FSL_IFC_BE
|
||||
#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_SRK_LE
|
||||
#define CONFIG_KEY_REVOCATION
|
||||
|
||||
@ -249,7 +249,7 @@ static struct mm_region final_map[] = {
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
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_SIZE,
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef CONFIG_LS2080A
|
||||
#ifdef CONFIG_ARCH_LS2080A
|
||||
enum srds_prtcl {
|
||||
/*
|
||||
* Nobody will check whether the device 'NONE' has been configured,
|
||||
|
||||
@ -31,7 +31,11 @@ extern u64 __spin_table[];
|
||||
extern u64 __real_cntfrq;
|
||||
extern u64 *secondary_boot_code;
|
||||
extern size_t __secondary_boot_code_size;
|
||||
#ifdef CONFIG_MP
|
||||
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);
|
||||
phys_addr_t determine_mp_bootpg(void);
|
||||
void secondary_boot_func(void);
|
||||
|
||||
@ -108,7 +108,7 @@
|
||||
|
||||
#define DCU_LAYER_MAX_NUM 16
|
||||
|
||||
#ifdef CONFIG_LS102XA
|
||||
#ifdef CONFIG_ARCH_LS1021A
|
||||
#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
|
||||
#define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
|
||||
#else
|
||||
|
||||
@ -17,7 +17,7 @@ struct i2c {
|
||||
unsigned short res2;
|
||||
unsigned short stat; /* 0x08 */
|
||||
unsigned short res3;
|
||||
unsigned short iv; /* 0x0C */
|
||||
unsigned short we; /* 0x0C */
|
||||
unsigned short res4;
|
||||
unsigned short syss; /* 0x10 */
|
||||
unsigned short res4a;
|
||||
@ -43,6 +43,18 @@ struct i2c {
|
||||
unsigned short res14;
|
||||
unsigned short systest; /* 0x3c */
|
||||
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_ */
|
||||
|
||||
@ -13,10 +13,15 @@
|
||||
*/
|
||||
extern u32 SAVE_SP_ADDR;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Hand control back to the bootrom to load another
|
||||
* 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
|
||||
|
||||
@ -67,13 +67,22 @@ struct sunxi_ccm_reg {
|
||||
u32 dram_pll_cfg; /* 0xf8 PLL_DDR cfg register, A33 only */
|
||||
u32 mbus_reset; /* 0xfc MBUS reset control, A33 only */
|
||||
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 */
|
||||
#endif
|
||||
u32 be1_clk_cfg; /* 0x108 BE1 module clock */
|
||||
u32 fe0_clk_cfg; /* 0x10c FE0 module clock */
|
||||
u32 fe1_clk_cfg; /* 0x110 FE1 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 lcd1_ch0_clk_cfg; /* 0x11c LCD1 CH0 module clock */
|
||||
#endif
|
||||
u32 reserved14[3];
|
||||
u32 lcd0_ch1_clk_cfg; /* 0x12c LCD0 CH1 module clock */
|
||||
u32 lcd1_ch1_clk_cfg; /* 0x130 LCD1 CH1 module clock */
|
||||
@ -85,7 +94,11 @@ struct sunxi_ccm_reg {
|
||||
u32 dmic_clk_cfg; /* 0x148 Digital Mic module clock*/
|
||||
u32 reserved15;
|
||||
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 */
|
||||
#endif
|
||||
u32 mtc_clk_cfg; /* 0x158 MTC module clock */
|
||||
u32 mbus0_clk_cfg; /* 0x15c MBUS0 module clock */
|
||||
u32 mbus1_clk_cfg; /* 0x160 MBUS1 module clock */
|
||||
@ -142,6 +155,8 @@ struct sunxi_ccm_reg {
|
||||
u32 apb2_reset_cfg; /* 0x2d8 APB2 Reset config */
|
||||
u32 reserved25[5];
|
||||
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 */
|
||||
@ -191,6 +206,7 @@ struct sunxi_ccm_reg {
|
||||
#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_INTEGER_MODE (0x1 << 24)
|
||||
#define CCM_PLL3_CTRL_LOCK (0x1 << 28)
|
||||
#define CCM_PLL3_CTRL_EN (0x1 << 31)
|
||||
|
||||
#define CCM_PLL5_CTRL_M(n) ((((n) - 1) & 0x3) << 0)
|
||||
@ -220,6 +236,16 @@ struct sunxi_ccm_reg {
|
||||
#define CCM_MIPI_PLL_CTRL_LDO_EN (0x3 << 22)
|
||||
#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_SIGMA_DELTA_EN (0x1 << 24)
|
||||
#define CCM_PLL11_CTRL_UPD (0x1 << 30)
|
||||
@ -271,9 +297,15 @@ struct sunxi_ccm_reg {
|
||||
#define AHB_GATE_OFFSET_DRC0 25
|
||||
#define AHB_GATE_OFFSET_DE_FE0 14
|
||||
#define AHB_GATE_OFFSET_DE_BE0 12
|
||||
#define AHB_GATE_OFFSET_DE 12
|
||||
#define AHB_GATE_OFFSET_HDMI 11
|
||||
#ifndef CONFIG_SUNXI_DE2
|
||||
#define AHB_GATE_OFFSET_LCD1 5
|
||||
#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_OCLK_DLY(x) ((x) << 8)
|
||||
@ -355,6 +387,12 @@ struct sunxi_ccm_reg {
|
||||
#define CCM_LCD_CH1_CTRL_PLL7_2X (3 << 24)
|
||||
#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_PLL_MASK (3 << 24)
|
||||
#define CCM_HDMI_CTRL_PLL3 (0 << 24)
|
||||
@ -364,6 +402,8 @@ struct sunxi_ccm_reg {
|
||||
#define CCM_HDMI_CTRL_DDC_GATE (0x1 << 30)
|
||||
#define CCM_HDMI_CTRL_GATE (0x1 << 31)
|
||||
|
||||
#define CCM_HDMI_SLOW_CTRL_DDC_GATE (1 << 31)
|
||||
|
||||
#if defined(CONFIG_MACH_SUN50I)
|
||||
#define MBUS_CLK_DEFAULT 0x81000002 /* PLL6x2 / 3 */
|
||||
#elif defined(CONFIG_MACH_SUN8I)
|
||||
@ -391,9 +431,16 @@ struct sunxi_ccm_reg {
|
||||
#define AHB_RESET_OFFSET_DRC0 25
|
||||
#define AHB_RESET_OFFSET_DE_FE0 14
|
||||
#define AHB_RESET_OFFSET_DE_BE0 12
|
||||
#define AHB_RESET_OFFSET_DE 12
|
||||
#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_LCD0 4
|
||||
#else
|
||||
#define AHB_RESET_OFFSET_LCD1 4
|
||||
#define AHB_RESET_OFFSET_LCD0 3
|
||||
#endif
|
||||
|
||||
/* ahb_reset2 offsets */
|
||||
#define AHB_RESET_OFFSET_EPHY 2
|
||||
@ -416,6 +463,13 @@ struct sunxi_ccm_reg {
|
||||
#define CCM_DE_CTRL_PLL10 (5 << 24)
|
||||
#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 */
|
||||
#define CCM_SEC_SWITCH_MBUS_NONSEC (1 << 2)
|
||||
#define CCM_SEC_SWITCH_BUS_NONSEC (1 << 1)
|
||||
@ -424,7 +478,9 @@ struct sunxi_ccm_reg {
|
||||
#ifndef __ASSEMBLY__
|
||||
void clock_set_pll1(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_pll10(unsigned int hz);
|
||||
void clock_set_pll11(unsigned int clk, bool sigma_delta_enable);
|
||||
void clock_set_mipi_pll(unsigned int hz);
|
||||
unsigned int clock_get_pll3(void);
|
||||
|
||||
@ -16,5 +16,6 @@
|
||||
#define SOCID_A64 0x1689
|
||||
#define SOCID_H3 0x1680
|
||||
#define SOCID_H5 0x1718
|
||||
#define SOCID_R40 0x1701
|
||||
|
||||
#endif /* _SUNXI_CPU_H */
|
||||
|
||||
@ -108,7 +108,7 @@ defined(CONFIG_MACH_SUN50I)
|
||||
#define SUNXI_TP_BASE 0x01c25000
|
||||
#define SUNXI_PMU_BASE 0x01c25400
|
||||
|
||||
#ifdef CONFIG_MACH_SUN7I
|
||||
#if defined CONFIG_MACH_SUN7I || defined CONFIG_MACH_SUN8I_R40
|
||||
#define SUNXI_CPUCFG_BASE 0x01c25c00
|
||||
#endif
|
||||
|
||||
@ -167,7 +167,9 @@ defined(CONFIG_MACH_SUN50I)
|
||||
#define SUNXI_RTC_BASE 0x01f00000
|
||||
#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
|
||||
#endif
|
||||
|
||||
|
||||
@ -157,52 +157,6 @@ struct sunxi_de_be_reg {
|
||||
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 {
|
||||
u32 version_id; /* 0x000 */
|
||||
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_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.
|
||||
*/
|
||||
|
||||
@ -24,7 +24,9 @@
|
||||
#include <asm/arch/dram_sun8i_a33.h>
|
||||
#elif defined(CONFIG_MACH_SUN8I_A83T)
|
||||
#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>
|
||||
#elif defined(CONFIG_MACH_SUN9I)
|
||||
#include <asm/arch/dram_sun9i.h>
|
||||
|
||||
@ -15,7 +15,8 @@
|
||||
|
||||
struct sunxi_mctl_com_reg {
|
||||
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 mcr[16][2]; /* 0x10 */
|
||||
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_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)
|
||||
|
||||
struct sunxi_mctl_ctl_reg {
|
||||
@ -72,7 +84,8 @@ struct sunxi_mctl_ctl_reg {
|
||||
u32 clken; /* 0x0c */
|
||||
u32 pgsr[2]; /* 0x10 PHY general status registers */
|
||||
u32 statr; /* 0x18 */
|
||||
u8 res1[0x14]; /* 0x1c */
|
||||
u8 res1[0x10]; /* 0x1c */
|
||||
u32 lp3mr11; /* 0x2c */
|
||||
u32 mr[4]; /* 0x30 mode registers */
|
||||
u32 pllgcr; /* 0x40 */
|
||||
u32 ptr[5]; /* 0x44 PHY timing registers */
|
||||
@ -120,7 +133,8 @@ struct sunxi_mctl_ctl_reg {
|
||||
struct { /* 0x300 DATX8 modules*/
|
||||
u32 mdlr; /* 0x00 master delay line register */
|
||||
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 gcr; /* 0x44 general configuration register */
|
||||
u32 gsr[3]; /* 0x48 general status registers */
|
||||
|
||||
@ -161,6 +161,7 @@ enum sunxi_gpio_number {
|
||||
#define SUN8I_GPB_UART2 2
|
||||
#define SUN8I_A33_GPB_UART0 3
|
||||
#define SUN8I_A83T_GPB_UART0 2
|
||||
#define SUN8I_V3S_GPB_UART0 3
|
||||
#define SUN50I_GPB_UART0 4
|
||||
|
||||
#define SUNXI_GPC_NAND 2
|
||||
|
||||
128
arch/arm/include/asm/arch-sunxi/lcdc.h
Normal file
128
arch/arm/include/asm/arch-sunxi/lcdc.h
Normal 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 */
|
||||
@ -67,7 +67,7 @@ struct sunxi_timer_reg {
|
||||
struct sunxi_timer timer[6]; /* We have 6 timers */
|
||||
u8 res2[16];
|
||||
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 */
|
||||
/* XXX the following is not accurate for sun5i/sun7i */
|
||||
struct sunxi_64cnt cnt64; /* 0xa0 */
|
||||
@ -77,8 +77,7 @@ struct sunxi_timer_reg {
|
||||
struct sunxi_tgp tgp[4];
|
||||
u8 res5[8];
|
||||
u32 cpu_cfg;
|
||||
#endif
|
||||
#ifdef CONFIG_SUNXI_GEN_SUN6I
|
||||
#elif defined(CONFIG_SUNXI_GEN_SUN6I)
|
||||
u8 res3[16];
|
||||
struct sunxi_wdog wdog[5]; /* We have 5 watchdogs */
|
||||
#endif
|
||||
|
||||
@ -13,7 +13,10 @@
|
||||
#define WDT_CTRL_RESTART (0x1 << 0)
|
||||
#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_RESET_EN (0x1 << 1)
|
||||
|
||||
@ -7,12 +7,19 @@
|
||||
#ifndef __SEC_FIRMWARE_H_
|
||||
#define __SEC_FIRMWARE_H_
|
||||
|
||||
#define PSCI_INVALID_VER 0xffffffff
|
||||
|
||||
int sec_firmware_init(const void *, u32 *, u32 *);
|
||||
int _sec_firmware_entry(const void *, u32 *, u32 *);
|
||||
bool sec_firmware_is_valid(const void *);
|
||||
#ifdef CONFIG_SEC_FIRMWARE_ARMV8_PSCI
|
||||
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 /* __SEC_FIRMWARE_H_ */
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
#define CONFIG_STATIC_RELA
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_LS102XA) || \
|
||||
#if defined(CONFIG_ARCH_LS1021A) || \
|
||||
defined(CONFIG_CPU_PXA27X) || \
|
||||
defined(CONFIG_CPU_MONAHANS) || \
|
||||
defined(CONFIG_CPU_PXA25X) || \
|
||||
|
||||
@ -27,10 +27,10 @@
|
||||
#define CONFIG_SPL_UBOOT_KEY_HASH NULL
|
||||
#endif /* ifdef CONFIG_SPL_BUILD */
|
||||
|
||||
#ifndef CONFIG_SPL_BUILD
|
||||
#define CONFIG_CMD_BLOB
|
||||
#define CONFIG_CMD_HASH
|
||||
#define CONFIG_KEY_REVOCATION
|
||||
|
||||
#ifndef CONFIG_SPL_BUILD
|
||||
#define CONFIG_CMD_HASH
|
||||
#ifndef CONFIG_SYS_RAMBOOT
|
||||
/* The key used for verification of next level images
|
||||
* is picked up from an Extension Table which has
|
||||
@ -46,14 +46,15 @@
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_LS1043A) || defined(CONFIG_LS2080A)
|
||||
/* For LS1043 (ARMv8), ESBC image Address in Header is 64 bit
|
||||
* Similiarly for LS2080
|
||||
#if defined(CONFIG_FSL_LAYERSCAPE)
|
||||
/*
|
||||
* For fsl layerscape based platforms, ESBC image Address in Header
|
||||
* is 64 bit.
|
||||
*/
|
||||
#define CONFIG_ESBC_ADDR_64BIT
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LS2080A
|
||||
#ifdef CONFIG_ARCH_LS2080A
|
||||
#define CONFIG_EXTRA_ENV \
|
||||
"setenv fdt_high 0xa0000000;" \
|
||||
"setenv initrd_high 0xcfffffff;" \
|
||||
@ -68,7 +69,7 @@
|
||||
/* Copying Bootscript and Header to DDR from NOR for LS2 and for rest, from
|
||||
* Non-XIP Memory (Nand/SD)*/
|
||||
#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
|
||||
#endif
|
||||
/* 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
|
||||
* 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_HDR_SIZE 0x00000010
|
||||
#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
|
||||
#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_ADDR_DEVICE 0x60060000
|
||||
#define CONFIG_BS_HDR_SIZE 0x00002000
|
||||
#define CONFIG_BS_SIZE 0x00001000
|
||||
#endif /* #ifdef CONFIG_SD_BOOT */
|
||||
#endif
|
||||
#define CONFIG_BS_HDR_ADDR_RAM 0x81000000
|
||||
#define CONFIG_BS_ADDR_RAM 0x81020000
|
||||
#endif
|
||||
@ -109,23 +131,13 @@
|
||||
#endif
|
||||
|
||||
#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
|
||||
* different from SRK hash put in SFP used for U-Boot.
|
||||
* Example
|
||||
* #define CONFIG_PPA_KEY_HASH \
|
||||
* #define PPA_KEY_HASH \
|
||||
* "41066b564c6ffcef40ccbc1e0a5d0d519604000c785d97bbefd25e4d288d1c8b"
|
||||
*/
|
||||
#define CONFIG_PPA_KEY_HASH NULL
|
||||
#define PPA_KEY_HASH NULL
|
||||
#endif /* ifdef CONFIG_FSL_LS_PPA */
|
||||
|
||||
#include <config_fsl_chain_trust.h>
|
||||
|
||||
@ -67,7 +67,7 @@ struct arch_global_data {
|
||||
phys_addr_t resv_ram;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP2
|
||||
#ifdef CONFIG_ARCH_OMAP2PLUS
|
||||
u32 omap_boot_device;
|
||||
u32 omap_boot_mode;
|
||||
u8 omap_ch_flags;
|
||||
|
||||
17
arch/arm/include/asm/opcodes-sec.h
Normal file
17
arch/arm/include/asm/opcodes-sec.h
Normal 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 */
|
||||
27
arch/arm/include/asm/opcodes-virt.h
Normal file
27
arch/arm/include/asm/opcodes-virt.h
Normal 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 */
|
||||
229
arch/arm/include/asm/opcodes.h
Normal file
229
arch/arm/include/asm/opcodes.h
Normal 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 */
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
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_END 0xFFFFFFFF
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <linux/kbuild.h>
|
||||
#include <linux/arm-smccc.h>
|
||||
|
||||
#if defined(CONFIG_MX25) || defined(CONFIG_MX27) || defined(CONFIG_MX35) \
|
||||
|| defined(CONFIG_MX51) || defined(CONFIG_MX53)
|
||||
@ -198,5 +199,12 @@ int main(void)
|
||||
DEFINE(PLL_DP_HFS_MFN, offsetof(struct dpll, dp_hfs_mfn));
|
||||
#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;
|
||||
}
|
||||
|
||||
@ -356,7 +356,10 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
|
||||
int fake = (flag & BOOTM_STATE_OS_FAKE_GO);
|
||||
|
||||
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");
|
||||
if (s) {
|
||||
if (strict_strtoul(s, 16, &machid) < 0) {
|
||||
|
||||
@ -34,6 +34,9 @@ config TARGET_ICONNECT
|
||||
config TARGET_KM_KIRKWOOD
|
||||
bool "KM_KIRKWOOD Board"
|
||||
select BOARD_LATE_INIT
|
||||
imply CMD_CRAMFS
|
||||
imply CMD_DIAG
|
||||
imply FS_CRAMFS
|
||||
|
||||
config TARGET_NET2BIG_V2
|
||||
bool "LaCie 2Big Network v2 NAS Board"
|
||||
|
||||
@ -94,7 +94,7 @@ int dram_init_banksize(void)
|
||||
|
||||
ac = fdt_address_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");
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
@ -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
|
||||
bool "HS Device Type Support"
|
||||
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/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
|
||||
|
||||
@ -46,7 +46,7 @@ static const struct omap_gpio_platdata omap34xx_gpio[] = {
|
||||
{ 5, OMAP34XX_GPIO6_BASE },
|
||||
};
|
||||
|
||||
U_BOOT_DEVICES(am33xx_gpios) = {
|
||||
U_BOOT_DEVICES(omap34xx_gpios) = {
|
||||
{ "gpio_omap", &omap34xx_gpio[0] },
|
||||
{ "gpio_omap", &omap34xx_gpio[1] },
|
||||
{ "gpio_omap", &omap34xx_gpio[2] },
|
||||
|
||||
@ -39,8 +39,10 @@ u32 secure_rom_call(u32 service, u32 proc_id, u32 flag, ...)
|
||||
|
||||
num_args = va_arg(ap, u32);
|
||||
|
||||
if (num_args > 4)
|
||||
if (num_args > 4) {
|
||||
va_end(ap);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Copy args to aligned args structure */
|
||||
for (i = 0; i < num_args; i++)
|
||||
|
||||
@ -4,6 +4,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
|
||||
obj-$(CONFIG_ROCKCHIP_BROM_HELPER) += bootrom.o
|
||||
|
||||
ifdef CONFIG_TPL_BUILD
|
||||
obj-$(CONFIG_ROCKCHIP_RK3188) += rk3188-board-tpl.o
|
||||
obj-$(CONFIG_ROCKCHIP_BROM_HELPER) += save_boot_param.o
|
||||
|
||||
16
arch/arm/mach-rockchip/bootrom.c
Normal file
16
arch/arm/mach-rockchip/bootrom.c
Normal file
@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Copyright (c) 2017 Google, Inc
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/arch/bootrom.h>
|
||||
|
||||
void back_to_bootrom(void)
|
||||
{
|
||||
#if defined(CONFIG_SPL_LIBGENERIC_SUPPORT) && !defined(CONFIG_TPL_BUILD)
|
||||
printf("Returning to boot ROM...");
|
||||
#endif
|
||||
_back_to_bootrom_s();
|
||||
}
|
||||
@ -23,10 +23,10 @@ ENTRY(save_boot_params)
|
||||
ENDPROC(save_boot_params)
|
||||
|
||||
|
||||
.globl back_to_bootrom
|
||||
ENTRY(back_to_bootrom)
|
||||
.globl _back_to_bootrom_s
|
||||
ENTRY(_back_to_bootrom_s)
|
||||
ldr r0, =SAVE_SP_ADDR
|
||||
ldr sp, [r0]
|
||||
mov r0, #0
|
||||
pop {r1-r12, pc}
|
||||
ENDPROC(back_to_bootrom)
|
||||
ENDPROC(_back_to_bootrom_s)
|
||||
|
||||
@ -82,6 +82,10 @@ config TARGET_SOCFPGA_TERASIC_DE0_NANO
|
||||
bool "Terasic DE0-Nano-Atlas (Cyclone V)"
|
||||
select TARGET_SOCFPGA_CYCLONE5
|
||||
|
||||
config TARGET_SOCFPGA_TERASIC_DE10_NANO
|
||||
bool "Terasic DE10-Nano (Cyclone V)"
|
||||
select TARGET_SOCFPGA_CYCLONE5
|
||||
|
||||
config TARGET_SOCFPGA_TERASIC_DE1_SOC
|
||||
bool "Terasic DE1-SoC (Cyclone V)"
|
||||
select TARGET_SOCFPGA_CYCLONE5
|
||||
@ -97,6 +101,7 @@ config SYS_BOARD
|
||||
default "cyclone5-socdk" if TARGET_SOCFPGA_CYCLONE5_SOCDK
|
||||
default "de0-nano-soc" if TARGET_SOCFPGA_TERASIC_DE0_NANO
|
||||
default "de1-soc" if TARGET_SOCFPGA_TERASIC_DE1_SOC
|
||||
default "de10-nano" if TARGET_SOCFPGA_TERASIC_DE10_NANO
|
||||
default "is1" if TARGET_SOCFPGA_IS1
|
||||
default "mcvevk" if TARGET_SOCFPGA_ARIES_MCVEVK
|
||||
default "sockit" if TARGET_SOCFPGA_TERASIC_SOCKIT
|
||||
@ -112,6 +117,7 @@ config SYS_VENDOR
|
||||
default "samtec" if TARGET_SOCFPGA_SAMTEC_VINING_FPGA
|
||||
default "terasic" if TARGET_SOCFPGA_TERASIC_DE0_NANO
|
||||
default "terasic" if TARGET_SOCFPGA_TERASIC_DE1_SOC
|
||||
default "terasic" if TARGET_SOCFPGA_TERASIC_DE10_NANO
|
||||
default "terasic" if TARGET_SOCFPGA_TERASIC_SOCKIT
|
||||
|
||||
config SYS_SOC
|
||||
@ -122,6 +128,7 @@ config SYS_CONFIG_NAME
|
||||
default "socfpga_cyclone5_socdk" if TARGET_SOCFPGA_CYCLONE5_SOCDK
|
||||
default "socfpga_de0_nano_soc" if TARGET_SOCFPGA_TERASIC_DE0_NANO
|
||||
default "socfpga_de1_soc" if TARGET_SOCFPGA_TERASIC_DE1_SOC
|
||||
default "socfpga_de10_nano" if TARGET_SOCFPGA_TERASIC_DE10_NANO
|
||||
default "socfpga_is1" if TARGET_SOCFPGA_IS1
|
||||
default "socfpga_mcvevk" if TARGET_SOCFPGA_ARIES_MCVEVK
|
||||
default "socfpga_sockit" if TARGET_SOCFPGA_TERASIC_SOCKIT
|
||||
|
||||
@ -49,6 +49,7 @@ obj-$(CONFIG_MACH_SUN8I_A23) += dram_sun8i_a23.o
|
||||
obj-$(CONFIG_MACH_SUN8I_A33) += dram_sun8i_a33.o
|
||||
obj-$(CONFIG_MACH_SUN8I_A83T) += dram_sun8i_a83t.o
|
||||
obj-$(CONFIG_MACH_SUNXI_H3_H5) += dram_sun8i_h3.o
|
||||
obj-$(CONFIG_MACH_SUN8I_R40) += dram_sun8i_h3.o
|
||||
obj-$(CONFIG_MACH_SUN9I) += dram_sun9i.o
|
||||
obj-$(CONFIG_MACH_SUN50I) += dram_sun8i_h3.o
|
||||
endif
|
||||
|
||||
@ -69,12 +69,14 @@ struct mm_region *mem_map = sunxi_mem_map;
|
||||
static int gpio_init(void)
|
||||
{
|
||||
#if CONFIG_CONS_INDEX == 1 && defined(CONFIG_UART0_PORT_F)
|
||||
#if defined(CONFIG_MACH_SUN4I) || defined(CONFIG_MACH_SUN7I)
|
||||
#if defined(CONFIG_MACH_SUN4I) || \
|
||||
defined(CONFIG_MACH_SUN7I) || \
|
||||
defined(CONFIG_MACH_SUN8I_R40)
|
||||
/* disable GPB22,23 as uart0 tx,rx to avoid conflict */
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPB(22), SUNXI_GPIO_INPUT);
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPB(23), SUNXI_GPIO_INPUT);
|
||||
#endif
|
||||
#if defined(CONFIG_MACH_SUN8I)
|
||||
#if defined(CONFIG_MACH_SUN8I) && !defined(CONFIG_MACH_SUN8I_R40)
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPF(2), SUN8I_GPF_UART0);
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPF(4), SUN8I_GPF_UART0);
|
||||
#else
|
||||
@ -82,7 +84,9 @@ static int gpio_init(void)
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPF(4), SUNXI_GPF_UART0);
|
||||
#endif
|
||||
sunxi_gpio_set_pull(SUNXI_GPF(4), 1);
|
||||
#elif CONFIG_CONS_INDEX == 1 && (defined(CONFIG_MACH_SUN4I) || defined(CONFIG_MACH_SUN7I))
|
||||
#elif CONFIG_CONS_INDEX == 1 && (defined(CONFIG_MACH_SUN4I) || \
|
||||
defined(CONFIG_MACH_SUN7I) || \
|
||||
defined(CONFIG_MACH_SUN8I_R40))
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPB(22), SUN4I_GPB_UART0);
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPB(23), SUN4I_GPB_UART0);
|
||||
sunxi_gpio_set_pull(SUNXI_GPB(23), SUNXI_GPIO_PULL_UP);
|
||||
@ -110,6 +114,10 @@ static int gpio_init(void)
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPB(9), SUN8I_A83T_GPB_UART0);
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPB(10), SUN8I_A83T_GPB_UART0);
|
||||
sunxi_gpio_set_pull(SUNXI_GPB(10), SUNXI_GPIO_PULL_UP);
|
||||
#elif CONFIG_CONS_INDEX == 1 && defined(CONFIG_MACH_SUN8I_V3S)
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPB(8), SUN8I_V3S_GPB_UART0);
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPB(9), SUN8I_V3S_GPB_UART0);
|
||||
sunxi_gpio_set_pull(SUNXI_GPB(9), SUNXI_GPIO_PULL_UP);
|
||||
#elif CONFIG_CONS_INDEX == 1 && defined(CONFIG_MACH_SUN9I)
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPH(12), SUN9I_GPH_UART0);
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPH(13), SUN9I_GPH_UART0);
|
||||
@ -266,7 +274,7 @@ void board_init_f(ulong dummy)
|
||||
|
||||
void reset_cpu(ulong addr)
|
||||
{
|
||||
#ifdef CONFIG_SUNXI_GEN_SUN4I
|
||||
#if defined(CONFIG_SUNXI_GEN_SUN4I) || defined(CONFIG_MACH_SUN8I_R40)
|
||||
static const struct sunxi_wdog *wdog =
|
||||
&((struct sunxi_timer_reg *)SUNXI_TIMER_BASE)->wdog;
|
||||
|
||||
@ -278,8 +286,7 @@ void reset_cpu(ulong addr)
|
||||
/* sun5i sometimes gets stuck without this */
|
||||
writel(WDT_MODE_RESET_EN | WDT_MODE_EN, &wdog->mode);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_SUNXI_GEN_SUN6I
|
||||
#elif defined(CONFIG_SUNXI_GEN_SUN6I)
|
||||
static const struct sunxi_wdog *wdog =
|
||||
((struct sunxi_timer_reg *)SUNXI_TIMER_BASE)->wdog;
|
||||
|
||||
|
||||
@ -35,6 +35,11 @@ void clock_init_safe(void)
|
||||
clrbits_le32(&prcm->pll_ctrl1, PRCM_PLL_CTRL_LDO_KEY_MASK);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MACH_SUN8I_R40) || defined(CONFIG_MACH_SUN50I)
|
||||
/* Set PLL lock enable bits and switch to old lock mode */
|
||||
writel(GENMASK(12, 0), &ccm->pll_lock_ctrl);
|
||||
#endif
|
||||
|
||||
clock_set_pll1(408000000);
|
||||
|
||||
writel(PLL6_CFG_DEFAULT, &ccm->pll6_cfg);
|
||||
@ -145,6 +150,22 @@ void clock_set_pll3(unsigned int clk)
|
||||
&ccm->pll3_cfg);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SUNXI_DE2
|
||||
void clock_set_pll3_factors(int m, int n)
|
||||
{
|
||||
struct sunxi_ccm_reg * const ccm =
|
||||
(struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
|
||||
|
||||
/* PLL3 rate = 24000000 * n / m */
|
||||
writel(CCM_PLL3_CTRL_EN | CCM_PLL3_CTRL_INTEGER_MODE |
|
||||
CCM_PLL3_CTRL_N(n) | CCM_PLL3_CTRL_M(m),
|
||||
&ccm->pll3_cfg);
|
||||
|
||||
while (!(readl(&ccm->pll3_cfg) & CCM_PLL3_CTRL_LOCK))
|
||||
;
|
||||
}
|
||||
#endif
|
||||
|
||||
void clock_set_pll5(unsigned int clk, bool sigma_delta_enable)
|
||||
{
|
||||
struct sunxi_ccm_reg * const ccm =
|
||||
@ -217,7 +238,31 @@ done:
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MACH_SUN8I_A33) || defined(CONFIG_MACH_SUN50I)
|
||||
#ifdef CONFIG_SUNXI_DE2
|
||||
void clock_set_pll10(unsigned int clk)
|
||||
{
|
||||
struct sunxi_ccm_reg * const ccm =
|
||||
(struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
|
||||
const int m = 2; /* 12 MHz steps */
|
||||
|
||||
if (clk == 0) {
|
||||
clrbits_le32(&ccm->pll10_cfg, CCM_PLL10_CTRL_EN);
|
||||
return;
|
||||
}
|
||||
|
||||
/* PLL10 rate = 24000000 * n / m */
|
||||
writel(CCM_PLL10_CTRL_EN | CCM_PLL10_CTRL_INTEGER_MODE |
|
||||
CCM_PLL10_CTRL_N(clk / (24000000 / m)) | CCM_PLL10_CTRL_M(m),
|
||||
&ccm->pll10_cfg);
|
||||
|
||||
while (!(readl(&ccm->pll10_cfg) & CCM_PLL10_CTRL_LOCK))
|
||||
;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MACH_SUN8I_A33) || \
|
||||
defined(CONFIG_MACH_SUN8I_R40) || \
|
||||
defined(CONFIG_MACH_SUN50I)
|
||||
void clock_set_pll11(unsigned int clk, bool sigma_delta_enable)
|
||||
{
|
||||
struct sunxi_ccm_reg * const ccm =
|
||||
|
||||
@ -87,6 +87,10 @@ int print_cpuinfo(void)
|
||||
printf("CPU: Allwinner A83T (SUN8I %04x)\n", sunxi_get_sram_id());
|
||||
#elif defined CONFIG_MACH_SUN8I_H3
|
||||
printf("CPU: Allwinner H3 (SUN8I %04x)\n", sunxi_get_sram_id());
|
||||
#elif defined CONFIG_MACH_SUN8I_R40
|
||||
printf("CPU: Allwinner R40 (SUN8I %04x)\n", sunxi_get_sram_id());
|
||||
#elif defined CONFIG_MACH_SUN8I_V3S
|
||||
printf("CPU: Allwinner V3s (SUN8I %04x)\n", sunxi_get_sram_id());
|
||||
#elif defined CONFIG_MACH_SUN9I
|
||||
puts("CPU: Allwinner A80 (SUN9I)\n");
|
||||
#elif defined CONFIG_MACH_SUN50I
|
||||
|
||||
@ -70,6 +70,12 @@ static void mctl_set_bit_delays(struct dram_para *para)
|
||||
writel(ACBDLR_WRITE_DELAY(para->ac_delays[i]),
|
||||
&mctl_ctl->acbdlr[i]);
|
||||
|
||||
#ifdef CONFIG_MACH_SUN8I_R40
|
||||
/* DQSn, DMn, DQn output enable bit delay */
|
||||
for (i = 0; i < 4; i++)
|
||||
writel(0x6 << 24, &mctl_ctl->dx[i].sdlr);
|
||||
#endif
|
||||
|
||||
setbits_le32(&mctl_ctl->pgcr[0], 1 << 26);
|
||||
}
|
||||
|
||||
@ -86,6 +92,9 @@ enum {
|
||||
MBUS_PORT_DI = 9,
|
||||
MBUS_PORT_DE = 10,
|
||||
MBUS_PORT_DE_CFD = 11,
|
||||
MBUS_PORT_UNKNOWN1 = 12,
|
||||
MBUS_PORT_UNKNOWN2 = 13,
|
||||
MBUS_PORT_UNKNOWN3 = 14,
|
||||
};
|
||||
|
||||
enum {
|
||||
@ -205,6 +214,42 @@ static void mctl_set_master_priority_h5(void)
|
||||
MBUS_CONF(DE_CFD, true, HIGHEST, 0, 600, 400, 200);
|
||||
}
|
||||
|
||||
static void mctl_set_master_priority_r40(void)
|
||||
{
|
||||
struct sunxi_mctl_com_reg * const mctl_com =
|
||||
(struct sunxi_mctl_com_reg *)SUNXI_DRAM_COM_BASE;
|
||||
|
||||
/* enable bandwidth limit windows and set windows size 1us */
|
||||
writel(399, &mctl_com->tmr);
|
||||
writel((1 << 16), &mctl_com->bwcr);
|
||||
|
||||
/* set cpu high priority */
|
||||
writel(0x00000001, &mctl_com->mapr);
|
||||
|
||||
/* Port 2 is reserved per Allwinner's linux-3.10 source, yet
|
||||
* they initialise it */
|
||||
MBUS_CONF( CPU, true, HIGHEST, 0, 300, 260, 150);
|
||||
MBUS_CONF( GPU, true, HIGHEST, 0, 600, 400, 200);
|
||||
MBUS_CONF( UNUSED, true, HIGHEST, 0, 512, 256, 96);
|
||||
MBUS_CONF( DMA, true, HIGHEST, 0, 256, 128, 32);
|
||||
MBUS_CONF( VE, true, HIGHEST, 0, 1900, 1500, 1000);
|
||||
MBUS_CONF( CSI, true, HIGHEST, 0, 150, 120, 100);
|
||||
MBUS_CONF( NAND, true, HIGH, 0, 256, 128, 64);
|
||||
MBUS_CONF( SS, true, HIGHEST, 0, 256, 128, 64);
|
||||
MBUS_CONF( TS, true, HIGHEST, 0, 256, 128, 64);
|
||||
MBUS_CONF( DI, true, HIGH, 0, 1024, 256, 64);
|
||||
|
||||
/*
|
||||
* The port names are probably wrong, but no correct sources
|
||||
* are available.
|
||||
*/
|
||||
MBUS_CONF( DE, true, HIGH, 0, 128, 48, 0);
|
||||
MBUS_CONF( DE_CFD, true, HIGH, 0, 384, 256, 0);
|
||||
MBUS_CONF(UNKNOWN1, true, HIGHEST, 0, 512, 384, 256);
|
||||
MBUS_CONF(UNKNOWN2, true, HIGHEST, 2, 8192, 6144, 1024);
|
||||
MBUS_CONF(UNKNOWN3, true, HIGH, 0, 1280, 144, 64);
|
||||
}
|
||||
|
||||
static void mctl_set_master_priority(uint16_t socid)
|
||||
{
|
||||
switch (socid) {
|
||||
@ -217,6 +262,9 @@ static void mctl_set_master_priority(uint16_t socid)
|
||||
case SOCID_H5:
|
||||
mctl_set_master_priority_h5();
|
||||
return;
|
||||
case SOCID_R40:
|
||||
mctl_set_master_priority_r40();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -268,6 +316,9 @@ static void mctl_set_timing_params(uint16_t socid, struct dram_para *para)
|
||||
writel(0x18, &mctl_ctl->mr[2]); /* CWL=8 */
|
||||
writel(0x0, &mctl_ctl->mr[3]);
|
||||
|
||||
if (socid == SOCID_R40)
|
||||
writel(0x3, &mctl_ctl->lp3mr11); /* odt_en[7:4] */
|
||||
|
||||
/* set DRAM timing */
|
||||
writel(DRAMTMG0_TWTP(twtp) | DRAMTMG0_TFAW(tfaw) |
|
||||
DRAMTMG0_TRAS_MAX(trasmax) | DRAMTMG0_TRAS(tras),
|
||||
@ -383,7 +434,7 @@ static void mctl_h3_zq_calibration_quirk(struct dram_para *para)
|
||||
}
|
||||
}
|
||||
|
||||
static void mctl_set_cr(struct dram_para *para)
|
||||
static void mctl_set_cr(uint16_t socid, struct dram_para *para)
|
||||
{
|
||||
struct sunxi_mctl_com_reg * const mctl_com =
|
||||
(struct sunxi_mctl_com_reg *)SUNXI_DRAM_COM_BASE;
|
||||
@ -393,6 +444,14 @@ static void mctl_set_cr(struct dram_para *para)
|
||||
(para->dual_rank ? MCTL_CR_DUAL_RANK : MCTL_CR_SINGLE_RANK) |
|
||||
MCTL_CR_PAGE_SIZE(para->page_size) |
|
||||
MCTL_CR_ROW_BITS(para->row_bits), &mctl_com->cr);
|
||||
|
||||
if (socid == SOCID_R40) {
|
||||
if (para->dual_rank)
|
||||
panic("Dual rank memory not supported\n");
|
||||
|
||||
/* Mux pin to A15 address line for single rank memory. */
|
||||
setbits_le32(&mctl_com->cr_r1, MCTL_CR_R1_MUX_A15);
|
||||
}
|
||||
}
|
||||
|
||||
static void mctl_sys_init(uint16_t socid, struct dram_para *para)
|
||||
@ -407,14 +466,14 @@ static void mctl_sys_init(uint16_t socid, struct dram_para *para)
|
||||
clrbits_le32(&ccm->ahb_gate0, 1 << AHB_GATE_OFFSET_MCTL);
|
||||
clrbits_le32(&ccm->ahb_reset0_cfg, 1 << AHB_RESET_OFFSET_MCTL);
|
||||
clrbits_le32(&ccm->pll5_cfg, CCM_PLL5_CTRL_EN);
|
||||
if (socid == SOCID_A64)
|
||||
if (socid == SOCID_A64 || socid == SOCID_R40)
|
||||
clrbits_le32(&ccm->pll11_cfg, CCM_PLL11_CTRL_EN);
|
||||
udelay(10);
|
||||
|
||||
clrbits_le32(&ccm->dram_clk_cfg, CCM_DRAMCLK_CFG_RST);
|
||||
udelay(1000);
|
||||
|
||||
if (socid == SOCID_A64) {
|
||||
if (socid == SOCID_A64 || socid == SOCID_R40) {
|
||||
clock_set_pll11(CONFIG_DRAM_CLK * 2 * 1000000, false);
|
||||
clrsetbits_le32(&ccm->dram_clk_cfg,
|
||||
CCM_DRAMCLK_CFG_DIV_MASK |
|
||||
@ -459,7 +518,7 @@ static int mctl_channel_init(uint16_t socid, struct dram_para *para)
|
||||
|
||||
unsigned int i;
|
||||
|
||||
mctl_set_cr(para);
|
||||
mctl_set_cr(socid, para);
|
||||
mctl_set_timing_params(socid, para);
|
||||
mctl_set_master_priority(socid);
|
||||
|
||||
@ -506,6 +565,13 @@ static int mctl_channel_init(uint16_t socid, struct dram_para *para)
|
||||
clrsetbits_le32(&mctl_ctl->pgcr[2], (0x3 << 10) | (0x3 << 8),
|
||||
(0x1 << 10) | (0x2 << 8));
|
||||
} else if (socid == SOCID_A64 || socid == SOCID_H5) {
|
||||
/* dphy & aphy phase select ? */
|
||||
clrsetbits_le32(&mctl_ctl->pgcr[2], (0x3 << 10) | (0x3 << 8),
|
||||
(0x0 << 10) | (0x3 << 8));
|
||||
} else if (socid == SOCID_R40) {
|
||||
/* dx ddr_clk & hdr_clk dynamic mode (tpr13[9] == 0) */
|
||||
clrbits_le32(&mctl_ctl->pgcr[0], (0x3 << 14) | (0x3 << 12));
|
||||
|
||||
/* dphy & aphy phase select ? */
|
||||
clrsetbits_le32(&mctl_ctl->pgcr[2], (0x3 << 10) | (0x3 << 8),
|
||||
(0x0 << 10) | (0x3 << 8));
|
||||
@ -535,6 +601,11 @@ static int mctl_channel_init(uint16_t socid, struct dram_para *para)
|
||||
mctl_phy_init(PIR_ZCAL | PIR_PLLINIT | PIR_DCAL | PIR_PHYRST |
|
||||
PIR_DRAMRST | PIR_DRAMINIT | PIR_QSGATE);
|
||||
/* no PIR_QSGATE for H5 ???? */
|
||||
} else if (socid == SOCID_R40) {
|
||||
clrsetbits_le32(&mctl_ctl->zqcr, 0xffffff, CONFIG_DRAM_ZQ);
|
||||
|
||||
mctl_phy_init(PIR_ZCAL | PIR_PLLINIT | PIR_DCAL | PIR_PHYRST |
|
||||
PIR_DRAMRST | PIR_DRAMINIT);
|
||||
}
|
||||
|
||||
/* detect ranks and bus width */
|
||||
@ -554,7 +625,7 @@ static int mctl_channel_init(uint16_t socid, struct dram_para *para)
|
||||
para->bus_width = 16;
|
||||
}
|
||||
|
||||
mctl_set_cr(para);
|
||||
mctl_set_cr(socid, para);
|
||||
udelay(20);
|
||||
|
||||
/* re-train */
|
||||
@ -575,7 +646,7 @@ static int mctl_channel_init(uint16_t socid, struct dram_para *para)
|
||||
/* set PGCR3, CKE polarity */
|
||||
if (socid == SOCID_H3)
|
||||
writel(0x00aa0060, &mctl_ctl->pgcr[3]);
|
||||
else if (socid == SOCID_A64 || socid == SOCID_H5)
|
||||
else if (socid == SOCID_A64 || socid == SOCID_H5 || socid == SOCID_R40)
|
||||
writel(0xc0aa0060, &mctl_ctl->pgcr[3]);
|
||||
|
||||
/* power down zq calibration module for power save */
|
||||
@ -587,12 +658,12 @@ static int mctl_channel_init(uint16_t socid, struct dram_para *para)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void mctl_auto_detect_dram_size(struct dram_para *para)
|
||||
static void mctl_auto_detect_dram_size(uint16_t socid, struct dram_para *para)
|
||||
{
|
||||
/* detect row address bits */
|
||||
para->page_size = 512;
|
||||
para->row_bits = 16;
|
||||
mctl_set_cr(para);
|
||||
mctl_set_cr(socid, para);
|
||||
|
||||
for (para->row_bits = 11; para->row_bits < 16; para->row_bits++)
|
||||
if (mctl_mem_matches((1 << (para->row_bits + 3)) * para->page_size))
|
||||
@ -600,7 +671,7 @@ static void mctl_auto_detect_dram_size(struct dram_para *para)
|
||||
|
||||
/* detect page size */
|
||||
para->page_size = 8192;
|
||||
mctl_set_cr(para);
|
||||
mctl_set_cr(socid, para);
|
||||
|
||||
for (para->page_size = 512; para->page_size < 8192; para->page_size *= 2)
|
||||
if (mctl_mem_matches(para->page_size))
|
||||
@ -630,6 +701,22 @@ static void mctl_auto_detect_dram_size(struct dram_para *para)
|
||||
0, 0, 0, 0, 0, 0, 0, 0, \
|
||||
0, 0, 0, 0, 0, 0, 0 }
|
||||
|
||||
#define SUN8I_R40_DX_READ_DELAYS \
|
||||
{{ 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0 }, \
|
||||
{ 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0 }, \
|
||||
{ 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0 }, \
|
||||
{ 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0 } }
|
||||
#define SUN8I_R40_DX_WRITE_DELAYS \
|
||||
{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0 }, \
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0 }, \
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0 }, \
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0 } }
|
||||
#define SUN8I_R40_AC_DELAYS \
|
||||
{ 0, 0, 3, 0, 0, 0, 0, 0, \
|
||||
0, 0, 0, 0, 0, 0, 0, 0, \
|
||||
0, 0, 0, 0, 0, 0, 0, 0, \
|
||||
0, 0, 0, 0, 0, 0, 0 }
|
||||
|
||||
#define SUN50I_A64_DX_READ_DELAYS \
|
||||
{{ 16, 16, 16, 16, 17, 16, 16, 17, 16, 1, 0 }, \
|
||||
{ 17, 17, 17, 17, 17, 17, 17, 17, 17, 1, 0 }, \
|
||||
@ -679,6 +766,10 @@ unsigned long sunxi_dram_init(void)
|
||||
.dx_read_delays = SUN8I_H3_DX_READ_DELAYS,
|
||||
.dx_write_delays = SUN8I_H3_DX_WRITE_DELAYS,
|
||||
.ac_delays = SUN8I_H3_AC_DELAYS,
|
||||
#elif defined(CONFIG_MACH_SUN8I_R40)
|
||||
.dx_read_delays = SUN8I_R40_DX_READ_DELAYS,
|
||||
.dx_write_delays = SUN8I_R40_DX_WRITE_DELAYS,
|
||||
.ac_delays = SUN8I_R40_AC_DELAYS,
|
||||
#elif defined(CONFIG_MACH_SUN50I)
|
||||
.dx_read_delays = SUN50I_A64_DX_READ_DELAYS,
|
||||
.dx_write_delays = SUN50I_A64_DX_WRITE_DELAYS,
|
||||
@ -696,6 +787,8 @@ unsigned long sunxi_dram_init(void)
|
||||
*/
|
||||
#if defined(CONFIG_MACH_SUN8I_H3)
|
||||
uint16_t socid = SOCID_H3;
|
||||
#elif defined(CONFIG_MACH_SUN8I_R40)
|
||||
uint16_t socid = SOCID_R40;
|
||||
#elif defined(CONFIG_MACH_SUN50I)
|
||||
uint16_t socid = SOCID_A64;
|
||||
#elif defined(CONFIG_MACH_SUN50I_H5)
|
||||
@ -716,9 +809,11 @@ unsigned long sunxi_dram_init(void)
|
||||
if (socid == SOCID_H3)
|
||||
writel(0x0c000400, &mctl_ctl->odtcfg);
|
||||
|
||||
if (socid == SOCID_A64 || socid == SOCID_H5) {
|
||||
if (socid == SOCID_A64 || socid == SOCID_H5 || socid == SOCID_R40) {
|
||||
/* VTF enable (tpr13[8] == 1) */
|
||||
setbits_le32(&mctl_ctl->vtfcr,
|
||||
(socid == SOCID_H5 ? 3 : 2) << 8);
|
||||
(socid != SOCID_A64 ? 3 : 2) << 8);
|
||||
/* DQ hold disable (tpr13[26] == 1) */
|
||||
clrbits_le32(&mctl_ctl->pgcr[2], (1 << 13));
|
||||
}
|
||||
|
||||
@ -726,8 +821,8 @@ unsigned long sunxi_dram_init(void)
|
||||
setbits_le32(&mctl_com->cccr, 1 << 31);
|
||||
udelay(10);
|
||||
|
||||
mctl_auto_detect_dram_size(¶);
|
||||
mctl_set_cr(¶);
|
||||
mctl_auto_detect_dram_size(socid, ¶);
|
||||
mctl_set_cr(socid, ¶);
|
||||
|
||||
return (1UL << (para.row_bits + 3)) * para.page_size *
|
||||
(para.dual_rank ? 2 : 1);
|
||||
|
||||
@ -41,6 +41,9 @@ int pmic_bus_init(void)
|
||||
p2wi_init();
|
||||
ret = p2wi_change_to_p2wi_mode(AXP221_CHIP_ADDR, AXP221_CTRL_ADDR,
|
||||
AXP221_INIT_DATA);
|
||||
# elif defined CONFIG_MACH_SUN8I_R40
|
||||
/* Nothing. R40 uses the AXP221s in I2C mode */
|
||||
ret = 0;
|
||||
# else
|
||||
ret = rsb_init();
|
||||
if (ret)
|
||||
@ -65,6 +68,8 @@ int pmic_bus_read(u8 reg, u8 *data)
|
||||
#elif defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || defined CONFIG_AXP818_POWER
|
||||
# ifdef CONFIG_MACH_SUN6I
|
||||
return p2wi_read(reg, data);
|
||||
# elif defined CONFIG_MACH_SUN8I_R40
|
||||
return i2c_read(AXP209_I2C_ADDR, reg, 1, data, 1);
|
||||
# else
|
||||
return rsb_read(AXP223_RUNTIME_ADDR, reg, data);
|
||||
# endif
|
||||
@ -80,6 +85,8 @@ int pmic_bus_write(u8 reg, u8 data)
|
||||
#elif defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || defined CONFIG_AXP818_POWER
|
||||
# ifdef CONFIG_MACH_SUN6I
|
||||
return p2wi_write(reg, data);
|
||||
# elif defined CONFIG_MACH_SUN8I_R40
|
||||
return i2c_write(AXP209_I2C_ADDR, reg, 1, &data, 1);
|
||||
# else
|
||||
return rsb_write(AXP223_RUNTIME_ADDR, reg, data);
|
||||
# endif
|
||||
|
||||
@ -148,7 +148,7 @@ int board_init(void)
|
||||
debug("Memory controller init failed: %d\n", err);
|
||||
# endif
|
||||
# endif /* CONFIG_TEGRA_PMU */
|
||||
#ifdef CONFIG_AS3722_POWER
|
||||
#ifdef CONFIG_PMIC_AS3722
|
||||
err = as3722_init(NULL);
|
||||
if (err && err != -ENODEV)
|
||||
return err;
|
||||
|
||||
@ -16,7 +16,9 @@ obj-$(CONFIG_DISPLAY_CPUINFO) += cpu-info.o
|
||||
obj-y += dram_init.o
|
||||
obj-y += board_init.o
|
||||
obj-$(CONFIG_BOARD_LATE_INIT) += board_late_init.o
|
||||
ifndef CONFIG_SYSRESET
|
||||
obj-y += reset.o
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_MICRO_SUPPORT_CARD) += sbc/ micro-support-card.o
|
||||
obj-y += pinctrl-glue.o
|
||||
|
||||
@ -64,27 +64,33 @@ int board_late_init(void)
|
||||
|
||||
switch (uniphier_boot_device_raw()) {
|
||||
case BOOT_DEVICE_MMC1:
|
||||
printf("eMMC Boot\n");
|
||||
printf("eMMC Boot");
|
||||
setenv("bootmode", "emmcboot");
|
||||
break;
|
||||
case BOOT_DEVICE_NAND:
|
||||
printf("NAND Boot\n");
|
||||
printf("NAND Boot");
|
||||
setenv("bootmode", "nandboot");
|
||||
nand_denali_wp_disable();
|
||||
break;
|
||||
case BOOT_DEVICE_NOR:
|
||||
printf("NOR Boot\n");
|
||||
printf("NOR Boot");
|
||||
setenv("bootmode", "norboot");
|
||||
break;
|
||||
case BOOT_DEVICE_USB:
|
||||
printf("USB Boot\n");
|
||||
printf("USB Boot");
|
||||
setenv("bootmode", "usbboot");
|
||||
break;
|
||||
default:
|
||||
printf("Unknown\n");
|
||||
printf("Unknown");
|
||||
break;
|
||||
}
|
||||
|
||||
if (uniphier_have_internal_stm())
|
||||
printf(" (STM: %s)",
|
||||
uniphier_boot_from_backend() ? "OFF" : "ON");
|
||||
|
||||
printf("\n");
|
||||
|
||||
if (uniphier_set_fdt_file())
|
||||
printf("fdt_file environment was not set correctly\n");
|
||||
|
||||
|
||||
@ -22,6 +22,7 @@ struct uniphier_boot_device_info {
|
||||
const unsigned int *boot_device_count;
|
||||
int (*boot_device_is_usb)(u32 pinmon);
|
||||
unsigned int (*boot_device_fixup)(unsigned int mode);
|
||||
int have_internal_stm;
|
||||
};
|
||||
|
||||
static const struct uniphier_boot_device_info uniphier_boot_device_info[] = {
|
||||
@ -31,6 +32,7 @@ static const struct uniphier_boot_device_info uniphier_boot_device_info[] = {
|
||||
.boot_device_sel_shift = 0,
|
||||
.boot_device_table = uniphier_sld3_boot_device_table,
|
||||
.boot_device_count = &uniphier_sld3_boot_device_count,
|
||||
.have_internal_stm = 0,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_ARCH_UNIPHIER_LD4)
|
||||
@ -39,6 +41,7 @@ static const struct uniphier_boot_device_info uniphier_boot_device_info[] = {
|
||||
.boot_device_sel_shift = 1,
|
||||
.boot_device_table = uniphier_ld4_boot_device_table,
|
||||
.boot_device_count = &uniphier_ld4_boot_device_count,
|
||||
.have_internal_stm = 1,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_ARCH_UNIPHIER_PRO4)
|
||||
@ -47,6 +50,7 @@ static const struct uniphier_boot_device_info uniphier_boot_device_info[] = {
|
||||
.boot_device_sel_shift = 1,
|
||||
.boot_device_table = uniphier_ld4_boot_device_table,
|
||||
.boot_device_count = &uniphier_ld4_boot_device_count,
|
||||
.have_internal_stm = 0,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_ARCH_UNIPHIER_SLD8)
|
||||
@ -55,6 +59,7 @@ static const struct uniphier_boot_device_info uniphier_boot_device_info[] = {
|
||||
.boot_device_sel_shift = 1,
|
||||
.boot_device_table = uniphier_ld4_boot_device_table,
|
||||
.boot_device_count = &uniphier_ld4_boot_device_count,
|
||||
.have_internal_stm = 1,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
|
||||
@ -63,6 +68,7 @@ static const struct uniphier_boot_device_info uniphier_boot_device_info[] = {
|
||||
.boot_device_sel_shift = 1,
|
||||
.boot_device_table = uniphier_pro5_boot_device_table,
|
||||
.boot_device_count = &uniphier_pro5_boot_device_count,
|
||||
.have_internal_stm = 0,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_ARCH_UNIPHIER_PXS2)
|
||||
@ -73,6 +79,7 @@ static const struct uniphier_boot_device_info uniphier_boot_device_info[] = {
|
||||
.boot_device_count = &uniphier_pxs2_boot_device_count,
|
||||
.boot_device_is_usb = uniphier_pxs2_boot_device_is_usb,
|
||||
.boot_device_fixup = uniphier_pxs2_boot_device_fixup,
|
||||
.have_internal_stm = 0,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_ARCH_UNIPHIER_LD6B)
|
||||
@ -83,6 +90,7 @@ static const struct uniphier_boot_device_info uniphier_boot_device_info[] = {
|
||||
.boot_device_count = &uniphier_pxs2_boot_device_count,
|
||||
.boot_device_is_usb = uniphier_pxs2_boot_device_is_usb,
|
||||
.boot_device_fixup = uniphier_pxs2_boot_device_fixup,
|
||||
.have_internal_stm = 1, /* STM on A-chip */
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_ARCH_UNIPHIER_LD11)
|
||||
@ -93,6 +101,7 @@ static const struct uniphier_boot_device_info uniphier_boot_device_info[] = {
|
||||
.boot_device_count = &uniphier_ld11_boot_device_count,
|
||||
.boot_device_is_usb = uniphier_ld11_boot_device_is_usb,
|
||||
.boot_device_fixup = uniphier_ld11_boot_device_fixup,
|
||||
.have_internal_stm = 1,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_ARCH_UNIPHIER_LD20)
|
||||
@ -103,6 +112,7 @@ static const struct uniphier_boot_device_info uniphier_boot_device_info[] = {
|
||||
.boot_device_count = &uniphier_ld11_boot_device_count,
|
||||
.boot_device_is_usb = uniphier_ld20_boot_device_is_usb,
|
||||
.boot_device_fixup = uniphier_ld11_boot_device_fixup,
|
||||
.have_internal_stm = 1,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
@ -161,6 +171,24 @@ u32 spl_boot_device(void)
|
||||
info->boot_device_fixup(raw_mode) : raw_mode;
|
||||
}
|
||||
|
||||
int uniphier_have_internal_stm(void)
|
||||
{
|
||||
const struct uniphier_boot_device_info *info;
|
||||
|
||||
info = uniphier_get_boot_device_info();
|
||||
if (!info) {
|
||||
pr_err("unsupported SoC\n");
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
return info->have_internal_stm;
|
||||
}
|
||||
|
||||
int uniphier_boot_from_backend(void)
|
||||
{
|
||||
return !!(readl(SG_PINMON0) & BIT(27));
|
||||
}
|
||||
|
||||
#ifndef CONFIG_SPL_BUILD
|
||||
|
||||
static int do_pinmon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
@ -176,12 +204,16 @@ static int do_pinmon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
return CMD_RET_FAILURE;
|
||||
}
|
||||
|
||||
printf("Boot Swap: %s\n\n", boot_is_swapped() ? "ON" : "OFF");
|
||||
if (uniphier_have_internal_stm())
|
||||
printf("STB Micon: %s\n",
|
||||
uniphier_boot_from_backend() ? "OFF" : "ON");
|
||||
|
||||
printf("Boot Swap: %s\n", boot_is_swapped() ? "ON" : "OFF");
|
||||
|
||||
pinmon = readl(SG_PINMON0);
|
||||
|
||||
if (info->boot_device_is_usb)
|
||||
printf("USB Boot: %s\n\n",
|
||||
printf("USB Boot: %s\n",
|
||||
info->boot_device_is_usb(pinmon) ? "ON" : "OFF");
|
||||
|
||||
boot_device_count = *info->boot_device_count;
|
||||
@ -189,7 +221,7 @@ static int do_pinmon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
boot_sel = pinmon >> info->boot_device_sel_shift;
|
||||
boot_sel &= boot_device_count - 1;
|
||||
|
||||
printf("Boot Mode Sel:\n");
|
||||
printf("\nBoot Mode Sel:\n");
|
||||
for (i = 0; i < boot_device_count; i++)
|
||||
printf(" %c %02x %s\n", i == boot_sel ? '*' : ' ', i,
|
||||
info->boot_device_table[i].desc);
|
||||
|
||||
@ -37,9 +37,18 @@ void uniphier_ld11_clk_init(void)
|
||||
{
|
||||
/* FIXME: the current clk driver can not handle parents */
|
||||
u32 tmp;
|
||||
int ch;
|
||||
|
||||
tmp = readl(SC_CLKCTRL4);
|
||||
tmp |= SC_CLKCTRL4_MIO | SC_CLKCTRL4_STDMAC;
|
||||
writel(tmp, SC_CLKCTRL4);
|
||||
|
||||
for (ch = 0; ch < 3; ch++) {
|
||||
void __iomem *phyctrl = (void __iomem *)SG_USBPHYCTRL;
|
||||
|
||||
writel(0x82280600, phyctrl + 8 * ch);
|
||||
writel(0x00000106, phyctrl + 8 * ch + 4);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -121,6 +121,8 @@ void uniphier_ld11_clk_init(void);
|
||||
void uniphier_ld20_clk_init(void);
|
||||
|
||||
unsigned int uniphier_boot_device_raw(void);
|
||||
int uniphier_have_internal_stm(void);
|
||||
int uniphier_boot_from_backend(void);
|
||||
int uniphier_pin_init(const char *pinconfig_name);
|
||||
void uniphier_smp_kick_all_cpus(void);
|
||||
void cci500_init(int nr_slaves);
|
||||
|
||||
@ -55,6 +55,7 @@
|
||||
|
||||
#define SG_MEMCONF_SPARSEMEM (0x1 << 4)
|
||||
|
||||
#define SG_USBPHYCTRL (SG_CTRL_BASE | 0x500)
|
||||
#define SG_ETPHYPSHUT (SG_CTRL_BASE | 0x554)
|
||||
#define SG_ETPHYCNT (SG_CTRL_BASE | 0x550)
|
||||
|
||||
|
||||
@ -8,4 +8,3 @@
|
||||
extra-y = start.o
|
||||
obj-y = exceptions.o
|
||||
obj-y += cpu.o interrupts.o traps.o
|
||||
obj-y += fdt.o
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
/*
|
||||
* (C) Copyright 2011, Missing Link Electronics
|
||||
* Joachim Foerster <joachim@missinglinkelectronics.com>
|
||||
*
|
||||
* Taken from arch/powerpc/cpu/ppc4xx/fdt.c:
|
||||
*
|
||||
* (C) Copyright 2007-2008
|
||||
* Stefan Roese, DENX Software Engineering, sr@denx.de.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
#ifdef CONFIG_OF_BOARD_SETUP
|
||||
#include <libfdt.h>
|
||||
#include <fdt_support.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int __ft_board_setup(void *blob, bd_t *bd)
|
||||
{
|
||||
ft_cpu_setup(blob, bd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
int ft_board_setup(void *blob, bd_t *bd)
|
||||
__attribute__((weak, alias("__ft_board_setup")));
|
||||
|
||||
void ft_cpu_setup(void *blob, bd_t *bd)
|
||||
{
|
||||
/*
|
||||
* Fixup all ethernet nodes
|
||||
* Note: aliases in the dts are required for this
|
||||
*/
|
||||
fdt_fixup_ethernet(blob);
|
||||
}
|
||||
#endif /* CONFIG_OF_BOARD_SETUP */
|
||||
@ -176,9 +176,6 @@ void ft_cpu_setup(void *blob, bd_t *bd)
|
||||
old_ft_cpu_setup(blob, bd);
|
||||
#endif
|
||||
ft_clock_setup(blob, bd);
|
||||
#ifdef CONFIG_HAS_ETH0
|
||||
fdt_fixup_ethernet(blob);
|
||||
#endif
|
||||
fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -10,6 +10,8 @@ choice
|
||||
|
||||
config TARGET_KM82XX
|
||||
bool "Support km82xx"
|
||||
imply CMD_CRAMFS
|
||||
imply FS_CRAMFS
|
||||
|
||||
endchoice
|
||||
|
||||
|
||||
@ -294,11 +294,6 @@ void watchdog_reset (void)
|
||||
#ifdef CONFIG_OF_BOARD_SETUP
|
||||
void ft_cpu_setup (void *blob, bd_t *bd)
|
||||
{
|
||||
#if defined(CONFIG_HAS_ETH0) || defined(CONFIG_HAS_ETH1) ||\
|
||||
defined(CONFIG_HAS_ETH2) || defined(CONFIG_HAS_ETH3)
|
||||
fdt_fixup_ethernet(blob);
|
||||
#endif
|
||||
|
||||
do_fixup_by_compat_u32(blob, "fsl,cpm2-brg",
|
||||
"clock-frequency", bd->bi_brgfreq, 1);
|
||||
|
||||
|
||||
@ -64,12 +64,19 @@ config TARGET_IDS8313
|
||||
|
||||
config TARGET_KM8360
|
||||
bool "Support km8360"
|
||||
imply CMD_CRAMFS
|
||||
imply CMD_DIAG
|
||||
imply FS_CRAMFS
|
||||
|
||||
config TARGET_SUVD3
|
||||
bool "Support suvd3"
|
||||
imply CMD_CRAMFS
|
||||
imply FS_CRAMFS
|
||||
|
||||
config TARGET_TUXX1
|
||||
bool "Support tuxx1"
|
||||
imply CMD_CRAMFS
|
||||
imply FS_CRAMFS
|
||||
|
||||
config TARGET_TQM834X
|
||||
bool "Support TQM834x"
|
||||
|
||||
@ -53,7 +53,6 @@ void ft_cpu_setup(void *blob, bd_t *bd)
|
||||
#if defined(CONFIG_HAS_ETH0) || defined(CONFIG_HAS_ETH1) ||\
|
||||
defined(CONFIG_HAS_ETH2) || defined(CONFIG_HAS_ETH3) ||\
|
||||
defined(CONFIG_HAS_ETH4) || defined(CONFIG_HAS_ETH5)
|
||||
fdt_fixup_ethernet(blob);
|
||||
#ifdef CONFIG_MPC8313
|
||||
/*
|
||||
* mpc8313e erratum IPIC1 swapped TSEC interrupt ID numbers on rev. 1
|
||||
|
||||
@ -321,6 +321,8 @@ config TARGET_KMP204X
|
||||
bool "Support kmp204x"
|
||||
select ARCH_P2041
|
||||
select PHYS_64BIT
|
||||
imply CMD_CRAMFS
|
||||
imply FS_CRAMFS
|
||||
|
||||
config TARGET_XPEDITE520X
|
||||
bool "Support xpedite520x"
|
||||
|
||||
@ -612,8 +612,6 @@ void ft_cpu_setup(void *blob, bd_t *bd)
|
||||
}
|
||||
#endif
|
||||
|
||||
fdt_fixup_ethernet(blob);
|
||||
|
||||
fdt_add_enet_stashing(blob);
|
||||
|
||||
#ifndef CONFIG_FSL_TBCLK_EXTRA_DIV
|
||||
|
||||
@ -1145,8 +1145,9 @@ switch_as:
|
||||
li r0,0
|
||||
1:
|
||||
dcbz r0,r3
|
||||
#ifdef CONFIG_E6500 /* Lock/unlock L2 cache instead of L1 */
|
||||
#ifdef CONFIG_E6500 /* Lock/unlock L2 cache long with L1 */
|
||||
dcbtls 2, r0, r3
|
||||
dcbtls 0, r0, r3
|
||||
#else
|
||||
dcbtls 0, r0, r3
|
||||
#endif
|
||||
@ -1790,8 +1791,9 @@ unlock_ram_in_cache:
|
||||
slwi r4,r4,(10 - 1 - L1_CACHE_SHIFT)
|
||||
mtctr r4
|
||||
1: dcbi r0,r3
|
||||
#ifdef CONFIG_E6500 /* lock/unlock L2 cache instead of L1 */
|
||||
#ifdef CONFIG_E6500 /* lock/unlock L2 cache long with L1 */
|
||||
dcblc 2, r0, r3
|
||||
dcblc 0, r0, r3
|
||||
#else
|
||||
dcblc r0,r3
|
||||
#endif
|
||||
|
||||
@ -32,11 +32,6 @@ void ft_cpu_setup(void *blob, bd_t *bd)
|
||||
|
||||
fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
|
||||
|
||||
#if defined(CONFIG_HAS_ETH0) || defined(CONFIG_HAS_ETH1) \
|
||||
|| defined(CONFIG_HAS_ETH2) || defined(CONFIG_HAS_ETH3)
|
||||
fdt_fixup_ethernet(blob);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_NS16550
|
||||
do_fixup_by_compat_u32(blob, "ns16550",
|
||||
"clock-frequency", CONFIG_SYS_NS16550_CLK, 1);
|
||||
|
||||
@ -23,8 +23,5 @@ void ft_cpu_setup(void *blob, bd_t *bd)
|
||||
do_fixup_by_compat_u32(blob, "fsl,cpm-brg", "clock-frequency",
|
||||
gd->arch.brg_clk, 1);
|
||||
|
||||
/* Fixup ethernet MAC addresses */
|
||||
fdt_fixup_ethernet(blob);
|
||||
|
||||
fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
|
||||
}
|
||||
|
||||
@ -129,6 +129,14 @@ config TARGET_XILINX_PPC440_GENERIC
|
||||
|
||||
endchoice
|
||||
|
||||
config CMD_CHIP_CONFIG
|
||||
bool "Enable the 'chip_config' command"
|
||||
help
|
||||
This command programs the I2C bootstrap EEPROM or shows a list of
|
||||
possible configurations. The configurations are board-specific
|
||||
and control the CPU and peripehrals clocks. The programmed
|
||||
configuration is then used when the board boots.
|
||||
|
||||
source "board/amcc/acadia/Kconfig"
|
||||
source "board/amcc/bamboo/Kconfig"
|
||||
source "board/amcc/bubinga/Kconfig"
|
||||
|
||||
@ -149,12 +149,6 @@ void ft_cpu_setup(void *blob, bd_t *bd)
|
||||
(void *)&gd->arch.uart_clk, 4);
|
||||
}
|
||||
|
||||
/*
|
||||
* Fixup all ethernet nodes
|
||||
* Note: aliases in the dts are required for this
|
||||
*/
|
||||
fdt_fixup_ethernet(blob);
|
||||
|
||||
/*
|
||||
* Fixup all available PCIe nodes by setting the device_type property
|
||||
*/
|
||||
|
||||
@ -100,7 +100,6 @@
|
||||
#endif /* ifdef CONFIG_SPL_BUILD */
|
||||
|
||||
#define CONFIG_CMD_ESBC_VALIDATE
|
||||
#define CONFIG_CMD_BLOB
|
||||
#define CONFIG_FSL_SEC_MON
|
||||
#define CONFIG_SHA_PROG_HW_ACCEL
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user