mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
switch BCM53xx (K3) to kernel 4.14
This commit is contained in:
parent
b93a891230
commit
54dfcd092a
1
package/ext/luci-app-shadowsocksr
Submodule
1
package/ext/luci-app-shadowsocksr
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 86ef75ed8a376ca0a7490ce68c5b09fa0fbe8c1d
|
@ -13,7 +13,7 @@ FEATURES:=squashfs nand usb pci pcie gpio
|
||||
MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de>
|
||||
CPU_TYPE:=cortex-a9
|
||||
|
||||
KERNEL_PATCHVER:=4.9
|
||||
KERNEL_PATCHVER:=4.14
|
||||
|
||||
define Target/Description
|
||||
Build firmware images for Broadcom based BCM47xx/53xx routers with ARM CPU, *not* MIPS.
|
||||
|
@ -13,7 +13,7 @@ get_status_led() {
|
||||
fi;
|
||||
|
||||
# Now just pick any power LED
|
||||
status_led_file=$(find /sys/class/leds/ -name "*:power:*" | head -n1)
|
||||
status_led_file=$(find /sys/class/leds/ -name "*:power" | head -n1)
|
||||
if [ -d "$status_led_file" ]; then
|
||||
status_led=$(basename $status_led_file)
|
||||
return
|
||||
|
@ -274,11 +274,11 @@ platform_pre_upgrade() {
|
||||
platform_trx_from_chk_cmd() {
|
||||
local header_len=$((0x$(get_magic_long_at "$1" 4)))
|
||||
|
||||
echo -n dd bs=$header_len skip=1
|
||||
echo -n dd skip=$header_len iflag=skip_bytes
|
||||
}
|
||||
|
||||
platform_trx_from_cybertan_cmd() {
|
||||
echo -n dd bs=32 skip=1
|
||||
echo -n dd skip=32 iflag=skip_bytes
|
||||
}
|
||||
|
||||
platform_img_from_safeloader() {
|
||||
|
366
target/linux/bcm53xx/config-4.14
Normal file
366
target/linux/bcm53xx/config-4.14
Normal file
@ -0,0 +1,366 @@
|
||||
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_WANTS_THP_SWAP is not set
|
||||
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_DMA_NOOP_OPS is not set
|
||||
# CONFIG_DMA_VIRT_OPS is not set
|
||||
# CONFIG_DRM_LIB_RANDOM is not set
|
||||
CONFIG_DTC=y
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_EXPORTFS=y
|
||||
CONFIG_EXTCON=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_FRAME_POINTER=y
|
||||
CONFIG_FUTEX_PI=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_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 is not set
|
||||
CONFIG_MDIO_BUS=y
|
||||
# CONFIG_MDIO_BUS_MUX_BCM_IPROC is not set
|
||||
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_FIRMWARE=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_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=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_THIN_ARCHIVES=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
|
@ -59,9 +59,7 @@ define Build/trx
|
||||
endef
|
||||
|
||||
define Build/trx-serial
|
||||
$(STAGING_DIR_HOST)/bin/trx \
|
||||
-o $@.new \
|
||||
-m 33554432 \
|
||||
$(STAGING_DIR_HOST)/bin/otrx create $@.new \
|
||||
-f $(IMAGE_KERNEL) -a 1024 \
|
||||
-f $@ -a 0x10000 -A $(KDIR)/fs_mark
|
||||
mv $@.new $@
|
||||
@ -72,9 +70,7 @@ define Build/trx-nand
|
||||
# if it grows up between releases
|
||||
# root: UBI with one extra block containing UBI mark to trigger erasing
|
||||
# rest of partition
|
||||
$(STAGING_DIR_HOST)/bin/trx \
|
||||
-o $@.new \
|
||||
-m 33554432 \
|
||||
$(STAGING_DIR_HOST)/bin/otrx create $@.new \
|
||||
-f $(IMAGE_KERNEL) -a 0x20000 -b 0x400000 \
|
||||
-f $@ \
|
||||
-A $(KDIR)/ubi_mark -a 0x20000
|
||||
@ -248,13 +244,6 @@ define Device/linksys-ea9500
|
||||
endef
|
||||
# TARGET_DEVICES += linksys-ea9500
|
||||
|
||||
define Device/phicomm-k3
|
||||
DEVICE_TITLE := PHICOMM K3
|
||||
DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES) + k3wifi + k3screenctrl
|
||||
IMAGES := trx
|
||||
endef
|
||||
TARGET_DEVICES += phicomm-k3
|
||||
|
||||
define Device/netgear
|
||||
IMAGES := chk
|
||||
IMAGE/chk := append-ubi | trx-nand | netgear-chk
|
||||
@ -314,8 +303,10 @@ define Device/smartrg-sr400ac
|
||||
DEVICE_PACKAGES := $(BRCMFMAC_43602A1) $(USB3_PACKAGES)
|
||||
IMAGES := trx
|
||||
IMAGE/trx := append-rootfs | trx-serial
|
||||
KERNEL_INITRAMFS_SUFFIX := .bin
|
||||
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma-d16
|
||||
endef
|
||||
# TARGET_DEVICES += smartrg-sr400ac
|
||||
TARGET_DEVICES += smartrg-sr400ac
|
||||
|
||||
define Device/tenda-ac9
|
||||
DEVICE_TITLE := Tenda AC9
|
||||
@ -323,7 +314,7 @@ define Device/tenda-ac9
|
||||
IMAGES := trx
|
||||
IMAGE/trx := append-rootfs | trx-serial
|
||||
endef
|
||||
# TARGET_DEVICES += tenda-ac9
|
||||
TARGET_DEVICES += tenda-ac9
|
||||
|
||||
define Device/tplink-archer-c5-v2
|
||||
DEVICE_TITLE := TP-LINK Archer C5 V2
|
||||
@ -332,7 +323,7 @@ define Device/tplink-archer-c5-v2
|
||||
IMAGE/bin := append-rootfs | bcm53xx-tplink-safeloader
|
||||
TPLINK_BOARD := ARCHER-C5-V2
|
||||
endef
|
||||
# TARGET_DEVICES += tplink-archer-c5-v2
|
||||
TARGET_DEVICES += tplink-archer-c5-v2
|
||||
|
||||
define Device/tplink-archer-c9-v1
|
||||
DEVICE_TITLE := TP-LINK Archer C9 V1
|
||||
@ -341,6 +332,13 @@ define Device/tplink-archer-c9-v1
|
||||
IMAGE/bin := append-rootfs | bcm53xx-tplink-safeloader
|
||||
TPLINK_BOARD := ARCHERC9
|
||||
endef
|
||||
# TARGET_DEVICES += tplink-archer-c9-v1
|
||||
TARGET_DEVICES += tplink-archer-c9-v1
|
||||
|
||||
define Device/phicomm-k3
|
||||
DEVICE_TITLE := PHICOMM K3
|
||||
DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES) k3wifi k3screenctrl
|
||||
IMAGES := trx
|
||||
endef
|
||||
TARGET_DEVICES += phicomm-k3
|
||||
|
||||
$(eval $(call BuildImage))
|
||||
|
@ -9,7 +9,9 @@ define KernelPackage/phy-bcm-ns-usb2
|
||||
KCONFIG:=CONFIG_PHY_BCM_NS_USB2
|
||||
DEPENDS:=@TARGET_bcm53xx
|
||||
SUBMENU:=$(USB_MENU)
|
||||
FILES:=$(LINUX_DIR)/drivers/phy/phy-bcm-ns-usb2.ko
|
||||
FILES:=\
|
||||
$(LINUX_DIR)/drivers/phy/phy-bcm-ns-usb2.ko@lt4.13 \
|
||||
$(LINUX_DIR)/drivers/phy/broadcom/phy-bcm-ns-usb2.ko@gt4.13
|
||||
AUTOLOAD:=$(call AutoLoad,45,phy-bcm-ns-usb2,1)
|
||||
endef
|
||||
|
||||
@ -25,7 +27,9 @@ define KernelPackage/phy-bcm-ns-usb3
|
||||
KCONFIG:=CONFIG_PHY_BCM_NS_USB3
|
||||
DEPENDS:=@TARGET_bcm53xx
|
||||
SUBMENU:=$(USB_MENU)
|
||||
FILES:=$(LINUX_DIR)/drivers/phy/phy-bcm-ns-usb3.ko
|
||||
FILES:=\
|
||||
$(LINUX_DIR)/drivers/phy/phy-bcm-ns-usb3.ko@lt4.13 \
|
||||
$(LINUX_DIR)/drivers/phy/broadcom/phy-bcm-ns-usb3.ko@ge4.13
|
||||
AUTOLOAD:=$(call AutoLoad,45,phy-bcm-ns-usb3,1)
|
||||
endef
|
||||
|
||||
|
@ -0,0 +1,30 @@
|
||||
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 {
|
@ -0,0 +1,96 @@
|
||||
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";
|
||||
+};
|
@ -0,0 +1,96 @@
|
||||
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";
|
||||
+};
|
@ -0,0 +1,120 @@
|
||||
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>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
@ -0,0 +1,83 @@
|
||||
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>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
@ -0,0 +1,50 @@
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -105,6 +105,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm47094-luxul-xbr-4500.dtb \
|
||||
bcm47094-luxul-xwr-3100.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,37 @@
|
||||
+/*
|
||||
+* Copyright (C) 2017 Hamster Tian <haotia@gmail.com>
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "bcm47094.dtsi"
|
||||
+#include "bcm5301x-nand-cs0-bch4.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "phicomm,k3", "brcm,bcm47094", "brcm,bcm4708";
|
||||
+ model = "PHICOMM K3";
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "console=ttyS0,115200";
|
||||
+ };
|
||||
+ 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";
|
||||
+};
|
@ -0,0 +1,107 @@
|
||||
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;
|
@ -0,0 +1,95 @@
|
||||
From c830b958f52fc666919439d6f8f6caa8b6844d44 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>
|
||||
---
|
||||
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>;
|
@ -0,0 +1,137 @@
|
||||
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
|
||||
@@ -153,6 +153,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.
|
||||
*
|
||||
@@ -536,10 +579,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;
|
||||
|
||||
@@ -549,6 +602,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
|
||||
@@ -1831,6 +1831,7 @@ struct xhci_hcd {
|
||||
#define XHCI_LIMIT_ENDPOINT_INTERVAL_7 (1 << 26)
|
||||
/* Reserved. It was XHCI_U2_DISABLE_WAKE */
|
||||
#define XHCI_ASMEDIA_MODIFY_FLOWCONTROL (1 << 28)
|
||||
+#define XHCI_FAKE_DOORBELL (1 << 29)
|
||||
#define XHCI_SUSPEND_DELAY (1 << 30)
|
||||
|
||||
unsigned int num_active_eps;
|
@ -0,0 +1,101 @@
|
||||
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
|
@ -0,0 +1,64 @@
|
||||
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
|
||||
@@ -97,6 +97,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";
|
||||
+};
|
@ -0,0 +1,20 @@
|
||||
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
|
||||
@@ -102,6 +102,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>;
|
@ -0,0 +1,70 @@
|
||||
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
|
||||
@@ -13,7 +13,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
|
||||
@@ -14,7 +14,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
|
||||
@@ -14,7 +14,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
|
||||
@@ -13,7 +13,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
|
||||
@@ -13,7 +13,7 @@
|
||||
model = "Luxul XAP-810 V1";
|
||||
|
||||
chosen {
|
||||
- bootargs = "earlycon";
|
||||
+ bootargs = "console=ttyS0,115200 earlycon";
|
||||
};
|
||||
|
||||
memory {
|
@ -0,0 +1,110 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Fri, 29 Dec 2017 20:26:51 +0100
|
||||
Subject: [PATCH] Revert "ARM: dts: BCM5301X: convert to iProc QSPI"
|
||||
|
||||
This reverts commit 1c8f4065072387d3b6ee7adcf0dbe3c7ba80c268.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm5301x.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
|
||||
@@ -337,6 +337,20 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ spi@29000 {
|
||||
+ reg = <0x00029000 0x1000>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ spi_nor: spi-nor@0 {
|
||||
+ compatible = "jedec,spi-nor";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <20000000>;
|
||||
+ linux,part-probe = "ofpart", "bcm47xxpart";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
gmac0: ethernet@24000 {
|
||||
reg = <0x24000 0x800>;
|
||||
};
|
||||
@@ -425,42 +439,6 @@
|
||||
brcm,nand-has-wp;
|
||||
};
|
||||
|
||||
- spi@18029200 {
|
||||
- compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi";
|
||||
- reg = <0x18029200 0x184>,
|
||||
- <0x18029000 0x124>,
|
||||
- <0x1811b408 0x004>,
|
||||
- <0x180293a0 0x01c>;
|
||||
- reg-names = "mspi", "bspi", "intr_regs", "intr_status_reg";
|
||||
- interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
|
||||
- <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>,
|
||||
- <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>,
|
||||
- <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>,
|
||||
- <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
|
||||
- <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
|
||||
- <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
|
||||
- interrupt-names = "spi_lr_fullness_reached",
|
||||
- "spi_lr_session_aborted",
|
||||
- "spi_lr_impatient",
|
||||
- "spi_lr_session_done",
|
||||
- "spi_lr_overhead",
|
||||
- "mspi_done",
|
||||
- "mspi_halted";
|
||||
- clocks = <&iprocmed>;
|
||||
- clock-names = "iprocmed";
|
||||
- num-cs = <2>;
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
-
|
||||
- spi_nor: spi-nor@0 {
|
||||
- compatible = "jedec,spi-nor";
|
||||
- reg = <0>;
|
||||
- spi-max-frequency = <20000000>;
|
||||
- linux,part-probe = "ofpart", "bcm47xxpart";
|
||||
- status = "disabled";
|
||||
- };
|
||||
- };
|
||||
-
|
||||
thermal-zones {
|
||||
cpu_thermal: cpu-thermal {
|
||||
polling-delay-passive = <0>;
|
||||
--- a/arch/arm/boot/dts/bcm953012k.dts
|
||||
+++ b/arch/arm/boot/dts/bcm953012k.dts
|
||||
@@ -80,32 +80,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
-&spi_nor {
|
||||
- status = "okay";
|
||||
- spi-max-frequency = <62500000>;
|
||||
- m25p,default-addr-width = <3>;
|
||||
-
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <1>;
|
||||
-
|
||||
- partition@0 {
|
||||
- label = "boot";
|
||||
- reg = <0x00000000 0x000d0000>;
|
||||
- };
|
||||
- partition@d000 {
|
||||
- label = "env";
|
||||
- reg = <0x000d0000 0x00030000>;
|
||||
- };
|
||||
- partition@100000 {
|
||||
- label = "system";
|
||||
- reg = <0x00100000 0x00600000>;
|
||||
- };
|
||||
- partition@700000 {
|
||||
- label = "rootfs";
|
||||
- reg = <0x00700000 0x00900000>;
|
||||
- };
|
||||
-};
|
||||
-
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
@ -0,0 +1,34 @@
|
||||
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
|
||||
@@ -1205,6 +1205,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);
|
||||
}
|
||||
|
@ -0,0 +1,53 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Subject: [PATCH] Use "brcm,bcm947xx-cfe-partitions" binding for Broadcom
|
||||
partitions
|
||||
|
||||
---
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
|
||||
@@ -13,6 +13,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
|
||||
@@ -346,8 +346,11 @@
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <20000000>;
|
||||
- linux,part-probe = "ofpart", "bcm47xxpart";
|
||||
status = "disabled";
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "brcm,bcm947xx-cfe-partitions";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
--- a/drivers/mtd/bcm47xxpart.c
|
||||
+++ b/drivers/mtd/bcm47xxpart.c
|
||||
@@ -300,9 +300,16 @@ static int bcm47xxpart_parse(struct mtd_
|
||||
return curr_part;
|
||||
};
|
||||
|
||||
+static const struct of_device_id bcm47xxpart_of_match_table[] = {
|
||||
+ { .compatible = "brcm,bcm947xx-cfe-partitions" },
|
||||
+ {},
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, bcm47xxpart_of_match_table);
|
||||
+
|
||||
static struct mtd_part_parser bcm47xxpart_mtd_parser = {
|
||||
.parse_fn = bcm47xxpart_parse,
|
||||
.name = "bcm47xxpart",
|
||||
+ .of_match_table = bcm47xxpart_of_match_table,
|
||||
};
|
||||
module_mtd_part_parser(bcm47xxpart_mtd_parser);
|
||||
|
@ -0,0 +1,59 @@
|
||||
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
|
||||
@@ -822,6 +822,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);
|
@ -0,0 +1,52 @@
|
||||
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);
|
||||
|
@ -0,0 +1,56 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Subject: [PATCH] mtd: bcm47xxpart: add device specific workarounds
|
||||
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/drivers/mtd/bcm47xxpart.c
|
||||
+++ b/drivers/mtd/bcm47xxpart.c
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
+#include <linux/of.h>
|
||||
|
||||
#include <uapi/linux/magic.h>
|
||||
|
||||
@@ -134,6 +135,36 @@ static int bcm47xxpart_parse(struct mtd_
|
||||
break;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * Device specific workarounds (hacks). We should use DT to
|
||||
+ * define partitions but we need a working TRX firmware splitter
|
||||
+ * first.
|
||||
+ */
|
||||
+ if (of_machine_is_compatible("asus,rt-ac87u") && offset == 0x7ec0000) {
|
||||
+ /*
|
||||
+ * "asus" partition uses JFFS2 which we don't detect and
|
||||
+ * we don't want to as this could affect other devices.
|
||||
+ */
|
||||
+ bcm47xxpart_add_part(&parts[curr_part++], "asus", offset, MTD_WRITEABLE);
|
||||
+ continue;
|
||||
+ } else if (of_machine_is_compatible("tplink,archer-c5-v2") && offset == 0xe40000) {
|
||||
+ /*
|
||||
+ * There is a whole set of partitions (not even listed
|
||||
+ * by original firmware): "default-mac", "pin",
|
||||
+ * "partition-table", etc.
|
||||
+ */
|
||||
+ bcm47xxpart_add_part(&parts[curr_part++], "tplink", offset, MTD_WRITEABLE);
|
||||
+ continue;
|
||||
+ } else if (of_machine_is_compatible("tplink,archer-c9-v1") && offset == 0xe40000) {
|
||||
+ /*
|
||||
+ * There is a whole set of partitions (not even listed
|
||||
+ * by original firmware): "default-mac", "pin",
|
||||
+ * "partition-table", etc.
|
||||
+ */
|
||||
+ bcm47xxpart_add_part(&parts[curr_part++], "tplink", offset, MTD_WRITEABLE);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
/* Read beginning of the block */
|
||||
err = mtd_read(master, offset, BCM47XXPART_BYTES_TO_READ,
|
||||
&bytes_read, (uint8_t *)buf);
|
@ -0,0 +1,19 @@
|
||||
Index: linux-4.14.29/drivers/mtd/bcm47xxpart.c
|
||||
===================================================================
|
||||
--- linux-4.14.29.orig/drivers/mtd/bcm47xxpart.c
|
||||
+++ linux-4.14.29/drivers/mtd/bcm47xxpart.c
|
||||
@@ -163,6 +163,14 @@ static int bcm47xxpart_parse(struct mtd_
|
||||
*/
|
||||
bcm47xxpart_add_part(&parts[curr_part++], "tplink", offset, MTD_WRITEABLE);
|
||||
continue;
|
||||
+ } else if (of_machine_is_compatible("phicomm,k3") && offset == 0x180000) {
|
||||
+ /*
|
||||
+ * This device has nvram_back, res_info, pro_info and dev_info from
|
||||
+ * 0x180000 (end of nvram) to 0x400000 (start of linux). These partitions
|
||||
+ * has essential information for original firwamre. We do not want these.
|
||||
+ */
|
||||
+ bcm47xxpart_add_part(&parts[curr_part++], "phicomm", offset, MTD_WRITEABLE);
|
||||
+ continue;
|
||||
}
|
||||
|
||||
/* Read beginning of the block */
|
@ -0,0 +1,88 @@
|
||||
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
|
||||
@@ -48,6 +48,15 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ timer {
|
||||
+ compatible = "arm,armv7-timer";
|
||||
+ interrupts = <GIC_PPI 13 0>,
|
||||
+ <GIC_PPI 14 0>,
|
||||
+ <GIC_PPI 11 0>,
|
||||
+ <GIC_PPI 10 0>;
|
||||
+ clocks = <&ilp>;
|
||||
+ };
|
||||
+
|
||||
clocks {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
--- a/drivers/bcma/main.c
|
||||
+++ b/drivers/bcma/main.c
|
||||
@@ -348,14 +348,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);
|
||||
@@ -436,6 +428,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");
|
@ -0,0 +1,33 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Subject: [PATCH] Revert "earlycon: initialise baud field of earlycon device
|
||||
structure"
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This reverts commit 31cb9a8575ca04f47ea113434d4782b695638b62.
|
||||
|
||||
It broke earlycon on BCM5301X. Using:
|
||||
1) uartclk 1843200 (BASE_BAUD * 16)
|
||||
2) early_console_dev.baud 115200
|
||||
results in init_port() calculating UART divisor 1. That's a wrong value
|
||||
(default one is 54) that breaks serial console output.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
|
||||
--- a/drivers/tty/serial/earlycon.c
|
||||
+++ b/drivers/tty/serial/earlycon.c
|
||||
@@ -283,12 +283,7 @@ int __init of_setup_earlycon(const struc
|
||||
}
|
||||
}
|
||||
|
||||
- val = of_get_flat_dt_prop(node, "current-speed", NULL);
|
||||
- if (val)
|
||||
- early_console_dev.baud = be32_to_cpu(*val);
|
||||
-
|
||||
if (options) {
|
||||
- early_console_dev.baud = simple_strtoul(options, NULL, 0);
|
||||
strlcpy(early_console_dev.options, options,
|
||||
sizeof(early_console_dev.options));
|
||||
}
|
@ -0,0 +1,135 @@
|
||||
From 092ccf0415c720a1e9458a46fe75f77574027a55 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Tue, 18 Jul 2017 12:37:37 -0700
|
||||
Subject: [PATCH] ARM: dts: BCM53573: Add Broadcom BCM947189ACDBMR board
|
||||
support
|
||||
|
||||
Adds support for the Broadcom reference board BCM947189ACDMBR which
|
||||
features the following:
|
||||
|
||||
* 128MB of DRAM
|
||||
* External MoCA support through a Broadcom BCM6802 chip
|
||||
* 1x external Gigabit PHY through the external BCM6802
|
||||
* 1x USB 2.0 port
|
||||
* 1x PCIE slot
|
||||
* Few configurable buttons and LEDs
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 3 +-
|
||||
arch/arm/boot/dts/bcm947189acdbmr.dts | 97 +++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 99 insertions(+), 1 deletion(-)
|
||||
create mode 100644 arch/arm/boot/dts/bcm947189acdbmr.dts
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -93,7 +93,8 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm953012hr.dtb \
|
||||
bcm953012k.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM_53573) += \
|
||||
- bcm47189-tenda-ac9.dtb
|
||||
+ bcm47189-tenda-ac9.dtb \
|
||||
+ bcm947189acdbmr.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM_63XX) += \
|
||||
bcm963138dvt.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm947189acdbmr.dts
|
||||
@@ -0,0 +1,97 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2017 Broadcom
|
||||
+ * Author: Florian Fainelli <f.fainelli@gmail.com>
|
||||
+ *
|
||||
+ * Licensed under the ISC license.
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "bcm53573.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "brcm,bcm947189acdbmr", "brcm,bcm47189", "brcm,bcm53573";
|
||||
+ model = "Broadcom BCM947189ACDBMR";
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "console=ttyS0,115200 earlycon";
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0x00000000 0x08000000>;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ wps {
|
||||
+ label = "bcm53xx:blue:wps";
|
||||
+ gpios = <&chipcommon 10 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ 5ghz {
|
||||
+ label = "bcm53xx:blue:5ghz";
|
||||
+ gpios = <&chipcommon 11 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ 2ghz {
|
||||
+ label = "bcm53xx:blue:2ghz";
|
||||
+ gpios = <&chipcommon 12 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ restart {
|
||||
+ label = "Reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ wps {
|
||||
+ label = "WPS";
|
||||
+ linux,code = <KEY_WPS_BUTTON>;
|
||||
+ gpios = <&chipcommon 9 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ spi {
|
||||
+ compatible = "spi-gpio";
|
||||
+ num-chipselects = <1>;
|
||||
+ gpio-sck = <&chipcommon 21 0>;
|
||||
+ gpio-miso = <&chipcommon 22 0>;
|
||||
+ gpio-mosi = <&chipcommon 23 0>;
|
||||
+ cs-gpios = <&chipcommon 24 0>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ /* External BCM6802 MoCA chip is connected */
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&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>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usb2 {
|
||||
+ vcc-gpio = <&chipcommon 8 GPIO_ACTIVE_HIGH>;
|
||||
+};
|
@ -0,0 +1,58 @@
|
||||
From 0173b2cd6948b5b96ac4e8dbc3bcb4dd0b45c296 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Thu, 17 Aug 2017 11:05:14 +0200
|
||||
Subject: [PATCH] ARM: BCM53573: Specify ports for USB LED for Tenda AC9
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This uses trigger-sources documented in commit 80dc6e1cd85fc ("dt-bindings:
|
||||
leds: document new trigger-sources property") to specify USB ports. Such an
|
||||
information can be used by operating system to setup LEDs behavior.
|
||||
|
||||
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 | 2 ++
|
||||
arch/arm/boot/dts/bcm53573.dtsi | 4 ++++
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm47189-tenda-ac9.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47189-tenda-ac9.dts
|
||||
@@ -26,6 +26,8 @@
|
||||
usb {
|
||||
label = "bcm53xx:blue:usb";
|
||||
gpios = <&chipcommon 1 GPIO_ACTIVE_HIGH>;
|
||||
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
};
|
||||
|
||||
wps {
|
||||
--- a/arch/arm/boot/dts/bcm53573.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm53573.dtsi
|
||||
@@ -138,10 +138,12 @@
|
||||
|
||||
ehci_port1: port@1 {
|
||||
reg = <1>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
};
|
||||
|
||||
ehci_port2: port@2 {
|
||||
reg = <2>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -158,10 +160,12 @@
|
||||
|
||||
ohci_port1: port@1 {
|
||||
reg = <1>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
};
|
||||
|
||||
ohci_port2: port@2 {
|
||||
reg = <2>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
};
|
||||
};
|
||||
};
|
@ -0,0 +1,30 @@
|
||||
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 {
|
@ -0,0 +1,96 @@
|
||||
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
|
||||
@@ -85,6 +85,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";
|
||||
+};
|
@ -0,0 +1,96 @@
|
||||
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
|
||||
@@ -85,6 +85,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";
|
||||
+};
|
@ -0,0 +1,120 @@
|
||||
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
|
||||
@@ -95,6 +95,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>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
@ -0,0 +1,83 @@
|
||||
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
|
||||
@@ -95,6 +95,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>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
@ -0,0 +1,107 @@
|
||||
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;
|
@ -41,7 +41,7 @@ This should be very helpful for ppl adding new devices support.
|
||||
static void brcmnand_set_ecc_enabled(struct brcmnand_host *host, int en)
|
||||
{
|
||||
struct brcmnand_controller *ctrl = host->ctrl;
|
||||
@@ -1997,6 +2008,9 @@ static int brcmnand_init_cs(struct brcmn
|
||||
@@ -1990,6 +2001,9 @@ static int brcmnand_init_cs(struct brcmn
|
||||
nand_writereg(ctrl, cfg_offs,
|
||||
nand_readreg(ctrl, cfg_offs) & ~CFG_BUS_WIDTH);
|
||||
|
||||
|
@ -23,4 +23,48 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
+ 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
|
||||
@@ -14,7 +14,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
|
||||
@@ -14,7 +14,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
|
||||
@@ -13,7 +13,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
|
||||
@@ -13,7 +13,7 @@
|
||||
model = "Luxul XAP-810 V1";
|
||||
|
||||
chosen {
|
||||
- bootargs = "earlycon";
|
||||
+ bootargs = "console=ttyS0,115200 earlycon";
|
||||
};
|
||||
|
||||
memory {
|
||||
|
@ -1,59 +0,0 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Subject: [PATCH] mtd: m25p80: use single SPI message for writing data
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
On all 3 tested Northstar devices with following flash memories:
|
||||
mx25l6405d (8192 Kbytes)
|
||||
mx25l12805d (16384 Kbytes)
|
||||
mx25l25635e (32768 Kbytes)
|
||||
I noticed writing to be broken. Not a single bit was changed leaving all
|
||||
bytes set to 0xff.
|
||||
|
||||
This is most likely some problem related to the SPI controller or its
|
||||
driver. Using a single SPI message seems to workaround this. Of course
|
||||
it's not perfect solution as copying whole data into a new buffer makes
|
||||
writing slower.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
---
|
||||
|
||||
--- a/drivers/mtd/devices/m25p80.c
|
||||
+++ b/drivers/mtd/devices/m25p80.c
|
||||
@@ -78,6 +78,7 @@ static void m25p80_write(struct spi_nor
|
||||
{
|
||||
struct m25p *flash = nor->priv;
|
||||
struct spi_device *spi = flash->spi;
|
||||
+ u8 *command = kzalloc(MAX_CMD_SIZE + len, GFP_KERNEL);
|
||||
struct spi_transfer t[2] = {};
|
||||
struct spi_message m;
|
||||
int cmd_sz = m25p_cmdsz(nor);
|
||||
@@ -87,20 +88,19 @@ static void m25p80_write(struct spi_nor
|
||||
if (nor->program_opcode == SPINOR_OP_AAI_WP && nor->sst_write_second)
|
||||
cmd_sz = 1;
|
||||
|
||||
- flash->command[0] = nor->program_opcode;
|
||||
- m25p_addr2cmd(nor, to, flash->command);
|
||||
+ command[0] = nor->program_opcode;
|
||||
+ m25p_addr2cmd(nor, to, command);
|
||||
+ memcpy(&command[cmd_sz], buf, len);
|
||||
|
||||
- t[0].tx_buf = flash->command;
|
||||
- t[0].len = cmd_sz;
|
||||
+ t[0].tx_buf = command;
|
||||
+ t[0].len = cmd_sz + len;
|
||||
spi_message_add_tail(&t[0], &m);
|
||||
|
||||
- t[1].tx_buf = buf;
|
||||
- t[1].len = len;
|
||||
- spi_message_add_tail(&t[1], &m);
|
||||
-
|
||||
spi_sync(spi, &m);
|
||||
|
||||
*retlen += m.actual_length - cmd_sz;
|
||||
+
|
||||
+ kfree(command);
|
||||
}
|
||||
|
||||
static inline unsigned int m25p80_rx_nbits(struct spi_nor *nor)
|
@ -1,79 +0,0 @@
|
||||
From bf793950827142bc464eb2fd4059e1db24cc3517 Mon Sep 17 00:00:00 2001
|
||||
From: Tian Hao <haotia@gmail.com>
|
||||
Date: Sun, 2 Apr 2017 00:03:40 +0800
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Add basic DT for PHICOMM K3
|
||||
|
||||
This router has BCM4709C0, 128MB NAND flash (MX30LF1G18AC-TI),
|
||||
and 512MB memory, with 3 x LAN and 1 x WAN. WL 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.
|
||||
|
||||
Everything except the LCD and wireless works.
|
||||
|
||||
Signed-Off-By: Tian Hao <haotia@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
arch/arm/boot/dts/bcm47094-phicomm-k3.dts | 34 +++++++++++++++++++++++++++++++
|
||||
2 files changed, 35 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/bcm47094-phicomm-k3.dts
|
||||
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 0f2e27a0..a5237028 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -95,6 +95,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm4709-tplink-archer-c9-v1.dtb \
|
||||
bcm47094-dlink-dir-885l.dtb \
|
||||
bcm47094-linksys-panamera.dtb \
|
||||
+ bcm47094-phicomm-k3.dtb \
|
||||
bcm47094-luxul-xwr-3100.dtb \
|
||||
bcm47094-netgear-r8500.dtb \
|
||||
bcm94708.dtb \
|
||||
diff --git a/arch/arm/boot/dts/bcm47094-phicomm-k3.dts b/arch/arm/boot/dts/bcm47094-phicomm-k3.dts
|
||||
new file mode 100644
|
||||
index 00000000..ec2f9b27
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm47094-phicomm-k3.dts
|
||||
@@ -0,0 +1,38 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2017 Hamster Tian <haotia@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "bcm47094.dtsi"
|
||||
+#include "bcm5301x-nand-cs0-bch4.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "phicomm,k3", "brcm,bcm47094", "brcm,bcm4708";
|
||||
+ model = "PHICOMM K3";
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "console=ttyS0,115200";
|
||||
+ };
|
||||
+
|
||||
+ 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";
|
||||
+};
|
||||
--
|
||||
2.11.0
|
||||
|
@ -0,0 +1,135 @@
|
||||
From 092ccf0415c720a1e9458a46fe75f77574027a55 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Tue, 18 Jul 2017 12:37:37 -0700
|
||||
Subject: [PATCH] ARM: dts: BCM53573: Add Broadcom BCM947189ACDBMR board
|
||||
support
|
||||
|
||||
Adds support for the Broadcom reference board BCM947189ACDMBR which
|
||||
features the following:
|
||||
|
||||
* 128MB of DRAM
|
||||
* External MoCA support through a Broadcom BCM6802 chip
|
||||
* 1x external Gigabit PHY through the external BCM6802
|
||||
* 1x USB 2.0 port
|
||||
* 1x PCIE slot
|
||||
* Few configurable buttons and LEDs
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 3 +-
|
||||
arch/arm/boot/dts/bcm947189acdbmr.dts | 97 +++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 99 insertions(+), 1 deletion(-)
|
||||
create mode 100644 arch/arm/boot/dts/bcm947189acdbmr.dts
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -103,7 +103,8 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm953012hr.dtb \
|
||||
bcm953012k.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM_53573) += \
|
||||
- bcm47189-tenda-ac9.dtb
|
||||
+ bcm47189-tenda-ac9.dtb \
|
||||
+ bcm947189acdbmr.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM_63XX) += \
|
||||
bcm963138dvt.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm947189acdbmr.dts
|
||||
@@ -0,0 +1,97 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2017 Broadcom
|
||||
+ * Author: Florian Fainelli <f.fainelli@gmail.com>
|
||||
+ *
|
||||
+ * Licensed under the ISC license.
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "bcm53573.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "brcm,bcm947189acdbmr", "brcm,bcm47189", "brcm,bcm53573";
|
||||
+ model = "Broadcom BCM947189ACDBMR";
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "console=ttyS0,115200 earlycon";
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0x00000000 0x08000000>;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ wps {
|
||||
+ label = "bcm53xx:blue:wps";
|
||||
+ gpios = <&chipcommon 10 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ 5ghz {
|
||||
+ label = "bcm53xx:blue:5ghz";
|
||||
+ gpios = <&chipcommon 11 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ 2ghz {
|
||||
+ label = "bcm53xx:blue:2ghz";
|
||||
+ gpios = <&chipcommon 12 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ restart {
|
||||
+ label = "Reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ wps {
|
||||
+ label = "WPS";
|
||||
+ linux,code = <KEY_WPS_BUTTON>;
|
||||
+ gpios = <&chipcommon 9 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ spi {
|
||||
+ compatible = "spi-gpio";
|
||||
+ num-chipselects = <1>;
|
||||
+ gpio-sck = <&chipcommon 21 0>;
|
||||
+ gpio-miso = <&chipcommon 22 0>;
|
||||
+ gpio-mosi = <&chipcommon 23 0>;
|
||||
+ cs-gpios = <&chipcommon 24 0>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ /* External BCM6802 MoCA chip is connected */
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&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>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usb2 {
|
||||
+ vcc-gpio = <&chipcommon 8 GPIO_ACTIVE_HIGH>;
|
||||
+};
|
@ -0,0 +1,58 @@
|
||||
From 0173b2cd6948b5b96ac4e8dbc3bcb4dd0b45c296 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Thu, 17 Aug 2017 11:05:14 +0200
|
||||
Subject: [PATCH] ARM: BCM53573: Specify ports for USB LED for Tenda AC9
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This uses trigger-sources documented in commit 80dc6e1cd85fc ("dt-bindings:
|
||||
leds: document new trigger-sources property") to specify USB ports. Such an
|
||||
information can be used by operating system to setup LEDs behavior.
|
||||
|
||||
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 | 2 ++
|
||||
arch/arm/boot/dts/bcm53573.dtsi | 4 ++++
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm47189-tenda-ac9.dts
|
||||
+++ b/arch/arm/boot/dts/bcm47189-tenda-ac9.dts
|
||||
@@ -26,6 +26,8 @@
|
||||
usb {
|
||||
label = "bcm53xx:blue:usb";
|
||||
gpios = <&chipcommon 1 GPIO_ACTIVE_HIGH>;
|
||||
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
};
|
||||
|
||||
wps {
|
||||
--- a/arch/arm/boot/dts/bcm53573.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm53573.dtsi
|
||||
@@ -138,10 +138,12 @@
|
||||
|
||||
ehci_port1: port@1 {
|
||||
reg = <1>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
};
|
||||
|
||||
ehci_port2: port@2 {
|
||||
reg = <2>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -158,10 +160,12 @@
|
||||
|
||||
ohci_port1: port@1 {
|
||||
reg = <1>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
};
|
||||
|
||||
ohci_port2: port@2 {
|
||||
reg = <2>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
};
|
||||
};
|
||||
};
|
@ -0,0 +1,30 @@
|
||||
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 {
|
@ -0,0 +1,96 @@
|
||||
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
|
||||
@@ -95,6 +95,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";
|
||||
+};
|
@ -0,0 +1,96 @@
|
||||
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
|
||||
@@ -95,6 +95,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";
|
||||
+};
|
@ -0,0 +1,120 @@
|
||||
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
|
||||
@@ -105,6 +105,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>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
@ -0,0 +1,83 @@
|
||||
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
|
||||
@@ -105,6 +105,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>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
@ -0,0 +1,68 @@
|
||||
From: Zhong LuFan <lufanzhong@gmail.com>
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Add basic DT for PHICOMM K3
|
||||
|
||||
This router has BCM4709C0, 128MB NAND flash (MX30LF1G18AC-TI),
|
||||
and 512MB memory, with 3 x LAN and 1 x WAN. WL 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, No LED.
|
||||
|
||||
Flash:
|
||||
Enter CFE
|
||||
CFE Brush Excess LEDE, you can get it from here: https://drive.google.com/file/d/0ByNlqhxfFBArb2owR05VUlVpN0E
|
||||
Well, now you can brush into the trx file for the LEDE.
|
||||
|
||||
The founder of the patch is: Tian Hao <haotia@gmail.com>
|
||||
|
||||
Signed-Off-By: Zhong LuFan <lufanzhong@gmail.com>
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -99,6 +99,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm47094-luxul-xbr-4500.dtb \
|
||||
bcm47094-luxul-xwr-3100.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,37 @@
|
||||
+/*
|
||||
+* Copyright (C) 2017 Hamster Tian <haotia@gmail.com>
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "bcm47094.dtsi"
|
||||
+#include "bcm5301x-nand-cs0-bch4.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "phicomm,k3", "brcm,bcm47094", "brcm,bcm4708";
|
||||
+ model = "PHICOMM K3";
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "console=ttyS0,115200";
|
||||
+ };
|
||||
+ 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";
|
||||
+};
|
@ -0,0 +1,107 @@
|
||||
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,11 +0,0 @@
|
||||
--- a/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
|
||||
@@ -13,6 +13,8 @@
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
+
|
||||
+ linux,part-probe = "ofpart", "bcm47xxpart";
|
||||
};
|
||||
};
|
||||
};
|
@ -0,0 +1,95 @@
|
||||
From c830b958f52fc666919439d6f8f6caa8b6844d44 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>
|
||||
---
|
||||
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>;
|
@ -23,4 +23,48 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
+ 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
|
||||
@@ -14,7 +14,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
|
||||
@@ -14,7 +14,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
|
||||
@@ -13,7 +13,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
|
||||
@@ -13,7 +13,7 @@
|
||||
model = "Luxul XAP-810 V1";
|
||||
|
||||
chosen {
|
||||
- bootargs = "earlycon";
|
||||
+ bootargs = "console=ttyS0,115200 earlycon";
|
||||
};
|
||||
|
||||
memory {
|
||||
|
@ -1,68 +0,0 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Subject: [PATCH] mtd: m25p80: use single SPI message for writing data
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
On all 3 tested Northstar devices with following flash memories:
|
||||
mx25l6405d (8192 Kbytes)
|
||||
mx25l12805d (16384 Kbytes)
|
||||
mx25l25635e (32768 Kbytes)
|
||||
I noticed writing to be broken. Not a single bit was changed leaving all
|
||||
bytes set to 0xff.
|
||||
|
||||
This is most likely some problem related to the SPI controller or its
|
||||
driver. Using a single SPI message seems to workaround this. Of course
|
||||
it's not perfect solution as copying whole data into a new buffer makes
|
||||
writing slower.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
---
|
||||
|
||||
--- a/drivers/mtd/devices/m25p80.c
|
||||
+++ b/drivers/mtd/devices/m25p80.c
|
||||
@@ -78,6 +78,7 @@ static ssize_t m25p80_write(struct spi_n
|
||||
{
|
||||
struct m25p *flash = nor->priv;
|
||||
struct spi_device *spi = flash->spi;
|
||||
+ u8 *command = kzalloc(MAX_CMD_SIZE + len, GFP_KERNEL);
|
||||
struct spi_transfer t[2] = {};
|
||||
struct spi_message m;
|
||||
int cmd_sz = m25p_cmdsz(nor);
|
||||
@@ -88,24 +89,26 @@ static ssize_t m25p80_write(struct spi_n
|
||||
if (nor->program_opcode == SPINOR_OP_AAI_WP && nor->sst_write_second)
|
||||
cmd_sz = 1;
|
||||
|
||||
- flash->command[0] = nor->program_opcode;
|
||||
- m25p_addr2cmd(nor, to, flash->command);
|
||||
+ command[0] = nor->program_opcode;
|
||||
+ m25p_addr2cmd(nor, to, command);
|
||||
+ memcpy(&command[cmd_sz], buf, len);
|
||||
|
||||
- t[0].tx_buf = flash->command;
|
||||
- t[0].len = cmd_sz;
|
||||
+ t[0].tx_buf = command;
|
||||
+ t[0].len = cmd_sz + len;
|
||||
spi_message_add_tail(&t[0], &m);
|
||||
|
||||
- t[1].tx_buf = buf;
|
||||
- t[1].len = len;
|
||||
- spi_message_add_tail(&t[1], &m);
|
||||
-
|
||||
ret = spi_sync(spi, &m);
|
||||
- if (ret)
|
||||
+ if (ret) {
|
||||
+ kfree(command);
|
||||
return ret;
|
||||
+ }
|
||||
|
||||
ret = m.actual_length - cmd_sz;
|
||||
- if (ret < 0)
|
||||
+ if (ret < 0) {
|
||||
+ kfree(command);
|
||||
return -EIO;
|
||||
+ }
|
||||
+ kfree(command);
|
||||
return ret;
|
||||
}
|
||||
|
@ -0,0 +1,53 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Subject: [PATCH] Use "brcm,bcm947xx-cfe-partitions" binding for Broadcom
|
||||
partitions
|
||||
|
||||
---
|
||||
|
||||
--- a/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
|
||||
@@ -13,6 +13,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
|
||||
@@ -346,8 +346,11 @@
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <20000000>;
|
||||
- linux,part-probe = "ofpart", "bcm47xxpart";
|
||||
status = "disabled";
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "brcm,bcm947xx-cfe-partitions";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
--- a/drivers/mtd/bcm47xxpart.c
|
||||
+++ b/drivers/mtd/bcm47xxpart.c
|
||||
@@ -300,9 +300,16 @@ static int bcm47xxpart_parse(struct mtd_
|
||||
return curr_part;
|
||||
};
|
||||
|
||||
+static const struct of_device_id bcm47xxpart_of_match_table[] = {
|
||||
+ { .compatible = "brcm,bcm947xx-cfe-partitions" },
|
||||
+ {},
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, bcm47xxpart_of_match_table);
|
||||
+
|
||||
static struct mtd_part_parser bcm47xxpart_mtd_parser = {
|
||||
.parse_fn = bcm47xxpart_parse,
|
||||
.name = "bcm47xxpart",
|
||||
+ .of_match_table = bcm47xxpart_of_match_table,
|
||||
};
|
||||
module_mtd_part_parser(bcm47xxpart_mtd_parser);
|
||||
|
@ -1,18 +1,13 @@
|
||||
From 60ef93a073b06876b06fb40b08663ad33895a3d3 Mon Sep 17 00:00:00 2001
|
||||
From: Tian Hao <haotia@gmail.com>
|
||||
Date: Sun, 2 Apr 2017 00:09:10 +0800
|
||||
From: Zhong LuFan <lufanzhong@gmail.com>
|
||||
Subject: [PATCH] mtd: bcm47xxpart: add partition workaround for PHICOMM K3
|
||||
|
||||
Signed-off-by: Tian Hao <haotia@gmail.com>
|
||||
---
|
||||
drivers/mtd/bcm47xxpart.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
The founder of the patch is: Tian Hao <haotia@gmail.com>
|
||||
|
||||
Signed-off-by: Zhong LuFan <lufanzhong@gmail.com>
|
||||
|
||||
diff --git a/drivers/mtd/bcm47xxpart.c b/drivers/mtd/bcm47xxpart.c
|
||||
index e796a804..64c6858f 100644
|
||||
--- a/drivers/mtd/bcm47xxpart.c
|
||||
+++ b/drivers/mtd/bcm47xxpart.c
|
||||
@@ -270,6 +270,14 @@ static int bcm47xxpart_parse(struct mtd_info *master,
|
||||
@@ -163,6 +163,14 @@ static int bcm47xxpart_parse(struct mtd_
|
||||
*/
|
||||
bcm47xxpart_add_part(&parts[curr_part++], "tplink", offset, MTD_WRITEABLE);
|
||||
continue;
|
||||
@ -25,8 +20,5 @@ index e796a804..64c6858f 100644
|
||||
+ bcm47xxpart_add_part(&parts[curr_part++], "phicomm", offset, MTD_WRITEABLE);
|
||||
+ continue;
|
||||
}
|
||||
|
||||
|
||||
/* Read beginning of the block */
|
||||
--
|
||||
2.11.0
|
||||
|
||||
|
@ -11,8 +11,9 @@ define Profile/Generic
|
||||
endef
|
||||
|
||||
define Profile/Generic/Description
|
||||
Package set compatible with hardware any Broadcom BCM47xx or BCM535x
|
||||
SoC with a ARM CPU like the BCM4707, BCM4708, BCM4709, BCM53010
|
||||
Package set compatible with any hardware using Broadcom BCM47xx or
|
||||
BCM535x SoCs with an ARM CPU like the BCM4707, BCM4708, BCM4709,
|
||||
BCM53010
|
||||
endef
|
||||
|
||||
$(eval $(call Profile,Generic))
|
||||
|
@ -339,6 +339,14 @@ CONFIG_M586MMX=y
|
||||
# CONFIG_MK6 is not set
|
||||
# CONFIG_MK7 is not set
|
||||
# CONFIG_MK8 is not set
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
# CONFIG_MMC_SDHCI_PCI is not set
|
||||
# CONFIG_MMC_SDHCI_PLTFM is not set
|
||||
# CONFIG_MMC_TIFM_SD is not set
|
||||
CONFIG_MMC_USHC=y
|
||||
# CONFIG_MMC_WBSD is not set
|
||||
# CONFIG_MODIFY_LDT_SYSCALL is not set
|
||||
CONFIG_MODULES_TREE_LOOKUP=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
|
Loading…
Reference in New Issue
Block a user