Discussion:
[Arm-netbook] Testing: GPIO
Luke Kenneth Casson Leighton
2018-05-12 11:27:27 UTC
Permalink
Hi richard on phone brief. Yes 3.4, different, uses module config, works
fine. Talk to phil about ikiwiki itsvon his server
First, in adding the link to the sunxi wiki page documenting GPIO access on
Allwinner chips[1] to the rhombus-tech.net "Testing" wiki page[2], I again
triggered the "An error occurred while writing CGI reply" page delivered at
URL: http://rhombus-tech.net/cgi-bin/rhombus/ikiwiki.cgi
I clicked the "Save" button after editting the ikiwiki code and just waited
for it to return.
Second, the linux-sunxi wiki page refers to the interaction with the GPIO
driver differently depending on whether using linux-mainline or sunxi-3.4
kernel. If memory serves it seems you mentioned we plan to ship the cards
with sunxi-3.4 until we get several drivers into linux-mainline, is that
so?
Sincerely,
Richard
[1] https://linux-sunxi.org/GPIO
[2] http://rhombus-tech.net/allwinner_a10/testing/
_______________________________________________
http://lists.phcomp.co.uk/mailman/listinfo/arm-netbook
--
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
_______________________________________________
arm-netbook mailing list arm-***@lists.phcomp.co.uk
http://lists.phcomp.co.uk/mailman/listinfo/arm-netbook
Send large attachments to arm-netbo
Richard Wilbur
2018-05-14 15:56:28 UTC
Permalink
Post by Luke Kenneth Casson Leighton
Hi richard on phone brief. Yes 3.4, different, uses module config, works
fine.
Thanks for the response. What I'm wondering is what the boot
image/partition has for 'script.bin' because under kernel 3.4 that defines
the set of GPIO pins that will be enabled at boot and their initial state.
(Looks like it determines the initial state of all the pin multiplexors.)
Probably more easily interpreted in the FEX form (human-readable text),
albeit larger.
Post by Luke Kenneth Casson Leighton
Talk to phil about ikiwiki itsvon his server
Thanks for the referral. Took it up with him separately.
_______________________________________________
arm-netbook mailing list arm-***@lists.phcomp.co.uk
http://lists.phcomp.co.uk/mailman/listinfo/arm-netbook
Send large attachments to arm-***@files.phcom
Luke Kenneth Casson Leighton
2018-05-14 18:24:12 UTC
Permalink
Look up sunxi-tools fex2bin bin2fex and wiki sunxi fex.
On Sat, May 12, 2018 at 5:27 AM, Luke Kenneth Casson Leighton <
Post by Luke Kenneth Casson Leighton
Hi richard on phone brief. Yes 3.4, different, uses module config, works
fine.
Thanks for the response. What I'm wondering is what the boot
image/partition has for 'script.bin' because under kernel 3.4 that defines
the set of GPIO pins that will be enabled at boot and their initial state.
(Looks like it determines the initial state of all the pin multiplexors.)
Probably more easily interpreted in the FEX form (human-readable text),
albeit larger.
Post by Luke Kenneth Casson Leighton
Talk to phil about ikiwiki itsvon his server
Thanks for the referral. Took it up with him separately.
_______________________________________________
http://lists.phcomp.co.uk/mailman/listinfo/arm-netbook
--
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
_______________________________________________
arm-netbook mailing list arm-***@lists.phcomp.co.uk
http://lists.phcomp.co.uk/mailman/listinfo/arm-netbook
Send large attachments to arm-netbook@
Richard Wilbur
2018-05-15 20:14:09 UTC
Permalink
Post by Luke Kenneth Casson Leighton
Look up sunxi-tools fex2bin bin2fex and wiki sunxi fex.
I did look up and read some about those topics--and I will read more!

What I'm wondering is what does the script.bin configure presently at
boot? Then I can figure out whether we need to change it in order to
be able to test the GPIO pins. With sunxi 3.4 kernel it looks like
whatever we have configured in script.bin is what we have to work with
on that load of the gpio-sunxi kernel module so I'm interested in
making sure the GPIO pins we want to test are configured into the
/sys/class/gpio namespace, and at what names they appear.

I read in the sunxi GPIO wiki page[1] that script.bin can specify the
mapping between the GPIO number NNN and PORT:BIT that determines the
sysfs name /sys/class/gpio/gpioNNN_PORTBIT brought about by
sudo echo NNN >/sys/class/gpio/export
# A request to export control over gpio mapping NNN (as defined in
script.bin) from kernel space to user space.

So, to track down the pins we want, we need to know the mapping that
is currently in script.bin (or specify it ourselves).

There is a scheme outlined in the sunxi GPIO wiki page[1] for
associating the numbers NNN with PORT:BIT that is followed on the
A20/PIO page[2] and seems useful as it is consistent and reversible.
So if we haven't already created a version of script.bin (for the
sunxi-gpio module) that maps the A20's Programmable Input/Output pins
for the DS113 card, I'd recommend we follow that scheme.

NNN := (PORT - 'A') * 32 + BIT

PORT:BIT NNN sysfs
PI11 267 gpio267_pi11
PI10 266 gpio266_pi10
PI13 269 gpio269_pi13
PI12 268 gpio268_pi12
PI3 259 gpio259_pi3
PB4 36 gpio36_pb4
PH0 224 gpio224_ph0
PB3 35 gpio35_pb3

References:

[1] https://linux-sunxi.org/GPIO
[2] https://linux-sunxi.org/A20/PIO

_______________________________________________
arm-netbook mailing list arm-***@lists.phcomp.co.uk
http://lists.phcomp.co.uk/mailman/listinfo/arm-netbook
Send large attachments to ar
Luke Kenneth Casson Leighton
2018-05-15 20:30:20 UTC
Permalink
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68


On Tue, May 15, 2018 at 9:14 PM, Richard Wilbur
Post by Richard Wilbur
Post by Luke Kenneth Casson Leighton
Look up sunxi-tools fex2bin bin2fex and wiki sunxi fex.
I did look up and read some about those topics--and I will read more!
What I'm wondering is what does the script.bin configure presently at
boot?
whatever you ask it to. it's the exact analogous equivalent of device-tree.
Post by Richard Wilbur
Then I can figure out whether we need to change it in order to
be able to test the GPIO pins. With sunxi 3.4 kernel it looks like
whatever we have configured in script.bin is what we have to work with
on that load of the gpio-sunxi kernel module so I'm interested in
making sure the GPIO pins we want to test are configured into the
/sys/class/gpio namespace, and at what names they appear.
I read in the sunxi GPIO wiki page[1] that script.bin can specify the
mapping between the GPIO number NNN and PORT:BIT that determines the
sysfs name /sys/class/gpio/gpioNNN_PORTBIT brought about by
sudo echo NNN >/sys/class/gpio/export
# A request to export control over gpio mapping NNN (as defined in
script.bin) from kernel space to user space.
yep.
Post by Richard Wilbur
So, to track down the pins we want, we need to know the mapping that
is currently in script.bin (or specify it ourselves).
yyep. that means looking at the schematic DS113 PDF (oh, you have
the A20 pin names already don't you?), so just... drop those into the
fex gpio section, and as long as CONFIG_SUNXI_GPIO is enabled on
kernel compiles they'll get dropped into /sys/class/gpio as expected.
Post by Richard Wilbur
There is a scheme outlined in the sunxi GPIO wiki page[1] for
associating the numbers NNN with PORT:BIT that is followed on the
A20/PIO page[2] and seems useful as it is consistent and reversible.
So if we haven't already created a version of script.bin (for the
sunxi-gpio module) that maps the A20's Programmable Input/Output pins
for the DS113 card, I'd recommend we follow that scheme.
NNN := (PORT - 'A') * 32 + BIT
PORT:BIT NNN sysfs
PI11 267 gpio267_pi11
PI10 266 gpio266_pi10
PI13 269 gpio269_pi13
PI12 268 gpio268_pi12
PI3 259 gpio259_pi3
PB4 36 gpio36_pb4
PH0 224 gpio224_ph0
PB3 35 gpio35_pb3
ok - hum i need to send you that card, don't i. you'll be able to
try this out.

l.

_______________________________________________
arm-netbook mailing list arm-***@lists.phcomp.co.uk
http://lists.phcomp.co.uk/mailman/listinfo/arm-netbook
Richard Wilbur
2018-05-16 17:46:52 UTC
Permalink
Is there a
place I can download the install image (boot image) you are presently using on the DS113 A20 cards?

(Accidentally hit send before I finished the sentence. A less than satisfying user experience on this phone, but at least I can interact in my present physical context.)

Richard
_______________________________________________
arm-netbook mailing list arm-***@lists.phcomp.co.uk
http://lists.phcomp.co.uk/mailman/listinfo/arm-netbook
Send large attachments to arm-***@f
Richard Wilbur
2018-05-17 22:57:44 UTC
Permalink
Luke, thanks for the links and the instructions. I'll study them further when I get home this evening (bigger screen and keyboard!).

Richard
_______________________________________________
arm-netbook mailing list arm-***@lists.phcomp.co.uk
http://lists.phcomp.co.uk/mailman/listinfo/arm-netbook
Send large attachments to arm-***@fi

Loading...