From 03257e83ae284824538e761d4666d661d8981f1e Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 11 Mar 2018 18:06:11 +0100 Subject: [PATCH] lantiq: Make kernel 4.16 work with DSA This is only useful with an out of tree kernel. Signed-off-by: Hauke Mehrtens --- target/linux/generic/config-4.16 | 1 + target/linux/lantiq/config-4.16 | 82 +++++++++++++++---- .../arch/mips/boot/dts/BTHOMEHUBV5A.dts | 51 +++++++----- .../files-4.16/arch/mips/boot/dts/vr9.dtsi | 24 ++++-- target/linux/lantiq/image/Makefile | 1 + target/linux/lantiq/xrx200/config-4.16 | 25 ++---- 6 files changed, 124 insertions(+), 60 deletions(-) diff --git a/target/linux/generic/config-4.16 b/target/linux/generic/config-4.16 index 48c7f31703..148405f416 100644 --- a/target/linux/generic/config-4.16 +++ b/target/linux/generic/config-4.16 @@ -2017,6 +2017,7 @@ CONFIG_IO_STRICT_DEVMEM=y # CONFIG_IP6_NF_MATCH_OPTS is not set # CONFIG_IP6_NF_MATCH_RPFILTER is not set # CONFIG_IP6_NF_MATCH_RT is not set +# CONFIG_IP6_NF_MATCH_SRH is not set # CONFIG_IP6_NF_NAT is not set # CONFIG_IP6_NF_RAW is not set # CONFIG_IP6_NF_SECURITY is not set diff --git a/target/linux/lantiq/config-4.16 b/target/linux/lantiq/config-4.16 index 063f2ba3eb..5367f8acf5 100644 --- a/target/linux/lantiq/config-4.16 +++ b/target/linux/lantiq/config-4.16 @@ -8,8 +8,6 @@ CONFIG_ARCH_HAS_RESET_CONTROLLER=y # CONFIG_ARCH_HAS_STRICT_KERNEL_RWX is not set # CONFIG_ARCH_HAS_STRICT_MODULE_RWX is not set CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y -CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y CONFIG_ARCH_MMAP_RND_BITS_MAX=15 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15 # CONFIG_ARCH_OPTIONAL_KERNEL_RWX is not set @@ -21,11 +19,21 @@ CONFIG_ARCH_USE_QUEUED_RWLOCKS=y CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y # CONFIG_ARCH_WANTS_THP_SWAP is not set CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +# CONFIG_ARM_GIC_V3_ITS is not set +CONFIG_ASN1=y +CONFIG_ASSOCIATIVE_ARRAY=y +CONFIG_ASYMMETRIC_KEY_TYPE=y +CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y # CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_CC_STACKPROTECTOR_AUTO is not set CONFIG_CEVT_R4K=y +CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y +CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y +# CONFIG_CHASH is not set CONFIG_CLKDEV_LOOKUP=y CONFIG_CLONE_BACKWARDS=y +CONFIG_CLZ_TAB=y CONFIG_CPU_BIG_ENDIAN=y CONFIG_CPU_GENERIC_DUMP_TLB=y CONFIG_CPU_HAS_PREFETCH=y @@ -41,27 +49,38 @@ CONFIG_CPU_R4K_FPU=y CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y CONFIG_CPU_SUPPORTS_HIGHMEM=y CONFIG_CPU_SUPPORTS_MSA=y -CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_ACOMP2=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_AKCIPHER=y +CONFIG_CRYPTO_AKCIPHER2=y CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_HASH_INFO=y +CONFIG_CRYPTO_KPP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_RSA=y +# CONFIG_CRYPTO_SM3 is not set CONFIG_CRYPTO_WORKQUEUE=y CONFIG_CSRC_R4K=y +# CONFIG_DMA_DIRECT_OPS is not set CONFIG_DMA_NONCOHERENT=y -# CONFIG_DMA_NOOP_OPS is not set # CONFIG_DMA_VIRT_OPS is not set +# CONFIG_DP83822_PHY is not set # CONFIG_DRM_LIB_RANDOM is not set CONFIG_DTC=y # CONFIG_DT_EASY50712 is not set CONFIG_EARLY_PRINTK=y -CONFIG_ETHERNET_PACKET_MANGLE=y CONFIG_EXPORTFS=y +# CONFIG_FIND_BIT_BENCHMARK is not set CONFIG_FIXED_PHY=y CONFIG_FUTEX_PI=y +# CONFIG_GEMINI_ETHERNET is not set CONFIG_GENERIC_ATOMIC64=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CMOS_UPDATE=y CONFIG_GENERIC_CPU_AUTOPROBE=y -CONFIG_GENERIC_IO=y CONFIG_GENERIC_IRQ_CHIP=y CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y CONFIG_GENERIC_IRQ_IPI=y @@ -72,10 +91,13 @@ CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GPIOLIB=y +# CONFIG_GPIO_MAX3191X is not set +# CONFIG_GPIO_MB86S7X is not set CONFIG_GPIO_MM_LANTIQ=y CONFIG_GPIO_STP_XWAY=y CONFIG_GPIO_SYSFS=y # CONFIG_GRO_CELLS is not set +# CONFIG_GUP_BENCHMARK is not set CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDWARE_WATCHPOINTS=y CONFIG_HAS_DMA=y @@ -130,12 +152,14 @@ CONFIG_IRQ_DOMAIN_HIERARCHY=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_IRQ_MIPS_CPU=y CONFIG_IRQ_WORK=y +CONFIG_KEYS=y CONFIG_LANTIQ=y CONFIG_LANTIQ_DT_NONE=y CONFIG_LANTIQ_ETOP=y CONFIG_LANTIQ_WDT=y # CONFIG_LANTIQ_XRX200 is not set CONFIG_LEDS_GPIO=y +# CONFIG_LEDS_TRIGGER_ACTIVITY is not set CONFIG_LIBFDT=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y @@ -157,7 +181,9 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5 CONFIG_MIPS_RAW_APPENDED_DTB=y CONFIG_MIPS_SPRAM=y # CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MISC_RTSX is not set CONFIG_MODULES_USE_ELF_REL=y +CONFIG_MPILIB=y CONFIG_MTD_CFI_ADV_OPTIONS=y CONFIG_MTD_CFI_GEOMETRY=y CONFIG_MTD_CMDLINE_PARTS=y @@ -165,23 +191,31 @@ CONFIG_MTD_JEDECPROBE=y CONFIG_MTD_LANTIQ=y CONFIG_MTD_M25P80=y CONFIG_MTD_SPI_NOR=y -CONFIG_MTD_SPLIT_BRNIMAGE_FW=y -CONFIG_MTD_SPLIT_EVA_FW=y -CONFIG_MTD_SPLIT_FIRMWARE=y -CONFIG_MTD_SPLIT_TPLINK_FW=y -CONFIG_MTD_SPLIT_UIMAGE_FW=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NEED_PER_CPU_KM=y +# CONFIG_NETDEVSIM is not set +CONFIG_NET_DSA=y +CONFIG_NET_DSA_GSWIP=y +CONFIG_NET_DSA_LEGACY=y +CONFIG_NET_DSA_TAG_GSWIP=y +# CONFIG_NET_SCH_CBS is not set +CONFIG_NET_SWITCHDEV=y +CONFIG_NET_VENDOR_CORTINA=y +CONFIG_NET_VENDOR_SOCIONEXT=y CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y # CONFIG_NO_IOPORT_MAP is not set +# CONFIG_OCXL_BASE is not set CONFIG_OF=y CONFIG_OF_ADDRESS=y CONFIG_OF_EARLY_FLATTREE=y CONFIG_OF_FLATTREE=y CONFIG_OF_GPIO=y CONFIG_OF_IRQ=y +CONFIG_OF_KOBJ=y CONFIG_OF_MDIO=y CONFIG_OF_NET=y +CONFIG_OID_REGISTRY=y +CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y CONFIG_PCI_DRIVERS_LEGACY=y CONFIG_PERF_USE_VMALLOC=y CONFIG_PGTABLE_LEVELS=2 @@ -191,34 +225,45 @@ CONFIG_PINCTRL=y CONFIG_PINCTRL_LANTIQ=y # CONFIG_PINCTRL_SINGLE is not set CONFIG_PINCTRL_XWAY=y +CONFIG_PKCS7_MESSAGE_PARSER=y +# CONFIG_PKCS7_TEST_KEY is not set CONFIG_POWER_RESET=y CONFIG_POWER_RESET_SYSCON=y -CONFIG_PSB6970_PHY=y # CONFIG_RCU_NEED_SEGCBLIST is not set # CONFIG_RCU_STALL_COMMON is not set CONFIG_REGMAP=y CONFIG_REGMAP_MMIO=y +# CONFIG_RENESAS_PHY is not set +# CONFIG_RESET_AXS10X is not set CONFIG_RESET_CONTROLLER=y CONFIG_RESET_LANTIQ=y -CONFIG_RTL8366RB_PHY=y -CONFIG_RTL8366_SMI=y +# CONFIG_RESET_SIMPLE is not set +CONFIG_RFKILL_LEDS=y +# CONFIG_RPMSG_VIRTIO is not set +CONFIG_RUNTIME_TESTING_MENU=y # CONFIG_SCHED_INFO is not set # CONFIG_SCSI_DMA is not set -# CONFIG_SENSORS_LTQ_CPUTEMP is not set +# CONFIG_SECONDARY_TRUSTED_KEYRING is not set # CONFIG_SERIAL_8250 is not set CONFIG_SERIAL_LANTIQ=y +CONFIG_SGL_ALLOC=y +# CONFIG_SIOX is not set +# CONFIG_SLIMBUS is not set # CONFIG_SOC_AMAZON_SE is not set # CONFIG_SOC_FALCON is not set CONFIG_SOC_TYPE_XWAY=y CONFIG_SOC_XWAY=y +# CONFIG_SOUNDWIRE is not set CONFIG_SPI=y CONFIG_SPI_LANTIQ_SSC=y CONFIG_SPI_MASTER=y CONFIG_SRCU=y CONFIG_SWAP_IO_SPACE=y -CONFIG_SWCONFIG=y CONFIG_SWPHY=y CONFIG_SYSCTL_EXCEPTION_TRACE=y +CONFIG_SYSTEM_DATA_VERIFICATION=y +# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set +CONFIG_SYSTEM_TRUSTED_KEYRING=y CONFIG_SYS_HAS_CPU_MIPS32_R1=y CONFIG_SYS_HAS_CPU_MIPS32_R2=y CONFIG_SYS_HAS_EARLY_PRINTK=y @@ -227,8 +272,13 @@ CONFIG_SYS_SUPPORTS_ARBIT_HZ=y CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y CONFIG_SYS_SUPPORTS_MIPS16=y CONFIG_SYS_SUPPORTS_MULTITHREADING=y +CONFIG_SYS_SUPPORTS_VPE_LOADER=y CONFIG_THIN_ARCHIVES=y CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_TINY_SRCU=y +# CONFIG_UNISYSSPAR is not set CONFIG_USE_OF=y +CONFIG_VIRTIO_MENU=y +CONFIG_X509_CERTIFICATE_PARSER=y +# CONFIG_XILINX_VCU is not set # CONFIG_XRX200_PHY_FW is not set diff --git a/target/linux/lantiq/files-4.16/arch/mips/boot/dts/BTHOMEHUBV5A.dts b/target/linux/lantiq/files-4.16/arch/mips/boot/dts/BTHOMEHUBV5A.dts index a3be0a5c9c..acbed18989 100644 --- a/target/linux/lantiq/files-4.16/arch/mips/boot/dts/BTHOMEHUBV5A.dts +++ b/target/linux/lantiq/files-4.16/arch/mips/boot/dts/BTHOMEHUBV5A.dts @@ -117,43 +117,59 @@ }; ð0 { - lan: interface@0 { - compatible = "lantiq,xrx200-pdi"; + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&gswip { + dsa,member = <0 0>; + + ports { #address-cells = <1>; #size-cells = <0>; - reg = <0>; - lantiq,switch; - ethernet@0 { - compatible = "lantiq,xrx200-pdi-port"; + port@0 { reg = <0>; + label = "lan3"; phy-mode = "rgmii"; phy-handle = <&phy0>; }; - ethernet@1 { - compatible = "lantiq,xrx200-pdi-port"; + + port@1 { reg = <1>; + label = "lan4"; phy-mode = "rgmii"; phy-handle = <&phy1>; }; - ethernet@2 { - compatible = "lantiq,xrx200-pdi-port"; + + port@2 { reg = <2>; + label = "lan2"; phy-mode = "gmii"; phy-handle = <&phy11>; }; - ethernet@4 { - compatible = "lantiq,xrx200-pdi-port"; + + port@4 { reg = <4>; + label = "lan1"; phy-mode = "gmii"; phy-handle = <&phy13>; }; - ethernet@5 { - compatible = "lantiq,xrx200-pdi-port"; + + port@5 { reg = <5>; + label = "wan"; phy-mode = "rgmii"; phy-handle = <&phy5>; }; + + port@6 { + reg = <0x6>; + label = "cpu"; + ethernet = <ð0>; + }; }; mdio@0 { @@ -164,33 +180,30 @@ phy0: ethernet-phy@0 { reg = <0x0>; - compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; }; phy1: ethernet-phy@1 { reg = <0x1>; - compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; }; phy5: ethernet-phy@5 { reg = <0x5>; - compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; }; phy11: ethernet-phy@11 { reg = <0x11>; - compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; }; phy13: ethernet-phy@13 { reg = <0x13>; - compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; }; }; }; &gphy0 { lantiq,gphy-mode = ; + compatible = "lantiq,xrx200a2x-gphy"; }; &gphy1 { lantiq,gphy-mode = ; + compatible = "lantiq,xrx200a2x-gphy"; }; &gpio { diff --git a/target/linux/lantiq/files-4.16/arch/mips/boot/dts/vr9.dtsi b/target/linux/lantiq/files-4.16/arch/mips/boot/dts/vr9.dtsi index 77e0cba30d..036dbf0ee9 100644 --- a/target/linux/lantiq/files-4.16/arch/mips/boot/dts/vr9.dtsi +++ b/target/linux/lantiq/files-4.16/arch/mips/boot/dts/vr9.dtsi @@ -270,19 +270,29 @@ phy-names = "usb2-phy"; }; - eth0: eth@e108000 { + eth0: eth@E10B308 { #address-cells = <1>; #size-cells = <0>; compatible = "lantiq,xrx200-net"; - reg = < 0xe108000 0x3000 /* switch */ - 0xe10b100 0x70 /* mdio */ - 0xe10b1d8 0x30 /* mii */ - 0xe10b308 0x30 /* pmac */ + reg = < 0xE10B308 0x30 /* pmac */ >; interrupt-parent = <&icu0>; interrupts = <75 73 72>; - resets = <&reset0 21 16>, <&reset0 8 8>; - reset-names = "switch", "ppe"; + resets = <&reset0 21 16>, <&reset0 8 8>, <&reset0 3 3>; + reset-names = "switch", "ppe", "ppe_dsp"; + lantiq,phys = <&gphy0>, <&gphy1>; + }; + + gswip: gswip@E108000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "lantiq,xrx200-gswip"; + reg = < 0xE108000 0x3000 /* switch */ + 0xE10B100 0x70 /* mdio */ + 0xE10B1D8 0x30 /* mii */ + >; + resets = <&reset0 21 16>, <&reset0 8 8>, <&reset0 3 3>; + reset-names = "switch", "ppe", "ppe_dsp"; lantiq,phys = <&gphy0>, <&gphy1>; }; diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index 031c3fcb83..b1eca2df53 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -60,6 +60,7 @@ define Device/Default KERNEL := kernel-bin | append-dtb | lzma | uImage lzma KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma FILESYSTEMS := squashfs + DEVICE_DTS_DIR := ../files-4.16/arch/mips/boot/dts/ IMAGE_SIZE := SUPPORTED_DEVICES := $(subst _,$(comma),$(1)) IMAGES := sysupgrade.bin diff --git a/target/linux/lantiq/xrx200/config-4.16 b/target/linux/lantiq/xrx200/config-4.16 index 7b15d4283b..70102b1981 100644 --- a/target/linux/lantiq/xrx200/config-4.16 +++ b/target/linux/lantiq/xrx200/config-4.16 @@ -1,25 +1,18 @@ -CONFIG_ADM6996_PHY=y -CONFIG_AR8216_PHY=y CONFIG_AT803X_PHY=y CONFIG_BLK_MQ_PCI=y +# CONFIG_CPU_ISOLATION is not set CONFIG_CPU_MIPSR2_IRQ_EI=y CONFIG_CPU_MIPSR2_IRQ_VI=y CONFIG_CPU_RMAP=y CONFIG_CRC16=y -CONFIG_CRYPTO_ACOMP2=y CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -CONFIG_CRYPTO_NULL2=y CONFIG_EXTRA_FIRMWARE="lantiq/xrx200_phy11g_a14.bin lantiq/xrx200_phy11g_a22.bin lantiq/xrx200_phy22f_a14.bin lantiq/xrx200_phy22f_a22.bin" CONFIG_EXTRA_FIRMWARE_DIR="firmware" -CONFIG_FIRMWARE_IN_KERNEL=y +# CONFIG_GPIO_PCIE_IDIO_24 is not set CONFIG_HWMON=y CONFIG_ICPLUS_PHY=y -CONFIG_IFX_VPE_EXT=y CONFIG_INPUT=y CONFIG_INPUT_EVDEV=y CONFIG_INPUT_POLLDEV=y @@ -32,12 +25,15 @@ CONFIG_LZO_DECOMPRESS=y CONFIG_MIPS_MT=y # CONFIG_MIPS_MT_FPAFF is not set CONFIG_MIPS_MT_SMP=y +CONFIG_MIPS_NR_CPU_NR_MAP=2 CONFIG_MIPS_PERF_SHARED_TC_COUNTERS=y CONFIG_MIPS_VPE_APSP_API=y CONFIG_MIPS_VPE_APSP_API_MT=y CONFIG_MIPS_VPE_LOADER=y CONFIG_MIPS_VPE_LOADER_MT=y CONFIG_MIPS_VPE_LOADER_TOM=y +# CONFIG_MISC_RTSX_PCI is not set +# CONFIG_MISC_RTSX_USB is not set CONFIG_MTD_NAND=y CONFIG_MTD_NAND_ECC=y CONFIG_MTD_NAND_PLATFORM=y @@ -52,12 +48,9 @@ CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_NET_FLOW_LIMIT=y CONFIG_NLS=y CONFIG_NR_CPUS=2 -CONFIG_OF_ADDRESS_PCI=y -CONFIG_OF_PCI=y -CONFIG_OF_PCI_IRQ=y CONFIG_PADATA=y CONFIG_PCI=y -CONFIG_PCIE_LANTIQ=y +# CONFIG_PCIE_CADENCE_HOST is not set CONFIG_PCI_DOMAINS=y CONFIG_PCI_LANTIQ=y CONFIG_POWER_RESET_GPIO=y @@ -70,19 +63,15 @@ CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_RFS_ACCEL=y CONFIG_RPS=y -CONFIG_RTL8306_PHY=y -CONFIG_RTL8366S_PHY=y -CONFIG_RTL8367B_PHY=y -CONFIG_RTL8367_PHY=y CONFIG_SENSORS_LTQ_CPUTEMP=y CONFIG_SMP=y CONFIG_SMP_UP=y -CONFIG_SWCONFIG_LEDS=y CONFIG_SYNC_R4K=y CONFIG_SYS_SUPPORTS_SCHED_SMT=y CONFIG_SYS_SUPPORTS_SMP=y CONFIG_TREE_RCU=y CONFIG_TREE_SRCU=y +# CONFIG_TYPEC is not set CONFIG_UBIFS_FS=y CONFIG_UBIFS_FS_ADVANCED_COMPR=y CONFIG_UBIFS_FS_LZO=y -- 2.30.2