mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-23 07:03:44 +00:00
b5f32064ed
Qualcomm Atheros IPQ807x is a modern WiSoC featuring: * Quad Core ARMv8 Cortex A-53 * @ 2.2 GHz (IPQ8072A/4A/6A/8A) Codename Hawkeye * @ 1.4 GHz (IPQ8070A/1A) Codename Acorn * Dual Band simultaneaous IEEE 802.11ax * 5G: 8x8/80 or 4x4/160MHz (IPQ8074A/8A) * 5G: 4x4/80 or 2x2/160MHz (IPQ8071A/2A/6A) * 5G: 2x2/80MHz (IPQ8070A) * 2G: 4x4/40MHz (IPQ8072A/4A/6A/8A) * 2G: 2x2/40MHz (IPQ8070A/1A) * 1x PSGMII via QCA8072/5 (Max 5x 1GbE ports) * 2x SGMII/USXGMII (1/2.5/5/10 GbE) on Hawkeye * 2x SGMII/USXGMII (1/2.5/5 GbE) on Acorn * DDR3L/4 32/16 bit up to 2400MT/s * SDIO 3.0/SD card 3.0/eMMC 5.1 * Dual USB 3.0 * One PCIe Gen2.1 and one PCIe Gen3.0 port (Single lane) * Parallel NAND (ONFI)/LCD * 6x QUP BLSP SPI/I2C/UART * I2S, PCM, and TDMA * HW PWM * 1.8V configurable GPIO * Companion PMP8074 PMIC via SPMI (GPIOS, RTC etc) Note that only v2 SOC models aka the ones ending with A suffix are supported, v1 models do not comply to the final 802.11ax and have lower clocks, lack the Gen3 PCIe etc. SoC itself has two UBI32 cores for the NSS offloading system, however currently no offloading is supported. Signed-off-by: Robert Marko <robimarko@gmail.com>
75 lines
2.3 KiB
Diff
75 lines
2.3 KiB
Diff
From 0164d794cbc58488a7321272e95958d10cf103a4 Mon Sep 17 00:00:00 2001
|
|
From: Robert Marko <robimarko@gmail.com>
|
|
Date: Fri, 19 Aug 2022 00:02:44 +0200
|
|
Subject: [PATCH] thermal/drivers/tsens: Add IPQ8074 support
|
|
|
|
Qualcomm IPQ8074 uses tsens v2.3 IP, however unlike other tsens v2 IP
|
|
it only has one IRQ, that is used for up/low as well as critical.
|
|
It also does not support negative trip temperatures.
|
|
|
|
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
|
|
Link: https://lore.kernel.org/r/20220818220245.338396-4-robimarko@gmail.com
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
---
|
|
drivers/thermal/qcom/tsens-v2.c | 17 +++++++++++++++++
|
|
drivers/thermal/qcom/tsens.c | 3 +++
|
|
drivers/thermal/qcom/tsens.h | 2 +-
|
|
3 files changed, 21 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/thermal/qcom/tsens-v2.c
|
|
+++ b/drivers/thermal/qcom/tsens-v2.c
|
|
@@ -39,6 +39,17 @@ static struct tsens_features tsens_v2_fe
|
|
.trip_max_temp = 120000,
|
|
};
|
|
|
|
+static struct tsens_features ipq8074_feat = {
|
|
+ .ver_major = VER_2_X,
|
|
+ .crit_int = 1,
|
|
+ .combo_int = 1,
|
|
+ .adc = 0,
|
|
+ .srot_split = 1,
|
|
+ .max_sensors = 16,
|
|
+ .trip_min_temp = 0,
|
|
+ .trip_max_temp = 204000,
|
|
+};
|
|
+
|
|
static const struct reg_field tsens_v2_regfields[MAX_REGFIELDS] = {
|
|
/* ----- SROT ------ */
|
|
/* VERSION */
|
|
@@ -104,6 +115,12 @@ struct tsens_plat_data data_tsens_v2 = {
|
|
.fields = tsens_v2_regfields,
|
|
};
|
|
|
|
+struct tsens_plat_data data_ipq8074 = {
|
|
+ .ops = &ops_generic_v2,
|
|
+ .feat = &ipq8074_feat,
|
|
+ .fields = tsens_v2_regfields,
|
|
+};
|
|
+
|
|
/* Kept around for backward compatibility with old msm8996.dtsi */
|
|
struct tsens_plat_data data_8996 = {
|
|
.num_sensors = 13,
|
|
--- a/drivers/thermal/qcom/tsens.c
|
|
+++ b/drivers/thermal/qcom/tsens.c
|
|
@@ -991,6 +991,9 @@ static const struct of_device_id tsens_t
|
|
.compatible = "qcom,ipq8064-tsens",
|
|
.data = &data_8960,
|
|
}, {
|
|
+ .compatible = "qcom,ipq8074-tsens",
|
|
+ .data = &data_ipq8074,
|
|
+ }, {
|
|
.compatible = "qcom,mdm9607-tsens",
|
|
.data = &data_9607,
|
|
}, {
|
|
--- a/drivers/thermal/qcom/tsens.h
|
|
+++ b/drivers/thermal/qcom/tsens.h
|
|
@@ -599,6 +599,6 @@ extern struct tsens_plat_data data_8916,
|
|
extern struct tsens_plat_data data_tsens_v1, data_8976;
|
|
|
|
/* TSENS v2 targets */
|
|
-extern struct tsens_plat_data data_8996, data_tsens_v2;
|
|
+extern struct tsens_plat_data data_8996, data_ipq8074, data_tsens_v2;
|
|
|
|
#endif /* __QCOM_TSENS_H__ */
|