2021-09-09 10:32:02

by ChiaWei Wang

[permalink] [raw]
Subject: [PATCH v3 1/3] dt-bindings: aspeed: Add UART routing controller

Add dt-bindings for Aspeed UART routing controller.

Signed-off-by: Oskar Senft <[email protected]>
Signed-off-by: Chia-Wei Wang <[email protected]>
---
.../bindings/soc/aspeed/uart-routing.yaml | 70 +++++++++++++++++++
1 file changed, 70 insertions(+)
create mode 100644 Documentation/devicetree/bindings/soc/aspeed/uart-routing.yaml

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..e7071f1abc03
--- /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 <[email protected]>
+ - Chia-Wei Wang <[email protected]>
+
+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).
+
+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: espi-routing@98 {
+ compatible = "aspeed,ast2600-uart-routing";
+ reg = <0x98 0x8>;
+ };
+ };
--
2.17.1


2021-09-09 12:47:20

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v3 1/3] dt-bindings: aspeed: Add UART routing controller

On Thu, 09 Sep 2021 18:29:05 +0800, Chia-Wei Wang wrote:
> Add dt-bindings for Aspeed UART routing controller.
>
> Signed-off-by: Oskar Senft <[email protected]>
> Signed-off-by: Chia-Wei Wang <[email protected]>
> ---
> .../bindings/soc/aspeed/uart-routing.yaml | 70 +++++++++++++++++++
> 1 file changed, 70 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/soc/aspeed/uart-routing.yaml
>

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/soc/aspeed/uart-routing.example.dt.yaml:0:0: /example-0/lpc@1e789000: failed to match any schema with compatible: ['aspeed,ast2600-lpc-v2', 'simple-mfd', 'syscon']

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1526149

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.

2021-09-10 02:06:17

by ChiaWei Wang

[permalink] [raw]
Subject: RE: [PATCH v3 1/3] dt-bindings: aspeed: Add UART routing controller

Hi Rob,

> From: Rob Herring <[email protected]>
> Sent: Thursday, September 9, 2021 8:33 PM
>
> On Thu, 09 Sep 2021 18:29:05 +0800, Chia-Wei Wang wrote:
> > Add dt-bindings for Aspeed UART routing controller.
> >
> > Signed-off-by: Oskar Senft <[email protected]>
> > Signed-off-by: Chia-Wei Wang <[email protected]>
> > ---
> > .../bindings/soc/aspeed/uart-routing.yaml | 70
> +++++++++++++++++++
> > 1 file changed, 70 insertions(+)
> > create mode 100644
> > Documentation/devicetree/bindings/soc/aspeed/uart-routing.yaml
> >
>
> My bot found errors running 'make DT_CHECKER_FLAGS=-m
> dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
>
> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> Documentation/devicetree/bindings/soc/aspeed/uart-routing.example.dt.yaml:
> 0:0: /example-0/lpc@1e789000: failed to match any schema with compatible:
> ['aspeed,ast2600-lpc-v2', 'simple-mfd', 'syscon']

The "aspeed,ast2600-lpc-v2" compatible string is described in the .txt file 'aspeed-lpc.txt'.
Do we have to firstly convert the text file into YAML one to resolve this dependency issue?

Regards,
Chiawei

>
> doc reference errors (make refcheckdocs):
>
> See https://patchwork.ozlabs.org/patch/1526149
>
> This check can fail if there are any dependencies. The base for a patch series is
> generally the most recent rc1.
>
> If you already ran 'make dt_binding_check' and didn't see the above error(s),
> then make sure 'yamllint' is installed and dt-schema is up to
> date:
>
> pip3 install dtschema --upgrade
>
> Please check and re-submit.

2021-09-10 15:59:53

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v3 1/3] dt-bindings: aspeed: Add UART routing controller

On Thu, Sep 9, 2021 at 8:38 PM ChiaWei Wang <[email protected]> wrote:
>
> Hi Rob,
>
> > From: Rob Herring <[email protected]>
> > Sent: Thursday, September 9, 2021 8:33 PM
> >
> > On Thu, 09 Sep 2021 18:29:05 +0800, Chia-Wei Wang wrote:
> > > Add dt-bindings for Aspeed UART routing controller.
> > >
> > > Signed-off-by: Oskar Senft <[email protected]>
> > > Signed-off-by: Chia-Wei Wang <[email protected]>
> > > ---
> > > .../bindings/soc/aspeed/uart-routing.yaml | 70
> > +++++++++++++++++++
> > > 1 file changed, 70 insertions(+)
> > > create mode 100644
> > > Documentation/devicetree/bindings/soc/aspeed/uart-routing.yaml
> > >
> >
> > My bot found errors running 'make DT_CHECKER_FLAGS=-m
> > dt_binding_check'
> > on your patch (DT_CHECKER_FLAGS is new in v5.13):
> >
> > yamllint warnings/errors:
> >
> > dtschema/dtc warnings/errors:
> > Documentation/devicetree/bindings/soc/aspeed/uart-routing.example.dt.yaml:
> > 0:0: /example-0/lpc@1e789000: failed to match any schema with compatible:
> > ['aspeed,ast2600-lpc-v2', 'simple-mfd', 'syscon']
>
> The "aspeed,ast2600-lpc-v2" compatible string is described in the .txt file 'aspeed-lpc.txt'.
> Do we have to firstly convert the text file into YAML one to resolve this dependency issue?

Yes. This is a significant change to the LPC block binding.

Rob

2021-09-13 01:19:38

by ChiaWei Wang

[permalink] [raw]
Subject: RE: [PATCH v3 1/3] dt-bindings: aspeed: Add UART routing controller

> From: Rob Herring <[email protected]>
> Sent: Friday, September 10, 2021 11:58 PM
>
> On Thu, Sep 9, 2021 at 8:38 PM ChiaWei Wang
> <[email protected]> wrote:
> >
> > Hi Rob,
> >
> > > From: Rob Herring <[email protected]>
> > > Sent: Thursday, September 9, 2021 8:33 PM
> > >
> > > On Thu, 09 Sep 2021 18:29:05 +0800, Chia-Wei Wang wrote:
> > > > Add dt-bindings for Aspeed UART routing controller.
> > > >
> > > > Signed-off-by: Oskar Senft <[email protected]>
> > > > Signed-off-by: Chia-Wei Wang <[email protected]>
> > > > ---
> > > > .../bindings/soc/aspeed/uart-routing.yaml | 70
> > > +++++++++++++++++++
> > > > 1 file changed, 70 insertions(+)
> > > > create mode 100644
> > > > Documentation/devicetree/bindings/soc/aspeed/uart-routing.yaml
> > > >
> > >
> > > My bot found errors running 'make DT_CHECKER_FLAGS=-m
> > > dt_binding_check'
> > > on your patch (DT_CHECKER_FLAGS is new in v5.13):
> > >
> > > yamllint warnings/errors:
> > >
> > > dtschema/dtc warnings/errors:
> > >
> Documentation/devicetree/bindings/soc/aspeed/uart-routing.example.dt.yaml:
> > > 0:0: /example-0/lpc@1e789000: failed to match any schema with
> compatible:
> > > ['aspeed,ast2600-lpc-v2', 'simple-mfd', 'syscon']
> >
> > The "aspeed,ast2600-lpc-v2" compatible string is described in the .txt file
> 'aspeed-lpc.txt'.
> > Do we have to firstly convert the text file into YAML one to resolve this
> dependency issue?
>
> Yes. This is a significant change to the LPC block binding.

Understood. Will send a v4 patch which includes the YAML conversion.
Thanks.

Chiawei