1 Commits

Author SHA1 Message Date
8e763ac1c0 conf: Added orange-pi-pc2 config
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2022-04-25 22:01:23 +02:00
30 changed files with 25 additions and 319 deletions

View File

@ -12,6 +12,6 @@ BBFILE_PRIORITY_meta-sunxi = "10"
# cause compatibility issues with other layers
LAYERVERSION_meta-sunxi = "1"
LAYERDEPENDS_meta-sunxi = "core meta-python"
LAYERDEPENDS_meta-sunxi = "core"
LAYERSERIES_COMPAT_meta-sunxi = "honister kirkstone"
LAYERSERIES_COMPAT_meta-sunxi = "honister"

View File

@ -1,10 +0,0 @@
#@TYPE: Machine
#@NAME: bananapi-m2-zero
#@DESCRIPTION: Machine configuration for the Banana Pi M2 Zero, base on Allwinner H3 CPU
require conf/machine/include/sun8i.inc
require conf/machine/include/hardware/ap6212a.inc
KERNEL_DEVICETREE = "sun8i-h2-plus-bananapi-m2-zero.dtb"
UBOOT_MACHINE = "bananapi_m2_zero_defconfig"

View File

@ -1,5 +1,5 @@
require conf/machine/include/sunxi.inc
require conf/machine/include/sunxi-mali.inc
require conf/machine/include/arm/armv7a/tune-cortexa8.inc
require conf/machine/include/arm/armv8a/tune-cortexa8.inc
SOC_FAMILY = "sun5i"

View File

@ -9,12 +9,13 @@ MACHINE_SOCARCH_SUFFIX_sun4i = "-sun4i"
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
XSERVER = "xserver-xorg \
xf86-video-fbturbo \
xf86-input-evdev \
xf86-input-mouse \
xf86-input-keyboard"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-mainline"
PREFERRED_VERSION_linux-mainline ?= "5.15.%"
PREFERRED_VERSION_linux-mainline ?= "5.10.%"
PREFERRED_PROVIDER_u-boot ?= "u-boot"
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"

View File

@ -1,9 +0,0 @@
#@TYPE: Machine
#@NAME: nanopi-duo2
#@DESCRIPTION: Machine configuration for the FriendlyARM NanoPi Duo2, based on the Allwinner H3 CPU
require conf/machine/include/sun8i.inc
KERNEL_DEVICETREE = "sun8i-h3-nanopi-duo2.dtb"
UBOOT_MACHINE = "nanopi_duo2_defconfig"

View File

@ -1,8 +0,0 @@
#@TYPE: Machine
#@NAME: NanoPi R1
#@DESCRIPTION: Machine configuration for the FriendlyARM NanoPi R1, based on #the Allwinner H3 CPU
require conf/machine/include/sun8i.inc
KERNEL_DEVICETREE = "sun8i-h3-nanopi-r1.dtb"
UBOOT_MACHINE = "nanopi_r1_defconfig"

View File

@ -1,9 +0,0 @@
#@TYPE: Machine
#@NAME: orange-pi-one-plus
#@DESCRIPTION: Machine configuration for the Orange Pi One Plus, based on Allwinner H6 CPU
require conf/machine/include/sun50i.inc
KERNEL_DEVICETREE = "allwinner/sun50i-h6-orangepi-one-plus.dtb"
UBOOT_MACHINE = "orangepi_one_plus_defconfig"

View File

@ -1,8 +1,8 @@
DESCRIPTION = "ARM Trusted Firmware Allwinner"
LICENSE = "BSD-3-Clause"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://license.md;md5=829bdeb34c1d9044f393d5a16c068371"
SRC_URI = "git://github.com/apritzel/arm-trusted-firmware;nobranch=1;protocol=https"
SRC_URI = "git://github.com/apritzel/arm-trusted-firmware;nobranch=1"
SRCREV = "aa75c8da415158a94b82a430b2b40000778e851f"
SRC_URI:append = " file://0001-Use-same-type-as-in-declaration.patch"

View File

@ -1,40 +0,0 @@
From 767a05572ef5b93c2e157749b1754cbe261ee43d Mon Sep 17 00:00:00 2001
From: Marek Belisko <marek.belisko@open-nandra.com>
Date: Fri, 8 Apr 2022 11:33:53 +0200
Subject: [PATCH] Added nanopi-r1 board support
Patch taken from : https://github.com/armbian/build/blob/master/patch/u-boot/u-boot-sunxi/add-nanopi-r1-and-duo2.patch
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
diff --git a/configs/nanopi_r1_defconfig b/configs/nanopi_r1_defconfig
new file mode 100644
index 0000000..e028b41
--- /dev/null
+++ b/configs/nanopi_r1_defconfig
@@ -0,0 +1,22 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_SPL=y
+CONFIG_MACH_SUN8I_H3=y
+CONFIG_DRAM_CLK=408
+CONFIG_DRAM_ZQ=3881979
+CONFIG_DRAM_ODT_EN=y
+CONFIG_MACPWR="PD6"
+# CONFIG_VIDEO_DE2 is not set
+CONFIG_NR_DRAM_BANKS=1
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_CONSOLE_MUX=y
+CONFIG_SYS_CLK_FREQ=480000000
+# CONFIG_CMD_FLASH is not set
+# CONFIG_SPL_DOS_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-r1"
+CONFIG_SUN8I_EMAC=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
--
2.7.4

View File

@ -1,28 +0,0 @@
diff --git a/configs/nanopi_duo2_defconfig b/configs/nanopi_duo2_defconfig
new file mode 100644
index 0000000..1e51018
--- /dev/null
+++ b/configs/nanopi_duo2_defconfig
@@ -0,0 +1,21 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_SYS_TEXT_BASE=0x4a000000
+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-h3-nanopi-duo2"
+# 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

View File

@ -1,32 +0,0 @@
From eb31a4a141bf401f92426bd053a965022e47290d Mon Sep 17 00:00:00 2001
From: Chris Morgan <macromorgan@hotmail.com>
Date: Fri, 7 Jan 2022 11:52:54 -0600
Subject: [PATCH] i2c: mvtwsi: Add compatible string for allwinner,
sun4i-a10-i2c
This adds a compatible string for the Allwinner Sun4i-A10 I2C
controller. Without this, boards based on the R8 and A13 (at a
minimum) fail to boot.
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Acked-by: Akash Gajjar <gajjar04akash@gmail.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
drivers/i2c/mvtwsi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c
index bad4b1484f..f48a4f25aa 100644
--- a/drivers/i2c/mvtwsi.c
+++ b/drivers/i2c/mvtwsi.c
@@ -900,6 +900,7 @@ static const struct dm_i2c_ops mvtwsi_i2c_ops = {
static const struct udevice_id mvtwsi_i2c_ids[] = {
{ .compatible = "marvell,mv64xxx-i2c", },
{ .compatible = "marvell,mv78230-i2c", },
+ { .compatible = "allwinner,sun4i-a10-i2c", },
{ .compatible = "allwinner,sun6i-a31-i2c", },
{ /* sentinel */ }
};
--
2.34.1

View File

@ -2,7 +2,7 @@ DESCRIPTION = "U-Boot port for sunxi"
require recipes-bsp/u-boot/u-boot.inc
LICENSE = "GPL-2.0-only"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
# No patches for other machines yet

View File

@ -12,18 +12,15 @@ DEFAULT_PREFERENCE:sun8i = "1"
DEFAULT_PREFERENCE:sun50i = "1"
SRC_URI:append:sunxi = " \
file://0001-nanopi_neo_air_defconfig-Enable-eMMC-support.patch \
file://0002-Added-nanopi-r1-board-support.patch \
file://0003-Add-nanopi-duo2-board-support.patch \
file://0004-i2c-mvtwsi-Add-compatible-string-for-allwinner-sun4i.patch \
file://boot.cmd \
"
file://0001-nanopi_neo_air_defconfig-Enable-eMMC-support.patch \
file://boot.cmd \
"
UBOOT_ENV_SUFFIX:sunxi = "scr"
UBOOT_ENV:sunxi = "boot"
EXTRA_OEMAKE:append:sunxi = ' HOSTLDSHARED="${BUILD_CC} -shared ${BUILD_LDFLAGS} ${BUILD_CFLAGS}" '
EXTRA_OEMAKE:append:sun50i = " BL31=${DEPLOY_DIR_IMAGE}/bl31.bin SCP=/dev/null"
EXTRA_OEMAKE:append:sun50i = " BL31=${DEPLOY_DIR_IMAGE}/bl31.bin "
do_compile_sun50i[depends] += "atf-sunxi:do_deploy"

View File

@ -1,7 +1,7 @@
DESCRIPTION = "A module to control Allwinner GPIO,SPI and I2C channels"
HOMEPAGE = "https://pypi.python.org/pypi/pyA20"
SECTION = "devel/python"
LICENSE = "GPL-3.0-only"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://PKG-INFO;md5=4e584373bb0f46ef1e423cb7df37847d"
DEPENDS = "python3"

View File

@ -1,6 +1,6 @@
DESCRIPTION = "Unified Memory Provider userspace API source code needed for xf86-video-mali compilation"
LICENSE = "Apache-2.0"
LICENSE = "Apache-2"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=edf7fb6071cae7ec80d537a05ee17198"
inherit autotools

View File

@ -1 +0,0 @@
PACKAGECONFIG:class-target = "opengl x11 gallium"

View File

@ -1,6 +1,6 @@
DESCRIPTION = "Library for the DRI2 extension to the X Window System"
LICENSE = "MIT-CMU"
LICENSE = "MIT-X"
LIC_FILES_CHKSUM = "file://COPYING;md5=827da9afab1f727f2a66574629e0f39c"
DEPENDS = "libdrm libxext libxfixes xorgproto"

View File

@ -2,7 +2,7 @@ require recipes-graphics/xorg-driver/xorg-driver-video.inc
DESCRIPTION = "X.Org X server -- A10/A13 display driver"
LICENSE = "MIT-CMU"
LICENSE = "MIT-X"
LIC_FILES_CHKSUM = "file://COPYING;md5=f91dc3ee5ce59eb4b528e67e98a31266"
DEPENDS += "sunxi-mali libump xorgproto"

View File

@ -1 +0,0 @@
DEPENDS += "libxshmfence"

View File

@ -1,5 +1,5 @@
SECTION = "kernel"
LICENSE = "GPL-2.0-only"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
COMPATIBLE_MACHINE = "(sun4i|sun5i|sun7i|sun8i|sun50i)"
@ -20,20 +20,13 @@ KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
S = "${WORKDIR}/linux-${PV}"
# get release version 5.x or 6.x based on version
KRELEASE = "${@d.getVar('PV', True).split('.')[0]}"
SRC_URI = "https://www.kernel.org/pub/linux/kernel/v${KRELEASE}.x/linux-${PV}.tar.xz \
SRC_URI = "https://www.kernel.org/pub/linux/kernel/v5.x/linux-${PV}.tar.xz \
file://0001-dts-orange-pi-zero-Add-wifi-support.patch \
file://0002-dts-nanopi-neo-air-add-camera.patch \
file://0003-dts-allwinner-bananapi-m2-zreo-Enforce-consistent-MM.patch \
file://defconfig \
"
SRC_URI:append:use-mailine-graphics = " file://drm.cfg"
SRC_URI:append:bananapi = " file://axp20x.cfg"
SRC_URI:append:bananapi-m2-zero = " file://axp20x.cfg"
SRC_URI:append:cubietruck = " file://axp20x.cfg"
SRC_URI:append:nanopi-neo-air = " file://cam500b.cfg"
FILES_${KERNEL_PACKAGE_NAME}-base:append = " ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin.modinfo"

View File

@ -1,101 +0,0 @@
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
index cd3df12b65..33a161692f 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
@@ -77,6 +77,39 @@
compatible = "mmc-pwrseq-simple";
reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
};
+
+ cam_xclk: cam-xclk {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <24000000>;
+ clock-output-names = "cam-xclk";
+ };
+
+ reg_cam_avdd: cam-avdd {
+ compatible = "regulator-fixed";
+ regulator-name = "cam-avdd";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ vin-supply = <&reg_vcc3v3>;
+ };
+
+ reg_cam_dovdd: cam-dovdd {
+ compatible = "regulator-fixed";
+ regulator-name = "cam-dovdd";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&reg_vcc3v3>;
+ };
+
+ reg_cam_dvdd: cam-dvdd {
+ compatible = "regulator-fixed";
+ regulator-name = "cam-dvdd";
+ regulator-min-microvolt = <1500000>;
+ regulator-max-microvolt = <1500000>;
+ vin-supply = <&reg_vcc3v3>;
+ };
+
+
};
&mmc0 {
@@ -141,3 +174,55 @@
/* USB VBUS is always on */
status = "okay";
};
+
+&csi {
+ status = "okay";
+
+ port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* Parallel bus endpoint */
+ csi_from_ov5640: endpoint {
+ remote-endpoint = <&ov5640_to_csi>;
+ bus-width = <8>;
+ data-shift = <2>;
+ hsync-active = <1>; /* Active high */
+ vsync-active = <0>; /* Active low */
+ data-active = <1>; /* Active high */
+ pclk-sample = <1>; /* Rising */
+ };
+ };
+};
+
+&i2c2 {
+ status = "okay";
+
+ ov5640: camera@3c {
+ compatible = "ovti,ov5640";
+ reg = <0x3c>;
+ clocks = <&cam_xclk>;
+ clock-names = "xclk";
+
+ reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>;
+ powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>;
+ AVDD-supply = <&reg_cam_avdd>;
+ DOVDD-supply = <&reg_cam_dovdd>;
+ DVDD-supply = <&reg_cam_dvdd>;
+
+ port {
+ ov5640_to_csi: endpoint {
+ remote-endpoint = <&csi_from_ov5640>;
+ bus-width = <8>;
+ data-shift = <2>;
+ hsync-active = <1>; /* Active high */
+ vsync-active = <0>; /* Active low */
+ data-active = <1>; /* Active high */
+ pclk-sample = <1>; /* Rising */
+ };
+ };
+ };
+};
+&i2c2_pins {
+ bias-pull-up;
+};

View File

@ -1,28 +0,0 @@
From 9b4baa9b5aab0511c46a1ae95485e1a3ea984352 Mon Sep 17 00:00:00 2001
From: matteolel <matteolel91@hotmail.it>
Date: Fri, 9 Dec 2022 16:38:11 +0000
Subject: [PATCH] dts: allwinner: bananapi-m2-zreo: Enforce consistent MMC
numbering
Enforce MMC number (sometimes the order was wrong and the device does not boot).
---
arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
index 8e8634ff2..37a2ed937 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
@@ -20,6 +20,9 @@ / {
aliases {
serial0 = &uart0;
serial1 = &uart1;
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ mmc2 = &mmc2;
};
chosen {
--
2.25.1

View File

@ -1,6 +0,0 @@
CONFIG_MEDIA_PLATFORM_SUPPORT=y
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_VIDEO_OV5640=m
CONFIG_VIDEO_SUN6I_CSI=m
CONFIG_VIDEO_V4L2=m

View File

@ -1,7 +0,0 @@
require linux-mainline.inc
DESCRIPTION = "Mainline Longterm Linux kernel"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
SRC_URI[sha256sum] = "0051a1780e5bda0efc68dafab7c728b8283d2b028fedb439418f478be7d3e1af"

View File

@ -4,4 +4,5 @@ DESCRIPTION = "Mainline Longterm Linux kernel"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
SRC_URI[sha256sum] = "a63c2bb1beb15f1aea9c63cf80559f5b7ab58afd2da2fa5e7670c515ebe1fe80"
SRC_URI[md5sum] = "0751179f60de73eb2cd93f161fa52fcf"
SRC_URI[sha256sum] = "3b84e13abae26af17ebccc4d7212f5843a991127a73a320848d5c6942ef781a2"

View File

@ -4,4 +4,5 @@ DESCRIPTION = "Mainline Longterm Linux kernel"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
SRC_URI[sha256sum] = "a74fd32ccc1025b72f3ba7183208761f7c6190fb96e8f484f6d543a5a183e62f"
SRC_URI[md5sum] = "98c8187b801f006ba203db0669e307a5"
SRC_URI[sha256sum] = "a8b31d716b397303a183e42ad525ff2871024a43e3ea530d0fdf73b7f9d27da7"

View File

@ -1,7 +0,0 @@
require linux-mainline.inc
DESCRIPTION = "Mainline Longterm Linux kernel"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
SRC_URI[sha256sum] = "d60cf185693c386e7acd9f3eb3a94ae30ffbfee0a9447a20e83711e0bdf5922b"

View File

@ -1,5 +1,5 @@
SUMMARY = "Xradio WiFi driver for orangepi-zero"
LICENSE = "GPL-2.0-only"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a23a74b3f4caf9616230789d94217acb"
inherit module

View File

@ -1,6 +1,6 @@
SUMMARY = "CedarX Hardware Encoding GStreamer plug-in"
SECTION = "multimedia"
LICENSE = "GPL-2.0-only"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
HOMEPAGE = "http://github.com/ebutera/gst-plugin-cedar"
DEPENDS = "gstreamer gst-plugins-base"

View File

@ -1,6 +1,6 @@
DESCRIPTION = "Tools to help hacking Allwinner A10 and A20"
LICENSE = "GPL-2.0-only"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=97bd67b5d0309e452b637f76e1c9a23c"
PR = "r0"