jts

Members
  • Content Count

    6
  • Joined

  • Last visited

About jts

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi all, I applied aptches to the dts file and finally USB worked. Kernel version 4.12.12. These patches enable both wifi and USB. I copied wifi patch from other sources. But for USB, I had to to patch sunxi-h3-h5.dtsi or USB wouldn't work. Is it worth applying this patch to the mainline kernel? The source I worked on : https://github.com/torvalds/linux/tree/v4.12 Here are the patches: --- linux-4.12/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts 2017-07-03 01:07:02.000000000 +0200 +++ /home/nuvo/air-kernel/linux-4.12/linux-4.12.12/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts 2018-01-05 11:13:26.083622528 +0100 @@ -45,7 +45,7 @@ #include "sunxi-common-regulators.dtsi" #include <dt-bindings/gpio/gpio.h> - +#include <dt-bindings/pinctrl/sun4i-a10.h> / { model = "FriendlyARM NanoPi NEO Air"; compatible = "friendlyarm,nanopi-neo-air", "allwinner,sun8i-h3"; @@ -72,6 +72,16 @@ gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */ }; }; + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_en_nanopi_neo_air>; + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ + }; +}; + +&ehci3 { + status = "okay"; }; &mmc0 { @@ -84,13 +94,61 @@ status = "okay"; }; +&ohci3 { + status = "okay"; +}; + +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins_a>; + vmmc-supply = <&reg_vcc3v3>; + vqmmc-supply = <&reg_vcc3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; + + brcmf: bcrmf@1 { + reg = <1>; + compatible = "brcm,brcmfmac"; + interrupt-parent = <&pio>; + interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */ + interrupt-names = "host-wake"; + }; +}; + +&mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_8bit_pins>; + vmmc-supply = <&reg_vcc3v3>; + vqmmc-supply = <&reg_vcc3v3>; + bus-width = <8>; + non-removable; + status = "okay"; +}; + +&r_pio { + wifi_en_nanopi_neo_air: wifi_en_pin { + allwinner,pins = "PL7"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_a>; status = "okay"; }; +/*&usb_otg { + dr_mode = "otg"; + status = "okay"; +}; +*/ &usbphy { /* USB VBUS is always on */ status = "okay"; }; + and --- linux-4.12/arch/arm/boot/dts/sunxi-h3-h5.dtsi 2017-07-03 01:07:02.000000000 +0200 +++ /home/nuvo/air-kernel/linux-4.12/linux-4.12.12/arch/arm/boot/dts/sunxi-h3-h5.dtsi 2018-01-05 11:30:32.891423644 +0100 @@ -176,7 +176,7 @@ interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; clocks = <&ccu CLK_BUS_EHCI0>, <&ccu CLK_BUS_OHCI0>; resets = <&ccu RST_BUS_EHCI0>, <&ccu RST_BUS_OHCI0>; - status = "disabled"; + status = "okay"; }; ohci0: usb@01c1a400 { @@ -186,7 +186,7 @@ clocks = <&ccu CLK_BUS_EHCI0>, <&ccu CLK_BUS_OHCI0>, <&ccu CLK_USB_OHCI0>; resets = <&ccu RST_BUS_EHCI0>, <&ccu RST_BUS_OHCI0>; - status = "disabled"; + status = "okay"; }; ehci1: usb@01c1b000 { @@ -197,7 +197,7 @@ resets = <&ccu RST_BUS_EHCI1>, <&ccu RST_BUS_OHCI1>; phys = <&usbphy 1>; phy-names = "usb"; - status = "disabled"; + status = "okay"; }; ohci1: usb@01c1b400 { @@ -209,7 +209,7 @@ resets = <&ccu RST_BUS_EHCI1>, <&ccu RST_BUS_OHCI1>; phys = <&usbphy 1>; phy-names = "usb"; - status = "disabled"; + status = "okay"; }; ehci2: usb@01c1c000 { @@ -220,7 +220,8 @@ resets = <&ccu RST_BUS_EHCI2>, <&ccu RST_BUS_OHCI2>; phys = <&usbphy 2>; phy-names = "usb"; - status = "disabled"; + status = "okay"; + }; ohci2: usb@01c1c400 { @@ -232,7 +233,7 @@ resets = <&ccu RST_BUS_EHCI2>, <&ccu RST_BUS_OHCI2>; phys = <&usbphy 2>; phy-names = "usb"; - status = "disabled"; + status = "okay"; }; ehci3: usb@01c1d000 { @@ -243,7 +244,7 @@ resets = <&ccu RST_BUS_EHCI3>, <&ccu RST_BUS_OHCI3>; phys = <&usbphy 3>; phy-names = "usb"; - status = "disabled"; + status = "okay"; }; ohci3: usb@01c1d400 { @@ -255,7 +256,7 @@ resets = <&ccu RST_BUS_EHCI3>, <&ccu RST_BUS_OHCI3>; phys = <&usbphy 3>; phy-names = "usb"; - status = "disabled"; + status = "okay"; }; ccu: clock@01c20000 {
  2. I am trying to enable USB on Nanopi-neo-air in mainline kernel. Followed these links to do that. But any device on USB port is not recognized at all. http://linux-sunxi.org/USB_Gadget/Ethernet http://linux-sunxi.org/USB_Gadget/Mass_storage Any clue, what's missing? Thank you.
  3. Wi-fi worked after I copied the firmware file from the legacy kernel to the mainline kernel and renamed it to brcmfmac43430-sdio.bin Please do let me know if there is a better solution. Thank you.
  4. Does Nanopi-Neo-air fall under the category of non-working boards, when firmware is manually copied?
  5. Hi all, I am trying get wifi working on Nanopi neo air with the Mainline kernel v4.12.12. I enabled brcmfmac driver in the kernel. Downloaded the corresponding firmware(brcmfmac43430-sdio.bin) for AP6212 from : https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/brcm. I have applied patch to the device tree to enable wifi (https://www.spinics.net/lists/arm-kernel/msg563666.html) I couldn't get the firmware loaded properly. Here's the log. [ 85.922929] brcmfmac: brcmf_attach Enter [ 85.922967] brcmfmac: brcmf_proto_attach Enter [ 85.922990] brcmfmac: brcmf_fweh_register event handler registered for PSM_WATCHDOG [ 85.923078] brcmfmac: brcmf_sdio_probe completed!! [ 85.923088] brcmfmac: brcmf_fw_get_firmwares_pcie enter: dev=mmc1:0001:1 [ 85.923292] usbcore: registered new interface driver brcmfmac [ 85.930368] brcmfmac: brcmf_fw_request_code_done enter: dev=mmc1:0001:1 [ 85.930520] brcmfmac: brcmf_fw_request_nvram_done enter: dev=mmc1:0001:1 [ 85.930591] brcmfmac: brcmf_sdio_firmware_callback Enter: dev=mmc1:0001:1, err=0 [ 85.930715] brcmfmac: brcmf_sdio_download_code_file Enter [ 85.952077] brcmfmac: brcmf_sdio_verifymemory Compare RAM dl & ul at 0x00000000; size=369577 [ 85.988168] brcmfmac: brcmf_sdio_download_nvram Enter [ 85.988333] brcmfmac: brcmf_sdio_verifymemory Compare RAM dl & ul at 0x0007fd78; size=648 [ 85.988478] brcmfmac: brcmf_chip_set_active Enter [ 86.999164] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 87.006519] brcmfmac: brcmf_sdio_firmware_callback failed: dev=mmc1:0001:1, err=0 [ 87.006563] brcmfmac: brcmf_sdio_remove Enter [ 87.006568] brcmfmac: brcmf_detach Enter [ 87.006582] brcmfmac: brcmf_bus_change_state 0 -> 0 [ 87.006589] brcmfmac: brcmf_sdio_bus_stop Enter [ 88.018990] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 88.026469] brcmfmac: brcmf_proto_detach Enter [ 88.026483] brcmfmac: brcmf_fweh_unregister event handler cleared for PSM_WATCHDOG [ 89.039090] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 89.086342] brcmfmac: brcmf_chip_set_passive Enter [ 89.087211] brcmfmac: brcmf_sdio_remove Disconnected Should I be trying some different firmware? Any input is much appreciated. Thank you.