sm8250: clean up patches for old version of kernel 6.9 and 6.10

This commit is contained in:
amazingfate
2024-12-16 17:36:34 +08:00
committed by Igor
parent b11a6fd872
commit d3761c761d
37 changed files with 3 additions and 8506 deletions

View File

@@ -1,11 +1,11 @@
config: # This is file 'patch/kernel/archive/sm8250-6.7/0000.patching_config.yaml'
# Just some info stuff; not used by the patching scripts
name: sm8250-6.10
name: sm8250-6.12
kind: kernel
type: mainline # or: vendor
branch: linux-6.10.y
last-known-good-tag: v6.10-rc2
branch: linux-6.12.y
last-known-good-tag: v6.12.5
maintainers:
- { github: rpardini, name: Ricardo Pardini, email: ricardo@pardini.net, armbian-forum: rpardini }

View File

@@ -1,29 +0,0 @@
config: # This is file 'patch/kernel/archive/sm8250-6.9/0000.patching_config.yaml'
# Just some info stuff; not used by the patching scripts
name: sm8250-6.9
kind: kernel
type: mainline # or: vendor
branch: linux-6.9.y
last-known-good-tag: v6.9.3
maintainers:
- { github: rpardini, name: Ricardo Pardini, email: ricardo@pardini.net, armbian-forum: rpardini }
# .dts files in these directories will be copied as-is to the build tree; later ones overwrite earlier ones.
# This is meant to provide a way to "add a board DTS" without having to null-patch them in.
dts-directories:
- { source: "dt", target: "arch/arm64/boot/dts/qcom" }
# the Makefile in each of these directories will be magically patched to include the dts files copied
# or patched-in; overlay subdir will be included "-y" if it exists.
# No more Makefile patching needed, yay!
auto-patch-dt-makefile:
- { directory: "arch/arm64/boot/dts/qcom", config-var: "CONFIG_ARCH_QCOM" }
# configuration for when applying patches to git / auto-rewriting patches (development cycle helpers)
patches-to-git:
do-not-commit-files:
- "MAINTAINERS" # constant churn, drop them. sorry.
do-not-commit-regexes: # Python-style regexes
- "^arch/([a-zA-Z0-9]+)/boot/dts/([a-zA-Z0-9]+)/Makefile$" # ignore DT Makefile patches, we've an auto-patcher now

View File

@@ -1,108 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Sun, 20 Dec 2020 18:47:57 +0300
Subject: dt-bindings: mfd: qcom,qca639x: add binding for QCA639x defvice
Qualcomm QCA639x is a family of WiFi + Bluetooth SoCs, with BT part
being controlled through the UART and WiFi being present on PCIe bus.
Both blocks share common power sources. Add binding to describe power
sequencing required to power up this device.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Documentation/devicetree/bindings/mfd/qcom,qca639x.yaml | 84 ++++++++++
1 file changed, 84 insertions(+)
diff --git a/Documentation/devicetree/bindings/mfd/qcom,qca639x.yaml b/Documentation/devicetree/bindings/mfd/qcom,qca639x.yaml
new file mode 100644
index 000000000000..111111111111
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/qcom,qca639x.yaml
@@ -0,0 +1,84 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/mfd/qcom,qca639x.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm QCA639x WiFi + Bluetoot SoC bindings
+
+maintainers:
+ - Andy Gross <agross@kernel.org>
+ - Bjorn Andersson <bjorn.andersson@linaro.org>
+
+description: |
+ This binding describes thes Qualcomm QCA6390 or QCA6391 power supplies and
+ enablement pins.
+
+properties:
+ compatible:
+ const: qcom,qca639x
+
+ '#power-domain-cells':
+ const: 0
+
+ pinctrl-0: true
+ pinctrl-1: true
+
+ pinctrl-names:
+ items:
+ - const: default
+ - const: active
+
+ vddaon-supply:
+ description:
+ 0.95V always-on LDO power input
+
+ vddpmu-supply:
+ description:
+ 0.95V LDO power input to PMU
+
+ vddrfa1-supply:
+ description:
+ 0.95V LDO power input to RFA
+
+ vddrfa2-supply:
+ description:
+ 1.25V LDO power input to RFA
+
+ vddrfa3-supply:
+ description:
+ 2V LDO power input to RFA
+
+ vddpcie1-supply:
+ description:
+ 1.25V LDO power input to PCIe part
+
+ vddpcie2-supply:
+ description:
+ 2V LDO power input to PCIe part
+
+ vddio-supply:
+ description:
+ 1.8V VIO input
+
+additionalProperties: false
+
+examples:
+ - |
+ qca639x: qca639x {
+ compatible = "qcom,qca639x";
+ #power-domain-cells = <0>;
+
+ vddaon-supply = <&vreg_s6a_0p95>;
+ vddpmu-supply = <&vreg_s2f_0p95>;
+ vddrfa1-supply = <&vreg_s2f_0p95>;
+ vddrfa2-supply = <&vreg_s8c_1p3>;
+ vddrfa3-supply = <&vreg_s5a_1p9>;
+ vddpcie1-supply = <&vreg_s8c_1p3>;
+ vddpcie2-supply = <&vreg_s5a_1p9>;
+ vddio-supply = <&vreg_s4a_1p8>;
+ pinctrl-names = "default", "active";
+ pinctrl-0 = <&wlan_default_state &bt_default_state>;
+ pinctrl-1 = <&wlan_active_state &bt_active_state>;
+ };
+...
--
Armbian

View File

@@ -1,223 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Fri, 18 Dec 2020 16:24:56 +0300
Subject: mfd: qca639x: add support for QCA639x powerup sequence
Qualcomm QCA639x is a family of WiFi + Bluetooth SoCs, with BT part
being controlled through the UART and WiFi being present on PCIe
bus. Both blocks share common power sources. So add mfd device driver
handling power sequencing of QCA6390/1.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/mfd/Kconfig | 12 +
drivers/mfd/Makefile | 1 +
drivers/mfd/qcom-qca639x.c | 162 ++++++++++
3 files changed, 175 insertions(+)
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 111111111111..222222222222 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -1123,6 +1123,18 @@ config MFD_PM8XXX
Say M here if you want to include support for PM8xxx chips as a
module. This will build a module called "pm8xxx-core".
+config MFD_QCOM_QCA639X
+ tristate "Qualcomm QCA639x WiFi/Bluetooth module support"
+ depends on REGULATOR && PM_GENERIC_DOMAINS
+ help
+ If you say yes to this option, support will be included for Qualcomm
+ QCA639x family of WiFi and Bluetooth SoCs. Note, this driver supports
+ only power control for this SoC, you still have to enable individual
+ Bluetooth and WiFi drivers.
+
+ Say M here if you want to include support for QCA639x chips as a
+ module. This will build a module called "qcom-qca639x".
+
config MFD_QCOM_RPM
tristate "Qualcomm Resource Power Manager (RPM)"
depends on ARCH_QCOM && OF
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index 111111111111..222222222222 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -204,6 +204,7 @@ obj-$(CONFIG_MFD_SI476X_CORE) += si476x-core.o
obj-$(CONFIG_MFD_CS5535) += cs5535-mfd.o
obj-$(CONFIG_MFD_OMAP_USB_HOST) += omap-usb-host.o omap-usb-tll.o
obj-$(CONFIG_MFD_PM8XXX) += qcom-pm8xxx.o ssbi.o
+obj-$(CONFIG_MFD_QCOM_QCA639X) += qcom-qca639x.o
obj-$(CONFIG_MFD_QCOM_RPM) += qcom_rpm.o
obj-$(CONFIG_MFD_SPMI_PMIC) += qcom-spmi-pmic.o
obj-$(CONFIG_TPS65911_COMPARATOR) += tps65911-comparator.o
diff --git a/drivers/mfd/qcom-qca639x.c b/drivers/mfd/qcom-qca639x.c
new file mode 100644
index 000000000000..111111111111
--- /dev/null
+++ b/drivers/mfd/qcom-qca639x.c
@@ -0,0 +1,162 @@
+#include <linux/delay.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/pinctrl/consumer.h>
+#include <linux/pinctrl/devinfo.h>
+#include <linux/platform_device.h>
+#include <linux/pm_domain.h>
+#include <linux/regulator/consumer.h>
+#include <linux/slab.h>
+
+#define MAX_NUM_REGULATORS 8
+
+static struct vreg {
+ const char *name;
+ unsigned int load_uA;
+} vregs [MAX_NUM_REGULATORS] = {
+ /* 2.0 V */
+ { "vddpcie2", 15000 },
+ { "vddrfa3", 400000 },
+
+ /* 0.95 V */
+ { "vddaon", 100000 },
+ { "vddpmu", 1250000 },
+ { "vddrfa1", 200000 },
+
+ /* 1.35 V */
+ { "vddrfa2", 400000 },
+ { "vddpcie1", 35000 },
+
+ /* 1.8 V */
+ { "vddio", 20000 },
+};
+
+struct qca639x_data {
+ struct regulator_bulk_data regulators[MAX_NUM_REGULATORS];
+ size_t num_vregs;
+ struct device *dev;
+ struct pinctrl_state *active_state;
+ struct generic_pm_domain pd;
+};
+
+#define domain_to_data(domain) container_of(domain, struct qca639x_data, pd)
+
+static int qca639x_power_on(struct generic_pm_domain *domain)
+{
+ struct qca639x_data *data = domain_to_data(domain);
+ int ret;
+
+ dev_warn(&domain->dev, "DUMMY POWER ON\n");
+
+ ret = regulator_bulk_enable(data->num_vregs, data->regulators);
+ if (ret) {
+ dev_err(data->dev, "Failed to enable regulators");
+ return ret;
+ }
+
+ /* Wait for 1ms before toggling enable pins. */
+ msleep(1);
+
+ ret = pinctrl_select_state(data->dev->pins->p, data->active_state);
+ if (ret) {
+ dev_err(data->dev, "Failed to select active state");
+ return ret;
+ }
+
+ /* Wait for all power levels to stabilize */
+ msleep(6);
+
+ return 0;
+}
+
+static int qca639x_power_off(struct generic_pm_domain *domain)
+{
+ struct qca639x_data *data = domain_to_data(domain);
+
+ dev_warn(&domain->dev, "DUMMY POWER OFF\n");
+
+ pinctrl_select_default_state(data->dev);
+ regulator_bulk_disable(data->num_vregs, data->regulators);
+
+ return 0;
+}
+
+static int qca639x_probe(struct platform_device *pdev)
+{
+ struct qca639x_data *data;
+ struct device *dev = &pdev->dev;
+ int i, ret;
+
+ if (!dev->pins || IS_ERR_OR_NULL(dev->pins->default_state))
+ return -EINVAL;
+
+ data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
+ if (!data)
+ return -ENOMEM;
+
+ data->dev = dev;
+ data->num_vregs = ARRAY_SIZE(vregs);
+
+ data->active_state = pinctrl_lookup_state(dev->pins->p, "active");
+ if (IS_ERR(data->active_state)) {
+ ret = PTR_ERR(data->active_state);
+ dev_err(dev, "Failed to get active_state: %d\n", ret);
+ return ret;
+ }
+
+ for (i = 0; i < data->num_vregs; i++)
+ data->regulators[i].supply = vregs[i].name;
+ ret = devm_regulator_bulk_get(dev, data->num_vregs, data->regulators);
+ if (ret < 0)
+ return ret;
+
+ for (i = 0; i < data->num_vregs; i++) {
+ ret = regulator_set_load(data->regulators[i].consumer, vregs[i].load_uA);
+ if (ret)
+ return ret;
+ }
+
+ data->pd.name = dev_name(dev);
+ data->pd.power_on = qca639x_power_on;
+ data->pd.power_off = qca639x_power_off;
+
+ ret = pm_genpd_init(&data->pd, NULL, true);
+ if (ret < 0)
+ return ret;
+
+ ret = of_genpd_add_provider_simple(dev->of_node, &data->pd);
+ if (ret < 0) {
+ pm_genpd_remove(&data->pd);
+ return ret;
+ }
+
+ platform_set_drvdata(pdev, data);
+
+ return 0;
+}
+
+static int qca639x_remove(struct platform_device *pdev)
+{
+ struct qca639x_data *data = platform_get_drvdata(pdev);
+
+ pm_genpd_remove(&data->pd);
+
+ return 0;
+}
+
+static const struct of_device_id qca639x_of_match[] = {
+ { .compatible = "qcom,qca639x" },
+};
+
+static struct platform_driver qca639x_driver = {
+ .probe = qca639x_probe,
+ .remove = qca639x_remove,
+ .driver = {
+ .name = "qca639x",
+ .of_match_table = qca639x_of_match,
+ },
+};
+
+module_platform_driver(qca639x_driver);
+MODULE_LICENSE("GPL v2");
--
Armbian

View File

@@ -1,188 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Sat, 26 Feb 2022 21:13:18 +0300
Subject: mfd: qcom-qca639x: switch to platform config data
Change qcom-qca639x to use platform config data, in preparation to
supporting other devices.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/mfd/qcom-qca639x.c | 74 ++++++----
1 file changed, 46 insertions(+), 28 deletions(-)
diff --git a/drivers/mfd/qcom-qca639x.c b/drivers/mfd/qcom-qca639x.c
index 111111111111..222222222222 100644
--- a/drivers/mfd/qcom-qca639x.c
+++ b/drivers/mfd/qcom-qca639x.c
@@ -1,4 +1,5 @@
#include <linux/delay.h>
+#include <linux/gpio/consumer.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -6,15 +7,21 @@
#include <linux/pinctrl/devinfo.h>
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
+#include <linux/property.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
-#define MAX_NUM_REGULATORS 8
-
-static struct vreg {
+struct vreg {
const char *name;
unsigned int load_uA;
-} vregs [MAX_NUM_REGULATORS] = {
+};
+
+struct qca_cfg_data {
+ const struct vreg *vregs;
+ size_t num_vregs;
+};
+
+static const struct vreg qca6390_vregs[] = {
/* 2.0 V */
{ "vddpcie2", 15000 },
{ "vddrfa3", 400000 },
@@ -32,19 +39,24 @@ static struct vreg {
{ "vddio", 20000 },
};
-struct qca639x_data {
- struct regulator_bulk_data regulators[MAX_NUM_REGULATORS];
+static const struct qca_cfg_data qca6390_cfg_data = {
+ .vregs = qca6390_vregs,
+ .num_vregs = ARRAY_SIZE(qca6390_vregs),
+};
+
+struct qca_data {
size_t num_vregs;
struct device *dev;
struct pinctrl_state *active_state;
struct generic_pm_domain pd;
+ struct regulator_bulk_data regulators[];
};
-#define domain_to_data(domain) container_of(domain, struct qca639x_data, pd)
+#define domain_to_data(domain) container_of(domain, struct qca_data, pd)
-static int qca639x_power_on(struct generic_pm_domain *domain)
+static int qca_power_on(struct generic_pm_domain *domain)
{
- struct qca639x_data *data = domain_to_data(domain);
+ struct qca_data *data = domain_to_data(domain);
int ret;
dev_warn(&domain->dev, "DUMMY POWER ON\n");
@@ -70,9 +82,9 @@ static int qca639x_power_on(struct generic_pm_domain *domain)
return 0;
}
-static int qca639x_power_off(struct generic_pm_domain *domain)
+static int qca_power_off(struct generic_pm_domain *domain)
{
- struct qca639x_data *data = domain_to_data(domain);
+ struct qca_data *data = domain_to_data(domain);
dev_warn(&domain->dev, "DUMMY POWER OFF\n");
@@ -82,21 +94,26 @@ static int qca639x_power_off(struct generic_pm_domain *domain)
return 0;
}
-static int qca639x_probe(struct platform_device *pdev)
+static int qca_probe(struct platform_device *pdev)
{
- struct qca639x_data *data;
+ const struct qca_cfg_data *cfg;
+ struct qca_data *data;
struct device *dev = &pdev->dev;
int i, ret;
+ cfg = device_get_match_data(&pdev->dev);
+ if (!cfg)
+ return -EINVAL;
+
if (!dev->pins || IS_ERR_OR_NULL(dev->pins->default_state))
return -EINVAL;
- data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
+ data = devm_kzalloc(dev, struct_size(data, regulators, cfg->num_vregs), GFP_KERNEL);
if (!data)
return -ENOMEM;
data->dev = dev;
- data->num_vregs = ARRAY_SIZE(vregs);
+ data->num_vregs = cfg->num_vregs;
data->active_state = pinctrl_lookup_state(dev->pins->p, "active");
if (IS_ERR(data->active_state)) {
@@ -106,20 +123,20 @@ static int qca639x_probe(struct platform_device *pdev)
}
for (i = 0; i < data->num_vregs; i++)
- data->regulators[i].supply = vregs[i].name;
+ data->regulators[i].supply = cfg->vregs[i].name;
ret = devm_regulator_bulk_get(dev, data->num_vregs, data->regulators);
if (ret < 0)
return ret;
for (i = 0; i < data->num_vregs; i++) {
- ret = regulator_set_load(data->regulators[i].consumer, vregs[i].load_uA);
+ ret = regulator_set_load(data->regulators[i].consumer, cfg->vregs[i].load_uA);
if (ret)
return ret;
}
data->pd.name = dev_name(dev);
- data->pd.power_on = qca639x_power_on;
- data->pd.power_off = qca639x_power_off;
+ data->pd.power_on = qca_power_on;
+ data->pd.power_off = qca_power_off;
ret = pm_genpd_init(&data->pd, NULL, true);
if (ret < 0)
@@ -136,27 +153,28 @@ static int qca639x_probe(struct platform_device *pdev)
return 0;
}
-static int qca639x_remove(struct platform_device *pdev)
+static int qca_remove(struct platform_device *pdev)
{
- struct qca639x_data *data = platform_get_drvdata(pdev);
+ struct qca_data *data = platform_get_drvdata(pdev);
pm_genpd_remove(&data->pd);
return 0;
}
-static const struct of_device_id qca639x_of_match[] = {
- { .compatible = "qcom,qca639x" },
+static const struct of_device_id qca_of_match[] = {
+ { .compatible = "qcom,qca6390", .data = &qca6390_cfg_data },
+ { },
};
-static struct platform_driver qca639x_driver = {
- .probe = qca639x_probe,
- .remove = qca639x_remove,
+static struct platform_driver qca_driver = {
+ .probe = qca_probe,
+ .remove = qca_remove,
.driver = {
.name = "qca639x",
- .of_match_table = qca639x_of_match,
+ .of_match_table = qca_of_match,
},
};
-module_platform_driver(qca639x_driver);
+module_platform_driver(qca_driver);
MODULE_LICENSE("GPL v2");
--
Armbian

View File

@@ -1,88 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Sat, 26 Feb 2022 21:17:22 +0300
Subject: mfd: qcom-qca639x: change qca639x to use gpios rather than pinctrl
Use gpio interface instead of pinctrl interface to toggle enable pins.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/mfd/qcom-qca639x.c | 33 ++++++----
1 file changed, 19 insertions(+), 14 deletions(-)
diff --git a/drivers/mfd/qcom-qca639x.c b/drivers/mfd/qcom-qca639x.c
index 111111111111..222222222222 100644
--- a/drivers/mfd/qcom-qca639x.c
+++ b/drivers/mfd/qcom-qca639x.c
@@ -47,8 +47,9 @@ static const struct qca_cfg_data qca6390_cfg_data = {
struct qca_data {
size_t num_vregs;
struct device *dev;
- struct pinctrl_state *active_state;
struct generic_pm_domain pd;
+ struct gpio_desc *wlan_en_gpio;
+ struct gpio_desc *bt_en_gpio;
struct regulator_bulk_data regulators[];
};
@@ -70,11 +71,10 @@ static int qca_power_on(struct generic_pm_domain *domain)
/* Wait for 1ms before toggling enable pins. */
msleep(1);
- ret = pinctrl_select_state(data->dev->pins->p, data->active_state);
- if (ret) {
- dev_err(data->dev, "Failed to select active state");
- return ret;
- }
+ if (data->wlan_en_gpio)
+ gpiod_set_value(data->wlan_en_gpio, 1);
+ if (data->bt_en_gpio)
+ gpiod_set_value(data->bt_en_gpio, 1);
/* Wait for all power levels to stabilize */
msleep(6);
@@ -88,7 +88,11 @@ static int qca_power_off(struct generic_pm_domain *domain)
dev_warn(&domain->dev, "DUMMY POWER OFF\n");
- pinctrl_select_default_state(data->dev);
+ if (data->wlan_en_gpio)
+ gpiod_set_value(data->wlan_en_gpio, 0);
+ if (data->bt_en_gpio)
+ gpiod_set_value(data->bt_en_gpio, 0);
+
regulator_bulk_disable(data->num_vregs, data->regulators);
return 0;
@@ -115,13 +119,6 @@ static int qca_probe(struct platform_device *pdev)
data->dev = dev;
data->num_vregs = cfg->num_vregs;
- data->active_state = pinctrl_lookup_state(dev->pins->p, "active");
- if (IS_ERR(data->active_state)) {
- ret = PTR_ERR(data->active_state);
- dev_err(dev, "Failed to get active_state: %d\n", ret);
- return ret;
- }
-
for (i = 0; i < data->num_vregs; i++)
data->regulators[i].supply = cfg->vregs[i].name;
ret = devm_regulator_bulk_get(dev, data->num_vregs, data->regulators);
@@ -134,6 +131,14 @@ static int qca_probe(struct platform_device *pdev)
return ret;
}
+ data->wlan_en_gpio = devm_gpiod_get_optional(&pdev->dev, "wlan-en", GPIOD_OUT_LOW);
+ if (IS_ERR(data->wlan_en_gpio))
+ return PTR_ERR(data->wlan_en_gpio);
+
+ data->bt_en_gpio = devm_gpiod_get_optional(&pdev->dev, "bt-en", GPIOD_OUT_LOW);
+ if (IS_ERR(data->bt_en_gpio))
+ return PTR_ERR(data->bt_en_gpio);
+
data->pd.name = dev_name(dev);
data->pd.power_on = qca_power_on;
data->pd.power_off = qca_power_off;
--
Armbian

View File

@@ -1,29 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Sat, 26 Feb 2022 23:07:54 +0300
Subject: Bluetooth: hci_qca: reopen serial port after toggling power
Reopen the serial port after toggling the power. This saves us from
getting command timeouts on first command submitted.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/bluetooth/hci_qca.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 111111111111..222222222222 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1801,6 +1801,8 @@ static int qca_power_on(struct hci_dev *hdev)
gpiod_set_value_cansleep(qcadev->bt_en, 1);
/* Controller needs time to bootup. */
msleep(150);
+ serdev_device_close(hu->serdev);
+ ret = serdev_device_open(hu->serdev);
}
}
--
Armbian

View File

@@ -1,25 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Fri, 27 Oct 2023 21:18:00 +0800
Subject: tty: serial: qcom-geni: Hack up for qca6390-bt
---
drivers/tty/serial/qcom_geni_serial.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index 111111111111..222222222222 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -819,7 +819,7 @@ static void qcom_geni_serial_handle_rx_dma(struct uart_port *uport, bool drop)
rx_in = readl(uport->membase + SE_DMA_RX_LEN_IN);
if (!rx_in) {
dev_warn(uport->dev, "serial engine reports 0 RX bytes in!\n");
- return;
+ //return;
}
if (!drop)
--
Armbian

View File

@@ -1,135 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Thu, 4 Aug 2022 13:26:53 +0800
Subject: drm: Add drm notifier support
---
drivers/gpu/drm/Makefile | 3 +-
drivers/gpu/drm/drm_notifier.c | 58 ++++++++++
include/drm/drm_notifier.h | 37 ++++++
3 files changed, 97 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -46,7 +46,8 @@ drm-y := \
drm_vblank.o \
drm_vblank_work.o \
drm_vma_manager.o \
- drm_writeback.o
+ drm_writeback.o \
+ drm_notifier.o
drm-$(CONFIG_DRM_LIB_RANDOM) += lib/drm_random.o
drm-$(CONFIG_COMPAT) += drm_ioc32.o
drm-$(CONFIG_DRM_PANEL) += drm_panel.o
diff --git a/drivers/gpu/drm/drm_notifier.c b/drivers/gpu/drm/drm_notifier.c
new file mode 100644
index 000000000000..111111111111
--- /dev/null
+++ b/drivers/gpu/drm/drm_notifier.c
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ * Copyright (C) 2021 XiaoMi, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/notifier.h>
+#include <drm/drm_notifier.h>
+
+static BLOCKING_NOTIFIER_HEAD(mi_drm_notifier_list);
+
+/**
+ * mi_drm_register_client - register a client notifier
+ * @nb: notifier block to callback on events
+ *
+ * This function registers a notifier callback function
+ * to msm_drm_notifier_list, which would be called when
+ * received unblank/power down event.
+ */
+int mi_drm_register_client(struct notifier_block *nb)
+{
+ return blocking_notifier_chain_register(&mi_drm_notifier_list, nb);
+}
+EXPORT_SYMBOL(mi_drm_register_client);
+
+/**
+ * mi_drm_unregister_client - unregister a client notifier
+ * @nb: notifier block to callback on events
+ *
+ * This function unregisters the callback function from
+ * msm_drm_notifier_list.
+ */
+int mi_drm_unregister_client(struct notifier_block *nb)
+{
+ return blocking_notifier_chain_unregister(&mi_drm_notifier_list, nb);
+}
+EXPORT_SYMBOL(mi_drm_unregister_client);
+
+/**
+ * mi_drm_notifier_call_chain - notify clients of drm_events
+ * @val: event MSM_DRM_EARLY_EVENT_BLANK or MSM_DRM_EVENT_BLANK
+ * @v: notifier data, inculde display id and display blank
+ * event(unblank or power down).
+ */
+int mi_drm_notifier_call_chain(unsigned long val, void *v)
+{
+ return blocking_notifier_call_chain(&mi_drm_notifier_list, val, v);
+}
+EXPORT_SYMBOL(mi_drm_notifier_call_chain);
diff --git a/include/drm/drm_notifier.h b/include/drm/drm_notifier.h
new file mode 100644
index 000000000000..111111111111
--- /dev/null
+++ b/include/drm/drm_notifier.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ * Copyright (C) 2021 XiaoMi, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _DRM_NOTIFIER_H_
+#define _DRM_NOTIFIER_H_
+
+#include <linux/notifier.h>
+
+/* A hardware display blank change occurred */
+#define MI_DRM_EVENT_BLANK 0x01
+/* A hardware display blank early change occurred */
+#define MI_DRM_EARLY_EVENT_BLANK 0x02
+
+enum drm_notifier_data {
+ /* panel: power on */
+ MI_DRM_BLANK_UNBLANK,
+ /* panel: power down */
+ MI_DRM_BLANK_POWERDOWN,
+};
+
+int mi_drm_register_client(struct notifier_block *nb);
+int mi_drm_unregister_client(struct notifier_block *nb);
+int mi_drm_notifier_call_chain(unsigned long val, void *v);
+
+#endif /* _DRM_NOTIFIER_H */
--
Armbian

View File

@@ -1,56 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Mon, 17 Oct 2022 08:02:58 +0800
Subject: drm: dsi: emit panel turn on/off signal to touchscreen
---
drivers/gpu/drm/msm/dsi/dsi_manager.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -7,6 +7,7 @@
#include "msm_kms.h"
#include "dsi.h"
+#include "drm/drm_notifier.h"
#define DSI_CLOCK_MASTER DSI_0
#define DSI_CLOCK_SLAVE DSI_1
@@ -273,6 +274,7 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge)
struct mipi_dsi_host *host = msm_dsi->host;
bool is_bonded_dsi = IS_BONDED_DSI();
int ret;
+ enum drm_notifier_data notifier_data;
DBG("id=%d", id);
@@ -286,6 +288,9 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge)
return;
}
+ notifier_data = MI_DRM_BLANK_UNBLANK;
+ mi_drm_notifier_call_chain(MI_DRM_EVENT_BLANK, &notifier_data);
+
ret = msm_dsi_host_enable(host);
if (ret) {
pr_err("%s: enable host %d failed, %d\n", __func__, id, ret);
@@ -329,9 +334,13 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge)
struct mipi_dsi_host *host = msm_dsi->host;
bool is_bonded_dsi = IS_BONDED_DSI();
int ret;
+ enum drm_notifier_data notifier_data;
DBG("id=%d", id);
+ notifier_data = MI_DRM_BLANK_POWERDOWN;
+ mi_drm_notifier_call_chain(MI_DRM_EARLY_EVENT_BLANK, &notifier_data);
+
/*
* Do nothing with the host if it is slave-DSI in case of bonded DSI.
* It is safe to call dsi_mgr_phy_disable() here because a single PHY
--
Armbian

View File

@@ -1,106 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Mon, 6 Mar 2023 23:13:06 +0800
Subject: arm64: dts: qcom: sm8250-xiaomi-elish: enable wifi and bluetooth
Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
---
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 61 ++++++++++
1 file changed, 61 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -30,6 +30,10 @@ / {
qcom,msm-id = <QCOM_ID_SM8250 0x20001>; /* SM8250 v2.1 */
qcom,board-id = <0x10008 0>;
+ aliases {
+ hsuart0 = &uart6;
+ };
+
chosen {
#address-cells = <2>;
#size-cells = <2>;
@@ -114,6 +118,25 @@ vreg_s6c_0p88: smpc6-regulator {
vin-supply = <&vph_pwr>;
};
+ qca639x: qca639x {
+ compatible = "qcom,qca6390";
+ #power-domain-cells = <0>;
+
+ vddaon-supply = <&vreg_s6a_0p95>;
+ vddpmu-supply = <&vreg_s6a_0p95>;
+ vddrfa1-supply = <&vreg_s6a_0p95>;
+ vddrfa2-supply = <&vreg_s8c_1p35>;
+ vddrfa3-supply = <&vreg_s5a_1p9>;
+ vddpcie1-supply = <&vreg_s8c_1p35>;
+ vddpcie2-supply = <&vreg_s5a_1p9>;
+ vddio-supply = <&vreg_s4a_1p8>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&wlan_en_state>;
+
+ wlan-en-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
+ };
+
reserved-memory {
xbl_aop_mem: xbl-aop@80600000 {
reg = <0x0 0x80600000 0x0 0x260000>;
@@ -617,6 +640,9 @@ &pcie0_phy {
vdda-phy-supply = <&vreg_l5a_0p88>;
vdda-pll-supply = <&vreg_l9a_1p2>;
status = "okay";
+
+ /* Power on QCA639x chip, otherwise PCIe bus timeouts */
+ power-domains = <&qca639x>;
};
&pm8150_gpios {
@@ -692,6 +718,41 @@ &slpi {
&tlmm {
gpio-reserved-ranges = <40 4>;
+
+ bt_en_state: bt-default-state {
+ bt-en-pins {
+ pins = "gpio21";
+ function = "gpio";
+
+ drive-strength = <16>;
+ output-low;
+ bias-pull-up;
+ };
+ };
+
+ wlan_en_state: wlan-default-state {
+ wlan-en-pins {
+ pins = "gpio20";
+ function = "gpio";
+
+ drive-strength = <16>;
+ output-low;
+ bias-pull-up;
+ };
+ };
+};
+
+&uart6 {
+ status = "okay";
+
+ bluetooth {
+ compatible = "qcom,qca6390-bt";
+ pinctrl-names = "default";
+ pinctrl-0 = <&bt_en_state>;
+
+ power-domains = <&qca639x>;
+ enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
+ };
};
&usb_1 {
--
Armbian

View File

@@ -1,91 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Mon, 6 Mar 2023 23:23:13 +0800
Subject: arm64: dts: qcom: sm8250-xiaomi-elish: enable touchscreen
Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
---
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts | 5 ++
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 32 ++++++++++
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-csot.dts | 5 ++
3 files changed, 42 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts
@@ -16,3 +16,8 @@ &display_panel {
compatible = "xiaomi,elish-boe-nt36523", "novatek,nt36523";
status = "okay";
};
+
+&touchscreen {
+ firmware-name = "novatek/nt36523-boe.bin";
+ status = "okay";
+};
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -699,6 +699,16 @@ &pon_resin {
status = "okay";
};
+&qup_spi4_cs_gpio {
+ drive-strength = <6>;
+ bias-disable;
+};
+
+&qup_spi4_data_clk {
+ drive-strength = <6>;
+ bias-disable;
+};
+
&qupv3_id_0 {
status = "okay";
};
@@ -716,6 +726,28 @@ &slpi {
status = "okay";
};
+&spi4 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&qup_spi4_data_clk &qup_spi4_cs_gpio>;
+ cs-gpios = <&tlmm 11 GPIO_ACTIVE_LOW>;
+ touchscreen: touchscreen@0 {
+ compatible = "novatek,NVT-ts-spi";
+ reg = <0>; //Same as CS ID
+ status = "disabled";
+
+ spi-max-frequency = <19200000>; //4800000,9600000,15000000,19200000
+ novatek,irq-gpio = <&tlmm 39 0x2001>;
+
+ novatek,pen-support;
+ novatek,wgp-stylus;
+
+ /* 523 */
+ novatek,swrst-n8-addr = <0x03F0FE>;
+ novatek,spi-rd-fast-addr = <0x03F310>;
+ };
+};
+
&tlmm {
gpio-reserved-ranges = <40 4>;
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-csot.dts b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-csot.dts
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-csot.dts
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-csot.dts
@@ -16,3 +16,8 @@ &display_panel {
compatible = "xiaomi,elish-csot-nt36523", "novatek,nt36523";
status = "okay";
};
+
+&touchscreen {
+ firmware-name = "novatek/nt36523-csot.bin";
+ status = "okay";
+};
--
Armbian

View File

@@ -1,25 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Wed, 29 Mar 2023 01:57:43 +0800
Subject: arm64: dts: qcom: sm8250-xiaomi-elish: Disable slpi
---
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -723,7 +723,7 @@ &qupv3_id_2 {
&slpi {
firmware-name = "qcom/sm8250/xiaomi/elish/slpi.mbn";
- status = "okay";
+ status = "disabled";
};
&spi4 {
--
Armbian

View File

@@ -1,126 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Mon, 11 Dec 2023 09:23:28 +0800
Subject: ASoC: qcom: sm8250: Add tdm support
---
sound/soc/qcom/sm8250.c | 75 ++++++++++
1 file changed, 75 insertions(+)
diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c
index 111111111111..222222222222 100644
--- a/sound/soc/qcom/sm8250.c
+++ b/sound/soc/qcom/sm8250.c
@@ -16,6 +16,9 @@
#define DRIVER_NAME "sm8250"
#define MI2S_BCLK_RATE 1536000
+#define TDM_BCLK_RATE 12288000
+
+static unsigned int tdm_slot_offset[8] = {0, 4, 8, 12, 16, 20, 24, 28};
struct sm8250_snd_data {
bool stream_prepared[AFE_PORT_MAX];
@@ -32,6 +35,57 @@ static int sm8250_snd_init(struct snd_soc_pcm_runtime *rtd)
return qcom_snd_wcd_jack_setup(rtd, &data->jack, &data->jack_setup);
}
+static int sm8250_tdm_snd_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params)
+{
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
+ struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
+
+ int ret = 0;
+ int channels, slots, slot_width;
+
+ channels = params_channels(params);
+ slots = 8;
+ slot_width = 32;
+
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0, 0x03,
+ slots, slot_width);
+ if (ret < 0) {
+ dev_err(rtd->dev, "%s: failed to set tdm slot, err:%d\n",
+ __func__, ret);
+ goto end;
+ }
+
+ ret = snd_soc_dai_set_channel_map(cpu_dai, 0, NULL,
+ channels, tdm_slot_offset);
+ if (ret < 0) {
+ dev_err(rtd->dev, "%s: failed to set channel map, err:%d\n",
+ __func__, ret);
+ goto end;
+ }
+ } else {
+ ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0xf, 0,
+ slots, slot_width);
+ if (ret < 0) {
+ dev_err(rtd->dev, "%s: failed to set tdm slot, err:%d\n",
+ __func__, ret);
+ goto end;
+ }
+
+ ret = snd_soc_dai_set_channel_map(cpu_dai, channels,
+ tdm_slot_offset, 0, NULL);
+ if (ret < 0) {
+ dev_err(rtd->dev, "%s: failed to set channel map, err:%d\n",
+ __func__, ret);
+ goto end;
+ }
+ }
+
+end:
+ return ret;
+}
+
static int sm8250_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params)
{
@@ -53,6 +107,7 @@ static int sm8250_snd_startup(struct snd_pcm_substream *substream)
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
+ int ret,j;
switch (cpu_dai->id) {
case TERTIARY_MI2S_RX:
@@ -63,6 +118,21 @@ static int sm8250_snd_startup(struct snd_pcm_substream *substream)
snd_soc_dai_set_fmt(cpu_dai, fmt);
snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt);
break;
+ case TERTIARY_TDM_RX_0:
+ codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_DSP_A;
+ snd_soc_dai_set_sysclk(cpu_dai,
+ Q6AFE_LPASS_CLK_ID_TER_TDM_IBIT,
+ TDM_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK);
+
+ for_each_rtd_codec_dais(rtd, j, codec_dai) {
+ ret = snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt);
+ snd_soc_dai_set_sysclk(codec_dai, 0, TDM_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK);
+ if (ret < 0) {
+ dev_err(rtd->dev, "TDM fmt err:%d\n", ret);
+ return ret;
+ }
+ }
+ break;
default:
break;
}
@@ -88,6 +158,11 @@ static int sm8250_snd_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
struct sm8250_snd_data *pdata = snd_soc_card_get_drvdata(rtd->card);
+ switch (cpu_dai->id) {
+ case PRIMARY_TDM_RX_0 ... QUINARY_TDM_TX_7:
+ return sm8250_tdm_snd_hw_params(substream, params);
+ }
+
return qcom_snd_sdw_hw_params(substream, params, &pdata->sruntime[cpu_dai->id]);
}
--
Armbian

View File

@@ -1,281 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Sat, 18 Mar 2023 22:26:22 +0800
Subject: arm64: dts: qcom: sm8250-xiaomi-elish: Add sound support
---
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 232 ++++++++++
1 file changed, 232 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -6,6 +6,8 @@
#include <dt-bindings/arm/qcom,ids.h>
#include <dt-bindings/phy/phy.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include <dt-bindings/sound/qcom,q6afe.h>
+#include <dt-bindings/sound/qcom,q6asm.h>
#include <dt-bindings/usb/pd.h>
#include "sm8250.dtsi"
#include "pm8150.dtsi"
@@ -530,6 +532,152 @@ fuel-gauge@55 {
};
};
+&i2c1 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ cs35l41_brh: speaker-amp@40 {
+ compatible = "cirrus,cs35l41";
+ reg = <0x40>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
+ cirrus,boost-type = <0>;
+ cirrus,boost-peak-milliamp = <4000>;
+ cirrus,boost-ind-nanohenry = <1000>;
+ cirrus,boost-cap-microfarad = <15>;
+ cirrus,asp-sdout-hiz = <3>;
+ cirrus,gpio2-src-select = <4>;
+ cirrus,gpio2-output-enable;
+ sound-name-prefix = "BRH";
+ #sound-dai-cells = <1>;
+ };
+
+ cs35l41_blh: speaker-amp@41 {
+ compatible = "cirrus,cs35l41";
+ reg = <0x41>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <67 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>;
+ cirrus,boost-type = <0>;
+ cirrus,boost-peak-milliamp = <4000>;
+ cirrus,boost-ind-nanohenry = <1000>;
+ cirrus,boost-cap-microfarad = <15>;
+ cirrus,asp-sdout-hiz = <3>;
+ cirrus,gpio2-src-select = <4>;
+ cirrus,gpio2-output-enable;
+ sound-name-prefix = "BLH";
+ #sound-dai-cells = <1>;
+ };
+
+ cs35l41_brl: speaker-amp@42 {
+ compatible = "cirrus,cs35l41";
+ reg = <0x42>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <100 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpios = <&tlmm 69 GPIO_ACTIVE_HIGH>;
+ cirrus,boost-type = <0>;
+ cirrus,boost-peak-milliamp = <4000>;
+ cirrus,boost-ind-nanohenry = <1000>;
+ cirrus,boost-cap-microfarad = <15>;
+ cirrus,asp-sdout-hiz = <3>;
+ cirrus,gpio2-src-select = <4>;
+ cirrus,gpio2-output-enable;
+ sound-name-prefix = "BRL";
+ #sound-dai-cells = <1>;
+ };
+
+ cs35l41_bll: speaker-amp@43 {
+ compatible = "cirrus,cs35l41";
+ reg = <0x43>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <126 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
+ cirrus,boost-type = <0>;
+ cirrus,boost-peak-milliamp = <4000>;
+ cirrus,boost-ind-nanohenry = <1000>;
+ cirrus,boost-cap-microfarad = <15>;
+ cirrus,asp-sdout-hiz = <3>;
+ cirrus,gpio2-src-select = <4>;
+ cirrus,gpio2-output-enable;
+ sound-name-prefix = "BLL";
+ #sound-dai-cells = <1>;
+ };
+};
+
+&i2c3 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ cs35l41_trh: speaker-amp@40 {
+ compatible = "cirrus,cs35l41";
+ reg = <0x40>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>;
+ cirrus,boost-type = <0>;
+ cirrus,boost-peak-milliamp = <4000>;
+ cirrus,boost-ind-nanohenry = <1000>;
+ cirrus,boost-cap-microfarad = <15>;
+ cirrus,asp-sdout-hiz = <3>;
+ cirrus,gpio2-src-select = <4>;
+ cirrus,gpio2-output-enable;
+ sound-name-prefix = "TRH";
+ #sound-dai-cells = <1>;
+ };
+
+ cs35l41_tlh: speaker-amp@41 {
+ compatible = "cirrus,cs35l41";
+ reg = <0x41>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <92 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpios = <&tlmm 78 GPIO_ACTIVE_HIGH>;
+ cirrus,boost-type = <0>;
+ cirrus,boost-peak-milliamp = <4000>;
+ cirrus,boost-ind-nanohenry = <1000>;
+ cirrus,boost-cap-microfarad = <15>;
+ cirrus,asp-sdout-hiz = <3>;
+ cirrus,gpio2-src-select = <4>;
+ cirrus,gpio2-output-enable;
+ sound-name-prefix = "TLH";
+ #sound-dai-cells = <1>;
+ };
+
+ cs35l41_tll: speaker-amp@42 {
+ compatible = "cirrus,cs35l41";
+ reg = <0x42>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <112 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
+ cirrus,boost-type = <0>;
+ cirrus,boost-peak-milliamp = <4000>;
+ cirrus,boost-ind-nanohenry = <1000>;
+ cirrus,boost-cap-microfarad = <15>;
+ cirrus,asp-sdout-hiz = <3>;
+ cirrus,gpio2-src-select = <4>;
+ cirrus,gpio2-output-enable;
+ sound-name-prefix = "TLL";
+ #sound-dai-cells = <1>;
+ };
+
+ cs35l41_trl: speaker-amp@43 {
+ compatible = "cirrus,cs35l41";
+ reg = <0x43>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <129 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpios = <&tlmm 144 GPIO_ACTIVE_HIGH>;
+ cirrus,boost-type = <0>;
+ cirrus,boost-peak-milliamp = <4000>;
+ cirrus,boost-ind-nanohenry = <1000>;
+ cirrus,boost-cap-microfarad = <15>;
+ cirrus,asp-sdout-hiz = <3>;
+ cirrus,gpio2-src-select = <4>;
+ cirrus,gpio2-output-enable;
+ sound-name-prefix = "TRL";
+ #sound-dai-cells = <1>;
+ };
+};
+
&i2c11 {
clock-frequency = <400000>;
status = "okay";
@@ -721,11 +869,63 @@ &qupv3_id_2 {
status = "okay";
};
+&q6afedai {
+ dai@56 {
+ reg = <TERTIARY_TDM_RX_0>;
+ qcom,tdm-sync-mode = <0>;
+ qcom,tdm-sync-src = <1>;
+ qcom,tdm-data-out = <0>;
+ qcom,tdm-invert-sync = <1>;
+ qcom,tdm-data-delay = <1>;
+ qcom,tdm-data-align = <0>;
+ };
+};
+
+&q6asmdai {
+ dai@0 {
+ reg = <0>;
+ };
+};
+
&slpi {
firmware-name = "qcom/sm8250/xiaomi/elish/slpi.mbn";
status = "disabled";
};
+&sound {
+ compatible = "qcom,sm8250-sndcard";
+ model = "Xiaomi Mi Pad 5 Pro";
+ pinctrl-names = "default";
+ pinctrl-0 = <&tert_tdm_active>;
+
+ mm1-dai-link {
+ link-name = "MultiMedia1";
+
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
+ };
+ };
+
+ speaker-dai-link {
+ link-name = "Tertiary TDM Playback";
+
+ cpu {
+ sound-dai = <&q6afedai TERTIARY_TDM_RX_0>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&cs35l41_tlh 0>, <&cs35l41_tll 0>,
+ <&cs35l41_trh 0>, <&cs35l41_trl 0>,
+ <&cs35l41_blh 0>, <&cs35l41_bll 0>,
+ <&cs35l41_brh 0>, <&cs35l41_brl 0>;
+ };
+ };
+};
+
&spi4 {
status = "okay";
pinctrl-names = "default";
@@ -772,6 +972,38 @@ wlan-en-pins {
bias-pull-up;
};
};
+
+ tert_tdm_active: tert-tdm-active-state {
+ sck-pins {
+ pins = "gpio133";
+ function = "mi2s2_sck";
+ drive-strength = <8>;
+ bias-disable;
+ output-high;
+ };
+
+ din-pins {
+ pins = "gpio134";
+ function = "mi2s2_data0";
+ drive-strength = <8>;
+ bias-disable;
+ };
+
+ ws-pins {
+ pins = "gpio135";
+ function = "mi2s2_ws";
+ drive-strength = <8>;
+ bias-disable;
+ output-high;
+ };
+
+ dout-pins {
+ pins = "gpio137";
+ function = "mi2s2_data1";
+ drive-strength = <8>;
+ bias-disable;
+ };
+ };
};
&uart6 {
--
Armbian

View File

@@ -1,44 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Wed, 29 Mar 2023 19:38:33 +0800
Subject: Asoc: wm_adsp: Add prefix support
---
sound/soc/codecs/wm_adsp.c | 14 ++++++++++
1 file changed, 14 insertions(+)
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 111111111111..222222222222 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -757,6 +757,10 @@ static int wm_adsp_request_firmware_file(struct wm_adsp *dsp,
*filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s-%s.%s", dir, dsp->part,
fwf, wm_adsp_fw[dsp->fw].file, system_name,
filetype);
+ else if (asoc_component_prefix)
+ *filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s-%s.%s", dir, dsp->part,
+ dsp->fwf_name, wm_adsp_fw[dsp->fw].file, asoc_component_prefix,
+ filetype);
else
*filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s.%s", dir, dsp->part, fwf,
wm_adsp_fw[dsp->fw].file, filetype);
@@ -828,6 +832,16 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp,
NULL, "bin");
return 0;
}
+ } else if (asoc_component_prefix) {
+ if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename,
+ cirrus_dir, NULL,
+ NULL, "wmfw")) {
+ adsp_dbg(dsp, "Found '%s'\n", *wmfw_filename);
+ wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
+ cirrus_dir, NULL,
+ asoc_component_prefix, "bin");
+ return 0;
+ }
}
/* Check system-specific bin without wmfw before falling back to generic */
--
Armbian

View File

@@ -1,851 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Pangwalla <pangwalla@protonmail.com>
Date: Fri, 10 Mar 2023 19:09:42 -0500
Subject: arm64: dts: qcom: sm8250-oneplus-instantnoodlep: Add device tree for
Oneplus 8 Pro
---
arch/arm64/boot/dts/qcom/sm8250-oneplus-instantnoodlep.dts | 832 ++++++++++
1 file changed, 832 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-oneplus-instantnoodlep.dts b/arch/arm64/boot/dts/qcom/sm8250-oneplus-instantnoodlep.dts
new file mode 100644
index 000000000000..111111111111
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sm8250-oneplus-instantnoodlep.dts
@@ -0,0 +1,832 @@
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/arm/qcom,ids.h>
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include <dt-bindings/phy/phy.h>
+#include "sm8250.dtsi"
+#include "pm8150.dtsi"
+#include "pm8150b.dtsi"
+#include "pm8150l.dtsi"
+#include "pm8009.dtsi"
+
+/*
+ * Delete following upstream (sm8250.dtsi) reserved
+ * memory mappings which are different in this device.
+ */
+/delete-node/ &removed_mem;
+/delete-node/ &camera_mem;
+/delete-node/ &wlan_mem;
+/delete-node/ &ipa_fw_mem;
+/delete-node/ &ipa_gsi_mem;
+/delete-node/ &gpu_mem;
+/delete-node/ &npu_mem;
+/delete-node/ &video_mem;
+/delete-node/ &cvp_mem;
+/delete-node/ &cdsp_mem;
+/delete-node/ &slpi_mem;
+/delete-node/ &adsp_mem;
+/delete-node/ &spss_mem;
+/delete-node/ &cdsp_secure_heap;
+
+/ {
+ model = "OnePlus 8 Pro (instantnoodlep)";
+ compatible = "oneplus,instantnoodlep", "qcom,kona", "qcom,sm8250";
+ chassis-type = "handset";
+
+ qcom,msm-id = <0x164 0x10000>, <0x164 0x20001>;
+ qcom,board-id = <0x08 0x00>, <0x00 0x00>;
+
+ aliases {
+ hsuart0 = &uart6;
+ };
+
+ chosen {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+ stdout-path = "framebuffer0";
+
+ framebuffer0: framebuffer@9c000000 {
+ compatible = "simple-framebuffer";
+ reg = <0x0 0x9c000000 0x0 (1080 * 2376 * 4)>;
+ width = <1080>;
+ height = <2376>;
+ stride = <(1080 * 4)>;
+ format = "a8r8g8b8";
+ };
+ };
+
+ gpio_keys: gpio-keys {
+ compatible = "gpio-keys";
+
+ vol-up {
+ label = "Volume Up";
+ gpios = <&pm8150_gpios 6 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEUP>;
+ debounce-interval = <15>;
+ linux,can-disable;
+ gpio-key,wakeup;
+ };
+
+ vol-down {
+ label = "Volume Down";
+ linux,code = <KEY_VOLUMEDOWN>;
+ gpios = <&pm8150_gpios 7 GPIO_ACTIVE_LOW>;
+ debounce-interval = <15>;
+ linux,can-disable;
+ gpio-key,wakeup;
+ };
+ };
+
+ reserved-memory {
+ removed_mem: memory@80b00000 {
+ reg = <0x0 0x80b00000 0x0 0xcd00000>;
+ no-map;
+ };
+
+ camera_mem: memory@8dc00000 {
+ reg = <0x0 0x8dc00000 0x0 0x500000>;
+ no-map;
+ };
+
+ wlan_mem: memory@8e100000 {
+ reg = <0x0 0x8e100000 0x0 0x100000>;
+ no-map;
+ };
+
+ ipa_fw_mem: memory@8e200000 {
+ reg = <0x0 0x8e200000 0x0 0x10000>;
+ no-map;
+ };
+
+ ipa_gsi_mem: memory@8e210000 {
+ reg = <0x0 0x8e210000 0x0 0xa000>;
+ no-map;
+ };
+
+ gpu_mem: memory@8e21a000 {
+ reg = <0x0 0x8e21a000 0x0 0x2000>;
+ no-map;
+ };
+
+ npu_mem: memory@8e300000 {
+ reg = <0x0 0x8e300000 0x0 0x500000>;
+ no-map;
+ };
+
+ video_mem: memory@8e800000 {
+ reg = <0x0 0x8e800000 0x0 0x500000>;
+ no-map;
+ };
+
+ cvp_mem: memory@8ed00000 {
+ reg = <0x0 0x8ed00000 0x0 0x500000>;
+ no-map;
+ };
+
+ cdsp_mem: memory@8f200000 {
+ reg = <0x0 0x8f200000 0x0 0x1400000>;
+ no-map;
+ };
+
+ slpi_mem: memory@90600000 {
+ reg = <0x0 0x90600000 0x0 0x1500000>;
+ no-map;
+ };
+
+ adsp_mem: memory@91b00000 {
+ reg = <0x00 0x91b00000 0x00 0x2500000>;
+ no-map;
+ };
+
+ spss_mem: memory@94000000 {
+ reg = <0x0 0x94000000 0x0 0x100000>;
+ no-map;
+ };
+
+ cdsp_secure_heap: memory@94100000 {
+ reg = <0x0 0x94100000 0x0 0x4600000>;
+ no-map;
+ };
+
+ cont_splash_mem: memory@9c000000 {
+ reg = <0x0 0x9c000000 0x0 0x2300000>;
+ no-map;
+ };
+
+ ramoops@b0000000 {
+ compatible = "ramoops";
+ reg = <0x00 0xb0000000 0x00 0x400000>;
+ record-size = <0x40000>;
+ console-size = <0x40000>;
+ ecc-size = <0x00>;
+ no-map;
+ };
+ };
+
+ vph_pwr: vph-pwr-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vph_pwr";
+ regulator-min-microvolt = <3700000>;
+ regulator-max-microvolt = <3700000>;
+ };
+
+ vreg_s6c_0p88: smpc6-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vreg_s6c_0p88";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <880000>;
+ regulator-always-on;
+ vin-supply = <&vph_pwr>;
+ };
+
+ vreg_s4a_1p8: vreg-s4a-1p8 {
+ compatible = "regulator-fixed";
+ regulator-name = "vreg_s4a_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+
+ qca639x: qca639x {
+ compatible = "qcom,qca6390";
+ #power-domain-cells = <0>;
+
+ vddaon-supply = <&vreg_s6a_0p95>;
+ vddpmu-supply = <&vreg_s2f_0p95>;
+ vddrfa1-supply = <&vreg_s2f_0p95>;
+ vddrfa2-supply = <&vreg_s8c_1p3>;
+ vddrfa3-supply = <&vreg_s5a_1p9>;
+ vddpcie1-supply = <&vreg_s8c_1p3>;
+ vddpcie2-supply = <&vreg_s5a_1p9>;
+ vddio-supply = <&vreg_s4a_1p8>;
+
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&wlan_en_active>;
+ pinctrl-1 = <&wlan_en_sleep>;
+
+ wlan-en-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
+ };
+
+ battery: battery {
+ compatible = "simple-battery";
+
+ charge-full-design-microamp-hours = <4410000>;
+ energy-full-design-microwatt-hours = <17060000>;
+ voltage-max-design-microvolt = <4350000>;
+ };
+};
+
+&apps_rsc {
+ regulators-0 {
+ compatible = "qcom,pm8009-1-rpmh-regulators";
+ qcom,pmic-id = "f";
+
+ vdd-s1-supply = <&vph_pwr>;
+ vdd-s2-supply = <&vph_pwr>;
+ vdd-l2-supply = <&vreg_s8c_1p3>;
+ vdd-l5-l6-supply = <&vreg_bob>;
+ vdd-l7-supply = <&vreg_s4a_1p8>;
+
+ vreg_s2f_0p95: smps2 {
+ regulator-name = "vreg_s2f_0p95";
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <952000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
+ };
+
+ vreg_l1f_1p1: ldo1 {
+ regulator-name = "vreg_l1f_1p1";
+ regulator-min-microvolt = <1104000>;
+ regulator-max-microvolt = <1104000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2f_1p2: ldo2 {
+ regulator-name = "vreg_l2f_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6f_2p8: ldo6 {
+ regulator-name = "vreg_l6f_2p8";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7f_1p8: ldo7 {
+ regulator-name = "vreg_l7f_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-1 {
+ compatible = "qcom,pm8150-rpmh-regulators";
+ qcom,pmic-id = "a";
+
+ vdd-s1-supply = <&vph_pwr>;
+ vdd-s2-supply = <&vph_pwr>;
+ vdd-s3-supply = <&vph_pwr>;
+ vdd-s4-supply = <&vph_pwr>;
+ vdd-s5-supply = <&vph_pwr>;
+ vdd-s6-supply = <&vph_pwr>;
+ vdd-s7-supply = <&vph_pwr>;
+ vdd-s8-supply = <&vph_pwr>;
+ vdd-s9-supply = <&vph_pwr>;
+ vdd-s10-supply = <&vph_pwr>;
+ vdd-l2-l10-supply = <&vreg_bob>;
+ vdd-l3-l4-l5-l18-supply = <&vreg_s6a_0p95>;
+ vdd-l6-l9-supply = <&vreg_s8c_1p3>;
+ vdd-l7-l12-l14-l15-supply = <&vreg_s5a_1p9>;
+ vdd-l13-l16-l17-supply = <&vreg_bob>;
+
+ vreg_l2a_3p1: ldo2 {
+ regulator-name = "vreg_l2a_3p1";
+ regulator-min-microvolt = <3072000>;
+ regulator-max-microvolt = <3072000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3a_0p9: ldo3 {
+ regulator-name = "vreg_l3a_0p9";
+ regulator-min-microvolt = <928000>;
+ regulator-max-microvolt = <932000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l5a_0p88: ldo5 {
+ regulator-name = "vreg_l5a_0p88";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <880000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6a_1p2: ldo6 {
+ regulator-name = "vreg_l6a_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7a_1p7: ldo7 {
+ regulator-name = "vreg_l7a_1p7";
+ regulator-min-microvolt = <1704000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l9a_1p2: ldo9 {
+ regulator-name = "vreg_l9a_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l10a_1p8: ldo10 {
+ regulator-name = "vreg_l10a_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l12a_1p8: ldo12 {
+ regulator-name = "vreg_l12a_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l13a_ts_3p0: ldo13 {
+ regulator-name = "vreg_l13a_ts_3p0";
+ regulator-min-microvolt = <3008000>;
+ regulator-max-microvolt = <3008000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l14a_1p8: ldo14 {
+ regulator-name = "vreg_l14a_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1880000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l15a_1p8: ldo15 {
+ regulator-name = "vreg_l15a_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l16a_2p7: ldo16 {
+ regulator-name = "vreg_l16a_2p7";
+ regulator-min-microvolt = <2704000>;
+ regulator-max-microvolt = <2960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l17a_3p0: ldo17 {
+ regulator-name = "vreg_l17a_3p0";
+ regulator-min-microvolt = <2856000>;
+ regulator-max-microvolt = <3008000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l18a_0p92: ldo18 {
+ regulator-name = "vreg_l18a_0p92";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <912000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s5a_1p9: smps5 {
+ regulator-name = "vreg_s5a_1p9";
+ regulator-min-microvolt = <1904000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s6a_0p95: smps6 {
+ regulator-name = "vreg_s6a_0p95";
+ regulator-min-microvolt = <920000>;
+ regulator-max-microvolt = <1128000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-2 {
+ compatible = "qcom,pm8150l-rpmh-regulators";
+ qcom,pmic-id = "c";
+
+ vdd-s1-supply = <&vph_pwr>;
+ vdd-s2-supply = <&vph_pwr>;
+ vdd-s3-supply = <&vph_pwr>;
+ vdd-s4-supply = <&vph_pwr>;
+ vdd-s5-supply = <&vph_pwr>;
+ vdd-s6-supply = <&vph_pwr>;
+ vdd-s7-supply = <&vph_pwr>;
+ vdd-s8-supply = <&vph_pwr>;
+ vdd-l1-l8-supply = <&vreg_s4a_1p8>;
+ vdd-l2-l3-supply = <&vreg_s8c_1p3>;
+ vdd-l4-l5-l6-supply = <&vreg_bob>;
+ vdd-l7-l11-supply = <&vreg_bob>;
+ vdd-l9-l10-supply = <&vreg_bob>;
+ vdd-bob-supply = <&vph_pwr>;
+
+ vreg_bob: bob {
+ regulator-name = "vreg_bob";
+ regulator-min-microvolt = <3008000>;
+ regulator-max-microvolt = <4000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
+ };
+
+ vreg_l1c_1p8: ldo1 {
+ regulator-name = "vreg_l1c_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2c_1p2: ldo2 {
+ regulator-name = "vreg_l2c_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3c_0p8: ldo3 {
+ regulator-name = "vreg_l3c_0p8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l4c_1p7: ldo4 {
+ regulator-name = "vreg_l4c_1p7";
+ regulator-min-microvolt = <1704000>;
+ regulator-max-microvolt = <2928000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l5c_1p8: ldo5 {
+ regulator-name = "vreg_l5c_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2928000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6c_2p96: ldo6 {
+ regulator-name = "vreg_l6c_2p96";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7c_cam_vcm0_2p85: ldo7 {
+ regulator-name = "vreg_l7c_cam_vcm0_2p85";
+ regulator-min-microvolt = <2856000>;
+ regulator-max-microvolt = <3104000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l8c_1p8: ldo8 {
+ regulator-name = "vreg_l8c_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l9c_2p96: ldo9 {
+ regulator-name = "vreg_l9c_2p96";
+ regulator-min-microvolt = <2704000>;
+ regulator-max-microvolt = <2960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l10c_3p0: ldo10 {
+ regulator-name = "vreg_l10c_3p0";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l11c_3p3: ldo11 {
+ regulator-name = "vreg_l11c_3p3";
+ regulator-min-microvolt = <3296000>;
+ regulator-max-microvolt = <3296000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
+ };
+
+ vreg_s8c_1p3: smps8 {
+ regulator-name = "vreg_s8c_1p3";
+ regulator-min-microvolt = <1352000>;
+ regulator-max-microvolt = <1352000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+};
+
+&adsp {
+ firmware-name = "postmarketos/adsp.mbn";
+ status = "okay";
+};
+
+&cdsp {
+ firmware-name = "postmarketos/cdsp.mbn";
+ status = "okay";
+};
+
+&dispcc {
+ status = "disabled";
+};
+
+&gmu {
+ status = "okay";
+};
+
+&gpi_dma0 {
+ status = "okay";
+};
+
+&gpi_dma1 {
+ status = "okay";
+};
+
+&gpi_dma2 {
+ status = "okay";
+};
+
+&gpu {
+ status = "disabled";
+};
+
+&i2c1 {
+ status = "okay";
+
+ nfc@28 {
+ compatible = "nxp,nxp-nci-i2c";
+ reg = <0x28>;
+
+ interrupt-parent = <&tlmm>;
+ interrupts = <0x6f IRQ_TYPE_LEVEL_HIGH>;
+
+ enable-gpios = <&tlmm 83 GPIO_ACTIVE_HIGH>,
+ <&tlmm 110 GPIO_ACTIVE_HIGH>;
+ };
+};
+
+&i2c5 {
+ status = "okay";
+
+ charger@66 {
+ compatible = "ti,bq25980";
+ status = "ok";
+ reg = <0x66>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <0x0f 0x00>;
+ monitored-battery = <&battery>;
+ };
+};
+
+&i2c16 {
+ status = "okay";
+
+ smart_battery: fuel-gauge@55 {
+ compatible = "ti,bq27541";
+ reg = <0x55>;
+ monitored-battery = <&battery>;
+ };
+};
+
+&i2c13 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ touchscreen@48 {
+ compatible = "samsung,s6sy761";
+ reg = <0x48>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <0x27 0x2008>;
+
+ vdd-supply = <&vreg_l13a_ts_3p0>;
+ avdd-supply = <&vreg_l1c_1p8>;
+
+ touchscreen-size-x = <1440>;
+ touchscreen-size-y = <3168>;
+
+ pinctrl-names = "default", "suspend";
+ pinctrl-0 = <&ts_int_active>;
+ pinctrl-1 = <&ts_rst_suspend>;
+ };
+};
+
+&mdss {
+ status = "okay";
+};
+
+&slpi {
+ firmware-name = "postmarketos/slpi.mbn";
+ status = "okay";
+};
+
+&pcie0 {
+ status = "okay";
+};
+
+&pcie0_phy {
+ vdda-phy-supply = <&vreg_l5a_0p88>;
+ vdda-pll-supply = <&vreg_l9a_1p2>;
+ status = "okay";
+ power-domains = <&qca639x>;
+};
+
+&pcie1 {
+ status = "okay";
+};
+
+&pcie1_phy {
+ vdda-phy-supply = <&vreg_l5a_0p88>;
+ vdda-pll-supply = <&vreg_l9a_1p2>;
+ status = "okay";
+};
+
+&pcie2 {
+ status = "okay";
+};
+
+&pcie2_phy {
+ vdda-phy-supply = <&vreg_l5a_0p88>;
+ vdda-pll-supply = <&vreg_l9a_1p2>;
+ status = "okay";
+};
+
+&pm8150_gpios {
+ vol_up_n: vol-up-n-state {
+ pins = "gpio6";
+ function = "normal";
+ power-source = <1>;
+ input-enable;
+ bias-pull-up;
+ };
+
+ vol_down_n: vol-down-n-state {
+ pins = "gpio7";
+ function = "normal";
+ power-source = <1>;
+ input-enable;
+ bias-pull-up;
+ };
+};
+
+&pon_pwrkey {
+ status = "okay";
+};
+
+&pon_resin {
+ linux,code = <KEY_VOLUMEDOWN>;
+ status = "okay";
+};
+
+&qup_spi4_cs_gpio {
+ drive-strength = <6>;
+ bias-disable;
+};
+
+&qup_spi4_data_clk {
+ drive-strength = <6>;
+ bias-disable;
+};
+
+&qupv3_id_0 {
+ status = "okay";
+};
+
+&qupv3_id_1 {
+ status = "okay";
+};
+
+&qupv3_id_2 {
+ status = "okay";
+};
+
+&tlmm {
+ gpio-reserved-ranges = <28 4>, <40 4>;
+
+ bt_en_active: bt-default-state {
+ bt-en {
+ pins = "gpio21";
+ function = "gpio";
+
+ drive-strength = <16>;
+ output-low;
+ bias-pull-up;
+ };
+ };
+
+ bt_en_sleep: bt-sleep-state {
+ pins = "gpio21";
+ function = "gpio";
+
+ drive-strength = <0x02>;
+ output-low;
+ bias-pull-down;
+ };
+
+ wlan_en_active: wlan-default-state {
+ wlan-en {
+ pins = "gpio20";
+ function = "gpio";
+
+ drive-strength = <16>;
+ output-low;
+ bias-pull-up;
+ };
+ };
+
+ wlan_en_sleep: wlan-sleep-state {
+ pins = "gpio20";
+ function = "gpio";
+
+ drive-strength = <16>;
+ output-low;
+ bias-pull-down;
+ };
+
+ ts_int_active: ts-int-active-state {
+ pins = "gpio38", "gpio39";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ ts_rst_suspend: ts-rst-suspend {
+ pins = "gpio38";
+ function = "gpio";
+ drive-strength = <0x02>;
+ bias-pull-down;
+ };
+};
+
+&uart6 {
+ status = "okay";
+
+ bluetooth {
+ compatible = "qcom,qca6390-bt";
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&bt_en_active>;
+ pinctrl-1 = <&bt_en_sleep>;
+
+ power-domains = <&qca639x>;
+ enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
+ };
+};
+
+&ufs_mem_hc {
+ vcc-supply = <&vreg_l17a_3p0>;
+ vcc-max-microamp = <800000>;
+ vccq-supply = <&vreg_l6a_1p2>;
+ vccq-max-microamp = <800000>;
+ vccq2-supply = <&vreg_s4a_1p8>;
+ vccq2-max-microamp = <800000>;
+ status = "okay";
+};
+
+&ufs_mem_phy {
+ vdda-phy-supply = <&vreg_l5a_0p88>;
+ vdda-pll-supply = <&vreg_l9a_1p2>;
+ status = "okay";
+};
+
+&usb_1 {
+ /* USB 2.0 only */
+ qcom,select-utmi-as-pipe-clk;
+ status = "okay";
+};
+
+&usb_1_dwc3 {
+ dr_mode = "peripheral";
+ maximum-speed = "high-speed";
+ /* Remove USB3 phy */
+ phys = <&usb_1_hsphy>;
+ phy-names = "usb2-phy";
+};
+
+&usb_1_hsphy {
+ vdda-pll-supply = <&vreg_l5a_0p88>;
+ vdda18-supply = <&vreg_l12a_1p8>;
+ vdda33-supply = <&vreg_l2a_3p1>;
+ status = "okay";
+};
+
+&usb_2 {
+ status = "okay";
+};
+
+&usb_2_dwc3 {
+ dr_mode = "host";
+};
+
+&usb_2_hsphy {
+ status = "okay";
+
+ vdda-pll-supply = <&vreg_l5a_0p88>;
+ vdda33-supply = <&vreg_l2a_3p1>;
+ vdda18-supply = <&vreg_l12a_1p8>;
+};
+
+&usb_2_qmpphy {
+ status = "okay";
+
+ vdda-phy-supply = <&vreg_l9a_1p2>;
+ vdda-pll-supply = <&vreg_l18a_0p92>;
+};
+
+&venus {
+ firmware-name = "postmarketos/venus.mbn";
+ status = "okay";
+};
--
Armbian

View File

@@ -1,78 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Sun, 4 Jun 2023 21:44:33 +0300
Subject: drm/msm/dsi: change sync mode to sync on DSI0 rather than DSI1
Change MSM DSI's sync-dual-dsi mode to resync on DSI0 rather than DSI1.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/gpu/drm/msm/dsi/dsi_manager.c | 24 +++++-----
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -519,7 +519,7 @@ int msm_dsi_manager_ext_bridge_init(u8 id, struct drm_bridge *int_bridge)
int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg)
{
struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
- struct msm_dsi *msm_dsi0 = dsi_mgr_get_dsi(DSI_0);
+ struct msm_dsi *msm_dsi1 = dsi_mgr_get_dsi(DSI_1);
struct mipi_dsi_host *host = msm_dsi->host;
bool is_read = (msg->rx_buf && msg->rx_len);
bool need_sync = (IS_SYNC_NEEDED() && !is_read);
@@ -530,14 +530,14 @@ int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg)
/* In bonded master case, panel requires the same commands sent to
* both DSI links. Host issues the command trigger to both links
- * when DSI_1 calls the cmd transfer function, no matter it happens
- * before or after DSI_0 cmd transfer.
+ * when DSI_0 calls the cmd transfer function, no matter it happens
+ * before or after DSI_1 cmd transfer.
*/
- if (need_sync && (id == DSI_0))
+ if (need_sync && (id == DSI_1))
return is_read ? msg->rx_len : msg->tx_len;
- if (need_sync && msm_dsi0) {
- ret = msm_dsi_host_xfer_prepare(msm_dsi0->host, msg);
+ if (need_sync && msm_dsi1) {
+ ret = msm_dsi_host_xfer_prepare(msm_dsi1->host, msg);
if (ret) {
pr_err("%s: failed to prepare non-trigger host, %d\n",
__func__, ret);
@@ -556,8 +556,8 @@ int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg)
msm_dsi_host_xfer_restore(host, msg);
restore_host0:
- if (need_sync && msm_dsi0)
- msm_dsi_host_xfer_restore(msm_dsi0->host, msg);
+ if (need_sync && msm_dsi1)
+ msm_dsi_host_xfer_restore(msm_dsi1->host, msg);
return ret;
}
@@ -565,14 +565,14 @@ int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg)
bool msm_dsi_manager_cmd_xfer_trigger(int id, u32 dma_base, u32 len)
{
struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
- struct msm_dsi *msm_dsi0 = dsi_mgr_get_dsi(DSI_0);
+ struct msm_dsi *msm_dsi1 = dsi_mgr_get_dsi(DSI_1);
struct mipi_dsi_host *host = msm_dsi->host;
- if (IS_SYNC_NEEDED() && (id == DSI_0))
+ if (IS_SYNC_NEEDED() && (id == DSI_1))
return false;
- if (IS_SYNC_NEEDED() && msm_dsi0)
- msm_dsi_host_cmd_xfer_commit(msm_dsi0->host, dma_base, len);
+ if (IS_SYNC_NEEDED() && msm_dsi1)
+ msm_dsi_host_cmd_xfer_commit(msm_dsi1->host, dma_base, len);
msm_dsi_host_cmd_xfer_commit(host, dma_base, len);
--
Armbian

View File

@@ -1,130 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Sun, 14 Mar 2021 04:52:34 +0300
Subject: drm/msm/dpu1: improve support for active CTLs
- Support setting master interface if several INTFs are to be handled by
a single CTL
- Support setting handling several MERGE_3D instances using a single
CTL.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
[Marijn: Rebase patch on -next, fix conflicting implementation with
recent MERGE_3D patch, implement proper active support for DSC]
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 38 ++++++++--
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h | 2 +
2 files changed, 32 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
@@ -544,10 +544,12 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx,
struct dpu_hw_intf_cfg *cfg)
{
struct dpu_hw_blk_reg_map *c = &ctx->hw;
- u32 intf_active = 0;
- u32 dsc_active = 0;
- u32 wb_active = 0;
u32 mode_sel = 0;
+ u32 cdm_active;
+ u32 intf_active;
+ u32 wb_active;
+ u32 dsc_active;
+ u32 merge_3d_active;
/* CTL_TOP[31:28] carries group_id to collate CTL paths
* per VM. Explicitly disable it until VM support is
@@ -559,9 +561,14 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx,
if (cfg->intf_mode_sel == DPU_CTL_MODE_SEL_CMD)
mode_sel |= BIT(17);
+ cdm_active = DPU_REG_READ(c, CTL_CDM_ACTIVE);
intf_active = DPU_REG_READ(c, CTL_INTF_ACTIVE);
wb_active = DPU_REG_READ(c, CTL_WB_ACTIVE);
dsc_active = DPU_REG_READ(c, CTL_DSC_ACTIVE);
+ merge_3d_active = DPU_REG_READ(c, CTL_MERGE_3D_ACTIVE);
+
+ if (cfg->cdm)
+ cdm_active |= cfg->cdm;
if (cfg->intf)
intf_active |= BIT(cfg->intf - INTF_0);
@@ -572,17 +579,23 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx,
if (cfg->dsc)
dsc_active |= cfg->dsc;
+ if (cfg->merge_3d)
+ merge_3d_active |= BIT(cfg->merge_3d - MERGE_3D_0);
+
DPU_REG_WRITE(c, CTL_TOP, mode_sel);
+ DPU_REG_WRITE(c, CTL_CDM_ACTIVE, cdm_active);
DPU_REG_WRITE(c, CTL_INTF_ACTIVE, intf_active);
DPU_REG_WRITE(c, CTL_WB_ACTIVE, wb_active);
DPU_REG_WRITE(c, CTL_DSC_ACTIVE, dsc_active);
+ DPU_REG_WRITE(c, CTL_MERGE_3D_ACTIVE, merge_3d_active);
- if (cfg->merge_3d)
- DPU_REG_WRITE(c, CTL_MERGE_3D_ACTIVE,
- BIT(cfg->merge_3d - MERGE_3D_0));
+ if (cfg->intf_master)
+ DPU_REG_WRITE(c, CTL_INTF_MASTER, BIT(cfg->intf_master - INTF_0));
- if (cfg->cdm)
- DPU_REG_WRITE(c, CTL_CDM_ACTIVE, cfg->cdm);
+ if (cfg->intf_master)
+ DPU_DEBUG_DRIVER("ACTIVE: intf:%#x merge_3d:%#x dsc:%#x master_intf:%d\n", intf_active, merge_3d_active, dsc_active, cfg->intf_master - INTF_0);
+ else
+ DPU_DEBUG_DRIVER("ACTIVE: intf:%#x merge_3d:%#x dsc:%#x\n", intf_active, merge_3d_active, dsc_active);
}
static void dpu_hw_ctl_intf_cfg(struct dpu_hw_ctl *ctx,
@@ -623,6 +636,7 @@ static void dpu_hw_ctl_reset_intf_cfg_v1(struct dpu_hw_ctl *ctx,
{
struct dpu_hw_blk_reg_map *c = &ctx->hw;
u32 intf_active = 0;
+ u32 intf_master = 0;
u32 wb_active = 0;
u32 merge3d_active = 0;
u32 dsc_active;
@@ -649,6 +663,14 @@ static void dpu_hw_ctl_reset_intf_cfg_v1(struct dpu_hw_ctl *ctx,
intf_active = DPU_REG_READ(c, CTL_INTF_ACTIVE);
intf_active &= ~BIT(cfg->intf - INTF_0);
DPU_REG_WRITE(c, CTL_INTF_ACTIVE, intf_active);
+
+ /* Unset this intf as master, if it is the current master */
+ /* TODO: Marijn: does this make any sense? */
+ intf_master = DPU_REG_READ(c, CTL_INTF_MASTER);
+ if (intf_master == BIT(cfg->intf - INTF_0)) {
+ DPU_DEBUG_DRIVER("Unsetting intf:%d master\n", cfg->intf - INTF_0);
+ DPU_REG_WRITE(c, CTL_INTF_MASTER, 0);
+ }
}
if (cfg->wb) {
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
@@ -36,6 +36,7 @@ struct dpu_hw_stage_cfg {
/**
* struct dpu_hw_intf_cfg :Describes how the DPU writes data to output interface
* @intf : Interface id
+ * @intf_master: Master interface id in the dual pipe topology
* @mode_3d: 3d mux configuration
* @merge_3d: 3d merge block used
* @intf_mode_sel: Interface mode, cmd / vid
@@ -45,6 +46,7 @@ struct dpu_hw_stage_cfg {
*/
struct dpu_hw_intf_cfg {
enum dpu_intf intf;
+ enum dpu_intf intf_master;
enum dpu_wb wb;
enum dpu_3d_blend_mode mode_3d;
enum dpu_merge_3d merge_3d;
--
Armbian

View File

@@ -1,110 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Sun, 14 Mar 2021 04:58:32 +0300
Subject: drm/msm/dpu1: use one active CTL if it is available
Unlike previous generation, with newer ("active") CTLs it is possible to
use just one CTL to handle both interfaces. And one has to use single
CTL to support master/slave DSI config. So use one active CTL if it is
available.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 8 ++++--
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 1 +
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 14 +++++++---
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h | 1 +
4 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -1190,14 +1190,18 @@ static void dpu_encoder_virt_atomic_mode_set(struct drm_encoder *drm_enc,
return;
}
- if (!hw_ctl[i]) {
+ /* Use first (and only) CTL if active CTLs are supported */
+ if (dpu_kms->catalog->caps->has_active_ctls)
+ phys->hw_ctl = to_dpu_hw_ctl(hw_ctl[0]);
+ else
+ phys->hw_ctl = to_dpu_hw_ctl(hw_ctl[i]);
+ if (!phys->hw_ctl) {
DPU_ERROR_ENC(dpu_enc,
"no ctl block assigned at idx: %d\n", i);
return;
}
phys->hw_pp = dpu_enc->hw_pp[i];
- phys->hw_ctl = to_dpu_hw_ctl(hw_ctl[i]);
phys->cached_mode = crtc_state->adjusted_mode;
}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
@@ -354,6 +354,7 @@ struct dpu_caps {
bool has_dim_layer;
bool has_idle_pc;
bool has_3d_merge;
+ bool has_active_ctls;
/* SSPP limits */
u32 max_linewidth;
u32 pixel_ram_size;
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
@@ -132,6 +132,7 @@ int dpu_rm_init(struct drm_device *dev,
}
rm->ctl_blks[ctl->id - CTL_0] = &hw->base;
}
+ rm->has_active_ctls = cat->caps->has_active_ctls;
for (i = 0; i < cat->dspp_count; i++) {
struct dpu_hw_dspp *hw;
@@ -366,10 +367,15 @@ static int _dpu_rm_reserve_ctls(
int i = 0, j, num_ctls;
bool needs_split_display;
- /* each hw_intf needs its own hw_ctrl to program its control path */
- num_ctls = top->num_intf;
+ if (rm->has_active_ctls) {
+ num_ctls = 1;
+ needs_split_display = false;
+ } else {
+ /* each hw_intf needs its own hw_ctrl to program its control path */
+ num_ctls = top->num_intf;
- needs_split_display = _dpu_rm_needs_split_display(top);
+ needs_split_display = _dpu_rm_needs_split_display(top);
+ }
for (j = 0; j < ARRAY_SIZE(rm->ctl_blks); j++) {
const struct dpu_hw_ctl *ctl;
@@ -387,7 +393,7 @@ static int _dpu_rm_reserve_ctls(
DPU_DEBUG("ctl %d caps 0x%lX\n", j + CTL_0, features);
- if (needs_split_display != has_split_display)
+ if (!rm->has_active_ctls && needs_split_display != has_split_display)
continue;
ctl_idx[i] = j;
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h
@@ -35,6 +35,7 @@ struct dpu_rm {
struct dpu_hw_blk *dsc_blks[DSC_MAX - DSC_0];
struct dpu_hw_sspp *hw_sspp[SSPP_MAX - SSPP_NONE];
struct dpu_hw_blk *cdm_blk;
+ bool has_active_ctls;
};
/**
--
Armbian

View File

@@ -1,157 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Thu, 11 May 2023 18:44:50 +0300
Subject: drm/msm/dpu: populate has_active_ctls in the catalog
Set the has_active_ctls for all the platforms which need this bit.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 1 +
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h | 1 +
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 1 +
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h | 1 +
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h | 1 +
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h | 1 +
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h | 1 +
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 1 +
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h | 1 +
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 1 +
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 1 +
11 files changed, 11 insertions(+)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h
@@ -14,6 +14,7 @@ static const struct dpu_caps sm8150_dpu_caps = {
.has_dim_layer = true,
.has_idle_pc = true,
.has_3d_merge = true,
+ .has_active_ctls = true,
.max_linewidth = 4096,
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
.max_hdeci_exp = MAX_HORZ_DECIMATION,
diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h
@@ -14,6 +14,7 @@ static const struct dpu_caps sc8180x_dpu_caps = {
.has_dim_layer = true,
.has_idle_pc = true,
.has_3d_merge = true,
+ .has_active_ctls = true,
.max_linewidth = 4096,
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
.max_hdeci_exp = MAX_HORZ_DECIMATION,
diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h
@@ -14,6 +14,7 @@ static const struct dpu_caps sm8250_dpu_caps = {
.has_dim_layer = true,
.has_idle_pc = true,
.has_3d_merge = true,
+ .has_active_ctls = true,
.max_linewidth = 4096,
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
};
diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h
@@ -12,6 +12,7 @@ static const struct dpu_caps sc7180_dpu_caps = {
.max_mixer_blendstages = 0x9,
.has_dim_layer = true,
.has_idle_pc = true,
+ .has_active_ctls = true,
.max_linewidth = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
};
diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h
@@ -12,6 +12,7 @@ static const struct dpu_caps sm6115_dpu_caps = {
.max_mixer_blendstages = 0x4,
.has_dim_layer = true,
.has_idle_pc = true,
+ .has_active_ctls = true,
.max_linewidth = 2160,
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
};
diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h
@@ -12,6 +12,7 @@ static const struct dpu_caps qcm2290_dpu_caps = {
.max_mixer_blendstages = 0x4,
.has_dim_layer = true,
.has_idle_pc = true,
+ .has_active_ctls = true,
.max_linewidth = 2160,
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
};
diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h
@@ -14,6 +14,7 @@ static const struct dpu_caps sm8350_dpu_caps = {
.has_dim_layer = true,
.has_idle_pc = true,
.has_3d_merge = true,
+ .has_active_ctls = true,
.max_linewidth = 4096,
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
};
diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h
@@ -12,6 +12,7 @@ static const struct dpu_caps sc7280_dpu_caps = {
.max_mixer_blendstages = 0x7,
.has_dim_layer = true,
.has_idle_pc = true,
+ .has_active_ctls = true,
.max_linewidth = 2400,
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
};
diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h
@@ -14,6 +14,7 @@ static const struct dpu_caps sc8280xp_dpu_caps = {
.has_dim_layer = true,
.has_idle_pc = true,
.has_3d_merge = true,
+ .has_active_ctls = true,
.max_linewidth = 5120,
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
};
diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h
@@ -14,6 +14,7 @@ static const struct dpu_caps sm8450_dpu_caps = {
.has_dim_layer = true,
.has_idle_pc = true,
.has_3d_merge = true,
+ .has_active_ctls = true,
.max_linewidth = 5120,
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
};
diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h
@@ -14,6 +14,7 @@ static const struct dpu_caps sm8550_dpu_caps = {
.has_dim_layer = true,
.has_idle_pc = true,
.has_3d_merge = true,
+ .has_active_ctls = true,
.max_linewidth = 5120,
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
};
--
Armbian

View File

@@ -1,54 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Sun, 14 Mar 2021 05:03:35 +0300
Subject: drm/msm/dpu1: dpu_encoder_phys_*: proper support for active CTLs
Adapt dpu_encoder_phys_* to properly support active CTLs and their
features.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
[Marijn: title typo]
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 2 ++
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 5 ++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
@@ -59,6 +59,8 @@ static void _dpu_encoder_phys_cmd_update_intf_cfg(
return;
intf_cfg.intf = phys_enc->hw_intf->idx;
+ if (phys_enc->split_role == ENC_ROLE_MASTER)
+ intf_cfg.intf_master = phys_enc->hw_intf->idx;
intf_cfg.intf_mode_sel = DPU_CTL_MODE_SEL_CMD;
intf_cfg.stream_sel = cmd_enc->stream_sel;
intf_cfg.mode_3d = dpu_encoder_helper_get_3d_blend_mode(phys_enc);
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
@@ -280,6 +280,8 @@ static void dpu_encoder_phys_vid_setup_timing_engine(
if (phys_enc->hw_cdm)
intf_cfg.cdm = phys_enc->hw_cdm->idx;
intf_cfg.intf = phys_enc->hw_intf->idx;
+ if (phys_enc->split_role == ENC_ROLE_MASTER)
+ intf_cfg.intf_master = phys_enc->hw_intf->idx;
intf_cfg.intf_mode_sel = DPU_CTL_MODE_SEL_VID;
intf_cfg.stream_sel = 0; /* Don't care value for video mode */
intf_cfg.mode_3d = dpu_encoder_helper_get_3d_blend_mode(phys_enc);
@@ -353,7 +355,8 @@ static void dpu_encoder_phys_vid_underrun_irq(void *arg)
static bool dpu_encoder_phys_vid_needs_single_flush(
struct dpu_encoder_phys *phys_enc)
{
- return phys_enc->split_role != ENC_ROLE_SOLO;
+ return !(phys_enc->hw_ctl->caps->features & BIT(DPU_CTL_ACTIVE_CFG)) &&
+ phys_enc->split_role != ENC_ROLE_SOLO;
}
static int dpu_encoder_phys_vid_control_vblank_irq(
--
Armbian

View File

@@ -1,39 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Sat, 2 Dec 2023 19:04:51 +0800
Subject: arm64: dts: qcom: sm8250-xiaomi-elish: add pd negotiation support
---
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -810,7 +810,8 @@ &pm8150b_typec {
connector {
compatible = "usb-c-connector";
- power-role = "source";
+ op-sink-microwatt = <10000000>;
+ power-role = "dual";
data-role = "dual";
self-powered;
@@ -819,6 +820,12 @@ PDO_FIXED_DUAL_ROLE |
PDO_FIXED_USB_COMM |
PDO_FIXED_DATA_SWAP)>;
+ sink-pdos = <PDO_FIXED(5000, 3000,
+ PDO_FIXED_DUAL_ROLE |
+ PDO_FIXED_USB_COMM |
+ PDO_FIXED_DATA_SWAP)
+ PDO_VAR(5000, 12000, 5000)>;
+
ports {
#address-cells = <1>;
#size-cells = <0>;
--
Armbian

View File

@@ -1,70 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Sat, 2 Dec 2023 19:08:14 +0800
Subject: arm64: dts: qcom: sm8250-xiaomi-elish: add keyboard support
---
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 40 ++++++++++
1 file changed, 40 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -1011,6 +1011,23 @@ dout-pins {
bias-disable;
};
};
+
+ keyboard_active: keyboard-active-state {
+ sleep-pins {
+ pins = "gpio155";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+
+ vdd-pins {
+ pins = "gpio127";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-disable;
+ output-high;
+ };
+ };
};
&uart6 {
@@ -1052,6 +1069,29 @@ &usb_1_role_switch_out {
remote-endpoint = <&pm8150b_role_switch_in>;
};
+&usb_2 {
+ /* USB 2.0 only */
+ qcom,select-utmi-as-pipe-clk;
+ status = "okay";
+};
+
+&usb_2_dwc3 {
+ dr_mode = "host";
+ maximum-speed = "high-speed";
+ /* Remove USB3 phy */
+ phys = <&usb_2_hsphy>;
+ phy-names = "usb2-phy";
+};
+
+&usb_2_hsphy {
+ vdda-pll-supply = <&vreg_l5a_0p88>;
+ vdda18-supply = <&vreg_l12a_1p8>;
+ vdda33-supply = <&vreg_l2a_3p1>;
+ status = "okay";
+ pinctrl-0 = <&keyboard_active>;
+ pinctrl-names = "default";
+};
+
&ufs_mem_hc {
vcc-supply = <&vreg_l17a_3p0>;
vcc-max-microamp = <800000>;
--
Armbian

View File

@@ -1,851 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: d4n1 <d4n1.551@gmail.com>
Date: Fri, 19 Jan 2024 15:17:45 +0500
Subject: arm64: dts: qcom: sm8250-oneplus-kebab: Add device tree for OnePlus
8t
---
arch/arm64/boot/dts/qcom/sm8250-oneplus-kebab.dts | 832 ++++++++++
1 file changed, 832 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-oneplus-kebab.dts b/arch/arm64/boot/dts/qcom/sm8250-oneplus-kebab.dts
new file mode 100644
index 000000000000..111111111111
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sm8250-oneplus-kebab.dts
@@ -0,0 +1,832 @@
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/arm/qcom,ids.h>
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include <dt-bindings/phy/phy.h>
+#include "sm8250.dtsi"
+#include "pm8150.dtsi"
+#include "pm8150b.dtsi"
+#include "pm8150l.dtsi"
+#include "pm8009.dtsi"
+
+/*
+ * Delete following upstream (sm8250.dtsi) reserved
+ * memory mappings which are different in this device.
+ */
+/delete-node/ &removed_mem;
+/delete-node/ &camera_mem;
+/delete-node/ &wlan_mem;
+/delete-node/ &ipa_fw_mem;
+/delete-node/ &ipa_gsi_mem;
+/delete-node/ &gpu_mem;
+/delete-node/ &npu_mem;
+/delete-node/ &video_mem;
+/delete-node/ &cvp_mem;
+/delete-node/ &cdsp_mem;
+/delete-node/ &slpi_mem;
+/delete-node/ &adsp_mem;
+/delete-node/ &spss_mem;
+/delete-node/ &cdsp_secure_heap;
+
+/ {
+ model = "OnePlus 8T (kebab)";
+ compatible = "oneplus,kebab", "qcom,kona", "qcom,sm8250";
+ chassis-type = "handset";
+
+ qcom,msm-id = <0x164 0x10000>, <0x164 0x20001>;
+ qcom,board-id = <0x08 0x00>, <0x00 0x00>;
+
+ aliases {
+ hsuart0 = &uart6;
+ };
+
+ chosen {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+ stdout-path = "framebuffer0";
+
+ framebuffer0: framebuffer@9c000000 {
+ compatible = "simple-framebuffer";
+ reg = <0x0 0x9c000000 0x0 (1080 * 2376 * 4)>;
+ width = <1080>;
+ height = <2376>;
+ stride = <(1080 * 4)>;
+ format = "a8r8g8b8";
+ };
+ };
+
+ gpio_keys: gpio-keys {
+ compatible = "gpio-keys";
+
+ vol-up {
+ label = "Volume Up";
+ gpios = <&pm8150_gpios 6 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEUP>;
+ debounce-interval = <15>;
+ linux,can-disable;
+ gpio-key,wakeup;
+ };
+
+ vol-down {
+ label = "Volume Down";
+ linux,code = <KEY_VOLUMEDOWN>;
+ gpios = <&pm8150_gpios 7 GPIO_ACTIVE_LOW>;
+ debounce-interval = <15>;
+ linux,can-disable;
+ gpio-key,wakeup;
+ };
+ };
+
+ reserved-memory {
+ // removed_mem: memory@80b00000 {
+ // reg = <0x0 0x80b00000 0x0 0xcd00000>;
+ // no-map;
+ // };
+
+ camera_mem: memory@8dc00000 {
+ reg = <0x0 0x8dc00000 0x0 0x500000>;
+ no-map;
+ };
+
+ wlan_mem: memory@8e100000 {
+ reg = <0x0 0x8e100000 0x0 0x100000>;
+ no-map;
+ };
+
+ ipa_fw_mem: memory@8e200000 {
+ reg = <0x0 0x8e200000 0x0 0x10000>;
+ no-map;
+ };
+
+ ipa_gsi_mem: memory@8e210000 {
+ reg = <0x0 0x8e210000 0x0 0xa000>;
+ no-map;
+ };
+
+ gpu_mem: memory@8e21a000 {
+ reg = <0x0 0x8e21a000 0x0 0x2000>;
+ no-map;
+ };
+
+ npu_mem: memory@8e300000 {
+ reg = <0x0 0x8e300000 0x0 0x500000>;
+ no-map;
+ };
+
+ video_mem: memory@8e800000 {
+ reg = <0x0 0x8e800000 0x0 0x500000>;
+ no-map;
+ };
+
+ cvp_mem: memory@8ed00000 {
+ reg = <0x0 0x8ed00000 0x0 0x500000>;
+ no-map;
+ };
+
+ cdsp_mem: memory@8f200000 {
+ reg = <0x0 0x8f200000 0x0 0x1400000>;
+ no-map;
+ };
+
+ slpi_mem: memory@90600000 {
+ reg = <0x0 0x90600000 0x0 0x1500000>;
+ no-map;
+ };
+
+ adsp_mem: memory@91b00000 {
+ reg = <0x00 0x91b00000 0x00 0x2500000>;
+ no-map;
+ };
+
+ spss_mem: memory@94000000 {
+ reg = <0x0 0x94000000 0x0 0x100000>;
+ no-map;
+ };
+
+ cdsp_secure_heap: memory@94100000 {
+ reg = <0x0 0x94100000 0x0 0x4600000>;
+ no-map;
+ };
+
+ cont_splash_mem: memory@9c000000 {
+ reg = <0x0 0x9c000000 0x0 0x2300000>;
+ no-map;
+ };
+
+ // ramoops@b0000000 {
+ // compatible = "ramoops";
+ // reg = <0x00 0xb0000000 0x00 0x400000>;
+ // record-size = <0x40000>;
+ // console-size = <0x40000>;
+ // ecc-size = <0x00>;
+ // no-map;
+ // };
+ };
+
+ vph_pwr: vph-pwr-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vph_pwr";
+ regulator-min-microvolt = <3700000>;
+ regulator-max-microvolt = <3700000>;
+ };
+
+ vreg_s6c_0p88: smpc6-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vreg_s6c_0p88";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <880000>;
+ regulator-always-on;
+ vin-supply = <&vph_pwr>;
+ };
+
+ vreg_s4a_1p8: vreg-s4a-1p8 {
+ compatible = "regulator-fixed";
+ regulator-name = "vreg_s4a_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+
+ qca639x: qca639x {
+ compatible = "qcom,qca6390";
+ #power-domain-cells = <0>;
+
+ vddaon-supply = <&vreg_s6a_0p95>;
+ vddpmu-supply = <&vreg_s2f_0p95>;
+ vddrfa1-supply = <&vreg_s2f_0p95>;
+ vddrfa2-supply = <&vreg_s8c_1p3>;
+ vddrfa3-supply = <&vreg_s5a_1p9>;
+ vddpcie1-supply = <&vreg_s8c_1p3>;
+ vddpcie2-supply = <&vreg_s5a_1p9>;
+ vddio-supply = <&vreg_s4a_1p8>;
+
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&wlan_en_active>;
+ pinctrl-1 = <&wlan_en_sleep>;
+
+ wlan-en-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
+ };
+
+ battery: battery {
+ compatible = "simple-battery";
+
+ charge-full-design-microamp-hours = <4410000>;
+ energy-full-design-microwatt-hours = <17060000>;
+ voltage-max-design-microvolt = <4350000>;
+ };
+};
+
+&apps_rsc {
+ regulators-0 {
+ compatible = "qcom,pm8009-1-rpmh-regulators";
+ qcom,pmic-id = "f";
+
+ vdd-s1-supply = <&vph_pwr>;
+ vdd-s2-supply = <&vph_pwr>;
+ vdd-l2-supply = <&vreg_s8c_1p3>;
+ vdd-l5-l6-supply = <&vreg_bob>;
+ vdd-l7-supply = <&vreg_s4a_1p8>;
+
+ vreg_s2f_0p95: smps2 {
+ regulator-name = "vreg_s2f_0p95";
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <952000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
+ };
+
+ vreg_l1f_1p1: ldo1 {
+ regulator-name = "vreg_l1f_1p1";
+ regulator-min-microvolt = <1104000>;
+ regulator-max-microvolt = <1104000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2f_1p2: ldo2 {
+ regulator-name = "vreg_l2f_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6f_2p8: ldo6 {
+ regulator-name = "vreg_l6f_2p8";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7f_1p8: ldo7 {
+ regulator-name = "vreg_l7f_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-1 {
+ compatible = "qcom,pm8150-rpmh-regulators";
+ qcom,pmic-id = "a";
+
+ vdd-s1-supply = <&vph_pwr>;
+ vdd-s2-supply = <&vph_pwr>;
+ vdd-s3-supply = <&vph_pwr>;
+ vdd-s4-supply = <&vph_pwr>;
+ vdd-s5-supply = <&vph_pwr>;
+ vdd-s6-supply = <&vph_pwr>;
+ vdd-s7-supply = <&vph_pwr>;
+ vdd-s8-supply = <&vph_pwr>;
+ vdd-s9-supply = <&vph_pwr>;
+ vdd-s10-supply = <&vph_pwr>;
+ vdd-l2-l10-supply = <&vreg_bob>;
+ vdd-l3-l4-l5-l18-supply = <&vreg_s6a_0p95>;
+ vdd-l6-l9-supply = <&vreg_s8c_1p3>;
+ vdd-l7-l12-l14-l15-supply = <&vreg_s5a_1p9>;
+ vdd-l13-l16-l17-supply = <&vreg_bob>;
+
+ vreg_l2a_3p1: ldo2 {
+ regulator-name = "vreg_l2a_3p1";
+ regulator-min-microvolt = <3072000>;
+ regulator-max-microvolt = <3072000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3a_0p9: ldo3 {
+ regulator-name = "vreg_l3a_0p9";
+ regulator-min-microvolt = <928000>;
+ regulator-max-microvolt = <932000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l5a_0p88: ldo5 {
+ regulator-name = "vreg_l5a_0p88";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <880000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6a_1p2: ldo6 {
+ regulator-name = "vreg_l6a_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7a_1p7: ldo7 {
+ regulator-name = "vreg_l7a_1p7";
+ regulator-min-microvolt = <1704000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l9a_1p2: ldo9 {
+ regulator-name = "vreg_l9a_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l10a_1p8: ldo10 {
+ regulator-name = "vreg_l10a_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l12a_1p8: ldo12 {
+ regulator-name = "vreg_l12a_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l13a_ts_3p0: ldo13 {
+ regulator-name = "vreg_l13a_ts_3p0";
+ regulator-min-microvolt = <3008000>;
+ regulator-max-microvolt = <3008000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l14a_1p8: ldo14 {
+ regulator-name = "vreg_l14a_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1880000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l15a_1p8: ldo15 {
+ regulator-name = "vreg_l15a_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l16a_2p7: ldo16 {
+ regulator-name = "vreg_l16a_2p7";
+ regulator-min-microvolt = <2704000>;
+ regulator-max-microvolt = <2960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l17a_3p0: ldo17 {
+ regulator-name = "vreg_l17a_3p0";
+ regulator-min-microvolt = <2856000>;
+ regulator-max-microvolt = <3008000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l18a_0p92: ldo18 {
+ regulator-name = "vreg_l18a_0p92";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <912000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s5a_1p9: smps5 {
+ regulator-name = "vreg_s5a_1p9";
+ regulator-min-microvolt = <1904000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s6a_0p95: smps6 {
+ regulator-name = "vreg_s6a_0p95";
+ regulator-min-microvolt = <920000>;
+ regulator-max-microvolt = <1128000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-2 {
+ compatible = "qcom,pm8150l-rpmh-regulators";
+ qcom,pmic-id = "c";
+
+ vdd-s1-supply = <&vph_pwr>;
+ vdd-s2-supply = <&vph_pwr>;
+ vdd-s3-supply = <&vph_pwr>;
+ vdd-s4-supply = <&vph_pwr>;
+ vdd-s5-supply = <&vph_pwr>;
+ vdd-s6-supply = <&vph_pwr>;
+ vdd-s7-supply = <&vph_pwr>;
+ vdd-s8-supply = <&vph_pwr>;
+ vdd-l1-l8-supply = <&vreg_s4a_1p8>;
+ vdd-l2-l3-supply = <&vreg_s8c_1p3>;
+ vdd-l4-l5-l6-supply = <&vreg_bob>;
+ vdd-l7-l11-supply = <&vreg_bob>;
+ vdd-l9-l10-supply = <&vreg_bob>;
+ vdd-bob-supply = <&vph_pwr>;
+
+ vreg_bob: bob {
+ regulator-name = "vreg_bob";
+ regulator-min-microvolt = <3008000>;
+ regulator-max-microvolt = <4000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
+ };
+
+ vreg_l1c_1p8: ldo1 {
+ regulator-name = "vreg_l1c_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2c_1p2: ldo2 {
+ regulator-name = "vreg_l2c_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3c_0p8: ldo3 {
+ regulator-name = "vreg_l3c_0p8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l4c_1p7: ldo4 {
+ regulator-name = "vreg_l4c_1p7";
+ regulator-min-microvolt = <1704000>;
+ regulator-max-microvolt = <2928000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l5c_1p8: ldo5 {
+ regulator-name = "vreg_l5c_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2928000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6c_2p96: ldo6 {
+ regulator-name = "vreg_l6c_2p96";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7c_cam_vcm0_2p85: ldo7 {
+ regulator-name = "vreg_l7c_cam_vcm0_2p85";
+ regulator-min-microvolt = <2856000>;
+ regulator-max-microvolt = <3104000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l8c_1p8: ldo8 {
+ regulator-name = "vreg_l8c_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l9c_2p96: ldo9 {
+ regulator-name = "vreg_l9c_2p96";
+ regulator-min-microvolt = <2704000>;
+ regulator-max-microvolt = <2960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l10c_3p0: ldo10 {
+ regulator-name = "vreg_l10c_3p0";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l11c_3p3: ldo11 {
+ regulator-name = "vreg_l11c_3p3";
+ regulator-min-microvolt = <3296000>;
+ regulator-max-microvolt = <3296000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
+ };
+
+ vreg_s8c_1p3: smps8 {
+ regulator-name = "vreg_s8c_1p3";
+ regulator-min-microvolt = <1352000>;
+ regulator-max-microvolt = <1352000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+};
+
+&adsp {
+ firmware-name = "postmarketos/adsp.mbn";
+ status = "okay";
+};
+
+&cdsp {
+ firmware-name = "postmarketos/cdsp.mbn";
+ status = "okay";
+};
+
+&dispcc {
+ status = "disabled";
+};
+
+&gmu {
+ status = "okay";
+};
+
+&gpi_dma0 {
+ status = "okay";
+};
+
+&gpi_dma1 {
+ status = "okay";
+};
+
+&gpi_dma2 {
+ status = "okay";
+};
+
+&gpu {
+ status = "disabled";
+};
+
+&i2c1 {
+ status = "okay";
+
+ nfc@28 {
+ compatible = "nxp,nxp-nci-i2c";
+ reg = <0x28>;
+
+ interrupt-parent = <&tlmm>;
+ interrupts = <0x6f IRQ_TYPE_LEVEL_HIGH>;
+
+ enable-gpios = <&tlmm 83 GPIO_ACTIVE_HIGH>,
+ <&tlmm 110 GPIO_ACTIVE_HIGH>;
+ };
+};
+
+&i2c5 {
+ status = "okay";
+
+ charger@66 {
+ compatible = "ti,bq25980";
+ status = "ok";
+ reg = <0x66>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <0x0f 0x00>;
+ monitored-battery = <&battery>;
+ };
+};
+
+&i2c16 {
+ status = "okay";
+
+ smart_battery: fuel-gauge@55 {
+ compatible = "ti,bq27541";
+ reg = <0x55>;
+ monitored-battery = <&battery>;
+ };
+};
+
+&i2c13 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ touchscreen@48 {
+ compatible = "samsung,s6sy761";
+ reg = <0x48>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <0x27 0x2008>;
+
+ vdd-supply = <&vreg_l13a_ts_3p0>;
+ avdd-supply = <&vreg_l1c_1p8>;
+
+ touchscreen-size-x = <1440>;
+ touchscreen-size-y = <3168>;
+
+ pinctrl-names = "default", "suspend";
+ pinctrl-0 = <&ts_int_active>;
+ pinctrl-1 = <&ts_rst_suspend>;
+ };
+};
+
+&mdss {
+ status = "okay";
+};
+
+&slpi {
+ firmware-name = "postmarketos/slpi.mbn";
+ status = "okay";
+};
+
+&pcie0 {
+ status = "okay";
+};
+
+&pcie0_phy {
+ vdda-phy-supply = <&vreg_l5a_0p88>;
+ vdda-pll-supply = <&vreg_l9a_1p2>;
+ status = "okay";
+ power-domains = <&qca639x>;
+};
+
+&pcie1 {
+ status = "okay";
+};
+
+&pcie1_phy {
+ vdda-phy-supply = <&vreg_l5a_0p88>;
+ vdda-pll-supply = <&vreg_l9a_1p2>;
+ status = "okay";
+};
+
+&pcie2 {
+ status = "okay";
+};
+
+&pcie2_phy {
+ vdda-phy-supply = <&vreg_l5a_0p88>;
+ vdda-pll-supply = <&vreg_l9a_1p2>;
+ status = "okay";
+};
+
+&pm8150_gpios {
+ vol_up_n: vol-up-n-state {
+ pins = "gpio6";
+ function = "normal";
+ power-source = <1>;
+ input-enable;
+ bias-pull-up;
+ };
+
+ vol_down_n: vol-down-n-state {
+ pins = "gpio7";
+ function = "normal";
+ power-source = <1>;
+ input-enable;
+ bias-pull-up;
+ };
+};
+
+&pon_pwrkey {
+ status = "okay";
+};
+
+&pon_resin {
+ linux,code = <KEY_VOLUMEDOWN>;
+ status = "okay";
+};
+
+&qup_spi4_cs_gpio {
+ drive-strength = <6>;
+ bias-disable;
+};
+
+&qup_spi4_data_clk {
+ drive-strength = <6>;
+ bias-disable;
+};
+
+&qupv3_id_0 {
+ status = "okay";
+};
+
+&qupv3_id_1 {
+ status = "okay";
+};
+
+&qupv3_id_2 {
+ status = "okay";
+};
+
+&tlmm {
+ gpio-reserved-ranges = <28 4>, <40 4>;
+
+ bt_en_active: bt-default-state {
+ bt-en {
+ pins = "gpio21";
+ function = "gpio";
+
+ drive-strength = <16>;
+ output-low;
+ bias-pull-up;
+ };
+ };
+
+ bt_en_sleep: bt-sleep-state {
+ pins = "gpio21";
+ function = "gpio";
+
+ drive-strength = <0x02>;
+ output-low;
+ bias-pull-down;
+ };
+
+ wlan_en_active: wlan-default-state {
+ wlan-en {
+ pins = "gpio20";
+ function = "gpio";
+
+ drive-strength = <16>;
+ output-low;
+ bias-pull-up;
+ };
+ };
+
+ wlan_en_sleep: wlan-sleep-state {
+ pins = "gpio20";
+ function = "gpio";
+
+ drive-strength = <16>;
+ output-low;
+ bias-pull-down;
+ };
+
+ ts_int_active: ts-int-active-state {
+ pins = "gpio38", "gpio39";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ ts_rst_suspend: ts-rst-suspend {
+ pins = "gpio38";
+ function = "gpio";
+ drive-strength = <0x02>;
+ bias-pull-down;
+ };
+};
+
+&uart6 {
+ status = "okay";
+
+ bluetooth {
+ compatible = "qcom,qca6390-bt";
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&bt_en_active>;
+ pinctrl-1 = <&bt_en_sleep>;
+
+ power-domains = <&qca639x>;
+ enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
+ };
+};
+
+&ufs_mem_hc {
+ vcc-supply = <&vreg_l17a_3p0>;
+ vcc-max-microamp = <800000>;
+ vccq-supply = <&vreg_l6a_1p2>;
+ vccq-max-microamp = <800000>;
+ vccq2-supply = <&vreg_s4a_1p8>;
+ vccq2-max-microamp = <800000>;
+ status = "okay";
+};
+
+&ufs_mem_phy {
+ vdda-phy-supply = <&vreg_l5a_0p88>;
+ vdda-pll-supply = <&vreg_l9a_1p2>;
+ status = "okay";
+};
+
+&usb_1 {
+ /* USB 2.0 only */
+ qcom,select-utmi-as-pipe-clk;
+ status = "okay";
+};
+
+&usb_1_dwc3 {
+ dr_mode = "peripheral";
+ maximum-speed = "high-speed";
+ /* Remove USB3 phy */
+ phys = <&usb_1_hsphy>;
+ phy-names = "usb2-phy";
+};
+
+&usb_1_hsphy {
+ vdda-pll-supply = <&vreg_l5a_0p88>;
+ vdda18-supply = <&vreg_l12a_1p8>;
+ vdda33-supply = <&vreg_l2a_3p1>;
+ status = "okay";
+};
+
+&usb_2 {
+ status = "okay";
+};
+
+&usb_2_dwc3 {
+ dr_mode = "host";
+};
+
+&usb_2_hsphy {
+ status = "okay";
+
+ vdda-pll-supply = <&vreg_l5a_0p88>;
+ vdda33-supply = <&vreg_l2a_3p1>;
+ vdda18-supply = <&vreg_l12a_1p8>;
+};
+
+&usb_2_qmpphy {
+ status = "okay";
+
+ vdda-phy-supply = <&vreg_l9a_1p2>;
+ vdda-pll-supply = <&vreg_l18a_0p92>;
+};
+
+&venus {
+ firmware-name = "postmarketos/venus.mbn";
+ status = "okay";
+};
--
Armbian

View File

@@ -1,51 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Mon, 11 Mar 2024 23:27:42 +0800
Subject: arm64: dts: qcom: sm8250-xiaomi-elish: remove framebuffer initialized
by xbl
---
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 20 ----------
1 file changed, 20 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -36,21 +36,6 @@ aliases {
hsuart0 = &uart6;
};
- chosen {
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
-
- framebuffer: framebuffer@9c000000 {
- compatible = "simple-framebuffer";
- reg = <0x0 0x9c000000 0x0 0x2300000>;
- width = <1600>;
- height = <2560>;
- stride = <(1600 * 4)>;
- format = "a8r8g8b8";
- };
- };
-
battery_l: battery-l {
compatible = "simple-battery";
voltage-min-design-microvolt = <3870000>;
@@ -165,11 +150,6 @@ cdsp_secure_heap: cdsp-secure-heap@8e100000 {
no-map;
};
- cont_splash_mem: cont-splash@9c000000 {
- reg = <0x0 0x9c000000 0x0 0x2300000>;
- no-map;
- };
-
ramoops@b0000000 {
compatible = "ramoops";
reg = <0x0 0xb0000000 0x0 0x400000>;
--
Armbian

View File

@@ -1,25 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Wed, 3 Apr 2024 23:03:35 +0800
Subject: of: property: fix remote-endpoint parse
---
drivers/of/property.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/of/property.c b/drivers/of/property.c
index 111111111111..222222222222 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1319,7 +1319,7 @@ static struct device_node *parse_remote_endpoint(struct device_node *np,
if (index > 0 || strcmp(prop_name, "remote-endpoint"))
return NULL;
- return of_graph_get_remote_port_parent(np);
+ return of_graph_get_remote_port(np);
}
static const struct supplier_bindings of_supplier_bindings[] = {
--
Armbian

View File

@@ -1,24 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: amazingfate <liujianfeng1994@gmail.com>
Date: Mon, 16 Oct 2023 13:32:19 +0800
Subject: drivers/spmi/spmi-pmic-arb.c: remove warnings
---
drivers/spmi/spmi-pmic-arb.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
index 111111111111..222222222222 100644
--- a/drivers/spmi/spmi-pmic-arb.c
+++ b/drivers/spmi/spmi-pmic-arb.c
@@ -289,7 +289,6 @@ static int pmic_arb_wait_for_done(struct spmi_controller *ctrl,
if (status & PMIC_ARB_STATUS_FAILURE) {
dev_err(&ctrl->dev, "%s: %#x %#x: transaction failed (%#x)\n",
__func__, sid, addr, status);
- WARN_ON(1);
return -EIO;
}
--
Armbian

View File

@@ -1,25 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: amazingfate <liujianfeng1994@gmail.com>
Date: Tue, 24 Oct 2023 01:01:46 +0800
Subject: Asoc: wm_adsp: Use xiaomi-elish firmware name
---
sound/soc/codecs/wm_adsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 111111111111..222222222222 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -834,7 +834,7 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp,
}
} else if (asoc_component_prefix) {
if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename,
- cirrus_dir, NULL,
+ cirrus_dir, "xiaomi-elish",
NULL, "wmfw")) {
adsp_dbg(dsp, "Found '%s'\n", *wmfw_filename);
wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
--
Armbian

View File

@@ -1,25 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: amazingfate <liujianfeng1994@gmail.com>
Date: Thu, 26 Oct 2023 13:13:34 +0800
Subject: input: nt36523: short the firmware download delay from 14s to 4s
---
drivers/input/touchscreen/nt36523/nt36xxx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/nt36523/nt36xxx.c b/drivers/input/touchscreen/nt36523/nt36xxx.c
index 111111111111..222222222222 100644
--- a/drivers/input/touchscreen/nt36523/nt36xxx.c
+++ b/drivers/input/touchscreen/nt36523/nt36xxx.c
@@ -1452,7 +1452,7 @@ static int32_t nvt_ts_probe(struct spi_device *client)
}
INIT_DELAYED_WORK(&ts->nvt_fwu_work, Boot_Update_Firmware);
// please make sure boot update start after display reset(RESX) sequence
- queue_delayed_work(nvt_fwu_wq, &ts->nvt_fwu_work, msecs_to_jiffies(14000));
+ queue_delayed_work(nvt_fwu_wq, &ts->nvt_fwu_work, msecs_to_jiffies(4000));
#endif
NVT_LOG("NVT_TOUCH_ESD_PROTECT is %d\n", NVT_TOUCH_ESD_PROTECT);
--
Armbian

View File

@@ -1,938 +0,0 @@
// SPDX-License-Identifier: BSD-3-Clause
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*/
/dts-v1/;
#include <dt-bindings/arm/qcom,ids.h>
#include <dt-bindings/phy/phy.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/sound/qcom,q6asm.h>
#include <dt-bindings/usb/pd.h>
#include "sm8250.dtsi"
#include "pm8150.dtsi"
#include "pm8150b.dtsi"
#include "pm8150l.dtsi"
#include "pm8009.dtsi"
/*
* Delete following upstream (sm8250.dtsi) reserved
* memory mappings which are different on this device.
*/
/delete-node/ &adsp_mem;
/delete-node/ &cdsp_secure_heap;
/delete-node/ &slpi_mem;
/delete-node/ &spss_mem;
/delete-node/ &xbl_aop_mem;
/ {
chassis-type = "handset";
qcom,msm-id = <QCOM_ID_SM8250 0x20001>;
qcom,board-id = <0x2b 0>;
aliases {
hsuart0 = &uart6;
};
chosen {
#address-cells = <2>;
#size-cells = <2>;
ranges;
framebuffer: framebuffer@9c000000 {
compatible = "simple-framebuffer";
reg = <0x0 0x9c000000 0x0 0x2300000>;
width = <1080>;
height = <2340>;
stride = <(1080 * 4)>;
format = "a8r8g8b8";
};
};
// battery: battery {
// compatible = "simple-battery";
// voltage-min-design-microvolt = <3870000>;
// energy-full-design-microwatt-hours = <16600000>;
// charge-full-design-microamp-hours = <4300000>;
// };
gpio_keys: gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&vol_up_n>;
vol_up {
label = "Volume Up";
gpios = <&pm8150_gpios 6 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
debounce-interval = <15>;
linux,can-disable;
wakeup-source;
};
hall_key {
label = "Hall Key";
gpios = <&tlmm 14 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESERVED>;
debounce-interval = <15>;
linux,can-disable;
wakeup-source;
};
};
vph_pwr: vph-pwr-regulator {
compatible = "regulator-fixed";
regulator-name = "vph_pwr";
regulator-min-microvolt = <3700000>;
regulator-max-microvolt = <3700000>;
};
vreg_s6c_0p88: smpc6-regulator {
compatible = "regulator-fixed";
regulator-name = "vreg_s6c_0p88";
regulator-min-microvolt = <880000>;
regulator-max-microvolt = <880000>;
regulator-always-on;
vin-supply = <&vph_pwr>;
};
vreg_touch_vddio: vreg-touch-vddio{
compatible = "regulator-fixed";
regulator-name = "vreg_touch_vddio";
enable-active-high;
/*regulator-boot-on*/
gpio = <&tlmm 69 0>;
};
wcd938x: audio-codec {
compatible = "qcom,wcd9380-codec";
reset-gpios = <&tlmm 32 GPIO_ACTIVE_LOW>;
vdd-buck-supply = <&vreg_s4a_1p8>;
vdd-rxtx-supply = <&vreg_s4a_1p8>;
vdd-io-supply = <&vreg_s4a_1p8>;
vdd-mic-bias-supply = <&vreg_bob>;
qcom,micbias1-microvolt = <2750000>;
qcom,micbias2-microvolt = <2750000>;
qcom,micbias3-microvolt = <2750000>;
qcom,micbias4-microvolt = <2750000>;
qcom,rx-device = <&wcd_rx>;
qcom,tx-device = <&wcd_tx>;
#sound-dai-cells = <1>;
};
qca639x: qca639x {
compatible = "qcom,qca6390";
#power-domain-cells = <0>;
vddaon-supply = <&vreg_s6a_0p95>;
vddpmu-supply = <&vreg_s2f_0p95>;
vddrfa1-supply = <&vreg_s2f_0p95>;
vddrfa2-supply = <&vreg_s8c_1p35>;
vddrfa3-supply = <&vreg_s5a_1p9>;
vddpcie1-supply = <&vreg_s8c_1p35>;
vddpcie2-supply = <&vreg_s5a_1p9>;
vddio-supply = <&vreg_s4a_1p8>;
pinctrl-names = "default";
pinctrl-0 = <&wlan_en_state>;
wlan-en-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
};
reserved-memory {
xbl_aop_mem: xbl-aop@80600000 {
reg = <0x0 0x80600000 0x0 0x260000>;
no-map;
};
slpi_mem: slpi@88c00000 {
reg = <0x0 0x88c00000 0x0 0x2f00000>;
no-map;
};
adsp_mem: adsp@8bb00000 {
reg = <0x0 0x8bb00000 0x0 0x2500000>;
no-map;
};
spss_mem: spss@8e000000 {
reg = <0x0 0x8e000000 0x0 0x100000>;
no-map;
};
cdsp_secure_heap: cdsp-secure-heap@8e100000 {
reg = <0x0 0x8e100000 0x0 0x4600000>;
no-map;
};
cont_splash_mem: cont-splash@9c000000 {
reg = <0x0 0x9c000000 0x0 0x2300000>;
no-map;
};
};
};
&adsp {
firmware-name = "qcom/sm8250/xiaomi/elish/adsp.mbn";
status = "okay";
};
&apps_rsc {
regulators-0 {
compatible = "qcom,pm8150-rpmh-regulators";
qcom,pmic-id = "a";
vdd-s1-supply = <&vph_pwr>;
vdd-s2-supply = <&vph_pwr>;
vdd-s3-supply = <&vph_pwr>;
vdd-s4-supply = <&vph_pwr>;
vdd-s5-supply = <&vph_pwr>;
vdd-s6-supply = <&vph_pwr>;
vdd-s7-supply = <&vph_pwr>;
vdd-s8-supply = <&vph_pwr>;
vdd-s9-supply = <&vph_pwr>;
vdd-s10-supply = <&vph_pwr>;
vdd-l1-l8-l11-supply = <&vreg_s6c_0p88>;
vdd-l2-l10-supply = <&vreg_bob>;
vdd-l3-l4-l5-l18-supply = <&vreg_s6a_0p95>;
vdd-l6-l9-supply = <&vreg_s8c_1p35>;
vdd-l7-l12-l14-l15-supply = <&vreg_s5a_1p9>;
vdd-l13-l16-l17-supply = <&vreg_bob>;
vreg_s4a_1p8: smps4 {
regulator-name = "vreg_s4a_1p8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1920000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_s5a_1p9: smps5 {
regulator-name = "vreg_s5a_1p9";
regulator-min-microvolt = <1900000>;
regulator-max-microvolt = <2040000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_s6a_0p95: smps6 {
regulator-name = "vreg_s6a_0p95";
regulator-min-microvolt = <950000>;
regulator-max-microvolt = <1128000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l2a_3p1: ldo2 {
regulator-name = "vreg_l2a_3p1";
regulator-min-microvolt = <3072000>;
regulator-max-microvolt = <3072000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l3a_0p9: ldo3 {
regulator-name = "vreg_l3a_0p9";
regulator-min-microvolt = <928000>;
regulator-max-microvolt = <932000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
/* L4 - lmx.lvl (ARC) */
vreg_l5a_0p88: ldo5 {
regulator-name = "vreg_l5a_0p88";
regulator-min-microvolt = <880000>;
regulator-max-microvolt = <880000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l6a_1p2: ldo6 {
regulator-name = "vreg_l6a_1p2";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
/* L7 is unused. */
vreg_l9a_1p2: ldo9 {
regulator-name = "vreg_l9a_1p2";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
/* L10 is unused, L11 - lcx.lvl (ARC) */
vreg_l12a_1p8: ldo12 {
regulator-name = "vreg_l12a_1p8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l13a_3p0: ldo13 {
regulator-name = "vreg_l13a_3p0";
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3008000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l14a_1p88: ldo14 {
regulator-name = "vreg_l14a_1p88";
regulator-min-microvolt = <1880000>;
regulator-max-microvolt = <1880000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
/* L15 & L16 are unused. */
vreg_l17a_3p0: ldo17 {
regulator-name = "vreg_l17a_3p0";
regulator-min-microvolt = <2856000>;
regulator-max-microvolt = <3008000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l18a_0p9: ldo18 {
regulator-name = "vreg_l18a_0p9";
regulator-min-microvolt = <912000>;
regulator-max-microvolt = <912000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
};
regulators-1 {
compatible = "qcom,pm8150l-rpmh-regulators";
qcom,pmic-id = "c";
vdd-s1-supply = <&vph_pwr>;
vdd-s2-supply = <&vph_pwr>;
vdd-s3-supply = <&vph_pwr>;
vdd-s4-supply = <&vph_pwr>;
vdd-s5-supply = <&vph_pwr>;
vdd-s6-supply = <&vph_pwr>;
vdd-s7-supply = <&vph_pwr>;
vdd-s8-supply = <&vph_pwr>;
vdd-l1-l8-supply = <&vreg_s4a_1p8>;
vdd-l2-l3-supply = <&vreg_s8c_1p35>;
vdd-l4-l5-l6-supply = <&vreg_bob>;
vdd-l7-l11-supply = <&vreg_bob>;
vdd-l9-l10-supply = <&vreg_bob>;
vdd-bob-supply = <&vph_pwr>;
vreg_bob: bob {
regulator-name = "vreg_bob";
regulator-min-microvolt = <3008000>;
regulator-max-microvolt = <3960000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
};
vreg_s8c_1p35: smps8 {
regulator-name = "vreg_s8c_1p35";
regulator-min-microvolt = <1350000>;
regulator-max-microvolt = <1400000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l1c_1p8: ldo1 {
regulator-name = "vreg_l1c_1p8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l2c_1p2: ldo2 {
regulator-name = "vreg_l2c_1p2";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l3c_0p92: ldo3 {
regulator-name = "vreg_l3c_0p92";
regulator-min-microvolt = <920000>;
regulator-max-microvolt = <920000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l4c_1p7: ldo4 {
regulator-name = "vreg_l4c_1p7";
regulator-min-microvolt = <1704000>;
regulator-max-microvolt = <2928000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l5c_1p8: ldo5 {
regulator-name = "vreg_l5c_1p8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2928000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l6c_2p9: ldo6 {
regulator-name = "vreg_l6c_2p9";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2960000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l7c_cam_vcm0_2p85: ldo7 {
regulator-name = "vreg_l7c_cam_vcm0_2p85";
regulator-min-microvolt = <2856000>;
regulator-max-microvolt = <3104000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l8c_1p8: ldo8 {
regulator-name = "vreg_l8c_1p8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l9c_2p9: ldo9 {
regulator-name = "vreg_l9c_2p9";
regulator-min-microvolt = <2704000>;
regulator-max-microvolt = <2960000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l10c_3p0: ldo10 {
regulator-name = "vreg_l10c_3p0";
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l11c_3p3: ldo11 {
regulator-name = "vreg_l11c_3p3";
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3312000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
};
regulators-2 {
compatible = "qcom,pm8009-rpmh-regulators";
qcom,pmic-id = "f";
vdd-s1-supply = <&vph_pwr>;
vdd-s2-supply = <&vreg_bob>;
vdd-l2-supply = <&vreg_s8c_1p35>;
vdd-l5-l6-supply = <&vreg_bob>;
vdd-l7-supply = <&vreg_s4a_1p8>;
vreg_s1f_1p2: smps1 {
regulator-name = "vreg_s1f_1p2";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_s2f_0p95: smps2 {
regulator-name = "vreg_s2f_0p95";
regulator-min-microvolt = <950000>;
regulator-max-microvolt = <1100000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
/* L1 is unused. */
vreg_l2f_1p3: ldo2 {
regulator-name = "vreg_l2f_1p3";
regulator-min-microvolt = <1304000>;
regulator-max-microvolt = <1304000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
/* L3 & L4 are unused. */
vreg_l5f_2p8: ldo5 {
regulator-name = "vreg_l5f_2p85";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l6f_2p8: ldo6 {
regulator-name = "vreg_l6f_2p8";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l7f_1p8: ldo7 {
regulator-name = "vreg_l7f_1p8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
};
};
&cdsp {
firmware-name = "qcom/sm8250/xiaomi/elish/cdsp.mbn";
status = "okay";
};
&gmu {
status = "okay";
};
&gpu {
tatus = "okay";
zap-shader {
memory-region = <&gpu_mem>;
firmware-name = "qcom/sm8250/xiaomi/elish/a650_zap.mbn";
};
};
&qupv3_id_0 {
status = "okay";
};
&qupv3_id_1 {
status = "okay";
};
&qupv3_id_2 {
status = "okay";
};
&gpi_dma0 {
status = "okay";
};
&gpi_dma1 {
status = "okay";
};
&gpi_dma2 {
status = "okay";
};
&i2c3 {
clock-frequency = <400000>;
status = "okay";
cs35l41_brh: speaker-amp@40 {
compatible = "cirrus,cs35l41";
reg = <0x40>;
interrupt-parent = <&tlmm>;
interrupts = <113 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&tlmm 114 GPIO_ACTIVE_HIGH>;
cirrus,temp-warn_threshold = <3>;
cirrus,boost-peak-milliamp = <4000>;
cirrus,boost-ind-nanohenry = <1000>;
cirrus,boost-cap-microfarad = <15>;
cirrus,asp-sdout-hiz = <1>;
cirrus,gpio2-src-select = <4>;
cirrus,gpio2-output-enable;
sound-name-prefix = "BRH";
#sound-dai-cells = <1>;
};
cs35l41_blh: speaker-amp@42 {
compatible = "cirrus,cs35l41";
reg = <0x42>;
interrupt-parent = <&tlmm>;
interrupts = <112 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&tlmm 114 GPIO_ACTIVE_HIGH>;
cirrus,boost-peak-milliamp = <4000>;
cirrus,boost-ind-nanohenry = <1000>;
cirrus,boost-cap-microfarad = <15>;
cirrus,asp-sdout-hiz = <1>;
cirrus,gpio2-src-select = <4>;
cirrus,gpio2-output-enable;
sound-name-prefix = "BLH";
#sound-dai-cells = <1>;
};
};
&i2c13 {
clock-frequency = <400000>;
status = "okay";
touchscreen: fts@49 {
status = "okay";
compatible = "st,fts";
reg = <0x49>;
interrupt-parent = <&tlmm>;
interrupts = <39 0x2008>;
pinctrl-names = "pmx_ts_active", "pmx_ts_suspend";
pinctrl-0 = <&ts_active>;
pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>;
avdd-supply = <&vreg_touch_vddio>;
vdd-supply = <&vreg_l1c_1p8>;
fts,pwr-reg-name = "avdd";
fts,bus-reg-name = "vdd";
fts,irq-gpio = <&tlmm 39 0x2008>;
fts,irq-gpio-name = "fts_irq";
fts,reset-gpio-enable;
fts,reset-gpio = <&tlmm 38 0x00>;
fts,reset-gpio-name = "fts_rst";
fts,irq-flags = <0x2008>; /* IRQF_ONESHOT | IRQF_TRIGGER_LOW */
fts,x-max = <1080>;
fts,y-max = <2340>;
// fts,fod-lx = <421>;
// fts,fod-ly = <1788>;
// fts,fod-x-size = <238>;
// fts,fod-y-size = <238>;
fts,default-fw-name = "st_fts_j2.ftb";
fts,config-array-size = <2>;
fts,dump-click-count;
// fts,support-fod;
fts,touch-up-threshold-min = <40>;
fts,touch-up-threshold-max = <120>;
fts,touch-up-threshold-def = <80>;
fts,touch-tolerance-min = <5>;
fts,touch-tolerance-max = <35>;
fts,touch-tolerance-def = <25>;
fts,touch-idletime-min = <0>;
fts,touch-idletime-max = <12750>;
fts,touch-idletime-def = <12450>;
/*edge filter rects in gamemode*/
fts,cornerfilter-area-step1 = <100>;
fts,cornerfilter-area-step2 = <170>;
fts,cornerfilter-area-step3 = <250>;
fts,touch-deadzone-filter-ver = <2 0 0 0 0 0 0 0
2 1 0 0 0 0 0 0
2 2 0 0 5 2339 0 0
2 3 1074 0 1079 2339 0 0>;
fts,touch-deadzone-filter-hor = <2 0 0 0 1079 5 0 0
2 1 0 2334 1079 2339 0 0
2 2 0 0 5 2339 0 0
2 3 1074 0 1079 2339 0 0>;
fts,touch-edgezone-filter-ver = <1 0 0 0 0 0 0 0
1 1 0 0 0 0 0 0
1 2 0 0 40 2339 0 0
1 3 1039 0 1079 2339 0 0>;
fts,touch-edgezone-filter-hor = <1 0 0 0 1079 40 0 0
1 1 0 2299 1079 2339 0 0
1 2 0 0 40 2339 0 0
1 3 1039 0 1079 2339 0 0>;
fts,touch-cornerzone-filter-ver = <0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 2 0 2039 150 2339 0 0
0 3 929 2039 1079 2339 0 0>;
fts,touch-cornerzone-filter-hor1 = <0 0 0 0 170 170 0 0
0 1 0 0 0 0 0 0
0 2 0 2169 170 2339 0 0
0 3 0 0 0 0 0 0>;
fts,touch-cornerzone-filter-hor2 = <0 0 0 0 0 0 0 0
0 1 909 0 1079 170 0 0
0 2 0 0 0 0 0 0
0 3 909 2169 1079 2339 0 0>;
fts,cfg_0 {
fts,tp-vendor = <0x38>;
fts,tp-module = <0>;
fts,fw-name = "st_fts_j2_1.ftb";
fts,limit-name = "stm_fts_production_limits_1.csv";
};
fts,cfg_1 {
fts,tp-vendor = <0x42>;
fts,tp-module = <1>;
fts,fw-name = "st_fts_j2_2.ftb";
fts,limit-name = "stm_fts_production_limits_2.csv";
};
};
};
//TODO: Port the CHARGER Driver
&i2c15{
status = "disabled";
// bq25970: bq25970-standalone@66 {
// compatible = "ti,bq2597x-standalone";
// reg = <0x66>;
// interrupt-parent = <&tlmm>;
// interrupts = <68 0x2002>;
// pinctrl-names = "default";
// pinctrl-0 = <&bq2597x_master_int_default>;
// ti,bq2597x,bat-ovp-alarm-disable;
// ti,bq2597x,bat-ocp-disable;
// ti,bq2597x,bat-ocp-alarm-disable;
// ti,bq2597x,bat-ucp-alarm-disable;
// ti,bq2597x,bat-ucp-disable;
// ti,bq2597x,bat-therm-disable;
// ti,bq2597x,bus-therm-disable;
// ti,bq2597x,die-therm-disable;
// ti,bq2597x,bat-ovp-threshold = <4550>;
// ti,bq2597x,bat-ovp-alarm-threshold = <4525>;
// ti,bq2597x,bus-ovp-threshold = <12000>;
// ti,bq2597x,bus-ovp-alarm-threshold = <11000>;
// ti,bq2597x,bus-ocp-threshold = <3750>;
// ti,bq2597x,bus-ocp-alarm-threshold = <3500>;
// ti,bq2597x,bat-therm-threshold = <0x15>;/*4.1%*/
// ti,bq2597x,bus-therm-threshold = <0x15>;/*4.1%*/
// ti,bq2597x,die-therm-threshold = <145>;
// ti,bq2597x,ac-ovp-threshold = <14>;
// };
};
//TODO: There are some issues with DSC CMD Mode that need to be fixed,https://gitlab.freedesktop.org/drm/msm/-/issues/42
// &mdss {
// status = "okay";
// };
// &mdss_dsi0 {
// vdda-supply = <&vreg_l9a_1p2>;
// qcom,master-dsi;
// status = "okay";
// display_panel: panel@0 {
// reg = <0>;
// vddio-supply = <&vreg_l14a_1p88>;
// reset-gpios = <&tlmm 12 0>;
// port {
// panel_in: endpoint {
// remote-endpoint = <&mdss_dsi0_out>;
// };
// };
// };
// };
// &mdss_dsi0_out {
// data-lanes = <0 1 2 3>;
// remote-endpoint = <&panel_in>;
// };
// &mdss_dsi0_phy {
// vdds-supply = <&vreg_l5a_0p88>;
// status = "okay";
// };
&pcie0 {
status = "okay";
};
&pcie0_phy {
vdda-phy-supply = <&vreg_l5a_0p88>;
vdda-pll-supply = <&vreg_l9a_1p2>;
status = "okay";
/* Power on QCA639x chip, otherwise PCIe bus timeouts */
power-domains = <&qca639x>;
};
&pm8150_gpios {
vol_up_n: vol-up-n-state {
pins = "gpio6";
function = "normal";
power-source = <1>;
input-enable;
bias-pull-up;
};
};
&pon_pwrkey {
status = "okay";
};
&pon_resin {
linux,code = <KEY_VOLUMEDOWN>;
status = "okay";
};
&slpi {
firmware-name = "qcom/sm8250/xiaomi/elish/slpi.mbn";
status = "disabled";
};
&q6afedai {
dai@20 {
reg = <TERTIARY_MI2S_RX>;
qcom,sd-lines = <0>;
};
};
&q6asmdai {
dai@0 {
reg = <0>;
};
};
&swr1 {
status = "okay";
wcd_rx: wcd9380-rx@0,4 {
compatible = "sdw20217010d00";
reg = <0x0d 0x1170224>;
qcom,rx-port-mapping = <1 2 3 4 5>;
};
};
&swr2 {
status = "okay";
wcd_tx: wcd9380-tx@0,3 {
compatible = "sdw20217010d00";
reg = <0x0d 0x1170223>;
qcom,tx-port-mapping = <2 3 4 5>;
};
};
&sound {
compatible = "qcom,sm8250-sndcard";
model = "Xiaomi Mi 10";
pinctrl-names = "default";
pinctrl-0 = <&tert_mi2s_active>;
mm1-dai-link {
link-name = "MultiMedia1";
cpu {
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
};
};
speaker-dai-link {
link-name = "Tertiary MI2S Playback";
cpu {
sound-dai = <&q6afedai TERTIARY_MI2S_RX>;
};
platform {
sound-dai = <&q6routing>;
};
codec {
sound-dai = <&cs35l41_brh 0>, <&cs35l41_blh 0>;
};
};
};
&tlmm {
gpio-reserved-ranges = <28 4>, <40 4>, <52 4>;
mdss_te_default: mdss-te-default-state {
pins = "gpio66";
function = "mdp_vsync";
drive-strength = <2>;
bias-pull-down;
};
bt_en_state: bt-default-state {
bt-en-pins {
pins = "gpio21";
function = "gpio";
drive-strength = <16>;
output-low;
bias-pull-up;
};
};
wlan_en_state: wlan-default-state {
wlan-en-pins {
pins = "gpio20";
function = "gpio";
drive-strength = <16>;
output-low;
bias-pull-up;
};
};
key_confirm: key_confirm_default {
pins = "gpio7";
function = "normal";
input-enable;
bias-pull-up;
};
ts_active: ts-active {
pins = "gpio38", "gpio39";
function = "gpio";
drive-strength = <2>;
bias-pull-up;
};
ts_int_suspend: ts-int-suspend {
pins = "gpio39";
function = "gpio";
drive-strength = <2>;
bias-pull-down;
};
ts_reset_suspend: ts-reset-suspend {
pins = "gpio38";
function = "gpio";
drive-strength = <2>;
bias-pull-down;
};
};
&uart6 {
status = "okay";
bluetooth {
compatible = "qcom,qca6390-bt";
pinctrl-names = "default";
pinctrl-0 = <&bt_en_state>;
power-domains = <&qca639x>;
enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
swctrl-gpios = <&tlmm 124 GPIO_ACTIVE_HIGH>;
};
};
&ufs_mem_hc {
vcc-supply = <&vreg_l17a_3p0>;
vcc-max-microamp = <800000>;
vccq-supply = <&vreg_l6a_1p2>;
vccq-max-microamp = <800000>;
vccq2-supply = <&vreg_s4a_1p8>;
vccq2-max-microamp = <800000>;
status = "okay";
};
&ufs_mem_phy {
vdda-phy-supply = <&vreg_l5a_0p88>;
vdda-pll-supply = <&vreg_l9a_1p2>;
status = "okay";
};
&usb_1 {
/* USB 2.0 only */
qcom,select-utmi-as-pipe-clk;
status = "okay";
};
&usb_1_dwc3 {
dr_mode = "otg";
maximum-speed = "high-speed";
/* Remove USB3 phy */
phys = <&usb_1_hsphy>;
phy-names = "usb2-phy";
usb-role-switch;
};
&usb_1_hsphy {
vdda-pll-supply = <&vreg_l5a_0p88>;
vdda18-supply = <&vreg_l12a_1p8>;
vdda33-supply = <&vreg_l2a_3p1>;
status = "okay";
};
&venus {
firmware-name = "qcom/sm8250/xiaomi/elish/venus.mbn";
status = "okay";
};

View File

@@ -1,13 +0,0 @@
/dts-v1/;
#include "sm8250-xiaomi-umi-common.dtsi"
/ {
model = "Xiaomi Mi 10 (CSOT)";
compatible = "xiaomi,umi", "qcom,sm8250";
};
// &display_panel {
// compatible = "xiaomi-umi-csot";
// status = "okay";
// };

View File

@@ -1,13 +0,0 @@
/dts-v1/;
#include "sm8250-xiaomi-umi-common.dtsi"
/ {
model = "Xiaomi Mi 10 (SMS)";
compatible = "xiaomi,umi", "qcom,sm8250";
};
// &display_panel {
// compatible = "xiaomi-umi-sms";
// status = "okay";
// };