From: Koen Vandeputte Date: Wed, 12 Jun 2024 12:15:45 +0000 (+0200) Subject: ipq40xx: fix invalid GPIO numbers since kernel 6.6 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=167b016a21f3daa9557559cfdc0a5f2028206cef;p=openwrt%2Fstaging%2Fwigyori.git ipq40xx: fix invalid GPIO numbers since kernel 6.6 The bump to kernel 6.6 increased the GPIO base from 412 to 512 on this target. We need to compensate for that in the GPIO numbers being passed to uci to fix following kernel report: [ 24.176183] export_store: invalid GPIO 423 Tested on a Wallys DR40x9 board. Please note that: Boards "rtl30vw" and "wpj428" are not being altered here. They define GPIO numbers which are even below the previous base of 412 which looks wrong. Actual testing on these boards should be conducted to validate and optionally fix GPIO numbering. Suggested-by: Robert Marko Signed-off-by: Koen Vandeputte --- diff --git a/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches b/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches index ee369d5963..226785d46c 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches @@ -13,33 +13,33 @@ cellc,rtl30vw) ucidef_add_gpio_switch "usb_vcc" "USB power" "401" "0" ;; cilab,meshpoint-one) - ucidef_add_gpio_switch "poe_passtrough" "POE passtrough enable" "413" "1" + ucidef_add_gpio_switch "poe_passtrough" "POE passtrough enable" "513" "1" ;; compex,wpj428) ucidef_add_gpio_switch "sim_card_select" "SIM card select" "3" "0" ;; mikrotik,cap-ac) - ucidef_add_gpio_switch "poe_passtrough" "POE passtrough enable" "414" "0" + ucidef_add_gpio_switch "poe_passtrough" "POE passtrough enable" "514" "0" ;; mikrotik,hap-ac3) - ucidef_add_gpio_switch "poe_passtrough" "PoE Passthrough" "452" "0" + ucidef_add_gpio_switch "poe_passtrough" "PoE Passthrough" "552" "0" ;; mikrotik,hap-ac3-lte6-kit) - ucidef_add_gpio_switch "lte_ant_sw1" "LTE Antenna SW 1" "457" "0" - ucidef_add_gpio_switch "lte_ant_sw2" "LTE Antenna SW 2" "458" "0" - ucidef_add_gpio_switch "lte_reset" "LTE reset" "461" "0" + ucidef_add_gpio_switch "lte_ant_sw1" "LTE Antenna SW 1" "557" "0" + ucidef_add_gpio_switch "lte_ant_sw2" "LTE Antenna SW 2" "558" "0" + ucidef_add_gpio_switch "lte_reset" "LTE reset" "561" "0" ;; sony,ncp-hg100-cellular) - ucidef_add_gpio_switch "uart_dbgcon_en" "debug console enable" "427" "1" + ucidef_add_gpio_switch "uart_dbgcon_en" "debug console enable" "527" "1" ;; wallys,dr40x9) - ucidef_add_gpio_switch "sim_card_select" "SIM card select" "423" "0" + ucidef_add_gpio_switch "sim_card_select" "SIM card select" "523" "0" ;; zte,mf282plus|\ zte,mf286d|\ zte,mf287pro|\ zte,mf289f) - ucidef_add_gpio_switch "power_btn_block" "Power button blocker" "421" "0" + ucidef_add_gpio_switch "power_btn_block" "Power button blocker" "521" "0" ;; esac