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