mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 14:13:16 +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>
169 lines
4.2 KiB
Diff
169 lines
4.2 KiB
Diff
From 97505f4c049fa2e8c86a53411a9e599033898533 Mon Sep 17 00:00:00 2001
|
|
From: Robert Marko <robimarko@gmail.com>
|
|
Date: Sat, 31 Dec 2022 00:27:42 +0100
|
|
Subject: [PATCH] soc: qcom: socinfo: move SMEM item struct and defines to a
|
|
header
|
|
|
|
Move SMEM item struct and related defines to a header in order to be able
|
|
to reuse them in the Qualcomm NVMEM CPUFreq driver instead of duplicating
|
|
them.
|
|
|
|
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|
---
|
|
drivers/soc/qcom/socinfo.c | 58 +--------------------------
|
|
include/linux/soc/qcom/socinfo.h | 67 ++++++++++++++++++++++++++++++++
|
|
2 files changed, 68 insertions(+), 57 deletions(-)
|
|
create mode 100644 include/linux/soc/qcom/socinfo.h
|
|
|
|
--- a/drivers/soc/qcom/socinfo.c
|
|
+++ b/drivers/soc/qcom/socinfo.c
|
|
@@ -11,6 +11,7 @@
|
|
#include <linux/random.h>
|
|
#include <linux/slab.h>
|
|
#include <linux/soc/qcom/smem.h>
|
|
+#include <linux/soc/qcom/socinfo.h>
|
|
#include <linux/string.h>
|
|
#include <linux/sys_soc.h>
|
|
#include <linux/types.h>
|
|
@@ -25,15 +26,6 @@
|
|
#define SOCINFO_MINOR(ver) ((ver) & 0xffff)
|
|
#define SOCINFO_VERSION(maj, min) ((((maj) & 0xffff) << 16)|((min) & 0xffff))
|
|
|
|
-#define SMEM_SOCINFO_BUILD_ID_LENGTH 32
|
|
-#define SMEM_SOCINFO_CHIP_ID_LENGTH 32
|
|
-
|
|
-/*
|
|
- * SMEM item id, used to acquire handles to respective
|
|
- * SMEM region.
|
|
- */
|
|
-#define SMEM_HW_SW_BUILD_ID 137
|
|
-
|
|
#ifdef CONFIG_DEBUG_FS
|
|
#define SMEM_IMAGE_VERSION_BLOCKS_COUNT 32
|
|
#define SMEM_IMAGE_VERSION_SIZE 4096
|
|
@@ -105,54 +97,6 @@ static const char *const pmic_models[] =
|
|
};
|
|
#endif /* CONFIG_DEBUG_FS */
|
|
|
|
-/* Socinfo SMEM item structure */
|
|
-struct socinfo {
|
|
- __le32 fmt;
|
|
- __le32 id;
|
|
- __le32 ver;
|
|
- char build_id[SMEM_SOCINFO_BUILD_ID_LENGTH];
|
|
- /* Version 2 */
|
|
- __le32 raw_id;
|
|
- __le32 raw_ver;
|
|
- /* Version 3 */
|
|
- __le32 hw_plat;
|
|
- /* Version 4 */
|
|
- __le32 plat_ver;
|
|
- /* Version 5 */
|
|
- __le32 accessory_chip;
|
|
- /* Version 6 */
|
|
- __le32 hw_plat_subtype;
|
|
- /* Version 7 */
|
|
- __le32 pmic_model;
|
|
- __le32 pmic_die_rev;
|
|
- /* Version 8 */
|
|
- __le32 pmic_model_1;
|
|
- __le32 pmic_die_rev_1;
|
|
- __le32 pmic_model_2;
|
|
- __le32 pmic_die_rev_2;
|
|
- /* Version 9 */
|
|
- __le32 foundry_id;
|
|
- /* Version 10 */
|
|
- __le32 serial_num;
|
|
- /* Version 11 */
|
|
- __le32 num_pmics;
|
|
- __le32 pmic_array_offset;
|
|
- /* Version 12 */
|
|
- __le32 chip_family;
|
|
- __le32 raw_device_family;
|
|
- __le32 raw_device_num;
|
|
- /* Version 13 */
|
|
- __le32 nproduct_id;
|
|
- char chip_id[SMEM_SOCINFO_CHIP_ID_LENGTH];
|
|
- /* Version 14 */
|
|
- __le32 num_clusters;
|
|
- __le32 ncluster_array_offset;
|
|
- __le32 num_defective_parts;
|
|
- __le32 ndefective_parts_array_offset;
|
|
- /* Version 15 */
|
|
- __le32 nmodem_supported;
|
|
-};
|
|
-
|
|
#ifdef CONFIG_DEBUG_FS
|
|
struct socinfo_params {
|
|
u32 raw_device_family;
|
|
--- /dev/null
|
|
+++ b/include/linux/soc/qcom/socinfo.h
|
|
@@ -0,0 +1,67 @@
|
|
+// SPDX-License-Identifier: GPL-2.0
|
|
+/*
|
|
+ * Copyright (c) 2009-2017, The Linux Foundation. All rights reserved.
|
|
+ * Copyright (c) 2017-2019, Linaro Ltd.
|
|
+ */
|
|
+
|
|
+#ifndef __QCOM_SOCINFO_H__
|
|
+#define __QCOM_SOCINFO_H__
|
|
+
|
|
+/*
|
|
+ * SMEM item id, used to acquire handles to respective
|
|
+ * SMEM region.
|
|
+ */
|
|
+#define SMEM_HW_SW_BUILD_ID 137
|
|
+
|
|
+#define SMEM_SOCINFO_BUILD_ID_LENGTH 32
|
|
+#define SMEM_SOCINFO_CHIP_ID_LENGTH 32
|
|
+
|
|
+/* Socinfo SMEM item structure */
|
|
+struct socinfo {
|
|
+ __le32 fmt;
|
|
+ __le32 id;
|
|
+ __le32 ver;
|
|
+ char build_id[SMEM_SOCINFO_BUILD_ID_LENGTH];
|
|
+ /* Version 2 */
|
|
+ __le32 raw_id;
|
|
+ __le32 raw_ver;
|
|
+ /* Version 3 */
|
|
+ __le32 hw_plat;
|
|
+ /* Version 4 */
|
|
+ __le32 plat_ver;
|
|
+ /* Version 5 */
|
|
+ __le32 accessory_chip;
|
|
+ /* Version 6 */
|
|
+ __le32 hw_plat_subtype;
|
|
+ /* Version 7 */
|
|
+ __le32 pmic_model;
|
|
+ __le32 pmic_die_rev;
|
|
+ /* Version 8 */
|
|
+ __le32 pmic_model_1;
|
|
+ __le32 pmic_die_rev_1;
|
|
+ __le32 pmic_model_2;
|
|
+ __le32 pmic_die_rev_2;
|
|
+ /* Version 9 */
|
|
+ __le32 foundry_id;
|
|
+ /* Version 10 */
|
|
+ __le32 serial_num;
|
|
+ /* Version 11 */
|
|
+ __le32 num_pmics;
|
|
+ __le32 pmic_array_offset;
|
|
+ /* Version 12 */
|
|
+ __le32 chip_family;
|
|
+ __le32 raw_device_family;
|
|
+ __le32 raw_device_num;
|
|
+ /* Version 13 */
|
|
+ __le32 nproduct_id;
|
|
+ char chip_id[SMEM_SOCINFO_CHIP_ID_LENGTH];
|
|
+ /* Version 14 */
|
|
+ __le32 num_clusters;
|
|
+ __le32 ncluster_array_offset;
|
|
+ __le32 num_defective_parts;
|
|
+ __le32 ndefective_parts_array_offset;
|
|
+ /* Version 15 */
|
|
+ __le32 nmodem_supported;
|
|
+};
|
|
+
|
|
+#endif
|