Date: Sat, 21 Jan 2017 21:41:07 +0800 From: Ganbold Tsagaankhuu <ganbold@gmail.com> To: Daniel Braniss <danny@cs.huji.ac.il> Cc: "freebsd-arm@freebsd.org" <arm@freebsd.org> Subject: Re: usb on NanoPi NEO not working Message-ID: <CAGtf9xO1uqt=0Qz4U%2B2gG3RH0s8d2uYsEmFkRGAg%2B04Mrv5CFw@mail.gmail.com> In-Reply-To: <6DC50B90-AB89-41A6-9C0F-82872E2B9E99@cs.huji.ac.il> References: <6DC50B90-AB89-41A6-9C0F-82872E2B9E99@cs.huji.ac.il>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Sat, Jan 21, 2017 at 9:26 PM, Daniel Braniss <danny@cs.huji.ac.il> wrote: > Hi, > I managed to boot current on this board, but some things are not > working, i.e., the stat led, > but more important, the usb is unusable. > > does someone have a correct fdt for this board? > First, are you using correct u-boot for it? https://github.com/jaredmcneill/freebsd-ports/tree/u-boot-nanopi-neo/sysutils/u-boot-nanopi-neo I'm using attached dts in FreeBSD. Ganbold > > danny > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" > [-- Attachment #2 --] /*- * Copyright (c) 2016 Jared McNeill <jmcneill@invisible.ca> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #include "sun8i-h3-nanopi-neo.dts" / { cpus { cpu@0 { clocks = <&cpu>; clock-latency = <2000000>; /* XXX ??? */ }; }; clocks { ths_clk: clk@1c20074 { #clock-cells = <0>; compatible = "allwinner,sun8i-h3-ths-clk"; reg = <0x01c20074 0x4>; clocks = <&osc24M>; clock-output-names = "ths"; }; }; soc { emac: ethernet@1c30000 { compatible = "allwinner,sun8i-h3-emac"; reg = <0x01c30000 0x104>, <0x01c00030 0x4>; reg-names = "emac", "syscon"; interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; resets = <&ahb_rst 17>; reset-names = "ahb"; clocks = <&bus_gates 17>; clock-names = "ahb"; #address-cells = <1>; #size-cells = <0>; status = "disabled"; }; i2c0: i2c@1c2ac00 { compatible = "allwinner,sun6i-a31-i2c"; reg = <0x01c2ac00 0x400>; interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; clocks = <&bus_gates 96>; resets = <&apb2_rst 0>; status = "disabled"; #address-cells = <1>; #size-cells = <0>; }; i2c1: i2c@1c2b000 { compatible = "allwinner,sun6i-a31-i2c"; reg = <0x01c2b000 0x400>; interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; clocks = <&bus_gates 97>; resets = <&apb2_rst 1>; status = "disabled"; #address-cells = <1>; #size-cells = <0>; }; i2c2: i2c@1c2b400 { compatible = "allwinner,sun6i-a31-i2c"; reg = <0x01c2b400 0x400>; interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; clocks = <&bus_gates 98>; resets = <&apb2_rst 2>; status = "disabled"; #address-cells = <1>; #size-cells = <0>; }; // r_i2c: i2c@1f02400 { // compatible = "allwinner,sun6i-a31-i2c"; // reg = <0x01f02400 0x400>; // interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; // status = "disabled"; // #address-cells = <1>; // #size-cells = <0>; // }; r_i2c: i2c@1f02400 { compatible = "allwinner,sun6i-a31-i2c"; reg = <0x01f02400 0x400>; interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&r_i2c_pins_a>; clocks = <&apb0_gates 6>; clock-frequency = <100000>; resets = <&apb0_reset 6>; status = "disabled"; #address-cells = <1>; #size-cells = <0>; }; sid: eeprom@1c14000 { compatible = "allwinner,sun8i-a83t-sid"; reg = <0x01c14000 0x400>; }; rtp: rtp@1c25000 { compatible = "allwinner,sun8i-h3-ts"; reg = <0x01c25000 0x400>; interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; clocks = <&bus_gates 72>, <&ths_clk>; clock-names = "ahb", "ths"; resets = <&apb1_rst 8>; #thermal-sensor-cells = <0>; }; }; }; &pll1 { compatible = "allwinner,sun8i-h3-pll1-clk"; }; /* * Board-specific stuff here */ &r_i2c { status = "okay"; }; / { soc { emac: ethernet@1c30000 { compatible = "allwinner,sun8i-h3-emac"; reg = <0x01c30000 0x104>, <0x01c00030 0x4>; reg-names = "emac", "syscon"; interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; resets = <&ahb_rst 17>, <&ahb_rst 66>; reset-names = "ahb", "ephy"; clocks = <&bus_gates 17>, <&bus_gates 128>; clock-names = "ahb", "ephy"; #address-cells = <1>; #size-cells = <0>; status = "disabled"; }; }; vdd_cpu: reg_cpux_vset { compatible = "regulator-gpio"; regulator-name = "cpux-supply"; regulator-min-microvolt = <1100000>; regulator-max-microvolt = <1300000>; regulator-boot-on; gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; states = <1300000 0x1 1100000 0x0>; enable-active-high; }; }; &emac { phy = <&phy1>; phy-mode = "mii"; allwinner,use-internal-phy; allwinner,leds-active-low; status = "okay"; phy1: ethernet-phy@1 { reg = <1>; }; }; / { cpus { cpu@0 { cpu-supply = <&vdd_cpu>; operating-points = < /* kHz uV */ 1008000 1300000 816000 1100000 480000 1100000 >; }; }; }; // 1200000 1300000 [-- Attachment #3 --] /* * Copyright (C) 2016 James Pettigrew <james@innovum.com.au> * * 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 <dt-bindings/gpio/gpio.h> #include <dt-bindings/input/input.h> #include <dt-bindings/pinctrl/sun4i-a10.h> / { model = "FriendlyARM NanoPi NEO"; compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3"; aliases { serial0 = &uart0; }; chosen { stdout-path = "serial0:115200n8"; }; leds { compatible = "gpio-leds"; pinctrl-names = "default"; pinctrl-0 = <&leds_opc>, <&leds_r_opc>; pwr_led { label = "nanopi:green:pwr"; gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; default-state = "on"; }; status_led { label = "nanopi:blue:status"; gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; }; }; }; &ehci1 { status = "okay"; }; &ehci2 { status = "okay"; }; &ehci3 { status = "okay"; }; &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; vmmc-supply = <®_vcc3v3>; bus-width = <4>; cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ cd-inverted; status = "okay"; }; &ohci1 { status = "okay"; }; &ohci2 { status = "okay"; }; &ohci3 { status = "okay"; }; &pio { leds_opc: led_pins@0 { allwinner,pins = "PA10"; allwinner,function = "gpio_out"; allwinner,drive = <SUN4I_PINCTRL_10_MA>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; }; }; &r_pio { leds_r_opc: led_pins@0 { allwinner,pins = "PL10"; allwinner,function = "gpio_out"; allwinner,drive = <SUN4I_PINCTRL_10_MA>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; }; r_i2c_pins_a: r_i2c@0 { allwinner,pins = "PL0", "PL1"; allwinner,function = "s_twi"; allwinner,drive = <SUN4I_PINCTRL_10_MA>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; }; }; &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_a>; status = "okay"; }; &usbphy { /* USB VBUS is always on */ status = "okay"; };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGtf9xO1uqt=0Qz4U%2B2gG3RH0s8d2uYsEmFkRGAg%2B04Mrv5CFw>
