diff --git a/config/boards/bananapim2zero.csc b/config/boards/bananapim2zero.csc new file mode 100644 index 0000000000..647b5a30c9 --- /dev/null +++ b/config/boards/bananapim2zero.csc @@ -0,0 +1,25 @@ +# H3/H2+ quad core 512MB SoC Wi-Fi/BT +BOARD_NAME="Banana Pi M2 Zero" +BOARDFAMILY="sun8i" +BOOTCONFIG="Sinovoip_BPI_M2_Zero_defconfig" +# +MODULES="#w1-sunxi #w1-gpio #w1-therm #sunxi-cir dhd hci_uart rfcomm hidp" +MODULES_NEXT="brcmfmac g_serial" +CPUMIN="240000" +CPUMAX="1200000" +# +KERNEL_TARGET="default,next,dev" +CLI_TARGET="" +DESKTOP_TARGET="" +# +CLI_BETA_TARGET="stretch:next" +DESKTOP_BETA_TARGET="" +# +RECOMMENDED="Debian_stretch_next_nightly:75" +# +BOARDRATING="" +CHIP="http://docs.armbian.com/Hardware_Allwinner-H3/" +REVIEW="https://forum.armbian.com/topic/4801-banana-pi-zero/" +HARDWARE="https://linux-sunxi.org/Sinovoip_Banana_Pi_M2_Zero" +FORUMS="http://forum.armbian.com/index.php/forum/13-allwinner-h3/" +BUY="http://amzn.to/2Hi9DVt" diff --git a/config/fex/bananapim2zero.fex b/config/fex/bananapim2zero.fex new file mode 100644 index 0000000000..6d79daa032 --- /dev/null +++ b/config/fex/bananapim2zero.fex @@ -0,0 +1,861 @@ +[product] +version = "100" +machine = "Banana Pi BPI-M2-Zero" + +[platform] +debug_mode = 1 +eraseflag = 1 +next_work = 2 + +[target] +boot_clock = 1008 +storage_type = -1 + +[key_detect_en] +keyen_flag = 0 + +[fel_key] +fel_key_max = 7 +fel_key_min = 2 + +[card_boot] +logical_start = 40960 +sprite_work_delay = 500 +sprite_err_delay = 200 +sprite_gpio0 = port:PD00<1> +next_work = 3 + +[box_start_os] +used = 1 +start_type = 1 +irkey_used = 1 +pmukey_used = 1 +pmukey_num = 3 +led_power = 0 +led_state = 0 + +[boot_init_gpio] +used = 1 +gpio0 = port:PL10<1><1> + +[recovery_para] +used = 0 +mode = 2 +recovery_key = port:PL01<0> + +[pm_para] +standby_mode = 1 + +[card0_boot_para] +card_ctrl = 0 +card_high_speed = 1 +card_line = 4 +sdc_d1 = port:PF00<2><1><2> +sdc_d0 = port:PF01<2><1><2> +sdc_clk = port:PF02<2><1><2> +sdc_cmd = port:PF03<2><1><2> +sdc_d3 = port:PF04<2><1><2> +sdc_d2 = port:PF05<2><1><2> + +[card2_boot_para] +card_ctrl = 2 +card_high_speed = 1 +card_line = 8 +sdc_cmd = port:PC06<3><1><2> +sdc_clk = port:PC05<3><1><2> +sdc_d0 = port:PC08<3><1><2> +sdc_d1 = port:PC09<3><1><2> +sdc_d2 = port:PC10<3><1><2> +sdc_d3 = port:PC11<3><1><2> +sdc_d4 = port:PC12<3><1><2> +sdc_d5 = port:PC13<3><1><2> +sdc_d6 = port:PC14<3><1><2> +sdc_d7 = port:PC15<3><1><2> +sdc_2xmode = 1 +sdc_ddrmode = 1 + +[twi_para] +twi_port = 0 +twi_scl = port:PA11<2> +twi_sda = port:PA12<2> + +[uart_para] +uart_debug_port = 0 +uart_debug_tx = port:PA04<2><1> +uart_debug_rx = port:PA05<2><1> + +[force_uart_para] +force_uart_port = 0 +force_uart_tx = port:PF02<3><1> +force_uart_rx = port:PF04<3><1> + +[jtag_para] +jtag_enable = 0 +jtag_ms = port:PA00<3> +jtag_ck = port:PA01<3> +jtag_do = port:PA02<3> +jtag_di = port:PA03<3> + +[clock] +pll_video = 297 +pll_ve = 402 +pll_periph0 = 600 +pll_gpu = 576 +pll_periph1 = 600 +pll_de = 864 + +[dram_para] +dram_clk = 408 +dram_type = 3 +dram_zq = 0x3b3bfb +dram_odt_en = 1 +dram_para1 = 283377664 +dram_para2 = 0 +dram_mr0 = 6208 +dram_mr1 = 64 +dram_mr2 = 24 +dram_mr3 = 2 +dram_tpr0 = 0x48a192 +dram_tpr1 = 0x1c2418d +dram_tpr2 = 0x76051 +dram_tpr3 = 0x0 +dram_tpr4 = 0x0 +dram_tpr5 = 0x0 +dram_tpr6 = 0x64 +dram_tpr7 = 0x13890240 +dram_tpr8 = 0x0 +dram_tpr9 = 0x0 +dram_tpr10 = 0x0 +dram_tpr11 = 0x6aaa0000 +dram_tpr12 = 0x7979 +dram_tpr13 = 0x1802800 + +[wakeup_src_para] +cpu_en = 0 +cpu_freq = 48 +pll_ratio = 273 +dram_selfresh_en = 1 +dram_freq = 36 +wakeup_src0 = +wakeup_src_wl = port:PG10<4><0> +wakeup_src_bt = port:PG11<6><0> + +[twi0] +twi_used = 1 +twi_scl = port:PA11<2> +twi_sda = port:PA12<2> + +[twi1] +twi_used = 1 +twi_scl = port:PA18<3> +twi_sda = port:PA19<3> + +[twi2] +twi_used = 0 +twi_scl = port:PE12<3> +twi_sda = port:PE13<3> + +[uart0] +uart_used = 1 +uart_port = 0 +uart_type = 2 +uart_tx = port:PA04<2><1> +uart_rx = port:PA05<2><1> + +[uart1] +uart_used = 1 +uart_port = 1 +uart_type = 4 +uart_tx = port:PG06<2><1> +uart_rx = port:PG07<2><1> +uart_rts = port:PG08<2><1> +uart_cts = port:PG09<2><1> + +[uart2] +uart_used = 1 +uart_port = 2 +uart_type = 4 +uart_tx = port:PA00<2><1> +uart_rx = port:PA01<2><1> +uart_rts = port:PA02<2><1> +uart_cts = port:PA03<2><1> + +[uart3] +uart_used = 1 +uart_port = 3 +uart_type = 2 +uart_tx = port:PA13<3><1> +uart_rx = port:PA14<3><1> +uart_rts = port:PA15<3><1> +uart_cts = port:PA16<3><1> + +[spi0] +spi_used = 1 +spi_cs_bitmap = 1 +spi_mosi = port:PC00<3> +spi_miso = port:PC01<3> +spi_sclk = port:PC02<3> +spi_cs0 = port:PC03<3><1> + +[spi1] +spi_used = 0 +spi_cs_bitmap = 1 +spi_cs0 = port:PA13<2><1> +spi_sclk = port:PA14<2> +spi_mosi = port:PA15<2> +spi_miso = port:PA16<2> + +[spi_devices] +spi_dev_num = 1 + +[spi_board0] +modalias = "spidev" +max_speed_hz = 33000000 +bus_num = 0 +chip_select = 0 +mode = 3 +full_duplex = 1 +manual_cs = 0 + +[gpio_para] +gpio_used = 1 +gpio_num = 29 +gpio_pin_1 = port:PA12<1><0> +gpio_pin_2 = port:PA11<1><0> +gpio_pin_3 = port:PA06<1><0> +gpio_pin_4 = port:PA01<1><0> +gpio_pin_5 = port:PA00<1><0> +gpio_pin_6 = port:PA03<1><0> +gpio_pin_7 = port:PC00<1><0> +gpio_pin_8 = port:PC01<1><0> +gpio_pin_9 = port:PC02<1><0> +gpio_pin_10 = port:PA19<1><0> +gpio_pin_11 = port:PA07<1><0> +gpio_pin_12 = port:PA08<1><0> +gpio_pin_13 = port:PA09<1><0> +gpio_pin_14 = port:PA10<1><0> +gpio_pin_15 = port:PA17<1><0> +gpio_pin_16 = port:PA13<1><0> +gpio_pin_17 = port:PA14<1><0> +gpio_pin_18 = port:PA16<1><0> +gpio_pin_19 = port:PA15<1><0> +gpio_pin_20 = port:PC04<1><0> +gpio_pin_21 = port:PA02<1><0> +gpio_pin_22 = port:PC03<1><0> +gpio_pin_23 = port:PC07<1><0> +gpio_pin_24 = port:PA18<1><0> +gpio_pin_25 = port:PL02<1><0> +gpio_pin_26 = port:PL04<1><0> +gpio_pin_27 = port:PA21<1><0> +gpio_pin_28 = port:PA20<1><0> +gpio_pin_29 = port:PL10<0><1> + +[led_assign] +normal_led = "gpio_pin_29" +;standby_led = "gpio_pin_10" + +[leds_para] +leds_used = 1 +red_led = port:PL10<1><1> +red_led_active_low = 1 + +[ths_para] +ths_used = 1 +ths_trip1_count = 8 +ths_trip1_0 = 65 +ths_trip1_1 = 70 +ths_trip1_2 = 75 +ths_trip1_3 = 80 +ths_trip1_4 = 85 +ths_trip1_5 = 90 +ths_trip1_6 = 95 +ths_trip1_7 = 105 +ths_trip1_0_min = 0 +ths_trip1_0_max = 1 +ths_trip1_1_min = 1 +ths_trip1_1_max = 2 +ths_trip1_2_min = 2 +ths_trip1_2_max = 3 +ths_trip1_3_min = 3 +ths_trip1_3_max = 4 +ths_trip1_4_min = 4 +ths_trip1_4_max = 6 +ths_trip1_5_min = 6 +ths_trip1_5_max = 8 +ths_trip1_6_min = 8 +ths_trip1_6_max = 10 +ths_trip1_7_min = 0 +ths_trip1_7_max = 0 +ths_trip2_count = 1 +ths_trip2_0 = 105 + +[cooler_table] +cooler_count = 11 +cooler0 = "1200000 4 4294967295 0" +cooler1 = "1008000 4 4294967295 0" +cooler2 = "816000 4 4294967295 0" +cooler3 = "720000 4 4294967295 0" +cooler4 = "648000 4 4294967295 0" +cooler5 = "480000 4 4294967295 0" +cooler6 = "312000 4 4294967295 0" +cooler7 = "240000 4 4294967295 0" +cooler8 = "240000 3 4294967295 0" +cooler9 = "240000 2 4294967295 0" +cooler10 = "240000 1 4294967295 0" + +[nand0_para] +nand_support_2ch = 0 +nand0_used = 0 +nand0_we = port:PC00<2> +nand0_ale = port:PC01<2> +nand0_cle = port:PC02<2> +nand0_ce1 = port:PC03<2> +nand0_ce0 = port:PC04<2> +nand0_nre = port:PC05<2> +nand0_rb0 = port:PC06<2> +nand0_rb1 = port:PC07<2> +nand0_d0 = port:PC08<2> +nand0_d1 = port:PC09<2> +nand0_d2 = port:PC10<2> +nand0_d3 = port:PC11<2> +nand0_d4 = port:PC12<2> +nand0_d5 = port:PC13<2> +nand0_d6 = port:PC14<2> +nand0_d7 = port:PC15<2> +nand0_ndqs = port:PC16<2> + +[boot_disp] +advert_disp = 0 +auto_hpd = 1 +output_type = 4 +hdmi_channel = 0 +hdmi_mode = 4 +cvbs_channel = 1 +cvbs_mode = 11 +output_full = 1 +hdmi_mode_check = 1 + +[disp_init] +disp_init_enable = 1 +disp_mode = 0 +screen0_output_type = 3 +screen0_output_mode = 5 +screen1_output_type = 3 +screen1_output_mode = 5 +fb0_format = 0 +fb0_width = 0 +fb0_height = 0 +fb1_format = 0 +fb1_width = 0 +fb1_height = 0 +fb0_framebuffer_num = 3 +sunxi_fb_mem_reserve = 32 + +[hdmi_para] +hdmi_used = 1 +hdmi_power = "vcc-hdmi-18" + +[tv_para] +tv_used = 0 +tv_dac_used = 1 +tv_dac_src0 = 0 + +[pwm0_para] +pwm_used = 0 +pwm_positive = port:PA06<3><0> + +[gmac0] +gmac_used = 2 +gmac_rxd3 = port:PD00<2><3> +gmac_rxd2 = port:PD01<2><3> +gmac_rxd1 = port:PD02<2><3> +gmac_rxd0 = port:PD03<2><3> +gmac_rxclk = port:PD04<2><3> +gmac_rxdv = port:PD05<2><3> +gmac_txd3 = port:PD07<2><3> +gmac_txd2 = port:PD08<2><3> +gmac_txd1 = port:PD09<2><3> +gmac_txd0 = port:PD10<2><3> +gmac_txclk = port:PD12<2><3> +gmac_txen = port:PD13<2><3> +gmac_col = port:PD15<2><3> +gmac_mdc = port:PD16<2><3> +gmac_mdio = port:PD17<2><3> +gmac_power1 = + +[gmac_phy_power] +gmac_phy_power_en = port:PD06<1><0> + +[csi0] +vip_used = 1 +vip_mode = 0 +vip_dev_qty = 1 +vip_define_sensor_list = 0 +vip_csi_pck = port:PE00<2> +vip_csi_mck = port:PE01<2> +vip_csi_hsync = port:PE02<2> +vip_csi_vsync = port:PE03<2> +vip_csi_d0 = port:PE04<2> +vip_csi_d1 = port:PE05<2> +vip_csi_d2 = port:PE06<2> +vip_csi_d3 = port:PE07<2> +vip_csi_d4 = port:PE08<2> +vip_csi_d5 = port:PE09<2> +vip_csi_d6 = port:PE10<2> +vip_csi_d7 = port:PE11<2> +vip_csi_sck = port:PE12<2> +vip_csi_sda = port:PE13<2> +vip_dev0_mname = "ov5640" +vip_dev0_pos = "rear" +vip_dev0_lane = 4 +vip_dev0_twi_id = 2 +vip_dev0_twi_addr = 120 +vip_dev0_isp_used = 1 +vip_dev0_fmt = 1 +vip_dev0_stby_mode = 1 +vip_dev0_vflip = 0 +vip_dev0_hflip = 0 +vip_dev0_iovdd = "" +vip_dev0_iovdd_vol = 2800000 +vip_dev0_avdd = "" +vip_dev0_avdd_vol = 2800000 +vip_dev0_dvdd = "" +vip_dev0_dvdd_vol = 1500000 +vip_dev0_afvdd = "" +vip_dev0_afvdd_vol = 2800000 +vip_dev0_power_en = port:PD14<1> +vip_dev0_reset = port:PE14<1> +vip_dev0_pwdn = port:PE15<1> +vip_dev0_flash_en = +vip_dev0_flash_mode = +vip_dev0_af_pwdn = +vip_dev0_act_used = 1 +vip_dev0_act_name = "ad5820_act" +vip_dev0_act_slave = 24 +vip_dev1_mname = "" +vip_dev1_pos = "front" +vip_dev1_lane = 1 +vip_dev1_twi_id = 0 +vip_dev1_twi_addr = +vip_dev1_isp_used = 0 +vip_dev1_fmt = 1 +vip_dev1_stby_mode = 0 +vip_dev1_vflip = 0 +vip_dev1_hflip = 0 +vip_dev1_iovdd = "" +vip_dev1_iovdd_vol = 2800000 +vip_dev1_avdd = "" +vip_dev1_avdd_vol = 2800000 +vip_dev1_dvdd = "" +vip_dev1_dvdd_vol = 1500000 +vip_dev1_afvdd = "" +vip_dev1_afvdd_vol = 2800000 +vip_dev1_power_en = +vip_dev1_reset = +vip_dev1_pwdn = +vip_dev1_flash_en = +vip_dev1_flash_mode = +vip_dev1_af_pwdn = + +[tvout_para] +tvout_used = 0 +tvout_channel_num = +tv_en = 0 + +[tvin_para] +tvin_used = 0 +tvin_channel_num = + +[di_para] +di_used = 0 + +[mmc0_para] +sdc_used = 1 +sdc_detmode = 3 +sdc_buswidth = 4 +sdc_clk = port:PF02<2><1><2> +sdc_cmd = port:PF03<2><1><2> +sdc_d0 = port:PF01<2><1><2> +sdc_d1 = port:PF00<2><1><2> +sdc_d2 = port:PF05<2><1><2> +sdc_d3 = port:PF04<2><1><2> +sdc_det = port:PF06<0><1><2> +sdc_use_wp = 0 +sdc_wp = +sdc_isio = 0 +sdc_regulator = "none" +sdc_power_supply = "none" + +[mmc1_para] +sdc_used = 1 +sdc_detmode = 4 +sdc_buswidth = 4 +sdc_clk = port:PG00<2><1><3> +sdc_cmd = port:PG01<2><1><3> +sdc_d0 = port:PG02<2><1><3> +sdc_d1 = port:PG03<2><1><3> +sdc_d2 = port:PG04<2><1><3> +sdc_d3 = port:PG05<2><1><3> +sdc_det = +sdc_use_wp = 0 +sdc_wp = +sdc_isio = 1 +sdc_regulator = "none" +sdc_power_supply = "none" +sdc_2xmode = 1 +sdc_ddrmode = 1 + +[mmc2_para] +sdc_used = 0 +sdc_detmode = 3 +sdc_buswidth = 8 +sdc_clk = port:PC05<3><1><2> +sdc_cmd = port:PC06<3><1><2> +sdc_d0 = port:PC08<3><1><2> +sdc_d1 = port:PC09<3><1><2> +sdc_d2 = port:PC10<3><1><2> +sdc_d3 = port:PC11<3><1><2> +sdc_d4 = port:PC12<3><1><2> +sdc_d5 = port:PC13<3><1><2> +sdc_d6 = port:PC14<3><1><2> +sdc_d7 = port:PC15<3><1><2> +emmc_rst = port:PC16<3><1><2> +sdc_det = +sdc_use_wp = 0 +sdc_wp = +sdc_isio = 0 +sdc_regulator = "none" +sdc_power_supply = "none" +sdc_2xmode = 1 +sdc_ddrmode = 1 + +[smc_para] +smc_used = 0 +smc_rst = port:PA09<2> +smc_vppen = port:PA20<3> +smc_vppp = port:PA21<3> +smc_det = port:PA10<2> +smc_vccen = port:PA06<2> +smc_sck = port:PA07<2> +smc_sda = port:PA08<2> + +[usbc0] +usb_used = 1 +usb_port_type = 2 +usb_detect_type = 0 +usb_id_gpio = port:PL06<0><1> +usb_det_vbus_gpio = port:PL06<0><1> +usb_drv_vbus_gpio = +usb_host_init_state = 1 +usb_restrict_gpio = +usb_restric_flag = 0 +usb_restric_voltage = 3550000 +usb_restric_capacity = 5 +usb_regulator_io = "nocare" +usb_regulator_vol = 0 +usb_not_suspend = 0 + +[usbc1] +usb_used = 0 +usb_drv_vbus_gpio = +usb_restrict_gpio = +usb_host_init_state = 1 +usb_restric_flag = 0 +usb_regulator_io = "nocare" +usb_regulator_vol = 0 +usb_not_suspend = 0 + +[usbc2] +usb_used = 0 +usb_drv_vbus_gpio = +usb_restrict_gpio = +usb_host_init_state = 1 +usb_restric_flag = 0 +usb_regulator_io = "nocare" +usb_regulator_vol = 0 +usb_not_suspend = 0 + +[usbc3] +usb_used = 0 +usb_drv_vbus_gpio = +usb_restrict_gpio = +usb_host_init_state = 1 +usb_restric_flag = 0 +usb_regulator_io = "nocare" +usb_regulator_vol = 0 +usb_not_suspend = 0 + +[usb_feature] +vendor_id = 6353 +mass_storage_id = 1 +adb_id = 2 +manufacturer_name = "USB Developer" +product_name = "Android" +serial_number = "20080411" + +[msc_feature] +vendor_name = "USB 2.0" +product_name = "USB Flash Driver" +release = 100 +luns = 3 + +[serial_feature] +serial_unique = 0 + +[module_para] +module_num = 4 +module_power0 = +module_power0_vol = 0 +module_power1 = +module_power1_vol = 1 +module_power2 = +module_power2_vol = +module_power3 = +module_power3_vol = +chip_en = +lpo_use_apclk = "losc_out" + +[wifi_para] +wifi_used = 1 +wifi_sdc_id = 1 +wifi_usbc_id = +wifi_usbc_type = +wl_reg_on = port:PL07<1><0> +wl_host_wake = port:PG10<0><0> +wl_host_wake_invert = 0 + +[bt_para] +bt_used = 1 +bt_uart_id = 1 +bt_uart_baud = 1500000 +bt_rst_n = port:PG12<1><0> +bt_wake = port:PG13<1><0> +bt_host_wake = port:PG11<0><0> +bt_host_wake_invert = 0 + +[pcm0] +daudio_used = 0 +daudio_master = 4 +daudio_select = 1 +audio_format = 1 +signal_inversion = 1 +mclk_fs = 128 +sample_resolution = 16 +slot_width_select = 32 +pcm_lrck_period = 32 +pcm_lrckr_period = 1 +msb_lsb_first = 0 +sign_extend = 0 +slot_index = 0 +slot_width = 32 +frame_width = 0 +tx_data_mode = 0 +rx_data_mode = 0 +i2s_mclk = port:PA18<2><1> +i2s_bclk = port:PA19<2><1> +i2s_dout0 = port:PA20<2><1> +i2s_din = port:PA21<2><1> + +[pcm1] +daudio_used = 0 +daudio_master = 4 +daudio_select = 1 +audio_format = 1 +signal_inversion = 1 +mclk_fs = 128 +sample_resolution = 16 +slot_width_select = 32 +pcm_lrck_period = 32 +pcm_lrckr_period = 1 +msb_lsb_first = 0 +sign_extend = 0 +slot_index = 0 +slot_width = 32 +frame_width = 0 +tx_data_mode = 0 +rx_data_mode = 0 +i2s_mclk = port:PG10<2><1> +i2s_bclk = port:PG11<2><1> +i2s_dout0 = port:PG12<2><1> +i2s_din = port:PG13<2><1> + +[audio0] +audio_used = 0 +lineout_vol = 31 +cap_vol = 5 +audio_hp_ldo = "none" +adcagc_used = 0 +adcdrc_used = 0 +dacdrc_used = 0 +adchpf_used = 0 +dachpf_used = 0 +audio_pa_ctrl = port:PL01<1><0> + +[spdif0] +spdif_used = 0 +spdif_dout = port:PA17<2><1> + +[audiohub] +hub_used = 0 +codec_used = 1 +spdif_used = 1 +hdmi_used = 1 + +[s_cir0] +ir_used = 0 +ir_rx = port:PL11<2><1> +ir_power_key_code0 = 87 +ir_addr_code0 = 40704 +ir_power_key_code1 = 26 +ir_addr_code1 = 64260 +ir_power_key_code2 = 20 +ir_addr_code2 = 32640 +ir_power_key_code3 = 21 +ir_addr_code3 = 32640 +ir_power_key_code4 = 11 +ir_addr_code4 = 63240 +ir_power_key_code5 = 3 +ir_addr_code5 = 239 +ir_power_key_code6 = 159 +ir_addr_code6 = 19635 +ir_power_key_code7 = 10 +ir_addr_code7 = 30536 +ir_power_key_code8 = 69 +ir_addr_code8 = 48386 +ir_power_key_code9 = 77 +ir_addr_code9 = 56865 +ir_power_key_code10 = 24 +ir_addr_code10 = 65025 +ir_power_key_code11 = 87 +ir_addr_code11 = 65280 +ir_power_key_code12 = 77 +ir_addr_code12 = 65344 +ir_power_key_code13 = 136 +ir_addr_code13 = 56610 + +[cir] +ir_used = 0 +ir_tx = port:PH07<2> + +[dvfs_table] +pmuic_type = 1 +pmu_gpio0 = port:PL01<1><1><2><1> +pmu_level0 = 11300 +pmu_level1 = 1100 +max_freq = 1200000000 +min_freq = 240000000 +LV_count = 6 +LV1_freq = 1200000000 +LV1_volt = 1300 +LV2_freq = 1008000000 +LV2_volt = 1300 +LV3_freq = 912000000 +LV3_volt = 1100 +LV4_freq = 648000000 +LV4_volt = 1100 +LV5_freq = 480000000 +LV5_volt = 1100 +LV6_freq = 240000000 +LV6_volt = 1100 + +[gpu_dvfs_table] +G_LV_count = 3 +G_LV0_freq = 312000000 +G_LV0_volt = 1200000 +G_LV1_freq = 384000000 +G_LV1_volt = 1200000 +G_LV2_freq = 456000000 +G_LV2_volt = 1200000 + +[board_vendor] +vid_used = 0 +vid_count = 0 +vid_bit_0 = port:PD16<0><1> +vid_bit_1 = port:PD15<0><1> +vid_bit_2 = port:PD14<0><1> +vid_bit_3 = port:PD13<0><1> +vid_bit_4 = port:PD12<0><1> +vid_bit_5 = port:PD17<0><1> + +[Vdevice] +Vdevice_used = 0 +Vdevice_0 = port:PH10<5><1><2> +Vdevice_1 = port:PH11<5><1><2> + +[s_uart0] +s_uart_used = 0 +s_uart_tx = port:PL02<2> +s_uart_rx = port:PL03<2> + +[s_rsb0] +s_rsb_used = 0 +s_rsb_sck = port:PL00<2><1><2> +s_rsb_sda = port:PL01<2><1><2> + +[s_jtag0] +s_jtag_used = 0 +s_jtag_tms = port:PL04<2><1><2> +s_jtag_tck = port:PL05<2><1><2> +s_jtag_tdo = port:PL06<2><1><2> +s_jtag_tdi = port:PL07<2><1><2> + +[s_powchk] +s_powchk_used = -2147483648 +s_power_reg = 0 +s_system_power = 50 + +[sim0] +scr_used = 0 +scr_vccen = port:PA06<2> +scr_slk = port:PA07<2> +scr_sda = port:PA08<2> +scr_rst = port:PA09<2> +scr_det = port:PA10<2> + +[ts0] +tsc_used = 0 +tsc_clk = port:PE00<3> +tsc_err = port:PE01<3> +tsc_sync = port:PE02<3> +tsc_dvld = port:PE03<3> +tsc_d0 = port:PE04<3> +tsc_d1 = port:PE05<3> +tsc_d2 = port:PE06<3> +tsc_d3 = port:PE07<3> +tsc_d4 = port:PE08<3> +tsc_d5 = port:PE09<3> +tsc_d6 = port:PE10<3> +tsc_d7 = port:PE11<3> + +[gpio_power_key] +key_used = 1 +key_io = port:PL03<6><0> + +[key_para] +key_used = 0 +key_cnt = 5 +key1_vol = 222 +key2_vol = 444 +key3_vol = 666 +key4_vol = 857 +key5_vol = 2000 + +[d7s_para] +d7s_used = 0 +din_gpio = port:PD00<1><1> +clk_gpio = port:PD01<1><1> +stb_gpio = port:PD02<1><1> + +[mali_para] +mali_used = 1 +mali_clkdiv = 1 +mali_extreme_freq = 600 +mali_extreme_vol = 1400 + +[w1_para] +w1_used = 0 +gpio = 10 + +[corekeeper] +corekeeper_enabled = 1 + diff --git a/patch/kernel/sunxi-next/add-bananapi-m2-zero.patch b/patch/kernel/sunxi-next/add-bananapi-m2-zero.patch new file mode 100644 index 0000000000..4a040fb198 --- /dev/null +++ b/patch/kernel/sunxi-next/add-bananapi-m2-zero.patch @@ -0,0 +1,170 @@ +From 9270c2efc5e63e8c69338c0cf6c5128fb6808c15 Mon Sep 17 00:00:00 2001 +From: Icenowy Zheng +Date: Thu, 8 Feb 2018 18:06:13 +0800 +Subject: [PATCH] ARM: sun8i: h2+: add support for Banana Pi M2 Zero board + +Banana Pi M2 Zero board is a H2+-based board by Sinovoip, with a form +factor and GPIO holes similar to Raspberry Pi Zero. + +It features: +- Allwinner H2+ SoC +- Single-chip (16-bit) 512MiB DDR3 DRAM +- Ampak AP6212 Wi-Fi/Bluetooth module +- MicroSD slot +- Two MicroUSB Type-B ports (one can only be used to power the board and + the other features OTG functionality) +- Two keys, a reset and a GPIO-connected key. +- HDMI Type-C (miniHDMI) connector connected to the HDMI part of H2+. +- CSI connector to connect the camera sensor provided by Sinovoip. + +Signed-off-by: Icenowy Zheng +Signed-off-by: Maxime Ripard +--- + arch/arm/boot/dts/Makefile | 1 + + .../boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts | 125 +++++++++++++++++++++ + 2 files changed, 126 insertions(+) + create mode 100644 arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts + +diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile +index ade7a38543dc9..d5a17e6e8b0f4 100644 +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -917,6 +917,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ + sun8i-a83t-allwinner-h8homlet-v2.dtb \ + sun8i-a83t-bananapi-m3.dtb \ + sun8i-a83t-cubietruck-plus.dtb \ ++ sun8i-h2-plus-bananapi-m2-zero.dtb \ + sun8i-h2-plus-orangepi-zero.dtb \ + sun8i-h2-plus-nanopi-duo.dtb \ + sun8i-h2-plus-sunvell-r69.dtb \ +diff --git a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts +new file mode 100644 +index 0000000000000..1cdbd9a3ef578 +--- /dev/null ++++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts +@@ -0,0 +1,125 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright (C) 2017 Icenowy Zheng ++ * ++ * Based on sun8i-h3-bananapi-m2-plus.dts, which is: ++ * Copyright (C) 2016 Chen-Yu Tsai ++ */ ++ ++/dts-v1/; ++#include "sun8i-h3.dtsi" ++#include "sunxi-common-regulators.dtsi" ++ ++#include ++#include ++ ++/ { ++ model = "Banana Pi BPI-M2-Zero"; ++ compatible = "sinovoip,bpi-m2-zero", "allwinner,sun8i-h2-plus"; ++ ++ aliases { ++ serial0 = &uart0; ++ serial1 = &uart1; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ pinctrl-names = "default"; ++ ++ pwr_led { ++ label = "bananapi-m2-zero:red:pwr"; ++ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ ++ default-state = "on"; ++ }; ++ }; ++ ++ gpio_keys { ++ compatible = "gpio-keys"; ++ pinctrl-names = "default"; ++ ++ sw4 { ++ label = "power"; ++ linux,code = ; ++ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ wifi_pwrseq: wifi_pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ pinctrl-names = "default"; ++ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ ++ }; ++}; ++ ++&ehci0 { ++ status = "okay"; ++}; ++ ++&mmc0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>; ++ vmmc-supply = <®_vcc3v3>; ++ bus-width = <4>; ++ /* ++ * On the production batch of this board the card detect GPIO is ++ * high active (card inserted), although on the early samples it's ++ * low active. ++ */ ++ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ ++ status = "okay"; ++}; ++ ++&mmc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc1_pins_a>; ++ vmmc-supply = <®_vcc3v3>; ++ vqmmc-supply = <®_vcc3v3>; ++ mmc-pwrseq = <&wifi_pwrseq>; ++ bus-width = <4>; ++ non-removable; ++ status = "okay"; ++ ++ brcmf: wifi@1 { ++ reg = <1>; ++ compatible = "brcm,bcm4329-fmac"; ++ interrupt-parent = <&pio>; ++ interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */ ++ interrupt-names = "host-wake"; ++ }; ++}; ++ ++&ohci0 { ++ status = "okay"; ++}; ++ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins_a>; ++ status = "okay"; ++}; ++ ++&uart1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; ++ status = "okay"; ++}; ++ ++&usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ ++&usbphy { ++ usb0_id_det-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ ++ /* ++ * There're two micro-USB connectors, one is power-only and another is ++ * OTG. The Vbus of these two connectors are connected together, so ++ * the external USB device will be powered just by the power input ++ * from the power-only USB port. ++ */ ++ status = "okay"; ++}; diff --git a/patch/u-boot/u-boot-sunxi/add-bananapi-bpi-m2-zero.patch b/patch/u-boot/u-boot-sunxi/add-bananapi-bpi-m2-zero.patch new file mode 100644 index 0000000000..b43719973b --- /dev/null +++ b/patch/u-boot/u-boot-sunxi/add-bananapi-bpi-m2-zero.patch @@ -0,0 +1,190 @@ +diff -Naur v2017.11.org/arch/arm/dts/Makefile v2017.11-bpi-m2z/arch/arm/dts/Makefile +--- v2017.11.org/arch/arm/dts/Makefile 2017-12-02 18:16:32.755513258 +0800 ++++ v2017.11-bpi-m2z/arch/arm/dts/Makefile 2017-12-02 21:00:39.727635880 +0800 +@@ -318,6 +318,7 @@ + sun8i-a83t-bananapi-m3.dtb \ + sun8i-a83t-cubietruck-plus.dtb + dtb-$(CONFIG_MACH_SUN8I_H3) += \ ++ sun8i-h2-plus-bananapi-m2-zero.dts \ + sun8i-h2-plus-orangepi-zero.dtb \ + sun8i-h2-plus-nanopi-duo.dtb \ + sun8i-h3-bananapi-m2-plus.dtb \ +diff -Naur v2017.11.org/arch/arm/dts/sun8i-h2-plus-bananapi-m2-zero.dts v2017.11-bpi-m2z/arch/arm/dts/sun8i-h2-plus-bananapi-m2-zero.dts +--- v2017.11.org/arch/arm/dts/sun8i-h2-plus-bananapi-m2-zero.dts 1970-01-01 08:00:00.000000000 +0800 ++++ v2017.11-bpi-m2z/arch/arm/dts/sun8i-h2-plus-bananapi-m2-zero.dts 2017-11-23 15:57:53.000000000 +0800 +@@ -0,0 +1,154 @@ ++/* ++ * Copyright (C) 2017 Icenowy Zheng ++ * ++ * Based on sun8i-h3-bananapi-m2-plus.dts, which is: ++ * Copyright (C) 2016 Chen-Yu Tsai ++ * ++ * 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 "sun8i-h3.dtsi" ++#include "sunxi-common-regulators.dtsi" ++ ++#include ++#include ++ ++/ { ++ model = "Banana Pi BPI-M2-Zero"; ++ compatible = "sinovoip,bpi-m2-zero", "allwinner,sun8i-h2-plus"; ++ ++ aliases { ++ serial0 = &uart0; ++ serial1 = &uart1; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ pinctrl-names = "default"; ++ ++ pwr_led { ++ label = "bananapi-m2-zero:red:pwr"; ++ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ ++ default-state = "on"; ++ }; ++ }; ++ ++ gpio_keys { ++ compatible = "gpio-keys"; ++ pinctrl-names = "default"; ++ ++ sw4 { ++ label = "power"; ++ linux,code = ; ++ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ reg_sy8113b: gpio-regulator { ++ compatible = "regulator-gpio"; ++ regulator-name = "vdd-cpux"; ++ regulator-type = "voltage"; ++ regulator-boot-on; ++ regulator-always-on; ++ regulator-min-microvolt = <1100000>; ++ regulator-max-microvolt = <1300000>; ++ regulator-ramp-delay = <50>; /* 4ms */ ++ ++ gpios = <&r_pio 0 1 GPIO_ACTIVE_HIGH>; /* PL1 */ ++ enable-active-high; ++ gpios-states = <0x1>; ++ states = <1100000 0x0 ++ 1300000 0x1>; ++ }; ++ ++ wifi_pwrseq: wifi_pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ pinctrl-names = "default"; ++ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ ++ }; ++}; ++ ++&mmc0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>; ++ vmmc-supply = <®_vcc3v3>; ++ bus-width = <4>; ++ /* ++ * In different revisions the board have different card detect ++ * configuration. ++ */ ++ broken-cd; ++ status = "okay"; ++}; ++ ++&mmc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc1_pins_a>; ++ vmmc-supply = <®_vcc3v3>; ++ vqmmc-supply = <®_vcc3v3>; ++ mmc-pwrseq = <&wifi_pwrseq>; ++ bus-width = <4>; ++ non-removable; ++ status = "okay"; ++ ++ brcmf: wifi@1 { ++ reg = <1>; ++ compatible = "brcm,bcm4329-fmac"; ++ interrupt-parent = <&pio>; ++ interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */ ++ interrupt-names = "host-wake"; ++ }; ++}; ++ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins_a>; ++ status = "okay"; ++}; ++ ++&usbphy { ++ usb0_id_det-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ ++ /* USB OTG VBUS is directly connected to 5V without any regulators */ ++ status = "okay"; ++}; +diff -Naur v2017.11.org/configs/Sinovoip_BPI_M2_Zero_defconfig v2017.11-bpi-m2z/configs/Sinovoip_BPI_M2_Zero_defconfig +--- v2017.11.org/configs/Sinovoip_BPI_M2_Zero_defconfig 1970-01-01 08:00:00.000000000 +0800 ++++ v2017.11-bpi-m2z/configs/Sinovoip_BPI_M2_Zero_defconfig 2017-12-02 20:56:15.000000000 +0800 +@@ -0,0 +1,17 @@ ++CONFIG_ARM=y ++CONFIG_ARCH_SUNXI=y ++CONFIG_MACH_SUN8I_H3=y ++CONFIG_DRAM_CLK=408 ++CONFIG_DRAM_ZQ=3881979 ++CONFIG_DRAM_ODT_EN=y ++CONFIG_MMC_SUNXI_SLOT_EXTRA=-1 ++CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-bananapi-m2-zero" ++# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set ++CONFIG_SPL=y ++# CONFIG_CMD_FLASH is not set ++# CONFIG_CMD_FPGA is not set ++# CONFIG_SPL_DOS_PARTITION is not set ++# CONFIG_SPL_ISO_PARTITION is not set ++# CONFIG_SPL_EFI_PARTITION is not set ++CONFIG_SUN8I_EMAC=y ++CONFIG_USB_EHCI_HCD=y diff --git a/patch/u-boot/u-boot-sunxi/fix-sdcard-detect-bpi-m2z.patch b/patch/u-boot/u-boot-sunxi/fix-sdcard-detect-bpi-m2z.patch new file mode 100644 index 0000000000..0ae27d8d7e --- /dev/null +++ b/patch/u-boot/u-boot-sunxi/fix-sdcard-detect-bpi-m2z.patch @@ -0,0 +1,16 @@ +diff -Naur v2017.09/drivers/mmc/sunxi_mmc.c v2017.09-bpi-m2z/drivers/mmc/sunxi_mmc.c +--- v2017.09/drivers/mmc/sunxi_mmc.c 2017-09-19 08:15:12.948794321 +0800 ++++ v2017.09-bpi-m2z/drivers/mmc/sunxi_mmc.c 2017-11-08 09:21:20.000000000 +0800 +@@ -465,7 +465,12 @@ + if (cd_pin < 0) + return 1; + ++#ifdef BPI + return !gpio_get_value(cd_pin); ++#else ++ printf("BPI: skip sunxi_mmc_getcd pin %d(%d)\n",cd_pin, gpio_get_value(cd_pin)); ++ return 1; ++#endif + } + + static const struct mmc_ops sunxi_mmc_ops = {