| .. | .. |
|---|
| 1 | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
|---|
| 2 | | -/* |
|---|
| 3 | | - * Copyright (C) 2018 Amarula Solutions B.V. |
|---|
| 4 | | - * Author: Jagan Teki <jagan@amarulasolutions.com> |
|---|
| 5 | | - */ |
|---|
| 2 | +// Copyright (C) 2018 Amarula Solutions B.V. |
|---|
| 3 | +// Author: Jagan Teki <jagan@amarulasolutions.com> |
|---|
| 6 | 4 | |
|---|
| 7 | 5 | /dts-v1/; |
|---|
| 8 | 6 | |
|---|
| 9 | 7 | #include "sun50i-a64.dtsi" |
|---|
| 8 | +#include "sun50i-a64-cpu-opp.dtsi" |
|---|
| 10 | 9 | |
|---|
| 11 | 10 | #include <dt-bindings/gpio/gpio.h> |
|---|
| 12 | 11 | |
|---|
| .. | .. |
|---|
| 22 | 21 | stdout-path = "serial0:115200n8"; |
|---|
| 23 | 22 | }; |
|---|
| 24 | 23 | |
|---|
| 24 | + i2c { |
|---|
| 25 | + compatible = "i2c-gpio"; |
|---|
| 26 | + sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>; |
|---|
| 27 | + scl-gpios = <&pio 4 12 GPIO_ACTIVE_HIGH>; |
|---|
| 28 | + i2c-gpio,delay-us = <5>; |
|---|
| 29 | + #address-cells = <1>; |
|---|
| 30 | + #size-cells = <0>; |
|---|
| 31 | + |
|---|
| 32 | + ov5640: camera@3c { |
|---|
| 33 | + compatible = "ovti,ov5640"; |
|---|
| 34 | + reg = <0x3c>; |
|---|
| 35 | + pinctrl-names = "default"; |
|---|
| 36 | + pinctrl-0 = <&csi_mclk_pin>; |
|---|
| 37 | + clocks = <&ccu CLK_CSI_MCLK>; |
|---|
| 38 | + clock-names = "xclk"; |
|---|
| 39 | + |
|---|
| 40 | + AVDD-supply = <®_aldo1>; |
|---|
| 41 | + DOVDD-supply = <®_dldo3>; |
|---|
| 42 | + DVDD-supply = <®_eldo3>; |
|---|
| 43 | + reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>; /* CSI-RST-R: PE14 */ |
|---|
| 44 | + powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* CSI-STBY-R: PE15 */ |
|---|
| 45 | + |
|---|
| 46 | + port { |
|---|
| 47 | + ov5640_ep: endpoint { |
|---|
| 48 | + remote-endpoint = <&csi_ep>; |
|---|
| 49 | + bus-width = <8>; |
|---|
| 50 | + hsync-active = <1>; /* Active high */ |
|---|
| 51 | + vsync-active = <0>; /* Active low */ |
|---|
| 52 | + data-active = <1>; /* Active high */ |
|---|
| 53 | + pclk-sample = <1>; /* Rising */ |
|---|
| 54 | + }; |
|---|
| 55 | + }; |
|---|
| 56 | + }; |
|---|
| 57 | + }; |
|---|
| 58 | + |
|---|
| 25 | 59 | wifi_pwrseq: wifi-pwrseq { |
|---|
| 26 | 60 | compatible = "mmc-pwrseq-simple"; |
|---|
| 27 | 61 | clocks = <&rtc 1>; |
|---|
| .. | .. |
|---|
| 30 | 64 | }; |
|---|
| 31 | 65 | }; |
|---|
| 32 | 66 | |
|---|
| 67 | +&cpu0 { |
|---|
| 68 | + cpu-supply = <®_dcdc2>; |
|---|
| 69 | +}; |
|---|
| 70 | + |
|---|
| 71 | +&cpu1 { |
|---|
| 72 | + cpu-supply = <®_dcdc2>; |
|---|
| 73 | +}; |
|---|
| 74 | + |
|---|
| 75 | +&cpu2 { |
|---|
| 76 | + cpu-supply = <®_dcdc2>; |
|---|
| 77 | +}; |
|---|
| 78 | + |
|---|
| 79 | +&cpu3 { |
|---|
| 80 | + cpu-supply = <®_dcdc2>; |
|---|
| 81 | +}; |
|---|
| 82 | + |
|---|
| 83 | +&csi { |
|---|
| 84 | + status = "okay"; |
|---|
| 85 | + |
|---|
| 86 | + port { |
|---|
| 87 | + csi_ep: endpoint { |
|---|
| 88 | + remote-endpoint = <&ov5640_ep>; |
|---|
| 89 | + bus-width = <8>; |
|---|
| 90 | + hsync-active = <1>; /* Active high */ |
|---|
| 91 | + vsync-active = <0>; /* Active low */ |
|---|
| 92 | + data-active = <1>; /* Active high */ |
|---|
| 93 | + pclk-sample = <1>; /* Rising */ |
|---|
| 94 | + }; |
|---|
| 95 | + }; |
|---|
| 96 | +}; |
|---|
| 97 | + |
|---|
| 33 | 98 | &ehci0 { |
|---|
| 34 | 99 | status = "okay"; |
|---|
| 100 | +}; |
|---|
| 101 | + |
|---|
| 102 | +&i2c0 { |
|---|
| 103 | + status = "okay"; |
|---|
| 104 | + |
|---|
| 105 | + sensor@48 { |
|---|
| 106 | + compatible = "st,stlm75"; |
|---|
| 107 | + reg = <0x48>; |
|---|
| 108 | + }; |
|---|
| 109 | +}; |
|---|
| 110 | + |
|---|
| 111 | +&i2c0_pins { |
|---|
| 112 | + bias-pull-up; |
|---|
| 113 | +}; |
|---|
| 114 | + |
|---|
| 115 | +&i2c1 { |
|---|
| 116 | + status = "okay"; |
|---|
| 117 | + |
|---|
| 118 | + touchscreen@5d { |
|---|
| 119 | + compatible = "goodix,gt5663"; |
|---|
| 120 | + reg = <0x5d>; |
|---|
| 121 | + AVDD28-supply = <®_ldo_io0>; /* VCC-CTP: GPIO0-LDO */ |
|---|
| 122 | + interrupt-parent = <&pio>; |
|---|
| 123 | + interrupts = <7 4 IRQ_TYPE_EDGE_FALLING>; |
|---|
| 124 | + irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* CTP-INT: PH4 */ |
|---|
| 125 | + reset-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* CTP-RST: PH8 */ |
|---|
| 126 | + touchscreen-inverted-x; |
|---|
| 127 | + touchscreen-inverted-y; |
|---|
| 128 | + }; |
|---|
| 35 | 129 | }; |
|---|
| 36 | 130 | |
|---|
| 37 | 131 | &mmc1 { |
|---|
| .. | .. |
|---|
| 197 | 291 | regulator-name = "vdd-cpus"; |
|---|
| 198 | 292 | }; |
|---|
| 199 | 293 | |
|---|
| 294 | +®_ldo_io0 { |
|---|
| 295 | + regulator-min-microvolt = <2800000>; |
|---|
| 296 | + regulator-max-microvolt = <2800000>; |
|---|
| 297 | + regulator-name = "vcc-ctp"; |
|---|
| 298 | + status = "okay"; |
|---|
| 299 | +}; |
|---|
| 300 | + |
|---|
| 200 | 301 | ®_rtc_ldo { |
|---|
| 201 | 302 | regulator-name = "vcc-rtc"; |
|---|
| 202 | 303 | }; |
|---|
| 203 | 304 | |
|---|
| 204 | 305 | &uart0 { |
|---|
| 205 | 306 | pinctrl-names = "default"; |
|---|
| 206 | | - pinctrl-0 = <&uart0_pins_a>; |
|---|
| 307 | + pinctrl-0 = <&uart0_pb_pins>; |
|---|
| 207 | 308 | status = "okay"; |
|---|
| 208 | 309 | }; |
|---|
| 209 | 310 | |
|---|