Compare commits

...

14 Commits

Author SHA1 Message Date
ludiazv
7e833b65e5
Merge e36dd0b4458b71b923c998d06cf18db0d850820b into cc1de9f039f0cd3dcdb95ee0f8ae20731159c9f5 2023-12-10 14:28:42 +03:00
Marek Belisko
cc1de9f039 linux-mainline: Add "allwinner" prefix only if not available
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-11-20 13:02:33 +01:00
Marek Belisko
cd1031613f Revert "misc: Drop allwinner prefix for machines"
This reverts commit 5257bb2738c8f7c7d21547a447b7263dc4f0f316.
2023-11-20 12:53:14 +01:00
Marek Belisko
e21fd8733d Revert "conf: Move logic for handling dtb in deploy dir to common include"
This reverts commit c867cb74e2847599d973e1bccab28af90b8e0bac.
2023-11-20 12:35:09 +01:00
Marek Belisko
5257bb2738 misc: Drop allwinner prefix for machines
As we have automatic KERNEL_DEVICETREE prefix handling we don't need to add
allwinner prefix

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-11-13 10:59:46 +01:00
Marek Belisko
40c6d52123 xradio: Update to other repo
Update to one which have up-to-date development. Old one is not compilin anymore.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-11-10 14:00:53 +01:00
Marek Belisko
c7782f7180 linux-mainline: Drop 5.10 and 5.4 releases
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-11-10 13:41:51 +01:00
Marek Belisko
3ace4df57b linux-mainline: Bump kernel to 6.5.11
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-11-10 13:41:21 +01:00
Marek Belisko
4895ae7bdf Added compatibility to nanbield
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-11-10 12:02:31 +01:00
Marek Belisko
75f21bc538 u-boot: boot.cmd: Use allwinner prefix for dtb
To avoid patching u-boot configs for all machines update prefix for all arm machines.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-10-24 13:13:53 +02:00
Marek Belisko
af98b13aca conf: Set linux 6.5 as preffered
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-10-24 13:13:53 +02:00
Marek Belisko
c867cb74e2 conf: Move logic for handling dtb in deploy dir to common include
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-10-24 13:13:53 +02:00
Marek Belisko
ca39c18cb9 linux-mainline: Added handling for 6.5 kernels
Added automatic allwinner prepend for dtb + also patches handling for kernels
< 6.5

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-10-24 13:13:48 +02:00
Marek Belisko
82965e1bc6 linux-mainline: Add version 6.5.8
Refresh patches with new allwinner prefix.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-10-24 13:12:11 +02:00
12 changed files with 309 additions and 45 deletions

View File

@ -14,4 +14,4 @@ LAYERVERSION_sunxi = "1"
LAYERDEPENDS_sunxi = "core meta-python meta-arm"
LAYERSERIES_COMPAT_sunxi = "honister kirkstone langdale mickledore"
LAYERSERIES_COMPAT_sunxi = "honister kirkstone langdale mickledore nanbield"

View File

@ -14,7 +14,7 @@ XSERVER = "xserver-xorg \
xf86-input-keyboard"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-mainline"
PREFERRED_VERSION_linux-mainline ?= "6.1.%"
PREFERRED_VERSION_linux-mainline ?= "6.5.%"
PREFERRED_PROVIDER_u-boot ?= "u-boot"
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"

View File

@ -6,6 +6,6 @@ if itest.b *0x28 == 0x02 ; then
rootdev=mmcblk1p2
fi
setenv bootargs console=${console} console=tty1 root=/dev/${rootdev} rootwait panic=10 ${extra}
load mmc 0:1 ${fdt_addr_r} ${fdtfile} || load mmc 0:1 ${fdt_addr_r} boot/${fdtfile}
load mmc 0:1 ${fdt_addr_r} ${fdtfile} || load mmc 0:1 ${fdt_addr_r} boot/allwinner/${fdtfile}
load mmc 0:1 ${kernel_addr_r} zImage || load mmc 0:1 ${kernel_addr_r} boot/zImage || load mmc 0:1 ${kernel_addr_r} uImage || load mmc 0:1 ${kernel_addr_r} boot/uImage
bootz ${kernel_addr_r} - ${fdt_addr_r} || bootm ${kernel_addr_r} - ${fdt_addr_r}

View File

@ -7,6 +7,24 @@ inherit kernel
require linux.inc
KERNEL_DTB_PREFIX = "0"
python() {
# return version in int form
def kernel_version():
ver = d.getVar('PV', True).split('.')
return int("".join(ver[0])),int("".join(ver[1]))
# kernel 6.5 have updated dts path add 'allwinner' prefix automatically
major, minor = kernel_version()
if major >= 6 and minor >= 5:
dt = d.getVar('KERNEL_DEVICETREE', True)
if not "allwinner" in dt:
dt = "allwinner/{0}".format(dt)
d.setVar('KERNEL_DEVICETREE', dt)
d.setVar('KERNEL_DTB_PREFIX', "1")
}
# Since we're not using git, this doesn't make a difference, but we need to fill
# in something or kernel-yocto.bbclass will fail.
KBRANCH ?= "master"
@ -24,11 +42,24 @@ S = "${WORKDIR}/linux-${PV}"
KRELEASE = "${@d.getVar('PV', True).split('.')[0]}"
SRC_URI = "https://www.kernel.org/pub/linux/kernel/v${KRELEASE}.x/linux-${PV}.tar.xz \
file://defconfig \
"
# append patches for kernels before 6.5 and after based on version
SRC_URI += "${@oe.utils.ifelse(d.getVar('KERNEL_DTB_PREFIX') == '1', d.getVar('SOURCES_K65'), d.getVar('SOURCES'))}"
SOURCES_K65 = " \
file://6.5/0001-dts-orangepi-zero-Add-wifi-support.patch \
file://6.5/0002-dts-nanopi-neo-air-Add-camera-support.patch \
file://6.5/0003-dts-allwinner-bananapi-m2-zero-Enforce-consistent-MM.patch \
file://6.5/0004-dts-allwinner-bananapi-m64-Consistent-nodes-for-mmc-devices.patch \
"
SOURCES = " \
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://0004-dts-allwinner-bananapi-m64-Consistent-nodes-for-mmc-devices.patch \
file://defconfig \
"
SRC_URI:append:use-mailine-graphics = " file://drm.cfg"

View File

@ -0,0 +1,100 @@
From a9bad790ae9a9e9befbe8e8938b6baca84ee5138 Mon Sep 17 00:00:00 2001
From: Marek Belisko <marek.belisko@open-nandra.com>
Date: Tue, 24 Oct 2023 10:40:52 +0200
Subject: [PATCH] dts: orangepi-zero: Add wifi support
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
.../allwinner/sun8i-h2-plus-orangepi-zero.dts | 46 +++++++++++++++----
1 file changed, 37 insertions(+), 9 deletions(-)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts
index 3706216ff..ca94e313f 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts
@@ -80,13 +80,15 @@ status_led {
};
};
- reg_vcc_wifi: reg_vcc_wifi {
+ vdd_wifi: vdd_wifi {
compatible = "regulator-fixed";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "vcc-wifi";
- enable-active-high;
+ regulator-name = "wifi";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
gpio = <&pio 0 20 GPIO_ACTIVE_HIGH>;
+ startup-delay-us = <70000>;
+ enable-active-high;
+
};
reg_vdd_cpux: vdd-cpux-regulator {
@@ -105,10 +107,12 @@ reg_vdd_cpux: vdd-cpux-regulator {
states = <1100000 0>, <1300000 1>;
};
- wifi_pwrseq: wifi_pwrseq {
+ pwrseq_wifi: pwrseq_wifi {
compatible = "mmc-pwrseq-simple";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wifi_rst>;
reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>;
- post-power-on-delay-ms = <200>;
+ post-power-on-delay-ms = <50>;
};
};
@@ -139,9 +143,11 @@ &mmc0 {
};
&mmc1 {
- vmmc-supply = <&reg_vcc_wifi>;
- mmc-pwrseq = <&wifi_pwrseq>;
+ vmmc-supply = <&reg_vcc3v3>;
+ vqmmc-supply = <&vdd_wifi>;
+ mmc-pwrseq = <&pwrseq_wifi>;
bus-width = <4>;
+ max-frequency = <16000000>;
non-removable;
status = "okay";
@@ -151,6 +157,13 @@ &mmc1 {
*/
xr819: sdio_wifi@1 {
reg = <1>;
+ compatible = "xradio,xr819";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wifi_wake>;
+ interrupt-parent = <&pio>;
+ interrupts = <6 10 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "host-wake";
+ local-mac-address = [dc 44 6d c0 ff ee];
};
};
@@ -207,3 +220,18 @@ &usbphy {
status = "okay";
usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
};
+
+&pio {
+ wifi_wake: wifi_wake {
+ pins = "PG10";
+ function = "gpio_in";
+ };
+};
+
+&r_pio {
+ wifi_rst: wifi_rst {
+ pins = "PL7";
+ function = "gpio_out";
+ };
+};
+
--
2.25.1

View File

@ -0,0 +1,113 @@
From e0d786f5465d2e2d977696cf0d02c70b78402291 Mon Sep 17 00:00:00 2001
From: Marek Belisko <marek.belisko@open-nandra.com>
Date: Tue, 24 Oct 2023 10:42:36 +0200
Subject: [PATCH] dts:nanopi-neo-air: Add camera support
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
.../dts/allwinner/sun8i-h3-nanopi-neo-air.dts | 85 +++++++++++++++++++
1 file changed, 85 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo-air.dts b/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo-air.dts
index 9e1a33f94..7a05eff33 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo-air.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo-air.dts
@@ -77,6 +77,39 @@ wifi_pwrseq: wifi_pwrseq {
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 @@ &usbphy {
/* 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;
+};
--
2.25.1

View File

@ -0,0 +1,30 @@
From 7d7f32460702e99cab48909bb85ed84b67e65062 Mon Sep 17 00:00:00 2001
From: Marek Belisko <marek.belisko@open-nandra.com>
Date: Tue, 24 Oct 2023 10:43:55 +0200
Subject: [PATCH] dts: allwinner: bananapi-m2-zero: Enforce consistent MMC
numbering
Enforce MMC number (sometimes the order was wrong and the device does not boot).
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
arch/arm/boot/dts/allwinner/sun8i-h2-plus-bananapi-m2-zero.dts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/boot/dts/allwinner/sun8i-h2-plus-bananapi-m2-zero.dts
index d729b7c70..410a79487 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h2-plus-bananapi-m2-zero.dts
+++ b/arch/arm/boot/dts/allwinner/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

@ -0,0 +1,27 @@
From f487f62babb11d014da7a0b58a0fcdf6d217a812 Mon Sep 17 00:00:00 2001
From: Marek Belisko <marek.belisko@open-nandra.com>
Date: Thu, 11 May 2023 11:18:33 +0200
Subject: [PATCH] bananapi-m64: Consistent nodes for mmc devices
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
index e6d5bc0f7..39a28aad8 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
@@ -16,6 +16,9 @@ aliases {
ethernet0 = &emac;
serial0 = &uart0;
serial1 = &uart1;
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ mmc2 = &mmc2;
};
chosen {
--
2.25.1

View File

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

View File

@ -4,4 +4,5 @@ DESCRIPTION = "Mainline Longterm Linux kernel"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
SRC_URI[sha256sum] = "0051a1780e5bda0efc68dafab7c728b8283d2b028fedb439418f478be7d3e1af"
SRC_URI[sha256sum] = "2ee24af9282b80923b2da56b70aad7df2e8ee4e3f076452e05ba66be2059b519"

View File

@ -11,11 +11,10 @@ RDEPENDS:${PN} += "xradio-firmware"
COMPATIBLE_MACHINE = "orange-pi-zero"
SRCREV = "279868ac96f6db34b65f68c6722830fa0aacb86b"
SRCREV = "547521df27d1a80fb5542e93fa13bd09fb2259a2"
SRC_URI = "\
git://github.com/dbeinder/xradio.git;protocol=https;branch=karabek_rebase \
file://0001-Enable-out-of-tree-compilation.patch \
git://github.com/fifteenhex/xradio.git;protocol=http;branch=master \
"
S = "${WORKDIR}/git"

View File

@ -1,30 +0,0 @@
From 15651d333da5429a1544f0a17d5f02c74f693ad7 Mon Sep 17 00:00:00 2001
From: Marek Belisko <marek.belisko@open-nandra.com>
Date: Thu, 15 Oct 2020 14:45:07 +0200
Subject: [PATCH] Enable out of tree compilation
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 7a0de9a..ee75f0b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
# SPDX-License-Identifier: GPL-2.0-only
# # Standalone Makefile - uncomment for out-of-tree compilation
-# CONFIG_WLAN_VENDOR_XRADIO := m
-# ccflags-y += -DCONFIG_XRADIO_USE_EXTENSIONS
-# ccflags-y += -DCONFIG_XRADIO_WAPI_SUPPORT
+CONFIG_WLAN_VENDOR_XRADIO := m
+ccflags-y += -DCONFIG_XRADIO_USE_EXTENSIONS
+ccflags-y += -DCONFIG_XRADIO_WAPI_SUPPORT
# Kernel part
--
2.7.4