From patchwork Sun Sep 2 10:11:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Summers X-Patchwork-Id: 10585095 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 27669112B for ; Sun, 2 Sep 2018 10:11:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11F0829B63 for ; Sun, 2 Sep 2018 10:11:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 01B3D29B69; Sun, 2 Sep 2018 10:11:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 986E929B63 for ; Sun, 2 Sep 2018 10:11:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Date:Message-ID:Subject:From:To: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=raHLdNrd0axf+G6+M6Cr+8324JF1/1frbrS3LviTuZg=; b=YQ6CYug00IfgVV 0tIO/HsnxmGwD0uW1sFGSSf9mXZpaNIKooxny+4HEzUtT2laDJxdwEqA1iPVJdSDAiqebyZFO7QIB mgpv9XsvlZeen8mvZwoqIpCLyERoR4iWmoRUm77MQTb5NI7JKg2k6H+s/RrhVmkCuY1YE4Fi5uNk0 GpgRP1lfn+p+qlV0toSLiquKFj6arwn+NUnx1qYwrqMPc/8KUeghIdkPk5u+IYNJ0JWyTLiZbXD4b S9ZsstxE5bdjub5ISj5NY2qVmsu5kGLMd1Y+yfn7ZPGC0Vn1SHZtK4KZep2Q+VAfSUNChbf0UIlxc PWjO3yXOIU07N1mqM+zw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fwPLt-0008B7-IL; Sun, 02 Sep 2018 10:11:29 +0000 Received: from mail-gw.unlimitedwebhosting.co.uk ([149.255.60.82]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fwPLp-00088y-UV for linux-rockchip@lists.infradead.org; Sun, 02 Sep 2018 10:11:27 +0000 Received: from uwhbsf01.unlimitedwebhosting.co.uk (mail-gw.unlimitedwebhosting.co.uk [149.255.60.72]) by mail-gw.unlimitedwebhosting.co.uk (Postfix) with ESMTPS id 7C2F4633EB6C for ; Sun, 2 Sep 2018 11:11:13 +0100 (BST) X-ASG-Debug-ID: 1535883072-05541365c76d74af0001-fBy1Pp Received: from cloud515.unlimitedwebhosting.co.uk (cloud515.unlimitedwebhosting.co.uk [149.255.58.109]) by uwhbsf01.unlimitedwebhosting.co.uk with ESMTP id gp6pnbbq4yZB9qWn (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sun, 02 Sep 2018 11:11:12 +0100 (BST) X-Barracuda-Envelope-From: beagleboard@davidjohnsummers.uk X-Barracuda-Effective-Source-IP: cloud515.unlimitedwebhosting.co.uk[149.255.58.109] X-Barracuda-Apparent-Source-IP: 149.255.58.109 Received: from 240.42.113.87.dyn.plus.net ([87.113.42.240]:63364 helo=[192.168.1.65]) by cloud515.unlimitedwebhosting.co.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1fwPLa-004QuU-13 for linux-rockchip@lists.infradead.org; Sun, 02 Sep 2018 11:11:10 +0100 To: linux-rockchip@lists.infradead.org From: beagleboard@davidjohnsummers.uk Subject: [1/3] Device Tree for ASUS Tinker Board S Message-ID: X-ASG-Orig-Subj: [1/3] Device Tree for ASUS Tinker Board S Date: Sun, 2 Sep 2018 11:11:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 Content-Language: en-GB X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud515.unlimitedwebhosting.co.uk X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - davidjohnsummers.uk X-Get-Message-Sender-Via: cloud515.unlimitedwebhosting.co.uk: authenticated_id: davidjoh/from_h X-Authenticated-Sender: cloud515.unlimitedwebhosting.co.uk: beagleboard@davidjohnsummers.uk X-Barracuda-Connect: cloud515.unlimitedwebhosting.co.uk[149.255.58.109] X-Barracuda-Start-Time: 1535883072 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://149.255.60.72:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at unlimitedwebhosting.co.uk X-Barracuda-Scan-Msg-Size: 2039 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.0 tests=NO_REAL_NAME X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.56736 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 NO_REAL_NAME From: does not include a real name X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180902_031126_123606_5C998C93 X-CRM114-Status: UNSURE ( 8.83 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, The ASUS Tinker Board S : https://www.asus.com/uk/Single-Board-Computer/Tinker-Board-S/ Is a variant on the original ASUS Tinker Board, the main difference being that the "S" has eMMC. This patchset sets up the device tree for the "S". It is based on the patches used with the debian distribution which ships with the device : https://github.com/TinkerBoard/debian_kernel/blob/develop/arch/arm/boot/dts/rk3288-miniarm.dts So this is really just mainlining the support. I've split the changed into three parts: 1) This part - just creates a new dts file that is a copy of the tinker board, with just a name change 2) Changes needed to add the eMMC 3) Changes needed to enable wifi This is the first patch I've done for linux - so if I've got anything wrong, just let me know and I'll correct. Also any comments you have. Regards, David Summers diff -up linux-rockchip/arch/arm/boot/dts/rk3288-tinker*.dts --- linux-rockchip/arch/arm/boot/dts/rk3288-tinker.dts    2018-09-01 13:16:55.637645728 +0100 +++ linux-rockchip/arch/arm/boot/dts/rk3288-tinkerS.dts 2018-09-02 09:57:55.090964465 +0100 @@ -9,8 +9,8 @@  #include  / { -    model = "Rockchip RK3288 Tinker Board"; -    compatible = "asus,rk3288-tinker", "rockchip,rk3288"; +    model = "Asus Rockchip RK3288 Tinker Board S"; +    compatible = "asus,rk3288-tinkerS", "rockchip,rk3288";      chosen {          stdout-path = "serial2:115200n8"; diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index b5bd3de87c33..6f173506dbd8 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -864,6 +864,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \         rk3288-r89.dtb \         rk3288-rock2-square.dtb \         rk3288-tinker.dtb \ +       rk3288-tinkerS.dtb \         rk3288-veyron-brain.dtb \         rk3288-veyron-jaq.dtb \         rk3288-veyron-jerry.dtb \ From patchwork Sun Sep 2 10:04:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Summers X-Patchwork-Id: 10585091 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8BF36112B for ; Sun, 2 Sep 2018 10:06:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 61D4829AB5 for ; Sun, 2 Sep 2018 10:06:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F79129ACB; Sun, 2 Sep 2018 10:06:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3493C29AB5 for ; Sun, 2 Sep 2018 10:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Date:Message-ID:Subject:From:To: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Cu8Hv0C4w0V5QiQFZFyxk8wAhjtXSO+l569UYPrtHLQ=; b=ZJG81o1+EIJIda1CTSJ78/yliN Is1104t/MISFAE5idBjBnYUe62bWBPhCsGZrrcE5qkTnkSxa+vVY0wsZXEPLu0ef7Lf8+uAlk7pxp 5hhYgFKBe/JjzisNTFCy6q4xupLn3vTKSGn8+LygHJrBRXHKcM9EYVUMiBy2QBa/mr6Z40wlfy3vh /6YM9kKcmTrSb3yy3uf+mLYMnyPNqg3rmLDGkYe1uojuezyQSPqy3gQQDsfIHNF2qo/S5tUhcpau6 1hGoe+4hdPo21/geI+bHve0EdCf9I4uaW4oH3MEHV9SRf0ABSA6fMivo35HqObtEVFYCmOawdoM9t iFmIjcOA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fwPGV-0005zd-Jw; Sun, 02 Sep 2018 10:05:55 +0000 Received: from mail-gw.unlimitedwebhosting.co.uk ([149.255.60.86]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fwPGS-0004iq-K3 for linux-rockchip@lists.infradead.org; Sun, 02 Sep 2018 10:05:54 +0000 Received: from uwhbsf01.unlimitedwebhosting.co.uk (mail-gw.unlimitedwebhosting.co.uk [149.255.60.72]) by mail-gw.unlimitedwebhosting.co.uk (Postfix) with ESMTPS id B980D633E284 for ; Sun, 2 Sep 2018 11:04:59 +0100 (BST) X-ASG-Debug-ID: 1535882699-05541365ca6d73a30001-fBy1Pp Received: from cloud515.unlimitedwebhosting.co.uk (cloud515.unlimitedwebhosting.co.uk [149.255.58.109]) by uwhbsf01.unlimitedwebhosting.co.uk with ESMTP id ejw9zxItmOnDHQhf (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sun, 02 Sep 2018 11:04:59 +0100 (BST) X-Barracuda-Envelope-From: beagleboard@davidjohnsummers.uk X-Barracuda-Effective-Source-IP: cloud515.unlimitedwebhosting.co.uk[149.255.58.109] X-Barracuda-Apparent-Source-IP: 149.255.58.109 Received: from 240.42.113.87.dyn.plus.net ([87.113.42.240]:63280 helo=[192.168.1.65]) by cloud515.unlimitedwebhosting.co.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1fwPFY-004QB3-Vx; Sun, 02 Sep 2018 11:04:57 +0100 To: linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org From: beagleboard@davidjohnsummers.uk Subject: [2/3] Device Tree for ASUS Tinker Board S : enable eMMC Message-ID: X-ASG-Orig-Subj: [2/3] Device Tree for ASUS Tinker Board S : enable eMMC Date: Sun, 2 Sep 2018 11:04:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 Content-Language: en-GB X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud515.unlimitedwebhosting.co.uk X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - davidjohnsummers.uk X-Get-Message-Sender-Via: cloud515.unlimitedwebhosting.co.uk: authenticated_id: davidjoh/from_h X-Authenticated-Sender: cloud515.unlimitedwebhosting.co.uk: beagleboard@davidjohnsummers.uk X-Barracuda-Connect: cloud515.unlimitedwebhosting.co.uk[149.255.58.109] X-Barracuda-Start-Time: 1535882699 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://149.255.60.72:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at unlimitedwebhosting.co.uk X-Barracuda-Scan-Msg-Size: 1786 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.0 tests=NO_REAL_NAME X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.56736 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 NO_REAL_NAME From: does not include a real name X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180902_030552_792091_53E88C1B X-CRM114-Status: UNSURE ( 9.44 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch takes the newly created rk3288-tinkerS.dts and enables the eMMC. It is based on: https://github.com/TinkerBoard/debian_kernel/commit/dc7d4eb4140b4e5ff23aaf2864a56d5c8634f3d0 With the speed change from https://github.com/TinkerBoard/debian_kernel/commit/4b52627037958bc95ed3f67ff96bbbadbb2bfe07 The patch is relatively straight forward. Only oddity that it seems to be on the sd card slot at &sdmmc; when booting from eMMC and there is no card in the sd slot - then the kernel keeps scanning the sd slot. So it looks like card detect isn't functioning correctly on &sdmmc. This probably wasn't noted on the original Tinker Board, as that had to have a sd card in order to boot. Alas the schematic for the tinker board doesn't show how the sd card is wired ...: http://dlcdnet.asus.com/pub/ASUS/mb/Linux/Tinker_Board_2GB/Tinker_Board_Schematics.zip diff --git a/arch/arm/boot/dts/rk3288-tinkerS.dts b/arch/arm/boot/dts/rk3288-tinkerS.dts index 9d113418a9c9..7aefa2cd23fa 100644 --- a/arch/arm/boot/dts/rk3288-tinkerS.dts +++ b/arch/arm/boot/dts/rk3288-tinkerS.dts @@ -444,6 +444,20 @@         vqmmc-supply = <&vccio_sd>;  }; +&emmc { +       bus-width = <8>; +       cap-mmc-highspeed; +       disable-wp; +       non-removable; +       num-slots = <1>; +       pinctrl-names = "default"; +       pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>; +       max-frequency = <150000000>; +       mmc-hs200-1_8v; +       mmc-ddr-1_8v; +       status = "okay"; +}; +  &tsadc {         rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */         rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */ From patchwork Sun Sep 2 10:05:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Summers X-Patchwork-Id: 10585093 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 388DB112B for ; Sun, 2 Sep 2018 10:06:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 28BD429AB5 for ; Sun, 2 Sep 2018 10:06:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C74A29ACB; Sun, 2 Sep 2018 10:06:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 70B6029AB5 for ; Sun, 2 Sep 2018 10:06:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Date:Message-ID:Subject:From:To: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=DjkfyhQX0nX5AxpbvVZBF37Q6LBIAPui0nGdVov03kY=; b=tlfvNZQeTzeLJ+dWj6SqsX93qk LdSd2bkWJqlD5Caaq/6egL8CZ9z8jjSfzmuNHIaQxMCz16Vs8pmYGBSkzrgGBhzd9ggC5hvrdU4GL SaDvTbFBEpgiss5rVE/fqPHnRp1e00183R0ChVA9gAnFz5wyrZWqEZ0QMMffhdmP/51W4QI6tjeLe Wx7XaVkUAHS3iItDM8VSyXqDxjsMjT3j08/FFb/6IrhxF03onFIKaCth/6lcegLGXkucrvNnjwzsr rJ35EqzYuvIZ9wwHlH9vYAZ25SmFd05N4as/3jcvtyeOdyATLvN5hn87wit2NYG7qwAwWb14tSDe3 4fJvWyAQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fwPGc-00061M-Hz; Sun, 02 Sep 2018 10:06:02 +0000 Received: from mail-gw.unlimitedwebhosting.co.uk ([149.255.60.84]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fwPGZ-0005A9-63 for linux-rockchip@lists.infradead.org; Sun, 02 Sep 2018 10:06:01 +0000 Received: from uwhbsf01.unlimitedwebhosting.co.uk (mail-gw.unlimitedwebhosting.co.uk [149.255.60.72]) by mail-gw.unlimitedwebhosting.co.uk (Postfix) with ESMTPS id B5804633E28F for ; Sun, 2 Sep 2018 11:05:06 +0100 (BST) X-ASG-Debug-ID: 1535882706-05541365c96d73b30001-fBy1Pp Received: from cloud515.unlimitedwebhosting.co.uk (cloud515.unlimitedwebhosting.co.uk [149.255.58.109]) by uwhbsf01.unlimitedwebhosting.co.uk with ESMTP id m0rcXXFNRBhkWCna (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sun, 02 Sep 2018 11:05:06 +0100 (BST) X-Barracuda-Envelope-From: beagleboard@davidjohnsummers.uk X-Barracuda-Effective-Source-IP: cloud515.unlimitedwebhosting.co.uk[149.255.58.109] X-Barracuda-Apparent-Source-IP: 149.255.58.109 Received: from 240.42.113.87.dyn.plus.net ([87.113.42.240]:63282 helo=[192.168.1.65]) by cloud515.unlimitedwebhosting.co.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1fwPFf-004QDg-OC; Sun, 02 Sep 2018 11:05:03 +0100 To: linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org From: beagleboard@davidjohnsummers.uk Subject: [3/3] Device Tree for ASUS Tinker Board S : Enable WiFi Message-ID: X-ASG-Orig-Subj: [3/3] Device Tree for ASUS Tinker Board S : Enable WiFi Date: Sun, 2 Sep 2018 11:05:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 Content-Language: en-GB X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud515.unlimitedwebhosting.co.uk X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - davidjohnsummers.uk X-Get-Message-Sender-Via: cloud515.unlimitedwebhosting.co.uk: authenticated_id: davidjoh/from_h X-Authenticated-Sender: cloud515.unlimitedwebhosting.co.uk: beagleboard@davidjohnsummers.uk X-Barracuda-Connect: cloud515.unlimitedwebhosting.co.uk[149.255.58.109] X-Barracuda-Start-Time: 1535882706 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://149.255.60.72:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at unlimitedwebhosting.co.uk X-Barracuda-Scan-Msg-Size: 6308 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.0 tests=NO_REAL_NAME X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.56736 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 NO_REAL_NAME From: does not include a real name X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180902_030559_518493_3AD3271B X-CRM114-Status: UNSURE ( 9.91 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch enables wifi on the ASUS tinker board S. Its based on: https://github.com/TinkerBoard/debian_kernel/commit/6a3128ade33f758887048578ada61a4b7ab8e678 The changes here are more extensive, basic communication is via sdio0, but can also be seen that connections are set up to the RK808 e.g. the power management chip. Now I believe the original tinker board also had wi-fi - so why this isn't enabled on the rk3288-tinker.dts isn't clear to me. I suspect it should be on both. Regards, David Summers.                 #size-cells = <0>; @@ -101,6 +147,14 @@                 startup-delay-us = <100000>;                 vin-supply = <&vcc_io>;         }; + +       vcc_flash: flash-regulator { +               compatible = "regulator-fixed"; +               regulator-name = "vcc_flash"; +               regulator-min-microvolt = <1800000>; +               regulator-max-microvolt = <1800000>; +               vin-supply = <&vcc_io>; +       };  };  &cpu0 { @@ -389,6 +443,15 @@                 };         }; +       sdio-pwrseq { +               wifi_enable_h: wifi-enable-h { +                       rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>; +               }; +               chip_enable_h: chip-enable-h { +                       rockchip,pins = <4 27 RK_FUNC_GPIO &pcfg_pull_none>; +               }; +       }; +         sdmmc {                 sdmmc_bus4: sdmmc-bus4 {                         rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>, @@ -420,6 +483,12 @@                         rockchip,pins = <7 8 RK_FUNC_GPIO &pcfg_pull_none>;                 };         }; + +       wireless-bluetooth { +               uart0_gpios: uart0-gpios { +                       rockchip,pins = <4 19 RK_FUNC_GPIO &pcfg_pull_none>; +               }; +       };  };  &pwm0 { @@ -431,6 +500,24 @@         status ="okay";  }; +&sdio0 { +       status = "okay"; +       clock-frequency = <50000000>; +       clock-freq-min-max = <200000 50000000>; +       bus-width = <4>; +       cap-sd-highspeed; +       cap-sdio-irq; +       disable-wp; +       keep-power-in-suspend; +       mmc-pwrseq = <&sdio_pwrseq>; +       non-removable; +       num-slots = <1>; +       pinctrl-names = "default"; +       pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; +       sd-uhs-sdr104; +       supports-sdio; +}; +  &sdmmc {         bus-width = <4>;         cap-mmc-highspeed; @@ -451,6 +552,8 @@  };  &uart0 { +       pinctrl-names = "default"; +       pinctrl-0 = <&uart0_xfer>, <&uart0_cts>;         status = "okay";  }; diff --git a/arch/arm/boot/dts/rk3288-tinkerS.dts b/arch/arm/boot/dts/rk3288-tinkerS.dts index 9d113418a9c9..2465cddf2f26 100644 --- a/arch/arm/boot/dts/rk3288-tinkerS.dts +++ b/arch/arm/boot/dts/rk3288-tinkerS.dts @@ -21,6 +21,27 @@                 device_type = "memory";         }; +       wireless-bluetooth { +               compatible = "bluetooth-platdata"; +               uart_rts_gpios = <&gpio4 19 GPIO_ACTIVE_LOW>; +               pinctrl-names = "default","rts_gpio"; +               pinctrl-0 = <&uart0_rts>; +               pinctrl-1 = <&uart0_gpios>; +               BT,reset_gpio    = <&gpio4 29 GPIO_ACTIVE_HIGH>; +               BT,wake_gpio     = <&gpio4 26 GPIO_ACTIVE_HIGH>; +               BT,wake_host_irq = <&gpio4 31 GPIO_ACTIVE_HIGH>; +               status = "okay"; +       }; + +       wireless-wlan { +               compatible = "wlan-platdata"; +               rockchip,grf = <&grf>; +               wifi_chip_type = "ap6212"; +               sdio_vref = <1800>; +               WIFI,host_wake_irq = <&gpio4 30 GPIO_ACTIVE_HIGH>; +               status = "okay"; +       }; +         ext_gmac: external-gmac-clock {                 compatible = "fixed-clock";                 #clock-cells = <0>; @@ -28,7 +49,32 @@                 clock-output-names = "ext_gmac";         }; -       gpio-keys { +       io-domains { +               compatible = "rockchip,rk3288-io-voltage-domain"; +               rockchip,grf = <&grf>; +               flash0-supply = <&vcc_flash>; +               gpio30-supply = <&vcc_io>; +               wifi-supply = <&vcc_18>; +               sdcard-supply = <&vccio_sd>; +       }; + +       sdio_pwrseq: sdio-pwrseq { +               compatible = "mmc-pwrseq-simple"; +               clocks = <&rk808 1>; +               clock-names = "ext_clock"; +               pinctrl-names = "default"; +               pinctrl-0 = <&chip_enable_h>, <&wifi_enable_h>; + +               /* +                * On the module itself this is one of these (depending +                * on the actual card populated): +                * - SDIO_RESET_L_WL_REG_ON +                * - PDN (power down when low) +                */ +               reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>, <&gpio4 27 GPIO_ACTIVE_LOW>; +       }; + +gpio-keys {                 compatible = "gpio-keys";                 #address-cells = <1>;