1*724ba675SRob Herring// SPDX-License-Identifier: GPL-2.0-or-later OR MIT 2*724ba675SRob Herring/* 3*724ba675SRob Herring * Broadcom BCM470X / BCM5301X ARM platform code. 4*724ba675SRob Herring * DTS for Buffalo WZR-1166DHP and WZR-1166DHP2 5*724ba675SRob Herring * 6*724ba675SRob Herring * Copyright (C) 2014 Rafał Miłecki <zajec5@gmail.com> 7*724ba675SRob Herring * Copyright (C) 2022 SHIMAMOTO Takayoshi <takayoshi.shimamoto.360@gmail.com> 8*724ba675SRob Herring */ 9*724ba675SRob Herring 10*724ba675SRob Herring 11*724ba675SRob Herring#include "bcm4708.dtsi" 12*724ba675SRob Herring#include "bcm5301x-nand-cs0-bch8.dtsi" 13*724ba675SRob Herring#include <dt-bindings/leds/common.h> 14*724ba675SRob Herring 15*724ba675SRob Herring/ { 16*724ba675SRob Herring spi { 17*724ba675SRob Herring compatible = "spi-gpio"; 18*724ba675SRob Herring num-chipselects = <1>; 19*724ba675SRob Herring sck-gpios = <&chipcommon 7 0>; 20*724ba675SRob Herring mosi-gpios = <&chipcommon 4 0>; 21*724ba675SRob Herring cs-gpios = <&chipcommon 6 0>; 22*724ba675SRob Herring #address-cells = <1>; 23*724ba675SRob Herring #size-cells = <0>; 24*724ba675SRob Herring 25*724ba675SRob Herring hc595: gpio_spi@0 { 26*724ba675SRob Herring compatible = "fairchild,74hc595"; 27*724ba675SRob Herring reg = <0>; 28*724ba675SRob Herring registers-number = <1>; 29*724ba675SRob Herring spi-max-frequency = <100000>; 30*724ba675SRob Herring 31*724ba675SRob Herring gpio-controller; 32*724ba675SRob Herring #gpio-cells = <2>; 33*724ba675SRob Herring 34*724ba675SRob Herring }; 35*724ba675SRob Herring }; 36*724ba675SRob Herring 37*724ba675SRob Herring leds { 38*724ba675SRob Herring compatible = "gpio-leds"; 39*724ba675SRob Herring 40*724ba675SRob Herring led-usb { 41*724ba675SRob Herring /* label = "bcm53xx:blue:usb"; */ 42*724ba675SRob Herring function = LED_FUNCTION_USB; 43*724ba675SRob Herring color = <LED_COLOR_ID_BLUE>; 44*724ba675SRob Herring gpios = <&hc595 0 GPIO_ACTIVE_HIGH>; 45*724ba675SRob Herring trigger-sources = <&ohci_port1>, <&ehci_port1>, 46*724ba675SRob Herring <&xhci_port1>, <&ohci_port2>, 47*724ba675SRob Herring <&ehci_port2>; 48*724ba675SRob Herring linux,default-trigger = "usbport"; 49*724ba675SRob Herring }; 50*724ba675SRob Herring 51*724ba675SRob Herring led-power0 { 52*724ba675SRob Herring /* label = "bcm53xx:red:power"; */ 53*724ba675SRob Herring function = LED_FUNCTION_FAULT; 54*724ba675SRob Herring color = <LED_COLOR_ID_RED>; 55*724ba675SRob Herring gpios = <&hc595 1 GPIO_ACTIVE_HIGH>; 56*724ba675SRob Herring }; 57*724ba675SRob Herring 58*724ba675SRob Herring led-power1 { 59*724ba675SRob Herring /* label = "bcm53xx:white:power"; */ 60*724ba675SRob Herring function = LED_FUNCTION_POWER; 61*724ba675SRob Herring color = <LED_COLOR_ID_WHITE>; 62*724ba675SRob Herring gpios = <&hc595 2 GPIO_ACTIVE_HIGH>; 63*724ba675SRob Herring linux,default-trigger = "default-on"; 64*724ba675SRob Herring }; 65*724ba675SRob Herring 66*724ba675SRob Herring led-router0 { 67*724ba675SRob Herring /* label = "bcm53xx:blue:router"; */ 68*724ba675SRob Herring function = LED_FUNCTION_STATUS; 69*724ba675SRob Herring color = <LED_COLOR_ID_BLUE>; 70*724ba675SRob Herring gpios = <&hc595 3 GPIO_ACTIVE_HIGH>; 71*724ba675SRob Herring linux,default-trigger = "default-on"; 72*724ba675SRob Herring }; 73*724ba675SRob Herring 74*724ba675SRob Herring led-router1 { 75*724ba675SRob Herring /* label = "bcm53xx:amber:router"; */ 76*724ba675SRob Herring function = LED_FUNCTION_STATUS; 77*724ba675SRob Herring color = <LED_COLOR_ID_AMBER>; 78*724ba675SRob Herring gpios = <&hc595 4 GPIO_ACTIVE_HIGH>; 79*724ba675SRob Herring }; 80*724ba675SRob Herring 81*724ba675SRob Herring led-wan { 82*724ba675SRob Herring /* label = "bcm53xx:blue:wan"; */ 83*724ba675SRob Herring function = LED_FUNCTION_WAN; 84*724ba675SRob Herring color = <LED_COLOR_ID_BLUE>; 85*724ba675SRob Herring gpios = <&hc595 5 GPIO_ACTIVE_HIGH>; 86*724ba675SRob Herring linux,default-trigger = "default-on"; 87*724ba675SRob Herring }; 88*724ba675SRob Herring 89*724ba675SRob Herring led-wireless0 { 90*724ba675SRob Herring /* label = "bcm53xx:blue:wireless"; */ 91*724ba675SRob Herring function = LED_FUNCTION_WLAN; 92*724ba675SRob Herring color = <LED_COLOR_ID_BLUE>; 93*724ba675SRob Herring gpios = <&hc595 6 GPIO_ACTIVE_HIGH>; 94*724ba675SRob Herring }; 95*724ba675SRob Herring 96*724ba675SRob Herring led-wireless1 { 97*724ba675SRob Herring /* label = "bcm53xx:amber:wireless"; */ 98*724ba675SRob Herring function = LED_FUNCTION_WLAN; 99*724ba675SRob Herring color = <LED_COLOR_ID_AMBER>; 100*724ba675SRob Herring gpios = <&hc595 7 GPIO_ACTIVE_HIGH>; 101*724ba675SRob Herring }; 102*724ba675SRob Herring }; 103*724ba675SRob Herring 104*724ba675SRob Herring gpio-keys { 105*724ba675SRob Herring compatible = "gpio-keys"; 106*724ba675SRob Herring 107*724ba675SRob Herring button-restart { 108*724ba675SRob Herring label = "Reset"; 109*724ba675SRob Herring linux,code = <KEY_RESTART>; 110*724ba675SRob Herring gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; 111*724ba675SRob Herring }; 112*724ba675SRob Herring 113*724ba675SRob Herring button-aoss { 114*724ba675SRob Herring label = "AOSS"; 115*724ba675SRob Herring linux,code = <KEY_WPS_BUTTON>; 116*724ba675SRob Herring gpios = <&chipcommon 12 GPIO_ACTIVE_LOW>; 117*724ba675SRob Herring }; 118*724ba675SRob Herring 119*724ba675SRob Herring /* Commit mode set by switch? */ 120*724ba675SRob Herring button-mode { 121*724ba675SRob Herring label = "Mode"; 122*724ba675SRob Herring linux,code = <KEY_SETUP>; 123*724ba675SRob Herring gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>; 124*724ba675SRob Herring }; 125*724ba675SRob Herring 126*724ba675SRob Herring /* Switch: AP mode */ 127*724ba675SRob Herring button-sw-ap { 128*724ba675SRob Herring label = "AP"; 129*724ba675SRob Herring linux,code = <BTN_0>; 130*724ba675SRob Herring gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>; 131*724ba675SRob Herring }; 132*724ba675SRob Herring 133*724ba675SRob Herring button-eject { 134*724ba675SRob Herring label = "USB eject"; 135*724ba675SRob Herring linux,code = <KEY_EJECTCD>; 136*724ba675SRob Herring gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; 137*724ba675SRob Herring }; 138*724ba675SRob Herring }; 139*724ba675SRob Herring}; 140*724ba675SRob Herring 141*724ba675SRob Herring&usb2 { 142*724ba675SRob Herring vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>; 143*724ba675SRob Herring}; 144*724ba675SRob Herring 145*724ba675SRob Herring&usb3 { 146*724ba675SRob Herring vcc-gpio = <&chipcommon 10 GPIO_ACTIVE_LOW>; 147*724ba675SRob Herring}; 148*724ba675SRob Herring 149*724ba675SRob Herring&spi_nor { 150*724ba675SRob Herring status = "okay"; 151*724ba675SRob Herring}; 152*724ba675SRob Herring 153*724ba675SRob Herring&usb3_phy { 154*724ba675SRob Herring status = "okay"; 155*724ba675SRob Herring}; 156*724ba675SRob Herring 157*724ba675SRob Herring&srab { 158*724ba675SRob Herring status = "okay"; 159*724ba675SRob Herring 160*724ba675SRob Herring ports { 161*724ba675SRob Herring port@0 { 162*724ba675SRob Herring label = "lan1"; 163*724ba675SRob Herring }; 164*724ba675SRob Herring 165*724ba675SRob Herring port@1 { 166*724ba675SRob Herring label = "lan2"; 167*724ba675SRob Herring }; 168*724ba675SRob Herring 169*724ba675SRob Herring port@2 { 170*724ba675SRob Herring label = "lan3"; 171*724ba675SRob Herring }; 172*724ba675SRob Herring 173*724ba675SRob Herring port@3 { 174*724ba675SRob Herring label = "lan4"; 175*724ba675SRob Herring }; 176*724ba675SRob Herring 177*724ba675SRob Herring port@4 { 178*724ba675SRob Herring label = "wan"; 179*724ba675SRob Herring }; 180*724ba675SRob Herring 181*724ba675SRob Herring port@5 { 182*724ba675SRob Herring label = "cpu"; 183*724ba675SRob Herring }; 184*724ba675SRob Herring }; 185*724ba675SRob Herring}; 186