Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 
0003 /dts-v1/;
0004 #include <dt-bindings/gpio/gpio.h>
0005 #include <dt-bindings/input/input.h>
0006 #include "s5pv210-aries.dtsi"
0007 
0008 / {
0009         model = "Samsung Galaxy S1 (GT-I9000) based on S5PV210";
0010         compatible = "samsung,galaxys", "samsung,aries", "samsung,s5pv210";
0011         chassis-type = "handset";
0012 
0013         chosen {
0014                 stdout-path = &uart2;
0015         };
0016 
0017         nand_pwrseq: nand-pwrseq {
0018                 compatible = "mmc-pwrseq-simple";
0019                 reset-gpios = <&gpj2 7 GPIO_ACTIVE_LOW>;
0020                 pinctrl-names = "default";
0021                 pinctrl-0 = <&massmemory_en>;
0022         };
0023 
0024         gpio-keys {
0025                 compatible = "gpio-keys";
0026 
0027                 key-power {
0028                         label = "power";
0029                         gpios = <&gph2 6 GPIO_ACTIVE_LOW>;
0030                         linux,code = <KEY_POWER>;
0031                         wakeup-source;
0032                 };
0033 
0034                 key-vol-down {
0035                         label = "volume_down";
0036                         gpios = <&gph3 1 GPIO_ACTIVE_LOW>;
0037                         linux,code = <KEY_VOLUMEDOWN>;
0038                 };
0039 
0040                 key-vol-up {
0041                         label = "volume_up";
0042                         gpios = <&gph3 2 GPIO_ACTIVE_LOW>;
0043                         linux,code = <KEY_VOLUMEUP>;
0044                 };
0045 
0046                 key-home {
0047                         label = "home";
0048                         gpios = <&gph3 5 GPIO_ACTIVE_LOW>;
0049                         linux,code = <KEY_HOME>;
0050                         wakeup-source;
0051                 };
0052         };
0053 
0054         i2c_fmradio: i2c-gpio-8 {
0055                 compatible = "i2c-gpio";
0056                 sda-gpios = <&gpd1 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
0057                 scl-gpios = <&gpd1 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
0058                 i2c-gpio,delay-us = <2>;
0059                 #address-cells = <1>;
0060                 #size-cells = <0>;
0061 
0062                 pinctrl-names = "default";
0063                 pinctrl-0 = <&fm_i2c_pins>;
0064 
0065                 fmradio@10 {
0066                         compatible = "silabs,si470x";
0067                         reg = <0x10>;
0068                         interrupt-parent = <&gpj2>;
0069                         interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
0070                         reset-gpios = <&gpj2 5 GPIO_ACTIVE_HIGH>;
0071 
0072                         pinctrl-names = "default";
0073                         pinctrl-0 = <&fm_irq &fm_rst>;
0074                 };
0075         };
0076 
0077         micbias_reg: regulator-fixed-3 {
0078                 compatible = "regulator-fixed";
0079                 regulator-name = "MICBIAS";
0080                 gpio = <&gpj4 2 GPIO_ACTIVE_HIGH>;
0081                 enable-active-high;
0082 
0083                 pinctrl-names = "default";
0084                 pinctrl-0 = <&micbias_reg_ena>;
0085         };
0086 
0087         sound {
0088                 compatible = "samsung,aries-wm8994";
0089 
0090                 model = "Aries";
0091 
0092                 extcon = <&fsa9480>;
0093 
0094                 main-micbias-supply = <&micbias_reg>;
0095                 headset-micbias-supply = <&micbias_reg>;
0096 
0097                 earpath-sel-gpios = <&gpj2 6 GPIO_ACTIVE_HIGH>;
0098 
0099                 io-channels = <&adc 3>;
0100                 io-channel-names = "headset-detect";
0101                 headset-detect-gpios = <&gph0 6 GPIO_ACTIVE_LOW>;
0102                 headset-key-gpios = <&gph3 6 GPIO_ACTIVE_HIGH>;
0103 
0104                 samsung,audio-routing =
0105                         "HP", "HPOUT1L",
0106                         "HP", "HPOUT1R",
0107 
0108                         "SPK", "SPKOUTLN",
0109                         "SPK", "SPKOUTLP",
0110 
0111                         "RCV", "HPOUT2N",
0112                         "RCV", "HPOUT2P",
0113 
0114                         "LINE", "LINEOUT2N",
0115                         "LINE", "LINEOUT2P",
0116 
0117                         "IN1LP", "Main Mic",
0118                         "IN1LN", "Main Mic",
0119 
0120                         "IN1RP", "Headset Mic",
0121                         "IN1RN", "Headset Mic",
0122 
0123                         "IN2LN", "FM In",
0124                         "IN2RN", "FM In",
0125 
0126                         "Modem Out", "Modem TX",
0127                         "Modem RX", "Modem In",
0128 
0129                         "Bluetooth SPK", "TX",
0130                         "RX", "Bluetooth Mic";
0131 
0132                 pinctrl-names = "default";
0133                 pinctrl-0 = <&headset_det &earpath_sel>;
0134 
0135                 cpu {
0136                         sound-dai = <&i2s0>, <&bt_codec>;
0137                 };
0138 
0139                 codec {
0140                         sound-dai = <&wm8994>;
0141                 };
0142         };
0143 };
0144 
0145 &aliases {
0146         i2c8 = &i2c_fmradio;
0147 };
0148 
0149 &pinctrl0 {
0150         pinctrl-names = "default";
0151         pinctrl-0 = <&sleep_cfg>;
0152 
0153         fm_i2c_pins: fm-i2c-pins-pins {
0154                 samsung,pins = "gpd1-2", "gpd1-3";
0155                 samsung,pin-pud = <S5PV210_PIN_PULL_NONE>;
0156                 samsung,pin-drv = <S5PV210_PIN_DRV_LV1>;
0157         };
0158 
0159         headset_det: headset-det-pins {
0160                 samsung,pins = "gph0-6", "gph3-6";
0161                 samsung,pin-function = <S5PV210_PIN_FUNC_F>;
0162                 samsung,pin-pud = <S5PV210_PIN_PULL_NONE>;
0163         };
0164 
0165         fm_irq: fm-irq-pins {
0166                 samsung,pins = "gpj2-4";
0167                 samsung,pin-function = <S5PV210_PIN_FUNC_INPUT>;
0168                 samsung,pin-pud = <S5PV210_PIN_PULL_UP>;
0169                 samsung,pin-drv = <S5PV210_PIN_DRV_LV1>;
0170         };
0171 
0172         fm_rst: fm-rst-pins {
0173                 samsung,pins = "gpj2-5";
0174                 samsung,pin-function = <S5PV210_PIN_FUNC_OUTPUT>;
0175                 samsung,pin-pud = <S5PV210_PIN_PULL_NONE>;
0176                 samsung,pin-drv = <S5PV210_PIN_DRV_LV1>;
0177         };
0178 
0179         earpath_sel: earpath-sel-pins {
0180                 samsung,pins = "gpj2-6";
0181                 samsung,pin-pud = <S5PV210_PIN_PULL_NONE>;
0182                 samsung,pin-drv = <S5PV210_PIN_DRV_LV1>;
0183         };
0184 
0185         massmemory_en: massmemory-en-pins {
0186                 samsung,pins = "gpj2-7";
0187                 samsung,pin-function = <S5PV210_PIN_FUNC_OUTPUT>;
0188                 samsung,pin-pud = <S5PV210_PIN_PULL_NONE>;
0189                 samsung,pin-drv = <S5PV210_PIN_DRV_LV1>;
0190         };
0191 
0192         micbias_reg_ena: micbias-reg-ena-pins {
0193                 samsung,pins = "gpj4-2";
0194                 samsung,pin-pud = <S5PV210_PIN_PULL_NONE>;
0195                 samsung,pin-drv = <S5PV210_PIN_DRV_LV1>;
0196         };
0197 
0198         /* Based on CyanogenMod 3.0.101 kernel */
0199         sleep_cfg: sleep-state {
0200                 PIN_SLP(gpa0-0, PREV, NONE);
0201                 PIN_SLP(gpa0-1, PREV, NONE);
0202                 PIN_SLP(gpa0-2, PREV, NONE);
0203                 PIN_SLP(gpa0-3, OUT1, NONE);
0204                 PIN_SLP(gpa0-4, INPUT, DOWN);
0205                 PIN_SLP(gpa0-5, OUT0, NONE);
0206                 PIN_SLP(gpa0-6, INPUT, DOWN);
0207                 PIN_SLP(gpa0-7, OUT1, NONE);
0208 
0209                 PIN_SLP(gpa1-0, INPUT, DOWN);
0210                 PIN_SLP(gpa1-1, OUT0, NONE);
0211                 PIN_SLP(gpa1-2, INPUT, NONE);
0212                 PIN_SLP(gpa1-3, OUT0, NONE);
0213 
0214                 PIN_SLP(gpb-0, OUT0, NONE);
0215                 PIN_SLP(gpb-1, OUT1, NONE);
0216                 PIN_SLP(gpb-2, OUT0, NONE);
0217                 PIN_SLP(gpb-3, PREV, NONE);
0218                 PIN_SLP(gpb-4, INPUT, NONE);
0219                 PIN_SLP(gpb-5, PREV, NONE);
0220                 PIN_SLP(gpb-6, INPUT, DOWN);
0221                 PIN_SLP(gpb-7, OUT0, NONE);
0222 
0223                 PIN_SLP(gpc0-0, OUT0, NONE);
0224                 PIN_SLP(gpc0-1, INPUT, DOWN);
0225                 PIN_SLP(gpc0-2, OUT0, NONE);
0226                 PIN_SLP(gpc0-3, INPUT, NONE);
0227                 PIN_SLP(gpc0-4, OUT0, NONE);
0228 
0229                 PIN_SLP(gpc1-0, INPUT, DOWN);
0230                 PIN_SLP(gpc1-1, INPUT, DOWN);
0231                 PIN_SLP(gpc1-2, INPUT, DOWN);
0232                 PIN_SLP(gpc1-3, INPUT, DOWN);
0233                 PIN_SLP(gpc1-4, INPUT, DOWN);
0234 
0235                 PIN_SLP(gpd0-0, INPUT, DOWN);
0236                 PIN_SLP(gpd0-1, OUT0, NONE);
0237                 PIN_SLP(gpd0-2, INPUT, DOWN);
0238                 PIN_SLP(gpd0-3, INPUT, DOWN);
0239 
0240                 PIN_SLP(gpd1-0, INPUT, NONE);
0241                 PIN_SLP(gpd1-1, INPUT, NONE);
0242                 PIN_SLP(gpd1-2, INPUT, NONE);
0243                 PIN_SLP(gpd1-3, INPUT, NONE);
0244                 PIN_SLP(gpd1-4, INPUT, DOWN);
0245                 PIN_SLP(gpd1-5, INPUT, DOWN);
0246 
0247                 PIN_SLP(gpe0-0, INPUT, DOWN);
0248                 PIN_SLP(gpe0-1, INPUT, DOWN);
0249                 PIN_SLP(gpe0-2, INPUT, DOWN);
0250                 PIN_SLP(gpe0-3, INPUT, DOWN);
0251                 PIN_SLP(gpe0-4, INPUT, DOWN);
0252                 PIN_SLP(gpe0-5, INPUT, DOWN);
0253                 PIN_SLP(gpe0-6, INPUT, DOWN);
0254                 PIN_SLP(gpe0-7, INPUT, DOWN);
0255 
0256                 PIN_SLP(gpe1-0, INPUT, DOWN);
0257                 PIN_SLP(gpe1-1, INPUT, DOWN);
0258                 PIN_SLP(gpe1-2, INPUT, DOWN);
0259                 PIN_SLP(gpe1-3, OUT0, NONE);
0260                 PIN_SLP(gpe1-4, INPUT, DOWN);
0261 
0262                 PIN_SLP(gpf0-0, OUT0, NONE);
0263                 PIN_SLP(gpf0-1, OUT0, NONE);
0264                 PIN_SLP(gpf0-2, OUT0, NONE);
0265                 PIN_SLP(gpf0-3, OUT0, NONE);
0266                 PIN_SLP(gpf0-4, OUT0, NONE);
0267                 PIN_SLP(gpf0-5, OUT0, NONE);
0268                 PIN_SLP(gpf0-6, OUT0, NONE);
0269                 PIN_SLP(gpf0-7, OUT0, NONE);
0270 
0271                 PIN_SLP(gpf1-0, OUT0, NONE);
0272                 PIN_SLP(gpf1-1, OUT0, NONE);
0273                 PIN_SLP(gpf1-2, OUT0, NONE);
0274                 PIN_SLP(gpf1-3, OUT0, NONE);
0275                 PIN_SLP(gpf1-4, OUT0, NONE);
0276                 PIN_SLP(gpf1-5, OUT0, NONE);
0277                 PIN_SLP(gpf1-6, OUT0, NONE);
0278                 PIN_SLP(gpf1-7, OUT0, NONE);
0279 
0280                 PIN_SLP(gpf2-0, OUT0, NONE);
0281                 PIN_SLP(gpf2-1, OUT0, NONE);
0282                 PIN_SLP(gpf2-2, OUT0, NONE);
0283                 PIN_SLP(gpf2-3, OUT0, NONE);
0284                 PIN_SLP(gpf2-4, OUT0, NONE);
0285                 PIN_SLP(gpf2-5, OUT0, NONE);
0286                 PIN_SLP(gpf2-6, OUT0, NONE);
0287                 PIN_SLP(gpf2-7, OUT0, NONE);
0288 
0289                 PIN_SLP(gpf3-0, OUT0, NONE);
0290                 PIN_SLP(gpf3-1, OUT0, NONE);
0291                 PIN_SLP(gpf3-2, OUT0, NONE);
0292                 PIN_SLP(gpf3-3, OUT0, NONE);
0293                 PIN_SLP(gpf3-4, PREV, NONE);
0294                 PIN_SLP(gpf3-5, INPUT, DOWN);
0295 
0296                 PIN_SLP(gpg0-0, OUT0, NONE);
0297                 PIN_SLP(gpg0-1, INPUT, NONE);
0298                 PIN_SLP(gpg0-2, INPUT, NONE);
0299                 PIN_SLP(gpg0-3, INPUT, NONE);
0300                 PIN_SLP(gpg0-4, INPUT, NONE);
0301                 PIN_SLP(gpg0-5, INPUT, NONE);
0302                 PIN_SLP(gpg0-6, INPUT, NONE);
0303 
0304                 PIN_SLP(gpg1-0, OUT0, NONE);
0305                 PIN_SLP(gpg1-1, OUT1, NONE);
0306                 PIN_SLP(gpg1-2, PREV, NONE);
0307                 PIN_SLP(gpg1-3, OUT1, NONE);
0308                 PIN_SLP(gpg1-4, OUT1, NONE);
0309                 PIN_SLP(gpg1-5, OUT1, NONE);
0310                 PIN_SLP(gpg1-6, OUT1, NONE);
0311 
0312                 PIN_SLP(gpg2-0, OUT0, NONE);
0313                 PIN_SLP(gpg2-1, OUT0, NONE);
0314                 PIN_SLP(gpg2-2, INPUT, NONE);
0315                 PIN_SLP(gpg2-3, OUT0, NONE);
0316                 PIN_SLP(gpg2-4, OUT0, NONE);
0317                 PIN_SLP(gpg2-5, OUT0, NONE);
0318                 PIN_SLP(gpg2-6, OUT0, NONE);
0319 
0320                 PIN_SLP(gpg3-0, OUT1, NONE);
0321                 PIN_SLP(gpg3-1, OUT0, NONE);
0322                 PIN_SLP(gpg3-2, INPUT, NONE);
0323                 PIN_SLP(gpg3-3, INPUT, DOWN);
0324                 PIN_SLP(gpg3-4, OUT0, NONE);
0325                 PIN_SLP(gpg3-5, OUT0, NONE);
0326                 PIN_SLP(gpg3-6, INPUT, DOWN);
0327 
0328                 PIN_SLP(gpi-0, PREV, NONE);
0329                 PIN_SLP(gpi-1, INPUT, DOWN);
0330                 PIN_SLP(gpi-2, PREV, NONE);
0331                 PIN_SLP(gpi-3, PREV, NONE);
0332                 PIN_SLP(gpi-4, PREV, NONE);
0333                 PIN_SLP(gpi-5, INPUT, DOWN);
0334                 PIN_SLP(gpi-6, INPUT, DOWN);
0335 
0336                 PIN_SLP(gpj0-0, INPUT, NONE);
0337                 PIN_SLP(gpj0-1, INPUT, NONE);
0338                 PIN_SLP(gpj0-2, INPUT, NONE);
0339                 PIN_SLP(gpj0-3, INPUT, NONE);
0340                 PIN_SLP(gpj0-4, INPUT, NONE);
0341                 PIN_SLP(gpj0-5, INPUT, DOWN);
0342                 PIN_SLP(gpj0-6, OUT0, NONE);
0343                 PIN_SLP(gpj0-7, INPUT, NONE);
0344 
0345                 PIN_SLP(gpj1-0, INPUT, DOWN);
0346                 PIN_SLP(gpj1-1, OUT0, NONE);
0347                 PIN_SLP(gpj1-2, INPUT, DOWN);
0348                 PIN_SLP(gpj1-3, PREV, NONE);
0349                 PIN_SLP(gpj1-4, PREV, NONE);
0350                 PIN_SLP(gpj1-5, OUT0, NONE);
0351 
0352                 PIN_SLP(gpj2-0, INPUT, DOWN);
0353                 PIN_SLP(gpj2-1, INPUT, DOWN);
0354                 PIN_SLP(gpj2-2, OUT0, NONE);
0355                 PIN_SLP(gpj2-3, INPUT, DOWN);
0356                 PIN_SLP(gpj2-4, INPUT, UP);
0357                 PIN_SLP(gpj2-5, PREV, NONE);
0358                 PIN_SLP(gpj2-6, PREV, NONE);
0359                 PIN_SLP(gpj2-7, OUT1, NONE);
0360 
0361                 PIN_SLP(gpj3-0, INPUT, NONE);
0362                 PIN_SLP(gpj3-1, INPUT, NONE);
0363                 PIN_SLP(gpj3-2, OUT0, NONE);
0364                 PIN_SLP(gpj3-3, INPUT, DOWN);
0365                 PIN_SLP(gpj3-4, INPUT, NONE);
0366                 PIN_SLP(gpj3-5, INPUT, NONE);
0367                 PIN_SLP(gpj3-6, INPUT, NONE);
0368                 PIN_SLP(gpj3-7, INPUT, NONE);
0369 
0370                 PIN_SLP(gpj4-0, INPUT, NONE);
0371                 PIN_SLP(gpj4-1, INPUT, DOWN);
0372                 PIN_SLP(gpj4-2, PREV, NONE);
0373                 PIN_SLP(gpj4-3, INPUT, NONE);
0374                 PIN_SLP(gpj4-4, INPUT, DOWN);
0375 
0376                 PIN_SLP(mp01-0, INPUT, DOWN);
0377                 PIN_SLP(mp01-1, OUT0, NONE);
0378                 PIN_SLP(mp01-2, INPUT, DOWN);
0379                 PIN_SLP(mp01-3, INPUT, DOWN);
0380                 PIN_SLP(mp01-4, OUT1, NONE);
0381                 PIN_SLP(mp01-5, INPUT, DOWN);
0382                 PIN_SLP(mp01-6, INPUT, DOWN);
0383                 PIN_SLP(mp01-7, INPUT, DOWN);
0384 
0385                 PIN_SLP(mp02-0, INPUT, DOWN);
0386                 PIN_SLP(mp02-1, INPUT, DOWN);
0387                 PIN_SLP(mp02-2, INPUT, NONE);
0388                 PIN_SLP(mp02-3, INPUT, DOWN);
0389 
0390                 PIN_SLP(mp03-0, INPUT, DOWN);
0391                 PIN_SLP(mp03-1, INPUT, DOWN);
0392                 PIN_SLP(mp03-2, OUT1, NONE);
0393                 PIN_SLP(mp03-3, OUT0, NONE);
0394                 PIN_SLP(mp03-4, INPUT, NONE);
0395                 PIN_SLP(mp03-5, OUT1, NONE);
0396                 PIN_SLP(mp03-6, INPUT, DOWN);
0397                 PIN_SLP(mp03-7, INPUT, DOWN);
0398 
0399                 PIN_SLP(mp04-0, INPUT, DOWN);
0400                 PIN_SLP(mp04-1, OUT0, NONE);
0401                 PIN_SLP(mp04-2, INPUT, DOWN);
0402                 PIN_SLP(mp04-3, OUT0, NONE);
0403                 PIN_SLP(mp04-4, INPUT, DOWN);
0404                 PIN_SLP(mp04-5, INPUT, DOWN);
0405                 PIN_SLP(mp04-6, OUT0, NONE);
0406                 PIN_SLP(mp04-7, INPUT, DOWN);
0407 
0408                 PIN_SLP(mp05-0, INPUT, NONE);
0409                 PIN_SLP(mp05-1, INPUT, NONE);
0410                 PIN_SLP(mp05-2, INPUT, NONE);
0411                 PIN_SLP(mp05-3, INPUT, NONE);
0412                 PIN_SLP(mp05-4, INPUT, DOWN);
0413                 PIN_SLP(mp05-5, OUT0, NONE);
0414                 PIN_SLP(mp05-6, INPUT, DOWN);
0415                 PIN_SLP(mp05-7, PREV, NONE);
0416 
0417                 PIN_SLP(mp06-0, INPUT, DOWN);
0418                 PIN_SLP(mp06-1, INPUT, DOWN);
0419                 PIN_SLP(mp06-2, INPUT, DOWN);
0420                 PIN_SLP(mp06-3, INPUT, DOWN);
0421                 PIN_SLP(mp06-4, INPUT, DOWN);
0422                 PIN_SLP(mp06-5, INPUT, DOWN);
0423                 PIN_SLP(mp06-6, INPUT, DOWN);
0424                 PIN_SLP(mp06-7, INPUT, DOWN);
0425 
0426                 PIN_SLP(mp07-0, INPUT, DOWN);
0427                 PIN_SLP(mp07-1, INPUT, DOWN);
0428                 PIN_SLP(mp07-2, INPUT, DOWN);
0429                 PIN_SLP(mp07-3, INPUT, DOWN);
0430                 PIN_SLP(mp07-4, INPUT, DOWN);
0431                 PIN_SLP(mp07-5, INPUT, DOWN);
0432                 PIN_SLP(mp07-6, INPUT, DOWN);
0433                 PIN_SLP(mp07-7, INPUT, DOWN);
0434         };
0435 };
0436 
0437 &sdhci0 {
0438         bus-width = <4>;
0439         non-removable;
0440         mmc-pwrseq = <&nand_pwrseq>;
0441         pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4>;
0442         pinctrl-names = "default";
0443         status = "okay";
0444 
0445         assigned-clocks = <&clocks MOUT_MMC0>, <&clocks SCLK_MMC0>;
0446         assigned-clock-rates = <0>, <52000000>;
0447         assigned-clock-parents = <&clocks MOUT_MPLL>;
0448 };