Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
7772a67f19
@ -45,7 +45,7 @@ prepend() {
|
||||
local value="$2"
|
||||
local sep="${3:- }"
|
||||
|
||||
eval "export ${NO_EXPORT:+-n} -- \"$var=\${$value:+\${$value}\$sep}\$var\""
|
||||
eval "export ${NO_EXPORT:+-n} -- \"$var=\$value\${$var:+\${sep}\${$var}}\""
|
||||
}
|
||||
|
||||
list_contains() {
|
||||
|
||||
@ -14,8 +14,27 @@ missing_lines() {
|
||||
IFS="$oIFS"
|
||||
}
|
||||
|
||||
# Rootfs mount options can be passed by declaring in the kernel
|
||||
# cmdline as much options as needed prefixed with "rootfs_mount_options."
|
||||
#
|
||||
# Example:
|
||||
# rootfs_mount_options.compress_algorithm=zstd rootfs_mount_options.noinline_data
|
||||
#
|
||||
compose_rootfs_mount_options() {
|
||||
local mount_options
|
||||
local cmdlinevar
|
||||
|
||||
for cmdlinevar in $(cat /proc/cmdline); do
|
||||
if [ "$cmdlinevar" != "${cmdlinevar#rootfs_mount_options\.}" ]; then
|
||||
append mount_options "${cmdlinevar#rootfs_mount_options\.}"
|
||||
fi
|
||||
done
|
||||
|
||||
echo $mount_options
|
||||
}
|
||||
|
||||
do_mount_root() {
|
||||
mount_root
|
||||
mount_root start "$(compose_rootfs_mount_options)"
|
||||
boot_run_hook preinit_mount_root
|
||||
[ -f /sysupgrade.tgz -o -f /tmp/sysupgrade.tar ] && {
|
||||
echo "- config restore -"
|
||||
|
||||
@ -34,7 +34,7 @@ ALLWIFIBOARDS:= \
|
||||
dynalink_dl-wrx36 \
|
||||
edgecore_eap102 \
|
||||
edimax_cax1800 \
|
||||
linksys_mx4200 \
|
||||
linksys_mx4200 \
|
||||
netgear_rax120v2 \
|
||||
netgear_wax218 \
|
||||
netgear_wax620 \
|
||||
|
||||
@ -2,8 +2,8 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=bcm27xx-gpu-fw
|
||||
PKG_VERSION:=2022-05-16
|
||||
PKG_RELEASE:=3673be308132de102fdff491d1333d9d0f823557
|
||||
PKG_VERSION:=2024-01-11
|
||||
PKG_RELEASE:=0968de28716a9b1f106b8492646d0ed0a2800152
|
||||
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_RELEASE)
|
||||
|
||||
@ -26,7 +26,7 @@ define Download/bootcode_bin
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-bootcode.bin
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=bootcode.bin
|
||||
HASH:=69309823da13dc96b89e3d82b44f820e4f84efa79d207adad2c8784559794f03
|
||||
HASH:=af603ebd97e7b692c30195563f7b25656eb05d57838cf1a715ebb470d1614ce4
|
||||
endef
|
||||
$(eval $(call Download,bootcode_bin))
|
||||
|
||||
@ -34,7 +34,7 @@ define Download/fixup_dat
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup.dat
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=fixup.dat
|
||||
HASH:=921f56c62ad1995addb984b156c869202dc5d46bbe9ebcbd02c20f0def9058e3
|
||||
HASH:=c28ea955e672e374016dca61d63afa026490f0473a98115908586ab48e324aeb
|
||||
endef
|
||||
$(eval $(call Download,fixup_dat))
|
||||
|
||||
@ -42,7 +42,7 @@ define Download/fixup_cd_dat
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup_cd.dat
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=fixup_cd.dat
|
||||
HASH:=83a985aa0d73844786f3b3bf674826c520212f6f72fc6a890f2ebb5f87de5d8c
|
||||
HASH:=3cf1aef5f596ca106203ed5dac9ad45e85929ec55ce44c813588645e174442ec
|
||||
endef
|
||||
$(eval $(call Download,fixup_cd_dat))
|
||||
|
||||
@ -50,7 +50,7 @@ define Download/fixup_x_dat
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup_x.dat
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=fixup_x.dat
|
||||
HASH:=8b00b00678adafe01e087240d156dbc87822e745b269be4f282596b69265cd1e
|
||||
HASH:=56525c8feabde1ab86f36bb09bc55171659b2993f94132cf81ffc4293d62269d
|
||||
endef
|
||||
$(eval $(call Download,fixup_x_dat))
|
||||
|
||||
@ -58,7 +58,7 @@ define Download/fixup4_dat
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup4.dat
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=fixup4.dat
|
||||
HASH:=ef2b5d2a0a95ca48e00a1ce78b7650ee9e947cc1c588704c8ae30c1623122e2f
|
||||
HASH:=615f8595801bf52373039f73ad5ad9513f83400d355eb1b2c075c7ae907e927c
|
||||
endef
|
||||
$(eval $(call Download,fixup4_dat))
|
||||
|
||||
@ -66,7 +66,7 @@ define Download/fixup4cd_dat
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup4cd.dat
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=fixup4cd.dat
|
||||
HASH:=83a985aa0d73844786f3b3bf674826c520212f6f72fc6a890f2ebb5f87de5d8c
|
||||
HASH:=3cf1aef5f596ca106203ed5dac9ad45e85929ec55ce44c813588645e174442ec
|
||||
endef
|
||||
$(eval $(call Download,fixup4cd_dat))
|
||||
|
||||
@ -74,7 +74,7 @@ define Download/fixup4x_dat
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup4x.dat
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=fixup4x.dat
|
||||
HASH:=a6c4e30ada5a00fe7de83c460638ca824647651bb4a3644b8c65d7ba1d9f2d2b
|
||||
HASH:=6d27a4b8ecb78cef9e1f03751b4aaec5ce8749d36988f381145a8a41dbf164ae
|
||||
endef
|
||||
$(eval $(call Download,fixup4x_dat))
|
||||
|
||||
@ -82,7 +82,7 @@ define Download/start_elf
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-start.elf
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=start.elf
|
||||
HASH:=5455c148f4b8b04c553809bd22b995ee49ba5279ca3848df8bde6f80a388f7e0
|
||||
HASH:=e8348e88522e7a1d0e2b0944ab66d7d8f4f30da98f326e2b3c123522e45f71b2
|
||||
endef
|
||||
$(eval $(call Download,start_elf))
|
||||
|
||||
@ -90,7 +90,7 @@ define Download/start_cd_elf
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-start_cd.elf
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=start_cd.elf
|
||||
HASH:=168c0a9178d5a3b4bd89ef770826a85b4ea3132560ba3600c212c0cec4c575c6
|
||||
HASH:=c9b4de3f12bec7808868b898c49f656b5378ddc315f12ccab83d6519bad51680
|
||||
endef
|
||||
$(eval $(call Download,start_cd_elf))
|
||||
|
||||
@ -98,7 +98,7 @@ define Download/start_x_elf
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-start_x.elf
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=start_x.elf
|
||||
HASH:=30c6a7f32a25185053ca3ca9e4bcfe932246ed42a1b7c37f8803209f93d86404
|
||||
HASH:=0b5c06c109984361eeed0ab14d146f686d8aa8da2025689b887e9cb098636db9
|
||||
endef
|
||||
$(eval $(call Download,start_x_elf))
|
||||
|
||||
@ -106,7 +106,7 @@ define Download/start4_elf
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-start4.elf
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=start4.elf
|
||||
HASH:=be8bbff41dba2749b7b0e812f0a9d87a9122d18508f7b5ff3cd20f303d15bc07
|
||||
HASH:=fedc4ecd72c9d21018e210240dcd2e41a8bb5f936fb5674c3351f2a447a22203
|
||||
endef
|
||||
$(eval $(call Download,start4_elf))
|
||||
|
||||
@ -114,7 +114,7 @@ define Download/start4cd_elf
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-start4cd.elf
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=start4cd.elf
|
||||
HASH:=000372e9cf6815ade595948dbd6328665f2a535eeee44e74b0ec8e56b6fbbf90
|
||||
HASH:=ea22282a77666801378137a651e7e0b17cc186f63cdbdc8b9bb98749cd12b256
|
||||
endef
|
||||
$(eval $(call Download,start4cd_elf))
|
||||
|
||||
@ -122,7 +122,7 @@ define Download/start4x_elf
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-start4x.elf
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=start4x.elf
|
||||
HASH:=48895858f7936570dfab44c67bdcb0357ac8fcd630162c36ac9ed8f2de85c038
|
||||
HASH:=c509e73a9cba7af3223dea885f58294bd04845e822aa3d6278500fa4dcdb112f
|
||||
endef
|
||||
$(eval $(call Download,start4x_elf))
|
||||
|
||||
|
||||
@ -261,3 +261,37 @@ define KernelPackage/input-leds/description
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,input-leds))
|
||||
|
||||
|
||||
define KernelPackage/leds-lp55xx-common
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=LED common driver for LP5521/LP5523/LP55231/LP5562 controllers
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_LEDS_LP55XX_COMMON
|
||||
FILES:=$(LINUX_DIR)/drivers/leds/leds-lp55xx-common.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,leds-lp55xx-common,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/leds-lp55xx-common/description
|
||||
This option enables support for Texas Instruments
|
||||
LP5521/LP5523/LP55231/LP5562 common driver.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,leds-lp55xx-common))
|
||||
|
||||
|
||||
define KernelPackage/leds-lp5562
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=LED driver for LP5562 controllers
|
||||
DEPENDS:=+kmod-i2c-core +kmod-leds-lp55xx-common
|
||||
KCONFIG:=CONFIG_LEDS_LP5562
|
||||
FILES:=$(LINUX_DIR)/drivers/leds/leds-lp5562.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,leds-lp5562,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/leds-lp5562/description
|
||||
This option enables support for Texas Instruments LP5562
|
||||
LED controllers.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,leds-lp5562))
|
||||
@ -25,6 +25,8 @@ PKG_INSTALL:=1
|
||||
PKG_BUILD_DEPENDS:=gettext-full/host libunistring libxml2
|
||||
PKG_BUILD_PARALLEL:=0
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
HOST_BUILD_DEPENDS:=gperf/host libunistring/host libxml2/host
|
||||
HOST_BUILD_PARALLEL:=0
|
||||
|
||||
|
||||
@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uqmi.git
|
||||
PKG_SOURCE_DATE:=2023-10-29
|
||||
PKG_SOURCE_VERSION:=eea292401c388a4eb59c0caf5d00aa046c6059f4
|
||||
PKG_MIRROR_HASH:=744f7e2010bd16ca08b03551287a0e1d119e1e6e099f8abf935328d3d1344893
|
||||
PKG_SOURCE_DATE:=2024-01-16
|
||||
PKG_SOURCE_VERSION:=c3488b831ce6285c8107704156b9b8ed7d59deb3
|
||||
PKG_MIRROR_HASH:=3ca47f2ae22bc1adcb05560e6dbea824063fa914670c13f107e7e78f33399779
|
||||
PKG_MAINTAINER:=Matti Laakso <malaakso@elisanet.fi>
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@ -12,9 +12,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
|
||||
PKG_MIRROR_HASH:=e9953b038a2c2ed2c4783b66d1c0d0cea0deab2f2bfa6712929243e3197c3bdd
|
||||
PKG_SOURCE_DATE:=2023-05-28
|
||||
PKG_SOURCE_VERSION:=3a07943e1e60699ba952e605f0cf23c82de356cb
|
||||
PKG_MIRROR_HASH:=964c3bf2b1d16369380bad1098ab0a1b996f714bb448322bd82ba80aa9acd03f
|
||||
PKG_SOURCE_DATE:=2024-01-15
|
||||
PKG_SOURCE_VERSION:=325d63d67006c5526ab9b0fbc62329da48aa93af
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bcm27xx-userland
|
||||
PKG_VERSION:=c4fd1b8986c6d6d4ae5cd51e65a8bbeb495dfa4e
|
||||
PKG_VERSION:=96a7334ae9d5fc9db7ac92e59852377df63f1848
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/raspberrypi/userland/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=ab8a5b27c34cf1b97de87b895448a6355229f73b679866b47c51a723273cc8ae
|
||||
PKG_HASH:=557ee8390de5db1ed90386c1ba0221e7f6f9dd87e858a00a34be3b1f9ede193f
|
||||
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ all: compile
|
||||
$(BIN_DIR)/$(IB_NAME).tar.xz: clean
|
||||
rm -rf $(PKG_BUILD_DIR)
|
||||
mkdir -p $(IB_KDIR) $(IB_LDIR) $(PKG_BUILD_DIR)/staging_dir/host/lib \
|
||||
$(PKG_BUILD_DIR)/target $(PKG_BUILD_DIR)/scripts $(IB_DTSDIR)
|
||||
$(PKG_BUILD_DIR)/target/linux $(PKG_BUILD_DIR)/scripts $(IB_DTSDIR)
|
||||
-cp $(TOPDIR)/.config $(PKG_BUILD_DIR)/.config
|
||||
$(SED) 's/^CONFIG_BINARY_FOLDER=.*/# CONFIG_BINARY_FOLDER is not set/' $(PKG_BUILD_DIR)/.config
|
||||
$(SED) 's/^CONFIG_DOWNLOAD_FOLDER=.*/# CONFIG_DOWNLOAD_FOLDER is not set/' $(PKG_BUILD_DIR)/.config
|
||||
@ -78,7 +78,9 @@ ifneq ($(CONFIG_SIGNATURE_CHECK),)
|
||||
$(CP) -L $(STAGING_DIR_ROOT)/usr/sbin/opkg-key $(PKG_BUILD_DIR)/scripts/
|
||||
endif
|
||||
|
||||
$(CP) -L $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/
|
||||
$(CP) -L $(TOPDIR)/target/linux/Makefile $(PKG_BUILD_DIR)/target/linux
|
||||
$(CP) -L $(TOPDIR)/target/linux/generic $(PKG_BUILD_DIR)/target/linux
|
||||
$(CP) -L $(TOPDIR)/target/linux/$(BOARD) $(PKG_BUILD_DIR)/target/linux
|
||||
if [ -d $(TOPDIR)/staging_dir/host/lib/grub ]; then \
|
||||
$(CP) $(TOPDIR)/staging_dir/host/lib/grub/ $(PKG_BUILD_DIR)/staging_dir/host/lib; \
|
||||
fi
|
||||
|
||||
@ -24,14 +24,8 @@ CONFIG_ARM64=y
|
||||
CONFIG_ARM64_4K_PAGES=y
|
||||
CONFIG_ARM64_CNP=y
|
||||
CONFIG_ARM64_EPAN=y
|
||||
CONFIG_ARM64_ERRATUM_819472=y
|
||||
CONFIG_ARM64_ERRATUM_824069=y
|
||||
CONFIG_ARM64_ERRATUM_826319=y
|
||||
CONFIG_ARM64_ERRATUM_827319=y
|
||||
CONFIG_ARM64_ERRATUM_832075=y
|
||||
CONFIG_ARM64_ERRATUM_843419=y
|
||||
CONFIG_ARM64_ERRATUM_1319367=y
|
||||
CONFIG_ARM64_HW_AFDBM=y
|
||||
CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y
|
||||
CONFIG_ARM64_PAGE_SHIFT=12
|
||||
CONFIG_ARM64_PAN=y
|
||||
CONFIG_ARM64_PA_BITS=48
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
From 1f9195cda30b320038cf94b4d14f85e58dd69d6d Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Tue, 6 Nov 2018 12:57:48 +0000
|
||||
Subject: [PATCH] sc16is7xx: Don't spin if no data received
|
||||
|
||||
See: https://github.com/raspberrypi/linux/issues/2676
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
---
|
||||
drivers/tty/serial/sc16is7xx.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/drivers/tty/serial/sc16is7xx.c
|
||||
+++ b/drivers/tty/serial/sc16is7xx.c
|
||||
@@ -783,6 +783,8 @@ static bool sc16is7xx_port_irq(struct sc
|
||||
|
||||
if (rxlen)
|
||||
sc16is7xx_handle_rx(port, rxlen, iir);
|
||||
+ else
|
||||
+ return false;
|
||||
break;
|
||||
/* CTSRTS interrupt comes only when CTS goes inactive */
|
||||
case SC16IS7XX_IIR_CTSRTS_SRC:
|
||||
@ -9,8 +9,7 @@ BOARDNAME:=Broadcom BMIPS
|
||||
SUBTARGETS:=bcm6318 bcm6328 bcm6358 bcm6362 bcm6368 bcm63268
|
||||
FEATURES:=gpio squashfs usb
|
||||
|
||||
KERNEL_PATCHVER:=5.15
|
||||
KERNEL_TESTING_PATCHVER:=6.1
|
||||
KERNEL_PATCHVER:=6.1
|
||||
|
||||
define Target/Description
|
||||
Build firmware images for BCM33xx cable modem chips,
|
||||
|
||||
@ -1,271 +0,0 @@
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=15
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_B53=y
|
||||
CONFIG_B53_MDIO_DRIVER=y
|
||||
CONFIG_B53_MMAP_DRIVER=y
|
||||
CONFIG_B53_SPI_DRIVER=y
|
||||
CONFIG_BCM6345_EXT_IRQ=y
|
||||
CONFIG_BCM6345_L1_IRQ=y
|
||||
# CONFIG_BCM6348_ENET is not set
|
||||
CONFIG_BCM6368_ENETSW=y
|
||||
CONFIG_BCM63XX_POWER=y
|
||||
CONFIG_BCM7038_WDT=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_BMIPS_GENERIC=y
|
||||
CONFIG_CEVT_R4K=y
|
||||
# CONFIG_CLK_BCM63268_TIMER is not set
|
||||
CONFIG_CLK_BCM_63XX_GATE=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CPU_BIG_ENDIAN=y
|
||||
CONFIG_CPU_BMIPS=y
|
||||
CONFIG_CPU_BMIPS32_3300=y
|
||||
CONFIG_CPU_BMIPS4350=y
|
||||
CONFIG_CPU_BMIPS4380=y
|
||||
CONFIG_CPU_GENERIC_DUMP_TLB=y
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_CPU_HAS_RIXI=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
|
||||
CONFIG_CPU_NO_EFFICIENT_FFS=y
|
||||
CONFIG_CPU_R4K_CACHE_TLB=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_CPUFREQ=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
CONFIG_CRASH_DUMP=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_CSRC_R4K=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
CONFIG_DTC=y
|
||||
# CONFIG_DT_BCM93384WVG is not set
|
||||
# CONFIG_DT_BCM93384WVG_VIPER is not set
|
||||
# CONFIG_DT_BCM96368MVWG is not set
|
||||
# CONFIG_DT_BCM97125CBMB is not set
|
||||
# CONFIG_DT_BCM97346DBSMB is not set
|
||||
# CONFIG_DT_BCM97358SVMB is not set
|
||||
# CONFIG_DT_BCM97360SVMB is not set
|
||||
# CONFIG_DT_BCM97362SVMB is not set
|
||||
# CONFIG_DT_BCM97420C is not set
|
||||
# CONFIG_DT_BCM97425SVMB is not set
|
||||
# CONFIG_DT_BCM97435SVMB is not set
|
||||
# CONFIG_DT_BCM9EJTAGPRB is not set
|
||||
# CONFIG_DT_COMTREND_VR3032U is not set
|
||||
# CONFIG_DT_NETGEAR_CVG834G is not set
|
||||
CONFIG_DT_NONE=y
|
||||
# CONFIG_DT_SFR_NEUFBOX4_SERCOMM is not set
|
||||
# CONFIG_DT_SFR_NEUFBOX6_SERCOMM is not set
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_FIND_FIRST_BIT=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IOMAP=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_LIB_ASHLDI3=y
|
||||
CONFIG_GENERIC_LIB_ASHRDI3=y
|
||||
CONFIG_GENERIC_LIB_CMPDI2=y
|
||||
CONFIG_GENERIC_LIB_LSHRDI3=y
|
||||
CONFIG_GENERIC_LIB_UCMPDI2=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
# CONFIG_GPIO_BRCMSTB is not set
|
||||
CONFIG_GPIO_CDEV=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
CONFIG_GPIO_GENERIC_PLATFORM=y
|
||||
CONFIG_GPIO_REGMAP=y
|
||||
CONFIG_GRO_CELLS=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_MIPS_CPU=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
# CONFIG_LEDS_SERCOMM_MSP430 is not set
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_BUS_MUX=y
|
||||
CONFIG_MDIO_BUS_MUX_BCM6368=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MIPS=y
|
||||
CONFIG_MIPS_ASID_BITS=8
|
||||
CONFIG_MIPS_ASID_SHIFT=0
|
||||
CONFIG_MIPS_CLOCK_VSYSCALL=y
|
||||
# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
|
||||
CONFIG_MIPS_CMDLINE_FROM_DTB=y
|
||||
CONFIG_MIPS_EBPF_JIT=y
|
||||
CONFIG_MIPS_EXTERNAL_TIMER=y
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=6
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT_4=y
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT_6=y
|
||||
CONFIG_MIPS_LD_CAN_LINK_VDSO=y
|
||||
# CONFIG_MIPS_NO_APPENDED_DTB is not set
|
||||
CONFIG_MIPS_NR_CPU_NR_MAP=2
|
||||
CONFIG_MIPS_O32_FP64_SUPPORT=y
|
||||
CONFIG_MIPS_RAW_APPENDED_DTB=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MODULE_FORCE_LOAD=y
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
# CONFIG_MTD_BCM63XX_PARTS is not set
|
||||
CONFIG_MTD_CFI_ADV_OPTIONS=y
|
||||
CONFIG_MTD_CFI_BE_BYTE_SWAP=y
|
||||
# CONFIG_MTD_CFI_GEOMETRY is not set
|
||||
# CONFIG_MTD_CFI_NOSWAP is not set
|
||||
CONFIG_MTD_CFI_STAA=y
|
||||
CONFIG_MTD_JEDECPROBE=y
|
||||
# CONFIG_MTD_PARSER_IMAGETAG is not set
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPLIT_BCM63XX_FW=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NET_DEVLINK=y
|
||||
CONFIG_NET_DSA=y
|
||||
CONFIG_NET_DSA_TAG_BRCM=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_COMMON=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_LEGACY=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_PREPEND=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
CONFIG_NO_EXCEPT_FILL=y
|
||||
CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
|
||||
CONFIG_NR_CPUS=2
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIEPORTBUS=y
|
||||
CONFIG_PCIE_BCM6318=y
|
||||
# CONFIG_PCIE_BCM6328 is not set
|
||||
CONFIG_PCIE_PME=y
|
||||
# CONFIG_PCI_BCM6348 is not set
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DRIVERS_LEGACY=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLINK=y
|
||||
CONFIG_PHYSICAL_START=0x80010000
|
||||
CONFIG_PHY_BCM63XX_USBH=y
|
||||
# CONFIG_PHY_BRCM_SATA is not set
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_BCM6318=y
|
||||
# CONFIG_PINCTRL_BCM63268 is not set
|
||||
# CONFIG_PINCTRL_BCM6328 is not set
|
||||
# CONFIG_PINCTRL_BCM6358 is not set
|
||||
# CONFIG_PINCTRL_BCM6362 is not set
|
||||
# CONFIG_PINCTRL_BCM6368 is not set
|
||||
CONFIG_PINCTRL_BCM63XX=y
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_PM_GENERIC_DOMAINS=y
|
||||
CONFIG_PM_GENERIC_DOMAINS_OF=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_POSIX_MQUEUE_SYSCTL=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_PROC_VMCORE=y
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_QUEUED_RWLOCKS=y
|
||||
CONFIG_QUEUED_SPINLOCKS=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_RESET_BCM6345=y
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RPS=y
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
CONFIG_SERIAL_BCM63XX=y
|
||||
CONFIG_SERIAL_BCM63XX_CONSOLE=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_UP=y
|
||||
CONFIG_SOCK_RX_QUEUE_MAPPING=y
|
||||
CONFIG_SOC_BCM63XX=y
|
||||
CONFIG_SPI=y
|
||||
# CONFIG_SPI_BCM63XX is not set
|
||||
CONFIG_SPI_BCM63XX_HSSPI=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_SWAP_IO_SPACE=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SYNC_R4K=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS32_3300=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS4350=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS4380=y
|
||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
|
||||
CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y
|
||||
CONFIG_SYS_SUPPORTS_SMP=y
|
||||
CONFIG_TARGET_ISA_REV=0
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_USB_EHCI_BIG_ENDIAN_DESC=y
|
||||
CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
|
||||
CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
|
||||
CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_WATCHDOG_NOWAYOUT=y
|
||||
CONFIG_WEAK_ORDERING=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XXHASH=y
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_ZSTD_COMPRESS=y
|
||||
CONFIG_ZSTD_DECOMPRESS=y
|
||||
@ -1,285 +0,0 @@
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=15
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_B53=y
|
||||
CONFIG_B53_MDIO_DRIVER=y
|
||||
CONFIG_B53_MMAP_DRIVER=y
|
||||
CONFIG_B53_SPI_DRIVER=y
|
||||
CONFIG_BCM6345_EXT_IRQ=y
|
||||
CONFIG_BCM6345_L1_IRQ=y
|
||||
# CONFIG_BCM6348_ENET is not set
|
||||
CONFIG_BCM6368_ENETSW=y
|
||||
CONFIG_BCM63XX_POWER=y
|
||||
CONFIG_BCM7038_WDT=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_BMIPS_GENERIC=y
|
||||
CONFIG_CEVT_R4K=y
|
||||
CONFIG_CLK_BCM63268_TIMER=y
|
||||
CONFIG_CLK_BCM_63XX_GATE=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CPU_BIG_ENDIAN=y
|
||||
CONFIG_CPU_BMIPS=y
|
||||
CONFIG_CPU_BMIPS32_3300=y
|
||||
CONFIG_CPU_BMIPS4350=y
|
||||
CONFIG_CPU_BMIPS4380=y
|
||||
CONFIG_CPU_GENERIC_DUMP_TLB=y
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_CPU_HAS_RIXI=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
|
||||
CONFIG_CPU_NO_EFFICIENT_FFS=y
|
||||
CONFIG_CPU_R4K_CACHE_TLB=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_CPUFREQ=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
CONFIG_CRASH_DUMP=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_HASH_INFO=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_CSRC_R4K=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
CONFIG_DTC=y
|
||||
# CONFIG_DT_BCM93384WVG is not set
|
||||
# CONFIG_DT_BCM93384WVG_VIPER is not set
|
||||
# CONFIG_DT_BCM96368MVWG is not set
|
||||
# CONFIG_DT_BCM97125CBMB is not set
|
||||
# CONFIG_DT_BCM97346DBSMB is not set
|
||||
# CONFIG_DT_BCM97358SVMB is not set
|
||||
# CONFIG_DT_BCM97360SVMB is not set
|
||||
# CONFIG_DT_BCM97362SVMB is not set
|
||||
# CONFIG_DT_BCM97420C is not set
|
||||
# CONFIG_DT_BCM97425SVMB is not set
|
||||
# CONFIG_DT_BCM97435SVMB is not set
|
||||
# CONFIG_DT_BCM9EJTAGPRB is not set
|
||||
# CONFIG_DT_COMTREND_VR3032U is not set
|
||||
# CONFIG_DT_NETGEAR_CVG834G is not set
|
||||
CONFIG_DT_NONE=y
|
||||
# CONFIG_DT_SFR_NEUFBOX4_SERCOMM is not set
|
||||
# CONFIG_DT_SFR_NEUFBOX6_SERCOMM is not set
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_FIND_FIRST_BIT=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IOMAP=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_LIB_ASHLDI3=y
|
||||
CONFIG_GENERIC_LIB_ASHRDI3=y
|
||||
CONFIG_GENERIC_LIB_CMPDI2=y
|
||||
CONFIG_GENERIC_LIB_LSHRDI3=y
|
||||
CONFIG_GENERIC_LIB_UCMPDI2=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
# CONFIG_GPIO_BRCMSTB is not set
|
||||
CONFIG_GPIO_CDEV=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
CONFIG_GPIO_GENERIC_PLATFORM=y
|
||||
CONFIG_GPIO_REGMAP=y
|
||||
CONFIG_GRO_CELLS=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_BCM2835=y
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_MIPS_CPU=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
# CONFIG_LEDS_SERCOMM_MSP430 is not set
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_BUS_MUX=y
|
||||
CONFIG_MDIO_BUS_MUX_BCM6368=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MIPS=y
|
||||
CONFIG_MIPS_ASID_BITS=8
|
||||
CONFIG_MIPS_ASID_SHIFT=0
|
||||
CONFIG_MIPS_CLOCK_VSYSCALL=y
|
||||
# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
|
||||
CONFIG_MIPS_CMDLINE_FROM_DTB=y
|
||||
CONFIG_MIPS_EBPF_JIT=y
|
||||
CONFIG_MIPS_EXTERNAL_TIMER=y
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=6
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT_4=y
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT_6=y
|
||||
CONFIG_MIPS_LD_CAN_LINK_VDSO=y
|
||||
# CONFIG_MIPS_NO_APPENDED_DTB is not set
|
||||
CONFIG_MIPS_NR_CPU_NR_MAP=2
|
||||
CONFIG_MIPS_O32_FP64_SUPPORT=y
|
||||
CONFIG_MIPS_RAW_APPENDED_DTB=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MODULE_FORCE_LOAD=y
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
# CONFIG_MTD_BCM63XX_PARTS is not set
|
||||
CONFIG_MTD_CFI_ADV_OPTIONS=y
|
||||
CONFIG_MTD_CFI_BE_BYTE_SWAP=y
|
||||
# CONFIG_MTD_CFI_GEOMETRY is not set
|
||||
# CONFIG_MTD_CFI_NOSWAP is not set
|
||||
CONFIG_MTD_CFI_STAA=y
|
||||
CONFIG_MTD_JEDECPROBE=y
|
||||
CONFIG_MTD_NAND_BRCMNAND=y
|
||||
CONFIG_MTD_NAND_CORE=y
|
||||
CONFIG_MTD_NAND_ECC=y
|
||||
CONFIG_MTD_NAND_ECC_SW_HAMMING=y
|
||||
# CONFIG_MTD_PARSER_IMAGETAG is not set
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPLIT_BCM63XX_FW=y
|
||||
CONFIG_MTD_SPLIT_BCM_WFI_FW=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BEB_LIMIT=20
|
||||
CONFIG_MTD_UBI_BLOCK=y
|
||||
CONFIG_MTD_UBI_WL_THRESHOLD=4096
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NET_DEVLINK=y
|
||||
CONFIG_NET_DSA=y
|
||||
CONFIG_NET_DSA_TAG_BRCM=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_COMMON=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_LEGACY=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_PREPEND=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
CONFIG_NO_EXCEPT_FILL=y
|
||||
CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
|
||||
CONFIG_NR_CPUS=2
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIEPORTBUS=y
|
||||
# CONFIG_PCIE_BCM6318 is not set
|
||||
CONFIG_PCIE_BCM6328=y
|
||||
CONFIG_PCIE_PME=y
|
||||
# CONFIG_PCI_BCM6348 is not set
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DRIVERS_LEGACY=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLINK=y
|
||||
CONFIG_PHYSICAL_START=0x80010000
|
||||
CONFIG_PHY_BCM63XX_USBH=y
|
||||
# CONFIG_PHY_BRCM_SATA is not set
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_BCM6318 is not set
|
||||
CONFIG_PINCTRL_BCM63268=y
|
||||
# CONFIG_PINCTRL_BCM6328 is not set
|
||||
# CONFIG_PINCTRL_BCM6358 is not set
|
||||
# CONFIG_PINCTRL_BCM6362 is not set
|
||||
# CONFIG_PINCTRL_BCM6368 is not set
|
||||
CONFIG_PINCTRL_BCM63XX=y
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_PM_GENERIC_DOMAINS=y
|
||||
CONFIG_PM_GENERIC_DOMAINS_OF=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_POSIX_MQUEUE_SYSCTL=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_PROC_VMCORE=y
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_QUEUED_RWLOCKS=y
|
||||
CONFIG_QUEUED_SPINLOCKS=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_RESET_BCM6345=y
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RPS=y
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
CONFIG_SERIAL_BCM63XX=y
|
||||
CONFIG_SERIAL_BCM63XX_CONSOLE=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_UP=y
|
||||
CONFIG_SOCK_RX_QUEUE_MAPPING=y
|
||||
CONFIG_SOC_BCM63XX=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_BCM63XX=y
|
||||
CONFIG_SPI_BCM63XX_HSSPI=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_SWAP_IO_SPACE=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SYNC_R4K=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS32_3300=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS4350=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS4380=y
|
||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
|
||||
CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y
|
||||
CONFIG_SYS_SUPPORTS_SMP=y
|
||||
CONFIG_TARGET_ISA_REV=0
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_USB_EHCI_BIG_ENDIAN_DESC=y
|
||||
CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
|
||||
CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
|
||||
CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_WATCHDOG_NOWAYOUT=y
|
||||
CONFIG_WEAK_ORDERING=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XXHASH=y
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_ZSTD_COMPRESS=y
|
||||
CONFIG_ZSTD_DECOMPRESS=y
|
||||
@ -11,6 +11,7 @@ arcadyan,ar7516)
|
||||
;;
|
||||
comtrend,ar-5381u |\
|
||||
comtrend,ar-5387un |\
|
||||
innacomm,w3400v6 |\
|
||||
nucom,r5010unv2)
|
||||
ucidef_set_bridge_device switch
|
||||
ucidef_set_interface_lan "lan1 lan2 lan3 lan4"
|
||||
|
||||
@ -1,283 +0,0 @@
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=15
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_B53=y
|
||||
CONFIG_B53_MDIO_DRIVER=y
|
||||
CONFIG_B53_MMAP_DRIVER=y
|
||||
CONFIG_B53_SPI_DRIVER=y
|
||||
CONFIG_BCM6345_EXT_IRQ=y
|
||||
CONFIG_BCM6345_L1_IRQ=y
|
||||
# CONFIG_BCM6348_ENET is not set
|
||||
CONFIG_BCM6368_ENETSW=y
|
||||
CONFIG_BCM63XX_POWER=y
|
||||
CONFIG_BCM7038_WDT=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_BMIPS_GENERIC=y
|
||||
CONFIG_CEVT_R4K=y
|
||||
# CONFIG_CLK_BCM63268_TIMER is not set
|
||||
CONFIG_CLK_BCM_63XX_GATE=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CPU_BIG_ENDIAN=y
|
||||
CONFIG_CPU_BMIPS=y
|
||||
CONFIG_CPU_BMIPS32_3300=y
|
||||
CONFIG_CPU_BMIPS4350=y
|
||||
CONFIG_CPU_BMIPS4380=y
|
||||
CONFIG_CPU_GENERIC_DUMP_TLB=y
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_CPU_HAS_RIXI=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
|
||||
CONFIG_CPU_NO_EFFICIENT_FFS=y
|
||||
CONFIG_CPU_R4K_CACHE_TLB=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_CPUFREQ=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
CONFIG_CRASH_DUMP=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_HASH_INFO=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_CSRC_R4K=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
CONFIG_DTC=y
|
||||
# CONFIG_DT_BCM93384WVG is not set
|
||||
# CONFIG_DT_BCM93384WVG_VIPER is not set
|
||||
# CONFIG_DT_BCM96368MVWG is not set
|
||||
# CONFIG_DT_BCM97125CBMB is not set
|
||||
# CONFIG_DT_BCM97346DBSMB is not set
|
||||
# CONFIG_DT_BCM97358SVMB is not set
|
||||
# CONFIG_DT_BCM97360SVMB is not set
|
||||
# CONFIG_DT_BCM97362SVMB is not set
|
||||
# CONFIG_DT_BCM97420C is not set
|
||||
# CONFIG_DT_BCM97425SVMB is not set
|
||||
# CONFIG_DT_BCM97435SVMB is not set
|
||||
# CONFIG_DT_BCM9EJTAGPRB is not set
|
||||
# CONFIG_DT_COMTREND_VR3032U is not set
|
||||
# CONFIG_DT_NETGEAR_CVG834G is not set
|
||||
CONFIG_DT_NONE=y
|
||||
# CONFIG_DT_SFR_NEUFBOX4_SERCOMM is not set
|
||||
# CONFIG_DT_SFR_NEUFBOX6_SERCOMM is not set
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_FIND_FIRST_BIT=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IOMAP=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_LIB_ASHLDI3=y
|
||||
CONFIG_GENERIC_LIB_ASHRDI3=y
|
||||
CONFIG_GENERIC_LIB_CMPDI2=y
|
||||
CONFIG_GENERIC_LIB_LSHRDI3=y
|
||||
CONFIG_GENERIC_LIB_UCMPDI2=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
# CONFIG_GPIO_BRCMSTB is not set
|
||||
CONFIG_GPIO_CDEV=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
CONFIG_GPIO_GENERIC_PLATFORM=y
|
||||
CONFIG_GPIO_REGMAP=y
|
||||
CONFIG_GRO_CELLS=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_MIPS_CPU=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
# CONFIG_LEDS_SERCOMM_MSP430 is not set
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_BUS_MUX=y
|
||||
CONFIG_MDIO_BUS_MUX_BCM6368=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MIPS=y
|
||||
CONFIG_MIPS_ASID_BITS=8
|
||||
CONFIG_MIPS_ASID_SHIFT=0
|
||||
CONFIG_MIPS_CLOCK_VSYSCALL=y
|
||||
# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
|
||||
CONFIG_MIPS_CMDLINE_FROM_DTB=y
|
||||
CONFIG_MIPS_EBPF_JIT=y
|
||||
CONFIG_MIPS_EXTERNAL_TIMER=y
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=6
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT_4=y
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT_6=y
|
||||
CONFIG_MIPS_LD_CAN_LINK_VDSO=y
|
||||
# CONFIG_MIPS_NO_APPENDED_DTB is not set
|
||||
CONFIG_MIPS_NR_CPU_NR_MAP=2
|
||||
CONFIG_MIPS_O32_FP64_SUPPORT=y
|
||||
CONFIG_MIPS_RAW_APPENDED_DTB=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MODULE_FORCE_LOAD=y
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
# CONFIG_MTD_BCM63XX_PARTS is not set
|
||||
CONFIG_MTD_CFI_ADV_OPTIONS=y
|
||||
CONFIG_MTD_CFI_BE_BYTE_SWAP=y
|
||||
# CONFIG_MTD_CFI_GEOMETRY is not set
|
||||
# CONFIG_MTD_CFI_NOSWAP is not set
|
||||
CONFIG_MTD_CFI_STAA=y
|
||||
CONFIG_MTD_JEDECPROBE=y
|
||||
CONFIG_MTD_NAND_BRCMNAND=y
|
||||
CONFIG_MTD_NAND_CORE=y
|
||||
CONFIG_MTD_NAND_ECC=y
|
||||
CONFIG_MTD_NAND_ECC_SW_HAMMING=y
|
||||
# CONFIG_MTD_PARSER_IMAGETAG is not set
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPLIT_BCM63XX_FW=y
|
||||
CONFIG_MTD_SPLIT_BCM_WFI_FW=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BEB_LIMIT=20
|
||||
CONFIG_MTD_UBI_BLOCK=y
|
||||
CONFIG_MTD_UBI_WL_THRESHOLD=4096
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NET_DEVLINK=y
|
||||
CONFIG_NET_DSA=y
|
||||
CONFIG_NET_DSA_TAG_BRCM=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_COMMON=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_LEGACY=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_PREPEND=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
CONFIG_NO_EXCEPT_FILL=y
|
||||
CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
|
||||
CONFIG_NR_CPUS=2
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIEPORTBUS=y
|
||||
# CONFIG_PCIE_BCM6318 is not set
|
||||
CONFIG_PCIE_BCM6328=y
|
||||
CONFIG_PCIE_PME=y
|
||||
CONFIG_PCI_BCM6348=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DRIVERS_LEGACY=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLINK=y
|
||||
CONFIG_PHYSICAL_START=0x80010000
|
||||
CONFIG_PHY_BCM63XX_USBH=y
|
||||
# CONFIG_PHY_BRCM_SATA is not set
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_BCM6318 is not set
|
||||
# CONFIG_PINCTRL_BCM63268 is not set
|
||||
CONFIG_PINCTRL_BCM6328=y
|
||||
# CONFIG_PINCTRL_BCM6358 is not set
|
||||
# CONFIG_PINCTRL_BCM6362 is not set
|
||||
# CONFIG_PINCTRL_BCM6368 is not set
|
||||
CONFIG_PINCTRL_BCM63XX=y
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_PM_GENERIC_DOMAINS=y
|
||||
CONFIG_PM_GENERIC_DOMAINS_OF=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_POSIX_MQUEUE_SYSCTL=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_PROC_VMCORE=y
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_QUEUED_RWLOCKS=y
|
||||
CONFIG_QUEUED_SPINLOCKS=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_RESET_BCM6345=y
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RPS=y
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
CONFIG_SERIAL_BCM63XX=y
|
||||
CONFIG_SERIAL_BCM63XX_CONSOLE=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_UP=y
|
||||
CONFIG_SOCK_RX_QUEUE_MAPPING=y
|
||||
CONFIG_SOC_BCM63XX=y
|
||||
CONFIG_SPI=y
|
||||
# CONFIG_SPI_BCM63XX is not set
|
||||
CONFIG_SPI_BCM63XX_HSSPI=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_SWAP_IO_SPACE=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SYNC_R4K=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS32_3300=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS4350=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS4380=y
|
||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
|
||||
CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y
|
||||
CONFIG_SYS_SUPPORTS_SMP=y
|
||||
CONFIG_TARGET_ISA_REV=0
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_USB_EHCI_BIG_ENDIAN_DESC=y
|
||||
CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
|
||||
CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
|
||||
CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_WATCHDOG_NOWAYOUT=y
|
||||
CONFIG_WEAK_ORDERING=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XXHASH=y
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_ZSTD_COMPRESS=y
|
||||
CONFIG_ZSTD_DECOMPRESS=y
|
||||
@ -1,265 +0,0 @@
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=15
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_B53=y
|
||||
CONFIG_B53_MDIO_DRIVER=y
|
||||
CONFIG_B53_SPI_DRIVER=y
|
||||
CONFIG_BCM6345_EXT_IRQ=y
|
||||
CONFIG_BCM6345_L1_IRQ=y
|
||||
CONFIG_BCM6348_ENET=y
|
||||
# CONFIG_BCM6368_ENETSW is not set
|
||||
CONFIG_BCM7038_WDT=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_BMIPS_GENERIC=y
|
||||
CONFIG_CEVT_R4K=y
|
||||
# CONFIG_CLK_BCM63268_TIMER is not set
|
||||
CONFIG_CLK_BCM_63XX_GATE=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CPU_BIG_ENDIAN=y
|
||||
CONFIG_CPU_BMIPS=y
|
||||
CONFIG_CPU_BMIPS32_3300=y
|
||||
CONFIG_CPU_BMIPS4350=y
|
||||
CONFIG_CPU_BMIPS4380=y
|
||||
CONFIG_CPU_GENERIC_DUMP_TLB=y
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_CPU_HAS_RIXI=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
|
||||
CONFIG_CPU_NO_EFFICIENT_FFS=y
|
||||
CONFIG_CPU_R4K_CACHE_TLB=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_CPUFREQ=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
CONFIG_CRASH_DUMP=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_CSRC_R4K=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
CONFIG_DTC=y
|
||||
# CONFIG_DT_BCM93384WVG is not set
|
||||
# CONFIG_DT_BCM93384WVG_VIPER is not set
|
||||
# CONFIG_DT_BCM96368MVWG is not set
|
||||
# CONFIG_DT_BCM97125CBMB is not set
|
||||
# CONFIG_DT_BCM97346DBSMB is not set
|
||||
# CONFIG_DT_BCM97358SVMB is not set
|
||||
# CONFIG_DT_BCM97360SVMB is not set
|
||||
# CONFIG_DT_BCM97362SVMB is not set
|
||||
# CONFIG_DT_BCM97420C is not set
|
||||
# CONFIG_DT_BCM97425SVMB is not set
|
||||
# CONFIG_DT_BCM97435SVMB is not set
|
||||
# CONFIG_DT_BCM9EJTAGPRB is not set
|
||||
# CONFIG_DT_COMTREND_VR3032U is not set
|
||||
# CONFIG_DT_NETGEAR_CVG834G is not set
|
||||
CONFIG_DT_NONE=y
|
||||
# CONFIG_DT_SFR_NEUFBOX4_SERCOMM is not set
|
||||
# CONFIG_DT_SFR_NEUFBOX6_SERCOMM is not set
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_FIND_FIRST_BIT=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IOMAP=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_LIB_ASHLDI3=y
|
||||
CONFIG_GENERIC_LIB_ASHRDI3=y
|
||||
CONFIG_GENERIC_LIB_CMPDI2=y
|
||||
CONFIG_GENERIC_LIB_LSHRDI3=y
|
||||
CONFIG_GENERIC_LIB_UCMPDI2=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
# CONFIG_GPIO_BRCMSTB is not set
|
||||
CONFIG_GPIO_CDEV=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
CONFIG_GPIO_GENERIC_PLATFORM=y
|
||||
CONFIG_GPIO_REGMAP=y
|
||||
CONFIG_GRO_CELLS=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_MIPS_CPU=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
# CONFIG_LEDS_SERCOMM_MSP430 is not set
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
# CONFIG_MDIO_BUS_MUX_BCM6368 is not set
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MIPS=y
|
||||
CONFIG_MIPS_ASID_BITS=8
|
||||
CONFIG_MIPS_ASID_SHIFT=0
|
||||
CONFIG_MIPS_CLOCK_VSYSCALL=y
|
||||
# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
|
||||
CONFIG_MIPS_CMDLINE_FROM_DTB=y
|
||||
CONFIG_MIPS_EBPF_JIT=y
|
||||
CONFIG_MIPS_EXTERNAL_TIMER=y
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=6
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT_4=y
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT_6=y
|
||||
CONFIG_MIPS_LD_CAN_LINK_VDSO=y
|
||||
# CONFIG_MIPS_NO_APPENDED_DTB is not set
|
||||
CONFIG_MIPS_NR_CPU_NR_MAP=2
|
||||
CONFIG_MIPS_O32_FP64_SUPPORT=y
|
||||
CONFIG_MIPS_RAW_APPENDED_DTB=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MODULE_FORCE_LOAD=y
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
# CONFIG_MTD_BCM63XX_PARTS is not set
|
||||
CONFIG_MTD_CFI_ADV_OPTIONS=y
|
||||
CONFIG_MTD_CFI_BE_BYTE_SWAP=y
|
||||
# CONFIG_MTD_CFI_GEOMETRY is not set
|
||||
# CONFIG_MTD_CFI_NOSWAP is not set
|
||||
CONFIG_MTD_CFI_STAA=y
|
||||
CONFIG_MTD_JEDECPROBE=y
|
||||
# CONFIG_MTD_PARSER_IMAGETAG is not set
|
||||
CONFIG_MTD_PHYSMAP=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPLIT_BCM63XX_FW=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NET_DEVLINK=y
|
||||
CONFIG_NET_DSA=y
|
||||
CONFIG_NET_DSA_TAG_BRCM=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_COMMON=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_LEGACY=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_PREPEND=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
CONFIG_NO_EXCEPT_FILL=y
|
||||
CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
|
||||
CONFIG_NR_CPUS=2
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PCI=y
|
||||
# CONFIG_PCIE_BCM6318 is not set
|
||||
# CONFIG_PCIE_BCM6328 is not set
|
||||
CONFIG_PCI_BCM6348=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DRIVERS_LEGACY=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLINK=y
|
||||
CONFIG_PHYSICAL_START=0x80010000
|
||||
CONFIG_PHY_BCM63XX_USBH=y
|
||||
# CONFIG_PHY_BRCM_SATA is not set
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_BCM6318 is not set
|
||||
# CONFIG_PINCTRL_BCM63268 is not set
|
||||
# CONFIG_PINCTRL_BCM6328 is not set
|
||||
CONFIG_PINCTRL_BCM6358=y
|
||||
# CONFIG_PINCTRL_BCM6362 is not set
|
||||
# CONFIG_PINCTRL_BCM6368 is not set
|
||||
CONFIG_PINCTRL_BCM63XX=y
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_POSIX_MQUEUE_SYSCTL=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_PROC_VMCORE=y
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_QUEUED_RWLOCKS=y
|
||||
CONFIG_QUEUED_SPINLOCKS=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_RESET_BCM6345=y
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RPS=y
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
CONFIG_SERIAL_BCM63XX=y
|
||||
CONFIG_SERIAL_BCM63XX_CONSOLE=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_UP=y
|
||||
CONFIG_SOCK_RX_QUEUE_MAPPING=y
|
||||
# CONFIG_SOC_BCM63XX is not set
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_BCM63XX=y
|
||||
# CONFIG_SPI_BCM63XX_HSSPI is not set
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_SWAP_IO_SPACE=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SYNC_R4K=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS32_3300=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS4350=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS4380=y
|
||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
|
||||
CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y
|
||||
CONFIG_SYS_SUPPORTS_SMP=y
|
||||
CONFIG_TARGET_ISA_REV=0
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_USB_EHCI_BIG_ENDIAN_DESC=y
|
||||
CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
|
||||
CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
|
||||
CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_WATCHDOG_NOWAYOUT=y
|
||||
CONFIG_WEAK_ORDERING=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XXHASH=y
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_ZSTD_COMPRESS=y
|
||||
CONFIG_ZSTD_DECOMPRESS=y
|
||||
@ -1,285 +0,0 @@
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=15
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_B53=y
|
||||
CONFIG_B53_MDIO_DRIVER=y
|
||||
CONFIG_B53_MMAP_DRIVER=y
|
||||
CONFIG_B53_SPI_DRIVER=y
|
||||
CONFIG_BCM6345_EXT_IRQ=y
|
||||
CONFIG_BCM6345_L1_IRQ=y
|
||||
# CONFIG_BCM6348_ENET is not set
|
||||
CONFIG_BCM6368_ENETSW=y
|
||||
CONFIG_BCM63XX_POWER=y
|
||||
CONFIG_BCM7038_WDT=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_BMIPS_GENERIC=y
|
||||
CONFIG_CEVT_R4K=y
|
||||
# CONFIG_CLK_BCM63268_TIMER is not set
|
||||
CONFIG_CLK_BCM_63XX_GATE=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CPU_BIG_ENDIAN=y
|
||||
CONFIG_CPU_BMIPS=y
|
||||
CONFIG_CPU_BMIPS32_3300=y
|
||||
CONFIG_CPU_BMIPS4350=y
|
||||
CONFIG_CPU_BMIPS4380=y
|
||||
CONFIG_CPU_GENERIC_DUMP_TLB=y
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_CPU_HAS_RIXI=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
|
||||
CONFIG_CPU_NO_EFFICIENT_FFS=y
|
||||
CONFIG_CPU_R4K_CACHE_TLB=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_CPUFREQ=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
CONFIG_CRASH_DUMP=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_HASH_INFO=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_CSRC_R4K=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
CONFIG_DTC=y
|
||||
# CONFIG_DT_BCM93384WVG is not set
|
||||
# CONFIG_DT_BCM93384WVG_VIPER is not set
|
||||
# CONFIG_DT_BCM96368MVWG is not set
|
||||
# CONFIG_DT_BCM97125CBMB is not set
|
||||
# CONFIG_DT_BCM97346DBSMB is not set
|
||||
# CONFIG_DT_BCM97358SVMB is not set
|
||||
# CONFIG_DT_BCM97360SVMB is not set
|
||||
# CONFIG_DT_BCM97362SVMB is not set
|
||||
# CONFIG_DT_BCM97420C is not set
|
||||
# CONFIG_DT_BCM97425SVMB is not set
|
||||
# CONFIG_DT_BCM97435SVMB is not set
|
||||
# CONFIG_DT_BCM9EJTAGPRB is not set
|
||||
# CONFIG_DT_COMTREND_VR3032U is not set
|
||||
# CONFIG_DT_NETGEAR_CVG834G is not set
|
||||
CONFIG_DT_NONE=y
|
||||
# CONFIG_DT_SFR_NEUFBOX4_SERCOMM is not set
|
||||
# CONFIG_DT_SFR_NEUFBOX6_SERCOMM is not set
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_FIND_FIRST_BIT=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IOMAP=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_LIB_ASHLDI3=y
|
||||
CONFIG_GENERIC_LIB_ASHRDI3=y
|
||||
CONFIG_GENERIC_LIB_CMPDI2=y
|
||||
CONFIG_GENERIC_LIB_LSHRDI3=y
|
||||
CONFIG_GENERIC_LIB_UCMPDI2=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
# CONFIG_GPIO_BRCMSTB is not set
|
||||
CONFIG_GPIO_CDEV=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
CONFIG_GPIO_GENERIC_PLATFORM=y
|
||||
CONFIG_GPIO_REGMAP=y
|
||||
CONFIG_GRO_CELLS=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_BCM2835=y
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_MIPS_CPU=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
# CONFIG_LEDS_SERCOMM_MSP430 is not set
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_BUS_MUX=y
|
||||
CONFIG_MDIO_BUS_MUX_BCM6368=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MIPS=y
|
||||
CONFIG_MIPS_ASID_BITS=8
|
||||
CONFIG_MIPS_ASID_SHIFT=0
|
||||
CONFIG_MIPS_CLOCK_VSYSCALL=y
|
||||
# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
|
||||
CONFIG_MIPS_CMDLINE_FROM_DTB=y
|
||||
CONFIG_MIPS_EBPF_JIT=y
|
||||
CONFIG_MIPS_EXTERNAL_TIMER=y
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=6
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT_4=y
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT_6=y
|
||||
CONFIG_MIPS_LD_CAN_LINK_VDSO=y
|
||||
# CONFIG_MIPS_NO_APPENDED_DTB is not set
|
||||
CONFIG_MIPS_NR_CPU_NR_MAP=2
|
||||
CONFIG_MIPS_O32_FP64_SUPPORT=y
|
||||
CONFIG_MIPS_RAW_APPENDED_DTB=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MODULE_FORCE_LOAD=y
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
# CONFIG_MTD_BCM63XX_PARTS is not set
|
||||
CONFIG_MTD_CFI_ADV_OPTIONS=y
|
||||
CONFIG_MTD_CFI_BE_BYTE_SWAP=y
|
||||
# CONFIG_MTD_CFI_GEOMETRY is not set
|
||||
# CONFIG_MTD_CFI_NOSWAP is not set
|
||||
CONFIG_MTD_CFI_STAA=y
|
||||
CONFIG_MTD_JEDECPROBE=y
|
||||
CONFIG_MTD_NAND_BRCMNAND=y
|
||||
CONFIG_MTD_NAND_CORE=y
|
||||
CONFIG_MTD_NAND_ECC=y
|
||||
CONFIG_MTD_NAND_ECC_SW_HAMMING=y
|
||||
# CONFIG_MTD_PARSER_IMAGETAG is not set
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPLIT_BCM63XX_FW=y
|
||||
CONFIG_MTD_SPLIT_BCM_WFI_FW=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BEB_LIMIT=20
|
||||
CONFIG_MTD_UBI_BLOCK=y
|
||||
CONFIG_MTD_UBI_WL_THRESHOLD=4096
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NET_DEVLINK=y
|
||||
CONFIG_NET_DSA=y
|
||||
CONFIG_NET_DSA_TAG_BRCM=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_COMMON=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_LEGACY=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_PREPEND=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
CONFIG_NO_EXCEPT_FILL=y
|
||||
CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
|
||||
CONFIG_NR_CPUS=2
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIEPORTBUS=y
|
||||
# CONFIG_PCIE_BCM6318 is not set
|
||||
CONFIG_PCIE_BCM6328=y
|
||||
CONFIG_PCIE_PME=y
|
||||
# CONFIG_PCI_BCM6348 is not set
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DRIVERS_LEGACY=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLINK=y
|
||||
CONFIG_PHYSICAL_START=0x80010000
|
||||
CONFIG_PHY_BCM63XX_USBH=y
|
||||
# CONFIG_PHY_BRCM_SATA is not set
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_BCM6318 is not set
|
||||
# CONFIG_PINCTRL_BCM63268 is not set
|
||||
# CONFIG_PINCTRL_BCM6328 is not set
|
||||
# CONFIG_PINCTRL_BCM6358 is not set
|
||||
CONFIG_PINCTRL_BCM6362=y
|
||||
# CONFIG_PINCTRL_BCM6368 is not set
|
||||
CONFIG_PINCTRL_BCM63XX=y
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_PM_GENERIC_DOMAINS=y
|
||||
CONFIG_PM_GENERIC_DOMAINS_OF=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_POSIX_MQUEUE_SYSCTL=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_PROC_VMCORE=y
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_QUEUED_RWLOCKS=y
|
||||
CONFIG_QUEUED_SPINLOCKS=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_RESET_BCM6345=y
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RPS=y
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
CONFIG_SERIAL_BCM63XX=y
|
||||
CONFIG_SERIAL_BCM63XX_CONSOLE=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_UP=y
|
||||
CONFIG_SOCK_RX_QUEUE_MAPPING=y
|
||||
CONFIG_SOC_BCM63XX=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_BCM63XX=y
|
||||
CONFIG_SPI_BCM63XX_HSSPI=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_SWAP_IO_SPACE=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SYNC_R4K=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS32_3300=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS4350=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS4380=y
|
||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
|
||||
CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y
|
||||
CONFIG_SYS_SUPPORTS_SMP=y
|
||||
CONFIG_TARGET_ISA_REV=0
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_USB_EHCI_BIG_ENDIAN_DESC=y
|
||||
CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
|
||||
CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
|
||||
CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_WATCHDOG_NOWAYOUT=y
|
||||
CONFIG_WEAK_ORDERING=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XXHASH=y
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_ZSTD_COMPRESS=y
|
||||
CONFIG_ZSTD_DECOMPRESS=y
|
||||
@ -1,281 +0,0 @@
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=15
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_B53=y
|
||||
CONFIG_B53_MDIO_DRIVER=y
|
||||
CONFIG_B53_MMAP_DRIVER=y
|
||||
CONFIG_B53_SPI_DRIVER=y
|
||||
CONFIG_BCM6345_EXT_IRQ=y
|
||||
CONFIG_BCM6345_L1_IRQ=y
|
||||
# CONFIG_BCM6348_ENET is not set
|
||||
CONFIG_BCM6368_ENETSW=y
|
||||
CONFIG_BCM7038_WDT=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_BMIPS_GENERIC=y
|
||||
CONFIG_CEVT_R4K=y
|
||||
# CONFIG_CLK_BCM63268_TIMER is not set
|
||||
CONFIG_CLK_BCM_63XX_GATE=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CPU_BIG_ENDIAN=y
|
||||
CONFIG_CPU_BMIPS=y
|
||||
CONFIG_CPU_BMIPS32_3300=y
|
||||
CONFIG_CPU_BMIPS4350=y
|
||||
CONFIG_CPU_BMIPS4380=y
|
||||
CONFIG_CPU_GENERIC_DUMP_TLB=y
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_CPU_HAS_RIXI=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
|
||||
CONFIG_CPU_NO_EFFICIENT_FFS=y
|
||||
CONFIG_CPU_R4K_CACHE_TLB=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_CPUFREQ=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
CONFIG_CRASH_DUMP=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_HASH_INFO=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_CSRC_R4K=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
CONFIG_DTC=y
|
||||
# CONFIG_DT_BCM93384WVG is not set
|
||||
# CONFIG_DT_BCM93384WVG_VIPER is not set
|
||||
# CONFIG_DT_BCM96368MVWG is not set
|
||||
# CONFIG_DT_BCM97125CBMB is not set
|
||||
# CONFIG_DT_BCM97346DBSMB is not set
|
||||
# CONFIG_DT_BCM97358SVMB is not set
|
||||
# CONFIG_DT_BCM97360SVMB is not set
|
||||
# CONFIG_DT_BCM97362SVMB is not set
|
||||
# CONFIG_DT_BCM97420C is not set
|
||||
# CONFIG_DT_BCM97425SVMB is not set
|
||||
# CONFIG_DT_BCM97435SVMB is not set
|
||||
# CONFIG_DT_BCM9EJTAGPRB is not set
|
||||
# CONFIG_DT_COMTREND_VR3032U is not set
|
||||
# CONFIG_DT_NETGEAR_CVG834G is not set
|
||||
CONFIG_DT_NONE=y
|
||||
# CONFIG_DT_SFR_NEUFBOX4_SERCOMM is not set
|
||||
# CONFIG_DT_SFR_NEUFBOX6_SERCOMM is not set
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_FIND_FIRST_BIT=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IOMAP=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_LIB_ASHLDI3=y
|
||||
CONFIG_GENERIC_LIB_ASHRDI3=y
|
||||
CONFIG_GENERIC_LIB_CMPDI2=y
|
||||
CONFIG_GENERIC_LIB_LSHRDI3=y
|
||||
CONFIG_GENERIC_LIB_UCMPDI2=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
# CONFIG_GPIO_BRCMSTB is not set
|
||||
CONFIG_GPIO_CDEV=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
CONFIG_GPIO_GENERIC_PLATFORM=y
|
||||
CONFIG_GPIO_REGMAP=y
|
||||
CONFIG_GRO_CELLS=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_BCM2835=y
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_MIPS_CPU=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
# CONFIG_LEDS_SERCOMM_MSP430 is not set
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_BUS_MUX=y
|
||||
CONFIG_MDIO_BUS_MUX_BCM6368=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MIPS=y
|
||||
CONFIG_MIPS_ASID_BITS=8
|
||||
CONFIG_MIPS_ASID_SHIFT=0
|
||||
CONFIG_MIPS_CLOCK_VSYSCALL=y
|
||||
# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
|
||||
CONFIG_MIPS_CMDLINE_FROM_DTB=y
|
||||
CONFIG_MIPS_EBPF_JIT=y
|
||||
CONFIG_MIPS_EXTERNAL_TIMER=y
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=6
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT_4=y
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT_6=y
|
||||
CONFIG_MIPS_LD_CAN_LINK_VDSO=y
|
||||
# CONFIG_MIPS_NO_APPENDED_DTB is not set
|
||||
CONFIG_MIPS_NR_CPU_NR_MAP=2
|
||||
CONFIG_MIPS_O32_FP64_SUPPORT=y
|
||||
CONFIG_MIPS_RAW_APPENDED_DTB=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MODULE_FORCE_LOAD=y
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
# CONFIG_MTD_BCM63XX_PARTS is not set
|
||||
CONFIG_MTD_CFI_ADV_OPTIONS=y
|
||||
CONFIG_MTD_CFI_BE_BYTE_SWAP=y
|
||||
# CONFIG_MTD_CFI_GEOMETRY is not set
|
||||
# CONFIG_MTD_CFI_NOSWAP is not set
|
||||
CONFIG_MTD_CFI_STAA=y
|
||||
CONFIG_MTD_JEDECPROBE=y
|
||||
CONFIG_MTD_NAND_BRCMNAND=y
|
||||
CONFIG_MTD_NAND_CORE=y
|
||||
CONFIG_MTD_NAND_ECC=y
|
||||
CONFIG_MTD_NAND_ECC_SW_HAMMING=y
|
||||
# CONFIG_MTD_PARSER_IMAGETAG is not set
|
||||
CONFIG_MTD_PHYSMAP=y
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPLIT_BCM63XX_FW=y
|
||||
CONFIG_MTD_SPLIT_BCM_WFI_FW=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BEB_LIMIT=20
|
||||
CONFIG_MTD_UBI_BLOCK=y
|
||||
CONFIG_MTD_UBI_WL_THRESHOLD=4096
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NET_DEVLINK=y
|
||||
CONFIG_NET_DSA=y
|
||||
CONFIG_NET_DSA_TAG_BRCM=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_COMMON=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_LEGACY=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_PREPEND=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
CONFIG_NO_EXCEPT_FILL=y
|
||||
CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
|
||||
CONFIG_NR_CPUS=2
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PCI=y
|
||||
# CONFIG_PCIE_BCM6318 is not set
|
||||
# CONFIG_PCIE_BCM6328 is not set
|
||||
CONFIG_PCI_BCM6348=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DRIVERS_LEGACY=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLINK=y
|
||||
CONFIG_PHYSICAL_START=0x80010000
|
||||
CONFIG_PHY_BCM63XX_USBH=y
|
||||
# CONFIG_PHY_BRCM_SATA is not set
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_BCM6318 is not set
|
||||
# CONFIG_PINCTRL_BCM63268 is not set
|
||||
# CONFIG_PINCTRL_BCM6328 is not set
|
||||
# CONFIG_PINCTRL_BCM6358 is not set
|
||||
# CONFIG_PINCTRL_BCM6362 is not set
|
||||
CONFIG_PINCTRL_BCM6368=y
|
||||
CONFIG_PINCTRL_BCM63XX=y
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_POSIX_MQUEUE_SYSCTL=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_PROC_VMCORE=y
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_QUEUED_RWLOCKS=y
|
||||
CONFIG_QUEUED_SPINLOCKS=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_RESET_BCM6345=y
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RPS=y
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
CONFIG_SERIAL_BCM63XX=y
|
||||
CONFIG_SERIAL_BCM63XX_CONSOLE=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_UP=y
|
||||
CONFIG_SOCK_RX_QUEUE_MAPPING=y
|
||||
# CONFIG_SOC_BCM63XX is not set
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_BCM63XX=y
|
||||
# CONFIG_SPI_BCM63XX_HSSPI is not set
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_SWAP_IO_SPACE=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SYNC_R4K=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS32_3300=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS4350=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS4380=y
|
||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
|
||||
CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y
|
||||
CONFIG_SYS_SUPPORTS_SMP=y
|
||||
CONFIG_TARGET_ISA_REV=0
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_USB_EHCI_BIG_ENDIAN_DESC=y
|
||||
CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
|
||||
CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
|
||||
CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_WATCHDOG_NOWAYOUT=y
|
||||
CONFIG_WEAK_ORDERING=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XXHASH=y
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_ZSTD_COMPRESS=y
|
||||
CONFIG_ZSTD_DECOMPRESS=y
|
||||
@ -85,7 +85,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cfe: partition@0 {
|
||||
partition@0 {
|
||||
reg = <0x000000 0x010000>;
|
||||
label = "cfe";
|
||||
read-only;
|
||||
|
||||
@ -69,7 +69,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cfe: partition@0 {
|
||||
partition@0 {
|
||||
label = "cfe";
|
||||
reg = <0x000000 0x010000>;
|
||||
read-only;
|
||||
|
||||
@ -73,7 +73,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cfe: partition@0 {
|
||||
partition@0 {
|
||||
reg = <0x000000 0x010000>;
|
||||
label = "cfe";
|
||||
read-only;
|
||||
|
||||
@ -91,7 +91,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cfe: partition@0 {
|
||||
partition@0 {
|
||||
reg = <0x000000 0x010000>;
|
||||
label = "cfe";
|
||||
read-only;
|
||||
|
||||
200
target/linux/bmips/dts/bcm6328-innacomm-w3400v6.dts
Normal file
200
target/linux/bmips/dts/bcm6328-innacomm-w3400v6.dts
Normal file
@ -0,0 +1,200 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "bcm6328.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Innacomm W3400V6";
|
||||
compatible = "innacomm,w3400v6", "brcm,bcm6328";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_power_green;
|
||||
led-failsafe = &led_power_red;
|
||||
led-running = &led_power_green;
|
||||
led-upgrade = &led_power_green;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys-polled";
|
||||
poll-interval = <100>;
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
|
||||
bcm4318-sprom {
|
||||
compatible = "brcm,bcma-sprom";
|
||||
|
||||
pci-bus = <1>;
|
||||
pci-dev = <0>;
|
||||
|
||||
nvmem-cells = <&macaddr_cfe_6a0 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
brcm,sprom = "brcm/bcm4318-sprom.bin";
|
||||
};
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&macaddr_cfe_6a0 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&hsspi {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
spi-max-frequency = <16666667>;
|
||||
spi-tx-bus-width = <2>;
|
||||
spi-rx-bus-width = <2>;
|
||||
reg = <0>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
reg = <0x000000 0x010000>;
|
||||
label = "cfe";
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_cfe_6a0: macaddr@6a0 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x6a0 0x6>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@10000 {
|
||||
compatible = "brcm,bcm963xx-imagetag";
|
||||
reg = <0x010000 0x7e0000>;
|
||||
label = "firmware";
|
||||
};
|
||||
|
||||
partition@7f0000 {
|
||||
reg = <0x7f0000 0x010000>;
|
||||
label = "nvram";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&leds {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_leds>;
|
||||
|
||||
led@1 {
|
||||
reg = <1>;
|
||||
active-low;
|
||||
label = "green:internet";
|
||||
};
|
||||
|
||||
led@2 {
|
||||
reg = <2>;
|
||||
active-low;
|
||||
label = "red:internet";
|
||||
};
|
||||
|
||||
led@3 {
|
||||
reg = <3>;
|
||||
active-low;
|
||||
label = "green:dsl";
|
||||
};
|
||||
|
||||
led_power_green: led@4 {
|
||||
reg = <4>;
|
||||
active-low;
|
||||
label = "green:power";
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
led_power_red: led@5 {
|
||||
reg = <5>;
|
||||
active-low;
|
||||
label = "red:power";
|
||||
panic-indicator;
|
||||
};
|
||||
|
||||
led@11 {
|
||||
reg = <11>;
|
||||
active-low;
|
||||
label = "green:wps";
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
pinctrl_leds: leds {
|
||||
function = "led";
|
||||
pins = "gpio1", "gpio2", "gpio3",
|
||||
"gpio4", "gpio5", "gpio11";
|
||||
};
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports {
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
label = "lan4";
|
||||
|
||||
phy-handle = <&phy1>;
|
||||
phy-mode = "mii";
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
label = "lan3";
|
||||
|
||||
phy-handle = <&phy2>;
|
||||
phy-mode = "mii";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
label = "lan2";
|
||||
|
||||
phy-handle = <&phy3>;
|
||||
phy-mode = "mii";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
reg = <3>;
|
||||
label = "lan1";
|
||||
|
||||
phy-handle = <&phy4>;
|
||||
phy-mode = "mii";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
@ -71,7 +71,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cfe: partition@0 {
|
||||
partition@0 {
|
||||
label = "cfe";
|
||||
reg = <0x000000 0x010000>;
|
||||
read-only;
|
||||
|
||||
@ -178,7 +178,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cfe: partition@0 {
|
||||
partition@0 {
|
||||
label = "cfe";
|
||||
reg = <0x000000 0x020000>;
|
||||
read-only;
|
||||
|
||||
@ -174,7 +174,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cfe: partition@0 {
|
||||
partition@0 {
|
||||
label = "CFE";
|
||||
reg = <0x000000 0x020000>;
|
||||
read-only;
|
||||
|
||||
@ -101,7 +101,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cfe: partition@0 {
|
||||
partition@0 {
|
||||
label = "CFE";
|
||||
reg = <0x0000000 0x0020000>;
|
||||
read-only;
|
||||
|
||||
@ -101,7 +101,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cfe: partition@0 {
|
||||
partition@0 {
|
||||
label = "CFE";
|
||||
reg = <0x000000 0x010000>;
|
||||
read-only;
|
||||
|
||||
@ -203,7 +203,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cfe: partition@0 {
|
||||
partition@0 {
|
||||
label = "CFE";
|
||||
reg = <0x0000000 0x0020000>;
|
||||
read-only;
|
||||
|
||||
@ -152,7 +152,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cfe: partition@0 {
|
||||
partition@0 {
|
||||
label = "CFE";
|
||||
reg = <0x0000000 0x0020000>;
|
||||
read-only;
|
||||
|
||||
@ -165,7 +165,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cfe: partition@0 {
|
||||
partition@0 {
|
||||
label = "CFE";
|
||||
reg = <0x000000 0x010000>;
|
||||
read-only;
|
||||
|
||||
@ -184,7 +184,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cfe: partition@0 {
|
||||
partition@0 {
|
||||
label = "CFE";
|
||||
reg = <0x000000 0x020000>;
|
||||
read-only;
|
||||
|
||||
@ -39,6 +39,18 @@ define Device/comtrend_ar-5387un
|
||||
endef
|
||||
TARGET_DEVICES += comtrend_ar-5387un
|
||||
|
||||
define Device/innacomm_w3400v6
|
||||
$(Device/bcm63xx-cfe)
|
||||
DEVICE_VENDOR := Innacomm
|
||||
DEVICE_MODEL := W3400V6
|
||||
CHIP_ID := 6328
|
||||
CFE_BOARD_ID := 96328ang
|
||||
FLASH_MB := 8
|
||||
DEVICE_PACKAGES += $(B43_PACKAGES) \
|
||||
broadcom-4318-sprom kmod-leds-bcm6328
|
||||
endef
|
||||
TARGET_DEVICES += innacomm_w3400v6
|
||||
|
||||
define Device/nucom_r5010unv2
|
||||
$(Device/bcm63xx-cfe)
|
||||
DEVICE_VENDOR := NuCom
|
||||
|
||||
@ -1,373 +0,0 @@
|
||||
From cf908990d4a8ccdb73ee4484aa8cadad379ca314 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jogo@openwrt.org>
|
||||
Date: Sun, 30 Nov 2014 14:54:27 +0100
|
||||
Subject: [PATCH] irqchip: add support for bcm6345-style external interrupt
|
||||
controller
|
||||
|
||||
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
---
|
||||
.../brcm,bcm6345-ext-intc.txt | 29 ++
|
||||
drivers/irqchip/Kconfig | 4 +
|
||||
drivers/irqchip/Makefile | 1 +
|
||||
drivers/irqchip/irq-bcm6345-ext.c | 280 ++++++++++++++++++
|
||||
include/linux/irqchip/irq-bcm6345-ext.h | 14 +
|
||||
5 files changed, 328 insertions(+)
|
||||
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/brcm,bcm6345-ext-intc.txt
|
||||
create mode 100644 drivers/irqchip/irq-bcm6345-ext.c
|
||||
create mode 100644 include/linux/irqchip/irq-bcm6345-ext.h
|
||||
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm6345-ext-intc.txt
|
||||
@@ -0,0 +1,29 @@
|
||||
+Broadcom BCM6345-style external interrupt controller
|
||||
+
|
||||
+Required properties:
|
||||
+
|
||||
+- compatible: Should be "brcm,bcm6345-ext-intc" or "brcm,bcm6318-ext-intc".
|
||||
+- reg: Specifies the base physical addresses and size of the registers.
|
||||
+- interrupt-controller: identifies the node as an interrupt controller.
|
||||
+- #interrupt-cells: Specifies the number of cells needed to encode an interrupt
|
||||
+ source, Should be 2.
|
||||
+- interrupt-parent: Specifies the phandle to the parent interrupt controller
|
||||
+ this one is cascaded from.
|
||||
+- interrupts: Specifies the interrupt line(s) in the interrupt-parent controller
|
||||
+ node, valid values depend on the type of parent interrupt controller.
|
||||
+
|
||||
+Optional properties:
|
||||
+
|
||||
+- brcm,field-width: Size of each field (mask, clear, sense, ...) in bits in the
|
||||
+ register. Defaults to 4.
|
||||
+
|
||||
+Example:
|
||||
+
|
||||
+ext_intc: interrupt-controller@10000018 {
|
||||
+ compatible = "brcm,bcm6345-ext-intc";
|
||||
+ interrupt-parent = <&periph_intc>;
|
||||
+ #interrupt-cells = <2>;
|
||||
+ reg = <0x10000018 0x4>;
|
||||
+ interrupt-controller;
|
||||
+ interrupts = <24>, <25>, <26>, <27>;
|
||||
+};
|
||||
--- a/drivers/irqchip/Kconfig
|
||||
+++ b/drivers/irqchip/Kconfig
|
||||
@@ -108,6 +108,10 @@ config I8259
|
||||
bool
|
||||
select IRQ_DOMAIN
|
||||
|
||||
+config BCM6345_EXT_IRQ
|
||||
+ bool "BCM6345 External IRQ Controller"
|
||||
+ select IRQ_DOMAIN
|
||||
+
|
||||
config BCM6345_L1_IRQ
|
||||
bool
|
||||
select GENERIC_IRQ_CHIP
|
||||
--- a/drivers/irqchip/Makefile
|
||||
+++ b/drivers/irqchip/Makefile
|
||||
@@ -62,6 +62,7 @@ obj-$(CONFIG_XTENSA_MX) += irq-xtensa-
|
||||
obj-$(CONFIG_XILINX_INTC) += irq-xilinx-intc.o
|
||||
obj-$(CONFIG_IRQ_CROSSBAR) += irq-crossbar.o
|
||||
obj-$(CONFIG_SOC_VF610) += irq-vf610-mscm-ir.o
|
||||
+obj-$(CONFIG_BCM6345_EXT_IRQ) += irq-bcm6345-ext.o
|
||||
obj-$(CONFIG_BCM6345_L1_IRQ) += irq-bcm6345-l1.o
|
||||
obj-$(CONFIG_BCM7038_L1_IRQ) += irq-bcm7038-l1.o
|
||||
obj-$(CONFIG_BCM7120_L2_IRQ) += irq-bcm7120-l2.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/irqchip/irq-bcm6345-ext.c
|
||||
@@ -0,0 +1,280 @@
|
||||
+/*
|
||||
+ * This file is subject to the terms and conditions of the GNU General Public
|
||||
+ * License. See the file "COPYING" in the main directory of this archive
|
||||
+ * for more details.
|
||||
+ *
|
||||
+ * Copyright (C) 2014 Jonas Gorski <jogo@openwrt.org>
|
||||
+ */
|
||||
+
|
||||
+#include <linux/ioport.h>
|
||||
+#include <linux/irq.h>
|
||||
+#include <linux/irqchip.h>
|
||||
+#include <linux/irqchip/chained_irq.h>
|
||||
+#include <linux/irqchip/irq-bcm6345-ext.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/of_irq.h>
|
||||
+#include <linux/of_address.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/spinlock.h>
|
||||
+
|
||||
+#define MAX_IRQS 4
|
||||
+
|
||||
+#define EXTIRQ_CFG_SENSE 0
|
||||
+#define EXTIRQ_CFG_STAT 1
|
||||
+#define EXTIRQ_CFG_CLEAR 2
|
||||
+#define EXTIRQ_CFG_MASK 3
|
||||
+#define EXTIRQ_CFG_BOTHEDGE 4
|
||||
+#define EXTIRQ_CFG_LEVELSENSE 5
|
||||
+
|
||||
+struct intc_data {
|
||||
+ struct irq_chip chip;
|
||||
+ struct irq_domain *domain;
|
||||
+ raw_spinlock_t lock;
|
||||
+
|
||||
+ int parent_irq[MAX_IRQS];
|
||||
+ void __iomem *reg;
|
||||
+ int shift;
|
||||
+ unsigned int toggle_clear_on_ack:1;
|
||||
+};
|
||||
+
|
||||
+static void bcm6345_ext_intc_irq_handle(struct irq_desc *desc)
|
||||
+{
|
||||
+ struct intc_data *data = irq_desc_get_handler_data(desc);
|
||||
+ struct irq_chip *chip = irq_desc_get_chip(desc);
|
||||
+ unsigned int irq = irq_desc_get_irq(desc);
|
||||
+ unsigned int idx;
|
||||
+
|
||||
+ chained_irq_enter(chip, desc);
|
||||
+
|
||||
+ for (idx = 0; idx < MAX_IRQS; idx++) {
|
||||
+ if (data->parent_irq[idx] != irq)
|
||||
+ continue;
|
||||
+
|
||||
+ generic_handle_irq(irq_find_mapping(data->domain, idx));
|
||||
+ }
|
||||
+
|
||||
+ chained_irq_exit(chip, desc);
|
||||
+}
|
||||
+
|
||||
+static void bcm6345_ext_intc_irq_ack(struct irq_data *data)
|
||||
+{
|
||||
+ struct intc_data *priv = data->domain->host_data;
|
||||
+ irq_hw_number_t hwirq = irqd_to_hwirq(data);
|
||||
+ u32 reg;
|
||||
+
|
||||
+ raw_spin_lock(&priv->lock);
|
||||
+ reg = __raw_readl(priv->reg);
|
||||
+ __raw_writel(reg | (1 << (hwirq + EXTIRQ_CFG_CLEAR * priv->shift)),
|
||||
+ priv->reg);
|
||||
+ if (priv->toggle_clear_on_ack)
|
||||
+ __raw_writel(reg, priv->reg);
|
||||
+ raw_spin_unlock(&priv->lock);
|
||||
+}
|
||||
+
|
||||
+static void bcm6345_ext_intc_irq_mask(struct irq_data *data)
|
||||
+{
|
||||
+ struct intc_data *priv = data->domain->host_data;
|
||||
+ irq_hw_number_t hwirq = irqd_to_hwirq(data);
|
||||
+ u32 reg;
|
||||
+
|
||||
+ raw_spin_lock(&priv->lock);
|
||||
+ reg = __raw_readl(priv->reg);
|
||||
+ reg &= ~(1 << (hwirq + EXTIRQ_CFG_MASK * priv->shift));
|
||||
+ __raw_writel(reg, priv->reg);
|
||||
+ raw_spin_unlock(&priv->lock);
|
||||
+}
|
||||
+
|
||||
+static void bcm6345_ext_intc_irq_unmask(struct irq_data *data)
|
||||
+{
|
||||
+ struct intc_data *priv = data->domain->host_data;
|
||||
+ irq_hw_number_t hwirq = irqd_to_hwirq(data);
|
||||
+ u32 reg;
|
||||
+
|
||||
+ raw_spin_lock(&priv->lock);
|
||||
+ reg = __raw_readl(priv->reg);
|
||||
+ reg |= 1 << (hwirq + EXTIRQ_CFG_MASK * priv->shift);
|
||||
+ __raw_writel(reg, priv->reg);
|
||||
+ raw_spin_unlock(&priv->lock);
|
||||
+}
|
||||
+
|
||||
+static int bcm6345_ext_intc_set_type(struct irq_data *data,
|
||||
+ unsigned int flow_type)
|
||||
+{
|
||||
+ struct intc_data *priv = data->domain->host_data;
|
||||
+ irq_hw_number_t hwirq = irqd_to_hwirq(data);
|
||||
+ bool levelsense = 0, sense = 0, bothedge = 0;
|
||||
+ u32 reg;
|
||||
+
|
||||
+ flow_type &= IRQ_TYPE_SENSE_MASK;
|
||||
+
|
||||
+ if (flow_type == IRQ_TYPE_NONE)
|
||||
+ flow_type = IRQ_TYPE_LEVEL_LOW;
|
||||
+
|
||||
+ switch (flow_type) {
|
||||
+ case IRQ_TYPE_EDGE_BOTH:
|
||||
+ bothedge = 1;
|
||||
+ break;
|
||||
+
|
||||
+ case IRQ_TYPE_EDGE_RISING:
|
||||
+ sense = 1;
|
||||
+ break;
|
||||
+
|
||||
+ case IRQ_TYPE_EDGE_FALLING:
|
||||
+ break;
|
||||
+
|
||||
+ case IRQ_TYPE_LEVEL_HIGH:
|
||||
+ levelsense = 1;
|
||||
+ sense = 1;
|
||||
+ break;
|
||||
+
|
||||
+ case IRQ_TYPE_LEVEL_LOW:
|
||||
+ levelsense = 1;
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ pr_err("bogus flow type combination given!\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ raw_spin_lock(&priv->lock);
|
||||
+ reg = __raw_readl(priv->reg);
|
||||
+
|
||||
+ if (levelsense)
|
||||
+ reg |= 1 << (hwirq + EXTIRQ_CFG_LEVELSENSE * priv->shift);
|
||||
+ else
|
||||
+ reg &= ~(1 << (hwirq + EXTIRQ_CFG_LEVELSENSE * priv->shift));
|
||||
+ if (sense)
|
||||
+ reg |= 1 << (hwirq + EXTIRQ_CFG_SENSE * priv->shift);
|
||||
+ else
|
||||
+ reg &= ~(1 << (hwirq + EXTIRQ_CFG_SENSE * priv->shift));
|
||||
+ if (bothedge)
|
||||
+ reg |= 1 << (hwirq + EXTIRQ_CFG_BOTHEDGE * priv->shift);
|
||||
+ else
|
||||
+ reg &= ~(1 << (hwirq + EXTIRQ_CFG_BOTHEDGE * priv->shift));
|
||||
+
|
||||
+ __raw_writel(reg, priv->reg);
|
||||
+ raw_spin_unlock(&priv->lock);
|
||||
+
|
||||
+ irqd_set_trigger_type(data, flow_type);
|
||||
+ if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
|
||||
+ irq_set_handler_locked(data, handle_level_irq);
|
||||
+ else
|
||||
+ irq_set_handler_locked(data, handle_edge_irq);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int bcm6345_ext_intc_map(struct irq_domain *d, unsigned int irq,
|
||||
+ irq_hw_number_t hw)
|
||||
+{
|
||||
+ struct intc_data *priv = d->host_data;
|
||||
+
|
||||
+ irq_set_chip_and_handler(irq, &priv->chip, handle_level_irq);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct irq_domain_ops bcm6345_ext_domain_ops = {
|
||||
+ .xlate = irq_domain_xlate_twocell,
|
||||
+ .map = bcm6345_ext_intc_map,
|
||||
+};
|
||||
+
|
||||
+static int __init __bcm6345_ext_intc_init(struct device_node *node,
|
||||
+ int num_irqs, int *irqs,
|
||||
+ void __iomem *reg, int shift,
|
||||
+ bool toggle_clear_on_ack)
|
||||
+{
|
||||
+ struct intc_data *data;
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ data = kzalloc(sizeof(*data), GFP_KERNEL);
|
||||
+ if (!data)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ raw_spin_lock_init(&data->lock);
|
||||
+
|
||||
+ for (i = 0; i < num_irqs; i++) {
|
||||
+ data->parent_irq[i] = irqs[i];
|
||||
+
|
||||
+ irq_set_handler_data(irqs[i], data);
|
||||
+ irq_set_chained_handler(irqs[i], bcm6345_ext_intc_irq_handle);
|
||||
+ }
|
||||
+
|
||||
+ data->reg = reg;
|
||||
+ data->shift = shift;
|
||||
+ data->toggle_clear_on_ack = toggle_clear_on_ack;
|
||||
+
|
||||
+ data->chip.name = "bcm6345-ext-intc";
|
||||
+ data->chip.irq_ack = bcm6345_ext_intc_irq_ack;
|
||||
+ data->chip.irq_mask = bcm6345_ext_intc_irq_mask;
|
||||
+ data->chip.irq_unmask = bcm6345_ext_intc_irq_unmask;
|
||||
+ data->chip.irq_set_type = bcm6345_ext_intc_set_type;
|
||||
+
|
||||
+ data->domain = irq_domain_add_linear(node, num_irqs,
|
||||
+ &bcm6345_ext_domain_ops, data);
|
||||
+ if (!data->domain) {
|
||||
+ kfree(data);
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+void __init bcm6345_ext_intc_init(int num_irqs, int *irqs, void __iomem *reg,
|
||||
+ int shift)
|
||||
+{
|
||||
+ __bcm6345_ext_intc_init(NULL, num_irqs, irqs, reg, shift, false);
|
||||
+}
|
||||
+
|
||||
+#ifdef CONFIG_OF
|
||||
+static int __init bcm6345_ext_intc_of_init(struct device_node *node,
|
||||
+ struct device_node *parent)
|
||||
+{
|
||||
+ int num_irqs, ret = -EINVAL;
|
||||
+ unsigned i;
|
||||
+ void __iomem *base;
|
||||
+ int irqs[MAX_IRQS] = { 0 };
|
||||
+ u32 shift;
|
||||
+ bool toggle_clear_on_ack = false;
|
||||
+
|
||||
+ num_irqs = of_irq_count(node);
|
||||
+
|
||||
+ if (!num_irqs || num_irqs > MAX_IRQS)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ if (of_property_read_u32(node, "brcm,field-width", &shift))
|
||||
+ shift = 4;
|
||||
+
|
||||
+ /* on BCM6318 setting CLEAR seems to continuously mask interrupts */
|
||||
+ if (of_device_is_compatible(node, "brcm,bcm6318-ext-intc"))
|
||||
+ toggle_clear_on_ack = true;
|
||||
+
|
||||
+ for (i = 0; i < num_irqs; i++) {
|
||||
+ irqs[i] = irq_of_parse_and_map(node, i);
|
||||
+ if (!irqs[i])
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ base = of_iomap(node, 0);
|
||||
+ if (!base)
|
||||
+ return -ENXIO;
|
||||
+
|
||||
+ ret = __bcm6345_ext_intc_init(node, num_irqs, irqs, base, shift,
|
||||
+ toggle_clear_on_ack);
|
||||
+ if (!ret)
|
||||
+ return 0;
|
||||
+
|
||||
+ iounmap(base);
|
||||
+
|
||||
+ for (i = 0; i < num_irqs; i++)
|
||||
+ irq_dispose_mapping(irqs[i]);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+IRQCHIP_DECLARE(bcm6318_ext_intc, "brcm,bcm6318-ext-intc",
|
||||
+ bcm6345_ext_intc_of_init);
|
||||
+IRQCHIP_DECLARE(bcm6345_ext_intc, "brcm,bcm6345-ext-intc",
|
||||
+ bcm6345_ext_intc_of_init);
|
||||
+#endif
|
||||
--- /dev/null
|
||||
+++ b/include/linux/irqchip/irq-bcm6345-ext.h
|
||||
@@ -0,0 +1,14 @@
|
||||
+/*
|
||||
+ * This file is subject to the terms and conditions of the GNU General Public
|
||||
+ * License. See the file "COPYING" in the main directory of this archive
|
||||
+ * for more details.
|
||||
+ *
|
||||
+ * Copyright (C) 2014 Jonas Gorski <jogo@openwrt.org>
|
||||
+ */
|
||||
+
|
||||
+#ifndef __INCLUDE_LINUX_IRQCHIP_IRQ_BCM6345_EXT_H
|
||||
+#define __INCLUDE_LINUX_IRQCHIP_IRQ_BCM6345_EXT_H
|
||||
+
|
||||
+void bcm6345_ext_intc_init(int n_irqs, int *irqs, void __iomem *reg, int shift);
|
||||
+
|
||||
+#endif /* __INCLUDE_LINUX_IRQCHIP_IRQ_BCM6345_EXT_H */
|
||||
@ -1,239 +0,0 @@
|
||||
From 0377ad93031d3e51c2afe44231241185f684b6af Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Fri, 5 Mar 2021 15:14:32 +0100
|
||||
Subject: [PATCH] mips: bmips: automatically detect CPU frequency
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Some BCM63xx SoCs support multiple CPU frequencies depending on HW config.
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
arch/mips/bmips/setup.c | 197 ++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 190 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/arch/mips/bmips/setup.c
|
||||
+++ b/arch/mips/bmips/setup.c
|
||||
@@ -31,13 +31,52 @@
|
||||
|
||||
#define RELO_NORMAL_VEC BIT(18)
|
||||
|
||||
+#define REG_BCM6318_SOB ((void __iomem *)CKSEG1ADDR(0x10000900))
|
||||
+#define BCM6318_FREQ_SHIFT 23
|
||||
+#define BCM6318_FREQ_MASK (0x3 << BCM6318_FREQ_SHIFT)
|
||||
+
|
||||
#define REG_BCM6328_OTP ((void __iomem *)CKSEG1ADDR(0x1000062c))
|
||||
#define BCM6328_TP1_DISABLED BIT(9)
|
||||
+#define REG_BCM6328_MISC_SB ((void __iomem *)CKSEG1ADDR(0x10001a40))
|
||||
+#define BCM6328_FCVO_SHIFT 7
|
||||
+#define BCM6328_FCVO_MASK (0x1f << BCM6328_FCVO_SHIFT)
|
||||
+
|
||||
+#define REG_BCM6358_DDR_PLLC ((void __iomem *)0xfffe12b8)
|
||||
+#define BCM6358_PLLC_M1_SHIFT 0
|
||||
+#define BCM6358_PLLC_M1_MASK (0xff << BCM6358_PLLC_M1_SHIFT)
|
||||
+#define BCM6358_PLLC_N1_SHIFT 23
|
||||
+#define BCM6358_PLLC_N1_MASK (0x3f << BCM6358_PLLC_N1_SHIFT)
|
||||
+#define BCM6358_PLLC_N2_SHIFT 29
|
||||
+#define BCM6358_PLLC_N2_MASK (0x7 << BCM6358_PLLC_N2_SHIFT)
|
||||
+
|
||||
+#define REG_BCM6362_MISC_SB ((void __iomem *)CKSEG1ADDR(0x10001814))
|
||||
+#define BCM6362_FCVO_SHIFT 1
|
||||
+#define BCM6362_FCVO_MASK (0x1f << BCM6362_FCVO_SHIFT)
|
||||
+
|
||||
+#define REG_BCM6368_DDR_PLLC ((void __iomem *)CKSEG1ADDR(0x100012a0))
|
||||
+#define BCM6368_PLLC_P1_SHIFT 0
|
||||
+#define BCM6368_PLLC_P1_MASK (0xf << BCM6368_PLLC_P1_SHIFT)
|
||||
+#define BCM6368_PLLC_P2_SHIFT 4
|
||||
+#define BCM6368_PLLC_P2_MASK (0xf << BCM6368_PLLC_P2_SHIFT)
|
||||
+#define BCM6368_PLLC_NDIV_SHIFT 16
|
||||
+#define BCM6368_PLLC_NDIV_MASK (0x1ff << BCM6368_PLLC_NDIV_SHIFT)
|
||||
+#define REG_BCM6368_DDR_PLLD ((void __iomem *)CKSEG1ADDR(0x100012a4))
|
||||
+#define BCM6368_PLLD_MDIV_SHIFT 0
|
||||
+#define BCM6368_PLLD_MDIV_MASK (0xff << BCM6368_PLLD_MDIV_SHIFT)
|
||||
+
|
||||
+#define REG_BCM63268_MISC_SB ((void __iomem *)CKSEG1ADDR(0x10001814))
|
||||
+#define BCM63268_FCVO_SHIFT 21
|
||||
+#define BCM63268_FCVO_MASK (0xf << BCM63268_FCVO_SHIFT)
|
||||
|
||||
extern bool bmips_rac_flush_disable;
|
||||
|
||||
static const unsigned long kbase = VMLINUX_LOAD_ADDRESS & 0xfff00000;
|
||||
|
||||
+struct bmips_cpufreq {
|
||||
+ const char *compatible;
|
||||
+ u32 (*cpu_freq)(void);
|
||||
+};
|
||||
+
|
||||
struct bmips_quirk {
|
||||
const char *compatible;
|
||||
void (*quirk_fn)(void);
|
||||
@@ -142,17 +181,161 @@ const char *get_system_type(void)
|
||||
return "Generic BMIPS kernel";
|
||||
}
|
||||
|
||||
+static u32 bcm6318_cpufreq(void)
|
||||
+{
|
||||
+ u32 val = __raw_readl(REG_BCM6318_SOB);
|
||||
+
|
||||
+ switch ((val & BCM6318_FREQ_MASK) >> BCM6318_FREQ_SHIFT) {
|
||||
+ case 0:
|
||||
+ return 166000000;
|
||||
+ case 2:
|
||||
+ return 250000000;
|
||||
+ case 3:
|
||||
+ return 333000000;
|
||||
+ case 1:
|
||||
+ return 400000000;
|
||||
+ default:
|
||||
+ return 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static u32 bcm6328_cpufreq(void)
|
||||
+{
|
||||
+ u32 val = __raw_readl(REG_BCM6328_MISC_SB);
|
||||
+
|
||||
+ switch ((val & BCM6328_FCVO_MASK) >> BCM6328_FCVO_SHIFT) {
|
||||
+ case 0x12:
|
||||
+ case 0x14:
|
||||
+ case 0x19:
|
||||
+ return 160000000;
|
||||
+ case 0x1c:
|
||||
+ return 192000000;
|
||||
+ case 0x13:
|
||||
+ case 0x15:
|
||||
+ return 200000000;
|
||||
+ case 0x1a:
|
||||
+ return 384000000;
|
||||
+ case 0x16:
|
||||
+ return 400000000;
|
||||
+ default:
|
||||
+ return 320000000;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static u32 bcm6358_cpufreq(void)
|
||||
+{
|
||||
+ u32 val, n1, n2, m1;
|
||||
+
|
||||
+ val = __raw_readl(REG_BCM6358_DDR_PLLC);
|
||||
+ n1 = (val & BCM6358_PLLC_N1_MASK) >> BCM6358_PLLC_N1_SHIFT;
|
||||
+ n2 = (val & BCM6358_PLLC_N2_MASK) >> BCM6358_PLLC_N2_SHIFT;
|
||||
+ m1 = (val & BCM6358_PLLC_M1_MASK) >> BCM6358_PLLC_M1_SHIFT;
|
||||
+
|
||||
+ return (16 * 1000000 * n1 * n2) / m1;
|
||||
+}
|
||||
+
|
||||
+static u32 bcm6362_cpufreq(void)
|
||||
+{
|
||||
+ u32 val = __raw_readl(REG_BCM6362_MISC_SB);
|
||||
+
|
||||
+ switch ((val & BCM6362_FCVO_MASK) >> BCM6362_FCVO_SHIFT) {
|
||||
+ case 0x04:
|
||||
+ case 0x0c:
|
||||
+ case 0x14:
|
||||
+ case 0x1c:
|
||||
+ return 160000000;
|
||||
+ case 0x15:
|
||||
+ case 0x1d:
|
||||
+ return 200000000;
|
||||
+ case 0x03:
|
||||
+ case 0x0b:
|
||||
+ case 0x13:
|
||||
+ case 0x1b:
|
||||
+ return 240000000;
|
||||
+ case 0x07:
|
||||
+ case 0x17:
|
||||
+ return 384000000;
|
||||
+ case 0x05:
|
||||
+ case 0x0e:
|
||||
+ case 0x16:
|
||||
+ case 0x1e:
|
||||
+ case 0x1f:
|
||||
+ return 400000000;
|
||||
+ case 0x06:
|
||||
+ return 440000000;
|
||||
+ default:
|
||||
+ return 320000000;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static u32 bcm6368_cpufreq(void)
|
||||
+{
|
||||
+ u32 val, p1, p2, ndiv, m1;
|
||||
+
|
||||
+ val = __raw_readl(REG_BCM6368_DDR_PLLC);
|
||||
+ p1 = (val & BCM6368_PLLC_P1_MASK) >> BCM6368_PLLC_P1_SHIFT;
|
||||
+ p2 = (val & BCM6368_PLLC_P2_MASK) >> BCM6368_PLLC_P2_SHIFT;
|
||||
+ ndiv = (val & BCM6368_PLLC_NDIV_MASK) >>
|
||||
+ BCM6368_PLLC_NDIV_SHIFT;
|
||||
+
|
||||
+ val = __raw_readl(REG_BCM6368_DDR_PLLD);
|
||||
+ m1 = (val & BCM6368_PLLD_MDIV_MASK) >> BCM6368_PLLD_MDIV_SHIFT;
|
||||
+
|
||||
+ return (((64 * 1000000) / p1) * p2 * ndiv) / m1;
|
||||
+}
|
||||
+
|
||||
+static u32 bcm63268_cpufreq(void)
|
||||
+{
|
||||
+ u32 val = __raw_readl(REG_BCM63268_MISC_SB);
|
||||
+
|
||||
+ switch ((val & BCM63268_FCVO_MASK) >> BCM63268_FCVO_SHIFT) {
|
||||
+ case 0x3:
|
||||
+ case 0xe:
|
||||
+ return 320000000;
|
||||
+ case 0xa:
|
||||
+ return 333000000;
|
||||
+ case 0x2:
|
||||
+ case 0xb:
|
||||
+ case 0xf:
|
||||
+ return 400000000;
|
||||
+ default:
|
||||
+ return 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static const struct bmips_cpufreq bmips_cpufreq_list[] = {
|
||||
+ { "brcm,bcm6318", &bcm6318_cpufreq },
|
||||
+ { "brcm,bcm6328", &bcm6328_cpufreq },
|
||||
+ { "brcm,bcm6358", &bcm6358_cpufreq },
|
||||
+ { "brcm,bcm6362", &bcm6362_cpufreq },
|
||||
+ { "brcm,bcm6368", &bcm6368_cpufreq },
|
||||
+ { "brcm,bcm63268", &bcm63268_cpufreq },
|
||||
+ { /* sentinel */ }
|
||||
+};
|
||||
+
|
||||
void __init plat_time_init(void)
|
||||
{
|
||||
+ const struct bmips_cpufreq *cf;
|
||||
struct device_node *np;
|
||||
- u32 freq;
|
||||
+ u32 freq = 0;
|
||||
|
||||
- np = of_find_node_by_name(NULL, "cpus");
|
||||
- if (!np)
|
||||
- panic("missing 'cpus' DT node");
|
||||
- if (of_property_read_u32(np, "mips-hpt-frequency", &freq) < 0)
|
||||
- panic("missing 'mips-hpt-frequency' property");
|
||||
- of_node_put(np);
|
||||
+ for (cf = bmips_cpufreq_list; cf->cpu_freq; cf++) {
|
||||
+ if (of_flat_dt_is_compatible(of_get_flat_dt_root(),
|
||||
+ cf->compatible)) {
|
||||
+ freq = cf->cpu_freq() / 2;
|
||||
+ printk("%s detected @ %u MHz\n", cf->compatible, freq / 500000);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!freq) {
|
||||
+ np = of_find_node_by_name(NULL, "cpus");
|
||||
+ if (!np)
|
||||
+ panic("missing 'cpus' DT node");
|
||||
+ if (of_property_read_u32(np, "mips-hpt-frequency", &freq) < 0)
|
||||
+ panic("missing 'mips-hpt-frequency' property");
|
||||
+ of_node_put(np);
|
||||
+ }
|
||||
|
||||
mips_hpt_frequency = freq;
|
||||
}
|
||||
@ -1,196 +0,0 @@
|
||||
From f9ee3f28ecb979c77423be965ef9dd313bdb9e9b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Mon, 8 Mar 2021 16:58:34 +0100
|
||||
Subject: [PATCH] mips: bmips: automatically detect RAM size
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Some devices have different amounts of RAM installed depending on HW revision.
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
arch/mips/bmips/setup.c | 119 ++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 119 insertions(+)
|
||||
|
||||
--- a/arch/mips/bmips/setup.c
|
||||
+++ b/arch/mips/bmips/setup.c
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/libfdt.h>
|
||||
#include <linux/smp.h>
|
||||
+#include <linux/types.h>
|
||||
#include <asm/addrspace.h>
|
||||
#include <asm/bmips.h>
|
||||
#include <asm/bootinfo.h>
|
||||
@@ -34,13 +35,16 @@
|
||||
#define REG_BCM6318_SOB ((void __iomem *)CKSEG1ADDR(0x10000900))
|
||||
#define BCM6318_FREQ_SHIFT 23
|
||||
#define BCM6318_FREQ_MASK (0x3 << BCM6318_FREQ_SHIFT)
|
||||
+#define BCM6318_SDRAM_ADDR ((void __iomem *)CKSEG1ADDR(0x10004000))
|
||||
|
||||
#define REG_BCM6328_OTP ((void __iomem *)CKSEG1ADDR(0x1000062c))
|
||||
#define BCM6328_TP1_DISABLED BIT(9)
|
||||
#define REG_BCM6328_MISC_SB ((void __iomem *)CKSEG1ADDR(0x10001a40))
|
||||
#define BCM6328_FCVO_SHIFT 7
|
||||
#define BCM6328_FCVO_MASK (0x1f << BCM6328_FCVO_SHIFT)
|
||||
+#define BCM6328_MEMC_ADDR ((void __iomem *)CKSEG1ADDR(0x10003000))
|
||||
|
||||
+#define BCM6358_MEMC_ADDR ((void __iomem *)0xfffe1200)
|
||||
#define REG_BCM6358_DDR_PLLC ((void __iomem *)0xfffe12b8)
|
||||
#define BCM6358_PLLC_M1_SHIFT 0
|
||||
#define BCM6358_PLLC_M1_MASK (0xff << BCM6358_PLLC_M1_SHIFT)
|
||||
@@ -52,7 +56,9 @@
|
||||
#define REG_BCM6362_MISC_SB ((void __iomem *)CKSEG1ADDR(0x10001814))
|
||||
#define BCM6362_FCVO_SHIFT 1
|
||||
#define BCM6362_FCVO_MASK (0x1f << BCM6362_FCVO_SHIFT)
|
||||
+#define BCM6362_MEMC_ADDR ((void __iomem *)CKSEG1ADDR(0x10003000))
|
||||
|
||||
+#define BCM6368_MEMC_ADDR ((void __iomem *)CKSEG1ADDR(0x10001200))
|
||||
#define REG_BCM6368_DDR_PLLC ((void __iomem *)CKSEG1ADDR(0x100012a0))
|
||||
#define BCM6368_PLLC_P1_SHIFT 0
|
||||
#define BCM6368_PLLC_P1_MASK (0xf << BCM6368_PLLC_P1_SHIFT)
|
||||
@@ -67,6 +73,21 @@
|
||||
#define REG_BCM63268_MISC_SB ((void __iomem *)CKSEG1ADDR(0x10001814))
|
||||
#define BCM63268_FCVO_SHIFT 21
|
||||
#define BCM63268_FCVO_MASK (0xf << BCM63268_FCVO_SHIFT)
|
||||
+#define BCM63268_MEMC_ADDR ((void __iomem *)CKSEG1ADDR(0x10003000))
|
||||
+
|
||||
+#define SDRAM_CFG_REG 0x0
|
||||
+#define SDRAM_SPACE_SHIFT 4
|
||||
+#define SDRAM_SPACE_MASK (0xf << SDRAM_SPACE_SHIFT)
|
||||
+
|
||||
+#define MEMC_CFG_REG 0x4
|
||||
+#define MEMC_CFG_32B_SHIFT 1
|
||||
+#define MEMC_CFG_32B_MASK (1 << MEMC_CFG_32B_SHIFT)
|
||||
+#define MEMC_CFG_COL_SHIFT 3
|
||||
+#define MEMC_CFG_COL_MASK (0x3 << MEMC_CFG_COL_SHIFT)
|
||||
+#define MEMC_CFG_ROW_SHIFT 6
|
||||
+#define MEMC_CFG_ROW_MASK (0x3 << MEMC_CFG_ROW_SHIFT)
|
||||
+
|
||||
+#define DDR_CSEND_REG 0x8
|
||||
|
||||
extern bool bmips_rac_flush_disable;
|
||||
|
||||
@@ -77,6 +98,11 @@ struct bmips_cpufreq {
|
||||
u32 (*cpu_freq)(void);
|
||||
};
|
||||
|
||||
+struct bmips_memsize {
|
||||
+ const char *compatible;
|
||||
+ phys_addr_t (*mem_size)(void);
|
||||
+};
|
||||
+
|
||||
struct bmips_quirk {
|
||||
const char *compatible;
|
||||
void (*quirk_fn)(void);
|
||||
@@ -340,9 +366,90 @@ void __init plat_time_init(void)
|
||||
mips_hpt_frequency = freq;
|
||||
}
|
||||
|
||||
+static inline phys_addr_t bmips_dram_size(unsigned int cols,
|
||||
+ unsigned int rows,
|
||||
+ unsigned int is_32b,
|
||||
+ unsigned int banks)
|
||||
+{
|
||||
+ rows += 11; /* 0 => 11 address bits ... 2 => 13 address bits */
|
||||
+ cols += 8; /* 0 => 8 address bits ... 2 => 10 address bits */
|
||||
+ is_32b += 1;
|
||||
+
|
||||
+ return 1 << (cols + rows + is_32b + banks);
|
||||
+}
|
||||
+
|
||||
+static phys_addr_t _bcm6318_memsize(void __iomem *addr)
|
||||
+{
|
||||
+ u32 val;
|
||||
+
|
||||
+ val = __raw_readl(addr + SDRAM_CFG_REG);
|
||||
+ val = (val & SDRAM_SPACE_MASK) >> SDRAM_SPACE_SHIFT;
|
||||
+
|
||||
+ return (1 << (val + 20));
|
||||
+}
|
||||
+
|
||||
+static phys_addr_t _bcm6328_memsize(void __iomem *addr)
|
||||
+{
|
||||
+ return __raw_readl(addr + DDR_CSEND_REG) << 24;
|
||||
+}
|
||||
+
|
||||
+static phys_addr_t _bcm6358_memsize(void __iomem *addr)
|
||||
+{
|
||||
+ unsigned int cols, rows, is_32b;
|
||||
+ u32 val;
|
||||
+
|
||||
+ val = __raw_readl(addr + MEMC_CFG_REG);
|
||||
+ rows = (val & MEMC_CFG_ROW_MASK) >> MEMC_CFG_ROW_SHIFT;
|
||||
+ cols = (val & MEMC_CFG_COL_MASK) >> MEMC_CFG_COL_SHIFT;
|
||||
+ is_32b = (val & MEMC_CFG_32B_MASK) ? 0 : 1;
|
||||
+
|
||||
+ return bmips_dram_size(cols, rows, is_32b, 2);
|
||||
+}
|
||||
+
|
||||
+static phys_addr_t bcm6318_memsize(void)
|
||||
+{
|
||||
+ return _bcm6318_memsize(BCM6318_SDRAM_ADDR);
|
||||
+}
|
||||
+
|
||||
+static phys_addr_t bcm6328_memsize(void)
|
||||
+{
|
||||
+ return _bcm6328_memsize(BCM6328_MEMC_ADDR);
|
||||
+}
|
||||
+
|
||||
+static phys_addr_t bcm6358_memsize(void)
|
||||
+{
|
||||
+ return _bcm6358_memsize(BCM6358_MEMC_ADDR);
|
||||
+}
|
||||
+
|
||||
+static phys_addr_t bcm6362_memsize(void)
|
||||
+{
|
||||
+ return _bcm6328_memsize(BCM6362_MEMC_ADDR);
|
||||
+}
|
||||
+
|
||||
+static phys_addr_t bcm6368_memsize(void)
|
||||
+{
|
||||
+ return _bcm6358_memsize(BCM6368_MEMC_ADDR);
|
||||
+}
|
||||
+
|
||||
+static phys_addr_t bcm63268_memsize(void)
|
||||
+{
|
||||
+ return _bcm6328_memsize(BCM63268_MEMC_ADDR);
|
||||
+}
|
||||
+
|
||||
+static const struct bmips_memsize bmips_memsize_list[] = {
|
||||
+ { "brcm,bcm6318", &bcm6318_memsize },
|
||||
+ { "brcm,bcm6328", &bcm6328_memsize },
|
||||
+ { "brcm,bcm6358", &bcm6358_memsize },
|
||||
+ { "brcm,bcm6362", &bcm6362_memsize },
|
||||
+ { "brcm,bcm6368", &bcm6368_memsize },
|
||||
+ { "brcm,bcm63268", &bcm63268_memsize },
|
||||
+ { /* sentinel */ }
|
||||
+};
|
||||
+
|
||||
void __init plat_mem_setup(void)
|
||||
{
|
||||
void *dtb;
|
||||
+ const struct bmips_memsize *ms;
|
||||
const struct bmips_quirk *q;
|
||||
|
||||
set_io_port_base(0);
|
||||
@@ -360,6 +467,18 @@ void __init plat_mem_setup(void)
|
||||
|
||||
__dt_setup_arch(dtb);
|
||||
|
||||
+ for (ms = bmips_memsize_list; ms->mem_size; ms++) {
|
||||
+ if (of_flat_dt_is_compatible(of_get_flat_dt_root(),
|
||||
+ ms->compatible)) {
|
||||
+ phys_addr_t mem = ms->mem_size();
|
||||
+ if (mem) {
|
||||
+ memblock_add(0, mem);
|
||||
+ printk("%uMB of RAM installed\n", mem >> 20);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
for (q = bmips_quirk_list; q->quirk_fn; q++) {
|
||||
if (of_flat_dt_is_compatible(of_get_flat_dt_root(),
|
||||
q->compatible)) {
|
||||
@ -1,42 +0,0 @@
|
||||
From 20a4b57c0fafd23ae0f6bcab5b5adf4af4c80280 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Thu, 16 Mar 2023 19:31:21 +0100
|
||||
Subject: [PATCH] mips: bmips: tweak Kconfig options
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
arch/mips/Kconfig | 7 +------
|
||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
--- a/arch/mips/Kconfig
|
||||
+++ b/arch/mips/Kconfig
|
||||
@@ -276,25 +276,20 @@ config BMIPS_GENERIC
|
||||
select SYNC_R4K
|
||||
select COMMON_CLK
|
||||
select BCM6345_L1_IRQ
|
||||
- select BCM7038_L1_IRQ
|
||||
- select BCM7120_L2_IRQ
|
||||
- select BRCMSTB_L2_IRQ
|
||||
select IRQ_MIPS_CPU
|
||||
select DMA_NONCOHERENT
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
- select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
- select SYS_SUPPORTS_HIGHMEM
|
||||
select SYS_HAS_CPU_BMIPS32_3300
|
||||
select SYS_HAS_CPU_BMIPS4350
|
||||
select SYS_HAS_CPU_BMIPS4380
|
||||
- select SYS_HAS_CPU_BMIPS5000
|
||||
select SWAP_IO_SPACE
|
||||
select USB_EHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
|
||||
select USB_EHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
|
||||
select USB_OHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
|
||||
select USB_OHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
|
||||
select HARDIRQS_SW_RESEND
|
||||
+ select MIPS_L1_CACHE_SHIFT_4
|
||||
help
|
||||
Build a generic DT-based kernel image that boots on select
|
||||
BCM33xx cable modem chips, BCM63xx DSL chips, and BCM7xxx set-top
|
||||
@ -1,84 +0,0 @@
|
||||
From 3e4c3863e0cfb8c2abdff6bb494ca69d3d2aed9c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Sat, 10 Jun 2023 17:01:40 +0200
|
||||
Subject: [PATCH] mips: bmips: dma: fix CBR address
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Some BCM63xx SoCs may return CBR address as 0.
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
arch/mips/bmips/dma.c | 12 ++++--------
|
||||
arch/mips/bmips/setup.c | 11 ++++-------
|
||||
2 files changed, 8 insertions(+), 15 deletions(-)
|
||||
|
||||
--- a/arch/mips/bmips/dma.c
|
||||
+++ b/arch/mips/bmips/dma.c
|
||||
@@ -64,11 +64,10 @@ phys_addr_t dma_to_phys(struct device *d
|
||||
return dma_addr;
|
||||
}
|
||||
|
||||
-bool bmips_rac_flush_disable;
|
||||
+void __iomem *bmips_cbr_addr;
|
||||
|
||||
void arch_sync_dma_for_cpu_all(void)
|
||||
{
|
||||
- void __iomem *cbr = BMIPS_GET_CBR();
|
||||
u32 cfg;
|
||||
|
||||
if (boot_cpu_type() != CPU_BMIPS3300 &&
|
||||
@@ -76,13 +75,10 @@ void arch_sync_dma_for_cpu_all(void)
|
||||
boot_cpu_type() != CPU_BMIPS4380)
|
||||
return;
|
||||
|
||||
- if (unlikely(bmips_rac_flush_disable))
|
||||
- return;
|
||||
-
|
||||
/* Flush stale data out of the readahead cache */
|
||||
- cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
|
||||
- __raw_writel(cfg | 0x100, cbr + BMIPS_RAC_CONFIG);
|
||||
- __raw_readl(cbr + BMIPS_RAC_CONFIG);
|
||||
+ cfg = __raw_readl(bmips_cbr_addr + BMIPS_RAC_CONFIG);
|
||||
+ __raw_writel(cfg | 0x100, bmips_cbr_addr + BMIPS_RAC_CONFIG);
|
||||
+ __raw_readl(bmips_cbr_addr + BMIPS_RAC_CONFIG);
|
||||
}
|
||||
|
||||
static int __init bmips_init_dma_ranges(void)
|
||||
--- a/arch/mips/bmips/setup.c
|
||||
+++ b/arch/mips/bmips/setup.c
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
#define DDR_CSEND_REG 0x8
|
||||
|
||||
-extern bool bmips_rac_flush_disable;
|
||||
+extern void __iomem *bmips_cbr_addr;
|
||||
|
||||
static const unsigned long kbase = VMLINUX_LOAD_ADDRESS & 0xfff00000;
|
||||
|
||||
@@ -170,12 +170,6 @@ static void bcm6358_quirks(void)
|
||||
* disable SMP for now
|
||||
*/
|
||||
bmips_smp_enabled = 0;
|
||||
-
|
||||
- /*
|
||||
- * RAC flush causes kernel panics on BCM6358 when booting from TP1
|
||||
- * because the bootloader is not initializing it properly.
|
||||
- */
|
||||
- bmips_rac_flush_disable = !!(read_c0_brcm_cmt_local() & (1 << 31));
|
||||
}
|
||||
|
||||
static void bcm6368_quirks(void)
|
||||
@@ -198,6 +192,11 @@ static const struct bmips_quirk bmips_qu
|
||||
|
||||
void __init prom_init(void)
|
||||
{
|
||||
+ if (!(read_c0_brcm_cbr() >> 18))
|
||||
+ bmips_cbr_addr = (void __iomem *)0xff400000;
|
||||
+ else
|
||||
+ bmips_cbr_addr = BMIPS_GET_CBR();
|
||||
+
|
||||
bmips_cpu_setup();
|
||||
register_bmips_smp_ops();
|
||||
}
|
||||
@ -1,42 +0,0 @@
|
||||
From 7f862eaedac56b67972393f0a9affcd2fe53479b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez=20Cabanelas?= <dgcbueu@gmail.com>
|
||||
Date: Sun, 18 Jun 2023 19:59:25 +0200
|
||||
Subject: [PATCH] mips: bmips: enable RAC on BMIPS4350
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The data RAC is left disabled by the bootloader in some SoCs, at least in
|
||||
the core it boots from.
|
||||
Enabling this feature increases the performance up to +30% depending on the
|
||||
task.
|
||||
|
||||
Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
arch/mips/kernel/smp-bmips.c | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
--- a/arch/mips/kernel/smp-bmips.c
|
||||
+++ b/arch/mips/kernel/smp-bmips.c
|
||||
@@ -614,6 +614,20 @@ void bmips_cpu_setup(void)
|
||||
__raw_readl(cbr + BMIPS_RAC_ADDRESS_RANGE);
|
||||
break;
|
||||
|
||||
+ case CPU_BMIPS4350:
|
||||
+ /* Enable data RAC */
|
||||
+ if (!(read_c0_brcm_cmt_local() & (1 << 31))) {
|
||||
+ cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
|
||||
+ __raw_writel(cfg | 0xa, cbr + BMIPS_RAC_CONFIG);
|
||||
+ __raw_readl(cbr + BMIPS_RAC_CONFIG);
|
||||
+ } else {
|
||||
+ cbr = (void __iomem *)0xff400000;
|
||||
+ cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG_1);
|
||||
+ __raw_writel(cfg | 0xa, cbr + BMIPS_RAC_CONFIG_1);
|
||||
+ __raw_readl(cbr + BMIPS_RAC_CONFIG_1);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
case CPU_BMIPS4380:
|
||||
/* CBG workaround for early BMIPS4380 CPUs */
|
||||
switch (read_c0_prid()) {
|
||||
@ -1,114 +0,0 @@
|
||||
From 5a37811de679bff03e9c5a746f75574910ede964 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Wed, 22 Mar 2023 20:52:13 +0100
|
||||
Subject: [PATCH] Revert "mtd: rawnand: Macronix: Add support for block
|
||||
protection"
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This reverts commit 03a539c7a118427a6609a26461358c56ac8f3a06.
|
||||
|
||||
Macronix block protection doesn't seem to be supported on Sercomm H-500s
|
||||
devices since it hangs the device.
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
drivers/mtd/nand/raw/nand_macronix.c | 72 ----------------------------
|
||||
1 file changed, 72 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/nand/raw/nand_macronix.c
|
||||
+++ b/drivers/mtd/nand/raw/nand_macronix.c
|
||||
@@ -12,10 +12,6 @@
|
||||
#define MACRONIX_READ_RETRY_BIT BIT(0)
|
||||
#define MACRONIX_NUM_READ_RETRY_MODES 6
|
||||
|
||||
-#define ONFI_FEATURE_ADDR_MXIC_PROTECTION 0xA0
|
||||
-#define MXIC_BLOCK_PROTECTION_ALL_LOCK 0x38
|
||||
-#define MXIC_BLOCK_PROTECTION_ALL_UNLOCK 0x0
|
||||
-
|
||||
#define ONFI_FEATURE_ADDR_MXIC_RANDOMIZER 0xB0
|
||||
#define MACRONIX_RANDOMIZER_BIT BIT(1)
|
||||
#define MACRONIX_RANDOMIZER_ENPGM BIT(0)
|
||||
@@ -179,73 +175,6 @@ static void macronix_nand_fix_broken_get
|
||||
ONFI_FEATURE_ADDR_TIMING_MODE, 1);
|
||||
}
|
||||
|
||||
-/*
|
||||
- * Macronix NAND supports Block Protection by Protectoin(PT) pin;
|
||||
- * active high at power-on which protects the entire chip even the #WP is
|
||||
- * disabled. Lock/unlock protection area can be partition according to
|
||||
- * protection bits, i.e. upper 1/2 locked, upper 1/4 locked and so on.
|
||||
- */
|
||||
-static int mxic_nand_lock(struct nand_chip *chip, loff_t ofs, uint64_t len)
|
||||
-{
|
||||
- u8 feature[ONFI_SUBFEATURE_PARAM_LEN];
|
||||
- int ret;
|
||||
-
|
||||
- feature[0] = MXIC_BLOCK_PROTECTION_ALL_LOCK;
|
||||
- nand_select_target(chip, 0);
|
||||
- ret = nand_set_features(chip, ONFI_FEATURE_ADDR_MXIC_PROTECTION,
|
||||
- feature);
|
||||
- nand_deselect_target(chip);
|
||||
- if (ret)
|
||||
- pr_err("%s all blocks failed\n", __func__);
|
||||
-
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
-static int mxic_nand_unlock(struct nand_chip *chip, loff_t ofs, uint64_t len)
|
||||
-{
|
||||
- u8 feature[ONFI_SUBFEATURE_PARAM_LEN];
|
||||
- int ret;
|
||||
-
|
||||
- feature[0] = MXIC_BLOCK_PROTECTION_ALL_UNLOCK;
|
||||
- nand_select_target(chip, 0);
|
||||
- ret = nand_set_features(chip, ONFI_FEATURE_ADDR_MXIC_PROTECTION,
|
||||
- feature);
|
||||
- nand_deselect_target(chip);
|
||||
- if (ret)
|
||||
- pr_err("%s all blocks failed\n", __func__);
|
||||
-
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
-static void macronix_nand_block_protection_support(struct nand_chip *chip)
|
||||
-{
|
||||
- u8 feature[ONFI_SUBFEATURE_PARAM_LEN];
|
||||
- int ret;
|
||||
-
|
||||
- bitmap_set(chip->parameters.get_feature_list,
|
||||
- ONFI_FEATURE_ADDR_MXIC_PROTECTION, 1);
|
||||
-
|
||||
- feature[0] = MXIC_BLOCK_PROTECTION_ALL_UNLOCK;
|
||||
- nand_select_target(chip, 0);
|
||||
- ret = nand_get_features(chip, ONFI_FEATURE_ADDR_MXIC_PROTECTION,
|
||||
- feature);
|
||||
- nand_deselect_target(chip);
|
||||
- if (ret || feature[0] != MXIC_BLOCK_PROTECTION_ALL_LOCK) {
|
||||
- if (ret)
|
||||
- pr_err("Block protection check failed\n");
|
||||
-
|
||||
- bitmap_clear(chip->parameters.get_feature_list,
|
||||
- ONFI_FEATURE_ADDR_MXIC_PROTECTION, 1);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- bitmap_set(chip->parameters.set_feature_list,
|
||||
- ONFI_FEATURE_ADDR_MXIC_PROTECTION, 1);
|
||||
-
|
||||
- chip->ops.lock_area = mxic_nand_lock;
|
||||
- chip->ops.unlock_area = mxic_nand_unlock;
|
||||
-}
|
||||
-
|
||||
static int nand_power_down_op(struct nand_chip *chip)
|
||||
{
|
||||
int ret;
|
||||
@@ -323,7 +252,6 @@ static int macronix_nand_init(struct nan
|
||||
|
||||
macronix_nand_fix_broken_get_timings(chip);
|
||||
macronix_nand_onfi_init(chip);
|
||||
- macronix_nand_block_protection_support(chip);
|
||||
macronix_nand_deep_power_down_support(chip);
|
||||
|
||||
return 0;
|
||||
@ -1,44 +0,0 @@
|
||||
From 590b60fb08cb1e70fe02d3f407c6b3dbe9ad06ff Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Mon, 1 Mar 2021 07:34:39 +0100
|
||||
Subject: [PATCH] net: broadcom: add BCM6368 enetsw controller driver
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This controller is present on BCM6318, BCM6328, BCM6362, BCM6368 and BCM63268
|
||||
SoCs.
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
drivers/net/ethernet/broadcom/Kconfig | 8 ++++++++
|
||||
drivers/net/ethernet/broadcom/Makefile | 1 +
|
||||
2 files changed, 9 insertions(+)
|
||||
|
||||
--- a/drivers/net/ethernet/broadcom/Kconfig
|
||||
+++ b/drivers/net/ethernet/broadcom/Kconfig
|
||||
@@ -68,6 +68,14 @@ config BCM63XX_ENET
|
||||
This driver supports the ethernet MACs in the Broadcom 63xx
|
||||
MIPS chipset family (BCM63XX).
|
||||
|
||||
+config BCM6368_ENETSW
|
||||
+ tristate "Broadcom BCM6368 internal mac support"
|
||||
+ depends on BMIPS_GENERIC || COMPILE_TEST
|
||||
+ default y
|
||||
+ help
|
||||
+ This driver supports Ethernet controller integrated into Broadcom
|
||||
+ BCM6368 family SoCs.
|
||||
+
|
||||
config BCMGENET
|
||||
tristate "Broadcom GENET internal MAC support"
|
||||
depends on HAS_IOMEM
|
||||
--- a/drivers/net/ethernet/broadcom/Makefile
|
||||
+++ b/drivers/net/ethernet/broadcom/Makefile
|
||||
@@ -6,6 +6,7 @@
|
||||
obj-$(CONFIG_B44) += b44.o
|
||||
obj-$(CONFIG_BCM4908_ENET) += bcm4908_enet.o
|
||||
obj-$(CONFIG_BCM63XX_ENET) += bcm63xx_enet.o
|
||||
+obj-$(CONFIG_BCM6368_ENETSW) += bcm6368-enetsw.o
|
||||
obj-$(CONFIG_BCMGENET) += genet/
|
||||
obj-$(CONFIG_BNX2) += bnx2.o
|
||||
obj-$(CONFIG_CNIC) += cnic.o
|
||||
@ -1,43 +0,0 @@
|
||||
From 590b60fb08cb1e70fe02d3f407c6b3dbe9ad06ff Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Mon, 1 Mar 2021 07:34:39 +0100
|
||||
Subject: [PATCH] net: broadcom: add BCM6348 enetsw controller driver
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This controller is present on BCM6338, BCM6348 and BCM6358 SoCs.
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
drivers/net/ethernet/broadcom/Kconfig | 8 ++++++++
|
||||
drivers/net/ethernet/broadcom/Makefile | 1 +
|
||||
2 files changed, 9 insertions(+)
|
||||
|
||||
--- a/drivers/net/ethernet/broadcom/Kconfig
|
||||
+++ b/drivers/net/ethernet/broadcom/Kconfig
|
||||
@@ -68,6 +68,14 @@ config BCM63XX_ENET
|
||||
This driver supports the ethernet MACs in the Broadcom 63xx
|
||||
MIPS chipset family (BCM63XX).
|
||||
|
||||
+config BCM6348_ENET
|
||||
+ tristate "Broadcom BCM6348 internal mac support"
|
||||
+ depends on BMIPS_GENERIC || COMPILE_TEST
|
||||
+ default y
|
||||
+ help
|
||||
+ This driver supports Ethernet controller integrated into Broadcom
|
||||
+ BCM6348 family SoCs.
|
||||
+
|
||||
config BCM6368_ENETSW
|
||||
tristate "Broadcom BCM6368 internal mac support"
|
||||
depends on BMIPS_GENERIC || COMPILE_TEST
|
||||
--- a/drivers/net/ethernet/broadcom/Makefile
|
||||
+++ b/drivers/net/ethernet/broadcom/Makefile
|
||||
@@ -6,6 +6,7 @@
|
||||
obj-$(CONFIG_B44) += b44.o
|
||||
obj-$(CONFIG_BCM4908_ENET) += bcm4908_enet.o
|
||||
obj-$(CONFIG_BCM63XX_ENET) += bcm63xx_enet.o
|
||||
+obj-$(CONFIG_BCM6348_ENET) += bcm6348-enet.o
|
||||
obj-$(CONFIG_BCM6368_ENETSW) += bcm6368-enetsw.o
|
||||
obj-$(CONFIG_BCMGENET) += genet/
|
||||
obj-$(CONFIG_BNX2) += bnx2.o
|
||||
@ -1,23 +0,0 @@
|
||||
From 21145a89c79a22c4fb719cce5a2f4e3373d39756 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Wed, 17 May 2023 18:16:46 +0200
|
||||
Subject: [PATCH] net: mdio: mux-bcm6368: allow disabling for bmips
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
drivers/net/mdio/Kconfig | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/mdio/Kconfig
|
||||
+++ b/drivers/net/mdio/Kconfig
|
||||
@@ -219,7 +219,6 @@ config MDIO_BUS_MUX_BCM6368
|
||||
tristate "Broadcom BCM6368 MDIO bus multiplexers"
|
||||
depends on OF && OF_MDIO && (BMIPS_GENERIC || COMPILE_TEST)
|
||||
select MDIO_BUS_MUX
|
||||
- default BMIPS_GENERIC
|
||||
help
|
||||
This module provides a driver for MDIO bus multiplexers found in
|
||||
BCM6368 based Broadcom SoCs. This multiplexer connects one of several
|
||||
@ -1,34 +0,0 @@
|
||||
From 7742c1ba191a005a1356ff89b5fe2279d6f0ec4d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Wed, 17 May 2023 18:18:43 +0200
|
||||
Subject: [PATCH] mips: bmips: add PCI support
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
arch/mips/Kconfig | 1 +
|
||||
arch/mips/pci/Makefile | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
--- a/arch/mips/Kconfig
|
||||
+++ b/arch/mips/Kconfig
|
||||
@@ -276,6 +276,7 @@ config BMIPS_GENERIC
|
||||
select SYNC_R4K
|
||||
select COMMON_CLK
|
||||
select BCM6345_L1_IRQ
|
||||
+ select HAVE_PCI
|
||||
select IRQ_MIPS_CPU
|
||||
select DMA_NONCOHERENT
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
--- a/arch/mips/pci/Makefile
|
||||
+++ b/arch/mips/pci/Makefile
|
||||
@@ -28,6 +28,7 @@ obj-$(CONFIG_PCI_XTALK_BRIDGE) += pci-xt
|
||||
# These are still pretty much in the old state, watch, go blind.
|
||||
#
|
||||
obj-$(CONFIG_ATH79) += fixup-ath79.o
|
||||
+obj-$(CONFIG_BMIPS_GENERIC) += fixup-bmips.o
|
||||
obj-$(CONFIG_MIPS_COBALT) += fixup-cobalt.o
|
||||
obj-$(CONFIG_LEMOTE_FULOONG2E) += fixup-fuloong2e.o ops-loongson2.o
|
||||
obj-$(CONFIG_LEMOTE_MACH2F) += fixup-lemote2f.o ops-loongson2.o
|
||||
@ -1,36 +0,0 @@
|
||||
From 49133041e0a5770decf1a25f575764d13a0d425c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Wed, 17 May 2023 18:20:10 +0200
|
||||
Subject: [PATCH] pci: add bcm6328-pcie support
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
drivers/pci/controller/Kconfig | 5 +++++
|
||||
drivers/pci/controller/Makefile | 1 +
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
--- a/drivers/pci/controller/Kconfig
|
||||
+++ b/drivers/pci/controller/Kconfig
|
||||
@@ -3,6 +3,11 @@
|
||||
menu "PCI controller drivers"
|
||||
depends on PCI
|
||||
|
||||
+config PCIE_BCM6328
|
||||
+ bool "BCM6328 PCIe controller"
|
||||
+ depends on BMIPS_GENERIC || COMPILE_TEST
|
||||
+ depends on OF
|
||||
+
|
||||
config PCI_MVEBU
|
||||
bool "Marvell EBU PCIe controller"
|
||||
depends on ARCH_MVEBU || ARCH_DOVE || COMPILE_TEST
|
||||
--- a/drivers/pci/controller/Makefile
|
||||
+++ b/drivers/pci/controller/Makefile
|
||||
@@ -1,4 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
+obj-$(CONFIG_PCIE_BCM6328) += pcie-bcm6328.o
|
||||
obj-$(CONFIG_PCIE_CADENCE) += cadence/
|
||||
obj-$(CONFIG_PCI_FTPCI100) += pci-ftpci100.o
|
||||
obj-$(CONFIG_PCI_IXP4XX) += pci-ixp4xx.o
|
||||
@ -1,36 +0,0 @@
|
||||
From cc3c30bdc98eabbaa07c64302eb5124a0f4a74f0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Wed, 17 May 2023 18:20:46 +0200
|
||||
Subject: [PATCH] pci: add bcm6318-pcie support
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
drivers/pci/controller/Kconfig | 5 +++++
|
||||
drivers/pci/controller/Makefile | 1 +
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
--- a/drivers/pci/controller/Kconfig
|
||||
+++ b/drivers/pci/controller/Kconfig
|
||||
@@ -3,6 +3,11 @@
|
||||
menu "PCI controller drivers"
|
||||
depends on PCI
|
||||
|
||||
+config PCIE_BCM6318
|
||||
+ bool "BCM6318 PCIe controller"
|
||||
+ depends on BMIPS_GENERIC || COMPILE_TEST
|
||||
+ depends on OF
|
||||
+
|
||||
config PCIE_BCM6328
|
||||
bool "BCM6328 PCIe controller"
|
||||
depends on BMIPS_GENERIC || COMPILE_TEST
|
||||
--- a/drivers/pci/controller/Makefile
|
||||
+++ b/drivers/pci/controller/Makefile
|
||||
@@ -1,4 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
+obj-$(CONFIG_PCIE_BCM6318) += pcie-bcm6318.o
|
||||
obj-$(CONFIG_PCIE_BCM6328) += pcie-bcm6328.o
|
||||
obj-$(CONFIG_PCIE_CADENCE) += cadence/
|
||||
obj-$(CONFIG_PCI_FTPCI100) += pci-ftpci100.o
|
||||
@ -1,36 +0,0 @@
|
||||
From 5e7813e5725d79d00e0988472c306490fc48b3e1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Wed, 17 May 2023 18:21:19 +0200
|
||||
Subject: [PATCH] pci: add bcm6348-pci support
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
drivers/pci/controller/Kconfig | 5 +++++
|
||||
drivers/pci/controller/Makefile | 1 +
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
--- a/drivers/pci/controller/Kconfig
|
||||
+++ b/drivers/pci/controller/Kconfig
|
||||
@@ -3,6 +3,11 @@
|
||||
menu "PCI controller drivers"
|
||||
depends on PCI
|
||||
|
||||
+config PCI_BCM6348
|
||||
+ bool "BCM6348 PCI controller"
|
||||
+ depends on BMIPS_GENERIC || COMPILE_TEST
|
||||
+ depends on OF
|
||||
+
|
||||
config PCIE_BCM6318
|
||||
bool "BCM6318 PCIe controller"
|
||||
depends on BMIPS_GENERIC || COMPILE_TEST
|
||||
--- a/drivers/pci/controller/Makefile
|
||||
+++ b/drivers/pci/controller/Makefile
|
||||
@@ -1,4 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
+obj-$(CONFIG_PCI_BCM6348) += pci-bcm6348.o
|
||||
obj-$(CONFIG_PCIE_BCM6318) += pcie-bcm6318.o
|
||||
obj-$(CONFIG_PCIE_BCM6328) += pcie-bcm6328.o
|
||||
obj-$(CONFIG_PCIE_CADENCE) += cadence/
|
||||
@ -1,45 +0,0 @@
|
||||
From 1a5f2263d388016c88d39e141c7eb8085c9313fc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Wed, 5 Apr 2023 08:07:00 +0200
|
||||
Subject: [PATCH] leds: add support for Sercomm MSP430 LED controller
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Sercomm added an external MSP430G2513 for controlling LEDs through SPI on some
|
||||
boards.
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
drivers/leds/Kconfig | 9 +++++++++
|
||||
drivers/leds/Makefile | 1 +
|
||||
2 files changed, 10 insertions(+)
|
||||
|
||||
--- a/drivers/leds/Kconfig
|
||||
+++ b/drivers/leds/Kconfig
|
||||
@@ -289,6 +289,15 @@ config LEDS_COBALT_RAQ
|
||||
help
|
||||
This option enables support for the Cobalt Raq series LEDs.
|
||||
|
||||
+config LEDS_SERCOMM_MSP430
|
||||
+ tristate "LED support for Sercomm MSP430 SPI LED controllers"
|
||||
+ depends on LEDS_CLASS
|
||||
+ depends on SPI
|
||||
+ depends on OF
|
||||
+ help
|
||||
+ This option enables support for the Sercomm MSP430G2513 SPI LED
|
||||
+ controllers.
|
||||
+
|
||||
config LEDS_SUNFIRE
|
||||
tristate "LED support for SunFire servers."
|
||||
depends on LEDS_CLASS
|
||||
--- a/drivers/leds/Makefile
|
||||
+++ b/drivers/leds/Makefile
|
||||
@@ -77,6 +77,7 @@ obj-$(CONFIG_LEDS_PWM) += leds-pwm.o
|
||||
obj-$(CONFIG_LEDS_REGULATOR) += leds-regulator.o
|
||||
obj-$(CONFIG_LEDS_S3C24XX) += leds-s3c24xx.o
|
||||
obj-$(CONFIG_LEDS_SC27XX_BLTC) += leds-sc27xx-bltc.o
|
||||
+obj-$(CONFIG_LEDS_SERCOMM_MSP430) += leds-sercomm-msp430.o
|
||||
obj-$(CONFIG_LEDS_SUNFIRE) += leds-sunfire.o
|
||||
obj-$(CONFIG_LEDS_SYSCON) += leds-syscon.o
|
||||
obj-$(CONFIG_LEDS_TCA6507) += leds-tca6507.o
|
||||
@ -1,26 +0,0 @@
|
||||
From ff3409ab17d56450943364ba49a16960e3cdda9b Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jogo@openwrt.org>
|
||||
Date: Sun, 6 Apr 2014 22:33:16 +0200
|
||||
Subject: [RFC] jffs2: work around unaligned accesses failing on bcm63xx/smp
|
||||
|
||||
Unligned memcpy_fromio randomly fails with an unaligned dst. Work around
|
||||
it by ensuring we are always doing aligned copies.
|
||||
|
||||
Should fix filename corruption in jffs2 with SMP.
|
||||
|
||||
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
---
|
||||
fs/jffs2/nodelist.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/fs/jffs2/nodelist.h
|
||||
+++ b/fs/jffs2/nodelist.h
|
||||
@@ -259,7 +259,7 @@ struct jffs2_full_dirent
|
||||
uint32_t ino; /* == zero for unlink */
|
||||
unsigned int nhash;
|
||||
unsigned char type;
|
||||
- unsigned char name[];
|
||||
+ unsigned char name[] __attribute__((aligned((sizeof(long)))));
|
||||
};
|
||||
|
||||
/*
|
||||
@ -0,0 +1,58 @@
|
||||
From e2192de59e457aef8d1f055a452131f0b3e5d097 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Wed, 18 Jan 2023 14:26:53 +0100
|
||||
Subject: [PATCH] bitfield: add FIELD_PREP_CONST()
|
||||
|
||||
Neither FIELD_PREP() nor *_encode_bits() can be used
|
||||
in constant contexts (such as initializers), but we
|
||||
don't want to define shift constants for all masks
|
||||
just for use in initializers, and having checks that
|
||||
the values fit is also useful.
|
||||
|
||||
Therefore, add FIELD_PREP_CONST() which is a smaller
|
||||
version of FIELD_PREP() that can only take constant
|
||||
arguments and has less friendly (but not less strict)
|
||||
error checks, and expands to a constant value.
|
||||
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Link: https://lore.kernel.org/r/20230118142652.53f20593504b.Iaeea0aee77a6493d70e573b4aa55c91c00e01e4b@changeid
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
include/linux/bitfield.h | 26 ++++++++++++++++++++++++++
|
||||
1 file changed, 26 insertions(+)
|
||||
|
||||
--- a/include/linux/bitfield.h
|
||||
+++ b/include/linux/bitfield.h
|
||||
@@ -115,6 +115,32 @@
|
||||
((typeof(_mask))(_val) << __bf_shf(_mask)) & (_mask); \
|
||||
})
|
||||
|
||||
+#define __BF_CHECK_POW2(n) BUILD_BUG_ON_ZERO(((n) & ((n) - 1)) != 0)
|
||||
+
|
||||
+/**
|
||||
+ * FIELD_PREP_CONST() - prepare a constant bitfield element
|
||||
+ * @_mask: shifted mask defining the field's length and position
|
||||
+ * @_val: value to put in the field
|
||||
+ *
|
||||
+ * FIELD_PREP_CONST() masks and shifts up the value. The result should
|
||||
+ * be combined with other fields of the bitfield using logical OR.
|
||||
+ *
|
||||
+ * Unlike FIELD_PREP() this is a constant expression and can therefore
|
||||
+ * be used in initializers. Error checking is less comfortable for this
|
||||
+ * version, and non-constant masks cannot be used.
|
||||
+ */
|
||||
+#define FIELD_PREP_CONST(_mask, _val) \
|
||||
+ ( \
|
||||
+ /* mask must be non-zero */ \
|
||||
+ BUILD_BUG_ON_ZERO((_mask) == 0) + \
|
||||
+ /* check if value fits */ \
|
||||
+ BUILD_BUG_ON_ZERO(~((_mask) >> __bf_shf(_mask)) & (_val)) + \
|
||||
+ /* check if mask is contiguous */ \
|
||||
+ __BF_CHECK_POW2((_mask) + (1ULL << __bf_shf(_mask))) + \
|
||||
+ /* and create the value */ \
|
||||
+ (((typeof(_mask))(_val) << __bf_shf(_mask)) & (_mask)) \
|
||||
+ )
|
||||
+
|
||||
/**
|
||||
* FIELD_GET() - extract a bitfield element
|
||||
* @_mask: shifted mask defining the field's length and position
|
||||
@ -0,0 +1,326 @@
|
||||
From 4e4aafcddbbfcdd6eed5780e190fcbfac8b4685a Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Lunn <andrew@lunn.ch>
|
||||
Date: Mon, 9 Jan 2023 16:30:41 +0100
|
||||
Subject: [PATCH] net: mdio: Add dedicated C45 API to MDIO bus drivers
|
||||
|
||||
Currently C22 and C45 transactions are mixed over a combined API calls
|
||||
which make use of a special bit in the reg address to indicate if a
|
||||
C45 transaction should be performed. This makes it impossible to know
|
||||
if the bus driver actually supports C45. Additionally, many C22 only
|
||||
drivers don't return -EOPNOTSUPP when asked to perform a C45
|
||||
transaction, they mistaking perform a C22 transaction.
|
||||
|
||||
This is the first step to cleanly separate C22 from C45. To maintain
|
||||
backwards compatibility until all drivers which are capable of
|
||||
performing C45 are converted to this new API, the helper functions
|
||||
will fall back to the older API if the new API is not
|
||||
supported. Eventually this fallback will be removed.
|
||||
|
||||
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: Michael Walle <michael@walle.cc>
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/phy/mdio_bus.c | 189 +++++++++++++++++++++++++++++++++++++
|
||||
include/linux/mdio.h | 39 ++++----
|
||||
include/linux/phy.h | 5 +
|
||||
3 files changed, 214 insertions(+), 19 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/mdio_bus.c
|
||||
+++ b/drivers/net/phy/mdio_bus.c
|
||||
@@ -832,6 +832,100 @@ int __mdiobus_modify_changed(struct mii_
|
||||
EXPORT_SYMBOL_GPL(__mdiobus_modify_changed);
|
||||
|
||||
/**
|
||||
+ * __mdiobus_c45_read - Unlocked version of the mdiobus_c45_read function
|
||||
+ * @bus: the mii_bus struct
|
||||
+ * @addr: the phy address
|
||||
+ * @devad: device address to read
|
||||
+ * @regnum: register number to read
|
||||
+ *
|
||||
+ * Read a MDIO bus register. Caller must hold the mdio bus lock.
|
||||
+ *
|
||||
+ * NOTE: MUST NOT be called from interrupt context.
|
||||
+ */
|
||||
+int __mdiobus_c45_read(struct mii_bus *bus, int addr, int devad, u32 regnum)
|
||||
+{
|
||||
+ int retval;
|
||||
+
|
||||
+ lockdep_assert_held_once(&bus->mdio_lock);
|
||||
+
|
||||
+ if (bus->read_c45)
|
||||
+ retval = bus->read_c45(bus, addr, devad, regnum);
|
||||
+ else
|
||||
+ retval = bus->read(bus, addr, mdiobus_c45_addr(devad, regnum));
|
||||
+
|
||||
+ trace_mdio_access(bus, 1, addr, regnum, retval, retval);
|
||||
+ mdiobus_stats_acct(&bus->stats[addr], true, retval);
|
||||
+
|
||||
+ return retval;
|
||||
+}
|
||||
+EXPORT_SYMBOL(__mdiobus_c45_read);
|
||||
+
|
||||
+/**
|
||||
+ * __mdiobus_c45_write - Unlocked version of the mdiobus_write function
|
||||
+ * @bus: the mii_bus struct
|
||||
+ * @addr: the phy address
|
||||
+ * @devad: device address to read
|
||||
+ * @regnum: register number to write
|
||||
+ * @val: value to write to @regnum
|
||||
+ *
|
||||
+ * Write a MDIO bus register. Caller must hold the mdio bus lock.
|
||||
+ *
|
||||
+ * NOTE: MUST NOT be called from interrupt context.
|
||||
+ */
|
||||
+int __mdiobus_c45_write(struct mii_bus *bus, int addr, int devad, u32 regnum,
|
||||
+ u16 val)
|
||||
+{
|
||||
+ int err;
|
||||
+
|
||||
+ lockdep_assert_held_once(&bus->mdio_lock);
|
||||
+
|
||||
+ if (bus->write_c45)
|
||||
+ err = bus->write_c45(bus, addr, devad, regnum, val);
|
||||
+ else
|
||||
+ err = bus->write(bus, addr, mdiobus_c45_addr(devad, regnum),
|
||||
+ val);
|
||||
+
|
||||
+ trace_mdio_access(bus, 0, addr, regnum, val, err);
|
||||
+ mdiobus_stats_acct(&bus->stats[addr], false, err);
|
||||
+
|
||||
+ return err;
|
||||
+}
|
||||
+EXPORT_SYMBOL(__mdiobus_c45_write);
|
||||
+
|
||||
+/**
|
||||
+ * __mdiobus_c45_modify_changed - Unlocked version of the mdiobus_modify function
|
||||
+ * @bus: the mii_bus struct
|
||||
+ * @addr: the phy address
|
||||
+ * @devad: device address to read
|
||||
+ * @regnum: register number to modify
|
||||
+ * @mask: bit mask of bits to clear
|
||||
+ * @set: bit mask of bits to set
|
||||
+ *
|
||||
+ * Read, modify, and if any change, write the register value back to the
|
||||
+ * device. Any error returns a negative number.
|
||||
+ *
|
||||
+ * NOTE: MUST NOT be called from interrupt context.
|
||||
+ */
|
||||
+static int __mdiobus_c45_modify_changed(struct mii_bus *bus, int addr,
|
||||
+ int devad, u32 regnum, u16 mask,
|
||||
+ u16 set)
|
||||
+{
|
||||
+ int new, ret;
|
||||
+
|
||||
+ ret = __mdiobus_c45_read(bus, addr, devad, regnum);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ new = (ret & ~mask) | set;
|
||||
+ if (new == ret)
|
||||
+ return 0;
|
||||
+
|
||||
+ ret = __mdiobus_c45_write(bus, addr, devad, regnum, new);
|
||||
+
|
||||
+ return ret < 0 ? ret : 1;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
* mdiobus_read_nested - Nested version of the mdiobus_read function
|
||||
* @bus: the mii_bus struct
|
||||
* @addr: the phy address
|
||||
@@ -879,6 +973,29 @@ int mdiobus_read(struct mii_bus *bus, in
|
||||
EXPORT_SYMBOL(mdiobus_read);
|
||||
|
||||
/**
|
||||
+ * mdiobus_c45_read - Convenience function for reading a given MII mgmt register
|
||||
+ * @bus: the mii_bus struct
|
||||
+ * @addr: the phy address
|
||||
+ * @devad: device address to read
|
||||
+ * @regnum: register number to read
|
||||
+ *
|
||||
+ * NOTE: MUST NOT be called from interrupt context,
|
||||
+ * because the bus read/write functions may wait for an interrupt
|
||||
+ * to conclude the operation.
|
||||
+ */
|
||||
+int mdiobus_c45_read(struct mii_bus *bus, int addr, int devad, u32 regnum)
|
||||
+{
|
||||
+ int retval;
|
||||
+
|
||||
+ mutex_lock(&bus->mdio_lock);
|
||||
+ retval = __mdiobus_c45_read(bus, addr, devad, regnum);
|
||||
+ mutex_unlock(&bus->mdio_lock);
|
||||
+
|
||||
+ return retval;
|
||||
+}
|
||||
+EXPORT_SYMBOL(mdiobus_c45_read);
|
||||
+
|
||||
+/**
|
||||
* mdiobus_write_nested - Nested version of the mdiobus_write function
|
||||
* @bus: the mii_bus struct
|
||||
* @addr: the phy address
|
||||
@@ -928,6 +1045,31 @@ int mdiobus_write(struct mii_bus *bus, i
|
||||
EXPORT_SYMBOL(mdiobus_write);
|
||||
|
||||
/**
|
||||
+ * mdiobus_c45_write - Convenience function for writing a given MII mgmt register
|
||||
+ * @bus: the mii_bus struct
|
||||
+ * @addr: the phy address
|
||||
+ * @devad: device address to read
|
||||
+ * @regnum: register number to write
|
||||
+ * @val: value to write to @regnum
|
||||
+ *
|
||||
+ * NOTE: MUST NOT be called from interrupt context,
|
||||
+ * because the bus read/write functions may wait for an interrupt
|
||||
+ * to conclude the operation.
|
||||
+ */
|
||||
+int mdiobus_c45_write(struct mii_bus *bus, int addr, int devad, u32 regnum,
|
||||
+ u16 val)
|
||||
+{
|
||||
+ int err;
|
||||
+
|
||||
+ mutex_lock(&bus->mdio_lock);
|
||||
+ err = __mdiobus_c45_write(bus, addr, devad, regnum, val);
|
||||
+ mutex_unlock(&bus->mdio_lock);
|
||||
+
|
||||
+ return err;
|
||||
+}
|
||||
+EXPORT_SYMBOL(mdiobus_c45_write);
|
||||
+
|
||||
+/**
|
||||
* mdiobus_modify - Convenience function for modifying a given mdio device
|
||||
* register
|
||||
* @bus: the mii_bus struct
|
||||
@@ -949,6 +1091,30 @@ int mdiobus_modify(struct mii_bus *bus,
|
||||
EXPORT_SYMBOL_GPL(mdiobus_modify);
|
||||
|
||||
/**
|
||||
+ * mdiobus_c45_modify - Convenience function for modifying a given mdio device
|
||||
+ * register
|
||||
+ * @bus: the mii_bus struct
|
||||
+ * @addr: the phy address
|
||||
+ * @devad: device address to read
|
||||
+ * @regnum: register number to write
|
||||
+ * @mask: bit mask of bits to clear
|
||||
+ * @set: bit mask of bits to set
|
||||
+ */
|
||||
+int mdiobus_c45_modify(struct mii_bus *bus, int addr, int devad, u32 regnum,
|
||||
+ u16 mask, u16 set)
|
||||
+{
|
||||
+ int err;
|
||||
+
|
||||
+ mutex_lock(&bus->mdio_lock);
|
||||
+ err = __mdiobus_c45_modify_changed(bus, addr, devad, regnum,
|
||||
+ mask, set);
|
||||
+ mutex_unlock(&bus->mdio_lock);
|
||||
+
|
||||
+ return err < 0 ? err : 0;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(mdiobus_c45_modify);
|
||||
+
|
||||
+/**
|
||||
* mdiobus_modify_changed - Convenience function for modifying a given mdio
|
||||
* device register and returning if it changed
|
||||
* @bus: the mii_bus struct
|
||||
@@ -971,6 +1137,29 @@ int mdiobus_modify_changed(struct mii_bu
|
||||
EXPORT_SYMBOL_GPL(mdiobus_modify_changed);
|
||||
|
||||
/**
|
||||
+ * mdiobus_c45_modify_changed - Convenience function for modifying a given mdio
|
||||
+ * device register and returning if it changed
|
||||
+ * @bus: the mii_bus struct
|
||||
+ * @addr: the phy address
|
||||
+ * @devad: device address to read
|
||||
+ * @regnum: register number to write
|
||||
+ * @mask: bit mask of bits to clear
|
||||
+ * @set: bit mask of bits to set
|
||||
+ */
|
||||
+int mdiobus_c45_modify_changed(struct mii_bus *bus, int devad, int addr,
|
||||
+ u32 regnum, u16 mask, u16 set)
|
||||
+{
|
||||
+ int err;
|
||||
+
|
||||
+ mutex_lock(&bus->mdio_lock);
|
||||
+ err = __mdiobus_c45_modify_changed(bus, addr, devad, regnum, mask, set);
|
||||
+ mutex_unlock(&bus->mdio_lock);
|
||||
+
|
||||
+ return err;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(mdiobus_c45_modify_changed);
|
||||
+
|
||||
+/**
|
||||
* mdio_bus_match - determine if given MDIO driver supports the given
|
||||
* MDIO device
|
||||
* @dev: target MDIO device
|
||||
--- a/include/linux/mdio.h
|
||||
+++ b/include/linux/mdio.h
|
||||
@@ -423,6 +423,17 @@ int mdiobus_modify(struct mii_bus *bus,
|
||||
u16 set);
|
||||
int mdiobus_modify_changed(struct mii_bus *bus, int addr, u32 regnum,
|
||||
u16 mask, u16 set);
|
||||
+int __mdiobus_c45_read(struct mii_bus *bus, int addr, int devad, u32 regnum);
|
||||
+int mdiobus_c45_read(struct mii_bus *bus, int addr, int devad, u32 regnum);
|
||||
+int __mdiobus_c45_write(struct mii_bus *bus, int addr, int devad, u32 regnum,
|
||||
+ u16 val);
|
||||
+int mdiobus_c45_write(struct mii_bus *bus, int addr, int devad, u32 regnum,
|
||||
+ u16 val);
|
||||
+int mdiobus_c45_modify(struct mii_bus *bus, int addr, int devad, u32 regnum,
|
||||
+ u16 mask, u16 set);
|
||||
+
|
||||
+int mdiobus_c45_modify_changed(struct mii_bus *bus, int addr, int devad,
|
||||
+ u32 regnum, u16 mask, u16 set);
|
||||
|
||||
static inline int mdiodev_read(struct mdio_device *mdiodev, u32 regnum)
|
||||
{
|
||||
@@ -463,29 +474,19 @@ static inline u16 mdiobus_c45_devad(u32
|
||||
return FIELD_GET(MII_DEVADDR_C45_MASK, regnum);
|
||||
}
|
||||
|
||||
-static inline int __mdiobus_c45_read(struct mii_bus *bus, int prtad, int devad,
|
||||
- u16 regnum)
|
||||
-{
|
||||
- return __mdiobus_read(bus, prtad, mdiobus_c45_addr(devad, regnum));
|
||||
-}
|
||||
-
|
||||
-static inline int __mdiobus_c45_write(struct mii_bus *bus, int prtad, int devad,
|
||||
- u16 regnum, u16 val)
|
||||
-{
|
||||
- return __mdiobus_write(bus, prtad, mdiobus_c45_addr(devad, regnum),
|
||||
- val);
|
||||
-}
|
||||
-
|
||||
-static inline int mdiobus_c45_read(struct mii_bus *bus, int prtad, int devad,
|
||||
- u16 regnum)
|
||||
+static inline int mdiodev_c45_modify(struct mdio_device *mdiodev, int devad,
|
||||
+ u32 regnum, u16 mask, u16 set)
|
||||
{
|
||||
- return mdiobus_read(bus, prtad, mdiobus_c45_addr(devad, regnum));
|
||||
+ return mdiobus_c45_modify(mdiodev->bus, mdiodev->addr, devad, regnum,
|
||||
+ mask, set);
|
||||
}
|
||||
|
||||
-static inline int mdiobus_c45_write(struct mii_bus *bus, int prtad, int devad,
|
||||
- u16 regnum, u16 val)
|
||||
+static inline int mdiodev_c45_modify_changed(struct mdio_device *mdiodev,
|
||||
+ int devad, u32 regnum, u16 mask,
|
||||
+ u16 set)
|
||||
{
|
||||
- return mdiobus_write(bus, prtad, mdiobus_c45_addr(devad, regnum), val);
|
||||
+ return mdiobus_c45_modify_changed(mdiodev->bus, mdiodev->addr, devad,
|
||||
+ regnum, mask, set);
|
||||
}
|
||||
|
||||
int mdiobus_register_device(struct mdio_device *mdiodev);
|
||||
--- a/include/linux/phy.h
|
||||
+++ b/include/linux/phy.h
|
||||
@@ -364,6 +364,11 @@ struct mii_bus {
|
||||
int (*read)(struct mii_bus *bus, int addr, int regnum);
|
||||
/** @write: Perform a write transfer on the bus */
|
||||
int (*write)(struct mii_bus *bus, int addr, int regnum, u16 val);
|
||||
+ /** @read_c45: Perform a C45 read transfer on the bus */
|
||||
+ int (*read_c45)(struct mii_bus *bus, int addr, int devnum, int regnum);
|
||||
+ /** @write_c45: Perform a C45 write transfer on the bus */
|
||||
+ int (*write_c45)(struct mii_bus *bus, int addr, int devnum,
|
||||
+ int regnum, u16 val);
|
||||
/** @reset: Perform a reset of the bus */
|
||||
int (*reset)(struct mii_bus *bus);
|
||||
|
||||
@ -52,7 +52,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
return 0;
|
||||
--- a/drivers/net/phy/phylink.c
|
||||
+++ b/drivers/net/phy/phylink.c
|
||||
@@ -192,6 +192,7 @@ static int phylink_interface_max_speed(p
|
||||
@@ -187,6 +187,7 @@ static int phylink_interface_max_speed(p
|
||||
case PHY_INTERFACE_MODE_RGMII_RXID:
|
||||
case PHY_INTERFACE_MODE_RGMII_ID:
|
||||
case PHY_INTERFACE_MODE_RGMII:
|
||||
@ -60,7 +60,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
case PHY_INTERFACE_MODE_QSGMII:
|
||||
case PHY_INTERFACE_MODE_QUSGMII:
|
||||
case PHY_INTERFACE_MODE_SGMII:
|
||||
@@ -453,6 +454,7 @@ unsigned long phylink_get_capabilities(p
|
||||
@@ -448,6 +449,7 @@ unsigned long phylink_get_capabilities(p
|
||||
case PHY_INTERFACE_MODE_RGMII_RXID:
|
||||
case PHY_INTERFACE_MODE_RGMII_ID:
|
||||
case PHY_INTERFACE_MODE_RGMII:
|
||||
@ -68,7 +68,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
case PHY_INTERFACE_MODE_QSGMII:
|
||||
case PHY_INTERFACE_MODE_QUSGMII:
|
||||
case PHY_INTERFACE_MODE_SGMII:
|
||||
@@ -819,6 +821,7 @@ static int phylink_parse_mode(struct phy
|
||||
@@ -814,6 +816,7 @@ static int phylink_parse_mode(struct phy
|
||||
|
||||
switch (pl->link_config.interface) {
|
||||
case PHY_INTERFACE_MODE_SGMII:
|
||||
@ -78,7 +78,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
case PHY_INTERFACE_MODE_RGMII:
|
||||
--- a/include/linux/phy.h
|
||||
+++ b/include/linux/phy.h
|
||||
@@ -104,6 +104,7 @@ extern const int phy_10gbit_features_arr
|
||||
@@ -103,6 +103,7 @@ extern const int phy_10gbit_features_arr
|
||||
* @PHY_INTERFACE_MODE_XGMII: 10 gigabit media-independent interface
|
||||
* @PHY_INTERFACE_MODE_XLGMII:40 gigabit media-independent interface
|
||||
* @PHY_INTERFACE_MODE_MOCA: Multimedia over Coax
|
||||
@ -86,7 +86,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
* @PHY_INTERFACE_MODE_QSGMII: Quad SGMII
|
||||
* @PHY_INTERFACE_MODE_TRGMII: Turbo RGMII
|
||||
* @PHY_INTERFACE_MODE_100BASEX: 100 BaseX
|
||||
@@ -141,6 +142,7 @@ typedef enum {
|
||||
@@ -140,6 +141,7 @@ typedef enum {
|
||||
PHY_INTERFACE_MODE_XGMII,
|
||||
PHY_INTERFACE_MODE_XLGMII,
|
||||
PHY_INTERFACE_MODE_MOCA,
|
||||
@ -94,7 +94,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
PHY_INTERFACE_MODE_QSGMII,
|
||||
PHY_INTERFACE_MODE_TRGMII,
|
||||
PHY_INTERFACE_MODE_100BASEX,
|
||||
@@ -248,6 +250,8 @@ static inline const char *phy_modes(phy_
|
||||
@@ -247,6 +249,8 @@ static inline const char *phy_modes(phy_
|
||||
return "xlgmii";
|
||||
case PHY_INTERFACE_MODE_MOCA:
|
||||
return "moca";
|
||||
@ -0,0 +1,32 @@
|
||||
From a593a2fcfdfb92cfd0ffc54bc81b07e6bfaaaf46 Mon Sep 17 00:00:00 2001
|
||||
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
||||
Date: Thu, 16 Mar 2023 14:08:26 +0200
|
||||
Subject: [PATCH] net: phy: at803x: Replace of_gpio.h with what indeed is used
|
||||
|
||||
of_gpio.h in this driver is solely used as a proxy to other headers.
|
||||
This is incorrect usage of the of_gpio.h. Replace it .h with what
|
||||
indeed is used in the code.
|
||||
|
||||
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -13,12 +13,11 @@
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/ethtool_netlink.h>
|
||||
-#include <linux/of_gpio.h>
|
||||
#include <linux/bitfield.h>
|
||||
-#include <linux/gpio/consumer.h>
|
||||
#include <linux/regulator/of_regulator.h>
|
||||
#include <linux/regulator/driver.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
+#include <linux/of.h>
|
||||
#include <linux/phylink.h>
|
||||
#include <linux/sfp.h>
|
||||
#include <dt-bindings/net/qca-ar803x.h>
|
||||
@ -0,0 +1,70 @@
|
||||
From 8b8bc13d89a7d23d14b0e041c73f037c9db997b1 Mon Sep 17 00:00:00 2001
|
||||
From: Luo Jie <quic_luoj@quicinc.com>
|
||||
Date: Sun, 16 Jul 2023 16:49:19 +0800
|
||||
Subject: [PATCH 1/6] net: phy: at803x: support qca8081
|
||||
genphy_c45_pma_read_abilities
|
||||
|
||||
qca8081 PHY supports to use genphy_c45_pma_read_abilities for
|
||||
getting the PHY features supported except for the autoneg ability
|
||||
|
||||
but autoneg ability exists in MDIO_STAT1 instead of MMD7.1, add it
|
||||
manually after calling genphy_c45_pma_read_abilities.
|
||||
|
||||
Signed-off-by: Luo Jie <quic_luoj@quicinc.com>
|
||||
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 28 ++++++++++++++++++----------
|
||||
1 file changed, 18 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -902,15 +902,6 @@ static int at803x_get_features(struct ph
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
- if (phydev->drv->phy_id == QCA8081_PHY_ID) {
|
||||
- err = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_PMA_NG_EXTABLE);
|
||||
- if (err < 0)
|
||||
- return err;
|
||||
-
|
||||
- linkmode_mod_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT, phydev->supported,
|
||||
- err & MDIO_PMA_NG_EXTABLE_2_5GBT);
|
||||
- }
|
||||
-
|
||||
if (phydev->drv->phy_id != ATH8031_PHY_ID)
|
||||
return 0;
|
||||
|
||||
@@ -1996,6 +1987,23 @@ static int qca808x_cable_test_get_status
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int qca808x_get_features(struct phy_device *phydev)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = genphy_c45_pma_read_abilities(phydev);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* The autoneg ability is not existed in bit3 of MMD7.1,
|
||||
+ * but it is supported by qca808x PHY, so we add it here
|
||||
+ * manually.
|
||||
+ */
|
||||
+ linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, phydev->supported);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static struct phy_driver at803x_driver[] = {
|
||||
{
|
||||
/* Qualcomm Atheros AR8035 */
|
||||
@@ -2163,7 +2171,7 @@ static struct phy_driver at803x_driver[]
|
||||
.set_tunable = at803x_set_tunable,
|
||||
.set_wol = at803x_set_wol,
|
||||
.get_wol = at803x_get_wol,
|
||||
- .get_features = at803x_get_features,
|
||||
+ .get_features = qca808x_get_features,
|
||||
.config_aneg = at803x_config_aneg,
|
||||
.suspend = genphy_suspend,
|
||||
.resume = genphy_resume,
|
||||
@ -0,0 +1,73 @@
|
||||
From f3db55ae860a82e1224a909072783ef850e5d228 Mon Sep 17 00:00:00 2001
|
||||
From: Luo Jie <quic_luoj@quicinc.com>
|
||||
Date: Sun, 16 Jul 2023 16:49:20 +0800
|
||||
Subject: [PATCH 2/6] net: phy: at803x: merge qca8081 slave seed function
|
||||
|
||||
merge the seed enablement and seed value configuration into
|
||||
one function, since the random seed value is needed to be
|
||||
configured when the seed is enabled.
|
||||
|
||||
Signed-off-by: Luo Jie <quic_luoj@quicinc.com>
|
||||
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 29 +++++++++--------------------
|
||||
1 file changed, 9 insertions(+), 20 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -1730,24 +1730,19 @@ static int qca808x_phy_fast_retrain_conf
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int qca808x_phy_ms_random_seed_set(struct phy_device *phydev)
|
||||
-{
|
||||
- u16 seed_value = prandom_u32_max(QCA808X_MASTER_SLAVE_SEED_RANGE);
|
||||
-
|
||||
- return at803x_debug_reg_mask(phydev, QCA808X_PHY_DEBUG_LOCAL_SEED,
|
||||
- QCA808X_MASTER_SLAVE_SEED_CFG,
|
||||
- FIELD_PREP(QCA808X_MASTER_SLAVE_SEED_CFG, seed_value));
|
||||
-}
|
||||
-
|
||||
static int qca808x_phy_ms_seed_enable(struct phy_device *phydev, bool enable)
|
||||
{
|
||||
- u16 seed_enable = 0;
|
||||
+ u16 seed_value;
|
||||
|
||||
- if (enable)
|
||||
- seed_enable = QCA808X_MASTER_SLAVE_SEED_ENABLE;
|
||||
+ if (!enable)
|
||||
+ return at803x_debug_reg_mask(phydev, QCA808X_PHY_DEBUG_LOCAL_SEED,
|
||||
+ QCA808X_MASTER_SLAVE_SEED_ENABLE, 0);
|
||||
|
||||
+ seed_value = prandom_u32_max(QCA808X_MASTER_SLAVE_SEED_RANGE);
|
||||
return at803x_debug_reg_mask(phydev, QCA808X_PHY_DEBUG_LOCAL_SEED,
|
||||
- QCA808X_MASTER_SLAVE_SEED_ENABLE, seed_enable);
|
||||
+ QCA808X_MASTER_SLAVE_SEED_CFG | QCA808X_MASTER_SLAVE_SEED_ENABLE,
|
||||
+ FIELD_PREP(QCA808X_MASTER_SLAVE_SEED_CFG, seed_value) |
|
||||
+ QCA808X_MASTER_SLAVE_SEED_ENABLE);
|
||||
}
|
||||
|
||||
static int qca808x_config_init(struct phy_device *phydev)
|
||||
@@ -1771,12 +1766,7 @@ static int qca808x_config_init(struct ph
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- /* Configure lower ramdom seed to make phy linked as slave mode */
|
||||
- ret = qca808x_phy_ms_random_seed_set(phydev);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
-
|
||||
- /* Enable seed */
|
||||
+ /* Enable seed and configure lower ramdom seed to make phy linked as slave mode */
|
||||
ret = qca808x_phy_ms_seed_enable(phydev, true);
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -1821,7 +1811,6 @@ static int qca808x_read_status(struct ph
|
||||
if (phydev->master_slave_state == MASTER_SLAVE_STATE_ERR) {
|
||||
qca808x_phy_ms_seed_enable(phydev, false);
|
||||
} else {
|
||||
- qca808x_phy_ms_random_seed_set(phydev);
|
||||
qca808x_phy_ms_seed_enable(phydev, true);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
From 7cc3209558002d95c0d45a1276ba4f5f741eec42 Mon Sep 17 00:00:00 2001
|
||||
From: Luo Jie <quic_luoj@quicinc.com>
|
||||
Date: Sun, 16 Jul 2023 16:49:21 +0800
|
||||
Subject: [PATCH 3/6] net: phy: at803x: enable qca8081 slave seed conditionally
|
||||
|
||||
qca8081 is the single port PHY, the slave prefer mode is used
|
||||
by default.
|
||||
|
||||
if the phy master perfer mode is configured, the slave seed
|
||||
configuration should not be enabled, since the slave seed
|
||||
enablement is for making PHY linked as slave mode easily.
|
||||
|
||||
disable slave seed if the master mode is preferred.
|
||||
|
||||
Signed-off-by: Luo Jie <quic_luoj@quicinc.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 25 ++++++++++++++++++++-----
|
||||
1 file changed, 20 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -1745,6 +1745,12 @@ static int qca808x_phy_ms_seed_enable(st
|
||||
QCA808X_MASTER_SLAVE_SEED_ENABLE);
|
||||
}
|
||||
|
||||
+static bool qca808x_is_prefer_master(struct phy_device *phydev)
|
||||
+{
|
||||
+ return (phydev->master_slave_get == MASTER_SLAVE_CFG_MASTER_FORCE) ||
|
||||
+ (phydev->master_slave_get == MASTER_SLAVE_CFG_MASTER_PREFERRED);
|
||||
+}
|
||||
+
|
||||
static int qca808x_config_init(struct phy_device *phydev)
|
||||
{
|
||||
int ret;
|
||||
@@ -1766,11 +1772,17 @@ static int qca808x_config_init(struct ph
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- /* Enable seed and configure lower ramdom seed to make phy linked as slave mode */
|
||||
- ret = qca808x_phy_ms_seed_enable(phydev, true);
|
||||
- if (ret)
|
||||
+ ret = genphy_read_master_slave(phydev);
|
||||
+ if (ret < 0)
|
||||
return ret;
|
||||
|
||||
+ if (!qca808x_is_prefer_master(phydev)) {
|
||||
+ /* Enable seed and configure lower ramdom seed to make phy linked as slave mode */
|
||||
+ ret = qca808x_phy_ms_seed_enable(phydev, true);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
/* Configure adc threshold as 100mv for the link 10M */
|
||||
return at803x_debug_reg_mask(phydev, QCA808X_PHY_DEBUG_ADC_THRESHOLD,
|
||||
QCA808X_ADC_THRESHOLD_MASK, QCA808X_ADC_THRESHOLD_100MV);
|
||||
@@ -1802,13 +1814,16 @@ static int qca808x_read_status(struct ph
|
||||
phydev->interface = PHY_INTERFACE_MODE_SGMII;
|
||||
} else {
|
||||
/* generate seed as a lower random value to make PHY linked as SLAVE easily,
|
||||
- * except for master/slave configuration fault detected.
|
||||
+ * except for master/slave configuration fault detected or the master mode
|
||||
+ * preferred.
|
||||
+ *
|
||||
* the reason for not putting this code into the function link_change_notify is
|
||||
* the corner case where the link partner is also the qca8081 PHY and the seed
|
||||
* value is configured as the same value, the link can't be up and no link change
|
||||
* occurs.
|
||||
*/
|
||||
- if (phydev->master_slave_state == MASTER_SLAVE_STATE_ERR) {
|
||||
+ if (phydev->master_slave_state == MASTER_SLAVE_STATE_ERR ||
|
||||
+ qca808x_is_prefer_master(phydev)) {
|
||||
qca808x_phy_ms_seed_enable(phydev, false);
|
||||
} else {
|
||||
qca808x_phy_ms_seed_enable(phydev, true);
|
||||
@ -0,0 +1,48 @@
|
||||
From fea7cfb83d1a2782e39cd101dd44ed2548539de5 Mon Sep 17 00:00:00 2001
|
||||
From: Luo Jie <quic_luoj@quicinc.com>
|
||||
Date: Sun, 16 Jul 2023 16:49:22 +0800
|
||||
Subject: [PATCH 4/6] net: phy: at803x: support qca8081 1G chip type
|
||||
|
||||
The qca8081 1G chip version does not support 2.5 capability, which
|
||||
is distinguished from qca8081 2.5G chip according to the bit0 of
|
||||
register mmd7.0x901d, the 1G version chip also has the same PHY ID
|
||||
as the normal qca8081 2.5G chip.
|
||||
|
||||
Signed-off-by: Luo Jie <quic_luoj@quicinc.com>
|
||||
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -272,6 +272,10 @@
|
||||
#define QCA808X_CDT_STATUS_STAT_OPEN 2
|
||||
#define QCA808X_CDT_STATUS_STAT_SHORT 3
|
||||
|
||||
+/* QCA808X 1G chip type */
|
||||
+#define QCA808X_PHY_MMD7_CHIP_TYPE 0x901d
|
||||
+#define QCA808X_PHY_CHIP_TYPE_1G BIT(0)
|
||||
+
|
||||
MODULE_DESCRIPTION("Qualcomm Atheros AR803x and QCA808X PHY driver");
|
||||
MODULE_AUTHOR("Matus Ujhelyi");
|
||||
MODULE_LICENSE("GPL");
|
||||
@@ -2005,6 +2009,17 @@ static int qca808x_get_features(struct p
|
||||
*/
|
||||
linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, phydev->supported);
|
||||
|
||||
+ /* As for the qca8081 1G version chip, the 2500baseT ability is also
|
||||
+ * existed in the bit0 of MMD1.21, we need to remove it manually if
|
||||
+ * it is the qca8081 1G chip according to the bit0 of MMD7.0x901d.
|
||||
+ */
|
||||
+ ret = phy_read_mmd(phydev, MDIO_MMD_AN, QCA808X_PHY_MMD7_CHIP_TYPE);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ if (QCA808X_PHY_CHIP_TYPE_1G & ret)
|
||||
+ linkmode_clear_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT, phydev->supported);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -0,0 +1,98 @@
|
||||
From df9401ff3e6eeaa42bfb06761967f1b71f5afce7 Mon Sep 17 00:00:00 2001
|
||||
From: Luo Jie <quic_luoj@quicinc.com>
|
||||
Date: Sun, 16 Jul 2023 16:49:23 +0800
|
||||
Subject: [PATCH 5/6] net: phy: at803x: remove qca8081 1G fast retrain and
|
||||
slave seed config
|
||||
|
||||
The fast retrain and slave seed configs are only applicable when the 2.5G
|
||||
ability is supported.
|
||||
|
||||
Signed-off-by: Luo Jie <quic_luoj@quicinc.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 50 +++++++++++++++++++++++++---------------
|
||||
1 file changed, 32 insertions(+), 18 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -1755,6 +1755,11 @@ static bool qca808x_is_prefer_master(str
|
||||
(phydev->master_slave_get == MASTER_SLAVE_CFG_MASTER_PREFERRED);
|
||||
}
|
||||
|
||||
+static bool qca808x_has_fast_retrain_or_slave_seed(struct phy_device *phydev)
|
||||
+{
|
||||
+ return linkmode_test_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT, phydev->supported);
|
||||
+}
|
||||
+
|
||||
static int qca808x_config_init(struct phy_device *phydev)
|
||||
{
|
||||
int ret;
|
||||
@@ -1771,20 +1776,24 @@ static int qca808x_config_init(struct ph
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- /* Config the fast retrain for the link 2500M */
|
||||
- ret = qca808x_phy_fast_retrain_config(phydev);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
-
|
||||
- ret = genphy_read_master_slave(phydev);
|
||||
- if (ret < 0)
|
||||
- return ret;
|
||||
-
|
||||
- if (!qca808x_is_prefer_master(phydev)) {
|
||||
- /* Enable seed and configure lower ramdom seed to make phy linked as slave mode */
|
||||
- ret = qca808x_phy_ms_seed_enable(phydev, true);
|
||||
+ if (qca808x_has_fast_retrain_or_slave_seed(phydev)) {
|
||||
+ /* Config the fast retrain for the link 2500M */
|
||||
+ ret = qca808x_phy_fast_retrain_config(phydev);
|
||||
if (ret)
|
||||
return ret;
|
||||
+
|
||||
+ ret = genphy_read_master_slave(phydev);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ if (!qca808x_is_prefer_master(phydev)) {
|
||||
+ /* Enable seed and configure lower ramdom seed to make phy
|
||||
+ * linked as slave mode.
|
||||
+ */
|
||||
+ ret = qca808x_phy_ms_seed_enable(phydev, true);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Configure adc threshold as 100mv for the link 10M */
|
||||
@@ -1826,11 +1835,13 @@ static int qca808x_read_status(struct ph
|
||||
* value is configured as the same value, the link can't be up and no link change
|
||||
* occurs.
|
||||
*/
|
||||
- if (phydev->master_slave_state == MASTER_SLAVE_STATE_ERR ||
|
||||
- qca808x_is_prefer_master(phydev)) {
|
||||
- qca808x_phy_ms_seed_enable(phydev, false);
|
||||
- } else {
|
||||
- qca808x_phy_ms_seed_enable(phydev, true);
|
||||
+ if (qca808x_has_fast_retrain_or_slave_seed(phydev)) {
|
||||
+ if (phydev->master_slave_state == MASTER_SLAVE_STATE_ERR ||
|
||||
+ qca808x_is_prefer_master(phydev)) {
|
||||
+ qca808x_phy_ms_seed_enable(phydev, false);
|
||||
+ } else {
|
||||
+ qca808x_phy_ms_seed_enable(phydev, true);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1845,7 +1856,10 @@ static int qca808x_soft_reset(struct phy
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
- return qca808x_phy_ms_seed_enable(phydev, true);
|
||||
+ if (qca808x_has_fast_retrain_or_slave_seed(phydev))
|
||||
+ ret = qca808x_phy_ms_seed_enable(phydev, true);
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static bool qca808x_cdt_fault_length_valid(int cdt_code)
|
||||
@ -0,0 +1,55 @@
|
||||
From 723970affdd8766fa0d91cd34bf2ffc861538b5f Mon Sep 17 00:00:00 2001
|
||||
From: Luo Jie <quic_luoj@quicinc.com>
|
||||
Date: Sun, 16 Jul 2023 16:49:24 +0800
|
||||
Subject: [PATCH 6/6] net: phy: at803x: add qca8081 fifo reset on the link
|
||||
changed
|
||||
|
||||
The qca8081 sgmii fifo needs to be reset on link down and
|
||||
released on the link up in case of any abnormal issue
|
||||
such as the packet blocked on the PHY.
|
||||
|
||||
Signed-off-by: Luo Jie <quic_luoj@quicinc.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -276,6 +276,9 @@
|
||||
#define QCA808X_PHY_MMD7_CHIP_TYPE 0x901d
|
||||
#define QCA808X_PHY_CHIP_TYPE_1G BIT(0)
|
||||
|
||||
+#define QCA8081_PHY_SERDES_MMD1_FIFO_CTRL 0x9072
|
||||
+#define QCA8081_PHY_FIFO_RSTN BIT(11)
|
||||
+
|
||||
MODULE_DESCRIPTION("Qualcomm Atheros AR803x and QCA808X PHY driver");
|
||||
MODULE_AUTHOR("Matus Ujhelyi");
|
||||
MODULE_LICENSE("GPL");
|
||||
@@ -2037,6 +2040,16 @@ static int qca808x_get_features(struct p
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static void qca808x_link_change_notify(struct phy_device *phydev)
|
||||
+{
|
||||
+ /* Assert interface sgmii fifo on link down, deassert it on link up,
|
||||
+ * the interface device address is always phy address added by 1.
|
||||
+ */
|
||||
+ mdiobus_c45_modify_changed(phydev->mdio.bus, phydev->mdio.addr + 1,
|
||||
+ MDIO_MMD_PMAPMD, QCA8081_PHY_SERDES_MMD1_FIFO_CTRL,
|
||||
+ QCA8081_PHY_FIFO_RSTN, phydev->link ? QCA8081_PHY_FIFO_RSTN : 0);
|
||||
+}
|
||||
+
|
||||
static struct phy_driver at803x_driver[] = {
|
||||
{
|
||||
/* Qualcomm Atheros AR8035 */
|
||||
@@ -2213,6 +2226,7 @@ static struct phy_driver at803x_driver[]
|
||||
.soft_reset = qca808x_soft_reset,
|
||||
.cable_test_start = qca808x_cable_test_start,
|
||||
.cable_test_get_status = qca808x_cable_test_get_status,
|
||||
+ .link_change_notify = qca808x_link_change_notify,
|
||||
}, };
|
||||
|
||||
module_phy_driver(at803x_driver);
|
||||
@ -0,0 +1,45 @@
|
||||
From f8fdbf3389f44c7026f16e36cb1f2ff017f7f5b2 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 8 Dec 2023 15:51:48 +0100
|
||||
Subject: [PATCH 01/13] net: phy: at803x: fix passing the wrong reference for
|
||||
config_intr
|
||||
|
||||
Fix passing the wrong reference for config_initr on passing the function
|
||||
pointer, drop the wrong & from at803x_config_intr in the PHY struct.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -2104,7 +2104,7 @@ static struct phy_driver at803x_driver[]
|
||||
.write_page = at803x_write_page,
|
||||
.get_features = at803x_get_features,
|
||||
.read_status = at803x_read_status,
|
||||
- .config_intr = &at803x_config_intr,
|
||||
+ .config_intr = at803x_config_intr,
|
||||
.handle_interrupt = at803x_handle_interrupt,
|
||||
.get_tunable = at803x_get_tunable,
|
||||
.set_tunable = at803x_set_tunable,
|
||||
@@ -2134,7 +2134,7 @@ static struct phy_driver at803x_driver[]
|
||||
.resume = at803x_resume,
|
||||
.flags = PHY_POLL_CABLE_TEST,
|
||||
/* PHY_BASIC_FEATURES */
|
||||
- .config_intr = &at803x_config_intr,
|
||||
+ .config_intr = at803x_config_intr,
|
||||
.handle_interrupt = at803x_handle_interrupt,
|
||||
.cable_test_start = at803x_cable_test_start,
|
||||
.cable_test_get_status = at803x_cable_test_get_status,
|
||||
@@ -2150,7 +2150,7 @@ static struct phy_driver at803x_driver[]
|
||||
.resume = at803x_resume,
|
||||
.flags = PHY_POLL_CABLE_TEST,
|
||||
/* PHY_BASIC_FEATURES */
|
||||
- .config_intr = &at803x_config_intr,
|
||||
+ .config_intr = at803x_config_intr,
|
||||
.handle_interrupt = at803x_handle_interrupt,
|
||||
.cable_test_start = at803x_cable_test_start,
|
||||
.cable_test_get_status = at803x_cable_test_get_status,
|
||||
@ -0,0 +1,69 @@
|
||||
From 6a3b8c573b5a152a6aa7a0b54c5e18b84c6ba6f5 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 8 Dec 2023 15:51:49 +0100
|
||||
Subject: [PATCH 02/13] net: phy: at803x: move disable WOL to specific at8031
|
||||
probe
|
||||
|
||||
Move the WOL disable call to specific at8031 probe to make at803x_probe
|
||||
more generic and drop extra check for PHY ID.
|
||||
|
||||
Keep the same previous behaviour by first calling at803x_probe and then
|
||||
disabling WOL.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 27 +++++++++++++++++----------
|
||||
1 file changed, 17 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -886,15 +886,6 @@ static int at803x_probe(struct phy_devic
|
||||
priv->is_fiber = true;
|
||||
break;
|
||||
}
|
||||
-
|
||||
- /* Disable WoL in 1588 register which is enabled
|
||||
- * by default
|
||||
- */
|
||||
- ret = phy_modify_mmd(phydev, MDIO_MMD_PCS,
|
||||
- AT803X_PHY_MMD3_WOL_CTRL,
|
||||
- AT803X_WOL_EN, 0);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -1591,6 +1582,22 @@ static int at803x_cable_test_start(struc
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int at8031_probe(struct phy_device *phydev)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = at803x_probe(phydev);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* Disable WoL in 1588 register which is enabled
|
||||
+ * by default
|
||||
+ */
|
||||
+ return phy_modify_mmd(phydev, MDIO_MMD_PCS,
|
||||
+ AT803X_PHY_MMD3_WOL_CTRL,
|
||||
+ AT803X_WOL_EN, 0);
|
||||
+}
|
||||
+
|
||||
static int qca83xx_config_init(struct phy_device *phydev)
|
||||
{
|
||||
u8 switch_revision;
|
||||
@@ -2092,7 +2099,7 @@ static struct phy_driver at803x_driver[]
|
||||
PHY_ID_MATCH_EXACT(ATH8031_PHY_ID),
|
||||
.name = "Qualcomm Atheros AR8031/AR8033",
|
||||
.flags = PHY_POLL_CABLE_TEST,
|
||||
- .probe = at803x_probe,
|
||||
+ .probe = at8031_probe,
|
||||
.config_init = at803x_config_init,
|
||||
.config_aneg = at803x_config_aneg,
|
||||
.soft_reset = genphy_soft_reset,
|
||||
@ -0,0 +1,129 @@
|
||||
From 07b1ad83b9ed6db1735ba10baf67b7a565ac0cef Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 8 Dec 2023 15:51:50 +0100
|
||||
Subject: [PATCH 03/13] net: phy: at803x: raname hw_stats functions to qca83xx
|
||||
specific name
|
||||
|
||||
The function and the struct related to hw_stats were specific to qca83xx
|
||||
PHY but were called following the convention in the driver of calling
|
||||
everything with at803x prefix.
|
||||
|
||||
To better organize the code, rename these function a more specific name
|
||||
to better describe that they are specific to 83xx PHY family.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 44 ++++++++++++++++++++--------------------
|
||||
1 file changed, 22 insertions(+), 22 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -295,7 +295,7 @@ struct at803x_hw_stat {
|
||||
enum stat_access_type access_type;
|
||||
};
|
||||
|
||||
-static struct at803x_hw_stat at803x_hw_stats[] = {
|
||||
+static struct at803x_hw_stat qca83xx_hw_stats[] = {
|
||||
{ "phy_idle_errors", 0xa, GENMASK(7, 0), PHY},
|
||||
{ "phy_receive_errors", 0x15, GENMASK(15, 0), PHY},
|
||||
{ "eee_wake_errors", 0x16, GENMASK(15, 0), MMD},
|
||||
@@ -311,7 +311,7 @@ struct at803x_priv {
|
||||
bool is_1000basex;
|
||||
struct regulator_dev *vddio_rdev;
|
||||
struct regulator_dev *vddh_rdev;
|
||||
- u64 stats[ARRAY_SIZE(at803x_hw_stats)];
|
||||
+ u64 stats[ARRAY_SIZE(qca83xx_hw_stats)];
|
||||
};
|
||||
|
||||
struct at803x_context {
|
||||
@@ -529,24 +529,24 @@ static void at803x_get_wol(struct phy_de
|
||||
wol->wolopts |= WAKE_MAGIC;
|
||||
}
|
||||
|
||||
-static int at803x_get_sset_count(struct phy_device *phydev)
|
||||
+static int qca83xx_get_sset_count(struct phy_device *phydev)
|
||||
{
|
||||
- return ARRAY_SIZE(at803x_hw_stats);
|
||||
+ return ARRAY_SIZE(qca83xx_hw_stats);
|
||||
}
|
||||
|
||||
-static void at803x_get_strings(struct phy_device *phydev, u8 *data)
|
||||
+static void qca83xx_get_strings(struct phy_device *phydev, u8 *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
- for (i = 0; i < ARRAY_SIZE(at803x_hw_stats); i++) {
|
||||
+ for (i = 0; i < ARRAY_SIZE(qca83xx_hw_stats); i++) {
|
||||
strscpy(data + i * ETH_GSTRING_LEN,
|
||||
- at803x_hw_stats[i].string, ETH_GSTRING_LEN);
|
||||
+ qca83xx_hw_stats[i].string, ETH_GSTRING_LEN);
|
||||
}
|
||||
}
|
||||
|
||||
-static u64 at803x_get_stat(struct phy_device *phydev, int i)
|
||||
+static u64 qca83xx_get_stat(struct phy_device *phydev, int i)
|
||||
{
|
||||
- struct at803x_hw_stat stat = at803x_hw_stats[i];
|
||||
+ struct at803x_hw_stat stat = qca83xx_hw_stats[i];
|
||||
struct at803x_priv *priv = phydev->priv;
|
||||
int val;
|
||||
u64 ret;
|
||||
@@ -567,13 +567,13 @@ static u64 at803x_get_stat(struct phy_de
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static void at803x_get_stats(struct phy_device *phydev,
|
||||
- struct ethtool_stats *stats, u64 *data)
|
||||
+static void qca83xx_get_stats(struct phy_device *phydev,
|
||||
+ struct ethtool_stats *stats, u64 *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
- for (i = 0; i < ARRAY_SIZE(at803x_hw_stats); i++)
|
||||
- data[i] = at803x_get_stat(phydev, i);
|
||||
+ for (i = 0; i < ARRAY_SIZE(qca83xx_hw_stats); i++)
|
||||
+ data[i] = qca83xx_get_stat(phydev, i);
|
||||
}
|
||||
|
||||
static int at803x_suspend(struct phy_device *phydev)
|
||||
@@ -2175,9 +2175,9 @@ static struct phy_driver at803x_driver[]
|
||||
.flags = PHY_IS_INTERNAL,
|
||||
.config_init = qca83xx_config_init,
|
||||
.soft_reset = genphy_soft_reset,
|
||||
- .get_sset_count = at803x_get_sset_count,
|
||||
- .get_strings = at803x_get_strings,
|
||||
- .get_stats = at803x_get_stats,
|
||||
+ .get_sset_count = qca83xx_get_sset_count,
|
||||
+ .get_strings = qca83xx_get_strings,
|
||||
+ .get_stats = qca83xx_get_stats,
|
||||
.suspend = qca83xx_suspend,
|
||||
.resume = qca83xx_resume,
|
||||
}, {
|
||||
@@ -2191,9 +2191,9 @@ static struct phy_driver at803x_driver[]
|
||||
.flags = PHY_IS_INTERNAL,
|
||||
.config_init = qca83xx_config_init,
|
||||
.soft_reset = genphy_soft_reset,
|
||||
- .get_sset_count = at803x_get_sset_count,
|
||||
- .get_strings = at803x_get_strings,
|
||||
- .get_stats = at803x_get_stats,
|
||||
+ .get_sset_count = qca83xx_get_sset_count,
|
||||
+ .get_strings = qca83xx_get_strings,
|
||||
+ .get_stats = qca83xx_get_stats,
|
||||
.suspend = qca83xx_suspend,
|
||||
.resume = qca83xx_resume,
|
||||
}, {
|
||||
@@ -2207,9 +2207,9 @@ static struct phy_driver at803x_driver[]
|
||||
.flags = PHY_IS_INTERNAL,
|
||||
.config_init = qca83xx_config_init,
|
||||
.soft_reset = genphy_soft_reset,
|
||||
- .get_sset_count = at803x_get_sset_count,
|
||||
- .get_strings = at803x_get_strings,
|
||||
- .get_stats = at803x_get_stats,
|
||||
+ .get_sset_count = qca83xx_get_sset_count,
|
||||
+ .get_strings = qca83xx_get_strings,
|
||||
+ .get_stats = qca83xx_get_stats,
|
||||
.suspend = qca83xx_suspend,
|
||||
.resume = qca83xx_resume,
|
||||
}, {
|
||||
@ -0,0 +1,155 @@
|
||||
From d43cff3f82336c0bd965ea552232d9f4ddac71a6 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 8 Dec 2023 15:51:51 +0100
|
||||
Subject: [PATCH 04/13] net: phy: at803x: move qca83xx specific check in
|
||||
dedicated functions
|
||||
|
||||
Rework qca83xx specific check to dedicated function to tidy things up
|
||||
and drop useless phy_id check.
|
||||
|
||||
Also drop an useless link_change_notify for QCA8337 as it did nothing an
|
||||
returned early.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 68 ++++++++++++++++++++++------------------
|
||||
1 file changed, 37 insertions(+), 31 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -1623,27 +1623,26 @@ static int qca83xx_config_init(struct ph
|
||||
break;
|
||||
}
|
||||
|
||||
+ /* Following original QCA sourcecode set port to prefer master */
|
||||
+ phy_set_bits(phydev, MII_CTRL1000, CTL1000_PREFER_MASTER);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int qca8327_config_init(struct phy_device *phydev)
|
||||
+{
|
||||
/* QCA8327 require DAC amplitude adjustment for 100m set to +6%.
|
||||
* Disable on init and enable only with 100m speed following
|
||||
* qca original source code.
|
||||
*/
|
||||
- if (phydev->drv->phy_id == QCA8327_A_PHY_ID ||
|
||||
- phydev->drv->phy_id == QCA8327_B_PHY_ID)
|
||||
- at803x_debug_reg_mask(phydev, AT803X_DEBUG_ANALOG_TEST_CTRL,
|
||||
- QCA8327_DEBUG_MANU_CTRL_EN, 0);
|
||||
+ at803x_debug_reg_mask(phydev, AT803X_DEBUG_ANALOG_TEST_CTRL,
|
||||
+ QCA8327_DEBUG_MANU_CTRL_EN, 0);
|
||||
|
||||
- /* Following original QCA sourcecode set port to prefer master */
|
||||
- phy_set_bits(phydev, MII_CTRL1000, CTL1000_PREFER_MASTER);
|
||||
-
|
||||
- return 0;
|
||||
+ return qca83xx_config_init(phydev);
|
||||
}
|
||||
|
||||
static void qca83xx_link_change_notify(struct phy_device *phydev)
|
||||
{
|
||||
- /* QCA8337 doesn't require DAC Amplitude adjustement */
|
||||
- if (phydev->drv->phy_id == QCA8337_PHY_ID)
|
||||
- return;
|
||||
-
|
||||
/* Set DAC Amplitude adjustment to +6% for 100m on link running */
|
||||
if (phydev->state == PHY_RUNNING) {
|
||||
if (phydev->speed == SPEED_100)
|
||||
@@ -1686,19 +1685,6 @@ static int qca83xx_resume(struct phy_dev
|
||||
|
||||
static int qca83xx_suspend(struct phy_device *phydev)
|
||||
{
|
||||
- u16 mask = 0;
|
||||
-
|
||||
- /* Only QCA8337 support actual suspend.
|
||||
- * QCA8327 cause port unreliability when phy suspend
|
||||
- * is set.
|
||||
- */
|
||||
- if (phydev->drv->phy_id == QCA8337_PHY_ID) {
|
||||
- genphy_suspend(phydev);
|
||||
- } else {
|
||||
- mask |= ~(BMCR_SPEED1000 | BMCR_FULLDPLX);
|
||||
- phy_modify(phydev, MII_BMCR, mask, 0);
|
||||
- }
|
||||
-
|
||||
at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_GREEN,
|
||||
AT803X_DEBUG_GATE_CLK_IN1000, 0);
|
||||
|
||||
@@ -1709,6 +1695,27 @@ static int qca83xx_suspend(struct phy_de
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int qca8337_suspend(struct phy_device *phydev)
|
||||
+{
|
||||
+ /* Only QCA8337 support actual suspend. */
|
||||
+ genphy_suspend(phydev);
|
||||
+
|
||||
+ return qca83xx_suspend(phydev);
|
||||
+}
|
||||
+
|
||||
+static int qca8327_suspend(struct phy_device *phydev)
|
||||
+{
|
||||
+ u16 mask = 0;
|
||||
+
|
||||
+ /* QCA8327 cause port unreliability when phy suspend
|
||||
+ * is set.
|
||||
+ */
|
||||
+ mask |= ~(BMCR_SPEED1000 | BMCR_FULLDPLX);
|
||||
+ phy_modify(phydev, MII_BMCR, mask, 0);
|
||||
+
|
||||
+ return qca83xx_suspend(phydev);
|
||||
+}
|
||||
+
|
||||
static int qca808x_phy_fast_retrain_config(struct phy_device *phydev)
|
||||
{
|
||||
int ret;
|
||||
@@ -2170,7 +2177,6 @@ static struct phy_driver at803x_driver[]
|
||||
.phy_id_mask = QCA8K_PHY_ID_MASK,
|
||||
.name = "Qualcomm Atheros 8337 internal PHY",
|
||||
/* PHY_GBIT_FEATURES */
|
||||
- .link_change_notify = qca83xx_link_change_notify,
|
||||
.probe = at803x_probe,
|
||||
.flags = PHY_IS_INTERNAL,
|
||||
.config_init = qca83xx_config_init,
|
||||
@@ -2178,7 +2184,7 @@ static struct phy_driver at803x_driver[]
|
||||
.get_sset_count = qca83xx_get_sset_count,
|
||||
.get_strings = qca83xx_get_strings,
|
||||
.get_stats = qca83xx_get_stats,
|
||||
- .suspend = qca83xx_suspend,
|
||||
+ .suspend = qca8337_suspend,
|
||||
.resume = qca83xx_resume,
|
||||
}, {
|
||||
/* QCA8327-A from switch QCA8327-AL1A */
|
||||
@@ -2189,12 +2195,12 @@ static struct phy_driver at803x_driver[]
|
||||
.link_change_notify = qca83xx_link_change_notify,
|
||||
.probe = at803x_probe,
|
||||
.flags = PHY_IS_INTERNAL,
|
||||
- .config_init = qca83xx_config_init,
|
||||
+ .config_init = qca8327_config_init,
|
||||
.soft_reset = genphy_soft_reset,
|
||||
.get_sset_count = qca83xx_get_sset_count,
|
||||
.get_strings = qca83xx_get_strings,
|
||||
.get_stats = qca83xx_get_stats,
|
||||
- .suspend = qca83xx_suspend,
|
||||
+ .suspend = qca8327_suspend,
|
||||
.resume = qca83xx_resume,
|
||||
}, {
|
||||
/* QCA8327-B from switch QCA8327-BL1A */
|
||||
@@ -2205,12 +2211,12 @@ static struct phy_driver at803x_driver[]
|
||||
.link_change_notify = qca83xx_link_change_notify,
|
||||
.probe = at803x_probe,
|
||||
.flags = PHY_IS_INTERNAL,
|
||||
- .config_init = qca83xx_config_init,
|
||||
+ .config_init = qca8327_config_init,
|
||||
.soft_reset = genphy_soft_reset,
|
||||
.get_sset_count = qca83xx_get_sset_count,
|
||||
.get_strings = qca83xx_get_strings,
|
||||
.get_stats = qca83xx_get_stats,
|
||||
- .suspend = qca83xx_suspend,
|
||||
+ .suspend = qca8327_suspend,
|
||||
.resume = qca83xx_resume,
|
||||
}, {
|
||||
/* Qualcomm QCA8081 */
|
||||
@ -0,0 +1,94 @@
|
||||
From 900eef75cc5018e149c52fe305c9c3fe424c52a7 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 8 Dec 2023 15:51:52 +0100
|
||||
Subject: [PATCH 05/13] net: phy: at803x: move specific DT option for at8031 to
|
||||
specific probe
|
||||
|
||||
Move specific DT options for at8031 to specific probe to tidy things up
|
||||
and make at803x_parse_dt more generic.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 55 ++++++++++++++++++++++------------------
|
||||
1 file changed, 31 insertions(+), 24 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -825,30 +825,6 @@ static int at803x_parse_dt(struct phy_de
|
||||
}
|
||||
}
|
||||
|
||||
- /* Only supported on AR8031/AR8033, the AR8030/AR8035 use strapping
|
||||
- * options.
|
||||
- */
|
||||
- if (phydev->drv->phy_id == ATH8031_PHY_ID) {
|
||||
- if (of_property_read_bool(node, "qca,keep-pll-enabled"))
|
||||
- priv->flags |= AT803X_KEEP_PLL_ENABLED;
|
||||
-
|
||||
- ret = at8031_register_regulators(phydev);
|
||||
- if (ret < 0)
|
||||
- return ret;
|
||||
-
|
||||
- ret = devm_regulator_get_enable_optional(&phydev->mdio.dev,
|
||||
- "vddio");
|
||||
- if (ret) {
|
||||
- phydev_err(phydev, "failed to get VDDIO regulator\n");
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
- /* Only AR8031/8033 support 1000Base-X for SFP modules */
|
||||
- ret = phy_sfp_probe(phydev, &at803x_sfp_ops);
|
||||
- if (ret < 0)
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1582,6 +1558,30 @@ static int at803x_cable_test_start(struc
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int at8031_parse_dt(struct phy_device *phydev)
|
||||
+{
|
||||
+ struct device_node *node = phydev->mdio.dev.of_node;
|
||||
+ struct at803x_priv *priv = phydev->priv;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (of_property_read_bool(node, "qca,keep-pll-enabled"))
|
||||
+ priv->flags |= AT803X_KEEP_PLL_ENABLED;
|
||||
+
|
||||
+ ret = at8031_register_regulators(phydev);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = devm_regulator_get_enable_optional(&phydev->mdio.dev,
|
||||
+ "vddio");
|
||||
+ if (ret) {
|
||||
+ phydev_err(phydev, "failed to get VDDIO regulator\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /* Only AR8031/8033 support 1000Base-X for SFP modules */
|
||||
+ return phy_sfp_probe(phydev, &at803x_sfp_ops);
|
||||
+}
|
||||
+
|
||||
static int at8031_probe(struct phy_device *phydev)
|
||||
{
|
||||
int ret;
|
||||
@@ -1590,6 +1590,13 @@ static int at8031_probe(struct phy_devic
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
+ /* Only supported on AR8031/AR8033, the AR8030/AR8035 use strapping
|
||||
+ * options.
|
||||
+ */
|
||||
+ ret = at8031_parse_dt(phydev);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
/* Disable WoL in 1588 register which is enabled
|
||||
* by default
|
||||
*/
|
||||
@ -0,0 +1,78 @@
|
||||
From 25d2ba94005fac18fe68878cddff59a67e115554 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 8 Dec 2023 15:51:53 +0100
|
||||
Subject: [PATCH 06/13] net: phy: at803x: move specific at8031 probe mode check
|
||||
to dedicated probe
|
||||
|
||||
Move specific at8031 probe mode check to dedicated probe to make
|
||||
at803x_probe more generic and keep code tidy.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 39 +++++++++++++++++++--------------------
|
||||
1 file changed, 19 insertions(+), 20 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -844,26 +844,6 @@ static int at803x_probe(struct phy_devic
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- if (phydev->drv->phy_id == ATH8031_PHY_ID) {
|
||||
- int ccr = phy_read(phydev, AT803X_REG_CHIP_CONFIG);
|
||||
- int mode_cfg;
|
||||
-
|
||||
- if (ccr < 0)
|
||||
- return ccr;
|
||||
- mode_cfg = ccr & AT803X_MODE_CFG_MASK;
|
||||
-
|
||||
- switch (mode_cfg) {
|
||||
- case AT803X_MODE_CFG_BX1000_RGMII_50OHM:
|
||||
- case AT803X_MODE_CFG_BX1000_RGMII_75OHM:
|
||||
- priv->is_1000basex = true;
|
||||
- fallthrough;
|
||||
- case AT803X_MODE_CFG_FX100_RGMII_50OHM:
|
||||
- case AT803X_MODE_CFG_FX100_RGMII_75OHM:
|
||||
- priv->is_fiber = true;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1584,6 +1564,9 @@ static int at8031_parse_dt(struct phy_de
|
||||
|
||||
static int at8031_probe(struct phy_device *phydev)
|
||||
{
|
||||
+ struct at803x_priv *priv = phydev->priv;
|
||||
+ int mode_cfg;
|
||||
+ int ccr;
|
||||
int ret;
|
||||
|
||||
ret = at803x_probe(phydev);
|
||||
@@ -1597,6 +1580,22 @@ static int at8031_probe(struct phy_devic
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
+ ccr = phy_read(phydev, AT803X_REG_CHIP_CONFIG);
|
||||
+ if (ccr < 0)
|
||||
+ return ccr;
|
||||
+ mode_cfg = ccr & AT803X_MODE_CFG_MASK;
|
||||
+
|
||||
+ switch (mode_cfg) {
|
||||
+ case AT803X_MODE_CFG_BX1000_RGMII_50OHM:
|
||||
+ case AT803X_MODE_CFG_BX1000_RGMII_75OHM:
|
||||
+ priv->is_1000basex = true;
|
||||
+ fallthrough;
|
||||
+ case AT803X_MODE_CFG_FX100_RGMII_50OHM:
|
||||
+ case AT803X_MODE_CFG_FX100_RGMII_75OHM:
|
||||
+ priv->is_fiber = true;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
/* Disable WoL in 1588 register which is enabled
|
||||
* by default
|
||||
*/
|
||||
@ -0,0 +1,86 @@
|
||||
From 3ae3bc426eaf57ca8f53d75777d9a5ef779bc7b7 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 8 Dec 2023 15:51:54 +0100
|
||||
Subject: [PATCH 07/13] net: phy: at803x: move specific at8031 config_init to
|
||||
dedicated function
|
||||
|
||||
Move specific at8031 config_init to dedicated function to make
|
||||
at803x_config_init more generic and tidy things up.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 45 ++++++++++++++++++++++------------------
|
||||
1 file changed, 25 insertions(+), 20 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -951,27 +951,8 @@ static int at803x_hibernation_mode_confi
|
||||
|
||||
static int at803x_config_init(struct phy_device *phydev)
|
||||
{
|
||||
- struct at803x_priv *priv = phydev->priv;
|
||||
int ret;
|
||||
|
||||
- if (phydev->drv->phy_id == ATH8031_PHY_ID) {
|
||||
- /* Some bootloaders leave the fiber page selected.
|
||||
- * Switch to the appropriate page (fiber or copper), as otherwise we
|
||||
- * read the PHY capabilities from the wrong page.
|
||||
- */
|
||||
- phy_lock_mdio_bus(phydev);
|
||||
- ret = at803x_write_page(phydev,
|
||||
- priv->is_fiber ? AT803X_PAGE_FIBER :
|
||||
- AT803X_PAGE_COPPER);
|
||||
- phy_unlock_mdio_bus(phydev);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
-
|
||||
- ret = at8031_pll_config(phydev);
|
||||
- if (ret < 0)
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
/* The RX and TX delay default is:
|
||||
* after HW reset: RX delay enabled and TX delay disabled
|
||||
* after SW reset: RX delay enabled, while TX delay retains the
|
||||
@@ -1604,6 +1585,30 @@ static int at8031_probe(struct phy_devic
|
||||
AT803X_WOL_EN, 0);
|
||||
}
|
||||
|
||||
+static int at8031_config_init(struct phy_device *phydev)
|
||||
+{
|
||||
+ struct at803x_priv *priv = phydev->priv;
|
||||
+ int ret;
|
||||
+
|
||||
+ /* Some bootloaders leave the fiber page selected.
|
||||
+ * Switch to the appropriate page (fiber or copper), as otherwise we
|
||||
+ * read the PHY capabilities from the wrong page.
|
||||
+ */
|
||||
+ phy_lock_mdio_bus(phydev);
|
||||
+ ret = at803x_write_page(phydev,
|
||||
+ priv->is_fiber ? AT803X_PAGE_FIBER :
|
||||
+ AT803X_PAGE_COPPER);
|
||||
+ phy_unlock_mdio_bus(phydev);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = at8031_pll_config(phydev);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ return at803x_config_init(phydev);
|
||||
+}
|
||||
+
|
||||
static int qca83xx_config_init(struct phy_device *phydev)
|
||||
{
|
||||
u8 switch_revision;
|
||||
@@ -2113,7 +2118,7 @@ static struct phy_driver at803x_driver[]
|
||||
.name = "Qualcomm Atheros AR8031/AR8033",
|
||||
.flags = PHY_POLL_CABLE_TEST,
|
||||
.probe = at8031_probe,
|
||||
- .config_init = at803x_config_init,
|
||||
+ .config_init = at8031_config_init,
|
||||
.config_aneg = at803x_config_aneg,
|
||||
.soft_reset = genphy_soft_reset,
|
||||
.set_wol = at803x_set_wol,
|
||||
@ -0,0 +1,92 @@
|
||||
From 27b89c9dc1b0393090d68d651b82f30ad2696baa Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 8 Dec 2023 15:51:55 +0100
|
||||
Subject: [PATCH 08/13] net: phy: at803x: move specific at8031 WOL bits to
|
||||
dedicated function
|
||||
|
||||
Move specific at8031 WOL enable/disable to dedicated function to make
|
||||
at803x_set_wol more generic.
|
||||
|
||||
This is needed in preparation for PHY driver split as qca8081 share the
|
||||
same function to toggle WOL settings.
|
||||
|
||||
In this new implementation WOL module in at8031 is enabled after the
|
||||
generic interrupt is setup. This should not cause any problem as the
|
||||
WOL_INT has a separate implementation and only relay on MAC bits.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 42 ++++++++++++++++++++++++----------------
|
||||
1 file changed, 25 insertions(+), 17 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -466,27 +466,11 @@ static int at803x_set_wol(struct phy_dev
|
||||
phy_write_mmd(phydev, MDIO_MMD_PCS, offsets[i],
|
||||
mac[(i * 2) + 1] | (mac[(i * 2)] << 8));
|
||||
|
||||
- /* Enable WOL function for 1588 */
|
||||
- if (phydev->drv->phy_id == ATH8031_PHY_ID) {
|
||||
- ret = phy_modify_mmd(phydev, MDIO_MMD_PCS,
|
||||
- AT803X_PHY_MMD3_WOL_CTRL,
|
||||
- 0, AT803X_WOL_EN);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
- }
|
||||
/* Enable WOL interrupt */
|
||||
ret = phy_modify(phydev, AT803X_INTR_ENABLE, 0, AT803X_INTR_ENABLE_WOL);
|
||||
if (ret)
|
||||
return ret;
|
||||
} else {
|
||||
- /* Disable WoL function for 1588 */
|
||||
- if (phydev->drv->phy_id == ATH8031_PHY_ID) {
|
||||
- ret = phy_modify_mmd(phydev, MDIO_MMD_PCS,
|
||||
- AT803X_PHY_MMD3_WOL_CTRL,
|
||||
- AT803X_WOL_EN, 0);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
- }
|
||||
/* Disable WOL interrupt */
|
||||
ret = phy_modify(phydev, AT803X_INTR_ENABLE, AT803X_INTR_ENABLE_WOL, 0);
|
||||
if (ret)
|
||||
@@ -1609,6 +1593,30 @@ static int at8031_config_init(struct phy
|
||||
return at803x_config_init(phydev);
|
||||
}
|
||||
|
||||
+static int at8031_set_wol(struct phy_device *phydev,
|
||||
+ struct ethtool_wolinfo *wol)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ /* First setup MAC address and enable WOL interrupt */
|
||||
+ ret = at803x_set_wol(phydev, wol);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ if (wol->wolopts & WAKE_MAGIC)
|
||||
+ /* Enable WOL function for 1588 */
|
||||
+ ret = phy_modify_mmd(phydev, MDIO_MMD_PCS,
|
||||
+ AT803X_PHY_MMD3_WOL_CTRL,
|
||||
+ 0, AT803X_WOL_EN);
|
||||
+ else
|
||||
+ /* Disable WoL function for 1588 */
|
||||
+ ret = phy_modify_mmd(phydev, MDIO_MMD_PCS,
|
||||
+ AT803X_PHY_MMD3_WOL_CTRL,
|
||||
+ AT803X_WOL_EN, 0);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static int qca83xx_config_init(struct phy_device *phydev)
|
||||
{
|
||||
u8 switch_revision;
|
||||
@@ -2121,7 +2129,7 @@ static struct phy_driver at803x_driver[]
|
||||
.config_init = at8031_config_init,
|
||||
.config_aneg = at803x_config_aneg,
|
||||
.soft_reset = genphy_soft_reset,
|
||||
- .set_wol = at803x_set_wol,
|
||||
+ .set_wol = at8031_set_wol,
|
||||
.get_wol = at803x_get_wol,
|
||||
.suspend = at803x_suspend,
|
||||
.resume = at803x_resume,
|
||||
@ -0,0 +1,78 @@
|
||||
From 30dd62191d3dd97c08f7f9dc9ce77ffab457e4fb Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 8 Dec 2023 15:51:56 +0100
|
||||
Subject: [PATCH 09/13] net: phy: at803x: move specific at8031 config_intr to
|
||||
dedicated function
|
||||
|
||||
Move specific at8031 config_intr bits to dedicated function to make
|
||||
at803x_config_initr more generic.
|
||||
|
||||
This is needed in preparation for PHY driver split as qca8081 share the
|
||||
same function to setup interrupts.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 30 ++++++++++++++++++++++++------
|
||||
1 file changed, 24 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -990,7 +990,6 @@ static int at803x_ack_interrupt(struct p
|
||||
|
||||
static int at803x_config_intr(struct phy_device *phydev)
|
||||
{
|
||||
- struct at803x_priv *priv = phydev->priv;
|
||||
int err;
|
||||
int value;
|
||||
|
||||
@@ -1007,10 +1006,6 @@ static int at803x_config_intr(struct phy
|
||||
value |= AT803X_INTR_ENABLE_DUPLEX_CHANGED;
|
||||
value |= AT803X_INTR_ENABLE_LINK_FAIL;
|
||||
value |= AT803X_INTR_ENABLE_LINK_SUCCESS;
|
||||
- if (priv->is_fiber) {
|
||||
- value |= AT803X_INTR_ENABLE_LINK_FAIL_BX;
|
||||
- value |= AT803X_INTR_ENABLE_LINK_SUCCESS_BX;
|
||||
- }
|
||||
|
||||
err = phy_write(phydev, AT803X_INTR_ENABLE, value);
|
||||
} else {
|
||||
@@ -1617,6 +1612,29 @@ static int at8031_set_wol(struct phy_dev
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static int at8031_config_intr(struct phy_device *phydev)
|
||||
+{
|
||||
+ struct at803x_priv *priv = phydev->priv;
|
||||
+ int err, value = 0;
|
||||
+
|
||||
+ if (phydev->interrupts == PHY_INTERRUPT_ENABLED &&
|
||||
+ priv->is_fiber) {
|
||||
+ /* Clear any pending interrupts */
|
||||
+ err = at803x_ack_interrupt(phydev);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+
|
||||
+ value |= AT803X_INTR_ENABLE_LINK_FAIL_BX;
|
||||
+ value |= AT803X_INTR_ENABLE_LINK_SUCCESS_BX;
|
||||
+
|
||||
+ err = phy_set_bits(phydev, AT803X_INTR_ENABLE, value);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ return at803x_config_intr(phydev);
|
||||
+}
|
||||
+
|
||||
static int qca83xx_config_init(struct phy_device *phydev)
|
||||
{
|
||||
u8 switch_revision;
|
||||
@@ -2137,7 +2155,7 @@ static struct phy_driver at803x_driver[]
|
||||
.write_page = at803x_write_page,
|
||||
.get_features = at803x_get_features,
|
||||
.read_status = at803x_read_status,
|
||||
- .config_intr = at803x_config_intr,
|
||||
+ .config_intr = at8031_config_intr,
|
||||
.handle_interrupt = at803x_handle_interrupt,
|
||||
.get_tunable = at803x_get_tunable,
|
||||
.set_tunable = at803x_set_tunable,
|
||||
@ -0,0 +1,78 @@
|
||||
From a5ab9d8e7ae0da8328ac1637a9755311508dc8ab Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 8 Dec 2023 15:51:57 +0100
|
||||
Subject: [PATCH 10/13] net: phy: at803x: make at8031 related DT functions name
|
||||
more specific
|
||||
|
||||
Rename at8031 related DT function name to a more specific name
|
||||
referencing they are only related to at8031 and not to the generic
|
||||
at803x PHY family.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -583,7 +583,7 @@ static int at803x_resume(struct phy_devi
|
||||
return phy_modify(phydev, MII_BMCR, BMCR_PDOWN | BMCR_ISOLATE, 0);
|
||||
}
|
||||
|
||||
-static int at803x_rgmii_reg_set_voltage_sel(struct regulator_dev *rdev,
|
||||
+static int at8031_rgmii_reg_set_voltage_sel(struct regulator_dev *rdev,
|
||||
unsigned int selector)
|
||||
{
|
||||
struct phy_device *phydev = rdev_get_drvdata(rdev);
|
||||
@@ -596,7 +596,7 @@ static int at803x_rgmii_reg_set_voltage_
|
||||
AT803X_DEBUG_RGMII_1V8, 0);
|
||||
}
|
||||
|
||||
-static int at803x_rgmii_reg_get_voltage_sel(struct regulator_dev *rdev)
|
||||
+static int at8031_rgmii_reg_get_voltage_sel(struct regulator_dev *rdev)
|
||||
{
|
||||
struct phy_device *phydev = rdev_get_drvdata(rdev);
|
||||
int val;
|
||||
@@ -610,8 +610,8 @@ static int at803x_rgmii_reg_get_voltage_
|
||||
|
||||
static const struct regulator_ops vddio_regulator_ops = {
|
||||
.list_voltage = regulator_list_voltage_table,
|
||||
- .set_voltage_sel = at803x_rgmii_reg_set_voltage_sel,
|
||||
- .get_voltage_sel = at803x_rgmii_reg_get_voltage_sel,
|
||||
+ .set_voltage_sel = at8031_rgmii_reg_set_voltage_sel,
|
||||
+ .get_voltage_sel = at8031_rgmii_reg_get_voltage_sel,
|
||||
};
|
||||
|
||||
static const unsigned int vddio_voltage_table[] = {
|
||||
@@ -666,7 +666,7 @@ static int at8031_register_regulators(st
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int at803x_sfp_insert(void *upstream, const struct sfp_eeprom_id *id)
|
||||
+static int at8031_sfp_insert(void *upstream, const struct sfp_eeprom_id *id)
|
||||
{
|
||||
struct phy_device *phydev = upstream;
|
||||
__ETHTOOL_DECLARE_LINK_MODE_MASK(phy_support);
|
||||
@@ -710,10 +710,10 @@ static int at803x_sfp_insert(void *upstr
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static const struct sfp_upstream_ops at803x_sfp_ops = {
|
||||
+static const struct sfp_upstream_ops at8031_sfp_ops = {
|
||||
.attach = phy_sfp_attach,
|
||||
.detach = phy_sfp_detach,
|
||||
- .module_insert = at803x_sfp_insert,
|
||||
+ .module_insert = at8031_sfp_insert,
|
||||
};
|
||||
|
||||
static int at803x_parse_dt(struct phy_device *phydev)
|
||||
@@ -1519,7 +1519,7 @@ static int at8031_parse_dt(struct phy_de
|
||||
}
|
||||
|
||||
/* Only AR8031/8033 support 1000Base-X for SFP modules */
|
||||
- return phy_sfp_probe(phydev, &at803x_sfp_ops);
|
||||
+ return phy_sfp_probe(phydev, &at8031_sfp_ops);
|
||||
}
|
||||
|
||||
static int at8031_probe(struct phy_device *phydev)
|
||||
@ -0,0 +1,297 @@
|
||||
From f932a6dc8bae0dae9645b5b1b4c65aed8a8acb2a Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 8 Dec 2023 15:51:58 +0100
|
||||
Subject: [PATCH 11/13] net: phy: at803x: move at8031 functions in dedicated
|
||||
section
|
||||
|
||||
Move at8031 functions in dedicated section with dedicated at8031
|
||||
parse_dt and probe.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 266 +++++++++++++++++++--------------------
|
||||
1 file changed, 133 insertions(+), 133 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -583,139 +583,6 @@ static int at803x_resume(struct phy_devi
|
||||
return phy_modify(phydev, MII_BMCR, BMCR_PDOWN | BMCR_ISOLATE, 0);
|
||||
}
|
||||
|
||||
-static int at8031_rgmii_reg_set_voltage_sel(struct regulator_dev *rdev,
|
||||
- unsigned int selector)
|
||||
-{
|
||||
- struct phy_device *phydev = rdev_get_drvdata(rdev);
|
||||
-
|
||||
- if (selector)
|
||||
- return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_1F,
|
||||
- 0, AT803X_DEBUG_RGMII_1V8);
|
||||
- else
|
||||
- return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_1F,
|
||||
- AT803X_DEBUG_RGMII_1V8, 0);
|
||||
-}
|
||||
-
|
||||
-static int at8031_rgmii_reg_get_voltage_sel(struct regulator_dev *rdev)
|
||||
-{
|
||||
- struct phy_device *phydev = rdev_get_drvdata(rdev);
|
||||
- int val;
|
||||
-
|
||||
- val = at803x_debug_reg_read(phydev, AT803X_DEBUG_REG_1F);
|
||||
- if (val < 0)
|
||||
- return val;
|
||||
-
|
||||
- return (val & AT803X_DEBUG_RGMII_1V8) ? 1 : 0;
|
||||
-}
|
||||
-
|
||||
-static const struct regulator_ops vddio_regulator_ops = {
|
||||
- .list_voltage = regulator_list_voltage_table,
|
||||
- .set_voltage_sel = at8031_rgmii_reg_set_voltage_sel,
|
||||
- .get_voltage_sel = at8031_rgmii_reg_get_voltage_sel,
|
||||
-};
|
||||
-
|
||||
-static const unsigned int vddio_voltage_table[] = {
|
||||
- 1500000,
|
||||
- 1800000,
|
||||
-};
|
||||
-
|
||||
-static const struct regulator_desc vddio_desc = {
|
||||
- .name = "vddio",
|
||||
- .of_match = of_match_ptr("vddio-regulator"),
|
||||
- .n_voltages = ARRAY_SIZE(vddio_voltage_table),
|
||||
- .volt_table = vddio_voltage_table,
|
||||
- .ops = &vddio_regulator_ops,
|
||||
- .type = REGULATOR_VOLTAGE,
|
||||
- .owner = THIS_MODULE,
|
||||
-};
|
||||
-
|
||||
-static const struct regulator_ops vddh_regulator_ops = {
|
||||
-};
|
||||
-
|
||||
-static const struct regulator_desc vddh_desc = {
|
||||
- .name = "vddh",
|
||||
- .of_match = of_match_ptr("vddh-regulator"),
|
||||
- .n_voltages = 1,
|
||||
- .fixed_uV = 2500000,
|
||||
- .ops = &vddh_regulator_ops,
|
||||
- .type = REGULATOR_VOLTAGE,
|
||||
- .owner = THIS_MODULE,
|
||||
-};
|
||||
-
|
||||
-static int at8031_register_regulators(struct phy_device *phydev)
|
||||
-{
|
||||
- struct at803x_priv *priv = phydev->priv;
|
||||
- struct device *dev = &phydev->mdio.dev;
|
||||
- struct regulator_config config = { };
|
||||
-
|
||||
- config.dev = dev;
|
||||
- config.driver_data = phydev;
|
||||
-
|
||||
- priv->vddio_rdev = devm_regulator_register(dev, &vddio_desc, &config);
|
||||
- if (IS_ERR(priv->vddio_rdev)) {
|
||||
- phydev_err(phydev, "failed to register VDDIO regulator\n");
|
||||
- return PTR_ERR(priv->vddio_rdev);
|
||||
- }
|
||||
-
|
||||
- priv->vddh_rdev = devm_regulator_register(dev, &vddh_desc, &config);
|
||||
- if (IS_ERR(priv->vddh_rdev)) {
|
||||
- phydev_err(phydev, "failed to register VDDH regulator\n");
|
||||
- return PTR_ERR(priv->vddh_rdev);
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static int at8031_sfp_insert(void *upstream, const struct sfp_eeprom_id *id)
|
||||
-{
|
||||
- struct phy_device *phydev = upstream;
|
||||
- __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_support);
|
||||
- __ETHTOOL_DECLARE_LINK_MODE_MASK(sfp_support);
|
||||
- DECLARE_PHY_INTERFACE_MASK(interfaces);
|
||||
- phy_interface_t iface;
|
||||
-
|
||||
- linkmode_zero(phy_support);
|
||||
- phylink_set(phy_support, 1000baseX_Full);
|
||||
- phylink_set(phy_support, 1000baseT_Full);
|
||||
- phylink_set(phy_support, Autoneg);
|
||||
- phylink_set(phy_support, Pause);
|
||||
- phylink_set(phy_support, Asym_Pause);
|
||||
-
|
||||
- linkmode_zero(sfp_support);
|
||||
- sfp_parse_support(phydev->sfp_bus, id, sfp_support, interfaces);
|
||||
- /* Some modules support 10G modes as well as others we support.
|
||||
- * Mask out non-supported modes so the correct interface is picked.
|
||||
- */
|
||||
- linkmode_and(sfp_support, phy_support, sfp_support);
|
||||
-
|
||||
- if (linkmode_empty(sfp_support)) {
|
||||
- dev_err(&phydev->mdio.dev, "incompatible SFP module inserted\n");
|
||||
- return -EINVAL;
|
||||
- }
|
||||
-
|
||||
- iface = sfp_select_interface(phydev->sfp_bus, sfp_support);
|
||||
-
|
||||
- /* Only 1000Base-X is supported by AR8031/8033 as the downstream SerDes
|
||||
- * interface for use with SFP modules.
|
||||
- * However, some copper modules detected as having a preferred SGMII
|
||||
- * interface do default to and function in 1000Base-X mode, so just
|
||||
- * print a warning and allow such modules, as they may have some chance
|
||||
- * of working.
|
||||
- */
|
||||
- if (iface == PHY_INTERFACE_MODE_SGMII)
|
||||
- dev_warn(&phydev->mdio.dev, "module may not function if 1000Base-X not supported\n");
|
||||
- else if (iface != PHY_INTERFACE_MODE_1000BASEX)
|
||||
- return -EINVAL;
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static const struct sfp_upstream_ops at8031_sfp_ops = {
|
||||
- .attach = phy_sfp_attach,
|
||||
- .detach = phy_sfp_detach,
|
||||
- .module_insert = at8031_sfp_insert,
|
||||
-};
|
||||
-
|
||||
static int at803x_parse_dt(struct phy_device *phydev)
|
||||
{
|
||||
struct device_node *node = phydev->mdio.dev.of_node;
|
||||
@@ -1498,6 +1365,139 @@ static int at803x_cable_test_start(struc
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int at8031_rgmii_reg_set_voltage_sel(struct regulator_dev *rdev,
|
||||
+ unsigned int selector)
|
||||
+{
|
||||
+ struct phy_device *phydev = rdev_get_drvdata(rdev);
|
||||
+
|
||||
+ if (selector)
|
||||
+ return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_1F,
|
||||
+ 0, AT803X_DEBUG_RGMII_1V8);
|
||||
+ else
|
||||
+ return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_1F,
|
||||
+ AT803X_DEBUG_RGMII_1V8, 0);
|
||||
+}
|
||||
+
|
||||
+static int at8031_rgmii_reg_get_voltage_sel(struct regulator_dev *rdev)
|
||||
+{
|
||||
+ struct phy_device *phydev = rdev_get_drvdata(rdev);
|
||||
+ int val;
|
||||
+
|
||||
+ val = at803x_debug_reg_read(phydev, AT803X_DEBUG_REG_1F);
|
||||
+ if (val < 0)
|
||||
+ return val;
|
||||
+
|
||||
+ return (val & AT803X_DEBUG_RGMII_1V8) ? 1 : 0;
|
||||
+}
|
||||
+
|
||||
+static const struct regulator_ops vddio_regulator_ops = {
|
||||
+ .list_voltage = regulator_list_voltage_table,
|
||||
+ .set_voltage_sel = at8031_rgmii_reg_set_voltage_sel,
|
||||
+ .get_voltage_sel = at8031_rgmii_reg_get_voltage_sel,
|
||||
+};
|
||||
+
|
||||
+static const unsigned int vddio_voltage_table[] = {
|
||||
+ 1500000,
|
||||
+ 1800000,
|
||||
+};
|
||||
+
|
||||
+static const struct regulator_desc vddio_desc = {
|
||||
+ .name = "vddio",
|
||||
+ .of_match = of_match_ptr("vddio-regulator"),
|
||||
+ .n_voltages = ARRAY_SIZE(vddio_voltage_table),
|
||||
+ .volt_table = vddio_voltage_table,
|
||||
+ .ops = &vddio_regulator_ops,
|
||||
+ .type = REGULATOR_VOLTAGE,
|
||||
+ .owner = THIS_MODULE,
|
||||
+};
|
||||
+
|
||||
+static const struct regulator_ops vddh_regulator_ops = {
|
||||
+};
|
||||
+
|
||||
+static const struct regulator_desc vddh_desc = {
|
||||
+ .name = "vddh",
|
||||
+ .of_match = of_match_ptr("vddh-regulator"),
|
||||
+ .n_voltages = 1,
|
||||
+ .fixed_uV = 2500000,
|
||||
+ .ops = &vddh_regulator_ops,
|
||||
+ .type = REGULATOR_VOLTAGE,
|
||||
+ .owner = THIS_MODULE,
|
||||
+};
|
||||
+
|
||||
+static int at8031_register_regulators(struct phy_device *phydev)
|
||||
+{
|
||||
+ struct at803x_priv *priv = phydev->priv;
|
||||
+ struct device *dev = &phydev->mdio.dev;
|
||||
+ struct regulator_config config = { };
|
||||
+
|
||||
+ config.dev = dev;
|
||||
+ config.driver_data = phydev;
|
||||
+
|
||||
+ priv->vddio_rdev = devm_regulator_register(dev, &vddio_desc, &config);
|
||||
+ if (IS_ERR(priv->vddio_rdev)) {
|
||||
+ phydev_err(phydev, "failed to register VDDIO regulator\n");
|
||||
+ return PTR_ERR(priv->vddio_rdev);
|
||||
+ }
|
||||
+
|
||||
+ priv->vddh_rdev = devm_regulator_register(dev, &vddh_desc, &config);
|
||||
+ if (IS_ERR(priv->vddh_rdev)) {
|
||||
+ phydev_err(phydev, "failed to register VDDH regulator\n");
|
||||
+ return PTR_ERR(priv->vddh_rdev);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int at8031_sfp_insert(void *upstream, const struct sfp_eeprom_id *id)
|
||||
+{
|
||||
+ struct phy_device *phydev = upstream;
|
||||
+ __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_support);
|
||||
+ __ETHTOOL_DECLARE_LINK_MODE_MASK(sfp_support);
|
||||
+ DECLARE_PHY_INTERFACE_MASK(interfaces);
|
||||
+ phy_interface_t iface;
|
||||
+
|
||||
+ linkmode_zero(phy_support);
|
||||
+ phylink_set(phy_support, 1000baseX_Full);
|
||||
+ phylink_set(phy_support, 1000baseT_Full);
|
||||
+ phylink_set(phy_support, Autoneg);
|
||||
+ phylink_set(phy_support, Pause);
|
||||
+ phylink_set(phy_support, Asym_Pause);
|
||||
+
|
||||
+ linkmode_zero(sfp_support);
|
||||
+ sfp_parse_support(phydev->sfp_bus, id, sfp_support, interfaces);
|
||||
+ /* Some modules support 10G modes as well as others we support.
|
||||
+ * Mask out non-supported modes so the correct interface is picked.
|
||||
+ */
|
||||
+ linkmode_and(sfp_support, phy_support, sfp_support);
|
||||
+
|
||||
+ if (linkmode_empty(sfp_support)) {
|
||||
+ dev_err(&phydev->mdio.dev, "incompatible SFP module inserted\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ iface = sfp_select_interface(phydev->sfp_bus, sfp_support);
|
||||
+
|
||||
+ /* Only 1000Base-X is supported by AR8031/8033 as the downstream SerDes
|
||||
+ * interface for use with SFP modules.
|
||||
+ * However, some copper modules detected as having a preferred SGMII
|
||||
+ * interface do default to and function in 1000Base-X mode, so just
|
||||
+ * print a warning and allow such modules, as they may have some chance
|
||||
+ * of working.
|
||||
+ */
|
||||
+ if (iface == PHY_INTERFACE_MODE_SGMII)
|
||||
+ dev_warn(&phydev->mdio.dev, "module may not function if 1000Base-X not supported\n");
|
||||
+ else if (iface != PHY_INTERFACE_MODE_1000BASEX)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct sfp_upstream_ops at8031_sfp_ops = {
|
||||
+ .attach = phy_sfp_attach,
|
||||
+ .detach = phy_sfp_detach,
|
||||
+ .module_insert = at8031_sfp_insert,
|
||||
+};
|
||||
+
|
||||
static int at8031_parse_dt(struct phy_device *phydev)
|
||||
{
|
||||
struct device_node *node = phydev->mdio.dev.of_node;
|
||||
@ -0,0 +1,114 @@
|
||||
From 21a2802a8365cfa82cc02187c1f95136d85592ad Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 8 Dec 2023 15:51:59 +0100
|
||||
Subject: [PATCH 12/13] net: phy: at803x: move at8035 specific DT parse to
|
||||
dedicated probe
|
||||
|
||||
Move at8035 specific DT parse for clock out frequency to dedicated probe
|
||||
to make at803x probe function more generic.
|
||||
|
||||
This is to tidy code and no behaviour change are intended.
|
||||
|
||||
Detection logic is changed, we check if the clk 25m mask is set and if
|
||||
it's not zero, we assume the qca,clk-out-frequency property is set.
|
||||
|
||||
The property is checked in the generic at803x_parse_dt called by
|
||||
at803x_probe.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 60 +++++++++++++++++++++++++++-------------
|
||||
1 file changed, 41 insertions(+), 19 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -638,23 +638,6 @@ static int at803x_parse_dt(struct phy_de
|
||||
|
||||
priv->clk_25m_reg |= FIELD_PREP(AT803X_CLK_OUT_MASK, sel);
|
||||
priv->clk_25m_mask |= AT803X_CLK_OUT_MASK;
|
||||
-
|
||||
- /* Fixup for the AR8030/AR8035. This chip has another mask and
|
||||
- * doesn't support the DSP reference. Eg. the lowest bit of the
|
||||
- * mask. The upper two bits select the same frequencies. Mask
|
||||
- * the lowest bit here.
|
||||
- *
|
||||
- * Warning:
|
||||
- * There was no datasheet for the AR8030 available so this is
|
||||
- * just a guess. But the AR8035 is listed as pin compatible
|
||||
- * to the AR8030 so there might be a good chance it works on
|
||||
- * the AR8030 too.
|
||||
- */
|
||||
- if (phydev->drv->phy_id == ATH8030_PHY_ID ||
|
||||
- phydev->drv->phy_id == ATH8035_PHY_ID) {
|
||||
- priv->clk_25m_reg &= AT8035_CLK_OUT_MASK;
|
||||
- priv->clk_25m_mask &= AT8035_CLK_OUT_MASK;
|
||||
- }
|
||||
}
|
||||
|
||||
ret = of_property_read_u32(node, "qca,clk-out-strength", &strength);
|
||||
@@ -1635,6 +1618,45 @@ static int at8031_config_intr(struct phy
|
||||
return at803x_config_intr(phydev);
|
||||
}
|
||||
|
||||
+static int at8035_parse_dt(struct phy_device *phydev)
|
||||
+{
|
||||
+ struct at803x_priv *priv = phydev->priv;
|
||||
+
|
||||
+ /* Mask is set by the generic at803x_parse_dt
|
||||
+ * if property is set. Assume property is set
|
||||
+ * with the mask not zero.
|
||||
+ */
|
||||
+ if (priv->clk_25m_mask) {
|
||||
+ /* Fixup for the AR8030/AR8035. This chip has another mask and
|
||||
+ * doesn't support the DSP reference. Eg. the lowest bit of the
|
||||
+ * mask. The upper two bits select the same frequencies. Mask
|
||||
+ * the lowest bit here.
|
||||
+ *
|
||||
+ * Warning:
|
||||
+ * There was no datasheet for the AR8030 available so this is
|
||||
+ * just a guess. But the AR8035 is listed as pin compatible
|
||||
+ * to the AR8030 so there might be a good chance it works on
|
||||
+ * the AR8030 too.
|
||||
+ */
|
||||
+ priv->clk_25m_reg &= AT8035_CLK_OUT_MASK;
|
||||
+ priv->clk_25m_mask &= AT8035_CLK_OUT_MASK;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/* AR8030 and AR8035 shared the same special mask for clk_25m */
|
||||
+static int at8035_probe(struct phy_device *phydev)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = at803x_probe(phydev);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ return at8035_parse_dt(phydev);
|
||||
+}
|
||||
+
|
||||
static int qca83xx_config_init(struct phy_device *phydev)
|
||||
{
|
||||
u8 switch_revision;
|
||||
@@ -2107,7 +2129,7 @@ static struct phy_driver at803x_driver[]
|
||||
PHY_ID_MATCH_EXACT(ATH8035_PHY_ID),
|
||||
.name = "Qualcomm Atheros AR8035",
|
||||
.flags = PHY_POLL_CABLE_TEST,
|
||||
- .probe = at803x_probe,
|
||||
+ .probe = at8035_probe,
|
||||
.config_aneg = at803x_config_aneg,
|
||||
.config_init = at803x_config_init,
|
||||
.soft_reset = genphy_soft_reset,
|
||||
@@ -2128,7 +2150,7 @@ static struct phy_driver at803x_driver[]
|
||||
.phy_id = ATH8030_PHY_ID,
|
||||
.name = "Qualcomm Atheros AR8030",
|
||||
.phy_id_mask = AT8030_PHY_ID_MASK,
|
||||
- .probe = at803x_probe,
|
||||
+ .probe = at8035_probe,
|
||||
.config_init = at803x_config_init,
|
||||
.link_change_notify = at803x_link_change_notify,
|
||||
.set_wol = at803x_set_wol,
|
||||
@ -0,0 +1,219 @@
|
||||
From ef9df47b449e32e06501a11272809be49019bdb6 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 8 Dec 2023 15:52:00 +0100
|
||||
Subject: [PATCH 13/13] net: phy: at803x: drop specific PHY ID check from cable
|
||||
test functions
|
||||
|
||||
Drop specific PHY ID check for cable test functions for at803x. This is
|
||||
done to make functions more generic. While at it better describe what
|
||||
the functions does by using more symbolic function names.
|
||||
|
||||
PHYs that requires to set additional reg are moved to specific function
|
||||
calling the more generic one.
|
||||
|
||||
cdt_start and cdt_wait_for_completion are changed to take an additional
|
||||
arg to pass specific values specific to the PHY.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 95 +++++++++++++++++++++-------------------
|
||||
1 file changed, 50 insertions(+), 45 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -1222,31 +1222,16 @@ static int at803x_cdt_fault_length(u16 s
|
||||
return (dt * 824) / 10;
|
||||
}
|
||||
|
||||
-static int at803x_cdt_start(struct phy_device *phydev, int pair)
|
||||
+static int at803x_cdt_start(struct phy_device *phydev,
|
||||
+ u32 cdt_start)
|
||||
{
|
||||
- u16 cdt;
|
||||
-
|
||||
- /* qca8081 takes the different bit 15 to enable CDT test */
|
||||
- if (phydev->drv->phy_id == QCA8081_PHY_ID)
|
||||
- cdt = QCA808X_CDT_ENABLE_TEST |
|
||||
- QCA808X_CDT_LENGTH_UNIT |
|
||||
- QCA808X_CDT_INTER_CHECK_DIS;
|
||||
- else
|
||||
- cdt = FIELD_PREP(AT803X_CDT_MDI_PAIR_MASK, pair) |
|
||||
- AT803X_CDT_ENABLE_TEST;
|
||||
-
|
||||
- return phy_write(phydev, AT803X_CDT, cdt);
|
||||
+ return phy_write(phydev, AT803X_CDT, cdt_start);
|
||||
}
|
||||
|
||||
-static int at803x_cdt_wait_for_completion(struct phy_device *phydev)
|
||||
+static int at803x_cdt_wait_for_completion(struct phy_device *phydev,
|
||||
+ u32 cdt_en)
|
||||
{
|
||||
int val, ret;
|
||||
- u16 cdt_en;
|
||||
-
|
||||
- if (phydev->drv->phy_id == QCA8081_PHY_ID)
|
||||
- cdt_en = QCA808X_CDT_ENABLE_TEST;
|
||||
- else
|
||||
- cdt_en = AT803X_CDT_ENABLE_TEST;
|
||||
|
||||
/* One test run takes about 25ms */
|
||||
ret = phy_read_poll_timeout(phydev, AT803X_CDT, val,
|
||||
@@ -1266,11 +1251,13 @@ static int at803x_cable_test_one_pair(st
|
||||
};
|
||||
int ret, val;
|
||||
|
||||
- ret = at803x_cdt_start(phydev, pair);
|
||||
+ val = FIELD_PREP(AT803X_CDT_MDI_PAIR_MASK, pair) |
|
||||
+ AT803X_CDT_ENABLE_TEST;
|
||||
+ ret = at803x_cdt_start(phydev, val);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- ret = at803x_cdt_wait_for_completion(phydev);
|
||||
+ ret = at803x_cdt_wait_for_completion(phydev, AT803X_CDT_ENABLE_TEST);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -1292,19 +1279,11 @@ static int at803x_cable_test_one_pair(st
|
||||
}
|
||||
|
||||
static int at803x_cable_test_get_status(struct phy_device *phydev,
|
||||
- bool *finished)
|
||||
+ bool *finished, unsigned long pair_mask)
|
||||
{
|
||||
- unsigned long pair_mask;
|
||||
int retries = 20;
|
||||
int pair, ret;
|
||||
|
||||
- if (phydev->phy_id == ATH9331_PHY_ID ||
|
||||
- phydev->phy_id == ATH8032_PHY_ID ||
|
||||
- phydev->phy_id == QCA9561_PHY_ID)
|
||||
- pair_mask = 0x3;
|
||||
- else
|
||||
- pair_mask = 0xf;
|
||||
-
|
||||
*finished = false;
|
||||
|
||||
/* According to the datasheet the CDT can be performed when
|
||||
@@ -1331,7 +1310,7 @@ static int at803x_cable_test_get_status(
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int at803x_cable_test_start(struct phy_device *phydev)
|
||||
+static void at803x_cable_test_autoneg(struct phy_device *phydev)
|
||||
{
|
||||
/* Enable auto-negotiation, but advertise no capabilities, no link
|
||||
* will be established. A restart of the auto-negotiation is not
|
||||
@@ -1339,11 +1318,11 @@ static int at803x_cable_test_start(struc
|
||||
*/
|
||||
phy_write(phydev, MII_BMCR, BMCR_ANENABLE);
|
||||
phy_write(phydev, MII_ADVERTISE, ADVERTISE_CSMA);
|
||||
- if (phydev->phy_id != ATH9331_PHY_ID &&
|
||||
- phydev->phy_id != ATH8032_PHY_ID &&
|
||||
- phydev->phy_id != QCA9561_PHY_ID)
|
||||
- phy_write(phydev, MII_CTRL1000, 0);
|
||||
+}
|
||||
|
||||
+static int at803x_cable_test_start(struct phy_device *phydev)
|
||||
+{
|
||||
+ at803x_cable_test_autoneg(phydev);
|
||||
/* we do all the (time consuming) work later */
|
||||
return 0;
|
||||
}
|
||||
@@ -1618,6 +1597,29 @@ static int at8031_config_intr(struct phy
|
||||
return at803x_config_intr(phydev);
|
||||
}
|
||||
|
||||
+/* AR8031 and AR8035 share the same cable test get status reg */
|
||||
+static int at8031_cable_test_get_status(struct phy_device *phydev,
|
||||
+ bool *finished)
|
||||
+{
|
||||
+ return at803x_cable_test_get_status(phydev, finished, 0xf);
|
||||
+}
|
||||
+
|
||||
+/* AR8031 and AR8035 share the same cable test start logic */
|
||||
+static int at8031_cable_test_start(struct phy_device *phydev)
|
||||
+{
|
||||
+ at803x_cable_test_autoneg(phydev);
|
||||
+ phy_write(phydev, MII_CTRL1000, 0);
|
||||
+ /* we do all the (time consuming) work later */
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/* AR8032, AR9331 and QCA9561 share the same cable test get status reg */
|
||||
+static int at8032_cable_test_get_status(struct phy_device *phydev,
|
||||
+ bool *finished)
|
||||
+{
|
||||
+ return at803x_cable_test_get_status(phydev, finished, 0x3);
|
||||
+}
|
||||
+
|
||||
static int at8035_parse_dt(struct phy_device *phydev)
|
||||
{
|
||||
struct at803x_priv *priv = phydev->priv;
|
||||
@@ -2041,11 +2043,14 @@ static int qca808x_cable_test_get_status
|
||||
|
||||
*finished = false;
|
||||
|
||||
- ret = at803x_cdt_start(phydev, 0);
|
||||
+ val = QCA808X_CDT_ENABLE_TEST |
|
||||
+ QCA808X_CDT_LENGTH_UNIT |
|
||||
+ QCA808X_CDT_INTER_CHECK_DIS;
|
||||
+ ret = at803x_cdt_start(phydev, val);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- ret = at803x_cdt_wait_for_completion(phydev);
|
||||
+ ret = at803x_cdt_wait_for_completion(phydev, QCA808X_CDT_ENABLE_TEST);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -2143,8 +2148,8 @@ static struct phy_driver at803x_driver[]
|
||||
.handle_interrupt = at803x_handle_interrupt,
|
||||
.get_tunable = at803x_get_tunable,
|
||||
.set_tunable = at803x_set_tunable,
|
||||
- .cable_test_start = at803x_cable_test_start,
|
||||
- .cable_test_get_status = at803x_cable_test_get_status,
|
||||
+ .cable_test_start = at8031_cable_test_start,
|
||||
+ .cable_test_get_status = at8031_cable_test_get_status,
|
||||
}, {
|
||||
/* Qualcomm Atheros AR8030 */
|
||||
.phy_id = ATH8030_PHY_ID,
|
||||
@@ -2181,8 +2186,8 @@ static struct phy_driver at803x_driver[]
|
||||
.handle_interrupt = at803x_handle_interrupt,
|
||||
.get_tunable = at803x_get_tunable,
|
||||
.set_tunable = at803x_set_tunable,
|
||||
- .cable_test_start = at803x_cable_test_start,
|
||||
- .cable_test_get_status = at803x_cable_test_get_status,
|
||||
+ .cable_test_start = at8031_cable_test_start,
|
||||
+ .cable_test_get_status = at8031_cable_test_get_status,
|
||||
}, {
|
||||
/* Qualcomm Atheros AR8032 */
|
||||
PHY_ID_MATCH_EXACT(ATH8032_PHY_ID),
|
||||
@@ -2197,7 +2202,7 @@ static struct phy_driver at803x_driver[]
|
||||
.config_intr = at803x_config_intr,
|
||||
.handle_interrupt = at803x_handle_interrupt,
|
||||
.cable_test_start = at803x_cable_test_start,
|
||||
- .cable_test_get_status = at803x_cable_test_get_status,
|
||||
+ .cable_test_get_status = at8032_cable_test_get_status,
|
||||
}, {
|
||||
/* ATHEROS AR9331 */
|
||||
PHY_ID_MATCH_EXACT(ATH9331_PHY_ID),
|
||||
@@ -2210,7 +2215,7 @@ static struct phy_driver at803x_driver[]
|
||||
.config_intr = at803x_config_intr,
|
||||
.handle_interrupt = at803x_handle_interrupt,
|
||||
.cable_test_start = at803x_cable_test_start,
|
||||
- .cable_test_get_status = at803x_cable_test_get_status,
|
||||
+ .cable_test_get_status = at8032_cable_test_get_status,
|
||||
.read_status = at803x_read_status,
|
||||
.soft_reset = genphy_soft_reset,
|
||||
.config_aneg = at803x_config_aneg,
|
||||
@@ -2226,7 +2231,7 @@ static struct phy_driver at803x_driver[]
|
||||
.config_intr = at803x_config_intr,
|
||||
.handle_interrupt = at803x_handle_interrupt,
|
||||
.cable_test_start = at803x_cable_test_start,
|
||||
- .cable_test_get_status = at803x_cable_test_get_status,
|
||||
+ .cable_test_get_status = at8032_cable_test_get_status,
|
||||
.read_status = at803x_read_status,
|
||||
.soft_reset = genphy_soft_reset,
|
||||
.config_aneg = at803x_config_aneg,
|
||||
@ -0,0 +1,116 @@
|
||||
From 8e732f1c6f2dc5e18f766d0f1b11df9db2dd044a Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Thu, 14 Dec 2023 01:44:31 +0100
|
||||
Subject: [PATCH 1/2] net: phy: at803x: move specific qca808x config_aneg to
|
||||
dedicated function
|
||||
|
||||
Move specific qca808x config_aneg to dedicated function to permit easier
|
||||
split of qca808x portion from at803x driver.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 66 ++++++++++++++++++++++++----------------
|
||||
1 file changed, 40 insertions(+), 26 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -1045,9 +1045,8 @@ static int at803x_config_mdix(struct phy
|
||||
FIELD_PREP(AT803X_SFC_MDI_CROSSOVER_MODE_M, val));
|
||||
}
|
||||
|
||||
-static int at803x_config_aneg(struct phy_device *phydev)
|
||||
+static int at803x_prepare_config_aneg(struct phy_device *phydev)
|
||||
{
|
||||
- struct at803x_priv *priv = phydev->priv;
|
||||
int ret;
|
||||
|
||||
ret = at803x_config_mdix(phydev, phydev->mdix_ctrl);
|
||||
@@ -1064,33 +1063,22 @@ static int at803x_config_aneg(struct phy
|
||||
return ret;
|
||||
}
|
||||
|
||||
- if (priv->is_1000basex)
|
||||
- return genphy_c37_config_aneg(phydev);
|
||||
-
|
||||
- /* Do not restart auto-negotiation by setting ret to 0 defautly,
|
||||
- * when calling __genphy_config_aneg later.
|
||||
- */
|
||||
- ret = 0;
|
||||
-
|
||||
- if (phydev->drv->phy_id == QCA8081_PHY_ID) {
|
||||
- int phy_ctrl = 0;
|
||||
+ return 0;
|
||||
+}
|
||||
|
||||
- /* The reg MII_BMCR also needs to be configured for force mode, the
|
||||
- * genphy_config_aneg is also needed.
|
||||
- */
|
||||
- if (phydev->autoneg == AUTONEG_DISABLE)
|
||||
- genphy_c45_pma_setup_forced(phydev);
|
||||
+static int at803x_config_aneg(struct phy_device *phydev)
|
||||
+{
|
||||
+ struct at803x_priv *priv = phydev->priv;
|
||||
+ int ret;
|
||||
|
||||
- if (linkmode_test_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT, phydev->advertising))
|
||||
- phy_ctrl = MDIO_AN_10GBT_CTRL_ADV2_5G;
|
||||
+ ret = at803x_prepare_config_aneg(phydev);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
|
||||
- ret = phy_modify_mmd_changed(phydev, MDIO_MMD_AN, MDIO_AN_10GBT_CTRL,
|
||||
- MDIO_AN_10GBT_CTRL_ADV2_5G, phy_ctrl);
|
||||
- if (ret < 0)
|
||||
- return ret;
|
||||
- }
|
||||
+ if (priv->is_1000basex)
|
||||
+ return genphy_c37_config_aneg(phydev);
|
||||
|
||||
- return __genphy_config_aneg(phydev, ret);
|
||||
+ return genphy_config_aneg(phydev);
|
||||
}
|
||||
|
||||
static int at803x_get_downshift(struct phy_device *phydev, u8 *d)
|
||||
@@ -2118,6 +2106,32 @@ static int qca808x_get_features(struct p
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int qca808x_config_aneg(struct phy_device *phydev)
|
||||
+{
|
||||
+ int phy_ctrl = 0;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = at803x_prepare_config_aneg(phydev);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* The reg MII_BMCR also needs to be configured for force mode, the
|
||||
+ * genphy_config_aneg is also needed.
|
||||
+ */
|
||||
+ if (phydev->autoneg == AUTONEG_DISABLE)
|
||||
+ genphy_c45_pma_setup_forced(phydev);
|
||||
+
|
||||
+ if (linkmode_test_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT, phydev->advertising))
|
||||
+ phy_ctrl = MDIO_AN_10GBT_CTRL_ADV2_5G;
|
||||
+
|
||||
+ ret = phy_modify_mmd_changed(phydev, MDIO_MMD_AN, MDIO_AN_10GBT_CTRL,
|
||||
+ MDIO_AN_10GBT_CTRL_ADV2_5G, phy_ctrl);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ return __genphy_config_aneg(phydev, ret);
|
||||
+}
|
||||
+
|
||||
static void qca808x_link_change_notify(struct phy_device *phydev)
|
||||
{
|
||||
/* Assert interface sgmii fifo on link down, deassert it on link up,
|
||||
@@ -2295,7 +2309,7 @@ static struct phy_driver at803x_driver[]
|
||||
.set_wol = at803x_set_wol,
|
||||
.get_wol = at803x_get_wol,
|
||||
.get_features = qca808x_get_features,
|
||||
- .config_aneg = at803x_config_aneg,
|
||||
+ .config_aneg = qca808x_config_aneg,
|
||||
.suspend = genphy_suspend,
|
||||
.resume = genphy_resume,
|
||||
.read_status = qca808x_read_status,
|
||||
@ -0,0 +1,97 @@
|
||||
From 38eb804e8458ba181a03a0498ce4bf84eebd1931 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Thu, 14 Dec 2023 01:44:32 +0100
|
||||
Subject: [PATCH 2/2] net: phy: at803x: make read specific status function more
|
||||
generic
|
||||
|
||||
Rework read specific status function to be more generic. The function
|
||||
apply different speed mask based on the PHY ID. Make it more generic by
|
||||
adding an additional arg to pass the specific speed (ss) mask and use
|
||||
the provided mask to parse the speed value.
|
||||
|
||||
This is needed to permit an easier deatch of qca808x code from the
|
||||
at803x driver.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 26 ++++++++++++++++++--------
|
||||
1 file changed, 18 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -301,6 +301,11 @@ static struct at803x_hw_stat qca83xx_hw_
|
||||
{ "eee_wake_errors", 0x16, GENMASK(15, 0), MMD},
|
||||
};
|
||||
|
||||
+struct at803x_ss_mask {
|
||||
+ u16 speed_mask;
|
||||
+ u8 speed_shift;
|
||||
+};
|
||||
+
|
||||
struct at803x_priv {
|
||||
int flags;
|
||||
u16 clk_25m_reg;
|
||||
@@ -921,7 +926,8 @@ static void at803x_link_change_notify(st
|
||||
}
|
||||
}
|
||||
|
||||
-static int at803x_read_specific_status(struct phy_device *phydev)
|
||||
+static int at803x_read_specific_status(struct phy_device *phydev,
|
||||
+ struct at803x_ss_mask ss_mask)
|
||||
{
|
||||
int ss;
|
||||
|
||||
@@ -940,11 +946,8 @@ static int at803x_read_specific_status(s
|
||||
if (sfc < 0)
|
||||
return sfc;
|
||||
|
||||
- /* qca8081 takes the different bits for speed value from at803x */
|
||||
- if (phydev->drv->phy_id == QCA8081_PHY_ID)
|
||||
- speed = FIELD_GET(QCA808X_SS_SPEED_MASK, ss);
|
||||
- else
|
||||
- speed = FIELD_GET(AT803X_SS_SPEED_MASK, ss);
|
||||
+ speed = ss & ss_mask.speed_mask;
|
||||
+ speed >>= ss_mask.speed_shift;
|
||||
|
||||
switch (speed) {
|
||||
case AT803X_SS_SPEED_10:
|
||||
@@ -989,6 +992,7 @@ static int at803x_read_specific_status(s
|
||||
static int at803x_read_status(struct phy_device *phydev)
|
||||
{
|
||||
struct at803x_priv *priv = phydev->priv;
|
||||
+ struct at803x_ss_mask ss_mask = { 0 };
|
||||
int err, old_link = phydev->link;
|
||||
|
||||
if (priv->is_1000basex)
|
||||
@@ -1012,7 +1016,9 @@ static int at803x_read_status(struct phy
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
- err = at803x_read_specific_status(phydev);
|
||||
+ ss_mask.speed_mask = AT803X_SS_SPEED_MASK;
|
||||
+ ss_mask.speed_shift = __bf_shf(AT803X_SS_SPEED_MASK);
|
||||
+ err = at803x_read_specific_status(phydev, ss_mask);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
@@ -1869,6 +1875,7 @@ static int qca808x_config_init(struct ph
|
||||
|
||||
static int qca808x_read_status(struct phy_device *phydev)
|
||||
{
|
||||
+ struct at803x_ss_mask ss_mask = { 0 };
|
||||
int ret;
|
||||
|
||||
ret = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_10GBT_STAT);
|
||||
@@ -1882,7 +1889,10 @@ static int qca808x_read_status(struct ph
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- ret = at803x_read_specific_status(phydev);
|
||||
+ /* qca8081 takes the different bits for speed value from at803x */
|
||||
+ ss_mask.speed_mask = QCA808X_SS_SPEED_MASK;
|
||||
+ ss_mask.speed_shift = __bf_shf(QCA808X_SS_SPEED_MASK);
|
||||
+ ret = at803x_read_specific_status(phydev, ss_mask);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
From fc9d7264ddc32eaa647d6bfcdc25cdf9f786fde0 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Mon, 18 Dec 2023 00:27:39 +0100
|
||||
Subject: [PATCH 1/2] net: phy: at803x: remove extra space after cast
|
||||
|
||||
Remove extra space after cast as reported by checkpatch to keep code
|
||||
clean.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Link: https://lore.kernel.org/r/20231217232739.27065-1-ansuelsmth@gmail.com
|
||||
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -462,7 +462,7 @@ static int at803x_set_wol(struct phy_dev
|
||||
if (!ndev)
|
||||
return -ENODEV;
|
||||
|
||||
- mac = (const u8 *) ndev->dev_addr;
|
||||
+ mac = (const u8 *)ndev->dev_addr;
|
||||
|
||||
if (!is_valid_ether_addr(mac))
|
||||
return -EINVAL;
|
||||
@ -0,0 +1,38 @@
|
||||
From 3ab5720881a924fb6405d9e6a3b09f1026467c47 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Mon, 18 Dec 2023 00:25:08 +0100
|
||||
Subject: [PATCH 2/2] net: phy: at803x: replace msleep(1) with usleep_range
|
||||
|
||||
Replace msleep(1) with usleep_range as suggested by timers-howto guide.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Link: https://lore.kernel.org/r/20231217232508.26470-1-ansuelsmth@gmail.com
|
||||
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -916,9 +916,9 @@ static void at803x_link_change_notify(st
|
||||
at803x_context_save(phydev, &context);
|
||||
|
||||
phy_device_reset(phydev, 1);
|
||||
- msleep(1);
|
||||
+ usleep_range(1000, 2000);
|
||||
phy_device_reset(phydev, 0);
|
||||
- msleep(1);
|
||||
+ usleep_range(1000, 2000);
|
||||
|
||||
at803x_context_restore(phydev, &context);
|
||||
|
||||
@@ -1733,7 +1733,7 @@ static int qca83xx_resume(struct phy_dev
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- msleep(1);
|
||||
+ usleep_range(1000, 2000);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -0,0 +1,152 @@
|
||||
From 7961ef1fa10ec35ad6923fb5751877116e4b035b Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Tue, 19 Dec 2023 21:21:24 +0100
|
||||
Subject: [PATCH] net: phy: at803x: better align function varibles to open
|
||||
parenthesis
|
||||
|
||||
Better align function variables to open parenthesis as suggested by
|
||||
checkpatch script for qca808x function to make code cleaner.
|
||||
|
||||
For cable_test_get_status function some additional rework was needed to
|
||||
handle too long functions.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 67 ++++++++++++++++++++++------------------
|
||||
1 file changed, 37 insertions(+), 30 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -1781,27 +1781,27 @@ static int qca808x_phy_fast_retrain_conf
|
||||
return ret;
|
||||
|
||||
phy_write_mmd(phydev, MDIO_MMD_AN, QCA808X_PHY_MMD7_TOP_OPTION1,
|
||||
- QCA808X_TOP_OPTION1_DATA);
|
||||
+ QCA808X_TOP_OPTION1_DATA);
|
||||
phy_write_mmd(phydev, MDIO_MMD_PMAPMD, QCA808X_PHY_MMD1_MSE_THRESHOLD_20DB,
|
||||
- QCA808X_MSE_THRESHOLD_20DB_VALUE);
|
||||
+ QCA808X_MSE_THRESHOLD_20DB_VALUE);
|
||||
phy_write_mmd(phydev, MDIO_MMD_PMAPMD, QCA808X_PHY_MMD1_MSE_THRESHOLD_17DB,
|
||||
- QCA808X_MSE_THRESHOLD_17DB_VALUE);
|
||||
+ QCA808X_MSE_THRESHOLD_17DB_VALUE);
|
||||
phy_write_mmd(phydev, MDIO_MMD_PMAPMD, QCA808X_PHY_MMD1_MSE_THRESHOLD_27DB,
|
||||
- QCA808X_MSE_THRESHOLD_27DB_VALUE);
|
||||
+ QCA808X_MSE_THRESHOLD_27DB_VALUE);
|
||||
phy_write_mmd(phydev, MDIO_MMD_PMAPMD, QCA808X_PHY_MMD1_MSE_THRESHOLD_28DB,
|
||||
- QCA808X_MSE_THRESHOLD_28DB_VALUE);
|
||||
+ QCA808X_MSE_THRESHOLD_28DB_VALUE);
|
||||
phy_write_mmd(phydev, MDIO_MMD_PCS, QCA808X_PHY_MMD3_DEBUG_1,
|
||||
- QCA808X_MMD3_DEBUG_1_VALUE);
|
||||
+ QCA808X_MMD3_DEBUG_1_VALUE);
|
||||
phy_write_mmd(phydev, MDIO_MMD_PCS, QCA808X_PHY_MMD3_DEBUG_4,
|
||||
- QCA808X_MMD3_DEBUG_4_VALUE);
|
||||
+ QCA808X_MMD3_DEBUG_4_VALUE);
|
||||
phy_write_mmd(phydev, MDIO_MMD_PCS, QCA808X_PHY_MMD3_DEBUG_5,
|
||||
- QCA808X_MMD3_DEBUG_5_VALUE);
|
||||
+ QCA808X_MMD3_DEBUG_5_VALUE);
|
||||
phy_write_mmd(phydev, MDIO_MMD_PCS, QCA808X_PHY_MMD3_DEBUG_3,
|
||||
- QCA808X_MMD3_DEBUG_3_VALUE);
|
||||
+ QCA808X_MMD3_DEBUG_3_VALUE);
|
||||
phy_write_mmd(phydev, MDIO_MMD_PCS, QCA808X_PHY_MMD3_DEBUG_6,
|
||||
- QCA808X_MMD3_DEBUG_6_VALUE);
|
||||
+ QCA808X_MMD3_DEBUG_6_VALUE);
|
||||
phy_write_mmd(phydev, MDIO_MMD_PCS, QCA808X_PHY_MMD3_DEBUG_2,
|
||||
- QCA808X_MMD3_DEBUG_2_VALUE);
|
||||
+ QCA808X_MMD3_DEBUG_2_VALUE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1838,13 +1838,14 @@ static int qca808x_config_init(struct ph
|
||||
|
||||
/* Active adc&vga on 802.3az for the link 1000M and 100M */
|
||||
ret = phy_modify_mmd(phydev, MDIO_MMD_PCS, QCA808X_PHY_MMD3_ADDR_CLD_CTRL7,
|
||||
- QCA808X_8023AZ_AFE_CTRL_MASK, QCA808X_8023AZ_AFE_EN);
|
||||
+ QCA808X_8023AZ_AFE_CTRL_MASK, QCA808X_8023AZ_AFE_EN);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Adjust the threshold on 802.3az for the link 1000M */
|
||||
ret = phy_write_mmd(phydev, MDIO_MMD_PCS,
|
||||
- QCA808X_PHY_MMD3_AZ_TRAINING_CTRL, QCA808X_MMD3_AZ_TRAINING_VAL);
|
||||
+ QCA808X_PHY_MMD3_AZ_TRAINING_CTRL,
|
||||
+ QCA808X_MMD3_AZ_TRAINING_VAL);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -1870,7 +1871,8 @@ static int qca808x_config_init(struct ph
|
||||
|
||||
/* Configure adc threshold as 100mv for the link 10M */
|
||||
return at803x_debug_reg_mask(phydev, QCA808X_PHY_DEBUG_ADC_THRESHOLD,
|
||||
- QCA808X_ADC_THRESHOLD_MASK, QCA808X_ADC_THRESHOLD_100MV);
|
||||
+ QCA808X_ADC_THRESHOLD_MASK,
|
||||
+ QCA808X_ADC_THRESHOLD_100MV);
|
||||
}
|
||||
|
||||
static int qca808x_read_status(struct phy_device *phydev)
|
||||
@@ -1883,7 +1885,7 @@ static int qca808x_read_status(struct ph
|
||||
return ret;
|
||||
|
||||
linkmode_mod_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT, phydev->lp_advertising,
|
||||
- ret & MDIO_AN_10GBT_STAT_LP2_5G);
|
||||
+ ret & MDIO_AN_10GBT_STAT_LP2_5G);
|
||||
|
||||
ret = genphy_read_status(phydev);
|
||||
if (ret)
|
||||
@@ -1913,7 +1915,7 @@ static int qca808x_read_status(struct ph
|
||||
*/
|
||||
if (qca808x_has_fast_retrain_or_slave_seed(phydev)) {
|
||||
if (phydev->master_slave_state == MASTER_SLAVE_STATE_ERR ||
|
||||
- qca808x_is_prefer_master(phydev)) {
|
||||
+ qca808x_is_prefer_master(phydev)) {
|
||||
qca808x_phy_ms_seed_enable(phydev, false);
|
||||
} else {
|
||||
qca808x_phy_ms_seed_enable(phydev, true);
|
||||
@@ -2070,18 +2072,22 @@ static int qca808x_cable_test_get_status
|
||||
ethnl_cable_test_result(phydev, ETHTOOL_A_CABLE_PAIR_D,
|
||||
qca808x_cable_test_result_trans(pair_d));
|
||||
|
||||
- if (qca808x_cdt_fault_length_valid(pair_a))
|
||||
- ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_A,
|
||||
- qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_A));
|
||||
- if (qca808x_cdt_fault_length_valid(pair_b))
|
||||
- ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_B,
|
||||
- qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_B));
|
||||
- if (qca808x_cdt_fault_length_valid(pair_c))
|
||||
- ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_C,
|
||||
- qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_C));
|
||||
- if (qca808x_cdt_fault_length_valid(pair_d))
|
||||
- ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_D,
|
||||
- qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_D));
|
||||
+ if (qca808x_cdt_fault_length_valid(pair_a)) {
|
||||
+ val = qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_A);
|
||||
+ ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_A, val);
|
||||
+ }
|
||||
+ if (qca808x_cdt_fault_length_valid(pair_b)) {
|
||||
+ val = qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_B);
|
||||
+ ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_B, val);
|
||||
+ }
|
||||
+ if (qca808x_cdt_fault_length_valid(pair_c)) {
|
||||
+ val = qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_C);
|
||||
+ ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_C, val);
|
||||
+ }
|
||||
+ if (qca808x_cdt_fault_length_valid(pair_d)) {
|
||||
+ val = qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_D);
|
||||
+ ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_D, val);
|
||||
+ }
|
||||
|
||||
*finished = true;
|
||||
|
||||
@@ -2148,8 +2154,9 @@ static void qca808x_link_change_notify(s
|
||||
* the interface device address is always phy address added by 1.
|
||||
*/
|
||||
mdiobus_c45_modify_changed(phydev->mdio.bus, phydev->mdio.addr + 1,
|
||||
- MDIO_MMD_PMAPMD, QCA8081_PHY_SERDES_MMD1_FIFO_CTRL,
|
||||
- QCA8081_PHY_FIFO_RSTN, phydev->link ? QCA8081_PHY_FIFO_RSTN : 0);
|
||||
+ MDIO_MMD_PMAPMD, QCA8081_PHY_SERDES_MMD1_FIFO_CTRL,
|
||||
+ QCA8081_PHY_FIFO_RSTN,
|
||||
+ phydev->link ? QCA8081_PHY_FIFO_RSTN : 0);
|
||||
}
|
||||
|
||||
static struct phy_driver at803x_driver[] = {
|
||||
@ -0,0 +1,62 @@
|
||||
From 22eb276098da820d9440fad22901f9b74ed4d659 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Thu, 4 Jan 2024 22:30:38 +0100
|
||||
Subject: [PATCH 1/4] net: phy: at803x: generalize cdt fault length function
|
||||
|
||||
Generalize cable test fault length function since they all base on the
|
||||
same magic values (already reverse engineered to understand the meaning
|
||||
of it) to have consistenct values on every PHY.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Simon Horman <horms@kernel.org>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 13 ++++++-------
|
||||
1 file changed, 6 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -1192,10 +1192,8 @@ static bool at803x_cdt_fault_length_vali
|
||||
return false;
|
||||
}
|
||||
|
||||
-static int at803x_cdt_fault_length(u16 status)
|
||||
+static int at803x_cdt_fault_length(int dt)
|
||||
{
|
||||
- int dt;
|
||||
-
|
||||
/* According to the datasheet the distance to the fault is
|
||||
* DELTA_TIME * 0.824 meters.
|
||||
*
|
||||
@@ -1211,8 +1209,6 @@ static int at803x_cdt_fault_length(u16 s
|
||||
* With a VF of 0.69 we get the factor 0.824 mentioned in the
|
||||
* datasheet.
|
||||
*/
|
||||
- dt = FIELD_GET(AT803X_CDT_STATUS_DELTA_TIME_MASK, status);
|
||||
-
|
||||
return (dt * 824) / 10;
|
||||
}
|
||||
|
||||
@@ -1265,9 +1261,11 @@ static int at803x_cable_test_one_pair(st
|
||||
ethnl_cable_test_result(phydev, ethtool_pair[pair],
|
||||
at803x_cable_test_result_trans(val));
|
||||
|
||||
- if (at803x_cdt_fault_length_valid(val))
|
||||
+ if (at803x_cdt_fault_length_valid(val)) {
|
||||
+ val = FIELD_GET(AT803X_CDT_STATUS_DELTA_TIME_MASK, val);
|
||||
ethnl_cable_test_fault_length(phydev, ethtool_pair[pair],
|
||||
at803x_cdt_fault_length(val));
|
||||
+ }
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -1992,7 +1990,8 @@ static int qca808x_cdt_fault_length(stru
|
||||
if (val < 0)
|
||||
return val;
|
||||
|
||||
- return (FIELD_GET(QCA808X_CDT_DIAG_LENGTH, val) * 824) / 10;
|
||||
+ val = FIELD_GET(QCA808X_CDT_DIAG_LENGTH, val);
|
||||
+ return at803x_cdt_fault_length(val);
|
||||
}
|
||||
|
||||
static int qca808x_cable_test_start(struct phy_device *phydev)
|
||||
@ -0,0 +1,118 @@
|
||||
From e0e9ada1df6133513249861c1d91c1dbefd9383b Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Thu, 4 Jan 2024 22:30:39 +0100
|
||||
Subject: [PATCH 2/4] net: phy: at803x: refactor qca808x cable test get status
|
||||
function
|
||||
|
||||
Refactor qca808x cable test get status function to remove code
|
||||
duplication and clean things up.
|
||||
|
||||
The same logic is applied to each pair hence it can be generalized and
|
||||
moved to a common function.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Simon Horman <horms@kernel.org>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 80 ++++++++++++++++++++++++----------------
|
||||
1 file changed, 49 insertions(+), 31 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -2035,10 +2035,43 @@ static int qca808x_cable_test_start(stru
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int qca808x_cable_test_get_pair_status(struct phy_device *phydev, u8 pair,
|
||||
+ u16 status)
|
||||
+{
|
||||
+ u16 pair_code;
|
||||
+ int length;
|
||||
+
|
||||
+ switch (pair) {
|
||||
+ case ETHTOOL_A_CABLE_PAIR_A:
|
||||
+ pair_code = FIELD_GET(QCA808X_CDT_CODE_PAIR_A, status);
|
||||
+ break;
|
||||
+ case ETHTOOL_A_CABLE_PAIR_B:
|
||||
+ pair_code = FIELD_GET(QCA808X_CDT_CODE_PAIR_B, status);
|
||||
+ break;
|
||||
+ case ETHTOOL_A_CABLE_PAIR_C:
|
||||
+ pair_code = FIELD_GET(QCA808X_CDT_CODE_PAIR_C, status);
|
||||
+ break;
|
||||
+ case ETHTOOL_A_CABLE_PAIR_D:
|
||||
+ pair_code = FIELD_GET(QCA808X_CDT_CODE_PAIR_D, status);
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ ethnl_cable_test_result(phydev, pair,
|
||||
+ qca808x_cable_test_result_trans(pair_code));
|
||||
+
|
||||
+ if (qca808x_cdt_fault_length_valid(pair_code)) {
|
||||
+ length = qca808x_cdt_fault_length(phydev, pair);
|
||||
+ ethnl_cable_test_fault_length(phydev, pair, length);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int qca808x_cable_test_get_status(struct phy_device *phydev, bool *finished)
|
||||
{
|
||||
int ret, val;
|
||||
- int pair_a, pair_b, pair_c, pair_d;
|
||||
|
||||
*finished = false;
|
||||
|
||||
@@ -2057,36 +2090,21 @@ static int qca808x_cable_test_get_status
|
||||
if (val < 0)
|
||||
return val;
|
||||
|
||||
- pair_a = FIELD_GET(QCA808X_CDT_CODE_PAIR_A, val);
|
||||
- pair_b = FIELD_GET(QCA808X_CDT_CODE_PAIR_B, val);
|
||||
- pair_c = FIELD_GET(QCA808X_CDT_CODE_PAIR_C, val);
|
||||
- pair_d = FIELD_GET(QCA808X_CDT_CODE_PAIR_D, val);
|
||||
-
|
||||
- ethnl_cable_test_result(phydev, ETHTOOL_A_CABLE_PAIR_A,
|
||||
- qca808x_cable_test_result_trans(pair_a));
|
||||
- ethnl_cable_test_result(phydev, ETHTOOL_A_CABLE_PAIR_B,
|
||||
- qca808x_cable_test_result_trans(pair_b));
|
||||
- ethnl_cable_test_result(phydev, ETHTOOL_A_CABLE_PAIR_C,
|
||||
- qca808x_cable_test_result_trans(pair_c));
|
||||
- ethnl_cable_test_result(phydev, ETHTOOL_A_CABLE_PAIR_D,
|
||||
- qca808x_cable_test_result_trans(pair_d));
|
||||
-
|
||||
- if (qca808x_cdt_fault_length_valid(pair_a)) {
|
||||
- val = qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_A);
|
||||
- ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_A, val);
|
||||
- }
|
||||
- if (qca808x_cdt_fault_length_valid(pair_b)) {
|
||||
- val = qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_B);
|
||||
- ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_B, val);
|
||||
- }
|
||||
- if (qca808x_cdt_fault_length_valid(pair_c)) {
|
||||
- val = qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_C);
|
||||
- ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_C, val);
|
||||
- }
|
||||
- if (qca808x_cdt_fault_length_valid(pair_d)) {
|
||||
- val = qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_D);
|
||||
- ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_D, val);
|
||||
- }
|
||||
+ ret = qca808x_cable_test_get_pair_status(phydev, ETHTOOL_A_CABLE_PAIR_A, val);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = qca808x_cable_test_get_pair_status(phydev, ETHTOOL_A_CABLE_PAIR_B, val);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = qca808x_cable_test_get_pair_status(phydev, ETHTOOL_A_CABLE_PAIR_C, val);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = qca808x_cable_test_get_pair_status(phydev, ETHTOOL_A_CABLE_PAIR_D, val);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
|
||||
*finished = true;
|
||||
|
||||
@ -0,0 +1,182 @@
|
||||
From ea73e5ea442ee2aade67b1fb1233ccb3cbea2ceb Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Thu, 4 Jan 2024 22:30:40 +0100
|
||||
Subject: [PATCH 3/4] net: phy: at803x: add support for cdt cross short test
|
||||
for qca808x
|
||||
|
||||
QCA808x PHY Family supports Cable Diagnostic Test also for Cross Pair
|
||||
Short.
|
||||
|
||||
Add all the define to make enable and support these additional tests.
|
||||
|
||||
Cross Short test was previously disabled by default, this is now changed
|
||||
and enabled by default. In this mode, the mask changed a bit and length
|
||||
is shifted based on the fault condition.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Simon Horman <horms@kernel.org>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 86 ++++++++++++++++++++++++++++++++--------
|
||||
1 file changed, 69 insertions(+), 17 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -254,6 +254,7 @@
|
||||
|
||||
#define QCA808X_CDT_ENABLE_TEST BIT(15)
|
||||
#define QCA808X_CDT_INTER_CHECK_DIS BIT(13)
|
||||
+#define QCA808X_CDT_STATUS BIT(11)
|
||||
#define QCA808X_CDT_LENGTH_UNIT BIT(10)
|
||||
|
||||
#define QCA808X_MMD3_CDT_STATUS 0x8064
|
||||
@@ -261,16 +262,44 @@
|
||||
#define QCA808X_MMD3_CDT_DIAG_PAIR_B 0x8066
|
||||
#define QCA808X_MMD3_CDT_DIAG_PAIR_C 0x8067
|
||||
#define QCA808X_MMD3_CDT_DIAG_PAIR_D 0x8068
|
||||
-#define QCA808X_CDT_DIAG_LENGTH GENMASK(7, 0)
|
||||
+#define QCA808X_CDT_DIAG_LENGTH_SAME_SHORT GENMASK(15, 8)
|
||||
+#define QCA808X_CDT_DIAG_LENGTH_CROSS_SHORT GENMASK(7, 0)
|
||||
|
||||
#define QCA808X_CDT_CODE_PAIR_A GENMASK(15, 12)
|
||||
#define QCA808X_CDT_CODE_PAIR_B GENMASK(11, 8)
|
||||
#define QCA808X_CDT_CODE_PAIR_C GENMASK(7, 4)
|
||||
#define QCA808X_CDT_CODE_PAIR_D GENMASK(3, 0)
|
||||
-#define QCA808X_CDT_STATUS_STAT_FAIL 0
|
||||
-#define QCA808X_CDT_STATUS_STAT_NORMAL 1
|
||||
-#define QCA808X_CDT_STATUS_STAT_OPEN 2
|
||||
-#define QCA808X_CDT_STATUS_STAT_SHORT 3
|
||||
+
|
||||
+#define QCA808X_CDT_STATUS_STAT_TYPE GENMASK(1, 0)
|
||||
+#define QCA808X_CDT_STATUS_STAT_FAIL FIELD_PREP_CONST(QCA808X_CDT_STATUS_STAT_TYPE, 0)
|
||||
+#define QCA808X_CDT_STATUS_STAT_NORMAL FIELD_PREP_CONST(QCA808X_CDT_STATUS_STAT_TYPE, 1)
|
||||
+#define QCA808X_CDT_STATUS_STAT_SAME_OPEN FIELD_PREP_CONST(QCA808X_CDT_STATUS_STAT_TYPE, 2)
|
||||
+#define QCA808X_CDT_STATUS_STAT_SAME_SHORT FIELD_PREP_CONST(QCA808X_CDT_STATUS_STAT_TYPE, 3)
|
||||
+
|
||||
+#define QCA808X_CDT_STATUS_STAT_MDI GENMASK(3, 2)
|
||||
+#define QCA808X_CDT_STATUS_STAT_MDI1 FIELD_PREP_CONST(QCA808X_CDT_STATUS_STAT_MDI, 1)
|
||||
+#define QCA808X_CDT_STATUS_STAT_MDI2 FIELD_PREP_CONST(QCA808X_CDT_STATUS_STAT_MDI, 2)
|
||||
+#define QCA808X_CDT_STATUS_STAT_MDI3 FIELD_PREP_CONST(QCA808X_CDT_STATUS_STAT_MDI, 3)
|
||||
+
|
||||
+/* NORMAL are MDI with type set to 0 */
|
||||
+#define QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI1_SAME_NORMAL QCA808X_CDT_STATUS_STAT_MDI1
|
||||
+#define QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI1_SAME_OPEN (QCA808X_CDT_STATUS_STAT_SAME_OPEN |\
|
||||
+ QCA808X_CDT_STATUS_STAT_MDI1)
|
||||
+#define QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI1_SAME_SHORT (QCA808X_CDT_STATUS_STAT_SAME_SHORT |\
|
||||
+ QCA808X_CDT_STATUS_STAT_MDI1)
|
||||
+#define QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI2_SAME_NORMAL QCA808X_CDT_STATUS_STAT_MDI2
|
||||
+#define QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI2_SAME_OPEN (QCA808X_CDT_STATUS_STAT_SAME_OPEN |\
|
||||
+ QCA808X_CDT_STATUS_STAT_MDI2)
|
||||
+#define QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI2_SAME_SHORT (QCA808X_CDT_STATUS_STAT_SAME_SHORT |\
|
||||
+ QCA808X_CDT_STATUS_STAT_MDI2)
|
||||
+#define QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI3_SAME_NORMAL QCA808X_CDT_STATUS_STAT_MDI3
|
||||
+#define QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI3_SAME_OPEN (QCA808X_CDT_STATUS_STAT_SAME_OPEN |\
|
||||
+ QCA808X_CDT_STATUS_STAT_MDI3)
|
||||
+#define QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI3_SAME_SHORT (QCA808X_CDT_STATUS_STAT_SAME_SHORT |\
|
||||
+ QCA808X_CDT_STATUS_STAT_MDI3)
|
||||
+
|
||||
+/* Added for reference of existence but should be handled by wait_for_completion already */
|
||||
+#define QCA808X_CDT_STATUS_STAT_BUSY (BIT(1) | BIT(3))
|
||||
|
||||
/* QCA808X 1G chip type */
|
||||
#define QCA808X_PHY_MMD7_CHIP_TYPE 0x901d
|
||||
@@ -1941,8 +1970,17 @@ static int qca808x_soft_reset(struct phy
|
||||
static bool qca808x_cdt_fault_length_valid(int cdt_code)
|
||||
{
|
||||
switch (cdt_code) {
|
||||
- case QCA808X_CDT_STATUS_STAT_SHORT:
|
||||
- case QCA808X_CDT_STATUS_STAT_OPEN:
|
||||
+ case QCA808X_CDT_STATUS_STAT_SAME_SHORT:
|
||||
+ case QCA808X_CDT_STATUS_STAT_SAME_OPEN:
|
||||
+ case QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI1_SAME_NORMAL:
|
||||
+ case QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI1_SAME_OPEN:
|
||||
+ case QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI1_SAME_SHORT:
|
||||
+ case QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI2_SAME_NORMAL:
|
||||
+ case QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI2_SAME_OPEN:
|
||||
+ case QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI2_SAME_SHORT:
|
||||
+ case QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI3_SAME_NORMAL:
|
||||
+ case QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI3_SAME_OPEN:
|
||||
+ case QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI3_SAME_SHORT:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
@@ -1954,17 +1992,28 @@ static int qca808x_cable_test_result_tra
|
||||
switch (cdt_code) {
|
||||
case QCA808X_CDT_STATUS_STAT_NORMAL:
|
||||
return ETHTOOL_A_CABLE_RESULT_CODE_OK;
|
||||
- case QCA808X_CDT_STATUS_STAT_SHORT:
|
||||
+ case QCA808X_CDT_STATUS_STAT_SAME_SHORT:
|
||||
return ETHTOOL_A_CABLE_RESULT_CODE_SAME_SHORT;
|
||||
- case QCA808X_CDT_STATUS_STAT_OPEN:
|
||||
+ case QCA808X_CDT_STATUS_STAT_SAME_OPEN:
|
||||
return ETHTOOL_A_CABLE_RESULT_CODE_OPEN;
|
||||
+ case QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI1_SAME_NORMAL:
|
||||
+ case QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI1_SAME_OPEN:
|
||||
+ case QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI1_SAME_SHORT:
|
||||
+ case QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI2_SAME_NORMAL:
|
||||
+ case QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI2_SAME_OPEN:
|
||||
+ case QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI2_SAME_SHORT:
|
||||
+ case QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI3_SAME_NORMAL:
|
||||
+ case QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI3_SAME_OPEN:
|
||||
+ case QCA808X_CDT_STATUS_STAT_CROSS_SHORT_WITH_MDI3_SAME_SHORT:
|
||||
+ return ETHTOOL_A_CABLE_RESULT_CODE_CROSS_SHORT;
|
||||
case QCA808X_CDT_STATUS_STAT_FAIL:
|
||||
default:
|
||||
return ETHTOOL_A_CABLE_RESULT_CODE_UNSPEC;
|
||||
}
|
||||
}
|
||||
|
||||
-static int qca808x_cdt_fault_length(struct phy_device *phydev, int pair)
|
||||
+static int qca808x_cdt_fault_length(struct phy_device *phydev, int pair,
|
||||
+ int result)
|
||||
{
|
||||
int val;
|
||||
u32 cdt_length_reg = 0;
|
||||
@@ -1990,7 +2039,11 @@ static int qca808x_cdt_fault_length(stru
|
||||
if (val < 0)
|
||||
return val;
|
||||
|
||||
- val = FIELD_GET(QCA808X_CDT_DIAG_LENGTH, val);
|
||||
+ if (result == ETHTOOL_A_CABLE_RESULT_CODE_SAME_SHORT)
|
||||
+ val = FIELD_GET(QCA808X_CDT_DIAG_LENGTH_SAME_SHORT, val);
|
||||
+ else
|
||||
+ val = FIELD_GET(QCA808X_CDT_DIAG_LENGTH_CROSS_SHORT, val);
|
||||
+
|
||||
return at803x_cdt_fault_length(val);
|
||||
}
|
||||
|
||||
@@ -2038,8 +2091,8 @@ static int qca808x_cable_test_start(stru
|
||||
static int qca808x_cable_test_get_pair_status(struct phy_device *phydev, u8 pair,
|
||||
u16 status)
|
||||
{
|
||||
+ int length, result;
|
||||
u16 pair_code;
|
||||
- int length;
|
||||
|
||||
switch (pair) {
|
||||
case ETHTOOL_A_CABLE_PAIR_A:
|
||||
@@ -2058,11 +2111,11 @@ static int qca808x_cable_test_get_pair_s
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- ethnl_cable_test_result(phydev, pair,
|
||||
- qca808x_cable_test_result_trans(pair_code));
|
||||
+ result = qca808x_cable_test_result_trans(pair_code);
|
||||
+ ethnl_cable_test_result(phydev, pair, result);
|
||||
|
||||
if (qca808x_cdt_fault_length_valid(pair_code)) {
|
||||
- length = qca808x_cdt_fault_length(phydev, pair);
|
||||
+ length = qca808x_cdt_fault_length(phydev, pair, result);
|
||||
ethnl_cable_test_fault_length(phydev, pair, length);
|
||||
}
|
||||
|
||||
@@ -2076,8 +2129,7 @@ static int qca808x_cable_test_get_status
|
||||
*finished = false;
|
||||
|
||||
val = QCA808X_CDT_ENABLE_TEST |
|
||||
- QCA808X_CDT_LENGTH_UNIT |
|
||||
- QCA808X_CDT_INTER_CHECK_DIS;
|
||||
+ QCA808X_CDT_LENGTH_UNIT;
|
||||
ret = at803x_cdt_start(phydev, val);
|
||||
if (ret)
|
||||
return ret;
|
||||
@ -0,0 +1,62 @@
|
||||
From c34d9452d4e5d98a655d7b625e85466320885416 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Thu, 4 Jan 2024 22:30:41 +0100
|
||||
Subject: [PATCH 4/4] net: phy: at803x: make read_status more generic
|
||||
|
||||
Make read_status more generic in preparation on moving it to shared
|
||||
library as other PHY Family Driver will have the exact same
|
||||
implementation.
|
||||
|
||||
The only specific part was a check for AR8031/33 if 1000basex was used.
|
||||
The check is moved to a dedicated function specific for those PHYs.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Simon Horman <horms@kernel.org>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 17 ++++++++++++-----
|
||||
1 file changed, 12 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -1020,13 +1020,9 @@ static int at803x_read_specific_status(s
|
||||
|
||||
static int at803x_read_status(struct phy_device *phydev)
|
||||
{
|
||||
- struct at803x_priv *priv = phydev->priv;
|
||||
struct at803x_ss_mask ss_mask = { 0 };
|
||||
int err, old_link = phydev->link;
|
||||
|
||||
- if (priv->is_1000basex)
|
||||
- return genphy_c37_read_status(phydev);
|
||||
-
|
||||
/* Update the link, but return if there was an error */
|
||||
err = genphy_update_link(phydev);
|
||||
if (err)
|
||||
@@ -1618,6 +1614,17 @@ static int at8031_config_intr(struct phy
|
||||
return at803x_config_intr(phydev);
|
||||
}
|
||||
|
||||
+/* AR8031 and AR8033 share the same read status logic */
|
||||
+static int at8031_read_status(struct phy_device *phydev)
|
||||
+{
|
||||
+ struct at803x_priv *priv = phydev->priv;
|
||||
+
|
||||
+ if (priv->is_1000basex)
|
||||
+ return genphy_c37_read_status(phydev);
|
||||
+
|
||||
+ return at803x_read_status(phydev);
|
||||
+}
|
||||
+
|
||||
/* AR8031 and AR8035 share the same cable test get status reg */
|
||||
static int at8031_cable_test_get_status(struct phy_device *phydev,
|
||||
bool *finished)
|
||||
@@ -2281,7 +2288,7 @@ static struct phy_driver at803x_driver[]
|
||||
.read_page = at803x_read_page,
|
||||
.write_page = at803x_write_page,
|
||||
.get_features = at803x_get_features,
|
||||
- .read_status = at803x_read_status,
|
||||
+ .read_status = at8031_read_status,
|
||||
.config_intr = at8031_config_intr,
|
||||
.handle_interrupt = at803x_handle_interrupt,
|
||||
.get_tunable = at803x_get_tunable,
|
||||
@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
bool mac_link_dropped;
|
||||
bool using_mac_select_pcs;
|
||||
@@ -987,6 +992,22 @@ static void phylink_mac_pcs_an_restart(s
|
||||
@@ -990,6 +995,22 @@ static void phylink_mac_pcs_an_restart(s
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static void phylink_major_config(struct phylink *pl, bool restart,
|
||||
const struct phylink_link_state *state)
|
||||
{
|
||||
@@ -1023,11 +1044,16 @@ static void phylink_major_config(struct
|
||||
@@ -1026,11 +1047,16 @@ static void phylink_major_config(struct
|
||||
/* If we have a new PCS, switch to the new PCS after preparing the MAC
|
||||
* for the change.
|
||||
*/
|
||||
@ -76,7 +76,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (pl->pcs) {
|
||||
err = pl->pcs->ops->pcs_config(pl->pcs, pl->cur_link_an_mode,
|
||||
state->interface,
|
||||
@@ -1499,6 +1525,7 @@ struct phylink *phylink_create(struct ph
|
||||
@@ -1502,6 +1528,7 @@ struct phylink *phylink_create(struct ph
|
||||
pl->link_config.speed = SPEED_UNKNOWN;
|
||||
pl->link_config.duplex = DUPLEX_UNKNOWN;
|
||||
pl->link_config.an_enabled = true;
|
||||
@ -84,7 +84,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
pl->mac_ops = mac_ops;
|
||||
__set_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state);
|
||||
timer_setup(&pl->link_poll, phylink_fixed_poll, 0);
|
||||
@@ -1900,6 +1927,8 @@ void phylink_start(struct phylink *pl)
|
||||
@@ -1903,6 +1930,8 @@ void phylink_start(struct phylink *pl)
|
||||
if (pl->netdev)
|
||||
netif_carrier_off(pl->netdev);
|
||||
|
||||
@ -93,7 +93,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* Apply the link configuration to the MAC when starting. This allows
|
||||
* a fixed-link to start with the correct parameters, and also
|
||||
* ensures that we set the appropriate advertisement for Serdes links.
|
||||
@@ -1910,6 +1939,8 @@ void phylink_start(struct phylink *pl)
|
||||
@@ -1913,6 +1942,8 @@ void phylink_start(struct phylink *pl)
|
||||
*/
|
||||
phylink_mac_initial_config(pl, true);
|
||||
|
||||
@ -102,7 +102,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
phylink_enable_and_run_resolve(pl, PHYLINK_DISABLE_STOPPED);
|
||||
|
||||
if (pl->cfg_link_an_mode == MLO_AN_FIXED && pl->link_gpio) {
|
||||
@@ -1928,15 +1959,9 @@ void phylink_start(struct phylink *pl)
|
||||
@@ -1931,15 +1962,9 @@ void phylink_start(struct phylink *pl)
|
||||
poll = true;
|
||||
}
|
||||
|
||||
@ -120,7 +120,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (poll)
|
||||
mod_timer(&pl->link_poll, jiffies + HZ);
|
||||
if (pl->phydev)
|
||||
@@ -1973,6 +1998,10 @@ void phylink_stop(struct phylink *pl)
|
||||
@@ -1976,6 +2001,10 @@ void phylink_stop(struct phylink *pl)
|
||||
}
|
||||
|
||||
phylink_run_resolve_and_disable(pl, PHYLINK_DISABLE_STOPPED);
|
||||
|
||||
@ -153,7 +153,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#include <linux/linkmode.h>
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/mdio.h>
|
||||
@@ -593,6 +594,7 @@ struct macsec_ops;
|
||||
@@ -602,6 +603,7 @@ struct macsec_ops;
|
||||
* @phy_num_led_triggers: Number of triggers in @phy_led_triggers
|
||||
* @led_link_trigger: LED trigger for link up/down
|
||||
* @last_triggered: last LED trigger for link speed
|
||||
@ -161,7 +161,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
* @master_slave_set: User requested master/slave configuration
|
||||
* @master_slave_get: Current master/slave advertisement
|
||||
* @master_slave_state: Current master/slave configuration
|
||||
@@ -685,6 +687,7 @@ struct phy_device {
|
||||
@@ -694,6 +696,7 @@ struct phy_device {
|
||||
|
||||
struct phy_led_trigger *led_link_trigger;
|
||||
#endif
|
||||
@ -169,7 +169,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
/*
|
||||
* Interrupt number for this PHY
|
||||
@@ -759,6 +762,19 @@ struct phy_tdr_config {
|
||||
@@ -768,6 +771,19 @@ struct phy_tdr_config {
|
||||
#define PHY_PAIR_ALL -1
|
||||
|
||||
/**
|
||||
|
||||
@ -59,7 +59,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
init_data.fwnode = of_fwnode_handle(led);
|
||||
--- a/include/linux/phy.h
|
||||
+++ b/include/linux/phy.h
|
||||
@@ -765,15 +765,19 @@ struct phy_tdr_config {
|
||||
@@ -774,15 +774,19 @@ struct phy_tdr_config {
|
||||
* struct phy_led: An LED driven by the PHY
|
||||
*
|
||||
* @list: List of LEDs
|
||||
@ -79,7 +79,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/**
|
||||
* struct phy_driver - Driver structure for a particular PHY type
|
||||
*
|
||||
@@ -988,6 +992,15 @@ struct phy_driver {
|
||||
@@ -997,6 +1001,15 @@ struct phy_driver {
|
||||
int (*get_sqi)(struct phy_device *dev);
|
||||
/** @get_sqi_max: Get the maximum signal quality indication */
|
||||
int (*get_sqi_max)(struct phy_device *dev);
|
||||
|
||||
@ -52,7 +52,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
init_data.fwnode = of_fwnode_handle(led);
|
||||
--- a/include/linux/phy.h
|
||||
+++ b/include/linux/phy.h
|
||||
@@ -1001,6 +1001,18 @@ struct phy_driver {
|
||||
@@ -1010,6 +1010,18 @@ struct phy_driver {
|
||||
*/
|
||||
int (*led_brightness_set)(struct phy_device *dev,
|
||||
u8 index, enum led_brightness value);
|
||||
|
||||
@ -107,7 +107,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
init_data.fwnode = of_fwnode_handle(led);
|
||||
--- a/include/linux/phy.h
|
||||
+++ b/include/linux/phy.h
|
||||
@@ -1013,6 +1013,39 @@ struct phy_driver {
|
||||
@@ -1022,6 +1022,39 @@ struct phy_driver {
|
||||
int (*led_blink_set)(struct phy_device *dev, u8 index,
|
||||
unsigned long *delay_on,
|
||||
unsigned long *delay_off);
|
||||
|
||||
@ -23,7 +23,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
sysfs_remove_link(&dev->dev.kobj, "phydev");
|
||||
--- a/include/linux/phy.h
|
||||
+++ b/include/linux/phy.h
|
||||
@@ -878,6 +878,12 @@ struct phy_driver {
|
||||
@@ -887,6 +887,12 @@ struct phy_driver {
|
||||
/** @handle_interrupt: Override default interrupt handling */
|
||||
irqreturn_t (*handle_interrupt)(struct phy_device *phydev);
|
||||
|
||||
|
||||
@ -37,6 +37,15 @@ extreme,ap3935)
|
||||
ucidef_set_led_netdev "wan" "wan" "orange:lan1" "eth1"
|
||||
ucidef_set_led_netdev "lan" "lan" "orange:lan2" "eth0"
|
||||
;;
|
||||
fortinet,fap-421e)
|
||||
ucidef_set_led_netdev "eth1-100" "ETH1-100" "amber:eth1" "eth0" "link_100"
|
||||
ucidef_set_led_netdev "eth1-1000" "ETH1-1000" "yellow:eth1" "eth0" "link_1000"
|
||||
ucidef_set_led_netdev "eth2-100" "ETH2-100" "amber:eth2" "eth1" "link_100"
|
||||
ucidef_set_led_netdev "eth2-1000" "ETH2-1000" "yellow:eth2" "eth1" "link_1000"
|
||||
ucidef_set_led_wlan "wlan2g" "2.4G" "yellow:2g" "phy1tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "5G" "yellow:5g" "phy0tpt"
|
||||
ucidef_set_led_usbport "usb" "USB" "amber:power" "usb1-port1" "usb2-port1"
|
||||
;;
|
||||
meraki,mr52)
|
||||
ucidef_set_led_netdev "eth0" "eth0" "green:lan1" "eth0"
|
||||
ucidef_set_led_netdev "eth1" "eth1" "green:lan2" "eth1"
|
||||
|
||||
@ -47,8 +47,7 @@ ipq806x_setup_interfaces()
|
||||
ucidef_set_network_device_conduit "lan1" "eth1"
|
||||
ucidef_set_network_device_conduit "wan" "eth0"
|
||||
;;
|
||||
edgecore,ecw5410 |\
|
||||
extreme,ap3935)
|
||||
edgecore,ecw5410)
|
||||
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
||||
;;
|
||||
qcom,ipq8064-ap161)
|
||||
@ -57,6 +56,7 @@ ipq806x_setup_interfaces()
|
||||
qcom,ipq8064-db149)
|
||||
ucidef_set_interface_lan "eth1 eth2 eth3 lan1 lan2 lan3 lan4" "wan"
|
||||
;;
|
||||
fortinet,fap-421e |\
|
||||
ubnt,unifi-ac-hd)
|
||||
ucidef_set_interface_lan "eth0 eth1"
|
||||
;;
|
||||
@ -70,6 +70,7 @@ ipq806x_setup_interfaces()
|
||||
meraki,mr42)
|
||||
ucidef_set_interface_lan "eth0"
|
||||
;;
|
||||
extreme,ap3935 |\
|
||||
meraki,mr52)
|
||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||
;;
|
||||
|
||||
@ -14,6 +14,7 @@ case "$(board_name)" in
|
||||
asrock,g10 |\
|
||||
buffalo,wxr-2533dhp |\
|
||||
compex,wpq864 |\
|
||||
fortinet,fap-421e |\
|
||||
nec,wg2600hp |\
|
||||
nec,wg2600hp3 |\
|
||||
netgear,d7800 |\
|
||||
|
||||
@ -13,6 +13,7 @@ platform_do_upgrade() {
|
||||
arris,tr4400-v2 |\
|
||||
askey,rt4230w-rev6 |\
|
||||
compex,wpq864|\
|
||||
fortinet,fap-421e|\
|
||||
netgear,d7800 |\
|
||||
netgear,r7500 |\
|
||||
netgear,r7500v2 |\
|
||||
|
||||
@ -0,0 +1,412 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qcom-ipq8064-smb208.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
/ {
|
||||
model = "Fortinet FAP-421E";
|
||||
compatible = "fortinet,fap-421e", "qcom,ipq8064";
|
||||
|
||||
memory@42000000 {
|
||||
device_type = "memory";
|
||||
reg = <0x42000000 0xe000000>;
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
rsvd@41200000 {
|
||||
no-map;
|
||||
reg = <0x41200000 0x300000>;
|
||||
};
|
||||
wifi_dump@44000000 {
|
||||
no-map;
|
||||
reg = <0x44000000 0x600000>;
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
led-boot = &led_power_yellow;
|
||||
led-failsafe = &led_power_yellow;
|
||||
led-running = &led_power_yellow;
|
||||
led-upgrade = &led_power_yellow;
|
||||
label-mac-device = &gmac0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs-override = "console=ttyMSM0,9600n8";
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&qcom_pinmux 56 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
eth1-amber {
|
||||
label = "amber:eth1";
|
||||
gpios = <&qcom_pinmux 27 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
eth1-yellow {
|
||||
label = "yellow:eth1";
|
||||
gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
eth2-amber {
|
||||
label = "amber:eth2";
|
||||
gpios = <&qcom_pinmux 29 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
eth2-yellow {
|
||||
label = "yellow:eth2";
|
||||
gpios = <&qcom_pinmux 28 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
power-amber {
|
||||
function = LED_FUNCTION_POWER;
|
||||
color = <LED_COLOR_ID_AMBER>;
|
||||
gpios = <&qcom_pinmux 53 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_power_yellow: power-yellow {
|
||||
label = "yellow:power";
|
||||
gpios = <&qcom_pinmux 58 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
2g-yellow {
|
||||
label = "yellow:2g";
|
||||
gpios = <&qcom_pinmux 30 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
5g-yellow {
|
||||
label = "yellow:5g";
|
||||
gpios = <&qcom_pinmux 64 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&qcom_pinmux {
|
||||
button_pins: button_pins {
|
||||
mux {
|
||||
bias-pull-up;
|
||||
drive-strength = <2>;
|
||||
pins = "gpio56";
|
||||
};
|
||||
};
|
||||
|
||||
led_pins: led_pins {
|
||||
mux {
|
||||
bias-pull-down;
|
||||
drive-strength = <2>;
|
||||
function = "gpio";
|
||||
output-low;
|
||||
pins = "gpio23";
|
||||
};
|
||||
};
|
||||
|
||||
rgmii2_pins: rgmii2-pins {
|
||||
mux {
|
||||
bias-disable;
|
||||
drive-strength = <16>;
|
||||
function = "rgmii2";
|
||||
pins = "gpio66";
|
||||
};
|
||||
};
|
||||
|
||||
spi_pins: spi_pins {
|
||||
mux {
|
||||
pins = "gpio18", "gpio19", "gpio21";
|
||||
function = "gsbi5";
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
data {
|
||||
pins = "gpio18", "gpio19";
|
||||
drive-strength = <10>;
|
||||
};
|
||||
|
||||
cs {
|
||||
pins = "gpio20";
|
||||
drive-strength = <10>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
clk {
|
||||
pins = "gpio21";
|
||||
drive-strength = <12>;
|
||||
};
|
||||
};
|
||||
|
||||
uart0_pins: uart0_pins {
|
||||
mux {
|
||||
bias-disable;
|
||||
drive-strength = <12>;
|
||||
function = "gsbi7";
|
||||
pins = "gpio6", "gpio7";
|
||||
};
|
||||
};
|
||||
|
||||
usb_pwr_en_pins: usb_pwr_en_pins {
|
||||
mux {
|
||||
pins = "gpio22";
|
||||
function = "gpio";
|
||||
drive-strength = <12>;
|
||||
bias-pull-down;
|
||||
output-low;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gsbi7 {
|
||||
qcom,mode = <GSBI_PROT_I2C_UART>;
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gsbi7_serial{
|
||||
pinctrl-0 = <&uart0_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gsbi5 {
|
||||
qcom,mode = <GSBI_PROT_SPI>;
|
||||
|
||||
status = "okay";
|
||||
|
||||
spi@1a280000 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
spi-max-frequency = <50000000>;
|
||||
reg = <0>;
|
||||
m25p,fast-read;
|
||||
|
||||
partition@0 {
|
||||
label = "SBL1";
|
||||
reg = <0x0 0x20000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@20000 {
|
||||
label = "MIBIB";
|
||||
reg = <0x20000 0x20000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "SBL2";
|
||||
reg = <0x40000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@80000 {
|
||||
label = "SBL3";
|
||||
reg = <0x80000 0x80000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
label = "DDRCONFIG";
|
||||
reg = <0x100000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@110000 {
|
||||
label = "SSD";
|
||||
reg = <0x110000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@120000 {
|
||||
label = "TZ";
|
||||
reg = <0x120000 0x80000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1a0000 {
|
||||
label = "RPM";
|
||||
reg = <0x1a0000 0x80000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@220000 {
|
||||
label = "APPSBL";
|
||||
reg = <0x220000 0x80000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_appsbl_7ff80: mac-address@7ff80 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x7ff80 0xc>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@2a0000 {
|
||||
label = "APPSBLENV";
|
||||
reg = <0x2a0000 0x40000>;
|
||||
};
|
||||
|
||||
partition@2e0000 {
|
||||
label = "ART";
|
||||
reg = <0x2e0000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@320000 {
|
||||
label = "kernel";
|
||||
reg = <0x320000 0x600000>;
|
||||
};
|
||||
|
||||
partition@920000 {
|
||||
label = "ubi";
|
||||
reg = <0x920000 0x1400000>;
|
||||
};
|
||||
|
||||
partition@1d20000 {
|
||||
label = "reserved";
|
||||
reg = <0x1d20000 0x260000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1f80000 {
|
||||
label = "config";
|
||||
reg = <0x1f80000 0x80000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&hs_phy_1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ss_phy_1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3_1 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&usb_pwr_en_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_appsbl_7ff80 8>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
status = "okay";
|
||||
|
||||
max-link-speed = <1>;
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_appsbl_7ff80 16>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&adm_dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x0>;
|
||||
gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>,
|
||||
<&qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-0 = <&mdio0_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
phy1: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
phy2: ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
status = "okay";
|
||||
|
||||
phy-mode = "rgmii";
|
||||
qcom,id = <0>;
|
||||
pinctrl-0 = <&rgmii2_pins>;
|
||||
pinctrl-names = "default";
|
||||
nvmem-cells = <&macaddr_appsbl_7ff80 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac2 {
|
||||
status = "okay";
|
||||
|
||||
phy-mode = "sgmii";
|
||||
qcom,id = <2>;
|
||||
nvmem-cells = <&macaddr_appsbl_7ff80 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
@ -195,6 +195,7 @@
|
||||
reg = <0x2a0000 0x0010000>;
|
||||
|
||||
ethaddr: ethaddr {
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
@ -327,7 +328,7 @@
|
||||
phy-mode = "rgmii";
|
||||
phy-handle = <&phy1>;
|
||||
|
||||
nvmem-cells = <ðaddr>;
|
||||
nvmem-cells = <ðaddr 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
fixed-link {
|
||||
@ -344,6 +345,9 @@
|
||||
|
||||
phy-mode = "sgmii";
|
||||
phy-handle = <&phy2>;
|
||||
|
||||
nvmem-cells = <ðaddr 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&adm_dma {
|
||||
|
||||
@ -177,6 +177,18 @@ define Device/extreme_ap3935
|
||||
endef
|
||||
TARGET_DEVICES += extreme_ap3935
|
||||
|
||||
define Device/fortinet_fap-421e
|
||||
$(call Device/FitImage)
|
||||
DEVICE_VENDOR := Fortinet
|
||||
DEVICE_MODEL := FAP-421E
|
||||
SOC := qcom-ipq8064
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := fap-421e
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += fortinet_fap-421e
|
||||
|
||||
define Device/linksys_ea7500-v1
|
||||
$(call Device/LegacyImage)
|
||||
$(Device/kernel-size-migration)
|
||||
|
||||
@ -25,7 +25,7 @@ Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
|
||||
case PHY_INTERFACE_MODE_QUSGMII:
|
||||
--- a/drivers/net/phy/phylink.c
|
||||
+++ b/drivers/net/phy/phylink.c
|
||||
@@ -199,6 +199,7 @@ static int phylink_interface_max_speed(p
|
||||
@@ -200,6 +200,7 @@ static int phylink_interface_max_speed(p
|
||||
return SPEED_1000;
|
||||
|
||||
case PHY_INTERFACE_MODE_2500BASEX:
|
||||
@ -35,7 +35,7 @@ Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
|
||||
case PHY_INTERFACE_MODE_5GBASER:
|
||||
--- a/include/linux/phy.h
|
||||
+++ b/include/linux/phy.h
|
||||
@@ -157,6 +157,7 @@ typedef enum {
|
||||
@@ -159,6 +159,7 @@ typedef enum {
|
||||
PHY_INTERFACE_MODE_10GKR,
|
||||
PHY_INTERFACE_MODE_QUSGMII,
|
||||
PHY_INTERFACE_MODE_1000BASEKX,
|
||||
@ -43,7 +43,7 @@ Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
|
||||
PHY_INTERFACE_MODE_MAX,
|
||||
} phy_interface_t;
|
||||
|
||||
@@ -276,6 +277,8 @@ static inline const char *phy_modes(phy_
|
||||
@@ -280,6 +281,8 @@ static inline const char *phy_modes(phy_
|
||||
return "100base-x";
|
||||
case PHY_INTERFACE_MODE_QUSGMII:
|
||||
return "qusgmii";
|
||||
|
||||
@ -32,7 +32,7 @@ Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
|
||||
|
||||
--- a/drivers/net/phy/phylink.c
|
||||
+++ b/drivers/net/phy/phylink.c
|
||||
@@ -485,6 +485,7 @@ unsigned long phylink_get_capabilities(p
|
||||
@@ -487,6 +487,7 @@ unsigned long phylink_get_capabilities(p
|
||||
break;
|
||||
|
||||
case PHY_INTERFACE_MODE_2500BASEX:
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
label-mac-device =&gmac0;
|
||||
led-boot = &status_red_led;
|
||||
led-failsafe = &status_red_led;
|
||||
led-running = &status_green_led;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user