Merge Official Source
This commit is contained in:
commit
c28c804f56
@ -1041,10 +1041,12 @@ list_phy_interfaces() {
|
||||
drv_mac80211_teardown() {
|
||||
wireless_process_kill_all
|
||||
|
||||
for phy in $(ls /sys/class/ieee80211/); do
|
||||
mac80211_interface_cleanup "$phy"
|
||||
uci -q -P /var/state revert wireless._${phy}
|
||||
done
|
||||
json_select data
|
||||
json_get_vars phy
|
||||
json_select ..
|
||||
|
||||
mac80211_interface_cleanup "$phy"
|
||||
uci -q -P /var/state revert wireless._${phy}
|
||||
}
|
||||
|
||||
add_driver mac80211
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
From b6b15e20421fefae9f78274f9fef80bc97bf5d5c Mon Sep 17 00:00:00 2001
|
||||
From: Rui Salvaterra <rsalvaterra@gmail.com>
|
||||
Date: Mon, 25 May 2020 14:49:07 +0100
|
||||
Subject: [PATCH] rt2800: enable MFP support unconditionally
|
||||
|
||||
This gives us WPA3 support out of the box without having to manually disable
|
||||
hardware crypto. The driver will fall back to software crypto if the connection
|
||||
requires management frame protection.
|
||||
|
||||
Suggested-by: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
|
||||
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
Link: https://lore.kernel.org/r/20200525134906.1672-1-rsalvaterra@gmail.com
|
||||
---
|
||||
drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 4 +---
|
||||
drivers/net/wireless/ralink/rt2x00/rt2x00mac.c | 3 ++-
|
||||
2 files changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -9971,9 +9971,7 @@ static int rt2800_probe_hw_mode(struct r
|
||||
if (!rt2x00_is_usb(rt2x00dev))
|
||||
ieee80211_hw_set(rt2x00dev->hw, HOST_BROADCAST_PS_BUFFERING);
|
||||
|
||||
- /* Set MFP if HW crypto is disabled. */
|
||||
- if (rt2800_hwcrypt_disabled(rt2x00dev))
|
||||
- ieee80211_hw_set(rt2x00dev->hw, MFP_CAPABLE);
|
||||
+ ieee80211_hw_set(rt2x00dev->hw, MFP_CAPABLE);
|
||||
|
||||
SET_IEEE80211_DEV(rt2x00dev->hw, rt2x00dev->dev);
|
||||
SET_IEEE80211_PERM_ADDR(rt2x00dev->hw,
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c
|
||||
@@ -468,7 +468,8 @@ int rt2x00mac_set_key(struct ieee80211_h
|
||||
if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
|
||||
return 0;
|
||||
|
||||
- if (!rt2x00_has_cap_hw_crypto(rt2x00dev))
|
||||
+ /* The hardware can't do MFP */
|
||||
+ if (!rt2x00_has_cap_hw_crypto(rt2x00dev) || (sta && sta->mfp))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/*
|
||||
@ -25,21 +25,12 @@ define Package/ipt2socks
|
||||
CATEGORY:=Network
|
||||
TITLE:=Utility for converting iptables (REDIRECT/TPROXY) to SOCKS5
|
||||
URL:=https://github.com/zfl9/ipt2socks
|
||||
DEPENDS:=+libuv
|
||||
endef
|
||||
|
||||
define Package/ipt2socks/description
|
||||
Utility for converting iptables (REDIRECT/TPROXY) to SOCKS5.
|
||||
endef
|
||||
|
||||
define Package/ipt2socks/conffiles
|
||||
/etc/config/ipt2socks
|
||||
endef
|
||||
|
||||
#MAKE_FLAGS += INCLUDES="-I$(STAGING_DIR)/usr/include"
|
||||
#MAKE_FLAGS += LDFLAGS="-L$(STAGING_DIR)/usr/lib"
|
||||
MAKE_FLAGS += LIBS="-l:libuv_a.a"
|
||||
|
||||
define Package/ipt2socks/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ipt2socks $(1)/usr/bin
|
||||
|
||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=qos-scripts
|
||||
PKG_VERSION:=1.3.1
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
@ -22,15 +22,20 @@ add_insmod() {
|
||||
[ -e /etc/config/network ] && {
|
||||
# only try to parse network config on openwrt
|
||||
|
||||
find_ifname() {(
|
||||
reset_cb
|
||||
include /lib/network
|
||||
scan_interfaces
|
||||
config_get "$1" ifname
|
||||
)}
|
||||
. /lib/functions/network.sh
|
||||
|
||||
find_ifname() {
|
||||
local ifname
|
||||
if network_get_device ifname "$1"; then
|
||||
echo "$ifname"
|
||||
else
|
||||
echo "Device for interface $1 not found." >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
} || {
|
||||
find_ifname() {
|
||||
echo "Interface not found."
|
||||
echo "Interface not found." >&2
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
@ -218,6 +223,7 @@ qos_parse_config() {
|
||||
config_get device "$1" device
|
||||
[ -z "$device" ] && {
|
||||
device="$(find_ifname $1)"
|
||||
[ -z "$device" ] && exit 1
|
||||
config_set "$1" device "$device"
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,9 +12,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ugps.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2020-04-29
|
||||
PKG_SOURCE_VERSION:=db40e3a22599641be68c88ece287d3fbbacd8a45
|
||||
PKG_MIRROR_HASH:=0ad8b1265ef3de880f0d7623bcf504e7976df8ee06d64e92f896f2e2a6030c39
|
||||
PKG_SOURCE_DATE:=2020-05-29
|
||||
PKG_SOURCE_VERSION:=0c54380e3d8920100fcfd41f0a1fe9872eb37d0e
|
||||
PKG_MIRROR_HASH:=cf7e5af73f9feabf643f988c040fd3783dc44c6f4b1ecada0957d4ee3d67c14e
|
||||
|
||||
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
||||
PKG_LICENSE:=GPL-2.0+
|
||||
|
||||
@ -525,6 +525,8 @@ define Device/tl-wr902ac-v1
|
||||
SUPPORTED_DEVICES := tl-wr902ac-v1
|
||||
IMAGE_SIZE := 7360k
|
||||
MTDPARTS := spi0.0:128k(u-boot)ro,7360k(firmware),640k(tplink)ro,64k(art)ro
|
||||
KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header -O
|
||||
KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | tplink-v1-header
|
||||
endef
|
||||
TARGET_DEVICES += tl-wr902ac-v1
|
||||
|
||||
|
||||
@ -1,215 +0,0 @@
|
||||
CONFIG_ADM6996_PHY=y
|
||||
CONFIG_ARCH_BINFMT_ELF_STATE=y
|
||||
CONFIG_ARCH_CLOCKSOURCE_DATA=y
|
||||
CONFIG_ARCH_DISCARD_MEMBLOCK=y
|
||||
CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
|
||||
# CONFIG_ARCH_HAS_GCOV_PROFILE_ALL is not set
|
||||
# CONFIG_ARCH_HAS_SG_CHAIN is not set
|
||||
# CONFIG_ARCH_HAS_STRICT_KERNEL_RWX is not set
|
||||
# CONFIG_ARCH_HAS_STRICT_MODULE_RWX is not set
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=15
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
|
||||
# CONFIG_ARCH_OPTIONAL_KERNEL_RWX is not set
|
||||
# CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT is not set
|
||||
CONFIG_ARCH_SUPPORTS_UPROBES=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
|
||||
CONFIG_ARCH_USE_QUEUED_RWLOCKS=y
|
||||
CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y
|
||||
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
|
||||
CONFIG_BCM47XX=y
|
||||
CONFIG_BCM47XX_BCMA=y
|
||||
CONFIG_BCM47XX_NVRAM=y
|
||||
CONFIG_BCM47XX_SPROM=y
|
||||
CONFIG_BCM47XX_SSB=y
|
||||
CONFIG_BCM47XX_WDT=y
|
||||
CONFIG_BCMA=y
|
||||
CONFIG_BCMA_BLOCKIO=y
|
||||
CONFIG_BCMA_DEBUG=y
|
||||
CONFIG_BCMA_DRIVER_GMAC_CMN=y
|
||||
CONFIG_BCMA_DRIVER_GPIO=y
|
||||
CONFIG_BCMA_DRIVER_MIPS=y
|
||||
CONFIG_BCMA_DRIVER_PCI=y
|
||||
CONFIG_BCMA_DRIVER_PCI_HOSTMODE=y
|
||||
CONFIG_BCMA_HOST_PCI=y
|
||||
CONFIG_BCMA_HOST_PCI_POSSIBLE=y
|
||||
CONFIG_BCMA_HOST_SOC=y
|
||||
CONFIG_BCMA_NFLASH=y
|
||||
CONFIG_BCMA_PFLASH=y
|
||||
CONFIG_BCMA_SFLASH=y
|
||||
# CONFIG_BGMAC_BCMA is not set
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_CEVT_R4K=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_CMDLINE="noinitrd console=ttyS0,115200"
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
# CONFIG_CMDLINE_OVERRIDE is not set
|
||||
# CONFIG_CPU_BMIPS is not set
|
||||
CONFIG_CPU_GENERIC_DUMP_TLB=y
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_MIPS32_R1=y
|
||||
# CONFIG_CPU_MIPS32_R2 is not set
|
||||
CONFIG_CPU_MIPSR1=y
|
||||
CONFIG_CPU_MIPSR2_IRQ_VI=y
|
||||
CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
|
||||
CONFIG_CPU_R4K_CACHE_TLB=y
|
||||
CONFIG_CPU_R4K_FPU=y
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_WORKQUEUE=y
|
||||
CONFIG_CSRC_R4K=y
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
# CONFIG_EARLY_PRINTK is not set
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_IO=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_GPIO_WDT=y
|
||||
# CONFIG_GRO_CELLS is not set
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDWARE_WATCHPOINTS=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set
|
||||
# CONFIG_HAVE_ARCH_BITREVERSE is not set
|
||||
CONFIG_HAVE_ARCH_JUMP_LABEL=y
|
||||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
|
||||
CONFIG_HAVE_ARCH_TRACEHOOK=y
|
||||
# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
|
||||
CONFIG_HAVE_CBPF_JIT=y
|
||||
CONFIG_HAVE_CC_STACKPROTECTOR=y
|
||||
CONFIG_HAVE_CONTEXT_TRACKING=y
|
||||
CONFIG_HAVE_COPY_THREAD_TLS=y
|
||||
CONFIG_HAVE_C_RECORDMCOUNT=y
|
||||
CONFIG_HAVE_DEBUG_KMEMLEAK=y
|
||||
CONFIG_HAVE_DEBUG_STACKOVERFLOW=y
|
||||
CONFIG_HAVE_DMA_API_DEBUG=y
|
||||
CONFIG_HAVE_DMA_CONTIGUOUS=y
|
||||
CONFIG_HAVE_DYNAMIC_FTRACE=y
|
||||
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
|
||||
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACER=y
|
||||
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
|
||||
CONFIG_HAVE_IDE=y
|
||||
CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y
|
||||
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
|
||||
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
|
||||
CONFIG_HAVE_MEMBLOCK=y
|
||||
CONFIG_HAVE_MEMBLOCK_NODE_MAP=y
|
||||
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
|
||||
CONFIG_HAVE_NET_DSA=y
|
||||
CONFIG_HAVE_OPROFILE=y
|
||||
CONFIG_HAVE_PERF_EVENTS=y
|
||||
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
|
||||
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
|
||||
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
|
||||
CONFIG_HW_HAS_PCI=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_MIPS_CPU=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_LEDS_GPIO_REGISTER=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MIPS=y
|
||||
CONFIG_MIPS_ASID_BITS=8
|
||||
CONFIG_MIPS_ASID_SHIFT=0
|
||||
CONFIG_MIPS_CLOCK_VSYSCALL=y
|
||||
# CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set
|
||||
CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER=y
|
||||
# CONFIG_MIPS_HUGE_TLB_SUPPORT is not set
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=5
|
||||
# CONFIG_MIPS_MACHINE is not set
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MTD_BCM47XXSFLASH=y
|
||||
CONFIG_MTD_BCM47XX_PARTS=y
|
||||
CONFIG_MTD_NAND=y
|
||||
CONFIG_MTD_NAND_BCM47XXNFLASH=y
|
||||
CONFIG_MTD_NAND_ECC=y
|
||||
CONFIG_MTD_PARSER_TRX=y
|
||||
CONFIG_MTD_PHYSMAP=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_PER_CPU_KM=y
|
||||
CONFIG_NO_EXCEPT_FILL=y
|
||||
CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
|
||||
# CONFIG_NO_IOPORT_MAP is not set
|
||||
# CONFIG_OF is not set
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DRIVERS_LEGACY=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
# CONFIG_RCU_NEED_SEGCBLIST is not set
|
||||
# CONFIG_RCU_STALL_COMMON is not set
|
||||
# CONFIG_SCHED_INFO is not set
|
||||
# CONFIG_SCSI_DMA is not set
|
||||
CONFIG_SERIAL_8250_EXTENDED=y
|
||||
# CONFIG_SERIAL_8250_FSL is not set
|
||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_SSB=y
|
||||
CONFIG_SSB_B43_PCI_BRIDGE=y
|
||||
CONFIG_SSB_BLOCKIO=y
|
||||
CONFIG_SSB_DEBUG=y
|
||||
CONFIG_SSB_DRIVER_EXTIF=y
|
||||
CONFIG_SSB_DRIVER_GIGE=y
|
||||
CONFIG_SSB_DRIVER_GPIO=y
|
||||
CONFIG_SSB_DRIVER_MIPS=y
|
||||
CONFIG_SSB_DRIVER_PCICORE=y
|
||||
CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
|
||||
CONFIG_SSB_EMBEDDED=y
|
||||
CONFIG_SSB_HOST_SOC=y
|
||||
CONFIG_SSB_PCICORE_HOSTMODE=y
|
||||
CONFIG_SSB_PCIHOST=y
|
||||
CONFIG_SSB_PCIHOST_POSSIBLE=y
|
||||
CONFIG_SSB_SERIAL=y
|
||||
CONFIG_SSB_SFLASH=y
|
||||
CONFIG_SSB_SPROM=y
|
||||
CONFIG_SWCONFIG=y
|
||||
CONFIG_SWCONFIG_B53=y
|
||||
# CONFIG_SWCONFIG_B53_MMAP_DRIVER is not set
|
||||
CONFIG_SWCONFIG_B53_PHY_DRIVER=y
|
||||
CONFIG_SWCONFIG_B53_PHY_FIXUP=y
|
||||
# CONFIG_SWCONFIG_B53_SRAB_DRIVER is not set
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS=y
|
||||
CONFIG_SYS_HAS_CPU_BMIPS32_3300=y
|
||||
CONFIG_SYS_HAS_CPU_MIPS32_R1=y
|
||||
CONFIG_SYS_HAS_CPU_MIPS32_R2=y
|
||||
CONFIG_SYS_HAS_EARLY_PRINTK=y
|
||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_SYS_SUPPORTS_HIGHMEM=y
|
||||
CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
|
||||
CONFIG_SYS_SUPPORTS_MIPS16=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TINY_SRCU=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_GENERIC_EARLY_PRINTK_8250=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
@ -1,86 +0,0 @@
|
||||
From 272641206100e89656038180da12eff4f03d79d1 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Haab <dan.haab@luxul.com>
|
||||
Date: Tue, 27 Mar 2018 11:24:34 -0600
|
||||
Subject: [PATCH] MIPS: BCM47XX: Add Luxul XAP1500/XWR1750 WiFi LEDs
|
||||
|
||||
Some Luxul devices use PCIe connected GPIO LEDs that are not available
|
||||
until the PCI subsytem and its drivers load. Using the same array for
|
||||
these LEDs would block registering any LEDs until all GPIOs become
|
||||
available. This may be undesired behavior as some LEDs should be
|
||||
available as early as possible (e.g. system status LED). This patch will
|
||||
allow registering available LEDs while deferring these PCIe GPIO
|
||||
connected 'extra' LEDs until they become available.
|
||||
|
||||
Signed-off-by: Dan Haab <dan.haab@luxul.com>
|
||||
Cc: Ralf Baechle <ralf@linux-mips.org>
|
||||
Cc: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Cc: linux-mips@linux-mips.org
|
||||
Patchwork: https://patchwork.linux-mips.org/patch/18952/
|
||||
Signed-off-by: James Hogan <jhogan@kernel.org>
|
||||
---
|
||||
arch/mips/bcm47xx/leds.c | 21 +++++++++++++++++++++
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
--- a/arch/mips/bcm47xx/leds.c
|
||||
+++ b/arch/mips/bcm47xx/leds.c
|
||||
@@ -409,6 +409,12 @@ bcm47xx_leds_luxul_xap_1500_v1[] __initc
|
||||
};
|
||||
|
||||
static const struct gpio_led
|
||||
+bcm47xx_leds_luxul_xap1500_v1_extra[] __initconst = {
|
||||
+ BCM47XX_GPIO_LED(44, "green", "5ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(76, "green", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_led
|
||||
bcm47xx_leds_luxul_xbr_4400_v1[] __initconst = {
|
||||
BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
BCM47XX_GPIO_LED_TRIGGER(15, "green", "status", 0, "timer"),
|
||||
@@ -435,6 +441,11 @@ bcm47xx_leds_luxul_xwr_1750_v1[] __initc
|
||||
BCM47XX_GPIO_LED(15, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
};
|
||||
|
||||
+static const struct gpio_led
|
||||
+bcm47xx_leds_luxul_xwr1750_v1_extra[] __initconst = {
|
||||
+ BCM47XX_GPIO_LED(76, "green", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+};
|
||||
+
|
||||
/* Microsoft */
|
||||
|
||||
static const struct gpio_led
|
||||
@@ -528,6 +539,12 @@ static struct gpio_led_platform_data bcm
|
||||
bcm47xx_leds_pdata.num_leds = ARRAY_SIZE(dev_leds); \
|
||||
} while (0)
|
||||
|
||||
+static struct gpio_led_platform_data bcm47xx_leds_pdata_extra __initdata = {};
|
||||
+#define bcm47xx_set_pdata_extra(dev_leds) do { \
|
||||
+ bcm47xx_leds_pdata_extra.leds = dev_leds; \
|
||||
+ bcm47xx_leds_pdata_extra.num_leds = ARRAY_SIZE(dev_leds); \
|
||||
+} while (0)
|
||||
+
|
||||
void __init bcm47xx_leds_register(void)
|
||||
{
|
||||
enum bcm47xx_board board = bcm47xx_board_get();
|
||||
@@ -705,6 +722,7 @@ void __init bcm47xx_leds_register(void)
|
||||
break;
|
||||
case BCM47XX_BOARD_LUXUL_XAP_1500_V1:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1500_v1);
|
||||
+ bcm47xx_set_pdata_extra(bcm47xx_leds_luxul_xap1500_v1_extra);
|
||||
break;
|
||||
case BCM47XX_BOARD_LUXUL_XBR_4400_V1:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_luxul_xbr_4400_v1);
|
||||
@@ -717,6 +735,7 @@ void __init bcm47xx_leds_register(void)
|
||||
break;
|
||||
case BCM47XX_BOARD_LUXUL_XWR_1750_V1:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_1750_v1);
|
||||
+ bcm47xx_set_pdata_extra(bcm47xx_leds_luxul_xwr1750_v1_extra);
|
||||
break;
|
||||
|
||||
case BCM47XX_BOARD_MICROSOFT_MN700:
|
||||
@@ -760,4 +779,6 @@ void __init bcm47xx_leds_register(void)
|
||||
}
|
||||
|
||||
gpio_led_register_device(-1, &bcm47xx_leds_pdata);
|
||||
+ if (bcm47xx_leds_pdata_extra.num_leds)
|
||||
+ gpio_led_register_device(0, &bcm47xx_leds_pdata_extra);
|
||||
}
|
||||
@ -1,96 +0,0 @@
|
||||
From 88b882ba0b0b7439d16d2c9df7f111cdf793443b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Sun, 8 Apr 2018 22:39:15 +0200
|
||||
Subject: [PATCH] MIPS: BCM47XX: Add support for Netgear WNR1000 V3
|
||||
|
||||
This adds support for detecting this model board and registers some LEDs
|
||||
and buttons.
|
||||
|
||||
There are two uncommon things regarding this device:
|
||||
1) It can use two different "board_id" ID values.
|
||||
Unit I have uses "U12H139T00_NETGEAR" value. This magic is also used
|
||||
in firmware file header. There are two reports (one from an OpenWrt
|
||||
user) of a different "U12H139T50_NETGEAR" magic though.
|
||||
2) Power LEDs share GPIOs with buttons.
|
||||
Amber one seems to share GPIO 2 with WPS button and green one seems
|
||||
to share GPIO 3 with reset button. It remains unknown how to support
|
||||
them and handle buttons at the same time. For that reason they aren't
|
||||
added to the list of supported LEDs.
|
||||
---
|
||||
arch/mips/bcm47xx/board.c | 2 ++
|
||||
arch/mips/bcm47xx/buttons.c | 9 +++++++++
|
||||
arch/mips/bcm47xx/leds.c | 9 +++++++++
|
||||
arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
|
||||
4 files changed, 21 insertions(+)
|
||||
|
||||
--- a/arch/mips/bcm47xx/board.c
|
||||
+++ b/arch/mips/bcm47xx/board.c
|
||||
@@ -172,6 +172,8 @@ struct bcm47xx_board_type_list1 bcm47xx_
|
||||
{{BCM47XX_BOARD_NETGEAR_WNDR4000, "Netgear WNDR4000"}, "U12H181T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNDR4500V1, "Netgear WNDR4500 V1"}, "U12H189T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNDR4500V2, "Netgear WNDR4500 V2"}, "U12H224T00_NETGEAR"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_WNR1000_V3, "Netgear WNR1000 V3"}, "U12H139T00_NETGEAR"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_WNR1000_V3, "Netgear WNR1000 V3"}, "U12H139T50_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR2000, "Netgear WNR2000"}, "U12H114T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "U12H136T99_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500U, "Netgear WNR3500U"}, "U12H136T00_NETGEAR"},
|
||||
--- a/arch/mips/bcm47xx/buttons.c
|
||||
+++ b/arch/mips/bcm47xx/buttons.c
|
||||
@@ -412,6 +412,12 @@ bcm47xx_buttons_netgear_wndr4500v1[] __i
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_netgear_wnr1000_v3[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(2, KEY_WPS_BUTTON),
|
||||
+ BCM47XX_GPIO_KEY(3, KEY_RESTART),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_netgear_wnr3500lv1[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(4, KEY_RESTART),
|
||||
BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
|
||||
@@ -670,6 +676,9 @@ int __init bcm47xx_buttons_register(void
|
||||
case BCM47XX_BOARD_NETGEAR_WNDR4500V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr4500v1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_NETGEAR_WNR1000_V3:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr1000_v3);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_NETGEAR_WNR3500L:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv1);
|
||||
break;
|
||||
--- a/arch/mips/bcm47xx/leds.c
|
||||
+++ b/arch/mips/bcm47xx/leds.c
|
||||
@@ -498,6 +498,12 @@ bcm47xx_leds_netgear_wndr4500v1[] __init
|
||||
};
|
||||
|
||||
static const struct gpio_led
|
||||
+bcm47xx_leds_netgear_wnr1000_v3[] __initconst = {
|
||||
+ BCM47XX_GPIO_LED(0, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(1, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_led
|
||||
bcm47xx_leds_netgear_wnr3500lv1[] __initconst = {
|
||||
BCM47XX_GPIO_LED(0, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
BCM47XX_GPIO_LED(1, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
@@ -758,6 +764,9 @@ void __init bcm47xx_leds_register(void)
|
||||
case BCM47XX_BOARD_NETGEAR_WNDR4500V1:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr4500v1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_NETGEAR_WNR1000_V3:
|
||||
+ bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr1000_v3);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_NETGEAR_WNR3500L:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv1);
|
||||
break;
|
||||
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
@@ -110,6 +110,7 @@ enum bcm47xx_board {
|
||||
BCM47XX_BOARD_NETGEAR_WNDR4000,
|
||||
BCM47XX_BOARD_NETGEAR_WNDR4500V1,
|
||||
BCM47XX_BOARD_NETGEAR_WNDR4500V2,
|
||||
+ BCM47XX_BOARD_NETGEAR_WNR1000_V3,
|
||||
BCM47XX_BOARD_NETGEAR_WNR2000,
|
||||
BCM47XX_BOARD_NETGEAR_WNR3500L,
|
||||
BCM47XX_BOARD_NETGEAR_WNR3500U,
|
||||
@ -1,24 +0,0 @@
|
||||
From 663beaeacf2552ed07405e69e96a18775e069eab Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Sun, 8 Apr 2018 22:51:08 +0200
|
||||
Subject: [PATCH] firmware: bcm47xx_nvram: support small (0x6000 B) NVRAM
|
||||
partitions
|
||||
|
||||
Some old devices with 4 MiB flashes were using 0x1000 block size and
|
||||
could use smaller (0x6000 bytes) flash partition for storing NVRAM
|
||||
content. This adds support for reading NVRAM on Netgear WNR1000 V3.
|
||||
---
|
||||
drivers/firmware/broadcom/bcm47xx_nvram.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/firmware/broadcom/bcm47xx_nvram.c
|
||||
+++ b/drivers/firmware/broadcom/bcm47xx_nvram.c
|
||||
@@ -36,7 +36,7 @@ struct nvram_header {
|
||||
|
||||
static char nvram_buf[NVRAM_SPACE];
|
||||
static size_t nvram_len;
|
||||
-static const u32 nvram_sizes[] = {0x8000, 0xF000, 0x10000};
|
||||
+static const u32 nvram_sizes[] = {0x6000, 0x8000, 0xF000, 0x10000};
|
||||
|
||||
static u32 find_nvram_size(void __iomem *end)
|
||||
{
|
||||
@ -1,34 +0,0 @@
|
||||
From cdb8faa00e3fcdd0ad10add743516d616dc7d38e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
|
||||
Date: Mon, 11 Mar 2019 22:08:22 +0100
|
||||
Subject: [PATCH] mips: bcm47xx: Enable USB power on Netgear WNDR3400v2
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Eric has reported on OpenWrt's bug tracking system[1], that he's not
|
||||
able to use USB devices on his WNDR3400v2 device after the boot, until
|
||||
he turns on GPIO #21 manually through sysfs.
|
||||
|
||||
1. https://bugs.openwrt.org/index.php?do=details&task_id=2170
|
||||
|
||||
Cc: Rafał Miłecki <zajec5@gmail.com>
|
||||
Cc: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Reported-by: Eric Bohlman <ericbohlman@gmail.com>
|
||||
Tested-by: Eric Bohlman <ericbohlman@gmail.com>
|
||||
Signed-off-by: Petr Štetiar <ynezz@true.cz>
|
||||
Signed-off-by: Paul Burton <paul.burton@mips.com>
|
||||
---
|
||||
arch/mips/bcm47xx/workarounds.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/arch/mips/bcm47xx/workarounds.c
|
||||
+++ b/arch/mips/bcm47xx/workarounds.c
|
||||
@@ -24,6 +24,7 @@ void __init bcm47xx_workarounds(void)
|
||||
case BCM47XX_BOARD_NETGEAR_WNR3500L:
|
||||
bcm47xx_workarounds_enable_usb_power(12);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_NETGEAR_WNDR3400V2:
|
||||
case BCM47XX_BOARD_NETGEAR_WNDR3400_V3:
|
||||
bcm47xx_workarounds_enable_usb_power(21);
|
||||
break;
|
||||
@ -1,510 +0,0 @@
|
||||
--- a/arch/mips/include/asm/r4kcache.h
|
||||
+++ b/arch/mips/include/asm/r4kcache.h
|
||||
@@ -26,6 +26,38 @@
|
||||
extern void (*r4k_blast_dcache)(void);
|
||||
extern void (*r4k_blast_icache)(void);
|
||||
|
||||
+#if defined(CONFIG_BCM47XX) && !defined(CONFIG_CPU_MIPS32_R2)
|
||||
+#include <asm/paccess.h>
|
||||
+#include <linux/ssb/ssb.h>
|
||||
+#define BCM4710_DUMMY_RREG() bcm4710_dummy_rreg()
|
||||
+
|
||||
+static inline unsigned long bcm4710_dummy_rreg(void)
|
||||
+{
|
||||
+ return *(volatile unsigned long *)(KSEG1ADDR(SSB_ENUM_BASE));
|
||||
+}
|
||||
+
|
||||
+#define BCM4710_FILL_TLB(addr) bcm4710_fill_tlb((void *)(addr))
|
||||
+
|
||||
+static inline unsigned long bcm4710_fill_tlb(void *addr)
|
||||
+{
|
||||
+ return *(unsigned long *)addr;
|
||||
+}
|
||||
+
|
||||
+#define BCM4710_PROTECTED_FILL_TLB(addr) bcm4710_protected_fill_tlb((void *)(addr))
|
||||
+
|
||||
+static inline void bcm4710_protected_fill_tlb(void *addr)
|
||||
+{
|
||||
+ unsigned long x;
|
||||
+ get_dbe(x, (unsigned long *)addr);;
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
+#define BCM4710_DUMMY_RREG()
|
||||
+
|
||||
+#define BCM4710_FILL_TLB(addr)
|
||||
+#define BCM4710_PROTECTED_FILL_TLB(addr)
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* This macro return a properly sign-extended address suitable as base address
|
||||
* for indexed cache operations. Two issues here:
|
||||
@@ -99,6 +131,7 @@ static inline void flush_icache_line_ind
|
||||
static inline void flush_dcache_line_indexed(unsigned long addr)
|
||||
{
|
||||
__dflush_prologue
|
||||
+ BCM4710_DUMMY_RREG();
|
||||
cache_op(Index_Writeback_Inv_D, addr);
|
||||
__dflush_epilogue
|
||||
}
|
||||
@@ -126,6 +159,7 @@ static inline void flush_icache_line(uns
|
||||
static inline void flush_dcache_line(unsigned long addr)
|
||||
{
|
||||
__dflush_prologue
|
||||
+ BCM4710_DUMMY_RREG();
|
||||
cache_op(Hit_Writeback_Inv_D, addr);
|
||||
__dflush_epilogue
|
||||
}
|
||||
@@ -133,6 +167,7 @@ static inline void flush_dcache_line(uns
|
||||
static inline void invalidate_dcache_line(unsigned long addr)
|
||||
{
|
||||
__dflush_prologue
|
||||
+ BCM4710_DUMMY_RREG();
|
||||
cache_op(Hit_Invalidate_D, addr);
|
||||
__dflush_epilogue
|
||||
}
|
||||
@@ -206,6 +241,7 @@ static inline int protected_flush_icache
|
||||
#ifdef CONFIG_EVA
|
||||
return protected_cachee_op(Hit_Invalidate_I, addr);
|
||||
#else
|
||||
+ BCM4710_DUMMY_RREG();
|
||||
return protected_cache_op(Hit_Invalidate_I, addr);
|
||||
#endif
|
||||
}
|
||||
@@ -219,6 +255,7 @@ static inline int protected_flush_icache
|
||||
*/
|
||||
static inline int protected_writeback_dcache_line(unsigned long addr)
|
||||
{
|
||||
+ BCM4710_DUMMY_RREG();
|
||||
#ifdef CONFIG_EVA
|
||||
return protected_cachee_op(Hit_Writeback_Inv_D, addr);
|
||||
#else
|
||||
@@ -576,8 +613,51 @@ static inline void invalidate_tcache_pag
|
||||
: "r" (base), \
|
||||
"i" (op));
|
||||
|
||||
+static inline void blast_dcache(void)
|
||||
+{
|
||||
+ unsigned long start = KSEG0;
|
||||
+ unsigned long dcache_size = current_cpu_data.dcache.waysize * current_cpu_data.dcache.ways;
|
||||
+ unsigned long end = (start + dcache_size);
|
||||
+
|
||||
+ do {
|
||||
+ BCM4710_DUMMY_RREG();
|
||||
+ cache_op(Index_Writeback_Inv_D, start);
|
||||
+ start += current_cpu_data.dcache.linesz;
|
||||
+ } while(start < end);
|
||||
+}
|
||||
+
|
||||
+static inline void blast_dcache_page(unsigned long page)
|
||||
+{
|
||||
+ unsigned long start = page;
|
||||
+ unsigned long end = start + PAGE_SIZE;
|
||||
+
|
||||
+ BCM4710_FILL_TLB(start);
|
||||
+ do {
|
||||
+ BCM4710_DUMMY_RREG();
|
||||
+ cache_op(Hit_Writeback_Inv_D, start);
|
||||
+ start += current_cpu_data.dcache.linesz;
|
||||
+ } while(start < end);
|
||||
+}
|
||||
+
|
||||
+static inline void blast_dcache_page_indexed(unsigned long page)
|
||||
+{
|
||||
+ unsigned long start = page;
|
||||
+ unsigned long end = start + PAGE_SIZE;
|
||||
+ unsigned long ws_inc = 1UL << current_cpu_data.dcache.waybit;
|
||||
+ unsigned long ws_end = current_cpu_data.dcache.ways <<
|
||||
+ current_cpu_data.dcache.waybit;
|
||||
+ unsigned long ws, addr;
|
||||
+ for (ws = 0; ws < ws_end; ws += ws_inc) {
|
||||
+ start = page + ws;
|
||||
+ for (addr = start; addr < end; addr += current_cpu_data.dcache.linesz) {
|
||||
+ BCM4710_DUMMY_RREG();
|
||||
+ cache_op(Index_Writeback_Inv_D, addr);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/* build blast_xxx, blast_xxx_page, blast_xxx_page_indexed */
|
||||
-#define __BUILD_BLAST_CACHE(pfx, desc, indexop, hitop, lsize, extra) \
|
||||
+#define __BUILD_BLAST_CACHE(pfx, desc, indexop, hitop, lsize, extra, war) \
|
||||
static inline void extra##blast_##pfx##cache##lsize(void) \
|
||||
{ \
|
||||
unsigned long start = INDEX_BASE; \
|
||||
@@ -589,6 +669,7 @@ static inline void extra##blast_##pfx##c
|
||||
\
|
||||
__##pfx##flush_prologue \
|
||||
\
|
||||
+ war \
|
||||
for (ws = 0; ws < ws_end; ws += ws_inc) \
|
||||
for (addr = start; addr < end; addr += lsize * 32) \
|
||||
cache##lsize##_unroll32(addr|ws, indexop); \
|
||||
@@ -603,6 +684,7 @@ static inline void extra##blast_##pfx##c
|
||||
\
|
||||
__##pfx##flush_prologue \
|
||||
\
|
||||
+ war \
|
||||
do { \
|
||||
cache##lsize##_unroll32(start, hitop); \
|
||||
start += lsize * 32; \
|
||||
@@ -621,6 +703,8 @@ static inline void extra##blast_##pfx##c
|
||||
current_cpu_data.desc.waybit; \
|
||||
unsigned long ws, addr; \
|
||||
\
|
||||
+ war \
|
||||
+ \
|
||||
__##pfx##flush_prologue \
|
||||
\
|
||||
for (ws = 0; ws < ws_end; ws += ws_inc) \
|
||||
@@ -630,26 +714,26 @@ static inline void extra##blast_##pfx##c
|
||||
__##pfx##flush_epilogue \
|
||||
}
|
||||
|
||||
-__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 16, )
|
||||
-__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 16, )
|
||||
-__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 16, )
|
||||
-__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 32, )
|
||||
-__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 32, )
|
||||
-__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I_Loongson2, 32, loongson2_)
|
||||
-__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 32, )
|
||||
-__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 64, )
|
||||
-__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 64, )
|
||||
-__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 64, )
|
||||
-__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 128, )
|
||||
-__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 128, )
|
||||
-__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 128, )
|
||||
-
|
||||
-__BUILD_BLAST_CACHE(inv_d, dcache, Index_Writeback_Inv_D, Hit_Invalidate_D, 16, )
|
||||
-__BUILD_BLAST_CACHE(inv_d, dcache, Index_Writeback_Inv_D, Hit_Invalidate_D, 32, )
|
||||
-__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 16, )
|
||||
-__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 32, )
|
||||
-__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 64, )
|
||||
-__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 128, )
|
||||
+__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 16, , )
|
||||
+__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 16, , BCM4710_FILL_TLB(start);)
|
||||
+__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 16, , )
|
||||
+__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 32, , )
|
||||
+__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 32, , BCM4710_FILL_TLB(start);)
|
||||
+__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I_Loongson2, 32, loongson2_, BCM4710_FILL_TLB(start);)
|
||||
+__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 32, , )
|
||||
+__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 64, , )
|
||||
+__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 64, , BCM4710_FILL_TLB(start);)
|
||||
+__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 64, , )
|
||||
+__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 128, , )
|
||||
+__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 128, , )
|
||||
+__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 128, , )
|
||||
+
|
||||
+__BUILD_BLAST_CACHE(inv_d, dcache, Index_Writeback_Inv_D, Hit_Invalidate_D, 16, , )
|
||||
+__BUILD_BLAST_CACHE(inv_d, dcache, Index_Writeback_Inv_D, Hit_Invalidate_D, 32, , )
|
||||
+__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 16, , )
|
||||
+__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 32, , )
|
||||
+__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 64, , )
|
||||
+__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 128, , )
|
||||
|
||||
#define __BUILD_BLAST_USER_CACHE(pfx, desc, indexop, hitop, lsize) \
|
||||
static inline void blast_##pfx##cache##lsize##_user_page(unsigned long page) \
|
||||
@@ -678,53 +762,23 @@ __BUILD_BLAST_USER_CACHE(d, dcache, Inde
|
||||
__BUILD_BLAST_USER_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 64)
|
||||
|
||||
/* build blast_xxx_range, protected_blast_xxx_range */
|
||||
-#define __BUILD_BLAST_CACHE_RANGE(pfx, desc, hitop, prot, extra) \
|
||||
+#define __BUILD_BLAST_CACHE_RANGE(pfx, desc, hitop, prot, extra, war, war2) \
|
||||
static inline void prot##extra##blast_##pfx##cache##_range(unsigned long start, \
|
||||
unsigned long end) \
|
||||
{ \
|
||||
unsigned long lsize = cpu_##desc##_line_size(); \
|
||||
- unsigned long lsize_2 = lsize * 2; \
|
||||
- unsigned long lsize_3 = lsize * 3; \
|
||||
- unsigned long lsize_4 = lsize * 4; \
|
||||
- unsigned long lsize_5 = lsize * 5; \
|
||||
- unsigned long lsize_6 = lsize * 6; \
|
||||
- unsigned long lsize_7 = lsize * 7; \
|
||||
- unsigned long lsize_8 = lsize * 8; \
|
||||
unsigned long addr = start & ~(lsize - 1); \
|
||||
- unsigned long aend = (end + lsize - 1) & ~(lsize - 1); \
|
||||
- int lines = (aend - addr) / lsize; \
|
||||
+ unsigned long aend = (end - 1) & ~(lsize - 1); \
|
||||
+ war \
|
||||
\
|
||||
__##pfx##flush_prologue \
|
||||
\
|
||||
- while (lines >= 8) { \
|
||||
- prot##cache_op(hitop, addr); \
|
||||
- prot##cache_op(hitop, addr + lsize); \
|
||||
- prot##cache_op(hitop, addr + lsize_2); \
|
||||
- prot##cache_op(hitop, addr + lsize_3); \
|
||||
- prot##cache_op(hitop, addr + lsize_4); \
|
||||
- prot##cache_op(hitop, addr + lsize_5); \
|
||||
- prot##cache_op(hitop, addr + lsize_6); \
|
||||
- prot##cache_op(hitop, addr + lsize_7); \
|
||||
- addr += lsize_8; \
|
||||
- lines -= 8; \
|
||||
- } \
|
||||
- \
|
||||
- if (lines & 0x4) { \
|
||||
- prot##cache_op(hitop, addr); \
|
||||
- prot##cache_op(hitop, addr + lsize); \
|
||||
- prot##cache_op(hitop, addr + lsize_2); \
|
||||
- prot##cache_op(hitop, addr + lsize_3); \
|
||||
- addr += lsize_4; \
|
||||
- } \
|
||||
- \
|
||||
- if (lines & 0x2) { \
|
||||
- prot##cache_op(hitop, addr); \
|
||||
- prot##cache_op(hitop, addr + lsize); \
|
||||
- addr += lsize_2; \
|
||||
- } \
|
||||
- \
|
||||
- if (lines & 0x1) { \
|
||||
+ while (1) { \
|
||||
+ war2 \
|
||||
prot##cache_op(hitop, addr); \
|
||||
+ if (addr == aend) \
|
||||
+ break; \
|
||||
+ addr += lsize; \
|
||||
} \
|
||||
\
|
||||
__##pfx##flush_epilogue \
|
||||
@@ -732,8 +786,8 @@ static inline void prot##extra##blast_##
|
||||
|
||||
#ifndef CONFIG_EVA
|
||||
|
||||
-__BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, protected_, )
|
||||
-__BUILD_BLAST_CACHE_RANGE(i, icache, Hit_Invalidate_I, protected_, )
|
||||
+__BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, protected_, , BCM4710_PROTECTED_FILL_TLB(addr); BCM4710_PROTECTED_FILL_TLB(aend);, BCM4710_DUMMY_RREG();)
|
||||
+__BUILD_BLAST_CACHE_RANGE(i, icache, Hit_Invalidate_I, protected_, , , )
|
||||
|
||||
#else
|
||||
|
||||
@@ -770,15 +824,15 @@ __BUILD_PROT_BLAST_CACHE_RANGE(d, dcache
|
||||
__BUILD_PROT_BLAST_CACHE_RANGE(i, icache, Hit_Invalidate_I)
|
||||
|
||||
#endif
|
||||
-__BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, protected_, )
|
||||
+__BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, protected_, , , )
|
||||
__BUILD_BLAST_CACHE_RANGE(i, icache, Hit_Invalidate_I_Loongson2, \
|
||||
- protected_, loongson2_)
|
||||
-__BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, , )
|
||||
-__BUILD_BLAST_CACHE_RANGE(i, icache, Hit_Invalidate_I, , )
|
||||
-__BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, , )
|
||||
+ protected_, loongson2_, , )
|
||||
+__BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, , , BCM4710_FILL_TLB(addr); BCM4710_FILL_TLB(aend);, BCM4710_DUMMY_RREG();)
|
||||
+__BUILD_BLAST_CACHE_RANGE(i, icache, Hit_Invalidate_I, , , , )
|
||||
+__BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, , , , )
|
||||
/* blast_inv_dcache_range */
|
||||
-__BUILD_BLAST_CACHE_RANGE(inv_d, dcache, Hit_Invalidate_D, , )
|
||||
-__BUILD_BLAST_CACHE_RANGE(inv_s, scache, Hit_Invalidate_SD, , )
|
||||
+__BUILD_BLAST_CACHE_RANGE(inv_d, dcache, Hit_Invalidate_D, , , , BCM4710_DUMMY_RREG();)
|
||||
+__BUILD_BLAST_CACHE_RANGE(inv_s, scache, Hit_Invalidate_SD, , , , )
|
||||
|
||||
/* Currently, this is very specific to Loongson-3 */
|
||||
#define __BUILD_BLAST_CACHE_NODE(pfx, desc, indexop, hitop, lsize) \
|
||||
--- a/arch/mips/include/asm/stackframe.h
|
||||
+++ b/arch/mips/include/asm/stackframe.h
|
||||
@@ -428,6 +428,10 @@
|
||||
eretnc
|
||||
#else
|
||||
.set arch=r4000
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+ nop
|
||||
+ nop
|
||||
+#endif
|
||||
eret
|
||||
.set mips0
|
||||
#endif
|
||||
--- a/arch/mips/kernel/genex.S
|
||||
+++ b/arch/mips/kernel/genex.S
|
||||
@@ -21,6 +21,19 @@
|
||||
#include <asm/war.h>
|
||||
#include <asm/thread_info.h>
|
||||
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+# ifdef eret
|
||||
+# undef eret
|
||||
+# endif
|
||||
+# define eret \
|
||||
+ .set push; \
|
||||
+ .set noreorder; \
|
||||
+ nop; \
|
||||
+ nop; \
|
||||
+ eret; \
|
||||
+ .set pop;
|
||||
+#endif
|
||||
+
|
||||
__INIT
|
||||
|
||||
/*
|
||||
@@ -32,6 +45,9 @@
|
||||
NESTED(except_vec3_generic, 0, sp)
|
||||
.set push
|
||||
.set noat
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+ nop
|
||||
+#endif
|
||||
#if R5432_CP0_INTERRUPT_WAR
|
||||
mfc0 k0, CP0_INDEX
|
||||
#endif
|
||||
@@ -55,6 +71,9 @@ NESTED(except_vec3_r4000, 0, sp)
|
||||
.set push
|
||||
.set arch=r4000
|
||||
.set noat
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+ nop
|
||||
+#endif
|
||||
mfc0 k1, CP0_CAUSE
|
||||
li k0, 31<<2
|
||||
andi k1, k1, 0x7c
|
||||
--- a/arch/mips/mm/c-r4k.c
|
||||
+++ b/arch/mips/mm/c-r4k.c
|
||||
@@ -39,6 +39,9 @@
|
||||
#include <asm/dma-coherence.h>
|
||||
#include <asm/mips-cps.h>
|
||||
|
||||
+/* For enabling BCM4710 cache workarounds */
|
||||
+static int bcm4710 = 0;
|
||||
+
|
||||
/*
|
||||
* Bits describing what cache ops an SMP callback function may perform.
|
||||
*
|
||||
@@ -190,6 +193,9 @@ static void r4k_blast_dcache_user_page_s
|
||||
{
|
||||
unsigned long dc_lsize = cpu_dcache_line_size();
|
||||
|
||||
+ if (bcm4710)
|
||||
+ r4k_blast_dcache_page = blast_dcache_page;
|
||||
+ else
|
||||
if (dc_lsize == 0)
|
||||
r4k_blast_dcache_user_page = (void *)cache_noop;
|
||||
else if (dc_lsize == 16)
|
||||
@@ -208,6 +214,9 @@ static void r4k_blast_dcache_page_indexe
|
||||
{
|
||||
unsigned long dc_lsize = cpu_dcache_line_size();
|
||||
|
||||
+ if (bcm4710)
|
||||
+ r4k_blast_dcache_page_indexed = blast_dcache_page_indexed;
|
||||
+ else
|
||||
if (dc_lsize == 0)
|
||||
r4k_blast_dcache_page_indexed = (void *)cache_noop;
|
||||
else if (dc_lsize == 16)
|
||||
@@ -227,6 +236,9 @@ static void r4k_blast_dcache_setup(void)
|
||||
{
|
||||
unsigned long dc_lsize = cpu_dcache_line_size();
|
||||
|
||||
+ if (bcm4710)
|
||||
+ r4k_blast_dcache = blast_dcache;
|
||||
+ else
|
||||
if (dc_lsize == 0)
|
||||
r4k_blast_dcache = (void *)cache_noop;
|
||||
else if (dc_lsize == 16)
|
||||
@@ -986,6 +998,8 @@ static void local_r4k_flush_cache_sigtra
|
||||
}
|
||||
|
||||
R4600_HIT_CACHEOP_WAR_IMPL;
|
||||
+ BCM4710_PROTECTED_FILL_TLB(addr);
|
||||
+ BCM4710_PROTECTED_FILL_TLB(addr + 4);
|
||||
if (!cpu_has_ic_fills_f_dc) {
|
||||
if (dc_lsize)
|
||||
vaddr ? flush_dcache_line(addr & ~(dc_lsize - 1))
|
||||
@@ -1880,6 +1894,17 @@ static void coherency_setup(void)
|
||||
* silly idea of putting something else there ...
|
||||
*/
|
||||
switch (current_cpu_type()) {
|
||||
+ case CPU_BMIPS3300:
|
||||
+ {
|
||||
+ u32 cm;
|
||||
+ cm = read_c0_diag();
|
||||
+ /* Enable icache */
|
||||
+ cm |= (1 << 31);
|
||||
+ /* Enable dcache */
|
||||
+ cm |= (1 << 30);
|
||||
+ write_c0_diag(cm);
|
||||
+ }
|
||||
+ break;
|
||||
case CPU_R4000PC:
|
||||
case CPU_R4000SC:
|
||||
case CPU_R4000MC:
|
||||
@@ -1926,6 +1951,15 @@ void r4k_cache_init(void)
|
||||
extern void build_copy_page(void);
|
||||
struct cpuinfo_mips *c = ¤t_cpu_data;
|
||||
|
||||
+ /* Check if special workarounds are required */
|
||||
+#if defined(CONFIG_BCM47XX) && !defined(CONFIG_CPU_MIPS32_R2)
|
||||
+ if (current_cpu_data.cputype == CPU_BMIPS32 && (current_cpu_data.processor_id & 0xff) == 0) {
|
||||
+ printk("Enabling BCM4710A0 cache workarounds.\n");
|
||||
+ bcm4710 = 1;
|
||||
+ } else
|
||||
+#endif
|
||||
+ bcm4710 = 0;
|
||||
+
|
||||
probe_pcache();
|
||||
probe_vcache();
|
||||
setup_scache();
|
||||
@@ -2004,7 +2038,15 @@ void r4k_cache_init(void)
|
||||
*/
|
||||
local_r4k___flush_cache_all(NULL);
|
||||
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+ {
|
||||
+ static void (*_coherency_setup)(void);
|
||||
+ _coherency_setup = (void (*)(void)) KSEG1ADDR(coherency_setup);
|
||||
+ _coherency_setup();
|
||||
+ }
|
||||
+#else
|
||||
coherency_setup();
|
||||
+#endif
|
||||
board_cache_error_setup = r4k_cache_error_setup;
|
||||
|
||||
/*
|
||||
--- a/arch/mips/mm/tlbex.c
|
||||
+++ b/arch/mips/mm/tlbex.c
|
||||
@@ -983,6 +983,9 @@ void build_get_pgde32(u32 **p, unsigned
|
||||
uasm_i_srl(p, ptr, ptr, SMP_CPUID_PTRSHIFT);
|
||||
uasm_i_addu(p, ptr, tmp, ptr);
|
||||
#else
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+ uasm_i_nop(p);
|
||||
+#endif
|
||||
UASM_i_LA_mostly(p, ptr, pgdc);
|
||||
#endif
|
||||
uasm_i_mfc0(p, tmp, C0_BADVADDR); /* get faulting address */
|
||||
@@ -1344,6 +1347,9 @@ static void build_r4000_tlb_refill_handl
|
||||
#ifdef CONFIG_64BIT
|
||||
build_get_pmde64(&p, &l, &r, K0, K1); /* get pmd in K1 */
|
||||
#else
|
||||
+# ifdef CONFIG_BCM47XX
|
||||
+ uasm_i_nop(&p);
|
||||
+# endif
|
||||
build_get_pgde32(&p, K0, K1); /* get pgd in K1 */
|
||||
#endif
|
||||
|
||||
@@ -1355,6 +1361,9 @@ static void build_r4000_tlb_refill_handl
|
||||
build_update_entries(&p, K0, K1);
|
||||
build_tlb_write_entry(&p, &l, &r, tlb_random);
|
||||
uasm_l_leave(&l, p);
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+ uasm_i_nop(&p);
|
||||
+#endif
|
||||
uasm_i_eret(&p); /* return from trap */
|
||||
}
|
||||
#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
|
||||
@@ -2064,6 +2073,9 @@ build_r4000_tlbchange_handler_head(u32 *
|
||||
#ifdef CONFIG_64BIT
|
||||
build_get_pmde64(p, l, r, wr.r1, wr.r2); /* get pmd in ptr */
|
||||
#else
|
||||
+# ifdef CONFIG_BCM47XX
|
||||
+ uasm_i_nop(p);
|
||||
+# endif
|
||||
build_get_pgde32(p, wr.r1, wr.r2); /* get pgd in ptr */
|
||||
#endif
|
||||
|
||||
@@ -2110,6 +2122,9 @@ build_r4000_tlbchange_handler_tail(u32 *
|
||||
build_tlb_write_entry(p, l, r, tlb_indexed);
|
||||
uasm_l_leave(l, *p);
|
||||
build_restore_work_registers(p);
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+ uasm_i_nop(p);
|
||||
+#endif
|
||||
uasm_i_eret(p); /* return from trap */
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
@ -1,78 +0,0 @@
|
||||
From: Jeff Hansen <jhansen@cardaccess-inc.com>
|
||||
Subject: [PATCH] kmap_coherent
|
||||
|
||||
On ASUS WL-500gP there are some "Data bus error"s when executing simple
|
||||
commands liks "ps" or "cat /proc/1/cmdline".
|
||||
|
||||
This fixes OpenWrt ticket #1485: https://dev.openwrt.org/ticket/1485
|
||||
---
|
||||
--- a/arch/mips/include/asm/cpu-features.h
|
||||
+++ b/arch/mips/include/asm/cpu-features.h
|
||||
@@ -187,6 +187,9 @@
|
||||
#ifndef cpu_has_local_ebase
|
||||
#define cpu_has_local_ebase 1
|
||||
#endif
|
||||
+#ifndef cpu_use_kmap_coherent
|
||||
+#define cpu_use_kmap_coherent 1
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* I-Cache snoops remote store. This only matters on SMP. Some multiprocessors
|
||||
--- a/arch/mips/include/asm/mach-bcm47xx/cpu-feature-overrides.h
|
||||
+++ b/arch/mips/include/asm/mach-bcm47xx/cpu-feature-overrides.h
|
||||
@@ -80,4 +80,6 @@
|
||||
#define cpu_scache_line_size() 0
|
||||
#define cpu_has_vz 0
|
||||
|
||||
+#define cpu_use_kmap_coherent 0
|
||||
+
|
||||
#endif /* __ASM_MACH_BCM47XX_CPU_FEATURE_OVERRIDES_H */
|
||||
--- a/arch/mips/mm/c-r4k.c
|
||||
+++ b/arch/mips/mm/c-r4k.c
|
||||
@@ -694,7 +694,7 @@ static inline void local_r4k_flush_cache
|
||||
map_coherent = (cpu_has_dc_aliases &&
|
||||
page_mapcount(page) &&
|
||||
!Page_dcache_dirty(page));
|
||||
- if (map_coherent)
|
||||
+ if (map_coherent && cpu_use_kmap_coherent)
|
||||
vaddr = kmap_coherent(page, addr);
|
||||
else
|
||||
vaddr = kmap_atomic(page);
|
||||
@@ -719,7 +719,7 @@ static inline void local_r4k_flush_cache
|
||||
}
|
||||
|
||||
if (vaddr) {
|
||||
- if (map_coherent)
|
||||
+ if (map_coherent && cpu_use_kmap_coherent)
|
||||
kunmap_coherent();
|
||||
else
|
||||
kunmap_atomic(vaddr);
|
||||
--- a/arch/mips/mm/init.c
|
||||
+++ b/arch/mips/mm/init.c
|
||||
@@ -170,7 +170,7 @@ void copy_user_highpage(struct page *to,
|
||||
void *vfrom, *vto;
|
||||
|
||||
vto = kmap_atomic(to);
|
||||
- if (cpu_has_dc_aliases &&
|
||||
+ if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
|
||||
page_mapcount(from) && !Page_dcache_dirty(from)) {
|
||||
vfrom = kmap_coherent(from, vaddr);
|
||||
copy_page(vto, vfrom);
|
||||
@@ -192,7 +192,7 @@ void copy_to_user_page(struct vm_area_st
|
||||
struct page *page, unsigned long vaddr, void *dst, const void *src,
|
||||
unsigned long len)
|
||||
{
|
||||
- if (cpu_has_dc_aliases &&
|
||||
+ if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
|
||||
page_mapcount(page) && !Page_dcache_dirty(page)) {
|
||||
void *vto = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
|
||||
memcpy(vto, src, len);
|
||||
@@ -210,7 +210,7 @@ void copy_from_user_page(struct vm_area_
|
||||
struct page *page, unsigned long vaddr, void *dst, const void *src,
|
||||
unsigned long len)
|
||||
{
|
||||
- if (cpu_has_dc_aliases &&
|
||||
+ if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
|
||||
page_mapcount(page) && !Page_dcache_dirty(page)) {
|
||||
void *vfrom = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
|
||||
memcpy(dst, vfrom, len);
|
||||
@ -1,121 +0,0 @@
|
||||
From b36f694256f41bc71571f467646d015dda128d14 Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Sat, 9 Nov 2013 17:03:59 +0100
|
||||
Subject: [PATCH 210/210] b44: register adm switch
|
||||
|
||||
---
|
||||
drivers/net/ethernet/broadcom/b44.c | 57 +++++++++++++++++++++++++++++++++++
|
||||
drivers/net/ethernet/broadcom/b44.h | 3 ++
|
||||
2 files changed, 60 insertions(+)
|
||||
|
||||
--- a/drivers/net/ethernet/broadcom/b44.c
|
||||
+++ b/drivers/net/ethernet/broadcom/b44.c
|
||||
@@ -31,6 +31,8 @@
|
||||
#include <linux/ssb/ssb.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/phy.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/platform_data/adm6996-gpio.h>
|
||||
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/io.h>
|
||||
@@ -2251,6 +2253,69 @@ static void b44_adjust_link(struct net_d
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+static int b44_register_adm_switch(struct b44 *bp)
|
||||
+{
|
||||
+ int gpio;
|
||||
+ struct platform_device *pdev;
|
||||
+ struct adm6996_gpio_platform_data adm_data = {0};
|
||||
+ struct platform_device_info info = {0};
|
||||
+
|
||||
+ adm_data.model = ADM6996L;
|
||||
+ gpio = bcm47xx_nvram_gpio_pin("adm_eecs");
|
||||
+ if (gpio >= 0)
|
||||
+ adm_data.eecs = gpio;
|
||||
+ else
|
||||
+ adm_data.eecs = 2;
|
||||
+
|
||||
+ gpio = bcm47xx_nvram_gpio_pin("adm_eesk");
|
||||
+ if (gpio >= 0)
|
||||
+ adm_data.eesk = gpio;
|
||||
+ else
|
||||
+ adm_data.eesk = 3;
|
||||
+
|
||||
+ gpio = bcm47xx_nvram_gpio_pin("adm_eedi");
|
||||
+ if (gpio >= 0)
|
||||
+ adm_data.eedi = gpio;
|
||||
+ else
|
||||
+ adm_data.eedi = 4;
|
||||
+
|
||||
+ /*
|
||||
+ * We ignore the "adm_rc" GPIO here. The driver does not use it,
|
||||
+ * and it conflicts with the Reset button GPIO on the Linksys WRT54GSv1.
|
||||
+ */
|
||||
+
|
||||
+ info.parent = bp->sdev->dev;
|
||||
+ info.name = "adm6996_gpio";
|
||||
+ info.id = -1;
|
||||
+ info.data = &adm_data;
|
||||
+ info.size_data = sizeof(adm_data);
|
||||
+
|
||||
+ if (!bp->adm_switch) {
|
||||
+ pdev = platform_device_register_full(&info);
|
||||
+ if (IS_ERR(pdev))
|
||||
+ return PTR_ERR(pdev);
|
||||
+
|
||||
+ bp->adm_switch = pdev;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+static void b44_unregister_adm_switch(struct b44 *bp)
|
||||
+{
|
||||
+ if (bp->adm_switch)
|
||||
+ platform_device_unregister(bp->adm_switch);
|
||||
+}
|
||||
+#else
|
||||
+static int b44_register_adm_switch(struct b44 *bp)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+static void b44_unregister_adm_switch(struct b44 *bp)
|
||||
+{
|
||||
+
|
||||
+}
|
||||
+#endif /* CONFIG_BCM47XX */
|
||||
+
|
||||
static int b44_register_phy_one(struct b44 *bp)
|
||||
{
|
||||
struct mii_bus *mii_bus;
|
||||
@@ -2286,6 +2351,9 @@ static int b44_register_phy_one(struct b
|
||||
if (!mdiobus_is_registered_device(bp->mii_bus, bp->phy_addr) &&
|
||||
(sprom->boardflags_lo & (B44_BOARDFLAG_ROBO | B44_BOARDFLAG_ADM))) {
|
||||
|
||||
+ if (sprom->boardflags_lo & B44_BOARDFLAG_ADM)
|
||||
+ b44_register_adm_switch(bp);
|
||||
+
|
||||
dev_info(sdev->dev,
|
||||
"could not find PHY at %i, use fixed one\n",
|
||||
bp->phy_addr);
|
||||
@@ -2480,6 +2548,7 @@ static void b44_remove_one(struct ssb_de
|
||||
unregister_netdev(dev);
|
||||
if (bp->flags & B44_FLAG_EXTERNAL_PHY)
|
||||
b44_unregister_phy_one(bp);
|
||||
+ b44_unregister_adm_switch(bp);
|
||||
ssb_device_disable(sdev, 0);
|
||||
ssb_bus_may_powerdown(sdev->bus);
|
||||
netif_napi_del(&bp->napi);
|
||||
--- a/drivers/net/ethernet/broadcom/b44.h
|
||||
+++ b/drivers/net/ethernet/broadcom/b44.h
|
||||
@@ -408,6 +408,9 @@ struct b44 {
|
||||
struct mii_bus *mii_bus;
|
||||
int old_link;
|
||||
struct mii_if_info mii_if;
|
||||
+
|
||||
+ /* platform device for associated switch */
|
||||
+ struct platform_device *adm_switch;
|
||||
};
|
||||
|
||||
#endif /* _B44_H */
|
||||
@ -1,54 +0,0 @@
|
||||
--- a/drivers/net/ethernet/broadcom/b44.c
|
||||
+++ b/drivers/net/ethernet/broadcom/b44.c
|
||||
@@ -431,10 +431,34 @@ static void b44_wap54g10_workaround(stru
|
||||
error:
|
||||
pr_warn("PHY: cannot reset MII transceiver isolate bit\n");
|
||||
}
|
||||
+
|
||||
+static void b44_bcm47xx_workarounds(struct b44 *bp)
|
||||
+{
|
||||
+ char buf[20];
|
||||
+ struct ssb_device *sdev = bp->sdev;
|
||||
+
|
||||
+ /* Toshiba WRC-1000, Siemens SE505 v1, Askey RT-210W, RT-220W */
|
||||
+ if (sdev->bus->sprom.board_num == 100) {
|
||||
+ bp->phy_addr = B44_PHY_ADDR_NO_LOCAL_PHY;
|
||||
+ } else {
|
||||
+ /* WL-HDD */
|
||||
+ if (bcm47xx_nvram_getenv("hardware_version", buf, sizeof(buf)) >= 0 &&
|
||||
+ !strncmp(buf, "WL300-", strlen("WL300-"))) {
|
||||
+ if (sdev->bus->sprom.et0phyaddr == 0 &&
|
||||
+ sdev->bus->sprom.et1phyaddr == 1)
|
||||
+ bp->phy_addr = B44_PHY_ADDR_NO_LOCAL_PHY;
|
||||
+ }
|
||||
+ }
|
||||
+ return;
|
||||
+}
|
||||
#else
|
||||
static inline void b44_wap54g10_workaround(struct b44 *bp)
|
||||
{
|
||||
}
|
||||
+
|
||||
+static inline void b44_bcm47xx_workarounds(struct b44 *bp)
|
||||
+{
|
||||
+}
|
||||
#endif
|
||||
|
||||
static int b44_setup_phy(struct b44 *bp)
|
||||
@@ -443,6 +467,7 @@ static int b44_setup_phy(struct b44 *bp)
|
||||
int err;
|
||||
|
||||
b44_wap54g10_workaround(bp);
|
||||
+ b44_bcm47xx_workarounds(bp);
|
||||
|
||||
if (bp->flags & B44_FLAG_EXTERNAL_PHY)
|
||||
return 0;
|
||||
@@ -2181,6 +2206,8 @@ static int b44_get_invariants(struct b44
|
||||
* valid PHY address. */
|
||||
bp->phy_addr &= 0x1F;
|
||||
|
||||
+ b44_bcm47xx_workarounds(bp);
|
||||
+
|
||||
memcpy(bp->dev->dev_addr, addr, ETH_ALEN);
|
||||
|
||||
if (!is_valid_ether_addr(&bp->dev->dev_addr[0])){
|
||||
@ -1,25 +0,0 @@
|
||||
This prevents the options from being delete with make kernel_oldconfig.
|
||||
---
|
||||
drivers/ssb/Kconfig | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/drivers/bcma/Kconfig
|
||||
+++ b/drivers/bcma/Kconfig
|
||||
@@ -31,6 +31,7 @@ config BCMA_HOST_PCI
|
||||
config BCMA_HOST_SOC
|
||||
bool "Support for BCMA in a SoC"
|
||||
depends on BCMA
|
||||
+ select USB_HCD_BCMA if USB_EHCI_HCD || USB_OHCI_HCD
|
||||
help
|
||||
Host interface for a Broadcom AIX bus directly mapped into
|
||||
the memory. This only works with the Broadcom SoCs from the
|
||||
--- a/drivers/ssb/Kconfig
|
||||
+++ b/drivers/ssb/Kconfig
|
||||
@@ -157,6 +157,7 @@ config SSB_SFLASH
|
||||
config SSB_EMBEDDED
|
||||
bool
|
||||
depends on SSB_DRIVER_MIPS && SSB_PCICORE_HOSTMODE
|
||||
+ select USB_HCD_SSB if USB_EHCI_HCD || USB_OHCI_HCD
|
||||
default y
|
||||
|
||||
config SSB_DRIVER_EXTIF
|
||||
@ -1,21 +0,0 @@
|
||||
From: Wolfram Joost <dbox2@frokaschwei.de>
|
||||
Subject: [PATCH] fork_cacheflush
|
||||
|
||||
On ASUS WL-500gP there are many unexpected "Segmentation fault"s that
|
||||
seem to be caused by a kernel. They can be avoided by:
|
||||
1) Disabling highpage
|
||||
2) Using flush_cache_mm in flush_cache_dup_mm
|
||||
|
||||
For details see OpenWrt ticket #2035 https://dev.openwrt.org/ticket/2035
|
||||
---
|
||||
--- a/arch/mips/include/asm/cacheflush.h
|
||||
+++ b/arch/mips/include/asm/cacheflush.h
|
||||
@@ -47,7 +47,7 @@
|
||||
extern void (*flush_cache_all)(void);
|
||||
extern void (*__flush_cache_all)(void);
|
||||
extern void (*flush_cache_mm)(struct mm_struct *mm);
|
||||
-#define flush_cache_dup_mm(mm) do { (void) (mm); } while (0)
|
||||
+#define flush_cache_dup_mm(mm) flush_cache_mm(mm)
|
||||
extern void (*flush_cache_range)(struct vm_area_struct *vma,
|
||||
unsigned long start, unsigned long end);
|
||||
extern void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, unsigned long pfn);
|
||||
@ -1,74 +0,0 @@
|
||||
From: Jeff Hansen <jhansen@cardaccess-inc.com>
|
||||
Subject: [PATCH] no highpage
|
||||
|
||||
On ASUS WL-500gP there are many unexpected "Segmentation fault"s that
|
||||
seem to be caused by a kernel. They can be avoided by:
|
||||
1) Disabling highpage
|
||||
2) Using flush_cache_mm in flush_cache_dup_mm
|
||||
|
||||
For details see OpenWrt ticket #2035 https://dev.openwrt.org/ticket/2035
|
||||
---
|
||||
--- a/arch/mips/include/asm/page.h
|
||||
+++ b/arch/mips/include/asm/page.h
|
||||
@@ -71,6 +71,7 @@ static inline unsigned int page_size_ftl
|
||||
#endif /* CONFIG_MIPS_HUGE_TLB_SUPPORT */
|
||||
|
||||
#include <linux/pfn.h>
|
||||
+#include <asm/cpu-features.h>
|
||||
|
||||
extern void build_clear_page(void);
|
||||
extern void build_copy_page(void);
|
||||
@@ -105,11 +106,16 @@ static inline void clear_user_page(void
|
||||
flush_data_cache_page((unsigned long)addr);
|
||||
}
|
||||
|
||||
-struct vm_area_struct;
|
||||
-extern void copy_user_highpage(struct page *to, struct page *from,
|
||||
- unsigned long vaddr, struct vm_area_struct *vma);
|
||||
+static inline void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
|
||||
+ struct page *to)
|
||||
+{
|
||||
+ extern void (*flush_data_cache_page)(unsigned long addr);
|
||||
|
||||
-#define __HAVE_ARCH_COPY_USER_HIGHPAGE
|
||||
+ copy_page(vto, vfrom);
|
||||
+ if (!cpu_has_ic_fills_f_dc ||
|
||||
+ pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
|
||||
+ flush_data_cache_page((unsigned long)vto);
|
||||
+}
|
||||
|
||||
/*
|
||||
* These are used to make use of C type-checking..
|
||||
--- a/arch/mips/mm/init.c
|
||||
+++ b/arch/mips/mm/init.c
|
||||
@@ -164,30 +164,6 @@ void kunmap_coherent(void)
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
-void copy_user_highpage(struct page *to, struct page *from,
|
||||
- unsigned long vaddr, struct vm_area_struct *vma)
|
||||
-{
|
||||
- void *vfrom, *vto;
|
||||
-
|
||||
- vto = kmap_atomic(to);
|
||||
- if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
|
||||
- page_mapcount(from) && !Page_dcache_dirty(from)) {
|
||||
- vfrom = kmap_coherent(from, vaddr);
|
||||
- copy_page(vto, vfrom);
|
||||
- kunmap_coherent();
|
||||
- } else {
|
||||
- vfrom = kmap_atomic(from);
|
||||
- copy_page(vto, vfrom);
|
||||
- kunmap_atomic(vfrom);
|
||||
- }
|
||||
- if ((!cpu_has_ic_fills_f_dc) ||
|
||||
- pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
|
||||
- flush_data_cache_page((unsigned long)vto);
|
||||
- kunmap_atomic(vto);
|
||||
- /* Make sure this page is cleared on other CPU's too before using it */
|
||||
- smp_wmb();
|
||||
-}
|
||||
-
|
||||
void copy_to_user_page(struct vm_area_struct *vma,
|
||||
struct page *page, unsigned long vaddr, void *dst, const void *src,
|
||||
unsigned long len)
|
||||
@ -1,185 +0,0 @@
|
||||
--- a/arch/mips/bcm47xx/board.c
|
||||
+++ b/arch/mips/bcm47xx/board.c
|
||||
@@ -141,6 +141,7 @@ struct bcm47xx_board_type_list2 bcm47xx_
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT300NV11, "Linksys WRT300N V1.1"}, "WRT300N", "1.1"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT310NV1, "Linksys WRT310N V1"}, "WRT310N", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT310NV2, "Linksys WRT310N V2"}, "WRT310N", "2.0"},
|
||||
+ {{BCM47XX_BOARD_LINKSYS_WRT320N_V1, "Linksys WRT320N V1"}, "WRT320N", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54G3GV2, "Linksys WRT54G3GV2-VF"}, "WRT54G3GV2-VF", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT610NV1, "Linksys WRT610N V1"}, "WRT610N", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT610NV2, "Linksys WRT610N V2"}, "WRT610N", "2.0"},
|
||||
@@ -160,9 +161,12 @@ struct bcm47xx_board_type_list1 bcm47xx_
|
||||
{{BCM47XX_BOARD_LUXUL_XVW_P30_V1, "Luxul XVW-P30 V1"}, "luxul_xvwp30_v1"},
|
||||
{{BCM47XX_BOARD_LUXUL_XWR_600_V1, "Luxul XWR-600 V1"}, "luxul_xwr600_v1"},
|
||||
{{BCM47XX_BOARD_LUXUL_XWR_1750_V1, "Luxul XWR-1750 V1"}, "luxul_xwr1750_v1"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_R6300_V1, "Netgear R6300 V1"}, "U12H218T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_WN2500RP_V1, "Netgear WN2500RP V1"}, "U12H197T00_NETGEAR"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_WN2500RP_V2, "Netgear WN2500RP V2"}, "U12H294T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNDR3300, "Netgear WNDR3300"}, "U12H093T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNDR3400V1, "Netgear WNDR3400 V1"}, "U12H155T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNDR3400V2, "Netgear WNDR3400 V2"}, "U12H187T00_NETGEAR"},
|
||||
--- a/arch/mips/bcm47xx/buttons.c
|
||||
+++ b/arch/mips/bcm47xx/buttons.c
|
||||
@@ -27,6 +27,12 @@
|
||||
/* Asus */
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_asus_rtn10u[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(20, KEY_WPS_BUTTON),
|
||||
+ BCM47XX_GPIO_KEY(21, KEY_RESTART),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_asus_rtn12[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON),
|
||||
BCM47XX_GPIO_KEY(1, KEY_RESTART),
|
||||
@@ -277,6 +283,18 @@ bcm47xx_buttons_linksys_wrt310nv1[] __in
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_linksys_wrt310n_v2[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
|
||||
+ BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_linksys_wrt320n_v1[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
|
||||
+ BCM47XX_GPIO_KEY(8, KEY_RESTART),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(5, KEY_WIMAX),
|
||||
BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
@@ -385,6 +403,17 @@ bcm47xx_buttons_motorola_wr850gv2v3[] __
|
||||
/* Netgear */
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_netgear_r6300_v1[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_netgear_wn2500rp_v1[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(12, KEY_RESTART),
|
||||
+ BCM47XX_GPIO_KEY(31, KEY_WPS_BUTTON),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_netgear_wndr3400v1[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(4, KEY_RESTART),
|
||||
BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
|
||||
@@ -471,6 +500,9 @@ int __init bcm47xx_buttons_register(void
|
||||
int err;
|
||||
|
||||
switch (board) {
|
||||
+ case BCM47XX_BOARD_ASUS_RTN10U:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn10u);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_ASUS_RTN12:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn12);
|
||||
break;
|
||||
@@ -601,6 +633,12 @@ int __init bcm47xx_buttons_register(void
|
||||
case BCM47XX_BOARD_LINKSYS_WRT310NV1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_LINKSYS_WRT310NV2:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2);
|
||||
+ break;
|
||||
+ case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2);
|
||||
break;
|
||||
@@ -664,6 +702,12 @@ int __init bcm47xx_buttons_register(void
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_motorola_wr850gv2v3);
|
||||
break;
|
||||
|
||||
+ case BCM47XX_BOARD_NETGEAR_R6300_V1:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6300_v1);
|
||||
+ break;
|
||||
+ case BCM47XX_BOARD_NETGEAR_WN2500RP_V1:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wn2500rp_v1);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1);
|
||||
break;
|
||||
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
@@ -72,6 +72,7 @@ enum bcm47xx_board {
|
||||
BCM47XX_BOARD_LINKSYS_WRT300NV11,
|
||||
BCM47XX_BOARD_LINKSYS_WRT310NV1,
|
||||
BCM47XX_BOARD_LINKSYS_WRT310NV2,
|
||||
+ BCM47XX_BOARD_LINKSYS_WRT320N_V1,
|
||||
BCM47XX_BOARD_LINKSYS_WRT54G3GV2,
|
||||
BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101,
|
||||
BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467,
|
||||
@@ -98,9 +99,12 @@ enum bcm47xx_board {
|
||||
BCM47XX_BOARD_MOTOROLA_WR850GP,
|
||||
BCM47XX_BOARD_MOTOROLA_WR850GV2V3,
|
||||
|
||||
+ BCM47XX_BOARD_NETGEAR_R6300_V1,
|
||||
BCM47XX_BOARD_NETGEAR_WGR614V8,
|
||||
BCM47XX_BOARD_NETGEAR_WGR614V9,
|
||||
BCM47XX_BOARD_NETGEAR_WGR614_V10,
|
||||
+ BCM47XX_BOARD_NETGEAR_WN2500RP_V1,
|
||||
+ BCM47XX_BOARD_NETGEAR_WN2500RP_V2,
|
||||
BCM47XX_BOARD_NETGEAR_WNDR3300,
|
||||
BCM47XX_BOARD_NETGEAR_WNDR3400V1,
|
||||
BCM47XX_BOARD_NETGEAR_WNDR3400V2,
|
||||
--- a/arch/mips/bcm47xx/leds.c
|
||||
+++ b/arch/mips/bcm47xx/leds.c
|
||||
@@ -30,6 +30,14 @@
|
||||
/* Asus */
|
||||
|
||||
static const struct gpio_led
|
||||
+bcm47xx_leds_asus_rtn10u[] __initconst = {
|
||||
+ BCM47XX_GPIO_LED(5, "green", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(6, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
|
||||
+ BCM47XX_GPIO_LED(7, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(8, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_led
|
||||
bcm47xx_leds_asus_rtn12[] __initconst = {
|
||||
BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
|
||||
BCM47XX_GPIO_LED(7, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
@@ -314,6 +322,13 @@ bcm47xx_leds_linksys_wrt310nv1[] __initc
|
||||
};
|
||||
|
||||
static const struct gpio_led
|
||||
+bcm47xx_leds_linksys_wrt320n_v1[] __initconst = {
|
||||
+ BCM47XX_GPIO_LED(1, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
|
||||
+ BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_led
|
||||
bcm47xx_leds_linksys_wrt54g_generic[] __initconst = {
|
||||
BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
|
||||
@@ -556,6 +571,9 @@ void __init bcm47xx_leds_register(void)
|
||||
enum bcm47xx_board board = bcm47xx_board_get();
|
||||
|
||||
switch (board) {
|
||||
+ case BCM47XX_BOARD_ASUS_RTN10U:
|
||||
+ bcm47xx_set_pdata(bcm47xx_leds_asus_rtn10u);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_ASUS_RTN12:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12);
|
||||
break;
|
||||
@@ -689,6 +707,9 @@ void __init bcm47xx_leds_register(void)
|
||||
case BCM47XX_BOARD_LINKSYS_WRT310NV1:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
|
||||
+ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt320n_v1);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2);
|
||||
break;
|
||||
@ -1,34 +0,0 @@
|
||||
--- a/drivers/mtd/bcm47xxpart.c
|
||||
+++ b/drivers/mtd/bcm47xxpart.c
|
||||
@@ -102,6 +102,7 @@ static int bcm47xxpart_parse(struct mtd_
|
||||
int trx_num = 0; /* Number of found TRX partitions */
|
||||
int possible_nvram_sizes[] = { 0x8000, 0xF000, 0x10000, };
|
||||
int err;
|
||||
+ bool found_nvram = false;
|
||||
|
||||
/*
|
||||
* Some really old flashes (like AT45DB*) had smaller erasesize-s, but
|
||||
@@ -283,12 +284,23 @@ static int bcm47xxpart_parse(struct mtd_
|
||||
if (buf[0] == NVRAM_HEADER) {
|
||||
bcm47xxpart_add_part(&parts[curr_part++], "nvram",
|
||||
master->size - blocksize, 0);
|
||||
+ found_nvram = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
kfree(buf);
|
||||
|
||||
+ if (!found_nvram) {
|
||||
+ pr_err("can not find a nvram partition reserve last block\n");
|
||||
+ bcm47xxpart_add_part(&parts[curr_part++], "nvram_guess",
|
||||
+ master->size - blocksize * 2, MTD_WRITEABLE);
|
||||
+ for (i = 0; i < curr_part; i++) {
|
||||
+ if (parts[i].size + parts[i].offset == master->size)
|
||||
+ parts[i].offset -= blocksize * 2;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* Assume that partitions end at the beginning of the one they are
|
||||
* followed by.
|
||||
@ -1,41 +0,0 @@
|
||||
From: b.sander
|
||||
Subject: [PATCH] pci: IDE fix
|
||||
|
||||
These are standard probing messages when using pdc202xx_old:
|
||||
pdc202xx_old 0000:00:01.0: IDE controller (0x105a:0x0d30 rev 0x02)
|
||||
PCI: Enabling device 0000:00:01.0 (0004 -> 0007)
|
||||
PCI: Fixing up device 0000:00:01.0
|
||||
0000:00:01.0: (U)DMA Burst Bit DISABLED Primary PCI Mode Secondary PCI Mode.
|
||||
0000:00:01.0: FORCING BURST BIT 0x00->0x01 ACTIVE
|
||||
pdc202xx_old 0000:00:01.0: 100% native mode on irq 6
|
||||
|
||||
With the default MAX_HWIFS value after above we get:
|
||||
ide2: BM-DMA at 0x0400-0x0407
|
||||
ide3: BM-DMA at 0x0408-0x040f
|
||||
Probing IDE interface ide2...
|
||||
hde: CF500, CFA DISK drive
|
||||
|
||||
As you can see it's ide2 + ide3 and hde.
|
||||
|
||||
With this patch applied we get:
|
||||
ide0: BM-DMA at 0x0400-0x0407
|
||||
ide1: BM-DMA at 0x0408-0x040f
|
||||
Probing IDE interface ide0...
|
||||
hda: CF500, CFA DISK drive
|
||||
|
||||
This fixes OpenWrt ticket #7061: https://dev.openwrt.org/ticket/7061
|
||||
---
|
||||
--- a/include/linux/ide.h
|
||||
+++ b/include/linux/ide.h
|
||||
@@ -241,7 +241,11 @@ static inline void ide_std_init_ports(st
|
||||
hw->io_ports.ctl_addr = ctl_addr;
|
||||
}
|
||||
|
||||
+#if defined CONFIG_BCM47XX
|
||||
+# define MAX_HWIFS 2
|
||||
+#else
|
||||
#define MAX_HWIFS 10
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Now for the data we need to maintain per-drive: ide_drive_t
|
||||
@ -1,17 +0,0 @@
|
||||
When the Ethernet controller is powered down and someone wants to
|
||||
access the mdio bus like the witch driver (b53) the system crashed if
|
||||
PCI_D3hot was set before. This patch deactivates this power sawing mode
|
||||
when a switch driver is in use.
|
||||
|
||||
--- a/drivers/net/ethernet/broadcom/tg3.c
|
||||
+++ b/drivers/net/ethernet/broadcom/tg3.c
|
||||
@@ -4264,7 +4264,8 @@ static int tg3_power_down_prepare(struct
|
||||
static void tg3_power_down(struct tg3 *tp)
|
||||
{
|
||||
pci_wake_from_d3(tp->pdev, tg3_flag(tp, WOL_ENABLE));
|
||||
- pci_set_power_state(tp->pdev, PCI_D3hot);
|
||||
+ if (!tg3_flag(tp, ROBOSWITCH))
|
||||
+ pci_set_power_state(tp->pdev, PCI_D3hot);
|
||||
}
|
||||
|
||||
static void tg3_aux_stat_to_speed_duplex(struct tg3 *tp, u32 val, u16 *speed, u8 *duplex)
|
||||
@ -1,73 +0,0 @@
|
||||
From 597715c61ae75a05ab3310a34ff3857a006f0f63 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Date: Thu, 20 Nov 2014 21:32:42 +0100
|
||||
Subject: [PATCH] bcma: add table of serial flashes with smaller blocks
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
---
|
||||
drivers/bcma/driver_chipcommon_sflash.c | 29 +++++++++++++++++++++++++++++
|
||||
1 file changed, 29 insertions(+)
|
||||
|
||||
--- a/drivers/bcma/driver_chipcommon_sflash.c
|
||||
+++ b/drivers/bcma/driver_chipcommon_sflash.c
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/bcma/bcma.h>
|
||||
+#include <bcm47xx_board.h>
|
||||
|
||||
static struct resource bcma_sflash_resource = {
|
||||
.name = "bcma_sflash",
|
||||
@@ -42,6 +43,13 @@ static const struct bcma_sflash_tbl_e bc
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
+/* Some devices use smaller blocks (and have more of them) */
|
||||
+static const struct bcma_sflash_tbl_e bcma_sflash_st_shrink_tbl[] = {
|
||||
+ { "M25P16", 0x14, 0x1000, 512, },
|
||||
+ { "M25P32", 0x15, 0x1000, 1024, },
|
||||
+ { NULL },
|
||||
+};
|
||||
+
|
||||
static const struct bcma_sflash_tbl_e bcma_sflash_sst_tbl[] = {
|
||||
{ "SST25WF512", 1, 0x1000, 16, },
|
||||
{ "SST25VF512", 0x48, 0x1000, 16, },
|
||||
@@ -85,6 +93,24 @@ static void bcma_sflash_cmd(struct bcma_
|
||||
bcma_err(cc->core->bus, "SFLASH control command failed (timeout)!\n");
|
||||
}
|
||||
|
||||
+const struct bcma_sflash_tbl_e *bcma_sflash_shrink_flash(u32 id)
|
||||
+{
|
||||
+ enum bcm47xx_board board = bcm47xx_board_get();
|
||||
+ const struct bcma_sflash_tbl_e *e;
|
||||
+
|
||||
+ switch (board) {
|
||||
+ case BCM47XX_BOARD_NETGEAR_WGR614_V10:
|
||||
+ case BCM47XX_BOARD_NETGEAR_WNR1000_V3:
|
||||
+ for (e = bcma_sflash_st_shrink_tbl; e->name; e++) {
|
||||
+ if (e->id == id)
|
||||
+ return e;
|
||||
+ }
|
||||
+ return NULL;
|
||||
+ default:
|
||||
+ return NULL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/* Initialize serial flash access */
|
||||
int bcma_sflash_init(struct bcma_drv_cc *cc)
|
||||
{
|
||||
@@ -115,6 +141,10 @@ int bcma_sflash_init(struct bcma_drv_cc
|
||||
case 0x13:
|
||||
return -ENOTSUPP;
|
||||
default:
|
||||
+ e = bcma_sflash_shrink_flash(id);
|
||||
+ if (e)
|
||||
+ break;
|
||||
+
|
||||
for (e = bcma_sflash_st_tbl; e->name; e++) {
|
||||
if (e->id == id)
|
||||
break;
|
||||
@ -1,304 +0,0 @@
|
||||
The Netgear wgt634u uses a different format for storing the
|
||||
configuration. This patch is needed to read out the correct
|
||||
configuration. The cfe_env.c file uses a different method way to read
|
||||
out the configuration than the in kernel cfe config reader.
|
||||
|
||||
--- a/drivers/firmware/broadcom/Makefile
|
||||
+++ b/drivers/firmware/broadcom/Makefile
|
||||
@@ -1,2 +1,2 @@
|
||||
-obj-$(CONFIG_BCM47XX_NVRAM) += bcm47xx_nvram.o
|
||||
+obj-$(CONFIG_BCM47XX_NVRAM) += bcm47xx_nvram.o cfe_env.o
|
||||
obj-$(CONFIG_BCM47XX_SPROM) += bcm47xx_sprom.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/firmware/broadcom/cfe_env.c
|
||||
@@ -0,0 +1,228 @@
|
||||
+/*
|
||||
+ * CFE environment variable access
|
||||
+ *
|
||||
+ * Copyright 2001-2003, Broadcom Corporation
|
||||
+ * Copyright 2006, Felix Fietkau <nbd@nbd.name>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License as published by the
|
||||
+ * Free Software Foundation; either version 2 of the License, or (at your
|
||||
+ * option) any later version.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/string.h>
|
||||
+#include <asm/io.h>
|
||||
+#include <linux/uaccess.h>
|
||||
+
|
||||
+#define NVRAM_SIZE (0x1ff0)
|
||||
+static char _nvdata[NVRAM_SIZE];
|
||||
+static char _valuestr[256];
|
||||
+
|
||||
+/*
|
||||
+ * TLV types. These codes are used in the "type-length-value"
|
||||
+ * encoding of the items stored in the NVRAM device (flash or EEPROM)
|
||||
+ *
|
||||
+ * The layout of the flash/nvram is as follows:
|
||||
+ *
|
||||
+ * <type> <length> <data ...> <type> <length> <data ...> <type_end>
|
||||
+ *
|
||||
+ * The type code of "ENV_TLV_TYPE_END" marks the end of the list.
|
||||
+ * The "length" field marks the length of the data section, not
|
||||
+ * including the type and length fields.
|
||||
+ *
|
||||
+ * Environment variables are stored as follows:
|
||||
+ *
|
||||
+ * <type_env> <length> <flags> <name> = <value>
|
||||
+ *
|
||||
+ * If bit 0 (low bit) is set, the length is an 8-bit value.
|
||||
+ * If bit 0 (low bit) is clear, the length is a 16-bit value
|
||||
+ *
|
||||
+ * Bit 7 set indicates "user" TLVs. In this case, bit 0 still
|
||||
+ * indicates the size of the length field.
|
||||
+ *
|
||||
+ * Flags are from the constants below:
|
||||
+ *
|
||||
+ */
|
||||
+#define ENV_LENGTH_16BITS 0x00 /* for low bit */
|
||||
+#define ENV_LENGTH_8BITS 0x01
|
||||
+
|
||||
+#define ENV_TYPE_USER 0x80
|
||||
+
|
||||
+#define ENV_CODE_SYS(n,l) (((n)<<1)|(l))
|
||||
+#define ENV_CODE_USER(n,l) ((((n)<<1)|(l)) | ENV_TYPE_USER)
|
||||
+
|
||||
+/*
|
||||
+ * The actual TLV types we support
|
||||
+ */
|
||||
+
|
||||
+#define ENV_TLV_TYPE_END 0x00
|
||||
+#define ENV_TLV_TYPE_ENV ENV_CODE_SYS(0,ENV_LENGTH_8BITS)
|
||||
+
|
||||
+/*
|
||||
+ * Environment variable flags
|
||||
+ */
|
||||
+
|
||||
+#define ENV_FLG_NORMAL 0x00 /* normal read/write */
|
||||
+#define ENV_FLG_BUILTIN 0x01 /* builtin - not stored in flash */
|
||||
+#define ENV_FLG_READONLY 0x02 /* read-only - cannot be changed */
|
||||
+
|
||||
+#define ENV_FLG_MASK 0xFF /* mask of attributes we keep */
|
||||
+#define ENV_FLG_ADMIN 0x100 /* lets us internally override permissions */
|
||||
+
|
||||
+
|
||||
+/* *********************************************************************
|
||||
+ * _nvram_read(buffer,offset,length)
|
||||
+ *
|
||||
+ * Read data from the NVRAM device
|
||||
+ *
|
||||
+ * Input parameters:
|
||||
+ * buffer - destination buffer
|
||||
+ * offset - offset of data to read
|
||||
+ * length - number of bytes to read
|
||||
+ *
|
||||
+ * Return value:
|
||||
+ * number of bytes read, or <0 if error occured
|
||||
+ ********************************************************************* */
|
||||
+static int
|
||||
+_nvram_read(unsigned char *nv_buf, unsigned char *buffer, int offset, int length)
|
||||
+{
|
||||
+ int i;
|
||||
+ if (offset > NVRAM_SIZE)
|
||||
+ return -1;
|
||||
+
|
||||
+ for ( i = 0; i < length; i++) {
|
||||
+ buffer[i] = ((volatile unsigned char*)nv_buf)[offset + i];
|
||||
+ }
|
||||
+ return length;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static char*
|
||||
+_strnchr(const char *dest,int c,size_t cnt)
|
||||
+{
|
||||
+ while (*dest && (cnt > 0)) {
|
||||
+ if (*dest == c) return (char *) dest;
|
||||
+ dest++;
|
||||
+ cnt--;
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+
|
||||
+/*
|
||||
+ * Core support API: Externally visible.
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * Get the value of an NVRAM variable
|
||||
+ * @param name name of variable to get
|
||||
+ * @return value of variable or NULL if undefined
|
||||
+ */
|
||||
+
|
||||
+char *cfe_env_get(unsigned char *nv_buf, const char *name)
|
||||
+{
|
||||
+ int size;
|
||||
+ unsigned char *buffer;
|
||||
+ unsigned char *ptr;
|
||||
+ unsigned char *envval;
|
||||
+ unsigned int reclen;
|
||||
+ unsigned int rectype;
|
||||
+ int offset;
|
||||
+ int flg;
|
||||
+
|
||||
+ if (!strcmp(name, "nvram_type"))
|
||||
+ return "cfe";
|
||||
+
|
||||
+ size = NVRAM_SIZE;
|
||||
+ buffer = &_nvdata[0];
|
||||
+
|
||||
+ ptr = buffer;
|
||||
+ offset = 0;
|
||||
+
|
||||
+ /* Read the record type and length */
|
||||
+ if (_nvram_read(nv_buf, ptr,offset,1) != 1) {
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+ while ((*ptr != ENV_TLV_TYPE_END) && (size > 1)) {
|
||||
+
|
||||
+ /* Adjust pointer for TLV type */
|
||||
+ rectype = *(ptr);
|
||||
+ offset++;
|
||||
+ size--;
|
||||
+
|
||||
+ /*
|
||||
+ * Read the length. It can be either 1 or 2 bytes
|
||||
+ * depending on the code
|
||||
+ */
|
||||
+ if (rectype & ENV_LENGTH_8BITS) {
|
||||
+ /* Read the record type and length - 8 bits */
|
||||
+ if (_nvram_read(nv_buf, ptr,offset,1) != 1) {
|
||||
+ goto error;
|
||||
+ }
|
||||
+ reclen = *(ptr);
|
||||
+ size--;
|
||||
+ offset++;
|
||||
+ }
|
||||
+ else {
|
||||
+ /* Read the record type and length - 16 bits, MSB first */
|
||||
+ if (_nvram_read(nv_buf, ptr,offset,2) != 2) {
|
||||
+ goto error;
|
||||
+ }
|
||||
+ reclen = (((unsigned int) *(ptr)) << 8) + (unsigned int) *(ptr+1);
|
||||
+ size -= 2;
|
||||
+ offset += 2;
|
||||
+ }
|
||||
+
|
||||
+ if (reclen > size)
|
||||
+ break; /* should not happen, bad NVRAM */
|
||||
+
|
||||
+ switch (rectype) {
|
||||
+ case ENV_TLV_TYPE_ENV:
|
||||
+ /* Read the TLV data */
|
||||
+ if (_nvram_read(nv_buf, ptr,offset,reclen) != reclen)
|
||||
+ goto error;
|
||||
+ flg = *ptr++;
|
||||
+ envval = (unsigned char *) _strnchr(ptr,'=',(reclen-1));
|
||||
+ if (envval) {
|
||||
+ *envval++ = '\0';
|
||||
+ memcpy(_valuestr,envval,(reclen-1)-(envval-ptr));
|
||||
+ _valuestr[(reclen-1)-(envval-ptr)] = '\0';
|
||||
+#if 0
|
||||
+ printk(KERN_INFO "NVRAM:%s=%s\n", ptr, _valuestr);
|
||||
+#endif
|
||||
+ if(!strcmp(ptr, name)){
|
||||
+ return _valuestr;
|
||||
+ }
|
||||
+ if((strlen(ptr) > 1) && !strcmp(&ptr[1], name))
|
||||
+ return _valuestr;
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ /* Unknown TLV type, skip it. */
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Advance to next TLV
|
||||
+ */
|
||||
+
|
||||
+ size -= (int)reclen;
|
||||
+ offset += reclen;
|
||||
+
|
||||
+ /* Read the next record type */
|
||||
+ ptr = buffer;
|
||||
+ if (_nvram_read(nv_buf, ptr,offset,1) != 1)
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+error:
|
||||
+ return NULL;
|
||||
+
|
||||
+}
|
||||
+
|
||||
--- a/drivers/firmware/broadcom/bcm47xx_nvram.c
|
||||
+++ b/drivers/firmware/broadcom/bcm47xx_nvram.c
|
||||
@@ -37,6 +37,8 @@ struct nvram_header {
|
||||
static char nvram_buf[NVRAM_SPACE];
|
||||
static size_t nvram_len;
|
||||
static const u32 nvram_sizes[] = {0x6000, 0x8000, 0xF000, 0x10000};
|
||||
+static int cfe_env;
|
||||
+extern char *cfe_env_get(char *nv_buf, const char *name);
|
||||
|
||||
static u32 find_nvram_size(void __iomem *end)
|
||||
{
|
||||
@@ -56,7 +58,9 @@ static u32 find_nvram_size(void __iomem
|
||||
static int nvram_find_and_copy(void __iomem *iobase, u32 lim)
|
||||
{
|
||||
struct nvram_header __iomem *header;
|
||||
+ int i;
|
||||
u32 off;
|
||||
+ u32 *src, *dst;
|
||||
u32 size;
|
||||
|
||||
if (nvram_len) {
|
||||
@@ -64,6 +68,26 @@ static int nvram_find_and_copy(void __io
|
||||
return -EEXIST;
|
||||
}
|
||||
|
||||
+ cfe_env = 0;
|
||||
+
|
||||
+ /* XXX: hack for supporting the CFE environment stuff on WGT634U */
|
||||
+ if (lim >= 8 * 1024 * 1024) {
|
||||
+ src = (u32 *)(iobase + 8 * 1024 * 1024 - 0x2000);
|
||||
+ dst = (u32 *)nvram_buf;
|
||||
+
|
||||
+ if ((*src & 0xff00ff) == 0x000001) {
|
||||
+ printk("early_nvram_init: WGT634U NVRAM found.\n");
|
||||
+
|
||||
+ for (i = 0; i < 0x1ff0; i++) {
|
||||
+ if (*src == 0xFFFFFFFF)
|
||||
+ break;
|
||||
+ *dst++ = *src++;
|
||||
+ }
|
||||
+ cfe_env = 1;
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* TODO: when nvram is on nand flash check for bad blocks first. */
|
||||
off = FLASH_MIN;
|
||||
while (off <= lim) {
|
||||
@@ -174,6 +198,13 @@ int bcm47xx_nvram_getenv(const char *nam
|
||||
if (!name)
|
||||
return -EINVAL;
|
||||
|
||||
+ if (cfe_env) {
|
||||
+ value = cfe_env_get(nvram_buf, name);
|
||||
+ if (!value)
|
||||
+ return -ENOENT;
|
||||
+ return snprintf(val, val_len, "%s", value);
|
||||
+ }
|
||||
+
|
||||
if (!nvram_len) {
|
||||
err = nvram_init();
|
||||
if (err)
|
||||
@ -1,101 +0,0 @@
|
||||
--- a/arch/mips/bcm47xx/setup.c
|
||||
+++ b/arch/mips/bcm47xx/setup.c
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <linux/ssb/ssb.h>
|
||||
#include <linux/ssb/ssb_embedded.h>
|
||||
#include <linux/bcma/bcma_soc.h>
|
||||
+#include <linux/old_gpio_wdt.h>
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/idle.h>
|
||||
#include <asm/prom.h>
|
||||
@@ -225,6 +226,33 @@ static struct fixed_phy_status bcm47xx_f
|
||||
.duplex = DUPLEX_FULL,
|
||||
};
|
||||
|
||||
+static struct gpio_wdt_platform_data gpio_wdt_data;
|
||||
+
|
||||
+static struct platform_device gpio_wdt_device = {
|
||||
+ .name = "gpio-wdt",
|
||||
+ .id = 0,
|
||||
+ .dev = {
|
||||
+ .platform_data = &gpio_wdt_data,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static int __init bcm47xx_register_gpio_watchdog(void)
|
||||
+{
|
||||
+ enum bcm47xx_board board = bcm47xx_board_get();
|
||||
+
|
||||
+ switch (board) {
|
||||
+ case BCM47XX_BOARD_HUAWEI_E970:
|
||||
+ pr_info("bcm47xx: detected Huawei E970 or similar, starting early gpio_wdt timer\n");
|
||||
+ gpio_wdt_data.gpio = 7;
|
||||
+ gpio_wdt_data.interval = HZ;
|
||||
+ gpio_wdt_data.first_interval = HZ / 5;
|
||||
+ return platform_device_register(&gpio_wdt_device);
|
||||
+ default:
|
||||
+ /* Nothing to do */
|
||||
+ return 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static int __init bcm47xx_register_bus_complete(void)
|
||||
{
|
||||
switch (bcm47xx_bus_type) {
|
||||
@@ -244,6 +272,7 @@ static int __init bcm47xx_register_bus_c
|
||||
bcm47xx_workarounds();
|
||||
|
||||
fixed_phy_add(PHY_POLL, 0, &bcm47xx_fixed_phy_status, -1);
|
||||
+ bcm47xx_register_gpio_watchdog();
|
||||
return 0;
|
||||
}
|
||||
device_initcall(bcm47xx_register_bus_complete);
|
||||
--- a/arch/mips/configs/bcm47xx_defconfig
|
||||
+++ b/arch/mips/configs/bcm47xx_defconfig
|
||||
@@ -66,6 +66,7 @@ CONFIG_HW_RANDOM=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_BCM47XX_WDT=y
|
||||
+CONFIG_GPIO_WDT=y
|
||||
CONFIG_SSB_DEBUG=y
|
||||
CONFIG_SSB_DRIVER_GIGE=y
|
||||
CONFIG_BCMA_DRIVER_GMAC_CMN=y
|
||||
--- a/drivers/ssb/embedded.c
|
||||
+++ b/drivers/ssb/embedded.c
|
||||
@@ -34,11 +34,36 @@ int ssb_watchdog_timer_set(struct ssb_bu
|
||||
}
|
||||
EXPORT_SYMBOL(ssb_watchdog_timer_set);
|
||||
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+#include <bcm47xx_board.h>
|
||||
+
|
||||
+static bool ssb_watchdog_supported(void)
|
||||
+{
|
||||
+ enum bcm47xx_board board = bcm47xx_board_get();
|
||||
+
|
||||
+ /* The Huawei E970 has a hardware watchdog using a GPIO */
|
||||
+ switch (board) {
|
||||
+ case BCM47XX_BOARD_HUAWEI_E970:
|
||||
+ return false;
|
||||
+ default:
|
||||
+ return true;
|
||||
+ }
|
||||
+}
|
||||
+#else
|
||||
+static bool ssb_watchdog_supported(void)
|
||||
+{
|
||||
+ return true;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
int ssb_watchdog_register(struct ssb_bus *bus)
|
||||
{
|
||||
struct bcm47xx_wdt wdt = {};
|
||||
struct platform_device *pdev;
|
||||
|
||||
+ if (!ssb_watchdog_supported())
|
||||
+ return 0;
|
||||
+
|
||||
if (ssb_chipco_available(&bus->chipco)) {
|
||||
wdt.driver_data = &bus->chipco;
|
||||
wdt.timer_set = ssb_chipco_watchdog_timer_set_wdt;
|
||||
@ -1,360 +0,0 @@
|
||||
This generic GPIO watchdog is used on Huawei E970 (bcm47xx)
|
||||
|
||||
Signed-off-by: Mathias Adam <m.adam--openwrt@adamis.de>
|
||||
|
||||
--- a/drivers/watchdog/Kconfig
|
||||
+++ b/drivers/watchdog/Kconfig
|
||||
@@ -1473,6 +1473,15 @@ config WDT_MTX1
|
||||
Hardware driver for the MTX-1 boards. This is a watchdog timer that
|
||||
will reboot the machine after a 100 seconds timer expired.
|
||||
|
||||
+config GPIO_WDT
|
||||
+ tristate "GPIO Hardware Watchdog"
|
||||
+ help
|
||||
+ Hardware driver for GPIO-controlled watchdogs. GPIO pin and
|
||||
+ toggle interval settings are platform-specific. The driver
|
||||
+ will stop toggling the GPIO (i.e. machine reboots) after a
|
||||
+ 100 second timer expired and no process has written to
|
||||
+ /dev/watchdog during that time.
|
||||
+
|
||||
config PNX833X_WDT
|
||||
tristate "PNX833x Hardware Watchdog"
|
||||
depends on SOC_PNX8335
|
||||
--- a/drivers/watchdog/Makefile
|
||||
+++ b/drivers/watchdog/Makefile
|
||||
@@ -163,6 +163,7 @@ obj-$(CONFIG_RC32434_WDT) += rc32434_wdt
|
||||
obj-$(CONFIG_INDYDOG) += indydog.o
|
||||
obj-$(CONFIG_JZ4740_WDT) += jz4740_wdt.o
|
||||
obj-$(CONFIG_WDT_MTX1) += mtx-1_wdt.o
|
||||
+obj-$(CONFIG_GPIO_WDT) += old_gpio_wdt.o
|
||||
obj-$(CONFIG_PNX833X_WDT) += pnx833x_wdt.o
|
||||
obj-$(CONFIG_SIBYTE_WDOG) += sb_wdog.o
|
||||
obj-$(CONFIG_AR7_WDT) += ar7_wdt.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/watchdog/old_gpio_wdt.c
|
||||
@@ -0,0 +1,301 @@
|
||||
+/*
|
||||
+ * Driver for GPIO-controlled Hardware Watchdogs.
|
||||
+ *
|
||||
+ * Copyright (C) 2013 Mathias Adam <m.adam--linux@adamis.de>
|
||||
+ *
|
||||
+ * Replaces mtx1_wdt (driver for the MTX-1 Watchdog):
|
||||
+ *
|
||||
+ * (C) Copyright 2005 4G Systems <info@4g-systems.biz>,
|
||||
+ * All Rights Reserved.
|
||||
+ * http://www.4g-systems.biz
|
||||
+ *
|
||||
+ * (C) Copyright 2007 OpenWrt.org, Florian Fainelli <florian@openwrt.org>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License
|
||||
+ * as published by the Free Software Foundation; either version
|
||||
+ * 2 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * Neither Michael Stickel nor 4G Systems admit liability nor provide
|
||||
+ * warranty for any of this software. This material is provided
|
||||
+ * "AS-IS" and at no charge.
|
||||
+ *
|
||||
+ * (c) Copyright 2005 4G Systems <info@4g-systems.biz>
|
||||
+ *
|
||||
+ * Release 0.01.
|
||||
+ * Author: Michael Stickel michael.stickel@4g-systems.biz
|
||||
+ *
|
||||
+ * Release 0.02.
|
||||
+ * Author: Florian Fainelli florian@openwrt.org
|
||||
+ * use the Linux watchdog/timer APIs
|
||||
+ *
|
||||
+ * Release 0.03.
|
||||
+ * Author: Mathias Adam <m.adam--linux@adamis.de>
|
||||
+ * make it a generic gpio watchdog driver
|
||||
+ *
|
||||
+ * The Watchdog is configured to reset the MTX-1
|
||||
+ * if it is not triggered for 100 seconds.
|
||||
+ * It should not be triggered more often than 1.6 seconds.
|
||||
+ *
|
||||
+ * A timer triggers the watchdog every 5 seconds, until
|
||||
+ * it is opened for the first time. After the first open
|
||||
+ * it MUST be triggered every 2..95 seconds.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/moduleparam.h>
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/errno.h>
|
||||
+#include <linux/miscdevice.h>
|
||||
+#include <linux/fs.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/ioport.h>
|
||||
+#include <linux/timer.h>
|
||||
+#include <linux/completion.h>
|
||||
+#include <linux/jiffies.h>
|
||||
+#include <linux/watchdog.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/io.h>
|
||||
+#include <linux/uaccess.h>
|
||||
+#include <linux/gpio.h>
|
||||
+#include <linux/old_gpio_wdt.h>
|
||||
+
|
||||
+static int ticks = 100 * HZ;
|
||||
+
|
||||
+static struct {
|
||||
+ struct completion stop;
|
||||
+ spinlock_t lock;
|
||||
+ int running;
|
||||
+ struct timer_list timer;
|
||||
+ int queue;
|
||||
+ int default_ticks;
|
||||
+ unsigned long inuse;
|
||||
+ unsigned gpio;
|
||||
+ unsigned int gstate;
|
||||
+ int interval;
|
||||
+ int first_interval;
|
||||
+} gpio_wdt_device;
|
||||
+
|
||||
+static void gpio_wdt_trigger(unsigned long unused)
|
||||
+{
|
||||
+ spin_lock(&gpio_wdt_device.lock);
|
||||
+ if (gpio_wdt_device.running && ticks > 0)
|
||||
+ ticks -= gpio_wdt_device.interval;
|
||||
+
|
||||
+ /* toggle wdt gpio */
|
||||
+ gpio_wdt_device.gstate = !gpio_wdt_device.gstate;
|
||||
+ gpio_set_value(gpio_wdt_device.gpio, gpio_wdt_device.gstate);
|
||||
+
|
||||
+ if (gpio_wdt_device.queue && ticks > 0)
|
||||
+ mod_timer(&gpio_wdt_device.timer, jiffies + gpio_wdt_device.interval);
|
||||
+ else
|
||||
+ complete(&gpio_wdt_device.stop);
|
||||
+ spin_unlock(&gpio_wdt_device.lock);
|
||||
+}
|
||||
+
|
||||
+static void gpio_wdt_reset(void)
|
||||
+{
|
||||
+ ticks = gpio_wdt_device.default_ticks;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void gpio_wdt_start(void)
|
||||
+{
|
||||
+ unsigned long flags;
|
||||
+
|
||||
+ spin_lock_irqsave(&gpio_wdt_device.lock, flags);
|
||||
+ if (!gpio_wdt_device.queue) {
|
||||
+ gpio_wdt_device.queue = 1;
|
||||
+ gpio_wdt_device.gstate = 1;
|
||||
+ gpio_set_value(gpio_wdt_device.gpio, 1);
|
||||
+ mod_timer(&gpio_wdt_device.timer, jiffies + gpio_wdt_device.first_interval);
|
||||
+ }
|
||||
+ gpio_wdt_device.running++;
|
||||
+ spin_unlock_irqrestore(&gpio_wdt_device.lock, flags);
|
||||
+}
|
||||
+
|
||||
+static int gpio_wdt_stop(void)
|
||||
+{
|
||||
+ unsigned long flags;
|
||||
+
|
||||
+ spin_lock_irqsave(&gpio_wdt_device.lock, flags);
|
||||
+ if (gpio_wdt_device.queue) {
|
||||
+ gpio_wdt_device.queue = 0;
|
||||
+ gpio_wdt_device.gstate = 0;
|
||||
+ gpio_set_value(gpio_wdt_device.gpio, 0);
|
||||
+ }
|
||||
+ ticks = gpio_wdt_device.default_ticks;
|
||||
+ spin_unlock_irqrestore(&gpio_wdt_device.lock, flags);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/* Filesystem functions */
|
||||
+
|
||||
+static int gpio_wdt_open(struct inode *inode, struct file *file)
|
||||
+{
|
||||
+ if (test_and_set_bit(0, &gpio_wdt_device.inuse))
|
||||
+ return -EBUSY;
|
||||
+ return nonseekable_open(inode, file);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int gpio_wdt_release(struct inode *inode, struct file *file)
|
||||
+{
|
||||
+ clear_bit(0, &gpio_wdt_device.inuse);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static long gpio_wdt_ioctl(struct file *file, unsigned int cmd,
|
||||
+ unsigned long arg)
|
||||
+{
|
||||
+ void __user *argp = (void __user *)arg;
|
||||
+ int __user *p = (int __user *)argp;
|
||||
+ unsigned int value;
|
||||
+ static const struct watchdog_info ident = {
|
||||
+ .options = WDIOF_CARDRESET,
|
||||
+ .identity = "GPIO WDT",
|
||||
+ };
|
||||
+
|
||||
+ switch (cmd) {
|
||||
+ case WDIOC_GETSUPPORT:
|
||||
+ if (copy_to_user(argp, &ident, sizeof(ident)))
|
||||
+ return -EFAULT;
|
||||
+ break;
|
||||
+ case WDIOC_GETSTATUS:
|
||||
+ case WDIOC_GETBOOTSTATUS:
|
||||
+ put_user(0, p);
|
||||
+ break;
|
||||
+ case WDIOC_SETOPTIONS:
|
||||
+ if (get_user(value, p))
|
||||
+ return -EFAULT;
|
||||
+ if (value & WDIOS_ENABLECARD)
|
||||
+ gpio_wdt_start();
|
||||
+ else if (value & WDIOS_DISABLECARD)
|
||||
+ gpio_wdt_stop();
|
||||
+ else
|
||||
+ return -EINVAL;
|
||||
+ return 0;
|
||||
+ case WDIOC_KEEPALIVE:
|
||||
+ gpio_wdt_reset();
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -ENOTTY;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static ssize_t gpio_wdt_write(struct file *file, const char *buf,
|
||||
+ size_t count, loff_t *ppos)
|
||||
+{
|
||||
+ if (!count)
|
||||
+ return -EIO;
|
||||
+ gpio_wdt_reset();
|
||||
+ return count;
|
||||
+}
|
||||
+
|
||||
+static const struct file_operations gpio_wdt_fops = {
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .llseek = no_llseek,
|
||||
+ .unlocked_ioctl = gpio_wdt_ioctl,
|
||||
+ .open = gpio_wdt_open,
|
||||
+ .write = gpio_wdt_write,
|
||||
+ .release = gpio_wdt_release,
|
||||
+};
|
||||
+
|
||||
+
|
||||
+static struct miscdevice gpio_wdt_misc = {
|
||||
+ .minor = WATCHDOG_MINOR,
|
||||
+ .name = "watchdog",
|
||||
+ .fops = &gpio_wdt_fops,
|
||||
+};
|
||||
+
|
||||
+
|
||||
+static int gpio_wdt_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ int ret;
|
||||
+ struct gpio_wdt_platform_data *gpio_wdt_data = pdev->dev.platform_data;
|
||||
+
|
||||
+ gpio_wdt_device.gpio = gpio_wdt_data->gpio;
|
||||
+ gpio_wdt_device.interval = gpio_wdt_data->interval;
|
||||
+ gpio_wdt_device.first_interval = gpio_wdt_data->first_interval;
|
||||
+ if (gpio_wdt_device.first_interval <= 0) {
|
||||
+ gpio_wdt_device.first_interval = gpio_wdt_device.interval;
|
||||
+ }
|
||||
+
|
||||
+ ret = gpio_request(gpio_wdt_device.gpio, "gpio-wdt");
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(&pdev->dev, "failed to request gpio");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ spin_lock_init(&gpio_wdt_device.lock);
|
||||
+ init_completion(&gpio_wdt_device.stop);
|
||||
+ gpio_wdt_device.queue = 0;
|
||||
+ clear_bit(0, &gpio_wdt_device.inuse);
|
||||
+ setup_timer(&gpio_wdt_device.timer, gpio_wdt_trigger, 0L);
|
||||
+ gpio_wdt_device.default_ticks = ticks;
|
||||
+
|
||||
+ gpio_wdt_start();
|
||||
+ dev_info(&pdev->dev, "GPIO Hardware Watchdog driver (gpio=%i interval=%i/%i)\n",
|
||||
+ gpio_wdt_data->gpio, gpio_wdt_data->first_interval, gpio_wdt_data->interval);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int gpio_wdt_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ /* FIXME: do we need to lock this test ? */
|
||||
+ if (gpio_wdt_device.queue) {
|
||||
+ gpio_wdt_device.queue = 0;
|
||||
+ wait_for_completion(&gpio_wdt_device.stop);
|
||||
+ }
|
||||
+
|
||||
+ gpio_free(gpio_wdt_device.gpio);
|
||||
+ misc_deregister(&gpio_wdt_misc);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct platform_driver gpio_wdt_driver = {
|
||||
+ .probe = gpio_wdt_probe,
|
||||
+ .remove = gpio_wdt_remove,
|
||||
+ .driver.name = "gpio-wdt",
|
||||
+ .driver.owner = THIS_MODULE,
|
||||
+};
|
||||
+
|
||||
+static int __init gpio_wdt_init(void)
|
||||
+{
|
||||
+ return platform_driver_register(&gpio_wdt_driver);
|
||||
+}
|
||||
+arch_initcall(gpio_wdt_init);
|
||||
+
|
||||
+/*
|
||||
+ * We do wdt initialization in two steps: arch_initcall probes the wdt
|
||||
+ * very early to start pinging the watchdog (misc devices are not yet
|
||||
+ * available), and later module_init() just registers the misc device.
|
||||
+ */
|
||||
+static int gpio_wdt_init_late(void)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = misc_register(&gpio_wdt_misc);
|
||||
+ if (ret < 0) {
|
||||
+ pr_err("GPIO_WDT: failed to register misc device\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+#ifndef MODULE
|
||||
+module_init(gpio_wdt_init_late);
|
||||
+#endif
|
||||
+
|
||||
+static void __exit gpio_wdt_exit(void)
|
||||
+{
|
||||
+ platform_driver_unregister(&gpio_wdt_driver);
|
||||
+}
|
||||
+module_exit(gpio_wdt_exit);
|
||||
+
|
||||
+MODULE_AUTHOR("Michael Stickel, Florian Fainelli, Mathias Adam");
|
||||
+MODULE_DESCRIPTION("Driver for GPIO hardware watchdogs");
|
||||
+MODULE_LICENSE("GPL");
|
||||
+MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
|
||||
+MODULE_ALIAS("platform:gpio-wdt");
|
||||
--- /dev/null
|
||||
+++ b/include/linux/old_gpio_wdt.h
|
||||
@@ -0,0 +1,21 @@
|
||||
+/*
|
||||
+ * Definitions for the GPIO watchdog driver
|
||||
+ *
|
||||
+ * Copyright (C) 2013 Mathias Adam <m.adam--linux@adamis.de>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#ifndef _GPIO_WDT_H_
|
||||
+#define _GPIO_WDT_H_
|
||||
+
|
||||
+struct gpio_wdt_platform_data {
|
||||
+ int gpio; /* GPIO line number */
|
||||
+ int interval; /* watchdog reset interval in system ticks */
|
||||
+ int first_interval; /* first wd reset interval in system ticks */
|
||||
+};
|
||||
+
|
||||
+#endif /* _GPIO_WDT_H_ */
|
||||
@ -1,30 +0,0 @@
|
||||
From 5c81397a0147ea59c778d1de14ef54e2268221f6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Date: Wed, 8 Apr 2015 06:58:11 +0200
|
||||
Subject: [PATCH] ssb: reject PCI writes setting CardBus bridge resources
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
If SoC has a CardBus we can set resources of device at slot 1 only. It's
|
||||
impossigle to set bridge resources as it simply overwrites device 1
|
||||
configuration and usually results in Data bus error-s.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
---
|
||||
drivers/ssb/driver_pcicore.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/drivers/ssb/driver_pcicore.c
|
||||
+++ b/drivers/ssb/driver_pcicore.c
|
||||
@@ -164,6 +164,10 @@ static int ssb_extpci_write_config(struc
|
||||
SSB_WARN_ON(!pc->hostmode);
|
||||
if (unlikely(len != 1 && len != 2 && len != 4))
|
||||
goto out;
|
||||
+ /* CardBus SoCs allow configuring dev 1 resources only */
|
||||
+ if (extpci_core->cardbusmode && dev != 1 &&
|
||||
+ off >= PCI_BASE_ADDRESS_0 && off <= PCI_BASE_ADDRESS_5)
|
||||
+ goto out;
|
||||
addr = get_cfgspace_addr(pc, bus, dev, func, off);
|
||||
if (unlikely(!addr))
|
||||
goto out;
|
||||
@ -1,233 +0,0 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Date: Fri, 18 Dec 2015 07:51:08 +0100
|
||||
Subject: [PATCH] Revert "bcma: switch GPIO portions to use GPIOLIB_IRQCHIP"
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This reverts commit 74f4e0cc61080f63f28e8d519bdf437957e64217.
|
||||
|
||||
On BCM47XX (MIPS) bcma_bus_get_host_dev returns NULL which results in:
|
||||
[ 0.157054] missing gpiochip .dev parent pointer
|
||||
[ 0.157287] bcma: bus0: Error registering GPIO driver: -22
|
||||
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
---
|
||||
drivers/bcma/Kconfig | 2 +-
|
||||
drivers/bcma/driver_gpio.c | 92 +++++++++++++++++++----------
|
||||
include/linux/bcma/bcma_driver_chipcommon.h | 1 +
|
||||
3 files changed, 64 insertions(+), 31 deletions(-)
|
||||
|
||||
--- a/drivers/bcma/Kconfig
|
||||
+++ b/drivers/bcma/Kconfig
|
||||
@@ -104,7 +104,7 @@ config BCMA_DRIVER_GMAC_CMN
|
||||
config BCMA_DRIVER_GPIO
|
||||
bool "BCMA GPIO driver"
|
||||
depends on BCMA && GPIOLIB
|
||||
- select GPIOLIB_IRQCHIP if BCMA_HOST_SOC
|
||||
+ select IRQ_DOMAIN if BCMA_HOST_SOC
|
||||
help
|
||||
Driver to provide access to the GPIO pins of the bcma bus.
|
||||
|
||||
--- a/drivers/bcma/driver_gpio.c
|
||||
+++ b/drivers/bcma/driver_gpio.c
|
||||
@@ -8,8 +8,10 @@
|
||||
* Licensed under the GNU/GPL. See COPYING for details.
|
||||
*/
|
||||
|
||||
-#include <linux/gpio/driver.h>
|
||||
+#include <linux/gpio.h>
|
||||
+#include <linux/irq.h>
|
||||
#include <linux/interrupt.h>
|
||||
+#include <linux/irqdomain.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/bcma/bcma.h>
|
||||
|
||||
@@ -72,11 +74,19 @@ static void bcma_gpio_free(struct gpio_c
|
||||
}
|
||||
|
||||
#if IS_BUILTIN(CONFIG_BCM47XX) || IS_BUILTIN(CONFIG_ARCH_BCM_5301X)
|
||||
+static int bcma_gpio_to_irq(struct gpio_chip *chip, unsigned gpio)
|
||||
+{
|
||||
+ struct bcma_drv_cc *cc = gpiochip_get_data(chip);
|
||||
+
|
||||
+ if (cc->core->bus->hosttype == BCMA_HOSTTYPE_SOC)
|
||||
+ return irq_find_mapping(cc->irq_domain, gpio);
|
||||
+ else
|
||||
+ return -EINVAL;
|
||||
+}
|
||||
|
||||
static void bcma_gpio_irq_unmask(struct irq_data *d)
|
||||
{
|
||||
- struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
- struct bcma_drv_cc *cc = gpiochip_get_data(gc);
|
||||
+ struct bcma_drv_cc *cc = irq_data_get_irq_chip_data(d);
|
||||
int gpio = irqd_to_hwirq(d);
|
||||
u32 val = bcma_chipco_gpio_in(cc, BIT(gpio));
|
||||
|
||||
@@ -86,8 +96,7 @@ static void bcma_gpio_irq_unmask(struct
|
||||
|
||||
static void bcma_gpio_irq_mask(struct irq_data *d)
|
||||
{
|
||||
- struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
- struct bcma_drv_cc *cc = gpiochip_get_data(gc);
|
||||
+ struct bcma_drv_cc *cc = irq_data_get_irq_chip_data(d);
|
||||
int gpio = irqd_to_hwirq(d);
|
||||
|
||||
bcma_chipco_gpio_intmask(cc, BIT(gpio), 0);
|
||||
@@ -102,7 +111,6 @@ static struct irq_chip bcma_gpio_irq_chi
|
||||
static irqreturn_t bcma_gpio_irq_handler(int irq, void *dev_id)
|
||||
{
|
||||
struct bcma_drv_cc *cc = dev_id;
|
||||
- struct gpio_chip *gc = &cc->gpio;
|
||||
u32 val = bcma_cc_read32(cc, BCMA_CC_GPIOIN);
|
||||
u32 mask = bcma_cc_read32(cc, BCMA_CC_GPIOIRQ);
|
||||
u32 pol = bcma_cc_read32(cc, BCMA_CC_GPIOPOL);
|
||||
@@ -112,58 +120,81 @@ static irqreturn_t bcma_gpio_irq_handler
|
||||
if (!irqs)
|
||||
return IRQ_NONE;
|
||||
|
||||
- for_each_set_bit(gpio, &irqs, gc->ngpio)
|
||||
- generic_handle_irq(irq_find_mapping(gc->irqdomain, gpio));
|
||||
+ for_each_set_bit(gpio, &irqs, cc->gpio.ngpio)
|
||||
+ generic_handle_irq(bcma_gpio_to_irq(&cc->gpio, gpio));
|
||||
bcma_chipco_gpio_polarity(cc, irqs, val & irqs);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
-static int bcma_gpio_irq_init(struct bcma_drv_cc *cc)
|
||||
+static int bcma_gpio_irq_domain_init(struct bcma_drv_cc *cc)
|
||||
{
|
||||
struct gpio_chip *chip = &cc->gpio;
|
||||
- int hwirq, err;
|
||||
+ int gpio, hwirq, err;
|
||||
|
||||
if (cc->core->bus->hosttype != BCMA_HOSTTYPE_SOC)
|
||||
return 0;
|
||||
|
||||
+ cc->irq_domain = irq_domain_add_linear(NULL, chip->ngpio,
|
||||
+ &irq_domain_simple_ops, cc);
|
||||
+ if (!cc->irq_domain) {
|
||||
+ err = -ENODEV;
|
||||
+ goto err_irq_domain;
|
||||
+ }
|
||||
+ for (gpio = 0; gpio < chip->ngpio; gpio++) {
|
||||
+ int irq = irq_create_mapping(cc->irq_domain, gpio);
|
||||
+
|
||||
+ irq_set_chip_data(irq, cc);
|
||||
+ irq_set_chip_and_handler(irq, &bcma_gpio_irq_chip,
|
||||
+ handle_simple_irq);
|
||||
+ }
|
||||
+
|
||||
hwirq = bcma_core_irq(cc->core, 0);
|
||||
err = request_irq(hwirq, bcma_gpio_irq_handler, IRQF_SHARED, "gpio",
|
||||
cc);
|
||||
if (err)
|
||||
- return err;
|
||||
+ goto err_req_irq;
|
||||
|
||||
bcma_chipco_gpio_intmask(cc, ~0, 0);
|
||||
bcma_cc_set32(cc, BCMA_CC_IRQMASK, BCMA_CC_IRQ_GPIO);
|
||||
|
||||
- err = gpiochip_irqchip_add(chip,
|
||||
- &bcma_gpio_irq_chip,
|
||||
- 0,
|
||||
- handle_simple_irq,
|
||||
- IRQ_TYPE_NONE);
|
||||
- if (err) {
|
||||
- free_irq(hwirq, cc);
|
||||
- return err;
|
||||
- }
|
||||
-
|
||||
return 0;
|
||||
+
|
||||
+err_req_irq:
|
||||
+ for (gpio = 0; gpio < chip->ngpio; gpio++) {
|
||||
+ int irq = irq_find_mapping(cc->irq_domain, gpio);
|
||||
+
|
||||
+ irq_dispose_mapping(irq);
|
||||
+ }
|
||||
+ irq_domain_remove(cc->irq_domain);
|
||||
+err_irq_domain:
|
||||
+ return err;
|
||||
}
|
||||
|
||||
-static void bcma_gpio_irq_exit(struct bcma_drv_cc *cc)
|
||||
+static void bcma_gpio_irq_domain_exit(struct bcma_drv_cc *cc)
|
||||
{
|
||||
+ struct gpio_chip *chip = &cc->gpio;
|
||||
+ int gpio;
|
||||
+
|
||||
if (cc->core->bus->hosttype != BCMA_HOSTTYPE_SOC)
|
||||
return;
|
||||
|
||||
bcma_cc_mask32(cc, BCMA_CC_IRQMASK, ~BCMA_CC_IRQ_GPIO);
|
||||
free_irq(bcma_core_irq(cc->core, 0), cc);
|
||||
+ for (gpio = 0; gpio < chip->ngpio; gpio++) {
|
||||
+ int irq = irq_find_mapping(cc->irq_domain, gpio);
|
||||
+
|
||||
+ irq_dispose_mapping(irq);
|
||||
+ }
|
||||
+ irq_domain_remove(cc->irq_domain);
|
||||
}
|
||||
#else
|
||||
-static int bcma_gpio_irq_init(struct bcma_drv_cc *cc)
|
||||
+static int bcma_gpio_irq_domain_init(struct bcma_drv_cc *cc)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static void bcma_gpio_irq_exit(struct bcma_drv_cc *cc)
|
||||
+static void bcma_gpio_irq_domain_exit(struct bcma_drv_cc *cc)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
@@ -182,8 +213,9 @@ int bcma_gpio_init(struct bcma_drv_cc *c
|
||||
chip->set = bcma_gpio_set_value;
|
||||
chip->direction_input = bcma_gpio_direction_input;
|
||||
chip->direction_output = bcma_gpio_direction_output;
|
||||
- chip->owner = THIS_MODULE;
|
||||
- chip->parent = bus->dev;
|
||||
+#if IS_BUILTIN(CONFIG_BCM47XX) || IS_BUILTIN(CONFIG_ARCH_BCM_5301X)
|
||||
+ chip->to_irq = bcma_gpio_to_irq;
|
||||
+#endif
|
||||
#if IS_BUILTIN(CONFIG_OF)
|
||||
chip->of_node = cc->core->dev.of_node;
|
||||
#endif
|
||||
@@ -212,13 +244,13 @@ int bcma_gpio_init(struct bcma_drv_cc *c
|
||||
else
|
||||
chip->base = -1;
|
||||
|
||||
- err = gpiochip_add_data(chip, cc);
|
||||
+ err = bcma_gpio_irq_domain_init(cc);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
- err = bcma_gpio_irq_init(cc);
|
||||
+ err = gpiochip_add_data(chip, cc);
|
||||
if (err) {
|
||||
- gpiochip_remove(chip);
|
||||
+ bcma_gpio_irq_domain_exit(cc);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -227,7 +259,7 @@ int bcma_gpio_init(struct bcma_drv_cc *c
|
||||
|
||||
int bcma_gpio_unregister(struct bcma_drv_cc *cc)
|
||||
{
|
||||
- bcma_gpio_irq_exit(cc);
|
||||
+ bcma_gpio_irq_domain_exit(cc);
|
||||
gpiochip_remove(&cc->gpio);
|
||||
return 0;
|
||||
}
|
||||
--- a/include/linux/bcma/bcma_driver_chipcommon.h
|
||||
+++ b/include/linux/bcma/bcma_driver_chipcommon.h
|
||||
@@ -645,6 +645,7 @@ struct bcma_drv_cc {
|
||||
spinlock_t gpio_lock;
|
||||
#ifdef CONFIG_BCMA_DRIVER_GPIO
|
||||
struct gpio_chip gpio;
|
||||
+ struct irq_domain *irq_domain;
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -1,46 +0,0 @@
|
||||
--- a/drivers/pcmcia/yenta_socket.c
|
||||
+++ b/drivers/pcmcia/yenta_socket.c
|
||||
@@ -920,6 +920,8 @@ static unsigned int yenta_probe_irq(stru
|
||||
* Probe for usable interrupts using the force
|
||||
* register to generate bogus card status events.
|
||||
*/
|
||||
+#ifndef CONFIG_BCM47XX
|
||||
+ /* WRT54G3G does not like this */
|
||||
cb_writel(socket, CB_SOCKET_EVENT, -1);
|
||||
cb_writel(socket, CB_SOCKET_MASK, CB_CSTSMASK);
|
||||
reg = exca_readb(socket, I365_CSCINT);
|
||||
@@ -935,6 +937,7 @@ static unsigned int yenta_probe_irq(stru
|
||||
}
|
||||
cb_writel(socket, CB_SOCKET_MASK, 0);
|
||||
exca_writeb(socket, I365_CSCINT, reg);
|
||||
+#endif
|
||||
|
||||
mask = probe_irq_mask(val) & 0xffff;
|
||||
|
||||
@@ -1019,6 +1022,10 @@ static void yenta_get_socket_capabilitie
|
||||
else
|
||||
socket->socket.irq_mask = 0;
|
||||
|
||||
+ /* irq mask probing is broken for the WRT54G3G */
|
||||
+ if (socket->socket.irq_mask == 0)
|
||||
+ socket->socket.irq_mask = 0x6f8;
|
||||
+
|
||||
dev_info(&socket->dev->dev, "ISA IRQ mask 0x%04x, PCI irq %d\n",
|
||||
socket->socket.irq_mask, socket->cb_irq);
|
||||
}
|
||||
@@ -1251,6 +1258,15 @@ static int yenta_probe(struct pci_dev *d
|
||||
dev_info(&dev->dev, "Socket status: %08x\n",
|
||||
cb_readl(socket, CB_SOCKET_STATE));
|
||||
|
||||
+ /* Generate an interrupt on card insert/remove */
|
||||
+ config_writew(socket, CB_SOCKET_MASK, CB_CSTSMASK | CB_CDMASK);
|
||||
+
|
||||
+ /* Set up Multifunction Routing Status Register */
|
||||
+ config_writew(socket, 0x8C, 0x1000 /* MFUNC3 to GPIO3 */ | 0x2 /* MFUNC0 to INTA */);
|
||||
+
|
||||
+ /* Switch interrupts to parallelized */
|
||||
+ config_writeb(socket, 0x92, 0x64);
|
||||
+
|
||||
yenta_fixup_parent_bridge(dev->subordinate);
|
||||
|
||||
/* Register it with the pcmcia layer.. */
|
||||
@ -1,11 +0,0 @@
|
||||
--- a/drivers/ssb/driver_pcicore.c
|
||||
+++ b/drivers/ssb/driver_pcicore.c
|
||||
@@ -389,7 +389,7 @@ static void ssb_pcicore_init_hostmode(st
|
||||
set_io_port_base(ssb_pcicore_controller.io_map_base);
|
||||
/* Give some time to the PCI controller to configure itself with the new
|
||||
* values. Not waiting at this point causes crashes of the machine. */
|
||||
- mdelay(10);
|
||||
+ mdelay(300);
|
||||
register_pci_controller(&ssb_pcicore_controller);
|
||||
}
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
--- a/drivers/firmware/broadcom/bcm47xx_nvram.c
|
||||
+++ b/drivers/firmware/broadcom/bcm47xx_nvram.c
|
||||
@@ -34,7 +34,8 @@ struct nvram_header {
|
||||
u32 config_ncdl; /* ncdl values for memc */
|
||||
};
|
||||
|
||||
-static char nvram_buf[NVRAM_SPACE];
|
||||
+char nvram_buf[NVRAM_SPACE];
|
||||
+EXPORT_SYMBOL(nvram_buf);
|
||||
static size_t nvram_len;
|
||||
static const u32 nvram_sizes[] = {0x6000, 0x8000, 0xF000, 0x10000};
|
||||
static int cfe_env;
|
||||
--- a/arch/mips/mm/cache.c
|
||||
+++ b/arch/mips/mm/cache.c
|
||||
@@ -64,6 +64,7 @@ void (*_dma_cache_wback)(unsigned long s
|
||||
void (*_dma_cache_inv)(unsigned long start, unsigned long size);
|
||||
|
||||
EXPORT_SYMBOL(_dma_cache_wback_inv);
|
||||
+EXPORT_SYMBOL(_dma_cache_inv);
|
||||
|
||||
#endif /* CONFIG_DMA_NONCOHERENT || CONFIG_DMA_MAYBE_COHERENT */
|
||||
|
||||
@ -1,363 +0,0 @@
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
CONFIG_ARCH_BCM=y
|
||||
CONFIG_ARCH_BCM_5301X=y
|
||||
CONFIG_ARCH_BCM_53573=y
|
||||
CONFIG_ARCH_BCM_IPROC=y
|
||||
CONFIG_ARCH_CLOCKSOURCE_DATA=y
|
||||
CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
|
||||
CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
|
||||
CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
|
||||
CONFIG_ARCH_HAS_SET_MEMORY=y
|
||||
CONFIG_ARCH_HAS_SG_CHAIN=y
|
||||
CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
|
||||
CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
|
||||
CONFIG_ARCH_HAS_TICK_BROADCAST=y
|
||||
CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
CONFIG_ARCH_MULTIPLATFORM=y
|
||||
# CONFIG_ARCH_MULTI_CPU_AUTO is not set
|
||||
CONFIG_ARCH_MULTI_V6_V7=y
|
||||
CONFIG_ARCH_MULTI_V7=y
|
||||
CONFIG_ARCH_NR_GPIO=0
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
|
||||
# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
|
||||
# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
|
||||
CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
|
||||
CONFIG_ARCH_SUPPORTS_UPROBES=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
|
||||
CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
|
||||
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
|
||||
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_ARM_APPENDED_DTB=y
|
||||
CONFIG_ARM_ARCH_TIMER=y
|
||||
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
|
||||
# CONFIG_ARM_ATAG_DTB_COMPAT is not set
|
||||
# CONFIG_ARM_CPU_SUSPEND is not set
|
||||
CONFIG_ARM_ERRATA_754322=y
|
||||
CONFIG_ARM_ERRATA_764369=y
|
||||
CONFIG_ARM_ERRATA_775420=y
|
||||
CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_GLOBAL_TIMER=y
|
||||
CONFIG_ARM_HAS_SG_CHAIN=y
|
||||
CONFIG_ARM_HEAVY_MB=y
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=6
|
||||
CONFIG_ARM_L1_CACHE_SHIFT_6=y
|
||||
# CONFIG_ARM_LPAE is not set
|
||||
CONFIG_ARM_PATCH_IDIV=y
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
# CONFIG_ARM_SP805_WATCHDOG is not set
|
||||
CONFIG_ARM_THUMB=y
|
||||
# CONFIG_ARM_THUMBEE is not set
|
||||
CONFIG_ARM_VIRT_EXT=y
|
||||
CONFIG_ATAGS=y
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
CONFIG_BCM47XX_NVRAM=y
|
||||
CONFIG_BCM47XX_SPROM=y
|
||||
CONFIG_BCM47XX_WDT=y
|
||||
CONFIG_BCMA=y
|
||||
CONFIG_BCMA_BLOCKIO=y
|
||||
CONFIG_BCMA_DEBUG=y
|
||||
CONFIG_BCMA_DRIVER_GMAC_CMN=y
|
||||
CONFIG_BCMA_DRIVER_GPIO=y
|
||||
CONFIG_BCMA_DRIVER_PCI=y
|
||||
CONFIG_BCMA_HOST_PCI=y
|
||||
CONFIG_BCMA_HOST_PCI_POSSIBLE=y
|
||||
CONFIG_BCMA_HOST_SOC=y
|
||||
CONFIG_BCMA_SFLASH=y
|
||||
CONFIG_BCM_NET_PHYLIB=y
|
||||
CONFIG_BCM_NS_THERMAL=y
|
||||
CONFIG_BGMAC=y
|
||||
CONFIG_BGMAC_BCMA=y
|
||||
# CONFIG_BGMAC_PLATFORM is not set
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BOUNCE=y
|
||||
CONFIG_BROADCOM_PHY=y
|
||||
CONFIG_CACHE_L2X0=y
|
||||
CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK=y
|
||||
CONFIG_CLKSRC_MMIO=y
|
||||
# CONFIG_CLK_BCM_NS2 is not set
|
||||
CONFIG_CLK_BCM_NSP=y
|
||||
# CONFIG_CLK_BCM_SR is not set
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_IPROC=y
|
||||
CONFIG_CPU_32v6K=y
|
||||
CONFIG_CPU_32v7=y
|
||||
CONFIG_CPU_ABRT_EV7=y
|
||||
# CONFIG_CPU_BPREDICT_DISABLE is not set
|
||||
CONFIG_CPU_CACHE_V7=y
|
||||
CONFIG_CPU_CACHE_VIPT=y
|
||||
CONFIG_CPU_COPY_V6=y
|
||||
CONFIG_CPU_CP15=y
|
||||
CONFIG_CPU_CP15_MMU=y
|
||||
CONFIG_CPU_HAS_ASID=y
|
||||
# CONFIG_CPU_ICACHE_DISABLE is not set
|
||||
CONFIG_CPU_PABRT_V7=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CPU_THUMB_CAPABLE=y
|
||||
CONFIG_CPU_TLB_V7=y
|
||||
CONFIG_CPU_V7=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_ACOMP2=y
|
||||
CONFIG_CRYPTO_AEAD=y
|
||||
CONFIG_CRYPTO_AEAD2=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_HASH2=y
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_MANAGER=y
|
||||
CONFIG_CRYPTO_MANAGER2=y
|
||||
CONFIG_CRYPTO_NULL2=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_WORKQUEUE=y
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_DEBUG_BCM_5301X=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_LL=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="debug/8250.S"
|
||||
CONFIG_DEBUG_UART_8250=y
|
||||
# CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set
|
||||
CONFIG_DEBUG_UART_8250_SHIFT=0
|
||||
CONFIG_DEBUG_UART_PHYS=0x18000300
|
||||
CONFIG_DEBUG_UART_VIRT=0xf1000300
|
||||
CONFIG_DEBUG_UNCOMPRESS=y
|
||||
CONFIG_DEBUG_USER=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_EXTCON=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_FRAME_POINTER=y
|
||||
# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_ARCH_TOPOLOGY=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IO=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
||||
CONFIG_GENERIC_STRNLEN_USER=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_74X164=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
# CONFIG_GRO_CELLS is not set
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDEN_BRANCH_PREDICTOR=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set
|
||||
CONFIG_HAVE_ARCH_AUDITSYSCALL=y
|
||||
CONFIG_HAVE_ARCH_BITREVERSE=y
|
||||
CONFIG_HAVE_ARCH_JUMP_LABEL=y
|
||||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
CONFIG_HAVE_ARCH_PFN_VALID=y
|
||||
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
|
||||
CONFIG_HAVE_ARCH_TRACEHOOK=y
|
||||
CONFIG_HAVE_ARM_ARCH_TIMER=y
|
||||
CONFIG_HAVE_ARM_SCU=y
|
||||
CONFIG_HAVE_ARM_SMCCC=y
|
||||
CONFIG_HAVE_ARM_TWD=y
|
||||
# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
|
||||
CONFIG_HAVE_CC_STACKPROTECTOR=y
|
||||
CONFIG_HAVE_CLK=y
|
||||
CONFIG_HAVE_CLK_PREPARE=y
|
||||
CONFIG_HAVE_CONTEXT_TRACKING=y
|
||||
CONFIG_HAVE_C_RECORDMCOUNT=y
|
||||
CONFIG_HAVE_DEBUG_KMEMLEAK=y
|
||||
CONFIG_HAVE_DMA_API_DEBUG=y
|
||||
CONFIG_HAVE_DMA_CONTIGUOUS=y
|
||||
CONFIG_HAVE_DYNAMIC_FTRACE=y
|
||||
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y
|
||||
CONFIG_HAVE_EBPF_JIT=y
|
||||
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
|
||||
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
|
||||
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACER=y
|
||||
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
|
||||
CONFIG_HAVE_IDE=y
|
||||
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
|
||||
CONFIG_HAVE_MEMBLOCK=y
|
||||
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
|
||||
CONFIG_HAVE_NET_DSA=y
|
||||
CONFIG_HAVE_OPROFILE=y
|
||||
CONFIG_HAVE_OPTPROBES=y
|
||||
CONFIG_HAVE_PERF_EVENTS=y
|
||||
CONFIG_HAVE_PERF_REGS=y
|
||||
CONFIG_HAVE_PERF_USER_STACK_DUMP=y
|
||||
CONFIG_HAVE_PROC_CPU=y
|
||||
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
|
||||
CONFIG_HAVE_SMP=y
|
||||
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
|
||||
CONFIG_HAVE_UID16=y
|
||||
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
|
||||
CONFIG_HIGHMEM=y
|
||||
# CONFIG_HIGHPTE is not set
|
||||
CONFIG_HZ_FIXED=0
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IOMMU_HELPER=y
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_DOMAIN_HIERARCHY=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_SPIN_ON_OWNER=y
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MDIO_BCM_IPROC=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_BUS_MUX=y
|
||||
# CONFIG_MDIO_BUS_MUX_BCM_IPROC is not set
|
||||
CONFIG_MDIO_BUS_MUX_MMIOREG=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
|
||||
CONFIG_MIGHT_HAVE_PCI=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MTD_BCM47XXSFLASH=y
|
||||
CONFIG_MTD_BCM47XX_PARTS=y
|
||||
CONFIG_MTD_M25P80=y
|
||||
CONFIG_MTD_NAND=y
|
||||
CONFIG_MTD_NAND_BRCMNAND=y
|
||||
CONFIG_MTD_NAND_ECC=y
|
||||
CONFIG_MTD_PARSER_TRX=y
|
||||
# CONFIG_MTD_PHYSMAP_OF is not set
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPLIT_SEAMA_FW=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BEB_LIMIT=20
|
||||
CONFIG_MTD_UBI_BLOCK=y
|
||||
# CONFIG_MTD_UBI_FASTMAP is not set
|
||||
# CONFIG_MTD_UBI_GLUEBI is not set
|
||||
CONFIG_MTD_UBI_WL_THRESHOLD=4096
|
||||
CONFIG_MULTI_IRQ_HANDLER=y
|
||||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NO_BOOTMEM=y
|
||||
CONFIG_NR_CPUS=2
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_ADDRESS_PCI=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OF_NET=y
|
||||
CONFIG_OF_PCI=y
|
||||
CONFIG_OF_PCI_IRQ=y
|
||||
CONFIG_OF_RESERVED_MEM=y
|
||||
CONFIG_OLD_SIGACTION=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_OUTER_CACHE=y
|
||||
CONFIG_OUTER_CACHE_SYNC=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PAGE_OFFSET=0xC0000000
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIE_IPROC=y
|
||||
CONFIG_PCIE_IPROC_BCMA=y
|
||||
# CONFIG_PCIE_IPROC_PLATFORM is not set
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
# CONFIG_PHY_BCM_NS_USB2 is not set
|
||||
# CONFIG_PHY_BCM_NS_USB3 is not set
|
||||
# CONFIG_PHY_BRCM_SATA is not set
|
||||
# CONFIG_PHY_NS2_USB_DRD is not set
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_IPROC_GPIO is not set
|
||||
CONFIG_PINCTRL_NS=y
|
||||
# CONFIG_PINCTRL_NS2_MUX is not set
|
||||
# CONFIG_PL310_ERRATA_588369 is not set
|
||||
# CONFIG_PL310_ERRATA_727915 is not set
|
||||
# CONFIG_PL310_ERRATA_753970 is not set
|
||||
# CONFIG_PL310_ERRATA_769419 is not set
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_RCU_NEED_SEGCBLIST=y
|
||||
CONFIG_RCU_STALL_COMMON=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RPS=y
|
||||
CONFIG_RWSEM_SPIN_ON_OWNER=y
|
||||
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
|
||||
# CONFIG_SCHED_INFO is not set
|
||||
# CONFIG_SCSI_DMA is not set
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
# CONFIG_SERIAL_AMBA_PL011 is not set
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_ON_UP=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SPI=y
|
||||
# CONFIG_SPI_BCM53XX is not set
|
||||
CONFIG_SPI_BCM_QSPI=y
|
||||
CONFIG_SPI_BITBANG=y
|
||||
CONFIG_SPI_GPIO=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_SWCONFIG=y
|
||||
CONFIG_SWCONFIG_B53=y
|
||||
# CONFIG_SWCONFIG_B53_MMAP_DRIVER is not set
|
||||
CONFIG_SWCONFIG_B53_PHY_DRIVER=y
|
||||
CONFIG_SWCONFIG_B53_PHY_FIXUP=y
|
||||
CONFIG_SWCONFIG_B53_SRAB_DRIVER=y
|
||||
CONFIG_SWIOTLB=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SWP_EMULATE=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
|
||||
CONFIG_THERMAL_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
# CONFIG_THUMB2_KERNEL is not set
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
|
||||
CONFIG_UBIFS_FS_LZO=y
|
||||
CONFIG_UBIFS_FS_ZLIB=y
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_VECTORS_BASE=0xffff0000
|
||||
# CONFIG_VFP is not set
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
CONFIG_XZ_DEC_BCJ=y
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
@ -1,30 +0,0 @@
|
||||
From 2460266f21f140936e627f28f28d1a4f30887ae9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Fri, 6 Oct 2017 10:52:35 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Specify USB ports for USB LED of Luxul
|
||||
XWR-1200
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This info can be used by operating system to setup LED behavior.
|
||||
|
||||
Reported-by: Dan Haab <dhaab@luxul.com>
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
|
||||
@@ -57,7 +57,8 @@
|
||||
usb {
|
||||
label = "bcm53xx:green:usb";
|
||||
gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
|
||||
- linux,default-trigger = "none";
|
||||
+ trigger-sources = <&ohci_port2>, <&ehci_port2>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
};
|
||||
|
||||
status {
|
||||
@ -1,96 +0,0 @@
|
||||
From 1f4b0d5596d2e3ea8e953d578ab8444ce860d35d Mon Sep 17 00:00:00 2001
|
||||
From: Dan Haab <dhaab@luxul.com>
|
||||
Date: Mon, 9 Oct 2017 09:46:22 -0600
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Add DT for Luxul XBR-4500
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This is BCM47094 (AKA BCM4709C0) based router with ports-on-the-front
|
||||
board design.
|
||||
|
||||
Signed-off-by: Dan Haab <dhaab@luxul.com>
|
||||
Acked-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts | 63 +++++++++++++++++++++++++++
|
||||
2 files changed, 64 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -101,6 +101,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm4709-tplink-archer-c9-v1.dtb \
|
||||
bcm47094-dlink-dir-885l.dtb \
|
||||
bcm47094-linksys-panamera.dtb \
|
||||
+ bcm47094-luxul-xbr-4500.dtb \
|
||||
bcm47094-luxul-xwr-3100.dtb \
|
||||
bcm47094-netgear-r8500.dtb \
|
||||
bcm94708.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
|
||||
@@ -0,0 +1,63 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2017 Luxul Inc.
|
||||
+ *
|
||||
+ * Licensed under the ISC license.
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "bcm4708.dtsi"
|
||||
+#include "bcm5301x-nand-cs0-bch8.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "luxul,xbr-4500-v1", "brcm,bcm47094", "brcm,bcm4708";
|
||||
+ model = "Luxul XBR-4500 V1";
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "earlycon";
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0x00000000 0x08000000
|
||||
+ 0x88000000 0x18000000>;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ status {
|
||||
+ label = "bcm53xx:green:status";
|
||||
+ gpios = <&chipcommon 20 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "timer";
|
||||
+ };
|
||||
+
|
||||
+ usb3 {
|
||||
+ label = "bcm53xx:green:usb3";
|
||||
+ gpios = <&chipcommon 19 GPIO_ACTIVE_HIGH>;
|
||||
+ trigger-sources = <&ohci_port1>, <&ehci_port1>,
|
||||
+ <&xhci_port1>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ restart {
|
||||
+ label = "Reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usb3 {
|
||||
+ vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
|
||||
+};
|
||||
+
|
||||
+&spi_nor {
|
||||
+ status = "okay";
|
||||
+};
|
||||
@ -1,96 +0,0 @@
|
||||
From 65f78c4c41a9b9a7637e1dda2d5e41cf26ea971c Mon Sep 17 00:00:00 2001
|
||||
From: Dan Haab <dhaab@luxul.com>
|
||||
Date: Mon, 9 Oct 2017 09:46:23 -0600
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Add DT for Luxul ABR-4500
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This is BCM47094 (AKA BCM4709C0) based router with rear-facing ports
|
||||
board design.
|
||||
|
||||
Signed-off-by: Dan Haab <dhaab@luxul.com>
|
||||
Acked-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts | 63 +++++++++++++++++++++++++++
|
||||
2 files changed, 64 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -101,6 +101,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm4709-tplink-archer-c9-v1.dtb \
|
||||
bcm47094-dlink-dir-885l.dtb \
|
||||
bcm47094-linksys-panamera.dtb \
|
||||
+ bcm47094-luxul-abr-4500.dtb \
|
||||
bcm47094-luxul-xbr-4500.dtb \
|
||||
bcm47094-luxul-xwr-3100.dtb \
|
||||
bcm47094-netgear-r8500.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
|
||||
@@ -0,0 +1,63 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2017 Luxul Inc.
|
||||
+ *
|
||||
+ * Licensed under the ISC license.
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "bcm4708.dtsi"
|
||||
+#include "bcm5301x-nand-cs0-bch8.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "luxul,abr-4500-v1", "brcm,bcm47094", "brcm,bcm4708";
|
||||
+ model = "Luxul ABR-4500 V1";
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "earlycon";
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0x00000000 0x08000000
|
||||
+ 0x88000000 0x18000000>;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ status {
|
||||
+ label = "bcm53xx:green:status";
|
||||
+ gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "timer";
|
||||
+ };
|
||||
+
|
||||
+ usb3 {
|
||||
+ label = "bcm53xx:green:usb3";
|
||||
+ gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
|
||||
+ trigger-sources = <&ohci_port1>, <&ehci_port1>,
|
||||
+ <&xhci_port1>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ restart {
|
||||
+ label = "Reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usb3 {
|
||||
+ vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
|
||||
+};
|
||||
+
|
||||
+&spi_nor {
|
||||
+ status = "okay";
|
||||
+};
|
||||
@ -1,120 +0,0 @@
|
||||
From 0aa052ce1c3340850a7e5980b6d24b3ea5779591 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Haab <dhaab@luxul.com>
|
||||
Date: Mon, 9 Oct 2017 09:46:59 -0600
|
||||
Subject: [PATCH] ARM: dts: BCM53573: Add DT for Luxul XAP-810
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This is BCM53573 WiSoC based access point with an extra BCM43217 chipset
|
||||
used for 2.4 GHz.
|
||||
|
||||
Signed-off-by: Dan Haab <dhaab@luxul.com>
|
||||
Acked-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
arch/arm/boot/dts/bcm47189-luxul-xap-810.dts | 87 ++++++++++++++++++++++++++++
|
||||
2 files changed, 88 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/bcm47189-luxul-xap-810.dts
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -111,6 +111,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm953012hr.dtb \
|
||||
bcm953012k.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM_53573) += \
|
||||
+ bcm47189-luxul-xap-810.dtb \
|
||||
bcm47189-tenda-ac9.dtb \
|
||||
bcm947189acdbmr.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM_63XX) += \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts
|
||||
@@ -0,0 +1,87 @@
|
||||
+/*
|
||||
+ * Copyright 2017 Luxul Inc.
|
||||
+ *
|
||||
+ * Licensed under the ISC license.
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "bcm53573.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "luxul,xap-810-v1", "brcm,bcm47189", "brcm,bcm53573";
|
||||
+ model = "Luxul XAP-810 V1";
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "earlycon";
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0x00000000 0x08000000>;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ 5ghz {
|
||||
+ label = "bcm53xx:blue:5ghz";
|
||||
+ gpios = <&chipcommon 11 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "default-off";
|
||||
+ };
|
||||
+
|
||||
+ system {
|
||||
+ label = "bcm53xx:green:system";
|
||||
+ gpios = <&chipcommon 15 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "timer";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pcie0_leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ 2ghz {
|
||||
+ label = "bcm53xx:blue:2ghz";
|
||||
+ gpios = <&pcie0_chipcommon 3 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "default-off";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ restart {
|
||||
+ label = "Reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pcie0 {
|
||||
+ ranges = <0x00000000 0 0 0 0 0x00100000>;
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+
|
||||
+ bridge@0,0,0 {
|
||||
+ reg = <0x0000 0 0 0 0>;
|
||||
+ ranges = <0x00000000 0 0 0 0 0 0 0x00100000>;
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+
|
||||
+ wifi@0,1,0 {
|
||||
+ reg = <0x0000 0 0 0 0>;
|
||||
+ ranges = <0x00000000 0 0 0 0x00100000>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ pcie0_chipcommon: chipcommon@0 {
|
||||
+ reg = <0 0x1000>;
|
||||
+
|
||||
+ gpio-controller;
|
||||
+ #gpio-cells = <2>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
@ -1,83 +0,0 @@
|
||||
From 7030ea600d560026b91726f2eb79c856b813afa9 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Haab <dhaab@luxul.com>
|
||||
Date: Mon, 9 Oct 2017 09:47:00 -0600
|
||||
Subject: [PATCH] ARM: dts: BCM53573: Add DT for Luxul XAP-1440
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This is BCM53573 WiSoC based outdoor access point with an extra BCM43217
|
||||
chipset used for 2.4 GHz.
|
||||
|
||||
Signed-off-by: Dan Haab <dhaab@luxul.com>
|
||||
Acked-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts | 50 +++++++++++++++++++++++++++
|
||||
2 files changed, 51 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -111,6 +111,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm953012hr.dtb \
|
||||
bcm953012k.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM_53573) += \
|
||||
+ bcm47189-luxul-xap-1440.dtb \
|
||||
bcm47189-luxul-xap-810.dtb \
|
||||
bcm47189-tenda-ac9.dtb \
|
||||
bcm947189acdbmr.dtb
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts
|
||||
@@ -0,0 +1,50 @@
|
||||
+/*
|
||||
+ * Copyright 2017 Luxul Inc.
|
||||
+ *
|
||||
+ * Licensed under the ISC license.
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "bcm53573.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "luxul,xap-1440-v1", "brcm,bcm47189", "brcm,bcm53573";
|
||||
+ model = "Luxul XAP-1440 V1";
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "earlycon";
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0x00000000 0x08000000>;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ wlan {
|
||||
+ label = "bcm53xx:blue:wlan";
|
||||
+ gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "default-off";
|
||||
+ };
|
||||
+
|
||||
+ system {
|
||||
+ label = "bcm53xx:green:system";
|
||||
+ gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "timer";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ restart {
|
||||
+ label = "Reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
@ -1,96 +0,0 @@
|
||||
From 811ae58e76da88106f6d28159d4ea7b163dfaa48 Mon Sep 17 00:00:00 2001
|
||||
From: INAGAKI Hiroshi <musashino.open@gmail.com>
|
||||
Date: Wed, 7 Mar 2018 20:33:56 +0900
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: add missing LEDs for Buffalo WZR-900DHP
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Buffalo WZR-900DHP has 8 LEDs, but there is not LED definitions in the
|
||||
dts and cannot configure these LEDs.
|
||||
I Added missing LED definitions for WZR-900DHP.
|
||||
|
||||
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
|
||||
Reviewed-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts | 68 +++++++++++++++++++++++
|
||||
1 file changed, 68 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts
|
||||
@@ -35,6 +35,74 @@
|
||||
0x88000000 0x08000000>;
|
||||
};
|
||||
|
||||
+ spi {
|
||||
+ compatible = "spi-gpio";
|
||||
+ num-chipselects = <1>;
|
||||
+ gpio-sck = <&chipcommon 7 0>;
|
||||
+ gpio-mosi = <&chipcommon 4 0>;
|
||||
+ cs-gpios = <&chipcommon 6 0>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ hc595: gpio_spi@0 {
|
||||
+ compatible = "fairchild,74hc595";
|
||||
+ reg = <0>;
|
||||
+ registers-number = <1>;
|
||||
+ spi-max-frequency = <100000>;
|
||||
+
|
||||
+ gpio-controller;
|
||||
+ #gpio-cells = <2>;
|
||||
+
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ usb {
|
||||
+ label = "bcm53xx:green:usb";
|
||||
+ gpios = <&hc595 0 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ power0 {
|
||||
+ label = "bcm53xx:green:power";
|
||||
+ gpios = <&hc595 1 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "default-on";
|
||||
+ };
|
||||
+
|
||||
+ power1 {
|
||||
+ label = "bcm53xx:red:power";
|
||||
+ gpios = <&hc595 2 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ router0 {
|
||||
+ label = "bcm53xx:green:router";
|
||||
+ gpios = <&hc595 3 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "default-on";
|
||||
+ };
|
||||
+
|
||||
+ router1 {
|
||||
+ label = "bcm53xx:amber:router";
|
||||
+ gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ wan {
|
||||
+ label = "bcm53xx:green:wan";
|
||||
+ gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "default-on";
|
||||
+ };
|
||||
+
|
||||
+ wireless0 {
|
||||
+ label = "bcm53xx:green:wireless";
|
||||
+ gpios = <&hc595 6 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ wireless1 {
|
||||
+ label = "bcm53xx:amber:wireless";
|
||||
+ gpios = <&hc595 7 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
#address-cells = <1>;
|
||||
@ -1,39 +0,0 @@
|
||||
From 0c0d1c90ddc44df70401b7cfff178c41b2f83ffa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Wed, 4 Apr 2018 15:14:21 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Switch Luxul XWC-1000 to the new fixed
|
||||
partitions syntax
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This new syntax is slightly better designed & uses "compatible" string.
|
||||
For details see Documentation/devicetree/bindings/mtd/partition.txt .
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts | 12 +++++++++---
|
||||
1 file changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
|
||||
@@ -26,9 +26,15 @@
|
||||
|
||||
nand: nand@18028000 {
|
||||
nandcs@0 {
|
||||
- partition@0 {
|
||||
- label = "ubi";
|
||||
- reg = <0x00000000 0x08000000>;
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "ubi";
|
||||
+ reg = <0x00000000 0x08000000>;
|
||||
+ };
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -1,440 +0,0 @@
|
||||
From 2b3db67ce4bc4d1d8556e87a17df7765da8dbdc5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Wed, 2 May 2018 16:11:02 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Relicense most DTS files to the GPL 2.0+
|
||||
/ MIT
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
These files were created and ever touched by a group of three people
|
||||
only: Dan, Hauke and me. They were licensed under GNU/GPL or ISC.
|
||||
|
||||
Introducing and discussing SPDX-License-Identifier resulted in a
|
||||
conclusion that ISC is a not recommended license (see also a
|
||||
license-rules.rst). Moveover an old e-mail from Alan Cox was pointed
|
||||
which explained that dual licensing is a safer solution than depending
|
||||
on a common compatibility belief.
|
||||
|
||||
This commit switches most of BCM5301X DTS files to dual licensing using:
|
||||
1) GPL 2.0+ to make sure they are compatible with Linux kernel
|
||||
2) MIT to allow sharing with more permissive projects
|
||||
Both licenses belong to the preferred ones (see LICENSES/preferred/).
|
||||
|
||||
An attempt to relicense remaining files will be made separately and will
|
||||
require approve from more/other developers.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Acked-by: Dan Haab <dan.haab@luxul.com>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts | 13 +------------
|
||||
arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts | 13 +------------
|
||||
arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts | 3 +--
|
||||
arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts | 3 +--
|
||||
arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts | 3 +--
|
||||
arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts | 13 +------------
|
||||
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 3 +--
|
||||
arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts | 13 +------------
|
||||
arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 13 +------------
|
||||
arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts | 3 +--
|
||||
arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts | 3 +--
|
||||
arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts | 3 +--
|
||||
arch/arm/boot/dts/bcm4709-linksys-ea9200.dts | 3 +--
|
||||
arch/arm/boot/dts/bcm4709-netgear-r7000.dts | 13 +------------
|
||||
arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts | 3 +--
|
||||
arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 13 +------------
|
||||
arch/arm/boot/dts/bcm47094-linksys-panamera.dts | 3 +--
|
||||
arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts | 3 +--
|
||||
arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts | 3 +--
|
||||
arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts | 3 +--
|
||||
arch/arm/boot/dts/bcm47094-netgear-r8500.dts | 3 +--
|
||||
arch/arm/boot/dts/bcm5301x-nand-cs0-bch1.dtsi | 3 +--
|
||||
arch/arm/boot/dts/bcm5301x-nand-cs0-bch4.dtsi | 3 +--
|
||||
arch/arm/boot/dts/bcm5301x-nand-cs0-bch8.dtsi | 3 +--
|
||||
arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi | 3 +--
|
||||
25 files changed, 25 insertions(+), 120 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts
|
||||
@@ -1,20 +1,9 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Broadcom BCM470X / BCM5301X ARM platform code.
|
||||
* DTS for Asus RT-AC56U
|
||||
*
|
||||
* Copyright (C) 2015 Rafał Miłecki <zajec5@gmail.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.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts
|
||||
@@ -1,20 +1,9 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Broadcom BCM470X / BCM5301X ARM platform code.
|
||||
* DTS for Asus RT-AC68U
|
||||
*
|
||||
* Copyright (C) 2015 Rafał Miłecki <zajec5@gmail.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.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts
|
||||
@@ -1,7 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright (C) 2017 Rafał Miłecki <rafal@milecki.pl>
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
|
||||
@@ -1,7 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright 2016 Luxul Inc.
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
|
||||
@@ -1,10 +1,9 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Broadcom BCM470X / BCM5301X ARM platform code.
|
||||
* DTS for Luxul XWC-1000
|
||||
*
|
||||
* Copyright 2014 Luxul Inc.
|
||||
- *
|
||||
- * Licensed under the GNU/GPL. See COPYING for details.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
|
||||
@@ -1,20 +1,9 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Broadcom BCM470X / BCM5301X ARM platform code.
|
||||
* DTS for Netgear R6300 V2
|
||||
*
|
||||
* Copyright (C) 2014 Rafał Miłecki <zajec5@gmail.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.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
|
||||
@@ -1,10 +1,9 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Broadcom BCM470X / BCM5301X arm platform code.
|
||||
* DTS for SmartRG SR400ac
|
||||
*
|
||||
* Copyright (C) 2015 Rafał Miłecki <zajec5@gmail.com>
|
||||
- *
|
||||
- * Licensed under the GNU/GPL. See COPYING for details.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
|
||||
@@ -1,20 +1,9 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Broadcom BCM470X / BCM5301X ARM platform code.
|
||||
* DTS for Asus RT-N18U
|
||||
*
|
||||
* Copyright (C) 2014 Rafał Miłecki <zajec5@gmail.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.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
|
||||
@@ -1,20 +1,9 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Broadcom BCM470X / BCM5301X ARM platform code.
|
||||
* DTS for Buffalo WZR-600DHP2
|
||||
*
|
||||
* Copyright (C) 2014 Rafał Miłecki <zajec5@gmail.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.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
|
||||
@@ -1,7 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright 2017 Luxul Inc.
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
|
||||
@@ -1,7 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright 2017 Luxul Inc.
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
|
||||
@@ -1,7 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright (C) 2017 Rafał Miłecki <rafal@milecki.pl>
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts
|
||||
@@ -1,7 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright (C) 2017 Rafał Miłecki <rafal@milecki.pl>
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm4709-netgear-r7000.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4709-netgear-r7000.dts
|
||||
@@ -1,20 +1,9 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Broadcom BCM470X / BCM5301X ARM platform code.
|
||||
* DTS for Netgear R7000
|
||||
*
|
||||
* Copyright (C) 2015 Rafał Miłecki <zajec5@gmail.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.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
|
||||
@@ -1,7 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright (C) 2016 Rafał Miłecki <rafal@milecki.pl>
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
|
||||
@@ -1,20 +1,9 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Broadcom BCM470X / BCM5301X ARM platform code.
|
||||
* DTS for D-Link DIR-885L
|
||||
*
|
||||
* Copyright (C) 2016 Rafał Miłecki <zajec5@gmail.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.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
|
||||
@@ -1,7 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright (C) 2017 Rafał Miłecki <rafal@milecki.pl>
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
|
||||
@@ -1,7 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright (C) 2017 Luxul Inc.
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
|
||||
@@ -1,7 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright (C) 2017 Luxul Inc.
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
|
||||
@@ -1,7 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright 2016 Luxul Inc.
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm47094-netgear-r8500.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-netgear-r8500.dts
|
||||
@@ -1,7 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright (C) 2016 Rafał Miłecki <rafal@milecki.pl>
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm5301x-nand-cs0-bch1.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm5301x-nand-cs0-bch1.dtsi
|
||||
@@ -1,9 +1,8 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Broadcom Northstar NAND.
|
||||
*
|
||||
* Copyright (C) 2016 Rafał Miłecki <rafal.milecki@gmail.com>
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
#include "bcm5301x-nand-cs0.dtsi"
|
||||
--- a/arch/arm/boot/dts/bcm5301x-nand-cs0-bch4.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm5301x-nand-cs0-bch4.dtsi
|
||||
@@ -1,7 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright 2016 Luxul Inc.
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
#include "bcm5301x-nand-cs0.dtsi"
|
||||
--- a/arch/arm/boot/dts/bcm5301x-nand-cs0-bch8.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm5301x-nand-cs0-bch8.dtsi
|
||||
@@ -1,3 +1,4 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Broadcom BCM470X / BCM5301X Nand chip defaults.
|
||||
*
|
||||
@@ -5,8 +6,6 @@
|
||||
* and uses 8 bit ECC.
|
||||
*
|
||||
* Copyright (C) 2015 Hauke Mehrtens <hauke@hauke-m.de>
|
||||
- *
|
||||
- * Licensed under the GNU/GPL. See COPYING for details.
|
||||
*/
|
||||
|
||||
#include "bcm5301x-nand-cs0.dtsi"
|
||||
--- a/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
|
||||
@@ -1,9 +1,8 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Broadcom Northstar NAND.
|
||||
*
|
||||
* Copyright (C) 2015 Hauke Mehrtens <hauke@hauke-m.de>
|
||||
- *
|
||||
- * Licensed under the GNU/GPL. See COPYING for details.
|
||||
*/
|
||||
|
||||
/ {
|
||||
@ -1,79 +0,0 @@
|
||||
From fd0ab539d185a828f2071ee5f311bf101c7fea08 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Fri, 4 May 2018 11:54:45 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Relicense Buffalo files to the GPL 2.0+ /
|
||||
MIT
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This matches licensing used by other BCM5301X files and is preferred as:
|
||||
1) GPL 2.0+ makes is clearly compatible with Linux kernel
|
||||
2) MIT is also permissive but preferred over ISC
|
||||
|
||||
These files were created and ever touched by a group of four people
|
||||
only: Felix, INAGAKI, Hauke and me.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Acked-by: Felix Fietkau <nbd@nbd.name>
|
||||
Acked-by: INAGAKI Hiroshi <musashino.open@gmail.com>
|
||||
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts | 3 +--
|
||||
arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts | 13 +------------
|
||||
arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts | 3 +--
|
||||
3 files changed, 3 insertions(+), 16 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
|
||||
@@ -1,10 +1,9 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Broadcom BCM470X / BCM5301X ARM platform code.
|
||||
* DTS for Buffalo WZR-1750DHP
|
||||
*
|
||||
* Copyright (C) 2014 Rafał Miłecki <zajec5@gmail.com>
|
||||
- *
|
||||
- * Licensed under the GNU/GPL. See COPYING for details.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts
|
||||
@@ -1,20 +1,9 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Broadcom BCM470X / BCM5301X ARM platform code.
|
||||
* DTS for Buffalo WZR-900DHP
|
||||
*
|
||||
* Copyright (C) 2015 Rafał Miłecki <zajec5@gmail.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.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts
|
||||
@@ -1,10 +1,9 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Broadcom BCM470X / BCM5301X ARM platform code.
|
||||
* DTS for Buffalo WXR-1900DHP
|
||||
*
|
||||
* Copyright (C) 2015 Felix Fietkau <nbd@openwrt.org>
|
||||
- *
|
||||
- * Licensed under the GNU/GPL. See COPYING for details.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
@ -1,112 +0,0 @@
|
||||
From 2e2105a1578172eaf61e3b59a2c10c4fe04c21b9 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Haab <riproute@gmail.com>
|
||||
Date: Fri, 4 May 2018 10:08:43 -0600
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Add DT for Luxul XWR-3150 V1
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Luxul XWR-3150 is a wireless router similar to the XWR-3100 except:
|
||||
1) It has more RAM
|
||||
2) Its NAND controller in running in BCH8 mode
|
||||
3) LAN ports LEDs are hardware controlled
|
||||
|
||||
Signed-off-by: Dan Haab <dan.haab@luxul.com>
|
||||
Acked-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts | 77 ++++++++++++++++++++++++
|
||||
2 files changed, 78 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -104,6 +104,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm47094-luxul-abr-4500.dtb \
|
||||
bcm47094-luxul-xbr-4500.dtb \
|
||||
bcm47094-luxul-xwr-3100.dtb \
|
||||
+ bcm47094-luxul-xwr-3150-v1.dtb \
|
||||
bcm47094-netgear-r8500.dtb \
|
||||
bcm94708.dtb \
|
||||
bcm94709.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
|
||||
@@ -0,0 +1,77 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
+/*
|
||||
+ * Copyright 2018 Luxul Inc.
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "bcm47094.dtsi"
|
||||
+#include "bcm5301x-nand-cs0-bch8.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "luxul,xwr-3150-v1", "brcm,bcm47094", "brcm,bcm4708";
|
||||
+ model = "Luxul XWR-3150 V1";
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "earlycon";
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0x00000000 0x08000000
|
||||
+ 0x88000000 0x18000000>;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ power {
|
||||
+ label = "bcm53xx:green:power";
|
||||
+ gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "default-on";
|
||||
+ };
|
||||
+
|
||||
+ usb3 {
|
||||
+ label = "bcm53xx:green:usb3";
|
||||
+ gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
|
||||
+ trigger-sources = <&ohci_port1>, <&ehci_port1>,
|
||||
+ <&xhci_port1>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
+ };
|
||||
+
|
||||
+ status {
|
||||
+ label = "bcm53xx:green:status";
|
||||
+ gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "timer";
|
||||
+ };
|
||||
+
|
||||
+ 2ghz {
|
||||
+ label = "bcm53xx:green:2ghz";
|
||||
+ gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ 5ghz {
|
||||
+ label = "bcm53xx:green:5ghz";
|
||||
+ gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ restart {
|
||||
+ label = "Reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usb3 {
|
||||
+ vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
|
||||
+};
|
||||
+
|
||||
+&spi_nor {
|
||||
+ status = "okay";
|
||||
+};
|
||||
@ -1,90 +0,0 @@
|
||||
From 6054cb5788072e214af582c42d9bd8c5ffa6e288 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Haab <riproute@gmail.com>
|
||||
Date: Fri, 4 May 2018 10:08:44 -0600
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Add DT for Luxul XAP-1610
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
It's an access point based on BCM47094 SoC with two BCM4366E wireless
|
||||
chipsets.
|
||||
|
||||
Signed-off-by: Dan Haab <dan.haab@luxul.com>
|
||||
Acked-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts | 57 +++++++++++++++++++++++++++
|
||||
2 files changed, 58 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -102,6 +102,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm47094-dlink-dir-885l.dtb \
|
||||
bcm47094-linksys-panamera.dtb \
|
||||
bcm47094-luxul-abr-4500.dtb \
|
||||
+ bcm47094-luxul-xap-1610.dtb \
|
||||
bcm47094-luxul-xbr-4500.dtb \
|
||||
bcm47094-luxul-xwr-3100.dtb \
|
||||
bcm47094-luxul-xwr-3150-v1.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts
|
||||
@@ -0,0 +1,57 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
+/*
|
||||
+ * Copyright 2018 Luxul Inc.
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "bcm47094.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "luxul,xap-1610-v1", "brcm,bcm47094", "brcm,bcm4708";
|
||||
+ model = "Luxul XAP-1610 V1";
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "earlycon";
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0x00000000 0x08000000>;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ status {
|
||||
+ label = "bcm53xx:green:status";
|
||||
+ gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "timer";
|
||||
+ };
|
||||
+
|
||||
+ 2ghz {
|
||||
+ label = "bcm53xx:blue:2ghz";
|
||||
+ gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ 5ghz {
|
||||
+ label = "bcm53xx:blue:5ghz";
|
||||
+ gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ restart {
|
||||
+ label = "Reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&spi_nor {
|
||||
+ status = "okay";
|
||||
+};
|
||||
@ -1,48 +0,0 @@
|
||||
From 9c281b5e129961b9940a27f8da24dddd1c0eba87 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Fri, 4 May 2018 12:03:24 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Relicense Asus RT-AC87U file to the GPL
|
||||
2.0+ / MIT
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This matches licensing used by other BCM5301X files and is preferred as:
|
||||
1) GPL 2.0+ makes is clearly compatible with Linux kernel
|
||||
2) MIT is also permissive but preferred over ISC
|
||||
|
||||
This file were created and ever touched by a group of three people only:
|
||||
Álvaro, Hauke and me.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Acked-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts | 13 +------------
|
||||
1 file changed, 1 insertion(+), 12 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts
|
||||
@@ -1,20 +1,9 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Broadcom BCM470X / BCM5301X ARM platform code.
|
||||
* DTS for Asus RT-AC87U
|
||||
*
|
||||
* Copyright (C) 2015 Rafał Miłecki <zajec5@gmail.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.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
@ -1,39 +0,0 @@
|
||||
From a05f1e36a57d02374a203719abc5bf2e8c51e125 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Thu, 10 May 2018 23:20:00 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Switch D-Link DIR-885L to the new
|
||||
partitions syntax
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This new syntax is slightly better designed & uses "compatible" string.
|
||||
For details see Documentation/devicetree/bindings/mtd/partition.txt .
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 12 +++++++++---
|
||||
1 file changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
|
||||
@@ -26,9 +26,15 @@
|
||||
|
||||
nand: nand@18028000 {
|
||||
nandcs@0 {
|
||||
- partition@0 {
|
||||
- label = "firmware";
|
||||
- reg = <0x00000000 0x08000000>;
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "firmware";
|
||||
+ reg = <0x00000000 0x08000000>;
|
||||
+ };
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -1,456 +0,0 @@
|
||||
From 37f6130ec39fe14e923d472746a51e6f06f761b7 Mon Sep 17 00:00:00 2001
|
||||
From: Vivek Unune <npcomplete13@gmail.com>
|
||||
Date: Mon, 9 Apr 2018 18:31:53 -0400
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Make USB 3.0 PHY use MDIO PHY driver
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Currently, the USB 3.0 PHY in bcm5301x.dtsi uses platform driver which
|
||||
requires register range "ccb-mii" <0x18003000 0x1000>. This range
|
||||
overlaps with MDIO cmd and param registers (<0x18003000 0x8>).
|
||||
Essentially, the platform driver partly acts like a MDIO bus driver,
|
||||
hence to use of this register range.
|
||||
|
||||
In some Northstar devices like Linksys EA9500, secondary switch is
|
||||
connected via external MDIO. The only way to access and configure the
|
||||
external switch is via MDIO bus. When we enable the MDIO bus in it's
|
||||
current state, the MDIO bus and any child buses fail to register because
|
||||
of the register range overlap.
|
||||
|
||||
On Northstar, the USB 3.0 PHY is connected at address 0x10 on the
|
||||
internal MDIO bus. This change moves the usb3_phy node and makes it a
|
||||
child node of internal MDIO bus.
|
||||
|
||||
Thanks to Rafał Miłecki's commit af850e14a7ae ("phy: bcm-ns-usb3: add
|
||||
MDIO driver using proper bus layer") the same USB 3.0 platform driver
|
||||
can now act as USB 3.0 PHY MDIO driver.
|
||||
|
||||
Tested on Linksys Panamera (EA9500)
|
||||
|
||||
Signed-off-by: Vivek Unune <npcomplete13@gmail.com>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm4708-netgear-r6250.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm4709-linksys-ea9200.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm4709-netgear-r7000.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm4709-netgear-r8000.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm47094-linksys-panamera.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm47094-netgear-r8500.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm47094.dtsi | 7 +++--
|
||||
arch/arm/boot/dts/bcm5301x.dtsi | 35 +++++++++++++++++-----
|
||||
arch/arm/boot/dts/bcm94708.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm94709.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm953012er.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm953012hr.dts | 4 +++
|
||||
arch/arm/boot/dts/bcm953012k.dts | 4 +++
|
||||
34 files changed, 159 insertions(+), 11 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts
|
||||
@@ -90,3 +90,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts
|
||||
@@ -80,3 +80,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
|
||||
@@ -146,3 +146,7 @@
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts
|
||||
@@ -38,3 +38,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
|
||||
@@ -57,3 +57,7 @@
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
|
||||
@@ -64,3 +64,7 @@
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
|
||||
@@ -91,3 +91,7 @@
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
|
||||
@@ -83,3 +83,7 @@
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
|
||||
@@ -158,3 +158,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
|
||||
@@ -74,3 +74,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
|
||||
@@ -118,3 +118,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts
|
||||
@@ -104,3 +104,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
|
||||
@@ -57,3 +57,7 @@
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
|
||||
@@ -105,3 +105,7 @@
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
|
||||
@@ -99,3 +99,7 @@
|
||||
&usb2 {
|
||||
vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts
|
||||
@@ -62,3 +62,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts
|
||||
@@ -127,3 +127,7 @@
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts
|
||||
@@ -39,3 +39,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm4709-netgear-r7000.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4709-netgear-r7000.dts
|
||||
@@ -101,3 +101,7 @@
|
||||
&usb3 {
|
||||
vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm4709-netgear-r8000.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4709-netgear-r8000.dts
|
||||
@@ -182,3 +182,7 @@
|
||||
&usb3 {
|
||||
vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
|
||||
@@ -104,3 +104,7 @@
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
|
||||
@@ -115,3 +115,7 @@
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
|
||||
@@ -33,3 +33,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
|
||||
@@ -60,3 +60,7 @@
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
|
||||
@@ -60,3 +60,7 @@
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
|
||||
@@ -100,3 +100,7 @@
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm47094-netgear-r8500.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-netgear-r8500.dts
|
||||
@@ -91,3 +91,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm47094.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm47094.dtsi
|
||||
@@ -7,9 +7,10 @@
|
||||
#include "bcm4708.dtsi"
|
||||
|
||||
/ {
|
||||
- usb3_phy: usb3-phy {
|
||||
- compatible = "brcm,ns-bx-usb3-phy";
|
||||
- };
|
||||
+};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ compatible = "brcm,ns-bx-usb3-phy";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
--- a/arch/arm/boot/dts/bcm5301x.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
|
||||
@@ -154,13 +154,6 @@
|
||||
clock-names = "phy-ref-clk";
|
||||
};
|
||||
|
||||
- usb3_phy: usb3-phy {
|
||||
- compatible = "brcm,ns-ax-usb3-phy";
|
||||
- reg = <0x18105000 0x1000>, <0x18003000 0x1000>;
|
||||
- reg-names = "dmp", "ccb-mii";
|
||||
- #phy-cells = <0>;
|
||||
- };
|
||||
-
|
||||
axi@18000000 {
|
||||
compatible = "brcm,bus-axi";
|
||||
reg = <0x18000000 0x1000>;
|
||||
@@ -359,7 +352,33 @@
|
||||
reg = <0x18003000 0x8>;
|
||||
#size-cells = <1>;
|
||||
#address-cells = <0>;
|
||||
- status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ mdio-bus-mux {
|
||||
+ compatible = "mdio-mux-mmioreg";
|
||||
+ mdio-parent-bus = <&mdio>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <0x18003000 0x4>;
|
||||
+ mux-mask = <0x200>;
|
||||
+
|
||||
+ mdio@0 {
|
||||
+ reg = <0x0>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ usb3_phy: usb3-phy@10 {
|
||||
+ compatible = "brcm,ns-ax-usb3-phy";
|
||||
+ reg = <0x10>;
|
||||
+ usb3-dmp-syscon = <&usb3_dmp>;
|
||||
+ #phy-cells = <0>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ usb3_dmp: syscon@18105000 {
|
||||
+ reg = <0x18105000 0x1000>;
|
||||
};
|
||||
|
||||
i2c0: i2c@18009000 {
|
||||
--- a/arch/arm/boot/dts/bcm94708.dts
|
||||
+++ b/arch/arm/boot/dts/bcm94708.dts
|
||||
@@ -42,3 +42,7 @@
|
||||
reg = <0x00000000 0x08000000>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm94709.dts
|
||||
+++ b/arch/arm/boot/dts/bcm94709.dts
|
||||
@@ -42,3 +42,7 @@
|
||||
reg = <0x00000000 0x08000000>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm953012er.dts
|
||||
+++ b/arch/arm/boot/dts/bcm953012er.dts
|
||||
@@ -90,3 +90,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm953012hr.dts
|
||||
+++ b/arch/arm/boot/dts/bcm953012hr.dts
|
||||
@@ -95,3 +95,7 @@
|
||||
reg = <0x00700000 0x00900000>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm953012k.dts
|
||||
+++ b/arch/arm/boot/dts/bcm953012k.dts
|
||||
@@ -113,3 +113,7 @@
|
||||
&uart1 {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
@ -1,34 +0,0 @@
|
||||
From a21e7548438f3a8f59f9b9f3a8bc973613d3726a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Thu, 14 Jun 2018 18:41:47 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM53573: Add architected timer
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
It's a standard ARM architected timer that was simply missed when
|
||||
initially adding this .dtsi file.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm53573.dtsi | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm53573.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm53573.dtsi
|
||||
@@ -48,6 +48,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ timer {
|
||||
+ compatible = "arm,armv7-timer";
|
||||
+ interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
|
||||
+ <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
|
||||
+ <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
|
||||
+ <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ };
|
||||
+
|
||||
clocks {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
@ -1,269 +0,0 @@
|
||||
From 2bebdfcdcd0feb58d5df419532a2cedc78a336d7 Mon Sep 17 00:00:00 2001
|
||||
From: Vivek Unune <npcomplete13@gmail.com>
|
||||
Date: Mon, 18 Jun 2018 13:41:59 -0400
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Add support for Linksys EA9500
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Hardware Info
|
||||
-------------
|
||||
|
||||
Processor - Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz
|
||||
Switch - BCM53012 in BCM4709C0KFEBG & external BCM53125
|
||||
DDR3 RAM - 256 MB
|
||||
Flash - 128 MB (Toshiba TC58BVG0S3HTA00)
|
||||
2.4GHz - BCM4366 4×4 2.4/5G single chip 802.11ac SoC
|
||||
Power Amp - Skyworks SE2623L 2.4 GHz power amp (x4)
|
||||
5GHz x 2 - BCM4366 4×4 2.4/5G single chip 802.11ac SoC
|
||||
Power Amp - PLX Technology PEX8603 3-lane, 3-port PCIe switch
|
||||
Ports - 8 Ports, 1 WAN Ports
|
||||
Antennas - 8 Antennas
|
||||
Serial Port - @J6 [GND,TX,RX] (VCC NC) 115200 8n1
|
||||
|
||||
Tested with OpenWrt built with DSA driver and Kernel v4.14
|
||||
|
||||
Signed-off-by: Vivek Unune <npcomplete13@gmail.com>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm47094-linksys-panamera.dts | 229 ++++++++++++++++++++++++
|
||||
1 file changed, 229 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
|
||||
@@ -31,6 +31,235 @@
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
+
|
||||
+ rfkill {
|
||||
+ label = "WiFi";
|
||||
+ linux,code = <KEY_RFKILL>;
|
||||
+ gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ reset {
|
||||
+ label = "Reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ wps {
|
||||
+ label = "bcm53xx:white:wps";
|
||||
+ gpios = <&chipcommon 22 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ usb2 {
|
||||
+ label = "bcm53xx:green:usb2";
|
||||
+ gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
|
||||
+ trigger-sources = <&ohci_port2>, <&ehci_port2>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
+ };
|
||||
+
|
||||
+ usb3 {
|
||||
+ label = "bcm53xx:green:usb3";
|
||||
+ gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
|
||||
+ trigger-sources = <&ohci_port1>, <&ehci_port1>,
|
||||
+ <&xhci_port1>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
+ };
|
||||
+
|
||||
+ power {
|
||||
+ label = "bcm53xx:white:power";
|
||||
+ gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ wifi-disabled {
|
||||
+ label = "bcm53xx:amber:wifi-disabled";
|
||||
+ gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ wifi-enabled {
|
||||
+ label = "bcm53xx:white:wifi-enabled";
|
||||
+ gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ bluebar1 {
|
||||
+ label = "bcm53xx:white:bluebar1";
|
||||
+ gpios = <&chipcommon 11 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ bluebar2 {
|
||||
+ label = "bcm53xx:white:bluebar2";
|
||||
+ gpios = <&chipcommon 12 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ bluebar3 {
|
||||
+ label = "bcm53xx:white:bluebar3";
|
||||
+ gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ bluebar4 {
|
||||
+ label = "bcm53xx:white:bluebar4";
|
||||
+ gpios = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ bluebar5 {
|
||||
+ label = "bcm53xx:white:bluebar5";
|
||||
+ gpios = <&chipcommon 19 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ bluebar6 {
|
||||
+ label = "bcm53xx:white:bluebar6";
|
||||
+ gpios = <&chipcommon 20 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ bluebar7 {
|
||||
+ label = "bcm53xx:white:bluebar7";
|
||||
+ gpios = <&chipcommon 21 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ bluebar8 {
|
||||
+ label = "bcm53xx:white:bluebar8";
|
||||
+ gpios = <&chipcommon 8 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ mdio-bus-mux {
|
||||
+ /* BIT(9) = 1 => external mdio */
|
||||
+ mdio_ext: mdio@200 {
|
||||
+ reg = <0x200>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ mdio-mii-mux {
|
||||
+ compatible = "mdio-mux-mmioreg";
|
||||
+ mdio-parent-bus = <&mdio_ext>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <0x1800c1c0 0x4>;
|
||||
+
|
||||
+ /* BIT(6) = mdc, BIT(7) = mdio */
|
||||
+ mux-mask = <0xc0>;
|
||||
+
|
||||
+ mdio-mii@0 {
|
||||
+ /* Enable MII function */
|
||||
+ reg = <0x0>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ switch@0 {
|
||||
+ compatible = "brcm,bcm53125";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reset-gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
|
||||
+ reset-names = "robo_reset";
|
||||
+ reg = <0>;
|
||||
+ dsa,member = <1 0>;
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ port@0 {
|
||||
+ reg = <0>;
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ reg = <1>;
|
||||
+ label = "lan5";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ reg = <2>;
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ reg = <3>;
|
||||
+ label = "lan6";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ reg = <4>;
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ sw1_p8: port@8 {
|
||||
+ reg = <8>;
|
||||
+ ethernet = <&sw0_p0>;
|
||||
+ label = "cpu";
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usb2 {
|
||||
+ vcc-gpio = <&chipcommon 13 GPIO_ACTIVE_HIGH>;
|
||||
+};
|
||||
+
|
||||
+&usb3 {
|
||||
+ vcc-gpio = <&chipcommon 14 GPIO_ACTIVE_HIGH>;
|
||||
+};
|
||||
+
|
||||
+&srab {
|
||||
+ compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
|
||||
+ status = "okay";
|
||||
+ dsa,member = <0 0>;
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ port@1 {
|
||||
+ reg = <1>;
|
||||
+ label = "lan7";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ reg = <2>;
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ reg = <3>;
|
||||
+ label = "lan8";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ reg = <4>;
|
||||
+ label = "wan";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ reg = <8>;
|
||||
+ ethernet = <&gmac2>;
|
||||
+ label = "cpu";
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sw0_p0: port@0 {
|
||||
+ reg = <0>;
|
||||
+ label = "extsw";
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
@ -1,167 +0,0 @@
|
||||
From b0465fdfdd7e7c1afe2fae1cb36b94e1ce89732e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Sat, 28 Jul 2018 14:13:57 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Specify flash partitions
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Most devices use Broadcom standard partitions which allows them to be
|
||||
described with the "brcm,bcm947xx-cfe-partitions". Exceptions are:
|
||||
1) TP-LINK devices which use "os-image" partition with TRX containing
|
||||
kernel only + separated rootfs partition.
|
||||
2) Asus RT-AC87U with custom "asus" partition.
|
||||
|
||||
This commit also removes undocumented and unsupported linux,part-probe
|
||||
binding which got accidentally upstreamed while describing SPI
|
||||
controller.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts | 28 +++++++++++++++++++
|
||||
arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts | 31 ++++++++++++++++++++++
|
||||
arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts | 28 +++++++++++++++++++
|
||||
arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi | 4 +++
|
||||
arch/arm/boot/dts/bcm5301x.dtsi | 5 +++-
|
||||
5 files changed, 95 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
|
||||
@@ -94,6 +94,34 @@
|
||||
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ boot@0 {
|
||||
+ label = "boot";
|
||||
+ reg = <0x000000 0x040000>;
|
||||
+ read-only;
|
||||
+ };
|
||||
+
|
||||
+ os-image@100000 {
|
||||
+ label = "os-image";
|
||||
+ reg = <0x040000 0x200000>;
|
||||
+ compatible = "brcm,trx";
|
||||
+ };
|
||||
+
|
||||
+ rootfs@240000 {
|
||||
+ label = "rootfs";
|
||||
+ reg = <0x240000 0xc00000>;
|
||||
+ };
|
||||
+
|
||||
+ nvram@ff0000 {
|
||||
+ label = "nvram";
|
||||
+ reg = <0xff0000 0x010000>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&usb2 {
|
||||
--- a/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts
|
||||
@@ -66,3 +66,34 @@
|
||||
&usb3_phy {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&nandcs {
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ boot@0 {
|
||||
+ label = "boot";
|
||||
+ reg = <0x00000000 0x00080000>;
|
||||
+ read-only;
|
||||
+ };
|
||||
+
|
||||
+ nvram@80000 {
|
||||
+ label = "nvram";
|
||||
+ reg = <0x00080000 0x00180000>;
|
||||
+ };
|
||||
+
|
||||
+ firmware@200000 {
|
||||
+ label = "firmware";
|
||||
+ reg = <0x00200000 0x07cc0000>;
|
||||
+ compatible = "brcm,trx";
|
||||
+ };
|
||||
+
|
||||
+ asus@7ec0000 {
|
||||
+ label = "asus";
|
||||
+ reg = <0x07ec0000 0x00140000>;
|
||||
+ read-only;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
|
||||
@@ -103,6 +103,34 @@
|
||||
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ boot@0 {
|
||||
+ label = "boot";
|
||||
+ reg = <0x000000 0x040000>;
|
||||
+ read-only;
|
||||
+ };
|
||||
+
|
||||
+ os-image@100000 {
|
||||
+ label = "os-image";
|
||||
+ reg = <0x040000 0x200000>;
|
||||
+ compatible = "brcm,trx";
|
||||
+ };
|
||||
+
|
||||
+ rootfs@240000 {
|
||||
+ label = "rootfs";
|
||||
+ reg = <0x240000 0xc00000>;
|
||||
+ };
|
||||
+
|
||||
+ nvram@ff0000 {
|
||||
+ label = "nvram";
|
||||
+ reg = <0xff0000 0x010000>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&usb3_phy {
|
||||
--- a/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
|
||||
@@ -12,6 +12,10 @@
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "brcm,bcm947xx-cfe-partitions";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
};
|
||||
--- a/arch/arm/boot/dts/bcm5301x.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
|
||||
@@ -475,8 +475,11 @@
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <20000000>;
|
||||
- linux,part-probe = "ofpart", "bcm47xxpart";
|
||||
status = "disabled";
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "brcm,bcm947xx-cfe-partitions";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
@ -1,58 +0,0 @@
|
||||
From 26ff86f7794b9466481ccf29ac79925d327f106d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Thu, 20 Sep 2018 13:18:47 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Relicense BCM47081/BCM4709 files to the
|
||||
GPL 2.0+ / MIT
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This matches licensing used by other BCM5301X files and is preferred as:
|
||||
1) GPL 2.0+ makes it clearly compatible with Linux kernel
|
||||
2) MIT is also permissive but preferred over ISC
|
||||
|
||||
Both files were fully developed by me. Commits touching them were signed
|
||||
by Florian and Hauke due to submitting process only.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm47081.dtsi | 13 +------------
|
||||
arch/arm/boot/dts/bcm4709.dtsi | 3 +--
|
||||
2 files changed, 2 insertions(+), 14 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm47081.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm47081.dtsi
|
||||
@@ -1,20 +1,9 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Broadcom BCM470X / BCM5301X ARM platform code.
|
||||
* DTS for BCM47081 SoC.
|
||||
*
|
||||
* Copyright © 2014 Rafał Miłecki <zajec5@gmail.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 "bcm5301x.dtsi"
|
||||
--- a/arch/arm/boot/dts/bcm4709.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm4709.dtsi
|
||||
@@ -1,7 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright (C) 2016 Rafał Miłecki <rafal@milecki.pl>
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
#include "bcm4708.dtsi"
|
||||
@ -1,33 +0,0 @@
|
||||
From d10967344375026ca8762b6080dec2585d895906 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Thu, 20 Sep 2018 13:20:19 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Relicense BCM47094 file to the GPL 2.0+ /
|
||||
MIT
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This matches licensing used by other BCM5301X files and is preferred as:
|
||||
1) GPL 2.0+ makes it clearly compatible with Linux kernel
|
||||
2) MIT is also permissive but preferred over ISC
|
||||
|
||||
This file has been developed by me & once modified by Vivek.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Acked-by: Vivek Unune <npcomplete13@gmail.com>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm47094.dtsi | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm47094.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm47094.dtsi
|
||||
@@ -1,7 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright (C) 2016 Rafał Miłecki <rafal@milecki.pl>
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
#include "bcm4708.dtsi"
|
||||
@ -1,32 +0,0 @@
|
||||
From 1c9001b4f69a37820862286b3bbcdde152a52dcf Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Thu, 20 Sep 2018 13:37:47 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM53573: Relicense Tenda AC9 file to the GPL 2.0+
|
||||
/ MIT
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This matches licensing used by most of BCM5301X files and is preferred as:
|
||||
1) GPL 2.0+ makes it clearly compatible with Linux kernel
|
||||
2) MIT is also permissive but preferred over ISC
|
||||
|
||||
This file was fully developed by me.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm47189-tenda-ac9.dts | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm47189-tenda-ac9.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47189-tenda-ac9.dts
|
||||
@@ -1,7 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright (C) 2016 Rafał Miłecki <rafal@milecki.pl>
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
@ -1,33 +0,0 @@
|
||||
From ca3a6e705cad10662827093d5426abe078861793 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Thu, 20 Sep 2018 13:39:28 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM53573: Relicense SoC file to the GPL 2.0+ / MIT
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This matches licensing used by most of BCM5301X files and is preferred as:
|
||||
1) GPL 2.0+ makes it clearly compatible with Linux kernel
|
||||
2) MIT is also permissive but preferred over ISC
|
||||
|
||||
This file has been developed by me & once modified by Rob dropping a
|
||||
single leading zero in an UART address.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Acked-by: Rob Herring <robh@kernel.org>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm53573.dtsi | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm53573.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm53573.dtsi
|
||||
@@ -1,7 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright (C) 2016 Rafał Miłecki <rafal@milecki.pl>
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
@ -1,75 +0,0 @@
|
||||
From 03e96644d7a810916fc4997d572577e876908b18 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ren=C3=A9=20Kjellerup?= <rk.katana.steel@gmail.com>
|
||||
Date: Mon, 1 Oct 2018 15:07:16 -0700
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Add basic DT for Linksys EA6500 V2
|
||||
|
||||
It is wireless home router based on BCM4708A0 with BCM4360 + BCM4331
|
||||
wireless chipsets. The BCM4331 5GHz chip currently isn't supported only
|
||||
due to missing compatible firmware.
|
||||
|
||||
Signed-off-by: Rene Kjellerup <rk.katana.steel@gmail.com>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
arch/arm/boot/dts/bcm4708-linksys-ea6500-v2.dts | 45 +++++++++++++++++++++++++
|
||||
2 files changed, 46 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/bcm4708-linksys-ea6500-v2.dts
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -82,6 +82,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm4708-asus-rt-ac68u.dtb \
|
||||
bcm4708-buffalo-wzr-1750dhp.dtb \
|
||||
bcm4708-linksys-ea6300-v1.dtb \
|
||||
+ bcm4708-linksys-ea6500-v2.dtb \
|
||||
bcm4708-luxul-xap-1510.dtb \
|
||||
bcm4708-luxul-xwc-1000.dtb \
|
||||
bcm4708-netgear-r6250.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm4708-linksys-ea6500-v2.dts
|
||||
@@ -0,0 +1,45 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
+/*
|
||||
+ * Copyright (C) 2017 Rafał Miłecki <rafal@milecki.pl>
|
||||
+ * Copyright (C) 2018 Rene Kjellerup <rk.katana.steel@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "bcm4708.dtsi"
|
||||
+#include "bcm5301x-nand-cs0-bch8.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "linksys,ea6500-v2", "brcm,bcm4708";
|
||||
+ model = "Linksys EA6500 V2";
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "console=ttyS0,115200";
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0x00000000 0x08000000>;
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ wps {
|
||||
+ label = "WPS";
|
||||
+ linux,code = <KEY_WPS_BUTTON>;
|
||||
+ gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ restart {
|
||||
+ label = "Reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
@ -1,77 +0,0 @@
|
||||
From 9994241ac97cb84d1df98fdc172d3cc6b04b11bf Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Fri, 9 Nov 2018 09:56:49 +0100
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Describe Northstar pins mux controller
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This describes hardware & will allow referencing pin functions. The
|
||||
first usage is UART1 which allows supporting devices using it.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm5301x.dtsi | 44 +++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 44 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm5301x.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
|
||||
@@ -37,6 +37,8 @@
|
||||
reg = <0x0400 0x100>;
|
||||
interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&iprocslow>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinmux_uart1>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
@@ -391,6 +393,48 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ dmu@1800c000 {
|
||||
+ compatible = "simple-bus";
|
||||
+ ranges = <0 0x1800c000 0x1000>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ cru@100 {
|
||||
+ compatible = "simple-bus";
|
||||
+ reg = <0x100 0x1a4>;
|
||||
+ ranges;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ pin-controller@1c0 {
|
||||
+ compatible = "brcm,bcm4708-pinmux";
|
||||
+ reg = <0x1c0 0x24>;
|
||||
+ reg-names = "cru_gpio_control";
|
||||
+
|
||||
+ spi-pins {
|
||||
+ groups = "spi_grp";
|
||||
+ function = "spi";
|
||||
+ };
|
||||
+
|
||||
+ i2c {
|
||||
+ groups = "i2c_grp";
|
||||
+ function = "i2c";
|
||||
+ };
|
||||
+
|
||||
+ pwm {
|
||||
+ groups = "pwm0_grp", "pwm1_grp",
|
||||
+ "pwm2_grp", "pwm3_grp";
|
||||
+ function = "pwm";
|
||||
+ };
|
||||
+
|
||||
+ pinmux_uart1: uart1 {
|
||||
+ groups = "uart1_grp";
|
||||
+ function = "uart1";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
lcpll0: lcpll0@1800c100 {
|
||||
#clock-cells = <1>;
|
||||
compatible = "brcm,nsp-lcpll0";
|
||||
@ -1,41 +0,0 @@
|
||||
From b7f264fa496eb2a6dd1d67dc91dbe8ffcb142487 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Haab <riproute@gmail.com>
|
||||
Date: Sun, 2 Dec 2018 17:00:15 -0700
|
||||
Subject: [PATCH] ARM: dts: BCM53573: Relicense Luxul files to the GPL 2.0+ /
|
||||
MIT
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This matches licensing used by other BCM53573 files and BCM5301X.
|
||||
|
||||
Signed-off-by: Dan Haab <dan.haab@luxul.com>
|
||||
Acked-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts | 3 +--
|
||||
arch/arm/boot/dts/bcm47189-luxul-xap-810.dts | 3 +--
|
||||
2 files changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts
|
||||
@@ -1,7 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright 2017 Luxul Inc.
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
--- a/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts
|
||||
@@ -1,7 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright 2017 Luxul Inc.
|
||||
- *
|
||||
- * Licensed under the ISC license.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
@ -1,107 +0,0 @@
|
||||
From 40a17923367118e32e5e413a952736dd83635b32 Mon Sep 17 00:00:00 2001
|
||||
From: Hao Dong <halbertdong@gmail.com>
|
||||
Date: Sun, 20 Jan 2019 23:33:27 +0100
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Add basic DT for Phicomm K3
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This router has BCM4709C0 SoC, 128 MiB NAND flash (MX30LF1G18AC-TI),
|
||||
512 MiB memory and 3 x LAN and 1 x WAN ports. WiFi chips are
|
||||
BCM4366C0 x 2. The router has a small LCD and 3 capactive keys driven by
|
||||
a PIC microcontroller, which is in turn wired to UART1 of main board.
|
||||
|
||||
Signed-off-by: Hao Dong <halbertdong@gmail.com>
|
||||
[rmilecki: drop chosen { }, fix whitespaces, update commit message]
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
arch/arm/boot/dts/bcm47094-phicomm-k3.dts | 71 +++++++++++++++++++++++
|
||||
2 files changed, 72 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/bcm47094-phicomm-k3.dts
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -108,6 +108,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm47094-luxul-xwr-3100.dtb \
|
||||
bcm47094-luxul-xwr-3150-v1.dtb \
|
||||
bcm47094-netgear-r8500.dtb \
|
||||
+ bcm47094-phicomm-k3.dtb \
|
||||
bcm94708.dtb \
|
||||
bcm94709.dtb \
|
||||
bcm953012er.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm47094-phicomm-k3.dts
|
||||
@@ -0,0 +1,71 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
+/*
|
||||
+ * Copyright (C) 2017 Hamster Tian <haotia@gmail.com>
|
||||
+ * Copyright (C) 2019 Hao Dong <halbertdong@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "bcm47094.dtsi"
|
||||
+#include "bcm5301x-nand-cs0-bch4.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "phicomm,k3", "brcm,bcm47094", "brcm,bcm4708";
|
||||
+ model = "Phicomm K3";
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0x00000000 0x08000000
|
||||
+ 0x88000000 0x18000000>;
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ restart {
|
||||
+ label = "Reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb3_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&nandcs {
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "boot";
|
||||
+ reg = <0x0000000 0x0080000>;
|
||||
+ read-only;
|
||||
+ };
|
||||
+
|
||||
+ partition@80000 {
|
||||
+ label = "nvram";
|
||||
+ reg = <0x0080000 0x0100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@180000{
|
||||
+ label = "phicomm";
|
||||
+ reg = <0x0180000 0x0280000>;
|
||||
+ read-only;
|
||||
+ };
|
||||
+
|
||||
+ partition@400000 {
|
||||
+ label = "firmware";
|
||||
+ reg = <0x0400000 0x7C00000>;
|
||||
+ compatible = "brcm,trx";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
@ -1,107 +0,0 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Fri, 29 Dec 2017 14:44:09 +0100
|
||||
Subject: [PATCH] spi: bcm53xx: simplify reading SPI data
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This commit makes transfer function use spi_transfer_is_last to
|
||||
determine if currently processed transfer is the last one. Thanks to
|
||||
that we finally set hardware registers properly and it makes controller
|
||||
behave the way it's expected to.
|
||||
|
||||
This allows simplifying read function which can now simply start reading
|
||||
from the slot 0 instead of the last saved offset. It has been
|
||||
successfully tested using spi_write_then_read.
|
||||
|
||||
Moreover this change fixes handling messages with two writing transfers.
|
||||
It's important for SPI flash devices as their drivers commonly use one
|
||||
transfer for a command and another one for data.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
drivers/spi/spi-bcm53xx.c | 26 ++++++++++----------------
|
||||
1 file changed, 10 insertions(+), 16 deletions(-)
|
||||
|
||||
--- a/drivers/spi/spi-bcm53xx.c
|
||||
+++ b/drivers/spi/spi-bcm53xx.c
|
||||
@@ -27,8 +27,6 @@ struct bcm53xxspi {
|
||||
struct bcma_device *core;
|
||||
struct spi_master *master;
|
||||
void __iomem *mmio_base;
|
||||
-
|
||||
- size_t read_offset;
|
||||
bool bspi; /* Boot SPI mode with memory mapping */
|
||||
};
|
||||
|
||||
@@ -172,8 +170,6 @@ static void bcm53xxspi_buf_write(struct
|
||||
|
||||
if (!cont)
|
||||
bcm53xxspi_write(b53spi, B53SPI_MSPI_WRITE_LOCK, 0);
|
||||
-
|
||||
- b53spi->read_offset = len;
|
||||
}
|
||||
|
||||
static void bcm53xxspi_buf_read(struct bcm53xxspi *b53spi, u8 *r_buf,
|
||||
@@ -182,10 +178,10 @@ static void bcm53xxspi_buf_read(struct b
|
||||
u32 tmp;
|
||||
int i;
|
||||
|
||||
- for (i = 0; i < b53spi->read_offset + len; i++) {
|
||||
+ for (i = 0; i < len; i++) {
|
||||
tmp = B53SPI_CDRAM_CONT | B53SPI_CDRAM_PCS_DISABLE_ALL |
|
||||
B53SPI_CDRAM_PCS_DSCK;
|
||||
- if (!cont && i == b53spi->read_offset + len - 1)
|
||||
+ if (!cont && i == len - 1)
|
||||
tmp &= ~B53SPI_CDRAM_CONT;
|
||||
tmp &= ~0x1;
|
||||
/* Command Register File */
|
||||
@@ -194,8 +190,7 @@ static void bcm53xxspi_buf_read(struct b
|
||||
|
||||
/* Set queue pointers */
|
||||
bcm53xxspi_write(b53spi, B53SPI_MSPI_NEWQP, 0);
|
||||
- bcm53xxspi_write(b53spi, B53SPI_MSPI_ENDQP,
|
||||
- b53spi->read_offset + len - 1);
|
||||
+ bcm53xxspi_write(b53spi, B53SPI_MSPI_ENDQP, len - 1);
|
||||
|
||||
if (cont)
|
||||
bcm53xxspi_write(b53spi, B53SPI_MSPI_WRITE_LOCK, 1);
|
||||
@@ -214,13 +209,11 @@ static void bcm53xxspi_buf_read(struct b
|
||||
bcm53xxspi_write(b53spi, B53SPI_MSPI_WRITE_LOCK, 0);
|
||||
|
||||
for (i = 0; i < len; ++i) {
|
||||
- int offset = b53spi->read_offset + i;
|
||||
+ u16 reg = B53SPI_MSPI_RXRAM + 4 * (1 + i * 2);
|
||||
|
||||
/* Data stored in the transmit register file LSB */
|
||||
- r_buf[i] = (u8)bcm53xxspi_read(b53spi, B53SPI_MSPI_RXRAM + 4 * (1 + offset * 2));
|
||||
+ r_buf[i] = (u8)bcm53xxspi_read(b53spi, reg);
|
||||
}
|
||||
-
|
||||
- b53spi->read_offset = 0;
|
||||
}
|
||||
|
||||
static int bcm53xxspi_transfer_one(struct spi_master *master,
|
||||
@@ -238,7 +231,8 @@ static int bcm53xxspi_transfer_one(struc
|
||||
left = t->len;
|
||||
while (left) {
|
||||
size_t to_write = min_t(size_t, 16, left);
|
||||
- bool cont = left - to_write > 0;
|
||||
+ bool cont = !spi_transfer_is_last(master, t) ||
|
||||
+ left - to_write > 0;
|
||||
|
||||
bcm53xxspi_buf_write(b53spi, buf, to_write, cont);
|
||||
left -= to_write;
|
||||
@@ -250,9 +244,9 @@ static int bcm53xxspi_transfer_one(struc
|
||||
buf = (u8 *)t->rx_buf;
|
||||
left = t->len;
|
||||
while (left) {
|
||||
- size_t to_read = min_t(size_t, 16 - b53spi->read_offset,
|
||||
- left);
|
||||
- bool cont = left - to_read > 0;
|
||||
+ size_t to_read = min_t(size_t, 16, left);
|
||||
+ bool cont = !spi_transfer_is_last(master, t) ||
|
||||
+ left - to_read > 0;
|
||||
|
||||
bcm53xxspi_buf_read(b53spi, buf, to_read, cont);
|
||||
left -= to_read;
|
||||
@ -1,427 +0,0 @@
|
||||
From c12fb1774deaa9c9408b19db8d43d3612f6e47a0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Wed, 26 Sep 2018 21:31:03 +0200
|
||||
Subject: [PATCH] pinctrl: bcm: add Northstar driver
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This driver provides support for Northstar mux controller. It differs
|
||||
from Northstar Plus one so a new binding and driver were needed.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
drivers/pinctrl/bcm/Kconfig | 13 ++
|
||||
drivers/pinctrl/bcm/Makefile | 1 +
|
||||
drivers/pinctrl/bcm/pinctrl-ns.c | 372 +++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 386 insertions(+)
|
||||
create mode 100644 drivers/pinctrl/bcm/pinctrl-ns.c
|
||||
|
||||
--- a/drivers/pinctrl/bcm/Kconfig
|
||||
+++ b/drivers/pinctrl/bcm/Kconfig
|
||||
@@ -72,6 +72,19 @@ config PINCTRL_CYGNUS_MUX
|
||||
configuration, with the exception that certain individual pins
|
||||
can be overridden to GPIO function
|
||||
|
||||
+config PINCTRL_NS
|
||||
+ bool "Broadcom Northstar pins driver"
|
||||
+ depends on OF && (ARCH_BCM_5301X || COMPILE_TEST)
|
||||
+ select PINMUX
|
||||
+ select GENERIC_PINCONF
|
||||
+ default ARCH_BCM_5301X
|
||||
+ help
|
||||
+ Say yes here to enable the Broadcom NS SoC pins driver.
|
||||
+
|
||||
+ The Broadcom Northstar pins driver supports muxing multi-purpose pins
|
||||
+ that can be used for various functions (e.g. SPI, I2C, UART) as well
|
||||
+ as GPIOs.
|
||||
+
|
||||
config PINCTRL_NSP_GPIO
|
||||
bool "Broadcom NSP GPIO (with PINCONF) driver"
|
||||
depends on OF_GPIO && (ARCH_BCM_NSP || COMPILE_TEST)
|
||||
--- a/drivers/pinctrl/bcm/Makefile
|
||||
+++ b/drivers/pinctrl/bcm/Makefile
|
||||
@@ -5,6 +5,7 @@ obj-$(CONFIG_PINCTRL_BCM281XX) += pinct
|
||||
obj-$(CONFIG_PINCTRL_BCM2835) += pinctrl-bcm2835.o
|
||||
obj-$(CONFIG_PINCTRL_IPROC_GPIO) += pinctrl-iproc-gpio.o
|
||||
obj-$(CONFIG_PINCTRL_CYGNUS_MUX) += pinctrl-cygnus-mux.o
|
||||
+obj-$(CONFIG_PINCTRL_NS) += pinctrl-ns.o
|
||||
obj-$(CONFIG_PINCTRL_NSP_GPIO) += pinctrl-nsp-gpio.o
|
||||
obj-$(CONFIG_PINCTRL_NS2_MUX) += pinctrl-ns2-mux.o
|
||||
obj-$(CONFIG_PINCTRL_NSP_MUX) += pinctrl-nsp-mux.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/pinctrl/bcm/pinctrl-ns.c
|
||||
@@ -0,0 +1,372 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * Copyright (C) 2018 Rafał Miłecki <rafal@milecki.pl>
|
||||
+ */
|
||||
+
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/io.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/of_device.h>
|
||||
+#include <linux/pinctrl/pinconf-generic.h>
|
||||
+#include <linux/pinctrl/pinctrl.h>
|
||||
+#include <linux/pinctrl/pinmux.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/slab.h>
|
||||
+
|
||||
+#define FLAG_BCM4708 BIT(1)
|
||||
+#define FLAG_BCM4709 BIT(2)
|
||||
+#define FLAG_BCM53012 BIT(3)
|
||||
+
|
||||
+struct ns_pinctrl {
|
||||
+ struct device *dev;
|
||||
+ unsigned int chipset_flag;
|
||||
+ struct pinctrl_dev *pctldev;
|
||||
+ void __iomem *base;
|
||||
+
|
||||
+ struct pinctrl_desc pctldesc;
|
||||
+ struct ns_pinctrl_group *groups;
|
||||
+ unsigned int num_groups;
|
||||
+ struct ns_pinctrl_function *functions;
|
||||
+ unsigned int num_functions;
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * Pins
|
||||
+ */
|
||||
+
|
||||
+static const struct pinctrl_pin_desc ns_pinctrl_pins[] = {
|
||||
+ { 0, "spi_clk", (void *)(FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+ { 1, "spi_ss", (void *)(FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+ { 2, "spi_mosi", (void *)(FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+ { 3, "spi_miso", (void *)(FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+ { 4, "i2c_scl", (void *)(FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+ { 5, "i2c_sda", (void *)(FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+ { 6, "mdc", (void *)(FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+ { 7, "mdio", (void *)(FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+ { 8, "pwm0", (void *)(FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+ { 9, "pwm1", (void *)(FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+ { 10, "pwm2", (void *)(FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+ { 11, "pwm3", (void *)(FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+ { 12, "uart1_rx", (void *)(FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+ { 13, "uart1_tx", (void *)(FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+ { 14, "uart1_cts", (void *)(FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+ { 15, "uart1_rts", (void *)(FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+ { 16, "uart2_rx", (void *)(FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+ { 17, "uart2_tx", (void *)(FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+/* TODO { ??, "xtal_out", (void *)(FLAG_BCM4709) }, */
|
||||
+ { 22, "sdio_pwr", (void *)(FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+ { 23, "sdio_en_1p8v", (void *)(FLAG_BCM4709 | FLAG_BCM53012) },
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * Groups
|
||||
+ */
|
||||
+
|
||||
+struct ns_pinctrl_group {
|
||||
+ const char *name;
|
||||
+ const unsigned int *pins;
|
||||
+ const unsigned int num_pins;
|
||||
+ unsigned int chipsets;
|
||||
+};
|
||||
+
|
||||
+static const unsigned int spi_pins[] = { 0, 1, 2, 3 };
|
||||
+static const unsigned int i2c_pins[] = { 4, 5 };
|
||||
+static const unsigned int mdio_pins[] = { 6, 7 };
|
||||
+static const unsigned int pwm0_pins[] = { 8 };
|
||||
+static const unsigned int pwm1_pins[] = { 9 };
|
||||
+static const unsigned int pwm2_pins[] = { 10 };
|
||||
+static const unsigned int pwm3_pins[] = { 11 };
|
||||
+static const unsigned int uart1_pins[] = { 12, 13, 14, 15 };
|
||||
+static const unsigned int uart2_pins[] = { 16, 17 };
|
||||
+static const unsigned int sdio_pwr_pins[] = { 22 };
|
||||
+static const unsigned int sdio_1p8v_pins[] = { 23 };
|
||||
+
|
||||
+#define NS_GROUP(_name, _pins, _chipsets) \
|
||||
+{ \
|
||||
+ .name = _name, \
|
||||
+ .pins = _pins, \
|
||||
+ .num_pins = ARRAY_SIZE(_pins), \
|
||||
+ .chipsets = _chipsets, \
|
||||
+}
|
||||
+
|
||||
+static const struct ns_pinctrl_group ns_pinctrl_groups[] = {
|
||||
+ NS_GROUP("spi_grp", spi_pins, FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012),
|
||||
+ NS_GROUP("i2c_grp", i2c_pins, FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012),
|
||||
+ NS_GROUP("mdio_grp", mdio_pins, FLAG_BCM4709 | FLAG_BCM53012),
|
||||
+ NS_GROUP("pwm0_grp", pwm0_pins, FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012),
|
||||
+ NS_GROUP("pwm1_grp", pwm1_pins, FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012),
|
||||
+ NS_GROUP("pwm2_grp", pwm2_pins, FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012),
|
||||
+ NS_GROUP("pwm3_grp", pwm3_pins, FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012),
|
||||
+ NS_GROUP("uart1_grp", uart1_pins, FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012),
|
||||
+ NS_GROUP("uart2_grp", uart2_pins, FLAG_BCM4709 | FLAG_BCM53012),
|
||||
+ NS_GROUP("sdio_pwr_grp", sdio_pwr_pins, FLAG_BCM4709 | FLAG_BCM53012),
|
||||
+ NS_GROUP("sdio_1p8v_grp", sdio_1p8v_pins, FLAG_BCM4709 | FLAG_BCM53012),
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * Functions
|
||||
+ */
|
||||
+
|
||||
+struct ns_pinctrl_function {
|
||||
+ const char *name;
|
||||
+ const char * const *groups;
|
||||
+ const unsigned int num_groups;
|
||||
+ unsigned int chipsets;
|
||||
+};
|
||||
+
|
||||
+static const char * const spi_groups[] = { "spi_grp" };
|
||||
+static const char * const i2c_groups[] = { "i2c_grp" };
|
||||
+static const char * const mdio_groups[] = { "mdio_grp" };
|
||||
+static const char * const pwm_groups[] = { "pwm0_grp", "pwm1_grp", "pwm2_grp",
|
||||
+ "pwm3_grp" };
|
||||
+static const char * const uart1_groups[] = { "uart1_grp" };
|
||||
+static const char * const uart2_groups[] = { "uart2_grp" };
|
||||
+static const char * const sdio_groups[] = { "sdio_pwr_grp", "sdio_1p8v_grp" };
|
||||
+
|
||||
+#define NS_FUNCTION(_name, _groups, _chipsets) \
|
||||
+{ \
|
||||
+ .name = _name, \
|
||||
+ .groups = _groups, \
|
||||
+ .num_groups = ARRAY_SIZE(_groups), \
|
||||
+ .chipsets = _chipsets, \
|
||||
+}
|
||||
+
|
||||
+static const struct ns_pinctrl_function ns_pinctrl_functions[] = {
|
||||
+ NS_FUNCTION("spi", spi_groups, FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012),
|
||||
+ NS_FUNCTION("i2c", i2c_groups, FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012),
|
||||
+ NS_FUNCTION("mdio", mdio_groups, FLAG_BCM4709 | FLAG_BCM53012),
|
||||
+ NS_FUNCTION("pwm", pwm_groups, FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012),
|
||||
+ NS_FUNCTION("uart1", uart1_groups, FLAG_BCM4708 | FLAG_BCM4709 | FLAG_BCM53012),
|
||||
+ NS_FUNCTION("uart2", uart2_groups, FLAG_BCM4709 | FLAG_BCM53012),
|
||||
+ NS_FUNCTION("sdio", sdio_groups, FLAG_BCM4709 | FLAG_BCM53012),
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * Groups code
|
||||
+ */
|
||||
+
|
||||
+static int ns_pinctrl_get_groups_count(struct pinctrl_dev *pctrl_dev)
|
||||
+{
|
||||
+ struct ns_pinctrl *ns_pinctrl = pinctrl_dev_get_drvdata(pctrl_dev);
|
||||
+
|
||||
+ return ns_pinctrl->num_groups;
|
||||
+}
|
||||
+
|
||||
+static const char *ns_pinctrl_get_group_name(struct pinctrl_dev *pctrl_dev,
|
||||
+ unsigned int selector)
|
||||
+{
|
||||
+ struct ns_pinctrl *ns_pinctrl = pinctrl_dev_get_drvdata(pctrl_dev);
|
||||
+
|
||||
+ return ns_pinctrl->groups[selector].name;
|
||||
+}
|
||||
+
|
||||
+static int ns_pinctrl_get_group_pins(struct pinctrl_dev *pctrl_dev,
|
||||
+ unsigned int selector,
|
||||
+ const unsigned int **pins,
|
||||
+ unsigned int *num_pins)
|
||||
+{
|
||||
+ struct ns_pinctrl *ns_pinctrl = pinctrl_dev_get_drvdata(pctrl_dev);
|
||||
+
|
||||
+ *pins = ns_pinctrl->groups[selector].pins;
|
||||
+ *num_pins = ns_pinctrl->groups[selector].num_pins;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct pinctrl_ops ns_pinctrl_ops = {
|
||||
+ .get_groups_count = ns_pinctrl_get_groups_count,
|
||||
+ .get_group_name = ns_pinctrl_get_group_name,
|
||||
+ .get_group_pins = ns_pinctrl_get_group_pins,
|
||||
+ .dt_node_to_map = pinconf_generic_dt_node_to_map_group,
|
||||
+ .dt_free_map = pinconf_generic_dt_free_map,
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * Functions code
|
||||
+ */
|
||||
+
|
||||
+static int ns_pinctrl_get_functions_count(struct pinctrl_dev *pctrl_dev)
|
||||
+{
|
||||
+ struct ns_pinctrl *ns_pinctrl = pinctrl_dev_get_drvdata(pctrl_dev);
|
||||
+
|
||||
+ return ns_pinctrl->num_functions;
|
||||
+}
|
||||
+
|
||||
+static const char *ns_pinctrl_get_function_name(struct pinctrl_dev *pctrl_dev,
|
||||
+ unsigned int selector)
|
||||
+{
|
||||
+ struct ns_pinctrl *ns_pinctrl = pinctrl_dev_get_drvdata(pctrl_dev);
|
||||
+
|
||||
+ return ns_pinctrl->functions[selector].name;
|
||||
+}
|
||||
+
|
||||
+static int ns_pinctrl_get_function_groups(struct pinctrl_dev *pctrl_dev,
|
||||
+ unsigned int selector,
|
||||
+ const char * const **groups,
|
||||
+ unsigned * const num_groups)
|
||||
+{
|
||||
+ struct ns_pinctrl *ns_pinctrl = pinctrl_dev_get_drvdata(pctrl_dev);
|
||||
+
|
||||
+ *groups = ns_pinctrl->functions[selector].groups;
|
||||
+ *num_groups = ns_pinctrl->functions[selector].num_groups;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int ns_pinctrl_set_mux(struct pinctrl_dev *pctrl_dev,
|
||||
+ unsigned int func_select,
|
||||
+ unsigned int grp_select)
|
||||
+{
|
||||
+ struct ns_pinctrl *ns_pinctrl = pinctrl_dev_get_drvdata(pctrl_dev);
|
||||
+ u32 unset = 0;
|
||||
+ u32 tmp;
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < ns_pinctrl->groups[grp_select].num_pins; i++) {
|
||||
+ int pin_number = ns_pinctrl->groups[grp_select].pins[i];
|
||||
+
|
||||
+ unset |= BIT(pin_number);
|
||||
+ }
|
||||
+
|
||||
+ tmp = readl(ns_pinctrl->base);
|
||||
+ tmp &= ~unset;
|
||||
+ writel(tmp, ns_pinctrl->base);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct pinmux_ops ns_pinctrl_pmxops = {
|
||||
+ .get_functions_count = ns_pinctrl_get_functions_count,
|
||||
+ .get_function_name = ns_pinctrl_get_function_name,
|
||||
+ .get_function_groups = ns_pinctrl_get_function_groups,
|
||||
+ .set_mux = ns_pinctrl_set_mux,
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * Controller code
|
||||
+ */
|
||||
+
|
||||
+static struct pinctrl_desc ns_pinctrl_desc = {
|
||||
+ .name = "pinctrl-ns",
|
||||
+ .pctlops = &ns_pinctrl_ops,
|
||||
+ .pmxops = &ns_pinctrl_pmxops,
|
||||
+};
|
||||
+
|
||||
+static const struct of_device_id ns_pinctrl_of_match_table[] = {
|
||||
+ { .compatible = "brcm,bcm4708-pinmux", .data = (void *)FLAG_BCM4708, },
|
||||
+ { .compatible = "brcm,bcm4709-pinmux", .data = (void *)FLAG_BCM4709, },
|
||||
+ { .compatible = "brcm,bcm53012-pinmux", .data = (void *)FLAG_BCM53012, },
|
||||
+ { }
|
||||
+};
|
||||
+
|
||||
+static int ns_pinctrl_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ const struct of_device_id *of_id;
|
||||
+ struct ns_pinctrl *ns_pinctrl;
|
||||
+ struct pinctrl_desc *pctldesc;
|
||||
+ struct pinctrl_pin_desc *pin;
|
||||
+ struct ns_pinctrl_group *group;
|
||||
+ struct ns_pinctrl_function *function;
|
||||
+ struct resource *res;
|
||||
+ int i;
|
||||
+
|
||||
+ ns_pinctrl = devm_kzalloc(dev, sizeof(*ns_pinctrl), GFP_KERNEL);
|
||||
+ if (!ns_pinctrl)
|
||||
+ return -ENOMEM;
|
||||
+ pctldesc = &ns_pinctrl->pctldesc;
|
||||
+ platform_set_drvdata(pdev, ns_pinctrl);
|
||||
+
|
||||
+ /* Set basic properties */
|
||||
+
|
||||
+ ns_pinctrl->dev = dev;
|
||||
+
|
||||
+ of_id = of_match_device(ns_pinctrl_of_match_table, dev);
|
||||
+ if (!of_id)
|
||||
+ return -EINVAL;
|
||||
+ ns_pinctrl->chipset_flag = (unsigned int)of_id->data;
|
||||
+
|
||||
+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
|
||||
+ "cru_gpio_control");
|
||||
+ ns_pinctrl->base = devm_ioremap_resource(dev, res);
|
||||
+ if (IS_ERR(ns_pinctrl->base)) {
|
||||
+ dev_err(dev, "Failed to map pinctrl regs\n");
|
||||
+ return PTR_ERR(ns_pinctrl->base);
|
||||
+ }
|
||||
+
|
||||
+ memcpy(pctldesc, &ns_pinctrl_desc, sizeof(*pctldesc));
|
||||
+
|
||||
+ /* Set pinctrl properties */
|
||||
+
|
||||
+ pctldesc->pins = devm_kcalloc(dev, ARRAY_SIZE(ns_pinctrl_pins),
|
||||
+ sizeof(struct pinctrl_pin_desc),
|
||||
+ GFP_KERNEL);
|
||||
+ if (!pctldesc->pins)
|
||||
+ return -ENOMEM;
|
||||
+ for (i = 0, pin = (struct pinctrl_pin_desc *)&pctldesc->pins[0];
|
||||
+ i < ARRAY_SIZE(ns_pinctrl_pins); i++) {
|
||||
+ const struct pinctrl_pin_desc *src = &ns_pinctrl_pins[i];
|
||||
+ unsigned int chipsets = (unsigned int)src->drv_data;
|
||||
+
|
||||
+ if (chipsets & ns_pinctrl->chipset_flag) {
|
||||
+ memcpy(pin++, src, sizeof(*src));
|
||||
+ pctldesc->npins++;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ ns_pinctrl->groups = devm_kcalloc(dev, ARRAY_SIZE(ns_pinctrl_groups),
|
||||
+ sizeof(struct ns_pinctrl_group),
|
||||
+ GFP_KERNEL);
|
||||
+ if (!ns_pinctrl->groups)
|
||||
+ return -ENOMEM;
|
||||
+ for (i = 0, group = &ns_pinctrl->groups[0];
|
||||
+ i < ARRAY_SIZE(ns_pinctrl_groups); i++) {
|
||||
+ const struct ns_pinctrl_group *src = &ns_pinctrl_groups[i];
|
||||
+
|
||||
+ if (src->chipsets & ns_pinctrl->chipset_flag) {
|
||||
+ memcpy(group++, src, sizeof(*src));
|
||||
+ ns_pinctrl->num_groups++;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ ns_pinctrl->functions = devm_kcalloc(dev,
|
||||
+ ARRAY_SIZE(ns_pinctrl_functions),
|
||||
+ sizeof(struct ns_pinctrl_function),
|
||||
+ GFP_KERNEL);
|
||||
+ if (!ns_pinctrl->functions)
|
||||
+ return -ENOMEM;
|
||||
+ for (i = 0, function = &ns_pinctrl->functions[0];
|
||||
+ i < ARRAY_SIZE(ns_pinctrl_functions); i++) {
|
||||
+ const struct ns_pinctrl_function *src = &ns_pinctrl_functions[i];
|
||||
+
|
||||
+ if (src->chipsets & ns_pinctrl->chipset_flag) {
|
||||
+ memcpy(function++, src, sizeof(*src));
|
||||
+ ns_pinctrl->num_functions++;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* Register */
|
||||
+
|
||||
+ ns_pinctrl->pctldev = devm_pinctrl_register(dev, pctldesc, ns_pinctrl);
|
||||
+ if (IS_ERR(ns_pinctrl->pctldev)) {
|
||||
+ dev_err(dev, "Failed to register pinctrl\n");
|
||||
+ return PTR_ERR(ns_pinctrl->pctldev);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct platform_driver ns_pinctrl_driver = {
|
||||
+ .probe = ns_pinctrl_probe,
|
||||
+ .driver = {
|
||||
+ .name = "ns-pinmux",
|
||||
+ .of_match_table = ns_pinctrl_of_match_table,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+module_platform_driver(ns_pinctrl_driver);
|
||||
+
|
||||
+MODULE_AUTHOR("Rafał Miłecki");
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
+MODULE_DEVICE_TABLE(of, ns_pinctrl_of_match_table);
|
||||
@ -1,38 +0,0 @@
|
||||
From ce7bdb957b8e3f1cbf0a3358f1deef385dff6502 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Thu, 11 Oct 2018 13:23:40 +0200
|
||||
Subject: [PATCH] pinctrl: bcm: ns: Use uintptr_t for casting data
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Fix up a compiler error on 64bit architectures where pointers
|
||||
and integers differ in size.
|
||||
|
||||
Suggested-by: Arnd Bergmann <arnd@arndb.de>
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
drivers/pinctrl/bcm/pinctrl-ns.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/pinctrl/bcm/pinctrl-ns.c
|
||||
+++ b/drivers/pinctrl/bcm/pinctrl-ns.c
|
||||
@@ -285,7 +285,7 @@ static int ns_pinctrl_probe(struct platf
|
||||
of_id = of_match_device(ns_pinctrl_of_match_table, dev);
|
||||
if (!of_id)
|
||||
return -EINVAL;
|
||||
- ns_pinctrl->chipset_flag = (unsigned int)of_id->data;
|
||||
+ ns_pinctrl->chipset_flag = (uintptr_t)of_id->data;
|
||||
|
||||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
|
||||
"cru_gpio_control");
|
||||
@@ -307,7 +307,7 @@ static int ns_pinctrl_probe(struct platf
|
||||
for (i = 0, pin = (struct pinctrl_pin_desc *)&pctldesc->pins[0];
|
||||
i < ARRAY_SIZE(ns_pinctrl_pins); i++) {
|
||||
const struct pinctrl_pin_desc *src = &ns_pinctrl_pins[i];
|
||||
- unsigned int chipsets = (unsigned int)src->drv_data;
|
||||
+ unsigned int chipsets = (uintptr_t)src->drv_data;
|
||||
|
||||
if (chipsets & ns_pinctrl->chipset_flag) {
|
||||
memcpy(pin++, src, sizeof(*src));
|
||||
@ -1,99 +0,0 @@
|
||||
From a49d784d5a8272d0f63c448fe8dc69e589db006e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Tue, 18 Dec 2018 16:58:08 +0100
|
||||
Subject: [PATCH] pinctrl: bcm: ns: support updated DT binding as syscon
|
||||
subnode
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Documentation has been recently updated specifying that pinctrl should
|
||||
be subnode of the CRU "syscon". Support that by using parent node for
|
||||
regmap and reading "offset" property from the DT.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
drivers/pinctrl/bcm/pinctrl-ns.c | 29 +++++++++++++++++++----------
|
||||
1 file changed, 19 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/drivers/pinctrl/bcm/pinctrl-ns.c
|
||||
+++ b/drivers/pinctrl/bcm/pinctrl-ns.c
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <linux/err.h>
|
||||
#include <linux/io.h>
|
||||
+#include <linux/mfd/syscon.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
@@ -12,6 +13,7 @@
|
||||
#include <linux/pinctrl/pinctrl.h>
|
||||
#include <linux/pinctrl/pinmux.h>
|
||||
#include <linux/platform_device.h>
|
||||
+#include <linux/regmap.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#define FLAG_BCM4708 BIT(1)
|
||||
@@ -22,7 +24,8 @@ struct ns_pinctrl {
|
||||
struct device *dev;
|
||||
unsigned int chipset_flag;
|
||||
struct pinctrl_dev *pctldev;
|
||||
- void __iomem *base;
|
||||
+ struct regmap *regmap;
|
||||
+ u32 offset;
|
||||
|
||||
struct pinctrl_desc pctldesc;
|
||||
struct ns_pinctrl_group *groups;
|
||||
@@ -229,9 +232,9 @@ static int ns_pinctrl_set_mux(struct pin
|
||||
unset |= BIT(pin_number);
|
||||
}
|
||||
|
||||
- tmp = readl(ns_pinctrl->base);
|
||||
+ regmap_read(ns_pinctrl->regmap, ns_pinctrl->offset, &tmp);
|
||||
tmp &= ~unset;
|
||||
- writel(tmp, ns_pinctrl->base);
|
||||
+ regmap_write(ns_pinctrl->regmap, ns_pinctrl->offset, tmp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -263,13 +266,13 @@ static const struct of_device_id ns_pinc
|
||||
static int ns_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
+ struct device_node *np = dev->of_node;
|
||||
const struct of_device_id *of_id;
|
||||
struct ns_pinctrl *ns_pinctrl;
|
||||
struct pinctrl_desc *pctldesc;
|
||||
struct pinctrl_pin_desc *pin;
|
||||
struct ns_pinctrl_group *group;
|
||||
struct ns_pinctrl_function *function;
|
||||
- struct resource *res;
|
||||
int i;
|
||||
|
||||
ns_pinctrl = devm_kzalloc(dev, sizeof(*ns_pinctrl), GFP_KERNEL);
|
||||
@@ -287,12 +290,18 @@ static int ns_pinctrl_probe(struct platf
|
||||
return -EINVAL;
|
||||
ns_pinctrl->chipset_flag = (uintptr_t)of_id->data;
|
||||
|
||||
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
|
||||
- "cru_gpio_control");
|
||||
- ns_pinctrl->base = devm_ioremap_resource(dev, res);
|
||||
- if (IS_ERR(ns_pinctrl->base)) {
|
||||
- dev_err(dev, "Failed to map pinctrl regs\n");
|
||||
- return PTR_ERR(ns_pinctrl->base);
|
||||
+ ns_pinctrl->regmap = syscon_node_to_regmap(of_get_parent(np));
|
||||
+ if (IS_ERR(ns_pinctrl->regmap)) {
|
||||
+ int err = PTR_ERR(ns_pinctrl->regmap);
|
||||
+
|
||||
+ dev_err(dev, "Failed to map pinctrl regs: %d\n", err);
|
||||
+
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ if (of_property_read_u32(np, "offset", &ns_pinctrl->offset)) {
|
||||
+ dev_err(dev, "Failed to get register offset\n");
|
||||
+ return -ENOENT;
|
||||
}
|
||||
|
||||
memcpy(pctldesc, &ns_pinctrl_desc, sizeof(*pctldesc));
|
||||
@ -1,80 +0,0 @@
|
||||
From: Dan Haab <dan.haab@legrand.com>
|
||||
Date: Wed, 2 Oct 2019 09:57:26 -0600
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Add DT for Luxul XWC-2000
|
||||
|
||||
It's a simple network device based on BCM47094 with just a single
|
||||
Ethernet port.
|
||||
|
||||
Signed-off-by: Dan Haab <dan.haab@legrand.com>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts | 53 +++++++++++++++++++
|
||||
2 files changed, 54 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -105,6 +105,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm47094-luxul-abr-4500.dtb \
|
||||
bcm47094-luxul-xap-1610.dtb \
|
||||
bcm47094-luxul-xbr-4500.dtb \
|
||||
+ bcm47094-luxul-xwc-2000.dtb \
|
||||
bcm47094-luxul-xwr-3100.dtb \
|
||||
bcm47094-luxul-xwr-3150-v1.dtb \
|
||||
bcm47094-netgear-r8500.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts
|
||||
@@ -0,0 +1,53 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
+/*
|
||||
+ * Copyright 2019 Legrand AV Inc.
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "bcm47094.dtsi"
|
||||
+#include "bcm5301x-nand-cs0-bch8.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "luxul,xwc-2000-v1", "brcm,bcm47094", "brcm,bcm4708";
|
||||
+ model = "Luxul XWC-2000 V1";
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "earlycon";
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0x00000000 0x08000000
|
||||
+ 0x88000000 0x18000000>;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ status {
|
||||
+ label = "bcm53xx:green:status";
|
||||
+ gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "timer";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ restart {
|
||||
+ label = "Reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&spi_nor {
|
||||
+ status = "okay";
|
||||
+};
|
||||
@ -1,137 +0,0 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Sat, 1 Oct 2016 22:54:48 +0200
|
||||
Subject: [PATCH] usb: xhci: add support for performing fake doorbell
|
||||
|
||||
Broadcom's Northstar XHCI controllers seem to need a special start
|
||||
procedure to work correctly. There isn't any official documentation of
|
||||
this, the problem is that controller doesn't detect any connected
|
||||
devices with default setup. Moreover connecting USB device to controller
|
||||
that doesn't run properly can cause SoC's watchdog issues.
|
||||
|
||||
A workaround that was successfully tested on multiple devices is to
|
||||
perform a fake doorbell. This patch adds code for doing this and enables
|
||||
it on BCM4708 family.
|
||||
---
|
||||
drivers/usb/host/xhci-plat.c | 6 +++++
|
||||
drivers/usb/host/xhci.c | 63 +++++++++++++++++++++++++++++++++++++++++---
|
||||
drivers/usb/host/xhci.h | 1 +
|
||||
3 files changed, 67 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/usb/host/xhci-plat.c
|
||||
+++ b/drivers/usb/host/xhci-plat.c
|
||||
@@ -67,12 +67,18 @@ static int xhci_priv_resume_quirk(struct
|
||||
|
||||
static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
{
|
||||
+ struct platform_device *pdev = to_platform_device(dev);
|
||||
+ struct device_node *node = pdev->dev.of_node;
|
||||
+
|
||||
/*
|
||||
* As of now platform drivers don't provide MSI support so we ensure
|
||||
* here that the generic code does not try to make a pci_dev from our
|
||||
* dev struct in order to setup MSI
|
||||
*/
|
||||
xhci->quirks |= XHCI_PLAT;
|
||||
+
|
||||
+ if (node && of_machine_is_compatible("brcm,bcm4708"))
|
||||
+ xhci->quirks |= XHCI_FAKE_DOORBELL;
|
||||
}
|
||||
|
||||
/* called during probe() after chip reset completes */
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -166,6 +166,49 @@ int xhci_start(struct xhci_hcd *xhci)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * xhci_fake_doorbell - Perform a fake doorbell on a specified slot
|
||||
+ *
|
||||
+ * Some controllers require a fake doorbell to start correctly. Without that
|
||||
+ * they simply don't detect any devices.
|
||||
+ */
|
||||
+static int xhci_fake_doorbell(struct xhci_hcd *xhci, int slot_id)
|
||||
+{
|
||||
+ u32 temp;
|
||||
+
|
||||
+ /* Alloc a virt device for that slot */
|
||||
+ if (!xhci_alloc_virt_device(xhci, slot_id, NULL, GFP_NOIO)) {
|
||||
+ xhci_warn(xhci, "Could not allocate xHCI USB device data structures\n");
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ /* Ring fake doorbell for slot_id ep 0 */
|
||||
+ xhci_ring_ep_doorbell(xhci, slot_id, 0, 0);
|
||||
+ usleep_range(1000, 1500);
|
||||
+
|
||||
+ /* Read the status to check if HSE is set or not */
|
||||
+ temp = readl(&xhci->op_regs->status);
|
||||
+
|
||||
+ /* Clear HSE if set */
|
||||
+ if (temp & STS_FATAL) {
|
||||
+ xhci_dbg(xhci, "HSE problem detected, status: 0x%08x\n", temp);
|
||||
+ temp &= ~0x1fff;
|
||||
+ temp |= STS_FATAL;
|
||||
+ writel(temp, &xhci->op_regs->status);
|
||||
+ usleep_range(1000, 1500);
|
||||
+ readl(&xhci->op_regs->status);
|
||||
+ }
|
||||
+
|
||||
+ /* Free virt device */
|
||||
+ xhci_free_virt_device(xhci, slot_id);
|
||||
+
|
||||
+ /* We're done if controller is already running */
|
||||
+ if (readl(&xhci->op_regs->command) & CMD_RUN)
|
||||
+ return 0;
|
||||
+
|
||||
+ return xhci_start(xhci);
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Reset a halted HC.
|
||||
*
|
||||
@@ -549,10 +592,20 @@ static int xhci_init(struct usb_hcd *hcd
|
||||
|
||||
static int xhci_run_finished(struct xhci_hcd *xhci)
|
||||
{
|
||||
- if (xhci_start(xhci)) {
|
||||
- xhci_halt(xhci);
|
||||
- return -ENODEV;
|
||||
+ int err;
|
||||
+
|
||||
+ err = xhci_start(xhci);
|
||||
+ if (err) {
|
||||
+ err = -ENODEV;
|
||||
+ goto err_halt;
|
||||
}
|
||||
+
|
||||
+ if (xhci->quirks & XHCI_FAKE_DOORBELL) {
|
||||
+ err = xhci_fake_doorbell(xhci, 1);
|
||||
+ if (err)
|
||||
+ goto err_halt;
|
||||
+ }
|
||||
+
|
||||
xhci->shared_hcd->state = HC_STATE_RUNNING;
|
||||
xhci->cmd_ring_state = CMD_RING_STATE_RUNNING;
|
||||
|
||||
@@ -562,6 +615,10 @@ static int xhci_run_finished(struct xhci
|
||||
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
|
||||
"Finished xhci_run for USB3 roothub");
|
||||
return 0;
|
||||
+
|
||||
+err_halt:
|
||||
+ xhci_halt(xhci);
|
||||
+ return err;
|
||||
}
|
||||
|
||||
/*
|
||||
--- a/drivers/usb/host/xhci.h
|
||||
+++ b/drivers/usb/host/xhci.h
|
||||
@@ -1840,6 +1840,7 @@ struct xhci_hcd {
|
||||
#define XHCI_INTEL_USB_ROLE_SW BIT_ULL(31)
|
||||
#define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34)
|
||||
#define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35)
|
||||
+#define XHCI_FAKE_DOORBELL BIT_ULL(36)
|
||||
|
||||
unsigned int num_active_eps;
|
||||
unsigned int limit_active_eps;
|
||||
@ -1,101 +0,0 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Wed, 24 Sep 2014 22:14:07 +0200
|
||||
Subject: [PATCH] ARM: BCM5301X: Disable MMU and Dcache during decompression
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Broadcom devices have broken CFE (bootloader) that leaves hardware in an
|
||||
invalid state. It causes problems with booting Linux. On Northstar
|
||||
devices kernel was randomly hanging in ~25% of tries during early init.
|
||||
Hangs used to happen at random places in the start_kernel. On BCM53573
|
||||
kernel doesn't even seem to start booting.
|
||||
|
||||
To workaround this problem we need to do following very early:
|
||||
1) Clear 2 following bits in the SCTLR register:
|
||||
#define CR_M (1 << 0) /* MMU enable */
|
||||
#define CR_C (1 << 2) /* Dcache enable */
|
||||
2) Flush the whole D-cache
|
||||
3) Disable L2 cache
|
||||
|
||||
Unfortunately this patch is not upstreamable as it does above things
|
||||
unconditionally. We can't check if we are running on Broadcom platform
|
||||
in any safe way and doing such hacks with ARCH_MULTI_V7 is unacceptable
|
||||
as it could break other devices support.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
|
||||
--- a/arch/arm/boot/compressed/Makefile
|
||||
+++ b/arch/arm/boot/compressed/Makefile
|
||||
@@ -32,6 +32,11 @@ ifeq ($(CONFIG_ARCH_ACORN),y)
|
||||
OBJS += ll_char_wr.o font.o
|
||||
endif
|
||||
|
||||
+ifeq ($(CONFIG_ARCH_BCM_5301X),y)
|
||||
+OBJS += head-bcm_5301x-mpcore.o
|
||||
+OBJS += cache-v7-min.o
|
||||
+endif
|
||||
+
|
||||
ifeq ($(CONFIG_ARCH_SA1100),y)
|
||||
OBJS += head-sa1100.o
|
||||
endif
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/compressed/head-bcm_5301x-mpcore.S
|
||||
@@ -0,0 +1,37 @@
|
||||
+/*
|
||||
+ *
|
||||
+ * Platform specific tweaks. This is merged into head.S by the linker.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#include <linux/linkage.h>
|
||||
+#include <asm/assembler.h>
|
||||
+#include <asm/cp15.h>
|
||||
+
|
||||
+ .section ".start", "ax"
|
||||
+
|
||||
+/*
|
||||
+ * This code section is spliced into the head code by the linker
|
||||
+ */
|
||||
+
|
||||
+__plat_uncompress_start:
|
||||
+
|
||||
+ @ Preserve r8/r7 i.e. kernel entry values
|
||||
+ mov r12, r8
|
||||
+
|
||||
+ @ Clear MMU enable and Dcache enable bits
|
||||
+ mrc p15, 0, r0, c1, c0, 0 @ Read SCTLR
|
||||
+ bic r0, #CR_C|CR_M
|
||||
+ mcr p15, 0, r0, c1, c0, 0 @ Write SCTLR
|
||||
+ nop
|
||||
+
|
||||
+ @ Call the cache invalidation routine
|
||||
+ bl v7_flush_dcache_all
|
||||
+ nop
|
||||
+ mov r0,#0
|
||||
+ ldr r3, =0x19022000 @ L2 cache controller, control reg
|
||||
+ str r0, [r3, #0x100] @ Disable L2 cache
|
||||
+ nop
|
||||
+
|
||||
+ @ Restore
|
||||
+ mov r8, r12
|
||||
--- a/arch/arm/boot/compressed/cache-v7-min.S
|
||||
+++ b/arch/arm/boot/compressed/cache-v7-min.S
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/init.h>
|
||||
+#include <asm/assembler.h>
|
||||
|
||||
__INIT
|
||||
|
||||
@@ -63,7 +64,7 @@ loop2:
|
||||
ARM( orr r11, r11, r9, lsl r2 ) @ factor index number into r11
|
||||
THUMB( lsl r6, r9, r2 )
|
||||
THUMB( orr r11, r11, r6 ) @ factor index number into r11
|
||||
- mcr p15, 0, r11, c7, c14, 2 @ clean & invalidate by set/way
|
||||
+ mcr p15, 0, r11, c7, c6, 2 @ clean & invalidate by set/way
|
||||
subs r9, r9, #1 @ decrement the index
|
||||
bge loop2
|
||||
subs r4, r4, #1 @ decrement the way
|
||||
@ -1,31 +0,0 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Update Northstar pinctrl binding
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm5301x.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
|
||||
@@ -400,16 +400,12 @@
|
||||
#size-cells = <1>;
|
||||
|
||||
cru@100 {
|
||||
- compatible = "simple-bus";
|
||||
+ compatible = "syscon", "simple-mfd";
|
||||
reg = <0x100 0x1a4>;
|
||||
- ranges;
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <1>;
|
||||
|
||||
- pin-controller@1c0 {
|
||||
+ pinctrl {
|
||||
compatible = "brcm,bcm4708-pinmux";
|
||||
- reg = <0x1c0 0x24>;
|
||||
- reg-names = "cru_gpio_control";
|
||||
+ offset = <0xc0>;
|
||||
|
||||
spi-pins {
|
||||
groups = "spi_grp";
|
||||
@ -1,64 +0,0 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Subject: [PATCH] ARM: BCM5301X: Add DT for Netgear R7900
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
---
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -98,6 +98,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm4709-buffalo-wxr-1900dhp.dtb \
|
||||
bcm4709-linksys-ea9200.dtb \
|
||||
bcm4709-netgear-r7000.dtb \
|
||||
+ bcm4709-netgear-r7900.dtb \
|
||||
bcm4709-netgear-r8000.dtb \
|
||||
bcm4709-tplink-archer-c9-v1.dtb \
|
||||
bcm47094-dlink-dir-885l.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm4709-netgear-r7900.dts
|
||||
@@ -0,0 +1,42 @@
|
||||
+/*
|
||||
+ * Broadcom BCM470X / BCM5301X ARM platform code.
|
||||
+ * DTS for Netgear R7900
|
||||
+ *
|
||||
+ * Copyright (C) 2016 Rafał Miłecki <zajec5@gmail.com>
|
||||
+ *
|
||||
+ * Licensed under the GNU/GPL. See COPYING for details.
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "bcm4709.dtsi"
|
||||
+#include "bcm5301x-nand-cs0-bch8.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "netgear,r7900", "brcm,bcm4709", "brcm,bcm4708";
|
||||
+ model = "Netgear R7900";
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "console=ttyS0,115200";
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0x00000000 0x08000000
|
||||
+ 0x88000000 0x08000000>;
|
||||
+ };
|
||||
+
|
||||
+ axi@18000000 {
|
||||
+ usb3@23000 {
|
||||
+ reg = <0x00023000 0x1000>;
|
||||
+
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
@ -1,20 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Subject: [PATCH] ARM: BCM5301X: Add power button for Buffalo WZR-1750DHP
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
--- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
|
||||
+++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
|
||||
@@ -101,6 +101,12 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
+ power {
|
||||
+ label = "Power";
|
||||
+ linux,code = <KEY_POWER>;
|
||||
+ gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
restart {
|
||||
label = "Reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
@ -1,116 +0,0 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Add serial= to the bootargs
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
It's enough to have proper stdout-path for getting serial working but
|
||||
for some reason LEDE doesn't offer "Please press Enter to activate this
|
||||
console." unless ttyS0 is specified.
|
||||
|
||||
This is a workaround to get serial working in LEDE.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
|
||||
@@ -12,7 +12,7 @@
|
||||
model = "TP-LINK Archer C5 V2";
|
||||
|
||||
chosen {
|
||||
- bootargs = "earlycon";
|
||||
+ bootargs = "console=ttyS0,115200 earlycon";
|
||||
};
|
||||
|
||||
memory {
|
||||
--- a/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
|
||||
@@ -13,7 +13,7 @@
|
||||
model = "Luxul ABR-4500 V1";
|
||||
|
||||
chosen {
|
||||
- bootargs = "earlycon";
|
||||
+ bootargs = "console=ttyS0,115200 earlycon";
|
||||
};
|
||||
|
||||
memory {
|
||||
--- a/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
|
||||
@@ -13,7 +13,7 @@
|
||||
model = "Luxul XBR-4500 V1";
|
||||
|
||||
chosen {
|
||||
- bootargs = "earlycon";
|
||||
+ bootargs = "console=ttyS0,115200 earlycon";
|
||||
};
|
||||
|
||||
memory {
|
||||
--- a/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts
|
||||
@@ -12,7 +12,7 @@
|
||||
model = "Luxul XAP-1440 V1";
|
||||
|
||||
chosen {
|
||||
- bootargs = "earlycon";
|
||||
+ bootargs = "console=ttyS0,115200 earlycon";
|
||||
};
|
||||
|
||||
memory {
|
||||
--- a/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts
|
||||
@@ -12,7 +12,7 @@
|
||||
model = "Luxul XAP-810 V1";
|
||||
|
||||
chosen {
|
||||
- bootargs = "earlycon";
|
||||
+ bootargs = "console=ttyS0,115200 earlycon";
|
||||
};
|
||||
|
||||
memory {
|
||||
--- a/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts
|
||||
@@ -12,7 +12,7 @@
|
||||
model = "Luxul XAP-1610 V1";
|
||||
|
||||
chosen {
|
||||
- bootargs = "earlycon";
|
||||
+ bootargs = "console=ttyS0,115200 earlycon";
|
||||
};
|
||||
|
||||
memory {
|
||||
--- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
|
||||
@@ -13,7 +13,7 @@
|
||||
model = "Luxul XWR-3150 V1";
|
||||
|
||||
chosen {
|
||||
- bootargs = "earlycon";
|
||||
+ bootargs = "console=ttyS0,115200 earlycon";
|
||||
};
|
||||
|
||||
memory {
|
||||
--- a/arch/arm/boot/dts/bcm47094-phicomm-k3.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-phicomm-k3.dts
|
||||
@@ -13,6 +13,10 @@
|
||||
compatible = "phicomm,k3", "brcm,bcm47094", "brcm,bcm4708";
|
||||
model = "Phicomm K3";
|
||||
|
||||
+ chosen {
|
||||
+ bootargs = "console=ttyS0,115200";
|
||||
+ };
|
||||
+
|
||||
memory {
|
||||
reg = <0x00000000 0x08000000
|
||||
0x88000000 0x18000000>;
|
||||
--- a/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts
|
||||
@@ -13,7 +13,7 @@
|
||||
model = "Luxul XWC-2000 V1";
|
||||
|
||||
chosen {
|
||||
- bootargs = "earlycon";
|
||||
+ bootargs = "console=ttyS0,115200 earlycon";
|
||||
};
|
||||
|
||||
memory {
|
||||
@ -1,25 +0,0 @@
|
||||
From 7166207bd1d8c46d09d640d46afc685df9bb9083 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Thu, 22 Nov 2018 09:21:49 +0100
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Describe partition formats
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
It's needed by OpenWrt for custom partitioning.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
|
||||
@@ -34,6 +34,7 @@
|
||||
partition@0 {
|
||||
label = "firmware";
|
||||
reg = <0x00000000 0x08000000>;
|
||||
+ compatible = "seama";
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -1,34 +0,0 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Subject: [PATCH] mtd: spi-nor: detect JEDEC incompatible w25q128 using 0x90
|
||||
command
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Some w25q128 chipsets don't support RDID (0x9f) command, they reply with
|
||||
0xff-s only. To suppose such flashes fallback to the 0x90 command.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
---
|
||||
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -1230,6 +1230,18 @@ static const struct flash_info *spi_nor_
|
||||
}
|
||||
dev_err(nor->dev, "unrecognized JEDEC id bytes: %02x, %02x, %02x\n",
|
||||
id[0], id[1], id[2]);
|
||||
+
|
||||
+ tmp = nor->read_reg(nor, 0x90, id, SPI_NOR_MAX_ID_LEN);
|
||||
+ if (tmp < 0) {
|
||||
+ dev_dbg(nor->dev, " error %d reading JEDEC ID\n", tmp);
|
||||
+ return ERR_PTR(tmp);
|
||||
+ }
|
||||
+ dev_info(nor->dev, "using Read Manufacturer / Device ID command (0x%02x) returned %02x %02x\n",
|
||||
+ 0x90, id[0x03], id[0x04]);
|
||||
+ if (id[0x03] == 0xef && id[0x04] == 0x17) {
|
||||
+ return spi_nor_match_id("w25q128");
|
||||
+ }
|
||||
+
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
|
||||
@ -1,59 +0,0 @@
|
||||
From 2a2af518266a29323cf30c3f9ba9ef2ceb1dd84b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Date: Thu, 16 Oct 2014 20:52:16 +0200
|
||||
Subject: [PATCH] UBI: Detect EOF mark and erase all remaining blocks
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
---
|
||||
drivers/mtd/ubi/attach.c | 5 +++++
|
||||
drivers/mtd/ubi/io.c | 4 ++++
|
||||
drivers/mtd/ubi/ubi.h | 1 +
|
||||
3 files changed, 10 insertions(+)
|
||||
|
||||
--- a/drivers/mtd/ubi/attach.c
|
||||
+++ b/drivers/mtd/ubi/attach.c
|
||||
@@ -95,6 +95,9 @@ static int self_check_ai(struct ubi_devi
|
||||
#define AV_ADD BIT(1)
|
||||
#define AV_FIND_OR_ADD (AV_FIND | AV_ADD)
|
||||
|
||||
+/* Set on finding block with 0xdeadc0de, indicates erasing all blocks behind */
|
||||
+bool erase_all_next;
|
||||
+
|
||||
/**
|
||||
* find_or_add_av - internal function to find a volume, add a volume or do
|
||||
* both (find and add if missing).
|
||||
@@ -1592,6 +1595,8 @@ int ubi_attach(struct ubi_device *ubi, i
|
||||
if (!ai)
|
||||
return -ENOMEM;
|
||||
|
||||
+ erase_all_next = false;
|
||||
+
|
||||
#ifdef CONFIG_MTD_UBI_FASTMAP
|
||||
/* On small flash devices we disable fastmap in any case. */
|
||||
if ((int)mtd_div_by_eb(ubi->mtd->size, ubi->mtd) <= UBI_FM_MAX_START) {
|
||||
--- a/drivers/mtd/ubi/io.c
|
||||
+++ b/drivers/mtd/ubi/io.c
|
||||
@@ -759,6 +759,10 @@ int ubi_io_read_ec_hdr(struct ubi_device
|
||||
}
|
||||
|
||||
magic = be32_to_cpu(ec_hdr->magic);
|
||||
+ if (magic == 0xdeadc0de)
|
||||
+ erase_all_next = true;
|
||||
+ if (erase_all_next)
|
||||
+ return read_err ? UBI_IO_FF_BITFLIPS : UBI_IO_FF;
|
||||
if (magic != UBI_EC_HDR_MAGIC) {
|
||||
if (mtd_is_eccerr(read_err))
|
||||
return UBI_IO_BAD_HDR_EBADMSG;
|
||||
--- a/drivers/mtd/ubi/ubi.h
|
||||
+++ b/drivers/mtd/ubi/ubi.h
|
||||
@@ -829,6 +829,7 @@ extern struct mutex ubi_devices_mutex;
|
||||
extern struct blocking_notifier_head ubi_notifiers;
|
||||
|
||||
/* attach.c */
|
||||
+extern bool erase_all_next;
|
||||
struct ubi_ainf_peb *ubi_alloc_aeb(struct ubi_attach_info *ai, int pnum,
|
||||
int ec);
|
||||
void ubi_free_aeb(struct ubi_attach_info *ai, struct ubi_ainf_peb *aeb);
|
||||
@ -1,52 +0,0 @@
|
||||
From 4abdde3ad6bc0b3b157c4bf6ec0bf139d11d07e8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Date: Wed, 13 May 2015 14:13:28 +0200
|
||||
Subject: [PATCH] b53: add hacky CPU port fixes for devices not using port 5
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
---
|
||||
drivers/net/phy/b53/b53_common.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
--- a/drivers/net/phy/b53/b53_common.c
|
||||
+++ b/drivers/net/phy/b53/b53_common.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_net.h>
|
||||
#include <linux/platform_data/b53.h>
|
||||
+#include <linux/of.h>
|
||||
|
||||
#include "b53_regs.h"
|
||||
#include "b53_priv.h"
|
||||
@@ -1579,6 +1580,28 @@ static int b53_switch_init(struct b53_de
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ /* Set correct CPU port */
|
||||
+ if (of_machine_is_compatible("asus,rt-ac87u"))
|
||||
+ sw_dev->cpu_port = 7;
|
||||
+ else if (of_machine_is_compatible("netgear,r7900"))
|
||||
+ sw_dev->cpu_port = 8;
|
||||
+ else if (of_machine_is_compatible("netgear,r8000"))
|
||||
+ sw_dev->cpu_port = 8;
|
||||
+ else if (of_machine_is_compatible("netgear,r8500"))
|
||||
+ sw_dev->cpu_port = 8;
|
||||
+
|
||||
+ /* Enable extra ports */
|
||||
+ if (of_machine_is_compatible("tenda,ac9"))
|
||||
+ dev->enabled_ports |= BIT(5);
|
||||
+
|
||||
+ /*
|
||||
+ * Workaround for devices using port 8 (connected to the 3rd iface).
|
||||
+ * For some reason it doesn't work (no packets on eth2).
|
||||
+ */
|
||||
+ if (of_machine_is_compatible("netgear,r7900") ||
|
||||
+ of_machine_is_compatible("netgear,r8000"))
|
||||
+ sw_dev->cpu_port = 5;
|
||||
+
|
||||
dev->enabled_ports |= BIT(sw_dev->cpu_port);
|
||||
sw_dev->ports = fls(dev->enabled_ports);
|
||||
|
||||
@ -1,80 +0,0 @@
|
||||
From 6f1c62440eb6846cb8045d7a5480ec7bbe47c96f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Mon, 15 Aug 2016 10:30:41 +0200
|
||||
Subject: [PATCH] BCM53573 minor hacks
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm53573.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm53573.dtsi
|
||||
@@ -53,6 +53,7 @@
|
||||
<GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
|
||||
<GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
|
||||
<GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ clocks = <&ilp>;
|
||||
};
|
||||
|
||||
clocks {
|
||||
--- a/drivers/bcma/main.c
|
||||
+++ b/drivers/bcma/main.c
|
||||
@@ -326,14 +326,6 @@ static int bcma_register_devices(struct
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef CONFIG_BCMA_SFLASH
|
||||
- if (bus->drv_cc.sflash.present) {
|
||||
- err = platform_device_register(&bcma_sflash_dev);
|
||||
- if (err)
|
||||
- bcma_err(bus, "Error registering serial flash\n");
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
#ifdef CONFIG_BCMA_NFLASH
|
||||
if (bus->drv_cc.nflash.present) {
|
||||
err = platform_device_register(&bcma_nflash_dev);
|
||||
@@ -411,6 +403,14 @@ int bcma_bus_register(struct bcma_bus *b
|
||||
bcma_register_core(bus, core);
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_BCMA_SFLASH
|
||||
+ if (bus->drv_cc.sflash.present) {
|
||||
+ err = platform_device_register(&bcma_sflash_dev);
|
||||
+ if (err)
|
||||
+ bcma_err(bus, "Error registering serial flash\n");
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
/* Try to get SPROM */
|
||||
err = bcma_sprom_get(bus);
|
||||
if (err == -ENOENT) {
|
||||
--- a/drivers/clocksource/arm_arch_timer.c
|
||||
+++ b/drivers/clocksource/arm_arch_timer.c
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <linux/smp.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/cpu_pm.h>
|
||||
+#include <linux/clk.h>
|
||||
#include <linux/clockchips.h>
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/interrupt.h>
|
||||
@@ -836,6 +837,16 @@ static void arch_timer_of_configure_rate
|
||||
if (of_property_read_u32(np, "clock-frequency", &arch_timer_rate))
|
||||
arch_timer_rate = rate;
|
||||
|
||||
+ /* Get clk rate through clk driver if present */
|
||||
+ if (!arch_timer_rate) {
|
||||
+ struct clk *clk = of_clk_get(np, 0);
|
||||
+
|
||||
+ if (!IS_ERR(clk)) {
|
||||
+ if (!clk_prepare_enable(clk))
|
||||
+ arch_timer_rate = clk_get_rate(clk);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* Check the timer frequency. */
|
||||
if (arch_timer_rate == 0)
|
||||
pr_warn("frequency not available\n");
|
||||
Loading…
Reference in New Issue
Block a user