-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dt-bindings: can: sja1000: Convert to json-schema
Convert the NXP SJA1000 CAN Controller Device Tree binding documentation to json-schema. Update the example to match reality. Link: https://lore.kernel.org/all/20220710115248.190280-2-biju.das.jz@bp.renesas.com Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
- Loading branch information
Biju Das
authored and
Marc Kleine-Budde
committed
Jul 19, 2022
1 parent
8575f31
commit f6b8061
Showing
2 changed files
with
101 additions
and
58 deletions.
There are no files selected for viewing
101 changes: 101 additions & 0 deletions
101
Documentation/devicetree/bindings/net/can/nxp,sja1000.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/net/can/nxp,sja1000.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Memory mapped SJA1000 CAN controller from NXP (formerly Philips) | ||
|
||
maintainers: | ||
- Wolfgang Grandegger <wg@grandegger.com> | ||
|
||
properties: | ||
compatible: | ||
enum: | ||
- nxp,sja1000 | ||
- technologic,sja1000 | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
interrupts: | ||
maxItems: 1 | ||
|
||
reg-io-width: | ||
$ref: /schemas/types.yaml#/definitions/uint32 | ||
description: I/O register width (in bytes) implemented by this device | ||
default: 1 | ||
enum: [ 1, 2, 4 ] | ||
|
||
nxp,external-clock-frequency: | ||
$ref: /schemas/types.yaml#/definitions/uint32 | ||
default: 16000000 | ||
description: | | ||
Frequency of the external oscillator clock in Hz. | ||
The internal clock frequency used by the SJA1000 is half of that value. | ||
nxp,tx-output-mode: | ||
$ref: /schemas/types.yaml#/definitions/uint32 | ||
enum: [ 0, 1, 2, 3 ] | ||
default: 1 | ||
description: | | ||
operation mode of the TX output control logic. Valid values are: | ||
<0> : bi-phase output mode | ||
<1> : normal output mode (default) | ||
<2> : test output mode | ||
<3> : clock output mode | ||
nxp,tx-output-config: | ||
$ref: /schemas/types.yaml#/definitions/uint32 | ||
default: 0x02 | ||
description: | | ||
TX output pin configuration. Valid values are any one of the below | ||
or combination of TX0 and TX1: | ||
<0x01> : TX0 invert | ||
<0x02> : TX0 pull-down (default) | ||
<0x04> : TX0 pull-up | ||
<0x06> : TX0 push-pull | ||
<0x08> : TX1 invert | ||
<0x10> : TX1 pull-down | ||
<0x20> : TX1 pull-up | ||
<0x30> : TX1 push-pull | ||
nxp,clock-out-frequency: | ||
$ref: /schemas/types.yaml#/definitions/uint32 | ||
description: | | ||
clock frequency in Hz on the CLKOUT pin. | ||
If not specified or if the specified value is 0, the CLKOUT pin | ||
will be disabled. | ||
nxp,no-comparator-bypass: | ||
type: boolean | ||
description: Allows to disable the CAN input comparator. | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- interrupts | ||
|
||
allOf: | ||
- $ref: can-controller.yaml# | ||
- if: | ||
properties: | ||
compatible: | ||
contains: | ||
const: technologic,sja1000 | ||
then: | ||
required: | ||
- reg-io-width | ||
|
||
unevaluatedProperties: false | ||
|
||
examples: | ||
- | | ||
can@1a000 { | ||
compatible = "technologic,sja1000"; | ||
reg = <0x1a000 0x100>; | ||
interrupts = <1>; | ||
reg-io-width = <2>; | ||
nxp,tx-output-config = <0x06>; | ||
nxp,external-clock-frequency = <24000000>; | ||
}; |
This file was deleted.
Oops, something went wrong.