1 // SPDX-License-Identifier: GPL-2.0+ 1 // SPDX-License-Identifier: GPL-2.0+ 2 /* 2 /* 3 * Copyright (C) 2019-20 Sean Anderson <seanga2 3 * Copyright (C) 2019-20 Sean Anderson <seanga2@gmail.com> 4 * Copyright (C) 2020 Western Digital Corporat 4 * Copyright (C) 2020 Western Digital Corporation or its affiliates. 5 */ 5 */ 6 6 7 /dts-v1/; 7 /dts-v1/; 8 8 9 #include "k210.dtsi" 9 #include "k210.dtsi" 10 10 11 #include <dt-bindings/gpio/gpio.h> 11 #include <dt-bindings/gpio/gpio.h> 12 #include <dt-bindings/input/input.h> 12 #include <dt-bindings/input/input.h> 13 13 14 / { 14 / { 15 model = "Kendryte KD233"; 15 model = "Kendryte KD233"; 16 compatible = "canaan,kendryte-kd233", 16 compatible = "canaan,kendryte-kd233", "canaan,kendryte-k210"; 17 17 18 aliases { 18 aliases { 19 serial0 = &uarths0; 19 serial0 = &uarths0; 20 }; 20 }; 21 21 22 chosen { 22 chosen { 23 bootargs = "earlycon console=t 23 bootargs = "earlycon console=ttySIF0"; 24 stdout-path = "serial0:115200n 24 stdout-path = "serial0:115200n8"; 25 }; 25 }; 26 26 27 gpio-leds { 27 gpio-leds { 28 compatible = "gpio-leds"; 28 compatible = "gpio-leds"; 29 29 30 led0 { 30 led0 { 31 gpios = <&gpio0 8 GPIO 31 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; 32 }; 32 }; 33 33 34 led1 { 34 led1 { 35 gpios = <&gpio0 9 GPIO 35 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; 36 }; 36 }; 37 }; 37 }; 38 38 39 gpio-keys { 39 gpio-keys { 40 compatible = "gpio-keys"; 40 compatible = "gpio-keys"; 41 41 42 key { 42 key { 43 label = "KEY0"; 43 label = "KEY0"; 44 linux,code = <BTN_0>; 44 linux,code = <BTN_0>; 45 gpios = <&gpio0 10 GPI 45 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; 46 }; 46 }; 47 }; 47 }; 48 }; 48 }; 49 49 50 &fpioa { 50 &fpioa { 51 pinctrl-0 = <&jtag_pinctrl>; 51 pinctrl-0 = <&jtag_pinctrl>; 52 pinctrl-names = "default"; 52 pinctrl-names = "default"; 53 53 54 jtag_pinctrl: jtag-pinmux { 54 jtag_pinctrl: jtag-pinmux { 55 pinmux = <K210_FPIOA(0, K210_P 55 pinmux = <K210_FPIOA(0, K210_PCF_JTAG_TCLK)>, 56 <K210_FPIOA(1, K210_P 56 <K210_FPIOA(1, K210_PCF_JTAG_TDI)>, 57 <K210_FPIOA(2, K210_P 57 <K210_FPIOA(2, K210_PCF_JTAG_TMS)>, 58 <K210_FPIOA(3, K210_P 58 <K210_FPIOA(3, K210_PCF_JTAG_TDO)>; 59 }; 59 }; 60 60 61 uarths_pinctrl: uarths-pinmux { 61 uarths_pinctrl: uarths-pinmux { 62 pinmux = <K210_FPIOA(4, K210_P 62 pinmux = <K210_FPIOA(4, K210_PCF_UARTHS_RX)>, 63 <K210_FPIOA(5, K210_P 63 <K210_FPIOA(5, K210_PCF_UARTHS_TX)>; 64 }; 64 }; 65 65 66 spi0_pinctrl: spi0-pinmux { 66 spi0_pinctrl: spi0-pinmux { 67 pinmux = <K210_FPIOA(6, K210_P 67 pinmux = <K210_FPIOA(6, K210_PCF_GPIOHS20)>, /* cs */ 68 <K210_FPIOA(7, K210_P 68 <K210_FPIOA(7, K210_PCF_SPI0_SCLK)>, /* wr */ 69 <K210_FPIOA(8, K210_P 69 <K210_FPIOA(8, K210_PCF_GPIOHS21)>; /* dc */ 70 }; 70 }; 71 71 72 dvp_pinctrl: dvp-pinmux { 72 dvp_pinctrl: dvp-pinmux { 73 pinmux = <K210_FPIOA(9, K210_P 73 pinmux = <K210_FPIOA(9, K210_PCF_SCCB_SCLK)>, 74 <K210_FPIOA(10, K210_ 74 <K210_FPIOA(10, K210_PCF_SCCB_SDA)>, 75 <K210_FPIOA(11, K210_ 75 <K210_FPIOA(11, K210_PCF_DVP_RST)>, 76 <K210_FPIOA(12, K210_ 76 <K210_FPIOA(12, K210_PCF_DVP_VSYNC)>, 77 <K210_FPIOA(13, K210_ 77 <K210_FPIOA(13, K210_PCF_DVP_PWDN)>, 78 <K210_FPIOA(14, K210_ 78 <K210_FPIOA(14, K210_PCF_DVP_XCLK)>, 79 <K210_FPIOA(15, K210_ 79 <K210_FPIOA(15, K210_PCF_DVP_PCLK)>, 80 <K210_FPIOA(17, K210_ 80 <K210_FPIOA(17, K210_PCF_DVP_HSYNC)>; 81 }; 81 }; 82 82 83 gpiohs_pinctrl: gpiohs-pinmux { 83 gpiohs_pinctrl: gpiohs-pinmux { 84 pinmux = <K210_FPIOA(16, K210_ 84 pinmux = <K210_FPIOA(16, K210_PCF_GPIOHS0)>, 85 <K210_FPIOA(20, K210_ 85 <K210_FPIOA(20, K210_PCF_GPIOHS4)>, /* Rot. dip sw line 8 */ 86 <K210_FPIOA(21, K210_ 86 <K210_FPIOA(21, K210_PCF_GPIOHS5)>, /* Rot. dip sw line 4 */ 87 <K210_FPIOA(22, K210_ 87 <K210_FPIOA(22, K210_PCF_GPIOHS6)>, /* Rot. dip sw line 2 */ 88 <K210_FPIOA(23, K210_ 88 <K210_FPIOA(23, K210_PCF_GPIOHS7)>, /* Rot. dip sw line 1 */ 89 <K210_FPIOA(24, K210_ 89 <K210_FPIOA(24, K210_PCF_GPIOHS8)>, 90 <K210_FPIOA(25, K210_ 90 <K210_FPIOA(25, K210_PCF_GPIOHS9)>, 91 <K210_FPIOA(26, K210_ 91 <K210_FPIOA(26, K210_PCF_GPIOHS10)>; 92 }; 92 }; 93 93 94 spi1_pinctrl: spi1-pinmux { 94 spi1_pinctrl: spi1-pinmux { 95 pinmux = <K210_FPIOA(29, K210_ 95 pinmux = <K210_FPIOA(29, K210_PCF_SPI1_SCLK)>, 96 <K210_FPIOA(30, K210_ 96 <K210_FPIOA(30, K210_PCF_SPI1_D0)>, 97 <K210_FPIOA(31, K210_ 97 <K210_FPIOA(31, K210_PCF_SPI1_D1)>, 98 <K210_FPIOA(32, K210_ 98 <K210_FPIOA(32, K210_PCF_GPIOHS16)>; /* cs */ 99 }; 99 }; 100 100 101 i2s0_pinctrl: i2s0-pinmux { 101 i2s0_pinctrl: i2s0-pinmux { 102 pinmux = <K210_FPIOA(33, K210_ 102 pinmux = <K210_FPIOA(33, K210_PCF_I2S0_IN_D0)>, 103 <K210_FPIOA(34, K210_ 103 <K210_FPIOA(34, K210_PCF_I2S0_WS)>, 104 <K210_FPIOA(35, K210_ 104 <K210_FPIOA(35, K210_PCF_I2S0_SCLK)>; 105 }; 105 }; 106 }; 106 }; 107 107 108 &uarths0 { 108 &uarths0 { 109 pinctrl-0 = <&uarths_pinctrl>; 109 pinctrl-0 = <&uarths_pinctrl>; 110 pinctrl-names = "default"; 110 pinctrl-names = "default"; 111 status = "okay"; 111 status = "okay"; 112 }; 112 }; 113 113 114 &gpio0 { 114 &gpio0 { 115 pinctrl-0 = <&gpiohs_pinctrl>; 115 pinctrl-0 = <&gpiohs_pinctrl>; 116 pinctrl-names = "default"; 116 pinctrl-names = "default"; 117 status = "okay"; 117 status = "okay"; 118 }; 118 }; 119 119 120 &i2s0 { 120 &i2s0 { 121 #sound-dai-cells = <1>; 121 #sound-dai-cells = <1>; 122 pinctrl-0 = <&i2s0_pinctrl>; 122 pinctrl-0 = <&i2s0_pinctrl>; 123 pinctrl-names = "default"; 123 pinctrl-names = "default"; 124 status = "okay"; 124 status = "okay"; 125 }; 125 }; 126 126 127 &spi0 { 127 &spi0 { 128 pinctrl-0 = <&spi0_pinctrl>; 128 pinctrl-0 = <&spi0_pinctrl>; 129 pinctrl-names = "default"; 129 pinctrl-names = "default"; 130 num-cs = <1>; 130 num-cs = <1>; 131 cs-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH 131 cs-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>; 132 status = "okay"; 132 status = "okay"; 133 133 134 panel@0 { 134 panel@0 { 135 compatible = "canaan,kd233-tft 135 compatible = "canaan,kd233-tft", "ilitek,ili9341"; 136 reg = <0>; 136 reg = <0>; 137 dc-gpios = <&gpio0 21 GPIO_ACT 137 dc-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>; 138 spi-max-frequency = <10000000> 138 spi-max-frequency = <10000000>; 139 status = "disabled"; 139 status = "disabled"; 140 }; 140 }; 141 }; 141 }; 142 142 143 &spi1 { 143 &spi1 { 144 pinctrl-0 = <&spi1_pinctrl>; 144 pinctrl-0 = <&spi1_pinctrl>; 145 pinctrl-names = "default"; 145 pinctrl-names = "default"; 146 num-cs = <1>; 146 num-cs = <1>; 147 cs-gpios = <&gpio0 16 GPIO_ACTIVE_LOW> 147 cs-gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; 148 status = "okay"; 148 status = "okay"; 149 149 150 mmc@0 { 150 mmc@0 { 151 compatible = "mmc-spi-slot"; 151 compatible = "mmc-spi-slot"; 152 reg = <0>; 152 reg = <0>; 153 voltage-ranges = <3300 3300>; 153 voltage-ranges = <3300 3300>; 154 spi-max-frequency = <25000000> 154 spi-max-frequency = <25000000>; 155 broken-cd; 155 broken-cd; 156 }; 156 }; 157 }; 157 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.