Adam Baker | be3d7d0 | 2014-04-06 22:42:48 +0100 | [diff] [blame] | 1 | /* Device tree file for the Zyxel NSA 320 NAS box. |
| 2 | * |
| 3 | * Copyright (c) 2014, Adam Baker <linux@baker-net.org.uk> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License |
| 7 | * as published by the Free Software Foundation; either version |
| 8 | * 2 of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * Based upon the board setup file created by Peter Schildmann */ |
| 11 | |
| 12 | /dts-v1/; |
| 13 | |
Adam Baker | 76a93dc | 2014-04-08 23:34:32 +0100 | [diff] [blame] | 14 | #include "kirkwood-nsa3x0-common.dtsi" |
Adam Baker | be3d7d0 | 2014-04-06 22:42:48 +0100 | [diff] [blame] | 15 | |
| 16 | / { |
| 17 | model = "Zyxel NSA320"; |
| 18 | compatible = "zyxel,nsa320", "marvell,kirkwood-88f6281", "marvell,kirkwood"; |
| 19 | |
| 20 | memory { |
| 21 | device_type = "memory"; |
| 22 | reg = <0x00000000 0x20000000>; |
| 23 | }; |
| 24 | |
| 25 | chosen { |
| 26 | bootargs = "console=ttyS0,115200"; |
Sebastian Hesselbarth | ab83361 | 2014-04-30 14:56:30 +0200 | [diff] [blame] | 27 | stdout-path = &uart0; |
Adam Baker | be3d7d0 | 2014-04-06 22:42:48 +0100 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | mbus { |
| 31 | pcie-controller { |
| 32 | status = "okay"; |
| 33 | |
| 34 | pcie@1,0 { |
| 35 | status = "okay"; |
| 36 | }; |
| 37 | }; |
| 38 | }; |
| 39 | |
| 40 | ocp@f1000000 { |
Sebastian Hesselbarth | a948396 | 2014-04-30 14:56:32 +0200 | [diff] [blame] | 41 | pinctrl: pin-controller@10000 { |
Adam Baker | be3d7d0 | 2014-04-06 22:42:48 +0100 | [diff] [blame] | 42 | pinctrl-names = "default"; |
| 43 | |
| 44 | /* SATA Activity and Present pins are not connected */ |
| 45 | pmx_sata0: pmx-sata0 { |
| 46 | marvell,pins ; |
| 47 | marvell,function = "sata0"; |
| 48 | }; |
| 49 | |
| 50 | pmx_sata1: pmx-sata1 { |
| 51 | marvell,pins ; |
| 52 | marvell,function = "sata1"; |
| 53 | }; |
| 54 | |
| 55 | pmx_led_hdd2_green: pmx-led-hdd2-green { |
| 56 | marvell,pins = "mpp12"; |
| 57 | marvell,function = "gpio"; |
| 58 | }; |
| 59 | |
| 60 | pmx_led_hdd2_red: pmx-led-hdd2-red { |
| 61 | marvell,pins = "mpp13"; |
| 62 | marvell,function = "gpio"; |
| 63 | }; |
| 64 | |
| 65 | pmx_mcu_data: pmx-mcu-data { |
| 66 | marvell,pins = "mpp14"; |
| 67 | marvell,function = "gpio"; |
| 68 | }; |
| 69 | |
| 70 | pmx_led_usb_green: pmx-led-usb-green { |
| 71 | marvell,pins = "mpp15"; |
| 72 | marvell,function = "gpio"; |
| 73 | }; |
| 74 | |
| 75 | pmx_mcu_clk: pmx-mcu-clk { |
| 76 | marvell,pins = "mpp16"; |
| 77 | marvell,function = "gpio"; |
| 78 | }; |
| 79 | |
| 80 | pmx_mcu_act: pmx-mcu-act { |
| 81 | marvell,pins = "mpp17"; |
| 82 | marvell,function = "gpio"; |
| 83 | }; |
| 84 | |
| 85 | pmx_led_sys_green: pmx-led-sys-green { |
| 86 | marvell,pins = "mpp28"; |
| 87 | marvell,function = "gpio"; |
| 88 | }; |
| 89 | |
| 90 | pmx_led_sys_orange: pmx-led-sys-orange { |
| 91 | marvell,pins = "mpp29"; |
| 92 | marvell,function = "gpio"; |
| 93 | }; |
| 94 | |
| 95 | pmx_led_hdd1_green: pmx-led-hdd1-green { |
| 96 | marvell,pins = "mpp41"; |
| 97 | marvell,function = "gpio"; |
| 98 | }; |
| 99 | |
| 100 | pmx_led_hdd1_red: pmx-led-hdd1-red { |
| 101 | marvell,pins = "mpp42"; |
| 102 | marvell,function = "gpio"; |
| 103 | }; |
| 104 | |
| 105 | pmx_htp: pmx-htp { |
| 106 | marvell,pins = "mpp43"; |
| 107 | marvell,function = "gpio"; |
| 108 | }; |
| 109 | |
| 110 | /* Buzzer needs to be switched at around 1kHz so is |
| 111 | not compatible with the gpio-beeper driver. */ |
| 112 | pmx_buzzer: pmx-buzzer { |
| 113 | marvell,pins = "mpp44"; |
| 114 | marvell,function = "gpio"; |
| 115 | }; |
| 116 | |
| 117 | pmx_vid_b1: pmx-vid-b1 { |
| 118 | marvell,pins = "mpp45"; |
| 119 | marvell,function = "gpio"; |
| 120 | }; |
| 121 | |
| 122 | pmx_power_resume_data: pmx-power-resume-data { |
| 123 | marvell,pins = "mpp47"; |
| 124 | marvell,function = "gpio"; |
| 125 | }; |
| 126 | |
| 127 | pmx_power_resume_clk: pmx-power-resume-clk { |
| 128 | marvell,pins = "mpp49"; |
| 129 | marvell,function = "gpio"; |
| 130 | }; |
| 131 | }; |
| 132 | |
| 133 | i2c@11000 { |
| 134 | status = "okay"; |
| 135 | |
| 136 | pcf8563: pcf8563@51 { |
| 137 | compatible = "nxp,pcf8563"; |
| 138 | reg = <0x51>; |
| 139 | }; |
| 140 | }; |
| 141 | }; |
| 142 | |
| 143 | regulators { |
| 144 | usb0_power: regulator@1 { |
| 145 | enable-active-high; |
| 146 | }; |
| 147 | }; |
| 148 | |
| 149 | gpio-leds { |
| 150 | compatible = "gpio-leds"; |
| 151 | pinctrl-0 = <&pmx_led_hdd2_green &pmx_led_hdd2_red |
| 152 | &pmx_led_usb_green |
| 153 | &pmx_led_sys_green &pmx_led_sys_orange |
| 154 | &pmx_led_copy_green &pmx_led_copy_red |
| 155 | &pmx_led_hdd1_green &pmx_led_hdd1_red>; |
| 156 | pinctrl-names = "default"; |
| 157 | |
| 158 | green-sys { |
| 159 | label = "nsa320:green:sys"; |
| 160 | gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>; |
| 161 | }; |
| 162 | orange-sys { |
| 163 | label = "nsa320:orange:sys"; |
| 164 | gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>; |
| 165 | }; |
| 166 | green-hdd1 { |
| 167 | label = "nsa320:green:hdd1"; |
| 168 | gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; |
| 169 | }; |
| 170 | red-hdd1 { |
| 171 | label = "nsa320:red:hdd1"; |
| 172 | gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; |
| 173 | }; |
| 174 | green-hdd2 { |
| 175 | label = "nsa320:green:hdd2"; |
| 176 | gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; |
| 177 | }; |
| 178 | red-hdd2 { |
| 179 | label = "nsa320:red:hdd2"; |
| 180 | gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; |
| 181 | }; |
| 182 | green-usb { |
| 183 | label = "nsa320:green:usb"; |
| 184 | gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; |
| 185 | }; |
| 186 | green-copy { |
| 187 | label = "nsa320:green:copy"; |
| 188 | gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; |
| 189 | }; |
| 190 | red-copy { |
| 191 | label = "nsa320:red:copy"; |
| 192 | gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; |
| 193 | }; |
| 194 | }; |
| 195 | |
Adam Baker | 9fe3219 | 2016-03-05 15:34:57 +0000 | [diff] [blame^] | 196 | hwmon { |
| 197 | compatible = "zyxel,nsa320-mcu"; |
| 198 | pinctrl-0 = <&pmx_mcu_data &pmx_mcu_clk &pmx_mcu_act>; |
| 199 | pinctrl-names = "default"; |
| 200 | |
| 201 | data-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; |
| 202 | clk-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; |
| 203 | act-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; |
| 204 | }; |
| 205 | |
Adam Baker | be3d7d0 | 2014-04-06 22:42:48 +0100 | [diff] [blame] | 206 | /* The following pins are currently not assigned to a driver, |
| 207 | some of them should be configured as inputs. |
Adam Baker | 9fe3219 | 2016-03-05 15:34:57 +0000 | [diff] [blame^] | 208 | pinctrl-0 = <&pmx_htp &pmx_vid_b1 |
Adam Baker | be3d7d0 | 2014-04-06 22:42:48 +0100 | [diff] [blame] | 209 | &pmx_power_resume_data &pmx_power_resume_clk>; */ |
| 210 | }; |
| 211 | |
| 212 | &mdio { |
| 213 | status = "okay"; |
| 214 | ethphy0: ethernet-phy@1 { |
| 215 | reg = <1>; |
| 216 | }; |
| 217 | }; |
| 218 | |
| 219 | ð0 { |
| 220 | status = "okay"; |
| 221 | ethernet0-port@0 { |
| 222 | phy-handle = <ðphy0>; |
| 223 | }; |
| 224 | }; |