Port-arm archive

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

Re: Orange pi one questions



On Saturday 30 September 2017 09:50:09 Jared McNeill wrote:
> On Sat, 30 Sep 2017, Jared McNeill wrote:
> > The r_pio controller in the dt refers to a clock node that we don't
> > have a driver for. Clocks are probably not turned on for the GPIO
> > controller as a result. We'll need to add support for the
> > allwinner,sun8i-h3-r-ccu device.
> I've committed support for this. Can you update your kernel and try
> the LEDs again?

Hi Jared,

I cvs'uped to the latest current:

$NetBSD: sunxi_ccu.c,v 1.7 2017/09/30 12:48:58 jmcneill Exp $
$NetBSD: sunxi_ccu_fixed_factor.c,v 1.1 2017/09/30 12:48:58 jmcneill 
Exp$
$NetBSD: sun8i_h3_r_ccu.c,v 1.1 2017/09/30 12:48:58 jmcneill Exp $

I cross compiled a new kernel with your changes and booted it:

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 
2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 
2017
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 8.99.3 (SUNXI) #0: Sat Sep 30 23:59:30 BST 2017
        dtyson%cruncher.anduin.org.uk@localhost:/home/dtyson/cross/obj/sys/arch/evbarm/compile/SUNXI
total memory = 480 MB
avail memory = 467 MB
sysctl_createv: sysctl_create(machine_arch) returned 17
armfdt0 (root)
fdt0 at armfdt0: Xunlong Orange Pi One
fdt1 at fdt0
fdt2 at fdt0
fdt3 at fdt0
cpus0 at fdt0
cpu0 at cpus0: Cortex-A7 r0p5 (Cortex V7A core)
cpu0: DC enabled IC enabled WB disabled EABT branch prediction enabled
cpu0: 32KB/32B 2-way L1 VIPT Instruction cache                                                                                                                                        
cpu0: 32KB/64B 4-way write-back-locking-C L1 PIPT Data cache                                                                                                                          
cpu0: 512KB/64B 8-way write-through L2 PIPT Unified cache                                                                                                                             
vfp0 at cpu0: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
cpu1 at cpus0
cpu2 at cpus0
cpu3 at cpus0
gic0 at fdt1: GIC
armgic0 at gic0: Generic Interrupt Controller, 160 sources (150 valid)
armgic0: 16 Priorities, 128 SPIs, 7 PPIs, 15 SGIs
fclock0 at fdt2: 24000000 Hz fixed clock
fclock1 at fdt2: 32768 Hz fixed clock
fclock2 at fdt2: 16000000 Hz fixed clock
gtmr0 at fdt0: Generic Timer
armgtmr0 at gtmr0: ARMv7 Generic 64-bit Timer (24000 kHz)
armgtmr0: interrupting on irq 27
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
sun8ih3ccu0 at fdt1: H3 CCU
fregulator0 at fdt0: vcc3v3
fregulator1 at fdt0: usb0-vbus
sun8ih3rccu0 at fdt1: H3 PRCM CCU
fregulator2 at fdt0: vcc3v0
fregulator3 at fdt0: vcc5v0
sunxiusbphy0 at fdt1: USB PHY
sun6idma0 at fdt1: DMA controller (12 channels)
sun6idma0: interrupting on GIC irq 82
h3codec0 at fdt1: H3 Audio Codec (analog part)
sunxiemac0 at fdt1: EMAC
sunxiemac0: interrupting on GIC irq 114
ukphy0 at sunxiemac0 phy 1: OUI 0x0088a0, model 0x0000, rev. 0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
psci0 at fdt0: PSCI 0.1
gpioleds0 at fdt0: orangepi:green:pwr orangepi:red:status
gpiokeys0 at fdt0: sw4
sunximmc0 at fdt1: SD/MMC controller
sunximmc0: interrupting on GIC irq 92
motg0 at fdt1: 'otg' mode not supported
ehci0 at fdt1: EHCI
ehci0: interrupting on GIC irq 104
ehci0: 1 companion controller, 1 port
usb0 at ehci0: USB revision 2.0
ohci0 at fdt1: OHCI
ohci0: interrupting on GIC irq 105
ohci0: OHCI version 1.0
usb1 at ohci0: USB revision 1.0
ehci1 at fdt1: EHCI
ehci1: interrupting on GIC irq 106
ehci1: 1 companion controller, 1 port
usb2 at ehci1: USB revision 2.0
ohci1 at fdt1: OHCI
ohci1: interrupting on GIC irq 107
ohci1: OHCI version 1.0
usb3 at ohci1: USB revision 1.0
sunxitimer0 at fdt1: Timer
sunxiwdt0 at fdt1: Watchdog
sunxiwdt0: default watchdog period is 16 seconds
com0 at fdt1: ns16550a, working fifo
com0: console
com0: interrupting on GIC irq 32
sunxirtc0 at fdt1: RTC
genfb0 at fdt3: Simple Framebuffer (1920x1080 32-bpp @ 0x5e000000)
wsdisplay0 at genfb0 kbdmux 1
cpu3: Cortex-A7 r0p5 (Cortex V7A core)
cpu3: DC enabled IC enabled WB disabled EABT branch prediction enabled
cpu3: 32KB/32B 2-way L1 VIPT Instruction cache
cpu3: 32KB/64B 4-way write-back-locking-C L1 PIPT Data cache
cpu3: 512KB/64B 8-way write-through L2 PIPT Unified cache
vfp3 at cpu3: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
cpu2: Cortex-A7 r0p5 (Cortex V7A core)
cpu2: DC enabled IC enabled WB disabled EABT branch prediction enabled
cpu2: 32KB/32B 2-way L1 VIPT Instruction cache
cpu2: 32KB/64B 4-way write-back-locking-C L1 PIPT Data cache
cpu2: 512KB/64B 8-way write-through L2 PIPT Unified cache
vfp2 at cpu2: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
cpu1: Cortex-A7 r0p5 (Cortex V7A core)
cpu1: DC enabled IC enabled WB disabled EABT branch prediction enabled
cpu1: 32KB/32B 2-way L1 VIPT Instruction cache
cpu1: 32KB/64B 4-way write-back-locking-C L1 PIPT Data cache
cpu1: 512KB/64B 8-way write-through L2 PIPT Unified cache
vfp1 at cpu1: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
sdmmc0 at sunximmc0
uhub0 at usb0: Generic (0000) EHCI root hub (0000), class 9/0, rev 
2.00/1.00, addr 1
uhub1 at usb3: Generic (0000) OHCI root hub (0000), class 9/0, rev 
1.00/1.00, addr 1
uhub2 at usb2: Generic (0000) EHCI root hub (0000), class 9/0, rev 
2.00/1.00, addr 1
uhub3 at usb1: Generic (0000) OHCI root hub (0000), class 9/0, rev 
1.00/1.00, addr 1
sdmmc0: SD card status: 4-bit, C10, A1
ld0 at sdmmc0: <0x03:0x5344:SC16G:0x80:0x23749dc3:0x117>
ld0: 15193 MB, 7717 cyl, 64 head, 63 sec, 512 bytes/sect x 31116288 
sectors
ld0: 4-bit width, High-Speed/SDR25, 50.000 MHz
WARNING: 2 errors while detecting hardware; check system log.
boot device: ld0
root on ld0a dumps on ld0b
root file system type: ffs
kern.module.path=/stand/evbarm/8.99.3/modules
WARNING: clock lost 6482 days
WARNING: using filesystem time
WARNING: CHECK AND RESET THE DATE!
Sat Sep 30 23:08:30 UTC 2017
Starting root file system check:
/dev/rld0a: file system is clean; not checking
Not resizing /: already correct size
swapctl: adding /dev/ld0b as swap device at priority 0
Starting file system checks:
/dev/rld0e: 69 files, 22548 free (5637 clusters)
Loaded entropy from /var/db/entropy-file.
Setting tty flags.
Setting sysctl variables:
ddb.onpanic: 1 -> 0
Starting network.
Hostname: armv7
IPv6 mode: host
Configuring network interfaces:.
Adding interface aliases:.
Waiting for DAD to complete for statically configured addresses...
Starting dhcpcd.
Starting mdnsd.
Building databases: dev, utmp, utmpx.
wsconscfg: screen 1 is already configured
wsconscfg: screen 2 is already configured
wsconscfg: screen 3 is already configured
Starting syslogd.
Mounting all file systems...
Clearing temporary files.
Updating fontconfig cache: done.
Creating a.out runtime link editor directory cache.
Checking quotas: done.
Setting securelevel: kern.securelevel: 0 -> 1
Starting virecover.
Checking for core dump...
savecore: no core dump
Starting devpubd.
Starting local daemons:.
Updating motd.
Starting ntpd.
Sep 30 23:08:38 armv7 ntpd[579]: ntp_rlimit: Cannot set RLIMIT_STACK: 
Invalid argument
Starting sshd.
Starting inetd.
Starting cron.
Sat Sep 30 23:08:42 UTC 2017

NetBSD/evbarm (armv7) (console)

However the situation with the green led remains the same:

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

I'll have a poke about myself later today. Thanks for your work and the 
tips about the console and gpio.

Cheers,
Dave

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



Home | Main Index | Thread Index | Old Index