Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-6.6 = .92
|
||||
LINUX_KERNEL_HASH-6.6.92 = 1d82a82642d281c31d86f7301bc55e12a8a9f9c04532e249ef8ae6fe7dc237ec
|
||||
LINUX_VERSION-6.6 = .93
|
||||
LINUX_KERNEL_HASH-6.6.93 = 0d79ff359635e9f009f1e330deed5f3aefd8c452b80660bffdc504b877797719
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
PKG_NAME ?= trusted-firmware-a
|
||||
PKG_CPE_ID ?= cpe:/a:arm:trusted_firmware-a
|
||||
|
||||
ifndef PKG_SOURCE_PROTO
|
||||
PKG_SOURCE = trusted-firmware-a-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/TrustedFirmware-A/trusted-firmware-a/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_LTS ?=
|
||||
|
||||
ifneq ($(PKG_LTS),)
|
||||
PKG_VERSION_PREFIX:=lts-v
|
||||
PKG_BUILD_DIR = $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION_PREFIX)$(PKG_VERSION)
|
||||
else
|
||||
PKG_VERSION_PREFIX:=v
|
||||
PKG_BUILD_DIR = $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
endif
|
||||
|
||||
PKG_BUILD_DIR = $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
ifndef PKG_SOURCE_PROTO
|
||||
PKG_SOURCE = trusted-firmware-a-$(PKG_VERSION_PREFIX)$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/TrustedFirmware-A/trusted-firmware-a/tar.gz/$(PKG_VERSION_PREFIX)$(PKG_VERSION)?
|
||||
endif
|
||||
|
||||
PKG_TARGETS := bin
|
||||
PKG_FLAGS:=nonshared
|
||||
@@ -82,7 +90,7 @@ define Build/Compile/Trusted-Firmware-A
|
||||
OPENSSL_DIR=$(STAGING_DIR_HOST) \
|
||||
$(if $(DTC),DTC="$(DTC)") \
|
||||
PLAT=$(PLAT) \
|
||||
BUILD_STRING="ImmortalWrt v$(PKG_VERSION)-$(PKG_RELEASE) ($(VARIANT))" \
|
||||
BUILD_STRING="ImmortalWrt $(PKG_VERSION_PREFIX)$(PKG_VERSION)-$(PKG_RELEASE) ($(VARIANT))" \
|
||||
$(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \
|
||||
$(TFA_MAKE_FLAGS)
|
||||
endef
|
||||
|
||||
@@ -142,10 +142,7 @@ else
|
||||
$(call ERROR_MESSAGE,WARNING: Applying padding in $$d/Packages to workaround usign SHA-512 bug!); \
|
||||
{ echo ""; echo ""; } >> Packages;; \
|
||||
esac; \
|
||||
echo -n '{"architecture": "$(ARCH_PACKAGES)", "packages":{' > index.json; \
|
||||
sed -n -e 's/^Package: \(.*\)$$/"\1":/p' -e 's/^Version: \(.*\)$$/"\1",/p' Packages | tr '\n' ' ' >> index.json; \
|
||||
echo '}}' >> index.json; \
|
||||
sed -i 's/, }}/}}/' index.json; \
|
||||
$(SCRIPT_DIR)/make-index-json.py -f opkg -a "$(ARCH_PACKAGES)" Packages > index.json; \
|
||||
gzip -9nc Packages > Packages.gz; \
|
||||
); done
|
||||
ifdef CONFIG_SIGNED_PACKAGES
|
||||
|
||||
@@ -7,10 +7,11 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_VERSION:=2.10
|
||||
PKG_VERSION:=2.10.17
|
||||
PKG_RELEASE:=1
|
||||
PKG_LTS:=1
|
||||
|
||||
PKG_HASH:=88215a62291b9ba87da8e50b077741103cdc08fb6c9e1ebd34dfaace746d3201
|
||||
PKG_HASH:=2558b2579dd1c45db6de89c49e647c109022d45da03eb74e0f6123c294295099
|
||||
PKG_MAINTAINER:=Thomas Richard <thomas.richard@bootlin.com>
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
@@ -138,6 +138,9 @@ smartrg,sdg-8734)
|
||||
local envdev=$(find_mmc_part "u-boot-env" "mmcblk0")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x8000" "0x8000"
|
||||
;;
|
||||
tplink,archer-ax80-v1)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" "8"
|
||||
;;
|
||||
ubnt,unifi-6-plus)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x10000"
|
||||
;;
|
||||
|
||||
@@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=strace
|
||||
PKG_VERSION:=6.11
|
||||
PKG_VERSION:=6.12
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION)
|
||||
PKG_HASH:=83262583a3529f02c3501aa8b8ac772b4cbc03dc934e98bab6e4883626e283a5
|
||||
PKG_HASH:=c47da93be45b6055f4dc741d7f20efaf50ca10160a5b100c109b294fd9c0bdfe
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=LGPL-2.1-or-later
|
||||
|
||||
@@ -73,7 +73,7 @@ define Package/ipq-wifi-default
|
||||
SUBMENU:=ath10k Board-Specific Overrides
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
DEPENDS:=@(TARGET_ipq40xx||TARGET_ipq806x||TARGET_qualcommax)
|
||||
DEPENDS:=@(TARGET_ath79||TARGET_ipq40xx||TARGET_ipq806x||TARGET_qualcommax)
|
||||
TITLE:=Custom Board
|
||||
endef
|
||||
|
||||
|
||||
@@ -116,17 +116,35 @@ I2C_DWPCI_MODULES:= \
|
||||
|
||||
define KernelPackage/i2c-designware-pci
|
||||
$(call i2c_defaults,$(I2C_DWPCI_MODULES),59)
|
||||
TITLE:=Synopsys DesignWare PCI
|
||||
TITLE:=Synopsys DesignWare I2C PCI
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-i2c-designware-core +kmod-i2c-ccgs-ucsi
|
||||
endef
|
||||
|
||||
define KernelPackage/i2c-designware-pci/description
|
||||
Support for Synopsys DesignWare I2C controller. Only master mode is supported.
|
||||
Support for Synopsys DesignWare I2C PCI controller. Only master mode is
|
||||
supported.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-designware-pci))
|
||||
|
||||
|
||||
I2C_DWPLAT_MODULES:= \
|
||||
CONFIG_I2C_DESIGNWARE_PLATFORM:drivers/i2c/busses/i2c-designware-platform
|
||||
|
||||
define KernelPackage/i2c-designware-platform
|
||||
$(call i2c_defaults,$(I2C_DWPLAT_MODULES),59)
|
||||
TITLE:=Synopsys DesignWare I2C Platform
|
||||
DEPENDS:=+kmod-i2c-designware-core
|
||||
endef
|
||||
|
||||
define KernelPackage/i2c-designware-platform/description
|
||||
Support for Synopsys DesignWare I2C Platform controller. Only master mode
|
||||
is supported.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-designware-platform))
|
||||
|
||||
|
||||
I2C_GPIO_MODULES:= \
|
||||
CONFIG_I2C_GPIO:drivers/i2c/busses/i2c-gpio
|
||||
|
||||
|
||||
@@ -299,6 +299,23 @@ endef
|
||||
$(eval $(call KernelPackage,leds-lp55xx-common))
|
||||
|
||||
|
||||
define KernelPackage/leds-lp5523
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=LED driver for LP5523/LP55231 controllers
|
||||
DEPENDS:=+kmod-i2c-core +kmod-leds-lp55xx-common
|
||||
KCONFIG:=CONFIG_LEDS_LP5523
|
||||
FILES:=$(LINUX_DIR)/drivers/leds/leds-lp5523.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,leds-lp5523,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/leds-lp5523/description
|
||||
This option enables support for Texas Instruments LP5523/LP55231
|
||||
LED controllers.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,leds-lp5523))
|
||||
|
||||
|
||||
define KernelPackage/leds-lp5562
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=LED driver for LP5562 controllers
|
||||
|
||||
@@ -2071,3 +2071,19 @@ define KernelPackage/amazon-ena/description
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,amazon-ena))
|
||||
|
||||
define KernelPackage/enc28j60
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Microchip ENC28J60 SPI Ethernet driver
|
||||
KCONFIG:=\
|
||||
CONFIG_ENC28J60 \
|
||||
CONFIG_ENC28J60_WRITEVERIFY=n
|
||||
FILES:=$(LINUX_DIR)/drivers/net/ethernet/microchip/enc28j60.ko
|
||||
AUTOLOAD:=$(call AutoProbe,enc28j60)
|
||||
endef
|
||||
|
||||
define KernelPackage/enc28j60/description
|
||||
Kernel module for Microchip ENC28J60 SPI Ethernet controller
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,enc28j60))
|
||||
|
||||
@@ -73,3 +73,41 @@ define KernelPackage/spi-dev/description
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,spi-dev))
|
||||
|
||||
|
||||
define KernelPackage/spi-dw
|
||||
SUBMENU:=$(SPI_MENU)
|
||||
TITLE:=DesignWare SPI controller driver (core)
|
||||
KCONFIG:=\
|
||||
CONFIG_SPI=y \
|
||||
CONFIG_SPI_DESIGNWARE \
|
||||
CONFIG_SPI_DYNAMIC=y \
|
||||
CONFIG_SPI_MASTER=y
|
||||
FILES:=\
|
||||
$(LINUX_DIR)/drivers/spi/spi-dw.ko
|
||||
AUTOLOAD:=$(call AutoProbe,spi-dw)
|
||||
endef
|
||||
|
||||
define KernelPackage/spi-dw/description
|
||||
This package contains the DesignWare SPI core driver.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,spi-dw))
|
||||
|
||||
|
||||
define KernelPackage/spi-dw-mmio
|
||||
SUBMENU:=$(SPI_MENU)
|
||||
TITLE:=DesignWare SPI controller driver (MMIO)
|
||||
DEPENDS:=+kmod-spi-dw
|
||||
KCONFIG:=\
|
||||
CONFIG_SPI_DW_MMIO
|
||||
FILES:=\
|
||||
$(LINUX_DIR)/drivers/spi/spi-dw-mmio.ko
|
||||
AUTOLOAD:=$(call AutoProbe,spi-dw-mmio)
|
||||
endef
|
||||
|
||||
define KernelPackage/spi-dw-mmio/description
|
||||
This package contains the DesignWare SPI MMIO driver.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,spi-dw-mmio))
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=r8125
|
||||
PKG_VERSION:=9.015.00
|
||||
PKG_RELEASE:=4
|
||||
PKG_VERSION:=9.016.00
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8125/releases/download/$(PKG_VERSION)
|
||||
PKG_HASH:=7d6906336c3ad960c3e7c0299ad655659d7110bdc933c5b568b7f2536cb8ffc3
|
||||
PKG_HASH:=cd1955dd07d2f5a6faaa210ffc4e8af992421295a32ab6ddcfa759bed9eba922
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_LICENSE:=GPLv2
|
||||
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
|
||||
--- a/src/r8125.h
|
||||
+++ b/src/r8125.h
|
||||
@@ -1687,6 +1687,9 @@ enum RTL8125_register_content {
|
||||
@@ -1726,6 +1726,9 @@ enum RTL8125_register_content {
|
||||
LinkStatus = 0x02,
|
||||
FullDup = 0x01,
|
||||
|
||||
@@ -38,7 +38,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/delay.h>
|
||||
@@ -5023,6 +5024,38 @@ rtl8125_link_down_patch(struct net_devic
|
||||
@@ -5045,6 +5046,38 @@ rtl8125_link_down_patch(struct net_devic
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
static void
|
||||
_rtl8125_check_link_status(struct net_device *dev, unsigned int link_state)
|
||||
{
|
||||
@@ -5035,11 +5068,18 @@ _rtl8125_check_link_status(struct net_de
|
||||
@@ -5057,11 +5090,18 @@ _rtl8125_check_link_status(struct net_de
|
||||
if (link_state == R8125_LINK_STATE_ON) {
|
||||
rtl8125_link_on_patch(dev);
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
#include <linux/if_vlan.h>
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/interrupt.h>
|
||||
@@ -14221,6 +14222,25 @@ rtl8125_setup_mqs_reg(struct rtl8125_pri
|
||||
tp->imr_reg[i] = (u16)(IMR1_8125 + (i - 1) * 4);
|
||||
@@ -14807,6 +14808,25 @@ rtl8125_restore_phy_fuse_dout(struct rtl
|
||||
return;
|
||||
}
|
||||
|
||||
+static int
|
||||
@@ -34,12 +34,11 @@
|
||||
static void
|
||||
rtl8125_init_software_variable(struct net_device *dev)
|
||||
{
|
||||
@@ -14677,6 +14697,8 @@ rtl8125_init_software_variable(struct ne
|
||||
@@ -15309,6 +15329,7 @@ rtl8125_init_software_variable(struct ne
|
||||
else if (tp->InitRxDescType == RX_DESC_RING_TYPE_4)
|
||||
tp->rtl8125_rx_config &= ~EnableRxDescV4_1;
|
||||
|
||||
+ rtl8125_led_configuration(tp);
|
||||
+
|
||||
tp->NicCustLedValue = RTL_R16(tp, CustomLED);
|
||||
rtl8125_backup_led_select(tp);
|
||||
|
||||
tp->wol_opts = rtl8125_get_hw_wol(tp);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/r8125_n.c
|
||||
+++ b/src/r8125_n.c
|
||||
@@ -15723,6 +15723,7 @@ rtl8125_init_board(struct pci_dev *pdev,
|
||||
@@ -16360,6 +16360,7 @@ rtl8125_init_board(struct pci_dev *pdev,
|
||||
void __iomem *ioaddr;
|
||||
struct net_device *dev;
|
||||
struct rtl8125_private *tp;
|
||||
@@ -8,7 +8,7 @@
|
||||
int rc = -ENOMEM, i, pm_cap;
|
||||
|
||||
assert(ioaddr_out != NULL);
|
||||
@@ -15737,6 +15738,9 @@ rtl8125_init_board(struct pci_dev *pdev,
|
||||
@@ -16374,6 +16375,9 @@ rtl8125_init_board(struct pci_dev *pdev,
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,11 @@ PKG_RELEASE=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git
|
||||
PKG_MIRROR_HASH:=a4f671d10840fd8487394335636051a6df5edf6d8854af4fcb834a590efb240a
|
||||
PKG_SOURCE_DATE:=2024-03-29
|
||||
PKG_SOURCE_VERSION:=eb9bcb64185ac155c02cc1a604692c4b00368324
|
||||
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
|
||||
PKG_MIRROR_HASH:=e10144cfae155cf2ae5fdf167bd575dbf34c7751ddb112554b6962003f989b36
|
||||
PKG_SOURCE_DATE:=2024-12-19
|
||||
PKG_SOURCE_DATE_ABI:=2024-03-29
|
||||
PKG_SOURCE_VERSION:=3868f47c8f6c6570e62a3cdf8a7f26ffb1a67e6a
|
||||
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE_ABI))
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=ISC
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libxml2
|
||||
PKG_VERSION:=2.13.4
|
||||
PKG_VERSION:=2.13.6
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@GNOME/libxml2/$(basename $(PKG_VERSION))
|
||||
PKG_HASH:=65d042e1c8010243e617efb02afda20b85c2160acdbfbcb5b26b80cec6515650
|
||||
PKG_HASH:=f453480307524968f7a04ec65e64f2a83a825973bcd260a2e7691be82ae70c96
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
|
||||
PKG_SOURCE_DATE:=2024-12-17
|
||||
PKG_SOURCE_VERSION:=ea01ed41f3212ecbe000422f3c122a01b93fe874
|
||||
PKG_MIRROR_HASH:=dbaad26c1f9b15d0caff6ccdf80d85b34d96bda72cbd2b1dc188a04136d96c28
|
||||
PKG_SOURCE_DATE:=2025-05-23
|
||||
PKG_SOURCE_VERSION:=7901e66c5f273bceee8981bc8a0c8b0e60945f60
|
||||
PKG_MIRROR_HASH:=8b85ec64e446ae065b1466c520b2d3aae329b6167221e425af903777278f557e
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2008-2015 OpenWrt.org
|
||||
# shellcheck disable=1091,2034,3037,3043,3045
|
||||
# shellcheck disable=1091,2034,3037,3043,3045,3057
|
||||
|
||||
START=90
|
||||
STOP=01
|
||||
@@ -24,15 +24,63 @@ LLDPD_RESTART_HASH=${LLDPD_RUN}/lldpd.restart_hash
|
||||
|
||||
. "$IPKG_INSTROOT/lib/functions/network.sh"
|
||||
|
||||
# Load release info once for all 'find_*' functions
|
||||
[ -s /etc/os-release ] && . /etc/os-release
|
||||
|
||||
# Helper function to truncate output to 31 characters
|
||||
truncate_output() {
|
||||
# Some devices have trouble decoding inventory TLV strings > 31 chars
|
||||
# lldpd truncates inventory TLV to a total TLV length of 36 (of which string = 32)
|
||||
echo "${1:0:31}"
|
||||
}
|
||||
|
||||
find_release_info()
|
||||
{
|
||||
[ -s /etc/os-release ] && . /etc/os-release
|
||||
[ -z "$PRETTY_NAME" ] && [ -s /etc/openwrt_version ] && \
|
||||
PRETTY_NAME="$(cat /etc/openwrt_version)"
|
||||
|
||||
echo "${PRETTY_NAME:-Unknown OpenWrt release} @ $(cat /proc/sys/kernel/hostname)"
|
||||
}
|
||||
|
||||
find_hardware_revision()
|
||||
{
|
||||
echo "${OPENWRT_DEVICE_REVISION:-Unknown hardware revision}"
|
||||
}
|
||||
|
||||
find_firmware_info()
|
||||
{
|
||||
echo "${PRETTY_NAME:-Unknown firmware release}"
|
||||
}
|
||||
|
||||
find_software_revision()
|
||||
{
|
||||
echo "${BUILD_ID:-Unknown software revision}"
|
||||
}
|
||||
|
||||
# Helper function to extract JSON values using jsonfilter
|
||||
extract_json_field() {
|
||||
local _path="$1"
|
||||
jsonfilter -q -i /etc/board.json -e "$_path" 2>/dev/null
|
||||
}
|
||||
|
||||
find_manufacturer_info()
|
||||
{
|
||||
local _id
|
||||
# extract the model->id field, e.g.: "id": "glinet,gl-mt6000",
|
||||
_id=$(extract_json_field '@.model.id')
|
||||
# stash text up to first comma
|
||||
_id="${_id%%,*}"
|
||||
echo "${_id:-Unknown manufacturer}"
|
||||
}
|
||||
|
||||
find_model_info()
|
||||
{
|
||||
local _name
|
||||
# extract the model->name field, e.g.: "name": "GL.iNet GL-MT6000"
|
||||
_name=$(extract_json_field '@.model.name')
|
||||
echo "${_name:-Unknown model name}"
|
||||
}
|
||||
|
||||
get_config_restart_hash() {
|
||||
local var="$1"
|
||||
local _string _hash v
|
||||
@@ -120,6 +168,48 @@ write_lldpd_conf()
|
||||
config_load 'lldpd'
|
||||
config_get lldp_description 'config' 'lldp_description' "$(find_release_info)"
|
||||
|
||||
# Check the 'do not send inventory' flag
|
||||
local lldpmed_no_inventory
|
||||
config_get_bool lldpmed_no_inventory 'config' 'lldpmed_no_inventory' 0
|
||||
|
||||
if [ "$lldpmed_no_inventory" = 0 ]; then
|
||||
# lldpmed_no_inventory=1 ('-i' in start_service()) prevents these from being sent
|
||||
# TIA TR-41 TLV 127 subtype 0x05
|
||||
local lldp_med_inv_hardware_revision
|
||||
config_get lldp_med_inv_hardware_revision 'config' 'lldp_med_inv_hardware_revision' "$(find_hardware_revision)"
|
||||
lldp_med_inv_hardware_revision=$(truncate_output "$lldp_med_inv_hardware_revision")
|
||||
|
||||
# TIA TR-41 TLV 127 subtype 0x06
|
||||
local lldp_med_inv_firmware_revision
|
||||
config_get lldp_med_inv_firmware_revision 'config' 'lldp_med_inv_firmware_revision' "$(find_firmware_info)"
|
||||
lldp_med_inv_firmware_revision=$(truncate_output "$lldp_med_inv_firmware_revision")
|
||||
|
||||
# TIA TR-41 TLV 127 subtype 0x07
|
||||
local lldp_med_inv_software_revision
|
||||
config_get lldp_med_inv_software_revision 'config' 'lldp_med_inv_software_revision' "$(find_software_revision)"
|
||||
lldp_med_inv_software_revision=$(truncate_output "$lldp_med_inv_software_revision")
|
||||
|
||||
# TIA TR-41 TLV 127 subtype 0x08
|
||||
local lldp_med_inv_serial_number
|
||||
config_get lldp_med_inv_serial_number 'config' 'lldp_med_inv_serial_number'
|
||||
lldp_med_inv_serial_number=$(truncate_output "$lldp_med_inv_serial_number")
|
||||
|
||||
# TIA TR-41 TLV 127 subtype 0x09
|
||||
local lldp_med_inv_manufacturer_name
|
||||
config_get lldp_med_inv_manufacturer_name 'config' 'lldp_med_inv_manufacturer_name' "$(find_manufacturer_info)"
|
||||
lldp_med_inv_manufacturer_name=$(truncate_output "$lldp_med_inv_manufacturer_name")
|
||||
|
||||
# TIA TR-41 TLV 127 subtype 0x0a
|
||||
local lldp_med_inv_model_name
|
||||
config_get lldp_med_inv_model_name 'config' 'lldp_med_inv_model_name' "$(find_model_info)"
|
||||
lldp_med_inv_model_name=$(truncate_output "$lldp_med_inv_model_name")
|
||||
|
||||
# TIA TR-41 TLV 127 subtype 0x0b
|
||||
local lldp_med_inv_asset_id
|
||||
config_get lldp_med_inv_asset_id 'config' 'lldp_med_inv_asset_id'
|
||||
lldp_med_inv_asset_id=$(truncate_output "$lldp_med_inv_asset_id")
|
||||
fi
|
||||
|
||||
local lldp_hostname
|
||||
config_get lldp_hostname 'config' 'lldp_hostname' "$(cat /proc/sys/kernel/hostname)"
|
||||
|
||||
@@ -182,6 +272,17 @@ write_lldpd_conf()
|
||||
[ -n "$lldp_mgmt_ip" ] && echo "configure system ip management pattern" "\"$lldp_mgmt_ip\"" >> "$LLDPD_CONF"
|
||||
[ -n "$lldp_syscapabilities" ] && echo "configure system capabilities enabled $lldp_syscapabilities" >> "$LLDPD_CONF"
|
||||
|
||||
if [ "$lldpmed_no_inventory" = 0 ]; then
|
||||
# Hardware inventory info
|
||||
[ -n "$lldp_med_inv_hardware_revision" ] && echo "configure inventory hardware-revision \"$lldp_med_inv_hardware_revision\"" >> "$LLDPD_CONF"
|
||||
[ -n "$lldp_med_inv_firmware_revision" ] && echo "configure inventory firmware-revision \"$lldp_med_inv_firmware_revision\"" >> "$LLDPD_CONF"
|
||||
[ -n "$lldp_med_inv_software_revision" ] && echo "configure inventory software-revision \"$lldp_med_inv_software_revision\"" >> "$LLDPD_CONF"
|
||||
[ -n "$lldp_med_inv_serial_number" ] && echo "configure inventory serial-number \"$lldp_med_inv_serial_number\"" >> "$LLDPD_CONF"
|
||||
[ -n "$lldp_med_inv_manufacturer_name" ] && echo "configure inventory manufacturer \"$lldp_med_inv_manufacturer_name\"" >> "$LLDPD_CONF"
|
||||
[ -n "$lldp_med_inv_model_name" ] && echo "configure inventory model \"$lldp_med_inv_model_name\"" >> "$LLDPD_CONF"
|
||||
[ -n "$lldp_med_inv_asset_id" ] && echo "configure inventory asset \"$lldp_med_inv_asset_id\"" >> "$LLDPD_CONF"
|
||||
fi
|
||||
|
||||
if [ "$CONFIG_LLDPD_WITH_LLDPMED" = "y" ] && [ "$lldpmed_fast_start" -gt 0 ]; then
|
||||
if [ "$lldpmed_fast_start_tx_interval" -gt 0 ]; then
|
||||
echo "configure med fast-start tx-interval $lldpmed_fast_start_tx_interval" >> "$LLDPD_CONF"
|
||||
@@ -401,6 +502,14 @@ reload_service() {
|
||||
unconfigure system hostname
|
||||
unconfigure system ip management pattern
|
||||
unconfigure system platform
|
||||
# Hardware inventory info
|
||||
unconfigure inventory hardware-revision
|
||||
unconfigure inventory firmware-revision
|
||||
unconfigure inventory software-revision
|
||||
unconfigure inventory serial-number
|
||||
unconfigure inventory manufacturer
|
||||
unconfigure inventory model
|
||||
unconfigure inventory asset
|
||||
EOF
|
||||
if [ "$CONFIG_LLDPD_WITH_LLDPMED" = "y" ]; then
|
||||
$LLDPCLI -u "$LLDPSOCKET" >/dev/null 2>&1 <<-EOF
|
||||
|
||||
@@ -34,17 +34,20 @@ proto_qmi_init_config() {
|
||||
|
||||
proto_qmi_setup() {
|
||||
local interface="$1"
|
||||
local dataformat connstat plmn_mode mcc mnc
|
||||
local device apn v6apn auth username password pincode delay modes pdptype
|
||||
local profile v6profile dhcp dhcpv6 autoconnect plmn timeout mtu $PROTO_DEFAULT_OPTIONS
|
||||
local ip4table ip6table
|
||||
local cid_4 pdh_4 cid_6 pdh_6
|
||||
local ip_6 ip_prefix_length gateway_6 dns1_6 dns2_6
|
||||
|
||||
local connstat dataformat mcc mnc plmn_mode
|
||||
local cid_4 cid_6 pdh_4 pdh_6
|
||||
local dns1_6 dns2_6 gateway_6 ip_6 ip_prefix_length
|
||||
local profile_pdptype
|
||||
|
||||
json_get_vars device apn v6apn auth username password pincode delay modes
|
||||
json_get_vars pdptype profile v6profile dhcp dhcpv6 sourcefilter delegate autoconnect plmn ip4table
|
||||
json_get_vars ip6table timeout mtu $PROTO_DEFAULT_OPTIONS
|
||||
local delegate ip4table ip6table mtu sourcefilter $PROTO_DEFAULT_OPTIONS
|
||||
json_get_vars delegate ip4table ip6table mtu sourcefilter $PROTO_DEFAULT_OPTIONS
|
||||
|
||||
local apn auth delay device modes password pdptype pincode username v6apn
|
||||
json_get_vars apn auth delay device modes password pdptype pincode username v6apn
|
||||
|
||||
local profile v6profile dhcp dhcpv6 autoconnect plmn timeout
|
||||
json_get_vars profile v6profile dhcp dhcpv6 autoconnect plmn timeout
|
||||
|
||||
[ "$timeout" = "" ] && timeout="10"
|
||||
|
||||
@@ -104,7 +107,7 @@ proto_qmi_setup() {
|
||||
# Check if UIM application is stuck in illegal state
|
||||
local uim_state_timeout=0
|
||||
while true; do
|
||||
json_load "$(uqmi -s -d "$device" -t 1000 --uim-get-sim-state)"
|
||||
json_load "$(uqmi -s -d "$device" -t 2000 --uim-get-sim-state)"
|
||||
json_get_var card_application_state card_application_state
|
||||
|
||||
# SIM card is either completely absent or state is labeled as illegal
|
||||
@@ -119,7 +122,7 @@ proto_qmi_setup() {
|
||||
|
||||
if [ "$uim_state_timeout" -lt "$timeout" ] || [ "$timeout" = "0" ]; then
|
||||
let uim_state_timeout++
|
||||
sleep 1
|
||||
sleep 5
|
||||
continue
|
||||
fi
|
||||
|
||||
|
||||
@@ -5,10 +5,11 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git
|
||||
PKG_SOURCE_DATE:=2025-01-02
|
||||
PKG_SOURCE_VERSION:=afa57cce0aff82f4a7a0e509d4387ebc23dd3be7
|
||||
PKG_MIRROR_HASH:=a0b3c1961f5f49d31c34a44576ce44538c3ee97bfce97f86f732d7ecc1df9798
|
||||
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
|
||||
PKG_SOURCE_DATE:=2025-05-16
|
||||
PKG_SOURCE_DATE_ABI:=2025-01-02
|
||||
PKG_SOURCE_VERSION:=88e6325092bf1d1cfa877cd220670fa7cc2fad03
|
||||
PKG_MIRROR_HASH:=8af913d18c9f50cabfd3d32ce3462028ecf469d5e649ccf7f642d9d6bd6dc695
|
||||
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE_ABI))
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=LGPL-2.1
|
||||
|
||||
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=https://github.com/jow-/ucode.git
|
||||
PKG_SOURCE_DATE:=2025-02-10
|
||||
PKG_SOURCE_VERSION:=a8a11aea0c093d669bb3c45f604dab3c291c8d25
|
||||
PKG_MIRROR_HASH:=e08c36818a72eb2953b56300207d1fb7a852ada33df36f63a495ad35ca21b88e
|
||||
PKG_SOURCE_DATE:=2025-05-11
|
||||
PKG_SOURCE_VERSION:=d5b3a9dc1091dd28cf6f0f60cd34fc322ef27717
|
||||
PKG_MIRROR_HASH:=cd8af9d5ac28e2530b56015a3f2fcf6f36062546cac8b23a5f7b75b367209b54
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=ISC
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Fri, 9 May 2025 11:57:57 +0200
|
||||
Subject: [PATCH] ubus: fix double registry clear on disconnect
|
||||
|
||||
Set c->registry_index to -1 in order to ensure that the resource free path
|
||||
does not clobber registry items of unrelated connections.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/lib/ubus.c
|
||||
+++ b/lib/ubus.c
|
||||
@@ -2375,8 +2375,11 @@ uc_ubus_channel_disconnect_cb(struct ubu
|
||||
c->ctx.sock.fd = -1;
|
||||
}
|
||||
|
||||
- if (c->registry_index >= 0)
|
||||
- connection_reg_clear(c->vm, c->registry_index);
|
||||
+ if (c->registry_index >= 0) {
|
||||
+ int idx = c->registry_index;
|
||||
+ c->registry_index = -1;
|
||||
+ connection_reg_clear(c->vm, idx);
|
||||
+ }
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
@@ -0,0 +1,27 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Mon, 12 May 2025 12:43:44 +0200
|
||||
Subject: [PATCH] ubus: fix use-after-free on deferred request reply() method
|
||||
|
||||
Hold a reference to the defer resource as long as it is still needed
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/lib/ubus.c
|
||||
+++ b/lib/ubus.c
|
||||
@@ -636,6 +636,7 @@ uc_ubus_call_user_cb(uc_ubus_deferred_t
|
||||
uc_value_t *this, *func;
|
||||
|
||||
request_reg_get(defer->vm, defer->registry_index, &this, &func, NULL, NULL);
|
||||
+ ucv_get(this);
|
||||
|
||||
if (ucv_is_callable(func)) {
|
||||
uc_vm_stack_push(defer->vm, ucv_get(this));
|
||||
@@ -648,6 +649,7 @@ uc_ubus_call_user_cb(uc_ubus_deferred_t
|
||||
}
|
||||
|
||||
request_reg_clear(defer->vm, defer->registry_index);
|
||||
+ ucv_put(this);
|
||||
}
|
||||
|
||||
static void
|
||||
84
scripts/make-index-json.py
Executable file
84
scripts/make-index-json.py
Executable file
@@ -0,0 +1,84 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Parse the native package index files into a json file for use by downstream
|
||||
tools. See:
|
||||
|
||||
https://github.com/openwrt/openwrt/commit/218ce40cd738f3373438aab82467807a8707fb9c
|
||||
|
||||
The "version 1" index.json contained ABI-versioned package names, making the
|
||||
unusable by the ASU server. The version 2 format contains package names that
|
||||
have been stripped of their ABI version.
|
||||
"""
|
||||
|
||||
import email.parser
|
||||
import json
|
||||
|
||||
|
||||
def parse_args():
|
||||
from argparse import ArgumentParser
|
||||
|
||||
source_format = "apk", "opkg"
|
||||
|
||||
parser = ArgumentParser()
|
||||
# fmt: off
|
||||
parser.add_argument("-a", "--architecture", required=True,
|
||||
help="Required device architecture: like 'x86_64' or 'aarch64_generic'")
|
||||
parser.add_argument("-f", "--source-format", required=True, choices=source_format,
|
||||
help="Required source format of input: 'apk' or 'opkg'")
|
||||
parser.add_argument(dest="source",
|
||||
help="File name for input, '-' for stdin")
|
||||
# fmt: on
|
||||
args = parser.parse_args()
|
||||
return args
|
||||
|
||||
|
||||
def parse_apk(text: str) -> dict:
|
||||
packages: dict = {}
|
||||
|
||||
data = json.loads(text)
|
||||
for package in data.get("packages", []):
|
||||
package_name: str = package["name"]
|
||||
|
||||
for tag in package.get("tags", []):
|
||||
if tag.startswith("openwrt:abiversion="):
|
||||
package_abi: str = tag.split("=")[-1]
|
||||
package_name = package_name.removesuffix(package_abi)
|
||||
break
|
||||
|
||||
packages[package_name] = package["version"]
|
||||
|
||||
return packages
|
||||
|
||||
|
||||
def parse_opkg(text: str) -> dict:
|
||||
packages: dict = {}
|
||||
|
||||
parser: email.parser.Parser = email.parser.Parser()
|
||||
chunks: list[str] = text.strip().split("\n\n")
|
||||
for chunk in chunks:
|
||||
package: dict = parser.parsestr(chunk, headersonly=True)
|
||||
package_name: str = package["Package"]
|
||||
if package_abi := package.get("ABIVersion"):
|
||||
package_name = package_name.removesuffix(package_abi)
|
||||
|
||||
packages[package_name] = package["Version"]
|
||||
|
||||
return packages
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
|
||||
args = parse_args()
|
||||
|
||||
input = sys.stdin if args.source == "-" else open(args.source, "r")
|
||||
with input:
|
||||
text: str = input.read()
|
||||
|
||||
packages = parse_apk(text) if args.source_format == "apk" else parse_opkg(text)
|
||||
index = {
|
||||
"version": 2,
|
||||
"architecture": args.architecture,
|
||||
"packages": packages,
|
||||
}
|
||||
print(json.dumps(index, indent=2))
|
||||
@@ -751,7 +751,7 @@ SVN-Revision: 35130
|
||||
EXPORT_SYMBOL(xfrm_parse_spi);
|
||||
--- a/net/ipv4/tcp_input.c
|
||||
+++ b/net/ipv4/tcp_input.c
|
||||
@@ -4268,14 +4268,16 @@ static bool tcp_parse_aligned_timestamp(
|
||||
@@ -4276,14 +4276,16 @@ static bool tcp_parse_aligned_timestamp(
|
||||
{
|
||||
const __be32 *ptr = (const __be32 *)(th + 1);
|
||||
|
||||
|
||||
@@ -320,13 +320,8 @@ CONFIG_HW_CONSOLE=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_IPROC_RNG200=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_ALGOBIT=y
|
||||
# CONFIG_I2C_BCM2708 is not set
|
||||
CONFIG_I2C_BCM2835=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_BRCMSTB=y
|
||||
CONFIG_I2C_DESIGNWARE_CORE=y
|
||||
CONFIG_I2C_DESIGNWARE_PLATFORM=y
|
||||
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_MOUSEDEV=y
|
||||
|
||||
@@ -88,7 +88,9 @@ define Device/rpi
|
||||
DEVICE_PACKAGES := \
|
||||
cypress-firmware-43430-sdio \
|
||||
brcmfmac-nvram-43430-sdio \
|
||||
kmod-brcmfmac wpad-openssl
|
||||
kmod-brcmfmac wpad-openssl \
|
||||
kmod-i2c-bcm2835 kmod-spi-bcm2835 \
|
||||
kmod-spi-bcm2835-aux
|
||||
endef
|
||||
ifeq ($(SUBTARGET),bcm2708)
|
||||
TARGET_DEVICES += rpi
|
||||
@@ -127,7 +129,9 @@ define Device/rpi-2
|
||||
brcmfmac-nvram-43430-sdio \
|
||||
cypress-firmware-43455-sdio \
|
||||
brcmfmac-nvram-43455-sdio \
|
||||
kmod-brcmfmac wpad-openssl
|
||||
kmod-brcmfmac wpad-openssl \
|
||||
kmod-i2c-bcm2835 kmod-spi-bcm2835 \
|
||||
kmod-spi-bcm2835-aux
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-2708 | boot-2711 | sdcard-img | gzip | append-metadata
|
||||
IMAGE/factory.img.gz := boot-common | boot-2708 | boot-2711 | sdcard-img | gzip
|
||||
endef
|
||||
@@ -161,7 +165,9 @@ define Device/rpi-3
|
||||
brcmfmac-nvram-43430-sdio \
|
||||
cypress-firmware-43455-sdio \
|
||||
brcmfmac-nvram-43455-sdio \
|
||||
kmod-brcmfmac wpad-openssl
|
||||
kmod-brcmfmac wpad-openssl \
|
||||
kmod-i2c-bcm2835 kmod-spi-bcm2835 \
|
||||
kmod-spi-bcm2835-aux
|
||||
endef
|
||||
ifeq ($(SUBTARGET),bcm2710)
|
||||
TARGET_DEVICES += rpi-3
|
||||
@@ -183,6 +189,9 @@ define Device/rpi-4
|
||||
cypress-firmware-43455-sdio \
|
||||
brcmfmac-nvram-43455-sdio \
|
||||
kmod-brcmfmac wpad-openssl \
|
||||
kmod-i2c-bcm2835 kmod-spi-bcm2835 \
|
||||
kmod-spi-bcm2835-aux \
|
||||
kmod-i2c-brcmstb \
|
||||
kmod-usb-net-lan78xx \
|
||||
kmod-r8169
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-2711 | sdcard-img | gzip | append-metadata
|
||||
@@ -210,6 +219,9 @@ define Device/rpi-5
|
||||
cypress-firmware-43455-sdio \
|
||||
brcmfmac-nvram-43455-sdio \
|
||||
kmod-brcmfmac wpad-openssl \
|
||||
kmod-i2c-bcm2835 kmod-spi-bcm2835 \
|
||||
kmod-i2c-brcmstb \
|
||||
kmod-i2c-designware-platform kmod-spi-dw-mmio \
|
||||
kmod-hwmon-pwmfan kmod-thermal
|
||||
IMAGE/sysupgrade.img.gz := boot-common | sdcard-img | gzip | append-metadata
|
||||
IMAGE/factory.img.gz := boot-common | sdcard-img | gzip
|
||||
|
||||
@@ -16,3 +16,19 @@ define KernelPackage/i2c-bcm2835/description
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-bcm2835))
|
||||
|
||||
|
||||
I2C_BRCMSTB_MODULES:=\
|
||||
CONFIG_I2C_BRCMSTB:drivers/i2c/busses/i2c-brcmstb
|
||||
|
||||
define KernelPackage/i2c-brcmstb
|
||||
$(call i2c_defaults,$(I2C_BRCMSTB_MODULES),59)
|
||||
TITLE:=Broadcom BRCMSTB I2C master controller driver
|
||||
DEPENDS:=@TARGET_bcm27xx +kmod-i2c-core
|
||||
endef
|
||||
|
||||
define KernelPackage/i2c-brcmstb/description
|
||||
This package contains the BRCM Settop/DSL I2C master controller driver
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-brcmstb))
|
||||
|
||||
@@ -60,7 +60,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
|
||||
--- a/drivers/gpu/drm/drm_atomic_helper.c
|
||||
+++ b/drivers/gpu/drm/drm_atomic_helper.c
|
||||
@@ -1653,13 +1653,6 @@ drm_atomic_helper_wait_for_vblanks(struc
|
||||
@@ -1681,13 +1681,6 @@ drm_atomic_helper_wait_for_vblanks(struc
|
||||
int i, ret;
|
||||
unsigned int crtc_mask = 0;
|
||||
|
||||
@@ -74,7 +74,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) {
|
||||
if (!new_crtc_state->active)
|
||||
continue;
|
||||
@@ -2309,12 +2302,6 @@ int drm_atomic_helper_setup_commit(struc
|
||||
@@ -2337,12 +2330,6 @@ int drm_atomic_helper_setup_commit(struc
|
||||
complete_all(&commit->flip_done);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1993,7 +1993,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
#define MAX_TUNING_LOOP 40
|
||||
|
||||
@@ -3212,7 +3212,7 @@ static void sdhci_timeout_timer(struct t
|
||||
@@ -3217,7 +3217,7 @@ static void sdhci_timeout_timer(struct t
|
||||
spin_lock_irqsave(&host->lock, flags);
|
||||
|
||||
if (host->cmd && !sdhci_data_line_cmd(host->cmd)) {
|
||||
@@ -2002,7 +2002,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
mmc_hostname(host->mmc));
|
||||
sdhci_err_stats_inc(host, REQ_TIMEOUT);
|
||||
sdhci_dumpregs(host);
|
||||
@@ -3235,7 +3235,7 @@ static void sdhci_timeout_data_timer(str
|
||||
@@ -3240,7 +3240,7 @@ static void sdhci_timeout_data_timer(str
|
||||
|
||||
if (host->data || host->data_cmd ||
|
||||
(host->cmd && sdhci_data_line_cmd(host->cmd))) {
|
||||
|
||||
@@ -16,7 +16,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
|
||||
--- a/drivers/media/i2c/adv7180.c
|
||||
+++ b/drivers/media/i2c/adv7180.c
|
||||
@@ -1340,6 +1340,7 @@ static const struct adv7180_chip_info ad
|
||||
@@ -1350,6 +1350,7 @@ static const struct adv7180_chip_info ad
|
||||
static int init_device(struct adv7180_state *state)
|
||||
{
|
||||
int ret;
|
||||
@@ -24,7 +24,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
|
||||
mutex_lock(&state->mutex);
|
||||
|
||||
@@ -1387,6 +1388,18 @@ static int init_device(struct adv7180_st
|
||||
@@ -1397,6 +1398,18 @@ static int init_device(struct adv7180_st
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
|
||||
--- a/drivers/media/i2c/adv7180.c
|
||||
+++ b/drivers/media/i2c/adv7180.c
|
||||
@@ -1329,6 +1329,7 @@ static const struct adv7180_chip_info ad
|
||||
@@ -1339,6 +1339,7 @@ static const struct adv7180_chip_info ad
|
||||
BIT(ADV7182_INPUT_SVIDEO_AIN1_AIN2) |
|
||||
BIT(ADV7182_INPUT_SVIDEO_AIN3_AIN4) |
|
||||
BIT(ADV7182_INPUT_SVIDEO_AIN7_AIN8) |
|
||||
|
||||
@@ -25,7 +25,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/gpu/drm/v3d/v3d_drv.c
|
||||
+++ b/drivers/gpu/drm/v3d/v3d_drv.c
|
||||
@@ -256,6 +256,21 @@ static int v3d_platform_drm_probe(struct
|
||||
@@ -266,6 +266,21 @@ static int v3d_platform_drm_probe(struct
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
if (v3d->ver < 41) {
|
||||
ret = map_regs(v3d, &v3d->gca_regs, "gca");
|
||||
if (ret)
|
||||
@@ -281,6 +296,9 @@ static int v3d_platform_drm_probe(struct
|
||||
@@ -292,6 +307,9 @@ static int v3d_platform_drm_probe(struct
|
||||
if (ret)
|
||||
goto irq_disable;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -244,6 +244,9 @@
|
||||
@@ -248,6 +248,9 @@
|
||||
#define USB_VENDOR_ID_BAANTO 0x2453
|
||||
#define USB_DEVICE_ID_BAANTO_MT_190W2 0x0100
|
||||
|
||||
@@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
#define USB_VENDOR_ID_BELKIN 0x050d
|
||||
#define USB_DEVICE_ID_FLIP_KVM 0x3201
|
||||
|
||||
@@ -1439,6 +1442,9 @@
|
||||
@@ -1443,6 +1446,9 @@
|
||||
#define USB_VENDOR_ID_XIAOMI 0x2717
|
||||
#define USB_DEVICE_ID_MI_SILENT_MOUSE 0x5014
|
||||
|
||||
@@ -45,7 +45,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
#define USB_DEVICE_ID_THT_2P_ARCADE 0x75e1
|
||||
--- a/drivers/hid/hid-quirks.c
|
||||
+++ b/drivers/hid/hid-quirks.c
|
||||
@@ -42,6 +42,7 @@ static const struct hid_device_id hid_qu
|
||||
@@ -44,6 +44,7 @@ static const struct hid_device_id hid_qu
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS682), HID_QUIRK_NOGET },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS692), HID_QUIRK_NOGET },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM), HID_QUIRK_NOGET },
|
||||
@@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL },
|
||||
@@ -209,6 +210,7 @@ static const struct hid_device_id hid_qu
|
||||
@@ -211,6 +212,7 @@ static const struct hid_device_id hid_qu
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_GROUP_AUDIO), HID_QUIRK_NOGET },
|
||||
|
||||
@@ -10,7 +10,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
|
||||
|
||||
--- a/drivers/gpu/drm/v3d/v3d_drv.c
|
||||
+++ b/drivers/gpu/drm/v3d/v3d_drv.c
|
||||
@@ -257,10 +257,10 @@ static int v3d_platform_drm_probe(struct
|
||||
@@ -267,10 +267,10 @@ static int v3d_platform_drm_probe(struct
|
||||
}
|
||||
|
||||
v3d->clk = devm_clk_get(dev, NULL);
|
||||
|
||||
@@ -34,7 +34,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
struct drm_device *drm;
|
||||
struct v3d_dev *v3d;
|
||||
int ret;
|
||||
@@ -262,7 +267,20 @@ static int v3d_platform_drm_probe(struct
|
||||
@@ -272,7 +277,20 @@ static int v3d_platform_drm_probe(struct
|
||||
dev_err(dev, "Failed to get clock (%ld)\n", PTR_ERR(v3d->clk));
|
||||
return PTR_ERR(v3d->clk);
|
||||
}
|
||||
@@ -56,7 +56,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
/* For downclocking, drop it to the minimum frequency we can get from
|
||||
* the CPRMAN clock generator dividing off our parent. The divider is
|
||||
* 4 bits, but ask for just higher than that so that rounding doesn't
|
||||
@@ -296,7 +314,7 @@ static int v3d_platform_drm_probe(struct
|
||||
@@ -307,7 +325,7 @@ static int v3d_platform_drm_probe(struct
|
||||
if (ret)
|
||||
goto irq_disable;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
struct adv7180_state;
|
||||
|
||||
#define ADV7180_FLAG_RESET_POWERED BIT(0)
|
||||
@@ -406,10 +410,24 @@ out:
|
||||
@@ -407,10 +411,24 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -435,7 +453,11 @@ static int adv7180_program_std(struct ad
|
||||
@@ -436,7 +454,11 @@ static int adv7180_program_std(struct ad
|
||||
static int adv7180_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
|
||||
{
|
||||
struct adv7180_state *state = to_state(sd);
|
||||
@@ -70,7 +70,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -457,6 +479,8 @@ static int adv7180_g_std(struct v4l2_sub
|
||||
@@ -458,6 +480,8 @@ static int adv7180_g_std(struct v4l2_sub
|
||||
{
|
||||
struct adv7180_state *state = to_state(sd);
|
||||
|
||||
@@ -79,7 +79,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
*norm = state->curr_norm;
|
||||
|
||||
return 0;
|
||||
@@ -886,6 +910,8 @@ static int adv7180_s_stream(struct v4l2_
|
||||
@@ -891,6 +915,8 @@ static int adv7180_s_stream(struct v4l2_
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
--- a/drivers/gpio/gpio-pca953x.c
|
||||
+++ b/drivers/gpio/gpio-pca953x.c
|
||||
@@ -1311,6 +1311,7 @@ static const struct of_device_id pca953x
|
||||
@@ -1312,6 +1312,7 @@ static const struct of_device_id pca953x
|
||||
{ .compatible = "ti,tca6424", .data = OF_953X(24, PCA_INT), },
|
||||
{ .compatible = "ti,tca9538", .data = OF_953X( 8, PCA_INT), },
|
||||
{ .compatible = "ti,tca9539", .data = OF_953X(16, PCA_INT), },
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From 4b249d9f2436af70ed9a8c2a34be0786f3fe026c Mon Sep 17 00:00:00 2001
|
||||
From: David Plowman <david.plowman@raspberrypi.com>
|
||||
Date: Tue, 25 Jan 2022 15:48:53 +0000
|
||||
Subject: [PATCH 0423/1085] media: i2c: imx219: Correct the minimum vblanking
|
||||
value
|
||||
|
||||
The datasheet for this sensor documents the minimum vblanking as being
|
||||
32 lines. It does fix some problems with occasional black lines at the
|
||||
bottom of images (tested on Raspberry Pi).
|
||||
|
||||
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
|
||||
---
|
||||
drivers/media/i2c/imx219.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/media/i2c/imx219.c
|
||||
+++ b/drivers/media/i2c/imx219.c
|
||||
@@ -77,7 +77,7 @@
|
||||
#define IMX219_VTS_30FPS_640x480 0x06e3
|
||||
#define IMX219_VTS_MAX 0xffff
|
||||
|
||||
-#define IMX219_VBLANK_MIN 4
|
||||
+#define IMX219_VBLANK_MIN 32
|
||||
|
||||
/*Frame Length Line*/
|
||||
#define IMX219_FLL_MIN 0x08a6
|
||||
@@ -75,7 +75,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
|
||||
--- a/drivers/usb/host/xhci-ring.c
|
||||
+++ b/drivers/usb/host/xhci-ring.c
|
||||
@@ -3718,6 +3718,48 @@ static int xhci_align_td(struct xhci_hcd
|
||||
@@ -3728,6 +3728,48 @@ static int xhci_align_td(struct xhci_hcd
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
/* This is very similar to what ehci-q.c qtd_fill() does */
|
||||
int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
|
||||
struct urb *urb, int slot_id, unsigned int ep_index)
|
||||
@@ -3874,6 +3916,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
|
||||
@@ -3884,6 +3926,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
|
||||
}
|
||||
|
||||
check_trb_math(urb, enqd_len);
|
||||
@@ -133,7 +133,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id,
|
||||
start_cycle, start_trb);
|
||||
return 0;
|
||||
@@ -4023,6 +4067,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
|
||||
@@ -4033,6 +4077,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
|
||||
/* Event on completion */
|
||||
field | TRB_IOC | TRB_TYPE(TRB_STATUS) | ep_ring->cycle_state);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ sdhci: remove PYA0_INTR_BUG quirk. Add quirks to disable some of the higher SDR
|
||||
static int dwcmshc_rk35xx_init(struct sdhci_host *host, struct dwcmshc_priv *dwc_priv)
|
||||
--- a/drivers/mmc/host/sdhci.c
|
||||
+++ b/drivers/mmc/host/sdhci.c
|
||||
@@ -3050,6 +3050,15 @@ static void sdhci_card_event(struct mmc_
|
||||
@@ -3055,6 +3055,15 @@ static void sdhci_card_event(struct mmc_
|
||||
spin_unlock_irqrestore(&host->lock, flags);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ sdhci: remove PYA0_INTR_BUG quirk. Add quirks to disable some of the higher SDR
|
||||
static const struct mmc_host_ops sdhci_ops = {
|
||||
.request = sdhci_request,
|
||||
.post_req = sdhci_post_req,
|
||||
@@ -3065,6 +3074,7 @@ static const struct mmc_host_ops sdhci_o
|
||||
@@ -3070,6 +3079,7 @@ static const struct mmc_host_ops sdhci_o
|
||||
.execute_tuning = sdhci_execute_tuning,
|
||||
.card_event = sdhci_card_event,
|
||||
.card_busy = sdhci_card_busy,
|
||||
@@ -50,7 +50,7 @@ sdhci: remove PYA0_INTR_BUG quirk. Add quirks to disable some of the higher SDR
|
||||
};
|
||||
|
||||
/*****************************************************************************\
|
||||
@@ -4583,6 +4593,15 @@ int sdhci_setup_host(struct sdhci_host *
|
||||
@@ -4588,6 +4598,15 @@ int sdhci_setup_host(struct sdhci_host *
|
||||
!(host->quirks2 & SDHCI_QUIRK2_BROKEN_DDR50))
|
||||
mmc->caps |= MMC_CAP_UHS_DDR50;
|
||||
|
||||
|
||||
@@ -341,17 +341,6 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
struct subdev_regulators *sr;
|
||||
bool ep_wakeup_capable;
|
||||
};
|
||||
@@ -286,8 +371,8 @@ static int brcm_pcie_encode_ibar_size(u6
|
||||
if (log2_in >= 12 && log2_in <= 15)
|
||||
/* Covers 4KB to 32KB (inclusive) */
|
||||
return (log2_in - 12) + 0x1c;
|
||||
- else if (log2_in >= 16 && log2_in <= 35)
|
||||
- /* Covers 64KB to 32GB, (inclusive) */
|
||||
+ else if (log2_in >= 16 && log2_in <= 36)
|
||||
+ /* Covers 64KB to 64GB, (inclusive) */
|
||||
return log2_in - 15;
|
||||
/* Something is awry so disable */
|
||||
return 0;
|
||||
@@ -376,6 +461,35 @@ static int brcm_pcie_set_ssc(struct brcm
|
||||
return ssc && pll ? 0 : -EIO;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
sdhci_writew(host, SDHCI_MAKE_CMD(cmd->opcode, flags), SDHCI_COMMAND);
|
||||
|
||||
return true;
|
||||
@@ -3309,6 +3315,11 @@ static void sdhci_cmd_irq(struct sdhci_h
|
||||
@@ -3314,6 +3320,11 @@ static void sdhci_cmd_irq(struct sdhci_h
|
||||
if (intmask & SDHCI_INT_TIMEOUT) {
|
||||
host->cmd->error = -ETIMEDOUT;
|
||||
sdhci_err_stats_inc(host, CMD_TIMEOUT);
|
||||
|
||||
@@ -17,7 +17,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
|
||||
--- a/drivers/media/i2c/adv7180.c
|
||||
+++ b/drivers/media/i2c/adv7180.c
|
||||
@@ -723,10 +723,15 @@ static int adv7180_enum_mbus_code(struct
|
||||
@@ -728,10 +728,15 @@ static int adv7180_enum_mbus_code(struct
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_mbus_code_enum *code)
|
||||
{
|
||||
@@ -34,7 +34,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -736,7 +741,10 @@ static int adv7180_mbus_fmt(struct v4l2_
|
||||
@@ -741,7 +746,10 @@ static int adv7180_mbus_fmt(struct v4l2_
|
||||
{
|
||||
struct adv7180_state *state = to_state(sd);
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
static int dbg_input;
|
||||
module_param(dbg_input, int, 0644);
|
||||
MODULE_PARM_DESC(dbg_input, "Input number (0-31)");
|
||||
@@ -227,6 +237,7 @@ struct adv7180_state {
|
||||
@@ -228,6 +238,7 @@ struct adv7180_state {
|
||||
const struct adv7180_chip_info *chip_info;
|
||||
enum v4l2_field field;
|
||||
bool force_bt656_4;
|
||||
@@ -41,7 +41,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
};
|
||||
#define to_adv7180_sd(_ctrl) (&container_of(_ctrl->handler, \
|
||||
struct adv7180_state, \
|
||||
@@ -620,6 +631,9 @@ static int adv7180_s_ctrl(struct v4l2_ct
|
||||
@@ -621,6 +632,9 @@ static int adv7180_s_ctrl(struct v4l2_ct
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -51,7 +51,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
val = ctrl->val;
|
||||
switch (ctrl->id) {
|
||||
case V4L2_CID_BRIGHTNESS:
|
||||
@@ -661,6 +675,7 @@ static int adv7180_s_ctrl(struct v4l2_ct
|
||||
@@ -662,6 +676,7 @@ static int adv7180_s_ctrl(struct v4l2_ct
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
mutex_unlock(&state->mutex);
|
||||
return ret;
|
||||
}
|
||||
@@ -681,7 +696,7 @@ static const struct v4l2_ctrl_config adv
|
||||
@@ -682,7 +697,7 @@ static const struct v4l2_ctrl_config adv
|
||||
|
||||
static int adv7180_init_controls(struct adv7180_state *state)
|
||||
{
|
||||
@@ -68,9 +68,9 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
|
||||
v4l2_ctrl_new_std(&state->ctrl_hdl, &adv7180_ctrl_ops,
|
||||
V4L2_CID_BRIGHTNESS, ADV7180_BRI_MIN,
|
||||
@@ -703,6 +718,17 @@ static int adv7180_init_controls(struct
|
||||
0, ARRAY_SIZE(test_pattern_menu) - 1,
|
||||
test_pattern_menu);
|
||||
@@ -708,6 +723,17 @@ static int adv7180_init_controls(struct
|
||||
test_pattern_menu);
|
||||
}
|
||||
|
||||
+ if (state->chip_info->flags & ADV7180_FLAG_MIPI_CSI2) {
|
||||
+ state->link_freq =
|
||||
@@ -86,7 +86,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
state->sd.ctrl_handler = &state->ctrl_hdl;
|
||||
if (state->ctrl_hdl.error) {
|
||||
int err = state->ctrl_hdl.error;
|
||||
@@ -835,6 +861,10 @@ static int adv7180_set_pad_format(struct
|
||||
@@ -840,6 +866,10 @@ static int adv7180_set_pad_format(struct
|
||||
adv7180_set_power(state, false);
|
||||
adv7180_set_field_mode(state);
|
||||
adv7180_set_power(state, true);
|
||||
|
||||
@@ -59,7 +59,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
--- a/drivers/i2c/busses/i2c-designware-core.h
|
||||
+++ b/drivers/i2c/busses/i2c-designware-core.h
|
||||
@@ -293,6 +293,7 @@ struct dw_i2c_dev {
|
||||
@@ -292,6 +292,7 @@ struct dw_i2c_dev {
|
||||
u16 fp_lcnt;
|
||||
u16 hs_hcnt;
|
||||
u16 hs_lcnt;
|
||||
|
||||
@@ -24,7 +24,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
BUG_ON(data->blksz > host->mmc->max_blk_size);
|
||||
BUG_ON(data->blocks > 65535);
|
||||
|
||||
@@ -4727,11 +4727,16 @@ int sdhci_setup_host(struct sdhci_host *
|
||||
@@ -4732,11 +4732,16 @@ int sdhci_setup_host(struct sdhci_host *
|
||||
spin_lock_init(&host->lock);
|
||||
|
||||
/*
|
||||
|
||||
@@ -134,7 +134,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
/* Write SDA hold time if supported */
|
||||
if (dev->sda_hold_time)
|
||||
regmap_write(dev->map, DW_IC_SDA_HOLD, dev->sda_hold_time);
|
||||
@@ -1074,6 +1086,7 @@ int i2c_dw_probe_master(struct dw_i2c_de
|
||||
@@ -1049,6 +1061,7 @@ int i2c_dw_probe_master(struct dw_i2c_de
|
||||
struct i2c_adapter *adap = &dev->adapter;
|
||||
unsigned long irq_flags;
|
||||
unsigned int ic_con;
|
||||
@@ -142,7 +142,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
int ret;
|
||||
|
||||
init_completion(&dev->cmd_complete);
|
||||
@@ -1109,7 +1122,11 @@ int i2c_dw_probe_master(struct dw_i2c_de
|
||||
@@ -1083,7 +1096,11 @@ int i2c_dw_probe_master(struct dw_i2c_de
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
From 32c319ba2f2fd662a3b7bd042515cd650807dbff Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Wahren <wahrenst@gmx.net>
|
||||
Date: Sat, 1 Feb 2025 13:50:46 +0100
|
||||
Subject: [PATCH] drm/v3d: Add clock handling
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
[ Upstream commit 4dd40b5f9c3d89b67af0dbe059cf4a51aac6bf06 ]
|
||||
|
||||
Since the initial commit 57692c94dcbe ("drm/v3d: Introduce a new DRM driver
|
||||
for Broadcom V3D V3.x+") the struct v3d_dev reserved a pointer for
|
||||
an optional V3D clock. But there wasn't any code, which fetched it.
|
||||
So add the missing clock handling before accessing any V3D registers.
|
||||
|
||||
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
|
||||
Reviewed-by: Maíra Canal <mcanal@igalia.com>
|
||||
Signed-off-by: Maíra Canal <mcanal@igalia.com>
|
||||
Link: https://patchwork.freedesktop.org/patch/msgid/20250201125046.33030-1-wahrenst@gmx.net
|
||||
[ Maíra: Backported to the downstream repository ]
|
||||
Signed-off-by: Maíra Canal <mcanal@igalia.com>
|
||||
---
|
||||
drivers/gpu/drm/v3d/v3d_drv.c | 44 ++++++++++++++++++++++-------------
|
||||
1 file changed, 28 insertions(+), 16 deletions(-)
|
||||
|
||||
--- a/drivers/gpu/drm/v3d/v3d_drv.c
|
||||
+++ b/drivers/gpu/drm/v3d/v3d_drv.c
|
||||
@@ -232,11 +232,21 @@ static int v3d_platform_drm_probe(struct
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
+ v3d->clk = devm_clk_get_optional(dev, NULL);
|
||||
+ if (IS_ERR(v3d->clk))
|
||||
+ return dev_err_probe(dev, PTR_ERR(v3d->clk), "Failed to get V3D clock\n");
|
||||
+
|
||||
+ ret = clk_prepare_enable(v3d->clk);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "Couldn't enable the V3D clock\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
mmu_debug = V3D_READ(V3D_MMU_DEBUG_INFO);
|
||||
mask = DMA_BIT_MASK(30 + V3D_GET_FIELD(mmu_debug, V3D_MMU_PA_WIDTH));
|
||||
ret = dma_set_mask_and_coherent(dev, mask);
|
||||
if (ret)
|
||||
- return ret;
|
||||
+ goto clk_disable;
|
||||
|
||||
v3d->va_width = 30 + V3D_GET_FIELD(mmu_debug, V3D_MMU_VA_WIDTH);
|
||||
|
||||
@@ -251,32 +261,29 @@ static int v3d_platform_drm_probe(struct
|
||||
ret = PTR_ERR(v3d->reset);
|
||||
|
||||
if (ret == -EPROBE_DEFER)
|
||||
- return ret;
|
||||
+ goto clk_disable;
|
||||
|
||||
v3d->reset = NULL;
|
||||
ret = map_regs(v3d, &v3d->bridge_regs, "bridge");
|
||||
if (ret) {
|
||||
dev_err(dev,
|
||||
"Failed to get reset control or bridge regs\n");
|
||||
- return ret;
|
||||
+ goto clk_disable;
|
||||
}
|
||||
}
|
||||
|
||||
- v3d->clk = devm_clk_get(dev, NULL);
|
||||
- if (IS_ERR_OR_NULL(v3d->clk)) {
|
||||
- if (PTR_ERR(v3d->clk) != -EPROBE_DEFER)
|
||||
- dev_err(dev, "Failed to get clock (%ld)\n", PTR_ERR(v3d->clk));
|
||||
- return PTR_ERR(v3d->clk);
|
||||
- }
|
||||
-
|
||||
node = rpi_firmware_find_node();
|
||||
- if (!node)
|
||||
- return -EINVAL;
|
||||
+ if (!node) {
|
||||
+ ret = -EINVAL;
|
||||
+ goto clk_disable;
|
||||
+ }
|
||||
|
||||
firmware = rpi_firmware_get(node);
|
||||
of_node_put(node);
|
||||
- if (!firmware)
|
||||
- return -EPROBE_DEFER;
|
||||
+ if (!firmware) {
|
||||
+ ret = -EPROBE_DEFER;
|
||||
+ goto clk_disable;
|
||||
+ }
|
||||
|
||||
v3d->clk_up_rate = rpi_firmware_clk_get_max_rate(firmware,
|
||||
RPI_FIRMWARE_V3D_CLK_ID);
|
||||
@@ -293,14 +300,15 @@ static int v3d_platform_drm_probe(struct
|
||||
if (v3d->ver < 41) {
|
||||
ret = map_regs(v3d, &v3d->gca_regs, "gca");
|
||||
if (ret)
|
||||
- return ret;
|
||||
+ goto clk_disable;
|
||||
}
|
||||
|
||||
v3d->mmu_scratch = dma_alloc_wc(dev, 4096, &v3d->mmu_scratch_paddr,
|
||||
GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO);
|
||||
if (!v3d->mmu_scratch) {
|
||||
dev_err(dev, "Failed to allocate MMU scratch page\n");
|
||||
- return -ENOMEM;
|
||||
+ ret = -ENOMEM;
|
||||
+ goto clk_disable;
|
||||
}
|
||||
|
||||
ret = v3d_gem_init(drm);
|
||||
@@ -326,6 +334,8 @@ gem_destroy:
|
||||
v3d_gem_destroy(drm);
|
||||
dma_free:
|
||||
dma_free_wc(dev, 4096, v3d->mmu_scratch, v3d->mmu_scratch_paddr);
|
||||
+clk_disable:
|
||||
+ clk_disable_unprepare(v3d->clk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -340,6 +350,8 @@ static void v3d_platform_drm_remove(stru
|
||||
|
||||
dma_free_wc(v3d->drm.dev, 4096, v3d->mmu_scratch,
|
||||
v3d->mmu_scratch_paddr);
|
||||
+
|
||||
+ clk_disable_unprepare(v3d->clk);
|
||||
}
|
||||
|
||||
static struct platform_driver v3d_platform_driver = {
|
||||
@@ -264,7 +264,7 @@ Signed-off-by: Maíra Canal <mcanal@igalia.com>
|
||||
v3d->cores = V3D_GET_FIELD(ident1, V3D_HUB_IDENT1_NCORES);
|
||||
WARN_ON(v3d->cores > 1); /* multicore not yet implemented */
|
||||
|
||||
@@ -297,7 +307,7 @@ static int v3d_platform_drm_probe(struct
|
||||
@@ -300,7 +310,7 @@ static int v3d_platform_drm_probe(struct
|
||||
v3d->clk_down_rate =
|
||||
(clk_get_rate(clk_get_parent(v3d->clk)) / (1 << 4)) + 10000;
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ Signed-off-by: Maíra Canal <mcanal@igalia.com>
|
||||
mmu_debug = V3D_READ(V3D_MMU_DEBUG_INFO);
|
||||
mask = DMA_BIT_MASK(30 + V3D_GET_FIELD(mmu_debug, V3D_MMU_PA_WIDTH));
|
||||
ret = dma_set_mask_and_coherent(dev, mask);
|
||||
@@ -361,6 +399,8 @@ static void v3d_platform_drm_remove(stru
|
||||
@@ -364,6 +402,8 @@ static void v3d_platform_drm_remove(stru
|
||||
dma_free_wc(v3d->drm.dev, 4096, v3d->mmu_scratch,
|
||||
v3d->mmu_scratch_paddr);
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
|
||||
--- a/sound/soc/sunxi/sun4i-codec.c
|
||||
+++ b/sound/soc/sunxi/sun4i-codec.c
|
||||
@@ -232,15 +232,65 @@
|
||||
@@ -233,16 +233,66 @@
|
||||
|
||||
/* TODO H3 DAP (Digital Audio Processing) bits */
|
||||
|
||||
@@ -76,6 +76,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
+ struct clk *clk_module_dac;
|
||||
struct reset_control *rst;
|
||||
struct gpio_desc *gpio_pa;
|
||||
struct gpio_desc *gpio_hp;
|
||||
+ const struct sun4i_codec_quirks *quirks;
|
||||
|
||||
- /* ADC_FIFOC register is at different offset on different SoCs */
|
||||
@@ -84,7 +85,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
struct regmap_field *reg_adc_fifoc;
|
||||
|
||||
struct snd_dmaengine_dai_dma_data capture_dma_data;
|
||||
@@ -250,33 +300,33 @@ struct sun4i_codec {
|
||||
@@ -252,33 +302,33 @@ struct sun4i_codec {
|
||||
static void sun4i_codec_start_playback(struct sun4i_codec *scodec)
|
||||
{
|
||||
/* Flush TX FIFO */
|
||||
@@ -126,7 +127,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
}
|
||||
|
||||
static int sun4i_codec_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||
@@ -325,8 +375,8 @@ static int sun4i_codec_prepare_capture(s
|
||||
@@ -327,8 +377,8 @@ static int sun4i_codec_prepare_capture(s
|
||||
|
||||
/* Set RX FIFO trigger level */
|
||||
regmap_field_update_bits(scodec->reg_adc_fifoc,
|
||||
@@ -137,7 +138,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
|
||||
/*
|
||||
* FIXME: Undocumented in the datasheet, but
|
||||
@@ -360,13 +410,13 @@ static int sun4i_codec_prepare_playback(
|
||||
@@ -362,13 +412,13 @@ static int sun4i_codec_prepare_playback(
|
||||
u32 val;
|
||||
|
||||
/* Flush the TX FIFO */
|
||||
@@ -156,7 +157,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
|
||||
if (substream->runtime->rate > 32000)
|
||||
/* Use 64 bits FIR filter */
|
||||
@@ -375,13 +425,12 @@ static int sun4i_codec_prepare_playback(
|
||||
@@ -377,13 +427,12 @@ static int sun4i_codec_prepare_playback(
|
||||
/* Use 32 bits FIR filter */
|
||||
val = BIT(SUN4I_CODEC_DAC_FIFOC_FIR_VERSION);
|
||||
|
||||
@@ -174,7 +175,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
|
||||
return 0;
|
||||
};
|
||||
@@ -476,30 +525,32 @@ static int sun4i_codec_hw_params_capture
|
||||
@@ -478,30 +527,32 @@ static int sun4i_codec_hw_params_capture
|
||||
7 << SUN4I_CODEC_ADC_FIFOC_ADC_FS,
|
||||
hwrate << SUN4I_CODEC_ADC_FIFOC_ADC_FS);
|
||||
|
||||
@@ -218,7 +219,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
|
||||
scodec->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
|
||||
}
|
||||
@@ -514,9 +565,9 @@ static int sun4i_codec_hw_params_playbac
|
||||
@@ -516,9 +567,9 @@ static int sun4i_codec_hw_params_playbac
|
||||
u32 val;
|
||||
|
||||
/* Set DAC sample rate */
|
||||
@@ -231,7 +232,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
|
||||
/* Set the number of channels we want to use */
|
||||
if (params_channels(params) == 1)
|
||||
@@ -524,27 +575,26 @@ static int sun4i_codec_hw_params_playbac
|
||||
@@ -526,27 +577,26 @@ static int sun4i_codec_hw_params_playbac
|
||||
else
|
||||
val = 0;
|
||||
|
||||
@@ -269,7 +270,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
|
||||
scodec->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
|
||||
}
|
||||
@@ -565,7 +615,11 @@ static int sun4i_codec_hw_params(struct
|
||||
@@ -567,7 +617,11 @@ static int sun4i_codec_hw_params(struct
|
||||
if (!clk_freq)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -282,7 +283,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -607,10 +661,14 @@ static int sun4i_codec_startup(struct sn
|
||||
@@ -609,10 +663,14 @@ static int sun4i_codec_startup(struct sn
|
||||
* Stop issuing DRQ when we have room for less than 16 samples
|
||||
* in our TX FIFO
|
||||
*/
|
||||
@@ -300,7 +301,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
}
|
||||
|
||||
static void sun4i_codec_shutdown(struct snd_pcm_substream *substream,
|
||||
@@ -619,7 +677,11 @@ static void sun4i_codec_shutdown(struct
|
||||
@@ -621,7 +679,11 @@ static void sun4i_codec_shutdown(struct
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card);
|
||||
|
||||
@@ -313,7 +314,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops sun4i_codec_dai_ops = {
|
||||
@@ -1229,6 +1291,55 @@ static const struct snd_soc_component_dr
|
||||
@@ -1231,6 +1293,55 @@ static const struct snd_soc_component_dr
|
||||
.endianness = 1,
|
||||
};
|
||||
|
||||
@@ -369,7 +370,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
static const struct snd_soc_component_driver sun4i_codec_component = {
|
||||
.name = "sun4i-codec",
|
||||
.legacy_dai_naming = 1,
|
||||
@@ -1532,6 +1643,66 @@ static struct snd_soc_card *sun8i_v3s_co
|
||||
@@ -1578,6 +1689,66 @@ static struct snd_soc_card *sun8i_v3s_co
|
||||
return card;
|
||||
};
|
||||
|
||||
@@ -436,7 +437,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
static const struct regmap_config sun4i_codec_regmap_config = {
|
||||
.reg_bits = 32,
|
||||
.reg_stride = 4,
|
||||
@@ -1574,21 +1745,22 @@ static const struct regmap_config sun8i_
|
||||
@@ -1620,21 +1791,22 @@ static const struct regmap_config sun8i_
|
||||
.max_register = SUN8I_H3_CODEC_ADC_DBG,
|
||||
};
|
||||
|
||||
@@ -467,7 +468,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
.reg_dac_txdata = SUN4I_CODEC_DAC_TXDATA,
|
||||
.reg_adc_rxdata = SUN4I_CODEC_ADC_RXDATA,
|
||||
};
|
||||
@@ -1597,7 +1769,11 @@ static const struct sun4i_codec_quirks s
|
||||
@@ -1643,7 +1815,11 @@ static const struct sun4i_codec_quirks s
|
||||
.regmap_config = &sun6i_codec_regmap_config,
|
||||
.codec = &sun6i_codec_codec,
|
||||
.create_card = sun6i_codec_create_card,
|
||||
@@ -479,7 +480,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
.reg_dac_txdata = SUN4I_CODEC_DAC_TXDATA,
|
||||
.reg_adc_rxdata = SUN6I_CODEC_ADC_RXDATA,
|
||||
.has_reset = true,
|
||||
@@ -1607,7 +1783,11 @@ static const struct sun4i_codec_quirks s
|
||||
@@ -1653,7 +1829,11 @@ static const struct sun4i_codec_quirks s
|
||||
.regmap_config = &sun7i_codec_regmap_config,
|
||||
.codec = &sun7i_codec_codec,
|
||||
.create_card = sun4i_codec_create_card,
|
||||
@@ -491,7 +492,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
.reg_dac_txdata = SUN4I_CODEC_DAC_TXDATA,
|
||||
.reg_adc_rxdata = SUN4I_CODEC_ADC_RXDATA,
|
||||
};
|
||||
@@ -1616,7 +1796,11 @@ static const struct sun4i_codec_quirks s
|
||||
@@ -1662,7 +1842,11 @@ static const struct sun4i_codec_quirks s
|
||||
.regmap_config = &sun8i_a23_codec_regmap_config,
|
||||
.codec = &sun8i_a23_codec_codec,
|
||||
.create_card = sun8i_a23_codec_create_card,
|
||||
@@ -503,7 +504,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
.reg_dac_txdata = SUN4I_CODEC_DAC_TXDATA,
|
||||
.reg_adc_rxdata = SUN6I_CODEC_ADC_RXDATA,
|
||||
.has_reset = true,
|
||||
@@ -1631,7 +1815,11 @@ static const struct sun4i_codec_quirks s
|
||||
@@ -1677,7 +1861,11 @@ static const struct sun4i_codec_quirks s
|
||||
*/
|
||||
.codec = &sun8i_a23_codec_codec,
|
||||
.create_card = sun8i_h3_codec_create_card,
|
||||
@@ -515,7 +516,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
.reg_dac_txdata = SUN8I_H3_CODEC_DAC_TXDATA,
|
||||
.reg_adc_rxdata = SUN6I_CODEC_ADC_RXDATA,
|
||||
.has_reset = true,
|
||||
@@ -1645,12 +1833,31 @@ static const struct sun4i_codec_quirks s
|
||||
@@ -1691,12 +1879,31 @@ static const struct sun4i_codec_quirks s
|
||||
*/
|
||||
.codec = &sun8i_a23_codec_codec,
|
||||
.create_card = sun8i_v3s_codec_create_card,
|
||||
@@ -547,7 +548,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
static const struct of_device_id sun4i_codec_of_match[] = {
|
||||
{
|
||||
.compatible = "allwinner,sun4i-a10-codec",
|
||||
@@ -1676,6 +1883,10 @@ static const struct of_device_id sun4i_c
|
||||
@@ -1722,6 +1929,10 @@ static const struct of_device_id sun4i_c
|
||||
.compatible = "allwinner,sun8i-v3s-codec",
|
||||
.data = &sun8i_v3s_codec_quirks,
|
||||
},
|
||||
@@ -558,7 +559,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, sun4i_codec_of_match);
|
||||
@@ -1704,6 +1915,7 @@ static int sun4i_codec_probe(struct plat
|
||||
@@ -1750,6 +1961,7 @@ static int sun4i_codec_probe(struct plat
|
||||
dev_err(&pdev->dev, "Failed to determine the quirks to use\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
@@ -566,7 +567,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
|
||||
scodec->regmap = devm_regmap_init_mmio(&pdev->dev, base,
|
||||
quirks->regmap_config);
|
||||
@@ -1719,10 +1931,24 @@ static int sun4i_codec_probe(struct plat
|
||||
@@ -1765,10 +1977,24 @@ static int sun4i_codec_probe(struct plat
|
||||
return PTR_ERR(scodec->clk_apb);
|
||||
}
|
||||
|
||||
@@ -595,7 +596,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
|
||||
}
|
||||
|
||||
if (quirks->has_reset) {
|
||||
@@ -1751,6 +1977,16 @@ static int sun4i_codec_probe(struct plat
|
||||
@@ -1804,6 +2030,16 @@ static int sun4i_codec_probe(struct plat
|
||||
dev_err(&pdev->dev, "Failed to create regmap fields: %d\n",
|
||||
ret);
|
||||
return ret;
|
||||
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
|
||||
@@ -196,10 +196,10 @@ mtk_flow_set_output_device(struct mtk_et
|
||||
@@ -198,10 +198,10 @@ mtk_flow_set_output_device(struct mtk_et
|
||||
if (mtk_is_netsys_v2_or_greater(eth)) {
|
||||
switch (info.wdma_idx) {
|
||||
case 0:
|
||||
|
||||
@@ -34,7 +34,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
};
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
|
||||
@@ -201,6 +201,9 @@ mtk_flow_set_output_device(struct mtk_et
|
||||
@@ -203,6 +203,9 @@ mtk_flow_set_output_device(struct mtk_et
|
||||
case 1:
|
||||
pse_port = PSE_WDMA1_PORT;
|
||||
break;
|
||||
|
||||
@@ -77,7 +77,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
int mtk_foe_entry_commit(struct mtk_ppe *ppe, struct mtk_flow_entry *entry);
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
|
||||
@@ -111,6 +111,7 @@ mtk_flow_get_wdma_info(struct net_device
|
||||
@@ -113,6 +113,7 @@ mtk_flow_get_wdma_info(struct net_device
|
||||
info->queue = path->mtk_wdma.queue;
|
||||
info->bss = path->mtk_wdma.bss;
|
||||
info->wcid = path->mtk_wdma.wcid;
|
||||
@@ -85,7 +85,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -192,7 +193,7 @@ mtk_flow_set_output_device(struct mtk_et
|
||||
@@ -194,7 +195,7 @@ mtk_flow_set_output_device(struct mtk_et
|
||||
|
||||
if (mtk_flow_get_wdma_info(dev, dest_mac, &info) == 0) {
|
||||
mtk_foe_entry_set_wdma(eth, foe, info.wdma_idx, info.queue,
|
||||
|
||||
@@ -328,7 +328,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
int mtk_flow_offload_cmd(struct mtk_eth *eth, struct flow_cls_offload *cls,
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
|
||||
@@ -245,10 +245,10 @@ mtk_flow_offload_replace(struct mtk_eth
|
||||
@@ -247,10 +247,10 @@ mtk_flow_offload_replace(struct mtk_eth
|
||||
int ppe_index)
|
||||
{
|
||||
struct flow_rule *rule = flow_cls_offload_flow_rule(f);
|
||||
@@ -340,7 +340,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct mtk_flow_entry *entry;
|
||||
int offload_type = 0;
|
||||
int wed_index = -1;
|
||||
@@ -264,6 +264,17 @@ mtk_flow_offload_replace(struct mtk_eth
|
||||
@@ -266,6 +266,17 @@ mtk_flow_offload_replace(struct mtk_eth
|
||||
struct flow_match_meta match;
|
||||
|
||||
flow_rule_match_meta(rule, &match);
|
||||
|
||||
@@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
|
||||
@@ -266,7 +266,7 @@ mtk_flow_offload_replace(struct mtk_eth
|
||||
@@ -268,7 +268,7 @@ mtk_flow_offload_replace(struct mtk_eth
|
||||
flow_rule_match_meta(rule, &match);
|
||||
if (mtk_is_netsys_v2_or_greater(eth)) {
|
||||
idev = __dev_get_by_index(&init_net, match.key->ingress_ifindex);
|
||||
|
||||
@@ -296,7 +296,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static void r8168fp_adjust_ocp_cmd(struct rtl8169_private *tp, u32 *cmd, int type)
|
||||
{
|
||||
/* based on RTL8168FP_OOBMAC_BASE in vendor driver */
|
||||
@@ -5203,6 +5261,7 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5204,6 +5262,7 @@ static int rtl_init_one(struct pci_dev *
|
||||
raw_spin_lock_init(&tp->cfg9346_usage_lock);
|
||||
raw_spin_lock_init(&tp->config25_lock);
|
||||
raw_spin_lock_init(&tp->mac_ocp_lock);
|
||||
@@ -304,7 +304,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
dev->tstats = devm_netdev_alloc_pcpu_stats(&pdev->dev,
|
||||
struct pcpu_sw_netstats);
|
||||
@@ -5359,6 +5418,12 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5360,6 +5419,12 @@ static int rtl_init_one(struct pci_dev *
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
obj-$(CONFIG_R8169) += r8169.o
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -5418,11 +5418,10 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5419,11 +5419,10 @@ static int rtl_init_one(struct pci_dev *
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
genphy_soft_reset(tp->phydev);
|
||||
}
|
||||
|
||||
@@ -5120,7 +5095,9 @@ static int r8169_mdio_register(struct rt
|
||||
@@ -5121,7 +5096,9 @@ static int r8169_mdio_register(struct rt
|
||||
}
|
||||
|
||||
tp->phydev->mac_managed_pm = true;
|
||||
@@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
phy_support_asym_pause(tp->phydev);
|
||||
|
||||
/* PHY will be woken up in rtl_open() */
|
||||
@@ -5255,7 +5232,6 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5256,7 +5233,6 @@ static int rtl_init_one(struct pci_dev *
|
||||
tp->dev = dev;
|
||||
tp->pci_dev = pdev;
|
||||
tp->supports_gmii = ent->driver_data == RTL_CFG_NO_GBIT ? 0 : 1;
|
||||
|
||||
@@ -321,7 +321,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
padto = max_t(unsigned int, padto, ETH_ZLEN);
|
||||
break;
|
||||
default:
|
||||
@@ -5147,7 +5204,7 @@ static void rtl_hw_initialize(struct rtl
|
||||
@@ -5148,7 +5205,7 @@ static void rtl_hw_initialize(struct rtl
|
||||
case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_48:
|
||||
rtl_hw_init_8168g(tp);
|
||||
break;
|
||||
|
||||
@@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -5296,11 +5296,6 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5297,11 +5297,6 @@ static int rtl_init_one(struct pci_dev *
|
||||
raw_spin_lock_init(&tp->mac_ocp_lock);
|
||||
mutex_init(&tp->led_lock);
|
||||
|
||||
@@ -28,7 +28,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
/* Get the *optional* external "ether_clk" used on some boards */
|
||||
tp->clk = devm_clk_get_optional_enabled(&pdev->dev, "ether_clk");
|
||||
if (IS_ERR(tp->clk))
|
||||
@@ -5415,6 +5410,8 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5416,6 +5411,8 @@ static int rtl_init_one(struct pci_dev *
|
||||
dev->hw_features |= NETIF_F_RXALL;
|
||||
dev->hw_features |= NETIF_F_RXFCS;
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
void r8169_get_led_name(struct rtl8169_private *tp, int idx,
|
||||
char *buf, int buf_len)
|
||||
{
|
||||
@@ -5448,10 +5499,12 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5449,10 +5500,12 @@ static int rtl_init_one(struct pci_dev *
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
unregister_netdev(tp->dev);
|
||||
|
||||
if (tp->dash_type != RTL_DASH_NONE)
|
||||
@@ -5533,9 +5537,9 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5534,9 +5538,9 @@ static int rtl_init_one(struct pci_dev *
|
||||
|
||||
if (IS_ENABLED(CONFIG_R8169_LEDS)) {
|
||||
if (rtl_is_8125(tp))
|
||||
|
||||
@@ -224,7 +224,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
padto = max_t(unsigned int, padto, ETH_ZLEN);
|
||||
break;
|
||||
default:
|
||||
@@ -5294,7 +5306,7 @@ static void rtl_hw_initialize(struct rtl
|
||||
@@ -5295,7 +5307,7 @@ static void rtl_hw_initialize(struct rtl
|
||||
case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_48:
|
||||
rtl_hw_init_8168g(tp);
|
||||
break;
|
||||
|
||||
@@ -20,7 +20,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -5491,11 +5491,6 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5492,11 +5492,6 @@ static int rtl_init_one(struct pci_dev *
|
||||
|
||||
dev->features |= dev->hw_features;
|
||||
|
||||
@@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (rtl_chip_supports_csum_v2(tp)) {
|
||||
dev->hw_features |= NETIF_F_SG | NETIF_F_TSO | NETIF_F_TSO6;
|
||||
netif_set_tso_max_size(dev, RTL_GSO_MAX_SIZE_V2);
|
||||
@@ -5506,6 +5501,17 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5507,6 +5502,17 @@ static int rtl_init_one(struct pci_dev *
|
||||
netif_set_tso_max_segs(dev, RTL_GSO_MAX_SEGS_V1);
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
switch (tp->mac_version) {
|
||||
case RTL_GIGA_MAC_VER_02 ... RTL_GIGA_MAC_VER_06:
|
||||
@@ -5460,8 +5437,6 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5461,8 +5438,6 @@ static int rtl_init_one(struct pci_dev *
|
||||
tp->supports_gmii = ent->driver_data == RTL_CFG_NO_GBIT ? 0 : 1;
|
||||
tp->ocp_base = OCP_STD_PHY_BASE;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -5236,6 +5236,11 @@ static int r8169_mdio_register(struct rt
|
||||
@@ -5237,6 +5237,11 @@ static int r8169_mdio_register(struct rt
|
||||
tp->phydev->supported_eee);
|
||||
phy_support_asym_pause(tp->phydev);
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
|
||||
static int rtl_alloc_irq(struct rtl8169_private *tp)
|
||||
@@ -5304,7 +5293,6 @@ static int rtl_jumbo_max(struct rtl8169_
|
||||
@@ -5305,7 +5294,6 @@ static int rtl_jumbo_max(struct rtl8169_
|
||||
case RTL_GIGA_MAC_VER_02 ... RTL_GIGA_MAC_VER_06:
|
||||
return JUMBO_7K;
|
||||
/* RTL8168b */
|
||||
|
||||
@@ -233,7 +233,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
padto = max_t(unsigned int, padto, ETH_ZLEN);
|
||||
break;
|
||||
default:
|
||||
@@ -5274,7 +5274,7 @@ static void rtl_hw_initialize(struct rtl
|
||||
@@ -5275,7 +5275,7 @@ static void rtl_hw_initialize(struct rtl
|
||||
case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_48:
|
||||
rtl_hw_init_8168g(tp);
|
||||
break;
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From faac69a4ae5abb49e62c79c66b51bb905c9aa5ec Mon Sep 17 00:00:00 2001
|
||||
From: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
Date: Tue, 4 Feb 2025 07:58:17 +0100
|
||||
Subject: [PATCH] r8169: don't scan PHY addresses > 0
|
||||
|
||||
The PHY address is a dummy, because r8169 PHY access registers
|
||||
don't support a PHY address. Therefore scan address 0 only.
|
||||
|
||||
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Link: https://patch.msgid.link/830637dd-4016-4a68-92b3-618fcac6589d@gmail.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/ethernet/realtek/r8169_main.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -5230,6 +5230,7 @@ static int r8169_mdio_register(struct rt
|
||||
new_bus->priv = tp;
|
||||
new_bus->parent = &pdev->dev;
|
||||
new_bus->irq[0] = PHY_MAC_INTERRUPT;
|
||||
+ new_bus->phy_mask = GENMASK(31, 1);
|
||||
snprintf(new_bus->id, MII_BUS_ID_SIZE, "r8169-%x-%x",
|
||||
pci_domain_nr(pdev->bus), pci_dev_id(pdev));
|
||||
|
||||
@@ -19,7 +19,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
--- a/drivers/nvmem/qfprom.c
|
||||
+++ b/drivers/nvmem/qfprom.c
|
||||
@@ -424,12 +424,12 @@ static int qfprom_probe(struct platform_
|
||||
@@ -438,12 +438,12 @@ static int qfprom_probe(struct platform_
|
||||
if (IS_ERR(priv->vcc))
|
||||
return PTR_ERR(priv->vcc);
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
mtd->nvmem = nvmem_register(&config);
|
||||
--- a/drivers/nvmem/core.c
|
||||
+++ b/drivers/nvmem/core.c
|
||||
@@ -918,7 +918,7 @@ struct nvmem_device *nvmem_register(cons
|
||||
@@ -932,7 +932,7 @@ struct nvmem_device *nvmem_register(cons
|
||||
nvmem->nkeepout = config->nkeepout;
|
||||
if (config->of_node)
|
||||
nvmem->dev.of_node = config->of_node;
|
||||
|
||||
@@ -25,7 +25,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
--- a/drivers/nvmem/core.c
|
||||
+++ b/drivers/nvmem/core.c
|
||||
@@ -823,14 +823,6 @@ static int nvmem_add_cells_from_layout(s
|
||||
@@ -837,14 +837,6 @@ static int nvmem_add_cells_from_layout(s
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_OF)
|
||||
|
||||
@@ -84,7 +84,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
static int __nvmem_reg_read(struct nvmem_device *nvmem, unsigned int offset,
|
||||
void *val, size_t bytes)
|
||||
{
|
||||
@@ -739,97 +736,22 @@ static int nvmem_add_cells_from_fixed_la
|
||||
@@ -753,97 +750,22 @@ static int nvmem_add_cells_from_fixed_la
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
const void *nvmem_layout_get_match_data(struct nvmem_device *nvmem,
|
||||
struct nvmem_layout *layout)
|
||||
{
|
||||
@@ -837,7 +759,7 @@ const void *nvmem_layout_get_match_data(
|
||||
@@ -851,7 +773,7 @@ const void *nvmem_layout_get_match_data(
|
||||
const struct of_device_id *match;
|
||||
|
||||
layout_np = of_nvmem_layout_get_container(nvmem);
|
||||
@@ -198,7 +198,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
return match ? match->data : NULL;
|
||||
}
|
||||
@@ -949,19 +871,6 @@ struct nvmem_device *nvmem_register(cons
|
||||
@@ -963,19 +885,6 @@ struct nvmem_device *nvmem_register(cons
|
||||
goto err_put_device;
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
if (config->cells) {
|
||||
rval = nvmem_add_cells(nvmem, config->cells, config->ncells);
|
||||
if (rval)
|
||||
@@ -982,24 +891,24 @@ struct nvmem_device *nvmem_register(cons
|
||||
@@ -996,24 +905,24 @@ struct nvmem_device *nvmem_register(cons
|
||||
if (rval)
|
||||
goto err_remove_cells;
|
||||
|
||||
@@ -249,7 +249,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
if (config->compat)
|
||||
nvmem_sysfs_remove_compat(nvmem, config);
|
||||
err_put_device:
|
||||
@@ -1021,7 +930,7 @@ static void nvmem_device_release(struct
|
||||
@@ -1035,7 +944,7 @@ static void nvmem_device_release(struct
|
||||
device_remove_bin_file(nvmem->base_dev, &nvmem->eeprom);
|
||||
|
||||
nvmem_device_remove_all_cells(nvmem);
|
||||
@@ -258,7 +258,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
device_unregister(&nvmem->dev);
|
||||
}
|
||||
|
||||
@@ -1323,6 +1232,12 @@ nvmem_cell_get_from_lookup(struct device
|
||||
@@ -1337,6 +1246,12 @@ nvmem_cell_get_from_lookup(struct device
|
||||
return cell;
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
#if IS_ENABLED(CONFIG_OF)
|
||||
static struct nvmem_cell_entry *
|
||||
nvmem_find_cell_entry_by_node(struct nvmem_device *nvmem, struct device_node *np)
|
||||
@@ -1341,6 +1256,18 @@ nvmem_find_cell_entry_by_node(struct nvm
|
||||
@@ -1355,6 +1270,18 @@ nvmem_find_cell_entry_by_node(struct nvm
|
||||
return cell;
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
/**
|
||||
* of_nvmem_cell_get() - Get a nvmem cell from given device node and cell id
|
||||
*
|
||||
@@ -1403,16 +1330,29 @@ struct nvmem_cell *of_nvmem_cell_get(str
|
||||
@@ -1417,16 +1344,29 @@ struct nvmem_cell *of_nvmem_cell_get(str
|
||||
return ERR_CAST(nvmem);
|
||||
}
|
||||
|
||||
@@ -322,7 +322,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
return cell;
|
||||
}
|
||||
@@ -1526,6 +1466,7 @@ void nvmem_cell_put(struct nvmem_cell *c
|
||||
@@ -1540,6 +1480,7 @@ void nvmem_cell_put(struct nvmem_cell *c
|
||||
|
||||
kfree(cell);
|
||||
__nvmem_device_put(nvmem);
|
||||
@@ -330,7 +330,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nvmem_cell_put);
|
||||
|
||||
@@ -2118,11 +2059,22 @@ EXPORT_SYMBOL_GPL(nvmem_dev_size);
|
||||
@@ -2132,11 +2073,22 @@ EXPORT_SYMBOL_GPL(nvmem_dev_size);
|
||||
|
||||
static int __init nvmem_init(void)
|
||||
{
|
||||
|
||||
@@ -180,7 +180,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
#else /* CONFIG_NVMEM_SYSFS */
|
||||
|
||||
static int nvmem_sysfs_setup_compat(struct nvmem_device *nvmem,
|
||||
@@ -738,11 +847,25 @@ static int nvmem_add_cells_from_fixed_la
|
||||
@@ -752,11 +861,25 @@ static int nvmem_add_cells_from_fixed_la
|
||||
|
||||
int nvmem_layout_register(struct nvmem_layout *layout)
|
||||
{
|
||||
@@ -207,7 +207,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nvmem_layout_register);
|
||||
|
||||
@@ -901,10 +1024,20 @@ struct nvmem_device *nvmem_register(cons
|
||||
@@ -915,10 +1038,20 @@ struct nvmem_device *nvmem_register(cons
|
||||
if (rval)
|
||||
goto err_remove_dev;
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
--- a/drivers/nvmem/core.c
|
||||
+++ b/drivers/nvmem/core.c
|
||||
@@ -853,7 +853,7 @@ int nvmem_layout_register(struct nvmem_l
|
||||
@@ -867,7 +867,7 @@ int nvmem_layout_register(struct nvmem_l
|
||||
return -EINVAL;
|
||||
|
||||
/* Populate the cells */
|
||||
|
||||
@@ -24,7 +24,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
--- a/drivers/nvmem/core.c
|
||||
+++ b/drivers/nvmem/core.c
|
||||
@@ -875,19 +875,6 @@ void nvmem_layout_unregister(struct nvme
|
||||
@@ -889,19 +889,6 @@ void nvmem_layout_unregister(struct nvme
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nvmem_layout_unregister);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
--- a/drivers/nvmem/core.c
|
||||
+++ b/drivers/nvmem/core.c
|
||||
@@ -805,6 +805,11 @@ static int nvmem_add_cells_from_dt(struc
|
||||
@@ -819,6 +819,11 @@ static int nvmem_add_cells_from_dt(struc
|
||||
if (addr && len == (2 * sizeof(u32))) {
|
||||
info.bit_offset = be32_to_cpup(addr++);
|
||||
info.nbits = be32_to_cpup(addr);
|
||||
|
||||
@@ -16,7 +16,7 @@ Signed-off-by: Lee Jones <lee@kernel.org>
|
||||
|
||||
--- a/drivers/leds/trigger/ledtrig-netdev.c
|
||||
+++ b/drivers/leds/trigger/ledtrig-netdev.c
|
||||
@@ -99,6 +99,18 @@ static void set_baseline_state(struct le
|
||||
@@ -104,6 +104,18 @@ static void set_baseline_state(struct le
|
||||
trigger_data->link_speed == SPEED_1000)
|
||||
blink_on = true;
|
||||
|
||||
@@ -35,7 +35,7 @@ Signed-off-by: Lee Jones <lee@kernel.org>
|
||||
if (test_bit(TRIGGER_NETDEV_HALF_DUPLEX, &trigger_data->mode) &&
|
||||
trigger_data->duplex == DUPLEX_HALF)
|
||||
blink_on = true;
|
||||
@@ -289,6 +301,9 @@ static ssize_t netdev_led_attr_show(stru
|
||||
@@ -294,6 +306,9 @@ static ssize_t netdev_led_attr_show(stru
|
||||
case TRIGGER_NETDEV_LINK_10:
|
||||
case TRIGGER_NETDEV_LINK_100:
|
||||
case TRIGGER_NETDEV_LINK_1000:
|
||||
@@ -45,7 +45,7 @@ Signed-off-by: Lee Jones <lee@kernel.org>
|
||||
case TRIGGER_NETDEV_HALF_DUPLEX:
|
||||
case TRIGGER_NETDEV_FULL_DUPLEX:
|
||||
case TRIGGER_NETDEV_TX:
|
||||
@@ -319,6 +334,9 @@ static ssize_t netdev_led_attr_store(str
|
||||
@@ -324,6 +339,9 @@ static ssize_t netdev_led_attr_store(str
|
||||
case TRIGGER_NETDEV_LINK_10:
|
||||
case TRIGGER_NETDEV_LINK_100:
|
||||
case TRIGGER_NETDEV_LINK_1000:
|
||||
@@ -55,7 +55,7 @@ Signed-off-by: Lee Jones <lee@kernel.org>
|
||||
case TRIGGER_NETDEV_HALF_DUPLEX:
|
||||
case TRIGGER_NETDEV_FULL_DUPLEX:
|
||||
case TRIGGER_NETDEV_TX:
|
||||
@@ -337,7 +355,10 @@ static ssize_t netdev_led_attr_store(str
|
||||
@@ -342,7 +360,10 @@ static ssize_t netdev_led_attr_store(str
|
||||
if (test_bit(TRIGGER_NETDEV_LINK, &mode) &&
|
||||
(test_bit(TRIGGER_NETDEV_LINK_10, &mode) ||
|
||||
test_bit(TRIGGER_NETDEV_LINK_100, &mode) ||
|
||||
@@ -67,7 +67,7 @@ Signed-off-by: Lee Jones <lee@kernel.org>
|
||||
return -EINVAL;
|
||||
|
||||
cancel_delayed_work_sync(&trigger_data->work);
|
||||
@@ -367,6 +388,9 @@ DEFINE_NETDEV_TRIGGER(link, TRIGGER_NETD
|
||||
@@ -372,6 +393,9 @@ DEFINE_NETDEV_TRIGGER(link, TRIGGER_NETD
|
||||
DEFINE_NETDEV_TRIGGER(link_10, TRIGGER_NETDEV_LINK_10);
|
||||
DEFINE_NETDEV_TRIGGER(link_100, TRIGGER_NETDEV_LINK_100);
|
||||
DEFINE_NETDEV_TRIGGER(link_1000, TRIGGER_NETDEV_LINK_1000);
|
||||
@@ -77,7 +77,7 @@ Signed-off-by: Lee Jones <lee@kernel.org>
|
||||
DEFINE_NETDEV_TRIGGER(half_duplex, TRIGGER_NETDEV_HALF_DUPLEX);
|
||||
DEFINE_NETDEV_TRIGGER(full_duplex, TRIGGER_NETDEV_FULL_DUPLEX);
|
||||
DEFINE_NETDEV_TRIGGER(tx, TRIGGER_NETDEV_TX);
|
||||
@@ -425,6 +449,9 @@ static struct attribute *netdev_trig_att
|
||||
@@ -435,6 +459,9 @@ static struct attribute *netdev_trig_att
|
||||
&dev_attr_link_10.attr,
|
||||
&dev_attr_link_100.attr,
|
||||
&dev_attr_link_1000.attr,
|
||||
@@ -87,7 +87,7 @@ Signed-off-by: Lee Jones <lee@kernel.org>
|
||||
&dev_attr_full_duplex.attr,
|
||||
&dev_attr_half_duplex.attr,
|
||||
&dev_attr_rx.attr,
|
||||
@@ -522,6 +549,9 @@ static void netdev_trig_work(struct work
|
||||
@@ -532,6 +559,9 @@ static void netdev_trig_work(struct work
|
||||
test_bit(TRIGGER_NETDEV_LINK_10, &trigger_data->mode) ||
|
||||
test_bit(TRIGGER_NETDEV_LINK_100, &trigger_data->mode) ||
|
||||
test_bit(TRIGGER_NETDEV_LINK_1000, &trigger_data->mode) ||
|
||||
|
||||
@@ -2463,6 +2463,8 @@ CONFIG_HZ_100=y
|
||||
# CONFIG_I2C_DEBUG_BUS is not set
|
||||
# CONFIG_I2C_DEBUG_CORE is not set
|
||||
# CONFIG_I2C_DEMUX_PINCTRL is not set
|
||||
# CONFIG_I2C_DESIGNWARE_AMDPSP is not set
|
||||
# CONFIG_I2C_DESIGNWARE_BAYTRAIL is not set
|
||||
# CONFIG_I2C_DESIGNWARE_PCI is not set
|
||||
# CONFIG_I2C_DESIGNWARE_PLATFORM is not set
|
||||
# CONFIG_I2C_DESIGNWARE_SLAVE is not set
|
||||
@@ -6240,6 +6242,11 @@ CONFIG_SND_X86=y
|
||||
# CONFIG_SPI_CADENCE_XSPI is not set
|
||||
# CONFIG_SPI_DEBUG is not set
|
||||
# CONFIG_SPI_DESIGNWARE is not set
|
||||
# CONFIG_SPI_DW_BT1 is not set
|
||||
# CONFIG_SPI_DW_BT1_DIRMAP is not set
|
||||
# CONFIG_SPI_DW_DMA is not set
|
||||
# CONFIG_SPI_DW_MMIO is not set
|
||||
# CONFIG_SPI_DW_PCI is not set
|
||||
# CONFIG_SPI_FSL_DSPI is not set
|
||||
# CONFIG_SPI_FSL_ESPI is not set
|
||||
# CONFIG_SPI_FSL_SPI is not set
|
||||
|
||||
@@ -161,7 +161,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
Support for PF_PACKET sockets monitoring interface used by the ss tool.
|
||||
--- a/net/unix/Kconfig
|
||||
+++ b/net/unix/Kconfig
|
||||
@@ -29,6 +29,7 @@ config AF_UNIX_OOB
|
||||
@@ -24,6 +24,7 @@ config AF_UNIX_OOB
|
||||
config UNIX_DIAG
|
||||
tristate "UNIX: socket monitoring interface"
|
||||
depends on UNIX
|
||||
|
||||
@@ -341,7 +341,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/ipv4/fib_trie.c
|
||||
+++ b/net/ipv4/fib_trie.c
|
||||
@@ -3037,11 +3037,13 @@ static const struct seq_operations fib_r
|
||||
@@ -3015,11 +3015,13 @@ static const struct seq_operations fib_r
|
||||
|
||||
int __net_init fib_proc_init(struct net *net)
|
||||
{
|
||||
@@ -357,7 +357,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
fib_triestat_seq_show, NULL))
|
||||
goto out2;
|
||||
|
||||
@@ -3052,17 +3054,21 @@ int __net_init fib_proc_init(struct net
|
||||
@@ -3030,17 +3032,21 @@ int __net_init fib_proc_init(struct net
|
||||
return 0;
|
||||
|
||||
out3:
|
||||
|
||||
@@ -66,7 +66,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
static void rt_fibinfo_free(struct rtable __rcu **rtp)
|
||||
--- a/net/ipv4/fib_trie.c
|
||||
+++ b/net/ipv4/fib_trie.c
|
||||
@@ -2784,6 +2784,7 @@ static const char *const rtn_type_names[
|
||||
@@ -2762,6 +2762,7 @@ static const char *const rtn_type_names[
|
||||
[RTN_THROW] = "THROW",
|
||||
[RTN_NAT] = "NAT",
|
||||
[RTN_XRESOLVE] = "XRESOLVE",
|
||||
|
||||
@@ -33,7 +33,7 @@ string.
|
||||
#include <linux/init.h>
|
||||
#include <linux/kref.h>
|
||||
#include <linux/module.h>
|
||||
@@ -796,6 +799,62 @@ static int nvmem_validate_keepouts(struc
|
||||
@@ -810,6 +813,62 @@ static int nvmem_validate_keepouts(struc
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ string.
|
||||
static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_node *np)
|
||||
{
|
||||
struct device *dev = &nvmem->dev;
|
||||
@@ -835,6 +894,25 @@ static int nvmem_add_cells_from_dt(struc
|
||||
@@ -849,6 +908,25 @@ static int nvmem_add_cells_from_dt(struc
|
||||
if (nvmem->fixup_dt_cell_info)
|
||||
nvmem->fixup_dt_cell_info(nvmem, &info);
|
||||
|
||||
|
||||
@@ -224,6 +224,7 @@ CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IOMMU_SUPPORT=y
|
||||
# CONFIG_IPQ_APSS_PLL is not set
|
||||
CONFIG_IPQ_GCC_4019=y
|
||||
# CONFIG_IPQ_GCC_5018 is not set
|
||||
# CONFIG_IPQ_GCC_6018 is not set
|
||||
# CONFIG_IPQ_GCC_806X is not set
|
||||
# CONFIG_IPQ_GCC_8074 is not set
|
||||
|
||||
@@ -213,6 +213,7 @@ CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IOMMU_SUPPORT=y
|
||||
# CONFIG_IPQ_APSS_PLL is not set
|
||||
# CONFIG_IPQ_GCC_4019 is not set
|
||||
# CONFIG_IPQ_GCC_5018 is not set
|
||||
# CONFIG_IPQ_GCC_6018 is not set
|
||||
CONFIG_IPQ_GCC_806X=y
|
||||
# CONFIG_IPQ_GCC_8074 is not set
|
||||
|
||||
332
target/linux/mediatek/dts/mt7986a-tplink-archer-ax80-v1.dts
Normal file
332
target/linux/mediatek/dts/mt7986a-tplink-archer-ax80-v1.dts
Normal file
@@ -0,0 +1,332 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
#include "mt7986a.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "tplink,archer-ax80-v1", "mediatek,mt7986a";
|
||||
model = "TP-Link Archer AX80V1";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
led-boot = &led_B;
|
||||
led-failsafe = &led_R;
|
||||
led-running = &led_B;
|
||||
led-upgrade = &led_G;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
memory@40000000 {
|
||||
reg = <0 0x40000000 0 0x20000000>;
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
button-reset {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&pio 7 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
button-ledswitch {
|
||||
label = "ledswitch";
|
||||
linux,code = <KEY_BRIGHTNESS_ZERO>;
|
||||
gpios = <&pio 9 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
button-wps {
|
||||
label = "wps";
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
gpios = <&pio 10 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
button-wifi {
|
||||
label = "wlan";
|
||||
linux,code = <KEY_WLAN>;
|
||||
gpios = <&pio 16 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
reg_1p8v: regulator-1p8v {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "fixed-1.8V";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
reg_3p3v: regulator-3p3v {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "fixed-3.3V";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
reg_5v: regulator-5v {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "fixed-5V";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
|
||||
&auxadc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&crypto {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ð {
|
||||
status = "okay";
|
||||
|
||||
gmac0: mac@0 {
|
||||
compatible = "mediatek,eth-mac";
|
||||
reg = <0>;
|
||||
phy-mode = "2500base-x";
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
gmac1: mac@1 {
|
||||
compatible = "mediatek,eth-mac";
|
||||
reg = <1>;
|
||||
phy-mode = "2500base-x";
|
||||
phy-handle = <&phy6>;
|
||||
};
|
||||
|
||||
mdio: mdio-bus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
reset-gpios = <&pio 6 GPIO_ACTIVE_LOW>;
|
||||
reset-delay-us = <1500000>;
|
||||
reset-post-delay-us = <1000000>;
|
||||
|
||||
phy6: phy@6 {
|
||||
compatible = "ethernet-phy-ieee802.3-c45";
|
||||
reg = <6>;
|
||||
};
|
||||
|
||||
switch@1f {
|
||||
compatible = "mediatek,mt7531";
|
||||
reg = <31>;
|
||||
reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <66 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
label = "lan0";
|
||||
};
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
label = "lan1";
|
||||
};
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
label = "lan2";
|
||||
};
|
||||
port@3 {
|
||||
reg = <3>;
|
||||
label = "lan3";
|
||||
};
|
||||
port@6 {
|
||||
reg = <6>;
|
||||
label = "cpu";
|
||||
ethernet = <&gmac0>;
|
||||
phy-mode = "2500base-x";
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
|
||||
lp55231: led-controller@32 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "ti,lp55231";
|
||||
reg = <0x32>;
|
||||
status = "okay";
|
||||
clock-mode = /bits/ 8 <1>;
|
||||
|
||||
led_B: led@0 {
|
||||
chan-name = "B";
|
||||
led-cur = /bits/ 8 <0x14>;
|
||||
max-cur = /bits/ 8 <0x20>;
|
||||
reg = <0>;
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
};
|
||||
|
||||
led_G: led@3 {
|
||||
chan-name = "G";
|
||||
led-cur = /bits/ 8 <0x14>;
|
||||
max-cur = /bits/ 8 <0x20>;
|
||||
reg = <3>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
};
|
||||
|
||||
led_R: led@6 {
|
||||
chan-name = "R";
|
||||
led-cur = /bits/ 8 <0x14>;
|
||||
max-cur = /bits/ 8 <0x20>;
|
||||
reg = <6>;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
&spi0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi_flash_pins>;
|
||||
status = "okay";
|
||||
|
||||
spi_nand_flash: flash@0 {
|
||||
compatible = "spi-nand";
|
||||
reg = <0>;
|
||||
|
||||
spi-max-frequency = <52000000>;
|
||||
spi-tx-bus-width = <4>;
|
||||
spi-rx-bus-width = <4>;
|
||||
|
||||
spi-cal-enable;
|
||||
spi-cal-mode = "read-data";
|
||||
spi-cal-datalen = <7>;
|
||||
spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4e 0x41 0x4e 0x44>;
|
||||
spi-cal-addrlen = <5>;
|
||||
spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
|
||||
|
||||
partitions: partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "boot";
|
||||
reg = <0x0 0x200000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@200000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x200000 0x100000>;
|
||||
};
|
||||
|
||||
partition@300000 {
|
||||
label = "ubi0";
|
||||
reg = <0x300000 0x3200000>;
|
||||
};
|
||||
|
||||
partition@3500000 {
|
||||
label = "ubi1";
|
||||
reg = <0x3500000 0x3200000>;
|
||||
};
|
||||
|
||||
partition@6700000 {
|
||||
label = "userconfig";
|
||||
reg = <0x6700000 0x800000>;
|
||||
};
|
||||
|
||||
factory:partition@6f00000 {
|
||||
label = "tp_data";
|
||||
reg = <0x6f00000 0x400000>;
|
||||
};
|
||||
|
||||
partition@7300000 {
|
||||
label = "mali_data";
|
||||
reg = <0x7300000 0x800000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pio {
|
||||
spi_flash_pins: spi-flash-pins-33-to-38 {
|
||||
mux {
|
||||
function = "spi";
|
||||
groups = "spi0", "spi0_wp_hold";
|
||||
};
|
||||
conf-pu {
|
||||
pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
|
||||
drive-strength = <4>;
|
||||
mediatek,pull-up-adv = <0>;
|
||||
};
|
||||
conf-pd {
|
||||
pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
|
||||
drive-strength = <4>;
|
||||
mediatek,pull-down-adv = <0>;
|
||||
};
|
||||
};
|
||||
wf_2g_5g_pins: wf_2g_5g-pins {
|
||||
mux {
|
||||
function = "wifi";
|
||||
groups = "wf_2g", "wf_5g";
|
||||
};
|
||||
conf {
|
||||
pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
|
||||
"WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
|
||||
"WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
|
||||
"WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
|
||||
"WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
|
||||
"WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
|
||||
"WF1_TOP_CLK", "WF1_TOP_DATA";
|
||||
drive-strength = <4>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&trng {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ssusb {
|
||||
vusb33-supply = <®_3p3v>;
|
||||
vbus-supply = <®_5v>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&watchdog {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wifi {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wf_2g_5g_pins>;
|
||||
};
|
||||
@@ -134,6 +134,9 @@ mediatek_setup_interfaces()
|
||||
wavlink,wl-wn586x3)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2" eth1
|
||||
;;
|
||||
tplink,archer-ax80-v1)
|
||||
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" eth1
|
||||
;;
|
||||
tplink,re6000xd)
|
||||
ucidef_set_interface_lan "lan1 lan2 eth1"
|
||||
;;
|
||||
@@ -183,6 +186,7 @@ mediatek_setup_macs()
|
||||
wan_mac=$(macaddr_add "$lan_mac" 1)
|
||||
;;
|
||||
mercusys,mr90x-v1|\
|
||||
tplink,archer-ax80-v1|\
|
||||
tplink,re6000xd)
|
||||
label_mac=$(get_mac_binary "/tmp/tp_data/default-mac" 0)
|
||||
lan_mac=$label_mac
|
||||
|
||||
@@ -27,6 +27,14 @@ case "$FIRMWARE" in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"mediatek/mt7986_eeprom_mt7976_dual.bin")
|
||||
case "$board" in
|
||||
tplink,archer-ax80-v1)
|
||||
ln -sf /tmp/tp_data/MT7986_EEPROM.bin \
|
||||
/lib/firmware/$FIRMWARE
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
|
||||
@@ -119,6 +119,7 @@ case "$board" in
|
||||
[ "$PHYNBR" = "1" ] && macaddr_add $label_mac -2 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
mercusys,mr90x-v1|\
|
||||
tplink,archer-ax80-v1|\
|
||||
tplink,re6000xd)
|
||||
addr=$(get_mac_binary "/tmp/tp_data/default-mac" 0)
|
||||
[ "$PHYNBR" = "0" ] && echo "$addr" > /sys${DEVPATH}/macaddress
|
||||
|
||||
@@ -14,6 +14,7 @@ preinit_mount_cfg_part() {
|
||||
case $(board_name) in
|
||||
mercusys,mr80x-v3|\
|
||||
mercusys,mr90x-v1|\
|
||||
tplink,archer-ax80-v1|\
|
||||
tplink,re6000xd)
|
||||
mount_ubi_part "tp_data"
|
||||
;;
|
||||
|
||||
@@ -28,6 +28,7 @@ preinit_set_mac_address() {
|
||||
ip link set dev eth1 address "$addr"
|
||||
;;
|
||||
mercusys,mr90x-v1|\
|
||||
tplink,archer-ax80-v1|\
|
||||
tplink,re6000xd)
|
||||
addr=$(get_mac_binary "/tmp/tp_data/default-mac" 0)
|
||||
ip link set dev eth1 address "$(macaddr_add $addr 1)"
|
||||
|
||||
@@ -144,6 +144,7 @@ platform_do_upgrade() {
|
||||
;;
|
||||
mercusys,mr80x-v3|\
|
||||
mercusys,mr90x-v1|\
|
||||
tplink,archer-ax80-v1|\
|
||||
tplink,re6000xd)
|
||||
CI_UBIPART="ubi0"
|
||||
nand_do_upgrade "$1"
|
||||
|
||||
@@ -1755,6 +1755,20 @@ define Device/ruijie_rg-x60-pro
|
||||
endef
|
||||
TARGET_DEVICES += ruijie_rg-x60-pro
|
||||
|
||||
define Device/tplink_archer-ax80-v1
|
||||
DEVICE_VENDOR := TP-Link
|
||||
DEVICE_MODEL := Archer AX80V1
|
||||
DEVICE_DTS := mt7986a-tplink-archer-ax80-v1
|
||||
DEVICE_DTS_DIR := ../dts
|
||||
DEVICE_PACKAGES := kmod-leds-lp5523 kmod-usb3 kmod-mt7915e kmod-mt7986-firmware mt7986-wo-firmware
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGE_SIZE := 51200k
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += tplink_archer-ax80-v1
|
||||
|
||||
define Device/tplink_re6000xd
|
||||
DEVICE_VENDOR := TP-Link
|
||||
DEVICE_MODEL := RE6000XD
|
||||
|
||||
@@ -25,7 +25,7 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
|
||||
|
||||
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
|
||||
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
|
||||
@@ -177,6 +177,7 @@ static const struct of_device_id blockli
|
||||
@@ -178,6 +178,7 @@ static const struct of_device_id blockli
|
||||
{ .compatible = "ti,am625", },
|
||||
{ .compatible = "ti,am62a7", },
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
|
||||
|
||||
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
|
||||
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
|
||||
@@ -179,6 +179,7 @@ static const struct of_device_id blockli
|
||||
@@ -180,6 +180,7 @@ static const struct of_device_id blockli
|
||||
|
||||
{ .compatible = "qcom,ipq6018", },
|
||||
{ .compatible = "qcom,ipq8064", },
|
||||
|
||||
@@ -522,26 +522,36 @@
|
||||
ethphy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
interrupts = <0>;
|
||||
eee-broken-100tx;
|
||||
eee-broken-1000t;
|
||||
};
|
||||
|
||||
ethphy1: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
interrupts = <1>;
|
||||
eee-broken-100tx;
|
||||
eee-broken-1000t;
|
||||
};
|
||||
|
||||
ethphy2: ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
interrupts = <2>;
|
||||
eee-broken-100tx;
|
||||
eee-broken-1000t;
|
||||
};
|
||||
|
||||
ethphy3: ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
interrupts = <3>;
|
||||
eee-broken-100tx;
|
||||
eee-broken-1000t;
|
||||
};
|
||||
|
||||
ethphy4: ethernet-phy@4 {
|
||||
reg = <4>;
|
||||
interrupts = <4>;
|
||||
eee-broken-100tx;
|
||||
eee-broken-1000t;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
197
target/linux/ramips/dts/mt7621_arcadyan_we410443.dts
Executable file
197
target/linux/ramips/dts/mt7621_arcadyan_we410443.dts
Executable file
@@ -0,0 +1,197 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "mt7621.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
/ {
|
||||
model = "Arcadyan WE410443";
|
||||
compatible = "arcadyan,we410443", "mediatek,mt7621-soc";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_status_green;
|
||||
led-failsafe = &led_status_red;
|
||||
led-running = &led_status_green;
|
||||
led-upgrade = &led_status_blue;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
};
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_status_blue: blue {
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio 41 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_status_green: green {
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_status_red: red {
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio 44 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "all";
|
||||
reg = <0x0 0x2000000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x30000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "factory";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
eeprom_factory_0: eeprom@0 {
|
||||
reg = <0x0 0x4da8>;
|
||||
};
|
||||
|
||||
eeprom_factory_8000: eeprom@8000 {
|
||||
reg = <0x8000 0x4da8>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
compatible = "fixed-partitions";
|
||||
label = "firmware";
|
||||
reg = <0x50000 0x1f60000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "kernel";
|
||||
reg = <0x0 0x440000>;
|
||||
};
|
||||
|
||||
partition@400000 {
|
||||
label = "rootfs";
|
||||
reg = <0x440000 0x1b20000>;
|
||||
};
|
||||
};
|
||||
|
||||
partition@1fb0000 {
|
||||
label = "glbcfg";
|
||||
reg = <0x1fb0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1fc0000 {
|
||||
label = "config";
|
||||
reg = <0x1fc0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1fd0000 {
|
||||
label = "glbcfg2";
|
||||
reg = <0x1fd0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1fe0000 {
|
||||
label = "config2";
|
||||
reg = <0x1fe0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&eeprom_factory_0>;
|
||||
nvmem-cell-names = "eeprom";
|
||||
ieee80211-freq-limit = <2400000 2500000>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&eeprom_factory_8000>;
|
||||
nvmem-cell-names = "eeprom";
|
||||
ieee80211-freq-limit = <5000000 6000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "i2c", "wdt", "sdhci";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports {
|
||||
port@0 {
|
||||
status = "okay";
|
||||
label = "lan";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&xhci {
|
||||
status = "disabled";
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user