Vagrant Cascadian | 4d0abd1 | 2019-04-29 16:12:29 -0700 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
Andrew Davis | ebc98d9 | 2023-04-11 13:24:54 -0500 | [diff] [blame] | 3 | * Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com/ |
Vagrant Cascadian | 4d0abd1 | 2019-04-29 16:12:29 -0700 | [diff] [blame] | 4 | * |
| 5 | * Author: Robert Nelson <robertcnelson@gmail.com> |
| 6 | */ |
| 7 | /dts-v1/; |
| 8 | |
| 9 | #include "am33xx.dtsi" |
| 10 | #include "am335x-osd335x-common.dtsi" |
| 11 | |
| 12 | / { |
| 13 | model = "TI AM335x PocketBeagle"; |
| 14 | compatible = "ti,am335x-pocketbeagle", "ti,am335x-bone", "ti,am33xx"; |
| 15 | |
| 16 | chosen { |
| 17 | stdout-path = &uart0; |
| 18 | }; |
| 19 | |
| 20 | leds { |
| 21 | pinctrl-names = "default"; |
| 22 | pinctrl-0 = <&usr_leds_pins>; |
| 23 | |
| 24 | compatible = "gpio-leds"; |
| 25 | |
Andrew Davis | a45320d | 2023-04-11 13:25:05 -0500 | [diff] [blame] | 26 | led-usr0 { |
Vagrant Cascadian | 4d0abd1 | 2019-04-29 16:12:29 -0700 | [diff] [blame] | 27 | label = "beaglebone:green:usr0"; |
| 28 | gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>; |
| 29 | linux,default-trigger = "heartbeat"; |
| 30 | default-state = "off"; |
| 31 | }; |
| 32 | |
Andrew Davis | a45320d | 2023-04-11 13:25:05 -0500 | [diff] [blame] | 33 | led-usr1 { |
Vagrant Cascadian | 4d0abd1 | 2019-04-29 16:12:29 -0700 | [diff] [blame] | 34 | label = "beaglebone:green:usr1"; |
| 35 | gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>; |
| 36 | linux,default-trigger = "mmc0"; |
| 37 | default-state = "off"; |
| 38 | }; |
| 39 | |
Andrew Davis | a45320d | 2023-04-11 13:25:05 -0500 | [diff] [blame] | 40 | led-usr2 { |
Vagrant Cascadian | 4d0abd1 | 2019-04-29 16:12:29 -0700 | [diff] [blame] | 41 | label = "beaglebone:green:usr2"; |
| 42 | gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; |
| 43 | linux,default-trigger = "cpu0"; |
| 44 | default-state = "off"; |
| 45 | }; |
| 46 | |
Andrew Davis | a45320d | 2023-04-11 13:25:05 -0500 | [diff] [blame] | 47 | led-usr3 { |
Vagrant Cascadian | 4d0abd1 | 2019-04-29 16:12:29 -0700 | [diff] [blame] | 48 | label = "beaglebone:green:usr3"; |
| 49 | gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>; |
| 50 | default-state = "off"; |
| 51 | }; |
| 52 | }; |
| 53 | |
| 54 | vmmcsd_fixed: fixedregulator0 { |
| 55 | compatible = "regulator-fixed"; |
| 56 | regulator-name = "vmmcsd_fixed"; |
| 57 | regulator-min-microvolt = <3300000>; |
| 58 | regulator-max-microvolt = <3300000>; |
| 59 | }; |
| 60 | }; |
| 61 | |
| 62 | &am33xx_pinmux { |
| 63 | i2c2_pins: pinmux-i2c2-pins { |
| 64 | pinctrl-single,pins = < |
Andrew Davis | 7eeef8a | 2023-04-11 13:25:03 -0500 | [diff] [blame] | 65 | AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_INPUT_PULLUP, MUX_MODE3) /* (D17) uart1_rtsn.I2C2_SCL */ |
| 66 | AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT_PULLUP, MUX_MODE3) /* (D18) uart1_ctsn.I2C2_SDA */ |
Vagrant Cascadian | 4d0abd1 | 2019-04-29 16:12:29 -0700 | [diff] [blame] | 67 | >; |
| 68 | }; |
| 69 | |
| 70 | ehrpwm0_pins: pinmux-ehrpwm0-pins { |
| 71 | pinctrl-single,pins = < |
Andrew Davis | 7eeef8a | 2023-04-11 13:25:03 -0500 | [diff] [blame] | 72 | AM33XX_PADCONF(AM335X_PIN_MCASP0_ACLKX, PIN_OUTPUT_PULLDOWN, MUX_MODE1) /* (A13) mcasp0_aclkx.ehrpwm0A */ |
Vagrant Cascadian | 4d0abd1 | 2019-04-29 16:12:29 -0700 | [diff] [blame] | 73 | >; |
| 74 | }; |
| 75 | |
| 76 | ehrpwm1_pins: pinmux-ehrpwm1-pins { |
| 77 | pinctrl-single,pins = < |
Andrew Davis | 7eeef8a | 2023-04-11 13:25:03 -0500 | [diff] [blame] | 78 | AM33XX_PADCONF(AM335X_PIN_GPMC_A2, PIN_OUTPUT_PULLDOWN, MUX_MODE6) /* (U14) gpmc_a2.ehrpwm1A */ |
Vagrant Cascadian | 4d0abd1 | 2019-04-29 16:12:29 -0700 | [diff] [blame] | 79 | >; |
| 80 | }; |
| 81 | |
| 82 | mmc0_pins: pinmux-mmc0-pins { |
| 83 | pinctrl-single,pins = < |
Andrew Davis | 7eeef8a | 2023-04-11 13:25:03 -0500 | [diff] [blame] | 84 | AM33XX_PADCONF(AM335X_PIN_SPI0_CS1, PIN_INPUT, MUX_MODE7) /* (C15) spi0_cs1.gpio0[6] */ |
| 85 | AM33XX_PADCONF(AM335X_PIN_MMC0_DAT0, PIN_INPUT_PULLUP, MUX_MODE0) |
| 86 | AM33XX_PADCONF(AM335X_PIN_MMC0_DAT1, PIN_INPUT_PULLUP, MUX_MODE0) |
| 87 | AM33XX_PADCONF(AM335X_PIN_MMC0_DAT2, PIN_INPUT_PULLUP, MUX_MODE0) |
| 88 | AM33XX_PADCONF(AM335X_PIN_MMC0_DAT3, PIN_INPUT_PULLUP, MUX_MODE0) |
| 89 | AM33XX_PADCONF(AM335X_PIN_MMC0_CMD, PIN_INPUT_PULLUP, MUX_MODE0) |
| 90 | AM33XX_PADCONF(AM335X_PIN_MMC0_CLK, PIN_INPUT_PULLUP, MUX_MODE0) |
Vagrant Cascadian | 4d0abd1 | 2019-04-29 16:12:29 -0700 | [diff] [blame] | 91 | AM33XX_IOPAD(0x9a0, PIN_INPUT | MUX_MODE4) /* (B12) mcasp0_aclkr.mmc0_sdwp */ |
| 92 | >; |
| 93 | }; |
| 94 | |
| 95 | spi0_pins: pinmux-spi0-pins { |
| 96 | pinctrl-single,pins = < |
Andrew Davis | 7eeef8a | 2023-04-11 13:25:03 -0500 | [diff] [blame] | 97 | AM33XX_PADCONF(AM335X_PIN_SPI0_SCLK, PIN_INPUT_PULLUP, MUX_MODE0) |
| 98 | AM33XX_PADCONF(AM335X_PIN_SPI0_D0, PIN_INPUT_PULLUP, MUX_MODE0) |
| 99 | AM33XX_PADCONF(AM335X_PIN_SPI0_D1, PIN_INPUT_PULLUP, MUX_MODE0) |
| 100 | AM33XX_PADCONF(AM335X_PIN_SPI0_CS0, PIN_INPUT_PULLUP, MUX_MODE0) |
Vagrant Cascadian | 4d0abd1 | 2019-04-29 16:12:29 -0700 | [diff] [blame] | 101 | >; |
| 102 | }; |
| 103 | |
| 104 | spi1_pins: pinmux-spi1-pins { |
| 105 | pinctrl-single,pins = < |
Andrew Davis | 7eeef8a | 2023-04-11 13:25:03 -0500 | [diff] [blame] | 106 | AM33XX_PADCONF(AM335X_PIN_ECAP0_IN_PWM0_OUT, PIN_INPUT_PULLUP, MUX_MODE4) /* (C18) eCAP0_in_PWM0_out.spi1_sclk */ |
| 107 | AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_INPUT_PULLUP, MUX_MODE4) /* (E18) uart0_ctsn.spi1_d0 */ |
| 108 | AM33XX_PADCONF(AM335X_PIN_UART0_RTSN, PIN_INPUT_PULLUP, MUX_MODE4) /* (E17) uart0_rtsn.spi1_d1 */ |
| 109 | AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR0, PIN_INPUT_PULLUP, MUX_MODE4) /* (A15) xdma_event_intr0.spi1_cs1 */ |
Vagrant Cascadian | 4d0abd1 | 2019-04-29 16:12:29 -0700 | [diff] [blame] | 110 | >; |
| 111 | }; |
| 112 | |
| 113 | usr_leds_pins: pinmux-usr-leds-pins { |
| 114 | pinctrl-single,pins = < |
Andrew Davis | 7eeef8a | 2023-04-11 13:25:03 -0500 | [diff] [blame] | 115 | AM33XX_PADCONF(AM335X_PIN_GPMC_A5, PIN_OUTPUT, MUX_MODE7) /* (V15) gpmc_a5.gpio1[21] - USR_LED_0 */ |
| 116 | AM33XX_PADCONF(AM335X_PIN_GPMC_A6, PIN_OUTPUT, MUX_MODE7) /* (U15) gpmc_a6.gpio1[22] - USR_LED_1 */ |
| 117 | AM33XX_PADCONF(AM335X_PIN_GPMC_A7, PIN_OUTPUT, MUX_MODE7) /* (T15) gpmc_a7.gpio1[23] - USR_LED_2 */ |
| 118 | AM33XX_PADCONF(AM335X_PIN_GPMC_A8, PIN_OUTPUT, MUX_MODE7) /* (V16) gpmc_a8.gpio1[24] - USR_LED_3 */ |
Vagrant Cascadian | 4d0abd1 | 2019-04-29 16:12:29 -0700 | [diff] [blame] | 119 | >; |
| 120 | }; |
| 121 | |
| 122 | uart0_pins: pinmux-uart0-pins { |
| 123 | pinctrl-single,pins = < |
Andrew Davis | 7eeef8a | 2023-04-11 13:25:03 -0500 | [diff] [blame] | 124 | AM33XX_PADCONF(AM335X_PIN_UART0_RXD, PIN_INPUT_PULLUP, MUX_MODE0) |
| 125 | AM33XX_PADCONF(AM335X_PIN_UART0_TXD, PIN_OUTPUT_PULLDOWN, MUX_MODE0) |
Vagrant Cascadian | 4d0abd1 | 2019-04-29 16:12:29 -0700 | [diff] [blame] | 126 | >; |
| 127 | }; |
| 128 | |
| 129 | uart4_pins: pinmux-uart4-pins { |
| 130 | pinctrl-single,pins = < |
Andrew Davis | 7eeef8a | 2023-04-11 13:25:03 -0500 | [diff] [blame] | 131 | AM33XX_PADCONF(AM335X_PIN_GPMC_WAIT0, PIN_INPUT_PULLUP, MUX_MODE6) /* (T17) gpmc_wait0.uart4_rxd */ |
| 132 | AM33XX_PADCONF(AM335X_PIN_GPMC_WPN, PIN_OUTPUT_PULLDOWN, MUX_MODE6) /* (U17) gpmc_wpn.uart4_txd */ |
Vagrant Cascadian | 4d0abd1 | 2019-04-29 16:12:29 -0700 | [diff] [blame] | 133 | >; |
| 134 | }; |
| 135 | }; |
| 136 | |
| 137 | &epwmss0 { |
| 138 | status = "okay"; |
| 139 | }; |
| 140 | |
| 141 | &ehrpwm0 { |
| 142 | status = "okay"; |
| 143 | pinctrl-names = "default"; |
| 144 | pinctrl-0 = <&ehrpwm0_pins>; |
| 145 | }; |
| 146 | |
| 147 | &epwmss1 { |
| 148 | status = "okay"; |
| 149 | }; |
| 150 | |
| 151 | &ehrpwm1 { |
| 152 | status = "okay"; |
| 153 | pinctrl-names = "default"; |
| 154 | pinctrl-0 = <&ehrpwm1_pins>; |
| 155 | }; |
| 156 | |
| 157 | &i2c0 { |
| 158 | eeprom: eeprom@50 { |
| 159 | compatible = "atmel,24c256"; |
| 160 | reg = <0x50>; |
| 161 | }; |
| 162 | }; |
| 163 | |
| 164 | &i2c2 { |
| 165 | pinctrl-names = "default"; |
| 166 | pinctrl-0 = <&i2c2_pins>; |
| 167 | |
| 168 | status = "okay"; |
| 169 | clock-frequency = <400000>; |
| 170 | }; |
| 171 | |
| 172 | &mmc1 { |
| 173 | status = "okay"; |
| 174 | vmmc-supply = <&vmmcsd_fixed>; |
| 175 | bus-width = <4>; |
| 176 | pinctrl-names = "default"; |
| 177 | pinctrl-0 = <&mmc0_pins>; |
| 178 | cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; |
| 179 | }; |
| 180 | |
| 181 | &rtc { |
| 182 | system-power-controller; |
| 183 | }; |
| 184 | |
| 185 | &tscadc { |
| 186 | status = "okay"; |
| 187 | adc { |
| 188 | ti,adc-channels = <0 1 2 3 4 5 6 7>; |
| 189 | ti,chan-step-avg = <16 16 16 16 16 16 16 16>; |
| 190 | ti,chan-step-opendelay = <0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98>; |
| 191 | ti,chan-step-sampledelay = <0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0>; |
| 192 | }; |
| 193 | }; |
| 194 | |
| 195 | &uart0 { |
| 196 | pinctrl-names = "default"; |
| 197 | pinctrl-0 = <&uart0_pins>; |
| 198 | |
| 199 | status = "okay"; |
| 200 | }; |
| 201 | |
| 202 | &uart4 { |
| 203 | pinctrl-names = "default"; |
| 204 | pinctrl-0 = <&uart4_pins>; |
| 205 | |
| 206 | status = "okay"; |
| 207 | }; |
| 208 | |
| 209 | &usb { |
| 210 | status = "okay"; |
| 211 | }; |
| 212 | |
| 213 | &usb_ctrl_mod { |
| 214 | status = "okay"; |
| 215 | }; |
| 216 | |
| 217 | &usb0_phy { |
| 218 | status = "okay"; |
| 219 | }; |
| 220 | |
| 221 | &usb0 { |
| 222 | status = "okay"; |
| 223 | dr_mode = "otg"; |
| 224 | }; |
| 225 | |
| 226 | &usb1_phy { |
| 227 | status = "okay"; |
| 228 | }; |
| 229 | |
| 230 | &usb1 { |
| 231 | status = "okay"; |
| 232 | dr_mode = "host"; |
| 233 | }; |
| 234 | |
| 235 | &cppi41dma { |
| 236 | status = "okay"; |
| 237 | }; |