Marcin Niestroj | e067379 | 2018-11-21 20:32:00 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015 Jablotron s.r.o. -- http://www.jablotron.com/ |
| 3 | * Author: Rostislav Lisovy <lisovy@jablotron.cz> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License version 2 as |
| 7 | * published by the Free Software Foundation. |
| 8 | */ |
| 9 | /dts-v1/; |
| 10 | #include "am335x-chilisom.dtsi" |
| 11 | |
| 12 | / { |
| 13 | model = "AM335x Chiliboard"; |
| 14 | compatible = "grinn,am335x-chiliboard", "grinn,am335x-chilisom", |
| 15 | "ti,am33xx"; |
| 16 | |
| 17 | leds { |
| 18 | compatible = "gpio-leds"; |
| 19 | pinctrl-names = "default"; |
| 20 | pinctrl-0 = <&led_gpio_pins>; |
| 21 | |
| 22 | led0 { |
| 23 | label = "led0"; |
| 24 | gpios = <&gpio3 7 GPIO_ACTIVE_LOW>; |
| 25 | default-state = "keep"; |
| 26 | linux,default-trigger = "heartbeat"; |
| 27 | }; |
| 28 | |
| 29 | led1 { |
| 30 | label = "led1"; |
| 31 | gpios = <&gpio3 8 GPIO_ACTIVE_LOW>; |
| 32 | default-state = "keep"; |
| 33 | }; |
| 34 | }; |
| 35 | }; |
| 36 | |
| 37 | &am33xx_pinmux { |
| 38 | uart0_pins: pinmux_uart0_pins { |
| 39 | pinctrl-single,pins = < |
| 40 | AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ |
| 41 | AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ |
| 42 | >; |
| 43 | }; |
| 44 | |
| 45 | cpsw_default: cpsw_default { |
| 46 | pinctrl-single,pins = < |
| 47 | /* Slave 1 */ |
| 48 | AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_crs.rmii1_crs */ |
| 49 | AM33XX_IOPAD(0x910, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxerr.rmii1_rxerr */ |
| 50 | AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txen.rmii1_txen */ |
| 51 | AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd1.rmii1_txd1 */ |
| 52 | AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd0.rmii1_txd0 */ |
| 53 | AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxd1.rmii1_rxd1 */ |
| 54 | AM33XX_IOPAD(0x940, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxd0.rmii1_rxd0 */ |
| 55 | AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii1_ref_clk.rmii_ref_clk */ |
| 56 | >; |
| 57 | }; |
| 58 | |
| 59 | cpsw_sleep: cpsw_sleep { |
| 60 | pinctrl-single,pins = < |
| 61 | /* Slave 1 reset value */ |
| 62 | AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE7) |
| 63 | AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE7) |
| 64 | AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7) |
| 65 | AM33XX_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE7) |
| 66 | AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7) |
| 67 | AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7) |
| 68 | AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7) |
| 69 | AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7) |
| 70 | AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7) |
| 71 | >; |
| 72 | }; |
| 73 | |
| 74 | davinci_mdio_default: davinci_mdio_default { |
| 75 | pinctrl-single,pins = < |
| 76 | /* mdio_data.mdio_data */ |
| 77 | AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) |
| 78 | /* mdio_clk.mdio_clk */ |
| 79 | AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0) |
| 80 | >; |
| 81 | }; |
| 82 | |
| 83 | davinci_mdio_sleep: davinci_mdio_sleep { |
| 84 | pinctrl-single,pins = < |
| 85 | /* MDIO reset value */ |
| 86 | AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7) |
| 87 | AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7) |
| 88 | >; |
| 89 | }; |
| 90 | |
| 91 | usb1_drvvbus: usb1_drvvbus { |
| 92 | pinctrl-single,pins = < |
| 93 | AM33XX_IOPAD(0xa34, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* usb1_drvvbus.usb1_drvvbus */ |
| 94 | >; |
| 95 | }; |
| 96 | |
| 97 | sd_pins: pinmux_sd_card { |
| 98 | pinctrl-single,pins = < |
| 99 | AM33XX_IOPAD(0x8f0, PIN_INPUT | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */ |
| 100 | AM33XX_IOPAD(0x8f4, PIN_INPUT | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */ |
| 101 | AM33XX_IOPAD(0x8f8, PIN_INPUT | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */ |
| 102 | AM33XX_IOPAD(0x8fc, PIN_INPUT | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */ |
| 103 | AM33XX_IOPAD(0x900, PIN_INPUT | MUX_MODE0) /* mmc0_clk.mmc0_clk */ |
| 104 | AM33XX_IOPAD(0x904, PIN_INPUT | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */ |
| 105 | AM33XX_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */ |
| 106 | >; |
| 107 | }; |
| 108 | |
| 109 | led_gpio_pins: led_gpio_pins { |
| 110 | pinctrl-single,pins = < |
| 111 | AM33XX_IOPAD(0x9e4, PIN_OUTPUT | MUX_MODE7) /* emu0.gpio3_7 */ |
| 112 | AM33XX_IOPAD(0x9e8, PIN_OUTPUT | MUX_MODE7) /* emu1.gpio3_8 */ |
| 113 | >; |
| 114 | }; |
| 115 | }; |
| 116 | |
| 117 | &uart0 { |
| 118 | pinctrl-names = "default"; |
| 119 | pinctrl-0 = <&uart0_pins>; |
| 120 | |
| 121 | status = "okay"; |
| 122 | }; |
| 123 | |
| 124 | &ldo4_reg { |
| 125 | regulator-min-microvolt = <3300000>; |
| 126 | regulator-max-microvolt = <3300000>; |
| 127 | }; |
| 128 | |
| 129 | /* Ethernet */ |
| 130 | &mac { |
| 131 | slaves = <1>; |
| 132 | pinctrl-names = "default", "sleep"; |
| 133 | pinctrl-0 = <&cpsw_default>; |
| 134 | pinctrl-1 = <&cpsw_sleep>; |
| 135 | status = "okay"; |
| 136 | }; |
| 137 | |
| 138 | &davinci_mdio { |
| 139 | pinctrl-names = "default", "sleep"; |
| 140 | pinctrl-0 = <&davinci_mdio_default>; |
| 141 | pinctrl-1 = <&davinci_mdio_sleep>; |
| 142 | status = "okay"; |
Grygorii Strashko | 3b3e8a3 | 2019-08-31 10:30:34 +0300 | [diff] [blame] | 143 | |
| 144 | ethphy0: ethernet-phy@0 { |
| 145 | reg = <0>; |
| 146 | }; |
Marcin Niestroj | e067379 | 2018-11-21 20:32:00 +0100 | [diff] [blame] | 147 | }; |
| 148 | |
| 149 | &cpsw_emac0 { |
Grygorii Strashko | 3b3e8a3 | 2019-08-31 10:30:34 +0300 | [diff] [blame] | 150 | phy-handle = <ðphy0>; |
Marcin Niestroj | e067379 | 2018-11-21 20:32:00 +0100 | [diff] [blame] | 151 | phy-mode = "rmii"; |
| 152 | }; |
| 153 | |
| 154 | &phy_sel { |
| 155 | rmii-clock-ext; |
| 156 | }; |
| 157 | |
| 158 | /* USB */ |
| 159 | &usb { |
| 160 | status = "okay"; |
| 161 | }; |
| 162 | |
| 163 | &usb_ctrl_mod { |
| 164 | status = "okay"; |
| 165 | }; |
| 166 | |
| 167 | &usb1_phy { |
| 168 | status = "okay"; |
| 169 | }; |
| 170 | |
| 171 | &usb1 { |
| 172 | pinctrl-names = "default"; |
| 173 | pinctrl-0 = <&usb1_drvvbus>; |
| 174 | |
| 175 | status = "okay"; |
| 176 | dr_mode = "host"; |
| 177 | }; |
| 178 | |
| 179 | &cppi41dma { |
| 180 | status = "okay"; |
| 181 | }; |
| 182 | |
| 183 | /* microSD */ |
| 184 | &mmc1 { |
| 185 | pinctrl-names = "default"; |
| 186 | pinctrl-0 = <&sd_pins>; |
| 187 | vmmc-supply = <&ldo4_reg>; |
| 188 | bus-width = <0x4>; |
| 189 | cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; |
| 190 | status = "okay"; |
| 191 | }; |
| 192 | |
| 193 | &tps { |
| 194 | interrupt-parent = <&intc>; |
| 195 | interrupts = <7>; /* NNMI */ |
| 196 | |
| 197 | charger { |
| 198 | status = "okay"; |
| 199 | }; |
| 200 | |
| 201 | pwrbutton { |
| 202 | status = "okay"; |
| 203 | }; |
| 204 | }; |