1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/media/allwinner,sun6i-a31-csi.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 77ef62cebSEmmanuel Vadottitle: Allwinner A31 CMOS Sensor Interface (CSI) 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Chen-Yu Tsai <wens@csie.org> 11c66ec88fSEmmanuel Vadot - Maxime Ripard <mripard@kernel.org> 12c66ec88fSEmmanuel Vadot 13c66ec88fSEmmanuel Vadotproperties: 14c66ec88fSEmmanuel Vadot compatible: 15c66ec88fSEmmanuel Vadot enum: 16c66ec88fSEmmanuel Vadot - allwinner,sun6i-a31-csi 17c66ec88fSEmmanuel Vadot - allwinner,sun8i-a83t-csi 18c66ec88fSEmmanuel Vadot - allwinner,sun8i-h3-csi 19c66ec88fSEmmanuel Vadot - allwinner,sun8i-v3s-csi 20c66ec88fSEmmanuel Vadot - allwinner,sun50i-a64-csi 21c66ec88fSEmmanuel Vadot 22c66ec88fSEmmanuel Vadot reg: 23c66ec88fSEmmanuel Vadot maxItems: 1 24c66ec88fSEmmanuel Vadot 25c66ec88fSEmmanuel Vadot interrupts: 26c66ec88fSEmmanuel Vadot maxItems: 1 27c66ec88fSEmmanuel Vadot 28c66ec88fSEmmanuel Vadot clocks: 29c66ec88fSEmmanuel Vadot items: 30c66ec88fSEmmanuel Vadot - description: Bus Clock 31c66ec88fSEmmanuel Vadot - description: Module Clock 32c66ec88fSEmmanuel Vadot - description: DRAM Clock 33c66ec88fSEmmanuel Vadot 34c66ec88fSEmmanuel Vadot clock-names: 35c66ec88fSEmmanuel Vadot items: 36c66ec88fSEmmanuel Vadot - const: bus 37c66ec88fSEmmanuel Vadot - const: mod 38c66ec88fSEmmanuel Vadot - const: ram 39c66ec88fSEmmanuel Vadot 40c66ec88fSEmmanuel Vadot resets: 41c66ec88fSEmmanuel Vadot maxItems: 1 42c66ec88fSEmmanuel Vadot 43c66ec88fSEmmanuel Vadot port: 445def4c47SEmmanuel Vadot $ref: /schemas/graph.yaml#/$defs/port-base 45b97ee269SEmmanuel Vadot description: Parallel input port, connect to a parallel sensor 46c66ec88fSEmmanuel Vadot 47c66ec88fSEmmanuel Vadot properties: 48c66ec88fSEmmanuel Vadot endpoint: 495def4c47SEmmanuel Vadot $ref: video-interfaces.yaml# 505def4c47SEmmanuel Vadot unevaluatedProperties: false 51c66ec88fSEmmanuel Vadot 52c66ec88fSEmmanuel Vadot properties: 53c66ec88fSEmmanuel Vadot bus-width: 54c66ec88fSEmmanuel Vadot enum: [ 8, 10, 12, 16 ] 55c66ec88fSEmmanuel Vadot 56c66ec88fSEmmanuel Vadot pclk-sample: true 57c66ec88fSEmmanuel Vadot hsync-active: true 58c66ec88fSEmmanuel Vadot vsync-active: true 59c66ec88fSEmmanuel Vadot 60c66ec88fSEmmanuel Vadot required: 61c66ec88fSEmmanuel Vadot - bus-width 62c66ec88fSEmmanuel Vadot 63b97ee269SEmmanuel Vadot unevaluatedProperties: false 64b97ee269SEmmanuel Vadot 65b97ee269SEmmanuel Vadot ports: 66b97ee269SEmmanuel Vadot $ref: /schemas/graph.yaml#/properties/ports 67b97ee269SEmmanuel Vadot 68b97ee269SEmmanuel Vadot properties: 69b97ee269SEmmanuel Vadot port@0: 70b97ee269SEmmanuel Vadot $ref: "#/properties/port" 71b97ee269SEmmanuel Vadot 72b97ee269SEmmanuel Vadot port@1: 73b97ee269SEmmanuel Vadot $ref: /schemas/graph.yaml#/properties/port 74b97ee269SEmmanuel Vadot description: MIPI CSI-2 bridge input port 75b97ee269SEmmanuel Vadot 76*8bab661aSEmmanuel Vadot port@2: 77*8bab661aSEmmanuel Vadot $ref: /schemas/graph.yaml#/properties/port 78*8bab661aSEmmanuel Vadot description: Internal output port to the ISP 79*8bab661aSEmmanuel Vadot 80b97ee269SEmmanuel Vadot anyOf: 81b97ee269SEmmanuel Vadot - required: 82b97ee269SEmmanuel Vadot - port@0 83b97ee269SEmmanuel Vadot - required: 84b97ee269SEmmanuel Vadot - port@1 85c66ec88fSEmmanuel Vadot 86c66ec88fSEmmanuel Vadotrequired: 87c66ec88fSEmmanuel Vadot - compatible 88c66ec88fSEmmanuel Vadot - reg 89c66ec88fSEmmanuel Vadot - interrupts 90c66ec88fSEmmanuel Vadot - clocks 91c66ec88fSEmmanuel Vadot - clock-names 92c66ec88fSEmmanuel Vadot - resets 93c66ec88fSEmmanuel Vadot 94b97ee269SEmmanuel VadotoneOf: 95b97ee269SEmmanuel Vadot - required: 96b97ee269SEmmanuel Vadot - ports 97b97ee269SEmmanuel Vadot - required: 98b97ee269SEmmanuel Vadot - port 99b97ee269SEmmanuel Vadot 100c66ec88fSEmmanuel VadotadditionalProperties: false 101c66ec88fSEmmanuel Vadot 102c66ec88fSEmmanuel Vadotexamples: 103c66ec88fSEmmanuel Vadot - | 104c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 105c66ec88fSEmmanuel Vadot #include <dt-bindings/clock/sun8i-v3s-ccu.h> 106c66ec88fSEmmanuel Vadot #include <dt-bindings/reset/sun8i-v3s-ccu.h> 107c66ec88fSEmmanuel Vadot 108c66ec88fSEmmanuel Vadot csi1: csi@1cb4000 { 109c66ec88fSEmmanuel Vadot compatible = "allwinner,sun8i-v3s-csi"; 110c66ec88fSEmmanuel Vadot reg = <0x01cb4000 0x1000>; 111c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>; 112c66ec88fSEmmanuel Vadot clocks = <&ccu CLK_BUS_CSI>, 113c66ec88fSEmmanuel Vadot <&ccu CLK_CSI1_SCLK>, 114c66ec88fSEmmanuel Vadot <&ccu CLK_DRAM_CSI>; 115c66ec88fSEmmanuel Vadot clock-names = "bus", 116c66ec88fSEmmanuel Vadot "mod", 117c66ec88fSEmmanuel Vadot "ram"; 118c66ec88fSEmmanuel Vadot resets = <&ccu RST_BUS_CSI>; 119c66ec88fSEmmanuel Vadot 120b97ee269SEmmanuel Vadot ports { 121b97ee269SEmmanuel Vadot #address-cells = <1>; 122b97ee269SEmmanuel Vadot #size-cells = <0>; 123b97ee269SEmmanuel Vadot 124b97ee269SEmmanuel Vadot port@0 { 125b97ee269SEmmanuel Vadot reg = <0>; 126c66ec88fSEmmanuel Vadot /* Parallel bus endpoint */ 127c66ec88fSEmmanuel Vadot csi1_ep: endpoint { 128c66ec88fSEmmanuel Vadot remote-endpoint = <&adv7611_ep>; 129c66ec88fSEmmanuel Vadot bus-width = <16>; 130c66ec88fSEmmanuel Vadot 131c66ec88fSEmmanuel Vadot /* 132c66ec88fSEmmanuel Vadot * If hsync-active/vsync-active are missing, 133c66ec88fSEmmanuel Vadot * embedded BT.656 sync is used. 134c66ec88fSEmmanuel Vadot */ 135c66ec88fSEmmanuel Vadot hsync-active = <0>; /* Active low */ 136c66ec88fSEmmanuel Vadot vsync-active = <0>; /* Active low */ 137c66ec88fSEmmanuel Vadot pclk-sample = <1>; /* Rising */ 138c66ec88fSEmmanuel Vadot }; 139c66ec88fSEmmanuel Vadot }; 140c66ec88fSEmmanuel Vadot }; 141b97ee269SEmmanuel Vadot }; 142c66ec88fSEmmanuel Vadot 143c66ec88fSEmmanuel Vadot... 144