From mboxrd@z Thu Jan 1 00:00:00 1970 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=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 E50BBC433FE for ; Thu, 16 Sep 2021 20:19:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C52E060FBF for ; Thu, 16 Sep 2021 20:19:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233390AbhIPUUj (ORCPT ); Thu, 16 Sep 2021 16:20:39 -0400 Received: from mail-oo1-f54.google.com ([209.85.161.54]:45620 "EHLO mail-oo1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbhIPUUP (ORCPT ); Thu, 16 Sep 2021 16:20:15 -0400 Received: by mail-oo1-f54.google.com with SMTP id m14-20020a4ad50e000000b002912a944a47so2445070oos.12; Thu, 16 Sep 2021 13:18:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ofqDCzJVJ7CG7oCu1wZMMmGlXuT7MezSEWFRzUjJBXM=; b=oVwdF7BfebzC6/kDupKnWPSG61RtPZjODvuvvaCAc/FOLsjyx6MyusGNSZGglP+EMp eT/HMlV6oGPdZgfXrzeeFfdx471w5wfHCGIHH36MjyQ4K2WfiOxJl2NZ2KoRbioaMdXS v8aToqM2gzf1cQ9b9f+Ql6Bbukrh5aT6fRxI5uBB9mN0fd8JPTP7UbPoF46s2mAXNAOw DUoTf1G7T8reDtSKKvovf1z1t/He1L33xoF7dcFuVUp6V/R2mwyLZL9yyicVJpbWsP6L 57d6i7NX5pytNFbi7PBEpGeYgVeGP/BtqOGuhi+EXdf41RHLBS23bJ7yomtxbnZo4NfA xUcQ== X-Gm-Message-State: AOAM531flBYlsExZvuFCq+N9MO5RbsbUA1lDQ6YWGM3qYRXH048c0Gua +Rr0bmD16hvXG12h7VJfWg== X-Google-Smtp-Source: ABdhPJwo9TXcC5oMk0jmObTfxCKEHKU6py7NTfYcL2KNnjSNHzC/7WpXjYyYx7EIeF4CtCmvg4x5Vw== X-Received: by 2002:a4a:984b:: with SMTP id z11mr5915240ooi.76.1631823534247; Thu, 16 Sep 2021 13:18:54 -0700 (PDT) Received: from robh.at.kernel.org (107-211-252-53.lightspeed.cicril.sbcglobal.net. [107.211.252.53]) by smtp.gmail.com with ESMTPSA id s8sm954281otd.76.2021.09.16.13.18.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 13:18:53 -0700 (PDT) Received: (nullmailer pid 1429271 invoked by uid 1000); Thu, 16 Sep 2021 20:18:51 -0000 Date: Thu, 16 Sep 2021 15:18:51 -0500 From: Rob Herring To: Chia-Wei Wang Cc: joel@jms.id.au, andrew@aj.id.au, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, openbmc@lists.ozlabs.org, osk@google.com, yulei.sh@bytedance.com Subject: Re: [PATCH v5 2/4] dt-bindings: aspeed: Add UART routing controller Message-ID: References: <20210916092515.10553-1-chiawei_wang@aspeedtech.com> <20210916092515.10553-3-chiawei_wang@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210916092515.10553-3-chiawei_wang@aspeedtech.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 16, 2021 at 05:25:13PM +0800, Chia-Wei Wang wrote: > Add dt-bindings for Aspeed UART routing controller. > > Signed-off-by: Oskar Senft > Signed-off-by: Chia-Wei Wang > --- > .../devicetree/bindings/mfd/aspeed-lpc.yaml | 4 ++ > .../bindings/soc/aspeed/uart-routing.yaml | 70 +++++++++++++++++++ > 2 files changed, 74 insertions(+) > create mode 100644 Documentation/devicetree/bindings/soc/aspeed/uart-routing.yaml > > diff --git a/Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml b/Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml > index 54f080df5e2f..697331d840a0 100644 > --- a/Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml > +++ b/Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml > @@ -142,6 +142,10 @@ patternProperties: > - interrupts > - snoop-ports > > + "^uart-routing@[0-9a-f]+$": > + $ref: /schemas/soc/aspeed/uart-routing.yaml# > + description: The UART routing control under LPC register space > + > required: > - compatible > - reg > diff --git a/Documentation/devicetree/bindings/soc/aspeed/uart-routing.yaml b/Documentation/devicetree/bindings/soc/aspeed/uart-routing.yaml > new file mode 100644 > index 000000000000..534b2a9340ce > --- /dev/null > +++ b/Documentation/devicetree/bindings/soc/aspeed/uart-routing.yaml > @@ -0,0 +1,70 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +# # Copyright (c) 2018 Google LLC > +# # Copyright (c) 2021 Aspeed Technology Inc. > +%YAML 1.2 > +--- > +$id: "http://devicetree.org/schemas/soc/aspeed/uart-routing.yaml#" > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > + > +title: Aspeed UART Routing Controller > + > +maintainers: > + - Oskar Senft > + - Chia-Wei Wang > + > +description: > + The Aspeed UART routing control allow to dynamically route the inputs for > + the built-in UARTS and physical serial I/O ports. > + > + This allows, for example, to connect the output of UART to another UART. > + This can be used to enable Host <-> BMC communication via UARTs, e.g. to > + allow access to the Host's serial console. > + > + This driver is for the BMC side. The sysfs files allow the BMC userspace > + which owns the system configuration policy, to configure how UARTs and > + physical serial I/O ports are routed. > + > + Two types of files, uart* and io*, are presented in sysfs. The uart* > + configures the input signal of a UART controller whereas io* configures > + that of a physical serial port. > + > + When read, each file shows the list of available options with currently > + selected option marked by brackets "[]". The list of available options > + depends on the selected file. > + > + e.g. > + cat /sys/bus/platform/drivers/aspeed-uart-routing/*.uart_routing/uart1 > + [io1] io2 io3 io4 uart2 uart3 uart4 io6 > + > + In this case, UART1 gets its input from IO1 (physical serial port 1). This is about documenting the hardware, not an OS driver. sysfs files have their own documentation. > + > +properties: > + compatible: > + items: > + - enum: > + - aspeed,ast2400-uart-routing > + - aspeed,ast2500-uart-routing > + - aspeed,ast2600-uart-routing > + reg: > + maxItems: 1 > + > +required: > + - compatible > + > +additionalProperties: false > + > +examples: > + - | > + lpc: lpc@1e789000 { > + compatible = "aspeed,ast2600-lpc-v2", "simple-mfd", "syscon"; > + reg = <0x1e789000 0x1000>; > + > + #address-cells = <1>; > + #size-cells = <1>; > + ranges = <0x0 0x1e789000 0x1000>; > + > + uart_routing: uart-routing@98 { > + compatible = "aspeed,ast2600-uart-routing"; > + reg = <0x98 0x8>; > + }; > + }; > -- > 2.17.1 > > From mboxrd@z Thu Jan 1 00:00:00 1970 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=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 56075C433EF for ; Thu, 16 Sep 2021 20:19:30 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 B8C9860FBF for ; Thu, 16 Sep 2021 20:19:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B8C9860FBF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4H9T2S0DGKz2yMN for ; Fri, 17 Sep 2021 06:19:28 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=209.85.161.41; helo=mail-oo1-f41.google.com; envelope-from=robherring2@gmail.com; receiver=) Received: from mail-oo1-f41.google.com (mail-oo1-f41.google.com [209.85.161.41]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4H9T1t0ZDyz2yJZ; Fri, 17 Sep 2021 06:18:57 +1000 (AEST) Received: by mail-oo1-f41.google.com with SMTP id b5-20020a4ac285000000b0029038344c3dso2459706ooq.8; Thu, 16 Sep 2021 13:18:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ofqDCzJVJ7CG7oCu1wZMMmGlXuT7MezSEWFRzUjJBXM=; b=3SZF7Elx0lHx7E8I+YgddKzKcqceFFVMdjz2QC004Rwd+wzxnR1hZ9kjnAjqdfZbNF MG73ixL7G0qmz1trehdy95fZBEWnOUkpXgCBYrsYzuVocVTWC8AHz9jXYIHcOLKjzyx0 fY/asSOCzwU4aPH7CiXFEoeTEE/BgAh8wkc1/4oaYZEh1ZB5CBvrowxehl68s1JQ6baf E0NTGNulXf0ZMcSjBHBDMhCwmgEHm5S+1skL6ZYT3U2PPp+3x0+qPHdhkwGcgXiSSCsE hdDsroBI+vrhlfWUV2VVMxbH9Qy7Tpgd1F+83H6zfVPy5Wx0kV4QDRQCLrJctk5i39Cc uYdA== X-Gm-Message-State: AOAM5334JxKQ4BEXzeFL9Ih4eXlxXcj+Z6JHxcUTKPCkGKOBz8EG5gGN GdRnPqGJf7ejcGQj+LqvMw== X-Google-Smtp-Source: ABdhPJwo9TXcC5oMk0jmObTfxCKEHKU6py7NTfYcL2KNnjSNHzC/7WpXjYyYx7EIeF4CtCmvg4x5Vw== X-Received: by 2002:a4a:984b:: with SMTP id z11mr5915240ooi.76.1631823534247; Thu, 16 Sep 2021 13:18:54 -0700 (PDT) Received: from robh.at.kernel.org (107-211-252-53.lightspeed.cicril.sbcglobal.net. [107.211.252.53]) by smtp.gmail.com with ESMTPSA id s8sm954281otd.76.2021.09.16.13.18.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 13:18:53 -0700 (PDT) Received: (nullmailer pid 1429271 invoked by uid 1000); Thu, 16 Sep 2021 20:18:51 -0000 Date: Thu, 16 Sep 2021 15:18:51 -0500 From: Rob Herring To: Chia-Wei Wang Subject: Re: [PATCH v5 2/4] dt-bindings: aspeed: Add UART routing controller Message-ID: References: <20210916092515.10553-1-chiawei_wang@aspeedtech.com> <20210916092515.10553-3-chiawei_wang@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210916092515.10553-3-chiawei_wang@aspeedtech.com> X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-aspeed@lists.ozlabs.org, andrew@aj.id.au, openbmc@lists.ozlabs.org, yulei.sh@bytedance.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, osk@google.com Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" On Thu, Sep 16, 2021 at 05:25:13PM +0800, Chia-Wei Wang wrote: > Add dt-bindings for Aspeed UART routing controller. > > Signed-off-by: Oskar Senft > Signed-off-by: Chia-Wei Wang > --- > .../devicetree/bindings/mfd/aspeed-lpc.yaml | 4 ++ > .../bindings/soc/aspeed/uart-routing.yaml | 70 +++++++++++++++++++ > 2 files changed, 74 insertions(+) > create mode 100644 Documentation/devicetree/bindings/soc/aspeed/uart-routing.yaml > > diff --git a/Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml b/Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml > index 54f080df5e2f..697331d840a0 100644 > --- a/Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml > +++ b/Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml > @@ -142,6 +142,10 @@ patternProperties: > - interrupts > - snoop-ports > > + "^uart-routing@[0-9a-f]+$": > + $ref: /schemas/soc/aspeed/uart-routing.yaml# > + description: The UART routing control under LPC register space > + > required: > - compatible > - reg > diff --git a/Documentation/devicetree/bindings/soc/aspeed/uart-routing.yaml b/Documentation/devicetree/bindings/soc/aspeed/uart-routing.yaml > new file mode 100644 > index 000000000000..534b2a9340ce > --- /dev/null > +++ b/Documentation/devicetree/bindings/soc/aspeed/uart-routing.yaml > @@ -0,0 +1,70 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +# # Copyright (c) 2018 Google LLC > +# # Copyright (c) 2021 Aspeed Technology Inc. > +%YAML 1.2 > +--- > +$id: "http://devicetree.org/schemas/soc/aspeed/uart-routing.yaml#" > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > + > +title: Aspeed UART Routing Controller > + > +maintainers: > + - Oskar Senft > + - Chia-Wei Wang > + > +description: > + The Aspeed UART routing control allow to dynamically route the inputs for > + the built-in UARTS and physical serial I/O ports. > + > + This allows, for example, to connect the output of UART to another UART. > + This can be used to enable Host <-> BMC communication via UARTs, e.g. to > + allow access to the Host's serial console. > + > + This driver is for the BMC side. The sysfs files allow the BMC userspace > + which owns the system configuration policy, to configure how UARTs and > + physical serial I/O ports are routed. > + > + Two types of files, uart* and io*, are presented in sysfs. The uart* > + configures the input signal of a UART controller whereas io* configures > + that of a physical serial port. > + > + When read, each file shows the list of available options with currently > + selected option marked by brackets "[]". The list of available options > + depends on the selected file. > + > + e.g. > + cat /sys/bus/platform/drivers/aspeed-uart-routing/*.uart_routing/uart1 > + [io1] io2 io3 io4 uart2 uart3 uart4 io6 > + > + In this case, UART1 gets its input from IO1 (physical serial port 1). This is about documenting the hardware, not an OS driver. sysfs files have their own documentation. > + > +properties: > + compatible: > + items: > + - enum: > + - aspeed,ast2400-uart-routing > + - aspeed,ast2500-uart-routing > + - aspeed,ast2600-uart-routing > + reg: > + maxItems: 1 > + > +required: > + - compatible > + > +additionalProperties: false > + > +examples: > + - | > + lpc: lpc@1e789000 { > + compatible = "aspeed,ast2600-lpc-v2", "simple-mfd", "syscon"; > + reg = <0x1e789000 0x1000>; > + > + #address-cells = <1>; > + #size-cells = <1>; > + ranges = <0x0 0x1e789000 0x1000>; > + > + uart_routing: uart-routing@98 { > + compatible = "aspeed,ast2600-uart-routing"; > + reg = <0x98 0x8>; > + }; > + }; > -- > 2.17.1 > > From mboxrd@z Thu Jan 1 00:00:00 1970 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=-14.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 4C652C433EF for ; Thu, 16 Sep 2021 20:22:04 +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 1E7D161246 for ; Thu, 16 Sep 2021 20:22:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1E7D161246 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2s7EtC4214gBOldTswdm55AHSsw+RLmGMevlAyjzb9E=; b=etath4cCr916O4 GUnatiWdTyvt8C2u2C1saCVWlk9GwiZ63SjAV6/Qab/QLgFoTy+em2QSumdIyUPGo+UZRhkRoVdhb +VcnULYtl+qJ2d0WOY8sxzaTFs596f3Eu7kMGsOrfYdgiD2L/X3+NgO/jQ5wP5vS9uYRC9G9JpK5T V9JqbkSCO8Pcyd3mgJMWAtxtBzN0O+SDR4V08Wn848y68FlgsFkUvMB+M6oqh7RyfvlXY1FHZ82fT LWFSDXKzLA/OC/HnvSo7ircDRR4ZgJ81Cjd3vvNCQW1uhIlx678nJLLLBYPjjWlTNQ42VOTEjubbd eTcv6UrmcAMeyhJQbhZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQxqV-00CKrX-HM; Thu, 16 Sep 2021 20:18:59 +0000 Received: from mail-oo1-f42.google.com ([209.85.161.42]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQxqR-00CKqz-I1 for linux-arm-kernel@lists.infradead.org; Thu, 16 Sep 2021 20:18:57 +0000 Received: by mail-oo1-f42.google.com with SMTP id t2-20020a4ae9a2000000b0028c7144f106so2454206ood.6 for ; Thu, 16 Sep 2021 13:18:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ofqDCzJVJ7CG7oCu1wZMMmGlXuT7MezSEWFRzUjJBXM=; b=Dik1Xa6WJWhM/YDZ8WZt3sp3fiUl0gZ5jRYl3SXxbcpyNtQlbVe9G77JdZZevicFeF BIe/Iue66NVn9Qjgw8wePDqusMVvvVOvqYQAt/92ygeFNJYG7G3l91UvpHXZsBC+RPbw uHxUp6jTjYw7BZZWVm4zAsDBq4s0UsGmuJQO6r8reRZulwy4zcSEUCTfPzqWNe9poX5I VGo2hEcp//AJtAqRhe9rDx5givWplnhjefi2i+gHQFw6ojlm8iO8tXuOBx8i8rRWAnFk dyTHyFSmeVqgdHbXbIg/lenWIdUfY9YKiM4Nb/I5244Iqe60VnzV4FzVnUmaVB0NNRQ+ 2X6A== X-Gm-Message-State: AOAM533Lc3A8IjEV7cqfcQaB/CZd0urHxfMWRtB/bY6239Y9QZSD33Vh LzSvKCMnp5Ls1GsZvoKm7g== X-Google-Smtp-Source: ABdhPJwo9TXcC5oMk0jmObTfxCKEHKU6py7NTfYcL2KNnjSNHzC/7WpXjYyYx7EIeF4CtCmvg4x5Vw== X-Received: by 2002:a4a:984b:: with SMTP id z11mr5915240ooi.76.1631823534247; Thu, 16 Sep 2021 13:18:54 -0700 (PDT) Received: from robh.at.kernel.org (107-211-252-53.lightspeed.cicril.sbcglobal.net. [107.211.252.53]) by smtp.gmail.com with ESMTPSA id s8sm954281otd.76.2021.09.16.13.18.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 13:18:53 -0700 (PDT) Received: (nullmailer pid 1429271 invoked by uid 1000); Thu, 16 Sep 2021 20:18:51 -0000 Date: Thu, 16 Sep 2021 15:18:51 -0500 From: Rob Herring To: Chia-Wei Wang Cc: joel@jms.id.au, andrew@aj.id.au, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, openbmc@lists.ozlabs.org, osk@google.com, yulei.sh@bytedance.com Subject: Re: [PATCH v5 2/4] dt-bindings: aspeed: Add UART routing controller Message-ID: References: <20210916092515.10553-1-chiawei_wang@aspeedtech.com> <20210916092515.10553-3-chiawei_wang@aspeedtech.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210916092515.10553-3-chiawei_wang@aspeedtech.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210916_131855_643508_E8C5682C X-CRM114-Status: GOOD ( 26.24 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Sep 16, 2021 at 05:25:13PM +0800, Chia-Wei Wang wrote: > Add dt-bindings for Aspeed UART routing controller. > > Signed-off-by: Oskar Senft > Signed-off-by: Chia-Wei Wang > --- > .../devicetree/bindings/mfd/aspeed-lpc.yaml | 4 ++ > .../bindings/soc/aspeed/uart-routing.yaml | 70 +++++++++++++++++++ > 2 files changed, 74 insertions(+) > create mode 100644 Documentation/devicetree/bindings/soc/aspeed/uart-routing.yaml > > diff --git a/Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml b/Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml > index 54f080df5e2f..697331d840a0 100644 > --- a/Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml > +++ b/Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml > @@ -142,6 +142,10 @@ patternProperties: > - interrupts > - snoop-ports > > + "^uart-routing@[0-9a-f]+$": > + $ref: /schemas/soc/aspeed/uart-routing.yaml# > + description: The UART routing control under LPC register space > + > required: > - compatible > - reg > diff --git a/Documentation/devicetree/bindings/soc/aspeed/uart-routing.yaml b/Documentation/devicetree/bindings/soc/aspeed/uart-routing.yaml > new file mode 100644 > index 000000000000..534b2a9340ce > --- /dev/null > +++ b/Documentation/devicetree/bindings/soc/aspeed/uart-routing.yaml > @@ -0,0 +1,70 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +# # Copyright (c) 2018 Google LLC > +# # Copyright (c) 2021 Aspeed Technology Inc. > +%YAML 1.2 > +--- > +$id: "http://devicetree.org/schemas/soc/aspeed/uart-routing.yaml#" > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > + > +title: Aspeed UART Routing Controller > + > +maintainers: > + - Oskar Senft > + - Chia-Wei Wang > + > +description: > + The Aspeed UART routing control allow to dynamically route the inputs for > + the built-in UARTS and physical serial I/O ports. > + > + This allows, for example, to connect the output of UART to another UART. > + This can be used to enable Host <-> BMC communication via UARTs, e.g. to > + allow access to the Host's serial console. > + > + This driver is for the BMC side. The sysfs files allow the BMC userspace > + which owns the system configuration policy, to configure how UARTs and > + physical serial I/O ports are routed. > + > + Two types of files, uart* and io*, are presented in sysfs. The uart* > + configures the input signal of a UART controller whereas io* configures > + that of a physical serial port. > + > + When read, each file shows the list of available options with currently > + selected option marked by brackets "[]". The list of available options > + depends on the selected file. > + > + e.g. > + cat /sys/bus/platform/drivers/aspeed-uart-routing/*.uart_routing/uart1 > + [io1] io2 io3 io4 uart2 uart3 uart4 io6 > + > + In this case, UART1 gets its input from IO1 (physical serial port 1). This is about documenting the hardware, not an OS driver. sysfs files have their own documentation. > + > +properties: > + compatible: > + items: > + - enum: > + - aspeed,ast2400-uart-routing > + - aspeed,ast2500-uart-routing > + - aspeed,ast2600-uart-routing > + reg: > + maxItems: 1 > + > +required: > + - compatible > + > +additionalProperties: false > + > +examples: > + - | > + lpc: lpc@1e789000 { > + compatible = "aspeed,ast2600-lpc-v2", "simple-mfd", "syscon"; > + reg = <0x1e789000 0x1000>; > + > + #address-cells = <1>; > + #size-cells = <1>; > + ranges = <0x0 0x1e789000 0x1000>; > + > + uart_routing: uart-routing@98 { > + compatible = "aspeed,ast2600-uart-routing"; > + reg = <0x98 0x8>; > + }; > + }; > -- > 2.17.1 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel