blob: 442085cfe97188db0cd6b3b465e45cbff040c4fb [file] [log] [blame]
Teresa Remmetc6dd9c62023-08-17 10:57:07 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Copyright (C) 2023 PHYTEC Messtechnik GmbH
4 * Author: Teresa Remmet <t.remmet@phytec.de>
5 */
6
7#ifndef _PHYTEC_IMX8M_SOM_DETECTION_H
8#define _PHYTEC_IMX8M_SOM_DETECTION_H
9
10#include "phytec_som_detection.h"
11
12#define PHYTEC_IMX8MQ_SOM 66
13#define PHYTEC_IMX8MM_SOM 69
14#define PHYTEC_IMX8MP_SOM 70
15
16#if IS_ENABLED(CONFIG_PHYTEC_IMX8M_SOM_DETECTION)
17
Yannic Moog1132f362023-12-20 09:45:32 +010018int __maybe_unused phytec_imx8m_detect(struct phytec_eeprom_data *data);
Teresa Remmetc6dd9c62023-08-17 10:57:07 +020019u8 __maybe_unused phytec_get_imx8m_ddr_size(struct phytec_eeprom_data *data);
20u8 __maybe_unused phytec_get_imx8mp_rtc(struct phytec_eeprom_data *data);
21u8 __maybe_unused phytec_get_imx8m_spi(struct phytec_eeprom_data *data);
22u8 __maybe_unused phytec_get_imx8m_eth(struct phytec_eeprom_data *data);
23
24#else
25
Yannic Moog1132f362023-12-20 09:45:32 +010026inline int __maybe_unused phytec_imx8m_detect(struct phytec_eeprom_data *data)
Teresa Remmetc6dd9c62023-08-17 10:57:07 +020027{
28 return -1;
29}
30
31inline u8 __maybe_unused
32phytec_get_imx8m_ddr_size(struct phytec_eeprom_data *data)
33{
34 return PHYTEC_EEPROM_INVAL;
35}
36
37inline u8 __maybe_unused phytec_get_imx8mp_rtc(struct phytec_eeprom_data *data)
38{
39 return PHYTEC_EEPROM_INVAL;
40}
41
42inline u8 __maybe_unused phytec_get_imx8m_spi(struct phytec_eeprom_data *data)
43{
44 return PHYTEC_EEPROM_INVAL;
45}
46
47inline u8 __maybe_unused phytec_get_imx8m_eth(struct phytec_eeprom_data *data)
48{
49 return PHYTEC_EEPROM_INVAL;
50}
51
52#endif /* IS_ENABLED(CONFIG_PHYTEC_IMX8M_SOM_DETECTION) */
53
54#endif /* _PHYTEC_IMX8M_SOM_DETECTION_H */