ipq806x: m520: add gpio-led sys support

Signed-off-by: AmadeusGhost <amadeus@jmu.edu.cn>
This commit is contained in:
AmadeusGhost
2021-06-13 23:20:25 +08:00
parent c8d26d2b91
commit 6e017db719
4 changed files with 23 additions and 14 deletions

View File

@@ -174,6 +174,8 @@ CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GENERIC_VDSO_32=y
CONFIG_GPIOLIB=y
CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GPIO_PCA953X=y
CONFIG_GPIO_PCA953X_IRQ=y
CONFIG_GRO_CELLS=y
CONFIG_HANDLE_DOMAIN_IRQ=y
CONFIG_HARDEN_BRANCH_PREDICTOR=y

View File

@@ -189,6 +189,8 @@ CONFIG_GENERIC_STRNLEN_USER=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GPIOLIB=y
CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GPIO_PCA953X=y
CONFIG_GPIO_PCA953X_IRQ=y
CONFIG_GRO_CELLS=y
CONFIG_HANDLE_DOMAIN_IRQ=y
CONFIG_HARDEN_BRANCH_PREDICTOR=y

View File

@@ -16,12 +16,26 @@
aliases {
mdio-gpio0 = &mdio0;
sdcc1 = &sdcc1;
led-boot = &led_sys;
led-failsafe = &led_sys;
led-running = &led_sys;
led-upgrade = &led_sys;
};
chosen {
bootargs = "root=/dev/mmcblk0p3 rootfstype=squashfs,ext4 rootwait noinitrd";
};
leds {
compatible = "gpio-leds";
led_sys: sys {
label = "m520:green:sys";
gpios = <&gpio_ext 15 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
@@ -45,15 +59,6 @@
};
};
led_pins: led_pins {
mux {
pins = "gpio7", "gpio8", "gpio9", "gpio53";
function = "gpio";
drive-strength = <2>;
bias-pull-down;
};
};
mdio0_pins: mdio0_pins {
clk {
pins = "gpio1";
@@ -111,21 +116,21 @@
status = "okay";
lm75@48 {
status = "okay";
compatible = "lm75";
reg = <0x48>;
};
pcf8563: rtc@51 {
status = "okay";
compatible = "nxp,pcf8563";
reg = <0x51>;
};
tca9539@74 {
status = "okay";
gpio_ext: tca9539@74 {
compatible = "ti,tca9539";
reg = <0x74>;
gpio-controller;
#gpio-cells = <2>;
};
};
};

View File

@@ -362,7 +362,7 @@ define Device/ruijie_rg-mtfi-m520
IMAGE/mmcblk0p2-kernel.bin := append-kernel | pad-to $$$${KERNEL_SIZE}
IMAGE/mmcblk0p3-rootfs.bin := append-rootfs | pad-rootfs
DEVICE_PACKAGES := ath10k-firmware-qca988x-ct e2fsprogs f2fs-tools \
kmod-gpio-pca953x kmod-hwmon-lm75 kmod-fs-ext4 kmod-fs-f2fs kmod-rtc-pcf8563 losetup
kmod-hwmon-lm75 kmod-fs-ext4 kmod-fs-f2fs kmod-rtc-pcf8563 losetup
endef
TARGET_DEVICES += ruijie_rg-mtfi-m520