device/mipi: Move to drivers/mipi

Sounds like we prefer to have this under drivers/ instead of device/.
Also move all MIPI-related headers out from device/ into their own
directory.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: Ib3e66954b8f0cf85b28d8d186b09d7846707559d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57128
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
GitOrigin-RevId: 5ff1808f20a70912796b274c03cec3d91ddf890a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/3122493
Tested-by: Copybara Service <copybara-worker-blackhole@google.com>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
diff --git a/Documentation/drivers/soundwire.md b/Documentation/drivers/soundwire.md
index 9c48b75..dcefa04 100644
--- a/Documentation/drivers/soundwire.md
+++ b/Documentation/drivers/soundwire.md
@@ -375,7 +375,7 @@
  * @version: SoundWire specification version from &enum soundwire_version.
  * @link_id: Zero-based SoundWire Link Number.
  * @unique_id: Unique ID for multiple devices.
- * @manufacturer_id: Manufacturer ID from include/device/mipi_ids.h.
+ * @manufacturer_id: Manufacturer ID from include/mipi/ids.h.
  * @part_id: Vendor defined part ID.
  * @class: MIPI class encoding in &enum mipi_class.
  */
diff --git a/src/device/Kconfig b/src/device/Kconfig
index 16daeaa..5ae3466 100644
--- a/src/device/Kconfig
+++ b/src/device/Kconfig
@@ -1,7 +1,5 @@
 ## SPDX-License-Identifier: GPL-2.0-only
 
-source "src/device/mipi/Kconfig"
-
 menu "Devices"
 
 config HAVE_VGA_TEXT_FRAMEBUFFER
diff --git a/src/device/Makefile.inc b/src/device/Makefile.inc
index 70013c9..808648d 100644
--- a/src/device/Makefile.inc
+++ b/src/device/Makefile.inc
@@ -40,7 +40,7 @@
 ramstage-$(CONFIG_CARDBUS_PLUGIN_SUPPORT) += cardbus_device.c
 endif
 
-subdirs-y += oprom dram mipi
+subdirs-y += oprom dram
 
 bootblock-$(CONFIG_SOFTWARE_I2C) += software_i2c.c
 verstage-$(CONFIG_SOFTWARE_I2C) += software_i2c.c
diff --git a/src/device/mipi/Kconfig b/src/drivers/mipi/Kconfig
similarity index 100%
rename from src/device/mipi/Kconfig
rename to src/drivers/mipi/Kconfig
diff --git a/src/device/mipi/Makefile.inc b/src/drivers/mipi/Makefile.inc
similarity index 100%
rename from src/device/mipi/Makefile.inc
rename to src/drivers/mipi/Makefile.inc
diff --git a/src/device/mipi/panel-AUO_B101UAN08_3.c b/src/drivers/mipi/panel-AUO_B101UAN08_3.c
similarity index 97%
rename from src/device/mipi/panel-AUO_B101UAN08_3.c
rename to src/drivers/mipi/panel-AUO_B101UAN08_3.c
index 5bdb7ba..8eeac85 100644
--- a/src/device/mipi/panel-AUO_B101UAN08_3.c
+++ b/src/drivers/mipi/panel-AUO_B101UAN08_3.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
-#include <device/mipi_panel.h>
+#include <mipi/panel.h>
 
 struct panel_serializable_data AUO_B101UAN08_3 = {
 	.edid = {
diff --git a/src/device/mipi/panel-AUO_KD101N80_45NA.c b/src/drivers/mipi/panel-AUO_KD101N80_45NA.c
similarity index 95%
rename from src/device/mipi/panel-AUO_KD101N80_45NA.c
rename to src/drivers/mipi/panel-AUO_KD101N80_45NA.c
index 5856b0d..436940c 100644
--- a/src/device/mipi/panel-AUO_KD101N80_45NA.c
+++ b/src/drivers/mipi/panel-AUO_KD101N80_45NA.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
-#include <device/mipi_panel.h>
+#include <mipi/panel.h>
 
 struct panel_serializable_data AUO_KD101N80_45NA = {
 	.edid = {
diff --git a/src/device/mipi/panel-AUO_NT51021D8P.c b/src/drivers/mipi/panel-AUO_NT51021D8P.c
similarity index 94%
rename from src/device/mipi/panel-AUO_NT51021D8P.c
rename to src/drivers/mipi/panel-AUO_NT51021D8P.c
index 37c41fd..d448c41 100644
--- a/src/device/mipi/panel-AUO_NT51021D8P.c
+++ b/src/drivers/mipi/panel-AUO_NT51021D8P.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
-#include <device/mipi_panel.h>
+#include <mipi/panel.h>
 
 struct panel_serializable_data AUO_NT51021D8P = {
 	.edid = {
diff --git a/src/device/mipi/panel-BOE_TV080WUM_NG0.c b/src/drivers/mipi/panel-BOE_TV080WUM_NG0.c
similarity index 99%
rename from src/device/mipi/panel-BOE_TV080WUM_NG0.c
rename to src/drivers/mipi/panel-BOE_TV080WUM_NG0.c
index baeb655..c100f42 100644
--- a/src/device/mipi/panel-BOE_TV080WUM_NG0.c
+++ b/src/drivers/mipi/panel-BOE_TV080WUM_NG0.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
-#include <device/mipi_panel.h>
+#include <mipi/panel.h>
 
 struct panel_serializable_data BOE_TV080WUM_NG0 = {
 	.edid = {
diff --git a/src/device/mipi/panel-BOE_TV101WUM_N53.c b/src/drivers/mipi/panel-BOE_TV101WUM_N53.c
similarity index 99%
rename from src/device/mipi/panel-BOE_TV101WUM_N53.c
rename to src/drivers/mipi/panel-BOE_TV101WUM_N53.c
index b40999f..bc45474 100644
--- a/src/device/mipi/panel-BOE_TV101WUM_N53.c
+++ b/src/drivers/mipi/panel-BOE_TV101WUM_N53.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
-#include <device/mipi_panel.h>
+#include <mipi/panel.h>
 
 struct panel_serializable_data BOE_TV101WUM_N53 = {
 	.edid = {
diff --git a/src/device/mipi/panel-BOE_TV101WUM_NG0.c b/src/drivers/mipi/panel-BOE_TV101WUM_NG0.c
similarity index 99%
rename from src/device/mipi/panel-BOE_TV101WUM_NG0.c
rename to src/drivers/mipi/panel-BOE_TV101WUM_NG0.c
index fc3f998..989fb62 100644
--- a/src/device/mipi/panel-BOE_TV101WUM_NG0.c
+++ b/src/drivers/mipi/panel-BOE_TV101WUM_NG0.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
-#include <device/mipi_panel.h>
+#include <mipi/panel.h>
 
 struct panel_serializable_data BOE_TV101WUM_NG0 = {
 	.edid = {
diff --git a/src/device/mipi/panel-BOE_TV101WUM_NL6.c b/src/drivers/mipi/panel-BOE_TV101WUM_NL6.c
similarity index 99%
rename from src/device/mipi/panel-BOE_TV101WUM_NL6.c
rename to src/drivers/mipi/panel-BOE_TV101WUM_NL6.c
index 7369cbe..2c990f8 100644
--- a/src/device/mipi/panel-BOE_TV101WUM_NL6.c
+++ b/src/drivers/mipi/panel-BOE_TV101WUM_NL6.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
-#include <device/mipi_panel.h>
+#include <mipi/panel.h>
 
 struct panel_serializable_data BOE_TV101WUM_NL6 = {
 	.edid = {
diff --git a/src/device/mipi/panel-BOE_TV105WUM_NW0.c b/src/drivers/mipi/panel-BOE_TV105WUM_NW0.c
similarity index 99%
rename from src/device/mipi/panel-BOE_TV105WUM_NW0.c
rename to src/drivers/mipi/panel-BOE_TV105WUM_NW0.c
index efe6b66..6931193 100644
--- a/src/device/mipi/panel-BOE_TV105WUM_NW0.c
+++ b/src/drivers/mipi/panel-BOE_TV105WUM_NW0.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
-#include <device/mipi_panel.h>
+#include <mipi/panel.h>
 
 struct panel_serializable_data BOE_TV105WUM_NW0 = {
 	.edid = {
diff --git a/src/device/mipi/panel-CMN_P097PFG_SSD2858.c b/src/drivers/mipi/panel-CMN_P097PFG_SSD2858.c
similarity index 98%
rename from src/device/mipi/panel-CMN_P097PFG_SSD2858.c
rename to src/drivers/mipi/panel-CMN_P097PFG_SSD2858.c
index 89154b8..73e8596 100644
--- a/src/device/mipi/panel-CMN_P097PFG_SSD2858.c
+++ b/src/drivers/mipi/panel-CMN_P097PFG_SSD2858.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
-#include <device/mipi_panel.h>
+#include <mipi/panel.h>
 
 struct panel_serializable_data P097PFG_SSD2858 = {
 	.edid = {
diff --git a/src/device/mipi/panel-INX_OTA7290D10P.c b/src/drivers/mipi/panel-INX_OTA7290D10P.c
similarity index 99%
rename from src/device/mipi/panel-INX_OTA7290D10P.c
rename to src/drivers/mipi/panel-INX_OTA7290D10P.c
index 0253ba7..79f72f0 100644
--- a/src/device/mipi/panel-INX_OTA7290D10P.c
+++ b/src/drivers/mipi/panel-INX_OTA7290D10P.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
-#include <device/mipi_panel.h>
+#include <mipi/panel.h>
 
 struct panel_serializable_data INX_OTA7290D10P = {
 	.edid = {
diff --git a/src/device/mipi/panel-STA_2081101QFH032011_53G.c b/src/drivers/mipi/panel-STA_2081101QFH032011_53G.c
similarity index 98%
rename from src/device/mipi/panel-STA_2081101QFH032011_53G.c
rename to src/drivers/mipi/panel-STA_2081101QFH032011_53G.c
index 87e53ce..be8ba73 100644
--- a/src/device/mipi/panel-STA_2081101QFH032011_53G.c
+++ b/src/drivers/mipi/panel-STA_2081101QFH032011_53G.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
-#include <device/mipi_panel.h>
+#include <mipi/panel.h>
 
 struct panel_serializable_data STA_QFH032011_53G = {
 	.edid = {
diff --git a/src/device/mipi/panel-VIS_RM69299.c b/src/drivers/mipi/panel-VIS_RM69299.c
similarity index 95%
rename from src/device/mipi/panel-VIS_RM69299.c
rename to src/drivers/mipi/panel-VIS_RM69299.c
index 5fdea60..aff2a99 100644
--- a/src/device/mipi/panel-VIS_RM69299.c
+++ b/src/drivers/mipi/panel-VIS_RM69299.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
-#include <device/mipi_panel.h>
+#include <mipi/panel.h>
 
 struct panel_serializable_data VIS_RM69299 = {
 	.edid = {
diff --git a/src/device/mipi/panel.c b/src/drivers/mipi/panel.c
similarity index 96%
rename from src/device/mipi/panel.c
rename to src/drivers/mipi/panel.c
index f2bf340..e8469a6 100644
--- a/src/device/mipi/panel.c
+++ b/src/drivers/mipi/panel.c
@@ -2,7 +2,7 @@
 
 #include <console/console.h>
 #include <delay.h>
-#include <device/mipi_panel.h>
+#include <mipi/panel.h>
 
 cb_err_t mipi_panel_parse_init_commands(const void *buf, mipi_cmd_func_t cmd_func)
 {
diff --git a/src/drivers/soundwire/alc1308/alc1308.c b/src/drivers/soundwire/alc1308/alc1308.c
index df60d47..f16d3a2 100644
--- a/src/drivers/soundwire/alc1308/alc1308.c
+++ b/src/drivers/soundwire/alc1308/alc1308.c
@@ -5,8 +5,8 @@
 #include <acpi/acpi_soundwire.h>
 #include <device/device.h>
 #include <device/path.h>
-#include <device/mipi_ids.h>
 #include <device/soundwire.h>
+#include <mipi/ids.h>
 #include <stdio.h>
 
 #include "chip.h"
diff --git a/src/drivers/soundwire/alc5682/alc5682.c b/src/drivers/soundwire/alc5682/alc5682.c
index e15ecd4..c1aaff6 100644
--- a/src/drivers/soundwire/alc5682/alc5682.c
+++ b/src/drivers/soundwire/alc5682/alc5682.c
@@ -4,9 +4,9 @@
 #include <acpi/acpi_device.h>
 #include <acpi/acpi_soundwire.h>
 #include <device/device.h>
-#include <device/mipi_ids.h>
 #include <device/path.h>
 #include <device/soundwire.h>
+#include <mipi/ids.h>
 #include <stdio.h>
 
 #include "chip.h"
diff --git a/src/drivers/soundwire/alc711/alc711.c b/src/drivers/soundwire/alc711/alc711.c
index 44a9e98..34d55c7 100644
--- a/src/drivers/soundwire/alc711/alc711.c
+++ b/src/drivers/soundwire/alc711/alc711.c
@@ -5,8 +5,8 @@
 #include <acpi/acpi_soundwire.h>
 #include <device/device.h>
 #include <device/path.h>
-#include <device/mipi_ids.h>
 #include <device/soundwire.h>
+#include <mipi/ids.h>
 #include <stdio.h>
 
 #include "chip.h"
diff --git a/src/drivers/soundwire/max98373/max98373.c b/src/drivers/soundwire/max98373/max98373.c
index 28796c0..fb202fe 100644
--- a/src/drivers/soundwire/max98373/max98373.c
+++ b/src/drivers/soundwire/max98373/max98373.c
@@ -5,8 +5,8 @@
 #include <acpi/acpi_soundwire.h>
 #include <device/device.h>
 #include <device/path.h>
-#include <device/mipi_ids.h>
 #include <device/soundwire.h>
+#include <mipi/ids.h>
 #include <stdio.h>
 
 #include "chip.h"
diff --git a/src/include/device/soundwire.h b/src/include/device/soundwire.h
index 6f966ae..a78b52b 100644
--- a/src/include/device/soundwire.h
+++ b/src/include/device/soundwire.h
@@ -76,7 +76,7 @@
  * @version: SoundWire specification version from &enum soundwire_version.
  * @link_id: Zero-based SoundWire master link id.
  * @unique_id: Unique ID for multiple slave devices on the same bus.
- * @manufacturer_id: Manufacturer ID from include/device/mipi_ids.h.
+ * @manufacturer_id: Manufacturer ID from include/mipi/ids.h.
  * @part_id: Vendor defined part ID.
  * @class: MIPI class encoding in &enum mipi_class.
  */
diff --git a/src/include/device/mipi_ids.h b/src/include/mipi/ids.h
similarity index 87%
rename from src/include/device/mipi_ids.h
rename to src/include/mipi/ids.h
index 50faba7..982e6e1 100644
--- a/src/include/device/mipi_ids.h
+++ b/src/include/mipi/ids.h
@@ -4,8 +4,8 @@
  * MIPI Alliance Manufacturer IDs from https://mid.mipi.org
  */
 
-#ifndef __DEVICE_MIPI_IDS_H__
-#define __DEVICE_MIPI_IDS_H__
+#ifndef __MIPI_IDS_H__
+#define __MIPI_IDS_H__
 
 /* Board Members */
 #define MIPI_MFG_ID_INTEL			0x0105
@@ -26,4 +26,4 @@
 #define MIPI_MFG_ID_MAXIM			0x019f
 #define MIPI_DEV_ID_MAXIM_MAX98373		0x8373
 
-#endif /* __DEVICE_MIPI_IDS_H__ */
+#endif /* __MIPI_IDS_H__ */
diff --git a/src/include/device/mipi_panel.h b/src/include/mipi/panel.h
similarity index 91%
rename from src/include/device/mipi_panel.h
rename to src/include/mipi/panel.h
index 95fcb69..e0a1463 100644
--- a/src/include/device/mipi_panel.h
+++ b/src/include/mipi/panel.h
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
-#ifndef __DEVICE_MIPI_PANEL_H__
-#define __DEVICE_MIPI_PANEL_H__
+#ifndef __MIPI_PANEL_H__
+#define __MIPI_PANEL_H__
 
 #include <edid.h>
 #include <types.h>
@@ -53,4 +53,4 @@
 #define PANEL_END \
 	PANEL_CMD_END
 
-#endif /* __DEVICE_MIPI_PANEL_H__ */
+#endif /* __MIPI_PANEL_H__ */
diff --git a/src/mainboard/google/kukui/panel.h b/src/mainboard/google/kukui/panel.h
index e434d9f..17c1983 100644
--- a/src/mainboard/google/kukui/panel.h
+++ b/src/mainboard/google/kukui/panel.h
@@ -3,7 +3,7 @@
 #ifndef __MAINBOARD_GOOGLE_KUKUI_PANEL_H__
 #define __MAINBOARD_GOOGLE_KUKUI_PANEL_H__
 
-#include <device/mipi_panel.h>
+#include <mipi/panel.h>
 #include <soc/dsi.h>
 
 struct panel_description {
diff --git a/src/mainboard/google/trogdor/mainboard.c b/src/mainboard/google/trogdor/mainboard.c
index 02a1f7d..4b395ba 100644
--- a/src/mainboard/google/trogdor/mainboard.c
+++ b/src/mainboard/google/trogdor/mainboard.c
@@ -6,7 +6,7 @@
 #include <delay.h>
 #include <device/device.h>
 #include <device/i2c_simple.h>
-#include <device/mipi_panel.h>
+#include <mipi/panel.h>
 #include <drivers/ti/sn65dsi86bridge/sn65dsi86bridge.h>
 #include <edid.h>
 #include <framebuffer_info.h>
diff --git a/src/soc/mediatek/common/dsi.c b/src/soc/mediatek/common/dsi.c
index c517726..fbf3cca 100644
--- a/src/soc/mediatek/common/dsi.c
+++ b/src/soc/mediatek/common/dsi.c
@@ -2,7 +2,7 @@
 
 #include <assert.h>
 #include <console/console.h>
-#include <device/mipi_panel.h>
+#include <mipi/panel.h>
 #include <device/mmio.h>
 #include <delay.h>
 #include <edid.h>
diff --git a/src/soc/qualcomm/sc7180/display/dsi.c b/src/soc/qualcomm/sc7180/display/dsi.c
index e0aa0ef..e9bd702 100644
--- a/src/soc/qualcomm/sc7180/display/dsi.c
+++ b/src/soc/qualcomm/sc7180/display/dsi.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
-#include <device/mipi_panel.h>
+#include <mipi/panel.h>
 #include <device/mmio.h>
 #include <console/console.h>
 #include <assert.h>