0001 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
0002 /*
0003 * OLPC XO 1.75 Laptop.
0004 *
0005 * Copyright (C) 2018,2019,2020 Lubomir Rintel <lkundrak@v3.sk>
0006 */
0007
0008 /dts-v1/;
0009 #include "mmp2.dtsi"
0010 #include <dt-bindings/gpio/gpio.h>
0011 #include <dt-bindings/input/linux-event-codes.h>
0012 #include <dt-bindings/interrupt-controller/irq.h>
0013 #include <dt-bindings/clock/marvell,mmp2-audio.h>
0014
0015 / {
0016 model = "OLPC XO-1.75";
0017 compatible = "olpc,xo-1.75", "mrvl,mmp2";
0018
0019 chosen {
0020 #address-cells = <1>;
0021 #size-cells = <1>;
0022 ranges;
0023
0024 framebuffer@1fc00000 {
0025 compatible = "simple-framebuffer";
0026 reg = <0x1fc00000 (1200 * 900 * 2)>;
0027 width = <1200>;
0028 height = <900>;
0029 stride = <(1200 * 2)>;
0030 format = "r5g6b5";
0031 clocks = <&soc_clocks MMP2_CLK_DISP0_LCDC>,
0032 <&soc_clocks MMP2_CLK_DISP0>;
0033 };
0034 };
0035
0036 memory@0 {
0037 available = <0xcf000 0x1ef31000 0x1000 0xbf000>;
0038 reg = <0x0 0x20000000>;
0039 device_type = "memory";
0040 };
0041
0042 gpio-keys {
0043 compatible = "gpio-keys";
0044
0045 lid {
0046 label = "Lid";
0047 gpios = <&gpio 129 GPIO_ACTIVE_LOW>;
0048 linux,input-type = <EV_SW>;
0049 linux,code = <SW_LID>;
0050 wakeup-source;
0051 };
0052
0053 tablet_mode {
0054 label = "E-Book Mode";
0055 gpios = <&gpio 128 GPIO_ACTIVE_LOW>;
0056 linux,input-type = <EV_SW>;
0057 linux,code = <SW_TABLET_MODE>;
0058 wakeup-source;
0059 };
0060 };
0061
0062 i2c {
0063 compatible = "i2c-gpio";
0064 sda-gpios = <&gpio 109 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
0065 scl-gpios = <&gpio 108 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
0066 #address-cells = <1>;
0067 #size-cells = <0>;
0068 i2c-gpio,timeout-ms = <1000>;
0069 status = "okay";
0070
0071 camera@21 {
0072 compatible = "ovti,ov7670";
0073 reg = <0x21>;
0074 reset-gpios = <&gpio 102 GPIO_ACTIVE_LOW>;
0075 powerdown-gpios = <&gpio 150 GPIO_ACTIVE_LOW>;
0076 clocks = <&camera0>;
0077 clock-names = "xclk";
0078
0079 port {
0080 ov7670_0: endpoint {
0081 hsync-active = <1>;
0082 vsync-active = <1>;
0083 remote-endpoint = <&camera0_0>;
0084 };
0085 };
0086 };
0087 };
0088
0089 battery {
0090 compatible = "olpc,xo1.5-battery", "olpc,xo1-battery";
0091 };
0092
0093 wlan_reg: fixedregulator0 {
0094 compatible = "regulator-fixed";
0095 regulator-name = "wlan";
0096 regulator-min-microvolt = <3300000>;
0097 regulator-max-microvolt = <3300000>;
0098 gpio = <&gpio 34 GPIO_ACTIVE_HIGH>;
0099 enable-active-high;
0100 };
0101
0102 wlan_pwrseq: pwrseq0 {
0103 compatible = "mmc-pwrseq-sd8787";
0104 powerdown-gpios = <&gpio 57 GPIO_ACTIVE_HIGH>;
0105 reset-gpios = <&gpio 58 GPIO_ACTIVE_HIGH>;
0106 };
0107
0108 sound-card {
0109 compatible = "audio-graph-card";
0110 label = "OLPC XO";
0111 dais = <&sspa0_dai>;
0112 routing = "Headphones", "HPOL",
0113 "Headphones", "HPOR",
0114 "MIC2", "Mic Jack";
0115 widgets = "Headphone", "Headphones", "Microphone", "Mic Jack";
0116 hp-det-gpio = <&gpio 97 GPIO_ACTIVE_HIGH>;
0117 mic-det-gpio = <&gpio 96 GPIO_ACTIVE_HIGH>;
0118 };
0119
0120 soc {
0121 axi@d4200000 {
0122 ap-sp@d4290000 {
0123 #address-cells = <1>;
0124 #size-cells = <0>;
0125 compatible = "olpc,ap-sp";
0126 interrupts = <40>;
0127 reg = <0xd4290000 0x1000>;
0128 data-gpios = <&gpio 72 GPIO_ACTIVE_HIGH>;
0129 clk-gpios = <&gpio 71 GPIO_ACTIVE_HIGH>;
0130 status = "okay";
0131 };
0132 };
0133 };
0134 };
0135
0136 &uart3 {
0137 status = "okay";
0138 };
0139
0140 &uart4 {
0141 status = "okay";
0142 };
0143
0144 &rtc {
0145 status = "okay";
0146 };
0147
0148 &usb_phy0 {
0149 status = "okay";
0150 };
0151
0152 &usb_otg0 {
0153 status = "okay";
0154 };
0155
0156 &mmc1 {
0157 clock-frequency = <50000000>;
0158 no-1-8-v;
0159 mrvl,clk-delay-cycles = <31>;
0160 broken-cd;
0161 status = "okay";
0162 };
0163
0164 &mmc2 {
0165 clock-frequency = <50000000>;
0166 no-1-8-v;
0167 bus-width = <4>;
0168 non-removable;
0169 broken-cd;
0170 wakeup-source;
0171 keep-power-in-suspend;
0172 mmc-pwrseq = <&wlan_pwrseq>;
0173 vmmc-supply = <&wlan_reg>;
0174 status = "okay";
0175 };
0176
0177 &mmc3 {
0178 clock-frequency = <50000000>;
0179 no-1-8-v;
0180 bus-width = <8>;
0181 non-removable;
0182 broken-cd;
0183 mrvl,clk-delay-cycles = <31>;
0184 status = "okay";
0185 };
0186
0187 &twsi1 {
0188 status = "okay";
0189
0190 audio-codec@1a {
0191 compatible = "realtek,alc5631";
0192 reg = <0x1a>;
0193 status = "okay";
0194
0195 port {
0196 rt5631_0: endpoint {
0197 mclk-fs = <256>;
0198 clocks = <&audio_clk MMP2_CLK_AUDIO_SYSCLK>;
0199 remote-endpoint = <&sspa0_0>;
0200 };
0201 };
0202 };
0203 };
0204
0205 &twsi2 {
0206 status = "okay";
0207
0208 rtc@68 {
0209 compatible = "dallas,ds1338";
0210 reg = <0x68>;
0211 status = "okay";
0212 };
0213 };
0214
0215 &twsi6 {
0216 status = "okay";
0217
0218 accelerometer@1d {
0219 compatible = "st,lis331dlh", "st,lis3lv02d";
0220 reg = <0x1d>;
0221 status = "okay";
0222 };
0223 };
0224
0225 &ssp3 {
0226 #address-cells = <0>;
0227 spi-slave;
0228 status = "okay";
0229 ready-gpios = <&gpio 125 GPIO_ACTIVE_HIGH>;
0230
0231 slave {
0232 compatible = "olpc,xo1.75-ec";
0233 spi-cpha;
0234 cmd-gpios = <&gpio 155 GPIO_ACTIVE_HIGH>;
0235 };
0236 };
0237
0238 &camera0 {
0239 status = "okay";
0240
0241 port {
0242 camera0_0: endpoint {
0243 remote-endpoint = <&ov7670_0>;
0244 };
0245 };
0246 };
0247
0248 &asram {
0249 status = "okay";
0250 };
0251
0252 &adma0 {
0253 status = "okay";
0254 };
0255
0256 &audio_clk {
0257 status = "okay";
0258 };
0259
0260 &sspa0 {
0261 status = "okay";
0262 dmas = <&adma0 0>, <&adma0 1>;
0263 dma-names = "tx", "rx";
0264
0265 sspa0_dai: port {
0266 sspa0_0: endpoint {
0267 remote-endpoint = <&rt5631_0>;
0268 frame-master;
0269 bitclock-master;
0270 dai-format = "i2s";
0271 };
0272 };
0273 };
0274
0275 &gpu {
0276 status = "okay";
0277 };