Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  * Ctera C200 V1 Board Description
0004  * Copyright 2021-2022 Pawel Dembicki <paweldembicki@gmail.com>
0005  */
0006 
0007 /dts-v1/;
0008 
0009 #include "kirkwood.dtsi"
0010 #include "kirkwood-6281.dtsi"
0011 #include <dt-bindings/leds/common.h>
0012 
0013 / {
0014         model = "Ctera C200 V1";
0015         compatible = "ctera,c200-v1", "marvell,kirkwood-88f6281", "marvell,kirkwood";
0016 
0017         chosen {
0018                 bootargs = "console=ttyS0,115200";
0019                 stdout-path = &uart0;
0020         };
0021 
0022         memory@0 {
0023                 device_type = "memory";
0024                 reg = <0x00000000 0x20000000>;
0025         };
0026 
0027         keys {
0028                 compatible = "gpio-keys";
0029                 pinctrl-0 = <&pmx_buttons>;
0030                 pinctrl-names = "default";
0031 
0032                 power {
0033                         label = "Power Button";
0034                         linux,code = <KEY_POWER>;
0035                         gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
0036                 };
0037 
0038                 reset {
0039                         label = "Reset Button";
0040                         linux,code = <KEY_RESTART>;
0041                         gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
0042                 };
0043 
0044                 usb1 {
0045                         label = "USB1 Button";
0046                         linux,code = <BTN_0>;
0047                         gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
0048                 };
0049 
0050                 usb2 {
0051                         label = "USB2 Button";
0052                         linux,code = <BTN_1>;
0053                         gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
0054                 };
0055         };
0056 
0057         gpio-poweroff {
0058                 compatible = "gpio-poweroff";
0059                 pinctrl-0 = <&pmx_poweroff>;
0060                 pinctrl-names = "default";
0061                 gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
0062         };
0063 
0064         leds {
0065                 compatible = "gpio-leds";
0066                 pinctrl-0 = <&pmx_leds>;
0067                 pinctrl-names = "default";
0068 
0069                 led-0 {
0070                         function = LED_FUNCTION_DISK;
0071                         function-enumerator = <2>;
0072                         color = <LED_COLOR_ID_RED>;
0073                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
0074                 };
0075 
0076                 led-1 {
0077                         function = LED_FUNCTION_DISK;
0078                         function-enumerator = <1>;
0079                         color = <LED_COLOR_ID_GREEN>;
0080                         gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
0081                 };
0082 
0083                 led-2 {
0084                         function = LED_FUNCTION_DISK;
0085                         function-enumerator = <2>;
0086                         color = <LED_COLOR_ID_GREEN>;
0087                         gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
0088                 };
0089 
0090                 led-3 {
0091                         function = LED_FUNCTION_DISK;
0092                         function-enumerator = <1>;
0093                         color = <LED_COLOR_ID_RED>;
0094                         gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
0095                 };
0096 
0097                 led-4 {
0098                         function = LED_FUNCTION_STATUS;
0099                         color = <LED_COLOR_ID_RED>;
0100                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
0101                 };
0102 
0103                 led-5 {
0104                         function = LED_FUNCTION_STATUS;
0105                         color = <LED_COLOR_ID_GREEN>;
0106                         gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
0107                 };
0108 
0109                 led-6 {
0110                         function = LED_FUNCTION_INDICATOR;
0111                         color = <LED_COLOR_ID_BLUE>;
0112                         gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
0113                 };
0114 
0115                 led-7 {
0116                         function = LED_FUNCTION_DISK_ERR;
0117                         color = <LED_COLOR_ID_RED>;
0118                         gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
0119                 };
0120 
0121                 led-8 {
0122                         function = LED_FUNCTION_DISK_ERR;
0123                         color = <LED_COLOR_ID_GREEN>;
0124                         gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
0125                 };
0126 
0127                 led-9 {
0128                         function = LED_FUNCTION_USB;
0129                         function-enumerator = <1>;
0130                         color = <LED_COLOR_ID_RED>;
0131                         gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
0132                 };
0133 
0134                 led-10 {
0135                         function = LED_FUNCTION_USB;
0136                         function-enumerator = <1>;
0137                         color = <LED_COLOR_ID_GREEN>;
0138                         gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
0139                         linux,default-trigger = "usbport";
0140                         trigger-sources = <&hub_port2>;
0141                 };
0142 
0143                 led-11 {
0144                         function = LED_FUNCTION_USB;
0145                         function-enumerator = <2>;
0146                         color = <LED_COLOR_ID_RED>;
0147                         gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
0148                 };
0149 
0150                 led-12 {
0151                         function = LED_FUNCTION_USB;
0152                         function-enumerator = <2>;
0153                         color = <LED_COLOR_ID_GREEN>;
0154                         gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
0155                         linux,default-trigger = "usbport";
0156                         trigger-sources = <&hub_port1>;
0157                 };
0158         };
0159 };
0160 
0161 &eth0 {
0162         status = "okay";
0163 };
0164 
0165 &eth0port {
0166         phy-handle = <&ethphy9>;
0167 };
0168 
0169 &i2c0 {
0170         status = "okay";
0171 
0172         rtc@30 {
0173                 compatible = "s35390a";
0174                 reg = <0x30>;
0175         };
0176 
0177         lm63@4c {
0178                 compatible = "national,lm63";
0179                 reg = <0x4c>;
0180         };
0181 };
0182 
0183 &mdio {
0184         status = "okay";
0185 
0186         ethphy9: ethernet-phy@9 {
0187                 reg = <9>;
0188         };
0189 };
0190 
0191 &nand {
0192         status = "okay";
0193         chip-delay = <40>;
0194 
0195         partition@0 {
0196                 label = "uboot";
0197                 reg = <0x0000000 0x200000>;
0198         };
0199 
0200         partition@200000 {
0201                 label = "certificate";
0202                 reg = <0x0200000 0x100000>;
0203         };
0204 
0205         partition@300000 {
0206                 label = "preset_cfg";
0207                 reg = <0x0300000 0x100000>;
0208         };
0209 
0210         partition@400000 {
0211                 label = "dev_params";
0212                 reg = <0x0400000 0x100000>;
0213         };
0214 
0215         partition@500000 {
0216                 label = "active_bank";
0217                 reg = <0x0500000 0x0100000>;
0218         };
0219 
0220         partition@600000 {
0221                 label = "magic";
0222                 reg = <0x0600000 0x0100000>;
0223         };
0224 
0225         partition@700000 {
0226                 label = "bank1";
0227                 reg = <0x0700000 0x2800000>;
0228         };
0229 
0230         partition@2f00000 {
0231                 label = "bank2";
0232                 reg = <0x2f00000 0x2800000>;
0233         };
0234 
0235         /* 0x5700000-0x5a00000 undefined in vendor firmware */
0236 
0237         partition@5a00000 {
0238                 label = "reserved";
0239                 reg = <0x5a00000 0x2000000>;
0240         };
0241 
0242         partition@7a00000 {
0243                 label = "rootfs";
0244                 reg = <0x7a00000 0x8600000>;
0245         };
0246 };
0247 
0248 &pinctrl {
0249         /* Buzzer gpios are connected to two pins of buzzer.
0250          * This buzzer require a modulated signal from gpio.
0251          * Leave it as is due lack of proper driver.
0252          */
0253         pmx_buzzer: pmx-buzzer {
0254                 marvell,pins = "mpp12", "mpp13";
0255                 marvell,function = "gpio";
0256         };
0257 
0258         pmx_leds: pmx-leds {
0259                 marvell,pins = "mpp14", "mpp15", "mpp16", "mpp17", "mpp38",
0260                                "mpp39", "mpp40", "mpp42", "mpp43", "mpp44",
0261                                "mpp45", "mpp46", "mpp47";
0262                 marvell,function = "gpio";
0263         };
0264 
0265         pmx_buttons: pmx-buttons {
0266                 marvell,pins = "mpp28", "mpp29", "mpp48", "mpp49";
0267                 marvell,function = "gpio";
0268         };
0269 
0270         pmx_poweroff: pmx-poweroff {
0271                 marvell,pins = "mpp34";
0272                 marvell,function = "gpio";
0273         };
0274 };
0275 
0276 &rtc {
0277         status = "disabled";
0278 };
0279 
0280 &sata {
0281         status = "okay";
0282         nr-ports = <2>;
0283 };
0284 
0285 &uart0 {
0286         status = "okay";
0287 };
0288 
0289 &usb0 {
0290         #address-cells = <1>;
0291         #size-cells = <0>;
0292         status = "okay";
0293 
0294         port@1 {
0295                 #address-cells = <1>;
0296                 #size-cells = <0>;
0297                 reg = <1>;
0298                 #trigger-source-cells = <0>;
0299 
0300                 hub_port1: port@1 {
0301                         reg = <1>;
0302                         #trigger-source-cells = <0>;
0303                 };
0304 
0305                 hub_port2: port@2 {
0306                         reg = <2>;
0307                         #trigger-source-cells = <0>;
0308                 };
0309         };
0310 };