mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-07 01:53:34 +08:00
Merge Official Source
This commit is contained in:
commit
a81d0d4180
@ -362,12 +362,6 @@ menu "Global build settings"
|
||||
help
|
||||
SELinux Reference Policy (refpolicy)
|
||||
|
||||
config SELINUXTYPE_targeted-modular
|
||||
bool "targeted-modular"
|
||||
select PACKAGE_refpolicy-modular
|
||||
help
|
||||
Modular SELinux Reference Policy (refpolicy-modular)
|
||||
|
||||
config SELINUXTYPE_dssp
|
||||
bool "dssp"
|
||||
select PACKAGE_selinux-policy
|
||||
|
@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL
|
||||
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
||||
endif
|
||||
|
||||
LINUX_VERSION-5.4 = .77
|
||||
LINUX_VERSION-5.4 = .79
|
||||
|
||||
LINUX_KERNEL_HASH-5.4.77 = a3e03e6970240dddc8174bf9f49b56d774c40125eabe1582d2ebe85b01addbf7
|
||||
LINUX_KERNEL_HASH-5.4.79 = a59091fb08ff66a344a7842b7c891f36cef609eed1d2944edf475cca8d91ce25
|
||||
|
||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||
PKG_NAME:=uboot-envtools
|
||||
PKG_DISTNAME:=u-boot
|
||||
PKG_VERSION:=2020.04
|
||||
PKG_RELEASE:=5
|
||||
PKG_RELEASE:=6
|
||||
|
||||
PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:= \
|
||||
|
@ -26,6 +26,7 @@ glinet,gl-mv1000)
|
||||
;;
|
||||
globalscale,espressobin|\
|
||||
globalscale,espressobin-emmc|\
|
||||
globalscale,espressobin-ultra|\
|
||||
globalscale,espressobin-v7|\
|
||||
globalscale,espressobin-v7-emmc)
|
||||
idx="$(find_mtd_index u-boot-env)"
|
||||
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uboot-layerscape
|
||||
PKG_VERSION:=LSDK-20.04-update-290520
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot
|
||||
|
@ -1,7 +1,6 @@
|
||||
fdtaddr=0x8f000000
|
||||
loadaddr=0x81000000
|
||||
fdt_high=0xffffffffffffffff
|
||||
initrd_high=0xffffffffffffffff
|
||||
bootm_size=0x10000000
|
||||
qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware)
|
||||
bootcmd=echo starting openwrt ...;pfe stop;run qspi_boot
|
||||
|
@ -1,7 +1,6 @@
|
||||
fdtaddr=0x8f000000
|
||||
loadaddr=0x81000000
|
||||
fdt_high=0xffffffff
|
||||
initrd_high=0xffffffff
|
||||
bootm_size=0x10000000
|
||||
nor_boot=cp.b 60f00000 $fdtaddr 100000;cp.b 61000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=root=/dev/mtdblock6 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(rcw),2m(u-boot),1m(u-boot-env),11m(reserved-1),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) cma=64M@0x0-0xb0000000
|
||||
bootcmd=echo starting openwrt ...;run nor_boot
|
||||
|
@ -1,7 +1,6 @@
|
||||
fdtaddr=0x8f000000
|
||||
loadaddr=0x81000000
|
||||
fdt_high=0xffffffffffffffff
|
||||
initrd_high=0xffffffffffffffff
|
||||
bootm_size=0x10000000
|
||||
hwconfig=fsl_ddr:bank_intlv=auto
|
||||
nor_boot=cp.b 60f00000 $fdtaddr 100000;cp.b 61000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware)
|
||||
|
@ -1,7 +1,6 @@
|
||||
fdtaddr=0x8f000000
|
||||
loadaddr=0x81000000
|
||||
fdt_high=0xffffffffffffffff
|
||||
initrd_high=0xffffffffffffffff
|
||||
bootm_size=0x10000000
|
||||
hwconfig=fsl_ddr:bank_intlv=auto
|
||||
qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=root=/dev/mtdblock9 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi-0:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2017-2019 Tomasz Maciej Nowak <tomek_n@o2.pl>
|
||||
# Copyright (C) 2017-2019 Tomasz Maciej Nowak <tmn505@gmail.com>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@ -11,7 +11,7 @@ PKG_RELEASE := 1
|
||||
|
||||
PKG_HASH := 76b7772d156b3ddd7644c8a1736081e55b78828537ff714065d21dbade229bef
|
||||
|
||||
PKG_MAINTAINER := Tomasz Maciej Nowak <tomek_n@o2.pl>
|
||||
PKG_MAINTAINER := Tomasz Maciej Nowak <tmn505@gmail.com>
|
||||
|
||||
include $(INCLUDE_DIR)/u-boot.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ls-rcw
|
||||
PKG_VERSION:=LSDK-20.04-update-290520
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/rcw
|
||||
|
@ -0,0 +1,13 @@
|
||||
--- a/ls1012afrdm/N_SSNP_3305/rcw_800.rcw
|
||||
+++ b/ls1012afrdm/N_SSNP_3305/rcw_800.rcw
|
||||
@@ -41,8 +41,8 @@ EC1_EXT_SAI2_RX=1
|
||||
EC1_BASE=0
|
||||
UART1_BASE=1
|
||||
SDHC1_BASE=1
|
||||
-SDHC2_BASE_DAT321=1
|
||||
-SDHC2_BASE_BASE=1
|
||||
+SDHC2_BASE_DAT321=3
|
||||
+SDHC2_BASE_BASE=3
|
||||
UART2_BASE_DATA=1
|
||||
EMI1_BASE=1
|
||||
CLK_OUT_BASE=1
|
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=linux-firmware
|
||||
PKG_VERSION:=20201022
|
||||
PKG_VERSION:=20201118
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_HASH:=bf586e0beb4c65f22bf0a79811f259aa0a5a7cc9f70eebecb260525b6914cef7
|
||||
PKG_HASH:=863d5a31da725b856a917280d1e3014929b3bc3d4e6e5faecf530c13afb7e2b9
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
|
@ -446,6 +446,56 @@ endef
|
||||
$(eval $(call KernelPackage,iio-tsl4531))
|
||||
|
||||
|
||||
define KernelPackage/iio-fxas21002c
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
TITLE:=Freescale FXAS21002C 3-axis gyro driver
|
||||
DEPENDS:=+kmod-iio-core +kmod-regmap-core +kmod-industrialio-triggered-buffer
|
||||
KCONFIG:= CONFIG_FXAS21002C
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/gyro/fxas21002c_core.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,fxas21002c)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-fxas21002c/description
|
||||
Support for Freescale FXAS21002C 3-axis gyro.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-fxas21002c))
|
||||
|
||||
|
||||
define KernelPackage/iio-fxas21002c-i2c
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
TITLE:=Freescale FXAS21002C 3-axis gyro driver (I2C)
|
||||
DEPENDS:=+kmod-iio-fxas21002c +kmod-i2c-core +kmod-regmap-i2c
|
||||
KCONFIG:= CONFIG_FXAS21002C_I2C
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/gyro/fxas21002c_i2c.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,fxas21002c_i2c)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-fxas21002c-i2c/description
|
||||
Support for Freescale FXAS21002C 3-axis gyro
|
||||
connected via I2C.
|
||||
endef
|
||||
|
||||
|
||||
$(eval $(call KernelPackage,iio-fxas21002c-i2c))
|
||||
|
||||
define KernelPackage/iio-fxas21002c-spi
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
DEPENDS:=+kmod-iio-fxas21002c +kmod-regmap-spi
|
||||
TITLE:=Freescale FXAS21002C 3-axis gyro driver (SPI)
|
||||
KCONFIG:= CONFIG_FXAS21002C_SPI
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/gyro/fxas21002c_spi.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,fxas21002c_spi)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-fxas21002c-spi/description
|
||||
Support for Freescale FXAS21002C 3-axis gyro
|
||||
connected via SPI.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-fxas21002c-spi))
|
||||
|
||||
|
||||
define KernelPackage/iio-fxos8700
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
TITLE:=Freescale FXOS8700 3-axis accelerometer driver
|
||||
|
@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
|
||||
PKG_SOURCE_DATE:=2020-11-13
|
||||
PKG_SOURCE_VERSION:=4a41135750d97e06d1f6d808a9d24bb4b472aca4
|
||||
PKG_MIRROR_HASH:=2f58910f79c73209c20969ffa59ac5ccd4606f736993b207dccef6d42dab7880
|
||||
PKG_SOURCE_DATE:=2020-11-23
|
||||
PKG_SOURCE_VERSION:=3abe1fc87151fae570fc1232053c73d1a5505664
|
||||
PKG_MIRROR_HASH:=323221cbcc7ee57e6a38e979bdebfbf13cdfddf82ea51bbc30004c07b658bb8a
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
@ -7,7 +7,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=hostapd
|
||||
PKG_RELEASE:=16
|
||||
PKG_RELEASE:=17
|
||||
|
||||
PKG_SOURCE_URL:=http://w1.fi/hostap.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
|
@ -268,7 +268,7 @@ CONFIG_GETRANDOM=y
|
||||
#CONFIG_ELOOP_POLL=y
|
||||
|
||||
# Should we use epoll instead of select? Select is used by default.
|
||||
#CONFIG_ELOOP_EPOLL=y
|
||||
CONFIG_ELOOP_EPOLL=y
|
||||
|
||||
# Should we use kqueue instead of select? Select is used by default.
|
||||
#CONFIG_ELOOP_KQUEUE=y
|
||||
|
@ -268,7 +268,7 @@ CONFIG_GETRANDOM=y
|
||||
#CONFIG_ELOOP_POLL=y
|
||||
|
||||
# Should we use epoll instead of select? Select is used by default.
|
||||
#CONFIG_ELOOP_EPOLL=y
|
||||
CONFIG_ELOOP_EPOLL=y
|
||||
|
||||
# Should we use kqueue instead of select? Select is used by default.
|
||||
#CONFIG_ELOOP_KQUEUE=y
|
||||
|
@ -268,7 +268,7 @@ CONFIG_GETRANDOM=y
|
||||
#CONFIG_ELOOP_POLL=y
|
||||
|
||||
# Should we use epoll instead of select? Select is used by default.
|
||||
#CONFIG_ELOOP_EPOLL=y
|
||||
CONFIG_ELOOP_EPOLL=y
|
||||
|
||||
# Should we use kqueue instead of select? Select is used by default.
|
||||
#CONFIG_ELOOP_KQUEUE=y
|
||||
|
@ -290,7 +290,7 @@ CONFIG_NO_CONFIG_WRITE=y
|
||||
#CONFIG_ELOOP_POLL=y
|
||||
|
||||
# Should we use epoll instead of select? Select is used by default.
|
||||
#CONFIG_ELOOP_EPOLL=y
|
||||
CONFIG_ELOOP_EPOLL=y
|
||||
|
||||
# Should we use kqueue instead of select? Select is used by default.
|
||||
#CONFIG_ELOOP_KQUEUE=y
|
||||
|
@ -290,7 +290,7 @@ CONFIG_BACKEND=file
|
||||
#CONFIG_ELOOP_POLL=y
|
||||
|
||||
# Should we use epoll instead of select? Select is used by default.
|
||||
#CONFIG_ELOOP_EPOLL=y
|
||||
CONFIG_ELOOP_EPOLL=y
|
||||
|
||||
# Should we use kqueue instead of select? Select is used by default.
|
||||
#CONFIG_ELOOP_KQUEUE=y
|
||||
|
@ -290,7 +290,7 @@ CONFIG_NO_CONFIG_WRITE=y
|
||||
#CONFIG_ELOOP_POLL=y
|
||||
|
||||
# Should we use epoll instead of select? Select is used by default.
|
||||
#CONFIG_ELOOP_EPOLL=y
|
||||
CONFIG_ELOOP_EPOLL=y
|
||||
|
||||
# Should we use kqueue instead of select? Select is used by default.
|
||||
#CONFIG_ELOOP_KQUEUE=y
|
||||
|
@ -290,7 +290,7 @@ CONFIG_BACKEND=file
|
||||
#CONFIG_ELOOP_POLL=y
|
||||
|
||||
# Should we use epoll instead of select? Select is used by default.
|
||||
#CONFIG_ELOOP_EPOLL=y
|
||||
CONFIG_ELOOP_EPOLL=y
|
||||
|
||||
# Should we use kqueue instead of select? Select is used by default.
|
||||
#CONFIG_ELOOP_KQUEUE=y
|
||||
|
@ -17,7 +17,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
--- a/src/ap/dfs.c
|
||||
+++ b/src/ap/dfs.c
|
||||
@@ -1066,8 +1066,15 @@ static int hostapd_dfs_start_channel_swi
|
||||
@@ -1086,8 +1086,15 @@ static int hostapd_dfs_start_channel_swi
|
||||
&oper_centr_freq_seg0_idx,
|
||||
&oper_centr_freq_seg1_idx,
|
||||
&skip_radar);
|
||||
|
@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uhttpd
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git
|
||||
PKG_SOURCE_DATE:=2020-10-04
|
||||
PKG_SOURCE_VERSION:=14a3cb42047bd0c0f8d5713332b9b4516a505607
|
||||
PKG_MIRROR_HASH:=10db75dcc3f42543028ccda1a32454cf8684108a5117befa466b6775fc71948c
|
||||
PKG_SOURCE_DATE:=2020-11-23
|
||||
PKG_SOURCE_VERSION:=f53a63999784bcb7dc513e221f3f25dd3de2f35e
|
||||
PKG_MIRROR_HASH:=b2b71f91a3affd1518b2887d2786be30ae0ac5204bbf65c9a84595603847995c
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=ISC
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uqmi
|
||||
PKG_RELEASE:=7
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uqmi.git
|
||||
PKG_SOURCE_DATE:=2019-06-27
|
||||
PKG_SOURCE_VERSION:=1965c713937495a5cb029165c16acdb6572c3f87
|
||||
PKG_MIRROR_HASH:=3c39b1c1f20b7d523b0891d08b3d10233331ada8e11d0b55cfd4882816308951
|
||||
PKG_SOURCE_DATE:=2020-11-22
|
||||
PKG_SOURCE_VERSION:=0a19b5b77140465c29e2afa7d611fe93abc9672f
|
||||
PKG_MIRROR_HASH:=0a6641f8e167efd21d464b0b2aeb1fec5f974dddcdb8822fbd5d7190d0b741b4
|
||||
PKG_MAINTAINER:=Matti Laakso <malaakso@elisanet.fi>
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
@ -19,6 +19,7 @@ proto_qmi_init_config() {
|
||||
proto_config_add_string modes
|
||||
proto_config_add_string pdptype
|
||||
proto_config_add_int profile
|
||||
proto_config_add_boolean dhcp
|
||||
proto_config_add_boolean dhcpv6
|
||||
proto_config_add_boolean autoconnect
|
||||
proto_config_add_int plmn
|
||||
@ -31,13 +32,13 @@ proto_qmi_setup() {
|
||||
local interface="$1"
|
||||
local dataformat connstat
|
||||
local device apn auth username password pincode delay modes pdptype
|
||||
local profile dhcpv6 autoconnect plmn timeout mtu $PROTO_DEFAULT_OPTIONS
|
||||
local profile dhcp dhcpv6 autoconnect plmn timeout mtu $PROTO_DEFAULT_OPTIONS
|
||||
local ip4table ip6table
|
||||
local cid_4 pdh_4 cid_6 pdh_6
|
||||
local ip_6 ip_prefix_length gateway_6 dns1_6 dns2_6
|
||||
|
||||
json_get_vars device apn auth username password pincode delay modes
|
||||
json_get_vars pdptype profile dhcpv6 autoconnect plmn ip4table
|
||||
json_get_vars pdptype profile dhcp dhcpv6 autoconnect plmn ip4table
|
||||
json_get_vars ip6table timeout mtu $PROTO_DEFAULT_OPTIONS
|
||||
|
||||
[ "$timeout" = "" ] && timeout="10"
|
||||
@ -82,7 +83,7 @@ proto_qmi_setup() {
|
||||
local uninitialized_timeout=0
|
||||
while uqmi -s -d "$device" --get-pin-status | grep '"UIM uninitialized"' > /dev/null; do
|
||||
[ -e "$device" ] || return 1
|
||||
if [ "$uninitialized_timeout" -lt "$timeout" ]; then
|
||||
if [ "$uninitialized_timeout" -lt "$timeout" -o "$timeout" = "0" ]; then
|
||||
let uninitialized_timeout++
|
||||
sleep 1;
|
||||
else
|
||||
@ -173,6 +174,9 @@ proto_qmi_setup() {
|
||||
# Cleanup current state if any
|
||||
uqmi -s -d "$device" --stop-network 0xffffffff --autoconnect > /dev/null 2>&1
|
||||
|
||||
# Go online
|
||||
uqmi -s -d "$device" --set-device-operating-mode online > /dev/null 2>&1
|
||||
|
||||
# Set IP format
|
||||
uqmi -s -d "$device" --set-data-format 802.3 > /dev/null 2>&1
|
||||
uqmi -s -d "$device" --wda-set-data-format 802.3 > /dev/null 2>&1
|
||||
@ -195,7 +199,7 @@ proto_qmi_setup() {
|
||||
local registration_timeout=0
|
||||
while uqmi -s -d "$device" --get-serving-system | grep '"searching"' > /dev/null; do
|
||||
[ -e "$device" ] || return 1
|
||||
if [ "$registration_timeout" -lt "$timeout" ]; then
|
||||
if [ "$registration_timeout" -lt "$timeout" -o "$timeout" = "0" ]; then
|
||||
let registration_timeout++
|
||||
sleep 1;
|
||||
else
|
||||
@ -353,15 +357,41 @@ proto_qmi_setup() {
|
||||
}
|
||||
|
||||
[ -n "$pdh_4" ] && {
|
||||
json_init
|
||||
json_add_string name "${interface}_4"
|
||||
json_add_string ifname "@$interface"
|
||||
json_add_string proto "dhcp"
|
||||
[ -n "$ip4table" ] && json_add_string ip4table "$ip4table"
|
||||
proto_add_dynamic_defaults
|
||||
[ -n "$zone" ] && json_add_string zone "$zone"
|
||||
json_close_object
|
||||
ubus call network add_dynamic "$(json_dump)"
|
||||
if [ "$dhcp" = 0 ]; then
|
||||
json_load "$(uqmi -s -d $device --set-client-id wds,$cid_4 --get-current-settings)"
|
||||
json_select ipv4
|
||||
json_get_var ip_4 ip
|
||||
json_get_var gateway_4 gateway
|
||||
json_get_var dns1_4 dns1
|
||||
json_get_var dns2_4 dns2
|
||||
json_get_var subnet_4 subnet
|
||||
|
||||
proto_init_update "$ifname" 1
|
||||
proto_set_keep 1
|
||||
proto_add_ipv4_address "$ip_4" "$subnet_4"
|
||||
proto_add_ipv4_route "$gateway_4" "128"
|
||||
[ "$defaultroute" = 0 ] || proto_add_ipv4_route "0.0.0.0" 0 "$gateway_4"
|
||||
[ "$peerdns" = 0 ] || {
|
||||
proto_add_dns_server "$dns1_4"
|
||||
proto_add_dns_server "$dns2_4"
|
||||
}
|
||||
[ -n "$zone" ] && {
|
||||
proto_add_data
|
||||
json_add_string zone "$zone"
|
||||
proto_close_data
|
||||
}
|
||||
proto_send_update "$interface"
|
||||
else
|
||||
json_init
|
||||
json_add_string name "${interface}_4"
|
||||
json_add_string ifname "@$interface"
|
||||
json_add_string proto "dhcp"
|
||||
[ -n "$ip4table" ] && json_add_string ip4table "$ip4table"
|
||||
proto_add_dynamic_defaults
|
||||
[ -n "$zone" ] && json_add_string zone "$zone"
|
||||
json_close_object
|
||||
ubus call network add_dynamic "$(json_dump)"
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,9 +12,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
|
||||
PKG_SOURCE_DATE:=2020-11-17
|
||||
PKG_SOURCE_VERSION:=c110405181056f14956ccd097b8e4ffe97b2f3ec
|
||||
PKG_MIRROR_HASH:=a3c5cd58d58aebd5976ccadd754ac2f601fed888f48f78d364dfc86e3a34a1e4
|
||||
PKG_SOURCE_DATE:=2020-11-23
|
||||
PKG_SOURCE_VERSION:=e935c0c043b12415fa36aca01cfc757cadb9fac4
|
||||
PKG_MIRROR_HASH:=6bb79a7b5c87afbfc7227758cffbebcc5c9752e791bb5a39280a9aebd159250b
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
@ -24,7 +24,7 @@ TAR_OPTIONS:=--transform='s%^refpolicy%$(PKG_NAME)-$(PKG_VERSION)%' -xf -
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/refpolicy/Default
|
||||
define Package/refpolicy
|
||||
SECTION:=system
|
||||
CATEGORY:=Base system
|
||||
TITLE:=SELinux reference policy
|
||||
@ -32,19 +32,6 @@ define Package/refpolicy/Default
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/refpolicy
|
||||
$(call Package/refpolicy/Default)
|
||||
CONFLICTS:=refpolicy-modular
|
||||
VARIANT:=default
|
||||
endef
|
||||
|
||||
define Package/refpolicy-modular
|
||||
$(call Package/refpolicy/Default)
|
||||
TITLE += (modular)
|
||||
VARIANT:=modular
|
||||
PROVIDES:=refpolicy
|
||||
endef
|
||||
|
||||
define Package/refpolicy/description
|
||||
The SELinux Reference Policy project (refpolicy) is a
|
||||
complete SELinux policy that can be used as the system
|
||||
@ -69,43 +56,25 @@ endef
|
||||
# builds is a small host tool that gets run as part of the build
|
||||
# process.
|
||||
MAKE_FLAGS += \
|
||||
DESTDIR="$(PKG_INSTALL_DIR)"
|
||||
SETFILES="$(STAGING_DIR_HOST)/bin/setfiles" \
|
||||
CHECKPOLICY="$(STAGING_DIR_HOSTPKG)/bin/checkpolicy" \
|
||||
CC="$(HOSTCC)" \
|
||||
CFLAGS="$(HOST_CFLAGS)"
|
||||
|
||||
define Build/Configure
|
||||
$(SED) "/NAME/c\NAME = targeted" $(PKG_BUILD_DIR)/build.conf
|
||||
ifneq ($(BUILD_VARIANT),modular)
|
||||
$(SED) "/MONOLITHIC/c\MONOLITHIC = y" $(PKG_BUILD_DIR)/build.conf
|
||||
endif
|
||||
$(SED) "/NAME/c\NAME = targeted" $(PKG_BUILD_DIR)/build.conf
|
||||
$(call Build/Compile/Default,conf)
|
||||
endef
|
||||
|
||||
ifeq ($(BUILD_VARIANT),modular)
|
||||
define Build/Install
|
||||
$(call Build/Compile/Default,install install-headers)
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/refpolicy/conffiles
|
||||
/etc/selinux/config
|
||||
endef
|
||||
|
||||
Package/refpolicy-modular/conffiles = $(Package/refpolicy/conffiles)
|
||||
|
||||
define Package/refpolicy/install
|
||||
$(INSTALL_DIR) $(1)/etc/selinux
|
||||
$(CP) $(PKG_INSTALL_DIR)/etc/selinux/* $(1)/etc/selinux/
|
||||
$(CP) ./files/selinux-config $(1)/etc/selinux/config
|
||||
ifeq ($(BUILD_VARIANT),modular)
|
||||
$(INSTALL_DIR) $(1)/usr/share/selinux
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/share/selinux/* $(1)/usr/share/selinux/
|
||||
endif
|
||||
endef
|
||||
|
||||
Package/refpolicy-modular/install = $(Package/refpolicy/install)
|
||||
|
||||
$(eval $(call BuildPackage,refpolicy))
|
||||
$(eval $(call BuildPackage,refpolicy-modular))
|
||||
|
@ -138,7 +138,7 @@ package_index: FORCE
|
||||
(cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . > Packages && \
|
||||
gzip -9nc Packages > Packages.gz; \
|
||||
$(if $(CONFIG_SIGNATURE_CHECK), \
|
||||
$(STAGING_DIR_HOST)/bin/usign -S -m Packages -s $(BUILD_KEY)); \
|
||||
$(STAGING_DIR_HOST)/bin/usign -S -m Packages -s $(BUILD_KEY)) \
|
||||
) >/dev/null 2>/dev/null
|
||||
$(OPKG) update >&2 || true
|
||||
|
||||
|
@ -6,7 +6,7 @@ BOARDNAME:=Atheros ATH79
|
||||
CPU_TYPE:=24kc
|
||||
SUBTARGETS:=generic mikrotik nand tiny
|
||||
|
||||
FEATURES:=ramdisk usbgadget
|
||||
FEATURES:=ramdisk squashfs usbgadget
|
||||
|
||||
KERNEL_PATCHVER:=5.4
|
||||
KERNEL_TESTING_PATCHVER:=5.4
|
||||
|
@ -34,10 +34,35 @@
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
pll-data = <0xae000000 0x80000101 0x80001313>;
|
||||
phy-mode = "rgmii-rxid";
|
||||
};
|
||||
|
||||
&gmac_config {
|
||||
rxdv-delay = <3>;
|
||||
rxd-delay = <3>;
|
||||
txen-delay = <0>;
|
||||
txd-delay = <0>;
|
||||
};
|
||||
|
||||
&mdio1 {
|
||||
status = "okay";
|
||||
|
||||
phy1: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
at803x-override-sgmii-link-check;
|
||||
};
|
||||
};
|
||||
|
||||
ð1 {
|
||||
status = "okay";
|
||||
|
||||
mtd-mac-address = <&art 0x00>;
|
||||
mtd-mac-address-increment = <1>;
|
||||
|
||||
phy-handle = <&phy1>;
|
||||
pll-data = <0x03000101 0x00000101 0x00001313>;
|
||||
|
||||
qca955x-sgmii-fixup;
|
||||
};
|
||||
|
@ -44,5 +44,4 @@
|
||||
rxd-delay = <3>;
|
||||
txen-delay = <3>;
|
||||
txd-delay = <3>;
|
||||
rgmii-enabled = <1>;
|
||||
};
|
||||
|
@ -35,6 +35,7 @@
|
||||
};
|
||||
|
||||
ð0 {
|
||||
pll-data = <0xae000000 0x80000101 0x80001313>;
|
||||
phy-mode = "rgmii-id";
|
||||
};
|
||||
|
||||
|
@ -69,10 +69,35 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ð0 {
|
||||
pll-data = <0xae000000 0x80000101 0x80001313>;
|
||||
phy-mode = "rgmii-rxid";
|
||||
};
|
||||
|
||||
&gmac_config {
|
||||
rxdv-delay = <3>;
|
||||
rxd-delay = <3>;
|
||||
txen-delay = <0>;
|
||||
txd-delay = <0>;
|
||||
};
|
||||
|
||||
&mdio1 {
|
||||
status = "okay";
|
||||
|
||||
phy1: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
at803x-override-sgmii-link-check;
|
||||
};
|
||||
};
|
||||
|
||||
ð1 {
|
||||
status = "okay";
|
||||
|
||||
mtd-mac-address = <&art 0x00>;
|
||||
mtd-mac-address-increment = <1>;
|
||||
|
||||
phy-handle = <&phy1>;
|
||||
pll-data = <0x03000101 0x00000101 0x00001313>;
|
||||
|
||||
qca955x-sgmii-fixup;
|
||||
};
|
||||
|
@ -44,5 +44,4 @@
|
||||
rxd-delay = <3>;
|
||||
txen-delay = <3>;
|
||||
txd-delay = <3>;
|
||||
rgmii-enabled = <1>;
|
||||
};
|
||||
|
@ -45,5 +45,4 @@
|
||||
rxd-delay = <3>;
|
||||
txen-delay = <3>;
|
||||
txd-delay = <3>;
|
||||
rgmii-enabled = <1>;
|
||||
};
|
||||
|
@ -107,37 +107,14 @@
|
||||
|
||||
mtd-mac-address = <&art 0x00>;
|
||||
phy-handle = <&phy4>;
|
||||
phy-mode = "rgmii-rxid";
|
||||
pll-data = <0xae000000 0x80000101 0x80001313>;
|
||||
|
||||
gmac_config: gmac-config {
|
||||
device = <&gmac>;
|
||||
|
||||
rxdv-delay = <3>;
|
||||
rxd-delay = <3>;
|
||||
txen-delay = <0>;
|
||||
txd-delay = <0>;
|
||||
rgmii-enabled = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
&mdio1 {
|
||||
phy1: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
at803x-override-sgmii-link-check;
|
||||
};
|
||||
};
|
||||
|
||||
ð1 {
|
||||
mtd-mac-address = <&art 0x00>;
|
||||
mtd-mac-address-increment = <1>;
|
||||
|
||||
phy-handle = <&phy1>;
|
||||
pll-data = <0x03000101 0x00000101 0x00001313>;
|
||||
|
||||
qca955x-sgmii-fixup;
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
|
30
target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v1.dts
Normal file
30
target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v1.dts
Normal file
@ -0,0 +1,30 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qca9563_tplink_eap2x5-1port.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "tplink,eap225-outdoor-v1", "qca,qca9563";
|
||||
model = "TP-Link EAP225-Outdoor v1";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_status_green;
|
||||
led-failsafe = &led_status_amber;
|
||||
led-running = &led_status_green;
|
||||
led-upgrade = &led_status_amber;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_status_green: status_green {
|
||||
label = "green:status";
|
||||
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
led_status_amber: status_amber {
|
||||
label = "amber:status";
|
||||
gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
30
target/linux/ath79/dts/qca9563_tplink_eap225-v3.dts
Normal file
30
target/linux/ath79/dts/qca9563_tplink_eap225-v3.dts
Normal file
@ -0,0 +1,30 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qca9563_tplink_eap2x5-1port.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "tplink,eap225-v3", "qca,qca9563";
|
||||
model = "TP-Link EAP225 v3";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_status_green;
|
||||
led-failsafe = &led_status_amber;
|
||||
led-running = &led_status_green;
|
||||
led-upgrade = &led_status_amber;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_status_green: status_green {
|
||||
label = "green:status";
|
||||
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
led_status_amber: status_amber {
|
||||
label = "amber:status";
|
||||
gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
44
target/linux/ath79/dts/qca9563_tplink_eap245-v1.dts
Normal file
44
target/linux/ath79/dts/qca9563_tplink_eap245-v1.dts
Normal file
@ -0,0 +1,44 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qca9563_tplink_eap2x5-1port.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "tplink,eap245-v1", "qca,qca9563";
|
||||
model = "TP-Link EAP245 v1";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_status_green;
|
||||
led-failsafe = &led_status_amber;
|
||||
led-running = &led_status_green;
|
||||
led-upgrade = &led_status_amber;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_status_green: status_green {
|
||||
label = "green:status";
|
||||
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
led_status_amber: status_amber {
|
||||
label = "amber:status";
|
||||
gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_status_red: status_red {
|
||||
label = "red:status";
|
||||
gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-export {
|
||||
compatible = "gpio-export";
|
||||
led_enable {
|
||||
gpio-export,name = "leds:enable";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
135
target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi
Normal file
135
target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi
Normal file
@ -0,0 +1,135 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qca956x.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
label-mac-device = ð0;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "Reset button";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
num-cs = <1>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <25000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x000000 0x020000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@20000 {
|
||||
label = "partition-table";
|
||||
reg = <0x020000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
info: partition@30000 {
|
||||
label = "info";
|
||||
reg = <0x030000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
compatible = "openwrt,elf";
|
||||
label = "firmware";
|
||||
reg = <0x040000 0xd80000>;
|
||||
};
|
||||
|
||||
partition@dc0000 {
|
||||
label = "config";
|
||||
reg = <0xdc0000 0x030000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
/* df0000-f30000 undefined in vendor firmware */
|
||||
|
||||
partition@f30000 {
|
||||
label = "log";
|
||||
reg = <0xf30000 0x0c0000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
art: partition@ff0000 {
|
||||
label = "art";
|
||||
reg = <0xff0000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pinmux {
|
||||
mdio_pins: mdio_pins {
|
||||
/* GPIO 10 as MDIO(0x20), GPIO 8 as MDC(0x21) */
|
||||
pinctrl-single,bits = <0x8 0x00200021 0x00ff00ff>;
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mdio_pins>;
|
||||
|
||||
phy-mask = <0x10>;
|
||||
|
||||
phy4: ethernet-phy@4 {
|
||||
reg = <4>;
|
||||
reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
phy-handle = <&phy4>;
|
||||
phy-mode = "sgmii";
|
||||
|
||||
mtd-mac-address = <&info 0x8>;
|
||||
|
||||
qca956x-serdes-fixup;
|
||||
|
||||
gmac-config {
|
||||
device = <&gmac>;
|
||||
};
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
mtd-cal-data = <&art 0x1000>;
|
||||
mtd-mac-address = <&info 0x8>;
|
||||
};
|
@ -577,6 +577,77 @@ static void ag71xx_bit_clear(void __iomem *reg, u32 bit)
|
||||
__raw_readl(reg);
|
||||
}
|
||||
|
||||
static void ag71xx_sgmii_serdes_init_qca956x(struct device_node *np)
|
||||
{
|
||||
struct device_node *np_dev;
|
||||
void __iomem *gmac_base;
|
||||
u32 serdes_cal;
|
||||
u32 t;
|
||||
|
||||
np = of_get_child_by_name(np, "gmac-config");
|
||||
if (!np)
|
||||
return;
|
||||
|
||||
if (of_property_read_u32(np, "serdes-cal", &serdes_cal))
|
||||
/* By default, use middle value for resistor calibration */
|
||||
serdes_cal = 0x7;
|
||||
|
||||
np_dev = of_parse_phandle(np, "device", 0);
|
||||
if (!np_dev)
|
||||
goto out;
|
||||
|
||||
gmac_base = of_iomap(np_dev, 0);
|
||||
if (!gmac_base) {
|
||||
pr_err("%pOF: can't map GMAC registers\n", np_dev);
|
||||
goto err_iomap;
|
||||
}
|
||||
|
||||
pr_debug("%pOF: fixup SERDES calibration to value %i\n",
|
||||
np_dev, serdes_cal);
|
||||
t = __raw_readl(gmac_base + QCA956X_GMAC_REG_SGMII_SERDES);
|
||||
t &= ~(QCA956X_SGMII_SERDES_RES_CALIBRATION_MASK
|
||||
<< QCA956X_SGMII_SERDES_RES_CALIBRATION_SHIFT);
|
||||
t |= (serdes_cal & QCA956X_SGMII_SERDES_RES_CALIBRATION_MASK)
|
||||
<< QCA956X_SGMII_SERDES_RES_CALIBRATION_SHIFT;
|
||||
__raw_writel(t, gmac_base + QCA956X_GMAC_REG_SGMII_SERDES);
|
||||
|
||||
ath79_pll_wr(QCA956X_PLL_ETH_SGMII_SERDES_REG,
|
||||
QCA956X_PLL_ETH_SGMII_SERDES_LOCK_DETECT
|
||||
| QCA956X_PLL_ETH_SGMII_SERDES_EN_PLL);
|
||||
|
||||
t = __raw_readl(gmac_base + QCA956X_GMAC_REG_SGMII_SERDES);
|
||||
|
||||
/* missing in QCA u-boot code, clear before setting */
|
||||
t &= ~(QCA956X_SGMII_SERDES_CDR_BW_MASK
|
||||
<< QCA956X_SGMII_SERDES_CDR_BW_SHIFT |
|
||||
QCA956X_SGMII_SERDES_TX_DR_CTRL_MASK
|
||||
<< QCA956X_SGMII_SERDES_TX_DR_CTRL_SHIFT |
|
||||
QCA956X_SGMII_SERDES_VCO_REG_MASK
|
||||
<< QCA956X_SGMII_SERDES_VCO_REG_SHIFT);
|
||||
|
||||
t |= (3 << QCA956X_SGMII_SERDES_CDR_BW_SHIFT) |
|
||||
(1 << QCA956X_SGMII_SERDES_TX_DR_CTRL_SHIFT) |
|
||||
QCA956X_SGMII_SERDES_PLL_BW |
|
||||
QCA956X_SGMII_SERDES_EN_SIGNAL_DETECT |
|
||||
QCA956X_SGMII_SERDES_FIBER_SDO |
|
||||
(3 << QCA956X_SGMII_SERDES_VCO_REG_SHIFT);
|
||||
|
||||
__raw_writel(t, gmac_base + QCA956X_GMAC_REG_SGMII_SERDES);
|
||||
|
||||
ath79_device_reset_clear(QCA956X_RESET_SGMII_ANALOG);
|
||||
ath79_device_reset_clear(QCA956X_RESET_SGMII);
|
||||
|
||||
while (!(__raw_readl(gmac_base + QCA956X_GMAC_REG_SGMII_SERDES)
|
||||
& QCA956X_SGMII_SERDES_LOCK_DETECT_STATUS))
|
||||
;
|
||||
|
||||
iounmap(gmac_base);
|
||||
err_iomap:
|
||||
of_node_put(np_dev);
|
||||
out:
|
||||
of_node_put(np);
|
||||
}
|
||||
|
||||
static void ag71xx_sgmii_init_qca955x(struct device_node *np)
|
||||
{
|
||||
struct device_node *np_dev;
|
||||
@ -665,6 +736,37 @@ out:
|
||||
of_node_put(np);
|
||||
}
|
||||
|
||||
static void ag71xx_mux_select_sgmii_qca956x(struct device_node *np)
|
||||
{
|
||||
struct device_node *np_dev;
|
||||
void __iomem *gmac_base;
|
||||
u32 t;
|
||||
|
||||
np = of_get_child_by_name(np, "gmac-config");
|
||||
if (!np)
|
||||
return;
|
||||
|
||||
np_dev = of_parse_phandle(np, "device", 0);
|
||||
if (!np_dev)
|
||||
goto out;
|
||||
|
||||
gmac_base = of_iomap(np_dev, 0);
|
||||
if (!gmac_base) {
|
||||
pr_err("%pOF: can't map GMAC registers\n", np_dev);
|
||||
goto err_iomap;
|
||||
}
|
||||
|
||||
t = __raw_readl(gmac_base + QCA956X_GMAC_REG_ETH_CFG);
|
||||
t |= QCA956X_ETH_CFG_GE0_SGMII;
|
||||
__raw_writel(t, gmac_base + QCA956X_GMAC_REG_ETH_CFG);
|
||||
|
||||
iounmap(gmac_base);
|
||||
err_iomap:
|
||||
of_node_put(np_dev);
|
||||
out:
|
||||
of_node_put(np);
|
||||
}
|
||||
|
||||
static void ath79_mii_ctrl_set_if(struct ag71xx *ag, unsigned int mii_if)
|
||||
{
|
||||
u32 t;
|
||||
@ -1423,6 +1525,11 @@ static int ag71xx_probe(struct platform_device *pdev)
|
||||
if (!res)
|
||||
return -EINVAL;
|
||||
|
||||
if (of_property_read_bool(np, "qca956x-serdes-fixup")) {
|
||||
ag71xx_sgmii_serdes_init_qca956x(np);
|
||||
ag71xx_sgmii_init_qca955x(np);
|
||||
}
|
||||
|
||||
err = ag71xx_setup_gmac(np);
|
||||
if (err)
|
||||
return err;
|
||||
@ -1566,6 +1673,10 @@ static int ag71xx_probe(struct platform_device *pdev)
|
||||
return ag->phy_if_mode;
|
||||
}
|
||||
|
||||
if (of_device_is_compatible(np, "qca,qca9560-eth") &&
|
||||
ag->phy_if_mode == PHY_INTERFACE_MODE_SGMII)
|
||||
ag71xx_mux_select_sgmii_qca956x(np);
|
||||
|
||||
if (of_property_read_u32(np, "qca,mac-idx", &ag->mac_idx))
|
||||
ag->mac_idx = -1;
|
||||
if (ag->mii_base)
|
||||
|
@ -48,6 +48,9 @@ ath79_setup_interfaces()
|
||||
tplink,cpe510-v3|\
|
||||
tplink,cpe610-v1|\
|
||||
tplink,cpe610-v2|\
|
||||
tplink,eap225-outdoor-v1|\
|
||||
tplink,eap225-v3|\
|
||||
tplink,eap245-v1|\
|
||||
tplink,re350k-v1|\
|
||||
tplink,re355-v1|\
|
||||
tplink,re450-v1|\
|
||||
|
@ -122,6 +122,12 @@ case "$FIRMWARE" in
|
||||
caldata_extract "art" 0x5000 0x844
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary romfs 0xf100) +2)
|
||||
;;
|
||||
tplink,eap245-v1|\
|
||||
tplink,re450-v2|\
|
||||
tplink,re450-v3)
|
||||
caldata_extract "art" 0x5000 0x844
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) +1)
|
||||
;;
|
||||
tplink,re350k-v1)
|
||||
caldata_extract "art" 0x5000 0x844
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) +2)
|
||||
@ -131,11 +137,6 @@ case "$FIRMWARE" in
|
||||
caldata_extract "art" 0x5000 0x844
|
||||
ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -2)
|
||||
;;
|
||||
tplink,re450-v2|\
|
||||
tplink,re450-v3)
|
||||
caldata_extract "art" 0x5000 0x844
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) +1)
|
||||
;;
|
||||
tplink,tl-wpa8630-v1)
|
||||
caldata_extract "art" 0x5000 0x844
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary u-boot 0x0fc00) +1)
|
||||
@ -207,6 +208,8 @@ case "$FIRMWARE" in
|
||||
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
|
||||
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
|
||||
;;
|
||||
tplink,eap225-outdoor-v1|\
|
||||
tplink,eap225-v3|\
|
||||
tplink,eap225-wall-v2|\
|
||||
tplink,tl-wpa8630p-v2-int|\
|
||||
tplink,tl-wpa8630p-v2.0-eu|\
|
||||
|
@ -1,5 +1,4 @@
|
||||
BOARDNAME:=Generic
|
||||
FEATURES += squashfs
|
||||
|
||||
DEFAULT_PACKAGES += wpad-basic-wolfssl
|
||||
|
||||
|
@ -371,6 +371,28 @@ define Device/tplink-eap2x5
|
||||
pad-extra 128
|
||||
endef
|
||||
|
||||
define Device/tplink_eap225-outdoor-v1
|
||||
$(Device/tplink-eap2x5)
|
||||
SOC := qca9563
|
||||
IMAGE_SIZE := 13824k
|
||||
DEVICE_MODEL := EAP225-Outdoor
|
||||
DEVICE_VARIANT := v1
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
|
||||
TPLINK_BOARD_ID := EAP225-OUTDOOR-V1
|
||||
endef
|
||||
TARGET_DEVICES += tplink_eap225-outdoor-v1
|
||||
|
||||
define Device/tplink_eap225-v3
|
||||
$(Device/tplink-eap2x5)
|
||||
SOC := qca9563
|
||||
IMAGE_SIZE := 13824k
|
||||
DEVICE_MODEL := EAP225
|
||||
DEVICE_VARIANT := v3
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
|
||||
TPLINK_BOARD_ID := EAP225-V3
|
||||
endef
|
||||
TARGET_DEVICES += tplink_eap225-v3
|
||||
|
||||
define Device/tplink_eap225-wall-v2
|
||||
$(Device/tplink-eap2x5)
|
||||
SOC := qca9561
|
||||
@ -382,6 +404,17 @@ define Device/tplink_eap225-wall-v2
|
||||
endef
|
||||
TARGET_DEVICES += tplink_eap225-wall-v2
|
||||
|
||||
define Device/tplink_eap245-v1
|
||||
$(Device/tplink-eap2x5)
|
||||
SOC := qca9563
|
||||
IMAGE_SIZE := 13824k
|
||||
DEVICE_MODEL := EAP245
|
||||
DEVICE_VARIANT := v1
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
|
||||
TPLINK_BOARD_ID := EAP245-V1
|
||||
endef
|
||||
TARGET_DEVICES += tplink_eap245-v1
|
||||
|
||||
define Device/tplink_eap245-v3
|
||||
$(Device/tplink-eap2x5)
|
||||
SOC := qca9563
|
||||
|
@ -1,5 +1,5 @@
|
||||
BOARDNAME := MikroTik devices
|
||||
FEATURES += minor nand squashfs
|
||||
FEATURES += minor nand
|
||||
KERNELNAME := vmlinux vmlinuz
|
||||
IMAGES_DIR := ../../..
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
BOARDNAME := Generic devices with NAND flash
|
||||
|
||||
FEATURES += squashfs nand
|
||||
FEATURES += nand
|
||||
|
||||
DEFAULT_PACKAGES += wpad-basic-wolfssl
|
||||
|
||||
|
@ -864,6 +864,6 @@
|
||||
ipv6_hdr(skb)->hop_limit != hop_limit ||
|
||||
- flowlabel != *((u_int32_t *)ipv6_hdr(skb)))) {
|
||||
+ flowlabel != net_hdr_word(ipv6_hdr(skb)))) {
|
||||
err = ip6_route_me_harder(state->net, skb);
|
||||
err = ip6_route_me_harder(state->net, state->sk, skb);
|
||||
if (err < 0)
|
||||
ret = NF_DROP_ERR(err);
|
||||
|
@ -1,5 +1,5 @@
|
||||
BOARDNAME:=Devices with small flash
|
||||
FEATURES += squashfs small_flash
|
||||
FEATURES += small_flash
|
||||
|
||||
DEFAULT_PACKAGES += wpad-basic-wolfssl
|
||||
|
||||
|
@ -70,7 +70,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
}
|
||||
|
||||
static int bcm2835_spi_setup(struct spi_device *spi)
|
||||
@@ -1277,6 +1325,7 @@ static int bcm2835_spi_probe(struct plat
|
||||
@@ -1276,6 +1324,7 @@ static int bcm2835_spi_probe(struct plat
|
||||
ctlr->bits_per_word_mask = SPI_BPW_MASK(8);
|
||||
ctlr->num_chipselect = BCM2835_SPI_NUM_CS;
|
||||
ctlr->setup = bcm2835_spi_setup;
|
||||
|
@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/spi/spi-bcm2835.c
|
||||
+++ b/drivers/spi/spi-bcm2835.c
|
||||
@@ -1279,31 +1279,6 @@ static int bcm2835_spi_setup(struct spi_
|
||||
@@ -1278,31 +1278,6 @@ static int bcm2835_spi_setup(struct spi_
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
-
|
||||
- spi->cs_gpiod = gpiochip_request_own_desc(chip, 8 - spi->chip_select,
|
||||
- DRV_NAME,
|
||||
- lflags,
|
||||
- GPIO_LOOKUP_FLAGS_DEFAULT,
|
||||
- GPIOD_OUT_LOW);
|
||||
- if (IS_ERR(spi->cs_gpiod))
|
||||
- return PTR_ERR(spi->cs_gpiod);
|
||||
|
@ -23,7 +23,7 @@ Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
|
||||
/* Read as many bytes as possible from FIFO */
|
||||
bcm2835_rd_fifo(bs);
|
||||
/* Write as many bytes as possible to FIFO */
|
||||
@@ -1335,7 +1339,8 @@ static int bcm2835_spi_probe(struct plat
|
||||
@@ -1334,7 +1338,8 @@ static int bcm2835_spi_probe(struct plat
|
||||
bcm2835_wr(bs, BCM2835_SPI_CS,
|
||||
BCM2835_SPI_CS_CLEAR_RX | BCM2835_SPI_CS_CLEAR_TX);
|
||||
|
||||
|
@ -12,12 +12,11 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
--- a/drivers/spi/spi-bcm2835.c
|
||||
+++ b/drivers/spi/spi-bcm2835.c
|
||||
@@ -1230,8 +1230,6 @@ static int bcm2835_spi_setup(struct spi_
|
||||
@@ -1230,7 +1230,6 @@ static int bcm2835_spi_setup(struct spi_
|
||||
{
|
||||
struct spi_controller *ctlr = spi->controller;
|
||||
struct bcm2835_spi *bs = spi_controller_get_devdata(ctlr);
|
||||
- struct gpio_chip *chip;
|
||||
- enum gpio_lookup_flags lflags;
|
||||
u32 cs;
|
||||
|
||||
/*
|
||||
|
@ -19,7 +19,7 @@ Signed-off-by: Rob Herring <robh@kernel.org>
|
||||
|
||||
--- a/drivers/of/address.c
|
||||
+++ b/drivers/of/address.c
|
||||
@@ -1023,7 +1023,7 @@ bool of_dma_is_coherent(struct device_no
|
||||
@@ -1025,7 +1025,7 @@ bool of_dma_is_coherent(struct device_no
|
||||
of_node_put(node);
|
||||
return true;
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
}
|
||||
--- a/kernel/dma/swiotlb.c
|
||||
+++ b/kernel/dma/swiotlb.c
|
||||
@@ -678,7 +678,7 @@ bool swiotlb_map(struct device *dev, phy
|
||||
@@ -682,7 +682,7 @@ bool swiotlb_map(struct device *dev, phy
|
||||
|
||||
/* Ensure that the address returned is DMA'ble */
|
||||
*dma_addr = __phys_to_dma(dev, *phys);
|
||||
|
@ -0,0 +1,29 @@
|
||||
From df8d85d8c69d6837817e54dcb73c84a8b5a13877 Mon Sep 17 00:00:00 2001
|
||||
From: Filip Moc <dev@moc6.cz>
|
||||
Date: Tue, 17 Nov 2020 18:36:31 +0100
|
||||
Subject: net: usb: qmi_wwan: Set DTR quirk for MR400
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
LTE module MR400 embedded in TL-MR6400 v4 requires DTR to be set.
|
||||
|
||||
Signed-off-by: Filip Moc <dev@moc6.cz>
|
||||
Acked-by: Bjørn Mork <bjorn@mork.no>
|
||||
Link: https://lore.kernel.org/r/20201117173631.GA550981@moc6.cz
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/usb/qmi_wwan.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/usb/qmi_wwan.c
|
||||
+++ b/drivers/net/usb/qmi_wwan.c
|
||||
@@ -1092,7 +1092,7 @@ static const struct usb_device_id produc
|
||||
{QMI_FIXED_INTF(0x05c6, 0x9011, 4)},
|
||||
{QMI_FIXED_INTF(0x05c6, 0x9021, 1)},
|
||||
{QMI_FIXED_INTF(0x05c6, 0x9022, 2)},
|
||||
- {QMI_FIXED_INTF(0x05c6, 0x9025, 4)}, /* Alcatel-sbell ASB TL131 TDD LTE (China Mobile) */
|
||||
+ {QMI_QUIRK_SET_DTR(0x05c6, 0x9025, 4)}, /* Alcatel-sbell ASB TL131 TDD LTE (China Mobile) */
|
||||
{QMI_FIXED_INTF(0x05c6, 0x9026, 3)},
|
||||
{QMI_FIXED_INTF(0x05c6, 0x902e, 5)},
|
||||
{QMI_FIXED_INTF(0x05c6, 0x9031, 5)},
|
@ -0,0 +1,61 @@
|
||||
From: Sven Eckelmann <sven@narfation.org>
|
||||
Date: Sun, 22 Nov 2020 00:48:33 +0100
|
||||
Subject: [PATCH RFC] mtd: parser: cmdline: Fix parsing of part-names with colons
|
||||
|
||||
Some devices (especially QCA ones) are already using hardcoded partition
|
||||
names with colons in it. The OpenMesh A62 for example provides following
|
||||
mtd relevant information via cmdline:
|
||||
|
||||
root=31:11 mtdparts=spi0.0:256k(0:SBL1),128k(0:MIBIB),384k(0:QSEE),64k(0:CDT),64k(0:DDRPARAMS),64k(0:APPSBLENV),512k(0:APPSBL),64k(0:ART),64k(custom),64k(0:KEYS),0x002b0000(kernel),0x00c80000(rootfs),15552k(inactive) rootfsname=rootfs rootwait
|
||||
|
||||
The change to split only on the last colon between mtd-id and partitions
|
||||
will cause newpart to see following string for the first partition:
|
||||
|
||||
KEYS),0x002b0000(kernel),0x00c80000(rootfs),15552k(inactive)
|
||||
|
||||
Such a partition list cannot be parsed and thus the device fails to boot.
|
||||
|
||||
Avoid this behavior by making sure that the start of the first part-name
|
||||
("(") will also be the last byte the mtd-id split algorithm is using for
|
||||
its colon search.
|
||||
|
||||
Forwarded: https://patchwork.ozlabs.org/project/linux-mtd/patch/20201122001533.985641-1-sven@narfation.org/
|
||||
Fixes: eb13fa022741 ("mtd: parser: cmdline: Support MTD names containing one or more colons")
|
||||
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
||||
|
||||
--- a/drivers/mtd/parsers/cmdlinepart.c
|
||||
+++ b/drivers/mtd/parsers/cmdlinepart.c
|
||||
@@ -218,7 +218,7 @@ static int mtdpart_setup_real(char *s)
|
||||
struct cmdline_mtd_partition *this_mtd;
|
||||
struct mtd_partition *parts;
|
||||
int mtd_id_len, num_parts;
|
||||
- char *p, *mtd_id, *semicol;
|
||||
+ char *p, *mtd_id, *semicol, *open_parenth;
|
||||
|
||||
/*
|
||||
* Replace the first ';' by a NULL char so strrchr can work
|
||||
@@ -228,6 +228,13 @@ static int mtdpart_setup_real(char *s)
|
||||
if (semicol)
|
||||
*semicol = '\0';
|
||||
|
||||
+ /* make sure that part-names with ":" will not be handled as
|
||||
+ * part of the mtd-id with an ":"
|
||||
+ */
|
||||
+ open_parenth = strchr(s, '(');
|
||||
+ if (open_parenth)
|
||||
+ *open_parenth = '\0';
|
||||
+
|
||||
mtd_id = s;
|
||||
|
||||
/*
|
||||
@@ -237,6 +244,10 @@ static int mtdpart_setup_real(char *s)
|
||||
*/
|
||||
p = strrchr(s, ':');
|
||||
|
||||
+ /* Restore the '(' now. */
|
||||
+ if (open_parenth)
|
||||
+ *open_parenth = '(';
|
||||
+
|
||||
/* Restore the ';' now. */
|
||||
if (semicol)
|
||||
*semicol = ';';
|
@ -1,18 +1,6 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017, Sven Eckelmann <sven.eckelmann@openmesh.com>
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "qcom-ipq4019.dtsi"
|
||||
@ -95,30 +83,28 @@
|
||||
};
|
||||
|
||||
aliases {
|
||||
led-boot = &power;
|
||||
led-failsafe = &power;
|
||||
led-running = &power;
|
||||
led-upgrade = &power;
|
||||
led-boot = &led_status_green;
|
||||
led-failsafe = &led_status_green;
|
||||
led-running = &led_status_green;
|
||||
led-upgrade = &led_status_green;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
red {
|
||||
status_red {
|
||||
label = "red:status";
|
||||
gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "default-off";
|
||||
};
|
||||
|
||||
power: green {
|
||||
led_status_green: status_green {
|
||||
label = "green:status";
|
||||
gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
blue {
|
||||
status_blue {
|
||||
label = "blue:status";
|
||||
gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "default-off";
|
||||
};
|
||||
};
|
||||
|
||||
@ -168,7 +154,7 @@
|
||||
status = "okay";
|
||||
cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
m25p80@0 {
|
||||
flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "jedec,spi-nor";
|
||||
|
@ -1,18 +1,6 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2018, Sven Eckelmann <sven.eckelmann@openmesh.com>
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "qcom-ipq4019.dtsi"
|
||||
@ -98,30 +86,28 @@
|
||||
};
|
||||
|
||||
aliases {
|
||||
led-boot = &power;
|
||||
led-failsafe = &power;
|
||||
led-running = &power;
|
||||
led-upgrade = &power;
|
||||
led-boot = &led_status_green;
|
||||
led-failsafe = &led_status_green;
|
||||
led-running = &led_status_green;
|
||||
led-upgrade = &led_status_green;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
red {
|
||||
status_red {
|
||||
label = "red:status";
|
||||
gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "default-off";
|
||||
};
|
||||
|
||||
power: green {
|
||||
led_status_green: status_green {
|
||||
label = "green:status";
|
||||
gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
blue {
|
||||
status_blue {
|
||||
label = "blue:status";
|
||||
gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "default-off";
|
||||
};
|
||||
};
|
||||
|
||||
@ -178,7 +164,7 @@
|
||||
status = "okay";
|
||||
cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
m25p80@0 {
|
||||
flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "jedec,spi-nor";
|
||||
|
@ -39,7 +39,7 @@ Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
|
||||
|
||||
--- a/drivers/opp/core.c
|
||||
+++ b/drivers/opp/core.c
|
||||
@@ -2101,6 +2101,75 @@ put_table:
|
||||
@@ -2102,6 +2102,75 @@ put_table:
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
|
||||
|
||||
--- a/drivers/opp/core.c
|
||||
+++ b/drivers/opp/core.c
|
||||
@@ -2141,6 +2141,7 @@ int dev_pm_opp_adjust_voltage(struct dev
|
||||
@@ -2142,6 +2142,7 @@ int dev_pm_opp_adjust_voltage(struct dev
|
||||
struct opp_table *opp_table;
|
||||
struct dev_pm_opp *tmp_opp, *opp = ERR_PTR(-ENODEV);
|
||||
int r = 0;
|
||||
@ -25,7 +25,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
|
||||
|
||||
/* Find the opp_table */
|
||||
opp_table = _find_opp_table(dev);
|
||||
@@ -2170,8 +2171,17 @@ int dev_pm_opp_adjust_voltage(struct dev
|
||||
@@ -2171,8 +2172,17 @@ int dev_pm_opp_adjust_voltage(struct dev
|
||||
goto adjust_unlock;
|
||||
|
||||
opp->supplies->u_volt = u_volt;
|
||||
|
@ -89,10 +89,10 @@ Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>
|
||||
- clk_disable_unprepare(res->core_clk);
|
||||
- clk_disable_unprepare(res->aux_clk);
|
||||
- clk_disable_unprepare(res->ref_clk);
|
||||
regulator_bulk_disable(ARRAY_SIZE(res->supplies), res->supplies);
|
||||
}
|
||||
|
||||
@@ -321,47 +310,45 @@ static int qcom_pcie_init_2_1_0(struct q
|
||||
writel(1, pcie->parf + PCIE20_PARF_PHY_CTRL);
|
||||
|
||||
@@ -334,47 +323,45 @@ static int qcom_pcie_init_2_1_0(struct q
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -161,7 +161,7 @@ Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>
|
||||
|
||||
/* enable PCIe clocks and resets */
|
||||
val = readl(pcie->parf + PCIE20_PARF_PHY_CTRL);
|
||||
@@ -393,36 +380,6 @@ static int qcom_pcie_init_2_1_0(struct q
|
||||
@@ -406,36 +393,6 @@ static int qcom_pcie_init_2_1_0(struct q
|
||||
val |= PHY_REFCLK_SSP_EN;
|
||||
writel(val, pcie->parf + PCIE20_PARF_PHY_REFCLK);
|
||||
|
||||
@ -198,7 +198,7 @@ Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>
|
||||
/* wait for clock acquisition */
|
||||
usleep_range(1000, 1500);
|
||||
|
||||
@@ -435,15 +392,19 @@ static int qcom_pcie_init_2_1_0(struct q
|
||||
@@ -448,15 +405,19 @@ static int qcom_pcie_init_2_1_0(struct q
|
||||
|
||||
return 0;
|
||||
|
||||
|
@ -16,7 +16,7 @@ Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>
|
||||
|
||||
--- a/drivers/pci/controller/dwc/pcie-qcom.c
|
||||
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
|
||||
@@ -355,7 +355,8 @@ static int qcom_pcie_init_2_1_0(struct q
|
||||
@@ -368,7 +368,8 @@ static int qcom_pcie_init_2_1_0(struct q
|
||||
val &= ~BIT(0);
|
||||
writel(val, pcie->parf + PCIE20_PARF_PHY_CTRL);
|
||||
|
||||
@ -26,7 +26,7 @@ Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>
|
||||
writel(PCS_DEEMPH_TX_DEEMPH_GEN1(24) |
|
||||
PCS_DEEMPH_TX_DEEMPH_GEN2_3_5DB(24) |
|
||||
PCS_DEEMPH_TX_DEEMPH_GEN2_6DB(34),
|
||||
@@ -1315,6 +1316,7 @@ err_pm_runtime_put:
|
||||
@@ -1328,6 +1329,7 @@ err_pm_runtime_put:
|
||||
static const struct of_device_id qcom_pcie_match[] = {
|
||||
{ .compatible = "qcom,pcie-apq8084", .data = &ops_1_0_0 },
|
||||
{ .compatible = "qcom,pcie-ipq8064", .data = &ops_2_1_0 },
|
||||
|
@ -49,7 +49,7 @@ Backported with light changes:
|
||||
};
|
||||
|
||||
#define to_qcom_pcie(x) dev_get_drvdata((x)->dev)
|
||||
@@ -384,6 +388,11 @@ static int qcom_pcie_init_2_1_0(struct q
|
||||
@@ -397,6 +401,11 @@ static int qcom_pcie_init_2_1_0(struct q
|
||||
/* wait for clock acquisition */
|
||||
usleep_range(1000, 1500);
|
||||
|
||||
@ -61,7 +61,7 @@ Backported with light changes:
|
||||
|
||||
/* Set the Max TLP size to 2K, instead of using default of 4K */
|
||||
writel(CFG_REMOTE_RD_REQ_BRIDGE_SIZE_2K,
|
||||
@@ -1248,6 +1257,10 @@ static int qcom_pcie_probe(struct platfo
|
||||
@@ -1261,6 +1270,10 @@ static int qcom_pcie_probe(struct platfo
|
||||
goto err_pm_runtime_put;
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
depends on ARCH_MOXART || COMPILE_TEST
|
||||
--- a/drivers/net/phy/Makefile
|
||||
+++ b/drivers/net/phy/Makefile
|
||||
@@ -51,6 +51,7 @@ obj-$(CONFIG_MDIO_CAVIUM) += mdio-cavium
|
||||
@@ -50,6 +50,7 @@ obj-$(CONFIG_MDIO_CAVIUM) += mdio-cavium
|
||||
obj-$(CONFIG_MDIO_GPIO) += mdio-gpio.o
|
||||
obj-$(CONFIG_MDIO_HISI_FEMAC) += mdio-hisi-femac.o
|
||||
obj-$(CONFIG_MDIO_I2C) += mdio-i2c.o
|
||||
|
@ -1,46 +0,0 @@
|
||||
From 1960d75e3251659be8276529e4d01cf6993d9f4a Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Tue, 1 Sep 2020 14:21:44 +0200
|
||||
Subject: [PATCH] PCI: qcom: Make sure PCIe is reset before init for rev 2.1.0
|
||||
|
||||
Qsdk U-Boot can incorrectly leave the PCIe interface in an undefined
|
||||
state if bootm command is used instead of bootipq. This is caused by the
|
||||
not deinit of PCIe when bootm is called. Reset the PCIe before init
|
||||
anyway to fix this U-Boot bug.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver")
|
||||
Cc: stable@vger.kernel.org # v4.19+
|
||||
---
|
||||
drivers/pci/controller/dwc/pcie-qcom.c | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
--- a/drivers/pci/controller/dwc/pcie-qcom.c
|
||||
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
|
||||
@@ -296,6 +296,9 @@ static void qcom_pcie_deinit_2_1_0(struc
|
||||
reset_control_assert(res->por_reset);
|
||||
reset_control_assert(res->ext_reset);
|
||||
reset_control_assert(res->phy_reset);
|
||||
+
|
||||
+ writel(1, pcie->parf + PCIE20_PARF_PHY_CTRL);
|
||||
+
|
||||
regulator_bulk_disable(ARRAY_SIZE(res->supplies), res->supplies);
|
||||
}
|
||||
|
||||
@@ -308,6 +311,16 @@ static int qcom_pcie_init_2_1_0(struct q
|
||||
u32 val;
|
||||
int ret;
|
||||
|
||||
+ /* reset the PCIe interface as uboot can leave it undefined state */
|
||||
+ reset_control_assert(res->pci_reset);
|
||||
+ reset_control_assert(res->axi_reset);
|
||||
+ reset_control_assert(res->ahb_reset);
|
||||
+ reset_control_assert(res->por_reset);
|
||||
+ reset_control_assert(res->ext_reset);
|
||||
+ reset_control_assert(res->phy_reset);
|
||||
+
|
||||
+ writel(1, pcie->parf + PCIE20_PARF_PHY_CTRL);
|
||||
+
|
||||
ret = regulator_bulk_enable(ARRAY_SIZE(res->supplies), res->supplies);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "cannot enable regulators\n");
|
@ -419,9 +419,12 @@ CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
# CONFIG_GIANFAR is not set
|
||||
CONFIG_GLOB=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
CONFIG_GPIO_GENERIC_PLATFORM=y
|
||||
CONFIG_GPIO_MPC8XXX=y
|
||||
CONFIG_GPIO_PCA953X=y
|
||||
CONFIG_GPIO_PCA953X_IRQ=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDEN_BRANCH_PREDICTOR=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
@ -839,6 +842,10 @@ CONFIG_SERIAL_FSL_LPUART=y
|
||||
CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SERIAL_SC16IS7XX=y
|
||||
CONFIG_SERIAL_SC16IS7XX_CORE=y
|
||||
# CONFIG_SERIAL_SC16IS7XX_I2C is not set
|
||||
CONFIG_SERIAL_SC16IS7XX_SPI=y
|
||||
CONFIG_SERIAL_XILINX_PS_UART=y
|
||||
CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
|
||||
CONFIG_SERIO=y
|
||||
|
@ -10,6 +10,7 @@ define Device/Default
|
||||
FILESYSTEMS := squashfs
|
||||
IMAGES := firmware.bin sysupgrade.bin
|
||||
KERNEL := kernel-bin | uImage none
|
||||
KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
|
||||
KERNEL_NAME := zImage
|
||||
KERNEL_LOADADDR := 0x80008000
|
||||
KERNEL_ENTRY_POINT := 0x80008000
|
||||
|
@ -10,6 +10,7 @@ define Device/Default
|
||||
IMAGES := firmware.bin sysupgrade.bin
|
||||
FILESYSTEMS := squashfs
|
||||
KERNEL := kernel-bin | gzip | uImage gzip
|
||||
KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
|
||||
KERNEL_LOADADDR := 0x80080000
|
||||
KERNEL_ENTRY_POINT := 0x80080000
|
||||
DEVICE_DTS = freescale/$(subst _,-,$(1))
|
||||
@ -62,6 +63,9 @@ define Device/fsl_ls1012a-rdb
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-ppfe \
|
||||
tfa-ls1012a-rdb \
|
||||
kmod-hwmon-ina2xx \
|
||||
kmod-iio-fxas21002c-i2c \
|
||||
kmod-iio-fxos8700-i2c \
|
||||
kmod-ppfe
|
||||
IMAGE/firmware.bin := \
|
||||
ls-clean | \
|
||||
|
@ -22,7 +22,7 @@ Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
|
||||
|
||||
--- a/drivers/net/phy/Kconfig
|
||||
+++ b/drivers/net/phy/Kconfig
|
||||
@@ -371,6 +371,16 @@ config AT803X_PHY
|
||||
@@ -367,6 +367,16 @@ config AT803X_PHY
|
||||
---help---
|
||||
Currently supports the AT8030 and AT8035 model
|
||||
|
||||
|
@ -15,7 +15,7 @@ Signed-off-by: Florin Chiculita <florinlaurentiu.chiculita@nxp.com>
|
||||
|
||||
--- a/drivers/net/phy/Kconfig
|
||||
+++ b/drivers/net/phy/Kconfig
|
||||
@@ -479,6 +479,11 @@ config ICPLUS_PHY
|
||||
@@ -475,6 +475,11 @@ config ICPLUS_PHY
|
||||
---help---
|
||||
Currently supports the IP175C and IP1001 PHYs.
|
||||
|
||||
@ -29,7 +29,7 @@ Signed-off-by: Florin Chiculita <florinlaurentiu.chiculita@nxp.com>
|
||||
---help---
|
||||
--- a/drivers/net/phy/Makefile
|
||||
+++ b/drivers/net/phy/Makefile
|
||||
@@ -88,6 +88,7 @@ obj-$(CONFIG_DP83848_PHY) += dp83848.o
|
||||
@@ -87,6 +87,7 @@ obj-$(CONFIG_DP83848_PHY) += dp83848.o
|
||||
obj-$(CONFIG_DP83867_PHY) += dp83867.o
|
||||
obj-$(CONFIG_FIXED_PHY) += fixed_phy.o
|
||||
obj-$(CONFIG_ICPLUS_PHY) += icplus.o
|
||||
|
@ -25,7 +25,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
--- a/drivers/net/can/flexcan.c
|
||||
+++ b/drivers/net/can/flexcan.c
|
||||
@@ -784,16 +784,23 @@ static inline struct flexcan_priv *rx_of
|
||||
@@ -783,16 +783,23 @@ static inline struct flexcan_priv *rx_of
|
||||
return container_of(offload, struct flexcan_priv, offload);
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
mb = flexcan_get_mb(priv, n);
|
||||
|
||||
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
|
||||
@@ -807,7 +814,7 @@ static unsigned int flexcan_mailbox_read
|
||||
@@ -806,7 +813,7 @@ static unsigned int flexcan_mailbox_read
|
||||
code = reg_ctrl & FLEXCAN_MB_CODE_MASK;
|
||||
if ((code != FLEXCAN_MB_CODE_RX_FULL) &&
|
||||
(code != FLEXCAN_MB_CODE_RX_OVERRUN))
|
||||
@ -61,7 +61,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
if (code == FLEXCAN_MB_CODE_RX_OVERRUN) {
|
||||
/* This MB was overrun, we lost data */
|
||||
@@ -817,11 +824,17 @@ static unsigned int flexcan_mailbox_read
|
||||
@@ -816,11 +823,17 @@ static unsigned int flexcan_mailbox_read
|
||||
} else {
|
||||
reg_iflag1 = priv->read(®s->iflag1);
|
||||
if (!(reg_iflag1 & FLEXCAN_IFLAG_RX_FIFO_AVAILABLE))
|
||||
@ -80,7 +80,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
/* increase timstamp to full 32 bit */
|
||||
*timestamp = reg_ctrl << 16;
|
||||
|
||||
@@ -840,7 +853,7 @@ static unsigned int flexcan_mailbox_read
|
||||
@@ -839,7 +852,7 @@ static unsigned int flexcan_mailbox_read
|
||||
*(__be32 *)(cf->data + i) = data;
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
|
||||
/* Clear IRQ */
|
||||
if (n < 32)
|
||||
@@ -857,7 +870,7 @@ static unsigned int flexcan_mailbox_read
|
||||
@@ -856,7 +869,7 @@ static unsigned int flexcan_mailbox_read
|
||||
*/
|
||||
priv->read(®s->timer);
|
||||
|
||||
|
@ -17,7 +17,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
--- a/drivers/net/can/flexcan.c
|
||||
+++ b/drivers/net/can/flexcan.c
|
||||
@@ -1570,7 +1570,6 @@ static int flexcan_probe(struct platform
|
||||
@@ -1569,7 +1569,6 @@ static int flexcan_probe(struct platform
|
||||
struct net_device *dev;
|
||||
struct flexcan_priv *priv;
|
||||
struct regulator *reg_xceiver;
|
||||
@ -25,7 +25,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
struct clk *clk_ipg = NULL, *clk_per = NULL;
|
||||
struct flexcan_regs __iomem *regs;
|
||||
int err, irq;
|
||||
@@ -1605,12 +1604,11 @@ static int flexcan_probe(struct platform
|
||||
@@ -1604,12 +1603,11 @@ static int flexcan_probe(struct platform
|
||||
clock_freq = clk_get_rate(clk_per);
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
--- a/drivers/net/can/flexcan.c
|
||||
+++ b/drivers/net/can/flexcan.c
|
||||
@@ -744,8 +744,6 @@ static void flexcan_irq_state(struct net
|
||||
@@ -743,8 +743,6 @@ static void flexcan_irq_state(struct net
|
||||
u32 timestamp;
|
||||
int err;
|
||||
|
||||
@ -27,7 +27,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
flt = reg_esr & FLEXCAN_ESR_FLT_CONF_MASK;
|
||||
if (likely(flt == FLEXCAN_ESR_FLT_CONF_ACTIVE)) {
|
||||
tx_state = unlikely(reg_esr & FLEXCAN_ESR_TX_WRN) ?
|
||||
@@ -765,6 +763,8 @@ static void flexcan_irq_state(struct net
|
||||
@@ -764,6 +762,8 @@ static void flexcan_irq_state(struct net
|
||||
if (likely(new_state == priv->can.state))
|
||||
return;
|
||||
|
||||
|
@ -23,7 +23,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
#define FLEXCAN_IFLAG_RX_FIFO_OVERFLOW BIT(7)
|
||||
#define FLEXCAN_IFLAG_RX_FIFO_WARN BIT(6)
|
||||
#define FLEXCAN_IFLAG_RX_FIFO_AVAILABLE BIT(5)
|
||||
@@ -880,7 +880,7 @@ static inline u64 flexcan_read_reg_iflag
|
||||
@@ -879,7 +879,7 @@ static inline u64 flexcan_read_reg_iflag
|
||||
u32 iflag1, iflag2;
|
||||
|
||||
iflag2 = priv->read(®s->iflag2) & priv->reg_imask2_default &
|
||||
@ -32,7 +32,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
iflag1 = priv->read(®s->iflag1) & priv->reg_imask1_default;
|
||||
|
||||
return (u64)iflag2 << 32 | iflag1;
|
||||
@@ -930,7 +930,7 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
@@ -929,7 +929,7 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
reg_iflag2 = priv->read(®s->iflag2);
|
||||
|
||||
/* transmission complete interrupt */
|
||||
@ -41,7 +41,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
u32 reg_ctrl = priv->read(&priv->tx_mb->can_ctrl);
|
||||
|
||||
handled = IRQ_HANDLED;
|
||||
@@ -942,7 +942,7 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
@@ -941,7 +941,7 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
/* after sending a RTR frame MB is in RX mode */
|
||||
priv->write(FLEXCAN_MB_CODE_TX_INACTIVE,
|
||||
&priv->tx_mb->can_ctrl);
|
||||
@ -50,7 +50,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
netif_wake_queue(dev);
|
||||
}
|
||||
|
||||
@@ -1321,7 +1321,7 @@ static int flexcan_open(struct net_devic
|
||||
@@ -1320,7 +1320,7 @@ static int flexcan_open(struct net_devic
|
||||
priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx);
|
||||
|
||||
priv->reg_imask1_default = 0;
|
||||
|
@ -16,7 +16,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
--- a/drivers/net/can/flexcan.c
|
||||
+++ b/drivers/net/can/flexcan.c
|
||||
@@ -898,13 +898,13 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
@@ -897,13 +897,13 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
|
||||
/* reception interrupt */
|
||||
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
|
||||
|
@ -49,7 +49,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
struct clk *clk_ipg;
|
||||
struct clk *clk_per;
|
||||
@@ -879,9 +879,9 @@ static inline u64 flexcan_read_reg_iflag
|
||||
@@ -878,9 +878,9 @@ static inline u64 flexcan_read_reg_iflag
|
||||
struct flexcan_regs __iomem *regs = priv->regs;
|
||||
u32 iflag1, iflag2;
|
||||
|
||||
@ -61,7 +61,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
return (u64)iflag2 << 32 | iflag1;
|
||||
}
|
||||
@@ -1228,8 +1228,8 @@ static int flexcan_chip_start(struct net
|
||||
@@ -1227,8 +1227,8 @@ static int flexcan_chip_start(struct net
|
||||
/* enable interrupts atomically */
|
||||
disable_irq(dev->irq);
|
||||
priv->write(priv->reg_ctrl_default, ®s->ctrl);
|
||||
@ -72,7 +72,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
enable_irq(dev->irq);
|
||||
|
||||
/* print chip status */
|
||||
@@ -1320,8 +1320,8 @@ static int flexcan_open(struct net_devic
|
||||
@@ -1319,8 +1319,8 @@ static int flexcan_open(struct net_devic
|
||||
priv->tx_mb_idx = priv->mb_count - 1;
|
||||
priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx);
|
||||
|
||||
@ -83,7 +83,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
priv->offload.mailbox_read = flexcan_mailbox_read;
|
||||
|
||||
@@ -1333,12 +1333,12 @@ static int flexcan_open(struct net_devic
|
||||
@@ -1332,12 +1332,12 @@ static int flexcan_open(struct net_devic
|
||||
|
||||
imask = GENMASK_ULL(priv->offload.mb_last,
|
||||
priv->offload.mb_first);
|
||||
|
@ -24,7 +24,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
--- a/drivers/net/can/flexcan.c
|
||||
+++ b/drivers/net/can/flexcan.c
|
||||
@@ -879,8 +879,7 @@ static inline u64 flexcan_read_reg_iflag
|
||||
@@ -878,8 +878,7 @@ static inline u64 flexcan_read_reg_iflag
|
||||
struct flexcan_regs __iomem *regs = priv->regs;
|
||||
u32 iflag1, iflag2;
|
||||
|
||||
@ -34,7 +34,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
iflag1 = priv->read(®s->iflag1) & priv->rx_mask1;
|
||||
|
||||
return (u64)iflag2 << 32 | iflag1;
|
||||
@@ -1229,7 +1228,7 @@ static int flexcan_chip_start(struct net
|
||||
@@ -1228,7 +1227,7 @@ static int flexcan_chip_start(struct net
|
||||
disable_irq(dev->irq);
|
||||
priv->write(priv->reg_ctrl_default, ®s->ctrl);
|
||||
priv->write(priv->rx_mask1, ®s->imask1);
|
||||
@ -43,7 +43,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
enable_irq(dev->irq);
|
||||
|
||||
/* print chip status */
|
||||
@@ -1320,9 +1319,6 @@ static int flexcan_open(struct net_devic
|
||||
@@ -1319,9 +1318,6 @@ static int flexcan_open(struct net_devic
|
||||
priv->tx_mb_idx = priv->mb_count - 1;
|
||||
priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx);
|
||||
|
||||
@ -53,7 +53,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
priv->offload.mailbox_read = flexcan_mailbox_read;
|
||||
|
||||
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
|
||||
@@ -1333,12 +1329,12 @@ static int flexcan_open(struct net_devic
|
||||
@@ -1332,12 +1328,12 @@ static int flexcan_open(struct net_devic
|
||||
|
||||
imask = GENMASK_ULL(priv->offload.mb_last,
|
||||
priv->offload.mb_first);
|
||||
|
@ -41,7 +41,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
struct clk *clk_ipg;
|
||||
struct clk *clk_per;
|
||||
@@ -873,16 +873,15 @@ static struct sk_buff *flexcan_mailbox_r
|
||||
@@ -872,16 +872,15 @@ static struct sk_buff *flexcan_mailbox_r
|
||||
return skb;
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
}
|
||||
|
||||
static irqreturn_t flexcan_irq(int irq, void *dev_id)
|
||||
@@ -1053,6 +1052,7 @@ static int flexcan_chip_start(struct net
|
||||
@@ -1052,6 +1051,7 @@ static int flexcan_chip_start(struct net
|
||||
struct flexcan_priv *priv = netdev_priv(dev);
|
||||
struct flexcan_regs __iomem *regs = priv->regs;
|
||||
u32 reg_mcr, reg_ctrl, reg_ctrl2, reg_mecr;
|
||||
@ -70,7 +70,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
int err, i;
|
||||
struct flexcan_mb __iomem *mb;
|
||||
|
||||
@@ -1227,8 +1227,9 @@ static int flexcan_chip_start(struct net
|
||||
@@ -1226,8 +1226,9 @@ static int flexcan_chip_start(struct net
|
||||
/* enable interrupts atomically */
|
||||
disable_irq(dev->irq);
|
||||
priv->write(priv->reg_ctrl_default, ®s->ctrl);
|
||||
@ -82,7 +82,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
enable_irq(dev->irq);
|
||||
|
||||
/* print chip status */
|
||||
@@ -1322,19 +1323,14 @@ static int flexcan_open(struct net_devic
|
||||
@@ -1321,19 +1322,14 @@ static int flexcan_open(struct net_devic
|
||||
priv->offload.mailbox_read = flexcan_mailbox_read;
|
||||
|
||||
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
|
||||
|
@ -39,7 +39,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
u32 reg_ctrl_default;
|
||||
|
||||
struct clk *clk_ipg;
|
||||
@@ -891,7 +891,8 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
@@ -890,7 +890,8 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
struct flexcan_priv *priv = netdev_priv(dev);
|
||||
struct flexcan_regs __iomem *regs = priv->regs;
|
||||
irqreturn_t handled = IRQ_NONE;
|
||||
@ -49,7 +49,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
enum can_state last_state = priv->can.state;
|
||||
|
||||
/* reception interrupt */
|
||||
@@ -925,10 +926,10 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
@@ -924,10 +925,10 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
u32 reg_ctrl = priv->read(&priv->tx_mb->can_ctrl);
|
||||
|
||||
handled = IRQ_HANDLED;
|
||||
@@ -940,7 +941,7 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
@@ -939,7 +940,7 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
/* after sending a RTR frame MB is in RX mode */
|
||||
priv->write(FLEXCAN_MB_CODE_TX_INACTIVE,
|
||||
&priv->tx_mb->can_ctrl);
|
||||
@ -71,7 +71,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
netif_wake_queue(dev);
|
||||
}
|
||||
|
||||
@@ -1227,7 +1228,7 @@ static int flexcan_chip_start(struct net
|
||||
@@ -1226,7 +1227,7 @@ static int flexcan_chip_start(struct net
|
||||
/* enable interrupts atomically */
|
||||
disable_irq(dev->irq);
|
||||
priv->write(priv->reg_ctrl_default, ®s->ctrl);
|
||||
@ -80,7 +80,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
priv->write(upper_32_bits(reg_imask), ®s->imask2);
|
||||
priv->write(lower_32_bits(reg_imask), ®s->imask1);
|
||||
enable_irq(dev->irq);
|
||||
@@ -1319,6 +1320,7 @@ static int flexcan_open(struct net_devic
|
||||
@@ -1318,6 +1319,7 @@ static int flexcan_open(struct net_devic
|
||||
flexcan_get_mb(priv, FLEXCAN_TX_MB_RESERVED_OFF_FIFO);
|
||||
priv->tx_mb_idx = priv->mb_count - 1;
|
||||
priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx);
|
||||
|
@ -24,7 +24,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
--- a/drivers/net/can/flexcan.c
|
||||
+++ b/drivers/net/can/flexcan.c
|
||||
@@ -779,6 +779,23 @@ static void flexcan_irq_state(struct net
|
||||
@@ -778,6 +778,23 @@ static void flexcan_irq_state(struct net
|
||||
dev->stats.rx_fifo_errors++;
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
static inline struct flexcan_priv *rx_offload_to_priv(struct can_rx_offload *offload)
|
||||
{
|
||||
return container_of(offload, struct flexcan_priv, offload);
|
||||
@@ -873,17 +890,6 @@ static struct sk_buff *flexcan_mailbox_r
|
||||
@@ -872,17 +889,6 @@ static struct sk_buff *flexcan_mailbox_r
|
||||
return skb;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
--- a/drivers/net/can/flexcan.c
|
||||
+++ b/drivers/net/can/flexcan.c
|
||||
@@ -791,11 +791,24 @@ static inline u64 flexcan_read64_mask(st
|
||||
@@ -790,11 +790,24 @@ static inline u64 flexcan_read64_mask(st
|
||||
return reg & mask;
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
static inline struct flexcan_priv *rx_offload_to_priv(struct can_rx_offload *offload)
|
||||
{
|
||||
return container_of(offload, struct flexcan_priv, offload);
|
||||
@@ -932,7 +945,7 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
@@ -931,7 +944,7 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
/* transmission complete interrupt */
|
||||
if (reg_iflag_tx & priv->tx_mask) {
|
||||
@@ -947,7 +960,7 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
@@ -946,7 +959,7 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
/* after sending a RTR frame MB is in RX mode */
|
||||
priv->write(FLEXCAN_MB_CODE_TX_INACTIVE,
|
||||
&priv->tx_mb->can_ctrl);
|
||||
|
@ -16,7 +16,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
--- a/drivers/net/can/flexcan.c
|
||||
+++ b/drivers/net/can/flexcan.c
|
||||
@@ -884,15 +884,10 @@ static struct sk_buff *flexcan_mailbox_r
|
||||
@@ -883,15 +883,10 @@ static struct sk_buff *flexcan_mailbox_r
|
||||
}
|
||||
|
||||
mark_as_read:
|
||||
|
@ -15,7 +15,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
--- a/drivers/net/can/flexcan.c
|
||||
+++ b/drivers/net/can/flexcan.c
|
||||
@@ -628,10 +628,10 @@ static int flexcan_get_berr_counter(cons
|
||||
@@ -627,10 +627,10 @@ static int flexcan_get_berr_counter(cons
|
||||
static netdev_tx_t flexcan_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
const struct flexcan_priv *priv = netdev_priv(dev);
|
||||
@ -28,7 +28,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
int i;
|
||||
|
||||
if (can_dropped_invalid_skb(dev, skb))
|
||||
@@ -639,18 +639,18 @@ static netdev_tx_t flexcan_start_xmit(st
|
||||
@@ -638,18 +638,18 @@ static netdev_tx_t flexcan_start_xmit(st
|
||||
|
||||
netif_stop_queue(dev);
|
||||
|
||||
@ -53,7 +53,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
priv->write(data, &priv->tx_mb->data[i / sizeof(u32)]);
|
||||
}
|
||||
|
||||
@@ -822,7 +822,7 @@ static struct sk_buff *flexcan_mailbox_r
|
||||
@@ -821,7 +821,7 @@ static struct sk_buff *flexcan_mailbox_r
|
||||
struct flexcan_regs __iomem *regs = priv->regs;
|
||||
struct flexcan_mb __iomem *mb;
|
||||
struct sk_buff *skb;
|
||||
@ -62,7 +62,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
u32 reg_ctrl, reg_id, reg_iflag1;
|
||||
int i;
|
||||
|
||||
@@ -859,8 +859,8 @@ static struct sk_buff *flexcan_mailbox_r
|
||||
@@ -858,8 +858,8 @@ static struct sk_buff *flexcan_mailbox_r
|
||||
reg_ctrl = priv->read(&mb->can_ctrl);
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
skb = ERR_PTR(-ENOMEM);
|
||||
goto mark_as_read;
|
||||
}
|
||||
@@ -870,17 +870,17 @@ static struct sk_buff *flexcan_mailbox_r
|
||||
@@ -869,17 +869,17 @@ static struct sk_buff *flexcan_mailbox_r
|
||||
|
||||
reg_id = priv->read(&mb->can_id);
|
||||
if (reg_ctrl & FLEXCAN_MB_CNT_IDE)
|
||||
|
@ -93,7 +93,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
};
|
||||
|
||||
struct flexcan_devtype_data {
|
||||
@@ -337,6 +367,30 @@ static const struct can_bittiming_const
|
||||
@@ -336,6 +366,30 @@ static const struct can_bittiming_const
|
||||
.brp_inc = 1,
|
||||
};
|
||||
|
||||
@ -124,7 +124,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
/* FlexCAN module is essentially modelled as a little-endian IP in most
|
||||
* SoCs, i.e the registers as well as the message buffer areas are
|
||||
* implemented in a little-endian fashion.
|
||||
@@ -631,7 +685,7 @@ static netdev_tx_t flexcan_start_xmit(st
|
||||
@@ -630,7 +684,7 @@ static netdev_tx_t flexcan_start_xmit(st
|
||||
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
|
||||
u32 can_id;
|
||||
u32 data;
|
||||
@ -133,7 +133,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
int i;
|
||||
|
||||
if (can_dropped_invalid_skb(dev, skb))
|
||||
@@ -649,6 +703,9 @@ static netdev_tx_t flexcan_start_xmit(st
|
||||
@@ -648,6 +702,9 @@ static netdev_tx_t flexcan_start_xmit(st
|
||||
if (cfd->can_id & CAN_RTR_FLAG)
|
||||
ctrl |= FLEXCAN_MB_CNT_RTR;
|
||||
|
||||
@ -143,7 +143,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
for (i = 0; i < cfd->len; i += sizeof(u32)) {
|
||||
data = be32_to_cpup((__be32 *)&cfd->data[i]);
|
||||
priv->write(data, &priv->tx_mb->data[i / sizeof(u32)]);
|
||||
@@ -859,7 +916,10 @@ static struct sk_buff *flexcan_mailbox_r
|
||||
@@ -858,7 +915,10 @@ static struct sk_buff *flexcan_mailbox_r
|
||||
reg_ctrl = priv->read(&mb->can_ctrl);
|
||||
}
|
||||
|
||||
@ -155,7 +155,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
if (unlikely(!skb)) {
|
||||
skb = ERR_PTR(-ENOMEM);
|
||||
goto mark_as_read;
|
||||
@@ -874,9 +934,17 @@ static struct sk_buff *flexcan_mailbox_r
|
||||
@@ -873,9 +933,17 @@ static struct sk_buff *flexcan_mailbox_r
|
||||
else
|
||||
cfd->can_id = (reg_id >> 18) & CAN_SFF_MASK;
|
||||
|
||||
@ -176,7 +176,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
for (i = 0; i < cfd->len; i += sizeof(u32)) {
|
||||
__be32 data = cpu_to_be32(priv->read(&mb->data[i / sizeof(u32)]));
|
||||
@@ -1021,27 +1089,14 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
@@ -1020,27 +1088,14 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
|
||||
static void flexcan_set_bittiming(struct net_device *dev)
|
||||
{
|
||||
@ -209,7 +209,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
if (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)
|
||||
reg |= FLEXCAN_CTRL_LPB;
|
||||
if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
|
||||
@@ -1052,9 +1107,102 @@ static void flexcan_set_bittiming(struct
|
||||
@@ -1051,9 +1106,102 @@ static void flexcan_set_bittiming(struct
|
||||
netdev_dbg(dev, "writing ctrl=0x%08x\n", reg);
|
||||
priv->write(reg, ®s->ctrl);
|
||||
|
||||
@ -315,7 +315,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
}
|
||||
|
||||
/* flexcan_chip_start
|
||||
@@ -1066,7 +1214,7 @@ static int flexcan_chip_start(struct net
|
||||
@@ -1065,7 +1213,7 @@ static int flexcan_chip_start(struct net
|
||||
{
|
||||
struct flexcan_priv *priv = netdev_priv(dev);
|
||||
struct flexcan_regs __iomem *regs = priv->regs;
|
||||
@ -324,7 +324,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
u64 reg_imask;
|
||||
int err, i;
|
||||
struct flexcan_mb __iomem *mb;
|
||||
@@ -1163,6 +1311,26 @@ static int flexcan_chip_start(struct net
|
||||
@@ -1162,6 +1310,26 @@ static int flexcan_chip_start(struct net
|
||||
netdev_dbg(dev, "%s: writing ctrl=0x%08x", __func__, reg_ctrl);
|
||||
priv->write(reg_ctrl, ®s->ctrl);
|
||||
|
||||
@ -351,7 +351,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
if ((priv->devtype_data->quirks & FLEXCAN_QUIRK_ENABLE_EACEN_RRS)) {
|
||||
reg_ctrl2 = priv->read(®s->ctrl2);
|
||||
reg_ctrl2 |= FLEXCAN_CTRL2_EACEN | FLEXCAN_CTRL2_RRS;
|
||||
@@ -1310,6 +1478,12 @@ static int flexcan_open(struct net_devic
|
||||
@@ -1309,6 +1477,12 @@ static int flexcan_open(struct net_devic
|
||||
struct flexcan_priv *priv = netdev_priv(dev);
|
||||
int err;
|
||||
|
||||
@ -364,7 +364,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
err = pm_runtime_get_sync(priv->dev);
|
||||
if (err < 0)
|
||||
return err;
|
||||
@@ -1322,7 +1496,10 @@ static int flexcan_open(struct net_devic
|
||||
@@ -1321,7 +1495,10 @@ static int flexcan_open(struct net_devic
|
||||
if (err)
|
||||
goto out_close;
|
||||
|
||||
@ -376,7 +376,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
priv->mb_count = (sizeof(priv->regs->mb[0]) / priv->mb_size) +
|
||||
(sizeof(priv->regs->mb[1]) / priv->mb_size);
|
||||
|
||||
@@ -1667,6 +1844,18 @@ static int flexcan_probe(struct platform
|
||||
@@ -1666,6 +1843,18 @@ static int flexcan_probe(struct platform
|
||||
priv->devtype_data = devtype_data;
|
||||
priv->reg_xceiver = reg_xceiver;
|
||||
|
||||
|
@ -13,7 +13,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
--- a/drivers/net/can/flexcan.c
|
||||
+++ b/drivers/net/can/flexcan.c
|
||||
@@ -703,9 +703,13 @@ static netdev_tx_t flexcan_start_xmit(st
|
||||
@@ -702,9 +702,13 @@ static netdev_tx_t flexcan_start_xmit(st
|
||||
if (cfd->can_id & CAN_RTR_FLAG)
|
||||
ctrl |= FLEXCAN_MB_CNT_RTR;
|
||||
|
||||
@ -28,7 +28,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
for (i = 0; i < cfd->len; i += sizeof(u32)) {
|
||||
data = be32_to_cpup((__be32 *)&cfd->data[i]);
|
||||
priv->write(data, &priv->tx_mb->data[i / sizeof(u32)]);
|
||||
@@ -936,6 +940,9 @@ static struct sk_buff *flexcan_mailbox_r
|
||||
@@ -935,6 +939,9 @@ static struct sk_buff *flexcan_mailbox_r
|
||||
|
||||
if (reg_ctrl & FLEXCAN_MB_CNT_EDL) {
|
||||
cfd->len = can_dlc2len(get_canfd_dlc((reg_ctrl >> 16) & 0xf));
|
||||
|
@ -31,7 +31,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
/* FLEXCAN memory error control register (MECR) bits */
|
||||
#define FLEXCAN_MECR_ECRWRDIS BIT(31)
|
||||
@@ -1323,6 +1324,7 @@ static int flexcan_chip_start(struct net
|
||||
@@ -1322,6 +1323,7 @@ static int flexcan_chip_start(struct net
|
||||
reg_fdctrl = priv->read(®s->fdctrl) & ~FLEXCAN_FDCTRL_FDRATE;
|
||||
reg_fdctrl &= ~(FLEXCAN_FDCTRL_MBDSR1(0x3) | FLEXCAN_FDCTRL_MBDSR0(0x3));
|
||||
reg_mcr = priv->read(®s->mcr) & ~FLEXCAN_MCR_FDEN;
|
||||
@ -39,7 +39,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
/* support BRS when set CAN FD mode
|
||||
* 64 bytes payload per MB and 7 MBs per RAM block by default
|
||||
@@ -1332,10 +1334,14 @@ static int flexcan_chip_start(struct net
|
||||
@@ -1331,10 +1333,14 @@ static int flexcan_chip_start(struct net
|
||||
reg_fdctrl |= FLEXCAN_FDCTRL_FDRATE;
|
||||
reg_fdctrl |= FLEXCAN_FDCTRL_MBDSR1(0x3) | FLEXCAN_FDCTRL_MBDSR0(0x3);
|
||||
reg_mcr |= FLEXCAN_MCR_FDEN;
|
||||
@ -54,7 +54,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
}
|
||||
|
||||
if ((priv->devtype_data->quirks & FLEXCAN_QUIRK_ENABLE_EACEN_RRS)) {
|
||||
@@ -1853,7 +1859,7 @@ static int flexcan_probe(struct platform
|
||||
@@ -1852,7 +1858,7 @@ static int flexcan_probe(struct platform
|
||||
|
||||
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_TIMESTAMP_SUPPORT_FD) {
|
||||
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
|
||||
|
@ -31,7 +31,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
/* FLEXCAN FD Bit Timing register (FDCBT) bits */
|
||||
#define FLEXCAN_FDCBT_FPRESDIV(x) (((x) & 0x3ff) << 20)
|
||||
@@ -1101,7 +1104,7 @@ static void flexcan_set_bittiming(struct
|
||||
@@ -1100,7 +1103,7 @@ static void flexcan_set_bittiming(struct
|
||||
struct can_bittiming *bt = &priv->can.bittiming;
|
||||
struct can_bittiming *dbt = &priv->can.data_bittiming;
|
||||
struct flexcan_regs __iomem *regs = priv->regs;
|
||||
@ -40,7 +40,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
reg = priv->read(®s->ctrl);
|
||||
reg &= ~(FLEXCAN_CTRL_LPB | FLEXCAN_CTRL_SMP | FLEXCAN_CTRL_LOM);
|
||||
@@ -1173,6 +1176,19 @@ static void flexcan_set_bittiming(struct
|
||||
@@ -1172,6 +1175,19 @@ static void flexcan_set_bittiming(struct
|
||||
FLEXCAN_FDCBT_FPROPSEG(dbt->prop_seg);
|
||||
priv->write(reg_fdcbt, ®s->fdcbt);
|
||||
|
||||
@ -60,7 +60,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
if (bt->brp != dbt->brp)
|
||||
netdev_warn(dev, "Warning!! data brp = %d and brp = %d don't match.\n"
|
||||
"flexcan may not work. consider using different bitrate or data bitrate\n",
|
||||
@@ -1322,6 +1338,7 @@ static int flexcan_chip_start(struct net
|
||||
@@ -1321,6 +1337,7 @@ static int flexcan_chip_start(struct net
|
||||
/* FDCTRL */
|
||||
if (priv->can.ctrlmode_supported & CAN_CTRLMODE_FD) {
|
||||
reg_fdctrl = priv->read(®s->fdctrl) & ~FLEXCAN_FDCTRL_FDRATE;
|
||||
|
@ -52,7 +52,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
static const struct flexcan_devtype_data fsl_vf610_devtype_data = {
|
||||
.quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
|
||||
FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP |
|
||||
@@ -1760,6 +1767,7 @@ out_put_node:
|
||||
@@ -1759,6 +1766,7 @@ out_put_node:
|
||||
}
|
||||
|
||||
static const struct of_device_id flexcan_of_match[] = {
|
||||
|
@ -34,8 +34,8 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
+
|
||||
static const struct flexcan_devtype_data fsl_ls1021a_r2_devtype_data = {
|
||||
.quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
|
||||
FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_BROKEN_PERR_STATE |
|
||||
@@ -1776,6 +1783,7 @@ static const struct of_device_id flexcan
|
||||
FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP,
|
||||
@@ -1775,6 +1782,7 @@ static const struct of_device_id flexcan
|
||||
{ .compatible = "fsl,p1010-flexcan", .data = &fsl_p1010_devtype_data, },
|
||||
{ .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_devtype_data, },
|
||||
{ .compatible = "fsl,ls1021ar2-flexcan", .data = &fsl_ls1021a_r2_devtype_data, },
|
||||
|
@ -28,7 +28,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
#define DRV_NAME "flexcan"
|
||||
@@ -1954,9 +1955,7 @@ static int __maybe_unused flexcan_suspen
|
||||
@@ -1955,9 +1956,7 @@ static int __maybe_unused flexcan_suspen
|
||||
if (err)
|
||||
return err;
|
||||
} else {
|
||||
@ -39,7 +39,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
|
||||
}
|
||||
netif_stop_queue(dev);
|
||||
netif_device_detach(dev);
|
||||
@@ -1982,7 +1981,9 @@ static int __maybe_unused flexcan_resume
|
||||
@@ -1983,7 +1982,9 @@ static int __maybe_unused flexcan_resume
|
||||
if (err)
|
||||
return err;
|
||||
} else {
|
||||
|
@ -47,7 +47,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
|
||||
|
||||
/* FLEXCAN Bit Timing register (CBT) bits */
|
||||
#define FLEXCAN_CBT_BTF BIT(31)
|
||||
@@ -1055,6 +1054,12 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
@@ -1054,6 +1053,12 @@ static irqreturn_t flexcan_irq(int irq,
|
||||
|
||||
reg_esr = priv->read(®s->esr);
|
||||
|
||||
|
@ -63,7 +63,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
|
||||
};
|
||||
|
||||
static const struct flexcan_devtype_data fsl_vf610_devtype_data = {
|
||||
@@ -504,6 +516,32 @@ static void flexcan_enable_wakeup_irq(st
|
||||
@@ -503,6 +515,32 @@ static void flexcan_enable_wakeup_irq(st
|
||||
priv->write(reg_mcr, ®s->mcr);
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
|
||||
static inline int flexcan_enter_stop_mode(struct flexcan_priv *priv)
|
||||
{
|
||||
struct flexcan_regs __iomem *regs = priv->regs;
|
||||
@@ -513,9 +551,12 @@ static inline int flexcan_enter_stop_mod
|
||||
@@ -512,9 +550,12 @@ static inline int flexcan_enter_stop_mod
|
||||
reg_mcr |= FLEXCAN_MCR_SLF_WAK;
|
||||
priv->write(reg_mcr, ®s->mcr);
|
||||
|
||||
@ -112,7 +112,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
|
||||
|
||||
return flexcan_low_power_enter_ack(priv);
|
||||
}
|
||||
@@ -526,8 +567,11 @@ static inline int flexcan_exit_stop_mode
|
||||
@@ -525,8 +566,11 @@ static inline int flexcan_exit_stop_mode
|
||||
u32 reg_mcr;
|
||||
|
||||
/* remove stop request */
|
||||
@ -126,7 +126,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
|
||||
|
||||
|
||||
reg_mcr = priv->read(®s->mcr);
|
||||
@@ -1767,11 +1811,6 @@ static int flexcan_setup_stop_mode(struc
|
||||
@@ -1766,11 +1810,6 @@ static int flexcan_setup_stop_mode(struc
|
||||
gpr_np->full_name, priv->stm.req_gpr, priv->stm.req_bit,
|
||||
priv->stm.ack_gpr, priv->stm.ack_bit);
|
||||
|
||||
@ -138,7 +138,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
|
||||
return 0;
|
||||
|
||||
out_put_node:
|
||||
@@ -1779,6 +1818,30 @@ out_put_node:
|
||||
@@ -1778,6 +1817,30 @@ out_put_node:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -169,7 +169,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
|
||||
static const struct of_device_id flexcan_of_match[] = {
|
||||
{ .compatible = "fsl,imx8qm-flexcan", .data = &fsl_imx8qm_devtype_data, },
|
||||
{ .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, },
|
||||
@@ -1921,9 +1984,19 @@ static int flexcan_probe(struct platform
|
||||
@@ -1920,9 +1983,19 @@ static int flexcan_probe(struct platform
|
||||
devm_can_led_init(dev);
|
||||
|
||||
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_SETUP_STOP_MODE) {
|
||||
|
@ -25,8 +25,8 @@ Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
|
||||
//
|
||||
// Based on code originally by Andrey Volkov <avolkov@varma-el.com>
|
||||
|
||||
@@ -385,6 +386,10 @@ static const struct flexcan_devtype_data
|
||||
FLEXCAN_QUIRK_USE_OFF_TIMESTAMP,
|
||||
@@ -384,6 +385,10 @@ static const struct flexcan_devtype_data
|
||||
FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP,
|
||||
};
|
||||
|
||||
+static struct flexcan_devtype_data fsl_s32v234_devtype_data = {
|
||||
@ -36,7 +36,7 @@ Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
|
||||
static const struct can_bittiming_const flexcan_bittiming_const = {
|
||||
.name = DRV_NAME,
|
||||
.tseg1_min = 4,
|
||||
@@ -1853,6 +1858,8 @@ static const struct of_device_id flexcan
|
||||
@@ -1852,6 +1857,8 @@ static const struct of_device_id flexcan
|
||||
{ .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_devtype_data, },
|
||||
{ .compatible = "fsl,ls1021ar2-flexcan", .data = &fsl_ls1021a_r2_devtype_data, },
|
||||
{ .compatible = "fsl,lx2160ar1-flexcan", .data = &fsl_lx2160a_r1_devtype_data, },
|
||||
|
@ -64,7 +64,7 @@ Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
|
||||
|
||||
if (writable)
|
||||
pte = kvm_s2pte_mkwrite(pte);
|
||||
@@ -2361,7 +2363,7 @@ int kvm_arch_prepare_memory_region(struc
|
||||
@@ -2362,7 +2364,7 @@ int kvm_arch_prepare_memory_region(struc
|
||||
|
||||
ret = kvm_phys_addr_ioremap(kvm, gpa, pa,
|
||||
vm_end - vm_start,
|
||||
|
@ -105,7 +105,7 @@ Signed-off-by: Diana Craciun <diana.craciun@nxp.com>
|
||||
if (kvm_is_device_pfn(pfn)) {
|
||||
mem_type = PAGE_S2_DEVICE;
|
||||
flags |= KVM_S2PTE_FLAG_IS_IOMAP;
|
||||
@@ -2351,6 +2395,9 @@ int kvm_arch_prepare_memory_region(struc
|
||||
@@ -2352,6 +2396,9 @@ int kvm_arch_prepare_memory_region(struc
|
||||
gpa_t gpa = mem->guest_phys_addr +
|
||||
(vm_start - mem->userspace_addr);
|
||||
phys_addr_t pa;
|
||||
@ -115,7 +115,7 @@ Signed-off-by: Diana Craciun <diana.craciun@nxp.com>
|
||||
|
||||
pa = (phys_addr_t)vma->vm_pgoff << PAGE_SHIFT;
|
||||
pa += vm_start - vma->vm_start;
|
||||
@@ -2361,9 +2408,13 @@ int kvm_arch_prepare_memory_region(struc
|
||||
@@ -2362,9 +2409,13 @@ int kvm_arch_prepare_memory_region(struc
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
|
||||
* All 3.1 IP version constants are greater than the 3.0 IP
|
||||
--- a/drivers/usb/dwc3/gadget.c
|
||||
+++ b/drivers/usb/dwc3/gadget.c
|
||||
@@ -3525,6 +3525,10 @@ int dwc3_gadget_init(struct dwc3 *dwc)
|
||||
@@ -3543,6 +3543,10 @@ int dwc3_gadget_init(struct dwc3 *dwc)
|
||||
dwc->gadget.sg_supported = true;
|
||||
dwc->gadget.name = "dwc3-gadget";
|
||||
dwc->gadget.lpm_capable = true;
|
||||
|
@ -0,0 +1,107 @@
|
||||
From 650480191492845c8eb7e0c2e5b1e37cabc59eff Mon Sep 17 00:00:00 2001
|
||||
From: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
Date: Fri, 13 Nov 2020 07:17:39 +0100
|
||||
Subject: [PATCH 1/2] arm64: dts: fsl-ls1012a-rdb: add i2c devices
|
||||
|
||||
LS1012A-RDB equipped in some i2c devices:
|
||||
- 3x GPIO Expander: PCAL9555A (NXP)
|
||||
- Gyro: FXAS21002 (NXP)
|
||||
- Accelerometer: FXOS8700 (NXP)
|
||||
- Current & Power Monitor: INA220 (TI)
|
||||
|
||||
This patch add listed devices to dts.
|
||||
|
||||
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
---
|
||||
.../boot/dts/freescale/fsl-ls1012a-rdb.dts | 66 +++++++++++++++++++
|
||||
1 file changed, 66 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts
|
||||
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
+#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include "fsl-ls1012a.dtsi"
|
||||
|
||||
/ {
|
||||
@@ -16,6 +17,25 @@
|
||||
aliases {
|
||||
ethernet0 = &pfe_mac0;
|
||||
ethernet1 = &pfe_mac1;
|
||||
+ serial0 = &duart0;
|
||||
+ };
|
||||
+
|
||||
+ dummy3v3: dummy_reg {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "dummy_regulator_3v3";
|
||||
+
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ dummy1v8: dummy_reg {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "dummy_regulator_1v8";
|
||||
+
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-always-on;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -42,6 +62,52 @@
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
+
|
||||
+ accelerometer@1e {
|
||||
+ compatible = "nxp,fxos8700";
|
||||
+ reg = <0x1e>;
|
||||
+ interrupt-parent = <&gpio26>;
|
||||
+ interrupts = <13 IRQ_TYPE_EDGE_RISING>;
|
||||
+ interrupt-names = "INT1";
|
||||
+ };
|
||||
+
|
||||
+ gyroscope@20 {
|
||||
+ compatible = "nxp,fxas21002c";
|
||||
+ reg = <0x20>;
|
||||
+ vdd-supply = <&dummy3v3>;
|
||||
+ vddio-supply = <&dummy1v8>;
|
||||
+ };
|
||||
+
|
||||
+ gpio@24 {
|
||||
+ compatible = "nxp,pcal9555a";
|
||||
+ reg = <0x24>;
|
||||
+ gpio-controller;
|
||||
+ #gpio-cells = <2>;
|
||||
+ };
|
||||
+
|
||||
+ gpio25: gpio@25 {
|
||||
+ compatible = "nxp,pcal9555a";
|
||||
+ reg = <0x25>;
|
||||
+ gpio-controller;
|
||||
+ #gpio-cells = <2>;
|
||||
+ };
|
||||
+
|
||||
+ gpio26: gpio@26 {
|
||||
+ compatible = "nxp,pcal9555a";
|
||||
+ reg = <0x26>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
|
||||
+ interrupt-controller;
|
||||
+ #interrupt-cells = <2>;
|
||||
+ gpio-controller;
|
||||
+ #gpio-cells = <2>;
|
||||
+ };
|
||||
+
|
||||
+ current-sensor@40 {
|
||||
+ compatible = "ti,ina220";
|
||||
+ reg = <0x40>;
|
||||
+ shunt-resistor = <2000>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&sata {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user