[beagleboard] Device tree overlay does not affect GPIO pin's state
Hi all, I started using Beaglebone Black with Debian 7.9 for my project and I'm trying to load my own device-tree overlay in order to get more GPIO pins available. I need to use P8.46 pin as GPIO (Mode7) pin. I've disabled HDMI cape and then built custom dts to configure P8.46 pin as GPIO pin (mode7, output, pull-down): /dts-v1/; /plugin/; /{ compatible = "ti,beaglebone", "ti,beaglebone-black"; part_number = "BS_PINMODE_P8_46_0x7"; exclusive-use = "P8.46", "gpio2_7"; fragment@0 { target = <&am33xx_pinmux>; __overlay__ { bs_pinmode_P8_46_0x7: pinmux_bs_pinmode_P8_46_0x7 { pinctrl-single,pins = <0x0a4 0x7>; }; }; }; fragment@1 { target = <&ocp>; __overlay__ { bs_pinmode_P8_46_0x7_pinmux { compatible = "bone-pinmux-helper"; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&bs_pinmode_P8_46_0x7>; }; }; }; }; Then I've compiled dts and put dtbo in /lib/firmware. I can load the overlay manually: root@beaglebone:~# cat /sys/devices/bone_capemgr.9/slots 0: 54:PF--- 1: 55:PF--- 2: 56:PF--- 3: 57:PF--- 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G 5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI 6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN 7: ff:P-O-L Override Board Name,00A0,Override Manuf,bspm_P8_46_7 But when I tried to check pin config I got the next output: root@beaglebone:~# cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins | grep "pin 71" pin 71 (44e1091c) pinctrl-single What's wrong with my dts why I can't change muxing for the pin? What am I missing? -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] Device tree overlay does not affect GPIO pin's state
1) Reboot the board 2) check whether the cape has been rightly loaded 3) if yes, check the pinmux again. Your device tree seems ok to me 2016-01-09 9:29 GMT+01:00 : > Hi all, > > I started using Beaglebone Black with Debian 7.9 for my project and I'm > trying to load my own device-tree overlay in order to get more GPIO pins > available. I need to use P8.46 pin as GPIO (Mode7) pin. I've disabled HDMI > cape and then built custom dts to configure P8.46 pin as GPIO pin (mode7, > output, pull-down): > > /dts-v1/; > /plugin/; > > > /{ > compatible = "ti,beaglebone", "ti,beaglebone-black"; > part_number = "BS_PINMODE_P8_46_0x7"; > > > exclusive-use = > "P8.46", > "gpio2_7"; > > > fragment@0 { > target = <&am33xx_pinmux>; > __overlay__ { > bs_pinmode_P8_46_0x7: pinmux_bs_pinmode_P8_46_0x7 { > pinctrl-single,pins = <0x0a4 0x7>; > }; > }; > }; > > > fragment@1 { > target = <&ocp>; > __overlay__ { > bs_pinmode_P8_46_0x7_pinmux { > compatible = "bone-pinmux-helper"; > status = "okay"; > pinctrl-names = "default"; > pinctrl-0 = <&bs_pinmode_P8_46_0x7>; > }; > }; > }; > }; > > Then I've compiled dts and put dtbo in /lib/firmware. I can load the > overlay manually: > > root@beaglebone:~# cat /sys/devices/bone_capemgr.9/slots > 0: 54:PF--- > 1: 55:PF--- > 2: 56:PF--- > 3: 57:PF--- > 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G > 5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI > 6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN > 7: ff:P-O-L Override Board Name,00A0,Override Manuf,bspm_P8_46_7 > > But when I tried to check pin config I got the next output: > root@beaglebone:~# cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins | > grep "pin 71" > pin 71 (44e1091c) pinctrl-single > > What's wrong with my dts why I can't change muxing for the pin? What am I > missing? > > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to the Google Groups > "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to beagleboard+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] Device tree overlay does not affect GPIO pin's state
Sorry I forgot: you should check with the following command: root@beaglebone:~# cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins | grep "8a4" because you have 0x0a4 that is the offset. Ok, now you should add 44e10800 => 44e108a4 Looking for "8a4" is enough and you ll find the right pin. Pin 71 is not the right one. 2016-01-18 21:04 GMT+01:00 Davide Picchi : > 1) Reboot the board > 2) check whether the cape has been rightly loaded > 3) if yes, check the pinmux again. > > Your device tree seems ok to me > > 2016-01-09 9:29 GMT+01:00 : > >> Hi all, >> >> I started using Beaglebone Black with Debian 7.9 for my project and I'm >> trying to load my own device-tree overlay in order to get more GPIO pins >> available. I need to use P8.46 pin as GPIO (Mode7) pin. I've disabled HDMI >> cape and then built custom dts to configure P8.46 pin as GPIO pin (mode7, >> output, pull-down): >> >> /dts-v1/; >> /plugin/; >> >> >> /{ >> compatible = "ti,beaglebone", "ti,beaglebone-black"; >> part_number = "BS_PINMODE_P8_46_0x7"; >> >> >> exclusive-use = >> "P8.46", >> "gpio2_7"; >> >> >> fragment@0 { >> target = <&am33xx_pinmux>; >> __overlay__ { >> bs_pinmode_P8_46_0x7: pinmux_bs_pinmode_P8_46_0x7 { >> pinctrl-single,pins = <0x0a4 0x7>; >> }; >> }; >> }; >> >> >> fragment@1 { >> target = <&ocp>; >> __overlay__ { >> bs_pinmode_P8_46_0x7_pinmux { >> compatible = "bone-pinmux-helper"; >> status = "okay"; >> pinctrl-names = "default"; >> pinctrl-0 = <&bs_pinmode_P8_46_0x7>; >> }; >> }; >> }; >> }; >> >> Then I've compiled dts and put dtbo in /lib/firmware. I can load the >> overlay manually: >> >> root@beaglebone:~# cat /sys/devices/bone_capemgr.9/slots >> 0: 54:PF--- >> 1: 55:PF--- >> 2: 56:PF--- >> 3: 57:PF--- >> 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G >> 5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI >> 6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN >> 7: ff:P-O-L Override Board Name,00A0,Override Manuf,bspm_P8_46_7 >> >> But when I tried to check pin config I got the next output: >> root@beaglebone:~# cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins | >> grep "pin 71" >> pin 71 (44e1091c) pinctrl-single >> >> What's wrong with my dts why I can't change muxing for the pin? What am I >> missing? >> >> -- >> For more options, visit http://beagleboard.org/discuss >> --- >> You received this message because you are subscribed to the Google Groups >> "BeagleBoard" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to beagleboard+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.