We want to use GPIO7/GPIO9/GPIO11/GPIO12/GPIO13 with fpga, so need to know the real gpioindex.
with cmd :
cat /sys/kernel/debug/gpio
check pin-mux file and we got:
GPIO07 /gpio-389 (PG.06)
GPIO09 / gpio-492 (PAC.06)
GPIO11 /gpio-454 (PQ.06)
GPIO12 /gpio-433 (PN.01)
GPIO13 /gpio-391 (PH.00)
here, I do not know how to get these values with :
soc/t23x/kernel-include/dt-bindings/gpio/tegra234-gpio.h
please help to tell me.
thanks
Check the pinmux spread sheet table and it will tell you.
Thanks for the reply.
we had download the spread sheet, then know the relation “GPIOxx:GPIO_Pxx.xx”.
GPIO07 —>GPIO3_PG.06
GPIO09 —>GPIO3_PAC.06
GPIO11 —>GPIO3_PQ.06
GPIO12 —>GPIO3_PN.01
GPIO13 —>GPIO3_PH.00
so we use cat cmd got the relation “gpio-xxx: Pxx.xx”
gpio-389 (PG.06)
gpio-492 (PAC.06)
gpio-454 (PQ.06)
gpio-433 (PN.01)
gpio-391 (PH.00)
but it can not be calcuate with formula:
define TEGRA234_MAIN_GPIO(port, offset)
((TEGRA234_MAIN_GPIO_PORT_#port * 8) + offset)
gpio-xxx = basegpio + TEGRA234_MAIN_GPIO(port, offset)
if the formula still same, we can got different base.
define TEGRA234_MAIN_GPIO_PORT_G 6
define TEGRA234_MAIN_GPIO_PORT_H 7
define TEGRA234_MAIN_GPIO_PORT_N 13
define TEGRA234_MAIN_GPIO_PORT_Q 15
define TEGRA234_MAIN_GPIO_PORT_AC 20
What is your result of /sys/kernel/debug/gpio?
i had post before about gpios we used, here is the result:
gpiochip1: GPIOs 316-347, parent: platform/c2f0000.gpio, tegra234-gpio-aon:
gpio-316 (PAA.00 )
gpio-317 (PAA.01 )
gpio-318 (PAA.02 )
gpio-319 (PAA.03 )
gpio-320 (PAA.04 )
gpio-321 (PAA.05 |fixed-regulators:reg) out hi
gpio-322 (PAA.06 )
gpio-323 (PAA.07 )
gpio-324 (PBB.00 )
gpio-325 (PBB.01 )
gpio-326 (PBB.02 )
gpio-327 (PBB.03 )
gpio-328 (PCC.00 )
gpio-329 (PCC.01 )
gpio-330 (PCC.02 )
gpio-331 (PCC.03 |mux ) out hi
gpio-332 (PCC.04 )
gpio-333 (PCC.05 )
gpio-334 (PCC.06 )
gpio-335 (PCC.07 )
gpio-336 (PDD.00 )
gpio-337 (PDD.01 )
gpio-338 (PDD.02 )
gpio-339 (PEE.00 )
gpio-340 (PEE.01 )
gpio-341 (PEE.02 )
gpio-342 (PEE.03 )
gpio-343 (PEE.04 |power-key ) in lo IRQ ACTIVE LOW
gpio-344 (PEE.05 )
gpio-345 (PEE.06 )
gpio-346 (PEE.07 )
gpio-347 (PGG.00 )
gpiochip0: GPIOs 348-511, parent: platform/2200000.gpio, tegra234-gpio:
gpio-348 (PA.00 |fixed-regulators:reg) out lo
gpio-349 (PA.01 )
gpio-350 (PA.02 )
gpio-351 (PA.03 )
gpio-352 (PA.04 )
gpio-353 (PA.05 )
gpio-354 (PA.06 )
gpio-355 (PA.07 )
gpio-356 (PB.00 )
gpio-357 (PC.00 )
gpio-358 (PC.01 )
gpio-359 (PC.02 )
gpio-360 (PC.03 )
gpio-361 (PC.04 )
gpio-362 (PC.05 )
gpio-363 (PC.06 )
gpio-364 (PC.07 )
gpio-365 (PD.00 )
gpio-366 (PD.01 )
gpio-367 (PD.02 )
gpio-368 (PD.03 )
gpio-369 (PE.00 )
gpio-370 (PE.01 )
gpio-371 (PE.02 )
gpio-372 (PE.03 )
gpio-373 (PE.04 )
gpio-374 (PE.05 )
gpio-375 (PE.06 )
gpio-376 (PE.07 )
gpio-377 (PF.00 )
gpio-378 (PF.01 )
gpio-379 (PF.02 )
gpio-380 (PF.03 )
gpio-381 (PF.04 )
gpio-382 (PF.05 )
gpio-383 (PG.00 |force-recovery ) in hi IRQ ACTIVE LOW
gpio-384 (PG.01 )
gpio-385 (PG.02 )
gpio-386 (PG.03 )
gpio-387 (PG.04 )
gpio-388 (PG.05 )
gpio-389 (PG.06 )
gpio-390 (PG.07 |cd ) in lo IRQ
gpio-391 (PH.00 )
gpio-392 (PH.01 )
gpio-393 (PH.02 )
gpio-394 (PH.03 )
gpio-395 (PH.04 )
gpio-396 (PH.05 )
gpio-397 (PH.06 )
gpio-398 (PH.07 )
gpio-399 (PI.00 )
gpio-400 (PI.01 )
gpio-401 (PI.02 )
gpio-402 (PI.03 )
gpio-403 (PI.04 )
gpio-404 (PI.05 )
gpio-405 (PI.06 )
gpio-406 (PJ.00 )
gpio-407 (PJ.01 )
gpio-408 (PJ.02 )
gpio-409 (PJ.03 )
gpio-410 (PJ.04 )
gpio-411 (PJ.05 )
gpio-412 (PK.00 )
gpio-413 (PK.01 )
gpio-414 (PK.02 )
gpio-415 (PK.03 )
gpio-416 (PK.04 )
gpio-417 (PK.05 )
gpio-418 (PK.06 )
gpio-419 (PK.07 )
gpio-420 (PL.00 )
gpio-421 (PL.01 )
gpio-422 (PL.02 |nvidia,pex-wake ) in hi ACTIVE LOW
gpio-423 (PL.03 )
gpio-424 (PM.00 )
gpio-425 (PM.01 )
gpio-426 (PM.02 )
gpio-427 (PM.03 )
gpio-428 (PM.04 )
gpio-429 (PM.05 )
gpio-430 (PM.06 )
gpio-431 (PM.07 )
gpio-432 (PN.00 )
gpio-433 (PN.01 )
gpio-434 (PN.02 )
gpio-435 (PN.03 )
gpio-436 (PN.04 )
gpio-437 (PN.05 )
gpio-438 (PN.06 )
gpio-439 (PN.07 )
gpio-440 (PP.00 )
gpio-441 (PP.01 )
gpio-442 (PP.02 )
gpio-443 (PP.03 )
gpio-444 (PP.04 )
gpio-445 (PP.05 )
gpio-446 (PP.06 )
gpio-447 (PP.07 )
gpio-448 (PQ.00 )
gpio-449 (PQ.01 )
gpio-450 (PQ.02 )
gpio-451 (PQ.03 )
gpio-452 (PQ.04 )
gpio-453 (PQ.05 )
gpio-454 (PQ.06 )
gpio-455 (PQ.07 )
gpio-456 (PR.00 )
gpio-457 (PR.01 )
gpio-458 (PR.02 )
gpio-459 (PR.03 )
gpio-460 (PR.04 )
gpio-461 (PR.05 )
gpio-462 (PX.00 )
gpio-463 (PX.01 )
gpio-464 (PX.02 )
gpio-465 (PX.03 )
gpio-466 (PX.04 )
gpio-467 (PX.05 )
gpio-468 (PX.06 )
gpio-469 (PX.07 )
gpio-470 (PY.00 )
gpio-471 (PY.01 )
gpio-472 (PY.02 )
gpio-473 (PY.03 )
gpio-474 (PY.04 )
gpio-475 (PY.05 )
gpio-476 (PY.06 )
gpio-477 (PY.07 )
gpio-478 (PZ.00 )
gpio-479 (PZ.01 |vbus ) in hi IRQ ACTIVE LOW
gpio-480 (PZ.02 )
gpio-481 (PZ.03 )
gpio-482 (PZ.04 )
gpio-483 (PZ.05 )
gpio-484 (PZ.06 )
gpio-485 (PZ.07 )
gpio-486 (PAC.00 )
gpio-487 (PAC.01 )
gpio-488 (PAC.02 )
gpio-489 (PAC.03 )
gpio-490 (PAC.04 )
gpio-491 (PAC.05 )
gpio-492 (PAC.06 )
gpio-493 (PAC.07 )
gpio-494 (PAD.00 )
gpio-495 (PAD.01 )
gpio-496 (PAD.02 )
gpio-497 (PAD.03 )
gpio-498 (PAE.00 )
gpio-499 (PAE.01 )
gpio-500 (PAF.00 )
gpio-501 (PAF.01 )
gpio-502 (PAF.02 )
gpio-503 (PAF.03 )
gpio-504 (PAG.00 )
gpio-505 (PAG.01 )
gpio-506 (PAG.02 )
gpio-507 (PAG.03 )
gpio-508 (PAG.04 )
gpio-509 (PAG.05 )
gpio-510 (PAG.06 )
gpio-511 (PAG.07 )
system
Closed
July 19, 2023, 2:53am
12
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.