Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
0002 
0003 #include <dt-bindings/gpio/gpio.h>
0004 #include <dt-bindings/input/input.h>
0005 #include <dt-bindings/leds/common.h>
0006 
0007 #include "bcm4906.dtsi"
0008 
0009 / {
0010         compatible = "tplink,archer-c2300-v1", "brcm,bcm4906", "brcm,bcm4908";
0011         model = "TP-Link Archer C2300 V1";
0012 
0013         memory@0 {
0014                 device_type = "memory";
0015                 reg = <0x00 0x00 0x00 0x20000000>;
0016         };
0017 
0018         leds {
0019                 compatible = "gpio-leds";
0020 
0021                 led-power {
0022                         function = LED_FUNCTION_POWER;
0023                         color = <LED_COLOR_ID_BLUE>;
0024                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
0025                 };
0026 
0027                 led-2ghz {
0028                         function = "2ghz";
0029                         color = <LED_COLOR_ID_BLUE>;
0030                         gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
0031                 };
0032 
0033                 led-5ghz {
0034                         function = "5ghz";
0035                         color = <LED_COLOR_ID_BLUE>;
0036                         gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
0037                 };
0038 
0039                 led-wan-amber {
0040                         function = LED_FUNCTION_WAN;
0041                         color = <LED_COLOR_ID_AMBER>;
0042                         gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
0043                 };
0044 
0045                 led-wan-blue {
0046                         function = LED_FUNCTION_WAN;
0047                         color = <LED_COLOR_ID_BLUE>;
0048                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
0049                 };
0050 
0051                 led-lan {
0052                         function = LED_FUNCTION_LAN;
0053                         color = <LED_COLOR_ID_BLUE>;
0054                         gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
0055                 };
0056 
0057                 led-wps {
0058                         function = LED_FUNCTION_WPS;
0059                         color = <LED_COLOR_ID_BLUE>;
0060                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
0061                 };
0062 
0063                 led-usb2 {
0064                         function = "usb2";
0065                         color = <LED_COLOR_ID_BLUE>;
0066                         gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
0067                 };
0068 
0069                 led-usb3 {
0070                         function = "usbd3";
0071                         color = <LED_COLOR_ID_BLUE>;
0072                         gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
0073                 };
0074 
0075                 led-brightness {
0076                         function = LED_FUNCTION_BACKLIGHT;
0077                         color = <LED_COLOR_ID_WHITE>;
0078                         gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
0079                 };
0080         };
0081 
0082         gpio-keys-polled {
0083                 compatible = "gpio-keys-polled";
0084                 poll-interval = <100>;
0085 
0086                 key-brightness {
0087                         label = "LEDs";
0088                         linux,code = <KEY_BRIGHTNESS_ZERO>;
0089                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
0090                 };
0091 
0092                 key-wps {
0093                         label = "WPS";
0094                         linux,code = <KEY_WPS_BUTTON>;
0095                         gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
0096                 };
0097 
0098                 key-wifi {
0099                         label = "WiFi";
0100                         linux,code = <KEY_RFKILL>;
0101                         gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
0102                 };
0103 
0104                 key-restart {
0105                         label = "Reset";
0106                         linux,code = <KEY_RESTART>;
0107                         gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
0108                 };
0109         };
0110 };
0111 
0112 &usb_phy {
0113         brcm,ioc = <1>;
0114         status = "okay";
0115 };
0116 
0117 &ehci {
0118         status = "okay";
0119 };
0120 
0121 &ohci {
0122         status = "okay";
0123 };
0124 
0125 &xhci {
0126         status = "okay";
0127 };
0128 
0129 &ports {
0130         port@0 {
0131                 label = "lan4";
0132         };
0133 
0134         port@1 {
0135                 label = "lan3";
0136         };
0137 
0138         port@2 {
0139                 label = "lan2";
0140         };
0141 
0142         port@3 {
0143                 label = "lan1";
0144         };
0145 
0146         port@7 {
0147                 reg = <7>;
0148                 phy-mode = "internal";
0149                 phy-handle = <&phy12>;
0150                 label = "wan";
0151         };
0152 };
0153 
0154 &nandcs {
0155         nand-ecc-strength = <4>;
0156         nand-ecc-step-size = <512>;
0157         nand-on-flash-bbt;
0158 
0159         #address-cells = <1>;
0160         #size-cells = <0>;
0161 
0162         partitions {
0163                 compatible = "brcm,bcm4908-partitions";
0164                 #address-cells = <1>;
0165                 #size-cells = <1>;
0166 
0167                 partition@0 {
0168                         label = "cferom";
0169                         reg = <0x0 0x100000>;
0170                 };
0171 
0172                 partition@100000 {
0173                         compatible = "brcm,bcm4908-firmware";
0174                         reg = <0x100000 0x3900000>;
0175                 };
0176 
0177                 partition@5800000 {
0178                         compatible = "brcm,bcm4908-firmware";
0179                         reg = <0x3a00000 0x3900000>;
0180                 };
0181         };
0182 };