Message ID | 20230518152244.2178-4-jszhang@kernel.org (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Conor Dooley |
Headers | show |
Series | riscv: add Bouffalolab bl808 support | expand |
Context | Check | Description |
---|---|---|
conchuod/cover_letter | success | Series has a cover letter |
conchuod/tree_selection | success | Guessed tree name to be for-next at HEAD ac9a78681b92 |
conchuod/fixes_present | success | Fixes tag not required for -next series |
conchuod/maintainers_pattern | success | MAINTAINERS pattern errors before the patch: 6 and now 6 |
conchuod/verify_signedoff | success | Signed-off-by tag matches author and committer |
conchuod/kdoc | success | Errors and warnings before: 0 this patch: 0 |
conchuod/build_rv64_clang_allmodconfig | success | Errors and warnings before: 8 this patch: 8 |
conchuod/module_param | success | Was 0 now: 0 |
conchuod/build_rv64_gcc_allmodconfig | success | Errors and warnings before: 8 this patch: 8 |
conchuod/build_rv32_defconfig | success | Build OK |
conchuod/dtb_warn_rv64 | success | Errors and warnings before: 3 this patch: 3 |
conchuod/header_inline | success | No static functions without inline keyword in header files |
conchuod/checkpatch | warning | WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? |
conchuod/build_rv64_nommu_k210_defconfig | success | Build OK |
conchuod/verify_fixes | success | No Fixes tag |
conchuod/build_rv64_nommu_virt_defconfig | success | Build OK |
On Thu, May 18, 2023 at 11:22:37PM +0800, Jisheng Zhang wrote: > Add bindings doc for Bouffalolab UART Driver > > Signed-off-by: Jisheng Zhang <jszhang@kernel.org> > Acked-by: Palmer Dabbelt <palmer@rivosinc.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> As I said previously, happy to grab the non-serial parts of the series once Greg (or Jiri?) pick the serial bits. Cheers, Conor. > --- > .../serial/bouffalolab,bl808-uart.yaml | 47 +++++++++++++++++++ > 1 file changed, 47 insertions(+) > create mode 100644 Documentation/devicetree/bindings/serial/bouffalolab,bl808-uart.yaml > > diff --git a/Documentation/devicetree/bindings/serial/bouffalolab,bl808-uart.yaml b/Documentation/devicetree/bindings/serial/bouffalolab,bl808-uart.yaml > new file mode 100644 > index 000000000000..0ef858e50efb > --- /dev/null > +++ b/Documentation/devicetree/bindings/serial/bouffalolab,bl808-uart.yaml > @@ -0,0 +1,47 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +# Copyright (C) 2022 Jisheng Zhang <jszhang@kernel.org> > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/serial/bouffalolab,bl808-uart.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Bouffalolab UART Controller > + > +maintainers: > + - Jisheng Zhang <jszhang@kernel.org> > + > +allOf: > + - $ref: serial.yaml# > + > +properties: > + compatible: > + const: bouffalolab,bl808-uart > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + clocks: > + maxItems: 1 > + > +required: > + - compatible > + - reg > + - interrupts > + - clocks > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include <dt-bindings/interrupt-controller/irq.h> > + > + uart0: serial@30002000 { > + compatible = "bouffalolab,bl808-uart"; > + reg = <0x30002000 0x1000>; > + interrupts = <53 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&xtal>; > + }; > +... > -- > 2.40.0 >
Hi Jisheng, On 5/18/23 10:22, Jisheng Zhang wrote: > Add bindings doc for Bouffalolab UART Driver > > Signed-off-by: Jisheng Zhang <jszhang@kernel.org> > Acked-by: Palmer Dabbelt <palmer@rivosinc.com> > --- > .../serial/bouffalolab,bl808-uart.yaml | 47 +++++++++++++++++++ > 1 file changed, 47 insertions(+) > create mode 100644 Documentation/devicetree/bindings/serial/bouffalolab,bl808-uart.yaml > > diff --git a/Documentation/devicetree/bindings/serial/bouffalolab,bl808-uart.yaml b/Documentation/devicetree/bindings/serial/bouffalolab,bl808-uart.yaml > new file mode 100644 > index 000000000000..0ef858e50efb > --- /dev/null > +++ b/Documentation/devicetree/bindings/serial/bouffalolab,bl808-uart.yaml > @@ -0,0 +1,47 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +# Copyright (C) 2022 Jisheng Zhang <jszhang@kernel.org> > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/serial/bouffalolab,bl808-uart.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Bouffalolab UART Controller > + > +maintainers: > + - Jisheng Zhang <jszhang@kernel.org> > + > +allOf: > + - $ref: serial.yaml# > + > +properties: > + compatible: > + const: bouffalolab,bl808-uart > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + clocks: > + maxItems: 1 This is not complete. There are separate APB and module (baud) clocks, as well as a peripheral reset line. If we are going to keep the binding stable, these need to be described up front. (I still don't fully understand the clock tree, and so far that has been the main blocker for me sending a follow-up series with additional bindings for hardware that's otherwise already supported, like the Ethernet MAC.) Regards, Samuel > + > +required: > + - compatible > + - reg > + - interrupts > + - clocks > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include <dt-bindings/interrupt-controller/irq.h> > + > + uart0: serial@30002000 { > + compatible = "bouffalolab,bl808-uart"; > + reg = <0x30002000 0x1000>; > + interrupts = <53 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&xtal>; > + }; > +...
On Thu, May 18, 2023 at 10:00:50PM -0500, Samuel Holland wrote: > Hi Jisheng, Hi Samuel, > > On 5/18/23 10:22, Jisheng Zhang wrote: > > Add bindings doc for Bouffalolab UART Driver > > > > Signed-off-by: Jisheng Zhang <jszhang@kernel.org> > > Acked-by: Palmer Dabbelt <palmer@rivosinc.com> > > --- > > .../serial/bouffalolab,bl808-uart.yaml | 47 +++++++++++++++++++ > > 1 file changed, 47 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/serial/bouffalolab,bl808-uart.yaml > > > > diff --git a/Documentation/devicetree/bindings/serial/bouffalolab,bl808-uart.yaml b/Documentation/devicetree/bindings/serial/bouffalolab,bl808-uart.yaml > > new file mode 100644 > > index 000000000000..0ef858e50efb > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/serial/bouffalolab,bl808-uart.yaml > > @@ -0,0 +1,47 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +# Copyright (C) 2022 Jisheng Zhang <jszhang@kernel.org> > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/serial/bouffalolab,bl808-uart.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Bouffalolab UART Controller > > + > > +maintainers: > > + - Jisheng Zhang <jszhang@kernel.org> > > + > > +allOf: > > + - $ref: serial.yaml# > > + > > +properties: > > + compatible: > > + const: bouffalolab,bl808-uart > > + > > + reg: > > + maxItems: 1 > > + > > + interrupts: > > + maxItems: 1 > > + > > + clocks: > > + maxItems: 1 > > This is not complete. There are separate APB and module (baud) clocks, > as well as a peripheral reset line. If we are going to keep the binding > stable, these need to be described up front. IIUC, the only requirement is to keep the driver compatible with both new dts and old dts. clk tree and reset can be added latter. I have seen sevral such examples from other SoCs' mainline progress. > > (I still don't fully understand the clock tree, and so far that has been > the main blocker for me sending a follow-up series with additional > bindings for hardware that's otherwise already supported, like the > Ethernet MAC.) > > Regards, > Samuel > > > + > > +required: > > + - compatible > > + - reg > > + - interrupts > > + - clocks > > + > > +unevaluatedProperties: false > > + > > +examples: > > + - | > > + #include <dt-bindings/interrupt-controller/irq.h> > > + > > + uart0: serial@30002000 { > > + compatible = "bouffalolab,bl808-uart"; > > + reg = <0x30002000 0x1000>; > > + interrupts = <53 IRQ_TYPE_LEVEL_HIGH>; > > + clocks = <&xtal>; > > + }; > > +... >
On Sun, May 21, 2023 at 05:13:38PM +0800, Jisheng Zhang wrote: > On Thu, May 18, 2023 at 10:00:50PM -0500, Samuel Holland wrote: > > On 5/18/23 10:22, Jisheng Zhang wrote: > > This is not complete. There are separate APB and module (baud) clocks, > > as well as a peripheral reset line. If we are going to keep the binding > > stable, these need to be described up front. > > IIUC, the only requirement is to keep the driver compatible with both > new dts and old dts. clk tree and reset can be added latter. I have seen > sevral such examples from other SoCs' mainline progress. It is generally preferred to add bindings in as complete a state as possible. The driver doesn't need to actually make use of all of the properties though, and can add the other bits as if/when they are required. Cheers, Conor.
diff --git a/Documentation/devicetree/bindings/serial/bouffalolab,bl808-uart.yaml b/Documentation/devicetree/bindings/serial/bouffalolab,bl808-uart.yaml new file mode 100644 index 000000000000..0ef858e50efb --- /dev/null +++ b/Documentation/devicetree/bindings/serial/bouffalolab,bl808-uart.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2022 Jisheng Zhang <jszhang@kernel.org> +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/serial/bouffalolab,bl808-uart.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Bouffalolab UART Controller + +maintainers: + - Jisheng Zhang <jszhang@kernel.org> + +allOf: + - $ref: serial.yaml# + +properties: + compatible: + const: bouffalolab,bl808-uart + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - clocks + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + + uart0: serial@30002000 { + compatible = "bouffalolab,bl808-uart"; + reg = <0x30002000 0x1000>; + interrupts = <53 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&xtal>; + }; +...