From ef5242f69a675ca81234a841cac597a17858aa8c Mon Sep 17 00:00:00 2001 From: The-going <48602507+The-going@users.noreply.github.com> Date: Mon, 11 Aug 2025 22:25:13 +0300 Subject: [PATCH] sunxi-6.12: reextract of megous patches for v6.12.41 --- ...ister-existing-source-caps-before-re.patch | 10 ++++---- ...le-hdmi-sound-card-on-boards-with-hd.patch | 6 ++--- ...llwinner-orange-pi-3-Enable-ethernet.patch | 10 ++++---- ...dc-allow-to-set-TS-pin-to-GPADC-mode.patch | 8 +++---- ...-error-when-the-device-is-not-presen.patch | 10 ++++---- ...ort-charger-LED-on-AXP20x-like-PMICs.patch | 8 +++---- ...mfd-axp20x-Add-battery-IRQ-resources.patch | 22 ++++++++--------- ...Allow-to-set-target-voltage-to-4.35V.patch | 8 +++---- ...upts-for-low-battery-power-condition.patch | 12 +++++----- ...-Add-support-for-POWER_SUPPLY_PROP_E.patch | 17 +++++++------ ...-battery-Enable-poweron-by-RTC-alarm.patch | 8 +++---- ...-Support-POWER_SUPPLY_PROP_CHARGE_BE.patch | 16 ++++++------- ...20x-usb-power-Add-missing-interrupts.patch | 12 +++++----- ...attery-Add-support-for-reporting-OCV.patch | 12 +++++----- ..._battery-Fix-charging-done-detection.patch | 8 +++---- ...xp20x_battery-Monitor-battery-health.patch | 18 +++++++------- ...tery-Send-uevents-for-status-changes.patch | 24 +++++++++---------- ...-Setup-thermal-regulation-experiment.patch | 8 +++---- ...set_resume-callback-for-WWAN-devices.patch | 8 +++---- ...ayport-Respect-DP_CAP_RECEPTACLE-bit.patch | 10 ++++---- ...PD-devices-capabilities-registration.patch | 12 +++++----- .../usb-typec-tcpm-Improve-logs.patch | 14 +++++------ ...altmodes-before-registering-new-ones.patch | 8 +++---- patch/kernel/archive/sunxi-6.12/series.conf | 4 ---- 24 files changed, 134 insertions(+), 139 deletions(-) diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/Revert-usb-typec-tcpm-unregister-existing-source-caps-before-re.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/Revert-usb-typec-tcpm-unregister-existing-source-caps-before-re.patch index 9255035669..10283b540f 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/Revert-usb-typec-tcpm-unregister-existing-source-caps-before-re.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/Revert-usb-typec-tcpm-unregister-existing-source-caps-before-re.patch @@ -1,4 +1,4 @@ -From 657d4a240139087cf93d8880c9c87fd60cd0339d Mon Sep 17 00:00:00 2001 +From d8739f5600dd1c3110dd72f77fb2bd9a4f36a17a Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Tue, 7 May 2024 18:39:12 +0200 Subject: Revert "usb: typec: tcpm: unregister existing source caps before @@ -10,10 +10,10 @@ This reverts commit 230ecdf71a644c9c73e0e6735b33173074ae3f94. 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c -index 48ddf2770461..cd97f1118e08 100644 +index aa2fa720af15..bc00bf2e6761 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c -@@ -3007,7 +3007,7 @@ static int tcpm_register_source_caps(struct tcpm_port *port) +@@ -3058,7 +3058,7 @@ static int tcpm_register_source_caps(struct tcpm_port *port) { struct usb_power_delivery_desc desc = { port->negotiated_rev }; struct usb_power_delivery_capabilities_desc caps = { }; @@ -22,7 +22,7 @@ index 48ddf2770461..cd97f1118e08 100644 if (!port->partner_pd) port->partner_pd = usb_power_delivery_register(NULL, &desc); -@@ -3017,11 +3017,6 @@ static int tcpm_register_source_caps(struct tcpm_port *port) +@@ -3068,11 +3068,6 @@ static int tcpm_register_source_caps(struct tcpm_port *port) memcpy(caps.pdo, port->source_caps, sizeof(u32) * port->nr_source_caps); caps.role = TYPEC_SOURCE; @@ -35,5 +35,5 @@ index 48ddf2770461..cd97f1118e08 100644 if (IS_ERR(cap)) return PTR_ERR(cap); -- -2.35.3 +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/arm64-dts-allwinner-h6-Enable-hdmi-sound-card-on-boards-with-hd.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/arm64-dts-allwinner-h6-Enable-hdmi-sound-card-on-boards-with-hd.patch index 928a93ce68..45078163ef 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/arm64-dts-allwinner-h6-Enable-hdmi-sound-card-on-boards-with-hd.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/arm64-dts-allwinner-h6-Enable-hdmi-sound-card-on-boards-with-hd.patch @@ -15,7 +15,7 @@ Signed-off-by: Jernej Skrabec 4 files changed, 32 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts -index 111111111111..222222222222 100644 +index 1012103df25f..ee6d40b259f6 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts @@ -119,6 +119,10 @@ hdmi_out_con: endpoint { @@ -29,8 +29,8 @@ index 111111111111..222222222222 100644 &mdio { ext_rgmii_phy: ethernet-phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; -@@ -290,6 +294,10 @@ sw { - }; +@@ -290,6 +294,10 @@ &r_pio { + vcc-pm-supply = <®_aldo1>; }; +&sound_hdmi { diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/arm64-dts-allwinner-orange-pi-3-Enable-ethernet.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/arm64-dts-allwinner-orange-pi-3-Enable-ethernet.patch index efda8744ec..65bb27ceec 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/arm64-dts-allwinner-orange-pi-3-Enable-ethernet.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/arm64-dts-allwinner-orange-pi-3-Enable-ethernet.patch @@ -1,4 +1,4 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From f9860235e58ed07845715a64a0f858e787d080db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= Date: Tue, 20 Aug 2019 14:54:48 +0200 Subject: arm64: dts: allwinner: orange-pi-3: Enable ethernet @@ -25,11 +25,11 @@ of the range of working values was chosen. Signed-off-by: Ondrej Jirman --- - arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts | 40 ++++++++++ + .../dts/allwinner/sun50i-h6-orangepi-3.dts | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts -index 111111111111..222222222222 100644 +index 14cc99b21622..452ea26d0ec8 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts @@ -15,6 +15,7 @@ / { @@ -92,7 +92,7 @@ index 111111111111..222222222222 100644 &mmc0 { vmmc-supply = <®_cldo1>; cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ -@@ -211,6 +250,7 @@ reg_aldo2: aldo2 { +@@ -207,6 +246,7 @@ reg_aldo2: aldo2 { regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-name = "vcc33-audio-tv-ephy-mac"; @@ -101,5 +101,5 @@ index 111111111111..222222222222 100644 /* ALDO3 is shorted to CLDO1 */ -- -Armbian +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/iio-adc-axp20x_adc-allow-to-set-TS-pin-to-GPADC-mode.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/iio-adc-axp20x_adc-allow-to-set-TS-pin-to-GPADC-mode.patch index bc1ff151b9..5db488f315 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/iio-adc-axp20x_adc-allow-to-set-TS-pin-to-GPADC-mode.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/iio-adc-axp20x_adc-allow-to-set-TS-pin-to-GPADC-mode.patch @@ -1,4 +1,4 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From ff3463fbf49a5856b6ec1c8a4f430705041c9554 Mon Sep 17 00:00:00 2001 From: Icenowy Zheng Date: Tue, 10 Sep 2019 12:03:32 +0800 Subject: iio: adc: axp20x_adc: allow to set TS pin to GPADC mode @@ -14,7 +14,7 @@ Signed-off-by: Icenowy Zheng 1 file changed, 6 insertions(+) diff --git a/drivers/iio/adc/axp20x_adc.c b/drivers/iio/adc/axp20x_adc.c -index 111111111111..222222222222 100644 +index 0226dfbcf4ae..87a5c74e5685 100644 --- a/drivers/iio/adc/axp20x_adc.c +++ b/drivers/iio/adc/axp20x_adc.c @@ -58,6 +58,7 @@ @@ -25,7 +25,7 @@ index 111111111111..222222222222 100644 #define AXP20X_ADC_CHANNEL(_channel, _name, _type, _reg) \ { \ -@@ -1161,6 +1162,11 @@ static int axp20x_probe(struct platform_device *pdev) +@@ -1162,6 +1163,11 @@ static int axp20x_probe(struct platform_device *pdev) regmap_set_bits(info->regmap, info->data->adc_en2, info->data->adc_en2_mask); @@ -38,5 +38,5 @@ index 111111111111..222222222222 100644 if (info->data->adc_rate) info->data->adc_rate(info, 100); -- -Armbian +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/iio-st_sensors-Don-t-report-error-when-the-device-is-not-presen.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/iio-st_sensors-Don-t-report-error-when-the-device-is-not-presen.patch index 9f440230e5..c24276c175 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/iio-st_sensors-Don-t-report-error-when-the-device-is-not-presen.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/iio-st_sensors-Don-t-report-error-when-the-device-is-not-presen.patch @@ -27,13 +27,13 @@ index 111111111111..222222222222 100644 + return err; + } + - dev_err(&indio_dev->dev, -- "failed to read Who-Am-I register.\n"); -+ "%s: failed to read Who-Am-I register (%d).\n", -+ indio_dev->name, err); - return err; + return dev_err_probe(parent, err, +- "failed to read Who-Am-I register.\n"); ++ "%s: failed to read Who-Am-I register.\n", ++ indio_dev->name); } + if (sdata->sensor_settings->wai != wai) { -- Armbian diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/leds-axp20x-Support-charger-LED-on-AXP20x-like-PMICs.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/leds-axp20x-Support-charger-LED-on-AXP20x-like-PMICs.patch index 28654fa249..f3b4cf57f9 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/leds-axp20x-Support-charger-LED-on-AXP20x-like-PMICs.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/leds-axp20x-Support-charger-LED-on-AXP20x-like-PMICs.patch @@ -1,4 +1,4 @@ -From 824d4da343ecf29eefbcbd1d9bf8cee190f52daf Mon Sep 17 00:00:00 2001 +From 35047aefada63441a1df81ad06b769880ddacaf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= Date: Thu, 4 Feb 2021 00:55:20 +0100 Subject: leds: axp20x: Support charger LED on AXP20x like PMICs @@ -327,10 +327,10 @@ index 000000000000..e2877af1032a +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:leds-axp20x"); diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c -index 4051551757f2..5f1a659e1717 100644 +index 378092903971..b9c040f5e1b6 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c -@@ -1195,6 +1195,9 @@ static const struct mfd_cell axp813_cells[] = { +@@ -1196,6 +1196,9 @@ static const struct mfd_cell axp813_cells[] = { .num_resources = ARRAY_SIZE(axp803_usb_power_supply_resources), .resources = axp803_usb_power_supply_resources, .of_compatible = "x-powers,axp813-usb-power-supply", @@ -341,5 +341,5 @@ index 4051551757f2..5f1a659e1717 100644 }; -- -2.35.3 +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/mfd-axp20x-Add-battery-IRQ-resources.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/mfd-axp20x-Add-battery-IRQ-resources.patch index ac849b02f1..3f2b7cbf2b 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/mfd-axp20x-Add-battery-IRQ-resources.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/mfd-axp20x-Add-battery-IRQ-resources.patch @@ -1,18 +1,18 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From 1174f846ec36a9c2119d6e9fc59744d5c967cd66 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Sat, 29 Feb 2020 01:01:58 -0600 Subject: mfd: axp20x: Add battery IRQ resources Signed-off-by: Samuel Holland --- - drivers/mfd/axp20x.c | 36 ++++++++++ + drivers/mfd/axp20x.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c -index 111111111111..222222222222 100644 +index b9c040f5e1b6..b2d8edae84f5 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c -@@ -301,6 +301,15 @@ static const struct resource axp20x_ac_power_supply_resources[] = { +@@ -302,6 +302,15 @@ static const struct resource axp20x_ac_power_supply_resources[] = { DEFINE_RES_IRQ_NAMED(AXP20X_IRQ_ACIN_OVER_V, "ACIN_OVER_V"), }; @@ -28,7 +28,7 @@ index 111111111111..222222222222 100644 static const struct resource axp20x_pek_resources[] = { DEFINE_RES_IRQ_NAMED(AXP20X_IRQ_PEK_RIS_EDGE, "PEK_DBR"), DEFINE_RES_IRQ_NAMED(AXP20X_IRQ_PEK_FAL_EDGE, "PEK_DBF"), -@@ -359,6 +368,23 @@ static const struct resource axp717_pek_resources[] = { +@@ -360,6 +369,23 @@ static const struct resource axp717_pek_resources[] = { DEFINE_RES_IRQ_NAMED(AXP717_IRQ_PEK_FAL_EDGE, "PEK_DBF"), }; @@ -52,7 +52,7 @@ index 111111111111..222222222222 100644 static const struct resource axp803_pek_resources[] = { DEFINE_RES_IRQ_NAMED(AXP803_IRQ_PEK_RIS_EDGE, "PEK_DBR"), DEFINE_RES_IRQ_NAMED(AXP803_IRQ_PEK_FAL_EDGE, "PEK_DBF"), -@@ -953,6 +979,8 @@ static const struct mfd_cell axp20x_cells[] = { +@@ -954,6 +980,8 @@ static const struct mfd_cell axp20x_cells[] = { }, { .name = "axp20x-battery-power-supply", .of_compatible = "x-powers,axp209-battery-power-supply", @@ -61,7 +61,7 @@ index 111111111111..222222222222 100644 }, { .name = "axp20x-ac-power-supply", .of_compatible = "x-powers,axp202-ac-power-supply", -@@ -987,6 +1015,8 @@ static const struct mfd_cell axp221_cells[] = { +@@ -988,6 +1016,8 @@ static const struct mfd_cell axp221_cells[] = { }, { .name = "axp20x-battery-power-supply", .of_compatible = "x-powers,axp221-battery-power-supply", @@ -70,7 +70,7 @@ index 111111111111..222222222222 100644 }, { .name = "axp20x-usb-power-supply", .of_compatible = "x-powers,axp221-usb-power-supply", -@@ -1009,6 +1039,8 @@ static const struct mfd_cell axp223_cells[] = { +@@ -1010,6 +1040,8 @@ static const struct mfd_cell axp223_cells[] = { }, { .name = "axp20x-battery-power-supply", .of_compatible = "x-powers,axp221-battery-power-supply", @@ -79,7 +79,7 @@ index 111111111111..222222222222 100644 }, { .name = "axp20x-regulator", }, { -@@ -1125,6 +1157,8 @@ static const struct mfd_cell axp803_cells[] = { +@@ -1126,6 +1158,8 @@ static const struct mfd_cell axp803_cells[] = { }, { .name = "axp20x-battery-power-supply", .of_compatible = "x-powers,axp813-battery-power-supply", @@ -88,7 +88,7 @@ index 111111111111..222222222222 100644 }, { .name = "axp20x-ac-power-supply", .of_compatible = "x-powers,axp813-ac-power-supply", -@@ -1185,6 +1219,8 @@ static const struct mfd_cell axp813_cells[] = { +@@ -1186,6 +1220,8 @@ static const struct mfd_cell axp813_cells[] = { }, { .name = "axp20x-battery-power-supply", .of_compatible = "x-powers,axp813-battery-power-supply", @@ -98,5 +98,5 @@ index 111111111111..222222222222 100644 .name = "axp20x-ac-power-supply", .of_compatible = "x-powers,axp813-ac-power-supply", -- -Armbian +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/power-axp20x_battery-Allow-to-set-target-voltage-to-4.35V.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/power-axp20x_battery-Allow-to-set-target-voltage-to-4.35V.patch index f838dc1341..b4df8fdd4c 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/power-axp20x_battery-Allow-to-set-target-voltage-to-4.35V.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/power-axp20x_battery-Allow-to-set-target-voltage-to-4.35V.patch @@ -1,4 +1,4 @@ -From d1b96830bd932d8079add0d9d85f66038f6838ed Mon Sep 17 00:00:00 2001 +From f340c6a73cebfd98ecd7517a07a8d86a6b076da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= Date: Thu, 27 Feb 2020 00:53:17 +0100 Subject: power: axp20x_battery: Allow to set target voltage to 4.35V @@ -11,10 +11,10 @@ Signed-off-by: Ondrej Jirman 1 file changed, 5 insertions(+) diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c -index 57eba1ddb17b..1c3bcb5c72d8 100644 +index 88fbae613e8b..3df6ff7c6f84 100644 --- a/drivers/power/supply/axp20x_battery.c +++ b/drivers/power/supply/axp20x_battery.c -@@ -628,6 +628,11 @@ static int axp20x_battery_set_max_voltage(struct axp20x_batt_ps *axp20x_batt, +@@ -631,6 +631,11 @@ static int axp20x_battery_set_max_voltage(struct axp20x_batt_ps *axp20x_batt, val = AXP20X_CHRG_CTRL1_TGT_4_2V; break; @@ -27,5 +27,5 @@ index 57eba1ddb17b..1c3bcb5c72d8 100644 /* * AXP20x max voltage can be set to 4.36V and AXP22X max voltage -- -2.35.3 +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/power-axp803-Add-interrupts-for-low-battery-power-condition.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/power-axp803-Add-interrupts-for-low-battery-power-condition.patch index f2d21df1b7..d6fc1a034f 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/power-axp803-Add-interrupts-for-low-battery-power-condition.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/power-axp803-Add-interrupts-for-low-battery-power-condition.patch @@ -1,4 +1,4 @@ -From f84d23c69812443ff65701565b5bde1e72114987 Mon Sep 17 00:00:00 2001 +From 011b1de5960235e3f09058c92555023600286140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= Date: Sun, 14 Mar 2021 15:49:34 +0100 Subject: power: axp803: Add interrupts for low battery power condition @@ -13,10 +13,10 @@ Signed-off-by: Ondrej Jirman 2 files changed, 4 insertions(+) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c -index 2bbeda7dc6ed..8c199871621b 100644 +index b2d8edae84f5..4511bfad942f 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c -@@ -383,6 +383,8 @@ static const struct resource axp803_battery_resources[] = { +@@ -384,6 +384,8 @@ static const struct resource axp803_battery_resources[] = { DEFINE_RES_IRQ_NAMED(AXP803_IRQ_BATT_ACT_TEMP_HIGH_END, "BATT_ACT_TEMP_HIGH_END"), DEFINE_RES_IRQ_NAMED(AXP803_IRQ_BATT_ACT_TEMP_LOW, "BATT_ACT_TEMP_LOW"), DEFINE_RES_IRQ_NAMED(AXP803_IRQ_BATT_ACT_TEMP_LOW_END, "BATT_ACT_TEMP_LOW_END"), @@ -26,10 +26,10 @@ index 2bbeda7dc6ed..8c199871621b 100644 static const struct resource axp803_pek_resources[] = { diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c -index 2d47a63bcc4f..a92212fdba91 100644 +index e38d3aa4f417..23995bece0d2 100644 --- a/drivers/power/supply/axp20x_battery.c +++ b/drivers/power/supply/axp20x_battery.c -@@ -1097,6 +1097,8 @@ static const struct axp_irq_data axp813_irqs[] = { +@@ -1118,6 +1118,8 @@ static const struct axp_irq_data axp813_irqs[] = { { "BATT_HEALTH_GOOD", axp20x_battery_changed_irq }, { "BATT_CHARGING", axp20x_battery_changed_irq }, { "BATT_CHARGING_DONE", axp20x_battery_changed_irq }, @@ -39,5 +39,5 @@ index 2d47a63bcc4f..a92212fdba91 100644 { "BATT_CHG_TEMP_HIGH_END", axp20x_battery_temp_normal_irq }, { "BATT_CHG_TEMP_LOW", axp20x_battery_temp_cold_irq }, -- -2.35.3 +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x-battery-Add-support-for-POWER_SUPPLY_PROP_E.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x-battery-Add-support-for-POWER_SUPPLY_PROP_E.patch index 9275676113..2c9f34ef8c 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x-battery-Add-support-for-POWER_SUPPLY_PROP_E.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x-battery-Add-support-for-POWER_SUPPLY_PROP_E.patch @@ -1,4 +1,4 @@ -From 4e06f31c98a47df4e29b9b2fa28b071833d5e2d9 Mon Sep 17 00:00:00 2001 +From 4c66fc9f1b6a939c9892981ca35897f29bc21086 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Thu, 10 Nov 2022 20:05:58 +0100 Subject: power: supply: axp20x-battery: Add support for @@ -12,10 +12,10 @@ Signed-off-by: Ondrej Jirman 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c -index 67e35b27382c..950490fc9740 100644 +index c1ddb17d6b74..c883c7945cd3 100644 --- a/drivers/power/supply/axp20x_battery.c +++ b/drivers/power/supply/axp20x_battery.c -@@ -127,7 +127,8 @@ struct axp20x_batt_ps { +@@ -129,6 +129,7 @@ struct axp20x_batt_ps { /* Maximum constant charge current */ unsigned int max_ccc; const struct axp_data *data; @@ -23,8 +23,7 @@ index 67e35b27382c..950490fc9740 100644 bool ts_disable; }; - static int axp20x_battery_get_max_voltage(struct axp20x_batt_ps *axp20x_batt, -@@ -460,6 +461,16 @@ static int axp20x_battery_get_prop(struct power_supply *psy, +@@ -463,6 +464,16 @@ static int axp20x_battery_get_prop(struct power_supply *psy, val->intval *= 1000; break; @@ -41,7 +40,7 @@ index 67e35b27382c..950490fc9740 100644 default: return -EINVAL; } -@@ -913,6 +924,8 @@ static enum power_supply_property axp20x_battery_props[] = { +@@ -916,6 +927,8 @@ static enum power_supply_property axp20x_battery_props[] = { POWER_SUPPLY_PROP_VOLTAGE_MIN, POWER_SUPPLY_PROP_VOLTAGE_OCV, POWER_SUPPLY_PROP_CAPACITY, @@ -50,7 +49,7 @@ index 67e35b27382c..950490fc9740 100644 }; static enum power_supply_property axp717_battery_props[] = { -@@ -1212,12 +1225,18 @@ static const struct of_device_id axp20x_battery_ps_id[] = { +@@ -1233,12 +1246,18 @@ static const struct of_device_id axp20x_battery_ps_id[] = { }; MODULE_DEVICE_TABLE(of, axp20x_battery_ps_id); @@ -70,7 +69,7 @@ index 67e35b27382c..950490fc9740 100644 struct device *dev = &pdev->dev; const struct axp_irq_data *irq_data; int irq, ret; -@@ -1255,9 +1274,12 @@ static int axp20x_power_probe(struct platform_device *pdev) +@@ -1276,9 +1295,12 @@ static int axp20x_power_probe(struct platform_device *pdev) axp20x_batt->health = POWER_SUPPLY_HEALTH_GOOD; @@ -87,5 +86,5 @@ index 67e35b27382c..950490fc9740 100644 /* Request irqs after registering, as irqs may trigger immediately */ -- -2.35.3 +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x-battery-Enable-poweron-by-RTC-alarm.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x-battery-Enable-poweron-by-RTC-alarm.patch index f474a31445..3eeb687c81 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x-battery-Enable-poweron-by-RTC-alarm.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x-battery-Enable-poweron-by-RTC-alarm.patch @@ -1,4 +1,4 @@ -From babceaf2d1819ccd28f846d4c0c6fe7ce1efd9b9 Mon Sep 17 00:00:00 2001 +From 4a466972c38c7e380178e09a4a97abfb9c761c13 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Sat, 27 Aug 2022 20:50:43 +0200 Subject: power: supply: axp20x-battery: Enable poweron by RTC alarm @@ -15,10 +15,10 @@ Signed-off-by: Ondrej Jirman 1 file changed, 5 insertions(+) diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c -index 8fd71a73ec11..67e35b27382c 100644 +index d239634fd527..c1ddb17d6b74 100644 --- a/drivers/power/supply/axp20x_battery.c +++ b/drivers/power/supply/axp20x_battery.c -@@ -1332,6 +1332,11 @@ static int axp20x_power_probe(struct platform_device *pdev) +@@ -1353,6 +1353,11 @@ static int axp20x_power_probe(struct platform_device *pdev) ret = regmap_update_bits(axp20x_batt->regmap, 0x84, 0x37, 0x31); if (ret) goto warn_bat; @@ -31,5 +31,5 @@ index 8fd71a73ec11..67e35b27382c 100644 return 0; -- -2.35.3 +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x-battery-Support-POWER_SUPPLY_PROP_CHARGE_BE.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x-battery-Support-POWER_SUPPLY_PROP_CHARGE_BE.patch index fcd74f5c3c..9dd92c14d5 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x-battery-Support-POWER_SUPPLY_PROP_CHARGE_BE.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x-battery-Support-POWER_SUPPLY_PROP_CHARGE_BE.patch @@ -1,4 +1,4 @@ -From 60faf4cddffdc43e7b150685c3c29d464407db12 Mon Sep 17 00:00:00 2001 +From ea573ea12ba7b78c01fc44f565bf8c2b562dd620 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Sat, 2 Apr 2022 02:50:14 +0200 Subject: power: supply: axp20x-battery: Support @@ -12,10 +12,10 @@ Signed-off-by: Ondrej Jirman 1 file changed, 31 insertions(+) diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c -index a92212fdba91..8fd71a73ec11 100644 +index 23995bece0d2..d239634fd527 100644 --- a/drivers/power/supply/axp20x_battery.c +++ b/drivers/power/supply/axp20x_battery.c -@@ -317,6 +317,19 @@ static int axp20x_battery_get_prop(struct power_supply *psy, +@@ -320,6 +320,19 @@ static int axp20x_battery_get_prop(struct power_supply *psy, val->intval = !!(reg & AXP20X_PWR_OP_BATT_PRESENT); break; @@ -35,7 +35,7 @@ index a92212fdba91..8fd71a73ec11 100644 case POWER_SUPPLY_PROP_STATUS: ret = regmap_read(axp20x_batt->regmap, AXP20X_PWR_OP_MODE, ®); -@@ -818,6 +831,21 @@ static int axp20x_battery_set_prop(struct power_supply *psy, +@@ -821,6 +834,21 @@ static int axp20x_battery_set_prop(struct power_supply *psy, case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX: return axp20x_set_max_constant_charge_current(axp20x_batt, val->intval); @@ -57,7 +57,7 @@ index a92212fdba91..8fd71a73ec11 100644 case POWER_SUPPLY_PROP_STATUS: switch (val->intval) { case POWER_SUPPLY_STATUS_CHARGING: -@@ -875,6 +903,7 @@ static enum power_supply_property axp20x_battery_props[] = { +@@ -878,6 +906,7 @@ static enum power_supply_property axp20x_battery_props[] = { POWER_SUPPLY_PROP_PRESENT, POWER_SUPPLY_PROP_ONLINE, POWER_SUPPLY_PROP_STATUS, @@ -65,7 +65,7 @@ index a92212fdba91..8fd71a73ec11 100644 POWER_SUPPLY_PROP_VOLTAGE_NOW, POWER_SUPPLY_PROP_CURRENT_NOW, POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT, -@@ -906,6 +935,7 @@ static int axp20x_battery_prop_writeable(struct power_supply *psy, +@@ -909,6 +938,7 @@ static int axp20x_battery_prop_writeable(struct power_supply *psy, return psp == POWER_SUPPLY_PROP_STATUS || psp == POWER_SUPPLY_PROP_VOLTAGE_MIN || psp == POWER_SUPPLY_PROP_VOLTAGE_MAX || @@ -73,7 +73,7 @@ index a92212fdba91..8fd71a73ec11 100644 psp == POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT || psp == POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX; } -@@ -927,6 +957,7 @@ static const struct power_supply_desc axp209_batt_ps_desc = { +@@ -930,6 +960,7 @@ static const struct power_supply_desc axp209_batt_ps_desc = { .property_is_writeable = axp20x_battery_prop_writeable, .get_property = axp20x_battery_get_prop, .set_property = axp20x_battery_set_prop, @@ -82,5 +82,5 @@ index a92212fdba91..8fd71a73ec11 100644 static const struct power_supply_desc axp717_batt_ps_desc = { -- -2.35.3 +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x-usb-power-Add-missing-interrupts.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x-usb-power-Add-missing-interrupts.patch index e1584c9c25..95002bdcec 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x-usb-power-Add-missing-interrupts.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x-usb-power-Add-missing-interrupts.patch @@ -1,4 +1,4 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From f181ab74209b47c72fd85ff4b3992e576f806c8d Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Fri, 15 Mar 2024 21:48:34 +0100 Subject: power: supply: axp20x-usb-power: Add missing interrupts @@ -9,14 +9,14 @@ to get BC results ASAP. Signed-off-by: Ondrej Jirman --- drivers/mfd/axp20x.c | 2 ++ - drivers/power/supply/axp20x_usb_power.c | 11 ++++++++-- + drivers/power/supply/axp20x_usb_power.c | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c -index 111111111111..222222222222 100644 +index 4511bfad942f..3bb4a1b1f156 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c -@@ -337,6 +337,8 @@ static const struct resource axp717_usb_power_supply_resources[] = { +@@ -338,6 +338,8 @@ static const struct resource axp717_usb_power_supply_resources[] = { static const struct resource axp803_usb_power_supply_resources[] = { DEFINE_RES_IRQ_NAMED(AXP803_IRQ_VBUS_PLUGIN, "VBUS_PLUGIN"), DEFINE_RES_IRQ_NAMED(AXP803_IRQ_VBUS_REMOVAL, "VBUS_REMOVAL"), @@ -26,7 +26,7 @@ index 111111111111..222222222222 100644 static const struct resource axp22x_pek_resources[] = { diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c -index 111111111111..222222222222 100644 +index b7b0535e3a04..9ad7b7d410eb 100644 --- a/drivers/power/supply/axp20x_usb_power.c +++ b/drivers/power/supply/axp20x_usb_power.c @@ -731,6 +731,13 @@ static const char * const axp717_irq_names[] = { @@ -55,5 +55,5 @@ index 111111111111..222222222222 100644 .curr_lim_table_size = ARRAY_SIZE(axp813_usb_curr_lim_table), .curr_lim_fld = REG_FIELD(AXP22X_CHRG_CTRL3, 4, 7), -- -Armbian +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Add-support-for-reporting-OCV.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Add-support-for-reporting-OCV.patch index ab4a26f0d2..e1c960a9df 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Add-support-for-reporting-OCV.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Add-support-for-reporting-OCV.patch @@ -1,4 +1,4 @@ -From 8bc2a96603c358901e4e51ef3033747cfd08539b Mon Sep 17 00:00:00 2001 +From c0e9f6ca21602b86d1c15562d017e7beeccf3500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= Date: Fri, 28 Feb 2020 19:16:46 +0100 Subject: power: supply: axp20x_battery: Add support for reporting OCV @@ -11,10 +11,10 @@ Signed-off-by: Ondrej Jirman 1 file changed, 23 insertions(+) diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c -index 1c3bcb5c72d8..5745e91519a2 100644 +index 3df6ff7c6f84..4829b9845356 100644 --- a/drivers/power/supply/axp20x_battery.c +++ b/drivers/power/supply/axp20x_battery.c -@@ -270,6 +270,25 @@ static int axp717_get_constant_charge_current(struct axp20x_batt_ps *axp, +@@ -273,6 +273,25 @@ static int axp717_get_constant_charge_current(struct axp20x_batt_ps *axp, return 0; } @@ -40,7 +40,7 @@ index 1c3bcb5c72d8..5745e91519a2 100644 static int axp20x_battery_get_prop(struct power_supply *psy, enum power_supply_property psp, union power_supply_propval *val) -@@ -367,6 +386,9 @@ static int axp20x_battery_get_prop(struct power_supply *psy, +@@ -370,6 +389,9 @@ static int axp20x_battery_get_prop(struct power_supply *psy, val->intval *= 1000; break; @@ -50,7 +50,7 @@ index 1c3bcb5c72d8..5745e91519a2 100644 case POWER_SUPPLY_PROP_CAPACITY: /* When no battery is present, return capacity is 100% */ ret = regmap_read(axp20x_batt->regmap, AXP20X_PWR_OP_MODE, -@@ -850,6 +872,7 @@ static enum power_supply_property axp20x_battery_props[] = { +@@ -853,6 +875,7 @@ static enum power_supply_property axp20x_battery_props[] = { POWER_SUPPLY_PROP_HEALTH, POWER_SUPPLY_PROP_VOLTAGE_MAX, POWER_SUPPLY_PROP_VOLTAGE_MIN, @@ -59,5 +59,5 @@ index 1c3bcb5c72d8..5745e91519a2 100644 }; -- -2.35.3 +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Fix-charging-done-detection.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Fix-charging-done-detection.patch index e49ab1479a..fe75a572ae 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Fix-charging-done-detection.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Fix-charging-done-detection.patch @@ -1,4 +1,4 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From 2279f29982a2aa8ef5aaf1d355679bf66d833413 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Sat, 29 Feb 2020 00:55:09 -0600 Subject: power: supply: axp20x_battery: Fix charging done detection @@ -9,7 +9,7 @@ Signed-off-by: Samuel Holland 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c -index 111111111111..222222222222 100644 +index 2ee4bc3bbc99..4d7ea9d5e50a 100644 --- a/drivers/power/supply/axp20x_battery.c +++ b/drivers/power/supply/axp20x_battery.c @@ -38,6 +38,7 @@ @@ -20,7 +20,7 @@ index 111111111111..222222222222 100644 #define AXP20X_PWR_OP_BATT_PRESENT BIT(5) #define AXP20X_PWR_OP_BATT_ACTIVATED BIT(3) #define AXP717_PWR_OP_BATT_PRESENT BIT(3) -@@ -308,12 +309,12 @@ static int axp20x_battery_get_prop(struct power_supply *psy, +@@ -311,12 +312,12 @@ static int axp20x_battery_get_prop(struct power_supply *psy, break; case POWER_SUPPLY_PROP_STATUS: @@ -36,5 +36,5 @@ index 111111111111..222222222222 100644 return 0; } -- -Armbian +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Monitor-battery-health.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Monitor-battery-health.patch index 95e7cdd180..8522a9361a 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Monitor-battery-health.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Monitor-battery-health.patch @@ -1,4 +1,4 @@ -From e89ebf0b08d42c4c0931818d4b1b5929872fcfa3 Mon Sep 17 00:00:00 2001 +From 1901d7385055ae59155deb6d54b263aa60feeae0 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Sat, 29 Feb 2020 01:04:33 -0600 Subject: power: supply: axp20x_battery: Monitor battery health @@ -9,10 +9,10 @@ Signed-off-by: Samuel Holland 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c -index 4c15cd10f1cc..2d47a63bcc4f 100644 +index 745976993a95..e38d3aa4f417 100644 --- a/drivers/power/supply/axp20x_battery.c +++ b/drivers/power/supply/axp20x_battery.c -@@ -123,6 +123,7 @@ struct axp20x_batt_ps { +@@ -125,6 +125,7 @@ struct axp20x_batt_ps { struct iio_channel *batt_chrg_i; struct iio_channel *batt_dischrg_i; struct iio_channel *batt_v; @@ -20,7 +20,7 @@ index 4c15cd10f1cc..2d47a63bcc4f 100644 /* Maximum constant charge current */ unsigned int max_ccc; const struct axp_data *data; -@@ -362,7 +363,7 @@ static int axp20x_battery_get_prop(struct power_supply *psy, +@@ -365,7 +366,7 @@ static int axp20x_battery_get_prop(struct power_supply *psy, return 0; } @@ -29,7 +29,7 @@ index 4c15cd10f1cc..2d47a63bcc4f 100644 break; case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT: -@@ -1046,6 +1047,39 @@ static irqreturn_t axp20x_battery_changed_irq(int irq, void *devid) +@@ -1067,6 +1068,39 @@ static irqreturn_t axp20x_battery_changed_irq(int irq, void *devid) return IRQ_HANDLED; } @@ -69,7 +69,7 @@ index 4c15cd10f1cc..2d47a63bcc4f 100644 static const struct axp_irq_data axp20x_irqs[] = { { "BATT_PLUGIN", axp20x_battery_changed_irq }, { "BATT_REMOVAL", axp20x_battery_changed_irq }, -@@ -1056,6 +1090,24 @@ static const struct axp_irq_data axp20x_irqs[] = { +@@ -1077,6 +1111,24 @@ static const struct axp_irq_data axp20x_irqs[] = { {} }; @@ -94,7 +94,7 @@ index 4c15cd10f1cc..2d47a63bcc4f 100644 static const struct axp_data axp209_data = { .ccc_scale = 100000, .ccc_offset = 300000, -@@ -1107,7 +1159,7 @@ static const struct axp_data axp813_data = { +@@ -1128,7 +1180,7 @@ static const struct axp_data axp813_data = { .set_max_voltage = axp20x_battery_set_max_voltage, .cfg_iio_chan = axp209_bat_cfg_iio_channels, .set_bat_info = axp209_set_battery_info, @@ -103,7 +103,7 @@ index 4c15cd10f1cc..2d47a63bcc4f 100644 }; static const struct of_device_id axp20x_battery_ps_id[] = { -@@ -1168,6 +1220,8 @@ static int axp20x_power_probe(struct platform_device *pdev) +@@ -1189,6 +1241,8 @@ static int axp20x_power_probe(struct platform_device *pdev) return PTR_ERR(axp20x_batt->batt); } @@ -113,5 +113,5 @@ index 4c15cd10f1cc..2d47a63bcc4f 100644 axp20x_batt->data->set_bat_info(pdev, axp20x_batt, info); power_supply_put_battery_info(axp20x_batt->batt, info); -- -2.35.3 +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Send-uevents-for-status-changes.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Send-uevents-for-status-changes.patch index ba87669d75..6f4a06f441 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Send-uevents-for-status-changes.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Send-uevents-for-status-changes.patch @@ -12,9 +12,9 @@ diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x index 87a7f06ebb37..4c15cd10f1cc 100644 --- a/drivers/power/supply/axp20x_battery.c +++ b/drivers/power/supply/axp20x_battery.c -@@ -90,8 +90,15 @@ - #define AXP717_BAT_CC_MIN_UA 0 - #define AXP717_BAT_CC_MAX_UA 3008000 +@@ -92,8 +92,15 @@ + + #define AXP717_TS_PIN_DISABLE BIT(4) +#define DRVNAME "axp20x-battery-power-supply" + @@ -28,7 +28,7 @@ index 87a7f06ebb37..4c15cd10f1cc 100644 struct axp_data { int ccc_scale; int ccc_offset; -@@ -106,6 +113,7 @@ struct axp_data { +@@ -108,6 +115,7 @@ struct axp_data { void (*set_bat_info)(struct platform_device *pdev, struct axp20x_batt_ps *axp_batt, struct power_supply_battery_info *info); @@ -36,7 +36,7 @@ index 87a7f06ebb37..4c15cd10f1cc 100644 }; struct axp20x_batt_ps { -@@ -1029,6 +1037,25 @@ static void axp717_set_battery_info(struct platform_device *pdev, +@@ -1050,6 +1058,25 @@ static void axp717_set_battery_info(struct platform_device *pdev, } } @@ -62,7 +62,7 @@ index 87a7f06ebb37..4c15cd10f1cc 100644 static const struct axp_data axp209_data = { .ccc_scale = 100000, .ccc_offset = 300000, -@@ -1039,6 +1066,7 @@ static const struct axp_data axp209_data = { +@@ -1060,6 +1087,7 @@ static const struct axp_data axp209_data = { .set_max_voltage = axp20x_battery_set_max_voltage, .cfg_iio_chan = axp209_bat_cfg_iio_channels, .set_bat_info = axp209_set_battery_info, @@ -70,7 +70,7 @@ index 87a7f06ebb37..4c15cd10f1cc 100644 }; static const struct axp_data axp221_data = { -@@ -1052,6 +1080,7 @@ static const struct axp_data axp221_data = { +@@ -1073,6 +1101,7 @@ static const struct axp_data axp221_data = { .set_max_voltage = axp22x_battery_set_max_voltage, .cfg_iio_chan = axp209_bat_cfg_iio_channels, .set_bat_info = axp209_set_battery_info, @@ -78,7 +78,7 @@ index 87a7f06ebb37..4c15cd10f1cc 100644 }; static const struct axp_data axp717_data = { -@@ -1064,6 +1093,7 @@ static const struct axp_data axp717_data = { +@@ -1085,6 +1114,7 @@ static const struct axp_data axp717_data = { .set_max_voltage = axp717_battery_set_max_voltage, .cfg_iio_chan = axp717_bat_cfg_iio_channels, .set_bat_info = axp717_set_battery_info, @@ -86,7 +86,7 @@ index 87a7f06ebb37..4c15cd10f1cc 100644 }; static const struct axp_data axp813_data = { -@@ -1077,6 +1107,7 @@ static const struct axp_data axp813_data = { +@@ -1098,6 +1128,7 @@ static const struct axp_data axp813_data = { .set_max_voltage = axp20x_battery_set_max_voltage, .cfg_iio_chan = axp209_bat_cfg_iio_channels, .set_bat_info = axp209_set_battery_info, @@ -94,7 +94,7 @@ index 87a7f06ebb37..4c15cd10f1cc 100644 }; static const struct of_device_id axp20x_battery_ps_id[] = { -@@ -1098,11 +1129,13 @@ MODULE_DEVICE_TABLE(of, axp20x_battery_ps_id); +@@ -1119,11 +1150,13 @@ MODULE_DEVICE_TABLE(of, axp20x_battery_ps_id); static int axp20x_power_probe(struct platform_device *pdev) { @@ -109,7 +109,7 @@ index 87a7f06ebb37..4c15cd10f1cc 100644 if (!of_device_is_available(pdev->dev.of_node)) return -ENODEV; -@@ -1140,6 +1173,25 @@ static int axp20x_power_probe(struct platform_device *pdev) +@@ -1161,6 +1194,25 @@ static int axp20x_power_probe(struct platform_device *pdev) power_supply_put_battery_info(axp20x_batt->batt, info); } @@ -135,7 +135,7 @@ index 87a7f06ebb37..4c15cd10f1cc 100644 /* * Update max CCC to a valid value if battery info is present or set it * to current register value by default. -@@ -1205,7 +1257,7 @@ static int axp20x_power_probe(struct platform_device *pdev) +@@ -1226,7 +1278,7 @@ static int axp20x_power_probe(struct platform_device *pdev) static struct platform_driver axp20x_batt_driver = { .probe = axp20x_power_probe, .driver = { diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Setup-thermal-regulation-experiment.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Setup-thermal-regulation-experiment.patch index 79a3fdbc7e..ec4657eed0 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Setup-thermal-regulation-experiment.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/power-supply-axp20x_battery-Setup-thermal-regulation-experiment.patch @@ -1,4 +1,4 @@ -From 33cf6c8dccf18c224fd4a0d9ae49fff4f3d7db10 Mon Sep 17 00:00:00 2001 +From efc60f1e2cc950a9150b2aa6894a3dce7be64fc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= Date: Wed, 23 Sep 2020 14:59:41 +0200 Subject: power: supply: axp20x_battery: Setup thermal regulation @@ -14,10 +14,10 @@ Signed-off-by: Ondrej Jirman 1 file changed, 53 insertions(+) diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c -index 5745e91519a2..9c4252f1b7e1 100644 +index 4829b9845356..2ee4bc3bbc99 100644 --- a/drivers/power/supply/axp20x_battery.c +++ b/drivers/power/supply/axp20x_battery.c -@@ -1145,6 +1145,59 @@ static int axp20x_power_probe(struct platform_device *pdev) +@@ -1166,6 +1166,59 @@ static int axp20x_power_probe(struct platform_device *pdev) */ axp20x_get_constant_charge_current(axp20x_batt, &axp20x_batt->max_ccc); @@ -78,5 +78,5 @@ index 5745e91519a2..9c4252f1b7e1 100644 } -- -2.35.3 +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/usb-serial-option-add-reset_resume-callback-for-WWAN-devices.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/usb-serial-option-add-reset_resume-callback-for-WWAN-devices.patch index 63d6819337..b25dfbaf17 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/usb-serial-option-add-reset_resume-callback-for-WWAN-devices.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/usb-serial-option-add-reset_resume-callback-for-WWAN-devices.patch @@ -1,4 +1,4 @@ -From 4bbaab4b405d623fb5c390971387e1f2a4185820 Mon Sep 17 00:00:00 2001 +From 4aedbc5d3a46fac3e7e175e018e7d611f1ec14ef Mon Sep 17 00:00:00 2001 From: Thomas Thorne Date: Tue, 20 Sep 2022 20:34:57 -0400 Subject: usb: serial: option: add 'reset_resume' callback for WWAN devices @@ -17,10 +17,10 @@ However the rest of the patch is not needed/already upstreamed. 1 file changed, 1 insertion(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c -index 27879cc57536..4adc2f535ce4 100644 +index 147ca50c94be..6e9b57412a14 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c -@@ -2474,6 +2474,7 @@ static struct usb_serial_driver option_1port_device = { +@@ -2479,6 +2479,7 @@ static struct usb_serial_driver option_1port_device = { #ifdef CONFIG_PM .suspend = usb_wwan_suspend, .resume = usb_wwan_resume, @@ -29,5 +29,5 @@ index 27879cc57536..4adc2f535ce4 100644 }; -- -2.35.3 +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-altmodes-displayport-Respect-DP_CAP_RECEPTACLE-bit.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-altmodes-displayport-Respect-DP_CAP_RECEPTACLE-bit.patch index 6a02a0a65f..0e7063f6c2 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-altmodes-displayport-Respect-DP_CAP_RECEPTACLE-bit.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-altmodes-displayport-Respect-DP_CAP_RECEPTACLE-bit.patch @@ -1,4 +1,4 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From 4924272fe0385296f3e06d7f9aff5166815c86db Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Mon, 5 Sep 2022 00:56:07 +0200 Subject: usb: typec: altmodes: displayport: Respect DP_CAP_RECEPTACLE bit @@ -14,11 +14,11 @@ wrong VDO. Signed-off-by: Ondrej Jirman --- - drivers/usb/typec/altmodes/displayport.c | 48 +++++++++- + drivers/usb/typec/altmodes/displayport.c | 48 ++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c -index 111111111111..222222222222 100644 +index 6964f403a2d5..9af15469fc3a 100644 --- a/drivers/usb/typec/altmodes/displayport.c +++ b/drivers/usb/typec/altmodes/displayport.c @@ -116,11 +116,29 @@ static int dp_altmode_configure(struct dp_altmode *dp, u8 con) @@ -51,7 +51,7 @@ index 111111111111..222222222222 100644 /* Determining the initial pin assignment. */ if (!DP_CONF_GET_PIN_ASSIGN(dp->data.conf)) { /* Is USB together with DP preferred */ -@@ -726,15 +744,37 @@ int dp_altmode_probe(struct typec_altmode *alt) +@@ -729,15 +747,37 @@ int dp_altmode_probe(struct typec_altmode *alt) struct typec_altmode *plug = typec_altmode_get_plug(alt, TYPEC_PLUG_SOP_P); struct fwnode_handle *fwnode; struct dp_altmode *dp; @@ -94,5 +94,5 @@ index 111111111111..222222222222 100644 dp = devm_kzalloc(&alt->dev, sizeof(*dp), GFP_KERNEL); if (!dp) -- -Armbian +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Fix-PD-devices-capabilities-registration.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Fix-PD-devices-capabilities-registration.patch index ae1374fd51..5de04aeae5 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Fix-PD-devices-capabilities-registration.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Fix-PD-devices-capabilities-registration.patch @@ -1,4 +1,4 @@ -From 21a742946daac1bf85354aa3ca7591fddf02d4d3 Mon Sep 17 00:00:00 2001 +From 93ce0ca78914df9e1d90e082a838cf1f1535728c Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Sat, 18 Feb 2023 00:38:44 +0100 Subject: usb: typec: tcpm: Fix PD devices/capabilities registration @@ -15,10 +15,10 @@ Signed-off-by: Ondrej Jirman 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c -index cd6ce4392490..7b8741dff63d 100644 +index 46c33ab30878..4581137a5498 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c -@@ -3011,15 +3011,22 @@ static int tcpm_register_source_caps(struct tcpm_port *port) +@@ -3062,15 +3062,22 @@ static int tcpm_register_source_caps(struct tcpm_port *port) struct usb_power_delivery_desc desc = { port->negotiated_rev }; struct usb_power_delivery_capabilities_desc caps = { }; struct usb_power_delivery_capabilities *cap; @@ -45,7 +45,7 @@ index cd6ce4392490..7b8741dff63d 100644 cap = usb_power_delivery_register_capabilities(port->partner_pd, &caps); if (IS_ERR(cap)) return PTR_ERR(cap); -@@ -3034,15 +3041,22 @@ static int tcpm_register_sink_caps(struct tcpm_port *port) +@@ -3085,15 +3092,22 @@ static int tcpm_register_sink_caps(struct tcpm_port *port) struct usb_power_delivery_desc desc = { port->negotiated_rev }; struct usb_power_delivery_capabilities_desc caps = { }; struct usb_power_delivery_capabilities *cap; @@ -72,7 +72,7 @@ index cd6ce4392490..7b8741dff63d 100644 cap = usb_power_delivery_register_capabilities(port->partner_pd, &caps); if (IS_ERR(cap)) return PTR_ERR(cap); -@@ -7021,10 +7035,17 @@ static int tcpm_port_register_pd(struct tcpm_port *port) +@@ -7085,10 +7099,17 @@ static int tcpm_port_register_pd(struct tcpm_port *port) port->pds[i] = usb_power_delivery_register(port->dev, &desc); if (IS_ERR(port->pds[i])) { ret = PTR_ERR(port->pds[i]); @@ -91,5 +91,5 @@ index cd6ce4392490..7b8741dff63d 100644 cap = usb_power_delivery_register_capabilities(port->pds[i], &port->pd_list[i]->source_desc); -- -2.35.3 +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Improve-logs.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Improve-logs.patch index 02644215e0..d40ee711c1 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Improve-logs.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Improve-logs.patch @@ -1,4 +1,4 @@ -From 8570cf87270150be076f51ab0868c082949182b7 Mon Sep 17 00:00:00 2001 +From 86ca1f17852ce6c6d716e1c46efde4640ece4d72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= Date: Tue, 23 Nov 2021 17:58:05 +0100 Subject: usb: typec: tcpm: Improve logs @@ -11,10 +11,10 @@ Signed-off-by: Ondrej Jirman 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c -index 7b8741dff63d..627f10469f80 100644 +index 4581137a5498..e4e331f5f53f 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c -@@ -958,10 +958,13 @@ static int tcpm_pd_transmit(struct tcpm_port *port, +@@ -967,10 +967,13 @@ static int tcpm_pd_transmit(struct tcpm_port *port, break; } @@ -30,7 +30,7 @@ index 7b8741dff63d..627f10469f80 100644 reinit_completion(&port->tx_complete); ret = port->tcpc->pd_transmit(port->tcpc, tx_sop_type, msg, negotiated_rev); -@@ -3683,6 +3686,10 @@ void tcpm_pd_receive(struct tcpm_port *port, const struct pd_message *msg, +@@ -3734,6 +3737,10 @@ void tcpm_pd_receive(struct tcpm_port *port, const struct pd_message *msg, enum tcpm_transmit_type rx_sop_type) { struct pd_rx_event *event; @@ -41,7 +41,7 @@ index 7b8741dff63d..627f10469f80 100644 event = kzalloc(sizeof(*event), GFP_ATOMIC); if (!event) -@@ -5968,7 +5975,7 @@ static void _tcpm_cc_change(struct tcpm_port *port, enum typec_cc_status cc1, +@@ -6032,7 +6039,7 @@ static void _tcpm_cc_change(struct tcpm_port *port, enum typec_cc_status cc1, static void _tcpm_pd_vbus_on(struct tcpm_port *port) { @@ -50,7 +50,7 @@ index 7b8741dff63d..627f10469f80 100644 port->vbus_present = true; /* * When vbus_present is true i.e. Voltage at VBUS is greater than VSAFE5V implicitly -@@ -6058,7 +6065,7 @@ static void _tcpm_pd_vbus_on(struct tcpm_port *port) +@@ -6122,7 +6129,7 @@ static void _tcpm_pd_vbus_on(struct tcpm_port *port) static void _tcpm_pd_vbus_off(struct tcpm_port *port) { @@ -60,5 +60,5 @@ index 7b8741dff63d..627f10469f80 100644 port->vbus_never_low = false; switch (port->state) { -- -2.35.3 +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Unregister-altmodes-before-registering-new-ones.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Unregister-altmodes-before-registering-new-ones.patch index 6d03d4f147..d429043ebe 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Unregister-altmodes-before-registering-new-ones.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Unregister-altmodes-before-registering-new-ones.patch @@ -1,4 +1,4 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From 6280029c20f1ef77c09ad479fe09144cdcaff186 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Sun, 14 Aug 2022 16:23:28 +0200 Subject: usb: typec: tcpm: Unregister altmodes before registering new ones @@ -34,10 +34,10 @@ Signed-off-by: Ondrej Jirman 1 file changed, 3 insertions(+) diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c -index 111111111111..222222222222 100644 +index bc00bf2e6761..46c33ab30878 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c -@@ -1752,6 +1752,9 @@ static void tcpm_register_partner_altmodes(struct tcpm_port *port) +@@ -1811,6 +1811,9 @@ static void tcpm_register_partner_altmodes(struct tcpm_port *port) return; for (i = 0; i < modep->altmodes; i++) { @@ -48,5 +48,5 @@ index 111111111111..222222222222 100644 &modep->altmode_desc[i]); if (IS_ERR(altmode)) { -- -Armbian +2.43.0 diff --git a/patch/kernel/archive/sunxi-6.12/series.conf b/patch/kernel/archive/sunxi-6.12/series.conf index 9d8056f010..97016a6eb0 100644 --- a/patch/kernel/archive/sunxi-6.12/series.conf +++ b/patch/kernel/archive/sunxi-6.12/series.conf @@ -187,10 +187,7 @@ patches.megous/drm-rockchip-dw-mipi-dsi-rockchip-Fix-ISP1-PHY-initialization.patch patches.megous/arm64-dts-rk3399-Add-dmc_opp_table.patch patches.megous/bluetooth-h5-Don-t-re-initialize-rtl8723cs-on-resume.patch -- patches.megous/drm-sun4i-Mark-one-of-the-UI-planes-as-a-cursor-one.patch -- patches.megous/drm-sun4i-Implement-gamma-correction.patch patches.megous/drm-panel-st7703-Fix-xbd599-timings-to-make-refresh-rate-exactl.patch -- patches.megous/drm-sun4i-Support-taking-over-display-pipeline-state-from-p-boo.patch patches.megous/video-pwm_bl-Allow-to-change-lth_brightness-via-sysfs.patch patches.megous/clk-sunxi-ng-sun50i-a64-Switch-parent-of-MIPI-DSI-to-periph0-1x.patch patches.megous/drm-sun4i-tcon-Support-keeping-dclk-rate-upon-ancestor-clock-ch.patch @@ -251,7 +248,6 @@ patches.megous/Add-support-for-my-private-Sapomat-device.patch patches.megous/ARM-dts-sun8i-h3-orange-pi-one-Enable-all-gpio-header-UARTs.patch patches.megous/mtd-spi-nor-Add-Alliance-memory-support.patch -- patches.megous/Add-README.md-with-information-and-u-boot-patches.patch patches.megous/Defconfigs-for-all-my-devices.patch ################################################################################