From 8c6a57905b820ce7bcda8d358a41ac8ddf504b89 Mon Sep 17 00:00:00 2001 From: QiuSimons <45143996+QiuSimons@users.noreply.github.com> Date: Wed, 17 Aug 2022 22:37:33 +0800 Subject: [PATCH 1/8] rockchip: add NanoPi R5S dummy dts for build (#9961) --- .../boot/dts/rockchip/rk3568-nanopi-r5s.dts | 821 +++++++++++++++++ .../boot/dts/rockchip/rk3568-nanopi-r5s.dts | 8 + ...-support-for-FriendlyARM-NanoPi-Neo3.patch | 3 +- ...-support-for-FriendlyARM-NanoPi-Neo3.patch | 3 +- ...FriendlyElec-NanoPi-R5S-rk3568-board.patch | 828 +----------------- ...-support-for-FriendlyARM-NanoPi-Neo3.patch | 3 +- 6 files changed, 836 insertions(+), 830 deletions(-) create mode 100644 target/linux/rockchip/files-5.19/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts create mode 100644 target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts diff --git a/target/linux/rockchip/files-5.19/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts b/target/linux/rockchip/files-5.19/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts new file mode 100644 index 0000000000000..5b3e2cb135d44 --- /dev/null +++ b/target/linux/rockchip/files-5.19/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts @@ -0,0 +1,821 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + + +/dts-v1/; +#include +#include +#include +#include +#include "rk3568.dtsi" + +/ { + model = "FriendlyElec NanoPi R5S"; + compatible = "friendlyelec,nanopi-r5s", "rockchip,rk3568"; + + aliases { + ethernet0 = &gmac0; + mmc0 = &sdmmc0; + mmc1 = &sdhci; + }; + + chosen: chosen { + stdout-path = "serial2:1500000n8"; + }; + + fan: pwm-fan { + compatible = "pwm-fan"; + cooling-levels = <0 18 102 170 255>; + #cooling-cells = <2>; + fan-supply = <&vcc5v0_sysp>; + pwms = <&pwm0 0 50000 0>; + }; + + firmware { + optee: optee { + compatible = "linaro,optee-tz"; + method = "smc"; + }; + }; + + cspmu: cspmu@fd90c000 { + compatible = "rockchip,cspmu"; + reg = <0x0 0xfd90c000 0x0 0x1000>, + <0x0 0xfd90d000 0x0 0x1000>, + <0x0 0xfd90e000 0x0 0x1000>, + <0x0 0xfd90f000 0x0 0x1000>; + }; + + gpio-key { + compatible = "gpio-key"; + pinctrl-names = "default"; + pinctrl-0 = <&key1_pin>; + + button@1 { + debounce-interval = <50>; + gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_LOW>; + wakeup-source; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + sys_led: led-sys { + gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; + label = "red:power"; + linux,default-trigger = "heartbeat"; + pinctrl-names = "default"; + pinctrl-0 = <&sys_led_pin>; + }; + + wan_led: led-wan { + gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>; + label = "green:wan"; + pinctrl-names = "default"; + pinctrl-0 = <&wan_led_pin>; + }; + + lan1_led: led-lan1 { + gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>; + label = "green:lan1"; + pinctrl-names = "default"; + pinctrl-0 = <&lan1_led_pin>; + }; + + lan2_led: led-lan2 { + gpios = <&gpio3 RK_PD7 GPIO_ACTIVE_HIGH>; + label = "green:lan2"; + pinctrl-names = "default"; + pinctrl-0 = <&lan2_led_pin>; + }; + }; + + hdmi-con { + compatible = "hdmi-connector"; + type = "a"; + + port { + hdmi_con_in: endpoint { + remote-endpoint = <&hdmi_out_con>; + }; + }; + }; + + vdd_usbc: vdd-usbc { + compatible = "regulator-fixed"; + regulator-name = "vdd_usbc"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + + vcc3v3_sys: 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 = <&vdd_usbc>; + }; + + vcc5v0_sys: 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 = <&vdd_usbc>; + }; + + pcie30_avdd0v9: 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: 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_pcie: vcc3v3-pcie-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_pcie"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + enable-active-high; + gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>; + startup-delay-us = <200000>; + vin-supply = <&vcc5v0_sys>; + }; + + vcc3v3_pcie: vcc3v3-pcie-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_pcie"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + enable-active-high; + gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; + startup-delay-us = <50000>; + vin-supply = <&vcc3v3_pcie>; + }; + + vcc3v3_ngff: vcc3v3-ngff-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_ngff"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + enable-active-high; + gpio = <&gpio4 RK_PC1 GPIO_ACTIVE_HIGH>; + startup-delay-us = <50000>; + vin-supply = <&vcc3v3_pcie>; + }; + + vcc5v0_usb: 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 = <&vdd_usbc>; + }; + + vcc5v0_usb_host: 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_sysp: vcc5v0-sysp { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_sysp"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc3v3_sys>; + }; + + vcc5v0_usb_otg: 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>; + }; +}; + +&combphy0 { + status = "okay"; +}; + +&combphy1 { + status = "okay"; +}; + +&combphy2 { + status = "okay"; +}; + +&cpu0 { + cpu-supply = <&vdd_cpu>; +}; + +&cpu1 { + cpu-supply = <&vdd_cpu>; +}; + +&cpu2 { + cpu-supply = <&vdd_cpu>; +}; + +&cpu3 { + cpu-supply = <&vdd_cpu>; +}; + +&gmac0 { + phy-mode = "rgmii"; + clock_in_out = "output"; + + snps,reset-gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + /* Reset time is 20ms, 100ms for rtl8211f */ + snps,reset-delays-us = <0 20000 100000>; + + assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>; + assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>; + + pinctrl-names = "default"; + pinctrl-0 = <&gmac0_miim + &gmac0_tx_bus2 + &gmac0_rx_bus2 + &gmac0_rgmii_clk + &gmac0_rgmii_bus>; + + tx_delay = <0x3c>; + rx_delay = <0x2f>; + + phy-handle = <&rgmii_phy0>; + 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 = ; + #clock-cells = <1>; + pinctrl-names = "default"; + pinctrl-0 = <&pmic_int>; + rockchip,system-power-controller; + 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-init-microvolt = <900000>; + 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-init-microvolt = <900000>; + 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-init-microvolt = <900000>; + 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-always-on; + 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-boot-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-always-on; + 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-always-on; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + }; +}; + + +&i2c5 { + status = "okay"; + + hym8563: hym8563@51 { + compatible = "haoyu,hym8563"; + reg = <0x51>; + pinctrl-names = "default"; + pinctrl-0 = <&rtc_int>; + interrupt-parent = <&gpio0>; + interrupts = ; + wakeup-source; + }; +}; + +&i2s0_8ch { + status = "okay"; +}; + +&i2s1_8ch { + rockchip,trcm-sync-tx-only; + status = "okay"; +}; + + +&mdio0 { + rgmii_phy0: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x1>; + interrupt-parent = <&gpio0>; + interrupts = ; + pinctrl-names = "default"; + pinctrl-0 = <&gmac_int>; + }; +}; + +&pcie30phy { + data-lanes = <1 2>; + status = "okay"; +}; + +&pcie3x1 { + num-lanes = <1>; + reset-gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&vcc3v3_ngff>; + status = "okay"; +}; + +&pcie3x2 { + num-lanes = <1>; + reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&vcc3v3_pcie>; + status = "okay"; +}; + +&pcie2x1 { + num-viewport = <4>; + reset-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>; + status = "okay"; +}; + +&pinctrl { + gpio-leds { + + sys_led_pin: sys-led-pin { + rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + wan_led_pin: wan-led-pin { + rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + lan1_led_pin: lan1-led-pin { + rockchip,pins = <3 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + lan2_led_pin: lan2-led-pin { + rockchip,pins = <3 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + gmac { + gmac_int: gmac-int { + rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + gpio-key { + key1_pin: key1-pin { + rockchip,pins = <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + pmic { + pmic_int: pmic_int { + rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + rtc { + rtc_int: rtc-int { + rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + 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>; + }; + }; +}; + +&pmu_io_domains { + pmuio1-supply = <&vcc3v3_pmu>; + pmuio2-supply = <&vcc3v3_pmu>; + vccio1-supply = <&vccio_acodec>; + vccio3-supply = <&vccio_sd>; + vccio4-supply = <&vcc_1v8>; + vccio5-supply = <&vcc_3v3>; + vccio6-supply = <&vcc_1v8>; + vccio7-supply = <&vcc_3v3>; + status = "okay"; +}; + +&pwm0 { + status = "okay"; +}; + +&pwm4 { + status = "disabled"; +}; + +&pwm5 { + status = "disabled"; +}; + +&pwm7 { + status = "disabled"; +}; + +&saradc { + vref-supply = <&vcca_1v8>; + status = "okay"; +}; + +&sata2 { + status = "disabled"; +}; + +&sdhci { + bus-width = <8>; + no-sdio; + no-sd; + non-removable; + max-frequency = <200000000>; + status = "okay"; +}; + +&sdmmc0 { + max-frequency = <150000000>; + no-sdio; + no-mmc; + bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + sd-uhs-sdr104; + vmmc-supply = <&vcc3v3_sd>; + vqmmc-supply = <&vccio_sd>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>; + status = "okay"; +}; + +&spi3 { + pinctrl-0 = <&spi3m1_pins>; + status = "disabled"; +}; + +&tsadc { + rockchip,hw-tshut-mode = <1>; + rockchip,hw-tshut-polarity = <0>; + status = "okay"; +}; + +&uart0 { + status = "disabled"; +}; + +&uart2 { + status = "okay"; +}; + +&uart7 { + pinctrl-0 = <&uart7m1_xfer>; + status = "disabled"; +}; + +&uart9 { + pinctrl-0 = <&uart9m1_xfer>; + status = "disabled"; +}; + +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci { + status = "okay"; +}; + +&usb_host0_xhci { + dr_mode = "host"; + 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 { + status = "okay"; +}; + +&usb2phy1_otg { + 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 = ; + remote-endpoint = <&hdmi_in_vp0>; + }; +}; \ No newline at end of file diff --git a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts new file mode 100644 index 0000000000000..27ed85acc9aa9 --- /dev/null +++ b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +/ { + model = "FriendlyARM NanoPi R5S"; + compatible = "friendlyarm,nanopi-r5s", "rockchip,rk3568"; +}; diff --git a/target/linux/rockchip/patches-5.10/207-rockchip-rk3328-add-support-for-FriendlyARM-NanoPi-Neo3.patch b/target/linux/rockchip/patches-5.10/207-rockchip-rk3328-add-support-for-FriendlyARM-NanoPi-Neo3.patch index b5cb9a1216613..44ed7d9cdadde 100644 --- a/target/linux/rockchip/patches-5.10/207-rockchip-rk3328-add-support-for-FriendlyARM-NanoPi-Neo3.patch +++ b/target/linux/rockchip/patches-5.10/207-rockchip-rk3328-add-support-for-FriendlyARM-NanoPi-Neo3.patch @@ -37,7 +37,7 @@ diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchi index 479906f3a..5f6ffb496 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile -@@ -3,6 +3,10 @@ +@@ -3,6 +3,11 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-doornet1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb @@ -45,6 +45,7 @@ index 479906f3a..5f6ffb496 100644 +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-r4se.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-r66s.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-station-p2.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb diff --git a/target/linux/rockchip/patches-5.15/207-rockchip-rk3328-add-support-for-FriendlyARM-NanoPi-Neo3.patch b/target/linux/rockchip/patches-5.15/207-rockchip-rk3328-add-support-for-FriendlyARM-NanoPi-Neo3.patch index be2eacbe51573..7c707d2920db4 100644 --- a/target/linux/rockchip/patches-5.15/207-rockchip-rk3328-add-support-for-FriendlyARM-NanoPi-Neo3.patch +++ b/target/linux/rockchip/patches-5.15/207-rockchip-rk3328-add-support-for-FriendlyARM-NanoPi-Neo3.patch @@ -35,7 +35,7 @@ to status_led in accordance with the board schematics. --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile -@@ -10,6 +10,10 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-od +@@ -10,6 +10,11 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-od dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-doornet1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb @@ -43,6 +43,7 @@ to status_led in accordance with the board schematics. +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-r4se.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-r66s.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-station-p2.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb diff --git a/target/linux/rockchip/patches-5.19/0052-rockchip-add-FriendlyElec-NanoPi-R5S-rk3568-board.patch b/target/linux/rockchip/patches-5.19/0052-rockchip-add-FriendlyElec-NanoPi-R5S-rk3568-board.patch index bef12c6478a28..b86b33949b8a2 100644 --- a/target/linux/rockchip/patches-5.19/0052-rockchip-add-FriendlyElec-NanoPi-R5S-rk3568-board.patch +++ b/target/linux/rockchip/patches-5.19/0052-rockchip-add-FriendlyElec-NanoPi-R5S-rk3568-board.patch @@ -6,9 +6,7 @@ Subject: [PATCH] rockchip: add FriendlyElec NanoPi R5S rk3568 board Signed-off-by: Marty Jones --- arch/arm64/boot/dts/rockchip/Makefile | 1 + - .../boot/dts/rockchip/rk3568-nanopi-r5s.dts | 821 ++++++++++++++++++ - 2 files changed, 822 insertions(+) - create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts + 1 files changed, 1 insertions(+) --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -18,827 +16,3 @@ Signed-off-by: Marty Jones dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb ---- /dev/null -+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts -@@ -0,0 +1,821 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+ -+ -+/dts-v1/; -+#include -+#include -+#include -+#include -+#include "rk3568.dtsi" -+ -+/ { -+ model = "FriendlyElec NanoPi R5S"; -+ compatible = "friendlyelec,nanopi-r5s", "rockchip,rk3568"; -+ -+ aliases { -+ ethernet0 = &gmac0; -+ mmc0 = &sdmmc0; -+ mmc1 = &sdhci; -+ }; -+ -+ chosen: chosen { -+ stdout-path = "serial2:1500000n8"; -+ }; -+ -+ fan: pwm-fan { -+ compatible = "pwm-fan"; -+ cooling-levels = <0 18 102 170 255>; -+ #cooling-cells = <2>; -+ fan-supply = <&vcc5v0_sysp>; -+ pwms = <&pwm0 0 50000 0>; -+ }; -+ -+ firmware { -+ optee: optee { -+ compatible = "linaro,optee-tz"; -+ method = "smc"; -+ }; -+ }; -+ -+ cspmu: cspmu@fd90c000 { -+ compatible = "rockchip,cspmu"; -+ reg = <0x0 0xfd90c000 0x0 0x1000>, -+ <0x0 0xfd90d000 0x0 0x1000>, -+ <0x0 0xfd90e000 0x0 0x1000>, -+ <0x0 0xfd90f000 0x0 0x1000>; -+ }; -+ -+ gpio-key { -+ compatible = "gpio-key"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&key1_pin>; -+ -+ button@1 { -+ debounce-interval = <50>; -+ gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_LOW>; -+ wakeup-source; -+ }; -+ }; -+ -+ gpio-leds { -+ compatible = "gpio-leds"; -+ -+ sys_led: led-sys { -+ gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; -+ label = "red:power"; -+ linux,default-trigger = "heartbeat"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sys_led_pin>; -+ }; -+ -+ wan_led: led-wan { -+ gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>; -+ label = "green:wan"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&wan_led_pin>; -+ }; -+ -+ lan1_led: led-lan1 { -+ gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>; -+ label = "green:lan1"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&lan1_led_pin>; -+ }; -+ -+ lan2_led: led-lan2 { -+ gpios = <&gpio3 RK_PD7 GPIO_ACTIVE_HIGH>; -+ label = "green:lan2"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&lan2_led_pin>; -+ }; -+ }; -+ -+ hdmi-con { -+ compatible = "hdmi-connector"; -+ type = "a"; -+ -+ port { -+ hdmi_con_in: endpoint { -+ remote-endpoint = <&hdmi_out_con>; -+ }; -+ }; -+ }; -+ -+ vdd_usbc: vdd-usbc { -+ compatible = "regulator-fixed"; -+ regulator-name = "vdd_usbc"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ }; -+ -+ vcc3v3_sys: 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 = <&vdd_usbc>; -+ }; -+ -+ vcc5v0_sys: 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 = <&vdd_usbc>; -+ }; -+ -+ pcie30_avdd0v9: 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: 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_pcie: vcc3v3-pcie-regulator { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc3v3_pcie"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ enable-active-high; -+ gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>; -+ startup-delay-us = <200000>; -+ vin-supply = <&vcc5v0_sys>; -+ }; -+ -+ vcc3v3_pcie: vcc3v3-pcie-regulator { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc3v3_pcie"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ enable-active-high; -+ gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; -+ startup-delay-us = <50000>; -+ vin-supply = <&vcc3v3_pcie>; -+ }; -+ -+ vcc3v3_ngff: vcc3v3-ngff-regulator { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc3v3_ngff"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ enable-active-high; -+ gpio = <&gpio4 RK_PC1 GPIO_ACTIVE_HIGH>; -+ startup-delay-us = <50000>; -+ vin-supply = <&vcc3v3_pcie>; -+ }; -+ -+ vcc5v0_usb: 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 = <&vdd_usbc>; -+ }; -+ -+ vcc5v0_usb_host: 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_sysp: vcc5v0-sysp { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc5v0_sysp"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ vin-supply = <&vcc3v3_sys>; -+ }; -+ -+ vcc5v0_usb_otg: 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>; -+ }; -+}; -+ -+&combphy0 { -+ status = "okay"; -+}; -+ -+&combphy1 { -+ status = "okay"; -+}; -+ -+&combphy2 { -+ status = "okay"; -+}; -+ -+&cpu0 { -+ cpu-supply = <&vdd_cpu>; -+}; -+ -+&cpu1 { -+ cpu-supply = <&vdd_cpu>; -+}; -+ -+&cpu2 { -+ cpu-supply = <&vdd_cpu>; -+}; -+ -+&cpu3 { -+ cpu-supply = <&vdd_cpu>; -+}; -+ -+&gmac0 { -+ phy-mode = "rgmii"; -+ clock_in_out = "output"; -+ -+ snps,reset-gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_LOW>; -+ snps,reset-active-low; -+ /* Reset time is 20ms, 100ms for rtl8211f */ -+ snps,reset-delays-us = <0 20000 100000>; -+ -+ assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>; -+ assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&gmac0_miim -+ &gmac0_tx_bus2 -+ &gmac0_rx_bus2 -+ &gmac0_rgmii_clk -+ &gmac0_rgmii_bus>; -+ -+ tx_delay = <0x3c>; -+ rx_delay = <0x2f>; -+ -+ phy-handle = <&rgmii_phy0>; -+ 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 = ; -+ #clock-cells = <1>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pmic_int>; -+ rockchip,system-power-controller; -+ 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-init-microvolt = <900000>; -+ 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-init-microvolt = <900000>; -+ 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-init-microvolt = <900000>; -+ 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-always-on; -+ 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-boot-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-always-on; -+ 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-always-on; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ }; -+ }; -+}; -+ -+ -+&i2c5 { -+ status = "okay"; -+ -+ hym8563: hym8563@51 { -+ compatible = "haoyu,hym8563"; -+ reg = <0x51>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&rtc_int>; -+ interrupt-parent = <&gpio0>; -+ interrupts = ; -+ wakeup-source; -+ }; -+}; -+ -+&i2s0_8ch { -+ status = "okay"; -+}; -+ -+&i2s1_8ch { -+ rockchip,trcm-sync-tx-only; -+ status = "okay"; -+}; -+ -+ -+&mdio0 { -+ rgmii_phy0: ethernet-phy@1 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <0x1>; -+ interrupt-parent = <&gpio0>; -+ interrupts = ; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&gmac_int>; -+ }; -+}; -+ -+&pcie30phy { -+ data-lanes = <1 2>; -+ status = "okay"; -+}; -+ -+&pcie3x1 { -+ num-lanes = <1>; -+ reset-gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>; -+ vpcie3v3-supply = <&vcc3v3_ngff>; -+ status = "okay"; -+}; -+ -+&pcie3x2 { -+ num-lanes = <1>; -+ reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>; -+ vpcie3v3-supply = <&vcc3v3_pcie>; -+ status = "okay"; -+}; -+ -+&pcie2x1 { -+ num-viewport = <4>; -+ reset-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>; -+ status = "okay"; -+}; -+ -+&pinctrl { -+ gpio-leds { -+ -+ sys_led_pin: sys-led-pin { -+ rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ wan_led_pin: wan-led-pin { -+ rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ lan1_led_pin: lan1-led-pin { -+ rockchip,pins = <3 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ lan2_led_pin: lan2-led-pin { -+ rockchip,pins = <3 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+ -+ gmac { -+ gmac_int: gmac-int { -+ rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ }; -+ -+ gpio-key { -+ key1_pin: key1-pin { -+ rockchip,pins = <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ }; -+ -+ pmic { -+ pmic_int: pmic_int { -+ rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ }; -+ -+ rtc { -+ rtc_int: rtc-int { -+ rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ }; -+ -+ 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>; -+ }; -+ }; -+}; -+ -+&pmu_io_domains { -+ pmuio1-supply = <&vcc3v3_pmu>; -+ pmuio2-supply = <&vcc3v3_pmu>; -+ vccio1-supply = <&vccio_acodec>; -+ vccio3-supply = <&vccio_sd>; -+ vccio4-supply = <&vcc_1v8>; -+ vccio5-supply = <&vcc_3v3>; -+ vccio6-supply = <&vcc_1v8>; -+ vccio7-supply = <&vcc_3v3>; -+ status = "okay"; -+}; -+ -+&pwm0 { -+ status = "okay"; -+}; -+ -+&pwm4 { -+ status = "disabled"; -+}; -+ -+&pwm5 { -+ status = "disabled"; -+}; -+ -+&pwm7 { -+ status = "disabled"; -+}; -+ -+&saradc { -+ vref-supply = <&vcca_1v8>; -+ status = "okay"; -+}; -+ -+&sata2 { -+ status = "disabled"; -+}; -+ -+&sdhci { -+ bus-width = <8>; -+ no-sdio; -+ no-sd; -+ non-removable; -+ max-frequency = <200000000>; -+ status = "okay"; -+}; -+ -+&sdmmc0 { -+ max-frequency = <150000000>; -+ no-sdio; -+ no-mmc; -+ bus-width = <4>; -+ cap-mmc-highspeed; -+ cap-sd-highspeed; -+ disable-wp; -+ sd-uhs-sdr104; -+ vmmc-supply = <&vcc3v3_sd>; -+ vqmmc-supply = <&vccio_sd>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>; -+ status = "okay"; -+}; -+ -+&spi3 { -+ pinctrl-0 = <&spi3m1_pins>; -+ status = "disabled"; -+}; -+ -+&tsadc { -+ rockchip,hw-tshut-mode = <1>; -+ rockchip,hw-tshut-polarity = <0>; -+ status = "okay"; -+}; -+ -+&uart0 { -+ status = "disabled"; -+}; -+ -+&uart2 { -+ status = "okay"; -+}; -+ -+&uart7 { -+ pinctrl-0 = <&uart7m1_xfer>; -+ status = "disabled"; -+}; -+ -+&uart9 { -+ pinctrl-0 = <&uart9m1_xfer>; -+ status = "disabled"; -+}; -+ -+&usb_host0_ehci { -+ status = "okay"; -+}; -+ -+&usb_host0_ohci { -+ status = "okay"; -+}; -+ -+&usb_host0_xhci { -+ dr_mode = "host"; -+ 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 { -+ status = "okay"; -+}; -+ -+&usb2phy1_otg { -+ 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 = ; -+ remote-endpoint = <&hdmi_in_vp0>; -+ }; -+}; diff --git a/target/linux/rockchip/patches-5.4/207-rockchip-rk3328-add-support-for-FriendlyARM-NanoPi-Neo3.patch b/target/linux/rockchip/patches-5.4/207-rockchip-rk3328-add-support-for-FriendlyARM-NanoPi-Neo3.patch index 6d5493536dee6..c5dd9b8353ac5 100644 --- a/target/linux/rockchip/patches-5.4/207-rockchip-rk3328-add-support-for-FriendlyARM-NanoPi-Neo3.patch +++ b/target/linux/rockchip/patches-5.4/207-rockchip-rk3328-add-support-for-FriendlyARM-NanoPi-Neo3.patch @@ -35,7 +35,7 @@ to status_led in accordance with the board schematics. --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile -@@ -4,6 +4,10 @@ +@@ -4,6 +4,11 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb @@ -43,6 +43,7 @@ to status_led in accordance with the board schematics. +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-r4se.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-r66s.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-station-p2.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus-lts.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb From 155fd1750e5f3203212b4423c69252a8577ac47c Mon Sep 17 00:00:00 2001 From: umarizulkifli Date: Wed, 17 Aug 2022 22:38:44 +0800 Subject: [PATCH 2/8] package: add realtek r8101 driver (#9964) * add: r8101 * update: Makefile * update: v1.037.01 * update: v1.037.01 --- package/lean/r8101/Makefile | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 package/lean/r8101/Makefile diff --git a/package/lean/r8101/Makefile b/package/lean/r8101/Makefile new file mode 100644 index 0000000000000..53156fcab116b --- /dev/null +++ b/package/lean/r8101/Makefile @@ -0,0 +1,48 @@ +# +# Download realtek r8101 linux driver from official site: +# [https://www.realtek.com/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software] +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +# SPDX-License-Identifier: GPL-3.0-only +# +# Copyright (C) 2022 ImmortalWrt.org + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=r8101 +PKG_VERSION:=1.037.01 +PKG_RELEASE:=$(AUTORELEASE) + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://github.com/umarizulkifli/r8101/blob/main/r8101-1.037.01.tar.bz2 +PKG_HASH:=45b3ae6af31054879b06c13ce4f0fb14 +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_MAINTAINER:=umarizulkifli +PKG_LICENSE:=GPL-2.0-only + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/r8101 + TITLE:=Driver for Realtek r8101 chipsets + SUBMENU:=Network Devices + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) + DEPENDS:=@PCI_SUPPORT + FILES:= $(PKG_BUILD_DIR)/src/r8101.ko + AUTOLOAD:=$(call AutoProbe,r8101) +endef + +define Package/r8101/description + This package contains a driver for Realtek r8101 chipsets. +endef + +define Build/Compile + +$(KERNEL_MAKE) M=$(PKG_BUILD_DIR)/src modules +endef + +$(eval $(call KernelPackage,r8101)) + From 5c200342a7bcb5c790ff9aa6aecdc41920ef45a4 Mon Sep 17 00:00:00 2001 From: lean Date: Wed, 17 Aug 2022 23:21:20 +0800 Subject: [PATCH 3/8] kernel: bump 5.19 to 5.19.2 --- include/kernel-5.19 | 4 +-- ...2-unlock-on-error-path-in-vop2_crtc_.patch | 27 -------------- ...-an-error-handling-path-rockchip_dp_.patch | 36 ------------------- ...hip-inno-usb2-Sync-initial-otg-state.patch | 33 ----------------- ...no-usb2-Ignore-OTG-IRQs-in-host-mode.patch | 34 ------------------ 5 files changed, 2 insertions(+), 132 deletions(-) delete mode 100644 target/linux/rockchip/patches-5.19/0037-drm-rockchip-vop2-unlock-on-error-path-in-vop2_crtc_.patch delete mode 100644 target/linux/rockchip/patches-5.19/0040-drm-rockchip-Fix-an-error-handling-path-rockchip_dp_.patch delete mode 100644 target/linux/rockchip/patches-5.19/0043-phy-rockchip-inno-usb2-Sync-initial-otg-state.patch delete mode 100644 target/linux/rockchip/patches-5.19/0049-phy-rockchip-inno-usb2-Ignore-OTG-IRQs-in-host-mode.patch diff --git a/include/kernel-5.19 b/include/kernel-5.19 index 54d34cae0651f..4fa1e988c0fda 100644 --- a/include/kernel-5.19 +++ b/include/kernel-5.19 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.19 = .1 -LINUX_KERNEL_HASH-5.19.1 = f4e27b926ea2c66b808db1f5706254cf92a8899e2108eedb0c3a7d12499aea55 +LINUX_VERSION-5.19 = .2 +LINUX_KERNEL_HASH-5.19.2 = 48e40a1f5501ec6c40e3c86d3d5319200b688f2d9360f72833084d74801fe63d diff --git a/target/linux/rockchip/patches-5.19/0037-drm-rockchip-vop2-unlock-on-error-path-in-vop2_crtc_.patch b/target/linux/rockchip/patches-5.19/0037-drm-rockchip-vop2-unlock-on-error-path-in-vop2_crtc_.patch deleted file mode 100644 index 44b785076bfd8..0000000000000 --- a/target/linux/rockchip/patches-5.19/0037-drm-rockchip-vop2-unlock-on-error-path-in-vop2_crtc_.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 118f07ebcff85e505941b9806171d2fab0cb7b8e Mon Sep 17 00:00:00 2001 -From: Dan Carpenter -Date: Mon, 9 May 2022 12:05:05 +0300 -Subject: [PATCH 37/51] drm/rockchip: vop2: unlock on error path in - vop2_crtc_atomic_enable() - -This error path needs an unlock before returning. - -Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver") -Signed-off-by: Dan Carpenter -Acked-by: Sascha Hauer -Signed-off-by: Heiko Stuebner -Link: https://patchwork.freedesktop.org/patch/msgid/YnjZQRV9lpub2ET8@kili ---- - drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c -+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c -@@ -1524,6 +1524,7 @@ static void vop2_crtc_atomic_enable(stru - if (ret < 0) { - drm_err(vop2->drm, "failed to enable dclk for video port%d - %d\n", - vp->id, ret); -+ vop2_unlock(vop2); - return; - } - diff --git a/target/linux/rockchip/patches-5.19/0040-drm-rockchip-Fix-an-error-handling-path-rockchip_dp_.patch b/target/linux/rockchip/patches-5.19/0040-drm-rockchip-Fix-an-error-handling-path-rockchip_dp_.patch deleted file mode 100644 index 9843250604df7..0000000000000 --- a/target/linux/rockchip/patches-5.19/0040-drm-rockchip-Fix-an-error-handling-path-rockchip_dp_.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 189fcc50d8531f4904a96aac754fd61c26c4dd3c Mon Sep 17 00:00:00 2001 -From: Christophe JAILLET -Date: Sat, 18 Jun 2022 19:08:05 +0200 -Subject: [PATCH 40/51] drm/rockchip: Fix an error handling path - rockchip_dp_probe() - -Should component_add() fail, we should call analogix_dp_remove() in the -error handling path, as already done in the remove function. - -Fixes: 152cce0006ab ("drm/bridge: analogix_dp: Split bind() into probe() and real bind()") -Signed-off-by: Christophe JAILLET -Signed-off-by: Heiko Stuebner -Link: https://patchwork.freedesktop.org/patch/msgid/b719d9061bb97eb85145fbd3c5e63f4549f2e13e.1655572071.git.christophe.jaillet@wanadoo.fr ---- - drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - ---- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c -+++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c -@@ -408,7 +408,15 @@ static int rockchip_dp_probe(struct plat - if (IS_ERR(dp->adp)) - return PTR_ERR(dp->adp); - -- return component_add(dev, &rockchip_dp_component_ops); -+ ret = component_add(dev, &rockchip_dp_component_ops); -+ if (ret) -+ goto err_dp_remove; -+ -+ return 0; -+ -+err_dp_remove: -+ analogix_dp_remove(dp->adp); -+ return ret; - } - - static int rockchip_dp_remove(struct platform_device *pdev) diff --git a/target/linux/rockchip/patches-5.19/0043-phy-rockchip-inno-usb2-Sync-initial-otg-state.patch b/target/linux/rockchip/patches-5.19/0043-phy-rockchip-inno-usb2-Sync-initial-otg-state.patch deleted file mode 100644 index 2435844a0a3e8..0000000000000 --- a/target/linux/rockchip/patches-5.19/0043-phy-rockchip-inno-usb2-Sync-initial-otg-state.patch +++ /dev/null @@ -1,33 +0,0 @@ -From c65316cf05c7597c0d8dc23373b840aafd34ffb8 Mon Sep 17 00:00:00 2001 -From: Peter Geis -Date: Tue, 21 Jun 2022 20:31:40 -0400 -Subject: [PATCH 43/51] phy: rockchip-inno-usb2: Sync initial otg state - -The initial otg state for the phy defaults to device mode. The actual -state isn't detected until an ID IRQ fires. Fix this by syncing the ID -state during initialization. - -Fixes: 51a9b2c03dd3 ("phy: rockchip-inno-usb2: Handle ID IRQ") -Signed-off-by: Peter Geis -Reviewed-by: Samuel Holland -Link: https://lore.kernel.org/r/20220622003140.30365-1-pgwipeout@gmail.com -Signed-off-by: Vinod Koul ---- - drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 6 ++++++ - 1 file changed, 6 insertions(+) - ---- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c -+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c -@@ -1162,6 +1162,12 @@ static int rockchip_usb2phy_otg_port_ini - EXTCON_USB_HOST, &rport->event_nb); - if (ret) - dev_err(rphy->dev, "register USB HOST notifier failed\n"); -+ -+ if (!of_property_read_bool(rphy->dev->of_node, "extcon")) { -+ /* do initial sync of usb state */ -+ ret = property_enabled(rphy->grf, &rport->port_cfg->utmi_id); -+ extcon_set_state_sync(rphy->edev, EXTCON_USB_HOST, !ret); -+ } - } - - out: diff --git a/target/linux/rockchip/patches-5.19/0049-phy-rockchip-inno-usb2-Ignore-OTG-IRQs-in-host-mode.patch b/target/linux/rockchip/patches-5.19/0049-phy-rockchip-inno-usb2-Ignore-OTG-IRQs-in-host-mode.patch deleted file mode 100644 index 575a59b6ffe8e..0000000000000 --- a/target/linux/rockchip/patches-5.19/0049-phy-rockchip-inno-usb2-Ignore-OTG-IRQs-in-host-mode.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 3ddee7849f0ab4b4edcc812c6569236b53796640 Mon Sep 17 00:00:00 2001 -From: Samuel Holland -Date: Fri, 8 Jul 2022 01:14:34 -0500 -Subject: [PATCH 49/51] phy: rockchip-inno-usb2: Ignore OTG IRQs in host mode - -When the OTG port is fixed to host mode, the driver does not request its -IRQs, nor does it enable those IRQs in hardware. Similarly, the driver -should ignore the OTG port IRQs when handling the shared interrupt. - -Otherwise, it would update the extcon based on an ID pin which may be in -an undefined state, or try to queue a uninitialized work item. - -Fixes: 6a98df08ccd5 ("phy: rockchip-inno-usb2: Fix muxed interrupt support") -Reported-by: Frank Wunderlich -Signed-off-by: Samuel Holland -Tested-by: Frank Wunderlich -Tested-by: Peter Geis ---- - drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - ---- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c -+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c -@@ -978,7 +978,9 @@ static irqreturn_t rockchip_usb2phy_irq( - - switch (rport->port_id) { - case USB2PHY_PORT_OTG: -- ret |= rockchip_usb2phy_otg_mux_irq(irq, rport); -+ if (rport->mode != USB_DR_MODE_HOST && -+ rport->mode != USB_DR_MODE_UNKNOWN) -+ ret |= rockchip_usb2phy_otg_mux_irq(irq, rport); - break; - case USB2PHY_PORT_HOST: - ret |= rockchip_usb2phy_linestate_irq(irq, rport); From 85c2ce64c5440ebf7a9e9065a947f8df31af8df6 Mon Sep 17 00:00:00 2001 From: lean Date: Wed, 17 Aug 2022 23:38:06 +0800 Subject: [PATCH 4/8] mt76: add 5.19 kernel support --- package/kernel/mt76/Makefile | 2 +- .../mt76/patches/090.backport-to-linux-5.19.patch | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 package/kernel/mt76/patches/090.backport-to-linux-5.19.patch diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 354449b810e18..e630074929ce6 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mt76 -PKG_RELEASE=4 +PKG_RELEASE=5 PKG_LICENSE:=GPLv2 PKG_LICENSE_FILES:= diff --git a/package/kernel/mt76/patches/090.backport-to-linux-5.19.patch b/package/kernel/mt76/patches/090.backport-to-linux-5.19.patch new file mode 100644 index 0000000000000..44a14950ad84a --- /dev/null +++ b/package/kernel/mt76/patches/090.backport-to-linux-5.19.patch @@ -0,0 +1,14 @@ +--- a/usb.c ++++ b/usb.c +@@ -1068,7 +1068,11 @@ + + INIT_WORK(&usb->stat_work, mt76u_tx_status_data); + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0) + usb->data_len = usb_maxpacket(udev, usb_sndctrlpipe(udev, 0), 1); ++#else ++ usb->data_len = usb_maxpacket(udev, usb_sndctrlpipe(udev, 0)); ++#endif + if (usb->data_len < 32) + usb->data_len = 32; + From 3c0774cf8f4cfef2afe9ef2b2ba5b072b20d6bfb Mon Sep 17 00:00:00 2001 From: lean Date: Wed, 17 Aug 2022 23:45:26 +0800 Subject: [PATCH 5/8] mt76: mt7921e: fix crash in chip reset fail on rockchip 5.19 kernel --- ...10.bypass-werror.patch => 010-bypass-werror.patch} | 0 .../patches/020-fix-crash-in-chip-reset-fail.patch | 11 +++++++++++ ...ux-5.19.patch => 090-backport-to-linux-5.19.patch} | 0 3 files changed, 11 insertions(+) rename package/kernel/mt76/patches/{010.bypass-werror.patch => 010-bypass-werror.patch} (100%) create mode 100644 package/kernel/mt76/patches/020-fix-crash-in-chip-reset-fail.patch rename package/kernel/mt76/patches/{090.backport-to-linux-5.19.patch => 090-backport-to-linux-5.19.patch} (100%) diff --git a/package/kernel/mt76/patches/010.bypass-werror.patch b/package/kernel/mt76/patches/010-bypass-werror.patch similarity index 100% rename from package/kernel/mt76/patches/010.bypass-werror.patch rename to package/kernel/mt76/patches/010-bypass-werror.patch diff --git a/package/kernel/mt76/patches/020-fix-crash-in-chip-reset-fail.patch b/package/kernel/mt76/patches/020-fix-crash-in-chip-reset-fail.patch new file mode 100644 index 0000000000000..2777d142e3e32 --- /dev/null +++ b/package/kernel/mt76/patches/020-fix-crash-in-chip-reset-fail.patch @@ -0,0 +1,11 @@ +--- a/mt7921/pci_mac.c ++++ b/mt7921/pci_mac.c +@@ -261,7 +261,7 @@ int mt7921e_mac_reset(struct mt7921_dev *dev) + + err = mt7921e_driver_own(dev); + if (err) +- return err; ++ goto out; + + err = mt7921_run_firmware(dev); + if (err) diff --git a/package/kernel/mt76/patches/090.backport-to-linux-5.19.patch b/package/kernel/mt76/patches/090-backport-to-linux-5.19.patch similarity index 100% rename from package/kernel/mt76/patches/090.backport-to-linux-5.19.patch rename to package/kernel/mt76/patches/090-backport-to-linux-5.19.patch From 4bb5934feea593b02902efbd14e0241b0206d3cc Mon Sep 17 00:00:00 2001 From: benihi <88561480+benihi@users.noreply.github.com> Date: Wed, 17 Aug 2022 14:15:32 -0400 Subject: [PATCH 6/8] kernel: 5.19: refresh patches (#9966) Delete: target/linux/rockchip/patches-5.19/0039-drm-rockchip-vop-Don-t-crash-for-invalid-duplicate_s.patch [1] [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.19.y&id=4d8f078e12a8e038ffb9bbb91c5603d6b53ff532 --- .../backport-5.19/002-struct-net_device.patch | 2 +- .../800-GPIO-add-named-gpio-exports.patch | 2 +- .../hack-5.19/904-debloat_dma_buf.patch | 2 +- ...e_mem_map-with-ARCH_PFN_OFFSET-calcu.patch | 2 +- ...t-add-of_match_table-with-DT-binding.patch | 2 +- .../pending-5.19/420-mtd-redboot_space.patch | 2 +- .../811-pci_disable_usb_common_quirks.patch | 2 +- .../pending-5.19/920-mangle_bootargs.patch | 4 +-- ...-Don-t-crash-for-invalid-duplicate_s.patch | 33 ------------------- ...o-usb2-Prevent-incorrect-error-on-pr.patch | 2 +- ...o-rockchip-permit-to-pass-self-tests.patch | 2 +- 11 files changed, 11 insertions(+), 44 deletions(-) delete mode 100644 target/linux/rockchip/patches-5.19/0039-drm-rockchip-vop-Don-t-crash-for-invalid-duplicate_s.patch diff --git a/target/linux/generic/backport-5.19/002-struct-net_device.patch b/target/linux/generic/backport-5.19/002-struct-net_device.patch index 6d6cf20aff659..1a2e54da94386 100644 --- a/target/linux/generic/backport-5.19/002-struct-net_device.patch +++ b/target/linux/generic/backport-5.19/002-struct-net_device.patch @@ -32,7 +32,7 @@ #endif --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -8006,9 +8006,7 @@ int cfg80211_register_netdevice(struct n +@@ -8085,9 +8085,7 @@ int cfg80211_register_netdevice(struct n */ static inline void cfg80211_unregister_netdevice(struct net_device *dev) { diff --git a/target/linux/generic/hack-5.19/800-GPIO-add-named-gpio-exports.patch b/target/linux/generic/hack-5.19/800-GPIO-add-named-gpio-exports.patch index 6ed20176d41a2..898bd53cb989c 100644 --- a/target/linux/generic/hack-5.19/800-GPIO-add-named-gpio-exports.patch +++ b/target/linux/generic/hack-5.19/800-GPIO-add-named-gpio-exports.patch @@ -15,7 +15,7 @@ Signed-off-by: John Crispin #include "gpiolib.h" #include "gpiolib-of.h" -@@ -1057,3 +1059,72 @@ void of_gpio_dev_init(struct gpio_chip * +@@ -1059,3 +1061,72 @@ void of_gpio_dev_init(struct gpio_chip * else gc->of_node = gdev->dev.of_node; } diff --git a/target/linux/generic/hack-5.19/904-debloat_dma_buf.patch b/target/linux/generic/hack-5.19/904-debloat_dma_buf.patch index 5163d5f382587..bab1b22f6a8b4 100644 --- a/target/linux/generic/hack-5.19/904-debloat_dma_buf.patch +++ b/target/linux/generic/hack-5.19/904-debloat_dma_buf.patch @@ -73,7 +73,7 @@ Signed-off-by: Felix Fietkau +MODULE_LICENSE("GPL"); --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -4284,6 +4284,7 @@ int wake_up_state(struct task_struct *p, +@@ -4293,6 +4293,7 @@ int wake_up_state(struct task_struct *p, { return try_to_wake_up(p, state, 0); } diff --git a/target/linux/generic/pending-5.19/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/pending-5.19/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch index 3bdfb9baa9f48..7adb2c7be3e1e 100644 --- a/target/linux/generic/pending-5.19/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch +++ b/target/linux/generic/pending-5.19/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch @@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -7702,7 +7702,7 @@ static void __init alloc_node_mem_map(st +@@ -7698,7 +7698,7 @@ static void __init alloc_node_mem_map(st if (pgdat == NODE_DATA(0)) { mem_map = NODE_DATA(0)->node_mem_map; if (page_to_pfn(mem_map) != pgdat->node_start_pfn) diff --git a/target/linux/generic/pending-5.19/419-mtd-redboot-add-of_match_table-with-DT-binding.patch b/target/linux/generic/pending-5.19/419-mtd-redboot-add-of_match_table-with-DT-binding.patch index 3d176f85635de..ade36033ddd65 100644 --- a/target/linux/generic/pending-5.19/419-mtd-redboot-add-of_match_table-with-DT-binding.patch +++ b/target/linux/generic/pending-5.19/419-mtd-redboot-add-of_match_table-with-DT-binding.patch @@ -12,7 +12,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/mtd/parsers/redboot.c +++ b/drivers/mtd/parsers/redboot.c -@@ -304,6 +304,7 @@ nogood: +@@ -305,6 +305,7 @@ nogood: static const struct of_device_id mtd_parser_redboot_of_match_table[] = { { .compatible = "redboot-fis" }, diff --git a/target/linux/generic/pending-5.19/420-mtd-redboot_space.patch b/target/linux/generic/pending-5.19/420-mtd-redboot_space.patch index fee193659334a..5518ea71dd51f 100644 --- a/target/linux/generic/pending-5.19/420-mtd-redboot_space.patch +++ b/target/linux/generic/pending-5.19/420-mtd-redboot_space.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/mtd/parsers/redboot.c +++ b/drivers/mtd/parsers/redboot.c -@@ -277,14 +277,21 @@ nogood: +@@ -278,14 +278,21 @@ nogood: #endif names += strlen(names) + 1; diff --git a/target/linux/generic/pending-5.19/811-pci_disable_usb_common_quirks.patch b/target/linux/generic/pending-5.19/811-pci_disable_usb_common_quirks.patch index 67406bac84c09..b498d9f700a91 100644 --- a/target/linux/generic/pending-5.19/811-pci_disable_usb_common_quirks.patch +++ b/target/linux/generic/pending-5.19/811-pci_disable_usb_common_quirks.patch @@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau #endif /* __LINUX_USB_PCI_QUIRKS_H */ --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h -@@ -497,7 +497,14 @@ extern int usb_hcd_pci_probe(struct pci_ +@@ -498,7 +498,14 @@ extern int usb_hcd_pci_probe(struct pci_ extern void usb_hcd_pci_remove(struct pci_dev *dev); extern void usb_hcd_pci_shutdown(struct pci_dev *dev); diff --git a/target/linux/generic/pending-5.19/920-mangle_bootargs.patch b/target/linux/generic/pending-5.19/920-mangle_bootargs.patch index e83247b8a8432..30d5de253bb8d 100644 --- a/target/linux/generic/pending-5.19/920-mangle_bootargs.patch +++ b/target/linux/generic/pending-5.19/920-mangle_bootargs.patch @@ -31,7 +31,7 @@ Signed-off-by: Imre Kaloz help --- a/init/main.c +++ b/init/main.c -@@ -606,6 +606,29 @@ static inline void setup_nr_cpu_ids(void +@@ -607,6 +607,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 /* * We need to store the untouched command line for future reference. * We also need to store the touched command line since the parameter -@@ -949,6 +972,7 @@ asmlinkage __visible void __init __no_sa +@@ -950,6 +973,7 @@ asmlinkage __visible void __init __no_sa pr_notice("%s", linux_banner); early_security_init(); setup_arch(&command_line); diff --git a/target/linux/rockchip/patches-5.19/0039-drm-rockchip-vop-Don-t-crash-for-invalid-duplicate_s.patch b/target/linux/rockchip/patches-5.19/0039-drm-rockchip-vop-Don-t-crash-for-invalid-duplicate_s.patch deleted file mode 100644 index 4bc1c5b6cf928..0000000000000 --- a/target/linux/rockchip/patches-5.19/0039-drm-rockchip-vop-Don-t-crash-for-invalid-duplicate_s.patch +++ /dev/null @@ -1,33 +0,0 @@ -From efaa0a55ce429107697f641921336cc51518693a Mon Sep 17 00:00:00 2001 -From: Brian Norris -Date: Fri, 17 Jun 2022 17:26:52 -0700 -Subject: [PATCH 39/51] drm/rockchip: vop: Don't crash for invalid - duplicate_state() - -It's possible for users to try to duplicate the CRTC state even when the -state doesn't exist. drm_atomic_helper_crtc_duplicate_state() (and other -users of __drm_atomic_helper_crtc_duplicate_state()) already guard this -with a WARN_ON() instead of crashing, so let's do that here too. - -Fixes: 4e257d9eee23 ("drm/rockchip: get rid of rockchip_drm_crtc_mode_config") -Signed-off-by: Brian Norris -Reviewed-by: Sean Paul -Reviewed-by: Douglas Anderson -Signed-off-by: Heiko Stuebner -Link: https://patchwork.freedesktop.org/patch/msgid/20220617172623.1.I62db228170b1559ada60b8d3e1637e1688424926@changeid ---- - drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c -+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c -@@ -1570,6 +1570,9 @@ static struct drm_crtc_state *vop_crtc_d - { - struct rockchip_crtc_state *rockchip_state; - -+ if (WARN_ON(!crtc->state)) -+ return NULL; -+ - rockchip_state = kzalloc(sizeof(*rockchip_state), GFP_KERNEL); - if (!rockchip_state) - return NULL; diff --git a/target/linux/rockchip/patches-5.19/0042-phy-rockchip-inno-usb2-Prevent-incorrect-error-on-pr.patch b/target/linux/rockchip/patches-5.19/0042-phy-rockchip-inno-usb2-Prevent-incorrect-error-on-pr.patch index 09ce9f00a1660..429d33f41fd04 100644 --- a/target/linux/rockchip/patches-5.19/0042-phy-rockchip-inno-usb2-Prevent-incorrect-error-on-pr.patch +++ b/target/linux/rockchip/patches-5.19/0042-phy-rockchip-inno-usb2-Prevent-incorrect-error-on-pr.patch @@ -17,7 +17,7 @@ Signed-off-by: Vinod Koul --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c -@@ -1283,7 +1283,7 @@ static int rockchip_usb2phy_probe(struct +@@ -1291,7 +1291,7 @@ static int rockchip_usb2phy_probe(struct phy = devm_phy_create(dev, child_np, &rockchip_usb2phy_ops); if (IS_ERR(phy)) { diff --git a/target/linux/rockchip/patches-5.19/0903-crypto-rockchip-permit-to-pass-self-tests.patch b/target/linux/rockchip/patches-5.19/0903-crypto-rockchip-permit-to-pass-self-tests.patch index 5be8c13e21ca9..6710b0efb5d4f 100644 --- a/target/linux/rockchip/patches-5.19/0903-crypto-rockchip-permit-to-pass-self-tests.patch +++ b/target/linux/rockchip/patches-5.19/0903-crypto-rockchip-permit-to-pass-self-tests.patch @@ -2165,7 +2165,7 @@ Signed-off-by: Corentin Labbe depends on ZYNQMP_FIRMWARE || COMPILE_TEST --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17300,6 +17300,13 @@ F: Documentation/ABI/*/sysfs-driver-hid- +@@ -17295,6 +17295,13 @@ F: Documentation/ABI/*/sysfs-driver-hid- F: drivers/hid/hid-roccat* F: include/linux/hid-roccat* From af9ce82e108841f918150a5048c573cdb196f50c Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Tue, 16 Aug 2022 23:38:52 +0200 Subject: [PATCH 7/8] iproute2: Fix KERNEL_INCLUDE in SDK In the SDK the folder $(LINUX_DIR)/user_headers/include does not exist, but it more or less contains the same content as $(LINUX_DIR)/include/uapi which also exists in the SDK. Since iproute2 commit 1d819dcc741e ("configure: fix parsing issue on include_dir option") it checks if this folder exists and aborts the build if it does not exists. https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=1d819dcc741e25958190e31f8186c940713fa0a8 With this commit the KERNEL_INCLUDE variable points to a valid folder with the kernel include headers. I am not sure if they are actually needed because the build worked before even with an invalid path. Signed-off-by: Hauke Mehrtens --- package/network/utils/iproute2/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 5439c050c1b59..4c21d4d877ce0 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -176,7 +176,7 @@ TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny MAKE_FLAGS += \ - KERNEL_INCLUDE="$(LINUX_DIR)/user_headers/include" \ + KERNEL_INCLUDE="$(LINUX_DIR)/include/uapi" \ SHARED_LIBS=$(SHARED_LIBS) \ IP_CONFIG_TINY=$(IP_CONFIG_TINY) \ BUILD_VARIANT=$(BUILD_VARIANT) \ From 956f36403ab3a6708cb56da369bdbab74c93a62b Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Mon, 15 Aug 2022 23:10:06 +0800 Subject: [PATCH 8/8] r8101: remove duplicate code --- package/lean/r8101/Makefile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/package/lean/r8101/Makefile b/package/lean/r8101/Makefile index 53156fcab116b..484aa30361dd6 100644 --- a/package/lean/r8101/Makefile +++ b/package/lean/r8101/Makefile @@ -6,13 +6,6 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -# SPDX-License-Identifier: GPL-3.0-only -# -# Copyright (C) 2022 ImmortalWrt.org - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - PKG_NAME:=r8101 PKG_VERSION:=1.037.01 PKG_RELEASE:=$(AUTORELEASE) @@ -45,4 +38,3 @@ define Build/Compile endef $(eval $(call KernelPackage,r8101)) -