Linux Audio

Check our new training course

Loading...
v6.13.7
  1// SPDX-License-Identifier: GPL-2.0+
  2/*
  3 * Copyright (C) 2019-20 Sean Anderson <seanga2@gmail.com>
  4 * Copyright (C) 2020 Western Digital Corporation or its affiliates.
  5 */
  6
  7/dts-v1/;
  8
  9#include "k210.dtsi"
 10
 11#include <dt-bindings/gpio/gpio.h>
 12#include <dt-bindings/input/input.h>
 13
 14/ {
 15	model = "SiPeed MAIXDUINO";
 16	compatible = "sipeed,maixduino", "canaan,kendryte-k210";
 17
 18	aliases {
 19		serial0 = &uarths0;
 20	};
 21
 22	chosen {
 23		bootargs = "earlycon console=ttySIF0";
 24		stdout-path = "serial0:115200n8";
 25	};
 26
 27	gpio-keys {
 28		compatible = "gpio-keys";
 29
 30		key-boot {
 31			label = "BOOT";
 32			linux,code = <BTN_0>;
 33			gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
 34		};
 35	};
 36
 37	vcc_3v3: regulator-3v3 {
 38		compatible = "regulator-fixed";
 39		regulator-name = "3v3";
 40		regulator-min-microvolt = <3300000>;
 41		regulator-max-microvolt = <3300000>;
 42	};
 43};
 44
 45&fpioa {
 
 
 46	uarths_pinctrl: uarths-pinmux {
 47		pinmux = <K210_FPIOA(4, K210_PCF_UARTHS_RX)>, /* Header "0" */
 48			 <K210_FPIOA(5, K210_PCF_UARTHS_TX)>; /* Header "1" */
 49	};
 50
 51	gpio_pinctrl: gpio-pinmux {
 52		pinmux = <K210_FPIOA(8, K210_PCF_GPIO0)>,
 53			 <K210_FPIOA(9, K210_PCF_GPIO1)>;
 54	};
 55
 56	gpiohs_pinctrl: gpiohs-pinmux {
 57		pinmux = <K210_FPIOA(16, K210_PCF_GPIOHS0)>,  /* BOOT */
 58			 <K210_FPIOA(21, K210_PCF_GPIOHS2)>,  /* Header "2" */
 59			 <K210_FPIOA(22, K210_PCF_GPIOHS3)>,  /* Header "3" */
 60			 <K210_FPIOA(23, K210_PCF_GPIOHS4)>,  /* Header "4" */
 61			 <K210_FPIOA(24, K210_PCF_GPIOHS5)>,  /* Header "5" */
 62			 <K210_FPIOA(32, K210_PCF_GPIOHS6)>,  /* Header "6" */
 63			 <K210_FPIOA(15, K210_PCF_GPIOHS7)>,  /* Header "7" */
 64			 <K210_FPIOA(14, K210_PCF_GPIOHS8)>,  /* Header "8" */
 65			 <K210_FPIOA(13, K210_PCF_GPIOHS9)>,  /* Header "9" */
 66			 <K210_FPIOA(12, K210_PCF_GPIOHS10)>, /* Header "10" */
 67			 <K210_FPIOA(11, K210_PCF_GPIOHS11)>, /* Header "11" */
 68			 <K210_FPIOA(10, K210_PCF_GPIOHS12)>, /* Header "12" */
 69			 <K210_FPIOA(3,  K210_PCF_GPIOHS13)>; /* Header "13" */
 70	};
 71
 72	i2s0_pinctrl: i2s0-pinmux {
 73		pinmux = <K210_FPIOA(18, K210_PCF_I2S0_SCLK)>,
 74			 <K210_FPIOA(19, K210_PCF_I2S0_WS)>,
 75			 <K210_FPIOA(20, K210_PCF_I2S0_IN_D0)>;
 76	};
 77
 78	spi1_pinctrl: spi1-pinmux {
 79		pinmux = <K210_FPIOA(26, K210_PCF_SPI1_D1)>,
 80			 <K210_FPIOA(27, K210_PCF_SPI1_SCLK)>,
 81			 <K210_FPIOA(28, K210_PCF_SPI1_D0)>,
 82			 <K210_FPIOA(29, K210_PCF_GPIO2)>; /* cs */
 83	};
 84
 85	i2c1_pinctrl: i2c1-pinmux {
 86		pinmux = <K210_FPIOA(30, K210_PCF_I2C1_SCLK)>, /* Header "scl" */
 87			 <K210_FPIOA(31, K210_PCF_I2C1_SDA)>;  /* Header "sda" */
 88	};
 89
 90	i2s1_pinctrl: i2s1-pinmux {
 91		pinmux = <K210_FPIOA(33, K210_PCF_I2S1_WS)>,
 92			 <K210_FPIOA(34, K210_PCF_I2S1_IN_D0)>,
 93			 <K210_FPIOA(35, K210_PCF_I2S1_SCLK)>;
 94	};
 95
 96	spi0_pinctrl: spi0-pinmux {
 97		pinmux = <K210_FPIOA(36, K210_PCF_GPIOHS20)>,  /* cs */
 98			 <K210_FPIOA(37, K210_PCF_GPIOHS21)>,  /* rst */
 99			 <K210_FPIOA(38, K210_PCF_GPIOHS22)>,  /* dc */
100			 <K210_FPIOA(39, K210_PCF_SPI0_SCLK)>; /* wr */
101	};
102
103	dvp_pinctrl: dvp-pinmux {
104		pinmux = <K210_FPIOA(40, K210_PCF_SCCB_SDA)>,
105			 <K210_FPIOA(41, K210_PCF_SCCB_SCLK)>,
106			 <K210_FPIOA(42, K210_PCF_DVP_RST)>,
107			 <K210_FPIOA(43, K210_PCF_DVP_VSYNC)>,
108			 <K210_FPIOA(44, K210_PCF_DVP_PWDN)>,
109			 <K210_FPIOA(45, K210_PCF_DVP_HSYNC)>,
110			 <K210_FPIOA(46, K210_PCF_DVP_XCLK)>,
111			 <K210_FPIOA(47, K210_PCF_DVP_PCLK)>;
112	};
113};
114
115&uarths0 {
116	pinctrl-0 = <&uarths_pinctrl>;
117	pinctrl-names = "default";
118	status = "okay";
119};
120
121&gpio0 {
122	pinctrl-0 = <&gpiohs_pinctrl>;
123	pinctrl-names = "default";
124	status = "okay";
125};
126
127&gpio1 {
128	pinctrl-0 = <&gpio_pinctrl>;
129	pinctrl-names = "default";
130	status = "okay";
131};
132
133&i2s0 {
134	#sound-dai-cells = <1>;
135	pinctrl-0 = <&i2s0_pinctrl>;
136	pinctrl-names = "default";
137	status = "okay";
138};
139
140&i2c1 {
141	pinctrl-0 = <&i2c1_pinctrl>;
142	pinctrl-names = "default";
143	clock-frequency = <400000>;
144	status = "okay";
145};
146
147&spi0 {
148	pinctrl-0 = <&spi0_pinctrl>;
149	pinctrl-names = "default";
150	num-cs = <1>;
151	cs-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
152	status = "okay";
153
154	panel@0 {
155		compatible = "sitronix,st7789v";
156		reg = <0>;
157		reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
158		dc-gpios = <&gpio0 22 0>;
159		spi-max-frequency = <15000000>;
160		power-supply = <&vcc_3v3>;
161	};
162};
163
164&spi1 {
165	pinctrl-0 = <&spi1_pinctrl>;
166	pinctrl-names = "default";
167	num-cs = <1>;
168	cs-gpios = <&gpio1_0 2 GPIO_ACTIVE_LOW>;
169	status = "okay";
170
171	mmc@0 {
172		compatible = "mmc-spi-slot";
173		reg = <0>;
174		voltage-ranges = <3300 3300>;
175		spi-max-frequency = <25000000>;
176		broken-cd;
177	};
178};
179
180&spi3 {
181	status = "okay";
182
183	flash@0 {
184		compatible = "jedec,spi-nor";
185		reg = <0>;
186		spi-max-frequency = <50000000>;
187		spi-tx-bus-width = <4>;
188		spi-rx-bus-width = <4>;
189		m25p,fast-read;
190		broken-flash-reset;
191	};
192};
v6.2
  1// SPDX-License-Identifier: GPL-2.0+
  2/*
  3 * Copyright (C) 2019-20 Sean Anderson <seanga2@gmail.com>
  4 * Copyright (C) 2020 Western Digital Corporation or its affiliates.
  5 */
  6
  7/dts-v1/;
  8
  9#include "k210.dtsi"
 10
 11#include <dt-bindings/gpio/gpio.h>
 12#include <dt-bindings/input/input.h>
 13
 14/ {
 15	model = "SiPeed MAIXDUINO";
 16	compatible = "sipeed,maixduino", "canaan,kendryte-k210";
 17
 
 
 
 
 18	chosen {
 19		bootargs = "earlycon console=ttySIF0";
 20		stdout-path = "serial0:115200n8";
 21	};
 22
 23	gpio-keys {
 24		compatible = "gpio-keys";
 25
 26		key-boot {
 27			label = "BOOT";
 28			linux,code = <BTN_0>;
 29			gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
 30		};
 31	};
 32
 33	vcc_3v3: regulator-3v3 {
 34		compatible = "regulator-fixed";
 35		regulator-name = "3v3";
 36		regulator-min-microvolt = <3300000>;
 37		regulator-max-microvolt = <3300000>;
 38	};
 39};
 40
 41&fpioa {
 42	status = "okay";
 43
 44	uarths_pinctrl: uarths-pinmux {
 45		pinmux = <K210_FPIOA(4, K210_PCF_UARTHS_RX)>, /* Header "0" */
 46			 <K210_FPIOA(5, K210_PCF_UARTHS_TX)>; /* Header "1" */
 47	};
 48
 49	gpio_pinctrl: gpio-pinmux {
 50		pinmux = <K210_FPIOA(8, K210_PCF_GPIO0)>,
 51			 <K210_FPIOA(9, K210_PCF_GPIO1)>;
 52	};
 53
 54	gpiohs_pinctrl: gpiohs-pinmux {
 55		pinmux = <K210_FPIOA(16, K210_PCF_GPIOHS0)>,  /* BOOT */
 56			 <K210_FPIOA(21, K210_PCF_GPIOHS2)>,  /* Header "2" */
 57			 <K210_FPIOA(22, K210_PCF_GPIOHS3)>,  /* Header "3" */
 58			 <K210_FPIOA(23, K210_PCF_GPIOHS4)>,  /* Header "4" */
 59			 <K210_FPIOA(24, K210_PCF_GPIOHS5)>,  /* Header "5" */
 60			 <K210_FPIOA(32, K210_PCF_GPIOHS6)>,  /* Header "6" */
 61			 <K210_FPIOA(15, K210_PCF_GPIOHS7)>,  /* Header "7" */
 62			 <K210_FPIOA(14, K210_PCF_GPIOHS8)>,  /* Header "8" */
 63			 <K210_FPIOA(13, K210_PCF_GPIOHS9)>,  /* Header "9" */
 64			 <K210_FPIOA(12, K210_PCF_GPIOHS10)>, /* Header "10" */
 65			 <K210_FPIOA(11, K210_PCF_GPIOHS11)>, /* Header "11" */
 66			 <K210_FPIOA(10, K210_PCF_GPIOHS12)>, /* Header "12" */
 67			 <K210_FPIOA(3,  K210_PCF_GPIOHS13)>; /* Header "13" */
 68	};
 69
 70	i2s0_pinctrl: i2s0-pinmux {
 71		pinmux = <K210_FPIOA(18, K210_PCF_I2S0_SCLK)>,
 72			 <K210_FPIOA(19, K210_PCF_I2S0_WS)>,
 73			 <K210_FPIOA(20, K210_PCF_I2S0_IN_D0)>;
 74	};
 75
 76	spi1_pinctrl: spi1-pinmux {
 77		pinmux = <K210_FPIOA(26, K210_PCF_SPI1_D1)>,
 78			 <K210_FPIOA(27, K210_PCF_SPI1_SCLK)>,
 79			 <K210_FPIOA(28, K210_PCF_SPI1_D0)>,
 80			 <K210_FPIOA(29, K210_PCF_GPIO2)>; /* cs */
 81	};
 82
 83	i2c1_pinctrl: i2c1-pinmux {
 84		pinmux = <K210_FPIOA(30, K210_PCF_I2C1_SCLK)>, /* Header "scl" */
 85			 <K210_FPIOA(31, K210_PCF_I2C1_SDA)>;  /* Header "sda" */
 86	};
 87
 88	i2s1_pinctrl: i2s1-pinmux {
 89		pinmux = <K210_FPIOA(33, K210_PCF_I2S1_WS)>,
 90			 <K210_FPIOA(34, K210_PCF_I2S1_IN_D0)>,
 91			 <K210_FPIOA(35, K210_PCF_I2S1_SCLK)>;
 92	};
 93
 94	spi0_pinctrl: spi0-pinmux {
 95		pinmux = <K210_FPIOA(36, K210_PCF_GPIOHS20)>,  /* cs */
 96			 <K210_FPIOA(37, K210_PCF_GPIOHS21)>,  /* rst */
 97			 <K210_FPIOA(38, K210_PCF_GPIOHS22)>,  /* dc */
 98			 <K210_FPIOA(39, K210_PCF_SPI0_SCLK)>; /* wr */
 99	};
100
101	dvp_pinctrl: dvp-pinmux {
102		pinmux = <K210_FPIOA(40, K210_PCF_SCCB_SDA)>,
103			 <K210_FPIOA(41, K210_PCF_SCCB_SCLK)>,
104			 <K210_FPIOA(42, K210_PCF_DVP_RST)>,
105			 <K210_FPIOA(43, K210_PCF_DVP_VSYNC)>,
106			 <K210_FPIOA(44, K210_PCF_DVP_PWDN)>,
107			 <K210_FPIOA(45, K210_PCF_DVP_HSYNC)>,
108			 <K210_FPIOA(46, K210_PCF_DVP_XCLK)>,
109			 <K210_FPIOA(47, K210_PCF_DVP_PCLK)>;
110	};
111};
112
113&uarths0 {
114	pinctrl-0 = <&uarths_pinctrl>;
115	pinctrl-names = "default";
116	status = "okay";
117};
118
119&gpio0 {
120	pinctrl-0 = <&gpiohs_pinctrl>;
121	pinctrl-names = "default";
122	status = "okay";
123};
124
125&gpio1 {
126	pinctrl-0 = <&gpio_pinctrl>;
127	pinctrl-names = "default";
128	status = "okay";
129};
130
131&i2s0 {
132	#sound-dai-cells = <1>;
133	pinctrl-0 = <&i2s0_pinctrl>;
134	pinctrl-names = "default";
 
135};
136
137&i2c1 {
138	pinctrl-0 = <&i2c1_pinctrl>;
139	pinctrl-names = "default";
140	clock-frequency = <400000>;
141	status = "okay";
142};
143
144&spi0 {
145	pinctrl-0 = <&spi0_pinctrl>;
146	pinctrl-names = "default";
147	num-cs = <1>;
148	cs-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
 
149
150	panel@0 {
151		compatible = "sitronix,st7789v";
152		reg = <0>;
153		reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
154		dc-gpios = <&gpio0 22 0>;
155		spi-max-frequency = <15000000>;
156		power-supply = <&vcc_3v3>;
157	};
158};
159
160&spi1 {
161	pinctrl-0 = <&spi1_pinctrl>;
162	pinctrl-names = "default";
163	num-cs = <1>;
164	cs-gpios = <&gpio1_0 2 GPIO_ACTIVE_LOW>;
165	status = "okay";
166
167	mmc@0 {
168		compatible = "mmc-spi-slot";
169		reg = <0>;
170		voltage-ranges = <3300 3300>;
171		spi-max-frequency = <25000000>;
172		broken-cd;
173	};
174};
175
176&spi3 {
 
 
177	flash@0 {
178		compatible = "jedec,spi-nor";
179		reg = <0>;
180		spi-max-frequency = <50000000>;
181		spi-tx-bus-width = <4>;
182		spi-rx-bus-width = <4>;
183		m25p,fast-read;
184		broken-flash-reset;
185	};
186};