Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Roseapple Pi
0004  *
0005  * Copyright (C) 2020-2021 Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
0006  */
0007 
0008 /dts-v1/;
0009 
0010 #include "owl-s500.dtsi"
0011 
0012 / {
0013         compatible = "roseapplepi,roseapplepi", "actions,s500";
0014         model = "Roseapple Pi";
0015 
0016         aliases {
0017                 mmc0 = &mmc0;
0018                 serial2 = &uart2;
0019         };
0020 
0021         chosen {
0022                 stdout-path = "serial2:115200n8";
0023         };
0024 
0025         memory@0 {
0026                 device_type = "memory";
0027                 reg = <0x0 0x80000000>; /* 2GB */
0028         };
0029 
0030         syspwr: regulator-5v0 {
0031                 compatible = "regulator-fixed";
0032                 regulator-name = "SYSPWR";
0033                 regulator-min-microvolt = <5000000>;
0034                 regulator-max-microvolt = <5000000>;
0035                 regulator-always-on;
0036         };
0037 };
0038 
0039 &cpu0 {
0040         cpu0-supply = <&vdd_cpu>;
0041 };
0042 
0043 &i2c0 {
0044         status = "okay";
0045         pinctrl-names = "default";
0046         pinctrl-0 = <&i2c0_pins>;
0047 
0048         atc260x: pmic@65 {
0049                 compatible = "actions,atc2603c";
0050                 reg = <0x65>;
0051                 interrupt-parent = <&sirq>;
0052                 interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
0053 
0054                 reset-time-sec = <6>;
0055 
0056                 regulators {
0057                         compatible = "actions,atc2603c-regulator";
0058 
0059                         dcdc1-supply = <&syspwr>;
0060                         dcdc2-supply = <&syspwr>;
0061                         dcdc3-supply = <&syspwr>;
0062                         ldo1-supply = <&syspwr>;
0063                         ldo2-supply = <&syspwr>;
0064                         ldo3-supply = <&syspwr>;
0065                         ldo5-supply = <&syspwr>;
0066                         ldo6-supply = <&syspwr>;
0067                         ldo7-supply = <&syspwr>;
0068                         ldo8-supply = <&syspwr>;
0069                         ldo11-supply = <&syspwr>;
0070                         ldo12-supply = <&syspwr>;
0071                         switchldo1-supply = <&vcc>;
0072 
0073                         vdd_cpu: dcdc1 {
0074                                 regulator-name = "VDD_CPU";
0075                                 regulator-min-microvolt = <700000>;
0076                                 regulator-max-microvolt = <1400000>;
0077                                 regulator-always-on;
0078                         };
0079 
0080                         vddq: dcdc2 {
0081                                 regulator-name = "VDDQ";
0082                                 regulator-min-microvolt = <1300000>;
0083                                 regulator-max-microvolt = <2150000>;
0084                                 regulator-always-on;
0085                                 regulator-boot-on;
0086                         };
0087 
0088                         vcc: dcdc3 {
0089                                 regulator-name = "VCC";
0090                                 regulator-min-microvolt = <2600000>;
0091                                 regulator-max-microvolt = <3300000>;
0092                                 regulator-always-on;
0093                         };
0094 
0095                         vcc_3v3: ldo1 {
0096                                 regulator-name = "VCC_3V3";
0097                                 regulator-min-microvolt = <2600000>;
0098                                 regulator-max-microvolt = <3300000>;
0099                                 regulator-always-on;
0100                         };
0101 
0102                         avcc: ldo2 {
0103                                 regulator-name = "AVCC";
0104                                 regulator-min-microvolt = <2600000>;
0105                                 regulator-max-microvolt = <3300000>;
0106                                 regulator-always-on;
0107                         };
0108 
0109                         vdd_1v8: ldo3 {
0110                                 regulator-name = "VDD_1V8";
0111                                 regulator-min-microvolt = <1500000>;
0112                                 regulator-max-microvolt = <2000000>;
0113                                 regulator-always-on;
0114                         };
0115 
0116                         vcc_3v1: ldo5 {
0117                                 regulator-name = "VCC_3V1";
0118                                 regulator-min-microvolt = <2600000>;
0119                                 regulator-max-microvolt = <3300000>;
0120                         };
0121 
0122                         avdd: ldo6 {
0123                                 regulator-name = "AVDD";
0124                                 regulator-min-microvolt = <700000>;
0125                                 regulator-max-microvolt = <1400000>;
0126                                 regulator-always-on;
0127                         };
0128 
0129                         sens_1v8: ldo7 {
0130                                 regulator-name = "SENS_1V8";
0131                                 regulator-min-microvolt = <1800000>;
0132                                 regulator-max-microvolt = <1800000>;
0133                         };
0134 
0135                         ldo8: ldo8 {
0136                                 regulator-name = "LDO8";
0137                                 regulator-min-microvolt = <2300000>;
0138                                 regulator-max-microvolt = <3300000>;
0139                         };
0140 
0141                         svcc: ldo11 {
0142                                 regulator-name = "SVCC";
0143                                 regulator-min-microvolt = <2600000>;
0144                                 regulator-max-microvolt = <3300000>;
0145                                 regulator-always-on;
0146                         };
0147 
0148                         rtc_vdd: ldo12 {
0149                                 regulator-name = "RTC_VDD";
0150                                 regulator-min-microvolt = <1800000>;
0151                                 regulator-max-microvolt = <1800000>;
0152                                 regulator-always-on;
0153                         };
0154 
0155                         sd_vcc: switchldo1 {
0156                                 regulator-name = "SD_VCC";
0157                                 regulator-min-microvolt = <3000000>;
0158                                 regulator-max-microvolt = <3300000>;
0159                                 regulator-always-on;
0160                                 regulator-boot-on;
0161                         };
0162                 };
0163         };
0164 };
0165 
0166 &i2c1 {
0167         status = "disabled";
0168         pinctrl-names = "default";
0169         pinctrl-0 = <&i2c1_pins>;
0170 };
0171 
0172 &i2c2 {
0173         status = "disabled";
0174         pinctrl-names = "default";
0175         pinctrl-0 = <&i2c2_pins>;
0176 };
0177 
0178 &pinctrl {
0179         i2c0_pins: i2c0-pins {
0180                 pinmux {
0181                         groups = "i2c0_mfp";
0182                         function = "i2c0";
0183                 };
0184 
0185                 pinconf {
0186                         pins = "i2c0_sclk", "i2c0_sdata";
0187                         bias-pull-up;
0188                 };
0189         };
0190 
0191         i2c1_pins: i2c1-pins {
0192                 pinconf {
0193                         pins = "i2c1_sclk", "i2c1_sdata";
0194                         bias-pull-up;
0195                 };
0196         };
0197 
0198         i2c2_pins: i2c2-pins {
0199                 pinconf {
0200                         pins = "i2c2_sclk", "i2c2_sdata";
0201                         bias-pull-up;
0202                 };
0203         };
0204 
0205         mmc0_pins: mmc0-pins {
0206                 pinmux {
0207                         groups = "sd0_d0_mfp", "sd0_d1_mfp", "sd0_d2_d3_mfp",
0208                                  "sd0_cmd_mfp", "sd0_clk_mfp";
0209                         function = "sd0";
0210                 };
0211 
0212                 drv-pinconf {
0213                         groups = "sd0_d0_d3_drv", "sd0_cmd_drv", "sd0_clk_drv";
0214                         drive-strength = <8>;
0215                 };
0216 
0217                 bias0-pinconf {
0218                         pins = "sd0_d0", "sd0_d1", "sd0_d2",
0219                                "sd0_d3", "sd0_cmd";
0220                         bias-pull-up;
0221                 };
0222 
0223                 bias1-pinconf {
0224                         pins = "sd0_clk";
0225                         bias-pull-down;
0226                 };
0227         };
0228 
0229         ethernet_pins: ethernet-pins {
0230                 eth_rmii-pinmux {
0231                         groups = "rmii_txd0_mfp", "rmii_txd1_mfp",
0232                                  "rmii_rxd0_mfp", "rmii_rxd1_mfp",
0233                                  "rmii_txen_mfp", "rmii_rxen_mfp",
0234                                  "rmii_crs_dv_mfp", "rmii_ref_clk_mfp";
0235                         function = "eth_rmii";
0236                 };
0237 
0238                 phy_clk-pinmux {
0239                         groups = "clko_25m_mfp";
0240                         function = "clko_25m";
0241                 };
0242 
0243                 ref_clk-pinconf {
0244                         groups = "rmii_ref_clk_drv";
0245                         drive-strength = <2>;
0246                 };
0247 
0248         };
0249 };
0250 
0251 /* uSD */
0252 &mmc0 {
0253         status = "okay";
0254         pinctrl-names = "default";
0255         pinctrl-0 = <&mmc0_pins>;
0256         no-sdio;
0257         no-mmc;
0258         no-1-8-v;
0259         cd-gpios = <&pinctrl 117 GPIO_ACTIVE_LOW>;
0260         bus-width = <4>;
0261         vmmc-supply = <&sd_vcc>;
0262         vqmmc-supply = <&sd_vcc>;
0263 };
0264 
0265 &ethernet {
0266         pinctrl-names = "default";
0267         pinctrl-0 = <&ethernet_pins>;
0268         phy-mode = "rmii";
0269         phy-handle = <&eth_phy>;
0270         status = "okay";
0271 
0272         mdio {
0273                 #address-cells = <1>;
0274                 #size-cells = <0>;
0275 
0276                 reset-gpios = <&pinctrl 88 GPIO_ACTIVE_LOW>; /* GPIOC24 */
0277                 reset-delay-us = <10000>;
0278                 reset-post-delay-us = <150000>;
0279 
0280                 eth_phy: ethernet-phy@3 {
0281                         reg = <0x3>;
0282                         max-speed = <100>;
0283                         interrupt-parent = <&sirq>;
0284                         interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0285                 };
0286         };
0287 };
0288 
0289 &twd_timer {
0290         status = "okay";
0291 };
0292 
0293 &timer {
0294         clocks = <&hosc>;
0295 };
0296 
0297 &uart2 {
0298         status = "okay";
0299 };