~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/soc/qcom/socinfo.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 
  3 #ifndef __QCOM_SOCINFO_H__
  4 #define __QCOM_SOCINFO_H__
  5 
  6 #include <linux/types.h>
  7 
  8 /*
  9  * SMEM item id, used to acquire handles to respective
 10  * SMEM region.
 11  */
 12 #define SMEM_HW_SW_BUILD_ID             137
 13 
 14 #define SMEM_SOCINFO_BUILD_ID_LENGTH    32
 15 #define SMEM_SOCINFO_CHIP_ID_LENGTH     32
 16 
 17 /*
 18  * SoC version type with major number in the upper 16 bits and minor
 19  * number in the lower 16 bits.
 20  */
 21 #define SOCINFO_MAJOR(ver) (((ver) >> 16) & 0xffff)
 22 #define SOCINFO_MINOR(ver) ((ver) & 0xffff)
 23 #define SOCINFO_VERSION(maj, min)  ((((maj) & 0xffff) << 16)|((min) & 0xffff))
 24 
 25 /* Socinfo SMEM item structure */
 26 struct socinfo {
 27         __le32 fmt;
 28         __le32 id;
 29         __le32 ver;
 30         char build_id[SMEM_SOCINFO_BUILD_ID_LENGTH];
 31         /* Version 2 */
 32         __le32 raw_id;
 33         __le32 raw_ver;
 34         /* Version 3 */
 35         __le32 hw_plat;
 36         /* Version 4 */
 37         __le32 plat_ver;
 38         /* Version 5 */
 39         __le32 accessory_chip;
 40         /* Version 6 */
 41         __le32 hw_plat_subtype;
 42         /* Version 7 */
 43         __le32 pmic_model;
 44         __le32 pmic_die_rev;
 45         /* Version 8 */
 46         __le32 pmic_model_1;
 47         __le32 pmic_die_rev_1;
 48         __le32 pmic_model_2;
 49         __le32 pmic_die_rev_2;
 50         /* Version 9 */
 51         __le32 foundry_id;
 52         /* Version 10 */
 53         __le32 serial_num;
 54         /* Version 11 */
 55         __le32 num_pmics;
 56         __le32 pmic_array_offset;
 57         /* Version 12 */
 58         __le32 chip_family;
 59         __le32 raw_device_family;
 60         __le32 raw_device_num;
 61         /* Version 13 */
 62         __le32 nproduct_id;
 63         char chip_id[SMEM_SOCINFO_CHIP_ID_LENGTH];
 64         /* Version 14 */
 65         __le32 num_clusters;
 66         __le32 ncluster_array_offset;
 67         __le32 num_subset_parts;
 68         __le32 nsubset_parts_array_offset;
 69         /* Version 15 */
 70         __le32 nmodem_supported;
 71         /* Version 16 */
 72         __le32  feature_code;
 73         __le32  pcode;
 74         __le32  npartnamemap_offset;
 75         __le32  nnum_partname_mapping;
 76         /* Version 17 */
 77         __le32 oem_variant;
 78         /* Version 18 */
 79         __le32 num_kvps;
 80         __le32 kvps_offset;
 81         /* Version 19 */
 82         __le32 num_func_clusters;
 83         __le32 boot_cluster;
 84         __le32 boot_core;
 85 };
 86 
 87 /* Internal feature codes */
 88 enum qcom_socinfo_feature_code {
 89         /* External feature codes */
 90         SOCINFO_FC_UNKNOWN = 0x0,
 91         SOCINFO_FC_AA,
 92         SOCINFO_FC_AB,
 93         SOCINFO_FC_AC,
 94         SOCINFO_FC_AD,
 95         SOCINFO_FC_AE,
 96         SOCINFO_FC_AF,
 97         SOCINFO_FC_AG,
 98         SOCINFO_FC_AH,
 99 };
100 
101 /* Internal feature codes */
102 /* Valid values: 0 <= n <= 0xf */
103 #define SOCINFO_FC_Yn(n)                (0xf1 + (n))
104 #define SOCINFO_FC_INT_MAX              SOCINFO_FC_Yn(0xf)
105 
106 /* Product codes */
107 #define SOCINFO_PC_UNKNOWN              0
108 #define SOCINFO_PCn(n)                  ((n) + 1)
109 #define SOCINFO_PC_RESERVE              (BIT(31) - 1)
110 
111 #endif
112 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php