Merge branch 'master'

This commit is contained in:
VIKING 2025-10-27 22:20:49 +08:00
commit 7dd9f09f85
109 changed files with 2817 additions and 1087 deletions

View File

@ -358,9 +358,11 @@ menu "Global build settings"
config PKG_FORTIFY_SOURCE_NONE
bool "None"
config PKG_FORTIFY_SOURCE_1
bool "Conservative"
bool "Conservative Level 1"
config PKG_FORTIFY_SOURCE_2
bool "Aggressive"
bool "Aggressive Level 2"
config PKG_FORTIFY_SOURCE_3
bool "Aggressive Level 3"
endchoice
choice

View File

@ -51,6 +51,11 @@ ifdef CONFIG_PKG_FORTIFY_SOURCE_2
TARGET_CFLAGS += -D_FORTIFY_SOURCE=2
endif
endif
ifdef CONFIG_PKG_FORTIFY_SOURCE_3
ifeq ($(strip $(PKG_FORTIFY_SOURCE)),1)
TARGET_CFLAGS += -D_FORTIFY_SOURCE=3
endif
endif
ifdef CONFIG_PKG_RELRO_PARTIAL
ifeq ($(strip $(PKG_RELRO)),1)
TARGET_CFLAGS += -Wl,-z,relro

View File

@ -278,6 +278,13 @@ define U-Boot/nanopi-r5s-rk3568
friendlyarm_nanopi-r5s
endef
define U-Boot/x3568-v4-rk3568
$(U-Boot/rk3568/Default)
NAME:=NineTripod X3568 v4
BUILD_DEVICES:= \
ninetripod_x3568-v4
endef
define U-Boot/photonicat-rk3568
$(U-Boot/rk3568/Default)
NAME:=Photonicat
@ -482,6 +489,7 @@ UBOOT_TARGETS := \
nanopi-r5c-rk3568 \
nanopi-r5s-rk3568 \
photonicat-rk3568 \
x3568-v4-rk3568 \
xiguapi-v3-rk3568 \
radxa-e25-rk3568 \
roc-pc-rk3568 \

View File

@ -0,0 +1,3 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "rk356x-u-boot.dtsi"

View File

@ -0,0 +1,846 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/soc/rockchip,vop2.h>
#include "rk3568.dtsi"
/ {
model = "NineTripod X3568 v4";
compatible = "ninetripod,x3568-v4", "rockchip,rk3568";
aliases {
ethernet0 = &gmac0;
ethernet1 = &gmac1;
mmc0 = &sdhci;
mmc1 = &sdmmc0;
mmc2 = &sdmmc2;
};
chosen {
stdout-path = "serial2:1500000n8";
};
adc-keys {
compatible = "adc-keys";
io-channels = <&saradc 0>;
io-channel-names = "buttons";
keyup-threshold-microvolt = <1800000>;
poll-interval = <100>;
button-vol-up {
label = "volume up";
linux,code = <KEY_VOLUMEUP>;
press-threshold-microvolt = <50000>;
};
button-vol-down {
label = "volume down";
linux,code = <KEY_VOLUMEDOWN>;
press-threshold-microvolt = <500000>;
};
};
hdmi-con {
compatible = "hdmi-connector";
type = "a";
port {
hdmi_con_in: endpoint {
remote-endpoint = <&hdmi_out_con>;
};
};
};
leds {
compatible = "gpio-leds";
led_work: led-0 {
gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>;
function = LED_FUNCTION_HEARTBEAT;
color = <LED_COLOR_ID_BLUE>;
linux,default-trigger = "heartbeat";
pinctrl-names = "default";
pinctrl-0 = <&led_work_en>;
};
};
rk809-sound {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,name = "Analog RK809";
simple-audio-card,mclk-fs = <256>;
simple-audio-card,cpu {
sound-dai = <&i2s1_8ch>;
};
simple-audio-card,codec {
sound-dai = <&rk809>;
};
};
pdm_codec: pdm-codec {
compatible = "dmic-codec";
num-channels = <2>;
#sound-dai-cells = <0>;
};
pdm_sound: pdm-sound {
compatible = "simple-audio-card";
simple-audio-card,name = "microphone";
simple-audio-card,cpu {
sound-dai = <&pdm>;
};
simple-audio-card,codec {
sound-dai = <&pdm_codec>;
};
};
spdif_dit: spdif-dit {
compatible = "linux,spdif-dit";
#sound-dai-cells = <0>;
};
spdif_sound: spdif-sound {
compatible = "simple-audio-card";
simple-audio-card,name = "SPDIF";
simple-audio-card,cpu {
sound-dai = <&spdif>;
};
simple-audio-card,codec {
sound-dai = <&spdif_dit>;
};
};
sdio_pwrseq: sdio-pwrseq {
compatible = "mmc-pwrseq-simple";
clocks = <&rk809 1>;
clock-names = "ext_clock";
pinctrl-names = "default";
pinctrl-0 = <&wifi_enable>;
post-power-on-delay-ms = <100>;
power-off-delay-us = <300>;
reset-gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_LOW>;
};
dc_12v: regulator-dc-12v {
compatible = "regulator-fixed";
regulator-name = "dc_12v";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <12000000>;
regulator-max-microvolt = <12000000>;
};
pcie30_avdd0v9: regulator-pcie30-avdd0v9 {
compatible = "regulator-fixed";
regulator-name = "pcie30_avdd0v9";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <900000>;
vin-supply = <&vcc3v3_sys>;
};
pcie30_avdd1v8: regulator-pcie30-avdd1v8 {
compatible = "regulator-fixed";
regulator-name = "pcie30_avdd1v8";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
vin-supply = <&vcc3v3_sys>;
};
vcc3v3_sys: regulator-vcc3v3-sys {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_sys";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
vin-supply = <&dc_12v>;
};
vcc3v3_pcie: regulator-vcc3v3-pcie {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_pcie";
enable-active-high;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
pinctrl-names = "default";
pinctrl-0 = <&vcc3v3_pcie_en_pin>;
gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
startup-delay-us = <5000>;
vin-supply = <&vcc5v0_sys>;
};
vcc5v0_sys: regulator-vcc5v0-sys {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_sys";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&dc_12v>;
};
vcc5v0_usb: regulator-vcc5v0-usb {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_usb";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&dc_12v>;
};
vcc5v0_usb_host: regulator-vcc5v0-usb-host {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&vcc5v0_usb_host_en>;
regulator-name = "vcc5v0_usb_host";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc5v0_usb>;
};
vcc5v0_usb_otg: regulator-vcc5v0-usb-otg {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&vcc5v0_usb_otg_en>;
regulator-name = "vcc5v0_usb_otg";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc5v0_usb>;
};
};
&can1 {
assigned-clocks = <&cru CLK_CAN1>;
assigned-clock-rates = <150000000>;
pinctrl-names = "default";
pinctrl-0 = <&can1m1_pins>;
status = "okay";
};
/* used for usb_host0_xhci */
&combphy0 {
status = "okay";
};
/* used for usb_host1_xhci */
&combphy1 {
status = "okay";
};
/* connected to sata2 */
&combphy2 {
status = "okay";
};
&cpu0 {
cpu-supply = <&vdd_cpu>;
};
&cpu1 {
cpu-supply = <&vdd_cpu>;
};
&cpu2 {
cpu-supply = <&vdd_cpu>;
};
&cpu3 {
cpu-supply = <&vdd_cpu>;
};
&gmac0 {
assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>;
assigned-clock-rates = <0>, <125000000>;
clock_in_out = "output";
pinctrl-names = "default";
pinctrl-0 = <&gmac0_miim
&gmac0_tx_bus2
&gmac0_rx_bus2
&gmac0_rgmii_clk
&gmac0_rgmii_bus
&gmac0_clkinout>;
phy-handle = <&rgmii_phy0>;
phy-mode = "rgmii-id";
status = "okay";
};
&gmac1 {
assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>;
assigned-clock-rates = <0>, <125000000>;
clock_in_out = "output";
pinctrl-names = "default";
pinctrl-0 = <&gmac1m1_miim
&gmac1m1_tx_bus2
&gmac1m1_rx_bus2
&gmac1m1_rgmii_clk
&gmac1m1_rgmii_bus
&gmac1m1_clkinout>;
phy-handle = <&rgmii_phy1>;
phy-mode = "rgmii-id";
status = "okay";
};
&gpu {
mali-supply = <&vdd_gpu>;
status = "okay";
};
&hdmi {
avdd-0v9-supply = <&vdda0v9_image>;
avdd-1v8-supply = <&vcca1v8_image>;
status = "okay";
};
&hdmi_in {
hdmi_in_vp0: endpoint {
remote-endpoint = <&vp0_out_hdmi>;
};
};
&hdmi_out {
hdmi_out_con: endpoint {
remote-endpoint = <&hdmi_con_in>;
};
};
&hdmi_sound {
status = "okay";
};
&i2c0 {
status = "okay";
vdd_cpu: regulator@1c {
compatible = "tcs,tcs4525";
reg = <0x1c>;
fcs,suspend-voltage-selector = <1>;
regulator-name = "vdd_cpu";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1150000>;
regulator-ramp-delay = <2300>;
vin-supply = <&vcc5v0_sys>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
rk809: pmic@20 {
compatible = "rockchip,rk809";
reg = <0x20>;
interrupt-parent = <&gpio0>;
interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
#clock-cells = <1>;
clock-names = "mclk";
clocks = <&cru I2S1_MCLKOUT_TX>;
pinctrl-names = "default";
pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>;
system-power-controller;
#sound-dai-cells = <0>;
vcc1-supply = <&vcc3v3_sys>;
vcc2-supply = <&vcc3v3_sys>;
vcc3-supply = <&vcc3v3_sys>;
vcc4-supply = <&vcc3v3_sys>;
vcc5-supply = <&vcc3v3_sys>;
vcc6-supply = <&vcc3v3_sys>;
vcc7-supply = <&vcc3v3_sys>;
vcc8-supply = <&vcc3v3_sys>;
vcc9-supply = <&vcc3v3_sys>;
wakeup-source;
regulators {
vdd_logic: DCDC_REG1 {
regulator-name = "vdd_logic";
regulator-always-on;
regulator-boot-on;
regulator-initial-mode = <0x2>;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
regulator-ramp-delay = <6001>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdd_gpu: DCDC_REG2 {
regulator-name = "vdd_gpu";
regulator-always-on;
regulator-initial-mode = <0x2>;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
regulator-ramp-delay = <6001>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc_ddr: DCDC_REG3 {
regulator-name = "vcc_ddr";
regulator-always-on;
regulator-boot-on;
regulator-initial-mode = <0x2>;
regulator-state-mem {
regulator-on-in-suspend;
};
};
vdd_npu: DCDC_REG4 {
regulator-name = "vdd_npu";
regulator-initial-mode = <0x2>;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
regulator-ramp-delay = <6001>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc_1v8: DCDC_REG5 {
regulator-name = "vcc_1v8";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdda0v9_image: LDO_REG1 {
regulator-name = "vdda0v9_image";
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <900000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdda_0v9: LDO_REG2 {
regulator-name = "vdda_0v9";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <900000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdda0v9_pmu: LDO_REG3 {
regulator-name = "vdda0v9_pmu";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <900000>;
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <900000>;
};
};
vccio_acodec: LDO_REG4 {
regulator-name = "vccio_acodec";
regulator-always-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vccio_sd: LDO_REG5 {
regulator-name = "vccio_sd";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc3v3_pmu: LDO_REG6 {
regulator-name = "vcc3v3_pmu";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <3300000>;
};
};
vcca_1v8: LDO_REG7 {
regulator-name = "vcca_1v8";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcca1v8_pmu: LDO_REG8 {
regulator-name = "vcca1v8_pmu";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1800000>;
};
};
vcca1v8_image: LDO_REG9 {
regulator-name = "vcca1v8_image";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc_3v3: SWITCH_REG1 {
regulator-name = "vcc_3v3";
regulator-always-on;
regulator-boot-on;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc3v3_sd: SWITCH_REG2 {
regulator-name = "vcc3v3_sd";
regulator-state-mem {
regulator-off-in-suspend;
};
};
};
codec {
rockchip,mic-in-differential;
};
};
};
&i2c5 {
status = "okay";
rtc@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
#clock-cells = <0>;
};
};
&i2s0_8ch {
status = "okay";
};
&i2s1_8ch {
pinctrl-0 = <&i2s1m0_sclktx &i2s1m0_lrcktx &i2s1m0_sdi0 &i2s1m0_sdo0>;
rockchip,trcm-sync-tx-only;
status = "okay";
};
/* used for AP6275S Bluetooth Sound */
&i2s3_2ch {
status = "okay";
};
&mdio0 {
rgmii_phy0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x0>;
reset-assert-us = <20000>;
reset-deassert-us = <100000>;
reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
};
};
&mdio1 {
rgmii_phy1: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x0>;
reset-assert-us = <20000>;
reset-deassert-us = <100000>;
reset-gpios = <&gpio2 RK_PD1 GPIO_ACTIVE_LOW>;
};
};
&pcie30phy {
status = "okay";
};
&pcie3x2 {
pinctrl-names = "default";
pinctrl-0 = <&pcie_reset_pin>;
reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
vpcie3v3-supply = <&vcc3v3_pcie>;
status = "okay";
};
&pdm {
status = "okay";
};
&pinctrl {
leds {
led_work_en: led_work_en {
rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
pmic {
pmic_int: pmic_int {
rockchip,pins =
<0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
sdio-pwrseq {
wifi_enable: wifi-enable {
rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
usb {
vcc5v0_usb_host_en: vcc5v0_usb_host_en {
rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
};
vcc5v0_usb_otg_en: vcc5v0_usb_otg_en {
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
pcie {
pcie_reset_pin: pcie-reset-pin {
rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
};
vcc3v3_pcie_en_pin: vcc3v3-pcie-en-pin {
rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};
&pmu_io_domains {
pmuio1-supply = <&vcc3v3_pmu>;
pmuio2-supply = <&vcc3v3_pmu>;
vccio1-supply = <&vccio_acodec>;
vccio2-supply = <&vcc_1v8>;
vccio3-supply = <&vccio_sd>;
vccio4-supply = <&vcc_1v8>;
vccio5-supply = <&vcc_3v3>;
vccio6-supply = <&vcc_1v8>;
vccio7-supply = <&vcc_3v3>;
status = "okay";
};
&pwm4 {
status = "okay";
};
/* Required remotectl for IR receiver */
&pwm7 {
status = "disabled";
};
&saradc {
vref-supply = <&vcca_1v8>;
status = "okay";
};
&sata2 {
status = "okay";
};
/* used for eMMC */
&sdhci {
bus-width = <8>;
max-frequency = <200000000>;
mmc-hs200-1_8v;
non-removable;
pinctrl-names = "default";
pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
status = "okay";
};
/* used for microSD (TF) Slot */
&sdmmc0 {
bus-width = <4>;
cap-sd-highspeed;
cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
disable-wp;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
sd-uhs-sdr104;
vmmc-supply = <&vcc3v3_sd>;
vqmmc-supply = <&vccio_sd>;
status = "okay";
};
/* used for AP6275S WiFi */
&sdmmc2 {
bus-width = <4>;
disable-wp;
cap-sd-highspeed;
cap-sdio-irq;
keep-power-in-suspend;
mmc-pwrseq = <&sdio_pwrseq>;
non-removable;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
sd-uhs-sdr12;
sd-uhs-sdr25;
sd-uhs-sdr50;
sd-uhs-sdr104;
vmmc-supply = <&vcc3v3_sys>;
vqmmc-supply = <&vcc_1v8>;
status = "okay";
};
&spdif {
status = "okay";
};
&tsadc {
rockchip,hw-tshut-mode = <1>;
rockchip,hw-tshut-polarity = <0>;
status = "okay";
};
/* used for Debug */
&uart2 {
status = "okay";
};
&uart3 {
pinctrl-0 = <&uart3m1_xfer>;
status = "okay";
};
&uart4 {
pinctrl-0 = <&uart4m1_xfer>;
status = "okay";
};
/* used for WiFi/BT AP6275S */
&uart8 {
pinctrl-0 = <&uart8m0_xfer &uart8m0_ctsn>;
status = "okay";
};
&uart9 {
pinctrl-0 = <&uart9m1_xfer>;
status = "okay";
};
&usb_host0_ehci {
status = "okay";
};
&usb_host0_ohci {
status = "okay";
};
&usb_host0_xhci {
extcon = <&usb2phy0>;
status = "okay";
};
&usb_host1_ehci {
status = "okay";
};
&usb_host1_ohci {
status = "okay";
};
&usb_host1_xhci {
status = "okay";
};
&usb2phy0 {
status = "okay";
};
&usb2phy0_host {
phy-supply = <&vcc5v0_usb_host>;
status = "okay";
};
&usb2phy0_otg {
phy-supply = <&vcc5v0_usb_otg>;
status = "okay";
};
&usb2phy1 {
status = "okay";
};
&usb2phy1_host {
phy-supply = <&vcc5v0_usb_host>;
status = "okay";
};
&usb2phy1_otg {
phy-supply = <&vcc5v0_usb_host>;
status = "okay";
};
&vop {
assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
status = "okay";
};
&vop_mmu {
status = "okay";
};
&vp0 {
vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
reg = <ROCKCHIP_VOP2_EP_HDMI0>;
remote-endpoint = <&hdmi_in_vp0>;
};
};

View File

@ -0,0 +1,80 @@
CONFIG_ARM=y
CONFIG_SKIP_LOWLEVEL_INIT=y
CONFIG_SYS_HAS_NONCACHED_MEMORY=y
CONFIG_COUNTER_FREQUENCY=24000000
CONFIG_ARCH_ROCKCHIP=y
CONFIG_DEFAULT_DEVICE_TREE="rk3568-x3568-v4"
CONFIG_ROCKCHIP_RK3568=y
CONFIG_SPL_SERIAL=y
CONFIG_DEBUG_UART_BASE=0xFE660000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_SYS_LOAD_ADDR=0xc00800
CONFIG_PCI=y
CONFIG_DEBUG_UART=y
CONFIG_AHCI=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_SPL_FIT_SIGNATURE=y
CONFIG_SPL_LOAD_FIT=y
CONFIG_LEGACY_IMAGE_FORMAT=y
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-x3568-v4.dtb"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_SPL_MAX_SIZE=0x40000
CONFIG_SPL_PAD_TO=0x7f8000
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
CONFIG_SPL_ATF=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_GPT=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
CONFIG_CMD_PCI=y
CONFIG_CMD_USB=y
CONFIG_CMD_PMIC=y
CONFIG_CMD_REGULATOR=y
# CONFIG_SPL_DOS_PARTITION is not set
CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_LIVE=y
# CONFIG_OF_UPSTREAM is not set
CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_SPL_REGMAP=y
CONFIG_SPL_SYSCON=y
CONFIG_DWC_AHCI=y
CONFIG_SPL_CLK=y
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MISC=y
CONFIG_SUPPORT_EMMC_RPMB=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_ROCKCHIP=y
CONFIG_PHY_MOTORCOMM=y
CONFIG_DWC_ETH_QOS=y
CONFIG_DWC_ETH_QOS_ROCKCHIP=y
CONFIG_NVME_PCI=y
CONFIG_PCIE_DW_ROCKCHIP=y
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
CONFIG_SPL_PINCTRL=y
CONFIG_DM_PMIC=y
CONFIG_PMIC_RK8XX=y
CONFIG_REGULATOR_RK8XX=y
CONFIG_PWM_ROCKCHIP=y
CONFIG_SPL_RAM=y
CONFIG_SCSI=y
CONFIG_BAUDRATE=1500000
CONFIG_DEBUG_UART_SHIFT=2
CONFIG_SYS_NS16550_MEM32=y
CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
CONFIG_USB_DWC3=y
CONFIG_USB_DWC3_GENERIC=y
CONFIG_ERRNO_STR=y

View File

@ -0,0 +1,55 @@
From a63456b9191fae2fe49f4b121e025792022e3950 Mon Sep 17 00:00:00 2001
From: Markus Volk <f_l_k@t-online.de>
Date: Wed, 30 Oct 2024 06:07:16 +0100
Subject: [PATCH] scripts/dtc/pylibfdt/libfdt.i_shipped: Use SWIG_AppendOutput
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Swig has changed language specific AppendOutput functions. The helper
macro SWIG_AppendOutput remains unchanged. Use that instead
of SWIG_Python_AppendOutput, which would require an extra parameter
since swig 4.3.0.
/home/flk/poky/build-test/tmp/work/qemux86_64-poky-linux/u-boot/2024.10/git/arch/x86/cpu/u-boot-64.lds
| scripts/dtc/pylibfdt/libfdt_wrap.c: In function _wrap_fdt_next_node:
| scripts/dtc/pylibfdt/libfdt_wrap.c:5581:17: error: too few arguments to function SWIG_Python_AppendOutput
| 5581 | resultobj = SWIG_Python_AppendOutput(resultobj, val);
| | ^~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Markus Volk <f_l_k@t-online.de>
Reported-by: Rudi Heitbaum <rudi@heitbaum.com>
Link: https://github.com/dgibson/dtc/pull/154
---
scripts/dtc/pylibfdt/libfdt.i_shipped | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/scripts/dtc/pylibfdt/libfdt.i_shipped
+++ b/scripts/dtc/pylibfdt/libfdt.i_shipped
@@ -1037,7 +1037,7 @@ typedef uint32_t fdt32_t;
fdt_string(fdt1, fdt32_to_cpu($1->nameoff)));
buff = PyByteArray_FromStringAndSize(
(const char *)($1 + 1), fdt32_to_cpu($1->len));
- resultobj = SWIG_Python_AppendOutput(resultobj, buff);
+ resultobj = SWIG_AppendOutput(resultobj, buff);
}
}
@@ -1076,7 +1076,7 @@ typedef uint32_t fdt32_t;
%typemap(argout) int *depth {
PyObject *val = Py_BuildValue("i", *arg$argnum);
- resultobj = SWIG_Python_AppendOutput(resultobj, val);
+ resultobj = SWIG_AppendOutput(resultobj, val);
}
%apply int *depth { int *depth };
@@ -1092,7 +1092,7 @@ typedef uint32_t fdt32_t;
if (PyTuple_GET_SIZE(resultobj) == 0)
resultobj = val;
else
- resultobj = SWIG_Python_AppendOutput(resultobj, val);
+ resultobj = SWIG_AppendOutput(resultobj, val);
}
}

View File

@ -8,15 +8,15 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=valgrind
PKG_VERSION:=3.23.0
PKG_VERSION:=3.26.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://sourceware.org/pub/valgrind/
PKG_HASH:=c5c34a3380457b9b75606df890102e7df2c702b9420c2ebef9540f8b5d56264d
PKG_HASH:=8d54c717029106f1644aadaf802ab9692e53d93dd015cbd19e74190eba616bd7
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE:=GPL-3.0
PKG_CPE_ID:=cpe:/a:valgrind:valgrind
PKG_FIXUP = autoreconf
@ -33,7 +33,7 @@ include $(INCLUDE_DIR)/kernel.mk
define Package/valgrind
SECTION:=devel
CATEGORY:=Development
DEPENDS:=@mips||mipsel||mips64||mips64el||i386||x86_64||powerpc||arm_v7||aarch64 +libpthread +librt
DEPENDS:=@mips||mipsel||mips64||mips64el||i386||x86_64||powerpc||arm_v7||aarch64||riscv64 +libpthread +librt
TITLE:=debugging and profiling tools for Linux
URL:=http://www.valgrind.org
endef
@ -82,7 +82,7 @@ define Package/valgrind/description
to speed up and reduce memory use of your programs.
endef
CPU := $(patsubst x86_64,amd64,$(patsubst x86,i386,$(patsubst um,$(ARCH),$(LINUX_KARCH))))
CPU := $(patsubst riscv,riscv64,$(patsubst x86_64,amd64,$(patsubst x86,i386,$(patsubst um,$(ARCH),$(LINUX_KARCH)))))
CONFIGURE_VARS += \
UNAME_R=$(LINUX_VERSION)

View File

@ -1,61 +0,0 @@
From 7214886886bce9029f325214156c02dcfff760d5 Mon Sep 17 00:00:00 2001
From: Paul Floyd <pjfloyd@wanadoo.fr>
Date: Sat, 27 Apr 2024 13:07:07 +0200
Subject: 486180 - [Valgrind][MIPS] 'VexGuestArchState' has no member named
'guest_IP_AT_SYSCALL'
---
NEWS | 34 ++++++++++++++++++++++++++++++++++
VEX/priv/guest_mips_helpers.c | 4 ++++
VEX/pub/libvex_guest_mips32.h | 6 +++---
VEX/pub/libvex_guest_mips64.h | 2 ++
configure.ac | 6 +++---
5 files changed, 46 insertions(+), 6 deletions(-)
--- a/VEX/priv/guest_mips_helpers.c
+++ b/VEX/priv/guest_mips_helpers.c
@@ -187,6 +187,8 @@ void LibVEX_GuestMIPS32_initialise( /*OU
vex_state->guest_w1.w64[1] = 0;
vex_state->guest_w2.w64[0] = 0;
vex_state->guest_w2.w64[1] = 0;
+
+ vex_state->guest_IP_AT_SYSCALL = 0;
}
void LibVEX_GuestMIPS64_initialise ( /*OUT*/ VexGuestMIPS64State * vex_state )
@@ -294,6 +296,8 @@ void LibVEX_GuestMIPS64_initialise ( /*O
vex_state->guest_LLaddr = 0xFFFFFFFFFFFFFFFFULL;
vex_state->guest_LLdata = 0;
+ vex_state->guest_IP_AT_SYSCALL = 0;
+
vex_state->guest_MSACSR = 0;
}
--- a/VEX/pub/libvex_guest_mips32.h
+++ b/VEX/pub/libvex_guest_mips32.h
@@ -188,10 +188,10 @@ typedef
/* 1016 */ UInt guest_MSACSR;
- /* 1020 */ UInt _padding3;
+ /* 1020 */ UInt guest_IP_AT_SYSCALL;
- /* 1020 */ ULong guest_LLdata64;
- /* 1028 */ ULong _padding4;
+ /* 1024 */ ULong guest_LLdata64;
+ /* 1032 */ ULong _padding3;
} VexGuestMIPS32State;
/*---------------------------------------------------------------*/
/*--- Utility functions for MIPS32 guest stuff. ---*/
--- a/VEX/pub/libvex_guest_mips64.h
+++ b/VEX/pub/libvex_guest_mips64.h
@@ -184,6 +184,8 @@ typedef
/* 1144 */ UInt guest_MSACSR;
/* 1148 */ UInt _padding2;
+ /* 1152 */ ULong guest_IP_AT_SYSCALL;
+ /* 1160 */ ULong _padding3;
} VexGuestMIPS64State;

View File

@ -1,159 +0,0 @@
From 54d6ad3348fb50f5b972fe9c05d0d8757bfe73ba Mon Sep 17 00:00:00 2001
From: Aleksandar Rikalo <arikalo@gmail.com>
Date: Fri, 10 May 2024 17:59:28 +0200
Subject: mips: skip using shared syscall numbers for mips32
mips does not use shared syscall numbers, so we can not use
vki-scnums-shared-linux.h.
This partially fixes KDE #444781.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Aleksandar Rikalo <arikalo@gmail.com>
---
coregrind/m_syswrap/syswrap-mips32-linux.c | 1 +
include/pub_tool_vkiscnums_asm.h | 2 -
include/vki/vki-scnums-mips32-linux.h | 105 ++++++++++++++++-----
3 files changed, 83 insertions(+), 25 deletions(-)
--- a/coregrind/m_syswrap/syswrap-mips32-linux.c
+++ b/coregrind/m_syswrap/syswrap-mips32-linux.c
@@ -1110,6 +1110,7 @@ static SyscallTableEntry syscall_main_ta
LINX_ (__NR_pwritev2, sys_pwritev2), // 362
//..
LINXY(__NR_statx, sys_statx), // 366
+ GENX_(__NR_rseq, sys_ni_syscall), // 367
LINXY(__NR_clock_gettime64, sys_clock_gettime64), // 403
LINX_(__NR_clock_settime64, sys_clock_settime64), // 404
--- a/include/pub_tool_vkiscnums_asm.h
+++ b/include/pub_tool_vkiscnums_asm.h
@@ -63,8 +63,6 @@
# include "vki/vki-scnums-arm64-linux.h"
#elif defined(VGP_mips32_linux)
-# include "vki/vki-scnums-shared-linux.h"
-# include "vki/vki-scnums-32bit-linux.h"
# include "vki/vki-scnums-mips32-linux.h"
#elif defined(VGP_nanomips_linux)
--- a/include/vki/vki-scnums-mips32-linux.h
+++ b/include/vki/vki-scnums-mips32-linux.h
@@ -380,35 +380,94 @@
#define __NR_setns (__NR_Linux + 343)
#define __NR_process_vm_readv (__NR_Linux + 345)
#define __NR_process_vm_writev (__NR_Linux + 346)
-#define __NR_kcmp (__NR_Linux + 347)
-#define __NR_finit_module (__NR_Linux + 348)
-#define __NR_sched_setattr (__NR_Linux + 349)
-#define __NR_sched_getattr (__NR_Linux + 350)
-#define __NR_renameat2 (__NR_Linux + 351)
-#define __NR_seccomp (__NR_Linux + 352)
-#define __NR_getrandom (__NR_Linux + 353)
-#define __NR_memfd_create (__NR_Linux + 354)
-#define __NR_bpf (__NR_Linux + 355)
-#define __NR_execveat (__NR_Linux + 356)
-#define __NR_userfaultfd (__NR_Linux + 357)
-#define __NR_membarrier (__NR_Linux + 358)
-#define __NR_mlock2 (__NR_Linux + 359)
-#define __NR_copy_file_range (__NR_Linux + 360)
-#define __NR_preadv2 (__NR_Linux + 361)
-#define __NR_pwritev2 (__NR_Linux + 362)
-#define __NR_pkey_mprotect (__NR_Linux + 363)
-#define __NR_pkey_alloc (__NR_Linux + 364)
-#define __NR_pkey_free (__NR_Linux + 365)
-#define __NR_statx (__NR_Linux + 366)
-
+#define __NR_kcmp (__NR_Linux + 347)
+#define __NR_finit_module (__NR_Linux + 348)
+#define __NR_sched_setattr (__NR_Linux + 349)
+#define __NR_sched_getattr (__NR_Linux + 350)
+#define __NR_renameat2 (__NR_Linux + 351)
+#define __NR_seccomp (__NR_Linux + 352)
+#define __NR_getrandom (__NR_Linux + 353)
+#define __NR_memfd_create (__NR_Linux + 354)
+#define __NR_bpf (__NR_Linux + 355)
+#define __NR_execveat (__NR_Linux + 356)
+#define __NR_userfaultfd (__NR_Linux + 357)
+#define __NR_membarrier (__NR_Linux + 358)
+#define __NR_mlock2 (__NR_Linux + 359)
+#define __NR_copy_file_range (__NR_Linux + 360)
+#define __NR_preadv2 (__NR_Linux + 361)
+#define __NR_pwritev2 (__NR_Linux + 362)
+#define __NR_pkey_mprotect (__NR_Linux + 363)
+#define __NR_pkey_alloc (__NR_Linux + 364)
+#define __NR_pkey_free (__NR_Linux + 365)
+#define __NR_statx (__NR_Linux + 366)
+#define __NR_rseq (__NR_Linux + 367)
+#define __NR_io_pgetevents (__NR_Linux + 368)
+#define __NR_semget (__NR_Linux + 393)
+#define __NR_semctl (__NR_Linux + 394)
+#define __NR_shmget (__NR_Linux + 395)
+#define __NR_shmctl (__NR_Linux + 396)
+#define __NR_shmat (__NR_Linux + 397)
+#define __NR_shmdt (__NR_Linux + 398)
+#define __NR_msgget (__NR_Linux + 399)
+#define __NR_msgsnd (__NR_Linux + 400)
+#define __NR_msgrcv (__NR_Linux + 401)
+#define __NR_msgctl (__NR_Linux + 402)
+#define __NR_clock_gettime64 (__NR_Linux + 403)
+#define __NR_clock_settime64 (__NR_Linux + 404)
+#define __NR_clock_adjtime64 (__NR_Linux + 405)
+#define __NR_clock_getres_time64 (__NR_Linux + 406)
+#define __NR_clock_nanosleep_time64 (__NR_Linux + 407)
+#define __NR_timer_gettime64 (__NR_Linux + 408)
+#define __NR_timer_settime64 (__NR_Linux + 409)
+#define __NR_timerfd_gettime64 (__NR_Linux + 410)
+#define __NR_timerfd_settime64 (__NR_Linux + 411)
+#define __NR_utimensat_time64 (__NR_Linux + 412)
+#define __NR_pselect6_time64 (__NR_Linux + 413)
+#define __NR_ppoll_time64 (__NR_Linux + 414)
+#define __NR_io_pgetevents_time64 (__NR_Linux + 416)
+#define __NR_recvmmsg_time64 (__NR_Linux + 417)
+#define __NR_mq_timedsend_time64 (__NR_Linux + 418)
+#define __NR_mq_timedreceive_time64 (__NR_Linux + 419)
+#define __NR_semtimedop_time64 (__NR_Linux + 420)
+#define __NR_rt_sigtimedwait_time64 (__NR_Linux + 421)
+#define __NR_futex_time64 (__NR_Linux + 422)
+#define __NR_sched_rr_get_interval_time64 (__NR_Linux + 423)
+#define __NR_pidfd_send_signal (__NR_Linux + 424)
+#define __NR_io_uring_setup (__NR_Linux + 425)
+#define __NR_io_uring_enter (__NR_Linux + 426)
+#define __NR_io_uring_register (__NR_Linux + 427)
+#define __NR_open_tree (__NR_Linux + 428)
+#define __NR_move_mount (__NR_Linux + 429)
+#define __NR_fsopen (__NR_Linux + 430)
+#define __NR_fsconfig (__NR_Linux + 431)
+#define __NR_fsmount (__NR_Linux + 432)
+#define __NR_fspick (__NR_Linux + 433)
+#define __NR_pidfd_open (__NR_Linux + 434)
+#define __NR_clone3 (__NR_Linux + 435)
+#define __NR_close_range (__NR_Linux + 436)
+#define __NR_openat2 (__NR_Linux + 437)
+#define __NR_pidfd_getfd (__NR_Linux + 438)
+#define __NR_faccessat2 (__NR_Linux + 439)
+#define __NR_process_madvise (__NR_Linux + 440)
+#define __NR_epoll_pwait2 (__NR_Linux + 441)
+#define __NR_mount_setattr (__NR_Linux + 442)
+#define __NR_quotactl_fd (__NR_Linux + 443)
+#define __NR_landlock_create_ruleset (__NR_Linux + 444)
+#define __NR_landlock_add_rule (__NR_Linux + 445)
+#define __NR_landlock_restrict_self (__NR_Linux + 446)
+#define __NR_process_mrelease (__NR_Linux + 448)
+#define __NR_futex_waitv (__NR_Linux + 449)
+#define __NR_set_mempolicy_home_node (__NR_Linux + 450)
+#define __NR_cachestat (__NR_Linux + 451)
+#define __NR_fchmodat2 (__NR_Linux + 452)
/*
* Offset of the last Linux o32 flavoured syscall
*/
-#define __NR_Linux_syscalls 366
+#define __NR_Linux_syscalls 366
#define __NR_O32_Linux 4000
-#define __NR_O32_Linux_syscalls 366
+#define __NR_O32_Linux_syscalls 366
#endif /* __VKI_SCNUMS_MIPS32_LINUX_H */

View File

@ -1,152 +0,0 @@
From efaa17e53a750d5f0f4c138b507b1b104729ed67 Mon Sep 17 00:00:00 2001
From: Petar Jovanovic <mips32r2@gmail.com>
Date: Mon, 24 Jun 2024 10:33:46 +0000
Subject: mips: skip using shared syscall numbers for mips64
mips does not use shared syscall numbers, so we can not use
vki-scnums-shared-linux.h.
This fixes KDE #444781.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Aleksandar Rikalo <arikalo@gmail.com>
---
coregrind/m_syswrap/syswrap-mips64-linux.c | 1 +
include/pub_tool_vkiscnums_asm.h | 1 -
include/vki/vki-scnums-mips64-linux.h | 98 ++++++++++++++++++++++
3 files changed, 99 insertions(+), 1 deletion(-)
--- a/coregrind/m_syswrap/syswrap-mips64-linux.c
+++ b/coregrind/m_syswrap/syswrap-mips64-linux.c
@@ -813,6 +813,7 @@ static SyscallTableEntry syscall_main_ta
LINX_ (__NR_pwritev2, sys_pwritev2),
LINX_ (__NR_syncfs, sys_syncfs),
LINXY (__NR_statx, sys_statx),
+ GENX_ (__NR_rseq, sys_ni_syscall),
LINX_ (__NR_setns, sys_setns),
LINXY (__NR_io_uring_setup, sys_io_uring_setup),
LINXY (__NR_io_uring_enter, sys_io_uring_enter),
--- a/include/pub_tool_vkiscnums_asm.h
+++ b/include/pub_tool_vkiscnums_asm.h
@@ -70,7 +70,6 @@
# include "vki/vki-scnums-shared-linux.h"
#elif defined(VGP_mips64_linux)
-# include "vki/vki-scnums-shared-linux.h"
# include "vki/vki-scnums-mips64-linux.h"
#elif defined(VGP_x86_freebsd) || defined(VGP_amd64_freebsd) || defined(VGP_arm64_freebsd)
--- a/include/vki/vki-scnums-mips64-linux.h
+++ b/include/vki/vki-scnums-mips64-linux.h
@@ -362,6 +362,45 @@
#define __NR_pkey_alloc (__NR_Linux + 324)
#define __NR_pkey_free (__NR_Linux + 325)
#define __NR_statx (__NR_Linux + 326)
+#define __NR_rseq (__NR_Linux + 327)
+#define __NR_io_pgetevents (__NR_Linux + 328)
+#define __NR_pidfd_send_signal (__NR_Linux + 424)
+#define __NR_io_uring_setup (__NR_Linux + 425)
+#define __NR_io_uring_enter (__NR_Linux + 426)
+#define __NR_io_uring_register (__NR_Linux + 427)
+#define __NR_open_tree (__NR_Linux + 428)
+#define __NR_move_mount (__NR_Linux + 429)
+#define __NR_fsopen (__NR_Linux + 430)
+#define __NR_fsconfig (__NR_Linux + 431)
+#define __NR_fsmount (__NR_Linux + 432)
+#define __NR_fspick (__NR_Linux + 433)
+#define __NR_pidfd_open (__NR_Linux + 434)
+#define __NR_clone3 (__NR_Linux + 435)
+#define __NR_close_range (__NR_Linux + 436)
+#define __NR_openat2 (__NR_Linux + 437)
+#define __NR_pidfd_getfd (__NR_Linux + 438)
+#define __NR_faccessat2 (__NR_Linux + 439)
+#define __NR_process_madvise (__NR_Linux + 440)
+#define __NR_epoll_pwait2 (__NR_Linux + 441)
+#define __NR_mount_setattr (__NR_Linux + 442)
+#define __NR_quotactl_fd (__NR_Linux + 443)
+#define __NR_landlock_create_ruleset (__NR_Linux + 444)
+#define __NR_landlock_add_rule (__NR_Linux + 445)
+#define __NR_landlock_restrict_self (__NR_Linux + 446)
+#define __NR_process_mrelease (__NR_Linux + 448)
+#define __NR_futex_waitv (__NR_Linux + 449)
+#define __NR_set_mempolicy_home_node (__NR_Linux + 450)
+#define __NR_cachestat (__NR_Linux + 451)
+#define __NR_fchmodat2 (__NR_Linux + 452)
+#define __NR_map_shadow_stack (__NR_Linux + 453)
+#define __NR_futex_wake (__NR_Linux + 454)
+#define __NR_futex_wait (__NR_Linux + 455)
+#define __NR_futex_requeue (__NR_Linux + 456)
+#define __NR_statmount (__NR_Linux + 457)
+#define __NR_listmount (__NR_Linux + 458)
+#define __NR_lsm_get_self_attr (__NR_Linux + 459)
+#define __NR_lsm_set_self_attr (__NR_Linux + 460)
+#define __NR_lsm_list_modules (__NR_Linux + 461)
#elif defined(VGABI_N32)
@@ -701,6 +740,65 @@
#define __NR_pkey_alloc (__NR_Linux + 328)
#define __NR_pkey_free (__NR_Linux + 329)
#define __NR_statx (__NR_Linux + 330)
+#define __NR_rseq (__NR_Linux + 331)
+#define __NR_io_pgetevents (__NR_Linux + 332)
+#define __NR_clock_gettime64 (__NR_Linux + 403)
+#define __NR_clock_settime64 (__NR_Linux + 404)
+#define __NR_clock_adjtime64 (__NR_Linux + 405)
+#define __NR_clock_getres_time64 (__NR_Linux + 406)
+#define __NR_clock_nanosleep_time64 (__NR_Linux + 407)
+#define __NR_timer_gettime64 (__NR_Linux + 408)
+#define __NR_timer_settime64 (__NR_Linux + 409)
+#define __NR_timerfd_gettime64 (__NR_Linux + 410)
+#define __NR_timerfd_settime64 (__NR_Linux + 411)
+#define __NR_utimensat_time64 (__NR_Linux + 412)
+#define __NR_pselect6_time64 (__NR_Linux + 413)
+#define __NR_ppoll_time64 (__NR_Linux + 414)
+#define __NR_io_pgetevents_time64 (__NR_Linux + 416)
+#define __NR_recvmmsg_time64 (__NR_Linux + 417)
+#define __NR_mq_timedsend_time64 (__NR_Linux + 418)
+#define __NR_mq_timedreceive_time64 (__NR_Linux + 419)
+#define __NR_semtimedop_time64 (__NR_Linux + 420)
+#define __NR_rt_sigtimedwait_time64 (__NR_Linux + 421)
+#define __NR_futex_time64 (__NR_Linux + 422)
+#define __NR_sched_rr_get_interval_time64 (__NR_Linux + 423)
+#define __NR_pidfd_send_signal (__NR_Linux + 424)
+#define __NR_io_uring_setup (__NR_Linux + 425)
+#define __NR_io_uring_enter (__NR_Linux + 426)
+#define __NR_io_uring_register (__NR_Linux + 427)
+#define __NR_open_tree (__NR_Linux + 428)
+#define __NR_move_mount (__NR_Linux + 429)
+#define __NR_fsopen (__NR_Linux + 430)
+#define __NR_fsconfig (__NR_Linux + 431)
+#define __NR_fsmount (__NR_Linux + 432)
+#define __NR_fspick (__NR_Linux + 433)
+#define __NR_pidfd_open (__NR_Linux + 434)
+#define __NR_clone3 (__NR_Linux + 435)
+#define __NR_close_range (__NR_Linux + 436)
+#define __NR_openat2 (__NR_Linux + 437)
+#define __NR_pidfd_getfd (__NR_Linux + 438)
+#define __NR_faccessat2 (__NR_Linux + 439)
+#define __NR_process_madvise (__NR_Linux + 440)
+#define __NR_epoll_pwait2 (__NR_Linux + 441)
+#define __NR_mount_setattr (__NR_Linux + 442)
+#define __NR_quotactl_fd (__NR_Linux + 443)
+#define __NR_landlock_create_ruleset (__NR_Linux + 444)
+#define __NR_landlock_add_rule (__NR_Linux + 445)
+#define __NR_landlock_restrict_self (__NR_Linux + 446)
+#define __NR_process_mrelease (__NR_Linux + 448)
+#define __NR_futex_waitv (__NR_Linux + 449)
+#define __NR_set_mempolicy_home_node (__NR_Linux + 450)
+#define __NR_cachestat (__NR_Linux + 451)
+#define __NR_fchmodat2 (__NR_Linux + 452)
+#define __NR_map_shadow_stack (__NR_Linux + 453)
+#define __NR_futex_wake (__NR_Linux + 454)
+#define __NR_futex_wait (__NR_Linux + 455)
+#define __NR_futex_requeue (__NR_Linux + 456)
+#define __NR_statmount (__NR_Linux + 457)
+#define __NR_listmount (__NR_Linux + 458)
+#define __NR_lsm_get_self_attr (__NR_Linux + 459)
+#define __NR_lsm_set_self_attr (__NR_Linux + 460)
+#define __NR_lsm_list_modules (__NR_Linux + 461)
#else
#error unknown mips64 abi

View File

@ -1,6 +1,6 @@
--- a/configure.ac
+++ b/configure.ac
@@ -381,7 +381,7 @@ case "${host_os}" in
@@ -362,7 +362,7 @@ case "${host_os}" in
# Ok, this is linux. Check the kernel version
AC_MSG_CHECKING([for the kernel version])

View File

@ -48,7 +48,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32:
--- a/coregrind/m_machine.c
+++ b/coregrind/m_machine.c
@@ -2119,6 +2119,7 @@ Bool VG_(machine_get_hwcaps)( void )
@@ -2167,6 +2167,7 @@ Bool VG_(machine_get_hwcaps)( void )
we are using alternative way to determine FP mode */
ULong result = 0;
@ -56,7 +56,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32:
if (!VG_MINIMAL_SETJMP(env_unsup_insn)) {
__asm__ volatile (
".set push\n\t"
@@ -2136,6 +2137,9 @@ Bool VG_(machine_get_hwcaps)( void )
@@ -2184,6 +2185,9 @@ Bool VG_(machine_get_hwcaps)( void )
fpmode = (result != 0x3FF0000000000000ull);
}

View File

@ -106,7 +106,7 @@ define Package/brcmfmac-nvram-43456-sdio/install
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/brcm/brcmfmac43456-sdio.txt \
$(1)/lib/firmware/brcm/
$(INSTALL_DATA) \
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/brcm/nvram_ap6256.txt \
$(1)/lib/firmware/brcm/brcmfmac4356-sdio.AP6256S.txt
$(LN) \
@ -139,5 +139,8 @@ define Package/brcmfmac-nvram-43752-sdio/install
$(LN) \
brcmfmac43752-sdio.txt \
$(1)/lib/firmware/brcm/brcmfmac43752-sdio.firefly,rk3568-roc-pc.txt
$(LN) \
brcmfmac43752-sdio.txt \
$(1)/lib/firmware/brcm/brcmfmac43752-sdio.ninetripod,x3568-v4.txt
endef
$(eval $(call BuildPackage,brcmfmac-nvram-43752-sdio))

View File

@ -83,6 +83,22 @@ endef
$(eval $(call KernelPackage,input-evdev))
define KernelPackage/input-adc-keys
SUBMENU:=$(INPUT_MODULES_MENU)
TITLE:=ADC Ladder Buttons support
DEPENDS:= +kmod-input-core +kmod-iio-core
KCONFIG:= \
CONFIG_KEYBOARD_ADC \
CONFIG_INPUT_KEYBOARD=y
FILES:=$(LINUX_DIR)/drivers/input/keyboard/adc-keys.ko
AUTOLOAD:=$(call AutoProbe,adc-keys,1)
endef
define KernelPackage/input-adc-keys/description
Enable support for ADC Ladder Buttons.
endef
$(eval $(call KernelPackage,input-adc-keys))
define KernelPackage/input-gpio-keys
SUBMENU:=$(INPUT_MODULES_MENU)

View File

@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=elfutils
PKG_VERSION:=0.192
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION) \
@ -87,6 +87,7 @@ TARGET_CFLAGS += \
-D_GNU_SOURCE \
-Wno-unused-result \
-Wno-format-nonliteral \
-Wno-error=nonnull-compare \
-Wno-error=use-after-free
define Build/InstallDev

View File

@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=odhcpd
PKG_RELEASE:=2
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git
PKG_MIRROR_HASH:=948d935e523389d0fe72aaf14557a53020fce81aaa0a7f30551e8364eed67566
PKG_SOURCE_DATE:=2025-10-22
PKG_SOURCE_VERSION:=0d0fac30075f639fc2d82e5327e307cba30e2687
PKG_MIRROR_HASH:=acb086731fd7d072ddddc1d5f3bad9377e89a05597ce004d24bd0cdb60586f0a
PKG_SOURCE_DATE:=2025-10-26
PKG_SOURCE_VERSION:=fc27940fe9939f99aeb988d021c7edfa54460123
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
PKG_LICENSE:=GPL-2.0

View File

@ -57,6 +57,13 @@
};
};
pcie2_rst_pins: pcie2-rst-pins {
conf {
pins = "pcie_reset2";
drive-open-drain = <1>;
};
};
gswp1_led0_pins: gswp1-led0-pins {
mux {
function = "phy1_led0";
@ -156,6 +163,12 @@
status = "okay";
};
&pcie2 {
pinctrl-names = "default";
pinctrl-0 = <&pcie2_rst_pins>;
status = "okay";
};
&mdio {
as21xx_1: ethernet-phy@1d {
compatible = "ethernet-phy-ieee802.3-c45";

View File

@ -718,6 +718,49 @@
};
};
pcie2: pcie@1fc40000 {
compatible = "airoha,en7581-pcie";
device_type = "pci";
linux,pci-domain = <2>;
#address-cells = <3>;
#size-cells = <2>;
reg = <0x0 0x1fc40000 0x0 0x1670>;
reg-names = "pcie-mac";
clocks = <&scuclk EN7523_CLK_PCIE>;
clock-names = "sys-ck";
phys = <&pciephy>;
phy-names = "pcie-phy";
ranges = <0x02000000 0 0x28000000 0x0 0x28000000 0 0x4000000>;
resets = <&scuclk EN7581_PCIE0_RST>,
<&scuclk EN7581_PCIE1_RST>,
<&scuclk EN7581_PCIE2_RST>;
reset-names = "phy-lane0", "phy-lane1", "phy-lane2";
mediatek,pbus-csr = <&pbus_csr 0x10 0x14>;
interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
bus-range = <0x00 0xff>;
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 7>;
interrupt-map = <0 0 0 1 &pcie_intc2 0>,
<0 0 0 2 &pcie_intc2 1>,
<0 0 0 3 &pcie_intc2 2>,
<0 0 0 4 &pcie_intc2 3>;
status = "disabled";
pcie_intc2: interrupt-controller {
interrupt-controller;
#address-cells = <0>;
#interrupt-cells = <1>;
};
};
npu: npu@1e900000 {
compatible = "airoha,en7581-npu";
reg = <0x0 0x1e900000 0x0 0x313000>;

View File

@ -750,7 +750,7 @@ SVN-Revision: 35130
EXPORT_SYMBOL(xfrm_parse_spi);
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4338,14 +4338,16 @@ static bool tcp_parse_aligned_timestamp(
@@ -4337,14 +4337,16 @@ static bool tcp_parse_aligned_timestamp(
{
const __be32 *ptr = (const __be32 *)(th + 1);

View File

@ -18608,7 +18608,7 @@ Signed-off-by: j-schambacher <joerg@hifiberry.com>
}
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -869,8 +869,14 @@ static int usb_audio_probe(struct usb_in
@@ -875,8 +875,14 @@ static int usb_audio_probe(struct usb_in
if (ignore_ctl_error)
chip->quirk_flags |= QUIRK_FLAG_IGNORE_CTL_ERROR;

View File

@ -37,7 +37,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data)
{
u32 *buf;
@@ -3444,8 +3453,14 @@ static int lan78xx_bind(struct lan78xx_n
@@ -3464,8 +3473,14 @@ static int lan78xx_bind(struct lan78xx_n
if (DEFAULT_RX_CSUM_ENABLE)
dev->net->features |= NETIF_F_RXCSUM;

View File

@ -28,7 +28,7 @@ See: https://github.com/raspberrypi/linux/issues/2447
static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data)
{
u32 *buf;
@@ -4428,7 +4433,13 @@ static int lan78xx_probe(struct usb_inte
@@ -4448,7 +4453,13 @@ static int lan78xx_probe(struct usb_inte
if (ret < 0)
goto out4;

View File

@ -16,4 +16,4 @@ Subject: [PATCH] Patching lan78xx for SOF_TIMESTAMPING_TX_SOFTWARE support
+ .get_ts_info = ethtool_op_get_ts_info,
};
static void lan78xx_init_mac_address(struct lan78xx_net *dev)
static int lan78xx_init_mac_address(struct lan78xx_net *dev)

View File

@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -2897,6 +2897,11 @@ static int lan78xx_reset(struct lan78xx_
@@ -2915,6 +2915,11 @@ static int lan78xx_reset(struct lan78xx_
int ret;
u32 buf;
u8 sig;
@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
ret = lan78xx_read_reg(dev, HW_CFG, &buf);
if (ret < 0)
@@ -2963,6 +2968,10 @@ static int lan78xx_reset(struct lan78xx_
@@ -2983,6 +2988,10 @@ static int lan78xx_reset(struct lan78xx_
buf |= HW_CFG_CLK125_EN_;
buf |= HW_CFG_REFCLK25_EN_;
@ -37,7 +37,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
ret = lan78xx_write_reg(dev, HW_CFG, buf);
if (ret < 0)
return ret;
@@ -3065,6 +3074,9 @@ static int lan78xx_reset(struct lan78xx_
@@ -3085,6 +3094,9 @@ static int lan78xx_reset(struct lan78xx_
buf |= MAC_CR_AUTO_DUPLEX_ | MAC_CR_AUTO_SPEED_;
}
}

View File

@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -2422,7 +2422,26 @@ static int lan78xx_phy_init(struct lan78
@@ -2440,7 +2440,26 @@ static int lan78xx_phy_init(struct lan78
mii_adv_to_linkmode_adv_t(fc, mii_adv);
linkmode_or(phydev->advertising, fc, phydev->advertising);

View File

@ -23,6 +23,10 @@ sercomm,shg2500)
ucidef_set_led_usbport "usb1" "USB1" "blue:modem" "usb1-port1" "usb2-port1"
ucidef_set_led_usbport "usb2" "USB2" "green:modem" "usb1-port2" "usb2-port2"
;;
sagem,fast-3864-op)
ucidef_set_led_netdev "wan_link" "WAN_LINK" "amber:wan" "wan" "link"
ucidef_set_led_netdev "wan_act" "WAN_ACT" "green:wan" "wan" "rx tx"
;;
esac
board_config_flush

View File

@ -11,6 +11,10 @@
led-failsafe = &led_power_red;
led-running = &led_power_green;
led-upgrade = &led_power_green;
led-dsl = &led_dsl_green;
led-internet = &led_internet_green;
led-usb = &led_usb_green;
};
keys {
@ -38,6 +42,56 @@
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
led_internet_green: led@8 {
label = "green:internet";
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
led_usb_green: led@9 {
label = "green:dsl_bonding";
gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
};
led_power_red: led@15 {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_RED>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
led_power_green: led@20 {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
};
led@36 {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
};
led@37 {
label = "green:wlan_pull_up";
default-state = "on";
gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
};
led@38 {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
};
led@39 {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
};
};
};
&ehci {
@ -59,7 +113,7 @@
brcm,serial-mux;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_leds &pinctrl_serial_led>;
pinctrl-0 = <&pinctrl_serial_led>;
led@0 {
reg = <0>;
@ -81,7 +135,7 @@
label = "red:internet";
};
led@3 {
led_dsl_green: led@3 {
reg = <3>;
active-low;
label = "green:dsl";
@ -98,32 +152,6 @@
active-low;
label = "red:fxs";
};
led@8 {
reg = <8>;
active-low;
label = "green:internet";
};
led@9 {
reg = <9>;
active-low;
label = "green:dsl_bonding";
};
led_power_red: led@15 {
reg = <15>;
active-low;
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_RED>;
};
led_power_green: led@20 {
reg = <20>;
active-low;
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
};
};
&mdio_ext {
@ -241,14 +269,6 @@
status = "okay";
};
&pinctrl {
pinctrl_leds: leds {
function = "led";
pins = "gpio8", "gpio9", "gpio15",
"gpio20";
};
};
&switch0 {
dsa,member = <0 0>;

View File

@ -71,6 +71,7 @@ define Device/sagem_fast-3864-op
SUBPAGESIZE := 512
VID_HDR_OFFSET := 2048
DEVICE_PACKAGES += $(USB2_PACKAGES) \
kmod-leds-gpio \
kmod-leds-bcm6328
CFE_WFI_FLASH_TYPE := 3
CFE_WFI_VERSION := 0x5732

View File

@ -1,149 +0,0 @@
From 88f170814fea74911ceab798a43cbd7c5599bed4 Mon Sep 17 00:00:00 2001
From: Marios Makassikis <mmakassikis@freebox.fr>
Date: Wed, 15 Oct 2025 09:25:46 +0200
Subject: [PATCH] ksmbd: fix recursive locking in RPC handle list access
Since commit 305853cce3794 ("ksmbd: Fix race condition in RPC handle list
access"), ksmbd_session_rpc_method() attempts to lock sess->rpc_lock.
This causes hung connections / tasks when a client attempts to open
a named pipe. Using Samba's rpcclient tool:
$ rpcclient //192.168.1.254 -U user%password
$ rpcclient $> srvinfo
<connection hung here>
Kernel side:
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/0:0 state:D stack:0 pid:5021 tgid:5021 ppid:2 flags:0x00200000
Workqueue: ksmbd-io handle_ksmbd_work
Call trace:
__schedule from schedule+0x3c/0x58
schedule from schedule_preempt_disabled+0xc/0x10
schedule_preempt_disabled from rwsem_down_read_slowpath+0x1b0/0x1d8
rwsem_down_read_slowpath from down_read+0x28/0x30
down_read from ksmbd_session_rpc_method+0x18/0x3c
ksmbd_session_rpc_method from ksmbd_rpc_open+0x34/0x68
ksmbd_rpc_open from ksmbd_session_rpc_open+0x194/0x228
ksmbd_session_rpc_open from create_smb2_pipe+0x8c/0x2c8
create_smb2_pipe from smb2_open+0x10c/0x27ac
smb2_open from handle_ksmbd_work+0x238/0x3dc
handle_ksmbd_work from process_scheduled_works+0x160/0x25c
process_scheduled_works from worker_thread+0x16c/0x1e8
worker_thread from kthread+0xa8/0xb8
kthread from ret_from_fork+0x14/0x38
Exception stack(0x8529ffb0 to 0x8529fff8)
The task deadlocks because the lock is already held:
ksmbd_session_rpc_open
down_write(&sess->rpc_lock)
ksmbd_rpc_open
ksmbd_session_rpc_method
down_read(&sess->rpc_lock) <-- deadlock
Adjust ksmbd_session_rpc_method() callers to take the lock when necessary.
Fixes: 305853cce3794 ("ksmbd: Fix race condition in RPC handle list access")
Signed-off-by: Marios Makassikis <mmakassikis@freebox.fr>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
---
fs/smb/server/mgmt/user_session.c | 7 ++-----
fs/smb/server/smb2pdu.c | 9 ++++++++-
fs/smb/server/transport_ipc.c | 12 ++++++++++++
3 files changed, 22 insertions(+), 6 deletions(-)
--- a/fs/smb/server/mgmt/user_session.c
+++ b/fs/smb/server/mgmt/user_session.c
@@ -147,14 +147,11 @@ void ksmbd_session_rpc_close(struct ksmb
int ksmbd_session_rpc_method(struct ksmbd_session *sess, int id)
{
struct ksmbd_session_rpc *entry;
- int method;
- down_read(&sess->rpc_lock);
+ lockdep_assert_held(&sess->rpc_lock);
entry = xa_load(&sess->rpc_handle_list, id);
- method = entry ? entry->method : 0;
- up_read(&sess->rpc_lock);
- return method;
+ return entry ? entry->method : 0;
}
void ksmbd_session_destroy(struct ksmbd_session *sess)
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -4623,8 +4623,15 @@ static int smb2_get_info_file_pipe(struc
* pipe without opening it, checking error condition here
*/
id = req->VolatileFileId;
- if (!ksmbd_session_rpc_method(sess, id))
+
+ lockdep_assert_not_held(&sess->rpc_lock);
+
+ down_read(&sess->rpc_lock);
+ if (!ksmbd_session_rpc_method(sess, id)) {
+ up_read(&sess->rpc_lock);
return -ENOENT;
+ }
+ up_read(&sess->rpc_lock);
ksmbd_debug(SMB, "FileInfoClass %u, FileId 0x%llx\n",
req->FileInfoClass, req->VolatileFileId);
--- a/fs/smb/server/transport_ipc.c
+++ b/fs/smb/server/transport_ipc.c
@@ -825,6 +825,9 @@ struct ksmbd_rpc_command *ksmbd_rpc_writ
if (!msg)
return NULL;
+ lockdep_assert_not_held(&sess->rpc_lock);
+
+ down_read(&sess->rpc_lock);
msg->type = KSMBD_EVENT_RPC_REQUEST;
req = (struct ksmbd_rpc_command *)msg->payload;
req->handle = handle;
@@ -833,6 +836,7 @@ struct ksmbd_rpc_command *ksmbd_rpc_writ
req->flags |= KSMBD_RPC_WRITE_METHOD;
req->payload_sz = payload_sz;
memcpy(req->payload, payload, payload_sz);
+ up_read(&sess->rpc_lock);
resp = ipc_msg_send_request(msg, req->handle);
ipc_msg_free(msg);
@@ -849,6 +853,9 @@ struct ksmbd_rpc_command *ksmbd_rpc_read
if (!msg)
return NULL;
+ lockdep_assert_not_held(&sess->rpc_lock);
+
+ down_read(&sess->rpc_lock);
msg->type = KSMBD_EVENT_RPC_REQUEST;
req = (struct ksmbd_rpc_command *)msg->payload;
req->handle = handle;
@@ -856,6 +863,7 @@ struct ksmbd_rpc_command *ksmbd_rpc_read
req->flags |= rpc_context_flags(sess);
req->flags |= KSMBD_RPC_READ_METHOD;
req->payload_sz = 0;
+ up_read(&sess->rpc_lock);
resp = ipc_msg_send_request(msg, req->handle);
ipc_msg_free(msg);
@@ -876,6 +884,9 @@ struct ksmbd_rpc_command *ksmbd_rpc_ioct
if (!msg)
return NULL;
+ lockdep_assert_not_held(&sess->rpc_lock);
+
+ down_read(&sess->rpc_lock);
msg->type = KSMBD_EVENT_RPC_REQUEST;
req = (struct ksmbd_rpc_command *)msg->payload;
req->handle = handle;
@@ -884,6 +895,7 @@ struct ksmbd_rpc_command *ksmbd_rpc_ioct
req->flags |= KSMBD_RPC_IOCTL_METHOD;
req->payload_sz = payload_sz;
memcpy(req->payload, payload, payload_sz);
+ up_read(&sess->rpc_lock);
resp = ipc_msg_send_request(msg, req->handle);
ipc_msg_free(msg);

View File

@ -20,7 +20,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5526,11 +5526,6 @@ static int rtl_init_one(struct pci_dev *
@@ -5527,11 +5527,6 @@ static int rtl_init_one(struct pci_dev *
dev->features |= dev->hw_features;
@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (rtl_chip_supports_csum_v2(tp)) {
dev->hw_features |= NETIF_F_SG | NETIF_F_TSO | NETIF_F_TSO6;
netif_set_tso_max_size(dev, RTL_GSO_MAX_SIZE_V2);
@@ -5541,6 +5536,17 @@ static int rtl_init_one(struct pci_dev *
@@ -5542,6 +5537,17 @@ static int rtl_init_one(struct pci_dev *
netif_set_tso_max_segs(dev, RTL_GSO_MAX_SEGS_V1);
}

View File

@ -75,7 +75,7 @@ Signed-off-by: Andrew Lunn <andrew@lunn.ch>
free_irq(tp->irq, tp);
phy_disconnect(tp->phydev);
@@ -5201,7 +5194,7 @@ static void rtl_remove_one(struct pci_de
@@ -5202,7 +5195,7 @@ static void rtl_remove_one(struct pci_de
if (pci_dev_run_wake(pdev))
pm_runtime_get_noresume(&pdev->dev);
@ -84,7 +84,7 @@ Signed-off-by: Andrew Lunn <andrew@lunn.ch>
if (IS_ENABLED(CONFIG_R8169_LEDS))
r8169_remove_leds(tp->leds);
@@ -5579,6 +5572,7 @@ static int rtl_init_one(struct pci_dev *
@@ -5580,6 +5573,7 @@ static int rtl_init_one(struct pci_dev *
tp->irq = pci_irq_vector(pdev, 0);
INIT_WORK(&tp->wk.work, rtl_task);

View File

@ -102,7 +102,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_02 ... RTL_GIGA_MAC_VER_06:
@@ -5479,8 +5456,6 @@ static int rtl_init_one(struct pci_dev *
@@ -5480,8 +5457,6 @@ static int rtl_init_one(struct pci_dev *
tp->supports_gmii = ent->driver_data == RTL_CFG_NO_GBIT ? 0 : 1;
tp->ocp_base = OCP_STD_PHY_BASE;

View File

@ -22,7 +22,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5255,6 +5255,11 @@ static int r8169_mdio_register(struct rt
@@ -5256,6 +5256,11 @@ static int r8169_mdio_register(struct rt
phy_support_eee(tp->phydev);
phy_support_asym_pause(tp->phydev);

View File

@ -68,7 +68,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rtl_irq_disable(tp);
napi_schedule(&tp->napi);
out:
@@ -5126,9 +5118,6 @@ static void rtl_set_irq_mask(struct rtl8
@@ -5127,9 +5119,6 @@ static void rtl_set_irq_mask(struct rtl8
if (tp->mac_version <= RTL_GIGA_MAC_VER_06)
tp->irq_mask |= SYSErr | RxFIFOOver;
@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
static int rtl_alloc_irq(struct rtl8169_private *tp)
@@ -5323,7 +5312,6 @@ static int rtl_jumbo_max(struct rtl8169_
@@ -5324,7 +5313,6 @@ static int rtl_jumbo_max(struct rtl8169_
case RTL_GIGA_MAC_VER_02 ... RTL_GIGA_MAC_VER_06:
return JUMBO_7K;
/* RTL8168b */

View File

@ -233,7 +233,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
padto = max_t(unsigned int, padto, ETH_ZLEN);
break;
default:
@@ -5293,7 +5293,7 @@ static void rtl_hw_initialize(struct rtl
@@ -5294,7 +5294,7 @@ static void rtl_hw_initialize(struct rtl
case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_48:
rtl_hw_init_8168g(tp);
break;

View File

@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5227,6 +5227,33 @@ static int r8169_mdio_write_reg(struct m
@@ -5228,6 +5228,33 @@ static int r8169_mdio_write_reg(struct m
return 0;
}
@ -53,7 +53,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static int r8169_mdio_register(struct rtl8169_private *tp)
{
struct pci_dev *pdev = tp->pci_dev;
@@ -5257,6 +5284,11 @@ static int r8169_mdio_register(struct rt
@@ -5258,6 +5285,11 @@ static int r8169_mdio_register(struct rt
new_bus->read = r8169_mdio_read_reg;
new_bus->write = r8169_mdio_write_reg;

View File

@ -28,7 +28,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static const struct {
const char *name;
@@ -5386,6 +5387,9 @@ static int rtl_jumbo_max(struct rtl8169_
@@ -5387,6 +5388,9 @@ static int rtl_jumbo_max(struct rtl8169_
/* RTL8168c */
case RTL_GIGA_MAC_VER_18 ... RTL_GIGA_MAC_VER_24:
return JUMBO_6K;

View File

@ -17,7 +17,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5473,11 +5473,10 @@ static int rtl_init_one(struct pci_dev *
@@ -5474,11 +5474,10 @@ static int rtl_init_one(struct pci_dev *
if (region < 0)
return dev_err_probe(&pdev->dev, -ENODEV, "no MMIO resource found\n");

View File

@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5424,7 +5424,7 @@ done:
@@ -5425,7 +5425,7 @@ done:
/* register is set if system vendor successfully tested ASPM 1.2 */
static bool rtl_aspm_is_safe(struct rtl8169_private *tp)
{

View File

@ -353,7 +353,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
static void rtl_release_firmware(struct rtl8169_private *tp)
@@ -5439,9 +5371,9 @@ static bool rtl_aspm_is_safe(struct rtl8
@@ -5440,9 +5372,9 @@ static bool rtl_aspm_is_safe(struct rtl8
static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
@ -364,7 +364,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct net_device *dev;
u32 txconfig;
u16 xid;
@@ -5491,12 +5423,13 @@ static int rtl_init_one(struct pci_dev *
@@ -5492,12 +5424,13 @@ static int rtl_init_one(struct pci_dev *
xid = (txconfig >> 20) & 0xfcf;
/* Identify chip attached to board */
@ -381,7 +381,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Disable ASPM L1 as that cause random device stop working
* problems as well as full system hangs for some PCIe devices users.
@@ -5601,8 +5534,6 @@ static int rtl_init_one(struct pci_dev *
@@ -5602,8 +5535,6 @@ static int rtl_init_one(struct pci_dev *
rtl_set_irq_mask(tp);
@ -390,7 +390,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tp->counters = dmam_alloc_coherent (&pdev->dev, sizeof(*tp->counters),
&tp->counters_phys_addr,
GFP_KERNEL);
@@ -5627,7 +5558,7 @@ static int rtl_init_one(struct pci_dev *
@@ -5628,7 +5559,7 @@ static int rtl_init_one(struct pci_dev *
}
netdev_info(dev, "%s, %pM, XID %03x, IRQ %d\n",

View File

@ -139,7 +139,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
padto = max_t(unsigned int, padto, ETH_ZLEN);
break;
default:
@@ -5301,7 +5301,7 @@ static void rtl_hw_initialize(struct rtl
@@ -5302,7 +5302,7 @@ static void rtl_hw_initialize(struct rtl
case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_48:
rtl_hw_init_8168g(tp);
break;
@ -148,7 +148,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rtl_hw_init_8125(tp);
break;
default:
@@ -5326,7 +5326,7 @@ static int rtl_jumbo_max(struct rtl8169_
@@ -5327,7 +5327,7 @@ static int rtl_jumbo_max(struct rtl8169_
case RTL_GIGA_MAC_VER_18 ... RTL_GIGA_MAC_VER_24:
return JUMBO_6K;
/* RTL8125/8126 */

View File

@ -22,7 +22,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5039,10 +5039,8 @@ static void rtl_shutdown(struct pci_dev
@@ -5040,10 +5040,8 @@ static void rtl_shutdown(struct pci_dev
/* Restore original MAC address */
rtl_rar_set(tp, tp->dev->perm_addr);

View File

@ -92,7 +92,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[RTL_GIGA_MAC_VER_61] = rtl_hw_start_8125a_2,
[RTL_GIGA_MAC_VER_63] = rtl_hw_start_8125b,
[RTL_GIGA_MAC_VER_64] = rtl_hw_start_8125d,
@@ -5284,7 +5281,7 @@ static void rtl_hw_init_8125(struct rtl8
@@ -5285,7 +5282,7 @@ static void rtl_hw_init_8125(struct rtl8
static void rtl_hw_initialize(struct rtl8169_private *tp)
{
switch (tp->mac_version) {

View File

@ -1,35 +0,0 @@
From 0fc403192dcc8def1f6284959141608ac4c86699 Mon Sep 17 00:00:00 2001
From: Namjae Jeon <linkinjeon@kernel.org>
Date: Fri, 10 Jan 2025 13:37:05 +0900
Subject: ksmbd: browse interfaces list on FSCTL_QUERY_INTERFACE_INFO IOCTL
[ Upstream commit b2d99376c5d61eb60ffdb6c503e4b6c8f9712ddd ]
ksmbd.mount will give each interfaces list and bind_interfaces_only flags
to ksmbd server. Previously, the interfaces list was sent only
when bind_interfaces_only was enabled.
ksmbd server browse only interfaces list given from ksmbd.conf on
FSCTL_QUERY_INTERFACE_INFO IOCTL.
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Stable-dep-of: 21a4e47578d4 ("ksmbd: fix use-after-free in __smb2_lease_break_noti()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/smb/server/ksmbd_netlink.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'fs/smb/server/ksmbd_netlink.h')
--- a/fs/smb/server/ksmbd_netlink.h
+++ b/fs/smb/server/ksmbd_netlink.h
@@ -108,7 +108,8 @@ struct ksmbd_startup_request {
__u32 smb2_max_credits; /* MAX credits */
__u32 smbd_max_io_size; /* smbd read write size */
__u32 max_connections; /* Number of maximum simultaneous connections */
- __u32 reserved[126]; /* Reserved room */
+ __s8 bind_interfaces_only;
+ __s8 reserved[503]; /* Reserved room */
__u32 ifc_list_sz; /* interfaces list size */
__s8 ____payload[];
};

View File

@ -1,119 +0,0 @@
From d8b6dc9256762293048bf122fc11c4e612d0ef5d Mon Sep 17 00:00:00 2001
From: Namjae Jeon <linkinjeon@kernel.org>
Date: Wed, 1 Oct 2025 09:25:35 +0900
Subject: ksmbd: add max ip connections parameter
This parameter set the maximum number of connections per ip address.
The default is 8.
Cc: stable@vger.kernel.org
Fixes: c0d41112f1a5 ("ksmbd: extend the connection limiting mechanism to support IPv6")
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
---
fs/smb/server/ksmbd_netlink.h | 5 +++--
fs/smb/server/server.h | 1 +
fs/smb/server/transport_ipc.c | 3 +++
fs/smb/server/transport_tcp.c | 27 ++++++++++++++++-----------
4 files changed, 23 insertions(+), 13 deletions(-)
(limited to 'fs/smb')
--- a/fs/smb/server/ksmbd_netlink.h
+++ b/fs/smb/server/ksmbd_netlink.h
@@ -109,10 +109,11 @@ struct ksmbd_startup_request {
__u32 smbd_max_io_size; /* smbd read write size */
__u32 max_connections; /* Number of maximum simultaneous connections */
__s8 bind_interfaces_only;
- __s8 reserved[503]; /* Reserved room */
+ __u32 max_ip_connections; /* Number of maximum connection per ip address */
+ __s8 reserved[499]; /* Reserved room */
__u32 ifc_list_sz; /* interfaces list size */
__s8 ____payload[];
-};
+} __packed;
#define KSMBD_STARTUP_CONFIG_INTERFACES(s) ((s)->____payload)
--- a/fs/smb/server/server.h
+++ b/fs/smb/server/server.h
@@ -43,6 +43,7 @@ struct ksmbd_server_config {
unsigned int auth_mechs;
unsigned int max_connections;
unsigned int max_inflight_req;
+ unsigned int max_ip_connections;
char *conf[SERVER_CONF_WORK_GROUP + 1];
};
--- a/fs/smb/server/transport_ipc.c
+++ b/fs/smb/server/transport_ipc.c
@@ -321,6 +321,9 @@ static int ipc_server_config_on_startup(
if (req->max_connections)
server_conf.max_connections = req->max_connections;
+ if (req->max_ip_connections)
+ server_conf.max_ip_connections = req->max_ip_connections;
+
ret = ksmbd_set_netbios_name(req->netbios_name);
ret |= ksmbd_set_server_string(req->server_string);
ret |= ksmbd_set_work_group(req->work_group);
--- a/fs/smb/server/transport_tcp.c
+++ b/fs/smb/server/transport_tcp.c
@@ -240,6 +240,7 @@ static int ksmbd_kthread_fn(void *p)
struct interface *iface = (struct interface *)p;
struct ksmbd_conn *conn;
int ret;
+ unsigned int max_ip_conns;
while (!kthread_should_stop()) {
mutex_lock(&iface->sock_release_lock);
@@ -257,34 +258,38 @@ static int ksmbd_kthread_fn(void *p)
continue;
}
+ if (!server_conf.max_ip_connections)
+ goto skip_max_ip_conns_limit;
+
/*
* Limits repeated connections from clients with the same IP.
*/
+ max_ip_conns = 0;
down_read(&conn_list_lock);
- list_for_each_entry(conn, &conn_list, conns_list)
+ list_for_each_entry(conn, &conn_list, conns_list) {
#if IS_ENABLED(CONFIG_IPV6)
if (client_sk->sk->sk_family == AF_INET6) {
if (memcmp(&client_sk->sk->sk_v6_daddr,
- &conn->inet6_addr, 16) == 0) {
- ret = -EAGAIN;
- break;
- }
+ &conn->inet6_addr, 16) == 0)
+ max_ip_conns++;
} else if (inet_sk(client_sk->sk)->inet_daddr ==
- conn->inet_addr) {
- ret = -EAGAIN;
- break;
- }
+ conn->inet_addr)
+ max_ip_conns++;
#else
if (inet_sk(client_sk->sk)->inet_daddr ==
- conn->inet_addr) {
+ conn->inet_addr)
+ max_ip_conns++;
+#endif
+ if (server_conf.max_ip_connections <= max_ip_conns) {
ret = -EAGAIN;
break;
}
-#endif
+ }
up_read(&conn_list_lock);
if (ret == -EAGAIN)
continue;
+skip_max_ip_conns_limit:
if (server_conf.max_connections &&
atomic_inc_return(&active_num_conn) >= server_conf.max_connections) {
pr_info_ratelimited("Limit the maximum number of connections(%u)\n",

View File

@ -296,7 +296,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void r8168fp_adjust_ocp_cmd(struct rtl8169_private *tp, u32 *cmd, int type)
{
/* based on RTL8168FP_OOBMAC_BASE in vendor driver */
@@ -5204,6 +5262,7 @@ static int rtl_init_one(struct pci_dev *
@@ -5205,6 +5263,7 @@ static int rtl_init_one(struct pci_dev *
raw_spin_lock_init(&tp->cfg9346_usage_lock);
raw_spin_lock_init(&tp->config25_lock);
raw_spin_lock_init(&tp->mac_ocp_lock);
@ -304,7 +304,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
dev->tstats = devm_netdev_alloc_pcpu_stats(&pdev->dev,
struct pcpu_sw_netstats);
@@ -5360,6 +5419,12 @@ static int rtl_init_one(struct pci_dev *
@@ -5361,6 +5420,12 @@ static int rtl_init_one(struct pci_dev *
if (rc)
return rc;

View File

@ -59,7 +59,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
obj-$(CONFIG_R8169) += r8169.o
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5419,11 +5419,10 @@ static int rtl_init_one(struct pci_dev *
@@ -5420,11 +5420,10 @@ static int rtl_init_one(struct pci_dev *
if (rc)
return rc;

View File

@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
genphy_soft_reset(tp->phydev);
}
@@ -5121,7 +5096,9 @@ static int r8169_mdio_register(struct rt
@@ -5122,7 +5097,9 @@ static int r8169_mdio_register(struct rt
}
tp->phydev->mac_managed_pm = true;
@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
phy_support_asym_pause(tp->phydev);
/* PHY will be woken up in rtl_open() */
@@ -5256,7 +5233,6 @@ static int rtl_init_one(struct pci_dev *
@@ -5257,7 +5234,6 @@ static int rtl_init_one(struct pci_dev *
tp->dev = dev;
tp->pci_dev = pdev;
tp->supports_gmii = ent->driver_data == RTL_CFG_NO_GBIT ? 0 : 1;

View File

@ -321,7 +321,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
padto = max_t(unsigned int, padto, ETH_ZLEN);
break;
default:
@@ -5148,7 +5205,7 @@ static void rtl_hw_initialize(struct rtl
@@ -5149,7 +5206,7 @@ static void rtl_hw_initialize(struct rtl
case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_48:
rtl_hw_init_8168g(tp);
break;

View File

@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5297,11 +5297,6 @@ static int rtl_init_one(struct pci_dev *
@@ -5298,11 +5298,6 @@ static int rtl_init_one(struct pci_dev *
raw_spin_lock_init(&tp->mac_ocp_lock);
mutex_init(&tp->led_lock);
@ -28,7 +28,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
/* Get the *optional* external "ether_clk" used on some boards */
tp->clk = devm_clk_get_optional_enabled(&pdev->dev, "ether_clk");
if (IS_ERR(tp->clk))
@@ -5416,6 +5411,8 @@ static int rtl_init_one(struct pci_dev *
@@ -5417,6 +5412,8 @@ static int rtl_init_one(struct pci_dev *
dev->hw_features |= NETIF_F_RXALL;
dev->hw_features |= NETIF_F_RXFCS;

View File

@ -225,7 +225,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
void r8169_get_led_name(struct rtl8169_private *tp, int idx,
char *buf, int buf_len)
{
@@ -5449,10 +5500,12 @@ static int rtl_init_one(struct pci_dev *
@@ -5450,10 +5501,12 @@ static int rtl_init_one(struct pci_dev *
if (rc)
return rc;

View File

@ -124,7 +124,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
u32 ocp_base;
};
@@ -5075,6 +5077,8 @@ static void rtl_remove_one(struct pci_de
@@ -5076,6 +5078,8 @@ static void rtl_remove_one(struct pci_de
cancel_work_sync(&tp->wk.work);
@ -133,7 +133,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
unregister_netdev(tp->dev);
if (tp->dash_type != RTL_DASH_NONE)
@@ -5534,9 +5538,9 @@ static int rtl_init_one(struct pci_dev *
@@ -5535,9 +5539,9 @@ static int rtl_init_one(struct pci_dev *
if (IS_ENABLED(CONFIG_R8169_LEDS)) {
if (rtl_is_8125(tp))

View File

@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5077,7 +5077,8 @@ static void rtl_remove_one(struct pci_de
@@ -5078,7 +5078,8 @@ static void rtl_remove_one(struct pci_de
cancel_work_sync(&tp->wk.work);

View File

@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5118,12 +5118,10 @@ static void rtl_set_irq_mask(struct rtl8
@@ -5119,12 +5119,10 @@ static void rtl_set_irq_mask(struct rtl8
tp->irq_mask = RxOK | RxErr | TxOK | TxErr | LinkChg;
if (tp->mac_version <= RTL_GIGA_MAC_VER_06)

View File

@ -224,7 +224,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
padto = max_t(unsigned int, padto, ETH_ZLEN);
break;
default:
@@ -5295,7 +5307,7 @@ static void rtl_hw_initialize(struct rtl
@@ -5296,7 +5308,7 @@ static void rtl_hw_initialize(struct rtl
case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_48:
rtl_hw_init_8168g(tp);
break;

View File

@ -20,7 +20,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5492,11 +5492,6 @@ static int rtl_init_one(struct pci_dev *
@@ -5493,11 +5493,6 @@ static int rtl_init_one(struct pci_dev *
dev->features |= dev->hw_features;
@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (rtl_chip_supports_csum_v2(tp)) {
dev->hw_features |= NETIF_F_SG | NETIF_F_TSO | NETIF_F_TSO6;
netif_set_tso_max_size(dev, RTL_GSO_MAX_SIZE_V2);
@@ -5507,6 +5502,17 @@ static int rtl_init_one(struct pci_dev *
@@ -5508,6 +5503,17 @@ static int rtl_init_one(struct pci_dev *
netif_set_tso_max_segs(dev, RTL_GSO_MAX_SEGS_V1);
}

View File

@ -102,7 +102,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_02 ... RTL_GIGA_MAC_VER_06:
@@ -5461,8 +5438,6 @@ static int rtl_init_one(struct pci_dev *
@@ -5462,8 +5439,6 @@ static int rtl_init_one(struct pci_dev *
tp->supports_gmii = ent->driver_data == RTL_CFG_NO_GBIT ? 0 : 1;
tp->ocp_base = OCP_STD_PHY_BASE;

View File

@ -22,7 +22,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5237,6 +5237,11 @@ static int r8169_mdio_register(struct rt
@@ -5238,6 +5238,11 @@ static int r8169_mdio_register(struct rt
tp->phydev->supported_eee);
phy_support_asym_pause(tp->phydev);

View File

@ -68,7 +68,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rtl_irq_disable(tp);
napi_schedule(&tp->napi);
out:
@@ -5107,9 +5099,6 @@ static void rtl_set_irq_mask(struct rtl8
@@ -5108,9 +5100,6 @@ static void rtl_set_irq_mask(struct rtl8
if (tp->mac_version <= RTL_GIGA_MAC_VER_06)
tp->irq_mask |= SYSErr | RxFIFOOver;
@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
static int rtl_alloc_irq(struct rtl8169_private *tp)
@@ -5305,7 +5294,6 @@ static int rtl_jumbo_max(struct rtl8169_
@@ -5306,7 +5295,6 @@ static int rtl_jumbo_max(struct rtl8169_
case RTL_GIGA_MAC_VER_02 ... RTL_GIGA_MAC_VER_06:
return JUMBO_7K;
/* RTL8168b */

View File

@ -233,7 +233,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
padto = max_t(unsigned int, padto, ETH_ZLEN);
break;
default:
@@ -5275,7 +5275,7 @@ static void rtl_hw_initialize(struct rtl
@@ -5276,7 +5276,7 @@ static void rtl_hw_initialize(struct rtl
case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_48:
rtl_hw_init_8168g(tp);
break;

View File

@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5208,6 +5208,33 @@ static int r8169_mdio_write_reg(struct m
@@ -5209,6 +5209,33 @@ static int r8169_mdio_write_reg(struct m
return 0;
}
@ -53,7 +53,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static int r8169_mdio_register(struct rtl8169_private *tp)
{
struct pci_dev *pdev = tp->pci_dev;
@@ -5238,6 +5265,11 @@ static int r8169_mdio_register(struct rt
@@ -5239,6 +5266,11 @@ static int r8169_mdio_register(struct rt
new_bus->read = r8169_mdio_read_reg;
new_bus->write = r8169_mdio_write_reg;

View File

@ -28,7 +28,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static const struct {
const char *name;
@@ -5368,6 +5369,9 @@ static int rtl_jumbo_max(struct rtl8169_
@@ -5369,6 +5370,9 @@ static int rtl_jumbo_max(struct rtl8169_
/* RTL8168c */
case RTL_GIGA_MAC_VER_18 ... RTL_GIGA_MAC_VER_24:
return JUMBO_6K;

View File

@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5406,7 +5406,7 @@ done:
@@ -5407,7 +5407,7 @@ done:
/* register is set if system vendor successfully tested ASPM 1.2 */
static bool rtl_aspm_is_safe(struct rtl8169_private *tp)
{

View File

@ -353,7 +353,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
static void rtl_release_firmware(struct rtl8169_private *tp)
@@ -5448,9 +5380,9 @@ static bool rtl_aspm_is_safe(struct rtl8
@@ -5449,9 +5381,9 @@ static bool rtl_aspm_is_safe(struct rtl8
static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
@ -364,7 +364,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct net_device *dev;
u32 txconfig;
u16 xid;
@@ -5501,12 +5433,13 @@ static int rtl_init_one(struct pci_dev *
@@ -5502,12 +5434,13 @@ static int rtl_init_one(struct pci_dev *
xid = (txconfig >> 20) & 0xfcf;
/* Identify chip attached to board */
@ -381,7 +381,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Disable ASPM L1 as that cause random device stop working
* problems as well as full system hangs for some PCIe devices users.
@@ -5610,8 +5543,6 @@ static int rtl_init_one(struct pci_dev *
@@ -5611,8 +5544,6 @@ static int rtl_init_one(struct pci_dev *
rtl_set_irq_mask(tp);
@ -390,7 +390,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tp->counters = dmam_alloc_coherent (&pdev->dev, sizeof(*tp->counters),
&tp->counters_phys_addr,
GFP_KERNEL);
@@ -5636,7 +5567,7 @@ static int rtl_init_one(struct pci_dev *
@@ -5637,7 +5568,7 @@ static int rtl_init_one(struct pci_dev *
}
netdev_info(dev, "%s, %pM, XID %03x, IRQ %d\n",

View File

@ -139,7 +139,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
padto = max_t(unsigned int, padto, ETH_ZLEN);
break;
default:
@@ -5310,7 +5310,7 @@ static void rtl_hw_initialize(struct rtl
@@ -5311,7 +5311,7 @@ static void rtl_hw_initialize(struct rtl
case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_48:
rtl_hw_init_8168g(tp);
break;
@ -148,7 +148,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rtl_hw_init_8125(tp);
break;
default:
@@ -5335,7 +5335,7 @@ static int rtl_jumbo_max(struct rtl8169_
@@ -5336,7 +5336,7 @@ static int rtl_jumbo_max(struct rtl8169_
case RTL_GIGA_MAC_VER_18 ... RTL_GIGA_MAC_VER_24:
return JUMBO_6K;
/* RTL8125/8126 */

View File

@ -22,7 +22,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5047,10 +5047,8 @@ static void rtl_shutdown(struct pci_dev
@@ -5048,10 +5048,8 @@ static void rtl_shutdown(struct pci_dev
/* Restore original MAC address */
rtl_rar_set(tp, tp->dev->perm_addr);

View File

@ -92,7 +92,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[RTL_GIGA_MAC_VER_61] = rtl_hw_start_8125a_2,
[RTL_GIGA_MAC_VER_63] = rtl_hw_start_8125b,
[RTL_GIGA_MAC_VER_64] = rtl_hw_start_8125d,
@@ -5293,7 +5290,7 @@ static void rtl_hw_init_8125(struct rtl8
@@ -5294,7 +5291,7 @@ static void rtl_hw_init_8125(struct rtl8
static void rtl_hw_initialize(struct rtl8169_private *tp)
{
switch (tp->mac_version) {

View File

@ -23,7 +23,7 @@ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
--- a/drivers/bus/mhi/host/init.c
+++ b/drivers/bus/mhi/host/init.c
@@ -882,6 +882,7 @@ static int parse_config(struct mhi_contr
@@ -881,6 +881,7 @@ static int parse_config(struct mhi_contr
if (!mhi_cntrl->timeout_ms)
mhi_cntrl->timeout_ms = MHI_TIMEOUT_MS;

View File

@ -331,7 +331,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -4273,6 +4273,8 @@ static __net_initdata struct pernet_oper
@@ -4277,6 +4277,8 @@ static __net_initdata struct pernet_oper
static int __init proto_init(void)
{

View File

@ -10,7 +10,7 @@ Subject: [PATCH] Kconfig: add tristate for OID and ASNI string
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -2002,7 +2002,7 @@ config PADATA
@@ -2003,7 +2003,7 @@ config PADATA
bool
config ASN1

View File

@ -1,2 +1,2 @@
LINUX_VERSION-6.12 = .54
LINUX_KERNEL_HASH-6.12.54 = 1b0dcd3390efeec44e528748609bafcf36eae895bb68c8f62ac5e5940943de62
LINUX_VERSION-6.12 = .55
LINUX_KERNEL_HASH-6.12.55 = 328f8f4608a653063a5fd82d29b17163faab2825fa419fa85b961740a342fb9f

View File

@ -1,2 +1,2 @@
LINUX_VERSION-6.6 = .110
LINUX_KERNEL_HASH-6.6.110 = 1bf20daf5543b8759f325e55fb0da4913715e68741627a13380e66aaf219fb1d
LINUX_VERSION-6.6 = .114
LINUX_KERNEL_HASH-6.6.114 = ca4175a03ce2943ae192d77ad91e37ee292f1f1bb7b2954b062b0ef7eb0cb97c

View File

@ -311,7 +311,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
/**
* ip6_tnl_addr_conflict - compare packet addresses to tunnel's own
* @t: the outgoing tunnel device
@@ -1294,6 +1442,7 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
@@ -1293,6 +1441,7 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
u8 protocol)
{
struct ip6_tnl *t = netdev_priv(dev);
@ -319,7 +319,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
struct ipv6hdr *ipv6h;
const struct iphdr *iph;
int encap_limit = -1;
@@ -1393,6 +1542,18 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
@@ -1392,6 +1541,18 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
fl6.flowi6_uid = sock_net_uid(dev_net(dev), NULL);
dsfield = INET_ECN_encapsulate(dsfield, orig_dsfield);
@ -338,7 +338,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6))
return -1;
@@ -1546,6 +1707,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
@@ -1545,6 +1706,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
t->parms.link = p->link;
t->parms.proto = p->proto;
t->parms.fwmark = p->fwmark;
@ -353,7 +353,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
dst_cache_reset(&t->dst_cache);
ip6_tnl_link_config(t);
}
@@ -1580,6 +1749,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
@@ -1579,6 +1748,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
p->flowinfo = u->flowinfo;
p->link = u->link;
p->proto = u->proto;
@ -361,7 +361,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
memcpy(p->name, u->name, sizeof(u->name));
}
@@ -1963,6 +2133,15 @@ static int ip6_tnl_validate(struct nlatt
@@ -1962,6 +2132,15 @@ static int ip6_tnl_validate(struct nlatt
return 0;
}
@ -377,7 +377,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
static void ip6_tnl_netlink_parms(struct nlattr *data[],
struct __ip6_tnl_parm *parms)
{
@@ -2000,6 +2179,46 @@ static void ip6_tnl_netlink_parms(struct
@@ -1999,6 +2178,46 @@ static void ip6_tnl_netlink_parms(struct
if (data[IFLA_IPTUN_FWMARK])
parms->fwmark = nla_get_u32(data[IFLA_IPTUN_FWMARK]);
@ -424,7 +424,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
}
static int ip6_tnl_newlink(struct net *src_net, struct net_device *dev,
@@ -2084,6 +2303,12 @@ static void ip6_tnl_dellink(struct net_d
@@ -2083,6 +2302,12 @@ static void ip6_tnl_dellink(struct net_d
static size_t ip6_tnl_get_size(const struct net_device *dev)
{
@ -437,7 +437,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
return
/* IFLA_IPTUN_LINK */
nla_total_size(4) +
@@ -2113,6 +2338,24 @@ static size_t ip6_tnl_get_size(const str
@@ -2112,6 +2337,24 @@ static size_t ip6_tnl_get_size(const str
nla_total_size(0) +
/* IFLA_IPTUN_FWMARK */
nla_total_size(4) +
@ -462,7 +462,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
0;
}
@@ -2120,6 +2363,9 @@ static int ip6_tnl_fill_info(struct sk_b
@@ -2119,6 +2362,9 @@ static int ip6_tnl_fill_info(struct sk_b
{
struct ip6_tnl *tunnel = netdev_priv(dev);
struct __ip6_tnl_parm *parm = &tunnel->parms;
@ -472,7 +472,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) ||
@@ -2129,9 +2375,27 @@ static int ip6_tnl_fill_info(struct sk_b
@@ -2128,9 +2374,27 @@ static int ip6_tnl_fill_info(struct sk_b
nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) ||
nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) ||
nla_put_u8(skb, IFLA_IPTUN_PROTO, parm->proto) ||
@ -501,7 +501,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) ||
nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) ||
nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) ||
@@ -2171,6 +2435,7 @@ static const struct nla_policy ip6_tnl_p
@@ -2170,6 +2434,7 @@ static const struct nla_policy ip6_tnl_p
[IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 },
[IFLA_IPTUN_COLLECT_METADATA] = { .type = NLA_FLAG },
[IFLA_IPTUN_FWMARK] = { .type = NLA_U32 },

View File

@ -96,9 +96,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2550,7 +2550,7 @@ void sk_setup_caps(struct sock *sk, stru
if (sk_is_tcp(sk))
sk->sk_route_caps |= NETIF_F_GSO;
@@ -2554,7 +2554,7 @@ void sk_setup_caps(struct sock *sk, stru
icsk->icsk_ack.dst_quick_ack = dst_metric(dst, RTAX_QUICKACK);
}
if (sk->sk_route_caps & NETIF_F_GSO)
- sk->sk_route_caps |= NETIF_F_GSO_SOFTWARE;
+ sk->sk_route_caps |= NETIF_F_GSO_SOFTWARE_ALL;

View File

@ -17,7 +17,7 @@ Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -17802,8 +17802,10 @@ static int tg3_init_one(struct pci_dev *
@@ -17799,8 +17799,10 @@ static int tg3_init_one(struct pci_dev *
} else
persist_dma_mask = dma_mask = DMA_BIT_MASK(64);

View File

@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1460,6 +1460,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
@@ -1461,6 +1461,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
the unaligned access emulation.
see arch/parisc/kernel/unaligned.c for reference

View File

@ -311,7 +311,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
/**
* ip6_tnl_addr_conflict - compare packet addresses to tunnel's own
* @t: the outgoing tunnel device
@@ -1292,6 +1440,7 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
@@ -1291,6 +1439,7 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
u8 protocol)
{
struct ip6_tnl *t = netdev_priv(dev);
@ -319,7 +319,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
struct ipv6hdr *ipv6h;
const struct iphdr *iph;
int encap_limit = -1;
@@ -1391,6 +1540,18 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
@@ -1390,6 +1539,18 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
fl6.flowi6_uid = sock_net_uid(dev_net(dev), NULL);
dsfield = INET_ECN_encapsulate(dsfield, orig_dsfield);
@ -338,7 +338,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6))
return -1;
@@ -1544,6 +1705,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
@@ -1543,6 +1704,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
t->parms.link = p->link;
t->parms.proto = p->proto;
t->parms.fwmark = p->fwmark;
@ -353,7 +353,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
dst_cache_reset(&t->dst_cache);
ip6_tnl_link_config(t);
}
@@ -1578,6 +1747,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
@@ -1577,6 +1746,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
p->flowinfo = u->flowinfo;
p->link = u->link;
p->proto = u->proto;
@ -361,7 +361,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
memcpy(p->name, u->name, sizeof(u->name));
}
@@ -1966,6 +2136,15 @@ static int ip6_tnl_validate(struct nlatt
@@ -1965,6 +2135,15 @@ static int ip6_tnl_validate(struct nlatt
return 0;
}
@ -377,7 +377,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
static void ip6_tnl_netlink_parms(struct nlattr *data[],
struct __ip6_tnl_parm *parms)
{
@@ -2003,6 +2182,46 @@ static void ip6_tnl_netlink_parms(struct
@@ -2002,6 +2181,46 @@ static void ip6_tnl_netlink_parms(struct
if (data[IFLA_IPTUN_FWMARK])
parms->fwmark = nla_get_u32(data[IFLA_IPTUN_FWMARK]);
@ -424,7 +424,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
}
static int ip6_tnl_newlink(struct net *src_net, struct net_device *dev,
@@ -2086,6 +2305,12 @@ static void ip6_tnl_dellink(struct net_d
@@ -2085,6 +2304,12 @@ static void ip6_tnl_dellink(struct net_d
static size_t ip6_tnl_get_size(const struct net_device *dev)
{
@ -437,7 +437,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
return
/* IFLA_IPTUN_LINK */
nla_total_size(4) +
@@ -2115,6 +2340,24 @@ static size_t ip6_tnl_get_size(const str
@@ -2114,6 +2339,24 @@ static size_t ip6_tnl_get_size(const str
nla_total_size(0) +
/* IFLA_IPTUN_FWMARK */
nla_total_size(4) +
@ -462,7 +462,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
0;
}
@@ -2122,6 +2365,9 @@ static int ip6_tnl_fill_info(struct sk_b
@@ -2121,6 +2364,9 @@ static int ip6_tnl_fill_info(struct sk_b
{
struct ip6_tnl *tunnel = netdev_priv(dev);
struct __ip6_tnl_parm *parm = &tunnel->parms;
@ -472,7 +472,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) ||
@@ -2131,9 +2377,27 @@ static int ip6_tnl_fill_info(struct sk_b
@@ -2130,9 +2376,27 @@ static int ip6_tnl_fill_info(struct sk_b
nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) ||
nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) ||
nla_put_u8(skb, IFLA_IPTUN_PROTO, parm->proto) ||
@ -501,7 +501,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) ||
nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) ||
nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) ||
@@ -2173,6 +2437,7 @@ static const struct nla_policy ip6_tnl_p
@@ -2172,6 +2436,7 @@ static const struct nla_policy ip6_tnl_p
[IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 },
[IFLA_IPTUN_COLLECT_METADATA] = { .type = NLA_FLAG },
[IFLA_IPTUN_FWMARK] = { .type = NLA_U32 },

View File

@ -59,7 +59,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
}
--- a/net/netfilter/nft_flow_offload.c
+++ b/net/netfilter/nft_flow_offload.c
@@ -487,47 +487,14 @@ static struct nft_expr_type nft_flow_off
@@ -486,47 +486,14 @@ static struct nft_expr_type nft_flow_off
.owner = THIS_MODULE,
};

View File

@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -8449,7 +8449,7 @@ static int nft_register_flowtable_net_ho
@@ -8448,7 +8448,7 @@ static int nft_register_flowtable_net_ho
err = flowtable->data.type->setup(&flowtable->data,
hook->ops.dev,
FLOW_BLOCK_BIND);

View File

@ -17,7 +17,7 @@ Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -17732,8 +17732,10 @@ static int tg3_init_one(struct pci_dev *
@@ -17729,8 +17729,10 @@ static int tg3_init_one(struct pci_dev *
} else
persist_dma_mask = dma_mask = DMA_BIT_MASK(64);

View File

@ -13,7 +13,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1820,6 +1820,15 @@ config DEBUG_RSEQ
@@ -1821,6 +1821,15 @@ config DEBUG_RSEQ
If unsure, say N.
@ -31,7 +31,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
help
--- a/init/main.c
+++ b/init/main.c
@@ -608,6 +608,29 @@ static inline void setup_nr_cpu_ids(void
@@ -620,6 +620,29 @@ static inline void setup_nr_cpu_ids(void
static inline void smp_prepare_cpus(unsigned int maxcpus) { }
#endif
@ -61,7 +61,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
/*
* We need to store the untouched command line for future reference.
* We also need to store the touched command line since the parameter
@@ -897,6 +920,7 @@ void start_kernel(void)
@@ -909,6 +932,7 @@ void start_kernel(void)
pr_notice("%s", linux_banner);
early_security_init();
setup_arch(&command_line);

View File

@ -15,12 +15,10 @@
};
aliases {
// TODO: Verify if the ethernet0 alias is needed
ethernet0 = &gmac;
led-boot = &led_backlight_white;
led-failsafe = &led_status_green;
led-boot = &led_status_white;
led-failsafe = &led_status_red;
led-running = &led_status_green;
led-upgrade = &led_status_red;
led-upgrade = &led_status_blue;
label-mac-device = &gmac;
};
@ -43,17 +41,18 @@
leds {
compatible = "gpio-leds";
led_status_green: led-status-green {
function = LED_FUNCTION_STATUS;
led-0 {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
default-state = "keep";
default-state = "on";
};
led_status_red: led-status-red {
function = LED_FUNCTION_STATUS;
led-1 {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_RED>;
gpios = <&tlmm 23 GPIO_ACTIVE_LOW>;
panic-indicator;
};
};
@ -83,7 +82,6 @@
gpio-export,output = <1>;
gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
};
};
soc {
@ -113,7 +111,6 @@
reg = <0x1957000 0x100>;
qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
};
};
};
@ -186,7 +183,7 @@
nand_pins: nand-pins {
pullups {
pins = "gpio52", "gpio53", "gpio58", "gpio59";
pins = "gpio52", "gpio53", "gpio58", "gpio59";
function = "qpic";
bias-pull-up;
};
@ -300,7 +297,6 @@
precal_art_9000: precal@9000 {
reg = <0x9000 0x2f20>;
};
};
};
@ -349,7 +345,6 @@
reg = <0x12 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
@ -403,7 +398,6 @@
label = "ubi";
reg = <0x0ad00000 0x05300000>;
};
};
};
};
@ -417,34 +411,29 @@
compatible = "ti,tlc59108"; /* really is tlc59208f */
reg = <0x27>;
led_backlight_green: led-backlight-green {
function = LED_FUNCTION_BACKLIGHT;
led_status_green: led-0 {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_GREEN>;
reg = <0x0>;
linux,default-trigger = "default-off";
};
led_backlight_red: led-backlight-red {
function = LED_FUNCTION_BACKLIGHT;
led_status_red: led-1 {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_RED>;
reg = <0x1>;
linux,default-trigger = "default-off";
};
led_backlight_blue: led-backlight-blue {
function = LED_FUNCTION_BACKLIGHT;
led_status_blue: led-2 {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_BLUE>;
reg = <0x2>;
linux,default-trigger = "default-off";
};
led_backlight_white: led-backlight-white {
function = LED_FUNCTION_BACKLIGHT;
led_status_white: led-3 {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_WHITE>;
reg = <0x3>;
linux,default-trigger = "default-off";
};
};
};

View File

@ -882,7 +882,9 @@ define Device/netgear_orbi
endef
define Device/netgear_lbr20
$(call Device/netgear_orbi)
$(call Device/DniImage)
SOC := qcom-ipq4019
DEVICE_VENDOR := NETGEAR
DEVICE_MODEL := LBR20
NETGEAR_BOARD_ID := LBR20
NETGEAR_HW_ID := 29766182+0+256+512+2x2+2x2+2x2+1

View File

@ -6,9 +6,9 @@
board=$(board_name)
dt_base64_extract() {
base64_extract() {
local target_dir="/sys$DEVPATH"
local source="$target_dir/../../of_node/qcom,ath10k-calibration-data-base64"
local source="$1"
[ -e "$source" ] || caldata_die "cannot find base64 calibration data: $source"
[ -d "$target_dir" ] || \
@ -30,7 +30,7 @@ case "$FIRMWARE" in
case "$board" in
asus,onhub |\
tplink,onhub)
dt_base64_extract
base64_extract /sys/firmware/vpd/ro/wifi_base64_calibration0
;;
meraki,mr52)
CI_UBIPART=art
@ -68,7 +68,7 @@ case "$FIRMWARE" in
case "$board" in
asus,onhub |\
tplink,onhub)
dt_base64_extract
base64_extract /sys/firmware/vpd/ro/wifi_base64_calibration1
;;
ruijie,rg-mtfi-m520)
caldata_extract "ART" 0x5000 0x844
@ -106,7 +106,7 @@ case "$FIRMWARE" in
case "$board" in
asus,onhub |\
tplink,onhub)
dt_base64_extract
base64_extract /sys/firmware/vpd/ro/wifi_base64_calibration2
;;
meraki,mr42)
CI_UBIPART=art

View File

@ -177,7 +177,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
#include <linux/bootconfig.h>
#include <linux/console.h>
#include <linux/nmi.h>
@@ -931,6 +932,17 @@ void start_kernel(void)
@@ -943,6 +944,17 @@ void start_kernel(void)
pr_notice("Kernel command line: %s\n", saved_command_line);
/* parameters may set static keys */
jump_label_init();

View File

@ -5518,7 +5518,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
(transaction layer end-to-end CRC checking).
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1644,6 +1644,8 @@ void pci_walk_bus_locked(struct pci_bus
@@ -1658,6 +1658,8 @@ void pci_walk_bus_locked(struct pci_bus
void *userdata);
int pci_cfg_space_size(struct pci_dev *dev);
unsigned char pci_bus_max_busnr(struct pci_bus *bus);

View File

@ -37,7 +37,7 @@
* CONFIG_CMDLINE is meant to be a default in case nothing else
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -2380,6 +2380,14 @@ config CMDLINE_FORCE
@@ -2381,6 +2381,14 @@ config CMDLINE_FORCE
endchoice

View File

@ -56,9 +56,9 @@
sfp0: sfp-p1 {
compatible = "sff,sfp";
i2c-bus = <&i2c0>;
los-gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
los-gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
mod-def0-gpio = <&gpio1 1 GPIO_ACTIVE_LOW>;
tx-disable-gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
tx-disable-gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <2900>;
#thermal-sensor-cells = <0>;
};
@ -66,9 +66,9 @@
sfp1: sfp-p2 {
compatible = "sff,sfp";
i2c-bus = <&i2c1>;
los-gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
los-gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>;
mod-def0-gpio = <&gpio1 4 GPIO_ACTIVE_LOW>;
tx-disable-gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>;
tx-disable-gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <1500>;
#thermal-sensor-cells = <0>;
};
@ -76,9 +76,9 @@
sfp2: sfp-p3 {
compatible = "sff,sfp";
i2c-bus = <&i2c2>;
los-gpio = <&gpio1 6 GPIO_ACTIVE_HIGH>;
los-gpio = <&gpio1 8 GPIO_ACTIVE_HIGH>;
mod-def0-gpio = <&gpio1 7 GPIO_ACTIVE_LOW>;
tx-disable-gpio = <&gpio1 8 GPIO_ACTIVE_HIGH>;
tx-disable-gpio = <&gpio1 6 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <1500>;
#thermal-sensor-cells = <0>;
};
@ -86,9 +86,9 @@
sfp3: sfp-p4 {
compatible = "sff,sfp";
i2c-bus = <&i2c3>;
los-gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
los-gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>;
mod-def0-gpio = <&gpio1 10 GPIO_ACTIVE_LOW>;
tx-disable-gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>;
tx-disable-gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <2000>;
#thermal-sensor-cells = <0>;
};
@ -96,9 +96,9 @@
sfp4: sfp-p5 {
compatible = "sff,sfp";
i2c-bus = <&i2c4>;
los-gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
los-gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
mod-def0-gpio = <&gpio1 13 GPIO_ACTIVE_LOW>;
tx-disable-gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
tx-disable-gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <2000>;
#thermal-sensor-cells = <0>;
};
@ -106,9 +106,9 @@
sfp5: sfp-p6 {
compatible = "sff,sfp";
i2c-bus = <&i2c5>;
los-gpio = <&gpio1 21 GPIO_ACTIVE_HIGH>;
los-gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>;
mod-def0-gpio = <&gpio1 22 GPIO_ACTIVE_LOW>;
tx-disable-gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>;
tx-disable-gpio = <&gpio1 21 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <1500>;
#thermal-sensor-cells = <0>;
};
@ -116,9 +116,9 @@
sfp6: sfp-p7 {
compatible = "sff,sfp";
i2c-bus = <&i2c6>;
los-gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
los-gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>;
mod-def0-gpio = <&gpio1 25 GPIO_ACTIVE_LOW>;
tx-disable-gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>;
tx-disable-gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <1500>;
#thermal-sensor-cells = <0>;
};
@ -126,9 +126,9 @@
sfp7: sfp-p8 {
compatible = "sff,sfp";
i2c-bus = <&i2c7>;
los-gpio = <&gpio1 27 GPIO_ACTIVE_HIGH>;
los-gpio = <&gpio1 29 GPIO_ACTIVE_HIGH>;
mod-def0-gpio = <&gpio1 28 GPIO_ACTIVE_LOW>;
tx-disable-gpio = <&gpio1 29 GPIO_ACTIVE_HIGH>;
tx-disable-gpio = <&gpio1 27 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <2900>;
#thermal-sensor-cells = <0>;
};

View File

@ -359,12 +359,8 @@ static int __init rtl83xx_mdio_probe(struct rtl838x_switch_priv *priv)
if (of_get_phy_mode(dn, &interface))
interface = PHY_INTERFACE_MODE_NA;
if (interface == PHY_INTERFACE_MODE_10G_QXGMII) {
interface = PHY_INTERFACE_MODE_USXGMII;
dev_warn(priv->dev, "handle mode 10g-qsxgmii internally as usxgmii for now\n");
}
if (interface == PHY_INTERFACE_MODE_10G_QXGMII)
priv->ports[pn].is2G5 = true;
if (interface == PHY_INTERFACE_MODE_USXGMII)
priv->ports[pn].is2G5 = priv->ports[pn].is10G = true;
if (interface == PHY_INTERFACE_MODE_10GBASER)

View File

@ -653,6 +653,7 @@ static void rtldsa_93xx_phylink_get_caps(struct dsa_switch *ds, int port,
__set_bit(PHY_INTERFACE_MODE_10GBASER, config->supported_interfaces);
__set_bit(PHY_INTERFACE_MODE_2500BASEX, config->supported_interfaces);
__set_bit(PHY_INTERFACE_MODE_USXGMII, config->supported_interfaces);
__set_bit(PHY_INTERFACE_MODE_10G_QXGMII, config->supported_interfaces);
}
static void rtl83xx_phylink_mac_config(struct dsa_switch *ds, int port,
@ -726,7 +727,8 @@ static void rtl93xx_phylink_mac_config(struct dsa_switch *ds, int port,
(state->interface == PHY_INTERFACE_MODE_1000BASEX ||
state->interface == PHY_INTERFACE_MODE_SGMII ||
state->interface == PHY_INTERFACE_MODE_2500BASEX ||
state->interface == PHY_INTERFACE_MODE_10GBASER))
state->interface == PHY_INTERFACE_MODE_10GBASER ||
state->interface == PHY_INTERFACE_MODE_10G_QXGMII))
rtl9300_serdes_setup(port, sds_num, state->interface);
}

View File

@ -52,6 +52,7 @@ struct rtsds_config {
int sds_cnt;
int page_cnt;
int base;
int (*get_backing_sds)(struct rtsds_ctrl *ctrl, int sds, int page);
int (*read)(struct rtsds_ctrl *ctrl, int sds, int page, int regnum);
int (*write)(struct rtsds_ctrl *ctrl, int sds, int page, int regnum, u16 value);
};
@ -68,24 +69,6 @@ static bool rtsds_mmd_to_sds(struct rtsds_ctrl *ctrl, int addr, int devad, int m
devad != MDIO_MMD_VEND1);
}
static int rtsds_get_backing_sds(struct rtsds_ctrl *ctrl, int sds, int page)
{
int map[] = { 0, 1, 2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23 };
int backsds;
/* non-RTL931x and first two RTL931x SerDes have 1:1 frontend/backend mapping */
if (ctrl->cfg->base != RTSDS_931X_BASE || sds < 2)
return sds;
backsds = map[sds];
if (sds & 1)
backsds += (page >> 6); /* distribute "odd" to 3 background SerDes */
else
backsds += (page >> 7); /* distribute "even" to 2 background SerDes */
return backsds;
}
#ifdef CONFIG_DEBUG_FS
/*
@ -137,7 +120,7 @@ static int rtsds_dbg_registers_show(struct seq_file *seqf, void *unused)
do {
subpage = RTSDS_SUBPAGE(page);
if (!subpage) {
seq_printf(seqf, "Back SDS %02d:", rtsds_get_backing_sds(ctrl, sds, page));
seq_printf(seqf, "Back SDS %02d:", ctrl->cfg->get_backing_sds(ctrl, sds, page));
for (regnum = 0; regnum < RTSDS_REG_CNT; regnum++)
seq_printf(seqf, " %02X", regnum);
seq_puts(seqf, "\n");
@ -302,6 +285,32 @@ static int rtsds_839x_write(struct rtsds_ctrl *ctrl, int sds, int page, int regn
return regmap_write(ctrl->map, ctrl->cfg->base + offset, write_value);
}
static int rtsds_83xx_get_backing_sds(struct rtsds_ctrl *ctrl, int sds, int page)
{
return sds;
}
static int rtsds_rt93xx_io(struct rtsds_ctrl *ctrl, int sds, int page, int regnum, int cmd)
{
int ret, op, value;
op = FIELD_PREP(RTSDS_93XX_CMD_SDS_MASK, sds) |
FIELD_PREP(RTSDS_93XX_CMD_PAGE_MASK, page) |
FIELD_PREP(RTSDS_93XX_CMD_REG_MASK, regnum) |
RTSDS_93XX_CMD_BUSY | cmd;
regmap_write(ctrl->map, ctrl->cfg->base, op);
ret = regmap_read_poll_timeout(ctrl->map, ctrl->cfg->base, value,
!(value & RTSDS_93XX_CMD_BUSY), 30, 1000000);
if (ret < 0) {
dev_err(ctrl->dev, "SerDes I/O timed out\n");
return -ETIMEDOUT;
}
return 0;
}
/*
* RTL93xx targets use a shared implementation. Their SerDes data is accessed through two IO
* registers which simulate commands to an internal MDIO bus.
@ -311,7 +320,16 @@ static int rtsds_839x_write(struct rtsds_ctrl *ctrl, int sds, int page, int regn
* - SerDes 0-1 exist on the RTL9301 and 9302B and are QSGMII capable
* - SerDes 2-9 are USXGMII capabable with either quad or single configuration
* - SerDes 10-11 are 10GBase-R capable
*
*/
static int rtsds_930x_get_backing_sds(struct rtsds_ctrl *ctrl, int sds, int page)
{
if (sds == 3 && page < 4)
return 10;
return sds;
}
/*
* The RTL931x family has 14 "frontend" SerDes that are cascaded. All operations (e.g. reset) work
* on this frontend view while their registers are distributed over a total of least 26 background
* SerDes with 64 pages and 32 registers. Three types of SerDes exist:
@ -342,26 +360,22 @@ static int rtsds_839x_write(struct rtsds_ctrl *ctrl, int sds, int page, int regn
* page 0x40-0x7f (digi 1): page 0x00-0x3f back SDS page 0x00-0x3f back SDS+1
* page 0x80-0xbf (digi 2): page 0x00-0x3f back SDS+1 page 0x00-0x3f back SDS+2
*/
static int rtsds_rt93xx_io(struct rtsds_ctrl *ctrl, int sds, int page, int regnum, int cmd)
static int rtsds_931x_get_backing_sds(struct rtsds_ctrl *ctrl, int sds, int page)
{
int ret, op, value;
int map[] = { 0, 1, 2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23 };
int backsds;
op = FIELD_PREP(RTSDS_93XX_CMD_SDS_MASK, sds) |
FIELD_PREP(RTSDS_93XX_CMD_PAGE_MASK, page) |
FIELD_PREP(RTSDS_93XX_CMD_REG_MASK, regnum) |
RTSDS_93XX_CMD_BUSY | cmd;
/* First two RTL931x SerDes have 1:1 frontend/backend mapping */
if (sds < 2)
return sds;
regmap_write(ctrl->map, ctrl->cfg->base, op);
ret = regmap_read_poll_timeout(ctrl->map, ctrl->cfg->base, value,
!(value & RTSDS_93XX_CMD_BUSY), 30, 1000000);
backsds = map[sds];
if (sds & 1)
backsds += (page >> 6); /* distribute "odd" to 3 background SerDes */
else
backsds += (page >> 7); /* distribute "even" to 2 background SerDes */
if (ret < 0) {
dev_err(ctrl->dev, "SerDes I/O timed out\n");
return -ETIMEDOUT;
}
return 0;
return backsds;
}
static int rtsds_93xx_read(struct rtsds_ctrl *ctrl, int sds, int page, int regnum)
@ -369,7 +383,7 @@ static int rtsds_93xx_read(struct rtsds_ctrl *ctrl, int sds, int page, int regnu
int subpage = RTSDS_SUBPAGE(page);
int ret, backsds, value;
backsds = rtsds_get_backing_sds(ctrl, sds, page);
backsds = ctrl->cfg->get_backing_sds(ctrl, sds, page);
ret = rtsds_rt93xx_io(ctrl, backsds, subpage, regnum, RTSDS_93XX_CMD_READ);
if (ret)
return ret;
@ -384,7 +398,7 @@ static int rtsds_93xx_write(struct rtsds_ctrl *ctrl, int sds, int page, int regn
int subpage = RTSDS_SUBPAGE(page);
int ret, backsds;
backsds = rtsds_get_backing_sds(ctrl, sds, page);
backsds = ctrl->cfg->get_backing_sds(ctrl, sds, page);
ret = regmap_write(ctrl->map, ctrl->cfg->base + 4, value);
if (ret)
return ret;
@ -458,35 +472,39 @@ static int rtsds_probe(struct platform_device *pdev)
}
static const struct rtsds_config rtsds_838x_cfg = {
.sds_cnt = RTSDS_838X_SDS_CNT,
.page_cnt = RTSDS_838X_PAGE_CNT,
.base = RTSDS_838X_BASE,
.read = rtsds_838x_read,
.write = rtsds_838x_write,
.sds_cnt = RTSDS_838X_SDS_CNT,
.page_cnt = RTSDS_838X_PAGE_CNT,
.base = RTSDS_838X_BASE,
.get_backing_sds = rtsds_83xx_get_backing_sds,
.read = rtsds_838x_read,
.write = rtsds_838x_write,
};
static const struct rtsds_config rtsds_839x_cfg = {
.sds_cnt = RTSDS_839X_SDS_CNT,
.page_cnt = RTSDS_839X_PAGE_CNT,
.base = RTSDS_839X_BASE,
.read = rtsds_839x_read,
.write = rtsds_839x_write,
.sds_cnt = RTSDS_839X_SDS_CNT,
.page_cnt = RTSDS_839X_PAGE_CNT,
.base = RTSDS_839X_BASE,
.get_backing_sds = rtsds_83xx_get_backing_sds,
.read = rtsds_839x_read,
.write = rtsds_839x_write,
};
static const struct rtsds_config rtsds_930x_cfg = {
.sds_cnt = RTSDS_930X_SDS_CNT,
.page_cnt = RTSDS_930X_PAGE_CNT,
.base = RTSDS_930X_BASE,
.read = rtsds_93xx_read,
.write = rtsds_93xx_write,
.sds_cnt = RTSDS_930X_SDS_CNT,
.page_cnt = RTSDS_930X_PAGE_CNT,
.base = RTSDS_930X_BASE,
.get_backing_sds = rtsds_930x_get_backing_sds,
.read = rtsds_93xx_read,
.write = rtsds_93xx_write,
};
static const struct rtsds_config rtsds_931x_cfg = {
.sds_cnt = RTSDS_931X_SDS_CNT,
.page_cnt = RTSDS_931X_PAGE_CNT,
.base = RTSDS_931X_BASE,
.read = rtsds_93xx_read,
.write = rtsds_93xx_write,
.sds_cnt = RTSDS_931X_SDS_CNT,
.page_cnt = RTSDS_931X_PAGE_CNT,
.base = RTSDS_931X_BASE,
.get_backing_sds = rtsds_931x_get_backing_sds,
.read = rtsds_93xx_read,
.write = rtsds_93xx_write,
};
static const struct of_device_id rtsds_of_match[] = {

View File

@ -1562,11 +1562,6 @@ static int rtmdio_probe(struct platform_device *pdev)
priv->interfaces[pn] = PHY_INTERFACE_MODE_NA;
dev_dbg(dev, "phy mode of port %d is %s\n", pn, phy_modes(priv->interfaces[pn]));
if (priv->interfaces[pn] == PHY_INTERFACE_MODE_10G_QXGMII) {
priv->interfaces[pn] = PHY_INTERFACE_MODE_USXGMII;
dev_warn(dev, "handle mode 10g-qsxgmii internally as usxgmii for now\n");
}
/*
* TODO: The MDIO driver does not need any info about the SerDes. As long as
* the PCS driver cannot completely control the SerDes, look up the information

View File

@ -77,6 +77,13 @@ extern int rtmdio_930x_write_sds_phy(int sds, int page, int regnum, u16 val);
#define RTL930X_SDS_OFF 0x1f
#define RTL930X_SDS_MASK 0x1f
/* RTL930X SerDes supports two submodes when mode is USXGMII:
* 0x00: USXGMII (aka USXGMII_SX)
* 0x02: 10G_QXGMII (aka USXGMII_QX)
*/
#define RTL930X_SDS_SUBMODE_USXGMII_SX 0x0
#define RTL930X_SDS_SUBMODE_USXGMII_QX 0x2
#define RTSDS_930X_PLL_1000 0x1
#define RTSDS_930X_PLL_10000 0x5
#define RTSDS_930X_PLL_2500 0x3
@ -178,29 +185,9 @@ u16 rtl9300_sds_regs[] = { 0x0194, 0x0194, 0x0194, 0x0194, 0x02a0, 0x02a0, 0x02a
0x02A4, 0x02A4, 0x0198, 0x0198 };
u8 rtl9300_sds_lsb[] = { 0, 6, 12, 18, 0, 6, 12, 18, 0, 6, 0, 6};
/* Reset the SerDes by powering it off and set a new operation mode
* of the SerDes.
*/
static void rtl9300_sds_rst(int sds_num, u32 mode)
{
pr_info("%s %d\n", __func__, mode);
if (sds_num < 0 || sds_num > 11) {
pr_err("Wrong SerDes number: %d\n", sds_num);
return;
}
sw_w32_mask(RTL930X_SDS_MASK << rtl9300_sds_lsb[sds_num],
RTL930X_SDS_OFF << rtl9300_sds_lsb[sds_num],
rtl9300_sds_regs[sds_num]);
mdelay(10);
sw_w32_mask(RTL930X_SDS_MASK << rtl9300_sds_lsb[sds_num], mode << rtl9300_sds_lsb[sds_num],
rtl9300_sds_regs[sds_num]);
mdelay(10);
pr_debug("%s: 194:%08x 198:%08x 2a0:%08x 2a4:%08x\n", __func__,
sw_r32(0x194), sw_r32(0x198), sw_r32(0x2a0), sw_r32(0x2a4));
}
u16 rtl9300_sds_submode_regs[] = { 0x1cc, 0x1cc, 0x2d8, 0x2d8, 0x2d8, 0x2d8,
0x2d8, 0x2d8};
u8 rtl9300_sds_submode_lsb[] = { 0, 5, 0, 5, 10, 15, 20, 25 };
void rtl9300_sds_set(int sds_num, u32 mode)
{
@ -233,6 +220,35 @@ static u32 rtl9300_sds_mode_get(int sds_num)
return v & RTL930X_SDS_MASK;
}
static u32 rtl9300_sds_submode_get(int sds_num)
{
u32 v;
if (sds_num < 2 || sds_num > 9) {
pr_err("%s: unsupported SerDes %d\n", __func__, sds_num);
return 0;
}
v = sw_r32(rtl9300_sds_submode_regs[sds_num]);
v >>= rtl9300_sds_submode_lsb[sds_num];
return v & RTL930X_SDS_MASK;
}
static void rtsds_930x_submode_set(int sds, u32 submode) {
if (sds < 2 || sds > 9) {
pr_err("%s: submode unsupported on serdes %d\n", __func__, sds);
return;
}
if (submode != RTL930X_SDS_SUBMODE_USXGMII_SX &&
submode != RTL930X_SDS_SUBMODE_USXGMII_QX) {
pr_err("%s: unsupported submode 0x%x\n", __func__, submode);
}
sw_w32_mask(RTL930X_SDS_MASK << rtl9300_sds_submode_lsb[sds-2],
submode << rtl9300_sds_submode_lsb[sds-2],
rtl9300_sds_submode_regs[sds-2]);
}
/* Read the link and speed status of the 2 internal SGMII/1000Base-X
* ports of the RTL838x SoCs
*/
@ -1068,7 +1084,7 @@ static int rtl9300_read_status(struct phy_device *phydev)
struct device *dev = &phydev->mdio.dev;
int phy_addr = phydev->mdio.addr;
struct device_node *dn;
u32 sds_num = 0, status, latch_status, mode;
u32 sds_num = 0, status, latch_status, latch_status1, mode, submode;
if (dev->of_node) {
dn = dev->of_node;
@ -1093,6 +1109,14 @@ static int rtl9300_read_status(struct phy_device *phydev)
latch_status = rtl9300_sds_field_r(sds_num, 0x4, 1, 2, 2);
status |= rtl9300_sds_field_r(sds_num, 0x5, 0, 12, 12);
latch_status |= rtl9300_sds_field_r(sds_num, 0x4, 1, 2, 2);
} else if (mode == RTL930X_SDS_MODE_USXGMII) {
submode = rtl9300_sds_submode_get(sds_num);
status = rtl9300_sds_field_r(sds_num, 0x5, 0, 12, 12);
latch_status = rtl9300_sds_field_r(sds_num, 0x4, 1, 2, 2);
latch_status1 = rtl9300_sds_field_r(sds_num, 0x7, 21, 14, 4);
status |= rtl9300_sds_field_r(sds_num, 0x5, 0, 12, 12);
latch_status |= rtl9300_sds_field_r(sds_num, 0x4, 1, 2, 2);
latch_status1 |= rtl9300_sds_field_r(sds_num, 0x7, 21, 14, 4);
} else {
status = rtl9300_sds_field_r(sds_num, 0x1, 29, 8, 0);
latch_status = rtl9300_sds_field_r(sds_num, 0x1, 30, 8, 0);
@ -1107,6 +1131,13 @@ static int rtl9300_read_status(struct phy_device *phydev)
if (mode == RTL930X_SDS_MODE_10GBASER) {
phydev->speed = SPEED_10000;
phydev->interface = PHY_INTERFACE_MODE_10GBASER;
} else if (mode == RTL930X_SDS_MODE_USXGMII) {
phydev->speed = SPEED_10000;
if (submode == RTL930X_SDS_SUBMODE_USXGMII_QX) {
phydev->interface = PHY_INTERFACE_MODE_10G_QXGMII;
} else {
phydev->interface = PHY_INTERFACE_MODE_USXGMII;
}
} else {
phydev->speed = SPEED_1000;
phydev->interface = PHY_INTERFACE_MODE_1000BASEX;
@ -1382,6 +1413,45 @@ static void rtsds_930x_force_mode(int sds, phy_interface_t interface)
rtl930x_sds_rx_rst(sds, interface);
}
static void rtsds_930x_mode_set(int sds, phy_interface_t phy_mode)
{
u32 mode;
u32 submode;
if (sds < 0 || sds > 11) {
pr_err("%s: invalid SerDes number: %d\n", __func__, sds);
return;
}
switch(phy_mode) {
case PHY_INTERFACE_MODE_SGMII:
case PHY_INTERFACE_MODE_1000BASEX:
case PHY_INTERFACE_MODE_2500BASEX:
case PHY_INTERFACE_MODE_10GBASER:
rtsds_930x_force_mode(sds, phy_mode);
return;
case PHY_INTERFACE_MODE_10G_QXGMII:
mode = RTL930X_SDS_MODE_USXGMII;
submode = RTL930X_SDS_SUBMODE_USXGMII_QX;
break;
default:
pr_warn("%s: unsupported mode %s\n", __func__, phy_modes(phy_mode));
return;
}
/* SerDes off first. */
rtl9300_sds_set(sds, RTL930X_SDS_OFF);
/* Set the mode. */
rtl9300_sds_set(sds, mode);
/* Set the submode if needed. */
if (phy_mode == PHY_INTERFACE_MODE_10G_QXGMII) {
rtsds_930x_submode_set(sds, submode);
}
}
static void rtl9300_sds_tx_config(int sds, phy_interface_t phy_if)
{
/* parameters: rtl9303_80G_txParam_s2 */
@ -1409,6 +1479,7 @@ static void rtl9300_sds_tx_config(int sds, phy_interface_t phy_if)
break;
case PHY_INTERFACE_MODE_10GBASER:
case PHY_INTERFACE_MODE_USXGMII:
case PHY_INTERFACE_MODE_10G_QXGMII:
case PHY_INTERFACE_MODE_XGMII:
pre_en = 0;
pre_amp = 0;
@ -2250,6 +2321,7 @@ static int rtl9300_sds_sym_err_reset(int sds_num, phy_interface_t phy_mode)
case PHY_INTERFACE_MODE_1000BASEX:
case PHY_INTERFACE_MODE_SGMII:
case PHY_INTERFACE_MODE_10G_QXGMII:
rtl9300_sds_field_w(sds_num, 0x1, 24, 2, 0, 0);
rtl9300_sds_field_w(sds_num, 0x1, 3, 15, 8, 0);
rtl9300_sds_field_w(sds_num, 0x1, 2, 15, 0, 0);
@ -2269,6 +2341,7 @@ static u32 rtl9300_sds_sym_err_get(int sds_num, phy_interface_t phy_mode)
switch (phy_mode) {
case PHY_INTERFACE_MODE_XGMII:
case PHY_INTERFACE_MODE_10G_QXGMII:
break;
case PHY_INTERFACE_MODE_1000BASEX:
@ -2307,8 +2380,9 @@ static int rtl9300_sds_check_calibration(int sds_num, phy_interface_t phy_mode)
}
break;
case PHY_INTERFACE_MODE_10GBASER:
case PHY_INTERFACE_MODE_10G_QXGMII:
if (errors2 > 0) {
pr_info("%s 10GBASER error rate too high\n", __func__);
pr_info("%s: %s error rate too high\n", __func__, phy_modes(phy_mode));
return 1;
}
break;
@ -2354,7 +2428,7 @@ int rtl9300_serdes_setup(int port, int sds_num, phy_interface_t phy_mode)
int calib_tries = 0;
/* Turn Off Serdes */
rtl9300_sds_rst(sds_num, RTL930X_SDS_OFF);
rtl9300_sds_set(sds_num, RTL930X_SDS_OFF);
/* Apply serdes patches */
rtsds_930x_patch_serdes(sds_num, phy_mode);
@ -2378,7 +2452,7 @@ int rtl9300_serdes_setup(int port, int sds_num, phy_interface_t phy_mode)
sw_w32_mask(1, 0, RTL930X_MAC_FORCE_MODE_CTRL + 4 * port);
/* Enable SDS in desired mode */
rtsds_930x_force_mode(sds_num, phy_mode);
rtsds_930x_mode_set(sds_num, phy_mode);
/* Enable Fiber RX */
rtl9300_sds_field_w(sds_num, 0x20, 2, 12, 12, 0);
@ -2565,6 +2639,70 @@ static const sds_config rtsds_930x_cfg_10g_2500bx_odd[] =
{0x2D, 0x13, 0x3C87}, {0x2D, 0x14, 0x1808},
};
sds_config rtsds_930x_cfg_usxgmii_qx_even[] =
{
{0x06, 0x00, 0x0000}, {0x06, 0x0D, 0x0F00}, {0x06, 0x0E, 0x055A}, {0x06, 0x1D, 0x0600},
{0x07, 0x10, 0x6003}, {0x06, 0x13, 0x68C1}, {0x06, 0x14, 0xF021}, {0x07, 0x06, 0x1401},
{0x21, 0x03, 0x8206}, {0x21, 0x05, 0x40B0}, {0x21, 0x06, 0x0010}, {0x21, 0x07, 0xF09F},
{0x21, 0x0C, 0x0007}, {0x21, 0x0D, 0x6009}, {0x21, 0x0E, 0x0000}, {0x21, 0x0F, 0x0008},
{0x2E, 0x00, 0xA668}, {0x2E, 0x01, 0x2088}, {0x2E, 0x02, 0xD020}, {0x2E, 0x06, 0xC000},
{0x2E, 0x0B, 0x1892}, {0x2E, 0x0F, 0xFFDF}, {0x2E, 0x11, 0x8280}, {0x2E, 0x12, 0x0484},
{0x2E, 0x13, 0x027F}, {0x2E, 0x14, 0x1311}, {0x2E, 0x17, 0xA100}, {0x2E, 0x1A, 0x0001},
{0x2E, 0x1C, 0x0400}, {0x2F, 0x01, 0x0300}, {0x2F, 0x02, 0x1017}, {0x2F, 0x03, 0xFFDF},
{0x2F, 0x05, 0x7F7C}, {0x2F, 0x07, 0x8104}, {0x2F, 0x08, 0x0001}, {0x2F, 0x09, 0xFFD4},
{0x2F, 0x0A, 0x7C2F}, {0x2F, 0x0E, 0x003F}, {0x2F, 0x0F, 0x0121}, {0x2F, 0x10, 0x0020},
{0x2F, 0x11, 0x8840},
{0x2B, 0x13, 0x0050}, {0x2B, 0x18, 0x8E88}, {0x2B, 0x19, 0x4902}, {0x2B, 0x1D, 0x2501},
{0x2D, 0x13, 0x0050}, {0x2D, 0x18, 0x8E88}, {0x2D, 0x19, 0x4902}, {0x2D, 0x1D, 0x2641},
{0x2F, 0x13, 0x0050}, {0x2F, 0x18, 0x8E88}, {0x2F, 0x19, 0x4902}, {0x2F, 0x1D, 0x66E1},
/* enable IEEE 802.3az EEE */
{0x06, 0x03, 0xc45c},
};
sds_config rtsds_930x_cfg_usxgmii_qx_odd[] =
{
{0x06, 0x00, 0x0000}, {0x06, 0x0D, 0x0F00}, {0x06, 0x0E, 0x055A}, {0x06, 0x1D, 0x0600},
{0x07, 0x10, 0x6003}, {0x06, 0x13, 0x68C1}, {0x06, 0x14, 0xF021}, {0x07, 0x06, 0x1401},
{0x21, 0x03, 0x8206}, {0x21, 0x05, 0x40B0}, {0x21, 0x06, 0x0010}, {0x21, 0x07, 0xF09F},
{0x21, 0x0A, 0x0003}, {0x21, 0x0B, 0x0005}, {0x21, 0x0C, 0x0007}, {0x21, 0x0D, 0x6009},
{0x21, 0x0E, 0x0000}, {0x21, 0x0F, 0x0008},
{0x2E, 0x00, 0xA668}, {0x2E, 0x02, 0xD020}, {0x2E, 0x06, 0xC000}, {0x2E, 0x0B, 0x1892},
{0x2E, 0x0F, 0xFFDF}, {0x2E, 0x11, 0x8280}, {0x2E, 0x12, 0x0484}, {0x2E, 0x13, 0x027F},
{0x2E, 0x14, 0x1311}, {0x2E, 0x17, 0xA100}, {0x2E, 0x1A, 0x0001}, {0x2E, 0x1C, 0x0400},
{0x2F, 0x00, 0x820F}, {0x2F, 0x01, 0x0300}, {0x2F, 0x02, 0x1017}, {0x2F, 0x03, 0xFFDF},
{0x2F, 0x05, 0x7F7C}, {0x2F, 0x07, 0x8104}, {0x2F, 0x08, 0x0001}, {0x2F, 0x09, 0xFFD4},
{0x2F, 0x0A, 0x7C2F}, {0x2F, 0x0E, 0x003F}, {0x2F, 0x0F, 0x0121}, {0x2F, 0x10, 0x0020},
{0x2F, 0x11, 0x8840},
{0x2B, 0x13, 0x3D87}, {0x2B, 0x14, 0x3108},
{0x2D, 0x13, 0x3C87}, {0x2D, 0x14, 0x1808},
/* enable IEEE 802.3az EEE */
{0x06, 0x03, 0xc45c},
};
static void rtsds_930x_usxgmii_config(int sds, int nway_en, u32 opcode, u32 am_period, u32 all_am_markers, u32 an_table, u32 sync_bit)
{
rtl9300_sds_field_w(sds, 0x7, 0x11, 0, 0, nway_en);
rtl9300_sds_field_w(sds, 0x7, 0x11, 1, 1, nway_en);
rtl9300_sds_field_w(sds, 0x7, 0x11, 2, 2, nway_en);
rtl9300_sds_field_w(sds, 0x7, 0x11, 3, 3, nway_en);
rtl9300_sds_field_w(sds, 0x6, 0x12, 15, 0, am_period);
rtl9300_sds_field_w(sds, 0x6, 0x13, 7, 0, all_am_markers);
rtl9300_sds_field_w(sds, 0x6, 0x13, 15, 8, all_am_markers);
rtl9300_sds_field_w(sds, 0x6, 0x14, 7, 0, all_am_markers);
rtl9300_sds_field_w(sds, 0x6, 0x14, 15, 8, all_am_markers);
rtl9300_sds_field_w(sds, 0x6, 0x15, 7, 0, all_am_markers);
rtl9300_sds_field_w(sds, 0x6, 0x15, 15, 8, all_am_markers);
rtl9300_sds_field_w(sds, 0x6, 0x16, 7, 0, all_am_markers);
rtl9300_sds_field_w(sds, 0x6, 0x16, 15, 8, all_am_markers);
rtl9300_sds_field_w(sds, 0x6, 0x17, 7, 0, all_am_markers);
rtl9300_sds_field_w(sds, 0x6, 0x17, 15, 8, all_am_markers);
rtl9300_sds_field_w(sds, 0x6, 0x18, 7, 0, all_am_markers);
rtl9300_sds_field_w(sds, 0x6, 0x18, 15, 8, all_am_markers);
rtl9300_sds_field_w(sds, 0x7, 0x10, 7, 0, opcode);
rtl9300_sds_field_w(sds, 0x6, 0xe, 10, 10, an_table);
rtl9300_sds_field_w(sds, 0x6, 0x1d, 11, 10, sync_bit);
}
static void rtsds_930x_patch_serdes(int sds, phy_interface_t mode)
{
const bool even_sds = ((sds & 1) == 0);
@ -2594,6 +2732,16 @@ static void rtsds_930x_patch_serdes(int sds, phy_interface_t mode)
}
break;
case PHY_INTERFACE_MODE_10G_QXGMII:
if (even_sds) {
config = rtsds_930x_cfg_usxgmii_qx_even;
count = ARRAY_SIZE(rtsds_930x_cfg_usxgmii_qx_even);
} else {
config = rtsds_930x_cfg_usxgmii_qx_odd;
count = ARRAY_SIZE(rtsds_930x_cfg_usxgmii_qx_odd);
}
break;
default:
pr_warn("%s: unsupported mode %s on serdes %d\n", __func__, phy_modes(mode), sds);
return;
@ -2604,6 +2752,11 @@ static void rtsds_930x_patch_serdes(int sds, phy_interface_t mode)
config[i].reg,
config[i].data);
}
if (mode == PHY_INTERFACE_MODE_10G_QXGMII) {
/* Default configuration */
rtsds_930x_usxgmii_config(sds, 1, 0xaa, 0x5078, 0, 1, 0x1);
}
}
int rtl9300_sds_cmu_band_get(int sds)

View File

@ -19,6 +19,7 @@ rockchip_setup_interfaces()
friendlyarm,nanopi-r4se|\
friendlyarm,nanopi-r4s-enterprise|\
friendlyarm,nanopi-r6c|\
ninetripod,x3568-v4|\
radxa,e52c|\
radxa,rockpi-e|\
xunlong,orangepi-r1-plus|\

View File

@ -38,6 +38,7 @@ friendlyarm,nanopi-r3s|\
friendlyarm,nanopi-r5c|\
lunzn,fastrhino-r66s|\
mmbox,anas3035|\
ninetripod,x3568-v4|\
nlnet,xiguapi-v3|\
radxa,e25|\
sinovoip,rk3568-bpi-r2pro|\

View File

@ -0,0 +1,850 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/soc/rockchip,vop2.h>
#include "rk3568.dtsi"
/ {
model = "NineTripod X3568 v4";
compatible = "ninetripod,x3568-v4", "rockchip,rk3568";
aliases {
ethernet0 = &gmac0;
ethernet1 = &gmac1;
mmc0 = &sdhci;
mmc1 = &sdmmc0;
mmc2 = &sdmmc2;
led-boot = &led_work;
led-failsafe = &led_work;
led-running = &led_work;
led-upgrade = &led_work;
};
chosen {
stdout-path = "serial2:1500000n8";
};
adc-keys {
compatible = "adc-keys";
io-channels = <&saradc 0>;
io-channel-names = "buttons";
keyup-threshold-microvolt = <1800000>;
poll-interval = <100>;
button-vol-up {
label = "volume up";
linux,code = <KEY_VOLUMEUP>;
press-threshold-microvolt = <50000>;
};
button-vol-down {
label = "volume down";
linux,code = <KEY_VOLUMEDOWN>;
press-threshold-microvolt = <500000>;
};
};
hdmi-con {
compatible = "hdmi-connector";
type = "a";
port {
hdmi_con_in: endpoint {
remote-endpoint = <&hdmi_out_con>;
};
};
};
leds {
compatible = "gpio-leds";
led_work: led-0 {
gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>;
function = LED_FUNCTION_HEARTBEAT;
color = <LED_COLOR_ID_BLUE>;
pinctrl-names = "default";
pinctrl-0 = <&led_work_en>;
};
};
rk809-sound {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,name = "Analog RK809";
simple-audio-card,mclk-fs = <256>;
simple-audio-card,cpu {
sound-dai = <&i2s1_8ch>;
};
simple-audio-card,codec {
sound-dai = <&rk809>;
};
};
pdm_codec: pdm-codec {
compatible = "dmic-codec";
num-channels = <2>;
#sound-dai-cells = <0>;
};
pdm_sound: pdm-sound {
compatible = "simple-audio-card";
simple-audio-card,name = "microphone";
simple-audio-card,cpu {
sound-dai = <&pdm>;
};
simple-audio-card,codec {
sound-dai = <&pdm_codec>;
};
};
spdif_dit: spdif-dit {
compatible = "linux,spdif-dit";
#sound-dai-cells = <0>;
};
spdif_sound: spdif-sound {
compatible = "simple-audio-card";
simple-audio-card,name = "SPDIF";
simple-audio-card,cpu {
sound-dai = <&spdif>;
};
simple-audio-card,codec {
sound-dai = <&spdif_dit>;
};
};
sdio_pwrseq: sdio-pwrseq {
compatible = "mmc-pwrseq-simple";
clocks = <&rk809 1>;
clock-names = "ext_clock";
pinctrl-names = "default";
pinctrl-0 = <&wifi_enable>;
post-power-on-delay-ms = <100>;
power-off-delay-us = <300>;
reset-gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_LOW>;
};
dc_12v: regulator-dc-12v {
compatible = "regulator-fixed";
regulator-name = "dc_12v";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <12000000>;
regulator-max-microvolt = <12000000>;
};
pcie30_avdd0v9: regulator-pcie30-avdd0v9 {
compatible = "regulator-fixed";
regulator-name = "pcie30_avdd0v9";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <900000>;
vin-supply = <&vcc3v3_sys>;
};
pcie30_avdd1v8: regulator-pcie30-avdd1v8 {
compatible = "regulator-fixed";
regulator-name = "pcie30_avdd1v8";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
vin-supply = <&vcc3v3_sys>;
};
vcc3v3_sys: regulator-vcc3v3-sys {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_sys";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
vin-supply = <&dc_12v>;
};
vcc3v3_pcie: regulator-vcc3v3-pcie {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_pcie";
enable-active-high;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
pinctrl-names = "default";
pinctrl-0 = <&vcc3v3_pcie_en_pin>;
gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
startup-delay-us = <5000>;
vin-supply = <&vcc5v0_sys>;
};
vcc5v0_sys: regulator-vcc5v0-sys {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_sys";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&dc_12v>;
};
vcc5v0_usb: regulator-vcc5v0-usb {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_usb";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&dc_12v>;
};
vcc5v0_usb_host: regulator-vcc5v0-usb-host {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&vcc5v0_usb_host_en>;
regulator-name = "vcc5v0_usb_host";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc5v0_usb>;
};
vcc5v0_usb_otg: regulator-vcc5v0-usb-otg {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&vcc5v0_usb_otg_en>;
regulator-name = "vcc5v0_usb_otg";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc5v0_usb>;
};
};
&can1 {
assigned-clocks = <&cru CLK_CAN1>;
assigned-clock-rates = <150000000>;
pinctrl-names = "default";
pinctrl-0 = <&can1m1_pins>;
status = "okay";
};
/* used for usb_host0_xhci */
&combphy0 {
status = "okay";
};
/* used for usb_host1_xhci */
&combphy1 {
status = "okay";
};
/* connected to sata2 */
&combphy2 {
status = "okay";
};
&cpu0 {
cpu-supply = <&vdd_cpu>;
};
&cpu1 {
cpu-supply = <&vdd_cpu>;
};
&cpu2 {
cpu-supply = <&vdd_cpu>;
};
&cpu3 {
cpu-supply = <&vdd_cpu>;
};
&gmac0 {
assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>;
assigned-clock-rates = <0>, <125000000>;
clock_in_out = "output";
pinctrl-names = "default";
pinctrl-0 = <&gmac0_miim
&gmac0_tx_bus2
&gmac0_rx_bus2
&gmac0_rgmii_clk
&gmac0_rgmii_bus
&gmac0_clkinout>;
phy-handle = <&rgmii_phy0>;
phy-mode = "rgmii-id";
status = "okay";
};
&gmac1 {
assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>;
assigned-clock-rates = <0>, <125000000>;
clock_in_out = "output";
pinctrl-names = "default";
pinctrl-0 = <&gmac1m1_miim
&gmac1m1_tx_bus2
&gmac1m1_rx_bus2
&gmac1m1_rgmii_clk
&gmac1m1_rgmii_bus
&gmac1m1_clkinout>;
phy-handle = <&rgmii_phy1>;
phy-mode = "rgmii-id";
status = "okay";
};
&gpu {
mali-supply = <&vdd_gpu>;
status = "okay";
};
&hdmi {
avdd-0v9-supply = <&vdda0v9_image>;
avdd-1v8-supply = <&vcca1v8_image>;
status = "okay";
};
&hdmi_in {
hdmi_in_vp0: endpoint {
remote-endpoint = <&vp0_out_hdmi>;
};
};
&hdmi_out {
hdmi_out_con: endpoint {
remote-endpoint = <&hdmi_con_in>;
};
};
&hdmi_sound {
status = "okay";
};
&i2c0 {
status = "okay";
vdd_cpu: regulator@1c {
compatible = "tcs,tcs4525";
reg = <0x1c>;
fcs,suspend-voltage-selector = <1>;
regulator-name = "vdd_cpu";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1150000>;
regulator-ramp-delay = <2300>;
vin-supply = <&vcc5v0_sys>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
rk809: pmic@20 {
compatible = "rockchip,rk809";
reg = <0x20>;
interrupt-parent = <&gpio0>;
interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
#clock-cells = <1>;
clock-names = "mclk";
clocks = <&cru I2S1_MCLKOUT_TX>;
pinctrl-names = "default";
pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>;
system-power-controller;
#sound-dai-cells = <0>;
vcc1-supply = <&vcc3v3_sys>;
vcc2-supply = <&vcc3v3_sys>;
vcc3-supply = <&vcc3v3_sys>;
vcc4-supply = <&vcc3v3_sys>;
vcc5-supply = <&vcc3v3_sys>;
vcc6-supply = <&vcc3v3_sys>;
vcc7-supply = <&vcc3v3_sys>;
vcc8-supply = <&vcc3v3_sys>;
vcc9-supply = <&vcc3v3_sys>;
wakeup-source;
regulators {
vdd_logic: DCDC_REG1 {
regulator-name = "vdd_logic";
regulator-always-on;
regulator-boot-on;
regulator-initial-mode = <0x2>;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
regulator-ramp-delay = <6001>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdd_gpu: DCDC_REG2 {
regulator-name = "vdd_gpu";
regulator-always-on;
regulator-initial-mode = <0x2>;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
regulator-ramp-delay = <6001>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc_ddr: DCDC_REG3 {
regulator-name = "vcc_ddr";
regulator-always-on;
regulator-boot-on;
regulator-initial-mode = <0x2>;
regulator-state-mem {
regulator-on-in-suspend;
};
};
vdd_npu: DCDC_REG4 {
regulator-name = "vdd_npu";
regulator-initial-mode = <0x2>;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
regulator-ramp-delay = <6001>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc_1v8: DCDC_REG5 {
regulator-name = "vcc_1v8";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdda0v9_image: LDO_REG1 {
regulator-name = "vdda0v9_image";
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <900000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdda_0v9: LDO_REG2 {
regulator-name = "vdda_0v9";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <900000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdda0v9_pmu: LDO_REG3 {
regulator-name = "vdda0v9_pmu";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <900000>;
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <900000>;
};
};
vccio_acodec: LDO_REG4 {
regulator-name = "vccio_acodec";
regulator-always-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vccio_sd: LDO_REG5 {
regulator-name = "vccio_sd";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc3v3_pmu: LDO_REG6 {
regulator-name = "vcc3v3_pmu";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <3300000>;
};
};
vcca_1v8: LDO_REG7 {
regulator-name = "vcca_1v8";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcca1v8_pmu: LDO_REG8 {
regulator-name = "vcca1v8_pmu";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1800000>;
};
};
vcca1v8_image: LDO_REG9 {
regulator-name = "vcca1v8_image";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc_3v3: SWITCH_REG1 {
regulator-name = "vcc_3v3";
regulator-always-on;
regulator-boot-on;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc3v3_sd: SWITCH_REG2 {
regulator-name = "vcc3v3_sd";
regulator-state-mem {
regulator-off-in-suspend;
};
};
};
codec {
rockchip,mic-in-differential;
};
};
};
&i2c5 {
status = "okay";
rtc@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
#clock-cells = <0>;
};
};
&i2s0_8ch {
status = "okay";
};
&i2s1_8ch {
pinctrl-0 = <&i2s1m0_sclktx &i2s1m0_lrcktx &i2s1m0_sdi0 &i2s1m0_sdo0>;
rockchip,trcm-sync-tx-only;
status = "okay";
};
/* used for AP6275S Bluetooth Sound */
&i2s3_2ch {
status = "okay";
};
&mdio0 {
rgmii_phy0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x0>;
reset-assert-us = <20000>;
reset-deassert-us = <100000>;
reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
};
};
&mdio1 {
rgmii_phy1: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x0>;
reset-assert-us = <20000>;
reset-deassert-us = <100000>;
reset-gpios = <&gpio2 RK_PD1 GPIO_ACTIVE_LOW>;
};
};
&pcie30phy {
status = "okay";
};
&pcie3x2 {
pinctrl-names = "default";
pinctrl-0 = <&pcie_reset_pin>;
reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
vpcie3v3-supply = <&vcc3v3_pcie>;
status = "okay";
};
&pdm {
status = "okay";
};
&pinctrl {
leds {
led_work_en: led_work_en {
rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
pmic {
pmic_int: pmic_int {
rockchip,pins =
<0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
sdio-pwrseq {
wifi_enable: wifi-enable {
rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
usb {
vcc5v0_usb_host_en: vcc5v0_usb_host_en {
rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
};
vcc5v0_usb_otg_en: vcc5v0_usb_otg_en {
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
pcie {
pcie_reset_pin: pcie-reset-pin {
rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
};
vcc3v3_pcie_en_pin: vcc3v3-pcie-en-pin {
rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};
&pmu_io_domains {
pmuio1-supply = <&vcc3v3_pmu>;
pmuio2-supply = <&vcc3v3_pmu>;
vccio1-supply = <&vccio_acodec>;
vccio2-supply = <&vcc_1v8>;
vccio3-supply = <&vccio_sd>;
vccio4-supply = <&vcc_1v8>;
vccio5-supply = <&vcc_3v3>;
vccio6-supply = <&vcc_1v8>;
vccio7-supply = <&vcc_3v3>;
status = "okay";
};
&pwm4 {
status = "okay";
};
/* Required remotectl for IR receiver */
&pwm7 {
status = "disabled";
};
&saradc {
vref-supply = <&vcca_1v8>;
status = "okay";
};
&sata2 {
status = "okay";
};
/* used for eMMC */
&sdhci {
bus-width = <8>;
max-frequency = <200000000>;
mmc-hs200-1_8v;
non-removable;
pinctrl-names = "default";
pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
status = "okay";
};
/* used for microSD (TF) Slot */
&sdmmc0 {
bus-width = <4>;
cap-sd-highspeed;
cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
disable-wp;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
sd-uhs-sdr50;
vmmc-supply = <&vcc3v3_sd>;
vqmmc-supply = <&vccio_sd>;
status = "okay";
};
/* used for AP6275S WiFi */
&sdmmc2 {
bus-width = <4>;
disable-wp;
cap-sd-highspeed;
cap-sdio-irq;
keep-power-in-suspend;
mmc-pwrseq = <&sdio_pwrseq>;
non-removable;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
sd-uhs-sdr12;
sd-uhs-sdr25;
sd-uhs-sdr50;
sd-uhs-sdr104;
vmmc-supply = <&vcc3v3_sys>;
vqmmc-supply = <&vcc_1v8>;
status = "okay";
};
&spdif {
status = "okay";
};
&tsadc {
rockchip,hw-tshut-mode = <1>;
rockchip,hw-tshut-polarity = <0>;
status = "okay";
};
/* used for Debug */
&uart2 {
status = "okay";
};
&uart3 {
pinctrl-0 = <&uart3m1_xfer>;
status = "okay";
};
&uart4 {
pinctrl-0 = <&uart4m1_xfer>;
status = "okay";
};
/* used for WiFi/BT AP6275S */
&uart8 {
pinctrl-0 = <&uart8m0_xfer &uart8m0_ctsn>;
status = "okay";
};
&uart9 {
pinctrl-0 = <&uart9m1_xfer>;
status = "okay";
};
&usb_host0_ehci {
status = "okay";
};
&usb_host0_ohci {
status = "okay";
};
&usb_host0_xhci {
extcon = <&usb2phy0>;
status = "okay";
};
&usb_host1_ehci {
status = "okay";
};
&usb_host1_ohci {
status = "okay";
};
&usb_host1_xhci {
status = "okay";
};
&usb2phy0 {
status = "okay";
};
&usb2phy0_host {
phy-supply = <&vcc5v0_usb_host>;
status = "okay";
};
&usb2phy0_otg {
phy-supply = <&vcc5v0_usb_otg>;
status = "okay";
};
&usb2phy1 {
status = "okay";
};
&usb2phy1_host {
phy-supply = <&vcc5v0_usb_host>;
status = "okay";
};
&usb2phy1_otg {
phy-supply = <&vcc5v0_usb_host>;
status = "okay";
};
&vop {
assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
status = "okay";
};
&vop_mmu {
status = "okay";
};
&vp0 {
vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
reg = <ROCKCHIP_VOP2_EP_HDMI0>;
remote-endpoint = <&hdmi_in_vp0>;
};
};

View File

@ -293,6 +293,17 @@ define Device/mmbox_anas3035
endef
TARGET_DEVICES += mmbox_anas3035
define Device/ninetripod_x3568-v4
$(Device/rk3568)
DEVICE_VENDOR := NineTripod
DEVICE_MODEL := X3568
DEVICE_VARIANT := v4
DEVICE_PACKAGES := blkdiscard block-mount kmod-ata-ahci-dwc kmod-nvme kmod-hwmon-pwmfan \
kmod-input-adc-keys kmod-saradc-rockchip kmod-rtc-pcf8563 kmod-brcmfmac wpad-openssl \
brcmfmac-firmware-43752-sdio brcmfmac-nvram-43752-sdio
endef
TARGET_DEVICES += ninetripod_x3568-v4
define Device/nlnet_xiguapi-v3
$(Device/rk3568)
DEVICE_VENDOR := NLnet

View File

@ -24,7 +24,7 @@ Link: https://lore.kernel.org/all/20250216221634.364158-2-dmitry.osipenko@collab
--- a/Documentation/arch/arm64/silicon-errata.rst
+++ b/Documentation/arch/arm64/silicon-errata.rst
@@ -283,6 +283,8 @@ stable kernels.
@@ -285,6 +285,8 @@ stable kernels.
+----------------+-----------------+-----------------+-----------------------------+
| Rockchip | RK3588 | #3588001 | ROCKCHIP_ERRATUM_3588001 |
+----------------+-----------------+-----------------+-----------------------------+
@ -35,7 +35,7 @@ Link: https://lore.kernel.org/all/20250216221634.364158-2-dmitry.osipenko@collab
+----------------+-----------------+-----------------+-----------------------------+
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1295,6 +1295,15 @@ config NVIDIA_CARMEL_CNP_ERRATUM
@@ -1296,6 +1296,15 @@ config NVIDIA_CARMEL_CNP_ERRATUM
If unsure, say Y.

Some files were not shown because too many files have changed in this diff Show More