1/*
2 * Copyright (c) 2023 Martin Kiepfer
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6/ {
7	m5stack_mbus_header: m5stack_mbus_connector {
8		compatible = "m5stack,mbus-header";
9		#gpio-cells = <2>;
10		gpio-map-mask = <0xffffffff 0xffffffc0>;
11		gpio-map-pass-thru = <0 0x3f>;
12		gpio-map = /* 0 GND */
13			   <1 0 &gpio1 4 0>,	/* ADC0 */
14			   /* 2 GND */
15			   <3 0 &gpio1 5 0>,	/* ADC1 */
16			   /* 4  GND */
17			   /* 5 RESET */
18			   <6 0 &gpio0 23 0>,	/* MOSI */
19			   <7 0 &gpio0 25 0>,	/* DAC0 */
20			   <8 0 &gpio1 7 0>,	/* MISO */
21			   <9 0 &gpio0 26 0>,	/* DAC1 */
22			   <10 0 &gpio0 18 0>,	/* SCK */
23			   /* 11 3.3V */
24			   <12 0 &gpio0 3 0>,	/* RXD0 */
25			   <13 0 &gpio0 1 0>,	/* TXD0 */
26			   <14 0 &gpio0 13 0>,	/* RXD1 */
27			   <15 0 &gpio0 14 0>,	/* TXD1 */
28			   <16 0 &gpio0 21 0>,	/* intSDA */
29			   <17 0 &gpio0 22 0>,	/* intSCL */
30			   <18 0 &gpio1 0 0>,	/* SDA */
31			   <19 0 &gpio1 1 0>,	/* SCL */
32			   <20 0 &gpio0 27 0>,	/* GPIO */
33			   <21 0 &gpio0 19 0>,	/* GPIO */
34			   <22 0 &gpio0 2 0>,	/* GPIO */
35			   <23 0 &gpio0 0 0>,	/* GPIO */
36			   /* 24 NC */
37			   <25 0 &gpio1 3 0>;	/* GPIO */
38			   /* 26 NC */
39			   /* 27 5V */
40			   /* 28 NC */
41			   /* 29 BAT */
42	};
43};
44
45m5stack_mbus_i2c0: &i2c0 {};
46m5stack_mbus_i2c1: &i2c1 {};
47m5stack_mbus_uart0: &uart1 {};
48m5stack_mbus_uart1: &uart2 {};
49m5stack_mbus_spi: &spi3 {};
50