Abhishek Chr Posted January 28 Posted January 28 (edited) Hi, I am using Armbian (latest) image on Banana Pi CM4 and I don't have access to gpio493. I am getting the following error: And looks like gpiochip4xx is not available: When I modprobe this gpio number, I am getting following error: modprobe: FATAL: Module gpiochip493 not found in directory /lib/modules/6.7.2-edge-meson64 Could you please help, how can I enable gpio 493? Thanks Edited January 28 by Abhishek Chr 0 Quote
SteeMan Posted January 28 Posted January 28 Providing logs with armbianmonitor -u helps with troubleshooting and significantly raises chances that issue gets addressed. 0 Quote
Gunjan Gupta Posted January 28 Posted January 28 @Abhishek Chr It generally is better to tell the context behind the issue as well. For example its possible you are expecting pin 493 to be there because may be its there on raspberry pi. But this is not a raspberry pi and is using completely different chipset. Pin numbers can be completely different. Hence it will be better if you tell what you are trying to achieve rather than what you are troubleshooting at the moment. 0 Quote
Abhishek Chr Posted January 28 Author Posted January 28 Hi @Gunjan Gupta, I am trying to access and use GPIOX_18 to drive a relay. gpio pin number for GPIOX_18 is 493, to access it using sysfs. But when I am trying to export it, I am getting invalid argument error. Thanks. 0 Quote
Gunjan Gupta Posted January 28 Posted January 28 can you share the output of "cat /sys/kernel/debug/pinctrl/*/pinmux-pins" 0 Quote
Abhishek Chr Posted January 28 Author Posted January 28 I get following options under pinctrl: 0 Quote
Gunjan Gupta Posted January 28 Posted January 28 Not an amlogic person and I couldn't get much information on it except that its supposed to be pin 83 on second chip - https://elixir.bootlin.com/linux/latest/source/include/dt-bindings/gpio/meson-g12a-gpio.h#L111. So my wild guess is try using 680 as the pin number. 0 Quote
Gunjan Gupta Posted January 28 Posted January 28 Also could you please try copy pasting the output next time instead of using snipping tool? Not sure why shared output of ls instead of cat like I asked. The ls output is not really usable cause its truncated 0 Quote
Gunjan Gupta Posted January 28 Posted January 28 Went through cm4 dts. Based on that you should be able to see all pins including GPIOX_18 available in the output of pinmux-pins file present in the ff634400.bus:pinctrl@40-pinctrl-meson directory. Use the pin number from there. 0 Quote
Abhishek Chr Posted January 28 Author Posted January 28 Thanks @Gunjan Gupta. I get following output: a@bananapicm4io:~$ sudo cat /sys/kernel/debug/pinctrl/ff634400.bus:pinctrl@40-pinctrl-meson/pinmux-pins Pinmux settings per pin Format: pin (name): mux_owner gpio_owner hog? pin 0 (GPIOZ_0): ff3f0000.ethernet (GPIO UNCLAIMED) function eth group eth_mdio pin 1 (GPIOZ_1): ff3f0000.ethernet (GPIO UNCLAIMED) function eth group eth_mdc pin 2 (GPIOZ_2): ff3f0000.ethernet (GPIO UNCLAIMED) function eth group eth_rgmii_rx_clk pin 3 (GPIOZ_3): ff3f0000.ethernet (GPIO UNCLAIMED) function eth group eth_rx_dv pin 4 (GPIOZ_4): ff3f0000.ethernet (GPIO UNCLAIMED) function eth group eth_rxd0 pin 5 (GPIOZ_5): ff3f0000.ethernet (GPIO UNCLAIMED) function eth group eth_rxd1 pin 6 (GPIOZ_6): ff3f0000.ethernet periphs-banks:518 function eth group eth_rxd2_rgmii pin 7 (GPIOZ_7): ff3f0000.ethernet (GPIO UNCLAIMED) function eth group eth_rxd3_rgmii pin 8 (GPIOZ_8): ff3f0000.ethernet (GPIO UNCLAIMED) function eth group eth_rgmii_tx_clk pin 9 (GPIOZ_9): ff3f0000.ethernet (GPIO UNCLAIMED) function eth group eth_txen pin 10 (GPIOZ_10): ff3f0000.ethernet (GPIO UNCLAIMED) function eth group eth_txd0 pin 11 (GPIOZ_11): ff3f0000.ethernet (GPIO UNCLAIMED) function eth group eth_txd1 pin 12 (GPIOZ_12): ff3f0000.ethernet (GPIO UNCLAIMED) function eth group eth_txd2_rgmii pin 13 (GPIOZ_13): ff3f0000.ethernet (GPIO UNCLAIMED) function eth group eth_txd3_rgmii pin 14 (GPIOZ_14): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 15 (GPIOZ_15): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 16 (GPIOH_0): ff600000.hdmi-tx (GPIO UNCLAIMED) function hdmitx group hdmitx_sda pin 17 (GPIOH_1): ff600000.hdmi-tx (GPIO UNCLAIMED) function hdmitx group hdmitx_sck pin 18 (GPIOH_2): ff600000.hdmi-tx (GPIO UNCLAIMED) function hdmitx group hdmitx_hpd_in pin 19 (GPIOH_3): ff800280.cec (GPIO UNCLAIMED) function cec_ao_b_h group cec_ao_b_h pin 20 (GPIOH_4): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 21 (GPIOH_5): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 22 (GPIOH_6): ffd1e000.i2c (GPIO UNCLAIMED) function i2c1 group i2c1_sda_h6 pin 23 (GPIOH_7): ffd1e000.i2c (GPIO UNCLAIMED) function i2c1 group i2c1_sck_h7 pin 24 (GPIOH_8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 25 (BOOT_0): ffe07000.mmc (GPIO UNCLAIMED) function emmc group emmc_nand_d0 pin 26 (BOOT_1): ffe07000.mmc (GPIO UNCLAIMED) function emmc group emmc_nand_d1 pin 27 (BOOT_2): ffe07000.mmc (GPIO UNCLAIMED) function emmc group emmc_nand_d2 pin 28 (BOOT_3): ffe07000.mmc (GPIO UNCLAIMED) function emmc group emmc_nand_d3 pin 29 (BOOT_4): ffe07000.mmc (GPIO UNCLAIMED) function emmc group emmc_nand_d4 pin 30 (BOOT_5): ffe07000.mmc (GPIO UNCLAIMED) function emmc group emmc_nand_d5 pin 31 (BOOT_6): ffe07000.mmc (GPIO UNCLAIMED) function emmc group emmc_nand_d6 pin 32 (BOOT_7): ffe07000.mmc (GPIO UNCLAIMED) function emmc group emmc_nand_d7 pin 33 (BOOT_8): ffe07000.mmc (GPIO UNCLAIMED) function emmc group emmc_clk pin 34 (BOOT_9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 35 (BOOT_10): ffe07000.mmc (GPIO UNCLAIMED) function emmc group emmc_cmd pin 36 (BOOT_11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 37 (BOOT_12): (MUX UNCLAIMED) periphs-banks:549 pin 38 (BOOT_13): ffe07000.mmc (GPIO UNCLAIMED) function emmc group emmc_nand_ds pin 39 (BOOT_14): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 40 (BOOT_15): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 41 (GPIOC_0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 42 (GPIOC_1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 43 (GPIOC_2): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 44 (GPIOC_3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 45 (GPIOC_4): ffe05000.mmc (GPIO UNCLAIMED) function gpio_periphs group GPIOC_4 pin 46 (GPIOC_5): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 47 (GPIOC_6): (MUX UNCLAIMED) periphs-banks:559 pin 48 (GPIOC_7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 49 (GPIOA_0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 50 (GPIOA_1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 51 (GPIOA_2): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 52 (GPIOA_3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 53 (GPIOA_4): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 54 (GPIOA_5): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 55 (GPIOA_6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 56 (GPIOA_7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 57 (GPIOA_8): (MUX UNCLAIMED) periphs-banks:569 pin 58 (GPIOA_9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 59 (GPIOA_10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 60 (GPIOA_11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 61 (GPIOA_12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 62 (GPIOA_13): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 63 (GPIOA_14): ffd1c000.i2c (GPIO UNCLAIMED) function i2c3 group i2c3_sda_a pin 64 (GPIOA_15): ffd1c000.i2c (GPIO UNCLAIMED) function i2c3 group i2c3_sck_a pin 65 (GPIOX_0): ffe03000.mmc (GPIO UNCLAIMED) function sdio group sdio_d0 pin 66 (GPIOX_1): ffe03000.mmc (GPIO UNCLAIMED) function sdio group sdio_d1 pin 67 (GPIOX_2): ffe03000.mmc (GPIO UNCLAIMED) function sdio group sdio_d2 pin 68 (GPIOX_3): ffe03000.mmc (GPIO UNCLAIMED) function sdio group sdio_d3 pin 69 (GPIOX_4): ffe03000.mmc (GPIO UNCLAIMED) function sdio group sdio_clk pin 70 (GPIOX_5): ffe03000.mmc (GPIO UNCLAIMED) function sdio group sdio_cmd pin 71 (GPIOX_6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 72 (GPIOX_7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 73 (GPIOX_8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 74 (GPIOX_9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 75 (GPIOX_10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 76 (GPIOX_11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 77 (GPIOX_12): ffd24000.serial (GPIO UNCLAIMED) function uart_a group uart_a_tx pin 78 (GPIOX_13): ffd24000.serial (GPIO UNCLAIMED) function uart_a group uart_a_rx pin 79 (GPIOX_14): ffd24000.serial (GPIO UNCLAIMED) function uart_a group uart_a_cts pin 80 (GPIOX_15): ffd24000.serial (GPIO UNCLAIMED) function uart_a group uart_a_rts pin 81 (GPIOX_16): ffd19000.pwm (GPIO UNCLAIMED) function pwm_e group pwm_e pin 82 (GPIOX_17): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 83 (GPIOX_18): (MUX UNCLAIMED) periphs-banks:595 pin 84 (GPIOX_19): (MUX UNCLAIMED) periphs-banks:596 So my GPIOX_18 pin number is 595 1 Quote
Gunjan Gupta Posted January 28 Posted January 28 That seems correct. gpiochip512 + pin 83 = 595. 0 Quote
Abhishek Chr Posted January 28 Author Posted January 28 yep that worked. thanks @Gunjan Gupta 0 Quote
Abhishek Chr Posted January 29 Author Posted January 29 Hi @Gunjan Gupta, Please excuse my naivety. But can I use Linux_Tx pin as gpio using sysfs? 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.