Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | /* |
| 3 | * sama5d3xmb_cmp.dts - Device Tree file for SAMA5D3x CMP mother board |
| 4 | * |
| 5 | * Copyright (C) 2016 Atmel, |
| 6 | */ |
| 7 | #include "sama5d3xcm_cmp.dtsi" |
| 8 | |
| 9 | / { |
| 10 | compatible = "atmel,sama5d3xmb-cmp", "atmel,sama5d3xcm-cmp", "atmel,sama5d3", "atmel,sama5"; |
| 11 | |
| 12 | ahb { |
| 13 | apb { |
| 14 | mmc0: mmc@f0000000 { |
| 15 | pinctrl-names = "default"; |
| 16 | pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_cd>; |
| 17 | status = "okay"; |
| 18 | slot@0 { |
| 19 | reg = <0>; |
| 20 | bus-width = <4>; |
| 21 | cd-gpios = <&pioD 17 GPIO_ACTIVE_HIGH>; |
| 22 | }; |
| 23 | }; |
| 24 | |
| 25 | spi0: spi@f0004000 { |
| 26 | dmas = <0>, <0>; /* Do not use DMA for spi0 */ |
| 27 | |
| 28 | flash@0 { |
| 29 | compatible = "atmel,at25df321a"; |
| 30 | spi-max-frequency = <50000000>; |
| 31 | reg = <0>; |
| 32 | }; |
| 33 | }; |
| 34 | |
| 35 | ssc0: ssc@f0008000 { |
| 36 | atmel,clk-from-rk-pin; |
| 37 | }; |
| 38 | |
| 39 | /* |
| 40 | * i2c0 conflicts with ISI: |
| 41 | * disable it to allow the use of ISI |
| 42 | * can not enable audio when i2c0 disabled |
| 43 | */ |
| 44 | i2c0: i2c@f0014000 { |
| 45 | wm8904: wm8904@1a { |
| 46 | compatible = "wlf,wm8904"; |
| 47 | reg = <0x1a>; |
| 48 | clocks = <&pmc PMC_TYPE_SYSTEM 8>; |
| 49 | clock-names = "mclk"; |
| 50 | }; |
| 51 | }; |
| 52 | |
| 53 | i2c1: i2c@f0018000 { |
| 54 | ov2640: camera@30 { |
| 55 | compatible = "ovti,ov2640"; |
| 56 | reg = <0x30>; |
| 57 | pinctrl-names = "default"; |
| 58 | pinctrl-0 = <&pinctrl_pck1_as_isi_mck &pinctrl_sensor_power &pinctrl_sensor_reset>; |
| 59 | resetb-gpios = <&pioE 24 GPIO_ACTIVE_LOW>; |
| 60 | pwdn-gpios = <&pioE 29 GPIO_ACTIVE_HIGH>; |
| 61 | /* use pck1 for the master clock of ov2640 */ |
| 62 | clocks = <&pmc PMC_TYPE_SYSTEM 9>; |
| 63 | clock-names = "xvclk"; |
| 64 | assigned-clocks = <&pmc PMC_TYPE_SYSTEM 9>; |
| 65 | assigned-clock-rates = <25000000>; |
| 66 | |
| 67 | port { |
| 68 | ov2640_0: endpoint { |
| 69 | remote-endpoint = <&isi_0>; |
| 70 | bus-width = <8>; |
| 71 | }; |
| 72 | }; |
| 73 | }; |
| 74 | }; |
| 75 | |
| 76 | usart1: serial@f0020000 { |
| 77 | dmas = <0>, <0>; /* Do not use DMA for usart1 */ |
| 78 | pinctrl-names = "default"; |
| 79 | pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts_cts>; |
| 80 | status = "okay"; |
| 81 | }; |
| 82 | |
| 83 | isi: isi@f0034000 { |
| 84 | port { |
| 85 | isi_0: endpoint { |
| 86 | remote-endpoint = <&ov2640_0>; |
| 87 | bus-width = <8>; |
| 88 | vsync-active = <1>; |
| 89 | hsync-active = <1>; |
| 90 | }; |
| 91 | }; |
| 92 | }; |
| 93 | |
| 94 | mmc1: mmc@f8000000 { |
| 95 | pinctrl-names = "default"; |
| 96 | pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>; |
| 97 | status = "okay"; |
| 98 | slot@0 { |
| 99 | reg = <0>; |
| 100 | bus-width = <4>; |
| 101 | cd-gpios = <&pioD 18 GPIO_ACTIVE_HIGH>; |
| 102 | }; |
| 103 | }; |
| 104 | |
| 105 | adc0: adc@f8018000 { |
| 106 | pinctrl-names = "default", "sleep"; |
| 107 | pinctrl-0 = < |
| 108 | &pinctrl_adc0_adtrg |
| 109 | &pinctrl_adc0_ad0 |
| 110 | &pinctrl_adc0_ad1 |
| 111 | &pinctrl_adc0_ad2 |
| 112 | &pinctrl_adc0_ad3 |
| 113 | &pinctrl_adc0_ad4 |
| 114 | >; |
| 115 | pinctrl-1 = < |
| 116 | &pinctrl_adc0_adtrg_sleep |
| 117 | &pinctrl_adc0_ad0_sleep |
| 118 | &pinctrl_adc0_ad1_sleep |
| 119 | &pinctrl_adc0_ad2_sleep |
| 120 | &pinctrl_adc0_ad3_sleep |
| 121 | &pinctrl_adc0_ad4_sleep |
| 122 | >; |
| 123 | status = "okay"; |
| 124 | }; |
| 125 | |
| 126 | macb1: ethernet@f802c000 { |
| 127 | phy-mode = "rmii"; |
| 128 | |
| 129 | #address-cells = <1>; |
| 130 | #size-cells = <0>; |
| 131 | phy0: ethernet-phy@1 { |
| 132 | /*interrupt-parent = <&pioE>;*/ |
| 133 | /*interrupts = <30 IRQ_TYPE_EDGE_FALLING>;*/ |
| 134 | reg = <1>; |
| 135 | }; |
| 136 | }; |
| 137 | |
| 138 | pinctrl@fffff200 { |
| 139 | adc0 { |
| 140 | pinctrl_adc0_adtrg_sleep: adc0_adtrg_1 { |
| 141 | atmel,pins = |
| 142 | <AT91_PIOD 19 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(0))>; |
| 143 | }; |
| 144 | pinctrl_adc0_ad0_sleep: adc0_ad0_1 { |
| 145 | atmel,pins = |
| 146 | <AT91_PIOD 20 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(0))>; |
| 147 | }; |
| 148 | pinctrl_adc0_ad1_sleep: adc0_ad1_1 { |
| 149 | atmel,pins = |
| 150 | <AT91_PIOD 21 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(0))>; |
| 151 | }; |
| 152 | pinctrl_adc0_ad2_sleep: adc0_ad2_1 { |
| 153 | atmel,pins = |
| 154 | <AT91_PIOD 22 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(0))>; |
| 155 | }; |
| 156 | pinctrl_adc0_ad3_sleep: adc0_ad3_1 { |
| 157 | atmel,pins = |
| 158 | <AT91_PIOD 23 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(0))>; |
| 159 | }; |
| 160 | pinctrl_adc0_ad4_sleep: adc0_ad4_1 { |
| 161 | atmel,pins = |
| 162 | <AT91_PIOD 24 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(0))>; |
| 163 | }; |
| 164 | }; |
| 165 | |
| 166 | board { |
| 167 | pinctrl_gpio_keys: gpio_keys { |
| 168 | atmel,pins = |
| 169 | <AT91_PIOE 27 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>; |
| 170 | }; |
| 171 | |
| 172 | pinctrl_mmc0_cd: mmc0_cd { |
| 173 | atmel,pins = |
| 174 | <AT91_PIOD 17 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; |
| 175 | }; |
| 176 | |
| 177 | pinctrl_mmc1_cd: mmc1_cd { |
| 178 | atmel,pins = |
| 179 | <AT91_PIOD 18 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; |
| 180 | }; |
| 181 | |
| 182 | pinctrl_pck0_as_audio_mck: pck0_as_audio_mck { |
| 183 | atmel,pins = |
| 184 | <AT91_PIOD 30 AT91_PERIPH_B AT91_PINCTRL_NONE>; |
| 185 | }; |
| 186 | |
| 187 | pinctrl_pck1_as_isi_mck: pck1_as_isi_mck-0 { |
| 188 | atmel,pins = |
| 189 | <AT91_PIOD 31 AT91_PERIPH_B AT91_PINCTRL_NONE>; |
| 190 | }; |
| 191 | |
| 192 | pinctrl_sensor_reset: sensor_reset-0 { |
| 193 | atmel,pins = |
| 194 | <AT91_PIOE 24 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>; |
| 195 | }; |
| 196 | |
| 197 | pinctrl_sensor_power: sensor_power-0 { |
| 198 | atmel,pins = |
| 199 | <AT91_PIOE 29 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>; |
| 200 | }; |
| 201 | |
| 202 | pinctrl_usba_vbus: usba_vbus { |
| 203 | atmel,pins = |
| 204 | <AT91_PIOD 29 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>; |
| 205 | }; |
| 206 | }; |
| 207 | }; |
| 208 | |
| 209 | dbgu: serial@ffffee00 { |
| 210 | dmas = <0>, <0>; /* Do not use DMA for dbgu */ |
| 211 | status = "okay"; |
| 212 | }; |
| 213 | |
| 214 | watchdog@fffffe40 { |
| 215 | status = "okay"; |
| 216 | }; |
| 217 | }; |
| 218 | |
| 219 | usb0: gadget@500000 { |
| 220 | atmel,vbus-gpio = <&pioD 29 GPIO_ACTIVE_HIGH>; |
| 221 | pinctrl-names = "default"; |
| 222 | pinctrl-0 = <&pinctrl_usba_vbus>; |
| 223 | status = "okay"; |
| 224 | }; |
| 225 | }; |
| 226 | |
| 227 | sound { |
| 228 | compatible = "atmel,asoc-wm8904"; |
| 229 | pinctrl-names = "default"; |
| 230 | pinctrl-0 = <&pinctrl_pck0_as_audio_mck>; |
| 231 | |
| 232 | atmel,model = "wm8904 @ SAMA5D3EK"; |
| 233 | atmel,audio-routing = |
| 234 | "Headphone Jack", "HPOUTL", |
| 235 | "Headphone Jack", "HPOUTR", |
| 236 | "IN2L", "Line In Jack", |
| 237 | "IN2R", "Line In Jack", |
| 238 | "Mic", "MICBIAS", |
| 239 | "IN1L", "Mic"; |
| 240 | |
| 241 | atmel,ssc-controller = <&ssc0>; |
| 242 | atmel,audio-codec = <&wm8904>; |
| 243 | |
| 244 | status = "disabled"; |
| 245 | }; |
| 246 | |
| 247 | /* Conflict with LCD pins */ |
| 248 | gpio_keys { |
| 249 | compatible = "gpio-keys"; |
| 250 | status = "okay"; |
| 251 | |
| 252 | #address-cells = <1>; |
| 253 | #size-cells = <0>; |
| 254 | pinctrl-names = "default"; |
| 255 | pinctrl-0 = <&pinctrl_gpio_keys>; |
| 256 | |
| 257 | pb_user1 { |
| 258 | label = "pb_user1"; |
| 259 | gpios = <&pioE 27 GPIO_ACTIVE_HIGH>; |
| 260 | linux,code = <0x100>; |
| 261 | wakeup-source; |
| 262 | }; |
| 263 | }; |
| 264 | }; |