Add nextthing boards
add chip, chippro and pocketchip
This commit is contained in:
parent
1372ebb073
commit
e5f3a21383
44 changed files with 12876 additions and 0 deletions
6278
board/nextthing/chip/linux.config
Normal file
6278
board/nextthing/chip/linux.config
Normal file
File diff suppressed because it is too large
Load diff
21
board/nextthing/chip/overlay/etc/init.d/S10modules
Normal file
21
board/nextthing/chip/overlay/etc/init.d/S10modules
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
MODPROBE=/sbin/modprobe
|
||||
|
||||
echo -n "Probing modules: "
|
||||
if [ ! -x "${MODPROBE}" -o ! -f "/etc/modules" ]; then
|
||||
echo "missing"
|
||||
exit 1
|
||||
else
|
||||
echo
|
||||
fi
|
||||
|
||||
grep '^[^#]' "/etc/modules" | \
|
||||
while read module args; do
|
||||
[ "$module" ] || continue
|
||||
if ${MODPROBE} $module $args; then
|
||||
echo " $module loaded"
|
||||
else
|
||||
echo " $module failed"
|
||||
fi
|
||||
done
|
||||
3
board/nextthing/chip/overlay/etc/init.d/S20alsa
Normal file
3
board/nextthing/chip/overlay/etc/init.d/S20alsa
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
alsactl restore
|
||||
37
board/nextthing/chip/overlay/etc/inittab
Normal file
37
board/nextthing/chip/overlay/etc/inittab
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# /etc/inittab
|
||||
#
|
||||
# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Note: BusyBox init doesn't support runlevels. The runlevels field is
|
||||
# completely ignored by BusyBox init. If you want runlevels, use
|
||||
# sysvinit.
|
||||
#
|
||||
# Format for each entry: <id>:<runlevels>:<action>:<process>
|
||||
#
|
||||
# id == tty to run on, or empty for /dev/console
|
||||
# runlevels == ignored
|
||||
# action == one of sysinit, respawn, askfirst, wait, and once
|
||||
# process == program to run
|
||||
|
||||
# Startup the system
|
||||
null::sysinit:/bin/mount -t proc proc /proc
|
||||
null::sysinit:/bin/mount -o remount,rw /
|
||||
null::sysinit:/bin/mkdir -p /dev/pts
|
||||
null::sysinit:/bin/mkdir -p /dev/shm
|
||||
null::sysinit:/bin/mount -a
|
||||
null::sysinit:/bin/hostname -F /etc/hostname
|
||||
# now run any rc scripts
|
||||
::sysinit:/etc/init.d/rcS
|
||||
|
||||
# Put a getty on the serial port
|
||||
ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL
|
||||
ttyGS0::respawn:/sbin/getty -L ttyGS0 115200 vt100 # gadget serial
|
||||
tty0::respawn:/sbin/getty -L tty0 115200 vt100 # framebuffer console
|
||||
|
||||
# Stuff to do for the 3-finger salute
|
||||
::ctrlaltdel:/sbin/reboot
|
||||
|
||||
# Stuff to do before rebooting
|
||||
::shutdown:/etc/init.d/rcK
|
||||
::shutdown:/sbin/swapoff -a
|
||||
::shutdown:/bin/umount -a -r
|
||||
2
board/nextthing/chip/overlay/etc/modules
Normal file
2
board/nextthing/chip/overlay/etc/modules
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
g_serial
|
||||
sun4i_codec
|
||||
58
board/nextthing/chip/overlay/etc/securetty
Normal file
58
board/nextthing/chip/overlay/etc/securetty
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
tty0
|
||||
tty1
|
||||
tty2
|
||||
tty3
|
||||
tty4
|
||||
tty5
|
||||
tty6
|
||||
tty7
|
||||
tty8
|
||||
ttyS0
|
||||
ttyS1
|
||||
ttyS2
|
||||
ttyS3
|
||||
ttyAMA0
|
||||
ttyAMA1
|
||||
ttyAMA2
|
||||
ttyAMA3
|
||||
ttySAC0
|
||||
ttySAC1
|
||||
ttySAC2
|
||||
ttySAC3
|
||||
ttyUL0
|
||||
ttyUL1
|
||||
ttyUL2
|
||||
ttyUL3
|
||||
ttyPS0
|
||||
ttyPS1
|
||||
ttyPSC0
|
||||
ttyPSC1
|
||||
ttyPSC2
|
||||
ttyPSC3
|
||||
ttyCPM0
|
||||
ttyCPM1
|
||||
ttyCPM2
|
||||
ttyCPM3
|
||||
ttymxc0
|
||||
ttymxc1
|
||||
ttymxc2
|
||||
ttyO0
|
||||
ttyO1
|
||||
ttyO2
|
||||
ttyO3
|
||||
ttyAM0
|
||||
ttyAM1
|
||||
ttyAM2
|
||||
ttySC0
|
||||
ttySC1
|
||||
ttySC2
|
||||
ttySC3
|
||||
ttySC4
|
||||
ttySC5
|
||||
ttySC6
|
||||
ttySC7
|
||||
ttyGS0
|
||||
hvc0
|
||||
hvc1
|
||||
hvc2
|
||||
hvc3
|
||||
|
|
@ -0,0 +1 @@
|
|||
%sudo ALL=(ALL) ALL
|
||||
76
board/nextthing/chip/overlay/var/lib/alsa/asound.state
Normal file
76
board/nextthing/chip/overlay/var/lib/alsa/asound.state
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
state.sun4icodec {
|
||||
control.1 {
|
||||
iface MIXER
|
||||
name 'Power Amplifier Volume'
|
||||
value 56
|
||||
comment {
|
||||
access 'read write'
|
||||
type INTEGER
|
||||
count 1
|
||||
range '0 - 63'
|
||||
dbmin -9999999
|
||||
dbmax 0
|
||||
dbvalue.0 -700
|
||||
}
|
||||
}
|
||||
control.2 {
|
||||
iface MIXER
|
||||
name 'Left Mixer Left DAC Playback Switch'
|
||||
value false
|
||||
comment {
|
||||
access 'read write'
|
||||
type BOOLEAN
|
||||
count 1
|
||||
}
|
||||
}
|
||||
control.3 {
|
||||
iface MIXER
|
||||
name 'Right Mixer Right DAC Playback Switch'
|
||||
value false
|
||||
comment {
|
||||
access 'read write'
|
||||
type BOOLEAN
|
||||
count 1
|
||||
}
|
||||
}
|
||||
control.4 {
|
||||
iface MIXER
|
||||
name 'Right Mixer Left DAC Playback Switch'
|
||||
value false
|
||||
comment {
|
||||
access 'read write'
|
||||
type BOOLEAN
|
||||
count 1
|
||||
}
|
||||
}
|
||||
control.5 {
|
||||
iface MIXER
|
||||
name 'Power Amplifier DAC Playback Switch'
|
||||
value true
|
||||
comment {
|
||||
access 'read write'
|
||||
type BOOLEAN
|
||||
count 1
|
||||
}
|
||||
}
|
||||
control.6 {
|
||||
iface MIXER
|
||||
name 'Power Amplifier Mixer Playback Switch'
|
||||
value false
|
||||
comment {
|
||||
access 'read write'
|
||||
type BOOLEAN
|
||||
count 1
|
||||
}
|
||||
}
|
||||
control.7 {
|
||||
iface MIXER
|
||||
name 'Power Amplifier Mute Switch'
|
||||
value true
|
||||
comment {
|
||||
access 'read write'
|
||||
type BOOLEAN
|
||||
count 1
|
||||
}
|
||||
}
|
||||
}
|
||||
22
board/nextthing/chip/post-build.sh
Normal file
22
board/nextthing/chip/post-build.sh
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
TARGET_DIR=$1
|
||||
|
||||
BRANCH=$(git symbolic-ref -q HEAD)
|
||||
BRANCH=${BRANCH##refs/heads/chip/}
|
||||
BRANCH=${BRANCH##refs/heads/nextthing/*/}
|
||||
|
||||
BUILDROOT_GITHASH="$(cat buildroot_githash)"
|
||||
BUILDROOT_GITHASH="${BUILDROOT_GITHASH:0:8}"
|
||||
|
||||
BUILD="$(cat build)"
|
||||
|
||||
cat <<EOF >${TARGET_DIR}/etc/issue
|
||||
Welcome to CHIP Buildroot-${BRANCH} build ${BUILD} rev ${BUILDROOT_GITHASH}
|
||||
|
||||
CHIP Buildroot contains various open source software.
|
||||
|
||||
The source code can be downloaded from:
|
||||
http://opensource.nextthing.co/chip/buildroot/${BRANCH}/${BUILD}/build${BUILD}.tar.gz
|
||||
|
||||
EOF
|
||||
487
board/nextthing/chip/sun5i-r8-chip.dts
Normal file
487
board/nextthing/chip/sun5i-r8-chip.dts
Normal file
|
|
@ -0,0 +1,487 @@
|
|||
/*
|
||||
* Copyright 2015 Maxime Ripard
|
||||
*
|
||||
* Maxime Ripard <maxime.ripard@free-electrons.com>
|
||||
*
|
||||
* This file is dual-licensed: you can use it either under the terms
|
||||
* of the GPL or the X11 license, at your option. Note that this dual
|
||||
* licensing only applies to this file, and not this project as a
|
||||
* whole.
|
||||
*
|
||||
* a) This file is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* Or, alternatively,
|
||||
*
|
||||
* b) Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "sun5i-a13.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
/ {
|
||||
model = "NextThing C.H.I.P.";
|
||||
compatible = "nextthing,chip", "allwinner,sun5i-r8";
|
||||
|
||||
aliases {
|
||||
i2c0 = &i2c0;
|
||||
i2c1 = &i2c1;
|
||||
i2c2 = &i2c2;
|
||||
serial0 = &uart1;
|
||||
serial1 = &uart3;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
|
||||
framebuffer@0 {
|
||||
compatible = "allwinner,simple-framebuffer","simple-framebuffer";
|
||||
allwinner,pipeline = "de_be0-lcd0-hdmi";
|
||||
clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,<&ahb_gates 44>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
framebuffer@1 {
|
||||
compatible = "allwinner,simple-framebuffer","simple-framebuffer";
|
||||
allwinner,pipeline = "de_be0-lcd0";
|
||||
clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
framebuffer@2 {
|
||||
compatible = "allwinner,simple-framebuffer", "simple-framebuffer";
|
||||
allwinner,pipeline = "de_be0-lcd0-tve0";
|
||||
clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>, <&ahb_gates 44>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
dram_vcc: dram_vcc {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "dram-vcc";
|
||||
regulator-min-microvolt = <1600000>;
|
||||
regulator-max-microvolt = <1600000>;
|
||||
vin-supply = <&ipsout>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ipsout: ipsout {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "ipsout";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
usb0_vbus: usb0_vbus {
|
||||
compatible = "regulator-fixed";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&chip_vbus_pin>;
|
||||
|
||||
regulator-name = "vbus-usb0";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc_5v0>;
|
||||
gpio = <&pio 1 10 GPIO_ACTIVE_HIGH>; /* PB10 */
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
vcc_3v3: vcc3v3 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc-3v3";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
vin-supply = <&ipsout>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vcc_5v0: vcc5v0 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc-5v0";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&ipsout>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
/*
|
||||
* This is actually an active-low reset line for the WLAN
|
||||
* part of the WiFi/BT CHIP.
|
||||
*
|
||||
* Just like for LDO3 and LDO4, we cannot tie it to the DT
|
||||
* node of the SDIO device for now, as there is no bindings
|
||||
* for it, so we need to have this hack.
|
||||
*/
|
||||
wifi_reg_on: wifi_reg_on {
|
||||
compatible = "regulator-fixed";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&chip_wifi_reg_on_pin>;
|
||||
|
||||
regulator-name = "wifi-reg-on";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
gpio = <&pio 2 19 GPIO_ACTIVE_HIGH>; /* PC19 */
|
||||
enable-active-high;
|
||||
};
|
||||
};
|
||||
|
||||
&codec {
|
||||
routing =
|
||||
"Headphone Jack", "HP Left",
|
||||
"Headphone Jack", "HP Right";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0_pins_a>;
|
||||
status = "okay";
|
||||
|
||||
axp209: pmic@34 {
|
||||
compatible = "x-powers,axp209";
|
||||
reg = <0x34>;
|
||||
|
||||
/*
|
||||
* The interrupt is routed through the "External Fast
|
||||
* Interrupt Request" pin (ball G13 of the module)
|
||||
* directly to the main interrupt controller, without
|
||||
* any other controller interfering.
|
||||
*/
|
||||
interrupts = <0>;
|
||||
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
|
||||
regulators {
|
||||
vdd_cpu: dcdc2 {
|
||||
regulator-min-microvolt = <1000000>;
|
||||
regulator-max-microvolt = <1300000>;
|
||||
regulator-name = "cpuvdd";
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd_core: dcdc3 {
|
||||
regulator-min-microvolt = <1000000>;
|
||||
regulator-max-microvolt = <1300000>;
|
||||
regulator-name = "corevdd";
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd_rtc: ldo1 {
|
||||
regulator-min-microvolt = <1300000>;
|
||||
regulator-max-microvolt = <1300000>;
|
||||
regulator-name = "rtcvdd";
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
avcc: ldo2 {
|
||||
regulator-min-microvolt = <2700000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "avcc";
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
/*
|
||||
* Both LDO3 and LDO4 are used in parallel to
|
||||
* power up the WiFi/BT Chip.
|
||||
*
|
||||
* If those are not enabled, the SDIO part
|
||||
* will not enumerate, and since there's no
|
||||
* way currently to pass DT infos to an SDIO
|
||||
* device, we cannot really do better than
|
||||
* this ugly hack for now.
|
||||
*/
|
||||
vcc_wifi_1: ldo3 {
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-wifi-1";
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vcc_wifi_2: ldo4 {
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-wifi-2";
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vcc_1v8: ldo5 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vcc-1v8";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* i2c1 is routed to the external pins and doesn't have any device
|
||||
* attached to it on the C.H.I.P itself.
|
||||
*/
|
||||
&i2c1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c2_pins_a>;
|
||||
status = "okay";
|
||||
|
||||
xio: gpio@38 {
|
||||
compatible = "nxp,pcf8574a";
|
||||
reg = <0x38>;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <6 0 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
&mmc0_pins_a {
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>;
|
||||
vmmc-supply = <&vcc_3v3>;
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&nfc {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&nand_pins_a &nand_cs0_pins_a &nand_rb0_pins_a>;
|
||||
status = "okay";
|
||||
|
||||
nand@0 {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
reg = <0>;
|
||||
allwinner,rb = <0>;
|
||||
nand-ecc-mode = "hw";
|
||||
nand-rnd-mode = "hw";
|
||||
nand-ecc-step-size = <1024>;
|
||||
nand-ecc-strength = <56>;
|
||||
nand-on-flash-bbt;
|
||||
nand-randomizer-seeds = /bits/ 16 <
|
||||
0x2b75 0x0bd0 0x5ca3 0x62d1 0x1c93 0x07e9 0x2162 0x3a72
|
||||
0x0d67 0x67f9 0x1be7 0x077d 0x032f 0x0dac 0x2716 0x2436
|
||||
0x7922 0x1510 0x3860 0x5287 0x480f 0x4252 0x1789 0x5a2d
|
||||
0x2a49 0x5e10 0x437f 0x4b4e 0x2f45 0x216e 0x5cb7 0x7130
|
||||
0x2a3f 0x60e4 0x4dc9 0x0ef0 0x0f52 0x1bb9 0x6211 0x7a56
|
||||
0x226d 0x4ea7 0x6f36 0x3692 0x38bf 0x0c62 0x05eb 0x4c55
|
||||
0x60f4 0x728c 0x3b6f 0x2037 0x7f69 0x0936 0x651a 0x4ceb
|
||||
0x6218 0x79f3 0x383f 0x18d9 0x4f05 0x5c82 0x2912 0x6f17
|
||||
0x6856 0x5938 0x1007 0x61ab 0x3e7f 0x57c2 0x542f 0x4f62
|
||||
0x7454 0x2eac 0x7739 0x42d4 0x2f90 0x435a 0x2e52 0x2064
|
||||
0x637c 0x66ad 0x2c90 0x0bad 0x759c 0x0029 0x0986 0x7126
|
||||
0x1ca7 0x1605 0x386a 0x27f5 0x1380 0x6d75 0x24c3 0x0f8e
|
||||
0x2b7a 0x1418 0x1fd1 0x7dc1 0x2d8e 0x43af 0x2267 0x7da3
|
||||
0x4e3d 0x1338 0x50db 0x454d 0x764d 0x40a3 0x42e6 0x262b
|
||||
0x2d2e 0x1aea 0x2e17 0x173d 0x3a6e 0x71bf 0x25f9 0x0a5d
|
||||
0x7c57 0x0fbe 0x46ce 0x4939 0x6b17 0x37bb 0x3e91 0x76db>;
|
||||
|
||||
spl@0 {
|
||||
label = "SPL";
|
||||
reg = /bits/ 64 <0x0 0x400000>;
|
||||
nand-ecc-mode = "hw_syndrome";
|
||||
nand-rnd-mode = "hw";
|
||||
nand-ecc-step-size = <1024>;
|
||||
nand-ecc-strength = <40>;
|
||||
nand-randomizer-seeds = /bits/ 16 <0x4a80>;
|
||||
};
|
||||
|
||||
spl-backup@400000 {
|
||||
label = "SPL.backup";
|
||||
reg = /bits/ 64 <0x400000 0x400000>;
|
||||
nand-ecc-mode = "hw_syndrome";
|
||||
nand-rnd-mode = "hw";
|
||||
nand-ecc-step-size = <1024>;
|
||||
nand-ecc-strength = <40>;
|
||||
nand-randomizer-seeds = /bits/ 16 <0x4a80>;
|
||||
};
|
||||
|
||||
u-boot@800000 {
|
||||
label = "U-Boot";
|
||||
reg = /bits/ 64 <0x800000 0x400000>;
|
||||
nand-ecc-mode = "hw";
|
||||
nand-rnd-mode = "hw";
|
||||
nand-ecc-step-size = <1024>;
|
||||
nand-ecc-strength = <56>;
|
||||
nand-randomizer-seeds = /bits/ 16 <
|
||||
0x2b75 0x0bd0 0x5ca3 0x62d1 0x1c93 0x07e9 0x2162 0x3a72
|
||||
0x0d67 0x67f9 0x1be7 0x077d 0x032f 0x0dac 0x2716 0x2436
|
||||
0x7922 0x1510 0x3860 0x5287 0x480f 0x4252 0x1789 0x5a2d
|
||||
0x2a49 0x5e10 0x437f 0x4b4e 0x2f45 0x216e 0x5cb7 0x7130
|
||||
0x2a3f 0x60e4 0x4dc9 0x0ef0 0x0f52 0x1bb9 0x6211 0x7a56
|
||||
0x226d 0x4ea7 0x6f36 0x3692 0x38bf 0x0c62 0x05eb 0x4c55
|
||||
0x60f4 0x728c 0x3b6f 0x2037 0x7f69 0x0936 0x651a 0x4ceb
|
||||
0x6218 0x79f3 0x383f 0x18d9 0x4f05 0x5c82 0x2912 0x6f17
|
||||
0x6856 0x5938 0x1007 0x61ab 0x3e7f 0x57c2 0x542f 0x4f62
|
||||
0x7454 0x2eac 0x7739 0x42d4 0x2f90 0x435a 0x2e52 0x2064
|
||||
0x637c 0x66ad 0x2c90 0x0bad 0x759c 0x0029 0x0986 0x7126
|
||||
0x1ca7 0x1605 0x386a 0x27f5 0x1380 0x6d75 0x24c3 0x0f8e
|
||||
0x2b7a 0x1418 0x1fd1 0x7dc1 0x2d8e 0x43af 0x2267 0x7da3
|
||||
0x4e3d 0x1338 0x50db 0x454d 0x764d 0x40a3 0x42e6 0x262b
|
||||
0x2d2e 0x1aea 0x2e17 0x173d 0x3a6e 0x71bf 0x25f9 0x0a5d
|
||||
0x7c57 0x0fbe 0x46ce 0x4939 0x6b17 0x37bb 0x3e91 0x76db>;
|
||||
};
|
||||
|
||||
env@c00000 {
|
||||
label = "env";
|
||||
reg = /bits/ 64 <0xc00000 0x400000>;
|
||||
nand-ecc-mode = "hw";
|
||||
nand-rnd-mode = "hw";
|
||||
nand-ecc-step-size = <1024>;
|
||||
nand-ecc-strength = <56>;
|
||||
nand-randomizer-seeds = /bits/ 16 <
|
||||
0x2b75 0x0bd0 0x5ca3 0x62d1 0x1c93 0x07e9 0x2162 0x3a72
|
||||
0x0d67 0x67f9 0x1be7 0x077d 0x032f 0x0dac 0x2716 0x2436
|
||||
0x7922 0x1510 0x3860 0x5287 0x480f 0x4252 0x1789 0x5a2d
|
||||
0x2a49 0x5e10 0x437f 0x4b4e 0x2f45 0x216e 0x5cb7 0x7130
|
||||
0x2a3f 0x60e4 0x4dc9 0x0ef0 0x0f52 0x1bb9 0x6211 0x7a56
|
||||
0x226d 0x4ea7 0x6f36 0x3692 0x38bf 0x0c62 0x05eb 0x4c55
|
||||
0x60f4 0x728c 0x3b6f 0x2037 0x7f69 0x0936 0x651a 0x4ceb
|
||||
0x6218 0x79f3 0x383f 0x18d9 0x4f05 0x5c82 0x2912 0x6f17
|
||||
0x6856 0x5938 0x1007 0x61ab 0x3e7f 0x57c2 0x542f 0x4f62
|
||||
0x7454 0x2eac 0x7739 0x42d4 0x2f90 0x435a 0x2e52 0x2064
|
||||
0x637c 0x66ad 0x2c90 0x0bad 0x759c 0x0029 0x0986 0x7126
|
||||
0x1ca7 0x1605 0x386a 0x27f5 0x1380 0x6d75 0x24c3 0x0f8e
|
||||
0x2b7a 0x1418 0x1fd1 0x7dc1 0x2d8e 0x43af 0x2267 0x7da3
|
||||
0x4e3d 0x1338 0x50db 0x454d 0x764d 0x40a3 0x42e6 0x262b
|
||||
0x2d2e 0x1aea 0x2e17 0x173d 0x3a6e 0x71bf 0x25f9 0x0a5d
|
||||
0x7c57 0x0fbe 0x46ce 0x4939 0x6b17 0x37bb 0x3e91 0x76db>;
|
||||
};
|
||||
|
||||
rootfs@1000000 {
|
||||
label = "rootfs";
|
||||
reg = /bits/ 64 <0x1000000 0x1ff000000>;
|
||||
slc-mode;
|
||||
nand-ecc-mode = "hw";
|
||||
nand-rnd-mode = "hw";
|
||||
nand-ecc-step-size = <1024>;
|
||||
nand-ecc-strength = <56>;
|
||||
nand-randomizer-seeds = /bits/ 16 <
|
||||
0x2b75 0x0bd0 0x5ca3 0x62d1 0x1c93 0x07e9 0x2162 0x3a72
|
||||
0x0d67 0x67f9 0x1be7 0x077d 0x032f 0x0dac 0x2716 0x2436
|
||||
0x7922 0x1510 0x3860 0x5287 0x480f 0x4252 0x1789 0x5a2d
|
||||
0x2a49 0x5e10 0x437f 0x4b4e 0x2f45 0x216e 0x5cb7 0x7130
|
||||
0x2a3f 0x60e4 0x4dc9 0x0ef0 0x0f52 0x1bb9 0x6211 0x7a56
|
||||
0x226d 0x4ea7 0x6f36 0x3692 0x38bf 0x0c62 0x05eb 0x4c55
|
||||
0x60f4 0x728c 0x3b6f 0x2037 0x7f69 0x0936 0x651a 0x4ceb
|
||||
0x6218 0x79f3 0x383f 0x18d9 0x4f05 0x5c82 0x2912 0x6f17
|
||||
0x6856 0x5938 0x1007 0x61ab 0x3e7f 0x57c2 0x542f 0x4f62
|
||||
0x7454 0x2eac 0x7739 0x42d4 0x2f90 0x435a 0x2e52 0x2064
|
||||
0x637c 0x66ad 0x2c90 0x0bad 0x759c 0x0029 0x0986 0x7126
|
||||
0x1ca7 0x1605 0x386a 0x27f5 0x1380 0x6d75 0x24c3 0x0f8e
|
||||
0x2b7a 0x1418 0x1fd1 0x7dc1 0x2d8e 0x43af 0x2267 0x7da3
|
||||
0x4e3d 0x1338 0x50db 0x454d 0x764d 0x40a3 0x42e6 0x262b
|
||||
0x2d2e 0x1aea 0x2e17 0x173d 0x3a6e 0x71bf 0x25f9 0x0a5d
|
||||
0x7c57 0x0fbe 0x46ce 0x4939 0x6b17 0x37bb 0x3e91 0x76db>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ohci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&otg_sram {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pio {
|
||||
chip_vbus_pin: chip_vbus_pin@0 {
|
||||
allwinner,pins = "PB10";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
chip_wifi_reg_on_pin: chip_wifi_reg_on_pin@0 {
|
||||
allwinner,pins = "PC19";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
chip_id_det_pin: chip_id_det_pin@0 {
|
||||
allwinner,pins = "PG2";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart1_pins_b>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart3_pins_a>,
|
||||
<&uart3_pins_cts_rts_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_otg {
|
||||
dr_mode = "otg";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&chip_id_det_pin>;
|
||||
status = "okay";
|
||||
|
||||
usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
|
||||
|
||||
usb0_vbus-supply = <&usb0_vbus>;
|
||||
usb1_vbus-supply = <&vcc_5v0>;
|
||||
};
|
||||
|
||||
|
||||
27
board/nextthing/chip/uboot-env
Normal file
27
board/nextthing/chip/uboot-env
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# Standard I/O
|
||||
stdin=serial
|
||||
stdout=serial,vga
|
||||
stderr=serial,vga
|
||||
console=ttyS0,115200
|
||||
|
||||
# Load addresses
|
||||
bootm_size=0xf000000
|
||||
fdt_addr_r=0x43000000
|
||||
kernel_addr_r=0x42000000
|
||||
scriptaddr=0x43100000
|
||||
pxefile_addr_r=0x43200000
|
||||
ramdisk_addr_r=0x43300000
|
||||
|
||||
# DT Options
|
||||
fdtfile=sun5i-r8-chip.dtb
|
||||
|
||||
# NAND Options
|
||||
mtdids=nand0=sunxi-nand.0
|
||||
mtdparts=mtdparts=sunxi-nand.0:4m(spl),4m(spl-backup),4m(uboot),4m(env),-(UBI)
|
||||
|
||||
# Default boot options
|
||||
bootargs=root=ubi0:rootfs rootfstype=ubifs rw ubi.mtd=4 consoleblank=0
|
||||
bootcmd=nand slc-mode on; mtdparts; ubi part UBI; ubifsmount ubi0:rootfs; ubifsload $fdt_addr_r /boot/sun5i-r8-chip.dtb; ubifsload $kernel_addr_r /boot/zImage; bootz $kernel_addr_r - $fdt_addr_r
|
||||
|
||||
# Ethernet options
|
||||
usbnet_devaddr=de:ad:be:af:00:01
|
||||
25
board/nextthing/chip/upload.sh
Normal file
25
board/nextthing/chip/upload.sh
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
BRANCH=$(git symbolic-ref -q HEAD)
|
||||
BRANCH=${BRANCH##refs/heads/chip/}
|
||||
BRANCH=${BRANCH##refs/heads/nextthing/*/}
|
||||
|
||||
BUILD_NUMBER=$1
|
||||
S3_DEST=s3://opensource.nextthing.co/chip/buildroot/${BRANCH}
|
||||
# IMPORTANT: in order to have the md5sum as an etag one has to use --disable-multipart
|
||||
# also see: http://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonResponseHeaders.html
|
||||
S3_OPTIONS="--acl-public --no-guess-mime-type --disable-multipart"
|
||||
|
||||
if s3cmd put ${S3_OPTIONS} --recursive output/images ${S3_DEST}/${BUILD_NUMBER}/ |tee s3cmd_out.txt
|
||||
then
|
||||
echo "${BUILD_NUMBER}" >upload_buildno
|
||||
|
||||
s3cmd put ${S3_OPTIONS} upload_buildno ${S3_DEST}/${BUILD_NUMBER}/build
|
||||
|
||||
cat s3cmd_out.txt |grep Public |head -n1 |sed -e 's/.*\(http:\/\/.*\/[0-9]\+\)\/.*/\1/;' >latest
|
||||
s3cmd put ${S3_OPTIONS} latest ${S3_DEST}/latest
|
||||
|
||||
s3cmd put ${S3_OPTIONS} output/build/uboot*/spl/sunxi-spl-with-ecc.bin ${S3_DEST}/${BUILD_NUMBER}/images/sunxi-spl-with-ecc.bin
|
||||
#cat s3cmd_out.txt |grep Public |head -n1 |sed -e 's/.*http:/http:/; s/\(http:.*\/\).*\/.*/\1/' >os_latest
|
||||
#s3cmd put ${S3_OPTIONS} --add-header="x-amz-website-redirect-location:/chip/buildroot/${BRANCH}/${BUILD_NUMBER}/rootfs.ubi" os_latest s3://opensource.nextthing.co/chip/buildroot/stable/latest
|
||||
fi
|
||||
14
board/nextthing/chip/upload_source.sh
Normal file
14
board/nextthing/chip/upload_source.sh
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
BRANCH=$(git symbolic-ref -q HEAD)
|
||||
BRANCH=${BRANCH##refs/heads/chip/}
|
||||
BRANCH=${BRANCH##refs/heads/nextthing/*/}
|
||||
|
||||
BUILD_NUMBER=$1
|
||||
S3_DEST=s3://opensource.nextthing.co/chip/buildroot/${BRANCH}
|
||||
|
||||
tar czf /tmp/CHIP-buildroot-build${BUILD_NUMBER}.tar.gz ../build || exit $?
|
||||
|
||||
s3cmd put --acl-public --no-guess-mime-type /tmp/CHIP-buildroot-build${BUILD_NUMBER}.tar.gz ${S3_DEST}/${BUILD_NUMBER}/build${BUILD_NUMBER}.tar.gz || exit $?
|
||||
|
||||
rm /tmp/CHIP-buildroot-build${BUILD_NUMBER}.tar.gz || exit $?
|
||||
2
board/nextthing/chip/users_table.txt
Normal file
2
board/nextthing/chip/users_table.txt
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
- -1 sudo -1 - - -
|
||||
chip -1 chip -1 =chip /home/chip /bin/sh users,sudo C.H.I.P. user
|
||||
9
board/nextthing/chip/versioning.sh
Normal file
9
board/nextthing/chip/versioning.sh
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
BUILD_NUMBER=$1
|
||||
BUILDROOT_HASH=$(git rev-parse HEAD)
|
||||
|
||||
echo ${BUILD_NUMBER} >build
|
||||
echo ${BUILDROOT_HASH} >buildroot_githash
|
||||
echo "put version information into $PWD"
|
||||
ls
|
||||
Loading…
Add table
Add a link
Reference in a new issue