I can take a peek at /sys/kernel/debug/pinctrl/44e10800.pinmux/pins
and see the pin I am interested in:
pin 38 (44e10898.0) 00000037 pinctrl-single
This corresponds to GPIO[2]4
, or P8.10
.
I'm using Fedora 21, with kernel 3.17.7-300.fc21.armv7hl
.
I would like to change the mux to 0x27
. In words, this would configure the pin to have an internal pull-down resistor (before, it was pull up).
The desired output would be:
pin 38 (44e10898.0) 00000027 pinctrl-single
What can be done?
Note: There is no /sys/devices/bone_capemgr.*
, as this is not on Angstrom. The typical DTO approach exports the changes by modifying the cape manager. This is not an option.
Edit: Following exploration from tad
's line of thought, I did:
dtc -I dtb -O dts -o ~/am335x-boneblack.dts /boot/dtb-3.17.7-300.fc21.armv7hl/am335x-boneblack.dtb
. I edited this file to have:
...
pinmux@44e10800 {
...
example {
pinctrl-single,pins = <0x898 0x27>;
};
};
...
Then, I compiled it again with dtc
, stuck it in /boot/dtb-3.17.7-300.fc21.armv7hl/
, and rebooted. However, nothing changed. What's happening?
Edit:
As indicated by Charles Steinkuehler, the 0x800
needs to be subtracted from the offset, and "something" needs to reference "example".
If I add 0x098 0x27
to my entry for user_leds_s0
, the desired behavior is observed:
...
user_leds_s0 {
pinctrl-single,pins = <0x54 0x7 0x58 0x17 0x5c 0x7 0x60 0x170 0x098 0x27>;
linux,phandle = <0x3f>;
phandle = <0x3f>;
};
...
Now, this is all fine and gets me where I need to go. However, that pin isn't really a user_led. It should be in a separate field of some kind. So, what is the "something" I need to do to get the "example" field or similar to work?
0x98 0x27
to one of them, nor renamingexample
topinmux_P8_07_default_pin
. The decompiled dtb looks to be identical to github.com/torvalds/linux/blob/… after the includes. Notably, I don't see0x98
anywhere, so I don't know how it is being set to0x37
in the first place. – Tope