From owner-freebsd-arm@freebsd.org Wed Aug 14 13:04:16 2019 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC061AB01A for ; Wed, 14 Aug 2019 13:04:16 +0000 (UTC) (envelope-from dpolyg@gmail.com) Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467qXw0hmyz4Hjv for ; Wed, 14 Aug 2019 13:04:15 +0000 (UTC) (envelope-from dpolyg@gmail.com) Received: by mail-pl1-x644.google.com with SMTP id bj8so3669523plb.4 for ; Wed, 14 Aug 2019 06:04:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=VHn9kFew0CU//qTwut+otDEXzJwWJPjs91sip3IqzEI=; b=BGD0LvK4e/gy4dadg4sMsqRWT3TzVrODKpKSjdtN80N67K/jR3AVPalpzNwCUuGsbB ugSoFLp/CMxvoSb7o2JrgX652lPw4a6p71oXQDjmdgj6zu/hDfA4uHTIzrDSZvQi9SUk hpGbzaFd2e0ngrIPepVkuUWGf4qriYgt6ohm4AGAFaJO7U0I28wCguOtnHiJ764Uas0v KNBAa2tC4RFPw0SalV4TizPHJaO6zD5NVwpPYZt5vjTmXTca/O4Du8y9K8C4yBDtA70r grfRbCSVRKHYC5HiaMb/GgdSXbmhbOlbnzgEWkAaGhc9w/9HNiLhzpmA4brNrDy5vqPC krhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=VHn9kFew0CU//qTwut+otDEXzJwWJPjs91sip3IqzEI=; b=JUSrhfE4vgfKBKXW3wyrUKUgqX0UpJu+d7krua+YeqhIiEVUJphtB4Dq6bNPu5V5WB ubxlRUI84uC72bUNl+ZxPbJ/SndX3WjcsAVdP60t5biikg3wBA9XadkJO5aTN5lmc0ju 3bkERR4cTIKMA1ovrqI44bbJH7OX3zSP9Hd5Xi/H7VmUjtRiSxXZTH2+t8rLgFGxCgfY mgsis2Pemadpe0Ze8fgtg/a2oNzToO78zzvk1u9lssdAH2oZk3T0pG6sdzEJu7C1SAiU eQbUTz1W5tXMfNIXjRSPrSWflFhTRgpB4ZCs5ujxuKbHnBjGiNdEIdm+HY5jr3pBXMUV pAQA== X-Gm-Message-State: APjAAAVIIUFjeKM+XK1ltgj7cYduWtWXegrYJz9Gs6chX4t9oMnIy6ge TXqPhiqp96WdliXg/5jl21CEHXttk70= X-Google-Smtp-Source: APXvYqys+lpN3J/bpq4ws+m2DnANA8SzV6GQY935D1IJZXoYzFLLeuJvKMY1AxpCeNBNd4Blkwnk/Q== X-Received: by 2002:a17:902:b28:: with SMTP id 37mr26950239plq.2.1565787854359; Wed, 14 Aug 2019 06:04:14 -0700 (PDT) Received: from [192.168.1.100] (ngn6-ppp1221.tokyo.sannet.ne.jp. [157.192.84.205]) by smtp.googlemail.com with ESMTPSA id g10sm16861472pfb.95.2019.08.14.06.04.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Aug 2019 06:04:13 -0700 (PDT) Subject: Re: USB 3.0 support for Rockchip RK3328 To: greg@unrelenting.technology, Emmanuel Vadot Cc: freebsd-arm@freebsd.org References: <20190812171248.4af265a7bd48056407f796d6@bidouilliste.com> <27a49a3c8a6e2029d696b359bed47ee3@unrelenting.technology> From: Denis Polygalov Message-ID: Date: Wed, 14 Aug 2019 22:04:08 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <27a49a3c8a6e2029d696b359bed47ee3@unrelenting.technology> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 467qXw0hmyz4Hjv X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=BGD0LvK4; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of dpolyg@gmail.com designates 2607:f8b0:4864:20::644 as permitted sender) smtp.mailfrom=dpolyg@gmail.com X-Spamd-Result: default: False [-3.99 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.99)[-0.994,0]; RECEIVED_SPAMHAUS_PBL(0.00)[205.84.192.157.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[4.4.6.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(0.00)[ip: (-0.39), ipnet: 2607:f8b0::/32(-2.97), asn: 15169(-2.39), country: US(-0.05)]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Aug 2019 13:04:16 -0000 After application of this patch: https://patchwork.kernel.org/patch/10853381/ and recompiling kernel I got this in dmesg: # dmesg | egrep 'usb|dwc|USB' dwc0: mem 0xff540000-0xff54ffff irq 43 on ofwbus0 miibus0: on dwc0 dwc0: Ethernet address: 82:d6:05:ce:da:87 dwcotg0: mem 0xff580000-0xff5bffff irq 45 on ofwbus0 usbus0 on dwcotg0 usbus1 on ohci0 usbus0: 480Mbps High Speed USB v2.0 usbus1: 12Mbps Full Speed USB v1.0 ugen1.1: at usbus1 uhub0 on usbus1 uhub0: on usbus1 ugen0.1: at usbus0 uhub1 on usbus0 uhub1: on usbus0 Root mount waiting for: usbus1 usbus0 dwc0: link state changed to DOWN dwc0: link state changed to UP but no response to connection of any USB device. Also I noticed that 'gpioctl -f /dev/gpioc4 26 1' make sense only for ROCKPro64 which is not what I have: # ls /dev/gp* /dev/gpioc0 /dev/gpioc1 /dev/gpioc2 /dev/gpioc3 Is there some similar magic command to turn on USB parts on ROCK64? Regards, Denis. On 13/08/2019 4:53 am, greg@unrelenting.technology wrote: > August 12, 2019 6:12 PM, "Emmanuel Vadot" wrote: > >> On Mon, 12 Aug 2019 17:19:30 +0300 >> Greg V wrote: >> >>> On August 12, 2019 4:10:07 PM GMT+03:00, Denis Polygalov wrote: >>> Hi. I'm testing this patch: >>> >>> https://reviews.freebsd.org/D19335 >>> >>> on my ROCK64 (v2.0) board. Not ROCKPro(!) >>> >>> Any ideas how to make this work please? >>> >>> Looks like the devicetree that's in the freebsd repo right now does not have the usb3 node. >>> >>> Google for rk3328 dwc3 usb3, apply the related dts changes (or just download the whole dts from a >>> newer Linux version), rebuild the dtb and boot with the new dtb. >> >> Only the vendor DTS have something related to usb3 with a compatible >> "rockchip,rk3328-xhci". >> This controller isn't documented in the TRM so I don't know much about >> it, based on the property of the dts node I guess it's a dwc3 because >> there is some snps props but ... > > I'm talking about this patch: > > http://lkml.iu.edu/hypermail/linux/kernel/1708.2/01066.html > > that mentions rockchip,rk3328-dwc3 > > so I guess it wasn't upstreamed >