From patchwork Fri May 21 11:05:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis K X-Patchwork-Id: 1482159 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=bU5vGywB; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=NNBbEKzO; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FmkMm2RRrz9sV5 for ; Fri, 21 May 2021 21:07:15 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: 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=RgtyzErPhfpnm4wA46ox9pWqRMMm8QW5fl9UzMu2ego=; b=bU5vGywBM5BCZRMcqMP5zblBA+ oHWjtVAbmLV5440NjFKD11jGSCcUcfSFbqA9fb3/GdJUEMlA2MfV8W2d9FTW+WqHNOMmRFA5LZ6tI O/ux/Ak0VRyinG2qRe8xO+nWITlTvdCuBJkCLflwbZ4PqaH4fRfqLQUqQCOJqsJppcmiFCmnxiIPO c0QJm22skt5xIkFpQj/Ah25byAmSq6gTW1csvisQbp87M4rkLIq2LbKWv+yre8Osp7dMR+INXtrUA YVku36lb1hr3B4QV80K5v3puBgC7m5xZjMp3S3IAn1vOO+bLehchR4D2zRdvzC31DME/og19eQQOG bOy8okeA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lk2y0-0055Et-UE; Fri, 21 May 2021 11:05:21 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lk2xo-0055Ch-Dg for openwrt-devel@lists.openwrt.org; Fri, 21 May 2021 11:05:10 +0000 Received: by mail-lj1-x22a.google.com with SMTP id f12so23467334ljp.2 for ; Fri, 21 May 2021 04:05:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YpSC+e/CBjpTNTdCzhBaNLiOTDyRzS9V3xZ5QmmJ5yw=; b=NNBbEKzOOIsmDawGyXZ51G1SyuIzM6+aDMRawoRyIYP76lXprpKrW7+Jp6ii8nB5eQ DdzVWvzZwpTDpGaA1uZW9t+dlP5vkscXt7OIDPcP1CrxcQTS2tfU5KaKgQ7918EIkYnW 8I62viu83JFiIoNzuGIYb9eNnmZC5f4dR/W7spHUGoUt8fuVB2zooMwdGeZTadMgs2Pu /5330UoSZC3qDwPnJBJTWkEfeKctJdUHmtXrvpa4oJaanRTNBscXJzpqERKb/Iq8NTPv 7SpXyRDCZOlEnrbTd9fj/UgvvW3PvmH/GgLmVDOtsu7zq6uHb6yTPZTWTBISonIBZJGw VLZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YpSC+e/CBjpTNTdCzhBaNLiOTDyRzS9V3xZ5QmmJ5yw=; b=A7rw2IIm6Q513Yhqe3Cc/D0wI3+sYxF/oA2HcmH7ifpX5W1/Rylvalzs5o2KKySUEP Pj1aoSjoShLBt/XgvXfkj50AQPBK8WKiJUdOhKFM4ayi0WO6VpCOux0wtgrWK33C1HAT aQUUGpBapXhRtWxmDnqnaDr7f7FPqWGHNdgT8rcOvjqcNLewuQC9HPfrb+xEn9XiIOj9 MMSWLbCziHFmuWVDbT2Sr1Cu7kms3NhGBqWLqj4hW64sCirBoz/RbOpl7yhkdF4mziPn yuLJaHq+vsu/OdqQwKlJ/V/YQLDVkf01hssGnYmHjXgIETY6Bezj4aJ1ioHfNI+UoLRi 3/WQ== X-Gm-Message-State: AOAM531uuo+4fD92uCQsOtNb3HbEiL2GT0+TGynYpgq7MaMdTzdHnZ2+ /KOq4ldIdb396mHn1JD7SgpEHhxnhCAxzho/ X-Google-Smtp-Source: ABdhPJwkDvRayNYjfvgOz+8SbPuT0pAteZ86aTXOTwl7RB2QC8x4Be+aPMILL7aRjI0WFN8ww9D/QA== X-Received: by 2002:a2e:8812:: with SMTP id x18mr3930622ljh.189.1621595105272; Fri, 21 May 2021 04:05:05 -0700 (PDT) Received: from samsung-NP350.local ([217.25.237.143]) by smtp.gmail.com with ESMTPSA id k5sm631954lfu.0.2021.05.21.04.05.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 May 2021 04:05:04 -0700 (PDT) From: Denis Kalashnikov To: openwrt-devel@lists.openwrt.org Cc: Gabor Juhos , Koen Vandeputte , Sergey Ryazanov Subject: [RFC 0/3] ath79: add support for Mikrotik RouterBoard 912G Date: Fri, 21 May 2021 14:05:00 +0300 Message-Id: <20210521110503.5568-1-denis281089@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210521_120508_777584_55F35F93 X-CRM114-Status: GOOD ( 11.48 ) X-Spam-Score: 0.1 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: In the first vertion of these patches I've added a MFD driver that provides API for manipulating shared gpio lines to gpio-latch and nand drivers. Now I just port gpio-latch and rb91x_nand drivers fro [...] Content analysis details: (0.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:22a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [denis281089[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [denis281089[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org In the first vertion of these patches I've added a MFD driver that provides API for manipulating shared gpio lines to gpio-latch and nand drivers. Now I just port gpio-latch and rb91x_nand drivers from ar71xx to ath79 by adding DTS support and new gpio API (gpiod_*). This way turned to be more clear and compact. All is working on my RB912UAG-2HPnD. Except a button and a beeper. The beeper seems is not important thing, but the button is. The button shares gpio 15 with NAND ALE and NAND IO7, but this is not easily supported by the current drivers. May be we need ad hoc driver for button. Or may be there is a more general solution for this problem. Nevertheless all other seems to be working. Denis Kalashnikov (3): ath79: add gpio-latch driver for Mikrotik RouterBoards ath79: add NAND driver for Mikrotik RB91xG series ath79: add support for Mikrotik RouterBoard 912G .../dts/ar9342_mikrotik_routerboard-912g.dts | 233 ++++++++++ .../ath79/files/drivers/gpio/gpio-latch.c | 225 ++++++++++ .../files/drivers/mtd/nand/raw/rb91x_nand.c | 414 ++++++++++++++++++ target/linux/ath79/image/mikrotik.mk | 9 + .../base-files/etc/board.d/02_network | 2 + .../etc/hotplug.d/firmware/10-ath9k-eeprom | 1 + .../base-files/lib/upgrade/platform.sh | 1 + target/linux/ath79/mikrotik/config-default | 1 + .../patches-5.10/939-mikrotik-rb91x.patch | 49 +++ .../patches-5.4/939-mikrotik-rb91x.patch | 44 ++ 10 files changed, 979 insertions(+) create mode 100644 target/linux/ath79/dts/ar9342_mikrotik_routerboard-912g.dts create mode 100644 target/linux/ath79/files/drivers/gpio/gpio-latch.c create mode 100644 target/linux/ath79/files/drivers/mtd/nand/raw/rb91x_nand.c create mode 100644 target/linux/ath79/patches-5.10/939-mikrotik-rb91x.patch create mode 100644 target/linux/ath79/patches-5.4/939-mikrotik-rb91x.patch