diff --git a/include/kernel-5.15 b/include/kernel-5.15 index c1c1e791f71..0f6e5c09d04 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .127 -LINUX_KERNEL_HASH-5.15.127 = add0a575341b263a06e93599fc220a5dd34cb4ca5b9d05097a5db2a061928f26 +LINUX_VERSION-5.15 = .128 +LINUX_KERNEL_HASH-5.15.128 = 0f2eca845183fd76f53b0c867c97f12b9ace2d7e8ee2cdeec7eb2897651b80de diff --git a/include/kernel-6.1 b/include/kernel-6.1 index 61bad0e5ca7..599ad1461ee 100644 --- a/include/kernel-6.1 +++ b/include/kernel-6.1 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.1 = .47 -LINUX_KERNEL_HASH-6.1.47 = 93d58b6af007a5f44dd26831ff310707deb1ab9380c5136a534287eb3fddfcab +LINUX_VERSION-6.1 = .48 +LINUX_KERNEL_HASH-6.1.48 = c606cbd0353e677df6fae73cc16ba3c9244b98372ed7771d551024016f55ac31 diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile index 2d44c218f24..f424abbd445 100644 --- a/package/boot/uboot-rockchip/Makefile +++ b/package/boot/uboot-rockchip/Makefile @@ -66,6 +66,13 @@ define U-Boot/roc-cc-rk3328 firefly_roc-rk3328-cc endef +define U-Boot/rock64-rk3328 + $(U-Boot/rk3328/Default) + NAME:=Rock64 + BUILD_DEVICES:= \ + pine64_rock64 +endef + # RK3399 boards define U-Boot/rk3399/Default @@ -111,7 +118,8 @@ UBOOT_TARGETS := \ nanopi-r2s-rk3328 \ orangepi-r1-plus-rk3328 \ orangepi-r1-plus-lts-rk3328 \ - roc-cc-rk3328 + roc-cc-rk3328 \ + rock64-rk3328 UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes diff --git a/package/boot/uboot-rockchip/src/of-platdata/rock64-rk3328/dt-decl.h b/package/boot/uboot-rockchip/src/of-platdata/rock64-rk3328/dt-decl.h new file mode 100644 index 00000000000..a13aaea1fb1 --- /dev/null +++ b/package/boot/uboot-rockchip/src/of-platdata/rock64-rk3328/dt-decl.h @@ -0,0 +1,27 @@ +/* + * DO NOT MODIFY + * + * Declares externs for all device/uclass instances. + * This was generated by dtoc from a .dtb (device tree binary) file. + */ + +#include +#include + +/* driver declarations - these allow DM_DRIVER_GET() to be used */ +extern U_BOOT_DRIVER(rockchip_rk3328_cru); +extern U_BOOT_DRIVER(rockchip_rk3328_dmc); +extern U_BOOT_DRIVER(rockchip_rk3288_dw_mshc); +extern U_BOOT_DRIVER(rockchip_rk3288_dw_mshc); +extern U_BOOT_DRIVER(ns16550_serial); +extern U_BOOT_DRIVER(rockchip_rk3328_spi); +extern U_BOOT_DRIVER(jedec_spi_nor); +extern U_BOOT_DRIVER(rockchip_rk3328_grf); + +/* uclass driver declarations - needed for DM_UCLASS_DRIVER_REF() */ +extern UCLASS_DRIVER(clk); +extern UCLASS_DRIVER(mmc); +extern UCLASS_DRIVER(ram); +extern UCLASS_DRIVER(serial); +extern UCLASS_DRIVER(spi_flash); +extern UCLASS_DRIVER(syscon); diff --git a/package/boot/uboot-rockchip/src/of-platdata/rock64-rk3328/dt-plat.c b/package/boot/uboot-rockchip/src/of-platdata/rock64-rk3328/dt-plat.c new file mode 100644 index 00000000000..70a8c001a3f --- /dev/null +++ b/package/boot/uboot-rockchip/src/of-platdata/rock64-rk3328/dt-plat.c @@ -0,0 +1,219 @@ +/* + * DO NOT MODIFY + * + * Declares the U_BOOT_DRIVER() records and platform data. + * This was generated by dtoc from a .dtb (device tree binary) file. + */ + +/* Allow use of U_BOOT_DRVINFO() in this file */ +#define DT_PLAT_C + +#include +#include +#include + +/* + * driver_info declarations, ordered by 'struct driver_info' linker_list idx: + * + * idx driver_info driver + * --- -------------------- -------------------- + * 0: clock_controller_at_ff440000 rockchip_rk3328_cru + * 1: dmc rockchip_rk3328_dmc + * 2: mmc_at_ff500000 rockchip_rk3288_dw_mshc + * 3: mmc_at_ff520000 rockchip_rk3288_dw_mshc + * 4: serial_at_ff130000 ns16550_serial + * 5: spi_at_ff190000 rockchip_rk3328_spi + * 6: spiflash_at_0 jedec_spi_nor + * 7: syscon_at_ff100000 rockchip_rk3328_grf + * --- -------------------- -------------------- + */ + +/* + * Node /clock-controller@ff440000 index 0 + * driver rockchip_rk3328_cru parent None + */ +static struct dtd_rockchip_rk3328_cru dtv_clock_controller_at_ff440000 = { + .reg = {0xff440000, 0x1000}, + .rockchip_grf = 0x3b, +}; +U_BOOT_DRVINFO(clock_controller_at_ff440000) = { + .name = "rockchip_rk3328_cru", + .plat = &dtv_clock_controller_at_ff440000, + .plat_size = sizeof(dtv_clock_controller_at_ff440000), + .parent_idx = -1, +}; + +/* + * Node /dmc index 1 + * driver rockchip_rk3328_dmc parent None + */ +static struct dtd_rockchip_rk3328_dmc dtv_dmc = { + .reg = {0xff400000, 0x1000, 0xff780000, 0x3000, 0xff100000, 0x1000, 0xff440000, 0x1000, + 0xff720000, 0x1000, 0xff798000, 0x1000}, + .rockchip_sdram_params = {0x1, 0xc, 0x3, 0x1, 0x0, 0x0, 0x10, 0x10, + 0x10, 0x10, 0x0, 0x98899459, 0x0, 0x2e, 0x544, 0x15, + 0x432, 0xff, 0x320, 0x6, 0x1, 0x0, 0x1, 0x0, + 0x43041008, 0x64, 0x300054, 0xd0, 0x500002, 0xd4, 0x10000, 0xd8, + 0xe03, 0xdc, 0x43001a, 0xe0, 0x10000, 0xe4, 0xe0005, 0xf4, + 0xf011f, 0x100, 0xb141b11, 0x104, 0x3031a, 0x108, 0x3060809, 0x10c, + 0x606000, 0x110, 0x8020409, 0x114, 0x1010606, 0x118, 0x2020004, 0x120, + 0x404, 0x138, 0x58, 0x180, 0x900024, 0x184, 0x1400000, 0x190, + 0x7050002, 0x198, 0x5001100, 0x1a0, 0xc0400003, 0x240, 0xa020b28, 0x244, + 0x101, 0x250, 0xf00, 0x490, 0x1, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0x4, 0xb, 0x28, 0xc, 0x2c, + 0x0, 0x30, 0x6, 0xffffffff, 0xffffffff, 0x77, 0x88, 0x79, + 0x79, 0x87, 0x97, 0x87, 0x78, 0x77, 0x78, 0x87, + 0x88, 0x87, 0x87, 0x77, 0x78, 0x78, 0x78, 0x78, + 0x78, 0x78, 0x78, 0x78, 0x78, 0x69, 0x9, 0x77, + 0x78, 0x77, 0x78, 0x77, 0x78, 0x77, 0x78, 0x77, + 0x79, 0x9, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, + 0x78, 0x78, 0x78, 0x69, 0x9, 0x77, 0x78, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x79, 0x9, + 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, + 0x78, 0x69, 0x9, 0x77, 0x78, 0x77, 0x78, 0x77, + 0x78, 0x77, 0x78, 0x77, 0x79, 0x9, 0x78, 0x78, + 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x69, + 0x9, 0x77, 0x78, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x79, 0x9}, +}; +U_BOOT_DRVINFO(dmc) = { + .name = "rockchip_rk3328_dmc", + .plat = &dtv_dmc, + .plat_size = sizeof(dtv_dmc), + .parent_idx = -1, +}; + +/* + * Node /mmc@ff500000 index 2 + * driver rockchip_rk3288_dw_mshc parent None + */ +static struct dtd_rockchip_rk3288_dw_mshc dtv_mmc_at_ff500000 = { + .bus_width = 0x4, + .cap_mmc_highspeed = true, + .cap_sd_highspeed = true, + .clocks = { + {0, {317}}, + {0, {33}}, + {0, {74}}, + {0, {78}},}, + .disable_wp = true, + .fifo_depth = 0x100, + .interrupts = {0x0, 0xc, 0x4}, + .max_frequency = 0x8f0d180, + .pinctrl_0 = {0x4a, 0x4b, 0x4c, 0x4d}, + .pinctrl_names = "default", + .reg = {0xff500000, 0x4000}, + .u_boot_spl_fifo_mode = true, + .vmmc_supply = 0x4e, +}; +U_BOOT_DRVINFO(mmc_at_ff500000) = { + .name = "rockchip_rk3288_dw_mshc", + .plat = &dtv_mmc_at_ff500000, + .plat_size = sizeof(dtv_mmc_at_ff500000), + .parent_idx = -1, +}; + +/* + * Node /mmc@ff520000 index 3 + * driver rockchip_rk3288_dw_mshc parent None + */ +static struct dtd_rockchip_rk3288_dw_mshc dtv_mmc_at_ff520000 = { + .bus_width = 0x8, + .cap_mmc_highspeed = true, + .clocks = { + {0, {319}}, + {0, {35}}, + {0, {76}}, + {0, {80}},}, + .fifo_depth = 0x100, + .interrupts = {0x0, 0xe, 0x4}, + .max_frequency = 0x8f0d180, + .mmc_hs200_1_8v = true, + .non_removable = true, + .pinctrl_0 = {0x4f, 0x50, 0x51, 0x0}, + .pinctrl_names = "default", + .reg = {0xff520000, 0x4000}, + .u_boot_spl_fifo_mode = true, + .vmmc_supply = 0x1e, + .vqmmc_supply = 0x1f, +}; +U_BOOT_DRVINFO(mmc_at_ff520000) = { + .name = "rockchip_rk3288_dw_mshc", + .plat = &dtv_mmc_at_ff520000, + .plat_size = sizeof(dtv_mmc_at_ff520000), + .parent_idx = -1, +}; + +/* + * Node /serial@ff130000 index 4 + * driver ns16550_serial parent None + */ +static struct dtd_ns16550_serial dtv_serial_at_ff130000 = { + .clock_frequency = 0x16e3600, + .clocks = { + {0, {40}}, + {0, {212}},}, + .dma_names = {"tx", "rx"}, + .dmas = {0x10, 0x6, 0x10, 0x7}, + .interrupts = {0x0, 0x39, 0x4}, + .pinctrl_0 = 0x27, + .pinctrl_names = "default", + .reg = {0xff130000, 0x100}, + .reg_io_width = 0x4, + .reg_shift = 0x2, +}; +U_BOOT_DRVINFO(serial_at_ff130000) = { + .name = "ns16550_serial", + .plat = &dtv_serial_at_ff130000, + .plat_size = sizeof(dtv_serial_at_ff130000), + .parent_idx = -1, +}; + +/* Node /spi@ff190000 index 5 */ +static struct dtd_rockchip_rk3328_spi dtv_spi_at_ff190000 = { + .clocks = { + {0, {32}}, + {0, {209}},}, + .dma_names = {"tx", "rx"}, + .dmas = {0x10, 0x8, 0x10, 0x9}, + .interrupts = {0x0, 0x31, 0x4}, + .pinctrl_0 = {0x2f, 0x30, 0x31, 0x32}, + .pinctrl_names = "default", + .reg = {0xff190000, 0x1000}, +}; +U_BOOT_DRVINFO(spi_at_ff190000) = { + .name = "rockchip_rk3328_spi", + .plat = &dtv_spi_at_ff190000, + .plat_size = sizeof(dtv_spi_at_ff190000), + .parent_idx = -1, +}; + +/* + * Node /spi@ff190000/spiflash@0 index 6 + * driver jedec_spi_nor parent None + */ +static struct dtd_jedec_spi_nor dtv_spiflash_at_0 = { + .reg = {0x0}, + .spi_max_frequency = 0x2faf080, +}; +U_BOOT_DRVINFO(spiflash_at_0) = { + .name = "jedec_spi_nor", + .plat = &dtv_spiflash_at_0, + .plat_size = sizeof(dtv_spiflash_at_0), + .parent_idx = 5, +}; + +/* + * Node /syscon@ff100000 index 7 + * driver rockchip_rk3328_grf parent None + */ +static struct dtd_rockchip_rk3328_grf dtv_syscon_at_ff100000 = { + .reg = {0xff100000, 0x1000}, +}; +U_BOOT_DRVINFO(syscon_at_ff100000) = { + .name = "rockchip_rk3328_grf", + .plat = &dtv_syscon_at_ff100000, + .plat_size = sizeof(dtv_syscon_at_ff100000), + .parent_idx = -1, +}; + diff --git a/package/boot/uboot-rockchip/src/of-platdata/rock64-rk3328/dt-structs-gen.h b/package/boot/uboot-rockchip/src/of-platdata/rock64-rk3328/dt-structs-gen.h new file mode 100644 index 00000000000..e15d8487295 --- /dev/null +++ b/package/boot/uboot-rockchip/src/of-platdata/rock64-rk3328/dt-structs-gen.h @@ -0,0 +1,63 @@ +/* + * DO NOT MODIFY + * + * Defines the structs used to hold devicetree data. + * This was generated by dtoc from a .dtb (device tree binary) file. + */ + +#include +#include +struct dtd_jedec_spi_nor { + fdt32_t reg[1]; + fdt32_t spi_max_frequency; +}; +struct dtd_ns16550_serial { + fdt32_t clock_frequency; + struct phandle_1_arg clocks[2]; + const char * dma_names[2]; + fdt32_t dmas[4]; + fdt32_t interrupts[3]; + fdt32_t pinctrl_0; + const char * pinctrl_names; + fdt64_t reg[2]; + fdt32_t reg_io_width; + fdt32_t reg_shift; +}; +struct dtd_rockchip_rk3288_dw_mshc { + fdt32_t bus_width; + bool cap_mmc_highspeed; + bool cap_sd_highspeed; + struct phandle_1_arg clocks[4]; + bool disable_wp; + fdt32_t fifo_depth; + fdt32_t interrupts[3]; + fdt32_t max_frequency; + bool mmc_hs200_1_8v; + bool non_removable; + fdt32_t pinctrl_0[4]; + const char * pinctrl_names; + fdt64_t reg[2]; + bool u_boot_spl_fifo_mode; + fdt32_t vmmc_supply; + fdt32_t vqmmc_supply; +}; +struct dtd_rockchip_rk3328_cru { + fdt64_t reg[2]; + fdt32_t rockchip_grf; +}; +struct dtd_rockchip_rk3328_dmc { + fdt64_t reg[12]; + fdt32_t rockchip_sdram_params[196]; +}; +struct dtd_rockchip_rk3328_grf { + fdt64_t reg[2]; +}; +struct dtd_rockchip_rk3328_spi { + struct phandle_1_arg clocks[2]; + const char * dma_names[2]; + fdt32_t dmas[4]; + fdt32_t interrupts[3]; + fdt32_t pinctrl_0[4]; + const char * pinctrl_names; + fdt64_t reg[2]; +}; diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile index 7cadf6ff32b..be4c8411a96 100644 --- a/package/boot/uboot-sunxi/Makefile +++ b/package/boot/uboot-sunxi/Makefile @@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2020.07 +PKG_VERSION:=2023.04 -PKG_HASH:=c1f5bf9ee6bb6e648edbf19ce2ca9452f614b08a9f886f1a566aa42e8cf05f6a +PKG_HASH:=e31cac91545ff41b71cec5d8c22afd695645cd6e2a442ccdacacd60534069341 PKG_MAINTAINER:=Zoltan HERPAI @@ -392,7 +392,7 @@ UBOOT_TARGETS := \ UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes UBOOT_MAKE_FLAGS += \ - BL31=$(STAGING_DIR_IMAGE)/bl31_sunxi-$(ATF).bin + BL31=$(STAGING_DIR_IMAGE)/bl31_sunxi-$(ATF).bin SCP=/dev/null define Build/InstallDev $(INSTALL_DIR) $(STAGING_DIR_IMAGE) diff --git a/package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch b/package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch deleted file mode 100644 index fab06e6a8e7..00000000000 --- a/package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch +++ /dev/null @@ -1,375 +0,0 @@ ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -475,6 +475,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \ - sun6i-a31-m9.dtb \ - sun6i-a31-mele-a1000g-quad.dtb \ - sun6i-a31-mixtile-loftq.dtb \ -+ sun6i-a31-pangolin.dtb \ - sun6i-a31s-colorfly-e708-q1.dtb \ - sun6i-a31s-cs908.dtb \ - sun6i-a31s-inet-q972.dtb \ ---- a/arch/arm/dts/sun6i-a31.dtsi -+++ b/arch/arm/dts/sun6i-a31.dtsi -@@ -641,6 +641,11 @@ - function = "lcd0"; - }; - -+ i2c3_pins_a: i2c3@0 { -+ allwinner,pins = "PB5", "PB6"; -+ allwinner,function = "i2c3"; -+ }; -+ - mmc0_pins_a: mmc0@0 { - pins = "PF0", "PF1", "PF2", - "PF3", "PF4", "PF5"; ---- /dev/null -+++ b/arch/arm/dts/sun6i-a31-pangolin.dts -@@ -0,0 +1,292 @@ -+/* -+ * Copyright 2015, Theobroma Systems Design und Consulting GmbH -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+/dts-v1/; -+#include "sun6i-a31.dtsi" -+#include "sunxi-common-regulators.dtsi" -+ -+#include -+#include -+ -+/ { -+ model = "Theobroma Systems A31 Pangolin"; -+ compatible = "tsd,a31-pangolin", "allwinner,sun6i-a31"; -+ -+ aliases { -+ serial0 = &uart0; -+ serial2 = &uart2; -+ spi0 = &spi0; -+ spi1 = &spi1; -+ spi2 = &spi2; -+ spi3 = &spi3; -+ }; -+ -+ chosen { -+ stdout-path = "serial2:115200n8"; -+ }; -+}; -+ -+&ehci0 { -+ status = "okay"; -+}; -+ -+&ohci0 { -+ status = "okay"; -+}; -+ -+&ehci1 { -+ status = "okay"; -+}; -+ -+&ohci1 { -+ status = "okay"; -+}; -+ -+&ohci2 { -+ status = "okay"; -+}; -+ -+&gmac { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&gmac_pins_rgmii_a>; -+ phy = <&phy1>; -+ phy-mode = "rgmii"; -+ snps,reset-gpio = <&pio 0 7 GPIO_ACTIVE_LOW>; -+ snps,reset-active-low; -+ snps,reset-delays-us = <0 10000 30000>; -+ status = "okay"; -+ -+ phy1: ethernet-phy@4 { -+ reg = <4>; -+ }; -+}; -+ -+&i2c0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c0_pins_a>; -+ status = "okay"; -+}; -+ -+&i2c1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c1_pins_a>; -+ status = "okay"; -+}; -+ -+&i2c2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c2_pins_a>; -+ status = "okay"; -+}; -+ -+&i2c3 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c3_pins_a>; -+ status = "okay"; -+ -+ rtc_twi: rtc@6f { -+ compatible = "isil,isl1208"; -+ reg = <0x6f>; -+ }; -+ fan: fan@18 { -+ compatible = "ti,amc6821"; -+ reg = <0x18>; -+ cooling-min-state = <0>; -+ cooling-max-state = <9>; -+ #cooling-cells = <2>; -+ }; -+}; -+ -+&spi0 { -+ status = "okay"; -+ -+ flash: flash@0 { -+ compatible = "spansion,m25p40"; -+ spi-max-frequency = <16000000>; -+ spi-cpol; -+ spi-cpha; -+ }; -+}; -+ -+&spi1 { -+ status = "okay"; -+}; -+ -+&ir { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&ir_pins_a>; -+ status = "okay"; -+}; -+ -+&mmc0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_pangolin>; -+ vmmc-supply = <®_vcc3v0>; -+ bus-width = <4>; -+ cd-gpios = <&pio 2 19 GPIO_ACTIVE_LOW>; /* PC19 */ -+ status = "okay"; -+}; -+ -+&mmc0_pins_a { -+ /* external pull-ups missing for some pins */ -+ allwinner,pull = ; -+}; -+ -+&mmc2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc2_pins_a>; -+ vmmc-supply = <®_vcc3v0>; -+ bus-width = <8>; -+ non-removable; -+ status = "okay"; -+}; -+ -+&pio { -+ mmc0_cd_pin_pangolin: mmc0_cd_pin@0 { -+ allwinner,pins = "PC19"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ leds_pins_pangolin: led_pins@0 { -+ allwinner,pins = "PH7", "PC16"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ mmc2_pins_a: mmc2@0 { -+ allwinner,pins = "PC6","PC7","PC8","PC9","PC10","PC11", -+ "PC12","PC13","PC14","PC15"; -+ allwinner,function = "mmc2"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+}; -+ -+&p2wi { -+ status = "okay"; -+ -+ axp221: pmic@68 { -+ compatible = "x-powers,axp221"; -+ reg = <0x68>; -+ interrupt-parent = <&nmi_intc>; -+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; -+ interrupt-controller; -+ #interrupt-cells = <1>; -+ dcdc1-supply = <&vcc_3v0>; -+ dcdc5-supply = <&vcc_dram>; -+ -+ regulators { -+ x-powers,dcdc-freq = <3000>; -+ -+ vcc_3v0: dcdc1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "vcc-3v0"; -+ }; -+ -+ vdd_cpu: dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <1320000>; -+ regulator-name = "vdd-cpu"; -+ }; -+ -+ vdd_gpu: dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <1320000>; -+ regulator-name = "vdd-gpu"; -+ }; -+ -+ vdd_sys_dll: dcdc4 { -+ regulator-always-on; -+ regulator-min-microvolt = <1100000>; -+ regulator-max-microvolt = <1100000>; -+ regulator-name = "vdd-sys-dll"; -+ }; -+ -+ vcc_dram: dcdc5 { -+ regulator-always-on; -+ regulator-min-microvolt = <1500000>; -+ regulator-max-microvolt = <1500000>; -+ regulator-name = "vcc-dram"; -+ }; -+ -+ vcc_wifi: aldo1 { -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc_wifi"; -+ }; -+ -+ avcc: aldo3 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "avcc"; -+ }; -+ }; -+ }; -+}; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pins_a>; -+ status = "okay"; -+}; -+ -+&usb1_vbus_pin_a { -+ allwinner,pins = "PD23"; -+}; -+ -+®_usb1_vbus { -+ gpio = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD 23 */ -+ status = "okay"; -+}; -+ -+&usbphy { -+ status = "okay"; -+ usb1_vbus-supply = <®_usb1_vbus>; -+}; ---- /dev/null -+++ b/configs/pangolin_defconfig -@@ -0,0 +1,36 @@ -+CONFIG_SUNXI_PANGOLIN=y -+CONFIG_SPL=y -+CONFIG_SYS_EXTRA_OPTIONS="USB_EHCI,SUNXI_GMAC,RGMII" -+CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-pangolin" -+CONFIG_VIDEO_VGA_VIA_LCD=y -+CONFIG_VIDEO_VGA_EXTERNAL_DAC_EN="PH25" -+CONFIG_ARM=y -+CONFIG_ARCH_SUNXI=y -+CONFIG_MACH_SUN6I=y -+CONFIG_DRAM_CHANNELS=1 -+CONFIG_DRAM_CLK=360 -+CONFIG_DRAM_ZQ=70 -+CONFIG_AXP_DCDC1_VOLT=3300 -+CONFIG_AXP_ALDO1_VOLT=0 -+CONFIG_AXP_ALDO2_VOLT=1800 -+CONFIG_AXP_ALDO3_VOLT=3000 -+CONFIG_AXP_DLDO4_VOLT=3300 -+CONFIG_AXP_ELDO1_VOLT=1200 -+CONFIG_AXP_ELDO2_VOLT=2500 -+CONFIG_AXP_ELDO3_VOLT=3300 -+CONFIG_MMC_SUNXI_SLOT_EXTRA=2 -+CONFIG_CONS_INDEX=3 -+# Vbus gpio for usb1 -+CONFIG_USB1_VBUS_PIN="" -+# No Vbus gpio for usb2 -+CONFIG_USB2_VBUS_PIN="" -+CONFIG_USB=y -+CONFIG_DM_USB=y -+CONFIG_USB_EHCI=y -+CONFIG_USB_KEYBOARD=y -+CONFIG_DM_ETH=y -+CONFIG_CMD_IMLS=n -+CONFIG_ETH_DESIGNWARE=y -+CONFIG_DM_SPI=y -+CONFIG_DM_SPI_FLASH=y -+CONFIG_SUNXI_SPI=y ---- a/arch/arm/mach-sunxi/Kconfig -+++ b/arch/arm/mach-sunxi/Kconfig -@@ -896,6 +896,14 @@ config VIDEO_LCD_PANEL_I2C_SCL - Set the SCL pin for the LCD i2c interface. This takes a string in the - format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H. - -+choice -+ prompt "Sunxi Board Variant" -+ optional -+ -+config SUNXI_PANGOLIN -+ bool "Theobroma A31 uQ7 Board" -+ -+endchoice - - # Note only one of these may be selected at a time! But hidden choices are - # not supported by Kconfig diff --git a/package/boot/uboot-sunxi/patches/062-A20-improve-gmac-upload.patch b/package/boot/uboot-sunxi/patches/062-A20-improve-gmac-upload.patch index 27b476472cf..13a703f307d 100644 --- a/package/boot/uboot-sunxi/patches/062-A20-improve-gmac-upload.patch +++ b/package/boot/uboot-sunxi/patches/062-A20-improve-gmac-upload.patch @@ -2,7 +2,7 @@ --- a/configs/A20-OLinuXino-Lime2_defconfig +++ b/configs/A20-OLinuXino-Lime2_defconfig -@@ -23,6 +23,7 @@ CONFIG_ETH_DESIGNWARE=y +@@ -26,6 +26,7 @@ CONFIG_ETH_DESIGNWARE=y CONFIG_RGMII=y CONFIG_MII=y CONFIG_SUN7I_GMAC=y diff --git a/package/boot/uboot-sunxi/patches/063-fix-lime2-revK-add-micrel-PHY.patch b/package/boot/uboot-sunxi/patches/063-fix-lime2-revK-add-micrel-PHY.patch deleted file mode 100644 index e1ed58ee0d2..00000000000 --- a/package/boot/uboot-sunxi/patches/063-fix-lime2-revK-add-micrel-PHY.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- a/configs/A20-OLinuXino-Lime2-eMMC_defconfig -+++ b/configs/A20-OLinuXino-Lime2-eMMC_defconfig -@@ -8,6 +8,8 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=2 - CONFIG_USB0_VBUS_PIN="PC17" - CONFIG_USB0_VBUS_DET="PH5" - CONFIG_I2C1_ENABLE=y -+CONFIG_PHY_MICREL=y -+CONFIG_PHY_MICREL_KSZ90X1=y - CONFIG_SATAPWR="PC3" - CONFIG_SPL_SPI_SUNXI=y - CONFIG_AHCI=y ---- a/configs/A20-OLinuXino-Lime2_defconfig -+++ b/configs/A20-OLinuXino-Lime2_defconfig -@@ -7,6 +7,8 @@ CONFIG_MMC0_CD_PIN="PH1" - CONFIG_USB0_VBUS_PIN="PC17" - CONFIG_USB0_VBUS_DET="PH5" - CONFIG_I2C1_ENABLE=y -+CONFIG_PHY_MICREL=y -+CONFIG_PHY_MICREL_KSZ90X1=y - CONFIG_SATAPWR="PC3" - CONFIG_AHCI=y - # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set ---- a/drivers/net/phy/micrel_ksz90x1.c -+++ b/drivers/net/phy/micrel_ksz90x1.c -@@ -14,6 +14,8 @@ - #include - #include - #include -+#include -+#include - - /* - * KSZ9021 - KSZ9031 common -@@ -344,6 +346,10 @@ static int ksz9031_phy_extwrite(struct p - static int ksz9031_config(struct phy_device *phydev) - { - int ret; -+ struct sunxi_ccm_reg *const ccm = -+ (struct sunxi_ccm_reg *)SUNXI_CCM_BASE; -+ -+ setbits_le32(&ccm->gmac_clk_cfg, CCM_GMAC_CTRL_TX_CLK_DELAY(4)); - - ret = ksz9031_of_config(phydev); - if (ret) diff --git a/package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch b/package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch index c637ccb792a..8605436b1ae 100644 --- a/package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch +++ b/package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch @@ -14,7 +14,7 @@ More specifically, the following settings are now used: --- a/arch/arm/mach-sunxi/clock_sun6i.c +++ b/arch/arm/mach-sunxi/clock_sun6i.c -@@ -114,11 +114,12 @@ void clock_set_pll1(unsigned int clk) +@@ -131,11 +131,12 @@ void clock_set_pll1(unsigned int clk) struct sunxi_ccm_reg * const ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE; const int p = 0; diff --git a/package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch b/package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch index c20db1352ed..b5fa2a14157 100644 --- a/package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch +++ b/package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch @@ -18,7 +18,7 @@ required setting for the PLL LDO is 1.37v as per the A31 manual. --- a/arch/arm/mach-sunxi/clock_sun6i.c +++ b/arch/arm/mach-sunxi/clock_sun6i.c -@@ -27,13 +27,26 @@ void clock_init_safe(void) +@@ -28,13 +28,26 @@ void clock_init_safe(void) struct sunxi_prcm_reg * const prcm = (struct sunxi_prcm_reg *)SUNXI_PRCM_BASE; @@ -47,8 +47,8 @@ required setting for the PLL LDO is 1.37v as per the A31 manual. #endif #if defined(CONFIG_MACH_SUN8I_R40) || defined(CONFIG_MACH_SUN50I) ---- a/arch/arm/include/asm/arch-sunxi/prcm.h -+++ b/arch/arm/include/asm/arch-sunxi/prcm.h +--- a/arch/arm/include/asm/arch-sunxi/prcm_sun6i.h ++++ b/arch/arm/include/asm/arch-sunxi/prcm_sun6i.h @@ -110,13 +110,13 @@ #define PRCM_PLL_CTRL_LDO_OUT_MASK \ __PRCM_PLL_CTRL_LDO_OUT(0x7) diff --git a/package/boot/uboot-sunxi/patches/100-sun6i-alternate-on-UART2.patch b/package/boot/uboot-sunxi/patches/100-sun6i-alternate-on-UART2.patch deleted file mode 100644 index a7afa513041..00000000000 --- a/package/boot/uboot-sunxi/patches/100-sun6i-alternate-on-UART2.patch +++ /dev/null @@ -1,16 +0,0 @@ -From d7311b6e7cdd1fc0e92665188e650934718cb2b1 Mon Sep 17 00:00:00 2001 -From: Philipp Tomsich -Date: Tue, 16 Jun 2015 10:52:01 +0200 -Subject: sun6i: define alternate-function for UART2 on GPG - - ---- a/arch/arm/include/asm/arch-sunxi/gpio.h -+++ b/arch/arm/include/asm/arch-sunxi/gpio.h -@@ -190,6 +190,7 @@ enum sunxi_gpio_number { - #define SUN6I_GPG_SDC1 2 - #define SUN8I_GPG_SDC1 2 - #define SUN6I_GPG_TWI3 2 -+#define SUN6I_GPG_UART2 2 - #define SUN5I_GPG_UART1 4 - - #define SUN6I_GPH_PWM 2 diff --git a/package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch b/package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch deleted file mode 100644 index 4cbf0ea1d8a..00000000000 --- a/package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch +++ /dev/null @@ -1,30 +0,0 @@ -From c058dfb69136d62f88ae8b121104bdb7ce2df03f Mon Sep 17 00:00:00 2001 -From: Philipp Tomsich -Date: Tue, 16 Jun 2015 10:53:11 +0200 -Subject: ARM: sun6i: Support console on UART2 (GPG6/GPG7) - - ---- a/arch/arm/mach-sunxi/board.c -+++ b/arch/arm/mach-sunxi/board.c -@@ -132,6 +132,10 @@ static int gpio_init(void) - sunxi_gpio_set_cfgpin(SUNXI_GPG(3), SUN5I_GPG_UART1); - sunxi_gpio_set_cfgpin(SUNXI_GPG(4), SUN5I_GPG_UART1); - sunxi_gpio_set_pull(SUNXI_GPG(4), SUNXI_GPIO_PULL_UP); -+#elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN6I) -+ sunxi_gpio_set_cfgpin(SUNXI_GPG(6), SUN6I_GPG_UART2); -+ sunxi_gpio_set_cfgpin(SUNXI_GPG(7), SUN6I_GPG_UART2); -+ sunxi_gpio_set_pull(SUNXI_GPG(7), SUNXI_GPIO_PULL_UP); - #elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN8I) - sunxi_gpio_set_cfgpin(SUNXI_GPB(0), SUN8I_GPB_UART2); - sunxi_gpio_set_cfgpin(SUNXI_GPB(1), SUN8I_GPB_UART2); ---- a/include/configs/sunxi-common.h -+++ b/include/configs/sunxi-common.h -@@ -244,6 +244,8 @@ extern int soft_i2c_gpio_scl; - #endif - #elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUN5I) - #define OF_STDOUT_PATH "/soc@01c00000/serial@01c28400:115200" -+#elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN6I) -+#define OF_STDOUT_PATH "/soc@01c00000/serial@01c28800:115200" - #elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN8I) - #define OF_STDOUT_PATH "/soc@01c00000/serial@01c28800:115200" - #elif CONFIG_CONS_INDEX == 5 && defined(CONFIG_MACH_SUN8I) diff --git a/package/boot/uboot-sunxi/patches/102-sunxi-make_CONS_INDEX-configurable.patch b/package/boot/uboot-sunxi/patches/102-sunxi-make_CONS_INDEX-configurable.patch deleted file mode 100644 index b85e2af9fce..00000000000 --- a/package/boot/uboot-sunxi/patches/102-sunxi-make_CONS_INDEX-configurable.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 78d5fab8e345b1273ec8c22d06f1a1d27670b518 Mon Sep 17 00:00:00 2001 -From: Philipp Tomsich -Date: Tue, 16 Jun 2015 10:59:38 +0200 -Subject: ARM: sunxi: Make CONS_INDEX configurable - - ---- a/arch/arm/mach-sunxi/Kconfig -+++ b/arch/arm/mach-sunxi/Kconfig -@@ -559,6 +559,14 @@ config SYS_BOARD - config SYS_SOC - default "sunxi" - -+config CONS_INDEX -+ int "UART used for console" -+ range 1 5 -+ default 1 -+ ---help--- -+ Defines the UART port used for serial output. It starts at 1 so UART0 is 1, -+ UART1 is 2 and so on. -+ - config UART0_PORT_F - bool "UART0 on MicroSD breakout board" - default n diff --git a/package/boot/uboot-sunxi/patches/200-mkimage-check-environment-for-dtc-binary-location.patch b/package/boot/uboot-sunxi/patches/200-mkimage-check-environment-for-dtc-binary-location.patch index 8aeae91ef46..fcc30ce35cd 100644 --- a/package/boot/uboot-sunxi/patches/200-mkimage-check-environment-for-dtc-binary-location.patch +++ b/package/boot/uboot-sunxi/patches/200-mkimage-check-environment-for-dtc-binary-location.patch @@ -17,7 +17,7 @@ Cc: Simon Glass --- a/tools/fit_image.c +++ b/tools/fit_image.c -@@ -751,9 +751,14 @@ static int fit_handle_file(struct image_ +@@ -754,9 +754,14 @@ static int fit_handle_file(struct image_ } *cmd = '\0'; } else if (params->datafile) { diff --git a/package/boot/uboot-sunxi/patches/210-sunxi-deactivate-binman.patch b/package/boot/uboot-sunxi/patches/210-sunxi-deactivate-binman.patch deleted file mode 100644 index 48ddf6d318d..00000000000 --- a/package/boot/uboot-sunxi/patches/210-sunxi-deactivate-binman.patch +++ /dev/null @@ -1,37 +0,0 @@ -From def280c4792262a368c8861312dc6b376181021f Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Mon, 1 Jan 2018 23:10:56 +0100 -Subject: sunxi: deactivate binman - -Use the old way to generate the images instead of binman. -binman needs python with swig to avoid this host tool dependency use the -old way of generating images. ---- - Makefile | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - ---- a/Makefile -+++ b/Makefile -@@ -1607,8 +1607,10 @@ endif - - ifneq ($(CONFIG_ARCH_SUNXI),) - ifeq ($(CONFIG_ARM64),) --u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE -- $(call if_changed,binman) -+OBJCOPYFLAGS_u-boot-sunxi-with-spl.bin = -I binary -O binary \ -+ --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff -+u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img FORCE -+ $(call if_changed,pad_cat) - else - u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.itb FORCE - $(call if_changed,cat) ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -995,7 +995,6 @@ config ARCH_SOCFPGA - - config ARCH_SUNXI - bool "Support sunxi (Allwinner) SoCs" -- select BINMAN - select CMD_GPIO - select CMD_MMC if MMC - select CMD_USB if DISTRO_DEFAULTS diff --git a/package/boot/uboot-sunxi/patches/230-disable-axp209-on-a13-olinuxino.diff b/package/boot/uboot-sunxi/patches/230-disable-axp209-on-a13-olinuxino.diff deleted file mode 100644 index bc8bd144d6a..00000000000 --- a/package/boot/uboot-sunxi/patches/230-disable-axp209-on-a13-olinuxino.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- a/configs/A13-OLinuXino_defconfig -+++ b/configs/A13-OLinuXino_defconfig -@@ -7,7 +7,6 @@ CONFIG_DRAM_EMR1=0 - CONFIG_MMC0_CD_PIN="PG0" - CONFIG_USB0_VBUS_DET="PG1" - CONFIG_USB1_VBUS_PIN="PG11" --CONFIG_AXP_GPIO=y - # CONFIG_VIDEO_HDMI is not set - CONFIG_VIDEO_VGA_VIA_LCD=y - CONFIG_VIDEO_VGA_VIA_LCD_FORCE_SYNC_ACTIVE_HIGH=y -@@ -20,7 +19,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y - CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino" - CONFIG_DFU_RAM=y - CONFIG_FASTBOOT_CMD_OEM_FORMAT=y --CONFIG_AXP_ALDO3_VOLT=3300 -+CONFIG_SUNXI_NO_PMIC=y - CONFIG_CONS_INDEX=2 - CONFIG_USB_EHCI_HCD=y - CONFIG_USB_OHCI_HCD=y diff --git a/package/boot/uboot-sunxi/patches/250-sun8i-h3-add-support-for-zeropi.patch b/package/boot/uboot-sunxi/patches/250-sun8i-h3-add-support-for-zeropi.patch deleted file mode 100644 index 838d90a7b00..00000000000 --- a/package/boot/uboot-sunxi/patches/250-sun8i-h3-add-support-for-zeropi.patch +++ /dev/null @@ -1,148 +0,0 @@ -From 2527b24f39d8f27ba2fd922ca27a1f14119cfa1b Mon Sep 17 00:00:00 2001 -From: Yu-Tung Chang -Date: Sat, 19 Jun 2021 16:16:45 +0800 -Subject: [PATCH] sunxi: h3: Add initial ZeroPi support - -ZeroPi is a new board of high performance with low cost -designed by FriendlyElec., using the Allwinner H3 SOC. - -ZeroPi features -- Allwinner H3, Quad-core Cortex-A7@1.2GHz -- 256MB/512MB DDR3 RAM -- microsd slot -- 10/100/1000Mbps Ethernet -- Debug Serial Port -- DC 5V/2A power-supply - -Signed-off-by: Yu-Tung Chang -Reviewed-by: Andre Przywara -Signed-off-by: Andre Przywara ---- ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -560,7 +560,8 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \ - sun8i-h3-orangepi-plus.dtb \ - sun8i-h3-orangepi-plus2e.dtb \ - sun8i-h3-orangepi-zero-plus2.dtb \ -- sun8i-h3-rervision-dvk.dtb -+ sun8i-h3-rervision-dvk.dtb \ -+ sun8i-h3-zeropi.dtb - dtb-$(CONFIG_MACH_SUN8I_R40) += \ - sun8i-r40-bananapi-m2-ultra.dtb \ - sun8i-v40-bananapi-m2-berry.dtb ---- /dev/null -+++ b/arch/arm/dts/sun8i-h3-zeropi.dts -@@ -0,0 +1,85 @@ -+/* -+ * Copyright (C) 2020 Yu-Tung Chang -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#include "sun8i-h3-nanopi.dtsi" -+ -+/ { -+ model = "FriendlyARM ZeroPi"; -+ compatible = "friendlyarm,zeropi", "allwinner,sun8i-h3"; -+ -+ aliases { -+ ethernet0 = &emac; -+ }; -+ -+ reg_gmac_3v3: gmac-3v3 { -+ compatible = "regulator-fixed"; -+ regulator-name = "gmac-3v3"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ startup-delay-us = <100000>; -+ enable-active-high; -+ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */ -+ }; -+}; -+ -+&external_mdio { -+ ext_rgmii_phy: ethernet-phy@7 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <7>; -+ }; -+}; -+ -+&emac { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&emac_rgmii_pins>; -+ phy-supply = <®_gmac_3v3>; -+ phy-handle = <&ext_rgmii_phy>; -+ phy-mode = "rgmii-id"; -+ -+ allwinner,leds-active-low; -+ status = "okay"; -+}; -+ -+&usb_otg { -+ status = "okay"; -+ dr_mode = "host"; -+}; ---- a/board/sunxi/MAINTAINERS -+++ b/board/sunxi/MAINTAINERS -@@ -508,3 +508,9 @@ YONES TOPTECH BS1078 V2 BOARD - M: Peter Korsgaard - S: Maintained - F: configs/Yones_Toptech_BS1078_V2_defconfig -+ -+ZEROPI BOARD -+M: Yu-Tung Chang -+S: Maintained -+F: configs/zeropi_defconfig -+F: arch/arm/dts/sun8i-h3-zeropi.dts ---- /dev/null -+++ b/configs/zeropi_defconfig -@@ -0,0 +1,13 @@ -+CONFIG_ARM=y -+CONFIG_ARCH_SUNXI=y -+CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-zeropi" -+CONFIG_SPL=y -+CONFIG_MACH_SUN8I_H3=y -+CONFIG_DRAM_CLK=408 -+CONFIG_MACPWR="PD6" -+# CONFIG_VIDEO_DE2 is not set -+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set -+CONFIG_CONSOLE_MUX=y -+CONFIG_SUN8I_EMAC=y -+CONFIG_USB_EHCI_HCD=y -+CONFIG_USB_OHCI_HCD=y diff --git a/package/boot/uboot-sunxi/patches/252-sunxi-h3-add-support-for-nanopi-r1.patch b/package/boot/uboot-sunxi/patches/252-sunxi-h3-add-support-for-nanopi-r1.patch index 5b3a68c602b..51b4d7d045b 100644 --- a/package/boot/uboot-sunxi/patches/252-sunxi-h3-add-support-for-nanopi-r1.patch +++ b/package/boot/uboot-sunxi/patches/252-sunxi-h3-add-support-for-nanopi-r1.patch @@ -12,165 +12,6 @@ Signed-off-by: Jayantajit Gogoi create mode 100644 arch/arm/dts/sun8i-h3-nanopi-r1.dts create mode 100644 configs/nanopi_r1_defconfig ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -551,6 +551,7 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \ - sun8i-h3-nanopi-m1-plus.dtb \ - sun8i-h3-nanopi-neo.dtb \ - sun8i-h3-nanopi-neo-air.dtb \ -+ sun8i-h3-nanopi-r1.dtb \ - sun8i-h3-orangepi-2.dtb \ - sun8i-h3-orangepi-lite.dtb \ - sun8i-h3-orangepi-one.dtb \ ---- /dev/null -+++ b/arch/arm/dts/sun8i-h3-nanopi-r1.dts -@@ -0,0 +1,146 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+/* -+ * Copyright (C) 2019 Igor Pecovnik -+ * Copyright (C) 2020 Jayantajit Gogoi -+ */ -+ -+/* NanoPi R1 is based on the NanoPi-H3 design from FriendlyARM */ -+#include "sun8i-h3-nanopi.dtsi" -+ -+/ { -+ model = "FriendlyARM NanoPi R1"; -+ compatible = "friendlyarm,nanopi-r1", "allwinner,sun8i-h3"; -+ -+ reg_gmac_3v3: gmac-3v3 { -+ compatible = "regulator-fixed"; -+ regulator-name = "gmac-3v3"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ startup-delay-us = <100000>; -+ enable-active-high; -+ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; -+ }; -+ -+ vdd_cpux: gpio-regulator { -+ compatible = "regulator-gpio"; -+ pinctrl-names = "default"; -+ regulator-name = "vdd-cpux"; -+ regulator-type = "voltage"; -+ regulator-boot-on; -+ regulator-always-on; -+ regulator-min-microvolt = <1100000>; -+ regulator-max-microvolt = <1300000>; -+ regulator-ramp-delay = <50>; -+ gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; -+ gpios-states = <0x1>; -+ states = <1100000 0x0 -+ 1300000 0x1>; -+ }; -+ -+ wifi_pwrseq: wifi_pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ pinctrl-names = "default"; -+ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; -+ }; -+ -+ leds { -+ /delete-node/ pwr; -+ status { -+ label = "nanopi:red:status"; -+ gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; -+ linux,default-trigger = "heartbeat"; -+ }; -+ -+ wan { -+ label = "nanopi:green:wan"; -+ gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; -+ }; -+ -+ lan { -+ label = "nanopi:green:lan"; -+ gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>; -+ }; -+ }; -+ -+ r_gpio_keys { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sw_r_npi>; -+ -+ /delete-node/ k1; -+ reset { -+ label = "reset"; -+ linux,code = ; -+ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; -+ }; -+ }; -+}; -+ -+&cpu0 { -+ cpu-supply = <&vdd_cpux>; -+}; -+ -+&ehci1 { -+ status = "okay"; -+}; -+ -+&ehci2 { -+ status = "okay"; -+}; -+ -+&emac { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&emac_rgmii_pins>; -+ phy-supply = <®_gmac_3v3>; -+ phy-handle = <&ext_rgmii_phy>; -+ phy-mode = "rgmii"; -+ status = "okay"; -+}; -+ -+&external_mdio { -+ ext_rgmii_phy: ethernet-phy@1 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <7>; -+ }; -+}; -+ -+&mmc1 { -+ vmmc-supply = <®_vcc3v3>; -+ vqmmc-supply = <®_vcc3v3>; -+ mmc-pwrseq = <&wifi_pwrseq>; -+ bus-width = <4>; -+ non-removable; -+ status = "okay"; -+ -+ sdio_wifi: sdio_wifi@1 { -+ reg = <1>; -+ compatible = "brcm,bcm4329-fmac"; -+ interrupt-parent = <&pio>; -+ interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; -+ interrupt-names = "host-wake"; -+ }; -+}; -+ -+&mmc2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc2_8bit_pins>; -+ vmmc-supply = <®_vcc3v3>; -+ vqmmc-supply = <®_vcc3v3>; -+ bus-width = <8>; -+ non-removable; -+ status = "okay"; -+}; -+ -+&ohci1 { -+ status = "okay"; -+}; -+ -+&ohci2 { -+ status = "okay"; -+}; -+ -+&r_pio { -+ sw_r_npi: key_pins { -+ pins = "PL3"; -+ function = "gpio_in"; -+ }; -+}; --- /dev/null +++ b/configs/nanopi_r1_defconfig @@ -0,0 +1,21 @@ diff --git a/package/boot/uboot-sunxi/patches/253-sunxi-h5-add-support-for-nanopi-r1s-h5.patch b/package/boot/uboot-sunxi/patches/253-sunxi-h5-add-support-for-nanopi-r1s-h5.patch deleted file mode 100644 index 2c8d5a94593..00000000000 --- a/package/boot/uboot-sunxi/patches/253-sunxi-h5-add-support-for-nanopi-r1s-h5.patch +++ /dev/null @@ -1,261 +0,0 @@ -From e7510d24cab4741f72489b9d67c2d42b18fe5374 Mon Sep 17 00:00:00 2001 -From: Chukun Pan -Date: Sun, 10 Oct 2021 21:36:57 +0800 -Subject: [PATCH] sunxi: Add support for FriendlyARM NanoPi R1S H5 - -This adds support for the NanoPi R1S H5 board. - -Allwinner H5 SoC -512MB DDR3 RAM -10/100/1000M Ethernet x 2 -RTL8189ETV WiFi 802.11b/g/n -USB 2.0 host port (A) -MicroSD Slot -Reset button -Serial Debug Port -WAN - LAN - SYS LED - -Signed-off-by: Chukun Pan ---- - arch/arm/dts/Makefile | 1 + - arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts | 195 +++++++++++++++++++++++ - board/sunxi/MAINTAINERS | 5 + - configs/nanopi_r1s_h5_defconfig | 14 ++ - 4 files changed, 215 insertions(+) - create mode 100644 arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts - create mode 100644 configs/nanopi_r1s_h5_defconfig - ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -575,6 +575,7 @@ dtb-$(CONFIG_MACH_SUN50I_H5) += \ - sun50i-h5-libretech-all-h5-cc.dtb \ - sun50i-h5-nanopi-neo2.dtb \ - sun50i-h5-nanopi-neo-plus2.dtb \ -+ sun50i-h5-nanopi-r1s-h5.dtb \ - sun50i-h5-orangepi-zero-plus.dtb \ - sun50i-h5-orangepi-pc2.dtb \ - sun50i-h5-orangepi-prime.dtb \ ---- /dev/null -+++ b/arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts -@@ -0,0 +1,190 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+/* -+ * Copyright (C) 2021 Chukun Pan -+ * -+ * Based on sun50i-h5-nanopi-neo-plus2.dts, which is: -+ * Copyright (C) 2017 Antony Antony -+ * Copyright (C) 2016 ARM Ltd. -+ */ -+ -+/dts-v1/; -+#include "sun50i-h5.dtsi" -+ -+#include -+#include -+ -+/ { -+ model = "FriendlyARM NanoPi R1S H5"; -+ compatible = "friendlyarm,nanopi-r1s-h5", "allwinner,sun50i-h5"; -+ -+ aliases { -+ ethernet0 = &emac; -+ ethernet1 = &rtl8189etv; -+ serial0 = &uart0; -+ }; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ -+ sys { -+ label = "nanopi:red:sys"; -+ gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; -+ linux,default-trigger = "heartbeat"; -+ }; -+ -+ lan { -+ label = "nanopi:green:lan"; -+ gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>; -+ }; -+ -+ wan { -+ label = "nanopi:green:wan"; -+ gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; -+ }; -+ }; -+ -+ r-gpio-keys { -+ compatible = "gpio-keys"; -+ -+ reset { -+ label = "reset"; -+ linux,code = ; -+ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; -+ }; -+ }; -+ -+ reg_gmac_3v3: gmac-3v3 { -+ compatible = "regulator-fixed"; -+ regulator-name = "gmac-3v3"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ startup-delay-us = <100000>; -+ enable-active-high; -+ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; -+ }; -+ -+ reg_vcc3v3: vcc3v3 { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc3v3"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ }; -+ -+ reg_usb0_vbus: usb0-vbus { -+ compatible = "regulator-fixed"; -+ regulator-name = "usb0-vbus"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ enable-active-high; -+ gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */ -+ status = "okay"; -+ }; -+ -+ vdd_cpux: gpio-regulator { -+ compatible = "regulator-gpio"; -+ regulator-name = "vdd-cpux"; -+ regulator-type = "voltage"; -+ regulator-boot-on; -+ regulator-always-on; -+ regulator-min-microvolt = <1100000>; -+ regulator-max-microvolt = <1300000>; -+ regulator-ramp-delay = <50>; /* 4ms */ -+ gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; -+ gpios-states = <0x1>; -+ states = <1100000 0x0>, <1300000 0x1>; -+ }; -+ -+ wifi_pwrseq: wifi_pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ -+ post-power-on-delay-ms = <200>; -+ }; -+}; -+ -+&cpu0 { -+ cpu-supply = <&vdd_cpux>; -+}; -+ -+&ehci1 { -+ status = "okay"; -+}; -+ -+&ehci2 { -+ status = "okay"; -+}; -+ -+&emac { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&emac_rgmii_pins>; -+ phy-supply = <®_gmac_3v3>; -+ phy-handle = <&ext_rgmii_phy>; -+ phy-mode = "rgmii-id"; -+ status = "okay"; -+}; -+ -+&external_mdio { -+ ext_rgmii_phy: ethernet-phy@7 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <7>; -+ }; -+}; -+ -+&i2c0 { -+ status = "okay"; -+ -+ eeprom@51 { -+ compatible = "microchip,24c02"; -+ reg = <0x51>; -+ pagesize = <16>; -+ }; -+}; -+ -+&mmc0 { -+ vmmc-supply = <®_vcc3v3>; -+ bus-width = <4>; -+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ -+ status = "okay"; -+}; -+ -+&mmc1 { -+ vmmc-supply = <®_vcc3v3>; -+ vqmmc-supply = <®_vcc3v3>; -+ mmc-pwrseq = <&wifi_pwrseq>; -+ bus-width = <4>; -+ non-removable; -+ status = "okay"; -+ -+ rtl8189etv: sdio_wifi@1 { -+ reg = <1>; -+ }; -+}; -+ -+&ohci1 { -+ status = "okay"; -+}; -+ -+&ohci2 { -+ status = "okay"; -+}; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pa_pins>; -+ status = "okay"; -+}; -+ -+&usb_otg { -+ dr_mode = "peripheral"; -+ status = "okay"; -+}; -+ -+&usbphy { -+ /* USB Type-A port's VBUS is always on */ -+ usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ -+ usb0_vbus-supply = <®_usb0_vbus>; -+ status = "okay"; -+}; ---- a/board/sunxi/MAINTAINERS -+++ b/board/sunxi/MAINTAINERS -@@ -358,6 +358,11 @@ M: Jelle van der Waa - S: Maintained - F: configs/nanopi_neo_air_defconfig - -+NANOPI-R1S-H5 BOARD -+M: Chukun Pan -+S: Maintained -+F: configs/nanopi_r1s_h5_defconfig -+ - NANOPI-A64 BOARD - M: Jagan Teki - S: Maintained ---- /dev/null -+++ b/configs/nanopi_r1s_h5_defconfig -@@ -0,0 +1,14 @@ -+CONFIG_ARM=y -+CONFIG_ARCH_SUNXI=y -+CONFIG_SPL=y -+CONFIG_MACH_SUN50I_H5=y -+CONFIG_DRAM_CLK=672 -+CONFIG_DRAM_ZQ=3881977 -+# CONFIG_DRAM_ODT_EN is not set -+CONFIG_MACPWR="PD6" -+CONFIG_MMC_SUNXI_SLOT_EXTRA=2 -+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set -+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-nanopi-r1s-h5" -+CONFIG_SUN8I_EMAC=y -+CONFIG_USB_EHCI_HCD=y -+CONFIG_USB_OHCI_HCD=y diff --git a/package/boot/uboot-sunxi/patches/270-arm-sunxi-increase-SYS_MALLOC_F_LEN.patch b/package/boot/uboot-sunxi/patches/270-arm-sunxi-increase-SYS_MALLOC_F_LEN.patch deleted file mode 100644 index 6ce2be908db..00000000000 --- a/package/boot/uboot-sunxi/patches/270-arm-sunxi-increase-SYS_MALLOC_F_LEN.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 20abdd7feefbb4fccef5c653e045911670237e8b Mon Sep 17 00:00:00 2001 -From: Stijn Tintel -Date: Thu, 22 Dec 2022 00:35:07 +0200 -Subject: [PATCH] arm: sunxi: increase SYS_MALLOC_F_LEN - -Version 2020.10 throws the following output after loading bl31: -alloc space exhausted - -This has been fixed in v2022.07, but the change is too intrusive to -backport. Instead, just modify the default for ARCH_SUNXI for now. - -See e05689242238 ("Kconfig: Change SYS_MALLOC_F_LEN default to 0x2000"). - -Signed-off-by: Stijn Tintel ---- - Kconfig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/Kconfig -+++ b/Kconfig -@@ -146,7 +146,7 @@ config SYS_MALLOC_F_LEN - default 0x2000 if (ARCH_IMX8 || ARCH_IMX8M || ARCH_MX7 || \ - ARCH_MX7ULP || ARCH_MX6 || ARCH_MX5 || \ - ARCH_LS1012A || ARCH_LS1021A || ARCH_LS1043A || \ -- ARCH_LS1046A || ARCH_QEMU) -+ ARCH_LS1046A || ARCH_QEMU || ARCH_SUNXI) - default 0x400 - help - Before relocation, memory is very limited on many platforms. Still, diff --git a/package/boot/uboot-sunxi/patches/300-force-pylibfdt-build.patch b/package/boot/uboot-sunxi/patches/300-force-pylibfdt-build.patch new file mode 100644 index 00000000000..d34ed6f2ae5 --- /dev/null +++ b/package/boot/uboot-sunxi/patches/300-force-pylibfdt-build.patch @@ -0,0 +1,30 @@ +--- a/Makefile ++++ b/Makefile +@@ -2000,26 +2000,7 @@ endif + # Check dtc and pylibfdt, if DTC is provided, else build them + PHONY += scripts_dtc + scripts_dtc: scripts_basic +- $(Q)if test "$(DTC)" = "$(DTC_INTREE)"; then \ +- $(MAKE) $(build)=scripts/dtc; \ +- else \ +- if ! $(DTC) -v >/dev/null; then \ +- echo '*** Failed to check dtc version: $(DTC)'; \ +- false; \ +- else \ +- if test "$(call dtc-version)" -lt $(DTC_MIN_VERSION); then \ +- echo '*** Your dtc is too old, please upgrade to dtc $(DTC_MIN_VERSION) or newer'; \ +- false; \ +- else \ +- if [ -n "$(CONFIG_PYLIBFDT)" ]; then \ +- if ! echo "import libfdt" | $(PYTHON3) 2>/dev/null; then \ +- echo '*** pylibfdt does not seem to be available with $(PYTHON3)'; \ +- false; \ +- fi; \ +- fi; \ +- fi; \ +- fi; \ +- fi ++ $(MAKE) $(build)=scripts/dtc + + # --------------------------------------------------------------------------- + quiet_cmd_cpp_lds = LDS $@ diff --git a/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch b/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch index 45059890e11..a3f210487ea 100644 --- a/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch +++ b/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch @@ -90,3 +90,17 @@ return ret; } +--- a/src/linux/ifxos_linux_thread_drv.c ++++ b/src/linux/ifxos_linux_thread_drv.c +@@ -154,7 +154,11 @@ IFXOS_STATIC int IFXOS_KernelThreadStart + retVal = pThrCntrl->pThrFct(&pThrCntrl->thrParams); + pThrCntrl->thrParams.bRunning = IFX_FALSE; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)) ++ kthread_complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal); ++#else + complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal); ++#endif + + IFXOS_PRN_USR_DBG_NL( IFXOS, IFXOS_PRN_LEVEL_NORMAL, + ("EXIT - Kernel Thread Startup <%s>" IFXOS_CRLF, diff --git a/package/kernel/lantiq/ltq-vdsl-vr11-mei/patches/100-compat.patch b/package/kernel/lantiq/ltq-vdsl-vr11-mei/patches/100-compat.patch index a2e42ccb03f..74e88894d8f 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr11-mei/patches/100-compat.patch +++ b/package/kernel/lantiq/ltq-vdsl-vr11-mei/patches/100-compat.patch @@ -8,3 +8,16 @@ MODULE_LICENSE ("GPL"); #endif /* #ifdef MODULE*/ +--- a/src/drv_mei_cpe_linux.h ++++ b/src/drv_mei_cpe_linux.h +@@ -110,6 +110,10 @@ typedef irqreturn_t (*usedIsrHandler_t)( + # endif + #endif + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)) ++#define PDE_DATA pde_data ++#endif ++ + /** + Function typedef for the Linux request_threaded_irq() + */ diff --git a/package/kernel/lantiq/ltq-vdsl-vr11-mei/patches/122-cp_linux-fix-compilation-warning.patch b/package/kernel/lantiq/ltq-vdsl-vr11-mei/patches/122-cp_linux-fix-compilation-warning.patch index 63a530b6c51..6f180a284ec 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr11-mei/patches/122-cp_linux-fix-compilation-warning.patch +++ b/package/kernel/lantiq/ltq-vdsl-vr11-mei/patches/122-cp_linux-fix-compilation-warning.patch @@ -1,6 +1,6 @@ ---- a/src/drv_mei_cpe_linux.c +--- a/src/drv_mei_cpe_linux.c +++ b/src/drv_mei_cpe_linux.c -@@ -1267,7 +1267,9 @@ static long MEI_Ioctl( struct file *filp, +@@ -1267,7 +1267,9 @@ static long MEI_Ioctl( struct file *filp MEI_IOCTL_RETURN: local_args.drv_ioctl.retCode = ret; diff --git a/package/kernel/lantiq/vrx518_ep/patches/100-compat.patch b/package/kernel/lantiq/vrx518_ep/patches/100-compat.patch index f5b917e7078..a139c7a8624 100644 --- a/package/kernel/lantiq/vrx518_ep/patches/100-compat.patch +++ b/package/kernel/lantiq/vrx518_ep/patches/100-compat.patch @@ -42,6 +42,25 @@ dev_err(&pdev->dev, "%s: Failed to enable MSI interrupts error code: %d\n", __func__, err); +@@ -589,15 +589,15 @@ static int dc_ep_probe(struct pci_dev *p + /* Target structures have a limit of 32 bit DMA pointers. + * DMA pointers can be wider than 32 bits by default on some systems. + */ +- ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); ++ ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); + if (ret) { + dev_err(&pdev->dev, "32-bit DMA not available: %d\n", ret); + goto err_region; + } + +- ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); ++ ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)); + if (ret) { +- dev_err(&pdev->dev, "cannot enable 32-bit consistent DMA\n"); ++ dev_err(&pdev->dev, "cannot enable 32-bit coherent DMA\n"); + goto err_region; + } + @@ -654,7 +654,7 @@ static int dc_ep_probe(struct pci_dev *p goto err_iomap; diff --git a/package/kernel/lantiq/vrx518_tc/patches/100-compat.patch b/package/kernel/lantiq/vrx518_tc/patches/100-compat.patch index 2c92912adef..d04c1ed5df0 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/100-compat.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/100-compat.patch @@ -243,7 +243,33 @@ #include "inc/tc_main.h" #include "inc/reg_addr.h" -@@ -182,8 +182,8 @@ static int ptm_get_qid(struct net_device +@@ -62,6 +62,9 @@ + #include "inc/fw/vrx518_addr_def.h" + #include "inc/fw/vrx518_ppe_fw.h" + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)) ++#define PDE_DATA pde_data ++#endif + + static struct ptm_priv *g_ptm_priv; + static struct ptm_ep_priv g_ep_priv[BOND_MAX]; +@@ -84,6 +87,7 @@ static int ptm_erb_addr_get(const unsign + unsigned int *data_addr, unsigned int *desc_addr); + + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,16,0)) + static inline void tc_ether_addr_copy(u8 *dst, const u8 *src) + { + #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) +@@ -98,6 +102,7 @@ static inline void tc_ether_addr_copy(u8 + a[2] = b[2]; + #endif + } ++#endif + + static inline int is_ptm_sl(struct ptm_ep_priv *priv) + { +@@ -182,8 +187,8 @@ static int ptm_get_qid(struct net_device return qid; } @@ -254,7 +280,7 @@ { struct ptm_priv *ptm_tc = netdev_priv(dev); -@@ -191,8 +191,6 @@ static struct rtnl_link_stats64 *ptm_get +@@ -191,8 +196,6 @@ static struct rtnl_link_stats64 *ptm_get memcpy(storage, &ptm_tc->stats64, sizeof(ptm_tc->stats64)); else storage->tx_errors += ptm_tc->stats64.tx_errors; @@ -263,7 +289,16 @@ } static int ptm_set_mac_address(struct net_device *dev, void *p) -@@ -209,7 +207,7 @@ static int ptm_set_mac_address(struct ne +@@ -204,12 +207,16 @@ static int ptm_set_mac_address(struct ne + return -EBUSY; + + tc_info(ptm_tc->tc_priv, MSG_EVENT, "ptm mac address update!\n"); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,16,0)) ++ eth_hw_addr_set(dev, addr->sa_data); ++#else + tc_ether_addr_copy(dev->dev_addr, addr->sa_data); ++#endif + return 0; } @@ -272,7 +307,7 @@ { struct ptm_priv *ptm_tc = netdev_priv(dev); -@@ -503,7 +501,7 @@ static int ptm_xmit(struct sk_buff *skb, +@@ -503,7 +510,7 @@ static int ptm_xmit(struct sk_buff *skb, if (!showtime_stat(ptm_tc->tc_priv)) goto PTM_XMIT_DROP; @@ -281,7 +316,7 @@ goto PTM_XMIT_DROP; dump_skb_info(ptm_tc->tc_priv, skb, (MSG_TX | MSG_TXDATA)); -@@ -632,11 +630,8 @@ static int ptm_dev_init(struct tc_priv * +@@ -632,11 +639,8 @@ static int ptm_dev_init(struct tc_priv * struct ptm_priv *ptm_tc; const char macaddr[ETH_ALEN] = {0xAC, 0x9A, 0x96, 0x11, 0x22, 0x33}; @@ -295,7 +330,19 @@ if (!dev) { tc_dbg(tc_priv, MSG_INIT, "Cannot alloc net device\n"); return -ENOMEM; -@@ -2103,7 +2098,6 @@ static int ptm_showtime_exit(const unsig +@@ -644,7 +648,11 @@ static int ptm_dev_init(struct tc_priv * + ptm_tc = netdev_priv(dev); + ptm_tc->dev = dev; + ptm_tc->tc_priv = tc_priv; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,16,0)) ++ eth_hw_addr_set(dev, macaddr); ++#else + tc_ether_addr_copy(dev->dev_addr, macaddr); ++#endif + spin_lock_init(&ptm_tc->ptm_lock); + memcpy(ptm_tc->outq_map, def_outq_map, sizeof(def_outq_map)); + SET_NETDEV_DEV(ptm_tc->dev, tc_priv->ep_dev[id].dev); +@@ -2103,7 +2111,6 @@ static int ptm_showtime_exit(const unsig struct ptm_ep_priv *priv = tc_ep_priv(idx); u32 stop = ACA_TXIN_EN; struct dc_ep_dev *ep; @@ -398,7 +445,18 @@ #include #include #include "inc/tc_main.h" -@@ -353,7 +355,7 @@ static ssize_t mem_proc_write(struct fil +@@ -35,6 +37,10 @@ + #include "inc/platform.h" + #include "inc/dsl_tc.h" + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)) ++#define PDE_DATA pde_data ++#endif ++ + #define ATM_HEADER_SIZE (ATM_CELL_SIZE - ATM_CELL_PAYLOAD) + static char *dbg_flag_str[] = { + "rx", +@@ -353,7 +359,7 @@ static ssize_t mem_proc_write(struct fil } addr = set_val = repeat_cnt = 0; @@ -407,7 +465,7 @@ return -EFAULT; len = count < sizeof(str) ? count : sizeof(str) - 1; -@@ -450,13 +452,12 @@ static int proc_read_mem_seq_open(struct +@@ -450,13 +456,12 @@ static int proc_read_mem_seq_open(struct return single_open(file, proc_read_mem, NULL); } @@ -427,7 +485,7 @@ }; static ssize_t pp32_proc_write(struct file *file, const char __user *buf, -@@ -748,13 +749,12 @@ static int proc_read_pp32_seq_open(struc +@@ -748,13 +753,12 @@ static int proc_read_pp32_seq_open(struc return single_open(file, proc_read_pp32, PDE_DATA(inode)); } @@ -447,7 +505,7 @@ }; static int proc_read_tc_cfg(struct seq_file *seq, void *v) -@@ -865,13 +865,12 @@ static int proc_read_tc_cfg_seq_open(str +@@ -865,13 +869,12 @@ static int proc_read_tc_cfg_seq_open(str return single_open(file, proc_read_tc_cfg, PDE_DATA(inode)); } @@ -467,7 +525,7 @@ }; static ssize_t proc_write_dbg(struct file *file, const char __user *buf, -@@ -951,13 +950,12 @@ static int proc_read_dbg_seq_open(struct +@@ -951,13 +954,12 @@ static int proc_read_dbg_seq_open(struct return single_open(file, proc_read_dbg, PDE_DATA(inode)); } @@ -487,7 +545,7 @@ }; static ssize_t proc_write_tc_switch(struct file *file, const char __user *buf, -@@ -1018,11 +1016,11 @@ proc_tc_switch_help: +@@ -1018,11 +1020,11 @@ proc_tc_switch_help: return count; } @@ -503,7 +561,7 @@ static ssize_t proc_write_show_time(struct file *file, const char __user *buf, size_t count, loff_t *data) { -@@ -1077,10 +1075,9 @@ proc_show_time_help: +@@ -1077,10 +1079,9 @@ proc_show_time_help: return count; } @@ -517,7 +575,7 @@ }; static int proc_read_ver(struct seq_file *seq, void *v) -@@ -1128,12 +1125,11 @@ static int proc_read_ver_seq_open(struct +@@ -1128,12 +1129,11 @@ static int proc_read_ver_seq_open(struct return single_open(file, proc_read_ver, PDE_DATA(inode)); } @@ -535,7 +593,7 @@ }; static int proc_read_soc(struct seq_file *seq, void *v) -@@ -1142,20 +1138,18 @@ static int proc_read_soc(struct seq_file +@@ -1142,20 +1142,18 @@ static int proc_read_soc(struct seq_file tcpriv = (struct tc_priv *)seq->private; @@ -564,7 +622,7 @@ return 0; } -@@ -1165,15 +1159,13 @@ static int proc_read_soc_seq_open(struct +@@ -1165,15 +1163,13 @@ static int proc_read_soc_seq_open(struct return single_open(file, proc_read_soc, PDE_DATA(inode)); } @@ -585,7 +643,7 @@ static struct tc_proc_list tc_procs[] = { {TC_PROC_DIR, 0, NULL, 1}, {"cfg", 0644, &tc_cfg_proc_fops, 0}, -@@ -1241,13 +1233,12 @@ static int proc_read_ptm_wanmib_seq_open +@@ -1241,13 +1237,12 @@ static int proc_read_ptm_wanmib_seq_open return single_open(file, proc_read_ptm_wanmib, PDE_DATA(inode)); } @@ -605,7 +663,7 @@ }; static int proc_ptm_read_cfg(struct seq_file *seq, void *v) -@@ -1300,7 +1291,7 @@ static ssize_t ptm_cfg_proc_write(struct +@@ -1300,7 +1295,7 @@ static ssize_t ptm_cfg_proc_write(struct return -EINVAL; } @@ -614,7 +672,7 @@ return -EFAULT; len = count < sizeof(str) ? count : sizeof(str) - 1; -@@ -1343,13 +1334,12 @@ proc_ptm_cfg_help: +@@ -1343,13 +1338,12 @@ proc_ptm_cfg_help: } @@ -634,7 +692,7 @@ }; static ssize_t proc_ptm_write_prio(struct file *file, const char __user *buf, -@@ -1455,13 +1445,12 @@ static int proc_ptm_read_prio_seq_open(s +@@ -1455,13 +1449,12 @@ static int proc_ptm_read_prio_seq_open(s return single_open(file, proc_ptm_read_prio, PDE_DATA(inode)); } @@ -654,7 +712,7 @@ }; static int proc_ptm_read_bond_seq_open(struct inode *inode, struct file *file) -@@ -1469,12 +1458,11 @@ static int proc_ptm_read_bond_seq_open(s +@@ -1469,12 +1462,11 @@ static int proc_ptm_read_bond_seq_open(s return single_open(file, proc_ptm_read_bond, PDE_DATA(inode)); } @@ -672,7 +730,7 @@ }; static int proc_ptm_read_bondmib_seq_open(struct inode *inode, -@@ -1483,13 +1471,12 @@ static int proc_ptm_read_bondmib_seq_ope +@@ -1483,13 +1475,12 @@ static int proc_ptm_read_bondmib_seq_ope return single_open(file, proc_ptm_read_bondmib, PDE_DATA(inode)); } @@ -692,7 +750,7 @@ }; struct fwdbg_t { -@@ -1910,14 +1897,14 @@ static int proc_read_fwdbg_seq_open(stru +@@ -1910,14 +1901,14 @@ static int proc_read_fwdbg_seq_open(stru { return single_open(file, proc_read_fwdbg, NULL); } @@ -714,7 +772,7 @@ static struct tc_proc_list ptm_sl_procs[] = { {TC_PROC_PTM_DIR, 0, NULL, 1}, {"mem", 0644, &mem_proc_fops, 0}, -@@ -2077,7 +2064,7 @@ static ssize_t atm_cfg_proc_write(struct +@@ -2077,7 +2068,7 @@ static ssize_t atm_cfg_proc_write(struct priv = (struct atm_priv *)PDE_DATA(file_inode(file)); @@ -723,7 +781,7 @@ return -EFAULT; len = count < sizeof(str) ? count : sizeof(str) - 1; -@@ -2119,13 +2106,12 @@ proc_atm_cfg_help: +@@ -2119,13 +2110,12 @@ proc_atm_cfg_help: return count; } @@ -743,7 +801,7 @@ }; static ssize_t proc_write_atm_wanmib(struct file *file, const char __user *buf, -@@ -2173,13 +2159,12 @@ static int proc_read_atm_wanmib_seq_open +@@ -2173,13 +2163,12 @@ static int proc_read_atm_wanmib_seq_open @@ -763,7 +821,7 @@ }; static int proc_read_htu_seq_open(struct inode *inode, struct file *file) -@@ -2187,12 +2172,11 @@ static int proc_read_htu_seq_open(struct +@@ -2187,12 +2176,11 @@ static int proc_read_htu_seq_open(struct return single_open(file, proc_read_htu, PDE_DATA(inode)); } @@ -781,7 +839,7 @@ }; static int proc_read_queue_seq_open(struct inode *inode, struct file *file) -@@ -2200,12 +2184,11 @@ static int proc_read_queue_seq_open(stru +@@ -2200,12 +2188,11 @@ static int proc_read_queue_seq_open(stru return single_open(file, proc_read_queue, PDE_DATA(inode)); } @@ -799,7 +857,7 @@ }; static void set_q_prio(struct atm_priv *priv, -@@ -2428,13 +2411,12 @@ static const struct seq_operations pvc_m +@@ -2428,13 +2415,12 @@ static const struct seq_operations pvc_m .show = pvc_mib_seq_show, }; @@ -819,7 +877,7 @@ }; static int proc_read_pvc_mib_seq_open(struct inode *inode, struct file *file) -@@ -2447,12 +2429,11 @@ static int proc_read_pvc_mib_seq_open(st +@@ -2447,12 +2433,11 @@ static int proc_read_pvc_mib_seq_open(st return ret; } @@ -837,7 +895,7 @@ }; static ssize_t proc_write_cell(struct file *file, -@@ -2592,13 +2573,12 @@ static int proc_read_cell_seq_open(struc +@@ -2592,13 +2577,12 @@ static int proc_read_cell_seq_open(struc return single_open(file, proc_read_cell, NULL); } diff --git a/package/kernel/lantiq/vrx518_tc/patches/200-swplat.patch b/package/kernel/lantiq/vrx518_tc/patches/200-swplat.patch index 793adefdd65..edc97998b73 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/200-swplat.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/200-swplat.patch @@ -79,7 +79,7 @@ This replaces it by a basic working implementation. tc_dbg(priv->tc_priv, MSG_TX, "ATM: TX fail\n"); --- a/dcdp/ptm_tc.c +++ b/dcdp/ptm_tc.c -@@ -497,6 +497,7 @@ static int ptm_xmit(struct sk_buff *skb, +@@ -506,6 +506,7 @@ static int ptm_xmit(struct sk_buff *skb, struct ptm_priv *ptm_tc = netdev_priv(dev); int qid; enum tc_pkt_type type; @@ -87,7 +87,7 @@ This replaces it by a basic working implementation. if (!showtime_stat(ptm_tc->tc_priv)) goto PTM_XMIT_DROP; -@@ -510,11 +511,13 @@ static int ptm_xmit(struct sk_buff *skb, +@@ -519,11 +520,13 @@ static int ptm_xmit(struct sk_buff *skb, type = ptm_tc->tc_priv->tc_mode == TC_PTM_BND_MODE ? PTM_BOND_PKT : PTM_SL_PKT; @@ -102,7 +102,7 @@ This replaces it by a basic working implementation. } return 0; -@@ -631,7 +634,7 @@ static int ptm_dev_init(struct tc_priv * +@@ -640,7 +643,7 @@ static int ptm_dev_init(struct tc_priv * const char macaddr[ETH_ALEN] = {0xAC, 0x9A, 0x96, 0x11, 0x22, 0x33}; @@ -111,7 +111,7 @@ This replaces it by a basic working implementation. if (!dev) { tc_dbg(tc_priv, MSG_INIT, "Cannot alloc net device\n"); return -ENOMEM; -@@ -2324,7 +2327,11 @@ static void ptm_aca_init(struct ptm_ep_p +@@ -2337,7 +2340,11 @@ static void ptm_aca_init(struct ptm_ep_p cfg = &priv->tc_priv->cfg; txin = ¶m.aca_txin; @@ -123,7 +123,7 @@ This replaces it by a basic working implementation. txin->hd_size_in_dw = cfg->txin.soc_desc_dwsz; txin->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_IN_PD_LIST_BASE); txin->pd_desc_num = __ACA_TX_IN_PD_LIST_NUM; -@@ -2347,7 +2354,11 @@ static void ptm_aca_init(struct ptm_ep_p +@@ -2360,7 +2367,11 @@ static void ptm_aca_init(struct ptm_ep_p txin->soc_cmlt_cnt_addr); txout = ¶m.aca_txout; @@ -135,7 +135,7 @@ This replaces it by a basic working implementation. txout->hd_size_in_dw = cfg->txout.soc_desc_dwsz; if (priv->tc_priv->param.cdma_desc_loc == LOC_IN_FPI) txout->pd_desc_base = sb_r32(__TX_OUT_SHADOW_PTR) - phybase; -@@ -2373,7 +2384,11 @@ static void ptm_aca_init(struct ptm_ep_p +@@ -2386,7 +2397,11 @@ static void ptm_aca_init(struct ptm_ep_p txout->soc_cmlt_cnt_addr); rxout = ¶m.aca_rxout; @@ -147,7 +147,7 @@ This replaces it by a basic working implementation. rxout->hd_size_in_dw = cfg->rxout.soc_desc_dwsz; if (priv->tc_priv->param.cdma_desc_loc == LOC_IN_FPI) rxout->pd_desc_base = sb_r32(__RX_OUT_SHADOW_PTR) - phybase; -@@ -2399,7 +2414,11 @@ static void ptm_aca_init(struct ptm_ep_p +@@ -2412,7 +2427,11 @@ static void ptm_aca_init(struct ptm_ep_p rxout->soc_cmlt_cnt_addr); rxin = ¶m.aca_rxin; diff --git a/package/kernel/lantiq/vrx518_tc/patches/201-desc-length.patch b/package/kernel/lantiq/vrx518_tc/patches/201-desc-length.patch index 8b30914df96..134f119f3c0 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/201-desc-length.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/201-desc-length.patch @@ -54,7 +54,7 @@ significantly lower latencies when the line is saturated. struct cdma { --- a/dcdp/ptm_tc.c +++ b/dcdp/ptm_tc.c -@@ -75,7 +75,11 @@ static const u32 tx_kvec[] = { +@@ -78,7 +78,11 @@ static const u32 tx_kvec[] = { 0x30B1B233, 0xB43536B7, 0xB8393ABB, 0x3CBDBE3F, 0xC04142C3, 0x44C5C647, 0x48C9CA4B, 0xCC4D4ECF }; @@ -66,7 +66,7 @@ significantly lower latencies when the line is saturated. static const char ptm_drv_name[] = "PTM SL"; static const char ptm_bond_name[][IFNAMSIZ] = {"PTM US BOND", "PTM DS BOND"}; -@@ -1005,6 +1009,10 @@ static void us_fp_desq_cfg_ctxt_init(str +@@ -1018,6 +1022,10 @@ static void us_fp_desq_cfg_ctxt_init(str int i; u32 desc_addr; rx_descriptor_t desc; @@ -77,7 +77,7 @@ significantly lower latencies when the line is saturated. memset(&desq_cfg, 0, sizeof(desq_cfg)); /* Initialize US Fast-Path Descriptor Queue Config/Context */ -@@ -1012,7 +1020,11 @@ static void us_fp_desq_cfg_ctxt_init(str +@@ -1025,7 +1033,11 @@ static void us_fp_desq_cfg_ctxt_init(str desq_cfg.fast_path = 1; desq_cfg.mbox_int_en = 0; desq_cfg.des_sync_needed = 0; @@ -89,7 +89,7 @@ significantly lower latencies when the line is saturated. desq_cfg.des_base_addr = __US_FAST_PATH_DES_LIST_BASE; tc_mem_write(priv, fpi_addr(__US_FP_INQ_DES_CFG_CTXT), -@@ -1036,12 +1048,20 @@ static void us_qos_desq_cfg_ctxt_init(st +@@ -1049,12 +1061,20 @@ static void us_qos_desq_cfg_ctxt_init(st int offset, i; rx_descriptor_t desc; u32 phy_addr; @@ -110,7 +110,7 @@ significantly lower latencies when the line is saturated. offset = 0; for (i = 0; i < QOSQ_NUM; i++) { -@@ -1080,6 +1100,10 @@ static void us_outq_desq_cfg_ctxt_init(s +@@ -1093,6 +1113,10 @@ static void us_outq_desq_cfg_ctxt_init(s u32 phy_addr; int i; u32 offset; @@ -121,7 +121,7 @@ significantly lower latencies when the line is saturated. /* Setup OUTQ_QoS_CFG_CTXT */ /* NOTE: By default, Shaping & WFQ both are DISABLED!! */ -@@ -1108,7 +1132,11 @@ static void us_outq_desq_cfg_ctxt_init(s +@@ -1121,7 +1145,11 @@ static void us_outq_desq_cfg_ctxt_init(s desq_cfg.des_in_own_val = US_OUTQ_DES_OWN; desq_cfg.mbox_int_en = 0; desq_cfg.des_sync_needed = 0; @@ -134,7 +134,7 @@ significantly lower latencies when the line is saturated. /** * Only BC0 is used in VRX518 */ -@@ -1174,7 +1202,11 @@ static void us_qos_cfg_init(struct ptm_e +@@ -1187,7 +1215,11 @@ static void us_qos_cfg_init(struct ptm_e /* Set QoS NO DROP */ sb_w32(1, __QOSQ_NO_DROP); /* Enable Preemption function/Disable QoS by default */ @@ -146,7 +146,7 @@ significantly lower latencies when the line is saturated. /* By default, all qid mappint to non-preemption queue */ sb_w32(0x0, _QID2PREEMP_MAP); -@@ -1376,6 +1408,11 @@ static void ptm_local_desq_cfg_ctxt_init +@@ -1389,6 +1421,11 @@ static void ptm_local_desq_cfg_ctxt_init u32 dcnt, addr, pdbram_base; unsigned int us_des_alloc[] = { __US_TC_LOCAL_Q0_DES_LIST_NUM, __US_TC_LOCAL_Q1_DES_LIST_NUM}; @@ -158,7 +158,7 @@ significantly lower latencies when the line is saturated. /* Setup the Local DESQ Configuration/Context for UpStream Queues */ memset(&desq_cfg, 0, sizeof(desq_cfg)); -@@ -2321,6 +2358,10 @@ static void ptm_aca_init(struct ptm_ep_p +@@ -2334,6 +2371,10 @@ static void ptm_aca_init(struct ptm_ep_p u32 phybase = priv->ep->phy_membase; u32 start; u32 type; @@ -169,7 +169,7 @@ significantly lower latencies when the line is saturated. priv->tc_priv->tc_ops.soc_cfg_get(&priv->tc_priv->cfg, ptm_id(priv)); memset(¶m, 0, sizeof(param)); -@@ -2334,7 +2375,11 @@ static void ptm_aca_init(struct ptm_ep_p +@@ -2347,7 +2388,11 @@ static void ptm_aca_init(struct ptm_ep_p #endif txin->hd_size_in_dw = cfg->txin.soc_desc_dwsz; txin->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_IN_PD_LIST_BASE); @@ -198,7 +198,7 @@ significantly lower latencies when the line is saturated. --- a/dcdp/tc_proc.c +++ b/dcdp/tc_proc.c -@@ -1114,6 +1114,9 @@ static int proc_read_ver(struct seq_file +@@ -1118,6 +1118,9 @@ static int proc_read_ver(struct seq_file (date >> 16) & 0xff, (date & 0xffff)); @@ -208,7 +208,7 @@ significantly lower latencies when the line is saturated. #ifdef FEATURE_POWER_DOWN seq_puts(seq, " + Support Power Down enhancement feature\n"); #endif -@@ -1166,6 +1169,113 @@ static const struct proc_ops tc_soc_proc +@@ -1170,6 +1173,113 @@ static const struct proc_ops tc_soc_proc .proc_release = single_release, }; @@ -322,7 +322,7 @@ significantly lower latencies when the line is saturated. static struct tc_proc_list tc_procs[] = { {TC_PROC_DIR, 0, NULL, 1}, {"cfg", 0644, &tc_cfg_proc_fops, 0}, -@@ -1174,6 +1284,9 @@ static struct tc_proc_list tc_procs[] = +@@ -1178,6 +1288,9 @@ static struct tc_proc_list tc_procs[] = {"showtime", 0200, &tc_show_time_proc_fops, 0}, {"ver", 0644, &tc_ver_proc_fops, 0}, {"soc", 0644, &tc_soc_proc_fops, 0}, @@ -332,7 +332,7 @@ significantly lower latencies when the line is saturated. }; int tc_proc_init(struct tc_priv *priv) -@@ -1333,7 +1446,6 @@ proc_ptm_cfg_help: +@@ -1337,7 +1450,6 @@ proc_ptm_cfg_help: return count; } diff --git a/package/kernel/lantiq/vrx518_tc/patches/202-napi.patch b/package/kernel/lantiq/vrx518_tc/patches/202-napi.patch index 55f0cc10667..266beba1a7e 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/202-napi.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/202-napi.patch @@ -334,7 +334,7 @@ int (*umt_init)(u32 umt_id, u32 umt_period, u32 umt_dst); --- a/dcdp/ptm_tc.c +++ b/dcdp/ptm_tc.c -@@ -141,7 +141,11 @@ static int ptm_open(struct net_device *d +@@ -146,7 +146,11 @@ static int ptm_open(struct net_device *d struct ptm_priv *ptm_tc = netdev_priv(dev); tc_info(ptm_tc->tc_priv, MSG_EVENT, "ptm open\n"); @@ -346,7 +346,7 @@ #ifdef CONFIG_SOC_TYPE_XWAY xet_phy_wan_port(7, NULL, 1, 1); if (ppa_hook_ppa_phys_port_add_fn) -@@ -158,7 +162,11 @@ static int ptm_stop(struct net_device *d +@@ -163,7 +167,11 @@ static int ptm_stop(struct net_device *d struct ptm_priv *ptm_tc = netdev_priv(dev); tc_info(ptm_tc->tc_priv, MSG_EVENT, "ptm stop\n"); @@ -358,7 +358,7 @@ #ifdef CONFIG_SOC_TYPE_XWAY if (ppa_drv_datapath_mac_entry_setting) ppa_drv_datapath_mac_entry_setting(dev->dev_addr, 0, 6, 10, 1, 2); -@@ -555,7 +563,7 @@ static void ptm_rx(struct net_device *de +@@ -564,7 +572,7 @@ static void ptm_rx(struct net_device *de ptm_tc->stats64.rx_packets++; ptm_tc->stats64.rx_bytes += skb->len; @@ -367,17 +367,22 @@ ptm_tc->stats64.rx_dropped++; return; -@@ -651,6 +659,9 @@ static int ptm_dev_init(struct tc_priv * +@@ -664,6 +672,14 @@ static int ptm_dev_init(struct tc_priv * memcpy(ptm_tc->outq_map, def_outq_map, sizeof(def_outq_map)); SET_NETDEV_DEV(ptm_tc->dev, tc_priv->ep_dev[id].dev); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)) ++ netif_napi_add(ptm_tc->dev, &ptm_tc->napi_rx, tc_priv->tc_ops.napi_rx); ++ netif_napi_add_tx(ptm_tc->dev, &ptm_tc->napi_tx, tc_priv->tc_ops.napi_tx); ++#else + netif_napi_add(ptm_tc->dev, &ptm_tc->napi_rx, tc_priv->tc_ops.napi_rx, NAPI_POLL_WEIGHT); + netif_tx_napi_add(ptm_tc->dev, &ptm_tc->napi_tx, tc_priv->tc_ops.napi_tx, NAPI_POLL_WEIGHT); + ++#endif err = register_netdev(ptm_tc->dev); if (err) goto err1; -@@ -2605,7 +2616,9 @@ static int ptm_ring_init(struct ptm_ep_p +@@ -2618,7 +2634,9 @@ static int ptm_ring_init(struct ptm_ep_p { ptm_aca_ring_config_init(priv, id, bonding); return priv->tc_priv->tc_ops.dev_reg(priv->ptm_tc->dev, @@ -388,7 +393,7 @@ } /** -@@ -2960,7 +2973,9 @@ void ptm_tc_unload(enum dsl_tc_mode tc_m +@@ -2973,7 +2991,9 @@ void ptm_tc_unload(enum dsl_tc_mode tc_m /* unregister device */ if (ptm_tc->tc_priv->tc_ops.dev_unreg != NULL) ptm_tc->tc_priv->tc_ops.dev_unreg(ptm_tc->dev, @@ -399,7 +404,7 @@ /* remove PTM callback function */ ptm_cb_setup(ptm_tc, 0); -@@ -2978,6 +2993,10 @@ void ptm_exit(void) +@@ -2991,6 +3011,10 @@ void ptm_exit(void) if (!priv) return; diff --git a/package/kernel/lantiq/vrx518_tc/patches/205-dcdp-ptm_tc-dynamically-alloc-mib.patch b/package/kernel/lantiq/vrx518_tc/patches/205-dcdp-ptm_tc-dynamically-alloc-mib.patch index ca4c041b210..e239ba33466 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/205-dcdp-ptm_tc-dynamically-alloc-mib.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/205-dcdp-ptm_tc-dynamically-alloc-mib.patch @@ -1,6 +1,6 @@ --- a/dcdp/ptm_tc.c +++ b/dcdp/ptm_tc.c -@@ -298,15 +298,19 @@ static int ptm_tc_get_stats(struct ptm_e +@@ -307,15 +307,19 @@ static int ptm_tc_get_stats(struct ptm_e ) { struct rtnl_link_stats64 *stat; @@ -21,7 +21,7 @@ if (bonding) stats->tc_info = TC_PTM_BND_MODE; else -@@ -340,11 +344,11 @@ static int ptm_tc_get_stats(struct ptm_e +@@ -349,11 +353,11 @@ static int ptm_tc_get_stats(struct ptm_e ? cur_cnt - last_cnt : cur_cnt + ((unsigned int)(-1) - last_cnt); @@ -36,7 +36,7 @@ cur_cnt = tc_r32(GIF0_RX_CRC_ERR_CNT); last_cnt = priv->ptm_mib.rx_crc_err_pdu[0]; -@@ -358,7 +362,7 @@ static int ptm_tc_get_stats(struct ptm_e +@@ -367,7 +371,7 @@ static int ptm_tc_get_stats(struct ptm_e ? cur_cnt - last_cnt : cur_cnt + ((unsigned int)(-1) - last_cnt); @@ -45,7 +45,7 @@ cur_cnt = sb_r32(__US_TC_LOCAL_Q_CFG_CTXT_BASE + offsetof(desq_cfg_ctxt_t, deq_pkt_cnt) / 4); last_cnt = priv->ptm_mib.tx_total_pdu[0]; -@@ -376,90 +380,108 @@ static int ptm_tc_get_stats(struct ptm_e +@@ -385,90 +389,108 @@ static int ptm_tc_get_stats(struct ptm_e /* For bonding information */ if (bonding) { int i; diff --git a/target/linux/bcm53xx/base-files/etc/uci-defaults/09_fix_crc b/target/linux/bcm53xx/base-files/etc/uci-defaults/09_fix_crc index 89ce8970d75..c39625b8653 100644 --- a/target/linux/bcm53xx/base-files/etc/uci-defaults/09_fix_crc +++ b/target/linux/bcm53xx/base-files/etc/uci-defaults/09_fix_crc @@ -13,7 +13,8 @@ fixseama() { } case "$board" in -dlink,dir-885l) +dlink,dir-885l | \ +dlink,dir-890l) fixseama ;; *) diff --git a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh index d9dc497cdac..0697d3dc80b 100644 --- a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh @@ -37,6 +37,7 @@ platform_expected_image() { case "$machine" in "dlink,dir-885l") echo "seamaseal wrgac42_dlink.2015_dir885l"; return;; + "dlink,dir-890l") echo "seamaseal wrgac36_dlink.2013gui_dir890"; return;; "luxul,abr-4500-v1") echo "lxl ABR-4500"; return;; "luxul,xap-810-v1") echo "lxl XAP-810"; return;; "luxul,xap-1410-v1") echo "lxl XAP-1410"; return;; diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile index 5158b432b3b..39b7efbef78 100644 --- a/target/linux/bcm53xx/image/Makefile +++ b/target/linux/bcm53xx/image/Makefile @@ -88,6 +88,12 @@ define Build/luxul-lxl mv $@.new $@ endef +# Outputs a lzma compressed U-Boot that start at 0x00008000 +# just like the D-Link boot loaders expect +define Build/dlink-uboot-bin + $(STAGING_DIR_HOST)/bin/lzma e $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)-u-boot.bin -d16 $@ +endef + define Build/seama-nand # Seama entity $(STAGING_DIR_HOST)/bin/oseama \ @@ -274,6 +280,21 @@ define Device/dlink_dir-885l endef TARGET_DEVICES += dlink_dir-885l +define Device/dlink_dir-890l + DEVICE_VENDOR := D-Link + DEVICE_MODEL := DIR-890L + DEVICE_PACKAGES := $(BRCMFMAC_43602A1) $(USB2_PACKAGES) $(USB3_PACKAGES) + # Layout: U-boot (128kb max) followed by kernel and appended DTB. + # This is done because the boot loader will only read the first 2 MB + # from the flash and decompress the LZMA it finds there after the + # SEAMA header. Since the compressed kernel will not fit in 2 MB, + # we put U-Boot there and let U-Boot read and execute the kernel. + KERNEL := dlink-uboot-bin | pad-to 128k | append-kernel | append-dtb + $(Device/dlink) + SIGNATURE := wrgac36_dlink.2013gui_dir890 +endef +TARGET_DEVICES += dlink_dir-890l + define Device/dlink_dwl-8610ap DEVICE_VENDOR := D-Link DEVICE_MODEL := DWL-8610AP diff --git a/target/linux/generic/backport-5.15/815-v6.4-05-net-phy-Add-a-binding-for-PHY-LEDs.patch b/target/linux/generic/backport-5.15/815-v6.4-05-net-phy-Add-a-binding-for-PHY-LEDs.patch index 7ca128b17d6..3e60f91a2a9 100644 --- a/target/linux/generic/backport-5.15/815-v6.4-05-net-phy-Add-a-binding-for-PHY-LEDs.patch +++ b/target/linux/generic/backport-5.15/815-v6.4-05-net-phy-Add-a-binding-for-PHY-LEDs.patch @@ -131,7 +131,7 @@ Signed-off-by: David S. Miller /** * fwnode_mdio_find_device - Given a fwnode, find the mdio_device * @fwnode: pointer to the mdio_device's fwnode -@@ -3118,6 +3189,11 @@ static int phy_probe(struct device *dev) +@@ -3120,6 +3191,11 @@ static int phy_probe(struct device *dev) /* Set the state to READY by default */ phydev->state = PHY_READY; diff --git a/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch b/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch index 98687126487..b23f9a4b9e2 100644 --- a/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch +++ b/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch @@ -17,7 +17,7 @@ Signed-off-by: Marcel Holtmann --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c -@@ -2272,6 +2272,23 @@ struct btmtk_section_map { +@@ -2275,6 +2275,23 @@ struct btmtk_section_map { }; } __packed; @@ -41,7 +41,7 @@ Signed-off-by: Marcel Holtmann static void btusb_mtk_wmt_recv(struct urb *urb) { struct hci_dev *hdev = urb->context; -@@ -3923,6 +3940,7 @@ static int btusb_probe(struct usb_interf +@@ -3926,6 +3943,7 @@ static int btusb_probe(struct usb_interf hdev->shutdown = btusb_mtk_shutdown; hdev->manufacturer = 70; hdev->cmd_timeout = btusb_mtk_cmd_timeout; diff --git a/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch b/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch index cff537a8669..6fe61a9defe 100644 --- a/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch +++ b/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch @@ -18,7 +18,7 @@ Signed-off-by: Marcel Holtmann --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c -@@ -2277,7 +2277,7 @@ static int btusb_set_bdaddr_mtk(struct h +@@ -2280,7 +2280,7 @@ static int btusb_set_bdaddr_mtk(struct h struct sk_buff *skb; long ret; diff --git a/target/linux/generic/hack-5.15/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch b/target/linux/generic/hack-5.15/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch index e62f45f3c33..f6dacb6e503 100644 --- a/target/linux/generic/hack-5.15/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch +++ b/target/linux/generic/hack-5.15/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch @@ -9,7 +9,7 @@ Subject: [PATCH] net/dsa/mv88e6xxx: disable ATU violation --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -2985,6 +2985,9 @@ static int mv88e6xxx_setup_port(struct m +@@ -2993,6 +2993,9 @@ static int mv88e6xxx_setup_port(struct m else reg = 1 << port; diff --git a/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch b/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch index 18933de3a03..5aa540acf77 100644 --- a/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch +++ b/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch @@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -6333,6 +6333,7 @@ static int mv88e6xxx_register_switch(str +@@ -6341,6 +6341,7 @@ static int mv88e6xxx_register_switch(str ds->ops = &mv88e6xxx_switch_ops; ds->ageing_time_min = chip->info->age_time_coeff; ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts index e448206c369..ec1112ee2bc 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts @@ -14,6 +14,7 @@ led-failsafe = &flash; led-running = &power; led-upgrade = &flash; + label-mac-device = &gmac; }; soc { diff --git a/target/linux/ipq806x/chromium/config-default b/target/linux/ipq806x/chromium/config-default index d7db9f7db35..927aba360f4 100644 --- a/target/linux/ipq806x/chromium/config-default +++ b/target/linux/ipq806x/chromium/config-default @@ -1,7 +1,9 @@ +# CONFIG_ARM_QCOM_SPM_CPUIDLE is not set CONFIG_BLK_DEV_SD=y CONFIG_LEDS_LP5523=y CONFIG_LEDS_LP55XX_COMMON=y CONFIG_PHY_QCOM_IPQ806X_USB=y +# CONFIG_QCOM_SPM is not set CONFIG_SCSI=y CONFIG_SCSI_COMMON=y CONFIG_SG_POOL=y diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi index 549c4620261..53661059547 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi @@ -288,6 +288,10 @@ }; }; +&adm_dma { + status = "okay"; +}; + &gmac0 { status = "okay"; phy-mode = "rgmii"; diff --git a/target/linux/ramips/dts/mt7621_dlink_dap-1620-b1.dts b/target/linux/ramips/dts/mt7621_dlink_dap-1620-b1.dts index 919e5be4b9c..5005eb1a724 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dap-1620-b1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dap-1620-b1.dts @@ -1,158 +1,8 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "mt7621.dtsi" - -#include -#include +#include "mt7621_dlink_dxx-1xx0-x1.dtsi" / { compatible = "dlink,dap-1620-b1", "mediatek,mt7621-soc"; model = "D-Link DAP-1620 B1"; - - aliases { - label-mac-device = &gmac0; - - led-boot = &led_status_red; - led-failsafe = &led_status_green; - led-running = &led_status_green; - led-upgrade = &led_status_red; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&gpio 7 GPIO_ACTIVE_LOW>; - linux,code = ; - debounce-interval = <60>; - }; - - wps { - label = "wps"; - gpios = <&gpio 18 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; - - leds { - compatible = "gpio-leds"; - - led_status_red: status_red { - label = "red:status"; - gpios = <&gpio 16 GPIO_ACTIVE_LOW>; - }; - - led_status_green: status_green { - label = "green:status"; - gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - }; - - rssi_low_red { - label = "red:rssilow"; - gpios = <&gpio 25 GPIO_ACTIVE_LOW>; - }; - - rssi_low_green { - label = "green:rssilow"; - gpios = <&gpio 24 GPIO_ACTIVE_LOW>; - }; - - rssi_med_green { - label = "green:rssimed"; - gpios = <&gpio 23 GPIO_ACTIVE_LOW>; - }; - - rssi_high_green { - label = "green:rssihigh"; - gpios = <&gpio 22 GPIO_ACTIVE_LOW>; - }; - }; }; - -&spi0 { - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <50000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; - }; - - partition@50000 { - compatible = "denx,uimage"; - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - }; - }; -}; - -&pcie { - status = "okay"; -}; - -&pcie0 { - wifi@0,0 { - compatible = "mediatek,mt76"; - reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x0>; - /* The correct MAC addresses are set in 10_fix_wifi_mac. */ - }; -}; - -&gmac0 { - nvmem-cells = <&macaddr_factory_e000>; - nvmem-cell-names = "mac-address"; -}; - -&switch0 { - ports { - port@0 { - status = "okay"; - label = "lan"; - }; - }; -}; - -ðernet { - pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; -}; - -&state_default { - gpio { - groups = "uart3", "jtag", "wdt"; - function = "gpio"; - }; -}; - diff --git a/target/linux/ramips/dts/mt7621_dlink_dra-1360-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dra-1360-a1.dts new file mode 100644 index 00000000000..294093b6ff1 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_dlink_dra-1360-a1.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621_dlink_dxx-1xx0-x1.dtsi" + +/ { + compatible = "dlink,dra-1360-a1", "mediatek,mt7621-soc"; + model = "D-Link DRA-1360 A1"; +}; diff --git a/target/linux/ramips/dts/mt7621_dlink_dxx-1xx0-x1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dxx-1xx0-x1.dtsi new file mode 100644 index 00000000000..8fb6de7c480 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_dlink_dxx-1xx0-x1.dtsi @@ -0,0 +1,154 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include + +/ { + aliases { + label-mac-device = &gmac0; + + led-boot = &led_status_red; + led-failsafe = &led_status_green; + led-running = &led_status_green; + led-upgrade = &led_status_red; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + + wps { + label = "wps"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_status_red: status_red { + label = "red:status"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + led_status_green: status_green { + label = "green:status"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + rssi_low_red { + label = "red:rssilow"; + gpios = <&gpio 25 GPIO_ACTIVE_LOW>; + }; + + rssi_low_green { + label = "green:rssilow"; + gpios = <&gpio 24 GPIO_ACTIVE_LOW>; + }; + + rssi_med_green { + label = "green:rssimed"; + gpios = <&gpio 23 GPIO_ACTIVE_LOW>; + }; + + rssi_high_green { + label = "green:rssihigh"; + gpios = <&gpio 22 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0>; + /* The correct MAC addresses are set in 10_fix_wifi_mac. */ + }; +}; + +&gmac0 { + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan"; + }; + }; +}; + +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + +&state_default { + gpio { + groups = "uart3", "jtag", "wdt"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index ad45613a0b4..338cbae5b6a 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -614,12 +614,9 @@ define Device/cudy_x6-v2 endef TARGET_DEVICES += cudy_x6-v2 -define Device/dlink_dap-1620-b1 +define Device/dlink_dxx-1xx0-x1 DEVICE_VENDOR := D-Link - DEVICE_MODEL := DAP-1620 - DEVICE_VARIANT := B1 DEVICE_PACKAGES := kmod-mt7615-firmware rssileds - DLINK_HWID := MT76XMT7621-RP-PR2475-NA IMAGE_SIZE := 16064k IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | \ @@ -628,6 +625,13 @@ define Device/dlink_dap-1620-b1 append-string $$(DLINK_HWID) | \ check-size endef + +define Device/dlink_dap-1620-b1 + $(Device/dlink_dxx-1xx0-x1) + DEVICE_MODEL := DAP-1620 + DEVICE_VARIANT := B1 + DLINK_HWID := MT76XMT7621-RP-PR2475-NA +endef TARGET_DEVICES += dlink_dap-1620-b1 define Device/dlink_dap-x1860-a1 @@ -799,6 +803,14 @@ define Device/dlink_dir-882-r1 endef TARGET_DEVICES += dlink_dir-882-r1 +define Device/dlink_dra-1360-a1 + $(Device/dlink_dxx-1xx0-x1) + DEVICE_MODEL := DRA-1360 + DEVICE_VARIANT := A1 + DLINK_HWID := MT76XMT7621-RP-RA1360-NA +endef +TARGET_DEVICES += dlink_dra-1360-a1 + define Device/dual-q_h721 $(Device/dsa-migration) $(Device/uimage-lzma-loader) diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index 1de35104c32..1e13c04c2f2 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -69,7 +69,8 @@ jcg,y2|\ xzwifi,creativebox-v1) ucidef_set_led_netdev "internet" "internet" "blue:internet" "wan" ;; -dlink,dap-1620-b1) +dlink,dap-1620-b1|\ +dlink,dra-1360-a1) ucidef_set_rssimon "wlan1" "200000" "1" ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan1" "1" "40" ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:rssilow" "wlan1" "21" "100" diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index bd4cb508126..7bd5e83c5a1 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -16,6 +16,7 @@ ramips_setup_interfaces() asus,rp-ac87|\ dlink,dap-1620-b1|\ dlink,dap-x1860-a1|\ + dlink,dra-1360-a1|\ edimax,re23s|\ linksys,re7000|\ mikrotik,ltap-2hnd|\ diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index a15b4a225f2..96b49ff00ae 100644 --- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -38,7 +38,8 @@ case "$board" in macaddr_setbit_la "$(macaddr_add $hw_mac_addr 0x100000)" > /sys${DEVPATH}/macaddress ;; dlink,dap-1620-b1|\ - dlink,dir-853-a1) + dlink,dir-853-a1|\ + dlink,dra-1360-a1) lan_mac_addr="$(mtd_get_mac_binary factory 0xe000)" [ "$PHYNBR" = "0" ] && \ macaddr_add $lan_mac_addr 1 > /sys${DEVPATH}/macaddress diff --git a/target/linux/rockchip/image/armv8.mk b/target/linux/rockchip/image/armv8.mk index dc977859a6d..df16505d29d 100644 --- a/target/linux/rockchip/image/armv8.mk +++ b/target/linux/rockchip/image/armv8.mk @@ -52,6 +52,15 @@ define Device/friendlyarm_nanopi-r4s endef TARGET_DEVICES += friendlyarm_nanopi-r4s +define Device/pine64_rock64 + DEVICE_VENDOR := Pine64 + DEVICE_MODEL := Rock64 + SOC := rk3328 + UBOOT_DEVICE_NAME := rock64-rk3328 + IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata +endef +TARGET_DEVICES += pine64_rock64 + define Device/pine64_rockpro64 DEVICE_VENDOR := Pine64 DEVICE_MODEL := RockPro64