Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 29,309
» Latest member: moviesboxpro
» Forum threads: 16,144
» Forum posts: 116,677

Full Statistics

Latest Threads
Pinecil v2 tip screw temp...
Forum: General Discussion on Pinecil
Last Post: Minuen
9 hours ago
» Replies: 0
» Views: 16
Third-party cheap touchsc...
Forum: PinePhone Hardware
Last Post: mikeb
06-21-2025, 05:19 PM
» Replies: 2
» Views: 807
eMMC failed
Forum: Pinebook Pro Hardware and Accessories
Last Post: Der Geist der Maschine
06-21-2025, 04:34 PM
» Replies: 17
» Views: 12,093
(real) Mainline U-boot fi...
Forum: General Discussion on ROCKPRO64
Last Post: aleksei
06-21-2025, 06:21 AM
» Replies: 0
» Views: 76
Thoughts after a year wit...
Forum: General Discussion on Pinebook Pro
Last Post: ksosn
06-20-2025, 03:00 AM
» Replies: 0
» Views: 109
Pinebook Pro in EU for Sa...
Forum: General Discussion on Pinebook Pro
Last Post: shelfaberrant
06-19-2025, 02:14 AM
» Replies: 4
» Views: 2,539
Axolotl on PinePhone / Mo...
Forum: Mobian on PinePhone
Last Post: zetabeta
06-19-2025, 01:52 AM
» Replies: 222
» Views: 238,025
touchscreeh doesn't accep...
Forum: PinePhone Pro Hardware
Last Post: teekay
06-19-2025, 01:13 AM
» Replies: 5
» Views: 480
Wake-up call
Forum: General Discussion on PinePhone
Last Post: KC9UDX
06-18-2025, 08:38 PM
» Replies: 9
» Views: 735
bookworm vs trixie discus...
Forum: Mobian on PinePhone
Last Post: anonymous
06-17-2025, 06:27 AM
» Replies: 64
» Views: 21,334

 
  using spi and gpio
Posted by: nano2 - 07-09-2024, 07:16 PM - Forum: RockPro64 Hardware and Accessories - No Replies

I have had difficulty using the spi bus and/or spidev on the pine rockpro 64. It is now working and this information may help others.

I am using a MAx31865 RTD temperature sensor module which connects by SPI. I have used this on my orange pi PC (allwinner H3 - 32 bit) as a spidev device which works well. But migrating to the rockpro 64 was a big problem.

On the Rockpro 64 I used the Armbian_24.2.1_Rockpro64_jammy_current_6.6.16_xfce system. This only has Spidev1.x, but it is easy to change from using spidev0.x. However I was unable to get the spidev driver working. Oscilloscope observation showed that the CS pin (header pin) h24 is not toggled at all by the spidev driver. This can be overcome by embedding GPIO write commands around the spidev access to toggle the CS line. I could then transmit and recieve data but the data was corrupt. After many attempts I concluded that the spidev driver is faulty, but i did not want to mess with the device tree. I tried a more recent Armbian bookworm system, but it also failed. I checked other systems including free-bsd, twister, manjaro, ubunto-noble and bionic but none of them have a spidev driver. I installed the bitbang driver using armbian-config, but it does not provide a device in /dev and is not useful. (I presume you need to add a param... line in /boot/Armbianenv.txt but have seen no documentation of the required param) Eventually i resorted to writing my own bitbang subroutine. This was able to correctly access the RTD temperature device. I have given up on using spidev on the rockpro 64.

I had major issues with GPIO access from my C++ code. Wiring-pi does not work on rockpro and i found armbianio. This allows gpio control, but does not have pin-mapping for the rockpro64, however I was able to add the required pin tables easily. But note that several pages describing the pin numbering have typographical errors, in particular pin h19 is actually pad 40 (wrongly shown as pad 48 in several souces). This overcomes the "doesn't work" comments on some sources. This pin is important as it is usually MOSI of the spi bus. Although armbianio has SPI routines, these do not work - because of the suspected problem in spidev.

I cannot attatch a file  - so here is the t change information for the rockpro 64 pin mappings in armbianio.  You need to add this in armbianio.c and re-make. This must be added as the first pin table as the existing pin table indexing is corrupt. You also need to add the *iPinLists and *szBoardNames items.

// Pine RockPro 64  now added as #1 to avoid original indexing mess
  static int iRockPro64Pins[] = {-1, -1, -1, 52, -1, 53, -1, 152, 148, -1, 147,
                                    54, 120, 50, -1, 33, 36, -1, 149, 40, -1,
                                    39, 153, 41, 42, -1, 45, 43, 44, 155, -1,
                                    156, 124, 125, -1, 122, 126, 121, 123, -1, 127};
=====  fix these indexing lines also
static int *iPinLists[] = {iRockPro64Pins,  ipotatoPins, iBPIZPins, iRPIPins, iOPIZPPins, iOPIZP2ins, iOPIZPins, iOPI1Pins, iOPI1Pins,
                          iNPDPins, iNP2Pins, iNPK2Pins, iNPNPins, iNPNPins, iNPNPins, iNPM4Pins, iNPM4Pins,
                          iTinkerPins, iRadxaZeroPins, iMangoPiPins};      //total 20
static const char *szBoardNames[] = {"RockPro 64\n", "Le potato\n","Banana Pi M2 Zero\n","Raspberry Pi\n","Orange Pi Zero Plus\n",
                                    "Orange Pi Zero Plus 2\n","Orange Pi Zero\n","Orange Pi Lite\n","Orange Pi One\n",
                                    "NanoPi Duo\n", "NanoPi 2\n", "Nanopi K2\n", "NanoPi Neo\n", "NanoPi Air\n",
                                    "NanoPi Neo 2\n", "NanoPi M4\n", "NanoPi M4V2\n", "Tinkerboard\n", "Radxa Zero\n",
                                    "Mango Pi Mcore\n", NULL};  //total 20
static int iBoardType;
static int iPinCount[] = {40,40,40,40,29,29,29,43,43,32,40,40,40,40,40,40,41,41,40,41}; // number of pins in the header  rockpro64-40  total 20
// GPIO number of on-board IR receiver
static int iIR_GPIO[] = {0, 7, 0, 0, 363, 363, 363, 363, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};  //kgb  zero for pine at start, total now  21  !

===== my comment regarding tables in armbianio.c
//  this is a mess with only 17 pin-tables, but a key-list (below) of 20 boards!  Only the first few seem correct. RockPro 64 is correct if put as first


  boot/init sequenze into rescue mode
Posted by: TomZa - 07-09-2024, 09:35 AM - Forum: PineTab Software - No Replies

Hi all,

Problem: I messed up my getty@tty1.service file Undecided
                Now pinetab2 not opening a terminal.

Question: Is there a key combo to get into boot recovery mode (like with grub).
                 So I can mount a partition and edit the file.


Self-Bashing:  Yes, I did it while in a meeting and "quickly" changing sth. And of course I turned off sshd.
                        I have the UART but would love to avoid the serial console setup, or sd-card boot.


THX,
and I will promisse not to edit init stuff again while doing sth. else


  [Article] RISC-V Emulator for Pine64 Oz64 SBC
Posted by: lupyuen - 07-06-2024, 06:50 PM - Forum: General - Replies (2)

Earlier this year we made a RISC-V Emulator for Ox64 BL808 SBC. Every day we run it for testing the Daily Build of Apache NuttX RTOS for Ox64, thanks to our customised TinyEMU RISC-V Emulator. (Not the small flightless bird)

Now that NuttX supports Sophgo SG2000 SoC: Let’s create a similar emulator for Pine64 Oz64 SBC…

(1) We take TinyEMU Emulator for Ox64 BL808 SBC
(2) Update the RISC-V Memory Map to match Sophgo SG2000 SoC
(3) Fix the `auipc` Overflow in TinyEMU Boot Code
(4) We emulate the 16550 UART Controller
(5) By intercepting Reads and Writes to the UART I/O Registers
(6) But TinyEMU supports only 32 Interrupts, we bump up to 64
(7) Eventually we’ll emulate SG2000 Peripherals like GPIO
(8) Right now it’s good enough for Daily Automated Testing of NuttX for SG2000

Check out the article: RISC-V Emulator for Sophgo SG2000 SoC (Pine64 Oz64)

Lup

   


  I2C connections
Posted by: Beehee - 07-04-2024, 11:31 PM - Forum: PinePhone Pro Hardware - Replies (2)

I apologize if this has already been answered, but I am looking for information on the I2C ports on the PinePhone Pro. 

I am aware that the pogo pins on the back provide access to one of the busses. Is there a second I2C bus that can be accessed,  I looked at pictures of the main board and didn’t see anything obvious.


Heart The Pinephone keyboard offers alternative layouts
Posted by: Peter Gamma - 07-04-2024, 05:40 AM - Forum: PinePhone Accessories - No Replies

- The Pinephone Keyboard offers easily relocated keycaps.
- It has alternative layouts such as AZERTY or QWERTZ (Default).
- and a programmable open firmware by Megi

https://xnux.eu/log/044.html

https://pine64eu.com/product/pinephone-p...oard-case/

– so bring it back!


  Bring the Pinephone keyboard back, it is worth it!
Posted by: Peter Gamma - 07-03-2024, 11:37 PM - Forum: PinePhone Accessories - Replies (1)

Currently my Pinephone is in a box in Zurich where it save from thieves. But I don’t know if it is worth for thieves to steal it. I did not use my Pinephone for a single day, although i dealed with it for many years.

And know I found that the Pinephone is almost daily driver ready for writers after many years. Look at the wonderful possibilities the Pinephone has for writers:

https://petergamma.org/selected-office-a...-zero-2-w/

There are other devices availble for office mobile, but what is special about the Pinephone is it’s hard wired keyboard. This makes it to a robust device.

The Pinephone keyboard has issues, but one can work with. And the issues are known. And eventually someone makes an updated version.

There are 121 pages in the Pine64 forum about the Pinephone since 10-17-2019, 05:48 PM. This makes the Pinephone from a bad device to a good device.

There are other devices out there which are better for the one or the other application. But we need to build these device first. And who wants to do that now that the Pinephone has become a good device for writers, and there is no need to build a new device?

If you care for a special Pinephone distro and you  are a skilled coder, please put Word 97 in your app store if this is possible. Jackfish has put the instruction here:

https://forum.pine64.org/showthread.php?tid=18489

I will not use Word 97 on my Pinephone. It easier for me personally to use it only with Abiword and change to another device which offers LibreOffice without issues. But Word 97 in an app store of the Pinephone would be a reason to come back to the Pinephone.

With the Pinephone keyboard and Word 97 the Pinephone is a good daily driver for writers, and also worth stealing for the thieves in Zurich. Since even if you have a lot of money it is difficult to find a better device for writers which makes the Pinephone worth stealing.


  (xorg) Video driver?
Posted by: falken - 07-02-2024, 05:22 PM - Forum: Linux on Pinebook Pro - Replies (2)

I recently installed Manjaro (minimal) to the nvme on my Pinebook and it works great. I would like to setup xorg but I'm not sure which video driver the Pinebook needs? I read it uses Mali GPU, which means nothing to me.


Edi: Well the framebuffer one works apparently. I'm actually really surprised that I have to use the framebuffer driver.


  July 1 upgrade of Mobian Bookworm boot loops.
Posted by: mburns - 07-02-2024, 10:41 AM - Forum: PinePhone Pro Software - Replies (9)

It must be the kernel update then. I can continue to boot from the Trixie installation on the main chip. And then use my rescuemobian script to continue trying the upgrades on the Bookworm installation. Edit this to your installation, and then continue to try upgrades from this temporary environment.

Code:
#! /bin/bash
cd /home/d1/root
mount /dev/mmcblk1p1 /home/d1/boot
mount --bind /proc /home/d1/proc
mount --bind /sys /home/d1/sys
mount --bind /dev /home/d1/dev
mount --bind /run /home/d1/run
chroot /home/d1


  PInetab2, Limit battery charge to less than 100%?
Posted by: rqkeating - 06-30-2024, 08:54 PM - Forum: General Discussion on PineTab - No Replies

Is there a way to limit the battery charge on the Pinetab2 to something less than 100% for long term battery health?  I am running Kernel 6.9.5-danctnix1-1-pinetab2


  3 days in, slow/stuck or no boot.
Posted by: lgmpbp2 - 06-30-2024, 10:04 AM - Forum: General Discussion on Pinebook Pro - Replies (34)

Very glad to receive Pinebook Pro last Thursday June 27th.
Quite cautious with it- no new OS installs as am new to Pine products and fairly new to Linux.Sunday, June 30, Pinebook pro boots to Manjaro images. After a few hard reboots, Manjaro image, again. Press escape.
Received the message below. Hard re boot again to black screen and no Manjaro image. Unsure how to proceed. Please advise? Apologies if this was discussed previously



Attached Files Thumbnail(s)