// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright 2026 Variscite Ltd.
 */

/ {
	iw61x_pwrseq: wifi-pwrseq {
		compatible = "mmc-pwrseq-simple";
		post-power-on-delay-ms = <100>;
		power-off-delay-us = <10000>;
		reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>, /* WIFI_RESET */
			      <&gpio2 20 GPIO_ACTIVE_LOW>; /* WIFI_PWR_EN */
	};
};

&uart2 {
	pinctrl-0 = <&pinctrl_uart2>, <&pinctrl_bt>;

	bluetooth_iw61x: bluetooth {
		compatible = "nxp,88w8987-bt";
	};
};

/* WIFI */
&usdhc1 {
	pinctrl-names = "default", "state_100mhz", "state_200mhz";
	pinctrl-0 = <&pinctrl_usdhc1>, <&pinctrl_wifi>;
	pinctrl-1 = <&pinctrl_usdhc1_100mhz>, <&pinctrl_wifi>;
	pinctrl-2 = <&pinctrl_usdhc1_200mhz>, <&pinctrl_wifi>;
	mmc-pwrseq = <&iw61x_pwrseq>;
};

&iomuxc {
	pinctrl_bt: bluetoothgrp {
		fsl,pins = <
			MX8MN_IOMUXC_SD1_DATA4_GPIO2_IO6	0xc1
		>;
	};

	pinctrl_wifi: wifigrp {
		fsl,pins = <
			MX8MN_IOMUXC_SD2_WP_GPIO2_IO20		0x140
			MX8MN_IOMUXC_SD1_RESET_B_GPIO2_IO10	0xc1
		>;
	};
};