Andrew Davis | ebc98d9 | 2023-04-11 13:24:54 -0500 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-only |
Marcin Niestroj | c740e29 | 2018-11-21 20:32:00 +0100 | [diff] [blame] | 2 | /* |
Andrew Davis | ebc98d9 | 2023-04-11 13:24:54 -0500 | [diff] [blame] | 3 | * Copyright (C) 2015 Jablotron s.r.o. -- https://www.jablotron.com/ |
Marcin Niestroj | c740e29 | 2018-11-21 20:32:00 +0100 | [diff] [blame] | 4 | * Author: Rostislav Lisovy <lisovy@jablotron.cz> |
Marcin Niestroj | c740e29 | 2018-11-21 20:32:00 +0100 | [diff] [blame] | 5 | */ |
| 6 | /dts-v1/; |
| 7 | #include "am335x-chilisom.dtsi" |
| 8 | |
| 9 | / { |
| 10 | model = "AM335x Chiliboard"; |
| 11 | compatible = "grinn,am335x-chiliboard", "grinn,am335x-chilisom", |
| 12 | "ti,am33xx"; |
| 13 | |
| 14 | leds { |
| 15 | compatible = "gpio-leds"; |
| 16 | pinctrl-names = "default"; |
| 17 | pinctrl-0 = <&led_gpio_pins>; |
| 18 | |
| 19 | led0 { |
| 20 | label = "led0"; |
| 21 | gpios = <&gpio3 7 GPIO_ACTIVE_LOW>; |
| 22 | default-state = "keep"; |
| 23 | linux,default-trigger = "heartbeat"; |
| 24 | }; |
| 25 | |
| 26 | led1 { |
| 27 | label = "led1"; |
| 28 | gpios = <&gpio3 8 GPIO_ACTIVE_LOW>; |
| 29 | default-state = "keep"; |
| 30 | }; |
| 31 | }; |
| 32 | }; |
| 33 | |
| 34 | &am33xx_pinmux { |
| 35 | uart0_pins: pinmux_uart0_pins { |
| 36 | pinctrl-single,pins = < |
Andrew Davis | 7eeef8a | 2023-04-11 13:25:03 -0500 | [diff] [blame^] | 37 | AM33XX_PADCONF(AM335X_PIN_UART0_RXD, PIN_INPUT_PULLUP, MUX_MODE0) |
| 38 | AM33XX_PADCONF(AM335X_PIN_UART0_TXD, PIN_OUTPUT_PULLDOWN, MUX_MODE0) |
Marcin Niestroj | c740e29 | 2018-11-21 20:32:00 +0100 | [diff] [blame] | 39 | >; |
| 40 | }; |
| 41 | |
| 42 | cpsw_default: cpsw_default { |
| 43 | pinctrl-single,pins = < |
| 44 | /* Slave 1 */ |
Andrew Davis | 7eeef8a | 2023-04-11 13:25:03 -0500 | [diff] [blame^] | 45 | AM33XX_PADCONF(AM335X_PIN_MII1_CRS, PIN_INPUT_PULLDOWN, MUX_MODE1) |
| 46 | AM33XX_PADCONF(AM335X_PIN_MII1_RX_ER, PIN_INPUT_PULLUP, MUX_MODE1) |
| 47 | AM33XX_PADCONF(AM335X_PIN_MII1_TX_EN, PIN_OUTPUT_PULLDOWN, MUX_MODE1) |
| 48 | AM33XX_PADCONF(AM335X_PIN_MII1_TXD1, PIN_OUTPUT_PULLDOWN, MUX_MODE1) |
| 49 | AM33XX_PADCONF(AM335X_PIN_MII1_TXD0, PIN_OUTPUT_PULLDOWN, MUX_MODE1) |
| 50 | AM33XX_PADCONF(AM335X_PIN_MII1_RXD1, PIN_INPUT_PULLUP, MUX_MODE1) |
| 51 | AM33XX_PADCONF(AM335X_PIN_MII1_RXD0, PIN_INPUT_PULLUP, MUX_MODE1) |
| 52 | AM33XX_PADCONF(AM335X_PIN_RMII1_REF_CLK, PIN_INPUT_PULLDOWN, MUX_MODE0) |
Marcin Niestroj | c740e29 | 2018-11-21 20:32:00 +0100 | [diff] [blame] | 53 | >; |
| 54 | }; |
| 55 | |
| 56 | cpsw_sleep: cpsw_sleep { |
| 57 | pinctrl-single,pins = < |
| 58 | /* Slave 1 reset value */ |
Andrew Davis | 7eeef8a | 2023-04-11 13:25:03 -0500 | [diff] [blame^] | 59 | AM33XX_PADCONF(AM335X_PIN_MII1_CRS, PIN_INPUT_PULLDOWN, MUX_MODE7) |
| 60 | AM33XX_PADCONF(AM335X_PIN_MII1_RX_ER, PIN_INPUT_PULLDOWN, MUX_MODE7) |
| 61 | AM33XX_PADCONF(AM335X_PIN_MII1_TX_EN, PIN_INPUT_PULLDOWN, MUX_MODE7) |
| 62 | AM33XX_PADCONF(AM335X_PIN_MII1_RX_DV, PIN_INPUT_PULLDOWN, MUX_MODE7) |
| 63 | AM33XX_PADCONF(AM335X_PIN_MII1_TXD1, PIN_INPUT_PULLDOWN, MUX_MODE7) |
| 64 | AM33XX_PADCONF(AM335X_PIN_MII1_TXD0, PIN_INPUT_PULLDOWN, MUX_MODE7) |
| 65 | AM33XX_PADCONF(AM335X_PIN_MII1_RXD1, PIN_INPUT_PULLDOWN, MUX_MODE7) |
| 66 | AM33XX_PADCONF(AM335X_PIN_MII1_RXD0, PIN_INPUT_PULLDOWN, MUX_MODE7) |
| 67 | AM33XX_PADCONF(AM335X_PIN_RMII1_REF_CLK, PIN_INPUT_PULLDOWN, MUX_MODE7) |
Marcin Niestroj | c740e29 | 2018-11-21 20:32:00 +0100 | [diff] [blame] | 68 | >; |
| 69 | }; |
| 70 | |
| 71 | davinci_mdio_default: davinci_mdio_default { |
| 72 | pinctrl-single,pins = < |
| 73 | /* mdio_data.mdio_data */ |
Andrew Davis | 7eeef8a | 2023-04-11 13:25:03 -0500 | [diff] [blame^] | 74 | AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLUP | SLEWCTRL_FAST, MUX_MODE0) |
Marcin Niestroj | c740e29 | 2018-11-21 20:32:00 +0100 | [diff] [blame] | 75 | /* mdio_clk.mdio_clk */ |
Andrew Davis | 7eeef8a | 2023-04-11 13:25:03 -0500 | [diff] [blame^] | 76 | AM33XX_PADCONF(AM335X_PIN_MDC, PIN_OUTPUT_PULLUP, MUX_MODE0) |
Marcin Niestroj | c740e29 | 2018-11-21 20:32:00 +0100 | [diff] [blame] | 77 | >; |
| 78 | }; |
| 79 | |
| 80 | davinci_mdio_sleep: davinci_mdio_sleep { |
| 81 | pinctrl-single,pins = < |
| 82 | /* MDIO reset value */ |
Andrew Davis | 7eeef8a | 2023-04-11 13:25:03 -0500 | [diff] [blame^] | 83 | AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLDOWN, MUX_MODE7) |
| 84 | AM33XX_PADCONF(AM335X_PIN_MDC, PIN_INPUT_PULLDOWN, MUX_MODE7) |
Marcin Niestroj | c740e29 | 2018-11-21 20:32:00 +0100 | [diff] [blame] | 85 | >; |
| 86 | }; |
| 87 | |
| 88 | usb1_drvvbus: usb1_drvvbus { |
| 89 | pinctrl-single,pins = < |
Andrew Davis | 7eeef8a | 2023-04-11 13:25:03 -0500 | [diff] [blame^] | 90 | AM33XX_PADCONF(AM335X_PIN_USB1_DRVVBUS, PIN_OUTPUT_PULLDOWN, MUX_MODE0) |
Marcin Niestroj | c740e29 | 2018-11-21 20:32:00 +0100 | [diff] [blame] | 91 | >; |
| 92 | }; |
| 93 | |
| 94 | sd_pins: pinmux_sd_card { |
| 95 | pinctrl-single,pins = < |
Andrew Davis | 7eeef8a | 2023-04-11 13:25:03 -0500 | [diff] [blame^] | 96 | AM33XX_PADCONF(AM335X_PIN_MMC0_DAT3, PIN_INPUT, MUX_MODE0) |
| 97 | AM33XX_PADCONF(AM335X_PIN_MMC0_DAT2, PIN_INPUT, MUX_MODE0) |
| 98 | AM33XX_PADCONF(AM335X_PIN_MMC0_DAT1, PIN_INPUT, MUX_MODE0) |
| 99 | AM33XX_PADCONF(AM335X_PIN_MMC0_DAT0, PIN_INPUT, MUX_MODE0) |
| 100 | AM33XX_PADCONF(AM335X_PIN_MMC0_CLK, PIN_INPUT, MUX_MODE0) |
| 101 | AM33XX_PADCONF(AM335X_PIN_MMC0_CMD, PIN_INPUT, MUX_MODE0) |
| 102 | AM33XX_PADCONF(AM335X_PIN_SPI0_CS1, PIN_INPUT, MUX_MODE7) /* spi0_cs1.gpio0_6 */ |
Marcin Niestroj | c740e29 | 2018-11-21 20:32:00 +0100 | [diff] [blame] | 103 | >; |
| 104 | }; |
| 105 | |
| 106 | led_gpio_pins: led_gpio_pins { |
| 107 | pinctrl-single,pins = < |
Andrew Davis | 7eeef8a | 2023-04-11 13:25:03 -0500 | [diff] [blame^] | 108 | AM33XX_PADCONF(AM335X_PIN_EMU0, PIN_OUTPUT, MUX_MODE7) /* emu0.gpio3_7 */ |
| 109 | AM33XX_PADCONF(AM335X_PIN_EMU1, PIN_OUTPUT, MUX_MODE7) /* emu1.gpio3_8 */ |
Marcin Niestroj | c740e29 | 2018-11-21 20:32:00 +0100 | [diff] [blame] | 110 | >; |
| 111 | }; |
| 112 | }; |
| 113 | |
| 114 | &uart0 { |
| 115 | pinctrl-names = "default"; |
| 116 | pinctrl-0 = <&uart0_pins>; |
| 117 | |
| 118 | status = "okay"; |
| 119 | }; |
| 120 | |
| 121 | &ldo4_reg { |
| 122 | regulator-min-microvolt = <3300000>; |
| 123 | regulator-max-microvolt = <3300000>; |
| 124 | }; |
| 125 | |
| 126 | /* Ethernet */ |
| 127 | &mac { |
| 128 | slaves = <1>; |
| 129 | pinctrl-names = "default", "sleep"; |
| 130 | pinctrl-0 = <&cpsw_default>; |
| 131 | pinctrl-1 = <&cpsw_sleep>; |
| 132 | status = "okay"; |
| 133 | }; |
| 134 | |
| 135 | &davinci_mdio { |
| 136 | pinctrl-names = "default", "sleep"; |
| 137 | pinctrl-0 = <&davinci_mdio_default>; |
| 138 | pinctrl-1 = <&davinci_mdio_sleep>; |
| 139 | status = "okay"; |
Grygorii Strashko | a6f37dc | 2019-08-31 10:30:34 +0300 | [diff] [blame] | 140 | |
| 141 | ethphy0: ethernet-phy@0 { |
| 142 | reg = <0>; |
| 143 | }; |
Marcin Niestroj | c740e29 | 2018-11-21 20:32:00 +0100 | [diff] [blame] | 144 | }; |
| 145 | |
| 146 | &cpsw_emac0 { |
Grygorii Strashko | a6f37dc | 2019-08-31 10:30:34 +0300 | [diff] [blame] | 147 | phy-handle = <ðphy0>; |
Marcin Niestroj | c740e29 | 2018-11-21 20:32:00 +0100 | [diff] [blame] | 148 | phy-mode = "rmii"; |
| 149 | }; |
| 150 | |
| 151 | &phy_sel { |
| 152 | rmii-clock-ext; |
| 153 | }; |
| 154 | |
| 155 | /* USB */ |
| 156 | &usb { |
| 157 | status = "okay"; |
| 158 | }; |
| 159 | |
| 160 | &usb_ctrl_mod { |
| 161 | status = "okay"; |
| 162 | }; |
| 163 | |
| 164 | &usb1_phy { |
| 165 | status = "okay"; |
| 166 | }; |
| 167 | |
| 168 | &usb1 { |
| 169 | pinctrl-names = "default"; |
| 170 | pinctrl-0 = <&usb1_drvvbus>; |
| 171 | |
| 172 | status = "okay"; |
| 173 | dr_mode = "host"; |
| 174 | }; |
| 175 | |
| 176 | &cppi41dma { |
| 177 | status = "okay"; |
| 178 | }; |
| 179 | |
| 180 | /* microSD */ |
| 181 | &mmc1 { |
| 182 | pinctrl-names = "default"; |
| 183 | pinctrl-0 = <&sd_pins>; |
| 184 | vmmc-supply = <&ldo4_reg>; |
| 185 | bus-width = <0x4>; |
| 186 | cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; |
| 187 | status = "okay"; |
| 188 | }; |
| 189 | |
| 190 | &tps { |
| 191 | interrupt-parent = <&intc>; |
| 192 | interrupts = <7>; /* NNMI */ |
| 193 | |
| 194 | charger { |
| 195 | status = "okay"; |
| 196 | }; |
| 197 | |
| 198 | pwrbutton { |
| 199 | status = "okay"; |
| 200 | }; |
| 201 | }; |