diff --git a/config/linux-sun8i-default.config b/config/linux-sun8i-default.config index 8a35d3deff..0c88eb0fef 100644 --- a/config/linux-sun8i-default.config +++ b/config/linux-sun8i-default.config @@ -1748,7 +1748,9 @@ CONFIG_GPIOLIB=y # MODULbus GPIO expanders: # CONFIG_GPIO_SUNXI=m -CONFIG_W1=m +CONFIG_W1=y +CONFIG_W1_CON=y +CONFIG_W1_SUNXI=y # # 1-wire Bus Masters @@ -1756,12 +1758,12 @@ CONFIG_W1=m # CONFIG_W1_MASTER_DS2490 is not set # CONFIG_W1_MASTER_DS2482 is not set # CONFIG_W1_MASTER_DS1WM is not set -CONFIG_W1_MASTER_GPIO=m +CONFIG_W1_MASTER_GPIO=y # # 1-wire Slaves # -CONFIG_W1_SLAVE_THERM=m +CONFIG_W1_SLAVE_THERM=y # CONFIG_W1_SLAVE_SMEM is not set # CONFIG_W1_SLAVE_DS2408 is not set # CONFIG_W1_SLAVE_DS2423 is not set @@ -1771,7 +1773,7 @@ CONFIG_W1_SLAVE_THERM=m # CONFIG_W1_SLAVE_DS2780 is not set # CONFIG_W1_SLAVE_DS2781 is not set # CONFIG_W1_SLAVE_BQ27000 is not set -# CONFIG_POWER_SUPPLY is not set +CONFIG_POWER_SUPPLY=y CONFIG_HWMON=y # CONFIG_HWMON_VID is not set # CONFIG_HWMON_DEBUG_CHIP is not set diff --git a/config/orangepi2.fex b/config/orangepi2.fex index e46dc9589a..602cc58f4e 100644 --- a/config/orangepi2.fex +++ b/config/orangepi2.fex @@ -1,5 +1,3 @@ -;H3 dolphin-p1 board application -;H3 dolphin-p1 board application ;--------------------------------------------------------------------------------------------------------- ; 说明: 脚本中的字符串区分大小写,用户可以修改"="后面的数值,但是不要修改前面的字符串 ; 描述gpio的形式:Port:端口+组内序号<功能分配><内部电阻状态><驱动能力><输出电平状态> @@ -7,7 +5,7 @@ [product] version = "100" -machine = "orangepi-plus" +machine = "orangepi-2" ;--------------------------------------------------------------------------------------------------------- ; eraseflag - 1 erase data partition, 0 - do not erase data partition @@ -1250,3 +1248,10 @@ d7s_used = 0 din_gpio = port:PD00<1><1> clk_gpio = port:PD01<1><1> stb_gpio = port:PD02<1><1> + +;---------------------------------------------------------------------------------- +;1wire parameters (default - PA20) +;---------------------------------------------------------------------------------- +[w1_para] +w1_used = 1 +gpio = 20 diff --git a/config/orangepilite.fex b/config/orangepilite.fex new file mode 100644 index 0000000000..d70eeb1677 --- /dev/null +++ b/config/orangepilite.fex @@ -0,0 +1,825 @@ +[product] +version = "100" +machine = "orangepi-lite" + +[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:PA15<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:PA15<1><1> +gpio1 = port:PG11<1><1> + +[recovery_para] +used = 1 +mode = 2 +recovery_key = port:PL04<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 = 672 +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 = 0x0 +dram_tpr8 = 0x0 +dram_tpr9 = 0x0 +dram_tpr10 = 0x0 +dram_tpr11 = 0x6aaa0000 +dram_tpr12 = 0x7979 +dram_tpr13 = 0x800800 + +[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> + +[twi0] +twi_used = 1 +twi_scl = port:PA11<2> +twi_sda = port:PA12<2> + +[twi1] +twi_used = 0 +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 = 0 +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 = 0 +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 = 0 +uart_port = 3 +uart_type = 4 +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 = 0 +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 = "m25p32" +max_speed_hz = 33000000 +bus_num = 0 +chip_select = 0 +mode = 0 + +[gpio_para] +gpio_used = 1 +gpio_num = 30 +; gpio_pin_1 = port:PL10<1><1> +; gpio_pin_2 = port:PA15<1><0> +gpio_pin_3 = port:PA12<1><0> +gpio_pin_4 = port:PA11<1><0> +gpio_pin_5 = port:PA06<1><0> +gpio_pin_6 = port:PA13<1><0> +gpio_pin_7 = port:PA14<1><0> +gpio_pin_8 = port:PA01<1><0> +gpio_pin_9 = port:PD14<1><0> +gpio_pin_10 = port:PA00<1><0> +gpio_pin_11 = port:PA03<1><0> +gpio_pin_12 = port:PC04<1><0> +gpio_pin_13 = port:PC07<1><0> +gpio_pin_14 = port:PC00<1><0> +gpio_pin_15 = port:PC01<1><0> +gpio_pin_16 = port:PA02<1><0> +gpio_pin_17 = port:PC02<1><0> +gpio_pin_18 = port:PC03<1><0> +gpio_pin_19 = port:PA21<1><0> +gpio_pin_20 = port:PA19<1><0> +gpio_pin_21 = port:PA18<1><0> +gpio_pin_22 = port:PA07<1><0> +gpio_pin_23 = port:PA08<1><0> +gpio_pin_24 = port:PG08<1><0> +gpio_pin_25 = port:PA09<1><0> +gpio_pin_26 = port:PA10<1><0> +gpio_pin_27 = port:PG09<1><0> +gpio_pin_28 = port:PA20<1><0> +gpio_pin_29 = port:PG06<1><0> +gpio_pin_30 = port:PG07<1><0> + +;[led_assign] +;normal_led = "gpio_pin_2" +;standby_led = "gpio_pin_1" + +[leds_para] +leds_used = 1 +green_led = port:PL10<1><0> +green_led_active_low = 0 +red_led = port:PA15<1><0> +red_led_active_low = 0 + +[ths_para] +ths_used = 1 +ths_trip1_count = 6 +ths_trip1_0 = 70 +ths_trip1_1 = 80 +ths_trip1_2 = 85 +ths_trip1_3 = 90 +ths_trip1_4 = 95 +ths_trip1_5 = 100 +ths_trip1_6 = 0 +ths_trip1_7 = 0 +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 = 5 +ths_trip1_5_min = 5 +ths_trip1_5_max = 5 +ths_trip1_6_min = 0 +ths_trip1_6_max = 0 +ths_trip2_count = 1 +ths_trip2_0 = 105 + +[cooler_table] +cooler_count = 4 +cooler0 = "1200000 4 4294967295 0" +cooler1 = "1008000 4 4294967295 0" +cooler2 = "816000 4 4294967295 0" +cooler3 = "648000 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 = 4 +screen1_output_type = 3 +screen1_output_mode = 4 +fb0_format = 0 +fb0_width = 0 +fb0_height = 0 +fb1_format = 0 +fb1_width = 0 +fb1_height = 0 + +[hdmi_para] +hdmi_used = 1 +hdmi_power = "vcc-hdmi-18" + +[tv_para] +tv_used = 1 +tv_dac_used = 1 +tv_dac_src0 = 0 + +[pwm0_para] +pwm_used = 0 +pwm_positive = port:PA05<3><0> +; If set gamc_phy to use = 2 + +[gmac0] +gmac_used = 2 +gmac_power1 = + +[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 = "gc2035" +vip_dev0_pos = "front" +vip_dev0_lane = 1 +vip_dev0_twi_id = 2 +vip_dev0_twi_addr = 120 +vip_dev0_isp_used = 0 +vip_dev0_fmt = 0 +vip_dev0_stby_mode = 0 +vip_dev0_vflip = 1 +vip_dev0_hflip = 1 +vip_dev0_iovdd = "" +vip_dev0_iovdd_vol = 2800000 +vip_dev0_avdd = "" +vip_dev0_avdd_vol = 2800000 +vip_dev0_dvdd = "" +vip_dev0_dvdd_vol = 1800000 +vip_dev0_afvdd = "" +vip_dev0_afvdd_vol = 2800000 +vip_dev0_power_en = port:PA17<1><1> +vip_dev0_reset = port:PE14<1><1> +vip_dev0_pwdn = port:PE15<1><0> +vip_dev0_flash_en = +vip_dev0_flash_mode = +vip_dev0_af_pwdn = +vip_dev0_act_used = 0 +vip_dev0_act_name = "ad5820_act" +vip_dev0_act_slave = 24 +vip_dev1_mname = "" +vip_dev1_pos = "rear" +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 = +tvout_channel_num = +tv_en = + +[tvin_para] +tvin_used = +tvin_channel_num = + +[di_para] +di_used = 1 + +[mmc0_para] +sdc_used = 1 +sdc_detmode = 1 +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 = +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:PG12<0><1> +usb_det_vbus_gpio = port:PG12<0><1> +usb_drv_vbus_gpio = port:PL02<1><0><0> +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 = 1 +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 = 1 +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 = 7 +module_power0 = "vcc-wifi-33" +module_power0_vol = 0 +module_power1 = +module_power1_vol = +module_power2 = +module_power2_vol = +module_power3 = +module_power3_vol = +chip_en = +lpo_use_apclk = + +[wifi_para] +wifi_used = 1 +wifi_sdc_id = 1 +wifi_usbc_id = 2 +wifi_usbc_type = 1 +wl_reg_on = port:PL07<1><0> +wl_host_wake = port:PG10<0><0> +wl_host_wake_invert = 0 + +[bt_para] +bt_used = 0 +bt_uart_id = 1 +bt_rst_n = +bt_wake = +bt_host_wake = +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 = 1 +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:PA16<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 + +[cir] +ir_used = 1 +ir_tx = port:PH07<2> + +;---------------------------------------------------------------------------------- +; dvfs voltage-frequency table configuration +; +; pmuic_type:0:none, 1:gpio, 2:i2c +; pmu_gpio0: gpio config. +; pmu_levelx: 0~9999: voltage(mV), 10000~90000:gpio0 state. voltage form high to low. +; +; extremity_freq(Hz): cpu extremity frequency when run benckmark or demo apk +; 1536MHz@1500mV with radiator, 1296MHz@1340mV without radiator +; max_freq: cpu maximum frequency, based on Hz, can not be more than 1200MHz +; min_freq: cpu minimum frequency, based on Hz, can not be less than 60MHz +; +; LV_count: count of LV_freq/LV_volt, must be < 16 +; +; LV1: core vdd is 1.50v if cpu frequency is (1296Mhz, 1536Mhz] +; LV2: core vdd is 1.34v if cpu frequency is (1200Mhz, 1296Mhz] +; LV3: core vdd is 1.32v if cpu frequency is (1008Mhz, 1200Mhz] +; LV4: core vdd is 1.20v if cpu frequency is (816Mhz, 1008Mhz] +; LV5: core vdd is 1.10v if cpu frequency is (648Mhz, 816Mhz] +; LV6: core vdd is 1.04v if cpu frequency is (0Mhz, 648Mhz] +; LV7: core vdd is 1.04v if cpu frequency is (0Mhz, 648Mhz] +; LV8: core vdd is 1.04v if cpu frequency is (0Mhz, 648Mhz] +; +;---------------------------------------------------------------------------------- +[dvfs_table] +pmuic_type = 1 +pmu_gpio0 = port:PL06<1><1><2><1> +pmu_level0 = 11300 +pmu_level1 = 1100 +;extremity_freq = 1296000000 +max_freq = 1200000000 +min_freq = 648000000 +LV_count = 2 +LV1_freq = 1200000000 +LV1_volt = 1300 +LV2_freq = 648000000 +LV2_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 + +[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 = 1 +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> + diff --git a/config/orangepione.fex b/config/orangepione.fex index 191c375f2d..418191131c 100644 --- a/config/orangepione.fex +++ b/config/orangepione.fex @@ -823,3 +823,9 @@ din_gpio = port:PD00<1><1> clk_gpio = port:PD01<1><1> stb_gpio = port:PD02<1><1> +;---------------------------------------------------------------------------------- +;1wire parameters (default - PA20) +;---------------------------------------------------------------------------------- +[w1_para] +w1_used = 1 +gpio = 20 diff --git a/config/orangepipc.fex b/config/orangepipc.fex index d4226d9f26..3c44c54597 100644 --- a/config/orangepipc.fex +++ b/config/orangepipc.fex @@ -835,3 +835,9 @@ din_gpio = port:PD00<1><1> clk_gpio = port:PD01<1><1> stb_gpio = port:PD02<1><1> +;---------------------------------------------------------------------------------- +;1wire parameters (default - PA20) +;---------------------------------------------------------------------------------- +[w1_para] +w1_used = 1 +gpio = 20 diff --git a/configuration.sh b/configuration.sh index 38fd164a3e..e50ded3d72 100644 --- a/configuration.sh +++ b/configuration.sh @@ -222,6 +222,17 @@ GOVERNOR="interactive" ;; + orangepi2)#enabled + #description H3 quad core 1Gb SoC Wifi USB hub + #build 3wip + LINUXFAMILY="sun8i" + BOOTCONFIG="orangepi_pc_defconfig" + MODULES="8189es" + MODULES_NEXT="" + CPUMIN="480000" + CPUMAX="1296000" + GOVERNOR="interactive" + orangepipc)#enabled #description H3 quad core 1Gb SoC #build 3wip @@ -246,6 +257,18 @@ GOVERNOR="interactive" ;; + orangepilite)#enabled + #description H3 quad core 512Mb SoC Wifi + #build 3wip + LINUXFAMILY="sun8i" + BOOTCONFIG="orangepi_pc_defconfig" + MODULES="8189es" + MODULES_NEXT="" + CPUMIN="648000" + CPUMAX="1200000" + GOVERNOR="interactive" + ;; + cubox-i)#enabled #description Freescale iMx dual/quad core Wifi #build 6 diff --git a/patch/kernel/sun8i-default/w1_h3.patch b/patch/kernel/sun8i-default/w1_h3.patch new file mode 100644 index 0000000000..f51bd9ac28 --- /dev/null +++ b/patch/kernel/sun8i-default/w1_h3.patch @@ -0,0 +1,139 @@ +diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile +index e0e33c7..5232b7d 100644 +--- a/drivers/gpio/Makefile ++++ b/drivers/gpio/Makefile +@@ -64,4 +64,4 @@ obj-$(CONFIG_GPIO_WM831X) += gpio-wm831x.o + obj-$(CONFIG_GPIO_WM8350) += gpio-wm8350.o + obj-$(CONFIG_GPIO_WM8994) += gpio-wm8994.o + obj-$(CONFIG_GPIO_XILINX) += gpio-xilinx.o +-obj-$(CONFIG_GPIO_SUNXI) += gpio-sunxi.o ++obj-$(CONFIG_GPIO_SUNXI) += gpio-sunxi.o +diff --git a/drivers/w1/Kconfig b/drivers/w1/Kconfig +index fd2c7bd..cc8a62b 100644 +--- a/drivers/w1/Kconfig ++++ b/drivers/w1/Kconfig +@@ -25,6 +25,33 @@ config W1_CON + 2. Userspace commands. Includes read/write and search/alarm search commands. + 3. Replies to userspace commands. + ++config W1_SUNXI ++ depends on GPIO_SUNXI ++ tristate "1-wire sunxi support" ++ default n ++ --- help --- ++ This adds a way to register a platform device for 1-wire bus. ++ It introduces a new section "[w1_para]" in the FEX to configure the ++ GPIO pin number used for the bus, with the attribute named "gpio". ++ The GPIO pin must also be defined in the "[gpio_para]" section. ++ ++ 1-wire device can then be accessed using the w1-gpio driver. ++ ++ Example configuration : ++ [w1_para] ++ gpio = 3 ++ ++ [gpio_para] ++ gpio_used = 1 ++ gpio_num = 3 ++ ... ++ gpio_pin_3 = port:PH7<0><0> ++ ++ It is also possible to configure the GPIO pin number with the ++ module paramerer "gpio". In this case, if the pin is valid, ++ it will be used instead of what is configured in the FEX script. ++ ++ + source drivers/w1/masters/Kconfig + source drivers/w1/slaves/Kconfig + +diff --git a/drivers/w1/Makefile b/drivers/w1/Makefile +index 6bb0b54..a0be53c 100644 +--- a/drivers/w1/Makefile ++++ b/drivers/w1/Makefile +@@ -3,6 +3,7 @@ + # + + obj-$(CONFIG_W1) += wire.o ++obj-$(CONFIG_W1_SUNXI) += w1_sunxi.o + wire-objs := w1.o w1_int.o w1_family.o w1_netlink.o w1_io.o + + obj-y += masters/ slaves/ +new file mode 100644 +index 0000000..de24f06 +--- /dev/null ++++ b/drivers/w1/w1_sunxi.c +@@ -0,0 +1,48 @@ ++#include + +#include + +#include + +#include + +#include + +#include + +#include + + + +static int gpio = -1; + +module_param(gpio, int, 0444); + +MODULE_PARM_DESC(gpio, "w1 gpio pin number"); + + + +static struct w1_gpio_platform_data w1_gpio_pdata = { + + .pin = -1, + + .is_open_drain = 0, + +}; + + + +static void w1_gpio_release(struct device *dev) + +{ + + printk("w1_gpio_release good !\n"); + +} + + + +static struct platform_device w1_device = { + + .name = "w1-gpio", + + .id = -1, + + .dev = { + + .platform_data = &w1_gpio_pdata, + + .release = w1_gpio_release, + + } + +}; + + + +static int __init w1_sunxi_init(void) + +{ + + int ret; + + script_item_u val; + + script_item_value_type_e type; + + + + w1_gpio_pdata.pin = gpio; + + + + if (!gpio_is_valid(w1_gpio_pdata.pin)) { + + + + val.val = gpio; + + type = script_get_item("w1_para", "gpio", &val); + + if(SCIRPT_ITEM_VALUE_TYPE_INT != type) { + + printk(KERN_ERR "W1_SUNXI: invalid gpio pin in fex configuration\n"); + + return -EINVAL; + + } + + w1_gpio_pdata.pin = val.val; + + if (!gpio_is_valid(w1_gpio_pdata.pin)) { + + printk(KERN_ERR "W1_SUNXI: invalid gpio pin in fex configuration %d\n", val.val); + + return -EINVAL; + + } + + } + + ret = platform_device_register(&w1_device); + + if (ret) { + + printk(KERN_ERR "W1_SUNXI: error registering w1-gpio device on GPIO-%d\n", w1_gpio_pdata.pin); + + return ret; + + } + + printk(KERN_INFO "W1_SUNXI: Added w1-gpio on GPIO-%d\n", w1_gpio_pdata.pin); + + gpio_free(w1_gpio_pdata.pin); + + return 0; + +} + + + +static void __exit w1_sunxi_exit(void) + +{ + + platform_device_unregister(&w1_device); + +} + + + +module_init(w1_sunxi_init); + +module_exit(w1_sunxi_exit); + + + +MODULE_DESCRIPTION("GPIO w1 sunxi platform device"); + +MODULE_AUTHOR("Damien Nicolet mod by LoBo