I'd like to add 2 gpio LEDs to my kernel. my target architecture is ar71XX and am using qca9557cpu. Unfortunately I could'nt find the corresponding device tree directory to add my dts file.
Does anyone know how I can add my leds to the kernel? I'm using a 8devices Rambutan board
What do you mean by "your actual target"? Both ar71xx and ath79 work on this cpu.
If you change your "actual target" to ath79, you'll be able to add LEDs using DTS.
If you want to keep ar71xx target, then LEDs are added a different way using mach files.
I can share my config.buildinfo. but I can see in .config file that cpu type CONFIG_CPU_TYPE="24kc" which is wrong. and should be 34kc. Do you think this could be the reason that the image is not correct for my device?
This is not a reason why the image doesn't work. "24kc" image should work on "34kc" CPU. Anyway you can build with 34kc option as well, but it doesn't matter much.
Something is wrong with your dts or other configs.
`Preformatted text`# Automatically generated file; DO NOT EDIT.
# OpenWrt Configuration
#
CONFIG_MODULES=y
CONFIG_HAVE_DOT_CONFIG=y
# CONFIG_TARGET_sunxi is not set
# CONFIG_TARGET_apm821xx is not set
# CONFIG_TARGET_ath25 is not set
# CONFIG_TARGET_ar71xx is not set
CONFIG_TARGET_ath79=y
# CONFIG_TARGET_brcm2708 is not set
# CONFIG_TARGET_bcm53xx is not set
# CONFIG_TARGET_brcm47xx is not set
# CONFIG_TARGET_brcm63xx is not set
# CONFIG_TARGET_cns3xxx is not set
# CONFIG_TARGET_octeon is not set
# CONFIG_TARGET_gemini is not set
# CONFIG_TARGET_mpc85xx is not set
# CONFIG_TARGET_imx6 is not set
# CONFIG_TARGET_mxs is not set
# CONFIG_TARGET_ixp4xx is not set
# CONFIG_TARGET_lantiq is not set
# CONFIG_TARGET_malta is not set
# CONFIG_TARGET_pistachio is not set
# CONFIG_TARGET_mvebu is not set
# CONFIG_TARGET_kirkwood is not set
# CONFIG_TARGET_mediatek is not set
# CONFIG_TARGET_ramips is not set
# CONFIG_TARGET_at91 is not set
# CONFIG_TARGET_rb532 is not set
# CONFIG_TARGET_tegra is not set
# CONFIG_TARGET_layerscape is not set
# CONFIG_TARGET_octeontx is not set
# CONFIG_TARGET_oxnas is not set
# CONFIG_TARGET_armvirt is not set
# CONFIG_TARGET_ipq40xx is not set
# CONFIG_TARGET_ipq806x is not set
# CONFIG_TARGET_samsung is not set
# CONFIG_TARGET_arc770 is not set
# CONFIG_TARGET_archs38 is not set
# CONFIG_TARGET_ar7 is not set
# CONFIG_TARGET_omap is not set
# CONFIG_TARGET_uml is not set
# CONFIG_TARGET_zynq is not set
# CONFIG_TARGET_x86 is not set
# CONFIG_TARGET_ath79_generic is not set
CONFIG_TARGET_ath79_nand=y
# CONFIG_TARGET_ath79_tiny is not set
# CONFIG_TARGET_MULTI_PROFILE is not set
CONFIG_TARGET_ath79_nand_Default=y
# CONFIG_TARGET_ath79_nand_DEVICE_glinet_gl-ar300m-nand is not set
CONFIG_HAS_SUBTARGETS=y
CONFIG_HAS_DEVICES=y
CONFIG_TARGET_BOARD="ath79"
CONFIG_TARGET_SUBTARGET="nand"
CONFIG_TARGET_PROFILE="Default"
CONFIG_TARGET_ARCH_PACKAGES="mips_24kc"
There is no NAND support on the ath79 platform at this time. The GL-AR300M NAND is non-functional as there are no SPI-NAND drivers on the ath79 platform on master or any other branch.
https://github.com/openwrt/openwrt/pull/2184 has been waiting for meaningful, core-developer review for months now. In the context of the Rambutan board, this provides the kernel support for NAND and UBI, as well as the sysupgrade support required to properly handle NAND upgrades across supported devices, such as from ar71xx to ath79.
and the files it includes by reference would be the starting point.
Controlling them directly with the GPIO lines, either with the legacy sysfs/export approach, or the newer device-driven approach (gpiod, as I recall), would be another approach, that likely wouldn't need a custom kernel and image.