Changed patches

This commit is contained in:
Gerben Jan Dijkman 2022-01-13 15:15:37 +01:00
parent acb0c0fd34
commit 0dbaf84341
5 changed files with 119 additions and 239 deletions

View File

@ -1,12 +0,0 @@
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 03b83aa91277..dfc6c7d1b0e7 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -4070,6 +4070,7 @@ static int btusb_setup_qca(struct hci_dev *hdev)
}
if (!info) {
bt_dev_err(hdev, "don't support firmware rome 0x%x", ver_rom);
+ if (ver_rom & ~0xffffU) return 0;
return -ENODEV;
}

View File

@ -1,49 +0,0 @@
From cb408fb65a08bd45543724c1e9b8f38ae1bebc4a Mon Sep 17 00:00:00 2001
From: Arnaud Ferraris <arnaud.ferraris@gmail.com>
Date: Tue, 4 Aug 2020 15:12:59 +0200
Subject: [PATCH 177/183] leds-gpio: make max_brightness configurable
---
drivers/leds/leds-gpio.c | 4 ++++
include/linux/leds.h | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index 93f5b1b60fde..f8483fab1164 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -108,6 +108,8 @@ static int create_gpio_led(const struct gpio_led *template,
if (ret < 0)
return ret;
+ led_dat->cdev.max_brightness = template->max_brightness;
+
if (template->name) {
led_dat->cdev.name = template->name;
ret = devm_led_classdev_register(parent, &led_dat->cdev);
@@ -177,6 +179,8 @@ static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev)
if (fwnode_property_present(child, "panic-indicator"))
led.panic_indicator = 1;
+ fwnode_property_read_u32(child, "max-brightness", &led.max_brightness);
+
ret = create_gpio_led(&led, led_dat, dev, child, NULL);
if (ret < 0) {
fwnode_handle_put(child);
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 6a8d6409c993..99a80092114d 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -513,7 +513,8 @@ typedef int (*gpio_blink_set_t)(struct gpio_desc *desc, int state,
struct gpio_led {
const char *name;
const char *default_trigger;
- unsigned gpio;
+ unsigned gpio;
+ unsigned max_brightness;
unsigned active_low : 1;
unsigned retain_state_suspended : 1;
unsigned panic_indicator : 1;
--
2.30.0

View File

@ -1,175 +0,0 @@
From 5da6a7e3f4d6e11f4887893672f849d2d4fa5b58 Mon Sep 17 00:00:00 2001
From: Clayton Craft <clayton@craftyguy.net>
Date: Wed, 16 Dec 2020 20:16:14 -0800
Subject: [PATCH] dts: pinephone: drop modem-power node
---
.../allwinner/sun50i-a64-pinephone-1.0.dts | 26 +++---------------
.../allwinner/sun50i-a64-pinephone-1.1.dts | 27 +++----------------
.../allwinner/sun50i-a64-pinephone-1.2.dts | 27 +++----------------
.../dts/allwinner/sun50i-a64-pinephone.dtsi | 12 +++++++++
4 files changed, 24 insertions(+), 68 deletions(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
index 0f6faa44ce3e..2cc513772172 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
@@ -86,28 +86,6 @@ &reg_drivevbus {
status = "okay";
};
-&uart3 {
- modem {
- compatible = "quectel,eg25";
- char-device-name = "modem-power";
-
- power-supply = <&reg_vbat_bb>; /* PL7 */
-
- enable-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */
- reset-gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */
- pwrkey-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
-
- sleep-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
- wakeup-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2-RI */
-
- cts-gpios = <&pio 3 5 GPIO_ACTIVE_HIGH>; /* PD5-CTS */
- dtr-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6-DTR */
- rts-gpios = <&pio 3 4 GPIO_ACTIVE_HIGH>; /* PD4-RTS */
-
- quectel,qdai = "1,1,0,1,0,0,1,1";
- };
-};
-
&usbphy {
usb-role-switch;
@@ -118,6 +96,10 @@ usb0_drd_sw: endpoint {
};
};
+&ring_indicator {
+ gpios = <&pio 1 2 GPIO_ACTIVE_LOW>; /* PB2 */
+};
+
&sgm3140 {
flash-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
enable-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
index 95a880fdc9ce..5f3b6a1a142f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
@@ -109,34 +109,15 @@
status = "okay";
};
+&ring_indicator {
+ gpios = <&pio 1 2 GPIO_ACTIVE_LOW>; /* PB2 */
+};
+
&sgm3140 {
enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
};
-&uart3 {
- modem {
- compatible = "quectel,eg25";
- char-device-name = "modem-power";
-
- power-supply = <&reg_vbat_bb>; /* PL7 */
-
- enable-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */
- reset-gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */
- pwrkey-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
- //status-pwrkey-multiplexed; /* status acts as pwrkey */
-
- sleep-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
- wakeup-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2-RI */
-
- dtr-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6-DTR */
- cts-gpios = <&pio 3 5 GPIO_ACTIVE_HIGH>; /* PD5-CTS */
- rts-gpios = <&pio 3 4 GPIO_ACTIVE_HIGH>; /* PD4-RTS */
-
- quectel,qdai = "1,1,0,1,0,0,1,1";
- };
-};
-
&usbphy {
usb-role-switch;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
index 23ba72508cfc..889841ca5b8a 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
@@ -101,34 +101,15 @@
enable-active-high;
};
+&ring_indicator {
+ gpios = <&r_pio 0 6 GPIO_ACTIVE_LOW>; /* PL6 */
+};
+
&sgm3140 {
enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
};
-&uart3 {
- modem {
- compatible = "quectel,eg25";
- char-device-name = "modem-power";
-
- power-supply = <&reg_vbat_bb>; /* PL7 */
-
- enable-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */
- reset-gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */
- status-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
- pwrkey-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
-
- host-ready-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
- wakeup-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6-RI */
-
- dtr-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2-DTR */
- cts-gpios = <&pio 3 5 GPIO_ACTIVE_HIGH>; /* PD5-CTS */
- rts-gpios = <&pio 3 4 GPIO_ACTIVE_HIGH>; /* PD4-RTS */
-
- quectel,qdai = "1,1,0,1,0,0,1,1";
- };
-};
-
&usbphy {
usb-role-switch;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 02d82980cf39..979d01de8d84 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -192,6 +192,17 @@ ec25_codec: ec25-codec {
compatible = "quectel,ec25";
};
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ ring_indicator: ring-indicator {
+ label = "Ring Indicator";
+ linux,can-disable;
+ linux,code = <KEY_WAKEUP>;
+ wakeup-source;
+ };
+ };
+
i2c_csi: i2c-csi {
compatible = "i2c-gpio";
sda-gpios = <&pio 4 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; /* PE13 */
@@ -256,6 +267,7 @@ reg_usb_5v: usb-5v {
reg_vbat_bb: vbat-bb {
compatible = "regulator-fixed";
regulator-name = "vbat-bb";
+ regulator-always-on;
regulator-min-microvolt = <3500000>;
regulator-max-microvolt = <3500000>;
gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
--
2.29.2

View File

@ -0,0 +1,118 @@
From 1cb7d149c74575485acd993e9b5416bef1a0843e Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Tue, 23 Nov 2021 23:26:26 +0100
Subject: [PATCH 366/403] arm64: dts: rk3399-pinephone-pro: Add support for
powering up the modem
Pinephone Pro has the same modem that's already supported by modem-power.
Add support for it do DT.
Signed-off-by: Ondrej Jirman <megous@megous.com>
---
.../dts/rockchip/rk3399-pinephone-pro.dts | 76 +++++++++++++++++++
1 file changed, 76 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
index b164f4db4151e..2e23744ca5452 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
@@ -253,6 +253,30 @@
};
};
+ vcc_4g_5v: vcc-4g-5v {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc_4g_5v_en>;
+ regulator-name = "vcc_4g_5v";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc_4g: vcc-4g {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio4 RK_PC7 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc_4g_en>;
+ regulator-name = "vcc_4g";
+ regulator-min-microvolt = <3800000>;
+ regulator-max-microvolt = <3800000>;
+ vin-supply = <&vcc_sysin>;
+ };
+
vcc1v8_codec: vcc1v8-codec-regulator {
compatible = "regulator-fixed";
enable-active-high;
@@ -937,6 +961,35 @@
};
};
+&uart3 {
+ status = "okay";
+
+ modem {
+ compatible = "quectel,eg25";
+ char-device-name = "modem-power";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&modem_control_pins>;
+
+ power-supply = <&vcc_4g>;
+ vbus-supply = <&vcc_4g_5v>;
+
+ enable-gpios = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; // W_DISABLE#
+ reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
+ status-gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;
+ pwrkey-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
+
+ host-ready-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>; // apready
+ wakeup-gpios = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>; // ri
+
+ dtr-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>;
+ cts-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
+ rts-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
+
+ quectel,qdai = "1,1,0,1,0,0,1,1";
+ };
+};
+
&pmu_io_domains {
pmu1830-supply = <&vcc_1v8>;
status = "okay";
@@ -997,6 +1050,29 @@
};
};
+ modem {
+ vcc_4g_5v_en: vcc-4g-5v-en-pin {
+ rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ vcc_4g_en: vcc-4g-en-pin {
+ rockchip,pins = <4 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ modem_control_pins: modem-control-pins {
+ rockchip,pins =
+ <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
+ <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
+ <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
+ <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
+ <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>,
+ <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>,
+ <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>,
+ <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>,
+ <3 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
pmic {
pmic_int_l: pmic-int-l {
rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
--
2.34.1

View File

@ -22,10 +22,8 @@ SRC_URI="${KERNEL_URI} ${MEGI_PATCH_URI} -> all-${PV}.patch"
PATCHES=(
${DISTDIR}/all-${PV}.patch
${FILESDIR}/dts-pinephone-drop-modem-power-node.patch
${FILESDIR}/media-ov5640-Implement-autofocus.patch
${FILESDIR}/0107-quirk-kernel-org-bug-210681-firmware_rome_error.patch
${FILESDIR}/0177-leds-gpio-make-max_brightness-configurable.patch
${FILESDIR}/dts-pinephone-pro-dts-modem-fix.patch
${FILESDIR}/panic-led.patch
# Pinephone Keyboard