Does anyone know where I can source them?
Thanks, gene83
On my already old image of my Rock64, they are located in /usr/src/linux-headers-4.4.70-rockchip-ayufan-89/ ...
I see at least 30 files in that kernel tree that contain gpio.h as the end of their name. Confusing at best.
Basically, what I need is the attached file, (Which the forum software say I can't attach.) converted from r-pi references to rockchip rk3328 references. Does it even exist?
Thanks a lot for any help. TBT, I haven't carved any C in 20+ years. And at 83, it doesn't seem to be coming back as I wade around in this driver. It works very well indeed on an r-pi3b. Unfortunately I have to reboot, hot or cold, 3 or 4 times before the pi stops throwing away input events and gives me a usable local keyboard. Thats a right PITA. So far, this rock64 seems to be several times faster than the pi. And its keyboard, which works fine on vt0, but X can't make up its mind to use a real keyboard/mouse out of the 12 ghosts Xorg finds on startup, so at the machine I'm looking at a login screen, but can't because the real keyboard is being ignored by X.
That of course is a separate problem. Separate thread, not yet posted, still learning this forum business. No clue if its X, or udev.
Cheers, gene83
Probably the one you wish to look at is the most generic one :
/usr/src/linux-headers-4.4.70-rockchip-ayufan-89/include/linux/gpio.h
At kind of library you wish to use ?
If you are doing only simple things, you can also use the /sys/class/gpio filesystem, even from a bash script ...
10-06-2017, 07:26 PM
(This post was last modified: 10-06-2017, 07:30 PM by gene83.)
We wrote, Bertho stultans and the mouse in his pocket, a driver for the pi's that runs an spi port at 25 to 32 MHz for the pi's, which in turn drives a mesa 7i90 interface card for machine control, using me as the testing lab rat. This driver runs flawlessly on the pi. But the pi is being pushed a bit what with all the stuff I wrote to replace the hand cranks on a nearly 70 yo Sheldon 11x36 metal lathe that I made all the pieces except the ball screws to convert it to fully cnc control. When you remove the cranks to put a honking big stepper motor on it to turn the screws, the cranks usually wind up in a parts drawer, as do all the drive gears that used to couple the spindle to the screws. I made an A/B/Z encoder so the pi knows, 240 times a revolution, where the spindle is and what direction its turning. So all the gears are replaced by math that can move the cutting tool to micron accuracy, in perfect step with the spindle.
The pi does all that flawlessly, but has one big honking problem, it throws away input events from its own local keyboard and mouse, wired or wireless. So you have to reboot it quite a few times until the keyboard works, and it might work for 30 seconds, or 3 weeks.
The gpio in the rock64 is claimed to be pi compatible. Unfortunately in getting this driver right, Bertho made sure it was running on a pi, and exits with an unsupported platform message when it doesn't find the SoC it was written for, which is a bcm27xx to bcm28xx bit of silicon.
This driver would be helped by gpio pin drivers in the silicon that had faster slew rates. With the pi's puny pin drivers its limited to just over 50% of the speed the rest of the hardware can run at, 50 megabaud, to only 30ish megabaud writes and 25ish reads.
So I am trying to convert this driver to run on the rockchip SoC. But the forum won't let me post code yet. If it can be pulled off, we truly have a pi killer for the simple reason that it runs LinuxCNC right out of the buildbot.linuxcnc.org x86 repo, bleeding edge development version. And that can't help but bump sales for the rock64.
Thank you & Cheers, gene83