blob: c2beec602c5366128ea93f9954a4cf3ef8af1f3b [file] [log] [blame]
Sean Andersonbba86182020-06-24 06:41:23 -04001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2019-20 Sean Anderson <seanga2@gmail.com>
4 */
5
6/dts-v1/;
7
8#include "k210.dtsi"
9
10#include <dt-bindings/gpio/gpio.h>
Heinrich Schuchardt2b5a7192020-09-14 11:02:05 -040011#include <dt-bindings/input/input.h>
Sean Andersonbba86182020-06-24 06:41:23 -040012
13/ {
14 model = "Sipeed Maix Bit 2.0";
15 compatible = "sipeed,maix-bitm", "sipeed,maix-bit", "kendryte,k210";
16
17 chosen {
18 stdout-path = "serial0:115200";
19 };
20
Sean Andersonbe3076e2020-09-14 11:02:04 -040021 gpio-leds {
22 compatible = "gpio-leds";
23
24 green {
25 gpios = <&gpio1_0 4 GPIO_ACTIVE_LOW>;
26 };
27
28 red {
29 gpios = <&gpio1_0 5 GPIO_ACTIVE_LOW>;
30 };
31
32 blue {
33 gpios = <&gpio1_0 6 GPIO_ACTIVE_LOW>;
34 };
35 };
36
Heinrich Schuchardt2b5a7192020-09-14 11:02:05 -040037 gpio-keys {
38 compatible = "gpio-keys";
39
40 boot {
41 label = "BOOT";
42 linux,code = <BTN_0>;
43 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
44 };
45 };
46
Sean Andersonbba86182020-06-24 06:41:23 -040047 sound {
48 compatible = "simple-audio-card";
49 simple-audio-card,format = "i2s";
50 status = "disabled";
51
52 simple-audio-card,cpu {
53 sound-dai = <&i2s0 0>;
54 };
55
56 simple-audio-card,codec {
57 sound-dai = <&mic>;
58 };
59 };
60
61 mic: mic {
62 #sound-dai-cells = <0>;
63 compatible = "memsensing,msm61s4030h0";
64 status = "disabled";
65 };
66};
67
68&uarths0 {
Sean Andersonbe3076e2020-09-14 11:02:04 -040069 pinctrl-0 = <&fpioa_uarths>;
70 pinctrl-names = "default";
71 status = "okay";
72};
73
74&gpio0 {
75 pinctrl-0 = <&fpioa_gpiohs>;
76 pinctrl-names = "default";
77 status = "okay";
78};
79
80&gpio1 {
81 pinctrl-0 = <&fpioa_gpio>;
82 pinctrl-names = "default";
Sean Andersonbba86182020-06-24 06:41:23 -040083 status = "okay";
84};
85
86&i2s0 {
87 #sound-dai-cells = <1>;
Sean Andersonbe3076e2020-09-14 11:02:04 -040088 pinctrl-0 = <&fpioa_i2s0>;
89 pinctrl-names = "default";
90};
91
92&fpioa {
93 status = "okay";
94
95 fpioa_uarths: uarths {
96 pinmux = <K210_FPIOA(4, K210_PCF_UARTHS_RX)>,
97 <K210_FPIOA(5, K210_PCF_UARTHS_TX)>;
98 };
99
100 fpioa_gpio: gpio {
101 pinmux = <K210_FPIOA(8, K210_PCF_GPIO0)>,
102 <K210_FPIOA(9, K210_PCF_GPIO1)>,
103 <K210_FPIOA(10, K210_PCF_GPIO2)>,
104 <K210_FPIOA(11, K210_PCF_GPIO3)>,
105 <K210_FPIOA(12, K210_PCF_GPIO4)>,
106 <K210_FPIOA(13, K210_PCF_GPIO5)>,
107 <K210_FPIOA(14, K210_PCF_GPIO6)>,
108 <K210_FPIOA(15, K210_PCF_GPIO7)>;
109 };
110
111 fpioa_gpiohs: gpiohs {
112 pinmux = <K210_FPIOA(16, K210_PCF_GPIOHS0)>,
113 <K210_FPIOA(17, K210_PCF_GPIOHS1)>,
114 <K210_FPIOA(21, K210_PCF_GPIOHS5)>,
115 <K210_FPIOA(22, K210_PCF_GPIOHS6)>,
116 <K210_FPIOA(23, K210_PCF_GPIOHS7)>,
117 <K210_FPIOA(24, K210_PCF_GPIOHS8)>,
118 <K210_FPIOA(25, K210_PCF_GPIOHS9)>,
119 <K210_FPIOA(30, K210_PCF_GPIOHS14)>,
120 <K210_FPIOA(31, K210_PCF_GPIOHS15)>,
121 <K210_FPIOA(32, K210_PCF_GPIOHS16)>,
122 <K210_FPIOA(33, K210_PCF_GPIOHS17)>,
123 <K210_FPIOA(34, K210_PCF_GPIOHS18)>,
124 <K210_FPIOA(35, K210_PCF_GPIOHS19)>;
125 };
126
127 fpioa_i2s0: i2s0 {
128 pinmux = <K210_FPIOA(18, K210_PCF_I2S0_SCLK)>,
129 <K210_FPIOA(19, K210_PCF_I2S0_WS)>,
130 <K210_FPIOA(20, K210_PCF_I2S0_IN_D0)>;
131 };
132
133 fpioa_dvp: dvp {
134 pinmux = <K210_FPIOA(40, K210_PCF_SCCB_SDA)>,
135 <K210_FPIOA(41, K210_PCF_SCCB_SCLK)>,
136 <K210_FPIOA(42, K210_PCF_DVP_RST)>,
137 <K210_FPIOA(43, K210_PCF_DVP_VSYNC)>,
138 <K210_FPIOA(44, K210_PCF_DVP_PWDN)>,
139 <K210_FPIOA(45, K210_PCF_DVP_HSYNC)>,
140 <K210_FPIOA(46, K210_PCF_DVP_XCLK)>,
141 <K210_FPIOA(47, K210_PCF_DVP_PCLK)>;
142 };
143
144 fpioa_spi0: spi0 {
145 pinmux = <K210_FPIOA(36, K210_PCF_GPIOHS20)>, /* cs */
146 <K210_FPIOA(37, K210_PCF_GPIOHS21)>, /* rst */
147 <K210_FPIOA(38, K210_PCF_GPIOHS22)>, /* dc */
148 <K210_FPIOA(39, K210_PCF_SPI0_SCLK)>; /* wr */
149 };
150
151 fpioa_spi1: spi1 {
152 pinmux = <K210_FPIOA(26, K210_PCF_SPI1_D1)>,
153 <K210_FPIOA(27, K210_PCF_SPI1_SCLK)>,
154 <K210_FPIOA(28, K210_PCF_SPI1_D0)>,
155 <K210_FPIOA(29, K210_PCF_GPIOHS13)>;
156 };
157};
158
159&dvp0 {
160 pinctrl-0 = <&fpioa_dvp>;
161 pinctrl-names = "default";
Sean Andersonbba86182020-06-24 06:41:23 -0400162};