From 685a4f10710acc6134935e6ffd6279e5d9c226a4 Mon Sep 17 00:00:00 2001 From: lean Date: Sat, 27 Aug 2022 12:22:17 +0800 Subject: [PATCH] mfd: rk808: Add reboot support to rk808.c --- target/linux/rockchip/Makefile | 4 +- target/linux/rockchip/armv8/config-5.15 | 3 +- ...8-Add-support-for-power-off-on-RK817.patch | 27 +++++ ...p-inno-usb2-support-address_cells-2.patch} | 0 ...-inno-usb2-support-muxed-interrupts.patch} | 0 ...o-usb2-support-standalone-phy-nodes.patch} | 0 ...ckchip-inno-usb2-add-rk3568-support.patch} | 0 ...kchip-Add-more-PLL-rates-for-rk3568.patch} | 0 ...ET_RATE_PARENT-to-the-HDMI-referenc.patch} | 0 ...hip-add-naneng-combo-phy-for-RK3568.patch} | 0 ...ort-setting-f_min-from-host-drivers.patch} | 0 ...ip-Fix-handling-invalid-clock-rates.patch} | 0 ...-rk808-Add-reboot-support-to-rk808.c.patch | 110 ++++++++++++++++++ ...-rockchip-set-dwc3-clock-for-rk3566.patch} | 0 ...Add-support-for-Hantro-G1-on-RK356x.patch} | 0 ...no-usb2-Fix-muxed-interrupt-support.patch} | 0 ...inno-usb2-Do-not-check-bvalid-twice.patch} | 0 ...2-Do-not-lock-in-bvalid-IRQ-handler.patch} | 0 ...2-Support-multi-bit-mask-properties.patch} | 0 ...hip-inno-usb2-Handle-bvalid-falling.patch} | 0 ...hy-rockchip-inno-usb2-Handle-ID-IRQ.patch} | 0 ...-Mark-hclk_vo-as-critical-on-rk3568.patch} | 0 ...d-drm_encoder-into-rockchip_decoder.patch} | 0 ...rtc_endpoint_id-to-rockchip_encoder.patch} | 0 ...ename-vpll-clock-to-reference-clock.patch} | 0 ...rockchip-dw_hdmi-add-rk3568-support.patch} | 0 ...kchip-dw_hdmi-add-regulator-support.patch} | 0 ...m-rockchip-Make-VOP-driver-optional.patch} | 0 ...-v5.19-drm-rockchip-Add-VOP2-driver.patch} | 0 ...chip-dwc-Reset-core-at-driver-probe.patch} | 0 ...ip-dwc-Add-legacy-interrupt-support.patch} | 0 ...ckchip-vop2-unlock-on-error-path-in.patch} | 0 ...ntro-Add-support-for-RK356x-encoder.patch} | 0 ...o-usb2-Ignore-OTG-IRQs-in-host-mode.patch} | 0 ...Fix-RK3399-H.264-format-advertising.patch} | 0 ...b2-Prevent-incorrect-error-on-probe.patch} | 0 ...ip-inno-usb2-Sync-initial-otg-state.patch} | 0 37 files changed, 141 insertions(+), 3 deletions(-) create mode 100644 target/linux/rockchip/patches-5.15/008-0006-v5.16-mfd-rk808-Add-support-for-power-off-on-RK817.patch rename target/linux/rockchip/patches-5.15/{008-0006-v5.17-phy-phy-rockchip-inno-usb2-support-address_cells-2.patch => 008-0007-v5.17-phy-phy-rockchip-inno-usb2-support-address_cells-2.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0007-v5.17-phy-phy-rockchip-inno-usb2-support-muxed-interrupts.patch => 008-0008-v5.17-phy-phy-rockchip-inno-usb2-support-muxed-interrupts.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0008-v5.17-phy-phy-rockchip-inno-usb2-support-standalone-phy-nodes.patch => 008-0009-v5.17-phy-phy-rockchip-inno-usb2-support-standalone-phy-nodes.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0009-v5.17-phy-phy-rockchip-inno-usb2-add-rk3568-support.patch => 008-0010-v5.17-phy-phy-rockchip-inno-usb2-add-rk3568-support.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0010-v5.18-clk-rockchip-Add-more-PLL-rates-for-rk3568.patch => 008-0011-v5.18-clk-rockchip-Add-more-PLL-rates-for-rk3568.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0011-v5.18-clk-rockchip-Add-CLK_SET_RATE_PARENT-to-the-HDMI-referenc.patch => 008-0012-v5.18-clk-rockchip-Add-CLK_SET_RATE_PARENT-to-the-HDMI-referenc.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0012-v5.18-phy-rockchip-add-naneng-combo-phy-for-RK3568.patch => 008-0013-v5.18-phy-rockchip-add-naneng-combo-phy-for-RK3568.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0012-v5.18-mmc-dw_mmc-Support-setting-f_min-from-host-drivers.patch => 008-0014-v5.18-mmc-dw_mmc-Support-setting-f_min-from-host-drivers.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0014-v5.18-mmc-dw-mmc-rockchip-Fix-handling-invalid-clock-rates.patch => 008-0015-v5.18-mmc-dw-mmc-rockchip-Fix-handling-invalid-clock-rates.patch} (100%) create mode 100644 target/linux/rockchip/patches-5.15/008-0016-v5.18-mfd-rk808-Add-reboot-support-to-rk808.c.patch rename target/linux/rockchip/patches-5.15/{008-0015-v5.19-soc-rockchip-set-dwc3-clock-for-rk3566.patch => 008-0017-v5.19-soc-rockchip-set-dwc3-clock-for-rk3566.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0016-v5.19-media-hantro-Add-support-for-Hantro-G1-on-RK356x.patch => 008-0018-v5.19-media-hantro-Add-support-for-Hantro-G1-on-RK356x.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0017-v5.19-phy-rockchip-inno-usb2-Fix-muxed-interrupt-support.patch => 008-0019-v5.19-phy-rockchip-inno-usb2-Fix-muxed-interrupt-support.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0018-v5.19-phy-rockchip-inno-usb2-Do-not-check-bvalid-twice.patch => 008-0020-v5.19-phy-rockchip-inno-usb2-Do-not-check-bvalid-twice.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0019-v5.19-phy-rockchip-inno-usb2-Do-not-lock-in-bvalid-IRQ-handler.patch => 008-0021-v5.19-phy-rockchip-inno-usb2-Do-not-lock-in-bvalid-IRQ-handler.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0020-v5.19-phy-rockchip-inno-usb2-Support-multi-bit-mask-properties.patch => 008-0022-v5.19-phy-rockchip-inno-usb2-Support-multi-bit-mask-properties.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0021-v5.19-phy-rockchip-inno-usb2-Handle-bvalid-falling.patch => 008-0023-v5.19-phy-rockchip-inno-usb2-Handle-bvalid-falling.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0022-v5.19-phy-rockchip-inno-usb2-Handle-ID-IRQ.patch => 008-0024-v5.19-phy-rockchip-inno-usb2-Handle-ID-IRQ.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0023-v5.19-clk-rockchip-Mark-hclk_vo-as-critical-on-rk3568.patch => 008-0025-v5.19-clk-rockchip-Mark-hclk_vo-as-critical-on-rk3568.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0024-v5.19-drm-rockchip-Embed-drm_encoder-into-rockchip_decoder.patch => 008-0026-v5.19-drm-rockchip-Embed-drm_encoder-into-rockchip_decoder.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0025-v5.19-drm-rockchip-Add-crtc_endpoint_id-to-rockchip_encoder.patch => 008-0027-v5.19-drm-rockchip-Add-crtc_endpoint_id-to-rockchip_encoder.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0026-v5.19-drm-rockchip-dw_hdmi-rename-vpll-clock-to-reference-clock.patch => 008-0028-v5.19-drm-rockchip-dw_hdmi-rename-vpll-clock-to-reference-clock.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0027-v5.19-drm-rockchip-dw_hdmi-add-rk3568-support.patch => 008-0029-v5.19-drm-rockchip-dw_hdmi-add-rk3568-support.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0028-v5.19-drm-rockchip-dw_hdmi-add-regulator-support.patch => 008-0030-v5.19-drm-rockchip-dw_hdmi-add-regulator-support.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0029-v5.19-drm-rockchip-Make-VOP-driver-optional.patch => 008-0031-v5.19-drm-rockchip-Make-VOP-driver-optional.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0030-v5.19-drm-rockchip-Add-VOP2-driver.patch => 008-0032-v5.19-drm-rockchip-Add-VOP2-driver.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0031-v5.19-PCI-rockchip-dwc-Reset-core-at-driver-probe.patch => 008-0033-v5.19-PCI-rockchip-dwc-Reset-core-at-driver-probe.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0032-v5.19-PCI-rockchip-dwc-Add-legacy-interrupt-support.patch => 008-0034-v5.19-PCI-rockchip-dwc-Add-legacy-interrupt-support.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0033-v6.0-drm-rockchip-vop2-unlock-on-error-path-in.patch => 008-0035-v6.0-drm-rockchip-vop2-unlock-on-error-path-in.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0034-v6.0-media-hantro-Add-support-for-RK356x-encoder.patch => 008-0036-v6.0-media-hantro-Add-support-for-RK356x-encoder.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0035-v6.0-phy-rockchip-inno-usb2-Ignore-OTG-IRQs-in-host-mode.patch => 008-0037-v6.0-phy-rockchip-inno-usb2-Ignore-OTG-IRQs-in-host-mode.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0036-v6.0-media-hantro-Fix-RK3399-H.264-format-advertising.patch => 008-0038-v6.0-media-hantro-Fix-RK3399-H.264-format-advertising.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0037-v6.0-phy-rockchip-inno-usb2-Prevent-incorrect-error-on-probe.patch => 008-0039-v6.0-phy-rockchip-inno-usb2-Prevent-incorrect-error-on-probe.patch} (100%) rename target/linux/rockchip/patches-5.15/{008-0038-v6.0-phy-rockchip-inno-usb2-Sync-initial-otg-state.patch => 008-0040-v6.0-phy-rockchip-inno-usb2-Sync-initial-otg-state.patch} (100%) diff --git a/target/linux/rockchip/Makefile b/target/linux/rockchip/Makefile index ffdf1a817..6e31d4eeb 100644 --- a/target/linux/rockchip/Makefile +++ b/target/linux/rockchip/Makefile @@ -7,8 +7,8 @@ BOARDNAME:=Rockchip FEATURES:=ext4 audio usb usbgadget display gpio fpu pci pcie rootfs-part boot-part squashfs SUBTARGETS:=armv8 -KERNEL_PATCHVER=5.19 -KERNEL_TESTING_PATCHVER=5.15 +KERNEL_PATCHVER=5.15 +KERNEL_TESTING_PATCHVER=5.19 define Target/Description Build firmware image for Rockchip SoC devices. diff --git a/target/linux/rockchip/armv8/config-5.15 b/target/linux/rockchip/armv8/config-5.15 index 07739aaac..4f13a6e3a 100644 --- a/target/linux/rockchip/armv8/config-5.15 +++ b/target/linux/rockchip/armv8/config-5.15 @@ -305,6 +305,7 @@ CONFIG_I2C_CHARDEV=y CONFIG_I2C_COMPAT=y CONFIG_I2C_HELPER_AUTO=y CONFIG_I2C_RK3X=y +# CONFIG_IIO_SCMI is not set CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 CONFIG_INDIRECT_PIO=y CONFIG_INPUT=y @@ -491,7 +492,7 @@ CONFIG_PHY_ROCKCHIP_TYPEC=y CONFIG_PHY_ROCKCHIP_USB=y CONFIG_PINCTRL=y # CONFIG_PINCTRL_MICROCHIP_SGPIO is not set -# CONFIG_PINCTRL_RK805 is not set +CONFIG_PINCTRL_RK805=y CONFIG_PINCTRL_ROCKCHIP=y # CONFIG_PINCTRL_SINGLE is not set CONFIG_PL330_DMA=y diff --git a/target/linux/rockchip/patches-5.15/008-0006-v5.16-mfd-rk808-Add-support-for-power-off-on-RK817.patch b/target/linux/rockchip/patches-5.15/008-0006-v5.16-mfd-rk808-Add-support-for-power-off-on-RK817.patch new file mode 100644 index 000000000..74f99511d --- /dev/null +++ b/target/linux/rockchip/patches-5.15/008-0006-v5.16-mfd-rk808-Add-support-for-power-off-on-RK817.patch @@ -0,0 +1,27 @@ +From 4d94b98f2e2407e3f053b2546f86c76179fea644 Mon Sep 17 00:00:00 2001 +From: Ondrej Jirman +Date: Sun, 29 Aug 2021 04:51:53 +0200 +Subject: [PATCH] mfd: rk808: Add support for power off on RK817 + +RK817 has a power-off bit in SYS_CFG3. Add support for powering +off the PMIC. + +Signed-off-by: Ondrej Jirman +Signed-off-by: Lee Jones +--- + drivers/mfd/rk808.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/mfd/rk808.c ++++ b/drivers/mfd/rk808.c +@@ -543,6 +543,10 @@ static void rk808_pm_power_off(void) + reg = RK808_DEVCTRL_REG, + bit = DEV_OFF_RST; + break; ++ case RK817_ID: ++ reg = RK817_SYS_CFG(3); ++ bit = DEV_OFF; ++ break; + case RK818_ID: + reg = RK818_DEVCTRL_REG; + bit = DEV_OFF; diff --git a/target/linux/rockchip/patches-5.15/008-0006-v5.17-phy-phy-rockchip-inno-usb2-support-address_cells-2.patch b/target/linux/rockchip/patches-5.15/008-0007-v5.17-phy-phy-rockchip-inno-usb2-support-address_cells-2.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0006-v5.17-phy-phy-rockchip-inno-usb2-support-address_cells-2.patch rename to target/linux/rockchip/patches-5.15/008-0007-v5.17-phy-phy-rockchip-inno-usb2-support-address_cells-2.patch diff --git a/target/linux/rockchip/patches-5.15/008-0007-v5.17-phy-phy-rockchip-inno-usb2-support-muxed-interrupts.patch b/target/linux/rockchip/patches-5.15/008-0008-v5.17-phy-phy-rockchip-inno-usb2-support-muxed-interrupts.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0007-v5.17-phy-phy-rockchip-inno-usb2-support-muxed-interrupts.patch rename to target/linux/rockchip/patches-5.15/008-0008-v5.17-phy-phy-rockchip-inno-usb2-support-muxed-interrupts.patch diff --git a/target/linux/rockchip/patches-5.15/008-0008-v5.17-phy-phy-rockchip-inno-usb2-support-standalone-phy-nodes.patch b/target/linux/rockchip/patches-5.15/008-0009-v5.17-phy-phy-rockchip-inno-usb2-support-standalone-phy-nodes.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0008-v5.17-phy-phy-rockchip-inno-usb2-support-standalone-phy-nodes.patch rename to target/linux/rockchip/patches-5.15/008-0009-v5.17-phy-phy-rockchip-inno-usb2-support-standalone-phy-nodes.patch diff --git a/target/linux/rockchip/patches-5.15/008-0009-v5.17-phy-phy-rockchip-inno-usb2-add-rk3568-support.patch b/target/linux/rockchip/patches-5.15/008-0010-v5.17-phy-phy-rockchip-inno-usb2-add-rk3568-support.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0009-v5.17-phy-phy-rockchip-inno-usb2-add-rk3568-support.patch rename to target/linux/rockchip/patches-5.15/008-0010-v5.17-phy-phy-rockchip-inno-usb2-add-rk3568-support.patch diff --git a/target/linux/rockchip/patches-5.15/008-0010-v5.18-clk-rockchip-Add-more-PLL-rates-for-rk3568.patch b/target/linux/rockchip/patches-5.15/008-0011-v5.18-clk-rockchip-Add-more-PLL-rates-for-rk3568.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0010-v5.18-clk-rockchip-Add-more-PLL-rates-for-rk3568.patch rename to target/linux/rockchip/patches-5.15/008-0011-v5.18-clk-rockchip-Add-more-PLL-rates-for-rk3568.patch diff --git a/target/linux/rockchip/patches-5.15/008-0011-v5.18-clk-rockchip-Add-CLK_SET_RATE_PARENT-to-the-HDMI-referenc.patch b/target/linux/rockchip/patches-5.15/008-0012-v5.18-clk-rockchip-Add-CLK_SET_RATE_PARENT-to-the-HDMI-referenc.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0011-v5.18-clk-rockchip-Add-CLK_SET_RATE_PARENT-to-the-HDMI-referenc.patch rename to target/linux/rockchip/patches-5.15/008-0012-v5.18-clk-rockchip-Add-CLK_SET_RATE_PARENT-to-the-HDMI-referenc.patch diff --git a/target/linux/rockchip/patches-5.15/008-0012-v5.18-phy-rockchip-add-naneng-combo-phy-for-RK3568.patch b/target/linux/rockchip/patches-5.15/008-0013-v5.18-phy-rockchip-add-naneng-combo-phy-for-RK3568.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0012-v5.18-phy-rockchip-add-naneng-combo-phy-for-RK3568.patch rename to target/linux/rockchip/patches-5.15/008-0013-v5.18-phy-rockchip-add-naneng-combo-phy-for-RK3568.patch diff --git a/target/linux/rockchip/patches-5.15/008-0012-v5.18-mmc-dw_mmc-Support-setting-f_min-from-host-drivers.patch b/target/linux/rockchip/patches-5.15/008-0014-v5.18-mmc-dw_mmc-Support-setting-f_min-from-host-drivers.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0012-v5.18-mmc-dw_mmc-Support-setting-f_min-from-host-drivers.patch rename to target/linux/rockchip/patches-5.15/008-0014-v5.18-mmc-dw_mmc-Support-setting-f_min-from-host-drivers.patch diff --git a/target/linux/rockchip/patches-5.15/008-0014-v5.18-mmc-dw-mmc-rockchip-Fix-handling-invalid-clock-rates.patch b/target/linux/rockchip/patches-5.15/008-0015-v5.18-mmc-dw-mmc-rockchip-Fix-handling-invalid-clock-rates.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0014-v5.18-mmc-dw-mmc-rockchip-Fix-handling-invalid-clock-rates.patch rename to target/linux/rockchip/patches-5.15/008-0015-v5.18-mmc-dw-mmc-rockchip-Fix-handling-invalid-clock-rates.patch diff --git a/target/linux/rockchip/patches-5.15/008-0016-v5.18-mfd-rk808-Add-reboot-support-to-rk808.c.patch b/target/linux/rockchip/patches-5.15/008-0016-v5.18-mfd-rk808-Add-reboot-support-to-rk808.c.patch new file mode 100644 index 000000000..f4de9b7a1 --- /dev/null +++ b/target/linux/rockchip/patches-5.15/008-0016-v5.18-mfd-rk808-Add-reboot-support-to-rk808.c.patch @@ -0,0 +1,110 @@ +From 56f216d8efbc1212bf5ff8a6ff5e29927965e8db Mon Sep 17 00:00:00 2001 +From: Peter Geis +Date: Tue, 8 Feb 2022 14:40:23 -0500 +Subject: [PATCH] mfd: rk808: Add reboot support to rk808.c + +This adds reboot support to the rk808 pmic driver and enables it for +the rk809 and rk817 devices. +This only enables if the rockchip,system-power-controller flag is set. + +Signed-off-by: Peter Geis +Signed-off-by: Frank Wunderlich +Reviewed-by: Dmitry Osipenko +Signed-off-by: Lee Jones +Link: https://lore.kernel.org/r/20220208194023.929720-1-pgwipeout@gmail.com +--- + drivers/mfd/rk808.c | 44 +++++++++++++++++++++++++++++++++++++++ + include/linux/mfd/rk808.h | 1 + + 2 files changed, 45 insertions(+) + +--- a/drivers/mfd/rk808.c ++++ b/drivers/mfd/rk808.c +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + struct rk808_reg_data { + int addr; +@@ -543,6 +544,7 @@ static void rk808_pm_power_off(void) + reg = RK808_DEVCTRL_REG, + bit = DEV_OFF_RST; + break; ++ case RK809_ID: + case RK817_ID: + reg = RK817_SYS_CFG(3); + bit = DEV_OFF; +@@ -559,6 +561,34 @@ static void rk808_pm_power_off(void) + dev_err(&rk808_i2c_client->dev, "Failed to shutdown device!\n"); + } + ++static int rk808_restart_notify(struct notifier_block *this, unsigned long mode, void *cmd) ++{ ++ struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client); ++ unsigned int reg, bit; ++ int ret; ++ ++ switch (rk808->variant) { ++ case RK809_ID: ++ case RK817_ID: ++ reg = RK817_SYS_CFG(3); ++ bit = DEV_RST; ++ break; ++ ++ default: ++ return NOTIFY_DONE; ++ } ++ ret = regmap_update_bits(rk808->regmap, reg, bit, bit); ++ if (ret) ++ dev_err(&rk808_i2c_client->dev, "Failed to restart device!\n"); ++ ++ return NOTIFY_DONE; ++} ++ ++static struct notifier_block rk808_restart_handler = { ++ .notifier_call = rk808_restart_notify, ++ .priority = 192, ++}; ++ + static void rk8xx_shutdown(struct i2c_client *client) + { + struct rk808 *rk808 = i2c_get_clientdata(client); +@@ -727,6 +757,18 @@ static int rk808_probe(struct i2c_client + if (of_property_read_bool(np, "rockchip,system-power-controller")) { + rk808_i2c_client = client; + pm_power_off = rk808_pm_power_off; ++ ++ switch (rk808->variant) { ++ case RK809_ID: ++ case RK817_ID: ++ ret = register_restart_handler(&rk808_restart_handler); ++ if (ret) ++ dev_warn(&client->dev, "failed to register rst handler, %d\n", ret); ++ break; ++ default: ++ dev_dbg(&client->dev, "pmic controlled board reset not supported\n"); ++ break; ++ } + } + + return 0; +@@ -749,6 +791,8 @@ static int rk808_remove(struct i2c_clien + if (pm_power_off == rk808_pm_power_off) + pm_power_off = NULL; + ++ unregister_restart_handler(&rk808_restart_handler); ++ + return 0; + } + +--- a/include/linux/mfd/rk808.h ++++ b/include/linux/mfd/rk808.h +@@ -373,6 +373,7 @@ enum rk805_reg { + #define SWITCH2_EN BIT(6) + #define SWITCH1_EN BIT(5) + #define DEV_OFF_RST BIT(3) ++#define DEV_RST BIT(2) + #define DEV_OFF BIT(0) + #define RTC_STOP BIT(0) + diff --git a/target/linux/rockchip/patches-5.15/008-0015-v5.19-soc-rockchip-set-dwc3-clock-for-rk3566.patch b/target/linux/rockchip/patches-5.15/008-0017-v5.19-soc-rockchip-set-dwc3-clock-for-rk3566.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0015-v5.19-soc-rockchip-set-dwc3-clock-for-rk3566.patch rename to target/linux/rockchip/patches-5.15/008-0017-v5.19-soc-rockchip-set-dwc3-clock-for-rk3566.patch diff --git a/target/linux/rockchip/patches-5.15/008-0016-v5.19-media-hantro-Add-support-for-Hantro-G1-on-RK356x.patch b/target/linux/rockchip/patches-5.15/008-0018-v5.19-media-hantro-Add-support-for-Hantro-G1-on-RK356x.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0016-v5.19-media-hantro-Add-support-for-Hantro-G1-on-RK356x.patch rename to target/linux/rockchip/patches-5.15/008-0018-v5.19-media-hantro-Add-support-for-Hantro-G1-on-RK356x.patch diff --git a/target/linux/rockchip/patches-5.15/008-0017-v5.19-phy-rockchip-inno-usb2-Fix-muxed-interrupt-support.patch b/target/linux/rockchip/patches-5.15/008-0019-v5.19-phy-rockchip-inno-usb2-Fix-muxed-interrupt-support.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0017-v5.19-phy-rockchip-inno-usb2-Fix-muxed-interrupt-support.patch rename to target/linux/rockchip/patches-5.15/008-0019-v5.19-phy-rockchip-inno-usb2-Fix-muxed-interrupt-support.patch diff --git a/target/linux/rockchip/patches-5.15/008-0018-v5.19-phy-rockchip-inno-usb2-Do-not-check-bvalid-twice.patch b/target/linux/rockchip/patches-5.15/008-0020-v5.19-phy-rockchip-inno-usb2-Do-not-check-bvalid-twice.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0018-v5.19-phy-rockchip-inno-usb2-Do-not-check-bvalid-twice.patch rename to target/linux/rockchip/patches-5.15/008-0020-v5.19-phy-rockchip-inno-usb2-Do-not-check-bvalid-twice.patch diff --git a/target/linux/rockchip/patches-5.15/008-0019-v5.19-phy-rockchip-inno-usb2-Do-not-lock-in-bvalid-IRQ-handler.patch b/target/linux/rockchip/patches-5.15/008-0021-v5.19-phy-rockchip-inno-usb2-Do-not-lock-in-bvalid-IRQ-handler.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0019-v5.19-phy-rockchip-inno-usb2-Do-not-lock-in-bvalid-IRQ-handler.patch rename to target/linux/rockchip/patches-5.15/008-0021-v5.19-phy-rockchip-inno-usb2-Do-not-lock-in-bvalid-IRQ-handler.patch diff --git a/target/linux/rockchip/patches-5.15/008-0020-v5.19-phy-rockchip-inno-usb2-Support-multi-bit-mask-properties.patch b/target/linux/rockchip/patches-5.15/008-0022-v5.19-phy-rockchip-inno-usb2-Support-multi-bit-mask-properties.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0020-v5.19-phy-rockchip-inno-usb2-Support-multi-bit-mask-properties.patch rename to target/linux/rockchip/patches-5.15/008-0022-v5.19-phy-rockchip-inno-usb2-Support-multi-bit-mask-properties.patch diff --git a/target/linux/rockchip/patches-5.15/008-0021-v5.19-phy-rockchip-inno-usb2-Handle-bvalid-falling.patch b/target/linux/rockchip/patches-5.15/008-0023-v5.19-phy-rockchip-inno-usb2-Handle-bvalid-falling.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0021-v5.19-phy-rockchip-inno-usb2-Handle-bvalid-falling.patch rename to target/linux/rockchip/patches-5.15/008-0023-v5.19-phy-rockchip-inno-usb2-Handle-bvalid-falling.patch diff --git a/target/linux/rockchip/patches-5.15/008-0022-v5.19-phy-rockchip-inno-usb2-Handle-ID-IRQ.patch b/target/linux/rockchip/patches-5.15/008-0024-v5.19-phy-rockchip-inno-usb2-Handle-ID-IRQ.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0022-v5.19-phy-rockchip-inno-usb2-Handle-ID-IRQ.patch rename to target/linux/rockchip/patches-5.15/008-0024-v5.19-phy-rockchip-inno-usb2-Handle-ID-IRQ.patch diff --git a/target/linux/rockchip/patches-5.15/008-0023-v5.19-clk-rockchip-Mark-hclk_vo-as-critical-on-rk3568.patch b/target/linux/rockchip/patches-5.15/008-0025-v5.19-clk-rockchip-Mark-hclk_vo-as-critical-on-rk3568.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0023-v5.19-clk-rockchip-Mark-hclk_vo-as-critical-on-rk3568.patch rename to target/linux/rockchip/patches-5.15/008-0025-v5.19-clk-rockchip-Mark-hclk_vo-as-critical-on-rk3568.patch diff --git a/target/linux/rockchip/patches-5.15/008-0024-v5.19-drm-rockchip-Embed-drm_encoder-into-rockchip_decoder.patch b/target/linux/rockchip/patches-5.15/008-0026-v5.19-drm-rockchip-Embed-drm_encoder-into-rockchip_decoder.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0024-v5.19-drm-rockchip-Embed-drm_encoder-into-rockchip_decoder.patch rename to target/linux/rockchip/patches-5.15/008-0026-v5.19-drm-rockchip-Embed-drm_encoder-into-rockchip_decoder.patch diff --git a/target/linux/rockchip/patches-5.15/008-0025-v5.19-drm-rockchip-Add-crtc_endpoint_id-to-rockchip_encoder.patch b/target/linux/rockchip/patches-5.15/008-0027-v5.19-drm-rockchip-Add-crtc_endpoint_id-to-rockchip_encoder.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0025-v5.19-drm-rockchip-Add-crtc_endpoint_id-to-rockchip_encoder.patch rename to target/linux/rockchip/patches-5.15/008-0027-v5.19-drm-rockchip-Add-crtc_endpoint_id-to-rockchip_encoder.patch diff --git a/target/linux/rockchip/patches-5.15/008-0026-v5.19-drm-rockchip-dw_hdmi-rename-vpll-clock-to-reference-clock.patch b/target/linux/rockchip/patches-5.15/008-0028-v5.19-drm-rockchip-dw_hdmi-rename-vpll-clock-to-reference-clock.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0026-v5.19-drm-rockchip-dw_hdmi-rename-vpll-clock-to-reference-clock.patch rename to target/linux/rockchip/patches-5.15/008-0028-v5.19-drm-rockchip-dw_hdmi-rename-vpll-clock-to-reference-clock.patch diff --git a/target/linux/rockchip/patches-5.15/008-0027-v5.19-drm-rockchip-dw_hdmi-add-rk3568-support.patch b/target/linux/rockchip/patches-5.15/008-0029-v5.19-drm-rockchip-dw_hdmi-add-rk3568-support.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0027-v5.19-drm-rockchip-dw_hdmi-add-rk3568-support.patch rename to target/linux/rockchip/patches-5.15/008-0029-v5.19-drm-rockchip-dw_hdmi-add-rk3568-support.patch diff --git a/target/linux/rockchip/patches-5.15/008-0028-v5.19-drm-rockchip-dw_hdmi-add-regulator-support.patch b/target/linux/rockchip/patches-5.15/008-0030-v5.19-drm-rockchip-dw_hdmi-add-regulator-support.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0028-v5.19-drm-rockchip-dw_hdmi-add-regulator-support.patch rename to target/linux/rockchip/patches-5.15/008-0030-v5.19-drm-rockchip-dw_hdmi-add-regulator-support.patch diff --git a/target/linux/rockchip/patches-5.15/008-0029-v5.19-drm-rockchip-Make-VOP-driver-optional.patch b/target/linux/rockchip/patches-5.15/008-0031-v5.19-drm-rockchip-Make-VOP-driver-optional.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0029-v5.19-drm-rockchip-Make-VOP-driver-optional.patch rename to target/linux/rockchip/patches-5.15/008-0031-v5.19-drm-rockchip-Make-VOP-driver-optional.patch diff --git a/target/linux/rockchip/patches-5.15/008-0030-v5.19-drm-rockchip-Add-VOP2-driver.patch b/target/linux/rockchip/patches-5.15/008-0032-v5.19-drm-rockchip-Add-VOP2-driver.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0030-v5.19-drm-rockchip-Add-VOP2-driver.patch rename to target/linux/rockchip/patches-5.15/008-0032-v5.19-drm-rockchip-Add-VOP2-driver.patch diff --git a/target/linux/rockchip/patches-5.15/008-0031-v5.19-PCI-rockchip-dwc-Reset-core-at-driver-probe.patch b/target/linux/rockchip/patches-5.15/008-0033-v5.19-PCI-rockchip-dwc-Reset-core-at-driver-probe.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0031-v5.19-PCI-rockchip-dwc-Reset-core-at-driver-probe.patch rename to target/linux/rockchip/patches-5.15/008-0033-v5.19-PCI-rockchip-dwc-Reset-core-at-driver-probe.patch diff --git a/target/linux/rockchip/patches-5.15/008-0032-v5.19-PCI-rockchip-dwc-Add-legacy-interrupt-support.patch b/target/linux/rockchip/patches-5.15/008-0034-v5.19-PCI-rockchip-dwc-Add-legacy-interrupt-support.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0032-v5.19-PCI-rockchip-dwc-Add-legacy-interrupt-support.patch rename to target/linux/rockchip/patches-5.15/008-0034-v5.19-PCI-rockchip-dwc-Add-legacy-interrupt-support.patch diff --git a/target/linux/rockchip/patches-5.15/008-0033-v6.0-drm-rockchip-vop2-unlock-on-error-path-in.patch b/target/linux/rockchip/patches-5.15/008-0035-v6.0-drm-rockchip-vop2-unlock-on-error-path-in.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0033-v6.0-drm-rockchip-vop2-unlock-on-error-path-in.patch rename to target/linux/rockchip/patches-5.15/008-0035-v6.0-drm-rockchip-vop2-unlock-on-error-path-in.patch diff --git a/target/linux/rockchip/patches-5.15/008-0034-v6.0-media-hantro-Add-support-for-RK356x-encoder.patch b/target/linux/rockchip/patches-5.15/008-0036-v6.0-media-hantro-Add-support-for-RK356x-encoder.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0034-v6.0-media-hantro-Add-support-for-RK356x-encoder.patch rename to target/linux/rockchip/patches-5.15/008-0036-v6.0-media-hantro-Add-support-for-RK356x-encoder.patch diff --git a/target/linux/rockchip/patches-5.15/008-0035-v6.0-phy-rockchip-inno-usb2-Ignore-OTG-IRQs-in-host-mode.patch b/target/linux/rockchip/patches-5.15/008-0037-v6.0-phy-rockchip-inno-usb2-Ignore-OTG-IRQs-in-host-mode.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0035-v6.0-phy-rockchip-inno-usb2-Ignore-OTG-IRQs-in-host-mode.patch rename to target/linux/rockchip/patches-5.15/008-0037-v6.0-phy-rockchip-inno-usb2-Ignore-OTG-IRQs-in-host-mode.patch diff --git a/target/linux/rockchip/patches-5.15/008-0036-v6.0-media-hantro-Fix-RK3399-H.264-format-advertising.patch b/target/linux/rockchip/patches-5.15/008-0038-v6.0-media-hantro-Fix-RK3399-H.264-format-advertising.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0036-v6.0-media-hantro-Fix-RK3399-H.264-format-advertising.patch rename to target/linux/rockchip/patches-5.15/008-0038-v6.0-media-hantro-Fix-RK3399-H.264-format-advertising.patch diff --git a/target/linux/rockchip/patches-5.15/008-0037-v6.0-phy-rockchip-inno-usb2-Prevent-incorrect-error-on-probe.patch b/target/linux/rockchip/patches-5.15/008-0039-v6.0-phy-rockchip-inno-usb2-Prevent-incorrect-error-on-probe.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0037-v6.0-phy-rockchip-inno-usb2-Prevent-incorrect-error-on-probe.patch rename to target/linux/rockchip/patches-5.15/008-0039-v6.0-phy-rockchip-inno-usb2-Prevent-incorrect-error-on-probe.patch diff --git a/target/linux/rockchip/patches-5.15/008-0038-v6.0-phy-rockchip-inno-usb2-Sync-initial-otg-state.patch b/target/linux/rockchip/patches-5.15/008-0040-v6.0-phy-rockchip-inno-usb2-Sync-initial-otg-state.patch similarity index 100% rename from target/linux/rockchip/patches-5.15/008-0038-v6.0-phy-rockchip-inno-usb2-Sync-initial-otg-state.patch rename to target/linux/rockchip/patches-5.15/008-0040-v6.0-phy-rockchip-inno-usb2-Sync-initial-otg-state.patch