mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 06:33:41 +00:00
c7059c56a8
1. Convert wireless calibration data to NVMEM.
2. Enable control green status LED and change default LED behaviors.
The three LEDs of LBA-047-CH are in the same position, and the green
LED will be completely covered by the other two LEDs. So don's use
green LED as WAN indicator to ensure that only one LED is on at a time.
LED Factory OpenWrt
blue internet fail failsafe && upgrade
green internet okay run
red boot boot
3. Reduce the SPI clock to 30 MHz because the ath79 target does not
support 50 MHz SPI operation well. Keep the fast-read support to
ensure the spi-mem feature (b3f9842330
) is enabled.
4. Remove unused package "uboot-envtools".
5. Split the factory image into two parts: rootfs and kernel.
This change can reduce the factory image size and allow users to
upgrade the OpenWrt kernel loader uImage (OKLI) independently.
The new installation method: First, rename "squashfs-kernel.bin" to
"openwrt-ar71xx-generic-ap147-16M-kernel.bin" and rename "rootfs.bin"
to "openwrt-ar71xx-generic-ap147-16M-rootfs-squashfs.bin". Then we
can press reset button for about 5 seconds to enter tftp download mode.
Finally, set IP address to 192.168.67.100 and upload the above two
parts via tftp server.
Tested on Letv LBA-047-CH
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
164 lines
2.9 KiB
Plaintext
164 lines
2.9 KiB
Plaintext
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
|
|
|
#include "qca953x.dtsi"
|
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
#include <dt-bindings/input/input.h>
|
|
#include <dt-bindings/leds/common.h>
|
|
#include <dt-bindings/mtd/partitions/uimage.h>
|
|
|
|
/ {
|
|
model = "Letv LBA-047-CH";
|
|
compatible = "letv,lba-047-ch", "qca,qca9531";
|
|
|
|
aliases {
|
|
label-mac-device = ð0;
|
|
led-boot = &led_status_red;
|
|
led-failsafe = &led_status_blue;
|
|
led-running = &led_status_green;
|
|
led-upgrade = &led_status_blue;
|
|
};
|
|
|
|
keys {
|
|
compatible = "gpio-keys";
|
|
|
|
reset {
|
|
label = "reset";
|
|
linux,code = <KEY_RESTART>;
|
|
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
|
};
|
|
};
|
|
|
|
leds {
|
|
compatible = "gpio-leds";
|
|
|
|
led_status_blue: led-0 {
|
|
label = "blue:status";
|
|
color = <LED_COLOR_ID_BLUE>;
|
|
function = LED_FUNCTION_STATUS;
|
|
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
led_status_green: led-1 {
|
|
label = "green:status";
|
|
color = <LED_COLOR_ID_GREEN>;
|
|
function = LED_FUNCTION_STATUS;
|
|
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
led_status_red: led-2 {
|
|
label = "red:status";
|
|
color = <LED_COLOR_ID_RED>;
|
|
function = LED_FUNCTION_STATUS;
|
|
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
|
|
};
|
|
};
|
|
|
|
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,uimage", "denx,uimage";
|
|
openwrt,ih-magic = <IH_MAGIC_OKLI>;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
&spi {
|
|
status = "okay";
|
|
|
|
flash@0 {
|
|
compatible = "jedec,spi-nor";
|
|
reg = <0>;
|
|
spi-max-frequency = <30000000>;
|
|
m25p,fast-read;
|
|
|
|
partitions {
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
partition@0 {
|
|
label = "u-boot";
|
|
reg = <0x0 0x40000>;
|
|
read-only;
|
|
};
|
|
|
|
partition@40000 {
|
|
label = "u-boot-env";
|
|
reg = <0x40000 0x10000>;
|
|
read-only;
|
|
};
|
|
|
|
fwconcat0: partition@50000 {
|
|
label = "fwconcat0";
|
|
reg = <0x50000 0xe30000>;
|
|
};
|
|
|
|
partition@e80000 {
|
|
label = "loader";
|
|
reg = <0xe80000 0x10000>;
|
|
};
|
|
|
|
fwconcat1: partition@e90000 {
|
|
label = "fwconcat1";
|
|
reg = <0xe90000 0x160000>;
|
|
};
|
|
|
|
partition@ff0000 {
|
|
label = "art";
|
|
reg = <0xff0000 0x10000>;
|
|
read-only;
|
|
|
|
compatible = "nvmem-cells";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
macaddr_art_0: macaddr@0 {
|
|
reg = <0x0 0x6>;
|
|
};
|
|
|
|
macaddr_art_6: macaddr@6 {
|
|
reg = <0x6 0x6>;
|
|
};
|
|
|
|
cal_art_1000: calibration@1000 {
|
|
reg = <0x1000 0x440>;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
ð0 {
|
|
status = "okay";
|
|
|
|
phy-handle = <&swphy4>;
|
|
|
|
nvmem-cells = <&macaddr_art_0>;
|
|
nvmem-cell-names = "mac-address";
|
|
};
|
|
|
|
ð1 {
|
|
compatible = "qca,qca9530-eth", "syscon", "simple-mfd";
|
|
|
|
nvmem-cells = <&macaddr_art_6>;
|
|
nvmem-cell-names = "mac-address";
|
|
};
|
|
|
|
&wmac {
|
|
status = "okay";
|
|
|
|
nvmem-cells = <&cal_art_1000>;
|
|
nvmem-cell-names = "calibration";
|
|
};
|