Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: sunxi_rtc
On Tue, Sep 03, ioh wrote:
> Judging by this post here: https://blog.netbsd.org/tnf/entry/pinebook
> Compared to the recent pinebook status updates:
> https://mail-index.netbsd.org/port-arm/2019/08/24/msg006080.html
> with dmesg:
> https://github.com/ebijun/NetBSD/blob/master/dmesg/aarch64/pinebook
>
> It seems that the rtc used to be detected correctly and now is not.
> I saw this commit message in openbsd:
> Adapt to allwinner device tree changes in linux >= 5.0-rc1
> "allwinner,sun6i-a31-rtc" has been removed from h3/h5/r40/a64
>
> With this change:
> https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/dev/fdt/sxirtc.c.diff?r1=1.2&r2=1.3
>
> (see here for full log of sxirtc.c in openbsd:
> https://cvsweb.openbsd.org/src/sys/dev/fdt/sxirtc.c)
>
> Can we get these changes ported across to netbsd?
>
> Here is my attempt (not including the later clock support changes):
> Index: sunxi_rtc.c
> ===================================================================
> RCS file: /cvsroot/src/sys/arch/arm/sunxi/sunxi_rtc.c,v
> retrieving revision 1.4
> diff -r1.4 sunxi_rtc.c
> 131a132,133
> > { "allwinner,sun8i-h3-rtc", (uintptr_t)&sun6i_rtc_config },
> > { "allwinner,sun50i-h5-rtc", (uintptr_t)&sun6i_rtc_config },
This patch allows sunxirtc to correctly pick up the rtc in the
Olimex Teres laptop.
dmesg below:
[ 1.000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
[ 1.000000] 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
[ 1.000000] 2018, 2019 The NetBSD Foundation, Inc. All rights reserved.
[ 1.000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[ 1.000000] The Regents of the University of California. All rights reserved.
[ 1.000000] NetBSD 9.0_BETA (MYKERNEL) #0: Tue Sep 3 00:49:18 UTC 2019
[ 1.000000] ioh@hedges:/usr/src/sys/arch/evbarm/compile/MYKERNEL
[ 1.000000] total memory = 2030 MB
[ 1.000000] avail memory = 1957 MB
[ 1.000000] timecounter: Timecounters tick every 10.000 msec
[ 1.000000] armfdt0 (root)
[ 1.000000] simplebus0 at armfdt0: Olimex A64 Teres-I
[ 1.000000] simplebus1 at simplebus0
[ 1.000000] cpus0 at simplebus0
[ 1.000000] simplebus2 at simplebus0
[ 1.000000] cpu0 at cpus0: Cortex-A53 r0p4 (Cortex V8-A core)
[ 1.000000] cpu0: package 0, core 0, smt 0
[ 1.000000] cpu0: IC enabled, DC enabled, EL0/EL1 stack Alignment check enabled
[ 1.000000] cpu0: Cache Writeback Granule 16B, Exclusives Reservation Granule 16B
[ 1.000000] cpu0: Dcache line 64, Icache line 64
[ 1.000000] cpu0: L1 32KB/64B 2-way read-allocate VIPT Instruction cache
[ 1.000000] cpu0: L1 32KB/64B 4-way write-back read-allocate write-allocate PIPT Data cache
[ 1.000000] cpu0: L2 512KB/64B 16-way write-back read-allocate write-allocate PIPT Unified cache
[ 1.000000] cpu0: revID=0x80, PMCv3, 4k table, 64k table, 16bit ASID
[ 1.000000] cpu0: auxID=0x11120, FP, CRC32, SHA1, SHA256, AES+PMULL, NEON, rounding, NaN propagation, denormals, 32x64bitRegs, Fused Multiply-Add
[ 1.000000] cpufreqdt0 at cpu0
[ 1.000000] cpu1 at cpus0: Cortex-A53 r0p4 (Cortex V8-A core)
[ 1.000000] cpu1: package 0, core 1, smt 0
[ 1.000000] cpu2 at cpus0: Cortex-A53 r0p4 (Cortex V8-A core)
[ 1.000000] cpu2: package 0, core 2, smt 0
[ 1.000000] cpu3 at cpus0: Cortex-A53 r0p4 (Cortex V8-A core)
[ 1.000000] cpu3: package 0, core 3, smt 0
[ 1.000000] gic0 at simplebus1: GIC
[ 1.000000] armgic0 at gic0: Generic Interrupt Controller, 224 sources (215 valid)
[ 1.000000] armgic0: 16 Priorities, 192 SPIs, 7 PPIs, 16 SGIs
[ 1.000000] sunxisramc0 at simplebus1: SRAM Controller
[ 1.000000] sunxisramc0: area: SRAM C
[ 1.000000] fclock0 at simplebus0: 24000000 Hz fixed clock (osc24M)
[ 1.000000] fclock1 at simplebus0: 32768 Hz fixed clock (ext-osc32k)
[ 1.000000] gtmr0 at simplebus0: Generic Timer
[ 1.000000] gtmr0: interrupting on GIC irq 27
[ 1.000000] armgtmr0 at gtmr0: Generic Timer (24000 kHz, virtual)
[ 1.000000] timecounter: Timecounter "armgtmr0" frequency 24000000 Hz quality 500
[ 1.000009] sun50ia64ccu0 at simplebus1: A64 CCU
[ 1.000009] sun50ia64rccu0 at simplebus1: A64 PRCM CCU
[ 1.000009] sunxinmi0 at simplebus1: R_INTC
[ 1.000009] sunxigpio0 at simplebus1: PIO
[ 1.000009] gpio0 at sunxigpio0: 103 pins
[ 1.000009] sunxigpio0: interrupting on GIC irq 43
[ 1.000009] sunxigpio1 at simplebus1: PIO
[ 1.000009] gpio1 at sunxigpio1: 13 pins
[ 1.000009] sunxigpio1: interrupting on GIC irq 77
[ 1.000009] sunxide2bus0 at simplebus1: DE2 Bus
[ 1.000009] sunxirsb0 at simplebus1: RSB
[ 1.000009] sunxirsb0: interrupting on GIC irq 71
[ 1.000009] iic0 at sunxirsb0: I2C bus
[ 1.000009] axppmic0 at iic0 addr 0x3a3: AXP803
[ 1.000009] axpreg0 at axppmic0: vcc-hdmi
[ 1.000009] axpreg1 at axppmic0: vcc-pd
[ 1.000009] axpreg2 at axppmic0: vdd-edp
[ 1.000009] axpreg3 at axppmic0: vcc-wifi-io
[ 1.000009] axpreg4 at axppmic0: cpvdd
[ 1.000009] axpreg5 at axppmic0: vcc-dvdd-csi
[ 1.000009] axpreg6 at axppmic0: eldo3
[ 1.000009] axpreg7 at axppmic0: vcc-1v2-hsic
[ 1.000009] axpreg8 at axppmic0: vdd-cpus
[ 1.000009] axpreg9 at axppmic0: vcc-3v3
[ 1.000009] axpreg10 at axppmic0: vdd-cpux
[ 1.000009] axpreg11 at axppmic0: dcdc3
[ 1.000009] axpreg12 at axppmic0: dcdc4
[ 1.000009] axpreg13 at axppmic0: vcc-ddr3
[ 1.000009] axpreg14 at axppmic0: vdd-sys
[ 1.000009] axpreg15 at axppmic0: vcc-pe
[ 1.000009] axpreg16 at axppmic0: vcc-pl
[ 1.000009] axpreg17 at axppmic0: vcc-pll-avcc
[ 1.000009] fregulator0 at simplebus0: usb1-vbus
[ 1.000009] sun6idma0 at simplebus1: DMA controller (8 channels)
[ 1.000009] sun6idma0: interrupting on GIC irq 82
[ 1.000009] sunxisid0 at simplebus1: Security ID EFUSE
[ 1.000009] com0 at simplebus1: ns16550a, working fifo
[ 1.000009] com0: console
[ 1.000009] com0: interrupting on GIC irq 32
[ 1.000009] sunxide2ccu0 at sunxide2bus0: DE2 CCU
[ 1.000009] sunxidrm0 at simplebus0: Display Engine Pipeline
[ 1.000009] sunxiusbphy0 at simplebus1: USB PHY
[ 1.000009] sunxihdmiphy0 at simplebus1: HDMI PHY
[ 1.000009] sunximixer0 at sunxide2bus0: Display Engine Mixer
[ 1.000009] sunximixer1 at sunxide2bus0: Display Engine Mixer
[ 1.000009] sunxilcdc0 at simplebus1: TCON0
[ 1.000009] sunxilcdc0 port 0 endpoint 0 connected to sunximixer0 port 1 endpoint 0
[ 1.000009] sunxilcdc0: interrupting on GIC irq 118
[ 1.000009] sunxilcdc1 at simplebus1: TCON1
[ 1.000009] sunxilcdc1 port 0 endpoint 0 connected to sunximixer1 port 1 endpoint 0
[ 1.000009] sunxilcdc1: interrupting on GIC irq 119
[ 1.000009] sunxitwi0 at simplebus1: Marvell TWSI controller
[ 1.000009] sunxitwi0: interrupting on GIC irq 38
[ 1.000009] iic1 at sunxitwi0: I2C bus
[ 1.000009] anxedp0 at iic1 addr 0x38: eDP TX
[ 1.000009] anxedp0 port 0 endpoint 0 connected to sunxilcdc0 port 1 endpoint 0
[ 1.000009] mmcpwrseq0 at simplebus0: Simple MMC power sequence provider
[ 1.000009] sunxirtc0 at simplebus1: RTC
[ 1.000009] sunximmc0 at simplebus1: SD/MMC controller
[ 1.000009] sunximmc0: interrupting on GIC irq 92
[ 1.000009] sunximmc1 at simplebus1: SD/MMC controller
[ 1.000009] sunximmc1: interrupting on GIC irq 93
[ 1.000009] sunximmc2 at simplebus1: SD/MMC controller
[ 1.000009] sunximmc2: interrupting on GIC irq 94
[ 1.000009] ehci0 at simplebus1: EHCI
[ 1.000009] ehci0: interrupting on GIC irq 106
[ 1.000009] ehci0: EHCI version 1.0
[ 1.000009] ehci0: 1 companion controller, 1 port
[ 1.000009] usb0 at ehci0: USB revision 2.0
[ 1.000009] ohci0 at simplebus1: OHCI
[ 1.000009] ohci0: interrupting on GIC irq 107
[ 1.000009] ohci0: OHCI version 1.0
[ 1.000009] usb1 at ohci0: USB revision 1.0
[ 1.000009] /soc/gpu@1c40000 at simplebus1 not configured
[ 1.000009] sunxiwdt0 at simplebus1: Watchdog
[ 1.000009] sunxiwdt0: default watchdog period is 16 seconds
[ 1.000009] sunxithermal0 at simplebus1: Thermal sensor controller
[ 1.000009] sunxithermal0: interrupting on GIC irq 63
[ 1.000009] sunxithermal0: cpu: alarm 85C hyst 58C shut 106C
[ 1.000009] sunxithermal0: gpu1: alarm 85C hyst 58C shut 106C
[ 1.000009] sunxithermal0: gpu2: alarm 85C hyst 58C shut 106C
[ 1.000009] armpmu0 at simplebus0: Performance Monitor Unit
[ 1.000009] psci0 at simplebus0: PSCI 1.1
[ 1.000009] gpiokeys0 at simplebus0: Lid Switch
[ 1.000009] gpioleds0 at simplebus0: teres-i:green:capslock teres-i:green:numlock
[ 1.000009] /soc/video-codec@1c0e000 at simplebus1 not configured
[ 1.000009] sunximixer0: activating port 1 endpoint 0 (direct)
[ 1.000009] sunxilcdc0: activating port 0 endpoint 0
[ 1.000009] anxedp0: activating port 0 endpoint 0
[ 1.000009] sunximixer1: activating port 1 endpoint 0 (direct)
[ 1.000009] sunxilcdc1: activating port 0 endpoint 0
[ 1.000009] sunxidrm0: autoconfiguration error: failed to activate endpoint: 19
[ 1.000009] sunxifb0 at sunxidrm0
[ 1.000009] sunxifb0: framebuffer at 0xffffffc043200000, size 1366x768, depth 32, stride 5464
[ 1.000009] sunxilcdc0: no CH0 PLL configured
[ 1.000009] wsdisplay0 at sunxifb0 kbdmux 1: console (default, vt100 emulation)
[ 1.000009] wsmux1: connecting to wsdisplay0
[ 1.000009] wsdisplay0: screen 1-3 added (default, vt100 emulation)
[ 1.000009] kern info: [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.000009] kern info: [drm] No driver support for vblank timestamp query.
[ 1.000009] sunxidrm0: initialized sunxi 1.0.0 20190123 on minor 0
[ 1.000009] timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
[ 1.000009] cpu1: IC enabled, DC enabled, EL0/EL1 stack Alignment check enabled
[ 1.000009] cpu1: Cache Writeback Granule 16B, Exclusives Reservation Granule 16B
[ 1.003148] cpu1: Dcache line 64, Icache line 64
[ 1.013135] cpu1: L1 32KB/64B 2-way read-allocate VIPT Instruction cache
[ 1.023136] cpu1: L1 32KB/64B 4-way write-back read-allocate write-allocate PIPT Data cache
[ 1.033136] cpu1: L2 512KB/64B 16-way write-back read-allocate write-allocate PIPT Unified cache
[ 1.043136] cpu1: revID=0x80, PMCv3, 4k table, 64k table, 16bit ASID
[ 1.053136] cpu1: auxID=0x11120, FP, CRC32, SHA1, SHA256, AES+PMULL, NEON, rounding, NaN propagation, denormals, 32x64bitRegs, Fused Multiply-Add
[ 1.063137] cpu3: IC enabled, DC enabled, EL0/EL1 stack Alignment check enabled
[ 1.073137] cpu3: Cache Writeback Granule 16B, Exclusives Reservation Granule 16B
[ 1.083137] cpu3: Dcache line 64, Icache line 64
[ 1.093137] cpu3: L1 32KB/64B 2-way read-allocate VIPT Instruction cache
[ 1.103137] cpu3: L1 32KB/64B 4-way write-back read-allocate write-allocate PIPT Data cache
[ 1.113137] cpu3: L2 512KB/64B 16-way write-back read-allocate write-allocate PIPT Unified cache
[ 1.123138] cpu3: revID=0x80, PMCv3, 4k table, 64k table, 16bit ASID
[ 1.133139] cpu3: auxID=0x11120, FP, CRC32, SHA1, SHA256, AES+PMULL, NEON, rounding, NaN propagation, denormals, 32x64bitRegs, Fused Multiply-Add
[ 1.153138] cpu2: IC enabled, DC enabled, EL0/EL1 stack Alignment check enabled
[ 1.163139] cpu2: Cache Writeback Granule 16B, Exclusives Reservation Granule 16B
[ 1.173139] cpu2: Dcache line 64, Icache line 64
[ 1.173139] cpu2: L1 32KB/64B 2-way read-allocate VIPT Instruction cache
[ 1.183140] cpu2: L1 32KB/64B 4-way write-back read-allocate write-allocate PIPT Data cache
[ 1.193139] cpu2: L2 512KB/64B 16-way write-back read-allocate write-allocate PIPT Unified cache
[ 1.203140] cpu2: revID=0x80, PMCv3, 4k table, 64k table, 16bit ASID
[ 1.213140] cpu2: auxID=0x11120, FP, CRC32, SHA1, SHA256, AES+PMULL, NEON, rounding, NaN propagation, denormals, 32x64bitRegs, Fused Multiply-Add
[ 1.248573] cpufreqdt0: 1152.000 MHz, 1300000 uV
[ 1.248573] cpufreqdt0: 1104.000 MHz, 1260000 uV
[ 1.248573] cpufreqdt0: 1008.000 MHz, 1200000 uV
[ 1.248573] cpufreqdt0: 816.000 MHz, 1080000 uV
[ 1.248573] cpufreqdt0: 648.000 MHz, 1040000 uV
[ 1.248573] cpufreqdt0: 408.000 MHz, 1000000 uV
[ 1.248573] sdmmc0 at sunximmc0
[ 1.258598] sdmmc1 at sunximmc1
[ 1.258598] sdmmc2 at sunximmc2
[ 1.378575] uhub0 at usb0: NetBSD (0000) EHCI root hub (0000), class 9/0, rev 2.00/1.00, addr 1
[ 1.388575] uhub0: 1 port with 1 removable, self powered
[ 1.488577] uhub1 at usb1: NetBSD (0000) OHCI root hub (0000), class 9/0, rev 1.00/1.00, addr 1
[ 1.488577] uhub1: 1 port with 1 removable, self powered
[ 1.515449] sdmmc2: autoconfiguration error: switch error
[ 1.515449] ld2 at sdmmc2: <0x13:0x014e:R1J56L:0x00:0x71a44760:0x000>
[ 1.537109] (manufacturer 0x24c, product 0xb723, standard function interface code 0x7) at sdmmc1 function 1 not configured
[ 1.639614] Lid Switch: lid opened.
[ 1.639614] armpmu0: interrupting on GIC irq 184
[ 1.649616] armpmu0: interrupting on GIC irq 185
[ 1.659615] armpmu0: interrupting on GIC irq 186
[ 1.659615] armpmu0: interrupting on GIC irq 187
[ 1.669615] ld2: 14080 MB, 7151 cyl, 64 head, 63 sec, 512 bytes/sect x 28835840 sectors
[ 1.679617] ld2: 8-bit width, 1024 KB cache, 52.000 MHz
[ 1.709616] IPsec: Initialized Security Association Processing.
[ 3.709656] uhub2 at uhub0 port 1: vendor 05e3 (0x5e3) USB2.0 Hub (0x608), class 9/0, rev 2.00/85.36, addr 2
[ 3.719935] uhub2: single transaction translator
[ 3.731480] uhub2: 4 ports with 4 removable, self powered
[ 5.039961] urtwn0 at uhub2 port 1
[ 5.039961] urtwn0: Realtek (0xbda) 802.11n NIC (0x8179), rev 2.00/0.00, addr 3
[ 5.159964] urtwn0: MAC/BB RTL8188EU, RF 6052 1T1R, address 84:16:f9:1d:70:5c
[ 5.169965] urtwn0: 1 rx pipe, 2 tx pipes
[ 5.169965] urtwn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
[ 5.179966] urtwn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
[ 6.149985] uvideo0 at uhub2 port 3 configuration 1 interface 0: Generic (0x1908) USB2.0 PC CAMERA (0x2311), rev 2.00/1.00, addr 4
[ 6.169986] video0 at uvideo0: Generic (0x1908) USB2.0 PC CAMERA (0x2311), rev 2.00/1.00, addr 4
[ 7.150006] uhidev0 at uhub2 port 4 configuration 1 interface 0
[ 7.160006] uhidev0: Olimex Ltd. (0x15ba) TERES Keyboard+Touchpad (0x3c), rev 1.10/0.01, addr 5, iclass 3/1
[ 7.170007] ukbd0 at uhidev0: 8 Variable keys, 6 Array codes
[ 7.590015] wskbd0 at ukbd0: console keyboard, using wsdisplay0
[ 7.590015] uhidev1 at uhub2 port 4 configuration 1 interface 1
[ 7.600015] uhidev1: Olimex Ltd. (0x15ba) TERES Keyboard+Touchpad (0x3c), rev 1.10/0.01, addr 5, iclass 3/1
[ 7.610016] ums0 at uhidev1: 3 buttons and Z dir
[ 7.620016] wsmouse0 at ums0 mux 0
[ 7.630018] WARNING: 2 errors while detecting hardware; check system log.
[ 7.640016] boot device: ld2
[ 7.640016] root on ld2a dumps on ld2b
[ 7.650017] root file system type: ffs
[ 7.660017] kern.module.path=/stand/evbarm/9.0/modules
[ 7.660017] WARNING: clock lost 3651 days
[ 7.670018] WARNING: using filesystem time
[ 7.677092] WARNING: CHECK AND RESET THE DATE!
[ 11.670167] wsdisplay0: screen 4 added (default, vt100 emulation)
[ 31.640602] axppmic0: normal capacity on 'charge state'
--
ioh
Home |
Main Index |
Thread Index |
Old Index