1f78ed3c5SMaxime Ripard# SPDX-License-Identifier: GPL-2.0 2f78ed3c5SMaxime Ripard%YAML 1.2 3f78ed3c5SMaxime Ripard--- 4f78ed3c5SMaxime Ripard$id: http://devicetree.org/schemas/media/allwinner,sun6i-a31-csi.yaml# 5f78ed3c5SMaxime Ripard$schema: http://devicetree.org/meta-schemas/core.yaml# 6f78ed3c5SMaxime Ripard 7dd3cb467SAndrew Lunntitle: Allwinner A31 CMOS Sensor Interface (CSI) 8f78ed3c5SMaxime Ripard 9f78ed3c5SMaxime Ripardmaintainers: 10f78ed3c5SMaxime Ripard - Chen-Yu Tsai <wens@csie.org> 11f78ed3c5SMaxime Ripard - Maxime Ripard <mripard@kernel.org> 12f78ed3c5SMaxime Ripard 13f78ed3c5SMaxime Ripardproperties: 14f78ed3c5SMaxime Ripard compatible: 15f78ed3c5SMaxime Ripard enum: 16f78ed3c5SMaxime Ripard - allwinner,sun6i-a31-csi 17f78ed3c5SMaxime Ripard - allwinner,sun8i-a83t-csi 18f78ed3c5SMaxime Ripard - allwinner,sun8i-h3-csi 19f78ed3c5SMaxime Ripard - allwinner,sun8i-v3s-csi 20f78ed3c5SMaxime Ripard - allwinner,sun50i-a64-csi 21f78ed3c5SMaxime Ripard 22f78ed3c5SMaxime Ripard reg: 23f78ed3c5SMaxime Ripard maxItems: 1 24f78ed3c5SMaxime Ripard 25f78ed3c5SMaxime Ripard interrupts: 26f78ed3c5SMaxime Ripard maxItems: 1 27f78ed3c5SMaxime Ripard 28f78ed3c5SMaxime Ripard clocks: 29f78ed3c5SMaxime Ripard items: 30f78ed3c5SMaxime Ripard - description: Bus Clock 31f78ed3c5SMaxime Ripard - description: Module Clock 32f78ed3c5SMaxime Ripard - description: DRAM Clock 33f78ed3c5SMaxime Ripard 34f78ed3c5SMaxime Ripard clock-names: 35f78ed3c5SMaxime Ripard items: 36f78ed3c5SMaxime Ripard - const: bus 37f78ed3c5SMaxime Ripard - const: mod 38f78ed3c5SMaxime Ripard - const: ram 39f78ed3c5SMaxime Ripard 40f78ed3c5SMaxime Ripard resets: 41f78ed3c5SMaxime Ripard maxItems: 1 42f78ed3c5SMaxime Ripard 43f78ed3c5SMaxime Ripard port: 44066a94e2SRob Herring $ref: /schemas/graph.yaml#/$defs/port-base 45249106daSPaul Kocialkowski description: Parallel input port, connect to a parallel sensor 46f78ed3c5SMaxime Ripard 47f78ed3c5SMaxime Ripard properties: 48f78ed3c5SMaxime Ripard endpoint: 49066a94e2SRob Herring $ref: video-interfaces.yaml# 50066a94e2SRob Herring unevaluatedProperties: false 51f78ed3c5SMaxime Ripard 52f78ed3c5SMaxime Ripard properties: 53f78ed3c5SMaxime Ripard bus-width: 54f78ed3c5SMaxime Ripard enum: [ 8, 10, 12, 16 ] 55f78ed3c5SMaxime Ripard 56f78ed3c5SMaxime Ripard pclk-sample: true 57f78ed3c5SMaxime Ripard hsync-active: true 58f78ed3c5SMaxime Ripard vsync-active: true 59f78ed3c5SMaxime Ripard 60f78ed3c5SMaxime Ripard required: 61f78ed3c5SMaxime Ripard - bus-width 62f78ed3c5SMaxime Ripard 63249106daSPaul Kocialkowski unevaluatedProperties: false 64249106daSPaul Kocialkowski 65249106daSPaul Kocialkowski ports: 66249106daSPaul Kocialkowski $ref: /schemas/graph.yaml#/properties/ports 67249106daSPaul Kocialkowski 68249106daSPaul Kocialkowski properties: 69249106daSPaul Kocialkowski port@0: 70249106daSPaul Kocialkowski $ref: "#/properties/port" 71249106daSPaul Kocialkowski 72249106daSPaul Kocialkowski port@1: 73249106daSPaul Kocialkowski $ref: /schemas/graph.yaml#/properties/port 74249106daSPaul Kocialkowski description: MIPI CSI-2 bridge input port 75249106daSPaul Kocialkowski 76*4c6f0bc1SPaul Kocialkowski port@2: 77*4c6f0bc1SPaul Kocialkowski $ref: /schemas/graph.yaml#/properties/port 78*4c6f0bc1SPaul Kocialkowski description: Internal output port to the ISP 79*4c6f0bc1SPaul Kocialkowski 80249106daSPaul Kocialkowski anyOf: 81249106daSPaul Kocialkowski - required: 82249106daSPaul Kocialkowski - port@0 83249106daSPaul Kocialkowski - required: 84249106daSPaul Kocialkowski - port@1 85f78ed3c5SMaxime Ripard 86f78ed3c5SMaxime Ripardrequired: 87f78ed3c5SMaxime Ripard - compatible 88f78ed3c5SMaxime Ripard - reg 89f78ed3c5SMaxime Ripard - interrupts 90f78ed3c5SMaxime Ripard - clocks 91f78ed3c5SMaxime Ripard - clock-names 92f78ed3c5SMaxime Ripard - resets 93f78ed3c5SMaxime Ripard 94249106daSPaul KocialkowskioneOf: 95249106daSPaul Kocialkowski - required: 96249106daSPaul Kocialkowski - ports 97249106daSPaul Kocialkowski - required: 98249106daSPaul Kocialkowski - port 99249106daSPaul Kocialkowski 100f78ed3c5SMaxime RipardadditionalProperties: false 101f78ed3c5SMaxime Ripard 102f78ed3c5SMaxime Ripardexamples: 103f78ed3c5SMaxime Ripard - | 104f78ed3c5SMaxime Ripard #include <dt-bindings/interrupt-controller/arm-gic.h> 105f78ed3c5SMaxime Ripard #include <dt-bindings/clock/sun8i-v3s-ccu.h> 106f78ed3c5SMaxime Ripard #include <dt-bindings/reset/sun8i-v3s-ccu.h> 107f78ed3c5SMaxime Ripard 108f78ed3c5SMaxime Ripard csi1: csi@1cb4000 { 109f78ed3c5SMaxime Ripard compatible = "allwinner,sun8i-v3s-csi"; 110f78ed3c5SMaxime Ripard reg = <0x01cb4000 0x1000>; 111f78ed3c5SMaxime Ripard interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>; 112f78ed3c5SMaxime Ripard clocks = <&ccu CLK_BUS_CSI>, 113f78ed3c5SMaxime Ripard <&ccu CLK_CSI1_SCLK>, 114f78ed3c5SMaxime Ripard <&ccu CLK_DRAM_CSI>; 115f78ed3c5SMaxime Ripard clock-names = "bus", 116f78ed3c5SMaxime Ripard "mod", 117f78ed3c5SMaxime Ripard "ram"; 118f78ed3c5SMaxime Ripard resets = <&ccu RST_BUS_CSI>; 119f78ed3c5SMaxime Ripard 120249106daSPaul Kocialkowski ports { 121249106daSPaul Kocialkowski #address-cells = <1>; 122249106daSPaul Kocialkowski #size-cells = <0>; 123249106daSPaul Kocialkowski 124249106daSPaul Kocialkowski port@0 { 125249106daSPaul Kocialkowski reg = <0>; 126f78ed3c5SMaxime Ripard /* Parallel bus endpoint */ 127f78ed3c5SMaxime Ripard csi1_ep: endpoint { 128f78ed3c5SMaxime Ripard remote-endpoint = <&adv7611_ep>; 129f78ed3c5SMaxime Ripard bus-width = <16>; 130f78ed3c5SMaxime Ripard 131f78ed3c5SMaxime Ripard /* 132f78ed3c5SMaxime Ripard * If hsync-active/vsync-active are missing, 133f78ed3c5SMaxime Ripard * embedded BT.656 sync is used. 134f78ed3c5SMaxime Ripard */ 135f78ed3c5SMaxime Ripard hsync-active = <0>; /* Active low */ 136f78ed3c5SMaxime Ripard vsync-active = <0>; /* Active low */ 137f78ed3c5SMaxime Ripard pclk-sample = <1>; /* Rising */ 138f78ed3c5SMaxime Ripard }; 139f78ed3c5SMaxime Ripard }; 140f78ed3c5SMaxime Ripard }; 141249106daSPaul Kocialkowski }; 142f78ed3c5SMaxime Ripard 143f78ed3c5SMaxime Ripard... 144