├── ath25 ├── generic │ └── target.mk ├── base-files │ ├── etc │ │ └── board.d │ │ │ ├── 01_leds │ │ │ └── 02_network │ └── lib │ │ └── preinit │ │ └── 15_preinit_iface_atheros ├── profiles │ └── 00-default.mk ├── Makefile └── patches-5.15 │ ├── 700-swconfig_mvswitch.patch │ ├── 141-redboot_partition_scan.patch │ ├── 210-reset_button.patch │ └── 140-redboot_boardconfig.patch ├── octeontx ├── generic │ └── target.mk ├── base-files │ └── etc │ │ ├── inittab │ │ └── board.d │ │ └── 02_network ├── image │ └── Makefile └── Makefile ├── mpc83xx ├── base-files.mk ├── base-files │ ├── etc │ │ ├── inittab │ │ └── uci-defaults │ │ │ └── 02_network │ └── lib │ │ ├── preinit │ │ └── 03_preinit_do_mpc83xx.sh │ │ └── mpc83xx.sh ├── patches-3.18 │ ├── 101-mpc8377_wlan-dts-add-gpio-leds.patch │ ├── 300-mpc8377_wlan-dts-add-openwrt-hacks.patch │ └── 111-etsec27_war.patch ├── modules.mk ├── Makefile └── image │ └── Makefile ├── mpc52xx ├── base-files │ └── etc │ │ └── inittab ├── image │ └── Makefile └── Makefile ├── sibyte ├── base-files │ └── etc │ │ └── inittab ├── Makefile ├── patches-3.3 │ └── 105-sibyte_hwmon.patch └── image │ └── Makefile ├── archs38 ├── image │ ├── Config.in │ ├── uEnv.txt │ └── gen_axs10x_sdcard_img.sh ├── generic │ ├── target.mk │ └── profiles │ │ └── 00-default.mk ├── base-files │ └── etc │ │ └── board.d │ │ └── 02_network └── Makefile ├── bcm63xx ├── generic │ └── target.mk ├── image │ └── lzma-loader │ │ └── src │ │ ├── lzma-data.lds │ │ ├── loader2.lds │ │ ├── loader.lds │ │ ├── cache.h │ │ ├── printf.h │ │ ├── config.h │ │ ├── LzmaTypes.h │ │ ├── board.c │ │ ├── cp0regdef.h │ │ └── cache.c ├── patches-5.15 │ ├── 351-set-board-usbh-ports.patch │ ├── 145-pinctrl-BCM6362-fix-gpio-mode.patch │ ├── 402_bcm63xx_enet_vlan_incoming_fixed.patch │ ├── 327-irqchip-bcm6345-periph-clear-on-init.patch │ ├── 424-bcm63xx_enet_no_request_mem_region.patch │ ├── 433-MIPS-BCM63XX-enable-nand-support.patch │ ├── 326-irqchip-bcm6345-report-eff-affinity.patch │ ├── 432-MIPS-BCM63XX-detect-nand-nvram.patch │ ├── 372_dont_register_pflash_when_available_in_dtb.patch │ ├── 325-irqchip-bcm6345-external-fix-base-uninitialized.patch │ ├── 100-macronix_nand_block_protection_support.patch │ ├── 501-board_bcm6328-extend-96328avng-reference-board.patch │ ├── 335-MIPS-BCM63XX-fix-PCIe-memory-window-size.patch │ ├── 324-irqchip-bcm6345-periph-fix-block-uninitialized.patch │ ├── 800-wl_exports.patch │ ├── 428-bcm63xx_enet-rgmii-ctrl-fix.patch │ ├── 331-MIPS-BCM63XX-define-variant-id-field.patch │ ├── 403-6358-enet1-external-mii-clk.patch │ ├── 803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch │ ├── 401-bcm963xx_real_rootfs_length.patch │ ├── 110-MIPS-BCM63XX-EHCI-controller-does-not-support-overcu.patch │ ├── 100-MIPS-BCM63XX-add-USB-host-clock-enable-delay.patch │ ├── 371_add_of_node_available_by_alias.patch │ ├── 415-MIPS-BCM63XX-export-the-attached-flash-type.patch │ ├── 801-ssb_export_fallback_sprom.patch │ ├── 802-rtl8367r_fix_RGMII_support.patch │ ├── 378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch │ ├── 109-MIPS-BCM63XX-register-EHCI-controller-if-board-enabl.patch │ ├── 514-board_bcm6345.patch │ ├── 106-MIPS-BCM63XX-register-OHCI-controller-if-board-enabl.patch │ ├── 338-MIPS-BCM63XX-increase-number-of-IRQs.patch │ ├── 101-MIPS-BCM63XX-add-USB-device-clock-enable-delay-to-cl.patch │ ├── 373-MIPS-BCM63XX-register-interrupt-controllers-through-.patch │ ├── 346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch │ ├── 513-board-bcm6338.patch │ ├── 383-bcm63xx_select_pinctrl.patch │ ├── 333-MIPS-BCM63XX-detect-BCM6362-variants.patch │ ├── 133-Documentation-add-BCM6348-pincontroller-binding-docu.patch │ ├── 430-MIPS-BCM63XX-add-nand-clocks.patch │ ├── 379-MIPS-BCM63XX-provide-a-gpio-lookup-for-the-pcmcia-re.patch │ ├── 334-MIPS-BCM63XX-detect-BCM6368-variants.patch │ ├── 531-board_bcm6348-bt-voyager-2500v-bb.patch │ ├── 380-pcmcia-bcm63xx_pmcia-use-the-new-named-gpio.patch │ ├── 420-BCM63XX-add-endian-check-for-ath9k.patch │ └── 337-MIPS-BCM63XX-widen-cpuid-field.patch ├── profiles │ └── default.mk ├── dts │ ├── bcm63167-sercomm-h500-s-lowi.dts │ ├── bcm63167-sercomm-h500-s-vfes.dts │ ├── bcm6345-brcm-bcm96345gw2.dts │ ├── bcm6358-pirelli-a226g.dts │ ├── bcm6358-pirelli-a226m.dts │ ├── bcm6358-pirelli-a226m-fwb.dts │ ├── bcm6358-sfr-neufbox-4-foxconn-r1.dts │ ├── bcm6358-sfr-neufbox-4-sercomm-r0.dts │ ├── bcm6358-huawei-echolife-hg556a-c.dts │ ├── bcm6358-huawei-echolife-hg556a-a.dts │ ├── bcm6358-huawei-echolife-hg556a-b.dts │ ├── bcm6348-dynalink-rta1025w.dts │ ├── bcm6348-davolink-dv-201amr.dts │ ├── bcm6348-sagem-fast-2404.dts │ ├── bcm6358-brcm-bcm96358vw2.dts │ ├── bcm6338-brcm-bcm96338w.dts │ ├── bcm6338-brcm-bcm96338gw.dts │ ├── bcm6358-brcm-bcm96358vw.dts │ ├── bcm63268-inteno-vg50.dts │ ├── bcm6348-usrobotics-usr9108.dts │ ├── bcm63268-brcm-bcm963268bu-p300.dts │ ├── bcm6348-brcm-bcm96348r.dts │ ├── bcm6348-tecom-gw6000.dts │ ├── bcm6368-brcm-bcm96368mvwg.dts │ ├── bcm6368-brcm-bcm96368mvngr.dts │ ├── bcm63269-brcm-bcm963269bhr.dts │ ├── bcm6338-d-link-dsl-2640u.dts │ ├── bcm3368-netgear-cvg834g.dts │ ├── bcm6338-dynalink-rta1320.dts │ ├── bcm6358-alcatel-rg100a.dts │ ├── bcm6358-d-link-dsl-2650u.dts │ ├── bcm6328-brcm-bcm963281tan.dts │ ├── bcm6348-telsey-cpva502plus.dts │ ├── bcm6359-huawei-echolife-hg520v.dts │ ├── bcm6348-brcm-bcm96348gw-10.dts │ ├── bcm6328-brcm-bcm96328avng.dts │ ├── bcm6318-brcm-bcm96318ref.dts │ ├── bcm6358-d-link-dva-g3810bn-tl.dts │ ├── bcm6358-sfr-neufbox-4.dtsi │ ├── bcm6348-brcm-bcm96348gw.dts │ ├── bcm6348-brcm-bcm96348gw-11.dts │ ├── bcm6318-brcm-bcm96318ref-p300.dts │ ├── bcm6348-telsey-magic.dts │ ├── bcm6348-netgear-dg834g-v4.dts │ ├── bcm6348-inventel-livebox-1.dts │ ├── bcm6345-dynalink-rta770w.dts │ ├── bcm6345-dynalink-rta770bw.dts │ ├── bcm6348-comtrend-ct-536plus.dts │ ├── bcm6348-sagem-fast-2604.dts │ ├── bcm6348-tecom-gw6200.dts │ ├── bcm6348-bt-voyager-2500v-bb.dts │ └── bcm6348-belkin-f5d7633.dts ├── base-files │ ├── etc │ │ ├── uci-defaults │ │ │ ├── 04_led_migration │ │ │ └── 09_fix_crc │ │ └── hotplug.d │ │ │ └── firmware │ │ │ └── 10-rt2x00-eeprom │ └── lib │ │ └── upgrade │ │ └── platform.sh ├── smp │ ├── target.mk │ └── config-default ├── Makefile └── modules.mk ├── oxnas ├── base-files │ ├── lib │ │ └── upgrade │ │ │ └── platform.sh │ └── etc │ │ ├── init.d │ │ └── set-irq-affinity │ │ └── board.d │ │ └── 02_network ├── ox810se │ ├── target.mk │ ├── config-default │ └── profiles │ │ └── 00-default.mk ├── ox820 │ ├── target.mk │ └── profiles │ │ └── 00-default.mk ├── image │ ├── Makefile │ └── ox810se.mk ├── patches-5.15 │ ├── 510-ox820-libata-leds.patch │ ├── 150-oxnas-restart.patch │ ├── 320-oxnas-phy-pcie.patch │ ├── 500-oxnas-sata.patch │ └── 999-libata-hacks.patch ├── Makefile ├── files │ └── arch │ │ └── arm │ │ └── include │ │ └── debug │ │ └── uncompress-ox820.h └── modules.mk ├── ep93xx ├── base-files │ ├── etc │ │ └── inittab │ └── lib │ │ └── preinit │ │ └── 05_set_ether_mac_rdc ├── profiles │ ├── 00-default.mk │ └── 01-simone.mk ├── Makefile └── image │ └── Makefile ├── cobalt ├── base-files │ └── etc │ │ └── diag.sh ├── image │ └── Makefile ├── Makefile └── modules.mk ├── iop32x ├── base-files │ └── etc │ │ └── config │ │ └── network ├── patches-3.3 │ ├── 003-plat-iop-fix-section-mismatch.patch │ ├── 002-Disintegrate-asm-system.h-for-ARM.patch │ └── 001-ARM-Fix-missing-linux-types.h-inclusion-in-asm-hardw.patch ├── Makefile └── image │ └── Makefile ├── pxa ├── profiles │ ├── 100-Default.mk │ └── 200-Gumstix.mk ├── patches-3.10 │ ├── a01-arm-debugll-printk.patch │ └── 002-verdex_lcd_support.patch ├── Makefile ├── patches-3.3 │ ├── a01-arm-debugll-printk.patch │ └── 002-verdex_lcd_support.patch └── image │ └── Makefile ├── cns21xx ├── base-files │ ├── lib │ │ ├── cns21xx.sh │ │ └── upgrade │ │ │ └── platform.sh │ └── etc │ │ ├── uci-defaults │ │ └── 01_leds │ │ └── diag.sh ├── profiles │ └── 00-default.mk ├── Makefile ├── modules.mk └── patches-3.10 │ ├── 002-arm-debugll-printk.patch │ └── 003-arm-introduce-fa-platform.patch └── sparc ├── Makefile └── image └── Makefile /ath25/generic/target.mk: -------------------------------------------------------------------------------- 1 | BOARDNAME:=Generic 2 | -------------------------------------------------------------------------------- /octeontx/generic/target.mk: -------------------------------------------------------------------------------- 1 | BOARDNAME:=Generic 2 | -------------------------------------------------------------------------------- /mpc83xx/base-files.mk: -------------------------------------------------------------------------------- 1 | define Package/base-files/install-target 2 | rm -f $(1)/etc/config/network 3 | endef 4 | 5 | 6 | -------------------------------------------------------------------------------- /mpc52xx/base-files/etc/inittab: -------------------------------------------------------------------------------- 1 | ::sysinit:/etc/init.d/rcS S boot 2 | ::shutdown:/etc/init.d/rcS K shutdown 3 | ttyPSC0::askfirst:/bin/ash --login 4 | -------------------------------------------------------------------------------- /sibyte/base-files/etc/inittab: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2006-2009 OpenWrt.org 2 | 3 | ::sysinit:/etc/init.d/rcS 4 | duart0::askfirst:/bin/ash --login 5 | -------------------------------------------------------------------------------- /archs38/image/Config.in: -------------------------------------------------------------------------------- 1 | config AXS10X_SD_BOOT_PARTSIZE 2 | int "Boot (SD Card) filesystem partition size (in MB)" 3 | depends on TARGET_archs38 4 | default 20 5 | 6 | -------------------------------------------------------------------------------- /bcm63xx/generic/target.mk: -------------------------------------------------------------------------------- 1 | BOARDNAME:=generic 2 | 3 | define Target/Description 4 | Build firmware images for BCM63XX boards without SMP support. 5 | endef 6 | 7 | 8 | -------------------------------------------------------------------------------- /bcm63xx/image/lzma-loader/src/lzma-data.lds: -------------------------------------------------------------------------------- 1 | OUTPUT_ARCH(mips) 2 | SECTIONS { 3 | .data.lzma : { 4 | _lzma_data_start = .; 5 | *(.data) 6 | _lzma_data_end = .; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /mpc83xx/base-files/etc/inittab: -------------------------------------------------------------------------------- 1 | ::sysinit:/etc/init.d/rcS S boot 2 | ::shutdown:/etc/init.d/rcS K shutdown 3 | ttyS0::askfirst:/bin/ash --login 4 | ttyS1::askfirst:/bin/ash --login 5 | -------------------------------------------------------------------------------- /oxnas/base-files/lib/upgrade/platform.sh: -------------------------------------------------------------------------------- 1 | REQUIRE_IMAGE_METADATA=1 2 | 3 | platform_check_image() { 4 | return 0 5 | } 6 | 7 | platform_do_upgrade() { 8 | nand_do_upgrade $1 9 | } 10 | -------------------------------------------------------------------------------- /archs38/generic/target.mk: -------------------------------------------------------------------------------- 1 | BOARDNAME:=Generic 2 | FEATURES += ext4 usb ramdisk rootfs-part 3 | 4 | define Target/Description 5 | Build firmware images for ARC HS38 based boards. 6 | endef 7 | 8 | 9 | -------------------------------------------------------------------------------- /bcm63xx/image/lzma-loader/src/loader2.lds: -------------------------------------------------------------------------------- 1 | OUTPUT_ARCH(mips) 2 | SECTIONS { 3 | .text : { 4 | startup = .; 5 | *(.text) 6 | *(.text.*) 7 | *(.data) 8 | *(.data.*) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /oxnas/ox810se/target.mk: -------------------------------------------------------------------------------- 1 | FEATURES+=source-only 2 | 3 | SUBTARGET:=ox810se 4 | BOARDNAME:=OX810SE 5 | CPU_TYPE:=arm926ej-s 6 | 7 | define Target/Description 8 | Oxford OX810SE 9 | endef 10 | -------------------------------------------------------------------------------- /oxnas/ox820/target.mk: -------------------------------------------------------------------------------- 1 | SUBTARGET:=ox820 2 | BOARDNAME:=OX820/NAS782x 3 | CPU_TYPE:=mpcore 4 | FEATURES+=nand pci pcie ubifs usb 5 | 6 | define Target/Description 7 | Oxford/PLXTECH OX820/NAS782x 8 | endef -------------------------------------------------------------------------------- /mpc83xx/base-files/lib/preinit/03_preinit_do_mpc83xx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | do_mpc83xx() { 4 | . /lib/mpc83xx.sh 5 | 6 | mpc83xx_board_detect 7 | } 8 | 9 | boot_hook_add preinit_main do_mpc83xx 10 | -------------------------------------------------------------------------------- /ep93xx/base-files/etc/inittab: -------------------------------------------------------------------------------- 1 | ::sysinit:/etc/init.d/rcS S boot 2 | ::shutdown:/etc/init.d/rcS K shutdown 3 | tts/0::askfirst:/bin/ash --login 4 | ttyAM0::askfirst:/bin/ash --login 5 | tty1::askfirst:/bin/ash --login 6 | -------------------------------------------------------------------------------- /octeontx/base-files/etc/inittab: -------------------------------------------------------------------------------- 1 | ::sysinit:/etc/init.d/rcS S boot 2 | ::shutdown:/etc/init.d/rcS K shutdown 3 | tts/0::askfirst:/usr/libexec/login.sh 4 | ttyAMA0::askfirst:/usr/libexec/login.sh 5 | tty1::askfirst:/usr/libexec/login.sh 6 | -------------------------------------------------------------------------------- /oxnas/image/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | include $(INCLUDE_DIR)/image.mk 3 | 4 | VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux 5 | UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage 6 | 7 | include $(SUBTARGET).mk 8 | 9 | $(eval $(call BuildImage)) 10 | -------------------------------------------------------------------------------- /ath25/base-files/etc/board.d/01_leds: -------------------------------------------------------------------------------- 1 | # Copyright 2012-2015 OpenWrt.org 2 | # 3 | 4 | . /lib/functions/uci-defaults.sh 5 | 6 | board_config_update 7 | 8 | ucidef_set_led_netdev "wlan" "wlan" "wlan" "wlan0" 9 | 10 | board_config_flush 11 | 12 | exit 0 13 | -------------------------------------------------------------------------------- /oxnas/ox810se/config-default: -------------------------------------------------------------------------------- 1 | # CONFIG_CACHE_L2X0 is not set 2 | CONFIG_CPU_IDLE=y 3 | CONFIG_CPU_IDLE_GOV_MENU=y 4 | CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y 5 | # CONFIG_DEBUG_UNCOMPRESS is not set 6 | CONFIG_EXT4_FS=y 7 | CONFIG_FS_MBCACHE=y 8 | CONFIG_MACH_OX810SE=y 9 | -------------------------------------------------------------------------------- /oxnas/ox810se/profiles/00-default.mk: -------------------------------------------------------------------------------- 1 | define Profile/Default 2 | NAME:=Default Profile 3 | PRIORITY:=1 4 | endef 5 | 6 | define Profile/Default/Description 7 | Default package set compatible with most boards. 8 | endef 9 | 10 | $(eval $(call Profile,Default)) 11 | -------------------------------------------------------------------------------- /cobalt/base-files/etc/diag.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (C) 2009-2013 OpenWrt.org 3 | 4 | . /lib/functions/leds.sh 5 | 6 | status_led="qube::front" 7 | 8 | set_state() { 9 | case "$1" in 10 | preinit) 11 | status_led_on 12 | ;; 13 | done) 14 | status_led_off 15 | ;; 16 | esac 17 | } 18 | -------------------------------------------------------------------------------- /ep93xx/base-files/lib/preinit/05_set_ether_mac_rdc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (C) 2010 OpenWrt.org 3 | 4 | . /lib/functions.sh 5 | 6 | set_ether_mac() { 7 | mac=$(sed -n 's/^Serial.* 000000/02/p' /proc/cpuinfo) 8 | ifconfig eth0 hw ether $mac 9 | } 10 | 11 | boot_hook_add preinit_main set_ether_mac 12 | 13 | -------------------------------------------------------------------------------- /archs38/base-files/etc/board.d/02_network: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 OpenWrt.org 3 | # 4 | 5 | . /lib/functions/uci-defaults.sh 6 | 7 | board_config_update 8 | 9 | case "$(board_name)" in 10 | snps,axs103|\ 11 | snps,hsdk) 12 | ucidef_set_interface_lan "eth0" "dhcp" 13 | ;; 14 | esac 15 | 16 | board_config_flush 17 | 18 | exit 0 19 | -------------------------------------------------------------------------------- /ath25/profiles/00-default.mk: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2011 OpenWrt.org 4 | 5 | define Profile/Default 6 | NAME:=Default Profile 7 | PRIORITY:=1 8 | endef 9 | 10 | define Profile/Default/Description 11 | Default package set compatible with most boards. 12 | endef 13 | $(eval $(call Profile,Default)) 14 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/351-set-board-usbh-ports.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c 2 | +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c 3 | @@ -547,6 +547,7 @@ static struct board_info __initdata boar 4 | 5 | .has_ehci0 = 1, 6 | .has_ohci0 = 1, 7 | + .num_usbh_ports = 2, 8 | .has_pccard = 1, 9 | .has_pci = 1, 10 | .has_uart0 = 1, 11 | -------------------------------------------------------------------------------- /oxnas/patches-5.15/510-ox820-libata-leds.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/arm/mach-oxnas/Kconfig 2 | +++ b/arch/arm/mach-oxnas/Kconfig 3 | @@ -2,6 +2,7 @@ 4 | menuconfig ARCH_OXNAS 5 | bool "Oxford Semiconductor OXNAS Family SoCs" 6 | select ARCH_HAS_RESET_CONTROLLER 7 | + select ARCH_WANT_LIBATA_LEDS 8 | select COMMON_CLK_OXNAS 9 | select GPIOLIB 10 | select MFD_SYSCON 11 | -------------------------------------------------------------------------------- /bcm63xx/profiles/default.mk: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2016 LEDE project 4 | 5 | define Profile/Default 6 | NAME:=Default Profile 7 | PACKAGES:=kmod-b43 wpad-basic-mbedtls 8 | PRIORITY:=1 9 | endef 10 | 11 | define Profile/Default/Description 12 | Package set compatible with most boards. 13 | endef 14 | 15 | $(eval $(call Profile,Default)) 16 | -------------------------------------------------------------------------------- /iop32x/base-files/etc/config/network: -------------------------------------------------------------------------------- 1 | # Network configuration file 2 | 3 | config interface loopback 4 | option ifname lo 5 | option proto static 6 | option ipaddr 127.0.0.1 7 | option netmask 255.0.0.0 8 | 9 | config interface lan 10 | option ifname eth0 11 | option proto dhcp 12 | 13 | config interface lan6 14 | option ifname @lan 15 | option proto dhcpv6 16 | option reqprefix no 17 | -------------------------------------------------------------------------------- /archs38/generic/profiles/00-default.mk: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2016 OpenWrt.org 4 | 5 | define Profile/Default 6 | NAME:=Default Profile (all drivers) 7 | PACKAGES:= kmod-usb2 kmod-ath9k-htc wpad-basic-mbedtls 8 | endef 9 | 10 | define Profile/Default/Description 11 | Default package set compatible with most boards. 12 | endef 13 | $(eval $(call Profile,Default)) 14 | -------------------------------------------------------------------------------- /pxa/profiles/100-Default.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2012 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | 8 | define Profile/Default 9 | NAME:=Default Profile 10 | PACKAGES:= 11 | endef 12 | 13 | define Profile/Default/Description 14 | Default PXA Profile 15 | endef 16 | $(eval $(call Profile,Default)) 17 | 18 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm63167-sercomm-h500-s-lowi.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0-or-later OR MIT) 2 | /* 3 | * Device Tree file for Sercomm H500-s lowi 4 | * 5 | * Copyright (C) 2020 Daniel González Cabanelas 6 | */ 7 | 8 | #include "bcm63167-sercomm-h500-s.dtsi" 9 | 10 | / { 11 | model = "Sercomm H500-s lowi"; 12 | compatible = "sercomm,h500-s-lowi", "brcm,bcm63167", "brcm,bcm63268"; 13 | }; 14 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm63167-sercomm-h500-s-vfes.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0-or-later OR MIT) 2 | /* 3 | * Device Tree file for Sercomm H500-s vfes 4 | * 5 | * Copyright (C) 2020 Daniel González Cabanelas 6 | */ 7 | 8 | #include "bcm63167-sercomm-h500-s.dtsi" 9 | 10 | / { 11 | model = "Sercomm H500-s vfes"; 12 | compatible = "sercomm,h500-s-vfes", "brcm,bcm63167", "brcm,bcm63268"; 13 | }; 14 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/145-pinctrl-BCM6362-fix-gpio-mode.patch: -------------------------------------------------------------------------------- 1 | --- a/drivers/pinctrl/bcm63xx/pinctrl-bcm6362.c 2 | +++ b/drivers/pinctrl/bcm63xx/pinctrl-bcm6362.c 3 | @@ -566,7 +566,7 @@ static int bcm6362_pinctrl_set_mux(struc 4 | val = BIT(grp->pins[0]); 5 | break; 6 | case BCM6362_MODE: 7 | - reg = pctl->ctrl; 8 | + reg = pctl->mode; 9 | mask = BIT(grp->pins[0]); 10 | val = BIT(grp->pins[0]); 11 | break; 12 | -------------------------------------------------------------------------------- /archs38/image/uEnv.txt: -------------------------------------------------------------------------------- 1 | setenv kernel_addr_r 0x82000000 2 | setenv fdt_addr_r 0x83000000 3 | setenv loadkernel fatload mmc 0 \${kernel_addr_r} uImage 4 | setenv loaddtb fatload mmc 0 \${fdt_addr_r} \${dts} 5 | setenv bootargs earlycon=uart8250,mmio32,0xe0022000,115200n8 console=ttyS3,115200n8 root=/dev/mmcblk0p2 rootwait print-fatal-signals=1 6 | setenv uenvcmd run loadkernel\; run loaddtb\; bootm \${kernel_addr_r} - \${fdt_addr_r} 7 | run uenvcmd 8 | -------------------------------------------------------------------------------- /bcm63xx/base-files/etc/uci-defaults/04_led_migration: -------------------------------------------------------------------------------- 1 | . /lib/functions/migrations.sh 2 | 3 | board=$(board_name) 4 | 5 | case "$board" in 6 | brcm,bcm96318ref-p300|\ 7 | brcm,bcm963281tan|\ 8 | brcm,bcm96328avng|\ 9 | d-link,dsl-2640b-b|\ 10 | d-link,dva-g3810bn-tl|\ 11 | netgear,dg834g-v4|\ 12 | usrobotics,usr9108) 13 | migrate_leds "^.*::=" 14 | ;; 15 | esac 16 | 17 | remove_devicename_leds 18 | 19 | migrations_apply system 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /pxa/profiles/200-Gumstix.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2012 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | 8 | define Profile/Gumstix 9 | NAME:=Gumstix 10 | PACKAGES:=uboot-pxa-gumstix 11 | endef 12 | 13 | define Profile/Atheros-ath5k/Description 14 | Package set compatible with the Gumstix boards 15 | endef 16 | $(eval $(call Profile,Gumstix)) 17 | 18 | -------------------------------------------------------------------------------- /cns21xx/base-files/lib/cns21xx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (C) 2010 OpenWrt.org 4 | # 5 | 6 | get_board_name() { 7 | local hardware 8 | local name 9 | 10 | hardware=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /Hardware/ {print $2}' /proc/cpuinfo) 11 | 12 | case "$hardware" in 13 | *NSB3AST) 14 | name="nsb3ast" 15 | ;; 16 | "NS-K330 NAS") 17 | name="ns-k330" 18 | ;; 19 | *) 20 | name="generic" 21 | ;; 22 | esac 23 | 24 | echo $name 25 | } 26 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/402_bcm63xx_enet_vlan_incoming_fixed.patch: -------------------------------------------------------------------------------- 1 | --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c 2 | +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c 3 | @@ -1627,7 +1627,7 @@ static int bcm_enet_change_mtu(struct ne 4 | return -EBUSY; 5 | 6 | /* add ethernet header + vlan tag size */ 7 | - actual_mtu += VLAN_ETH_HLEN; 8 | + actual_mtu += VLAN_ETH_HLEN + VLAN_HLEN; 9 | 10 | /* 11 | * setup maximum size before we get overflow mark in 12 | -------------------------------------------------------------------------------- /iop32x/patches-3.3/003-plat-iop-fix-section-mismatch.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/arm/plat-iop/pci.c 2 | +++ b/arch/arm/plat-iop/pci.c 3 | @@ -221,7 +221,7 @@ int iop3xx_pci_setup(int nr, struct pci_ 4 | return 1; 5 | } 6 | 7 | -struct pci_bus *iop3xx_pci_scan_bus(int nr, struct pci_sys_data *sys) 8 | +struct pci_bus * __devinit iop3xx_pci_scan_bus(int nr, struct pci_sys_data *sys) 9 | { 10 | return pci_scan_root_bus(NULL, sys->busnr, &iop3xx_ops, sys, 11 | &sys->resources); 12 | -------------------------------------------------------------------------------- /oxnas/ox820/profiles/00-default.mk: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2016 OpenWrt.org 4 | 5 | define Profile/Default 6 | NAME:=Default Profile 7 | PRIORITY:=1 8 | PACKAGES:=\ 9 | kmod-i2c-gpio kmod-gpio-beeper kmod-hwmon-gpiofan \ 10 | kmod-rtc-pcf8563 kmod-rtc-ds1307 kmod-usb3 11 | endef 12 | 13 | define Profile/Default/Description 14 | Default package set compatible with most boards. 15 | endef 16 | 17 | $(eval $(call Profile,Default)) 18 | -------------------------------------------------------------------------------- /ep93xx/profiles/00-default.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2012 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | 8 | define Profile/Default 9 | NAME:=Default Profile 10 | PACKAGES:= \ 11 | kmod-usb-core kmod-usb-ohci 12 | endef 13 | 14 | define Profile/Default/Description 15 | Default package set compatible with most EP93xx-based boards. 16 | endef 17 | $(eval $(call Profile,Default)) 18 | -------------------------------------------------------------------------------- /oxnas/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | ARCH:=arm 4 | BOARD:=oxnas 5 | BOARDNAME:=PLXTECH/Oxford NAS782x/OX8xx 6 | SUBTARGETS:=ox810se ox820 7 | FEATURES:=gpio ramdisk rtc squashfs 8 | DEVICE_TYPE:=nas 9 | 10 | KERNEL_PATCHVER:=5.15 11 | 12 | include $(INCLUDE_DIR)/target.mk 13 | 14 | DEFAULT_PACKAGES += \ 15 | kmod-button-hotplug kmod-input-gpio-keys-polled \ 16 | kmod-leds-gpio uboot-envtools 17 | 18 | KERNELNAME:=zImage dtbs 19 | 20 | $(eval $(call BuildTarget)) 21 | -------------------------------------------------------------------------------- /mpc83xx/patches-3.18/101-mpc8377_wlan-dts-add-gpio-leds.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/powerpc/boot/dts/mpc8377_wlan.dts 2 | +++ b/arch/powerpc/boot/dts/mpc8377_wlan.dts 3 | @@ -460,4 +460,18 @@ 4 | 0 0x00800000>; 5 | }; 6 | }; 7 | + 8 | + leds { 9 | + compatible = "gpio-leds"; 10 | + 11 | + diag { 12 | + gpios = <&gpio1 9 1>; 13 | + default-state = "off"; 14 | + }; 15 | + 16 | + wireless { 17 | + gpios = <&gpio1 10 1>; 18 | + default-state = "off"; 19 | + }; 20 | + }; 21 | }; 22 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/327-irqchip-bcm6345-periph-clear-on-init.patch: -------------------------------------------------------------------------------- 1 | --- a/drivers/irqchip/irq-bcm6345-periph.c 2 | +++ b/drivers/irqchip/irq-bcm6345-periph.c 3 | @@ -240,6 +240,9 @@ static int __init __bcm6345_periph_intc_ 4 | /* route all interrupts to line 0 by default */ 5 | if (i == 0) 6 | block->mask_cache[w] = 0xffffffff; 7 | + 8 | + /* mask all interrupts */ 9 | + __raw_writel(0, block->en_reg[w]); 10 | } 11 | 12 | irq_set_handler_data(block->parent_irq, data); 13 | -------------------------------------------------------------------------------- /bcm63xx/smp/target.mk: -------------------------------------------------------------------------------- 1 | BOARDNAME:=smp 2 | FEATURES+=nand 3 | 4 | define Target/Description 5 | Build firmware images for BCM63XX boards with SMP and NAND support. 6 | SoCs with 2 cores: 7 | - BCM6328 (some boards only have 1 core) 8 | - BCM6358 (SMP unsupported due to shared TLB) 9 | - BCM6362 10 | - BCM6368 11 | - BCM63268 12 | SoCs with NAND controller: 13 | - BCM6328 (v2.2) 14 | - BCM6362 (v2.2) 15 | - BCM6368 (v2.1) 16 | - BCM63268 (v4.0) 17 | endef 18 | -------------------------------------------------------------------------------- /sparc/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2010-2013 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | include $(TOPDIR)/rules.mk 8 | 9 | ARCH:=sparc 10 | BOARD:=sparc 11 | BOARDNAME:=Sun UltraSPARC 12 | FEATURES+=fpu tgz ext4 squashfs broken 13 | 14 | KERNEL_PATCHVER:=3.10 15 | MAINTAINER:=Imre Kaloz 16 | 17 | include $(INCLUDE_DIR)/target.mk 18 | 19 | $(eval $(call BuildTarget)) 20 | -------------------------------------------------------------------------------- /iop32x/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2007-2011 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | include $(TOPDIR)/rules.mk 8 | 9 | ARCH:=arm 10 | BOARD:=iop32x 11 | BOARDNAME:=Intel IOP32x 12 | FEATURES:=squashfs broken 13 | MAINTAINER:=Imre Kaloz 14 | 15 | KERNEL_PATCHVER:=3.3 16 | 17 | include $(INCLUDE_DIR)/target.mk 18 | 19 | KERNELNAME:=zImage 20 | 21 | $(eval $(call BuildTarget)) 22 | -------------------------------------------------------------------------------- /archs38/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2016 OpenWrt.org 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | ARCH:=arc 8 | CPU_TYPE:=archs 9 | BOARD:=archs38 10 | BOARDNAME:=Synopsys DesignWare ARC HS38 11 | FEATURES:=source-only 12 | SUBTARGETS:=generic 13 | 14 | KERNEL_PATCHVER:=6.6 15 | 16 | DEVICE_TYPE:=basic 17 | 18 | define Target/Description 19 | Synopsys DesignWare boards 20 | endef 21 | 22 | include $(INCLUDE_DIR)/target.mk 23 | 24 | $(eval $(call BuildTarget)) 25 | -------------------------------------------------------------------------------- /oxnas/base-files/etc/init.d/set-irq-affinity: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | START=99 4 | 5 | get_irq() { 6 | local name="$1" 7 | grep -m 1 "$name" /proc/interrupts | cut -d: -f1 | sed 's, *,,' 8 | } 9 | 10 | set_irq_affinity() { 11 | local name="$1" 12 | local val="$2" 13 | local irq="$(get_irq "$name")" 14 | [ -n "$irq" ] || return 15 | echo "$val" > "/proc/irq/$irq/smp_affinity" 16 | } 17 | 18 | start() { 19 | set_irq_affinity ehci_hcd 2 20 | set_irq_affinity xhci_hcd 2 21 | set_irq_affinity sata 2 22 | } 23 | -------------------------------------------------------------------------------- /cns21xx/base-files/etc/uci-defaults/01_leds: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (C) 2010 OpenWrt.org 4 | # 5 | 6 | . /lib/functions/uci-defaults.sh 7 | . /lib/cns21xx.sh 8 | 9 | board=$(get_board_name) 10 | 11 | case "$board" in 12 | "ns-k330") 13 | ucidef_set_led_netdev "eth_orange" "ETH (orange)" "ns-k330:orange:eth" "eth0" 14 | ucidef_set_led_usbdev "usb1" "USB1" "ns-k330:green:usb1" "1-1" 15 | ucidef_set_led_usbdev "usb2" "USB2" "ns-k330:green:usb2" "1-2" 16 | ;; 17 | esac 18 | 19 | ucidef_commit_leds 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /octeontx/base-files/etc/board.d/02_network: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2018 OpenWrt.org 3 | # 4 | 5 | . ./lib/functions/uci-defaults.sh 6 | 7 | board=$(board_name) 8 | 9 | board_config_update 10 | 11 | case "$board" in 12 | gw,gw610x|\ 13 | gw,gw6903) 14 | ucidef_set_interfaces_lan 'eth0' 15 | ;; 16 | gw,gw620x|\ 17 | gw,gw630x) 18 | ucidef_set_interfaces_lan_wan 'eth0' 'eth1' 19 | ;; 20 | gw,gw640x) 21 | ucidef_set_interfaces_lan_wan 'eth0 eth1 eth2 eth3' 'eth4' 22 | ;; 23 | esac 24 | 25 | board_config_flush 26 | 27 | exit 0 28 | -------------------------------------------------------------------------------- /bcm63xx/image/lzma-loader/src/loader.lds: -------------------------------------------------------------------------------- 1 | OUTPUT_ARCH(mips) 2 | SECTIONS { 3 | .text : { 4 | _code_start = .; 5 | *(.text) 6 | *(.text.*) 7 | *(.rodata) 8 | *(.rodata.*) 9 | *(.data.lzma) 10 | } 11 | 12 | . = ALIGN(32); 13 | .data : { 14 | *(.data) 15 | *(.data.*) 16 | } 17 | 18 | . = ALIGN(32); 19 | _code_end = .; 20 | 21 | _bss_start = .; 22 | .bss : { 23 | *(.bss) 24 | *(.bss.*) 25 | } 26 | 27 | . = ALIGN(32); 28 | _bss_end = .; 29 | 30 | . = . + 8192; 31 | _stack = .; 32 | 33 | workspace = .; 34 | } 35 | -------------------------------------------------------------------------------- /cns21xx/profiles/00-default.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2010 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | 8 | define Profile/Default 9 | NAME:=Default Profile (all drivers) 10 | PACKAGES:= \ 11 | kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb2-cns21xx \ 12 | kmod-ledtrig-usbdev 13 | endef 14 | 15 | define Profile/Default/Description 16 | Default package set compatible with most boards. 17 | endef 18 | $(eval $(call Profile,Default)) 19 | -------------------------------------------------------------------------------- /bcm63xx/image/lzma-loader/src/cache.h: -------------------------------------------------------------------------------- 1 | /* 2 | * LZMA compressed kernel loader for Atheros AR7XXX/AR9XXX based boards 3 | * 4 | * Copyright (C) 2011 Gabor Juhos 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License version 2 as published 8 | * by the Free Software Foundation. 9 | * 10 | */ 11 | 12 | #ifndef __CACHE_H 13 | #define __CACHE_H 14 | 15 | void flush_cache(unsigned long start_addr, unsigned long size); 16 | 17 | #endif /* __CACHE_H */ 18 | -------------------------------------------------------------------------------- /mpc83xx/base-files/etc/uci-defaults/02_network: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (C) 2012 OpenWrt.org 4 | # 5 | 6 | [ -e /etc/config/network ] && exit 0 7 | 8 | touch /etc/config/network 9 | 10 | . /lib/functions/uci-defaults.sh 11 | . /lib/mpc83xx.sh 12 | 13 | ucidef_set_interface_loopback 14 | 15 | board=$(mpc83xx_board_name) 16 | 17 | case "$board" in 18 | rb333) 19 | ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2" 20 | ;; 21 | 22 | *) 23 | ucidef_set_interfaces_lan_wan "eth0" "eth1" 24 | ;; 25 | esac 26 | 27 | uci commit network 28 | 29 | exit 0 30 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6345-brcm-bcm96345gw2.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6345.dtsi" 2 | 3 | #include 4 | 5 | / { 6 | model = "Broadcom BCM96345GW2 reference board"; 7 | compatible = "brcm,bcm96345gw2", "brcm,bcm6345"; 8 | 9 | chosen { 10 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 11 | stdout-path = "serial0:115200n8"; 12 | }; 13 | }; 14 | 15 | &pflash { 16 | status = "okay"; 17 | 18 | partitions { 19 | compatible = "brcm,bcm963xx-cfe-nor-partitions"; 20 | }; 21 | }; 22 | 23 | &uart0 { 24 | status = "okay"; 25 | }; 26 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/424-bcm63xx_enet_no_request_mem_region.patch: -------------------------------------------------------------------------------- 1 | --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c 2 | +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c 3 | @@ -2706,9 +2706,9 @@ static int bcm_enetsw_probe(struct platf 4 | if (ret) 5 | goto out; 6 | 7 | - priv->base = devm_ioremap_resource(&pdev->dev, res_mem); 8 | - if (IS_ERR(priv->base)) { 9 | - ret = PTR_ERR(priv->base); 10 | + priv->base = devm_ioremap(&pdev->dev, res_mem->start, resource_size(res_mem)); 11 | + if (priv->base == NULL) { 12 | + ret = -ENOMEM; 13 | goto out; 14 | } 15 | 16 | -------------------------------------------------------------------------------- /mpc52xx/image/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2009-2010 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | include $(TOPDIR)/rules.mk 8 | include $(INCLUDE_DIR)/image.mk 9 | 10 | define Image/BuildKernel 11 | cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage 12 | endef 13 | 14 | define Image/Build/ext2 15 | cp $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-ext2.img 16 | endef 17 | 18 | define Image/Build 19 | $(call Image/Build/$(1),$(1)) 20 | endef 21 | 22 | $(eval $(call BuildImage)) 23 | -------------------------------------------------------------------------------- /mpc83xx/patches-3.18/300-mpc8377_wlan-dts-add-openwrt-hacks.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/powerpc/boot/dts/mpc8377_wlan.dts 2 | +++ b/arch/powerpc/boot/dts/mpc8377_wlan.dts 3 | @@ -81,6 +81,11 @@ 4 | reg = <0x3a0000 0x3c60000>; 5 | label = "rootfs"; 6 | }; 7 | + 8 | + partition1@a0000 { 9 | + reg = <0xa0000 0x3f60000>; 10 | + label = "firmware"; 11 | + }; 12 | }; 13 | }; 14 | 15 | @@ -474,4 +479,8 @@ 16 | default-state = "off"; 17 | }; 18 | }; 19 | + 20 | + chosen { 21 | + bootargs = "console=ttyS0,115200 rootfstype=squashfs noinitrd"; 22 | + }; 23 | }; 24 | -------------------------------------------------------------------------------- /pxa/patches-3.10/a01-arm-debugll-printk.patch: -------------------------------------------------------------------------------- 1 | --- a/kernel/printk.c 2 | +++ b/kernel/printk.c 3 | @@ -48,6 +48,10 @@ 4 | 5 | #include 6 | 7 | +#ifdef CONFIG_DEBUG_LL 8 | +extern void printascii(char *); 9 | +#endif /* CONFIG_DEBUG_LL */ 10 | + 11 | #define CREATE_TRACE_POINTS 12 | #include 13 | 14 | @@ -1578,6 +1582,10 @@ asmlinkage int vprintk_emit(int facility 15 | } 16 | } 17 | 18 | +#ifdef CONFIG_DEBUG_LL 19 | + printascii(printk_buf); 20 | +#endif 21 | + 22 | if (level == -1) 23 | level = default_message_loglevel; 24 | 25 | -------------------------------------------------------------------------------- /cns21xx/base-files/etc/diag.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (C) 2010-2013 OpenWrt.org 3 | 4 | . /lib/functions/leds.sh 5 | . /lib/cns21xx.sh 6 | 7 | get_status_led() { 8 | case $(get_board_name) in 9 | ns-k330) 10 | status_led="ns-k330:red:link" 11 | ;; 12 | esac; 13 | } 14 | 15 | set_state() { 16 | get_status_led 17 | 18 | case "$1" in 19 | preinit) 20 | status_led_blink_preinit 21 | ;; 22 | failsafe) 23 | status_led_blink_failsafe 24 | ;; 25 | preinit_regular) 26 | status_led_blink_preinit_regular 27 | ;; 28 | done) 29 | status_led_on 30 | ;; 31 | esac 32 | } 33 | -------------------------------------------------------------------------------- /mpc52xx/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2009-2010 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | include $(TOPDIR)/rules.mk 8 | 9 | ARCH:=powerpc 10 | BOARD:=mpc52xx 11 | BOARDNAME:=Freescale MPC52xx 12 | CPU_TYPE:=603e 13 | FEATURES:=targz ext4 14 | 15 | KERNEL_PATCHVER:=3.18 16 | 17 | include $(INCLUDE_DIR)/target.mk 18 | 19 | define Target/Description 20 | Build images for the Freescale MPC52xx based boards. 21 | endef 22 | 23 | KERNELNAME:=zImage 24 | 25 | $(eval $(call BuildTarget)) 26 | -------------------------------------------------------------------------------- /ath25/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2006-2013 OpenWrt.org 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | ARCH:=mips 8 | BOARD:=ath25 9 | BOARDNAME:=Atheros AR231x/AR5312 10 | FEATURES:=squashfs low_mem small_flash source-only 11 | SUBTARGETS:=generic 12 | 13 | KERNEL_PATCHVER:=5.15 14 | 15 | define Target/Description 16 | Build firmware images for Atheros SoC boards 17 | endef 18 | 19 | include $(INCLUDE_DIR)/target.mk 20 | 21 | DEFAULT_PACKAGES += wpad-basic-mbedtls kmod-ath5k swconfig kmod-gpio-button-hotplug 22 | 23 | $(eval $(call BuildTarget)) 24 | -------------------------------------------------------------------------------- /bcm63xx/image/lzma-loader/src/printf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001 MontaVista Software Inc. 3 | * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation; either version 2 of the License, or (at your 8 | * option) any later version. 9 | * 10 | */ 11 | 12 | #ifndef _printf_h_ 13 | #define _printf_h_ 14 | 15 | #include 16 | void printf(char *fmt, ...); 17 | 18 | #endif /* _printf_h_ */ 19 | -------------------------------------------------------------------------------- /ep93xx/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2009-2010 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | include $(TOPDIR)/rules.mk 8 | 9 | ARCH:=arm 10 | BOARD:=ep93xx 11 | BOARDNAME:=Cirrus Logic EP93xx 12 | FEATURES:=squashfs ext4 targz usb display sound 13 | CPU_TYPE:=arm920t 14 | MAINTAINER:=Florian Fainelli 15 | 16 | KERNEL_PATCHVER:=3.18 17 | 18 | DEVICE_TYPE:=developerboard 19 | 20 | include $(INCLUDE_DIR)/target.mk 21 | 22 | KERNELNAME:=uImage 23 | 24 | $(eval $(call BuildTarget)) 25 | -------------------------------------------------------------------------------- /bcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Based on gabors ralink wisoc implementation. 3 | 4 | [ -e /lib/firmware/$FIRMWARE ] && exit 0 5 | 6 | . /lib/functions/caldata.sh 7 | 8 | board=$(board_name) 9 | 10 | case "$FIRMWARE" in 11 | "rt2x00.eeprom" ) 12 | case $board in 13 | huawei,echolife-hg556a-c) 14 | caldata_extract "cal_data" 0x1fe00 0x200 15 | ;; 16 | huawei,echolife-hg622|\ 17 | huawei,echolife-hg655b) 18 | caldata_extract "cal_data" 0x0 0x200 19 | ;; 20 | *) 21 | caldata_die "board $board is not supported yet" 22 | ;; 23 | esac 24 | ;; 25 | esac 26 | -------------------------------------------------------------------------------- /pxa/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2006-2011 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | include $(TOPDIR)/rules.mk 8 | 9 | ARCH:=arm 10 | BOARD:=pxa 11 | BOARDNAME:=Marvell/Intel PXA2xx 12 | FEATURES:=squashfs broken 13 | MAINTAINER:=Imre Kaloz 14 | 15 | KERNEL_PATCHVER:=3.3 16 | 17 | include $(INCLUDE_DIR)/target.mk 18 | 19 | define Target/Description 20 | Build images for PXA2xx systems, eg. Gumstix. 21 | endef 22 | 23 | KERNELNAME:=uImage 24 | 25 | $(eval $(call BuildTarget)) 26 | -------------------------------------------------------------------------------- /octeontx/image/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2018 OpenWrt.org 4 | 5 | include $(TOPDIR)/rules.mk 6 | include $(INCLUDE_DIR)/image.mk 7 | 8 | define Image/Build/Initramfs 9 | $(CP) $(KERNEL_BUILD_DIR)/vmlinux $(BIN_DIR)/$(IMG_PREFIX)-vmlinux 10 | $(CP) $(KERNEL_BUILD_DIR)/vmlinux-initramfs $(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs 11 | endef 12 | 13 | define Image/Build 14 | $(call Image/Build/$(1)) 15 | cp $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1).img 16 | cp $(KDIR)/vmlinux $(BIN_DIR)/$(IMG_PREFIX)-vmlinux 17 | endef 18 | 19 | $(eval $(call BuildImage)) 20 | -------------------------------------------------------------------------------- /oxnas/image/ox810se.mk: -------------------------------------------------------------------------------- 1 | KERNEL_LOADADDR := 0x48008000 2 | 3 | define Device/Default 4 | KERNEL_NAME := zImage 5 | KERNEL_SUFFIX := -uImage 6 | KERNEL_INSTALL := 1 7 | FILESYSTEMS := squashfs ext4 8 | PROFILES := Default 9 | DEVICE_DTS := ox810se-$(subst _,-,$(1)) 10 | IMAGES := sysupgrade.tar 11 | IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata 12 | endef 13 | 14 | define Device/wd_mbwe 15 | DEVICE_VENDOR := Western Digital 16 | DEVICE_MODEL := My Book 17 | DEVICE_VARIANT := World Edition 18 | KERNEL := kernel-bin | append-dtb | uImage none 19 | endef 20 | TARGET_DEVICES += wd_mbwe 21 | -------------------------------------------------------------------------------- /bcm63xx/image/lzma-loader/src/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * LZMA compressed kernel loader for Atheros AR7XXX/AR9XXX based boards 3 | * 4 | * Copyright (C) 2011 Gabor Juhos 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License version 2 as published 8 | * by the Free Software Foundation. 9 | * 10 | */ 11 | 12 | #ifndef _CONFIG_H_ 13 | #define _CONFIG_H_ 14 | 15 | #define CONFIG_ICACHE_SIZE (32 * 1024) 16 | #define CONFIG_DCACHE_SIZE (32 * 1024) 17 | #define CONFIG_CACHELINE_SIZE 16 18 | 19 | #endif /* _CONFIG_H_ */ 20 | -------------------------------------------------------------------------------- /pxa/patches-3.3/a01-arm-debugll-printk.patch: -------------------------------------------------------------------------------- 1 | --- a/kernel/printk.c 2 | +++ b/kernel/printk.c 3 | @@ -44,6 +44,10 @@ 4 | 5 | #include 6 | 7 | +#ifdef CONFIG_DEBUG_LL 8 | +extern void printascii(char *); 9 | +#endif /* CONFIG_DEBUG_LL */ 10 | + 11 | /* 12 | * Architectures can override it: 13 | */ 14 | @@ -900,6 +904,10 @@ asmlinkage int vprintk(const char *fmt, 15 | } 16 | } 17 | 18 | +#ifdef CONFIG_DEBUG_LL 19 | + printascii(printk_buf); 20 | +#endif 21 | + 22 | /* 23 | * Copy the output into log_buf. If the caller didn't provide 24 | * the appropriate log prefix, we insert them here 25 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/433-MIPS-BCM63XX-enable-nand-support.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/mips/bcm63xx/dev-flash.c 2 | +++ b/arch/mips/bcm63xx/dev-flash.c 3 | @@ -271,8 +271,12 @@ int __init bcm63xx_flash_register(void) 4 | return -ENODEV; 5 | } 6 | case BCM63XX_FLASH_TYPE_NAND: 7 | - pr_warn("unsupported NAND flash detected\n"); 8 | - return -ENODEV; 9 | + if (board_of_device_present("nflash")) { 10 | + return 0; 11 | + } else { 12 | + pr_warn("unsupported NAND flash detected\n"); 13 | + return -ENODEV; 14 | + } 15 | default: 16 | pr_err("flash detection failed for BCM%x: %d\n", 17 | bcm63xx_get_cpu_id(), flash_type); 18 | -------------------------------------------------------------------------------- /sibyte/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2006-2011 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | include $(TOPDIR)/rules.mk 8 | 9 | ARCH:=mips 10 | BOARD:=sibyte 11 | BOARDNAME:=Broadcom/SiByte SB-1 12 | FEATURES:=fpu ramdisk broken 13 | CPU_TYPE:=sb1 14 | CPU_CFLAGS_sb1:=-march=sb1 15 | MAINTAINER:=Imre Kaloz 16 | 17 | KERNEL_PATCHVER:=3.3 18 | 19 | include $(INCLUDE_DIR)/target.mk 20 | 21 | define Target/Description 22 | Build firmware images for Broadcom/SiByte SB-1 boards 23 | endef 24 | 25 | $(eval $(call BuildTarget)) 26 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/326-irqchip-bcm6345-report-eff-affinity.patch: -------------------------------------------------------------------------------- 1 | --- a/drivers/irqchip/irq-bcm6345-periph.c 2 | +++ b/drivers/irqchip/irq-bcm6345-periph.c 3 | @@ -186,6 +186,8 @@ static int bcm6345_periph_set_affinity(s 4 | } 5 | raw_spin_unlock_irqrestore(&priv->lock, flags); 6 | 7 | + irq_data_update_effective_affinity(data, cpumask_of(cpu)); 8 | + 9 | return 0; 10 | } 11 | #endif 12 | @@ -197,6 +199,8 @@ static int bcm6345_periph_map(struct irq 13 | 14 | irq_set_chip_and_handler(irq, &priv->chip, handle_level_irq); 15 | 16 | + irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(irq))); 17 | + 18 | return 0; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/432-MIPS-BCM63XX-detect-nand-nvram.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/mips/bcm63xx/dev-flash.c 2 | +++ b/arch/mips/bcm63xx/dev-flash.c 3 | @@ -229,6 +229,14 @@ void __init bcm63xx_flash_detect(void) 4 | } 5 | 6 | bcm_rset_writel(RSET_HSSPI, val, HSSPI_FLASH_CTRL_REG); 7 | + } else if (flash_type == BCM63XX_FLASH_TYPE_NAND && 8 | + (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_6368() || 9 | + BCMCPU_IS_63268())) { 10 | + bcm_nand_writel(NAND_CS_SEL_AUTO_DEV_ID 11 | + | NAND_CS_SEL_EBI_CS0_USES_NAND 12 | + | NAND_CS_SEL_EBC_CS0_SEL, 13 | + NAND_CS_SEL_REG); 14 | + bcm_nand_writel(1, NAND_CS_XOR_REG); 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /ep93xx/profiles/01-simone.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2012 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | 8 | define Profile/Simone 9 | NAME:=Simplemachines Sim.One 10 | PACKAGES:= \ 11 | kmod-input-core \ 12 | kmod-input-evdev \ 13 | kmod-input-keyboard-ep93xx \ 14 | kmod-sound-core \ 15 | kmod-sound-soc-ep93xx \ 16 | kmod-sound-soc-ep93xx-ac97 \ 17 | kmod-sound-soc-ep93xx-simone 18 | endef 19 | 20 | define Profile/Simone/Description 21 | Package set compatible with the Simplemachines Sim.One board. 22 | endef 23 | $(eval $(call Profile,Simone)) 24 | -------------------------------------------------------------------------------- /cobalt/image/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2009-2010 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | include $(TOPDIR)/rules.mk 8 | include $(INCLUDE_DIR)/image.mk 9 | 10 | define Image/BuildKernel 11 | cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf 12 | endef 13 | 14 | define Image/Build/squashfs 15 | $(call prepare_generic_squashfs,$(KDIR)/root.squashfs) 16 | endef 17 | 18 | define Image/Build 19 | $(call Image/Build/$(1)) 20 | dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync 21 | endef 22 | 23 | $(eval $(call BuildImage)) 24 | -------------------------------------------------------------------------------- /cobalt/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2009-2011 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | include $(TOPDIR)/rules.mk 8 | 9 | ARCH:=mipsel 10 | BOARD:=cobalt 11 | BOARDNAME:=Cobalt Microservers 12 | FEATURES:=targz pci ext4 display 13 | CPU_TYPE := 5k 14 | CPU_CFLAGS_5k := -march=r5000 15 | MAINTAINER:=Florian Fainelli 16 | 17 | KERNEL_PATCHVER:=3.18 18 | 19 | include $(INCLUDE_DIR)/target.mk 20 | 21 | define Target/Description 22 | Build firmware images for Cobalt servers systems (Qube/Qube2/RaQ/RaQ2). 23 | endef 24 | 25 | $(eval $(call BuildTarget)) 26 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6358-pirelli-a226g.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6358-pirelli-a226.dtsi" 2 | 3 | / { 4 | model = "Pirelli A226G"; 5 | compatible = "pirelli,a226g", "brcm,bcm6358"; 6 | }; 7 | 8 | &pflash { 9 | status = "okay"; 10 | 11 | partitions { 12 | compatible = "fixed-partitions"; 13 | #address-cells = <1>; 14 | #size-cells = <1>; 15 | 16 | cfe@0 { 17 | label = "CFE"; 18 | reg = <0x000000 0x010000>; 19 | read-only; 20 | }; 21 | 22 | linux@10000 { 23 | label = "linux"; 24 | reg = <0x010000 0x7e0000>; 25 | compatible = "brcm,bcm963xx-imagetag"; 26 | }; 27 | 28 | nvram@7f0000 { 29 | label = "nvram"; 30 | reg = <0x7f0000 0x010000>; 31 | }; 32 | }; 33 | }; 34 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6358-pirelli-a226m.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6358-pirelli-a226.dtsi" 2 | 3 | / { 4 | model = "Pirelli A226M"; 5 | compatible = "pirelli,a226m", "brcm,bcm6358"; 6 | }; 7 | 8 | &pflash { 9 | status = "okay"; 10 | 11 | partitions { 12 | compatible = "fixed-partitions"; 13 | #address-cells = <1>; 14 | #size-cells = <1>; 15 | 16 | cfe@0 { 17 | label = "CFE"; 18 | reg = <0x000000 0x010000>; 19 | read-only; 20 | }; 21 | 22 | linux@10000 { 23 | label = "linux"; 24 | reg = <0x010000 0x7e0000>; 25 | compatible = "brcm,bcm963xx-imagetag"; 26 | }; 27 | 28 | nvram@7f0000 { 29 | label = "nvram"; 30 | reg = <0x7f0000 0x010000>; 31 | }; 32 | }; 33 | }; 34 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6358-pirelli-a226m-fwb.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6358-pirelli-a226.dtsi" 2 | 3 | / { 4 | model = "Pirelli A226M-FWB"; 5 | compatible = "pirelli,a226m-fwb", "brcm,bcm6358"; 6 | }; 7 | 8 | &pflash { 9 | status = "okay"; 10 | 11 | partitions { 12 | compatible = "fixed-partitions"; 13 | #address-cells = <1>; 14 | #size-cells = <1>; 15 | 16 | partition@0 { 17 | label = "CFE"; 18 | reg = <0x000000 0x020000>; 19 | read-only; 20 | }; 21 | 22 | partition@20000 { 23 | label = "linux"; 24 | reg = <0x020000 0xfc0000>; 25 | compatible = "brcm,bcm963xx-imagetag"; 26 | }; 27 | 28 | partition@fe0000 { 29 | label = "nvram"; 30 | reg = <0xfe0000 0x020000>; 31 | }; 32 | }; 33 | }; 34 | -------------------------------------------------------------------------------- /mpc83xx/modules.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2012 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | 8 | define KernelPackage/ata-rbppc-cf 9 | SUBMENU:=$(BLOCK_MENU) 10 | TITLE:=RB600 Compact Flash support 11 | DEPENDS:=@TARGET_mpc83xx 12 | KCONFIG:= \ 13 | CONFIG_PATA_PLATFORM \ 14 | CONFIG_PATA_RB_PPC 15 | FILES:=\ 16 | $(LINUX_DIR)/drivers/ata/pata_rbppc_cf.ko 17 | AUTOLOAD:=$(call AutoLoad,41,pata_rbppc_cf,1) 18 | $(call AddDepends/ata) 19 | endef 20 | 21 | define KernelPackage/ata-rbppc-cf/description 22 | RB600 Compact Flash support. 23 | endef 24 | 25 | $(eval $(call KernelPackage,ata-rbppc-cf)) 26 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6358-sfr-neufbox-4-foxconn-r1.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6358-sfr-neufbox-4.dtsi" 2 | 3 | / { 4 | model = "SFR Neufbox 4 (Foxconn)"; 5 | compatible = "sfr,neufbox-4-foxconn-r1", "brcm,bcm6358"; 6 | 7 | leds { 8 | compatible = "gpio-leds"; 9 | 10 | traffic_white { 11 | label = "white:traffic"; 12 | gpios = <&pinctrl 2 0>; 13 | }; 14 | service_blue { 15 | label = "blue:service"; 16 | gpios = <&pinctrl 4 0>; 17 | }; 18 | wifi_white { 19 | label = "white:wifi"; 20 | gpios = <&pinctrl 15 0>; 21 | }; 22 | service_red { 23 | label = "red:service"; 24 | gpios = <&pinctrl 29 0>; 25 | }; 26 | service_green { 27 | label = "green:service"; 28 | gpios = <&pinctrl 30 0>; 29 | }; 30 | }; 31 | }; 32 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6358-sfr-neufbox-4-sercomm-r0.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6358-sfr-neufbox-4.dtsi" 2 | 3 | / { 4 | model = "SFR Neufbox 4 (Sercomm)"; 5 | compatible = "sfr,neufbox-4-sercomm-r0", "brcm,bcm6358"; 6 | 7 | leds { 8 | compatible = "gpio-leds"; 9 | 10 | traffic_white { 11 | label = "white:traffic"; 12 | gpios = <&pinctrl 2 1>; 13 | }; 14 | service_blue { 15 | label = "blue:service"; 16 | gpios = <&pinctrl 4 1>; 17 | }; 18 | wifi_white { 19 | label = "white:wifi"; 20 | gpios = <&pinctrl 15 1>; 21 | }; 22 | service_red { 23 | label = "red:service"; 24 | gpios = <&pinctrl 29 1>; 25 | }; 26 | service_green { 27 | label = "green:service"; 28 | gpios = <&pinctrl 30 1>; 29 | }; 30 | }; 31 | }; 32 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/372_dont_register_pflash_when_available_in_dtb.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/mips/bcm63xx/dev-flash.c 2 | +++ b/arch/mips/bcm63xx/dev-flash.c 3 | @@ -23,6 +23,8 @@ 4 | #include 5 | #include 6 | 7 | +#include "boards/board_common.h" 8 | + 9 | static int flash_type; 10 | 11 | static struct mtd_partition mtd_partitions[] = { 12 | @@ -179,6 +181,9 @@ int __init bcm63xx_flash_register(void) 13 | 14 | switch (flash_type) { 15 | case BCM63XX_FLASH_TYPE_PARALLEL: 16 | + /* don't register when already registered through from dtb */ 17 | + if (board_of_device_present("pflash")) 18 | + return 0; 19 | 20 | if (!mtd_resources[0].start) { 21 | /* read base address of boot chip select (0) */ 22 | -------------------------------------------------------------------------------- /cns21xx/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2010-2011 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | include $(TOPDIR)/rules.mk 8 | 9 | ARCH:=arm 10 | BOARD:=cns21xx 11 | BOARDNAME:=Cavium Networks Econa CNS21xx 12 | FEATURES:=squashfs broken 13 | CPU_TYPE:=fa526 14 | 15 | KERNEL_PATCHVER:=3.10 16 | 17 | include $(INCLUDE_DIR)/target.mk 18 | 19 | DEFAULT_PACKAGES += \ 20 | kmod-leds-gpio kmod-input-core kmod-input-gpio-keys \ 21 | kmod-button-hotplug 22 | 23 | define Target/Description 24 | Build firmware images for Cavium Networks CNS21XX based boards. 25 | endef 26 | 27 | KERNELNAME:=zImage uImage 28 | 29 | $(eval $(call BuildTarget)) 30 | -------------------------------------------------------------------------------- /cns21xx/modules.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2103 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | 8 | define KernelPackage/usb2-cns21xx 9 | TITLE:=Support for the built-in EHCI controller of the CNS21xx SoCs 10 | DEPENDS:=@TARGET_cns21xx +kmod-usb2 11 | KCONFIG:=CONFIG_USB_EHCI_CNS21XX 12 | FILES:=$(LINUX_DIR)/drivers/usb/host/ehci-cns21xx.ko 13 | AUTOLOAD:=$(call AutoLoad,41,ehci-cns21xx,1) 14 | $(call AddDepends/usb) 15 | endef 16 | 17 | define KernelPackage/usb2-cns21xx/description 18 | Kernel support for the built-in EHCI controller of the CNS21xx SoCs. 19 | endef 20 | 21 | $(eval $(call KernelPackage,usb2-cns21xx)) 22 | 23 | 24 | -------------------------------------------------------------------------------- /sibyte/patches-3.3/105-sibyte_hwmon.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/mips/sibyte/swarm/swarm-i2c.c 2 | +++ b/arch/mips/sibyte/swarm/swarm-i2c.c 3 | @@ -13,6 +13,11 @@ 4 | #include 5 | #include 6 | 7 | +static struct i2c_board_info swarm_i2c_info0[] __initdata = { 8 | + { 9 | + I2C_BOARD_INFO("lm90", 0x2a), 10 | + }, 11 | +}; 12 | 13 | static struct i2c_board_info swarm_i2c_info1[] __initdata = { 14 | { 15 | @@ -24,6 +29,8 @@ static int __init swarm_i2c_init(void) 16 | { 17 | int err; 18 | 19 | + err = i2c_register_board_info(0, swarm_i2c_info0, 20 | + ARRAY_SIZE(swarm_i2c_info0)); 21 | err = i2c_register_board_info(1, swarm_i2c_info1, 22 | ARRAY_SIZE(swarm_i2c_info1)); 23 | if (err < 0) 24 | -------------------------------------------------------------------------------- /bcm63xx/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2006-2019 OpenWrt.org 4 | # Copyright (C) 2016 LEDE project 5 | 6 | include $(TOPDIR)/rules.mk 7 | 8 | ARCH:=mips 9 | BOARD:=bcm63xx 10 | BOARDNAME:=Broadcom BCM63xx 11 | SUBTARGETS:=generic smp 12 | FEATURES:=squashfs usb atm pci pcmcia usbgadget source-only 13 | 14 | KERNEL_PATCHVER:=5.15 15 | 16 | define Target/Description 17 | Build firmware images for Broadcom based xDSL/routers 18 | currently supports BCM6338, BCM6348 and BCM6358 based devices. 19 | (e.g. Inventel Livebox, Siemens SE515, Neufbox 4) 20 | endef 21 | 22 | include $(INCLUDE_DIR)/target.mk 23 | 24 | DEFAULT_PACKAGES += swconfig kmod-gpio-button-hotplug 25 | 26 | $(eval $(call BuildTarget)) 27 | -------------------------------------------------------------------------------- /mpc83xx/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2007-2014 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | include $(TOPDIR)/rules.mk 8 | 9 | ARCH:=powerpc 10 | BOARD:=mpc83xx 11 | BOARDNAME:=Freescale MPC83xx 12 | CPU_TYPE:=603e 13 | FEATURES:=squashfs targz 14 | MAINTAINER:=Imre Kaloz 15 | 16 | KERNEL_PATCHVER:=3.18 17 | 18 | include $(INCLUDE_DIR)/target.mk 19 | 20 | DEFAULT_PACKAGES += kmod-via-velocity 21 | 22 | define Target/Description 23 | Build firmware images for Freescale MPC83xx based boards (eg. RouterBoard 600). 24 | endef 25 | 26 | KERNELNAME:=uImage dtbImage.rb600 dtbImage.rb333 27 | 28 | $(eval $(call BuildTarget)) 29 | -------------------------------------------------------------------------------- /ath25/base-files/etc/board.d/02_network: -------------------------------------------------------------------------------- 1 | 2 | . /lib/functions/uci-defaults.sh 3 | 4 | board_config_update 5 | 6 | if [ -e "/sys/bus/mdio_bus/drivers/IC+ IP175C/0:00" -o \ 7 | -e "/sys/bus/mdio_bus/drivers/IC+ IP17xx/0:00" ] && \ 8 | [ -x /sbin/swconfig ]; 9 | then 10 | ucidef_add_switch "eth0" \ 11 | "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5@eth0" 12 | 13 | elif [ -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/0:00" -o \ 14 | -e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/0:10" ]; 15 | then 16 | ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" 17 | 18 | elif [ -d /sys/class/net/eth1 ]; then 19 | ucidef_set_interfaces_lan_wan "eth0" "eth1" 20 | 21 | else 22 | ucidef_set_interface_lan "eth0" 23 | fi 24 | 25 | board_config_flush 26 | 27 | exit 0 28 | -------------------------------------------------------------------------------- /octeontx/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2018 OpenWrt.org 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | ARCH:=aarch64 8 | BOARD:=octeontx 9 | BOARDNAME:=Octeon-TX 10 | FEATURES:=squashfs ramdisk targz pcie gpio rtc usb fpu 11 | SUBTARGETS:=generic 12 | 13 | KERNEL_PATCHVER:=5.15 14 | 15 | define Target/Description 16 | Build images for Octeon-TX CN80XX/CN81XX based boards 17 | endef 18 | 19 | include $(INCLUDE_DIR)/target.mk 20 | 21 | KERNELNAME:=Image 22 | 23 | DEFAULT_PACKAGES += uboot-envtools mkf2fs e2fsprogs blkid \ 24 | kmod-hwmon-gsc kmod-leds-gpio kmod-pps-gpio \ 25 | kmod-gpio-button-hotplug kmod-input-evdev kmod-rtc-ds1672 \ 26 | kmod-can kmod-can-mcp251x 27 | 28 | $(eval $(call BuildTarget)) 29 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6358-huawei-echolife-hg556a-c.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6358-huawei-echolife-hg556a.dtsi" 2 | 3 | / { 4 | model = "Huawei EchoLife HG556a (version C)"; 5 | compatible = "huawei,echolife-hg556a-c", "brcm,bcm6358"; 6 | }; 7 | 8 | &gpiokeys { 9 | help { 10 | label = "help"; 11 | gpios = <&pinctrl 36 1>; 12 | linux,code = ; 13 | debounce-interval = <60>; 14 | }; 15 | }; 16 | 17 | &gpioleds { 18 | lan1_green { 19 | label = "green:lan1"; 20 | gpios = <&pinctrl 0 1>; 21 | }; 22 | 23 | lan2_green { 24 | label = "green:lan2"; 25 | gpios = <&pinctrl 1 1>; 26 | }; 27 | 28 | message_red { 29 | label = "red:message"; 30 | gpios = <&pinctrl 12 1>; 31 | }; 32 | 33 | hspa_red { 34 | label = "red:hspa"; 35 | gpios = <&pinctrl 15 1>; 36 | }; 37 | }; 38 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/325-irqchip-bcm6345-external-fix-base-uninitialized.patch: -------------------------------------------------------------------------------- 1 | --- a/drivers/irqchip/irq-bcm6345-ext.c 2 | +++ b/drivers/irqchip/irq-bcm6345-ext.c 3 | @@ -271,21 +271,19 @@ static int __init bcm6345_ext_intc_of_in 4 | 5 | for (i = 0; i < num_irqs; i++) { 6 | irqs[i] = irq_of_parse_and_map(node, i); 7 | - if (!irqs[i]) { 8 | - ret = -ENOMEM; 9 | - goto out_unmap; 10 | - } 11 | + if (!irqs[i]) 12 | + return -ENOMEM; 13 | } 14 | 15 | base = of_iomap(node, 0); 16 | if (!base) 17 | - goto out_unmap; 18 | + return -ENXIO; 19 | 20 | ret = __bcm6345_ext_intc_init(node, num_irqs, irqs, base, shift, 21 | toggle_clear_on_ack); 22 | if (!ret) 23 | return 0; 24 | -out_unmap: 25 | + 26 | iounmap(base); 27 | 28 | for (i = 0; i < num_irqs; i++) 29 | -------------------------------------------------------------------------------- /archs38/image/gen_axs10x_sdcard_img.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # SPDX-License-Identifier: GPL-2.0-only 3 | # 4 | # Copyright (C) 2016 OpenWrt.org 5 | 6 | set -x 7 | [ $# -eq 5 ] || { 8 | echo "SYNTAX: $0 " 9 | exit 1 10 | } 11 | 12 | OUTPUT="$1" 13 | BOOTFS="$2" 14 | ROOTFS="$3" 15 | BOOTFSSIZE="$4" 16 | ROOTFSSIZE="$5" 17 | 18 | head=4 19 | sect=63 20 | 21 | set $(ptgen -o $OUTPUT -h $head -s $sect -l 1024 -t c -p ${BOOTFSSIZE}M -t 83 -p ${ROOTFSSIZE}M) 22 | 23 | BOOTOFFSET="$(($1 / 512))" 24 | BOOTSIZE="$(($2 / 512))" 25 | ROOTFSOFFSET="$(($3 / 512))" 26 | ROOTFSSIZE="$(($4 / 512))" 27 | 28 | dd bs=512 if="$BOOTFS" of="$OUTPUT" seek="$BOOTOFFSET" conv=notrunc 29 | dd bs=512 if="$ROOTFS" of="$OUTPUT" seek="$ROOTFSOFFSET" conv=notrunc 30 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/100-macronix_nand_block_protection_support.patch: -------------------------------------------------------------------------------- 1 | bcm63xx: fix booting with Kernel 5.10 2 | 3 | This is a workaround to make the target overall bootable. With this more 4 | people should be able to test the Kernel 5.10 and report further issues. 5 | 6 | Suggested-by: Daniel González Cabanelas 7 | Signed-off-by: Paul Spooren 8 | --- a/drivers/mtd/nand/raw/nand_macronix.c 9 | +++ b/drivers/mtd/nand/raw/nand_macronix.c 10 | @@ -323,7 +323,7 @@ static int macronix_nand_init(struct nan 11 | 12 | macronix_nand_fix_broken_get_timings(chip); 13 | macronix_nand_onfi_init(chip); 14 | - macronix_nand_block_protection_support(chip); 15 | + //macronix_nand_block_protection_support(chip); 16 | macronix_nand_deep_power_down_support(chip); 17 | 18 | return 0; 19 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/501-board_bcm6328-extend-96328avng-reference-board.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c 2 | +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c 3 | @@ -59,6 +59,32 @@ static struct board_info __initdata boar 4 | .use_fullspeed = 0, 5 | .port_no = 0, 6 | }, 7 | + 8 | + .has_enetsw = 1, 9 | + .enetsw = { 10 | + .used_ports = { 11 | + [0] = { 12 | + .used = 1, 13 | + .phy_id = 1, 14 | + .name = "Port 1", 15 | + }, 16 | + [1] = { 17 | + .used = 1, 18 | + .phy_id = 2, 19 | + .name = "Port 2", 20 | + }, 21 | + [2] = { 22 | + .used = 1, 23 | + .phy_id = 3, 24 | + .name = "Port 3", 25 | + }, 26 | + [3] = { 27 | + .used = 1, 28 | + .phy_id = 4, 29 | + .name = "Port 4", 30 | + }, 31 | + }, 32 | + }, 33 | }; 34 | #endif /* CONFIG_BCM63XX_CPU_6328 */ 35 | 36 | -------------------------------------------------------------------------------- /cns21xx/patches-3.10/002-arm-debugll-printk.patch: -------------------------------------------------------------------------------- 1 | --- a/kernel/printk.c 2 | +++ b/kernel/printk.c 3 | @@ -65,6 +65,10 @@ int console_printk[4] = { 4 | DEFAULT_CONSOLE_LOGLEVEL, /* default_console_loglevel */ 5 | }; 6 | 7 | +#ifdef CONFIG_DEBUG_LL 8 | +extern void printascii(char *); 9 | +#endif /* CONFIG_DEBUG_LL */ 10 | + 11 | /* 12 | * Low level drivers may need that to know if they can schedule in 13 | * their unblank() callback or not. So let's export it. 14 | @@ -521,6 +525,10 @@ static ssize_t devkmsg_read(struct file 15 | ts_usec = msg->ts_nsec; 16 | do_div(ts_usec, 1000); 17 | 18 | +#ifdef CONFIG_DEBUG_LL 19 | + printascii(printk_buf); 20 | +#endif 21 | + 22 | /* 23 | * If we couldn't merge continuation line fragments during the print, 24 | * export the stored flags to allow an optional external merge of the 25 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/335-MIPS-BCM63XX-fix-PCIe-memory-window-size.patch: -------------------------------------------------------------------------------- 1 | From f67f8134b4537c8bbafe7e1975edfe808b813997 Mon Sep 17 00:00:00 2001 2 | From: Jonas Gorski 3 | Date: Sun, 8 Dec 2013 03:05:54 +0100 4 | Subject: [PATCH 45/53] MIPS: BCM63XX: fix PCIe memory window size 5 | 6 | --- 7 | arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h 11 | +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h 12 | @@ -42,7 +42,7 @@ 13 | BCM_CB_MEM_SIZE - 1) 14 | 15 | #define BCM_PCIE_MEM_BASE_PA 0x10f00000 16 | -#define BCM_PCIE_MEM_SIZE (16 * 1024 * 1024) 17 | +#define BCM_PCIE_MEM_SIZE (1 * 1024 * 1024) 18 | #define BCM_PCIE_MEM_END_PA (BCM_PCIE_MEM_BASE_PA + \ 19 | BCM_PCIE_MEM_SIZE - 1) 20 | 21 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/324-irqchip-bcm6345-periph-fix-block-uninitialized.patch: -------------------------------------------------------------------------------- 1 | --- a/drivers/irqchip/irq-bcm6345-periph.c 2 | +++ b/drivers/irqchip/irq-bcm6345-periph.c 3 | @@ -52,7 +52,7 @@ static void bcm6345_periph_irq_handle(st 4 | { 5 | struct intc_data *data = irq_desc_get_handler_data(desc); 6 | struct irq_chip *chip = irq_desc_get_chip(desc); 7 | - struct intc_block *block; 8 | + struct intc_block *block = NULL; 9 | unsigned int irq = irq_desc_get_irq(desc); 10 | unsigned int idx; 11 | 12 | @@ -62,7 +62,7 @@ static void bcm6345_periph_irq_handle(st 13 | if (irq == data->block[idx].parent_irq) 14 | block = &data->block[idx]; 15 | 16 | - for (idx = 0; idx < data->num_words; idx++) { 17 | + for (idx = 0; block && idx < data->num_words; idx++) { 18 | int base = idx * IRQS_PER_WORD; 19 | unsigned long pending; 20 | int hw_irq; 21 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/800-wl_exports.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/mips/bcm63xx/nvram.c 2 | +++ b/arch/mips/bcm63xx/nvram.c 3 | @@ -24,6 +24,12 @@ 4 | static struct bcm963xx_nvram nvram; 5 | static int mac_addr_used; 6 | 7 | +/* 8 | + * Required export for WL 9 | + */ 10 | +u32 nvram_buf[5] = { 0, cpu_to_le32(20), 0, 0, 0 }; 11 | +EXPORT_SYMBOL(nvram_buf); 12 | + 13 | void __init bcm63xx_nvram_init(void *addr) 14 | { 15 | u32 crc, expected_crc; 16 | --- a/arch/mips/mm/cache.c 17 | +++ b/arch/mips/mm/cache.c 18 | @@ -63,6 +63,9 @@ void (*_dma_cache_wback_inv)(unsigned lo 19 | void (*_dma_cache_wback)(unsigned long start, unsigned long size); 20 | void (*_dma_cache_inv)(unsigned long start, unsigned long size); 21 | 22 | +EXPORT_SYMBOL(_dma_cache_wback_inv); 23 | +EXPORT_SYMBOL(_dma_cache_inv); 24 | + 25 | #endif /* CONFIG_DMA_NONCOHERENT */ 26 | 27 | /* 28 | -------------------------------------------------------------------------------- /sparc/image/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2010 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | include $(TOPDIR)/rules.mk 8 | include $(INCLUDE_DIR)/image.mk 9 | 10 | define Image/Prepare 11 | cp $(LINUX_DIR)/arch/sparc/boot/zImage $(KDIR)/zImage 12 | endef 13 | 14 | define Image/BuildKernel 15 | mkdir -p $(BIN_DIR) 16 | cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage 17 | # cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf 18 | endef 19 | 20 | define Image/Build/squashfs 21 | $(call prepare_generic_squashfs,$(KDIR)/root.squashfs) 22 | endef 23 | 24 | define Image/Build 25 | $(call Image/Build/$(1)) 26 | dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-root.$(1) bs=128k conv=sync 27 | endef 28 | 29 | $(eval $(call BuildImage)) 30 | -------------------------------------------------------------------------------- /ath25/patches-5.15/700-swconfig_mvswitch.patch: -------------------------------------------------------------------------------- 1 | --- a/drivers/net/phy/Kconfig 2 | +++ b/drivers/net/phy/Kconfig 3 | @@ -96,6 +96,10 @@ config IP17XX_PHY 4 | tristate "Driver for IC+ IP17xx switches" 5 | select SWCONFIG 6 | 7 | +config MVSWITCH_PHY 8 | + tristate "Driver for Marvell 88E6060 switches" 9 | + select ETHERNET_PACKET_MANGLE 10 | + 11 | config PSB6970_PHY 12 | tristate "Lantiq XWAY Tantos (PSB6970) Ethernet switch" 13 | select SWCONFIG 14 | --- a/drivers/net/phy/Makefile 15 | +++ b/drivers/net/phy/Makefile 16 | @@ -31,6 +31,7 @@ ar8xxx-y += ar8216.o 17 | ar8xxx-y += ar8327.o 18 | obj-$(CONFIG_SWCONFIG_B53) += b53/ 19 | obj-$(CONFIG_IP17XX_PHY) += ip17xx.o 20 | +obj-$(CONFIG_MVSWITCH_PHY) += mvswitch.o 21 | obj-$(CONFIG_PSB6970_PHY) += psb6970.o 22 | obj-$(CONFIG_RTL8306_PHY) += rtl8306.o 23 | obj-$(CONFIG_RTL8366_SMI) += rtl8366_smi.o 24 | -------------------------------------------------------------------------------- /iop32x/patches-3.3/002-Disintegrate-asm-system.h-for-ARM.patch: -------------------------------------------------------------------------------- 1 | From 9f97da78bf018206fb623cd351d454af2f105fe0 Mon Sep 17 00:00:00 2001 2 | From: David Howells 3 | Date: Wed, 28 Mar 2012 18:30:01 +0100 4 | Subject: [PATCH] Disintegrate asm/system.h for ARM 5 | 6 | Disintegrate asm/system.h for ARM. 7 | 8 | Signed-off-by: David Howells 9 | cc: Russell King 10 | cc: linux-arm-kernel@lists.infradead.org 11 | --- 12 | arch/arm/plat-iop/restart.c | 1 + 13 | 1 files changed, 1 insertions(+), 0 deletions(-) 14 | 15 | --- a/arch/arm/plat-iop/restart.c 16 | +++ b/arch/arm/plat-iop/restart.c 17 | @@ -8,6 +8,7 @@ 18 | * published by the Free Software Foundation. 19 | */ 20 | #include 21 | +#include 22 | #include 23 | 24 | void iop3xx_restart(char mode, const char *cmd) 25 | -------------------------------------------------------------------------------- /oxnas/files/arch/arm/include/debug/uncompress-ox820.h: -------------------------------------------------------------------------------- 1 | /* linux/include/asm-arm/arch-oxnas/uncompress.h 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License version 2 as 5 | * published by the Free Software Foundation. 6 | */ 7 | 8 | #ifndef __ASM_ARCH_UNCOMPRESS_H 9 | #define __ASM_ARCH_UNCOMPRESS_H 10 | 11 | #define OXNAS_UART1_BASE 0x44200000 12 | 13 | static inline void putc(int c) 14 | { 15 | static volatile unsigned char *uart = 16 | (volatile unsigned char *)OXNAS_UART1_BASE; 17 | 18 | while (!(uart[5] & 0x20)) { /* LSR reg THR empty bit */ 19 | barrier(); 20 | } 21 | uart[0] = c; /* THR register */ 22 | } 23 | 24 | static inline void flush(void) 25 | { 26 | } 27 | 28 | #define arch_decomp_setup() 29 | 30 | #define arch_decomp_wdog() 31 | 32 | #endif /* __ASM_ARCH_UNCOMPRESS_H */ 33 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6358-huawei-echolife-hg556a-a.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6358-huawei-echolife-hg556a.dtsi" 2 | 3 | / { 4 | model = "Huawei EchoLife HG556a (version A)"; 5 | compatible = "huawei,echolife-hg556a-a", "brcm,bcm6358"; 6 | }; 7 | 8 | &gpiokeys { 9 | help { 10 | label = "help"; 11 | gpios = <&pinctrl 8 1>; 12 | linux,code = ; 13 | debounce-interval = <60>; 14 | }; 15 | }; 16 | 17 | &gpioleds { 18 | message_red { 19 | label = "red:message"; 20 | gpios = <&pinctrl 0 1>; 21 | }; 22 | 23 | hspa_red { 24 | label = "red:hspa"; 25 | gpios = <&pinctrl 1 1>; 26 | }; 27 | 28 | all_red { 29 | label = "red:all"; 30 | gpios = <&pinctrl 6 1>; 31 | default-state = "on"; 32 | }; 33 | 34 | lan1_green { 35 | label = "green:lan1"; 36 | gpios = <&pinctrl 12 1>; 37 | }; 38 | 39 | lan2_green { 40 | label = "green:lan2"; 41 | gpios = <&pinctrl 15 1>; 42 | }; 43 | }; 44 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6358-huawei-echolife-hg556a-b.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6358-huawei-echolife-hg556a.dtsi" 2 | 3 | / { 4 | model = "Huawei EchoLife HG556a (version B)"; 5 | compatible = "huawei,echolife-hg556a-b", "brcm,bcm6358"; 6 | }; 7 | 8 | &gpiokeys { 9 | help { 10 | label = "help"; 11 | gpios = <&pinctrl 8 1>; 12 | linux,code = ; 13 | debounce-interval = <60>; 14 | }; 15 | }; 16 | 17 | &gpioleds { 18 | message_red { 19 | label = "red:message"; 20 | gpios = <&pinctrl 0 1>; 21 | }; 22 | 23 | hspa_red { 24 | label = "red:hspa"; 25 | gpios = <&pinctrl 1 1>; 26 | }; 27 | 28 | all_red { 29 | label = "red:all"; 30 | gpios = <&pinctrl 6 1>; 31 | default-state = "on"; 32 | }; 33 | 34 | lan1_green { 35 | label = "green:lan1"; 36 | gpios = <&pinctrl 12 1>; 37 | }; 38 | 39 | lan2_green { 40 | label = "green:lan2"; 41 | gpios = <&pinctrl 15 1>; 42 | }; 43 | }; 44 | -------------------------------------------------------------------------------- /mpc83xx/patches-3.18/111-etsec27_war.patch: -------------------------------------------------------------------------------- 1 | --- a/drivers/net/ethernet/freescale/gianfar.c 2 | +++ b/drivers/net/ethernet/freescale/gianfar.c 3 | @@ -1050,10 +1050,16 @@ static int gfar_probe(struct platform_de 4 | udelay(2); 5 | 6 | tempval = 0; 7 | - if (!priv->pause_aneg_en && priv->tx_pause_en) 8 | - tempval |= MACCFG1_TX_FLOW; 9 | - if (!priv->pause_aneg_en && priv->rx_pause_en) 10 | - tempval |= MACCFG1_RX_FLOW; 11 | + /* 12 | + * Do not enable flow control on chips earlier than rev 1.1, 13 | + * because of the eTSEC27 erratum 14 | + */ 15 | + if ((mfspr(SPRN_SVR) & 0xffff) >= 0x0011) { 16 | + if (!priv->pause_aneg_en && priv->tx_pause_en) 17 | + tempval |= MACCFG1_TX_FLOW; 18 | + if (!priv->pause_aneg_en && priv->rx_pause_en) 19 | + tempval |= MACCFG1_RX_FLOW; 20 | + } 21 | /* the soft reset bit is not self-resetting, so we need to 22 | * clear it before resuming normal operation 23 | */ 24 | -------------------------------------------------------------------------------- /cns21xx/base-files/lib/upgrade/platform.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2010 OpenWrt.org 3 | # 4 | 5 | . /lib/cns21xx.sh 6 | 7 | PART_NAME=firmware 8 | RAMFS_COPY_DATA=/lib/cns21xx.sh 9 | 10 | platform_check_image() { 11 | local board=$(get_board_name) 12 | local magic="$(get_magic_word "$1")" 13 | 14 | [ "$#" -gt 1 ] && return 1 15 | 16 | case "$board" in 17 | nsb3ast) 18 | [ "$magic" != "0b1c" ] && { 19 | echo "Invalid image type." 20 | return 1 21 | } 22 | return 0 23 | ;; 24 | ns-k330) 25 | [ "$magic" != "0c1c" ] && { 26 | echo "Invalid image type." 27 | return 1 28 | } 29 | return 0 30 | ;; 31 | esac 32 | 33 | echo "Sysupgrade is not yet supported on $board." 34 | return 1 35 | } 36 | 37 | disable_watchdog() { 38 | killall watchdog 39 | ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && { 40 | echo 'Could not disable watchdog' 41 | return 1 42 | } 43 | } 44 | 45 | append sysupgrade_pre_upgrade disable_watchdog 46 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/428-bcm63xx_enet-rgmii-ctrl-fix.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h 2 | +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h 3 | @@ -79,6 +79,9 @@ struct bcm63xx_enetsw_port { 4 | int force_speed; 5 | int force_duplex_full; 6 | 7 | + int mii_override; 8 | + int timing_sel; 9 | + 10 | const char *name; 11 | }; 12 | 13 | --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c 14 | +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c 15 | @@ -2227,6 +2227,10 @@ static int bcm_enetsw_open(struct net_de 16 | 17 | rgmii_ctrl = enetsw_readb(priv, ENETSW_RGMII_CTRL_REG(i)); 18 | rgmii_ctrl |= ENETSW_RGMII_CTRL_GMII_CLK_EN; 19 | + if (priv->used_ports[i].mii_override) 20 | + rgmii_ctrl |= ENETSW_RGMII_CTRL_MII_OVERRIDE_EN; 21 | + if (priv->used_ports[i].timing_sel) 22 | + rgmii_ctrl |= ENETSW_RGMII_CTRL_TIMING_SEL_EN; 23 | enetsw_writeb(priv, rgmii_ctrl, ENETSW_RGMII_CTRL_REG(i)); 24 | } 25 | 26 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/331-MIPS-BCM63XX-define-variant-id-field.patch: -------------------------------------------------------------------------------- 1 | From 3bd8e2535265f06f79ed9c0ad788405441e091dc Mon Sep 17 00:00:00 2001 2 | From: Jonas Gorski 3 | Date: Sat, 7 Dec 2013 14:22:41 +0100 4 | Subject: [PATCH 21/45] MIPS: BCM63XX: define variant id field 5 | 6 | Some SoC have a variant id field in the chip id register. 7 | 8 | Signed-off-by: Jonas Gorski 9 | --- 10 | arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 2 ++ 11 | 1 file changed, 2 insertions(+) 12 | 13 | --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h 14 | +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h 15 | @@ -10,6 +10,8 @@ 16 | #define PERF_REV_REG 0x0 17 | #define REV_CHIPID_SHIFT 16 18 | #define REV_CHIPID_MASK (0xffff << REV_CHIPID_SHIFT) 19 | +#define REV_VARID_SHIFT 12 20 | +#define REV_VARID_MASK (0xf << REV_VARID_SHIFT) 21 | #define REV_REVID_SHIFT 0 22 | #define REV_REVID_MASK (0xff << REV_REVID_SHIFT) 23 | 24 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/403-6358-enet1-external-mii-clk.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/mips/bcm63xx/boards/board_common.c 2 | +++ b/arch/mips/bcm63xx/boards/board_common.c 3 | @@ -97,6 +97,8 @@ void __init board_early_setup(const stru 4 | if (BCMCPU_IS_6348()) 5 | val |= GPIO_MODE_6348_G3_EXT_MII | 6 | GPIO_MODE_6348_G0_EXT_MII; 7 | + else if (BCMCPU_IS_6358()) 8 | + val |= GPIO_MODE_6358_ENET1_MII_CLK_INV; 9 | } 10 | 11 | bcm_gpio_writel(val, GPIO_MODE_REG); 12 | --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h 13 | +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h 14 | @@ -652,6 +652,8 @@ 15 | #define GPIO_MODE_6358_EXTRA_SPI_SS (1 << 7) 16 | #define GPIO_MODE_6358_SERIAL_LED (1 << 10) 17 | #define GPIO_MODE_6358_UTOPIA (1 << 12) 18 | +#define GPIO_MODE_6358_ENET1_MII_CLK_INV (1 << 30) 19 | +#define GPIO_MODE_6358_ENET0_MII_CLK_INV (1 << 31) 20 | 21 | #define GPIO_MODE_6368_ANALOG_AFE_0 (1 << 0) 22 | #define GPIO_MODE_6368_ANALOG_AFE_1 (1 << 1) 23 | -------------------------------------------------------------------------------- /oxnas/modules.mk: -------------------------------------------------------------------------------- 1 | define KernelPackage/ata-oxnas-sata 2 | TITLE:=oxnas Serial ATA support 3 | KCONFIG:=CONFIG_SATA_OXNAS 4 | FILES:=$(LINUX_DIR)/drivers/ata/sata_oxnas.ko 5 | AUTOLOAD:=$(call AutoLoad,41,sata_oxnas,1) 6 | $(call AddDepends/ata,@TARGET_oxnas) 7 | endef 8 | 9 | define KernelPackage/ata-oxnas-sata/description 10 | SATA support for OX934 core found in the OX8xx/PLX782x SoCs 11 | endef 12 | 13 | $(eval $(call KernelPackage,ata-oxnas-sata)) 14 | 15 | 16 | define KernelPackage/usb2-oxnas 17 | TITLE:=OX820 EHCI driver 18 | KCONFIG:=CONFIG_USB_EHCI_OXNAS 19 | FILES:=$(LINUX_DIR)/drivers/usb/host/ehci-oxnas.ko 20 | AUTOLOAD:=$(call AutoLoad,55,ehci-oxnas,1) 21 | $(call AddDepends/usb,@TARGET_oxnas_ox820 +kmod-usb2) 22 | endef 23 | 24 | define KernelPackage/usb2-oxnas/description 25 | This driver provides USB Device Controller support for the 26 | EHCI USB host built-in to the OX820 SoC. 27 | endef 28 | 29 | $(eval $(call KernelPackage,usb2-oxnas)) 30 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch: -------------------------------------------------------------------------------- 1 | From ff3409ab17d56450943364ba49a16960e3cdda9b Mon Sep 17 00:00:00 2001 2 | From: Jonas Gorski 3 | Date: Sun, 6 Apr 2014 22:33:16 +0200 4 | Subject: [RFC] jffs2: work around unaligned accesses failing on bcm63xx/smp 5 | 6 | Unligned memcpy_fromio randomly fails with an unaligned dst. Work around 7 | it by ensuring we are always doing aligned copies. 8 | 9 | Should fix filename corruption in jffs2 with SMP. 10 | 11 | Signed-off-by: Jonas Gorski 12 | --- 13 | fs/jffs2/nodelist.h | 2 +- 14 | 1 file changed, 1 insertion(+), 1 deletion(-) 15 | 16 | --- a/fs/jffs2/nodelist.h 17 | +++ b/fs/jffs2/nodelist.h 18 | @@ -259,7 +259,7 @@ struct jffs2_full_dirent 19 | uint32_t ino; /* == zero for unlink */ 20 | unsigned int nhash; 21 | unsigned char type; 22 | - unsigned char name[]; 23 | + unsigned char name[] __attribute__((aligned((sizeof(long))))); 24 | }; 25 | 26 | /* 27 | -------------------------------------------------------------------------------- /ath25/base-files/lib/preinit/15_preinit_iface_atheros: -------------------------------------------------------------------------------- 1 | preinit_ip() { 2 | if [ -z "$pi_ifname" ]; then 3 | grep -q 'Atheros AR231[567]' /proc/cpuinfo && { 4 | if [ -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/0:00" -o \ 5 | -e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/0:10" ]; then 6 | ip link set eth0 up 7 | ip link add link eth0 name eth0.1 type vlan id 1 8 | ifname=eth0.1 9 | else 10 | ifname=eth0 11 | fi 12 | pi_ifname=$ifname 13 | } 14 | fi 15 | [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && { 16 | ip addr add $pi_ip/$pi_netmask broadcast $pi_broadcast dev $pi_ifname 17 | ip link set $pi_ifname up 18 | } 19 | } 20 | 21 | preinit_ip_deconfig() { 22 | if [ -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/0:00" -o \ 23 | -e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/0:10" ]; then 24 | ip link del eth0.1 2>/dev/null 25 | ip link set $pi_ifname down 26 | elif [ -n "$pi_ifname" ]; then 27 | ip -4 addr flush dev $pi_ifname 28 | fi 29 | } 30 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/401-bcm963xx_real_rootfs_length.patch: -------------------------------------------------------------------------------- 1 | --- a/include/linux/bcm963xx_tag.h 2 | +++ b/include/linux/bcm963xx_tag.h 3 | @@ -92,8 +92,10 @@ struct bcm_tag { 4 | __u32 rootfs_crc; 5 | /* 224-227: CRC32 of kernel partition */ 6 | __u32 kernel_crc; 7 | - /* 228-235: Unused at present */ 8 | - char reserved1[8]; 9 | + /* 228-231: Unused at present */ 10 | + char reserved1[4]; 11 | + /* 222-235: Openwrt: real rootfs length */ 12 | + __u32 real_rootfs_length; 13 | /* 236-239: CRC32 of header excluding last 20 bytes */ 14 | __u32 header_crc; 15 | /* 240-255: Unused at present */ 16 | --- a/drivers/mtd/parsers/parser_imagetag.c 17 | +++ b/drivers/mtd/parsers/parser_imagetag.c 18 | @@ -136,7 +136,8 @@ static int bcm963xx_parse_imagetag_parti 19 | } else { 20 | /* OpenWrt layout */ 21 | rootfsaddr = kerneladdr + kernellen; 22 | - rootfslen = spareaddr - rootfsaddr; 23 | + rootfslen = buf->real_rootfs_length; 24 | + spareaddr = rootfsaddr + rootfslen; 25 | } 26 | } else { 27 | goto out; 28 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6348-dynalink-rta1025w.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6348.dtsi" 2 | 3 | #include 4 | 5 | / { 6 | model = "Dynalink RTA1025W"; 7 | compatible = "dynalink,rta1025w", "brcm,bcm6348"; 8 | 9 | chosen { 10 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 11 | stdout-path = "serial0:115200n8"; 12 | }; 13 | }; 14 | 15 | &pflash { 16 | status = "okay"; 17 | 18 | partitions { 19 | compatible = "fixed-partitions"; 20 | #address-cells = <1>; 21 | #size-cells = <1>; 22 | 23 | cfe@0 { 24 | label = "CFE"; 25 | reg = <0x000000 0x010000>; 26 | read-only; 27 | }; 28 | 29 | linux@10000 { 30 | label = "linux"; 31 | reg = <0x010000 0x3e0000>; 32 | compatible = "brcm,bcm963xx-imagetag"; 33 | }; 34 | 35 | nvram@3f0000 { 36 | label = "nvram"; 37 | reg = <0x3f0000 0x010000>; 38 | }; 39 | }; 40 | }; 41 | 42 | &pinctrl { 43 | pinctrl-names = "default"; 44 | pinctrl-0 = <&pinctrl_pci &pinctrl_ext_mii>; 45 | }; 46 | 47 | &uart0 { 48 | status = "okay"; 49 | }; 50 | -------------------------------------------------------------------------------- /mpc83xx/base-files/lib/mpc83xx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (C) 2012 OpenWrt.org 4 | # 5 | 6 | MPC83XX_BOARD_NAME= 7 | MPC83XX_MODEL= 8 | 9 | mpc83xx_board_detect() { 10 | local model 11 | local name 12 | 13 | model=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /model/ {print $2}' /proc/cpuinfo) 14 | 15 | case "$model" in 16 | "RB333") 17 | name="rb333" 18 | model="MikroTik RouterBOARD 333" 19 | ;; 20 | "RB600") 21 | name="rb600" 22 | model="MikroTik RouterBOARD 600" 23 | ;; 24 | esac 25 | 26 | [ -z "$name" ] && name="unknown" 27 | 28 | [ -z "$MPC83XX_BOARD_NAME" ] && MPC83XX_BOARD_NAME="$name" 29 | [ -z "$MPC83XX_MODEL" ] && MPC83XX_MODEL="$model" 30 | 31 | [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/" 32 | 33 | echo "$MPC83XX_BOARD_NAME" > /tmp/sysinfo/board_name 34 | echo "$MPC83XX_MODEL" > /tmp/sysinfo/model 35 | } 36 | 37 | mpc83xx_board_name() { 38 | local name 39 | 40 | [ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name) 41 | [ -z "$name" ] && name="unknown" 42 | 43 | echo "$name" 44 | } 45 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6348-davolink-dv-201amr.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6348.dtsi" 2 | 3 | #include 4 | 5 | / { 6 | model = "Davolink DV-201AMR"; 7 | compatible = "davolink,dv-201amr", "brcm,bcm6348"; 8 | 9 | chosen { 10 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 11 | stdout-path = "serial0:115200n8"; 12 | }; 13 | }; 14 | 15 | &pflash { 16 | status = "okay"; 17 | 18 | partitions { 19 | compatible = "fixed-partitions"; 20 | #address-cells = <1>; 21 | #size-cells = <1>; 22 | 23 | backup@0 { 24 | label = "backup"; 25 | reg = <0x000000 0x400000>; 26 | }; 27 | 28 | cfe@400000 { 29 | label = "cfe"; 30 | reg = <0x400000 0x010000>; 31 | read-only; 32 | }; 33 | 34 | linux@410000 { 35 | label = "linux"; 36 | reg = <0x410000 0x3f0000>; 37 | compatible = "brcm,bcm963xx-imagetag"; 38 | }; 39 | }; 40 | }; 41 | 42 | &pinctrl { 43 | pinctrl-names = "default"; 44 | pinctrl-0 = <&pinctrl_pci &pinctrl_ext_mii>; 45 | }; 46 | 47 | &uart0 { 48 | status = "okay"; 49 | }; 50 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/110-MIPS-BCM63XX-EHCI-controller-does-not-support-overcu.patch: -------------------------------------------------------------------------------- 1 | From 111bbd770441ab34f9da5bb1d85767a9b75227b4 Mon Sep 17 00:00:00 2001 2 | From: Florian Fainelli 3 | Date: Mon, 28 Jan 2013 20:06:30 +0100 4 | Subject: [PATCH 12/12] MIPS: BCM63XX: EHCI controller does not support 5 | overcurrent 6 | 7 | This patch sets the spurious_oc flag for the BCM63XX EHCI controller as it 8 | does not support proper overcurrent reporting. 9 | 10 | Signed-off-by: Florian Fainelli 11 | --- 12 | arch/mips/bcm63xx/dev-usb-ehci.c | 1 + 13 | 1 file changed, 1 insertion(+) 14 | 15 | --- a/arch/mips/bcm63xx/dev-usb-ehci.c 16 | +++ b/arch/mips/bcm63xx/dev-usb-ehci.c 17 | @@ -61,6 +61,7 @@ static void bcm63xx_ehci_power_off(struc 18 | static struct usb_ehci_pdata bcm63xx_ehci_pdata = { 19 | .big_endian_desc = 1, 20 | .big_endian_mmio = 1, 21 | + .spurious_oc = 1, 22 | .power_on = bcm63xx_ehci_power_on, 23 | .power_off = bcm63xx_ehci_power_off, 24 | .power_suspend = bcm63xx_ehci_power_off, 25 | -------------------------------------------------------------------------------- /bcm63xx/base-files/etc/uci-defaults/09_fix_crc: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2007 OpenWrt.org 3 | # 4 | 5 | . /lib/functions.sh 6 | 7 | do_fixcrc() { 8 | mtd fixtrx linux 9 | } 10 | 11 | case "$(board_name)" in 12 | actiontec,r1000h|\ 13 | adb,a4001n|\ 14 | adb,a4001n1|\ 15 | adb,pdg-a4001n-a-000-1a1-ax|\ 16 | adb,pdg-a4101n-a-000-1a1-ae|\ 17 | brcm,bcm96328avng|\ 18 | brcm,bcm963281tan|\ 19 | bt,voyager-2110|\ 20 | bt,voyager-2500v-bb|\ 21 | comtrend,ar-5315u|\ 22 | comtrend,ar-5381u|\ 23 | comtrend,ar-5387un|\ 24 | comtrend,vr-3025u|\ 25 | comtrend,vr-3025un|\ 26 | comtrend,vr-3026e|\ 27 | comtrend,wap-5813n|\ 28 | comtrend,ct-6373|\ 29 | d-link,dsl-274xb-f1|\ 30 | dynalink,rta770bw|\ 31 | dynalink,rta770w|\ 32 | huawei,echolife-hg622|\ 33 | netgear,evg2000|\ 34 | nucom,r5010un-v2|\ 35 | observa,vh4032n|\ 36 | t-com,speedport-w-303v|\ 37 | technicolor,tg582n|\ 38 | technicolor,tg582n-telecom-italia|\ 39 | telsey,cpva502plus|\ 40 | telsey,cpva642|\ 41 | telsey,magic|\ 42 | zyxel,p870hw-51a-v2) 43 | do_fixcrc 44 | ;; 45 | esac 46 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6348-sagem-fast-2404.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6348.dtsi" 2 | 3 | #include 4 | 5 | / { 6 | model = "Sagem F@st 2404"; 7 | compatible = "sagem,fast-2404", "brcm,bcm6348"; 8 | 9 | chosen { 10 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 11 | stdout-path = "serial0:115200n8"; 12 | }; 13 | }; 14 | 15 | &pflash { 16 | status = "okay"; 17 | 18 | partitions { 19 | compatible = "fixed-partitions"; 20 | #address-cells = <1>; 21 | #size-cells = <1>; 22 | 23 | cfe@0 { 24 | label = "CFE"; 25 | reg = <0x000000 0x010000>; 26 | read-only; 27 | }; 28 | 29 | linux@10000 { 30 | label = "linux"; 31 | reg = <0x010000 0x3e0000>; 32 | compatible = "brcm,bcm963xx-imagetag"; 33 | }; 34 | 35 | nvram@3f0000 { 36 | label = "nvram"; 37 | reg = <0x3f0000 0x010000>; 38 | }; 39 | }; 40 | }; 41 | 42 | &pinctrl { 43 | pinctrl-names = "default"; 44 | pinctrl-0 = <&pinctrl_pci &pinctrl_ext_mii &pinctrl_mii_pccard>; 45 | }; 46 | 47 | &uart0 { 48 | status = "okay"; 49 | }; 50 | -------------------------------------------------------------------------------- /oxnas/patches-5.15/150-oxnas-restart.patch: -------------------------------------------------------------------------------- 1 | --- a/drivers/power/reset/Kconfig 2 | +++ b/drivers/power/reset/Kconfig 3 | @@ -148,6 +148,12 @@ config POWER_RESET_OXNAS 4 | help 5 | Restart support for OXNAS/PLXTECH OX820 SoC. 6 | 7 | +config POWER_RESET_OXNAS 8 | + bool "OXNAS SoC restart driver" 9 | + depends on ARCH_OXNAS 10 | + help 11 | + Restart support for OXNAS boards. 12 | + 13 | config POWER_RESET_PIIX4_POWEROFF 14 | tristate "Intel PIIX4 power-off driver" 15 | depends on PCI 16 | --- a/drivers/power/reset/Makefile 17 | +++ b/drivers/power/reset/Makefile 18 | @@ -19,6 +19,7 @@ obj-$(CONFIG_POWER_RESET_QCOM_PON) += qc 19 | obj-$(CONFIG_POWER_RESET_OCELOT_RESET) += ocelot-reset.o 20 | obj-$(CONFIG_POWER_RESET_PIIX4_POWEROFF) += piix4-poweroff.o 21 | obj-$(CONFIG_POWER_RESET_LTC2952) += ltc2952-poweroff.o 22 | +obj-$(CONFIG_POWER_RESET_OXNAS) += oxnas-restart.o 23 | obj-$(CONFIG_POWER_RESET_QNAP) += qnap-poweroff.o 24 | obj-$(CONFIG_POWER_RESET_REGULATOR) += regulator-poweroff.o 25 | obj-$(CONFIG_POWER_RESET_RESTART) += restart-poweroff.o 26 | -------------------------------------------------------------------------------- /bcm63xx/image/lzma-loader/src/LzmaTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | LzmaTypes.h 3 | 4 | Types for LZMA Decoder 5 | 6 | This file written and distributed to public domain by Igor Pavlov. 7 | This file is part of LZMA SDK 4.40 (2006-05-01) 8 | */ 9 | 10 | #ifndef __LZMATYPES_H 11 | #define __LZMATYPES_H 12 | 13 | #ifndef _7ZIP_BYTE_DEFINED 14 | #define _7ZIP_BYTE_DEFINED 15 | typedef unsigned char Byte; 16 | #endif 17 | 18 | #ifndef _7ZIP_UINT16_DEFINED 19 | #define _7ZIP_UINT16_DEFINED 20 | typedef unsigned short UInt16; 21 | #endif 22 | 23 | #ifndef _7ZIP_UINT32_DEFINED 24 | #define _7ZIP_UINT32_DEFINED 25 | #ifdef _LZMA_UINT32_IS_ULONG 26 | typedef unsigned long UInt32; 27 | #else 28 | typedef unsigned int UInt32; 29 | #endif 30 | #endif 31 | 32 | /* #define _LZMA_NO_SYSTEM_SIZE_T */ 33 | /* You can use it, if you don't want */ 34 | 35 | #ifndef _7ZIP_SIZET_DEFINED 36 | #define _7ZIP_SIZET_DEFINED 37 | #ifdef _LZMA_NO_SYSTEM_SIZE_T 38 | typedef UInt32 SizeT; 39 | #else 40 | #include 41 | typedef size_t SizeT; 42 | #endif 43 | #endif 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/100-MIPS-BCM63XX-add-USB-host-clock-enable-delay.patch: -------------------------------------------------------------------------------- 1 | From 80a2f983e9f44dbc3e01ae31c62d877846a7f791 Mon Sep 17 00:00:00 2001 2 | From: Florian Fainelli 3 | Date: Mon, 28 Jan 2013 20:06:19 +0100 4 | Subject: [PATCH 01/11] MIPS: BCM63XX: add USB host clock enable delay 5 | 6 | Knowledge of the clock setup delay should remain at the clock level (so 7 | it can be clock specific and CPU specific). Add the 100 milliseconds 8 | required clock delay for the USB host clock when it gets enabled. 9 | 10 | Signed-off-by: Florian Fainelli 11 | --- 12 | arch/mips/bcm63xx/clk.c | 5 +++++ 13 | 1 file changed, 5 insertions(+) 14 | 15 | --- a/arch/mips/bcm63xx/clk.c 16 | +++ b/arch/mips/bcm63xx/clk.c 17 | @@ -214,6 +214,11 @@ static void usbh_set(struct clk *clk, in 18 | bcm_hwclock_set(CKCTL_6362_USBH_EN, enable); 19 | else if (BCMCPU_IS_6368()) 20 | bcm_hwclock_set(CKCTL_6368_USBH_EN, enable); 21 | + else 22 | + return; 23 | + 24 | + if (enable) 25 | + msleep(100); 26 | } 27 | 28 | static struct clk clk_usbh = { 29 | -------------------------------------------------------------------------------- /bcm63xx/smp/config-default: -------------------------------------------------------------------------------- 1 | CONFIG_CPU_RMAP=y 2 | CONFIG_CRC16=y 3 | CONFIG_CRYPTO_ACOMP2=y 4 | CONFIG_CRYPTO_AEAD=y 5 | CONFIG_CRYPTO_AEAD2=y 6 | CONFIG_CRYPTO_DEFLATE=y 7 | CONFIG_CRYPTO_HASH_INFO=y 8 | CONFIG_CRYPTO_HASH2=y 9 | CONFIG_CRYPTO_LZO=y 10 | CONFIG_CRYPTO_MANAGER=y 11 | CONFIG_CRYPTO_MANAGER2=y 12 | CONFIG_CRYPTO_NULL2=y 13 | CONFIG_CRYPTO_ZSTD=y 14 | CONFIG_JFFS2_FS_NAND=y 15 | CONFIG_LZO_COMPRESS=y 16 | CONFIG_LZO_DECOMPRESS=y 17 | CONFIG_MTD_NAND_BRCMNAND=y 18 | CONFIG_MTD_NAND_CORE=y 19 | CONFIG_MTD_NAND_ECC_SW_HAMMING=y 20 | CONFIG_MTD_RAW_NAND=y 21 | CONFIG_MTD_SPLIT_BCM_WFI_FW=y 22 | CONFIG_MTD_UBI=y 23 | CONFIG_MTD_UBI_BEB_LIMIT=20 24 | CONFIG_MTD_UBI_BLOCK=y 25 | CONFIG_MTD_UBI_WL_THRESHOLD=4096 26 | CONFIG_NET_FLOW_LIMIT=y 27 | CONFIG_NR_CPUS=2 28 | CONFIG_PADATA=y 29 | CONFIG_RFS_ACCEL=y 30 | CONFIG_RPS=y 31 | CONFIG_SGL_ALLOC=y 32 | CONFIG_SMP=y 33 | CONFIG_SMP_UP=y 34 | CONFIG_TREE_RCU=y 35 | CONFIG_UBIFS_FS=y 36 | CONFIG_XPS=y 37 | CONFIG_XXHASH=y 38 | CONFIG_ZLIB_DEFLATE=y 39 | CONFIG_ZLIB_INFLATE=y 40 | CONFIG_ZSTD_COMPRESS=y 41 | CONFIG_ZSTD_DECOMPRESS=y 42 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/371_add_of_node_available_by_alias.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/mips/bcm63xx/boards/board_common.c 2 | +++ b/arch/mips/bcm63xx/boards/board_common.c 3 | @@ -143,6 +143,18 @@ void __init device_tree_init(void) 4 | 5 | unflatten_and_copy_device_tree(); 6 | } 7 | + 8 | +int board_of_device_present(const char *alias) 9 | +{ 10 | + bool present; 11 | + struct device_node *np; 12 | + 13 | + np = of_find_node_by_path(alias); 14 | + present = of_device_is_available(np); 15 | + of_node_put(np); 16 | + 17 | + return present; 18 | +} 19 | #endif 20 | 21 | static struct gpio_led_platform_data bcm63xx_led_data; 22 | --- a/arch/mips/bcm63xx/boards/board_common.h 23 | +++ b/arch/mips/bcm63xx/boards/board_common.h 24 | @@ -15,4 +15,13 @@ void board_bcm963xx_init(void); 25 | static inline void board_bcm963xx_init(void) { } 26 | #endif 27 | 28 | +#if defined(CONFIG_OF) 29 | +int board_of_device_present(const char *alias); 30 | +#else 31 | +static inline void board_of_device_present(const char *alias) 32 | +{ 33 | + return 0; 34 | +} 35 | +#endif 36 | + 37 | #endif /* __BOARD_COMMON_H */ 38 | -------------------------------------------------------------------------------- /bcm63xx/image/lzma-loader/src/board.c: -------------------------------------------------------------------------------- 1 | /* 2 | * BCM63XX specific implementation parts 3 | * 4 | * Copyright (C) 2020 Álvaro Fernández Rojas 5 | * Copyright (C) 2014 Jonas Gorski 6 | * 7 | * This program is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU General Public License version 2 as published 9 | * by the Free Software Foundation. 10 | */ 11 | 12 | #include 13 | #include "config.h" 14 | 15 | #define READREG(r) *(volatile unsigned int *)(r) 16 | #define WRITEREG(r,v) *(volatile unsigned int *)(r) = v 17 | 18 | #define UART_IR_REG 0x10 19 | #define UART_FIFO_REG 0x14 20 | 21 | static void wait_xfered(void) 22 | { 23 | unsigned int val; 24 | 25 | do { 26 | val = READREG(UART_BASE + UART_IR_REG); 27 | if (val & (1 << 5)) 28 | break; 29 | } while (1); 30 | } 31 | 32 | void board_putc(int ch) 33 | { 34 | if (!UART_BASE) 35 | return; 36 | 37 | wait_xfered(); 38 | WRITEREG(UART_BASE + UART_FIFO_REG, ch); 39 | wait_xfered(); 40 | } 41 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6358-brcm-bcm96358vw2.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6358.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Broadcom BCM96358VW2 reference board"; 8 | compatible = "brcm,bcm96358vw2", "brcm,bcm6358"; 9 | 10 | chosen { 11 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 12 | stdout-path = "serial0:115200n8"; 13 | }; 14 | 15 | leds { 16 | compatible = "gpio-leds"; 17 | 18 | stop_green { 19 | label = "green:stop"; 20 | gpios = <&pinctrl 4 1>; 21 | }; 22 | power_green { 23 | function = LED_FUNCTION_POWER; 24 | color = ; 25 | gpios = <&pinctrl 5 1>; 26 | default-state = "on"; 27 | }; 28 | adsl_green { 29 | label = "green:adsl"; 30 | gpios = <&pinctrl 22 1>; 31 | }; 32 | ppp_fail_green { 33 | label = "green:ppp-fail"; 34 | gpios = <&pinctrl 23 0>; 35 | }; 36 | }; 37 | }; 38 | 39 | &pflash { 40 | status = "okay"; 41 | 42 | partitions { 43 | compatible = "brcm,bcm963xx-cfe-nor-partitions"; 44 | }; 45 | }; 46 | 47 | &uart0 { 48 | status = "okay"; 49 | }; 50 | -------------------------------------------------------------------------------- /iop32x/image/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2007-2010 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | include $(TOPDIR)/rules.mk 8 | include $(INCLUDE_DIR)/image.mk 9 | 10 | define Image/BuildKernel 11 | cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage 12 | # 13 | # XXX - FIXME 14 | # 15 | # BIN_DIR=$(BIN_DIR) IMG_PREFIX="$(IMG_PREFIX)" $(TOPDIR)/scripts/arm-magic.sh 16 | endef 17 | 18 | define Image/Build 19 | $(call Image/Build/$(1),$(1)) 20 | endef 21 | 22 | define Image/Build/jffs2-64k 23 | dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=65536 conv=sync 24 | endef 25 | 26 | define Image/Build/jffs2-128k 27 | dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=131072 conv=sync 28 | $(call Image/Build/slug,$(1)) 29 | endef 30 | 31 | define Image/Build/squashfs 32 | $(call prepare_generic_squashfs,$(KDIR)/root.squashfs) 33 | dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=131072 conv=sync 34 | $(call Image/Build/slug,$(1)) 35 | endef 36 | 37 | $(eval $(call BuildImage)) 38 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/415-MIPS-BCM63XX-export-the-attached-flash-type.patch: -------------------------------------------------------------------------------- 1 | From 066f1e37742ee434496d32a41a9284458de96742 Mon Sep 17 00:00:00 2001 2 | From: Jonas Gorski 3 | Date: Mon, 13 Jan 2014 12:12:30 +0100 4 | Subject: [PATCH] MIPS: BCM63XX: export the attached flash type 5 | 6 | Signed-off-by: Jonas Gorski 7 | --- 8 | arch/mips/bcm63xx/dev-flash.c | 5 +++++ 9 | arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h | 2 ++ 10 | 2 files changed, 7 insertions(+) 11 | 12 | --- a/arch/mips/bcm63xx/dev-flash.c 13 | +++ b/arch/mips/bcm63xx/dev-flash.c 14 | @@ -271,3 +271,8 @@ int __init bcm63xx_flash_register(void) 15 | return -ENODEV; 16 | } 17 | } 18 | + 19 | +int bcm63xx_flash_get_type(void) 20 | +{ 21 | + return flash_type; 22 | +} 23 | --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h 24 | +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h 25 | @@ -14,4 +14,6 @@ void bcm63xx_flash_force_phys_base_addre 26 | 27 | int __init bcm63xx_flash_register(void); 28 | 29 | +int bcm63xx_flash_get_type(void); 30 | + 31 | #endif /* __BCM63XX_FLASH_H */ 32 | -------------------------------------------------------------------------------- /mpc83xx/image/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2009-2010 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | include $(TOPDIR)/rules.mk 8 | include $(INCLUDE_DIR)/image.mk 9 | 10 | 11 | define Image/Prepare 12 | $(LINUX_DIR)/scripts/dtc/dtc -O dtb -R 4 -S 0x20000 $(DTS_DIR)/mpc8377_wlan.dts > $(BIN_DIR)/openwrt-mpc83xx-mpc8377_wlan.dtb 13 | endef 14 | 15 | define Image/BuildKernel 16 | cp $(LINUX_DIR)/arch/powerpc/boot/dtbImage.rb600.elf $(BIN_DIR)/openwrt-$(BOARD)-rb600.elf 17 | cp $(LINUX_DIR)/arch/powerpc/boot/dtbImage.rb333.elf $(BIN_DIR)/openwrt-$(BOARD)-rb333.elf 18 | cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage 19 | endef 20 | 21 | define Image/Build 22 | $(call Image/Build/$(1),$(1)) 23 | endef 24 | 25 | define Image/Build/squashfs 26 | $(call prepare_generic_squashfs,$(KDIR)/root.squashfs) 27 | ( \ 28 | dd if=$(LINUX_DIR)/arch/powerpc/boot/uImage bs=3072k conv=sync; \ 29 | dd if=$(KDIR)/root.$(1) bs=256k conv=sync; \ 30 | ) > $(BIN_DIR)/$(IMG_PREFIX)-mpc8377_wlan-$(1).img 31 | endef 32 | 33 | $(eval $(call BuildImage)) 34 | -------------------------------------------------------------------------------- /bcm63xx/base-files/lib/upgrade/platform.sh: -------------------------------------------------------------------------------- 1 | PART_NAME=linux 2 | REQUIRE_IMAGE_METADATA=0 3 | 4 | platform_check_image() { 5 | [ "$#" -gt 1 ] && return 1 6 | 7 | case "$(board_name)" in 8 | comtrend,vg-8050|\ 9 | comtrend,vr-3032u|\ 10 | huawei,hg253s-v2|\ 11 | netgear,dgnd3700-v2|\ 12 | sercomm,ad1018|\ 13 | sercomm,h500-s-lowi|\ 14 | sercomm,h500-s-vfes) 15 | # NAND sysupgrade 16 | return 0 17 | ;; 18 | esac 19 | 20 | case "$(get_magic_word "$1")" in 21 | 3600|3700|3800) 22 | # CFE tag versions 23 | return 0 24 | ;; 25 | *) 26 | echo "Invalid image type. Please use only .bin files" 27 | return 1 28 | ;; 29 | esac 30 | } 31 | 32 | platform_do_upgrade() { 33 | case "$(board_name)" in 34 | comtrend,vg-8050|\ 35 | comtrend,vr-3032u|\ 36 | huawei,hg253s-v2|\ 37 | netgear,dgnd3700-v2) 38 | REQUIRE_IMAGE_METADATA=1 39 | CI_JFFS2_CLEAN_MARKERS=1 40 | nand_do_upgrade "$1" 41 | ;; 42 | sercomm,ad1018|\ 43 | sercomm,h500-s-lowi|\ 44 | sercomm,h500-s-vfes) 45 | REQUIRE_IMAGE_METADATA=1 46 | nand_do_upgrade "$1" 47 | ;; 48 | *) 49 | default_do_upgrade "$1" 50 | ;; 51 | esac 52 | } 53 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/801-ssb_export_fallback_sprom.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/mips/bcm63xx/sprom.c 2 | +++ b/arch/mips/bcm63xx/sprom.c 3 | @@ -8,6 +8,7 @@ 4 | */ 5 | 6 | #include 7 | +#include 8 | #include 9 | #include 10 | #include 11 | @@ -388,7 +389,19 @@ struct fallback_sprom_match { 12 | struct ssb_sprom sprom; 13 | }; 14 | 15 | -static struct fallback_sprom_match fallback_sprom; 16 | +struct fallback_sprom_match fallback_sprom; 17 | + 18 | +int bcm63xx_get_fallback_sprom(uint pci_bus, uint pci_slot, struct ssb_sprom *out) 19 | +{ 20 | + if (pci_bus != fallback_sprom.pci_bus || 21 | + pci_slot != fallback_sprom.pci_dev) 22 | + pr_warn("fallback_sprom: pci bus/device num mismatch: expected %i/%i, but got %i/%i\n", 23 | + fallback_sprom.pci_bus, fallback_sprom.pci_dev, 24 | + pci_bus, pci_slot); 25 | + memcpy(out, &fallback_sprom.sprom, sizeof(struct ssb_sprom)); 26 | + return 0; 27 | +} 28 | +EXPORT_SYMBOL(bcm63xx_get_fallback_sprom); 29 | 30 | #if defined(CONFIG_SSB_PCIHOST) 31 | int bcm63xx_get_fallback_ssb_sprom(struct ssb_bus *bus, struct ssb_sprom *out) 32 | -------------------------------------------------------------------------------- /ep93xx/image/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2009-2010 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | include $(TOPDIR)/rules.mk 8 | include $(INCLUDE_DIR)/image.mk 9 | 10 | UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage 11 | fs_squash:=squashfs-only 12 | fs_all:=all 13 | fs_4k:=4k 14 | fs_64k:=64k 15 | fs_128k:=128k 16 | 17 | define Image/BuildKernel 18 | cp $(KDIR)/uImage $(UIMAGE) 19 | ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) 20 | cp $(KDIR)/uImage-initramfs $(UIMAGE)-initramfs 21 | endif 22 | endef 23 | 24 | define Image/Build/jffs2-64k 25 | dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=64k conv=sync 26 | endef 27 | 28 | define Image/Build/jffs2-128k 29 | dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=128k conv=sync 30 | endef 31 | 32 | define Image/Build/squashfs 33 | $(call prepare_generic_squashfs,$(KDIR)/root.squashfs) 34 | dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=128k conv=sync 35 | endef 36 | 37 | define Image/Build 38 | $(call Image/Build/$(1),$(1)) 39 | endef 40 | 41 | $(eval $(call BuildImage)) 42 | -------------------------------------------------------------------------------- /bcm63xx/modules.mk: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2010 OpenWrt.org 4 | 5 | define KernelPackage/pcmcia-bcm63xx 6 | SUBMENU:=$(PCMCIA_MENU) 7 | TITLE:=Broadcom BCM63xx PCMCIA support 8 | DEPENDS:=@TARGET_bcm63xx +kmod-pcmcia-rsrc 9 | KCONFIG:=CONFIG_PCMCIA_BCM63XX 10 | FILES:=$(LINUX_DIR)/drivers/pcmcia/bcm63xx_pcmcia.ko 11 | AUTOLOAD:=$(call AutoLoad,41,bcm63xx_pcmcia) 12 | endef 13 | 14 | define KernelPackage/pcmcia-bcm63xx/description 15 | Kernel support for PCMCIA/CardBus controller on the BCM63xx SoC 16 | endef 17 | 18 | $(eval $(call KernelPackage,pcmcia-bcm63xx)) 19 | 20 | define KernelPackage/bcm63xx-udc 21 | SUBMENU:=$(USB_MENU) 22 | TITLE:=Broadcom BCM63xx UDC support 23 | DEPENDS:=@TARGET_bcm63xx +kmod-usb-gadget 24 | KCONFIG:=CONFIG_USB_BCM63XX_UDC 25 | FILES:= \ 26 | $(LINUX_DIR)/drivers/usb/gadget/udc/bcm63xx_udc.ko 27 | AUTOLOAD:=$(call AutoLoad,51,bcm63xx_udc) 28 | $(call AddDepends/usb) 29 | endef 30 | 31 | define KernelPackage/bcm63xx-udc/description 32 | Kernel support for the USB gadget (device) controller on the BCM63xx SoC 33 | endef 34 | 35 | $(eval $(call KernelPackage,bcm63xx-udc)) 36 | -------------------------------------------------------------------------------- /cns21xx/patches-3.10/003-arm-introduce-fa-platform.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/arm/Kconfig 2 | +++ b/arch/arm/Kconfig 3 | @@ -1028,10 +1028,15 @@ source "arch/arm/mach-w90x900/Kconfig" 4 | 5 | source "arch/arm/mach-zynq/Kconfig" 6 | 7 | +source "arch/arm/plat-fa/Kconfig" 8 | + 9 | # Definitions to make life easier 10 | config ARCH_ACORN 11 | bool 12 | 13 | +config PLAT_FA 14 | + bool 15 | + 16 | config PLAT_IOP 17 | bool 18 | select GENERIC_CLOCKEVENTS 19 | --- a/arch/arm/Makefile 20 | +++ b/arch/arm/Makefile 21 | @@ -205,6 +205,7 @@ machine-$(CONFIG_ARCH_SUNXI) += sunxi 22 | plat-$(CONFIG_ARCH_OMAP) += omap 23 | plat-$(CONFIG_ARCH_S3C64XX) += samsung 24 | plat-$(CONFIG_PLAT_IOP) += iop 25 | +plat-$(CONFIG_PLAT_FA) += fa 26 | plat-$(CONFIG_PLAT_ORION) += orion 27 | plat-$(CONFIG_PLAT_PXA) += pxa 28 | plat-$(CONFIG_PLAT_S3C24XX) += samsung 29 | --- /dev/null 30 | +++ b/arch/arm/plat-fa/Makefile 31 | @@ -0,0 +1,10 @@ 32 | +# 33 | +# Makefile for the linux kernel. 34 | +# 35 | + 36 | +obj-y := 37 | + 38 | +obj-m := 39 | +obj-n := 40 | +obj- := 41 | + 42 | --- /dev/null 43 | +++ b/arch/arm/plat-fa/Kconfig 44 | @@ -0,0 +1,3 @@ 45 | +if PLAT_FA 46 | + 47 | +endif 48 | -------------------------------------------------------------------------------- /cobalt/modules.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2012 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | 8 | define KernelPackage/fb-cobalt 9 | SUBMENU:=$(VIDEO_MENU) 10 | TITLE:=Cobalt framebuffer support 11 | DEPENDS:=@TARGET_cobalt +kmod-fb 12 | KCONFIG:=CONFIG_FB_COBALT 13 | FILES:=$(LINUX_DIR)/drivers/video/fbdev/cobalt_lcdfb.ko 14 | AUTOLOAD:=$(call AutoLoad,50,cobalt_lcdfb) 15 | endef 16 | 17 | define KernelPackage/fb-cobalt/descriptione 18 | Kernel module for the Cobalt Microservers framebuffer 19 | endef 20 | 21 | $(eval $(call KernelPackage,fb-cobalt)) 22 | 23 | define KernelPackage/cobalt-btns 24 | SUBMENU:=$(OTHER_MENU) 25 | TITLE:=Cobalt buttons support 26 | DEPENDS:=@TARGET_cobalt +kmod-input-evdev +kmod-input-polldev 27 | KCONFIG:=CONFIG_INPUT_COBALT_BTNS 28 | FILES:=$(LINUX_DIR)/drivers/input/misc/cobalt_btns.ko 29 | AUTOLOAD:=$(call AutoLoad,62,cobalt_btns) 30 | endef 31 | 32 | define KernelPackage/cobalt-btns/description 33 | Kernel module for the Cobalt Microservers buttons 34 | endef 35 | 36 | $(eval $(call KernelPackage,cobalt-btns)) 37 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6338-brcm-bcm96338w.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6338.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Broadcom BCM96338W reference board"; 8 | compatible = "brcm,bcm96338w", "brcm,bcm6338"; 9 | 10 | chosen { 11 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 12 | stdout-path = "serial0:115200n8"; 13 | }; 14 | 15 | leds { 16 | compatible = "gpio-leds"; 17 | 18 | power_green { 19 | function = LED_FUNCTION_POWER; 20 | color = ; 21 | gpios = <&gpio0 0 1>; 22 | default-state = "on"; 23 | }; 24 | stop_green { 25 | label = "green:stop"; 26 | gpios = <&gpio0 1 1>; 27 | }; 28 | dsl_green { 29 | label = "green:adsl"; 30 | gpios = <&gpio0 3 1>; 31 | }; 32 | ppp_fail_green { 33 | label = "green:ppp-fail"; 34 | gpios = <&gpio0 4 1>; 35 | }; 36 | ses_green { 37 | label = "green:ses"; 38 | gpios = <&gpio0 5 1>; 39 | }; 40 | }; 41 | }; 42 | 43 | &pflash { 44 | status = "okay"; 45 | 46 | partitions { 47 | compatible = "brcm,bcm963xx-cfe-nor-partitions"; 48 | }; 49 | }; 50 | 51 | &uart0 { 52 | status = "okay"; 53 | }; 54 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6338-brcm-bcm96338gw.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6338.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Broadcom BCM96338GW reference board"; 8 | compatible = "brcm,bcm96338gw", "brcm,bcm6338"; 9 | 10 | chosen { 11 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 12 | stdout-path = "serial0:115200n8"; 13 | }; 14 | 15 | leds { 16 | compatible = "gpio-leds"; 17 | 18 | power_green { 19 | function = LED_FUNCTION_POWER; 20 | color = ; 21 | gpios = <&gpio0 0 1>; 22 | default-state = "on"; 23 | }; 24 | stop_green { 25 | label = "green:stop"; 26 | gpios = <&gpio0 1 1>; 27 | }; 28 | dsl_green { 29 | label = "green:adsl"; 30 | gpios = <&gpio0 3 1>; 31 | }; 32 | ppp_fail_green { 33 | label = "green:ppp-fail"; 34 | gpios = <&gpio0 4 1>; 35 | }; 36 | ses_green { 37 | label = "green:ses"; 38 | gpios = <&gpio0 5 1>; 39 | }; 40 | }; 41 | }; 42 | 43 | &pflash { 44 | status = "okay"; 45 | 46 | partitions { 47 | compatible = "brcm,bcm963xx-cfe-nor-partitions"; 48 | }; 49 | }; 50 | 51 | &uart0 { 52 | status = "okay"; 53 | }; 54 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/802-rtl8367r_fix_RGMII_support.patch: -------------------------------------------------------------------------------- 1 | From e3208e6087642b95a5bab3101fc9c6e34892c861 Mon Sep 17 00:00:00 2001 2 | From: Miguel GAIO 3 | Date: Fri, 6 Jul 2012 14:12:33 +0200 4 | Subject: [PATCH 6/8] * [rtl8367r] Fix RGMII support 5 | 6 | --- 7 | drivers/net/phy/rtl8367.c | 5 +++++ 8 | 1 files changed, 5 insertions(+), 0 deletions(-) 9 | 10 | --- a/drivers/net/phy/rtl8367.c 11 | +++ b/drivers/net/phy/rtl8367.c 12 | @@ -146,6 +146,10 @@ 13 | #define RTL8367_EXT_RGMXF_TXDELAY_MASK 1 14 | #define RTL8367_EXT_RGMXF_RXDELAY_MASK 0x7 15 | 16 | +#define RTL8367_PHY_AD_REG 0x130f 17 | +#define RTL8370_PHY_AD_DUMMY_1_OFFSET 5 18 | +#define RTL8370_PHY_AD_DUMMY_1_MASK 0xe0 19 | + 20 | #define RTL8367_DI_FORCE_REG(_x) (0x1310 + (_x)) 21 | #define RTL8367_DI_FORCE_MODE BIT(12) 22 | #define RTL8367_DI_FORCE_NWAY BIT(7) 23 | @@ -897,6 +901,7 @@ static int rtl8367_extif_set_mode(struct 24 | case RTL8367_EXTIF_MODE_RGMII_33V: 25 | REG_WR(smi, RTL8367_CHIP_DEBUG0_REG, 0x0367); 26 | REG_WR(smi, RTL8367_CHIP_DEBUG1_REG, 0x7777); 27 | + REG_RMW(smi, RTL8367_PHY_AD_REG, BIT(5), 0); 28 | break; 29 | 30 | case RTL8367_EXTIF_MODE_TMII_MAC: 31 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6358-brcm-bcm96358vw.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6358.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Broadcom BCM96358VW reference board"; 8 | compatible = "brcm,bcm96358vw", "brcm,bcm6358"; 9 | 10 | chosen { 11 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 12 | stdout-path = "serial0:115200n8"; 13 | }; 14 | 15 | leds { 16 | compatible = "gpio-leds"; 17 | 18 | power_green { 19 | function = LED_FUNCTION_POWER; 20 | color = ; 21 | gpios = <&pinctrl 4 0>; 22 | default-state = "on"; 23 | }; 24 | stop_green { 25 | label = "green:stop"; 26 | gpios = <&pinctrl 5 0>; 27 | }; 28 | adsl_fail_green { 29 | label = "green:adsl-fail"; 30 | gpios = <&pinctrl 15 1>; 31 | }; 32 | ppp_green { 33 | label = "green:ppp"; 34 | gpios = <&pinctrl 22 1>; 35 | }; 36 | ppp_fail_green { 37 | label = "green:ppp-fail"; 38 | gpios = <&pinctrl 23 1>; 39 | }; 40 | }; 41 | }; 42 | 43 | &pflash { 44 | status = "okay"; 45 | 46 | partitions { 47 | compatible = "brcm,bcm963xx-cfe-nor-partitions"; 48 | }; 49 | }; 50 | 51 | &uart0 { 52 | status = "okay"; 53 | }; 54 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm63268-inteno-vg50.dts: -------------------------------------------------------------------------------- 1 | #include "bcm63268.dtsi" 2 | 3 | #include 4 | 5 | / { 6 | model = "Inteno VG50"; 7 | compatible = "inteno,vg50", "brcm,bcm63268"; 8 | 9 | chosen { 10 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 11 | stdout-path = "serial0:115200n8"; 12 | }; 13 | 14 | keys { 15 | compatible = "gpio-keys-polled"; 16 | #address-cells = <1>; 17 | #size-cells = <0>; 18 | poll-interval = <20>; 19 | 20 | reset { 21 | label = "reset"; 22 | gpios = <&pinctrl 32 0>; 23 | linux,code = ; 24 | debounce-interval = <60>; 25 | }; 26 | 27 | wps { 28 | label = "wps"; 29 | gpios = <&pinctrl 34 0>; 30 | linux,code = ; 31 | debounce-interval = <60>; 32 | }; 33 | }; 34 | }; 35 | 36 | &hsspi { 37 | status = "okay"; 38 | 39 | flash@0 { 40 | compatible = "jedec,spi-nor"; 41 | spi-max-frequency = <20000000>; 42 | spi-tx-bus-width = <2>; 43 | spi-rx-bus-width = <2>; 44 | reg = <0>; 45 | 46 | #address-cells = <1>; 47 | #size-cells = <1>; 48 | 49 | partitions { 50 | compatible = "brcm,bcm963xx-cfe-nor-partitions"; 51 | }; 52 | }; 53 | }; 54 | 55 | &uart0 { 56 | status = "okay"; 57 | }; 58 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6348-usrobotics-usr9108.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6348.dtsi" 2 | 3 | #include 4 | 5 | / { 6 | model = "USRobotics USR9108"; 7 | compatible = "usrobotics,usr9108", "brcm,bcm6348"; 8 | 9 | chosen { 10 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 11 | stdout-path = "serial0:115200n8"; 12 | }; 13 | 14 | leds { 15 | compatible = "gpio-leds"; 16 | 17 | usb { 18 | label = "usb"; 19 | gpios = <&pinctrl 0 1>; 20 | }; 21 | dsl { 22 | label = "adsl"; 23 | gpios = <&pinctrl 3 1>; 24 | }; 25 | }; 26 | }; 27 | 28 | &pflash { 29 | status = "okay"; 30 | 31 | partitions { 32 | compatible = "fixed-partitions"; 33 | #address-cells = <1>; 34 | #size-cells = <1>; 35 | 36 | cfe@0 { 37 | label = "CFE"; 38 | reg = <0x000000 0x010000>; 39 | read-only; 40 | }; 41 | 42 | linux@10000 { 43 | label = "linux"; 44 | reg = <0x010000 0x3e0000>; 45 | compatible = "brcm,bcm963xx-imagetag"; 46 | }; 47 | 48 | nvram@3f0000 { 49 | label = "nvram"; 50 | reg = <0x3f0000 0x010000>; 51 | }; 52 | }; 53 | }; 54 | 55 | &pinctrl { 56 | pinctrl-names = "default"; 57 | pinctrl-0 = <&pinctrl_pci &pinctrl_ext_mii>; 58 | }; 59 | 60 | &uart0 { 61 | status = "okay"; 62 | }; 63 | -------------------------------------------------------------------------------- /oxnas/base-files/etc/board.d/02_network: -------------------------------------------------------------------------------- 1 | 2 | . /lib/functions/uci-defaults.sh 3 | . /lib/functions/system.sh 4 | 5 | bootloader_cmdline_var() { 6 | local param 7 | local pval 8 | for arg in $(cat /proc/device-tree/chosen/bootloader-args); do 9 | param="$(echo $arg | cut -d'=' -f 1)" 10 | pval="$(echo $arg | cut -d'=' -f 2-)" 11 | 12 | if [ "$param" = "$1" ]; then 13 | echo "$pval" 14 | fi 15 | done 16 | } 17 | 18 | legacy_boot_mac_adr() { 19 | local macstr 20 | local oIFS 21 | macstr="$(bootloader_cmdline_var mac_adr)" 22 | oIFS="$IFS" 23 | IFS="," 24 | set -- $macstr 25 | printf "%02x:%02x:%02x:%02x:%02x:%02x" $1 $2 $3 $4 $5 $6 26 | IFS="$oIFS" 27 | } 28 | 29 | oxnas_setup_interfaces() 30 | { 31 | local board="$1" 32 | 33 | case $board in 34 | *) 35 | ucidef_set_interface_lan "eth0" "dhcp" 36 | ;; 37 | esac 38 | } 39 | 40 | oxnas_setup_macs() 41 | { 42 | local board="$1" 43 | local lan_mac="" 44 | 45 | case $board in 46 | shuttle,kd20) 47 | lan_mac="$(legacy_boot_mac_adr)" 48 | ;; 49 | esac 50 | 51 | [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac 52 | } 53 | 54 | board_config_update 55 | board=$(board_name) 56 | oxnas_setup_interfaces $board 57 | oxnas_setup_macs $board 58 | board_config_flush 59 | 60 | exit 0 61 | -------------------------------------------------------------------------------- /sibyte/image/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2007-2010 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | include $(TOPDIR)/rules.mk 8 | include $(INCLUDE_DIR)/image.mk 9 | 10 | define Image/BuildKernel 11 | cp $(LINUX_DIR)/vmlinux $(BIN_DIR)/$(IMG_PREFIX)-vmlinux 12 | # uImage 13 | dd if=$(KDIR)/vmlinux of=$(KDIR)/$(IMG_PREFIX)-vmlinux bs=64k conv=sync 14 | mkimage -A mips -O linux -T kernel -a 0x80100000 -C none -e \ 15 | 0x80100000 \ 16 | -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \ 17 | -d $(KDIR)/$(IMG_PREFIX)-vmlinux $(BIN_DIR)/$(IMG_PREFIX)-uImage 18 | endef 19 | 20 | define Image/Build 21 | $(call Image/Build/$(1),$(1)) 22 | endef 23 | 24 | define Image/Build/jffs2-64k 25 | dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=65536 conv=sync 26 | endef 27 | 28 | define Image/Build/jffs2-128k 29 | dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=131072 conv=sync 30 | $(call Image/Build/slug,$(1)) 31 | endef 32 | 33 | define Image/Build/squashfs 34 | $(call prepare_generic_squashfs,$(KDIR)/root.squashfs) 35 | dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=131072 conv=sync 36 | endef 37 | 38 | $(eval $(call BuildImage)) 39 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm63268-brcm-bcm963268bu-p300.dts: -------------------------------------------------------------------------------- 1 | #include "bcm63268.dtsi" 2 | 3 | #include 4 | 5 | / { 6 | model = "Broadcom BCM963268BU_P300 reference board"; 7 | compatible = "brcm,bcm963268bu-p300", "brcm,bcm63268"; 8 | 9 | chosen { 10 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 11 | stdout-path = "serial0:115200n8"; 12 | }; 13 | 14 | keys { 15 | compatible = "gpio-keys-polled"; 16 | #address-cells = <1>; 17 | #size-cells = <0>; 18 | poll-interval = <20>; 19 | 20 | reset { 21 | label = "reset"; 22 | gpios = <&pinctrl 32 0>; 23 | linux,code = ; 24 | debounce-interval = <60>; 25 | }; 26 | 27 | wps { 28 | label = "wps"; 29 | gpios = <&pinctrl 33 0>; 30 | linux,code = ; 31 | debounce-interval = <60>; 32 | }; 33 | }; 34 | }; 35 | 36 | &hsspi { 37 | status = "okay"; 38 | 39 | flash@0 { 40 | compatible = "jedec,spi-nor"; 41 | spi-max-frequency = <20000000>; 42 | spi-tx-bus-width = <2>; 43 | spi-rx-bus-width = <2>; 44 | reg = <0>; 45 | 46 | #address-cells = <1>; 47 | #size-cells = <1>; 48 | 49 | partitions { 50 | compatible = "brcm,bcm963xx-cfe-nor-partitions"; 51 | }; 52 | }; 53 | }; 54 | 55 | &uart0 { 56 | status = "okay"; 57 | }; 58 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch: -------------------------------------------------------------------------------- 1 | From e55892aac9d5508a000647ca66f0e678e02be3bb Mon Sep 17 00:00:00 2001 2 | From: Jonas Gorski 3 | Date: Sat, 21 Feb 2015 17:26:50 +0100 4 | Subject: [PATCH 5/6] MIPS: BCM63XX: do not register gpio-controller if 5 | present in dtb 6 | 7 | Signed-off-by: Jonas Gorski 8 | --- 9 | arch/mips/bcm63xx/gpio.c | 7 +++++-- 10 | 1 file changed, 5 insertions(+), 2 deletions(-) 11 | 12 | --- a/arch/mips/bcm63xx/gpio.c 13 | +++ b/arch/mips/bcm63xx/gpio.c 14 | @@ -20,6 +20,8 @@ 15 | #include 16 | #include 17 | 18 | +#include "boards/board_common.h" 19 | + 20 | static const char * const gpio_chip_labels[] = { 21 | "bcm63xx-gpio.0", 22 | "bcm63xx-gpio.1", 23 | @@ -48,8 +50,10 @@ static void __init bcm63xx_gpio_init_one 24 | pdata.base = id * 32; 25 | pdata.ngpio = ngpio; 26 | 27 | - platform_device_register_resndata(NULL, "bcm63xx-gpio", id, res, 2, 28 | - &pdata, sizeof(pdata)); 29 | + if (!board_of_device_present("gpio0") && 30 | + !board_of_device_present("pinctrl")) 31 | + platform_device_register_resndata(NULL, "bcm63xx-gpio", id, res, 32 | + 2, &pdata, sizeof(pdata)); 33 | } 34 | 35 | int __init bcm63xx_gpio_init(void) 36 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6348-brcm-bcm96348r.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6348.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Broadcom 96348R reference board"; 8 | compatible = "brcm,bcm96348r", "brcm,bcm6348"; 9 | 10 | chosen { 11 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 12 | stdout-path = "serial0:115200n8"; 13 | }; 14 | 15 | leds { 16 | compatible = "gpio-leds"; 17 | 18 | power_green { 19 | function = LED_FUNCTION_POWER; 20 | color = ; 21 | gpios = <&pinctrl 0 1>; 22 | default-state = "on"; 23 | }; 24 | stop_green { 25 | label = "green:stop"; 26 | gpios = <&pinctrl 1 1>; 27 | }; 28 | adsl_fail_green { 29 | label = "green:adsl-fail"; 30 | gpios = <&pinctrl 2 1>; 31 | }; 32 | ppp_green { 33 | label = "green:ppp"; 34 | gpios = <&pinctrl 3 1>; 35 | }; 36 | ppp_fail_green { 37 | label = "green:ppp-fail"; 38 | gpios = <&pinctrl 4 1>; 39 | }; 40 | }; 41 | }; 42 | 43 | &pflash { 44 | status = "okay"; 45 | 46 | partitions { 47 | compatible = "brcm,bcm963xx-cfe-nor-partitions"; 48 | }; 49 | }; 50 | 51 | &pinctrl { 52 | pinctrl-names = "default"; 53 | pinctrl-0 = <&pinctrl_pci>; 54 | }; 55 | 56 | &uart0 { 57 | status = "okay"; 58 | }; 59 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6348-tecom-gw6000.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6348.dtsi" 2 | 3 | #include 4 | 5 | / { 6 | model = "TECOM GW6000"; 7 | compatible = "tecom,gw6000", "brcm,bcm6348"; 8 | 9 | chosen { 10 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 11 | stdout-path = "serial0:115200n8"; 12 | }; 13 | 14 | keys { 15 | compatible = "gpio-keys-polled"; 16 | #address-cells = <1>; 17 | #size-cells = <0>; 18 | poll-interval = <20>; 19 | 20 | reset { 21 | label = "reset"; 22 | gpios = <&pinctrl 36 1>; 23 | linux,code = ; 24 | debounce-interval = <60>; 25 | }; 26 | }; 27 | }; 28 | 29 | &pflash { 30 | status = "okay"; 31 | 32 | partitions { 33 | compatible = "fixed-partitions"; 34 | #address-cells = <1>; 35 | #size-cells = <1>; 36 | 37 | cfe@0 { 38 | label = "CFE"; 39 | reg = <0x000000 0x010000>; 40 | read-only; 41 | }; 42 | 43 | linux@10000 { 44 | label = "linux"; 45 | reg = <0x010000 0x3e0000>; 46 | compatible = "brcm,bcm963xx-imagetag"; 47 | }; 48 | 49 | nvram@3f0000 { 50 | label = "nvram"; 51 | reg = <0x3f0000 0x010000>; 52 | }; 53 | }; 54 | }; 55 | 56 | &pinctrl { 57 | pinctrl-names = "default"; 58 | pinctrl-0 = <&pinctrl_pci &pinctrl_ext_mii>; 59 | }; 60 | 61 | &uart0 { 62 | status = "okay"; 63 | }; 64 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6368-brcm-bcm96368mvwg.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6368.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Broadcom BCM96368MVWG reference board"; 8 | compatible = "brcm,bcm96368mvwg", "brcm,bcm6368"; 9 | 10 | chosen { 11 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 12 | stdout-path = "serial0:115200n8"; 13 | }; 14 | 15 | leds { 16 | compatible = "gpio-leds"; 17 | 18 | dsl_green { 19 | label = "green:adsl"; 20 | gpios = <&pinctrl 2 1>; 21 | }; 22 | ppp_green { 23 | label = "green:ppp"; 24 | gpios = <&pinctrl 5 0>; 25 | }; 26 | power_green { 27 | function = LED_FUNCTION_POWER; 28 | color = ; 29 | gpios = <&pinctrl 22 0>; 30 | default-state = "on"; 31 | }; 32 | wps_green { 33 | function = LED_FUNCTION_WPS; 34 | color = ; 35 | gpios = <&pinctrl 23 1>; 36 | }; 37 | ppp_fail_red { 38 | label = "red:ppp-fail"; 39 | gpios = <&pinctrl 31 0>; 40 | }; 41 | }; 42 | }; 43 | 44 | &pflash { 45 | status = "okay"; 46 | 47 | partitions { 48 | compatible = "brcm,bcm963xx-cfe-nor-partitions"; 49 | }; 50 | }; 51 | 52 | &pinctrl { 53 | pinctrl-names = "default"; 54 | pinctrl-0 = <&pinctrl_pci>; 55 | }; 56 | 57 | &uart0 { 58 | status = "okay"; 59 | }; 60 | -------------------------------------------------------------------------------- /ath25/patches-5.15/141-redboot_partition_scan.patch: -------------------------------------------------------------------------------- 1 | --- a/drivers/mtd/parsers/redboot.c 2 | +++ b/drivers/mtd/parsers/redboot.c 3 | @@ -94,12 +94,18 @@ static int parse_redboot_partitions(stru 4 | 5 | parse_redboot_of(master); 6 | 7 | + buf = vmalloc(master->erasesize); 8 | + if (!buf) 9 | + return -ENOMEM; 10 | + 11 | +restart: 12 | if (directory < 0) { 13 | offset = master->size + directory * master->erasesize; 14 | while (mtd_block_isbad(master, offset)) { 15 | if (!offset) { 16 | nogood: 17 | pr_notice("Failed to find a non-bad block to check for RedBoot partition table\n"); 18 | + vfree(buf); 19 | return -EIO; 20 | } 21 | offset -= master->erasesize; 22 | @@ -112,10 +118,6 @@ nogood: 23 | goto nogood; 24 | } 25 | } 26 | - buf = vmalloc(master->erasesize); 27 | - 28 | - if (!buf) 29 | - return -ENOMEM; 30 | 31 | pr_notice("Searching for RedBoot partition table in %s at offset 0x%lx\n", 32 | master->name, offset); 33 | @@ -187,6 +189,11 @@ nogood: 34 | } 35 | if (i == numslots) { 36 | /* Didn't find it */ 37 | + if (offset + master->erasesize < master->size) { 38 | + /* not at the end of the flash yet, maybe next block */ 39 | + directory++; 40 | + goto restart; 41 | + } 42 | pr_notice("No RedBoot partition table detected in %s\n", 43 | master->name); 44 | ret = 0; 45 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6368-brcm-bcm96368mvngr.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6368.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Broadcom BCM96368MVNgr reference board"; 8 | compatible = "brcm,bcm96368mvngr", "brcm,bcm6368"; 9 | 10 | chosen { 11 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 12 | stdout-path = "serial0:115200n8"; 13 | }; 14 | 15 | leds { 16 | compatible = "gpio-leds"; 17 | 18 | dsl_green { 19 | label = "green:adsl"; 20 | gpios = <&pinctrl 2 1>; 21 | }; 22 | inet_fail_green { 23 | label = "green:inet-fail"; 24 | gpios = <&pinctrl 3 0>; 25 | }; 26 | inet_green { 27 | label = "green:inet"; 28 | gpios = <&pinctrl 5 0>; 29 | }; 30 | power_green { 31 | function = LED_FUNCTION_POWER; 32 | color = ; 33 | gpios = <&pinctrl 22 0>; 34 | default-state = "on"; 35 | }; 36 | wps_green { 37 | function = LED_FUNCTION_WPS; 38 | color = ; 39 | gpios = <&pinctrl 23 1>; 40 | }; 41 | }; 42 | }; 43 | 44 | &pflash { 45 | status = "okay"; 46 | 47 | partitions { 48 | compatible = "brcm,bcm963xx-cfe-nor-partitions"; 49 | }; 50 | }; 51 | 52 | &pinctrl { 53 | pinctrl-names = "default"; 54 | pinctrl-0 = <&pinctrl_pci>; 55 | }; 56 | 57 | &uart0 { 58 | status = "okay"; 59 | }; 60 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm63269-brcm-bcm963269bhr.dts: -------------------------------------------------------------------------------- 1 | #include "bcm63268.dtsi" 2 | 3 | #include 4 | 5 | / { 6 | model = "Broadcom BCM963269BHR reference board"; 7 | compatible = "brcm,bcm963269bhr", "brcm,bcm63269", "brcm,bcm63268"; 8 | 9 | chosen { 10 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 11 | stdout-path = "serial0:115200n8"; 12 | }; 13 | 14 | keys { 15 | compatible = "gpio-keys-polled"; 16 | #address-cells = <1>; 17 | #size-cells = <0>; 18 | poll-interval = <20>; 19 | 20 | reset { 21 | label = "reset"; 22 | gpios = <&pinctrl 32 0>; 23 | linux,code = ; 24 | debounce-interval = <60>; 25 | }; 26 | }; 27 | 28 | leds { 29 | compatible = "gpio-leds"; 30 | 31 | usb1 { 32 | label = "green:usb1"; 33 | gpios = <&pinctrl 9 1>; 34 | }; 35 | 36 | usb2 { 37 | label = "green:usb2"; 38 | gpios = <&pinctrl 10 1>; 39 | }; 40 | }; 41 | }; 42 | 43 | &hsspi { 44 | status = "okay"; 45 | 46 | flash@0 { 47 | compatible = "jedec,spi-nor"; 48 | spi-max-frequency = <20000000>; 49 | spi-tx-bus-width = <2>; 50 | spi-rx-bus-width = <2>; 51 | reg = <0>; 52 | 53 | #address-cells = <1>; 54 | #size-cells = <1>; 55 | 56 | partitions { 57 | compatible = "brcm,bcm963xx-cfe-nor-partitions"; 58 | }; 59 | }; 60 | }; 61 | 62 | &uart0 { 63 | status = "okay"; 64 | }; 65 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6338-d-link-dsl-2640u.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6338.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "D-Link DSL-2640U/BRU/C"; 8 | compatible = "d-link,dsl-2640u", "brcm,bcm6338"; 9 | 10 | chosen { 11 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 12 | stdout-path = "serial0:115200n8"; 13 | }; 14 | 15 | leds { 16 | compatible = "gpio-leds"; 17 | 18 | green_power { 19 | function = LED_FUNCTION_POWER; 20 | color = ; 21 | gpios = <&gpio0 0 1>; 22 | default-state = "on"; 23 | }; 24 | 25 | green_stop { 26 | label = "green:ppp"; 27 | gpios = <&gpio0 4 1>; 28 | }; 29 | 30 | green_adsl { 31 | label = "green:ppp-fail"; 32 | gpios = <&gpio0 5 1>; 33 | }; 34 | }; 35 | }; 36 | 37 | &pflash { 38 | status = "okay"; 39 | 40 | partitions { 41 | compatible = "fixed-partitions"; 42 | #address-cells = <1>; 43 | #size-cells = <1>; 44 | 45 | cfe@0 { 46 | label = "CFE"; 47 | reg = <0x000000 0x010000>; 48 | read-only; 49 | }; 50 | 51 | linux@10000 { 52 | label = "linux"; 53 | reg = <0x010000 0x3e0000>; 54 | compatible = "brcm,bcm963xx-imagetag"; 55 | }; 56 | 57 | nvram@3f0000 { 58 | label = "nvram"; 59 | reg = <0x3f0000 0x010000>; 60 | }; 61 | }; 62 | }; 63 | 64 | &uart0 { 65 | status = "okay"; 66 | }; 67 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/109-MIPS-BCM63XX-register-EHCI-controller-if-board-enabl.patch: -------------------------------------------------------------------------------- 1 | From 709ef2034f5ba06da35f89856ad7baf2b7a41287 Mon Sep 17 00:00:00 2001 2 | From: Florian Fainelli 3 | Date: Mon, 28 Jan 2013 20:06:28 +0100 4 | Subject: [PATCH 10/11] MIPS: BCM63XX: register EHCI controller if board 5 | enables it 6 | 7 | BCM63XX-based board can control the registration of the EHCI controller 8 | by setting their has_ehci0 flag to 1. Handle this in the generic 9 | code dealing with board registration and call the actual helper to register 10 | the EHCI controller. 11 | 12 | Signed-off-by: Florian Fainelli 13 | --- 14 | arch/mips/bcm63xx/boards/board_bcm963xx.c | 4 ++++ 15 | 1 file changed, 4 insertions(+) 16 | 17 | --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c 18 | +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c 19 | @@ -24,6 +24,7 @@ 20 | #include 21 | #include 22 | #include 23 | +#include 24 | #include 25 | #include 26 | #include 27 | @@ -880,6 +881,9 @@ int __init board_register_devices(void) 28 | if (board.has_usbd) 29 | bcm63xx_usbd_register(&board.usbd); 30 | 31 | + if (board.has_ehci0) 32 | + bcm63xx_ehci_register(); 33 | + 34 | if (board.has_ohci0) 35 | bcm63xx_ohci_register(); 36 | 37 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/514-board_bcm6345.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c 2 | +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c 3 | @@ -1057,6 +1057,19 @@ static struct board_info __initdata boar 4 | .name = "96345GW2", 5 | .expected_cpu_id = 0x6345, 6 | }; 7 | + 8 | +static struct board_info __initdata board_rta770w = { 9 | + .name = "RTA770BW", 10 | + .expected_cpu_id = 0x6345, 11 | + 12 | + .has_enet0 = 1, 13 | + .enet0 = { 14 | + .has_phy = 1, 15 | + .phy_id = 0, 16 | + .force_speed_100 = 1, 17 | + .force_duplex_full = 1, 18 | + }, 19 | +}; 20 | #endif /* CONFIG_BCM63XX_CPU_6345 */ 21 | 22 | /* 23 | @@ -1383,6 +1396,7 @@ static const struct board_info __initcon 24 | #endif /* CONFIG_BCM63XX_CPU_6338 */ 25 | #ifdef CONFIG_BCM63XX_CPU_6345 26 | &board_96345gw2, 27 | + &board_rta770w, 28 | #endif /* CONFIG_BCM63XX_CPU_6345 */ 29 | #ifdef CONFIG_BCM63XX_CPU_6348 30 | &board_96348r, 31 | @@ -1441,6 +1455,8 @@ static struct of_device_id const bcm963x 32 | #endif /* CONFIG_BCM63XX_CPU_6338 */ 33 | #ifdef CONFIG_BCM63XX_CPU_6345 34 | { .compatible = "brcm,bcm96345gw2", .data = &board_96345gw2, }, 35 | + { .compatible = "dynalink,rta770bw", .data = &board_rta770w, }, 36 | + { .compatible = "dynalink,rta770w", .data = &board_rta770w, }, 37 | #endif /* CONFIG_BCM63XX_CPU_6345 */ 38 | #ifdef CONFIG_BCM63XX_CPU_6348 39 | { .compatible = "belkin,f5d7633", .data = &board_96348gw_10, }, 40 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/106-MIPS-BCM63XX-register-OHCI-controller-if-board-enabl.patch: -------------------------------------------------------------------------------- 1 | From 33ef960aed15f9a98a2c51d8d794cd72418e0be4 Mon Sep 17 00:00:00 2001 2 | From: Florian Fainelli 3 | Date: Mon, 28 Jan 2013 20:06:25 +0100 4 | Subject: [PATCH 07/11] MIPS: BCM63XX: register OHCI controller if board 5 | enables it 6 | 7 | BCM63XX-based boards can control the registration of the OHCI controller 8 | by setting their has_ohci0 flag to 1. Handle this in the generic 9 | code dealing with board registration and call the actual helper to 10 | register the OHCI controller. 11 | 12 | Signed-off-by: Florian Fainelli 13 | --- 14 | arch/mips/bcm63xx/boards/board_bcm963xx.c | 4 ++++ 15 | 1 file changed, 4 insertions(+) 16 | 17 | --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c 18 | +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c 19 | @@ -24,6 +24,7 @@ 20 | #include 21 | #include 22 | #include 23 | +#include 24 | #include 25 | #include 26 | 27 | @@ -879,6 +880,9 @@ int __init board_register_devices(void) 28 | if (board.has_usbd) 29 | bcm63xx_usbd_register(&board.usbd); 30 | 31 | + if (board.has_ohci0) 32 | + bcm63xx_ohci_register(); 33 | + 34 | /* Generate MAC address for WLAN and register our SPROM, 35 | * do this after registering enet devices 36 | */ 37 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm3368-netgear-cvg834g.dts: -------------------------------------------------------------------------------- 1 | #include "bcm3368.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Netgear CVG834G"; 8 | compatible = "netgear,cvg834g", "brcm,bcm3368"; 9 | 10 | aliases { 11 | led-boot = &led_power_green; 12 | led-failsafe = &led_power_green; 13 | led-running = &led_power_green; 14 | led-upgrade = &led_power_green; 15 | }; 16 | 17 | chosen { 18 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 19 | stdout-path = "serial0:115200n8"; 20 | }; 21 | 22 | leds { 23 | compatible = "gpio-leds"; 24 | 25 | led_power_green: power_green { 26 | function = LED_FUNCTION_POWER; 27 | color = ; 28 | gpios = <&gpio1 5 0>; 29 | default-state = "on"; 30 | }; 31 | }; 32 | }; 33 | 34 | &pflash { 35 | status = "okay"; 36 | 37 | partitions { 38 | compatible = "fixed-partitions"; 39 | #address-cells = <1>; 40 | #size-cells = <1>; 41 | 42 | cfe@0 { 43 | label = "CFE"; 44 | reg = <0x000000 0x010000>; 45 | read-only; 46 | }; 47 | 48 | linux@10000 { 49 | label = "linux"; 50 | reg = <0x010000 0x3e0000>; 51 | compatible = "brcm,bcm963xx-imagetag"; 52 | }; 53 | 54 | nvram@3f0000 { 55 | label = "nvram"; 56 | reg = <0x3f0000 0x010000>; 57 | }; 58 | }; 59 | }; 60 | 61 | &uart0 { 62 | status = "okay"; 63 | }; 64 | 65 | &uart1 { 66 | status = "okay"; 67 | }; 68 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6338-dynalink-rta1320.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6338.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Dynalink RTA1320"; 8 | compatible = "dynalink,rta1320", "brcm,bcm6338"; 9 | 10 | chosen { 11 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 12 | stdout-path = "serial0:115200n8"; 13 | }; 14 | 15 | leds { 16 | compatible = "gpio-leds"; 17 | 18 | green_power { 19 | function = LED_FUNCTION_POWER; 20 | color = ; 21 | gpios = <&gpio0 0 1>; 22 | default-state = "on"; 23 | }; 24 | green_stop { 25 | label = "green:stop"; 26 | gpios = <&gpio0 1 1>; 27 | }; 28 | green_adsl { 29 | label = "green:adsl"; 30 | gpios = <&gpio0 3 1>; 31 | }; 32 | green_ppp { 33 | label = "green:ppp"; 34 | gpios = <&gpio0 4 1>; 35 | }; 36 | }; 37 | }; 38 | 39 | &pflash { 40 | status = "okay"; 41 | 42 | partitions { 43 | compatible = "fixed-partitions"; 44 | #address-cells = <1>; 45 | #size-cells = <1>; 46 | 47 | cfe@0 { 48 | label = "CFE"; 49 | reg = <0x000000 0x010000>; 50 | read-only; 51 | }; 52 | 53 | linux@10000 { 54 | label = "linux"; 55 | reg = <0x010000 0x3e0000>; 56 | compatible = "brcm,bcm963xx-imagetag"; 57 | }; 58 | 59 | nvram@3f0000 { 60 | label = "nvram"; 61 | reg = <0x3f0000 0x010000>; 62 | }; 63 | }; 64 | }; 65 | 66 | &uart0 { 67 | status = "okay"; 68 | }; 69 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/338-MIPS-BCM63XX-increase-number-of-IRQs.patch: -------------------------------------------------------------------------------- 1 | From 6f5658c845cf1f79213b1d20423a04967259fdaa Mon Sep 17 00:00:00 2001 2 | From: Jonas Gorski 3 | Date: Sun, 15 Dec 2013 20:46:26 +0100 4 | Subject: [PATCH 48/53] MIPS: BCM63XX: increase number of IRQs 5 | 6 | Newer SoCs have 128 bit wide irq registers, thus 128 available internal 7 | interupts. 8 | --- 9 | arch/mips/include/asm/mach-bcm63xx/bcm63xx_irq.h | 4 +++- 10 | arch/mips/include/asm/mach-bcm63xx/irq.h | 2 +- 11 | 2 files changed, 4 insertions(+), 2 deletions(-) 12 | 13 | --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_irq.h 14 | +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_irq.h 15 | @@ -2,10 +2,12 @@ 16 | #ifndef BCM63XX_IRQ_H_ 17 | #define BCM63XX_IRQ_H_ 18 | 19 | +#include 20 | #include 21 | 22 | #define IRQ_INTERNAL_BASE 8 23 | -#define IRQ_EXTERNAL_BASE 100 24 | +#define NR_INTERNAL_IRQS 128 25 | +#define IRQ_EXTERNAL_BASE (IRQ_INTERNAL_BASE + NR_INTERNAL_IRQS) 26 | #define IRQ_EXT_0 (IRQ_EXTERNAL_BASE + 0) 27 | #define IRQ_EXT_1 (IRQ_EXTERNAL_BASE + 1) 28 | #define IRQ_EXT_2 (IRQ_EXTERNAL_BASE + 2) 29 | --- a/arch/mips/include/asm/mach-bcm63xx/irq.h 30 | +++ b/arch/mips/include/asm/mach-bcm63xx/irq.h 31 | @@ -2,7 +2,7 @@ 32 | #ifndef __ASM_MACH_BCM63XX_IRQ_H 33 | #define __ASM_MACH_BCM63XX_IRQ_H 34 | 35 | -#define NR_IRQS 128 36 | +#define NR_IRQS 256 37 | #define MIPS_CPU_IRQ_BASE 0 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6358-alcatel-rg100a.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6358.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Alcatel RG100A"; 8 | compatible = "alcatel,rg100a", "brcm,bcm6358"; 9 | 10 | chosen { 11 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 12 | stdout-path = "serial0:115200n8"; 13 | }; 14 | 15 | leds { 16 | compatible = "gpio-leds"; 17 | 18 | stop_green { 19 | label = "green:stop"; 20 | gpios = <&pinctrl 4 1>; 21 | }; 22 | power_green { 23 | function = LED_FUNCTION_POWER; 24 | color = ; 25 | gpios = <&pinctrl 5 1>; 26 | default-state = "on"; 27 | }; 28 | adsl_green { 29 | label = "green:adsl"; 30 | gpios = <&pinctrl 22 1>; 31 | }; 32 | ppp_fail_green { 33 | label = "green:ppp-fail"; 34 | gpios = <&pinctrl 23 0>; 35 | }; 36 | }; 37 | }; 38 | 39 | &pflash { 40 | status = "okay"; 41 | 42 | partitions { 43 | compatible = "fixed-partitions"; 44 | #address-cells = <1>; 45 | #size-cells = <1>; 46 | 47 | cfe@0 { 48 | label = "CFE"; 49 | reg = <0x000000 0x020000>; 50 | read-only; 51 | }; 52 | 53 | linux@20000 { 54 | label = "linux"; 55 | reg = <0x020000 0xfc0000>; 56 | compatible = "brcm,bcm963xx-imagetag"; 57 | }; 58 | 59 | nvram@fe0000 { 60 | label = "nvram"; 61 | reg = <0xfe0000 0x020000>; 62 | }; 63 | }; 64 | }; 65 | 66 | &uart0 { 67 | status = "okay"; 68 | }; 69 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6358-d-link-dsl-2650u.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6358.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "D-Link DSL-2650U"; 8 | compatible = "d-link,dsl-2650u", "brcm,bcm6358"; 9 | 10 | chosen { 11 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 12 | stdout-path = "serial0:115200n8"; 13 | }; 14 | 15 | leds { 16 | compatible = "gpio-leds"; 17 | 18 | stop_green { 19 | label = "green:stop"; 20 | gpios = <&pinctrl 4 1>; 21 | }; 22 | power_green { 23 | function = LED_FUNCTION_POWER; 24 | color = ; 25 | gpios = <&pinctrl 5 1>; 26 | default-state = "on"; 27 | }; 28 | adsl_green { 29 | label = "green:adsl"; 30 | gpios = <&pinctrl 22 1>; 31 | }; 32 | ppp_fail_green { 33 | label = "green:ppp-fail"; 34 | gpios = <&pinctrl 23 0>; 35 | }; 36 | }; 37 | }; 38 | 39 | &pflash { 40 | status = "okay"; 41 | 42 | partitions { 43 | compatible = "fixed-partitions"; 44 | #address-cells = <1>; 45 | #size-cells = <1>; 46 | 47 | cfe@0 { 48 | label = "CFE"; 49 | reg = <0x000000 0x010000>; 50 | read-only; 51 | }; 52 | 53 | linux@10000 { 54 | label = "linux"; 55 | reg = <0x010000 0x7e0000>; 56 | compatible = "brcm,bcm963xx-imagetag"; 57 | }; 58 | 59 | nvram@7f0000 { 60 | label = "nvram"; 61 | reg = <0x7f0000 0x010000>; 62 | }; 63 | }; 64 | }; 65 | 66 | &uart0 { 67 | status = "okay"; 68 | }; 69 | -------------------------------------------------------------------------------- /bcm63xx/image/lzma-loader/src/cp0regdef.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001 by Ralf Baechle 3 | * 4 | * Copyright (C) 2001, Monta Vista Software 5 | * Author: jsun@mvista.com or jsun@junsun.net 6 | */ 7 | #ifndef _cp0regdef_h_ 8 | #define _cp0regdef_h_ 9 | 10 | #define CP0_INDEX $0 11 | #define CP0_RANDOM $1 12 | #define CP0_ENTRYLO0 $2 13 | #define CP0_ENTRYLO1 $3 14 | #define CP0_CONTEXT $4 15 | #define CP0_PAGEMASK $5 16 | #define CP0_WIRED $6 17 | #define CP0_BADVADDR $8 18 | #define CP0_COUNT $9 19 | #define CP0_ENTRYHI $10 20 | #define CP0_COMPARE $11 21 | #define CP0_STATUS $12 22 | #define CP0_CAUSE $13 23 | #define CP0_EPC $14 24 | #define CP0_PRID $15 25 | #define CP0_CONFIG $16 26 | #define CP0_LLADDR $17 27 | #define CP0_WATCHLO $18 28 | #define CP0_WATCHHI $19 29 | #define CP0_XCONTEXT $20 30 | #define CP0_FRAMEMASK $21 31 | #define CP0_DIAGNOSTIC $22 32 | #define CP0_PERFORMANCE $25 33 | #define CP0_ECC $26 34 | #define CP0_CACHEERR $27 35 | #define CP0_TAGLO $28 36 | #define CP0_TAGHI $29 37 | #define CP0_ERROREPC $30 38 | 39 | #define read_32bit_c0_register(reg,sel) \ 40 | ({ int __res; \ 41 | if (sel == 0) \ 42 | __asm__ __volatile__( \ 43 | "mfc0\t%0, " #reg "\n\t" \ 44 | : "=r" (__res)); \ 45 | else \ 46 | __asm__ __volatile__( \ 47 | ".set\tmips32\n\t" \ 48 | "mfc0\t%0, " #reg ", " #sel "\n\t" \ 49 | ".set mips0\n\t" \ 50 | : "=r" (__res)); \ 51 | __res; \ 52 | }) 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /bcm63xx/image/lzma-loader/src/cache.c: -------------------------------------------------------------------------------- 1 | /* 2 | * LZMA compressed kernel loader for Atheros AR7XXX/AR9XXX based boards 3 | * 4 | * Copyright (C) 2011 Gabor Juhos 5 | * 6 | * The cache manipulation routine has been taken from the U-Boot project. 7 | * (C) Copyright 2003 8 | * Wolfgang Denk, DENX Software Engineering, 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU General Public License version 2 as published 12 | * by the Free Software Foundation. 13 | * 14 | */ 15 | 16 | #include "cache.h" 17 | #include "cacheops.h" 18 | #include "config.h" 19 | #include "printf.h" 20 | 21 | #define cache_op(op,addr) \ 22 | __asm__ __volatile__( \ 23 | " .set push \n" \ 24 | " .set noreorder \n" \ 25 | " .set mips3\n\t \n" \ 26 | " cache %0, %1 \n" \ 27 | " .set pop \n" \ 28 | : \ 29 | : "i" (op), "R" (*(unsigned char *)(addr))) 30 | 31 | void flush_cache(unsigned long start_addr, unsigned long size) 32 | { 33 | unsigned long lsize = CONFIG_CACHELINE_SIZE; 34 | unsigned long addr = start_addr & ~(lsize - 1); 35 | unsigned long aend = (start_addr + size + (lsize - 1)) & ~(lsize - 1); 36 | 37 | printf("blasting from 0x%08x to 0x%08x (0x%08x - 0x%08x)\n", start_addr, size, addr, aend); 38 | 39 | while (1) { 40 | cache_op(Hit_Writeback_Inv_D, addr); 41 | cache_op(Hit_Invalidate_I, addr); 42 | if (addr == aend) 43 | break; 44 | addr += lsize; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /pxa/image/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2008-2012 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | include $(TOPDIR)/rules.mk 8 | include $(INCLUDE_DIR)/image.mk 9 | 10 | define Image/BuildKernel 11 | cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage 12 | endef 13 | 14 | # Build a fake flash image for usage in Qemu 15 | define Image/Build/Gumstix 16 | dd if=/dev/zero bs=128k count=256 of=$(BIN_DIR)/$(IMG_PREFIX)-$(1)-qemu-flash.img 17 | dd if=$(BIN_DIR)/openwrt-pxa-gumstix-u-boot.bin conv=notrunc bs=128k \ 18 | of=$(BIN_DIR)/$(IMG_PREFIX)-$(1)-qemu-flash.img 19 | dd if=$(KDIR)/root.$(1) conv=notrunc bs=128k seek=2 \ 20 | of=$(BIN_DIR)/$(IMG_PREFIX)-$(1)-qemu-flash.img 21 | dd if=$(KDIR)/uImage conv=notrunc bs=128k seek=248 \ 22 | of=$(BIN_DIR)/$(IMG_PREFIX)-$(1)-qemu-flash.img 23 | endef 24 | 25 | define Image/Build 26 | $(call Image/Build/$(1),$(1)) 27 | $(call Image/Build/$(PROFILE),$(1)) 28 | endef 29 | 30 | define Image/Build/jffs2-64k 31 | dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=64k conv=sync 32 | endef 33 | 34 | define Image/Build/jffs2-128k 35 | dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=128k conv=sync 36 | endef 37 | 38 | define Image/Build/squashfs 39 | $(call prepare_generic_squashfs,$(KDIR)/root.squashfs) 40 | dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=128k conv=sync 41 | endef 42 | 43 | $(eval $(call BuildImage)) 44 | -------------------------------------------------------------------------------- /iop32x/patches-3.3/001-ARM-Fix-missing-linux-types.h-inclusion-in-asm-hardw.patch: -------------------------------------------------------------------------------- 1 | From 15e9b9b9ed268fa91e52c44d621f3d0296162d15 Mon Sep 17 00:00:00 2001 2 | From: David Howells 3 | Date: Fri, 23 Mar 2012 15:37:34 +0000 4 | Subject: [PATCH] ARM: Fix missing linux/types.h #inclusion in asm/hardware/iop3xx.h 5 | 6 | arch/arm/include/asm/hardware/iop3xx.h needs to include linux/types.h to avoid 7 | the following errors: 8 | 9 | In file included from arch/arm/plat-iop/restart.c:10:0: 10 | /data/fs/linux-2.6-fscache/arch/arm/include/asm/hardware/iop3xx.h:239:1: error: unknown type name 'u32' 11 | /data/fs/linux-2.6-fscache/arch/arm/include/asm/hardware/iop3xx.h: In function 'read_tmr0': 12 | /data/fs/linux-2.6-fscache/arch/arm/include/asm/hardware/iop3xx.h:241:2: error: unknown type name 'u32' 13 | /data/fs/linux-2.6-fscache/arch/arm/include/asm/hardware/iop3xx.h: At top level: 14 | /data/fs/linux-2.6-fscache/arch/arm/include/asm/hardware/iop3xx.h:246:31: error: unknown type name 'u32' 15 | ... 16 | 17 | Signed-off-by: David Howells 18 | --- 19 | arch/arm/include/asm/hardware/iop3xx.h | 3 +++ 20 | 1 files changed, 3 insertions(+), 0 deletions(-) 21 | 22 | --- a/arch/arm/include/asm/hardware/iop3xx.h 23 | +++ b/arch/arm/include/asm/hardware/iop3xx.h 24 | @@ -231,6 +231,9 @@ extern int iop3xx_get_init_atu(void); 25 | 26 | 27 | #ifndef __ASSEMBLY__ 28 | + 29 | +#include 30 | + 31 | void iop3xx_map_io(void); 32 | void iop_init_cp6_handler(void); 33 | void iop_init_time(unsigned long tickrate); 34 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6328-brcm-bcm963281tan.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6328.dtsi" 2 | 3 | #include 4 | 5 | / { 6 | model = "Broadcom bcm963281TAN reference board"; 7 | compatible = "brcm,bcm963281tan", "brcm,bcm6328"; 8 | 9 | aliases { 10 | led-boot = &led_power; 11 | led-failsafe = &led_power; 12 | led-running = &led_power; 13 | led-upgrade = &led_power; 14 | }; 15 | 16 | chosen { 17 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 18 | stdout-path = "serial0:115200n8"; 19 | }; 20 | 21 | leds { 22 | compatible = "gpio-leds"; 23 | 24 | inet { 25 | label = "internet"; 26 | gpios = <&pinctrl 1 1>; 27 | }; 28 | led_power: power { 29 | label = "power"; 30 | gpios = <&pinctrl 4 1>; 31 | default-state = "on"; 32 | }; 33 | inet_fail { 34 | label = "internet-fail"; 35 | gpios = <&pinctrl 7 1>; 36 | }; 37 | power_fail { 38 | label = "power-fail"; 39 | gpios = <&pinctrl 8 1>; 40 | }; 41 | wps { 42 | label = "wps"; 43 | gpios = <&pinctrl 9 1>; 44 | }; 45 | dsl { 46 | label = "dsl"; 47 | gpios = <&pinctrl 11 1>; 48 | }; 49 | }; 50 | }; 51 | 52 | &hsspi { 53 | status = "okay"; 54 | 55 | flash@0 { 56 | compatible = "jedec,spi-nor"; 57 | spi-max-frequency = <16666667>; 58 | spi-tx-bus-width = <2>; 59 | spi-rx-bus-width = <2>; 60 | reg = <0>; 61 | 62 | #address-cells = <1>; 63 | #size-cells = <1>; 64 | 65 | partitions { 66 | compatible = "brcm,bcm963xx-cfe-nor-partitions"; 67 | }; 68 | }; 69 | }; 70 | 71 | &uart0 { 72 | status = "okay"; 73 | }; 74 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/101-MIPS-BCM63XX-add-USB-device-clock-enable-delay-to-cl.patch: -------------------------------------------------------------------------------- 1 | From 8e9bf528a122741f0171b89c297b63041116d704 Mon Sep 17 00:00:00 2001 2 | From: Florian Fainelli 3 | Date: Mon, 28 Jan 2013 20:06:20 +0100 4 | Subject: [PATCH 02/11] MIPS: BCM63XX: add USB device clock enable delay to 5 | clock code 6 | 7 | This patch adds the required 10 micro seconds delay to the USB device 8 | clock enable operation. Put this where the correct clock knowledege is, 9 | which is in the clock code, and remove this delay from the bcm63xx_udc 10 | gadget driver where it was before. 11 | 12 | Signed-off-by: Florian Fainelli 13 | --- 14 | arch/mips/bcm63xx/clk.c | 5 +++++ 15 | drivers/usb/gadget/bcm63xx_udc.c | 1 - 16 | 2 files changed, 5 insertions(+), 1 deletion(-) 17 | 18 | --- a/arch/mips/bcm63xx/clk.c 19 | +++ b/arch/mips/bcm63xx/clk.c 20 | @@ -236,6 +236,11 @@ static void usbd_set(struct clk *clk, in 21 | bcm_hwclock_set(CKCTL_6362_USBD_EN, enable); 22 | else if (BCMCPU_IS_6368()) 23 | bcm_hwclock_set(CKCTL_6368_USBD_EN, enable); 24 | + else 25 | + return; 26 | + 27 | + if (enable) 28 | + udelay(10); 29 | } 30 | 31 | static struct clk clk_usbd = { 32 | --- a/drivers/usb/gadget/udc/bcm63xx_udc.c 33 | +++ b/drivers/usb/gadget/udc/bcm63xx_udc.c 34 | @@ -400,7 +400,6 @@ static inline void set_clocks(struct bcm 35 | if (is_enabled) { 36 | clk_enable(udc->usbh_clk); 37 | clk_enable(udc->usbd_clk); 38 | - udelay(10); 39 | } else { 40 | clk_disable(udc->usbd_clk); 41 | clk_disable(udc->usbh_clk); 42 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/373-MIPS-BCM63XX-register-interrupt-controllers-through-.patch: -------------------------------------------------------------------------------- 1 | From 8a0803979163c647736cb234ee1620c049c4915c Mon Sep 17 00:00:00 2001 2 | From: Jonas Gorski 3 | Date: Mon, 1 Dec 2014 00:20:07 +0100 4 | Subject: [PATCH 5/5] MIPS: BCM63XX: register interrupt controllers through DT 5 | 6 | Signed-off-by: Jonas Gorski 7 | --- 8 | arch/mips/bcm63xx/irq.c | 12 ++++++++++++ 9 | 1 file changed, 12 insertions(+) 10 | 11 | --- a/arch/mips/bcm63xx/irq.c 12 | +++ b/arch/mips/bcm63xx/irq.c 13 | @@ -14,6 +14,8 @@ 14 | #include 15 | #include 16 | #include 17 | +#include 18 | +#include 19 | #include 20 | #include 21 | #include 22 | @@ -21,6 +23,9 @@ 23 | #include 24 | #include 25 | 26 | +IRQCHIP_DECLARE(mips_cpu_intc, "mti,cpu-interrupt-controller", 27 | + mips_cpu_irq_of_init); 28 | + 29 | void __init arch_init_irq(void) 30 | { 31 | void __iomem *periph_bases[2]; 32 | @@ -29,6 +34,13 @@ void __init arch_init_irq(void) 33 | int periph_irqs[2] = { 2, 3 }; 34 | int ext_irqs[6]; 35 | 36 | +#ifdef CONFIG_OF 37 | + if (initial_boot_params) { 38 | + irqchip_init(); 39 | + return; 40 | + } 41 | +#endif 42 | + 43 | periph_bases[0] = (void __iomem *)bcm63xx_regset_address(RSET_PERF); 44 | periph_bases[1] = (void __iomem *)bcm63xx_regset_address(RSET_PERF); 45 | ext_intc_bases[0] = (void __iomem *)bcm63xx_regset_address(RSET_PERF); 46 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6348-telsey-cpva502plus.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6348.dtsi" 2 | 3 | #include 4 | 5 | / { 6 | model = "Telsey CPVA502+"; 7 | compatible = "telsey,cpva502plus", "brcm,bcm6348"; 8 | 9 | chosen { 10 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 11 | stdout-path = "serial0:115200n8"; 12 | }; 13 | 14 | keys { 15 | compatible = "gpio-keys-polled"; 16 | #address-cells = <1>; 17 | #size-cells = <0>; 18 | poll-interval = <20>; 19 | 20 | reset { 21 | label = "reset"; 22 | gpios = <&pinctrl 36 1>; 23 | linux,code = ; 24 | debounce-interval = <60>; 25 | }; 26 | }; 27 | 28 | leds { 29 | compatible = "gpio-leds"; 30 | 31 | phone_green { 32 | label = "green:phone"; 33 | gpios = <&pinctrl 0 1>; 34 | }; 35 | 36 | link_amber { 37 | label = "amber:link"; 38 | gpios = <&pinctrl 5 1>; 39 | }; 40 | }; 41 | }; 42 | 43 | &pflash { 44 | status = "okay"; 45 | 46 | partitions { 47 | compatible = "fixed-partitions"; 48 | #address-cells = <1>; 49 | #size-cells = <1>; 50 | 51 | cfe@0 { 52 | label = "CFE"; 53 | reg = <0x000000 0x010000>; 54 | read-only; 55 | }; 56 | 57 | linux@10000 { 58 | label = "linux"; 59 | reg = <0x010000 0x3e0000>; 60 | compatible = "brcm,bcm963xx-imagetag"; 61 | }; 62 | 63 | nvram@3f0000 { 64 | label = "nvram"; 65 | reg = <0x3f0000 0x010000>; 66 | }; 67 | }; 68 | }; 69 | 70 | &pinctrl { 71 | pinctrl-names = "default"; 72 | pinctrl-0 = <&pinctrl_pci &pinctrl_ext_mii>; 73 | }; 74 | 75 | &uart0 { 76 | status = "okay"; 77 | }; 78 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6359-huawei-echolife-hg520v.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6358.dtsi" 2 | 3 | #include 4 | 5 | / { 6 | model = "Huawei EchoLife HG520v"; 7 | compatible = "huawei,echolife-hg520v", "brcm,bcm6359", "brcm,bcm6358"; 8 | 9 | aliases { 10 | led-boot = &led_inet_green; 11 | led-failsafe = &led_inet_green; 12 | led-running = &led_inet_green; 13 | led-upgrade = &led_inet_green; 14 | }; 15 | 16 | chosen { 17 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 18 | stdout-path = "serial0:115200n8"; 19 | }; 20 | 21 | keys { 22 | compatible = "gpio-keys-polled"; 23 | #address-cells = <1>; 24 | #size-cells = <0>; 25 | poll-interval = <20>; 26 | 27 | reset { 28 | label = "reset"; 29 | gpios = <&pinctrl 37 1>; 30 | linux,code = ; 31 | debounce-interval = <60>; 32 | }; 33 | }; 34 | 35 | leds { 36 | compatible = "gpio-leds"; 37 | 38 | led_inet_green: inet_green { 39 | label = "green:net"; 40 | gpios = <&pinctrl 32 1>; 41 | }; 42 | }; 43 | }; 44 | 45 | &pflash { 46 | status = "okay"; 47 | 48 | partitions { 49 | compatible = "fixed-partitions"; 50 | #address-cells = <1>; 51 | #size-cells = <1>; 52 | 53 | cfe@0 { 54 | label = "CFE"; 55 | reg = <0x000000 0x010000>; 56 | read-only; 57 | }; 58 | 59 | linux@10000 { 60 | label = "linux"; 61 | reg = <0x010000 0x3e0000>; 62 | compatible = "brcm,bcm963xx-imagetag"; 63 | }; 64 | 65 | nvram@3f0000 { 66 | label = "nvram"; 67 | reg = <0x3f0000 0x010000>; 68 | }; 69 | }; 70 | }; 71 | 72 | &uart0 { 73 | status = "okay"; 74 | }; 75 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/mips/bcm63xx/clk.c 2 | +++ b/arch/mips/bcm63xx/clk.c 3 | @@ -180,7 +180,11 @@ static struct clk clk_swpkt_usb = { 4 | */ 5 | static void enetsw_set(struct clk *clk, int enable) 6 | { 7 | - if (BCMCPU_IS_6328()) { 8 | + if (BCMCPU_IS_6318()) { 9 | + bcm_hwclock_set(CKCTL_6318_ROBOSW250_EN | 10 | + CKCTL_6318_ROBOSW025_EN, enable); 11 | + bcm_ub_hwclock_set(UB_CKCTL_6318_ROBOSW_EN, enable); 12 | + } else if (BCMCPU_IS_6328()) { 13 | bcm_hwclock_set(CKCTL_6328_ROBOSW_EN, enable); 14 | } else if (BCMCPU_IS_6362()) { 15 | bcm_hwclock_set(CKCTL_6362_ROBOSW_EN, enable); 16 | @@ -234,18 +238,22 @@ static struct clk clk_pcm = { 17 | */ 18 | static void usbh_set(struct clk *clk, int enable) 19 | { 20 | - if (BCMCPU_IS_6328()) 21 | + if (BCMCPU_IS_6318()) { 22 | + bcm_hwclock_set(CKCTL_6318_USB_EN, enable); 23 | + bcm_ub_hwclock_set(UB_CKCTL_6318_USB_EN, enable); 24 | + } else if (BCMCPU_IS_6328()) { 25 | bcm_hwclock_set(CKCTL_6328_USBH_EN, enable); 26 | - else if (BCMCPU_IS_6348()) 27 | + } else if (BCMCPU_IS_6348()) { 28 | bcm_hwclock_set(CKCTL_6348_USBH_EN, enable); 29 | - else if (BCMCPU_IS_6362()) 30 | + } else if (BCMCPU_IS_6362()) { 31 | bcm_hwclock_set(CKCTL_6362_USBH_EN, enable); 32 | - else if (BCMCPU_IS_6368()) 33 | + } else if (BCMCPU_IS_6368()) { 34 | bcm_hwclock_set(CKCTL_6368_USBH_EN, enable); 35 | - else if (BCMCPU_IS_63268()) 36 | + } else if (BCMCPU_IS_63268()) { 37 | bcm_hwclock_set(CKCTL_63268_USBH_EN, enable); 38 | - else 39 | + } else { 40 | return; 41 | + } 42 | 43 | if (enable) 44 | msleep(100); 45 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6348-brcm-bcm96348gw-10.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6348.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Broadcom BCM96348GW-10 reference board"; 8 | compatible = "brcm,bcm96348gw-10", "brcm,bcm6348"; 9 | 10 | chosen { 11 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 12 | stdout-path = "serial0:115200n8"; 13 | }; 14 | 15 | keys { 16 | compatible = "gpio-keys-polled"; 17 | #address-cells = <1>; 18 | #size-cells = <0>; 19 | poll-interval = <20>; 20 | 21 | reset { 22 | label = "reset"; 23 | gpios = <&pinctrl 6 1>; 24 | linux,code = ; 25 | debounce-interval = <60>; 26 | }; 27 | }; 28 | 29 | leds { 30 | compatible = "gpio-leds"; 31 | 32 | power_green { 33 | function = LED_FUNCTION_POWER; 34 | color = ; 35 | gpios = <&pinctrl 0 1>; 36 | default-state = "on"; 37 | }; 38 | stop_green { 39 | label = "green:stop"; 40 | gpios = <&pinctrl 1 1>; 41 | }; 42 | adsl_fail_green { 43 | label = "green:adsl-fail"; 44 | gpios = <&pinctrl 2 1>; 45 | }; 46 | ppp_green { 47 | label = "green:ppp"; 48 | gpios = <&pinctrl 3 1>; 49 | }; 50 | ppp_fail_green { 51 | label = "green:ppp-fail"; 52 | gpios = <&pinctrl 4 1>; 53 | }; 54 | }; 55 | }; 56 | 57 | &pflash { 58 | status = "okay"; 59 | 60 | partitions { 61 | compatible = "brcm,bcm963xx-cfe-nor-partitions"; 62 | }; 63 | }; 64 | 65 | &pinctrl { 66 | pinctrl-names = "default"; 67 | pinctrl-0 = <&pinctrl_pci &pinctrl_ext_mii &pinctrl_mii_pccard>; 68 | }; 69 | 70 | &uart0 { 71 | status = "okay"; 72 | }; 73 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6328-brcm-bcm96328avng.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6328.dtsi" 2 | 3 | #include 4 | 5 | / { 6 | model = "Broadcom BCM96328avng reference board"; 7 | compatible = "brcm,bcm96328avng", "brcm,bcm6328"; 8 | 9 | aliases { 10 | led-boot = &led_power; 11 | led-failsafe = &led_power; 12 | led-running = &led_power; 13 | led-upgrade = &led_power; 14 | }; 15 | 16 | chosen { 17 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 18 | stdout-path = "serial0:115200n8"; 19 | }; 20 | 21 | leds { 22 | compatible = "gpio-leds"; 23 | 24 | inet_fail { 25 | label = "internet-fail"; 26 | gpios = <&pinctrl 2 1>; 27 | }; 28 | dsl { 29 | label = "dsl"; 30 | gpios = <&pinctrl 3 1>; 31 | }; 32 | led_power: power { 33 | label = "power"; 34 | gpios = <&pinctrl 4 1>; 35 | default-state = "on"; 36 | }; 37 | power_fail { 38 | label = "power-fail"; 39 | gpios = <&pinctrl 8 1>; 40 | }; 41 | wps { 42 | label = "wps"; 43 | gpios = <&pinctrl 9 1>; 44 | }; 45 | inet { 46 | label = "internet"; 47 | gpios = <&pinctrl 11 1>; 48 | }; 49 | }; 50 | }; 51 | 52 | &hsspi { 53 | status = "okay"; 54 | 55 | flash@0 { 56 | compatible = "jedec,spi-nor"; 57 | spi-max-frequency = <16666667>; 58 | spi-tx-bus-width = <2>; 59 | spi-rx-bus-width = <2>; 60 | reg = <0>; 61 | 62 | #address-cells = <1>; 63 | #size-cells = <1>; 64 | 65 | partitions { 66 | compatible = "brcm,bcm963xx-cfe-nor-partitions"; 67 | }; 68 | }; 69 | }; 70 | 71 | &pinctrl { 72 | pinctrl-names = "default"; 73 | pinctrl-0 = <&pinctrl_usb_port1_device>; 74 | }; 75 | 76 | &uart0 { 77 | status = "okay"; 78 | }; 79 | -------------------------------------------------------------------------------- /oxnas/patches-5.15/320-oxnas-phy-pcie.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/arm/boot/dts/ox820.dtsi 2 | +++ b/arch/arm/boot/dts/ox820.dtsi 3 | @@ -247,6 +247,15 @@ 4 | }; 5 | }; 6 | 7 | + pcie_phy: pcie-phy@a00000 { 8 | + compatible = "oxsemi,ox820-pcie-phy"; 9 | + reg = <0xa00000 0x10>; 10 | + #phy-cells = <0>; 11 | + resets = <&reset RESET_PCIEPHY>; 12 | + reset-names = "phy"; 13 | + status = "disabled"; 14 | + }; 15 | + 16 | sys: sys-ctrl@e00000 { 17 | compatible = "oxsemi,ox820-sys-ctrl", "syscon", "simple-mfd"; 18 | reg = <0xe00000 0x200000>; 19 | --- a/drivers/phy/Kconfig 20 | +++ b/drivers/phy/Kconfig 21 | @@ -35,6 +35,13 @@ config PHY_LPC18XX_USB_OTG 22 | This driver is need for USB0 support on LPC18xx/43xx and takes 23 | care of enabling and clock setup. 24 | 25 | +config PHY_OXNAS 26 | + tristate "Oxford Semi. OX820 PCI-E PHY support" 27 | + depends on HAS_IOMEM && OF && (ARM || COMPILE_TEST) 28 | + select GENERIC_PHY 29 | + help 30 | + This option enables support for OXNAS OX820 SoC PCIE PHY. 31 | + 32 | config PHY_PISTACHIO_USB 33 | tristate "IMG Pistachio USB2.0 PHY driver" 34 | depends on MIPS || COMPILE_TEST 35 | --- a/drivers/phy/Makefile 36 | +++ b/drivers/phy/Makefile 37 | @@ -7,6 +7,7 @@ obj-$(CONFIG_GENERIC_PHY) += phy-core.o 38 | obj-$(CONFIG_GENERIC_PHY_MIPI_DPHY) += phy-core-mipi-dphy.o 39 | obj-$(CONFIG_PHY_CAN_TRANSCEIVER) += phy-can-transceiver.o 40 | obj-$(CONFIG_PHY_LPC18XX_USB_OTG) += phy-lpc18xx-usb-otg.o 41 | +obj-$(CONFIG_PHY_OXNAS) += phy-oxnas-pcie.o 42 | obj-$(CONFIG_PHY_XGENE) += phy-xgene.o 43 | obj-$(CONFIG_PHY_PISTACHIO_USB) += phy-pistachio-usb.o 44 | obj-$(CONFIG_USB_LGM_PHY) += phy-lgm-usb.o 45 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6318-brcm-bcm96318ref.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6318.dtsi" 2 | 3 | #include 4 | 5 | / { 6 | model = "Broadcom BCM96318REF reference board"; 7 | compatible = "brcm,bcm96318ref", "brcm,bcm6318"; 8 | 9 | chosen { 10 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 11 | stdout-path = "serial0:115200n8"; 12 | }; 13 | 14 | keys { 15 | compatible = "gpio-keys-polled"; 16 | #address-cells = <1>; 17 | #size-cells = <0>; 18 | poll-interval = <20>; 19 | 20 | wps { 21 | label = "wps"; 22 | gpios = <&pinctrl 33 1>; 23 | linux,code = ; 24 | debounce-interval = <60>; 25 | }; 26 | 27 | reset { 28 | label = "reset"; 29 | gpios = <&pinctrl 34 1>; 30 | linux,code = ; 31 | debounce-interval = <60>; 32 | }; 33 | }; 34 | 35 | leds { 36 | compatible = "gpio-leds"; 37 | 38 | inet { 39 | label = "green:inet"; 40 | gpios = <&pinctrl 8 1>; 41 | }; 42 | 43 | inet_fail { 44 | label = "red:inet-fail"; 45 | gpios = <&pinctrl 9 1>; 46 | }; 47 | 48 | post_failed { 49 | label = "red:post-failed"; 50 | gpios = <&pinctrl 11 1>; 51 | }; 52 | }; 53 | }; 54 | 55 | &hsspi { 56 | status = "okay"; 57 | 58 | flash@0 { 59 | compatible = "jedec,spi-nor"; 60 | spi-max-frequency = <62500000>; 61 | spi-tx-bus-width = <2>; 62 | spi-rx-bus-width = <2>; 63 | reg = <0>; 64 | 65 | #address-cells = <1>; 66 | #size-cells = <1>; 67 | 68 | partitions { 69 | compatible = "brcm,bcm963xx-cfe-nor-partitions"; 70 | }; 71 | }; 72 | }; 73 | 74 | &pinctrl { 75 | pinctrl-names = "default"; 76 | pinctrl-0 = <&pinctrl_usb_pwron>; 77 | }; 78 | 79 | &uart0 { 80 | status = "okay"; 81 | }; 82 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6358-d-link-dva-g3810bn-tl.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6358.dtsi" 2 | 3 | #include 4 | 5 | / { 6 | model = "D-Link DVA-G3810BN/TL"; 7 | compatible = "d-link,dva-g3810bn-tl", "brcm,bcm6358"; 8 | 9 | chosen { 10 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 11 | stdout-path = "serial0:115200n8"; 12 | }; 13 | 14 | keys { 15 | compatible = "gpio-keys-polled"; 16 | #address-cells = <1>; 17 | #size-cells = <0>; 18 | poll-interval = <20>; 19 | 20 | reset { 21 | label = "reset"; 22 | gpios = <&pinctrl 34 1>; 23 | linux,code = ; 24 | debounce-interval = <60>; 25 | }; 26 | }; 27 | 28 | leds { 29 | compatible = "gpio-leds"; 30 | 31 | voip { 32 | label = "voip"; 33 | gpios = <&pinctrl 1 0>; 34 | }; 35 | power { 36 | label = "power"; 37 | gpios = <&pinctrl 4 0>; 38 | default-state = "on"; 39 | }; 40 | stop { 41 | label = "stop"; 42 | gpios = <&pinctrl 5 0>; 43 | }; 44 | dsl { 45 | label = "dsl"; 46 | gpios = <&pinctrl 22 1>; 47 | }; 48 | inet { 49 | label = "internet"; 50 | gpios = <&pinctrl 23 1>; 51 | }; 52 | }; 53 | }; 54 | 55 | &pflash { 56 | status = "okay"; 57 | 58 | partitions { 59 | compatible = "fixed-partitions"; 60 | #address-cells = <1>; 61 | #size-cells = <1>; 62 | 63 | cfe@0 { 64 | label = "CFE"; 65 | reg = <0x000000 0x010000>; 66 | read-only; 67 | }; 68 | 69 | linux@10000 { 70 | label = "linux"; 71 | reg = <0x010000 0x7e0000>; 72 | compatible = "brcm,bcm963xx-imagetag"; 73 | }; 74 | 75 | nvram@7f0000 { 76 | label = "nvram"; 77 | reg = <0x7f0000 0x010000>; 78 | }; 79 | }; 80 | }; 81 | 82 | &uart0 { 83 | status = "okay"; 84 | }; 85 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/513-board-bcm6338.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c 2 | +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c 3 | @@ -1021,6 +1021,32 @@ static struct board_info __initdata boar 4 | .force_duplex_full = 1, 5 | }, 6 | }; 7 | + 8 | +static struct board_info __initdata board_96338w2_e7t = { 9 | + .name = "96338W2_E7T", 10 | + .expected_cpu_id = 0x6338, 11 | + 12 | + .has_enet0 = 1, 13 | + .enet0 = { 14 | + .has_phy = 1, 15 | + .phy_id = 0, 16 | + .force_speed_100 = 1, 17 | + .force_duplex_full = 1, 18 | + }, 19 | +}; 20 | + 21 | +static struct board_info __initdata board_rta1320_16m = { 22 | + .name = "RTA1320_16M", 23 | + .expected_cpu_id = 0x6338, 24 | + 25 | + .has_enet0 = 1, 26 | + .enet0 = { 27 | + .has_phy = 1, 28 | + .phy_id = 0, 29 | + .force_speed_100 = 1, 30 | + .force_duplex_full = 1, 31 | + }, 32 | +}; 33 | #endif /* CONFIG_BCM63XX_CPU_6338 */ 34 | 35 | /* 36 | @@ -1352,6 +1378,8 @@ static const struct board_info __initcon 37 | #ifdef CONFIG_BCM63XX_CPU_6338 38 | &board_96338gw, 39 | &board_96338w, 40 | + &board_96338w2_e7t, 41 | + &board_rta1320_16m, 42 | #endif /* CONFIG_BCM63XX_CPU_6338 */ 43 | #ifdef CONFIG_BCM63XX_CPU_6345 44 | &board_96345gw2, 45 | @@ -1408,6 +1436,8 @@ static struct of_device_id const bcm963x 46 | #ifdef CONFIG_BCM63XX_CPU_6338 47 | { .compatible = "brcm,bcm96338gw", .data = &board_96338gw, }, 48 | { .compatible = "brcm,bcm96338w", .data = &board_96338w, }, 49 | + { .compatible = "d-link,dsl-2640u", .data = &board_96338w2_e7t, }, 50 | + { .compatible = "dynalink,rta1320", .data = &board_rta1320_16m, }, 51 | #endif /* CONFIG_BCM63XX_CPU_6338 */ 52 | #ifdef CONFIG_BCM63XX_CPU_6345 53 | { .compatible = "brcm,bcm96345gw2", .data = &board_96345gw2, }, 54 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6358-sfr-neufbox-4.dtsi: -------------------------------------------------------------------------------- 1 | #include "bcm6358.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | chosen { 8 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 9 | stdout-path = "serial0:115200n8"; 10 | }; 11 | 12 | keys { 13 | compatible = "gpio-keys-polled"; 14 | #address-cells = <1>; 15 | #size-cells = <0>; 16 | poll-interval = <20>; 17 | 18 | service { 19 | label = "service"; 20 | gpios = <&pinctrl 27 1>; 21 | linux,code = ; 22 | debounce-interval = <60>; 23 | }; 24 | 25 | clip { 26 | label = "clip"; 27 | gpios = <&pinctrl 31 1>; 28 | linux,code = ; 29 | debounce-interval = <60>; 30 | }; 31 | 32 | reset { 33 | label = "reset"; 34 | gpios = <&pinctrl 34 1>; 35 | linux,code = ; 36 | debounce-interval = <60>; 37 | }; 38 | 39 | wps { 40 | label = "wps"; 41 | gpios = <&pinctrl 37 1>; 42 | linux,code = ; 43 | debounce-interval = <60>; 44 | }; 45 | }; 46 | }; 47 | 48 | &leds { 49 | status = "okay"; 50 | 51 | pinctrl-names = "default"; 52 | pinctrl-0 = <&pinctrl_serial_led>; 53 | 54 | led@0 { 55 | reg = <0>; 56 | active-low; 57 | function = LED_FUNCTION_ALARM; 58 | color = ; 59 | }; 60 | 61 | led@2 { 62 | reg = <2>; 63 | active-low; 64 | label = "white:tv"; 65 | }; 66 | 67 | led@3 { 68 | reg = <3>; 69 | active-low; 70 | label = "white:tel"; 71 | }; 72 | 73 | led@4 { 74 | reg = <4>; 75 | active-low; 76 | label = "white:adsl"; 77 | }; 78 | }; 79 | 80 | &pflash { 81 | status = "okay"; 82 | 83 | partitions { 84 | compatible = "brcm,bcm963xx-cfe-nor-partitions"; 85 | }; 86 | }; 87 | 88 | &uart0 { 89 | status = "okay"; 90 | }; 91 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/383-bcm63xx_select_pinctrl.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/mips/bcm63xx/Kconfig 2 | +++ b/arch/mips/bcm63xx/Kconfig 3 | @@ -25,6 +25,8 @@ config BCM63XX_CPU_6318 4 | select HAVE_PCI 5 | select BCM63XX_OHCI 6 | select BCM63XX_EHCI 7 | + select PINCTRL 8 | + select PINCTRL_BRCM6318 9 | 10 | config BCM63XX_CPU_6328 11 | bool "support 6328 CPU" 12 | @@ -32,6 +34,8 @@ config BCM63XX_CPU_6328 13 | select HAVE_PCI 14 | select BCM63XX_OHCI 15 | select BCM63XX_EHCI 16 | + select PINCTRL 17 | + select PINCTRL_BRCM6328 18 | 19 | config BCM63XX_CPU_6338 20 | bool "support 6338 CPU" 21 | @@ -47,6 +51,8 @@ config BCM63XX_CPU_6348 22 | select SYS_HAS_CPU_BMIPS32_3300 23 | select HAVE_PCI 24 | select BCM63XX_OHCI 25 | + select PINCTRL 26 | + select PINCTRL_BRCM6348 27 | 28 | config BCM63XX_CPU_6358 29 | bool "support 6358 CPU" 30 | @@ -54,6 +60,8 @@ config BCM63XX_CPU_6358 31 | select HAVE_PCI 32 | select BCM63XX_OHCI 33 | select BCM63XX_EHCI 34 | + select PINCTRL 35 | + select PINCTRL_BRCM6358 36 | 37 | config BCM63XX_CPU_6362 38 | bool "support 6362 CPU" 39 | @@ -61,6 +69,8 @@ config BCM63XX_CPU_6362 40 | select HAVE_PCI 41 | select BCM63XX_OHCI 42 | select BCM63XX_EHCI 43 | + select PINCTRL 44 | + select PINCTRL_BRCM6362 45 | 46 | config BCM63XX_CPU_6368 47 | bool "support 6368 CPU" 48 | @@ -68,6 +78,8 @@ config BCM63XX_CPU_6368 49 | select HAVE_PCI 50 | select BCM63XX_OHCI 51 | select BCM63XX_EHCI 52 | + select PINCTRL 53 | + select PINCTRL_BRCM6368 54 | 55 | config BCM63XX_CPU_63268 56 | bool "support 63268 CPU" 57 | @@ -75,6 +87,8 @@ config BCM63XX_CPU_63268 58 | select HAVE_PCI 59 | select BCM63XX_OHCI 60 | select BCM63XX_EHCI 61 | + select PINCTRL 62 | + select PINCTRL_BRCM63268 63 | endmenu 64 | 65 | source "arch/mips/bcm63xx/boards/Kconfig" 66 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/333-MIPS-BCM63XX-detect-BCM6362-variants.patch: -------------------------------------------------------------------------------- 1 | From 04458c3db8eb79da21ecde40ab36a1dde52bef06 Mon Sep 17 00:00:00 2001 2 | From: Jonas Gorski 3 | Date: Sat, 7 Dec 2013 14:33:28 +0100 4 | Subject: [PATCH 23/45] MIPS: BCM63XX: detect BCM6362 variants 5 | 6 | --- 7 | arch/mips/bcm63xx/cpu.c | 8 ++++++++ 8 | arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 3 +++ 9 | 2 files changed, 11 insertions(+) 10 | 11 | --- a/arch/mips/bcm63xx/cpu.c 12 | +++ b/arch/mips/bcm63xx/cpu.c 13 | @@ -383,6 +383,14 @@ void __init bcm63xx_cpu_init(void) 14 | case BCM6362_CPU_ID: 15 | bcm63xx_regs_base = bcm6362_regs_base; 16 | bcm63xx_irqs = bcm6362_irqs; 17 | + 18 | + if (varid == 1) 19 | + bcm63xx_cpu_variant = BCM6362_CPU_ID; 20 | + else if (varid == 2) 21 | + bcm63xx_cpu_variant = BCM6361_CPU_ID; 22 | + else 23 | + pr_warn("unknown BCM6362 variant: %x\n", varid); 24 | + 25 | break; 26 | case BCM6368_CPU_ID: 27 | bcm63xx_regs_base = bcm6368_regs_base; 28 | --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h 29 | +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h 30 | @@ -18,6 +18,7 @@ 31 | #define BCM6345_CPU_ID 0x6345 32 | #define BCM6348_CPU_ID 0x6348 33 | #define BCM6358_CPU_ID 0x6358 34 | +#define BCM6361_CPU_ID 0x6361 35 | #define BCM6362_CPU_ID 0x6362 36 | #define BCM6368_CPU_ID 0x6368 37 | 38 | @@ -100,6 +101,8 @@ static inline u16 __pure bcm63xx_get_cpu 39 | (bcm63xx_get_cpu_variant() == BCM6348_CPU_ID) 40 | #define BCMCPU_VARIANT_IS_6358() \ 41 | (bcm63xx_get_cpu_cariant() == BCM6358_CPU_ID) 42 | +#define BCMCPU_VARIANT_IS_6361() \ 43 | + (bcm63xx_get_cpu_variant() == BCM6361_CPU_ID) 44 | #define BCMCPU_VARIANT_IS_6362() \ 45 | (bcm63xx_get_cpu_variant() == BCM6362_CPU_ID) 46 | #define BCMCPU_VARIANT_IS_6368() \ 47 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6348-brcm-bcm96348gw.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6348.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Broadcom BCM96348GW reference board"; 8 | compatible = "brcm,bcm96348gw", "brcm,bcm6348"; 9 | 10 | aliases { 11 | led-boot = &led_power_green; 12 | led-failsafe = &led_power_green; 13 | led-running = &led_power_green; 14 | led-upgrade = &led_power_green; 15 | }; 16 | 17 | chosen { 18 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 19 | stdout-path = "serial0:115200n8"; 20 | }; 21 | 22 | keys { 23 | compatible = "gpio-keys-polled"; 24 | #address-cells = <1>; 25 | #size-cells = <0>; 26 | poll-interval = <20>; 27 | 28 | reset { 29 | label = "reset"; 30 | gpios = <&pinctrl 36 1>; 31 | linux,code = ; 32 | debounce-interval = <60>; 33 | }; 34 | }; 35 | 36 | leds { 37 | compatible = "gpio-leds"; 38 | 39 | led_power_green: power_green { 40 | function = LED_FUNCTION_POWER; 41 | color = ; 42 | gpios = <&pinctrl 0 1>; 43 | default-state = "on"; 44 | }; 45 | stop_green { 46 | label = "green:stop"; 47 | gpios = <&pinctrl 1 1>; 48 | }; 49 | adsl_fail_green { 50 | label = "green:adsl-fail"; 51 | gpios = <&pinctrl 2 1>; 52 | }; 53 | ppp_green { 54 | label = "green:ppp"; 55 | gpios = <&pinctrl 3 1>; 56 | }; 57 | ppp_fail_green { 58 | label = "green:ppp-fail"; 59 | gpios = <&pinctrl 4 1>; 60 | }; 61 | }; 62 | }; 63 | 64 | &pflash { 65 | status = "okay"; 66 | 67 | partitions { 68 | compatible = "brcm,bcm963xx-cfe-nor-partitions"; 69 | }; 70 | }; 71 | 72 | &pinctrl { 73 | pinctrl-names = "default"; 74 | pinctrl-0 = <&pinctrl_pci &pinctrl_ext_mii>; 75 | }; 76 | 77 | &uart0 { 78 | status = "okay"; 79 | }; 80 | -------------------------------------------------------------------------------- /ath25/patches-5.15/210-reset_button.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/mips/ath25/Makefile 2 | +++ b/arch/mips/ath25/Makefile 3 | @@ -8,7 +8,7 @@ 4 | # Copyright (C) 2006-2009 Felix Fietkau 5 | # 6 | 7 | -obj-y += board.o prom.o devices.o 8 | +obj-y += board.o prom.o devices.o reset.o 9 | 10 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 11 | 12 | --- /dev/null 13 | +++ b/arch/mips/ath25/reset.c 14 | @@ -0,0 +1,57 @@ 15 | +#include 16 | +#include 17 | +#include 18 | +#include 19 | +#include 20 | +#include 21 | +#include "devices.h" 22 | + 23 | +static int __init 24 | +ar231x_init_reset(void) 25 | +{ 26 | + struct platform_device *pdev; 27 | + struct gpio_keys_platform_data pdata; 28 | + struct gpio_keys_button *p; 29 | + int err; 30 | + 31 | + if (ath25_board.config->reset_config_gpio == 0xffff) 32 | + return -ENODEV; 33 | + 34 | + p = kzalloc(sizeof(*p), GFP_KERNEL); 35 | + if (!p) 36 | + goto err; 37 | + 38 | + p->desc = "reset"; 39 | + p->type = EV_KEY; 40 | + p->code = KEY_RESTART; 41 | + p->debounce_interval = 60; 42 | + p->gpio = ath25_board.config->reset_config_gpio; 43 | + 44 | + memset(&pdata, 0, sizeof(pdata)); 45 | + pdata.poll_interval = 20; 46 | + pdata.buttons = p; 47 | + pdata.nbuttons = 1; 48 | + 49 | + pdev = platform_device_alloc("gpio-keys-polled", 0); 50 | + if (!pdev) 51 | + goto err_free; 52 | + 53 | + err = platform_device_add_data(pdev, &pdata, sizeof(pdata)); 54 | + if (err) 55 | + goto err_put_pdev; 56 | + 57 | + err = platform_device_add(pdev); 58 | + if (err) 59 | + goto err_put_pdev; 60 | + 61 | + return 0; 62 | + 63 | +err_put_pdev: 64 | + platform_device_put(pdev); 65 | +err_free: 66 | + kfree(p); 67 | +err: 68 | + return -ENOMEM; 69 | +} 70 | + 71 | +device_initcall(ar231x_init_reset); 72 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6348-brcm-bcm96348gw-11.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6348.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Broadcom BCM96348GW-11 reference board"; 8 | compatible = "brcm,bcm96348gw-11", "brcm,bcm6348"; 9 | 10 | aliases { 11 | led-boot = &led_power_green; 12 | led-failsafe = &led_power_green; 13 | led-running = &led_power_green; 14 | led-upgrade = &led_power_green; 15 | }; 16 | 17 | chosen { 18 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 19 | stdout-path = "serial0:115200n8"; 20 | }; 21 | 22 | keys { 23 | compatible = "gpio-keys-polled"; 24 | #address-cells = <1>; 25 | #size-cells = <0>; 26 | poll-interval = <20>; 27 | 28 | reset { 29 | label = "reset"; 30 | gpios = <&pinctrl 33 1>; 31 | linux,code = ; 32 | debounce-interval = <60>; 33 | }; 34 | }; 35 | 36 | leds { 37 | compatible = "gpio-leds"; 38 | 39 | led_power_green: power_green { 40 | function = LED_FUNCTION_POWER; 41 | color = ; 42 | gpios = <&pinctrl 0 1>; 43 | default-state = "on"; 44 | }; 45 | stop_green { 46 | label = "green:stop"; 47 | gpios = <&pinctrl 1 1>; 48 | }; 49 | adsl_fail_green { 50 | label = "green:adsl-fail"; 51 | gpios = <&pinctrl 2 1>; 52 | }; 53 | ppp_green { 54 | label = "green:ppp"; 55 | gpios = <&pinctrl 3 1>; 56 | }; 57 | ppp_fail_green { 58 | label = "green:ppp-fail"; 59 | gpios = <&pinctrl 4 1>; 60 | }; 61 | }; 62 | }; 63 | 64 | &pflash { 65 | status = "okay"; 66 | 67 | partitions { 68 | compatible = "brcm,bcm963xx-cfe-nor-partitions"; 69 | }; 70 | }; 71 | 72 | &pinctrl { 73 | pinctrl-names = "default"; 74 | pinctrl-0 = <&pinctrl_pci &pinctrl_ext_mii &pinctrl_mii_pccard>; 75 | }; 76 | 77 | &uart0 { 78 | status = "okay"; 79 | }; 80 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6318-brcm-bcm96318ref-p300.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6318.dtsi" 2 | 3 | #include 4 | 5 | / { 6 | model = "Broadcom BCM96318REF_P300 reference board"; 7 | compatible = "brcm,bcm96318ref-p300", "brcm,bcm6318"; 8 | 9 | chosen { 10 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 11 | stdout-path = "serial0:115200n8"; 12 | }; 13 | 14 | keys { 15 | compatible = "gpio-keys-polled"; 16 | #address-cells = <1>; 17 | #size-cells = <0>; 18 | poll-interval = <20>; 19 | 20 | wps { 21 | label = "wps"; 22 | gpios = <&pinctrl 33 1>; 23 | linux,code = ; 24 | debounce-interval = <60>; 25 | }; 26 | 27 | reset { 28 | label = "reset"; 29 | gpios = <&pinctrl 34 1>; 30 | linux,code = ; 31 | debounce-interval = <60>; 32 | }; 33 | }; 34 | 35 | leds { 36 | compatible = "gpio-leds"; 37 | 38 | inet { 39 | label = "green:inet"; 40 | gpios = <&pinctrl 8 1>; 41 | }; 42 | 43 | inet_fail { 44 | label = "red:inet-fail"; 45 | gpios = <&pinctrl 9 1>; 46 | }; 47 | 48 | post_failed { 49 | label = "red:post-failed"; 50 | gpios = <&pinctrl 11 1>; 51 | }; 52 | 53 | usb_pwron { 54 | label = "usb-pwron"; 55 | gpios = <&pinctrl 13 1>; 56 | default-state = "on"; 57 | }; 58 | }; 59 | }; 60 | 61 | &hsspi { 62 | status = "okay"; 63 | 64 | flash@0 { 65 | compatible = "jedec,spi-nor"; 66 | spi-max-frequency = <62500000>; 67 | spi-tx-bus-width = <2>; 68 | spi-rx-bus-width = <2>; 69 | reg = <0>; 70 | 71 | #address-cells = <1>; 72 | #size-cells = <1>; 73 | 74 | partitions { 75 | compatible = "brcm,bcm963xx-cfe-nor-partitions"; 76 | }; 77 | }; 78 | }; 79 | 80 | &pinctrl { 81 | pinctrl-names = "default"; 82 | pinctrl-0 = <&pinctrl_usb_pwron>; 83 | }; 84 | 85 | &uart0 { 86 | status = "okay"; 87 | }; 88 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/133-Documentation-add-BCM6348-pincontroller-binding-docu.patch: -------------------------------------------------------------------------------- 1 | From 962c46bf7f43df730e2d3698930e77958cc6b191 Mon Sep 17 00:00:00 2001 2 | From: Jonas Gorski 3 | Date: Wed, 27 Jul 2016 11:35:45 +0200 4 | Subject: [PATCH 04/16] Documentation: add BCM6348 pincontroller binding 5 | documentation 6 | 7 | Add binding documentation for the pincontrol core found in BCM6348 SoCs. 8 | 9 | Signed-off-by: Jonas Gorski 10 | --- 11 | .../bindings/pinctrl/brcm,bcm6348-pinctrl.txt | 32 ++++++++++++++++++++++ 12 | 1 file changed, 32 insertions(+) 13 | create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6348-pinctrl.txt 14 | 15 | --- /dev/null 16 | +++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm6348-pinctrl.txt 17 | @@ -0,0 +1,32 @@ 18 | +* Broadcom BCM6348 pin controller 19 | + 20 | +Required properties: 21 | +- compatible: Must be "brcm,bcm6348-pinctrl". 22 | +- reg: register Specifiers of dirout, dat, mode registers. 23 | +- reg-names: Must be "dirout", "dat", "mode". 24 | +- gpio-controller: Identifies this node as a GPIO controller. 25 | +- #gpio-cells: Must be <2>. 26 | + 27 | +Example: 28 | + 29 | +pinctrl: pin-controller@fffe0080 { 30 | + compatible = "brcm,bcm6348-pinctrl"; 31 | + reg = <0xfffe0080 0x8>, 32 | + <0xfffe0088 0x8>, 33 | + <0xfffe0098 0x4>; 34 | + reg-names = "dirout", "dat", "mode"; 35 | + 36 | + gpio-controller; 37 | + #gpio-cells = <2>; 38 | +}; 39 | + 40 | +Available pins/groups and functions: 41 | + 42 | +name pins functions 43 | +----------------------------------------------------------- 44 | +group0 32-36 ext_mii, diag 45 | +group1 22-31 ext_ephy, mii_snoop, mii_pccard, 46 | + spi_master_uart, utopia, diag 47 | +group2 16-21 pci, diag 48 | +group3 8-15 ext_mii, utopia, diag 49 | +group4 0-7 ext_ephy, mii_snoop, legacy_led, utopia, diag 50 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/430-MIPS-BCM63XX-add-nand-clocks.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/mips/bcm63xx/clk.c 2 | +++ b/arch/mips/bcm63xx/clk.c 3 | @@ -452,6 +452,23 @@ static struct clk clk_pcie = { 4 | }; 5 | 6 | /* 7 | + * NAND clock 8 | + */ 9 | +static void nand_set(struct clk *clk, int enable) 10 | +{ 11 | + if (BCMCPU_IS_6362()) 12 | + bcm_hwclock_set(CKCTL_6362_NAND_EN, enable); 13 | + else if (BCMCPU_IS_6368()) 14 | + bcm_hwclock_set(CKCTL_6368_NAND_EN, enable); 15 | + else if (BCMCPU_IS_63268()) 16 | + bcm_hwclock_set(CKCTL_63268_NAND_EN, enable); 17 | +} 18 | + 19 | +static struct clk clk_nand = { 20 | + .set = nand_set, 21 | +}; 22 | + 23 | +/* 24 | * Internal peripheral clock 25 | */ 26 | static struct clk clk_periph = { 27 | @@ -648,6 +665,7 @@ static struct clk_lookup bcm6362_clks[] 28 | CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll), 29 | CLKDEV_INIT("10001000.spi", "pll", &clk_hsspi_pll), 30 | /* gated clocks */ 31 | + CLKDEV_INIT(NULL, "nand", &clk_nand), 32 | CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), 33 | CLKDEV_INIT(NULL, "usbh", &clk_usbh), 34 | CLKDEV_INIT(NULL, "usbd", &clk_usbd), 35 | @@ -665,6 +683,7 @@ static struct clk_lookup bcm6368_clks[] 36 | CLKDEV_INIT("10000100.serial", "refclk", &clk_periph), 37 | CLKDEV_INIT("10000120.serial", "refclk", &clk_periph), 38 | /* gated clocks */ 39 | + CLKDEV_INIT(NULL, "nand", &clk_nand), 40 | CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), 41 | CLKDEV_INIT(NULL, "usbh", &clk_usbh), 42 | CLKDEV_INIT(NULL, "usbd", &clk_usbd), 43 | @@ -683,6 +702,7 @@ static struct clk_lookup bcm63268_clks[] 44 | CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll), 45 | CLKDEV_INIT("10001000.spi", "pll", &clk_hsspi_pll), 46 | /* gated clocks */ 47 | + CLKDEV_INIT(NULL, "nand", &clk_nand), 48 | CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), 49 | CLKDEV_INIT(NULL, "usbh", &clk_usbh), 50 | CLKDEV_INIT(NULL, "usbd", &clk_usbd), 51 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6348-telsey-magic.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6348.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Alice W-Gate"; 8 | compatible = "telsey,magic", "brcm,bcm6348"; 9 | 10 | chosen { 11 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 12 | stdout-path = "serial0:115200n8"; 13 | }; 14 | 15 | leds { 16 | compatible = "gpio-leds"; 17 | 18 | power { 19 | function = LED_FUNCTION_POWER; 20 | color = ; 21 | gpios = <&pinctrl 0 1>; 22 | default-state = "on"; 23 | }; 24 | 25 | stop { 26 | label = "green:stop"; 27 | gpios = <&pinctrl 1 1>; 28 | }; 29 | 30 | hpna { 31 | label = "green:hpna"; 32 | gpios = <&pinctrl 4 1>; 33 | }; 34 | 35 | status { 36 | label = "green:adsl"; 37 | gpios = <&pinctrl 5 1>; 38 | }; 39 | 40 | voip { 41 | label = "green:voip"; 42 | gpios = <&pinctrl 22 1>; 43 | }; 44 | 45 | wifi { 46 | label = "green:wifi"; 47 | gpios = <&pinctrl 28 0>; 48 | }; 49 | 50 | usb { 51 | function = LED_FUNCTION_USB; 52 | color = ; 53 | gpios = <&pinctrl 35 1>; 54 | }; 55 | }; 56 | }; 57 | 58 | &pflash { 59 | status = "okay"; 60 | 61 | partitions { 62 | compatible = "fixed-partitions"; 63 | #address-cells = <1>; 64 | #size-cells = <1>; 65 | 66 | cfe@0 { 67 | label = "CFE"; 68 | reg = <0x000000 0x010000>; 69 | read-only; 70 | }; 71 | 72 | linux@10000 { 73 | label = "linux"; 74 | reg = <0x010000 0x3e0000>; 75 | compatible = "brcm,bcm963xx-imagetag"; 76 | }; 77 | 78 | nvram@3f0000 { 79 | label = "nvram"; 80 | reg = <0x3f0000 0x010000>; 81 | }; 82 | }; 83 | }; 84 | 85 | &pinctrl { 86 | pinctrl-names = "default"; 87 | pinctrl-0 = <&pinctrl_pci &pinctrl_ext_mii &pinctrl_mii_pccard>; 88 | }; 89 | 90 | &uart0 { 91 | status = "okay"; 92 | }; 93 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/379-MIPS-BCM63XX-provide-a-gpio-lookup-for-the-pcmcia-re.patch: -------------------------------------------------------------------------------- 1 | From 1647cccc871bf43876c3df9852869680880d054c Mon Sep 17 00:00:00 2001 2 | From: Jonas Gorski 3 | Date: Wed, 25 Mar 2015 13:52:02 +0100 4 | Subject: [PATCH 1/2] MIPS: BCM63XX: provide a gpio lookup for the pcmcia 5 | ready gpio 6 | 7 | To prepare for a time when gpiobases don't need to be fixed anymore. 8 | 9 | Signed-off-by: Jonas Gorski 10 | --- 11 | arch/mips/bcm63xx/dev-pcmcia.c | 13 +++++++++++++ 12 | 1 file changed, 13 insertions(+) 13 | 14 | --- a/arch/mips/bcm63xx/dev-pcmcia.c 15 | +++ b/arch/mips/bcm63xx/dev-pcmcia.c 16 | @@ -10,6 +10,7 @@ 17 | #include 18 | #include 19 | #include 20 | +#include 21 | #include 22 | #include 23 | #include 24 | @@ -101,6 +102,14 @@ static const struct { 25 | }, 26 | }; 27 | 28 | +static struct gpiod_lookup_table pcmcia_gpios_table = { 29 | + .dev_id = "bcm63xx_pcmcia.0", 30 | + .table = { 31 | + GPIO_LOOKUP("bcm63xx-gpio.0", 0, "ready", GPIO_ACTIVE_HIGH), 32 | + { }, 33 | + }, 34 | +}; 35 | + 36 | int __init bcm63xx_pcmcia_register(void) 37 | { 38 | int ret, i; 39 | @@ -112,16 +121,20 @@ int __init bcm63xx_pcmcia_register(void) 40 | switch (bcm63xx_get_cpu_id()) { 41 | case BCM6348_CPU_ID: 42 | pd.ready_gpio = 22; 43 | + pcmcia_gpios_table.table[0].chip_hwnum = 22; 44 | break; 45 | 46 | case BCM6358_CPU_ID: 47 | pd.ready_gpio = 18; 48 | + pcmcia_gpios_table.table[0].chip_hwnum = 18; 49 | break; 50 | 51 | default: 52 | return -ENODEV; 53 | } 54 | 55 | + gpiod_add_lookup_table(&pcmcia_gpios_table); 56 | + 57 | pcmcia_resources[0].start = bcm63xx_regset_address(RSET_PCMCIA); 58 | pcmcia_resources[0].end = pcmcia_resources[0].start + 59 | RSET_PCMCIA_SIZE - 1; 60 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6348-netgear-dg834g-v4.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6348.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Netgear DG834G v4"; 8 | compatible = "netgear,dg834g-v4", "brcm,bcm6348"; 9 | 10 | chosen { 11 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 12 | stdout-path = "serial0:115200n8"; 13 | }; 14 | 15 | keys { 16 | compatible = "gpio-keys-polled"; 17 | #address-cells = <1>; 18 | #size-cells = <0>; 19 | poll-interval = <20>; 20 | 21 | reset { 22 | label = "reset"; 23 | gpios = <&pinctrl 6 1>; 24 | linux,code = ; 25 | debounce-interval = <60>; 26 | }; 27 | }; 28 | 29 | leds { 30 | compatible = "gpio-leds"; 31 | 32 | power_green { 33 | function = LED_FUNCTION_POWER; 34 | color = ; 35 | gpios = <&pinctrl 0 1>; 36 | default-state = "on"; 37 | }; 38 | status { 39 | function = LED_FUNCTION_POWER; 40 | color = ; 41 | gpios = <&pinctrl 1 1>; 42 | }; 43 | inet_green { 44 | label = "adsl"; 45 | gpios = <&pinctrl 2 1>; 46 | }; 47 | inet_red { 48 | label = "internet"; 49 | gpios = <&pinctrl 3 1>; 50 | }; 51 | }; 52 | }; 53 | 54 | &pflash { 55 | status = "okay"; 56 | 57 | partitions { 58 | compatible = "fixed-partitions"; 59 | #address-cells = <1>; 60 | #size-cells = <1>; 61 | 62 | cfe@0 { 63 | label = "CFE"; 64 | reg = <0x000000 0x010000>; 65 | read-only; 66 | }; 67 | 68 | linux@10000 { 69 | label = "linux"; 70 | reg = <0x010000 0x3e0000>; 71 | compatible = "brcm,bcm963xx-imagetag"; 72 | }; 73 | 74 | nvram@3f0000 { 75 | label = "nvram"; 76 | reg = <0x3f0000 0x010000>; 77 | }; 78 | }; 79 | }; 80 | 81 | &pinctrl { 82 | pinctrl-names = "default"; 83 | pinctrl-0 = <&pinctrl_pci &pinctrl_ext_mii>; 84 | }; 85 | 86 | &uart0 { 87 | status = "okay"; 88 | }; 89 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/334-MIPS-BCM63XX-detect-BCM6368-variants.patch: -------------------------------------------------------------------------------- 1 | From 825cc67e56b5e624a05f6850a86d91508b786848 Mon Sep 17 00:00:00 2001 2 | From: Jonas Gorski 3 | Date: Sat, 7 Dec 2013 14:36:56 +0100 4 | Subject: [PATCH 24/44] MIPS: BCM63XX: detect BCM6368 variants 5 | 6 | The DSL-less BCM6368 variant BCM6367 uses a different chip id. Apart 7 | from missing DSL, there is no difference to BCM6368, so treat it such. 8 | 9 | Signed-off-by: Jonas Gorski 10 | --- 11 | arch/mips/bcm63xx/cpu.c | 4 ++++ 12 | arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 3 +++ 13 | 2 files changed, 7 insertions(+) 14 | 15 | --- a/arch/mips/bcm63xx/cpu.c 16 | +++ b/arch/mips/bcm63xx/cpu.c 17 | @@ -393,8 +393,12 @@ void __init bcm63xx_cpu_init(void) 18 | 19 | break; 20 | case BCM6368_CPU_ID: 21 | + case BCM6369_CPU_ID: 22 | bcm63xx_regs_base = bcm6368_regs_base; 23 | bcm63xx_irqs = bcm6368_irqs; 24 | + 25 | + /* BCM6369 is a BCM6368 without xDSL, so treat it the same */ 26 | + bcm63xx_cpu_id = BCM6368_CPU_ID; 27 | break; 28 | default: 29 | panic("unsupported broadcom CPU %x", bcm63xx_cpu_id); 30 | --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h 31 | +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h 32 | @@ -21,6 +21,7 @@ 33 | #define BCM6361_CPU_ID 0x6361 34 | #define BCM6362_CPU_ID 0x6362 35 | #define BCM6368_CPU_ID 0x6368 36 | +#define BCM6369_CPU_ID 0x6369 37 | 38 | void __init bcm63xx_cpu_init(void); 39 | u32 bcm63xx_get_cpu_variant(void); 40 | @@ -107,6 +108,8 @@ static inline u16 __pure bcm63xx_get_cpu 41 | (bcm63xx_get_cpu_variant() == BCM6362_CPU_ID) 42 | #define BCMCPU_VARIANT_IS_6368() \ 43 | (bcm63xx_get_cpu_variant() == BCM6368_CPU_ID) 44 | +#define BCMCPU_VARIANT_IS_6369() \ 45 | + (bcm63xx_get_cpu_variant() == BCM6369_CPU_ID) 46 | 47 | /* 48 | * While registers sets are (mostly) the same across 63xx CPU, base 49 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/531-board_bcm6348-bt-voyager-2500v-bb.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c 2 | +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c 3 | @@ -3230,6 +3230,22 @@ void __init board_bcm963xx_init(void) 4 | val &= MPI_CSBASE_BASE_MASK; 5 | } 6 | boot_addr = (u8 *)KSEG1ADDR(val); 7 | + pr_info("Boot address 0x%08x\n",(unsigned int)boot_addr); 8 | + 9 | + /* BT Voyager 2500V (RTA1046VW PCB) has 8 Meg flash used as two */ 10 | + /* banks of 4 Meg. The byte at 0xBF800000 identifies the back to use.*/ 11 | + /* Loading firmware from the CFE Prompt always loads to Bank 0 */ 12 | + /* Do an early check of CFE and then select bank 0 */ 13 | + 14 | + if (boot_addr == (u8 *)0xbf800000) { 15 | + u8 *tmp_boot_addr = (u8*)0xbfc00000; 16 | + 17 | + bcm63xx_nvram_init(tmp_boot_addr + BCM963XX_NVRAM_OFFSET); 18 | + if (!strcmp(bcm63xx_nvram_get_name(), "V2500V_BB")) { 19 | + pr_info("V2500V: nvram bank 0\n"); 20 | + boot_addr = tmp_boot_addr; 21 | + } 22 | + } 23 | 24 | /* dump cfe version */ 25 | cfe = boot_addr + BCM963XX_CFE_VERSION_OFFSET; 26 | --- a/arch/mips/bcm63xx/dev-flash.c 27 | +++ b/arch/mips/bcm63xx/dev-flash.c 28 | @@ -21,6 +21,7 @@ 29 | #include 30 | #include 31 | 32 | +#include 33 | #include 34 | #include 35 | #include 36 | @@ -256,6 +257,13 @@ int __init bcm63xx_flash_register(void) 37 | val = bcm_mpi_readl(MPI_CSBASE_REG(0)); 38 | val &= MPI_CSBASE_BASE_MASK; 39 | 40 | + /* BT Voyager 2500V has 8 Meg flash in two 4 Meg banks */ 41 | + /* Loading from CFE always uses Bank 0 */ 42 | + if (!strcmp(board_get_name(), "V2500V_BB")) { 43 | + pr_info("V2500V: Start in Bank 0\n"); 44 | + val = val + 0x400000; // Select Bank 0 start address 45 | + } 46 | + 47 | mtd_resources[0].start = val; 48 | mtd_resources[0].end = 0x1FFFFFFF; 49 | } 50 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6348-inventel-livebox-1.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6348.dtsi" 2 | 3 | #include 4 | 5 | / { 6 | model = "Inventel Livebox 1"; 7 | compatible = "inventel,livebox-1", "brcm,bcm6348"; 8 | 9 | aliases { 10 | led-boot = &led_red_adsl_fail; 11 | led-failsafe = &led_red_adsl_fail; 12 | led-running = &led_red_adsl_fail; 13 | led-upgrade = &led_red_adsl_fail; 14 | }; 15 | 16 | chosen { 17 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 18 | stdout-path = "serial0:115200n8"; 19 | }; 20 | 21 | keys { 22 | compatible = "gpio-keys-polled"; 23 | #address-cells = <1>; 24 | #size-cells = <0>; 25 | poll-interval = <20>; 26 | 27 | button1 { 28 | label = "1"; 29 | gpios = <&pinctrl 36 1>; 30 | linux,code = ; 31 | debounce-interval = <60>; 32 | }; 33 | 34 | button2 { 35 | label = "2"; 36 | gpios = <&pinctrl 7 1>; 37 | linux,code = ; 38 | debounce-interval = <60>; 39 | }; 40 | }; 41 | 42 | leds { 43 | compatible = "gpio-leds"; 44 | 45 | led_red_adsl_fail: red_adsl_fail { 46 | label = "red:adsl-fail-power"; 47 | gpios = <&pinctrl 0 0>; 48 | default-state = "on"; 49 | }; 50 | 51 | red_adsl { 52 | label = "red:adsl"; 53 | gpios = <&pinctrl 1 0>; 54 | }; 55 | 56 | red_traffic { 57 | label = "red:traffic"; 58 | gpios = <&pinctrl 2 0>; 59 | }; 60 | 61 | red_phone { 62 | label = "red:phone"; 63 | gpios = <&pinctrl 3 0>; 64 | }; 65 | 66 | red_wifi { 67 | label = "red:wifi"; 68 | gpios = <&pinctrl 4 0>; 69 | }; 70 | }; 71 | }; 72 | 73 | &pflash { 74 | reg = <0x1e400000 0x800000>; 75 | status = "okay"; 76 | 77 | partitions { 78 | compatible = "redboot-fis"; 79 | }; 80 | }; 81 | 82 | &pinctrl { 83 | pinctrl-names = "default"; 84 | pinctrl-0 = <&pinctrl_pci &pinctrl_ext_mii &pinctrl_mii_pccard>; 85 | }; 86 | 87 | &uart0 { 88 | status = "okay"; 89 | }; 90 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6345-dynalink-rta770w.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6345.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Dynalink RTA770W"; 8 | compatible = "dynalink,rta770w", "brcm,bcm6345"; 9 | 10 | aliases { 11 | led-boot = &led_diag; 12 | led-failsafe = &led_diag; 13 | led-running = &led_diag; 14 | led-upgrade = &led_diag; 15 | }; 16 | 17 | chosen { 18 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 19 | stdout-path = "serial0:115200n8"; 20 | }; 21 | 22 | keys { 23 | compatible = "gpio-keys-polled"; 24 | #address-cells = <1>; 25 | #size-cells = <0>; 26 | poll-interval = <20>; 27 | 28 | reset { 29 | label = "reset"; 30 | gpios = <&gpio0 13 1>; 31 | linux,code = ; 32 | debounce-interval = <60>; 33 | }; 34 | }; 35 | 36 | leds { 37 | compatible = "gpio-leds"; 38 | 39 | usb { 40 | function = LED_FUNCTION_USB; 41 | color = ; 42 | gpios = <&gpio0 7 1>; 43 | }; 44 | 45 | adsl { 46 | label = "green:adsl"; 47 | gpios = <&gpio0 8 0>; 48 | }; 49 | 50 | led_diag: diag { 51 | label = "green:diag"; 52 | gpios = <&gpio0 10 1>; 53 | }; 54 | 55 | wlan { 56 | function = LED_FUNCTION_WLAN; 57 | color = ; 58 | gpios = <&gpio0 11 1>; 59 | }; 60 | }; 61 | }; 62 | 63 | &pflash { 64 | status = "okay"; 65 | 66 | partitions { 67 | compatible = "fixed-partitions"; 68 | #address-cells = <1>; 69 | #size-cells = <1>; 70 | 71 | cfe@0 { 72 | label = "CFE"; 73 | reg = <0x000000 0x010000>; 74 | read-only; 75 | }; 76 | 77 | linux@10000 { 78 | label = "linux"; 79 | reg = <0x010000 0x3e0000>; 80 | compatible = "brcm,bcm963xx-imagetag"; 81 | }; 82 | 83 | nvram@3f0000 { 84 | label = "nvram"; 85 | reg = <0x3f0000 0x010000>; 86 | }; 87 | }; 88 | }; 89 | 90 | &uart0 { 91 | status = "okay"; 92 | }; 93 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6345-dynalink-rta770bw.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6345.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Siemens Gigaset SE515"; 8 | compatible = "dynalink,rta770bw", "brcm,bcm6345"; 9 | 10 | aliases { 11 | led-boot = &led_diag; 12 | led-failsafe = &led_diag; 13 | led-running = &led_diag; 14 | led-upgrade = &led_diag; 15 | }; 16 | 17 | chosen { 18 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 19 | stdout-path = "serial0:115200n8"; 20 | }; 21 | 22 | keys { 23 | compatible = "gpio-keys-polled"; 24 | #address-cells = <1>; 25 | #size-cells = <0>; 26 | poll-interval = <20>; 27 | 28 | reset { 29 | label = "reset"; 30 | gpios = <&gpio0 13 1>; 31 | linux,code = ; 32 | debounce-interval = <60>; 33 | }; 34 | }; 35 | 36 | leds { 37 | compatible = "gpio-leds"; 38 | 39 | usb { 40 | function = LED_FUNCTION_USB; 41 | color = ; 42 | gpios = <&gpio0 7 1>; 43 | }; 44 | 45 | adsl { 46 | label = "green:adsl"; 47 | gpios = <&gpio0 8 0>; 48 | }; 49 | 50 | led_diag: diag { 51 | label = "green:diag"; 52 | gpios = <&gpio0 10 1>; 53 | }; 54 | 55 | wlan { 56 | function = LED_FUNCTION_WLAN; 57 | color = ; 58 | gpios = <&gpio0 11 1>; 59 | }; 60 | }; 61 | }; 62 | 63 | &pflash { 64 | status = "okay"; 65 | 66 | partitions { 67 | compatible = "fixed-partitions"; 68 | #address-cells = <1>; 69 | #size-cells = <1>; 70 | 71 | cfe@0 { 72 | label = "CFE"; 73 | reg = <0x000000 0x010000>; 74 | read-only; 75 | }; 76 | 77 | linux@10000 { 78 | label = "linux"; 79 | reg = <0x010000 0x3e0000>; 80 | compatible = "brcm,bcm963xx-imagetag"; 81 | }; 82 | 83 | nvram@3f0000 { 84 | label = "nvram"; 85 | reg = <0x3f0000 0x010000>; 86 | }; 87 | }; 88 | }; 89 | 90 | &uart0 { 91 | status = "okay"; 92 | }; 93 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6348-comtrend-ct-536plus.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6348.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Comtrend CT-536+/CT-5621T"; 8 | compatible = "comtrend,ct-536plus", "brcm,bcm6348"; 9 | 10 | aliases { 11 | led-boot = &led_power_green; 12 | led-failsafe = &led_power_green; 13 | led-running = &led_power_green; 14 | led-upgrade = &led_power_green; 15 | }; 16 | 17 | chosen { 18 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 19 | stdout-path = "serial0:115200n8"; 20 | }; 21 | 22 | keys { 23 | compatible = "gpio-keys-polled"; 24 | #address-cells = <1>; 25 | #size-cells = <0>; 26 | poll-interval = <20>; 27 | 28 | reset { 29 | label = "reset"; 30 | gpios = <&pinctrl 33 1>; 31 | linux,code = ; 32 | debounce-interval = <60>; 33 | }; 34 | }; 35 | 36 | leds { 37 | compatible = "gpio-leds"; 38 | 39 | led_power_green: power_green { 40 | function = LED_FUNCTION_POWER; 41 | color = ; 42 | gpios = <&pinctrl 0 1>; 43 | default-state = "on"; 44 | }; 45 | adsl_fail_green { 46 | label = "green:adsl-fail"; 47 | gpios = <&pinctrl 2 1>; 48 | }; 49 | }; 50 | }; 51 | 52 | &pflash { 53 | status = "okay"; 54 | 55 | partitions { 56 | compatible = "fixed-partitions"; 57 | #address-cells = <1>; 58 | #size-cells = <1>; 59 | 60 | cfe@0 { 61 | label = "CFE"; 62 | reg = <0x000000 0x010000>; 63 | read-only; 64 | }; 65 | 66 | linux@10000 { 67 | label = "linux"; 68 | reg = <0x010000 0x3e0000>; 69 | compatible = "brcm,bcm963xx-imagetag"; 70 | }; 71 | 72 | nvram@3f0000 { 73 | label = "nvram"; 74 | reg = <0x3f0000 0x010000>; 75 | }; 76 | }; 77 | }; 78 | 79 | &pinctrl { 80 | pinctrl-names = "default"; 81 | pinctrl-0 = <&pinctrl_pci &pinctrl_ext_mii &pinctrl_mii_pccard>; 82 | }; 83 | 84 | &uart0 { 85 | status = "okay"; 86 | }; 87 | -------------------------------------------------------------------------------- /pxa/patches-3.10/002-verdex_lcd_support.patch: -------------------------------------------------------------------------------- 1 | From eb92a178eceae4e5d18bbb442b8e44cb88457d60 Mon Sep 17 00:00:00 2001 2 | From: Joseph Kortje 3 | Date: Wed, 28 Oct 2009 21:25:57 -0400 4 | Subject: [PATCH] [ARM] Gumstix Verdex LCD config options 5 | 6 | add options to Kconfig for Verdex LCD support 7 | 8 | Signed-off-by: Bobby Powers 9 | --- 10 | drivers/video/Kconfig | 31 +++++++++++++++++++++++++++++++ 11 | 1 files changed, 31 insertions(+), 0 deletions(-) 12 | 13 | --- a/drivers/video/Kconfig 14 | +++ b/drivers/video/Kconfig 15 | @@ -1905,6 +1905,37 @@ config FB_PXA 16 | say M here and read . 17 | 18 | If unsure, say N. 19 | +choice 20 | + depends on FB_PXA 21 | + prompt "LCD Panel" 22 | + default FB_PXA_SAMSUNG_LTE430WQ_F0C 23 | + 24 | +config FB_PXA_ALPS_CDOLLAR 25 | + boolean "Chris Dollar's ALPS screen" 26 | + ---help--- 27 | + Enable definitions (over-ridable on the kernel command line if 28 | + "PXA LCD command line parameters" is also selected) for an ALPS 29 | + screen which Chris Dollar uses 30 | + 31 | +config FB_PXA_SHARP_LQ043_PSP 32 | + boolean "SHARP LQ043... series" 33 | + ---help--- 34 | + Enable definitions (over-ridable on the kernel command line if 35 | + "PXA LCD command line parameters" is also selected) for a SHARP 36 | + LQ043... screen, such as the one used by the PSP. These screens are 37 | + the ones normally sold by gumstix with its boards. 38 | + 39 | +config FB_PXA_SAMSUNG_LTE430WQ_F0C 40 | + boolean "Samsung LTE430WQ-F0C (standard gumstix LCD)" 41 | + ---help--- 42 | + Enable definitions for a Samsung LTE430WQ-F0C LCD panel, such as the ones resold 43 | + by gumstix for use with their "LCD-Ready" boards. 44 | + 45 | +config FB_PXA_NONEOFTHEABOVE 46 | + boolean "None of the above" 47 | + 48 | +endchoice 49 | + 50 | 51 | config FB_PXA_OVERLAY 52 | bool "Support PXA27x/PXA3xx Overlay(s) as framebuffer" 53 | -------------------------------------------------------------------------------- /pxa/patches-3.3/002-verdex_lcd_support.patch: -------------------------------------------------------------------------------- 1 | From eb92a178eceae4e5d18bbb442b8e44cb88457d60 Mon Sep 17 00:00:00 2001 2 | From: Joseph Kortje 3 | Date: Wed, 28 Oct 2009 21:25:57 -0400 4 | Subject: [PATCH] [ARM] Gumstix Verdex LCD config options 5 | 6 | add options to Kconfig for Verdex LCD support 7 | 8 | Signed-off-by: Bobby Powers 9 | --- 10 | drivers/video/Kconfig | 31 +++++++++++++++++++++++++++++++ 11 | 1 files changed, 31 insertions(+), 0 deletions(-) 12 | 13 | --- a/drivers/video/Kconfig 14 | +++ b/drivers/video/Kconfig 15 | @@ -1892,6 +1892,37 @@ config FB_PXA 16 | say M here and read . 17 | 18 | If unsure, say N. 19 | +choice 20 | + depends on FB_PXA 21 | + prompt "LCD Panel" 22 | + default FB_PXA_SAMSUNG_LTE430WQ_F0C 23 | + 24 | +config FB_PXA_ALPS_CDOLLAR 25 | + boolean "Chris Dollar's ALPS screen" 26 | + ---help--- 27 | + Enable definitions (over-ridable on the kernel command line if 28 | + "PXA LCD command line parameters" is also selected) for an ALPS 29 | + screen which Chris Dollar uses 30 | + 31 | +config FB_PXA_SHARP_LQ043_PSP 32 | + boolean "SHARP LQ043... series" 33 | + ---help--- 34 | + Enable definitions (over-ridable on the kernel command line if 35 | + "PXA LCD command line parameters" is also selected) for a SHARP 36 | + LQ043... screen, such as the one used by the PSP. These screens are 37 | + the ones normally sold by gumstix with its boards. 38 | + 39 | +config FB_PXA_SAMSUNG_LTE430WQ_F0C 40 | + boolean "Samsung LTE430WQ-F0C (standard gumstix LCD)" 41 | + ---help--- 42 | + Enable definitions for a Samsung LTE430WQ-F0C LCD panel, such as the ones resold 43 | + by gumstix for use with their "LCD-Ready" boards. 44 | + 45 | +config FB_PXA_NONEOFTHEABOVE 46 | + boolean "None of the above" 47 | + 48 | +endchoice 49 | + 50 | 51 | config FB_PXA_OVERLAY 52 | bool "Support PXA27x/PXA3xx Overlay(s) as framebuffer" 53 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/380-pcmcia-bcm63xx_pmcia-use-the-new-named-gpio.patch: -------------------------------------------------------------------------------- 1 | From c4e04f1c54928a49b227a5420d38b18226838775 Mon Sep 17 00:00:00 2001 2 | From: Jonas Gorski 3 | Date: Wed, 25 Mar 2015 13:54:56 +0100 4 | Subject: [PATCH 2/2] pcmcia: bcm63xx_pmcia: use the new named gpio 5 | 6 | Use the new named gpio instead of relying on the hardware gpio numbers 7 | matching the virtual gpio numbers. 8 | 9 | Signed-off-by: Jonas Gorski 10 | --- 11 | drivers/pcmcia/bcm63xx_pcmcia.c | 9 ++++++++- 12 | drivers/pcmcia/bcm63xx_pcmcia.h | 4 ++++ 13 | 2 files changed, 12 insertions(+), 1 deletion(-) 14 | 15 | --- a/drivers/pcmcia/bcm63xx_pcmcia.c 16 | +++ b/drivers/pcmcia/bcm63xx_pcmcia.c 17 | @@ -237,7 +237,7 @@ static unsigned int __get_socket_status( 18 | stat |= SS_XVCARD; 19 | stat |= SS_POWERON; 20 | 21 | - if (gpio_get_value(skt->pd->ready_gpio)) 22 | + if (gpiod_get_value(skt->ready_gpio)) 23 | stat |= SS_READY; 24 | 25 | return stat; 26 | @@ -373,6 +373,13 @@ static int bcm63xx_drv_pcmcia_probe(stru 27 | goto err; 28 | } 29 | 30 | + /* get ready gpio */ 31 | + skt->ready_gpio = devm_gpiod_get(&pdev->dev, "ready", GPIOD_IN); 32 | + if (IS_ERR(skt->ready_gpio)) { 33 | + ret = PTR_ERR(skt->ready_gpio); 34 | + goto err; 35 | + } 36 | + 37 | /* resources are static */ 38 | sock->resource_ops = &pccard_static_ops; 39 | sock->ops = &bcm63xx_pcmcia_operations; 40 | --- a/drivers/pcmcia/bcm63xx_pcmcia.h 41 | +++ b/drivers/pcmcia/bcm63xx_pcmcia.h 42 | @@ -4,6 +4,7 @@ 43 | 44 | #include 45 | #include 46 | +#include 47 | #include 48 | #include 49 | 50 | @@ -56,6 +57,9 @@ struct bcm63xx_pcmcia_socket { 51 | 52 | /* base address of io memory */ 53 | void __iomem *io_base; 54 | + 55 | + /* ready gpio */ 56 | + struct gpio_desc *ready_gpio; 57 | }; 58 | 59 | #endif /* BCM63XX_PCMCIA_H_ */ 60 | -------------------------------------------------------------------------------- /oxnas/patches-5.15/500-oxnas-sata.patch: -------------------------------------------------------------------------------- 1 | --- a/drivers/ata/Kconfig 2 | +++ b/drivers/ata/Kconfig 3 | @@ -568,6 +568,14 @@ config SATA_VITESSE 4 | 5 | If unsure, say N. 6 | 7 | +config SATA_OXNAS 8 | + tristate "PLXTECH NAS782X SATA support" 9 | + select SATA_HOST 10 | + help 11 | + This option enables support for Nas782x Serial ATA controller. 12 | + 13 | + If unsure, say N. 14 | + 15 | comment "PATA SFF controllers with BMDMA" 16 | 17 | config PATA_ALI 18 | --- a/drivers/ata/Makefile 19 | +++ b/drivers/ata/Makefile 20 | @@ -46,6 +46,7 @@ obj-$(CONFIG_SATA_SVW) += sata_svw.o 21 | obj-$(CONFIG_SATA_ULI) += sata_uli.o 22 | obj-$(CONFIG_SATA_VIA) += sata_via.o 23 | obj-$(CONFIG_SATA_VITESSE) += sata_vsc.o 24 | +obj-$(CONFIG_SATA_OXNAS) += sata_oxnas.o 25 | 26 | # SFF PATA w/ BMDMA 27 | obj-$(CONFIG_PATA_ALI) += pata_ali.o 28 | --- a/arch/arm/boot/dts/ox820.dtsi 29 | +++ b/arch/arm/boot/dts/ox820.dtsi 30 | @@ -399,5 +399,20 @@ 31 | plxtech,pcie-outbound-offset = <0x174>; 32 | status = "disabled"; 33 | }; 34 | + 35 | + sata: sata@45900000 { 36 | + compatible = "plxtech,nas782x-sata"; 37 | + /* ports dmactl sgdma */ 38 | + reg = <0x45900000 0x20000>, <0x459A0000 0x40>, <0x459B0000 0x20>, 39 | + /* core phy descriptors (optional) */ 40 | + <0x459E0000 0x2000>, <0x44900000 0x0C>, <0x50000000 0x1000>; 41 | + interrupts = ; 42 | + clocks = <&stdclk CLK_820_SATA>; 43 | + resets = <&reset RESET_SATA>, <&reset RESET_SATA_LINK>, <&reset RESET_SATA_PHY>; 44 | + reset-names = "sata", "link", "phy"; 45 | + nr-ports = <1>; 46 | + status = "disabled"; 47 | + }; 48 | + 49 | }; 50 | }; 51 | --- a/arch/arm/boot/dts/ox820-cloudengines-pogoplug-series-3.dts 52 | +++ b/arch/arm/boot/dts/ox820-cloudengines-pogoplug-series-3.dts 53 | @@ -111,3 +111,7 @@ 54 | pinctrl-names = "default"; 55 | pinctrl-0 = <&pinctrl_etha_mdio>; 56 | }; 57 | + 58 | +&sata { 59 | + status = "okay"; 60 | +}; 61 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/420-BCM63XX-add-endian-check-for-ath9k.patch: -------------------------------------------------------------------------------- 1 | --- a/arch/mips/include/asm/mach-bcm63xx/pci_ath9k_fixup.h 2 | +++ b/arch/mips/include/asm/mach-bcm63xx/pci_ath9k_fixup.h 3 | @@ -2,6 +2,7 @@ 4 | #define _PCI_ATH9K_FIXUP 5 | 6 | 7 | -void pci_enable_ath9k_fixup(unsigned slot, u32 offset) __init; 8 | +void pci_enable_ath9k_fixup(unsigned slot, u32 offset, 9 | + unsigned endian_check) __init; 10 | 11 | #endif /* _PCI_ATH9K_FIXUP */ 12 | --- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h 13 | +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h 14 | @@ -20,6 +20,7 @@ 15 | struct ath9k_caldata { 16 | unsigned int slot; 17 | u32 caldata_offset; 18 | + unsigned int endian_check:1; 19 | }; 20 | 21 | /* 22 | --- a/arch/mips/bcm63xx/pci-ath9k-fixup.c 23 | +++ b/arch/mips/bcm63xx/pci-ath9k-fixup.c 24 | @@ -187,12 +187,14 @@ static void ath9k_pci_fixup(struct pci_d 25 | } 26 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATHEROS, PCI_ANY_ID, ath9k_pci_fixup); 27 | 28 | -void __init pci_enable_ath9k_fixup(unsigned slot, u32 offset) 29 | +void __init pci_enable_ath9k_fixup(unsigned slot, u32 offset, 30 | + unsigned endian_check) 31 | { 32 | if (ath9k_num_fixups >= ARRAY_SIZE(ath9k_fixups)) 33 | return; 34 | 35 | ath9k_fixups[ath9k_num_fixups].slot = slot; 36 | + ath9k_fixups[ath9k_num_fixups].pdata.endian_check = endian_check; 37 | 38 | if (!bcm63xx_read_eeprom(ath9k_fixups[ath9k_num_fixups].pdata.eeprom_data, offset)) 39 | return; 40 | --- a/arch/mips/bcm63xx/boards/board_common.c 41 | +++ b/arch/mips/bcm63xx/boards/board_common.c 42 | @@ -245,7 +245,8 @@ int __init board_register_devices(void) 43 | 44 | /* register any fixups */ 45 | for (i = 0; i < board.has_caldata; i++) 46 | - pci_enable_ath9k_fixup(board.caldata[i].slot, board.caldata[i].caldata_offset); 47 | + pci_enable_ath9k_fixup(board.caldata[i].slot, board.caldata[i].caldata_offset, 48 | + board.caldata[i].endian_check); 49 | 50 | return 0; 51 | } 52 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6348-sagem-fast-2604.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6348.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Sagem F@st 2604"; 8 | compatible = "sagem,fast-2604", "brcm,bcm6348"; 9 | 10 | chosen { 11 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 12 | stdout-path = "serial0:115200n8"; 13 | }; 14 | 15 | keys { 16 | compatible = "gpio-keys-polled"; 17 | #address-cells = <1>; 18 | #size-cells = <0>; 19 | poll-interval = <20>; 20 | 21 | reset { 22 | label = "reset"; 23 | gpios = <&pinctrl 33 1>; 24 | linux,code = ; 25 | debounce-interval = <60>; 26 | }; 27 | }; 28 | 29 | leds { 30 | compatible = "gpio-leds"; 31 | 32 | power_green { 33 | function = LED_FUNCTION_POWER; 34 | color = ; 35 | gpios = <&pinctrl 0 1>; 36 | default-state = "on"; 37 | }; 38 | power_red { 39 | function = LED_FUNCTION_POWER; 40 | color = ; 41 | gpios = <&pinctrl 1 1>; 42 | }; 43 | inet_red { 44 | label = "red:inet"; 45 | gpios = <&pinctrl 4 1>; 46 | }; 47 | wps_green { 48 | function = LED_FUNCTION_WPS; 49 | color = ; 50 | gpios = <&pinctrl 5 1>; 51 | }; 52 | }; 53 | }; 54 | 55 | &pflash { 56 | status = "okay"; 57 | 58 | partitions { 59 | compatible = "fixed-partitions"; 60 | #address-cells = <1>; 61 | #size-cells = <1>; 62 | 63 | cfe@0 { 64 | label = "CFE"; 65 | reg = <0x000000 0x010000>; 66 | read-only; 67 | }; 68 | 69 | linux@10000 { 70 | label = "linux"; 71 | reg = <0x010000 0x3e0000>; 72 | compatible = "brcm,bcm963xx-imagetag"; 73 | }; 74 | 75 | nvram@3f0000 { 76 | label = "nvram"; 77 | reg = <0x3f0000 0x010000>; 78 | }; 79 | }; 80 | }; 81 | 82 | &pinctrl { 83 | pinctrl-names = "default"; 84 | pinctrl-0 = <&pinctrl_pci &pinctrl_ext_mii>; 85 | }; 86 | 87 | &uart0 { 88 | status = "okay"; 89 | }; 90 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6348-tecom-gw6200.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6348.dtsi" 2 | 3 | #include 4 | 5 | / { 6 | model = "TECOM GW6200"; 7 | compatible = "tecom,gw6200", "brcm,bcm6348"; 8 | 9 | aliases { 10 | led-boot = &led_line1_green; 11 | led-failsafe = &led_line1_green; 12 | led-running = &led_line1_green; 13 | led-upgrade = &led_line1_green; 14 | }; 15 | 16 | chosen { 17 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 18 | stdout-path = "serial0:115200n8"; 19 | }; 20 | 21 | keys { 22 | compatible = "gpio-keys-polled"; 23 | #address-cells = <1>; 24 | #size-cells = <0>; 25 | poll-interval = <20>; 26 | 27 | reset { 28 | label = "reset"; 29 | gpios = <&pinctrl 36 1>; 30 | linux,code = ; 31 | debounce-interval = <60>; 32 | }; 33 | }; 34 | 35 | leds { 36 | compatible = "gpio-leds"; 37 | 38 | led_line1_green: line1_green { 39 | label = "green:line1"; 40 | gpios = <&pinctrl 4 1>; 41 | }; 42 | line2_green { 43 | label = "green:line2"; 44 | gpios = <&pinctrl 5 1>; 45 | }; 46 | line3_green { 47 | label = "green:line3"; 48 | gpios = <&pinctrl 6 1>; 49 | }; 50 | tel_green { 51 | label = "green:tel"; 52 | gpios = <&pinctrl 7 1>; 53 | }; 54 | }; 55 | }; 56 | 57 | &pflash { 58 | status = "okay"; 59 | 60 | partitions { 61 | compatible = "fixed-partitions"; 62 | #address-cells = <1>; 63 | #size-cells = <1>; 64 | 65 | cfe@0 { 66 | label = "CFE"; 67 | reg = <0x000000 0x010000>; 68 | read-only; 69 | }; 70 | 71 | linux@10000 { 72 | label = "linux"; 73 | reg = <0x010000 0x7e0000>; 74 | compatible = "brcm,bcm963xx-imagetag"; 75 | }; 76 | 77 | nvram@7f0000 { 78 | label = "nvram"; 79 | reg = <0x7f0000 0x010000>; 80 | }; 81 | }; 82 | }; 83 | 84 | &pinctrl { 85 | pinctrl-names = "default"; 86 | pinctrl-0 = <&pinctrl_pci &pinctrl_ext_mii &pinctrl_mii_pccard>; 87 | }; 88 | 89 | &uart0 { 90 | status = "okay"; 91 | }; 92 | -------------------------------------------------------------------------------- /oxnas/patches-5.15/999-libata-hacks.patch: -------------------------------------------------------------------------------- 1 | --- a/drivers/ata/libata-core.c 2 | +++ b/drivers/ata/libata-core.c 3 | @@ -1531,6 +1531,14 @@ unsigned ata_exec_internal_sg(struct ata 4 | return AC_ERR_SYSTEM; 5 | } 6 | 7 | + if (ap->ops->acquire_hw && !ap->ops->acquire_hw(ap, 0, 0)) { 8 | + spin_unlock_irqrestore(ap->lock, flags); 9 | + if (!ap->ops->acquire_hw(ap, 1, (2*HZ))) { 10 | + return AC_ERR_TIMEOUT; 11 | + } 12 | + spin_lock_irqsave(ap->lock, flags); 13 | + } 14 | + 15 | /* initialize internal qc */ 16 | qc = __ata_qc_from_tag(ap, ATA_TAG_INTERNAL); 17 | 18 | @@ -4587,6 +4595,9 @@ struct ata_queued_cmd *ata_qc_new_init(s 19 | if (unlikely(ap->pflags & ATA_PFLAG_FROZEN)) 20 | return NULL; 21 | 22 | + if (ap->ops->qc_new && ap->ops->qc_new(ap)) 23 | + return NULL; 24 | + 25 | /* libsas case */ 26 | if (ap->flags & ATA_FLAG_SAS_HOST) { 27 | tag = ata_sas_allocate_tag(ap); 28 | @@ -4632,6 +4643,8 @@ void ata_qc_free(struct ata_queued_cmd * 29 | qc->tag = ATA_TAG_POISON; 30 | if (ap->flags & ATA_FLAG_SAS_HOST) 31 | ata_sas_free_tag(tag, ap); 32 | + if (ap->ops->qc_free) 33 | + ap->ops->qc_free(qc); 34 | } 35 | } 36 | 37 | --- a/include/linux/libata.h 38 | +++ b/include/linux/libata.h 39 | @@ -927,6 +927,8 @@ struct ata_port_operations { 40 | enum ata_completion_errors (*qc_prep)(struct ata_queued_cmd *qc); 41 | unsigned int (*qc_issue)(struct ata_queued_cmd *qc); 42 | bool (*qc_fill_rtf)(struct ata_queued_cmd *qc); 43 | + int (*qc_new)(struct ata_port *ap); 44 | + void (*qc_free)(struct ata_queued_cmd *qc); 45 | 46 | /* 47 | * Configuration and exception handling 48 | @@ -1017,6 +1019,9 @@ struct ata_port_operations { 49 | void (*phy_reset)(struct ata_port *ap); 50 | void (*eng_timeout)(struct ata_port *ap); 51 | 52 | + int (*acquire_hw)(struct ata_port *ap, int may_sleep, 53 | + int timeout_jiffies); 54 | + 55 | /* 56 | * ->inherits must be the last field and all the preceding 57 | * fields must be pointers. 58 | -------------------------------------------------------------------------------- /ath25/patches-5.15/140-redboot_boardconfig.patch: -------------------------------------------------------------------------------- 1 | --- a/drivers/mtd/parsers/redboot.c 2 | +++ b/drivers/mtd/parsers/redboot.c 3 | @@ -16,6 +16,8 @@ 4 | #include 5 | #include 6 | 7 | +#define BOARD_CONFIG_PART "boardconfig" 8 | + 9 | struct fis_image_desc { 10 | unsigned char name[16]; // Null terminated name 11 | u32 flash_base; // Address within FLASH of image 12 | @@ -73,6 +75,7 @@ static int parse_redboot_partitions(stru 13 | const struct mtd_partition **pparts, 14 | struct mtd_part_parser_data *data) 15 | { 16 | + unsigned long max_offset = 0; 17 | int nrparts = 0; 18 | struct fis_image_desc *buf; 19 | struct mtd_partition *parts; 20 | @@ -239,14 +242,15 @@ nogood: 21 | } 22 | } 23 | #endif 24 | - parts = kzalloc(sizeof(*parts) * nrparts + nulllen + namelen, GFP_KERNEL); 25 | + parts = kzalloc(sizeof(*parts) * (nrparts + 1) + nulllen + namelen + 26 | + sizeof(BOARD_CONFIG_PART), GFP_KERNEL); 27 | 28 | if (!parts) { 29 | ret = -ENOMEM; 30 | goto out; 31 | } 32 | 33 | - nullname = (char *)&parts[nrparts]; 34 | + nullname = (char *)&parts[nrparts + 1]; 35 | #ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED 36 | if (nulllen > 0) 37 | strcpy(nullname, nullstring); 38 | @@ -264,6 +268,8 @@ nogood: 39 | } 40 | #endif 41 | for ( ; i < nrparts; i++) { 42 | + if (max_offset < buf[i].flash_base + buf[i].size) 43 | + max_offset = buf[i].flash_base + buf[i].size; 44 | parts[i].size = fl->img->size; 45 | parts[i].offset = fl->img->flash_base; 46 | parts[i].name = names; 47 | @@ -297,6 +303,13 @@ nogood: 48 | fl = fl->next; 49 | kfree(tmp_fl); 50 | } 51 | + if (master->size - max_offset >= master->erasesize) { 52 | + parts[nrparts].size = master->size - max_offset; 53 | + parts[nrparts].offset = max_offset; 54 | + parts[nrparts].name = names; 55 | + strcpy(names, BOARD_CONFIG_PART); 56 | + nrparts++; 57 | + } 58 | ret = nrparts; 59 | *pparts = parts; 60 | out: 61 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6348-bt-voyager-2500v-bb.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6348.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "BT Voyager 2500V"; 8 | compatible = "bt,voyager-2500v-bb", "brcm,bcm6348"; 9 | 10 | chosen { 11 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 12 | stdout-path = "serial0:115200n8"; 13 | }; 14 | 15 | keys { 16 | compatible = "gpio-keys-polled"; 17 | #address-cells = <1>; 18 | #size-cells = <0>; 19 | poll-interval = <20>; 20 | 21 | reset { 22 | label = "reset"; 23 | gpios = <&pinctrl 31 1>; 24 | linux,code = ; 25 | debounce-interval = <60>; 26 | }; 27 | }; 28 | 29 | leds { 30 | compatible = "gpio-leds"; 31 | 32 | power_green { 33 | function = LED_FUNCTION_POWER; 34 | color = ; 35 | gpios = <&pinctrl 0 1>; 36 | }; 37 | power_red { 38 | function = LED_FUNCTION_POWER; 39 | color = ; 40 | gpios = <&pinctrl 1 1>; 41 | }; 42 | adsl_green { 43 | label = "green:adsl"; 44 | gpios = <&pinctrl 2 1>; 45 | }; 46 | ppp_green { 47 | label = "green:ppp"; 48 | gpios = <&pinctrl 3 1>; 49 | }; 50 | wireless_green { 51 | label = "green:wireless"; 52 | gpios = <&pinctrl 6 1>; 53 | }; 54 | }; 55 | }; 56 | 57 | &pflash { 58 | status = "okay"; 59 | 60 | partitions { 61 | compatible = "fixed-partitions"; 62 | #address-cells = <1>; 63 | #size-cells = <1>; 64 | 65 | cfe@0 { 66 | label = "CFE"; 67 | reg = <0x000000 0x010000>; 68 | read-only; 69 | }; 70 | 71 | linux@10000 { 72 | label = "linux"; 73 | reg = <0x010000 0x3e0000>; 74 | compatible = "brcm,bcm963xx-imagetag"; 75 | }; 76 | 77 | nvram@3f0000 { 78 | label = "nvram"; 79 | reg = <0x3f0000 0x010000>; 80 | }; 81 | }; 82 | }; 83 | 84 | &pinctrl { 85 | pinctrl-names = "default"; 86 | pinctrl-0 = <&pinctrl_pci &pinctrl_ext_mii>; 87 | }; 88 | 89 | &uart0 { 90 | status = "okay"; 91 | }; 92 | -------------------------------------------------------------------------------- /bcm63xx/patches-5.15/337-MIPS-BCM63XX-widen-cpuid-field.patch: -------------------------------------------------------------------------------- 1 | From f1477f6e3551fd6beecfee5368fed1325dcd421f Mon Sep 17 00:00:00 2001 2 | From: Jonas Gorski 3 | Date: Sat, 7 Dec 2013 14:54:51 +0100 4 | Subject: [PATCH 47/53] MIPS: BCM63XX: widen cpuid field 5 | 6 | --- 7 | arch/mips/bcm63xx/cpu.c | 2 +- 8 | arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 8 ++++---- 9 | 2 files changed, 5 insertions(+), 5 deletions(-) 10 | 11 | --- a/arch/mips/bcm63xx/cpu.c 12 | +++ b/arch/mips/bcm63xx/cpu.c 13 | @@ -24,7 +24,7 @@ EXPORT_SYMBOL(bcm63xx_regs_base); 14 | const int *bcm63xx_irqs; 15 | EXPORT_SYMBOL(bcm63xx_irqs); 16 | 17 | -u16 bcm63xx_cpu_id __read_mostly; 18 | +u32 bcm63xx_cpu_id __read_mostly; 19 | EXPORT_SYMBOL(bcm63xx_cpu_id); 20 | 21 | static u32 bcm63xx_cpu_variant __read_mostly; 22 | @@ -127,7 +127,7 @@ unsigned int bcm63xx_get_memory_size(voi 23 | 24 | static unsigned int detect_cpu_clock(void) 25 | { 26 | - u16 cpu_id = bcm63xx_get_cpu_id(); 27 | + u32 cpu_id = bcm63xx_get_cpu_id(); 28 | 29 | switch (cpu_id) { 30 | case BCM3368_CPU_ID: 31 | --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h 32 | +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h 33 | @@ -28,7 +28,7 @@ u32 bcm63xx_get_cpu_variant(void); 34 | u8 bcm63xx_get_cpu_rev(void); 35 | unsigned int bcm63xx_get_cpu_freq(void); 36 | 37 | -static inline u16 __pure __bcm63xx_get_cpu_id(const u16 cpu_id) 38 | +static inline u32 __pure __bcm63xx_get_cpu_id(const u32 cpu_id) 39 | { 40 | switch (cpu_id) { 41 | #ifdef CONFIG_BCM63XX_CPU_3368 42 | @@ -70,11 +70,11 @@ static inline u16 __pure __bcm63xx_get_c 43 | return cpu_id; 44 | } 45 | 46 | -extern u16 bcm63xx_cpu_id; 47 | +extern u32 bcm63xx_cpu_id; 48 | 49 | -static inline u16 __pure bcm63xx_get_cpu_id(void) 50 | +static inline u32 __pure bcm63xx_get_cpu_id(void) 51 | { 52 | - const u16 cpu_id = bcm63xx_cpu_id; 53 | + const u32 cpu_id = bcm63xx_cpu_id; 54 | 55 | return __bcm63xx_get_cpu_id(cpu_id); 56 | } 57 | -------------------------------------------------------------------------------- /bcm63xx/dts/bcm6348-belkin-f5d7633.dts: -------------------------------------------------------------------------------- 1 | #include "bcm6348.dtsi" 2 | 3 | #include 4 | #include 5 | 6 | / { 7 | model = "Belkin F5D7633"; 8 | compatible = "belkin,f5d7633", "brcm,bcm6348"; 9 | 10 | chosen { 11 | bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; 12 | stdout-path = "serial0:115200n8"; 13 | }; 14 | 15 | keys { 16 | compatible = "gpio-keys-polled"; 17 | #address-cells = <1>; 18 | #size-cells = <0>; 19 | poll-interval = <20>; 20 | 21 | reset { 22 | label = "reset"; 23 | gpios = <&pinctrl 6 1>; 24 | linux,code = ; 25 | debounce-interval = <60>; 26 | }; 27 | }; 28 | 29 | leds { 30 | compatible = "gpio-leds"; 31 | 32 | power_green { 33 | function = LED_FUNCTION_POWER; 34 | color = ; 35 | gpios = <&pinctrl 0 1>; 36 | default-state = "on"; 37 | }; 38 | stop_green { 39 | label = "green:stop"; 40 | gpios = <&pinctrl 1 1>; 41 | }; 42 | adsl_fail_green { 43 | label = "green:adsl-fail"; 44 | gpios = <&pinctrl 2 1>; 45 | }; 46 | ppp_green { 47 | label = "green:ppp"; 48 | gpios = <&pinctrl 3 1>; 49 | }; 50 | ppp_fail_green { 51 | label = "green:ppp-fail"; 52 | gpios = <&pinctrl 4 1>; 53 | }; 54 | }; 55 | }; 56 | 57 | &pflash { 58 | status = "okay"; 59 | 60 | partitions { 61 | compatible = "fixed-partitions"; 62 | #address-cells = <1>; 63 | #size-cells = <1>; 64 | 65 | cfe@0 { 66 | label = "CFE"; 67 | reg = <0x000000 0x020000>; 68 | read-only; 69 | }; 70 | 71 | linux@20000 { 72 | label = "linux"; 73 | reg = <0x020000 0x3c0000>; 74 | compatible = "brcm,bcm963xx-imagetag"; 75 | }; 76 | 77 | nvram@3e0000 { 78 | label = "nvram"; 79 | reg = <0x3e0000 0x020000>; 80 | }; 81 | }; 82 | }; 83 | 84 | &pinctrl { 85 | pinctrl-names = "default"; 86 | pinctrl-0 = <&pinctrl_pci &pinctrl_ext_mii &pinctrl_mii_pccard>; 87 | }; 88 | 89 | &uart0 { 90 | status = "okay"; 91 | }; 92 | --------------------------------------------------------------------------------