Nikos Andreadakis 0 Posted February 7, 2020 Share Posted February 7, 2020 Dear all, I recently perched a SINA33 from SINLINX after a week of test i download the Armbian source code that is very interesting and started to create an Armbian image for this board. I created a csc file to start the building. Spoiler The csc file code: # A33 quad core 1Gb SoC BOARD_NAME="Sina33" BOARDFAMILY="sun8i" BOOTCONFIG="Sinlinx_SinA33_defconfig" MODULES="hci_uart gpio_sunxi rfcomm hidp bonding spi_sun7i 8021q a20_tp" MODULES_NEXT="brcmfmac" OVERLAY_PREFIX="sun8i-a33" KERNEL_TARGET="default,next,dev" The compile is done and the image is created. I flash the image with the mainline kernel and worked. If there is any interesting on this topic i will create another with the more details. Now the problem is that i can't port the AP6210 wifi module that this board came with. Here is the dts file sun8i-a33-sinlinx-sina33.dts with the wifi modifications Spoiler /* * Copyright 2015 Chen-Yu Tsai * * Chen-Yu Tsai <wens@csie.org> * * 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-a33.dtsi" #include "sunxi-common-regulators.dtsi" #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/input/input.h> / { model = "Sinlinx SinA33"; compatible = "sinlinx,sina33", "allwinner,sun8i-a33"; aliases { serial0 = &uart3; }; chosen { stdout-path = "serial0:115200n8"; }; panel { compatible = "netron-dy,e231732"; #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; #address-cells = <1>; #size-cells = <0>; panel_input: endpoint@0 { reg = <0>; remote-endpoint = <&tcon0_out_panel>; }; }; }; wifi_pwrseq: wifi_pwrseq { compatible = "mmc-pwrseq-simple"; pinctrl-names = "default"; reset-gpios = <&r_pio 0 6 GPIO_ACTIVE_LOW>; /* PL6 or GPIO-358 */ clocks = <&rtc 1>; clock-names = "ext_clock"; }; }; &codec { status = "okay"; }; &cpu0 { cpu-supply = <®_dcdc3>; }; &cpu0_opp_table { opp-1104000000 { opp-hz = /bits/ 64 <1104000000>; opp-microvolt = <1320000>; clock-latency-ns = <244144>; /* 8 32k periods */ }; opp-1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <1320000>; clock-latency-ns = <244144>; /* 8 32k periods */ }; }; &de { status = "okay"; }; &dai { status = "okay"; }; &ehci0 { status = "okay"; }; &lradc { vref-supply = <®_dcdc1>; status = "okay"; button@200 { label = "Volume Up"; linux,code = <KEY_VOLUMEUP>; channel = <0>; voltage = <191011>; }; button@400 { label = "Volume Down"; linux,code = <KEY_VOLUMEDOWN>; channel = <0>; voltage = <391304>; }; button@600 { label = "Home"; linux,code = <KEY_HOME>; channel = <0>; voltage = <600000>; }; }; &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina33>; vmmc-supply = <®_dcdc1>; bus-width = <4>; cd-gpios = <&pio 1 4 GPIO_ACTIVE_LOW>; /* PB4 */ status = "okay"; }; &mmc1 { /*vmmc-supply = <®_vcc3v3>; vqmmc-supply = <®_vcc3v3>; pinctrl-0 = <&mmc1_pins_a>; mmc-pwrseq = <&wifi_pwrseq>; bus-width = <4>; non-removable; status = "okay"; */ pinctrl-names = "default"; pinctrl-0 = <&mmc1_pins_a>; vmmc-supply = <®_dcdc1>; vqmmc-supply = <®_dcdc1>; mmc-pwrseq = <&wifi_pwrseq>; bus-width = <4>; non-removable; status = "okay"; brcmf: wifi@1 { reg = <1>; compatible = "brcm,bcm4329-fmac"; /*interrupt-parent = <&r_pio>; interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; PL7 or GPIO-359 EINT7 interrupt-names = "host-wake"; */ }; }; &mmc1_pins_a { /* AP6210 requires pull-up */ bias-pull-up; }; &mmc2 { pinctrl-names = "default"; pinctrl-0 = <&mmc2_8bit_pins>; vmmc-supply = <®_dcdc1>; bus-width = <4>; non-removable; cap-mmc-hw-reset; status = "okay"; }; &mmc2_8bit_pins { /* Increase drive strength for DDR modes */ drive-strength = <40>; /* eMMC is missing pull-ups */ bias-pull-up; }; &ohci0 { status = "okay"; }; &pio { mmc0_cd_pin_sina33: mmc0_cd_pin@0 { pins = "PB4"; function = "gpio_in"; bias-pull-up; }; }; &r_rsb { status = "okay"; axp22x: pmic@3a3 { compatible = "x-powers,axp223"; reg = <0x3a3>; interrupt-parent = <&nmi_intc>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>; eldoin-supply = <®_dcdc1>; }; }; #include "axp223.dtsi" &ac_power_supply { status = "okay"; }; &battery_power_supply { status = "okay"; }; ®_aldo1 { regulator-always-on; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; regulator-name = "vcc-io"; }; ®_aldo2 { regulator-always-on; regulator-min-microvolt = <2350000>; regulator-max-microvolt = <2650000>; regulator-name = "vdd-dll"; }; ®_aldo3 { regulator-always-on; regulator-min-microvolt = <2700000>; regulator-max-microvolt = <3300000>; regulator-name = "vcc-pll-avcc"; }; ®_dc5ldo { regulator-always-on; regulator-min-microvolt = <900000>; regulator-max-microvolt = <1400000>; regulator-name = "vdd-cpus"; }; ®_dcdc1 { regulator-always-on; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; regulator-name = "vcc-3v0"; }; ®_dcdc2 { regulator-always-on; regulator-min-microvolt = <900000>; regulator-max-microvolt = <1400000>; regulator-name = "vdd-sys"; }; ®_dcdc3 { regulator-always-on; regulator-min-microvolt = <900000>; regulator-max-microvolt = <1400000>; regulator-name = "vdd-cpu"; }; ®_dcdc5 { regulator-always-on; regulator-min-microvolt = <1500000>; regulator-max-microvolt = <1500000>; regulator-name = "vcc-dram"; }; ®_rtc_ldo { regulator-name = "vcc-rtc"; }; &sound { status = "okay"; }; &tcon0 { pinctrl-names = "default"; pinctrl-0 = <&lcd_rgb666_pins>; status = "okay"; }; &tcon0_out { tcon0_out_panel: endpoint@0 { reg = <0>; remote-endpoint = <&panel_input>; }; }; /* &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_b>; status = "okay"; }; */ &uart3 { pinctrl-names = "default"; pinctrl-0 = <&uart3_pins_b>; status = "okay"; }; &usb_otg { dr_mode = "peripheral"; status = "okay"; }; &usbphy { status = "okay"; usb1_vbus-supply = <®_vcc5v0>; /* USB1 VBUS is always on */ }; /*&wifi_pwrseq { clocks = <&rtc 1>; clock-names = "ext_clock"; };*/ I'm not sure about the clock on dts file clocks = <&rtc 1>; clock-names = "ext_clock"; the error that i take root@sinlinx:~# dmesg | grep brcm [ 5.750408] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43362-sdio for chip BCM43362/1 [ 6.822224] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 7.826234] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 also this dmesg | grep 1c10000.mmc [ 2.162351] sunxi-mmc 1c10000.mmc: Linked as a consumer to regulator.4 [ 2.664498] sunxi-mmc 1c10000.mmc: allocated mmc-pwrseq [ 2.690138] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB root@sinlinx:/lib/firmware/brcm# lsmod Module Size Used by brcmfmac 159744 1 fuse 73728 3 zstd 16384 4 zram 24576 2 snd_soc_simple_card 16384 2 snd_soc_simple_card_utils 16384 1 snd_soc_simple_card cdc_ether 16384 0 usbnet 24576 1 cdc_ether evdev 20480 3 r8152 49152 0 axp20x_battery 16384 0 axp20x_usb_power 16384 0 axp20x_adc 16384 0 sun8i_codec_analog 24576 1 lima 40960 0 sun8i_adda_pr_regmap 16384 1 sun8i_codec_analog gpu_sched 20480 1 lima sun8i_codec 20480 1 sun4i_i2s 20480 2 ttm 57344 1 lima snd_soc_core 114688 5 sun4i_i2s,sun8i_codec_analog,sun8i_codec,snd_soc_simple_card_utils,snd_soc_simple_card snd_pcm_dmaengine 16384 1 snd_soc_core sun4i_gpadc_iio 16384 0 snd_pcm 69632 4 sun4i_i2s,snd_pcm_dmaengine,sun8i_codec,snd_soc_core snd_timer 24576 1 snd_pcm industrialio 49152 4 axp20x_usb_power,axp20x_battery,sun4i_gpadc_iio,axp20x_adc snd 45056 7 snd_timer,snd_soc_core,snd_pcm soundcore 16384 1 snd sun4i_lradc_keys 16384 0 sun4i_ss 24576 0 cpufreq_dt 16384 0 panel_simple 53248 0 uio_pdrv_genirq 16384 0 uio 16384 1 uio_pdrv_genirq thermal_sys 57344 2 cpufreq_dt,sun4i_gpadc_iio sch_fq_codel 20480 2 brcmutil 16384 1 brcmfmac cfg80211 393216 1 brcmfmac ip_tables 20480 0 x_tables 20480 1 ip_tables uas 20480 0 pwrseq_simple 16384 1 Using a oscilloscope i saw that the clock at SDIO_DATA_CLK of the module is at 50Mhz and that correct. The blob exist in the /lib/firmware/brcm Spoiler root@sinlinx:/lib/firmware/brcm# ls BCM4330B1.hcd brcmfmac43430-sdio.bin BCM4345C5.hcd brcmfmac43430-sdio.txt bcm4329.hcd brcmfmac43430a0-sdio.bin bcm4330.hcd brcmfmac43430a0-sdio.txt bcm43438-sdio.hcd brcmfmac43455-sdio.bin brcmfmac-ap6330-sdio.bin brcmfmac43455-sdio.clm_blob brcmfmac-ap6330-sdio.txt brcmfmac43455-sdio.txt brcmfmac4329-sdio.bin brcmfmac43456-sdio.bin brcmfmac4329-sdio.txt brcmfmac43456-sdio.txt brcmfmac4330-sdio.bin brcmfmac4356-sdio-nanopi-m4v2.bin brcmfmac4330-sdio.txt brcmfmac4356-sdio-nanopi-m4v2.txt brcmfmac43362-sdio.bin brcmfmac4356-sdio.bin brcmfmac43362-sdio.txt brcmfmac4356-sdio.txt brcmfmac4339-sdio.1CK.txt brcmfmac4359-sdio.bin brcmfmac4339-sdio.ZP.txt brcmfmac4359-sdio.txt brcmfmac4339-sdio.bin config.txt brcmfmac4339-sdio.txt Attached phones from Inside the AP6210 module Any ideas are thought are really appreciated. 0 Quote Link to post Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.