From patchwork Wed Sep 22 07:32:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ChiaWei Wang X-Patchwork-Id: 12510203 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C58EC433EF for ; Wed, 22 Sep 2021 10:44:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3215F6126A for ; Wed, 22 Sep 2021 10:44:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3215F6126A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=Zh8xqioCbilhCIu0VREIyFsfXpPHW9IndxvcwrDsKWg=; b=dhU9X0Gyhxsv94 LHQbIyozs1Og7e9TBALjOqs7S59uACXvbsRRfa75c95RdWtUPQbaYxeiYEJ8Ho6X3WUmse4853uWY qemlBatqEE/c3bUARqy/6ZOk9hOQ3wNY0qM4pT5+pcAzwPRNPtwtVBr/h2zd+77/rmVsGl8XzJQ5O 1zuijpdR7C8G8vlXl0tSbIDlYcyY3pNzZzseAWBFS50JH0+Fy1uTFpqw7uTVHPkVPPELttnijgRtE Fws5ar8bzx8XWbVKTgqT6h29H8z7LiP35c9MJLDF7eNCYPHfz5FPf63rpMcH9NFFk8yZbGujS1w5m Qc39fO1530ZV3917qrIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSzi4-0083so-Bc; Wed, 22 Sep 2021 10:42:41 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSzaZ-007qPh-US for linux-arm-kernel@bombadil.infradead.org; Wed, 22 Sep 2021 10:34:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:Message-ID: Date:Subject:CC:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=dmBXVyap710UqgAWY5wPvWuWNlpGHVNtRsL+h3cRdHE=; b=QWz0UQRtdBwaT3PFlB5QOiDm/M CkNMLTdN1qcbzipXxUpkj7grwpOQNymzvCHs61UFNR+aQ5ZcFLRTGP51zVhGrGZgkRv3rdjc3LPNr lgpbalBg9MxmhnGKLy7f9s/KHudIljrXgp00BSPVoQiC06i9okjEuDYYOwGvNQNTsyMrwYaC7ol9G GcD+AW9lxKPq/l65tFlBsLR8BXN5C+FSCY9XBZzORml/3wl4D5z3dS5AhTuJX0o/nNFVhbOgCSLoA xISNhXGBOOzdhr/TJipl179u1YEtsf1lo9h8sgWg+AS55o0qmtBg6u5vb/u5oEzZ8X5C0AcToX5lZ oOUp/+Sw==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSwkn-004wlj-7i for linux-arm-kernel@lists.infradead.org; Wed, 22 Sep 2021 07:33:20 +0000 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 18M7CPKR096731; Wed, 22 Sep 2021 15:12:25 +0800 (GMT-8) (envelope-from chiawei_wang@aspeedtech.com) Received: from ChiaWeiWang-PC.aspeed.com (192.168.2.66) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 22 Sep 2021 15:32:43 +0800 From: Chia-Wei Wang To: , , , , , , , CC: , Subject: [PATCH v6 0/4] arm: aspeed: Add UART routing support Date: Wed, 22 Sep 2021 15:32:37 +0800 Message-ID: <20210922073241.14119-1-chiawei_wang@aspeedtech.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [192.168.2.66] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 18M7CPKR096731 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210922_083317_812436_DAC6FAF5 X-CRM114-Status: GOOD ( 12.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add UART routing driver and the device tree nodes. v6: - Fix another typo in YAML file - Move sysfs description from bindings to ABI document v5: - Fix typo in YAML file to solve the compatible string not found error v4: - Convert aspeed-lpc bindings to YAML schema to resolve dependecy issues v3: - Add individual bindings in YAML - Add support for AST24xx (AST25xx shares the same design) - Add more explanation for the sysfs ABI v2: - Add dt-bindings - Add ABI documents for the exported sysfs interface - Revise driver implementation suggested by Joel Chia-Wei Wang (4): dt-bindings: mfd: aspeed-lpc: Convert to YAML schema dt-bindings: aspeed: Add UART routing controller soc: aspeed: Add UART routing support ARM: dts: aspeed: Add uart routing to device tree .../testing/sysfs-driver-aspeed-uart-routing | 27 + .../devicetree/bindings/mfd/aspeed-lpc.txt | 157 ----- .../devicetree/bindings/mfd/aspeed-lpc.yaml | 191 ++++++ .../bindings/soc/aspeed/uart-routing.yaml | 56 ++ arch/arm/boot/dts/aspeed-g4.dtsi | 6 + arch/arm/boot/dts/aspeed-g5.dtsi | 6 + arch/arm/boot/dts/aspeed-g6.dtsi | 6 + drivers/soc/aspeed/Kconfig | 10 + drivers/soc/aspeed/Makefile | 9 +- drivers/soc/aspeed/aspeed-uart-routing.c | 603 ++++++++++++++++++ 10 files changed, 910 insertions(+), 161 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-driver-aspeed-uart-routing delete mode 100644 Documentation/devicetree/bindings/mfd/aspeed-lpc.txt create mode 100644 Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml create mode 100644 Documentation/devicetree/bindings/soc/aspeed/uart-routing.yaml create mode 100644 drivers/soc/aspeed/aspeed-uart-routing.c