1/*
2 * Copyright (c) 2023 Andriy Gelman
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/ {
8	mikrobus_header_1: mikrobus-connector-1 {
9		compatible = "mikro-bus";
10		#gpio-cells = <2>;
11		gpio-map-mask = <0xffffffff 0xffffffc0>;
12		gpio-map-pass-thru = <0 0x3f>;
13		gpio-map =	<0 0 &arduino_header 0 0>,	/* AN   -> A0  */
14				<1 0 &arduino_header 3 0>,	/* RST  -> A3  */
15				<2 0 &arduino_header 16 0>,	/* CS   -> D10 */
16				<3 0 &arduino_header 19 0>,	/* SCK  -> D13 */
17				<4 0 &arduino_header 18 0>,	/* MISO -> D12 */
18				<5 0 &arduino_header 17 0>,	/* MOSI -> D11 */
19								/* +3.3V */
20								/* GND */
21				<6 0 &arduino_header 12 0>,	/* PWM  -> D6  */
22				<7 0 &arduino_header 8 0>,	/* INT  -> D2  */
23				<8 0 &arduino_header 6 0>,	/* RX   -> D0  */
24				<9 0 &arduino_header 7 0>,	/* TX   -> D1  */
25				<10 0 &arduino_header 5 0>,	/* SCL  -> A5  */
26				<11 0 &arduino_header 4 0>;	/* SDA  -> A4  */
27								/* +5V */
28								/* GND */
29	};
30
31	mikrobus_header_2: mikrobus-connector-2 {
32		compatible = "mikro-bus";
33		#gpio-cells = <2>;
34		gpio-map-mask = <0xffffffff 0xffffffc0>;
35		gpio-map-pass-thru = <0 0x3f>;
36		gpio-map =	<0 0 &arduino_header 1 0>,	/* AN   -> A1  */
37				<1 0 &arduino_header 2 0>,	/* RST  -> A2  */
38				<2 0 &arduino_header 15 0>,	/* CS   -> D9 */
39				<3 0 &arduino_header 19 0>,	/* SCK  -> D13 */
40				<4 0 &arduino_header 18 0>,	/* MISO -> D12 */
41				<5 0 &arduino_header 17 0>,	/* MOSI -> D11 */
42								/* +3.3V */
43								/* GND */
44				<6 0 &arduino_header 11 0>,	/* PWM  -> D5  */
45				<7 0 &arduino_header 9 0>,	/* INT  -> D3  */
46				<8 0 &arduino_header 6 0>,	/* RX   -> D0  */
47				<9 0 &arduino_header 7 0>,	/* TX   -> D1  */
48				<10 0 &arduino_header 5 0>,	/* SCL  -> A5  */
49				<11 0 &arduino_header 4 0>;	/* SDA  -> A4  */
50								/* +5V */
51								/* GND */
52	};
53};
54
55mikrobus_spi: &arduino_spi {};
56mikrobus_serial: &arduino_serial {};
57mikrobus_i2c: &arduino_i2c {};
58
59mikrobus_header: &mikrobus_header_1 {};
60