Unable to export specific gpio pins. How to check what uses GPIO pins and how to access register?How do I learn what I can do with /proc and /sysHow can I access GPIO pins from CentOS 6.4?How do you read and write from a specific address of an EEPROM from sysFSHow to identify GPIO pin numbers? Is GPIO driver loaded?How to check user and group of files/folder created my makedevsDriver development vs sysfs access vs mmap for GPIOs
Is it unprofessional to ask if a job posting on GlassDoor is real?
What does it mean to describe someone as a butt steak?
Is it possible to download Internet Explorer on my Mac running OS X El Capitan?
Did converts (ger tzedek) in ancient Israel own land?
Took a trip to a parallel universe, need help deciphering
Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?
Blender 2.8 I can't see vertices, edges or faces in edit mode
How much of data wrangling is a data scientist's job?
Stopping power of mountain vs road bike
What is going on with Captain Marvel's blood colour?
A reference to a well-known characterization of scattered compact spaces
How do conventional missiles fly?
How can saying a song's name be a copyright violation?
Could gravitational lensing be used to protect a spaceship from a laser?
Can a rocket refuel on Mars from water?
What reasons are there for a Capitalist to oppose a 100% inheritance tax?
Why does Kotter return in Welcome Back Kotter
1960's book about a plague that kills all white people
Today is the Center
What mechanic is there to disable a threat instead of killing it?
Doing something right before you need it - expression for this?
Should I tell management that I intend to leave due to bad software development practices?
Can one be a co-translator of a book, if he does not know the language that the book is translated into?
Is "remove commented out code" correct English?
Unable to export specific gpio pins. How to check what uses GPIO pins and how to access register?
How do I learn what I can do with /proc and /sysHow can I access GPIO pins from CentOS 6.4?How do you read and write from a specific address of an EEPROM from sysFSHow to identify GPIO pin numbers? Is GPIO driver loaded?How to check user and group of files/folder created my makedevsDriver development vs sysfs access vs mmap for GPIOs
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I use an i.mx6 board (yocto(jethro)) and am configuring a device tree.
I changed a dts file and put the dtb file in a boot partition.
I set GPIO4_IO19 in dts file as follows.
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog_1>;
imx6ul-evk {
pinctrl_hog_1: hoggrp-1
fsl,pins = <
...
MX6UL_PAD_CSI_VSYNC__GPIO4_IO19 0x0000B0B0
...
>;
;
...
At first MX6UL_PAD_CSI_VSYNC__GPIO4_IO19 was defined in other group (usdhcgrp) but I commented out them.
After booting, I checked if gpio is successfully determined as I set.
The result is
echo 115 > /sys/class/gpio/export
-sh: echo: write error: Device or resource busy
So I checked this.
cat /sys/kernel/debug/gpio
GPIOs 0-31, platform/209c000.gpio, 209c000.gpio:
gpio-10 (phy-reset ) out lo
GPIOs 32-63, platform/20a0000.gpio, 20a0000.gpio:
GPIOs 64-95, platform/20a4000.gpio, 20a4000.gpio:
gpio-68 (ft5x06_irq_gpio ) in hi
GPIOs 96-127, platform/20a8000.gpio, 20a8000.gpio:
gpio-109 (? ) out lo
gpio-115 (cd ) in lo
gpio-116 (? ) out lo
gpio-117 (? ) out lo
gpio-118 (sysfs ) in hi
GPIOs 128-159, platform/20ac000.gpio, 20ac000.gpio:
gpio-128 (phy-reset ) out lo
gpio-115 is used by cd. Maybe it means card detection.
I want to use it as sysfs to read the state. Any other way to read it ?
Furthermore, gpio-10, 68, 109, 116, 117 is used by other device.
How can I use them by sysfs?
I think I need to do is checking whether register is correctly set value or not.
If the register value is not the same as I set, I guess the other process set the pin control.However I do not know the way of accessing a register.
What I know about gpio115 is as follows
mux_reg address: 0x01DC and the value.
conf_reg address: 0x0468 and the value.
input_reg address: 0x0000 and the value.
The same as the other gpios.
How can I access 0x01DC and then get the value in linux(yocto)?
Thank you for your cooperation.
sysfs yocto gpio
add a comment |
I use an i.mx6 board (yocto(jethro)) and am configuring a device tree.
I changed a dts file and put the dtb file in a boot partition.
I set GPIO4_IO19 in dts file as follows.
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog_1>;
imx6ul-evk {
pinctrl_hog_1: hoggrp-1
fsl,pins = <
...
MX6UL_PAD_CSI_VSYNC__GPIO4_IO19 0x0000B0B0
...
>;
;
...
At first MX6UL_PAD_CSI_VSYNC__GPIO4_IO19 was defined in other group (usdhcgrp) but I commented out them.
After booting, I checked if gpio is successfully determined as I set.
The result is
echo 115 > /sys/class/gpio/export
-sh: echo: write error: Device or resource busy
So I checked this.
cat /sys/kernel/debug/gpio
GPIOs 0-31, platform/209c000.gpio, 209c000.gpio:
gpio-10 (phy-reset ) out lo
GPIOs 32-63, platform/20a0000.gpio, 20a0000.gpio:
GPIOs 64-95, platform/20a4000.gpio, 20a4000.gpio:
gpio-68 (ft5x06_irq_gpio ) in hi
GPIOs 96-127, platform/20a8000.gpio, 20a8000.gpio:
gpio-109 (? ) out lo
gpio-115 (cd ) in lo
gpio-116 (? ) out lo
gpio-117 (? ) out lo
gpio-118 (sysfs ) in hi
GPIOs 128-159, platform/20ac000.gpio, 20ac000.gpio:
gpio-128 (phy-reset ) out lo
gpio-115 is used by cd. Maybe it means card detection.
I want to use it as sysfs to read the state. Any other way to read it ?
Furthermore, gpio-10, 68, 109, 116, 117 is used by other device.
How can I use them by sysfs?
I think I need to do is checking whether register is correctly set value or not.
If the register value is not the same as I set, I guess the other process set the pin control.However I do not know the way of accessing a register.
What I know about gpio115 is as follows
mux_reg address: 0x01DC and the value.
conf_reg address: 0x0468 and the value.
input_reg address: 0x0000 and the value.
The same as the other gpios.
How can I access 0x01DC and then get the value in linux(yocto)?
Thank you for your cooperation.
sysfs yocto gpio
add a comment |
I use an i.mx6 board (yocto(jethro)) and am configuring a device tree.
I changed a dts file and put the dtb file in a boot partition.
I set GPIO4_IO19 in dts file as follows.
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog_1>;
imx6ul-evk {
pinctrl_hog_1: hoggrp-1
fsl,pins = <
...
MX6UL_PAD_CSI_VSYNC__GPIO4_IO19 0x0000B0B0
...
>;
;
...
At first MX6UL_PAD_CSI_VSYNC__GPIO4_IO19 was defined in other group (usdhcgrp) but I commented out them.
After booting, I checked if gpio is successfully determined as I set.
The result is
echo 115 > /sys/class/gpio/export
-sh: echo: write error: Device or resource busy
So I checked this.
cat /sys/kernel/debug/gpio
GPIOs 0-31, platform/209c000.gpio, 209c000.gpio:
gpio-10 (phy-reset ) out lo
GPIOs 32-63, platform/20a0000.gpio, 20a0000.gpio:
GPIOs 64-95, platform/20a4000.gpio, 20a4000.gpio:
gpio-68 (ft5x06_irq_gpio ) in hi
GPIOs 96-127, platform/20a8000.gpio, 20a8000.gpio:
gpio-109 (? ) out lo
gpio-115 (cd ) in lo
gpio-116 (? ) out lo
gpio-117 (? ) out lo
gpio-118 (sysfs ) in hi
GPIOs 128-159, platform/20ac000.gpio, 20ac000.gpio:
gpio-128 (phy-reset ) out lo
gpio-115 is used by cd. Maybe it means card detection.
I want to use it as sysfs to read the state. Any other way to read it ?
Furthermore, gpio-10, 68, 109, 116, 117 is used by other device.
How can I use them by sysfs?
I think I need to do is checking whether register is correctly set value or not.
If the register value is not the same as I set, I guess the other process set the pin control.However I do not know the way of accessing a register.
What I know about gpio115 is as follows
mux_reg address: 0x01DC and the value.
conf_reg address: 0x0468 and the value.
input_reg address: 0x0000 and the value.
The same as the other gpios.
How can I access 0x01DC and then get the value in linux(yocto)?
Thank you for your cooperation.
sysfs yocto gpio
I use an i.mx6 board (yocto(jethro)) and am configuring a device tree.
I changed a dts file and put the dtb file in a boot partition.
I set GPIO4_IO19 in dts file as follows.
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog_1>;
imx6ul-evk {
pinctrl_hog_1: hoggrp-1
fsl,pins = <
...
MX6UL_PAD_CSI_VSYNC__GPIO4_IO19 0x0000B0B0
...
>;
;
...
At first MX6UL_PAD_CSI_VSYNC__GPIO4_IO19 was defined in other group (usdhcgrp) but I commented out them.
After booting, I checked if gpio is successfully determined as I set.
The result is
echo 115 > /sys/class/gpio/export
-sh: echo: write error: Device or resource busy
So I checked this.
cat /sys/kernel/debug/gpio
GPIOs 0-31, platform/209c000.gpio, 209c000.gpio:
gpio-10 (phy-reset ) out lo
GPIOs 32-63, platform/20a0000.gpio, 20a0000.gpio:
GPIOs 64-95, platform/20a4000.gpio, 20a4000.gpio:
gpio-68 (ft5x06_irq_gpio ) in hi
GPIOs 96-127, platform/20a8000.gpio, 20a8000.gpio:
gpio-109 (? ) out lo
gpio-115 (cd ) in lo
gpio-116 (? ) out lo
gpio-117 (? ) out lo
gpio-118 (sysfs ) in hi
GPIOs 128-159, platform/20ac000.gpio, 20ac000.gpio:
gpio-128 (phy-reset ) out lo
gpio-115 is used by cd. Maybe it means card detection.
I want to use it as sysfs to read the state. Any other way to read it ?
Furthermore, gpio-10, 68, 109, 116, 117 is used by other device.
How can I use them by sysfs?
I think I need to do is checking whether register is correctly set value or not.
If the register value is not the same as I set, I guess the other process set the pin control.However I do not know the way of accessing a register.
What I know about gpio115 is as follows
mux_reg address: 0x01DC and the value.
conf_reg address: 0x0468 and the value.
input_reg address: 0x0000 and the value.
The same as the other gpios.
How can I access 0x01DC and then get the value in linux(yocto)?
Thank you for your cooperation.
sysfs yocto gpio
sysfs yocto gpio
asked Sep 8 '17 at 2:23
user8257918user8257918
24115
24115
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
If you just want to know the state of the pin, It is already presented to you in /sys/kernel/debug/gpio
gpio-115 (cd ) in lo
It is configured as an input, and the current value is low,
This will change if you insert/remove the card in the slot!
If you really want to or need to access the register value directly, try checking up the utility devregs!
New contributor
Bobo Svangård is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f391074%2funable-to-export-specific-gpio-pins-how-to-check-what-uses-gpio-pins-and-how-to%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you just want to know the state of the pin, It is already presented to you in /sys/kernel/debug/gpio
gpio-115 (cd ) in lo
It is configured as an input, and the current value is low,
This will change if you insert/remove the card in the slot!
If you really want to or need to access the register value directly, try checking up the utility devregs!
New contributor
Bobo Svangård is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
If you just want to know the state of the pin, It is already presented to you in /sys/kernel/debug/gpio
gpio-115 (cd ) in lo
It is configured as an input, and the current value is low,
This will change if you insert/remove the card in the slot!
If you really want to or need to access the register value directly, try checking up the utility devregs!
New contributor
Bobo Svangård is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
If you just want to know the state of the pin, It is already presented to you in /sys/kernel/debug/gpio
gpio-115 (cd ) in lo
It is configured as an input, and the current value is low,
This will change if you insert/remove the card in the slot!
If you really want to or need to access the register value directly, try checking up the utility devregs!
New contributor
Bobo Svangård is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
If you just want to know the state of the pin, It is already presented to you in /sys/kernel/debug/gpio
gpio-115 (cd ) in lo
It is configured as an input, and the current value is low,
This will change if you insert/remove the card in the slot!
If you really want to or need to access the register value directly, try checking up the utility devregs!
New contributor
Bobo Svangård is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Bobo Svangård is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 2 days ago
Bobo SvangårdBobo Svangård
1
1
New contributor
Bobo Svangård is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Bobo Svangård is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Bobo Svangård is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f391074%2funable-to-export-specific-gpio-pins-how-to-check-what-uses-gpio-pins-and-how-to%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown