197c279bcSDamien Le Moal// SPDX-License-Identifier: GPL-2.0+ 297c279bcSDamien Le Moal/* 397c279bcSDamien Le Moal * Copyright (C) 2019-20 Sean Anderson <seanga2@gmail.com> 497c279bcSDamien Le Moal * Copyright (C) 2020 Western Digital Corporation or its affiliates. 597c279bcSDamien Le Moal */ 697c279bcSDamien Le Moal 797c279bcSDamien Le Moal/dts-v1/; 897c279bcSDamien Le Moal 997c279bcSDamien Le Moal#include "k210.dtsi" 1097c279bcSDamien Le Moal 1197c279bcSDamien Le Moal#include <dt-bindings/gpio/gpio.h> 1297c279bcSDamien Le Moal#include <dt-bindings/input/input.h> 1397c279bcSDamien Le Moal#include <dt-bindings/leds/common.h> 1497c279bcSDamien Le Moal 1597c279bcSDamien Le Moal/ { 1697c279bcSDamien Le Moal model = "SiPeed MAIX BiT"; 1797c279bcSDamien Le Moal compatible = "sipeed,maix-bit", "sipeed,maix-bitm", 1897c279bcSDamien Le Moal "canaan,kendryte-k210"; 1997c279bcSDamien Le Moal 2097c279bcSDamien Le Moal chosen { 2197c279bcSDamien Le Moal bootargs = "earlycon console=ttySIF0"; 2297c279bcSDamien Le Moal stdout-path = "serial0:115200n8"; 2397c279bcSDamien Le Moal }; 2497c279bcSDamien Le Moal 2597c279bcSDamien Le Moal gpio-leds { 2697c279bcSDamien Le Moal compatible = "gpio-leds"; 2797c279bcSDamien Le Moal 2897c279bcSDamien Le Moal led0 { 2997c279bcSDamien Le Moal color = <LED_COLOR_ID_GREEN>; 3097c279bcSDamien Le Moal label = "green"; 3197c279bcSDamien Le Moal gpios = <&gpio1_0 4 GPIO_ACTIVE_LOW>; 3297c279bcSDamien Le Moal }; 3397c279bcSDamien Le Moal 3497c279bcSDamien Le Moal led1 { 3597c279bcSDamien Le Moal color = <LED_COLOR_ID_RED>; 3697c279bcSDamien Le Moal label = "red"; 3797c279bcSDamien Le Moal gpios = <&gpio1_0 5 GPIO_ACTIVE_LOW>; 3897c279bcSDamien Le Moal }; 3997c279bcSDamien Le Moal 4097c279bcSDamien Le Moal led2 { 4197c279bcSDamien Le Moal color = <LED_COLOR_ID_BLUE>; 4297c279bcSDamien Le Moal label = "blue"; 4397c279bcSDamien Le Moal gpios = <&gpio1_0 6 GPIO_ACTIVE_LOW>; 4497c279bcSDamien Le Moal }; 4597c279bcSDamien Le Moal }; 4697c279bcSDamien Le Moal 4797c279bcSDamien Le Moal gpio-keys { 4897c279bcSDamien Le Moal compatible = "gpio-keys"; 4997c279bcSDamien Le Moal 5089551fddSKrzysztof Kozlowski key-boot { 5197c279bcSDamien Le Moal label = "BOOT"; 5297c279bcSDamien Le Moal linux,code = <BTN_0>; 5397c279bcSDamien Le Moal gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; 5497c279bcSDamien Le Moal }; 5597c279bcSDamien Le Moal }; 5697c279bcSDamien Le Moal}; 5797c279bcSDamien Le Moal 5897c279bcSDamien Le Moal&fpioa { 5997c279bcSDamien Le Moal pinctrl-names = "default"; 6097c279bcSDamien Le Moal pinctrl-0 = <&jtag_pinctrl>; 6197c279bcSDamien Le Moal status = "okay"; 6297c279bcSDamien Le Moal 6397c279bcSDamien Le Moal jtag_pinctrl: jtag-pinmux { 6497c279bcSDamien Le Moal pinmux = <K210_FPIOA(0, K210_PCF_JTAG_TCLK)>, 6597c279bcSDamien Le Moal <K210_FPIOA(1, K210_PCF_JTAG_TDI)>, 6697c279bcSDamien Le Moal <K210_FPIOA(2, K210_PCF_JTAG_TMS)>, 6797c279bcSDamien Le Moal <K210_FPIOA(3, K210_PCF_JTAG_TDO)>; 6897c279bcSDamien Le Moal }; 6997c279bcSDamien Le Moal 7097c279bcSDamien Le Moal uarths_pinctrl: uarths-pinmux { 7197c279bcSDamien Le Moal pinmux = <K210_FPIOA(4, K210_PCF_UARTHS_RX)>, 7297c279bcSDamien Le Moal <K210_FPIOA(5, K210_PCF_UARTHS_TX)>; 7397c279bcSDamien Le Moal }; 7497c279bcSDamien Le Moal 7597c279bcSDamien Le Moal gpio_pinctrl: gpio-pinmux { 7697c279bcSDamien Le Moal pinmux = <K210_FPIOA(8, K210_PCF_GPIO0)>, 7797c279bcSDamien Le Moal <K210_FPIOA(9, K210_PCF_GPIO1)>, 7897c279bcSDamien Le Moal <K210_FPIOA(10, K210_PCF_GPIO2)>, 7997c279bcSDamien Le Moal <K210_FPIOA(11, K210_PCF_GPIO3)>, 8097c279bcSDamien Le Moal <K210_FPIOA(12, K210_PCF_GPIO4)>, 8197c279bcSDamien Le Moal <K210_FPIOA(13, K210_PCF_GPIO5)>, 8297c279bcSDamien Le Moal <K210_FPIOA(14, K210_PCF_GPIO6)>, 8397c279bcSDamien Le Moal <K210_FPIOA(15, K210_PCF_GPIO7)>; 8497c279bcSDamien Le Moal }; 8597c279bcSDamien Le Moal 8697c279bcSDamien Le Moal gpiohs_pinctrl: gpiohs-pinmux { 8797c279bcSDamien Le Moal pinmux = <K210_FPIOA(16, K210_PCF_GPIOHS0)>, 8897c279bcSDamien Le Moal <K210_FPIOA(17, K210_PCF_GPIOHS1)>, 8997c279bcSDamien Le Moal <K210_FPIOA(21, K210_PCF_GPIOHS5)>, 9097c279bcSDamien Le Moal <K210_FPIOA(22, K210_PCF_GPIOHS6)>, 9197c279bcSDamien Le Moal <K210_FPIOA(23, K210_PCF_GPIOHS7)>, 9297c279bcSDamien Le Moal <K210_FPIOA(24, K210_PCF_GPIOHS8)>, 9397c279bcSDamien Le Moal <K210_FPIOA(25, K210_PCF_GPIOHS9)>, 9497c279bcSDamien Le Moal <K210_FPIOA(32, K210_PCF_GPIOHS16)>, 9597c279bcSDamien Le Moal <K210_FPIOA(33, K210_PCF_GPIOHS17)>, 9697c279bcSDamien Le Moal <K210_FPIOA(34, K210_PCF_GPIOHS18)>, 9797c279bcSDamien Le Moal <K210_FPIOA(35, K210_PCF_GPIOHS19)>; 9897c279bcSDamien Le Moal }; 9997c279bcSDamien Le Moal 10097c279bcSDamien Le Moal i2s0_pinctrl: i2s0-pinmux { 10197c279bcSDamien Le Moal pinmux = <K210_FPIOA(18, K210_PCF_I2S0_SCLK)>, 10297c279bcSDamien Le Moal <K210_FPIOA(19, K210_PCF_I2S0_WS)>, 10397c279bcSDamien Le Moal <K210_FPIOA(20, K210_PCF_I2S0_IN_D0)>; 10497c279bcSDamien Le Moal }; 10597c279bcSDamien Le Moal 10697c279bcSDamien Le Moal dvp_pinctrl: dvp-pinmux { 10797c279bcSDamien Le Moal pinmux = <K210_FPIOA(40, K210_PCF_SCCB_SDA)>, 10897c279bcSDamien Le Moal <K210_FPIOA(41, K210_PCF_SCCB_SCLK)>, 10997c279bcSDamien Le Moal <K210_FPIOA(42, K210_PCF_DVP_RST)>, 11097c279bcSDamien Le Moal <K210_FPIOA(43, K210_PCF_DVP_VSYNC)>, 11197c279bcSDamien Le Moal <K210_FPIOA(44, K210_PCF_DVP_PWDN)>, 11297c279bcSDamien Le Moal <K210_FPIOA(45, K210_PCF_DVP_HSYNC)>, 11397c279bcSDamien Le Moal <K210_FPIOA(46, K210_PCF_DVP_XCLK)>, 11497c279bcSDamien Le Moal <K210_FPIOA(47, K210_PCF_DVP_PCLK)>; 11597c279bcSDamien Le Moal }; 11697c279bcSDamien Le Moal 11797c279bcSDamien Le Moal spi0_pinctrl: spi0-pinmux { 11897c279bcSDamien Le Moal pinmux = <K210_FPIOA(36, K210_PCF_GPIOHS20)>, /* cs */ 11997c279bcSDamien Le Moal <K210_FPIOA(37, K210_PCF_GPIOHS21)>, /* rst */ 12097c279bcSDamien Le Moal <K210_FPIOA(38, K210_PCF_GPIOHS22)>, /* dc */ 12197c279bcSDamien Le Moal <K210_FPIOA(39, K210_PCF_SPI0_SCLK)>; /* wr */ 12297c279bcSDamien Le Moal }; 12397c279bcSDamien Le Moal 12497c279bcSDamien Le Moal spi1_pinctrl: spi1-pinmux { 12597c279bcSDamien Le Moal pinmux = <K210_FPIOA(26, K210_PCF_SPI1_D1)>, 12697c279bcSDamien Le Moal <K210_FPIOA(27, K210_PCF_SPI1_SCLK)>, 12797c279bcSDamien Le Moal <K210_FPIOA(28, K210_PCF_SPI1_D0)>, 12897c279bcSDamien Le Moal <K210_FPIOA(29, K210_PCF_GPIOHS13)>; /* cs */ 12997c279bcSDamien Le Moal }; 13097c279bcSDamien Le Moal 13197c279bcSDamien Le Moal i2c1_pinctrl: i2c1-pinmux { 13297c279bcSDamien Le Moal pinmux = <K210_FPIOA(30, K210_PCF_I2C1_SCLK)>, 13397c279bcSDamien Le Moal <K210_FPIOA(31, K210_PCF_I2C1_SDA)>; 13497c279bcSDamien Le Moal }; 13597c279bcSDamien Le Moal}; 13697c279bcSDamien Le Moal 13797c279bcSDamien Le Moal&uarths0 { 13897c279bcSDamien Le Moal pinctrl-0 = <&uarths_pinctrl>; 13997c279bcSDamien Le Moal pinctrl-names = "default"; 14097c279bcSDamien Le Moal status = "okay"; 14197c279bcSDamien Le Moal}; 14297c279bcSDamien Le Moal 14397c279bcSDamien Le Moal&gpio0 { 14497c279bcSDamien Le Moal pinctrl-0 = <&gpiohs_pinctrl>; 14597c279bcSDamien Le Moal pinctrl-names = "default"; 14697c279bcSDamien Le Moal status = "okay"; 14797c279bcSDamien Le Moal}; 14897c279bcSDamien Le Moal 14997c279bcSDamien Le Moal&gpio1 { 15097c279bcSDamien Le Moal pinctrl-0 = <&gpio_pinctrl>; 15197c279bcSDamien Le Moal pinctrl-names = "default"; 15297c279bcSDamien Le Moal status = "okay"; 15397c279bcSDamien Le Moal}; 15497c279bcSDamien Le Moal 15597c279bcSDamien Le Moal&i2s0 { 15697c279bcSDamien Le Moal #sound-dai-cells = <1>; 15797c279bcSDamien Le Moal pinctrl-0 = <&i2s0_pinctrl>; 15897c279bcSDamien Le Moal pinctrl-names = "default"; 15997c279bcSDamien Le Moal}; 16097c279bcSDamien Le Moal 16197c279bcSDamien Le Moal&i2c1 { 16297c279bcSDamien Le Moal pinctrl-0 = <&i2c1_pinctrl>; 16397c279bcSDamien Le Moal pinctrl-names = "default"; 16497c279bcSDamien Le Moal clock-frequency = <400000>; 16597c279bcSDamien Le Moal status = "okay"; 16697c279bcSDamien Le Moal}; 16797c279bcSDamien Le Moal 16897c279bcSDamien Le Moal&spi0 { 16997c279bcSDamien Le Moal pinctrl-0 = <&spi0_pinctrl>; 17097c279bcSDamien Le Moal pinctrl-names = "default"; 17197c279bcSDamien Le Moal num-cs = <1>; 17297c279bcSDamien Le Moal cs-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>; 17397c279bcSDamien Le Moal 17497c279bcSDamien Le Moal panel@0 { 17597c279bcSDamien Le Moal compatible = "sitronix,st7789v"; 17697c279bcSDamien Le Moal reg = <0>; 17797c279bcSDamien Le Moal reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; 17897c279bcSDamien Le Moal dc-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>; 17997c279bcSDamien Le Moal spi-max-frequency = <15000000>; 18097c279bcSDamien Le Moal spi-cs-high; 18197c279bcSDamien Le Moal status = "disabled"; 18297c279bcSDamien Le Moal }; 18397c279bcSDamien Le Moal}; 18497c279bcSDamien Le Moal 18597c279bcSDamien Le Moal&spi1 { 18697c279bcSDamien Le Moal pinctrl-0 = <&spi1_pinctrl>; 18797c279bcSDamien Le Moal pinctrl-names = "default"; 18897c279bcSDamien Le Moal num-cs = <1>; 18997c279bcSDamien Le Moal cs-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; 19097c279bcSDamien Le Moal status = "okay"; 19197c279bcSDamien Le Moal 192*5f4c5824SConor Dooley mmc@0 { 19397c279bcSDamien Le Moal compatible = "mmc-spi-slot"; 19497c279bcSDamien Le Moal reg = <0>; 19597c279bcSDamien Le Moal voltage-ranges = <3300 3300>; 19697c279bcSDamien Le Moal spi-max-frequency = <25000000>; 19797c279bcSDamien Le Moal broken-cd; 19897c279bcSDamien Le Moal }; 19997c279bcSDamien Le Moal}; 20097c279bcSDamien Le Moal 20197c279bcSDamien Le Moal&spi3 { 202fe38b4d6SGeert Uytterhoeven flash@0 { 20397c279bcSDamien Le Moal compatible = "jedec,spi-nor"; 20497c279bcSDamien Le Moal reg = <0>; 20597c279bcSDamien Le Moal spi-max-frequency = <50000000>; 2066846d656SNiklas Cassel spi-tx-bus-width = <4>; 2076846d656SNiklas Cassel spi-rx-bus-width = <4>; 20897c279bcSDamien Le Moal m25p,fast-read; 20997c279bcSDamien Le Moal broken-flash-reset; 21097c279bcSDamien Le Moal }; 21197c279bcSDamien Le Moal}; 212