Add SPI NOR driver for Sophgo, including read, write operations. Signed-off-by: Longbin Li <looong.bin@xxxxxxxxx> --- .../bindings/spi/spi-sophgo-nor.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/spi-sophgo-nor.yaml diff --git a/Documentation/devicetree/bindings/spi/spi-sophgo-nor.yaml b/Documentation/devicetree/bindings/spi/spi-sophgo-nor.yaml new file mode 100644 index 000000000000..0b54946c649f --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-sophgo-nor.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/spi-sophgo-nor.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sophgo SPI NOR controller + +maintainers: + - Longbin Li <looong.bin@xxxxxxxxx> + +allOf: + - $ref: spi-controller.yaml# + +properties: + compatible: + const: sophgo,sg2044-spifmc-nor + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + interrupts: + maxItems: 1 + + resets: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - interrupts + - resets + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + + spi@1000000 { + compatible = "sophgo,sg2044-spifmc-nor"; + reg = <0x1000000 0x4000000>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&clk 0>; + interrupts = <37 IRQ_TYPE_LEVEL_HIGH>; + resets = <&rst 0>; + }; -- 2.48.1