|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
| 2 | +// Definitions for MIRA016 camera module on VC I2C bus |
| 3 | +/dts-v1/; |
| 4 | +/plugin/; |
| 5 | + |
| 6 | +#include <dt-bindings/gpio/gpio.h> |
| 7 | + |
| 8 | +/{ |
| 9 | + compatible = "brcm,bcm2835"; |
| 10 | + |
| 11 | + fragment@0 { |
| 12 | + target = <&i2c0if>; |
| 13 | + __overlay__ { |
| 14 | + status = "okay"; |
| 15 | + }; |
| 16 | + }; |
| 17 | + |
| 18 | + clk_frag: fragment@1 { |
| 19 | + target = <&cam1_clk>; |
| 20 | + __overlay__ { |
| 21 | + status = "okay"; |
| 22 | + clock-frequency = <24000000>; |
| 23 | + }; |
| 24 | + }; |
| 25 | + |
| 26 | + fragment@2 { |
| 27 | + target = <&i2c0mux>; |
| 28 | + __overlay__ { |
| 29 | + status = "okay"; |
| 30 | + }; |
| 31 | + }; |
| 32 | + |
| 33 | + fragment@5 { |
| 34 | + target = <&cam1_reg>; |
| 35 | + __overlay__ { |
| 36 | + status = "okay"; |
| 37 | + regulator-name = "mira016_vana"; |
| 38 | + regulator-min-microvolt = <2800000>; |
| 39 | + regulator-max-microvolt = <2800000>; |
| 40 | + }; |
| 41 | + }; |
| 42 | + |
| 43 | + i2c_frag: fragment@100 { |
| 44 | + target = <&i2c_csi_dsi>; |
| 45 | + __overlay__ { |
| 46 | + #address-cells = <1>; |
| 47 | + #size-cells = <0>; |
| 48 | + status = "okay"; |
| 49 | + |
| 50 | + mira016: mira016@36 { |
| 51 | + // compatible = "ams,mira016"; |
| 52 | + // I2C addresses (7-bit address) |
| 53 | + // The interface board uses 0x36 by default |
| 54 | + // MIRA016CSP: 0x36; PMIC: 0x2D; INA3221: 0x40; LM2759: 0x53; |
| 55 | + // dsPIC33EP32MC503: 0x0A |
| 56 | + reg = <0x36>; |
| 57 | + // reg-names = "mira016"; |
| 58 | + status = "okay"; |
| 59 | + |
| 60 | + //clocks = <&mira016_clk>; |
| 61 | + clocks = <&cam1_clk>; |
| 62 | + clock-names = "xclk"; |
| 63 | + |
| 64 | + // TODO(jalv): Add here camera supplies based on the |
| 65 | + // TPS65912 pmic. |
| 66 | + VANA-supply = <&cam1_reg>; /* 2.8v */ |
| 67 | + VDIG-supply = <&cam_dummy_reg>; /* 1.8v */ |
| 68 | + VDDL-supply = <&cam_dummy_reg>; /* 1.2v */ |
| 69 | + |
| 70 | + // FIXME(jalv): Make sure orientation is correct |
| 71 | + rotation = <0>; |
| 72 | + orientation = <2>; |
| 73 | + skip-reg-upload = <0>; |
| 74 | + |
| 75 | + port { |
| 76 | + mira016_0: endpoint { |
| 77 | + remote-endpoint = <&csi_ep>; |
| 78 | + clock-lanes = <0>; |
| 79 | + data-lanes = <1>; |
| 80 | + // clock-noncontinuous; // mira016 reg seq use continuous clk |
| 81 | + link-frequencies = |
| 82 | + /bits/ 64 <456000000>; |
| 83 | + }; |
| 84 | + }; |
| 85 | + |
| 86 | + }; |
| 87 | + }; |
| 88 | + }; |
| 89 | + |
| 90 | + csi_frag: fragment@101 { |
| 91 | + target = <&csi1>; |
| 92 | + csi: __overlay__ { |
| 93 | + status = "okay"; |
| 94 | + brcm,media-controller; |
| 95 | + |
| 96 | + port { |
| 97 | + csi_ep: endpoint { |
| 98 | + remote-endpoint = <&mira016_0>; |
| 99 | + clock-lanes = <0>; |
| 100 | + data-lanes = <1>; |
| 101 | + // clock-noncontinuous; // mira016 reg seq use continous clk |
| 102 | + }; |
| 103 | + }; |
| 104 | + }; |
| 105 | + }; |
| 106 | + |
| 107 | + __overrides__ { |
| 108 | + rotation = <&mira016>,"rotation:0"; |
| 109 | + orientation = <&mira016>,"orientation:0"; |
| 110 | + skip-reg-upload = <&mira016>,"skip-reg-upload:0"; |
| 111 | + media-controller = <&csi>,"brcm,media-controller?"; |
| 112 | + cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>, |
| 113 | + <&csi_frag>, "target:0=",<&csi0>, |
| 114 | + <&clk_frag>, "target:0=",<&cam0_clk>, |
| 115 | + <&mira016>, "clocks:0=",<&cam0_clk>, |
| 116 | + <&mira016>, "VANA-supply:0=",<&cam0_reg>; |
| 117 | + }; |
| 118 | +}; |
0 commit comments