162363a8eSDamien Le Moal// SPDX-License-Identifier: GPL-2.0+ 262363a8eSDamien Le Moal/* 362363a8eSDamien Le Moal * Copyright (C) 2019-20 Sean Anderson <seanga2@gmail.com> 462363a8eSDamien Le Moal * Copyright (C) 2020 Western Digital Corporation or its affiliates. 562363a8eSDamien Le Moal */ 662363a8eSDamien Le Moal 762363a8eSDamien Le Moal/dts-v1/; 862363a8eSDamien Le Moal 962363a8eSDamien Le Moal#include "k210.dtsi" 1062363a8eSDamien Le Moal 1162363a8eSDamien Le Moal#include <dt-bindings/gpio/gpio.h> 1262363a8eSDamien Le Moal#include <dt-bindings/input/input.h> 1362363a8eSDamien Le Moal 1462363a8eSDamien Le Moal/ { 1562363a8eSDamien Le Moal model = "Kendryte KD233"; 1662363a8eSDamien Le Moal compatible = "canaan,kendryte-kd233", "canaan,kendryte-k210"; 1762363a8eSDamien Le Moal 189235784cSGeert Uytterhoeven aliases { 199235784cSGeert Uytterhoeven serial0 = &uarths0; 209235784cSGeert Uytterhoeven }; 219235784cSGeert Uytterhoeven 2262363a8eSDamien Le Moal chosen { 2362363a8eSDamien Le Moal bootargs = "earlycon console=ttySIF0"; 2462363a8eSDamien Le Moal stdout-path = "serial0:115200n8"; 2562363a8eSDamien Le Moal }; 2662363a8eSDamien Le Moal 2762363a8eSDamien Le Moal gpio-leds { 2862363a8eSDamien Le Moal compatible = "gpio-leds"; 2962363a8eSDamien Le Moal 3062363a8eSDamien Le Moal led0 { 3162363a8eSDamien Le Moal gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; 3262363a8eSDamien Le Moal }; 3362363a8eSDamien Le Moal 3462363a8eSDamien Le Moal led1 { 3562363a8eSDamien Le Moal gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; 3662363a8eSDamien Le Moal }; 3762363a8eSDamien Le Moal }; 3862363a8eSDamien Le Moal 3962363a8eSDamien Le Moal gpio-keys { 4062363a8eSDamien Le Moal compatible = "gpio-keys"; 4162363a8eSDamien Le Moal 4289551fddSKrzysztof Kozlowski key { 4362363a8eSDamien Le Moal label = "KEY0"; 4462363a8eSDamien Le Moal linux,code = <BTN_0>; 4562363a8eSDamien Le Moal gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; 4662363a8eSDamien Le Moal }; 4762363a8eSDamien Le Moal }; 4862363a8eSDamien Le Moal}; 4962363a8eSDamien Le Moal 5062363a8eSDamien Le Moal&fpioa { 5162363a8eSDamien Le Moal pinctrl-0 = <&jtag_pinctrl>; 5262363a8eSDamien Le Moal pinctrl-names = "default"; 5362363a8eSDamien Le Moal 5462363a8eSDamien Le Moal jtag_pinctrl: jtag-pinmux { 5562363a8eSDamien Le Moal pinmux = <K210_FPIOA(0, K210_PCF_JTAG_TCLK)>, 5662363a8eSDamien Le Moal <K210_FPIOA(1, K210_PCF_JTAG_TDI)>, 5762363a8eSDamien Le Moal <K210_FPIOA(2, K210_PCF_JTAG_TMS)>, 5862363a8eSDamien Le Moal <K210_FPIOA(3, K210_PCF_JTAG_TDO)>; 5962363a8eSDamien Le Moal }; 6062363a8eSDamien Le Moal 6162363a8eSDamien Le Moal uarths_pinctrl: uarths-pinmux { 6262363a8eSDamien Le Moal pinmux = <K210_FPIOA(4, K210_PCF_UARTHS_RX)>, 6362363a8eSDamien Le Moal <K210_FPIOA(5, K210_PCF_UARTHS_TX)>; 6462363a8eSDamien Le Moal }; 6562363a8eSDamien Le Moal 6662363a8eSDamien Le Moal spi0_pinctrl: spi0-pinmux { 6762363a8eSDamien Le Moal pinmux = <K210_FPIOA(6, K210_PCF_GPIOHS20)>, /* cs */ 6862363a8eSDamien Le Moal <K210_FPIOA(7, K210_PCF_SPI0_SCLK)>, /* wr */ 6962363a8eSDamien Le Moal <K210_FPIOA(8, K210_PCF_GPIOHS21)>; /* dc */ 7062363a8eSDamien Le Moal }; 7162363a8eSDamien Le Moal 7262363a8eSDamien Le Moal dvp_pinctrl: dvp-pinmux { 7362363a8eSDamien Le Moal pinmux = <K210_FPIOA(9, K210_PCF_SCCB_SCLK)>, 7462363a8eSDamien Le Moal <K210_FPIOA(10, K210_PCF_SCCB_SDA)>, 7562363a8eSDamien Le Moal <K210_FPIOA(11, K210_PCF_DVP_RST)>, 7662363a8eSDamien Le Moal <K210_FPIOA(12, K210_PCF_DVP_VSYNC)>, 7762363a8eSDamien Le Moal <K210_FPIOA(13, K210_PCF_DVP_PWDN)>, 7862363a8eSDamien Le Moal <K210_FPIOA(14, K210_PCF_DVP_XCLK)>, 7962363a8eSDamien Le Moal <K210_FPIOA(15, K210_PCF_DVP_PCLK)>, 8062363a8eSDamien Le Moal <K210_FPIOA(17, K210_PCF_DVP_HSYNC)>; 8162363a8eSDamien Le Moal }; 8262363a8eSDamien Le Moal 8362363a8eSDamien Le Moal gpiohs_pinctrl: gpiohs-pinmux { 8462363a8eSDamien Le Moal pinmux = <K210_FPIOA(16, K210_PCF_GPIOHS0)>, 8562363a8eSDamien Le Moal <K210_FPIOA(20, K210_PCF_GPIOHS4)>, /* Rot. dip sw line 8 */ 8662363a8eSDamien Le Moal <K210_FPIOA(21, K210_PCF_GPIOHS5)>, /* Rot. dip sw line 4 */ 8762363a8eSDamien Le Moal <K210_FPIOA(22, K210_PCF_GPIOHS6)>, /* Rot. dip sw line 2 */ 8862363a8eSDamien Le Moal <K210_FPIOA(23, K210_PCF_GPIOHS7)>, /* Rot. dip sw line 1 */ 8962363a8eSDamien Le Moal <K210_FPIOA(24, K210_PCF_GPIOHS8)>, 9062363a8eSDamien Le Moal <K210_FPIOA(25, K210_PCF_GPIOHS9)>, 9162363a8eSDamien Le Moal <K210_FPIOA(26, K210_PCF_GPIOHS10)>; 9262363a8eSDamien Le Moal }; 9362363a8eSDamien Le Moal 9462363a8eSDamien Le Moal spi1_pinctrl: spi1-pinmux { 9562363a8eSDamien Le Moal pinmux = <K210_FPIOA(29, K210_PCF_SPI1_SCLK)>, 9662363a8eSDamien Le Moal <K210_FPIOA(30, K210_PCF_SPI1_D0)>, 9762363a8eSDamien Le Moal <K210_FPIOA(31, K210_PCF_SPI1_D1)>, 9862363a8eSDamien Le Moal <K210_FPIOA(32, K210_PCF_GPIOHS16)>; /* cs */ 9962363a8eSDamien Le Moal }; 10062363a8eSDamien Le Moal 10162363a8eSDamien Le Moal i2s0_pinctrl: i2s0-pinmux { 10262363a8eSDamien Le Moal pinmux = <K210_FPIOA(33, K210_PCF_I2S0_IN_D0)>, 10362363a8eSDamien Le Moal <K210_FPIOA(34, K210_PCF_I2S0_WS)>, 10462363a8eSDamien Le Moal <K210_FPIOA(35, K210_PCF_I2S0_SCLK)>; 10562363a8eSDamien Le Moal }; 10662363a8eSDamien Le Moal}; 10762363a8eSDamien Le Moal 10862363a8eSDamien Le Moal&uarths0 { 10962363a8eSDamien Le Moal pinctrl-0 = <&uarths_pinctrl>; 11062363a8eSDamien Le Moal pinctrl-names = "default"; 11162363a8eSDamien Le Moal status = "okay"; 11262363a8eSDamien Le Moal}; 11362363a8eSDamien Le Moal 11462363a8eSDamien Le Moal&gpio0 { 11562363a8eSDamien Le Moal pinctrl-0 = <&gpiohs_pinctrl>; 11662363a8eSDamien Le Moal pinctrl-names = "default"; 11762363a8eSDamien Le Moal status = "okay"; 11862363a8eSDamien Le Moal}; 11962363a8eSDamien Le Moal 12062363a8eSDamien Le Moal&i2s0 { 12162363a8eSDamien Le Moal #sound-dai-cells = <1>; 12262363a8eSDamien Le Moal pinctrl-0 = <&i2s0_pinctrl>; 12362363a8eSDamien Le Moal pinctrl-names = "default"; 124*2c917b55SGeert Uytterhoeven status = "okay"; 12562363a8eSDamien Le Moal}; 12662363a8eSDamien Le Moal 12762363a8eSDamien Le Moal&spi0 { 12862363a8eSDamien Le Moal pinctrl-0 = <&spi0_pinctrl>; 12962363a8eSDamien Le Moal pinctrl-names = "default"; 13062363a8eSDamien Le Moal num-cs = <1>; 13162363a8eSDamien Le Moal cs-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>; 132*2c917b55SGeert Uytterhoeven status = "okay"; 13362363a8eSDamien Le Moal 13462363a8eSDamien Le Moal panel@0 { 1356990ea21SConor Dooley compatible = "canaan,kd233-tft", "ilitek,ili9341"; 13662363a8eSDamien Le Moal reg = <0>; 13762363a8eSDamien Le Moal dc-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>; 1383bd204cbSConor Dooley spi-max-frequency = <10000000>; 13962363a8eSDamien Le Moal status = "disabled"; 14062363a8eSDamien Le Moal }; 14162363a8eSDamien Le Moal}; 14262363a8eSDamien Le Moal 14362363a8eSDamien Le Moal&spi1 { 14462363a8eSDamien Le Moal pinctrl-0 = <&spi1_pinctrl>; 14562363a8eSDamien Le Moal pinctrl-names = "default"; 14662363a8eSDamien Le Moal num-cs = <1>; 14762363a8eSDamien Le Moal cs-gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; 14862363a8eSDamien Le Moal status = "okay"; 14962363a8eSDamien Le Moal 1505f4c5824SConor Dooley mmc@0 { 15162363a8eSDamien Le Moal compatible = "mmc-spi-slot"; 15262363a8eSDamien Le Moal reg = <0>; 15362363a8eSDamien Le Moal voltage-ranges = <3300 3300>; 15462363a8eSDamien Le Moal spi-max-frequency = <25000000>; 15562363a8eSDamien Le Moal broken-cd; 15662363a8eSDamien Le Moal }; 15762363a8eSDamien Le Moal}; 158