Message ID | 20230123151302.368277-1-krzysztof.kozlowski@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/13] dt-bindings: serial: amlogic,meson-uart: allow other serial properties | expand |
On 23/01/2023 16:12, Krzysztof Kozlowski wrote: > Reference common serial properties bindings to allow typical serial > properties: > > meson-axg-jethome-jethub-j100.dtb: serial@23000: 'bluetooth', 'uart-has-rtscts' do not match any of the regexes: 'pinctrl-[0-9]+' > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > --- > .../devicetree/bindings/serial/amlogic,meson-uart.yaml | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > <snip> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
On 1/23/23 16:12, Krzysztof Kozlowski wrote: > > Few Xilinx DTS have power domains in serial node: > > zynqmp-zc1232-revA.dtb: serial@ff000000: Unevaluated properties are not allowed ('power-domains' was unexpected) > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > --- > .../devicetree/bindings/serial/cdns,uart.yaml | 17 ++++++++++++++--- > 1 file changed, 14 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/serial/cdns,uart.yaml b/Documentation/devicetree/bindings/serial/cdns,uart.yaml > index 0c118d5336cc..38925b79cb38 100644 > --- a/Documentation/devicetree/bindings/serial/cdns,uart.yaml > +++ b/Documentation/devicetree/bindings/serial/cdns,uart.yaml > @@ -9,9 +9,6 @@ title: Cadence UART Controller > maintainers: > - Michal Simek <michal.simek@xilinx.com> > > -allOf: > - - $ref: serial.yaml# > - > properties: > compatible: > oneOf: > @@ -46,6 +43,9 @@ properties: > port does not use this pin. > type: boolean > > + power-domains: > + maxItems: 1 > + > required: > - compatible > - reg > @@ -53,6 +53,17 @@ required: > - clocks > - clock-names > > +allOf: > + - $ref: serial.yaml# > + - if: > + properties: > + compatible: > + contains: > + const: cdns,uart-r1p8 > + then: > + properties: > + power-domains: false > + > unevaluatedProperties: false > > examples: > -- > 2.34.1 > Reviewed-by: Michal Simek <michal.simek@amd.com> btw: I was running it and I have seen that properties are checked only on nodes which have status property okay. On disabled nodes properties are not checked. Is this standard behavior/setting? Thanks, Michal
On 1/23/23 16:12, Krzysztof Kozlowski wrote: > CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email. > > > The serial bindings should reference the local (in kernel) serial.yaml, > not the /schemas/serial.yaml. The latter comes from dtschema package > and is a small subset of serial bindings. > > Usage of the local serial.yaml allows typical properties and children: > > xilinx/avnet-ultra96-rev1.dtb: serial@ff000000: Unevaluated properties are not allowed ('bluetooth' were unexpected) > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > --- > Documentation/devicetree/bindings/serial/cdns,uart.yaml | 2 +- > Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/serial/cdns,uart.yaml b/Documentation/devicetree/bindings/serial/cdns,uart.yaml > index 876b8cf1cafb..0c118d5336cc 100644 > --- a/Documentation/devicetree/bindings/serial/cdns,uart.yaml > +++ b/Documentation/devicetree/bindings/serial/cdns,uart.yaml > @@ -10,7 +10,7 @@ maintainers: > - Michal Simek <michal.simek@xilinx.com> > > allOf: > - - $ref: /schemas/serial.yaml# > + - $ref: serial.yaml# > > properties: > compatible: > diff --git a/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml b/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml > index 2f4390e8d4e8..6f65e9a81c29 100644 > --- a/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml > +++ b/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml > @@ -63,7 +63,7 @@ required: > - xlnx,use-parity > > allOf: > - - $ref: /schemas/serial.yaml# > + - $ref: serial.yaml# > - if: > properties: > xlnx,use-parity: > -- > 2.34.1 > Acked-by: Michal Simek <michal.simek@amd.com> Thanks, Michal
On 23/01/2023 16:39, Michal Simek wrote: >> >> examples: >> -- >> 2.34.1 >> > > Reviewed-by: Michal Simek <michal.simek@amd.com> > > btw: I was running it and I have seen that properties are checked only on nodes > which have status property okay. On disabled nodes properties are not checked. > Is this standard behavior/setting? Yes, because disabled nodes might be missing several properties (e.g. clocks or supplies). Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml b/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml index 7822705ad16c..7abf113c966c 100644 --- a/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +++ b/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml @@ -19,6 +19,9 @@ description: | is active since power-on and does not need any clock gating and is usable as very early serial console. +allOf: + - $ref: /schemas/serial/serial.yaml# + properties: compatible: oneOf: @@ -69,7 +72,7 @@ required: - clocks - clock-names -additionalProperties: false +unevaluatedProperties: false examples: - |
Reference common serial properties bindings to allow typical serial properties: meson-axg-jethome-jethub-j100.dtb: serial@23000: 'bluetooth', 'uart-has-rtscts' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- .../devicetree/bindings/serial/amlogic,meson-uart.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)