Skip to content

Commit

Permalink
Merge bsp update 20170810
Browse files Browse the repository at this point in the history
  • Loading branch information
Dangku committed Aug 10, 2017
1 parent be10ae5 commit 487b271
Show file tree
Hide file tree
Showing 26 changed files with 446 additions and 48 deletions.
6 changes: 4 additions & 2 deletions README.md
@@ -1,2 +1,4 @@
# BPI-M64-bsp-open
Supports Banana Pi BPI-M64 (Kernel 3.10) with open source code
# BPI-M64-bsp
Banana Pi BPI-M64 bsp (u-boot 2014.7 & Kernel 3.10)

ref.from https://github.com/longsleep Thanks Simon Eisenmann.
6 changes: 6 additions & 0 deletions bootloader/blobs/bpi-m64-1080p.dts
Expand Up @@ -1710,6 +1710,12 @@
gpr_offset = <0x100>;
gpr_len = <0x4>;
};

watchdog@01c20ca0 {
compatible = "allwinner,sun50i-wdt";
reg = <0x0 0x01c20ca0 0x0 0x20>;
interrupts = <0x0 0x19 0x4>;
};

ve@01c0e000 {
compatible = "allwinner,sunxi-cedar-ve";
Expand Down
6 changes: 6 additions & 0 deletions bootloader/blobs/bpi-m64-480p.dts
Expand Up @@ -1710,6 +1710,12 @@
gpr_offset = <0x100>;
gpr_len = <0x4>;
};

watchdog@01c20ca0 {
compatible = "allwinner,sun50i-wdt";
reg = <0x0 0x01c20ca0 0x0 0x20>;
interrupts = <0x0 0x19 0x4>;
};

ve@01c0e000 {
compatible = "allwinner,sunxi-cedar-ve";
Expand Down
6 changes: 6 additions & 0 deletions bootloader/blobs/bpi-m64-720p.dts
Expand Up @@ -1710,6 +1710,12 @@
gpr_offset = <0x100>;
gpr_len = <0x4>;
};

watchdog@01c20ca0 {
compatible = "allwinner,sun50i-wdt";
reg = <0x0 0x01c20ca0 0x0 0x20>;
interrupts = <0x0 0x19 0x4>;
};

ve@01c0e000 {
compatible = "allwinner,sunxi-cedar-ve";
Expand Down
16 changes: 11 additions & 5 deletions bootloader/blobs/bpi-m64-lcd5.dts
Expand Up @@ -1710,6 +1710,12 @@
gpr_offset = <0x100>;
gpr_len = <0x4>;
};

watchdog@01c20ca0 {
compatible = "allwinner,sun50i-wdt";
reg = <0x0 0x01c20ca0 0x0 0x20>;
interrupts = <0x0 0x19 0x4>;
};

ve@01c0e000 {
compatible = "allwinner,sunxi-cedar-ve";
Expand Down Expand Up @@ -2008,7 +2014,7 @@
compatible = "allwinner,sunxi-tdmhdmi";
reg = <0x0 0x1c22800 0x0 0x58>;
clocks = <0x2 0x48>;
status = "okay";
status = "disabled";
linux,phandle = <0x50>;
phandle = <0x50>;
device_type = "daudio2";
Expand Down Expand Up @@ -2057,7 +2063,7 @@
sound@3 {
compatible = "allwinner,sunxi-hdmi-machine";
sunxi,hdmi-controller = <0x50>;
status = "okay";
status = "disabled";
device_type = "sndhdmi";
};

Expand Down Expand Up @@ -2203,8 +2209,8 @@
disp_mode = <0x0>;
screen0_output_type = <0x1>;
screen0_output_mode = <0x5>;
screen1_output_type = <0x3>;
screen1_output_mode = <0x5>;
screen1_output_type = <0x1>;
screen1_output_mode = <0x5>;
fb0_format = <0x0>;
fb0_width = <0x0>;
fb0_height = <0x0>;
Expand Down Expand Up @@ -2269,7 +2275,7 @@
reg = <0x0 0x1ee0000 0x0 0x20000>;
clocks = <0x6f 0x70>;
device_type = "hdmi";
status = "okay";
status = "disabled";
hdmi_power = "vcc-hdmi-33";
hdmi_hdcp_enable = <0x0>;
hdmi_cts_compatibility = <0x0>;
Expand Down
16 changes: 11 additions & 5 deletions bootloader/blobs/bpi-m64-lcd7.dts
Expand Up @@ -1710,6 +1710,12 @@
gpr_offset = <0x100>;
gpr_len = <0x4>;
};

watchdog@01c20ca0 {
compatible = "allwinner,sun50i-wdt";
reg = <0x0 0x01c20ca0 0x0 0x20>;
interrupts = <0x0 0x19 0x4>;
};

ve@01c0e000 {
compatible = "allwinner,sunxi-cedar-ve";
Expand Down Expand Up @@ -2008,7 +2014,7 @@
compatible = "allwinner,sunxi-tdmhdmi";
reg = <0x0 0x1c22800 0x0 0x58>;
clocks = <0x2 0x48>;
status = "okay";
status = "disabled";
linux,phandle = <0x50>;
phandle = <0x50>;
device_type = "daudio2";
Expand Down Expand Up @@ -2057,7 +2063,7 @@
sound@3 {
compatible = "allwinner,sunxi-hdmi-machine";
sunxi,hdmi-controller = <0x50>;
status = "okay";
status = "disabled";
device_type = "sndhdmi";
};

Expand Down Expand Up @@ -2203,8 +2209,8 @@
disp_mode = <0x0>;
screen0_output_type = <0x1>;
screen0_output_mode = <0x2>;
screen1_output_type = <0x3>;
screen1_output_mode = <0x5>;
screen1_output_type = <0x1>;
screen1_output_mode = <0x2>;
fb0_format = <0x0>;
fb0_width = <0x0>;
fb0_height = <0x0>;
Expand Down Expand Up @@ -2269,7 +2275,7 @@
reg = <0x0 0x1ee0000 0x0 0x20000>;
clocks = <0x6f 0x70>;
device_type = "hdmi";
status = "okay";
status = "disabled";
hdmi_power = "vcc-hdmi-33";
hdmi_hdcp_enable = <0x0>;
hdmi_cts_compatibility = <0x0>;
Expand Down
15 changes: 5 additions & 10 deletions bootloader/u-boot-sunxi/board/sunxi/common/sunxi_board_model.c
Expand Up @@ -38,26 +38,21 @@ static void sunxi_board_type(void)

if(output_type == 1){
if(output_mode == 2){
setenv("bootenv_filename", "uEnv_lcd7.txt");
setenv("bootlogo_filename", "bootlogo_lcd7.bmp");
setenv("board_type", "lcd7");
}
if(output_mode == 5){
setenv("bootenv_filename", "uEnv_lcd5.txt");
setenv("bootlogo_filename", "bootlogo_lcd5.bmp");
setenv("board_type", "lcd5");
}
}
else if(output_type == 3){
if(output_mode == 2){
setenv("bootenv_filename", "uEnv_480p.txt");
setenv("bootlogo_filename", "bootlogo_480p.bmp");
setenv("board_type", "480p");
}
if(output_mode == 5){
setenv("bootenv_filename", "uEnv_720p.txt");
setenv("bootlogo_filename", "bootlogo_720p.bmp");
setenv("board_type", "720p");
}
if(output_mode == 10){
setenv("bootenv_filename", "uEnv_1080p.txt");
setenv("bootlogo_filename", "bootlogo_1080p.bmp");
setenv("board_type", "1080p");
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions bootloader/u-boot-sunxi/common/cmd_sunxi_bmp.c
Expand Up @@ -186,7 +186,7 @@ int sunxi_bmp_display(char *name)
char *bmp_buff = NULL;
int ret = -1;
const char *sunxi_model;
const char *sunxi_logo;
const char *board_type;
//const size_t bmp_buff_len = 10<<20; //10M
//size_t file_size = 0;

Expand All @@ -206,8 +206,8 @@ int sunxi_bmp_display(char *name)
{
sunxi_model=getenv("board_model");
if(sunxi_model){
sunxi_logo=getenv("bootlogo_filename");
snprintf(bmp_name, 64, "/bananapi/%s/linux/%s", sunxi_model, sunxi_logo);
board_type=getenv("board_type");
snprintf(bmp_name, 64, "/bananapi/%s/linux/%s/%s", sunxi_model, board_type, name);
} else
snprintf(bmp_name, 64, "/boot/%s", name);

Expand Down
12 changes: 9 additions & 3 deletions bootloader/u-boot-sunxi/include/configs/sun50iw1p1.h
Expand Up @@ -352,7 +352,14 @@
"initrd_filename=initrd.img\0" \
"bootenv_filename=uEnv.txt\0" \
"load_bootenv=" \
"load mmc ${boot_part} ${load_addr} bananapi/${board_model}/linux/${bootenv_filename}\0" \
"for envprefix in /bananapi/${board_model}/linux/${board_type}/ /bananapi/${board_model}/linux/ / /boot/; do " \
"if test -e mmc ${boot_part} ${envprefix}/${bootenv_filename}; then " \
"load mmc ${boot_part} ${load_addr} ${envprefix}${bootenv_filename}; " \
"run import_bootenv; " \
"echo Booting with uEnv.txt ...; " \
"run mmcboot; " \
"fi; " \
"done\0" \
"import_bootenv=" \
"env import -t ${load_addr} ${filesize}\0" \
"load_dtb=" \
Expand Down Expand Up @@ -380,8 +387,7 @@
"rootwait\0" \
"mmcbootcmd=" \
"if run load_bootenv; then " \
"echo Loading boot environment ...; " \
"run import_bootenv; " \
"echo uEnv.txt load failed: continuing ...; " \
"fi; " \
"run load_bootscript; " \
"echo Booting with defaults ...; " \
Expand Down
17 changes: 16 additions & 1 deletion linux-sunxi/arch/arm64/configs/sun50iw1p1smp_bpi-m64_defconfig
Expand Up @@ -1893,6 +1893,8 @@ CONFIG_HWMON=y
# CONFIG_SENSORS_SMSC47M192 is not set
# CONFIG_SENSORS_SMSC47B397 is not set
# CONFIG_SENSORS_SCH56XX_COMMON is not set
# CONFIG_SENSORS_SCH5627 is not set
# CONFIG_SENSORS_SCH5636 is not set
# CONFIG_SENSORS_ADS1015 is not set
# CONFIG_SENSORS_ADS7828 is not set
# CONFIG_SENSORS_ADS7871 is not set
Expand Down Expand Up @@ -1930,7 +1932,20 @@ CONFIG_SUN50IW1P1_THERMAL=y
CONFIG_SUNXI_BUDGET_COOLING=y
CONFIG_BUDGET_HOTPLUG_CPU=y
CONFIG_SUNXI_GPU_COOLING=y
# CONFIG_WATCHDOG is not set
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_CORE=y
# CONFIG_WATCHDOG_NOWAYOUT is not set

#
# Watchdog Device Drivers
#
# CONFIG_SOFT_WATCHDOG is not set
CONFIG_SUNXI_WATCHDOG=y

#
# USB-based Watchdog Cards
#
# CONFIG_USBPCWATCHDOG is not set
CONFIG_SSB_POSSIBLE=y

#
Expand Down
Expand Up @@ -105,10 +105,10 @@ static void LCD_power_on(u32 sel)
power_en(1);
sunxi_lcd_delay_ms(50);
panel_reset(1);
//sunxi_lcd_delay_ms(10);
//panel_reset(0);
//sunxi_lcd_delay_ms(10);
//panel_reset(1);
sunxi_lcd_delay_ms(50);
panel_reset(0);
sunxi_lcd_delay_ms(50);
panel_reset(1);
sunxi_lcd_delay_ms(20);

sunxi_lcd_pin_cfg(sel, 1);
Expand Down
10 changes: 10 additions & 0 deletions linux-sunxi/drivers/watchdog/Kconfig 100644 → 100755
Expand Up @@ -391,6 +391,16 @@ config RETU_WATCHDOG
To compile this driver as a module, choose M here: the
module will be called retu_wdt.

config SUNXI_WATCHDOG
tristate "Allwinner SoCs watchdog support"
depends on ARCH_SUNXI
select WATCHDOG_CORE
help
Say Y here to include support for the watchdog timer
in Allwinner SoCs.
To compile this driver as a module, choose M here: the
module will be called sunxi_wdt.

# AVR32 Architecture

config AT32AP700X_WDT
Expand Down
1 change: 1 addition & 0 deletions linux-sunxi/drivers/watchdog/Makefile 100644 → 100755
Expand Up @@ -54,6 +54,7 @@ obj-$(CONFIG_TS72XX_WATCHDOG) += ts72xx_wdt.o
obj-$(CONFIG_IMX2_WDT) += imx2_wdt.o
obj-$(CONFIG_UX500_WATCHDOG) += ux500_wdt.o
obj-$(CONFIG_RETU_WATCHDOG) += retu_wdt.o
obj-$(CONFIG_SUNXI_WATCHDOG) += sunxi_wdt.o

# AVR32 Architecture
obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o
Expand Down

0 comments on commit 487b271

Please sign in to comment.