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
Thanks very much
ar71xx is not DTS based. ath79 is.
Do you have any idea how I can add my LEDs to it?
If you use ath79 target, you'll be able to create a dts file for your device with the LEDs. You'll find some ar9557 devices as examples.
Yes, I have seen those but is it possible to use ath79 architecture when my actual target is ar71xx?
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.
Beware that ar71xx is getting obsolete.
I can't find ath79 architecture in the menuconfig. which one of these choices is correct?
This means that you have wrong sources. master and 19.07 branches have ath79.
The correct choice is
Atheros ATH79 (DTS)
I built a new image but I can't flash it on my module. (8devices Rambutan). I think it's not possible to use ATH79 architecture
It is possible to use ath79 on all ar71xx devices if you port them correctly. It is unclear what you built and why can't you flash it.
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_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_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_tiny is not set
# CONFIG_TARGET_MULTI_PROFILE is not set
# CONFIG_TARGET_ath79_nand_DEVICE_glinet_gl-ar300m-nand is not set
This is my config file
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.
https://patchwork.ozlabs.org/patch/1175065/ or similar, appears to be required to support the SoC's NAND controller.
Thank you Jeff, Any idea how I can add my gpio LEDs to the kernel? Regarding your comments
I haven't messed with mach files, but it looks like
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.
Thank you very much for your help @jeff. Do you know if I can change this file (see below) by a patch?
Yes, you can patch just about anything in the OpenWrt build system.
Could please let me know how I can make the patch file and where should I put it to be recognized during the build?
Note also that the above-linked patch is now on
Author: Michal Cieslakiewicz <redacted>
AuthorDate: Fri Oct 11 10:50:11 2019 +0200
Commit: David Bauer <redacted>
CommitDate: Sun Oct 20 15:32:53 2019 +0200
ath79: add AR934x NAND Flash Controller driver