Initial working combinator extracted from home device config.
This commit is contained in:
31
README.md
Normal file
31
README.md
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# opi-zero2w
|
||||||
|
|
||||||
|
Reusable NixOS board-support flake for the Orange Pi Zero 2W (Allwinner H618).
|
||||||
|
|
||||||
|
## What It Exposes
|
||||||
|
|
||||||
|
- `nixosModules.default`: essential board support (kernel patchset, UWE5622 integration, DTB selection, firmware wiring)
|
||||||
|
- `nixosModules.installerSdImage`: SD image/U-Boot wiring for bootable installer images
|
||||||
|
- `lib.withOpiZero2wEssentials`: combinator that appends board-essential module(s)
|
||||||
|
- `lib.withOpiZero2wInstallerEssentials`: combinator for board essentials + installer SD image module
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||||
|
opi-zero2w.url = "github:YOUR_ORG/opi-zero2w";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { nixpkgs, opi-zero2w, ... }: {
|
||||||
|
nixosConfigurations.opi = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "aarch64-linux";
|
||||||
|
modules = opi-zero2w.lib.withOpiZero2wEssentials [
|
||||||
|
./your-base.nix
|
||||||
|
./your-host.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1772047000,
|
||||||
|
"narHash": "sha256-7DaQVv4R97cii/Qdfy4tmDZMB2xxtyIvNGSwXBBhSmo=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "1267bb4920d0fc06ea916734c11b0bf004bbe17e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-25.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
34
flake.nix
Normal file
34
flake.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
description = "Orange Pi Zero 2W board-support modules and combinators for NixOS";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs }:
|
||||||
|
let
|
||||||
|
lib = nixpkgs.lib;
|
||||||
|
mkUbootOrangePiZero2W = pkgs:
|
||||||
|
pkgs.buildUBoot {
|
||||||
|
defconfig = "orangepi_zero2w_defconfig";
|
||||||
|
extraMeta.platforms = [ "aarch64-linux" ];
|
||||||
|
BL31 = "${pkgs.armTrustedFirmwareAllwinnerH616}/bl31.bin";
|
||||||
|
filesToInstall = [ "u-boot-sunxi-with-spl.bin" ];
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
lib = {
|
||||||
|
inherit mkUbootOrangePiZero2W;
|
||||||
|
|
||||||
|
withOpiZero2wEssentials = modules:
|
||||||
|
modules ++ [ self.nixosModules.default ];
|
||||||
|
|
||||||
|
withOpiZero2wInstallerEssentials = modules:
|
||||||
|
self.lib.withOpiZero2wEssentials (modules ++ [ self.nixosModules.installerSdImage ]);
|
||||||
|
};
|
||||||
|
|
||||||
|
nixosModules = {
|
||||||
|
default = import ./modules/essential.nix;
|
||||||
|
installerSdImage = import ./modules/installer-sd-image.nix;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
163
modules/essential.nix
Normal file
163
modules/essential.nix
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
{ lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
# Armbian sunxi-6.12 baseline, filtered for H616/H618 + Zero2W-relevant patches.
|
||||||
|
armbianPatchRoot = ../patches/uwe5622/armbian-sunxi-6.12;
|
||||||
|
selectedPatchLines = lib.splitString "\n" (
|
||||||
|
builtins.readFile (armbianPatchRoot + "/selected-for-opi-zero2w.list")
|
||||||
|
);
|
||||||
|
armbianSelectedPatchRelPaths = lib.filter
|
||||||
|
(line: line != "" && !(lib.hasPrefix "#" line))
|
||||||
|
(map lib.strings.trim selectedPatchLines);
|
||||||
|
armbianSelectedPatches = builtins.map (relPath: {
|
||||||
|
patch = armbianPatchRoot + "/${relPath}";
|
||||||
|
}) armbianSelectedPatchRelPaths;
|
||||||
|
in {
|
||||||
|
# Speed up repeated kernel iteration by enabling ccache only for kernel builds.
|
||||||
|
# The custom builder exposes /nix/var/cache/ccache-kernel via extra-sandbox-paths.
|
||||||
|
boot.kernelPackages = lib.mkForce (
|
||||||
|
pkgs.linuxPackagesFor (pkgs.linux.overrideAttrs (old: {
|
||||||
|
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ pkgs.ccache ];
|
||||||
|
# Mirror Armbian's driver_uwe5622() scripted integration step:
|
||||||
|
# echo "obj-$(CONFIG_SPARD_WLAN_SUPPORT) += uwe5622/" >> drivers/net/wireless/Makefile
|
||||||
|
postPatch = (old.postPatch or "") + ''
|
||||||
|
if ! grep -q 'obj-\$(CONFIG_SPARD_WLAN_SUPPORT) += uwe5622/' drivers/net/wireless/Makefile; then
|
||||||
|
echo 'obj-$(CONFIG_SPARD_WLAN_SUPPORT) += uwe5622/' >> drivers/net/wireless/Makefile
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Armbian's UWE makefile snippets assume /bin/pwd exists.
|
||||||
|
# Nix sandboxes don't guarantee that path, so use PATH-resolved pwd.
|
||||||
|
if [ -d drivers/net/wireless/uwe5622 ]; then
|
||||||
|
grep -rl '/bin/pwd' drivers/net/wireless/uwe5622 \
|
||||||
|
| while IFS= read -r file; do
|
||||||
|
substituteInPlace "$file" --replace-fail '/bin/pwd' 'pwd'
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Linux 6.12 needs OF declarations in tty-sdio for DT parsing helpers.
|
||||||
|
tty_sdio_file="drivers/net/wireless/uwe5622/tty-sdio/tty.c"
|
||||||
|
if [ -f "$tty_sdio_file" ]; then
|
||||||
|
grep -q '^#include <linux/of_device.h>$' "$tty_sdio_file" || sed -i '1i #include <linux/of_device.h>' "$tty_sdio_file"
|
||||||
|
grep -q '^#include <linux/of.h>$' "$tty_sdio_file" || sed -i '1i #include <linux/of.h>' "$tty_sdio_file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Linux 6.12 adds a link_id argument to tdls_mgmt callback.
|
||||||
|
cfg80211_file="drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c"
|
||||||
|
if [ -f "$cfg80211_file" ]; then
|
||||||
|
perl -0pi -e 's/(sprdwl_cfg80211_tdls_mgmt\s*\([^\)]*const\s+u8\s*\*peer,\s*)(u8\s+action_code)/\1int link_id, \2/s' "$cfg80211_file"
|
||||||
|
perl -0pi -e 's/strncpy\(\s*scan_ssids->ssid\s*,\s*ssids\[i\]\.ssid\s*,\s*[^\)]*\)/memcpy(scan_ssids->ssid, ssids[i].ssid, ssids[i].ssid_len)/g' "$cfg80211_file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Linux 6.12.70 netlink API expects split op callback signatures.
|
||||||
|
npi_file="drivers/net/wireless/uwe5622/unisocwifi/npi.c"
|
||||||
|
if [ -f "$npi_file" ]; then
|
||||||
|
perl -0pi -e 's/const\s+struct\s+genl_ops\s*\*\s*(ops)/const struct genl_split_ops *\1/g' "$npi_file"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
# linux's builder doesn't preserve arbitrary attrs like CCACHE_DIR/makeFlags
|
||||||
|
# in the final derivation env, so export these explicitly in preConfigure.
|
||||||
|
preConfigure = (old.preConfigure or "") + ''
|
||||||
|
export CCACHE_DIR=/nix/var/cache/ccache-kernel
|
||||||
|
export CCACHE_COMPRESS=1
|
||||||
|
export CCACHE_UMASK=007
|
||||||
|
|
||||||
|
# ccache can break stdin-based compiler probes (`... -x c -`) used by Kbuild.
|
||||||
|
# Wrap compilers to bypass ccache for stdin probes while caching normal compiles.
|
||||||
|
ccache_wrap() {
|
||||||
|
real_compiler="$1"
|
||||||
|
wrapper_path="$2"
|
||||||
|
cat > "$wrapper_path" <<EOF
|
||||||
|
#!/bin/sh
|
||||||
|
for arg in "\$@"; do
|
||||||
|
if [ "\$arg" = "-" ]; then
|
||||||
|
exec "$real_compiler" "\$@"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exec ccache "$real_compiler" "\$@"
|
||||||
|
EOF
|
||||||
|
chmod +x "$wrapper_path"
|
||||||
|
}
|
||||||
|
|
||||||
|
ccache_wrap "${pkgs.stdenv.cc.targetPrefix}cc" "$TMPDIR/cc-with-ccache"
|
||||||
|
ccache_wrap cc "$TMPDIR/hostcc-with-ccache"
|
||||||
|
ccache_wrap c++ "$TMPDIR/hostcxx-with-ccache"
|
||||||
|
|
||||||
|
makeFlags+=("CC=$TMPDIR/cc-with-ccache")
|
||||||
|
makeFlags+=("HOSTCC=$TMPDIR/hostcc-with-ccache")
|
||||||
|
makeFlags+=("HOSTCXX=$TMPDIR/hostcxx-with-ccache")
|
||||||
|
'';
|
||||||
|
}))
|
||||||
|
);
|
||||||
|
|
||||||
|
# Orange Pi Zero 2W baseline from Armbian sunxi 6.12 patch series.
|
||||||
|
boot.kernelPatches = armbianSelectedPatches ++ [
|
||||||
|
{
|
||||||
|
name = "opi-zero-2w-minimal-hardware";
|
||||||
|
patch = null;
|
||||||
|
structuredExtraConfig = with lib.kernel; {
|
||||||
|
# Minimize everything we don't think we need
|
||||||
|
#
|
||||||
|
# --- GPU & Display (Parents Only) ---
|
||||||
|
DRM_LIMA = yes;
|
||||||
|
DRM_SUN4I = yes;
|
||||||
|
DRM_RADEON = no;
|
||||||
|
|
||||||
|
# Disable the big vendor blocks
|
||||||
|
WLAN_VENDOR_ATH = no;
|
||||||
|
WLAN_VENDOR_BROADCOM = yes;
|
||||||
|
WLAN_VENDOR_INTEL = no;
|
||||||
|
WLAN_VENDOR_MARVELL = no;
|
||||||
|
WLAN_VENDOR_TI = no;
|
||||||
|
|
||||||
|
# UWE5622 (Unisoc) WiFi/BT stack from Armbian patchset.
|
||||||
|
# Keep as modules for easier inspection with modinfo/lsmod.
|
||||||
|
SPARD_WLAN_SUPPORT = yes;
|
||||||
|
AW_WIFI_DEVICE_UWE5622 = yes;
|
||||||
|
WLAN_UWE5622 = module;
|
||||||
|
SPRDWL_NG = module;
|
||||||
|
TTY_OVERY_SDIO = module;
|
||||||
|
|
||||||
|
# MAC address manager used by the patched UWE BT path.
|
||||||
|
SUNXI_ADDR_MGT = module;
|
||||||
|
|
||||||
|
# --- Sound ---
|
||||||
|
SOUND = yes;
|
||||||
|
SND = yes;
|
||||||
|
SND_SOC = yes;
|
||||||
|
SND_SUN4I_CODEC = yes;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
# Keep firmware available in case selected patches or future kernel changes use it.
|
||||||
|
hardware.firmware = [ (pkgs.callPackage ../patches/uwe5622/firmware.nix {}) ];
|
||||||
|
|
||||||
|
# Enable wireless networking with wpa_supplicant by default for UWE5622.
|
||||||
|
networking.wireless.enable = true;
|
||||||
|
|
||||||
|
# Console on sunxi UART0
|
||||||
|
boot.kernelParams = lib.mkDefault [
|
||||||
|
"console=ttyS0,115200n8"
|
||||||
|
"console=tty0"
|
||||||
|
];
|
||||||
|
|
||||||
|
# NixOS uses a shrunk module closure for the running system. Explicitly
|
||||||
|
# requesting these modules keeps them in /run/current-system/kernel-modules
|
||||||
|
# and also makes missing-module issues fail deterministically at build time.
|
||||||
|
boot.kernelModules = [
|
||||||
|
"sprdwl_ng"
|
||||||
|
"sprdbt_tty"
|
||||||
|
"sunxi_addr"
|
||||||
|
];
|
||||||
|
|
||||||
|
# UWE5622 firmware loader still probes /lib/firmware paths.
|
||||||
|
# Mirror NixOS firmware exposure there via tmpfiles for deterministic boot-time setup.
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"L+ /lib/firmware - - - - /run/current-system/firmware"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Use only the OPI Zero 2W DTB, preserving the path expected by U-Boot.
|
||||||
|
hardware.deviceTree = {
|
||||||
|
enable = true;
|
||||||
|
name = "allwinner/sun50i-h618-orangepi-zero2w.dtb";
|
||||||
|
};
|
||||||
|
}
|
||||||
32
modules/installer-sd-image.nix
Normal file
32
modules/installer-sd-image.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{ config, pkgs, modulesPath, ... }:
|
||||||
|
let
|
||||||
|
ubootOrangePiZero2W =
|
||||||
|
pkgs.buildUBoot {
|
||||||
|
defconfig = "orangepi_zero2w_defconfig";
|
||||||
|
extraMeta.platforms = [ "aarch64-linux" ];
|
||||||
|
BL31 = "${pkgs.armTrustedFirmwareAllwinnerH616}/bl31.bin";
|
||||||
|
filesToInstall = [ "u-boot-sunxi-with-spl.bin" ];
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/sd-card/sd-image.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
sdImage = {
|
||||||
|
firmwareSize = 16;
|
||||||
|
populateFirmwareCommands = "";
|
||||||
|
|
||||||
|
populateRootCommands = ''
|
||||||
|
mkdir -p ./files/boot
|
||||||
|
${config.boot.loader.generic-extlinux-compatible.populateCmd} \
|
||||||
|
-c ${config.system.build.toplevel} \
|
||||||
|
-d ./files/boot
|
||||||
|
'';
|
||||||
|
|
||||||
|
postBuildCommands = ''
|
||||||
|
dd if=${ubootOrangePiZero2W}/u-boot-sunxi-with-spl.bin of=$img \
|
||||||
|
bs=1024 seek=8 \
|
||||||
|
conv=notrunc
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: JohnTheCoolingFan <ivan8215145640@gmail.com>
|
||||||
|
Date: Thu, 13 Jun 2024 11:50:55 +0000
|
||||||
|
Subject: ARM64: dts: sun50i-h616: BigTreeTech CB1: Enable EMAC1
|
||||||
|
|
||||||
|
Signed-off-by: JohnTheCoolingFan <ivan8215145640@gmail.com>
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi | 18 ++++++++++
|
||||||
|
1 file changed, 18 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
|
||||||
|
@@ -149,6 +149,24 @@ &cpu0 {
|
||||||
|
cpu-supply = <®_dcdc2>;
|
||||||
|
};
|
||||||
|
|
||||||
|
+&emac1 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&rmii_pins>;
|
||||||
|
+ phy-mode = "rmii";
|
||||||
|
+ phy-handle = <&rmii_phy>;
|
||||||
|
+ phy-supply = <®_dldo1>;
|
||||||
|
+ allwinner,rx-delay-ps = <3100>;
|
||||||
|
+ allwinner,tx-delay-ps = <700>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mdio1 {
|
||||||
|
+ rmii_phy: ethernet-phy@1 {
|
||||||
|
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||||
|
+ reg = <1>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&mmc0 {
|
||||||
|
vmmc-supply = <®_dldo1>;
|
||||||
|
broken-cd;
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: JohnTheCoolingFan <ivan8215145640@gmail.com>
|
||||||
|
Date: Thu, 13 Jun 2024 11:07:35 +0000
|
||||||
|
Subject: ARM64: dts: sun50i-h616: BigTreeTech CB1: Enable HDMI
|
||||||
|
|
||||||
|
Signed-off-by: JohnTheCoolingFan <ivan8215145640@gmail.com>
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi | 26 ++++++++++
|
||||||
|
1 file changed, 26 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
|
||||||
|
@@ -26,6 +26,17 @@ chosen {
|
||||||
|
stdout-path = "serial0:115200n8";
|
||||||
|
};
|
||||||
|
|
||||||
|
+ connector {
|
||||||
|
+ compatible = "hdmi-connector";
|
||||||
|
+ type = "d";
|
||||||
|
+
|
||||||
|
+ port {
|
||||||
|
+ hdmi_con_in: endpoint {
|
||||||
|
+ remote-endpoint = <&hdmi_out_con>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
@@ -262,6 +273,21 @@ reg_dldo1: dldo1 {
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
+&de {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&hdmi {
|
||||||
|
+ hvcc-supply = <®_aldo1>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&hdmi_out {
|
||||||
|
+ hdmi_out_con: endpoint {
|
||||||
|
+ remote-endpoint = <&hdmi_con_in>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&cpu0 {
|
||||||
|
cpu-supply = <®_dcdc2>;
|
||||||
|
status = "okay";
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,602 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: afaulkner420 <afaulkner420@gmail.com>
|
||||||
|
Date: Fri, 25 Mar 2022 20:18:18 +0000
|
||||||
|
Subject: Add sunxi-addr driver - Used to fix uwe5622 bluetooth MAC addresses
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/misc/Kconfig | 1 +
|
||||||
|
drivers/misc/Makefile | 1 +
|
||||||
|
drivers/misc/sunxi-addr/Kconfig | 6 +
|
||||||
|
drivers/misc/sunxi-addr/Makefile | 5 +
|
||||||
|
drivers/misc/sunxi-addr/sha256.c | 178 +++++
|
||||||
|
drivers/misc/sunxi-addr/sunxi-addr.c | 356 ++++++++++
|
||||||
|
6 files changed, 547 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/drivers/misc/Kconfig
|
||||||
|
+++ b/drivers/misc/Kconfig
|
||||||
|
@@ -635,4 +635,5 @@ source "drivers/misc/uacce/Kconfig"
|
||||||
|
source "drivers/misc/pvpanic/Kconfig"
|
||||||
|
source "drivers/misc/mchp_pci1xxxx/Kconfig"
|
||||||
|
source "drivers/misc/keba/Kconfig"
|
||||||
|
+source "drivers/misc/sunxi-addr/Kconfig"
|
||||||
|
endmenu
|
||||||
|
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/drivers/misc/Makefile
|
||||||
|
+++ b/drivers/misc/Makefile
|
||||||
|
@@ -74,1 +74,2 @@
|
||||||
|
obj-y += keba/
|
||||||
|
+obj-$(CONFIG_SUNXI_ADDR_MGT) += sunxi-addr/
|
||||||
|
diff --git a/drivers/misc/sunxi-addr/Kconfig b/drivers/misc/sunxi-addr/Kconfig
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/drivers/misc/sunxi-addr/Kconfig
|
||||||
|
@@ -0,0 +1,6 @@
|
||||||
|
+config SUNXI_ADDR_MGT
|
||||||
|
+ tristate "Allwinner Network MAC Addess Manager"
|
||||||
|
+ depends on BT || ETHERNET || WLAN
|
||||||
|
+ depends on NVMEM_SUNXI_SID
|
||||||
|
+ help
|
||||||
|
+ allwinner network mac address management
|
||||||
|
diff --git a/drivers/misc/sunxi-addr/Makefile b/drivers/misc/sunxi-addr/Makefile
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/drivers/misc/sunxi-addr/Makefile
|
||||||
|
@@ -0,0 +1,5 @@
|
||||||
|
+#
|
||||||
|
+# Makefile for wifi mac addr manager drivers
|
||||||
|
+#
|
||||||
|
+sunxi_addr-objs := sunxi-addr.o sha256.o
|
||||||
|
+obj-$(CONFIG_SUNXI_ADDR_MGT) += sunxi_addr.o
|
||||||
|
diff --git a/drivers/misc/sunxi-addr/sha256.c b/drivers/misc/sunxi-addr/sha256.c
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/drivers/misc/sunxi-addr/sha256.c
|
||||||
|
@@ -0,0 +1,178 @@
|
||||||
|
+/*
|
||||||
|
+ * Local implement of sha256.
|
||||||
|
+ *
|
||||||
|
+ * Copyright (C) 2013 Allwinner.
|
||||||
|
+ *
|
||||||
|
+ * This file is licensed under the terms of the GNU General Public
|
||||||
|
+ * License version 2. This program is licensed "as is" without any
|
||||||
|
+ * warranty of any kind, whether express or implied.
|
||||||
|
+ */
|
||||||
|
+#include <linux/kernel.h>
|
||||||
|
+#include <linux/string.h>
|
||||||
|
+
|
||||||
|
+/****************************** MACROS ******************************/
|
||||||
|
+#define ROTRIGHT(a, b) (((a) >> (b)) | ((a) << (32 - (b))))
|
||||||
|
+#define CH(x, y, z) (((x) & (y)) ^ (~(x) & (z)))
|
||||||
|
+#define MAJ(x, y, z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
|
||||||
|
+#define EP0(x) (ROTRIGHT(x, 2) ^ ROTRIGHT(x, 13) ^ ROTRIGHT(x, 22))
|
||||||
|
+#define EP1(x) (ROTRIGHT(x, 6) ^ ROTRIGHT(x, 11) ^ ROTRIGHT(x, 25))
|
||||||
|
+#define SIG0(x) (ROTRIGHT(x, 7) ^ ROTRIGHT(x, 18) ^ ((x) >> 3))
|
||||||
|
+#define SIG1(x) (ROTRIGHT(x, 17) ^ ROTRIGHT(x, 19) ^ ((x) >> 10))
|
||||||
|
+
|
||||||
|
+/**************************** VARIABLES *****************************/
|
||||||
|
+static const uint32_t k[64] = {
|
||||||
|
+ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
|
||||||
|
+ 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
|
||||||
|
+ 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
|
||||||
|
+ 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
|
||||||
|
+ 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
|
||||||
|
+ 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
|
||||||
|
+ 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
|
||||||
|
+ 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
|
||||||
|
+ 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
|
||||||
|
+ 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
|
||||||
|
+ 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
|
||||||
|
+ 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
|
||||||
|
+ 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
|
||||||
|
+ 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
|
||||||
|
+ 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
|
||||||
|
+ 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+struct sha256_ctx {
|
||||||
|
+ uint8_t data[64]; /* current 512-bit chunk of message data, just like a buffer */
|
||||||
|
+ uint32_t datalen; /* sign the data length of current chunk */
|
||||||
|
+ uint64_t bitlen; /* the bit length of the total message */
|
||||||
|
+ uint32_t state[8]; /* store the middle state of hash abstract */
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+/*********************** FUNCTION DEFINITIONS ***********************/
|
||||||
|
+static void sha256_transform(struct sha256_ctx *ctx, const uint8_t *data)
|
||||||
|
+{
|
||||||
|
+ uint32_t a, b, c, d, e, f, g, h, i, j, t1, t2, m[64];
|
||||||
|
+
|
||||||
|
+ /* initialization */
|
||||||
|
+ for (i = 0, j = 0; i < 16; ++i, j += 4)
|
||||||
|
+ m[i] = (data[j] << 24) | (data[j + 1] << 16) |
|
||||||
|
+ (data[j + 2] << 8) | (data[j + 3]);
|
||||||
|
+ for ( ; i < 64; ++i)
|
||||||
|
+ m[i] = SIG1(m[i - 2]) + m[i - 7] + SIG0(m[i - 15]) + m[i - 16];
|
||||||
|
+
|
||||||
|
+ a = ctx->state[0];
|
||||||
|
+ b = ctx->state[1];
|
||||||
|
+ c = ctx->state[2];
|
||||||
|
+ d = ctx->state[3];
|
||||||
|
+ e = ctx->state[4];
|
||||||
|
+ f = ctx->state[5];
|
||||||
|
+ g = ctx->state[6];
|
||||||
|
+ h = ctx->state[7];
|
||||||
|
+
|
||||||
|
+ for (i = 0; i < 64; ++i) {
|
||||||
|
+ t1 = h + EP1(e) + CH(e, f, g) + k[i] + m[i];
|
||||||
|
+ t2 = EP0(a) + MAJ(a, b, c);
|
||||||
|
+ h = g;
|
||||||
|
+ g = f;
|
||||||
|
+ f = e;
|
||||||
|
+ e = d + t1;
|
||||||
|
+ d = c;
|
||||||
|
+ c = b;
|
||||||
|
+ b = a;
|
||||||
|
+ a = t1 + t2;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ ctx->state[0] += a;
|
||||||
|
+ ctx->state[1] += b;
|
||||||
|
+ ctx->state[2] += c;
|
||||||
|
+ ctx->state[3] += d;
|
||||||
|
+ ctx->state[4] += e;
|
||||||
|
+ ctx->state[5] += f;
|
||||||
|
+ ctx->state[6] += g;
|
||||||
|
+ ctx->state[7] += h;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void sha256_init(struct sha256_ctx *ctx)
|
||||||
|
+{
|
||||||
|
+ ctx->datalen = 0;
|
||||||
|
+ ctx->bitlen = 0;
|
||||||
|
+ ctx->state[0] = 0x6a09e667;
|
||||||
|
+ ctx->state[1] = 0xbb67ae85;
|
||||||
|
+ ctx->state[2] = 0x3c6ef372;
|
||||||
|
+ ctx->state[3] = 0xa54ff53a;
|
||||||
|
+ ctx->state[4] = 0x510e527f;
|
||||||
|
+ ctx->state[5] = 0x9b05688c;
|
||||||
|
+ ctx->state[6] = 0x1f83d9ab;
|
||||||
|
+ ctx->state[7] = 0x5be0cd19;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void sha256_update(struct sha256_ctx *ctx, const uint8_t *data, size_t len)
|
||||||
|
+{
|
||||||
|
+ uint32_t i;
|
||||||
|
+
|
||||||
|
+ for (i = 0; i < len; ++i) {
|
||||||
|
+ ctx->data[ctx->datalen] = data[i];
|
||||||
|
+ ctx->datalen++;
|
||||||
|
+ if (ctx->datalen == 64) {
|
||||||
|
+ /* 64 byte = 512 bit means the buffer ctx->data has
|
||||||
|
+ * fully stored one chunk of message,
|
||||||
|
+ * so do the sha256 hash map for the current chunk.
|
||||||
|
+ */
|
||||||
|
+ sha256_transform(ctx, ctx->data);
|
||||||
|
+ ctx->bitlen += 512;
|
||||||
|
+ ctx->datalen = 0;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void sha256_final(struct sha256_ctx *ctx, uint8_t *hash)
|
||||||
|
+{
|
||||||
|
+ uint32_t i;
|
||||||
|
+
|
||||||
|
+ i = ctx->datalen;
|
||||||
|
+
|
||||||
|
+ /* Pad whatever data is left in the buffer. */
|
||||||
|
+ if (ctx->datalen < 56) {
|
||||||
|
+ ctx->data[i++] = 0x80; /* pad 10000000 = 0x80 */
|
||||||
|
+ while (i < 56)
|
||||||
|
+ ctx->data[i++] = 0x00;
|
||||||
|
+ } else {
|
||||||
|
+ ctx->data[i++] = 0x80;
|
||||||
|
+ while (i < 64)
|
||||||
|
+ ctx->data[i++] = 0x00;
|
||||||
|
+ sha256_transform(ctx, ctx->data);
|
||||||
|
+ memset(ctx->data, 0, 56);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* Append to the padding the total message's length in bits and transform. */
|
||||||
|
+ ctx->bitlen += ctx->datalen * 8;
|
||||||
|
+ ctx->data[63] = ctx->bitlen;
|
||||||
|
+ ctx->data[62] = ctx->bitlen >> 8;
|
||||||
|
+ ctx->data[61] = ctx->bitlen >> 16;
|
||||||
|
+ ctx->data[60] = ctx->bitlen >> 24;
|
||||||
|
+ ctx->data[59] = ctx->bitlen >> 32;
|
||||||
|
+ ctx->data[58] = ctx->bitlen >> 40;
|
||||||
|
+ ctx->data[57] = ctx->bitlen >> 48;
|
||||||
|
+ ctx->data[56] = ctx->bitlen >> 56;
|
||||||
|
+ sha256_transform(ctx, ctx->data);
|
||||||
|
+
|
||||||
|
+ /* copying the final state to the output hash(use big endian). */
|
||||||
|
+ for (i = 0; i < 4; ++i) {
|
||||||
|
+ hash[i] = (ctx->state[0] >> (24 - i * 8)) & 0x000000ff;
|
||||||
|
+ hash[i + 4] = (ctx->state[1] >> (24 - i * 8)) & 0x000000ff;
|
||||||
|
+ hash[i + 8] = (ctx->state[2] >> (24 - i * 8)) & 0x000000ff;
|
||||||
|
+ hash[i + 12] = (ctx->state[3] >> (24 - i * 8)) & 0x000000ff;
|
||||||
|
+ hash[i + 16] = (ctx->state[4] >> (24 - i * 8)) & 0x000000ff;
|
||||||
|
+ hash[i + 20] = (ctx->state[5] >> (24 - i * 8)) & 0x000000ff;
|
||||||
|
+ hash[i + 24] = (ctx->state[6] >> (24 - i * 8)) & 0x000000ff;
|
||||||
|
+ hash[i + 28] = (ctx->state[7] >> (24 - i * 8)) & 0x000000ff;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+int hmac_sha256(const uint8_t *plaintext, ssize_t psize, uint8_t *output)
|
||||||
|
+{
|
||||||
|
+ struct sha256_ctx ctx;
|
||||||
|
+
|
||||||
|
+ sha256_init(&ctx);
|
||||||
|
+ sha256_update(&ctx, plaintext, psize);
|
||||||
|
+ sha256_final(&ctx, output);
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
diff --git a/drivers/misc/sunxi-addr/sunxi-addr.c b/drivers/misc/sunxi-addr/sunxi-addr.c
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/drivers/misc/sunxi-addr/sunxi-addr.c
|
||||||
|
@@ -0,0 +1,356 @@
|
||||||
|
+/*
|
||||||
|
+ * The driver of SUNXI NET MAC ADDR Manager.
|
||||||
|
+ *
|
||||||
|
+ * Copyright (C) 2013 Allwinner.
|
||||||
|
+ *
|
||||||
|
+ * This file is licensed under the terms of the GNU General Public
|
||||||
|
+ * License version 2. This program is licensed "as is" without any
|
||||||
|
+ * warranty of any kind, whether express or implied.
|
||||||
|
+ */
|
||||||
|
+#define DEBUG
|
||||||
|
+
|
||||||
|
+#include <linux/kernel.h>
|
||||||
|
+#include <linux/module.h>
|
||||||
|
+#include <linux/miscdevice.h>
|
||||||
|
+#include <linux/of.h>
|
||||||
|
+#include <linux/platform_device.h>
|
||||||
|
+
|
||||||
|
+#define ADDR_MGT_DBG(fmt, arg...) printk(KERN_DEBUG "[ADDR_MGT] %s: " fmt "\n",\
|
||||||
|
+ __func__, ## arg)
|
||||||
|
+#define ADDR_MGT_ERR(fmt, arg...) printk(KERN_ERR "[ADDR_MGT] %s: " fmt "\n",\
|
||||||
|
+ __func__, ## arg)
|
||||||
|
+
|
||||||
|
+#define MODULE_CUR_VERSION "v1.0.9"
|
||||||
|
+
|
||||||
|
+#define MATCH_STR_LEN 20
|
||||||
|
+#define ADDR_VAL_LEN 6
|
||||||
|
+#define ADDR_STR_LEN 18
|
||||||
|
+#define ID_LEN 16
|
||||||
|
+#define HASH_LEN 32
|
||||||
|
+
|
||||||
|
+#define TYPE_ANY 0
|
||||||
|
+#define TYPE_BURN 1
|
||||||
|
+#define TYPE_IDGEN 2
|
||||||
|
+#define TYPE_USER 3
|
||||||
|
+#define TYPE_RAND 4
|
||||||
|
+
|
||||||
|
+#define ADDR_FMT_STR 0
|
||||||
|
+#define ADDR_FMT_VAL 1
|
||||||
|
+
|
||||||
|
+#define IS_TYPE_INVALID(x) ((x < TYPE_ANY) || (x > TYPE_RAND))
|
||||||
|
+
|
||||||
|
+#define ADDR_CLASS_ATTR_ADD(name) \
|
||||||
|
+static ssize_t addr_##name##_show(const struct class *class, \
|
||||||
|
+ const struct class_attribute *attr, char *buffer) \
|
||||||
|
+{ \
|
||||||
|
+ char addr[ADDR_STR_LEN]; \
|
||||||
|
+ if (IS_TYPE_INVALID(get_addr_by_name(ADDR_FMT_STR, addr, #name))) \
|
||||||
|
+ return 0; \
|
||||||
|
+ return sprintf(buffer, "%.17s\n", addr); \
|
||||||
|
+} \
|
||||||
|
+static ssize_t addr_##name##_store(const struct class *class, \
|
||||||
|
+ const struct class_attribute *attr, \
|
||||||
|
+ const char *buffer, size_t count) \
|
||||||
|
+{ \
|
||||||
|
+ if (count != ADDR_STR_LEN) { \
|
||||||
|
+ ADDR_MGT_ERR("Length wrong."); \
|
||||||
|
+ return -EINVAL; \
|
||||||
|
+ } \
|
||||||
|
+ set_addr_by_name(TYPE_USER, ADDR_FMT_STR, buffer, #name); \
|
||||||
|
+ return count; \
|
||||||
|
+} \
|
||||||
|
+static CLASS_ATTR_RW(addr_##name);
|
||||||
|
+
|
||||||
|
+struct addr_mgt_info {
|
||||||
|
+ unsigned int type_def;
|
||||||
|
+ unsigned int type_cur;
|
||||||
|
+ unsigned int flag;
|
||||||
|
+ char *addr;
|
||||||
|
+ char *name;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static struct addr_mgt_info info[] = {
|
||||||
|
+ {TYPE_ANY, TYPE_ANY, 1, NULL, "wifi"},
|
||||||
|
+ {TYPE_ANY, TYPE_ANY, 0, NULL, "bt" },
|
||||||
|
+ {TYPE_ANY, TYPE_ANY, 1, NULL, "eth" },
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+extern int hmac_sha256(const uint8_t *plaintext, ssize_t psize, uint8_t *output);
|
||||||
|
+extern int sunxi_get_soc_chipid(unsigned char *chipid);
|
||||||
|
+
|
||||||
|
+static int addr_parse(int fmt, const char *addr, int check)
|
||||||
|
+{
|
||||||
|
+ char val_buf[ADDR_VAL_LEN];
|
||||||
|
+ char cmp_buf[ADDR_VAL_LEN];
|
||||||
|
+ int ret = ADDR_VAL_LEN;
|
||||||
|
+
|
||||||
|
+ if (fmt == ADDR_FMT_STR)
|
||||||
|
+ ret = sscanf(addr, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
|
||||||
|
+ &val_buf[0], &val_buf[1], &val_buf[2],
|
||||||
|
+ &val_buf[3], &val_buf[4], &val_buf[5]);
|
||||||
|
+ else
|
||||||
|
+ memcpy(val_buf, addr, ADDR_VAL_LEN);
|
||||||
|
+
|
||||||
|
+ if (ret != ADDR_VAL_LEN)
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
+ if (check && (val_buf[0] & 0x3))
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
+ memset(cmp_buf, 0x00, ADDR_VAL_LEN);
|
||||||
|
+ if (memcmp(val_buf, cmp_buf, ADDR_VAL_LEN) == 0)
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
+ memset(cmp_buf, 0xFF, ADDR_VAL_LEN);
|
||||||
|
+ if (memcmp(val_buf, cmp_buf, ADDR_VAL_LEN) == 0)
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static struct addr_mgt_info *addr_find_by_name(char *name)
|
||||||
|
+{
|
||||||
|
+ int i = 0;
|
||||||
|
+ for (i = 0; i < ARRAY_SIZE(info); i++) {
|
||||||
|
+ if (strcmp(info[i].name, name) == 0)
|
||||||
|
+ return &info[i];
|
||||||
|
+ }
|
||||||
|
+ return NULL;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int get_addr_by_name(int fmt, char *addr, char *name)
|
||||||
|
+{
|
||||||
|
+ struct addr_mgt_info *t;
|
||||||
|
+
|
||||||
|
+ t = addr_find_by_name(name);
|
||||||
|
+ if (t == NULL) {
|
||||||
|
+ ADDR_MGT_ERR("can't find addr named: %s", name);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (IS_TYPE_INVALID(t->type_cur)) {
|
||||||
|
+ ADDR_MGT_ERR("addr type invalid");
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (addr_parse(ADDR_FMT_VAL, t->addr, t->flag)) {
|
||||||
|
+ ADDR_MGT_ERR("addr parse fail(%s)", t->addr);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (fmt == ADDR_FMT_STR)
|
||||||
|
+ sprintf(addr, "%02X:%02X:%02X:%02X:%02X:%02X",
|
||||||
|
+ t->addr[0], t->addr[1], t->addr[2],
|
||||||
|
+ t->addr[3], t->addr[4], t->addr[5]);
|
||||||
|
+ else
|
||||||
|
+ memcpy(addr, t->addr, ADDR_VAL_LEN);
|
||||||
|
+
|
||||||
|
+ return t->type_cur;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int set_addr_by_name(int type, int fmt, const char *addr, char *name)
|
||||||
|
+{
|
||||||
|
+ struct addr_mgt_info *t;
|
||||||
|
+
|
||||||
|
+ t = addr_find_by_name(name);
|
||||||
|
+ if (t == NULL) {
|
||||||
|
+ ADDR_MGT_ERR("can't find addr named: %s", name);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (addr_parse(fmt, addr, t->flag)) {
|
||||||
|
+ ADDR_MGT_ERR("addr parse fail(%s)", addr);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ t->type_cur = type;
|
||||||
|
+ if (fmt == ADDR_FMT_STR)
|
||||||
|
+ sscanf(addr, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
|
||||||
|
+ &t->addr[0], &t->addr[1], &t->addr[2],
|
||||||
|
+ &t->addr[3], &t->addr[4], &t->addr[5]);
|
||||||
|
+ else
|
||||||
|
+ memcpy(t->addr, addr, ADDR_VAL_LEN);
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+int get_custom_mac_address(int fmt, char *name, char *addr)
|
||||||
|
+{
|
||||||
|
+ return get_addr_by_name(fmt, addr, name);
|
||||||
|
+}
|
||||||
|
+EXPORT_SYMBOL_GPL(get_custom_mac_address);
|
||||||
|
+
|
||||||
|
+static int addr_factory(struct device_node *np,
|
||||||
|
+ int idx, int type, char *mac, char *name)
|
||||||
|
+{
|
||||||
|
+ int ret, i;
|
||||||
|
+ char match[MATCH_STR_LEN];
|
||||||
|
+ const char *p;
|
||||||
|
+ char id[ID_LEN], hash[HASH_LEN], cmp_buf[ID_LEN];
|
||||||
|
+ struct timespec64 curtime;
|
||||||
|
+
|
||||||
|
+ switch (type) {
|
||||||
|
+ case TYPE_BURN:
|
||||||
|
+ sprintf(match, "addr_%s", name);
|
||||||
|
+ ret = of_property_read_string_index(np, match, 0, &p);
|
||||||
|
+ if (ret)
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
+ ret = sscanf(p, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
|
||||||
|
+ &mac[0], &mac[1], &mac[2],
|
||||||
|
+ &mac[3], &mac[4], &mac[5]);
|
||||||
|
+
|
||||||
|
+ if (ret != ADDR_VAL_LEN)
|
||||||
|
+ return -1;
|
||||||
|
+ break;
|
||||||
|
+ case TYPE_IDGEN:
|
||||||
|
+ if (idx > HASH_LEN / ADDR_VAL_LEN - 1)
|
||||||
|
+ return -1;
|
||||||
|
+ if (sunxi_get_soc_chipid(id))
|
||||||
|
+ return -1;
|
||||||
|
+ memset(cmp_buf, 0x00, ID_LEN);
|
||||||
|
+ if (memcmp(id, cmp_buf, ID_LEN) == 0)
|
||||||
|
+ return -1;
|
||||||
|
+ if (hmac_sha256(id, ID_LEN, hash))
|
||||||
|
+ return -1;
|
||||||
|
+ memcpy(mac, &hash[idx * ADDR_VAL_LEN], ADDR_VAL_LEN);
|
||||||
|
+ break;
|
||||||
|
+ case TYPE_RAND:
|
||||||
|
+ for (i = 0; i < ADDR_VAL_LEN; i++) {
|
||||||
|
+ ktime_get_real_ts64(&curtime);
|
||||||
|
+ mac[i] = (char)curtime.tv_nsec;
|
||||||
|
+ }
|
||||||
|
+ break;
|
||||||
|
+ default:
|
||||||
|
+ ADDR_MGT_ERR("unsupport type: %d", type);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int addr_init(struct platform_device *pdev)
|
||||||
|
+{
|
||||||
|
+ struct device_node *np = pdev->dev.of_node;
|
||||||
|
+ int type, i, j;
|
||||||
|
+ char match[MATCH_STR_LEN];
|
||||||
|
+ char addr[ADDR_VAL_LEN];
|
||||||
|
+ int type_tab[] = {TYPE_BURN, TYPE_IDGEN, TYPE_RAND};
|
||||||
|
+
|
||||||
|
+ /* init addr type and value */
|
||||||
|
+ for (i = 0; i < ARRAY_SIZE(info); i++) {
|
||||||
|
+ sprintf(match, "type_addr_%s", info[i].name);
|
||||||
|
+ if (of_property_read_u32(np, match, &type)) {
|
||||||
|
+ ADDR_MGT_DBG("Failed to get type_def_%s, use default: %d",
|
||||||
|
+ info[i].name, info[i].type_def);
|
||||||
|
+ } else {
|
||||||
|
+ info[i].type_def = type;
|
||||||
|
+ info[i].type_cur = type;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (IS_TYPE_INVALID(info[i].type_def))
|
||||||
|
+ return -1;
|
||||||
|
+ if (info[i].type_def != TYPE_ANY) {
|
||||||
|
+ if (addr_factory(np, i, info[i].type_def, addr, info[i].name))
|
||||||
|
+ return -1;
|
||||||
|
+ } else {
|
||||||
|
+ for (j = 0; j < ARRAY_SIZE(type_tab); j++) {
|
||||||
|
+ if (!addr_factory(np, i, type_tab[j], addr, info[i].name)) {
|
||||||
|
+ info[i].type_cur = type_tab[j];
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (info[i].flag)
|
||||||
|
+ addr[0] &= 0xFC;
|
||||||
|
+
|
||||||
|
+ if (addr_parse(ADDR_FMT_VAL, addr, info[i].flag))
|
||||||
|
+ return -1;
|
||||||
|
+ else {
|
||||||
|
+ info[i].addr = devm_kzalloc(&pdev->dev, ADDR_VAL_LEN, GFP_KERNEL);
|
||||||
|
+ memcpy(info[i].addr, addr, ADDR_VAL_LEN);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static ssize_t summary_show(const struct class *class,
|
||||||
|
+ const struct class_attribute *attr, char *buffer)
|
||||||
|
+{
|
||||||
|
+ int i = 0, ret = 0;
|
||||||
|
+
|
||||||
|
+ ret += sprintf(&buffer[ret], "name cfg cur address\n");
|
||||||
|
+ for (i = 0; i < ARRAY_SIZE(info); i++) {
|
||||||
|
+ ret += sprintf(&buffer[ret],
|
||||||
|
+ "%4s %d %d %02X:%02X:%02X:%02X:%02X:%02X\n",
|
||||||
|
+ info[i].name, info[i].type_def, info[i].type_cur,
|
||||||
|
+ info[i].addr[0], info[i].addr[1], info[i].addr[2],
|
||||||
|
+ info[i].addr[3], info[i].addr[4], info[i].addr[5]);
|
||||||
|
+ }
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+static CLASS_ATTR_RO(summary);
|
||||||
|
+
|
||||||
|
+ADDR_CLASS_ATTR_ADD(wifi);
|
||||||
|
+ADDR_CLASS_ATTR_ADD(bt);
|
||||||
|
+ADDR_CLASS_ATTR_ADD(eth);
|
||||||
|
+
|
||||||
|
+static struct attribute *addr_class_attrs[] = {
|
||||||
|
+ &class_attr_summary.attr,
|
||||||
|
+ &class_attr_addr_wifi.attr,
|
||||||
|
+ &class_attr_addr_bt.attr,
|
||||||
|
+ &class_attr_addr_eth.attr,
|
||||||
|
+ NULL
|
||||||
|
+};
|
||||||
|
+ATTRIBUTE_GROUPS(addr_class);
|
||||||
|
+
|
||||||
|
+static struct class addr_class = {
|
||||||
|
+ .name = "addr_mgt",
|
||||||
|
+ .class_groups = addr_class_groups,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static const struct of_device_id addr_mgt_ids[] = {
|
||||||
|
+ { .compatible = "allwinner,sunxi-addr_mgt" },
|
||||||
|
+ { /* Sentinel */ }
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static int addr_mgt_probe(struct platform_device *pdev)
|
||||||
|
+{
|
||||||
|
+ int status;
|
||||||
|
+
|
||||||
|
+ ADDR_MGT_DBG("module version: %s", MODULE_CUR_VERSION);
|
||||||
|
+ status = class_register(&addr_class);
|
||||||
|
+ if (status < 0) {
|
||||||
|
+ ADDR_MGT_ERR("class register error, status: %d.", status);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (addr_init(pdev)) {
|
||||||
|
+ ADDR_MGT_ERR("failed to init addr.");
|
||||||
|
+ class_unregister(&addr_class);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ ADDR_MGT_DBG("success.");
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void addr_mgt_remove(struct platform_device *pdev)
|
||||||
|
+{
|
||||||
|
+ class_unregister(&addr_class);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static struct platform_driver addr_mgt_driver = {
|
||||||
|
+ .probe = addr_mgt_probe,
|
||||||
|
+ .remove = addr_mgt_remove,
|
||||||
|
+ .driver = {
|
||||||
|
+ .owner = THIS_MODULE,
|
||||||
|
+ .name = "sunxi-addr-mgt",
|
||||||
|
+ .of_match_table = addr_mgt_ids,
|
||||||
|
+ },
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+module_platform_driver_probe(addr_mgt_driver, addr_mgt_probe);
|
||||||
|
+
|
||||||
|
+MODULE_AUTHOR("Allwinnertech");
|
||||||
|
+MODULE_DESCRIPTION("Network MAC Addess Manager");
|
||||||
|
+MODULE_LICENSE("GPL");
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,115 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: chraac <chraac@gmail.com>
|
||||||
|
Date: Fri, 5 Apr 2024 10:57:18 +0800
|
||||||
|
Subject: add dtb overlay for zero2w
|
||||||
|
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/overlay/Makefile | 4 ++
|
||||||
|
arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-gpu.dtso | 14 ++++++
|
||||||
|
arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c0-pi.dtso | 23 ++++++++++
|
||||||
|
arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c1-pi.dtso | 16 +++++++
|
||||||
|
arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c2-pi.dtso | 23 ++++++++++
|
||||||
|
5 files changed, 80 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-gpu.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-gpu.dtso
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-gpu.dtso
|
||||||
|
@@ -0,0 +1,14 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun50i-h616";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&gpu>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c0-pi.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c0-pi.dtso
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c0-pi.dtso
|
||||||
|
@@ -0,0 +1,23 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun50i-h616";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&i2c0>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&i2c0_pi_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@1 {
|
||||||
|
+ target = <&uart2>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ status = "disabled";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c1-pi.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c1-pi.dtso
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c1-pi.dtso
|
||||||
|
@@ -0,0 +1,16 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun50i-h616";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&i2c1>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&i2c1_pi_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c2-pi.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c2-pi.dtso
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c2-pi.dtso
|
||||||
|
@@ -0,0 +1,23 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun50i-h616";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&i2c2>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&i2c2_pi_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ fragment@1 {
|
||||||
|
+ target = <&uart3>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ status = "disabled";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: The-going <48602507+The-going@users.noreply.github.com>
|
||||||
|
Date: Sat, 16 Apr 2022 11:51:35 +0300
|
||||||
|
Subject: add nodes for sunxi-info, sunxi-addr and sunxi-dump-reg
|
||||||
|
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 19 ++++++++++
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 19 ++++++++++
|
||||||
|
2 files changed, 38 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
|
||||||
|
@@ -1256,6 +1256,25 @@ ths: thermal-sensor@5070400 {
|
||||||
|
nvmem-cell-names = "calibration";
|
||||||
|
#thermal-sensor-cells = <1>;
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+ sunxi-info {
|
||||||
|
+ compatible = "allwinner,sun50i-h6-sys-info";
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ addr_mgt: addr-mgt {
|
||||||
|
+ compatible = "allwinner,sunxi-addr_mgt";
|
||||||
|
+ type_addr_wifi = <0x2>;
|
||||||
|
+ type_addr_bt = <0x2>;
|
||||||
|
+ type_addr_eth = <0x2>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ dump_reg: dump_reg@20000 {
|
||||||
|
+ compatible = "allwinner,sunxi-dump-reg";
|
||||||
|
+ reg = <0x0 0x03001000 0x0 0x0f20>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
thermal-zones {
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
@@ -1006,6 +1006,25 @@ r_rsb: rsb@7083000 {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+ dump_reg: dump_reg@20000 {
|
||||||
|
+ compatible = "allwinner,sunxi-dump-reg";
|
||||||
|
+ reg = <0x0 0x03001000 0x0 0x0f20>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ sunxi-info {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-sys-info";
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ addr_mgt: addr-mgt {
|
||||||
|
+ compatible = "allwinner,sunxi-addr_mgt";
|
||||||
|
+ type_addr_wifi = <0x2>;
|
||||||
|
+ type_addr_bt = <0x2>;
|
||||||
|
+ type_addr_eth = <0x2>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
thermal-zones {
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,402 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: The-going <48602507+The-going@users.noreply.github.com>
|
||||||
|
Date: Mon, 24 Mar 2025 22:19:31 +0300
|
||||||
|
Subject: arm64: allwinner: Add sun50i-h618-bananapi-m4-berry support
|
||||||
|
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/Makefile | 1 +
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 4 +-
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4-berry.dts | 355 ++++++++++
|
||||||
|
3 files changed, 358 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/Makefile
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/Makefile
|
||||||
|
@@ -59,6 +59,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-cb1-emmc.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-pi.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb
|
||||||
|
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-bananapi-m4-berry.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-longanpi-3h.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero2w.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero3.dtb
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
@@ -353,8 +353,8 @@ pio: pinctrl@300b000 {
|
||||||
|
ext_rgmii_pins: rgmii-pins {
|
||||||
|
pins = "PI0", "PI1", "PI2", "PI3", "PI4",
|
||||||
|
"PI5", "PI7", "PI8", "PI9", "PI10",
|
||||||
|
- "PI11", "PI12", "PI13", "PI14", "PI15",
|
||||||
|
- "PI16";
|
||||||
|
+ "PI11", "PI12", "PI13", "PI14", "PI15";
|
||||||
|
+ /* "PI16" Managed by mdio */
|
||||||
|
function = "emac0";
|
||||||
|
drive-strength = <40>;
|
||||||
|
};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4-berry.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4-berry.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4-berry.dts
|
||||||
|
@@ -0,0 +1,355 @@
|
||||||
|
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
|
||||||
|
+/*
|
||||||
|
+ * Copyright (C) 2020 Arm Ltd.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+/dts-v1/;
|
||||||
|
+
|
||||||
|
+#include "sun50i-h616.dtsi"
|
||||||
|
+#include "sun50i-h616-cpu-opp.dtsi"
|
||||||
|
+#include "axp313a.dtsi"
|
||||||
|
+
|
||||||
|
+#include <dt-bindings/gpio/gpio.h>
|
||||||
|
+#include <dt-bindings/input/linux-event-codes.h>
|
||||||
|
+#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||||
|
+#include <dt-bindings/leds/common.h>
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ model = "BananaPi M4 Berry";
|
||||||
|
+ compatible = "BiPai,bananapi-m4berry", "allwinner,sun50i-h616";
|
||||||
|
+
|
||||||
|
+ aliases {
|
||||||
|
+ ethernet0 = &emac0;
|
||||||
|
+ ethernet1 = &emac1;
|
||||||
|
+ serial0 = &uart0;
|
||||||
|
+ serial5 = &uart5;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ chosen {
|
||||||
|
+ stdout-path = "serial0:115200n8";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ connector {
|
||||||
|
+ compatible = "hdmi-connector";
|
||||||
|
+ type = "d";
|
||||||
|
+
|
||||||
|
+ port {
|
||||||
|
+ hdmi_con_in: endpoint {
|
||||||
|
+ remote-endpoint = <&hdmi_out_con>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ leds: leds {
|
||||||
|
+ compatible = "gpio-leds";
|
||||||
|
+
|
||||||
|
+ led-0 {
|
||||||
|
+ label = "red_led";
|
||||||
|
+ gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */
|
||||||
|
+ linux,default-trigger = "heartbeat";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ gpio-keys {
|
||||||
|
+ compatible = "gpio-keys";
|
||||||
|
+
|
||||||
|
+ key-sw3 {
|
||||||
|
+ label = "sw3";
|
||||||
|
+ linux,code = <BTN_0>;
|
||||||
|
+ gpios = <&pio 2 7 GPIO_ACTIVE_LOW>; /* PC7 */
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ reg_vcc5v: vcc5v {
|
||||||
|
+ /* board wide 5V supply directly from the USB-C socket */
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "vcc-5v";
|
||||||
|
+ regulator-min-microvolt = <5000000>;
|
||||||
|
+ regulator-max-microvolt = <5000000>;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ reg_usb_vbus: regulator-usb-vbus {
|
||||||
|
+ /* separate discrete regulator for the USB ports */
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "usb-vbus";
|
||||||
|
+ regulator-min-microvolt = <5000000>;
|
||||||
|
+ regulator-max-microvolt = <5000000>;
|
||||||
|
+ vin-supply = <®_vcc5v>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ reg_vcc3v3: vcc3v3 {
|
||||||
|
+ /* SY8089 DC/DC converter */
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "vcc-3v3";
|
||||||
|
+ regulator-min-microvolt = <3300000>;
|
||||||
|
+ regulator-max-microvolt = <3300000>;
|
||||||
|
+ vin-supply = <®_dldo1>;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ reg_vcc1v8: vcc1v8 {
|
||||||
|
+ /* Always on 1.8V/300mA regulator for WiFi and BT IO */
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "vcc-1v8";
|
||||||
|
+ regulator-min-microvolt = <1800000>;
|
||||||
|
+ regulator-max-microvolt = <1800000>;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ vin-supply = <®_aldo1>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ reg_gmac_3v3: gmac-3v3 {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "gmac-3v3";
|
||||||
|
+ regulator-min-microvolt = <3300000>;
|
||||||
|
+ regulator-max-microvolt = <3300000>;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ vin-supply = <®_vcc5v>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ wifi_usb {
|
||||||
|
+ compatible = "usb-wifi";
|
||||||
|
+ status = "okay";
|
||||||
|
+ power_on_pin = <&pio 2 2 GPIO_ACTIVE_HIGH>; /* PC2 */
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ soc {
|
||||||
|
+ pwm: pwm@300a000 {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-pwm";
|
||||||
|
+ reg = <0x0300a000 0x400>;
|
||||||
|
+ clocks = <&osc24M>, <&ccu CLK_BUS_PWM>;
|
||||||
|
+ clock-names = "mod", "bus";
|
||||||
|
+ resets = <&ccu RST_BUS_PWM>;
|
||||||
|
+ pwm-number = <6>;
|
||||||
|
+ pwm-base = <0x0>;
|
||||||
|
+ sunxi-pwms = <&pwm0>, <&pwm1>, <&pwm2>,
|
||||||
|
+ <&pwm3>, <&pwm4>, <&pwm5>;
|
||||||
|
+ #pwm-cells = <3>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ pwm0: pwm0@0300a000 {
|
||||||
|
+ compatible = "allwinner,sunxi-pwm0";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ pwm1: pwm1@0300a000 {
|
||||||
|
+ compatible = "allwinner,sunxi-pwm1";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&pwm1_ph_pin>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ pwm2: pwm2@0300a000 {
|
||||||
|
+ compatible = "allwinner,sunxi-pwm2";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&pwm2_ph_pin>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ pwm3: pwm3@0300a000 {
|
||||||
|
+ compatible = "allwinner,sunxi-pwm3";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&pwm3_ph_pin>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ pwm4: pwm4@0300a000 {
|
||||||
|
+ compatible = "allwinner,sunxi-pwm4";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&pwm4_ph_pin>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ pwm5: pwm5@0300a000 {
|
||||||
|
+ compatible = "allwinner,sunxi-pwm5";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&pwm5_pin>;
|
||||||
|
+ clk_bypass_output = <0x1>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cpu0 {
|
||||||
|
+ cpu-supply = <®_dcdc2>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&sid {
|
||||||
|
+ ephy_calibration: ephy-calibration@2c {
|
||||||
|
+ reg = <0x2c 0x2>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&de {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&hdmi {
|
||||||
|
+ hvcc-supply = <®_aldo1>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&hdmi_out {
|
||||||
|
+ hdmi_out_con: endpoint {
|
||||||
|
+ remote-endpoint = <&hdmi_con_in>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&gpu {
|
||||||
|
+ mali-supply = <®_dcdc1>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc0 {
|
||||||
|
+ vmmc-supply = <®_dldo1>;
|
||||||
|
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
|
||||||
|
+ bus-width = <4>;
|
||||||
|
+ max-frequency = <50000000>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc2 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&mmc2_pins>;
|
||||||
|
+ vmmc-supply = <®_dldo1>;
|
||||||
|
+ bus-width = <8>;
|
||||||
|
+ max-frequency = <150000000>;
|
||||||
|
+ non-removable;
|
||||||
|
+ cap-mmc-hw-reset;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&pio {
|
||||||
|
+ vcc-pc-supply = <®_aldo1>;
|
||||||
|
+ vcc-pf-supply = <®_dldo1>;
|
||||||
|
+ vcc-pg-supply = <®_dldo1>;
|
||||||
|
+ vcc-ph-supply = <®_dldo1>;
|
||||||
|
+ vcc-pi-supply = <®_dldo1>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&emac0 {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-emac";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&ext_rgmii_pins>;
|
||||||
|
+ phy-mode = "rgmii";
|
||||||
|
+ phy-handle = <&ext_rgmii_phy>;
|
||||||
|
+ phy-supply = <®_gmac_3v3>;
|
||||||
|
+ phy-io-supply = <®_dldo1>;
|
||||||
|
+ allwinner,rx-delay-ps = <3100>;
|
||||||
|
+ allwinner,tx-delay-ps = <700>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mdio0 {
|
||||||
|
+ ext_rgmii_phy: ethernet-phy@1 {
|
||||||
|
+ /* rtl8211F compatible string for mdio and phy */
|
||||||
|
+ compatible = "ethernet-phy-id001c.c916";
|
||||||
|
+ reg = <1>;
|
||||||
|
+ reset-assert-us = <20000>;
|
||||||
|
+ reset-deassert-us = <100000>;
|
||||||
|
+ reset-gpios = <&pio 8 16 GPIO_ACTIVE_LOW>; /* PI16 */
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&emac1 {
|
||||||
|
+ compatible = "allwinner,sunxi-gmac";
|
||||||
|
+ status = "disabled";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mdio1 {
|
||||||
|
+ rmii_phy: ethernet-phy@1 {
|
||||||
|
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||||
|
+ reg = <1>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&uart0 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart0_ph_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&usbotg {
|
||||||
|
+ /*
|
||||||
|
+ * PHY0 pins are connected to a USB-C socket, but a role switch
|
||||||
|
+ * is not implemented: both CC pins are pulled to GND.
|
||||||
|
+ * The VBUS pins power the device, so a fixed peripheral mode
|
||||||
|
+ * is the best choice.
|
||||||
|
+ * The board can be powered via GPIOs, in this case port0 *can*
|
||||||
|
+ * act as a host (with a cable/adapter ignoring CC), as VBUS is
|
||||||
|
+ * then provided by the GPIOs. Any user of this setup would
|
||||||
|
+ * need to adjust the DT accordingly: dr_mode set to "host",
|
||||||
|
+ * enabling OHCI0 and EHCI0.
|
||||||
|
+ */
|
||||||
|
+ dr_mode = "peripheral";
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&usbphy {
|
||||||
|
+ usb1_vbus-supply = <®_usb_vbus>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ehci0 {
|
||||||
|
+ status = "disabled";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ehci1 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ehci2 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ehci3 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ohci0 {
|
||||||
|
+ status = "disabled";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ohci1 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ohci2 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ohci3 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ir {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&ir_rx_pin>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&codec {
|
||||||
|
+ allwinner,audio-routing =
|
||||||
|
+ "Line Out", "LINEOUT";
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ahub_dam_plat {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ahub_dam_mach {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ahub1_plat {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ahub1_mach {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+&ahub_i2s2 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+*/
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,258 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: AGM1968 <AGM1968@users.noreply.github.com>
|
||||||
|
Date: Tue, 23 May 2023 16:43:00 +0000
|
||||||
|
Subject: arm64: dts: add sun50i-h618-cpu-dvfs.dtsi
|
||||||
|
|
||||||
|
Add sun50i-h616-cpu-opp-test.dtsi for tests only.
|
||||||
|
Its unused production for kernel v6.10.
|
||||||
|
|
||||||
|
Signed-off-by: AGM1968 <AGM1968@users.noreply.github.com>
|
||||||
|
Signed-off-by: The-going <48602507+The-going@users.noreply.github.com>
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616-cpu-opp-test.dtsi | 75 ++++++++++
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi | 1 +
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h618-cpu-dvfs.dtsi | 64 ++++++++
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts | 57 +------
|
||||||
|
4 files changed, 141 insertions(+), 56 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-cpu-opp-test.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-cpu-opp-test.dtsi
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-cpu-opp-test.dtsi
|
||||||
|
@@ -0,0 +1,75 @@
|
||||||
|
+//SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||||
|
+//Testing Version 1 from: AGM1968 <AGM1968@users.noreply.github.com>
|
||||||
|
+//Noted: PLL_CPUX = 24 MHz*N/P (WIP)
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ cpu_opp_table: opp-table-cpu {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-operating-points";
|
||||||
|
+ nvmem-cells = <&cpu_speed_grade>;
|
||||||
|
+ opp-shared;
|
||||||
|
+
|
||||||
|
+ opp-480000000 {
|
||||||
|
+ clock-latency-ns = <244144>; /* 8 32k periods */
|
||||||
|
+ opp-hz = /bits/ 64 <480000000>;
|
||||||
|
+ opp-microvolt-speed0 = <820000 820000 1100000>;
|
||||||
|
+ opp-microvolt-speed1 = <880000 880000 1100000>;
|
||||||
|
+ opp-microvolt-speed2 = <880000 880000 1100000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ opp-600000000 {
|
||||||
|
+ clock-latency-ns = <244144>; /* 8 32k periods */
|
||||||
|
+ opp-hz = /bits/ 64 <600000000>;
|
||||||
|
+ opp-microvolt-speed0 = <820000 820000 1100000>;
|
||||||
|
+ opp-microvolt-speed1 = <880000 880000 1100000>;
|
||||||
|
+ opp-microvolt-speed2 = <880000 880000 1100000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ opp-792000000 {
|
||||||
|
+ clock-latency-ns = <244144>; /* 8 32k periods */
|
||||||
|
+ opp-hz = /bits/ 64 <792000000>;
|
||||||
|
+ opp-microvolt-speed0 = <860000 860000 1100000>;
|
||||||
|
+ opp-microvolt-speed1 = <940000 940000 1100000>;
|
||||||
|
+ opp-microvolt-speed2 = <940000 940000 1100000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ opp-1008000000 {
|
||||||
|
+ clock-latency-ns = <244144>; /* 8 32k periods */
|
||||||
|
+ opp-hz = /bits/ 64 <1008000000>;
|
||||||
|
+ opp-microvolt-speed0 = <900000 900000 1100000>;
|
||||||
|
+ opp-microvolt-speed1 = <1020000 1020000 1100000>;
|
||||||
|
+ opp-microvolt-speed2 = <1020000 1020000 1100000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ opp-1200000000 {
|
||||||
|
+ clock-latency-ns = <244144>; /* 8 32k periods */
|
||||||
|
+ opp-hz = /bits/ 64 <1200000000>;
|
||||||
|
+ opp-microvolt-speed0 = <960000 960000 1100000>;
|
||||||
|
+ opp-microvolt-speed1 = <1100000 1100000 1100000>;
|
||||||
|
+ opp-microvolt-speed2 = <1100000 1100000 1100000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ opp-1512000000 {
|
||||||
|
+ clock-latency-ns = <244144>; /* 8 32k periods */
|
||||||
|
+ opp-hz = /bits/ 64 <1512000000>;
|
||||||
|
+ opp-microvolt-speed0 = <1100000 1100000 1100000>;
|
||||||
|
+ opp-microvolt-speed1 = <1100000 1100000 1100000>;
|
||||||
|
+ opp-microvolt-speed2 = <1100000 1100000 1100000>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cpu0 {
|
||||||
|
+ operating-points-v2 = <&cpu_opp_table>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cpu1 {
|
||||||
|
+ operating-points-v2 = <&cpu_opp_table>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cpu2 {
|
||||||
|
+ operating-points-v2 = <&cpu_opp_table>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cpu3 {
|
||||||
|
+ operating-points-v2 = <&cpu_opp_table>;
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
|
||||||
|
@@ -7,6 +7,7 @@
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "sun50i-h616.dtsi"
|
||||||
|
+#include "sun50i-h616-cpu-opp.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-cpu-dvfs.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h618-cpu-dvfs.dtsi
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-cpu-dvfs.dtsi
|
||||||
|
@@ -0,0 +1,64 @@
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+&r_i2c {
|
||||||
|
+ status = "okay";
|
||||||
|
+
|
||||||
|
+ axp313: pmic@36 {
|
||||||
|
+ compatible = "x-powers,axp313a";
|
||||||
|
+ reg = <0x36>;
|
||||||
|
+ #interrupt-cells = <1>;
|
||||||
|
+ interrupt-controller;
|
||||||
|
+ interrupt-parent = <&pio>;
|
||||||
|
+ interrupts = <2 9 IRQ_TYPE_LEVEL_LOW>; /* PC9 */
|
||||||
|
+
|
||||||
|
+ vin1-supply = <®_vcc5v>;
|
||||||
|
+ vin2-supply = <®_vcc5v>;
|
||||||
|
+ vin3-supply = <®_vcc5v>;
|
||||||
|
+
|
||||||
|
+ regulators {
|
||||||
|
+ /* Supplies VCC-PLL and DRAM */
|
||||||
|
+ reg_aldo1: aldo1 {
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ regulator-min-microvolt = <1800000>;
|
||||||
|
+ regulator-max-microvolt = <1800000>;
|
||||||
|
+ regulator-name = "vcc1v8";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /* Supplies VCC-IO, so needs to be always on. */
|
||||||
|
+ reg_dldo1: dldo1 {
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ regulator-min-microvolt = <3300000>;
|
||||||
|
+ regulator-max-microvolt = <3300000>;
|
||||||
|
+ regulator-name = "vcc3v3";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ reg_dcdc1: dcdc1 {
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ regulator-min-microvolt = <810000>;
|
||||||
|
+ regulator-max-microvolt = <990000>;
|
||||||
|
+ regulator-step-delay-us = <25>;
|
||||||
|
+ regulator-final-delay-us = <50>;
|
||||||
|
+ regulator-name = "vdd-gpu-sys";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ reg_dcdc2: dcdc2 {
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ regulator-min-microvolt = <500000>;
|
||||||
|
+ regulator-max-microvolt = <1100000>;
|
||||||
|
+ regulator-step-delay-us = <25>;
|
||||||
|
+ regulator-final-delay-us = <50>;
|
||||||
|
+ regulator-ramp-delay = <200>;
|
||||||
|
+ regulator-name = "vdd-cpu";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ reg_dcdc3: dcdc3 {
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ regulator-min-microvolt = <1100000>;
|
||||||
|
+ regulator-max-microvolt = <1100000>;
|
||||||
|
+ regulator-step-delay-us = <25>;
|
||||||
|
+ regulator-final-delay-us = <50>;
|
||||||
|
+ regulator-name = "vdd-dram";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
|
||||||
|
@@ -7,6 +7,7 @@
|
||||||
|
|
||||||
|
#include "sun50i-h616-orangepi-zero.dtsi"
|
||||||
|
#include "sun50i-h616-cpu-opp.dtsi"
|
||||||
|
+#include "sun50i-h618-cpu-dvfs.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "OrangePi Zero3";
|
||||||
|
@@ -36,62 +37,6 @@ &mmc0 {
|
||||||
|
vmmc-supply = <®_dldo1>;
|
||||||
|
};
|
||||||
|
|
||||||
|
-&r_i2c {
|
||||||
|
- status = "okay";
|
||||||
|
-
|
||||||
|
- axp313: pmic@36 {
|
||||||
|
- compatible = "x-powers,axp313a";
|
||||||
|
- reg = <0x36>;
|
||||||
|
- #interrupt-cells = <1>;
|
||||||
|
- interrupt-controller;
|
||||||
|
- interrupt-parent = <&pio>;
|
||||||
|
- interrupts = <2 9 IRQ_TYPE_LEVEL_LOW>; /* PC9 */
|
||||||
|
-
|
||||||
|
- vin1-supply = <®_vcc5v>;
|
||||||
|
- vin2-supply = <®_vcc5v>;
|
||||||
|
- vin3-supply = <®_vcc5v>;
|
||||||
|
-
|
||||||
|
- regulators {
|
||||||
|
- /* Supplies VCC-PLL, so needs to be always on. */
|
||||||
|
- reg_aldo1: aldo1 {
|
||||||
|
- regulator-always-on;
|
||||||
|
- regulator-min-microvolt = <1800000>;
|
||||||
|
- regulator-max-microvolt = <1800000>;
|
||||||
|
- regulator-name = "vcc1v8";
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- /* Supplies VCC-IO, so needs to be always on. */
|
||||||
|
- reg_dldo1: dldo1 {
|
||||||
|
- regulator-always-on;
|
||||||
|
- regulator-min-microvolt = <3300000>;
|
||||||
|
- regulator-max-microvolt = <3300000>;
|
||||||
|
- regulator-name = "vcc3v3";
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- reg_dcdc1: dcdc1 {
|
||||||
|
- regulator-always-on;
|
||||||
|
- regulator-min-microvolt = <810000>;
|
||||||
|
- regulator-max-microvolt = <990000>;
|
||||||
|
- regulator-name = "vdd-gpu-sys";
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- reg_dcdc2: dcdc2 {
|
||||||
|
- regulator-always-on;
|
||||||
|
- regulator-min-microvolt = <810000>;
|
||||||
|
- regulator-max-microvolt = <1100000>;
|
||||||
|
- regulator-name = "vdd-cpu";
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- reg_dcdc3: dcdc3 {
|
||||||
|
- regulator-always-on;
|
||||||
|
- regulator-min-microvolt = <1100000>;
|
||||||
|
- regulator-max-microvolt = <1100000>;
|
||||||
|
- regulator-name = "vdd-dram";
|
||||||
|
- };
|
||||||
|
- };
|
||||||
|
- };
|
||||||
|
-};
|
||||||
|
-
|
||||||
|
&pio {
|
||||||
|
vcc-pc-supply = <®_dldo1>;
|
||||||
|
vcc-pf-supply = <®_dldo1>;
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: The-going <48602507+The-going@users.noreply.github.com>
|
||||||
|
Date: Sun, 9 Feb 2025 17:52:52 +0300
|
||||||
|
Subject: arm64: dts: allwinner: Add axp313a.dtsi
|
||||||
|
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/axp313a.dtsi | 64 ++++++++++
|
||||||
|
1 file changed, 64 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/axp313a.dtsi b/arch/arm64/boot/dts/allwinner/axp313a.dtsi
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/axp313a.dtsi
|
||||||
|
@@ -0,0 +1,64 @@
|
||||||
|
+
|
||||||
|
+&r_i2c {
|
||||||
|
+ status = "okay";
|
||||||
|
+
|
||||||
|
+ axp313a: pmic@36 {
|
||||||
|
+ compatible = "x-powers,axp313a";
|
||||||
|
+ reg = <0x36>;
|
||||||
|
+ #interrupt-cells = <1>;
|
||||||
|
+ interrupt-controller;
|
||||||
|
+ interrupt-parent = <&pio>;
|
||||||
|
+
|
||||||
|
+ vin1-supply = <®_vcc5v>;
|
||||||
|
+ vin2-supply = <®_vcc5v>;
|
||||||
|
+ vin3-supply = <®_vcc5v>;
|
||||||
|
+
|
||||||
|
+ regulators {
|
||||||
|
+ reg_dcdc1: dcdc1 {
|
||||||
|
+ regulator-name = "vdd-gpu";
|
||||||
|
+ regulator-min-microvolt = <810000>;
|
||||||
|
+ regulator-max-microvolt = <990000>;
|
||||||
|
+ regulator-step-delay-us = <25>;
|
||||||
|
+ regulator-final-delay-us = <50>;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ reg_dcdc2: dcdc2 {
|
||||||
|
+ regulator-name = "vdd-cpu";
|
||||||
|
+ regulator-min-microvolt = <500000>;
|
||||||
|
+ regulator-max-microvolt = <1200000>;
|
||||||
|
+ regulator-step-delay-us = <25>;
|
||||||
|
+ regulator-final-delay-us = <50>;
|
||||||
|
+ regulator-ramp-delay = <200>;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ reg_dcdc3: dcdc3 {
|
||||||
|
+ regulator-name = "vcc-dram";
|
||||||
|
+ regulator-min-microvolt = <1100000>;
|
||||||
|
+ regulator-max-microvolt = <1100000>;
|
||||||
|
+ regulator-step-delay-us = <25>;
|
||||||
|
+ regulator-final-delay-us = <50>;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ reg_aldo1: aldo1 {
|
||||||
|
+ regulator-name = "vcc-1v8";
|
||||||
|
+ regulator-min-microvolt = <1800000>;
|
||||||
|
+ regulator-max-microvolt = <1800000>;
|
||||||
|
+ regulator-step-delay-us = <25>;
|
||||||
|
+ regulator-final-delay-us = <50>;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ reg_dldo1: dldo1 {
|
||||||
|
+ regulator-name = "vcc-3v3";
|
||||||
|
+ regulator-min-microvolt = <3300000>;
|
||||||
|
+ regulator-max-microvolt = <3300000>;
|
||||||
|
+ regulator-step-delay-us = <25>;
|
||||||
|
+ regulator-final-delay-us = <50>;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Micha=C5=82=20Dzieko=C5=84ski?=
|
||||||
|
<michal.dziekonski+github@gmail.com>
|
||||||
|
Date: Sun, 28 May 2023 00:26:43 +0000
|
||||||
|
Subject: arm64: dts: allwinner: h616 orangepi zero2: Enable expansion board
|
||||||
|
USB ports
|
||||||
|
|
||||||
|
Signed-off-by: Michal Dziekonski <michal.dziekonski+github@gmail.com>
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi | 15 ++++++++++
|
||||||
|
1 file changed, 15 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
|
||||||
|
@@ -67,6 +67,13 @@ &ehci1 {
|
||||||
|
};
|
||||||
|
|
||||||
|
/* USB 2 & 3 are on headers only. */
|
||||||
|
+&ehci2 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ehci3 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
|
||||||
|
&emac0 {
|
||||||
|
pinctrl-names = "default";
|
||||||
|
@@ -92,6 +99,14 @@ &ohci1 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
+&ohci2 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ohci3 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&spi0 {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jernej Skrabec <jernej.skrabec@gmail.com>
|
||||||
|
Date: Fri, 15 Oct 2021 21:14:55 +0200
|
||||||
|
Subject: arm64:dts:allwinner: sun50i-h616 Add VPU node
|
||||||
|
|
||||||
|
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 24 ++++++++++
|
||||||
|
1 file changed, 24 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
@@ -175,6 +175,17 @@ crypto: crypto@1904000 {
|
||||||
|
resets = <&ccu RST_BUS_CE>;
|
||||||
|
};
|
||||||
|
|
||||||
|
+ video-codec@1c0e000 {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-video-engine";
|
||||||
|
+ reg = <0x01c0e000 0x2000>;
|
||||||
|
+ clocks = <&ccu CLK_BUS_VE>, <&ccu CLK_VE>,
|
||||||
|
+ <&ccu CLK_MBUS_VE>;
|
||||||
|
+ clock-names = "ahb", "mod", "ram";
|
||||||
|
+ resets = <&ccu RST_BUS_VE>;
|
||||||
|
+ interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
+ allwinner,sram = <&ve_sram 1>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
syscon: syscon@3000000 {
|
||||||
|
compatible = "allwinner,sun50i-h616-system-control";
|
||||||
|
reg = <0x03000000 0x1000>;
|
||||||
|
@@ -189,6 +200,19 @@ sram_c: sram@28000 {
|
||||||
|
#size-cells = <1>;
|
||||||
|
ranges = <0 0x00028000 0x30000>;
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+ sram_c1: sram@1a00000 {
|
||||||
|
+ compatible = "mmio-sram";
|
||||||
|
+ reg = <0x01a00000 0x200000>;
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <1>;
|
||||||
|
+ ranges = <0 0x01a00000 0x200000>;
|
||||||
|
+
|
||||||
|
+ ve_sram: sram-section@0 {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-sram-c1";
|
||||||
|
+ reg = <0x000000 0x200000>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
ccu: clock@3001000 {
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,221 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: The-going <48602507+The-going@users.noreply.github.com>
|
||||||
|
Date: Sat, 8 Feb 2025 16:38:23 +0300
|
||||||
|
Subject: arm64: dts: h616(8): Add overlays i2c(234)ph,pg; uart(25)ph,pg
|
||||||
|
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/overlay/Makefile | 10 +++++++
|
||||||
|
arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c2-ph.dtso | 13 ++++++++
|
||||||
|
arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c3-pg.dtso | 13 ++++++++
|
||||||
|
arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c3-ph.dtso | 13 ++++++++
|
||||||
|
arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c4-pg.dtso | 13 ++++++++
|
||||||
|
arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c4-ph.dtso | 13 ++++++++
|
||||||
|
arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart2-pg-rts-cts.dtso | 15 ++++++++++
|
||||||
|
arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart2-pg.dtso | 15 ++++++++++
|
||||||
|
arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart2-ph-rts-cts.dtso | 15 ++++++++++
|
||||||
|
arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart2-ph.dtso | 15 ++++++++++
|
||||||
|
arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart5.dtso | 15 ++++++++++
|
||||||
|
11 files changed, 150 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c2-ph.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c2-ph.dtso
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c2-ph.dtso
|
||||||
|
@@ -0,0 +1,13 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&i2c2>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&i2c2_ph_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c3-pg.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c3-pg.dtso
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c3-pg.dtso
|
||||||
|
@@ -0,0 +1,13 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&i2c3>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&i2c3_pg_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c3-ph.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c3-ph.dtso
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c3-ph.dtso
|
||||||
|
@@ -0,0 +1,13 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&i2c3>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&i2c3_ph_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c4-pg.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c4-pg.dtso
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c4-pg.dtso
|
||||||
|
@@ -0,0 +1,13 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&i2c4>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&i2c4_pg_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c4-ph.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c4-ph.dtso
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c4-ph.dtso
|
||||||
|
@@ -0,0 +1,13 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&i2c4>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&i2c4_ph_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart2-pg-rts-cts.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart2-pg-rts-cts.dtso
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart2-pg-rts-cts.dtso
|
||||||
|
@@ -0,0 +1,15 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun50i-h616", "allwinner,sun50i-h618";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&uart2>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart2_pg_pins>, <&uart2_pg_rts_cts_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart2-pg.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart2-pg.dtso
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart2-pg.dtso
|
||||||
|
@@ -0,0 +1,15 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun50i-h616", "allwinner,sun50i-h618";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&uart2>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart2_pg_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart2-ph-rts-cts.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart2-ph-rts-cts.dtso
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart2-ph-rts-cts.dtso
|
||||||
|
@@ -0,0 +1,15 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun50i-h616", "allwinner,sun50i-h618";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&uart2>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart2_ph_pins>, <&uart2_ph_rts_cts_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart2-ph.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart2-ph.dtso
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart2-ph.dtso
|
||||||
|
@@ -0,0 +1,15 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun50i-h616", "allwinner,sun50i-h618";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&uart2>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart2_ph_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart5.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart5.dtso
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-uart5.dtso
|
||||||
|
@@ -0,0 +1,15 @@
|
||||||
|
+/dts-v1/;
|
||||||
|
+/plugin/;
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "allwinner,sun50i-h616", "allwinner,sun50i-h618";
|
||||||
|
+
|
||||||
|
+ fragment@0 {
|
||||||
|
+ target = <&uart5>;
|
||||||
|
+ __overlay__ {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart5_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
@@ -0,0 +1,339 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Gunjan Gupta <viraniac@gmail.com>
|
||||||
|
Date: Fri, 29 Dec 2023 11:18:33 +0000
|
||||||
|
Subject: arm64: dts: h616: add hdmi support for zero2 and zero3
|
||||||
|
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi | 25 ++
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts | 4 +
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 213 ++++++++++
|
||||||
|
3 files changed, 242 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
|
||||||
|
@@ -23,6 +23,17 @@ chosen {
|
||||||
|
stdout-path = "serial0:115200n8";
|
||||||
|
};
|
||||||
|
|
||||||
|
+ connector {
|
||||||
|
+ compatible = "hdmi-connector";
|
||||||
|
+ type = "d";
|
||||||
|
+
|
||||||
|
+ port {
|
||||||
|
+ hdmi_con_in: endpoint {
|
||||||
|
+ remote-endpoint = <&hdmi_out_con>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
@@ -90,6 +101,10 @@ wifi_pwrseq: wifi-pwrseq {
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
+&de {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&ehci1 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
@@ -110,6 +125,16 @@ &emac0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
+&hdmi {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&hdmi_out {
|
||||||
|
+ hdmi_out_con: endpoint {
|
||||||
|
+ remote-endpoint = <&hdmi_con_in>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&mdio0 {
|
||||||
|
ext_rgmii_phy: ethernet-phy@1 {
|
||||||
|
compatible = "ethernet-phy-ieee802.3-c22";
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
|
||||||
|
@@ -29,6 +29,10 @@ &gpu {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
+&hdmi {
|
||||||
|
+ hvcc-supply = <®_bldo1>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&mmc0 {
|
||||||
|
vmmc-supply = <®_dcdce>;
|
||||||
|
};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
@@ -7,8 +7,11 @@
|
||||||
|
#include <dt-bindings/clock/sun50i-h616-ccu.h>
|
||||||
|
#include <dt-bindings/clock/sun50i-h6-r-ccu.h>
|
||||||
|
#include <dt-bindings/clock/sun6i-rtc.h>
|
||||||
|
+#include <dt-bindings/clock/sun8i-de2.h>
|
||||||
|
+#include <dt-bindings/clock/sun8i-tcon-top.h>
|
||||||
|
#include <dt-bindings/reset/sun50i-h616-ccu.h>
|
||||||
|
#include <dt-bindings/reset/sun50i-h6-r-ccu.h>
|
||||||
|
+#include <dt-bindings/reset/sun8i-de2.h>
|
||||||
|
#include <dt-bindings/thermal/thermal.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
@@ -94,6 +97,12 @@ l2_cache: l2-cache {
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
+ de: display-engine {
|
||||||
|
+ compatible = "allwinner,sun50i-h6-display-engine";
|
||||||
|
+ allwinner,pipelines = <&mixer0>;
|
||||||
|
+ status = "disabled";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
reserved-memory {
|
||||||
|
#address-cells = <2>;
|
||||||
|
#size-cells = <2>;
|
||||||
|
@@ -150,6 +159,50 @@ soc {
|
||||||
|
#size-cells = <1>;
|
||||||
|
ranges = <0x0 0x0 0x0 0x40000000>;
|
||||||
|
|
||||||
|
+ bus@1000000 {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-de33",
|
||||||
|
+ "allwinner,sun50i-a64-de2";
|
||||||
|
+ reg = <0x1000000 0x400000>;
|
||||||
|
+ allwinner,sram = <&de3_sram 1>;
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <1>;
|
||||||
|
+ ranges = <0 0x1000000 0x400000>;
|
||||||
|
+
|
||||||
|
+ display_clocks: clock@8000 {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-de33-clk";
|
||||||
|
+ reg = <0x8000 0x100>;
|
||||||
|
+ clocks = <&ccu CLK_DE>, <&ccu CLK_BUS_DE>;
|
||||||
|
+ clock-names = "mod", "bus";
|
||||||
|
+ resets = <&ccu RST_BUS_DE>;
|
||||||
|
+ #clock-cells = <1>;
|
||||||
|
+ #reset-cells = <1>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ mixer0: mixer@100000 {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-de33-mixer-0";
|
||||||
|
+ reg = <0x100000 0x100000>,
|
||||||
|
+ <0x8100 0x40>,
|
||||||
|
+ <0x280000 0x20000>;
|
||||||
|
+ clocks = <&display_clocks CLK_BUS_MIXER0>,
|
||||||
|
+ <&display_clocks CLK_MIXER0>;
|
||||||
|
+ clock-names = "bus", "mod";
|
||||||
|
+ resets = <&display_clocks RST_MIXER0>;
|
||||||
|
+
|
||||||
|
+ ports {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+
|
||||||
|
+ mixer0_out: port@1 {
|
||||||
|
+ reg = <1>;
|
||||||
|
+
|
||||||
|
+ mixer0_out_tcon_top_mixer0: endpoint {
|
||||||
|
+ remote-endpoint = <&tcon_top_mixer0_in_mixer0>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
gpu: gpu@1800000 {
|
||||||
|
compatible = "allwinner,sun50i-h616-mali",
|
||||||
|
"arm,mali-bifrost";
|
||||||
|
@@ -193,12 +246,31 @@ syscon: syscon@3000000 {
|
||||||
|
#size-cells = <1>;
|
||||||
|
ranges;
|
||||||
|
|
||||||
|
+ sram_a2: sram@100000 {
|
||||||
|
+ compatible = "mmio-sram";
|
||||||
|
+ reg = <0x00100000 0x18000>;
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <1>;
|
||||||
|
+ ranges = <0 0x00100000 0x18000>;
|
||||||
|
+
|
||||||
|
+ scpi_sram: scpi-sram@17c00 {
|
||||||
|
+ compatible = "arm,scp-shmem";
|
||||||
|
+ reg = <0x17c00 0x200>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
sram_c: sram@28000 {
|
||||||
|
compatible = "mmio-sram";
|
||||||
|
reg = <0x00028000 0x30000>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
ranges = <0 0x00028000 0x30000>;
|
||||||
|
+
|
||||||
|
+ de3_sram: sram-section@0 {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-sram-c",
|
||||||
|
+ "allwinner,sun50i-a64-sram-c";
|
||||||
|
+ reg = <0x0000 0x1e000>;
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
sram_c1: sram@1a00000 {
|
||||||
|
@@ -904,6 +976,147 @@ ohci3: usb@5311400 {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
+ hdmi: hdmi@6000000 {
|
||||||
|
+ #sound-dai-cells = <0>;
|
||||||
|
+ compatible = "allwinner,sun50i-h616-dw-hdmi",
|
||||||
|
+ "allwinner,sun50i-h6-dw-hdmi";
|
||||||
|
+ reg = <0x06000000 0x10000>;
|
||||||
|
+ reg-io-width = <1>;
|
||||||
|
+ interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
+ clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_SLOW>,
|
||||||
|
+ <&ccu CLK_HDMI>, <&ccu CLK_HDMI_CEC>,
|
||||||
|
+ <&ccu CLK_HDCP>, <&ccu CLK_BUS_HDCP>;
|
||||||
|
+ clock-names = "iahb", "isfr", "tmds", "cec", "hdcp",
|
||||||
|
+ "hdcp-bus";
|
||||||
|
+ resets = <&ccu RST_BUS_HDMI>, <&ccu RST_BUS_HDCP>;
|
||||||
|
+ reset-names = "ctrl", "hdcp";
|
||||||
|
+ phys = <&hdmi_phy>;
|
||||||
|
+ phy-names = "phy";
|
||||||
|
+ status = "disabled";
|
||||||
|
+
|
||||||
|
+ ports {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+
|
||||||
|
+ hdmi_in: port@0 {
|
||||||
|
+ reg = <0>;
|
||||||
|
+
|
||||||
|
+ hdmi_in_tcon_top: endpoint {
|
||||||
|
+ remote-endpoint = <&tcon_top_hdmi_out_hdmi>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ hdmi_out: port@1 {
|
||||||
|
+ reg = <1>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ hdmi_phy: hdmi-phy@6010000 {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-hdmi-phy";
|
||||||
|
+ reg = <0x06010000 0x10000>;
|
||||||
|
+ clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_SLOW>;
|
||||||
|
+ clock-names = "bus", "mod";
|
||||||
|
+ resets = <&ccu RST_BUS_HDMI_SUB>;
|
||||||
|
+ reset-names = "phy";
|
||||||
|
+ #phy-cells = <0>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ tcon_top: tcon-top@6510000 {
|
||||||
|
+ compatible = "allwinner,sun50i-h6-tcon-top";
|
||||||
|
+ reg = <0x06510000 0x1000>;
|
||||||
|
+ clocks = <&ccu CLK_BUS_TCON_TOP>,
|
||||||
|
+ <&ccu CLK_TCON_TV0>;
|
||||||
|
+ clock-names = "bus",
|
||||||
|
+ "tcon-tv0";
|
||||||
|
+ clock-output-names = "tcon-top-tv0";
|
||||||
|
+ resets = <&ccu RST_BUS_TCON_TOP>;
|
||||||
|
+ #clock-cells = <1>;
|
||||||
|
+
|
||||||
|
+ ports {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+
|
||||||
|
+ tcon_top_mixer0_in: port@0 {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+ reg = <0>;
|
||||||
|
+
|
||||||
|
+ tcon_top_mixer0_in_mixer0: endpoint@0 {
|
||||||
|
+ reg = <0>;
|
||||||
|
+ remote-endpoint = <&mixer0_out_tcon_top_mixer0>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ tcon_top_mixer0_out: port@1 {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+ reg = <1>;
|
||||||
|
+
|
||||||
|
+ tcon_top_mixer0_out_tcon_tv: endpoint@2 {
|
||||||
|
+ reg = <2>;
|
||||||
|
+ remote-endpoint = <&tcon_tv_in_tcon_top_mixer0>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ tcon_top_hdmi_in: port@4 {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+ reg = <4>;
|
||||||
|
+
|
||||||
|
+ tcon_top_hdmi_in_tcon_tv: endpoint@0 {
|
||||||
|
+ reg = <0>;
|
||||||
|
+ remote-endpoint = <&tcon_tv_out_tcon_top>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ tcon_top_hdmi_out: port@5 {
|
||||||
|
+ reg = <5>;
|
||||||
|
+
|
||||||
|
+ tcon_top_hdmi_out_hdmi: endpoint {
|
||||||
|
+ remote-endpoint = <&hdmi_in_tcon_top>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ tcon_tv: lcd-controller@6515000 {
|
||||||
|
+ compatible = "allwinner,sun50i-h6-tcon-tv",
|
||||||
|
+ "allwinner,sun8i-r40-tcon-tv";
|
||||||
|
+ reg = <0x06515000 0x1000>;
|
||||||
|
+ interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
+ clocks = <&ccu CLK_BUS_TCON_TV0>,
|
||||||
|
+ <&tcon_top CLK_TCON_TOP_TV0>;
|
||||||
|
+ clock-names = "ahb",
|
||||||
|
+ "tcon-ch1";
|
||||||
|
+ resets = <&ccu RST_BUS_TCON_TV0>;
|
||||||
|
+ reset-names = "lcd";
|
||||||
|
+
|
||||||
|
+ ports {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+
|
||||||
|
+ tcon_tv_in: port@0 {
|
||||||
|
+ reg = <0>;
|
||||||
|
+
|
||||||
|
+ tcon_tv_in_tcon_top_mixer0: endpoint {
|
||||||
|
+ remote-endpoint = <&tcon_top_mixer0_out_tcon_tv>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ tcon_tv_out: port@1 {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+ reg = <1>;
|
||||||
|
+
|
||||||
|
+ tcon_tv_out_tcon_top: endpoint@1 {
|
||||||
|
+ reg = <1>;
|
||||||
|
+ remote-endpoint = <&tcon_top_hdmi_in_tcon_tv>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
rtc: rtc@7000000 {
|
||||||
|
compatible = "allwinner,sun50i-h616-rtc";
|
||||||
|
reg = <0x07000000 0x400>;
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Gunjan Gupta <viraniac@gmail.com>
|
||||||
|
Date: Wed, 13 Dec 2023 19:15:45 +0000
|
||||||
|
Subject: arm64: dts: h616: add wifi support for orange pi zero 2 and zero3
|
||||||
|
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi | 38 ++++++++++
|
||||||
|
1 file changed, 38 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
|
||||||
|
@@ -60,6 +60,34 @@ reg_usb1_vbus: regulator-usb1-vbus {
|
||||||
|
gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+ reg_vcc33_wifi: vcc33-wifi {
|
||||||
|
+ /* Always on 3.3V regulator for WiFi and BT */
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "vcc33-wifi";
|
||||||
|
+ regulator-min-microvolt = <3300000>;
|
||||||
|
+ regulator-max-microvolt = <3300000>;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ vin-supply = <®_vcc5v>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ reg_vcc_wifi_io: vcc-wifi-io {
|
||||||
|
+ /* Always on 1.8V/300mA regulator for WiFi and BT IO */
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "vcc-wifi-io";
|
||||||
|
+ regulator-min-microvolt = <1800000>;
|
||||||
|
+ regulator-max-microvolt = <1800000>;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ vin-supply = <®_vcc33_wifi>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ wifi_pwrseq: wifi-pwrseq {
|
||||||
|
+ compatible = "mmc-pwrseq-simple";
|
||||||
|
+ clocks = <&rtc 1>;
|
||||||
|
+ clock-names = "osc32k-out";
|
||||||
|
+ reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */
|
||||||
|
+ post-power-on-delay-ms = <200>;
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
&ehci1 {
|
||||||
|
@@ -95,6 +123,16 @@ &mmc0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
+&mmc1 {
|
||||||
|
+ vmmc-supply = <®_vcc33_wifi>;
|
||||||
|
+ vqmmc-supply = <®_vcc_wifi_io>;
|
||||||
|
+ mmc-pwrseq = <&wifi_pwrseq>;
|
||||||
|
+ bus-width = <4>;
|
||||||
|
+ non-removable;
|
||||||
|
+ mmc-ddr-1_8v;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&ohci1 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: The-going <48602507+The-going@users.noreply.github.com>
|
||||||
|
Date: Mon, 10 Feb 2025 13:34:14 +0300
|
||||||
|
Subject: arm64: dts: sun50i-h616: Add i2c3-pa, pwm pins
|
||||||
|
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 48 ++++++++++
|
||||||
|
1 file changed, 48 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
@@ -389,6 +389,12 @@ i2c2_pi_pins: i2c2-pi-pins {
|
||||||
|
function = "i2c2";
|
||||||
|
};
|
||||||
|
|
||||||
|
+ i2c3_pa_pins: i2c3-pa-pins {
|
||||||
|
+ pins = "PA10", "PA11";
|
||||||
|
+ function = "i2c3";
|
||||||
|
+ bias-pull-up;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
/omit-if-no-ref/
|
||||||
|
i2c3_pg_pins: i2c3-pg-pins {
|
||||||
|
pins = "PG17", "PG18";
|
||||||
|
@@ -444,6 +450,48 @@ mmc2_pins: mmc2-pins {
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ pwm1_pg_pin: pwm1-pg-pin {
|
||||||
|
+ pins = "PG19";
|
||||||
|
+ function = "pwm1";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ pwm1_ph_pin: pwm1-ph-pin {
|
||||||
|
+ pins = "PH3";
|
||||||
|
+ function = "pwm1";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ pwm1_pi_pin: pwm1-pi-pin {
|
||||||
|
+ pins = "PI11";
|
||||||
|
+ function = "pwm1";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ pwm2_ph_pin: pwm2-ph-pin {
|
||||||
|
+ pins = "PH2";
|
||||||
|
+ function = "pwm2";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ pwm3_ph_pin: pwm3-ph-pin {
|
||||||
|
+ pins = "PH0";
|
||||||
|
+ function = "pwm3";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ pwm4_ph_pin: pwm4-ph-pin {
|
||||||
|
+ pins = "PH1";
|
||||||
|
+ function = "pwm4";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ pwm5_pin: pwm5-pin {
|
||||||
|
+ pins = "PA12";
|
||||||
|
+ function = "pwm5";
|
||||||
|
+ bias-pull-up;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
/omit-if-no-ref/
|
||||||
|
spi0_pins: spi0-pins {
|
||||||
|
pins = "PC0", "PC2", "PC4";
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,489 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alan <Alan>
|
||||||
|
Date: Tue, 30 May 2023 17:36:29 +0800
|
||||||
|
Subject: arm64: dts: sun50i-h616-bigtreetech-cb1(sd, emmc)
|
||||||
|
|
||||||
|
> X-Git-Archeology: > recovered message: > Signed-off-by: Alan.Ma from BigTreeTech tech@biqu3d.com
|
||||||
|
> X-Git-Archeology: - Revision 9d69bb1da699f5729dc5c1dcc2d8d5f4590152fd: https://github.com/armbian/build/commit/9d69bb1da699f5729dc5c1dcc2d8d5f4590152fd
|
||||||
|
> X-Git-Archeology: Date: Tue, 30 May 2023 17:36:29 +0800
|
||||||
|
> X-Git-Archeology: From: Alan <Alan>
|
||||||
|
> X-Git-Archeology: Subject: Patches: add current(6.1) & edge(6.2) patch for BigTreeTech CB1
|
||||||
|
> X-Git-Archeology:
|
||||||
|
> X-Git-Archeology: - Revision 8562428877003ddd46045cb3429d7fdc9df4acee: https://github.com/armbian/build/commit/8562428877003ddd46045cb3429d7fdc9df4acee
|
||||||
|
> X-Git-Archeology: Date: Sat, 02 Sep 2023 03:34:28 +0518
|
||||||
|
> X-Git-Archeology: From: Gunjan Gupta <viraniac@gmail.com>
|
||||||
|
> X-Git-Archeology: Subject: Allwinner: Kernel patches for 6.5-rc7 kernel
|
||||||
|
> X-Git-Archeology:
|
||||||
|
> X-Git-Archeology: - Revision bb78fac2fadb40a43a9ccb36266dbd21746c2eb6: https://github.com/armbian/build/commit/bb78fac2fadb40a43a9ccb36266dbd21746c2eb6
|
||||||
|
> X-Git-Archeology: Date: Fri, 29 Sep 2023 08:46:52 +0200
|
||||||
|
> X-Git-Archeology: From: Ricardo Pardini <ricardo@pardini.net>
|
||||||
|
> X-Git-Archeology: Subject: `sunxi`/`sunxi64` `edge` 6.5.y: rebase/rewrite all patches for v6.5.5; fix UTF-8 "From:" encoding
|
||||||
|
> X-Git-Archeology:
|
||||||
|
> X-Git-Archeology: - Revision d1186b8a0e3d44d5b285e94772ebe2c17a014193: https://github.com/armbian/build/commit/d1186b8a0e3d44d5b285e94772ebe2c17a014193
|
||||||
|
> X-Git-Archeology: Date: Mon, 30 Oct 2023 22:46:11 +0518
|
||||||
|
> X-Git-Archeology: From: Gunjan Gupta <viraniac@gmail.com>
|
||||||
|
> X-Git-Archeology: Subject: kernel: sunxi: Add patches for 6.6 kernel
|
||||||
|
> X-Git-Archeology:
|
||||||
|
> X-Git-Archeology: - Revision a269c9a1c5784bd89630df1652923f0d76278b61: https://github.com/armbian/build/commit/a269c9a1c5784bd89630df1652923f0d76278b61
|
||||||
|
> X-Git-Archeology: Date: Sun, 24 Dec 2023 09:13:08 +0100
|
||||||
|
> X-Git-Archeology: From: Gunjan Gupta <viraniac@gmail.com>
|
||||||
|
> X-Git-Archeology: Subject: Refreshed patches using rewrite-kernel-patches command
|
||||||
|
> X-Git-Archeology:
|
||||||
|
> X-Git-Archeology: - Revision 30ef1a3e149f96200bffaf1c3138a4467b6f0aa7: https://github.com/armbian/build/commit/30ef1a3e149f96200bffaf1c3138a4467b6f0aa7
|
||||||
|
> X-Git-Archeology: Date: Sun, 24 Dec 2023 09:13:08 +0100
|
||||||
|
> X-Git-Archeology: From: Gunjan Gupta <viraniac@gmail.com>
|
||||||
|
> X-Git-Archeology: Subject: Allwinner: Add kernel patches for 6.7 kernel
|
||||||
|
> X-Git-Archeology:
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/Makefile | 2 +
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-emmc.dts | 44 ++
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-sd.dts | 35 ++
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi | 223 +++++++++-
|
||||||
|
4 files changed, 287 insertions(+), 17 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/Makefile
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/Makefile
|
||||||
|
@@ -51,6 +51,8 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6-mini.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h313-tanix-tx1.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-cb1-manta.dtb
|
||||||
|
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-cb1-sd.dtb
|
||||||
|
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-cb1-emmc.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-pi.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-emmc.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-emmc.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-emmc.dts
|
||||||
|
@@ -0,0 +1,44 @@
|
||||||
|
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
|
||||||
|
+/*
|
||||||
|
+ * Copyright (C) 2023 Alan.Ma <tech@biqu3d.com>.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+/dts-v1/;
|
||||||
|
+
|
||||||
|
+#include "sun50i-h616-bigtreetech-cb1.dtsi"
|
||||||
|
+
|
||||||
|
+&mmc2 {
|
||||||
|
+ vmmc-supply = <®_dldo1>;
|
||||||
|
+
|
||||||
|
+ no-1-8-v;
|
||||||
|
+ bus-width = <8>;
|
||||||
|
+ non-removable;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ws2812 {
|
||||||
|
+ gpios = <&pio 8 15 GPIO_ACTIVE_LOW>; /* PI15 */
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&i2c_gpio {
|
||||||
|
+ gpios = <&pio 8 6 GPIO_ACTIVE_HIGH>, /* SDA PI6 */
|
||||||
|
+ <&pio 8 4 GPIO_ACTIVE_HIGH>; /* SCL PI4 */
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&can0_pin_irq {
|
||||||
|
+ pins = "PI3";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&can {
|
||||||
|
+ interrupts = <8 3 0x08>; /* PI3 IRQ_TYPE_LEVEL_LOW */
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&tft_35 {
|
||||||
|
+ dc-gpios = <&pio 8 15 GPIO_ACTIVE_HIGH>; /* PI15 */
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&spi1 {
|
||||||
|
+ cs-gpios = <&pio 8 5 GPIO_ACTIVE_HIGH>, /* PI5 */
|
||||||
|
+ <&pio 8 14 GPIO_ACTIVE_HIGH>, /* PI14 */
|
||||||
|
+ <&pio 8 7 GPIO_ACTIVE_HIGH>; /* PI7 */
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-sd.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-sd.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..111111111111
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-sd.dts
|
||||||
|
@@ -0,0 +1,35 @@
|
||||||
|
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
|
||||||
|
+/*
|
||||||
|
+ * Copyright (C) 2023 Alan.Ma <tech@biqu3d.com>.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+/dts-v1/;
|
||||||
|
+
|
||||||
|
+#include "sun50i-h616-bigtreetech-cb1.dtsi"
|
||||||
|
+
|
||||||
|
+&ws2812 {
|
||||||
|
+ gpios = <&pio 2 14 GPIO_ACTIVE_LOW>; /* PC14 */
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&i2c_gpio {
|
||||||
|
+ gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>, /* SDA PC12 */
|
||||||
|
+ <&pio 2 10 GPIO_ACTIVE_HIGH>; /* SCL PC10 */
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&can0_pin_irq {
|
||||||
|
+ pins = "PC9";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&can {
|
||||||
|
+ interrupts = <2 9 0x08>; /* PC9 IRQ_TYPE_LEVEL_LOW */
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&tft_35 {
|
||||||
|
+ dc-gpios = <&pio 2 14 GPIO_ACTIVE_HIGH>; /* PC14 */
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&spi1 {
|
||||||
|
+ cs-gpios = <&pio 2 11 GPIO_ACTIVE_HIGH>, /* PC11 */
|
||||||
|
+ <&pio 2 7 GPIO_ACTIVE_HIGH>, /* PC7 */
|
||||||
|
+ <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
|
||||||
|
@@ -1,6 +1,7 @@
|
||||||
|
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2023 Martin Botka <martin.botka@somainline.org>.
|
||||||
|
+ * Copyright (C) 2023 Alan.Ma <tech@biqu3d.com>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
@@ -13,22 +14,41 @@
|
||||||
|
#include <dt-bindings/leds/common.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
+ model = "BigTreeTech CB1";
|
||||||
|
+ compatible = "bigtreetech,cb1", "allwinner,sun50i-h616";
|
||||||
|
+
|
||||||
|
aliases {
|
||||||
|
- ethernet0 = &rtl8189ftv;
|
||||||
|
+ ethernet0 = &emac1;
|
||||||
|
+ serial0 = &uart0;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ chosen {
|
||||||
|
+ stdout-path = "serial0:115200n8";
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
- led-0 {
|
||||||
|
- function = LED_FUNCTION_STATUS;
|
||||||
|
- color = <LED_COLOR_ID_GREEN>;
|
||||||
|
- gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
|
||||||
|
+ act_led: led-0 {
|
||||||
|
+ gpios = <&pio 7 5 GPIO_ACTIVE_LOW>; /* PH5 */
|
||||||
|
+ linux,default-trigger = "heartbeat";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ gpio_1 {
|
||||||
|
+ function = "wifi_power";
|
||||||
|
+ gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
|
||||||
|
+ default-state = "on";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ gpio_2 {
|
||||||
|
+ function = "wifi_wake";
|
||||||
|
+ gpios = <&pio 6 15 GPIO_ACTIVE_HIGH>; /* PG15 */
|
||||||
|
+ default-state = "on";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
reg_vcc5v: regulator-vcc5v {
|
||||||
|
- /* board wide 5V supply from carrier boards */
|
||||||
|
+ /* board wide 5V supply directly from the USB-C socket */
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "vcc-5v";
|
||||||
|
regulator-min-microvolt = <5000000>;
|
||||||
|
@@ -36,7 +56,17 @@ reg_vcc5v: regulator-vcc5v {
|
||||||
|
regulator-always-on;
|
||||||
|
};
|
||||||
|
|
||||||
|
+ reg_usb1_vbus: regulator-usb1-vbus {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "usb1-vbus";
|
||||||
|
+ regulator-min-microvolt = <5000000>;
|
||||||
|
+ regulator-max-microvolt = <5000000>;
|
||||||
|
+ vin-supply = <®_vcc5v>;
|
||||||
|
+ enable-active-high;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
reg_vcc33_wifi: vcc33-wifi {
|
||||||
|
+ /* Always on 3.3V regulator for WiFi and BT */
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "vcc33-wifi";
|
||||||
|
regulator-min-microvolt = <3300000>;
|
||||||
|
@@ -46,6 +76,7 @@ reg_vcc33_wifi: vcc33-wifi {
|
||||||
|
};
|
||||||
|
|
||||||
|
reg_vcc_wifi_io: vcc-wifi-io {
|
||||||
|
+ /* Always on 1.8V/300mA regulator for WiFi and BT IO */
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "vcc-wifi-io";
|
||||||
|
regulator-min-microvolt = <1800000>;
|
||||||
|
@@ -57,10 +88,50 @@ reg_vcc_wifi_io: vcc-wifi-io {
|
||||||
|
wifi_pwrseq: wifi-pwrseq {
|
||||||
|
compatible = "mmc-pwrseq-simple";
|
||||||
|
clocks = <&rtc 1>;
|
||||||
|
- clock-names = "ext_clock";
|
||||||
|
+ clock-names = "osc32k-out";
|
||||||
|
reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */
|
||||||
|
post-power-on-delay-ms = <200>;
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+ ws2812: ws2812 {
|
||||||
|
+ compatible = "rgb-ws2812";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ rgb_cnt = <2>;
|
||||||
|
+ rgb_value = <0x010000 0x010000>;
|
||||||
|
+ status = "disabled";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ i2c_gpio: i2c-gpio {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+ compatible = "i2c-gpio";
|
||||||
|
+ status = "disabled";
|
||||||
|
+
|
||||||
|
+ i2c-gpio,delay-us = <3>; /* 100 kHz */
|
||||||
|
+
|
||||||
|
+ tft_tp: ns2009@48 {
|
||||||
|
+ compatible = "ti,tsc2007";
|
||||||
|
+ reg = <0x48>;
|
||||||
|
+ status = "disabled";
|
||||||
|
+ ti,x-plate-ohms = <660>;
|
||||||
|
+ ti,rt-thr = <3000>;
|
||||||
|
+ ti,fuzzx = <32>;
|
||||||
|
+ ti,fuzzy = <16>;
|
||||||
|
+ i2c,ignore-nak = <1>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ light: bh1750@5c {
|
||||||
|
+ compatible = "rohm,bh1750";
|
||||||
|
+ reg = <0x5c>;
|
||||||
|
+ status = "disabled";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ mcp2515_clock: mcp2515_clock {
|
||||||
|
+ compatible = "fixed-clock";
|
||||||
|
+ #clock-cells = <0>;
|
||||||
|
+ clock-frequency = <12000000>;
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
&cpu0 {
|
||||||
|
@@ -69,9 +140,9 @@ &cpu0 {
|
||||||
|
|
||||||
|
&mmc0 {
|
||||||
|
vmmc-supply = <®_dldo1>;
|
||||||
|
- /* Card detection pin is not connected */
|
||||||
|
broken-cd;
|
||||||
|
bus-width = <4>;
|
||||||
|
+ max-frequency = <50000000>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -80,12 +151,56 @@ &mmc1 {
|
||||||
|
vqmmc-supply = <®_vcc_wifi_io>;
|
||||||
|
mmc-pwrseq = <&wifi_pwrseq>;
|
||||||
|
bus-width = <4>;
|
||||||
|
+ max-frequency = <25000000>;
|
||||||
|
non-removable;
|
||||||
|
mmc-ddr-1_8v;
|
||||||
|
status = "okay";
|
||||||
|
+};
|
||||||
|
|
||||||
|
- rtl8189ftv: wifi@1 {
|
||||||
|
+&pio {
|
||||||
|
+ can0_pin_irq: can0_pin_irq {
|
||||||
|
+ function = "irq";
|
||||||
|
+ bias-pull-up;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&spi1 {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+ status = "disabled";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&spi1_pins>;
|
||||||
|
+
|
||||||
|
+ can: mcp2515@0 {
|
||||||
|
+ status = "disabled";
|
||||||
|
+ compatible = "microchip,mcp2515";
|
||||||
|
+ reg = <0x0>;
|
||||||
|
+ clocks = <&mcp2515_clock>;
|
||||||
|
+ spi-max-frequency = <12500000>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&can0_pin_irq>;
|
||||||
|
+ interrupt-parent = <&pio>;
|
||||||
|
+ vdd-supply = <®_vcc33_wifi>;
|
||||||
|
+ xceiver-supply = <®_vcc33_wifi>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ tft_35: st7789v@1 {
|
||||||
|
+ status = "disabled";
|
||||||
|
+ compatible = "sitronix,st7796s";
|
||||||
|
reg = <1>;
|
||||||
|
+ spi-max-frequency =<12500000>;
|
||||||
|
+ fps =<60>;
|
||||||
|
+ buswidth = <8>;
|
||||||
|
+ rotate =<0>;
|
||||||
|
+ width = <480>;
|
||||||
|
+ height = <320>;
|
||||||
|
+ bpp = <24>;
|
||||||
|
+ bgr;
|
||||||
|
+ regwidth = <8>;
|
||||||
|
+ debug = <0x00>; //0x20 show fps
|
||||||
|
+ txbuflen = <307200>;
|
||||||
|
+ spi-cpol;
|
||||||
|
+ spi-cpha;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -95,29 +210,34 @@ &r_i2c {
|
||||||
|
axp313a: pmic@36 {
|
||||||
|
compatible = "x-powers,axp313a";
|
||||||
|
reg = <0x36>;
|
||||||
|
- interrupt-controller;
|
||||||
|
- #interrupt-cells = <1>;
|
||||||
|
+ wakeup-source;
|
||||||
|
|
||||||
|
regulators {
|
||||||
|
reg_dcdc1: dcdc1 {
|
||||||
|
regulator-name = "vdd-gpu-sys";
|
||||||
|
- regulator-min-microvolt = <810000>;
|
||||||
|
- regulator-max-microvolt = <990000>;
|
||||||
|
+ regulator-min-microvolt = <500000>;
|
||||||
|
+ regulator-max-microvolt = <3400000>;
|
||||||
|
+ regulator-step-delay-us = <25>;
|
||||||
|
+ regulator-final-delay-us = <50>;
|
||||||
|
regulator-always-on;
|
||||||
|
};
|
||||||
|
|
||||||
|
reg_dcdc2: dcdc2 {
|
||||||
|
regulator-name = "vdd-cpu";
|
||||||
|
- regulator-min-microvolt = <810000>;
|
||||||
|
- regulator-max-microvolt = <1100000>;
|
||||||
|
+ regulator-min-microvolt = <500000>;
|
||||||
|
+ regulator-max-microvolt = <1540000>;
|
||||||
|
+ regulator-step-delay-us = <25>;
|
||||||
|
+ regulator-final-delay-us = <50>;
|
||||||
|
regulator-ramp-delay = <200>;
|
||||||
|
regulator-always-on;
|
||||||
|
};
|
||||||
|
|
||||||
|
reg_dcdc3: dcdc3 {
|
||||||
|
regulator-name = "vcc-dram";
|
||||||
|
- regulator-min-microvolt = <1350000>;
|
||||||
|
- regulator-max-microvolt = <1500000>;
|
||||||
|
+ regulator-min-microvolt = <500000>;
|
||||||
|
+ regulator-max-microvolt = <1840000>;
|
||||||
|
+ regulator-step-delay-us = <25>;
|
||||||
|
+ regulator-final-delay-us = <50>;
|
||||||
|
regulator-always-on;
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -125,6 +245,8 @@ reg_aldo1: aldo1 {
|
||||||
|
regulator-name = "vcc-1v8-pll";
|
||||||
|
regulator-min-microvolt = <1800000>;
|
||||||
|
regulator-max-microvolt = <1800000>;
|
||||||
|
+ regulator-step-delay-us = <25>;
|
||||||
|
+ regulator-final-delay-us = <50>;
|
||||||
|
regulator-always-on;
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -132,12 +254,79 @@ reg_dldo1: dldo1 {
|
||||||
|
regulator-name = "vcc-3v3-io";
|
||||||
|
regulator-min-microvolt = <3300000>;
|
||||||
|
regulator-max-microvolt = <3300000>;
|
||||||
|
+ regulator-step-delay-us = <25>;
|
||||||
|
+ regulator-final-delay-us = <50>;
|
||||||
|
regulator-always-on;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
+&cpu0 {
|
||||||
|
+ cpu-supply = <®_dcdc2>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&gpu {
|
||||||
|
+ mali-supply = <®_dcdc3>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&uart0 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart0_ph_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&usbphy {
|
||||||
|
+ usb1_vbus-supply = <®_usb1_vbus>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ehci0 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ohci0 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ehci1 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ohci1 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ehci2 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ohci2 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ehci3 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ohci3 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&usbotg {
|
||||||
|
+ /*
|
||||||
|
+ * PHY0 pins are connected to a USB-C socket, but a role switch
|
||||||
|
+ * is not implemented: both CC pins are pulled to GND.
|
||||||
|
+ * The VBUS pins power the device, so a fixed peripheral mode
|
||||||
|
+ * is the best choice.
|
||||||
|
+ * The board can be powered via GPIOs, in this case port0 *can*
|
||||||
|
+ * act as a host (with a cable/adapter ignoring CC), as VBUS is
|
||||||
|
+ * then provided by the GPIOs. Any user of this setup would
|
||||||
|
+ * need to adjust the DT accordingly: dr_mode set to "host",
|
||||||
|
+ * enabling OHCI0 and EHCI0.
|
||||||
|
+ */
|
||||||
|
+ dr_mode = "peripheral";
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jernej Skrabec <jernej.skrabec@gmail.com>
|
||||||
|
Date: Fri, 15 Oct 2021 21:09:42 +0200
|
||||||
|
Subject: arm64:dts: sun50i-h616-orangepi-zero2 Enable GPU mali
|
||||||
|
|
||||||
|
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
|
||||||
|
@@ -24,6 +24,11 @@ &emac0 {
|
||||||
|
phy-supply = <®_dcdce>;
|
||||||
|
};
|
||||||
|
|
||||||
|
+&gpu {
|
||||||
|
+ mali-supply = <®_dcdcc>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&mmc0 {
|
||||||
|
vmmc-supply = <®_dcdce>;
|
||||||
|
};
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: The-going <48602507+The-going@users.noreply.github.com>
|
||||||
|
Date: Wed, 14 Dec 2022 20:15:41 +0300
|
||||||
|
Subject: arm64: dts: sun50i-h616-orangepi-zero2: reg_usb1_vbus status ok
|
||||||
|
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
|
||||||
|
@@ -56,6 +56,7 @@ reg_usb1_vbus: regulator-usb1-vbus {
|
||||||
|
vin-supply = <®_vcc5v>;
|
||||||
|
enable-active-high;
|
||||||
|
gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */
|
||||||
|
+ status = "okay";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jernej Skrabec <jernej.skrabec@gmail.com>
|
||||||
|
Date: Mon, 14 Jun 2021 20:48:15 +0200
|
||||||
|
Subject: arm64:dts: sun50i-h616-x96-mate T95 eth & sd card hack
|
||||||
|
|
||||||
|
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts | 21 +++++++-
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 26 ++++++++++
|
||||||
|
2 files changed, 46 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
|
||||||
|
@@ -16,6 +16,7 @@ / {
|
||||||
|
compatible = "hechuang,x96-mate", "allwinner,sun50i-h616";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
+ ethernet0 = &emac1;
|
||||||
|
serial0 = &uart0;
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -45,13 +46,31 @@ &ehci2 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
+&emac1 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&rmii_pins>;
|
||||||
|
+ phy-mode = "rmii";
|
||||||
|
+ phy-handle = <&rmii_phy>;
|
||||||
|
+ phy-supply = <®_aldo1>;
|
||||||
|
+ allwinner,rx-delay-ps = <3100>;
|
||||||
|
+ allwinner,tx-delay-ps = <700>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&ir {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
+&mdio1 {
|
||||||
|
+ rmii_phy: ethernet-phy@1 {
|
||||||
|
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||||
|
+ reg = <1>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&mmc0 {
|
||||||
|
vmmc-supply = <®_dcdce>;
|
||||||
|
- cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
|
||||||
|
+ broken-cd;
|
||||||
|
bus-width = <4>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
@@ -287,6 +287,13 @@ ext_rgmii_pins: rgmii-pins {
|
||||||
|
drive-strength = <40>;
|
||||||
|
};
|
||||||
|
|
||||||
|
+ rmii_pins: rmii-pins {
|
||||||
|
+ pins = "PA0", "PA1", "PA2", "PA3", "PA4",
|
||||||
|
+ "PA5", "PA6", "PA7", "PA8", "PA9";
|
||||||
|
+ function = "emac1";
|
||||||
|
+ drive-strength = <40>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
i2c0_pins: i2c0-pins {
|
||||||
|
pins = "PI5", "PI6";
|
||||||
|
function = "i2c0";
|
||||||
|
@@ -669,6 +676,25 @@ mdio0: mdio {
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
+ emac1: ethernet@5030000 {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-emac";
|
||||||
|
+ syscon = <&syscon 1>;
|
||||||
|
+ reg = <0x05030000 0x10000>;
|
||||||
|
+ interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
+ interrupt-names = "macirq";
|
||||||
|
+ resets = <&ccu RST_BUS_EMAC1>;
|
||||||
|
+ reset-names = "stmmaceth";
|
||||||
|
+ clocks = <&ccu CLK_BUS_EMAC1>;
|
||||||
|
+ clock-names = "stmmaceth";
|
||||||
|
+ status = "disabled";
|
||||||
|
+
|
||||||
|
+ mdio1: mdio {
|
||||||
|
+ compatible = "snps,dwmac-mdio";
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
spdif: spdif@5093000 {
|
||||||
|
compatible = "allwinner,sun50i-h616-spdif";
|
||||||
|
reg = <0x05093000 0x400>;
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jernej Skrabec <jernej.skrabec@gmail.com>
|
||||||
|
Date: Mon, 14 Jun 2021 22:39:58 +0200
|
||||||
|
Subject: arm64:dts: sun50i-h616-x96-mate add hdmi
|
||||||
|
|
||||||
|
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts | 26 ++++++++++
|
||||||
|
1 file changed, 26 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
|
||||||
|
@@ -24,6 +24,17 @@ chosen {
|
||||||
|
stdout-path = "serial0:115200n8";
|
||||||
|
};
|
||||||
|
|
||||||
|
+ connector {
|
||||||
|
+ compatible = "hdmi-connector";
|
||||||
|
+ type = "a";
|
||||||
|
+
|
||||||
|
+ port {
|
||||||
|
+ hdmi_con_in: endpoint {
|
||||||
|
+ remote-endpoint = <&hdmi_out_con>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
reg_vcc5v: vcc5v {
|
||||||
|
/* board wide 5V supply directly from the DC input */
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
@@ -38,6 +49,10 @@ &cpu0 {
|
||||||
|
cpu-supply = <®_dcdca>;
|
||||||
|
};
|
||||||
|
|
||||||
|
+&de {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&ehci0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
@@ -57,6 +72,17 @@ &emac1 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
+&hdmi {
|
||||||
|
+ hvcc-supply = <®_bldo1>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&hdmi_out {
|
||||||
|
+ hdmi_out_con: endpoint {
|
||||||
|
+ remote-endpoint = <&hdmi_con_in>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&ir {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: The-going <48602507+The-going@users.noreply.github.com>
|
||||||
|
Date: Sun, 13 Nov 2022 23:15:38 +0300
|
||||||
|
Subject: arm64: dts: sun50i-h616.dtsi: reserved memory 512K for BL31
|
||||||
|
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
@@ -100,12 +100,12 @@ reserved-memory {
|
||||||
|
ranges;
|
||||||
|
|
||||||
|
/*
|
||||||
|
- * 256 KiB reserved for Trusted Firmware-A (BL31).
|
||||||
|
+ * 512 KiB reserved for Trusted Firmware-A (BL31).
|
||||||
|
* This is added by BL31 itself, but some bootloaders fail
|
||||||
|
* to propagate this into the DTB handed to kernels.
|
||||||
|
*/
|
||||||
|
secmon@40000000 {
|
||||||
|
- reg = <0x0 0x40000000 0x0 0x40000>;
|
||||||
|
+ reg = <0x0 0x40000000 0x0 0x80000>;
|
||||||
|
no-map;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,775 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: chraac <chraac@gmail.com>
|
||||||
|
Date: Fri, 15 Mar 2024 12:30:26 +0800
|
||||||
|
Subject: arm64: dts: sun50i-h618-orangepi-zero2w: Add missing nodes
|
||||||
|
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 25 +-
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts | 628 +++++++++-
|
||||||
|
2 files changed, 586 insertions(+), 67 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
@@ -241,7 +241,7 @@ video-codec@1c0e000 {
|
||||||
|
|
||||||
|
syscon: syscon@3000000 {
|
||||||
|
compatible = "allwinner,sun50i-h616-system-control";
|
||||||
|
- reg = <0x03000000 0x1000>;
|
||||||
|
+ reg = <0x03000000 0x30>,<0x03000038 0x0fc8>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
ranges;
|
||||||
|
@@ -810,19 +810,28 @@ mdio0: mdio {
|
||||||
|
};
|
||||||
|
|
||||||
|
emac1: ethernet@5030000 {
|
||||||
|
- compatible = "allwinner,sun50i-h616-emac";
|
||||||
|
- syscon = <&syscon 1>;
|
||||||
|
- reg = <0x05030000 0x10000>;
|
||||||
|
+ compatible = "allwinner,sunxi-gmac";
|
||||||
|
+ reg = <0x05030000 0x10000>,
|
||||||
|
+ <0x03000034 0x4>;
|
||||||
|
+ reg-names = "gmac1_reg","ephy_reg";
|
||||||
|
interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
- interrupt-names = "macirq";
|
||||||
|
+ interrupt-names = "gmacirq";
|
||||||
|
resets = <&ccu RST_BUS_EMAC1>;
|
||||||
|
reset-names = "stmmaceth";
|
||||||
|
- clocks = <&ccu CLK_BUS_EMAC1>;
|
||||||
|
- clock-names = "stmmaceth";
|
||||||
|
+ clocks = <&ccu CLK_BUS_EMAC1>,<&ccu CLK_EMAC_25M>;
|
||||||
|
+ clock-names = "bus-emac1","emac-25m";
|
||||||
|
+ pinctrl-0 = <&rmii_pins>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ tx-delay = <7>;
|
||||||
|
+ rx-delay = <31>;
|
||||||
|
+ phy-rst;
|
||||||
|
+ gmac-power0;
|
||||||
|
+ gmac-power1;
|
||||||
|
+ gmac-power2;
|
||||||
|
status = "disabled";
|
||||||
|
|
||||||
|
mdio1: mdio {
|
||||||
|
- compatible = "snps,dwmac-mdio";
|
||||||
|
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
};
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
|
||||||
|
@@ -7,10 +7,15 @@
|
||||||
|
|
||||||
|
#include "sun50i-h616.dtsi"
|
||||||
|
#include "sun50i-h616-cpu-opp.dtsi"
|
||||||
|
+#include "sun50i-h618-cpu-dvfs.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||||
|
#include <dt-bindings/leds/common.h>
|
||||||
|
+#include <dt-bindings/clock/sun8i-de2.h>
|
||||||
|
+#include <dt-bindings/clock/sun8i-tcon-top.h>
|
||||||
|
+#include <dt-bindings/reset/sun8i-de2.h>
|
||||||
|
+
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "OrangePi Zero 2W";
|
||||||
|
@@ -18,19 +23,48 @@ / {
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
serial0 = &uart0;
|
||||||
|
+ serial2 = &uart2;
|
||||||
|
+ serial3 = &uart3;
|
||||||
|
+ serial4 = &uart4;
|
||||||
|
+ serial5 = &uart5;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
stdout-path = "serial0:115200n8";
|
||||||
|
};
|
||||||
|
|
||||||
|
+ connector {
|
||||||
|
+ compatible = "hdmi-connector";
|
||||||
|
+ type = "d";
|
||||||
|
+
|
||||||
|
+ port {
|
||||||
|
+ hdmi_con_in: endpoint {
|
||||||
|
+ remote-endpoint = <&hdmi_out_con>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
led-0 {
|
||||||
|
function = LED_FUNCTION_STATUS;
|
||||||
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
|
+ label = "green_led";
|
||||||
|
gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */
|
||||||
|
+ linux,default-trigger = "heartbeat";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ 100m_link {
|
||||||
|
+ label = "100m_link";
|
||||||
|
+ gpios = <&pio 2 15 GPIO_ACTIVE_HIGH>; /* PC15 */
|
||||||
|
+ default-state = "off";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ 100m_act {
|
||||||
|
+ label = "100m_act";
|
||||||
|
+ gpios = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */
|
||||||
|
+ default-state = "off";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -52,91 +86,377 @@ reg_vcc3v3: vcc3v3 {
|
||||||
|
vin-supply = <®_vcc5v>;
|
||||||
|
regulator-always-on;
|
||||||
|
};
|
||||||
|
-};
|
||||||
|
|
||||||
|
-&cpu0 {
|
||||||
|
- cpu-supply = <®_dcdc2>;
|
||||||
|
+ reg_vcc_wifi_io: vcc-wifi-io {
|
||||||
|
+ /* Always on 1.8V/300mA regulator for WiFi and BT IO */
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "vcc-wifi-io";
|
||||||
|
+ regulator-min-microvolt = <1800000>;
|
||||||
|
+ regulator-max-microvolt = <1800000>;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ vin-supply = <®_vcc3v3>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ wifi_pwrseq: wifi-pwrseq {
|
||||||
|
+ compatible = "mmc-pwrseq-simple";
|
||||||
|
+ clocks = <&rtc 1>;
|
||||||
|
+ clock-names = "osc32k-out";
|
||||||
|
+ reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */
|
||||||
|
+ post-power-on-delay-ms = <200>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ ac200_pwm_clk: ac200_clk {
|
||||||
|
+ compatible = "pwm-clock";
|
||||||
|
+ #clock-cells = <0>;
|
||||||
|
+ // pwm5 period_ns = 500 > 334 for select 24M clock.
|
||||||
|
+ pwms = <&pwm 5 500 0>;
|
||||||
|
+ clock-frequency = <2000000>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ soc {
|
||||||
|
+ pwm: pwm@300a000 {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-pwm";
|
||||||
|
+ reg = <0x0300a000 0x400>;
|
||||||
|
+ clocks = <&osc24M>, <&ccu CLK_BUS_PWM>;
|
||||||
|
+ clock-names = "mod", "bus";
|
||||||
|
+ resets = <&ccu RST_BUS_PWM>;
|
||||||
|
+ pwm-number = <6>;
|
||||||
|
+ pwm-base = <0x0>;
|
||||||
|
+ sunxi-pwms = <&pwm0>, <&pwm1>, <&pwm2>, <&pwm3>, <&pwm4>, <&pwm5>;
|
||||||
|
+ #pwm-cells = <3>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ pwm0: pwm0@0300a000 {
|
||||||
|
+ compatible = "allwinner,sunxi-pwm0";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ pwm1: pwm1@0300a000 {
|
||||||
|
+ compatible = "allwinner,sunxi-pwm1";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&pwm1_ph_pin>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ pwm2: pwm2@0300a000 {
|
||||||
|
+ compatible = "allwinner,sunxi-pwm2";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&pwm2_ph_pin>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ pwm3: pwm3@0300a000 {
|
||||||
|
+ compatible = "allwinner,sunxi-pwm3";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&pwm3_ph_pin>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ pwm4: pwm4@0300a000 {
|
||||||
|
+ compatible = "allwinner,sunxi-pwm4";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&pwm4_ph_pin>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ pwm5: pwm5@0300a000 {
|
||||||
|
+ compatible = "allwinner,sunxi-pwm5";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&pwm5_pin>;
|
||||||
|
+ clk_bypass_output = <0x1>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ bus@1000000 {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-de33",
|
||||||
|
+ "allwinner,sun50i-a64-de2";
|
||||||
|
+ reg = <0x1000000 0x400000>;
|
||||||
|
+ allwinner,sram = <&de3_sram 1>;
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <1>;
|
||||||
|
+ ranges = <0 0x1000000 0x400000>;
|
||||||
|
+
|
||||||
|
+ display_clocks: clock@8000 {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-de33-clk";
|
||||||
|
+ reg = <0x8000 0x100>;
|
||||||
|
+ clocks = <&ccu CLK_DE>, <&ccu CLK_BUS_DE>;
|
||||||
|
+ clock-names = "mod", "bus";
|
||||||
|
+ resets = <&ccu RST_BUS_DE>;
|
||||||
|
+ #clock-cells = <1>;
|
||||||
|
+ #reset-cells = <1>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ mixer0: mixer@100000 {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-de33-mixer-0";
|
||||||
|
+ reg = <0x100000 0x100000>,
|
||||||
|
+ <0x8100 0x40>,
|
||||||
|
+ <0x280000 0x20000>;
|
||||||
|
+ clocks = <&display_clocks CLK_BUS_MIXER0>,
|
||||||
|
+ <&display_clocks CLK_MIXER0>;
|
||||||
|
+ clock-names = "bus", "mod";
|
||||||
|
+ resets = <&display_clocks RST_MIXER0>;
|
||||||
|
+
|
||||||
|
+ ports {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+
|
||||||
|
+ mixer0_out: port@1 {
|
||||||
|
+ reg = <1>;
|
||||||
|
+
|
||||||
|
+ mixer0_out_tcon_top_mixer0: endpoint {
|
||||||
|
+ remote-endpoint = <&tcon_top_mixer0_in_mixer0>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ hdmi: hdmi@6000000 {
|
||||||
|
+ #sound-dai-cells = <0>;
|
||||||
|
+ compatible = "allwinner,sun50i-h616-dw-hdmi",
|
||||||
|
+ "allwinner,sun50i-h6-dw-hdmi";
|
||||||
|
+ reg = <0x06000000 0x10000>;
|
||||||
|
+ reg-io-width = <1>;
|
||||||
|
+ interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
+ clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_SLOW>,
|
||||||
|
+ <&ccu CLK_HDMI>, <&ccu CLK_HDMI_CEC>,
|
||||||
|
+ <&ccu CLK_HDCP>, <&ccu CLK_BUS_HDCP>;
|
||||||
|
+ clock-names = "iahb", "isfr", "tmds", "cec", "hdcp",
|
||||||
|
+ "hdcp-bus";
|
||||||
|
+ resets = <&ccu RST_BUS_HDMI>, <&ccu RST_BUS_HDCP>;
|
||||||
|
+ reset-names = "ctrl", "hdcp";
|
||||||
|
+ phys = <&hdmi_phy>;
|
||||||
|
+ phy-names = "phy";
|
||||||
|
+ status = "okay";
|
||||||
|
+
|
||||||
|
+ ports {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+
|
||||||
|
+ hdmi_in: port@0 {
|
||||||
|
+ reg = <0>;
|
||||||
|
+
|
||||||
|
+ hdmi_in_tcon_top: endpoint {
|
||||||
|
+ remote-endpoint = <&tcon_top_hdmi_out_hdmi>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ hdmi_out: port@1 {
|
||||||
|
+ reg = <1>;
|
||||||
|
+ hdmi_out_con: endpoint {
|
||||||
|
+ remote-endpoint = <&hdmi_con_in>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ hdmi_phy: hdmi-phy@6010000 {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-hdmi-phy";
|
||||||
|
+ reg = <0x06010000 0x10000>;
|
||||||
|
+ clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_SLOW>;
|
||||||
|
+ clock-names = "bus", "mod";
|
||||||
|
+ resets = <&ccu RST_BUS_HDMI_SUB>;
|
||||||
|
+ reset-names = "phy";
|
||||||
|
+ #phy-cells = <0>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ tcon_top: tcon-top@6510000 {
|
||||||
|
+ compatible = "allwinner,sun50i-h6-tcon-top";
|
||||||
|
+ reg = <0x06510000 0x1000>;
|
||||||
|
+ clocks = <&ccu CLK_BUS_TCON_TOP>,
|
||||||
|
+ <&ccu CLK_TCON_TV0>;
|
||||||
|
+ clock-names = "bus",
|
||||||
|
+ "tcon-tv0";
|
||||||
|
+ clock-output-names = "tcon-top-tv0";
|
||||||
|
+ resets = <&ccu RST_BUS_TCON_TOP>;
|
||||||
|
+ #clock-cells = <1>;
|
||||||
|
+
|
||||||
|
+ ports {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+
|
||||||
|
+ tcon_top_mixer0_in: port@0 {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+ reg = <0>;
|
||||||
|
+
|
||||||
|
+ tcon_top_mixer0_in_mixer0: endpoint@0 {
|
||||||
|
+ reg = <0>;
|
||||||
|
+ remote-endpoint = <&mixer0_out_tcon_top_mixer0>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ tcon_top_mixer0_out: port@1 {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+ reg = <1>;
|
||||||
|
+
|
||||||
|
+ tcon_top_mixer0_out_tcon_tv: endpoint@2 {
|
||||||
|
+ reg = <2>;
|
||||||
|
+ remote-endpoint = <&tcon_tv_in_tcon_top_mixer0>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ tcon_top_hdmi_in: port@4 {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+ reg = <4>;
|
||||||
|
+
|
||||||
|
+ tcon_top_hdmi_in_tcon_tv: endpoint@0 {
|
||||||
|
+ reg = <0>;
|
||||||
|
+ remote-endpoint = <&tcon_tv_out_tcon_top>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ tcon_top_hdmi_out: port@5 {
|
||||||
|
+ reg = <5>;
|
||||||
|
+
|
||||||
|
+ tcon_top_hdmi_out_hdmi: endpoint {
|
||||||
|
+ remote-endpoint = <&hdmi_in_tcon_top>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ tcon_tv: lcd-controller@6515000 {
|
||||||
|
+ compatible = "allwinner,sun50i-h6-tcon-tv",
|
||||||
|
+ "allwinner,sun8i-r40-tcon-tv";
|
||||||
|
+ reg = <0x06515000 0x1000>;
|
||||||
|
+ interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
+ clocks = <&ccu CLK_BUS_TCON_TV0>,
|
||||||
|
+ <&tcon_top CLK_TCON_TOP_TV0>;
|
||||||
|
+ clock-names = "ahb",
|
||||||
|
+ "tcon-ch1";
|
||||||
|
+ resets = <&ccu RST_BUS_TCON_TV0>;
|
||||||
|
+ reset-names = "lcd";
|
||||||
|
+
|
||||||
|
+ ports {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+
|
||||||
|
+ tcon_tv_in: port@0 {
|
||||||
|
+ reg = <0>;
|
||||||
|
+
|
||||||
|
+ tcon_tv_in_tcon_top_mixer0: endpoint {
|
||||||
|
+ remote-endpoint = <&tcon_top_mixer0_out_tcon_tv>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ tcon_tv_out: port@1 {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+ reg = <1>;
|
||||||
|
+
|
||||||
|
+ tcon_tv_out_tcon_top: endpoint@1 {
|
||||||
|
+ reg = <1>;
|
||||||
|
+ remote-endpoint = <&tcon_top_hdmi_in_tcon_tv>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ addr_mgt: addr-mgt {
|
||||||
|
+ compatible = "allwinner,sunxi-addr_mgt";
|
||||||
|
+ type_addr_wifi = <0x2>;
|
||||||
|
+ type_addr_bt = <0x2>;
|
||||||
|
+ type_addr_eth = <0x2>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ de: display-engine {
|
||||||
|
+ compatible = "allwinner,sun50i-h6-display-engine";
|
||||||
|
+ allwinner,pipelines = <&mixer0>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
-&ehci1 {
|
||||||
|
- status = "okay";
|
||||||
|
+&gpu {
|
||||||
|
+ mali-supply = <®_dcdc1>;
|
||||||
|
+ status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
-/* USB 2 & 3 are on the FPC connector (or the exansion board) */
|
||||||
|
+&sram_c {
|
||||||
|
+ de3_sram: sram-section@0 {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-sram-c",
|
||||||
|
+ "allwinner,sun50i-a64-sram-c";
|
||||||
|
+ reg = <0x0000 0x1e000>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
|
||||||
|
&mmc0 {
|
||||||
|
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
|
||||||
|
bus-width = <4>;
|
||||||
|
+ vmmc-supply = <®_dldo1>;
|
||||||
|
+ max-frequency = <50000000>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&mmc1 {
|
||||||
|
vmmc-supply = <®_vcc3v3>;
|
||||||
|
+ vqmmc-supply = <®_vcc_wifi_io>;
|
||||||
|
+ mmc-pwrseq = <&wifi_pwrseq>;
|
||||||
|
+ bus-width = <4>;
|
||||||
|
+ non-removable;
|
||||||
|
+ mmc-ddr-1_8v;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
-&ohci1 {
|
||||||
|
+&emac0 {
|
||||||
|
+ status = "disabled";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&emac1 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&rmii_pins>;
|
||||||
|
+ phy-mode = "rmii";
|
||||||
|
+ phy-handle = <&rmii_phy>;
|
||||||
|
+ phy-supply = <®_dldo1>;
|
||||||
|
+ allwinner,rx-delay-ps = <3100>;
|
||||||
|
+ allwinner,tx-delay-ps = <700>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
-&pio {
|
||||||
|
- vcc-pc-supply = <®_dldo1>;
|
||||||
|
- vcc-pf-supply = <®_dldo1>; /* internally via VCC-IO */
|
||||||
|
- vcc-pg-supply = <®_aldo1>;
|
||||||
|
- vcc-ph-supply = <®_dldo1>; /* internally via VCC-IO */
|
||||||
|
- vcc-pi-supply = <®_dldo1>;
|
||||||
|
+&mdio1 {
|
||||||
|
+ rmii_phy: ethernet-phy@1 {
|
||||||
|
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||||
|
+ reg = <1>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ehci0 {
|
||||||
|
+ status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
-&r_i2c {
|
||||||
|
+&ehci1 {
|
||||||
|
status = "okay";
|
||||||
|
+};
|
||||||
|
|
||||||
|
- axp313: pmic@36 {
|
||||||
|
- compatible = "x-powers,axp313a";
|
||||||
|
- reg = <0x36>;
|
||||||
|
- #interrupt-cells = <1>;
|
||||||
|
- interrupt-controller;
|
||||||
|
- interrupt-parent = <&pio>;
|
||||||
|
- interrupts = <2 9 IRQ_TYPE_LEVEL_LOW>; /* PC9 */
|
||||||
|
+&ehci2 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
|
||||||
|
- vin1-supply = <®_vcc5v>;
|
||||||
|
- vin2-supply = <®_vcc5v>;
|
||||||
|
- vin3-supply = <®_vcc5v>;
|
||||||
|
+&ehci3 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
|
||||||
|
- regulators {
|
||||||
|
- /* Supplies VCC-PLL and DRAM */
|
||||||
|
- reg_aldo1: aldo1 {
|
||||||
|
- regulator-always-on;
|
||||||
|
- regulator-min-microvolt = <1800000>;
|
||||||
|
- regulator-max-microvolt = <1800000>;
|
||||||
|
- regulator-name = "vcc1v8";
|
||||||
|
- };
|
||||||
|
+&ohci0 {
|
||||||
|
+ status = "disabled";
|
||||||
|
+};
|
||||||
|
|
||||||
|
- /* Supplies VCC-IO, so needs to be always on. */
|
||||||
|
- reg_dldo1: dldo1 {
|
||||||
|
- regulator-always-on;
|
||||||
|
- regulator-min-microvolt = <3300000>;
|
||||||
|
- regulator-max-microvolt = <3300000>;
|
||||||
|
- regulator-name = "vcc3v3";
|
||||||
|
- };
|
||||||
|
+&ohci1 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
|
||||||
|
- reg_dcdc1: dcdc1 {
|
||||||
|
- regulator-always-on;
|
||||||
|
- regulator-min-microvolt = <810000>;
|
||||||
|
- regulator-max-microvolt = <990000>;
|
||||||
|
- regulator-name = "vdd-gpu-sys";
|
||||||
|
- };
|
||||||
|
+&ohci2 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
|
||||||
|
- reg_dcdc2: dcdc2 {
|
||||||
|
- regulator-always-on;
|
||||||
|
- regulator-min-microvolt = <810000>;
|
||||||
|
- regulator-max-microvolt = <1100000>;
|
||||||
|
- regulator-name = "vdd-cpu";
|
||||||
|
- };
|
||||||
|
+&ohci3 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
|
||||||
|
- reg_dcdc3: dcdc3 {
|
||||||
|
- regulator-always-on;
|
||||||
|
- regulator-min-microvolt = <1100000>;
|
||||||
|
- regulator-max-microvolt = <1100000>;
|
||||||
|
- regulator-name = "vdd-dram";
|
||||||
|
- };
|
||||||
|
- };
|
||||||
|
- };
|
||||||
|
+&ir {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&ir_rx_pin>;
|
||||||
|
+ status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi0 {
|
||||||
|
@@ -153,12 +473,77 @@ flash@0 {
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
+&spi1 {
|
||||||
|
+ status = "disabled";
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&spi1_pins>, <&spi1_cs1_pin>;
|
||||||
|
+
|
||||||
|
+ spidev@1 {
|
||||||
|
+ compatible = "rohm,dh2228fv";
|
||||||
|
+ status = "disabled";
|
||||||
|
+ reg = <1>;
|
||||||
|
+ spi-max-frequency = <1000000>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&uart0 {
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&uart0_ph_pins>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
+&uart2 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart2_pi_pins>;
|
||||||
|
+ status = "disabled";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&uart3 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart3_pi_pins>;
|
||||||
|
+ status = "disabled";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&uart4 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart4_pi_pins>;
|
||||||
|
+ status = "disabled";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&uart5 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart5_ph_pins>;
|
||||||
|
+ status = "disabled";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&i2c3 {
|
||||||
|
+ status = "okay";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&i2c3_pa_pins>;
|
||||||
|
+
|
||||||
|
+ ac200_x: mfd@10 {
|
||||||
|
+ compatible = "x-powers,ac200-sunxi";
|
||||||
|
+ reg = <0x10>;
|
||||||
|
+ clocks = <&ac200_pwm_clk>;
|
||||||
|
+ // ephy id
|
||||||
|
+ nvmem-cells = <&ephy_calibration>;
|
||||||
|
+ nvmem-cell-names = "calibration";
|
||||||
|
+
|
||||||
|
+ ac200_ephy: phy {
|
||||||
|
+ compatible = "x-powers,ac200-ephy-sunxi";
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&i2c4 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&i2c4_ph_pins>;
|
||||||
|
+ status = "disabled";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&usbotg {
|
||||||
|
/*
|
||||||
|
* PHY0 pins are connected to a USB-C socket, but a role switch
|
||||||
|
@@ -179,3 +564,128 @@ &usbphy {
|
||||||
|
usb1_vbus-supply = <®_vcc5v>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+&cpu0 {
|
||||||
|
+ cpu-supply = <®_dcdc2>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&sid {
|
||||||
|
+ ephy_calibration: ephy-calibration@2c {
|
||||||
|
+ reg = <0x2c 0x2>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cpu_critical {
|
||||||
|
+ temperature = <100000>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&gpu_temp_critical {
|
||||||
|
+ temperature = <100000>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ve_temp_critical {
|
||||||
|
+ temperature = <100000>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ddr_temp_critical {
|
||||||
|
+ temperature = <100000>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&pio {
|
||||||
|
+ vcc-pc-supply = <®_dldo1>;
|
||||||
|
+ vcc-pf-supply = <®_dldo1>;
|
||||||
|
+ vcc-pg-supply = <®_aldo1>;
|
||||||
|
+ vcc-ph-supply = <®_dldo1>;
|
||||||
|
+ vcc-pi-supply = <®_dldo1>;
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ i2c0_pi_pins: i2c0-pi-pins {
|
||||||
|
+ pins = "PI5", "PI6";
|
||||||
|
+ function = "i2c0";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ i2c1_pi_pins: i2c1-pi-pins {
|
||||||
|
+ pins = "PI7", "PI8";
|
||||||
|
+ function = "i2c1";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ i2c2_pi_pins: i2c2-pi-pins {
|
||||||
|
+ pins = "PI9", "PI10";
|
||||||
|
+ function = "i2c2";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ i2c3_pa_pins: i2c3-pa-pins {
|
||||||
|
+ pins = "PA10", "PA11";
|
||||||
|
+ function = "i2c3";
|
||||||
|
+ bias-pull-up;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ i2c4_ph_pins: i2c4-ph-pins {
|
||||||
|
+ pins = "PH6", "PH7";
|
||||||
|
+ function = "i2c4";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ uart2_pi_pins: uart2-pi-pins {
|
||||||
|
+ pins = "PI5", "PI6";
|
||||||
|
+ function = "uart2";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ uart3_pi_pins: uart3-pi-pins {
|
||||||
|
+ pins = "PI9", "PI10";
|
||||||
|
+ function = "uart3";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ uart4_pi_pins: uart4-pi-pins {
|
||||||
|
+ pins = "PI13", "PI14";
|
||||||
|
+ function = "uart4";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ uart5_ph_pins: uart5-ph-pins {
|
||||||
|
+ pins = "PH2", "PH3";
|
||||||
|
+ function = "uart5";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ spi1_cs1_pin: spi1-cs1-pin {
|
||||||
|
+ pins = "PH9";
|
||||||
|
+ function = "spi1";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ pwm1_ph_pin: pwm1-ph-pin {
|
||||||
|
+ pins = "PH3";
|
||||||
|
+ function = "pwm1";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ pwm2_ph_pin: pwm2-ph-pin {
|
||||||
|
+ pins = "PH2";
|
||||||
|
+ function = "pwm2";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ pwm3_ph_pin: pwm3-ph-pin {
|
||||||
|
+ pins = "PH0";
|
||||||
|
+ function = "pwm3";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ pwm4_ph_pin: pwm4-ph-pin {
|
||||||
|
+ pins = "PH1";
|
||||||
|
+ function = "pwm4";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ pwm5_pin: pwm5-pin {
|
||||||
|
+ pins = "PA12";
|
||||||
|
+ function = "pwm5";
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Gunjan Gupta <viraniac@gmail.com>
|
||||||
|
Date: Thu, 28 Dec 2023 15:01:03 +0000
|
||||||
|
Subject: arm64:dts: sun50i-h618-orangepi-zero3 Enable GPU mali
|
||||||
|
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
|
||||||
|
@@ -28,6 +28,11 @@ &ext_rgmii_phy {
|
||||||
|
motorcomm,clk-out-frequency-hz = <125000000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
+&gpu {
|
||||||
|
+ mali-supply = <®_dcdc1>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&mmc0 {
|
||||||
|
/*
|
||||||
|
* The schematic shows the card detect pin wired up to PF6, via an
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: The-going <48602507+The-going@users.noreply.github.com>
|
||||||
|
Date: Sat, 8 Feb 2025 12:37:21 +0300
|
||||||
|
Subject: arm64: sun50i-h616: Add i2c(2,3,4), uart(2,5) pins
|
||||||
|
|
||||||
|
Add a description of the pins for further use
|
||||||
|
in device trees and overlays.
|
||||||
|
|
||||||
|
link to:
|
||||||
|
drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 61 ++++++++++
|
||||||
|
1 file changed, 61 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
@@ -371,11 +371,42 @@ i2c0_pins: i2c0-pins {
|
||||||
|
function = "i2c0";
|
||||||
|
};
|
||||||
|
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ i2c2_ph_pins: i2c2-ph-pins {
|
||||||
|
+ pins = "PH2", "PH3";
|
||||||
|
+ function = "i2c2";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ i2c2_pi_pins: i2c2-pi-pins {
|
||||||
|
+ pins = "PI9", "PI10";
|
||||||
|
+ function = "i2c2";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ i2c3_pg_pins: i2c3-pg-pins {
|
||||||
|
+ pins = "PG17", "PG18";
|
||||||
|
+ function = "i2c3";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
i2c3_ph_pins: i2c3-ph-pins {
|
||||||
|
pins = "PH4", "PH5";
|
||||||
|
function = "i2c3";
|
||||||
|
};
|
||||||
|
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ i2c4_pg_pins: i2c4-pg-pins {
|
||||||
|
+ pins = "PG15", "PG16";
|
||||||
|
+ function = "i2c4";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ i2c4_ph_pins: i2c4-ph-pins {
|
||||||
|
+ pins = "PH6", "PH7";
|
||||||
|
+ function = "i2c4";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
ir_rx_pin: ir-rx-pin {
|
||||||
|
pins = "PH10";
|
||||||
|
function = "ir_rx";
|
||||||
|
@@ -453,6 +484,36 @@ uart1_rts_cts_pins: uart1-rts-cts-pins {
|
||||||
|
function = "uart1";
|
||||||
|
};
|
||||||
|
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ uart2_pg_pins: uart2-pg-pins {
|
||||||
|
+ pins = "PG15", "PG16";
|
||||||
|
+ function = "uart2";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ uart2_pg_rts_cts_pins: uart2-pg-rts-cts-pins {
|
||||||
|
+ pins = "PG17", "PG18";
|
||||||
|
+ function = "uart2";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ uart2_ph_pins: uart2-ph-pins {
|
||||||
|
+ pins = "PH5", "PH6";
|
||||||
|
+ function = "uart2";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ uart2_ph_rts_cts_pins: uart2-ph-rts-cts-pins {
|
||||||
|
+ pins = "PH7", "PH8";
|
||||||
|
+ function = "uart2";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ uart5_pins: uart5-pins {
|
||||||
|
+ pins = "PH2", "PH3";
|
||||||
|
+ function = "uart5";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
/omit-if-no-ref/
|
||||||
|
x32clk_fanout_pin: x32clk-fanout-pin {
|
||||||
|
pins = "PG10";
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,41 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kali Prasad <kprasadvnsi@protonmail.com>
|
||||||
|
Date: Sun, 19 Sep 2021 08:02:27 +0000
|
||||||
|
Subject: drv:nvmem:sunxi_sid: Support SID on H616
|
||||||
|
|
||||||
|
Add support for H616's SID controller. It supports 4K-bit
|
||||||
|
EFUSE.
|
||||||
|
|
||||||
|
Signed-off-by: Kali Prasad <kprasadvnsi@protonmail.com>
|
||||||
|
---
|
||||||
|
drivers/nvmem/sunxi_sid.c | 7 +++++++
|
||||||
|
1 file changed, 7 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/drivers/nvmem/sunxi_sid.c
|
||||||
|
+++ b/drivers/nvmem/sunxi_sid.c
|
||||||
|
@@ -205,6 +205,12 @@ static const struct sunxi_sid_cfg sun50i_h6_cfg = {
|
||||||
|
.size = 0x200,
|
||||||
|
};
|
||||||
|
|
||||||
|
+static const struct sunxi_sid_cfg sun50i_h616_cfg = {
|
||||||
|
+ .value_offset = 0x200,
|
||||||
|
+ .size = 0x100,
|
||||||
|
+ .need_register_readout = true,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
static const struct of_device_id sunxi_sid_of_match[] = {
|
||||||
|
{ .compatible = "allwinner,sun4i-a10-sid", .data = &sun4i_a10_cfg },
|
||||||
|
{ .compatible = "allwinner,sun7i-a20-sid", .data = &sun7i_a20_cfg },
|
||||||
|
@@ -214,6 +220,7 @@ static const struct of_device_id sunxi_sid_of_match[] = {
|
||||||
|
{ .compatible = "allwinner,sun50i-a64-sid", .data = &sun50i_a64_cfg },
|
||||||
|
{ .compatible = "allwinner,sun50i-h5-sid", .data = &sun50i_a64_cfg },
|
||||||
|
{ .compatible = "allwinner,sun50i-h6-sid", .data = &sun50i_h6_cfg },
|
||||||
|
+ { .compatible = "allwinner,sun50i-h616-sid", .data = &sun50i_h616_cfg },
|
||||||
|
{/* sentinel */},
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(of, sunxi_sid_of_match);
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: The-going <48602507+The-going@users.noreply.github.com>
|
||||||
|
Date: Sat, 16 Apr 2022 11:19:05 +0300
|
||||||
|
Subject: nvmem: sunxi_sid: add sunxi_get_soc_chipid, sunxi_get_serial
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/nvmem/sunxi_sid.c | 28 ++++++++++
|
||||||
|
1 file changed, 28 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/drivers/nvmem/sunxi_sid.c
|
||||||
|
+++ b/drivers/nvmem/sunxi_sid.c
|
||||||
|
@@ -36,6 +36,25 @@ struct sunxi_sid {
|
||||||
|
u32 value_offset;
|
||||||
|
};
|
||||||
|
|
||||||
|
+static unsigned int sunxi_soc_chipid[4];
|
||||||
|
+static unsigned int sunxi_serial[4];
|
||||||
|
+
|
||||||
|
+int sunxi_get_soc_chipid(unsigned char *chipid)
|
||||||
|
+{
|
||||||
|
+ memcpy(chipid, sunxi_soc_chipid, 16);
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+EXPORT_SYMBOL(sunxi_get_soc_chipid);
|
||||||
|
+
|
||||||
|
+int sunxi_get_serial(unsigned char *serial)
|
||||||
|
+{
|
||||||
|
+ memcpy(serial, sunxi_serial, 16);
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+EXPORT_SYMBOL(sunxi_get_serial);
|
||||||
|
+
|
||||||
|
static int sunxi_sid_read(void *context, unsigned int offset,
|
||||||
|
void *val, size_t bytes)
|
||||||
|
{
|
||||||
|
@@ -178,6 +197,15 @@ static int sunxi_sid_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
|
platform_set_drvdata(pdev, nvmem);
|
||||||
|
|
||||||
|
+ nvmem_cfg->reg_read(sid, 0, &sunxi_soc_chipid[0], sizeof(int));
|
||||||
|
+ nvmem_cfg->reg_read(sid, 4, &sunxi_soc_chipid[1], sizeof(int));
|
||||||
|
+ nvmem_cfg->reg_read(sid, 8, &sunxi_soc_chipid[2], sizeof(int));
|
||||||
|
+ nvmem_cfg->reg_read(sid, 12, &sunxi_soc_chipid[3], sizeof(int));
|
||||||
|
+
|
||||||
|
+ sunxi_serial[0] = sunxi_soc_chipid[3];
|
||||||
|
+ sunxi_serial[1] = sunxi_soc_chipid[2];
|
||||||
|
+ sunxi_serial[2] = (sunxi_soc_chipid[1] >> 16) & 0x0ffff;
|
||||||
|
+
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: The-going <48602507+The-going@users.noreply.github.com>
|
||||||
|
Date: Wed, 28 May 2025 16:09:13 +0300
|
||||||
|
Subject: sun50i-h616: Add the missing digital audio nodes
|
||||||
|
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 93 ++++++++++
|
||||||
|
1 file changed, 93 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
@@ -419,6 +419,18 @@ i2c4_ph_pins: i2c4-ph-pins {
|
||||||
|
function = "i2c4";
|
||||||
|
};
|
||||||
|
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ i2s2_pins: i2s2-pins {
|
||||||
|
+ pins = "PG10", "PG11", "PG12", "PG13", "PG14";
|
||||||
|
+ function = "i2s2";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /omit-if-no-ref/
|
||||||
|
+ i2s3_pins: i2s3-pins {
|
||||||
|
+ pins = "PH5", "PH6", "PH7", "PH8", "PH9";
|
||||||
|
+ function = "i2s3";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
ir_rx_pin: ir-rx-pin {
|
||||||
|
pins = "PH10";
|
||||||
|
function = "ir_rx";
|
||||||
|
@@ -1003,6 +1015,17 @@ ahub_dam_plat:ahub_dam_plat@5097000 {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
+ ahub_dam_mach:ahub_dam_mach {
|
||||||
|
+ compatible = "allwinner,sunxi-snd-mach";
|
||||||
|
+ soundcard-mach,name = "ahubdam";
|
||||||
|
+ status = "disabled";
|
||||||
|
+ soundcard-mach,cpu {
|
||||||
|
+ sound-dai = <&ahub_dam_plat>;
|
||||||
|
+ };
|
||||||
|
+ soundcard-mach,codec {
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
ahub1_plat:ahub1_plat {
|
||||||
|
#sound-dai-cells = <0>;
|
||||||
|
compatible = "allwinner,sunxi-snd-plat-ahub";
|
||||||
|
@@ -1043,6 +1066,76 @@ ahub1_codec: soundcard-mach,codec {
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
+ ahub_i2s1: ahub-i2s1@5097000 {
|
||||||
|
+ #sound-dai-cells = <0>;
|
||||||
|
+ compatible = "allwinner,sunxi-ahub-daudio";
|
||||||
|
+ reg = <0x5097000 0xadf>;
|
||||||
|
+ clocks = <&ccu CLK_BUS_AUDIO_HUB>,
|
||||||
|
+ <&ccu CLK_AUDIO_CODEC_1X>,
|
||||||
|
+ <&ccu CLK_AUDIO_CODEC_4X>,
|
||||||
|
+ <&ccu CLK_AUDIO_HUB>;
|
||||||
|
+ clock-names = "apb", "audio-codec-1x", "audio-codec-4x", "audio-hub";
|
||||||
|
+ tdm_num = <0x1>;
|
||||||
|
+ pinconfig = <0x0>;
|
||||||
|
+ frametype = <0x0>;
|
||||||
|
+ pcm_lrck_period = <0x20>;
|
||||||
|
+ slot_width_select = <0x20>;
|
||||||
|
+ daudio_master = <0x4>;
|
||||||
|
+ audio_format = <0x1>;
|
||||||
|
+ signal_inversion = <0x1>;
|
||||||
|
+ tdm_config = <0x1>;
|
||||||
|
+ mclk_div = <0x1>;
|
||||||
|
+ status = "disabled";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ ahub_i2s2: ahub-i2s2@5097000 {
|
||||||
|
+ //#sound-dai-cells = <0>;
|
||||||
|
+ compatible = "allwinner,sunxi-ahub-daudio";
|
||||||
|
+ reg = <0x5097000 0xadf>;
|
||||||
|
+ clocks = <&ccu CLK_BUS_AUDIO_HUB>,
|
||||||
|
+ <&ccu CLK_AUDIO_CODEC_1X>,
|
||||||
|
+ <&ccu CLK_AUDIO_CODEC_4X>,
|
||||||
|
+ <&ccu CLK_AUDIO_HUB>;
|
||||||
|
+ clock-names = "apb", "audio-codec-1x", "audio-codec-4x", "audio-hub";
|
||||||
|
+ //pinctrl-names = "default";
|
||||||
|
+ //pinctrl-0 = <&i2s2_pins>;
|
||||||
|
+ tdm_num = <0x2>;
|
||||||
|
+ pinconfig = <0x1>;
|
||||||
|
+ frametype = <0x0>;
|
||||||
|
+ pcm_lrck_period = <0x20>;
|
||||||
|
+ slot_width_select = <0x20>;
|
||||||
|
+ daudio_master = <0x4>;
|
||||||
|
+ audio_format = <0x1>;
|
||||||
|
+ signal_inversion = <0x1>;
|
||||||
|
+ tdm_config = <0x1>;
|
||||||
|
+ mclk_div = <0x4>;
|
||||||
|
+ status = "disabled";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ ahub_i2s3: ahub-i2s3@5097000 {
|
||||||
|
+ //#sound-dai-cells = <0>;
|
||||||
|
+ compatible = "allwinner,sunxi-ahub-daudio";
|
||||||
|
+ reg = <0x5097000 0xadf>;
|
||||||
|
+ clocks = <&ccu CLK_BUS_AUDIO_HUB>,
|
||||||
|
+ <&ccu CLK_AUDIO_CODEC_1X>,
|
||||||
|
+ <&ccu CLK_AUDIO_CODEC_4X>,
|
||||||
|
+ <&ccu CLK_AUDIO_HUB>;
|
||||||
|
+ clock-names = "apb", "audio-codec-1x", "audio-codec-4x", "audio-hub";
|
||||||
|
+ //pinctrl-names = "default";
|
||||||
|
+ //pinctrl-0 = <&i2s3_pins>;
|
||||||
|
+ tdm_num = <0x3>;
|
||||||
|
+ pinconfig = <0x1>;
|
||||||
|
+ frametype = <0x0>;
|
||||||
|
+ pcm_lrck_period = <0x20>;
|
||||||
|
+ slot_width_select = <0x20>;
|
||||||
|
+ daudio_master = <0x4>;
|
||||||
|
+ audio_format = <0x1>;
|
||||||
|
+ signal_inversion = <0x1>;
|
||||||
|
+ tdm_config = <0x1>;
|
||||||
|
+ mclk_div = <0x4>;
|
||||||
|
+ status = "disabled";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
usbotg: usb@5100000 {
|
||||||
|
compatible = "allwinner,sun50i-h616-musb",
|
||||||
|
"allwinner,sun8i-h3-musb";
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,47 @@
|
|||||||
|
From 9a649d7ad384907ba8f62ba50a6fd7e524d8ce25 Mon Sep 17 00:00:00 2001
|
||||||
|
From: root <Gunjan Gupta>
|
||||||
|
Date: Sun, 17 Sep 2023 20:45:44 +0000
|
||||||
|
Subject: [PATCH] drivers: uwe5622: fix compilation on 6.3+ kernels
|
||||||
|
|
||||||
|
---
|
||||||
|
.../wireless/uwe5622/unisocwcn/platform/wcn_boot.c | 11 +++--------
|
||||||
|
1 file changed, 3 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_boot.c b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_boot.c
|
||||||
|
index 220bac67ddd0..b243b39c2133 100644
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_boot.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_boot.c
|
||||||
|
@@ -1371,15 +1371,13 @@ static int marlin_registsr_bt_wake(struct device *dev)
|
||||||
|
{
|
||||||
|
struct device_node *np;
|
||||||
|
int bt_wake_host_gpio, ret = 0;
|
||||||
|
- struct gpio_config config;
|
||||||
|
|
||||||
|
np = of_find_compatible_node(NULL, NULL, "allwinner,sunxi-btlpm");
|
||||||
|
if (!np) {
|
||||||
|
WCN_ERR("dts node for bt_wake not found");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
- bt_wake_host_gpio = of_get_named_gpio_flags(np, "bt_hostwake", 0,
|
||||||
|
- (enum of_gpio_flags *)&config);
|
||||||
|
+ bt_wake_host_gpio = of_get_named_gpio(np, "bt_hostwake", 0);
|
||||||
|
if (!gpio_is_valid(bt_wake_host_gpio)) {
|
||||||
|
WCN_ERR("bt_hostwake irq is invalid: %d\n",
|
||||||
|
bt_wake_host_gpio);
|
||||||
|
@@ -1403,11 +1401,8 @@ static int marlin_registsr_bt_wake(struct device *dev)
|
||||||
|
|
||||||
|
marlin_dev->bt_wake_host_int_num = gpio_to_irq(bt_wake_host_gpio);
|
||||||
|
|
||||||
|
- WCN_INFO("%s bt_hostwake gpio=%d mul-sel=%d pull=%d "
|
||||||
|
- "drv_level=%d data=%d intnum=%d\n",
|
||||||
|
- __func__, config.gpio, config.mul_sel, config.pull,
|
||||||
|
- config.drv_level, config.data,
|
||||||
|
- marlin_dev->bt_wake_host_int_num);
|
||||||
|
+ WCN_INFO("%s bt_hostwake gpio=%d intnum=%d\n", __func__,
|
||||||
|
+ bt_wake_host_gpio, marlin_dev->bt_wake_host_int_num);
|
||||||
|
|
||||||
|
ret = device_init_wakeup(dev, true);
|
||||||
|
if (ret < 0) {
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
From 9211a92d07e9a43fce104f87f9d45e890257b699 Mon Sep 17 00:00:00 2001
|
||||||
|
From: pbiel <pbiel7@gmail.com>
|
||||||
|
Date: Tue, 7 Mar 2023 20:28:44 +0100
|
||||||
|
Subject: [PATCH] wireless: fix setting mac address for netdev in uwe5622
|
||||||
|
unisocwifi driver
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/net/wireless/uwe5622/unisocwifi/main.c | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/main.c b/drivers/net/wireless/uwe5622/unisocwifi/main.c
|
||||||
|
index 21efdf4e0..566a9a7f3 100644
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwifi/main.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwifi/main.c
|
||||||
|
@@ -1356,6 +1356,7 @@ static struct sprdwl_vif *sprdwl_register_netdev(struct sprdwl_priv *priv,
|
||||||
|
struct wireless_dev *wdev;
|
||||||
|
struct sprdwl_vif *vif;
|
||||||
|
int ret;
|
||||||
|
+ u8 target_mac_addr[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||||
|
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0))
|
||||||
|
ndev = alloc_netdev(sizeof(*vif), name, NET_NAME_UNKNOWN, ether_setup);
|
||||||
|
@@ -1411,7 +1412,8 @@ static struct sprdwl_vif *sprdwl_register_netdev(struct sprdwl_priv *priv,
|
||||||
|
ndev->features |= NETIF_F_SG;
|
||||||
|
SET_NETDEV_DEV(ndev, wiphy_dev(priv->wiphy));
|
||||||
|
|
||||||
|
- sprdwl_set_mac_addr(vif, addr, ndev->dev_addr);
|
||||||
|
+ sprdwl_set_mac_addr(vif, addr, target_mac_addr);
|
||||||
|
+ dev_addr_set(ndev, target_mac_addr);
|
||||||
|
|
||||||
|
#ifdef CONFIG_P2P_INTF
|
||||||
|
if (type == NL80211_IFTYPE_P2P_DEVICE)
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
@@ -0,0 +1,279 @@
|
|||||||
|
From a772f7d12293e197edb51abc08c57bc80d10b597 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paolo Sabatino <paolo.sabatino@gmail.com>
|
||||||
|
Date: Thu, 26 Dec 2024 15:47:04 +0100
|
||||||
|
Subject: [PATCH] use DECLARE_FLEX_ARRAY() macro to avoid spanning-write
|
||||||
|
warning
|
||||||
|
|
||||||
|
---
|
||||||
|
.../net/wireless/uwe5622/unisocwifi/cmdevt.c | 4 +--
|
||||||
|
.../net/wireless/uwe5622/unisocwifi/cmdevt.h | 34 +++++++++----------
|
||||||
|
.../wireless/uwe5622/unisocwifi/edma_test.c | 2 +-
|
||||||
|
drivers/net/wireless/uwe5622/unisocwifi/msg.h | 4 +--
|
||||||
|
drivers/net/wireless/uwe5622/unisocwifi/nan.h | 2 +-
|
||||||
|
drivers/net/wireless/uwe5622/unisocwifi/rtt.c | 2 +-
|
||||||
|
.../net/wireless/uwe5622/unisocwifi/sprdwl.h | 2 +-
|
||||||
|
.../net/wireless/uwe5622/unisocwifi/work.h | 2 +-
|
||||||
|
8 files changed, 26 insertions(+), 26 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/cmdevt.c b/drivers/net/wireless/uwe5622/unisocwifi/cmdevt.c
|
||||||
|
index dfe03b0636da..093878c82fb5 100755
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwifi/cmdevt.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwifi/cmdevt.c
|
||||||
|
@@ -1323,7 +1323,7 @@ int sprdwl_scan(struct sprdwl_priv *priv, u8 vif_ctx_id,
|
||||||
|
|
||||||
|
struct sprdwl_5g_chn {
|
||||||
|
u16 n_5g_chn;
|
||||||
|
- u16 chns[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u16, chns);
|
||||||
|
} *ext_5g;
|
||||||
|
|
||||||
|
chns_len_5g = chn_count_5g * sizeof(*chns_5g);
|
||||||
|
@@ -3561,7 +3561,7 @@ int sprdwl_set_wowlan(struct sprdwl_priv *priv, int subcmd, void *pad, int pad_l
|
||||||
|
struct wowlan_cmd {
|
||||||
|
u8 sub_cmd_id;
|
||||||
|
u8 pad_len;
|
||||||
|
- char pad[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, pad);
|
||||||
|
} *cmd;
|
||||||
|
|
||||||
|
if (priv == NULL)
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/cmdevt.h b/drivers/net/wireless/uwe5622/unisocwifi/cmdevt.h
|
||||||
|
index ce8c774e8968..9f7a61fa3587 100644
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwifi/cmdevt.h
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwifi/cmdevt.h
|
||||||
|
@@ -372,7 +372,7 @@ struct sprdwl_cmd_add_key {
|
||||||
|
u8 keyseq[16];
|
||||||
|
u8 cypher_type;
|
||||||
|
u8 key_len;
|
||||||
|
- u8 value[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, value);
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
struct sprdwl_cmd_del_key {
|
||||||
|
@@ -402,13 +402,13 @@ struct sprdwl_cmd_set_ie {
|
||||||
|
#define SPRDWL_IE_BEACON_TAIL 6
|
||||||
|
u8 type;
|
||||||
|
__le16 len;
|
||||||
|
- u8 data[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, data);
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
/* WIFI_CMD_START_AP */
|
||||||
|
struct sprdwl_cmd_start_ap {
|
||||||
|
__le16 len;
|
||||||
|
- u8 value[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, value);
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
/* WIFI_CMD_DEL_STATION */
|
||||||
|
@@ -454,7 +454,7 @@ struct sprdwl_cmd_scan {
|
||||||
|
__le32 channels; /* One bit for one channel */
|
||||||
|
__le32 reserved;
|
||||||
|
u16 ssid_len;
|
||||||
|
- u8 ssid[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, ssid);
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
/* WIFI_CMD_SCHED_SCAN */
|
||||||
|
@@ -549,7 +549,7 @@ struct sprdwl_cmd_mgmt_tx {
|
||||||
|
__le32 wait; /* wait time */
|
||||||
|
__le64 cookie; /* cookie */
|
||||||
|
__le16 len; /* mac length */
|
||||||
|
- u8 value[0]; /* mac */
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, value); /* mac */
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
/* WIFI_CMD_REGISTER_FRAME */
|
||||||
|
@@ -574,7 +574,7 @@ struct sprdwl_cmd_cqm_rssi {
|
||||||
|
struct sprdwl_cmd_roam_offload_data {
|
||||||
|
u8 type;
|
||||||
|
u8 len;
|
||||||
|
- u8 value[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, value);
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
struct sprdwl_cmd_tdls_mgmt {
|
||||||
|
@@ -604,7 +604,7 @@ struct sprdwl_cmd_tdls_mgmt {
|
||||||
|
} __packed discover_resp;
|
||||||
|
} u;
|
||||||
|
__le32 len;
|
||||||
|
- u8 frame[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, frame);
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
struct sprdwl_cmd_tdls {
|
||||||
|
@@ -613,13 +613,13 @@ struct sprdwl_cmd_tdls {
|
||||||
|
u8 initiator;
|
||||||
|
u8 rsvd;
|
||||||
|
u8 paylen;
|
||||||
|
- u8 payload[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, payload);
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
struct sprdwl_cmd_blacklist {
|
||||||
|
u8 sub_type;
|
||||||
|
u8 num;
|
||||||
|
- u8 mac[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, mac);
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
struct sprdwl_cmd_tdls_channel_switch {
|
||||||
|
@@ -631,7 +631,7 @@ struct sprdwl_cmd_tdls_channel_switch {
|
||||||
|
struct sprdwl_cmd_set_mac_addr {
|
||||||
|
u8 sub_type;
|
||||||
|
u8 num;
|
||||||
|
- u8 mac[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, mac);
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
struct sprdwl_cmd_rsp_state_code {
|
||||||
|
@@ -644,7 +644,7 @@ struct sprdwl_cmd_11v {
|
||||||
|
u16 len;
|
||||||
|
union {
|
||||||
|
u32 value;
|
||||||
|
- u8 buf[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, buf);
|
||||||
|
};
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
@@ -714,7 +714,7 @@ struct sprdwl_event_mgmt_frame {
|
||||||
|
u8 reserved;
|
||||||
|
u8 bssid[ETH_ALEN]; /* roaming frame */
|
||||||
|
__le16 len;
|
||||||
|
- u8 data[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, data);
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
/* WIFI_EVENT_SCAN_COMP */
|
||||||
|
@@ -737,7 +737,7 @@ struct sprdwl_event_mgmt_tx_status {
|
||||||
|
__le64 cookie; /* cookie */
|
||||||
|
u8 ack; /* status */
|
||||||
|
__le16 len; /* frame len */
|
||||||
|
- u8 buf[0]; /* mgmt frame */
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, buf); /* mgmt frame */
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
/* WIFI_EVENT_NEW_STATION */
|
||||||
|
@@ -745,7 +745,7 @@ struct sprdwl_event_new_station {
|
||||||
|
u8 is_connect;
|
||||||
|
u8 mac[ETH_ALEN];
|
||||||
|
__le16 ie_len;
|
||||||
|
- u8 ie[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, ie);
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
/* WIFI_EVENT_MIC_FAIL */
|
||||||
|
@@ -772,7 +772,7 @@ struct sprdwl_event_tdls {
|
||||||
|
struct sprd_cmd_gscan_header {
|
||||||
|
u16 subcmd;
|
||||||
|
u16 data_len;
|
||||||
|
- u8 data[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, data);
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
struct sprdwl_llc_hdr {
|
||||||
|
@@ -898,7 +898,7 @@ struct sprdwl_priv;
|
||||||
|
struct sprdwl_tlv_data {
|
||||||
|
u16 type;
|
||||||
|
u16 len;
|
||||||
|
- u8 data[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, data);
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
/* TLV rbuf size */
|
||||||
|
@@ -938,7 +938,7 @@ struct sprdwl_cmd_packet_offload {
|
||||||
|
u8 enable;
|
||||||
|
u32 period;
|
||||||
|
u16 len;
|
||||||
|
- u8 data[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, data);
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
int sprdwl_cmd_rsp(struct sprdwl_priv *priv, u8 *msg);
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/edma_test.c b/drivers/net/wireless/uwe5622/unisocwifi/edma_test.c
|
||||||
|
index f45bc8043f9c..59e1a1eb70db 100644
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwifi/edma_test.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwifi/edma_test.c
|
||||||
|
@@ -35,7 +35,7 @@ static unsigned int chn_tx_fail[8];
|
||||||
|
struct edma_test_cmd_header {
|
||||||
|
u16 subcmd;
|
||||||
|
u16 len;
|
||||||
|
- u8 data[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, data);
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
struct task_struct *task_array[PCIE_CHANNEL_PAIR];
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/msg.h b/drivers/net/wireless/uwe5622/unisocwifi/msg.h
|
||||||
|
index dd57521ae708..ed2416b91db4 100755
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwifi/msg.h
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwifi/msg.h
|
||||||
|
@@ -94,12 +94,12 @@ struct sprdwl_cmd_hdr {
|
||||||
|
s8 status;
|
||||||
|
u8 rsp_cnt;
|
||||||
|
u8 reserv[2];
|
||||||
|
- u8 paydata[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, paydata);
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
struct sprdwl_addr_hdr {
|
||||||
|
struct sprdwl_common_hdr common;
|
||||||
|
- u8 paydata[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, paydata);
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
#define SPRDWL_GET_CMD_PAYDATA(msg) \
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/nan.h b/drivers/net/wireless/uwe5622/unisocwifi/nan.h
|
||||||
|
index fd6d980b4d78..4ba67060245f 100644
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwifi/nan.h
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwifi/nan.h
|
||||||
|
@@ -291,7 +291,7 @@ struct nan_capa {
|
||||||
|
|
||||||
|
struct nan_cmd_header {
|
||||||
|
u16 data_len;
|
||||||
|
- u8 data[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, data);
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
/* cmd handler*/
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/rtt.c b/drivers/net/wireless/uwe5622/unisocwifi/rtt.c
|
||||||
|
index 9f0e9f2d3dd0..15410fbfc4e5 100644
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwifi/rtt.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwifi/rtt.c
|
||||||
|
@@ -151,7 +151,7 @@ struct ftm_session_start {
|
||||||
|
struct sprdwl_cmd_rtt {
|
||||||
|
u8 sub_cmd;
|
||||||
|
__le16 len;
|
||||||
|
- u8 data[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, data);
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
static const struct
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/sprdwl.h b/drivers/net/wireless/uwe5622/unisocwifi/sprdwl.h
|
||||||
|
index f612a9e9967b..bd411154556b 100755
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwifi/sprdwl.h
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwifi/sprdwl.h
|
||||||
|
@@ -75,7 +75,7 @@ struct sprdwl_mc_filter {
|
||||||
|
bool mc_change;
|
||||||
|
u8 subtype;
|
||||||
|
u8 mac_num;
|
||||||
|
- u8 mac_addr[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, mac_addr);
|
||||||
|
};
|
||||||
|
|
||||||
|
struct android_wifi_priv_cmd {
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/work.h b/drivers/net/wireless/uwe5622/unisocwifi/work.h
|
||||||
|
index 4e745903eedc..10647f1676dc 100644
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwifi/work.h
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwifi/work.h
|
||||||
|
@@ -50,7 +50,7 @@ struct sprdwl_work {
|
||||||
|
#define SPRDWL_WORK_VOWIFI_DATA_PROTECTION 18
|
||||||
|
u8 id;
|
||||||
|
u32 len;
|
||||||
|
- u8 data[0];
|
||||||
|
+ DECLARE_FLEX_ARRAY(u8, data);
|
||||||
|
};
|
||||||
|
|
||||||
|
struct sprdwl_reg_mgmt {
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
From 67b790ecbeab3f5493dc8306e87e503e1bb7bcdc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paolo Sabatino <paolo.sabatino@gmail.com>
|
||||||
|
Date: Sun, 29 Jan 2023 13:43:27 +0000
|
||||||
|
Subject: [PATCH] fix spreadtrum (sprd) bluetooth broken park link status
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/bluetooth/hci_ldisc.c | 6 ++++++
|
||||||
|
include/net/bluetooth/hci.h | 6 ++++++
|
||||||
|
net/bluetooth/hci_sync.c | 2 +-
|
||||||
|
3 files changed, 13 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
|
||||||
|
--- a/drivers/bluetooth/hci_ldisc.c (revision 58aa050aa57333b34b358234002121c59fb3af26)
|
||||||
|
+++ b/drivers/bluetooth/hci_ldisc.c (revision bf8ab2f58b21494ffde96979431a3da931deb48b)
|
||||||
|
@@ -658,6 +658,12 @@
|
||||||
|
hdev->setup = hci_uart_setup;
|
||||||
|
SET_HCIDEV_DEV(hdev, hu->tty->dev);
|
||||||
|
|
||||||
|
+ // Set the broken Park link status quirk, specific for spreadtrum (sprd)
|
||||||
|
+ // bluetooth devices
|
||||||
|
+ if (hdev->manufacturer == 0xffff && hu->tty->driver &&
|
||||||
|
+ strncmp(hu->tty->driver->name, "ttyBT", 5) == 0)
|
||||||
|
+ set_bit(HCI_QUIRK_BROKEN_PARK_LINK_STATUS, &hdev->quirks);
|
||||||
|
+
|
||||||
|
if (test_bit(HCI_UART_RAW_DEVICE, &hu->hdev_flags))
|
||||||
|
set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks);
|
||||||
|
|
||||||
|
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
|
||||||
|
--- a/include/net/bluetooth/hci.h (revision 58aa050aa57333b34b358234002121c59fb3af26)
|
||||||
|
+++ b/include/net/bluetooth/hci.h (revision bf8ab2f58b21494ffde96979431a3da931deb48b)
|
||||||
|
@@ -309,6 +309,12 @@
|
||||||
|
|
||||||
|
/* HCI device quirks */
|
||||||
|
enum {
|
||||||
|
+ /*
|
||||||
|
+ * Device declares that support Park link status, but it really
|
||||||
|
+ * does not support it and fails to initialize
|
||||||
|
+ */
|
||||||
|
+ HCI_QUIRK_BROKEN_PARK_LINK_STATUS,
|
||||||
|
+
|
||||||
|
/* When this quirk is set, the HCI Reset command is send when
|
||||||
|
* closing the transport instead of when opening it.
|
||||||
|
*
|
||||||
|
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
|
||||||
|
--- a/net/bluetooth/hci_sync.c (revision 58aa050aa57333b34b358234002121c59fb3af26)
|
||||||
|
+++ b/net/bluetooth/hci_sync.c (revision bf8ab2f58b21494ffde96979431a3da931deb48b)
|
||||||
|
@@ -3804,7 +3804,7 @@
|
||||||
|
link_policy |= HCI_LP_HOLD;
|
||||||
|
if (lmp_sniff_capable(hdev))
|
||||||
|
link_policy |= HCI_LP_SNIFF;
|
||||||
|
- if (lmp_park_capable(hdev))
|
||||||
|
+ if (lmp_park_capable(hdev) && !test_bit(HCI_QUIRK_BROKEN_PARK_LINK_STATUS, &hdev->quirks))
|
||||||
|
link_policy |= HCI_LP_PARK;
|
||||||
|
|
||||||
|
cp.policy = cpu_to_le16(link_policy);
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
From 7c0e3b529afd31f99baf78be10b5d71d9086789a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paolo Sabatino <paolo.sabatino@gmail.com>
|
||||||
|
Date: Sun, 29 Jan 2023 15:53:20 +0000
|
||||||
|
Subject: [PATCH] port uwe5622 driver to kernel 6.1
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c b/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c
|
||||||
|
index 294f19e1f6c..9dcdee02cb9 100755
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c
|
||||||
|
@@ -703,7 +703,7 @@ static int sprdwl_add_cipher_key(struct sprdwl_vif *vif, bool pairwise,
|
||||||
|
}
|
||||||
|
|
||||||
|
static int sprdwl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
|
- u8 key_index, bool pairwise,
|
||||||
|
+ int link_id, u8 key_index, bool pairwise,
|
||||||
|
const u8 *mac_addr,
|
||||||
|
struct key_params *params)
|
||||||
|
{
|
||||||
|
@@ -725,7 +725,7 @@ static int sprdwl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
|
}
|
||||||
|
|
||||||
|
static int sprdwl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
|
- u8 key_index, bool pairwise,
|
||||||
|
+ int link_id, u8 key_index, bool pairwise,
|
||||||
|
const u8 *mac_addr)
|
||||||
|
{
|
||||||
|
struct sprdwl_vif *vif = netdev_priv(ndev);
|
||||||
|
@@ -755,7 +755,7 @@ static int sprdwl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
|
|
||||||
|
static int sprdwl_cfg80211_set_default_key(struct wiphy *wiphy,
|
||||||
|
struct net_device *ndev,
|
||||||
|
- u8 key_index, bool unicast,
|
||||||
|
+ int link_id, u8 key_index, bool unicast,
|
||||||
|
bool multicast)
|
||||||
|
{
|
||||||
|
struct sprdwl_vif *vif = netdev_priv(ndev);
|
||||||
|
@@ -2383,7 +2383,7 @@ void sprdwl_report_connection(struct sprdwl_vif *vif,
|
||||||
|
conn_info->status == SPRDWL_ROAM_SUCCESS){
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
|
||||||
|
struct cfg80211_roam_info roam_info = {
|
||||||
|
- .bss = bss,
|
||||||
|
+ .links[0].bss = bss,
|
||||||
|
.req_ie = conn_info->req_ie,
|
||||||
|
.req_ie_len = conn_info->req_ie_len,
|
||||||
|
.resp_ie = conn_info->resp_ie,
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_parn_parser.c b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_parn_parser.c
|
||||||
|
index 0aa765ad839..20aea5e7366 100644
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_parn_parser.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_parn_parser.c
|
||||||
|
@@ -143,7 +143,7 @@ static int prefixcmp(const char *str, const char *prefix)
|
||||||
|
}
|
||||||
|
|
||||||
|
#if KERNEL_VERSION(3, 19, 0) <= LINUX_VERSION_CODE
|
||||||
|
-static int find_callback(struct dir_context *ctx, const char *name, int namlen,
|
||||||
|
+static bool find_callback(struct dir_context *ctx, const char *name, int namlen,
|
||||||
|
loff_t offset, u64 ino, unsigned int d_type)
|
||||||
|
#else
|
||||||
|
static int find_callback(void *ctx, const char *name, int namlen,
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/wl_core.c b/drivers/net/wireless/uwe5622/unisocwifi/wl_core.c
|
||||||
|
index 206824604ec5..b14a51a5af2f 100755
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwifi/wl_core.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwifi/wl_core.c
|
||||||
|
@@ -704,7 +704,7 @@ static int sprdwl_probe(struct platform_device *pdev)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static int sprdwl_remove(struct platform_device *pdev)
|
||||||
|
+static void sprdwl_remove(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
struct sprdwl_intf *intf = platform_get_drvdata(pdev);
|
||||||
|
struct sprdwl_priv *priv = intf->priv;
|
||||||
|
@@ -724,7 +724,7 @@ static int sprdwl_remove(struct platform_device *pdev)
|
||||||
|
stop_marlin(MARLIN_WIFI);
|
||||||
|
wl_info("%s\n", __func__);
|
||||||
|
|
||||||
|
- return 0;
|
||||||
|
+ return;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct of_device_id sprdwl_of_match[] = {
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_boot.c b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_boot.c
|
||||||
|
index 83b899e5e2de..472189b56ce3 100755
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_boot.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_boot.c
|
||||||
|
@@ -3862,7 +3862,7 @@ static int marlin_probe(struct platform_device *pdev)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static int marlin_remove(struct platform_device *pdev)
|
||||||
|
+static void marlin_remove(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
#if (defined(CONFIG_BT_WAKE_HOST_EN) && defined(CONFIG_AW_BOARD))
|
||||||
|
marlin_unregistsr_bt_wake();
|
||||||
|
@@ -3903,7 +3903,7 @@ static int marlin_remove(struct platform_device *pdev)
|
||||||
|
|
||||||
|
WCN_INFO("marlin_remove ok!\n");
|
||||||
|
|
||||||
|
- return 0;
|
||||||
|
+ return;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void marlin_shutdown(struct platform_device *pdev)
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/tty-sdio/tty.c b/drivers/net/wireless/uwe5622/tty-sdio/tty.c
|
||||||
|
index f6506d9632a5..79cef4a8d061 100644
|
||||||
|
--- a/drivers/net/wireless/uwe5622/tty-sdio/tty.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/tty-sdio/tty.c
|
||||||
|
@@ -781,7 +781,7 @@ static void mtty_shutdown(struct platform_device *pdev)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-static int mtty_remove(struct platform_device *pdev)
|
||||||
|
+static void mtty_remove(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
struct mtty_device *mtty = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
|
@@ -800,7 +800,7 @@ static int mtty_remove(struct platform_device *pdev)
|
||||||
|
//#endif
|
||||||
|
bluesleep_exit();
|
||||||
|
|
||||||
|
- return 0;
|
||||||
|
+ return;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct of_device_id mtty_match_table[] = {
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
From 5b43103009736d5efff606ca40a1a693ba8a04c2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paolo Sabatino <paolo.sabatino@gmail.com>
|
||||||
|
Date: Thu, 3 Aug 2023 10:09:46 +0200
|
||||||
|
Subject: [PATCH] fix driver for kernel 6.4
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_log.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_log.c b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_log.c
|
||||||
|
index 1a78b5b035a4..c68d86a20fe2 100644
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_log.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_log.c
|
||||||
|
@@ -260,7 +260,7 @@ int log_cdev_init(void)
|
||||||
|
struct wcnlog_dev *dev[WCN_LOG_MAX_MINOR] = {NULL};
|
||||||
|
|
||||||
|
WCN_DEBUG("log_cdev_init\n");
|
||||||
|
- wcnlog_class = class_create(THIS_MODULE, "slog_wcn");
|
||||||
|
+ wcnlog_class = class_create("slog_wcn");
|
||||||
|
if (IS_ERR(wcnlog_class))
|
||||||
|
return PTR_ERR(wcnlog_class);
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/tty-sdio/lpm.c b/drivers/net/wireless/uwe5622/tty-sdio/lpm.c
|
||||||
|
index 1570676ced50..79a6d60c94e8 100644
|
||||||
|
--- a/drivers/net/wireless/uwe5622/tty-sdio/lpm.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/tty-sdio/lpm.c
|
||||||
|
@@ -11,6 +11,7 @@
|
||||||
|
#include <linux/seq_file.h>
|
||||||
|
#include <linux/version.h>
|
||||||
|
#include <linux/export.h>
|
||||||
|
+#include <linux/device.h>
|
||||||
|
#include <marlin_platform.h>
|
||||||
|
|
||||||
|
#define VERSION "marlin2 V0.1"
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
From 332748a389a88f8d78c5b2c70cf5c29f7098c703 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ricardo Pardini <ricardo@pardini.net>
|
||||||
|
Date: Mon, 2 Oct 2023 16:24:12 +0200
|
||||||
|
Subject: [PATCH] wifi uwe fix uwe5622 tty-sdio
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/net/wireless/uwe5622/tty-sdio/tty.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/tty-sdio/tty.c b/drivers/net/wireless/uwe5622/tty-sdio/tty.c
|
||||||
|
index 6498272fc192..36fc7dd558d4 100644
|
||||||
|
--- a/drivers/net/wireless/uwe5622/tty-sdio/tty.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/tty-sdio/tty.c
|
||||||
|
@@ -467,8 +467,8 @@ static int sdio_data_transmit(uint8_t *data, size_t count)
|
||||||
|
return mtty_write(NULL, data, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
-static int mtty_write_plus(struct tty_struct *tty,
|
||||||
|
- const unsigned char *buf, int count)
|
||||||
|
+static ssize_t mtty_write_plus(struct tty_struct *tty, const u8 *buf,
|
||||||
|
+ size_t count)
|
||||||
|
{
|
||||||
|
return sitm_write(buf, count, sdio_data_transmit);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.42.0
|
||||||
|
|
||||||
@@ -0,0 +1,206 @@
|
|||||||
|
From b758478655da935b50a973b0aa2ddbc20893b789 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paolo Sabatino <paolo.sabatino@gmail.com>
|
||||||
|
Date: Sun, 12 Jun 2022 14:33:59 +0000
|
||||||
|
Subject: [PATCH] uwe5622: various warning and firmware path fixes
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/net/wireless/uwe5622/Makefile | 2 +-
|
||||||
|
.../uwe5622/unisocwcn/platform/rdc_debug.c | 4 +-
|
||||||
|
.../uwe5622/unisocwcn/platform/wcn_boot.c | 2 -
|
||||||
|
.../unisocwcn/platform/wcn_parn_parser.c | 2 +-
|
||||||
|
.../uwe5622/unisocwcn/sdio/sdiohal_ctl.c | 42 ++++++-------------
|
||||||
|
.../wireless/uwe5622/unisocwifi/cfg80211.c | 4 --
|
||||||
|
6 files changed, 17 insertions(+), 39 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/Makefile b/drivers/net/wireless/uwe5622/Makefile
|
||||||
|
index 71c863c1017..d2210439f3c 100644
|
||||||
|
--- a/drivers/net/wireless/uwe5622/Makefile
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/Makefile
|
||||||
|
@@ -6,5 +6,5 @@ UNISOCWCN_DIR := $(shell cd $(src)/unisocwcn/ && /bin/pwd)
|
||||||
|
UNISOC_BSP_INCLUDE := $(UNISOCWCN_DIR)/include
|
||||||
|
export UNISOC_BSP_INCLUDE
|
||||||
|
|
||||||
|
-UNISOC_FW_PATH_CONFIG := "/lib/firmware/"
|
||||||
|
+UNISOC_FW_PATH_CONFIG := "/lib/firmware/uwe5622/"
|
||||||
|
export UNISOC_FW_PATH_CONFIG
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwcn/platform/rdc_debug.c b/drivers/net/wireless/uwe5622/unisocwcn/platform/rdc_debug.c
|
||||||
|
index 86fa3b103ad..1343cb98362 100755
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwcn/platform/rdc_debug.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwcn/platform/rdc_debug.c
|
||||||
|
@@ -41,13 +41,13 @@ static unsigned int wcn_cp2_file_max_num = UNISOC_DBG_FILENUM_DEFAULT;
|
||||||
|
*/
|
||||||
|
static unsigned int wcn_cp2_log_cover_old = 1;
|
||||||
|
/* path of config file unisoc_cp2log_config.txt */
|
||||||
|
-#define WCN_DEBUG_CFG_MAX_PATH_NUM 0
|
||||||
|
+#define WCN_DEBUG_CFG_MAX_PATH_NUM 2
|
||||||
|
static char *wcn_cp2_config_path[WCN_DEBUG_CFG_MAX_PATH_NUM] = {
|
||||||
|
"/data/unisoc_cp2log_config.txt",
|
||||||
|
"/vendor/etc/wifi/unisoc_cp2log_config.txt"
|
||||||
|
};
|
||||||
|
/* path of cp2 log and mem files. */
|
||||||
|
-#define WCN_UNISOC_DBG_MAX_PATH_NUM 0
|
||||||
|
+#define WCN_UNISOC_DBG_MAX_PATH_NUM 3
|
||||||
|
static char *wcn_unisoc_dbg_path[WCN_UNISOC_DBG_MAX_PATH_NUM] = {
|
||||||
|
UNISOC_DBG_PATH_DEFAULT,/* most of projects */
|
||||||
|
"/data", /* amlogic s905w... */
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_boot.c b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_boot.c
|
||||||
|
index d82f56357f3..58b9d290f23 100755
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_boot.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_boot.c
|
||||||
|
@@ -325,8 +325,6 @@ static struct regmap *reg_map;
|
||||||
|
#define AFC_CALI_READ_FINISH 0x12121212
|
||||||
|
#define WCN_AFC_CALI_PATH "/productinfo/wcn/tsx_bt_data.txt"
|
||||||
|
|
||||||
|
-#define BIT(nr) (1UL << (nr))
|
||||||
|
-
|
||||||
|
#ifdef CONFIG_WCN_DOWNLOAD_FIRMWARE_FROM_HEX
|
||||||
|
#define POWER_WQ_DELAYED_MS 0
|
||||||
|
#else
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_parn_parser.c b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_parn_parser.c
|
||||||
|
index 9abcd326972..c1557dcce3f 100755
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_parn_parser.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_parn_parser.c
|
||||||
|
@@ -183,7 +183,7 @@ int parse_firmware_path(char *firmware_path)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
memset(fstab_name, 0, sizeof(fstab_name));
|
||||||
|
- strncpy(fstab_name, fstab_dir[loop], sizeof(fstab_dir[loop]));
|
||||||
|
+ strncpy(fstab_name, fstab_dir[loop], sizeof(fstab_name));
|
||||||
|
if (strlen(fstab_name) > 1)
|
||||||
|
fstab_name[strlen(fstab_name)] = '/';
|
||||||
|
iterate_dir(file1, &ctx);
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwcn/sdio/sdiohal_ctl.c b/drivers/net/wireless/uwe5622/unisocwcn/sdio/sdiohal_ctl.c
|
||||||
|
index b426bf89cd9..8000bfea378 100755
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwcn/sdio/sdiohal_ctl.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwcn/sdio/sdiohal_ctl.c
|
||||||
|
@@ -9,6 +9,7 @@
|
||||||
|
#include <linux/uaccess.h>
|
||||||
|
#include <linux/version.h>
|
||||||
|
#include <linux/vmalloc.h>
|
||||||
|
+#include <linux/ktime.h>
|
||||||
|
#include <wcn_bus.h>
|
||||||
|
|
||||||
|
#include "sdiohal.h"
|
||||||
|
@@ -96,8 +97,10 @@ char *tp_tx_buf[TP_TX_BUF_CNT];
|
||||||
|
|
||||||
|
struct mchn_ops_t at_tx_ops;
|
||||||
|
struct mchn_ops_t at_rx_ops;
|
||||||
|
-struct timeval tp_tx_start_time;
|
||||||
|
-struct timeval tp_tx_stop_time;
|
||||||
|
+ktime_t tp_tx_start_time;
|
||||||
|
+ktime_t tp_tx_stop_time;
|
||||||
|
+ktime_t tp_rx_start_time;
|
||||||
|
+ktime_t tp_rx_stop_time;
|
||||||
|
int tp_tx_cnt;
|
||||||
|
int tp_tx_flag;
|
||||||
|
int tp_tx_buf_cnt = TP_TX_BUF_CNT;
|
||||||
|
@@ -222,7 +225,6 @@ static int sdiohal_throughput_tx(void)
|
||||||
|
static void sdiohal_throughput_tx_compute_time(void)
|
||||||
|
{
|
||||||
|
static signed long long times_count;
|
||||||
|
- struct timespec64 now;
|
||||||
|
|
||||||
|
if (tp_tx_flag != 1)
|
||||||
|
return;
|
||||||
|
@@ -230,17 +232,12 @@ static void sdiohal_throughput_tx_compute_time(void)
|
||||||
|
/* throughput test */
|
||||||
|
tp_tx_cnt++;
|
||||||
|
if (tp_tx_cnt % 500 == 0) {
|
||||||
|
- getnstimeofday(&now);
|
||||||
|
- tp_tx_stop_time.tv_sec = now.tv_sec;
|
||||||
|
- tp_tx_stop_time.tv_usec = now.tv_nsec/1000;
|
||||||
|
- times_count = timeval_to_ns(&tp_tx_stop_time) -
|
||||||
|
- timeval_to_ns(&tp_tx_start_time);
|
||||||
|
+ tp_tx_stop_time = ktime_get();
|
||||||
|
+ times_count = tp_tx_stop_time - tp_tx_start_time;
|
||||||
|
sdiohal_info("tx->times(500c) is %lldns, tx %d, rx %d\n",
|
||||||
|
times_count, tp_tx_cnt, rx_pop_cnt);
|
||||||
|
tp_tx_cnt = 0;
|
||||||
|
- getnstimeofday(&now);
|
||||||
|
- tp_tx_start_time.tv_sec = now.tv_sec;
|
||||||
|
- tp_tx_start_time.tv_usec = now.tv_nsec/1000;
|
||||||
|
+ tp_tx_start_time = ktime_get();
|
||||||
|
}
|
||||||
|
sdiohal_throughput_tx();
|
||||||
|
}
|
||||||
|
@@ -544,14 +541,10 @@ int at_list_tx_pop(int channel, struct mbuf_t *head,
|
||||||
|
}
|
||||||
|
|
||||||
|
int tp_rx_cnt;
|
||||||
|
-struct timeval tp_rx_start_time;
|
||||||
|
-struct timeval tp_rx_stop_time;
|
||||||
|
-struct timespec tp_tm_begin;
|
||||||
|
int at_list_rx_pop(int channel, struct mbuf_t *head,
|
||||||
|
struct mbuf_t *tail, int num)
|
||||||
|
{
|
||||||
|
- static signed long long times_count;
|
||||||
|
- struct timespec64 now;
|
||||||
|
+ ktime_t times_count;
|
||||||
|
|
||||||
|
sdiohal_debug("%s channel:%d head:%p tail:%p num:%d\n",
|
||||||
|
__func__, channel, head, tail, num);
|
||||||
|
@@ -568,19 +561,13 @@ int at_list_rx_pop(int channel, struct mbuf_t *head,
|
||||||
|
/* throughput test */
|
||||||
|
tp_rx_cnt += num;
|
||||||
|
if (tp_rx_cnt / (500*64) == 1) {
|
||||||
|
- getnstimeofday(&now);
|
||||||
|
- tp_rx_stop_time.tv_sec = now.tv_sec;
|
||||||
|
- tp_rx_stop_time.tv_usec = now.tv_nsec/1000;
|
||||||
|
- times_count = timeval_to_ns(&tp_rx_stop_time)
|
||||||
|
- - timeval_to_ns(&tp_rx_start_time);
|
||||||
|
+ tp_rx_stop_time = ktime_get();
|
||||||
|
+ times_count = tp_rx_stop_time - tp_rx_start_time;
|
||||||
|
sdiohal_info("rx->times(%dc) is %lldns, tx %d, rx %d\n",
|
||||||
|
tp_rx_cnt, times_count, tp_tx_cnt, rx_pop_cnt);
|
||||||
|
tp_rx_cnt = 0;
|
||||||
|
- getnstimeofday(&now);
|
||||||
|
- tp_rx_start_time.tv_sec = now.tv_sec;
|
||||||
|
- tp_rx_start_time.tv_usec = now.tv_nsec/1000;
|
||||||
|
+ tp_rx_start_time = ktime_get();
|
||||||
|
}
|
||||||
|
- getnstimeofday(&tp_tm_begin);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@@ -834,7 +821,6 @@ static ssize_t at_cmd_write(struct file *filp,
|
||||||
|
long int long_data;
|
||||||
|
int ret;
|
||||||
|
unsigned char *send_buf = NULL;
|
||||||
|
- struct timespec64 now;
|
||||||
|
|
||||||
|
if (count > SDIOHAL_WRITE_SIZE) {
|
||||||
|
sdiohal_err("%s write size > %d\n",
|
||||||
|
@@ -1127,9 +1113,7 @@ static ssize_t at_cmd_write(struct file *filp,
|
||||||
|
__func__, tp_tx_buf_cnt, tp_tx_buf_len);
|
||||||
|
tp_tx_flag = 1;
|
||||||
|
tp_tx_cnt = 0;
|
||||||
|
- getnstimeofday(&now);
|
||||||
|
- tp_tx_start_time.tv_sec = now.tv_sec;
|
||||||
|
- tp_tx_start_time.tv_usec = now.tv_nsec/1000;
|
||||||
|
+ tp_tx_start_time = ktime_get();
|
||||||
|
if ((tp_tx_buf_cnt <= TP_TX_BUF_CNT) &&
|
||||||
|
(tp_tx_buf_len <= TP_TX_BUF_LEN)) {
|
||||||
|
sprdwcn_bus_chn_deinit(&at_tx_ops);
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/wl_core.c b/drivers/net/wireless/uwe5622/unisocwifi/wl_core.c
|
||||||
|
index ad310450e79..206824604ec 100755
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwifi/wl_core.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwifi/wl_core.c
|
||||||
|
@@ -628,12 +628,12 @@ static int sprdwl_probe(struct platform_device *pdev)
|
||||||
|
ret = -ENXIO;
|
||||||
|
goto err_core_create;
|
||||||
|
}
|
||||||
|
- memcpy(priv->wl_ver.kernel_ver, utsname()->release,
|
||||||
|
- strlen(utsname()->release));
|
||||||
|
- memcpy(priv->wl_ver.drv_ver, SPRDWL_DRIVER_VERSION,
|
||||||
|
- strlen(SPRDWL_DRIVER_VERSION));
|
||||||
|
- memcpy(priv->wl_ver.update, SPRDWL_UPDATE, strlen(SPRDWL_UPDATE));
|
||||||
|
- memcpy(priv->wl_ver.reserve, SPRDWL_RESERVE, strlen(SPRDWL_RESERVE));
|
||||||
|
+ strncpy(priv->wl_ver.kernel_ver, utsname()->release,
|
||||||
|
+ sizeof(priv->wl_ver.kernel_ver));
|
||||||
|
+ strncpy(priv->wl_ver.drv_ver, SPRDWL_DRIVER_VERSION,
|
||||||
|
+ sizeof(priv->wl_ver.drv_ver));
|
||||||
|
+ strncpy(priv->wl_ver.update, SPRDWL_UPDATE, sizeof(priv->wl_ver.update));
|
||||||
|
+ strncpy(priv->wl_ver.reserve, SPRDWL_RESERVE, sizeof(priv->wl_ver.reserve));
|
||||||
|
wl_info("Spreadtrum WLAN Version:");
|
||||||
|
wl_info("Kernel:%s,Driver:%s,update:%s,reserved:%s\n",
|
||||||
|
utsname()->release, SPRDWL_DRIVER_VERSION,
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,33 @@
|
|||||||
|
From 4cf270a8ac06021e0f6cf30790d089584cb24b67 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Gunjan Gupta <viraniac@gmail.com>
|
||||||
|
Date: Sat, 23 Dec 2023 10:05:30 +0000
|
||||||
|
Subject: [PATCH] wireless: uwe5622: Fix compilation with 6.7 kernel
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c | 7 +++++++
|
||||||
|
1 file changed, 7 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c b/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c
|
||||||
|
index b2f9a877edce..34b2e5e4274d 100644
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c
|
||||||
|
@@ -964,9 +964,16 @@ static int sprdwl_cfg80211_start_ap(struct wiphy *wiphy,
|
||||||
|
|
||||||
|
static int sprdwl_cfg80211_change_beacon(struct wiphy *wiphy,
|
||||||
|
struct net_device *ndev,
|
||||||
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0))
|
||||||
|
+ struct cfg80211_ap_update *info)
|
||||||
|
+#else
|
||||||
|
struct cfg80211_beacon_data *beacon)
|
||||||
|
+#endif
|
||||||
|
{
|
||||||
|
struct sprdwl_vif *vif = netdev_priv(ndev);
|
||||||
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0))
|
||||||
|
+ struct cfg80211_beacon_data *beacon = &(info->beacon);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
wl_ndev_log(L_DBG, ndev, "%s\n", __func__);
|
||||||
|
#ifdef DFS_MASTER
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
From 2bf93d6cfe24f56baa12f75a57b71dfc33fe322a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Gunjan Gupta <viraniac@gmail.com>
|
||||||
|
Date: Tue, 2 Jan 2024 13:23:23 +0000
|
||||||
|
Subject: [PATCH] wireless: uwe5622: reduce system load
|
||||||
|
|
||||||
|
Based on https://github.com/pyavitz/debian-image-builder/commit/cbed5020641ad2d2a6c2df0a2ce68586da1b1635
|
||||||
|
---
|
||||||
|
drivers/net/wireless/uwe5622/unisocwifi/tx_msg.c | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/tx_msg.c b/drivers/net/wireless/uwe5622/unisocwifi/tx_msg.c
|
||||||
|
index 40d51a7130d9..040193d3115d 100644
|
||||||
|
--- a/drivers/net/wireless/uwe5622/unisocwifi/tx_msg.c
|
||||||
|
+++ b/drivers/net/wireless/uwe5622/unisocwifi/tx_msg.c
|
||||||
|
@@ -317,7 +317,10 @@ void sprdwl_dequeue_data_list(struct mbuf_t *head, int num)
|
||||||
|
/* seam for tx_thread */
|
||||||
|
void tx_down(struct sprdwl_tx_msg *tx_msg)
|
||||||
|
{
|
||||||
|
- wait_for_completion(&tx_msg->tx_completed);
|
||||||
|
+ int ret;
|
||||||
|
+ do {
|
||||||
|
+ ret = wait_for_completion_interruptible(&tx_msg->tx_completed);
|
||||||
|
+ } while (ret == -ERESTARTSYS);
|
||||||
|
}
|
||||||
|
|
||||||
|
void tx_up(struct sprdwl_tx_msg *tx_msg)
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andre Przywara <andre.przywara@arm.com>
|
||||||
|
Date: Fri, 21 Feb 2025 00:58:01 +0000
|
||||||
|
Subject: arm64: dts: allwinner: h616: Add Mali GPU node
|
||||||
|
|
||||||
|
The Allwinner H616 SoC contains a Mali-G31 MP2 GPU, which is of the Mali
|
||||||
|
Bifrost family. There is a power domain specifically for that GPU, which
|
||||||
|
needs to be enabled to make use of the it.
|
||||||
|
|
||||||
|
Add the DT nodes for those two devices, and link them together through
|
||||||
|
the "power-domains" property.
|
||||||
|
Any board wishing to use the GPU would need to enable the GPU node and
|
||||||
|
specify the "mali-supply" regulator.
|
||||||
|
|
||||||
|
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 21 ++++++++++
|
||||||
|
1 file changed, 21 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
||||||
|
@@ -150,6 +150,21 @@ soc {
|
||||||
|
#size-cells = <1>;
|
||||||
|
ranges = <0x0 0x0 0x0 0x40000000>;
|
||||||
|
|
||||||
|
+ gpu: gpu@1800000 {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-mali",
|
||||||
|
+ "arm,mali-bifrost";
|
||||||
|
+ reg = <0x1800000 0x40000>;
|
||||||
|
+ interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
|
||||||
|
+ <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
|
||||||
|
+ <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
+ interrupt-names = "job", "mmu", "gpu";
|
||||||
|
+ clocks = <&ccu CLK_GPU0>, <&ccu CLK_BUS_GPU>;
|
||||||
|
+ clock-names = "core", "bus";
|
||||||
|
+ power-domains = <&prcm_ppu 2>;
|
||||||
|
+ resets = <&ccu RST_BUS_GPU>;
|
||||||
|
+ status = "disabled";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
crypto: crypto@1904000 {
|
||||||
|
compatible = "allwinner,sun50i-h616-crypto";
|
||||||
|
reg = <0x01904000 0x800>;
|
||||||
|
@@ -860,6 +875,12 @@ r_ccu: clock@7010000 {
|
||||||
|
#reset-cells = <1>;
|
||||||
|
};
|
||||||
|
|
||||||
|
+ prcm_ppu: power-controller@7010250 {
|
||||||
|
+ compatible = "allwinner,sun50i-h616-prcm-ppu";
|
||||||
|
+ reg = <0x07010250 0x10>;
|
||||||
|
+ #power-domain-cells = <1>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
nmi_intc: interrupt-controller@7010320 {
|
||||||
|
compatible = "allwinner,sun50i-h616-nmi",
|
||||||
|
"allwinner,sun9i-a80-nmi";
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Philippe Simons <simons.philippe@gmail.com>
|
||||||
|
Date: Thu, 13 Mar 2025 00:23:19 +0100
|
||||||
|
Subject: drm/panfrost: add h616 compatible string
|
||||||
|
|
||||||
|
Tie the Allwinner compatible string to the pm feature bit available in
|
||||||
|
this kernel series so clocks are toggled together with power-domain state.
|
||||||
|
|
||||||
|
Signed-off-by: Philippe Simons <simons.philippe@gmail.com>
|
||||||
|
---
|
||||||
|
drivers/gpu/drm/panfrost/panfrost_drv.c | 8 ++++++++
|
||||||
|
1 file changed, 8 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
|
||||||
|
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
|
||||||
|
@@ -736,6 +736,13 @@ static const struct panfrost_compatible default_data = {
|
||||||
|
.pm_domain_names = NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
+static const struct panfrost_compatible allwinner_h616_data = {
|
||||||
|
+ .num_supplies = ARRAY_SIZE(default_supplies) - 1,
|
||||||
|
+ .supply_names = default_supplies,
|
||||||
|
+ .num_pm_domains = 1,
|
||||||
|
+ .pm_features = BIT(GPU_PM_CLK_DIS),
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
static const struct panfrost_compatible amlogic_data = {
|
||||||
|
.num_supplies = ARRAY_SIZE(default_supplies) - 1,
|
||||||
|
.supply_names = default_supplies,
|
||||||
|
@@ -819,6 +826,7 @@ static const struct of_device_id dt_match[] = {
|
||||||
|
{ .compatible = "mediatek,mt8186-mali", .data = &mediatek_mt8186_data },
|
||||||
|
{ .compatible = "mediatek,mt8188-mali", .data = &mediatek_mt8188_data },
|
||||||
|
{ .compatible = "mediatek,mt8192-mali", .data = &mediatek_mt8192_data },
|
||||||
|
+ { .compatible = "allwinner,sun50i-h616-mali", .data = &allwinner_h616_data },
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(of, dt_match);
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: The-going <48602507+The-going@users.noreply.github.com>
|
||||||
|
Date: Mon, 10 Feb 2025 15:45:13 +0300
|
||||||
|
Subject: drm: sun4i: add sun50i-h616-hdmi-phy support
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 71 ++++++++++
|
||||||
|
1 file changed, 71 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c
|
||||||
|
+++ b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c
|
||||||
|
@@ -124,6 +124,66 @@ static const struct dw_hdmi_phy_config sun50i_h6_phy_config[] = {
|
||||||
|
{ ~0UL, 0x0000, 0x0000, 0x0000}
|
||||||
|
};
|
||||||
|
|
||||||
|
+static const struct dw_hdmi_mpll_config sun50i_h616_mpll_cfg[] = {
|
||||||
|
+ {
|
||||||
|
+ 27000000, {
|
||||||
|
+ {0x00b3, 0x0003},
|
||||||
|
+ {0x2153, 0x0003},
|
||||||
|
+ {0x40f3, 0x0003},
|
||||||
|
+ },
|
||||||
|
+ }, {
|
||||||
|
+ 74250000, {
|
||||||
|
+ {0x0072, 0x0003},
|
||||||
|
+ {0x2145, 0x0003},
|
||||||
|
+ {0x4061, 0x0003},
|
||||||
|
+ },
|
||||||
|
+ }, {
|
||||||
|
+ 148500000, {
|
||||||
|
+ {0x0051, 0x0003},
|
||||||
|
+ {0x214c, 0x0003},
|
||||||
|
+ {0x4064, 0x0003},
|
||||||
|
+ },
|
||||||
|
+ }, {
|
||||||
|
+ 297000000, {
|
||||||
|
+ {0x0040, 0x0003},
|
||||||
|
+ {0x3b4c, 0x0003},
|
||||||
|
+ {0x5a64, 0x0003},
|
||||||
|
+ },
|
||||||
|
+ }, {
|
||||||
|
+ 594000000, {
|
||||||
|
+ {0x1a40, 0x0003},
|
||||||
|
+ {0x3b4c, 0x0003},
|
||||||
|
+ {0x5a64, 0x0003},
|
||||||
|
+ },
|
||||||
|
+ }, {
|
||||||
|
+ ~0UL, {
|
||||||
|
+ {0x0000, 0x0000},
|
||||||
|
+ {0x0000, 0x0000},
|
||||||
|
+ {0x0000, 0x0000},
|
||||||
|
+ },
|
||||||
|
+ }
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static const struct dw_hdmi_curr_ctrl sun50i_h616_cur_ctr[] = {
|
||||||
|
+ /* pixelclk bpp8 bpp10 bpp12 */
|
||||||
|
+ { 27000000, { 0x0012, 0x0000, 0x0000 }, },
|
||||||
|
+ { 74250000, { 0x0013, 0x0013, 0x0013 }, },
|
||||||
|
+ { 148500000, { 0x0019, 0x0019, 0x0019 }, },
|
||||||
|
+ { 297000000, { 0x0019, 0x001b, 0x0019 }, },
|
||||||
|
+ { 594000000, { 0x0010, 0x0010, 0x0010 }, },
|
||||||
|
+ { ~0UL, { 0x0000, 0x0000, 0x0000 }, }
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static const struct dw_hdmi_phy_config sun50i_h616_phy_config[] = {
|
||||||
|
+ /*pixelclk symbol term vlev*/
|
||||||
|
+ {27000000, 0x8009, 0x0007, 0x02b0},
|
||||||
|
+ {74250000, 0x8019, 0x0004, 0x0290},
|
||||||
|
+ {148500000, 0x8019, 0x0004, 0x0290},
|
||||||
|
+ {297000000, 0x8039, 0x0004, 0x022b},
|
||||||
|
+ {594000000, 0x8029, 0x0000, 0x008a},
|
||||||
|
+ {~0UL, 0x0000, 0x0000, 0x0000}
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
static void sun8i_hdmi_phy_set_polarity(struct sun8i_hdmi_phy *phy,
|
||||||
|
const struct drm_display_mode *mode)
|
||||||
|
{
|
||||||
|
@@ -626,6 +686,13 @@ static const struct sun8i_hdmi_phy_variant sun50i_h6_hdmi_phy = {
|
||||||
|
.phy_init = &sun50i_hdmi_phy_init_h6,
|
||||||
|
};
|
||||||
|
|
||||||
|
+static const struct sun8i_hdmi_phy_variant sun50i_h616_hdmi_phy = {
|
||||||
|
+ .cur_ctr = sun50i_h616_cur_ctr,
|
||||||
|
+ .mpll_cfg = sun50i_h616_mpll_cfg,
|
||||||
|
+ .phy_cfg = sun50i_h616_phy_config,
|
||||||
|
+ .phy_init = &sun50i_hdmi_phy_init_h6,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
static const struct of_device_id sun8i_hdmi_phy_of_table[] = {
|
||||||
|
{
|
||||||
|
.compatible = "allwinner,sun8i-a83t-hdmi-phy",
|
||||||
|
@@ -647,6 +714,10 @@ static const struct of_device_id sun8i_hdmi_phy_of_table[] = {
|
||||||
|
.compatible = "allwinner,sun50i-h6-hdmi-phy",
|
||||||
|
.data = &sun50i_h6_hdmi_phy,
|
||||||
|
},
|
||||||
|
+ {
|
||||||
|
+ .compatible = "allwinner,sun50i-h616-hdmi-phy",
|
||||||
|
+ .data = &sun50i_h616_hdmi_phy,
|
||||||
|
+ },
|
||||||
|
{ /* sentinel */ }
|
||||||
|
};
|
||||||
|
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Steinar H. Gunderson" <steinar+kernel@gunderson.no>
|
||||||
|
Date: Mon, 4 Nov 2024 15:35:38 +0000
|
||||||
|
Subject: Fix broken allwinner,sram dependency on h616, h618
|
||||||
|
|
||||||
|
On BigTreeTech CB1, the thermal sensor has an allwinner,sram
|
||||||
|
property pointing to <&syscon>. However, Armbian has an out-of-tree
|
||||||
|
kernel patch that creates dependencies based on allwinner,sram
|
||||||
|
properties, which assumes that they point to sram nodes exactly
|
||||||
|
two levels below the syscon node (instead of the syscon itself).
|
||||||
|
This manifests itself as the thermal sensor refusing to load with
|
||||||
|
a nonsensical error message:
|
||||||
|
|
||||||
|
[ 23.775976] platform 5070400.thermal-sensor: deferred probe pending: platform: wait for supplier
|
||||||
|
|
||||||
|
Note that it does not say _which_ supplier it is waiting for
|
||||||
|
(the message ends in a space and then no supplier). The patch
|
||||||
|
was unproblematic in the 5.6 megous patch set, where it was
|
||||||
|
introduced, and in 6.6, which is current for Armbian, but in
|
||||||
|
6.8, the sun8i-thermal driver got mainlined, with this extra
|
||||||
|
property compared to the out-of-tree version we used before
|
||||||
|
(since it wants to clear a special bit at 0x300000 instead of
|
||||||
|
relying on the firmware to do so before kernel boot).
|
||||||
|
|
||||||
|
Fix by being a bit more flexible when we walk up the tree,
|
||||||
|
so that we always stop at the syscon node.
|
||||||
|
|
||||||
|
Tested on a Sovol SV08, which is CB1-based.
|
||||||
|
|
||||||
|
Signed-off-by: Steinar H. Gunderson <steinar+kernel@gunderson.no>
|
||||||
|
---
|
||||||
|
drivers/of/property.c | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/of/property.c b/drivers/of/property.c
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/drivers/of/property.c
|
||||||
|
+++ b/drivers/of/property.c
|
||||||
|
@@ -1365,8 +1365,9 @@ static struct device_node *parse_allwinner_sram(struct device_node *np,
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
sram_node = of_parse_phandle(np, prop_name, 0);
|
||||||
|
- sram_node = of_get_parent(sram_node);
|
||||||
|
- sram_node = of_get_parent(sram_node);
|
||||||
|
+ while (sram_node && !of_node_is_type(sram_node, "syscon")) {
|
||||||
|
+ sram_node = of_get_parent(sram_node);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
return sram_node;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
|
||||||
|
Date: Sat, 15 May 2021 21:43:44 +0200
|
||||||
|
Subject: of: property: fw_devlink: Support allwinner,sram links
|
||||||
|
|
||||||
|
allwinner,sram property points to a node representing section of SRAM,
|
||||||
|
which is implemented by its ancestor (syscon), so we link to the
|
||||||
|
parent of parent of the actual SRAM section node that the link points
|
||||||
|
to.
|
||||||
|
|
||||||
|
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
||||||
|
---
|
||||||
|
drivers/of/property.c | 22 ++++++++++
|
||||||
|
1 file changed, 22 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/of/property.c b/drivers/of/property.c
|
||||||
|
index 111111111111..222222222222 100644
|
||||||
|
--- a/drivers/of/property.c
|
||||||
|
+++ b/drivers/of/property.c
|
||||||
|
@@ -1350,6 +1350,27 @@ static struct device_node *parse_remote_endpoint(struct device_node *np,
|
||||||
|
return of_graph_get_remote_port_parent(np);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static struct device_node *parse_allwinner_sram(struct device_node *np,
|
||||||
|
+ const char *prop_name, int index)
|
||||||
|
+{
|
||||||
|
+ struct device_node *sram_node;
|
||||||
|
+
|
||||||
|
+ if (!IS_ENABLED(CONFIG_SUNXI_SRAM))
|
||||||
|
+ return NULL;
|
||||||
|
+
|
||||||
|
+ if (strcmp(prop_name, "allwinner,sram"))
|
||||||
|
+ return NULL;
|
||||||
|
+
|
||||||
|
+ if (index > 0)
|
||||||
|
+ return NULL;
|
||||||
|
+
|
||||||
|
+ sram_node = of_parse_phandle(np, prop_name, 0);
|
||||||
|
+ sram_node = of_get_parent(sram_node);
|
||||||
|
+ sram_node = of_get_parent(sram_node);
|
||||||
|
+
|
||||||
|
+ return sram_node;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static const struct supplier_bindings of_supplier_bindings[] = {
|
||||||
|
{ .parse_prop = parse_clocks, },
|
||||||
|
{ .parse_prop = parse_interconnects, },
|
||||||
|
@@ -1397,6 +1418,7 @@ static const struct supplier_bindings of_supplier_bindings[] = {
|
||||||
|
.parse_prop = parse_post_init_providers,
|
||||||
|
.fwlink_flags = FWLINK_FLAG_IGNORE,
|
||||||
|
},
|
||||||
|
+ { .parse_prop = parse_allwinner_sram, },
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
patches.megous/of-property-fw_devlink-Support-allwinner-sram-links.patch
|
||||||
|
patches.megous/Fix-broken-allwinner-sram-dependency-on-h616-h618.patch
|
||||||
|
patches.drm/drm-sun4i-add-sun50i-h616-hdmi-phy-support.patch
|
||||||
|
patches.drm/arm64-dts-allwinner-h616-Add-Mali-GPU-node.patch
|
||||||
|
patches.drm/drm-panfrost-add-h616-compatible-string.patch
|
||||||
|
patches.armbian/Add-sunxi-addr-driver-Used-to-fix-uwe5622-bluetooth-MAC-address.patch
|
||||||
|
patches.armbian/wireless-driver-for-uwe5622-allwinner.patch
|
||||||
|
patches.armbian/uwe5622-allwinner-bugfix-v6.3.patch
|
||||||
|
patches.armbian/uwe5622-allwinner-v6.3-compilation-fix.patch
|
||||||
|
patches.armbian/uwe5622-v6.4-post.patch
|
||||||
|
patches.armbian/uwe5622-warnings.patch
|
||||||
|
patches.armbian/uwe5622-park-link-v6.1-post.patch
|
||||||
|
patches.armbian/uwe5622-v6.1.patch
|
||||||
|
patches.armbian/uwe5622-v6.6-fix-tty-sdio.patch
|
||||||
|
patches.armbian/uwe5622-fix-setting-mac-address-for-netdev.patch
|
||||||
|
patches.armbian/wireless-uwe5622-Fix-compilation-with-6.7-kernel.patch
|
||||||
|
patches.armbian/wireless-uwe5622-reduce-system-load.patch
|
||||||
|
patches.armbian/uwe5622-v6.11.patch
|
||||||
|
patches.armbian/uwe5622-fix-spanning-writes.patch
|
||||||
|
patches.armbian/driver-allwinner-h618-emac.patch
|
||||||
|
patches.armbian/drivers-pwm-Add-pwm-sunxi-enhance-driver-for-h616.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h616.dtsi-reserved-memory-512K-for-BL31.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h616-orangepi-zero2-reg_usb1_vbus-status-ok.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h616-orangepi-zero2-Enable-GPU-mali.patch
|
||||||
|
patches.armbian/arm64-dts-allwinner-sun50i-h616-Add-VPU-node.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h616-x96-mate-T95-eth-sd-card-hack.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h616-x96-mate-add-hdmi.patch
|
||||||
|
patches.armbian/arm64-dts-add-sun50i-h618-cpu-dvfs.dtsi.patch
|
||||||
|
patches.armbian/arm64-dts-allwinner-h616-orangepi-zero2-Enable-expansion-board-.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h616-bigtreetech-cb1-sd-emmc.patch
|
||||||
|
patches.armbian/add-nodes-for-sunxi-info-sunxi-addr-and-sunxi-dump-reg.patch
|
||||||
|
patches.armbian/arm64-dts-h616-add-wifi-support-for-orange-pi-zero-2-and-zero3.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h618-orangepi-zero3-Enable-GPU-mali.patch
|
||||||
|
patches.armbian/arm64-dts-h616-add-hdmi-support-for-zero2-and-zero3.patch
|
||||||
|
patches.armbian/arm64-sun50i-h616-Add-i2c-2-3-4-uart-2-5-pins.patch
|
||||||
|
patches.armbian/arm64-dts-h616-8-Add-overlays-i2c-234-ph-pg-uart-25-ph-pg.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h618-orangepi-zero2w-Add-missing-nodes.patch
|
||||||
|
patches.armbian/add-dtb-overlay-for-zero2w.patch
|
||||||
|
patches.armbian/Sound-for-H616-H618-Allwinner-SOCs.patch
|
||||||
|
patches.armbian/drv-nvmem-sunxi_sid-Support-SID-on-H616.patch
|
||||||
|
patches.armbian/nvmem-sunxi_sid-add-sunxi_get_soc_chipid-sunxi_get_serial.patch
|
||||||
|
patches.armbian/ARM64-dts-sun50i-h616-BigTreeTech-CB1-Enable-HDMI.patch
|
||||||
|
patches.armbian/ARM64-dts-sun50i-h616-BigTreeTech-CB1-Enable-EMAC1.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h616-Add-i2c3-pa-pwm-pins.patch
|
||||||
|
patches.armbian/arm64-dts-allwinner-Add-axp313a.dtsi.patch
|
||||||
|
patches.armbian/arm64-allwinner-Add-sun50i-h618-bananapi-m4-berry-support.patch
|
||||||
|
patches.armbian/sun50i-h616-Add-the-missing-digital-audio-nodes.patch
|
||||||
477
patches/uwe5622/armbian-sunxi-6.12/series.conf
Normal file
477
patches/uwe5622/armbian-sunxi-6.12/series.conf
Normal file
@@ -0,0 +1,477 @@
|
|||||||
|
#
|
||||||
|
# This file is made manually by simply copying text
|
||||||
|
# from the target series.* files.
|
||||||
|
# Add (-) at the beginning of the line if the patch should not be applied.
|
||||||
|
# At the same time, the patch does not need to be deleted.
|
||||||
|
#
|
||||||
|
patches.megous/net-wireless-brcmfmac-Add-support-for-detecting-AP6275P.patch
|
||||||
|
patches.megous/net-wireless-brcmfmac-Add-optional-32k-clock-enable-support.patch
|
||||||
|
patches.megous/media-ov5640-Experiment-Try-to-disable-denoising-sharpening.patch
|
||||||
|
patches.megous/media-ov5640-Sleep-after-poweroff-to-ensure-next-poweron-is-not.patch
|
||||||
|
patches.megous/media-ov5640-Don-t-powerup-the-sensor-during-driver-probe.patch
|
||||||
|
patches.megous/media-ov5640-set-default-ae-target-lower.patch
|
||||||
|
patches.megous/media-ov5640-Improve-error-reporting.patch
|
||||||
|
patches.megous/media-ov5640-Implement-autofocus.patch
|
||||||
|
patches.megous/media-ov5640-Improve-firmware-load-time.patch
|
||||||
|
patches.megous/media-ov5640-Fix-focus-commands-blocking-until-complete.patch
|
||||||
|
patches.megous/media-ov5640-Add-read-only-property-for-vblank.patch
|
||||||
|
patches.megous/media-ov5640-use-pm_runtime_force_suspend-resume-for-system-sus.patch
|
||||||
|
patches.megous/media-sun6i-csi-capture-Use-subdev-operation-to-access-bridge-f.patch
|
||||||
|
patches.megous/media-sun6i-csi-subdev-Use-subdev-active-state-to-store-active-.patch
|
||||||
|
patches.megous/media-sun6i-csi-merge-sun6i_csi_formats-and-sun6i_csi_formats_m.patch
|
||||||
|
patches.megous/media-sun6i-csi-add-V4L2_CAP_IO_MC-capability.patch
|
||||||
|
patches.megous/media-sun6i-csi-implement-vidioc_enum_framesizes.patch
|
||||||
|
patches.megous/media-sun6i-csi-Add-multicamera-support-for-parallel-bus.patch
|
||||||
|
patches.megous/nfc-pn544-Add-support-for-VBAT-PVDD-regulators.patch
|
||||||
|
patches.megous/bluetooth-bcm-Restore-drive_rts_on_open-true-behavior-on-bcm207.patch
|
||||||
|
patches.megous/mmc-add-delay-after-power-class-selection.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-a83t-tbs-a711-Add-PN544-NFC-support.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-a83t-tbs-a711-Add-powerup-down-support-for-the-3G.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-a83t-Add-cedrus-video-codec-support-to-A83T-untes.patch
|
||||||
|
patches.megous/ARM-dts-suni-a83t-Add-i2s0-pins.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-a83t-tbs-a711-Add-sound-support-via-AC100-codec.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-a83t-tbs-a711-Add-regulators-to-the-accelerometer.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-a83t-tbs-a711-Add-camera-sensors-HM5065-GC2145.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-a83t-tbs-a711-Add-flash-led-support.patch
|
||||||
|
patches.megous/dt-bindings-input-gpio-vibrator-Don-t-require-enable-gpios.patch
|
||||||
|
patches.megous/input-gpio-vibra-Allow-to-use-vcc-supply-alone-to-control-the-v.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-a83t-tbs-a711-Add-support-for-the-vibrator-motor.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-a83t-tbs-a711-Increase-voltage-on-the-vibrator.patch
|
||||||
|
patches.megous/dt-bindings-leds-Add-a-binding-for-AXP813-charger-led.patch
|
||||||
|
patches.megous/leds-axp20x-Support-charger-LED-on-AXP20x-like-PMICs.patch
|
||||||
|
patches.megous/ARM-dts-axp813-Add-charger-LED.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-a83t-tbs-a711-Enable-charging-LED.patch
|
||||||
|
patches.megous/MAINTAINERS-Add-entry-for-Himax-HM5065.patch
|
||||||
|
patches.megous/dt-bindings-media-Add-bindings-for-Himax-HM5065-camera-sensor.patch
|
||||||
|
patches.megous/hm5065-yaml-bindings-wip.patch
|
||||||
|
patches.megous/media-hm5065-Add-subdev-driver-for-Himax-HM5065-camera-sensor.patch
|
||||||
|
patches.megous/media-i2c-gc2145-Move-upstream-driver-out-of-the-way.patch
|
||||||
|
patches.megous/media-gc2145-Galaxycore-camera-module-driver.patch
|
||||||
|
patches.megous/media-gc2145-Added-BGGR-bayer-mode.patch
|
||||||
|
patches.megous/media-gc2145-Disable-debug-output.patch
|
||||||
|
patches.megous/media-gc2145-Add-PIXEL_RATE-HBLANK-and-VBLANK-controls.patch
|
||||||
|
patches.megous/media-gc2145-implement-system-suspend.patch
|
||||||
|
patches.megous/media-gc2145-fix-white-balance-colors.patch
|
||||||
|
patches.megous/media-i2c-gc2145-Parse-and-register-properties.patch
|
||||||
|
patches.megous/mailbox-Allow-to-run-mailbox-while-timekeeping-is-suspended.patch
|
||||||
|
patches.megous/ARM-sunxi-Add-experimental-suspend-to-memory-implementation-for.patch
|
||||||
|
patches.megous/ARM-sunxi-sunxi_cpu0_hotplug_support_set-is-not-supported-on-A8.patch
|
||||||
|
patches.megous/firmware-scpi-Add-support-for-sending-a-SCPI_CMD_SET_SYS_PWR_ST.patch
|
||||||
|
patches.megous/ARM-sunxi-Use-SCPI-to-send-suspend-message-to-SCP-on-A83T.patch
|
||||||
|
patches.megous/gnss-ubx-Send-soft-powerdown-message-on-suspend.patch
|
||||||
|
patches.megous/clk-sunxi-ng-Export-CLK_DRAM-for-devfreq.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-a83t-Add-MBUS-node.patch
|
||||||
|
patches.megous/clk-sunxi-ng-Set-maximum-P-and-M-factors-to-1-for-H3-pll-cpux-c.patch
|
||||||
|
patches.megous/clk-sunxi-ng-Don-t-use-CPU-PLL-gating-and-CPUX-reparenting-to-H.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-h3-Use-my-own-more-aggressive-OPPs-on-H3.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-h5-Use-my-own-more-aggressive-OPPs-on-H5.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-h3-orange-pi-pc-Increase-max-CPUX-voltage-to-1.4V.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-a83t-Improve-CPU-OPP-tables-go-up-to-1.8GHz.patch
|
||||||
|
patches.megous/cpufreq-sun50i-Show-detected-CPU-bin-for-easier-debugging.patch
|
||||||
|
patches.megous/net-stmmac-sun8i-Use-devm_regulator_get-for-PHY-regulator.patch
|
||||||
|
patches.megous/net-stmmac-sun8i-Rename-PHY-regulator-variable-to-regulator_phy.patch
|
||||||
|
patches.megous/net-stmmac-sun8i-Add-support-for-enabling-a-regulator-for-PHY-I.patch
|
||||||
|
patches.megous/arm64-dts-allwinner-orange-pi-3-Enable-ethernet.patch
|
||||||
|
patches.megous/Revert-Input-cyttsp4-remove-driver.patch
|
||||||
|
patches.megous/input-cyttsp4-De-obfuscate-platform-data-for-keys.patch
|
||||||
|
patches.megous/input-cyttsp4-Remove-useless-indirection-with-driver-platform-d.patch
|
||||||
|
patches.megous/input-cyttsp4-Remove-unused-enable_vkeys.patch
|
||||||
|
patches.megous/input-cyttsp4-De-obfuscate-MT-signals-setup-platform-data.patch
|
||||||
|
patches.megous/input-cyttsp4-Clear-the-ids-buffer-in-a-saner-way.patch
|
||||||
|
patches.megous/input-cyttsp4-ENOSYS-error-is-ok-when-powering-up.patch
|
||||||
|
patches.megous/input-cyttsp4-Faster-recovery-from-failed-wakeup-HACK.patch
|
||||||
|
patches.megous/input-cyttsp4-Use-i2c-spi-names-directly-in-the-driver.patch
|
||||||
|
patches.megous/input-cyttsp4-Port-the-driver-to-use-device-properties.patch
|
||||||
|
patches.megous/input-cyttsp4-Restart-on-wakeup-wakeup-by-I2C-read-doesn-t-work.patch
|
||||||
|
patches.megous/input-cyttsp4-Fix-warnings.patch
|
||||||
|
patches.megous/input-cyttsp4-Make-the-driver-not-hog-the-system-s-workqueue.patch
|
||||||
|
patches.megous/input-cyttsp4-Fix-probe-oops.patch
|
||||||
|
patches.megous/input-cyttsp4-Fix-compile-issue.patch
|
||||||
|
patches.megous/video-fbdev-eInk-display-driver-for-A13-based-PocketBooks.patch
|
||||||
|
patches.megous/regulator-Add-simple-driver-for-enabling-a-regulator-from-users.patch
|
||||||
|
patches.megous/regulator-tp65185x-Add-tp65185x-eInk-panel-regulator-driver.patch
|
||||||
|
patches.megous/regulator-tp65185-Add-hwmon-device-for-reading-temperature.patch
|
||||||
|
patches.megous/iio-adc-sun4i-gpadc-iio-Allow-to-use-sun5i-a13-gpadc-iio-from-D.patch
|
||||||
|
patches.megous/mtd-spi-nor-Add-vdd-regulator-support.patch
|
||||||
|
patches.megous/ARM-dts-sun5i-Add-soc-handle.patch
|
||||||
|
patches.megous/ARM-dts-sun5i-Add-PocketBook-Touch-Lux-3-display-ctp-support.patch
|
||||||
|
patches.megous/ARM-dts-sun5i-a13-pocketbook-touch-lux-3-Add-RTC-clock-cells.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Add-front-back-cameras.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Add-Type-C-support-for-all-PP-va.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Add-modem-power-manager.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Fix-BH-modem-manager-behavior.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Add-detailed-OCV-to-capactiy-con.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Shorten-post-power-on-delay-on-m.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Add-mount-matrix-for-acceleromet.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Add-support-for-Bluetooth-audio.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Enable-internal-HMIC-bias.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Add-support-for-modem-audio.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Bump-I2C-frequency-to-400kHz.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Add-interrupt-pin-for-WiFi.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Power-off-the-touch-controller-i.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Don-t-make-lradc-keys-a-wakeup-s.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Set-minimum-backlight-duty-cycle.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Add-supply-for-i2c-bus-to-anx768.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Workaround-broken-HDMI-HPD-signa.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Add-AF8133J-to-PinePhone.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Add-mount-matrix-for-PinePhone-m.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Add-support-for-Pinephone-keyboa.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Enable-Pinephone-Keyboard-power-.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Add-support-for-Pinephone-1.2-be.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Add-power-supply-to-stk3311.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Add-reboot-mode-driver.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinephone-Use-newer-jack-detection-impleme.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-Define-orientation-and-rotation-for-PinePhone-.patch
|
||||||
|
patches.megous/2-arm64-dts-sun50i-Define-orientation-and-rotation-for-PinePhone-.patch
|
||||||
|
patches.megous/arm64-dts-sun50-a64-pinephone-Define-jack-pins-in-DT.patch
|
||||||
|
patches.megous/dt-bindings-sound-Add-jack-type-property-to-sun8i-a33-codec.patch
|
||||||
|
patches.megous/ASoC-sun8i-codec-Allow-the-jack-type-to-be-set-via-device-tree.patch
|
||||||
|
patches.megous/ASoC-sun8i-codec-define-button-keycodes.patch
|
||||||
|
patches.megous/ASoC-sun8i-codec-Add-debug-output-for-jack-detection.patch
|
||||||
|
patches.megous/ASoC-sun8i-codec-Set-jack_type-from-DT-in-probe.patch
|
||||||
|
patches.megous/ASoC-simple-card-Allow-to-define-pins-for-aux-jack-devices.patch
|
||||||
|
patches.megous/clk-sunxi-ng-a64-Increase-PLL_AUDIO-base-frequency.patch
|
||||||
|
patches.megous/dt-bindings-mfd-Add-codec-related-properties-to-AC100-PMIC.patch
|
||||||
|
patches.megous/sound-soc-ac100-codec-Support-analog-part-of-X-Powers-AC100-cod.patch
|
||||||
|
patches.megous/sound-soc-sun8i-codec-Add-support-for-digital-part-of-the-AC100.patch
|
||||||
|
patches.megous/ASoC-ec25-New-codec-driver-for-the-EC25-modem.patch
|
||||||
|
patches.megous/ASOC-sun9i-hdmi-audio-Initial-implementation.patch
|
||||||
|
patches.megous/ARM-dts-sunxi-h3-h5-Add-hdmi-sound-card.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-h3-Enable-hdmi-sound-card-on-boards-with-hdmi.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-h2-plus-bananapi-m2-zero-Enable-HDMI-audio.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-a83t-Add-hdmi-sound-card.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-a83t-Enable-hdmi-sound-card-on-boards-with-hdmi.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-r40-Add-hdmi-sound-card.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-r40-bananapi-m2-ultra-Enable-HDMI-audio.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-v40-bananapi-m2-berry-Enable-HDMI-audio.patch
|
||||||
|
patches.megous/arm64-dts-allwinner-h6-Add-hdmi-sound-card.patch
|
||||||
|
patches.megous/arm64-dts-allwinner-h6-Enable-hdmi-sound-card-on-boards-with-hd.patch
|
||||||
|
patches.megous/arm64-dts-allwinner-a64-Add-hdmi-sound-card.patch
|
||||||
|
patches.megous/arm64-dts-allwinner-a64-Enable-hdmi-sound-card-on-boards-with-h.patch
|
||||||
|
patches.megous/arm64-dts-allwinner-h5-Enable-hdmi-sound-card-on-boards-with-hd.patch
|
||||||
|
patches.megous/Move-a-node-to-avoid-merge-conflict.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-Set-fifo-size-for-uarts.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-a83t-Set-fifo-size-for-uarts.patch
|
||||||
|
patches.megous/Mark-some-slow-drivers-for-async-probe-with-PROBE_PREFER_ASYNCH.patch
|
||||||
|
patches.megous/arm64-xor-Select-32regs-without-benchmark-to-speed-up-boot.patch
|
||||||
|
patches.megous/clk-sunxi-ng-Mark-TWD-clocks-as-critical.patch
|
||||||
|
patches.megous/firmware-arm_scpi-Support-unidirectional-mailbox-channels.patch
|
||||||
|
patches.megous/ARM-dts-sunxi-a83t-Add-SCPI-protocol.patch
|
||||||
|
patches.megous/ARM-dts-sunxi-h3-h5-Add-SCPI-protocol.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-a83t-tbs-a711-Give-Linux-more-privileges-over-SCP.patch
|
||||||
|
patches.megous/rtc-sun6i-Allow-RTC-wakeup-after-shutdown.patch
|
||||||
|
patches.megous/misc-modem-power-Power-manager-for-modems.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-a83t-Add-missing-GPU-trip-point.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-h5-Add-missing-GPU-trip-point.patch
|
||||||
|
patches.megous/arm64-dts-allwinner-a64-Fix-LRADC-compatible.patch
|
||||||
|
patches.megous/ASoC-codec-es8316-DAC-Soft-Ramp-Rate-is-just-a-2-bit-control.patch
|
||||||
|
patches.megous/spi-rockchip-Fix-runtime-PM-and-other-issues.patch
|
||||||
|
patches.megous/spi-fixes.patch
|
||||||
|
patches.megous/media-cedrus-Fix-failure-to-clean-up-hardware-on-probe-failure.patch
|
||||||
|
patches.megous/ASoC-rockchip-Fix-doubling-of-playback-speed-after-system-sleep.patch
|
||||||
|
patches.megous/usb-musb-sunxi-Avoid-enabling-host-side-code-on-SoCs-where-it-s.patch
|
||||||
|
patches.megous/arm64-dts-allwinner-Enforce-consistent-MMC-numbering.patch
|
||||||
|
patches.megous/ARM-dts-sunxi-Add-aliases-for-MMC.patch
|
||||||
|
patches.megous/drm-rockchip-Fix-panic-on-reboot-when-DRM-device-fails-to-bind.patch
|
||||||
|
- patches.megous/usb-gadget-Fix-dangling-pointer-in-netdev-private-data.patch
|
||||||
|
patches.megous/mmc-dw-mmc-rockchip-fix-sdmmc-after-soft-reboot.patch
|
||||||
|
patches.megous/Revert-drm-sun4i-lvds-Invert-the-LVDS-polarity.patch
|
||||||
|
patches.megous/of-property-fw_devlink-Support-allwinner-sram-links.patch
|
||||||
|
patches.megous/Fix-broken-allwinner-sram-dependency-on-h616-h618.patch
|
||||||
|
patches.megous/arm64-dts-rockchip-rk356x-Fix-PCIe-register-map-and-ranges.patch
|
||||||
|
patches.megous/Fix-intptr_t-typedef.patch
|
||||||
|
patches.megous/mmc-sunxi-mmc-Remove-runtime-PM.patch
|
||||||
|
patches.megous/pci-Workaround-ITS-timeouts-on-poweroff-reboot-on-Orange-Pi-5-P.patch
|
||||||
|
patches.megous/usb-serial-option-add-reset_resume-callback-for-WWAN-devices.patch
|
||||||
|
patches.megous/media-ov5648-Fix-call-to-pm_runtime_set_suspended.patch
|
||||||
|
patches.megous/drm-rockchip-dw-mipi-dsi-rockchip-Fix-ISP1-PHY-initialization.patch
|
||||||
|
patches.megous/arm64-dts-rk3399-Add-dmc_opp_table.patch
|
||||||
|
patches.megous/bluetooth-h5-Don-t-re-initialize-rtl8723cs-on-resume.patch
|
||||||
|
patches.megous/drm-panel-st7703-Fix-xbd599-timings-to-make-refresh-rate-exactl.patch
|
||||||
|
patches.megous/video-pwm_bl-Allow-to-change-lth_brightness-via-sysfs.patch
|
||||||
|
patches.megous/clk-sunxi-ng-sun50i-a64-Switch-parent-of-MIPI-DSI-to-periph0-1x.patch
|
||||||
|
patches.megous/drm-sun4i-tcon-Support-keeping-dclk-rate-upon-ancestor-clock-ch.patch
|
||||||
|
patches.megous/phy-allwinner-sun4i-usb-Add-support-for-usb_role_switch.patch
|
||||||
|
patches.megous/regulator-axp20x-Add-support-for-vin-supply-for-drivevbus.patch
|
||||||
|
patches.megous/regulator-axp20x-Turn-N_VBUSEN-to-input-on-x-powers-sense-vbus-.patch
|
||||||
|
patches.megous/drm-bridge-dw-hdmi-Allow-to-accept-HPD-status-from-other-driver.patch
|
||||||
|
patches.megous/drm-bridge-dw-hdmi-Report-HDMI-hotplug-events.patch
|
||||||
|
patches.megous/usb-typec-anx7688-Add-driver-for-ANX7688-USB-C-HDMI-bridge.patch
|
||||||
|
patches.megous/usb-typec-anx7688-Port-to-Linux-6.9.patch
|
||||||
|
patches.megous/usb-typec-anx7688-Port-to-Linux-6.10.patch
|
||||||
|
patches.megous/dt-bindings-axp20x-adc-allow-to-use-TS-pin-as-GPADC.patch
|
||||||
|
patches.megous/iio-adc-axp20x_adc-allow-to-set-TS-pin-to-GPADC-mode.patch
|
||||||
|
patches.megous/power-axp20x_battery-Allow-to-set-target-voltage-to-4.35V.patch
|
||||||
|
patches.megous/power-supply-axp20x_battery-Add-support-for-reporting-OCV.patch
|
||||||
|
patches.megous/regulator-axp20x-Enable-over-temperature-protection-and-16s-res.patch
|
||||||
|
patches.megous/power-supply-axp20x_battery-Setup-thermal-regulation-experiment.patch
|
||||||
|
patches.megous/power-supply-axp20x_battery-Fix-charging-done-detection.patch
|
||||||
|
patches.megous/mfd-axp20x-Add-battery-IRQ-resources.patch
|
||||||
|
patches.megous/power-supply-axp20x_battery-Send-uevents-for-status-changes.patch
|
||||||
|
patches.megous/power-supply-axp20x_battery-Monitor-battery-health.patch
|
||||||
|
patches.megous/power-supply-axp20x-usb-power-Change-Vbus-hold-voltage-to-4.5V.patch
|
||||||
|
patches.megous/power-axp803-Add-interrupts-for-low-battery-power-condition.patch
|
||||||
|
patches.megous/power-supply-axp20x-battery-Support-POWER_SUPPLY_PROP_CHARGE_BE.patch
|
||||||
|
patches.megous/power-supply-axp20x-battery-Enable-poweron-by-RTC-alarm.patch
|
||||||
|
patches.megous/power-supply-axp20x-battery-Add-support-for-POWER_SUPPLY_PROP_E.patch
|
||||||
|
patches.megous/power-supply-Add-support-for-USB_BC_ENABLED-and-USB_DCP_INPUT_C.patch
|
||||||
|
patches.megous/power-supply-axp20x-usb-power-Add-missing-interrupts.patch
|
||||||
|
patches.megous/sunxi-Use-dev_err_probe-to-handle-EPROBE_DEFER-errors.patch
|
||||||
|
patches.megous/thermal-sun8i-Be-loud-when-probe-fails.patch
|
||||||
|
patches.megous/i2c-mv64xxx-Don-t-make-a-fuss-when-pinctrl-recovery-state-is-no.patch
|
||||||
|
patches.megous/iio-st_sensors-Don-t-report-error-when-the-device-is-not-presen.patch
|
||||||
|
patches.megous/opp-core-Avoid-confusing-error-when-no-regulator-is-defined-in-.patch
|
||||||
|
patches.megous/rtc-Print-which-error-caused-RTC-read-failure.patch
|
||||||
|
patches.megous/arm64-dts-allwinner-a64-pinetab-add-front-camera.patch
|
||||||
|
patches.megous/arm64-allwinner-dts-a64-enable-K101-IM2BYL02-panel-for-PineTab.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinetab-Name-sound-card-PineTab.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinetab-Add-accelerometer.patch
|
||||||
|
patches.megous/arm64-dts-sun50i-a64-pinetab-enable-RTL8723CS-bluetooth.patch
|
||||||
|
patches.megous/usb-typec-fusb302-Slightly-increase-wait-time-for-BC1.2-result.patch
|
||||||
|
patches.megous/usb-typec-fusb302-Set-the-current-before-enabling-pullups.patch
|
||||||
|
patches.megous/usb-typec-fusb302-Extend-debugging-interface-with-driver-state-.patch
|
||||||
|
patches.megous/usb-typec-fusb302-Retry-reading-of-CC-pins-status-if-activity-i.patch
|
||||||
|
patches.megous/usb-typec-fusb302-More-useful-of-logging-status-on-interrupt.patch
|
||||||
|
patches.megous/usb-typec-fusb302-Update-VBUS-state-even-if-VBUS-interrupt-is-n.patch
|
||||||
|
patches.megous/usb-typec-fusb302-Add-OF-extcon-support.patch
|
||||||
|
patches.megous/usb-typec-fusb302-Fix-register-definitions.patch
|
||||||
|
patches.megous/usb-typec-fusb302-Clear-interrupts-before-we-start-toggling.patch
|
||||||
|
patches.megous/usb-typec-typec-extcon-Add-typec-extcon-bridge-driver.patch
|
||||||
|
patches.megous/usb-typec-typec-extcon-Enable-debugging-for-now.patch
|
||||||
|
patches.megous/usb-typec-typec-extcon-Allow-to-force-reset-on-each-mux-change.patch
|
||||||
|
patches.megous/Revert-usb-typec-tcpm-unregister-existing-source-caps-before-re.patch
|
||||||
|
patches.megous/usb-typec-altmodes-displayport-Respect-DP_CAP_RECEPTACLE-bit.patch
|
||||||
|
patches.megous/usb-typec-tcpm-Unregister-altmodes-before-registering-new-ones.patch
|
||||||
|
patches.megous/usb-typec-tcpm-Fix-PD-devices-capabilities-registration.patch
|
||||||
|
patches.megous/usb-typec-tcpm-Improve-logs.patch
|
||||||
|
patches.megous/Make-microbuttons-on-Orange-Pi-PC-and-PC-2-work-as-power-off-bu.patch
|
||||||
|
patches.megous/Add-support-for-my-private-Sapomat-device.patch
|
||||||
|
patches.megous/ARM-dts-sun8i-h3-orange-pi-one-Enable-all-gpio-header-UARTs.patch
|
||||||
|
patches.megous/mtd-spi-nor-Add-Alliance-memory-support.patch
|
||||||
|
patches.megous/Defconfigs-for-all-my-devices.patch
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# drivers/gpu/drm/sun4i/
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
patches.drm/drm-sun4i-de2-de3-Change-CSC-argument.patch
|
||||||
|
patches.drm/drm-sun4i-de2-de3-Merge-CSC-functions-into-one.patch
|
||||||
|
patches.drm/drm-sun4i-de2-de3-call-csc-setup-also-for-UI-layer.patch
|
||||||
|
patches.drm/drm-sun4i-de2-Initialize-layer-fields-earlier.patch
|
||||||
|
patches.drm/drm-sun4i-de3-Add-YUV-formatter-module.patch
|
||||||
|
patches.drm/drm-sun4i-de3-add-format-enumeration-function-to-engine.patch
|
||||||
|
patches.drm/drm-sun4i-de3-add-formatter-flag-to-mixer-config.patch
|
||||||
|
patches.drm/drm-sun4i-de3-add-YUV-support-to-the-DE3-mixer.patch
|
||||||
|
patches.drm/drm-sun4i-de3-pass-engine-reference-to-ccsc-setup-function.patch
|
||||||
|
patches.drm/drm-sun4i-de3-add-YUV-support-to-the-color-space-correction-mod.patch
|
||||||
|
patches.drm/drm-sun4i-de3-add-YUV-support-to-the-TCON.patch
|
||||||
|
patches.drm/drm-sun4i-support-YUV-formats-in-VI-scaler.patch
|
||||||
|
patches.drm/drm-sun4i-de2-de3-add-mixer-version-enum.patch
|
||||||
|
patches.drm/drm-sun4i-de2-de3-refactor-mixer-initialisation.patch
|
||||||
|
patches.drm/drm-sun4i-vi_scaler-refactor-vi_scaler-enablement.patch
|
||||||
|
patches.drm/drm-sun4i-de2-de3-add-generic-blender-register-reference-functi.patch
|
||||||
|
patches.drm/drm-sun4i-de2-de3-use-generic-register-reference-function-for-l.patch
|
||||||
|
patches.drm/drm-sun4i-de3-Implement-AFBC-support.patch
|
||||||
|
patches.drm/dt-bindings-allwinner-add-H616-DE33-bus-binding.patch
|
||||||
|
patches.drm/dt-bindings-allwinner-add-H616-DE33-clock-binding.patch
|
||||||
|
patches.drm/dt-bindings-allwinner-add-H616-DE33-mixer-binding.patch
|
||||||
|
patches.drm/clk-sunxi-ng-ccu-add-Display-Engine-3.3-DE33-support.patch
|
||||||
|
patches.drm/drm-sun4i-de33-mixer-add-Display-Engine-3.3-DE33-support.patch
|
||||||
|
patches.drm/drm-sun4i-de33-vi_scaler-add-Display-Engine-3.3-DE33-support.patch
|
||||||
|
patches.drm/drm-sun4i-de33-fmt-add-Display-Engine-3.3-DE33-support.patch
|
||||||
|
patches.drm/drm-sun4i-de33-csc-add-Display-Engine-3.3-DE33-support.patch
|
||||||
|
patches.drm/drm-sun4i-add-sun50i-h616-hdmi-phy-support.patch
|
||||||
|
patches.drm/add-TCON-global-control-reg-for-pad-selection.patch
|
||||||
|
patches.drm/dt-bindings-power-Add-Allwinner-H6-H616-PRCM-PPU.patch
|
||||||
|
patches.drm/pmdomain-sunxi-add-H6-PRCM-PPU-driver.patch
|
||||||
|
patches.drm/dt-bindings-gpu-mali-bifrost-Add-Allwinner-H616-compatible.patch
|
||||||
|
patches.drm/arm64-dts-allwinner-h616-Add-Mali-GPU-node.patch
|
||||||
|
patches.drm/drm-panfrost-Add-PM-runtime-flags.patch
|
||||||
|
patches.drm/drm-panfrost-add-h616-compatible-string.patch
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# Armbian patches
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
patches.armbian/Doc-dt-bindings-usb-add-binding-for-DWC3-controller-on-Allwinne.patch
|
||||||
|
patches.armbian/drv-pinctrl-pinctrl-sun50i-a64-disable_strict_mode.patch
|
||||||
|
patches.armbian/drv-rtc-sun6i-support-RTCs-without-external-LOSCs.patch
|
||||||
|
patches.armbian/drv-gpu-drm-gem-dma-Export-with-handle-allocator.patch
|
||||||
|
patches.armbian/drv-gpu-drm-sun4i-Add-GEM-allocator.patch
|
||||||
|
patches.armbian/Revert-drm-sun4i-hdmi-switch-to-struct-drm_edid.patch
|
||||||
|
patches.armbian/drv-gpu-drm-sun4i-Add-HDMI-audio-sun4i-hdmi-encoder.patch
|
||||||
|
patches.armbian/drv-net-stmmac-dwmac-sun8i-second-EMAC-clock-register.patch
|
||||||
|
patches.armbian/drv-phy-sun4i-usb-Allow-reset-line-to-be-shared.patch
|
||||||
|
patches.armbian/drv-staging-media-sunxi-cedrus-add-H616-variant.patch
|
||||||
|
patches.armbian/drv-soc-sunxi-sram-Add-SRAM-C1-H616-handling.patch
|
||||||
|
patches.armbian/drv-media-dvb-frontends-si2168-fix-cmd-timeout.patch
|
||||||
|
patches.armbian/include-uapi-drm_fourcc-add-ARM-tiled-format-modifier.patch
|
||||||
|
patches.armbian/drv-clocksource-arm_arch_timer-fix-a64-timejump.patch
|
||||||
|
patches.armbian/sound-soc-sunxi-sun8i-codec-analog-enable-sound.patch
|
||||||
|
patches.armbian/sound-soc-sunxi-Provoke-the-early-load-of-sun8i-codec-analog.patch
|
||||||
|
patches.armbian/sound-soc-sunxi-sun4i-codec-adcis-select-capture-source.patch
|
||||||
|
patches.armbian/drv-mmc-host-sunxi-mmc-add-h5-emmc-compatible.patch
|
||||||
|
patches.armbian/drv-pinctrl-sunxi-pinctrl-sun50i-h6.c-GPIO-disable_strict_mode.patch
|
||||||
|
patches.armbian/drv-gpu-drm-sun4i-sun8i_mixer.c-add-h3-mixer1.patch
|
||||||
|
patches.armbian/Backport-DRM-atomic-check-function-change-from-upstream-kernel-.patch
|
||||||
|
patches.armbian/Backport-null-pointer-check-to-drm-HDMI-atomic-helper-function-.patch
|
||||||
|
patches.armbian/drv-mtd-nand-raw-nand_ids.c-add-H27UBG8T2BTR-BC-nand.patch
|
||||||
|
patches.armbian/drv-mfd-axp20x-add-sysfs-interface.patch
|
||||||
|
patches.armbian/drv-spi-spidev-Add-armbian-spi-dev-compatible.patch
|
||||||
|
patches.armbian/drv-rtc-sun6i-Add-Allwinner-H616-support.patch
|
||||||
|
patches.armbian/drv-nvmem-sunxi_sid-Support-SID-on-H616.patch
|
||||||
|
patches.armbian/drv-iio-adc-axp20x_adc-arm64-dts-axp803-hwmon-enable-thermal.patch
|
||||||
|
patches.armbian/drv-gpu-drm-panel-simple-Add-compability-olinuxino-lcd.patch
|
||||||
|
patches.armbian/drv-input-touchscreen-sun4i-ts-Enable-parsing.patch
|
||||||
|
patches.armbian/drv-mmc-host-sunxi-mmc-Disable-DDR52-mode-on-all-A20-based-boar.patch
|
||||||
|
patches.armbian/drv-usb-gadget-composite-rename-gadget-serial-console-manufactu.patch
|
||||||
|
patches.armbian/Add-FB_TFT-ST7796S-driver.patch
|
||||||
|
patches.armbian/Optimize-TSC2007-touchscreen-add-polling-method.patch
|
||||||
|
patches.armbian/Add-ws2812-RGB-driver-for-allwinner-H616.patch
|
||||||
|
patches.armbian/drv-staging-rtl8723bs-AP-bugfix.patch
|
||||||
|
patches.armbian/Fix-include-uapi-spi-spidev-module.patch
|
||||||
|
patches.armbian/Add-dump_reg-and-sunxi-sysinfo-drivers.patch
|
||||||
|
patches.armbian/Add-sunxi-addr-driver-Used-to-fix-uwe5622-bluetooth-MAC-address.patch
|
||||||
|
patches.armbian/nvmem-sunxi_sid-add-sunxi_get_soc_chipid-sunxi_get_serial.patch
|
||||||
|
patches.armbian/mmc-host-sunxi-mmc-Fix-H6-emmc.patch
|
||||||
|
patches.armbian/net-usb-r8152-add-LED-configuration-from-OF.patch
|
||||||
|
patches.armbian/drivers-devfreq-sun8i-a33-mbus-disable-autorefresh.patch
|
||||||
|
patches.armbian/clk-gate-add-support-for-regmap-based-gates.patch
|
||||||
|
patches.armbian/mfd-Add-support-for-X-Powers-AC200.patch
|
||||||
|
patches.armbian/mfd-Add-support-for-X-Powers-AC200-EPHY-syscon.patch
|
||||||
|
patches.armbian/net-phy-Add-support-for-AC200-EPHY.patch
|
||||||
|
patches.armbian/ASoC-AC200-Initial-driver.patch
|
||||||
|
patches.armbian/Input-axp20x-pek-allow-wakeup-after-shutdown.patch
|
||||||
|
patches.armbian/driver-allwinner-h618-emac.patch
|
||||||
|
patches.armbian/drivers-pwm-Add-pwm-sunxi-enhance-driver-for-h616.patch
|
||||||
|
patches.armbian/arm-patch-call-flush_icache-ASAP-after-writing-new-instruction.patch
|
||||||
|
patches.armbian/arm-arm64-dts-Add-leds-axp20x-charger.patch
|
||||||
|
patches.armbian/arm-dts-sun9i-a80-add-thermal-sensor.patch
|
||||||
|
patches.armbian/arm-dts-sun9i-a80-add-thermal-zone.patch
|
||||||
|
patches.armbian/arm-dts-sun7i-a20-Disable-OOB-IRQ-for-brcm-wifi-on-Cubietruck-a.patch
|
||||||
|
patches.armbian/arm-dts-a20-orangepi-and-mini-fix-phy-mode-hdmi.patch
|
||||||
|
patches.armbian/arm-dts-sun8i-h3-nanopi-add-leds-pio-pins.patch
|
||||||
|
patches.armbian/arm-dts-a10-cubiebord-a20-cubietruck-green-LED-mmc0-default-tri.patch
|
||||||
|
patches.armbian/arm-dts-Add-sun8i-h2-plus-nanopi-duo-device.patch
|
||||||
|
patches.armbian/arm-dts-Add-sun8i-h2-plus-sunvell-r69-device.patch
|
||||||
|
patches.armbian/arm-dts-h3-nanopi-neo-Add-regulator-leds-mmc2.patch
|
||||||
|
patches.armbian/arm-dts-h3-nanopi-neo-air-Add-regulator-camera-wifi-bluetooth-o.patch
|
||||||
|
patches.armbian/arm-dts-h3-orangepi-2-Add-regulator-vdd-cpu.patch
|
||||||
|
patches.armbian/arm-dts-sun8i-r40-bananapi-m2-ultra-add-codec-analog.patch
|
||||||
|
patches.armbian/arm-dts-sun7i-a20-cubietruck-add-alias-uart2.patch
|
||||||
|
patches.armbian/arm-dts-sun8i-v3s-s3-pinecube-enable-sound-codec.patch
|
||||||
|
patches.armbian/arm-dts-sun8i-r40-add-clk_out_a-fix-bananam2ultra.patch
|
||||||
|
patches.armbian/arm-dts-sun8i-h3-bananapi-m2-plus-add-wifi_pwrseq.patch
|
||||||
|
patches.armbian/arm-dts-sun7i-a20-bananapro-add-hdmi-connector-de.patch
|
||||||
|
patches.armbian/arm-dts-sun7i-a20-bananapro-add-AXP209-regulators.patch
|
||||||
|
patches.armbian/arm-dts-sunxi-h3-h5.dtsi-force-mmc0-bus-width.patch
|
||||||
|
patches.armbian/fix-cpu-opp-table-sun8i-a83t.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-a64-pine64-enable-wifi-mmc1.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-a64-sopine-baseboard-Add-i2s2-mmc1.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h6-Add-r_uart-uart2-3-pins.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h616.dtsi-reserved-memory-512K-for-BL31.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h616-orangepi-zero2-reg_usb1_vbus-status-ok.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h616-orangepi-zero2-Enable-GPU-mali.patch
|
||||||
|
patches.armbian/arm64-dts-allwinner-sun50i-h616-Add-VPU-node.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h616-x96-mate-T95-eth-sd-card-hack.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h616-x96-mate-add-hdmi.patch
|
||||||
|
patches.armbian/arm64-dts-allwinner-Add-axp313a.dtsi.patch
|
||||||
|
patches.armbian/arm64-dts-add-sun50i-h618-cpu-dvfs.dtsi.patch
|
||||||
|
patches.armbian/LED-green_power_on-red_status_heartbeat-arch-arm64-boot-dts-all.patch
|
||||||
|
patches.armbian/arm64-dts-allwinner-h616-orangepi-zero2-Enable-expansion-board-.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-a64-pine64-enable-Bluetooth.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-a64-sopine-baseboard-enable-Bluetooth.patch
|
||||||
|
patches.armbian/arm64-dts-nanopi-a64-set-right-phy-mode-to-rgmii-id.patch
|
||||||
|
patches.armbian/arm64-dts-FIXME-a64-olinuxino-add-regulator-audio-mmc.patch
|
||||||
|
patches.armbian/arm64-dts-Add-sun50i-h5-nanopi-k1-plus-device.patch
|
||||||
|
patches.armbian/arm64-dts-Add-sun50i-h5-nanopi-neo-core2-device.patch
|
||||||
|
patches.armbian/arm64-dts-Add-sun50i-h5-nanopi-neo2-v1.1-device.patch
|
||||||
|
patches.armbian/arm64-dts-Add-sun50i-h5-nanopi-m1-plus2-device.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h5-nanopi-neo2-add-regulator-led-triger.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h5-orangepi-pc2-add-spi-flash.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h5-orangepi-prime-add-regulator.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h5-orangepi-zero-plus-add-regulator.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h6.dtsi-improve-thermals.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h6-orangepi-3-delete-node-spi0.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h6-orangepi-lite2-spi0-usb3phy-dwc3-enable.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h6-pine-h64-add-wifi-rtl8723cs.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h6-pine-h64-add-dwc3-usb3phy.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-a64-pine64-add-spi0.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h6.dtsi-add-pinctrl-pins-for-spi.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-a64-orangepi-win-add-aliase-ethernet1.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-a64-force-mmc0-bus-width.patch
|
||||||
|
patches.armbian/drv-of-Device-Tree-Overlay-ConfigFS-interface.patch
|
||||||
|
patches.armbian/scripts-add-overlay-compilation-support.patch
|
||||||
|
patches.armbian/Enable-creation-of-__symbols__-node.patch
|
||||||
|
patches.armbian/Makefile-CONFIG_SHELL-fix-for-builddeb-packaging.patch
|
||||||
|
patches.armbian/arm-dts-overlay-Add-Overlays-for-sunxi.patch
|
||||||
|
patches.armbian/arm64-dts-allwinner-overlay-Add-Overlays-for-sunxi64.patch
|
||||||
|
patches.armbian/arm-dts-overlay-sun8i-h3-cpu-clock-add-overclock.patch
|
||||||
|
patches.armbian/arm64-dts-overlay-sun50i-a64-pine64-7inch-lcd.patch
|
||||||
|
patches.armbian/arm64-dts-overlay-sun50i-h5-add-gpio-regulator-overclock.patch
|
||||||
|
patches.armbian/Move-sun50i-h6-pwm-settings-to-its-own-overlay.patch
|
||||||
|
patches.armbian/Compile-the-pwm-overlay.patch
|
||||||
|
patches.armbian/cb1-overlay.patch
|
||||||
|
patches.armbian/Correct-perf-interrupt-source-number-as-referenced-in-the-Allwi.patch
|
||||||
|
patches.armbian/Enable-DMA-support-for-the-Allwinner-A10-EMAC-which-already-exi.patch
|
||||||
|
patches.armbian/Re-introduce-spi-overlays-for-each-bus-so-that-pins-are-muxed-c.patch
|
||||||
|
patches.armbian/2-Re-introduce-spi-overlays-for-each-bus-so-that-pins-are-muxed-c.patch
|
||||||
|
patches.armbian/Add-HDMI-support-for-pcDuino-1-and-2-by-including-HDMI-and-DE-n.patch
|
||||||
|
patches.armbian/Add-HDMI-support-for-pcDuino-3-by-including-HDMI-and-DE-nodes.patch
|
||||||
|
patches.armbian/arm-dts-sunxi-h3-h5.dtsi-add-i2s0-i2s1-pins.patch
|
||||||
|
patches.armbian/arm-dts-sun5i-a13-olinuxino-micro-add-panel-lcd-olinuxino-4.3.patch
|
||||||
|
patches.armbian/arm-dts-sun5i-a13-olinuxino-Add-panel-lcd-olinuxino-4.3-needed-.patch
|
||||||
|
patches.armbian/arm-dts-sun7i-a20-olinuxino-micro-emmc-Add-vqmmc-node.patch
|
||||||
|
patches.armbian/arm-dts-sun7i-a20-olinuxino-lime2-enable-audio-codec.patch
|
||||||
|
patches.armbian/arm-dts-sun7i-a20-olinuxino-lime2-enable-ldo3-always-on.patch
|
||||||
|
patches.armbian/arm-dts-sun7i-a20-olimex-som-204-evb-olinuxino-micro-decrease-d.patch
|
||||||
|
patches.armbian/arm-dts-sun8i-h3-add-thermal-zones.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-a64-olinuxino-add-boards.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-a64-olinuxino-emmc-enable-bluetooth.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-a64-olinuxino-1Ge16GW-enable-bluetooth.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-a64.dtsi-adjust-thermal-trip-points.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-a64-olinuxino-1Ge16GW-Disable-clock-phase-and-.patch
|
||||||
|
patches.armbian/Temp_fix-mailbox-arch-arm64-boot-dts-allwinner-sun50i-a64-pinep.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h6-orangepi-3-add-r_uart-aliase.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h5-add-cpu-opp-refs.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h5-add-termal-zones.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h6-orangepi-add-cpu-opp-refs.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h6-orangepi-enable-higher-clock-regulator-max-.patch
|
||||||
|
patches.armbian/arm-dts-sun8i-h3-orangepi-pc-plus-add-wifi_pwrseq.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h5-orangepi-prime-add-rtl8723cs.patch
|
||||||
|
patches.armbian/arm-dts-sun8i-h2-plus-orangepi-zero-fix-xradio-interrupt.patch
|
||||||
|
patches.armbian/arm64-dts-allwinner-sun50i-h6-Fix-H6-emmc.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h5-nanopi-r1s-h5-add-rtl8153-support.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h616-bigtreetech-cb1-sd-emmc.patch
|
||||||
|
patches.armbian/ARM-dts-sun8i-nanopiduo2-Use-key-0-as-power-button.patch
|
||||||
|
patches.armbian/ARM-dts-sun8i-nanopiduo2-enable-ethernet.patch
|
||||||
|
patches.armbian/arm-dts-sun8i-h3-reduce-opp-microvolt-to-prevent-not-supported-.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h5-enable-power-button-for-orangepi-prime.patch
|
||||||
|
patches.armbian/enable-TV-Output-on-OrangePi-Zero-LTE.patch
|
||||||
|
patches.armbian/arm64-dts-allwinner-h6-Add-AC200-EPHY-nodes.patch
|
||||||
|
patches.armbian/arm64-dts-allwinner-h6-tanix-enable-Ethernet.patch
|
||||||
|
patches.armbian/arm64-dts-allwinner-h6-add-AC200-codec-nodes.patch
|
||||||
|
patches.armbian/arm64-dts-allwinner-h6-enable-AC200-codec.patch
|
||||||
|
patches.armbian/add-nodes-for-sunxi-info-sunxi-addr-and-sunxi-dump-reg.patch
|
||||||
|
patches.armbian/Add-wifi-nodes-for-Inovato-Quadra.patch
|
||||||
|
patches.armbian/arm64-dts-h616-add-wifi-support-for-orange-pi-zero-2-and-zero3.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h618-orangepi-zero3-Enable-GPU-mali.patch
|
||||||
|
patches.armbian/arm64-dts-h616-add-hdmi-support-for-zero2-and-zero3.patch
|
||||||
|
patches.armbian/arm64-sun50i-h616-Add-i2c-2-3-4-uart-2-5-pins.patch
|
||||||
|
patches.armbian/arm64-dts-h616-8-Add-overlays-i2c-234-ph-pg-uart-25-ph-pg.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h618-orangepi-zero2w-Add-missing-nodes.patch
|
||||||
|
patches.armbian/add-dtb-overlay-for-zero2w.patch
|
||||||
|
patches.armbian/Sound-for-H616-H618-Allwinner-SOCs.patch
|
||||||
|
patches.armbian/ARM64-dts-sun50i-h616-BigTreeTech-CB1-Enable-HDMI.patch
|
||||||
|
patches.armbian/ARM64-dts-sun50i-h616-BigTreeTech-CB1-Enable-EMAC1.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h313-x96q-lpddr3.patch
|
||||||
|
patches.armbian/Add-BananaPi-BPI-M4-Zero-pinctrl.patch
|
||||||
|
patches.armbian/Add-BananaPi-BPI-M4-Zero-overlays.patch
|
||||||
|
patches.armbian/Fix-ghost-touches-on-tsc2007-tft-screen.patch
|
||||||
|
patches.armbian/arm-dts-sun8i-h2-plus-orangepi-zero-fix-usb_otg-dr_mode.patch
|
||||||
|
patches.armbian/BigTreeTech-CB1-dts-i2c-gpio-mode-adjustment-and-ws2812-rgb_val.patch
|
||||||
|
patches.armbian/arm64-dts-sun50i-h616-Add-i2c3-pa-pwm-pins.patch
|
||||||
|
patches.armbian/arm64-allwinner-Add-sun50i-h618-bananapi-m4-berry-support.patch
|
||||||
|
patches.armbian/sun50i-h616-Add-the-missing-digital-audio-nodes.patch
|
||||||
33
patches/uwe5622/firmware.nix
Normal file
33
patches/uwe5622/firmware.nix
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
stdenvNoCC,
|
||||||
|
lib,
|
||||||
|
fetchFromGitHub,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
stdenvNoCC.mkDerivation {
|
||||||
|
pname = "uwe5622-firmware";
|
||||||
|
version = "4050e02";
|
||||||
|
|
||||||
|
compressFirmware = false;
|
||||||
|
dontFixup = true;
|
||||||
|
dontBuild = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "armbian";
|
||||||
|
repo = "firmware";
|
||||||
|
rev = "4050e02da2dce2b74c97101f7964ecfb962f5aec";
|
||||||
|
sha256 = "sha256-wc4xyNtUlONntofWJm8/w0KErJzXKHijOyh9hAYTCoU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/lib/firmware
|
||||||
|
cp -r uwe5622/* $out/lib/firmware/
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Firmware for the uwe5622 from armbian.";
|
||||||
|
homepage = "https://github.com/armbian/firmware";
|
||||||
|
license = lib.licenses.unfreeRedistributableFirmware;
|
||||||
|
platforms = [ "aarch64-linux" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user