Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Orange pi one questions



I've been playing with an orange pi one and with the hint about the dtc 
Jared posted previously I have ethernet working fine. This is with 
current from a few days ago and u-boot built from pkgsrc.

I have a few questions:

1. on-board leds. I can turn the red led on/off with sysctl, but the
   green led seems unresponsive and it appears the command has no
  effect:

   armv7# sysctl -w hw.led.orangepi_green_pwr=1
   hw.led.orangepi_green_pwr: 0 -> 1
   armv7# sysctl -w hw.led.orangepi_red_status=1
   hw.led.orangepi_red_status: 0 -> 1
   armv7# sysctl hw.led                          
   hw.led.orangepi_green_pwr = 0
   hw.led.orangepi_red_status = 1

   Since the green led is connected to a different gpio register I
   wonder if this has not had the mode programmed. I seem to remember
   seeing a post about adding a bit of code to u-boot to set the
   register into the correct mode.

2. dmesg notes that there are a big collection of pins on the gpio's: 

   sunxigpio0 at fdt1: PIO
   sunxigpio0: unknown pin name 'PB9'
   gpio0 at sunxigpio0: 94 pins
   sunxigpio0: interrupting on GIC irq 43
   sunxigpio1 at fdt1: PIO
   sunxigpio0: unknown pin name 'PB9'
   gpio1 at sunxigpio1: 12 pins
   sunxigpio1: interrupting on GIC irq 77

   but gpioctl reports zero pins:

   armv7# gpioctl gpio0 
   /dev/gpio0: 0 pins
   armv7# gpioctl gpio1
   /dev/gpio1: 0 pins

   Is this because the code is incomplete?

Coming from a i386/amd64 perpective where the OS can do device 
discovery, I understand the difficulty with SOC chips and the need to 
have a dtb to provide hints. What I don't understand is how the split 
between initialisation by the u-boot code and initialisation by the OS 
is handled.

Most of the gpio pins are in disabled mode when the chip initialises and 
it is down to something to write the appropriate bits into the registers 
so that they can be programmed as inputs or outputs etc. Clearly u-boot 
fiddles with some stuff so the red led works OK. I assume that if 
everything is supported then you just need to use gpioctl to set the pin 
modes and everything will work and you will be able to override anything 
set by the bootloader.

I currently connect via a serial port (or network). I have a vga monitor 
attached via a HDMi dongle, but nothing appears on the screen. I have 
tried a few mods to the u-boot config to no avail - has anyone got video 
working?

Cheers,
Dave

-- 
============================================
Phone: 07805784357
Open Source O/S: www.netbsd.org
Caving: http://www.wirralcavinggroup.org.uk
============================================



Home | Main Index | Thread Index | Old Index