code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Broadcom BCM470X / BCM5301X ARM platform code.
 * DTS for Buffalo WZR-1166DHP and WZR-1166DHP2
 *
 * Copyright (C) 2014 Rafał Miłecki <zajec5@gmail.com>
 * Copyright (C) 2022 SHIMAMOTO Takayoshi <takayoshi.shimamoto.360@gmail.com>
 */

#include "bcm4708.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"
#include <dt-bindings/leds/common.h>

/ {
	spi {
		compatible = "spi-gpio";
		num-chipselects = <1>;
		gpio-sck = <&chipcommon 7 0>;
		gpio-mosi = <&chipcommon 4 0>;
		cs-gpios = <&chipcommon 6 0>;
		#address-cells = <1>;
		#size-cells = <0>;

		hc595: gpio_spi@0 {
			compatible = "fairchild,74hc595";
			reg = <0>;
			registers-number = <1>;
			spi-max-frequency = <100000>;

			gpio-controller;
			#gpio-cells = <2>;

		};
	};

	leds {
		compatible = "gpio-leds";

		led-usb {
			/* label = "bcm53xx:blue:usb"; */
			function = LED_FUNCTION_USB;
			color = <LED_COLOR_ID_BLUE>;
			gpios = <&hc595 0 GPIO_ACTIVE_HIGH>;
			trigger-sources = <&ohci_port1>, <&ehci_port1>,
					  <&xhci_port1>, <&ohci_port2>,
					  <&ehci_port2>;
			linux,default-trigger = "usbport";
		};

		led-power0 {
			/* label = "bcm53xx:red:power"; */
			function = LED_FUNCTION_FAULT;
			color = <LED_COLOR_ID_RED>;
			gpios = <&hc595 1 GPIO_ACTIVE_HIGH>;
		};

		led-power1 {
			/* label = "bcm53xx:white:power"; */
			function = LED_FUNCTION_POWER;
			color = <LED_COLOR_ID_WHITE>;
			gpios = <&hc595 2 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		led-router0 {
			/*  label = "bcm53xx:blue:router"; */
			function = LED_FUNCTION_STATUS;
			color = <LED_COLOR_ID_BLUE>;
			gpios = <&hc595 3 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		led-router1 {
			/* label = "bcm53xx:amber:router"; */
			function = LED_FUNCTION_STATUS;
			color = <LED_COLOR_ID_AMBER>;
			gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
		};

		led-wan {
			/* label = "bcm53xx:blue:wan"; */
			function = LED_FUNCTION_WAN;
			color = <LED_COLOR_ID_BLUE>;
			gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		led-wireless0 {
			/* label = "bcm53xx:blue:wireless"; */
			function = LED_FUNCTION_WLAN;
			color = <LED_COLOR_ID_BLUE>;
			gpios = <&hc595 6 GPIO_ACTIVE_HIGH>;
		};

		led-wireless1 {
			/* label = "bcm53xx:amber:wireless"; */
			function = LED_FUNCTION_WLAN;
			color = <LED_COLOR_ID_AMBER>;
			gpios = <&hc595 7 GPIO_ACTIVE_HIGH>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
		};

		button-aoss {
			label = "AOSS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 12 GPIO_ACTIVE_LOW>;
		};

		/* Commit mode set by switch? */
		button-mode {
			label = "Mode";
			linux,code = <KEY_SETUP>;
			gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
		};

		/* Switch: AP mode */
		button-sw-ap {
			label = "AP";
			linux,code = <BTN_0>;
			gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
		};

		button-eject {
			label = "USB eject";
			linux,code = <KEY_EJECTCD>;
			gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>;
		};
	};
};

&usb2 {
	vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
};

&usb3 {
	vcc-gpio = <&chipcommon 10 GPIO_ACTIVE_LOW>;
};

&spi_nor {
	status = "okay";
};

&usb3_phy {
	status = "okay";
};

&srab {
	status = "okay";

	ports {
		port@0 {
			reg = <0>;
			label = "lan1";
		};

		port@1 {
			reg = <1>;
			label = "lan2";
		};

		port@2 {
			reg = <2>;
			label = "lan3";
		};

		port@3 {
			reg = <3>;
			label = "lan4";
		};

		port@4 {
			reg = <4>;
			label = "wan";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Device Tree Bindigs for Buffalo WZR-1166DHP
 *
 * Copyright (C) 2022 SHIMAMOTO Takayoshi <takayoshi.shimamoto.360@gmail.com>
 */

/dts-v1/;

#include "bcm4708-buffalo-wzr-1166dhp-common.dtsi"

/ {
	compatible = "buffalo,wzr-1166dhp", "brcm,bcm4708";
	model = "Buffalo WZR-1166DHP";

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x18000000>;
	};

};

repo_name: angery/linux


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Device Tree Bindigs for Buffalo WZR-1166DHP2
 *
 * Copyright (C) 2022 SHIMAMOTO Takayoshi <takayoshi.shimamoto.360@gmail.com>
 */

/dts-v1/;

#include "bcm4708-buffalo-wzr-1166dhp-common.dtsi"

/ {
	compatible = "buffalo,wzr-1166dhp2", "brcm,bcm4708";
	model = "Buffalo WZR-1166DHP2";

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x08000000>;
	};

};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Broadcom BCM470X / BCM5301X ARM platform code.
 * DTS for Buffalo WZR-1750DHP
 *
 * Copyright (C) 2014 Rafał Miłecki <zajec5@gmail.com>
 */

/dts-v1/;

#include "bcm4708.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "buffalo,wzr-1750dhp", "brcm,bcm4708";
	model = "Buffalo WZR-1750DHP (BCM4708)";

	chosen {
		bootargs = "console=ttyS0,115200 earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x18000000>;
	};

	spi {
		compatible = "spi-gpio";
		num-chipselects = <1>;
		gpio-sck = <&chipcommon 7 0>;
		gpio-mosi = <&chipcommon 4 0>;
		cs-gpios = <&chipcommon 6 0>;
		#address-cells = <1>;
		#size-cells = <0>;

		hc595: gpio_spi@0 {
			compatible = "fairchild,74hc595";
			reg = <0>;
			registers-number = <1>;
			spi-max-frequency = <100000>;

			gpio-controller;
			#gpio-cells = <2>;

		};
	};

	leds {
		compatible = "gpio-leds";

		led-usb {
			label = "bcm53xx:blue:usb";
			gpios = <&hc595 0 GPIO_ACTIVE_HIGH>;
			trigger-sources = <&ohci_port1>, <&ehci_port1>,
					  <&xhci_port1>, <&ohci_port2>,
					  <&ehci_port2>;
			linux,default-trigger = "usbport";
		};

		led-power0 {
			label = "bcm53xx:red:power";
			gpios = <&hc595 1 GPIO_ACTIVE_HIGH>;
		};

		led-power1 {
			label = "bcm53xx:white:power";
			gpios = <&hc595 2 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		led-router0 {
			label = "bcm53xx:blue:router";
			gpios = <&hc595 3 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		led-router1 {
			label = "bcm53xx:amber:router";
			gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
		};

		led-wan {
			label = "bcm53xx:blue:wan";
			gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		led-wireless0 {
			label = "bcm53xx:blue:wireless";
			gpios = <&hc595 6 GPIO_ACTIVE_HIGH>;
		};

		led-wireless1 {
			label = "bcm53xx:amber:wireless";
			gpios = <&hc595 7 GPIO_ACTIVE_HIGH>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
		};

		button-aoss {
			label = "AOSS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 12 GPIO_ACTIVE_LOW>;
		};

		/* Commit mode set by switch? */
		button-mode {
			label = "Mode";
			linux,code = <KEY_SETUP>;
			gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
		};

		/* Switch: AP mode */
		button-sw-ap {
			label = "AP";
			linux,code = <BTN_0>;
			gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
		};

		button-eject {
			label = "USB eject";
			linux,code = <KEY_EJECTCD>;
			gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>;
		};
	};
};

&usb2 {
	vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
};

&usb3 {
	vcc-gpio = <&chipcommon 10 GPIO_ACTIVE_LOW>;
};

&spi_nor {
	status = "okay";
};

&usb3_phy {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright (C) 2017 Rafał Miłecki <rafal@milecki.pl>
 */

/dts-v1/;

#include "bcm4708.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "linksys,ea6300-v1", "brcm,bcm4708";
	model = "Linksys EA6300 V1";

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>;
	};

	nvram@1c080000 {
		compatible = "brcm,nvram";
		reg = <0x1c080000 0x180000>;
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-wps {
			label = "WPS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
		};

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
		};
	};
};

&usb3_phy {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright (C) 2017 Rafał Miłecki <rafal@milecki.pl>
 * Copyright (C) 2018 Rene Kjellerup <rk.katana.steel@gmail.com>
 */

/dts-v1/;

#include "bcm4708.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "linksys,ea6500-v2", "brcm,bcm4708";
	model = "Linksys EA6500 V2";

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>;
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-wps {
			label = "WPS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
		};

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
		};
	};
};

&usb3_phy {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2016 Luxul Inc.
 */

/dts-v1/;

#include "bcm4708.dtsi"

/ {
	compatible = "luxul,xap-1510v1", "brcm,bcm4708";
	model = "Luxul XAP-1510 V1";

	chosen {
		bootargs = "console=ttyS0,115200 earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>;
	};

	leds {
		compatible = "gpio-leds";

		led-5ghz {
			label = "bcm53xx:blue:5ghz";
			gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "none";
		};

		led-2ghz {
			label = "bcm53xx:blue:2ghz";
			gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "none";
		};

		led-status {
			label = "bcm53xx:green:status";
			gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "timer";
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
		};
	};
};

&spi_nor {
	status = "okay";
};

&srab {
	status = "okay";

	ports {
		port@0 {
			reg = <0>;
			label = "poe";
		};

		port@4 {
			reg = <4>;
			label = "lan";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Broadcom BCM470X / BCM5301X ARM platform code.
 * DTS for Luxul XWC-1000
 *
 * Copyright 2014 Luxul Inc.
 */

/dts-v1/;

#include "bcm4708.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "luxul,xwc-1000", "brcm,bcm4708";
	model = "Luxul XWC-1000 (BCM4708)";

	chosen {
		bootargs = "console=ttyS0,115200 earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>;
	};

	nand_controller: nand-controller@18028000 {
		nand@0 {
			partitions {
				compatible = "fixed-partitions";
				#address-cells = <1>;
				#size-cells = <1>;

				partition@0 {
					label = "ubi";
					reg = <0x00000000 0x08000000>;
				};
			};
		};
	};

	leds {
		compatible = "gpio-leds";

		led-status {
			label = "bcm53xx:green:status";
			gpios = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "timer";
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
		};
	};
};

&spi_nor {
	status = "okay";
};

&srab {
	status = "okay";

	ports {
		port@4 {
			reg = <4>;
			label = "lan";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
		};
	};
};


code:
/*
 * Broadcom BCM470X / BCM5301X arm platform code.
 * DTS for Netgear R6250 V1
 *
 * Copyright 2013 Hauke Mehrtens <hauke@hauke-m.de>
 *
 * Licensed under the GNU/GPL. See COPYING for details.
 */

/dts-v1/;

#include "bcm4708.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "netgear,r6250v1", "brcm,bcm4708";
	model = "Netgear R6250 V1 (BCM4708)";

	chosen {
		bootargs = "console=ttyS0,115200 earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x08000000>;
	};

	leds {
		compatible = "gpio-leds";

		led-logo {
			label = "bcm53xx:white:logo";
			gpios = <&chipcommon 1 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		led-power0 {
			label = "bcm53xx:green:power";
			gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "default-on";
		};

		led-power1 {
			label = "bcm53xx:amber:power";
			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
		};

		led-usb {
			label = "bcm53xx:blue:usb";
			gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
			trigger-sources = <&ohci_port1>, <&ehci_port1>,
					  <&xhci_port1>;
			linux,default-trigger = "usbport";
		};

		led-wireless {
			label = "bcm53xx:blue:wireless";
			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-wps {
			label = "WPS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
		};

		button-rfkill {
			label = "WiFi";
			linux,code = <KEY_RFKILL>;
			gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>;
		};

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>;
		};
	};
};

&usb3 {
	vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
};

&spi_nor {
	status = "okay";
};

&usb3_phy {
	status = "okay";
};

&srab {
	status = "okay";

	ports {
		port@0 {
			reg = <0>;
			label = "lan4";
		};

		port@1 {
			reg = <1>;
			label = "lan3";
		};

		port@2 {
			reg = <2>;
			label = "lan2";
		};

		port@3 {
			reg = <3>;
			label = "lan1";
		};

		port@4 {
			reg = <4>;
			label = "wan";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Broadcom BCM470X / BCM5301X ARM platform code.
 * DTS for Netgear R6300 V2
 *
 * Copyright (C) 2014 Rafał Miłecki <zajec5@gmail.com>
 */

/dts-v1/;

#include "bcm4708.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "netgear,r6300v2", "brcm,bcm4708";
	model = "Netgear R6300 V2 (BCM4708)";

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x08000000>;
	};

	leds {
		compatible = "gpio-leds";

		led-logo {
			label = "bcm53xx:white:logo";
			gpios = <&chipcommon 1 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		led-power0 {
			label = "bcm53xx:green:power";
			gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
		};

		led-power1 {
			label = "bcm53xx:amber:power";
			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "default-on";
		};

		led-usb {
			label = "bcm53xx:blue:usb";
			gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
		};

		led-wireless {
			label = "bcm53xx:blue:wireless";
			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-wps {
			label = "WPS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
		};

		button-rfkill {
			label = "WiFi";
			linux,code = <KEY_RFKILL>;
			gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>;
		};

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>;
		};
	};
};

&spi_nor {
	status = "okay";
};

&usb3_phy {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Broadcom BCM470X / BCM5301X arm platform code.
 * DTS for SmartRG SR400ac
 *
 * Copyright (C) 2015 Rafał Miłecki <zajec5@gmail.com>
 */

/dts-v1/;

#include "bcm4708.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "smartrg,sr400ac", "brcm,bcm4708";
	model = "SmartRG SR400ac";

	chosen {
		bootargs = "console=ttyS0,115200 earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x08000000>;
	};

	leds {
		compatible = "gpio-leds";

		led-power-white {
			label = "bcm53xx:white:power";
			gpios = <&chipcommon 1 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		led-power-amber {
			label = "bcm53xx:amber:power";
			gpios = <&chipcommon 2 GPIO_ACTIVE_HIGH>;
		};

		led-usb2 {
			label = "bcm53xx:white:usb2";
			gpios = <&chipcommon 3 GPIO_ACTIVE_HIGH>;
			trigger-sources = <&ohci_port2>, <&ehci_port2>;
			linux,default-trigger = "usbport";
		};

		led-usb3-white {
			label = "bcm53xx:white:usb3";
			gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
			trigger-sources = <&xhci_port1>;
			linux,default-trigger = "usbport";
		};

		led-usb3-green {
			label = "bcm53xx:green:usb3";
			gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
			trigger-sources = <&ohci_port1>, <&ehci_port1>;
			linux,default-trigger = "usbport";
		};

		led-wps {
			label = "bcm53xx:white:wps";
			gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
		};

		led-status-red {
			label = "bcm53xx:red:status";
			gpios = <&chipcommon 8 GPIO_ACTIVE_HIGH>;
		};

		led-status-green {
			label = "bcm53xx:green:status";
			gpios = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
		};

		led-status-blue {
			label = "bcm53xx:blue:status";
			gpios = <&chipcommon 10 GPIO_ACTIVE_HIGH>;
		};

		led-wan-white {
			label = "bcm53xx:white:wan";
			gpios = <&chipcommon 12 GPIO_ACTIVE_HIGH>;
		};

		led-wan-red {
			label = "bcm53xx:red:wan";
			gpios = <&chipcommon 13 GPIO_ACTIVE_HIGH>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-rfkill {
			label = "WiFi";
			linux,code = <KEY_RFKILL>;
			gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
		};

		button-wps {
			label = "WPS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
		};

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
		};
	};
};

&spi_nor {
	status = "okay";
};

&srab {
	status = "okay";

	ports {
		port@0 {
			reg = <0>;
			label = "lan4";
		};

		port@1 {
			reg = <1>;
			label = "lan3";
		};

		port@2 {
			reg = <2>;
			label = "lan2";
		};

		port@3 {
			reg = <3>;
			label = "lan1";
		};

		port@4 {
			reg = <4>;
			label = "wan";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
		};
	};
};

&usb3_phy {
	status = "okay";
};


code:
/*
 * Broadcom BCM470X / BCM5301X ARM platform code.
 * DTS for BCM4708 SoC.
 *
 * Copyright 2013-2014 Hauke Mehrtens <hauke@hauke-m.de>
 *
 * Licensed under the GNU/GPL. See COPYING for details.
 */

#include "bcm5301x.dtsi"

/ {
	compatible = "brcm,bcm4708";

	aliases {
		serial0 = &uart0;
	};

	chosen {
		stdout-path = "serial0:115200n8";
	};

	cpus {
		#address-cells = <1>;
		#size-cells = <0>;
		enable-method = "brcm,bcm-nsp-smp";

		cpu@0 {
			device_type = "cpu";
			compatible = "arm,cortex-a9";
			next-level-cache = <&L2>;
			reg = <0x0>;
		};

		cpu@1 {
			device_type = "cpu";
			compatible = "arm,cortex-a9";
			next-level-cache = <&L2>;
			secondary-boot-reg = <0xffff0400>;
			reg = <0x1>;
		};
	};

};

&uart0 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Broadcom BCM470X / BCM5301X ARM platform code.
 * DTS for Asus RT-N18U
 *
 * Copyright (C) 2014 Rafał Miłecki <zajec5@gmail.com>
 */

/dts-v1/;

#include "bcm47081.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "asus,rt-n18u", "brcm,bcm47081", "brcm,bcm4708";
	model = "Asus RT-N18U (BCM47081)";

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x08000000>;
	};

	leds {
		compatible = "gpio-leds";

		led-power {
			label = "bcm53xx:blue:power";
			gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "default-on";
		};

		led-usb2 {
			label = "bcm53xx:blue:usb2";
			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
		};

		led-wan {
			label = "bcm53xx:blue:wan";
			gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "default-on";
		};

		led-lan {
			label = "bcm53xx:blue:lan";
			gpios = <&chipcommon 9 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "default-on";
		};

		led-usb3 {
			label = "bcm53xx:blue:usb3";
			gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
		};

		button-wps {
			label = "WPS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
		};
	};
};

&usb3_phy {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Broadcom BCM470X / BCM5301X ARM platform code.
 * DTS for Buffalo WZR-600DHP2
 *
 * Copyright (C) 2014 Rafał Miłecki <zajec5@gmail.com>
 */

/dts-v1/;

#include "bcm47081.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "buffalo,wzr-600dhp2", "brcm,bcm47081", "brcm,bcm4708";
	model = "Buffalo WZR-600DHP2 (BCM47081)";

	chosen {
		bootargs = "console=ttyS0,115200 earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x08000000>;
	};

	spi {
		compatible = "spi-gpio";
		num-chipselects = <1>;
		gpio-sck = <&chipcommon 7 0>;
		gpio-mosi = <&chipcommon 4 0>;
		cs-gpios = <&chipcommon 6 0>;
		#address-cells = <1>;
		#size-cells = <0>;

		hc595: gpio_spi@0 {
			compatible = "fairchild,74hc595";
			reg = <0>;
			registers-number = <1>;
			spi-max-frequency = <100000>;

			gpio-controller;
			#gpio-cells = <2>;

		};
	};

	leds {
		compatible = "gpio-leds";

		led-power0 {
			label = "bcm53xx:green:power";
			gpios = <&hc595 1 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		led-power1 {
			label = "bcm53xx:red:power";
			gpios = <&hc595 2 GPIO_ACTIVE_HIGH>;
		};

		led-router0 {
			label = "bcm53xx:green:router";
			gpios = <&hc595 3 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		led-router1 {
			label = "bcm53xx:amber:router";
			gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
		};

		led-wan {
			label = "bcm53xx:green:wan";
			gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		led-wireless0 {
			label = "bcm53xx:green:wireless";
			gpios = <&hc595 6 GPIO_ACTIVE_HIGH>;
		};

		led-wireless1 {
			label = "bcm53xx:amber:wireless";
			gpios = <&hc595 7 GPIO_ACTIVE_HIGH>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-aoss {
			label = "AOSS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 9 GPIO_ACTIVE_LOW>;
		};

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
		};

		/* Switch device mode? */
		button-mode {
			label = "Mode";
			linux,code = <KEY_SETUP>;
			gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
		};

		button-eject {
			label = "USB eject";
			linux,code = <KEY_EJECTCD>;
			gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>;
		};
	};
};

&srab {
	status = "okay";

	ports {
		port@0 {
			reg = <0>;
			label = "lan1";
		};

		port@1 {
			reg = <1>;
			label = "lan2";
		};

		port@2 {
			reg = <2>;
			label = "lan3";
		};

		port@3 {
			reg = <3>;
			label = "lan4";
		};

		port@4 {
			reg = <4>;
			label = "wan";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Broadcom BCM470X / BCM5301X ARM platform code.
 * DTS for Buffalo WZR-900DHP
 *
 * Copyright (C) 2015 Rafał Miłecki <zajec5@gmail.com>
 */

/dts-v1/;

#include "bcm47081.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "buffalo,wzr-900dhp", "brcm,bcm47081", "brcm,bcm4708";
	model = "Buffalo WZR-900DHP (BCM47081)";

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x08000000>;
	};

	spi {
		compatible = "spi-gpio";
		num-chipselects = <1>;
		gpio-sck = <&chipcommon 7 0>;
		gpio-mosi = <&chipcommon 4 0>;
		cs-gpios = <&chipcommon 6 0>;
		#address-cells = <1>;
		#size-cells = <0>;

		hc595: gpio_spi@0 {
			compatible = "fairchild,74hc595";
			reg = <0>;
			registers-number = <1>;
			spi-max-frequency = <100000>;

			gpio-controller;
			#gpio-cells = <2>;

		};
	};

	leds {
		compatible = "gpio-leds";

		led-usb {
			label = "bcm53xx:green:usb";
			gpios = <&hc595 0 GPIO_ACTIVE_HIGH>;
		};

		led-power0 {
			label = "bcm53xx:green:power";
			gpios = <&hc595 1 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		led-power1 {
			label = "bcm53xx:red:power";
			gpios = <&hc595 2 GPIO_ACTIVE_HIGH>;
		};

		led-router0 {
			label = "bcm53xx:green:router";
			gpios = <&hc595 3 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		led-router1 {
			label = "bcm53xx:amber:router";
			gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
		};

		led-wan {
			label = "bcm53xx:green:wan";
			gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		led-wireless0 {
			label = "bcm53xx:green:wireless";
			gpios = <&hc595 6 GPIO_ACTIVE_HIGH>;
		};

		led-wireless1 {
			label = "bcm53xx:amber:wireless";
			gpios = <&hc595 7 GPIO_ACTIVE_HIGH>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
		};
	};
};

&usb3_phy {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2017 Luxul Inc.
 */

/dts-v1/;

#include "bcm47081.dtsi"

/ {
	compatible = "luxul,xap-1410v1", "brcm,bcm47081", "brcm,bcm4708";
	model = "Luxul XAP-1410 V1";

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>;
	};

	leds {
		compatible = "gpio-leds";

		led-5ghz {
			label = "bcm53xx:blue:5ghz";
			gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "none";
		};

		led-2ghz {
			label = "bcm53xx:blue:2ghz";
			gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "none";
		};

		led-status {
			label = "bcm53xx:green:status";
			gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "timer";
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
		};
	};
};

&spi_nor {
	status = "okay";
};

&srab {
	status = "okay";

	ports {
		port@4 {
			reg = <4>;
			label = "poe";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2017 Luxul Inc.
 */

/dts-v1/;

#include "bcm47081.dtsi"
#include "bcm5301x-nand-cs0-bch4.dtsi"

/ {
	compatible = "luxul,xwr-1200v1", "brcm,bcm47081", "brcm,bcm4708";
	model = "Luxul XWR-1200 V1";

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>;
	};

	nvram@1eff0000 {
		compatible = "brcm,nvram";
		reg = <0x1eff0000 0x10000>;
	};

	leds {
		compatible = "gpio-leds";

		led-power {
			label = "bcm53xx:green:power";
			gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "default-on";
		};

		led-lan3 {
			label = "bcm53xx:green:lan3";
			gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "none";
		};

		led-lan4 {
			label = "bcm53xx:green:lan4";
			gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "none";
		};

		led-wan {
			label = "bcm53xx:green:wan";
			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "none";
		};

		led-lan2 {
			label = "bcm53xx:green:lan2";
			gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "none";
		};

		led-usb {
			label = "bcm53xx:green:usb";
			gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
			trigger-sources = <&ohci_port2>, <&ehci_port2>;
			linux,default-trigger = "usbport";
		};

		led-status {
			label = "bcm53xx:green:status";
			gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "timer";
		};

		led-2ghz {
			label = "bcm53xx:green:2ghz";
			gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "none";
		};

		led-5ghz {
			label = "bcm53xx:green:5ghz";
			gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "none";
		};

		led-lan1 {
			label = "bcm53xx:green:lan1";
			gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "none";
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
		};
	};
};

&usb2 {
	vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
};

&spi_nor {
	status = "okay";
};

&srab {
	status = "okay";

	ports {
		port@0 {
			reg = <0>;
			label = "lan4";
		};

		port@1 {
			reg = <1>;
			label = "lan3";
		};

		port@2 {
			reg = <2>;
			label = "lan2";
		};

		port@3 {
			reg = <3>;
			label = "lan1";
		};

		port@4 {
			reg = <4>;
			label = "wan";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright (C) 2017 Rafał Miłecki <rafal@milecki.pl>
 */

/dts-v1/;

#include "bcm47081.dtsi"

/ {
	compatible = "tplink,archer-c5-v2", "brcm,bcm47081", "brcm,bcm4708";
	model = "TP-LINK Archer C5 V2";

	chosen {
		bootargs = "earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>;
	};

	leds {
		compatible = "gpio-leds";

		led-2ghz {
			label = "bcm53xx:green:2ghz";
			gpios = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
		};

		led-lan {
			label = "bcm53xx:green:lan";
			gpios = <&chipcommon 1 GPIO_ACTIVE_HIGH>;
		};

		led-usb2-port1 {
			label = "bcm53xx:green:usb2-port1";
			gpios = <&chipcommon 2 GPIO_ACTIVE_HIGH>;
			trigger-sources = <&ohci_port1>, <&ehci_port1>;
			linux,default-trigger = "usbport";
		};

		led-power {
			label = "bcm53xx:green:power";
			gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		led-wan-green {
			label = "bcm53xx:green:wan";
			gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
		};

		led-wps {
			label = "bcm53xx:green:wps";
			gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
		};

		led-wan-amber {
			label = "bcm53xx:amber:wan";
			gpios = <&chipcommon 8 GPIO_ACTIVE_HIGH>;
		};

		led-5ghz {
			label = "bcm53xx:green:5ghz";
			gpios = <&chipcommon 12 GPIO_ACTIVE_HIGH>;
		};

		led-usb2-port2 {
			label = "bcm53xx:green:usb2-port2";
			gpios = <&chipcommon 13 GPIO_ACTIVE_HIGH>;
			trigger-sources = <&ohci_port2>, <&ehci_port2>;
			linux,default-trigger = "usbport";
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-rfkill {
			label = "WiFi";
			linux,code = <KEY_RFKILL>;
			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
		};

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
		};
	};
};

&spi_nor {
	status = "okay";

	partitions {
		compatible = "tplink,safeloader-partitions";
		partitions-table-offset = <0xe50000>;

		partition-os-image {
			compatible = "brcm,trx";
		};

		partition-file-system {
			linux,rootfs;
		};
	};
};

&usb2 {
	vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Broadcom BCM470X / BCM5301X ARM platform code.
 * DTS for BCM47081 SoC.
 *
 * Copyright © 2014 Rafał Miłecki <zajec5@gmail.com>
 */

#include "bcm5301x.dtsi"

/ {
	compatible = "brcm,bcm47081";

	aliases {
		serial0 = &uart0;
	};

	chosen {
		stdout-path = "serial0:115200n8";
	};

	cpus {
		#address-cells = <1>;
		#size-cells = <0>;

		cpu@0 {
			device_type = "cpu";
			compatible = "arm,cortex-a9";
			next-level-cache = <&L2>;
			reg = <0x0>;
		};
	};
};

&uart0 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Broadcom BCM470X / BCM5301X ARM platform code.
 * DTS for Asus RT-AC87U
 *
 * Copyright (C) 2015 Rafał Miłecki <zajec5@gmail.com>
 */

/dts-v1/;

#include "bcm4709.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "asus,rt-ac87u", "brcm,bcm4709", "brcm,bcm4708";
	model = "Asus RT-AC87U";

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x08000000>;
	};

	leds {
		compatible = "gpio-leds";

		led-wps {
			label = "bcm53xx:blue:wps";
			gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
		};

		led-power {
			label = "bcm53xx:blue:power";
			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "default-on";
		};

		led-wan {
			label = "bcm53xx:red:wan";
			gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-wps {
			label = "WPS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
		};

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
		};
	};
};

&usb3_phy {
	status = "okay";
};

&nandcs {
	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		boot@0 {
			label = "boot";
			reg = <0x00000000 0x00080000>;
			read-only;
		};

		nvram@80000 {
			label = "nvram";
			reg = <0x00080000 0x00180000>;
		};

		firmware@200000 {
			label = "firmware";
			reg = <0x00200000 0x07cc0000>;
			compatible = "brcm,trx";
		};

		asus@7ec0000 {
			label = "asus";
			reg = <0x07ec0000 0x00140000>;
			read-only;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Broadcom BCM470X / BCM5301X ARM platform code.
 * DTS for Buffalo WXR-1900DHP
 *
 * Copyright (C) 2015 Felix Fietkau <nbd@openwrt.org>
 */

/dts-v1/;

#include "bcm4709.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "buffalo,wxr-1900dhp", "brcm,bcm4709", "brcm,bcm4708";
	model = "Buffalo WXR-1900DHP";

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x18000000>;
	};

	leds {
		compatible = "gpio-leds";

		led-usb {
			label = "bcm53xx:green:usb";
			gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
		};

		led-power-amber {
			label = "bcm53xx:amber:power";
			gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
		};

		led-power-white {
			label = "bcm53xx:white:power";
			gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		led-router-amber {
			label = "bcm53xx:amber:router";
			gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>;
		};

		led-router-white {
			label = "bcm53xx:white:router";
			gpios = <&chipcommon 8 GPIO_ACTIVE_HIGH>;
		};

		led-wan-amber {
			label = "bcm53xx:amber:wan";
			gpios = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
		};

		led-wan-white {
			label = "bcm53xx:white:wan";
			gpios = <&chipcommon 10 GPIO_ACTIVE_HIGH>;
		};

		led-wireless-amber {
			label = "bcm53xx:amber:wireless";
			gpios = <&chipcommon 11 GPIO_ACTIVE_HIGH>;
		};

		led-wireless-white {
			label = "bcm53xx:white:wireless";
			gpios = <&chipcommon 12 GPIO_ACTIVE_HIGH>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-power {
			label = "Power";
			linux,code = <KEY_POWER>;
			gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
		};

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>;
		};

		button-aoss {
			label = "AOSS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
		};

		/* Commit mode set by switch? */
		button-mode {
			label = "Mode";
			linux,code = <KEY_SETUP>;
			gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
		};

		/* Switch: AP mode */
		button-sw-ap {
			label = "AP";
			linux,code = <BTN_0>;
			gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
		};

		button-eject {
			label = "USB eject";
			linux,code = <KEY_EJECTCD>;
			gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
		};
	};
};

&usb2 {
	vcc-gpio = <&chipcommon 13 GPIO_ACTIVE_HIGH>;
};

&spi_nor {
	status = "okay";
};

&usb3_phy {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright (C) 2017 Rafał Miłecki <rafal@milecki.pl>
 */

/dts-v1/;

#include "bcm4709.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "linksys,ea9200", "brcm,bcm4709", "brcm,bcm4708";
	model = "Linksys EA9200";

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x08000000>;
	};

	nvram@1c080000 {
		compatible = "brcm,nvram";
		reg = <0x1c080000 0x180000>;
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-wps {
			label = "WPS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
		};

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
		};
	};
};

&usb3_phy {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Broadcom BCM470X / BCM5301X ARM platform code.
 * DTS for Netgear R7000
 *
 * Copyright (C) 2015 Rafał Miłecki <zajec5@gmail.com>
 */

/dts-v1/;

#include "bcm4709.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "netgear,r7000", "brcm,bcm4709", "brcm,bcm4708";
	model = "Netgear R7000";

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x08000000>;
	};

	leds {
		compatible = "gpio-leds";

		led-power-white {
			label = "bcm53xx:white:power";
			gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "default-on";
		};

		led-power-amber {
			label = "bcm53xx:amber:power";
			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
		};

		led-5ghz {
			label = "bcm53xx:white:5ghz";
			gpios = <&chipcommon 12 GPIO_ACTIVE_LOW>;
		};

		led-2ghz {
			label = "bcm53xx:white:2ghz";
			gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
		};

		led-wps {
			label = "bcm53xx:white:wps";
			gpios = <&chipcommon 14 GPIO_ACTIVE_HIGH>;
		};

		led-wireless {
			label = "bcm53xx:white:wireless";
			gpios = <&chipcommon 15 GPIO_ACTIVE_HIGH>;
		};

		led-usb3 {
			label = "bcm53xx:white:usb3";
			gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
		};

		led-usb2 {
			label = "bcm53xx:white:usb2";
			gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-wps {
			label = "WPS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
		};

		button-rfkill {
			label = "WiFi";
			linux,code = <KEY_RFKILL>;
			gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>;
		};

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>;
		};
	};
};

&usb2 {
	vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
};

&usb3 {
	vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
};

&usb3_phy {
	status = "okay";
};


code:
/*
 * Broadcom BCM470X / BCM5301X ARM platform code.
 * DTS for Netgear R8000
 *
 * Copyright (C) 2015 Rafał Miłecki <zajec5@gmail.com>
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
 * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 * PERFORMANCE OF THIS SOFTWARE.
 */

/dts-v1/;

#include "bcm4709.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "netgear,r8000", "brcm,bcm4709", "brcm,bcm4708";
	model = "Netgear R8000 (BCM4709)";

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x08000000>;
	};

	leds {
		compatible = "gpio-leds";

		led-power-white {
			label = "bcm53xx:white:power";
			gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "default-on";
		};

		led-power-amber {
			label = "bcm53xx:amber:power";
			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
		};

		led-wan-white {
			label = "bcm53xx:white:wan";
			gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "default-on";
		};

		led-wan-amber {
			label = "bcm53xx:amber:wan";
			gpios = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
		};

		led-5ghz-1 {
			label = "bcm53xx:white:5ghz-1";
			gpios = <&chipcommon 12 GPIO_ACTIVE_LOW>;
		};

		led-2ghz {
			label = "bcm53xx:white:2ghz";
			gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
		};

		led-wireless {
			label = "bcm53xx:white:wireless";
			gpios = <&chipcommon 14 GPIO_ACTIVE_HIGH>;
		};

		led-wps {
			label = "bcm53xx:white:wps";
			gpios = <&chipcommon 15 GPIO_ACTIVE_HIGH>;
		};

		led-5ghz-2 {
			label = "bcm53xx:white:5ghz-2";
			gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
		};

		led-usb3 {
			label = "bcm53xx:white:usb3";
			gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
		};

		led-usb2 {
			label = "bcm53xx:white:usb2";
			gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-rfkill {
			label = "WiFi";
			linux,code = <KEY_RFKILL>;
			gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
		};

		button-wps {
			label = "WPS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>;
		};

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>;
		};

		button-brightness {
			label = "Backlight";
			linux,code = <KEY_BRIGHTNESS_ZERO>;
			gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
		};
	};
};

&pcie0 {
	#address-cells = <3>;
	#size-cells = <2>;

	bridge@0,0,0 {
		reg = <0x0000 0 0 0 0>;

		#address-cells = <3>;
		#size-cells = <2>;

		wifi@0,1,0 {
			reg = <0x0000 0 0 0 0>;
			ieee80211-freq-limit = <5735000 5835000>;
		};
	};
};

&pcie1 {
	#address-cells = <3>;
	#size-cells = <2>;

	bridge@1,0,0 {
		reg = <0x0000 0 0 0 0>;

		#address-cells = <3>;
		#size-cells = <2>;

		bridge@1,1,0 {
			reg = <0x0000 0 0 0 0>;

			#address-cells = <3>;
			#size-cells = <2>;

			bridge@1,2,2 {
				reg = <0x1000 0 0 0 0>;

				#address-cells = <3>;
				#size-cells = <2>;

				wifi@1,4,0 {
					reg = <0x0000 0 0 0 0>;
					ieee80211-freq-limit = <5170000 5730000>;
				};
			};
		};
	};
};

&usb2 {
	vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
};

&usb3 {
	vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
};

&usb3_phy {
	status = "okay";
};

&srab {
	status = "okay";

	ports {
		port@0 {
			reg = <0>;
			label = "lan1";
		};

		port@1 {
			reg = <1>;
			label = "lan2";
		};

		port@2 {
			reg = <2>;
			label = "lan3";
		};

		port@3 {
			reg = <3>;
			label = "lan4";
		};

		port@4 {
			reg = <4>;
			label = "wan";
		};

		port@8 {
			reg = <8>;
			label = "cpu";
			ethernet = <&gmac2>;

			fixed-link {
				speed = <1000>;
				full-duplex;
			};
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright (C) 2016 Rafał Miłecki <rafal@milecki.pl>
 */

/dts-v1/;

#include "bcm4709.dtsi"

/ {
	compatible = "tplink,archer-c9-v1", "brcm,bcm4709", "brcm,bcm4708";
	model = "TP-LINK Archer C9 V1";

	chosen {
		bootargs = "console=ttyS0,115200 earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>;
	};

	leds {
		compatible = "gpio-leds";

		led-lan {
			label = "bcm53xx:blue:lan";
			gpios = <&chipcommon 1 GPIO_ACTIVE_HIGH>;
		};

		led-wps {
			label = "bcm53xx:blue:wps";
			gpios = <&chipcommon 2 GPIO_ACTIVE_HIGH>;
		};

		led-2ghz {
			label = "bcm53xx:blue:2ghz";
			gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
		};

		led-5ghz {
			label = "bcm53xx:blue:5ghz";
			gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
		};

		led-usb3 {
			label = "bcm53xx:blue:usb3";
			gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
			trigger-sources = <&ohci_port1>, <&ehci_port1>,
					  <&xhci_port1>;
			linux,default-trigger = "usbport";
		};

		led-usb2 {
			label = "bcm53xx:blue:usb2";
			gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>;
			trigger-sources = <&ohci_port2>, <&ehci_port2>;
			linux,default-trigger = "usbport";
		};

		led-wan-blue {
			label = "bcm53xx:blue:wan";
			gpios = <&chipcommon 14 GPIO_ACTIVE_HIGH>;
		};

		led-wan-amber {
			label = "bcm53xx:amber:wan";
			gpios = <&chipcommon 15 GPIO_ACTIVE_HIGH>;
		};

		led-power {
			label = "bcm53xx:blue:power";
			gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "default-on";
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-wps {
			label = "WPS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
		};

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
		};
	};
};

&usb2 {
	vcc-gpio = <&chipcommon 13 GPIO_ACTIVE_HIGH>;
};

&usb3 {
	vcc-gpio = <&chipcommon 12 GPIO_ACTIVE_HIGH>;
};

&spi_nor {
	status = "okay";

	partitions {
		compatible = "tplink,safeloader-partitions";
		partitions-table-offset = <0xe50000>;

		partition-os-image {
			compatible = "brcm,trx";
		};

		partition-file-system {
			linux,rootfs;
		};
	};
};

&usb3_phy {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright (C) 2016 Rafał Miłecki <rafal@milecki.pl>
 */

#include "bcm4708.dtsi"

&uart0 {
	clock-frequency = <125000000>;
	status = "okay";
};

&srab {
	compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright (C) 2021-2022 Arınç ÜNAL <arinc.unal@arinc9.com>
 */

/dts-v1/;

#include "bcm47094.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "asus,rt-ac88u", "brcm,bcm47094", "brcm,bcm4708";
	model = "Asus RT-AC88U";

	chosen {
		bootargs = "earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x18000000>;
	};

	nvram@1c080000 {
		compatible = "brcm,nvram";
		reg = <0x1c080000 0x00180000>;

		et1macaddr: et1macaddr {
		};
	};

	leds {
		compatible = "gpio-leds";

		led-power {
			label = "white:power";
			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "default-on";
		};

		led-wan-red {
			label = "red:wan";
			gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
		};

		led-lan {
			label = "white:lan";
			gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
		};

		led-usb2 {
			label = "white:usb2";
			gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
			trigger-sources = <&ehci_port2>;
			linux,default-trigger = "usbport";
		};

		led-usb3 {
			label = "white:usb3";
			gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
			trigger-sources = <&ehci_port1>, <&xhci_port1>;
			linux,default-trigger = "usbport";
		};

		led-wps {
			label = "white:wps";
			gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-wps {
			label = "WPS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
		};

		button-reset {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
		};

		button-wifi {
			label = "Wi-Fi";
			linux,code = <KEY_RFKILL>;
			gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
		};

		button-led {
			label = "Backlight";
			linux,code = <KEY_BRIGHTNESS_ZERO>;
			gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
		};
	};

	switch {
		compatible = "realtek,rtl8365mb";
		/* 7 = MDIO (has input reads), 6 = MDC (clock, output only) */
		mdc-gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
		mdio-gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>;
		reset-gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
		realtek,disable-leds;
		dsa,member = <1 0>;

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;
				label = "lan5";
				phy-handle = <&ethphy0>;
			};

			port@1 {
				reg = <1>;
				label = "lan6";
				phy-handle = <&ethphy1>;
			};

			port@2 {
				reg = <2>;
				label = "lan7";
				phy-handle = <&ethphy2>;
			};

			port@3 {
				reg = <3>;
				label = "lan8";
				phy-handle = <&ethphy3>;
			};

			port@6 {
				reg = <6>;
				label = "cpu";
				ethernet = <&sw0_p5>;
				phy-mode = "rgmii";
				tx-internal-delay-ps = <2000>;
				rx-internal-delay-ps = <2100>;

				fixed-link {
					speed = <1000>;
					full-duplex;
					pause;
				};
			};
		};

		mdio {
			compatible = "realtek,smi-mdio";
			#address-cells = <1>;
			#size-cells = <0>;

			ethphy0: ethernet-phy@0 {
				reg = <0>;
			};

			ethphy1: ethernet-phy@1 {
				reg = <1>;
			};

			ethphy2: ethernet-phy@2 {
				reg = <2>;
			};

			ethphy3: ethernet-phy@3 {
				reg = <3>;
			};
		};
	};
};

&srab {
	compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
	status = "okay";
	dsa,member = <0 0>;

	ports {
		port@0 {
			reg = <0>;
			label = "lan4";
		};

		port@1 {
			reg = <1>;
			label = "lan3";
		};

		port@2 {
			reg = <2>;
			label = "lan2";
		};

		port@3 {
			reg = <3>;
			label = "lan1";
		};

		port@4 {
			reg = <4>;
			label = "wan";
		};

		sw0_p5: port@5 {
			reg = <5>;
			label = "extsw";
			phy-mode = "rgmii";

			fixed-link {
				speed = <1000>;
				full-duplex;
				pause;
			};
		};

		port@7 {
			reg = <7>;
			ethernet = <&gmac1>;
			label = "cpu";

			fixed-link {
				speed = <1000>;
				full-duplex;
			};
		};

		port@8 {
			reg = <8>;
			ethernet = <&gmac2>;
			label = "cpu";

			fixed-link {
				speed = <1000>;
				full-duplex;
			};
		};
	};
};

&gmac0 {
	status = "disabled";
};

&gmac1 {
	nvmem-cells = <&et1macaddr>;
	nvmem-cell-names = "mac-address";
};

&usb2 {
	vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
};

&usb3_phy {
	status = "okay";
};

&nandcs {
	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		partition@0 {
			label = "boot";
			reg = <0x00000000 0x00080000>;
			read-only;
		};

		partition@80000 {
			label = "nvram";
			reg = <0x00080000 0x00180000>;
		};

		partition@200000 {
			label = "firmware";
			reg = <0x00200000 0x07e00000>;
			compatible = "brcm,trx";
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Broadcom BCM470X / BCM5301X ARM platform code.
 * DTS for D-Link DIR-885L
 *
 * Copyright (C) 2016 Rafał Miłecki <zajec5@gmail.com>
 */

/dts-v1/;

#include "bcm47094.dtsi"
#include "bcm5301x-nand-cs0-bch1.dtsi"

/ {
	compatible = "dlink,dir-885l", "brcm,bcm47094", "brcm,bcm4708";
	model = "D-Link DIR-885L";

	chosen {
		bootargs = "console=ttyS0,115200 earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x08000000>;
	};

	nand_controller: nand-controller@18028000 {
		nand@0 {
			partitions {
				compatible = "fixed-partitions";
				#address-cells = <1>;
				#size-cells = <1>;

				partition@0 {
					label = "firmware";
					reg = <0x00000000 0x08000000>;
				};
			};
		};
	};

	leds {
		compatible = "gpio-leds";

		led-power-white {
			label = "bcm53xx:white:power";
			gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "default-on";
		};

		led-wan-white {
			label = "bcm53xx:white:wan";
			gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
		};

		led-power-amber {
			label = "bcm53xx:amber:power";
			gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
		};

		led-wan-amber {
			label = "bcm53xx:amber:wan";
			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
		};

		led-usb3-white {
			label = "bcm53xx:white:usb3";
			gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
			trigger-sources = <&ohci_port1>, <&ehci_port1>,
					  <&xhci_port1>;
			linux,default-trigger = "usbport";
		};

		led-2ghz {
			label = "bcm53xx:white:2ghz";
			gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
		};

		led-5ghz {
			label = "bcm53xx:white:5ghz";
			gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-wps {
			label = "WPS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
		};

		/* Switch: router / extender */
		button-extender {
			label = "Extender";
			linux,code = <BTN_0>;
			gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
		};

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
		};
	};
};

&usb3 {
	vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
};

&spi_nor {
	status = "okay";
};

&usb3_phy {
	status = "okay";
};

&srab {
	status = "okay";

	ports {
		port@0 {
			reg = <0>;
			label = "lan4";
		};

		port@1 {
			reg = <1>;
			label = "lan3";
		};

		port@2 {
			reg = <2>;
			label = "lan2";
		};

		port@3 {
			reg = <3>;
			label = "lan1";
		};

		port@4 {
			reg = <4>;
			label = "wan";
		};

		port@8 {
			reg = <8>;
			label = "cpu";
			ethernet = <&gmac2>;

			fixed-link {
				speed = <1000>;
				full-duplex;
			};
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Device tree for D-Link DIR-890L
 * D-Link calls this board "WRGAC36"
 * this router has the same looks and form factor as D-Link DIR-885L.
 *
 * Some differences from DIR-885L include a separate USB2 port, separate LEDs
 * for USB2 and USB3, a separate VCC supply for the USB2 slot and no
 * router/extender switch is mounted (there is an empty mount point on the
 * PCB) so this device is a pure router. Also the LAN ports are in the right
 * order.
 *
 * Based on the device tree for DIR-885L
 * Copyright (C) 2016 Rafał Miłecki <zajec5@gmail.com>
 * Copyright (C) 2022 Linus Walleij
 */

/dts-v1/;

#include "bcm47094.dtsi"
#include "bcm5301x-nand-cs0-bch1.dtsi"

/ {
	compatible = "dlink,dir-890l", "brcm,bcm47094", "brcm,bcm4708";
	model = "D-Link DIR-890L";

	chosen {
		bootargs = "console=ttyS0,115200 earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x08000000>;
	};

	leds {
		/*
		 * LED information is derived from the boot log which
		 * conveniently lists all the LEDs.
		 */
		compatible = "gpio-leds";

		led-power-white {
			label = "bcm53xx:white:power";
			gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "default-on";
		};

		led-wan-white {
			label = "bcm53xx:white:wan";
			gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
		};

		led-power-amber {
			label = "bcm53xx:amber:power";
			gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
		};

		led-wan-amber {
			label = "bcm53xx:amber:wan";
			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
		};

		led-usb3-white {
			label = "bcm53xx:white:usb3";
			gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
			trigger-sources = <&xhci_port1>;
			linux,default-trigger = "usbport";
		};

		led-usb2-white {
			label = "bcm53xx:white:usb2";
			gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>;
			trigger-sources = <&ohci_port1>, <&ehci_port1>;
			linux,default-trigger = "usbport";
		};

		led-2ghz {
			label = "bcm53xx:white:2ghz";
			gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
		};

		led-5ghz {
			label = "bcm53xx:white:5ghz";
			gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-wps {
			label = "WPS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
		};

		/* Called "factory reset" in the vendor dmesg */
		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
		};
	};

	/*
	 * The flash memory is memory mapped at 0x1e000000-0x1fffffff
	 * 64KB blocks; total size 2MB, same that can be
	 * found attached to the spi_nor SPI controller.
	 */
	nvram@1e1f0000 {
		compatible = "brcm,nvram";
		reg = <0x1e1f0000 0x00010000>;

		et0macaddr: et0macaddr {
		};
	};
};

&gmac2 {
	/*
	 * The NVRAM curiously does not contain a MAC address
	 * for et2 so since that is the only ethernet interface
	 * actually in use on the platform, we use this et0 MAC
	 * address for et2.
	 */
	nvmem-cells = <&et0macaddr>;
	nvmem-cell-names = "mac-address";
};

&spi_nor {
	status = "okay";
};

&nandcs {
	/* Spansion S34ML01G2, 128MB with 128KB erase blocks */
	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		/*
		 * This is called "nflash" in the vendor kernel with
		 * "upgrade" and "rootfs" (probably using OpenWrt
		 * splitpart). We call it "firmware" like standard tools
		 * assume. The CFE loader contains incorrect information
		 * about TRX partitions, ignore this, there are no TRX
		 * partitions: this device uses SEAMA.
		 */
		firmware@0 {
			label = "firmware";
			reg = <0x00000000 0x08000000>;
		};
	};
};

&usb2 {
	vcc-gpios = <&chipcommon 21 GPIO_ACTIVE_HIGH>;
};

&usb3 {
	vcc-gpios = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
};

&usb3_phy {
	status = "okay";
};

&srab {
	status = "okay";

	ports {
		port@0 {
			reg = <0>;
			label = "lan1";
		};

		port@1 {
			reg = <1>;
			label = "lan2";
		};

		port@2 {
			reg = <2>;
			label = "lan3";
		};

		port@3 {
			reg = <3>;
			label = "lan4";
		};

		port@4 {
			reg = <4>;
			label = "wan";
		};

		port@8 {
			reg = <8>;
			label = "cpu";
			ethernet = <&gmac2>;
			phy-mode = "rgmii";

			fixed-link {
				speed = <1000>;
				full-duplex;
			};
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright (C) 2017 Rafał Miłecki <rafal@milecki.pl>
 */

/dts-v1/;

#include "bcm47094.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "linksys,panamera", "brcm,bcm47094", "brcm,bcm4708";
	model = "Linksys EA9500";

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x08000000>;
	};

	nvram@1c080000 {
		compatible = "brcm,nvram";
		reg = <0x1c080000 0x100000>;
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-wps {
			label = "WPS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
		};

		button-rfkill {
				label = "WiFi";
				linux,code = <KEY_RFKILL>;
				gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
		};

		button-reset {
				label = "Reset";
				linux,code = <KEY_RESTART>;
				gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
		};
	};

	leds {
		compatible = "gpio-leds";

		led-wps {
			label = "bcm53xx:white:wps";
			gpios = <&chipcommon 22 GPIO_ACTIVE_LOW>;
		};

		led-usb2 {
			label = "bcm53xx:green:usb2";
			gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
			trigger-sources = <&ohci_port2>, <&ehci_port2>;
			linux,default-trigger = "usbport";
		};

		led-usb3 {
			label = "bcm53xx:green:usb3";
			gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
			trigger-sources = <&ohci_port1>, <&ehci_port1>,
					  <&xhci_port1>;
			linux,default-trigger = "usbport";
		};

		led-power {
			label = "bcm53xx:white:power";
			gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		led-wifi-disabled {
			label = "bcm53xx:amber:wifi-disabled";
			gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
		};

		led-wifi-enabled {
			label = "bcm53xx:white:wifi-enabled";
			gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
		};

		led-bluebar1 {
			label = "bcm53xx:white:bluebar1";
			gpios = <&chipcommon 11 GPIO_ACTIVE_HIGH>;
		};

		led-bluebar2 {
			label = "bcm53xx:white:bluebar2";
			gpios = <&chipcommon 12 GPIO_ACTIVE_HIGH>;
		};

		led-bluebar3 {
			label = "bcm53xx:white:bluebar3";
			gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>;
		};

		led-bluebar4 {
			label = "bcm53xx:white:bluebar4";
			gpios = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
		};

		led-bluebar5 {
			label = "bcm53xx:white:bluebar5";
			gpios = <&chipcommon 19 GPIO_ACTIVE_HIGH>;
		};

		led-bluebar6 {
			label = "bcm53xx:white:bluebar6";
			gpios = <&chipcommon 20 GPIO_ACTIVE_HIGH>;
		};

		led-bluebar7 {
			label = "bcm53xx:white:bluebar7";
			gpios = <&chipcommon 21 GPIO_ACTIVE_HIGH>;
		};

		led-bluebar8 {
			label = "bcm53xx:white:bluebar8";
			gpios = <&chipcommon 8 GPIO_ACTIVE_HIGH>;
		};
	};

	mdio-mux@18003000 {

		/* BIT(9) = 1 => external mdio */
		mdio@200 {
			reg = <0x200>;
			#address-cells = <1>;
			#size-cells = <0>;

			switch@0  {
				compatible = "brcm,bcm53125";
				#address-cells = <1>;
				#size-cells = <0>;
				reset-gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
				reset-names = "robo_reset";
				reg = <0>;
				dsa,member = <1 0>;
				pinctrl-names = "default";
				pinctrl-0 = <&pinmux_mdio>;

				ports {
					#address-cells = <1>;
					#size-cells = <0>;

					port@0 {
						reg = <0>;
						label = "lan1";
					};

					port@1 {
						reg = <1>;
						label = "lan5";
					};

					port@2 {
						reg = <2>;
						label = "lan2";
					};

					port@3 {
						reg = <3>;
						label = "lan6";
					};

					port@4 {
						reg = <4>;
						label = "lan3";
					};

					sw1_p8: port@8 {
						reg = <8>;
						ethernet = <&sw0_p0>;
						label = "cpu";

						fixed-link {
							speed = <1000>;
							full-duplex;
						};
					};
				};
			};
		};
	};
};

&usb2 {
	vcc-gpio = <&chipcommon 13 GPIO_ACTIVE_HIGH>;
};

&usb3 {
	vcc-gpio = <&chipcommon 14 GPIO_ACTIVE_HIGH>;
};

&srab {
	compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
	status = "okay";
	dsa,member = <0 0>;

	ports {
		port@1 {
			reg = <1>;
			label = "lan7";
		};

		port@2 {
			reg = <2>;
			label = "lan4";
		};

		port@3 {
			reg = <3>;
			label = "lan8";
		};

		port@4 {
			reg = <4>;
			label = "wan";
		};

		port@5 {
			reg = <5>;
			ethernet = <&gmac0>;
			label = "cpu";
			status = "disabled";

			fixed-link {
				speed = <1000>;
				full-duplex;
			};
		};

		port@7 {
			reg = <7>;
			ethernet = <&gmac1>;
			label = "cpu";
			status = "disabled";

			fixed-link {
				speed = <1000>;
				full-duplex;
			};
		};

		port@8 {
			reg = <8>;
			ethernet = <&gmac2>;
			label = "cpu";

			fixed-link {
				speed = <1000>;
				full-duplex;
			};
		};

		sw0_p0: port@0 {
			reg = <0>;
			label = "extsw";

			fixed-link {
				speed = <1000>;
				full-duplex;
			};
		};
	};
};

&usb3_phy {
	status = "okay";
};

&nandcs {
	partitions {
		compatible = "linksys,ns-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		partition@0 {
			label = "boot";
			reg = <0x0000000 0x0080000>;
			read-only;
		};

		partition@80000 {
			label = "nvram";
			reg = <0x080000 0x0100000>;
		};

		partition@180000{
			label = "devinfo";
			reg = <0x0180000 0x080000>;
		};

		partition@200000 {
			reg = <0x0200000 0x01d00000>;
			compatible = "linksys,ns-firmware", "brcm,trx";
		};

		partition@1f00000 {
			reg = <0x01f00000 0x01d00000>;
			compatible = "linksys,ns-firmware", "brcm,trx";
		};

		partition@5200000 {
			label = "system";
			reg = <0x05200000 0x02e00000>;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright (C) 2017 Luxul Inc.
 */

/dts-v1/;

#include "bcm4708.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "luxul,abr-4500-v1", "brcm,bcm47094", "brcm,bcm4708";
	model = "Luxul ABR-4500 V1";

	chosen {
		bootargs = "earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x18000000>;
	};

	nvram@1eff0000 {
		compatible = "brcm,nvram";
		reg = <0x1eff0000 0x10000>;
	};

	leds {
		compatible = "gpio-leds";

		led-status {
			label = "bcm53xx:green:status";
			gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "timer";
		};

		led-usb3 {
			label = "bcm53xx:green:usb3";
			gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
			trigger-sources = <&ohci_port1>, <&ehci_port1>,
				<&xhci_port1>;
			linux,default-trigger = "usbport";
		};

	};

	gpio-keys {
		compatible = "gpio-keys";

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
		};
	};
};

&usb3 {
	vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
};

&spi_nor {
	status = "okay";
};

&usb3_phy {
	status = "okay";
};

&srab {
	status = "okay";

	ports {
		port@0 {
			reg = <0>;
			label = "wan";
		};

		port@1 {
			reg = <1>;
			label = "lan4";
		};

		port@2 {
			reg = <2>;
			label = "lan3";
		};

		port@3 {
			reg = <3>;
			label = "lan2";
		};

		port@4 {
			reg = <4>;
			label = "lan1";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2018 Luxul Inc.
 */

/dts-v1/;

#include "bcm47094.dtsi"

/ {
	compatible = "luxul,xap-1610-v1", "brcm,bcm47094", "brcm,bcm4708";
	model = "Luxul XAP-1610 V1";

	chosen {
		bootargs = "earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>;
	};

	leds {
		compatible = "gpio-leds";

		led-status {
			label = "bcm53xx:green:status";
			gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "timer";
		};

		led-2ghz {
			label = "bcm53xx:blue:2ghz";
			gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
		};

		led-5ghz {
			label = "bcm53xx:blue:5ghz";
			gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
		};
	};
};

&spi_nor {
	status = "okay";
};

&srab {
	status = "okay";

	ports {
		port@0 {
			reg = <0>;
			label = "poe";
		};

		port@1 {
			reg = <1>;
			label = "lan";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright (C) 2017 Luxul Inc.
 */

/dts-v1/;

#include "bcm4708.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "luxul,xbr-4500-v1", "brcm,bcm47094", "brcm,bcm4708";
	model = "Luxul XBR-4500 V1";

	chosen {
		bootargs = "earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x18000000>;
	};

	nvram@1eff0000 {
		compatible = "brcm,nvram";
		reg = <0x1eff0000 0x10000>;
	};

	leds {
		compatible = "gpio-leds";

		led-status {
			label = "bcm53xx:green:status";
			gpios = <&chipcommon 20 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "timer";
		};

		led-usb3 {
			label = "bcm53xx:green:usb3";
			gpios = <&chipcommon 19 GPIO_ACTIVE_HIGH>;
			trigger-sources = <&ohci_port1>, <&ehci_port1>,
				<&xhci_port1>;
			linux,default-trigger = "usbport";
		};

	};

	gpio-keys {
		compatible = "gpio-keys";

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
		};
	};
};

&usb3 {
	vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
};

&spi_nor {
	status = "okay";
};

&usb3_phy {
	status = "okay";
};

&srab {
	status = "okay";

	ports {
		port@0 {
			reg = <0>;
			label = "wan";
		};

		port@1 {
			reg = <1>;
			label = "lan4";
		};

		port@2 {
			reg = <2>;
			label = "lan3";
		};

		port@3 {
			reg = <3>;
			label = "lan2";
		};

		port@4 {
			reg = <4>;
			label = "lan1";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2019 Legrand AV Inc.
 */

/dts-v1/;

#include "bcm47094.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "luxul,xwc-2000-v1", "brcm,bcm47094", "brcm,bcm4708";
	model = "Luxul XWC-2000 V1";

	chosen {
		bootargs = "earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x18000000>;
	};

	leds {
		compatible = "gpio-leds";

		led-status {
			label = "bcm53xx:green:status";
			gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "timer";
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
		};
	};
};

&uart1 {
	status = "okay";
};

&spi_nor {
	status = "okay";
};

&srab {
	status = "okay";

	ports {
		port@0 {
			reg = <0>;
			label = "lan";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2016 Luxul Inc.
 */

/dts-v1/;

#include "bcm47094.dtsi"
#include "bcm5301x-nand-cs0-bch4.dtsi"

/ {
	compatible = "luxul,xwr-3100v1", "brcm,bcm47094", "brcm,bcm4708";
	model = "Luxul XWR-3100 V1";

	chosen {
		bootargs = "console=ttyS0,115200 earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x08000000>;
	};

	nvram@1eff0000 {
		compatible = "brcm,nvram";
		reg = <0x1eff0000 0x10000>;
	};

	leds {
		compatible = "gpio-leds";

		led-power {
			label = "bcm53xx:green:power";
			gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "default-on";
		};

		led-lan3 {
			label = "bcm53xx:green:lan3";
			gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
		};

		led-lan4 {
			label = "bcm53xx:green:lan4";
			gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
		};

		led-wan {
			label = "bcm53xx:green:wan";
			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
		};

		led-lan1 {
			label = "bcm53xx:green:lan1";
			gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
		};

		led-lan2 {
			label = "bcm53xx:green:lan2";
			gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>;
		};

		led-usb3 {
			label = "bcm53xx:green:usb3";
			gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
			trigger-sources = <&ohci_port1>, <&ehci_port1>,
					  <&xhci_port1>;
			linux,default-trigger = "usbport";
		};

		led-status {
			label = "bcm53xx:green:status";
			gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "timer";
		};

		led-2ghz {
			label = "bcm53xx:green:2ghz";
			gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
		};

		led-5ghz {
			label = "bcm53xx:green:5ghz";
			gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
		};
	};
};

&usb3 {
	vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
};

&spi_nor {
	status = "okay";
};

&usb3_phy {
	status = "okay";
};

&srab {
	status = "okay";

	ports {
		port@0 {
			reg = <0>;
			label = "lan4";
		};

		port@1 {
			reg = <1>;
			label = "lan3";
		};

		port@2 {
			reg = <2>;
			label = "lan2";
		};

		port@3 {
			reg = <3>;
			label = "lan1";
		};

		port@4 {
			reg = <4>;
			label = "wan";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2018 Luxul Inc.
 */

/dts-v1/;

#include "bcm47094.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "luxul,xwr-3150-v1", "brcm,bcm47094", "brcm,bcm4708";
	model = "Luxul XWR-3150 V1";

	chosen {
		bootargs = "earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x18000000>;
	};

	nvram@1eff0000 {
		compatible = "brcm,nvram";
		reg = <0x1eff0000 0x10000>;

		et0macaddr: et0macaddr {
		};
	};

	leds {
		compatible = "gpio-leds";

		led-power {
			label = "bcm53xx:green:power";
			gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "default-on";
		};

		led-usb3 {
			label = "bcm53xx:green:usb3";
			gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
			trigger-sources = <&ohci_port1>, <&ehci_port1>,
					  <&xhci_port1>;
			linux,default-trigger = "usbport";
		};

		led-status {
			label = "bcm53xx:green:status";
			gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "timer";
		};

		led-2ghz {
			label = "bcm53xx:green:2ghz";
			gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
		};

		led-5ghz {
			label = "bcm53xx:green:5ghz";
			gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
		};
	};
};

&gmac0 {
	nvmem-cells = <&et0macaddr>;
	nvmem-cell-names = "mac-address";
};

&usb3 {
	vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
};

&usb3_phy {
	status = "okay";
};

&spi_nor {
	status = "okay";
};

&srab {
	status = "okay";

	ports {
		port@0 {
			reg = <0>;
			label = "lan4";
		};

		port@1 {
			reg = <1>;
			label = "lan3";
		};

		port@2 {
			reg = <2>;
			label = "lan2";
		};

		port@3 {
			reg = <3>;
			label = "lan1";
		};

		port@4 {
			reg = <4>;
			label = "wan";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright (C) 2016 Rafał Miłecki <rafal@milecki.pl>
 */

/dts-v1/;

#include "bcm47094.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

/ {
	compatible = "netgear,r8500", "brcm,bcm47094", "brcm,bcm4708";
	model = "Netgear R8500";

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x18000000>;
	};

	leds {
		compatible = "gpio-leds";

		led-power0 {
			label = "bcm53xx:white:power";
			gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "default-on";
		};

		led-power1 {
			label = "bcm53xx:amber:power";
			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
		};

		led-5ghz-1 {
			label = "bcm53xx:white:5ghz-1";
			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
		};

		led-5ghz-2 {
			label = "bcm53xx:white:5ghz-2";
			gpios = <&chipcommon 12 GPIO_ACTIVE_LOW>;
		};

		led-2ghz {
			label = "bcm53xx:white:2ghz";
			gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
		};

		led-usb2 {
			label = "bcm53xx:white:usb2";
			gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
		};

		led-usb3 {
			label = "bcm53xx:white:usb3";
			gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-brightness {
			label = "Backlight";
			linux,code = <KEY_BRIGHTNESS_ZERO>;
			gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
		};

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
		};

		button-wps {
			label = "WPS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
		};

		button-rfkill {
			label = "WiFi";
			linux,code = <KEY_RFKILL>;
			gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
		};
	};
};

&usb3_phy {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright (C) 2017 Hamster Tian <haotia@gmail.com>
 * Copyright (C) 2019 Hao Dong <halbertdong@gmail.com>
 */

/dts-v1/;

#include "bcm47094.dtsi"
#include "bcm5301x-nand-cs0-bch4.dtsi"

/ {
	compatible = "phicomm,k3", "brcm,bcm47094", "brcm,bcm4708";
	model = "Phicomm K3";

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x18000000>;
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
		};
	};
};

&uart1 {
	status = "okay";
};

&usb3_phy {
	status = "okay";
};

&nandcs {
	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		partition@0 {
			label = "boot";
			reg = <0x0000000 0x0080000>;
			read-only;
		};

		partition@80000 {
			label = "nvram";
			reg = <0x0080000 0x0100000>;
		};

		partition@180000{
			label = "phicomm";
			reg = <0x0180000 0x0280000>;
			read-only;
		};

		partition@400000 {
			label = "firmware";
			reg = <0x0400000 0x7C00000>;
			compatible = "brcm,trx";
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright (C) 2016 Rafał Miłecki <rafal@milecki.pl>
 */

#include "bcm4708.dtsi"

/ {
};

&pinctrl {
	compatible = "brcm,bcm4709-pinmux";

	pinmux_mdio: mdio-pins {
		groups = "mdio_grp";
		function = "mdio";
	};
};

&usb3_phy {
	compatible = "brcm,ns-bx-usb3-phy";
};

&uart0 {
	clock-frequency = <125000000>;
	status = "okay";
};

&srab {
	compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2017 Luxul Inc.
 */

/dts-v1/;

#include "bcm53573.dtsi"

/ {
	compatible = "luxul,xap-1440-v1", "brcm,bcm47189", "brcm,bcm53573";
	model = "Luxul XAP-1440 V1";

	chosen {
		bootargs = "earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>;
	};

	leds {
		compatible = "gpio-leds";

		led-wlan {
			label = "bcm53xx:blue:wlan";
			gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "default-off";
		};

		led-system {
			label = "bcm53xx:green:system";
			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "timer";
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2017 Luxul Inc.
 */

/dts-v1/;

#include "bcm53573.dtsi"

/ {
	compatible = "luxul,xap-810-v1", "brcm,bcm47189", "brcm,bcm53573";
	model = "Luxul XAP-810 V1";

	chosen {
		bootargs = "earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>;
	};

	leds-0 {
		compatible = "gpio-leds";

		led-5ghz {
			label = "bcm53xx:blue:5ghz";
			gpios = <&chipcommon 11 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-off";
		};

		led-system {
			label = "bcm53xx:green:system";
			gpios = <&chipcommon 15 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "timer";
		};
	};

	leds-1 {
		compatible = "gpio-leds";

		led-2ghz {
			label = "bcm53xx:blue:2ghz";
			gpios = <&pcie0_chipcommon 3 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-off";
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
		};
	};
};

&pcie0 {
	ranges = <0x00000000 0 0 0 0 0x00100000>;
	#address-cells = <3>;
	#size-cells = <2>;

	bridge@0,0,0 {
		reg = <0x0000 0 0 0 0>;
		ranges = <0x00000000 0 0 0 0 0 0 0x00100000>;
		#address-cells = <3>;
		#size-cells = <2>;

		wifi@0,1,0 {
			reg = <0x0000 0 0 0 0>;
			ranges = <0x00000000 0 0 0 0x00100000>;
			#address-cells = <1>;
			#size-cells = <1>;

			pcie0_chipcommon: chipcommon@0 {
				reg = <0 0x1000>;

				gpio-controller;
				#gpio-cells = <2>;
			};
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright (C) 2016 Rafał Miłecki <rafal@milecki.pl>
 */

/dts-v1/;

#include "bcm53573.dtsi"

/ {
	compatible = "tenda,ac9", "brcm,bcm47189", "brcm,bcm53573";
	model = "Tenda AC9";

	chosen {
		bootargs = "console=ttyS0,115200 earlycon";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x08000000>;
	};

	leds-0 {
		compatible = "gpio-leds";

		led-usb {
			label = "bcm53xx:blue:usb";
			gpios = <&chipcommon 1 GPIO_ACTIVE_HIGH>;
			trigger-sources = <&ohci_port1>, <&ehci_port1>;
			linux,default-trigger = "usbport";
		};

		led-wps {
			label = "bcm53xx:blue:wps";
			gpios = <&chipcommon 10 GPIO_ACTIVE_HIGH>;
		};

		led-5ghz {
			label = "bcm53xx:blue:5ghz";
			gpios = <&chipcommon 11 GPIO_ACTIVE_HIGH>;
		};

		led-system {
			label = "bcm53xx:blue:system";
			gpios = <&chipcommon 15 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "timer";
		};
	};

	leds-1 {
		compatible = "gpio-leds";

		led-2ghz {
			label = "bcm53xx:blue:2ghz";
			gpios = <&pcie0_chipcommon 3 GPIO_ACTIVE_HIGH>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-rfkill {
			label = "WiFi";
			linux,code = <KEY_RFKILL>;
			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
		};

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
		};

		button-wps {
			label = "WPS";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&chipcommon 9 GPIO_ACTIVE_LOW>;
		};
	};
};

&pcie0 {
	ranges = <0x00000000 0 0 0 0 0x00100000>;
	#address-cells = <3>;
	#size-cells = <2>;

	bridge@0,0,0 {
		reg = <0x0000 0 0 0 0>;
		ranges = <0x00000000 0 0 0 0 0 0 0x00100000>;
		#address-cells = <3>;
		#size-cells = <2>;

		wifi@0,1,0 {
			reg = <0x0000 0 0 0 0>;
			ranges = <0x00000000 0 0 0 0x00100000>;
			#address-cells = <1>;
			#size-cells = <1>;

			pcie0_chipcommon: chipcommon@0 {
				reg = <0 0x1000>;

				gpio-controller;
				#gpio-cells = <2>;
			};
		};
	};
};

&switch {
	status = "okay";

	ports {
		port@0 {
			reg = <0>;
			label = "wan";
		};

		port@1 {
			reg = <1>;
			label = "lan1";
		};

		port@2 {
			reg = <2>;
			label = "lan2";
		};

		port@3 {
			reg = <3>;
			label = "lan3";
		};

		port@4 {
			reg = <4>;
			label = "lan4";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
		};
	};
};


code:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright 2022 Broadcom Ltd.
 */

#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>

/ {
	compatible = "brcm,bcm47622", "brcm,bcmbca";
	#address-cells = <1>;
	#size-cells = <1>;

	interrupt-parent = <&gic>;

	cpus {
		#address-cells = <1>;
		#size-cells = <0>;

		CA7_0: cpu@0 {
			device_type = "cpu";
			compatible = "arm,cortex-a7";
			reg = <0x0>;
			next-level-cache = <&L2_0>;
			enable-method = "psci";
		};

		CA7_1: cpu@1 {
			device_type = "cpu";
			compatible = "arm,cortex-a7";
			reg = <0x1>;
			next-level-cache = <&L2_0>;
			enable-method = "psci";
		};

		CA7_2: cpu@2 {
			device_type = "cpu";
			compatible = "arm,cortex-a7";
			reg = <0x2>;
			next-level-cache = <&L2_0>;
			enable-method = "psci";
		};

		CA7_3: cpu@3 {
			device_type = "cpu";
			compatible = "arm,cortex-a7";
			reg = <0x3>;
			next-level-cache = <&L2_0>;
			enable-method = "psci";
		};

		L2_0: l2-cache0 {
			compatible = "cache";
			cache-level = <2>;
		};
	};

	timer {
		compatible = "arm,armv7-timer";
		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
			<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
			<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
			<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
		arm,cpu-registers-not-fw-configured;
	};

	pmu: pmu {
		compatible = "arm,cortex-a7-pmu";
		interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
			<GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
			<GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
			<GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-affinity = <&CA7_0>, <&CA7_1>,
			<&CA7_2>, <&CA7_3>;
	};

	clocks: clocks {
		periph_clk: periph-clk {
			compatible = "fixed-clock";
			#clock-cells = <0>;
			clock-frequency = <200000000>;
		};

		uart_clk: uart-clk {
			compatible = "fixed-factor-clock";
			#clock-cells = <0>;
			clocks = <&periph_clk>;
			clock-div = <4>;
			clock-mult = <1>;
		};
	};

	psci {
		compatible = "arm,psci-0.2";
		method = "smc";
	};

	axi@81000000 {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <1>;
		ranges = <0 0x81000000 0x8000>;

		gic: interrupt-controller@1000 {
			compatible = "arm,cortex-a7-gic";
			#interrupt-cells = <3>;
			interrupt-controller;
			interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
			reg = <0x1000 0x1000>,
				<0x2000 0x2000>,
				<0x4000 0x2000>,
				<0x6000 0x2000>;
		};
	};

	bus@ff800000 {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <1>;
		ranges = <0 0xff800000 0x800000>;

		uart0: serial@12000 {
			compatible = "arm,pl011", "arm,primecell";
			reg = <0x12000 0x1000>;
			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&uart_clk>, <&uart_clk>;
			clock-names = "uartclk", "apb_pclk";
			status = "disabled";
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Broadcom BCM470X / BCM5301X ARM platform code.
 * DTS for Meraki MR26 / Codename: Venom
 *
 * Copyright (C) 2022 Christian Lamparter <chunkeey@gmail.com>
 */

/dts-v1/;

#include "bcm4708.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"
#include <dt-bindings/leds/common.h>

/ {
	compatible = "meraki,mr26", "brcm,bcm53015", "brcm,bcm4708";
	model = "Meraki MR26";

	memory@0 {
		reg = <0x00000000 0x08000000>;
		device_type = "memory";
	};

	leds {
		compatible = "gpio-leds";

		led-0 {
			function = LED_FUNCTION_FAULT;
			color = <LED_COLOR_ID_AMBER>;
			gpios = <&chipcommon 13 GPIO_ACTIVE_HIGH>;
			panic-indicator;
		};
		led-1 {
			function = LED_FUNCTION_INDICATOR;
			color = <LED_COLOR_ID_WHITE>;
			gpios = <&chipcommon 12 GPIO_ACTIVE_HIGH>;
		};
	};

	keys {
		compatible = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;

		key-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
		};
	};
};

&uart0 {
	clock-frequency = <50000000>;
	/delete-property/ clocks;
};

&uart1 {
	status = "disabled";
};

&gmac0 {
	status = "okay";
};

&gmac1 {
	status = "disabled";
};
&gmac2 {
	status = "disabled";
};
&gmac3 {
	status = "disabled";
};

&nandcs {
	nand-ecc-algo = "hw";

	partitions {
		compatible = "fixed-partitions";
		#address-cells = <0x1>;
		#size-cells = <0x1>;

		partition@0 {
			label = "u-boot";
			reg = <0x0 0x200000>;
			read-only;
		};

		partition@200000 {
			label = "u-boot-env";
			reg = <0x200000 0x200000>;
			/* empty */
		};

		partition@400000 {
			label = "u-boot-backup";
			reg = <0x400000 0x200000>;
			/* empty */
		};

		partition@600000 {
			label = "u-boot-env-backup";
			reg = <0x600000 0x200000>;
			/* empty */
		};

		partition@800000 {
			label = "ubi";
			reg = <0x800000 0x7780000>;
		};
	};
};

&srab {
	status = "okay";

	ports {
		port@0 {
			reg = <0>;
			label = "poe";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;

			fixed-link {
				speed = <1000>;
				duplex-full;
			};
		};
	};
};

&i2c0 {
	status = "okay";

	pinctrl-names = "default";
	pinctrl-0 = <&pinmux_i2c>;

	clock-frequency = <100000>;

	ina219@40 {
		compatible = "ti,ina219"; /* PoE power */
		reg = <0x40>;
		shunt-resistor = <60000>; /* = 60 mOhms */
	};

	eeprom@56 {
		compatible = "atmel,24c64";
		reg = <0x56>;
		pagesize = <32>;
		read-only;
		#address-cells = <1>;
		#size-cells = <1>;

		/* it's empty */
	};
};

&thermal {
	status = "disabled";
	/* does not work, reads 418 degree Celsius */
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;

#include "bcm4709.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"
#include <dt-bindings/leds/common.h>
#include <dt-bindings/input/input.h>

/ {
	model = "D-Link DWL-8610AP";
	compatible = "dlink,dwl-8610ap", "brcm,bcm53016", "brcm,bcm4708";

	memory@0 {
		device_type = "memory";
		/* 512 MB RAM in 2 x Macronix D9PSH chips */
		reg = <0x00000000 0x08000000>,
		      <0x88000000 0x08000000>;
	};

	leds {
		compatible = "gpio-leds";

		led-power {
			function = LED_FUNCTION_POWER;
			color = <LED_COLOR_ID_GREEN>;
			gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
			default-state = "on";
		};

		led-diag {
			/* Actually "diag" unclear what this means */
			function = LED_FUNCTION_INDICATOR;
			color = <LED_COLOR_ID_RED>;
			gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
			default-state = "on";
			linux,default-trigger = "heartbeat";
		};

		led-wlan-2g {
			function = LED_FUNCTION_WLAN;
			color = <LED_COLOR_ID_GREEN>;
			gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>;
		};

		led-wlan-5g {
			function = LED_FUNCTION_WLAN;
			color = <LED_COLOR_ID_GREEN>;
			gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
		};
	};

	gpio_keys {
		compatible = "gpio-keys";

		button-reset {
			debounce-interval = <100>;
			wakeup-source;
			linux,code = <KEY_RESTART>;
			label = "reset";
			/* This GPIO is actually stored in NVRAM, but it's not gonna change */
			gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
		};
	};

	/*
	 * Flash memory at 0x1e000000-0x1fffffff
	 * Macronix 32 64KB blocks; total size 2MB, same that can be
	 * found attached to the spi_nor SPI controller.
	 */
	nvram@1e080000 {
		compatible = "brcm,nvram";
		reg = <0x1e080000 0x00020000>;

		et0macaddr: et0macaddr {
		};

		et1macaddr: et1macaddr {
		};
	};
};

&gmac0 {
	nvmem-cells = <&et0macaddr>;
	nvmem-cell-names = "mac-address";
};

&gmac1 {
	nvmem-cells = <&et1macaddr>;
	nvmem-cell-names = "mac-address";
};

&spi_nor {
	/* Serial SPI NOR Flash MX 25L1606E */
	status = "okay";
};

&nandcs {
	/*
	 * Spansion S34ML01G100TFI00 128 MB NAND Flash memory
	 *
	 * This ECC is a bit unorthodox but it is what the stock firmware
	 * is using, so to be able to mount the original partitions
	 * this is necessary.
	 */
	nand-ecc-strength = <5>;
	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		/* This is named nflash1.trx in CFE */
		trx@0 {
			label = "firmware";
			reg = <0x00000000 0x02800000>;
			compatible = "brcm,trx";
		};

		/* This is named nflash1.trx2 in CFE */
		trx2@2800000 {
			label = "firmware2";
			reg = <0x02800000 0x02800000>;
			compatible = "brcm,trx";
		};

		/* This is named nflash1.rwfs in CFE */
		free@5000000 {
			label = "free";
			reg = <0x05000000 0x03000000>;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Broadcom BCM470X / BCM5301X ARM platform code.
 * DTS for Meraki MR32 / Codename: Espresso
 *
 * Copyright (C) 2018-2020 Christian Lamparter <chunkeey@gmail.com>
 */

/dts-v1/;

#include "bcm4708.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"
#include <dt-bindings/leds/common.h>

/ {
	compatible = "meraki,mr32", "brcm,bcm53016", "brcm,bcm4708";
	model = "Meraki MR32";

	chosen {
		bootargs = " console=ttyS0,115200n8 earlycon";
	};

	memory@0 {
		reg = <0x00000000 0x08000000>;
		device_type = "memory";
	};

	aliases {
		serial1 = &uart2;
	};

	leds {
		compatible = "gpio-leds";

		sysled3 {
			function = LED_FUNCTION_FAULT;
			color = <LED_COLOR_ID_AMBER>;
			gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
			panic-indicator;
		};
		sysled2 {
			function = LED_FUNCTION_INDICATOR;
			color = <LED_COLOR_ID_WHITE>;
			gpios = <&chipcommon 19 GPIO_ACTIVE_HIGH>;
		};
	};

	keys {
		compatible = "gpio-keys";

		button-restart {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
		};
	};

	pwm-leds {
		compatible = "pwm-leds";

		led-0 {
			/* SYS-LED 1 - Tricolor */
			function = LED_FUNCTION_INDICATOR;
			color = <LED_COLOR_ID_RED>;
			pwms = <&pwm 0 50000 0>;
			max-brightness = <255>;
		};

		led-1 {
			/* SYS-LED 1 - Tricolor */
			function = LED_FUNCTION_POWER;
			color = <LED_COLOR_ID_GREEN>;
			pwms = <&pwm 1 50000 0>;
			max-brightness = <255>;
		};

		led-2 {
			/* SYS-LED 1 - Tricolor */
			function = LED_FUNCTION_INDICATOR;
			color = <LED_COLOR_ID_BLUE>;
			pwms = <&pwm 2 50000 0>;
			max-brightness = <255>;
		};
	};
};

&uart0 {
	clock-frequency = <62500000>;
	/delete-property/ clocks;
};

&uart1 {
	status = "disabled";
};

&uart2 {
	status = "okay";
	/*
	 * bluetooth-le {
	 *	compatible = "brcm,bcm20732";
	 *	enable-gpios = <&chipcommon 20 GPIO_ACTIVE_HIGH>;
	 *};
	 */
};

&gmac0 {
	nvmem-cell-names = "mac-address";
	nvmem-cells = <&mac_address>;
};

&gmac1 {
	status = "disabled";
};
&gmac2 {
	status = "disabled";
};
&gmac3 {
	status = "disabled";
};

&pwm {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinmux_pwm>;
};

&nandcs {
	nand-ecc-algo = "hw";

	partitions {
		/*
		 * The partition autodetection does not work for this device.
		 * It will only detect the "nvram" partition with an incorrect size.
		 *	[    1.721667] 1 bcm47xxpart partitions found on MTD device brcmnand.0
		 *	[    1.727962] Creating 1 MTD partitions on "brcmnand.0":
		 *	[    1.733117] 0x000000400000-0x000008000000 : "nvram"
		 */

		compatible = "fixed-partitions";
		#address-cells = <0x1>;
		#size-cells = <0x1>;

		partition0@0 {
			label = "u-boot";
			reg = <0x0 0x100000>;
			read-only;
		};

		partition1@100000 {
			label = "bootkernel1";
			reg = <0x100000 0x300000>;
			read-only;
		};

		partition2@400000 {
			label = "nvram";
			reg = <0x400000 0x100000>;
			read-only;
		};

		partition3@500000 {
			label = "bootkernel2";
			reg = <0x500000 0x300000>;
			read-only;
		};

		partition4@800000 {
			label = "ubi";
			reg = <0x800000 0x7780000>;
		};
	};
};

&srab {
	status = "okay";

	ports {
		port@0 {
			reg = <0>;
			label = "poe";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;

			fixed-link {
				speed = <1000>;
				duplex-full;
			};
		};
	};
};

&i2c0 {
	status = "okay";

	pinctrl-names = "default";
	pinctrl-0 = <&pinmux_i2c>;

	clock-frequency = <100000>;

	current_sense: ina219@45 {
		compatible = "ti,ina219";
		reg = <0x45>;
		shunt-resistor = <60000>; /* = 60 mOhms */
	};

	eeprom: eeprom@50 {
		compatible = "atmel,24c64";
		reg = <0x50>;
		pagesize = <32>;
		read-only;
		#address-cells = <1>;
		#size-cells = <1>;

		mac_address: mac-address@66 {
			reg = <0x66 0x6>;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Broadcom Northstar NAND.
 *
 * Copyright (C) 2016 Rafał Miłecki <rafal.milecki@gmail.com>
 */

#include "bcm5301x-nand-cs0.dtsi"

&nandcs {
	nand-ecc-algo = "bch";
	nand-ecc-strength = <1>;
	nand-ecc-step-size = <512>;
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2016 Luxul Inc.
 */

#include "bcm5301x-nand-cs0.dtsi"

&nandcs {
	nand-ecc-algo = "bch";
	nand-ecc-strength = <4>;
	nand-ecc-step-size = <512>;
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Broadcom BCM470X / BCM5301X Nand chip defaults.
 *
 * This should be included if the NAND controller is on chip select 0
 * and uses 8 bit ECC.
 *
 * Copyright (C) 2015 Hauke Mehrtens <hauke@hauke-m.de>
 */

#include "bcm5301x-nand-cs0.dtsi"

&nandcs {
	nand-ecc-algo = "bch";
	nand-ecc-strength = <8>;
	nand-ecc-step-size = <512>;
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Broadcom Northstar NAND.
 *
 * Copyright (C) 2015 Hauke Mehrtens <hauke@hauke-m.de>
 */

/ {
	nand-controller@18028000 {
		nandcs: nand@0 {
			compatible = "brcm,nandcs";
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <1>;

			partitions {
				compatible = "brcm,bcm947xx-cfe-partitions";
			};
		};
	};
};