Merge branch 'update-to-pyro'
This commit is contained in:
commit
8d23992d36
249 changed files with 2157150 additions and 111 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -16,3 +16,6 @@
|
||||||
[submodule "layers/meta-sunxi"]
|
[submodule "layers/meta-sunxi"]
|
||||||
path = layers/meta-sunxi
|
path = layers/meta-sunxi
|
||||||
url = https://github.com/linux-sunxi/meta-sunxi.git
|
url = https://github.com/linux-sunxi/meta-sunxi.git
|
||||||
|
[submodule "layers/meta-rust"]
|
||||||
|
path = layers/meta-rust
|
||||||
|
url = https://github.com/meta-rust/meta-rust.git
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit fe5c83312de11e80b85680ef237f8acb04b4b26e
|
Subproject commit dfbdd28d206a74bf264c2f7ee0f7b3e5af587796
|
|
@ -1 +1 @@
|
||||||
Subproject commit 17259277403b435724166fe11d5173661fae3c6a
|
Subproject commit 508ea99ba600c5328fc2d8d9654cd6f35e0c998e
|
36
layers/meta-resin-allwinner/conf/machine/nanopi-neo-air.conf
Normal file
36
layers/meta-resin-allwinner/conf/machine/nanopi-neo-air.conf
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
#@TYPE: Machine
|
||||||
|
#@NAME: nanopi-neo-air
|
||||||
|
#@DESCRIPTION: Machine configuration for the nanopi-neo-air, base on allwinner H3 CPU
|
||||||
|
|
||||||
|
require conf/machine/include/sun8i.inc
|
||||||
|
|
||||||
|
PREFERRED_VERSION_linux = "4.13%"
|
||||||
|
PREFERRED_VERSION_u-boot = "v2017.09%"
|
||||||
|
|
||||||
|
KERNEL_DEVICETREE = "sun8i-h3-nanopi-neo-air.dtb \
|
||||||
|
overlay/sun8i-h3-analog-codec.dtbo \
|
||||||
|
overlay/sun8i-h3-cir.dtbo \
|
||||||
|
overlay/sun8i-h3-fixup.scr \
|
||||||
|
overlay/sun8i-h3-i2c0.dtbo \
|
||||||
|
overlay/sun8i-h3-i2c1.dtbo \
|
||||||
|
overlay/sun8i-h3-i2c2.dtbo \
|
||||||
|
overlay/sun8i-h3-pps-gpio.dtbo \
|
||||||
|
overlay/sun8i-h3-pwm.dtbo \
|
||||||
|
overlay/sun8i-h3-spdif-out.dtbo \
|
||||||
|
overlay/sun8i-h3-spi-add-cs1.dtbo \
|
||||||
|
overlay/sun8i-h3-spi-jedec-nor.dtbo \
|
||||||
|
overlay/sun8i-h3-spi-spidev.dtbo \
|
||||||
|
overlay/sun8i-h3-uart1.dtbo \
|
||||||
|
overlay/sun8i-h3-uart2.dtbo \
|
||||||
|
overlay/sun8i-h3-uart3.dtbo \
|
||||||
|
overlay/sun8i-h3-usbhost0.dtbo \
|
||||||
|
overlay/sun8i-h3-usbhost2.dtbo \
|
||||||
|
overlay/sun8i-h3-usbhost3.dtbo \
|
||||||
|
overlay/sun8i-h3-w1-gpio.dtbo \
|
||||||
|
"
|
||||||
|
|
||||||
|
MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-ap6212"
|
||||||
|
|
||||||
|
UBOOT_MACHINE = "nanopi_neo_air_defconfig"
|
||||||
|
|
||||||
|
DEFAULTTUNE = "cortexa7hf-neon-vfpv4"
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
require conf/machine/include/sun8i.inc
|
require conf/machine/include/sun8i.inc
|
||||||
|
|
||||||
PREFERRED_VERSION_linux = "4.11.0+git%"
|
PREFERRED_VERSION_linux = "4.11%"
|
||||||
PREFERRED_VERSION_u-boot = "v2017.03%"
|
PREFERRED_VERSION_u-boot = "v2017.03%"
|
||||||
|
|
||||||
KERNEL_DEVICETREE = "sun8i-h3-orangepi-lite.dtb \
|
KERNEL_DEVICETREE = "sun8i-h3-orangepi-lite.dtb \
|
||||||
|
|
|
@ -14,14 +14,14 @@ BBLAYERS ?= " \
|
||||||
${TOPDIR}/../layers/meta-openembedded/meta-python \
|
${TOPDIR}/../layers/meta-openembedded/meta-python \
|
||||||
${TOPDIR}/../layers/meta-sunxi \
|
${TOPDIR}/../layers/meta-sunxi \
|
||||||
${TOPDIR}/../layers/meta-resin/meta-resin-common \
|
${TOPDIR}/../layers/meta-resin/meta-resin-common \
|
||||||
${TOPDIR}/../layers/meta-resin/meta-resin-morty \
|
${TOPDIR}/../layers/meta-resin/meta-resin-pyro \
|
||||||
${TOPDIR}/../layers/meta-resin-allwinner \
|
${TOPDIR}/../layers/meta-resin-allwinner \
|
||||||
${TOPDIR}/../layers/oe-meta-go \
|
${TOPDIR}/../layers/meta-rust \
|
||||||
"
|
"
|
||||||
|
|
||||||
BBLAYERS_NON_REMOVABLE ?= " \
|
BBLAYERS_NON_REMOVABLE ?= " \
|
||||||
${TOPDIR}/../layers/poky/meta \
|
${TOPDIR}/../layers/poky/meta \
|
||||||
${TOPDIR}/../layers/poky/meta-poky \
|
${TOPDIR}/../layers/poky/meta-poky \
|
||||||
${TOPDIR}/../layers/meta-resin/meta-resin-common \
|
${TOPDIR}/../layers/meta-resin/meta-resin-common \
|
||||||
${TOPDIR}/../layers/meta-resin/meta-resin-morty \
|
${TOPDIR}/../layers/meta-resin/meta-resin-pyro \
|
||||||
"
|
"
|
||||||
|
|
|
@ -11,6 +11,6 @@
|
||||||
Resin specific targets are:
|
Resin specific targets are:
|
||||||
resin-image
|
resin-image
|
||||||
|
|
||||||
|
Nanopi Neo Air (EXPERIMENTAL) : $ MACHINE=nanopi-neo-air bitbake resin-image
|
||||||
Orange Pi Lite (EXPERIMENTAL) : $ MACHINE=orange-pi-lite bitbake resin-image
|
Orange Pi Lite (EXPERIMENTAL) : $ MACHINE=orange-pi-lite bitbake resin-image
|
||||||
orange pi one (EXPERIMENTAL) : $ MACHINE=orange-pi-one bitbake resin-image
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# Supported machines
|
# Supported machines
|
||||||
#MACHINE ?= "orange-pi-lite"
|
#MACHINE ?= "orange-pi-lite"
|
||||||
|
#MACHINE ?= "nanopi-neo-air"
|
||||||
|
|
||||||
# More info meta-resin/README.md
|
# More info meta-resin/README.md
|
||||||
#RESIN_CONNECTABLE ?= "1"
|
#RESIN_CONNECTABLE ?= "1"
|
||||||
|
@ -57,3 +58,5 @@ BB_DISKMON_DIRS = "\
|
||||||
ABORT,${SSTATE_DIR},100M,1K"
|
ABORT,${SSTATE_DIR},100M,1K"
|
||||||
|
|
||||||
CONF_VERSION = "1"
|
CONF_VERSION = "1"
|
||||||
|
|
||||||
|
HOSTTOOLS += "docker iptables"
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
diff --git a/configs/nanopi_air_defconfig b/configs/nanopi_air_defconfig
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..61fe8c6
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/configs/nanopi_air_defconfig
|
||||||
|
@@ -0,0 +1,17 @@
|
||||||
|
+CONFIG_ARM=y
|
||||||
|
+CONFIG_ARCH_SUNXI=y
|
||||||
|
+CONFIG_MACH_SUN8I_H3=y
|
||||||
|
+CONFIG_DRAM_CLK=408
|
||||||
|
+CONFIG_DRAM_ZQ=3881979
|
||||||
|
+CONFIG_DRAM_ODT_EN=y
|
||||||
|
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-neo"
|
||||||
|
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||||
|
+CONFIG_CONSOLE_MUX=y
|
||||||
|
+CONFIG_SPL=y
|
||||||
|
+# CONFIG_CMD_IMLS is not set
|
||||||
|
+# CONFIG_CMD_FLASH is not set
|
||||||
|
+# CONFIG_CMD_FPGA is not set
|
||||||
|
+CONFIG_SUN8I_EMAC=y
|
||||||
|
+CONFIG_USB_EHCI_HCD=y
|
||||||
|
+CONFIG_SYS_CLK_FREQ=480000000
|
||||||
|
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
|
@ -0,0 +1,9 @@
|
||||||
|
diff --git a/configs/nanopi_neo_defconfig b/configs/nanopi_neo_defconfig
|
||||||
|
index 89f5687..25ec9bc 100644
|
||||||
|
--- a/configs/nanopi_neo_defconfig
|
||||||
|
+++ b/configs/nanopi_neo_defconfig
|
||||||
|
@@ -16,3 +16,4 @@ CONFIG_SPL=y
|
||||||
|
# CONFIG_SPL_EFI_PARTITION is not set
|
||||||
|
CONFIG_SUN8I_EMAC=y
|
||||||
|
CONFIG_USB_EHCI_HCD=y
|
||||||
|
+CONFIG_SYS_CLK_FREQ=480000000
|
|
@ -2,7 +2,7 @@ verbosity=1
|
||||||
console=serial
|
console=serial
|
||||||
overlay_prefix=sun8i-h3
|
overlay_prefix=sun8i-h3
|
||||||
rootfstype=ext4
|
rootfstype=ext4
|
||||||
overlays=uart1 i2c0 spi-spidev
|
overlays=uart1 i2c0 spi-spidev analog-codec
|
||||||
param_w1_pin=PA20
|
param_w1_pin=PA20
|
||||||
param_w1_pin_int_pullup=1
|
param_w1_pin_int_pullup=1
|
||||||
param_uart1_rtscts=1
|
param_uart1_rtscts=1
|
||||||
|
|
|
@ -10,6 +10,8 @@ SRC_URI_append = " \
|
||||||
file://h3-set-safe-axi_apb-clock-dividers.patch \
|
file://h3-set-safe-axi_apb-clock-dividers.patch \
|
||||||
file://h3-adjust-dram-frequency.patch \
|
file://h3-adjust-dram-frequency.patch \
|
||||||
file://enable-DT-overlays-support.patch \
|
file://enable-DT-overlays-support.patch \
|
||||||
|
file://add-nanopi-air.patch \
|
||||||
|
file://addjust-nanopi-neo-cpufreq.patch \
|
||||||
file://boot.cmd \
|
file://boot.cmd \
|
||||||
file://armbianEnv.txt \
|
file://armbianEnv.txt \
|
||||||
"
|
"
|
|
@ -0,0 +1,61 @@
|
||||||
|
DESCRIPTION="Upstream's U-boot configured for sunxi devices"
|
||||||
|
|
||||||
|
require recipes-bsp/u-boot/u-boot.inc
|
||||||
|
|
||||||
|
FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot_2017.07:"
|
||||||
|
|
||||||
|
DEPENDS += "dtc-native"
|
||||||
|
|
||||||
|
LICENSE = "GPLv2"
|
||||||
|
|
||||||
|
LIC_FILES_CHKSUM = "\
|
||||||
|
file://Licenses/Exceptions;md5=338a7cb1e52d0d1951f83e15319a3fe7 \
|
||||||
|
file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \
|
||||||
|
file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \
|
||||||
|
file://Licenses/eCos-2.0.txt;md5=b338cb12196b5175acd3aa63b0a0805c \
|
||||||
|
file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
||||||
|
file://Licenses/ibm-pibs.txt;md5=c49502a55e35e0a8a1dc271d944d6dba \
|
||||||
|
file://Licenses/isc.txt;md5=ec65f921308235311f34b79d844587eb \
|
||||||
|
file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
|
||||||
|
file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \
|
||||||
|
file://Licenses/x11.txt;md5=b46f176c847b8742db02126fb8af92e2 \
|
||||||
|
"
|
||||||
|
|
||||||
|
COMPATIBLE_MACHINE = "(sun4i|sun5i|sun7i|sun8i)"
|
||||||
|
|
||||||
|
DEFAULT_PREFERENCE_sun4i="1"
|
||||||
|
DEFAULT_PREFERENCE_sun5i="1"
|
||||||
|
DEFAULT_PREFERENCE_sun7i="1"
|
||||||
|
DEFAULT_PREFERENCE_sun8i="1"
|
||||||
|
|
||||||
|
SRC_URI = "git://git.denx.de/u-boot.git;branch=master \
|
||||||
|
file://h3-Fix-PLL1-setup-to-never-use-dividers.patch \
|
||||||
|
file://h3-enable-power-led.patch \
|
||||||
|
file://h3-set-safe-axi_apb-clock-dividers.patch \
|
||||||
|
file://h3-adjust-dram-frequency.patch \
|
||||||
|
file://enable-DT-overlays-support.patch \
|
||||||
|
file://fix-sunxi-gpio-driver.patch \
|
||||||
|
file://add-nanopi-air-emmc.patch \
|
||||||
|
file://adjust-nanopi-neo-cpufreq.patch \
|
||||||
|
file://emac-gmac-fixes.patch \
|
||||||
|
file://sun8i-set-machid.patch \
|
||||||
|
file://boot.cmd \
|
||||||
|
file://armbianEnv.txt \
|
||||||
|
"
|
||||||
|
|
||||||
|
SRCREV = "d85ca029f257b53a96da6c2fb421e78a003a9943"
|
||||||
|
|
||||||
|
PV = "v2017.07+git${SRCPV}"
|
||||||
|
|
||||||
|
PE = "2"
|
||||||
|
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
SPL_BINARY="u-boot-sunxi-with-spl.bin"
|
||||||
|
|
||||||
|
UBOOT_ENV_SUFFIX = "scr"
|
||||||
|
UBOOT_ENV = "boot"
|
||||||
|
|
||||||
|
do_compile_append() {
|
||||||
|
${B}/tools/mkimage -C none -A arm -T script -d ${WORKDIR}/boot.cmd ${WORKDIR}/${UBOOT_ENV_BINARY}
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
RESIN_EXTERNAL_MMC = "0"
|
||||||
|
RESIN_INTERNAL_MMC = "1"
|
||||||
|
UBOOT_KCONFIG_SUPPORT = "1"
|
||||||
|
inherit resin-u-boot
|
||||||
|
|
||||||
|
do_deploy_append() {
|
||||||
|
install -m 0644 ${WORKDIR}/armbianEnv.txt ${DEPLOYDIR}/armbianEnv.txt
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
diff --git a/configs/nanopi_neo_air_defconfig b/configs/nanopi_neo_air_defconfig
|
||||||
|
index 9598bd5cd5..aedbac75c8 100644
|
||||||
|
--- a/configs/nanopi_neo_air_defconfig
|
||||||
|
+++ b/configs/nanopi_neo_air_defconfig
|
||||||
|
@@ -8,6 +8,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-neo-air"
|
||||||
|
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||||
|
CONFIG_CONSOLE_MUX=y
|
||||||
|
CONFIG_SPL=y
|
||||||
|
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||||
|
# CONFIG_CMD_IMLS is not set
|
||||||
|
# CONFIG_CMD_FLASH is not set
|
||||||
|
# CONFIG_CMD_FPGA is not set
|
|
@ -0,0 +1,12 @@
|
||||||
|
diff --git a/configs/nanopi_neo_defconfig b/configs/nanopi_neo_defconfig
|
||||||
|
index 89f5687884..2cbceb54f1 100644
|
||||||
|
--- a/configs/nanopi_neo_defconfig
|
||||||
|
+++ b/configs/nanopi_neo_defconfig
|
||||||
|
@@ -8,6 +8,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-neo"
|
||||||
|
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||||
|
CONFIG_CONSOLE_MUX=y
|
||||||
|
CONFIG_SPL=y
|
||||||
|
+CONFIG_SYS_CLK_FREQ=480000000
|
||||||
|
# CONFIG_CMD_IMLS is not set
|
||||||
|
# CONFIG_CMD_FLASH is not set
|
||||||
|
# CONFIG_CMD_FPGA is not set
|
|
@ -0,0 +1,7 @@
|
||||||
|
verbosity=1
|
||||||
|
console=serial
|
||||||
|
overlay_prefix=sun8i-h3
|
||||||
|
rootfstype=ext4
|
||||||
|
overlays=uart1 i2c0 spi-spidev analog-codec
|
||||||
|
param_uart1_rtscts=1
|
||||||
|
param_spidev_spi_bus=0
|
|
@ -0,0 +1,74 @@
|
||||||
|
# DO NOT EDIT THIS FILE
|
||||||
|
#
|
||||||
|
# Please edit /boot/armbianEnv.txt to set supported parameters
|
||||||
|
#
|
||||||
|
|
||||||
|
setenv load_addr "0x44000000"
|
||||||
|
setenv overlay_error "false"
|
||||||
|
# default values
|
||||||
|
setenv verbosity "1"
|
||||||
|
setenv console "both"
|
||||||
|
setenv disp_mem_reserves "off"
|
||||||
|
setenv disp_mode "1920x1080p60"
|
||||||
|
setenv rootfstype "ext4"
|
||||||
|
setenv docker_optimizations "on"
|
||||||
|
|
||||||
|
# Print boot source
|
||||||
|
itest.b *0x28 == 0x00 && echo "U-boot loaded from SD" && setenv rootdev "/dev/mmcblk0p2"
|
||||||
|
itest.b *0x28 == 0x02 && echo "U-boot loaded from eMMC or secondary SD" && setenv rootdev "/dev/mmcblk2p2"
|
||||||
|
itest.b *0x28 == 0x03 && echo "U-boot loaded from SPI"
|
||||||
|
|
||||||
|
echo "Boot script loaded from ${devtype}"
|
||||||
|
|
||||||
|
if test -e ${devtype} 0 ${prefix}armbianEnv.txt; then
|
||||||
|
load ${devtype} 0 ${load_addr} ${prefix}armbianEnv.txt
|
||||||
|
env import -t ${load_addr} ${filesize}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "${logo}" = "disabled"; then setenv logo "logo.nologo"; fi
|
||||||
|
|
||||||
|
if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi
|
||||||
|
if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "${consoleargs} console=ttyS0,115200"; fi
|
||||||
|
|
||||||
|
# get PARTUUID of first partition on SD/eMMC it was loaded from
|
||||||
|
# mmc 0 is always mapped to device u-boot (2016.09+) was loaded from
|
||||||
|
if test "${devtype}" = "mmc"; then part uuid mmc 0:1 partuuid; fi
|
||||||
|
|
||||||
|
setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} hdmi.audio=EDID:0 disp.screen0_output_mode=${disp_mode} panic=10 consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} ubootsource=${devtype} ${extraargs} ${extraboardargs}"
|
||||||
|
|
||||||
|
if test "${disp_mem_reserves}" = "off"; then setenv bootargs "${bootargs} sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16"; fi
|
||||||
|
if test "${docker_optimizations}" = "on"; then setenv bootargs "${bootargs} cgroup_enable=memory swapaccount=1"; fi
|
||||||
|
|
||||||
|
echo "Found mainline kernel configuration"
|
||||||
|
load ${devtype} 0 ${fdt_addr_r} ${prefix}dtb/${fdtfile}
|
||||||
|
fdt addr ${fdt_addr_r}
|
||||||
|
fdt resize 65536
|
||||||
|
for overlay_file in ${overlays}; do
|
||||||
|
if load ${devtype} 0 ${load_addr} ${prefix}dtb/overlay/${overlay_prefix}-${overlay_file}.dtbo; then
|
||||||
|
echo "Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo"
|
||||||
|
fdt apply ${load_addr} || setenv overlay_error "true"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
for overlay_file in ${user_overlays}; do
|
||||||
|
if load ${devtype} 0 ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then
|
||||||
|
echo "Applying user provided DT overlay ${overlay_file}.dtbo"
|
||||||
|
fdt apply ${load_addr} || setenv overlay_error "true"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test "${overlay_error}" = "true"; then
|
||||||
|
echo "Error applying DT overlays, restoring original DT"
|
||||||
|
load ${devtype} 0 ${fdt_addr_r} ${prefix}dtb/${fdtfile}
|
||||||
|
else
|
||||||
|
if load ${devtype} 0 ${load_addr} ${prefix}dtb/overlay/${overlay_prefix}-fixup.scr; then
|
||||||
|
echo "Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)"
|
||||||
|
source ${load_addr}
|
||||||
|
fi
|
||||||
|
if test -e ${devtype} 0 ${prefix}fixup.scr; then
|
||||||
|
load ${devtype} 0 ${load_addr} ${prefix}fixup.scr
|
||||||
|
echo "Applying user provided fixup script (fixup.scr)"
|
||||||
|
source ${load_addr}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
load ${devtype} 0 ${kernel_addr_r} ${prefix}uImage
|
||||||
|
bootm ${kernel_addr_r} - ${fdt_addr_r}
|
|
@ -0,0 +1,74 @@
|
||||||
|
diff --git a/arch/arm/include/asm/arch-sunxi/sys_proto.h b/arch/arm/include/asm/arch-sunxi/sys_proto.h
|
||||||
|
index a373319a2b..096510b787 100644
|
||||||
|
--- a/arch/arm/include/asm/arch-sunxi/sys_proto.h
|
||||||
|
+++ b/arch/arm/include/asm/arch-sunxi/sys_proto.h
|
||||||
|
@@ -24,7 +24,7 @@ void sdelay(unsigned long);
|
||||||
|
void return_to_fel(uint32_t lr, uint32_t sp);
|
||||||
|
|
||||||
|
/* Board / SoC level designware gmac init */
|
||||||
|
-#if !defined CONFIG_SPL_BUILD && defined CONFIG_SUNXI_GMAC
|
||||||
|
+#if !defined CONFIG_SPL_BUILD && defined CONFIG_SUN7I_GMAC
|
||||||
|
void eth_init_board(void);
|
||||||
|
#else
|
||||||
|
static inline void eth_init_board(void) {}
|
||||||
|
diff --git a/board/sunxi/Makefile b/board/sunxi/Makefile
|
||||||
|
index 43766e0ef4..34a2786f30 100644
|
||||||
|
--- a/board/sunxi/Makefile
|
||||||
|
+++ b/board/sunxi/Makefile
|
||||||
|
@@ -9,7 +9,7 @@
|
||||||
|
# SPDX-License-Identifier: GPL-2.0+
|
||||||
|
#
|
||||||
|
obj-y += board.o
|
||||||
|
-obj-$(CONFIG_SUNXI_GMAC) += gmac.o
|
||||||
|
+obj-$(CONFIG_SUN7I_GMAC) += gmac.o
|
||||||
|
obj-$(CONFIG_SUNXI_AHCI) += ahci.o
|
||||||
|
obj-$(CONFIG_MACH_SUN4I) += dram_sun4i_auto.o
|
||||||
|
obj-$(CONFIG_MACH_SUN5I) += dram_sun5i_auto.o
|
||||||
|
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
|
||||||
|
index aedb2cc90d..c5dd52bee2 100644
|
||||||
|
--- a/drivers/net/Makefile
|
||||||
|
+++ b/drivers/net/Makefile
|
||||||
|
@@ -22,7 +22,7 @@ obj-$(CONFIG_DNET) += dnet.o
|
||||||
|
obj-$(CONFIG_E1000) += e1000.o
|
||||||
|
obj-$(CONFIG_E1000_SPI) += e1000_spi.o
|
||||||
|
obj-$(CONFIG_EEPRO100) += eepro100.o
|
||||||
|
-obj-$(CONFIG_SUNXI_EMAC) += sunxi_emac.o
|
||||||
|
+obj-$(CONFIG_SUN4I_EMAC) += sunxi_emac.o
|
||||||
|
obj-$(CONFIG_SUN8I_EMAC) += sun8i_emac.o
|
||||||
|
obj-$(CONFIG_ENC28J60) += enc28j60.o
|
||||||
|
obj-$(CONFIG_EP93XX) += ep93xx_eth.o
|
||||||
|
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
|
||||||
|
index 64a190059a..3e789c5bf0 100644
|
||||||
|
--- a/include/configs/sunxi-common.h
|
||||||
|
+++ b/include/configs/sunxi-common.h
|
||||||
|
@@ -285,13 +285,13 @@ extern int soft_i2c_gpio_scl;
|
||||||
|
#endif /* CONFIG_VIDEO */
|
||||||
|
|
||||||
|
/* Ethernet support */
|
||||||
|
-#ifdef CONFIG_SUNXI_EMAC
|
||||||
|
+#ifdef CONFIG_SUN4I_EMAC
|
||||||
|
#define CONFIG_PHY_ADDR 1
|
||||||
|
#define CONFIG_MII /* MII PHY management */
|
||||||
|
#define CONFIG_PHYLIB
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#ifdef CONFIG_SUNXI_GMAC
|
||||||
|
+#ifdef CONFIG_SUN7I_GMAC
|
||||||
|
#define CONFIG_PHY_GIGE /* GMAC can use gigabit PHY */
|
||||||
|
#define CONFIG_PHY_ADDR 1
|
||||||
|
#define CONFIG_MII /* MII PHY management */
|
||||||
|
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
|
||||||
|
index ed349b9e6b..4fc89ca8eb 100644
|
||||||
|
--- a/scripts/config_whitelist.txt
|
||||||
|
+++ b/scripts/config_whitelist.txt
|
||||||
|
@@ -2797,8 +2797,8 @@ CONFIG_STV0991_HZ
|
||||||
|
CONFIG_STV0991_HZ_CLOCK
|
||||||
|
CONFIG_ST_SMI
|
||||||
|
CONFIG_SUNXI_AHCI
|
||||||
|
-CONFIG_SUNXI_EMAC
|
||||||
|
-CONFIG_SUNXI_GMAC
|
||||||
|
+CONFIG_SUN4I_EMAC
|
||||||
|
+CONFIG_SUN7I_GMAC
|
||||||
|
CONFIG_SUNXI_GPIO
|
||||||
|
CONFIG_SUNXI_MAX_FB_SIZE
|
||||||
|
CONFIG_SUNXI_USB_PHYS
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
|
||||||
|
index 0ed36cded..822ebb812 100644
|
||||||
|
--- a/arch/arm/Kconfig
|
||||||
|
+++ b/arch/arm/Kconfig
|
||||||
|
@@ -578,6 +578,8 @@ config ARCH_SUNXI
|
||||||
|
select CMD_GPIO
|
||||||
|
select CMD_MMC if MMC
|
||||||
|
select CMD_USB if DISTRO_DEFAULTS
|
||||||
|
+ select OF_LIBFDT
|
||||||
|
+ select OF_LIBFDT_OVERLAY
|
||||||
|
select DM
|
||||||
|
select DM_ETH
|
||||||
|
select DM_GPIO
|
|
@ -0,0 +1,38 @@
|
||||||
|
The sunxi GPIO driver is missing some compatible strings for recent
|
||||||
|
SoCs. While most of the sunxi GPIO code seems to not rely on this (and
|
||||||
|
so works anyway), the sunxi_name_to_gpio() function does and fails at
|
||||||
|
the moment (for instance when resolving the MMC CD pin name).
|
||||||
|
Add the compatible strings for the A64, H5 and V3s, which were missing
|
||||||
|
from the list. This now covers all pinctrl nodes in our own DTs.
|
||||||
|
Strictly speaking the V3s has only ports B, C, E, F and G, but I think
|
||||||
|
the other SoCs have gaps in there as well and for the pin number
|
||||||
|
computation this does not matter.
|
||||||
|
|
||||||
|
Signed-off-by: Andre Przywara <andre.przywara at arm.com>
|
||||||
|
---
|
||||||
|
drivers/gpio/sunxi_gpio.c | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c
|
||||||
|
index b47cc66..d20a7e7 100644
|
||||||
|
--- a/drivers/gpio/sunxi_gpio.c
|
||||||
|
+++ b/drivers/gpio/sunxi_gpio.c
|
||||||
|
@@ -353,12 +353,16 @@ static const struct udevice_id sunxi_gpio_ids[] = {
|
||||||
|
ID("allwinner,sun8i-a83t-pinctrl", a_all),
|
||||||
|
ID("allwinner,sun8i-h3-pinctrl", a_all),
|
||||||
|
ID("allwinner,sun8i-r40-pinctrl", a_all),
|
||||||
|
+ ID("allwinner,sun8i-v3s-pinctrl", a_all),
|
||||||
|
ID("allwinner,sun9i-a80-pinctrl", a_all),
|
||||||
|
+ ID("allwinner,sun50i-a64-pinctrl", a_all),
|
||||||
|
+ ID("allwinner,sun50i-h5-pinctrl", a_all),
|
||||||
|
ID("allwinner,sun6i-a31-r-pinctrl", l_2),
|
||||||
|
ID("allwinner,sun8i-a23-r-pinctrl", l_1),
|
||||||
|
ID("allwinner,sun8i-a83t-r-pinctrl", l_1),
|
||||||
|
ID("allwinner,sun8i-h3-r-pinctrl", l_1),
|
||||||
|
ID("allwinner,sun9i-a80-r-pinctrl", l_3),
|
||||||
|
+ ID("allwinner,sun50i-a64-r-pinctrl", l_1),
|
||||||
|
{ }
|
||||||
|
};
|
||||||
|
|
||||||
|
--
|
||||||
|
2.9.0
|
|
@ -0,0 +1,33 @@
|
||||||
|
From 7f5071f906f79bdc99d6b4b0ccf0cb280abe740b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ondrej Jirman <megous@megous.com>
|
||||||
|
Date: Tue, 20 Dec 2016 11:25:12 +0100
|
||||||
|
Subject: [PATCH] sunxi: h3: Fix PLL1 setup to never use dividers
|
||||||
|
|
||||||
|
Kernel would lower the divider on first CLK change and cause the
|
||||||
|
lock up.
|
||||||
|
---
|
||||||
|
arch/arm/mach-sunxi/clock_sun6i.c | 7 +++----
|
||||||
|
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/mach-sunxi/clock_sun6i.c b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
|
index 50fb302a19..91aa2a0478 100644
|
||||||
|
--- a/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
|
+++ b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
|
@@ -94,11 +94,10 @@ void clock_set_pll1(unsigned int clk)
|
||||||
|
int k = 1;
|
||||||
|
int m = 1;
|
||||||
|
|
||||||
|
- if (clk > 1152000000) {
|
||||||
|
- k = 2;
|
||||||
|
- } else if (clk > 768000000) {
|
||||||
|
+ if (clk >= 1368000000) {
|
||||||
|
k = 3;
|
||||||
|
- m = 2;
|
||||||
|
+ } else if (clk >= 768000000) {
|
||||||
|
+ k = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Switch to 24MHz clock while changing PLL1 */
|
||||||
|
--
|
||||||
|
2.11.0
|
||||||
|
|
|
@ -0,0 +1,65 @@
|
||||||
|
diff --git a/configs/orangepi_lite_defconfig b/configs/orangepi_lite_defconfig
|
||||||
|
index a72d506..2c49525 100644
|
||||||
|
--- a/configs/orangepi_lite_defconfig
|
||||||
|
+++ b/configs/orangepi_lite_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN8I_H3=y
|
||||||
|
-CONFIG_DRAM_CLK=672
|
||||||
|
+CONFIG_DRAM_CLK=624
|
||||||
|
CONFIG_DRAM_ZQ=3881979
|
||||||
|
CONFIG_DRAM_ODT_EN=y
|
||||||
|
CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-lite"
|
||||||
|
diff --git a/configs/orangepi_one_defconfig b/configs/orangepi_one_defconfig
|
||||||
|
index 5a7aba1..3ba4009 100644
|
||||||
|
--- a/configs/orangepi_one_defconfig
|
||||||
|
+++ b/configs/orangepi_one_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN8I_H3=y
|
||||||
|
-CONFIG_DRAM_CLK=672
|
||||||
|
+CONFIG_DRAM_CLK=624
|
||||||
|
CONFIG_DRAM_ZQ=3881979
|
||||||
|
CONFIG_DRAM_ODT_EN=y
|
||||||
|
CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-one"
|
||||||
|
diff --git a/configs/orangepi_plus2e_defconfig b/configs/orangepi_plus2e_defconfig
|
||||||
|
index 2374f1d..579bc70 100644
|
||||||
|
--- a/configs/orangepi_plus2e_defconfig
|
||||||
|
+++ b/configs/orangepi_plus2e_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN8I_H3=y
|
||||||
|
-CONFIG_DRAM_CLK=672
|
||||||
|
+CONFIG_DRAM_CLK=624
|
||||||
|
CONFIG_DRAM_ZQ=3881979
|
||||||
|
CONFIG_DRAM_ODT_EN=y
|
||||||
|
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||||
|
diff --git a/configs/orangepi_plus_defconfig b/configs/orangepi_plus_defconfig
|
||||||
|
index f2ed941..e8219bb 100644
|
||||||
|
--- a/configs/orangepi_plus_defconfig
|
||||||
|
+++ b/configs/orangepi_plus_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN8I_H3=y
|
||||||
|
-CONFIG_DRAM_CLK=672
|
||||||
|
+CONFIG_DRAM_CLK=624
|
||||||
|
CONFIG_DRAM_ZQ=3881979
|
||||||
|
CONFIG_DRAM_ODT_EN=y
|
||||||
|
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||||
|
diff --git a/configs/orangepi_zero_defconfig b/configs/orangepi_zero_defconfig
|
||||||
|
index ac44937..0e761b6 100644
|
||||||
|
--- a/configs/orangepi_zero_defconfig
|
||||||
|
+++ b/configs/orangepi_zero_defconfig
|
||||||
|
@@ -2,7 +2,7 @@ CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
||||||
|
CONFIG_MACH_SUN8I_H3=y
|
||||||
|
-CONFIG_DRAM_CLK=672
|
||||||
|
+CONFIG_DRAM_CLK=408
|
||||||
|
CONFIG_DRAM_ZQ=3881979
|
||||||
|
CONFIG_DRAM_ODT_EN=y
|
||||||
|
CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-orangepi-zero"
|
|
@ -0,0 +1,17 @@
|
||||||
|
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
|
||||||
|
index 3cf3614..89cf7f5 100644
|
||||||
|
--- a/board/sunxi/board.c
|
||||||
|
+++ b/board/sunxi/board.c
|
||||||
|
@@ -478,6 +478,11 @@ void sunxi_board_init(void)
|
||||||
|
int power_failed = 0;
|
||||||
|
unsigned long ramsize;
|
||||||
|
|
||||||
|
+#ifdef CONFIG_MACH_SUN8I_H3
|
||||||
|
+ /* turn on power LED (PL10) on H3 boards */
|
||||||
|
+ gpio_direction_output(SUNXI_GPL(10), 1);
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#ifdef CONFIG_SY8106A_POWER
|
||||||
|
power_failed = sy8106a_set_vout1(CONFIG_SY8106A_VOUT1_VOLT);
|
||||||
|
#endif
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
diff --git a/arch/arm/mach-sunxi/clock_sun6i.c b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
|
index 15272c9..cedddc2 100644
|
||||||
|
--- a/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
|
+++ b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
|
@@ -117,8 +117,8 @@ void clock_set_pll1(unsigned int clk)
|
||||||
|
sdelay(200);
|
||||||
|
|
||||||
|
/* Switch CPU to PLL1 */
|
||||||
|
- writel(AXI_DIV_3 << AXI_DIV_SHIFT |
|
||||||
|
- ATB_DIV_2 << ATB_DIV_SHIFT |
|
||||||
|
+ writel(AXI_DIV_4 << AXI_DIV_SHIFT |
|
||||||
|
+ ATB_DIV_4 << ATB_DIV_SHIFT |
|
||||||
|
CPU_CLK_SRC_PLL1 << CPU_CLK_SRC_SHIFT,
|
||||||
|
&ccm->cpu_axi_cfg);
|
||||||
|
}
|
||||||
|
diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h
|
||||||
|
index f2990db..b3a8575 100644
|
||||||
|
--- a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h
|
||||||
|
+++ b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h
|
||||||
|
@@ -180,6 +180,7 @@ struct sunxi_ccm_reg {
|
||||||
|
#define CCM_PLL1_CTRL_N(n) ((((n) - 1) & 0x1f) << 8)
|
||||||
|
#define CCM_PLL1_CTRL_P(n) (((n) & 0x3) << 16)
|
||||||
|
#define CCM_PLL1_CTRL_EN (0x1 << 31)
|
||||||
|
+#define CCM_PLL1_CTRL_LOCK (0x1 << 28)
|
||||||
|
|
||||||
|
#define CCM_PLL3_CTRL_M_SHIFT 0
|
||||||
|
#define CCM_PLL3_CTRL_M_MASK (0xf << CCM_PLL3_CTRL_M_SHIFT)
|
||||||
|
diff --git a/arch/arm/mach-sunxi/clock_sun6i.c b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
|
index cedddc2..3fe9305 100644
|
||||||
|
--- a/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
|
+++ b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
|
@@ -114,7 +114,9 @@ void clock_set_pll1(unsigned int clk)
|
||||||
|
writel(CCM_PLL1_CTRL_EN | CCM_PLL1_CTRL_P(p) |
|
||||||
|
CCM_PLL1_CTRL_N(clk / (24000000 * k / m)) |
|
||||||
|
CCM_PLL1_CTRL_K(k) | CCM_PLL1_CTRL_M(m), &ccm->pll1_cfg);
|
||||||
|
- sdelay(200);
|
||||||
|
+
|
||||||
|
+ while (!(readl(&ccm->pll1_cfg) & CCM_PLL1_CTRL_LOCK))
|
||||||
|
+ ;
|
||||||
|
|
||||||
|
/* Switch CPU to PLL1 */
|
||||||
|
writel(AXI_DIV_4 << AXI_DIV_SHIFT |
|
|
@ -0,0 +1,11 @@
|
||||||
|
diff --git a/include/configs/sun8i.h b/include/configs/sun8i.h
|
||||||
|
index a4c3fb69e..47ce2e9e6 100644
|
||||||
|
--- a/include/configs/sun8i.h
|
||||||
|
+++ b/include/configs/sun8i.h
|
||||||
|
@@ -30,4 +30,6 @@
|
||||||
|
*/
|
||||||
|
#include <configs/sunxi-common.h>
|
||||||
|
|
||||||
|
+#define CONFIG_MACH_TYPE (0x1029)
|
||||||
|
+
|
||||||
|
#endif /* __CONFIG_H */
|
|
@ -0,0 +1,87 @@
|
||||||
|
DESCRIPTION="Upstream's U-boot configured for sunxi devices"
|
||||||
|
|
||||||
|
require recipes-bsp/u-boot/u-boot.inc
|
||||||
|
|
||||||
|
FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot_2017.09:"
|
||||||
|
|
||||||
|
DEPENDS += " bc-native dtc-native swig-native python3-native "
|
||||||
|
|
||||||
|
LICENSE = "GPLv2"
|
||||||
|
|
||||||
|
LIC_FILES_CHKSUM = "\
|
||||||
|
file://Licenses/Exceptions;md5=338a7cb1e52d0d1951f83e15319a3fe7 \
|
||||||
|
file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \
|
||||||
|
file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \
|
||||||
|
file://Licenses/eCos-2.0.txt;md5=b338cb12196b5175acd3aa63b0a0805c \
|
||||||
|
file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
||||||
|
file://Licenses/ibm-pibs.txt;md5=c49502a55e35e0a8a1dc271d944d6dba \
|
||||||
|
file://Licenses/isc.txt;md5=ec65f921308235311f34b79d844587eb \
|
||||||
|
file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
|
||||||
|
file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \
|
||||||
|
file://Licenses/x11.txt;md5=b46f176c847b8742db02126fb8af92e2 \
|
||||||
|
"
|
||||||
|
|
||||||
|
COMPATIBLE_MACHINE = "(sun4i|sun5i|sun7i|sun8i)"
|
||||||
|
|
||||||
|
DEFAULT_PREFERENCE_sun4i="1"
|
||||||
|
DEFAULT_PREFERENCE_sun5i="1"
|
||||||
|
DEFAULT_PREFERENCE_sun7i="1"
|
||||||
|
DEFAULT_PREFERENCE_sun8i="1"
|
||||||
|
|
||||||
|
# These patches were fetched from the lovely guys at armbian
|
||||||
|
SRC_URI = "git://git.denx.de/u-boot.git;branch=master \
|
||||||
|
file://u-boot-pylibfdt-native-build.patch \
|
||||||
|
file://0020-sunxi-call-fdt_fixup_ethernet-again-to-set-macaddr-f.patch \
|
||||||
|
file://4kfix-limit-screen-to-full-hd.patch \
|
||||||
|
file://add-a20-olinuxino-micro-emmc-support.patch \
|
||||||
|
file://add-beelink-x2.patch \
|
||||||
|
file://add-cubieboard2-emmc.patch \
|
||||||
|
file://add-cubietruck-emmc.patch \
|
||||||
|
file://add-nanopi-air-emmc.patch \
|
||||||
|
file://add-nanopi-duo.patch \
|
||||||
|
file://add-nanopi-m1-plus2-emmc.patch \
|
||||||
|
file://add-nanopineoplus2.patch \
|
||||||
|
file://add-orangepi-plus2-emmc.patch \
|
||||||
|
file://add-orangepi-zeroplus2_h3.patch \
|
||||||
|
file://add-orangepi-zeroplus.patch \
|
||||||
|
file://adjust-default-dram-clockspeeds.patch \
|
||||||
|
file://adjust-nanopi-neo-cpufreq.patch \
|
||||||
|
file://adjust-opi-zero-cpufreq.patch \
|
||||||
|
file://armbianEnv.txt \
|
||||||
|
file://boot.cmd \
|
||||||
|
file://enable-autoboot-keyed.patch \
|
||||||
|
file://enable-DT-overlays-support.patch \
|
||||||
|
file://enable-thumb-build.patch \
|
||||||
|
file://fdt-setprop-fix-unaligned-access.patch \
|
||||||
|
file://fix-spi-spl-fit-support.patch \
|
||||||
|
file://fix-sunxi-gpio-driver.patch \
|
||||||
|
file://fix-usb1-vbus-opiwin.patch \
|
||||||
|
file://fix-usb-phy-probe.patch \
|
||||||
|
file://h3-enable-power-led.patch \
|
||||||
|
file://h3-Fix-PLL1-setup-to-never-use-dividers.patch \
|
||||||
|
file://h3-set-safe-axi_apb-clock-dividers.patch \
|
||||||
|
file://lower-default-cpufreq-H5.patch \
|
||||||
|
file://lower-default-DRAM-freq-A64-H5.patch \
|
||||||
|
file://sun8i-set-machid.patch \
|
||||||
|
file://sunxi-boot-splash.patch \
|
||||||
|
file://workaround-reboot-is-poweroff-olimex-a20.patch \
|
||||||
|
"
|
||||||
|
|
||||||
|
SRCREV = "c98ac3487e413c71e5d36322ef3324b21c6f60f9"
|
||||||
|
|
||||||
|
PV = "v2017.09+git${SRCPV}"
|
||||||
|
|
||||||
|
PE = "2"
|
||||||
|
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
SPL_BINARY="u-boot-sunxi-with-spl.bin"
|
||||||
|
|
||||||
|
UBOOT_ENV_SUFFIX = "scr"
|
||||||
|
UBOOT_ENV = "boot"
|
||||||
|
|
||||||
|
EXTRA_OEMAKE += ' HOSTLDSHARED="${BUILD_CC} -shared ${BUILD_LDFLAGS} ${BUILD_CFLAGS}" '
|
||||||
|
|
||||||
|
do_compile_append() {
|
||||||
|
${B}/tools/mkimage -C none -A arm -T script -d ${WORKDIR}/boot.cmd ${WORKDIR}/${UBOOT_ENV_BINARY}
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
RESIN_EXTERNAL_MMC = "0"
|
||||||
|
RESIN_INTERNAL_MMC = "1"
|
||||||
|
UBOOT_KCONFIG_SUPPORT = "1"
|
||||||
|
inherit resin-u-boot
|
||||||
|
|
||||||
|
do_deploy_append() {
|
||||||
|
install -m 0644 ${WORKDIR}/armbianEnv.txt ${DEPLOYDIR}/armbianEnv.txt
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
From 55d3cc28b37000d1a3d7224c0ba4a808274e0b33 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Icenowy Zheng <icenowy@aosc.io>
|
||||||
|
Date: Fri, 27 Oct 2017 17:25:00 +0800
|
||||||
|
Subject: [PATCH 20/20] sunxi: call fdt_fixup_ethernet again to set macaddr for
|
||||||
|
more aliases
|
||||||
|
|
||||||
|
Sometimes some ethernet aliases do not exist in U-Boot FDT but they
|
||||||
|
exist in the FDT used to boot the system. In this situation
|
||||||
|
setup_environment is called again in ft_board_setup to generate macaddr
|
||||||
|
environment variable for them. However now the call to
|
||||||
|
fdt_fixup_ethernet is moved before the call of ft_board_setup.
|
||||||
|
|
||||||
|
Call fdt_fixup_ethernet again to add MAC addresses for the extra
|
||||||
|
ethernet aliases.
|
||||||
|
|
||||||
|
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
|
||||||
|
---
|
||||||
|
board/sunxi/board.c | 6 ++++--
|
||||||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
|
||||||
|
index 192cf8ca45..0fe70f47cb 100644
|
||||||
|
--- a/board/sunxi/board.c
|
||||||
|
+++ b/board/sunxi/board.c
|
||||||
|
@@ -751,10 +751,12 @@ int ft_board_setup(void *blob, bd_t *bd)
|
||||||
|
int __maybe_unused r;
|
||||||
|
|
||||||
|
/*
|
||||||
|
- * Call setup_environment again in case the boot fdt has
|
||||||
|
- * ethernet aliases the u-boot copy does not have.
|
||||||
|
+ * Call setup_environment and fdt_fixup_ethernet again
|
||||||
|
+ * in case the boot fdt has ethernet aliases the u-boot
|
||||||
|
+ * copy does not have.
|
||||||
|
*/
|
||||||
|
setup_environment(blob);
|
||||||
|
+ fdt_fixup_ethernet(blob);
|
||||||
|
|
||||||
|
#ifdef CONFIG_VIDEO_DT_SIMPLEFB
|
||||||
|
r = sunxi_simplefb_setup(blob);
|
||||||
|
--
|
||||||
|
2.13.6
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
diff --git a/drivers/video/sunxi/sunxi_display.c b/drivers/video/sunxi/sunxi_display.c
|
||||||
|
index 92c9d06054..cd16d69e30 100644
|
||||||
|
--- a/drivers/video/sunxi/sunxi_display.c
|
||||||
|
+++ b/drivers/video/sunxi/sunxi_display.c
|
||||||
|
@@ -1274,8 +1274,12 @@ void *video_hw_init(void)
|
||||||
|
ret = sunxi_hdmi_hpd_detect(hpd_delay);
|
||||||
|
if (ret) {
|
||||||
|
printf("HDMI connected: ");
|
||||||
|
- if (edid && sunxi_hdmi_edid_get_mode(&custom) == 0)
|
||||||
|
- mode = &custom;
|
||||||
|
+ if (edid && sunxi_hdmi_edid_get_mode(&custom) == 0) {
|
||||||
|
+ if ((custom.xres <= 1920) && (custom.yres <= 1080))
|
||||||
|
+ mode = &custom;
|
||||||
|
+ else
|
||||||
|
+ mode = &res_mode_init[RES_MODE_1920x1080];
|
||||||
|
+ }
|
||||||
|
} else if (hpd) {
|
||||||
|
sunxi_hdmi_shutdown();
|
||||||
|
sunxi_display.monitor = sunxi_get_default_mon(false);
|
|
@ -0,0 +1,160 @@
|
||||||
|
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||||
|
index 9cc5c1e..7ed687e 100644
|
||||||
|
--- a/arch/arm/dts/Makefile
|
||||||
|
+++ b/arch/arm/dts/Makefile
|
||||||
|
@@ -281,6 +281,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
|
||||||
|
sun7i-a20-olinuxino-lime2.dtb \
|
||||||
|
sun7i-a20-olinuxino-lime2-emmc.dtb \
|
||||||
|
sun7i-a20-olinuxino-micro.dtb \
|
||||||
|
+ sun7i-a20-olinuxino-micro-emmc.dtb \
|
||||||
|
sun7i-a20-orangepi.dtb \
|
||||||
|
sun7i-a20-orangepi-mini.dtb \
|
||||||
|
sun7i-a20-pcduino3.dtb \
|
||||||
|
diff --git a/arch/arm/dts/sun7i-a20-olinuxino-micro-emmc.dts b/arch/arm/dts/sun7i-a20-olinuxino-micro-emmc.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..a39247a
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/dts/sun7i-a20-olinuxino-micro-emmc.dts
|
||||||
|
@@ -0,0 +1,83 @@
|
||||||
|
+ /*
|
||||||
|
+ * Copyright 2017 Olimex Ltd.
|
||||||
|
+ * Stefan Mavrodiev <stefan@olimex.com>
|
||||||
|
+ *
|
||||||
|
+ * This file is dual-licensed: you can use it either under the terms
|
||||||
|
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||||
|
+ * licensing only applies to this file, and not this project as a
|
||||||
|
+ * whole.
|
||||||
|
+ *
|
||||||
|
+ * a) This file is free software; you can redistribute it and/or
|
||||||
|
+ * modify it under the terms of the GNU General Public License as
|
||||||
|
+ * published by the Free Software Foundation; either version 2 of the
|
||||||
|
+ * License, or (at your option) any later version.
|
||||||
|
+ *
|
||||||
|
+ * This file is distributed in the hope that it will be useful,
|
||||||
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+ * GNU General Public License for more details.
|
||||||
|
+ *
|
||||||
|
+ * Or, alternatively,
|
||||||
|
+ *
|
||||||
|
+ * b) Permission is hereby granted, free of charge, to any person
|
||||||
|
+ * obtaining a copy of this software and associated documentation
|
||||||
|
+ * files (the "Software"), to deal in the Software without
|
||||||
|
+ * restriction, including without limitation the rights to use,
|
||||||
|
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
+ * sell copies of the Software, and to permit persons to whom the
|
||||||
|
+ * Software is furnished to do so, subject to the following
|
||||||
|
+ * conditions:
|
||||||
|
+ *
|
||||||
|
+ * The above copyright notice and this permission notice shall be
|
||||||
|
+ * included in all copies or substantial portions of the Software.
|
||||||
|
+ *
|
||||||
|
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#include "sun7i-a20-olinuxino-micro.dts"
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ model = "Olimex A20-OLinuXino-MICRO-eMMC";
|
||||||
|
+ compatible = "olimex,a20-olinuxino-micro-emmc", "allwinner,sun7i-a20";
|
||||||
|
+
|
||||||
|
+ mmc2_pwrseq: pwrseq {
|
||||||
|
+ pinctrl-0 = <&mmc2_pins_nrst>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ compatible = "mmc-pwrseq-emmc";
|
||||||
|
+ reset-gpios = <&pio 2 16 GPIO_ACTIVE_LOW>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&pio {
|
||||||
|
+ mmc2_pins_nrst: mmc2@0 {
|
||||||
|
+ allwinner,pins = "PC16";
|
||||||
|
+ allwinner,function = "gpio_out";
|
||||||
|
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||||
|
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc2 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&mmc2_pins_a>;
|
||||||
|
+ vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ vqmmc-supply = <®_vcc3v3>;
|
||||||
|
+ bus-width = <4>;
|
||||||
|
+ non-removable;
|
||||||
|
+ mmc-pwrseq = <&mmc2_pwrseq>;
|
||||||
|
+ status = "okay";
|
||||||
|
+
|
||||||
|
+ emmc: emmc@0 {
|
||||||
|
+ reg = <0>;
|
||||||
|
+ compatible = "mmc-card";
|
||||||
|
+ broken-hpi;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
diff --git a/arch/arm/dts/sun7i-a20-olinuxino-micro.dts b/arch/arm/dts/sun7i-a20-olinuxino-micro.dts
|
||||||
|
index 7e3006f..eb701e3 100644
|
||||||
|
--- a/arch/arm/dts/sun7i-a20-olinuxino-micro.dts
|
||||||
|
+++ b/arch/arm/dts/sun7i-a20-olinuxino-micro.dts
|
||||||
|
@@ -95,7 +95,7 @@
|
||||||
|
|
||||||
|
&gmac {
|
||||||
|
pinctrl-names = "default";
|
||||||
|
- pinctrl-0 = <&gmac_pins_mii_a>;
|
||||||
|
+ pinctrl-0 = <&gmac_pins_mii_a>,<&gmac_txerr>;
|
||||||
|
phy = <&phy1>;
|
||||||
|
phy-mode = "mii";
|
||||||
|
status = "okay";
|
||||||
|
@@ -226,6 +226,13 @@
|
||||||
|
};
|
||||||
|
|
||||||
|
&pio {
|
||||||
|
+ gmac_txerr: gmac_txerr@0 {
|
||||||
|
+ allwinner,pins = "PA17";
|
||||||
|
+ allwinner,function = "gmac";
|
||||||
|
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||||
|
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
mmc3_cd_pin_olinuxinom: mmc3_cd_pin@0 {
|
||||||
|
allwinner,pins = "PH11";
|
||||||
|
allwinner,function = "gpio_in";
|
||||||
|
diff --git a/configs/A20-OLinuXino_MICRO_eMMC_defconfig b/configs/A20-OLinuXino_MICRO_eMMC_defconfig
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..1ec93e4
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/configs/A20-OLinuXino_MICRO_eMMC_defconfig
|
||||||
|
@@ -0,0 +1,26 @@
|
||||||
|
+CONFIG_ARM=y
|
||||||
|
+CONFIG_ARCH_SUNXI=y
|
||||||
|
+CONFIG_MACH_SUN7I=y
|
||||||
|
+CONFIG_DRAM_CLK=384
|
||||||
|
+CONFIG_MMC0_CD_PIN="PH1"
|
||||||
|
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||||
|
+CONFIG_I2C1_ENABLE=y
|
||||||
|
+CONFIG_VIDEO_VGA=y
|
||||||
|
+CONFIG_SATAPWR="PB8"
|
||||||
|
+CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-micro-emmc"
|
||||||
|
+CONFIG_AHCI=y
|
||||||
|
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||||
|
+CONFIG_SPL=y
|
||||||
|
+CONFIG_SPL_I2C_SUPPORT=y
|
||||||
|
+# CONFIG_CMD_IMLS is not set
|
||||||
|
+# CONFIG_CMD_FLASH is not set
|
||||||
|
+# CONFIG_CMD_FPGA is not set
|
||||||
|
+# CONFIG_SPL_DOS_PARTITION is not set
|
||||||
|
+# CONFIG_SPL_ISO_PARTITION is not set
|
||||||
|
+# CONFIG_SPL_EFI_PARTITION is not set
|
||||||
|
+CONFIG_ETH_DESIGNWARE=y
|
||||||
|
+CONFIG_SUN7I_GMAC=y
|
||||||
|
+CONFIG_AXP_ALDO3_VOLT=2800
|
||||||
|
+CONFIG_AXP_ALDO4_VOLT=2800
|
||||||
|
+CONFIG_USB_EHCI_HCD=y
|
||||||
|
+CONFIG_SCSI=y
|
|
@ -0,0 +1,135 @@
|
||||||
|
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||||
|
old mode 100644
|
||||||
|
new mode 100755
|
||||||
|
index d1bd78c..f268593
|
||||||
|
--- a/arch/arm/dts/Makefile
|
||||||
|
+++ b/arch/arm/dts/Makefile
|
||||||
|
@@ -317,6 +317,7 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \
|
||||||
|
sun8i-h3-orangepi-2.dtb \
|
||||||
|
sun8i-h3-orangepi-lite.dtb \
|
||||||
|
sun8i-h3-orangepi-one.dtb \
|
||||||
|
+ sun8i-h3-beelink-x2.dtb \
|
||||||
|
sun8i-h3-orangepi-pc.dtb \
|
||||||
|
sun8i-h3-orangepi-pc-plus.dtb \
|
||||||
|
sun8i-h3-orangepi-plus.dtb \
|
||||||
|
diff --git a/arch/arm/dts/sun8i-h3-beelink-x2.dts b/arch/arm/dts/sun8i-h3-beelink-x2.dts
|
||||||
|
new file mode 100755
|
||||||
|
index 0000000..515a3da
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/dts/sun8i-h3-beelink-x2.dts
|
||||||
|
@@ -0,0 +1,88 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (C) 2016 Hans de Goede <hdegoede@redhat.com>
|
||||||
|
+ *
|
||||||
|
+ * This file is dual-licensed: you can use it either under the terms
|
||||||
|
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||||
|
+ * licensing only applies to this file, and not this project as a
|
||||||
|
+ * whole.
|
||||||
|
+ *
|
||||||
|
+ * a) This file is free software; you can redistribute it and/or
|
||||||
|
+ * modify it under the terms of the GNU General Public License as
|
||||||
|
+ * published by the Free Software Foundation; either version 2 of the
|
||||||
|
+ * License, or (at your option) any later version.
|
||||||
|
+ *
|
||||||
|
+ * This file is distributed in the hope that it will be useful,
|
||||||
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+ * GNU General Public License for more details.
|
||||||
|
+ *
|
||||||
|
+ * Or, alternatively,
|
||||||
|
+ *
|
||||||
|
+ * b) Permission is hereby granted, free of charge, to any person
|
||||||
|
+ * obtaining a copy of this software and associated documentation
|
||||||
|
+ * files (the "Software"), to deal in the Software without
|
||||||
|
+ * restriction, including without limitation the rights to use,
|
||||||
|
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
+ * sell copies of the Software, and to permit persons to whom the
|
||||||
|
+ * Software is furnished to do so, subject to the following
|
||||||
|
+ * conditions:
|
||||||
|
+ *
|
||||||
|
+ * The above copyright notice and this permission notice shall be
|
||||||
|
+ * included in all copies or substantial portions of the Software.
|
||||||
|
+ *
|
||||||
|
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+/* The Orange Pi PC Plus is an extended version of the regular PC */
|
||||||
|
+#include "sun8i-h3-orangepi-pc.dts"
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ model = "Beelink X2";
|
||||||
|
+ compatible = "xunlong,orangepi-pc-plus", "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ aliases {
|
||||||
|
+ /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
|
||||||
|
+ ethernet1 = &rtl8189ftv;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc1 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&mmc1_pins_a>;
|
||||||
|
+ vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ bus-width = <4>;
|
||||||
|
+ non-removable;
|
||||||
|
+ status = "okay";
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * Explicitly define the sdio device, so that we can add an ethernet
|
||||||
|
+ * alias for it (which e.g. makes u-boot set a mac-address).
|
||||||
|
+ */
|
||||||
|
+ rtl8189ftv: sdio_wifi@1 {
|
||||||
|
+ reg = <1>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc2 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&mmc2_8bit_pins>;
|
||||||
|
+ vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ bus-width = <8>;
|
||||||
|
+ non-removable;
|
||||||
|
+ cap-mmc-hw-reset;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc2_8bit_pins {
|
||||||
|
+ /* Increase drive strength for DDR modes */
|
||||||
|
+ allwinner,drive = <SUN4I_PINCTRL_40_MA>;
|
||||||
|
+ /* eMMC is missing pull-ups */
|
||||||
|
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||||
|
+};
|
||||||
|
diff --git a/configs/beelink_x2_defconfig b/configs/beelink_x2_defconfig
|
||||||
|
new file mode 100755
|
||||||
|
index 0000000..098fc05
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/configs/beelink_x2_defconfig
|
||||||
|
@@ -0,0 +1,21 @@
|
||||||
|
+CONFIG_ARM=y
|
||||||
|
+CONFIG_ARCH_SUNXI=y
|
||||||
|
+CONFIG_MACH_SUN8I_H3=y
|
||||||
|
+CONFIG_DRAM_CLK=624
|
||||||
|
+CONFIG_DRAM_ZQ=3881979
|
||||||
|
+CONFIG_DRAM_ODT_EN=y
|
||||||
|
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||||
|
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-beelink-x2"
|
||||||
|
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||||
|
+CONFIG_SPL=y
|
||||||
|
+CONFIG_SPL_I2C_SUPPORT=y
|
||||||
|
+# CONFIG_CMD_IMLS is not set
|
||||||
|
+# CONFIG_CMD_FLASH is not set
|
||||||
|
+# CONFIG_CMD_FPGA is not set
|
||||||
|
+# CONFIG_SPL_DOS_PARTITION is not set
|
||||||
|
+# CONFIG_SPL_ISO_PARTITION is not set
|
||||||
|
+# CONFIG_SPL_EFI_PARTITION is not set
|
||||||
|
+CONFIG_SUN8I_EMAC=y
|
||||||
|
+CONFIG_SY8106A_POWER=y
|
||||||
|
+CONFIG_USB_EHCI_HCD=y
|
||||||
|
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
|
|
@ -0,0 +1,9 @@
|
||||||
|
diff --git a/configs/Cubieboard2_defconfig b/configs/Cubieboard2_defconfig
|
||||||
|
index 78eaaf4379..8f8930caf9 100644
|
||||||
|
--- a/configs/Cubieboard2_defconfig
|
||||||
|
+++ b/configs/Cubieboard2_defconfig
|
||||||
|
@@ -20,3 +20,4 @@ CONFIG_SUN7I_GMAC=y
|
||||||
|
CONFIG_SCSI=y
|
||||||
|
CONFIG_USB_EHCI_HCD=y
|
||||||
|
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
|
||||||
|
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
|
@ -0,0 +1,9 @@
|
||||||
|
diff --git a/configs/Cubietruck_defconfig b/configs/Cubietruck_defconfig
|
||||||
|
index f93ff0d6c4..0c2fc8aafc 100644
|
||||||
|
--- a/configs/Cubietruck_defconfig
|
||||||
|
+++ b/configs/Cubietruck_defconfig
|
||||||
|
@@ -37,3 +37,4 @@ CONFIG_USB_GADGET_DOWNLOAD=y
|
||||||
|
CONFIG_G_DNL_MANUFACTURER="Allwinner Technology"
|
||||||
|
CONFIG_G_DNL_VENDOR_NUM=0x1f3a
|
||||||
|
CONFIG_G_DNL_PRODUCT_NUM=0x1010
|
||||||
|
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
|
@ -0,0 +1,12 @@
|
||||||
|
diff --git a/configs/nanopi_neo_air_defconfig b/configs/nanopi_neo_air_defconfig
|
||||||
|
index 9598bd5cd5..aedbac75c8 100644
|
||||||
|
--- a/configs/nanopi_neo_air_defconfig
|
||||||
|
+++ b/configs/nanopi_neo_air_defconfig
|
||||||
|
@@ -8,6 +8,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-neo-air"
|
||||||
|
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||||
|
CONFIG_CONSOLE_MUX=y
|
||||||
|
CONFIG_SPL=y
|
||||||
|
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||||
|
# CONFIG_CMD_IMLS is not set
|
||||||
|
# CONFIG_CMD_FLASH is not set
|
||||||
|
# CONFIG_CMD_FPGA is not set
|
|
@ -0,0 +1,142 @@
|
||||||
|
diff --git a/configs/nanopi_duo_defconfig b/configs/nanopi_duo_defconfig
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..1e51018
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/configs/nanopi_duo_defconfig
|
||||||
|
@@ -0,0 +1,20 @@
|
||||||
|
+CONFIG_ARM=y
|
||||||
|
+CONFIG_ARCH_SUNXI=y
|
||||||
|
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
||||||
|
+CONFIG_MACH_SUN8I_H3=y
|
||||||
|
+CONFIG_DRAM_CLK=408
|
||||||
|
+CONFIG_DRAM_ZQ=3881979
|
||||||
|
+CONFIG_DRAM_ODT_EN=y
|
||||||
|
+# CONFIG_VIDEO_DE2 is not set
|
||||||
|
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-nanopi-duo"
|
||||||
|
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||||
|
+CONFIG_CONSOLE_MUX=y
|
||||||
|
+CONFIG_SPL=y
|
||||||
|
+CONFIG_SYS_CLK_FREQ=480000000
|
||||||
|
+# CONFIG_CMD_IMLS is not set
|
||||||
|
+# CONFIG_CMD_FLASH is not set
|
||||||
|
+# CONFIG_CMD_FPGA is not set
|
||||||
|
+CONFIG_SPL_SPI_SUNXI=y
|
||||||
|
+CONFIG_SUN8I_EMAC=y
|
||||||
|
+CONFIG_USB_EHCI_HCD=y
|
||||||
|
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
|
||||||
|
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||||
|
index 4f8ca34..019ac0b 100644
|
||||||
|
--- a/arch/arm/dts/Makefile
|
||||||
|
+++ b/arch/arm/dts/Makefile
|
||||||
|
@@ -312,6 +312,7 @@ dtb-$(CONFIG_MACH_SUN8I_A83T) += \
|
||||||
|
sun8i-a83t-sinovoip-bpi-m3.dtb
|
||||||
|
dtb-$(CONFIG_MACH_SUN8I_H3) += \
|
||||||
|
sun8i-h2-plus-orangepi-zero.dtb \
|
||||||
|
+ sun8i-h2-plus-nanopi-duo.dtb \
|
||||||
|
sun8i-h3-bananapi-m2-plus.dtb \
|
||||||
|
sun8i-h3-orangepi-2.dtb \
|
||||||
|
sun8i-h3-orangepi-lite.dtb \
|
||||||
|
diff --git a/arch/arm/dts/sun8i-h2-plus-nanopi-duo.dts b/arch/arm/dts/sun8i-h2-plus-nanopi-duo.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..b6afe20
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/dts/sun8i-h2-plus-nanopi-duo.dts
|
||||||
|
@@ -0,0 +1,98 @@
|
||||||
|
+/*
|
||||||
|
+ * adapted by <github.com/karabek>, based on
|
||||||
|
+ * Copyright (C) 2017 Jelle van der Waa <jelle@vdwaa.nl>
|
||||||
|
+ *
|
||||||
|
+ * This file is dual-licensed: you can use it either under the terms
|
||||||
|
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||||
|
+ * licensing only applies to this file, and not this project as a
|
||||||
|
+ * whole.
|
||||||
|
+ *
|
||||||
|
+ * a) This file is free software; you can redistribute it and/or
|
||||||
|
+ * modify it under the terms of the GNU General Public License as
|
||||||
|
+ * published by the Free Software Foundation; either version 2 of the
|
||||||
|
+ * License, or (at your option) any later version.
|
||||||
|
+ *
|
||||||
|
+ * This file is distributed in the hope that it will be useful,
|
||||||
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+ * GNU General Public License for more details.
|
||||||
|
+ *
|
||||||
|
+ * Or, alternatively,
|
||||||
|
+ *
|
||||||
|
+ * b) Permission is hereby granted, free of charge, to any person
|
||||||
|
+ * obtaining a copy of this software and associated documentation
|
||||||
|
+ * files (the "Software"), to deal in the Software without
|
||||||
|
+ * restriction, including without limitation the rights to use,
|
||||||
|
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
+ * sell copies of the Software, and to permit persons to whom the
|
||||||
|
+ * Software is furnished to do so, subject to the following
|
||||||
|
+ * conditions:
|
||||||
|
+ *
|
||||||
|
+ * The above copyright notice and this permission notice shall be
|
||||||
|
+ * included in all copies or substantial portions of the Software.
|
||||||
|
+ *
|
||||||
|
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+/dts-v1/;
|
||||||
|
+#include "sun8i-h3.dtsi"
|
||||||
|
+#include "sunxi-common-regulators.dtsi"
|
||||||
|
+
|
||||||
|
+#include <dt-bindings/gpio/gpio.h>
|
||||||
|
+#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ model = "FriendlyARM NanoPi DUO Air";
|
||||||
|
+ compatible = "friendlyarm,nanopi-duo-air", "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ aliases {
|
||||||
|
+ serial0 = &uart0;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ chosen {
|
||||||
|
+ stdout-path = "serial0:115200n8";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ leds {
|
||||||
|
+ compatible = "gpio-leds";
|
||||||
|
+
|
||||||
|
+ pwr {
|
||||||
|
+ label = "nanopi:green:pwr";
|
||||||
|
+ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
|
||||||
|
+ default-state = "on";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ status {
|
||||||
|
+ label = "nanopi:blue:status";
|
||||||
|
+ gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc0 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
|
||||||
|
+ vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ bus-width = <4>;
|
||||||
|
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
|
||||||
|
+ cd-inverted;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&uart0 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart0_pins_a>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&usbphy {
|
||||||
|
+ /* USB VBUS is always on */
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
|
@ -0,0 +1,171 @@
|
||||||
|
diff --git a/arch/arm/dts/sun50i-h5-nanopi-m1-plus2.dts b/arch/arm/dts/sun50i-h5-nanopi-m1-plus2.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..fdf2c87
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/dts/sun50i-h5-nanopi-m1-plus2.dts
|
||||||
|
@@ -0,0 +1,126 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (C) 2017 Antony Antony <antony@phenome.org>
|
||||||
|
+ * Copyright (c) 2016 ARM Ltd.
|
||||||
|
+ *
|
||||||
|
+ * 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 library is free software; you can redistribute it and/or
|
||||||
|
+ * modify it under the terms of the GNU General Public License as
|
||||||
|
+ * published by the Free Software Foundation; either version 2 of the
|
||||||
|
+ * License, or (at your option) any later version.
|
||||||
|
+ *
|
||||||
|
+ * This library is distributed in the hope that it will be useful,
|
||||||
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+ * GNU General Public License for more details.
|
||||||
|
+ *
|
||||||
|
+ * Or, alternatively,
|
||||||
|
+ *
|
||||||
|
+ * b) Permission is hereby granted, free of charge, to any person
|
||||||
|
+ * obtaining a copy of this software and associated documentation
|
||||||
|
+ * files (the "Software"), to deal in the Software without
|
||||||
|
+ * restriction, including without limitation the rights to use,
|
||||||
|
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
+ * sell copies of the Software, and to permit persons to whom the
|
||||||
|
+ * Software is furnished to do so, subject to the following
|
||||||
|
+ * conditions:
|
||||||
|
+ *
|
||||||
|
+ * The above copyright notice and this permission notice shall be
|
||||||
|
+ * included in all copies or substantial portions of the Software.
|
||||||
|
+ *
|
||||||
|
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+/dts-v1/;
|
||||||
|
+
|
||||||
|
+#include "sun50i-h5.dtsi"
|
||||||
|
+
|
||||||
|
+#include <dt-bindings/gpio/gpio.h>
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ model = "FriendlyARM Nanopi M1 Plus 2";
|
||||||
|
+ compatible = "friendlyarm,nanopi-m1-plus2", "allwinner,sun50i-h5";
|
||||||
|
+
|
||||||
|
+ aliases {
|
||||||
|
+ serial0 = &uart0;
|
||||||
|
+ ethernet0 = &emac;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ chosen {
|
||||||
|
+ stdout-path = "serial0:115200n8";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ memory {
|
||||||
|
+ reg = <0x40000000 0x40000000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ reg_vcc3v3: vcc3v3 {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "vcc3v3";
|
||||||
|
+ regulator-min-microvolt = <3300000>;
|
||||||
|
+ regulator-max-microvolt = <3300000>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ehci1 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&emac {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&emac_rgmii_pins>;
|
||||||
|
+ phy-mode = "rgmii";
|
||||||
|
+ phy = <&phy1>;
|
||||||
|
+ status = "okay";
|
||||||
|
+
|
||||||
|
+ phy1: ethernet-phy@1 {
|
||||||
|
+ reg = <1>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc0 {
|
||||||
|
+ compatible = "allwinner,sun50i-h5-mmc",
|
||||||
|
+ "allwinner,sun50i-a64-mmc",
|
||||||
|
+ "allwinner,sun5i-a13-mmc";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
|
||||||
|
+ vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ bus-width = <4>;
|
||||||
|
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ cd-inverted;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc2 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&mmc2_8bit_pins>;
|
||||||
|
+ vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ bus-width = <8>;
|
||||||
|
+ non-removable;
|
||||||
|
+ cap-mmc-hw-reset;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ohci1 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&uart0 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart0_pins_a>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&usbphy {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
diff --git a/configs/nanopi_m1_plus2_defconfig b/configs/nanopi_m1_plus2_defconfig
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..f710366
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/configs/nanopi_m1_plus2_defconfig
|
||||||
|
@@ -0,0 +1,21 @@
|
||||||
|
+CONFIG_ARM=y
|
||||||
|
+CONFIG_ARCH_SUNXI=y
|
||||||
|
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
||||||
|
+CONFIG_MACH_SUN50I_H5=y
|
||||||
|
+CONFIG_DRAM_CLK=576
|
||||||
|
+CONFIG_DRAM_ZQ=3881977
|
||||||
|
+CONFIG_MACPWR="PD6"
|
||||||
|
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||||
|
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-nanopi-m1-plus2"
|
||||||
|
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||||
|
+CONFIG_SPL=y
|
||||||
|
+# CONFIG_CMD_IMLS is not set
|
||||||
|
+# CONFIG_CMD_FLASH is not set
|
||||||
|
+# CONFIG_CMD_FPGA is not set
|
||||||
|
+# CONFIG_SPL_DOS_PARTITION is not set
|
||||||
|
+# CONFIG_SPL_ISO_PARTITION is not set
|
||||||
|
+# CONFIG_SPL_EFI_PARTITION is not set
|
||||||
|
+CONFIG_SPL_SPI_SUNXI=y
|
||||||
|
+CONFIG_SUN8I_EMAC=y
|
||||||
|
+CONFIG_USB_EHCI_HCD=y
|
||||||
|
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
|
||||||
|
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||||
|
index c9ace9f..d1bd78c
|
||||||
|
--- a/arch/arm/dts/Makefile
|
||||||
|
+++ b/arch/arm/dts/Makefile
|
||||||
|
@@ -332,6 +332,7 @@ dtb-$(CONFIG_MACH_SUN8I_V3S) += \
|
||||||
|
sun8i-v3s-licheepi-zero.dtb
|
||||||
|
dtb-$(CONFIG_MACH_SUN50I_H5) += \
|
||||||
|
sun50i-h5-nanopi-neo2.dtb \
|
||||||
|
+ sun50i-h5-nanopi-m1-plus2.dts \
|
||||||
|
sun50i-h5-orangepi-pc2.dtb \
|
||||||
|
sun50i-h5-orangepi-prime.dtb \
|
||||||
|
sun50i-h5-orangepi-zero-plus2.dtb
|
|
@ -0,0 +1,159 @@
|
||||||
|
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||||
|
index fee4680..295a675 100644
|
||||||
|
--- a/arch/arm/dts/Makefile
|
||||||
|
+++ b/arch/arm/dts/Makefile
|
||||||
|
@@ -333,7 +333,8 @@ dtb-$(CONFIG_MACH_SUN8I_V3S) += \
|
||||||
|
sun8i-v3s-licheepi-zero.dtb
|
||||||
|
dtb-$(CONFIG_MACH_SUN50I_H5) += \
|
||||||
|
sun50i-h5-nanopi-neo2.dtb \
|
||||||
|
sun50i-h5-nanopi-m1-plus2.dts \
|
||||||
|
+ sun50i-h5-nanopi-neo-plus2.dtb \
|
||||||
|
sun50i-h5-orangepi-pc2.dtb \
|
||||||
|
sun50i-h5-orangepi-prime.dtb \
|
||||||
|
sun50i-h5-orangepi-zero-plus2.dtb
|
||||||
|
diff --git a/configs/nanopi_neo_plus2_defconfig b/configs/nanopi_neo_plus2_defconfig
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..ff99213
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/configs/nanopi_neo_plus2_defconfig
|
||||||
|
@@ -0,0 +1,21 @@
|
||||||
|
+CONFIG_ARM=y
|
||||||
|
+CONFIG_ARCH_SUNXI=y
|
||||||
|
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
||||||
|
+CONFIG_MACH_SUN50I_H5=y
|
||||||
|
+CONFIG_DRAM_CLK=624
|
||||||
|
+CONFIG_DRAM_ZQ=3881977
|
||||||
|
+CONFIG_MACPWR="PD6"
|
||||||
|
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-nanopi-neo-plus2"
|
||||||
|
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||||
|
+CONFIG_SPL=y
|
||||||
|
+# CONFIG_CMD_IMLS is not set
|
||||||
|
+# CONFIG_CMD_FLASH is not set
|
||||||
|
+# CONFIG_CMD_FPGA is not set
|
||||||
|
+# CONFIG_SPL_DOS_PARTITION is not set
|
||||||
|
+# CONFIG_SPL_ISO_PARTITION is not set
|
||||||
|
+# CONFIG_SPL_EFI_PARTITION is not set
|
||||||
|
+CONFIG_SPL_SPI_SUNXI=y
|
||||||
|
+CONFIG_SUN8I_EMAC=y
|
||||||
|
+CONFIG_USB_EHCI_HCD=y
|
||||||
|
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||||
|
+CONFIG_SD_BOOT=y
|
||||||
|
diff --git a/arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dts b/arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..7d12774
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dts
|
||||||
|
@@ -0,0 +1,113 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (C) 2017 Antony Antony <antony@phenome.org>
|
||||||
|
+ * Copyright (c) 2016 ARM Ltd.
|
||||||
|
+ *
|
||||||
|
+ * 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 library is free software; you can redistribute it and/or
|
||||||
|
+ * modify it under the terms of the GNU General Public License as
|
||||||
|
+ * published by the Free Software Foundation; either version 2 of the
|
||||||
|
+ * License, or (at your option) any later version.
|
||||||
|
+ *
|
||||||
|
+ * This library is distributed in the hope that it will be useful,
|
||||||
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+ * GNU General Public License for more details.
|
||||||
|
+ *
|
||||||
|
+ * Or, alternatively,
|
||||||
|
+ *
|
||||||
|
+ * b) Permission is hereby granted, free of charge, to any person
|
||||||
|
+ * obtaining a copy of this software and associated documentation
|
||||||
|
+ * files (the "Software"), to deal in the Software without
|
||||||
|
+ * restriction, including without limitation the rights to use,
|
||||||
|
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
+ * sell copies of the Software, and to permit persons to whom the
|
||||||
|
+ * Software is furnished to do so, subject to the following
|
||||||
|
+ * conditions:
|
||||||
|
+ *
|
||||||
|
+ * The above copyright notice and this permission notice shall be
|
||||||
|
+ * included in all copies or substantial portions of the Software.
|
||||||
|
+ *
|
||||||
|
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+/dts-v1/;
|
||||||
|
+
|
||||||
|
+#include "sun50i-h5.dtsi"
|
||||||
|
+
|
||||||
|
+#include <dt-bindings/gpio/gpio.h>
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ model = "FriendlyARM NanoPi NEO Plus 2";
|
||||||
|
+ compatible = "friendlyarm,nanopi-neo-plus2", "allwinner,sun50i-h5";
|
||||||
|
+
|
||||||
|
+ aliases {
|
||||||
|
+ serial0 = &uart0;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ chosen {
|
||||||
|
+ stdout-path = "serial0:115200n8";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ memory {
|
||||||
|
+ reg = <0x40000000 0x40000000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ reg_vcc3v3: vcc3v3 {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "vcc3v3";
|
||||||
|
+ regulator-min-microvolt = <3300000>;
|
||||||
|
+ regulator-max-microvolt = <3300000>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ehci1 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc0 {
|
||||||
|
+ compatible = "allwinner,sun50i-h5-mmc",
|
||||||
|
+ "allwinner,sun50i-a64-mmc",
|
||||||
|
+ "allwinner,sun5i-a13-mmc";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
|
||||||
|
+ vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ bus-width = <4>;
|
||||||
|
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ cd-inverted;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc2 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&mmc2_8bit_pins>;
|
||||||
|
+ vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ bus-width = <8>;
|
||||||
|
+ non-removable;
|
||||||
|
+ cap-mmc-hw-reset;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ohci1 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&uart0 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart0_pins_a>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&usbphy {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
|
@ -0,0 +1,9 @@
|
||||||
|
diff --git a/configs/orangepi_2_defconfig b/configs/orangepi_2_defconfig
|
||||||
|
index 7c9cc454c3..2642239c6a 100644
|
||||||
|
--- a/configs/orangepi_2_defconfig
|
||||||
|
+++ b/configs/orangepi_2_defconfig
|
||||||
|
@@ -20,3 +20,4 @@ CONFIG_SUN8I_EMAC=y
|
||||||
|
CONFIG_SY8106A_POWER=y
|
||||||
|
CONFIG_USB_EHCI_HCD=y
|
||||||
|
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
|
||||||
|
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
|
@ -0,0 +1,158 @@
|
||||||
|
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||||
|
index fee4680..295a675 100644
|
||||||
|
--- a/arch/arm/dts/Makefile
|
||||||
|
+++ b/arch/arm/dts/Makefile
|
||||||
|
@@ -333,6 +333,7 @@ dtb-$(CONFIG_MACH_SUN8I_V3S) += \
|
||||||
|
sun8i-v3s-licheepi-zero.dtb
|
||||||
|
dtb-$(CONFIG_MACH_SUN50I_H5) += \
|
||||||
|
sun50i-h5-nanopi-neo2.dtb \
|
||||||
|
+ sun50i-h5-orangepi-zero-plus.dtb \
|
||||||
|
sun50i-h5-nanopi-m1-plus2.dts \
|
||||||
|
sun50i-h5-nanopi-neo-plus2.dtb \
|
||||||
|
sun50i-h5-orangepi-pc2.dtb \
|
||||||
|
diff --git a/configs/orangepizero_plus_defconfig b/configs/orangepizero_plus_defconfig
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..ff99213
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/configs/orangepizero_plus_defconfig
|
||||||
|
@@ -0,0 +1,21 @@
|
||||||
|
+CONFIG_ARM=y
|
||||||
|
+CONFIG_ARCH_SUNXI=y
|
||||||
|
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
||||||
|
+CONFIG_MACH_SUN50I_H5=y
|
||||||
|
+CONFIG_DRAM_CLK=624
|
||||||
|
+CONFIG_DRAM_ZQ=3881977
|
||||||
|
+CONFIG_MACPWR="PD6"
|
||||||
|
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-zero-plus"
|
||||||
|
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||||
|
+CONFIG_SPL=y
|
||||||
|
+# CONFIG_CMD_IMLS is not set
|
||||||
|
+# CONFIG_CMD_FLASH is not set
|
||||||
|
+# CONFIG_CMD_FPGA is not set
|
||||||
|
+# CONFIG_SPL_DOS_PARTITION is not set
|
||||||
|
+# CONFIG_SPL_ISO_PARTITION is not set
|
||||||
|
+# CONFIG_SPL_EFI_PARTITION is not set
|
||||||
|
+CONFIG_SPL_SPI_SUNXI=y
|
||||||
|
+CONFIG_SUN8I_EMAC=y
|
||||||
|
+CONFIG_USB_EHCI_HCD=y
|
||||||
|
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||||
|
+CONFIG_SD_BOOT=y
|
||||||
|
diff --git a/arch/arm/dts/sun50i-h5-orangepi-zero-plus.dts b/arch/arm/dts/sun50i-h5-orangepi-zero-plus.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..7d12774
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/dts/sun50i-h5-orangepi-zero-plus.dts
|
||||||
|
@@ -0,0 +1,113 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (C) 2017 Antony Antony <antony@phenome.org>
|
||||||
|
+ * Copyright (c) 2016 ARM Ltd.
|
||||||
|
+ *
|
||||||
|
+ * 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 library is free software; you can redistribute it and/or
|
||||||
|
+ * modify it under the terms of the GNU General Public License as
|
||||||
|
+ * published by the Free Software Foundation; either version 2 of the
|
||||||
|
+ * License, or (at your option) any later version.
|
||||||
|
+ *
|
||||||
|
+ * This library is distributed in the hope that it will be useful,
|
||||||
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+ * GNU General Public License for more details.
|
||||||
|
+ *
|
||||||
|
+ * Or, alternatively,
|
||||||
|
+ *
|
||||||
|
+ * b) Permission is hereby granted, free of charge, to any person
|
||||||
|
+ * obtaining a copy of this software and associated documentation
|
||||||
|
+ * files (the "Software"), to deal in the Software without
|
||||||
|
+ * restriction, including without limitation the rights to use,
|
||||||
|
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
+ * sell copies of the Software, and to permit persons to whom the
|
||||||
|
+ * Software is furnished to do so, subject to the following
|
||||||
|
+ * conditions:
|
||||||
|
+ *
|
||||||
|
+ * The above copyright notice and this permission notice shall be
|
||||||
|
+ * included in all copies or substantial portions of the Software.
|
||||||
|
+ *
|
||||||
|
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+/dts-v1/;
|
||||||
|
+
|
||||||
|
+#include "sun50i-h5.dtsi"
|
||||||
|
+
|
||||||
|
+#include <dt-bindings/gpio/gpio.h>
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ model = "Xunlong Orange Pi Zero Plus";
|
||||||
|
+ compatible = "xunlong,orangepizero-zero-plus", "allwinner,sun50i-h5";
|
||||||
|
+
|
||||||
|
+ aliases {
|
||||||
|
+ serial0 = &uart0;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ chosen {
|
||||||
|
+ stdout-path = "serial0:115200n8";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ memory {
|
||||||
|
+ reg = <0x40000000 0x40000000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ reg_vcc3v3: vcc3v3 {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "vcc3v3";
|
||||||
|
+ regulator-min-microvolt = <3300000>;
|
||||||
|
+ regulator-max-microvolt = <3300000>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ehci1 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc0 {
|
||||||
|
+ compatible = "allwinner,sun50i-h5-mmc",
|
||||||
|
+ "allwinner,sun50i-a64-mmc",
|
||||||
|
+ "allwinner,sun5i-a13-mmc";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
|
||||||
|
+ vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ bus-width = <4>;
|
||||||
|
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ cd-inverted;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc2 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&mmc2_8bit_pins>;
|
||||||
|
+ vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ bus-width = <8>;
|
||||||
|
+ non-removable;
|
||||||
|
+ cap-mmc-hw-reset;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ohci1 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&uart0 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart0_pins_a>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&usbphy {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
|
@ -0,0 +1,218 @@
|
||||||
|
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||||
|
index 9cc5c1e0aa..a3ef6854c2 100644
|
||||||
|
--- a/arch/arm/dts/Makefile
|
||||||
|
+++ b/arch/arm/dts/Makefile
|
||||||
|
@@ -318,6 +318,7 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \
|
||||||
|
sun8i-h3-orangepi-pc-plus.dtb \
|
||||||
|
sun8i-h3-orangepi-plus.dtb \
|
||||||
|
sun8i-h3-orangepi-plus2e.dtb \
|
||||||
|
+ sun8i-h3-orangepi-zeroplus2.dtb \
|
||||||
|
sun8i-h3-nanopi-m1.dtb \
|
||||||
|
sun8i-h3-nanopi-m1-plus.dtb \
|
||||||
|
sun8i-h3-nanopi-neo.dtb \
|
||||||
|
diff --git a/arch/arm/dts/sun8i-h3-orangepi-zeroplus2.dts b/arch/arm/dts/sun8i-h3-orangepi-zeroplus2.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..b03e3a51a2
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/dts/sun8i-h3-orangepi-zeroplus2.dts
|
||||||
|
@@ -0,0 +1,175 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz>
|
||||||
|
+ *
|
||||||
|
+ * Based on sun8i-h3-orangepi-one.dts, which is:
|
||||||
|
+ * Copyright (C) 2016 Hans de Goede <hdegoede@redhat.com>
|
||||||
|
+ *
|
||||||
|
+ * This file is dual-licensed: you can use it either under the terms
|
||||||
|
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||||
|
+ * licensing only applies to this file, and not this project as a
|
||||||
|
+ * whole.
|
||||||
|
+ *
|
||||||
|
+ * a) This file is free software; you can redistribute it and/or
|
||||||
|
+ * modify it under the terms of the GNU General Public License as
|
||||||
|
+ * published by the Free Software Foundation; either version 2 of the
|
||||||
|
+ * License, or (at your option) any later version.
|
||||||
|
+ *
|
||||||
|
+ * This file is distributed in the hope that it will be useful,
|
||||||
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+ * GNU General Public License for more details.
|
||||||
|
+ *
|
||||||
|
+ * Or, alternatively,
|
||||||
|
+ *
|
||||||
|
+ * b) Permission is hereby granted, free of charge, to any person
|
||||||
|
+ * obtaining a copy of this software and associated documentation
|
||||||
|
+ * files (the "Software"), to deal in the Software without
|
||||||
|
+ * restriction, including without limitation the rights to use,
|
||||||
|
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
+ * sell copies of the Software, and to permit persons to whom the
|
||||||
|
+ * Software is furnished to do so, subject to the following
|
||||||
|
+ * conditions:
|
||||||
|
+ *
|
||||||
|
+ * The above copyright notice and this permission notice shall be
|
||||||
|
+ * included in all copies or substantial portions of the Software.
|
||||||
|
+ *
|
||||||
|
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+/dts-v1/;
|
||||||
|
+#include "sun8i-h3.dtsi"
|
||||||
|
+#include "sunxi-common-regulators.dtsi"
|
||||||
|
+
|
||||||
|
+#include <dt-bindings/gpio/gpio.h>
|
||||||
|
+#include <dt-bindings/input/input.h>
|
||||||
|
+#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ model = "Xunlong Orange Pi Zero Plus 2";
|
||||||
|
+ compatible = "xunlong,orangepi-zeroplus", "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ aliases {
|
||||||
|
+ serial0 = &uart0;
|
||||||
|
+ /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
|
||||||
|
+ ethernet1 = &brcmf;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ chosen {
|
||||||
|
+ stdout-path = "serial0:115200n8";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ leds {
|
||||||
|
+ compatible = "gpio-leds";
|
||||||
|
+
|
||||||
|
+ pwr_led {
|
||||||
|
+ label = "orangepi:green:pwr";
|
||||||
|
+ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ default-state = "on";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ status_led {
|
||||||
|
+ label = "orangepi:red:status";
|
||||||
|
+ gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ wifi_pwrseq: wifi_pwrseq {
|
||||||
|
+ compatible = "mmc-pwrseq-simple";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>;
|
||||||
|
+ post-power-on-delay-ms = <50>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ehci1 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ehci2 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ehci3 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&emac {
|
||||||
|
+ phy = <&phy1>;
|
||||||
|
+ phy-mode = "mii";
|
||||||
|
+ allwinner,use-internal-phy;
|
||||||
|
+ allwinner,leds-active-low;
|
||||||
|
+ status = "okay";
|
||||||
|
+ phy1: ethernet-phy@1 {
|
||||||
|
+ reg = <1>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc0 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&mmc0_pins_a>;
|
||||||
|
+ vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ bus-width = <4>;
|
||||||
|
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
|
||||||
|
+ cd-inverted;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc1 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&mmc1_pins_a>;
|
||||||
|
+ vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ vqmmc-supply = <®_vcc3v3>;
|
||||||
|
+ mmc-pwrseq = <&wifi_pwrseq>;
|
||||||
|
+ bus-width = <4>;
|
||||||
|
+ non-removable;
|
||||||
|
+ status = "okay";
|
||||||
|
+
|
||||||
|
+ brcmf: bcrmf@1 {
|
||||||
|
+ reg = <1>;
|
||||||
|
+ compatible = "brcm,bcm4329-fmac";
|
||||||
|
+ interrupt-parent = <&r_pio>;
|
||||||
|
+ interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 / EINT7 */
|
||||||
|
+ interrupt-names = "host-wake";
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc2 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&mmc2_8bit_pins>;
|
||||||
|
+ vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ bus-width = <8>;
|
||||||
|
+ non-removable;
|
||||||
|
+ cap-mmc-hw-reset;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ohci1 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ohci2 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ohci3 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&uart0 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart0_pins_a>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&usbphy {
|
||||||
|
+ /* USB VBUS is always on */
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
diff --git a/configs/orangepi_zero_plus2_h3_defconfig b/configs/orangepi_zero_plus2_h3_defconfig
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..9257b7c1ed
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/configs/orangepi_zero_plus2_h3_defconfig
|
||||||
|
@@ -0,0 +1,19 @@
|
||||||
|
+CONFIG_ARM=y
|
||||||
|
+CONFIG_ARCH_SUNXI=y
|
||||||
|
+CONFIG_MACH_SUN8I_H3=y
|
||||||
|
+CONFIG_DRAM_CLK=408
|
||||||
|
+CONFIG_DRAM_ZQ=3881979
|
||||||
|
+CONFIG_DRAM_ODT_EN=y
|
||||||
|
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-zeroplus2"
|
||||||
|
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||||
|
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||||
|
+CONFIG_SPL=y
|
||||||
|
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
||||||
|
+CONFIG_SPL_SPI_SUNXI=y
|
||||||
|
+# CONFIG_CMD_IMLS is not set
|
||||||
|
+# CONFIG_CMD_FLASH is not set
|
||||||
|
+# CONFIG_CMD_FPGA is not set
|
||||||
|
+# CONFIG_SPL_DOS_PARTITION is not set
|
||||||
|
+# CONFIG_SPL_ISO_PARTITION is not set
|
||||||
|
+# CONFIG_SPL_EFI_PARTITION is not set
|
||||||
|
+CONFIG_USB_EHCI_HCD=y
|
|
@ -0,0 +1,248 @@
|
||||||
|
diff --git a/configs/Bananapi_defconfig b/configs/Bananapi_defconfig
|
||||||
|
index fe75eef513..74bcfc64af 100644
|
||||||
|
--- a/configs/Bananapi_defconfig
|
||||||
|
+++ b/configs/Bananapi_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN7I=y
|
||||||
|
-CONFIG_DRAM_CLK=432
|
||||||
|
+CONFIG_DRAM_CLK=384
|
||||||
|
CONFIG_MACPWR="PH23"
|
||||||
|
CONFIG_VIDEO_COMPOSITE=y
|
||||||
|
CONFIG_GMAC_TX_DELAY=3
|
||||||
|
diff --git a/configs/Bananapro_defconfig b/configs/Bananapro_defconfig
|
||||||
|
index df65922e83..80a45fde6f 100644
|
||||||
|
--- a/configs/Bananapro_defconfig
|
||||||
|
+++ b/configs/Bananapro_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN7I=y
|
||||||
|
-CONFIG_DRAM_CLK=432
|
||||||
|
+CONFIG_DRAM_CLK=384
|
||||||
|
CONFIG_MACPWR="PH23"
|
||||||
|
CONFIG_USB1_VBUS_PIN="PH0"
|
||||||
|
CONFIG_USB2_VBUS_PIN="PH1"
|
||||||
|
diff --git a/configs/Cubieboard2_defconfig b/configs/Cubieboard2_defconfig
|
||||||
|
index 02c503f672..cf9c16351d 100644
|
||||||
|
--- a/configs/Cubieboard2_defconfig
|
||||||
|
+++ b/configs/Cubieboard2_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN7I=y
|
||||||
|
-CONFIG_DRAM_CLK=480
|
||||||
|
+CONFIG_DRAM_CLK=432
|
||||||
|
CONFIG_MMC0_CD_PIN="PH1"
|
||||||
|
CONFIG_SATAPWR="PB8"
|
||||||
|
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-cubieboard2"
|
||||||
|
diff --git a/configs/Cubieboard_defconfig b/configs/Cubieboard_defconfig
|
||||||
|
index a8e9c988d5..9d892d6343 100644
|
||||||
|
--- a/configs/Cubieboard_defconfig
|
||||||
|
+++ b/configs/Cubieboard_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN4I=y
|
||||||
|
-CONFIG_DRAM_CLK=480
|
||||||
|
+CONFIG_DRAM_CLK=432
|
||||||
|
CONFIG_MMC0_CD_PIN="PH1"
|
||||||
|
CONFIG_SATAPWR="PB8"
|
||||||
|
CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-cubieboard"
|
||||||
|
diff --git a/configs/Cubietruck_defconfig b/configs/Cubietruck_defconfig
|
||||||
|
index f9d56c8f9d..5d42b59e57 100644
|
||||||
|
--- a/configs/Cubietruck_defconfig
|
||||||
|
+++ b/configs/Cubietruck_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN7I=y
|
||||||
|
-CONFIG_DRAM_CLK=432
|
||||||
|
+CONFIG_DRAM_CLK=384
|
||||||
|
CONFIG_MMC0_CD_PIN="PH1"
|
||||||
|
CONFIG_USB0_VBUS_PIN="PH17"
|
||||||
|
CONFIG_USB0_VBUS_DET="PH22"
|
||||||
|
diff --git a/configs/Lamobo_R1_defconfig b/configs/Lamobo_R1_defconfig
|
||||||
|
index cc29d606a9..dbbdfcc529 100644
|
||||||
|
--- a/configs/Lamobo_R1_defconfig
|
||||||
|
+++ b/configs/Lamobo_R1_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN7I=y
|
||||||
|
-CONFIG_DRAM_CLK=432
|
||||||
|
+CONFIG_DRAM_CLK=384
|
||||||
|
CONFIG_MACPWR="PH23"
|
||||||
|
CONFIG_MMC0_CD_PIN="PH10"
|
||||||
|
CONFIG_SATAPWR="PB3"
|
||||||
|
diff --git a/configs/Linksprite_pcDuino3_defconfig b/configs/Linksprite_pcDuino3_defconfig
|
||||||
|
index b9f89a013e..6a42c4b500 100644
|
||||||
|
--- a/configs/Linksprite_pcDuino3_defconfig
|
||||||
|
+++ b/configs/Linksprite_pcDuino3_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN7I=y
|
||||||
|
-CONFIG_DRAM_CLK=480
|
||||||
|
+CONFIG_DRAM_CLK=408
|
||||||
|
CONFIG_DRAM_ZQ=122
|
||||||
|
CONFIG_SATAPWR="PH2"
|
||||||
|
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-pcduino3"
|
||||||
|
diff --git a/configs/nanopi_m1_plus_defconfig b/configs/nanopi_m1_plus_defconfig
|
||||||
|
index abe93f6..1fc2e53 100644
|
||||||
|
--- a/configs/nanopi_m1_plus_defconfig
|
||||||
|
+++ b/configs/nanopi_m1_plus_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN8I_H3=y
|
||||||
|
-CONFIG_DRAM_CLK=408
|
||||||
|
+CONFIG_DRAM_CLK=576
|
||||||
|
CONFIG_DRAM_ZQ=3881979
|
||||||
|
CONFIG_DRAM_ODT_EN=y
|
||||||
|
CONFIG_MMC0_CD_PIN="PH13"
|
||||||
|
diff --git a/configs/nanopi_neo2_defconfig b/configs/nanopi_neo2_defconfig
|
||||||
|
index c7db07a..38b6646 100644
|
||||||
|
--- a/configs/nanopi_neo2_defconfig
|
||||||
|
+++ b/configs/nanopi_neo2_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN50I_H5=y
|
||||||
|
-CONFIG_DRAM_CLK=672
|
||||||
|
+CONFIG_DRAM_CLK=624
|
||||||
|
CONFIG_DRAM_ZQ=3881977
|
||||||
|
CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-nanopi-neo2"
|
||||||
|
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||||
|
diff --git a/configs/Orangepi_defconfig b/configs/Orangepi_defconfig
|
||||||
|
index b8c1ea4d7c..b4b20372aa 100644
|
||||||
|
--- a/configs/Orangepi_defconfig
|
||||||
|
+++ b/configs/Orangepi_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN7I=y
|
||||||
|
-CONFIG_DRAM_CLK=432
|
||||||
|
+CONFIG_DRAM_CLK=384
|
||||||
|
CONFIG_MACPWR="PH23"
|
||||||
|
CONFIG_USB1_VBUS_PIN="PH26"
|
||||||
|
CONFIG_USB2_VBUS_PIN="PH22"
|
||||||
|
diff --git a/configs/orangepi_lite_defconfig b/configs/orangepi_lite_defconfig
|
||||||
|
index a72d506..2c49525 100644
|
||||||
|
--- a/configs/orangepi_lite_defconfig
|
||||||
|
+++ b/configs/orangepi_lite_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN8I_H3=y
|
||||||
|
-CONFIG_DRAM_CLK=672
|
||||||
|
+CONFIG_DRAM_CLK=624
|
||||||
|
CONFIG_DRAM_ZQ=3881979
|
||||||
|
CONFIG_DRAM_ODT_EN=y
|
||||||
|
CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-lite"
|
||||||
|
diff --git a/configs/Orangepi_mini_defconfig b/configs/Orangepi_mini_defconfig
|
||||||
|
index 19c35ef103..80404ab377 100644
|
||||||
|
--- a/configs/Orangepi_mini_defconfig
|
||||||
|
+++ b/configs/Orangepi_mini_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN7I=y
|
||||||
|
-CONFIG_DRAM_CLK=432
|
||||||
|
+CONFIG_DRAM_CLK=384
|
||||||
|
CONFIG_MACPWR="PH23"
|
||||||
|
CONFIG_MMC0_CD_PIN="PH10"
|
||||||
|
CONFIG_MMC3_CD_PIN="PH11"
|
||||||
|
diff --git a/configs/orangepi_one_defconfig b/configs/orangepi_one_defconfig
|
||||||
|
index 5a7aba1..3ba4009 100644
|
||||||
|
--- a/configs/orangepi_one_defconfig
|
||||||
|
+++ b/configs/orangepi_one_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN8I_H3=y
|
||||||
|
-CONFIG_DRAM_CLK=672
|
||||||
|
+CONFIG_DRAM_CLK=624
|
||||||
|
CONFIG_DRAM_ZQ=3881979
|
||||||
|
CONFIG_DRAM_ODT_EN=y
|
||||||
|
CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-one"
|
||||||
|
diff --git a/configs/orangepi_pc2_defconfig b/configs/orangepi_pc2_defconfig
|
||||||
|
index 61b2d98705..e4771dce7d 100644
|
||||||
|
--- a/configs/orangepi_pc2_defconfig
|
||||||
|
+++ b/configs/orangepi_pc2_defconfig
|
||||||
|
@@ -2,7 +2,7 @@ CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
||||||
|
CONFIG_MACH_SUN50I_H5=y
|
||||||
|
-CONFIG_DRAM_CLK=672
|
||||||
|
+CONFIG_DRAM_CLK=624
|
||||||
|
CONFIG_DRAM_ZQ=3881977
|
||||||
|
CONFIG_MACPWR="PD6"
|
||||||
|
CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-pc2"
|
||||||
|
diff --git a/configs/orangepi_plus2e_defconfig b/configs/orangepi_plus2e_defconfig
|
||||||
|
index 2374f1d..579bc70 100644
|
||||||
|
--- a/configs/orangepi_plus2e_defconfig
|
||||||
|
+++ b/configs/orangepi_plus2e_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN8I_H3=y
|
||||||
|
-CONFIG_DRAM_CLK=672
|
||||||
|
+CONFIG_DRAM_CLK=624
|
||||||
|
CONFIG_DRAM_ZQ=3881979
|
||||||
|
CONFIG_DRAM_ODT_EN=y
|
||||||
|
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||||
|
diff --git a/configs/orangepi_plus_defconfig b/configs/orangepi_plus_defconfig
|
||||||
|
index f2ed941..e8219bb 100644
|
||||||
|
--- a/configs/orangepi_plus_defconfig
|
||||||
|
+++ b/configs/orangepi_plus_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN8I_H3=y
|
||||||
|
-CONFIG_DRAM_CLK=672
|
||||||
|
+CONFIG_DRAM_CLK=624
|
||||||
|
CONFIG_DRAM_ZQ=3881979
|
||||||
|
CONFIG_DRAM_ODT_EN=y
|
||||||
|
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||||
|
diff --git a/configs/orangepi_prime_defconfig b/configs/orangepi_prime_defconfig
|
||||||
|
index 103936d772..990cf2a8c0 100644
|
||||||
|
--- a/configs/orangepi_prime_defconfig
|
||||||
|
+++ b/configs/orangepi_prime_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN50I_H5=y
|
||||||
|
-CONFIG_DRAM_CLK=672
|
||||||
|
+CONFIG_DRAM_CLK=624
|
||||||
|
CONFIG_DRAM_ZQ=3881977
|
||||||
|
CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-prime"
|
||||||
|
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||||
|
diff --git a/configs/orangepi_zero_defconfig b/configs/orangepi_zero_defconfig
|
||||||
|
index ac44937..0e761b6 100644
|
||||||
|
--- a/configs/orangepi_zero_defconfig
|
||||||
|
+++ b/configs/orangepi_zero_defconfig
|
||||||
|
@@ -2,7 +2,7 @@ CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
||||||
|
CONFIG_MACH_SUN8I_H3=y
|
||||||
|
-CONFIG_DRAM_CLK=624
|
||||||
|
+CONFIG_DRAM_CLK=408
|
||||||
|
CONFIG_DRAM_ZQ=3881979
|
||||||
|
CONFIG_DRAM_ODT_EN=y
|
||||||
|
# CONFIG_VIDEO_DE2 is not set
|
||||||
|
diff --git a/configs/orangepi_zero_plus2_defconfig b/configs/orangepi_zero_plus2_defconfig
|
||||||
|
index 57c63b962a..ec9e5c73b1 100644
|
||||||
|
--- a/configs/orangepi_zero_plus2_defconfig
|
||||||
|
+++ b/configs/orangepi_zero_plus2_defconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_MACH_SUN50I_H5=y
|
||||||
|
-CONFIG_DRAM_CLK=672
|
||||||
|
+CONFIG_DRAM_CLK=624
|
||||||
|
CONFIG_DRAM_ZQ=3881977
|
||||||
|
CONFIG_MMC0_CD_PIN="PH13"
|
||||||
|
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
diff --git a/configs/nanopi_neo_defconfig b/configs/nanopi_neo_defconfig
|
||||||
|
index 89f5687884..2cbceb54f1 100644
|
||||||
|
--- a/configs/nanopi_neo_defconfig
|
||||||
|
+++ b/configs/nanopi_neo_defconfig
|
||||||
|
@@ -8,6 +8,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-neo"
|
||||||
|
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||||
|
CONFIG_CONSOLE_MUX=y
|
||||||
|
CONFIG_SPL=y
|
||||||
|
+CONFIG_SYS_CLK_FREQ=480000000
|
||||||
|
# CONFIG_CMD_IMLS is not set
|
||||||
|
# CONFIG_CMD_FLASH is not set
|
||||||
|
# CONFIG_CMD_FPGA is not set
|
|
@ -0,0 +1,12 @@
|
||||||
|
diff --git a/configs/orangepi_zero_defconfig b/configs/orangepi_zero_defconfig
|
||||||
|
index ac44937b16..e27d8b6f73 100644
|
||||||
|
--- a/configs/orangepi_zero_defconfig
|
||||||
|
+++ b/configs/orangepi_zero_defconfig
|
||||||
|
@@ -9,6 +9,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-orangepi-zero"
|
||||||
|
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||||
|
CONFIG_CONSOLE_MUX=y
|
||||||
|
CONFIG_SPL=y
|
||||||
|
+CONFIG_SYS_CLK_FREQ=480000000
|
||||||
|
# CONFIG_CMD_IMLS is not set
|
||||||
|
# CONFIG_CMD_FLASH is not set
|
||||||
|
# CONFIG_CMD_FPGA is not set
|
|
@ -0,0 +1,7 @@
|
||||||
|
verbosity=1
|
||||||
|
console=serial
|
||||||
|
overlay_prefix=sun8i-h3
|
||||||
|
rootfstype=ext4
|
||||||
|
overlays=uart1 i2c0 spi-spidev analog-codec usbhost1 usbhost2
|
||||||
|
param_uart1_rtscts=1
|
||||||
|
param_spidev_spi_bus=0
|
|
@ -0,0 +1,74 @@
|
||||||
|
# DO NOT EDIT THIS FILE
|
||||||
|
#
|
||||||
|
# Please edit /boot/armbianEnv.txt to set supported parameters
|
||||||
|
#
|
||||||
|
|
||||||
|
setenv load_addr "0x44000000"
|
||||||
|
setenv overlay_error "false"
|
||||||
|
# default values
|
||||||
|
setenv verbosity "1"
|
||||||
|
setenv console "both"
|
||||||
|
setenv disp_mem_reserves "off"
|
||||||
|
setenv disp_mode "1920x1080p60"
|
||||||
|
setenv rootfstype "ext4"
|
||||||
|
setenv docker_optimizations "on"
|
||||||
|
|
||||||
|
# Print boot source
|
||||||
|
itest.b *0x28 == 0x00 && echo "U-boot loaded from SD" && setenv rootdev "/dev/mmcblk0p2"
|
||||||
|
itest.b *0x28 == 0x02 && echo "U-boot loaded from eMMC or secondary SD" && setenv rootdev "/dev/mmcblk2p2"
|
||||||
|
itest.b *0x28 == 0x03 && echo "U-boot loaded from SPI"
|
||||||
|
|
||||||
|
echo "Boot script loaded from ${devtype}"
|
||||||
|
|
||||||
|
if test -e ${devtype} 0 ${prefix}armbianEnv.txt; then
|
||||||
|
load ${devtype} 0 ${load_addr} ${prefix}armbianEnv.txt
|
||||||
|
env import -t ${load_addr} ${filesize}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "${logo}" = "disabled"; then setenv logo "logo.nologo"; fi
|
||||||
|
|
||||||
|
if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi
|
||||||
|
if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "${consoleargs} console=ttyS0,115200"; fi
|
||||||
|
|
||||||
|
# get PARTUUID of first partition on SD/eMMC it was loaded from
|
||||||
|
# mmc 0 is always mapped to device u-boot (2016.09+) was loaded from
|
||||||
|
if test "${devtype}" = "mmc"; then part uuid mmc 0:1 partuuid; fi
|
||||||
|
|
||||||
|
setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} hdmi.audio=EDID:0 disp.screen0_output_mode=${disp_mode} panic=10 consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} ubootsource=${devtype} ${extraargs} ${extraboardargs}"
|
||||||
|
|
||||||
|
if test "${disp_mem_reserves}" = "off"; then setenv bootargs "${bootargs} sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16"; fi
|
||||||
|
if test "${docker_optimizations}" = "on"; then setenv bootargs "${bootargs} cgroup_enable=memory swapaccount=1"; fi
|
||||||
|
|
||||||
|
echo "Found mainline kernel configuration"
|
||||||
|
load ${devtype} 0 ${fdt_addr_r} ${prefix}dtb/${fdtfile}
|
||||||
|
fdt addr ${fdt_addr_r}
|
||||||
|
fdt resize 65536
|
||||||
|
for overlay_file in ${overlays}; do
|
||||||
|
if load ${devtype} 0 ${load_addr} ${prefix}dtb/overlay/${overlay_prefix}-${overlay_file}.dtbo; then
|
||||||
|
echo "Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo"
|
||||||
|
fdt apply ${load_addr} || setenv overlay_error "true"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
for overlay_file in ${user_overlays}; do
|
||||||
|
if load ${devtype} 0 ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then
|
||||||
|
echo "Applying user provided DT overlay ${overlay_file}.dtbo"
|
||||||
|
fdt apply ${load_addr} || setenv overlay_error "true"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test "${overlay_error}" = "true"; then
|
||||||
|
echo "Error applying DT overlays, restoring original DT"
|
||||||
|
load ${devtype} 0 ${fdt_addr_r} ${prefix}dtb/${fdtfile}
|
||||||
|
else
|
||||||
|
if load ${devtype} 0 ${load_addr} ${prefix}dtb/overlay/${overlay_prefix}-fixup.scr; then
|
||||||
|
echo "Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)"
|
||||||
|
source ${load_addr}
|
||||||
|
fi
|
||||||
|
if test -e ${devtype} 0 ${prefix}fixup.scr; then
|
||||||
|
load ${devtype} 0 ${load_addr} ${prefix}fixup.scr
|
||||||
|
echo "Applying user provided fixup script (fixup.scr)"
|
||||||
|
source ${load_addr}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
load ${devtype} 0 ${kernel_addr_r} ${prefix}uImage
|
||||||
|
bootm ${kernel_addr_r} - ${fdt_addr_r}
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
|
||||||
|
index 0ed36cded..822ebb812 100644
|
||||||
|
--- a/arch/arm/Kconfig
|
||||||
|
+++ b/arch/arm/Kconfig
|
||||||
|
@@ -578,6 +578,8 @@ config ARCH_SUNXI
|
||||||
|
select CMD_GPIO
|
||||||
|
select CMD_MMC if MMC
|
||||||
|
select CMD_USB if DISTRO_DEFAULTS
|
||||||
|
+ select OF_LIBFDT
|
||||||
|
+ select OF_LIBFDT_OVERLAY
|
||||||
|
select DM
|
||||||
|
select DM_ETH
|
||||||
|
select DM_GPIO
|
|
@ -0,0 +1,34 @@
|
||||||
|
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
|
||||||
|
index 53eae8953e..1e931a0eb0 100644
|
||||||
|
--- a/arch/arm/Kconfig
|
||||||
|
+++ b/arch/arm/Kconfig
|
||||||
|
@@ -693,6 +693,8 @@ config ARCH_SUNXI
|
||||||
|
select USB_STORAGE if DISTRO_DEFAULTS
|
||||||
|
select USB_KEYBOARD if DISTRO_DEFAULTS
|
||||||
|
select USE_TINY_PRINTF
|
||||||
|
+ imply AUTOBOOT_KEYED
|
||||||
|
+ imply AUTOBOOT_KEYED_CTRLC
|
||||||
|
imply CMD_FASTBOOT
|
||||||
|
imply FASTBOOT
|
||||||
|
imply FAT_WRITE
|
||||||
|
diff --git a/cmd/Kconfig b/cmd/Kconfig
|
||||||
|
index d6d130edfa..46ed3a9d76 100644
|
||||||
|
--- a/cmd/Kconfig
|
||||||
|
+++ b/cmd/Kconfig
|
||||||
|
@@ -51,7 +51,7 @@ config AUTOBOOT_KEYED
|
||||||
|
config AUTOBOOT_PROMPT
|
||||||
|
string "Autoboot stop prompt"
|
||||||
|
depends on AUTOBOOT_KEYED
|
||||||
|
- default "Autoboot in %d seconds\\n"
|
||||||
|
+ default "Autoboot in %d seconds, press <Space> to stop\\n"
|
||||||
|
help
|
||||||
|
This string is displayed before the boot delay selected by
|
||||||
|
CONFIG_BOOTDELAY starts. If it is not defined there is no
|
||||||
|
@@ -84,6 +84,7 @@ config AUTOBOOT_DELAY_STR
|
||||||
|
config AUTOBOOT_STOP_STR
|
||||||
|
string "Stop autobooting via specific input key / string"
|
||||||
|
depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION
|
||||||
|
+ default " "
|
||||||
|
help
|
||||||
|
This option enables stopping (aborting) of the automatic
|
||||||
|
boot feature only by issuing a specific input key or
|
|
@ -0,0 +1,24 @@
|
||||||
|
We start to get to the limit of our main U-Boot binary size (with some
|
||||||
|
boards even crossing it). Enable its build using thumb2 to get some extra
|
||||||
|
room.
|
||||||
|
|
||||||
|
Suggested-by: Siarhei Siamashka <siarhei.siamashka at gmail.com>
|
||||||
|
Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
|
||||||
|
---
|
||||||
|
arch/arm/Kconfig | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
|
||||||
|
index 64e0ee43f112..83b7aa51dc2c 100644
|
||||||
|
--- a/arch/arm/Kconfig
|
||||||
|
+++ b/arch/arm/Kconfig
|
||||||
|
@@ -698,6 +698,7 @@ config ARCH_SUNXI
|
||||||
|
select SPL_SYS_MALLOC_SIMPLE if SPL
|
||||||
|
select SYS_NS16550
|
||||||
|
select SPL_SYS_THUMB_BUILD if !ARM64
|
||||||
|
+ select SYS_THUMB_BUILD if !ARM64
|
||||||
|
select USB if DISTRO_DEFAULTS
|
||||||
|
select USB_STORAGE if DISTRO_DEFAULTS
|
||||||
|
select USB_KEYBOARD if DISTRO_DEFAULTS
|
||||||
|
--
|
||||||
|
2.14.2
|
|
@ -0,0 +1,24 @@
|
||||||
|
diff --git a/cmd/fdt.c b/cmd/fdt.c
|
||||||
|
index d7654b2c4f..a71b7713a8 100644
|
||||||
|
--- a/cmd/fdt.c
|
||||||
|
+++ b/cmd/fdt.c
|
||||||
|
@@ -17,6 +17,7 @@
|
||||||
|
#include <fdt_support.h>
|
||||||
|
#include <mapmem.h>
|
||||||
|
#include <asm/io.h>
|
||||||
|
+#include <asm/unaligned.h>
|
||||||
|
|
||||||
|
#define MAX_LEVEL 32 /* how deeply nested we will go */
|
||||||
|
#define SCRATCHPAD 1024 /* bytes of scratchpad memory */
|
||||||
|
@@ -781,7 +782,10 @@ static int fdt_parse_prop(char * const *newval, int count, char *data, int *len)
|
||||||
|
cp = newp;
|
||||||
|
tmp = simple_strtoul(cp, &newp, 0);
|
||||||
|
if (*cp != '?')
|
||||||
|
- *(fdt32_t *)data = cpu_to_fdt32(tmp);
|
||||||
|
+ {
|
||||||
|
+ tmp = cpu_to_fdt32(tmp);
|
||||||
|
+ put_unaligned(tmp, (fdt32_t *)data);
|
||||||
|
+ }
|
||||||
|
else
|
||||||
|
newp++;
|
||||||
|
|
|
@ -0,0 +1,98 @@
|
||||||
|
The sunxi-specific SPI load routine only knows how to load a legacy
|
||||||
|
U-Boot image.
|
||||||
|
Teach it how to handle FIT images as well, simply by providing the
|
||||||
|
existing SPL FIT loader with the right loader routine to access the SPI
|
||||||
|
NOR flash.
|
||||||
|
|
||||||
|
Signed-off-by: Andre Przywara <andre.przywara at arm.com>
|
||||||
|
Reported-by: Peter Kosa <kope at madnet.sk>
|
||||||
|
|
||||||
|
---
|
||||||
|
Hi,
|
||||||
|
|
||||||
|
this patch was actually part of an early version of the SPL FIT series,
|
||||||
|
but I somehow managed to drop it during some rebase.
|
||||||
|
This is needed to enable SPI boot when using a FIT image, so this fixes
|
||||||
|
SPI booting on 64-bit Allwinner boards, like the OrangePi PC2 and the Pine64
|
||||||
|
SoPine.
|
||||||
|
I would be grateful if it could make it into v2017.11.
|
||||||
|
|
||||||
|
Cheers,
|
||||||
|
Andre.
|
||||||
|
|
||||||
|
drivers/mtd/spi/sunxi_spi_spl.c | 39 ++++++++++++++++++++++++++++++++-------
|
||||||
|
1 file changed, 32 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/mtd/spi/sunxi_spi_spl.c b/drivers/mtd/spi/sunxi_spi_spl.c
|
||||||
|
index 852abd41de..35835c2798 100644
|
||||||
|
--- a/drivers/mtd/spi/sunxi_spi_spl.c
|
||||||
|
+++ b/drivers/mtd/spi/sunxi_spi_spl.c
|
||||||
|
@@ -8,6 +8,7 @@
|
||||||
|
#include <spl.h>
|
||||||
|
#include <asm/gpio.h>
|
||||||
|
#include <asm/io.h>
|
||||||
|
+#include <libfdt.h>
|
||||||
|
|
||||||
|
#ifdef CONFIG_SPL_OS_BOOT
|
||||||
|
#error CONFIG_SPL_OS_BOOT is not supported yet
|
||||||
|
@@ -261,27 +262,51 @@ static void spi0_read_data(void *buf, u32 addr, u32 len)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+static ulong spi_load_read(struct spl_load_info *load, ulong sector,
|
||||||
|
+ ulong count, void *buf)
|
||||||
|
+{
|
||||||
|
+ spi0_read_data(buf, sector, count);
|
||||||
|
+
|
||||||
|
+ return count;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static int spl_spi_load_image(struct spl_image_info *spl_image,
|
||||||
|
struct spl_boot_device *bootdev)
|
||||||
|
{
|
||||||
|
- int err;
|
||||||
|
+ int ret = 0;
|
||||||
|
struct image_header *header;
|
||||||
|
header = (struct image_header *)(CONFIG_SYS_TEXT_BASE);
|
||||||
|
|
||||||
|
spi0_init();
|
||||||
|
|
||||||
|
spi0_read_data((void *)header, CONFIG_SYS_SPI_U_BOOT_OFFS, 0x40);
|
||||||
|
- err = spl_parse_image_header(spl_image, header);
|
||||||
|
- if (err)
|
||||||
|
- return err;
|
||||||
|
|
||||||
|
- spi0_read_data((void *)spl_image->load_addr, CONFIG_SYS_SPI_U_BOOT_OFFS,
|
||||||
|
- spl_image->size);
|
||||||
|
+ if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) &&
|
||||||
|
+ image_get_magic(header) == FDT_MAGIC) {
|
||||||
|
+ struct spl_load_info load;
|
||||||
|
+
|
||||||
|
+ debug("Found FIT image\n");
|
||||||
|
+ load.dev = NULL;
|
||||||
|
+ load.priv = NULL;
|
||||||
|
+ load.filename = NULL;
|
||||||
|
+ load.bl_len = 1;
|
||||||
|
+ load.read = spi_load_read;
|
||||||
|
+ ret = spl_load_simple_fit(spl_image, &load,
|
||||||
|
+ CONFIG_SYS_SPI_U_BOOT_OFFS, header);
|
||||||
|
+ } else {
|
||||||
|
+ ret = spl_parse_image_header(spl_image, header);
|
||||||
|
+ if (ret)
|
||||||
|
+ return ret;
|
||||||
|
+
|
||||||
|
+ spi0_read_data((void *)spl_image->load_addr,
|
||||||
|
+ CONFIG_SYS_SPI_U_BOOT_OFFS, spl_image->size);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
spi0_deinit();
|
||||||
|
- return 0;
|
||||||
|
+
|
||||||
|
+ return ret;
|
||||||
|
}
|
||||||
|
/* Use priorty 0 to override the default if it happens to be linked in */
|
||||||
|
SPL_LOAD_IMAGE_METHOD("sunxi SPI", 0, BOOT_DEVICE_SPI, spl_spi_load_image);
|
||||||
|
--
|
||||||
|
2.14.1
|
|
@ -0,0 +1,38 @@
|
||||||
|
The sunxi GPIO driver is missing some compatible strings for recent
|
||||||
|
SoCs. While most of the sunxi GPIO code seems to not rely on this (and
|
||||||
|
so works anyway), the sunxi_name_to_gpio() function does and fails at
|
||||||
|
the moment (for instance when resolving the MMC CD pin name).
|
||||||
|
Add the compatible strings for the A64, H5 and V3s, which were missing
|
||||||
|
from the list. This now covers all pinctrl nodes in our own DTs.
|
||||||
|
Strictly speaking the V3s has only ports B, C, E, F and G, but I think
|
||||||
|
the other SoCs have gaps in there as well and for the pin number
|
||||||
|
computation this does not matter.
|
||||||
|
|
||||||
|
Signed-off-by: Andre Przywara <andre.przywara at arm.com>
|
||||||
|
---
|
||||||
|
drivers/gpio/sunxi_gpio.c | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c
|
||||||
|
index b47cc66..d20a7e7 100644
|
||||||
|
--- a/drivers/gpio/sunxi_gpio.c
|
||||||
|
+++ b/drivers/gpio/sunxi_gpio.c
|
||||||
|
@@ -353,12 +353,16 @@ static const struct udevice_id sunxi_gpio_ids[] = {
|
||||||
|
ID("allwinner,sun8i-a83t-pinctrl", a_all),
|
||||||
|
ID("allwinner,sun8i-h3-pinctrl", a_all),
|
||||||
|
ID("allwinner,sun8i-r40-pinctrl", a_all),
|
||||||
|
+ ID("allwinner,sun8i-v3s-pinctrl", a_all),
|
||||||
|
ID("allwinner,sun9i-a80-pinctrl", a_all),
|
||||||
|
+ ID("allwinner,sun50i-a64-pinctrl", a_all),
|
||||||
|
+ ID("allwinner,sun50i-h5-pinctrl", a_all),
|
||||||
|
ID("allwinner,sun6i-a31-r-pinctrl", l_2),
|
||||||
|
ID("allwinner,sun8i-a23-r-pinctrl", l_1),
|
||||||
|
ID("allwinner,sun8i-a83t-r-pinctrl", l_1),
|
||||||
|
ID("allwinner,sun8i-h3-r-pinctrl", l_1),
|
||||||
|
ID("allwinner,sun9i-a80-r-pinctrl", l_3),
|
||||||
|
+ ID("allwinner,sun50i-a64-r-pinctrl", l_1),
|
||||||
|
{ }
|
||||||
|
};
|
||||||
|
|
||||||
|
--
|
||||||
|
2.9.0
|
|
@ -0,0 +1,102 @@
|
||||||
|
diff --git a/arch/arm/include/asm/arch-sunxi/usb_phy.h b/arch/arm/include/asm/arch-sunxi/usb_phy.h
|
||||||
|
index cef6c98..5670d9b 100644
|
||||||
|
--- a/arch/arm/include/asm/arch-sunxi/usb_phy.h
|
||||||
|
+++ b/arch/arm/include/asm/arch-sunxi/usb_phy.h
|
||||||
|
@@ -10,8 +10,8 @@
|
||||||
|
* SPDX-License-Identifier: GPL-2.0+
|
||||||
|
*/
|
||||||
|
|
||||||
|
-int sunxi_usb_phy_probe(void);
|
||||||
|
-int sunxi_usb_phy_remove(void);
|
||||||
|
+int sunxi_usb_phy_probe(int index);
|
||||||
|
+int sunxi_usb_phy_remove(int index);
|
||||||
|
void sunxi_usb_phy_init(int index);
|
||||||
|
void sunxi_usb_phy_exit(int index);
|
||||||
|
void sunxi_usb_phy_power_on(int index);
|
||||||
|
diff --git a/arch/arm/mach-sunxi/usb_phy.c b/arch/arm/mach-sunxi/usb_phy.c
|
||||||
|
index 9bf0b56..405cf99 100644
|
||||||
|
--- a/arch/arm/mach-sunxi/usb_phy.c
|
||||||
|
+++ b/arch/arm/mach-sunxi/usb_phy.c
|
||||||
|
@@ -329,13 +329,13 @@ int sunxi_usb_phy_id_detect(int index)
|
||||||
|
return gpio_get_value(phy->gpio_id_det);
|
||||||
|
}
|
||||||
|
|
||||||
|
-int sunxi_usb_phy_probe(void)
|
||||||
|
+int sunxi_usb_phy_probe(int i)
|
||||||
|
{
|
||||||
|
struct sunxi_ccm_reg *ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
|
||||||
|
struct sunxi_usb_phy *phy;
|
||||||
|
- int i, ret = 0;
|
||||||
|
+ int ret = 0;
|
||||||
|
|
||||||
|
- for (i = 0; i < CONFIG_SUNXI_USB_PHYS; i++) {
|
||||||
|
+ {
|
||||||
|
phy = &sunxi_usb_phy[i];
|
||||||
|
|
||||||
|
phy->gpio_vbus = get_vbus_gpio(i);
|
||||||
|
@@ -376,15 +376,14 @@ int sunxi_usb_phy_probe(void)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
-int sunxi_usb_phy_remove(void)
|
||||||
|
+int sunxi_usb_phy_remove(int i)
|
||||||
|
{
|
||||||
|
struct sunxi_ccm_reg *ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
|
||||||
|
struct sunxi_usb_phy *phy;
|
||||||
|
- int i;
|
||||||
|
|
||||||
|
clrbits_le32(&ccm->usb_clk_cfg, CCM_USB_CTRL_PHYGATE);
|
||||||
|
|
||||||
|
- for (i = 0; i < CONFIG_SUNXI_USB_PHYS; i++) {
|
||||||
|
+ {
|
||||||
|
phy = &sunxi_usb_phy[i];
|
||||||
|
|
||||||
|
if (phy->gpio_vbus >= 0)
|
||||||
|
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
|
||||||
|
index 70e0143..77f282b 100644
|
||||||
|
--- a/board/sunxi/board.c
|
||||||
|
+++ b/board/sunxi/board.c
|
||||||
|
@@ -514,6 +514,11 @@ void sunxi_board_init(void)
|
||||||
|
{
|
||||||
|
int power_failed = 0;
|
||||||
|
|
||||||
|
+#ifdef CONFIG_MACH_SUN8I_H3
|
||||||
|
+ /* turn on power LED (PL10) on H3 boards */
|
||||||
|
+ gpio_direction_output(SUNXI_GPL(10), 1);
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#ifdef CONFIG_SY8106A_POWER
|
||||||
|
power_failed = sy8106a_set_vout1(CONFIG_SY8106A_VOUT1_VOLT);
|
||||||
|
#endif
|
||||||
|
@@ -731,11 +736,6 @@ int misc_init_r(void)
|
||||||
|
|
||||||
|
setup_environment(gd->fdt_blob);
|
||||||
|
|
||||||
|
-#ifndef CONFIG_MACH_SUN9I
|
||||||
|
- ret = sunxi_usb_phy_probe();
|
||||||
|
- if (ret)
|
||||||
|
- return ret;
|
||||||
|
-#endif
|
||||||
|
sunxi_musb_board_init();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
diff --git a/drivers/usb/host/ehci-sunxi.c b/drivers/usb/host/ehci-sunxi.c
|
||||||
|
index 6ecb7c4..6f1463e 100644
|
||||||
|
--- a/drivers/usb/host/ehci-sunxi.c
|
||||||
|
+++ b/drivers/usb/host/ehci-sunxi.c
|
||||||
|
@@ -60,6 +60,7 @@ static int ehci_usb_probe(struct udevice *dev)
|
||||||
|
priv->ahb_gate_mask | extra_ahb_gate_mask);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+ sunxi_usb_phy_probe(priv->phy_index);
|
||||||
|
sunxi_usb_phy_init(priv->phy_index);
|
||||||
|
sunxi_usb_phy_power_on(priv->phy_index);
|
||||||
|
|
||||||
|
@@ -80,6 +81,7 @@ static int ehci_usb_remove(struct udevice *dev)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
sunxi_usb_phy_exit(priv->phy_index);
|
||||||
|
+ sunxi_usb_phy_remove(priv->phy_index);
|
||||||
|
|
||||||
|
#ifdef CONFIG_SUNXI_GEN_SUN6I
|
||||||
|
clrbits_le32(&ccm->ahb_reset0_cfg, priv->ahb_gate_mask);
|
|
@ -0,0 +1,60 @@
|
||||||
|
diff --git a/configs/orangepi_win_defconfig b/configs/orangepi_win_defconfig
|
||||||
|
index a3e278f..39e83f1 100644
|
||||||
|
--- a/configs/orangepi_win_defconfig
|
||||||
|
+++ b/configs/orangepi_win_defconfig
|
||||||
|
@@ -12,6 +12,9 @@ CONFIG_SPL=y
|
||||||
|
# CONFIG_SPL_ISO_PARTITION is not set
|
||||||
|
# CONFIG_SPL_EFI_PARTITION is not set
|
||||||
|
CONFIG_SPL_SPI_SUNXI=y
|
||||||
|
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
||||||
|
+CONFIG_USB1_VBUS_PIN="PD7"
|
||||||
|
+CONFIG_USB_HOST=y
|
||||||
|
CONFIG_SUN8I_EMAC=y
|
||||||
|
CONFIG_USB_EHCI_HCD=y
|
||||||
|
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
|
||||||
|
diff --git a/arch/arm/dts/sun50i-a64-orangepi-win.dts b/arch/arm/dts/sun50i-a64-orangepi-win.dts
|
||||||
|
index cf76c35..a7d36a5 100644
|
||||||
|
--- a/arch/arm/dts/sun50i-a64-orangepi-win.dts
|
||||||
|
+++ b/arch/arm/dts/sun50i-a64-orangepi-win.dts
|
||||||
|
@@ -64,6 +64,19 @@
|
||||||
|
regulator-min-microvolt = <3300000>;
|
||||||
|
regulator-max-microvolt = <3300000>;
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+ reg_usb1_vbus: usb1-vbus {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&usb1_vbus_pin_opiwin>;
|
||||||
|
+ regulator-name = "usb1-vbus";
|
||||||
|
+ regulator-min-microvolt = <5000000>;
|
||||||
|
+ regulator-max-microvolt = <5000000>;
|
||||||
|
+ regulator-boot-on;
|
||||||
|
+ enable-active-high;
|
||||||
|
+ gpio = <&pio 3 7 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
&ehci1 {
|
||||||
|
@@ -83,6 +96,13 @@
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
+&pio {
|
||||||
|
+ usb1_vbus_pin_opiwin: usb1_vbus_pin@0 {
|
||||||
|
+ allwinner,pins = "PD7";
|
||||||
|
+ allwinner,function = "gpio_out";
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&uart0 {
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&uart0_pins_a>;
|
||||||
|
@@ -90,5 +112,6 @@
|
||||||
|
};
|
||||||
|
|
||||||
|
&usbphy {
|
||||||
|
- status = "okay";
|
||||||
|
+ usb1_vbus-supply = <®_usb1_vbus>;
|
||||||
|
+ status = "okay";
|
||||||
|
};
|
|
@ -0,0 +1,33 @@
|
||||||
|
From 7f5071f906f79bdc99d6b4b0ccf0cb280abe740b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ondrej Jirman <megous@megous.com>
|
||||||
|
Date: Tue, 20 Dec 2016 11:25:12 +0100
|
||||||
|
Subject: [PATCH] sunxi: h3: Fix PLL1 setup to never use dividers
|
||||||
|
|
||||||
|
Kernel would lower the divider on first CLK change and cause the
|
||||||
|
lock up.
|
||||||
|
---
|
||||||
|
arch/arm/mach-sunxi/clock_sun6i.c | 7 +++----
|
||||||
|
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/mach-sunxi/clock_sun6i.c b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
|
index 50fb302a19..91aa2a0478 100644
|
||||||
|
--- a/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
|
+++ b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
|
@@ -94,11 +94,10 @@ void clock_set_pll1(unsigned int clk)
|
||||||
|
int k = 1;
|
||||||
|
int m = 1;
|
||||||
|
|
||||||
|
- if (clk > 1152000000) {
|
||||||
|
- k = 2;
|
||||||
|
- } else if (clk > 768000000) {
|
||||||
|
+ if (clk >= 1368000000) {
|
||||||
|
k = 3;
|
||||||
|
- m = 2;
|
||||||
|
+ } else if (clk >= 768000000) {
|
||||||
|
+ k = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Switch to 24MHz clock while changing PLL1 */
|
||||||
|
--
|
||||||
|
2.11.0
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
|
||||||
|
index 3cf3614..89cf7f5 100644
|
||||||
|
--- a/board/sunxi/board.c
|
||||||
|
+++ b/board/sunxi/board.c
|
||||||
|
@@ -478,6 +478,11 @@ void sunxi_board_init(void)
|
||||||
|
int power_failed = 0;
|
||||||
|
unsigned long ramsize;
|
||||||
|
|
||||||
|
+#ifdef CONFIG_MACH_SUN8I_H3
|
||||||
|
+ /* turn on power LED (PL10) on H3 boards */
|
||||||
|
+ gpio_direction_output(SUNXI_GPL(10), 1);
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#ifdef CONFIG_SY8106A_POWER
|
||||||
|
power_failed = sy8106a_set_vout1(CONFIG_SY8106A_VOUT1_VOLT);
|
||||||
|
#endif
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
diff --git a/arch/arm/mach-sunxi/clock_sun6i.c b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
|
index 15272c9..cedddc2 100644
|
||||||
|
--- a/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
|
+++ b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
|
@@ -117,8 +117,8 @@ void clock_set_pll1(unsigned int clk)
|
||||||
|
sdelay(200);
|
||||||
|
|
||||||
|
/* Switch CPU to PLL1 */
|
||||||
|
- writel(AXI_DIV_3 << AXI_DIV_SHIFT |
|
||||||
|
- ATB_DIV_2 << ATB_DIV_SHIFT |
|
||||||
|
+ writel(AXI_DIV_4 << AXI_DIV_SHIFT |
|
||||||
|
+ ATB_DIV_4 << ATB_DIV_SHIFT |
|
||||||
|
CPU_CLK_SRC_PLL1 << CPU_CLK_SRC_SHIFT,
|
||||||
|
&ccm->cpu_axi_cfg);
|
||||||
|
}
|
||||||
|
diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h
|
||||||
|
index f2990db..b3a8575 100644
|
||||||
|
--- a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h
|
||||||
|
+++ b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h
|
||||||
|
@@ -180,6 +180,7 @@ struct sunxi_ccm_reg {
|
||||||
|
#define CCM_PLL1_CTRL_N(n) ((((n) - 1) & 0x1f) << 8)
|
||||||
|
#define CCM_PLL1_CTRL_P(n) (((n) & 0x3) << 16)
|
||||||
|
#define CCM_PLL1_CTRL_EN (0x1 << 31)
|
||||||
|
+#define CCM_PLL1_CTRL_LOCK (0x1 << 28)
|
||||||
|
|
||||||
|
#define CCM_PLL3_CTRL_M_SHIFT 0
|
||||||
|
#define CCM_PLL3_CTRL_M_MASK (0xf << CCM_PLL3_CTRL_M_SHIFT)
|
||||||
|
diff --git a/arch/arm/mach-sunxi/clock_sun6i.c b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
|
index cedddc2..3fe9305 100644
|
||||||
|
--- a/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
|
+++ b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
|
@@ -114,7 +114,9 @@ void clock_set_pll1(unsigned int clk)
|
||||||
|
writel(CCM_PLL1_CTRL_EN | CCM_PLL1_CTRL_P(p) |
|
||||||
|
CCM_PLL1_CTRL_N(clk / (24000000 * k / m)) |
|
||||||
|
CCM_PLL1_CTRL_K(k) | CCM_PLL1_CTRL_M(m), &ccm->pll1_cfg);
|
||||||
|
- sdelay(200);
|
||||||
|
+
|
||||||
|
+ while (!(readl(&ccm->pll1_cfg) & CCM_PLL1_CTRL_LOCK))
|
||||||
|
+ ;
|
||||||
|
|
||||||
|
/* Switch CPU to PLL1 */
|
||||||
|
writel(AXI_DIV_4 << AXI_DIV_SHIFT |
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
|
||||||
|
index 2309f59999..716e9c5e26 100644
|
||||||
|
--- a/arch/arm/mach-sunxi/Kconfig
|
||||||
|
+++ b/arch/arm/mach-sunxi/Kconfig
|
||||||
|
@@ -278,7 +278,7 @@ config DRAM_CLK
|
||||||
|
default 312 if MACH_SUN6I || MACH_SUN8I
|
||||||
|
default 360 if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || \
|
||||||
|
MACH_SUN8I_V3S
|
||||||
|
- default 672 if MACH_SUN50I
|
||||||
|
+ default 648 if MACH_SUN50I || MACH_SUN50I_H5
|
||||||
|
---help---
|
||||||
|
Set the dram clock speed, valid range 240 - 480 (prior to sun9i),
|
||||||
|
must be a multiple of 24. For the sun9i (A80), the tested values
|
|
@ -0,0 +1,28 @@
|
||||||
|
Some H5 boards are designed to start at 1.1V CPUx voltage (e.g. Nano Pi
|
||||||
|
NEO2), which may not work properly at 1008MHz if the chip's quality is
|
||||||
|
not so good.
|
||||||
|
|
||||||
|
Lower the default CPUx frequency of H5 to 816MHz.
|
||||||
|
|
||||||
|
Signed-off-by: Icenowy Zheng <icenowy at aosc.io>
|
||||||
|
---
|
||||||
|
arch/arm/mach-sunxi/Kconfig | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
|
||||||
|
index 09cfec6f57..1fededd0a3 100644
|
||||||
|
--- a/arch/arm/mach-sunxi/Kconfig
|
||||||
|
+++ b/arch/arm/mach-sunxi/Kconfig
|
||||||
|
@@ -397,9 +397,9 @@ config SYS_CLK_FREQ
|
||||||
|
default 1008000000 if MACH_SUN5I
|
||||||
|
default 1008000000 if MACH_SUN6I
|
||||||
|
default 912000000 if MACH_SUN7I
|
||||||
|
+ default 816000000 if MACH_SUN50I || MACH_SUN50I_H5
|
||||||
|
default 1008000000 if MACH_SUN8I
|
||||||
|
default 1008000000 if MACH_SUN9I
|
||||||
|
- default 816000000 if MACH_SUN50I
|
||||||
|
|
||||||
|
config SYS_CONFIG_NAME
|
||||||
|
default "sun4i" if MACH_SUN4I
|
||||||
|
--
|
||||||
|
2.13.6
|
|
@ -0,0 +1,11 @@
|
||||||
|
diff --git a/include/configs/sun8i.h b/include/configs/sun8i.h
|
||||||
|
index a4c3fb69e..47ce2e9e6 100644
|
||||||
|
--- a/include/configs/sun8i.h
|
||||||
|
+++ b/include/configs/sun8i.h
|
||||||
|
@@ -30,4 +30,6 @@
|
||||||
|
*/
|
||||||
|
#include <configs/sunxi-common.h>
|
||||||
|
|
||||||
|
+#define CONFIG_MACH_TYPE (0x1029)
|
||||||
|
+
|
||||||
|
#endif /* __CONFIG_H */
|
|
@ -0,0 +1,62 @@
|
||||||
|
diff --git a/cmd/Kconfig b/cmd/Kconfig
|
||||||
|
index d6d130edfa..92795119ea 100644
|
||||||
|
--- a/cmd/Kconfig
|
||||||
|
+++ b/cmd/Kconfig
|
||||||
|
@@ -1029,6 +1029,7 @@ menu "Misc commands"
|
||||||
|
config CMD_BMP
|
||||||
|
bool "Enable 'bmp' command"
|
||||||
|
depends on LCD || DM_VIDEO || VIDEO
|
||||||
|
+ default y
|
||||||
|
help
|
||||||
|
This provides a way to obtain information about a BMP-format iamge
|
||||||
|
and to display it. BMP (which presumably stands for BitMaP) is a
|
||||||
|
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
|
||||||
|
index 9ed6b9892c..75d5176edf 100644
|
||||||
|
--- a/include/config_distro_bootcmd.h
|
||||||
|
+++ b/include/config_distro_bootcmd.h
|
||||||
|
@@ -323,6 +323,15 @@
|
||||||
|
BOOTENV_SHARED_UBIFS \
|
||||||
|
BOOTENV_SHARED_EFI \
|
||||||
|
"boot_prefixes=/ /boot/\0" \
|
||||||
|
+ "splashpos=m,m\0" \
|
||||||
|
+ "splashimage=66000000\0" \
|
||||||
|
+ "loadsplash= " \
|
||||||
|
+ "for prefix in ${boot_prefixes}; do " \
|
||||||
|
+ "if test -e mmc 0 ${prefix}boot.bmp; then " \
|
||||||
|
+ "load mmc 0 ${splashimage} ${prefix}boot.bmp; " \
|
||||||
|
+ "bmp d ${splashimage}; " \
|
||||||
|
+ "fi; " \
|
||||||
|
+ "done\0" \
|
||||||
|
"boot_scripts=boot.scr.uimg boot.scr\0" \
|
||||||
|
"boot_script_dhcp=boot.scr.uimg\0" \
|
||||||
|
BOOTENV_BOOT_TARGETS \
|
||||||
|
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
|
||||||
|
index 02d7be0849..cbdea20d08 100644
|
||||||
|
--- a/include/configs/sunxi-common.h
|
||||||
|
+++ b/include/configs/sunxi-common.h
|
||||||
|
@@ -284,6 +284,16 @@ extern int soft_i2c_gpio_scl;
|
||||||
|
|
||||||
|
#endif /* CONFIG_VIDEO */
|
||||||
|
|
||||||
|
+#if defined CONFIG_VIDEO || defined CONFIG_DM_VIDEO
|
||||||
|
+#define CONFIG_VIDEO_LOGO
|
||||||
|
+#define CONFIG_SPLASH_SCREEN
|
||||||
|
+#define CONFIG_SPLASH_SCREEN_ALIGN
|
||||||
|
+#define CONFIG_BMP_16BPP
|
||||||
|
+#define CONFIG_BMP_24BPP
|
||||||
|
+#define CONFIG_BMP_32BPP
|
||||||
|
+#define CONFIG_VIDEO_BMP_RLE8
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* Ethernet support */
|
||||||
|
#ifdef CONFIG_SUNXI_EMAC
|
||||||
|
#define CONFIG_PHY_ADDR 1
|
||||||
|
@@ -444,7 +454,7 @@ extern int soft_i2c_gpio_scl;
|
||||||
|
|
||||||
|
#ifdef CONFIG_USB_KEYBOARD
|
||||||
|
#define CONSOLE_STDIN_SETTINGS \
|
||||||
|
- "preboot=usb start\0" \
|
||||||
|
+ "preboot=run loadsplash; usb start\0" \
|
||||||
|
"stdin=serial,usbkbd\0"
|
||||||
|
#else
|
||||||
|
#define CONSOLE_STDIN_SETTINGS \
|
|
@ -0,0 +1,12 @@
|
||||||
|
diff --git a/tools/Makefile b/tools/Makefile
|
||||||
|
index 5db2a54..54bd224 100644
|
||||||
|
--- a/tools/Makefile
|
||||||
|
+++ b/tools/Makefile
|
||||||
|
@@ -134,6 +134,7 @@ tools/_libfdt.so: $(LIBFDT_SRCS) $(LIBFDT_SWIG)
|
||||||
|
$(Q)unset CC; \
|
||||||
|
unset CROSS_COMPILE; \
|
||||||
|
LDFLAGS="$(HOSTLDFLAGS)" CFLAGS= VERSION="u-boot-$(UBOOTVERSION)" \
|
||||||
|
+ CC="$(HOSTCC)" LDSHARED="$(HOSTLDSHARED)" \
|
||||||
|
CPPFLAGS="$(_hostc_flags)" OBJDIR=tools \
|
||||||
|
SOURCES="$(LIBFDT_SRCS) tools/libfdt.i" \
|
||||||
|
SWIG_OPTS="-I$(srctree)/lib/libfdt -I$(srctree)/lib" \
|
|
@ -0,0 +1,36 @@
|
||||||
|
diff --git a/configs/A20-OLinuXino-Lime2-eMMC_defconfig b/configs/A20-OLinuXino-Lime2-eMMC_defconfig
|
||||||
|
index 58aa988..cba7d7d
|
||||||
|
--- a/configs/A20-OLinuXino-Lime2-eMMC_defconfig
|
||||||
|
+++ b/configs/A20-OLinuXino-Lime2-eMMC_defconfig
|
||||||
|
@@ -27,7 +27,6 @@ CONFIG_DFU_RAM=y
|
||||||
|
CONFIG_ETH_DESIGNWARE=y
|
||||||
|
CONFIG_RGMII=y
|
||||||
|
CONFIG_SUN7I_GMAC=y
|
||||||
|
-CONFIG_AXP_ALDO3_VOLT=2800
|
||||||
|
CONFIG_AXP_ALDO4_VOLT=2800
|
||||||
|
CONFIG_SCSI=y
|
||||||
|
CONFIG_USB_EHCI_HCD=y
|
||||||
|
diff --git a/configs/A20-OLinuXino-Lime2_defconfig b/configs/A20-OLinuXino-Lime2_defconfig
|
||||||
|
index 6d7c588..7a85e20
|
||||||
|
--- a/configs/A20-OLinuXino-Lime2_defconfig
|
||||||
|
+++ b/configs/A20-OLinuXino-Lime2_defconfig
|
||||||
|
@@ -26,7 +26,6 @@ CONFIG_DFU_RAM=y
|
||||||
|
CONFIG_ETH_DESIGNWARE=y
|
||||||
|
CONFIG_RGMII=y
|
||||||
|
CONFIG_SUN7I_GMAC=y
|
||||||
|
-CONFIG_AXP_ALDO3_VOLT=2800
|
||||||
|
CONFIG_AXP_ALDO4_VOLT=2800
|
||||||
|
CONFIG_SCSI=y
|
||||||
|
CONFIG_USB_EHCI_HCD=y
|
||||||
|
diff --git a/configs/A20-OLinuXino_MICRO_eMMC_defconfig b/configs/A20-OLinuXino_MICRO_eMMC_defconfig
|
||||||
|
index 046a805..fb966e1
|
||||||
|
--- a/configs/A20-OLinuXino_MICRO_eMMC_defconfig
|
||||||
|
+++ b/configs/A20-OLinuXino_MICRO_eMMC_defconfig
|
||||||
|
@@ -20,7 +20,6 @@ CONFIG_SPL_I2C_SUPPORT=y
|
||||||
|
# CONFIG_SPL_EFI_PARTITION is not set
|
||||||
|
CONFIG_ETH_DESIGNWARE=y
|
||||||
|
CONFIG_SUN7I_GMAC=y
|
||||||
|
-CONFIG_AXP_ALDO3_VOLT=2800
|
||||||
|
CONFIG_AXP_ALDO4_VOLT=2800
|
||||||
|
CONFIG_USB_EHCI_HCD=y
|
||||||
|
CONFIG_SCSI=y
|
|
@ -1 +1,3 @@
|
||||||
LED_FILE_orange-pi-lite = "/sys/devices/platform/leds/leds/orangepi\:red\:status/brightness"
|
LED_FILE_orange-pi-lite = "/sys/devices/platform/leds/leds/orangepi\:red\:status/brightness"
|
||||||
|
|
||||||
|
LED_FILE_nanopi-neo-air = "/sys/class/leds/nanopi\:blue\:status/brightness"
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
include resin-image.inc
|
|
@ -0,0 +1 @@
|
||||||
|
IMAGE_ROOTFS_MAXSIZE = "12288"
|
|
@ -1,76 +1 @@
|
||||||
#
|
include resin-image.inc
|
||||||
# orange-pi-one
|
|
||||||
#
|
|
||||||
|
|
||||||
IMAGE_FSTYPES_append_orange-pi-one = " resinos-img"
|
|
||||||
|
|
||||||
# Customize resinos-img
|
|
||||||
RESIN_IMAGE_BOOTLOADER_orange-pi-one = "u-boot"
|
|
||||||
RESIN_BOOT_PARTITION_FILES_orange-pi-one = " \
|
|
||||||
${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin:/${KERNEL_IMAGETYPE} \
|
|
||||||
uImage-sun8i-h3-orangepi-one.dtb:/sun8i-h3-orangepi-one.dtb \
|
|
||||||
boot.scr:/boot.scr \
|
|
||||||
"
|
|
||||||
|
|
||||||
IMAGE_CMD_resinos-img_append_orange-pi-one () {
|
|
||||||
# orange-pi-one needs uboot written at a specific location
|
|
||||||
dd if=${DEPLOY_DIR_IMAGE}/u-boot-sunxi-with-spl.bin of=${RESIN_RAW_IMG} conv=notrunc seek=8 bs=1024
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# orange-pi-lite
|
|
||||||
#
|
|
||||||
|
|
||||||
IMAGE_FSTYPES_append_orange-pi-lite = " resinos-img"
|
|
||||||
|
|
||||||
# Customize resinos-img
|
|
||||||
RESIN_IMAGE_BOOTLOADER_orange-pi-lite = "u-boot"
|
|
||||||
RESIN_BOOT_PARTITION_FILES_orange-pi-lite = " \
|
|
||||||
${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin:/${KERNEL_IMAGETYPE} \
|
|
||||||
uImage-sun8i-h3-orangepi-lite.dtb:/dtb/sun8i-h3-orangepi-lite.dtb \
|
|
||||||
uImage-sun8i-h3-fixup.scr:/dtb/overlay/sun8i-h3-fixup.scr \
|
|
||||||
uImage-sun8i-h3-analog-codec.dtbo:/dtb/overlay/sun8i-h3-analog-codec.dtbo \
|
|
||||||
uImage-sun8i-h3-cir.dtbo:/dtb/overlay/sun8i-h3-cir.dtbo \
|
|
||||||
uImage-sun8i-h3-i2c0.dtbo:/dtb/overlay/sun8i-h3-i2c0.dtbo \
|
|
||||||
uImage-sun8i-h3-i2c1.dtbo:/dtb/overlay/sun8i-h3-i2c1.dtbo \
|
|
||||||
uImage-sun8i-h3-i2c2.dtbo:/dtb/overlay/sun8i-h3-i2c2.dtbo \
|
|
||||||
uImage-sun8i-h3-pps-gpio.dtbo:/dtb/overlay/sun8i-h3-pps-gpio.dtbo \
|
|
||||||
uImage-sun8i-h3-pwm.dtbo:/dtb/overlay/sun8i-h3-pwm.dtbo \
|
|
||||||
uImage-sun8i-h3-spdif-out.dtbo:/dtb/overlay/sun8i-h3-spdif-out.dtbo \
|
|
||||||
uImage-sun8i-h3-spi-add-cs1.dtbo:/dtb/overlay/sun8i-h3-spi-add-cs1.dtbo \
|
|
||||||
uImage-sun8i-h3-spi-jedec-nor.dtbo:/dtb/overlay/sun8i-h3-spi-jedec-nor.dtbo \
|
|
||||||
uImage-sun8i-h3-spi-spidev.dtbo:/dtb/overlay/sun8i-h3-spi-spidev.dtbo \
|
|
||||||
uImage-sun8i-h3-uart1.dtbo:/dtb/overlay/sun8i-h3-uart1.dtbo \
|
|
||||||
uImage-sun8i-h3-uart2.dtbo:/dtb/overlay/sun8i-h3-uart2.dtbo \
|
|
||||||
uImage-sun8i-h3-uart3.dtbo:/dtb/overlay/sun8i-h3-uart3.dtbo \
|
|
||||||
uImage-sun8i-h3-usbhost0.dtbo:/dtb/overlay/sun8i-h3-usbhost0.dtbo \
|
|
||||||
uImage-sun8i-h3-usbhost2.dtbo:/dtb/overlay/sun8i-h3-usbhost1.dtbo \
|
|
||||||
uImage-sun8i-h3-usbhost3.dtbo:/dtb/overlay/sun8i-h3-usbhost2.dtbo \
|
|
||||||
uImage-sun8i-h3-w1-gpio.dtbo:/dtb/overlay/sun8i-h3-w1-gpio.dtbo \
|
|
||||||
boot.scr:/boot.scr \
|
|
||||||
armbianEnv.txt:/ \
|
|
||||||
"
|
|
||||||
|
|
||||||
IMAGE_CMD_resinos-img_append_orange-pi-lite () {
|
|
||||||
# orange-pi-lite needs uboot written at a specific location
|
|
||||||
dd if=${DEPLOY_DIR_IMAGE}/u-boot-sunxi-with-spl.bin of=${RESIN_RAW_IMG} conv=notrunc seek=8 bs=1024
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# orange-pi-plus2e
|
|
||||||
#
|
|
||||||
|
|
||||||
IMAGE_FSTYPES_append_orange-pi-plus2e = " resinos-img"
|
|
||||||
|
|
||||||
# Customize resinos-img
|
|
||||||
RESIN_IMAGE_BOOTLOADER_orange-pi-plus2e = "u-boot"
|
|
||||||
RESIN_BOOT_PARTITION_FILES_orange-pi-plus2e = " \
|
|
||||||
${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin:/${KERNEL_IMAGETYPE} \
|
|
||||||
uImage-sun8i-h3-orangepi-plus2e.dtb:/sun8i-h3-orangepi-plus2e.dtb \
|
|
||||||
boot.scr:/boot.scr \
|
|
||||||
"
|
|
||||||
|
|
||||||
IMAGE_CMD_resinos-img_append_orange-pi-plus2e () {
|
|
||||||
# orange-pi-plus2e needs uboot written at a specific location
|
|
||||||
dd if=${DEPLOY_DIR_IMAGE}/u-boot-sunxi-with-spl.bin of=${RESIN_RAW_IMG} conv=notrunc seek=8 bs=1024
|
|
||||||
}
|
|
|
@ -0,0 +1,77 @@
|
||||||
|
#
|
||||||
|
# orange-pi-lite
|
||||||
|
#
|
||||||
|
|
||||||
|
IMAGE_FSTYPES_append_orange-pi-lite = " resinos-img"
|
||||||
|
|
||||||
|
# Customize resinos-img
|
||||||
|
RESIN_IMAGE_BOOTLOADER_orange-pi-lite = "u-boot"
|
||||||
|
RESIN_BOOT_PARTITION_FILES_orange-pi-lite = " \
|
||||||
|
${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin:/${KERNEL_IMAGETYPE} \
|
||||||
|
uImage-sun8i-h3-orangepi-lite.dtb:/dtb/sun8i-h3-orangepi-lite.dtb \
|
||||||
|
uImage-sun8i-h3-fixup.scr:/dtb/overlay/sun8i-h3-fixup.scr \
|
||||||
|
uImage-sun8i-h3-analog-codec.dtbo:/dtb/overlay/sun8i-h3-analog-codec.dtbo \
|
||||||
|
uImage-sun8i-h3-cir.dtbo:/dtb/overlay/sun8i-h3-cir.dtbo \
|
||||||
|
uImage-sun8i-h3-i2c0.dtbo:/dtb/overlay/sun8i-h3-i2c0.dtbo \
|
||||||
|
uImage-sun8i-h3-i2c1.dtbo:/dtb/overlay/sun8i-h3-i2c1.dtbo \
|
||||||
|
uImage-sun8i-h3-i2c2.dtbo:/dtb/overlay/sun8i-h3-i2c2.dtbo \
|
||||||
|
uImage-sun8i-h3-pps-gpio.dtbo:/dtb/overlay/sun8i-h3-pps-gpio.dtbo \
|
||||||
|
uImage-sun8i-h3-pwm.dtbo:/dtb/overlay/sun8i-h3-pwm.dtbo \
|
||||||
|
uImage-sun8i-h3-spdif-out.dtbo:/dtb/overlay/sun8i-h3-spdif-out.dtbo \
|
||||||
|
uImage-sun8i-h3-spi-add-cs1.dtbo:/dtb/overlay/sun8i-h3-spi-add-cs1.dtbo \
|
||||||
|
uImage-sun8i-h3-spi-jedec-nor.dtbo:/dtb/overlay/sun8i-h3-spi-jedec-nor.dtbo \
|
||||||
|
uImage-sun8i-h3-spi-spidev.dtbo:/dtb/overlay/sun8i-h3-spi-spidev.dtbo \
|
||||||
|
uImage-sun8i-h3-uart1.dtbo:/dtb/overlay/sun8i-h3-uart1.dtbo \
|
||||||
|
uImage-sun8i-h3-uart2.dtbo:/dtb/overlay/sun8i-h3-uart2.dtbo \
|
||||||
|
uImage-sun8i-h3-uart3.dtbo:/dtb/overlay/sun8i-h3-uart3.dtbo \
|
||||||
|
uImage-sun8i-h3-usbhost0.dtbo:/dtb/overlay/sun8i-h3-usbhost0.dtbo \
|
||||||
|
uImage-sun8i-h3-usbhost2.dtbo:/dtb/overlay/sun8i-h3-usbhost1.dtbo \
|
||||||
|
uImage-sun8i-h3-usbhost3.dtbo:/dtb/overlay/sun8i-h3-usbhost2.dtbo \
|
||||||
|
uImage-sun8i-h3-w1-gpio.dtbo:/dtb/overlay/sun8i-h3-w1-gpio.dtbo \
|
||||||
|
boot.scr:/boot.scr \
|
||||||
|
armbianEnv.txt:/ \
|
||||||
|
"
|
||||||
|
|
||||||
|
IMAGE_CMD_resinos-img_append_orange-pi-lite () {
|
||||||
|
# orange-pi-lite needs uboot written at a specific location
|
||||||
|
dd if=${DEPLOY_DIR_IMAGE}/u-boot-sunxi-with-spl.bin of=${RESIN_RAW_IMG} conv=notrunc seek=8 bs=1024
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# nanopi-neo-air
|
||||||
|
#
|
||||||
|
|
||||||
|
IMAGE_FSTYPES_append_nanopi-neo-air = " resinos-img"
|
||||||
|
|
||||||
|
# Customize resinos-img
|
||||||
|
RESIN_IMAGE_BOOTLOADER_nanopi-neo-air = "u-boot"
|
||||||
|
RESIN_BOOT_PARTITION_FILES_nanopi-neo-air = " \
|
||||||
|
${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin:/${KERNEL_IMAGETYPE} \
|
||||||
|
uImage-sun8i-h3-nanopi-neo-air.dtb:/dtb/sun8i-h3-nanopi-neo-air.dtb \
|
||||||
|
uImage-sun8i-h3-fixup.scr:/dtb/overlay/sun8i-h3-fixup.scr \
|
||||||
|
uImage-sun8i-h3-analog-codec.dtbo:/dtb/overlay/sun8i-h3-analog-codec.dtbo \
|
||||||
|
uImage-sun8i-h3-cir.dtbo:/dtb/overlay/sun8i-h3-cir.dtbo \
|
||||||
|
uImage-sun8i-h3-i2c0.dtbo:/dtb/overlay/sun8i-h3-i2c0.dtbo \
|
||||||
|
uImage-sun8i-h3-i2c1.dtbo:/dtb/overlay/sun8i-h3-i2c1.dtbo \
|
||||||
|
uImage-sun8i-h3-i2c2.dtbo:/dtb/overlay/sun8i-h3-i2c2.dtbo \
|
||||||
|
uImage-sun8i-h3-pps-gpio.dtbo:/dtb/overlay/sun8i-h3-pps-gpio.dtbo \
|
||||||
|
uImage-sun8i-h3-pwm.dtbo:/dtb/overlay/sun8i-h3-pwm.dtbo \
|
||||||
|
uImage-sun8i-h3-spdif-out.dtbo:/dtb/overlay/sun8i-h3-spdif-out.dtbo \
|
||||||
|
uImage-sun8i-h3-spi-add-cs1.dtbo:/dtb/overlay/sun8i-h3-spi-add-cs1.dtbo \
|
||||||
|
uImage-sun8i-h3-spi-jedec-nor.dtbo:/dtb/overlay/sun8i-h3-spi-jedec-nor.dtbo \
|
||||||
|
uImage-sun8i-h3-spi-spidev.dtbo:/dtb/overlay/sun8i-h3-spi-spidev.dtbo \
|
||||||
|
uImage-sun8i-h3-uart1.dtbo:/dtb/overlay/sun8i-h3-uart1.dtbo \
|
||||||
|
uImage-sun8i-h3-uart2.dtbo:/dtb/overlay/sun8i-h3-uart2.dtbo \
|
||||||
|
uImage-sun8i-h3-uart3.dtbo:/dtb/overlay/sun8i-h3-uart3.dtbo \
|
||||||
|
uImage-sun8i-h3-usbhost0.dtbo:/dtb/overlay/sun8i-h3-usbhost0.dtbo \
|
||||||
|
uImage-sun8i-h3-usbhost2.dtbo:/dtb/overlay/sun8i-h3-usbhost1.dtbo \
|
||||||
|
uImage-sun8i-h3-usbhost3.dtbo:/dtb/overlay/sun8i-h3-usbhost2.dtbo \
|
||||||
|
uImage-sun8i-h3-w1-gpio.dtbo:/dtb/overlay/sun8i-h3-w1-gpio.dtbo \
|
||||||
|
boot.scr:/boot.scr \
|
||||||
|
armbianEnv.txt:/ \
|
||||||
|
"
|
||||||
|
|
||||||
|
IMAGE_CMD_resinos-img_append_nanopi-neo-air () {
|
||||||
|
# nanopi-neo-air needs uboot written at a specific location
|
||||||
|
dd if=${DEPLOY_DIR_IMAGE}/u-boot-sunxi-with-spl.bin of=${RESIN_RAW_IMG} conv=notrunc seek=8 bs=1024
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
CONNECTIVITY_FIRMWARES_append = " linux-firmware-ap6212"
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,54 @@
|
||||||
|
#AP6212_NVRAM_V1.0_20140603
|
||||||
|
# 2.4 GHz, 20 MHz BW mode
|
||||||
|
|
||||||
|
# The following parameter values are just placeholders, need to be updated.
|
||||||
|
manfid=0x2d0
|
||||||
|
prodid=0x0726
|
||||||
|
vendid=0x14e4
|
||||||
|
devid=0x43e2
|
||||||
|
boardtype=0x0726
|
||||||
|
boardrev=0x1101
|
||||||
|
boardnum=22
|
||||||
|
macaddr=00:90:4c:c5:12:38
|
||||||
|
sromrev=11
|
||||||
|
boardflags=0x00404201
|
||||||
|
xtalfreq=26000
|
||||||
|
nocrc=1
|
||||||
|
ag0=255
|
||||||
|
aa2g=1
|
||||||
|
ccode=ALL
|
||||||
|
|
||||||
|
pa0itssit=0x20
|
||||||
|
extpagain2g=0
|
||||||
|
|
||||||
|
#PA parameters for 2.4GHz, measured at CHIP OUTPUT
|
||||||
|
pa2ga0=-168,7161,-820
|
||||||
|
AvVmid_c0=0x0,0xc8
|
||||||
|
cckpwroffset0=5
|
||||||
|
|
||||||
|
# PPR params
|
||||||
|
maxp2ga0=90
|
||||||
|
txpwrbckof=6
|
||||||
|
cckbw202gpo=0x5555
|
||||||
|
legofdmbw202gpo=0x77777777
|
||||||
|
mcsbw202gpo=0xaaaaaaaa
|
||||||
|
|
||||||
|
# OFDM IIR :
|
||||||
|
ofdmdigfilttype=7
|
||||||
|
# PAPD mode:
|
||||||
|
papdmode=2
|
||||||
|
|
||||||
|
il0macaddr=00:90:4c:c5:12:38
|
||||||
|
wl0id=0x431b
|
||||||
|
|
||||||
|
#OOB parameters
|
||||||
|
hostwake=0x40
|
||||||
|
hostrdy=0x41
|
||||||
|
usbrdy=0x03
|
||||||
|
usbrdydelay=100
|
||||||
|
deadman_to=0xffffffff
|
||||||
|
# muxenab: 0x1 for UART enable, 0x10 for Host awake
|
||||||
|
muxenab=0x10
|
||||||
|
# CLDO PWM voltage settings - 0x4 - 1.1 volt
|
||||||
|
#cldo_pwm=0x4
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
PM=0
|
||||||
|
nv_by_chip=1 \
|
||||||
|
43362 1 nvram_ap6210.txt
|
||||||
|
43430 0 nvram_ap6212.txt
|
|
@ -0,0 +1,31 @@
|
||||||
|
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
|
||||||
|
|
||||||
|
# These firmware files are fetched from https://github.com/armbian/build/tree/master/packages/extras/firmware/brcm
|
||||||
|
SRC_URI_append = " \
|
||||||
|
file://bcm4329.hcd \
|
||||||
|
file://bcm4330.hcd \
|
||||||
|
file://bcm43438-sdio.hcd \
|
||||||
|
file://brcmfmac43430a0-sdio.bin \
|
||||||
|
file://brcmfmac43430a0-sdio.txt \
|
||||||
|
file://config.txt \
|
||||||
|
"
|
||||||
|
|
||||||
|
do_install_append() {
|
||||||
|
cp ${WORKDIR}/bcm4329.hcd ${D}/lib/firmware/brcm/bcm4329.hcd
|
||||||
|
cp ${WORKDIR}/bcm4330.hcd ${D}/lib/firmware/brcm/bcm4330.hcd
|
||||||
|
cp ${WORKDIR}/bcm43438-sdio.hcd ${D}/lib/firmware/brcm/bcm43438-sdio.hcd
|
||||||
|
cp ${WORKDIR}/brcmfmac43430a0-sdio.bin ${D}/lib/firmware/brcm/brcmfmac43430a0-sdio.bin
|
||||||
|
cp ${WORKDIR}/brcmfmac43430a0-sdio.txt ${D}/lib/firmware/brcm/brcmfmac43430a0-sdio.txt
|
||||||
|
cp ${WORKDIR}/config.txt ${D}/lib/firmware/brcm/config.txt
|
||||||
|
}
|
||||||
|
|
||||||
|
PACKAGES =+ "${PN}-ap6212"
|
||||||
|
|
||||||
|
FILES_${PN}-ap6212 = " \
|
||||||
|
/lib/firmware/brcm/bcm4329.hcd \
|
||||||
|
/lib/firmware/brcm/bcm4330.hcd \
|
||||||
|
/lib/firmware/brcm/bcm43438-sdio.hcd \
|
||||||
|
/lib/firmware/brcm/brcmfmac43430a0-sdio.bin \
|
||||||
|
/lib/firmware/brcm/brcmfmac43430a0-sdio.txt \
|
||||||
|
/lib/firmware/brcm/config.txt \
|
||||||
|
"
|
|
@ -0,0 +1,18 @@
|
||||||
|
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
|
||||||
|
index d0fc165..4510c2d 100644
|
||||||
|
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||||
|
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||||
|
@@ -809,6 +809,13 @@ static const struct flash_info spi_nor_ids[] = {
|
||||||
|
|
||||||
|
{ "at45db081d", INFO(0x1f2500, 0, 64 * 1024, 16, SECT_4K) },
|
||||||
|
|
||||||
|
+ /* BergMicro Flashes */
|
||||||
|
+ { "bg25q80", INFO(0xe04014, 0, 64 * 1024, 16, SECT_4K) },
|
||||||
|
+ { "bg25q16", INFO(0xe04015, 0, 64 * 1024, 32, SECT_4K) },
|
||||||
|
+ { "bg25q32", INFO(0xe04016, 0, 64 * 1024, 64, SECT_4K) },
|
||||||
|
+ { "bg25q64", INFO(0xe04017, 0, 64 * 1024, 128, SECT_4K) },
|
||||||
|
+ { "bg25q128", INFO(0xe04018, 0, 64 * 1024, 256, SECT_4K) },
|
||||||
|
+
|
||||||
|
/* EON -- en25xxx */
|
||||||
|
{ "en25f32", INFO(0x1c3116, 0, 64 * 1024, 64, SECT_4K) },
|
||||||
|
{ "en25p32", INFO(0x1c2016, 0, 64 * 1024, 64, 0) },
|
|
@ -0,0 +1,174 @@
|
||||||
|
diff --git a/drivers/staging/iio/frequency/ad9834.c b/drivers/staging/iio/frequency/ad9834.c
|
||||||
|
index 19216af1..e839d23a 100644
|
||||||
|
--- a/drivers/staging/iio/frequency/ad9834.c
|
||||||
|
+++ b/drivers/staging/iio/frequency/ad9834.c
|
||||||
|
@@ -13,11 +13,14 @@
|
||||||
|
#include <linux/slab.h>
|
||||||
|
#include <linux/sysfs.h>
|
||||||
|
#include <linux/list.h>
|
||||||
|
+#include <linux/of.h>
|
||||||
|
+#include <linux/of_device.h>
|
||||||
|
#include <linux/spi/spi.h>
|
||||||
|
#include <linux/regulator/consumer.h>
|
||||||
|
#include <linux/err.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <asm/div64.h>
|
||||||
|
+#include <linux/clk.h>
|
||||||
|
|
||||||
|
#include <linux/iio/iio.h>
|
||||||
|
#include <linux/iio/sysfs.h>
|
||||||
|
@@ -316,14 +319,81 @@ static const struct iio_info ad9833_info = {
|
||||||
|
.driver_module = THIS_MODULE,
|
||||||
|
};
|
||||||
|
|
||||||
|
+#if defined(CONFIG_OF)
|
||||||
|
+static struct ad9834_platform_data *ad9834_parse_dt(struct spi_device *spi)
|
||||||
|
+{
|
||||||
|
+ struct ad9834_platform_data *pdata;
|
||||||
|
+ struct device_node *np = spi->dev.of_node;
|
||||||
|
+
|
||||||
|
+ pdata = devm_kzalloc(&spi->dev, sizeof(*pdata), GFP_KERNEL);
|
||||||
|
+ if (!pdata)
|
||||||
|
+ return ERR_PTR(-ENOMEM);
|
||||||
|
+
|
||||||
|
+ pdata->freq0 = 134000;
|
||||||
|
+ of_property_read_u32(np, "freq0", &pdata->freq0);
|
||||||
|
+
|
||||||
|
+ pdata->freq1 = 134000;
|
||||||
|
+ of_property_read_u32(np, "freq1", &pdata->freq1);
|
||||||
|
+
|
||||||
|
+ pdata->phase0 = 0;
|
||||||
|
+ of_property_read_u16(np, "phase0", &pdata->phase0);
|
||||||
|
+
|
||||||
|
+ pdata->phase1 = 0;
|
||||||
|
+ of_property_read_u16(np, "phase1", &pdata->phase1);
|
||||||
|
+
|
||||||
|
+ pdata->en_div2 = of_property_read_bool(np, "en_div2");
|
||||||
|
+ pdata->en_signbit_msb_out = of_property_read_bool(np,
|
||||||
|
+ "en_signbit_msb_out");
|
||||||
|
+
|
||||||
|
+ return pdata;
|
||||||
|
+}
|
||||||
|
+#else
|
||||||
|
+static struct ad9834_platform_data *ad9834_parse_dt(struct spi_device *spi)
|
||||||
|
+{
|
||||||
|
+ return NULL;
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+static const struct of_device_id ad9834_of_match[] = {
|
||||||
|
+ {
|
||||||
|
+ .compatible = "adi,ad9833",
|
||||||
|
+ .data = (void *)ID_AD9833,
|
||||||
|
+ },
|
||||||
|
+ {
|
||||||
|
+ .compatible = "adi,ad9834",
|
||||||
|
+ .data = (void *)ID_AD9834,
|
||||||
|
+ },
|
||||||
|
+ {
|
||||||
|
+ .compatible = "adi,ad9837",
|
||||||
|
+ .data = (void *)ID_AD9837,
|
||||||
|
+ },
|
||||||
|
+ {
|
||||||
|
+ .compatible = "adi,ad9838",
|
||||||
|
+ .data = (void *)ID_AD9838,
|
||||||
|
+ },
|
||||||
|
+ { }
|
||||||
|
+};
|
||||||
|
+MODULE_DEVICE_TABLE(of, ad9834_of_match);
|
||||||
|
+
|
||||||
|
static int ad9834_probe(struct spi_device *spi)
|
||||||
|
{
|
||||||
|
- struct ad9834_platform_data *pdata = dev_get_platdata(&spi->dev);
|
||||||
|
+ const struct of_device_id *of_id = of_match_device(ad9834_of_match,
|
||||||
|
+ &spi->dev);
|
||||||
|
+ struct ad9834_platform_data *pdata;
|
||||||
|
struct ad9834_state *st;
|
||||||
|
struct iio_dev *indio_dev;
|
||||||
|
struct regulator *reg;
|
||||||
|
+ struct clk *clk = NULL;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
+ if (!pdata && spi->dev.of_node) {
|
||||||
|
+ pdata = ad9834_parse_dt(spi);
|
||||||
|
+ if (IS_ERR(pdata))
|
||||||
|
+ return PTR_ERR(pdata);
|
||||||
|
+ } else {
|
||||||
|
+ pdata = spi->dev.platform_data;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (!pdata) {
|
||||||
|
dev_dbg(&spi->dev, "no platform data?\n");
|
||||||
|
return -ENODEV;
|
||||||
|
@@ -346,9 +416,30 @@ static int ad9834_probe(struct spi_device *spi)
|
||||||
|
}
|
||||||
|
spi_set_drvdata(spi, indio_dev);
|
||||||
|
st = iio_priv(indio_dev);
|
||||||
|
- st->mclk = pdata->mclk;
|
||||||
|
+
|
||||||
|
+ if (!pdata->mclk) {
|
||||||
|
+ clk = devm_clk_get(&spi->dev, NULL);
|
||||||
|
+ if (IS_ERR(clk))
|
||||||
|
+ return -EPROBE_DEFER;
|
||||||
|
+
|
||||||
|
+ ret = clk_prepare_enable(clk);
|
||||||
|
+ if (ret < 0)
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (clk) {
|
||||||
|
+ st->clk = clk;
|
||||||
|
+ st->mclk = clk_get_rate(clk);
|
||||||
|
+ } else {
|
||||||
|
+ st->mclk = pdata->mclk;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (of_id)
|
||||||
|
+ st->devid = (enum ad9834_supported_device_ids)of_id->data;
|
||||||
|
+ else
|
||||||
|
+ st->devid = spi_get_device_id(spi)->driver_data;
|
||||||
|
+
|
||||||
|
st->spi = spi;
|
||||||
|
- st->devid = spi_get_device_id(spi)->driver_data;
|
||||||
|
st->reg = reg;
|
||||||
|
indio_dev->dev.parent = &spi->dev;
|
||||||
|
indio_dev->name = spi_get_device_id(spi)->name;
|
||||||
|
@@ -421,6 +512,9 @@ static int ad9834_probe(struct spi_device *spi)
|
||||||
|
error_disable_reg:
|
||||||
|
regulator_disable(reg);
|
||||||
|
|
||||||
|
+if (clk)
|
||||||
|
+ clk_disable_unprepare(clk);
|
||||||
|
+
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -431,6 +525,8 @@ static int ad9834_remove(struct spi_device *spi)
|
||||||
|
|
||||||
|
iio_device_unregister(indio_dev);
|
||||||
|
regulator_disable(st->reg);
|
||||||
|
+if (st->clk)
|
||||||
|
+ clk_disable_unprepare(st->clk);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@@ -447,6 +543,7 @@ MODULE_DEVICE_TABLE(spi, ad9834_id);
|
||||||
|
static struct spi_driver ad9834_driver = {
|
||||||
|
.driver = {
|
||||||
|
.name = "ad9834",
|
||||||
|
+ .of_match_table = of_match_ptr(ad9834_of_match),
|
||||||
|
},
|
||||||
|
.probe = ad9834_probe,
|
||||||
|
.remove = ad9834_remove,
|
||||||
|
diff --git a/drivers/staging/iio/frequency/ad9834.h b/drivers/staging/iio/frequency/ad9834.h
|
||||||
|
index 40fdd5da..fd9cccf3 100644
|
||||||
|
--- a/drivers/staging/iio/frequency/ad9834.h
|
||||||
|
+++ b/drivers/staging/iio/frequency/ad9834.h
|
||||||
|
@@ -53,6 +53,7 @@
|
||||||
|
struct ad9834_state {
|
||||||
|
struct spi_device *spi;
|
||||||
|
struct regulator *reg;
|
||||||
|
+ struct clk *clk;
|
||||||
|
unsigned int mclk;
|
||||||
|
unsigned short control;
|
||||||
|
unsigned short devid;
|
|
@ -0,0 +1,360 @@
|
||||||
|
diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
|
||||||
|
index bc07ad3..e9da9cf 100644
|
||||||
|
--- a/drivers/of/Kconfig
|
||||||
|
+++ b/drivers/of/Kconfig
|
||||||
|
@@ -113,6 +113,13 @@ config OF_OVERLAY
|
||||||
|
While this option is selected automatically when needed, you can
|
||||||
|
enable it manually to improve device tree unit test coverage.
|
||||||
|
|
||||||
|
+config OF_CONFIGFS
|
||||||
|
+ bool "Device Tree Overlay ConfigFS interface"
|
||||||
|
+ select CONFIGFS_FS
|
||||||
|
+ depends on OF_OVERLAY
|
||||||
|
+ help
|
||||||
|
+ Enable a simple user-space driven DT overlay interface.
|
||||||
|
+
|
||||||
|
config OF_NUMA
|
||||||
|
bool
|
||||||
|
|
||||||
|
diff --git a/drivers/of/Makefile b/drivers/of/Makefile
|
||||||
|
index d7efd9d..a06cc35 100644
|
||||||
|
--- a/drivers/of/Makefile
|
||||||
|
+++ b/drivers/of/Makefile
|
||||||
|
@@ -13,6 +13,7 @@ obj-$(CONFIG_OF_PCI_IRQ) += of_pci_irq.o
|
||||||
|
obj-$(CONFIG_OF_RESERVED_MEM) += of_reserved_mem.o
|
||||||
|
obj-$(CONFIG_OF_RESOLVE) += resolver.o
|
||||||
|
obj-$(CONFIG_OF_OVERLAY) += overlay.o
|
||||||
|
+obj-$(CONFIG_OF_CONFIGFS) += configfs.o
|
||||||
|
obj-$(CONFIG_OF_NUMA) += of_numa.o
|
||||||
|
|
||||||
|
obj-$(CONFIG_OF_UNITTEST) += unittest-data/
|
||||||
|
diff --git a/drivers/of/configfs.c b/drivers/of/configfs.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..68f889d
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/drivers/of/configfs.c
|
||||||
|
@@ -0,0 +1,311 @@
|
||||||
|
+/*
|
||||||
|
+ * Configfs entries for device-tree
|
||||||
|
+ *
|
||||||
|
+ * Copyright (C) 2013 - Pantelis Antoniou <panto@antoniou-consulting.com>
|
||||||
|
+ *
|
||||||
|
+ * This program 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.
|
||||||
|
+ */
|
||||||
|
+#include <linux/ctype.h>
|
||||||
|
+#include <linux/cpu.h>
|
||||||
|
+#include <linux/module.h>
|
||||||
|
+#include <linux/of.h>
|
||||||
|
+#include <linux/of_fdt.h>
|
||||||
|
+#include <linux/spinlock.h>
|
||||||
|
+#include <linux/slab.h>
|
||||||
|
+#include <linux/proc_fs.h>
|
||||||
|
+#include <linux/configfs.h>
|
||||||
|
+#include <linux/types.h>
|
||||||
|
+#include <linux/stat.h>
|
||||||
|
+#include <linux/limits.h>
|
||||||
|
+#include <linux/file.h>
|
||||||
|
+#include <linux/vmalloc.h>
|
||||||
|
+#include <linux/firmware.h>
|
||||||
|
+#include <linux/sizes.h>
|
||||||
|
+
|
||||||
|
+#include "of_private.h"
|
||||||
|
+
|
||||||
|
+struct cfs_overlay_item {
|
||||||
|
+ struct config_item item;
|
||||||
|
+
|
||||||
|
+ char path[PATH_MAX];
|
||||||
|
+
|
||||||
|
+ const struct firmware *fw;
|
||||||
|
+ struct device_node *overlay;
|
||||||
|
+ int ov_id;
|
||||||
|
+
|
||||||
|
+ void *dtbo;
|
||||||
|
+ int dtbo_size;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static int create_overlay(struct cfs_overlay_item *overlay, void *blob)
|
||||||
|
+{
|
||||||
|
+ int err;
|
||||||
|
+
|
||||||
|
+ /* unflatten the tree */
|
||||||
|
+ of_fdt_unflatten_tree(blob, NULL, &overlay->overlay);
|
||||||
|
+ if (overlay->overlay == NULL) {
|
||||||
|
+ pr_err("%s: failed to unflatten tree\n", __func__);
|
||||||
|
+ err = -EINVAL;
|
||||||
|
+ goto out_err;
|
||||||
|
+ }
|
||||||
|
+ pr_debug("%s: unflattened OK\n", __func__);
|
||||||
|
+
|
||||||
|
+ /* mark it as detached */
|
||||||
|
+ of_node_set_flag(overlay->overlay, OF_DETACHED);
|
||||||
|
+
|
||||||
|
+ /* perform resolution */
|
||||||
|
+ err = of_resolve_phandles(overlay->overlay);
|
||||||
|
+ if (err != 0) {
|
||||||
|
+ pr_err("%s: Failed to resolve tree\n", __func__);
|
||||||
|
+ goto out_err;
|
||||||
|
+ }
|
||||||
|
+ pr_debug("%s: resolved OK\n", __func__);
|
||||||
|
+
|
||||||
|
+ err = of_overlay_create(overlay->overlay);
|
||||||
|
+ if (err < 0) {
|
||||||
|
+ pr_err("%s: Failed to create overlay (err=%d)\n",
|
||||||
|
+ __func__, err);
|
||||||
|
+ goto out_err;
|
||||||
|
+ }
|
||||||
|
+ overlay->ov_id = err;
|
||||||
|
+
|
||||||
|
+out_err:
|
||||||
|
+ return err;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static inline struct cfs_overlay_item *to_cfs_overlay_item(
|
||||||
|
+ struct config_item *item)
|
||||||
|
+{
|
||||||
|
+ return item ? container_of(item, struct cfs_overlay_item, item) : NULL;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static ssize_t cfs_overlay_item_path_show(struct config_item *item,
|
||||||
|
+ char *page)
|
||||||
|
+{
|
||||||
|
+ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item);
|
||||||
|
+ return sprintf(page, "%s\n", overlay->path);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static ssize_t cfs_overlay_item_path_store(struct config_item *item,
|
||||||
|
+ const char *page, size_t count)
|
||||||
|
+{
|
||||||
|
+ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item);
|
||||||
|
+ const char *p = page;
|
||||||
|
+ char *s;
|
||||||
|
+ int err;
|
||||||
|
+
|
||||||
|
+ /* if it's set do not allow changes */
|
||||||
|
+ if (overlay->path[0] != '\0' || overlay->dtbo_size > 0)
|
||||||
|
+ return -EPERM;
|
||||||
|
+
|
||||||
|
+ /* copy to path buffer (and make sure it's always zero terminated */
|
||||||
|
+ count = snprintf(overlay->path, sizeof(overlay->path) - 1, "%s", p);
|
||||||
|
+ overlay->path[sizeof(overlay->path) - 1] = '\0';
|
||||||
|
+
|
||||||
|
+ /* strip trailing newlines */
|
||||||
|
+ s = overlay->path + strlen(overlay->path);
|
||||||
|
+ while (s > overlay->path && *--s == '\n')
|
||||||
|
+ *s = '\0';
|
||||||
|
+
|
||||||
|
+ pr_debug("%s: path is '%s'\n", __func__, overlay->path);
|
||||||
|
+
|
||||||
|
+ err = request_firmware(&overlay->fw, overlay->path, NULL);
|
||||||
|
+ if (err != 0)
|
||||||
|
+ goto out_err;
|
||||||
|
+
|
||||||
|
+ err = create_overlay(overlay, (void *)overlay->fw->data);
|
||||||
|
+ if (err != 0)
|
||||||
|
+ goto out_err;
|
||||||
|
+
|
||||||
|
+ return count;
|
||||||
|
+
|
||||||
|
+out_err:
|
||||||
|
+
|
||||||
|
+ release_firmware(overlay->fw);
|
||||||
|
+ overlay->fw = NULL;
|
||||||
|
+
|
||||||
|
+ overlay->path[0] = '\0';
|
||||||
|
+ return err;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static ssize_t cfs_overlay_item_status_show(struct config_item *item,
|
||||||
|
+ char *page)
|
||||||
|
+{
|
||||||
|
+ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item);
|
||||||
|
+
|
||||||
|
+ return sprintf(page, "%s\n",
|
||||||
|
+ overlay->ov_id >= 0 ? "applied" : "unapplied");
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+CONFIGFS_ATTR(cfs_overlay_item_, path);
|
||||||
|
+CONFIGFS_ATTR_RO(cfs_overlay_item_, status);
|
||||||
|
+
|
||||||
|
+static struct configfs_attribute *cfs_overlay_attrs[] = {
|
||||||
|
+ &cfs_overlay_item_attr_path,
|
||||||
|
+ &cfs_overlay_item_attr_status,
|
||||||
|
+ NULL,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+ssize_t cfs_overlay_item_dtbo_read(struct config_item *item,
|
||||||
|
+ void *buf, size_t max_count)
|
||||||
|
+{
|
||||||
|
+ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item);
|
||||||
|
+
|
||||||
|
+ pr_debug("%s: buf=%p max_count=%zu\n", __func__,
|
||||||
|
+ buf, max_count);
|
||||||
|
+
|
||||||
|
+ if (overlay->dtbo == NULL)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ /* copy if buffer provided */
|
||||||
|
+ if (buf != NULL) {
|
||||||
|
+ /* the buffer must be large enough */
|
||||||
|
+ if (overlay->dtbo_size > max_count)
|
||||||
|
+ return -ENOSPC;
|
||||||
|
+
|
||||||
|
+ memcpy(buf, overlay->dtbo, overlay->dtbo_size);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return overlay->dtbo_size;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+ssize_t cfs_overlay_item_dtbo_write(struct config_item *item,
|
||||||
|
+ const void *buf, size_t count)
|
||||||
|
+{
|
||||||
|
+ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item);
|
||||||
|
+ int err;
|
||||||
|
+
|
||||||
|
+ /* if it's set do not allow changes */
|
||||||
|
+ if (overlay->path[0] != '\0' || overlay->dtbo_size > 0)
|
||||||
|
+ return -EPERM;
|
||||||
|
+
|
||||||
|
+ /* copy the contents */
|
||||||
|
+ overlay->dtbo = kmemdup(buf, count, GFP_KERNEL);
|
||||||
|
+ if (overlay->dtbo == NULL)
|
||||||
|
+ return -ENOMEM;
|
||||||
|
+
|
||||||
|
+ overlay->dtbo_size = count;
|
||||||
|
+
|
||||||
|
+ err = create_overlay(overlay, overlay->dtbo);
|
||||||
|
+ if (err != 0)
|
||||||
|
+ goto out_err;
|
||||||
|
+
|
||||||
|
+ return count;
|
||||||
|
+
|
||||||
|
+out_err:
|
||||||
|
+ kfree(overlay->dtbo);
|
||||||
|
+ overlay->dtbo = NULL;
|
||||||
|
+ overlay->dtbo_size = 0;
|
||||||
|
+
|
||||||
|
+ return err;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+CONFIGFS_BIN_ATTR(cfs_overlay_item_, dtbo, NULL, SZ_1M);
|
||||||
|
+
|
||||||
|
+static struct configfs_bin_attribute *cfs_overlay_bin_attrs[] = {
|
||||||
|
+ &cfs_overlay_item_attr_dtbo,
|
||||||
|
+ NULL,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static void cfs_overlay_release(struct config_item *item)
|
||||||
|
+{
|
||||||
|
+ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item);
|
||||||
|
+
|
||||||
|
+ if (overlay->ov_id >= 0)
|
||||||
|
+ of_overlay_destroy(overlay->ov_id);
|
||||||
|
+ if (overlay->fw)
|
||||||
|
+ release_firmware(overlay->fw);
|
||||||
|
+ /* kfree with NULL is safe */
|
||||||
|
+ kfree(overlay->dtbo);
|
||||||
|
+ kfree(overlay);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static struct configfs_item_operations cfs_overlay_item_ops = {
|
||||||
|
+ .release = cfs_overlay_release,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static struct config_item_type cfs_overlay_type = {
|
||||||
|
+ .ct_item_ops = &cfs_overlay_item_ops,
|
||||||
|
+ .ct_attrs = cfs_overlay_attrs,
|
||||||
|
+ .ct_bin_attrs = cfs_overlay_bin_attrs,
|
||||||
|
+ .ct_owner = THIS_MODULE,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static struct config_item *cfs_overlay_group_make_item(
|
||||||
|
+ struct config_group *group, const char *name)
|
||||||
|
+{
|
||||||
|
+ struct cfs_overlay_item *overlay;
|
||||||
|
+
|
||||||
|
+ overlay = kzalloc(sizeof(*overlay), GFP_KERNEL);
|
||||||
|
+ if (!overlay)
|
||||||
|
+ return ERR_PTR(-ENOMEM);
|
||||||
|
+ overlay->ov_id = -1;
|
||||||
|
+
|
||||||
|
+ config_item_init_type_name(&overlay->item, name, &cfs_overlay_type);
|
||||||
|
+ return &overlay->item;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void cfs_overlay_group_drop_item(struct config_group *group,
|
||||||
|
+ struct config_item *item)
|
||||||
|
+{
|
||||||
|
+ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item);
|
||||||
|
+
|
||||||
|
+ config_item_put(&overlay->item);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static struct configfs_group_operations overlays_ops = {
|
||||||
|
+ .make_item = cfs_overlay_group_make_item,
|
||||||
|
+ .drop_item = cfs_overlay_group_drop_item,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static struct config_item_type overlays_type = {
|
||||||
|
+ .ct_group_ops = &overlays_ops,
|
||||||
|
+ .ct_owner = THIS_MODULE,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static struct configfs_group_operations of_cfs_ops = {
|
||||||
|
+ /* empty - we don't allow anything to be created */
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static struct config_item_type of_cfs_type = {
|
||||||
|
+ .ct_group_ops = &of_cfs_ops,
|
||||||
|
+ .ct_owner = THIS_MODULE,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+struct config_group of_cfs_overlay_group;
|
||||||
|
+
|
||||||
|
+static struct configfs_subsystem of_cfs_subsys = {
|
||||||
|
+ .su_group = {
|
||||||
|
+ .cg_item = {
|
||||||
|
+ .ci_namebuf = "device-tree",
|
||||||
|
+ .ci_type = &of_cfs_type,
|
||||||
|
+ },
|
||||||
|
+ },
|
||||||
|
+ .su_mutex = __MUTEX_INITIALIZER(of_cfs_subsys.su_mutex),
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static int __init of_cfs_init(void)
|
||||||
|
+{
|
||||||
|
+ int ret;
|
||||||
|
+
|
||||||
|
+ pr_info("%s\n", __func__);
|
||||||
|
+
|
||||||
|
+ config_group_init(&of_cfs_subsys.su_group);
|
||||||
|
+ config_group_init_type_name(&of_cfs_overlay_group, "overlays",
|
||||||
|
+ &overlays_type);
|
||||||
|
+ configfs_add_default_group(&of_cfs_overlay_group,
|
||||||
|
+ &of_cfs_subsys.su_group);
|
||||||
|
+
|
||||||
|
+ ret = configfs_register_subsystem(&of_cfs_subsys);
|
||||||
|
+ if (ret != 0) {
|
||||||
|
+ pr_err("%s: failed to register subsys\n", __func__);
|
||||||
|
+ goto out;
|
||||||
|
+ }
|
||||||
|
+ pr_info("%s: OK\n", __func__);
|
||||||
|
+out:
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+late_initcall(of_cfs_init);
|
||||||
|
diff --git a/drivers/of/fdt_address.c b/drivers/of/fdt_address.c
|
||||||
|
index dca8f9b..ec7e167 100644
|
||||||
|
--- a/drivers/of/fdt_address.c
|
||||||
|
+++ b/drivers/of/fdt_address.c
|
||||||
|
@@ -161,7 +161,7 @@ static int __init fdt_translate_one(const void *blob, int parent,
|
||||||
|
* that can be mapped to a cpu physical address). This is not really specified
|
||||||
|
* that way, but this is traditionally the way IBM at least do things
|
||||||
|
*/
|
||||||
|
-static u64 __init fdt_translate_address(const void *blob, int node_offset)
|
||||||
|
+u64 __init fdt_translate_address(const void *blob, int node_offset)
|
||||||
|
{
|
||||||
|
int parent, len;
|
||||||
|
const struct of_bus *bus, *pbus;
|
|
@ -0,0 +1,103 @@
|
||||||
|
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi b/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
|
||||||
|
index 2216e68d..143ebc06 100644
|
||||||
|
--- a/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
|
||||||
|
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
|
||||||
|
@@ -48,6 +48,7 @@
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||||
|
+#include <dt-bindings/thermal/thermal.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
aliases {
|
||||||
|
@@ -88,12 +89,90 @@
|
||||||
|
gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+ vdd_cpux: gpio-regulator {
|
||||||
|
+ compatible = "regulator-gpio";
|
||||||
|
+ regulator-name = "vdd-cpux";
|
||||||
|
+ regulator-type = "voltage";
|
||||||
|
+ regulator-boot-on;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ regulator-min-microvolt = <1100000>;
|
||||||
|
+ regulator-max-microvolt = <1300000>;
|
||||||
|
+ regulator-ramp-delay = <50>; /* 4ms */
|
||||||
|
+ gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ gpios-states = <0x1>;
|
||||||
|
+ states = <1100000 0x0
|
||||||
|
+ 1300000 0x1>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cpu0 {
|
||||||
|
+ operating-points = <
|
||||||
|
+ 1008000 1300000
|
||||||
|
+ 816000 1100000
|
||||||
|
+ 624000 1100000
|
||||||
|
+ 480000 1100000
|
||||||
|
+ 312000 1100000
|
||||||
|
+ 240000 1100000
|
||||||
|
+ 120000 1100000
|
||||||
|
+ >;
|
||||||
|
+ #cooling-cells = <2>;
|
||||||
|
+ cooling-min-level = <0>;
|
||||||
|
+ cooling-max-level = <6>;
|
||||||
|
+ cpu0-supply = <&vdd_cpux>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cpu_thermal {
|
||||||
|
+ trips {
|
||||||
|
+ cpu_warm: cpu_warm {
|
||||||
|
+ temperature = <65000>;
|
||||||
|
+ hysteresis = <2000>;
|
||||||
|
+ type = "passive";
|
||||||
|
+ };
|
||||||
|
+ cpu_hot: cpu_hot {
|
||||||
|
+ temperature = <75000>;
|
||||||
|
+ hysteresis = <2000>;
|
||||||
|
+ type = "passive";
|
||||||
|
+ };
|
||||||
|
+ cpu_very_hot: cpu_very_hot {
|
||||||
|
+ temperature = <90000>;
|
||||||
|
+ hysteresis = <2000>;
|
||||||
|
+ type = "passive";
|
||||||
|
+ };
|
||||||
|
+ cpu_crit: cpu_crit {
|
||||||
|
+ temperature = <105000>;
|
||||||
|
+ hysteresis = <2000>;
|
||||||
|
+ type = "critical";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ cooling-maps {
|
||||||
|
+ cpu_warm_limit_cpu {
|
||||||
|
+ trip = <&cpu_warm>;
|
||||||
|
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT 1>;
|
||||||
|
+ };
|
||||||
|
+ cpu_hot_limit_cpu {
|
||||||
|
+ trip = <&cpu_hot>;
|
||||||
|
+ cooling-device = <&cpu0 2 3>;
|
||||||
|
+ };
|
||||||
|
+ cpu_very_hot_limit_cpu {
|
||||||
|
+ trip = <&cpu_very_hot>;
|
||||||
|
+ cooling-device = <&cpu0 5 THERMAL_NO_LIMIT>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
&ehci3 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
+&emac {
|
||||||
|
+ phy-handle = <&int_mii_phy>;
|
||||||
|
+ phy-mode = "mii";
|
||||||
|
+ allwinner,leds-active-low;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&mmc0 {
|
||||||
|
bus-width = <4>;
|
||||||
|
cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
|
|
@ -0,0 +1,36 @@
|
||||||
|
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts
|
||||||
|
index 5851a47a..c2f1baa2 100644
|
||||||
|
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts
|
||||||
|
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts
|
||||||
|
@@ -50,4 +50,31 @@
|
||||||
|
/ {
|
||||||
|
model = "Xunlong Orange Pi Plus 2E";
|
||||||
|
compatible = "xunlong,orangepi-plus2e", "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ reg_gmac_3v3: gmac-3v3 {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "gmac-3v3";
|
||||||
|
+ regulator-min-microvolt = <3300000>;
|
||||||
|
+ regulator-max-microvolt = <3300000>;
|
||||||
|
+ startup-delay-us = <100000>;
|
||||||
|
+ enable-active-high;
|
||||||
|
+ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mdio {
|
||||||
|
+ ext_rgmii_phy: ethernet-phy@1 {
|
||||||
|
+ reg = <0>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&emac {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&emac_rgmii_pins>;
|
||||||
|
+ phy-supply = <®_gmac_3v3>;
|
||||||
|
+ phy-handle = <&ext_rgmii_phy>;
|
||||||
|
+ phy-mode = "rgmii";
|
||||||
|
+
|
||||||
|
+ allwinner,leds-active-low;
|
||||||
|
+ status = "okay";
|
||||||
|
};
|
|
@ -0,0 +1,20 @@
|
||||||
|
diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
|
||||||
|
index e94f196..69a4840 100644
|
||||||
|
--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
|
||||||
|
+++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
|
||||||
|
@@ -104,6 +104,15 @@
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
+&emac {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ phy-supply = <®_vcc3v3>;
|
||||||
|
+ phy-handle = <&int_mii_phy>;
|
||||||
|
+ phy-mode = "mii";
|
||||||
|
+ allwinner,leds-active-low;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&mmc0 {
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&mmc0_pins_a>;
|
|
@ -0,0 +1,999 @@
|
||||||
|
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||||
|
index 01180849..81523d5a 100644
|
||||||
|
--- a/arch/arm/boot/dts/Makefile
|
||||||
|
+++ b/arch/arm/boot/dts/Makefile
|
||||||
|
@@ -1016,4 +1017,7 @@ dtstree := $(srctree)/$(src)
|
||||||
|
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
|
||||||
|
|
||||||
|
always := $(dtb-y)
|
||||||
|
+subdir-y := overlay
|
||||||
|
clean-files := *.dtb
|
||||||
|
+
|
||||||
|
+dts-dirs += overlay
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/Makefile b/arch/arm/boot/dts/overlay/Makefile
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..f9ca2574
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/Makefile
|
||||||
|
@@ -0,0 +1,28 @@
|
||||||
|
+dtbo-$(CONFIG_MACH_SUN8I) += \
|
||||||
|
+ sun8i-h3-analog-codec.dtbo \
|
||||||
|
+ sun8i-h3-cir.dtbo \
|
||||||
|
+ sun8i-h3-i2c0.dtbo \
|
||||||
|
+ sun8i-h3-i2c1.dtbo \
|
||||||
|
+ sun8i-h3-i2c2.dtbo \
|
||||||
|
+ sun8i-h3-pps-gpio.dtbo \
|
||||||
|
+ sun8i-h3-pwm.dtbo \
|
||||||
|
+ sun8i-h3-spdif-out.dtbo \
|
||||||
|
+ sun8i-h3-spi-add-cs1.dtbo \
|
||||||
|
+ sun8i-h3-spi-jedec-nor.dtbo \
|
||||||
|
+ sun8i-h3-spi-spidev.dtbo \
|
||||||
|
+ sun8i-h3-uart1.dtbo \
|
||||||
|
+ sun8i-h3-uart2.dtbo \
|
||||||
|
+ sun8i-h3-uart3.dtbo \
|
||||||
|
+ sun8i-h3-usbhost0.dtbo \
|
||||||
|
+ sun8i-h3-usbhost2.dtbo \
|
||||||
|
+ sun8i-h3-usbhost3.dtbo \
|
||||||
|
+ sun8i-h3-w1-gpio.dtbo
|
||||||
|
+
|
||||||
|
+scr-$(CONFIG_MACH_SUN8I) += sun8i-h3-fixup.scr
|
||||||
|
+
|
||||||
|
+dtbotxt-$(CONFIG_MACH_SUN8I) += README.sun8i-h3-overlays
|
||||||
|
+
|
||||||
|
+targets += $(dtbo-y) $(scr-y) $(dtbotxt-y)
|
||||||
|
+
|
||||||
|
+always := $(dtbo-y) $(scr-y) $(dtbotxt-y)
|
||||||
|
+clean-files := *.dtbo *.scr
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/README.sun8i-h3-overlays b/arch/arm/boot/dts/overlay/README.sun8i-h3-overlays
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..0ae207a1
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/README.sun8i-h3-overlays
|
||||||
|
@@ -0,0 +1,245 @@
|
||||||
|
+This document describes overlays provided in the kernel packages
|
||||||
|
+For generic Armbian overlays documentation please see
|
||||||
|
+https://docs.armbian.com/User-Guide_Allwinner_overlays/
|
||||||
|
+
|
||||||
|
+### Platform:
|
||||||
|
+
|
||||||
|
+sun8i-h3 (Allwinner H3)
|
||||||
|
+
|
||||||
|
+### Platform details:
|
||||||
|
+
|
||||||
|
+Supported pin banks: PA, PC, PD, PG
|
||||||
|
+
|
||||||
|
+Both SPI controllers have only one hardware CS pin exposed,
|
||||||
|
+adding fixed software (GPIO) chip selects is possible with a separate overlay
|
||||||
|
+
|
||||||
|
+### Provided overlays:
|
||||||
|
+
|
||||||
|
+- analog-codec
|
||||||
|
+- cir
|
||||||
|
+- i2c0
|
||||||
|
+- i2c1
|
||||||
|
+- i2c2
|
||||||
|
+- pps-gpio
|
||||||
|
+- pwm
|
||||||
|
+- spdif-out
|
||||||
|
+- spi-add-cs1
|
||||||
|
+- spi-jedec-nor
|
||||||
|
+- spi-spidev
|
||||||
|
+- uart1
|
||||||
|
+- uart2
|
||||||
|
+- uart3
|
||||||
|
+- usbhost0
|
||||||
|
+- usbhost2
|
||||||
|
+- usbhost3
|
||||||
|
+- w1-gpio
|
||||||
|
+
|
||||||
|
+### Overlay details:
|
||||||
|
+
|
||||||
|
+### analog-codec
|
||||||
|
+
|
||||||
|
+Activates SoC analog codec driver that provides Line Out and Mic In
|
||||||
|
+functionality
|
||||||
|
+
|
||||||
|
+### cir
|
||||||
|
+
|
||||||
|
+Activates CIR (Infrared remote) receiver
|
||||||
|
+
|
||||||
|
+CIR pin: PL11
|
||||||
|
+
|
||||||
|
+### i2c0
|
||||||
|
+
|
||||||
|
+Activates TWI/I2C bus 0
|
||||||
|
+
|
||||||
|
+I2C0 pins (SCL, SDA): PA11, PA12
|
||||||
|
+
|
||||||
|
+### i2c1
|
||||||
|
+
|
||||||
|
+Activates TWI/I2C bus 1
|
||||||
|
+
|
||||||
|
+I2C1 pins (SCL, SDA): PA18, PA19
|
||||||
|
+
|
||||||
|
+### i2c2
|
||||||
|
+
|
||||||
|
+Activates TWI/I2C bus 2
|
||||||
|
+
|
||||||
|
+I2C2 pins (SCL, SDA): PE12, PE13
|
||||||
|
+
|
||||||
|
+On most board this bus is wired to Camera (CSI) socket
|
||||||
|
+
|
||||||
|
+### pps-gpio
|
||||||
|
+
|
||||||
|
+Activates pulse-per-second GPIO client
|
||||||
|
+
|
||||||
|
+Parameters:
|
||||||
|
+
|
||||||
|
+param_pps_pin (pin)
|
||||||
|
+ Pin PPS source is connected to
|
||||||
|
+ Optional
|
||||||
|
+ Default: PD14
|
||||||
|
+
|
||||||
|
+param_pps_falling_edge (bool)
|
||||||
|
+ Assert by falling edge
|
||||||
|
+ Optional
|
||||||
|
+ Default: 0
|
||||||
|
+ When set (to 1), assert is indicated by a falling edge
|
||||||
|
+ (instead of by a rising edge)
|
||||||
|
+
|
||||||
|
+### pwm
|
||||||
|
+
|
||||||
|
+Activates hardware PWM controller
|
||||||
|
+
|
||||||
|
+PWM pin: PA5
|
||||||
|
+
|
||||||
|
+Pin PA5 is used as UART0 RX by default, so if this overlay is activated,
|
||||||
|
+UART0 and kernel console on ttyS0 will be disabled
|
||||||
|
+
|
||||||
|
+### spdif-out
|
||||||
|
+
|
||||||
|
+Activates SPDIF/Toslink audio output
|
||||||
|
+
|
||||||
|
+SPDIF pin: PA17
|
||||||
|
+
|
||||||
|
+### spi-add-cs1
|
||||||
|
+
|
||||||
|
+Adds support for using SPI chip select 1 with GPIO for both SPI controllers
|
||||||
|
+Respective GPIO will be claimed only if controller is enabled by another
|
||||||
|
+overlay
|
||||||
|
+This overlay is required for using chip select 1 with other SPI overlays
|
||||||
|
+Due to the u-boot limitations CS1 pin can't be customized by a parameter, but
|
||||||
|
+it can be changed by using an edited copy of this overlay
|
||||||
|
+A total of 4 chip selects can be used with custom overlays (1 HW + 3 GPIO)
|
||||||
|
+
|
||||||
|
+SPI 0 pins (CS1): PA21
|
||||||
|
+SPI 1 pins (CS1): PA10
|
||||||
|
+
|
||||||
|
+### spi-jedec-nor
|
||||||
|
+
|
||||||
|
+Activates MTD support for JEDEC compatible SPI NOR flash chips on SPI bus
|
||||||
|
+supported by the kernel SPI NOR driver
|
||||||
|
+
|
||||||
|
+SPI 0 pins (MOSI, MISO, SCK, CS): PC0, PC1, PC2, PC3
|
||||||
|
+SPI 1 pins (MOSI, MISO, SCK, CS): PA15, PA16, PA14, PA13
|
||||||
|
+
|
||||||
|
+Parameters:
|
||||||
|
+
|
||||||
|
+param_spinor_spi_bus (int)
|
||||||
|
+ SPI bus to activate SPI NOR flash support on
|
||||||
|
+ Required
|
||||||
|
+ Supported values: 0, 1
|
||||||
|
+
|
||||||
|
+param_spinor_spi_cs (int)
|
||||||
|
+ SPI chip select number
|
||||||
|
+ Optional
|
||||||
|
+ Default: 0
|
||||||
|
+ Supported values: 0, 1
|
||||||
|
+ Using chip select 1 requires using "spi-add-cs1" overlay
|
||||||
|
+
|
||||||
|
+param_spinor_max_freq (int)
|
||||||
|
+ Maximum SPI frequency
|
||||||
|
+ Optional
|
||||||
|
+ Default: 1000000
|
||||||
|
+ Range: 3000 - 100000000
|
||||||
|
+
|
||||||
|
+### spi-spidev
|
||||||
|
+
|
||||||
|
+Activates SPIdev device node (/dev/spidevX.Y) for userspace SPI access,
|
||||||
|
+where X is the bus number and Y is the CS number
|
||||||
|
+
|
||||||
|
+SPI 0 pins (MOSI, MISO, SCK, CS): PC0, PC1, PC2, PC3
|
||||||
|
+SPI 1 pins (MOSI, MISO, SCK, CS): PA15, PA16, PA14, PA13
|
||||||
|
+
|
||||||
|
+Parameters:
|
||||||
|
+
|
||||||
|
+param_spidev_spi_bus (int)
|
||||||
|
+ SPI bus to activate SPIdev support on
|
||||||
|
+ Required
|
||||||
|
+ Supported values: 0, 1
|
||||||
|
+
|
||||||
|
+param_spidev_spi_cs (int)
|
||||||
|
+ SPI chip select number
|
||||||
|
+ Optional
|
||||||
|
+ Default: 0
|
||||||
|
+ Supported values: 0, 1
|
||||||
|
+ Using chip select 1 requires using "spi-add-cs1" overlay
|
||||||
|
+
|
||||||
|
+param_spidev_max_freq (int)
|
||||||
|
+ Maximum SPIdev frequency
|
||||||
|
+ Optional
|
||||||
|
+ Default: 1000000
|
||||||
|
+ Range: 3000 - 100000000
|
||||||
|
+
|
||||||
|
+### uart1
|
||||||
|
+
|
||||||
|
+Activates serial port 1 (/dev/ttyS1)
|
||||||
|
+
|
||||||
|
+UART 1 pins (TX, RX, RTS, CTS): PG6, PG7, PG8, PG9
|
||||||
|
+
|
||||||
|
+Parameters:
|
||||||
|
+
|
||||||
|
+param_uart1_rtscts (bool)
|
||||||
|
+ Enable RTS and CTS pins
|
||||||
|
+ Optional
|
||||||
|
+ Default: 0
|
||||||
|
+ Set to 1 to enable
|
||||||
|
+
|
||||||
|
+### uart2
|
||||||
|
+
|
||||||
|
+Activates serial port 2 (/dev/ttyS2)
|
||||||
|
+
|
||||||
|
+UART 2 pins (TX, RX, RTS, CTS): PA0, PA1, PA2, PA3
|
||||||
|
+
|
||||||
|
+Parameters:
|
||||||
|
+
|
||||||
|
+param_uart2_rtscts (bool)
|
||||||
|
+ Enable RTS and CTS pins
|
||||||
|
+ Optional
|
||||||
|
+ Default: 0
|
||||||
|
+ Set to 1 to enable CTS and RTS pins
|
||||||
|
+
|
||||||
|
+### uart3
|
||||||
|
+
|
||||||
|
+Activates serial port 3 (/dev/ttyS3)
|
||||||
|
+
|
||||||
|
+UART 3 pins (TX, RX, RTS, CTS): PA13, PA14, PA15, PA16
|
||||||
|
+
|
||||||
|
+Parameters:
|
||||||
|
+
|
||||||
|
+param_uart3_rtscts (bool)
|
||||||
|
+ Enable RTS and CTS pins
|
||||||
|
+ Optional
|
||||||
|
+ Default: 0
|
||||||
|
+ Set to 1 to enable CTS and RTS pins
|
||||||
|
+
|
||||||
|
+### usbhost0
|
||||||
|
+
|
||||||
|
+Activates USB host controller 0
|
||||||
|
+
|
||||||
|
+### usbhost2
|
||||||
|
+
|
||||||
|
+Activates USB host controller 2
|
||||||
|
+
|
||||||
|
+### usbhost3
|
||||||
|
+
|
||||||
|
+Activates USB host controller 3
|
||||||
|
+
|
||||||
|
+### w1-gpio
|
||||||
|
+
|
||||||
|
+Activates 1-Wire GPIO master
|
||||||
|
+Requires an external pull-up resistor on the data pin
|
||||||
|
+or enabling the internal pull-up
|
||||||
|
+
|
||||||
|
+Parameters:
|
||||||
|
+
|
||||||
|
+param_w1_pin (pin)
|
||||||
|
+ Data pin for 1-Wire master
|
||||||
|
+ Optional
|
||||||
|
+ Default: PD14
|
||||||
|
+
|
||||||
|
+param_w1_pin_int_pullup (bool)
|
||||||
|
+ Enable internal pull-up for the data pin
|
||||||
|
+ Optional
|
||||||
|
+ Default: 0
|
||||||
|
+ Set to 1 to enable the pull-up
|
||||||
|
+ This option should not be used with multiple devices, parasite power setup
|
||||||
|
+ or long wires - please use external pull-up resistor instead
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-analog-codec.dts b/arch/arm/boot/dts/overlay/sun8i-h3-analog-codec.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..36dbc31a
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-analog-codec.dts
|
||||||
|
@@ -0,0 +1,17 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&codec>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ allwinner,audio-routing =
|
||||||
|
+ "Line Out", "LINEOUT",
|
||||||
|
+ "MIC1", "Mic",
|
||||||
|
+ "Mic", "MBIAS";
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-cir.dts b/arch/arm/boot/dts/overlay/sun8i-h3-cir.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..9b62fd2b
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-cir.dts
|
||||||
|
@@ -0,0 +1,15 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&ir>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&ir_pins_a>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-fixup.scr-cmd b/arch/arm/boot/dts/overlay/sun8i-h3-fixup.scr-cmd
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..744889c6
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-fixup.scr-cmd
|
||||||
|
@@ -0,0 +1,110 @@
|
||||||
|
+# overlays fixup script
|
||||||
|
+# implements (or rather substitutes) overlay arguments functionality
|
||||||
|
+# using u-boot scripting, environment variables and "fdt" command
|
||||||
|
+
|
||||||
|
+# setexpr test_var ${tmp_bank} - A
|
||||||
|
+# works only for hex numbers (A-F)
|
||||||
|
+
|
||||||
|
+setenv decompose_pin 'setexpr tmp_bank sub "P(A|C|D|G)\\d+" "\\1";
|
||||||
|
+setexpr tmp_pin sub "P\\S(\\d+)" "\\1";
|
||||||
|
+test "${tmp_bank}" = "A" && setenv tmp_bank 0;
|
||||||
|
+test "${tmp_bank}" = "C" && setenv tmp_bank 2;
|
||||||
|
+test "${tmp_bank}" = "D" && setenv tmp_bank 3;
|
||||||
|
+test "${tmp_bank}" = "G" && setenv tmp_bank 6'
|
||||||
|
+
|
||||||
|
+if test -n "${param_spinor_spi_bus}"; then
|
||||||
|
+ test "${param_spinor_spi_bus}" = "0" && setenv tmp_spi_path "spi@01c68000"
|
||||||
|
+ test "${param_spinor_spi_bus}" = "1" && setenv tmp_spi_path "spi@01c69000"
|
||||||
|
+ fdt set /soc/${tmp_spi_path} status "okay"
|
||||||
|
+ fdt set /soc/${tmp_spi_path}/spiflash status "okay"
|
||||||
|
+ if test -n "${param_spinor_max_freq}"; then
|
||||||
|
+ fdt set /soc/${tmp_spi_path}/spiflash spi-max-frequency "<${param_spinor_max_freq}>"
|
||||||
|
+ fi
|
||||||
|
+ if test "${param_spinor_spi_cs}" = "1"; then
|
||||||
|
+ fdt set /soc/${tmp_spi_path}/spiflash reg "<1>"
|
||||||
|
+ fi
|
||||||
|
+ env delete tmp_spi_path
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+if test -n "${param_spidev_spi_bus}"; then
|
||||||
|
+ test "${param_spidev_spi_bus}" = "0" && setenv tmp_spi_path "spi@01c68000"
|
||||||
|
+ test "${param_spidev_spi_bus}" = "1" && setenv tmp_spi_path "spi@01c69000"
|
||||||
|
+ fdt set /soc/${tmp_spi_path} status "okay"
|
||||||
|
+ fdt set /soc/${tmp_spi_path}/spidev status "okay"
|
||||||
|
+ if test -n "${param_spidev_max_freq}"; then
|
||||||
|
+ fdt set /soc/${tmp_spi_path}/spidev spi-max-frequency "<${param_spidev_max_freq}>"
|
||||||
|
+ fi
|
||||||
|
+ if test "${param_spidev_spi_cs}" = "1"; then
|
||||||
|
+ fdt set /soc/${tmp_spi_path}/spidev reg "<1>"
|
||||||
|
+ fi
|
||||||
|
+ env delete tmp_spi_path
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+if test -n "${param_pps_pin}"; then
|
||||||
|
+ setenv tmp_bank "${param_pps_pin}"
|
||||||
|
+ setenv tmp_pin "${param_pps_pin}"
|
||||||
|
+ run decompose_pin
|
||||||
|
+ fdt set /soc/pinctrl@01c20800/pps_pins pins "${param_pps_pin}"
|
||||||
|
+ fdt get value tmp_phandle /soc/pinctrl@01c20800 phandle
|
||||||
|
+ fdt set /pps@0 gpios "<${tmp_phandle} ${tmp_bank} ${tmp_pin} 0>"
|
||||||
|
+ env delete tmp_pin tmp_bank tmp_phandle
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+if test "${param_pps_falling_edge}" = "1"; then
|
||||||
|
+ fdt set /pps@0 assert-falling-edge
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+for f in ${overlays}; do
|
||||||
|
+ if test "${f}" = "pwm"; then
|
||||||
|
+ setenv bootargs_new ""
|
||||||
|
+ for arg in ${bootargs}; do
|
||||||
|
+ if test "${arg}" = "console=ttyS0,115200"; then
|
||||||
|
+ echo "Warning: Disabling ttyS0 console due to enabled PWM overlay"
|
||||||
|
+ else
|
||||||
|
+ setenv bootargs_new "${bootargs_new} ${arg}"
|
||||||
|
+ fi
|
||||||
|
+ done
|
||||||
|
+ setenv bootargs "${bootargs_new}"
|
||||||
|
+ fi
|
||||||
|
+done
|
||||||
|
+
|
||||||
|
+if test -n "${param_w1_pin}"; then
|
||||||
|
+ setenv tmp_bank "${param_w1_pin}"
|
||||||
|
+ setenv tmp_pin "${param_w1_pin}"
|
||||||
|
+ run decompose_pin
|
||||||
|
+ fdt set /soc/pinctrl@01c20800/w1_pins pins "${param_w1_pin}"
|
||||||
|
+ fdt get value tmp_phandle /soc/pinctrl@01c20800 phandle
|
||||||
|
+ fdt set /onewire@0 gpios "<${tmp_phandle} ${tmp_bank} ${tmp_pin} 0>"
|
||||||
|
+ env delete tmp_pin tmp_bank tmp_phandle
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+if test "${param_w1_pin_int_pullup}" = "1"; then
|
||||||
|
+ fdt set /soc/pinctrl@01c20800/w1_pins bias-pull-up
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+if test "${param_uart1_rtscts}" = "1"; then
|
||||||
|
+ fdt get value tmp_phandle1 /soc/pinctrl@01c20800/uart1 phandle
|
||||||
|
+ fdt get value tmp_phandle2 /soc/pinctrl@01c20800/uart1_rts_cts phandle
|
||||||
|
+ fdt set /soc/serial@01c28400 pinctrl-names "default" "default"
|
||||||
|
+ fdt set /soc/serial@01c28400 pinctrl-0 "<${tmp_phandle1}>"
|
||||||
|
+ fdt set /soc/serial@01c28400 pinctrl-1 "<${tmp_phandle2}>"
|
||||||
|
+ env delete tmp_phandle1 tmp_phandle2
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+if test "${param_uart2_rtscts}" = "1"; then
|
||||||
|
+ fdt get value tmp_phandle1 /soc/pinctrl@01c20800/uart2 phandle
|
||||||
|
+ fdt get value tmp_phandle2 /soc/pinctrl@01c20800/uart2_rts_cts phandle
|
||||||
|
+ fdt set /soc/serial@01c28800 pinctrl-names "default" "default"
|
||||||
|
+ fdt set /soc/serial@01c28800 pinctrl-0 "<${tmp_phandle1}>"
|
||||||
|
+ fdt set /soc/serial@01c28800 pinctrl-1 "<${tmp_phandle2}>"
|
||||||
|
+ env delete tmp_phandle1 tmp_phandle2
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+if test "${param_uart3_rtscts}" = "1"; then
|
||||||
|
+ fdt get value tmp_phandle1 /soc/pinctrl@01c20800/uart3 phandle
|
||||||
|
+ fdt get value tmp_phandle2 /soc/pinctrl@01c20800/uart3_rts_cts phandle
|
||||||
|
+ fdt set /soc/serial@01c28c00 pinctrl-names "default" "default"
|
||||||
|
+ fdt set /soc/serial@01c28c00 pinctrl-0 "<${tmp_phandle1}>"
|
||||||
|
+ fdt set /soc/serial@01c28c00 pinctrl-1 "<${tmp_phandle2}>"
|
||||||
|
+ env delete tmp_phandle1 tmp_phandle2
|
||||||
|
+fi
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-i2c0.dts b/arch/arm/boot/dts/overlay/sun8i-h3-i2c0.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..b457ac71
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-i2c0.dts
|
||||||
|
@@ -0,0 +1,20 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target-path = "/aliases";
|
||||||
|
+ __overlay__ {
|
||||||
|
+ i2c0 = "/soc/i2c@01c2ac00";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@1 {
|
||||||
|
+ target = <&i2c0>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-i2c1.dts b/arch/arm/boot/dts/overlay/sun8i-h3-i2c1.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..fd0928a1
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-i2c1.dts
|
||||||
|
@@ -0,0 +1,20 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target-path = "/aliases";
|
||||||
|
+ __overlay__ {
|
||||||
|
+ i2c1 = "/soc/i2c@01c2b000";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@1 {
|
||||||
|
+ target = <&i2c1>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-i2c2.dts b/arch/arm/boot/dts/overlay/sun8i-h3-i2c2.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..25b75b71
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-i2c2.dts
|
||||||
|
@@ -0,0 +1,20 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target-path = "/aliases";
|
||||||
|
+ __overlay__ {
|
||||||
|
+ i2c2 = "/soc/i2c@01c2b400";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@1 {
|
||||||
|
+ target = <&i2c2>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-pps-gpio.dts b/arch/arm/boot/dts/overlay/sun8i-h3-pps-gpio.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..16a737b0
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-pps-gpio.dts
|
||||||
|
@@ -0,0 +1,29 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&pio>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pps_pins: pps_pins {
|
||||||
|
+ pins = "PD14";
|
||||||
|
+ function = "gpio_in";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@1 {
|
||||||
|
+ target-path = "/";
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pps@0 {
|
||||||
|
+ compatible = "pps-gpio";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&pps_pins>;
|
||||||
|
+ gpios = <&pio 3 14 0>; /* PD14 */
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-pwm.dts b/arch/arm/boot/dts/overlay/sun8i-h3-pwm.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..ed3b8e60
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-pwm.dts
|
||||||
|
@@ -0,0 +1,39 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target-path = "/chosen";
|
||||||
|
+ __overlay__ {
|
||||||
|
+ /delete-property/ stdout-path;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@1 {
|
||||||
|
+ target = <&uart0>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ status = "disabled";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@2 {
|
||||||
|
+ target = <&pio>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pwm0_pin: pwm0 {
|
||||||
|
+ pins = "PA5";
|
||||||
|
+ function = "pwm0";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@3 {
|
||||||
|
+ target = <&pwm>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&pwm0_pin>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-spdif-out.dts b/arch/arm/boot/dts/overlay/sun8i-h3-spdif-out.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..c7c01411
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-spdif-out.dts
|
||||||
|
@@ -0,0 +1,38 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&spdif>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&spdif_tx_pins_a>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@1 {
|
||||||
|
+ target-path = "/";
|
||||||
|
+ __overlay__ {
|
||||||
|
+ sound {
|
||||||
|
+ compatible = "simple-audio-card";
|
||||||
|
+ simple-audio-card,name = "On-board SPDIF";
|
||||||
|
+
|
||||||
|
+ simple-audio-card,cpu {
|
||||||
|
+ sound-dai = <&spdif>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ simple-audio-card,codec {
|
||||||
|
+ sound-dai = <&spdif_out>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ spdif_out: spdif-out {
|
||||||
|
+ #sound-dai-cells = <0>;
|
||||||
|
+ compatible = "linux,spdif-dit";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-spi-add-cs1.dts b/arch/arm/boot/dts/overlay/sun8i-h3-spi-add-cs1.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..bd8e2561
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-spi-add-cs1.dts
|
||||||
|
@@ -0,0 +1,41 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&pio>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ spi0_cs1: spi0_cs1 {
|
||||||
|
+ pins = "PA21";
|
||||||
|
+ function = "gpio_out";
|
||||||
|
+ output-high;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ spi1_cs1: spi1_cs1 {
|
||||||
|
+ pins = "PA10";
|
||||||
|
+ function = "gpio_out";
|
||||||
|
+ output-high;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@1 {
|
||||||
|
+ target = <&spi0>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default", "default";
|
||||||
|
+ pinctrl-1 = <&spi0_cs1>;
|
||||||
|
+ cs-gpios = <0>, <&pio 0 21 0>; /* PA21 */
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@2 {
|
||||||
|
+ target = <&spi1>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default", "default";
|
||||||
|
+ pinctrl-1 = <&spi1_cs1>;
|
||||||
|
+ cs-gpios = <0>, <&pio 0 10 0>; /* PA10 */
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-spi-jedec-nor.dts b/arch/arm/boot/dts/overlay/sun8i-h3-spi-jedec-nor.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..ad22a71a
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-spi-jedec-nor.dts
|
||||||
|
@@ -0,0 +1,42 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target-path = "/aliases";
|
||||||
|
+ __overlay__ {
|
||||||
|
+ spi0 = "/soc/spi@01c68000";
|
||||||
|
+ spi1 = "/soc/spi@01c69000";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@1 {
|
||||||
|
+ target = <&spi0>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+ spiflash {
|
||||||
|
+ compatible = "jedec,spi-nor";
|
||||||
|
+ reg = <0>;
|
||||||
|
+ spi-max-frequency = <1000000>;
|
||||||
|
+ status = "disabled";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@2 {
|
||||||
|
+ target = <&spi1>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+ spiflash {
|
||||||
|
+ compatible = "jedec,spi-nor";
|
||||||
|
+ reg = <0>;
|
||||||
|
+ spi-max-frequency = <1000000>;
|
||||||
|
+ status = "disabled";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-spi-spidev.dts b/arch/arm/boot/dts/overlay/sun8i-h3-spi-spidev.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..180979e0
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-spi-spidev.dts
|
||||||
|
@@ -0,0 +1,42 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target-path = "/aliases";
|
||||||
|
+ __overlay__ {
|
||||||
|
+ spi0 = "/soc/spi@01c68000";
|
||||||
|
+ spi1 = "/soc/spi@01c69000";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@1 {
|
||||||
|
+ target = <&spi0>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+ spidev {
|
||||||
|
+ compatible = "spidev";
|
||||||
|
+ status = "disabled";
|
||||||
|
+ reg = <0>;
|
||||||
|
+ spi-max-frequency = <1000000>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@2 {
|
||||||
|
+ target = <&spi1>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+ spidev {
|
||||||
|
+ compatible = "spidev";
|
||||||
|
+ status = "disabled";
|
||||||
|
+ reg = <0>;
|
||||||
|
+ spi-max-frequency = <1000000>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-uart1.dts b/arch/arm/boot/dts/overlay/sun8i-h3-uart1.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..8a4f7e49
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-uart1.dts
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target-path = "/aliases";
|
||||||
|
+ __overlay__ {
|
||||||
|
+ serial1 = "/soc/serial@01c28400";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@1 {
|
||||||
|
+ target = <&uart1>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart1_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-uart2.dts b/arch/arm/boot/dts/overlay/sun8i-h3-uart2.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..499a1b49
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-uart2.dts
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target-path = "/aliases";
|
||||||
|
+ __overlay__ {
|
||||||
|
+ serial2 = "/soc/serial@01c28800";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@1 {
|
||||||
|
+ target = <&uart2>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart2_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-uart3.dts b/arch/arm/boot/dts/overlay/sun8i-h3-uart3.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..b5734c5b
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-uart3.dts
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target-path = "/aliases";
|
||||||
|
+ __overlay__ {
|
||||||
|
+ serial3 = "/soc/serial@01c28c00";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@1 {
|
||||||
|
+ target = <&uart3>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart3_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-usbhost0.dts b/arch/arm/boot/dts/overlay/sun8i-h3-usbhost0.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..ff1d82fd
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-usbhost0.dts
|
||||||
|
@@ -0,0 +1,20 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&ehci0>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@1 {
|
||||||
|
+ target = <&ohci0>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-usbhost2.dts b/arch/arm/boot/dts/overlay/sun8i-h3-usbhost2.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..bf0c4f59
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-usbhost2.dts
|
||||||
|
@@ -0,0 +1,20 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&ehci2>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@1 {
|
||||||
|
+ target = <&ohci2>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-usbhost3.dts b/arch/arm/boot/dts/overlay/sun8i-h3-usbhost3.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..f737075b
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-usbhost3.dts
|
||||||
|
@@ -0,0 +1,20 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&ehci3>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@1 {
|
||||||
|
+ target = <&ohci3>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/overlay/sun8i-h3-w1-gpio.dts b/arch/arm/boot/dts/overlay/sun8i-h3-w1-gpio.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..f4ccb7fb
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/overlay/sun8i-h3-w1-gpio.dts
|
||||||
|
@@ -0,0 +1,29 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&pio>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ w1_pins: w1_pins {
|
||||||
|
+ pins = "PD14";
|
||||||
|
+ function = "gpio_in";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@1 {
|
||||||
|
+ target-path = "/";
|
||||||
|
+ __overlay__ {
|
||||||
|
+ onewire@0 {
|
||||||
|
+ compatible = "w1-gpio";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&w1_pins>;
|
||||||
|
+ gpios = <&pio 3 14 0>; /* PD14 */
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
|
@ -0,0 +1,37 @@
|
||||||
|
diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
|
||||||
|
index c3e22263..b5845ad8 100644
|
||||||
|
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
|
||||||
|
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
|
||||||
|
@@ -49,6 +49,32 @@
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
+ chosen {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <1>;
|
||||||
|
+ ranges;
|
||||||
|
+
|
||||||
|
+ simplefb_hdmi: framebuffer@0 {
|
||||||
|
+ compatible = "allwinner,simple-framebuffer",
|
||||||
|
+ "simple-framebuffer";
|
||||||
|
+ allwinner,pipeline = "mixer0-lcd0-hdmi";
|
||||||
|
+ clocks = <&ccu CLK_BUS_TCON0>, <&ccu CLK_BUS_DE>,
|
||||||
|
+ <&ccu CLK_BUS_HDMI>, <&ccu CLK_DE>,
|
||||||
|
+ <&ccu CLK_TCON0>, <&ccu CLK_HDMI>;
|
||||||
|
+ status = "disabled";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ simplefb_tv: framebuffer@1 {
|
||||||
|
+ compatible = "allwinner,simple-framebuffer",
|
||||||
|
+ "simple-framebuffer";
|
||||||
|
+ allwinner,pipeline = "de0-lcd1-tve0";
|
||||||
|
+ clocks = <&ccu CLK_BUS_TCON1>, <&ccu CLK_BUS_DE>,
|
||||||
|
+ <&ccu CLK_BUS_TVE>, <&ccu CLK_DE>,
|
||||||
|
+ <&ccu CLK_TCON0>, <&ccu CLK_TVE>;
|
||||||
|
+ status = "disabled";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
clocks {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
|
@ -0,0 +1,112 @@
|
||||||
|
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||||
|
old mode 100644
|
||||||
|
new mode 100755
|
||||||
|
index 81523d5..6f8b2cb
|
||||||
|
--- a/arch/arm/boot/dts/Makefile
|
||||||
|
+++ b/arch/arm/boot/dts/Makefile
|
||||||
|
@@ -868,6 +868,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
|
||||||
|
sun8i-h3-beelink-x2.dtb \
|
||||||
|
sun8i-h3-nanopi-m1.dtb \
|
||||||
|
sun8i-h3-nanopi-neo.dtb \
|
||||||
|
+ sun8i-h3-nanopi-neo-air.dtb \
|
||||||
|
sun8i-h3-orangepi-2.dtb \
|
||||||
|
sun8i-h3-orangepi-lite.dtb \
|
||||||
|
sun8i-h3-orangepi-one.dtb \
|
||||||
|
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
|
||||||
|
new file mode 100755
|
||||||
|
index 0000000..9160d42
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
|
||||||
|
@@ -0,0 +1,92 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (C) 2016 James Pettigrew <james@innovum.com.au>
|
||||||
|
+ *
|
||||||
|
+ * 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 "sun8i-h3-nanopi.dtsi"
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ model = "FriendlyARM NanoPi NEO";
|
||||||
|
+ compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ aliases {
|
||||||
|
+ serial3 = &uart3;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ wifi_pwrseq: wifi_pwrseq {
|
||||||
|
+ compatible = "mmc-pwrseq-simple";
|
||||||
|
+ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc1 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&mmc1_pins_a>;
|
||||||
|
+ vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ vqmmc-supply = <®_vcc3v3>;
|
||||||
|
+ mmc-pwrseq = <&wifi_pwrseq>;
|
||||||
|
+ bus-width = <4>;
|
||||||
|
+ non-removable;
|
||||||
|
+ status = "okay";
|
||||||
|
+
|
||||||
|
+ brcmf: bcrmf@1 {
|
||||||
|
+ reg = <1>;
|
||||||
|
+ compatible = "brcm,bcm4329-fmac";
|
||||||
|
+ interrupt-parent = <&pio>;
|
||||||
|
+ interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
|
||||||
|
+ interrupt-names = "host-wake";
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc2 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&mmc2_8bit_pins>;
|
||||||
|
+ vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ vqmmc-supply = <®_vcc3v3>;
|
||||||
|
+ bus-width = <8>;
|
||||||
|
+ non-removable;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&uart3 { /* Connected to AP6212 on Neo Air */
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart3_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
|
@ -0,0 +1,126 @@
|
||||||
|
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||||
|
index 01180849..99c1809a 100644
|
||||||
|
--- a/arch/arm/boot/dts/Makefile
|
||||||
|
+++ b/arch/arm/boot/dts/Makefile
|
||||||
|
@@ -875,6 +875,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
|
||||||
|
sun8i-h3-orangepi-pc-plus.dtb \
|
||||||
|
sun8i-h3-orangepi-plus.dtb \
|
||||||
|
sun8i-h3-orangepi-plus2e.dtb \
|
||||||
|
+ sun8i-h3-orangepi-zeroplus.dtb \
|
||||||
|
sun8i-r16-parrot.dtb \
|
||||||
|
sun8i-v3s-licheepi-zero.dtb
|
||||||
|
dtb-$(CONFIG_MACH_SUN9I) += \
|
||||||
|
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-zeroplus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-zeroplus.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..f89d1207
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-zeroplus.dts
|
||||||
|
@@ -0,0 +1,108 @@
|
||||||
|
+
|
||||||
|
+#include "sun8i-h2-plus-orangepi-zero.dts"
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ model = "Xunlong Orange Pi Zero Plus";
|
||||||
|
+ compatible = "xunlong,orangepi-zeroplus", "allwinner,sun8i-h3";
|
||||||
|
+
|
||||||
|
+ aliases {
|
||||||
|
+ ethernet1 = &brcmf;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /delete-node/ reg_vcc_wifi;
|
||||||
|
+
|
||||||
|
+ wifi_pwrseq: wifi_pwrseq {
|
||||||
|
+ compatible = "mmc-pwrseq-simple";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&wifi_pwrseq_pin_orangepi>;
|
||||||
|
+ reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>;
|
||||||
|
+ post-power-on-delay-ms = <50>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ reg_usb1_vbus: usb1-vbus {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&usb1_vbus_pin_a>;
|
||||||
|
+ regulator-name = "usb1-vbus";
|
||||||
|
+ regulator-min-microvolt = <5000000>;
|
||||||
|
+ regulator-max-microvolt = <5000000>;
|
||||||
|
+ regulator-boot-on;
|
||||||
|
+ enable-active-high;
|
||||||
|
+ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ehci2 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ehci3 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc1 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&mmc1_pins_a>;
|
||||||
|
+ vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ vqmmc-supply = <®_vcc3v3>;
|
||||||
|
+ mmc-pwrseq = <&wifi_pwrseq>;
|
||||||
|
+ bus-width = <4>;
|
||||||
|
+ non-removable;
|
||||||
|
+ status = "okay";
|
||||||
|
+
|
||||||
|
+ /delete-node/ sdio_wifi@1;
|
||||||
|
+
|
||||||
|
+ brcmf: bcrmf@1 {
|
||||||
|
+ reg = <1>;
|
||||||
|
+ compatible = "brcm,bcm4329-fmac";
|
||||||
|
+ interrupt-parent = <&r_pio>;
|
||||||
|
+ interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 / EINT7 */
|
||||||
|
+ interrupt-names = "host-wake";
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc2 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&mmc2_8bit_pins>;
|
||||||
|
+ vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ bus-width = <8>;
|
||||||
|
+ non-removable;
|
||||||
|
+ cap-mmc-hw-reset;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ohci0 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ohci1 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&pio {
|
||||||
|
+ wifi_pwrseq_pin_orangepi: wifi_pwrseq_pin@0 {
|
||||||
|
+ allwinner,pins = "PA9";
|
||||||
|
+ allwinner,function = "gpio_out";
|
||||||
|
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||||
|
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&r_pio {
|
||||||
|
+ wifi_wake: wifi_wake@0 {
|
||||||
|
+ allwinner,pins = "PL7";
|
||||||
|
+ allwinner,function = "irq";
|
||||||
|
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&spi0 {
|
||||||
|
+ /delete-node/ spi-flash@0;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&usbphy {
|
||||||
|
+ usb1_vbus-supply = <®_usb1_vbus>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
|
@ -0,0 +1,133 @@
|
||||||
|
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
|
||||||
|
index ab30cc63..cc176797 100644
|
||||||
|
--- a/arch/arm/Makefile
|
||||||
|
+++ b/arch/arm/Makefile
|
||||||
|
@@ -339,6 +339,12 @@ $(INSTALL_TARGETS):
|
||||||
|
%.dtb: | scripts
|
||||||
|
$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
|
||||||
|
|
||||||
|
+%.dtbo: | scripts
|
||||||
|
+ $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
|
||||||
|
+
|
||||||
|
+%.scr: | scripts
|
||||||
|
+ $(Q)$(MAKE) $(build)=$(boot)/dts ARCH=$(ARCH) $(boot)/dts/$@
|
||||||
|
+
|
||||||
|
PHONY += dtbs dtbs_install
|
||||||
|
|
||||||
|
dtbs: prepare scripts
|
||||||
|
diff --git a/arch/arm/boot/.gitignore b/arch/arm/boot/.gitignore
|
||||||
|
index 3c79f859..eaaeb17e 100644
|
||||||
|
--- a/arch/arm/boot/.gitignore
|
||||||
|
+++ b/arch/arm/boot/.gitignore
|
||||||
|
@@ -3,4 +3,5 @@ zImage
|
||||||
|
xipImage
|
||||||
|
bootpImage
|
||||||
|
uImage
|
||||||
|
-*.dtb
|
||||||
|
+*.dtb*
|
||||||
|
+*.scr
|
||||||
|
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
|
||||||
|
index b9a4a934..54e3c38d 100644
|
||||||
|
--- a/arch/arm64/Makefile
|
||||||
|
+++ b/arch/arm64/Makefile
|
||||||
|
@@ -119,6 +119,12 @@ zinstall install:
|
||||||
|
%.dtb: scripts
|
||||||
|
$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
|
||||||
|
|
||||||
|
+%.dtbo: | scripts
|
||||||
|
+ $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
|
||||||
|
+
|
||||||
|
+%.scr: | scripts
|
||||||
|
+ $(Q)$(MAKE) $(build)=$(boot)/dts ARCH=$(ARCH) $(boot)/dts/$@
|
||||||
|
+
|
||||||
|
PHONY += dtbs dtbs_install
|
||||||
|
|
||||||
|
dtbs: prepare scripts
|
||||||
|
diff --git a/arch/arm64/boot/dts/.gitignore b/arch/arm64/boot/dts/.gitignore
|
||||||
|
index b60ed208..5d65b54b 100644
|
||||||
|
--- a/arch/arm64/boot/dts/.gitignore
|
||||||
|
+++ b/arch/arm64/boot/dts/.gitignore
|
||||||
|
@@ -1 +1,2 @@
|
||||||
|
-*.dtb
|
||||||
|
+*.dtb*
|
||||||
|
+*.scr
|
||||||
|
diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
|
||||||
|
index a1be75d0..ad8dc1c9 100644
|
||||||
|
--- a/scripts/Makefile.dtbinst
|
||||||
|
+++ b/scripts/Makefile.dtbinst
|
||||||
|
@@ -27,6 +27,9 @@ ifeq ("$(dtbinst-root)", "$(obj)")
|
||||||
|
endif
|
||||||
|
|
||||||
|
dtbinst-files := $(dtb-y)
|
||||||
|
+dtboinst-files := $(dtbo-y)
|
||||||
|
+script-files := $(scr-y)
|
||||||
|
+readme-files := $(dtbotxt-y)
|
||||||
|
dtbinst-dirs := $(dts-dirs)
|
||||||
|
|
||||||
|
# Helper targets for Installing DTBs into the boot directory
|
||||||
|
@@ -35,15 +38,24 @@ quiet_cmd_dtb_install = INSTALL $<
|
||||||
|
|
||||||
|
install-dir = $(patsubst $(dtbinst-root)%,$(INSTALL_DTBS_PATH)%,$(obj))
|
||||||
|
|
||||||
|
-$(dtbinst-files) $(dtbinst-dirs): | __dtbs_install_prep
|
||||||
|
+$(dtbinst-files) $(dtboinst-files) $(readme-files) $(script-files) $(dtbinst-dirs): | __dtbs_install_prep
|
||||||
|
|
||||||
|
$(dtbinst-files): %.dtb: $(obj)/%.dtb
|
||||||
|
$(call cmd,dtb_install,$(install-dir))
|
||||||
|
|
||||||
|
+$(dtboinst-files): %.dtbo: $(obj)/%.dtbo
|
||||||
|
+ $(call cmd,dtb_install,$(install-dir))
|
||||||
|
+
|
||||||
|
+$(script-files): %.scr: $(obj)/%.scr
|
||||||
|
+ $(call cmd,dtb_install,$(install-dir))
|
||||||
|
+
|
||||||
|
+$(readme-files): %: $(src)/%
|
||||||
|
+ $(call cmd,dtb_install,$(install-dir))
|
||||||
|
+
|
||||||
|
$(dtbinst-dirs):
|
||||||
|
$(Q)$(MAKE) $(dtbinst)=$(obj)/$@
|
||||||
|
|
||||||
|
-PHONY += $(dtbinst-files) $(dtbinst-dirs)
|
||||||
|
-__dtbs_install: $(dtbinst-files) $(dtbinst-dirs)
|
||||||
|
+PHONY += $(dtbinst-files) $(dtboinst-files) $(script-files) $(readme-files) $(dtbinst-dirs)
|
||||||
|
+__dtbs_install: $(dtbinst-files) $(dtboinst-files) $(script-files) $(readme-files) $(dtbinst-dirs)
|
||||||
|
|
||||||
|
.PHONY: $(PHONY)
|
||||||
|
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
|
||||||
|
index 0a07f901..5ccd3490 100644
|
||||||
|
--- a/scripts/Makefile.lib
|
||||||
|
+++ b/scripts/Makefile.lib
|
||||||
|
@@ -278,6 +278,9 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
DTC ?= $(objtree)/scripts/dtc/dtc
|
||||||
|
|
||||||
|
+# Overlay support
|
||||||
|
+DTC_FLAGS += -@ -Wno-unit_address_format -Wno-simple_bus_reg
|
||||||
|
+
|
||||||
|
# Disable noisy checks by default
|
||||||
|
ifeq ($(KBUILD_ENABLE_EXTRA_GCC_CHECKS),)
|
||||||
|
DTC_FLAGS += -Wno-unit_address_vs_reg
|
||||||
|
@@ -312,6 +315,23 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
|
||||||
|
$(obj)/%.dtb: $(src)/%.dts FORCE
|
||||||
|
$(call if_changed_dep,dtc)
|
||||||
|
|
||||||
|
+quiet_cmd_dtco = DTCO $@
|
||||||
|
+cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \
|
||||||
|
+ $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
|
||||||
|
+ $(DTC) -O dtb -o $@ -b 0 \
|
||||||
|
+ -i $(dir $<) $(DTC_FLAGS) \
|
||||||
|
+ -d $(depfile).dtc.tmp $(dtc-tmp) ; \
|
||||||
|
+ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
|
||||||
|
+
|
||||||
|
+$(obj)/%.dtbo: $(src)/%.dts FORCE
|
||||||
|
+ $(call if_changed_dep,dtco)
|
||||||
|
+
|
||||||
|
+quiet_cmd_scr = MKIMAGE $@
|
||||||
|
+cmd_scr = mkimage -C none -A $(ARCH) -T script -d $< $@
|
||||||
|
+
|
||||||
|
+$(obj)/%.scr: $(src)/%.scr-cmd FORCE
|
||||||
|
+ $(call if_changed,scr)
|
||||||
|
+
|
||||||
|
dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
|
||||||
|
|
||||||
|
# Bzip2
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,16 @@
|
||||||
|
diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
|
||||||
|
index ea74f58..d1aced2 100644
|
||||||
|
--- a/arch/arm/boot/dts/sun8i-h3.dtsi
|
||||||
|
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
|
||||||
|
@@ -43,6 +43,11 @@
|
||||||
|
#include "sunxi-h3-h5.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
+ aliases {
|
||||||
|
+ spi0 = &spi0;
|
||||||
|
+ spi1 = &spi1;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
cpus {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
|
@ -0,0 +1,40 @@
|
||||||
|
diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
|
||||||
|
index e94f196b..9967fa66 100644
|
||||||
|
--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
|
||||||
|
+++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
|
||||||
|
@@ -144,6 +144,35 @@
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
+&spi0 {
|
||||||
|
+ status = "okay";
|
||||||
|
+ spi-flash@0 {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+ compatible = "jedec,spi-nor";
|
||||||
|
+ reg = <0>; /* Chip select 0 */
|
||||||
|
+ spi-max-frequency = <10000000>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ partitions {
|
||||||
|
+ compatible = "fixed-partitions";
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <1>;
|
||||||
|
+ partition@0 {
|
||||||
|
+ label = "uboot";
|
||||||
|
+ reg = <0x0 0x100000>;
|
||||||
|
+ };
|
||||||
|
+ partition@100000 {
|
||||||
|
+ label = "env";
|
||||||
|
+ reg = <0x100000 0x100000>;
|
||||||
|
+ };
|
||||||
|
+ partition@200000 {
|
||||||
|
+ label = "data";
|
||||||
|
+ reg = <0x200000 0x200000>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&uart0 {
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&uart0_pins_a>;
|
|
@ -0,0 +1,130 @@
|
||||||
|
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts
|
||||||
|
index 22b99b40..cc4e5398 100644
|
||||||
|
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts
|
||||||
|
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts
|
||||||
|
@@ -47,6 +47,7 @@
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||||
|
+#include <dt-bindings/thermal/thermal.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "Xunlong Orange Pi Lite";
|
||||||
|
@@ -90,6 +91,82 @@
|
||||||
|
gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+ wifi_pwrseq: wifi_pwrseq {
|
||||||
|
+ compatible = "mmc-pwrseq-simple";
|
||||||
|
+ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 WIFI_EN */
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ vdd_cpux: gpio-regulator {
|
||||||
|
+ compatible = "regulator-gpio";
|
||||||
|
+ regulator-name = "vdd-cpux";
|
||||||
|
+ regulator-type = "voltage";
|
||||||
|
+ regulator-boot-on;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ regulator-min-microvolt = <1100000>;
|
||||||
|
+ regulator-max-microvolt = <1300000>;
|
||||||
|
+ regulator-ramp-delay = <50>; /* 4ms */
|
||||||
|
+ gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ gpios-states = <0x1>;
|
||||||
|
+ states = <1100000 0x0
|
||||||
|
+ 1300000 0x1>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cpu0 {
|
||||||
|
+ operating-points = <
|
||||||
|
+ 1008000 1300000
|
||||||
|
+ 816000 1100000
|
||||||
|
+ 624000 1100000
|
||||||
|
+ 480000 1100000
|
||||||
|
+ 312000 1100000
|
||||||
|
+ 240000 1100000
|
||||||
|
+ 120000 1100000
|
||||||
|
+ >;
|
||||||
|
+ #cooling-cells = <2>;
|
||||||
|
+ cooling-min-level = <0>;
|
||||||
|
+ cooling-max-level = <6>;
|
||||||
|
+ cpu0-supply = <&vdd_cpux>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cpu_thermal {
|
||||||
|
+ trips {
|
||||||
|
+ cpu_warm: cpu_warm {
|
||||||
|
+ temperature = <65000>;
|
||||||
|
+ hysteresis = <2000>;
|
||||||
|
+ type = "passive";
|
||||||
|
+ };
|
||||||
|
+ cpu_hot: cpu_hot {
|
||||||
|
+ temperature = <75000>;
|
||||||
|
+ hysteresis = <2000>;
|
||||||
|
+ type = "passive";
|
||||||
|
+ };
|
||||||
|
+ cpu_very_hot: cpu_very_hot {
|
||||||
|
+ temperature = <90000>;
|
||||||
|
+ hysteresis = <2000>;
|
||||||
|
+ type = "passive";
|
||||||
|
+ };
|
||||||
|
+ cpu_crit: cpu_crit {
|
||||||
|
+ temperature = <105000>;
|
||||||
|
+ hysteresis = <2000>;
|
||||||
|
+ type = "critical";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ cooling-maps {
|
||||||
|
+ cpu_warm_limit_cpu {
|
||||||
|
+ trip = <&cpu_warm>;
|
||||||
|
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT 1>;
|
||||||
|
+ };
|
||||||
|
+ cpu_hot_limit_cpu {
|
||||||
|
+ trip = <&cpu_hot>;
|
||||||
|
+ cooling-device = <&cpu0 2 3>;
|
||||||
|
+ };
|
||||||
|
+ cpu_very_hot_limit_cpu {
|
||||||
|
+ trip = <&cpu_very_hot>;
|
||||||
|
+ cooling-device = <&cpu0 5 THERMAL_NO_LIMIT>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
&ehci1 {
|
||||||
|
@@ -120,6 +197,7 @@
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&mmc1_pins_a>;
|
||||||
|
vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ mmc-pwrseq = <&wifi_pwrseq>;
|
||||||
|
bus-width = <4>;
|
||||||
|
non-removable;
|
||||||
|
status = "okay";
|
||||||
|
@@ -160,13 +238,25 @@
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
+®_usb0_vbus {
|
||||||
|
+ gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&uart0 {
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&uart0_pins_a>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
+&usb_otg {
|
||||||
|
+ dr_mode = "otg";
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&usbphy {
|
||||||
|
- /* USB VBUS is always on */
|
||||||
|
+ /* USB VBUS is always on except for the OTG port */
|
||||||
|
status = "okay";
|
||||||
|
+ usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
|
||||||
|
+ usb0_vbus-supply = <®_usb0_vbus>;
|
||||||
|
};
|
|
@ -0,0 +1,25 @@
|
||||||
|
diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
|
||||||
|
index c3e22263..6e00fec3 100644
|
||||||
|
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
|
||||||
|
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
|
||||||
|
@@ -465,10 +491,20 @@
|
||||||
|
function = "uart2";
|
||||||
|
};
|
||||||
|
|
||||||
|
+ uart2_rts_cts_pins: uart2_rts_cts {
|
||||||
|
+ pins = "PA2", "PA3";
|
||||||
|
+ function = "uart2";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
uart3_pins: uart3 {
|
||||||
|
pins = "PA13", "PA14";
|
||||||
|
function = "uart3";
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+ uart3_rts_cts_pins: uart3_rts_cts {
|
||||||
|
+ pins = "PA15", "PA16";
|
||||||
|
+ function = "uart3";
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
ths: ths@01c25000 {
|
|
@ -0,0 +1,23 @@
|
||||||
|
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts
|
||||||
|
index 8b93f5c7..db8c3fb4 100644
|
||||||
|
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts
|
||||||
|
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts
|
||||||
|
@@ -51,12 +51,18 @@
|
||||||
|
/* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
|
||||||
|
ethernet1 = &rtl8189ftv;
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+ wifi_pwrseq: wifi_pwrseq {
|
||||||
|
+ compatible = "mmc-pwrseq-simple";
|
||||||
|
+ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 WIFI_EN */
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
&mmc1 {
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&mmc1_pins_a>;
|
||||||
|
vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ mmc-pwrseq = <&wifi_pwrseq>;
|
||||||
|
bus-width = <4>;
|
||||||
|
non-removable;
|
||||||
|
status = "okay";
|
|
@ -0,0 +1,786 @@
|
||||||
|
CONFIG_SYSVIPC=y
|
||||||
|
CONFIG_POSIX_MQUEUE=y
|
||||||
|
CONFIG_FHANDLE=y
|
||||||
|
CONFIG_NO_HZ=y
|
||||||
|
CONFIG_HIGH_RES_TIMERS=y
|
||||||
|
CONFIG_CGROUPS=y
|
||||||
|
CONFIG_BSD_PROCESS_ACCT=y
|
||||||
|
CONFIG_BSD_PROCESS_ACCT_V3=y
|
||||||
|
CONFIG_TASKSTATS=y
|
||||||
|
CONFIG_TASK_DELAY_ACCT=y
|
||||||
|
CONFIG_TASK_XACCT=y
|
||||||
|
CONFIG_TASK_IO_ACCOUNTING=y
|
||||||
|
CONFIG_IKCONFIG=y
|
||||||
|
CONFIG_IKCONFIG_PROC=y
|
||||||
|
CONFIG_SCHED_AUTOGROUP=y
|
||||||
|
CONFIG_BLK_DEV_INITRD=y
|
||||||
|
CONFIG_BPF_SYSCALL=y
|
||||||
|
CONFIG_PERF_EVENTS=y
|
||||||
|
CONFIG_MODULES=y
|
||||||
|
CONFIG_BLK_DEV_BSGLIB=y
|
||||||
|
CONFIG_BLK_DEV_INTEGRITY=y
|
||||||
|
CONFIG_PARTITION_ADVANCED=y
|
||||||
|
CONFIG_MAC_PARTITION=y
|
||||||
|
CONFIG_LDM_PARTITION=y
|
||||||
|
CONFIG_ARCH_SUNXI=y
|
||||||
|
CONFIG_SMP=y
|
||||||
|
CONFIG_NR_CPUS=8
|
||||||
|
CONFIG_AEABI=y
|
||||||
|
CONFIG_HIGHMEM=y
|
||||||
|
CONFIG_HIGHPTE=y
|
||||||
|
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||||
|
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||||
|
CONFIG_ARM_APPENDED_DTB=y
|
||||||
|
CONFIG_ARM_ATAG_DTB_COMPAT=y
|
||||||
|
CONFIG_CPU_FREQ=y
|
||||||
|
CONFIG_CPU_FREQ_STAT_DETAILS=y
|
||||||
|
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
|
||||||
|
CONFIG_CPU_FREQ_GOV_USERSPACE=m
|
||||||
|
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
|
||||||
|
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
|
||||||
|
CONFIG_CPUFREQ_DT=y
|
||||||
|
CONFIG_CPU_IDLE=y
|
||||||
|
CONFIG_ARM_CPUIDLE=y
|
||||||
|
CONFIG_VFP=y
|
||||||
|
CONFIG_NEON=y
|
||||||
|
CONFIG_KERNEL_MODE_NEON=y
|
||||||
|
CONFIG_HIBERNATION=y
|
||||||
|
CONFIG_NET=y
|
||||||
|
CONFIG_PACKET=y
|
||||||
|
CONFIG_PACKET_DIAG=m
|
||||||
|
CONFIG_UNIX=y
|
||||||
|
CONFIG_UNIX_DIAG=m
|
||||||
|
CONFIG_INET=y
|
||||||
|
CONFIG_IP_MULTICAST=y
|
||||||
|
CONFIG_IP_ADVANCED_ROUTER=y
|
||||||
|
CONFIG_IP_FIB_TRIE_STATS=y
|
||||||
|
CONFIG_IP_MULTIPLE_TABLES=y
|
||||||
|
CONFIG_IP_ROUTE_MULTIPATH=y
|
||||||
|
CONFIG_IP_ROUTE_VERBOSE=y
|
||||||
|
CONFIG_IP_PNP=y
|
||||||
|
CONFIG_IP_PNP_DHCP=y
|
||||||
|
CONFIG_IP_PNP_BOOTP=y
|
||||||
|
CONFIG_NET_IPIP=m
|
||||||
|
CONFIG_NET_IPGRE_DEMUX=m
|
||||||
|
CONFIG_NET_IPGRE=m
|
||||||
|
CONFIG_NET_FOU=m
|
||||||
|
CONFIG_INET_AH=m
|
||||||
|
CONFIG_INET_ESP=m
|
||||||
|
CONFIG_INET_IPCOMP=m
|
||||||
|
CONFIG_INET_XFRM_MODE_TRANSPORT=m
|
||||||
|
CONFIG_INET_XFRM_MODE_TUNNEL=m
|
||||||
|
CONFIG_INET_XFRM_MODE_BEET=m
|
||||||
|
CONFIG_INET_LRO=m
|
||||||
|
CONFIG_INET_DIAG=m
|
||||||
|
CONFIG_INET_UDP_DIAG=m
|
||||||
|
CONFIG_TCP_CONG_ADVANCED=y
|
||||||
|
CONFIG_TCP_CONG_HSTCP=m
|
||||||
|
CONFIG_TCP_CONG_HYBLA=m
|
||||||
|
CONFIG_TCP_CONG_SCALABLE=m
|
||||||
|
CONFIG_TCP_CONG_LP=m
|
||||||
|
CONFIG_TCP_CONG_VENO=m
|
||||||
|
CONFIG_TCP_CONG_YEAH=m
|
||||||
|
CONFIG_TCP_CONG_ILLINOIS=m
|
||||||
|
CONFIG_TCP_CONG_DCTCP=m
|
||||||
|
CONFIG_INET6_AH=m
|
||||||
|
CONFIG_INET6_ESP=m
|
||||||
|
CONFIG_INET6_IPCOMP=m
|
||||||
|
CONFIG_IPV6_MIP6=m
|
||||||
|
CONFIG_IPV6_VTI=m
|
||||||
|
CONFIG_IPV6_GRE=m
|
||||||
|
CONFIG_IPV6_MULTIPLE_TABLES=y
|
||||||
|
CONFIG_IPV6_SUBTREES=y
|
||||||
|
CONFIG_IPV6_MROUTE=y
|
||||||
|
CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y
|
||||||
|
CONFIG_IPV6_PIMSM_V2=y
|
||||||
|
CONFIG_NETFILTER=y
|
||||||
|
CONFIG_NF_CONNTRACK=m
|
||||||
|
CONFIG_NF_CONNTRACK_EVENTS=y
|
||||||
|
CONFIG_NF_CONNTRACK_TIMEOUT=y
|
||||||
|
CONFIG_NF_CONNTRACK_TIMESTAMP=y
|
||||||
|
CONFIG_NF_CT_PROTO_DCCP=m
|
||||||
|
CONFIG_NF_CT_PROTO_SCTP=m
|
||||||
|
CONFIG_NF_CT_PROTO_UDPLITE=m
|
||||||
|
CONFIG_NF_CONNTRACK_AMANDA=m
|
||||||
|
CONFIG_NF_CONNTRACK_FTP=m
|
||||||
|
CONFIG_NF_CONNTRACK_H323=m
|
||||||
|
CONFIG_NF_CONNTRACK_IRC=m
|
||||||
|
CONFIG_NF_CONNTRACK_NETBIOS_NS=m
|
||||||
|
CONFIG_NF_CONNTRACK_SNMP=m
|
||||||
|
CONFIG_NF_CONNTRACK_PPTP=m
|
||||||
|
CONFIG_NF_CONNTRACK_SANE=m
|
||||||
|
CONFIG_NF_CONNTRACK_SIP=m
|
||||||
|
CONFIG_NF_CONNTRACK_TFTP=m
|
||||||
|
CONFIG_NF_CT_NETLINK=m
|
||||||
|
CONFIG_NF_CT_NETLINK_TIMEOUT=m
|
||||||
|
CONFIG_NF_CT_NETLINK_HELPER=m
|
||||||
|
CONFIG_NETFILTER_NETLINK_QUEUE_CT=y
|
||||||
|
CONFIG_NF_TABLES=m
|
||||||
|
CONFIG_NF_TABLES_INET=m
|
||||||
|
CONFIG_NFT_EXTHDR=m
|
||||||
|
CONFIG_NFT_META=m
|
||||||
|
CONFIG_NFT_CT=m
|
||||||
|
CONFIG_NFT_RBTREE=m
|
||||||
|
CONFIG_NFT_HASH=m
|
||||||
|
CONFIG_NFT_COUNTER=m
|
||||||
|
CONFIG_NFT_LOG=m
|
||||||
|
CONFIG_NFT_LIMIT=m
|
||||||
|
CONFIG_NFT_MASQ=m
|
||||||
|
CONFIG_NFT_REDIR=m
|
||||||
|
CONFIG_NFT_NAT=m
|
||||||
|
CONFIG_NFT_QUEUE=m
|
||||||
|
CONFIG_NFT_REJECT=m
|
||||||
|
CONFIG_NFT_COMPAT=m
|
||||||
|
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
|
||||||
|
CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
|
||||||
|
CONFIG_NETFILTER_XT_TARGET_HMARK=m
|
||||||
|
CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m
|
||||||
|
CONFIG_NETFILTER_XT_TARGET_LED=m
|
||||||
|
CONFIG_NETFILTER_XT_TARGET_LOG=m
|
||||||
|
CONFIG_NETFILTER_XT_TARGET_MARK=m
|
||||||
|
CONFIG_NETFILTER_XT_TARGET_NFLOG=m
|
||||||
|
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
|
||||||
|
CONFIG_NETFILTER_XT_TARGET_TEE=m
|
||||||
|
CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_BPF=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_CGROUP=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_CLUSTER=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_COMMENT=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_CPU=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_DCCP=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_DSCP=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_ESP=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_HELPER=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_IPCOMP=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_LENGTH=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_LIMIT=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_MAC=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_MARK=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_NFACCT=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_OSF=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_OWNER=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_POLICY=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_QUOTA=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_RATEEST=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_REALM=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_RECENT=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_SCTP=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_SOCKET=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_STATE=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_STRING=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_TIME=m
|
||||||
|
CONFIG_NETFILTER_XT_MATCH_U32=m
|
||||||
|
CONFIG_IP_VS=m
|
||||||
|
CONFIG_IP_VS_IPV6=y
|
||||||
|
CONFIG_IP_VS_DEBUG=y
|
||||||
|
CONFIG_IP_VS_PROTO_TCP=y
|
||||||
|
CONFIG_IP_VS_PROTO_UDP=y
|
||||||
|
CONFIG_IP_VS_PROTO_ESP=y
|
||||||
|
CONFIG_IP_VS_PROTO_AH=y
|
||||||
|
CONFIG_IP_VS_PROTO_SCTP=y
|
||||||
|
CONFIG_IP_VS_RR=m
|
||||||
|
CONFIG_IP_VS_WRR=m
|
||||||
|
CONFIG_IP_VS_LC=m
|
||||||
|
CONFIG_IP_VS_WLC=m
|
||||||
|
CONFIG_IP_VS_FO=m
|
||||||
|
CONFIG_IP_VS_LBLC=m
|
||||||
|
CONFIG_IP_VS_LBLCR=m
|
||||||
|
CONFIG_IP_VS_DH=m
|
||||||
|
CONFIG_IP_VS_SH=m
|
||||||
|
CONFIG_IP_VS_SED=m
|
||||||
|
CONFIG_IP_VS_NQ=m
|
||||||
|
CONFIG_IP_VS_FTP=m
|
||||||
|
CONFIG_IP_VS_PE_SIP=m
|
||||||
|
CONFIG_NF_CONNTRACK_IPV4=m
|
||||||
|
CONFIG_NFT_CHAIN_ROUTE_IPV4=m
|
||||||
|
CONFIG_NF_TABLES_ARP=m
|
||||||
|
CONFIG_NF_LOG_ARP=m
|
||||||
|
CONFIG_NFT_CHAIN_NAT_IPV4=m
|
||||||
|
CONFIG_NFT_MASQ_IPV4=m
|
||||||
|
CONFIG_NFT_REDIR_IPV4=m
|
||||||
|
CONFIG_IP_NF_IPTABLES=m
|
||||||
|
CONFIG_IP_NF_MATCH_AH=m
|
||||||
|
CONFIG_IP_NF_MATCH_ECN=m
|
||||||
|
CONFIG_IP_NF_MATCH_TTL=m
|
||||||
|
CONFIG_IP_NF_FILTER=m
|
||||||
|
CONFIG_IP_NF_TARGET_REJECT=m
|
||||||
|
CONFIG_IP_NF_TARGET_SYNPROXY=m
|
||||||
|
CONFIG_IP_NF_NAT=m
|
||||||
|
CONFIG_IP_NF_TARGET_MASQUERADE=m
|
||||||
|
CONFIG_IP_NF_TARGET_NETMAP=m
|
||||||
|
CONFIG_IP_NF_TARGET_REDIRECT=m
|
||||||
|
CONFIG_IP_NF_MANGLE=m
|
||||||
|
CONFIG_IP_NF_TARGET_CLUSTERIP=m
|
||||||
|
CONFIG_IP_NF_TARGET_ECN=m
|
||||||
|
CONFIG_IP_NF_TARGET_TTL=m
|
||||||
|
CONFIG_IP_NF_RAW=m
|
||||||
|
CONFIG_IP_NF_ARPTABLES=m
|
||||||
|
CONFIG_IP_NF_ARPFILTER=m
|
||||||
|
CONFIG_IP_NF_ARP_MANGLE=m
|
||||||
|
CONFIG_NF_CONNTRACK_IPV6=m
|
||||||
|
CONFIG_NFT_CHAIN_ROUTE_IPV6=m
|
||||||
|
CONFIG_NFT_CHAIN_NAT_IPV6=m
|
||||||
|
CONFIG_NFT_MASQ_IPV6=m
|
||||||
|
CONFIG_NFT_REDIR_IPV6=m
|
||||||
|
CONFIG_IP6_NF_MATCH_AH=m
|
||||||
|
CONFIG_IP6_NF_MATCH_EUI64=m
|
||||||
|
CONFIG_IP6_NF_MATCH_FRAG=m
|
||||||
|
CONFIG_IP6_NF_MATCH_OPTS=m
|
||||||
|
CONFIG_IP6_NF_MATCH_HL=m
|
||||||
|
CONFIG_IP6_NF_MATCH_IPV6HEADER=m
|
||||||
|
CONFIG_IP6_NF_MATCH_MH=m
|
||||||
|
CONFIG_IP6_NF_MATCH_RPFILTER=m
|
||||||
|
CONFIG_IP6_NF_MATCH_RT=m
|
||||||
|
CONFIG_IP6_NF_TARGET_HL=m
|
||||||
|
CONFIG_IP6_NF_FILTER=m
|
||||||
|
CONFIG_IP6_NF_TARGET_REJECT=m
|
||||||
|
CONFIG_IP6_NF_TARGET_SYNPROXY=m
|
||||||
|
CONFIG_IP6_NF_MANGLE=m
|
||||||
|
CONFIG_IP6_NF_RAW=m
|
||||||
|
CONFIG_IP6_NF_NAT=m
|
||||||
|
CONFIG_IP6_NF_TARGET_MASQUERADE=m
|
||||||
|
CONFIG_IP6_NF_TARGET_NPT=m
|
||||||
|
CONFIG_L2TP=m
|
||||||
|
CONFIG_BRIDGE=m
|
||||||
|
CONFIG_BRIDGE_VLAN_FILTERING=y
|
||||||
|
CONFIG_VLAN_8021Q=m
|
||||||
|
CONFIG_VLAN_8021Q_GVRP=y
|
||||||
|
CONFIG_VLAN_8021Q_MVRP=y
|
||||||
|
CONFIG_6LOWPAN=m
|
||||||
|
CONFIG_IEEE802154=m
|
||||||
|
CONFIG_IEEE802154_6LOWPAN=m
|
||||||
|
CONFIG_MAC802154=m
|
||||||
|
CONFIG_NET_SCHED=y
|
||||||
|
CONFIG_NET_SCH_CBQ=m
|
||||||
|
CONFIG_NET_SCH_HTB=y
|
||||||
|
CONFIG_NET_SCH_HFSC=m
|
||||||
|
CONFIG_NET_SCH_PRIO=m
|
||||||
|
CONFIG_NET_SCH_MULTIQ=m
|
||||||
|
CONFIG_NET_SCH_RED=m
|
||||||
|
CONFIG_NET_SCH_SFB=m
|
||||||
|
CONFIG_NET_SCH_SFQ=y
|
||||||
|
CONFIG_NET_SCH_TEQL=m
|
||||||
|
CONFIG_NET_SCH_TBF=m
|
||||||
|
CONFIG_NET_SCH_GRED=m
|
||||||
|
CONFIG_NET_SCH_DSMARK=m
|
||||||
|
CONFIG_NET_SCH_NETEM=m
|
||||||
|
CONFIG_NET_SCH_DRR=m
|
||||||
|
CONFIG_NET_SCH_MQPRIO=m
|
||||||
|
CONFIG_NET_SCH_CHOKE=m
|
||||||
|
CONFIG_NET_SCH_QFQ=m
|
||||||
|
CONFIG_NET_SCH_CODEL=m
|
||||||
|
CONFIG_NET_SCH_FQ_CODEL=y
|
||||||
|
CONFIG_NET_SCH_FQ=m
|
||||||
|
CONFIG_NET_SCH_HHF=m
|
||||||
|
CONFIG_NET_SCH_PIE=y
|
||||||
|
CONFIG_NET_SCH_PLUG=m
|
||||||
|
CONFIG_NET_CLS_BASIC=m
|
||||||
|
CONFIG_NET_CLS_TCINDEX=m
|
||||||
|
CONFIG_NET_CLS_ROUTE4=m
|
||||||
|
CONFIG_NET_CLS_FW=m
|
||||||
|
CONFIG_NET_CLS_U32=m
|
||||||
|
CONFIG_NET_CLS_RSVP=m
|
||||||
|
CONFIG_NET_CLS_RSVP6=m
|
||||||
|
CONFIG_NET_CLS_FLOW=m
|
||||||
|
CONFIG_NET_CLS_CGROUP=m
|
||||||
|
CONFIG_NET_CLS_BPF=m
|
||||||
|
CONFIG_NET_EMATCH=y
|
||||||
|
CONFIG_NET_EMATCH_CMP=m
|
||||||
|
CONFIG_NET_EMATCH_NBYTE=m
|
||||||
|
CONFIG_NET_EMATCH_U32=m
|
||||||
|
CONFIG_NET_EMATCH_META=m
|
||||||
|
CONFIG_NET_EMATCH_TEXT=m
|
||||||
|
CONFIG_NET_CLS_ACT=y
|
||||||
|
CONFIG_NET_ACT_POLICE=m
|
||||||
|
CONFIG_NET_ACT_GACT=m
|
||||||
|
CONFIG_NET_ACT_MIRRED=m
|
||||||
|
CONFIG_NET_ACT_IPT=m
|
||||||
|
CONFIG_NET_ACT_NAT=m
|
||||||
|
CONFIG_NET_ACT_SIMP=m
|
||||||
|
CONFIG_NET_ACT_SKBEDIT=m
|
||||||
|
CONFIG_NET_ACT_CSUM=m
|
||||||
|
CONFIG_NET_ACT_VLAN=m
|
||||||
|
CONFIG_NET_ACT_BPF=m
|
||||||
|
CONFIG_NET_ACT_CONNMARK=m
|
||||||
|
CONFIG_VSOCKETS=m
|
||||||
|
CONFIG_NETLINK_MMAP=y
|
||||||
|
CONFIG_NETLINK_DIAG=y
|
||||||
|
CONFIG_BPF_JIT=y
|
||||||
|
CONFIG_BT=m
|
||||||
|
CONFIG_BT_RFCOMM=m
|
||||||
|
CONFIG_BT_RFCOMM_TTY=y
|
||||||
|
CONFIG_BT_BNEP=m
|
||||||
|
CONFIG_BT_BNEP_PROTO_FILTER=y
|
||||||
|
CONFIG_BT_HIDP=m
|
||||||
|
CONFIG_BT_HCIBTUSB=m
|
||||||
|
CONFIG_BT_HCIBTSDIO=m
|
||||||
|
CONFIG_BT_HCIUART=m
|
||||||
|
CONFIG_BT_HCIUART_BCSP=y
|
||||||
|
CONFIG_BT_HCIUART_ATH3K=y
|
||||||
|
CONFIG_BT_HCIUART_LL=y
|
||||||
|
CONFIG_BT_HCIUART_3WIRE=y
|
||||||
|
CONFIG_BT_HCIUART_INTEL=y
|
||||||
|
CONFIG_BT_HCIUART_BCM=y
|
||||||
|
CONFIG_BT_HCIBCM203X=m
|
||||||
|
CONFIG_BT_HCIBPA10X=m
|
||||||
|
CONFIG_BT_HCIBFUSB=m
|
||||||
|
CONFIG_BT_MRVL=m
|
||||||
|
CONFIG_BT_MRVL_SDIO=m
|
||||||
|
CONFIG_BT_ATH3K=m
|
||||||
|
CONFIG_CFG80211=m
|
||||||
|
CONFIG_CFG80211_WEXT=y
|
||||||
|
CONFIG_MAC80211=m
|
||||||
|
CONFIG_MAC80211_MESH=y
|
||||||
|
CONFIG_DEVTMPFS=y
|
||||||
|
CONFIG_DEVTMPFS_MOUNT=y
|
||||||
|
CONFIG_BLK_DEV_LOOP=m
|
||||||
|
CONFIG_BLK_DEV_LOOP_MIN_COUNT=0
|
||||||
|
CONFIG_BLK_DEV_NBD=m
|
||||||
|
CONFIG_BLK_DEV_RAM=m
|
||||||
|
CONFIG_CDROM_PKTCDVD=m
|
||||||
|
CONFIG_CDROM_PKTCDVD_WCACHE=y
|
||||||
|
CONFIG_EEPROM_SUNXI_SID=y
|
||||||
|
CONFIG_SCSI_MQ_DEFAULT=y
|
||||||
|
CONFIG_BLK_DEV_SD=y
|
||||||
|
CONFIG_CHR_DEV_SG=y
|
||||||
|
CONFIG_ATA=y
|
||||||
|
CONFIG_AHCI_SUNXI=y
|
||||||
|
CONFIG_MD=y
|
||||||
|
CONFIG_MD_LINEAR=m
|
||||||
|
CONFIG_MD_RAID0=m
|
||||||
|
CONFIG_MD_MULTIPATH=m
|
||||||
|
CONFIG_MD_FAULTY=m
|
||||||
|
CONFIG_BCACHE=m
|
||||||
|
CONFIG_BLK_DEV_DM=m
|
||||||
|
CONFIG_DM_MQ_DEFAULT=y
|
||||||
|
CONFIG_DM_CRYPT=m
|
||||||
|
CONFIG_DM_SNAPSHOT=m
|
||||||
|
CONFIG_DM_THIN_PROVISIONING=m
|
||||||
|
CONFIG_DM_CACHE=m
|
||||||
|
CONFIG_DM_ERA=m
|
||||||
|
CONFIG_DM_MIRROR=m
|
||||||
|
CONFIG_DM_LOG_USERSPACE=m
|
||||||
|
CONFIG_DM_RAID=m
|
||||||
|
CONFIG_DM_ZERO=m
|
||||||
|
CONFIG_DM_MULTIPATH=m
|
||||||
|
CONFIG_DM_MULTIPATH_QL=m
|
||||||
|
CONFIG_DM_MULTIPATH_ST=m
|
||||||
|
CONFIG_DM_DELAY=m
|
||||||
|
CONFIG_DM_UEVENT=y
|
||||||
|
CONFIG_DM_FLAKEY=m
|
||||||
|
CONFIG_DM_VERITY=m
|
||||||
|
CONFIG_DM_SWITCH=m
|
||||||
|
CONFIG_DM_LOG_WRITES=m
|
||||||
|
CONFIG_NETDEVICES=y
|
||||||
|
CONFIG_BONDING=m
|
||||||
|
CONFIG_DUMMY=m
|
||||||
|
CONFIG_NET_TEAM=m
|
||||||
|
CONFIG_NET_TEAM_MODE_BROADCAST=m
|
||||||
|
CONFIG_NET_TEAM_MODE_ROUNDROBIN=m
|
||||||
|
CONFIG_NET_TEAM_MODE_RANDOM=m
|
||||||
|
CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m
|
||||||
|
CONFIG_NET_TEAM_MODE_LOADBALANCE=m
|
||||||
|
CONFIG_MACVLAN=m
|
||||||
|
CONFIG_MACVTAP=m
|
||||||
|
CONFIG_IPVLAN=m
|
||||||
|
CONFIG_VXLAN=m
|
||||||
|
CONFIG_TUN=m
|
||||||
|
CONFIG_VETH=m
|
||||||
|
CONFIG_NLMON=m
|
||||||
|
CONFIG_SUN4I_EMAC=y
|
||||||
|
# CONFIG_NET_VENDOR_ARC is not set
|
||||||
|
# CONFIG_NET_CADENCE is not set
|
||||||
|
# CONFIG_NET_VENDOR_BROADCOM is not set
|
||||||
|
# CONFIG_NET_VENDOR_CIRRUS is not set
|
||||||
|
# CONFIG_NET_VENDOR_FARADAY is not set
|
||||||
|
# CONFIG_NET_VENDOR_INTEL is not set
|
||||||
|
# CONFIG_NET_VENDOR_MARVELL is not set
|
||||||
|
# CONFIG_NET_VENDOR_MICREL is not set
|
||||||
|
# CONFIG_NET_VENDOR_MICROCHIP is not set
|
||||||
|
# CONFIG_NET_VENDOR_NATSEMI is not set
|
||||||
|
# CONFIG_NET_VENDOR_SAMSUNG is not set
|
||||||
|
# CONFIG_NET_VENDOR_SEEQ is not set
|
||||||
|
# CONFIG_NET_VENDOR_SMSC is not set
|
||||||
|
CONFIG_STMMAC_ETH=y
|
||||||
|
# CONFIG_NET_VENDOR_VIA is not set
|
||||||
|
# CONFIG_NET_VENDOR_WIZNET is not set
|
||||||
|
CONFIG_PPP=m
|
||||||
|
CONFIG_PPP_BSDCOMP=m
|
||||||
|
CONFIG_PPP_DEFLATE=m
|
||||||
|
CONFIG_PPP_FILTER=y
|
||||||
|
CONFIG_PPP_MPPE=m
|
||||||
|
CONFIG_PPP_MULTILINK=y
|
||||||
|
CONFIG_PPPOE=m
|
||||||
|
CONFIG_PPTP=m
|
||||||
|
CONFIG_PPPOL2TP=m
|
||||||
|
CONFIG_PPP_ASYNC=m
|
||||||
|
CONFIG_PPP_SYNC_TTY=m
|
||||||
|
CONFIG_LIBERTAS_THINFIRM=m
|
||||||
|
CONFIG_LIBERTAS_THINFIRM_USB=m
|
||||||
|
CONFIG_AT76C50X_USB=m
|
||||||
|
CONFIG_USB_ZD1201=m
|
||||||
|
CONFIG_USB_NET_RNDIS_WLAN=m
|
||||||
|
CONFIG_RTL8187=m
|
||||||
|
CONFIG_ATH_CARDS=m
|
||||||
|
CONFIG_ATH9K=m
|
||||||
|
CONFIG_ATH9K_AHB=y
|
||||||
|
CONFIG_ATH9K_CHANNEL_CONTEXT=y
|
||||||
|
CONFIG_ATH9K_HTC=m
|
||||||
|
CONFIG_CARL9170=m
|
||||||
|
CONFIG_ATH6KL=m
|
||||||
|
CONFIG_ATH6KL_SDIO=m
|
||||||
|
CONFIG_ATH6KL_USB=m
|
||||||
|
CONFIG_AR5523=m
|
||||||
|
CONFIG_ATH10K=m
|
||||||
|
CONFIG_WCN36XX=m
|
||||||
|
CONFIG_B43=m
|
||||||
|
CONFIG_B43_SDIO=y
|
||||||
|
CONFIG_BRCMFMAC=m
|
||||||
|
CONFIG_BRCMFMAC_USB=y
|
||||||
|
CONFIG_HOSTAP=m
|
||||||
|
CONFIG_HOSTAP_FIRMWARE=y
|
||||||
|
CONFIG_LIBERTAS=m
|
||||||
|
CONFIG_LIBERTAS_USB=m
|
||||||
|
CONFIG_LIBERTAS_SDIO=m
|
||||||
|
CONFIG_LIBERTAS_SPI=m
|
||||||
|
CONFIG_P54_COMMON=m
|
||||||
|
CONFIG_P54_USB=m
|
||||||
|
CONFIG_P54_SPI=m
|
||||||
|
CONFIG_RT2X00=m
|
||||||
|
CONFIG_RT2500USB=m
|
||||||
|
CONFIG_RT73USB=m
|
||||||
|
CONFIG_RT2800USB=m
|
||||||
|
CONFIG_RT2800USB_RT3573=y
|
||||||
|
CONFIG_RT2800USB_RT53XX=y
|
||||||
|
CONFIG_RT2800USB_RT55XX=y
|
||||||
|
CONFIG_RT2800USB_UNKNOWN=y
|
||||||
|
CONFIG_RTL8192CU=m
|
||||||
|
CONFIG_WL_TI=y
|
||||||
|
CONFIG_WL1251=m
|
||||||
|
CONFIG_WL1251_SPI=m
|
||||||
|
CONFIG_WL1251_SDIO=m
|
||||||
|
CONFIG_WL12XX=m
|
||||||
|
CONFIG_WL18XX=m
|
||||||
|
CONFIG_WLCORE_SPI=m
|
||||||
|
CONFIG_WLCORE_SDIO=m
|
||||||
|
CONFIG_ZD1211RW=m
|
||||||
|
CONFIG_MWIFIEX=m
|
||||||
|
CONFIG_MWIFIEX_SDIO=m
|
||||||
|
CONFIG_MWIFIEX_USB=m
|
||||||
|
CONFIG_CW1200=m
|
||||||
|
CONFIG_CW1200_WLAN_SDIO=m
|
||||||
|
CONFIG_CW1200_WLAN_SPI=m
|
||||||
|
CONFIG_RSI_91X=m
|
||||||
|
# CONFIG_INPUT_MOUSEDEV is not set
|
||||||
|
# CONFIG_INPUT_KEYBOARD is not set
|
||||||
|
# CONFIG_INPUT_MOUSE is not set
|
||||||
|
CONFIG_INPUT_TOUCHSCREEN=y
|
||||||
|
CONFIG_TOUCHSCREEN_SUN4I=y
|
||||||
|
CONFIG_INPUT_MISC=y
|
||||||
|
CONFIG_INPUT_AXP20X_PEK=y
|
||||||
|
CONFIG_INPUT_EVDEV=y
|
||||||
|
CONFIG_SERIAL_8250=y
|
||||||
|
CONFIG_SERIAL_8250_CONSOLE=y
|
||||||
|
CONFIG_SERIAL_8250_NR_UARTS=8
|
||||||
|
CONFIG_SERIAL_8250_RUNTIME_UARTS=8
|
||||||
|
CONFIG_SERIAL_8250_DW=y
|
||||||
|
CONFIG_SERIAL_OF_PLATFORM=y
|
||||||
|
# CONFIG_HW_RANDOM is not set
|
||||||
|
CONFIG_I2C=y
|
||||||
|
CONFIG_I2C_CHARDEV=y
|
||||||
|
CONFIG_I2C_MV64XXX=y
|
||||||
|
CONFIG_I2C_SUN6I_P2WI=y
|
||||||
|
CONFIG_SPI=y
|
||||||
|
CONFIG_SPI_SPIDEV=y
|
||||||
|
CONFIG_SPI_SUN4I=y
|
||||||
|
CONFIG_SPI_SUN6I=y
|
||||||
|
CONFIG_GPIO_SYSFS=y
|
||||||
|
CONFIG_POWER_SUPPLY=y
|
||||||
|
CONFIG_POWER_RESET=y
|
||||||
|
CONFIG_THERMAL=y
|
||||||
|
CONFIG_THERMAL_OF=y
|
||||||
|
CONFIG_CPU_THERMAL=y
|
||||||
|
CONFIG_WATCHDOG=y
|
||||||
|
CONFIG_SUNXI_WATCHDOG=y
|
||||||
|
CONFIG_MFD_AXP20X=y
|
||||||
|
CONFIG_REGULATOR=y
|
||||||
|
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||||
|
CONFIG_REGULATOR_AXP20X=y
|
||||||
|
CONFIG_REGULATOR_GPIO=y
|
||||||
|
CONFIG_MEDIA_SUPPORT=m
|
||||||
|
CONFIG_MEDIA_CAMERA_SUPPORT=y
|
||||||
|
CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
|
||||||
|
CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
|
||||||
|
CONFIG_MEDIA_RADIO_SUPPORT=y
|
||||||
|
CONFIG_MEDIA_SDR_SUPPORT=y
|
||||||
|
CONFIG_MEDIA_RC_SUPPORT=y
|
||||||
|
CONFIG_MEDIA_CONTROLLER=y
|
||||||
|
CONFIG_VIDEO_ADV_DEBUG=y
|
||||||
|
CONFIG_DVB_DYNAMIC_MINORS=y
|
||||||
|
CONFIG_MEDIA_USB_SUPPORT=y
|
||||||
|
CONFIG_USB_VIDEO_CLASS=m
|
||||||
|
CONFIG_USB_M5602=m
|
||||||
|
CONFIG_USB_STV06XX=m
|
||||||
|
CONFIG_USB_GL860=m
|
||||||
|
CONFIG_USB_GSPCA_BENQ=m
|
||||||
|
CONFIG_USB_GSPCA_CONEX=m
|
||||||
|
CONFIG_USB_GSPCA_CPIA1=m
|
||||||
|
CONFIG_USB_GSPCA_DTCS033=m
|
||||||
|
CONFIG_USB_GSPCA_ETOMS=m
|
||||||
|
CONFIG_USB_GSPCA_FINEPIX=m
|
||||||
|
CONFIG_USB_GSPCA_JEILINJ=m
|
||||||
|
CONFIG_USB_GSPCA_JL2005BCD=m
|
||||||
|
CONFIG_USB_GSPCA_KINECT=m
|
||||||
|
CONFIG_USB_GSPCA_KONICA=m
|
||||||
|
CONFIG_USB_GSPCA_MARS=m
|
||||||
|
CONFIG_USB_GSPCA_MR97310A=m
|
||||||
|
CONFIG_USB_GSPCA_NW80X=m
|
||||||
|
CONFIG_USB_GSPCA_OV519=m
|
||||||
|
CONFIG_USB_GSPCA_OV534=m
|
||||||
|
CONFIG_USB_GSPCA_OV534_9=m
|
||||||
|
CONFIG_USB_GSPCA_PAC207=m
|
||||||
|
CONFIG_USB_GSPCA_PAC7302=m
|
||||||
|
CONFIG_USB_GSPCA_PAC7311=m
|
||||||
|
CONFIG_USB_GSPCA_SE401=m
|
||||||
|
CONFIG_USB_GSPCA_SN9C2028=m
|
||||||
|
CONFIG_USB_GSPCA_SN9C20X=m
|
||||||
|
CONFIG_USB_GSPCA_SONIXB=m
|
||||||
|
CONFIG_USB_GSPCA_SONIXJ=m
|
||||||
|
CONFIG_USB_GSPCA_SPCA500=m
|
||||||
|
CONFIG_USB_GSPCA_SPCA501=m
|
||||||
|
CONFIG_USB_GSPCA_SPCA505=m
|
||||||
|
CONFIG_USB_GSPCA_SPCA506=m
|
||||||
|
CONFIG_USB_GSPCA_SPCA508=m
|
||||||
|
CONFIG_USB_GSPCA_SPCA561=m
|
||||||
|
CONFIG_USB_GSPCA_SPCA1528=m
|
||||||
|
CONFIG_USB_GSPCA_SQ905=m
|
||||||
|
CONFIG_USB_GSPCA_SQ905C=m
|
||||||
|
CONFIG_USB_GSPCA_SQ930X=m
|
||||||
|
CONFIG_USB_GSPCA_STK014=m
|
||||||
|
CONFIG_USB_GSPCA_STK1135=m
|
||||||
|
CONFIG_USB_GSPCA_STV0680=m
|
||||||
|
CONFIG_USB_GSPCA_SUNPLUS=m
|
||||||
|
CONFIG_USB_GSPCA_T613=m
|
||||||
|
CONFIG_USB_GSPCA_TOPRO=m
|
||||||
|
CONFIG_USB_GSPCA_TOUPTEK=m
|
||||||
|
CONFIG_USB_GSPCA_TV8532=m
|
||||||
|
CONFIG_USB_GSPCA_VC032X=m
|
||||||
|
CONFIG_USB_GSPCA_VICAM=m
|
||||||
|
CONFIG_USB_GSPCA_XIRLINK_CIT=m
|
||||||
|
CONFIG_USB_GSPCA_ZC3XX=m
|
||||||
|
CONFIG_USB_PWC=m
|
||||||
|
CONFIG_VIDEO_CPIA2=m
|
||||||
|
CONFIG_USB_ZR364XX=m
|
||||||
|
CONFIG_USB_STKWEBCAM=m
|
||||||
|
CONFIG_USB_S2255=m
|
||||||
|
CONFIG_VIDEO_PVRUSB2=m
|
||||||
|
CONFIG_VIDEO_HDPVR=m
|
||||||
|
CONFIG_VIDEO_USBVISION=m
|
||||||
|
CONFIG_VIDEO_STK1160_COMMON=m
|
||||||
|
CONFIG_VIDEO_AU0828=m
|
||||||
|
CONFIG_VIDEO_AU0828_RC=y
|
||||||
|
CONFIG_VIDEO_CX231XX=m
|
||||||
|
CONFIG_VIDEO_CX231XX_DVB=m
|
||||||
|
CONFIG_VIDEO_TM6000=m
|
||||||
|
CONFIG_VIDEO_TM6000_DVB=m
|
||||||
|
CONFIG_DVB_USB=m
|
||||||
|
CONFIG_DVB_USB_A800=m
|
||||||
|
CONFIG_DVB_USB_DIBUSB_MB=m
|
||||||
|
CONFIG_DVB_USB_DIBUSB_MC=m
|
||||||
|
CONFIG_DVB_USB_DIB0700=m
|
||||||
|
CONFIG_DVB_USB_UMT_010=m
|
||||||
|
CONFIG_DVB_USB_CXUSB=m
|
||||||
|
CONFIG_DVB_USB_M920X=m
|
||||||
|
CONFIG_DVB_USB_DIGITV=m
|
||||||
|
CONFIG_DVB_USB_VP7045=m
|
||||||
|
CONFIG_DVB_USB_VP702X=m
|
||||||
|
CONFIG_DVB_USB_GP8PSK=m
|
||||||
|
CONFIG_DVB_USB_NOVA_T_USB2=m
|
||||||
|
CONFIG_DVB_USB_TTUSB2=m
|
||||||
|
CONFIG_DVB_USB_DTT200U=m
|
||||||
|
CONFIG_DVB_USB_OPERA1=m
|
||||||
|
CONFIG_DVB_USB_AF9005=m
|
||||||
|
CONFIG_DVB_USB_AF9005_REMOTE=m
|
||||||
|
CONFIG_DVB_USB_PCTV452E=m
|
||||||
|
CONFIG_DVB_USB_DW2102=m
|
||||||
|
CONFIG_DVB_USB_CINERGY_T2=m
|
||||||
|
CONFIG_DVB_USB_DTV5100=m
|
||||||
|
CONFIG_DVB_USB_FRIIO=m
|
||||||
|
CONFIG_DVB_USB_AZ6027=m
|
||||||
|
CONFIG_DVB_USB_TECHNISAT_USB2=m
|
||||||
|
CONFIG_DVB_USB_V2=m
|
||||||
|
CONFIG_DVB_USB_AF9015=m
|
||||||
|
CONFIG_DVB_USB_AF9035=m
|
||||||
|
CONFIG_DVB_USB_ANYSEE=m
|
||||||
|
CONFIG_DVB_USB_AU6610=m
|
||||||
|
CONFIG_DVB_USB_AZ6007=m
|
||||||
|
CONFIG_DVB_USB_CE6230=m
|
||||||
|
CONFIG_DVB_USB_EC168=m
|
||||||
|
CONFIG_DVB_USB_GL861=m
|
||||||
|
CONFIG_DVB_USB_LME2510=m
|
||||||
|
CONFIG_DVB_USB_MXL111SF=m
|
||||||
|
CONFIG_DVB_USB_RTL28XXU=m
|
||||||
|
CONFIG_DVB_USB_DVBSKY=m
|
||||||
|
CONFIG_SMS_USB_DRV=m
|
||||||
|
CONFIG_DVB_B2C2_FLEXCOP_USB=m
|
||||||
|
CONFIG_DVB_AS102=m
|
||||||
|
CONFIG_USB_AIRSPY=m
|
||||||
|
CONFIG_USB_HACKRF=m
|
||||||
|
CONFIG_USB_MSI2500=m
|
||||||
|
CONFIG_V4L_PLATFORM_DRIVERS=y
|
||||||
|
CONFIG_SOC_CAMERA=m
|
||||||
|
CONFIG_SOC_CAMERA_PLATFORM=m
|
||||||
|
CONFIG_V4L_MEM2MEM_DRIVERS=y
|
||||||
|
CONFIG_V4L_TEST_DRIVERS=y
|
||||||
|
CONFIG_VIDEO_VIVID=m
|
||||||
|
CONFIG_VIDEO_VIM2M=m
|
||||||
|
CONFIG_SMS_SDIO_DRV=m
|
||||||
|
CONFIG_RADIO_SI470X=y
|
||||||
|
CONFIG_USB_SI470X=m
|
||||||
|
CONFIG_I2C_SI470X=m
|
||||||
|
CONFIG_RADIO_SI4713=m
|
||||||
|
CONFIG_USB_SI4713=m
|
||||||
|
CONFIG_PLATFORM_SI4713=m
|
||||||
|
CONFIG_USB_MR800=m
|
||||||
|
CONFIG_USB_DSBR=m
|
||||||
|
CONFIG_RADIO_SHARK=m
|
||||||
|
CONFIG_RADIO_SHARK2=m
|
||||||
|
CONFIG_USB_KEENE=m
|
||||||
|
CONFIG_USB_RAREMONO=m
|
||||||
|
CONFIG_USB_MA901=m
|
||||||
|
CONFIG_RADIO_TEA5764=m
|
||||||
|
CONFIG_RADIO_SAA7706H=m
|
||||||
|
CONFIG_RADIO_TEF6862=m
|
||||||
|
CONFIG_RADIO_WL1273=m
|
||||||
|
CONFIG_SOC_CAMERA_IMX074=m
|
||||||
|
CONFIG_SOC_CAMERA_MT9M001=m
|
||||||
|
CONFIG_SOC_CAMERA_MT9M111=m
|
||||||
|
CONFIG_SOC_CAMERA_MT9T031=m
|
||||||
|
CONFIG_SOC_CAMERA_MT9T112=m
|
||||||
|
CONFIG_SOC_CAMERA_MT9V022=m
|
||||||
|
CONFIG_SOC_CAMERA_OV2640=m
|
||||||
|
CONFIG_SOC_CAMERA_OV5642=m
|
||||||
|
CONFIG_SOC_CAMERA_OV6650=m
|
||||||
|
CONFIG_SOC_CAMERA_OV772X=m
|
||||||
|
CONFIG_SOC_CAMERA_OV9640=m
|
||||||
|
CONFIG_SOC_CAMERA_OV9740=m
|
||||||
|
CONFIG_SOC_CAMERA_RJ54N1=m
|
||||||
|
CONFIG_SOC_CAMERA_TW9910=m
|
||||||
|
CONFIG_FB=y
|
||||||
|
CONFIG_FB_SIMPLE=y
|
||||||
|
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||||
|
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
|
||||||
|
CONFIG_USB=y
|
||||||
|
CONFIG_USB_EHCI_HCD=y
|
||||||
|
CONFIG_USB_EHCI_HCD_PLATFORM=y
|
||||||
|
CONFIG_USB_OHCI_HCD=y
|
||||||
|
CONFIG_USB_OHCI_HCD_PLATFORM=y
|
||||||
|
CONFIG_USB_SERIAL=m
|
||||||
|
CONFIG_USB_SERIAL_GENERIC=y
|
||||||
|
CONFIG_USB_SERIAL_SIMPLE=m
|
||||||
|
CONFIG_USB_SERIAL_CP210X=m
|
||||||
|
CONFIG_USB_SERIAL_FTDI_SIO=m
|
||||||
|
CONFIG_USB_SERIAL_KEYSPAN=m
|
||||||
|
CONFIG_USB_SERIAL_KEYSPAN_MPR=y
|
||||||
|
CONFIG_USB_SERIAL_KEYSPAN_USA28=y
|
||||||
|
CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
|
||||||
|
CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
|
||||||
|
CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
|
||||||
|
CONFIG_USB_SERIAL_KEYSPAN_USA19=y
|
||||||
|
CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
|
||||||
|
CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
|
||||||
|
CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
|
||||||
|
CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
|
||||||
|
CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
|
||||||
|
CONFIG_USB_SERIAL_KLSI=m
|
||||||
|
CONFIG_USB_SERIAL_MOS7720=m
|
||||||
|
CONFIG_USB_SERIAL_MOS7840=m
|
||||||
|
CONFIG_USB_SERIAL_PL2303=m
|
||||||
|
CONFIG_MMC=y
|
||||||
|
CONFIG_MMC_SUNXI=y
|
||||||
|
CONFIG_LEDS_CLASS=y
|
||||||
|
CONFIG_LEDS_CLASS_FLASH=y
|
||||||
|
CONFIG_LEDS_LM3530=m
|
||||||
|
CONFIG_LEDS_GPIO=y
|
||||||
|
CONFIG_LEDS_LP3944=m
|
||||||
|
CONFIG_LEDS_LP5521=m
|
||||||
|
CONFIG_LEDS_LP5523=m
|
||||||
|
CONFIG_LEDS_LP5562=m
|
||||||
|
CONFIG_LEDS_LP8501=m
|
||||||
|
CONFIG_LEDS_PCA955X=m
|
||||||
|
CONFIG_LEDS_PCA963X=m
|
||||||
|
CONFIG_LEDS_DAC124S085=m
|
||||||
|
CONFIG_LEDS_REGULATOR=y
|
||||||
|
CONFIG_LEDS_BD2802=m
|
||||||
|
CONFIG_LEDS_LT3593=m
|
||||||
|
CONFIG_LEDS_TCA6507=m
|
||||||
|
CONFIG_LEDS_LM355x=m
|
||||||
|
CONFIG_LEDS_BLINKM=m
|
||||||
|
CONFIG_LEDS_TRIGGER_TIMER=y
|
||||||
|
CONFIG_LEDS_TRIGGER_ONESHOT=y
|
||||||
|
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||||
|
CONFIG_LEDS_TRIGGER_BACKLIGHT=y
|
||||||
|
CONFIG_LEDS_TRIGGER_CPU=y
|
||||||
|
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
|
||||||
|
CONFIG_LEDS_TRIGGER_TRANSIENT=y
|
||||||
|
CONFIG_LEDS_TRIGGER_CAMERA=y
|
||||||
|
CONFIG_RTC_CLASS=y
|
||||||
|
# CONFIG_RTC_INTF_SYSFS is not set
|
||||||
|
# CONFIG_RTC_INTF_PROC is not set
|
||||||
|
CONFIG_RTC_DRV_SUN6I=y
|
||||||
|
CONFIG_RTC_DRV_SUNXI=y
|
||||||
|
CONFIG_DMADEVICES=y
|
||||||
|
CONFIG_DMA_SUN6I=y
|
||||||
|
# CONFIG_IOMMU_SUPPORT is not set
|
||||||
|
CONFIG_EXTCON=y
|
||||||
|
CONFIG_PWM=y
|
||||||
|
CONFIG_PWM_SUN4I=y
|
||||||
|
CONFIG_PHY_SUN4I_USB=y
|
||||||
|
CONFIG_PHY_SUN9I_USB=y
|
||||||
|
CONFIG_EXT4_FS=y
|
||||||
|
CONFIG_XFS_FS=m
|
||||||
|
CONFIG_XFS_POSIX_ACL=y
|
||||||
|
CONFIG_BTRFS_FS=m
|
||||||
|
CONFIG_BTRFS_FS_POSIX_ACL=y
|
||||||
|
CONFIG_FANOTIFY=y
|
||||||
|
CONFIG_AUTOFS4_FS=m
|
||||||
|
CONFIG_FUSE_FS=m
|
||||||
|
CONFIG_OVERLAY_FS=m
|
||||||
|
CONFIG_FSCACHE=m
|
||||||
|
CONFIG_FSCACHE_STATS=y
|
||||||
|
CONFIG_FSCACHE_HISTOGRAM=y
|
||||||
|
CONFIG_CACHEFILES=m
|
||||||
|
CONFIG_CACHEFILES_HISTOGRAM=y
|
||||||
|
CONFIG_ISO9660_FS=m
|
||||||
|
CONFIG_JOLIET=y
|
||||||
|
CONFIG_ZISOFS=y
|
||||||
|
CONFIG_UDF_FS=m
|
||||||
|
CONFIG_VFAT_FS=y
|
||||||
|
CONFIG_TMPFS=y
|
||||||
|
CONFIG_NFS_FS=y
|
||||||
|
CONFIG_NFS_V3_ACL=y
|
||||||
|
CONFIG_NFS_V4=y
|
||||||
|
CONFIG_ROOT_NFS=y
|
||||||
|
CONFIG_NLS_CODEPAGE_437=y
|
||||||
|
CONFIG_NLS_ISO8859_1=y
|
||||||
|
CONFIG_PRINTK_TIME=y
|
||||||
|
CONFIG_CRYPTO_DEV_SUN4I_SS=y
|
||||||
|
CONFIG_ARM_CRYPTO=y
|
||||||
|
CONFIG_CRYPTO_SHA1_ARM_NEON=y
|
||||||
|
CONFIG_CRYPTO_SHA256_ARM=y
|
||||||
|
CONFIG_CRYPTO_SHA512_ARM_NEON=y
|
||||||
|
CONFIG_CRYPTO_AES_ARM_BS=y
|
||||||
|
CONFIG_USB_STORAGE=y
|
|
@ -0,0 +1,26 @@
|
||||||
|
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts
|
||||||
|
index 63c5498..c585618 100644
|
||||||
|
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts
|
||||||
|
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts
|
||||||
|
@@ -122,7 +122,7 @@
|
||||||
|
|
||||||
|
&cpu0 {
|
||||||
|
operating-points = <
|
||||||
|
- 1008000 1300000
|
||||||
|
+ 1200000 1300000
|
||||||
|
816000 1100000
|
||||||
|
624000 1100000
|
||||||
|
480000 1100000
|
||||||
|
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts
|
||||||
|
index 87e495f..fb85217 100644
|
||||||
|
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts
|
||||||
|
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts
|
||||||
|
@@ -115,7 +115,7 @@
|
||||||
|
|
||||||
|
&cpu0 {
|
||||||
|
operating-points = <
|
||||||
|
- 1008000 1300000
|
||||||
|
+ 1200000 1300000
|
||||||
|
816000 1100000
|
||||||
|
624000 1100000
|
||||||
|
480000 1100000
|
|
@ -0,0 +1,19 @@
|
||||||
|
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
|
||||||
|
index 50e7e770..16845848 100644
|
||||||
|
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
|
||||||
|
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
|
||||||
|
@@ -107,6 +107,14 @@
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
+&codec {
|
||||||
|
+ allwinner,audio-routing =
|
||||||
|
+ "Line Out", "LINEOUT",
|
||||||
|
+ "MIC1", "Mic",
|
||||||
|
+ "Mic", "MBIAS";
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&de {
|
||||||
|
status = "okay";
|
||||||
|
};
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
|
||||||
|
index 5b82d160..bccfb98f 100644
|
||||||
|
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
|
||||||
|
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
|
||||||
|
@@ -560,7 +560,7 @@
|
||||||
|
|
||||||
|
i2c2: i2c@01c2b400 {
|
||||||
|
compatible = "allwinner,sun6i-a31-i2c";
|
||||||
|
- reg = <0x01c2b000 0x400>;
|
||||||
|
+ reg = <0x01c2b400 0x400>;
|
||||||
|
interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
clocks = <&ccu CLK_BUS_I2C2>;
|
||||||
|
resets = <&ccu RST_BUS_I2C2>;
|
|
@ -0,0 +1,198 @@
|
||||||
|
From b56f5cbc7e08ec7d31c42fc41e5247677f20b143 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||||
|
Date: Tue, 14 Feb 2017 21:51:01 +0000
|
||||||
|
Subject: crypto: arm/aes-neonbs - resolve fallback cipher at runtime
|
||||||
|
|
||||||
|
Currently, the bit sliced NEON AES code for ARM has a link time
|
||||||
|
dependency on the scalar ARM asm implementation, which it uses as a
|
||||||
|
fallback to perform CBC encryption and the encryption of the initial
|
||||||
|
XTS tweak.
|
||||||
|
|
||||||
|
The bit sliced NEON code is both fast and time invariant, which makes
|
||||||
|
it a reasonable default on hardware that supports it. However, the
|
||||||
|
ARM asm code it pulls in is not time invariant, and due to the way it
|
||||||
|
is linked in, cannot be overridden by the new generic time invariant
|
||||||
|
driver. In fact, it will not be used at all, given that the ARM asm
|
||||||
|
code registers itself as a cipher with a priority that exceeds the
|
||||||
|
priority of the fixed time cipher.
|
||||||
|
|
||||||
|
So remove the link time dependency, and allocate the fallback cipher
|
||||||
|
via the crypto API. Note that this requires this driver's module_init
|
||||||
|
call to be replaced with late_initcall, so that the (possibly generic)
|
||||||
|
fallback cipher is guaranteed to be available when the builtin test
|
||||||
|
is performed at registration time.
|
||||||
|
|
||||||
|
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||||
|
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||||
|
---
|
||||||
|
arch/arm/crypto/Kconfig | 2 +-
|
||||||
|
arch/arm/crypto/aes-neonbs-glue.c | 60 +++++++++++++++++++++++++++++----------
|
||||||
|
2 files changed, 46 insertions(+), 16 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/crypto/Kconfig b/arch/arm/crypto/Kconfig
|
||||||
|
index a8fce93..b9adedc 100644
|
||||||
|
--- a/arch/arm/crypto/Kconfig
|
||||||
|
+++ b/arch/arm/crypto/Kconfig
|
||||||
|
@@ -73,7 +73,7 @@ config CRYPTO_AES_ARM_BS
|
||||||
|
depends on KERNEL_MODE_NEON
|
||||||
|
select CRYPTO_BLKCIPHER
|
||||||
|
select CRYPTO_SIMD
|
||||||
|
- select CRYPTO_AES_ARM
|
||||||
|
+ select CRYPTO_AES
|
||||||
|
help
|
||||||
|
Use a faster and more secure NEON based implementation of AES in CBC,
|
||||||
|
CTR and XTS modes
|
||||||
|
diff --git a/arch/arm/crypto/aes-neonbs-glue.c b/arch/arm/crypto/aes-neonbs-glue.c
|
||||||
|
index 2920b96..c763779 100644
|
||||||
|
--- a/arch/arm/crypto/aes-neonbs-glue.c
|
||||||
|
+++ b/arch/arm/crypto/aes-neonbs-glue.c
|
||||||
|
@@ -42,9 +42,6 @@ asmlinkage void aesbs_xts_encrypt(u8 out[], u8 const in[], u8 const rk[],
|
||||||
|
asmlinkage void aesbs_xts_decrypt(u8 out[], u8 const in[], u8 const rk[],
|
||||||
|
int rounds, int blocks, u8 iv[]);
|
||||||
|
|
||||||
|
-asmlinkage void __aes_arm_encrypt(const u32 rk[], int rounds, const u8 in[],
|
||||||
|
- u8 out[]);
|
||||||
|
-
|
||||||
|
struct aesbs_ctx {
|
||||||
|
int rounds;
|
||||||
|
u8 rk[13 * (8 * AES_BLOCK_SIZE) + 32] __aligned(AES_BLOCK_SIZE);
|
||||||
|
@@ -52,12 +49,12 @@ struct aesbs_ctx {
|
||||||
|
|
||||||
|
struct aesbs_cbc_ctx {
|
||||||
|
struct aesbs_ctx key;
|
||||||
|
- u32 enc[AES_MAX_KEYLENGTH_U32];
|
||||||
|
+ struct crypto_cipher *enc_tfm;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct aesbs_xts_ctx {
|
||||||
|
struct aesbs_ctx key;
|
||||||
|
- u32 twkey[AES_MAX_KEYLENGTH_U32];
|
||||||
|
+ struct crypto_cipher *tweak_tfm;
|
||||||
|
};
|
||||||
|
|
||||||
|
static int aesbs_setkey(struct crypto_skcipher *tfm, const u8 *in_key,
|
||||||
|
@@ -132,20 +129,18 @@ static int aesbs_cbc_setkey(struct crypto_skcipher *tfm, const u8 *in_key,
|
||||||
|
|
||||||
|
ctx->key.rounds = 6 + key_len / 4;
|
||||||
|
|
||||||
|
- memcpy(ctx->enc, rk.key_enc, sizeof(ctx->enc));
|
||||||
|
-
|
||||||
|
kernel_neon_begin();
|
||||||
|
aesbs_convert_key(ctx->key.rk, rk.key_enc, ctx->key.rounds);
|
||||||
|
kernel_neon_end();
|
||||||
|
|
||||||
|
- return 0;
|
||||||
|
+ return crypto_cipher_setkey(ctx->enc_tfm, in_key, key_len);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void cbc_encrypt_one(struct crypto_skcipher *tfm, const u8 *src, u8 *dst)
|
||||||
|
{
|
||||||
|
struct aesbs_cbc_ctx *ctx = crypto_skcipher_ctx(tfm);
|
||||||
|
|
||||||
|
- __aes_arm_encrypt(ctx->enc, ctx->key.rounds, src, dst);
|
||||||
|
+ crypto_cipher_encrypt_one(ctx->enc_tfm, dst, src);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int cbc_encrypt(struct skcipher_request *req)
|
||||||
|
@@ -181,6 +176,23 @@ static int cbc_decrypt(struct skcipher_request *req)
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int cbc_init(struct crypto_tfm *tfm)
|
||||||
|
+{
|
||||||
|
+ struct aesbs_cbc_ctx *ctx = crypto_tfm_ctx(tfm);
|
||||||
|
+
|
||||||
|
+ ctx->enc_tfm = crypto_alloc_cipher("aes", 0, 0);
|
||||||
|
+ if (IS_ERR(ctx->enc_tfm))
|
||||||
|
+ return PTR_ERR(ctx->enc_tfm);
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void cbc_exit(struct crypto_tfm *tfm)
|
||||||
|
+{
|
||||||
|
+ struct aesbs_cbc_ctx *ctx = crypto_tfm_ctx(tfm);
|
||||||
|
+
|
||||||
|
+ crypto_free_cipher(ctx->enc_tfm);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static int ctr_encrypt(struct skcipher_request *req)
|
||||||
|
{
|
||||||
|
struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
|
||||||
|
@@ -228,7 +240,6 @@ static int aesbs_xts_setkey(struct crypto_skcipher *tfm, const u8 *in_key,
|
||||||
|
unsigned int key_len)
|
||||||
|
{
|
||||||
|
struct aesbs_xts_ctx *ctx = crypto_skcipher_ctx(tfm);
|
||||||
|
- struct crypto_aes_ctx rk;
|
||||||
|
int err;
|
||||||
|
|
||||||
|
err = xts_verify_key(tfm, in_key, key_len);
|
||||||
|
@@ -236,15 +247,30 @@ static int aesbs_xts_setkey(struct crypto_skcipher *tfm, const u8 *in_key,
|
||||||
|
return err;
|
||||||
|
|
||||||
|
key_len /= 2;
|
||||||
|
- err = crypto_aes_expand_key(&rk, in_key + key_len, key_len);
|
||||||
|
+ err = crypto_cipher_setkey(ctx->tweak_tfm, in_key + key_len, key_len);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
|
||||||
|
- memcpy(ctx->twkey, rk.key_enc, sizeof(ctx->twkey));
|
||||||
|
-
|
||||||
|
return aesbs_setkey(tfm, in_key, key_len);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int xts_init(struct crypto_tfm *tfm)
|
||||||
|
+{
|
||||||
|
+ struct aesbs_xts_ctx *ctx = crypto_tfm_ctx(tfm);
|
||||||
|
+
|
||||||
|
+ ctx->tweak_tfm = crypto_alloc_cipher("aes", 0, 0);
|
||||||
|
+ if (IS_ERR(ctx->tweak_tfm))
|
||||||
|
+ return PTR_ERR(ctx->tweak_tfm);
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void xts_exit(struct crypto_tfm *tfm)
|
||||||
|
+{
|
||||||
|
+ struct aesbs_xts_ctx *ctx = crypto_tfm_ctx(tfm);
|
||||||
|
+
|
||||||
|
+ crypto_free_cipher(ctx->tweak_tfm);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static int __xts_crypt(struct skcipher_request *req,
|
||||||
|
void (*fn)(u8 out[], u8 const in[], u8 const rk[],
|
||||||
|
int rounds, int blocks, u8 iv[]))
|
||||||
|
@@ -256,7 +282,7 @@ static int __xts_crypt(struct skcipher_request *req,
|
||||||
|
|
||||||
|
err = skcipher_walk_virt(&walk, req, true);
|
||||||
|
|
||||||
|
- __aes_arm_encrypt(ctx->twkey, ctx->key.rounds, walk.iv, walk.iv);
|
||||||
|
+ crypto_cipher_encrypt_one(ctx->tweak_tfm, walk.iv, walk.iv);
|
||||||
|
|
||||||
|
kernel_neon_begin();
|
||||||
|
while (walk.nbytes >= AES_BLOCK_SIZE) {
|
||||||
|
@@ -309,6 +335,8 @@ static struct skcipher_alg aes_algs[] = { {
|
||||||
|
.base.cra_ctxsize = sizeof(struct aesbs_cbc_ctx),
|
||||||
|
.base.cra_module = THIS_MODULE,
|
||||||
|
.base.cra_flags = CRYPTO_ALG_INTERNAL,
|
||||||
|
+ .base.cra_init = cbc_init,
|
||||||
|
+ .base.cra_exit = cbc_exit,
|
||||||
|
|
||||||
|
.min_keysize = AES_MIN_KEY_SIZE,
|
||||||
|
.max_keysize = AES_MAX_KEY_SIZE,
|
||||||
|
@@ -342,6 +370,8 @@ static struct skcipher_alg aes_algs[] = { {
|
||||||
|
.base.cra_ctxsize = sizeof(struct aesbs_xts_ctx),
|
||||||
|
.base.cra_module = THIS_MODULE,
|
||||||
|
.base.cra_flags = CRYPTO_ALG_INTERNAL,
|
||||||
|
+ .base.cra_init = xts_init,
|
||||||
|
+ .base.cra_exit = xts_exit,
|
||||||
|
|
||||||
|
.min_keysize = 2 * AES_MIN_KEY_SIZE,
|
||||||
|
.max_keysize = 2 * AES_MAX_KEY_SIZE,
|
||||||
|
@@ -402,5 +432,5 @@ unregister_simds:
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
-module_init(aes_init);
|
||||||
|
+late_initcall(aes_init);
|
||||||
|
module_exit(aes_exit);
|
||||||
|
--
|
||||||
|
cgit v1.1
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,190 @@
|
||||||
|
diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c
|
||||||
|
index e3114832..03a773a9 100644
|
||||||
|
--- a/drivers/spi/spi-sun6i.c
|
||||||
|
+++ b/drivers/spi/spi-sun6i.c
|
||||||
|
@@ -46,13 +46,19 @@
|
||||||
|
#define SUN6I_TFR_CTL_XCH BIT(31)
|
||||||
|
|
||||||
|
#define SUN6I_INT_CTL_REG 0x10
|
||||||
|
+#define SUN6I_INT_CTL_RF_RDY BIT(0)
|
||||||
|
+#define SUN6I_INT_CTL_TF_ERQ BIT(4)
|
||||||
|
#define SUN6I_INT_CTL_RF_OVF BIT(8)
|
||||||
|
#define SUN6I_INT_CTL_TC BIT(12)
|
||||||
|
|
||||||
|
#define SUN6I_INT_STA_REG 0x14
|
||||||
|
|
||||||
|
#define SUN6I_FIFO_CTL_REG 0x18
|
||||||
|
+#define SUN6I_FIFO_CTL_RF_RDY_TRIG_LEVEL_MASK 0xff
|
||||||
|
+#define SUN6I_FIFO_CTL_RF_RDY_TRIG_LEVEL_BITS 0
|
||||||
|
#define SUN6I_FIFO_CTL_RF_RST BIT(15)
|
||||||
|
+#define SUN6I_FIFO_CTL_TF_ERQ_TRIG_LEVEL_MASK 0xff
|
||||||
|
+#define SUN6I_FIFO_CTL_TF_ERQ_TRIG_LEVEL_BITS 16
|
||||||
|
#define SUN6I_FIFO_CTL_TF_RST BIT(31)
|
||||||
|
|
||||||
|
#define SUN6I_FIFO_STA_REG 0x1c
|
||||||
|
@@ -68,14 +74,16 @@
|
||||||
|
#define SUN6I_CLK_CTL_CDR1(div) (((div) & SUN6I_CLK_CTL_CDR1_MASK) << 8)
|
||||||
|
#define SUN6I_CLK_CTL_DRS BIT(12)
|
||||||
|
|
||||||
|
+#define SUN6I_MAX_XFER_SIZE 0xffffff
|
||||||
|
+
|
||||||
|
#define SUN6I_BURST_CNT_REG 0x30
|
||||||
|
-#define SUN6I_BURST_CNT(cnt) ((cnt) & 0xffffff)
|
||||||
|
+#define SUN6I_BURST_CNT(cnt) ((cnt) & SUN6I_MAX_XFER_SIZE)
|
||||||
|
|
||||||
|
#define SUN6I_XMIT_CNT_REG 0x34
|
||||||
|
-#define SUN6I_XMIT_CNT(cnt) ((cnt) & 0xffffff)
|
||||||
|
+#define SUN6I_XMIT_CNT(cnt) ((cnt) & SUN6I_MAX_XFER_SIZE)
|
||||||
|
|
||||||
|
#define SUN6I_BURST_CTL_CNT_REG 0x38
|
||||||
|
-#define SUN6I_BURST_CTL_CNT_STC(cnt) ((cnt) & 0xffffff)
|
||||||
|
+#define SUN6I_BURST_CTL_CNT_STC(cnt) ((cnt) & SUN6I_MAX_XFER_SIZE)
|
||||||
|
|
||||||
|
#define SUN6I_TXDATA_REG 0x200
|
||||||
|
#define SUN6I_RXDATA_REG 0x300
|
||||||
|
@@ -105,6 +113,31 @@ static inline void sun6i_spi_write(struct sun6i_spi *sspi, u32 reg, u32 value)
|
||||||
|
writel(value, sspi->base_addr + reg);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static inline u32 sun6i_spi_get_tx_fifo_count(struct sun6i_spi *sspi)
|
||||||
|
+{
|
||||||
|
+ u32 reg = sun6i_spi_read(sspi, SUN6I_FIFO_STA_REG);
|
||||||
|
+
|
||||||
|
+ reg >>= SUN6I_FIFO_STA_TF_CNT_BITS;
|
||||||
|
+
|
||||||
|
+ return reg & SUN6I_FIFO_STA_TF_CNT_MASK;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static inline void sun6i_spi_enable_interrupt(struct sun6i_spi *sspi, u32 mask)
|
||||||
|
+{
|
||||||
|
+ u32 reg = sun6i_spi_read(sspi, SUN6I_INT_CTL_REG);
|
||||||
|
+
|
||||||
|
+ reg |= mask;
|
||||||
|
+ sun6i_spi_write(sspi, SUN6I_INT_CTL_REG, reg);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static inline void sun6i_spi_disable_interrupt(struct sun6i_spi *sspi, u32 mask)
|
||||||
|
+{
|
||||||
|
+ u32 reg = sun6i_spi_read(sspi, SUN6I_INT_CTL_REG);
|
||||||
|
+
|
||||||
|
+ reg &= ~mask;
|
||||||
|
+ sun6i_spi_write(sspi, SUN6I_INT_CTL_REG, reg);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static inline void sun6i_spi_drain_fifo(struct sun6i_spi *sspi, int len)
|
||||||
|
{
|
||||||
|
u32 reg, cnt;
|
||||||
|
@@ -127,10 +160,13 @@ static inline void sun6i_spi_drain_fifo(struct sun6i_spi *sspi, int len)
|
||||||
|
|
||||||
|
static inline void sun6i_spi_fill_fifo(struct sun6i_spi *sspi, int len)
|
||||||
|
{
|
||||||
|
+ u32 cnt;
|
||||||
|
u8 byte;
|
||||||
|
|
||||||
|
- if (len > sspi->len)
|
||||||
|
- len = sspi->len;
|
||||||
|
+ /* See how much data we can fit */
|
||||||
|
+ cnt = sspi->fifo_depth - sun6i_spi_get_tx_fifo_count(sspi);
|
||||||
|
+
|
||||||
|
+ len = min3(len, (int)cnt, sspi->len);
|
||||||
|
|
||||||
|
while (len--) {
|
||||||
|
byte = sspi->tx_buf ? *sspi->tx_buf++ : 0;
|
||||||
|
@@ -158,9 +194,7 @@ static void sun6i_spi_set_cs(struct spi_device *spi, bool enable)
|
||||||
|
|
||||||
|
static size_t sun6i_spi_max_transfer_size(struct spi_device *spi)
|
||||||
|
{
|
||||||
|
- struct sun6i_spi *sspi = spi_master_get_devdata(spi->master);
|
||||||
|
-
|
||||||
|
- return sspi->fifo_depth - 1;
|
||||||
|
+ return SUN6I_MAX_XFER_SIZE - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int sun6i_spi_transfer_one(struct spi_master *master,
|
||||||
|
@@ -170,12 +204,12 @@ static int sun6i_spi_transfer_one(struct spi_master *master,
|
||||||
|
struct sun6i_spi *sspi = spi_master_get_devdata(master);
|
||||||
|
unsigned int mclk_rate, div, timeout;
|
||||||
|
unsigned int start, end, tx_time;
|
||||||
|
+ unsigned int trig_level;
|
||||||
|
unsigned int tx_len = 0;
|
||||||
|
int ret = 0;
|
||||||
|
u32 reg;
|
||||||
|
|
||||||
|
- /* We don't support transfer larger than the FIFO */
|
||||||
|
- if (tfr->len > sspi->fifo_depth)
|
||||||
|
+ if (tfr->len > SUN6I_MAX_XFER_SIZE)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
reinit_completion(&sspi->done);
|
||||||
|
@@ -191,6 +225,17 @@ static int sun6i_spi_transfer_one(struct spi_master *master,
|
||||||
|
SUN6I_FIFO_CTL_RF_RST | SUN6I_FIFO_CTL_TF_RST);
|
||||||
|
|
||||||
|
/*
|
||||||
|
+ * Setup FIFO interrupt trigger level
|
||||||
|
+ * Here we choose 3/4 of the full fifo depth, as it's the hardcoded
|
||||||
|
+ * value used in old generation of Allwinner SPI controller.
|
||||||
|
+ * (See spi-sun4i.c)
|
||||||
|
+ */
|
||||||
|
+ trig_level = sspi->fifo_depth / 4 * 3;
|
||||||
|
+ sun6i_spi_write(sspi, SUN6I_FIFO_CTL_REG,
|
||||||
|
+ (trig_level << SUN6I_FIFO_CTL_RF_RDY_TRIG_LEVEL_BITS) |
|
||||||
|
+ (trig_level << SUN6I_FIFO_CTL_TF_ERQ_TRIG_LEVEL_BITS));
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
* Setup the transfer control register: Chip Select,
|
||||||
|
* polarities, etc.
|
||||||
|
*/
|
||||||
|
@@ -274,6 +319,10 @@ static int sun6i_spi_transfer_one(struct spi_master *master,
|
||||||
|
|
||||||
|
/* Enable the interrupts */
|
||||||
|
sun6i_spi_write(sspi, SUN6I_INT_CTL_REG, SUN6I_INT_CTL_TC);
|
||||||
|
+ sun6i_spi_enable_interrupt(sspi, SUN6I_INT_CTL_TC |
|
||||||
|
+ SUN6I_INT_CTL_RF_RDY);
|
||||||
|
+ if (tx_len > sspi->fifo_depth)
|
||||||
|
+ sun6i_spi_enable_interrupt(sspi, SUN6I_INT_CTL_TF_ERQ);
|
||||||
|
|
||||||
|
/* Start the transfer */
|
||||||
|
reg = sun6i_spi_read(sspi, SUN6I_TFR_CTL_REG);
|
||||||
|
@@ -293,8 +342,6 @@ static int sun6i_spi_transfer_one(struct spi_master *master,
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
- sun6i_spi_drain_fifo(sspi, sspi->fifo_depth);
|
||||||
|
-
|
||||||
|
out:
|
||||||
|
sun6i_spi_write(sspi, SUN6I_INT_CTL_REG, 0);
|
||||||
|
|
||||||
|
@@ -309,10 +356,33 @@ static irqreturn_t sun6i_spi_handler(int irq, void *dev_id)
|
||||||
|
/* Transfer complete */
|
||||||
|
if (status & SUN6I_INT_CTL_TC) {
|
||||||
|
sun6i_spi_write(sspi, SUN6I_INT_STA_REG, SUN6I_INT_CTL_TC);
|
||||||
|
+ sun6i_spi_drain_fifo(sspi, sspi->fifo_depth);
|
||||||
|
complete(&sspi->done);
|
||||||
|
return IRQ_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* Receive FIFO 3/4 full */
|
||||||
|
+ if (status & SUN6I_INT_CTL_RF_RDY) {
|
||||||
|
+ sun6i_spi_drain_fifo(sspi, SUN6I_FIFO_DEPTH);
|
||||||
|
+ /* Only clear the interrupt _after_ draining the FIFO */
|
||||||
|
+ sun6i_spi_write(sspi, SUN6I_INT_STA_REG, SUN6I_INT_CTL_RF_RDY);
|
||||||
|
+ return IRQ_HANDLED;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* Transmit FIFO 3/4 empty */
|
||||||
|
+ if (status & SUN6I_INT_CTL_TF_ERQ) {
|
||||||
|
+ sun6i_spi_fill_fifo(sspi, SUN6I_FIFO_DEPTH);
|
||||||
|
+
|
||||||
|
+ if (!sspi->len)
|
||||||
|
+ /* nothing left to transmit */
|
||||||
|
+ sun6i_spi_disable_interrupt(sspi, SUN6I_INT_CTL_TF_ERQ);
|
||||||
|
+
|
||||||
|
+ /* Only clear the interrupt _after_ re-seeding the FIFO */
|
||||||
|
+ sun6i_spi_write(sspi, SUN6I_INT_STA_REG, SUN6I_INT_CTL_TF_ERQ);
|
||||||
|
+
|
||||||
|
+ return IRQ_HANDLED;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
return IRQ_NONE;
|
||||||
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue