diff --git a/config/bananapipro.fex b/config/bananapipro.fex index 275521be5..a5c1b7410 100644 --- a/config/bananapipro.fex +++ b/config/bananapipro.fex @@ -819,7 +819,7 @@ kp_out7 = port:PH27<4><1> [usbc0] usb_used = 1 usb_port_type = 2 -usb_detect_type = 1 +usb_detect_type = 0 usb_id_gpio = port:PH04<0><1> usb_det_vbus_gpio = "axp_ctrl" usb_drv_vbus_gpio = port:PB09<1><0><0> @@ -969,7 +969,7 @@ switch_used = 0 [leds_para] leds_used = 1 -leds_num = 2 +leds_num = 1 leds_pin_1 = port:PH24<1><0> leds_name_1 = "green:ph24:led1" leds_trigger_1 = "mmc0" diff --git a/config/linux-sunxi-next.config b/config/linux-sunxi-next.config index ea3f59f1e..ba43151f9 100644 --- a/config/linux-sunxi-next.config +++ b/config/linux-sunxi-next.config @@ -3949,7 +3949,7 @@ CONFIG_USBIP_CORE=m CONFIG_USBIP_VHCI_HCD=m CONFIG_USBIP_HOST=m # CONFIG_USBIP_DEBUG is not set -CONFIG_USB_MUSB_HDRC=m +CONFIG_USB_MUSB_HDRC=y # CONFIG_USB_MUSB_HOST is not set # CONFIG_USB_MUSB_GADGET is not set CONFIG_USB_MUSB_DUAL_ROLE=y @@ -3957,7 +3957,7 @@ CONFIG_USB_MUSB_DUAL_ROLE=y # # Platform Glue Layer # -CONFIG_USB_MUSB_SUNXI=m +CONFIG_USB_MUSB_SUNXI=y # # MUSB DMA mode @@ -3968,9 +3968,10 @@ CONFIG_USB_MUSB_SUNXI=m # CONFIG_USB_CHIPIDEA is not set CONFIG_USB_ISP1760=m CONFIG_USB_ISP1760_HCD=y -CONFIG_USB_ISP1760_HOST_ROLE=y +CONFIG_USB_ISP1761_UDC=y +# CONFIG_USB_ISP1760_HOST_ROLE is not set # CONFIG_USB_ISP1760_GADGET_ROLE is not set -# CONFIG_USB_ISP1760_DUAL_ROLE is not set +CONFIG_USB_ISP1760_DUAL_ROLE=y # # USB port drivers @@ -4082,7 +4083,7 @@ CONFIG_NOP_USB_XCEIV=y # CONFIG_USB_GPIO_VBUS is not set # CONFIG_USB_ISP1301 is not set # CONFIG_USB_ULPI is not set -CONFIG_USB_GADGET=m +CONFIG_USB_GADGET=y # CONFIG_USB_GADGET_DEBUG is not set # CONFIG_USB_GADGET_DEBUG_FILES is not set # CONFIG_USB_GADGET_DEBUG_FS is not set @@ -4115,23 +4116,24 @@ CONFIG_USB_F_EEM=m CONFIG_USB_F_SUBSET=m CONFIG_USB_F_RNDIS=m CONFIG_USB_F_MASS_STORAGE=m -CONFIG_USB_F_UAC2=m +CONFIG_USB_F_UAC1=m CONFIG_USB_F_UVC=m CONFIG_USB_F_HID=m +CONFIG_USB_F_PRINTER=m # CONFIG_USB_CONFIGFS is not set # CONFIG_USB_ZERO is not set CONFIG_USB_AUDIO=m -# CONFIG_GADGET_UAC1 is not set +CONFIG_GADGET_UAC1=y CONFIG_USB_ETH=m CONFIG_USB_ETH_RNDIS=y CONFIG_USB_ETH_EEM=y # CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set +CONFIG_USB_GADGETFS=m # CONFIG_USB_FUNCTIONFS is not set CONFIG_USB_MASS_STORAGE=m CONFIG_USB_G_SERIAL=m # CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set +CONFIG_USB_G_PRINTER=m CONFIG_USB_CDC_COMPOSITE=m CONFIG_USB_G_ACM_MS=m CONFIG_USB_G_MULTI=m @@ -4140,7 +4142,7 @@ CONFIG_USB_G_MULTI_RNDIS=y CONFIG_USB_G_HID=m # CONFIG_USB_G_DBGP is not set CONFIG_USB_G_WEBCAM=m -CONFIG_USB_LED_TRIG=y +# CONFIG_USB_LED_TRIG is not set # CONFIG_UWB is not set CONFIG_MMC=y # CONFIG_MMC_DEBUG is not set diff --git a/configuration.sh b/configuration.sh index dc9531427..8feb628c2 100644 --- a/configuration.sh +++ b/configuration.sh @@ -174,11 +174,11 @@ case $BOARD in DESKTOP_TARGET="trusty,next" ;; - bananapi)#enabled + bananapipro)#enabled #description A20 dual core 1Gb SoC #build 6 LINUXFAMILY="sun7i" - BOOTCONFIG="Bananapi_defconfig" + BOOTCONFIG="Bananapro_defconfig" MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i 8021q a20_tp #ap6211" MODULES_NEXT="brcmfmac bonding" DESKTOP_TARGET="trusty,%" diff --git a/documentation/logbook.md b/documentation/logbook.md index 05c8dd1ec..48ef4518c 100644 --- a/documentation/logbook.md +++ b/documentation/logbook.md @@ -1,5 +1,14 @@ # Release history +**v5.04 / 1.3.2016** + +- Banana M1/PRO/M1+ rebuilded +- fixed SATA problem +- set OTG port in HOST mode in vanilla kernel +- wireless is working on PRO out of the box +- added utility to switch between OTG and HOST in vanilla kernel +- Bugs left: OTG mode not working, M1+ wireless not work in vanilla kernel + **v5.04 / 28.2.2016** - H3 images rebuilded diff --git a/makeboarddeb.sh b/makeboarddeb.sh index 0b1bfa9d6..ec5cd2043 100644 --- a/makeboarddeb.sh +++ b/makeboarddeb.sh @@ -71,6 +71,9 @@ create_board_package (){ mkdir -p $destination/usr/local/bin tar xfz $SRC/lib/bin/temper.tgz -C $destination/usr/local/bin + # add USB OTG port mode switcher + install -m 755 $SRC/lib/scripts/sunxi-musb $destination/usr/local/bin + # replace hostapd from latest self compiled & patched mkdir -p $destination/usr/sbin/ tar xfz $SRC/lib/bin/hostapd25-rt.tgz -C $destination/usr/sbin/ diff --git a/patch/kernel/sunxi-next/bananapipro-wifi-codec-led-fix.patch b/patch/kernel/sunxi-next/bananapipro-wifi-codec-led-fix.patch new file mode 100644 index 000000000..dee723a1a --- /dev/null +++ b/patch/kernel/sunxi-next/bananapipro-wifi-codec-led-fix.patch @@ -0,0 +1,94 @@ +diff --git a/arch/arm/boot/dts/sun7i-a20-bananapro.dts b/arch/arm/boot/dts/sun7i-a20-bananapro.dts +index 18fcc87..d5519c6 100644 +--- a/arch/arm/boot/dts/sun7i-a20-bananapro.dts ++++ b/arch/arm/boot/dts/sun7i-a20-bananapro.dts +@@ -66,13 +66,14 @@ + pinctrl-0 = <&led_pins_bananapro>; + + blue { +- label = "bananapro:blue:usr"; ++ label = "bananapro:blue:usr"; + gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; + }; + + green { + label = "bananapro:green:usr"; + gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "mmc0"; + }; + }; + +@@ -95,6 +96,8 @@ + regulator-name = "vmmc3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; ++ regulator-always-on; ++ regulator-boot-on; + enable-active-high; + gpio = <&pio 7 22 GPIO_ACTIVE_HIGH>; + }; +@@ -104,6 +107,10 @@ + status = "okay"; + }; + ++&codec { ++ status = "okay"; ++}; ++ + &ehci0 { + status = "okay"; + }; +@@ -164,12 +171,26 @@ + }; + + &mmc3 { ++ #address-cells = <1>; ++ #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&mmc3_pins_a>; + vmmc-supply = <®_vmmc3>; + bus-width = <4>; + non-removable; ++ enable-sdio-wakeup; + status = "okay"; ++ ++/* ++ brcmf: bcrmf@1 { ++ reg = <1>; ++ compatible = "brcm,bcm4329-fmac"; ++ interrupt-parent = <&pio>; ++ interrupts = <15 8>; ++ interrupt-names = "host-wake"; ++ }; ++*/ ++ + }; + + &ohci0 { +@@ -180,6 +201,10 @@ + status = "okay"; + }; + ++&otg_sram { ++ status = "okay"; ++}; ++ + &pio { + gmac_power_pin_bananapro: gmac_power_pin@0 { + allwinner,pins = "PH23"; +@@ -262,8 +287,11 @@ + status = "okay"; + }; + +-&usbphy { +- usb1_vbus-supply = <®_usb1_vbus>; +- usb2_vbus-supply = <®_usb2_vbus>; ++&usb_otg { ++ dr_mode = "host"; + status = "okay"; + }; ++ ++&usbphy { ++ status = "okay"; ++}; +\ No newline at end of file diff --git a/patch/u-boot/u-boot-default/bananapi-enable-ldo4.patch b/patch/u-boot/u-boot-default/bananapi-enable-ldo4.patch new file mode 100644 index 000000000..47a454b79 --- /dev/null +++ b/patch/u-boot/u-boot-default/bananapi-enable-ldo4.patch @@ -0,0 +1,19 @@ +diff --git a/configs/Bananapi_defconfig b/configs/Bananapi_defconfig +index 6cbb76c..5ed845c 100644 +--- a/configs/Bananapi_defconfig ++++ b/configs/Bananapi_defconfig +@@ -15,3 +15,4 @@ CONFIG_CMD_GPIO=y + CONFIG_NETCONSOLE=y + CONFIG_ETH_DESIGNWARE=y + CONFIG_USB_EHCI_HCD=y ++CONFIG_AXP_ALDO4_VOLT=2500 +diff --git a/configs/Bananapro_defconfig b/configs/Bananapro_defconfig +index 40588b9..f1554bc 100644 +--- a/configs/Bananapro_defconfig ++++ b/configs/Bananapro_defconfig +@@ -17,3 +17,4 @@ CONFIG_CMD_GPIO=y + CONFIG_NETCONSOLE=y + CONFIG_ETH_DESIGNWARE=y + CONFIG_USB_EHCI_HCD=y ++CONFIG_AXP_ALDO4_VOLT=2500 +\ No newline at end of file diff --git a/patch/u-boot/u-boot-next/bananapi-enable-ldo4.patch b/patch/u-boot/u-boot-next/bananapi-enable-ldo4.patch index 161bde831..47a454b79 100644 --- a/patch/u-boot/u-boot-next/bananapi-enable-ldo4.patch +++ b/patch/u-boot/u-boot-next/bananapi-enable-ldo4.patch @@ -7,4 +7,13 @@ index 6cbb76c..5ed845c 100644 CONFIG_ETH_DESIGNWARE=y CONFIG_USB_EHCI_HCD=y +CONFIG_AXP_ALDO4_VOLT=2500 +diff --git a/configs/Bananapro_defconfig b/configs/Bananapro_defconfig +index 40588b9..f1554bc 100644 +--- a/configs/Bananapro_defconfig ++++ b/configs/Bananapro_defconfig +@@ -17,3 +17,4 @@ CONFIG_CMD_GPIO=y + CONFIG_NETCONSOLE=y + CONFIG_ETH_DESIGNWARE=y + CONFIG_USB_EHCI_HCD=y ++CONFIG_AXP_ALDO4_VOLT=2500 \ No newline at end of file diff --git a/scripts/sunxi-musb b/scripts/sunxi-musb new file mode 100644 index 000000000..d5a2e813a --- /dev/null +++ b/scripts/sunxi-musb @@ -0,0 +1,39 @@ +#!/bin/bash +# +# +# sunxi_musb +# +# Patches Device Tree Blob to modify dr_mode - function of the OTG port +# +# Usage: filename.dtb otg | host +# +# It searches for dtb files in /boot/dtb +# +# It's a part of Armbian project. + +if [[ -z $1 ]]; then + echo -e "OTG / HOST changer for DTB v1.0" + echo -e "\n`basename "$0"` filename.dtb otg | host" + echo -e "" + echo -e "\e[0;32mUsage example:\x1B[0m `basename "$0"` sun4i-a10-mini-xplus.dtb otg" + echo -e + exit +fi +[[ ! -f "/boot/dtb/$1" ]] && echo -e "[\e[0;31m Device tree blob /boot/dtb/$1 not found \x1B[0m]" + +if [[ $2 != "otg" && $2 != "host" ]]; then +echo -e "[\e[0;31m error \x1B[0m] Unkown parameter $2" +exit 2 +fi + +( dtc -I dtb -O dts /boot/dtb/$1 | grep dr_mode ) > /dev/null 2>&1 + +if [ $? -ne 0 ]; then +echo -e "[\e[0;31m error \x1B[0m] dr_mode undefined in /boot/dtb/$1" +exit 1 +fi + + +dtc -I dtb -O dts /boot/dtb/$1 | sed -e "s/dr_mode =.*/dr_mode = \"$2\";/" | dtc -I dts -O dtb -o /boot/dtb/$1 + +echo -e "[\e[0;32m o.k. \x1B[0m] $2 mode enabled in /boot/dtb/$1" diff --git a/upgrade.sh b/upgrade.sh index 0fca37de9..a5fa21d90 100644 --- a/upgrade.sh +++ b/upgrade.sh @@ -182,7 +182,7 @@ select_boards () if [ -z "$BOARD" ]; then IFS=" " Options="Cubieboard A10 Cubieboard2 A20 Cubietruck A20 Lime-A10 A10 Lime \ -A20 Lime2 A20 Micro A20 Bananapi A20 Lamobo-R1 A20 Orangepi A20 Pcduino3nano A20" +A20 Lime2 A20 Micro A20 Bananapipro A20 Lamobo-R1 A20 Orangepi A20 Pcduino3nano A20" BoardOptions=($Options); BoardCmd=(dialog --title "Choose a board:" --backtitle "$backtitle" --menu "\n$infos" 20 60 26) BoardChoices=$("${BoardCmd[@]}" "${BoardOptions[@]}" 2>&1 >/dev/tty) @@ -216,7 +216,7 @@ if [[ $BRANCH == "vanilla" ]] ; then fi case $BOARD in -bananapi | bananapipro | lamobo-r1 | orangepi | orangepimini) +bananapipro | lamobo-r1 | orangepi | orangepimini) LINUXFAMILY="sun7i" if [[ $BRANCH == "vanilla" ]] ; then LINUXFAMILY="sunxi"; fi ;;