xref: /freebsd/sys/contrib/device-tree/src/arm64/freescale/imx8mm-kontron-bl-osm-s.dts (revision 01950c46b8155250f64374fb72fc11faa44bf099)
17ef62cebSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0+ OR MIT
27ef62cebSEmmanuel Vadot/*
37ef62cebSEmmanuel Vadot * Copyright (C) 2022 Kontron Electronics GmbH
47ef62cebSEmmanuel Vadot */
57ef62cebSEmmanuel Vadot
67ef62cebSEmmanuel Vadot/dts-v1/;
77ef62cebSEmmanuel Vadot
87ef62cebSEmmanuel Vadot#include "imx8mm-kontron-osm-s.dtsi"
97ef62cebSEmmanuel Vadot
107ef62cebSEmmanuel Vadot/ {
117ef62cebSEmmanuel Vadot	model = "Kontron BL i.MX8MM OSM-S (N802X S)";
127ef62cebSEmmanuel Vadot	compatible = "kontron,imx8mm-bl-osm-s", "kontron,imx8mm-osm-s", "fsl,imx8mm";
137ef62cebSEmmanuel Vadot
147ef62cebSEmmanuel Vadot	aliases {
157ef62cebSEmmanuel Vadot		ethernet1 = &usbnet;
167ef62cebSEmmanuel Vadot	};
177ef62cebSEmmanuel Vadot
187ef62cebSEmmanuel Vadot	/* fixed crystal dedicated to mcp2542fd */
197ef62cebSEmmanuel Vadot	osc_can: clock-osc-can {
207ef62cebSEmmanuel Vadot		compatible = "fixed-clock";
217ef62cebSEmmanuel Vadot		#clock-cells = <0>;
227ef62cebSEmmanuel Vadot		clock-frequency = <40000000>;
237ef62cebSEmmanuel Vadot		clock-output-names = "osc-can";
247ef62cebSEmmanuel Vadot	};
257ef62cebSEmmanuel Vadot
267ef62cebSEmmanuel Vadot	leds {
277ef62cebSEmmanuel Vadot		compatible = "gpio-leds";
287ef62cebSEmmanuel Vadot
297ef62cebSEmmanuel Vadot		led1 {
307ef62cebSEmmanuel Vadot			label = "led1";
31*01950c46SEmmanuel Vadot			gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
327ef62cebSEmmanuel Vadot			linux,default-trigger = "heartbeat";
337ef62cebSEmmanuel Vadot		};
347ef62cebSEmmanuel Vadot
357ef62cebSEmmanuel Vadot		led2 {
367ef62cebSEmmanuel Vadot			label = "led2";
37*01950c46SEmmanuel Vadot			gpios = <&gpio3 8 GPIO_ACTIVE_LOW>;
387ef62cebSEmmanuel Vadot		};
397ef62cebSEmmanuel Vadot
407ef62cebSEmmanuel Vadot		led3 {
417ef62cebSEmmanuel Vadot			label = "led3";
42*01950c46SEmmanuel Vadot			gpios = <&gpio3 7 GPIO_ACTIVE_LOW>;
437ef62cebSEmmanuel Vadot		};
447ef62cebSEmmanuel Vadot	};
457ef62cebSEmmanuel Vadot
467ef62cebSEmmanuel Vadot	pwm-beeper {
477ef62cebSEmmanuel Vadot		compatible = "pwm-beeper";
487ef62cebSEmmanuel Vadot		pwms = <&pwm2 0 5000 0>;
497ef62cebSEmmanuel Vadot	};
507ef62cebSEmmanuel Vadot
517ef62cebSEmmanuel Vadot	reg_rst_eth2: regulator-rst-eth2 {
527ef62cebSEmmanuel Vadot		compatible = "regulator-fixed";
53*01950c46SEmmanuel Vadot		gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>;
547ef62cebSEmmanuel Vadot		enable-active-high;
557ef62cebSEmmanuel Vadot		regulator-always-on;
567ef62cebSEmmanuel Vadot		regulator-name = "rst-usb-eth2";
577ef62cebSEmmanuel Vadot	};
587ef62cebSEmmanuel Vadot
597ef62cebSEmmanuel Vadot	reg_vdd_5v: regulator-5v {
607ef62cebSEmmanuel Vadot		compatible = "regulator-fixed";
617ef62cebSEmmanuel Vadot		regulator-always-on;
627ef62cebSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
637ef62cebSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
647ef62cebSEmmanuel Vadot		regulator-name = "vdd-5v";
657ef62cebSEmmanuel Vadot	};
667ef62cebSEmmanuel Vadot};
677ef62cebSEmmanuel Vadot
687ef62cebSEmmanuel Vadot&ecspi2 {
697ef62cebSEmmanuel Vadot	status = "okay";
707ef62cebSEmmanuel Vadot
717ef62cebSEmmanuel Vadot	can@0 {
727ef62cebSEmmanuel Vadot		compatible = "microchip,mcp251xfd";
737ef62cebSEmmanuel Vadot		reg = <0>;
747ef62cebSEmmanuel Vadot		pinctrl-names = "default";
757ef62cebSEmmanuel Vadot		pinctrl-0 = <&pinctrl_can>;
767ef62cebSEmmanuel Vadot		clocks = <&osc_can>;
77*01950c46SEmmanuel Vadot		interrupts-extended = <&gpio5 1 IRQ_TYPE_LEVEL_LOW>;
787ef62cebSEmmanuel Vadot		/*
797ef62cebSEmmanuel Vadot		 * Limit the SPI clock to 15 MHz to prevent issues
807ef62cebSEmmanuel Vadot		 * with corrupted data due to chip errata.
817ef62cebSEmmanuel Vadot		 */
827ef62cebSEmmanuel Vadot		spi-max-frequency = <15000000>;
837ef62cebSEmmanuel Vadot		vdd-supply = <&reg_vdd_3v3>;
847ef62cebSEmmanuel Vadot		xceiver-supply = <&reg_vdd_5v>;
857ef62cebSEmmanuel Vadot	};
867ef62cebSEmmanuel Vadot};
877ef62cebSEmmanuel Vadot
887ef62cebSEmmanuel Vadot&ecspi3 {
897ef62cebSEmmanuel Vadot	status = "okay";
907ef62cebSEmmanuel Vadot
917ef62cebSEmmanuel Vadot	eeram@0 {
927ef62cebSEmmanuel Vadot		compatible = "microchip,48l640";
937ef62cebSEmmanuel Vadot		reg = <0>;
947ef62cebSEmmanuel Vadot		spi-max-frequency = <20000000>;
957ef62cebSEmmanuel Vadot	};
967ef62cebSEmmanuel Vadot};
977ef62cebSEmmanuel Vadot
987ef62cebSEmmanuel Vadot&fec1 {
997ef62cebSEmmanuel Vadot	pinctrl-names = "default";
100*01950c46SEmmanuel Vadot	pinctrl-0 = <&pinctrl_enet_rgmii>;
101*01950c46SEmmanuel Vadot	phy-connection-type = "rgmii-id";
1027ef62cebSEmmanuel Vadot	phy-handle = <&ethphy>;
1037ef62cebSEmmanuel Vadot	status = "okay";
1047ef62cebSEmmanuel Vadot
1057ef62cebSEmmanuel Vadot	mdio {
1067ef62cebSEmmanuel Vadot		#address-cells = <1>;
1077ef62cebSEmmanuel Vadot		#size-cells = <0>;
1087ef62cebSEmmanuel Vadot
1097ef62cebSEmmanuel Vadot		ethphy: ethernet-phy@0 {
110*01950c46SEmmanuel Vadot			compatible = "ethernet-phy-id4f51.e91b";
1117ef62cebSEmmanuel Vadot			reg = <0>;
112*01950c46SEmmanuel Vadot			reset-assert-us = <10000>;
113*01950c46SEmmanuel Vadot			reset-gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
1147ef62cebSEmmanuel Vadot		};
1157ef62cebSEmmanuel Vadot	};
1167ef62cebSEmmanuel Vadot};
1177ef62cebSEmmanuel Vadot
118*01950c46SEmmanuel Vadot/*
119*01950c46SEmmanuel Vadot * Rename SoM signals according to board usage:
120*01950c46SEmmanuel Vadot *   GPIO_B_0      -> DIO1_OUT
121*01950c46SEmmanuel Vadot *   GPIO_B_1      -> DIO2_OUT
122*01950c46SEmmanuel Vadot */
1237ef62cebSEmmanuel Vadot&gpio1 {
124*01950c46SEmmanuel Vadot	gpio-line-names = "", "GPIO_A_0", "", "GPIO_A_1",
125*01950c46SEmmanuel Vadot			  "", "GPIO_A_2", "GPIO_A_3", "GPIO_A_4",
126*01950c46SEmmanuel Vadot			  "GPIO_A_5", "GPIO_A_6", "GPIO_A_7", "DIO1_OUT",
127*01950c46SEmmanuel Vadot			  "DIO2_OUT", "USB_A_OC#", "CAM_MCK", "USB_B_OC#",
128*01950c46SEmmanuel Vadot			  "ETH_MDC", "ETH_MDIO", "ETH_A_(S)(R)(G)MII_TXD3",
129*01950c46SEmmanuel Vadot			  "ETH_A_(S)(R)(G)MII_TXD2", "ETH_A_(S)(R)(G)MII_TXD1",
130*01950c46SEmmanuel Vadot			  "ETH_A_(S)(R)(G)MII_TXD0", "ETH_A_(R)(G)MII_TX_EN(_ER)",
131*01950c46SEmmanuel Vadot			  "ETH_A_(R)(G)MII_TX_CLK", "ETH_A_(R)(G)MII_RX_DV(_ER)",
132*01950c46SEmmanuel Vadot			  "ETH_A_(R)(G)MII_RX_CLK", "ETH_A_(S)(R)(G)MII_RXD0",
133*01950c46SEmmanuel Vadot			  "ETH_A_(S)(R)(G)MII_RXD1", "ETH_A_(R)(G)MII_RXD2",
134*01950c46SEmmanuel Vadot			  "ETH_A_(R)(G)MII_RXD3";
1357ef62cebSEmmanuel Vadot};
1367ef62cebSEmmanuel Vadot
137*01950c46SEmmanuel Vadot/*
138*01950c46SEmmanuel Vadot * Rename SoM signals according to board usage:
139*01950c46SEmmanuel Vadot *   GPIO_B_2      -> DIO3_OUT
140*01950c46SEmmanuel Vadot *   GPIO_B_3      -> DIO4_OUT
141*01950c46SEmmanuel Vadot */
142*01950c46SEmmanuel Vadot&gpio3 {
143*01950c46SEmmanuel Vadot	gpio-line-names = "GPIO_C_5", "GPIO_C_4", "SDIO_B_CD#", "SDIO_B_D5",
144*01950c46SEmmanuel Vadot			  "SDIO_B_D6", "SDIO_B_D7", "GPIO_C_0", "GPIO_C_1",
145*01950c46SEmmanuel Vadot			  "GPIO_C_2", "GPIO_C_3", "SDIO_B_D0", "SDIO_B_D1",
146*01950c46SEmmanuel Vadot			  "SDIO_B_D2", "SDIO_B_D3", "", "SDIO_B_D4",
147*01950c46SEmmanuel Vadot			  "CARRIER_PWR_EN", "SDIO_B_CLK", "SDIO_B_CMD", "DIO3_OUT",
148*01950c46SEmmanuel Vadot			  "USB_B_EN", "DIO4_OUT", "PCIe_CLKREQ#", "PCIe_A_PERST#",
149*01950c46SEmmanuel Vadot			  "PCIe_WAKE#", "USB_A_EN";
1507ef62cebSEmmanuel Vadot};
1517ef62cebSEmmanuel Vadot
152*01950c46SEmmanuel Vadot/*
153*01950c46SEmmanuel Vadot * Rename SoM signals according to board usage:
154*01950c46SEmmanuel Vadot *   GPIO_B_4      -> DIO1_IN
155*01950c46SEmmanuel Vadot *   GPIO_B_5      -> DIO2_IN
156*01950c46SEmmanuel Vadot *   GPIO_B_6      -> DIO3_IN
157*01950c46SEmmanuel Vadot *   GPIO_B_7      -> DIO4_IN
158*01950c46SEmmanuel Vadot */
159*01950c46SEmmanuel Vadot&gpio4 {
160*01950c46SEmmanuel Vadot	gpio-line-names = "GPIO_C_7", "", "I2S_A_DATA_IN", "I2S_B_DATA_IN",
161*01950c46SEmmanuel Vadot			  "DIO1_IN", "BOOT_SEL0#", "BOOT_SEL1#", "",
162*01950c46SEmmanuel Vadot			  "", "", "I2S_LRCLK", "I2S_BITCLK",
163*01950c46SEmmanuel Vadot			  "I2S_A_DATA_OUT", "I2S_B_DATA_OUT", "DIO2_IN", "DIO3_IN",
164*01950c46SEmmanuel Vadot			  "DIO4_IN", "SPI_A_/WP_(IO2)", "SPI_A_/HOLD_(IO3)", "GPIO_C_6",
165*01950c46SEmmanuel Vadot			  "I2S_MCLK", "UART_A_TX", "UART_A_RX", "UART_A_CTS",
166*01950c46SEmmanuel Vadot			  "UART_A_RTS", "", "", "",
167*01950c46SEmmanuel Vadot			  "PCIe_SM_ALERT", "UART_B_RTS", "UART_B_CTS", "UART_B_RX";
168*01950c46SEmmanuel Vadot};
169*01950c46SEmmanuel Vadot
170*01950c46SEmmanuel Vadot&i2c3 {
1717ef62cebSEmmanuel Vadot	status = "okay";
172*01950c46SEmmanuel Vadot
173*01950c46SEmmanuel Vadot	usb-hub@2c {
174*01950c46SEmmanuel Vadot		compatible = "microchip,usb2514b";
175*01950c46SEmmanuel Vadot		pinctrl-names = "default";
176*01950c46SEmmanuel Vadot		pinctrl-0 = <&pinctrl_usb_hub>;
177*01950c46SEmmanuel Vadot		reg = <0x2c>;
178*01950c46SEmmanuel Vadot		non-removable-ports = <0>, <3>;
179*01950c46SEmmanuel Vadot		reset-gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
180*01950c46SEmmanuel Vadot	};
1817ef62cebSEmmanuel Vadot};
1827ef62cebSEmmanuel Vadot
1837ef62cebSEmmanuel Vadot&pwm2 {
1847ef62cebSEmmanuel Vadot	status = "okay";
1857ef62cebSEmmanuel Vadot};
1867ef62cebSEmmanuel Vadot
187*01950c46SEmmanuel Vadot&reg_usb2_vbus {
188*01950c46SEmmanuel Vadot	status = "disabled";
189*01950c46SEmmanuel Vadot};
190*01950c46SEmmanuel Vadot
191*01950c46SEmmanuel Vadot&reg_usdhc2_vcc {
192*01950c46SEmmanuel Vadot	status = "disabled";
193*01950c46SEmmanuel Vadot};
194*01950c46SEmmanuel Vadot
195*01950c46SEmmanuel Vadot&reg_usdhc3_vcc {
196*01950c46SEmmanuel Vadot	status = "disabled";
197*01950c46SEmmanuel Vadot};
198*01950c46SEmmanuel Vadot
1997ef62cebSEmmanuel Vadot&uart1 {
2007ef62cebSEmmanuel Vadot	uart-has-rtscts;
2017ef62cebSEmmanuel Vadot	status = "okay";
2027ef62cebSEmmanuel Vadot};
2037ef62cebSEmmanuel Vadot
2047ef62cebSEmmanuel Vadot&uart2 {
2057ef62cebSEmmanuel Vadot	linux,rs485-enabled-at-boot-time;
2067ef62cebSEmmanuel Vadot	uart-has-rtscts;
2077ef62cebSEmmanuel Vadot	status = "okay";
2087ef62cebSEmmanuel Vadot};
2097ef62cebSEmmanuel Vadot
2107ef62cebSEmmanuel Vadot&usbotg1 {
2117ef62cebSEmmanuel Vadot	dr_mode = "otg";
2127ef62cebSEmmanuel Vadot	status = "okay";
2137ef62cebSEmmanuel Vadot};
2147ef62cebSEmmanuel Vadot
2157ef62cebSEmmanuel Vadot&usbotg2 {
2167ef62cebSEmmanuel Vadot	dr_mode = "host";
2177ef62cebSEmmanuel Vadot	disable-over-current;
2187ef62cebSEmmanuel Vadot	#address-cells = <1>;
2197ef62cebSEmmanuel Vadot	#size-cells = <0>;
2207ef62cebSEmmanuel Vadot	status = "okay";
2217ef62cebSEmmanuel Vadot
222*01950c46SEmmanuel Vadot	/* VBUS is controlled by the hub */
223*01950c46SEmmanuel Vadot	/delete-property/ vbus-supply;
224*01950c46SEmmanuel Vadot
2257ef62cebSEmmanuel Vadot	usb1@1 {
226*01950c46SEmmanuel Vadot		compatible = "usb424,2514";
2277ef62cebSEmmanuel Vadot		reg = <1>;
2287ef62cebSEmmanuel Vadot		#address-cells = <1>;
2297ef62cebSEmmanuel Vadot		#size-cells = <0>;
2307ef62cebSEmmanuel Vadot
2317ef62cebSEmmanuel Vadot		usbnet: ethernet@1 {
232*01950c46SEmmanuel Vadot			compatible = "usbb95,772b";
2337ef62cebSEmmanuel Vadot			reg = <1>;
2347ef62cebSEmmanuel Vadot			local-mac-address = [ 00 00 00 00 00 00 ];
2357ef62cebSEmmanuel Vadot		};
2367ef62cebSEmmanuel Vadot	};
2377ef62cebSEmmanuel Vadot};
2387ef62cebSEmmanuel Vadot
2397ef62cebSEmmanuel Vadot&usdhc2 {
2407ef62cebSEmmanuel Vadot	vmmc-supply = <&reg_vdd_3v3>;
2417ef62cebSEmmanuel Vadot	status = "okay";
2427ef62cebSEmmanuel Vadot};
2437ef62cebSEmmanuel Vadot
2447ef62cebSEmmanuel Vadot&iomuxc {
2457ef62cebSEmmanuel Vadot	pinctrl_can: cangrp {
2467ef62cebSEmmanuel Vadot		fsl,pins = <
247*01950c46SEmmanuel Vadot			MX8MM_IOMUXC_SAI3_TXD_GPIO5_IO1			0x19  /* SDIO_B_PWR_EN */
2487ef62cebSEmmanuel Vadot		>;
2497ef62cebSEmmanuel Vadot	};
2507ef62cebSEmmanuel Vadot
251*01950c46SEmmanuel Vadot	pinctrl_usb_hub: usbhubgrp {
2527ef62cebSEmmanuel Vadot		fsl,pins = <
253*01950c46SEmmanuel Vadot			MX8MM_IOMUXC_SAI3_MCLK_GPIO5_IO2		0x19 /* SDIO_B_WP */
2547ef62cebSEmmanuel Vadot		>;
2557ef62cebSEmmanuel Vadot	};
2567ef62cebSEmmanuel Vadot};
257