Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Dec 2006 02:50:32 +0100
From:      Bernd Walter <ticso@cicely12.cicely.de>
To:        freebsd-arm@freebsd.org
Cc:        Bernd Walter <ticso@cicely12.cicely.de>, imp@freebsd.org
Subject:   questions about current RM9200 state
Message-ID:  <20061208015032.GF54209@cicely12.cicely.de>

next in thread | raw e-mail | index | archive | help
This is with P4 Source and an SD card inserted:
>e 0x20000000
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2006 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.0-CURRENT #0: Thu Dec  7 23:49:05 CET 2006
    ticso@cicely7.cicely.de:/usr/obj/arm/arm-p4/src/sys/BWCT
CPU: ARM920T rev 0 (ARM9TDMI core)
  DC enabled IC enabled WB enabled LABT
  16KB/32B 64-way Instruction cache
  16KB/32B 64-way write-back-locking-A Data cache
real memory  = 67108864 (64 MB)
avail memory = 62459904 (59 MB)
CONFIG: invalid hint 'hint.ohci.at=apb'
CONFIG: invalid hint 'hint.ohci.maddr=0x00300000'
atmelarm0: <AT91 device bus> on motherboard
at91_st0: <ST> mem 0xdffffd00:0x100 irq 1 on atmelarm0
at91_st0: watchdog registered, timeout intervall max. 64 sec
at91_pio0: <PIOA> mem 0xdffff400:0x200 irq 1 on atmelarm0
at91_pio0: ABSR: 0x60 OSR: 0 PSR:0x3f380010 ODSR: 0
at91_pio1: <PIOB> mem 0xdffff600:0x200 irq 1 on atmelarm0
at91_pio1: ABSR: 0xff300 OSR: 0 PSR:0x3fc00cff ODSR: 0
at91_pio2: <PIOC> mem 0xdffff800:0x200 irq 1 on atmelarm0
at91_pio2: ABSR: 0 OSR: 0x400 PSR:0xc47f ODSR: 0
at91_pio3: <PIOD> mem 0xdffffa00:0x200 irq 1 on atmelarm0
at91_pio3: ABSR: 0 OSR: 0 PSR:0xfffffff ODSR: 0
at91_pmc0: <PMC> mem 0xdffffc00:0x100 irq 1 on atmelarm0
at91_pmc0: Primary: 10000000 Hz PLLA: 112 MHz CPU: 112 MHz MCK: 37 MHz
at91_rtc0: <RTC> mem 0xdffffe00:0x100 irq 1 on atmelarm0
at91_mci0: <MCI mmc/sd host bridge> mem 0xdffb4000:0x4000 irq 10 on atmelarm0
mmc0: <mmc/sd bus> on at91_mci0
at91_twi0: <TWI> mem 0xdffb8000:0x4000 irq 12 on atmelarm0
iicbus0: <Philips I2C bus> on at91_twi0
iicbus0: <unknown card> at addr 0
iic0: <I2C generic I/O> on iicbus0
ds16720: <Dallas Semiconductor DS1672 RTC> at addr 0xd0 on iicbus0
ate0: <EMAC> mem 0xdffbc000:0x4000 irq 24 on atmelarm0
miibus0: <MII bus> on ate0
ukphy0: <Generic IEEE 802.3u media interface> on miibus0
ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ate0: Ethernet address: 00:0e:42:02:00:21
uart0: <DBGU> mem 0xdffff200:0x200 irq 1 on atmelarm0
uart0: console (115200,n,8,1)
uart1: <USART0> mem 0xdffc0000:0x4000 irq 6 on atmelarm0
uart2: <USART1> mem 0xdffc4000:0x4000 irq 7 on atmelarm0
uart3: <USART2> mem 0xdffc8000:0x4000 irq 8 on atmelarm0
uart4: <USART3> mem 0xdffcc000:0x4000 irq 9 on atmelarm0
at91_ssc0: <SSC> mem 0xdffd0000:0x4000 irq 14 on atmelarm0
at91_ssc1: <SSC> mem 0xdffd4000:0x4000 irq 15 on atmelarm0
at91_ssc2: <SSC> mem 0xdffd8000:0x4000 irq 16 on atmelarm0
at91_spi0: <SPI> mem 0xdffe0000:0x4000 irq 13 on atmelarm0
spibus0: <spibus bus> on at91_spi0
Cannot get 100 Hz clock; using 128Hz
Timecounter "AT91RM9200 timer" frequency 32768 Hz quality 1000
Timecounters tick every 7.812 msec
at91_mci0: Setting controller bus width to 1
at91_mci0: Setting controller bus width to 1
at91_mci0: Setting controller bus width to 1
at91_mci0: Setting controller bus width to 1
mmc0: setting transfer rate to 30.000MHz
at91_mci0: Setting controller bus width to 1
Sending DHCP Discover packet from interface ate0 (00:0e:42:02:00:21)
[...]

No SD card found it seems.

An MMC card with my old kernel and qdmmc driver stil probes:
at91_qdmmc0: <MMC> mem 0xdffb4000-0xdffb7fff irq 10 on atmelarm0
at91_qdmmc0: [MPSAFE]
at91_qdmmc_attach: operating conditions: 0xff8000
Found MMC 0 - CID = 0x2c0000414620484d5010a5701244915
MMC 0: Vendor-ID = 0x2c
MMC 0: OEM-ID = 0x0
MMC 0: Productname = AF HMP
MMC 0: Revision = 0x10
MMC 0: Serial = 0xa5700124
MMC 0: Manufacturing Date = 2006/4
Set MMC 0 address to 0xcafe
MMC 0: CSD = 0x905e002a1f5983deedb707ff96400017
MMC 0: Blocksize = 512 Bytes
MMC 0: c_size = 3963
MMC 0: c_size_mult = 256
MMC 0: Size = 519569408 Bytes

The slot should be correctly 4 bit wired, but according to the boot
messages it is used 1bit anyway.
Can't speak about boot code probing, since I still have old netboot
loader installed.


About TWI - hinted devices are listed, but I havn't tested if they
really work yet.
But I can't probe the bus from userland:
[56]arm9# ./iic_probe /dev/iic0 
- and nothing listed.
Well - this might be a hardware issue, since I did not use iic on
that board yet.
The Source did at least worked on x86 boards bevor.
#include <sys/types.h>
#include <sys/ioctl.h>

#include <dev/iicbus/iic.h>

#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main(int argc, char *argv[]);
void usage(void);

int
main(int argc, char *argv[]) {
        int i, error;
        struct iiccmd cmd;

        if (argc != 2)
                usage();
        int bus = open(argv[1], O_RDWR | O_EXCL);
        if (bus < 0) {
                printf("opening I2C bus device %s failed\n", argv[1]);
                exit(1);
        }
        for (i = 1 ; i <= 127; i++) {
                cmd.slave = (i << 1);
                cmd.count = 0;
                cmd.last = 0;
                cmd.buf = NULL;
                error = ioctl(bus, I2CSTART, &cmd);
                if (!error) {
                        printf("device %i exists\n", i);
                        ioctl(bus, I2CSTOP, NULL);
                }
        }
        close(bus);
        return (0);
}

void
usage(void) {

        printf("usage: iic_probe dev\n");
        exit(1);
}


May I want to get rid of at91_rtc0, since we have DS1672 driver support?
How can I find out which clock is active?
Shouldn't it keep the time with at91_rtc0 over a simple reboot as well?
At least the time did not survive a reboot.

-- 
B.Walter                http://www.bwct.de      http://www.fizon.de
bernd@bwct.de           info@bwct.de            support@fizon.de



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061208015032.GF54209>