mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 23:12:32 +00:00
1fb40a72da
A few devices in ath79 and ramips use mtd-concat to concatenate individual partitions into a bigger "firmware" or "ubi" partition. However, the original partitions are still present and visible, and one can write to them directly although this might break the actual virtual, concatenated partition. As we cannot do much about the former, let's at least choose more descriptive names than just "firmwareX" in order to indicate the concatenation to the user. He might be less tempted into overwriting a "fwconcat1" than a "firmware1", which might be perceived as an alternate firmware for dual boot etc. This applies the new naming consistently for all relevant devices, i.e. fwconcatX for virtual "firmware" members and ubiconcatX for "ubi" members. While at it, use DT labels and label property consistently, and also use consistent zero-based indexing. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
219 lines
3.7 KiB
Plaintext
219 lines
3.7 KiB
Plaintext
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
|
|
|
#include "ar9341.dtsi"
|
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
#include <dt-bindings/input/input.h>
|
|
|
|
/ {
|
|
model = "PISEN WMB001N";
|
|
compatible = "pisen,wmb001n", "qca,ar9341";
|
|
|
|
aliases {
|
|
serial0 = &uart;
|
|
led-boot = &led_wifi;
|
|
led-failsafe = &led_wifi;
|
|
led-running = &led_wifi;
|
|
led-upgrade = &led_wifi;
|
|
};
|
|
|
|
i2c {
|
|
compatible = "i2c-gpio";
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&pmx_i2c_gpio &pmx_i2s_spdif>;
|
|
|
|
sda-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
|
|
scl-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
|
|
/*
|
|
* Pull-up resistor for scl is missing on this board.
|
|
* Following settings trick i2c-gpio to use output mode
|
|
* instead of open-drain for scl.
|
|
*/
|
|
i2c-gpio,scl-output-only;
|
|
i2c-gpio,scl-open-drain;
|
|
};
|
|
|
|
keys {
|
|
compatible = "gpio-keys";
|
|
|
|
reset {
|
|
label = "reset";
|
|
linux,code = <KEY_RESTART>;
|
|
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
|
debounce-interval = <60>;
|
|
};
|
|
|
|
vol_down {
|
|
label = "volume down";
|
|
linux,code = <KEY_VOLUMEDOWN>;
|
|
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
|
debounce-interval = <60>;
|
|
};
|
|
|
|
vol_up {
|
|
label = "volume up";
|
|
linux,code = <KEY_VOLUMEUP>;
|
|
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
|
|
debounce-interval = <60>;
|
|
};
|
|
};
|
|
|
|
leds {
|
|
compatible = "gpio-leds";
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&jtag_disable_pins>;
|
|
|
|
volume1 {
|
|
label = "blue:volume1";
|
|
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
|
|
volume2 {
|
|
label = "blue:volume2";
|
|
gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
|
|
volume3 {
|
|
label = "blue:volume3";
|
|
gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
|
|
volume4 {
|
|
label = "blue:volume4";
|
|
gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
|
|
volume5 {
|
|
label = "blue:volume5";
|
|
gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
|
|
led_wifi: wifi {
|
|
label = "blue:wifi";
|
|
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
};
|
|
|
|
virtual_flash {
|
|
compatible = "mtd-concat";
|
|
devices = <&fwconcat0 &fwconcat1>;
|
|
|
|
partitions {
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
partition@0 {
|
|
reg = <0x0 0x0>;
|
|
label = "firmware";
|
|
compatible = "openwrt,okli";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
&pinmux {
|
|
pmx_i2c_gpio: pinmux_i2c_gpio {
|
|
pinctrl-single,bits = <0x10 0x0 0xff>,
|
|
<0x14 0x0 0xff>;
|
|
};
|
|
|
|
pmx_i2s_spdif: pinmux_i2s_spdif {
|
|
pinctrl-single,bits = <0x8 0x0e000000 0xff000000>,
|
|
<0xc 0x0f0c0d 0xffffff>,
|
|
<0x14 0x1900 0xff00>;
|
|
};
|
|
};
|
|
|
|
&ref {
|
|
clock-frequency = <25000000>;
|
|
};
|
|
|
|
&uart {
|
|
status = "okay";
|
|
};
|
|
|
|
&spi {
|
|
status = "okay";
|
|
|
|
flash@0 {
|
|
compatible = "jedec,spi-nor";
|
|
reg = <0>;
|
|
spi-max-frequency = <25000000>;
|
|
|
|
partitions {
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
uboot: partition@0 {
|
|
label = "u-boot";
|
|
reg = <0x0 0x10000>;
|
|
read-only;
|
|
};
|
|
|
|
partition@10000 {
|
|
label = "u-boot-env";
|
|
reg = <0x10000 0x10000>;
|
|
read-only;
|
|
};
|
|
|
|
fwconcat0: partition@20000 {
|
|
label = "fwconcat0";
|
|
reg = <0x20000 0xdc0000>;
|
|
};
|
|
|
|
partition@de0000 {
|
|
label = "loader";
|
|
reg = <0xde0000 0x10000>;
|
|
};
|
|
|
|
fwconcat1: partition@df0000 {
|
|
label = "fwconcat1";
|
|
reg = <0xdf0000 0x1f0000>;
|
|
};
|
|
|
|
partition@fe0000 {
|
|
label = "mib0";
|
|
reg = <0xfe0000 0x10000>;
|
|
read-only;
|
|
};
|
|
|
|
art: partition@ff0000 {
|
|
label = "art";
|
|
reg = <0xff0000 0x10000>;
|
|
read-only;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
ð0 {
|
|
status = "okay";
|
|
phy-handle = <&swphy4>;
|
|
mtd-mac-address = <&art 0x0>;
|
|
};
|
|
|
|
ð1 {
|
|
compatible = "syscon", "simple-mfd";
|
|
status = "okay";
|
|
|
|
gmac-config {
|
|
device = <&gmac>;
|
|
switch-phy-swap = <0>;
|
|
};
|
|
};
|
|
|
|
&usb {
|
|
status = "okay";
|
|
};
|
|
|
|
&usb_phy {
|
|
status = "okay";
|
|
};
|
|
|
|
&wmac {
|
|
status = "okay";
|
|
mtd-cal-data = <&art 0x1000>;
|
|
};
|