From 9950af27e38ad0b4eeccd1b9c6a100011d58963a Mon Sep 17 00:00:00 2001 From: spycat88 Date: Mon, 8 Apr 2024 21:24:47 +0100 Subject: [PATCH] Amlogic: update patches --- .../0001-clk-meson-add-vclk-driver.patch | 4 +- ...ake-VCLK2-and-ENCL-clock-path-config.patch | 4 +- ...-meson-gate-px_clk-when-setting-rate.patch | 4 +- ...on-g12-common-add-the-MIPI-DSI-nodes.patch | 4 +- ...01-add-odroid-go-ultra-panel-support.patch | 4 +- ...-meson-odroid-go-ultra-add-DSI-panel.patch | 4 +- ...son-odroid-go-ultra-correct-voltages.patch | 4 +- ...id-go-ultra-add-over-clocking-freque.patch | 33 ++-- ...id-go-ultra-specify-overclocking-fre.patch | 38 ---- ...-api-changes-needed-for-joypad-driv.patch} | 4 +- ...-odroid-go-ultra-remove-adc-joystick.patch | 69 -------- ...0010-input-add-input-polldev-driver.patch} | 4 +- ...ACK-panic-when-gamma-is-not-set-corr.patch | 47 ----- ...k-add-odroid-go-ultra-joypad-driver.patch} | 4 +- ...64-meson-odroid-go-ultra-add-joypad.patch} | 67 ++++++- ...rm64-meson-odroid-disable-heartbeat.patch} | 6 +- ...64-meson-g12-common-add-mali-to-dts.patch} | 4 +- ...add-dt-for-powkiddy-rgb10-max-3-pro.patch} | 4 +- ...818-Configure-rk808-clkout2-function.patch | 44 +++++ ...8-battery-Add-battery-driver-for-RK.patch} | 37 ++-- ...id-go-ultra-increase-vddcpu_a-voltag.patch | 26 --- ...8-battery-Use-a-more-propper-compat.patch} | 4 +- ...8-charger-Implement-charger-driver-.patch} | 17 +- ...8-charger-Change-charger-type-to-MA.patch} | 8 +- ...8-battery-Report-charging-status-ba.patch} | 4 +- ...8-battery-Drop-dependency-on-frameb.patch} | 4 +- ...8-charger-Unify-rk818-charger-and-r.patch} | 22 +-- ...8-battery-Speed-up-battery-current-.patch} | 4 +- ...8-charger-Delay-applying-input-curr.patch} | 12 +- ...8-battery-Don-t-auto-poweroff-the-P.patch} | 4 +- ...8-charger-Add-support-for-POWER_SUP.patch} | 10 +- ...8-battery-Don-t-reset-dsoc-to-0-on-.patch} | 4 +- ...battery-capacity-sanity-check-calcu.patch} | 4 +- ...7-charger-Add-input-current-limit-s.patch} | 4 +- ...7-charger-Take-input-current-limit-.patch} | 4 +- ...817-charger-Propagate-proper-errors.patch} | 4 +- ...17-charger-Add-support-for-runtime-c.patch | 167 ++++++++++++++++++ ...8-battery-charger-clear-unused-vari.patch} | 8 +- ...d-go-ultra-add-battery-and-charger-.patch} | 4 +- ...rd-limit-the-volume-to-prevent-clip.patch} | 4 +- ...8_charger-change-syfs-node-name-so-.patch} | 8 +- ...id-go-ultra-add-headphone-detection.patch} | 4 +- ...-odroid-go-ultra-Improve-sound-outp.patch} | 4 +- ...2-common-remove-lower-freq-gpu-opps.patch} | 4 +- ...-internal-PCM-chmap-ELD-IEC958-kctl.patch} | 4 +- ...oid-n2-add-support-for-overclocking.patch} | 4 +- ...he-Powkiddy-RGB10-Max-3-Pro-to-the-.patch} | 4 +- ...-meson-g12b-odroid-n2-add-support-f.patch} | 4 +- ...18_charger-fix-compiling-driver-on-6.patch | 34 ---- 49 files changed, 414 insertions(+), 363 deletions(-) delete mode 100644 projects/Amlogic/patches/linux/S922X/0009-arm64-meson-odroid-go-ultra-specify-overclocking-fre.patch rename projects/Amlogic/patches/linux/S922X/{0012-gpiolib-of-revert-api-changes-needed-for-joypad-driv.patch => 0009-gpiolib-of-revert-api-changes-needed-for-joypad-driv.patch} (98%) delete mode 100644 projects/Amlogic/patches/linux/S922X/0010-arm64-meson-odroid-go-ultra-remove-adc-joystick.patch rename projects/Amlogic/patches/linux/S922X/{0013-input-add-input-polldev-driver.patch => 0010-input-add-input-polldev-driver.patch} (99%) delete mode 100644 projects/Amlogic/patches/linux/S922X/0011-drm-meson-venc-HACK-panic-when-gamma-is-not-set-corr.patch rename projects/Amlogic/patches/linux/S922X/{0014-input-joystick-add-odroid-go-ultra-joypad-driver.patch => 0011-input-joystick-add-odroid-go-ultra-joypad-driver.patch} (99%) rename projects/Amlogic/patches/linux/S922X/{0015-arm64-meson-odroid-go-ultra-add-joypad.patch => 0012-arm64-meson-odroid-go-ultra-add-joypad.patch} (79%) rename projects/Amlogic/patches/linux/S922X/{0016-arm64-meson-odroid-disable-heartbeat.patch => 0013-arm64-meson-odroid-disable-heartbeat.patch} (88%) rename projects/Amlogic/patches/linux/S922X/{0017-arm64-meson-g12-common-add-mali-to-dts.patch => 0014-arm64-meson-g12-common-add-mali-to-dts.patch} (93%) rename projects/Amlogic/patches/linux/S922X/{0019-arm64-meson-add-dt-for-powkiddy-rgb10-max-3-pro.patch => 0015-arm64-meson-add-dt-for-powkiddy-rgb10-max-3-pro.patch} (93%) create mode 100644 projects/Amlogic/patches/linux/S922X/0016-power-rk818-Configure-rk808-clkout2-function.patch rename projects/Amlogic/patches/linux/S922X/{0020-power-supply-rk818-battery-Add-battery-driver-for-RK.patch => 0017-power-supply-rk818-battery-Add-battery-driver-for-RK.patch} (99%) delete mode 100644 projects/Amlogic/patches/linux/S922X/0018-arm64-meson-odroid-go-ultra-increase-vddcpu_a-voltag.patch rename projects/Amlogic/patches/linux/S922X/{0021-power-supply-rk818-battery-Use-a-more-propper-compat.patch => 0018-power-supply-rk818-battery-Use-a-more-propper-compat.patch} (88%) rename projects/Amlogic/patches/linux/S922X/{0022-power-supply-rk818-charger-Implement-charger-driver-.patch => 0019-power-supply-rk818-charger-Implement-charger-driver-.patch} (97%) rename projects/Amlogic/patches/linux/S922X/{0023-power-supply-rk818-charger-Change-charger-type-to-MA.patch => 0020-power-supply-rk818-charger-Change-charger-type-to-MA.patch} (77%) rename projects/Amlogic/patches/linux/S922X/{0024-power-supply-rk818-battery-Report-charging-status-ba.patch => 0021-power-supply-rk818-battery-Report-charging-status-ba.patch} (94%) rename projects/Amlogic/patches/linux/S922X/{0025-power-supply-rk818-battery-Drop-dependency-on-frameb.patch => 0022-power-supply-rk818-battery-Drop-dependency-on-frameb.patch} (97%) rename projects/Amlogic/patches/linux/S922X/{0026-power-supply-rk818-charger-Unify-rk818-charger-and-r.patch => 0023-power-supply-rk818-charger-Unify-rk818-charger-and-r.patch} (93%) rename projects/Amlogic/patches/linux/S922X/{0027-power-supply-rk818-battery-Speed-up-battery-current-.patch => 0024-power-supply-rk818-battery-Speed-up-battery-current-.patch} (90%) rename projects/Amlogic/patches/linux/S922X/{0028-power-supply-rk818-charger-Delay-applying-input-curr.patch => 0025-power-supply-rk818-charger-Delay-applying-input-curr.patch} (83%) rename projects/Amlogic/patches/linux/S922X/{0029-power-supply-rk818-battery-Don-t-auto-poweroff-the-P.patch => 0026-power-supply-rk818-battery-Don-t-auto-poweroff-the-P.patch} (94%) rename projects/Amlogic/patches/linux/S922X/{0030-power-supply-rk818-charger-Add-support-for-POWER_SUP.patch => 0027-power-supply-rk818-charger-Add-support-for-POWER_SUP.patch} (77%) rename projects/Amlogic/patches/linux/S922X/{0031-power-supply-rk818-battery-Don-t-reset-dsoc-to-0-on-.patch => 0028-power-supply-rk818-battery-Don-t-reset-dsoc-to-0-on-.patch} (86%) rename projects/Amlogic/patches/linux/S922X/{0032-supply-rk817-Fix-battery-capacity-sanity-check-calcu.patch => 0029-supply-rk817-Fix-battery-capacity-sanity-check-calcu.patch} (91%) rename projects/Amlogic/patches/linux/S922X/{0033-power-supply-rk817-charger-Add-input-current-limit-s.patch => 0030-power-supply-rk817-charger-Add-input-current-limit-s.patch} (97%) rename projects/Amlogic/patches/linux/S922X/{0034-power-supply-rk817-charger-Take-input-current-limit-.patch => 0031-power-supply-rk817-charger-Take-input-current-limit-.patch} (95%) rename projects/Amlogic/patches/linux/S922X/{0035-power-supply-rk817-charger-Propagate-proper-errors.patch => 0032-power-supply-rk817-charger-Propagate-proper-errors.patch} (90%) create mode 100644 projects/Amlogic/patches/linux/S922X/0033-power-supply-rk817-charger-Add-support-for-runtime-c.patch rename projects/Amlogic/patches/linux/S922X/{0036-power-supply-rk818-battery-charger-clear-unused-vari.patch => 0034-power-supply-rk818-battery-charger-clear-unused-vari.patch} (83%) rename projects/Amlogic/patches/linux/S922X/{0037-arm64-meson-odroid-go-ultra-add-battery-and-charger-.patch => 0035-arm64-meson-odroid-go-ultra-add-battery-and-charger-.patch} (95%) rename projects/Amlogic/patches/linux/S922X/{0038-ASoC-meson-axg-card-limit-the-volume-to-prevent-clip.patch => 0036-ASoC-meson-axg-card-limit-the-volume-to-prevent-clip.patch} (87%) rename projects/Amlogic/patches/linux/S922X/{0039-power-supply-rk818_charger-change-syfs-node-name-so-.patch => 0037-power-supply-rk818_charger-change-syfs-node-name-so-.patch} (75%) rename projects/Amlogic/patches/linux/S922X/{0040-arm64-meson-odroid-go-ultra-add-headphone-detection.patch => 0038-arm64-meson-odroid-go-ultra-add-headphone-detection.patch} (87%) rename projects/Amlogic/patches/linux/S922X/{0041-arm64-dts-amlogic-odroid-go-ultra-Improve-sound-outp.patch => 0039-arm64-dts-amlogic-odroid-go-ultra-Improve-sound-outp.patch} (95%) rename projects/Amlogic/patches/linux/S922X/{0042-arm64-meson-g12-common-remove-lower-freq-gpu-opps.patch => 0040-arm64-meson-g12-common-remove-lower-freq-gpu-opps.patch} (88%) rename projects/Amlogic/patches/linux/S922X/{0043-LOCAL-ALSA-Assign-internal-PCM-chmap-ELD-IEC958-kctl.patch => 0041-LOCAL-ALSA-Assign-internal-PCM-chmap-ELD-IEC958-kctl.patch} (94%) rename projects/Amlogic/patches/linux/S922X/{0044-arm64-meson-odroid-n2-add-support-for-overclocking.patch => 0042-arm64-meson-odroid-n2-add-support-for-overclocking.patch} (95%) rename projects/Amlogic/patches/linux/S922X/{0046-power-reset-add-the-Powkiddy-RGB10-Max-3-Pro-to-the-.patch => 0043-power-reset-add-the-Powkiddy-RGB10-Max-3-Pro-to-the-.patch} (91%) rename projects/Amlogic/patches/linux/S922X/{0047-arm64-dts-amlogic-meson-g12b-odroid-n2-add-support-f.patch => 0044-arm64-dts-amlogic-meson-g12b-odroid-n2-add-support-f.patch} (87%) delete mode 100644 projects/Amlogic/patches/linux/S922X/0045-power-supply-rk818_charger-fix-compiling-driver-on-6.patch diff --git a/projects/Amlogic/patches/linux/S922X/0001-clk-meson-add-vclk-driver.patch b/projects/Amlogic/patches/linux/S922X/0001-clk-meson-add-vclk-driver.patch index f48867773..a243a2a51 100644 --- a/projects/Amlogic/patches/linux/S922X/0001-clk-meson-add-vclk-driver.patch +++ b/projects/Amlogic/patches/linux/S922X/0001-clk-meson-add-vclk-driver.patch @@ -1,7 +1,7 @@ -From 9058f0c2d21afec161396389db9c3889bf36e745 Mon Sep 17 00:00:00 2001 +From 801ce8505a73f0b9f1e66ca84b1ae8a0e56d212c Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Wed, 3 Apr 2024 09:46:33 +0200 -Subject: [PATCH 01/47] clk: meson: add vclk driver +Subject: [PATCH 01/44] clk: meson: add vclk driver The VCLK and VCLK_DIV clocks have supplementary bits. diff --git a/projects/Amlogic/patches/linux/S922X/0002-clk-meson-g12a-make-VCLK2-and-ENCL-clock-path-config.patch b/projects/Amlogic/patches/linux/S922X/0002-clk-meson-g12a-make-VCLK2-and-ENCL-clock-path-config.patch index a3231d269..633e0f785 100644 --- a/projects/Amlogic/patches/linux/S922X/0002-clk-meson-g12a-make-VCLK2-and-ENCL-clock-path-config.patch +++ b/projects/Amlogic/patches/linux/S922X/0002-clk-meson-g12a-make-VCLK2-and-ENCL-clock-path-config.patch @@ -1,7 +1,7 @@ -From d4b89f1669315dfc1bbdcb532413e56e6fcc9797 Mon Sep 17 00:00:00 2001 +From 024103a845d9efb602225f975175ed2b678578e7 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Wed, 3 Apr 2024 09:46:34 +0200 -Subject: [PATCH 02/47] clk: meson: g12a: make VCLK2 and ENCL clock path +Subject: [PATCH 02/44] clk: meson: g12a: make VCLK2 and ENCL clock path configurable by CCF In order to setup the DSI clock, let's make the unused VCLK2 clock path diff --git a/projects/Amlogic/patches/linux/S922X/0003-drm-meson-gate-px_clk-when-setting-rate.patch b/projects/Amlogic/patches/linux/S922X/0003-drm-meson-gate-px_clk-when-setting-rate.patch index 3e7ac229c..505aa42c0 100644 --- a/projects/Amlogic/patches/linux/S922X/0003-drm-meson-gate-px_clk-when-setting-rate.patch +++ b/projects/Amlogic/patches/linux/S922X/0003-drm-meson-gate-px_clk-when-setting-rate.patch @@ -1,7 +1,7 @@ -From 7e7f66e6a99d15aea19872fe035ca46a9983baff Mon Sep 17 00:00:00 2001 +From c69702647174a36a3bbaa928d4879f4562123372 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Wed, 3 Apr 2024 09:46:35 +0200 -Subject: [PATCH 03/47] drm/meson: gate px_clk when setting rate +Subject: [PATCH 03/44] drm/meson: gate px_clk when setting rate Disable the px_clk when setting the rate to recover a fully configured and correctly reset VCLK clock tree after the rate diff --git a/projects/Amlogic/patches/linux/S922X/0004-arm64-meson-g12-common-add-the-MIPI-DSI-nodes.patch b/projects/Amlogic/patches/linux/S922X/0004-arm64-meson-g12-common-add-the-MIPI-DSI-nodes.patch index 2696dc5b0..4919b9085 100644 --- a/projects/Amlogic/patches/linux/S922X/0004-arm64-meson-g12-common-add-the-MIPI-DSI-nodes.patch +++ b/projects/Amlogic/patches/linux/S922X/0004-arm64-meson-g12-common-add-the-MIPI-DSI-nodes.patch @@ -1,7 +1,7 @@ -From d59484cd5ebda635b1dda3a06c2ffc8b12811b26 Mon Sep 17 00:00:00 2001 +From b584fdbb6a339fdf28ab8c1eb031262c0c66b5e2 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Wed, 3 Apr 2024 09:46:36 +0200 -Subject: [PATCH 04/47] arm64: meson: g12-common: add the MIPI DSI nodes +Subject: [PATCH 04/44] arm64: meson: g12-common: add the MIPI DSI nodes Add the MIPI DSI Analog & Digital PHY nodes and the DSI control nodes with proper port endpoint to the VPU. diff --git a/projects/Amlogic/patches/linux/S922X/0005-drm-panel-st7701-add-odroid-go-ultra-panel-support.patch b/projects/Amlogic/patches/linux/S922X/0005-drm-panel-st7701-add-odroid-go-ultra-panel-support.patch index 18c2b4cb8..e5b104cf2 100644 --- a/projects/Amlogic/patches/linux/S922X/0005-drm-panel-st7701-add-odroid-go-ultra-panel-support.patch +++ b/projects/Amlogic/patches/linux/S922X/0005-drm-panel-st7701-add-odroid-go-ultra-panel-support.patch @@ -1,7 +1,7 @@ -From e2efb7410f7d5284c14928b5b40a4754efd0433f Mon Sep 17 00:00:00 2001 +From ee573e00af321704d2bd093efd8d7cb3976b11a3 Mon Sep 17 00:00:00 2001 From: spycat88 Date: Tue, 23 Jan 2024 23:28:55 +0000 -Subject: [PATCH 05/47] drm: panel: st7701: add odroid-go-ultra panel support +Subject: [PATCH 05/44] drm: panel: st7701: add odroid-go-ultra panel support --- drivers/gpu/drm/panel/panel-sitronix-st7701.c | 162 +++++++++++++++++- diff --git a/projects/Amlogic/patches/linux/S922X/0006-arm64-meson-odroid-go-ultra-add-DSI-panel.patch b/projects/Amlogic/patches/linux/S922X/0006-arm64-meson-odroid-go-ultra-add-DSI-panel.patch index 5f3836ee3..6e656088d 100644 --- a/projects/Amlogic/patches/linux/S922X/0006-arm64-meson-odroid-go-ultra-add-DSI-panel.patch +++ b/projects/Amlogic/patches/linux/S922X/0006-arm64-meson-odroid-go-ultra-add-DSI-panel.patch @@ -1,7 +1,7 @@ -From 5461fd6e602b29c04c527c60e648ad19ca296ba2 Mon Sep 17 00:00:00 2001 +From 157e64dad5bd6b9965089b764850930404c88e8e Mon Sep 17 00:00:00 2001 From: spycat88 Date: Tue, 23 Jan 2024 23:41:40 +0000 -Subject: [PATCH 06/47] arm64: meson: odroid-go-ultra: add DSI panel +Subject: [PATCH 06/44] arm64: meson: odroid-go-ultra: add DSI panel --- .../amlogic/meson-g12b-odroid-go-ultra.dts | 66 +++++++++++++++++++ diff --git a/projects/Amlogic/patches/linux/S922X/0007-arm64-meson-odroid-go-ultra-correct-voltages.patch b/projects/Amlogic/patches/linux/S922X/0007-arm64-meson-odroid-go-ultra-correct-voltages.patch index 3c8784e5c..d2b706ba2 100644 --- a/projects/Amlogic/patches/linux/S922X/0007-arm64-meson-odroid-go-ultra-correct-voltages.patch +++ b/projects/Amlogic/patches/linux/S922X/0007-arm64-meson-odroid-go-ultra-correct-voltages.patch @@ -1,7 +1,7 @@ -From e1ed80a968a8d76b49c32200093a452dd63b062c Mon Sep 17 00:00:00 2001 +From 263c479a06698696adc7ababb97bf312022fcdaf Mon Sep 17 00:00:00 2001 From: "Mauro (mdrjr) Ribeiro" Date: Tue, 23 Jan 2024 23:53:24 +0000 -Subject: [PATCH 07/47] arm64: meson: odroid-go-ultra: correct voltages +Subject: [PATCH 07/44] arm64: meson: odroid-go-ultra: correct voltages --- .../dts/amlogic/meson-g12b-odroid-go-ultra.dts | 16 +++++++--------- diff --git a/projects/Amlogic/patches/linux/S922X/0008-arm64-meson-odroid-go-ultra-add-over-clocking-freque.patch b/projects/Amlogic/patches/linux/S922X/0008-arm64-meson-odroid-go-ultra-add-over-clocking-freque.patch index 932196f3f..b024c4fbc 100644 --- a/projects/Amlogic/patches/linux/S922X/0008-arm64-meson-odroid-go-ultra-add-over-clocking-freque.patch +++ b/projects/Amlogic/patches/linux/S922X/0008-arm64-meson-odroid-go-ultra-add-over-clocking-freque.patch @@ -1,18 +1,19 @@ -From ec681bf5c90f5a8c3fbc9331146658e01abb5056 Mon Sep 17 00:00:00 2001 -From: "Mauro (mdrjr) Ribeiro" -Date: Wed, 24 Jan 2024 10:56:00 +0000 -Subject: [PATCH 08/47] arm64: meson: odroid-go-ultra: add over-clocking - frequencies +From 0869f9c56b47e2c63be274d72c97c51e227c18e4 Mon Sep 17 00:00:00 2001 +From: spycat88 +Date: Wed, 24 Jan 2024 11:37:48 +0000 +Subject: [PATCH 08/44] arm64: meson: odroid-go-ultra: add over-clocking + frequencies, specify as turbo mode so they are disabled by default and + increase vddcpu_a voltage regulator as needed --- - .../amlogic/meson-g12b-odroid-go-ultra.dts | 26 ++++++++++++++++++- - 1 file changed, 25 insertions(+), 1 deletion(-) + .../amlogic/meson-g12b-odroid-go-ultra.dts | 31 +++++++++++++++++-- + 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts -index 571a0393e148..1fcfe421ec73 100644 +index 571a0393e148..c3af3954a1e7 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts -@@ -347,7 +347,11 @@ opp-1896000000 { +@@ -347,7 +347,12 @@ opp-1896000000 { opp-microvolt = <987500>; }; opp-1992000000 { @@ -22,10 +23,11 @@ index 571a0393e148..1fcfe421ec73 100644 + opp-2016000000 { + opp-hz = /bits/ 64 <2016000000>; + opp-microvolt = <1050000>; ++ turbo-mode; }; }; -@@ -377,6 +381,26 @@ opp-1800000000 { +@@ -377,6 +382,28 @@ opp-1800000000 { opp-1908000000 { opp-microvolt = <1025000>; }; @@ -44,14 +46,25 @@ index 571a0393e148..1fcfe421ec73 100644 + opp-2304000000 { + opp-hz = /bits/ 64 <2304000000>; + opp-microvolt = <1050000>; ++ turbo-mode; + }; + opp-2400000000 { + opp-hz = /bits/ 64 <2400000000>; + opp-microvolt = <1050000>; ++ turbo-mode; + }; }; &i2c_AO { +@@ -407,7 +434,7 @@ vddcpu_a: DCDC_REG1 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <775000>; +- regulator-max-microvolt = <1025000>; ++ regulator-max-microvolt = <1050000>; + regulator-ramp-delay = <6001>; + regulator-state-mem { + regulator-on-in-suspend; -- 2.34.1 diff --git a/projects/Amlogic/patches/linux/S922X/0009-arm64-meson-odroid-go-ultra-specify-overclocking-fre.patch b/projects/Amlogic/patches/linux/S922X/0009-arm64-meson-odroid-go-ultra-specify-overclocking-fre.patch deleted file mode 100644 index 994169d2b..000000000 --- a/projects/Amlogic/patches/linux/S922X/0009-arm64-meson-odroid-go-ultra-specify-overclocking-fre.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 00e37983d1a7995ea7ade8a42e5597b18e5087c9 Mon Sep 17 00:00:00 2001 -From: spycat88 -Date: Wed, 24 Jan 2024 11:37:48 +0000 -Subject: [PATCH 09/47] arm64: meson: odroid-go-ultra: specify overclocking - frequencies as turbo mode - ---- - arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts -index 1fcfe421ec73..74e1a315bfb1 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts -@@ -352,6 +352,7 @@ opp-1992000000 { - opp-2016000000 { - opp-hz = /bits/ 64 <2016000000>; - opp-microvolt = <1050000>; -+ turbo-mode; - }; - }; - -@@ -396,10 +397,12 @@ opp-2208000000 { - opp-2304000000 { - opp-hz = /bits/ 64 <2304000000>; - opp-microvolt = <1050000>; -+ turbo-mode; - }; - opp-2400000000 { - opp-hz = /bits/ 64 <2400000000>; - opp-microvolt = <1050000>; -+ turbo-mode; - }; - }; - --- -2.34.1 - diff --git a/projects/Amlogic/patches/linux/S922X/0012-gpiolib-of-revert-api-changes-needed-for-joypad-driv.patch b/projects/Amlogic/patches/linux/S922X/0009-gpiolib-of-revert-api-changes-needed-for-joypad-driv.patch similarity index 98% rename from projects/Amlogic/patches/linux/S922X/0012-gpiolib-of-revert-api-changes-needed-for-joypad-driv.patch rename to projects/Amlogic/patches/linux/S922X/0009-gpiolib-of-revert-api-changes-needed-for-joypad-driv.patch index a0f085c2a..5428878b0 100644 --- a/projects/Amlogic/patches/linux/S922X/0012-gpiolib-of-revert-api-changes-needed-for-joypad-driv.patch +++ b/projects/Amlogic/patches/linux/S922X/0009-gpiolib-of-revert-api-changes-needed-for-joypad-driv.patch @@ -1,7 +1,7 @@ -From f60b0441c4c5dfc29373473409d9da3111a136c9 Mon Sep 17 00:00:00 2001 +From a2a47a8b3f3235dded76dfc1e10052d1ea8f89fc Mon Sep 17 00:00:00 2001 From: brooksytech <1673861+brooksytech@users.noreply.github.com> Date: Wed, 24 Jan 2024 22:12:01 +0000 -Subject: [PATCH 12/47] gpiolib: of: revert api changes needed for joypad +Subject: [PATCH 09/44] gpiolib: of: revert api changes needed for joypad driver --- diff --git a/projects/Amlogic/patches/linux/S922X/0010-arm64-meson-odroid-go-ultra-remove-adc-joystick.patch b/projects/Amlogic/patches/linux/S922X/0010-arm64-meson-odroid-go-ultra-remove-adc-joystick.patch deleted file mode 100644 index 8953aaa7e..000000000 --- a/projects/Amlogic/patches/linux/S922X/0010-arm64-meson-odroid-go-ultra-remove-adc-joystick.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 93fb777037c083b8694e61caf869ca8a76cad368 Mon Sep 17 00:00:00 2001 -From: "Mauro (mdrjr) Ribeiro" -Date: Wed, 24 Jan 2024 12:08:19 +0000 -Subject: [PATCH 10/47] arm64: meson: odroid-go-ultra: remove adc joystick - ---- - .../amlogic/meson-g12b-odroid-go-ultra.dts | 46 ------------------- - 1 file changed, 46 deletions(-) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts -index 74e1a315bfb1..30c48311f165 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts -@@ -21,52 +21,6 @@ aliases { - rtc0 = &vrtc; - }; - -- adc-joystick-left { -- compatible = "adc-joystick"; -- io-channels = <&saradc 2>, <&saradc 3>; -- poll-interval = <10>; -- #address-cells = <1>; -- #size-cells = <0>; -- -- axis@0 { -- reg = <0>; -- linux,code = ; -- abs-range = <3150 950>; -- abs-fuzz = <32>; -- abs-flat = <64>; -- }; -- axis@1 { -- reg = <1>; -- linux,code = ; -- abs-range = <700 2900>; -- abs-fuzz = <32>; -- abs-flat = <64>; -- }; -- }; -- -- adc-joystick-right { -- compatible = "adc-joystick"; -- io-channels = <&saradc 0>, <&saradc 1>; -- poll-interval = <10>; -- #address-cells = <1>; -- #size-cells = <0>; -- -- axis@0 { -- reg = <0>; -- linux,code = ; -- abs-range = <3150 950>; -- abs-fuzz = <32>; -- abs-flat = <64>; -- }; -- axis@1 { -- reg = <1>; -- linux,code = ; -- abs-range = <800 3000>; -- abs-fuzz = <32>; -- abs-flat = <64>; -- }; -- }; -- - chosen { - stdout-path = "serial0:115200n8"; - }; --- -2.34.1 - diff --git a/projects/Amlogic/patches/linux/S922X/0013-input-add-input-polldev-driver.patch b/projects/Amlogic/patches/linux/S922X/0010-input-add-input-polldev-driver.patch similarity index 99% rename from projects/Amlogic/patches/linux/S922X/0013-input-add-input-polldev-driver.patch rename to projects/Amlogic/patches/linux/S922X/0010-input-add-input-polldev-driver.patch index b3fccebb1..cf06685e2 100644 --- a/projects/Amlogic/patches/linux/S922X/0013-input-add-input-polldev-driver.patch +++ b/projects/Amlogic/patches/linux/S922X/0010-input-add-input-polldev-driver.patch @@ -1,7 +1,7 @@ -From fd2667a4ecc5c238e30532e3692224eaafb9941c Mon Sep 17 00:00:00 2001 +From 2f3e05182321bd7e6b8ad2335f1ed0751f006918 Mon Sep 17 00:00:00 2001 From: brooksytech <1673861+brooksytech@users.noreply.github.com> Date: Wed, 24 Jan 2024 21:50:05 +0000 -Subject: [PATCH 13/47] input: add input-polldev driver +Subject: [PATCH 10/44] input: add input-polldev driver --- drivers/input/Kconfig | 13 ++ diff --git a/projects/Amlogic/patches/linux/S922X/0011-drm-meson-venc-HACK-panic-when-gamma-is-not-set-corr.patch b/projects/Amlogic/patches/linux/S922X/0011-drm-meson-venc-HACK-panic-when-gamma-is-not-set-corr.patch deleted file mode 100644 index 780224c51..000000000 --- a/projects/Amlogic/patches/linux/S922X/0011-drm-meson-venc-HACK-panic-when-gamma-is-not-set-corr.patch +++ /dev/null @@ -1,47 +0,0 @@ -From f7953ce9ce913f80fd249208c3a8270d38b154f7 Mon Sep 17 00:00:00 2001 -From: brooksytech <1673861+brooksytech@users.noreply.github.com> -Date: Wed, 24 Jan 2024 16:18:45 +0000 -Subject: [PATCH 11/47] drm: meson: venc: HACK: panic when gamma is not set - correctly - ---- - drivers/gpu/drm/meson/meson_venc.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/drivers/gpu/drm/meson/meson_venc.c b/drivers/gpu/drm/meson/meson_venc.c -index 3bf0d6e4fc30..ace2e6c21f69 100644 ---- a/drivers/gpu/drm/meson/meson_venc.c -+++ b/drivers/gpu/drm/meson/meson_venc.c -@@ -1590,7 +1590,8 @@ static void meson_encl_set_gamma_table(struct meson_drm *priv, u16 *data, - ret = readl_relaxed_poll_timeout(priv->io_base + _REG(L_GAMMA_CNTL_PORT), - reg, reg & L_GAMMA_CNTL_PORT_ADR_RDY, 10, 10000); - if (ret) -- pr_warn("%s: GAMMA ADR_RDY timeout\n", __func__); -+ //pr_warn("%s: GAMMA ADR_RDY timeout\n", __func__); -+ panic("NOT ENOUGH SALT, GAMMA NOT SET"); - - writel_relaxed(L_GAMMA_ADDR_PORT_AUTO_INC | rgb_mask | - FIELD_PREP(L_GAMMA_ADDR_PORT_ADDR, 0), -@@ -1601,7 +1602,8 @@ static void meson_encl_set_gamma_table(struct meson_drm *priv, u16 *data, - reg, reg & L_GAMMA_CNTL_PORT_WR_RDY, - 10, 10000); - if (ret) -- pr_warn_once("%s: GAMMA WR_RDY timeout\n", __func__); -+ //pr_warn_once("%s: GAMMA WR_RDY timeout\n", __func__); -+ panic("NOT ENOUGH SALT, GAMMA NOT SET"); - - writel_relaxed(data[i], priv->io_base + _REG(L_GAMMA_DATA_PORT)); - } -@@ -1609,7 +1611,8 @@ static void meson_encl_set_gamma_table(struct meson_drm *priv, u16 *data, - ret = readl_relaxed_poll_timeout(priv->io_base + _REG(L_GAMMA_CNTL_PORT), - reg, reg & L_GAMMA_CNTL_PORT_ADR_RDY, 10, 10000); - if (ret) -- pr_warn("%s: GAMMA ADR_RDY timeout\n", __func__); -+ //pr_warn("%s: GAMMA ADR_RDY timeout\n", __func__); -+ panic("NOT ENOUGH SALT, GAMMA NOT SET"); - - writel_relaxed(L_GAMMA_ADDR_PORT_AUTO_INC | rgb_mask | - FIELD_PREP(L_GAMMA_ADDR_PORT_ADDR, 0x23), --- -2.34.1 - diff --git a/projects/Amlogic/patches/linux/S922X/0014-input-joystick-add-odroid-go-ultra-joypad-driver.patch b/projects/Amlogic/patches/linux/S922X/0011-input-joystick-add-odroid-go-ultra-joypad-driver.patch similarity index 99% rename from projects/Amlogic/patches/linux/S922X/0014-input-joystick-add-odroid-go-ultra-joypad-driver.patch rename to projects/Amlogic/patches/linux/S922X/0011-input-joystick-add-odroid-go-ultra-joypad-driver.patch index d2eb9b1fe..b457bd06f 100644 --- a/projects/Amlogic/patches/linux/S922X/0014-input-joystick-add-odroid-go-ultra-joypad-driver.patch +++ b/projects/Amlogic/patches/linux/S922X/0011-input-joystick-add-odroid-go-ultra-joypad-driver.patch @@ -1,7 +1,7 @@ -From 778159de804d4356e242857bc246d6f369bcd504 Mon Sep 17 00:00:00 2001 +From 8321fa2704f8e4a8a916994d3564995034190357 Mon Sep 17 00:00:00 2001 From: brooksytech <1673861+brooksytech@users.noreply.github.com> Date: Wed, 24 Jan 2024 21:55:38 +0000 -Subject: [PATCH 14/47] input: joystick: add odroid-go ultra-joypad driver +Subject: [PATCH 11/44] input: joystick: add odroid-go ultra-joypad driver --- drivers/input/joystick/Kconfig | 6 + diff --git a/projects/Amlogic/patches/linux/S922X/0015-arm64-meson-odroid-go-ultra-add-joypad.patch b/projects/Amlogic/patches/linux/S922X/0012-arm64-meson-odroid-go-ultra-add-joypad.patch similarity index 79% rename from projects/Amlogic/patches/linux/S922X/0015-arm64-meson-odroid-go-ultra-add-joypad.patch rename to projects/Amlogic/patches/linux/S922X/0012-arm64-meson-odroid-go-ultra-add-joypad.patch index 5be72d997..3d5bded51 100644 --- a/projects/Amlogic/patches/linux/S922X/0015-arm64-meson-odroid-go-ultra-add-joypad.patch +++ b/projects/Amlogic/patches/linux/S922X/0012-arm64-meson-odroid-go-ultra-add-joypad.patch @@ -1,17 +1,70 @@ -From aa9698b72b0d961c6dafd491b974d444405dbf11 Mon Sep 17 00:00:00 2001 +From 8ec3462157e94af211573c3706d54d225ceec576 Mon Sep 17 00:00:00 2001 From: brooksytech <1673861+brooksytech@users.noreply.github.com> Date: Wed, 24 Jan 2024 21:57:34 +0000 -Subject: [PATCH 15/47] arm64: meson: odroid-go-ultra: add joypad +Subject: [PATCH 12/44] arm64: meson: odroid-go-ultra: add joypad --- - .../amlogic/meson-g12b-odroid-go-ultra.dts | 156 +++++++++++------- - 1 file changed, 93 insertions(+), 63 deletions(-) + .../amlogic/meson-g12b-odroid-go-ultra.dts | 202 ++++++++---------- + 1 file changed, 93 insertions(+), 109 deletions(-) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts -index 30c48311f165..005b19251633 100644 +index c3af3954a1e7..206044f8456b 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts -@@ -34,9 +34,8 @@ codec_clk: codec-clk { +@@ -21,52 +21,6 @@ aliases { + rtc0 = &vrtc; + }; + +- adc-joystick-left { +- compatible = "adc-joystick"; +- io-channels = <&saradc 2>, <&saradc 3>; +- poll-interval = <10>; +- #address-cells = <1>; +- #size-cells = <0>; +- +- axis@0 { +- reg = <0>; +- linux,code = ; +- abs-range = <3150 950>; +- abs-fuzz = <32>; +- abs-flat = <64>; +- }; +- axis@1 { +- reg = <1>; +- linux,code = ; +- abs-range = <700 2900>; +- abs-fuzz = <32>; +- abs-flat = <64>; +- }; +- }; +- +- adc-joystick-right { +- compatible = "adc-joystick"; +- io-channels = <&saradc 0>, <&saradc 1>; +- poll-interval = <10>; +- #address-cells = <1>; +- #size-cells = <0>; +- +- axis@0 { +- reg = <0>; +- linux,code = ; +- abs-range = <3150 950>; +- abs-fuzz = <32>; +- abs-flat = <64>; +- }; +- axis@1 { +- reg = <1>; +- linux,code = ; +- abs-range = <800 3000>; +- abs-fuzz = <32>; +- abs-flat = <64>; +- }; +- }; +- + chosen { + stdout-path = "serial0:115200n8"; + }; +@@ -80,9 +34,8 @@ codec_clk: codec-clk { gpio-keys { compatible = "gpio-keys-polled"; @@ -23,7 +76,7 @@ index 30c48311f165..005b19251633 100644 volume-up-button { label = "VOLUME-UP"; -@@ -48,95 +47,126 @@ volume-down-button { +@@ -94,95 +47,126 @@ volume-down-button { linux,code = ; gpios = <&gpio GPIOX_9 GPIO_ACTIVE_LOW>; }; diff --git a/projects/Amlogic/patches/linux/S922X/0016-arm64-meson-odroid-disable-heartbeat.patch b/projects/Amlogic/patches/linux/S922X/0013-arm64-meson-odroid-disable-heartbeat.patch similarity index 88% rename from projects/Amlogic/patches/linux/S922X/0016-arm64-meson-odroid-disable-heartbeat.patch rename to projects/Amlogic/patches/linux/S922X/0013-arm64-meson-odroid-disable-heartbeat.patch index 01157015c..ca8ade560 100644 --- a/projects/Amlogic/patches/linux/S922X/0016-arm64-meson-odroid-disable-heartbeat.patch +++ b/projects/Amlogic/patches/linux/S922X/0013-arm64-meson-odroid-disable-heartbeat.patch @@ -1,7 +1,7 @@ -From ac16a82047615767f2156b782c6cabc7902d3932 Mon Sep 17 00:00:00 2001 +From badcabb07a6e4f056834443039d054072f23d9e1 Mon Sep 17 00:00:00 2001 From: spycat88 Date: Wed, 24 Jan 2024 22:22:49 +0000 -Subject: [PATCH 16/47] arm64: meson: odroid: disable heartbeat +Subject: [PATCH 13/44] arm64: meson: odroid: disable heartbeat --- arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts | 2 +- @@ -9,7 +9,7 @@ Subject: [PATCH 16/47] arm64: meson: odroid: disable heartbeat 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts -index 005b19251633..d3a1521317c3 100644 +index 206044f8456b..1d26387776e6 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts @@ -194,7 +194,7 @@ leds { diff --git a/projects/Amlogic/patches/linux/S922X/0017-arm64-meson-g12-common-add-mali-to-dts.patch b/projects/Amlogic/patches/linux/S922X/0014-arm64-meson-g12-common-add-mali-to-dts.patch similarity index 93% rename from projects/Amlogic/patches/linux/S922X/0017-arm64-meson-g12-common-add-mali-to-dts.patch rename to projects/Amlogic/patches/linux/S922X/0014-arm64-meson-g12-common-add-mali-to-dts.patch index e0a98b24c..d100f0e9b 100644 --- a/projects/Amlogic/patches/linux/S922X/0017-arm64-meson-g12-common-add-mali-to-dts.patch +++ b/projects/Amlogic/patches/linux/S922X/0014-arm64-meson-g12-common-add-mali-to-dts.patch @@ -1,7 +1,7 @@ -From f8404960bde38a0f1bdd50a032b1a1bb69ed826c Mon Sep 17 00:00:00 2001 +From 1de7a39ee1c2b6ec6c5ce375d6774ac703cc02a7 Mon Sep 17 00:00:00 2001 From: brooksytech <1673861+brooksytech@users.noreply.github.com> Date: Wed, 24 Jan 2024 23:56:58 +0000 -Subject: [PATCH 17/47] arm64: meson: g12-common: add mali to dts +Subject: [PATCH 14/44] arm64: meson: g12-common: add mali to dts --- .../arm64/boot/dts/amlogic/meson-g12-common.dtsi | 16 +++++++++++----- diff --git a/projects/Amlogic/patches/linux/S922X/0019-arm64-meson-add-dt-for-powkiddy-rgb10-max-3-pro.patch b/projects/Amlogic/patches/linux/S922X/0015-arm64-meson-add-dt-for-powkiddy-rgb10-max-3-pro.patch similarity index 93% rename from projects/Amlogic/patches/linux/S922X/0019-arm64-meson-add-dt-for-powkiddy-rgb10-max-3-pro.patch rename to projects/Amlogic/patches/linux/S922X/0015-arm64-meson-add-dt-for-powkiddy-rgb10-max-3-pro.patch index 21c71109d..447b69a74 100644 --- a/projects/Amlogic/patches/linux/S922X/0019-arm64-meson-add-dt-for-powkiddy-rgb10-max-3-pro.patch +++ b/projects/Amlogic/patches/linux/S922X/0015-arm64-meson-add-dt-for-powkiddy-rgb10-max-3-pro.patch @@ -1,7 +1,7 @@ -From 1a90a6b132f0175e2912559cff94ea2c85534131 Mon Sep 17 00:00:00 2001 +From 7d53adc4da9bb4dc992b4247e9cf528e1c6fb288 Mon Sep 17 00:00:00 2001 From: spycat88 Date: Fri, 26 Jan 2024 17:55:02 +0000 -Subject: [PATCH 19/47] arm64: meson: add dt for powkiddy-rgb10-max-3-pro +Subject: [PATCH 15/44] arm64: meson: add dt for powkiddy-rgb10-max-3-pro --- .../meson-g12b-powkiddy-rgb10-max-3-pro.dts | 54 +++++++++++++++++++ diff --git a/projects/Amlogic/patches/linux/S922X/0016-power-rk818-Configure-rk808-clkout2-function.patch b/projects/Amlogic/patches/linux/S922X/0016-power-rk818-Configure-rk808-clkout2-function.patch new file mode 100644 index 000000000..50725e63b --- /dev/null +++ b/projects/Amlogic/patches/linux/S922X/0016-power-rk818-Configure-rk808-clkout2-function.patch @@ -0,0 +1,44 @@ +From fff6d5ad0f054463f0fc67485b596e6239e13516 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= +Date: Mon, 4 Jan 2021 17:57:49 +0100 +Subject: [PATCH 16/44] power: rk818: Configure `rk808-clkout2` function +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +??? + +Signed-of-by: Kamil Trzciński +--- + drivers/mfd/rk8xx-core.c | 1 + + include/linux/mfd/rk808.h | 2 ++ + 2 files changed, 3 insertions(+) + +diff --git a/drivers/mfd/rk8xx-core.c b/drivers/mfd/rk8xx-core.c +index b1ffc3b9e2be..2747a296a0a6 100644 +--- a/drivers/mfd/rk8xx-core.c ++++ b/drivers/mfd/rk8xx-core.c +@@ -250,6 +250,7 @@ static const struct rk808_reg_data rk818_pre_init_reg[] = { + { RK818_H5V_EN_REG, BIT(0), RK818_H5V_EN }, + { RK808_VB_MON_REG, MASK_ALL, VB_LO_ACT | + VB_LO_SEL_3500MV }, ++ { RK808_CLK32OUT_REG, CLK32KOUT2_FUNC_MASK, CLK32KOUT2_FUNC }, + }; + + static const struct regmap_irq rk805_irqs[] = { +diff --git a/include/linux/mfd/rk808.h b/include/linux/mfd/rk808.h +index 78e167a92483..4a44e8744331 100644 +--- a/include/linux/mfd/rk808.h ++++ b/include/linux/mfd/rk808.h +@@ -790,6 +790,8 @@ enum rk806_dvs_mode { + + #define VOUT_LO_INT BIT(0) + #define CLK32KOUT2_EN BIT(0) ++#define CLK32KOUT2_FUNC (0 << 1) ++#define CLK32KOUT2_FUNC_MASK BIT(1) + + #define TEMP115C 0x0c + #define TEMP_HOTDIE_MSK 0x0c +-- +2.34.1 + diff --git a/projects/Amlogic/patches/linux/S922X/0020-power-supply-rk818-battery-Add-battery-driver-for-RK.patch b/projects/Amlogic/patches/linux/S922X/0017-power-supply-rk818-battery-Add-battery-driver-for-RK.patch similarity index 99% rename from projects/Amlogic/patches/linux/S922X/0020-power-supply-rk818-battery-Add-battery-driver-for-RK.patch rename to projects/Amlogic/patches/linux/S922X/0017-power-supply-rk818-battery-Add-battery-driver-for-RK.patch index 3ceeb193d..381a81209 100644 --- a/projects/Amlogic/patches/linux/S922X/0020-power-supply-rk818-battery-Add-battery-driver-for-RK.patch +++ b/projects/Amlogic/patches/linux/S922X/0017-power-supply-rk818-battery-Add-battery-driver-for-RK.patch @@ -1,7 +1,7 @@ -From 7f6e7d9ff60a8c5377a7699d107bd4041d2b75eb Mon Sep 17 00:00:00 2001 +From 302adba82133c44efee29d357bab89462d7cd52c Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Sun, 11 Jun 2023 18:29:24 +0200 -Subject: [PATCH 20/47] power: supply: rk818-battery: Add battery driver for +Subject: [PATCH 17/44] power: supply: rk818-battery: Add battery driver for RK818 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -11,29 +11,25 @@ This is forward ported driver from Rockchip BSP. Signed-of-by: Kamil Trzciński --- - drivers/mfd/rk8xx-core.c | 6 +- + drivers/mfd/rk8xx-core.c | 2 + drivers/mfd/rk8xx-i2c.c | 38 +- - drivers/power/supply/Kconfig | 17 + + drivers/power/supply/Kconfig | 8 + drivers/power/supply/Makefile | 1 + drivers/power/supply/rk818_battery.c | 3568 ++++++++++++++++++++++++++ drivers/power/supply/rk818_battery.h | 168 ++ include/linux/mfd/rk808.h | 81 +- - 7 files changed, 3874 insertions(+), 5 deletions(-) + 7 files changed, 3863 insertions(+), 3 deletions(-) create mode 100644 drivers/power/supply/rk818_battery.c create mode 100644 drivers/power/supply/rk818_battery.h diff --git a/drivers/mfd/rk8xx-core.c b/drivers/mfd/rk8xx-core.c -index b1ffc3b9e2be..05175284079e 100644 +index 2747a296a0a6..64b6e0e59e15 100644 --- a/drivers/mfd/rk8xx-core.c +++ b/drivers/mfd/rk8xx-core.c -@@ -109,8 +109,10 @@ static const struct mfd_cell rk817s[] = { - }; - +@@ -111,6 +111,8 @@ static const struct mfd_cell rk817s[] = { static const struct mfd_cell rk818s[] = { -- { .name = "rk808-clkout", }, -- { .name = "rk808-regulator", }, -+ { .name = "rk808-clkout", .id = PLATFORM_DEVID_NONE, }, -+ { .name = "rk808-regulator", .id = PLATFORM_DEVID_NONE, }, + { .name = "rk808-clkout", }, + { .name = "rk808-regulator", }, + { .name = "rk818-battery", .of_compatible = "rockchip,rk818-battery", }, + { .name = "rk818-charger", .of_compatible = "rockchip,rk818-charger", }, { @@ -94,22 +90,13 @@ index 75b5cf09d5a0..3d9632fb3554 100644 static const struct regmap_config rk805_regmap_config = { diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig -index 3e31375491d5..339949723ff8 100644 +index 3e31375491d5..6ad47fe5f089 100644 --- a/drivers/power/supply/Kconfig +++ b/drivers/power/supply/Kconfig -@@ -985,4 +985,21 @@ config FUEL_GAUGE_MM8013 +@@ -985,4 +985,12 @@ config FUEL_GAUGE_MM8013 the state of charge, temperature, cycle count, actual and design capacity, etc. -+config FUEL_GAUGE_MM8013 -+ tristate "Mitsumi MM8013 fuel gauge driver" -+ depends on I2C -+ help -+ Say Y here to enable the Mitsumi MM8013 fuel gauge driver. -+ It enables the monitoring of many battery parameters, including -+ the state of charge, temperature, cycle count, actual and design -+ capacity, etc. -+ +config BATTERY_RK818 + bool "RK818 Battery driver" + depends on MFD_RK808 @@ -3879,7 +3866,7 @@ index 000000000000..2f4430a98167 +#endif \ No newline at end of file diff --git a/include/linux/mfd/rk808.h b/include/linux/mfd/rk808.h -index 78e167a92483..05d61ae8a0f5 100644 +index 4a44e8744331..e06ecffaf6bc 100644 --- a/include/linux/mfd/rk808.h +++ b/include/linux/mfd/rk808.h @@ -138,6 +138,8 @@ enum rk818_reg { diff --git a/projects/Amlogic/patches/linux/S922X/0018-arm64-meson-odroid-go-ultra-increase-vddcpu_a-voltag.patch b/projects/Amlogic/patches/linux/S922X/0018-arm64-meson-odroid-go-ultra-increase-vddcpu_a-voltag.patch deleted file mode 100644 index 979df2389..000000000 --- a/projects/Amlogic/patches/linux/S922X/0018-arm64-meson-odroid-go-ultra-increase-vddcpu_a-voltag.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ed1968bca88f4040abe8f3f1267cf95655f9640e Mon Sep 17 00:00:00 2001 -From: spycat88 -Date: Thu, 25 Jan 2024 00:32:40 +0000 -Subject: [PATCH 18/47] arm64: meson: odroid-go-ultra: increase vddcpu_a - voltage for overclock - ---- - arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts -index d3a1521317c3..1d26387776e6 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts -@@ -418,7 +418,7 @@ vddcpu_a: DCDC_REG1 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <775000>; -- regulator-max-microvolt = <1025000>; -+ regulator-max-microvolt = <1050000>; - regulator-ramp-delay = <6001>; - regulator-state-mem { - regulator-on-in-suspend; --- -2.34.1 - diff --git a/projects/Amlogic/patches/linux/S922X/0021-power-supply-rk818-battery-Use-a-more-propper-compat.patch b/projects/Amlogic/patches/linux/S922X/0018-power-supply-rk818-battery-Use-a-more-propper-compat.patch similarity index 88% rename from projects/Amlogic/patches/linux/S922X/0021-power-supply-rk818-battery-Use-a-more-propper-compat.patch rename to projects/Amlogic/patches/linux/S922X/0018-power-supply-rk818-battery-Use-a-more-propper-compat.patch index 26ee2d4cc..d126a9952 100644 --- a/projects/Amlogic/patches/linux/S922X/0021-power-supply-rk818-battery-Use-a-more-propper-compat.patch +++ b/projects/Amlogic/patches/linux/S922X/0018-power-supply-rk818-battery-Use-a-more-propper-compat.patch @@ -1,7 +1,7 @@ -From ce7174bde8ba1437d8e9a0cf2eec7a1d7b5dd983 Mon Sep 17 00:00:00 2001 +From aebc99b0f9145bb9d47c73ce64693ef723c63705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= Date: Sun, 7 Nov 2021 19:30:07 +0100 -Subject: [PATCH 21/47] power: supply: rk818-battery: Use a more propper +Subject: [PATCH 18/44] power: supply: rk818-battery: Use a more propper compatible string Prefix with vendor name. diff --git a/projects/Amlogic/patches/linux/S922X/0022-power-supply-rk818-charger-Implement-charger-driver-.patch b/projects/Amlogic/patches/linux/S922X/0019-power-supply-rk818-charger-Implement-charger-driver-.patch similarity index 97% rename from projects/Amlogic/patches/linux/S922X/0022-power-supply-rk818-charger-Implement-charger-driver-.patch rename to projects/Amlogic/patches/linux/S922X/0019-power-supply-rk818-charger-Implement-charger-driver-.patch index ac7736003..f6658a6b7 100644 --- a/projects/Amlogic/patches/linux/S922X/0022-power-supply-rk818-charger-Implement-charger-driver-.patch +++ b/projects/Amlogic/patches/linux/S922X/0019-power-supply-rk818-charger-Implement-charger-driver-.patch @@ -1,7 +1,7 @@ -From efcf09f674d45815fef27f5b214b89bf1b648ea9 Mon Sep 17 00:00:00 2001 +From e642f1bae35b8ab7f6db133d152e424bb1913e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= Date: Sun, 7 Nov 2021 20:09:02 +0100 -Subject: [PATCH 22/47] power: supply: rk818-charger: Implement charger driver +Subject: [PATCH 19/44] power: supply: rk818-charger: Implement charger driver for RK818 PMIC For now this driver is just meant to watch Type-C power supply @@ -12,15 +12,15 @@ Signed-off-by: Ondrej Jirman --- drivers/power/supply/Kconfig | 8 + drivers/power/supply/Makefile | 1 + - drivers/power/supply/rk818_charger.c | 650 +++++++++++++++++++++++++++ - 3 files changed, 659 insertions(+) + drivers/power/supply/rk818_charger.c | 651 +++++++++++++++++++++++++++ + 3 files changed, 660 insertions(+) create mode 100644 drivers/power/supply/rk818_charger.c diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig -index 339949723ff8..cf9e928acc23 100644 +index 6ad47fe5f089..7813b6e057fd 100644 --- a/drivers/power/supply/Kconfig +++ b/drivers/power/supply/Kconfig -@@ -1002,4 +1002,12 @@ config BATTERY_RK818 +@@ -993,4 +993,12 @@ config BATTERY_RK818 If you say yes here you will get support for the battery of RK818 PMIC. This driver can give support for Rk818 Battery Charge Interface. @@ -44,10 +44,10 @@ index aa3de47be2c5..5a2480aca754 100644 +obj-$(CONFIG_CHARGER_RK818) += rk818_charger.o diff --git a/drivers/power/supply/rk818_charger.c b/drivers/power/supply/rk818_charger.c new file mode 100644 -index 000000000000..00fe5d8f4785 +index 000000000000..7b4dd9291d3e --- /dev/null +++ b/drivers/power/supply/rk818_charger.c -@@ -0,0 +1,650 @@ +@@ -0,0 +1,651 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * rk818 usb power driver @@ -57,6 +57,7 @@ index 000000000000..00fe5d8f4785 +#include +#include +#include ++#include +#include +#include +#include diff --git a/projects/Amlogic/patches/linux/S922X/0023-power-supply-rk818-charger-Change-charger-type-to-MA.patch b/projects/Amlogic/patches/linux/S922X/0020-power-supply-rk818-charger-Change-charger-type-to-MA.patch similarity index 77% rename from projects/Amlogic/patches/linux/S922X/0023-power-supply-rk818-charger-Change-charger-type-to-MA.patch rename to projects/Amlogic/patches/linux/S922X/0020-power-supply-rk818-charger-Change-charger-type-to-MA.patch index 97a1e77d3..b4aa028a6 100644 --- a/projects/Amlogic/patches/linux/S922X/0023-power-supply-rk818-charger-Change-charger-type-to-MA.patch +++ b/projects/Amlogic/patches/linux/S922X/0020-power-supply-rk818-charger-Change-charger-type-to-MA.patch @@ -1,7 +1,7 @@ -From 76e4dde0fbef5630fde3206947f3dd901aa8e01c Mon Sep 17 00:00:00 2001 +From 3c1508046c0054680475d856f461af47e47b7a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= Date: Thu, 13 Jan 2022 13:53:03 +0100 -Subject: [PATCH 23/47] power: supply: rk818-charger: Change charger type to +Subject: [PATCH 20/44] power: supply: rk818-charger: Change charger type to MAINS To un-confuse userspace. @@ -12,10 +12,10 @@ Signed-off-by: Ondrej Jirman 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply/rk818_charger.c b/drivers/power/supply/rk818_charger.c -index 00fe5d8f4785..6a9f2d1a7086 100644 +index 7b4dd9291d3e..27574c061f83 100644 --- a/drivers/power/supply/rk818_charger.c +++ b/drivers/power/supply/rk818_charger.c -@@ -535,7 +535,7 @@ static enum power_supply_property rk818_charger_props[] = { +@@ -536,7 +536,7 @@ static enum power_supply_property rk818_charger_props[] = { */ static const struct power_supply_desc rk818_charger_desc = { .name = "rk818-charger", diff --git a/projects/Amlogic/patches/linux/S922X/0024-power-supply-rk818-battery-Report-charging-status-ba.patch b/projects/Amlogic/patches/linux/S922X/0021-power-supply-rk818-battery-Report-charging-status-ba.patch similarity index 94% rename from projects/Amlogic/patches/linux/S922X/0024-power-supply-rk818-battery-Report-charging-status-ba.patch rename to projects/Amlogic/patches/linux/S922X/0021-power-supply-rk818-battery-Report-charging-status-ba.patch index 964bd6afa..2ad37fdf7 100644 --- a/projects/Amlogic/patches/linux/S922X/0024-power-supply-rk818-battery-Report-charging-status-ba.patch +++ b/projects/Amlogic/patches/linux/S922X/0021-power-supply-rk818-battery-Report-charging-status-ba.patch @@ -1,7 +1,7 @@ -From 191d1a2c1695c6097b09e53c8ccc5046ea333128 Mon Sep 17 00:00:00 2001 +From c1f960ec0b5e110aa7029b147d070114902e37ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= Date: Fri, 21 Jan 2022 11:38:00 +0100 -Subject: [PATCH 24/47] power: supply: rk818-battery: Report charging status +Subject: [PATCH 21/44] power: supply: rk818-battery: Report charging status based on charging current If the current is positive, battery is charging, if negative the battery diff --git a/projects/Amlogic/patches/linux/S922X/0025-power-supply-rk818-battery-Drop-dependency-on-frameb.patch b/projects/Amlogic/patches/linux/S922X/0022-power-supply-rk818-battery-Drop-dependency-on-frameb.patch similarity index 97% rename from projects/Amlogic/patches/linux/S922X/0025-power-supply-rk818-battery-Drop-dependency-on-frameb.patch rename to projects/Amlogic/patches/linux/S922X/0022-power-supply-rk818-battery-Drop-dependency-on-frameb.patch index e7597607c..440908830 100644 --- a/projects/Amlogic/patches/linux/S922X/0025-power-supply-rk818-battery-Drop-dependency-on-frameb.patch +++ b/projects/Amlogic/patches/linux/S922X/0022-power-supply-rk818-battery-Drop-dependency-on-frameb.patch @@ -1,7 +1,7 @@ -From e5f0f631e113885a04dc982b8a7d26ad9d531634 Mon Sep 17 00:00:00 2001 +From 7c930b83aee90136a3061bdd0626f3a75c42a357 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Tue, 17 May 2022 23:30:46 +0200 -Subject: [PATCH 25/47] power: supply: rk818-battery: Drop dependency on +Subject: [PATCH 22/44] power: supply: rk818-battery: Drop dependency on framebuffer It was bizarre anyway. Framebuffer is barely used on Linux anyway, diff --git a/projects/Amlogic/patches/linux/S922X/0026-power-supply-rk818-charger-Unify-rk818-charger-and-r.patch b/projects/Amlogic/patches/linux/S922X/0023-power-supply-rk818-charger-Unify-rk818-charger-and-r.patch similarity index 93% rename from projects/Amlogic/patches/linux/S922X/0026-power-supply-rk818-charger-Unify-rk818-charger-and-r.patch rename to projects/Amlogic/patches/linux/S922X/0023-power-supply-rk818-charger-Unify-rk818-charger-and-r.patch index 260bd9efd..3ef5b7c8d 100644 --- a/projects/Amlogic/patches/linux/S922X/0026-power-supply-rk818-charger-Unify-rk818-charger-and-r.patch +++ b/projects/Amlogic/patches/linux/S922X/0023-power-supply-rk818-charger-Unify-rk818-charger-and-r.patch @@ -1,7 +1,7 @@ -From a45b08858342283bf99885fb1a625540ff7ba637 Mon Sep 17 00:00:00 2001 +From 6a15e3e0c411654229eef72be04a19a61bc6ef07 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Sat, 4 Nov 2023 18:25:03 +0100 -Subject: [PATCH 26/47] power: supply: rk818-charger: Unify rk818-charger and +Subject: [PATCH 23/44] power: supply: rk818-charger: Unify rk818-charger and rk818-battery The BSP driver is still used, but there is now a one device handling @@ -17,10 +17,10 @@ Signed-off-by: Ondrej Jirman 4 files changed, 95 insertions(+), 33 deletions(-) diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig -index cf9e928acc23..d61af21a5bb4 100644 +index 7813b6e057fd..f8ef90ef48c0 100644 --- a/drivers/power/supply/Kconfig +++ b/drivers/power/supply/Kconfig -@@ -994,14 +994,6 @@ config FUEL_GAUGE_MM8013 +@@ -985,14 +985,6 @@ config FUEL_GAUGE_MM8013 the state of charge, temperature, cycle count, actual and design capacity, etc. @@ -145,10 +145,10 @@ index cc409b7aafb5..e0e5ed0e3d2a 100644 } diff --git a/drivers/power/supply/rk818_charger.c b/drivers/power/supply/rk818_charger.c -index 6a9f2d1a7086..16bc4686b547 100644 +index 27574c061f83..9cbb0790fe37 100644 --- a/drivers/power/supply/rk818_charger.c +++ b/drivers/power/supply/rk818_charger.c -@@ -355,14 +355,36 @@ static int rk818_charger_get_voltage_max(struct rk818_charger *cg, int *val) +@@ -356,14 +356,36 @@ static int rk818_charger_get_voltage_max(struct rk818_charger *cg, int *val) return 0; } @@ -185,7 +185,7 @@ index 6a9f2d1a7086..16bc4686b547 100644 switch (psp) { case POWER_SUPPLY_PROP_ONLINE: ret = regmap_read(cg->regmap, RK818_CHRG_CTRL_REG1, ®); -@@ -374,6 +396,20 @@ static int rk818_charger_get_property(struct power_supply *psy, +@@ -375,6 +397,20 @@ static int rk818_charger_get_property(struct power_supply *psy, val->intval = !!(reg & RK818_CHRG_CTRL_REG1_CHRG_EN); break; @@ -206,7 +206,7 @@ index 6a9f2d1a7086..16bc4686b547 100644 case POWER_SUPPLY_PROP_STATUS: ret = regmap_read(cg->regmap, RK818_SUP_STS_REG, ®); if (ret) -@@ -480,14 +516,18 @@ static int rk818_charger_set_property(struct power_supply *psy, +@@ -481,14 +517,18 @@ static int rk818_charger_set_property(struct power_supply *psy, int ret; switch (psp) { @@ -233,7 +233,7 @@ index 6a9f2d1a7086..16bc4686b547 100644 case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE: return rk818_charger_set_voltage_max(cg, val->intval); -@@ -506,7 +546,7 @@ static int rk818_charger_prop_writeable(struct power_supply *psy, +@@ -507,7 +547,7 @@ static int rk818_charger_prop_writeable(struct power_supply *psy, switch (psp) { case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT: case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE: @@ -242,7 +242,7 @@ index 6a9f2d1a7086..16bc4686b547 100644 return 1; default: -@@ -518,6 +558,7 @@ static enum power_supply_property rk818_charger_props[] = { +@@ -519,6 +559,7 @@ static enum power_supply_property rk818_charger_props[] = { POWER_SUPPLY_PROP_ONLINE, POWER_SUPPLY_PROP_HEALTH, POWER_SUPPLY_PROP_STATUS, @@ -250,7 +250,7 @@ index 6a9f2d1a7086..16bc4686b547 100644 POWER_SUPPLY_PROP_CHARGE_TYPE, POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT, POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT, -@@ -525,17 +566,25 @@ static enum power_supply_property rk818_charger_props[] = { +@@ -526,17 +567,25 @@ static enum power_supply_property rk818_charger_props[] = { POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX, POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX, POWER_SUPPLY_PROP_PRECHARGE_CURRENT, diff --git a/projects/Amlogic/patches/linux/S922X/0027-power-supply-rk818-battery-Speed-up-battery-current-.patch b/projects/Amlogic/patches/linux/S922X/0024-power-supply-rk818-battery-Speed-up-battery-current-.patch similarity index 90% rename from projects/Amlogic/patches/linux/S922X/0027-power-supply-rk818-battery-Speed-up-battery-current-.patch rename to projects/Amlogic/patches/linux/S922X/0024-power-supply-rk818-battery-Speed-up-battery-current-.patch index 78f1b38ac..905cd5df8 100644 --- a/projects/Amlogic/patches/linux/S922X/0027-power-supply-rk818-battery-Speed-up-battery-current-.patch +++ b/projects/Amlogic/patches/linux/S922X/0024-power-supply-rk818-battery-Speed-up-battery-current-.patch @@ -1,7 +1,7 @@ -From c6d718d63b69a8ffbf441356b3924f6da61ee5f6 Mon Sep 17 00:00:00 2001 +From a2d1c9fda708dfae3576bfdf68d296d83525422c Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Fri, 27 May 2022 03:07:54 +0200 -Subject: [PATCH 27/47] power: supply: rk818-battery: Speed up battery current +Subject: [PATCH 24/44] power: supply: rk818-battery: Speed up battery current readout PMIC does averaging, driver does averaging on top of that averaging, diff --git a/projects/Amlogic/patches/linux/S922X/0028-power-supply-rk818-charger-Delay-applying-input-curr.patch b/projects/Amlogic/patches/linux/S922X/0025-power-supply-rk818-charger-Delay-applying-input-curr.patch similarity index 83% rename from projects/Amlogic/patches/linux/S922X/0028-power-supply-rk818-charger-Delay-applying-input-curr.patch rename to projects/Amlogic/patches/linux/S922X/0025-power-supply-rk818-charger-Delay-applying-input-curr.patch index 43c9ec66f..0c31d5ab9 100644 --- a/projects/Amlogic/patches/linux/S922X/0028-power-supply-rk818-charger-Delay-applying-input-curr.patch +++ b/projects/Amlogic/patches/linux/S922X/0025-power-supply-rk818-charger-Delay-applying-input-curr.patch @@ -1,7 +1,7 @@ -From e80c768ae162d2d8d3d472047b2784ac5c39c5bd Mon Sep 17 00:00:00 2001 +From fc405dd4c01211adc53a264b3a7f36be33164d89 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Tue, 2 Aug 2022 09:37:05 +0200 -Subject: [PATCH 28/47] power: supply: rk818-charger: Delay applying input +Subject: [PATCH 25/44] power: supply: rk818-charger: Delay applying input current limit until first BC detection finishes When the phone boots for the first time, we only want to react to @@ -18,10 +18,10 @@ Signed-off-by: Ondrej Jirman 1 file changed, 17 insertions(+) diff --git a/drivers/power/supply/rk818_charger.c b/drivers/power/supply/rk818_charger.c -index 16bc4686b547..979165c98e5a 100644 +index 9cbb0790fe37..41e2cbd5ecc2 100644 --- a/drivers/power/supply/rk818_charger.c +++ b/drivers/power/supply/rk818_charger.c -@@ -51,6 +51,8 @@ struct rk818_charger { +@@ -52,6 +52,8 @@ struct rk818_charger { struct power_supply *usb_psy; struct power_supply *charger_psy; @@ -30,7 +30,7 @@ index 16bc4686b547..979165c98e5a 100644 }; // {{{ USB supply -@@ -72,6 +74,8 @@ static int rk818_usb_set_input_current_max(struct rk818_charger *cg, +@@ -73,6 +75,8 @@ static int rk818_usb_set_input_current_max(struct rk818_charger *cg, else reg = 11; @@ -39,7 +39,7 @@ index 16bc4686b547..979165c98e5a 100644 ret = regmap_update_bits(cg->regmap, RK818_USB_CTRL_REG, RK818_USB_CTRL_USB_ILIM_MASK, reg); if (ret) -@@ -242,6 +246,19 @@ static void rk818_usb_power_external_power_changed(struct power_supply *psy) +@@ -243,6 +247,19 @@ static void rk818_usb_power_external_power_changed(struct power_supply *psy) if (ret) return; diff --git a/projects/Amlogic/patches/linux/S922X/0029-power-supply-rk818-battery-Don-t-auto-poweroff-the-P.patch b/projects/Amlogic/patches/linux/S922X/0026-power-supply-rk818-battery-Don-t-auto-poweroff-the-P.patch similarity index 94% rename from projects/Amlogic/patches/linux/S922X/0029-power-supply-rk818-battery-Don-t-auto-poweroff-the-P.patch rename to projects/Amlogic/patches/linux/S922X/0026-power-supply-rk818-battery-Don-t-auto-poweroff-the-P.patch index 3824e920c..15c67627a 100644 --- a/projects/Amlogic/patches/linux/S922X/0029-power-supply-rk818-battery-Don-t-auto-poweroff-the-P.patch +++ b/projects/Amlogic/patches/linux/S922X/0026-power-supply-rk818-battery-Don-t-auto-poweroff-the-P.patch @@ -1,7 +1,7 @@ -From fdbfacc2ca0a458f9938bc10614c116aa929402b Mon Sep 17 00:00:00 2001 +From f869d08e5c748e58cd0a14122d64301dac62b9b2 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Thu, 10 Nov 2022 20:03:47 +0100 -Subject: [PATCH 29/47] power: supply: rk818-battery: Don't auto-poweroff the +Subject: [PATCH 26/44] power: supply: rk818-battery: Don't auto-poweroff the PMIC on low battery Just raise the interrupt. This avoids undervoltage shutdowns when diff --git a/projects/Amlogic/patches/linux/S922X/0030-power-supply-rk818-charger-Add-support-for-POWER_SUP.patch b/projects/Amlogic/patches/linux/S922X/0027-power-supply-rk818-charger-Add-support-for-POWER_SUP.patch similarity index 77% rename from projects/Amlogic/patches/linux/S922X/0030-power-supply-rk818-charger-Add-support-for-POWER_SUP.patch rename to projects/Amlogic/patches/linux/S922X/0027-power-supply-rk818-charger-Add-support-for-POWER_SUP.patch index 4905b268d..d26ba3782 100644 --- a/projects/Amlogic/patches/linux/S922X/0030-power-supply-rk818-charger-Add-support-for-POWER_SUP.patch +++ b/projects/Amlogic/patches/linux/S922X/0027-power-supply-rk818-charger-Add-support-for-POWER_SUP.patch @@ -1,7 +1,7 @@ -From 2e71e65223cea3e7468b4297f2b56afc95989c2e Mon Sep 17 00:00:00 2001 +From 2a71f1bbe3a392604aa153853d76df8170800df9 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Thu, 10 Nov 2022 20:05:16 +0100 -Subject: [PATCH 30/47] power: supply: rk818-charger: Add support for +Subject: [PATCH 27/44] power: supply: rk818-charger: Add support for POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN Report total battery capacity. @@ -12,10 +12,10 @@ Signed-off-by: Ondrej Jirman 1 file changed, 10 insertions(+) diff --git a/drivers/power/supply/rk818_charger.c b/drivers/power/supply/rk818_charger.c -index 979165c98e5a..cdef0dcd1f8c 100644 +index 41e2cbd5ecc2..7674c6398a4d 100644 --- a/drivers/power/supply/rk818_charger.c +++ b/drivers/power/supply/rk818_charger.c -@@ -518,6 +518,14 @@ static int rk818_charger_get_property(struct power_supply *psy, +@@ -519,6 +519,14 @@ static int rk818_charger_get_property(struct power_supply *psy, val->intval = 3000000; break; @@ -30,7 +30,7 @@ index 979165c98e5a..cdef0dcd1f8c 100644 default: return -EINVAL; } -@@ -583,6 +591,8 @@ static enum power_supply_property rk818_charger_props[] = { +@@ -584,6 +592,8 @@ static enum power_supply_property rk818_charger_props[] = { POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX, POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX, POWER_SUPPLY_PROP_PRECHARGE_CURRENT, diff --git a/projects/Amlogic/patches/linux/S922X/0031-power-supply-rk818-battery-Don-t-reset-dsoc-to-0-on-.patch b/projects/Amlogic/patches/linux/S922X/0028-power-supply-rk818-battery-Don-t-reset-dsoc-to-0-on-.patch similarity index 86% rename from projects/Amlogic/patches/linux/S922X/0031-power-supply-rk818-battery-Don-t-reset-dsoc-to-0-on-.patch rename to projects/Amlogic/patches/linux/S922X/0028-power-supply-rk818-battery-Don-t-reset-dsoc-to-0-on-.patch index e7f3d1a2a..f5d7d887e 100644 --- a/projects/Amlogic/patches/linux/S922X/0031-power-supply-rk818-battery-Don-t-reset-dsoc-to-0-on-.patch +++ b/projects/Amlogic/patches/linux/S922X/0028-power-supply-rk818-battery-Don-t-reset-dsoc-to-0-on-.patch @@ -1,7 +1,7 @@ -From 3cee0f820b5e341e4ba58450112717fd84403337 Mon Sep 17 00:00:00 2001 +From a4ca64019fc8d430163729a93cee36fff199492f Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Sun, 11 Dec 2022 10:39:22 +0100 -Subject: [PATCH 31/47] power: supply: rk818-battery: Don't reset dsoc to 0 on +Subject: [PATCH 28/44] power: supply: rk818-battery: Don't reset dsoc to 0 on rk818_vb_low_irq The interrupt fires at 3.4V vbat which is not equivalent to 0% charge. diff --git a/projects/Amlogic/patches/linux/S922X/0032-supply-rk817-Fix-battery-capacity-sanity-check-calcu.patch b/projects/Amlogic/patches/linux/S922X/0029-supply-rk817-Fix-battery-capacity-sanity-check-calcu.patch similarity index 91% rename from projects/Amlogic/patches/linux/S922X/0032-supply-rk817-Fix-battery-capacity-sanity-check-calcu.patch rename to projects/Amlogic/patches/linux/S922X/0029-supply-rk817-Fix-battery-capacity-sanity-check-calcu.patch index c1c8e6e61..3ebc67393 100644 --- a/projects/Amlogic/patches/linux/S922X/0032-supply-rk817-Fix-battery-capacity-sanity-check-calcu.patch +++ b/projects/Amlogic/patches/linux/S922X/0029-supply-rk817-Fix-battery-capacity-sanity-check-calcu.patch @@ -1,7 +1,7 @@ -From e1fb7854dda3acede08194508a58f16e58756524 Mon Sep 17 00:00:00 2001 +From f8588c99783f2aa80679d1b47f058a80994efb38 Mon Sep 17 00:00:00 2001 From: Alexander Warnecke Date: Thu, 29 Jun 2023 19:52:42 +1000 -Subject: [PATCH 32/47] supply: rk817: Fix battery capacity sanity check +Subject: [PATCH 29/44] supply: rk817: Fix battery capacity sanity check calculation If the nvram variable is corrupted in a way that multiplying it by 1000 causes an integer overflow and wraps around to a number within or below the sanity check bounds, the check fails and capacity is reported incorrectly. diff --git a/projects/Amlogic/patches/linux/S922X/0033-power-supply-rk817-charger-Add-input-current-limit-s.patch b/projects/Amlogic/patches/linux/S922X/0030-power-supply-rk817-charger-Add-input-current-limit-s.patch similarity index 97% rename from projects/Amlogic/patches/linux/S922X/0033-power-supply-rk817-charger-Add-input-current-limit-s.patch rename to projects/Amlogic/patches/linux/S922X/0030-power-supply-rk817-charger-Add-input-current-limit-s.patch index 2d311bfbd..d1169a054 100644 --- a/projects/Amlogic/patches/linux/S922X/0033-power-supply-rk817-charger-Add-input-current-limit-s.patch +++ b/projects/Amlogic/patches/linux/S922X/0030-power-supply-rk817-charger-Add-input-current-limit-s.patch @@ -1,7 +1,7 @@ -From 2292a1e68b1c69500a0f6269357f6b51cf25c1a8 Mon Sep 17 00:00:00 2001 +From 6c89b0c7be95632079c3b63954248bac6190d3bc Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Sun, 6 Aug 2023 02:55:22 +0200 -Subject: [PATCH 33/47] power: supply: rk817-charger: Add input current limit +Subject: [PATCH 30/44] power: supply: rk817-charger: Add input current limit setting This is useful for proper USB input current limiting. diff --git a/projects/Amlogic/patches/linux/S922X/0034-power-supply-rk817-charger-Take-input-current-limit-.patch b/projects/Amlogic/patches/linux/S922X/0031-power-supply-rk817-charger-Take-input-current-limit-.patch similarity index 95% rename from projects/Amlogic/patches/linux/S922X/0034-power-supply-rk817-charger-Take-input-current-limit-.patch rename to projects/Amlogic/patches/linux/S922X/0031-power-supply-rk817-charger-Take-input-current-limit-.patch index 5b7c43e81..0d509a858 100644 --- a/projects/Amlogic/patches/linux/S922X/0034-power-supply-rk817-charger-Take-input-current-limit-.patch +++ b/projects/Amlogic/patches/linux/S922X/0031-power-supply-rk817-charger-Take-input-current-limit-.patch @@ -1,7 +1,7 @@ -From 20ee4adb35ccf9ff03befec6973f654217c49917 Mon Sep 17 00:00:00 2001 +From 3c8b1445f2997c7913609430eee8d30856fa2e13 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Thu, 7 Sep 2023 17:37:59 +0200 -Subject: [PATCH 34/47] power: supply: rk817-charger: Take input current limit +Subject: [PATCH 31/44] power: supply: rk817-charger: Take input current limit from parent supply This allows automatic input current limit setting based on USB PD. diff --git a/projects/Amlogic/patches/linux/S922X/0035-power-supply-rk817-charger-Propagate-proper-errors.patch b/projects/Amlogic/patches/linux/S922X/0032-power-supply-rk817-charger-Propagate-proper-errors.patch similarity index 90% rename from projects/Amlogic/patches/linux/S922X/0035-power-supply-rk817-charger-Propagate-proper-errors.patch rename to projects/Amlogic/patches/linux/S922X/0032-power-supply-rk817-charger-Propagate-proper-errors.patch index 047909d38..15f31962f 100644 --- a/projects/Amlogic/patches/linux/S922X/0035-power-supply-rk817-charger-Propagate-proper-errors.patch +++ b/projects/Amlogic/patches/linux/S922X/0032-power-supply-rk817-charger-Propagate-proper-errors.patch @@ -1,7 +1,7 @@ -From ae0469a978dd990118fa3104d4251e24dba7849f Mon Sep 17 00:00:00 2001 +From c9413ff87ad76b2384cf9031510f819e586fae71 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Thu, 7 Sep 2023 17:43:00 +0200 -Subject: [PATCH 35/47] power: supply: rk817-charger: Propagate proper errors +Subject: [PATCH 32/44] power: supply: rk817-charger: Propagate proper errors Without propagating the correct error code, defered probe doesn't work. diff --git a/projects/Amlogic/patches/linux/S922X/0033-power-supply-rk817-charger-Add-support-for-runtime-c.patch b/projects/Amlogic/patches/linux/S922X/0033-power-supply-rk817-charger-Add-support-for-runtime-c.patch new file mode 100644 index 000000000..5439370ab --- /dev/null +++ b/projects/Amlogic/patches/linux/S922X/0033-power-supply-rk817-charger-Add-support-for-runtime-c.patch @@ -0,0 +1,167 @@ +From b4612269aff943bce08b81ddd72707cbaebb36d9 Mon Sep 17 00:00:00 2001 +From: Ondrej Jirman +Date: Sat, 13 Jan 2024 16:41:44 +0100 +Subject: [PATCH 33/44] power: supply: rk817-charger: Add support for runtime + change of charger limits + +This is useful for speeding up, or slowing down charging or for dealing +with lesser quality PSUs or cabling. + +Signed-off-by: Ondrej Jirman +--- + drivers/power/supply/rk817_charger.c | 86 +++++++++++++++++++++++++++- + 1 file changed, 85 insertions(+), 1 deletion(-) + +diff --git a/drivers/power/supply/rk817_charger.c b/drivers/power/supply/rk817_charger.c +index 241fff9bc2ab..d7acb998a140 100644 +--- a/drivers/power/supply/rk817_charger.c ++++ b/drivers/power/supply/rk817_charger.c +@@ -557,6 +557,69 @@ static int rk817_bat_get_prop(struct power_supply *ps, + return 0; + } + ++static int rk817_battery_prop_writeable(struct power_supply *psy, ++ enum power_supply_property psp) ++{ ++ switch (psp) { ++ case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX: ++ case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX: ++ return 1; ++ default: ++ return 0; ++ } ++} ++ ++static int rk817_bat_set_prop(struct power_supply *ps, ++ enum power_supply_property prop, ++ const union power_supply_propval *val) ++{ ++ struct rk817_charger *charger = power_supply_get_drvdata(ps); ++ int ret, reg; ++ ++ switch (prop) { ++ case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX: ++ reg = rk817_chg_cur_to_reg(val->intval / 1000); ++ if (reg < 0) { ++ dev_err(charger->dev, ++ "invalid max charger current, value %d unsupported\n", ++ val->intval); ++ return -EINVAL; ++ } ++ ++ ret = regmap_write_bits(charger->rk808->regmap, RK817_PMIC_CHRG_OUT, ++ RK817_CHRG_CUR_SEL, reg); ++ if (ret) { ++ dev_err(charger->dev, ++ "Unable to set max charger current (%d)\n", ret); ++ return ret; ++ } ++ break; ++ case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX: ++ reg = (val->intval / 1000 - 4100) / 50; ++ if (reg < 0 || reg > 7) { ++ dev_err(charger->dev, ++ "invalid max charger voltage, value %d unsupported\n", ++ val->intval); ++ return -EINVAL; ++ } ++ ++ ret = regmap_write_bits(charger->rk808->regmap, RK817_PMIC_CHRG_OUT, ++ RK817_CHRG_VOL_SEL, (reg << 4)); ++ if (ret) { ++ dev_err(charger->dev, ++ "Unable to set max charger voltage (%d)\n", ret); ++ return ret; ++ } ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ cancel_delayed_work_sync(&charger->work); ++ queue_delayed_work(system_wq, &charger->work, msecs_to_jiffies(50)); ++ return 0; ++} ++ + static const int rk817_usb_input_current_limits[] = { + 1, 80000, + 0, 450000, +@@ -622,6 +685,7 @@ static int rk817_chg_get_prop(struct power_supply *ps, + union power_supply_propval *val) + { + struct rk817_charger *charger = power_supply_get_drvdata(ps); ++ unsigned int reg; + int ret; + + switch (prop) { +@@ -644,6 +708,13 @@ static int rk817_chg_get_prop(struct power_supply *ps, + if (ret) + return ret; + break; ++ case POWER_SUPPLY_PROP_INPUT_VOLTAGE_LIMIT: ++ ret = regmap_read(charger->rk808->regmap, RK817_PMIC_CHRG_IN, ®); ++ if (ret < 0) ++ return ret; ++ ++ val->intval = 4000000 + 100000 * ((reg & RK817_USB_VLIM_SEL) >> 4); ++ break; + /* + * While it's possible that other implementations could use different + * USB types, the current implementation for this PMIC (the Odroid Go +@@ -663,7 +734,7 @@ static int rk817_chg_set_prop(struct power_supply *ps, + const union power_supply_propval *val) + { + struct rk817_charger *charger = power_supply_get_drvdata(ps); +- int ret; ++ int ret, reg; + + switch (prop) { + case POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT: +@@ -671,9 +742,18 @@ static int rk817_chg_set_prop(struct power_supply *ps, + if (ret) + return ret; + break; ++ case POWER_SUPPLY_PROP_INPUT_VOLTAGE_LIMIT: ++ // 0 = 4.0V - 7 = 4.7V, 0.1V step ++ reg = (clamp(val->intval, 4000000, 4700000) - 4000000) / 100000; ++ ret = regmap_write_bits(charger->rk808->regmap, RK817_PMIC_CHRG_IN, ++ RK817_USB_VLIM_SEL, (reg << 4)); ++ if (ret) ++ return ret; ++ break; + default: + return -EINVAL; + } ++ + return 0; + + } +@@ -762,6 +842,7 @@ static int rk817_charger_prop_writeable(struct power_supply *psy, + { + switch (psp) { + case POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT: ++ case POWER_SUPPLY_PROP_INPUT_VOLTAGE_LIMIT: + return 1; + default: + return 0; +@@ -792,6 +873,7 @@ static enum power_supply_property rk817_chg_props[] = { + POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, + POWER_SUPPLY_PROP_VOLTAGE_AVG, + POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT, ++ POWER_SUPPLY_PROP_INPUT_VOLTAGE_LIMIT, + }; + + static enum power_supply_usb_type rk817_usb_type[] = { +@@ -804,7 +886,9 @@ static const struct power_supply_desc rk817_bat_desc = { + .type = POWER_SUPPLY_TYPE_BATTERY, + .properties = rk817_bat_props, + .num_properties = ARRAY_SIZE(rk817_bat_props), ++ .property_is_writeable = rk817_battery_prop_writeable, + .get_property = rk817_bat_get_prop, ++ .set_property = rk817_bat_set_prop, + }; + + static const struct power_supply_desc rk817_chg_desc = { +-- +2.34.1 + diff --git a/projects/Amlogic/patches/linux/S922X/0036-power-supply-rk818-battery-charger-clear-unused-vari.patch b/projects/Amlogic/patches/linux/S922X/0034-power-supply-rk818-battery-charger-clear-unused-vari.patch similarity index 83% rename from projects/Amlogic/patches/linux/S922X/0036-power-supply-rk818-battery-charger-clear-unused-vari.patch rename to projects/Amlogic/patches/linux/S922X/0034-power-supply-rk818-battery-charger-clear-unused-vari.patch index b26d57808..84737ab00 100644 --- a/projects/Amlogic/patches/linux/S922X/0036-power-supply-rk818-battery-charger-clear-unused-vari.patch +++ b/projects/Amlogic/patches/linux/S922X/0034-power-supply-rk818-battery-charger-clear-unused-vari.patch @@ -1,7 +1,7 @@ -From 22387a2f7b05ec9e159525bb0b7db52d66cc3649 Mon Sep 17 00:00:00 2001 +From 37f568856e1139a8304d975318e8297c7d82a1fe Mon Sep 17 00:00:00 2001 From: "Mauro (mdrjr) Ribeiro" Date: Wed, 31 Jan 2024 11:59:50 -0300 -Subject: [PATCH 36/47] power: supply: rk818-battery/charger: clear unused +Subject: [PATCH 34/44] power: supply: rk818-battery/charger: clear unused variables --- @@ -23,10 +23,10 @@ index b62d59a4b228..ac8369f09d3e 100644 di->s2r = true; di->current_avg = rk818_bat_get_avg_current(di); diff --git a/drivers/power/supply/rk818_charger.c b/drivers/power/supply/rk818_charger.c -index cdef0dcd1f8c..a081fdfee31d 100644 +index 7674c6398a4d..09fe6e02215a 100644 --- a/drivers/power/supply/rk818_charger.c +++ b/drivers/power/supply/rk818_charger.c -@@ -538,7 +538,6 @@ static int rk818_charger_set_property(struct power_supply *psy, +@@ -539,7 +539,6 @@ static int rk818_charger_set_property(struct power_supply *psy, const union power_supply_propval *val) { struct rk818_charger *cg = power_supply_get_drvdata(psy); diff --git a/projects/Amlogic/patches/linux/S922X/0037-arm64-meson-odroid-go-ultra-add-battery-and-charger-.patch b/projects/Amlogic/patches/linux/S922X/0035-arm64-meson-odroid-go-ultra-add-battery-and-charger-.patch similarity index 95% rename from projects/Amlogic/patches/linux/S922X/0037-arm64-meson-odroid-go-ultra-add-battery-and-charger-.patch rename to projects/Amlogic/patches/linux/S922X/0035-arm64-meson-odroid-go-ultra-add-battery-and-charger-.patch index 1e90314e4..8e74f25a4 100644 --- a/projects/Amlogic/patches/linux/S922X/0037-arm64-meson-odroid-go-ultra-add-battery-and-charger-.patch +++ b/projects/Amlogic/patches/linux/S922X/0035-arm64-meson-odroid-go-ultra-add-battery-and-charger-.patch @@ -1,7 +1,7 @@ -From 85844acb5542a92076af0ff9a8a63ac5b3d3aa8b Mon Sep 17 00:00:00 2001 +From 6339706441d1479708df3294877d55b6805cdcc2 Mon Sep 17 00:00:00 2001 From: "Mauro (mdrjr) Ribeiro" Date: Wed, 31 Jan 2024 18:36:49 +0000 -Subject: [PATCH 37/47] arm64: meson: odroid-go-ultra: add battery and charger +Subject: [PATCH 35/44] arm64: meson: odroid-go-ultra: add battery and charger nodes --- diff --git a/projects/Amlogic/patches/linux/S922X/0038-ASoC-meson-axg-card-limit-the-volume-to-prevent-clip.patch b/projects/Amlogic/patches/linux/S922X/0036-ASoC-meson-axg-card-limit-the-volume-to-prevent-clip.patch similarity index 87% rename from projects/Amlogic/patches/linux/S922X/0038-ASoC-meson-axg-card-limit-the-volume-to-prevent-clip.patch rename to projects/Amlogic/patches/linux/S922X/0036-ASoC-meson-axg-card-limit-the-volume-to-prevent-clip.patch index cab71fd1c..ffaa62810 100644 --- a/projects/Amlogic/patches/linux/S922X/0038-ASoC-meson-axg-card-limit-the-volume-to-prevent-clip.patch +++ b/projects/Amlogic/patches/linux/S922X/0036-ASoC-meson-axg-card-limit-the-volume-to-prevent-clip.patch @@ -1,7 +1,7 @@ -From 2a5a071575ad567e1bb7394d9d17a9776165cf4e Mon Sep 17 00:00:00 2001 +From 6f4ac5c34912fd8fe6b453e0e402a5dc8f4e64a4 Mon Sep 17 00:00:00 2001 From: ckkim Date: Thu, 20 Apr 2023 16:18:40 +0900 -Subject: [PATCH 38/47] ASoC: meson: axg-card: limit the volume to prevent +Subject: [PATCH 36/44] ASoC: meson: axg-card: limit the volume to prevent clipping of output signal --- diff --git a/projects/Amlogic/patches/linux/S922X/0039-power-supply-rk818_charger-change-syfs-node-name-so-.patch b/projects/Amlogic/patches/linux/S922X/0037-power-supply-rk818_charger-change-syfs-node-name-so-.patch similarity index 75% rename from projects/Amlogic/patches/linux/S922X/0039-power-supply-rk818_charger-change-syfs-node-name-so-.patch rename to projects/Amlogic/patches/linux/S922X/0037-power-supply-rk818_charger-change-syfs-node-name-so-.patch index 9c2a1400a..33c93d28c 100644 --- a/projects/Amlogic/patches/linux/S922X/0039-power-supply-rk818_charger-change-syfs-node-name-so-.patch +++ b/projects/Amlogic/patches/linux/S922X/0037-power-supply-rk818_charger-change-syfs-node-name-so-.patch @@ -1,7 +1,7 @@ -From 811cb668282b62dfbd39b2edb6ceeefc45105555 Mon Sep 17 00:00:00 2001 +From c21702b1d3506071635539c0fd8bee17ffb272e3 Mon Sep 17 00:00:00 2001 From: spycat88 Date: Wed, 31 Jan 2024 20:18:22 +0000 -Subject: [PATCH 39/47] power: supply: rk818_charger: change syfs node name so +Subject: [PATCH 37/44] power: supply: rk818_charger: change syfs node name so ES can read battery status --- @@ -9,10 +9,10 @@ Subject: [PATCH 39/47] power: supply: rk818_charger: change syfs node name so 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply/rk818_charger.c b/drivers/power/supply/rk818_charger.c -index a081fdfee31d..6956d093c672 100644 +index 09fe6e02215a..af9b2efbc94e 100644 --- a/drivers/power/supply/rk818_charger.c +++ b/drivers/power/supply/rk818_charger.c -@@ -609,7 +609,7 @@ static enum power_supply_property rk818_charger_props[] = { +@@ -610,7 +610,7 @@ static enum power_supply_property rk818_charger_props[] = { * but not me, not now. :) */ static const struct power_supply_desc rk818_charger_desc = { diff --git a/projects/Amlogic/patches/linux/S922X/0040-arm64-meson-odroid-go-ultra-add-headphone-detection.patch b/projects/Amlogic/patches/linux/S922X/0038-arm64-meson-odroid-go-ultra-add-headphone-detection.patch similarity index 87% rename from projects/Amlogic/patches/linux/S922X/0040-arm64-meson-odroid-go-ultra-add-headphone-detection.patch rename to projects/Amlogic/patches/linux/S922X/0038-arm64-meson-odroid-go-ultra-add-headphone-detection.patch index afc9967dc..9bd0d76ec 100644 --- a/projects/Amlogic/patches/linux/S922X/0040-arm64-meson-odroid-go-ultra-add-headphone-detection.patch +++ b/projects/Amlogic/patches/linux/S922X/0038-arm64-meson-odroid-go-ultra-add-headphone-detection.patch @@ -1,7 +1,7 @@ -From 13cd01705c021cfe8fe14a45beed8b9d99c1d3dc Mon Sep 17 00:00:00 2001 +From 4b8d36069dbe393e882da689d1816ba241d087c3 Mon Sep 17 00:00:00 2001 From: "Mauro (mdrjr) Ribeiro" Date: Wed, 31 Jan 2024 20:56:40 +0000 -Subject: [PATCH 40/47] arm64: meson: odroid-go-ultra: add headphone detection +Subject: [PATCH 38/44] arm64: meson: odroid-go-ultra: add headphone detection --- .../arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts | 8 ++++++++ diff --git a/projects/Amlogic/patches/linux/S922X/0041-arm64-dts-amlogic-odroid-go-ultra-Improve-sound-outp.patch b/projects/Amlogic/patches/linux/S922X/0039-arm64-dts-amlogic-odroid-go-ultra-Improve-sound-outp.patch similarity index 95% rename from projects/Amlogic/patches/linux/S922X/0041-arm64-dts-amlogic-odroid-go-ultra-Improve-sound-outp.patch rename to projects/Amlogic/patches/linux/S922X/0039-arm64-dts-amlogic-odroid-go-ultra-Improve-sound-outp.patch index 44d5879a0..75c507bb3 100644 --- a/projects/Amlogic/patches/linux/S922X/0041-arm64-dts-amlogic-odroid-go-ultra-Improve-sound-outp.patch +++ b/projects/Amlogic/patches/linux/S922X/0039-arm64-dts-amlogic-odroid-go-ultra-Improve-sound-outp.patch @@ -1,7 +1,7 @@ -From 8179b9a1518b8ba19e2bce4e300defdc36177ed9 Mon Sep 17 00:00:00 2001 +From b95234b4178cab46d6eb171c2a7cd56c242a3f74 Mon Sep 17 00:00:00 2001 From: ckkim Date: Thu, 20 Apr 2023 16:21:09 +0900 -Subject: [PATCH 41/47] arm64: dts: amlogic: odroid-go ultra: Improve sound +Subject: [PATCH 39/44] arm64: dts: amlogic: odroid-go ultra: Improve sound output quality --- diff --git a/projects/Amlogic/patches/linux/S922X/0042-arm64-meson-g12-common-remove-lower-freq-gpu-opps.patch b/projects/Amlogic/patches/linux/S922X/0040-arm64-meson-g12-common-remove-lower-freq-gpu-opps.patch similarity index 88% rename from projects/Amlogic/patches/linux/S922X/0042-arm64-meson-g12-common-remove-lower-freq-gpu-opps.patch rename to projects/Amlogic/patches/linux/S922X/0040-arm64-meson-g12-common-remove-lower-freq-gpu-opps.patch index 8b0d656cd..a06ad5001 100644 --- a/projects/Amlogic/patches/linux/S922X/0042-arm64-meson-g12-common-remove-lower-freq-gpu-opps.patch +++ b/projects/Amlogic/patches/linux/S922X/0040-arm64-meson-g12-common-remove-lower-freq-gpu-opps.patch @@ -1,7 +1,7 @@ -From a1bcc406369cdc0976cafe8987a6ab7224bb513d Mon Sep 17 00:00:00 2001 +From 184ec78821692f7a5c5b59f9e16df36d1959c4bd Mon Sep 17 00:00:00 2001 From: brooksytech <1673861+brooksytech@users.noreply.github.com> Date: Thu, 1 Feb 2024 19:03:03 +0000 -Subject: [PATCH 42/47] arm64: meson: g12-common: remove lower freq gpu opps +Subject: [PATCH 40/44] arm64: meson: g12-common: remove lower freq gpu opps --- arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 12 ------------ diff --git a/projects/Amlogic/patches/linux/S922X/0043-LOCAL-ALSA-Assign-internal-PCM-chmap-ELD-IEC958-kctl.patch b/projects/Amlogic/patches/linux/S922X/0041-LOCAL-ALSA-Assign-internal-PCM-chmap-ELD-IEC958-kctl.patch similarity index 94% rename from projects/Amlogic/patches/linux/S922X/0043-LOCAL-ALSA-Assign-internal-PCM-chmap-ELD-IEC958-kctl.patch rename to projects/Amlogic/patches/linux/S922X/0041-LOCAL-ALSA-Assign-internal-PCM-chmap-ELD-IEC958-kctl.patch index 61937993e..17b108263 100644 --- a/projects/Amlogic/patches/linux/S922X/0043-LOCAL-ALSA-Assign-internal-PCM-chmap-ELD-IEC958-kctl.patch +++ b/projects/Amlogic/patches/linux/S922X/0041-LOCAL-ALSA-Assign-internal-PCM-chmap-ELD-IEC958-kctl.patch @@ -1,7 +1,7 @@ -From 359a5844be35851c12fc85bf2648ecd5f805ef93 Mon Sep 17 00:00:00 2001 +From 83b4a5d121788f8ff47794dd945ac82cea346570 Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Sun, 17 Apr 2022 04:37:48 +0000 -Subject: [PATCH 43/47] LOCAL: ALSA: Assign internal PCM chmap/ELD/IEC958 kctls +Subject: [PATCH 41/44] LOCAL: ALSA: Assign internal PCM chmap/ELD/IEC958 kctls to device 0 On SoC sound devices utilizing codec2codec DAI links with a HDMI codec diff --git a/projects/Amlogic/patches/linux/S922X/0044-arm64-meson-odroid-n2-add-support-for-overclocking.patch b/projects/Amlogic/patches/linux/S922X/0042-arm64-meson-odroid-n2-add-support-for-overclocking.patch similarity index 95% rename from projects/Amlogic/patches/linux/S922X/0044-arm64-meson-odroid-n2-add-support-for-overclocking.patch rename to projects/Amlogic/patches/linux/S922X/0042-arm64-meson-odroid-n2-add-support-for-overclocking.patch index d00b693be..4d28c3f63 100644 --- a/projects/Amlogic/patches/linux/S922X/0044-arm64-meson-odroid-n2-add-support-for-overclocking.patch +++ b/projects/Amlogic/patches/linux/S922X/0042-arm64-meson-odroid-n2-add-support-for-overclocking.patch @@ -1,7 +1,7 @@ -From 200926d2e4c4eede5f9ec5f2eb176cddeca78604 Mon Sep 17 00:00:00 2001 +From 56283996bde298454c0e83a6d8cafc232343b0f4 Mon Sep 17 00:00:00 2001 From: spycat88 Date: Sun, 4 Feb 2024 09:48:31 +0000 -Subject: [PATCH 44/47] arm64: meson: odroid-n2*: add support for overclocking +Subject: [PATCH 42/44] arm64: meson: odroid-n2*: add support for overclocking --- .../dts/amlogic/meson-g12b-odroid-n2-plus.dts | 24 ++++++++++++++++++ diff --git a/projects/Amlogic/patches/linux/S922X/0046-power-reset-add-the-Powkiddy-RGB10-Max-3-Pro-to-the-.patch b/projects/Amlogic/patches/linux/S922X/0043-power-reset-add-the-Powkiddy-RGB10-Max-3-Pro-to-the-.patch similarity index 91% rename from projects/Amlogic/patches/linux/S922X/0046-power-reset-add-the-Powkiddy-RGB10-Max-3-Pro-to-the-.patch rename to projects/Amlogic/patches/linux/S922X/0043-power-reset-add-the-Powkiddy-RGB10-Max-3-Pro-to-the-.patch index 8a7546d7f..a835542be 100644 --- a/projects/Amlogic/patches/linux/S922X/0046-power-reset-add-the-Powkiddy-RGB10-Max-3-Pro-to-the-.patch +++ b/projects/Amlogic/patches/linux/S922X/0043-power-reset-add-the-Powkiddy-RGB10-Max-3-Pro-to-the-.patch @@ -1,7 +1,7 @@ -From 28c9de20e78981e601ffd411bfbc84b9467409a3 Mon Sep 17 00:00:00 2001 +From 1ec813703b6ac258893753b9134c1c0856ac119a Mon Sep 17 00:00:00 2001 From: spycat88 Date: Wed, 6 Mar 2024 19:40:45 +0000 -Subject: [PATCH 46/47] power: reset: add the Powkiddy RGB10-Max-3-Pro to the +Subject: [PATCH 43/44] power: reset: add the Powkiddy RGB10-Max-3-Pro to the Odroid Go Ultra poweroff driver --- diff --git a/projects/Amlogic/patches/linux/S922X/0047-arm64-dts-amlogic-meson-g12b-odroid-n2-add-support-f.patch b/projects/Amlogic/patches/linux/S922X/0044-arm64-dts-amlogic-meson-g12b-odroid-n2-add-support-f.patch similarity index 87% rename from projects/Amlogic/patches/linux/S922X/0047-arm64-dts-amlogic-meson-g12b-odroid-n2-add-support-f.patch rename to projects/Amlogic/patches/linux/S922X/0044-arm64-dts-amlogic-meson-g12b-odroid-n2-add-support-f.patch index 73484c551..3ff6f2e53 100644 --- a/projects/Amlogic/patches/linux/S922X/0047-arm64-dts-amlogic-meson-g12b-odroid-n2-add-support-f.patch +++ b/projects/Amlogic/patches/linux/S922X/0044-arm64-dts-amlogic-meson-g12b-odroid-n2-add-support-f.patch @@ -1,7 +1,7 @@ -From a0dc5b136ca3a750336f1000a9313009dcd80c21 Mon Sep 17 00:00:00 2001 +From 3ee121405282bec089601d521371e9df6409c991 Mon Sep 17 00:00:00 2001 From: spycat88 Date: Fri, 15 Mar 2024 19:49:19 +0000 -Subject: [PATCH 47/47] arm64: dts: amlogic: meson-g12b-odroid-n2: add support +Subject: [PATCH 44/44] arm64: dts: amlogic: meson-g12b-odroid-n2: add support for gpio power off --- diff --git a/projects/Amlogic/patches/linux/S922X/0045-power-supply-rk818_charger-fix-compiling-driver-on-6.patch b/projects/Amlogic/patches/linux/S922X/0045-power-supply-rk818_charger-fix-compiling-driver-on-6.patch deleted file mode 100644 index de59886f8..000000000 --- a/projects/Amlogic/patches/linux/S922X/0045-power-supply-rk818_charger-fix-compiling-driver-on-6.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 5748c226f2923262a6bfad3c901cb76ba776fc98 Mon Sep 17 00:00:00 2001 -From: spycat88 -Date: Tue, 6 Feb 2024 17:50:09 +0000 -Subject: [PATCH 45/47] power: supply: rk818_charger: fix compiling driver on - 6.8 - ---- - drivers/power/supply/rk818_charger.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/drivers/power/supply/rk818_charger.c b/drivers/power/supply/rk818_charger.c -index 6956d093c672..5cbdc1b46c5c 100644 ---- a/drivers/power/supply/rk818_charger.c -+++ b/drivers/power/supply/rk818_charger.c -@@ -8,7 +8,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -@@ -705,6 +705,7 @@ static const struct of_device_id rk818_charger_of_match[] = { - { .compatible = "rockchip,rk818-charger", }, - { }, - }; -+MODULE_DEVICE_TABLE(of, rk818_charger_of_match); - - static struct platform_driver rk818_charger_driver = { - .probe = rk818_charger_probe, --- -2.34.1 -